reacthub-pixitweenjs 0.2.107-alpha.11 → 0.2.107-alpha.110

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.
Files changed (47) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +35 -14
  3. package/dist/.gitkeep +0 -0
  4. package/dist/components/PixiAudioSprite/PixiAudioSprite.d.ts +4 -3
  5. package/dist/components/PixiAudioSprite/PixiAudioSprite.stories.d.ts +55 -12
  6. package/dist/components/PixiAudioSprite/useAudioVisualizer.d.ts +18 -0
  7. package/dist/components/PixiAudioSprite/wave-config.d.ts +4 -0
  8. package/dist/components/PixiGifSprite/PixiGifSprite.stories.d.ts +2 -1
  9. package/dist/components/PixiGifSprite/index.d.ts +2 -2
  10. package/dist/components/PixiImageSprite/PixiImageSprite.stories.d.ts +3 -1
  11. package/dist/components/PixiLottieSprite/PixiLottieSprite.d.ts +14 -0
  12. package/dist/components/PixiLottieSprite/PixiLottieSprite.stories.d.ts +149 -0
  13. package/dist/components/PixiLottieSprite/index.d.ts +1 -0
  14. package/dist/components/PixiRemotionSprite/PixiRemotionSprite.d.ts +26 -0
  15. package/dist/components/PixiRemotionSprite/index.d.ts +1 -0
  16. package/dist/components/PixiSVGSprite/PixiSvgPathSprite.d.ts +4 -1
  17. package/dist/components/PixiSVGSprite/PixiSvgPathSprite.stories.d.ts +1 -1
  18. package/dist/components/PixiTextSprite/PixiTextSprite.d.ts +3 -1
  19. package/dist/components/PixiTextSprite/PixiTextSprite.stories.d.ts +2 -1
  20. package/dist/components/PixiVideoSprite/PixiVideoCanvasSync.d.ts +26 -0
  21. package/dist/components/PixiVideoSprite/PixiVideoSprite.d.ts +1 -0
  22. package/dist/components/PixiVideoSprite/PixiVideoSprite.stories.d.ts +6 -1
  23. package/dist/components/PixiVideoSprite/index.d.ts +1 -0
  24. package/dist/components/index.d.ts +2 -0
  25. package/dist/hocs/AbstractContainer.d.ts +3 -1
  26. package/dist/hooks/index.d.ts +1 -0
  27. package/dist/hooks/useDebounce.d.ts +2 -0
  28. package/dist/hooks/useDeepEffect.d.ts +2 -0
  29. package/dist/hooks/useGsapEffect.d.ts +3 -3
  30. package/dist/hooks/withEffectsHook.d.ts +1 -0
  31. package/dist/hooks/withFiltersHook.d.ts +6 -0
  32. package/dist/index.d.ts +1 -0
  33. package/dist/index.es.js +19961 -13469
  34. package/dist/index.umd.js +217 -190
  35. package/dist/providers/AudioContextProvider.d.ts +12 -0
  36. package/dist/providers/GsapPixieContextProvider.d.ts +3 -0
  37. package/dist/stories/Features/TimelineAnimations.d.ts +15 -0
  38. package/dist/stories/Features/TimelineTest.stories.d.ts +1 -1
  39. package/dist/stories/Features/common.tests.d.ts +331 -0
  40. package/dist/types/Animations.d.ts +34 -1
  41. package/dist/types/BaseProps.d.ts +18 -6
  42. package/dist/types/Effects.d.ts +9 -0
  43. package/dist/types/transformation.d.ts +1 -0
  44. package/dist/utils/GsapAnims.d.ts +2 -0
  45. package/dist/utils/isRemoteAsset.d.ts +1 -0
  46. package/package.json +8 -3
  47. /package/dist/components/PixiGifSprite/{PixiGifSprite.d.ts → PixiGifGsapSync.d.ts} +0 -0
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(Ve,q){typeof exports=="object"&&typeof module<"u"?q(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"],q):(Ve=typeof globalThis<"u"?globalThis:Ve||self,q(Ve["reacthub-pixitweenjs"]={},Ve.React,Ve.PIXIReact,Ve.PIXI,Ve.reacthubReactBindings,Ve.gsap))})(this,function(Ve,q,Je,nv,iv,ut){"use strict";function ah(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=ah(q),Fr=ah(nv);var bt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function sv(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 oh={exports:{}},Ns={};/**
1
+ (function(C,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("react"),require("@pixi/react"),require("pixi.js"),require("gsap"),require("reacthub-react-bindings")):typeof define=="function"&&define.amd?define(["exports","react","@pixi/react","pixi.js","gsap","reacthub-react-bindings"],E):(C=typeof globalThis<"u"?globalThis:C||self,E(C["reacthub-pixitweenjs"]={},C.React,C.PIXIReact,C.PIXI,C.gsap,C.reacthubReactBindings))})(this,function(exports,React,react,PIXI,gsap$2,reacthubReactBindings){"use strict";function _interopNamespaceDefault(C){const E=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(C){for(const I in C)if(I!=="default"){const B=Object.getOwnPropertyDescriptor(C,I);Object.defineProperty(E,I,B.get?B:{enumerable:!0,get:()=>C[I]})}}return E.default=C,Object.freeze(E)}const React__namespace=_interopNamespaceDefault(React),PIXI__namespace=_interopNamespaceDefault(PIXI);var commonjsGlobal$1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(C){return C&&C.__esModule&&Object.prototype.hasOwnProperty.call(C,"default")?C.default:C}function getAugmentedNamespace(C){if(C.__esModule)return C;var E=C.default;if(typeof E=="function"){var I=function B(){return this instanceof B?Reflect.construct(E,arguments,this.constructor):E.apply(this,arguments)};I.prototype=E.prototype}else I={};return Object.defineProperty(I,"__esModule",{value:!0}),Object.keys(C).forEach(function(B){var U=Object.getOwnPropertyDescriptor(C,B);Object.defineProperty(I,B,U.get?U:{enumerable:!0,get:function(){return C[B]}})}),I}var jsxRuntime={exports:{}},reactJsxRuntime_production_min={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,24 +6,48 @@
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 dt(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({}),et={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=ut.context(()=>{n.current&&n.current.progress(0).kill(),n.current&&n.current.clear(),n.current&&ut.killTweensOf(n.current),n.current=ut.timeline({paused:!0,defaults:{duration:0}})}),()=>{n.current&&(n.current.progress(0).kill(),ut.killTweensOf(n.current)),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(et.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(et.PAUSE))},w=()=>{n.current&&(n.current.resume(),Vn(et.RESUME))};return dt(et.SEEK_START,()=>{l.current=!0}),dt(et.SCRUBBER_PLAY,()=>{w()}),dt(et.SCRUBBER_PAUSE,()=>{b()}),dt(et.SCRUBBER_SEEK,x=>{d(x)}),dt(et.SEEK_END,()=>{l.current=!1}),dt(et.REVERSE_MODE_START,()=>{u.current=!0}),dt(et.REVERSE_MODE_END,()=>{u.current=!1}),dt(et.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(et.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],U=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:[U,j]}}),Vn(et.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]",Ye={};Ye[Fy]=Ye[Ny]=Ye[Ly]=Ye[ky]=Ye[By]=Ye[Dy]=Ye[Uy]=Ye[$y]=Ye[Gy]=!0,Ye[_y]=Ye[yy]=Ye[My]=Ye[xy]=Ye[Oy]=Ye[by]=Ye[wy]=Ye[Ty]=Ye[Ay]=Ye[Sy]=Ye[Ey]=Ye[Cy]=Ye[Iy]=Ye[Ry]=Ye[Py]=!1;function zy(t){return vy(t)&&my(t.length)&&!!Ye[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(Je.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:U,pointerover:j,isText:ee,isDragging:se,isGif:X,onDoubleClick:H,isTextEditMode:ve}=t;dt(et.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=Je.withFilters(Je.Container,{matrix:Fr.filters.ColorMatrixFilter});return Fe.jsxs(Je.Container,{ref:p,children:[Fe.jsxs(Je.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:U},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(Je.Container,{ref:v,children:t.children})}),X&&Fe.jsx(Je.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||{}),pt=(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))(pt||{}),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 U(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=U(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 U(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,Ke,Q,W,ae,Ee,Ce,Ze;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(Ke=ze>0?ze+1:0;Ke<he;){for(Q=xe,W=1,ae=f;Ke>=he&&k("invalid-input"),Ee=X(V.charCodeAt(Ke++)),(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)Ze=f-Ce,W>O(l/Ze)&&k("overflow"),W*=Ze;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,Ke,Q,W,ae=[],Ee,Ce,Ze,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,Ke=f;Q=Ke<=Pe?p:Ke>=Pe+v?v:Ke-Pe,!(He<Q);Ke+=f)gr=He-Q,Ze=f-Q,ae.push(N(H(Q+gr%Ze,0))),He=O(gr/Ze);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,U=e instanceof Object?"":"null prototype",j=!k&&St&&Object(e)===e&&St in e?vu.call(en(e),8,-1):U?"Object":"",ee=k||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",se=ee+(j||U?"["+Er.call(hf.call([],j||[],U||[]),": ")+"] ":"");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,"&quot;")}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 F1(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=Er.call(Array(t.indent+1)," ");else return null;return{base:r,prev:Er.call(Array(e+1),r)}}function Au(t,e){if(t.length===0)return"";var r=`
11
- `+e.prev+e.base;return r+Er.call(t,","+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 U=Object.keys(x);k=p?U.sort(p):U}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
- `," "],Pb=["{","}","|","\\","^","`"].concat(Rb),Ou=["'"].concat(Pb),Mf=["%","/","?",";","#"].concat(Ou),Of=["/","?","#"],Mb=255,Ff=/^[+a-z0-9A-Z_-]{0,63}$/,Ob=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Fb={javascript:!0,"javascript:":!0},Fu={javascript:!0,"javascript:":!0},si={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Nu=Ab;function ea(t,e,r){if(t&&typeof t=="object"&&t instanceof ir)return t;var n=new ir;return n.parse(t,e,r),n}ir.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=Ib.exec(l);if(f)return this.path=l,this.href=l,this.pathname=f[1],f[2]?(this.search=f[2],e?this.query=Nu.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var p=Eb.exec(l);if(p){p=p[0];var v=p.toLowerCase();this.protocol=v,l=l.substr(p.length)}if(r||p||l.match(/^\/\/[^@/]+@[^@/]+/)){var c=l.substr(0,2)==="//";c&&!(p&&Fu[p])&&(l=l.substr(2),this.slashes=!0)}if(!Fu[p]&&(c||p&&!si[p])){for(var d=-1,m=0;m<Of.length;m++){var _=l.indexOf(Of[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<Mf.length;m++){var _=l.indexOf(Mf[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(Ff)){for(var O="",N=0,L=I.length;N<L;N++)I.charCodeAt(N)>127?O+="x":O+=I[N];if(!O.match(Ff)){var k=E.slice(0,m),U=E.slice(m+1),j=I.match(Ob);j&&(k.push(j[1]),U.unshift(j[2])),U.length&&(l="/"+U.join(".")+l),this.hostname=k.join(".");break}}}this.hostname.length>Mb?this.hostname="":this.hostname=this.hostname.toLowerCase(),x||(this.hostname=Sb.toASCII(this.hostname));var ee=this.port?":"+this.port:"",se=this.hostname||"";this.host=se+ee,this.href+=this.host,x&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!Fb[v])for(var m=0,S=Ou.length;m<S;m++){var X=Ou[m];if(l.indexOf(X)!==-1){var H=encodeURIComponent(X);H===X&&(H=escape(X)),l=l.split(X).join(H)}}var ve=l.indexOf("#");ve!==-1&&(this.hash=l.substr(ve),l=l.slice(0,ve));var ke=l.indexOf("?");if(ke!==-1?(this.search=l.substr(ke),this.query=l.substr(ke+1),e&&(this.query=Nu.parse(this.query)),l=l.slice(0,ke)):e&&(this.search="",this.query={}),l&&(this.pathname=l),si[v]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var ee=this.pathname||"",z=this.search||"";this.path=ee+z}return this.href=this.format(),this};function Nb(t){return typeof t=="string"&&(t=ea(t)),t instanceof ir?t.format():ir.prototype.format.call(t)}ir.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,a="";this.host?i=t+this.host:this.hostname&&(i=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(a=Nu.stringify(this.query));var u=this.search||a&&"?"+a||"";return e&&e.substr(-1)!==":"&&(e+=":"),this.slashes||(!e||si[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 Lb(t,e){return ea(t,!1,!0).resolve(e)}ir.prototype.resolve=function(t){return this.resolveObject(ea(t,!1,!0)).format()},ir.prototype.resolveObject=function(t){if(typeof t=="string"){var e=new ir;e.parse(t,!1,!0),t=e}for(var r=new ir,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 si[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(!si[t.protocol]){for(var p=Object.keys(t),v=0;v<p.length;v++){var c=p[v];r[c]=t[c]}return r.href=r.format(),r}if(r.protocol=t.protocol,!t.host&&!Fu[t.protocol]){for(var 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&&!si[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,U=E.length;U>=0;U--)N=E[U],N==="."?E.splice(U,1):N===".."?(E.splice(U,1),k++):k&&(E.splice(U,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},ir.prototype.parseHost=function(){var t=this.host,e=Cb.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 kb=ea,Bb=Lb,Db=Nb;const Ub={parse:kb,format:Db,resolve:Bb},Nf={};function Re(t,e,r=3){if(Nf[e])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${e}
14
- Deprecated since v${t}`):(n=n.split(`
15
- `).splice(r).join(`
16
- `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${e}
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 rw(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 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 We{constructor(e=0,r=0){this.x=0,this.y=0,this.x=e,this.y=r}clone(){return new We(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 We,new We,new We,new We];class Xe{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 Xe(0,0,0,0)}clone(){return new Xe(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 Xe(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 Xe(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 We;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 We;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;
9
+ */var f$5=React,k$2=Symbol.for("react.element"),l$6=Symbol.for("react.fragment"),m$4=Object.prototype.hasOwnProperty,n$6=f$5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p$4={key:!0,ref:!0,__self:!0,__source:!0};function q(C,E,I){var B,U={},V=null,X=null;I!==void 0&&(V=""+I),E.key!==void 0&&(V=""+E.key),E.ref!==void 0&&(X=E.ref);for(B in E)m$4.call(E,B)&&!p$4.hasOwnProperty(B)&&(U[B]=E[B]);if(C&&C.defaultProps)for(B in E=C.defaultProps,E)U[B]===void 0&&(U[B]=E[B]);return{$$typeof:k$2,type:C,key:V,ref:X,props:U,_owner:n$6.current}}reactJsxRuntime_production_min.Fragment=l$6,reactJsxRuntime_production_min.jsx=q,reactJsxRuntime_production_min.jsxs=q,jsxRuntime.exports=reactJsxRuntime_production_min;var jsxRuntimeExports=jsxRuntime.exports,Effects=(C=>(C.BlackAndWhite="BlackAndWhite",C.Sepia="Sepia",C.RetroVintage="RetroVintage",C.NightVision="NightVision",C.Normal="Normal",C.Vignette="Vignette",C.None="Normal",C))(Effects||{}),Waveforms=(C=>(C.NONE="none",C.EQUALIZER="equalizer",C.ROUNDBARS="roundbars",C.LED="led",C.RADIAL_SPECTRUM="radial_spectrum",C.LUMI_BARS="lumi_bars",C))(Waveforms||{});let targetElement;function getElement(){return targetElement=document.body,targetElement}function useCustomEventListener(C,E,I){let B;return React.useEffect(()=>{B=B||getElement();const U=V=>{const X=V.detail;E(X)};return B.addEventListener(C,U,!1),()=>{B==null||B.removeEventListener(C,U,!1)}},I),U=>{B=U}}function emitCustomEvent(C,E){const I=getElement(),B=new CustomEvent(C,{detail:E});I.dispatchEvent(B)}function newCustomEventEmitter(){let C;function E(I){C=I}return E.emit=function(I,B){const U=new CustomEvent(I,{bubbles:!0,detail:B});C==null||C.dispatchEvent(U)},E}const GsapPixieContext=React__namespace.createContext({}),Events={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",FONTS_LOADED:"FONTS_LOADED"},GsapPixieContextProvider=({children:C})=>{const[E,I]=React.useState(0),B=React.useRef(),U=React.useRef(),V=React.useRef(0),X=React.useRef(!1),Y=React.useRef(!1),[K,J]=React.useState(!1);React.useLayoutEffect(()=>(U.current=gsap$2.context(()=>{B.current&&B.current.progress(0).kill(),B.current&&B.current.clear(),B.current&&gsap$2.killTweensOf(B.current),B.current=gsap$2.timeline({paused:!0,defaults:{duration:0}})}),()=>{B.current&&B.current.revert(),U.current.revert()}),[]);const xe=React.useCallback(()=>{if(B.current){let Ie=B.current.time();Ie<V.current?X.current=!0:X.current=!1,V.current=Ie}},[]);React.useEffect(()=>{if(B.current){const Pe=B.current;Pe.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){Pe.pause(),xe()}).eventCallback("onUpdate",function(){xe()}).eventCallback("onRepeat",function(){console.log("onrepeat",Pe.progress())}).eventCallback("onReverseComplete",function(){console.log("onReverseComplete",Pe.progress())}).eventCallback("onComplete",function(){Pe.seek(0),Pe.pause(),emitCustomEvent(Events.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),xe()})}},[]);const Z=React.useCallback(()=>{B.current&&B.current.revert()},[]),_e=React.useCallback(()=>{B.current&&B.current.restart()},[]),Se=React.useCallback(()=>{if(B.current){const Pe=B.current;Pe.repeat(1),Pe.restart()}},[]),Ee=React.useCallback(Pe=>{B.current&&B.current.seek(Pe)},[]),Ae=React.useCallback(()=>{B.current&&B.current.seek(4)},[]),Re=React.useCallback(()=>{const Pe=B.current;return Pe?Pe.totalDuration():0},[]),Te=()=>{B.current&&(B.current.pause(),emitCustomEvent(Events.PAUSE))},we=()=>{B.current&&(B.current.resume(),emitCustomEvent(Events.RESUME))};return useCustomEventListener(Events.SEEK_START,()=>{Y.current=!0}),useCustomEventListener(Events.SCRUBBER_PLAY,()=>{we()}),useCustomEventListener(Events.SCRUBBER_PAUSE,()=>{Te()}),useCustomEventListener(Events.SCRUBBER_SEEK,Pe=>{Ee(Pe)}),useCustomEventListener(Events.SEEK_END,()=>{Y.current=!1}),useCustomEventListener(Events.REVERSE_MODE_START,()=>{X.current=!0}),useCustomEventListener(Events.REVERSE_MODE_END,()=>{X.current=!1}),useCustomEventListener(Events.SCRUBBER_PROGRESS_UPDATE,Pe=>{}),jsxRuntimeExports.jsx(GsapPixieContext.Provider,{value:{gsapCtx:U,tl:B,handlePlay:we,handlePause:Te,handleReset:Z,handleSeek:Ee,handleSeekTest:Ae,handleRestart:_e,handleRepeat:Se,playerTimeRef:V,getTimelineDuration:Re,totalDuration:E,setTotalDuration:I,reverseModeRef:X,dragModeRef:Y,isRemotion:K,setIsRemotion:J},children:C})},PixiTransformer=({pixiTransformerRef:C,imageRef:E,isMounted:I,transformCommit:B,transformChange:U,mouseoverEvent:V,onDoubleClick:X,uniqueId:Y="",isText:K=!1})=>{const J=PIXI__namespace.utils.string2hex("#F3C409"),xe=PIXI__namespace.utils.string2hex("#F3C409"),Z=React__namespace.useRef({isDragging:!1}),_e=react.useApp(),Se=_e.screen.width,Ee=_e.screen.height,Ae=React__namespace.useMemo(()=>{const Le=Math.min(Se,Ee)/800;return 1.5*Le<6?6:1.5*Le},[Se,Ee]),Re=300,Te=React__namespace.useRef(0),we=React__namespace.useCallback(()=>{V&&!Z.current.isDragging&&V(!0)},[V]),Pe=React__namespace.useCallback(()=>{V&&!Z.current.isDragging&&V(!1)},[V]),Ie=React__namespace.useCallback(()=>{Z.current.isDragging=!0;const Le=new Date().getTime();Le-Te.current<Re&&X&&X(),Te.current=Le},[]),Fe=React__namespace.useCallback(Le=>{Z.current.isDragging=!0,U&&U(Le),emitCustomEvent(Events.TRANSFORMER_DRAG_START,{uniqueId:"timeline"})},[U]),Oe=React__namespace.useCallback(()=>{if(E.current===null)return;const Le=E.current.x,$e=E.current.y,Ve=E.current.width,Xe=E.current.height,Ue=E.current.rotation,We=[E.current.scale.x,E.current.scale.y],je=We[0]<0?-1:1,ze=We[1]<0?-1:1;B&&(B({uniqueId:Y,transformation:{x:Math.round(Le),y:Math.round($e),width:Math.round(Math.max(5,Ve)),height:Math.round(Math.max(5,Xe)),rotation:Ue,scale:K?We:[je,ze]}}),emitCustomEvent(Events.TRANSFORMER_DRAG_END,{uniqueId:"timeline"})),Z.current.isDragging=!1},[B]);return React__namespace.useEffect(()=>(C.current&&(C.current.on("mouseover",we),C.current.on("mouseout",Pe),C.current.on("mousedown",Ie)),()=>{C.current&&(C.current.off("mouseover",we),C.current.off("mouseout",Pe),C.current.off("mousedown",Ie))}),[]),jsxRuntimeExports.jsx(reacthubReactBindings.Transformer,{ref:C,group:I?[E.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:Ae,color:xe},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:J,shape:"circle",radius:10},transformchange:Fe,transformcommit:Oe})};function listCacheClear$1(){this.__data__=[],this.size=0}var _listCacheClear=listCacheClear$1;function eq$2(C,E){return C===E||C!==C&&E!==E}var eq_1=eq$2,eq$1=eq_1;function assocIndexOf$4(C,E){for(var I=C.length;I--;)if(eq$1(C[I][0],E))return I;return-1}var _assocIndexOf=assocIndexOf$4,assocIndexOf$3=_assocIndexOf,arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete$1(C){var E=this.__data__,I=assocIndexOf$3(E,C);if(I<0)return!1;var B=E.length-1;return I==B?E.pop():splice.call(E,I,1),--this.size,!0}var _listCacheDelete=listCacheDelete$1,assocIndexOf$2=_assocIndexOf;function listCacheGet$1(C){var E=this.__data__,I=assocIndexOf$2(E,C);return I<0?void 0:E[I][1]}var _listCacheGet=listCacheGet$1,assocIndexOf$1=_assocIndexOf;function listCacheHas$1(C){return assocIndexOf$1(this.__data__,C)>-1}var _listCacheHas=listCacheHas$1,assocIndexOf=_assocIndexOf;function listCacheSet$1(C,E){var I=this.__data__,B=assocIndexOf(I,C);return B<0?(++this.size,I.push([C,E])):I[B][1]=E,this}var _listCacheSet=listCacheSet$1,listCacheClear=_listCacheClear,listCacheDelete=_listCacheDelete,listCacheGet=_listCacheGet,listCacheHas=_listCacheHas,listCacheSet=_listCacheSet;function ListCache$4(C){var E=-1,I=C==null?0:C.length;for(this.clear();++E<I;){var B=C[E];this.set(B[0],B[1])}}ListCache$4.prototype.clear=listCacheClear,ListCache$4.prototype.delete=listCacheDelete,ListCache$4.prototype.get=listCacheGet,ListCache$4.prototype.has=listCacheHas,ListCache$4.prototype.set=listCacheSet;var _ListCache=ListCache$4,ListCache$3=_ListCache;function stackClear$1(){this.__data__=new ListCache$3,this.size=0}var _stackClear=stackClear$1;function stackDelete$1(C){var E=this.__data__,I=E.delete(C);return this.size=E.size,I}var _stackDelete=stackDelete$1;function stackGet$1(C){return this.__data__.get(C)}var _stackGet=stackGet$1;function stackHas$1(C){return this.__data__.has(C)}var _stackHas=stackHas$1,freeGlobal$1=typeof commonjsGlobal$1=="object"&&commonjsGlobal$1&&commonjsGlobal$1.Object===Object&&commonjsGlobal$1,_freeGlobal=freeGlobal$1,freeGlobal=_freeGlobal,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root$9=freeGlobal||freeSelf||Function("return this")(),_root=root$9,root$8=_root,Symbol$5=root$8.Symbol,_Symbol=Symbol$5,Symbol$4=_Symbol,objectProto$c=Object.prototype,hasOwnProperty$9=objectProto$c.hasOwnProperty,nativeObjectToString$1=objectProto$c.toString,symToStringTag$1=Symbol$4?Symbol$4.toStringTag:void 0;function getRawTag$1(C){var E=hasOwnProperty$9.call(C,symToStringTag$1),I=C[symToStringTag$1];try{C[symToStringTag$1]=void 0;var B=!0}catch{}var U=nativeObjectToString$1.call(C);return B&&(E?C[symToStringTag$1]=I:delete C[symToStringTag$1]),U}var _getRawTag=getRawTag$1,objectProto$b=Object.prototype,nativeObjectToString=objectProto$b.toString;function objectToString$2(C){return nativeObjectToString.call(C)}var _objectToString=objectToString$2,Symbol$3=_Symbol,getRawTag=_getRawTag,objectToString$1=_objectToString,nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$3?Symbol$3.toStringTag:void 0;function baseGetTag$5(C){return C==null?C===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(C)?getRawTag(C):objectToString$1(C)}var _baseGetTag=baseGetTag$5;function isObject$5(C){var E=typeof C;return C!=null&&(E=="object"||E=="function")}var isObject_1=isObject$5,baseGetTag$4=_baseGetTag,isObject$4=isObject_1,asyncTag="[object AsyncFunction]",funcTag$1="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$2(C){if(!isObject$4(C))return!1;var E=baseGetTag$4(C);return E==funcTag$1||E==genTag||E==asyncTag||E==proxyTag}var isFunction_1=isFunction$2,root$7=_root,coreJsData$1=root$7["__core-js_shared__"],_coreJsData=coreJsData$1,coreJsData=_coreJsData,maskSrcKey=function(){var C=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return C?"Symbol(src)_1."+C:""}();function isMasked$1(C){return!!maskSrcKey&&maskSrcKey in C}var _isMasked=isMasked$1,funcProto$1=Function.prototype,funcToString$1=funcProto$1.toString;function toSource$2(C){if(C!=null){try{return funcToString$1.call(C)}catch{}try{return C+""}catch{}}return""}var _toSource=toSource$2,isFunction$1=isFunction_1,isMasked=_isMasked,isObject$3=isObject_1,toSource$1=_toSource,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto=Function.prototype,objectProto$a=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$8=objectProto$a.hasOwnProperty,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$8).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative$1(C){if(!isObject$3(C)||isMasked(C))return!1;var E=isFunction$1(C)?reIsNative:reIsHostCtor;return E.test(toSource$1(C))}var _baseIsNative=baseIsNative$1;function getValue$1(C,E){return C==null?void 0:C[E]}var _getValue=getValue$1,baseIsNative=_baseIsNative,getValue=_getValue;function getNative$6(C,E){var I=getValue(C,E);return baseIsNative(I)?I:void 0}var _getNative=getNative$6,getNative$5=_getNative,root$6=_root,Map$4=getNative$5(root$6,"Map"),_Map=Map$4,getNative$4=_getNative,nativeCreate$4=getNative$4(Object,"create"),_nativeCreate=nativeCreate$4,nativeCreate$3=_nativeCreate;function hashClear$1(){this.__data__=nativeCreate$3?nativeCreate$3(null):{},this.size=0}var _hashClear=hashClear$1;function hashDelete$1(C){var E=this.has(C)&&delete this.__data__[C];return this.size-=E?1:0,E}var _hashDelete=hashDelete$1,nativeCreate$2=_nativeCreate,HASH_UNDEFINED$2="__lodash_hash_undefined__",objectProto$9=Object.prototype,hasOwnProperty$7=objectProto$9.hasOwnProperty;function hashGet$1(C){var E=this.__data__;if(nativeCreate$2){var I=E[C];return I===HASH_UNDEFINED$2?void 0:I}return hasOwnProperty$7.call(E,C)?E[C]:void 0}var _hashGet=hashGet$1,nativeCreate$1=_nativeCreate,objectProto$8=Object.prototype,hasOwnProperty$6=objectProto$8.hasOwnProperty;function hashHas$1(C){var E=this.__data__;return nativeCreate$1?E[C]!==void 0:hasOwnProperty$6.call(E,C)}var _hashHas=hashHas$1,nativeCreate=_nativeCreate,HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet$1(C,E){var I=this.__data__;return this.size+=this.has(C)?0:1,I[C]=nativeCreate&&E===void 0?HASH_UNDEFINED$1:E,this}var _hashSet=hashSet$1,hashClear=_hashClear,hashDelete=_hashDelete,hashGet=_hashGet,hashHas=_hashHas,hashSet=_hashSet;function Hash$1(C){var E=-1,I=C==null?0:C.length;for(this.clear();++E<I;){var B=C[E];this.set(B[0],B[1])}}Hash$1.prototype.clear=hashClear,Hash$1.prototype.delete=hashDelete,Hash$1.prototype.get=hashGet,Hash$1.prototype.has=hashHas,Hash$1.prototype.set=hashSet;var _Hash=Hash$1,Hash=_Hash,ListCache$2=_ListCache,Map$3=_Map;function mapCacheClear$1(){this.size=0,this.__data__={hash:new Hash,map:new(Map$3||ListCache$2),string:new Hash}}var _mapCacheClear=mapCacheClear$1;function isKeyable$1(C){var E=typeof C;return E=="string"||E=="number"||E=="symbol"||E=="boolean"?C!=="__proto__":C===null}var _isKeyable=isKeyable$1,isKeyable=_isKeyable;function getMapData$4(C,E){var I=C.__data__;return isKeyable(E)?I[typeof E=="string"?"string":"hash"]:I.map}var _getMapData=getMapData$4,getMapData$3=_getMapData;function mapCacheDelete$1(C){var E=getMapData$3(this,C).delete(C);return this.size-=E?1:0,E}var _mapCacheDelete=mapCacheDelete$1,getMapData$2=_getMapData;function mapCacheGet$1(C){return getMapData$2(this,C).get(C)}var _mapCacheGet=mapCacheGet$1,getMapData$1=_getMapData;function mapCacheHas$1(C){return getMapData$1(this,C).has(C)}var _mapCacheHas=mapCacheHas$1,getMapData=_getMapData;function mapCacheSet$1(C,E){var I=getMapData(this,C),B=I.size;return I.set(C,E),this.size+=I.size==B?0:1,this}var _mapCacheSet=mapCacheSet$1,mapCacheClear=_mapCacheClear,mapCacheDelete=_mapCacheDelete,mapCacheGet=_mapCacheGet,mapCacheHas=_mapCacheHas,mapCacheSet=_mapCacheSet;function MapCache$3(C){var E=-1,I=C==null?0:C.length;for(this.clear();++E<I;){var B=C[E];this.set(B[0],B[1])}}MapCache$3.prototype.clear=mapCacheClear,MapCache$3.prototype.delete=mapCacheDelete,MapCache$3.prototype.get=mapCacheGet,MapCache$3.prototype.has=mapCacheHas,MapCache$3.prototype.set=mapCacheSet;var _MapCache=MapCache$3,ListCache$1=_ListCache,Map$2=_Map,MapCache$2=_MapCache,LARGE_ARRAY_SIZE=200;function stackSet$1(C,E){var I=this.__data__;if(I instanceof ListCache$1){var B=I.__data__;if(!Map$2||B.length<LARGE_ARRAY_SIZE-1)return B.push([C,E]),this.size=++I.size,this;I=this.__data__=new MapCache$2(B)}return I.set(C,E),this.size=I.size,this}var _stackSet=stackSet$1,ListCache=_ListCache,stackClear=_stackClear,stackDelete=_stackDelete,stackGet=_stackGet,stackHas=_stackHas,stackSet=_stackSet;function Stack$2(C){var E=this.__data__=new ListCache(C);this.size=E.size}Stack$2.prototype.clear=stackClear,Stack$2.prototype.delete=stackDelete,Stack$2.prototype.get=stackGet,Stack$2.prototype.has=stackHas,Stack$2.prototype.set=stackSet;var _Stack=Stack$2,HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd$1(C){return this.__data__.set(C,HASH_UNDEFINED),this}var _setCacheAdd=setCacheAdd$1;function setCacheHas$1(C){return this.__data__.has(C)}var _setCacheHas=setCacheHas$1,MapCache$1=_MapCache,setCacheAdd=_setCacheAdd,setCacheHas=_setCacheHas;function SetCache$1(C){var E=-1,I=C==null?0:C.length;for(this.__data__=new MapCache$1;++E<I;)this.add(C[E])}SetCache$1.prototype.add=SetCache$1.prototype.push=setCacheAdd,SetCache$1.prototype.has=setCacheHas;var _SetCache=SetCache$1;function arraySome$1(C,E){for(var I=-1,B=C==null?0:C.length;++I<B;)if(E(C[I],I,C))return!0;return!1}var _arraySome=arraySome$1;function cacheHas$1(C,E){return C.has(E)}var _cacheHas=cacheHas$1,SetCache=_SetCache,arraySome=_arraySome,cacheHas=_cacheHas,COMPARE_PARTIAL_FLAG$5=1,COMPARE_UNORDERED_FLAG$3=2;function equalArrays$2(C,E,I,B,U,V){var X=I&COMPARE_PARTIAL_FLAG$5,Y=C.length,K=E.length;if(Y!=K&&!(X&&K>Y))return!1;var J=V.get(C),xe=V.get(E);if(J&&xe)return J==E&&xe==C;var Z=-1,_e=!0,Se=I&COMPARE_UNORDERED_FLAG$3?new SetCache:void 0;for(V.set(C,E),V.set(E,C);++Z<Y;){var Ee=C[Z],Ae=E[Z];if(B)var Re=X?B(Ae,Ee,Z,E,C,V):B(Ee,Ae,Z,C,E,V);if(Re!==void 0){if(Re)continue;_e=!1;break}if(Se){if(!arraySome(E,function(Te,we){if(!cacheHas(Se,we)&&(Ee===Te||U(Ee,Te,I,B,V)))return Se.push(we)})){_e=!1;break}}else if(!(Ee===Ae||U(Ee,Ae,I,B,V))){_e=!1;break}}return V.delete(C),V.delete(E),_e}var _equalArrays=equalArrays$2,root$5=_root,Uint8Array$2=root$5.Uint8Array,_Uint8Array=Uint8Array$2;function mapToArray$1(C){var E=-1,I=Array(C.size);return C.forEach(function(B,U){I[++E]=[U,B]}),I}var _mapToArray=mapToArray$1;function setToArray$1(C){var E=-1,I=Array(C.size);return C.forEach(function(B){I[++E]=B}),I}var _setToArray=setToArray$1,Symbol$2=_Symbol,Uint8Array$1=_Uint8Array,eq=eq_1,equalArrays$1=_equalArrays,mapToArray=_mapToArray,setToArray=_setToArray,COMPARE_PARTIAL_FLAG$4=1,COMPARE_UNORDERED_FLAG$2=2,boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",mapTag$3="[object Map]",numberTag$1="[object Number]",regexpTag$1="[object RegExp]",setTag$3="[object Set]",stringTag$1="[object String]",symbolTag$1="[object Symbol]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$2="[object DataView]",symbolProto$1=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf=symbolProto$1?symbolProto$1.valueOf:void 0;function equalByTag$1(C,E,I,B,U,V,X){switch(I){case dataViewTag$2:if(C.byteLength!=E.byteLength||C.byteOffset!=E.byteOffset)return!1;C=C.buffer,E=E.buffer;case arrayBufferTag$1:return!(C.byteLength!=E.byteLength||!V(new Uint8Array$1(C),new Uint8Array$1(E)));case boolTag$1:case dateTag$1:case numberTag$1:return eq(+C,+E);case errorTag$1:return C.name==E.name&&C.message==E.message;case regexpTag$1:case stringTag$1:return C==E+"";case mapTag$3:var Y=mapToArray;case setTag$3:var K=B&COMPARE_PARTIAL_FLAG$4;if(Y||(Y=setToArray),C.size!=E.size&&!K)return!1;var J=X.get(C);if(J)return J==E;B|=COMPARE_UNORDERED_FLAG$2,X.set(C,E);var xe=equalArrays$1(Y(C),Y(E),B,U,V,X);return X.delete(C),xe;case symbolTag$1:if(symbolValueOf)return symbolValueOf.call(C)==symbolValueOf.call(E)}return!1}var _equalByTag=equalByTag$1;function arrayPush$1(C,E){for(var I=-1,B=E.length,U=C.length;++I<B;)C[U+I]=E[I];return C}var _arrayPush=arrayPush$1,isArray$e=Array.isArray,isArray_1=isArray$e,arrayPush=_arrayPush,isArray$d=isArray_1;function baseGetAllKeys$1(C,E,I){var B=E(C);return isArray$d(C)?B:arrayPush(B,I(C))}var _baseGetAllKeys=baseGetAllKeys$1;function arrayFilter$1(C,E){for(var I=-1,B=C==null?0:C.length,U=0,V=[];++I<B;){var X=C[I];E(X,I,C)&&(V[U++]=X)}return V}var _arrayFilter=arrayFilter$1;function stubArray$1(){return[]}var stubArray_1=stubArray$1,arrayFilter=_arrayFilter,stubArray=stubArray_1,objectProto$7=Object.prototype,propertyIsEnumerable$1=objectProto$7.propertyIsEnumerable,nativeGetSymbols=Object.getOwnPropertySymbols,getSymbols$1=nativeGetSymbols?function(C){return C==null?[]:(C=Object(C),arrayFilter(nativeGetSymbols(C),function(E){return propertyIsEnumerable$1.call(C,E)}))}:stubArray,_getSymbols=getSymbols$1;function baseTimes$1(C,E){for(var I=-1,B=Array(C);++I<C;)B[I]=E(I);return B}var _baseTimes=baseTimes$1;function isObjectLike$5(C){return C!=null&&typeof C=="object"}var isObjectLike_1=isObjectLike$5,baseGetTag$3=_baseGetTag,isObjectLike$4=isObjectLike_1,argsTag$2="[object Arguments]";function baseIsArguments$1(C){return isObjectLike$4(C)&&baseGetTag$3(C)==argsTag$2}var _baseIsArguments=baseIsArguments$1,baseIsArguments=_baseIsArguments,isObjectLike$3=isObjectLike_1,objectProto$6=Object.prototype,hasOwnProperty$5=objectProto$6.hasOwnProperty,propertyIsEnumerable=objectProto$6.propertyIsEnumerable,isArguments$3=baseIsArguments(function(){return arguments}())?baseIsArguments:function(C){return isObjectLike$3(C)&&hasOwnProperty$5.call(C,"callee")&&!propertyIsEnumerable.call(C,"callee")},isArguments_1=isArguments$3,isBuffer$4={exports:{}};function stubFalse(){return!1}var stubFalse_1=stubFalse;isBuffer$4.exports,function(C,E){var I=_root,B=stubFalse_1,U=E&&!E.nodeType&&E,V=U&&!0&&C&&!C.nodeType&&C,X=V&&V.exports===U,Y=X?I.Buffer:void 0,K=Y?Y.isBuffer:void 0,J=K||B;C.exports=J}(isBuffer$4,isBuffer$4.exports);var isBufferExports=isBuffer$4.exports,MAX_SAFE_INTEGER$1=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex$2(C,E){var I=typeof C;return E=E??MAX_SAFE_INTEGER$1,!!E&&(I=="number"||I!="symbol"&&reIsUint.test(C))&&C>-1&&C%1==0&&C<E}var _isIndex=isIndex$2,MAX_SAFE_INTEGER=9007199254740991;function isLength$3(C){return typeof C=="number"&&C>-1&&C%1==0&&C<=MAX_SAFE_INTEGER}var isLength_1=isLength$3,baseGetTag$2=_baseGetTag,isLength$2=isLength_1,isObjectLike$2=isObjectLike_1,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag$2="[object Map]",numberTag="[object Number]",objectTag$2="[object Object]",regexpTag="[object RegExp]",setTag$2="[object Set]",stringTag="[object String]",weakMapTag$1="[object WeakMap]",arrayBufferTag="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag$1]=typedArrayTags[arrayTag$1]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag$1]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag$2]=typedArrayTags[numberTag]=typedArrayTags[objectTag$2]=typedArrayTags[regexpTag]=typedArrayTags[setTag$2]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag$1]=!1;function baseIsTypedArray$1(C){return isObjectLike$2(C)&&isLength$2(C.length)&&!!typedArrayTags[baseGetTag$2(C)]}var _baseIsTypedArray=baseIsTypedArray$1;function baseUnary$1(C){return function(E){return C(E)}}var _baseUnary=baseUnary$1,_nodeUtil={exports:{}};_nodeUtil.exports,function(C,E){var I=_freeGlobal,B=E&&!E.nodeType&&E,U=B&&!0&&C&&!C.nodeType&&C,V=U&&U.exports===B,X=V&&I.process,Y=function(){try{var K=U&&U.require&&U.require("util").types;return K||X&&X.binding&&X.binding("util")}catch{}}();C.exports=Y}(_nodeUtil,_nodeUtil.exports);var _nodeUtilExports=_nodeUtil.exports,baseIsTypedArray=_baseIsTypedArray,baseUnary=_baseUnary,nodeUtil=_nodeUtilExports,nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray$3=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray,isTypedArray_1=isTypedArray$3,baseTimes=_baseTimes,isArguments$2=isArguments_1,isArray$c=isArray_1,isBuffer$3=isBufferExports,isIndex$1=_isIndex,isTypedArray$2=isTypedArray_1,objectProto$5=Object.prototype,hasOwnProperty$4=objectProto$5.hasOwnProperty;function arrayLikeKeys$1(C,E){var I=isArray$c(C),B=!I&&isArguments$2(C),U=!I&&!B&&isBuffer$3(C),V=!I&&!B&&!U&&isTypedArray$2(C),X=I||B||U||V,Y=X?baseTimes(C.length,String):[],K=Y.length;for(var J in C)(E||hasOwnProperty$4.call(C,J))&&!(X&&(J=="length"||U&&(J=="offset"||J=="parent")||V&&(J=="buffer"||J=="byteLength"||J=="byteOffset")||isIndex$1(J,K)))&&Y.push(J);return Y}var _arrayLikeKeys=arrayLikeKeys$1,objectProto$4=Object.prototype;function isPrototype$2(C){var E=C&&C.constructor,I=typeof E=="function"&&E.prototype||objectProto$4;return C===I}var _isPrototype=isPrototype$2;function overArg$1(C,E){return function(I){return C(E(I))}}var _overArg=overArg$1,overArg=_overArg,nativeKeys$1=overArg(Object.keys,Object),_nativeKeys=nativeKeys$1,isPrototype$1=_isPrototype,nativeKeys=_nativeKeys,objectProto$3=Object.prototype,hasOwnProperty$3=objectProto$3.hasOwnProperty;function baseKeys$2(C){if(!isPrototype$1(C))return nativeKeys(C);var E=[];for(var I in Object(C))hasOwnProperty$3.call(C,I)&&I!="constructor"&&E.push(I);return E}var _baseKeys=baseKeys$2,isFunction=isFunction_1,isLength$1=isLength_1;function isArrayLike$4(C){return C!=null&&isLength$1(C.length)&&!isFunction(C)}var isArrayLike_1=isArrayLike$4,arrayLikeKeys=_arrayLikeKeys,baseKeys$1=_baseKeys,isArrayLike$3=isArrayLike_1;function keys$3(C){return isArrayLike$3(C)?arrayLikeKeys(C):baseKeys$1(C)}var keys_1=keys$3,baseGetAllKeys=_baseGetAllKeys,getSymbols=_getSymbols,keys$2=keys_1;function getAllKeys$1(C){return baseGetAllKeys(C,keys$2,getSymbols)}var _getAllKeys=getAllKeys$1,getAllKeys=_getAllKeys,COMPARE_PARTIAL_FLAG$3=1,objectProto$2=Object.prototype,hasOwnProperty$2=objectProto$2.hasOwnProperty;function equalObjects$1(C,E,I,B,U,V){var X=I&COMPARE_PARTIAL_FLAG$3,Y=getAllKeys(C),K=Y.length,J=getAllKeys(E),xe=J.length;if(K!=xe&&!X)return!1;for(var Z=K;Z--;){var _e=Y[Z];if(!(X?_e in E:hasOwnProperty$2.call(E,_e)))return!1}var Se=V.get(C),Ee=V.get(E);if(Se&&Ee)return Se==E&&Ee==C;var Ae=!0;V.set(C,E),V.set(E,C);for(var Re=X;++Z<K;){_e=Y[Z];var Te=C[_e],we=E[_e];if(B)var Pe=X?B(we,Te,_e,E,C,V):B(Te,we,_e,C,E,V);if(!(Pe===void 0?Te===we||U(Te,we,I,B,V):Pe)){Ae=!1;break}Re||(Re=_e=="constructor")}if(Ae&&!Re){var Ie=C.constructor,Fe=E.constructor;Ie!=Fe&&"constructor"in C&&"constructor"in E&&!(typeof Ie=="function"&&Ie instanceof Ie&&typeof Fe=="function"&&Fe instanceof Fe)&&(Ae=!1)}return V.delete(C),V.delete(E),Ae}var _equalObjects=equalObjects$1,getNative$3=_getNative,root$4=_root,DataView$2=getNative$3(root$4,"DataView"),_DataView=DataView$2,getNative$2=_getNative,root$3=_root,Promise$2=getNative$2(root$3,"Promise"),_Promise=Promise$2,getNative$1=_getNative,root$2=_root,Set$2=getNative$1(root$2,"Set"),_Set=Set$2,getNative=_getNative,root$1=_root,WeakMap$2=getNative(root$1,"WeakMap"),_WeakMap=WeakMap$2,DataView$1=_DataView,Map$1=_Map,Promise$1=_Promise,Set$1=_Set,WeakMap$1=_WeakMap,baseGetTag$1=_baseGetTag,toSource=_toSource,mapTag$1="[object Map]",objectTag$1="[object Object]",promiseTag="[object Promise]",setTag$1="[object Set]",weakMapTag="[object WeakMap]",dataViewTag="[object DataView]",dataViewCtorString=toSource(DataView$1),mapCtorString=toSource(Map$1),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set$1),weakMapCtorString=toSource(WeakMap$1),getTag$2=baseGetTag$1;(DataView$1&&getTag$2(new DataView$1(new ArrayBuffer(1)))!=dataViewTag||Map$1&&getTag$2(new Map$1)!=mapTag$1||Promise$1&&getTag$2(Promise$1.resolve())!=promiseTag||Set$1&&getTag$2(new Set$1)!=setTag$1||WeakMap$1&&getTag$2(new WeakMap$1)!=weakMapTag)&&(getTag$2=function(C){var E=baseGetTag$1(C),I=E==objectTag$1?C.constructor:void 0,B=I?toSource(I):"";if(B)switch(B){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag$1;case promiseCtorString:return promiseTag;case setCtorString:return setTag$1;case weakMapCtorString:return weakMapTag}return E});var _getTag=getTag$2,Stack$1=_Stack,equalArrays=_equalArrays,equalByTag=_equalByTag,equalObjects=_equalObjects,getTag$1=_getTag,isArray$b=isArray_1,isBuffer$2=isBufferExports,isTypedArray$1=isTypedArray_1,COMPARE_PARTIAL_FLAG$2=1,argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function baseIsEqualDeep$1(C,E,I,B,U,V){var X=isArray$b(C),Y=isArray$b(E),K=X?arrayTag:getTag$1(C),J=Y?arrayTag:getTag$1(E);K=K==argsTag?objectTag:K,J=J==argsTag?objectTag:J;var xe=K==objectTag,Z=J==objectTag,_e=K==J;if(_e&&isBuffer$2(C)){if(!isBuffer$2(E))return!1;X=!0,xe=!1}if(_e&&!xe)return V||(V=new Stack$1),X||isTypedArray$1(C)?equalArrays(C,E,I,B,U,V):equalByTag(C,E,K,I,B,U,V);if(!(I&COMPARE_PARTIAL_FLAG$2)){var Se=xe&&hasOwnProperty$1.call(C,"__wrapped__"),Ee=Z&&hasOwnProperty$1.call(E,"__wrapped__");if(Se||Ee){var Ae=Se?C.value():C,Re=Ee?E.value():E;return V||(V=new Stack$1),U(Ae,Re,I,B,V)}}return _e?(V||(V=new Stack$1),equalObjects(C,E,I,B,U,V)):!1}var _baseIsEqualDeep=baseIsEqualDeep$1,baseIsEqualDeep=_baseIsEqualDeep,isObjectLike$1=isObjectLike_1;function baseIsEqual$3(C,E,I,B,U){return C===E?!0:C==null||E==null||!isObjectLike$1(C)&&!isObjectLike$1(E)?C!==C&&E!==E:baseIsEqualDeep(C,E,I,B,baseIsEqual$3,U)}var _baseIsEqual=baseIsEqual$3,baseIsEqual$2=_baseIsEqual;function isEqual(C,E){return baseIsEqual$2(C,E)}var isEqual_1=isEqual;const isEqual$1=getDefaultExportFromCjs(isEqual_1),useDeepEffect=(C,E)=>{const I=React.useRef(!0),B=React.useRef(E);React.useEffect(()=>{const U=B.current.every((V,X)=>isEqual$1(V,E[X]));(I.current||!U)&&C(),I.current=!1,B.current=E},E)};function useDebounce(C,E=700){const[I,B]=React.useState(C);return useDeepEffect(()=>{const U=setTimeout(()=>{B(C)},E);return()=>{clearTimeout(U)}},[C,E]),I}var baseKeys=_baseKeys,getTag=_getTag,isArguments$1=isArguments_1,isArray$a=isArray_1,isArrayLike$2=isArrayLike_1,isBuffer$1=isBufferExports,isPrototype=_isPrototype,isTypedArray=isTypedArray_1,mapTag="[object Map]",setTag="[object Set]",objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function isEmpty(C){if(C==null)return!0;if(isArrayLike$2(C)&&(isArray$a(C)||typeof C=="string"||typeof C.splice=="function"||isBuffer$1(C)||isTypedArray(C)||isArguments$1(C)))return!C.length;var E=getTag(C);if(E==mapTag||E==setTag)return!C.size;if(isPrototype(C))return!baseKeys(C).length;for(var I in C)if(hasOwnProperty.call(C,I))return!1;return!0}var isEmpty_1=isEmpty;const isEmpty$1=getDefaultExportFromCjs(isEmpty_1);var OverlayTypes=(C=>(C.NONE="none",C.NORMAL="normal",C.LENSFLARE="lensflare",C.FILMSTRIP="filmstrip",C.GRUNGE="grunge",C.BRICKS="bricks",C))(OverlayTypes||{});const overlays={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}},PixiOverlayTilingSprite=C=>{const{overlay:E,width:I,height:B,x:U,y:V}=C,{src:X,blendmode:Y}=overlays[E]||overlays.normal;return jsxRuntimeExports.jsx(react.TilingSprite,{image:X,width:I,height:B,x:U,y:V,tilePosition:{x:0,y:0},tileScale:.5,alpha:.5,anchor:.5})};/*!
10
+ * paths 3.11.5
11
+ * https://greensock.com
12
+ *
13
+ * Copyright 2008-2023, GreenSock. All rights reserved.
14
+ * Subject to the terms at https://greensock.com/standard-license or for
15
+ * Club GreenSock members, the agreement issued with that membership.
16
+ * @author: Jack Doyle, jack@greensock.com
17
+ */var _svgPathExp=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,_scientific=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/ig,_DEG2RAD$1=Math.PI/180,_sin=Math.sin,_cos=Math.cos,_abs=Math.abs,_sqrt=Math.sqrt,_isNumber=function(E){return typeof E=="number"},_roundingNum=1e5,_round$1=function(E){return Math.round(E*_roundingNum)/_roundingNum||0};function transformRawPath(C,E,I,B,U,V,X){for(var Y=C.length,K,J,xe,Z,_e;--Y>-1;)for(K=C[Y],J=K.length,xe=0;xe<J;xe+=2)Z=K[xe],_e=K[xe+1],K[xe]=Z*E+_e*B+V,K[xe+1]=Z*I+_e*U+X;return C._dirty=1,C}function arcToSegment(C,E,I,B,U,V,X,Y,K){if(!(C===Y&&E===K)){I=_abs(I),B=_abs(B);var J=U%360*_DEG2RAD$1,xe=_cos(J),Z=_sin(J),_e=Math.PI,Se=_e*2,Ee=(C-Y)/2,Ae=(E-K)/2,Re=xe*Ee+Z*Ae,Te=-Z*Ee+xe*Ae,we=Re*Re,Pe=Te*Te,Ie=we/(I*I)+Pe/(B*B);Ie>1&&(I=_sqrt(Ie)*I,B=_sqrt(Ie)*B);var Fe=I*I,Oe=B*B,Le=(Fe*Oe-Fe*Pe-Oe*we)/(Fe*Pe+Oe*we);Le<0&&(Le=0);var $e=(V===X?-1:1)*_sqrt(Le),Ve=$e*(I*Te/B),Xe=$e*-(B*Re/I),Ue=(C+Y)/2,We=(E+K)/2,je=Ue+(xe*Ve-Z*Xe),ze=We+(Z*Ve+xe*Xe),He=(Re-Ve)/I,De=(Te-Xe)/B,Ne=(-Re-Ve)/I,Me=(-Te-Xe)/B,ke=He*He+De*De,Ge=(De<0?-1:1)*Math.acos(He/_sqrt(ke)),Be=(He*Me-De*Ne<0?-1:1)*Math.acos((He*Ne+De*Me)/_sqrt(ke*(Ne*Ne+Me*Me)));isNaN(Be)&&(Be=_e),!X&&Be>0?Be-=Se:X&&Be<0&&(Be+=Se),Ge%=Se,Be%=Se;var qe=Math.ceil(_abs(Be)/(Se/4)),Ke=[],Ye=Be/qe,tt=4/3*_sin(Ye/2)/(1+_cos(Ye/2)),et=xe*I,it=Z*I,nt=Z*-B,ot=xe*B,Ze;for(Ze=0;Ze<qe;Ze++)U=Ge+Ze*Ye,Re=_cos(U),Te=_sin(U),He=_cos(U+=Ye),De=_sin(U),Ke.push(Re-tt*Te,Te+tt*Re,He+tt*De,De-tt*He,He,De);for(Ze=0;Ze<Ke.length;Ze+=2)Re=Ke[Ze],Te=Ke[Ze+1],Ke[Ze]=Re*et+Te*nt+je,Ke[Ze+1]=Re*it+Te*ot+ze;return Ke[Ze-2]=Y,Ke[Ze-1]=K,Ke}}function stringToRawPath(C){var E=(C+"").replace(_scientific,function(Ve){var Xe=+Ve;return Xe<1e-4&&Xe>-1e-4?0:Xe}).match(_svgPathExp)||[],I=[],B=0,U=0,V=2/3,X=E.length,Y=0,K="ERROR: malformed path: "+C,J,xe,Z,_e,Se,Ee,Ae,Re,Te,we,Pe,Ie,Fe,Oe,Le,$e=function(Xe,Ue,We,je){we=(We-Xe)/3,Pe=(je-Ue)/3,Ae.push(Xe+we,Ue+Pe,We-we,je-Pe,We,je)};if(!C||!isNaN(E[0])||isNaN(E[1]))return console.log(K),I;for(J=0;J<X;J++)if(Fe=Se,isNaN(E[J])?(Se=E[J].toUpperCase(),Ee=Se!==E[J]):J--,Z=+E[J+1],_e=+E[J+2],Ee&&(Z+=B,_e+=U),J||(Re=Z,Te=_e),Se==="M")Ae&&(Ae.length<8?I.length-=1:Y+=Ae.length),B=Re=Z,U=Te=_e,Ae=[Z,_e],I.push(Ae),J+=2,Se="L";else if(Se==="C")Ae||(Ae=[0,0]),Ee||(B=U=0),Ae.push(Z,_e,B+E[J+3]*1,U+E[J+4]*1,B+=E[J+5]*1,U+=E[J+6]*1),J+=6;else if(Se==="S")we=B,Pe=U,(Fe==="C"||Fe==="S")&&(we+=B-Ae[Ae.length-4],Pe+=U-Ae[Ae.length-3]),Ee||(B=U=0),Ae.push(we,Pe,Z,_e,B+=E[J+3]*1,U+=E[J+4]*1),J+=4;else if(Se==="Q")we=B+(Z-B)*V,Pe=U+(_e-U)*V,Ee||(B=U=0),B+=E[J+3]*1,U+=E[J+4]*1,Ae.push(we,Pe,B+(Z-B)*V,U+(_e-U)*V,B,U),J+=4;else if(Se==="T")we=B-Ae[Ae.length-4],Pe=U-Ae[Ae.length-3],Ae.push(B+we,U+Pe,Z+(B+we*1.5-Z)*V,_e+(U+Pe*1.5-_e)*V,B=Z,U=_e),J+=2;else if(Se==="H")$e(B,U,B=Z,U),J+=1;else if(Se==="V")$e(B,U,B,U=Z+(Ee?U-B:0)),J+=1;else if(Se==="L"||Se==="Z")Se==="Z"&&(Z=Re,_e=Te,Ae.closed=!0),(Se==="L"||_abs(B-Z)>.5||_abs(U-_e)>.5)&&($e(B,U,Z,_e),Se==="L"&&(J+=2)),B=Z,U=_e;else if(Se==="A"){if(Oe=E[J+4],Le=E[J+5],we=E[J+6],Pe=E[J+7],xe=7,Oe.length>1&&(Oe.length<3?(Pe=we,we=Le,xe--):(Pe=Le,we=Oe.substr(2),xe-=2),Le=Oe.charAt(1),Oe=Oe.charAt(0)),Ie=arcToSegment(B,U,+E[J+1],+E[J+2],+E[J+3],+Oe,+Le,(Ee?B:0)+we*1,(Ee?U:0)+Pe*1),J+=xe,Ie)for(xe=0;xe<Ie.length;xe++)Ae.push(Ie[xe]);B=Ae[Ae.length-2],U=Ae[Ae.length-1]}else console.log(K);return J=Ae.length,J<6?(I.pop(),J=0):Ae[0]===Ae[J-2]&&Ae[1]===Ae[J-1]&&(Ae.closed=!0),I.totalPoints=Y+J,I}function rawPathToString(C){_isNumber(C[0])&&(C=[C]);var E="",I=C.length,B,U,V,X;for(U=0;U<I;U++){for(X=C[U],E+="M"+_round$1(X[0])+","+_round$1(X[1])+" C",B=X.length,V=2;V<B;V++)E+=_round$1(X[V++])+","+_round$1(X[V++])+" "+_round$1(X[V++])+","+_round$1(X[V++])+" "+_round$1(X[V++])+","+_round$1(X[V])+" ";X.closed&&(E+="z")}return E}/*!
18
+ * CustomEase 3.11.5
19
+ * https://greensock.com
20
+ *
21
+ * @license Copyright 2008-2023, GreenSock. All rights reserved.
22
+ * Subject to the terms at https://greensock.com/standard-license or for
23
+ * Club GreenSock members, the agreement issued with that membership.
24
+ * @author: Jack Doyle, jack@greensock.com
25
+ */var gsap$1,_coreInitted,_getGSAP$1=function(){return gsap$1||typeof window<"u"&&(gsap$1=window.gsap)&&gsap$1.registerPlugin&&gsap$1},_initCore$1=function(){gsap$1=_getGSAP$1(),gsap$1?(gsap$1.registerEase("_CE",CustomEase.create),_coreInitted=1):console.warn("Please gsap.registerPlugin(CustomEase)")},_bigNum=1e20,_round=function(E){return~~(E*1e3+(E<0?-.5:.5))/1e3},_numExp=/[-+=\.]*\d+[\.e\-\+]*\d*[e\-\+]*\d*/gi,_needsParsingExp=/[cLlsSaAhHvVtTqQ]/g,_findMinimum=function(E){var I=E.length,B=_bigNum,U;for(U=1;U<I;U+=6)+E[U]<B&&(B=+E[U]);return B},_normalize=function(E,I,B){!B&&B!==0&&(B=Math.max(+E[E.length-1],+E[1]));var U=+E[0]*-1,V=-B,X=E.length,Y=1/(+E[X-2]+U),K=-I||(Math.abs(+E[X-1]-+E[1])<.01*(+E[X-2]-+E[0])?_findMinimum(E)+V:+E[X-1]+V),J;for(K?K=1/K:K=-Y,J=0;J<X;J+=2)E[J]=(+E[J]+U)*Y,E[J+1]=(+E[J+1]+V)*K},_bezierToPoints=function C(E,I,B,U,V,X,Y,K,J,xe,Z){var _e=(E+B)/2,Se=(I+U)/2,Ee=(B+V)/2,Ae=(U+X)/2,Re=(V+Y)/2,Te=(X+K)/2,we=(_e+Ee)/2,Pe=(Se+Ae)/2,Ie=(Ee+Re)/2,Fe=(Ae+Te)/2,Oe=(we+Ie)/2,Le=(Pe+Fe)/2,$e=Y-E,Ve=K-I,Xe=Math.abs((B-Y)*Ve-(U-K)*$e),Ue=Math.abs((V-Y)*Ve-(X-K)*$e),We;return xe||(xe=[{x:E,y:I},{x:Y,y:K}],Z=1),xe.splice(Z||xe.length-1,0,{x:Oe,y:Le}),(Xe+Ue)*(Xe+Ue)>J*($e*$e+Ve*Ve)&&(We=xe.length,C(E,I,_e,Se,we,Pe,Oe,Le,J,xe,Z),C(Oe,Le,Ie,Fe,Re,Te,Y,K,J,xe,Z+1+(xe.length-We))),xe},CustomEase=function(){function C(I,B,U){_coreInitted||_initCore$1(),this.id=I,this.setData(B,U)}var E=C.prototype;return E.setData=function(B,U){U=U||{},B=B||"0,0,1,1";var V=B.match(_numExp),X=1,Y=[],K=[],J=U.precision||1,xe=J<=1,Z,_e,Se,Ee,Ae,Re,Te,we,Pe;if(this.data=B,(_needsParsingExp.test(B)||~B.indexOf("M")&&B.indexOf("C")<0)&&(V=stringToRawPath(B)[0]),Z=V.length,Z===4)V.unshift(0,0),V.push(1,1),Z=8;else if((Z-2)%6)throw"Invalid CustomEase";for((+V[0]!=0||+V[Z-2]!=1)&&_normalize(V,U.height,U.originY),this.segment=V,Ee=2;Ee<Z;Ee+=6)_e={x:+V[Ee-2],y:+V[Ee-1]},Se={x:+V[Ee+4],y:+V[Ee+5]},Y.push(_e,Se),_bezierToPoints(_e.x,_e.y,+V[Ee],+V[Ee+1],+V[Ee+2],+V[Ee+3],Se.x,Se.y,1/(J*2e5),Y,Y.length-1);for(Z=Y.length,Ee=0;Ee<Z;Ee++)Te=Y[Ee],we=Y[Ee-1]||Te,(Te.x>we.x||we.y!==Te.y&&we.x===Te.x||Te===we)&&Te.x<=1?(we.cx=Te.x-we.x,we.cy=Te.y-we.y,we.n=Te,we.nx=Te.x,xe&&Ee>1&&Math.abs(we.cy/we.cx-Y[Ee-2].cy/Y[Ee-2].cx)>2&&(xe=0),we.cx<X&&(we.cx?X=we.cx:(we.cx=.001,Ee===Z-1&&(we.x-=.001,X=Math.min(X,.001),xe=0)))):(Y.splice(Ee--,1),Z--);if(Z=1/X+1|0,Ae=1/Z,Re=0,Te=Y[0],xe){for(Ee=0;Ee<Z;Ee++)Pe=Ee*Ae,Te.nx<Pe&&(Te=Y[++Re]),_e=Te.y+(Pe-Te.x)/Te.cx*Te.cy,K[Ee]={x:Pe,cx:Ae,y:_e,cy:0,nx:9},Ee&&(K[Ee-1].cy=_e-K[Ee-1].y);K[Z-1].cy=Y[Y.length-1].y-_e}else{for(Ee=0;Ee<Z;Ee++)Te.nx<Ee*Ae&&(Te=Y[++Re]),K[Ee]=Te;Re<Y.length-1&&(K[Ee-1]=Y[Y.length-2])}return this.ease=function(Ie){var Fe=K[Ie*Z|0]||K[Z-1];return Fe.nx<Ie&&(Fe=Fe.n),Fe.y+(Ie-Fe.x)/Fe.cx*Fe.cy},this.ease.custom=this,this.id&&gsap$1&&gsap$1.registerEase(this.id,this.ease),this},E.getSVGData=function(B){return C.getSVGData(this,B)},C.create=function(B,U,V){return new C(B,U,V).ease},C.register=function(B){gsap$1=B,_initCore$1()},C.get=function(B){return gsap$1.parseEase(B)},C.getSVGData=function(B,U){U=U||{};var V=U.width||100,X=U.height||100,Y=U.x||0,K=(U.y||0)+X,J=gsap$1.utils.toArray(U.path)[0],xe,Z,_e,Se,Ee,Ae,Re,Te,we,Pe;if(U.invert&&(X=-X,K=0),typeof B=="string"&&(B=gsap$1.parseEase(B)),B.custom&&(B=B.custom),B instanceof C)xe=rawPathToString(transformRawPath([B.segment],V,0,0,-X,Y,K));else{for(xe=[Y,K],Re=Math.max(5,(U.precision||1)*200),Se=1/Re,Re+=2,Te=5/Re,we=_round(Y+Se*V),Pe=_round(K+B(Se)*-X),Z=(Pe-K)/(we-Y),_e=2;_e<Re;_e++)Ee=_round(Y+_e*Se*V),Ae=_round(K+B(_e*Se)*-X),(Math.abs((Ae-Pe)/(Ee-we)-Z)>Te||_e===Re-1)&&(xe.push(we,Pe),Z=(Ae-Pe)/(Ee-we)),we=Ee,Pe=Ae;xe="M"+xe.join(",")}return J&&J.setAttribute("d",xe),xe},C}();_getGSAP$1()&&gsap$1.registerPlugin(CustomEase),CustomEase.version="3.11.5";/*!
26
+ * PixiPlugin 3.11.5
27
+ * https://greensock.com
28
+ *
29
+ * @license Copyright 2008-2023, GreenSock. All rights reserved.
30
+ * Subject to the terms at https://greensock.com/standard-license or for
31
+ * Club GreenSock members, the agreement issued with that membership.
32
+ * @author: Jack Doyle, jack@greensock.com
33
+ */var gsap,_win,_splitColor,_PIXI,PropTween,_getSetter,_isV4,_windowExists=function(){return typeof window<"u"},_getGSAP=function(){return gsap||_windowExists()&&(gsap=window.gsap)&&gsap.registerPlugin&&gsap},_isFunction=function(E){return typeof E=="function"},_warn=function(E){return console.warn(E)},_idMatrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],_lumR=.212671,_lumG=.71516,_lumB=.072169,_applyMatrix=function(E,I){var B=[],U=0,V=0,X,Y;for(X=0;X<4;X++){for(Y=0;Y<5;Y++)V=Y===4?E[U+4]:0,B[U+Y]=E[U]*I[Y]+E[U+1]*I[Y+5]+E[U+2]*I[Y+10]+E[U+3]*I[Y+15]+V;U+=5}return B},_setSaturation=function(E,I){var B=1-I,U=B*_lumR,V=B*_lumG,X=B*_lumB;return _applyMatrix([U+I,V,X,0,0,U,V+I,X,0,0,U,V,X+I,0,0,0,0,0,1,0],E)},_colorize=function(E,I,B){var U=_splitColor(I),V=U[0]/255,X=U[1]/255,Y=U[2]/255,K=1-B;return _applyMatrix([K+B*V*_lumR,B*V*_lumG,B*V*_lumB,0,0,B*X*_lumR,K+B*X*_lumG,B*X*_lumB,0,0,B*Y*_lumR,B*Y*_lumG,K+B*Y*_lumB,0,0,0,0,0,1,0],E)},_setHue=function(E,I){I*=Math.PI/180;var B=Math.cos(I),U=Math.sin(I);return _applyMatrix([_lumR+B*(1-_lumR)+U*-_lumR,_lumG+B*-_lumG+U*-_lumG,_lumB+B*-_lumB+U*(1-_lumB),0,0,_lumR+B*-_lumR+U*.143,_lumG+B*(1-_lumG)+U*.14,_lumB+B*-_lumB+U*-.283,0,0,_lumR+B*-_lumR+U*-(1-_lumR),_lumG+B*-_lumG+U*_lumG,_lumB+B*(1-_lumB)+U*_lumB,0,0,0,0,0,1,0,0,0,0,0,1],E)},_setContrast=function(E,I){return _applyMatrix([I,0,0,0,.5*(1-I),0,I,0,0,.5*(1-I),0,0,I,0,.5*(1-I),0,0,0,1,0],E)},_getFilter=function(E,I){var B=_PIXI.filters[I],U=E.filters||[],V=U.length,X;for(B||_warn(I+" not found. PixiPlugin.registerPIXI(PIXI)");--V>-1;)if(U[V]instanceof B)return U[V];return X=new B,I==="BlurFilter"&&(X.blur=0),U.push(X),E.filters=U,X},_addColorMatrixFilterCacheTween=function(E,I,B,U){I.add(B,E,B[E],U[E]),I._props.push(E)},_applyBrightnessToMatrix=function(E,I){var B=new _PIXI.filters.ColorMatrixFilter;return B.matrix=I,B.brightness(E,!0),B.matrix},_copy=function(E){var I={},B;for(B in E)I[B]=E[B];return I},_CMFdefaults={contrast:1,saturation:1,colorizeAmount:0,colorize:"rgb(255,255,255)",hue:0,brightness:1},_parseColorMatrixFilter=function(E,I,B){var U=_getFilter(E,"ColorMatrixFilter"),V=E._gsColorMatrixFilter=E._gsColorMatrixFilter||_copy(_CMFdefaults),X=I.combineCMF&&!("colorMatrixFilter"in I&&!I.colorMatrixFilter),Y,K,J;for(J=U.matrix,I.resolution&&(U.resolution=I.resolution),I.matrix&&I.matrix.length===J.length?(K=I.matrix,V.contrast!==1&&_addColorMatrixFilterCacheTween("contrast",B,V,_CMFdefaults),V.hue&&_addColorMatrixFilterCacheTween("hue",B,V,_CMFdefaults),V.brightness!==1&&_addColorMatrixFilterCacheTween("brightness",B,V,_CMFdefaults),V.colorizeAmount&&(_addColorMatrixFilterCacheTween("colorize",B,V,_CMFdefaults),_addColorMatrixFilterCacheTween("colorizeAmount",B,V,_CMFdefaults)),V.saturation!==1&&_addColorMatrixFilterCacheTween("saturation",B,V,_CMFdefaults)):(K=_idMatrix.slice(),I.contrast!=null?(K=_setContrast(K,+I.contrast),_addColorMatrixFilterCacheTween("contrast",B,V,I)):V.contrast!==1&&(X?K=_setContrast(K,V.contrast):_addColorMatrixFilterCacheTween("contrast",B,V,_CMFdefaults)),I.hue!=null?(K=_setHue(K,+I.hue),_addColorMatrixFilterCacheTween("hue",B,V,I)):V.hue&&(X?K=_setHue(K,V.hue):_addColorMatrixFilterCacheTween("hue",B,V,_CMFdefaults)),I.brightness!=null?(K=_applyBrightnessToMatrix(+I.brightness,K),_addColorMatrixFilterCacheTween("brightness",B,V,I)):V.brightness!==1&&(X?K=_applyBrightnessToMatrix(V.brightness,K):_addColorMatrixFilterCacheTween("brightness",B,V,_CMFdefaults)),I.colorize!=null?(I.colorizeAmount="colorizeAmount"in I?+I.colorizeAmount:1,K=_colorize(K,I.colorize,I.colorizeAmount),_addColorMatrixFilterCacheTween("colorize",B,V,I),_addColorMatrixFilterCacheTween("colorizeAmount",B,V,I)):V.colorizeAmount&&(X?K=_colorize(K,V.colorize,V.colorizeAmount):(_addColorMatrixFilterCacheTween("colorize",B,V,_CMFdefaults),_addColorMatrixFilterCacheTween("colorizeAmount",B,V,_CMFdefaults))),I.saturation!=null?(K=_setSaturation(K,+I.saturation),_addColorMatrixFilterCacheTween("saturation",B,V,I)):V.saturation!==1&&(X?K=_setSaturation(K,V.saturation):_addColorMatrixFilterCacheTween("saturation",B,V,_CMFdefaults))),Y=K.length;--Y>-1;)K[Y]!==J[Y]&&B.add(J,Y,J[Y],K[Y],"colorMatrixFilter");B._props.push("colorMatrixFilter")},_renderColor=function(E,I){var B=I.t,U=I.p,V=I.color,X=I.set;X(B,U,V[0]<<16|V[1]<<8|V[2])},_renderDirtyCache=function(E,I){var B=I.g;B&&(B.dirty++,B.clearDirty++)},_renderAutoAlpha=function(E,I){I.t.visible=!!I.t.alpha},_addColorTween=function(E,I,B,U){var V=E[I],X=_splitColor(_isFunction(V)?E[I.indexOf("set")||!_isFunction(E["get"+I.substr(3)])?I:"get"+I.substr(3)]():V),Y=_splitColor(B);U._pt=new PropTween(U._pt,E,I,0,0,_renderColor,{t:E,p:I,color:X,set:_getSetter(E,I)}),U.add(X,0,X[0],Y[0]),U.add(X,1,X[1],Y[1]),U.add(X,2,X[2],Y[2])},_colorProps={tint:1,lineColor:1,fillColor:1},_xyContexts="position,scale,skew,pivot,anchor,tilePosition,tileScale".split(","),_contexts={x:"position",y:"position",tileX:"tilePosition",tileY:"tilePosition"},_colorMatrixFilterProps={colorMatrixFilter:1,saturation:1,contrast:1,hue:1,colorize:1,colorizeAmount:1,brightness:1,combineCMF:1},_DEG2RAD=Math.PI/180,_isString=function(E){return typeof E=="string"},_degreesToRadians=function(E){return _isString(E)&&E.charAt(1)==="="?E.substr(0,2)+parseFloat(E.substr(2))*_DEG2RAD:E*_DEG2RAD},_renderPropWithEnd=function(E,I){return I.set(I.t,I.p,E===1?I.e:Math.round((I.s+I.c*E)*1e5)/1e5,I)},_addRotationalPropTween=function(E,I,B,U,V,X){var Y=360*(X?_DEG2RAD:1),K=_isString(V),J=K&&V.charAt(1)==="="?+(V.charAt(0)+"1"):0,xe=parseFloat(J?V.substr(2):V)*(X?_DEG2RAD:1),Z=J?xe*J:xe-U,_e=U+Z,Se,Ee;return K&&(Se=V.split("_")[1],Se==="short"&&(Z%=Y,Z!==Z%(Y/2)&&(Z+=Z<0?Y:-Y)),Se==="cw"&&Z<0?Z=(Z+Y*1e10)%Y-~~(Z/Y)*Y:Se==="ccw"&&Z>0&&(Z=(Z-Y*1e10)%Y-~~(Z/Y)*Y)),E._pt=Ee=new PropTween(E._pt,I,B,U,Z,_renderPropWithEnd),Ee.e=_e,Ee},_initCore=function(){_windowExists()&&(_win=window,gsap=_getGSAP(),_PIXI=_PIXI||_win.PIXI,_isV4=_PIXI&&_PIXI.VERSION&&_PIXI.VERSION.charAt(0)==="4",_splitColor=function(I){return gsap.utils.splitColor((I+"").substr(0,2)==="0x"?"#"+I.substr(2):I)})},i$7,p$3;for(i$7=0;i$7<_xyContexts.length;i$7++)p$3=_xyContexts[i$7],_contexts[p$3+"X"]=p$3,_contexts[p$3+"Y"]=p$3;var PixiPlugin={version:"3.11.5",name:"pixi",register:function(E,I,B){gsap=E,PropTween=B,_getSetter=I.getSetter,_initCore()},registerPIXI:function(E){_PIXI=E},init:function(E,I,B,U,V){if(_PIXI||_initCore(),!_PIXI||!(E instanceof _PIXI.DisplayObject))return console.warn(E,"is not a DisplayObject or PIXI was not found. PixiPlugin.registerPIXI(PIXI);"),!1;var X,Y,K,J,xe,Z,_e,Se,Ee;for(Z in I){if(X=_contexts[Z],K=I[Z],X)Y=~Z.charAt(Z.length-1).toLowerCase().indexOf("x")?"x":"y",this.add(E[X],Y,E[X][Y],X==="skew"?_degreesToRadians(K):K,0,0,0,0,0,1);else if(Z==="scale"||Z==="anchor"||Z==="pivot"||Z==="tileScale")this.add(E[Z],"x",E[Z].x,K),this.add(E[Z],"y",E[Z].y,K);else if(Z==="rotation"||Z==="angle")_addRotationalPropTween(this,E,Z,E[Z],K,Z==="rotation");else if(_colorMatrixFilterProps[Z])J||(_parseColorMatrixFilter(E,I.colorMatrixFilter||I,this),J=!0);else if(Z==="blur"||Z==="blurX"||Z==="blurY"||Z==="blurPadding"){if(xe=_getFilter(E,"BlurFilter"),this.add(xe,Z,xe[Z],K),I.blurPadding!==0)for(_e=I.blurPadding||Math.max(xe[Z],K)*2,Se=E.filters.length;--Se>-1;)E.filters[Se].padding=Math.max(E.filters[Se].padding,_e)}else if(_colorProps[Z])if((Z==="lineColor"||Z==="fillColor")&&E instanceof _PIXI.Graphics)for(Ee=(E.geometry||E).graphicsData,this._pt=new PropTween(this._pt,E,Z,0,0,_renderDirtyCache,{g:E.geometry||E}),Se=Ee.length;--Se>-1;)_addColorTween(_isV4?Ee[Se]:Ee[Se][Z.substr(0,4)+"Style"],_isV4?Z:"color",K,this);else _addColorTween(E,Z,K,this);else Z==="autoAlpha"?(this._pt=new PropTween(this._pt,E,"visible",0,0,_renderAutoAlpha),this.add(E,"alpha",E.alpha,K),this._props.push("alpha","visible")):Z!=="resolution"&&this.add(E,Z,"get",K);this._props.push(Z)}}};_getGSAP()&&gsap.registerPlugin(PixiPlugin),gsap$2.registerPlugin(PixiPlugin),PixiPlugin.registerPIXI(PIXI__namespace),gsap$2.registerPlugin(CustomEase),CustomEase.create("springBounce","0.32, 1.06, 0.61, 0.93"),gsap$2.registerEffect({name:"PULSE",effect(C,E){return gsap$2.timeline().fromTo(C,{pixi:{scaleX:.9,scaleY:.9}},{pixi:{scaleX:1.2,scaleY:1.2},duration:.5,ease:"slow"}).to(C,{pixi:{scaleX:1,scaleY:1,...E},duration:.5})}}),gsap$2.registerEffect({name:"SHAKE",effect(C,E){return gsap$2.timeline().to(C,{duration:.1,pixi:{x:"+=5"}}).to(C,{duration:.1,pixi:{x:"-=10"}}).to(C,{duration:.1,pixi:{x:"+=10"}}).to(C,{duration:.1,pixi:{x:"-=10"}}).to(C,{duration:.1,pixi:{x:"+=5"}}).to(C,{pixi:{...E},duration:.5})}}),gsap$2.registerEffect({name:"SWING",effect(C,E){return gsap$2.timeline().to(C,{duration:.5,pixi:{rotation:1}}).to(C,{duration:.5,pixi:{rotation:-1.5}}).to(C,{pixi:{rotation:0,...E},duration:.5})}}),gsap$2.registerEffect({name:"JELLO",effect(C,E){return gsap$2.timeline().to(C,{duration:.3,pixi:{scaleX:.5,rotation:-1}}).to(C,{duration:.4,pixi:{scaleX:1.5,rotation:1}}).to(C,{duration:.3,pixi:{scaleX:1,rotation:0}}).to(C,{pixi:{rotation:0,...E},duration:.5})}}),gsap$2.registerEffect({name:"WOOBLE",effect(C,E){return gsap$2.timeline().to(C,{duration:.3,pixi:{scaleX:.5,x:E.x*-.5}}).to(C,{duration:.3,pixi:{scaleX:1.5,x:E.x*1.5}}).to(C,{duration:.3,pixi:{scaleX:.5,x:E.x*-.01}}).to(C,{duration:.3,pixi:{scaleX:1,x:E.x}}).to(C,{rotation:0,pixi:{...E,rotation:0},duration:.5})}}),gsap$2.registerEffect({name:"NONE",effect(C,E){return gsap$2.timeline().to(C,{duration:0})}}),gsap$2.registerEffect({name:"FLASH",effect(C,E){return gsap$2.timeline().to(C,{duration:.2,alpha:0}).to(C,{duration:.2,alpha:1}).to(C,{duration:.2,alpha:0}).to(C,{duration:.2,alpha:1}).to(C,{duration:.2,alpha:0}).to(C,{duration:.2,alpha:1,...E})}}),gsap$2.registerEffect({name:"BOUNCE_IN",effect(C,E){return gsap$2.timeline().fromTo(C,{pixi:{scaleX:1.5,scaleY:1.5}},{...E,pixi:{x:E==null?void 0:E.x,y:E==null?void 0:E.y,scaleX:1,scaleY:1},duration:2,ease:"bounce.out"})}}),gsap$2.registerEffect({name:"BOUNCE_IN_DOWN",effect(C,E){return gsap$2.timeline().from(C,{duration:2,ease:"bounce.out",immediateRender:!0,pixi:{...E,x:E==null?void 0:E.x,y:-2500,alpha:0}})}}),gsap$2.registerEffect({name:"BOUNCE_IN_LEFT",effect(C,E){return gsap$2.timeline().from(C,{ease:"bounce.out",duration:2,pixi:{...E,x:-1500,alpha:0}})}}),gsap$2.registerEffect({name:"BOUNCE_IN_RIGHT",effect(C,E){const I=Math.max(1e3,(E==null?void 0:E.maxX)+500);return gsap$2.timeline().from(C,{ease:"bounce.out",duration:2,pixi:{...E,x:I}})}}),gsap$2.registerEffect({name:"BOUNCE_IN_UP",effect(C,E){return gsap$2.timeline().from(C,{ease:"bounce.out",pixi:{...E,y:2e3},duration:2})}}),gsap$2.registerEffect({name:"BOUNCE_OUT",effect(C,E){return gsap$2.timeline().from(C,{...E,ease:"bounce.in",pixi:{y:2e3},duration:1.5})}}),gsap$2.registerEffect({name:"FADE_IN",effect(C){return gsap$2.timeline().fromTo(C,{alpha:0},{ease:"power4.in",alpha:1,duration:1})}}),gsap$2.registerEffect({name:"FADE_IN_DOWN",effect(C,E){return gsap$2.timeline().fromTo(C,{pixi:{y:-1500,alpha:0}},{duration:1,ease:"power4.in",pixi:{y:0,alpha:1,...E}})}}),gsap$2.registerEffect({name:"FADE_IN_LEFT",effect(C,E){return gsap$2.timeline().fromTo(C,{pixi:{alpha:0,x:-2e3}},{ease:"power4.in",pixi:{x:0,alpha:1,...E},duration:1})}}),gsap$2.registerEffect({name:"FADE_IN_RIGHT",effect(C,E){return gsap$2.fromTo(C,{pixi:{x:2e3,alpha:0}},{duration:1,ease:"power4.in",pixi:{x:0,alpha:1,...E}})}}),gsap$2.registerEffect({name:"FADE_IN_UP",effect(C,E){return gsap$2.fromTo(C,{pixi:{y:2e3,alpha:0}},{duration:.8,ease:"power4.in",pixi:{y:0,alpha:1,...E}})}}),gsap$2.registerEffect({name:"SPIN",effect(C){return gsap$2.to(C,{rotation:(E,I)=>gsap$2.utils.snap(360,Number(gsap$2.getProperty(I,"rotation"))+360)})}});function useGsapEffect(){return{updateEffect:React.useCallback((E,I,B)=>gsap$2.effects[I]&&E?gsap$2.effects[I](E,B):gsap$2.effects.NONE(E,B),[])}}var Animations=(C=>(C.NONE="NONE",C.FLASH="FLASH",C.PULSE="PULSE",C.SHAKE="SHAKE",C.SWING="SWING",C.JELLO="JELLO",C.WOOBLE="WOOBLE",C.FADE_IN="FADE_IN",C.FADE_OUT="FADE_OUT",C.FADE_IN_OUT="FADE_IN_OUT",C.SLIDE_IN_LEFT="SLIDE_IN_LEFT",C.SLIDE_IN_RIGHT="SLIDE_IN_RIGHT",C.SLIDE_IN_TOP="SLIDE_IN_TOP",C.SLIDE_IN_BOTTOM="SLIDE_IN_BOTTOM",C.SLIDE_OUT_LEFT="SLIDE_OUT_LEFT",C.SLIDE_OUT_RIGHT="SLIDE_OUT_RIGHT",C.SLIDE_OUT_TOP="SLIDE_OUT_TOP",C.SLIDE_OUT_BOTTOM="SLIDE_OUT_BOTTOM",C.ZOOM_IN="ZOOM_IN",C.ZOOM_OUT="ZOOM_OUT",C.ZOOM_IN_OUT="ZOOM_IN_OUT",C.BOUNCE_IN="BOUNCE_IN",C.BOUNCE_OUT="BOUNCE_OUT",C.BOUNCE_IN_OUT="BOUNCE_IN_OUT",C.BOUNCE_IN_DOWN="BOUNCE_IN_DOWN",C.BOUNCE_IN_LEFT="BOUNCE_IN_LEFT",C.BOUNCE_IN_RIGHT="BOUNCE_IN_RIGHT",C.BOUNCE_IN_UP="BOUNCE_IN_UP",C.BOUNCE_OUT_DOWN="BOUNCE_OUT_DOWN",C.BOUNCE_OUT_LEFT="BOUNCE_OUT_LEFT",C.BOUNCE_OUT_RIGHT="BOUNCE_OUT_RIGHT",C.BOUNCE_OUT_UP="BOUNCE_OUT_UP",C.FADE_IN_DOWN="FADE_IN_DOWN",C.FADE_IN_LEFT="FADE_IN_LEFT",C.FADE_IN_RIGHT="FADE_IN_RIGHT",C.FADE_IN_UP="FADE_IN_UP",C.FADE_OUT_DOWN="FADE_OUT_DOWN",C.FADE_OUT_LEFT="FADE_OUT_LEFT",C.FADE_OUT_RIGHT="FADE_OUT_RIGHT",C.FADE_OUT_UP="FADE_OUT_UP",C.ELASTIC_IN="ELASTIC_IN",C.ELASTIC_OUT="ELASTIC_OUT",C.ELASTIC_IN_OUT="ELASTIC_IN_OUT",C.BACK_IN="BACK_IN",C.BACK_OUT="BACK_OUT",C.BACK_IN_OUT="BACK_IN_OUT",C.CIRCULAR_IN="CIRCULAR_IN",C.CIRCULAR_OUT="CIRCULAR_OUT",C.CIRCULAR_IN_OUT="CIRCULAR_IN_OUT",C.EXPO_IN="EXPO_IN",C.EXPO_OUT="EXPO_OUT",C.EXPO_IN_OUT="EXPO_IN_OUT",C.SINE_IN="SINE_IN",C.SINE_OUT="SINE_OUT",C.SINE_IN_OUT="SINE_IN_OUT",C.BOUNCE="BOUNCE",C.ELASTIC="ELASTIC",C.BACK="BACK",C.CIRCULAR="CIRCULAR",C.EXPO="EXPO",C.SINE="SINE",C.SPIN="SPIN",C))(Animations||{});const CYAN=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],initalTransforms$1={x:0,y:0,width:0,height:0,anchor:.5,animation:Animations.NONE,maxX:0,maxY:0,scale:1,rotation:0,effect:Effects.Normal,overlay:OverlayTypes.NONE,fontSize:10},AbstractContainer=React__namespace.forwardRef((C,E)=>{const[I,B]=React__namespace.useState(!1),[U]=React.useState(!1),[V,X]=React.useState(!1),[Y,K]=React.useState(),J=useDebounce(Y,300),xe=React.useRef(null),Z=React.useRef(null),_e=React.useRef(null),Se=React.useRef(null),Ee=React.useRef(null),Ae=React.useRef(null),Re=React.useRef({isDragging:!1}),{tl:Te}=React.useContext(GsapPixieContext),we=react.useApp(),Pe=we.screen.width,Ie=we.screen.height,{uniqueId:Fe,visible:Oe,startAt:Le,transformation:$e=initalTransforms$1,applyTransformer:Ve,disabled:Xe,pointerdown:Ue,pointerout:We,pointerover:je,isText:ze,isDragging:He,isGif:De,onDoubleClick:Ne,isTextEditMode:Me,handleDragFontSize:ke,handleDragWordWrap:Ge}=C,{x:Be=0,y:qe=0,width:Ke,height:Ye,scale:tt=[1,1],rotation:et=0,effect:it,overlay:nt,animation:ot=Animations.NONE,fontSize:Ze=16}=$e,Je=useGsapEffect();useCustomEventListener(Events.COMPLETE,()=>{xe.current}),React__namespace.useImperativeHandle(E,()=>({getIsTransformerDragging:()=>U,getIsMouseOverTransformer:()=>V}),[U,V]),React__namespace.useEffect(()=>{xe.current&&B(!0)},[]),React__namespace.useEffect(()=>{K({x:Be,y:qe,width:Ke,height:Ye,animation:ot,maxX:Pe,maxY:Ie})},[ot,Be,qe,Ke,Ye,Pe,Ie]),React__namespace.useEffect(()=>{if(!Z.current)return;const ct=gsap$2.context(()=>{if(Te.current&&J){const{x:ft,y:xt,animation:pt,maxX:mt,maxY:bt}=J||{},_t=Te.current.progress(),vt=Je.updateEffect(xe.current,pt,{immediateRender:!1,x:ft,y:xt,overwrite:!0,maxX:mt,maxY:bt});Ee.current&&(Te.current.remove(Ee.current),Ee.current.progress(0).kill()),_t>.1?(vt.eventCallback("onComplete",()=>{vt.remove("onComplete"),Te.current.add(vt,Le),Ee.current=vt}),vt.play()):(vt.progress(1),Te.current.add(vt,Le),Ee.current=vt)}else Ee.current&&Ee.current.progress(0).kill()},Z.current);return()=>{ct.revert()}},[Le,J]);const st=React__namespace.useCallback(()=>{X(!0),je&&!Re.current.isDragging&&je()},[]),rt=ct=>parseFloat(ct.toFixed(2)),Qe=React__namespace.useCallback(()=>{var xt,pt;Re.current.isDragging=!0;const{width:ct}=xe.current,ft={x:rt(Number((xt=xe.current)==null?void 0:xt.scale.x)),y:rt(Number((pt=xe.current)==null?void 0:pt.scale.y))};if(ze){if(ft.x!==1&&ft.y!==1&&_e.current){const mt=Ze*ft.x;ke&&ke(ct,mt,ft)}else if(ft.x!==1)Ge&&Ge(ct,ft);else if(ft.y!==1){const mt=Ze*ft.x;ke&&ke(ct,mt,ft)}}},[ze,Ze,ke,Ge]),at=React__namespace.useCallback(ct=>{var It,At;const{x:ft,y:xt,width:pt,height:mt,rotation:bt}=xe.current,_t={x:rt(Number((It=xe.current)==null?void 0:It.scale.x)),y:rt(Number((At=xe.current)==null?void 0:At.scale.y))};let vt=Ze;ze&&_t.x!==1&&_t.y!==1?(vt=Ze*_t.x,ke&&ke(pt,vt,_t)):ze&&_t.x!==1&&Ge&&Ge(pt,_t),C.onAnchorTransformationEnd&&C.onAnchorTransformationEnd({uniqueId:Fe,transformation:{...ct.transformation,fontSize:vt}}),Re.current.isDragging=!1},[ze,Fe,Ze,ke,Ge]),ht=react.withFilters(react.Container,{matrix:PIXI__namespace.filters.ColorMatrixFilter});return jsxRuntimeExports.jsxs(react.Container,{ref:Z,children:[jsxRuntimeExports.jsx(react.Container,{ref:xe,position:[Be,qe],pivot:[Be,qe],width:Ke,height:Ye,scale:tt,rotation:et,...!Xe&&Oe&&!U&&!He&&{interactive:!0,buttonMode:!0,pointerdown:Ue,pointerover:je,pointerout:We},children:jsxRuntimeExports.jsxs(react.Container,{ref:Ae,children:[!De&&jsxRuntimeExports.jsx(ht,{scale:1,apply:({matrix:ct})=>{it===Effects.BlackAndWhite?ct.desaturate():it===Effects.Sepia?ct.sepia():it===Effects.RetroVintage||it===Effects.NightVision?ct.negative():it===Effects.Normal&&ct.reset()},matrix:{enabled:!0,matrix:CYAN},children:jsxRuntimeExports.jsx(react.Container,{ref:_e,children:C.children})}),De&&jsxRuntimeExports.jsx(react.Container,{ref:_e,children:C.children}),!isEmpty$1(nt)&&nt!==OverlayTypes.NONE&&nt!==OverlayTypes.NORMAL&&jsxRuntimeExports.jsx(PixiOverlayTilingSprite,{overlay:nt,width:Ke,height:Ye,x:Be,y:qe}),jsxRuntimeExports.jsx(react.Sprite,{texture:PIXI__namespace.Texture.WHITE,alpha:0,x:Be,y:qe,width:Ke,height:Ye,scale:tt,rotation:et})]})}),Ve&&Oe&&!Me&&jsxRuntimeExports.jsx(PixiTransformer,{pixiTransformerRef:Se,imageRef:xe,isMounted:I,transformCommit:at,transformChange:Qe,mouseoverEvent:st,uniqueId:Fe,isText:ze,onDoubleClick:Ne})]})});var ENV=(C=>(C[C.WEBGL_LEGACY=0]="WEBGL_LEGACY",C[C.WEBGL=1]="WEBGL",C[C.WEBGL2=2]="WEBGL2",C))(ENV||{}),RENDERER_TYPE=(C=>(C[C.UNKNOWN=0]="UNKNOWN",C[C.WEBGL=1]="WEBGL",C[C.CANVAS=2]="CANVAS",C))(RENDERER_TYPE||{}),BUFFER_BITS=(C=>(C[C.COLOR=16384]="COLOR",C[C.DEPTH=256]="DEPTH",C[C.STENCIL=1024]="STENCIL",C))(BUFFER_BITS||{}),BLEND_MODES=(C=>(C[C.NORMAL=0]="NORMAL",C[C.ADD=1]="ADD",C[C.MULTIPLY=2]="MULTIPLY",C[C.SCREEN=3]="SCREEN",C[C.OVERLAY=4]="OVERLAY",C[C.DARKEN=5]="DARKEN",C[C.LIGHTEN=6]="LIGHTEN",C[C.COLOR_DODGE=7]="COLOR_DODGE",C[C.COLOR_BURN=8]="COLOR_BURN",C[C.HARD_LIGHT=9]="HARD_LIGHT",C[C.SOFT_LIGHT=10]="SOFT_LIGHT",C[C.DIFFERENCE=11]="DIFFERENCE",C[C.EXCLUSION=12]="EXCLUSION",C[C.HUE=13]="HUE",C[C.SATURATION=14]="SATURATION",C[C.COLOR=15]="COLOR",C[C.LUMINOSITY=16]="LUMINOSITY",C[C.NORMAL_NPM=17]="NORMAL_NPM",C[C.ADD_NPM=18]="ADD_NPM",C[C.SCREEN_NPM=19]="SCREEN_NPM",C[C.NONE=20]="NONE",C[C.SRC_OVER=0]="SRC_OVER",C[C.SRC_IN=21]="SRC_IN",C[C.SRC_OUT=22]="SRC_OUT",C[C.SRC_ATOP=23]="SRC_ATOP",C[C.DST_OVER=24]="DST_OVER",C[C.DST_IN=25]="DST_IN",C[C.DST_OUT=26]="DST_OUT",C[C.DST_ATOP=27]="DST_ATOP",C[C.ERASE=26]="ERASE",C[C.SUBTRACT=28]="SUBTRACT",C[C.XOR=29]="XOR",C))(BLEND_MODES||{}),DRAW_MODES=(C=>(C[C.POINTS=0]="POINTS",C[C.LINES=1]="LINES",C[C.LINE_LOOP=2]="LINE_LOOP",C[C.LINE_STRIP=3]="LINE_STRIP",C[C.TRIANGLES=4]="TRIANGLES",C[C.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",C[C.TRIANGLE_FAN=6]="TRIANGLE_FAN",C))(DRAW_MODES||{}),FORMATS=(C=>(C[C.RGBA=6408]="RGBA",C[C.RGB=6407]="RGB",C[C.RG=33319]="RG",C[C.RED=6403]="RED",C[C.RGBA_INTEGER=36249]="RGBA_INTEGER",C[C.RGB_INTEGER=36248]="RGB_INTEGER",C[C.RG_INTEGER=33320]="RG_INTEGER",C[C.RED_INTEGER=36244]="RED_INTEGER",C[C.ALPHA=6406]="ALPHA",C[C.LUMINANCE=6409]="LUMINANCE",C[C.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",C[C.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",C[C.DEPTH_STENCIL=34041]="DEPTH_STENCIL",C))(FORMATS||{}),TARGETS=(C=>(C[C.TEXTURE_2D=3553]="TEXTURE_2D",C[C.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",C[C.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",C[C.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",C[C.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",C[C.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",C[C.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",C[C.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",C[C.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",C))(TARGETS||{}),TYPES=(C=>(C[C.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",C[C.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",C[C.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",C[C.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",C[C.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",C[C.UNSIGNED_INT=5125]="UNSIGNED_INT",C[C.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",C[C.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",C[C.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",C[C.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",C[C.BYTE=5120]="BYTE",C[C.SHORT=5122]="SHORT",C[C.INT=5124]="INT",C[C.FLOAT=5126]="FLOAT",C[C.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",C[C.HALF_FLOAT=36193]="HALF_FLOAT",C))(TYPES||{}),SAMPLER_TYPES=(C=>(C[C.FLOAT=0]="FLOAT",C[C.INT=1]="INT",C[C.UINT=2]="UINT",C))(SAMPLER_TYPES||{}),SCALE_MODES=(C=>(C[C.NEAREST=0]="NEAREST",C[C.LINEAR=1]="LINEAR",C))(SCALE_MODES||{}),WRAP_MODES=(C=>(C[C.CLAMP=33071]="CLAMP",C[C.REPEAT=10497]="REPEAT",C[C.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",C))(WRAP_MODES||{}),MIPMAP_MODES=(C=>(C[C.OFF=0]="OFF",C[C.POW2=1]="POW2",C[C.ON=2]="ON",C[C.ON_MANUAL=3]="ON_MANUAL",C))(MIPMAP_MODES||{}),ALPHA_MODES=(C=>(C[C.NPM=0]="NPM",C[C.UNPACK=1]="UNPACK",C[C.PMA=2]="PMA",C[C.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",C[C.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",C[C.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",C))(ALPHA_MODES||{}),CLEAR_MODES=(C=>(C[C.NO=0]="NO",C[C.YES=1]="YES",C[C.AUTO=2]="AUTO",C[C.BLEND=0]="BLEND",C[C.CLEAR=1]="CLEAR",C[C.BLIT=2]="BLIT",C))(CLEAR_MODES||{}),GC_MODES=(C=>(C[C.AUTO=0]="AUTO",C[C.MANUAL=1]="MANUAL",C))(GC_MODES||{}),PRECISION=(C=>(C.LOW="lowp",C.MEDIUM="mediump",C.HIGH="highp",C))(PRECISION||{}),MASK_TYPES=(C=>(C[C.NONE=0]="NONE",C[C.SCISSOR=1]="SCISSOR",C[C.STENCIL=2]="STENCIL",C[C.SPRITE=3]="SPRITE",C[C.COLOR=4]="COLOR",C))(MASK_TYPES||{}),MSAA_QUALITY=(C=>(C[C.NONE=0]="NONE",C[C.LOW=2]="LOW",C[C.MEDIUM=4]="MEDIUM",C[C.HIGH=8]="HIGH",C))(MSAA_QUALITY||{}),BUFFER_TYPE=(C=>(C[C.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",C[C.ARRAY_BUFFER=34962]="ARRAY_BUFFER",C[C.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",C))(BUFFER_TYPE||{});const BrowserAdapter={createCanvas:(C,E)=>{const I=document.createElement("canvas");return I.width=C,I.height=E,I},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(C,E)=>fetch(C,E),parseXML:C=>new DOMParser().parseFromString(C,"text/xml")},settings={ADAPTER:BrowserAdapter,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var appleIphone=/iPhone/i,appleIpod=/iPod/i,appleTablet=/iPad/i,appleUniversal=/\biOS-universal(?:.+)Mac\b/i,androidPhone=/\bAndroid(?:.+)Mobile\b/i,androidTablet=/Android/i,amazonPhone=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,amazonTablet=/Silk/i,windowsPhone=/Windows Phone/i,windowsTablet=/\bWindows(?:.+)ARM\b/i,otherBlackBerry=/BlackBerry/i,otherBlackBerry10=/BB10/i,otherOpera=/Opera Mini/i,otherChrome=/\b(CriOS|Chrome)(?:.+)Mobile/i,otherFirefox=/Mobile(?:.+)Firefox\b/i,isAppleTabletOnIos13=function(C){return typeof C<"u"&&C.platform==="MacIntel"&&typeof C.maxTouchPoints=="number"&&C.maxTouchPoints>1&&typeof MSStream>"u"};function createMatch(C){return function(E){return E.test(C)}}function isMobile$1(C){var E={userAgent:"",platform:"",maxTouchPoints:0};!C&&typeof navigator<"u"?E={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof C=="string"?E.userAgent=C:C&&C.userAgent&&(E={userAgent:C.userAgent,platform:C.platform,maxTouchPoints:C.maxTouchPoints||0});var I=E.userAgent,B=I.split("[FBAN");typeof B[1]<"u"&&(I=B[0]),B=I.split("Twitter"),typeof B[1]<"u"&&(I=B[0]);var U=createMatch(I),V={apple:{phone:U(appleIphone)&&!U(windowsPhone),ipod:U(appleIpod),tablet:!U(appleIphone)&&(U(appleTablet)||isAppleTabletOnIos13(E))&&!U(windowsPhone),universal:U(appleUniversal),device:(U(appleIphone)||U(appleIpod)||U(appleTablet)||U(appleUniversal)||isAppleTabletOnIos13(E))&&!U(windowsPhone)},amazon:{phone:U(amazonPhone),tablet:!U(amazonPhone)&&U(amazonTablet),device:U(amazonPhone)||U(amazonTablet)},android:{phone:!U(windowsPhone)&&U(amazonPhone)||!U(windowsPhone)&&U(androidPhone),tablet:!U(windowsPhone)&&!U(amazonPhone)&&!U(androidPhone)&&(U(amazonTablet)||U(androidTablet)),device:!U(windowsPhone)&&(U(amazonPhone)||U(amazonTablet)||U(androidPhone)||U(androidTablet))||U(/\bokhttp\b/i)},windows:{phone:U(windowsPhone),tablet:U(windowsTablet),device:U(windowsPhone)||U(windowsTablet)},other:{blackberry:U(otherBlackBerry),blackberry10:U(otherBlackBerry10),opera:U(otherOpera),firefox:U(otherFirefox),chrome:U(otherChrome),device:U(otherBlackBerry)||U(otherBlackBerry10)||U(otherOpera)||U(otherFirefox)||U(otherChrome)},any:!1,phone:!1,tablet:!1};return V.any=V.apple.device||V.android.device||V.windows.device||V.other.device,V.phone=V.apple.phone||V.android.phone||V.windows.phone,V.tablet=V.apple.tablet||V.android.tablet||V.windows.tablet,V}const isMobileCall=isMobile$1.default??isMobile$1,isMobile=isMobileCall(globalThis.navigator);settings.RETINA_PREFIX=/@([0-9\.]+)x/,settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var eventemitter3={exports:{}};(function(C){var E=Object.prototype.hasOwnProperty,I="~";function B(){}Object.create&&(B.prototype=Object.create(null),new B().__proto__||(I=!1));function U(K,J,xe){this.fn=K,this.context=J,this.once=xe||!1}function V(K,J,xe,Z,_e){if(typeof xe!="function")throw new TypeError("The listener must be a function");var Se=new U(xe,Z||K,_e),Ee=I?I+J:J;return K._events[Ee]?K._events[Ee].fn?K._events[Ee]=[K._events[Ee],Se]:K._events[Ee].push(Se):(K._events[Ee]=Se,K._eventsCount++),K}function X(K,J){--K._eventsCount===0?K._events=new B:delete K._events[J]}function Y(){this._events=new B,this._eventsCount=0}Y.prototype.eventNames=function(){var J=[],xe,Z;if(this._eventsCount===0)return J;for(Z in xe=this._events)E.call(xe,Z)&&J.push(I?Z.slice(1):Z);return Object.getOwnPropertySymbols?J.concat(Object.getOwnPropertySymbols(xe)):J},Y.prototype.listeners=function(J){var xe=I?I+J:J,Z=this._events[xe];if(!Z)return[];if(Z.fn)return[Z.fn];for(var _e=0,Se=Z.length,Ee=new Array(Se);_e<Se;_e++)Ee[_e]=Z[_e].fn;return Ee},Y.prototype.listenerCount=function(J){var xe=I?I+J:J,Z=this._events[xe];return Z?Z.fn?1:Z.length:0},Y.prototype.emit=function(J,xe,Z,_e,Se,Ee){var Ae=I?I+J:J;if(!this._events[Ae])return!1;var Re=this._events[Ae],Te=arguments.length,we,Pe;if(Re.fn){switch(Re.once&&this.removeListener(J,Re.fn,void 0,!0),Te){case 1:return Re.fn.call(Re.context),!0;case 2:return Re.fn.call(Re.context,xe),!0;case 3:return Re.fn.call(Re.context,xe,Z),!0;case 4:return Re.fn.call(Re.context,xe,Z,_e),!0;case 5:return Re.fn.call(Re.context,xe,Z,_e,Se),!0;case 6:return Re.fn.call(Re.context,xe,Z,_e,Se,Ee),!0}for(Pe=1,we=new Array(Te-1);Pe<Te;Pe++)we[Pe-1]=arguments[Pe];Re.fn.apply(Re.context,we)}else{var Ie=Re.length,Fe;for(Pe=0;Pe<Ie;Pe++)switch(Re[Pe].once&&this.removeListener(J,Re[Pe].fn,void 0,!0),Te){case 1:Re[Pe].fn.call(Re[Pe].context);break;case 2:Re[Pe].fn.call(Re[Pe].context,xe);break;case 3:Re[Pe].fn.call(Re[Pe].context,xe,Z);break;case 4:Re[Pe].fn.call(Re[Pe].context,xe,Z,_e);break;default:if(!we)for(Fe=1,we=new Array(Te-1);Fe<Te;Fe++)we[Fe-1]=arguments[Fe];Re[Pe].fn.apply(Re[Pe].context,we)}}return!0},Y.prototype.on=function(J,xe,Z){return V(this,J,xe,Z,!1)},Y.prototype.once=function(J,xe,Z){return V(this,J,xe,Z,!0)},Y.prototype.removeListener=function(J,xe,Z,_e){var Se=I?I+J:J;if(!this._events[Se])return this;if(!xe)return X(this,Se),this;var Ee=this._events[Se];if(Ee.fn)Ee.fn===xe&&(!_e||Ee.once)&&(!Z||Ee.context===Z)&&X(this,Se);else{for(var Ae=0,Re=[],Te=Ee.length;Ae<Te;Ae++)(Ee[Ae].fn!==xe||_e&&!Ee[Ae].once||Z&&Ee[Ae].context!==Z)&&Re.push(Ee[Ae]);Re.length?this._events[Se]=Re.length===1?Re[0]:Re:X(this,Se)}return this},Y.prototype.removeAllListeners=function(J){var xe;return J?(xe=I?I+J:J,this._events[xe]&&X(this,xe)):(this._events=new B,this._eventsCount=0),this},Y.prototype.off=Y.prototype.removeListener,Y.prototype.addListener=Y.prototype.on,Y.prefixed=I,Y.EventEmitter=Y,C.exports=Y})(eventemitter3);var eventemitter3Exports=eventemitter3.exports;const EventEmitter=getDefaultExportFromCjs(eventemitter3Exports);var earcut$2={exports:{}};earcut$2.exports=earcut,earcut$2.exports.default=earcut;function earcut(C,E,I){I=I||2;var B=E&&E.length,U=B?E[0]*I:C.length,V=linkedList(C,0,U,I,!0),X=[];if(!V||V.next===V.prev)return X;var Y,K,J,xe,Z,_e,Se;if(B&&(V=eliminateHoles(C,E,V,I)),C.length>80*I){Y=J=C[0],K=xe=C[1];for(var Ee=I;Ee<U;Ee+=I)Z=C[Ee],_e=C[Ee+1],Z<Y&&(Y=Z),_e<K&&(K=_e),Z>J&&(J=Z),_e>xe&&(xe=_e);Se=Math.max(J-Y,xe-K),Se=Se!==0?32767/Se:0}return earcutLinked(V,X,I,Y,K,Se,0),X}function linkedList(C,E,I,B,U){var V,X;if(U===signedArea(C,E,I,B)>0)for(V=E;V<I;V+=B)X=insertNode(V,C[V],C[V+1],X);else for(V=I-B;V>=E;V-=B)X=insertNode(V,C[V],C[V+1],X);return X&&equals(X,X.next)&&(removeNode(X),X=X.next),X}function filterPoints(C,E){if(!C)return C;E||(E=C);var I=C,B;do if(B=!1,!I.steiner&&(equals(I,I.next)||area(I.prev,I,I.next)===0)){if(removeNode(I),I=E=I.prev,I===I.next)break;B=!0}else I=I.next;while(B||I!==E);return E}function earcutLinked(C,E,I,B,U,V,X){if(C){!X&&V&&indexCurve(C,B,U,V);for(var Y=C,K,J;C.prev!==C.next;){if(K=C.prev,J=C.next,V?isEarHashed(C,B,U,V):isEar(C)){E.push(K.i/I|0),E.push(C.i/I|0),E.push(J.i/I|0),removeNode(C),C=J.next,Y=J.next;continue}if(C=J,C===Y){X?X===1?(C=cureLocalIntersections(filterPoints(C),E,I),earcutLinked(C,E,I,B,U,V,2)):X===2&&splitEarcut(C,E,I,B,U,V):earcutLinked(filterPoints(C),E,I,B,U,V,1);break}}}}function isEar(C){var E=C.prev,I=C,B=C.next;if(area(E,I,B)>=0)return!1;for(var U=E.x,V=I.x,X=B.x,Y=E.y,K=I.y,J=B.y,xe=U<V?U<X?U:X:V<X?V:X,Z=Y<K?Y<J?Y:J:K<J?K:J,_e=U>V?U>X?U:X:V>X?V:X,Se=Y>K?Y>J?Y:J:K>J?K:J,Ee=B.next;Ee!==E;){if(Ee.x>=xe&&Ee.x<=_e&&Ee.y>=Z&&Ee.y<=Se&&pointInTriangle(U,Y,V,K,X,J,Ee.x,Ee.y)&&area(Ee.prev,Ee,Ee.next)>=0)return!1;Ee=Ee.next}return!0}function isEarHashed(C,E,I,B){var U=C.prev,V=C,X=C.next;if(area(U,V,X)>=0)return!1;for(var Y=U.x,K=V.x,J=X.x,xe=U.y,Z=V.y,_e=X.y,Se=Y<K?Y<J?Y:J:K<J?K:J,Ee=xe<Z?xe<_e?xe:_e:Z<_e?Z:_e,Ae=Y>K?Y>J?Y:J:K>J?K:J,Re=xe>Z?xe>_e?xe:_e:Z>_e?Z:_e,Te=zOrder(Se,Ee,E,I,B),we=zOrder(Ae,Re,E,I,B),Pe=C.prevZ,Ie=C.nextZ;Pe&&Pe.z>=Te&&Ie&&Ie.z<=we;){if(Pe.x>=Se&&Pe.x<=Ae&&Pe.y>=Ee&&Pe.y<=Re&&Pe!==U&&Pe!==X&&pointInTriangle(Y,xe,K,Z,J,_e,Pe.x,Pe.y)&&area(Pe.prev,Pe,Pe.next)>=0||(Pe=Pe.prevZ,Ie.x>=Se&&Ie.x<=Ae&&Ie.y>=Ee&&Ie.y<=Re&&Ie!==U&&Ie!==X&&pointInTriangle(Y,xe,K,Z,J,_e,Ie.x,Ie.y)&&area(Ie.prev,Ie,Ie.next)>=0))return!1;Ie=Ie.nextZ}for(;Pe&&Pe.z>=Te;){if(Pe.x>=Se&&Pe.x<=Ae&&Pe.y>=Ee&&Pe.y<=Re&&Pe!==U&&Pe!==X&&pointInTriangle(Y,xe,K,Z,J,_e,Pe.x,Pe.y)&&area(Pe.prev,Pe,Pe.next)>=0)return!1;Pe=Pe.prevZ}for(;Ie&&Ie.z<=we;){if(Ie.x>=Se&&Ie.x<=Ae&&Ie.y>=Ee&&Ie.y<=Re&&Ie!==U&&Ie!==X&&pointInTriangle(Y,xe,K,Z,J,_e,Ie.x,Ie.y)&&area(Ie.prev,Ie,Ie.next)>=0)return!1;Ie=Ie.nextZ}return!0}function cureLocalIntersections(C,E,I){var B=C;do{var U=B.prev,V=B.next.next;!equals(U,V)&&intersects(U,B,B.next,V)&&locallyInside(U,V)&&locallyInside(V,U)&&(E.push(U.i/I|0),E.push(B.i/I|0),E.push(V.i/I|0),removeNode(B),removeNode(B.next),B=C=V),B=B.next}while(B!==C);return filterPoints(B)}function splitEarcut(C,E,I,B,U,V){var X=C;do{for(var Y=X.next.next;Y!==X.prev;){if(X.i!==Y.i&&isValidDiagonal(X,Y)){var K=splitPolygon(X,Y);X=filterPoints(X,X.next),K=filterPoints(K,K.next),earcutLinked(X,E,I,B,U,V,0),earcutLinked(K,E,I,B,U,V,0);return}Y=Y.next}X=X.next}while(X!==C)}function eliminateHoles(C,E,I,B){var U=[],V,X,Y,K,J;for(V=0,X=E.length;V<X;V++)Y=E[V]*B,K=V<X-1?E[V+1]*B:C.length,J=linkedList(C,Y,K,B,!1),J===J.next&&(J.steiner=!0),U.push(getLeftmost(J));for(U.sort(compareX),V=0;V<U.length;V++)I=eliminateHole(U[V],I);return I}function compareX(C,E){return C.x-E.x}function eliminateHole(C,E){var I=findHoleBridge(C,E);if(!I)return E;var B=splitPolygon(I,C);return filterPoints(B,B.next),filterPoints(I,I.next)}function findHoleBridge(C,E){var I=E,B=C.x,U=C.y,V=-1/0,X;do{if(U<=I.y&&U>=I.next.y&&I.next.y!==I.y){var Y=I.x+(U-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(Y<=B&&Y>V&&(V=Y,X=I.x<I.next.x?I:I.next,Y===B))return X}I=I.next}while(I!==E);if(!X)return null;var K=X,J=X.x,xe=X.y,Z=1/0,_e;I=X;do B>=I.x&&I.x>=J&&B!==I.x&&pointInTriangle(U<xe?B:V,U,J,xe,U<xe?V:B,U,I.x,I.y)&&(_e=Math.abs(U-I.y)/(B-I.x),locallyInside(I,C)&&(_e<Z||_e===Z&&(I.x>X.x||I.x===X.x&&sectorContainsSector(X,I)))&&(X=I,Z=_e)),I=I.next;while(I!==K);return X}function sectorContainsSector(C,E){return area(C.prev,C,E.prev)<0&&area(E.next,C,C.next)<0}function indexCurve(C,E,I,B){var U=C;do U.z===0&&(U.z=zOrder(U.x,U.y,E,I,B)),U.prevZ=U.prev,U.nextZ=U.next,U=U.next;while(U!==C);U.prevZ.nextZ=null,U.prevZ=null,sortLinked(U)}function sortLinked(C){var E,I,B,U,V,X,Y,K,J=1;do{for(I=C,C=null,V=null,X=0;I;){for(X++,B=I,Y=0,E=0;E<J&&(Y++,B=B.nextZ,!!B);E++);for(K=J;Y>0||K>0&&B;)Y!==0&&(K===0||!B||I.z<=B.z)?(U=I,I=I.nextZ,Y--):(U=B,B=B.nextZ,K--),V?V.nextZ=U:C=U,U.prevZ=V,V=U;I=B}V.nextZ=null,J*=2}while(X>1);return C}function zOrder(C,E,I,B,U){return C=(C-I)*U|0,E=(E-B)*U|0,C=(C|C<<8)&16711935,C=(C|C<<4)&252645135,C=(C|C<<2)&858993459,C=(C|C<<1)&1431655765,E=(E|E<<8)&16711935,E=(E|E<<4)&252645135,E=(E|E<<2)&858993459,E=(E|E<<1)&1431655765,C|E<<1}function getLeftmost(C){var E=C,I=C;do(E.x<I.x||E.x===I.x&&E.y<I.y)&&(I=E),E=E.next;while(E!==C);return I}function pointInTriangle(C,E,I,B,U,V,X,Y){return(U-X)*(E-Y)>=(C-X)*(V-Y)&&(C-X)*(B-Y)>=(I-X)*(E-Y)&&(I-X)*(V-Y)>=(U-X)*(B-Y)}function isValidDiagonal(C,E){return C.next.i!==E.i&&C.prev.i!==E.i&&!intersectsPolygon(C,E)&&(locallyInside(C,E)&&locallyInside(E,C)&&middleInside(C,E)&&(area(C.prev,C,E.prev)||area(C,E.prev,E))||equals(C,E)&&area(C.prev,C,C.next)>0&&area(E.prev,E,E.next)>0)}function area(C,E,I){return(E.y-C.y)*(I.x-E.x)-(E.x-C.x)*(I.y-E.y)}function equals(C,E){return C.x===E.x&&C.y===E.y}function intersects(C,E,I,B){var U=sign(area(C,E,I)),V=sign(area(C,E,B)),X=sign(area(I,B,C)),Y=sign(area(I,B,E));return!!(U!==V&&X!==Y||U===0&&onSegment(C,I,E)||V===0&&onSegment(C,B,E)||X===0&&onSegment(I,C,B)||Y===0&&onSegment(I,E,B))}function onSegment(C,E,I){return E.x<=Math.max(C.x,I.x)&&E.x>=Math.min(C.x,I.x)&&E.y<=Math.max(C.y,I.y)&&E.y>=Math.min(C.y,I.y)}function sign(C){return C>0?1:C<0?-1:0}function intersectsPolygon(C,E){var I=C;do{if(I.i!==C.i&&I.next.i!==C.i&&I.i!==E.i&&I.next.i!==E.i&&intersects(I,I.next,C,E))return!0;I=I.next}while(I!==C);return!1}function locallyInside(C,E){return area(C.prev,C,C.next)<0?area(C,E,C.next)>=0&&area(C,C.prev,E)>=0:area(C,E,C.prev)<0||area(C,C.next,E)<0}function middleInside(C,E){var I=C,B=!1,U=(C.x+E.x)/2,V=(C.y+E.y)/2;do I.y>V!=I.next.y>V&&I.next.y!==I.y&&U<(I.next.x-I.x)*(V-I.y)/(I.next.y-I.y)+I.x&&(B=!B),I=I.next;while(I!==C);return B}function splitPolygon(C,E){var I=new Node(C.i,C.x,C.y),B=new Node(E.i,E.x,E.y),U=C.next,V=E.prev;return C.next=E,E.prev=C,I.next=U,U.prev=I,B.next=I,I.prev=B,V.next=B,B.prev=V,B}function insertNode(C,E,I,B){var U=new Node(C,E,I);return B?(U.next=B.next,U.prev=B,B.next.prev=U,B.next=U):(U.prev=U,U.next=U),U}function removeNode(C){C.next.prev=C.prev,C.prev.next=C.next,C.prevZ&&(C.prevZ.nextZ=C.nextZ),C.nextZ&&(C.nextZ.prevZ=C.prevZ)}function Node(C,E,I){this.i=C,this.x=E,this.y=I,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}earcut.deviation=function(C,E,I,B){var U=E&&E.length,V=U?E[0]*I:C.length,X=Math.abs(signedArea(C,0,V,I));if(U)for(var Y=0,K=E.length;Y<K;Y++){var J=E[Y]*I,xe=Y<K-1?E[Y+1]*I:C.length;X-=Math.abs(signedArea(C,J,xe,I))}var Z=0;for(Y=0;Y<B.length;Y+=3){var _e=B[Y]*I,Se=B[Y+1]*I,Ee=B[Y+2]*I;Z+=Math.abs((C[_e]-C[Ee])*(C[Se+1]-C[_e+1])-(C[_e]-C[Se])*(C[Ee+1]-C[_e+1]))}return X===0&&Z===0?0:Math.abs((Z-X)/X)};function signedArea(C,E,I,B){for(var U=0,V=E,X=I-B;V<I;V+=B)U+=(C[X]-C[V])*(C[V+1]+C[X+1]),X=V;return U}earcut.flatten=function(C){for(var E=C[0][0].length,I={vertices:[],holes:[],dimensions:E},B=0,U=0;U<C.length;U++){for(var V=0;V<C[U].length;V++)for(var X=0;X<E;X++)I.vertices.push(C[U][V][X]);U>0&&(B+=C[U-1].length,I.holes.push(B))}return I};var earcutExports=earcut$2.exports;const earcut$1=getDefaultExportFromCjs(earcutExports);var punycode$1={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */punycode$1.exports,function(C,E){(function(I){var B=E&&!E.nodeType&&E,U=C&&!C.nodeType&&C,V=typeof commonjsGlobal$1=="object"&&commonjsGlobal$1;(V.global===V||V.window===V||V.self===V)&&(I=V);var X,Y=2147483647,K=36,J=1,xe=26,Z=38,_e=700,Se=72,Ee=128,Ae="-",Re=/^xn--/,Te=/[^\x20-\x7E]/,we=/[\x2E\u3002\uFF0E\uFF61]/g,Pe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Ie=K-J,Fe=Math.floor,Oe=String.fromCharCode,Le;function $e(Ge){throw new RangeError(Pe[Ge])}function Ve(Ge,Be){for(var qe=Ge.length,Ke=[];qe--;)Ke[qe]=Be(Ge[qe]);return Ke}function Xe(Ge,Be){var qe=Ge.split("@"),Ke="";qe.length>1&&(Ke=qe[0]+"@",Ge=qe[1]),Ge=Ge.replace(we,".");var Ye=Ge.split("."),tt=Ve(Ye,Be).join(".");return Ke+tt}function Ue(Ge){for(var Be=[],qe=0,Ke=Ge.length,Ye,tt;qe<Ke;)Ye=Ge.charCodeAt(qe++),Ye>=55296&&Ye<=56319&&qe<Ke?(tt=Ge.charCodeAt(qe++),(tt&64512)==56320?Be.push(((Ye&1023)<<10)+(tt&1023)+65536):(Be.push(Ye),qe--)):Be.push(Ye);return Be}function We(Ge){return Ve(Ge,function(Be){var qe="";return Be>65535&&(Be-=65536,qe+=Oe(Be>>>10&1023|55296),Be=56320|Be&1023),qe+=Oe(Be),qe}).join("")}function je(Ge){return Ge-48<10?Ge-22:Ge-65<26?Ge-65:Ge-97<26?Ge-97:K}function ze(Ge,Be){return Ge+22+75*(Ge<26)-((Be!=0)<<5)}function He(Ge,Be,qe){var Ke=0;for(Ge=qe?Fe(Ge/_e):Ge>>1,Ge+=Fe(Ge/Be);Ge>Ie*xe>>1;Ke+=K)Ge=Fe(Ge/Ie);return Fe(Ke+(Ie+1)*Ge/(Ge+Z))}function De(Ge){var Be=[],qe=Ge.length,Ke,Ye=0,tt=Ee,et=Se,it,nt,ot,Ze,Je,st,rt,Qe,at;for(it=Ge.lastIndexOf(Ae),it<0&&(it=0),nt=0;nt<it;++nt)Ge.charCodeAt(nt)>=128&&$e("not-basic"),Be.push(Ge.charCodeAt(nt));for(ot=it>0?it+1:0;ot<qe;){for(Ze=Ye,Je=1,st=K;ot>=qe&&$e("invalid-input"),rt=je(Ge.charCodeAt(ot++)),(rt>=K||rt>Fe((Y-Ye)/Je))&&$e("overflow"),Ye+=rt*Je,Qe=st<=et?J:st>=et+xe?xe:st-et,!(rt<Qe);st+=K)at=K-Qe,Je>Fe(Y/at)&&$e("overflow"),Je*=at;Ke=Be.length+1,et=He(Ye-Ze,Ke,Ze==0),Fe(Ye/Ke)>Y-tt&&$e("overflow"),tt+=Fe(Ye/Ke),Ye%=Ke,Be.splice(Ye++,0,tt)}return We(Be)}function Ne(Ge){var Be,qe,Ke,Ye,tt,et,it,nt,ot,Ze,Je,st=[],rt,Qe,at,ht;for(Ge=Ue(Ge),rt=Ge.length,Be=Ee,qe=0,tt=Se,et=0;et<rt;++et)Je=Ge[et],Je<128&&st.push(Oe(Je));for(Ke=Ye=st.length,Ye&&st.push(Ae);Ke<rt;){for(it=Y,et=0;et<rt;++et)Je=Ge[et],Je>=Be&&Je<it&&(it=Je);for(Qe=Ke+1,it-Be>Fe((Y-qe)/Qe)&&$e("overflow"),qe+=(it-Be)*Qe,Be=it,et=0;et<rt;++et)if(Je=Ge[et],Je<Be&&++qe>Y&&$e("overflow"),Je==Be){for(nt=qe,ot=K;Ze=ot<=tt?J:ot>=tt+xe?xe:ot-tt,!(nt<Ze);ot+=K)ht=nt-Ze,at=K-Ze,st.push(Oe(ze(Ze+ht%at,0))),nt=Fe(ht/at);st.push(Oe(ze(nt,0))),tt=He(qe,Qe,Ke==Ye),qe=0,++Ke}++qe,++Be}return st.join("")}function Me(Ge){return Xe(Ge,function(Be){return Re.test(Be)?De(Be.slice(4).toLowerCase()):Be})}function ke(Ge){return Xe(Ge,function(Be){return Te.test(Be)?"xn--"+Ne(Be):Be})}if(X={version:"1.4.1",ucs2:{decode:Ue,encode:We},decode:De,encode:Ne,toASCII:ke,toUnicode:Me},B&&U)if(C.exports==B)U.exports=X;else for(Le in X)X.hasOwnProperty(Le)&&(B[Le]=X[Le]);else I.punycode=X})(commonjsGlobal$1)}(punycode$1,punycode$1.exports);var punycodeExports=punycode$1.exports,shams=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var E={},I=Symbol("test"),B=Object(I);if(typeof I=="string"||Object.prototype.toString.call(I)!=="[object Symbol]"||Object.prototype.toString.call(B)!=="[object Symbol]")return!1;var U=42;E[I]=U;for(I 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 V=Object.getOwnPropertySymbols(E);if(V.length!==1||V[0]!==I||!Object.prototype.propertyIsEnumerable.call(E,I))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var X=Object.getOwnPropertyDescriptor(E,I);if(X.value!==U||X.enumerable!==!0)return!1}return!0},origSymbol=typeof Symbol<"u"&&Symbol,hasSymbolSham=shams,hasSymbols$1=function(){return typeof origSymbol!="function"||typeof Symbol!="function"||typeof origSymbol("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:hasSymbolSham()},test={foo:{}},$Object=Object,hasProto$1=function(){return{__proto__:test}.foo===test.foo&&!({__proto__:null}instanceof $Object)},ERROR_MESSAGE="Function.prototype.bind called on incompatible ",slice=Array.prototype.slice,toStr$1=Object.prototype.toString,funcType="[object Function]",implementation$1=function(E){var I=this;if(typeof I!="function"||toStr$1.call(I)!==funcType)throw new TypeError(ERROR_MESSAGE+I);for(var B=slice.call(arguments,1),U,V=function(){if(this instanceof U){var xe=I.apply(this,B.concat(slice.call(arguments)));return Object(xe)===xe?xe:this}else return I.apply(E,B.concat(slice.call(arguments)))},X=Math.max(0,I.length-B.length),Y=[],K=0;K<X;K++)Y.push("$"+K);if(U=Function("binder","return function ("+Y.join(",")+"){ return binder.apply(this,arguments); }")(V),I.prototype){var J=function(){};J.prototype=I.prototype,U.prototype=new J,J.prototype=null}return U},implementation=implementation$1,functionBind=Function.prototype.bind||implementation,bind$1=functionBind,src=bind$1.call(Function.call,Object.prototype.hasOwnProperty),undefined$1,$SyntaxError=SyntaxError,$Function=Function,$TypeError$1=TypeError,getEvalledConstructor=function(C){try{return $Function('"use strict"; return ('+C+").constructor;")()}catch{}},$gOPD=Object.getOwnPropertyDescriptor;if($gOPD)try{$gOPD({},"")}catch{$gOPD=null}var throwTypeError=function(){throw new $TypeError$1},ThrowTypeError=$gOPD?function(){try{return arguments.callee,throwTypeError}catch{try{return $gOPD(arguments,"callee").get}catch{return throwTypeError}}}():throwTypeError,hasSymbols=hasSymbols$1(),hasProto=hasProto$1(),getProto=Object.getPrototypeOf||(hasProto?function(C){return C.__proto__}:null),needsEval={},TypedArray=typeof Uint8Array>"u"||!getProto?undefined$1:getProto(Uint8Array),INTRINSICS={"%AggregateError%":typeof AggregateError>"u"?undefined$1:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?undefined$1:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined$1,"%AsyncFromSyncIteratorPrototype%":undefined$1,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics>"u"?undefined$1:Atomics,"%BigInt%":typeof BigInt>"u"?undefined$1:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?undefined$1:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?undefined$1:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?undefined$1:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?undefined$1:Float32Array,"%Float64Array%":typeof Float64Array>"u"?undefined$1:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?undefined$1:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array>"u"?undefined$1:Int8Array,"%Int16Array%":typeof Int16Array>"u"?undefined$1:Int16Array,"%Int32Array%":typeof Int32Array>"u"?undefined$1:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined$1,"%JSON%":typeof JSON=="object"?JSON:undefined$1,"%Map%":typeof Map>"u"?undefined$1:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hasSymbols||!getProto?undefined$1:getProto(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?undefined$1:Promise,"%Proxy%":typeof Proxy>"u"?undefined$1:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?undefined$1:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?undefined$1:Set,"%SetIteratorPrototype%":typeof Set>"u"||!hasSymbols||!getProto?undefined$1:getProto(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?undefined$1:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined$1,"%Symbol%":hasSymbols?Symbol:undefined$1,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError$1,"%Uint8Array%":typeof Uint8Array>"u"?undefined$1:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?undefined$1:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?undefined$1:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?undefined$1:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?undefined$1:WeakMap,"%WeakRef%":typeof WeakRef>"u"?undefined$1:WeakRef,"%WeakSet%":typeof WeakSet>"u"?undefined$1:WeakSet};if(getProto)try{null.error}catch(C){var errorProto=getProto(getProto(C));INTRINSICS["%Error.prototype%"]=errorProto}var doEval=function C(E){var I;if(E==="%AsyncFunction%")I=getEvalledConstructor("async function () {}");else if(E==="%GeneratorFunction%")I=getEvalledConstructor("function* () {}");else if(E==="%AsyncGeneratorFunction%")I=getEvalledConstructor("async function* () {}");else if(E==="%AsyncGenerator%"){var B=C("%AsyncGeneratorFunction%");B&&(I=B.prototype)}else if(E==="%AsyncIteratorPrototype%"){var U=C("%AsyncGenerator%");U&&getProto&&(I=getProto(U.prototype))}return INTRINSICS[E]=I,I},LEGACY_ALIASES={"%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"]},bind=functionBind,hasOwn$1=src,$concat$1=bind.call(Function.call,Array.prototype.concat),$spliceApply=bind.call(Function.apply,Array.prototype.splice),$replace$1=bind.call(Function.call,String.prototype.replace),$strSlice=bind.call(Function.call,String.prototype.slice),$exec=bind.call(Function.call,RegExp.prototype.exec),rePropName$1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar$1=/\\(\\)?/g,stringToPath$2=function(E){var I=$strSlice(E,0,1),B=$strSlice(E,-1);if(I==="%"&&B!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&I!=="%")throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var U=[];return $replace$1(E,rePropName$1,function(V,X,Y,K){U[U.length]=Y?$replace$1(K,reEscapeChar$1,"$1"):X||V}),U},getBaseIntrinsic=function(E,I){var B=E,U;if(hasOwn$1(LEGACY_ALIASES,B)&&(U=LEGACY_ALIASES[B],B="%"+U[0]+"%"),hasOwn$1(INTRINSICS,B)){var V=INTRINSICS[B];if(V===needsEval&&(V=doEval(B)),typeof V>"u"&&!I)throw new $TypeError$1("intrinsic "+E+" exists, but is not available. Please file an issue!");return{alias:U,name:B,value:V}}throw new $SyntaxError("intrinsic "+E+" does not exist!")},getIntrinsic=function(E,I){if(typeof E!="string"||E.length===0)throw new $TypeError$1("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof I!="boolean")throw new $TypeError$1('"allowMissing" argument must be a boolean');if($exec(/^%?[^%]*%?$/,E)===null)throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=stringToPath$2(E),U=B.length>0?B[0]:"",V=getBaseIntrinsic("%"+U+"%",I),X=V.name,Y=V.value,K=!1,J=V.alias;J&&(U=J[0],$spliceApply(B,$concat$1([0,1],J)));for(var xe=1,Z=!0;xe<B.length;xe+=1){var _e=B[xe],Se=$strSlice(_e,0,1),Ee=$strSlice(_e,-1);if((Se==='"'||Se==="'"||Se==="`"||Ee==='"'||Ee==="'"||Ee==="`")&&Se!==Ee)throw new $SyntaxError("property names with quotes must have matching quotes");if((_e==="constructor"||!Z)&&(K=!0),U+="."+_e,X="%"+U+"%",hasOwn$1(INTRINSICS,X))Y=INTRINSICS[X];else if(Y!=null){if(!(_e in Y)){if(!I)throw new $TypeError$1("base intrinsic for "+E+" exists, but the property is not available.");return}if($gOPD&&xe+1>=B.length){var Ae=$gOPD(Y,_e);Z=!!Ae,Z&&"get"in Ae&&!("originalValue"in Ae.get)?Y=Ae.get:Y=Y[_e]}else Z=hasOwn$1(Y,_e),Y=Y[_e];Z&&!K&&(INTRINSICS[X]=Y)}}return Y},callBind$1={exports:{}};(function(C){var E=functionBind,I=getIntrinsic,B=I("%Function.prototype.apply%"),U=I("%Function.prototype.call%"),V=I("%Reflect.apply%",!0)||E.call(U,B),X=I("%Object.getOwnPropertyDescriptor%",!0),Y=I("%Object.defineProperty%",!0),K=I("%Math.max%");if(Y)try{Y({},"a",{value:1})}catch{Y=null}C.exports=function(Z){var _e=V(E,U,arguments);if(X&&Y){var Se=X(_e,"length");Se.configurable&&Y(_e,"length",{value:1+K(0,Z.length-(arguments.length-1))})}return _e};var J=function(){return V(E,B,arguments)};Y?Y(C.exports,"apply",{value:J}):C.exports.apply=J})(callBind$1);var callBindExports=callBind$1.exports,GetIntrinsic$1=getIntrinsic,callBind=callBindExports,$indexOf=callBind(GetIntrinsic$1("String.prototype.indexOf")),callBound$1=function(E,I){var B=GetIntrinsic$1(E,!!I);return typeof B=="function"&&$indexOf(E,".prototype.")>-1?callBind(B):B};const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(__viteBrowserExternal$1);var hasMap=typeof Map=="function"&&Map.prototype,mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,mapSize$1=hasMap&&mapSizeDescriptor&&typeof mapSizeDescriptor.get=="function"?mapSizeDescriptor.get:null,mapForEach=hasMap&&Map.prototype.forEach,hasSet=typeof Set=="function"&&Set.prototype,setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,setSize=hasSet&&setSizeDescriptor&&typeof setSizeDescriptor.get=="function"?setSizeDescriptor.get:null,setForEach=hasSet&&Set.prototype.forEach,hasWeakMap=typeof WeakMap=="function"&&WeakMap.prototype,weakMapHas=hasWeakMap?WeakMap.prototype.has:null,hasWeakSet=typeof WeakSet=="function"&&WeakSet.prototype,weakSetHas=hasWeakSet?WeakSet.prototype.has:null,hasWeakRef=typeof WeakRef=="function"&&WeakRef.prototype,weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null,booleanValueOf=Boolean.prototype.valueOf,objectToString=Object.prototype.toString,functionToString=Function.prototype.toString,$match=String.prototype.match,$slice=String.prototype.slice,$replace=String.prototype.replace,$toUpperCase=String.prototype.toUpperCase,$toLowerCase=String.prototype.toLowerCase,$test=RegExp.prototype.test,$concat=Array.prototype.concat,$join=Array.prototype.join,$arrSlice=Array.prototype.slice,$floor=Math.floor,bigIntValueOf=typeof BigInt=="function"?BigInt.prototype.valueOf:null,gOPS=Object.getOwnPropertySymbols,symToString=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,hasShammedSymbols=typeof Symbol=="function"&&typeof Symbol.iterator=="object",toStringTag=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hasShammedSymbols||"symbol")?Symbol.toStringTag:null,isEnumerable=Object.prototype.propertyIsEnumerable,gPO=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(C){return C.__proto__}:null);function addNumericSeparator(C,E){if(C===1/0||C===-1/0||C!==C||C&&C>-1e3&&C<1e3||$test.call(/e/,E))return E;var I=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof C=="number"){var B=C<0?-$floor(-C):$floor(C);if(B!==C){var U=String(B),V=$slice.call(E,U.length+1);return $replace.call(U,I,"$&_")+"."+$replace.call($replace.call(V,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(E,I,"$&_")}var utilInspect=require$$0,inspectCustom=utilInspect.custom,inspectSymbol=isSymbol$5(inspectCustom)?inspectCustom:null,objectInspect=function C(E,I,B,U){var V=I||{};if(has$3(V,"quoteStyle")&&V.quoteStyle!=="single"&&V.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has$3(V,"maxStringLength")&&(typeof V.maxStringLength=="number"?V.maxStringLength<0&&V.maxStringLength!==1/0:V.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var X=has$3(V,"customInspect")?V.customInspect:!0;if(typeof X!="boolean"&&X!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has$3(V,"indent")&&V.indent!==null&&V.indent!==" "&&!(parseInt(V.indent,10)===V.indent&&V.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has$3(V,"numericSeparator")&&typeof V.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Y=V.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 inspectString(E,V);if(typeof E=="number"){if(E===0)return 1/0/E>0?"0":"-0";var K=String(E);return Y?addNumericSeparator(E,K):K}if(typeof E=="bigint"){var J=String(E)+"n";return Y?addNumericSeparator(E,J):J}var xe=typeof V.depth>"u"?5:V.depth;if(typeof B>"u"&&(B=0),B>=xe&&xe>0&&typeof E=="object")return isArray$9(E)?"[Array]":"[Object]";var Z=getIndent(V,B);if(typeof U>"u")U=[];else if(indexOf(U,E)>=0)return"[Circular]";function _e(je,ze,He){if(ze&&(U=$arrSlice.call(U),U.push(ze)),He){var De={depth:V.depth};return has$3(V,"quoteStyle")&&(De.quoteStyle=V.quoteStyle),C(je,De,B+1,U)}return C(je,V,B+1,U)}if(typeof E=="function"&&!isRegExp$1(E)){var Se=nameOf(E),Ee=arrObjKeys(E,_e);return"[Function"+(Se?": "+Se:" (anonymous)")+"]"+(Ee.length>0?" { "+$join.call(Ee,", ")+" }":"")}if(isSymbol$5(E)){var Ae=hasShammedSymbols?$replace.call(String(E),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(E);return typeof E=="object"&&!hasShammedSymbols?markBoxed(Ae):Ae}if(isElement(E)){for(var Re="<"+$toLowerCase.call(String(E.nodeName)),Te=E.attributes||[],we=0;we<Te.length;we++)Re+=" "+Te[we].name+"="+wrapQuotes(quote(Te[we].value),"double",V);return Re+=">",E.childNodes&&E.childNodes.length&&(Re+="..."),Re+="</"+$toLowerCase.call(String(E.nodeName))+">",Re}if(isArray$9(E)){if(E.length===0)return"[]";var Pe=arrObjKeys(E,_e);return Z&&!singleLineValues(Pe)?"["+indentedJoin(Pe,Z)+"]":"[ "+$join.call(Pe,", ")+" ]"}if(isError(E)){var Ie=arrObjKeys(E,_e);return!("cause"in Error.prototype)&&"cause"in E&&!isEnumerable.call(E,"cause")?"{ ["+String(E)+"] "+$join.call($concat.call("[cause]: "+_e(E.cause),Ie),", ")+" }":Ie.length===0?"["+String(E)+"]":"{ ["+String(E)+"] "+$join.call(Ie,", ")+" }"}if(typeof E=="object"&&X){if(inspectSymbol&&typeof E[inspectSymbol]=="function"&&utilInspect)return utilInspect(E,{depth:xe-B});if(X!=="symbol"&&typeof E.inspect=="function")return E.inspect()}if(isMap(E)){var Fe=[];return mapForEach&&mapForEach.call(E,function(je,ze){Fe.push(_e(ze,E,!0)+" => "+_e(je,E))}),collectionOf("Map",mapSize$1.call(E),Fe,Z)}if(isSet(E)){var Oe=[];return setForEach&&setForEach.call(E,function(je){Oe.push(_e(je,E))}),collectionOf("Set",setSize.call(E),Oe,Z)}if(isWeakMap(E))return weakCollectionOf("WeakMap");if(isWeakSet(E))return weakCollectionOf("WeakSet");if(isWeakRef(E))return weakCollectionOf("WeakRef");if(isNumber(E))return markBoxed(_e(Number(E)));if(isBigInt(E))return markBoxed(_e(bigIntValueOf.call(E)));if(isBoolean(E))return markBoxed(booleanValueOf.call(E));if(isString(E))return markBoxed(_e(String(E)));if(!isDate(E)&&!isRegExp$1(E)){var Le=arrObjKeys(E,_e),$e=gPO?gPO(E)===Object.prototype:E instanceof Object||E.constructor===Object,Ve=E instanceof Object?"":"null prototype",Xe=!$e&&toStringTag&&Object(E)===E&&toStringTag in E?$slice.call(toStr(E),8,-1):Ve?"Object":"",Ue=$e||typeof E.constructor!="function"?"":E.constructor.name?E.constructor.name+" ":"",We=Ue+(Xe||Ve?"["+$join.call($concat.call([],Xe||[],Ve||[]),": ")+"] ":"");return Le.length===0?We+"{}":Z?We+"{"+indentedJoin(Le,Z)+"}":We+"{ "+$join.call(Le,", ")+" }"}return String(E)};function wrapQuotes(C,E,I){var B=(I.quoteStyle||E)==="double"?'"':"'";return B+C+B}function quote(C){return $replace.call(String(C),/"/g,"&quot;")}function isArray$9(C){return toStr(C)==="[object Array]"&&(!toStringTag||!(typeof C=="object"&&toStringTag in C))}function isDate(C){return toStr(C)==="[object Date]"&&(!toStringTag||!(typeof C=="object"&&toStringTag in C))}function isRegExp$1(C){return toStr(C)==="[object RegExp]"&&(!toStringTag||!(typeof C=="object"&&toStringTag in C))}function isError(C){return toStr(C)==="[object Error]"&&(!toStringTag||!(typeof C=="object"&&toStringTag in C))}function isString(C){return toStr(C)==="[object String]"&&(!toStringTag||!(typeof C=="object"&&toStringTag in C))}function isNumber(C){return toStr(C)==="[object Number]"&&(!toStringTag||!(typeof C=="object"&&toStringTag in C))}function isBoolean(C){return toStr(C)==="[object Boolean]"&&(!toStringTag||!(typeof C=="object"&&toStringTag in C))}function isSymbol$5(C){if(hasShammedSymbols)return C&&typeof C=="object"&&C instanceof Symbol;if(typeof C=="symbol")return!0;if(!C||typeof C!="object"||!symToString)return!1;try{return symToString.call(C),!0}catch{}return!1}function isBigInt(C){if(!C||typeof C!="object"||!bigIntValueOf)return!1;try{return bigIntValueOf.call(C),!0}catch{}return!1}var hasOwn=Object.prototype.hasOwnProperty||function(C){return C in this};function has$3(C,E){return hasOwn.call(C,E)}function toStr(C){return objectToString.call(C)}function nameOf(C){if(C.name)return C.name;var E=$match.call(functionToString.call(C),/^function\s*([\w$]+)/);return E?E[1]:null}function indexOf(C,E){if(C.indexOf)return C.indexOf(E);for(var I=0,B=C.length;I<B;I++)if(C[I]===E)return I;return-1}function isMap(C){if(!mapSize$1||!C||typeof C!="object")return!1;try{mapSize$1.call(C);try{setSize.call(C)}catch{return!0}return C instanceof Map}catch{}return!1}function isWeakMap(C){if(!weakMapHas||!C||typeof C!="object")return!1;try{weakMapHas.call(C,weakMapHas);try{weakSetHas.call(C,weakSetHas)}catch{return!0}return C instanceof WeakMap}catch{}return!1}function isWeakRef(C){if(!weakRefDeref||!C||typeof C!="object")return!1;try{return weakRefDeref.call(C),!0}catch{}return!1}function isSet(C){if(!setSize||!C||typeof C!="object")return!1;try{setSize.call(C);try{mapSize$1.call(C)}catch{return!0}return C instanceof Set}catch{}return!1}function isWeakSet(C){if(!weakSetHas||!C||typeof C!="object")return!1;try{weakSetHas.call(C,weakSetHas);try{weakMapHas.call(C,weakMapHas)}catch{return!0}return C instanceof WeakSet}catch{}return!1}function isElement(C){return!C||typeof C!="object"?!1:typeof HTMLElement<"u"&&C instanceof HTMLElement?!0:typeof C.nodeName=="string"&&typeof C.getAttribute=="function"}function inspectString(C,E){if(C.length>E.maxStringLength){var I=C.length-E.maxStringLength,B="... "+I+" more character"+(I>1?"s":"");return inspectString($slice.call(C,0,E.maxStringLength),E)+B}var U=$replace.call($replace.call(C,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lowbyte);return wrapQuotes(U,"single",E)}function lowbyte(C){var E=C.charCodeAt(0),I={8:"b",9:"t",10:"n",12:"f",13:"r"}[E];return I?"\\"+I:"\\x"+(E<16?"0":"")+$toUpperCase.call(E.toString(16))}function markBoxed(C){return"Object("+C+")"}function weakCollectionOf(C){return C+" { ? }"}function collectionOf(C,E,I,B){var U=B?indentedJoin(I,B):$join.call(I,", ");return C+" ("+E+") {"+U+"}"}function singleLineValues(C){for(var E=0;E<C.length;E++)if(indexOf(C[E],`
34
+ `)>=0)return!1;return!0}function getIndent(C,E){var I;if(C.indent===" ")I=" ";else if(typeof C.indent=="number"&&C.indent>0)I=$join.call(Array(C.indent+1)," ");else return null;return{base:I,prev:$join.call(Array(E+1),I)}}function indentedJoin(C,E){if(C.length===0)return"";var I=`
35
+ `+E.prev+E.base;return I+$join.call(C,","+I)+`
36
+ `+E.prev}function arrObjKeys(C,E){var I=isArray$9(C),B=[];if(I){B.length=C.length;for(var U=0;U<C.length;U++)B[U]=has$3(C,U)?E(C[U],C):""}var V=typeof gOPS=="function"?gOPS(C):[],X;if(hasShammedSymbols){X={};for(var Y=0;Y<V.length;Y++)X["$"+V[Y]]=V[Y]}for(var K in C)has$3(C,K)&&(I&&String(Number(K))===K&&K<C.length||hasShammedSymbols&&X["$"+K]instanceof Symbol||($test.call(/[^\w$]/,K)?B.push(E(K,C)+": "+E(C[K],C)):B.push(K+": "+E(C[K],C))));if(typeof gOPS=="function")for(var J=0;J<V.length;J++)isEnumerable.call(C,V[J])&&B.push("["+E(V[J])+"]: "+E(C[V[J]],C));return B}var GetIntrinsic=getIntrinsic,callBound=callBound$1,inspect=objectInspect,$TypeError=GetIntrinsic("%TypeError%"),$WeakMap=GetIntrinsic("%WeakMap%",!0),$Map=GetIntrinsic("%Map%",!0),$weakMapGet=callBound("WeakMap.prototype.get",!0),$weakMapSet=callBound("WeakMap.prototype.set",!0),$weakMapHas=callBound("WeakMap.prototype.has",!0),$mapGet=callBound("Map.prototype.get",!0),$mapSet=callBound("Map.prototype.set",!0),$mapHas=callBound("Map.prototype.has",!0),listGetNode=function(C,E){for(var I=C,B;(B=I.next)!==null;I=B)if(B.key===E)return I.next=B.next,B.next=C.next,C.next=B,B},listGet=function(C,E){var I=listGetNode(C,E);return I&&I.value},listSet=function(C,E,I){var B=listGetNode(C,E);B?B.value=I:C.next={key:E,next:C.next,value:I}},listHas=function(C,E){return!!listGetNode(C,E)},sideChannel=function(){var E,I,B,U={assert:function(V){if(!U.has(V))throw new $TypeError("Side channel does not contain "+inspect(V))},get:function(V){if($WeakMap&&V&&(typeof V=="object"||typeof V=="function")){if(E)return $weakMapGet(E,V)}else if($Map){if(I)return $mapGet(I,V)}else if(B)return listGet(B,V)},has:function(V){if($WeakMap&&V&&(typeof V=="object"||typeof V=="function")){if(E)return $weakMapHas(E,V)}else if($Map){if(I)return $mapHas(I,V)}else if(B)return listHas(B,V);return!1},set:function(V,X){$WeakMap&&V&&(typeof V=="object"||typeof V=="function")?(E||(E=new $WeakMap),$weakMapSet(E,V,X)):$Map?(I||(I=new $Map),$mapSet(I,V,X)):(B||(B={key:{},next:null}),listSet(B,V,X))}};return U},replace=String.prototype.replace,percentTwenties=/%20/g,Format={RFC1738:"RFC1738",RFC3986:"RFC3986"},formats$3={default:Format.RFC3986,formatters:{RFC1738:function(C){return replace.call(C,percentTwenties,"+")},RFC3986:function(C){return String(C)}},RFC1738:Format.RFC1738,RFC3986:Format.RFC3986},formats$2=formats$3,has$2=Object.prototype.hasOwnProperty,isArray$8=Array.isArray,hexTable=function(){for(var C=[],E=0;E<256;++E)C.push("%"+((E<16?"0":"")+E.toString(16)).toUpperCase());return C}(),compactQueue=function(E){for(;E.length>1;){var I=E.pop(),B=I.obj[I.prop];if(isArray$8(B)){for(var U=[],V=0;V<B.length;++V)typeof B[V]<"u"&&U.push(B[V]);I.obj[I.prop]=U}}},arrayToObject=function(E,I){for(var B=I&&I.plainObjects?Object.create(null):{},U=0;U<E.length;++U)typeof E[U]<"u"&&(B[U]=E[U]);return B},merge=function C(E,I,B){if(!I)return E;if(typeof I!="object"){if(isArray$8(E))E.push(I);else if(E&&typeof E=="object")(B&&(B.plainObjects||B.allowPrototypes)||!has$2.call(Object.prototype,I))&&(E[I]=!0);else return[E,I];return E}if(!E||typeof E!="object")return[E].concat(I);var U=E;return isArray$8(E)&&!isArray$8(I)&&(U=arrayToObject(E,B)),isArray$8(E)&&isArray$8(I)?(I.forEach(function(V,X){if(has$2.call(E,X)){var Y=E[X];Y&&typeof Y=="object"&&V&&typeof V=="object"?E[X]=C(Y,V,B):E.push(V)}else E[X]=V}),E):Object.keys(I).reduce(function(V,X){var Y=I[X];return has$2.call(V,X)?V[X]=C(V[X],Y,B):V[X]=Y,V},U)},assign=function(E,I){return Object.keys(I).reduce(function(B,U){return B[U]=I[U],B},E)},decode=function(C,E,I){var B=C.replace(/\+/g," ");if(I==="iso-8859-1")return B.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(B)}catch{return B}},encode=function(E,I,B,U,V){if(E.length===0)return E;var X=E;if(typeof E=="symbol"?X=Symbol.prototype.toString.call(E):typeof E!="string"&&(X=String(E)),B==="iso-8859-1")return escape(X).replace(/%u[0-9a-f]{4}/gi,function(xe){return"%26%23"+parseInt(xe.slice(2),16)+"%3B"});for(var Y="",K=0;K<X.length;++K){var J=X.charCodeAt(K);if(J===45||J===46||J===95||J===126||J>=48&&J<=57||J>=65&&J<=90||J>=97&&J<=122||V===formats$2.RFC1738&&(J===40||J===41)){Y+=X.charAt(K);continue}if(J<128){Y=Y+hexTable[J];continue}if(J<2048){Y=Y+(hexTable[192|J>>6]+hexTable[128|J&63]);continue}if(J<55296||J>=57344){Y=Y+(hexTable[224|J>>12]+hexTable[128|J>>6&63]+hexTable[128|J&63]);continue}K+=1,J=65536+((J&1023)<<10|X.charCodeAt(K)&1023),Y+=hexTable[240|J>>18]+hexTable[128|J>>12&63]+hexTable[128|J>>6&63]+hexTable[128|J&63]}return Y},compact=function(E){for(var I=[{obj:{o:E},prop:"o"}],B=[],U=0;U<I.length;++U)for(var V=I[U],X=V.obj[V.prop],Y=Object.keys(X),K=0;K<Y.length;++K){var J=Y[K],xe=X[J];typeof xe=="object"&&xe!==null&&B.indexOf(xe)===-1&&(I.push({obj:X,prop:J}),B.push(xe))}return compactQueue(I),E},isRegExp=function(E){return Object.prototype.toString.call(E)==="[object RegExp]"},isBuffer=function(E){return!E||typeof E!="object"?!1:!!(E.constructor&&E.constructor.isBuffer&&E.constructor.isBuffer(E))},combine$1=function(E,I){return[].concat(E,I)},maybeMap=function(E,I){if(isArray$8(E)){for(var B=[],U=0;U<E.length;U+=1)B.push(I(E[U]));return B}return I(E)},utils$2={arrayToObject,assign,combine:combine$1,compact,decode,encode,isBuffer,isRegExp,maybeMap,merge},getSideChannel=sideChannel,utils$1=utils$2,formats$1=formats$3,has$1=Object.prototype.hasOwnProperty,arrayPrefixGenerators={brackets:function(E){return E+"[]"},comma:"comma",indices:function(E,I){return E+"["+I+"]"},repeat:function(E){return E}},isArray$7=Array.isArray,push=Array.prototype.push,pushToArray=function(C,E){push.apply(C,isArray$7(E)?E:[E])},toISO=Date.prototype.toISOString,defaultFormat=formats$1.default,defaults$1={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:utils$1.encode,encodeValuesOnly:!1,format:defaultFormat,formatter:formats$1.formatters[defaultFormat],indices:!1,serializeDate:function(E){return toISO.call(E)},skipNulls:!1,strictNullHandling:!1},isNonNullishPrimitive=function(E){return typeof E=="string"||typeof E=="number"||typeof E=="boolean"||typeof E=="symbol"||typeof E=="bigint"},sentinel={},stringify$1=function C(E,I,B,U,V,X,Y,K,J,xe,Z,_e,Se,Ee,Ae,Re){for(var Te=E,we=Re,Pe=0,Ie=!1;(we=we.get(sentinel))!==void 0&&!Ie;){var Fe=we.get(E);if(Pe+=1,typeof Fe<"u"){if(Fe===Pe)throw new RangeError("Cyclic object value");Ie=!0}typeof we.get(sentinel)>"u"&&(Pe=0)}if(typeof K=="function"?Te=K(I,Te):Te instanceof Date?Te=Z(Te):B==="comma"&&isArray$7(Te)&&(Te=utils$1.maybeMap(Te,function(De){return De instanceof Date?Z(De):De})),Te===null){if(V)return Y&&!Ee?Y(I,defaults$1.encoder,Ae,"key",_e):I;Te=""}if(isNonNullishPrimitive(Te)||utils$1.isBuffer(Te)){if(Y){var Oe=Ee?I:Y(I,defaults$1.encoder,Ae,"key",_e);return[Se(Oe)+"="+Se(Y(Te,defaults$1.encoder,Ae,"value",_e))]}return[Se(I)+"="+Se(String(Te))]}var Le=[];if(typeof Te>"u")return Le;var $e;if(B==="comma"&&isArray$7(Te))Ee&&Y&&(Te=utils$1.maybeMap(Te,Y)),$e=[{value:Te.length>0?Te.join(",")||null:void 0}];else if(isArray$7(K))$e=K;else{var Ve=Object.keys(Te);$e=J?Ve.sort(J):Ve}for(var Xe=U&&isArray$7(Te)&&Te.length===1?I+"[]":I,Ue=0;Ue<$e.length;++Ue){var We=$e[Ue],je=typeof We=="object"&&typeof We.value<"u"?We.value:Te[We];if(!(X&&je===null)){var ze=isArray$7(Te)?typeof B=="function"?B(Xe,We):Xe:Xe+(xe?"."+We:"["+We+"]");Re.set(E,Pe);var He=getSideChannel();He.set(sentinel,Re),pushToArray(Le,C(je,ze,B,U,V,X,B==="comma"&&Ee&&isArray$7(Te)?null:Y,K,J,xe,Z,_e,Se,Ee,Ae,He))}}return Le},normalizeStringifyOptions=function(E){if(!E)return defaults$1;if(E.encoder!==null&&typeof E.encoder<"u"&&typeof E.encoder!="function")throw new TypeError("Encoder has to be a function.");var I=E.charset||defaults$1.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 B=formats$1.default;if(typeof E.format<"u"){if(!has$1.call(formats$1.formatters,E.format))throw new TypeError("Unknown format option provided.");B=E.format}var U=formats$1.formatters[B],V=defaults$1.filter;return(typeof E.filter=="function"||isArray$7(E.filter))&&(V=E.filter),{addQueryPrefix:typeof E.addQueryPrefix=="boolean"?E.addQueryPrefix:defaults$1.addQueryPrefix,allowDots:typeof E.allowDots>"u"?defaults$1.allowDots:!!E.allowDots,charset:I,charsetSentinel:typeof E.charsetSentinel=="boolean"?E.charsetSentinel:defaults$1.charsetSentinel,delimiter:typeof E.delimiter>"u"?defaults$1.delimiter:E.delimiter,encode:typeof E.encode=="boolean"?E.encode:defaults$1.encode,encoder:typeof E.encoder=="function"?E.encoder:defaults$1.encoder,encodeValuesOnly:typeof E.encodeValuesOnly=="boolean"?E.encodeValuesOnly:defaults$1.encodeValuesOnly,filter:V,format:B,formatter:U,serializeDate:typeof E.serializeDate=="function"?E.serializeDate:defaults$1.serializeDate,skipNulls:typeof E.skipNulls=="boolean"?E.skipNulls:defaults$1.skipNulls,sort:typeof E.sort=="function"?E.sort:null,strictNullHandling:typeof E.strictNullHandling=="boolean"?E.strictNullHandling:defaults$1.strictNullHandling}},stringify_1=function(C,E){var I=C,B=normalizeStringifyOptions(E),U,V;typeof B.filter=="function"?(V=B.filter,I=V("",I)):isArray$7(B.filter)&&(V=B.filter,U=V);var X=[];if(typeof I!="object"||I===null)return"";var Y;E&&E.arrayFormat in arrayPrefixGenerators?Y=E.arrayFormat:E&&"indices"in E?Y=E.indices?"indices":"repeat":Y="indices";var K=arrayPrefixGenerators[Y];if(E&&"commaRoundTrip"in E&&typeof E.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var J=K==="comma"&&E&&E.commaRoundTrip;U||(U=Object.keys(I)),B.sort&&U.sort(B.sort);for(var xe=getSideChannel(),Z=0;Z<U.length;++Z){var _e=U[Z];B.skipNulls&&I[_e]===null||pushToArray(X,stringify$1(I[_e],_e,K,J,B.strictNullHandling,B.skipNulls,B.encode?B.encoder:null,B.filter,B.sort,B.allowDots,B.serializeDate,B.format,B.formatter,B.encodeValuesOnly,B.charset,xe))}var Se=X.join(B.delimiter),Ee=B.addQueryPrefix===!0?"?":"";return B.charsetSentinel&&(B.charset==="iso-8859-1"?Ee+="utf8=%26%2310003%3B&":Ee+="utf8=%E2%9C%93&"),Se.length>0?Ee+Se:""},utils=utils$2,has=Object.prototype.hasOwnProperty,isArray$6=Array.isArray,defaults={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:utils.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},interpretNumericEntities=function(C){return C.replace(/&#(\d+);/g,function(E,I){return String.fromCharCode(parseInt(I,10))})},parseArrayValue=function(C,E){return C&&typeof C=="string"&&E.comma&&C.indexOf(",")>-1?C.split(","):C},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function(E,I){var B={__proto__:null},U=I.ignoreQueryPrefix?E.replace(/^\?/,""):E,V=I.parameterLimit===1/0?void 0:I.parameterLimit,X=U.split(I.delimiter,V),Y=-1,K,J=I.charset;if(I.charsetSentinel)for(K=0;K<X.length;++K)X[K].indexOf("utf8=")===0&&(X[K]===charsetSentinel?J="utf-8":X[K]===isoSentinel&&(J="iso-8859-1"),Y=K,K=X.length);for(K=0;K<X.length;++K)if(K!==Y){var xe=X[K],Z=xe.indexOf("]="),_e=Z===-1?xe.indexOf("="):Z+1,Se,Ee;_e===-1?(Se=I.decoder(xe,defaults.decoder,J,"key"),Ee=I.strictNullHandling?null:""):(Se=I.decoder(xe.slice(0,_e),defaults.decoder,J,"key"),Ee=utils.maybeMap(parseArrayValue(xe.slice(_e+1),I),function(Ae){return I.decoder(Ae,defaults.decoder,J,"value")})),Ee&&I.interpretNumericEntities&&J==="iso-8859-1"&&(Ee=interpretNumericEntities(Ee)),xe.indexOf("[]=")>-1&&(Ee=isArray$6(Ee)?[Ee]:Ee),has.call(B,Se)?B[Se]=utils.combine(B[Se],Ee):B[Se]=Ee}return B},parseObject=function(C,E,I,B){for(var U=B?E:parseArrayValue(E,I),V=C.length-1;V>=0;--V){var X,Y=C[V];if(Y==="[]"&&I.parseArrays)X=[].concat(U);else{X=I.plainObjects?Object.create(null):{};var K=Y.charAt(0)==="["&&Y.charAt(Y.length-1)==="]"?Y.slice(1,-1):Y,J=parseInt(K,10);!I.parseArrays&&K===""?X={0:U}:!isNaN(J)&&Y!==K&&String(J)===K&&J>=0&&I.parseArrays&&J<=I.arrayLimit?(X=[],X[J]=U):K!=="__proto__"&&(X[K]=U)}U=X}return U},parseKeys=function(E,I,B,U){if(E){var V=B.allowDots?E.replace(/\.([^.[]+)/g,"[$1]"):E,X=/(\[[^[\]]*])/,Y=/(\[[^[\]]*])/g,K=B.depth>0&&X.exec(V),J=K?V.slice(0,K.index):V,xe=[];if(J){if(!B.plainObjects&&has.call(Object.prototype,J)&&!B.allowPrototypes)return;xe.push(J)}for(var Z=0;B.depth>0&&(K=Y.exec(V))!==null&&Z<B.depth;){if(Z+=1,!B.plainObjects&&has.call(Object.prototype,K[1].slice(1,-1))&&!B.allowPrototypes)return;xe.push(K[1])}return K&&xe.push("["+V.slice(K.index)+"]"),parseObject(xe,I,B,U)}},normalizeParseOptions=function(E){if(!E)return defaults;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 I=typeof E.charset>"u"?defaults.charset:E.charset;return{allowDots:typeof E.allowDots>"u"?defaults.allowDots:!!E.allowDots,allowPrototypes:typeof E.allowPrototypes=="boolean"?E.allowPrototypes:defaults.allowPrototypes,allowSparse:typeof E.allowSparse=="boolean"?E.allowSparse:defaults.allowSparse,arrayLimit:typeof E.arrayLimit=="number"?E.arrayLimit:defaults.arrayLimit,charset:I,charsetSentinel:typeof E.charsetSentinel=="boolean"?E.charsetSentinel:defaults.charsetSentinel,comma:typeof E.comma=="boolean"?E.comma:defaults.comma,decoder:typeof E.decoder=="function"?E.decoder:defaults.decoder,delimiter:typeof E.delimiter=="string"||utils.isRegExp(E.delimiter)?E.delimiter:defaults.delimiter,depth:typeof E.depth=="number"||E.depth===!1?+E.depth:defaults.depth,ignoreQueryPrefix:E.ignoreQueryPrefix===!0,interpretNumericEntities:typeof E.interpretNumericEntities=="boolean"?E.interpretNumericEntities:defaults.interpretNumericEntities,parameterLimit:typeof E.parameterLimit=="number"?E.parameterLimit:defaults.parameterLimit,parseArrays:E.parseArrays!==!1,plainObjects:typeof E.plainObjects=="boolean"?E.plainObjects:defaults.plainObjects,strictNullHandling:typeof E.strictNullHandling=="boolean"?E.strictNullHandling:defaults.strictNullHandling}},parse$3=function(C,E){var I=normalizeParseOptions(E);if(C===""||C===null||typeof C>"u")return I.plainObjects?Object.create(null):{};for(var B=typeof C=="string"?parseValues(C,I):C,U=I.plainObjects?Object.create(null):{},V=Object.keys(B),X=0;X<V.length;++X){var Y=V[X],K=parseKeys(Y,B[Y],I,typeof C=="string");U=utils.merge(U,K,I)}return I.allowSparse===!0?U:utils.compact(U)},stringify=stringify_1,parse$2=parse$3,formats=formats$3,lib$2={formats,parse:parse$2,stringify},punycode=punycodeExports;function Url(){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 protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r",`
37
+ `," "],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=lib$2;function urlParse(C,E,I){if(C&&typeof C=="object"&&C instanceof Url)return C;var B=new Url;return B.parse(C,E,I),B}Url.prototype.parse=function(C,E,I){if(typeof C!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof C);var B=C.indexOf("?"),U=B!==-1&&B<C.indexOf("#")?"?":"#",V=C.split(U),X=/\\/g;V[0]=V[0].replace(X,"/"),C=V.join(U);var Y=C;if(Y=Y.trim(),!I&&C.split("#").length===1){var K=simplePathPattern.exec(Y);if(K)return this.path=Y,this.href=Y,this.pathname=K[1],K[2]?(this.search=K[2],E?this.query=querystring.parse(this.search.substr(1)):this.query=this.search.substr(1)):E&&(this.search="",this.query={}),this}var J=protocolPattern.exec(Y);if(J){J=J[0];var xe=J.toLowerCase();this.protocol=xe,Y=Y.substr(J.length)}if(I||J||Y.match(/^\/\/[^@/]+@[^@/]+/)){var Z=Y.substr(0,2)==="//";Z&&!(J&&hostlessProtocol[J])&&(Y=Y.substr(2),this.slashes=!0)}if(!hostlessProtocol[J]&&(Z||J&&!slashedProtocol[J])){for(var _e=-1,Se=0;Se<hostEndingChars.length;Se++){var Ee=Y.indexOf(hostEndingChars[Se]);Ee!==-1&&(_e===-1||Ee<_e)&&(_e=Ee)}var Ae,Re;_e===-1?Re=Y.lastIndexOf("@"):Re=Y.lastIndexOf("@",_e),Re!==-1&&(Ae=Y.slice(0,Re),Y=Y.slice(Re+1),this.auth=decodeURIComponent(Ae)),_e=-1;for(var Se=0;Se<nonHostChars.length;Se++){var Ee=Y.indexOf(nonHostChars[Se]);Ee!==-1&&(_e===-1||Ee<_e)&&(_e=Ee)}_e===-1&&(_e=Y.length),this.host=Y.slice(0,_e),Y=Y.slice(_e),this.parseHost(),this.hostname=this.hostname||"";var Te=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!Te)for(var we=this.hostname.split(/\./),Se=0,Pe=we.length;Se<Pe;Se++){var Ie=we[Se];if(Ie&&!Ie.match(hostnamePartPattern)){for(var Fe="",Oe=0,Le=Ie.length;Oe<Le;Oe++)Ie.charCodeAt(Oe)>127?Fe+="x":Fe+=Ie[Oe];if(!Fe.match(hostnamePartPattern)){var $e=we.slice(0,Se),Ve=we.slice(Se+1),Xe=Ie.match(hostnamePartStart);Xe&&($e.push(Xe[1]),Ve.unshift(Xe[2])),Ve.length&&(Y="/"+Ve.join(".")+Y),this.hostname=$e.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),Te||(this.hostname=punycode.toASCII(this.hostname));var Ue=this.port?":"+this.port:"",We=this.hostname||"";this.host=We+Ue,this.href+=this.host,Te&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),Y[0]!=="/"&&(Y="/"+Y))}if(!unsafeProtocol[xe])for(var Se=0,Pe=autoEscape.length;Se<Pe;Se++){var je=autoEscape[Se];if(Y.indexOf(je)!==-1){var ze=encodeURIComponent(je);ze===je&&(ze=escape(je)),Y=Y.split(je).join(ze)}}var He=Y.indexOf("#");He!==-1&&(this.hash=Y.substr(He),Y=Y.slice(0,He));var De=Y.indexOf("?");if(De!==-1?(this.search=Y.substr(De),this.query=Y.substr(De+1),E&&(this.query=querystring.parse(this.query)),Y=Y.slice(0,De)):E&&(this.search="",this.query={}),Y&&(this.pathname=Y),slashedProtocol[xe]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Ue=this.pathname||"",Ne=this.search||"";this.path=Ue+Ne}return this.href=this.format(),this};function urlFormat(C){return typeof C=="string"&&(C=urlParse(C)),C instanceof Url?C.format():Url.prototype.format.call(C)}Url.prototype.format=function(){var C=this.auth||"";C&&(C=encodeURIComponent(C),C=C.replace(/%3A/i,":"),C+="@");var E=this.protocol||"",I=this.pathname||"",B=this.hash||"",U=!1,V="";this.host?U=C+this.host:this.hostname&&(U=C+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(U+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(V=querystring.stringify(this.query));var X=this.search||V&&"?"+V||"";return E&&E.substr(-1)!==":"&&(E+=":"),this.slashes||(!E||slashedProtocol[E])&&U!==!1?(U="//"+(U||""),I&&I.charAt(0)!=="/"&&(I="/"+I)):U||(U=""),B&&B.charAt(0)!=="#"&&(B="#"+B),X&&X.charAt(0)!=="?"&&(X="?"+X),I=I.replace(/[?#]/g,function(Y){return encodeURIComponent(Y)}),X=X.replace("#","%23"),E+U+I+X+B};function urlResolve(C,E){return urlParse(C,!1,!0).resolve(E)}Url.prototype.resolve=function(C){return this.resolveObject(urlParse(C,!1,!0)).format()},Url.prototype.resolveObject=function(C){if(typeof C=="string"){var E=new Url;E.parse(C,!1,!0),C=E}for(var I=new Url,B=Object.keys(this),U=0;U<B.length;U++){var V=B[U];I[V]=this[V]}if(I.hash=C.hash,C.href==="")return I.href=I.format(),I;if(C.slashes&&!C.protocol){for(var X=Object.keys(C),Y=0;Y<X.length;Y++){var K=X[Y];K!=="protocol"&&(I[K]=C[K])}return slashedProtocol[I.protocol]&&I.hostname&&!I.pathname&&(I.pathname="/",I.path=I.pathname),I.href=I.format(),I}if(C.protocol&&C.protocol!==I.protocol){if(!slashedProtocol[C.protocol]){for(var J=Object.keys(C),xe=0;xe<J.length;xe++){var Z=J[xe];I[Z]=C[Z]}return I.href=I.format(),I}if(I.protocol=C.protocol,!C.host&&!hostlessProtocol[C.protocol]){for(var Pe=(C.pathname||"").split("/");Pe.length&&!(C.host=Pe.shift()););C.host||(C.host=""),C.hostname||(C.hostname=""),Pe[0]!==""&&Pe.unshift(""),Pe.length<2&&Pe.unshift(""),I.pathname=Pe.join("/")}else I.pathname=C.pathname;if(I.search=C.search,I.query=C.query,I.host=C.host||"",I.auth=C.auth,I.hostname=C.hostname||C.host,I.port=C.port,I.pathname||I.search){var _e=I.pathname||"",Se=I.search||"";I.path=_e+Se}return I.slashes=I.slashes||C.slashes,I.href=I.format(),I}var Ee=I.pathname&&I.pathname.charAt(0)==="/",Ae=C.host||C.pathname&&C.pathname.charAt(0)==="/",Re=Ae||Ee||I.host&&C.pathname,Te=Re,we=I.pathname&&I.pathname.split("/")||[],Pe=C.pathname&&C.pathname.split("/")||[],Ie=I.protocol&&!slashedProtocol[I.protocol];if(Ie&&(I.hostname="",I.port=null,I.host&&(we[0]===""?we[0]=I.host:we.unshift(I.host)),I.host="",C.protocol&&(C.hostname=null,C.port=null,C.host&&(Pe[0]===""?Pe[0]=C.host:Pe.unshift(C.host)),C.host=null),Re=Re&&(Pe[0]===""||we[0]==="")),Ae)I.host=C.host||C.host===""?C.host:I.host,I.hostname=C.hostname||C.hostname===""?C.hostname:I.hostname,I.search=C.search,I.query=C.query,we=Pe;else if(Pe.length)we||(we=[]),we.pop(),we=we.concat(Pe),I.search=C.search,I.query=C.query;else if(C.search!=null){if(Ie){I.host=we.shift(),I.hostname=I.host;var Fe=I.host&&I.host.indexOf("@")>0?I.host.split("@"):!1;Fe&&(I.auth=Fe.shift(),I.hostname=Fe.shift(),I.host=I.hostname)}return I.search=C.search,I.query=C.query,(I.pathname!==null||I.search!==null)&&(I.path=(I.pathname?I.pathname:"")+(I.search?I.search:"")),I.href=I.format(),I}if(!we.length)return I.pathname=null,I.search?I.path="/"+I.search:I.path=null,I.href=I.format(),I;for(var Oe=we.slice(-1)[0],Le=(I.host||C.host||we.length>1)&&(Oe==="."||Oe==="..")||Oe==="",$e=0,Ve=we.length;Ve>=0;Ve--)Oe=we[Ve],Oe==="."?we.splice(Ve,1):Oe===".."?(we.splice(Ve,1),$e++):$e&&(we.splice(Ve,1),$e--);if(!Re&&!Te)for(;$e--;$e)we.unshift("..");Re&&we[0]!==""&&(!we[0]||we[0].charAt(0)!=="/")&&we.unshift(""),Le&&we.join("/").substr(-1)!=="/"&&we.push("");var Xe=we[0]===""||we[0]&&we[0].charAt(0)==="/";if(Ie){I.hostname=Xe?"":we.length?we.shift():"",I.host=I.hostname;var Fe=I.host&&I.host.indexOf("@")>0?I.host.split("@"):!1;Fe&&(I.auth=Fe.shift(),I.hostname=Fe.shift(),I.host=I.hostname)}return Re=Re||I.host&&we.length,Re&&!Xe&&we.unshift(""),we.length>0?I.pathname=we.join("/"):(I.pathname=null,I.path=null),(I.pathname!==null||I.search!==null)&&(I.path=(I.pathname?I.pathname:"")+(I.search?I.search:"")),I.auth=C.auth||I.auth,I.slashes=I.slashes||C.slashes,I.href=I.format(),I},Url.prototype.parseHost=function(){var C=this.host,E=portPattern.exec(C);E&&(E=E[0],E!==":"&&(this.port=E.substr(1)),C=C.substr(0,C.length-E.length)),C&&(this.hostname=C)};var parse$1=urlParse,resolve=urlResolve,format=urlFormat;const url={parse:parse$1,format,resolve},warnings={};function deprecation(C,E,I=3){if(warnings[E])return;let B=new Error().stack;typeof B>"u"?console.warn("PixiJS Deprecation Warning: ",`${E}
38
+ Deprecated since v${C}`):(B=B.split(`
39
+ `).splice(I).join(`
40
+ `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${E}
41
+ Deprecated since v${C}`),console.warn(B),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${E}
42
+ Deprecated since v${C}`),console.warn(B))),warnings[E]=!0}let supported;function isWebGLSupported(){return typeof supported>"u"&&(supported=function(){var I;const E={stencil:!0,failIfMajorPerformanceCaveat:settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!settings.ADAPTER.getWebGLRenderingContext())return!1;const B=settings.ADAPTER.createCanvas();let U=B.getContext("webgl",E)||B.getContext("experimental-webgl",E);const V=!!((I=U==null?void 0:U.getContextAttributes())!=null&&I.stencil);if(U){const X=U.getExtension("WEBGL_lose_context");X&&X.loseContext()}return U=null,V}catch{return!1}}()),supported}var r$4={grad:.9,turn:360,rad:360/(2*Math.PI)},t$3=function(C){return typeof C=="string"?C.length>0:typeof C=="number"},n$5=function(C,E,I){return E===void 0&&(E=0),I===void 0&&(I=Math.pow(10,E)),Math.round(I*C)/I+0},e$3=function(C,E,I){return E===void 0&&(E=0),I===void 0&&(I=1),C>I?I:C>E?C:E},u$4=function(C){return(C=isFinite(C)?C%360:0)>0?C:C+360},a$6=function(C){return{r:e$3(C.r,0,255),g:e$3(C.g,0,255),b:e$3(C.b,0,255),a:e$3(C.a)}},o$5=function(C){return{r:n$5(C.r),g:n$5(C.g),b:n$5(C.b),a:n$5(C.a,3)}},i$6=/^#([0-9a-f]{3,8})$/i,s$5=function(C){var E=C.toString(16);return E.length<2?"0"+E:E},h$1=function(C){var E=C.r,I=C.g,B=C.b,U=C.a,V=Math.max(E,I,B),X=V-Math.min(E,I,B),Y=X?V===E?(I-B)/X:V===I?2+(B-E)/X:4+(E-I)/X:0;return{h:60*(Y<0?Y+6:Y),s:V?X/V*100:0,v:V/255*100,a:U}},b$2=function(C){var E=C.h,I=C.s,B=C.v,U=C.a;E=E/360*6,I/=100,B/=100;var V=Math.floor(E),X=B*(1-I),Y=B*(1-(E-V)*I),K=B*(1-(1-E+V)*I),J=V%6;return{r:255*[B,Y,X,X,K,B][J],g:255*[K,B,B,Y,X,X][J],b:255*[X,X,K,B,B,Y][J],a:U}},g$2=function(C){return{h:u$4(C.h),s:e$3(C.s,0,100),l:e$3(C.l,0,100),a:e$3(C.a)}},d$4=function(C){return{h:n$5(C.h),s:n$5(C.s),l:n$5(C.l),a:n$5(C.a,3)}},f$4=function(C){return b$2((I=(E=C).s,{h:E.h,s:(I*=((B=E.l)<50?B:100-B)/100)>0?2*I/(B+I)*100:0,v:B+I,a:E.a}));var E,I,B},c$7=function(C){return{h:(E=h$1(C)).h,s:(U=(200-(I=E.s))*(B=E.v)/100)>0&&U<200?I*B/100/(U<=100?U:200-U)*100:0,l:U/2,a:E.a};var E,I,B,U},l$5=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p$2=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v$3=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m$3=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y$2={string:[[function(C){var E=i$6.exec(C);return E?(C=E[1]).length<=4?{r:parseInt(C[0]+C[0],16),g:parseInt(C[1]+C[1],16),b:parseInt(C[2]+C[2],16),a:C.length===4?n$5(parseInt(C[3]+C[3],16)/255,2):1}:C.length===6||C.length===8?{r:parseInt(C.substr(0,2),16),g:parseInt(C.substr(2,2),16),b:parseInt(C.substr(4,2),16),a:C.length===8?n$5(parseInt(C.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(C){var E=v$3.exec(C)||m$3.exec(C);return E?E[2]!==E[4]||E[4]!==E[6]?null:a$6({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(C){var E=l$5.exec(C)||p$2.exec(C);if(!E)return null;var I,B,U=g$2({h:(I=E[1],B=E[2],B===void 0&&(B="deg"),Number(I)*(r$4[B]||1)),s:Number(E[3]),l:Number(E[4]),a:E[5]===void 0?1:Number(E[5])/(E[6]?100:1)});return f$4(U)},"hsl"]],object:[[function(C){var E=C.r,I=C.g,B=C.b,U=C.a,V=U===void 0?1:U;return t$3(E)&&t$3(I)&&t$3(B)?a$6({r:Number(E),g:Number(I),b:Number(B),a:Number(V)}):null},"rgb"],[function(C){var E=C.h,I=C.s,B=C.l,U=C.a,V=U===void 0?1:U;if(!t$3(E)||!t$3(I)||!t$3(B))return null;var X=g$2({h:Number(E),s:Number(I),l:Number(B),a:Number(V)});return f$4(X)},"hsl"],[function(C){var E=C.h,I=C.s,B=C.v,U=C.a,V=U===void 0?1:U;if(!t$3(E)||!t$3(I)||!t$3(B))return null;var X=function(Y){return{h:u$4(Y.h),s:e$3(Y.s,0,100),v:e$3(Y.v,0,100),a:e$3(Y.a)}}({h:Number(E),s:Number(I),v:Number(B),a:Number(V)});return b$2(X)},"hsv"]]},N$1=function(C,E){for(var I=0;I<E.length;I++){var B=E[I][0](C);if(B)return[B,E[I][1]]}return[null,void 0]},x$3=function(C){return typeof C=="string"?N$1(C.trim(),y$2.string):typeof C=="object"&&C!==null?N$1(C,y$2.object):[null,void 0]},M$1=function(C,E){var I=c$7(C);return{h:I.h,s:e$3(I.s+100*E,0,100),l:I.l,a:I.a}},H=function(C){return(299*C.r+587*C.g+114*C.b)/1e3/255},$=function(C,E){var I=c$7(C);return{h:I.h,s:I.s,l:e$3(I.l+100*E,0,100),a:I.a}},j=function(){function C(E){this.parsed=x$3(E)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return C.prototype.isValid=function(){return this.parsed!==null},C.prototype.brightness=function(){return n$5(H(this.rgba),2)},C.prototype.isDark=function(){return H(this.rgba)<.5},C.prototype.isLight=function(){return H(this.rgba)>=.5},C.prototype.toHex=function(){return E=o$5(this.rgba),I=E.r,B=E.g,U=E.b,X=(V=E.a)<1?s$5(n$5(255*V)):"","#"+s$5(I)+s$5(B)+s$5(U)+X;var E,I,B,U,V,X},C.prototype.toRgb=function(){return o$5(this.rgba)},C.prototype.toRgbString=function(){return E=o$5(this.rgba),I=E.r,B=E.g,U=E.b,(V=E.a)<1?"rgba("+I+", "+B+", "+U+", "+V+")":"rgb("+I+", "+B+", "+U+")";var E,I,B,U,V},C.prototype.toHsl=function(){return d$4(c$7(this.rgba))},C.prototype.toHslString=function(){return E=d$4(c$7(this.rgba)),I=E.h,B=E.s,U=E.l,(V=E.a)<1?"hsla("+I+", "+B+"%, "+U+"%, "+V+")":"hsl("+I+", "+B+"%, "+U+"%)";var E,I,B,U,V},C.prototype.toHsv=function(){return E=h$1(this.rgba),{h:n$5(E.h),s:n$5(E.s),v:n$5(E.v),a:n$5(E.a,3)};var E},C.prototype.invert=function(){return w$1({r:255-(E=this.rgba).r,g:255-E.g,b:255-E.b,a:E.a});var E},C.prototype.saturate=function(E){return E===void 0&&(E=.1),w$1(M$1(this.rgba,E))},C.prototype.desaturate=function(E){return E===void 0&&(E=.1),w$1(M$1(this.rgba,-E))},C.prototype.grayscale=function(){return w$1(M$1(this.rgba,-1))},C.prototype.lighten=function(E){return E===void 0&&(E=.1),w$1($(this.rgba,E))},C.prototype.darken=function(E){return E===void 0&&(E=.1),w$1($(this.rgba,-E))},C.prototype.rotate=function(E){return E===void 0&&(E=15),this.hue(this.hue()+E)},C.prototype.alpha=function(E){return typeof E=="number"?w$1({r:(I=this.rgba).r,g:I.g,b:I.b,a:E}):n$5(this.rgba.a,3);var I},C.prototype.hue=function(E){var I=c$7(this.rgba);return typeof E=="number"?w$1({h:E,s:I.s,l:I.l,a:I.a}):n$5(I.h)},C.prototype.isEqual=function(E){return this.toHex()===w$1(E).toHex()},C}(),w$1=function(C){return C instanceof j?C:new j(C)},S$1=[],k$1=function(C){C.forEach(function(E){S$1.indexOf(E)<0&&(E(j,y$2),S$1.push(E))})};function namesPlugin(C,E){var I={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"},B={};for(var U in I)B[I[U]]=U;var V={};C.prototype.toName=function(X){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var Y,K,J=B[this.toHex()];if(J)return J;if(X!=null&&X.closest){var xe=this.toRgb(),Z=1/0,_e="black";if(!V.length)for(var Se in I)V[Se]=new C(I[Se]).toRgb();for(var Ee in I){var Ae=(Y=xe,K=V[Ee],Math.pow(Y.r-K.r,2)+Math.pow(Y.g-K.g,2)+Math.pow(Y.b-K.b,2));Ae<Z&&(Z=Ae,_e=Ee)}return _e}},E.string.push([function(X){var Y=X.toLowerCase(),K=Y==="transparent"?"#0000":I[Y];return K?new C(K).toRgb():null},"name"])}k$1([namesPlugin]);const _Color=class{constructor(C=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=C}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(C){return this.value=C,this}set value(C){if(C instanceof _Color)this._value=this.cloneSource(C._value),this._int=C._int,this._components.set(C._components);else{if(C===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,C))&&(this.normalize(C),this._value=this.cloneSource(C))}}get value(){return this._value}cloneSource(C){return typeof C=="string"||typeof C=="number"||C instanceof Number||C===null?C:Array.isArray(C)||ArrayBuffer.isView(C)?C.slice(0):typeof C=="object"&&C!==null?{...C}:C}isSourceEqual(C,E){const I=typeof C;if(I!==typeof E)return!1;if(I==="number"||I==="string"||C instanceof Number)return C===E;if(Array.isArray(C)&&Array.isArray(E)||ArrayBuffer.isView(C)&&ArrayBuffer.isView(E))return C.length!==E.length?!1:C.every((U,V)=>U===E[V]);if(C!==null&&E!==null){const U=Object.keys(C),V=Object.keys(E);return U.length!==V.length?!1:U.every(X=>C[X]===E[X])}return C===E}toRgba(){const[C,E,I,B]=this._components;return{r:C,g:E,b:I,a:B}}toRgb(){const[C,E,I]=this._components;return{r:C,g:E,b:I}}toRgbaString(){const[C,E,I]=this.toUint8RgbArray();return`rgba(${C},${E},${I},${this.alpha})`}toUint8RgbArray(C){const[E,I,B]=this._components;return C=C??[],C[0]=Math.round(E*255),C[1]=Math.round(I*255),C[2]=Math.round(B*255),C}toRgbArray(C){C=C??[];const[E,I,B]=this._components;return C[0]=E,C[1]=I,C[2]=B,C}toNumber(){return this._int}toLittleEndianNumber(){const C=this._int;return(C>>16)+(C&65280)+((C&255)<<16)}multiply(C){const[E,I,B,U]=_Color.temp.setValue(C)._components;return this._components[0]*=E,this._components[1]*=I,this._components[2]*=B,this._components[3]*=U,this.refreshInt(),this._value=null,this}premultiply(C,E=!0){return E&&(this._components[0]*=C,this._components[1]*=C,this._components[2]*=C),this._components[3]=C,this.refreshInt(),this._value=null,this}toPremultiplied(C){if(C===1)return(C*255<<24)+this._int;if(C===0)return 0;let E=this._int>>16&255,I=this._int>>8&255,B=this._int&255;return E=E*C+.5|0,I=I*C+.5|0,B=B*C+.5|0,(C*255<<24)+(E<<16)+(I<<8)+B}toHex(){const C=this._int.toString(16);return`#${"000000".substring(0,6-C.length)+C}`}toHexa(){const E=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-E.length)+E}setAlpha(C){return this._components[3]=this._clamp(C),this}round(C){const[E,I,B]=this._components;return this._components[0]=Math.round(E*C)/C,this._components[1]=Math.round(I*C)/C,this._components[2]=Math.round(B*C)/C,this.refreshInt(),this._value=null,this}toArray(C){C=C??[];const[E,I,B,U]=this._components;return C[0]=E,C[1]=I,C[2]=B,C[3]=U,C}normalize(C){let E;if((typeof C=="number"||C instanceof Number)&&C>=0&&C<=16777215){const I=C;E=[(I>>16&255)/255,(I>>8&255)/255,(I&255)/255,1]}else if((Array.isArray(C)||C instanceof Float32Array)&&C.length>=3&&C.length<=4){C=this._clamp(C);const[I,B,U,V=1]=C;E=[I,B,U,V]}else if((C instanceof Uint8Array||C instanceof Uint8ClampedArray)&&C.length>=3&&C.length<=4){C=this._clamp(C,0,255);const[I,B,U,V=255]=C;E=[I/255,B/255,U/255,V/255]}else if(typeof C=="string"||typeof C=="object"){if(typeof C=="string"){const B=_Color.HEX_PATTERN.exec(C);B&&(C=`#${B[2]}`)}const I=w$1(C);if(I.isValid()){const{r:B,g:U,b:V,a:X}=I.rgba;E=[B/255,U/255,V/255,X]}}if(E)this._components.set(E),this.refreshInt();else throw new Error(`Unable to convert color ${C}`)}refreshInt(){this._clamp(this._components);const[C,E,I]=this._components;this._int=(C*255<<16)+(E*255<<8)+(I*255|0)}_clamp(C,E=0,I=1){return typeof C=="number"?Math.min(Math.max(C,E),I):(C.forEach((B,U)=>{C[U]=Math.min(Math.max(B,E),I)}),C)}};let Color=_Color;Color.shared=new _Color,Color.temp=new _Color,Color.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function hex2rgb(C,E=[]){return deprecation("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Color.shared.setValue(C).toRgbArray(E)}function rgb2hex(C){return deprecation("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Color.shared.setValue(C).toNumber()}function mapPremultipliedBlendModes(){const C=[],E=[];for(let B=0;B<32;B++)C[B]=B,E[B]=B;C[BLEND_MODES.NORMAL_NPM]=BLEND_MODES.NORMAL,C[BLEND_MODES.ADD_NPM]=BLEND_MODES.ADD,C[BLEND_MODES.SCREEN_NPM]=BLEND_MODES.SCREEN,E[BLEND_MODES.NORMAL]=BLEND_MODES.NORMAL_NPM,E[BLEND_MODES.ADD]=BLEND_MODES.ADD_NPM,E[BLEND_MODES.SCREEN]=BLEND_MODES.SCREEN_NPM;const I=[];return I.push(E),I.push(C),I}const premultiplyBlendMode=mapPremultipliedBlendModes();function getBufferType(C){if(C.BYTES_PER_ELEMENT===4)return C instanceof Float32Array?"Float32Array":C instanceof Uint32Array?"Uint32Array":"Int32Array";if(C.BYTES_PER_ELEMENT===2){if(C instanceof Uint16Array)return"Uint16Array"}else if(C.BYTES_PER_ELEMENT===1&&C instanceof Uint8Array)return"Uint8Array";return null}function nextPow2(C){return C+=C===0?1:0,--C,C|=C>>>1,C|=C>>>2,C|=C>>>4,C|=C>>>8,C|=C>>>16,C+1}function isPow2(C){return!(C&C-1)&&!!C}function log2(C){let E=(C>65535?1:0)<<4;C>>>=E;let I=(C>255?1:0)<<3;return C>>>=I,E|=I,I=(C>15?1:0)<<2,C>>>=I,E|=I,I=(C>3?1:0)<<1,C>>>=I,E|=I,E|C>>1}function removeItems(C,E,I){const B=C.length;let U;if(E>=B||I===0)return;I=E+I>B?B-E:I;const V=B-I;for(U=E;U<V;++U)C[U]=C[U+I];C.length=V}let nextUid=0;function uid(){return++nextUid}const ProgramCache={},TextureCache=Object.create(null),BaseTextureCache=Object.create(null);let tempAnchor;function determineCrossOrigin(C,E=globalThis.location){if(C.startsWith("data:"))return"";E=E||globalThis.location,tempAnchor||(tempAnchor=document.createElement("a")),tempAnchor.href=C;const I=url.parse(tempAnchor.href),B=!I.port&&E.port===""||I.port===E.port;return I.hostname!==E.hostname||!B||I.protocol!==E.protocol?"anonymous":""}function getResolutionOfUrl(C,E=1){var B;const I=(B=settings.RETINA_PREFIX)==null?void 0:B.exec(C);return I?parseFloat(I[1]):E}var ExtensionType=(C=>(C.Renderer="renderer",C.Application="application",C.RendererSystem="renderer-webgl-system",C.RendererPlugin="renderer-webgl-plugin",C.CanvasRendererSystem="renderer-canvas-system",C.CanvasRendererPlugin="renderer-canvas-plugin",C.Asset="asset",C.LoadParser="load-parser",C.ResolveParser="resolve-parser",C.CacheParser="cache-parser",C.DetectionParser="detection-parser",C))(ExtensionType||{});const normalizeExtension=C=>{if(typeof C=="function"||typeof C=="object"&&C.extension){if(!C.extension)throw new Error("Extension class must have an extension object");C={...typeof C.extension!="object"?{type:C.extension}:C.extension,ref:C}}if(typeof C=="object")C={...C};else throw new Error("Invalid extension type");return typeof C.type=="string"&&(C.type=[C.type]),C},normalizePriority=(C,E)=>normalizeExtension(C).priority??E,extensions={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...C){return C.map(normalizeExtension).forEach(E=>{E.type.forEach(I=>{var B,U;return(U=(B=this._removeHandlers)[I])==null?void 0:U.call(B,E)})}),this},add(...C){return C.map(normalizeExtension).forEach(E=>{E.type.forEach(I=>{const B=this._addHandlers,U=this._queue;B[I]?B[I](E):(U[I]=U[I]||[],U[I].push(E))})}),this},handle(C,E,I){const B=this._addHandlers,U=this._removeHandlers;if(B[C]||U[C])throw new Error(`Extension type ${C} already has a handler`);B[C]=E,U[C]=I;const V=this._queue;return V[C]&&(V[C].forEach(X=>E(X)),delete V[C]),this},handleByMap(C,E){return this.handle(C,I=>{E[I.name]=I.ref},I=>{delete E[I.name]})},handleByList(C,E,I=-1){return this.handle(C,B=>{E.includes(B.ref)||(E.push(B.ref),E.sort((U,V)=>normalizePriority(V,I)-normalizePriority(U,I)))},B=>{const U=E.indexOf(B.ref);U!==-1&&E.splice(U,1)})}};class ViewableBuffer{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 fragTemplate=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
43
+ `);function generateIfTestSrc(C){let E="";for(let I=0;I<C;++I)I>0&&(E+=`
44
+ else `),I<C-1&&(E+=`if(test == ${I}.0){}`);return E}function checkMaxIfStatementsInShader(C,E){if(C===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const I=E.createShader(E.FRAGMENT_SHADER);for(;;){const B=fragTemplate.replace(/%forloop%/gi,generateIfTestSrc(C));if(E.shaderSource(I,B),E.compileShader(I),!E.getShaderParameter(I,E.COMPILE_STATUS))C=C/2|0;else break}return C}const BLEND$1=0,OFFSET$1=1,CULLING$1=2,DEPTH_TEST$1=3,WINDING$1=4,DEPTH_MASK$1=5;let State$1=class hr{constructor(){this.data=0,this.blendMode=BLEND_MODES.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<BLEND$1)}set blend(E){!!(this.data&1<<BLEND$1)!==E&&(this.data^=1<<BLEND$1)}get offsets(){return!!(this.data&1<<OFFSET$1)}set offsets(E){!!(this.data&1<<OFFSET$1)!==E&&(this.data^=1<<OFFSET$1)}get culling(){return!!(this.data&1<<CULLING$1)}set culling(E){!!(this.data&1<<CULLING$1)!==E&&(this.data^=1<<CULLING$1)}get depthTest(){return!!(this.data&1<<DEPTH_TEST$1)}set depthTest(E){!!(this.data&1<<DEPTH_TEST$1)!==E&&(this.data^=1<<DEPTH_TEST$1)}get depthMask(){return!!(this.data&1<<DEPTH_MASK$1)}set depthMask(E){!!(this.data&1<<DEPTH_MASK$1)!==E&&(this.data^=1<<DEPTH_MASK$1)}get clockwiseFrontFace(){return!!(this.data&1<<WINDING$1)}set clockwiseFrontFace(E){!!(this.data&1<<WINDING$1)!==E&&(this.data^=1<<WINDING$1)}get blendMode(){return this._blendMode}set blendMode(E){this.blend=E!==BLEND_MODES.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 hr;return E.depthTest=!1,E.blend=!0,E}};const INSTALLED=[];function autoDetectResource(C,E){if(!C)return null;let I="";if(typeof C=="string"){const B=/\.(\w{3,4})(?:$|\?|#)/i.exec(C);B&&(I=B[1].toLowerCase())}for(let B=INSTALLED.length-1;B>=0;--B){const U=INSTALLED[B];if(U.test&&U.test(C,I))return new U(C,E)}throw new Error("Unrecognized source type to auto-detect Resource")}class Runner{constructor(E){this.items=[],this._name=E,this._aliasCount=0}emit(E,I,B,U,V,X,Y,K){if(arguments.length>8)throw new Error("max arguments reached");const{name:J,items:xe}=this;this._aliasCount++;for(let Z=0,_e=xe.length;Z<_e;Z++)xe[Z][J](E,I,B,U,V,X,Y,K);return xe===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 I=this.items.indexOf(E);return I!==-1&&(this.ensureNonAliasedItems(),this.items.splice(I,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(Runner.prototype,{dispatch:{value:Runner.prototype.emit},run:{value:Runner.prototype.emit}});class Resource{constructor(E=0,I=0){this._width=E,this._height=I,this.destroyed=!1,this.internal=!1,this.onResize=new Runner("setRealSize"),this.onUpdate=new Runner("update"),this.onError=new Runner("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,I){(E!==this._width||I!==this._height)&&(this._width=E,this._height=I,this.onResize.emit(E,I))}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,I,B){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,I){return!1}}class BufferResource extends Resource{constructor(E,I){const{width:B,height:U}=I||{};if(!B||!U)throw new Error("BufferResource width or height invalid");super(B,U),this.data=E}upload(E,I,B){const U=E.gl;U.pixelStorei(U.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.alphaMode===ALPHA_MODES.UNPACK);const V=I.realWidth,X=I.realHeight;return B.width===V&&B.height===X?U.texSubImage2D(I.target,0,0,0,V,X,I.format,B.type,this.data):(B.width=V,B.height=X,U.texImage2D(I.target,0,B.internalFormat,V,X,0,I.format,B.type,this.data)),!0}dispose(){this.data=null}static test(E){return E instanceof Float32Array||E instanceof Uint8Array||E instanceof Uint32Array}}const defaultBufferOptions={scaleMode:SCALE_MODES.NEAREST,format:FORMATS.RGBA,alphaMode:ALPHA_MODES.NPM},_BaseTexture=class extends EventEmitter{constructor(C=null,E=null){super(),E=Object.assign({},_BaseTexture.defaultOptions,E);const{alphaMode:I,mipmap:B,anisotropicLevel:U,scaleMode:V,width:X,height:Y,wrapMode:K,format:J,type:xe,target:Z,resolution:_e,resourceOptions:Se}=E;C&&!(C instanceof Resource)&&(C=autoDetectResource(C,Se),C.internal=!0),this.resolution=_e||settings.RESOLUTION,this.width=Math.round((X||0)*this.resolution)/this.resolution,this.height=Math.round((Y||0)*this.resolution)/this.resolution,this._mipmap=B,this.anisotropicLevel=U,this._wrapMode=K,this._scaleMode=V,this.format=J,this.type=xe,this.target=Z,this.alphaMode=I,this.uid=uid(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=X>0&&Y>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(C)}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(C){this._mipmap!==C&&(this._mipmap=C,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(C){this._scaleMode!==C&&(this._scaleMode=C,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(C){this._wrapMode!==C&&(this._wrapMode=C,this.dirtyStyleId++)}setStyle(C,E){let I;return C!==void 0&&C!==this.scaleMode&&(this.scaleMode=C,I=!0),E!==void 0&&E!==this.mipmap&&(this.mipmap=E,I=!0),I&&this.dirtyStyleId++,this}setSize(C,E,I){return I=I||this.resolution,this.setRealSize(C*I,E*I,I)}setRealSize(C,E,I){return this.resolution=I||this.resolution,this.width=Math.round(C)/this.resolution,this.height=Math.round(E)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=isPow2(this.realWidth)&&isPow2(this.realHeight)}setResolution(C){const E=this.resolution;return E===C?this:(this.resolution=C,this.valid&&(this.width=Math.round(this.width*E)/C,this.height=Math.round(this.height*E)/C,this.emit("update",this)),this._refreshPOT(),this)}setResource(C){if(this.resource===C)return this;if(this.resource)throw new Error("Resource can be set only once");return C.bind(this),this.resource=C,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(C){this.emit("error",this,C)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete BaseTextureCache[this.cacheId],delete TextureCache[this.cacheId],this.cacheId=null),this.dispose(),_BaseTexture.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(C,E,I=settings.STRICT_TEXTURE_CACHE){const B=typeof C=="string";let U=null;if(B)U=C;else{if(!C._pixiId){const X=(E==null?void 0:E.pixiIdPrefix)||"pixiid";C._pixiId=`${X}_${uid()}`}U=C._pixiId}let V=BaseTextureCache[U];if(B&&I&&!V)throw new Error(`The cacheId "${U}" does not exist in BaseTextureCache.`);return V||(V=new _BaseTexture(C,E),V.cacheId=U,_BaseTexture.addToCache(V,U)),V}static fromBuffer(C,E,I,B){C=C||new Float32Array(E*I*4);const U=new BufferResource(C,{width:E,height:I}),V=C instanceof Float32Array?TYPES.FLOAT:TYPES.UNSIGNED_BYTE;return new _BaseTexture(U,Object.assign({},defaultBufferOptions,B||{width:E,height:I,type:V}))}static addToCache(C,E){E&&(C.textureCacheIds.includes(E)||C.textureCacheIds.push(E),BaseTextureCache[E]&&BaseTextureCache[E]!==C&&console.warn(`BaseTexture added to the cache with an id [${E}] that already had an entry`),BaseTextureCache[E]=C)}static removeFromCache(C){if(typeof C=="string"){const E=BaseTextureCache[C];if(E){const I=E.textureCacheIds.indexOf(C);return I>-1&&E.textureCacheIds.splice(I,1),delete BaseTextureCache[C],E}}else if(C!=null&&C.textureCacheIds){for(let E=0;E<C.textureCacheIds.length;++E)delete BaseTextureCache[C.textureCacheIds[E]];return C.textureCacheIds.length=0,C}return null}};let BaseTexture=_BaseTexture;BaseTexture.defaultOptions={mipmap:MIPMAP_MODES.POW2,anisotropicLevel:0,scaleMode:SCALE_MODES.LINEAR,wrapMode:WRAP_MODES.CLAMP,alphaMode:ALPHA_MODES.UNPACK,target:TARGETS.TEXTURE_2D,format:FORMATS.RGBA,type:TYPES.UNSIGNED_BYTE},BaseTexture._globalBatch=0;class BatchDrawCall{constructor(){this.texArray=null,this.blend=0,this.type=DRAW_MODES.TRIANGLES,this.start=0,this.size=0,this.data=null}}let UID$4=0;class Buffer{constructor(E,I=!0,B=!1){this.data=E||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=B,this.static=I,this.id=UID$4++,this.disposeRunner=new Runner("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?BUFFER_TYPE.ELEMENT_ARRAY_BUFFER:BUFFER_TYPE.ARRAY_BUFFER}get index(){return this.type===BUFFER_TYPE.ELEMENT_ARRAY_BUFFER}static from(E){return E instanceof Array&&(E=new Float32Array(E)),new Buffer(E)}}class Attribute{constructor(E,I=0,B=!1,U=TYPES.FLOAT,V,X,Y,K=1){this.buffer=E,this.size=I,this.normalized=B,this.type=U,this.stride=V,this.start=X,this.instance=Y,this.divisor=K}destroy(){this.buffer=null}static from(E,I,B,U,V){return new Attribute(E,I,B,U,V)}}const map$3={Float32Array,Uint32Array,Int32Array,Uint8Array};function interleaveTypedArrays(C,E){let I=0,B=0;const U={};for(let K=0;K<C.length;K++)B+=E[K],I+=C[K].length;const V=new ArrayBuffer(I*4);let X=null,Y=0;for(let K=0;K<C.length;K++){const J=E[K],xe=C[K],Z=getBufferType(xe);U[Z]||(U[Z]=new map$3[Z](V)),X=U[Z];for(let _e=0;_e<xe.length;_e++){const Se=(_e/J|0)*B+Y,Ee=_e%J;X[Se+Ee]=xe[_e]}Y+=J}return new Float32Array(V)}const byteSizeMap$1={5126:4,5123:2,5121:1};let UID$3=0;const map$2={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class Geometry{constructor(E=[],I={}){this.buffers=E,this.indexBuffer=null,this.attributes=I,this.glVertexArrayObjects={},this.id=UID$3++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new Runner("disposeGeometry"),this.refCount=0}addAttribute(E,I,B=0,U=!1,V,X,Y,K=!1){if(!I)throw new Error("You must pass a buffer when creating an attribute");I instanceof Buffer||(I instanceof Array&&(I=new Float32Array(I)),I=new Buffer(I));const J=E.split("|");if(J.length>1){for(let Z=0;Z<J.length;Z++)this.addAttribute(J[Z],I,B,U,V);return this}let xe=this.buffers.indexOf(I);return xe===-1&&(this.buffers.push(I),xe=this.buffers.length-1),this.attributes[E]=new Attribute(xe,B,U,V,X,Y,K),this.instanced=this.instanced||K,this}getAttribute(E){return this.attributes[E]}getBuffer(E){return this.buffers[this.getAttribute(E).buffer]}addIndex(E){return E instanceof Buffer||(E instanceof Array&&(E=new Uint16Array(E)),E=new Buffer(E)),E.type=BUFFER_TYPE.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=[],I=[],B=new Buffer;let U;for(U in this.attributes){const V=this.attributes[U],X=this.buffers[V.buffer];E.push(X.data),I.push(V.size*byteSizeMap$1[V.type]/4),V.buffer=0}for(B.data=interleaveTypedArrays(E,I),U=0;U<this.buffers.length;U++)this.buffers[U]!==this.indexBuffer&&this.buffers[U].destroy();return this.buffers=[B],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const E in this.attributes){const I=this.attributes[E];return this.buffers[I.buffer].data.length/(I.stride/4||I.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 Geometry;for(let I=0;I<this.buffers.length;I++)E.buffers[I]=new Buffer(this.buffers[I].data.slice(0));for(const I in this.attributes){const B=this.attributes[I];E.attributes[I]=new Attribute(B.buffer,B.size,B.normalized,B.type,B.stride,B.start,B.instance)}return this.indexBuffer&&(E.indexBuffer=E.buffers[this.buffers.indexOf(this.indexBuffer)],E.indexBuffer.type=BUFFER_TYPE.ELEMENT_ARRAY_BUFFER),E}static merge(E){const I=new Geometry,B=[],U=[],V=[];let X;for(let Y=0;Y<E.length;Y++){X=E[Y];for(let K=0;K<X.buffers.length;K++)U[K]=U[K]||0,U[K]+=X.buffers[K].data.length,V[K]=0}for(let Y=0;Y<X.buffers.length;Y++)B[Y]=new map$2[getBufferType(X.buffers[Y].data)](U[Y]),I.buffers[Y]=new Buffer(B[Y]);for(let Y=0;Y<E.length;Y++){X=E[Y];for(let K=0;K<X.buffers.length;K++)B[K].set(X.buffers[K].data,V[K]),V[K]+=X.buffers[K].data.length}if(I.attributes=X.attributes,X.indexBuffer){I.indexBuffer=I.buffers[X.buffers.indexOf(X.indexBuffer)],I.indexBuffer.type=BUFFER_TYPE.ELEMENT_ARRAY_BUFFER;let Y=0,K=0,J=0,xe=0;for(let Z=0;Z<X.buffers.length;Z++)if(X.buffers[Z]!==X.indexBuffer){xe=Z;break}for(const Z in X.attributes){const _e=X.attributes[Z];(_e.buffer|0)===xe&&(K+=_e.size*byteSizeMap$1[_e.type]/4)}for(let Z=0;Z<E.length;Z++){const _e=E[Z].indexBuffer.data;for(let Se=0;Se<_e.length;Se++)I.indexBuffer.data[Se+J]+=Y;Y+=E[Z].buffers[xe].data.length/K,J+=_e.length}}return I}}class BatchGeometry extends Geometry{constructor(E=!1){super(),this._buffer=new Buffer(null,E,!1),this._indexBuffer=new Buffer(null,E,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,TYPES.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,TYPES.FLOAT).addAttribute("aColor",this._buffer,4,!0,TYPES.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,TYPES.FLOAT).addIndex(this._indexBuffer)}}const PI_2=Math.PI*2,RAD_TO_DEG=180/Math.PI,DEG_TO_RAD=Math.PI/180;var SHAPES=(C=>(C[C.POLY=0]="POLY",C[C.RECT=1]="RECT",C[C.CIRC=2]="CIRC",C[C.ELIP=3]="ELIP",C[C.RREC=4]="RREC",C))(SHAPES||{});class Point{constructor(E=0,I=0){this.x=0,this.y=0,this.x=E,this.y=I}clone(){return new Point(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,I=E){return this.x=E,this.y=I,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const tempPoints$1=[new Point,new Point,new Point,new Point];class Rectangle{constructor(E=0,I=0,B=0,U=0){this.x=Number(E),this.y=Number(I),this.width=Number(B),this.height=Number(U),this.type=SHAPES.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 Rectangle(0,0,0,0)}clone(){return new Rectangle(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,I){return this.width<=0||this.height<=0?!1:E>=this.x&&E<this.x+this.width&&I>=this.y&&I<this.y+this.height}intersects(E,I){if(!I){const $e=this.x<E.x?E.x:this.x;if((this.right>E.right?E.right:this.right)<=$e)return!1;const Xe=this.y<E.y?E.y:this.y;return(this.bottom>E.bottom?E.bottom:this.bottom)>Xe}const B=this.left,U=this.right,V=this.top,X=this.bottom;if(U<=B||X<=V)return!1;const Y=tempPoints$1[0].set(E.left,E.top),K=tempPoints$1[1].set(E.left,E.bottom),J=tempPoints$1[2].set(E.right,E.top),xe=tempPoints$1[3].set(E.right,E.bottom);if(J.x<=Y.x||K.y<=Y.y)return!1;const Z=Math.sign(I.a*I.d-I.b*I.c);if(Z===0||(I.apply(Y,Y),I.apply(K,K),I.apply(J,J),I.apply(xe,xe),Math.max(Y.x,K.x,J.x,xe.x)<=B||Math.min(Y.x,K.x,J.x,xe.x)>=U||Math.max(Y.y,K.y,J.y,xe.y)<=V||Math.min(Y.y,K.y,J.y,xe.y)>=X))return!1;const _e=Z*(K.y-Y.y),Se=Z*(Y.x-K.x),Ee=_e*B+Se*V,Ae=_e*U+Se*V,Re=_e*B+Se*X,Te=_e*U+Se*X;if(Math.max(Ee,Ae,Re,Te)<=_e*Y.x+Se*Y.y||Math.min(Ee,Ae,Re,Te)>=_e*xe.x+Se*xe.y)return!1;const we=Z*(Y.y-J.y),Pe=Z*(J.x-Y.x),Ie=we*B+Pe*V,Fe=we*U+Pe*V,Oe=we*B+Pe*X,Le=we*U+Pe*X;return!(Math.max(Ie,Fe,Oe,Le)<=we*Y.x+Pe*Y.y||Math.min(Ie,Fe,Oe,Le)>=we*xe.x+Pe*xe.y)}pad(E=0,I=E){return this.x-=E,this.y-=I,this.width+=E*2,this.height+=I*2,this}fit(E){const I=Math.max(this.x,E.x),B=Math.min(this.x+this.width,E.x+E.width),U=Math.max(this.y,E.y),V=Math.min(this.y+this.height,E.y+E.height);return this.x=I,this.width=Math.max(B-I,0),this.y=U,this.height=Math.max(V-U,0),this}ceil(E=1,I=.001){const B=Math.ceil((this.x+this.width-I)*E)/E,U=Math.ceil((this.y+this.height-I)*E)/E;return this.x=Math.floor((this.x+I)*E)/E,this.y=Math.floor((this.y+I)*E)/E,this.width=B-this.x,this.height=U-this.y,this}enlarge(E){const I=Math.min(this.x,E.x),B=Math.max(this.x+this.width,E.x+E.width),U=Math.min(this.y,E.y),V=Math.max(this.y+this.height,E.y+E.height);return this.x=I,this.width=B-I,this.y=U,this.height=V-U,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class Circle{constructor(E=0,I=0,B=0){this.x=E,this.y=I,this.radius=B,this.type=SHAPES.CIRC}clone(){return new Circle(this.x,this.y,this.radius)}contains(E,I){if(this.radius<=0)return!1;const B=this.radius*this.radius;let U=this.x-E,V=this.y-I;return U*=U,V*=V,U+V<=B}getBounds(){return new Rectangle(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 Ellipse$1=class ur{constructor(E=0,I=0,B=0,U=0){this.x=E,this.y=I,this.width=B,this.height=U,this.type=SHAPES.ELIP}clone(){return new ur(this.x,this.y,this.width,this.height)}contains(E,I){if(this.width<=0||this.height<=0)return!1;let B=(E-this.x)/this.width,U=(I-this.y)/this.height;return B*=B,U*=U,B+U<=1}getBounds(){return new Rectangle(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 Polygon{constructor(...E){let I=Array.isArray(E[0])?E[0]:E;if(typeof I[0]!="number"){const B=[];for(let U=0,V=I.length;U<V;U++)B.push(I[U].x,I[U].y);I=B}this.points=I,this.type=SHAPES.POLY,this.closeStroke=!0}clone(){const E=this.points.slice(),I=new Polygon(E);return I.closeStroke=this.closeStroke,I}contains(E,I){let B=!1;const U=this.points.length/2;for(let V=0,X=U-1;V<U;X=V++){const Y=this.points[V*2],K=this.points[V*2+1],J=this.points[X*2],xe=this.points[X*2+1];K>I!=xe>I&&E<(J-Y)*((I-K)/(xe-K))+Y&&(B=!B)}return B}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((E,I)=>`${E}, ${I}`,"")}]`}}class RoundedRectangle{constructor(E=0,I=0,B=0,U=0,V=20){this.x=E,this.y=I,this.width=B,this.height=U,this.radius=V,this.type=SHAPES.RREC}clone(){return new RoundedRectangle(this.x,this.y,this.width,this.height,this.radius)}contains(E,I){if(this.width<=0||this.height<=0)return!1;if(E>=this.x&&E<=this.x+this.width&&I>=this.y&&I<=this.y+this.height){const B=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(I>=this.y+B&&I<=this.y+this.height-B||E>=this.x+B&&E<=this.x+this.width-B)return!0;let U=E-(this.x+B),V=I-(this.y+B);const X=B*B;if(U*U+V*V<=X||(U=E-(this.x+this.width-B),U*U+V*V<=X)||(V=I-(this.y+this.height-B),U*U+V*V<=X)||(U=E-(this.x+B),U*U+V*V<=X))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 Matrix$2=class tr{constructor(E=1,I=0,B=0,U=1,V=0,X=0){this.array=null,this.a=E,this.b=I,this.c=B,this.d=U,this.tx=V,this.ty=X}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,I,B,U,V,X){return this.a=E,this.b=I,this.c=B,this.d=U,this.tx=V,this.ty=X,this}toArray(E,I){this.array||(this.array=new Float32Array(9));const B=I||this.array;return E?(B[0]=this.a,B[1]=this.b,B[2]=0,B[3]=this.c,B[4]=this.d,B[5]=0,B[6]=this.tx,B[7]=this.ty,B[8]=1):(B[0]=this.a,B[1]=this.c,B[2]=this.tx,B[3]=this.b,B[4]=this.d,B[5]=this.ty,B[6]=0,B[7]=0,B[8]=1),B}apply(E,I){I=I||new Point;const B=E.x,U=E.y;return I.x=this.a*B+this.c*U+this.tx,I.y=this.b*B+this.d*U+this.ty,I}applyInverse(E,I){I=I||new Point;const B=1/(this.a*this.d+this.c*-this.b),U=E.x,V=E.y;return I.x=this.d*B*U+-this.c*B*V+(this.ty*this.c-this.tx*this.d)*B,I.y=this.a*B*V+-this.b*B*U+(-this.ty*this.a+this.tx*this.b)*B,I}translate(E,I){return this.tx+=E,this.ty+=I,this}scale(E,I){return this.a*=E,this.d*=I,this.c*=E,this.b*=I,this.tx*=E,this.ty*=I,this}rotate(E){const I=Math.cos(E),B=Math.sin(E),U=this.a,V=this.c,X=this.tx;return this.a=U*I-this.b*B,this.b=U*B+this.b*I,this.c=V*I-this.d*B,this.d=V*B+this.d*I,this.tx=X*I-this.ty*B,this.ty=X*B+this.ty*I,this}append(E){const I=this.a,B=this.b,U=this.c,V=this.d;return this.a=E.a*I+E.b*U,this.b=E.a*B+E.b*V,this.c=E.c*I+E.d*U,this.d=E.c*B+E.d*V,this.tx=E.tx*I+E.ty*U+this.tx,this.ty=E.tx*B+E.ty*V+this.ty,this}setTransform(E,I,B,U,V,X,Y,K,J){return this.a=Math.cos(Y+J)*V,this.b=Math.sin(Y+J)*V,this.c=-Math.sin(Y-K)*X,this.d=Math.cos(Y-K)*X,this.tx=E-(B*this.a+U*this.c),this.ty=I-(B*this.b+U*this.d),this}prepend(E){const I=this.tx;if(E.a!==1||E.b!==0||E.c!==0||E.d!==1){const B=this.a,U=this.c;this.a=B*E.a+this.b*E.c,this.b=B*E.b+this.b*E.d,this.c=U*E.a+this.d*E.c,this.d=U*E.b+this.d*E.d}return this.tx=I*E.a+this.ty*E.c+E.tx,this.ty=I*E.b+this.ty*E.d+E.ty,this}decompose(E){const I=this.a,B=this.b,U=this.c,V=this.d,X=E.pivot,Y=-Math.atan2(-U,V),K=Math.atan2(B,I),J=Math.abs(Y+K);return J<1e-5||Math.abs(PI_2-J)<1e-5?(E.rotation=K,E.skew.x=E.skew.y=0):(E.rotation=0,E.skew.x=Y,E.skew.y=K),E.scale.x=Math.sqrt(I*I+B*B),E.scale.y=Math.sqrt(U*U+V*V),E.position.x=this.tx+(X.x*I+X.y*U),E.position.y=this.ty+(X.x*B+X.y*V),E}invert(){const E=this.a,I=this.b,B=this.c,U=this.d,V=this.tx,X=E*U-I*B;return this.a=U/X,this.b=-I/X,this.c=-B/X,this.d=E/X,this.tx=(B*this.ty-U*V)/X,this.ty=-(E*this.ty-I*V)/X,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 tr;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 tr}static get TEMP_MATRIX(){return new tr}};const ux=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],uy=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],vx=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],vy=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],rotationCayley=[],rotationMatrices=[],signum=Math.sign;function init(){for(let C=0;C<16;C++){const E=[];rotationCayley.push(E);for(let I=0;I<16;I++){const B=signum(ux[C]*ux[I]+vx[C]*uy[I]),U=signum(uy[C]*ux[I]+vy[C]*uy[I]),V=signum(ux[C]*vx[I]+vx[C]*vy[I]),X=signum(uy[C]*vx[I]+vy[C]*vy[I]);for(let Y=0;Y<16;Y++)if(ux[Y]===B&&uy[Y]===U&&vx[Y]===V&&vy[Y]===X){E.push(Y);break}}}for(let C=0;C<16;C++){const E=new Matrix$2;E.set(ux[C],uy[C],vx[C],vy[C],0,0),rotationMatrices.push(E)}}init();const groupD8={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:C=>ux[C],uY:C=>uy[C],vX:C=>vx[C],vY:C=>vy[C],inv:C=>C&8?C&15:-C&7,add:(C,E)=>rotationCayley[C][E],sub:(C,E)=>rotationCayley[C][groupD8.inv(E)],rotate180:C=>C^4,isVertical:C=>(C&3)===2,byDirection:(C,E)=>Math.abs(C)*2<=Math.abs(E)?E>=0?groupD8.S:groupD8.N:Math.abs(E)*2<=Math.abs(C)?C>0?groupD8.E:groupD8.W:E>0?C>0?groupD8.SE:groupD8.SW:C>0?groupD8.NE:groupD8.NW,matrixAppendRotationInv:(C,E,I=0,B=0)=>{const U=rotationMatrices[groupD8.inv(E)];U.tx=I,U.ty=B,C.append(U)}};class ObservablePoint{constructor(E,I,B=0,U=0){this._x=B,this._y=U,this.cb=E,this.scope=I}clone(E=this.cb,I=this.scope){return new ObservablePoint(E,I,this._x,this._y)}set(E=0,I=E){return(this._x!==E||this._y!==I)&&(this._x=E,this._y=I,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 _Transform=class{constructor(){this.worldTransform=new Matrix$2,this.localTransform=new Matrix$2,this.position=new ObservablePoint(this.onChange,this,0,0),this.scale=new ObservablePoint(this.onChange,this,1,1),this.pivot=new ObservablePoint(this.onChange,this,0,0),this.skew=new ObservablePoint(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 C=this.localTransform;this._localID!==this._currentLocalID&&(C.a=this._cx*this.scale.x,C.b=this._sx*this.scale.x,C.c=this._cy*this.scale.y,C.d=this._sy*this.scale.y,C.tx=this.position.x-(this.pivot.x*C.a+this.pivot.y*C.c),C.ty=this.position.y-(this.pivot.x*C.b+this.pivot.y*C.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(C){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!==C._worldID){const I=C.worldTransform,B=this.worldTransform;B.a=E.a*I.a+E.b*I.c,B.b=E.a*I.b+E.b*I.d,B.c=E.c*I.a+E.d*I.c,B.d=E.c*I.b+E.d*I.d,B.tx=E.tx*I.a+E.ty*I.c+I.tx,B.ty=E.tx*I.b+E.ty*I.d+I.ty,this._parentID=C._worldID,this._worldID++}}setFromMatrix(C){C.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(C){this._rotation!==C&&(this._rotation=C,this.updateSkew())}};let Transform=_Transform;Transform.IDENTITY=new _Transform;var defaultFragment$2=`varying vec2 vTextureCoord;
21
45
 
22
46
  uniform sampler2D uSampler;
23
47
 
24
48
  void main(void){
25
49
  gl_FragColor *= texture2D(uSampler, vTextureCoord);
26
- }`,pw=`attribute vec2 aVertexPosition;
50
+ }`,defaultVertex$2=`attribute vec2 aVertexPosition;
27
51
  attribute vec2 aTextureCoord;
28
52
 
29
53
  uniform mat3 projectionMatrix;
@@ -34,64 +58,64 @@ void main(void){
34
58
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
35
59
  vTextureCoord = aTextureCoord;
36
60
  }
37
- `;function rd(t,e,r){const n=t.createShader(e);return t.shaderSource(n,r),t.compileShader(n),n}function rl(t){const e=new Array(t);for(let r=0;r<e.length;r++)e[r]=!1;return e}function nd(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 rl(2*e);case"bvec3":return rl(3*e);case"bvec4":return rl(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 li=[{test:t=>t.type==="float"&&t.size===1&&!t.isArray,code:t=>`
38
- if(uv["${t}"] !== ud["${t}"].value)
61
+ `;function compileShader(C,E,I){const B=C.createShader(E);return C.shaderSource(B,I),C.compileShader(B),B}function booleanArray(C){const E=new Array(C);for(let I=0;I<E.length;I++)E[I]=!1;return E}function defaultValue(C,E){switch(C){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 booleanArray(2*E);case"bvec3":return booleanArray(3*E);case"bvec4":return booleanArray(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 uniformParsers=[{test:C=>C.type==="float"&&C.size===1&&!C.isArray,code:C=>`
62
+ if(uv["${C}"] !== ud["${C}"].value)
39
63
  {
40
- ud["${t}"].value = uv["${t}"]
41
- gl.uniform1f(ud["${t}"].location, uv["${t}"])
64
+ ud["${C}"].value = uv["${C}"]
65
+ gl.uniform1f(ud["${C}"].location, uv["${C}"])
42
66
  }
43
- `},{test:(t,e)=>(t.type==="sampler2D"||t.type==="samplerCube"||t.type==="sampler2DArray")&&t.size===1&&!t.isArray&&(e==null||e.castToBaseTexture!==void 0),code:t=>`t = syncData.textureCount++;
67
+ `},{test:(C,E)=>(C.type==="sampler2D"||C.type==="samplerCube"||C.type==="sampler2DArray")&&C.size===1&&!C.isArray&&(E==null||E.castToBaseTexture!==void 0),code:C=>`t = syncData.textureCount++;
44
68
 
45
- renderer.texture.bind(uv["${t}"], t);
69
+ renderer.texture.bind(uv["${C}"], t);
46
70
 
47
- if(ud["${t}"].value !== t)
71
+ if(ud["${C}"].value !== t)
48
72
  {
49
- ud["${t}"].value = t;
50
- gl.uniform1i(ud["${t}"].location, t);
73
+ ud["${C}"].value = t;
74
+ gl.uniform1i(ud["${C}"].location, t);
51
75
  ; // eslint-disable-line max-len
52
- }`},{test:(t,e)=>t.type==="mat3"&&t.size===1&&!t.isArray&&e.a!==void 0,code:t=>`
53
- gl.uniformMatrix3fv(ud["${t}"].location, false, uv["${t}"].toArray(true));
54
- `,codeUbo:t=>`
55
- var ${t}_matrix = uv.${t}.toArray(true);
56
-
57
- data[offset] = ${t}_matrix[0];
58
- data[offset+1] = ${t}_matrix[1];
59
- data[offset+2] = ${t}_matrix[2];
76
+ }`},{test:(C,E)=>C.type==="mat3"&&C.size===1&&!C.isArray&&E.a!==void 0,code:C=>`
77
+ gl.uniformMatrix3fv(ud["${C}"].location, false, uv["${C}"].toArray(true));
78
+ `,codeUbo:C=>`
79
+ var ${C}_matrix = uv.${C}.toArray(true);
80
+
81
+ data[offset] = ${C}_matrix[0];
82
+ data[offset+1] = ${C}_matrix[1];
83
+ data[offset+2] = ${C}_matrix[2];
60
84
 
61
- data[offset + 4] = ${t}_matrix[3];
62
- data[offset + 5] = ${t}_matrix[4];
63
- data[offset + 6] = ${t}_matrix[5];
85
+ data[offset + 4] = ${C}_matrix[3];
86
+ data[offset + 5] = ${C}_matrix[4];
87
+ data[offset + 6] = ${C}_matrix[5];
64
88
 
65
- data[offset + 8] = ${t}_matrix[6];
66
- data[offset + 9] = ${t}_matrix[7];
67
- data[offset + 10] = ${t}_matrix[8];
68
- `},{test:(t,e)=>t.type==="vec2"&&t.size===1&&!t.isArray&&e.x!==void 0,code:t=>`
69
- cv = ud["${t}"].value;
70
- v = uv["${t}"];
89
+ data[offset + 8] = ${C}_matrix[6];
90
+ data[offset + 9] = ${C}_matrix[7];
91
+ data[offset + 10] = ${C}_matrix[8];
92
+ `},{test:(C,E)=>C.type==="vec2"&&C.size===1&&!C.isArray&&E.x!==void 0,code:C=>`
93
+ cv = ud["${C}"].value;
94
+ v = uv["${C}"];
71
95
 
72
96
  if(cv[0] !== v.x || cv[1] !== v.y)
73
97
  {
74
98
  cv[0] = v.x;
75
99
  cv[1] = v.y;
76
- gl.uniform2f(ud["${t}"].location, v.x, v.y);
77
- }`,codeUbo:t=>`
78
- v = uv.${t};
100
+ gl.uniform2f(ud["${C}"].location, v.x, v.y);
101
+ }`,codeUbo:C=>`
102
+ v = uv.${C};
79
103
 
80
104
  data[offset] = v.x;
81
105
  data[offset+1] = v.y;
82
- `},{test:t=>t.type==="vec2"&&t.size===1&&!t.isArray,code:t=>`
83
- cv = ud["${t}"].value;
84
- v = uv["${t}"];
106
+ `},{test:C=>C.type==="vec2"&&C.size===1&&!C.isArray,code:C=>`
107
+ cv = ud["${C}"].value;
108
+ v = uv["${C}"];
85
109
 
86
110
  if(cv[0] !== v[0] || cv[1] !== v[1])
87
111
  {
88
112
  cv[0] = v[0];
89
113
  cv[1] = v[1];
90
- gl.uniform2f(ud["${t}"].location, v[0], v[1]);
114
+ gl.uniform2f(ud["${C}"].location, v[0], v[1]);
91
115
  }
92
- `},{test:(t,e)=>t.type==="vec4"&&t.size===1&&!t.isArray&&e.width!==void 0,code:t=>`
93
- cv = ud["${t}"].value;
94
- v = uv["${t}"];
116
+ `},{test:(C,E)=>C.type==="vec4"&&C.size===1&&!C.isArray&&E.width!==void 0,code:C=>`
117
+ cv = ud["${C}"].value;
118
+ v = uv["${C}"];
95
119
 
96
120
  if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)
97
121
  {
@@ -99,17 +123,17 @@ void main(void){
99
123
  cv[1] = v.y;
100
124
  cv[2] = v.width;
101
125
  cv[3] = v.height;
102
- gl.uniform4f(ud["${t}"].location, v.x, v.y, v.width, v.height)
103
- }`,codeUbo:t=>`
104
- v = uv.${t};
126
+ gl.uniform4f(ud["${C}"].location, v.x, v.y, v.width, v.height)
127
+ }`,codeUbo:C=>`
128
+ v = uv.${C};
105
129
 
106
130
  data[offset] = v.x;
107
131
  data[offset+1] = v.y;
108
132
  data[offset+2] = v.width;
109
133
  data[offset+3] = v.height;
110
- `},{test:(t,e)=>t.type==="vec4"&&t.size===1&&!t.isArray&&e.red!==void 0,code:t=>`
111
- cv = ud["${t}"].value;
112
- v = uv["${t}"];
134
+ `},{test:(C,E)=>C.type==="vec4"&&C.size===1&&!C.isArray&&E.red!==void 0,code:C=>`
135
+ cv = ud["${C}"].value;
136
+ v = uv["${C}"];
113
137
 
114
138
  if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha)
115
139
  {
@@ -117,17 +141,17 @@ void main(void){
117
141
  cv[1] = v.green;
118
142
  cv[2] = v.blue;
119
143
  cv[3] = v.alpha;
120
- gl.uniform4f(ud["${t}"].location, v.red, v.green, v.blue, v.alpha)
121
- }`,codeUbo:t=>`
122
- v = uv.${t};
144
+ gl.uniform4f(ud["${C}"].location, v.red, v.green, v.blue, v.alpha)
145
+ }`,codeUbo:C=>`
146
+ v = uv.${C};
123
147
 
124
148
  data[offset] = v.red;
125
149
  data[offset+1] = v.green;
126
150
  data[offset+2] = v.blue;
127
151
  data[offset+3] = v.alpha;
128
- `},{test:(t,e)=>t.type==="vec3"&&t.size===1&&!t.isArray&&e.red!==void 0,code:t=>`
129
- cv = ud["${t}"].value;
130
- v = uv["${t}"];
152
+ `},{test:(C,E)=>C.type==="vec3"&&C.size===1&&!C.isArray&&E.red!==void 0,code:C=>`
153
+ cv = ud["${C}"].value;
154
+ v = uv["${C}"];
131
155
 
132
156
  if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.a)
133
157
  {
@@ -135,16 +159,16 @@ void main(void){
135
159
  cv[1] = v.green;
136
160
  cv[2] = v.blue;
137
161
 
138
- gl.uniform3f(ud["${t}"].location, v.red, v.green, v.blue)
139
- }`,codeUbo:t=>`
140
- v = uv.${t};
162
+ gl.uniform3f(ud["${C}"].location, v.red, v.green, v.blue)
163
+ }`,codeUbo:C=>`
164
+ v = uv.${C};
141
165
 
142
166
  data[offset] = v.red;
143
167
  data[offset+1] = v.green;
144
168
  data[offset+2] = v.blue;
145
- `},{test:t=>t.type==="vec4"&&t.size===1&&!t.isArray,code:t=>`
146
- cv = ud["${t}"].value;
147
- v = uv["${t}"];
169
+ `},{test:C=>C.type==="vec4"&&C.size===1&&!C.isArray,code:C=>`
170
+ cv = ud["${C}"].value;
171
+ v = uv["${C}"];
148
172
 
149
173
  if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
150
174
  {
@@ -153,8 +177,8 @@ void main(void){
153
177
  cv[2] = v[2];
154
178
  cv[3] = v[3];
155
179
 
156
- gl.uniform4f(ud["${t}"].location, v[0], v[1], v[2], v[3])
157
- }`}],gw={float:`
180
+ gl.uniform4f(ud["${C}"].location, v[0], v[1], v[2], v[3])
181
+ }`}],GLSL_TO_SINGLE_SETTERS_CACHED={float:`
158
182
  if (cv !== v)
159
183
  {
160
184
  cu.value = v;
@@ -290,36 +314,36 @@ void main(void){
290
314
  cu.value = v;
291
315
 
292
316
  gl.uniform1i(location, v);
293
- }`},mw={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 vw(t,e){var n;const r=[`
317
+ }`},GLSL_TO_ARRAY_SETTERS={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 generateUniformsSync(C,E){var B;const I=[`
294
318
  var v = null;
295
319
  var cv = null;
296
320
  var cu = null;
297
321
  var t = 0;
298
322
  var gl = renderer.gl;
299
- `];for(const i in t.uniforms){const a=e[i];if(!a){(n=t.uniforms[i])!=null&&n.group&&(t.uniforms[i].ubo?r.push(`
300
- renderer.shader.syncUniformBufferGroup(uv.${i}, '${i}');
301
- `):r.push(`
302
- renderer.shader.syncUniformGroup(uv.${i}, syncData);
303
- `));continue}const u=t.uniforms[i];let l=!1;for(let f=0;f<li.length;f++)if(li[f].test(a,u)){r.push(li[f].code(i,u)),l=!0;break}if(!l){const p=(a.size===1&&!a.isArray?gw:mw)[a.type].replace("location",`ud["${i}"].location`);r.push(`
304
- cu = ud["${i}"];
323
+ `];for(const U in C.uniforms){const V=E[U];if(!V){(B=C.uniforms[U])!=null&&B.group&&(C.uniforms[U].ubo?I.push(`
324
+ renderer.shader.syncUniformBufferGroup(uv.${U}, '${U}');
325
+ `):I.push(`
326
+ renderer.shader.syncUniformGroup(uv.${U}, syncData);
327
+ `));continue}const X=C.uniforms[U];let Y=!1;for(let K=0;K<uniformParsers.length;K++)if(uniformParsers[K].test(V,X)){I.push(uniformParsers[K].code(U,X)),Y=!0;break}if(!Y){const J=(V.size===1&&!V.isArray?GLSL_TO_SINGLE_SETTERS_CACHED:GLSL_TO_ARRAY_SETTERS)[V.type].replace("location",`ud["${U}"].location`);I.push(`
328
+ cu = ud["${U}"];
305
329
  cv = cu.value;
306
- v = uv["${i}"];
307
- ${p};`)}}return new Function("ud","uv","renderer","syncData",r.join(`
308
- `))}const id={};let ci=id;function _w(){if(ci===id||ci!=null&&ci.isContextLost()){const t=be.ADAPTER.createCanvas();let e;be.PREFER_ENV>=vn.WEBGL2&&(e=t.getContext("webgl2",{})),e||(e=t.getContext("webgl",{})||t.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),ci=e}return ci}let ha;function yw(){if(!ha){ha=qt.MEDIUM;const t=_w();t&&t.getShaderPrecisionFormat&&(ha=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision?qt.HIGH:qt.MEDIUM)}return ha}function sd(t,e){const r=t.getShaderSource(e).split(`
309
- `).map((p,v)=>`${v}: ${p}`),n=t.getShaderInfoLog(e),i=n.split(`
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 xw(t,e,r,n){t.getProgramParameter(e,t.LINK_STATUS)||(t.getShaderParameter(r,t.COMPILE_STATUS)||sd(t,r),t.getShaderParameter(n,t.COMPILE_STATUS)||sd(t,n),console.error("PixiJS Error: Could not initialize shader."),t.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(e)))}const bw={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 ad(t){return bw[t]}let fa=null;const od={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 ud(t,e){if(!fa){const r=Object.keys(od);fa={};for(let n=0;n<r.length;++n){const i=r[n];fa[t[i]]=od[i]}}return fa[e]}function ld(t,e,r){if(t.substring(0,9)!=="precision"){let n=e;return e===qt.HIGH&&r!==qt.HIGH&&(n=qt.MEDIUM),`precision ${n} float;
312
- ${t}`}else if(r!==qt.HIGH&&t.substring(0,15)==="precision highp")return t.replace("precision highp","precision mediump");return t}let is;function ww(){if(typeof is=="boolean")return is;try{is=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{is=!1}return is}let Tw=0;const da={},hi=class{constructor(t,e,r="pixi-shader",n={}){this.extra={},this.id=Tw++,this.vertexSrc=t||hi.defaultVertexSrc,this.fragmentSrc=e||hi.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,"-"),da[r]?(da[r]++,r+=`-${da[r]}`):da[r]=1,this.vertexSrc=`#define SHADER_NAME ${r}
313
- ${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${r}
314
- ${this.fragmentSrc}`,this.vertexSrc=ld(this.vertexSrc,hi.defaultVertexPrecision,qt.HIGH),this.fragmentSrc=ld(this.fragmentSrc,hi.defaultFragmentPrecision,yw())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return pw}static get defaultFragmentSrc(){return dw}static from(t,e,r){const n=t+e;let i=qf[n];return i||(qf[n]=i=new hi(t,e,r)),i}};let Br=hi;Br.defaultVertexPrecision=qt.HIGH,Br.defaultFragmentPrecision=Kn.apple.device?qt.HIGH:qt.MEDIUM;let Aw=0;class ar{constructor(e,r,n){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=Aw++,this.static=!!r,this.ubo=!!n,e instanceof Pt?(this.buffer=e,this.buffer.type=Sr.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=e,this.ubo&&(this.buffer=new Pt(new Float32Array(1)),this.buffer.type=Sr.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 ar(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 ar(e,r,n)}static uboFrom(e,r){return new ar(e,r??!0,!0)}}class ss{constructor(e,r){this.uniformBindCount=0,this.program=e,r?r instanceof ar?this.uniformGroup=r:this.uniformGroup=new ar(r):this.uniformGroup=new ar({}),this.disposeRunner=new sr("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=Br.from(e,r);return new ss(i,n)}}class Sw{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]=ar.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 Br(this.vertexSrc,i)}const r={tint:new Float32Array([1,1,1,1]),translationMatrix:new Mt,default:this.defaultGroupCache[e]};return new ss(this.programCache[e],r)}generateSampleSrc(e){let r="";r+=`
315
- `,r+=`
316
- `;for(let n=0;n<e;n++)n>0&&(r+=`
317
- else `),n<e-1&&(r+=`if(vTextureId < ${n}.5)`),r+=`
318
- {`,r+=`
319
- color = texture2D(uSamplers[${n}], vTextureCoord);`,r+=`
320
- }`;return r+=`
321
- `,r+=`
322
- `,r}}class nl{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 Ew(){return!Kn.apple.device}function Cw(t){let e=!0;const r=be.ADAPTER.getNavigator();if(Kn.tablet||Kn.phone){if(Kn.apple.device){const n=r.userAgent.match(/OS (\d+)_(\d+)?/);n&&parseInt(n[1],10)<11&&(e=!1)}if(Kn.android.device){const n=r.userAgent.match(/Android\s([0-9.]*)/);n&&parseInt(n[1],10)<7&&(e=!1)}}return e?t:4}class cd{constructor(e){this.renderer=e}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(e){}}var Iw=`varying vec2 vTextureCoord;
330
+ v = uv["${U}"];
331
+ ${J};`)}}return new Function("ud","uv","renderer","syncData",I.join(`
332
+ `))}const unknownContext={};let context=unknownContext;function getTestContext(){if(context===unknownContext||context!=null&&context.isContextLost()){const C=settings.ADAPTER.createCanvas();let E;settings.PREFER_ENV>=ENV.WEBGL2&&(E=C.getContext("webgl2",{})),E||(E=C.getContext("webgl",{})||C.getContext("experimental-webgl",{}),E?E.getExtension("WEBGL_draw_buffers"):E=null),context=E}return context}let maxFragmentPrecision;function getMaxFragmentPrecision(){if(!maxFragmentPrecision){maxFragmentPrecision=PRECISION.MEDIUM;const C=getTestContext();C&&C.getShaderPrecisionFormat&&(maxFragmentPrecision=C.getShaderPrecisionFormat(C.FRAGMENT_SHADER,C.HIGH_FLOAT).precision?PRECISION.HIGH:PRECISION.MEDIUM)}return maxFragmentPrecision}function logPrettyShaderError(C,E){const I=C.getShaderSource(E).split(`
333
+ `).map((J,xe)=>`${xe}: ${J}`),B=C.getShaderInfoLog(E),U=B.split(`
334
+ `),V={},X=U.map(J=>parseFloat(J.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(J=>J&&!V[J]?(V[J]=!0,!0):!1),Y=[""];X.forEach(J=>{I[J-1]=`%c${I[J-1]}%c`,Y.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const K=I.join(`
335
+ `);Y[0]=K,console.error(B),console.groupCollapsed("click to view full shader code"),console.warn(...Y),console.groupEnd()}function logProgramError(C,E,I,B){C.getProgramParameter(E,C.LINK_STATUS)||(C.getShaderParameter(I,C.COMPILE_STATUS)||logPrettyShaderError(C,I),C.getShaderParameter(B,C.COMPILE_STATUS)||logPrettyShaderError(C,B),console.error("PixiJS Error: Could not initialize shader."),C.getProgramInfoLog(E)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",C.getProgramInfoLog(E)))}const GLSL_TO_SIZE={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 mapSize(C){return GLSL_TO_SIZE[C]}let GL_TABLE=null;const GL_TO_GLSL_TYPES={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 mapType(C,E){if(!GL_TABLE){const I=Object.keys(GL_TO_GLSL_TYPES);GL_TABLE={};for(let B=0;B<I.length;++B){const U=I[B];GL_TABLE[C[U]]=GL_TO_GLSL_TYPES[U]}}return GL_TABLE[E]}function setPrecision(C,E,I){if(C.substring(0,9)!=="precision"){let B=E;return E===PRECISION.HIGH&&I!==PRECISION.HIGH&&(B=PRECISION.MEDIUM),`precision ${B} float;
336
+ ${C}`}else if(I!==PRECISION.HIGH&&C.substring(0,15)==="precision highp")return C.replace("precision highp","precision mediump");return C}let unsafeEval;function unsafeEvalSupported(){if(typeof unsafeEval=="boolean")return unsafeEval;try{unsafeEval=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{unsafeEval=!1}return unsafeEval}let UID$2=0;const nameCache={},_Program=class{constructor(C,E,I="pixi-shader",B={}){this.extra={},this.id=UID$2++,this.vertexSrc=C||_Program.defaultVertexSrc,this.fragmentSrc=E||_Program.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=B,this.vertexSrc.substring(0,8)!=="#version"&&(I=I.replace(/\s+/g,"-"),nameCache[I]?(nameCache[I]++,I+=`-${nameCache[I]}`):nameCache[I]=1,this.vertexSrc=`#define SHADER_NAME ${I}
337
+ ${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${I}
338
+ ${this.fragmentSrc}`,this.vertexSrc=setPrecision(this.vertexSrc,_Program.defaultVertexPrecision,PRECISION.HIGH),this.fragmentSrc=setPrecision(this.fragmentSrc,_Program.defaultFragmentPrecision,getMaxFragmentPrecision())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return defaultVertex$2}static get defaultFragmentSrc(){return defaultFragment$2}static from(C,E,I){const B=C+E;let U=ProgramCache[B];return U||(ProgramCache[B]=U=new _Program(C,E,I)),U}};let Program=_Program;Program.defaultVertexPrecision=PRECISION.HIGH,Program.defaultFragmentPrecision=isMobile.apple.device?PRECISION.HIGH:PRECISION.MEDIUM;let UID$1=0;class UniformGroup{constructor(E,I,B){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=UID$1++,this.static=!!I,this.ubo=!!B,E instanceof Buffer?(this.buffer=E,this.buffer.type=BUFFER_TYPE.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=E,this.ubo&&(this.buffer=new Buffer(new Float32Array(1)),this.buffer.type=BUFFER_TYPE.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(E,I,B){if(!this.ubo)this.uniforms[E]=new UniformGroup(I,B);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(E,I,B){return new UniformGroup(E,I,B)}static uboFrom(E,I){return new UniformGroup(E,I??!0,!0)}}class Shader{constructor(E,I){this.uniformBindCount=0,this.program=E,I?I instanceof UniformGroup?this.uniformGroup=I:this.uniformGroup=new UniformGroup(I):this.uniformGroup=new UniformGroup({}),this.disposeRunner=new Runner("disposeShader")}checkUniformExists(E,I){if(I.uniforms[E])return!0;for(const B in I.uniforms){const U=I.uniforms[B];if(U.group&&this.checkUniformExists(E,U))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(E,I,B){const U=Program.from(E,I);return new Shader(U,B)}}class BatchShaderGenerator{constructor(E,I){if(this.vertexSrc=E,this.fragTemplate=I,this.programCache={},this.defaultGroupCache={},!I.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!I.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(E){if(!this.programCache[E]){const B=new Int32Array(E);for(let V=0;V<E;V++)B[V]=V;this.defaultGroupCache[E]=UniformGroup.from({uSamplers:B},!0);let U=this.fragTemplate;U=U.replace(/%count%/gi,`${E}`),U=U.replace(/%forloop%/gi,this.generateSampleSrc(E)),this.programCache[E]=new Program(this.vertexSrc,U)}const I={tint:new Float32Array([1,1,1,1]),translationMatrix:new Matrix$2,default:this.defaultGroupCache[E]};return new Shader(this.programCache[E],I)}generateSampleSrc(E){let I="";I+=`
339
+ `,I+=`
340
+ `;for(let B=0;B<E;B++)B>0&&(I+=`
341
+ else `),B<E-1&&(I+=`if(vTextureId < ${B}.5)`),I+=`
342
+ {`,I+=`
343
+ color = texture2D(uSamplers[${B}], vTextureCoord);`,I+=`
344
+ }`;return I+=`
345
+ `,I+=`
346
+ `,I}}class BatchTextureArray{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 canUploadSameBuffer(){return!isMobile.apple.device}function maxRecommendedTextures(C){let E=!0;const I=settings.ADAPTER.getNavigator();if(isMobile.tablet||isMobile.phone){if(isMobile.apple.device){const B=I.userAgent.match(/OS (\d+)_(\d+)?/);B&&parseInt(B[1],10)<11&&(E=!1)}if(isMobile.android.device){const B=I.userAgent.match(/Android\s([0-9.]*)/);B&&parseInt(B[1],10)<7&&(E=!1)}}return E?C:4}class ObjectRenderer{constructor(E){this.renderer=E}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(E){}}var defaultFragment$1=`varying vec2 vTextureCoord;
323
347
  varying vec4 vColor;
324
348
  varying float vTextureId;
325
349
  uniform sampler2D uSamplers[%count%];
@@ -329,7 +353,7 @@ void main(void){
329
353
  %forloop%
330
354
  gl_FragColor = color * vColor;
331
355
  }
332
- `,Rw=`precision highp float;
356
+ `,defaultVertex$1=`precision highp float;
333
357
  attribute vec2 aVertexPosition;
334
358
  attribute vec2 aTextureCoord;
335
359
  attribute vec4 aColor;
@@ -350,14 +374,14 @@ void main(void){
350
374
  vTextureId = aTextureId;
351
375
  vColor = aColor * tint;
352
376
  }
353
- `;const or=class extends cd{constructor(t){super(t),this.setShaderGenerator(),this.geometryClass=Jf,this.vertexSize=6,this.state=aa.for2d(),this.size=or.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??Cw(32),this._defaultMaxTextures}static set defaultMaxTextures(t){this._defaultMaxTextures=t}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??Ew(),this._canUploadSameBuffer}static set canUploadSameBuffer(t){this._canUploadSameBuffer=t}get MAX_TEXTURES(){return Re("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return Rw}static get defaultFragmentTemplate(){return Iw}setShaderGenerator({vertex:t=or.defaultVertexSrc,fragment:e=or.defaultFragmentTemplate}={}){this.shaderGenerator=new Sw(t,e)}contextChange(){const t=this.renderer.gl;be.PREFER_ENV===vn.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),or.defaultMaxTextures),this.maxTextures=nw(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}=or,r=this.size/4,n=Math.floor(r/this.maxTextures)+1;for(;t.length<r;)t.push(new Zu);for(;e.length<n;)e.push(new nl);for(let i=0;i<this.maxTextures;i++)this._tempBoundTextures[i]=null}onPrerender(){this._flushId=0}render(t){t._texture.valid&&(this._vertexCount+t.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)}buildTexturesAndDrawCalls(){const{_bufferedTextures:t,maxTextures:e}=this,r=or._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=or._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=Zb[_.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;or.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=or._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),or.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=na(Math.ceil(t/8)),r=Wf(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 ew(n*this.vertexSize*4)),i}getIndexBuffer(t){const e=na(Math.ceil(t/12)),r=Wf(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=Ct.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 ur=or;ur.defaultBatchSize=4096,ur.extension={name:"batch",type:Se.RendererPlugin},ur._drawCallPool=[],ur._textureArrayPool=[],$e.add(ur);var Pw=`varying vec2 vTextureCoord;
377
+ `;const _BatchRenderer=class extends ObjectRenderer{constructor(C){super(C),this.setShaderGenerator(),this.geometryClass=BatchGeometry,this.vertexSize=6,this.state=State$1.for2d(),this.size=_BatchRenderer.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),C.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??maxRecommendedTextures(32),this._defaultMaxTextures}static set defaultMaxTextures(C){this._defaultMaxTextures=C}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??canUploadSameBuffer(),this._canUploadSameBuffer}static set canUploadSameBuffer(C){this._canUploadSameBuffer=C}get MAX_TEXTURES(){return deprecation("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return defaultVertex$1}static get defaultFragmentTemplate(){return defaultFragment$1}setShaderGenerator({vertex:C=_BatchRenderer.defaultVertexSrc,fragment:E=_BatchRenderer.defaultFragmentTemplate}={}){this.shaderGenerator=new BatchShaderGenerator(C,E)}contextChange(){const C=this.renderer.gl;settings.PREFER_ENV===ENV.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(C.getParameter(C.MAX_TEXTURE_IMAGE_UNITS),_BatchRenderer.defaultMaxTextures),this.maxTextures=checkMaxIfStatementsInShader(this.maxTextures,C)),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:C,_textureArrayPool:E}=_BatchRenderer,I=this.size/4,B=Math.floor(I/this.maxTextures)+1;for(;C.length<I;)C.push(new BatchDrawCall);for(;E.length<B;)E.push(new BatchTextureArray);for(let U=0;U<this.maxTextures;U++)this._tempBoundTextures[U]=null}onPrerender(){this._flushId=0}render(C){C._texture.valid&&(this._vertexCount+C.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=C.vertexData.length/2,this._indexCount+=C.indices.length,this._bufferedTextures[this._bufferSize]=C._texture.baseTexture,this._bufferedElements[this._bufferSize++]=C)}buildTexturesAndDrawCalls(){const{_bufferedTextures:C,maxTextures:E}=this,I=_BatchRenderer._textureArrayPool,B=this.renderer.batch,U=this._tempBoundTextures,V=this.renderer.textureGC.count;let X=++BaseTexture._globalBatch,Y=0,K=I[0],J=0;B.copyBoundTextures(U,E);for(let xe=0;xe<this._bufferSize;++xe){const Z=C[xe];C[xe]=null,Z._batchEnabled!==X&&(K.count>=E&&(B.boundArray(K,U,X,E),this.buildDrawCalls(K,J,xe),J=xe,K=I[++Y],++X),Z._batchEnabled=X,Z.touched=V,K.elements[K.count++]=Z)}K.count>0&&(B.boundArray(K,U,X,E),this.buildDrawCalls(K,J,this._bufferSize),++Y,++X);for(let xe=0;xe<U.length;xe++)U[xe]=null;BaseTexture._globalBatch=X}buildDrawCalls(C,E,I){const{_bufferedElements:B,_attributeBuffer:U,_indexBuffer:V,vertexSize:X}=this,Y=_BatchRenderer._drawCallPool;let K=this._dcIndex,J=this._aIndex,xe=this._iIndex,Z=Y[K];Z.start=this._iIndex,Z.texArray=C;for(let _e=E;_e<I;++_e){const Se=B[_e],Ee=Se._texture.baseTexture,Ae=premultiplyBlendMode[Ee.alphaMode?1:0][Se.blendMode];B[_e]=null,E<_e&&Z.blend!==Ae&&(Z.size=xe-Z.start,E=_e,Z=Y[++K],Z.texArray=C,Z.start=xe),this.packInterleavedGeometry(Se,U,V,J,xe),J+=Se.vertexData.length/2*X,xe+=Se.indices.length,Z.blend=Ae}E<I&&(Z.size=xe-Z.start,++K),this._dcIndex=K,this._aIndex=J,this._iIndex=xe}bindAndClearTexArray(C){const E=this.renderer.texture;for(let I=0;I<C.count;I++)E.bind(C.elements[I],C.ids[I]),C.elements[I]=null;C.count=0}updateGeometry(){const{_packedGeometries:C,_attributeBuffer:E,_indexBuffer:I}=this;_BatchRenderer.canUploadSameBuffer?(C[this._flushId]._buffer.update(E.rawBinaryData),C[this._flushId]._indexBuffer.update(I),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,C[this._flushId]=new this.geometryClass),C[this._flushId]._buffer.update(E.rawBinaryData),C[this._flushId]._indexBuffer.update(I),this.renderer.geometry.bind(C[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const C=this._dcIndex,{gl:E,state:I}=this.renderer,B=_BatchRenderer._drawCallPool;let U=null;for(let V=0;V<C;V++){const{texArray:X,type:Y,size:K,start:J,blend:xe}=B[V];U!==X&&(U=X,this.bindAndClearTexArray(X)),this.state.blendMode=xe,I.set(this.state),E.drawElements(Y,K,E.UNSIGNED_SHORT,J*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),_BatchRenderer.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let C=0;C<this._packedGeometryPoolSize;C++)this._packedGeometries[C]&&this._packedGeometries[C].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(C){const E=nextPow2(Math.ceil(C/8)),I=log2(E),B=E*8;this._aBuffers.length<=I&&(this._iBuffers.length=I+1);let U=this._aBuffers[B];return U||(this._aBuffers[B]=U=new ViewableBuffer(B*this.vertexSize*4)),U}getIndexBuffer(C){const E=nextPow2(Math.ceil(C/12)),I=log2(E),B=E*12;this._iBuffers.length<=I&&(this._iBuffers.length=I+1);let U=this._iBuffers[I];return U||(this._iBuffers[I]=U=new Uint16Array(B)),U}packInterleavedGeometry(C,E,I,B,U){const{uint32View:V,float32View:X}=E,Y=B/this.vertexSize,K=C.uvs,J=C.indices,xe=C.vertexData,Z=C._texture.baseTexture._batchLocation,_e=Math.min(C.worldAlpha,1),Se=Color.shared.setValue(C._tintRGB).toPremultiplied(_e);for(let Ee=0;Ee<xe.length;Ee+=2)X[B++]=xe[Ee],X[B++]=xe[Ee+1],X[B++]=K[Ee],X[B++]=K[Ee+1],V[B++]=Se,X[B++]=Z;for(let Ee=0;Ee<J.length;Ee++)I[U++]=Y+J[Ee]}};let BatchRenderer=_BatchRenderer;BatchRenderer.defaultBatchSize=4096,BatchRenderer.extension={name:"batch",type:ExtensionType.RendererPlugin},BatchRenderer._drawCallPool=[],BatchRenderer._textureArrayPool=[],extensions.add(BatchRenderer);var defaultFragment=`varying vec2 vTextureCoord;
354
378
 
355
379
  uniform sampler2D uSampler;
356
380
 
357
381
  void main(void){
358
382
  gl_FragColor = texture2D(uSampler, vTextureCoord);
359
383
  }
360
- `,Mw=`attribute vec2 aVertexPosition;
384
+ `,defaultVertex=`attribute vec2 aVertexPosition;
361
385
 
362
386
  uniform mat3 projectionMatrix;
363
387
 
@@ -383,7 +407,7 @@ void main(void)
383
407
  gl_Position = filterVertexPosition();
384
408
  vTextureCoord = filterTextureCoord();
385
409
  }
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 Xe(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 We(u.x,u.y):new We(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 Xe,this.destinationFrame=new Xe,this.bindingSourceFrame=new Xe,this.bindingDestinationFrame=new Xe,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const _a=[new We,new We,new We,new We],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 Xe,this.activeState={},this.globalUniforms=new ar({outputFrame:new Xe,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 Xe;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 Xe,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 Xe}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;
410
+ `;const _Filter=class extends Shader{constructor(C,E,I){const B=Program.from(C||_Filter.defaultVertexSrc,E||_Filter.defaultFragmentSrc);super(B,I),this.padding=0,this.resolution=_Filter.defaultResolution,this.multisample=_Filter.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new State$1}apply(C,E,I,B,U){C.applyFilter(this,E,I,B)}get blendMode(){return this.state.blendMode}set blendMode(C){this.state.blendMode=C}get resolution(){return this._resolution}set resolution(C){this._resolution=C}static get defaultVertexSrc(){return defaultVertex}static get defaultFragmentSrc(){return defaultFragment}};let Filter=_Filter;Filter.defaultResolution=1,Filter.defaultMultisample=MSAA_QUALITY.NONE;class BackgroundSystem{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Color(0),this.alpha=1}init(E){this.clearBeforeRender=E.clearBeforeRender;const{backgroundColor:I,background:B,backgroundAlpha:U}=E,V=B??I;V!==void 0&&(this.color=V),this.alpha=U}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(){}}BackgroundSystem.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},BackgroundSystem.extension={type:[ExtensionType.RendererSystem,ExtensionType.CanvasRendererSystem],name:"background"},extensions.add(BackgroundSystem);class BatchSystem{constructor(E){this.renderer=E,this.emptyRenderer=new ObjectRenderer(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,I){const{boundTextures:B}=this.renderer.texture;for(let U=I-1;U>=0;--U)E[U]=B[U]||null,E[U]&&(E[U]._batchLocation=U)}boundArray(E,I,B,U){const{elements:V,ids:X,count:Y}=E;let K=0;for(let J=0;J<Y;J++){const xe=V[J],Z=xe._batchLocation;if(Z>=0&&Z<U&&I[Z]===xe){X[J]=Z;continue}for(;K<U;){const _e=I[K];if(_e&&_e._batchEnabled===B&&_e._batchLocation===K){K++;continue}X[J]=K,xe._batchLocation=K,I[K]=xe;break}}}destroy(){this.renderer=null}}BatchSystem.extension={type:ExtensionType.RendererSystem,name:"batch"},extensions.add(BatchSystem);let CONTEXT_UID_COUNTER=0;class ContextSystem{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=CONTEXT_UID_COUNTER++}init(E){if(E.context)this.initFromContext(E.context);else{const I=this.renderer.background.alpha<1,B=E.premultipliedAlpha;this.preserveDrawingBuffer=E.preserveDrawingBuffer,this.useContextAlpha=E.useContextAlpha,this.powerPreference=E.powerPreference,this.initFromOptions({alpha:I,premultipliedAlpha:B,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=CONTEXT_UID_COUNTER++,this.renderer.runners.contextChange.emit(E);const I=this.renderer.view;I.addEventListener!==void 0&&(I.addEventListener("webglcontextlost",this.handleContextLost,!1),I.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(E){const I=this.createContext(this.renderer.view,E);this.initFromContext(I)}createContext(E,I){let B;if(settings.PREFER_ENV>=ENV.WEBGL2&&(B=E.getContext("webgl2",I)),B)this.webGLVersion=2;else if(this.webGLVersion=1,B=E.getContext("webgl",I)||E.getContext("experimental-webgl",I),!B)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=B,this.getExtensions(),this.gl}getExtensions(){const{gl:E}=this,I={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,I,{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,I,{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 I=E.getContextAttributes(),B="WebGL2RenderingContext"in globalThis&&E instanceof globalThis.WebGL2RenderingContext;B&&(this.webGLVersion=2),I&&!I.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const U=B||!!E.getExtension("OES_element_index_uint");this.supports.uint32Indices=U,U||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}ContextSystem.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},ContextSystem.extension={type:ExtensionType.RendererSystem,name:"context"},extensions.add(ContextSystem);class DepthResource extends BufferResource{upload(E,I,B){const U=E.gl;U.pixelStorei(U.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.alphaMode===ALPHA_MODES.UNPACK);const V=I.realWidth,X=I.realHeight;return B.width===V&&B.height===X?U.texSubImage2D(I.target,0,0,0,V,X,I.format,B.type,this.data):(B.width=V,B.height=X,U.texImage2D(I.target,0,B.internalFormat,V,X,0,I.format,B.type,this.data)),!0}}class Framebuffer{constructor(E,I){this.width=Math.round(E||100),this.height=Math.round(I||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 Runner("disposeFramebuffer"),this.multisample=MSAA_QUALITY.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(E=0,I){return this.colorTextures[E]=I||new BaseTexture(null,{scaleMode:SCALE_MODES.NEAREST,resolution:1,mipmap:MIPMAP_MODES.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(E){return this.depthTexture=E||new BaseTexture(new DepthResource(null,{width:this.width,height:this.height}),{scaleMode:SCALE_MODES.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:MIPMAP_MODES.OFF,format:FORMATS.DEPTH_COMPONENT,type:TYPES.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,I){if(E=Math.round(E),I=Math.round(I),!(E===this.width&&I===this.height)){this.width=E,this.height=I,this.dirtyId++,this.dirtySize++;for(let B=0;B<this.colorTextures.length;B++){const U=this.colorTextures[B],V=U.resolution;U.setSize(E/V,I/V)}if(this.depthTexture){const B=this.depthTexture.resolution;this.depthTexture.setSize(E/B,I/B)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}}class BaseRenderTexture extends BaseTexture{constructor(E={}){if(typeof E=="number"){const I=arguments[0],B=arguments[1],U=arguments[2],V=arguments[3];E={width:I,height:B,scaleMode:U,resolution:V}}E.width=E.width||100,E.height=E.height||100,E.multisample??(E.multisample=MSAA_QUALITY.NONE),super(null,E),this.mipmap=MIPMAP_MODES.OFF,this.valid=!0,this._clear=new Color([0,0,0,0]),this.framebuffer=new Framebuffer(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,I){this.framebuffer.resize(E*this.resolution,I*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 BaseImageResource extends Resource{constructor(E){const I=E,B=I.naturalWidth||I.videoWidth||I.width,U=I.naturalHeight||I.videoHeight||I.height;super(B,U),this.source=E,this.noSubImage=!1}static crossOrigin(E,I,B){B===void 0&&!I.startsWith("data:")?E.crossOrigin=determineCrossOrigin(I):B!==!1&&(E.crossOrigin=typeof B=="string"?B:"anonymous")}upload(E,I,B,U){const V=E.gl,X=I.realWidth,Y=I.realHeight;if(U=U||this.source,typeof HTMLImageElement<"u"&&U instanceof HTMLImageElement){if(!U.complete||U.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&U instanceof HTMLVideoElement&&U.readyState<=1&&U.buffered.length===0)return!1;return V.pixelStorei(V.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.alphaMode===ALPHA_MODES.UNPACK),!this.noSubImage&&I.target===V.TEXTURE_2D&&B.width===X&&B.height===Y?V.texSubImage2D(V.TEXTURE_2D,0,0,0,I.format,B.type,U):(B.width=X,B.height=Y,V.texImage2D(I.target,0,B.internalFormat,I.format,B.type,U)),!0}update(){if(this.destroyed)return;const E=this.source,I=E.naturalWidth||E.videoWidth||E.width,B=E.naturalHeight||E.videoHeight||E.height;this.resize(I,B),super.update()}dispose(){this.source=null}}class ImageResource extends BaseImageResource{constructor(E,I){if(I=I||{},typeof E=="string"){const B=new Image;BaseImageResource.crossOrigin(B,E,I.crossorigin),B.src=E,E=B}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=(I.createBitmap??settings.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,this.alphaMode=typeof I.alphaMode=="number"?I.alphaMode:null,this.bitmap=null,this._load=null,I.autoLoad!==!1&&this.load()}load(E){return this._load?this._load:(E!==void 0&&(this.createBitmap=E),this._load=new Promise((I,B)=>{const U=this.source;this.url=U.src;const V=()=>{this.destroyed||(U.onload=null,U.onerror=null,this.resize(U.width,U.height),this._load=null,this.createBitmap?I(this.process()):I(this))};U.complete&&U.src?V():(U.onload=V,U.onerror=X=>{B(X),this.onError.emit(X)})}),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 I=globalThis.createImageBitmap,B=!E.crossOrigin||E.crossOrigin==="anonymous";return this._process=fetch(E.src,{mode:B?"cors":"no-cors"}).then(U=>U.blob()).then(U=>I(U,0,0,E.width,E.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===ALPHA_MODES.UNPACK?"premultiply":"none"})).then(U=>this.destroyed?Promise.reject():(this.bitmap=U,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(E,I,B){if(typeof this.alphaMode=="number"&&(I.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(E,I,B);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(E,I,B,this.bitmap),!this.preserveBitmap){let U=!0;const V=I._glTextures;for(const X in V){const Y=V[X];if(Y!==B&&Y.dirtyId!==I.dirtyId){U=!1;break}}U&&(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 TextureUvs{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,I,B){const U=I.width,V=I.height;if(B){const X=E.width/2/U,Y=E.height/2/V,K=E.x/U+X,J=E.y/V+Y;B=groupD8.add(B,groupD8.NW),this.x0=K+X*groupD8.uX(B),this.y0=J+Y*groupD8.uY(B),B=groupD8.add(B,2),this.x1=K+X*groupD8.uX(B),this.y1=J+Y*groupD8.uY(B),B=groupD8.add(B,2),this.x2=K+X*groupD8.uX(B),this.y2=J+Y*groupD8.uY(B),B=groupD8.add(B,2),this.x3=K+X*groupD8.uX(B),this.y3=J+Y*groupD8.uY(B)}else this.x0=E.x/U,this.y0=E.y/V,this.x1=(E.x+E.width)/U,this.y1=E.y/V,this.x2=(E.x+E.width)/U,this.y2=(E.y+E.height)/V,this.x3=E.x/U,this.y3=(E.y+E.height)/V;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 DEFAULT_UVS=new TextureUvs;function removeAllHandlers(C){C.destroy=function(){},C.on=function(){},C.once=function(){},C.emit=function(){}}class Texture extends EventEmitter{constructor(E,I,B,U,V,X,Y){if(super(),this.noFrame=!1,I||(this.noFrame=!0,I=new Rectangle(0,0,1,1)),E instanceof Texture&&(E=E.baseTexture),this.baseTexture=E,this._frame=I,this.trim=U,this.valid=!1,this._uvs=DEFAULT_UVS,this.uvMatrix=null,this.orig=B||I,this._rotate=Number(V||0),V===!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=X?new Point(X.x,X.y):new Point(0,0),this.defaultBorders=Y,this._updateID=0,this.textureCacheIds=[],E.valid?this.noFrame?E.valid&&this.onBaseTextureUpdated(E):this.frame=I: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:I}=this.baseTexture;I!=null&&I.url&&TextureCache[I.url]&&Texture.removeFromCache(I.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,Texture.removeFromCache(this),this.textureCacheIds=null}clone(){var U;const E=this._frame.clone(),I=this._frame===this.orig?E:this.orig.clone(),B=new Texture(this.baseTexture,!this.noFrame&&E,I,(U=this.trim)==null?void 0:U.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(B._frame=E),B}updateUvs(){this._uvs===DEFAULT_UVS&&(this._uvs=new TextureUvs),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(E,I={},B=settings.STRICT_TEXTURE_CACHE){const U=typeof E=="string";let V=null;if(U)V=E;else if(E instanceof BaseTexture){if(!E.cacheId){const Y=(I==null?void 0:I.pixiIdPrefix)||"pixiid";E.cacheId=`${Y}-${uid()}`,BaseTexture.addToCache(E,E.cacheId)}V=E.cacheId}else{if(!E._pixiId){const Y=(I==null?void 0:I.pixiIdPrefix)||"pixiid";E._pixiId=`${Y}_${uid()}`}V=E._pixiId}let X=TextureCache[V];if(U&&B&&!X)throw new Error(`The cacheId "${V}" does not exist in TextureCache.`);return!X&&!(E instanceof BaseTexture)?(I.resolution||(I.resolution=getResolutionOfUrl(E)),X=new Texture(new BaseTexture(E,I)),X.baseTexture.cacheId=V,BaseTexture.addToCache(X.baseTexture,V),Texture.addToCache(X,V)):!X&&E instanceof BaseTexture&&(X=new Texture(E),Texture.addToCache(X,V)),X}static fromURL(E,I){const B=Object.assign({autoLoad:!1},I==null?void 0:I.resourceOptions),U=Texture.from(E,Object.assign({resourceOptions:B},I),!1),V=U.baseTexture.resource;return U.baseTexture.valid?Promise.resolve(U):V.load().then(()=>Promise.resolve(U))}static fromBuffer(E,I,B,U){return new Texture(BaseTexture.fromBuffer(E,I,B,U))}static fromLoader(E,I,B,U){const V=new BaseTexture(E,Object.assign({scaleMode:BaseTexture.defaultOptions.scaleMode,resolution:getResolutionOfUrl(I)},U)),{resource:X}=V;X instanceof ImageResource&&(X.url=I);const Y=new Texture(V);return B||(B=I),BaseTexture.addToCache(Y.baseTexture,B),Texture.addToCache(Y,B),B!==I&&(BaseTexture.addToCache(Y.baseTexture,I),Texture.addToCache(Y,I)),Y.baseTexture.valid?Promise.resolve(Y):new Promise(K=>{Y.baseTexture.once("loaded",()=>K(Y))})}static addToCache(E,I){I&&(E.textureCacheIds.includes(I)||E.textureCacheIds.push(I),TextureCache[I]&&TextureCache[I]!==E&&console.warn(`Texture added to the cache with an id [${I}] that already had an entry`),TextureCache[I]=E)}static removeFromCache(E){if(typeof E=="string"){const I=TextureCache[E];if(I){const B=I.textureCacheIds.indexOf(E);return B>-1&&I.textureCacheIds.splice(B,1),delete TextureCache[E],I}}else if(E!=null&&E.textureCacheIds){for(let I=0;I<E.textureCacheIds.length;++I)TextureCache[E.textureCacheIds[I]]===E&&delete TextureCache[E.textureCacheIds[I]];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:I,y:B,width:U,height:V}=E,X=I+U>this.baseTexture.width,Y=B+V>this.baseTexture.height;if(X||Y){const K=X&&Y?"and":"or",J=`X: ${I} + ${U} = ${I+U} > ${this.baseTexture.width}`,xe=`Y: ${B} + ${V} = ${B+V} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${J} ${K} ${xe}`)}this.valid=U&&V&&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 Texture._EMPTY||(Texture._EMPTY=new Texture(new BaseTexture),removeAllHandlers(Texture._EMPTY),removeAllHandlers(Texture._EMPTY.baseTexture)),Texture._EMPTY}static get WHITE(){if(!Texture._WHITE){const E=settings.ADAPTER.createCanvas(16,16),I=E.getContext("2d");E.width=16,E.height=16,I.fillStyle="white",I.fillRect(0,0,16,16),Texture._WHITE=new Texture(BaseTexture.from(E)),removeAllHandlers(Texture._WHITE),removeAllHandlers(Texture._WHITE.baseTexture)}return Texture._WHITE}}class RenderTexture extends Texture{constructor(E,I){super(E,I),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,I,B=!0){const U=this.baseTexture.resolution,V=Math.round(E*U)/U,X=Math.round(I*U)/U;this.valid=V>0&&X>0,this._frame.width=this.orig.width=V,this._frame.height=this.orig.height=X,B&&this.baseTexture.resize(V,X),this.updateUvs()}setResolution(E){const{baseTexture:I}=this;I.resolution!==E&&(I.setResolution(E),this.resize(I.width,I.height,!1))}static create(E){return new RenderTexture(new BaseRenderTexture(E))}}class RenderTexturePool{constructor(E){this.texturePool={},this.textureOptions=E||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(E,I,B=MSAA_QUALITY.NONE){const U=new BaseRenderTexture(Object.assign({width:E,height:I,resolution:1,multisample:B},this.textureOptions));return new RenderTexture(U)}getOptimalTexture(E,I,B=1,U=MSAA_QUALITY.NONE){let V;E=Math.ceil(E*B-1e-6),I=Math.ceil(I*B-1e-6),!this.enableFullScreen||E!==this._pixelsWidth||I!==this._pixelsHeight?(E=nextPow2(E),I=nextPow2(I),V=((E&65535)<<16|I&65535)>>>0,U>1&&(V+=U*4294967296)):V=U>1?-U:-1,this.texturePool[V]||(this.texturePool[V]=[]);let X=this.texturePool[V].pop();return X||(X=this.createTexture(E,I,U)),X.filterPoolKey=V,X.setResolution(B),X}getFilterTexture(E,I,B){const U=this.getOptimalTexture(E.width,E.height,I||E.resolution,B||MSAA_QUALITY.NONE);return U.filterFrame=E.filterFrame,U}returnTexture(E){const I=E.filterPoolKey;E.filterFrame=null,this.texturePool[I].push(E)}returnFilterTexture(E){this.returnTexture(E)}clear(E){if(E=E!==!1,E)for(const I in this.texturePool){const B=this.texturePool[I];if(B)for(let U=0;U<B.length;U++)B[U].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 I in this.texturePool){if(!(Number(I)<0))continue;const B=this.texturePool[I];if(B)for(let U=0;U<B.length;U++)B[U].destroy(!0);this.texturePool[I]=[]}this._pixelsWidth=E.width,this._pixelsHeight=E.height}}}RenderTexturePool.SCREEN_KEY=-1;class Quad extends Geometry{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class QuadUv extends Geometry{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 Buffer(this.vertices),this.uvBuffer=new Buffer(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(E,I){let B=0,U=0;return this.uvs[0]=B,this.uvs[1]=U,this.uvs[2]=B+I.width/E.width,this.uvs[3]=U,this.uvs[4]=B+I.width/E.width,this.uvs[5]=U+I.height/E.height,this.uvs[6]=B,this.uvs[7]=U+I.height/E.height,B=I.x,U=I.y,this.vertices[0]=B,this.vertices[1]=U,this.vertices[2]=B+I.width,this.vertices[3]=U,this.vertices[4]=B+I.width,this.vertices[5]=U+I.height,this.vertices[6]=B,this.vertices[7]=U+I.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}}class FilterState{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=MSAA_QUALITY.NONE,this.sourceFrame=new Rectangle,this.destinationFrame=new Rectangle,this.bindingSourceFrame=new Rectangle,this.bindingDestinationFrame=new Rectangle,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const tempPoints=[new Point,new Point,new Point,new Point],tempMatrix$2=new Matrix$2;class FilterSystem{constructor(E){this.renderer=E,this.defaultFilterStack=[{}],this.texturePool=new RenderTexturePool,this.statePool=[],this.quad=new Quad,this.quadUv=new QuadUv,this.tempRect=new Rectangle,this.activeState={},this.globalUniforms=new UniformGroup({outputFrame:new Rectangle,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,I){const B=this.renderer,U=this.defaultFilterStack,V=this.statePool.pop()||new FilterState,X=this.renderer.renderTexture;let Y=I[0].resolution,K=I[0].multisample,J=I[0].padding,xe=I[0].autoFit,Z=I[0].legacy??!0;for(let Ee=1;Ee<I.length;Ee++){const Ae=I[Ee];Y=Math.min(Y,Ae.resolution),K=Math.min(K,Ae.multisample),J=this.useMaxPadding?Math.max(J,Ae.padding):J+Ae.padding,xe=xe&&Ae.autoFit,Z=Z||(Ae.legacy??!0)}U.length===1&&(this.defaultFilterStack[0].renderTexture=X.current),U.push(V),V.resolution=Y,V.multisample=K,V.legacy=Z,V.target=E,V.sourceFrame.copyFrom(E.filterArea||E.getBounds(!0)),V.sourceFrame.pad(J);const _e=this.tempRect.copyFrom(X.sourceFrame);B.projection.transform&&this.transformAABB(tempMatrix$2.copyFrom(B.projection.transform).invert(),_e),xe?(V.sourceFrame.fit(_e),(V.sourceFrame.width<=0||V.sourceFrame.height<=0)&&(V.sourceFrame.width=0,V.sourceFrame.height=0)):V.sourceFrame.intersects(_e)||(V.sourceFrame.width=0,V.sourceFrame.height=0),this.roundFrame(V.sourceFrame,X.current?X.current.resolution:B.resolution,X.sourceFrame,X.destinationFrame,B.projection.transform),V.renderTexture=this.getOptimalFilterTexture(V.sourceFrame.width,V.sourceFrame.height,Y,K),V.filters=I,V.destinationFrame.width=V.renderTexture.width,V.destinationFrame.height=V.renderTexture.height;const Se=this.tempRect;Se.x=0,Se.y=0,Se.width=V.sourceFrame.width,Se.height=V.sourceFrame.height,V.renderTexture.filterFrame=V.sourceFrame,V.bindingSourceFrame.copyFrom(X.sourceFrame),V.bindingDestinationFrame.copyFrom(X.destinationFrame),V.transform=B.projection.transform,B.projection.transform=null,X.bind(V.renderTexture,V.sourceFrame,Se),B.framebuffer.clear(0,0,0,0)}pop(){const E=this.defaultFilterStack,I=E.pop(),B=I.filters;this.activeState=I;const U=this.globalUniforms.uniforms;U.outputFrame=I.sourceFrame,U.resolution=I.resolution;const V=U.inputSize,X=U.inputPixel,Y=U.inputClamp;if(V[0]=I.destinationFrame.width,V[1]=I.destinationFrame.height,V[2]=1/V[0],V[3]=1/V[1],X[0]=Math.round(V[0]*I.resolution),X[1]=Math.round(V[1]*I.resolution),X[2]=1/X[0],X[3]=1/X[1],Y[0]=.5*X[2],Y[1]=.5*X[3],Y[2]=I.sourceFrame.width*V[2]-.5*X[2],Y[3]=I.sourceFrame.height*V[3]-.5*X[3],I.legacy){const J=U.filterArea;J[0]=I.destinationFrame.width,J[1]=I.destinationFrame.height,J[2]=I.sourceFrame.x,J[3]=I.sourceFrame.y,U.filterClamp=U.inputClamp}this.globalUniforms.update();const K=E[E.length-1];if(this.renderer.framebuffer.blit(),B.length===1)B[0].apply(this,I.renderTexture,K.renderTexture,CLEAR_MODES.BLEND,I),this.returnFilterTexture(I.renderTexture);else{let J=I.renderTexture,xe=this.getOptimalFilterTexture(J.width,J.height,I.resolution);xe.filterFrame=J.filterFrame;let Z=0;for(Z=0;Z<B.length-1;++Z){Z===1&&I.multisample>1&&(xe=this.getOptimalFilterTexture(J.width,J.height,I.resolution),xe.filterFrame=J.filterFrame),B[Z].apply(this,J,xe,CLEAR_MODES.CLEAR,I);const _e=J;J=xe,xe=_e}B[Z].apply(this,J,K.renderTexture,CLEAR_MODES.BLEND,I),Z>1&&I.multisample>1&&this.returnFilterTexture(I.renderTexture),this.returnFilterTexture(J),this.returnFilterTexture(xe)}I.clear(),this.statePool.push(I)}bindAndClear(E,I=CLEAR_MODES.CLEAR){const{renderTexture:B,state:U}=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 X=this.tempRect;X.x=0,X.y=0,X.width=E.filterFrame.width,X.height=E.filterFrame.height,B.bind(E,E.filterFrame,X)}else E!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?B.bind(E):this.renderer.renderTexture.bind(E,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const V=U.stateId&1||this.forceClear;(I===CLEAR_MODES.CLEAR||I===CLEAR_MODES.BLIT&&V)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(E,I,B,U){const V=this.renderer;V.state.set(E.state),this.bindAndClear(B,U),E.uniforms.uSampler=I,E.uniforms.filterGlobals=this.globalUniforms,V.shader.bind(E),E.legacy=!!E.program.attributeData.aTextureCoord,E.legacy?(this.quadUv.map(I._frame,I.filterFrame),V.geometry.bind(this.quadUv),V.geometry.draw(DRAW_MODES.TRIANGLES)):(V.geometry.bind(this.quad),V.geometry.draw(DRAW_MODES.TRIANGLE_STRIP))}calculateSpriteMatrix(E,I){const{sourceFrame:B,destinationFrame:U}=this.activeState,{orig:V}=I._texture,X=E.set(U.width,0,0,U.height,B.x,B.y),Y=I.worldTransform.copyTo(Matrix$2.TEMP_MATRIX);return Y.invert(),X.prepend(Y),X.scale(1/V.width,1/V.height),X.translate(I.anchor.x,I.anchor.y),X}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(E,I,B=1,U=MSAA_QUALITY.NONE){return this.texturePool.getOptimalTexture(E,I,B,U)}getFilterTexture(E,I,B){if(typeof E=="number"){const V=E;E=I,I=V}E=E||this.activeState.renderTexture;const U=this.texturePool.getOptimalTexture(E.width,E.height,I||E.resolution,B||MSAA_QUALITY.NONE);return U.filterFrame=E.filterFrame,U}returnFilterTexture(E){this.texturePool.returnTexture(E)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(E,I){const B=tempPoints[0],U=tempPoints[1],V=tempPoints[2],X=tempPoints[3];B.set(I.left,I.top),U.set(I.left,I.bottom),V.set(I.right,I.top),X.set(I.right,I.bottom),E.apply(B,B),E.apply(U,U),E.apply(V,V),E.apply(X,X);const Y=Math.min(B.x,U.x,V.x,X.x),K=Math.min(B.y,U.y,V.y,X.y),J=Math.max(B.x,U.x,V.x,X.x),xe=Math.max(B.y,U.y,V.y,X.y);I.x=Y,I.y=K,I.width=J-Y,I.height=xe-K}roundFrame(E,I,B,U,V){if(!(E.width<=0||E.height<=0||B.width<=0||B.height<=0)){if(V){const{a:X,b:Y,c:K,d:J}=V;if((Math.abs(Y)>1e-4||Math.abs(K)>1e-4)&&(Math.abs(X)>1e-4||Math.abs(J)>1e-4))return}V=V?tempMatrix$2.copyFrom(V):tempMatrix$2.identity(),V.translate(-B.x,-B.y).scale(U.width/B.width,U.height/B.height).translate(U.x,U.y),this.transformAABB(V,E),E.ceil(I),this.transformAABB(V.invert(),E)}}}FilterSystem.extension={type:ExtensionType.RendererSystem,name:"filter"},extensions.add(FilterSystem);class GLFramebuffer{constructor(E){this.framebuffer=E,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=MSAA_QUALITY.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const tempRectangle=new Rectangle;class FramebufferSystem{constructor(E){this.renderer=E,this.managedFramebuffers=[],this.unknownFramebuffer=new Framebuffer(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 Rectangle,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let I=this.renderer.context.extensions.drawBuffers,B=this.renderer.context.extensions.depthTexture;settings.PREFER_ENV===ENV.WEBGL_LEGACY&&(I=null,B=null),I?E.drawBuffers=U=>I.drawBuffersWEBGL(U):(this.hasMRT=!1,E.drawBuffers=()=>{}),B||(this.writeDepthTexture=!1)}else this.msaaSamples=E.getInternalformatParameter(E.RENDERBUFFER,E.RGBA8,E.SAMPLES)}bind(E,I,B=0){const{gl:U}=this;if(E){const V=E.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(E);this.current!==E&&(this.current=E,U.bindFramebuffer(U.FRAMEBUFFER,V.framebuffer)),V.mipLevel!==B&&(E.dirtyId++,E.dirtyFormat++,V.mipLevel=B),V.dirtyId!==E.dirtyId&&(V.dirtyId=E.dirtyId,V.dirtyFormat!==E.dirtyFormat?(V.dirtyFormat=E.dirtyFormat,V.dirtySize=E.dirtySize,this.updateFramebuffer(E,B)):V.dirtySize!==E.dirtySize&&(V.dirtySize=E.dirtySize,this.resizeFramebuffer(E)));for(let X=0;X<E.colorTextures.length;X++){const Y=E.colorTextures[X];this.renderer.texture.unbind(Y.parentTextureArray||Y)}if(E.depthTexture&&this.renderer.texture.unbind(E.depthTexture),I){const X=I.width>>B,Y=I.height>>B,K=X/I.width;this.setViewport(I.x*K,I.y*K,X,Y)}else{const X=E.width>>B,Y=E.height>>B;this.setViewport(0,0,X,Y)}}else this.current&&(this.current=null,U.bindFramebuffer(U.FRAMEBUFFER,null)),I?this.setViewport(I.x,I.y,I.width,I.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(E,I,B,U){const V=this.viewport;E=Math.round(E),I=Math.round(I),B=Math.round(B),U=Math.round(U),(V.width!==B||V.height!==U||V.x!==E||V.y!==I)&&(V.x=E,V.y=I,V.width=B,V.height=U,this.gl.viewport(E,I,B,U))}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,I,B,U,V=BUFFER_BITS.COLOR|BUFFER_BITS.DEPTH){const{gl:X}=this;X.clearColor(E,I,B,U),X.clear(V)}initFramebuffer(E){const{gl:I}=this,B=new GLFramebuffer(I.createFramebuffer());return B.multisample=this.detectSamples(E.multisample),E.glFramebuffers[this.CONTEXT_UID]=B,this.managedFramebuffers.push(E),E.disposeRunner.add(this),B}resizeFramebuffer(E){const{gl:I}=this,B=E.glFramebuffers[this.CONTEXT_UID];B.stencil&&(I.bindRenderbuffer(I.RENDERBUFFER,B.stencil),B.msaaBuffer?I.renderbufferStorageMultisample(I.RENDERBUFFER,B.multisample,I.DEPTH24_STENCIL8,E.width,E.height):I.renderbufferStorage(I.RENDERBUFFER,I.DEPTH_STENCIL,E.width,E.height));const U=E.colorTextures;let V=U.length;I.drawBuffers||(V=Math.min(V,1));for(let X=0;X<V;X++){const Y=U[X],K=Y.parentTextureArray||Y;this.renderer.texture.bind(K,0),X===0&&B.msaaBuffer&&(I.bindRenderbuffer(I.RENDERBUFFER,B.msaaBuffer),I.renderbufferStorageMultisample(I.RENDERBUFFER,B.multisample,K._glTextures[this.CONTEXT_UID].internalFormat,E.width,E.height))}E.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(E.depthTexture,0)}updateFramebuffer(E,I){const{gl:B}=this,U=E.glFramebuffers[this.CONTEXT_UID],V=E.colorTextures;let X=V.length;B.drawBuffers||(X=Math.min(X,1)),U.multisample>1&&this.canMultisampleFramebuffer(E)?U.msaaBuffer=U.msaaBuffer||B.createRenderbuffer():U.msaaBuffer&&(B.deleteRenderbuffer(U.msaaBuffer),U.msaaBuffer=null,U.blitFramebuffer&&(U.blitFramebuffer.dispose(),U.blitFramebuffer=null));const Y=[];for(let K=0;K<X;K++){const J=V[K],xe=J.parentTextureArray||J;this.renderer.texture.bind(xe,0),K===0&&U.msaaBuffer?(B.bindRenderbuffer(B.RENDERBUFFER,U.msaaBuffer),B.renderbufferStorageMultisample(B.RENDERBUFFER,U.multisample,xe._glTextures[this.CONTEXT_UID].internalFormat,E.width,E.height),B.framebufferRenderbuffer(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0,B.RENDERBUFFER,U.msaaBuffer)):(B.framebufferTexture2D(B.FRAMEBUFFER,B.COLOR_ATTACHMENT0+K,J.target,xe._glTextures[this.CONTEXT_UID].texture,I),Y.push(B.COLOR_ATTACHMENT0+K))}if(Y.length>1&&B.drawBuffers(Y),E.depthTexture&&this.writeDepthTexture){const J=E.depthTexture;this.renderer.texture.bind(J,0),B.framebufferTexture2D(B.FRAMEBUFFER,B.DEPTH_ATTACHMENT,B.TEXTURE_2D,J._glTextures[this.CONTEXT_UID].texture,I)}(E.stencil||E.depth)&&!(E.depthTexture&&this.writeDepthTexture)?(U.stencil=U.stencil||B.createRenderbuffer(),B.bindRenderbuffer(B.RENDERBUFFER,U.stencil),U.msaaBuffer?B.renderbufferStorageMultisample(B.RENDERBUFFER,U.multisample,B.DEPTH24_STENCIL8,E.width,E.height):B.renderbufferStorage(B.RENDERBUFFER,B.DEPTH_STENCIL,E.width,E.height),B.framebufferRenderbuffer(B.FRAMEBUFFER,B.DEPTH_STENCIL_ATTACHMENT,B.RENDERBUFFER,U.stencil)):U.stencil&&(B.deleteRenderbuffer(U.stencil),U.stencil=null)}canMultisampleFramebuffer(E){return this.renderer.context.webGLVersion!==1&&E.colorTextures.length<=1&&!E.depthTexture}detectSamples(E){const{msaaSamples:I}=this;let B=MSAA_QUALITY.NONE;if(E<=1||I===null)return B;for(let U=0;U<I.length;U++)if(I[U]<=E){B=I[U];break}return B===1&&(B=MSAA_QUALITY.NONE),B}blit(E,I,B){const{current:U,renderer:V,gl:X,CONTEXT_UID:Y}=this;if(V.context.webGLVersion!==2||!U)return;const K=U.glFramebuffers[Y];if(!K)return;if(!E){if(!K.msaaBuffer)return;const xe=U.colorTextures[0];if(!xe)return;K.blitFramebuffer||(K.blitFramebuffer=new Framebuffer(U.width,U.height),K.blitFramebuffer.addColorTexture(0,xe)),E=K.blitFramebuffer,E.colorTextures[0]!==xe&&(E.colorTextures[0]=xe,E.dirtyId++,E.dirtyFormat++),(E.width!==U.width||E.height!==U.height)&&(E.width=U.width,E.height=U.height,E.dirtyId++,E.dirtySize++)}I||(I=tempRectangle,I.width=U.width,I.height=U.height),B||(B=I);const J=I.width===B.width&&I.height===B.height;this.bind(E),X.bindFramebuffer(X.READ_FRAMEBUFFER,K.framebuffer),X.blitFramebuffer(I.left,I.top,I.right,I.bottom,B.left,B.top,B.right,B.bottom,X.COLOR_BUFFER_BIT,J?X.NEAREST:X.LINEAR)}disposeFramebuffer(E,I){const B=E.glFramebuffers[this.CONTEXT_UID],U=this.gl;if(!B)return;delete E.glFramebuffers[this.CONTEXT_UID];const V=this.managedFramebuffers.indexOf(E);V>=0&&this.managedFramebuffers.splice(V,1),E.disposeRunner.remove(this),I||(U.deleteFramebuffer(B.framebuffer),B.msaaBuffer&&U.deleteRenderbuffer(B.msaaBuffer),B.stencil&&U.deleteRenderbuffer(B.stencil)),B.blitFramebuffer&&this.disposeFramebuffer(B.blitFramebuffer,I)}disposeAll(E){const I=this.managedFramebuffers;this.managedFramebuffers=[];for(let B=0;B<I.length;B++)this.disposeFramebuffer(I[B],E)}forceStencil(){const E=this.current;if(!E)return;const I=E.glFramebuffers[this.CONTEXT_UID];if(!I||I.stencil)return;E.stencil=!0;const B=E.width,U=E.height,V=this.gl,X=V.createRenderbuffer();V.bindRenderbuffer(V.RENDERBUFFER,X),I.msaaBuffer?V.renderbufferStorageMultisample(V.RENDERBUFFER,I.multisample,V.DEPTH24_STENCIL8,B,U):V.renderbufferStorage(V.RENDERBUFFER,V.DEPTH_STENCIL,B,U),I.stencil=X,V.framebufferRenderbuffer(V.FRAMEBUFFER,V.DEPTH_STENCIL_ATTACHMENT,V.RENDERBUFFER,X)}reset(){this.current=this.unknownFramebuffer,this.viewport=new Rectangle}destroy(){this.renderer=null}}FramebufferSystem.extension={type:ExtensionType.RendererSystem,name:"framebuffer"},extensions.add(FramebufferSystem);const byteSizeMap={5126:4,5123:2,5121:1};class GeometrySystem{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,I=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,I.webGLVersion!==2){let B=this.renderer.context.extensions.vertexArrayObject;settings.PREFER_ENV===ENV.WEBGL_LEGACY&&(B=null),B?(E.createVertexArray=()=>B.createVertexArrayOES(),E.bindVertexArray=U=>B.bindVertexArrayOES(U),E.deleteVertexArray=U=>B.deleteVertexArrayOES(U)):(this.hasVao=!1,E.createVertexArray=()=>null,E.bindVertexArray=()=>null,E.deleteVertexArray=()=>null)}if(I.webGLVersion!==2){const B=E.getExtension("ANGLE_instanced_arrays");B?(E.vertexAttribDivisor=(U,V)=>B.vertexAttribDivisorANGLE(U,V),E.drawElementsInstanced=(U,V,X,Y,K)=>B.drawElementsInstancedANGLE(U,V,X,Y,K),E.drawArraysInstanced=(U,V,X,Y)=>B.drawArraysInstancedANGLE(U,V,X,Y)):this.hasInstance=!1}this.canUseUInt32ElementIndex=I.webGLVersion===2||!!I.extensions.uint32ElementIndex}bind(E,I){I=I||this.renderer.shader.shader;const{gl:B}=this;let U=E.glVertexArrayObjects[this.CONTEXT_UID],V=!1;U||(this.managedGeometries[E.id]=E,E.disposeRunner.add(this),E.glVertexArrayObjects[this.CONTEXT_UID]=U={},V=!0);const X=U[I.program.id]||this.initGeometryVao(E,I,V);this._activeGeometry=E,this._activeVao!==X&&(this._activeVao=X,this.hasVao?B.bindVertexArray(X):this.activateVao(E,I.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const E=this._activeGeometry,I=this.renderer.buffer;for(let B=0;B<E.buffers.length;B++){const U=E.buffers[B];I.update(U)}}checkCompatibility(E,I){const B=E.attributes,U=I.attributeData;for(const V in U)if(!B[V])throw new Error(`shader and geometry incompatible, geometry missing the "${V}" attribute`)}getSignature(E,I){const B=E.attributes,U=I.attributeData,V=["g",E.id];for(const X in B)U[X]&&V.push(X,U[X].location);return V.join("-")}initGeometryVao(E,I,B=!0){const U=this.gl,V=this.CONTEXT_UID,X=this.renderer.buffer,Y=I.program;Y.glPrograms[V]||this.renderer.shader.generateProgram(I),this.checkCompatibility(E,Y);const K=this.getSignature(E,Y),J=E.glVertexArrayObjects[this.CONTEXT_UID];let xe=J[K];if(xe)return J[Y.id]=xe,xe;const Z=E.buffers,_e=E.attributes,Se={},Ee={};for(const Ae in Z)Se[Ae]=0,Ee[Ae]=0;for(const Ae in _e)!_e[Ae].size&&Y.attributeData[Ae]?_e[Ae].size=Y.attributeData[Ae].size:_e[Ae].size||console.warn(`PIXI Geometry attribute '${Ae}' size cannot be determined (likely the bound shader does not have the attribute)`),Se[_e[Ae].buffer]+=_e[Ae].size*byteSizeMap[_e[Ae].type];for(const Ae in _e){const Re=_e[Ae],Te=Re.size;Re.stride===void 0&&(Se[Re.buffer]===Te*byteSizeMap[Re.type]?Re.stride=0:Re.stride=Se[Re.buffer]),Re.start===void 0&&(Re.start=Ee[Re.buffer],Ee[Re.buffer]+=Te*byteSizeMap[Re.type])}xe=U.createVertexArray(),U.bindVertexArray(xe);for(let Ae=0;Ae<Z.length;Ae++){const Re=Z[Ae];X.bind(Re),B&&Re._glBuffers[V].refCount++}return this.activateVao(E,Y),J[Y.id]=xe,J[K]=xe,U.bindVertexArray(null),X.unbind(BUFFER_TYPE.ARRAY_BUFFER),xe}disposeGeometry(E,I){var Y;if(!this.managedGeometries[E.id])return;delete this.managedGeometries[E.id];const B=E.glVertexArrayObjects[this.CONTEXT_UID],U=this.gl,V=E.buffers,X=(Y=this.renderer)==null?void 0:Y.buffer;if(E.disposeRunner.remove(this),!!B){if(X)for(let K=0;K<V.length;K++){const J=V[K]._glBuffers[this.CONTEXT_UID];J&&(J.refCount--,J.refCount===0&&!I&&X.dispose(V[K],I))}if(!I){for(const K in B)if(K[0]==="g"){const J=B[K];this._activeVao===J&&this.unbind(),U.deleteVertexArray(J)}}delete E.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(E){const I=Object.keys(this.managedGeometries);for(let B=0;B<I.length;B++)this.disposeGeometry(this.managedGeometries[I[B]],E)}activateVao(E,I){const B=this.gl,U=this.CONTEXT_UID,V=this.renderer.buffer,X=E.buffers,Y=E.attributes;E.indexBuffer&&V.bind(E.indexBuffer);let K=null;for(const J in Y){const xe=Y[J],Z=X[xe.buffer],_e=Z._glBuffers[U];if(I.attributeData[J]){K!==_e&&(V.bind(Z),K=_e);const Se=I.attributeData[J].location;if(B.enableVertexAttribArray(Se),B.vertexAttribPointer(Se,xe.size,xe.type||B.FLOAT,xe.normalized,xe.stride,xe.start),xe.instance)if(this.hasInstance)B.vertexAttribDivisor(Se,xe.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(E,I,B,U){const{gl:V}=this,X=this._activeGeometry;if(X.indexBuffer){const Y=X.indexBuffer.data.BYTES_PER_ELEMENT,K=Y===2?V.UNSIGNED_SHORT:V.UNSIGNED_INT;Y===2||Y===4&&this.canUseUInt32ElementIndex?X.instanced?V.drawElementsInstanced(E,I||X.indexBuffer.data.length,K,(B||0)*Y,U||1):V.drawElements(E,I||X.indexBuffer.data.length,K,(B||0)*Y):console.warn("unsupported index buffer type: uint32")}else X.instanced?V.drawArraysInstanced(E,B,I||X.getSize(),U||1):V.drawArrays(E,B,I||X.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}GeometrySystem.extension={type:ExtensionType.RendererSystem,name:"geometry"},extensions.add(GeometrySystem);const tempMat=new Matrix$2;class TextureMatrix{constructor(E,I){this._texture=E,this.mapCoord=new Matrix$2,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof I>"u"?.5:I,this.isSimple=!1}get texture(){return this._texture}set texture(E){this._texture=E,this._textureID=-1}multiplyUvs(E,I){I===void 0&&(I=E);const B=this.mapCoord;for(let U=0;U<E.length;U+=2){const V=E[U],X=E[U+1];I[U]=V*B.a+X*B.c+B.tx,I[U+1]=V*B.b+X*B.d+B.ty}return I}update(E){const I=this._texture;if(!I||!I.valid||!E&&this._textureID===I._updateID)return!1;this._textureID=I._updateID,this._updateID++;const B=I._uvs;this.mapCoord.set(B.x1-B.x0,B.y1-B.y0,B.x3-B.x0,B.y3-B.y0,B.x0,B.y0);const U=I.orig,V=I.trim;V&&(tempMat.set(U.width/V.width,0,0,U.height/V.height,-V.x/V.width,-V.y/V.height),this.mapCoord.append(tempMat));const X=I.baseTexture,Y=this.uClampFrame,K=this.clampMargin/X.resolution,J=this.clampOffset;return Y[0]=(I._frame.x+K+J)/X.width,Y[1]=(I._frame.y+K+J)/X.height,Y[2]=(I._frame.x+I._frame.width-K+J)/X.width,Y[3]=(I._frame.y+I._frame.height-K+J)/X.height,this.uClampOffset[0]=J/X.realWidth,this.uClampOffset[1]=J/X.realHeight,this.isSimple=I._frame.width===X.width&&I._frame.height===X.height&&I.rotate===0,!0}}var fragment=`varying vec2 vMaskCoord;
387
411
  varying vec2 vTextureCoord;
388
412
 
389
413
  uniform sampler2D uSampler;
@@ -408,7 +432,7 @@ void main(void)
408
432
 
409
433
  gl_FragColor = original;
410
434
  }
411
- `,$w=`attribute vec2 aVertexPosition;
435
+ `,vertex=`attribute vec2 aVertexPosition;
412
436
  attribute vec2 aTextureCoord;
413
437
 
414
438
  uniform mat3 projectionMatrix;
@@ -424,7 +448,7 @@ void main(void)
424
448
  vTextureCoord = aTextureCoord;
425
449
  vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
426
450
  }
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=pt.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=pt.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!==pt.SPRITE&&this.maskStack.push(n),n.enabled)switch(n.type){case pt.SCISSOR:this.renderer.scissor.push(n);break;case pt.STENCIL:this.renderer.stencil.push(n);break;case pt.SPRITE:n.copyCountersOrReset(null),this.pushSpriteMask(n);break;case pt.COLOR:this.pushColorMask(n);break}n.type===pt.SPRITE&&this.maskStack.push(n)}pop(e){const r=this.maskStack.pop();if(!(!r||r._target!==e)){if(r.enabled)switch(r.type){case pt.SCISSOR:this.renderer.scissor.pop(r);break;case pt.STENCIL:this.renderer.stencil.pop(r.maskObject);break;case pt.SPRITE:this.popSpriteMask(r);break;case pt.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===pt.SPRITE&&n._filters&&(n._filters[0].maskSprite=n.maskObject)}}}detect(e){const r=e.maskObject;r?r.isSprite?e.type=pt.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=pt.SCISSOR:e.type=pt.STENCIL:e.type=pt.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 Xe);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 Xe,os=new Xe;class Md{constructor(e){this.renderer=e,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Xe,this.destinationFrame=new Xe,this.viewportFrame=new Xe}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:`
451
+ `;class SpriteMaskFilter extends Filter{constructor(E,I,B){let U=null;typeof E!="string"&&I===void 0&&B===void 0&&(U=E,E=void 0,I=void 0,B=void 0),super(E||vertex,I||fragment,B),this.maskSprite=U,this.maskMatrix=new Matrix$2}get maskSprite(){return this._maskSprite}set maskSprite(E){this._maskSprite=E,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(E,I,B,U){const V=this._maskSprite,X=V._texture;X.valid&&(X.uvMatrix||(X.uvMatrix=new TextureMatrix(X,0)),X.uvMatrix.update(),this.uniforms.npmAlpha=X.baseTexture.alphaMode?0:1,this.uniforms.mask=X,this.uniforms.otherMatrix=E.calculateSpriteMatrix(this.maskMatrix,V).prepend(X.uvMatrix.mapCoord),this.uniforms.alpha=V.worldAlpha,this.uniforms.maskClamp=X.uvMatrix.uClampFrame,E.applyFilter(this,I,B,U))}}class MaskData{constructor(E=null){this.type=MASK_TYPES.NONE,this.autoDetect=!0,this.maskObject=E||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Filter.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=MASK_TYPES.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 MaskSystem{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,I){let B=I;if(!B.isMaskData){const V=this.maskDataPool.pop()||new MaskData;V.pooled=!0,V.maskObject=I,B=V}const U=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(B.copyCountersOrReset(U),B._colorMask=U?U._colorMask:15,B.autoDetect&&this.detect(B),B._target=E,B.type!==MASK_TYPES.SPRITE&&this.maskStack.push(B),B.enabled)switch(B.type){case MASK_TYPES.SCISSOR:this.renderer.scissor.push(B);break;case MASK_TYPES.STENCIL:this.renderer.stencil.push(B);break;case MASK_TYPES.SPRITE:B.copyCountersOrReset(null),this.pushSpriteMask(B);break;case MASK_TYPES.COLOR:this.pushColorMask(B);break}B.type===MASK_TYPES.SPRITE&&this.maskStack.push(B)}pop(E){const I=this.maskStack.pop();if(!(!I||I._target!==E)){if(I.enabled)switch(I.type){case MASK_TYPES.SCISSOR:this.renderer.scissor.pop(I);break;case MASK_TYPES.STENCIL:this.renderer.stencil.pop(I.maskObject);break;case MASK_TYPES.SPRITE:this.popSpriteMask(I);break;case MASK_TYPES.COLOR:this.popColorMask(I);break}if(I.reset(),I.pooled&&this.maskDataPool.push(I),this.maskStack.length!==0){const B=this.maskStack[this.maskStack.length-1];B.type===MASK_TYPES.SPRITE&&B._filters&&(B._filters[0].maskSprite=B.maskObject)}}}detect(E){const I=E.maskObject;I?I.isSprite?E.type=MASK_TYPES.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(E)?E.type=MASK_TYPES.SCISSOR:E.type=MASK_TYPES.STENCIL:E.type=MASK_TYPES.COLOR}pushSpriteMask(E){const{maskObject:I}=E,B=E._target;let U=E._filters;U||(U=this.alphaMaskPool[this.alphaMaskIndex],U||(U=this.alphaMaskPool[this.alphaMaskIndex]=[new SpriteMaskFilter]));const V=this.renderer,X=V.renderTexture;let Y,K;if(X.current){const xe=X.current;Y=E.resolution||xe.resolution,K=E.multisample??xe.multisample}else Y=E.resolution||V.resolution,K=E.multisample??V.multisample;U[0].resolution=Y,U[0].multisample=K,U[0].maskSprite=I;const J=B.filterArea;B.filterArea=I.getBounds(!0),V.filter.push(B,U),B.filterArea=J,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 I=E._colorMask,B=E._colorMask=I&E.colorMask;B!==I&&this.renderer.gl.colorMask((B&1)!==0,(B&2)!==0,(B&4)!==0,(B&8)!==0)}popColorMask(E){const I=E._colorMask,B=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;B!==I&&this.renderer.gl.colorMask((B&1)!==0,(B&2)!==0,(B&4)!==0,(B&8)!==0)}destroy(){this.renderer=null}}MaskSystem.extension={type:ExtensionType.RendererSystem,name:"mask"},extensions.add(MaskSystem);class AbstractMaskSystem{constructor(E){this.renderer=E,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(E){const{gl:I}=this.renderer,B=this.getStackLength();this.maskStack=E;const U=this.getStackLength();U!==B&&(U===0?I.disable(this.glConst):(I.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const tempMatrix$1=new Matrix$2,rectPool=[],_ScissorSystem=class extends AbstractMaskSystem{constructor(C){super(C),this.glConst=settings.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const C=this.maskStack[this.maskStack.length-1];return C?C._scissorCounter:0}calcScissorRect(C){if(C._scissorRectLocal)return;const E=C._scissorRect,{maskObject:I}=C,{renderer:B}=this,U=B.renderTexture,V=I.getBounds(!0,rectPool.pop()??new Rectangle);this.roundFrameToPixels(V,U.current?U.current.resolution:B.resolution,U.sourceFrame,U.destinationFrame,B.projection.transform),E&&V.fit(E),C._scissorRectLocal=V}static isMatrixRotated(C){if(!C)return!1;const{a:E,b:I,c:B,d:U}=C;return(Math.abs(I)>1e-4||Math.abs(B)>1e-4)&&(Math.abs(E)>1e-4||Math.abs(U)>1e-4)}testScissor(C){const{maskObject:E}=C;if(!E.isFastRect||!E.isFastRect()||_ScissorSystem.isMatrixRotated(E.worldTransform)||_ScissorSystem.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(C);const I=C._scissorRectLocal;return I.width>0&&I.height>0}roundFrameToPixels(C,E,I,B,U){_ScissorSystem.isMatrixRotated(U)||(U=U?tempMatrix$1.copyFrom(U):tempMatrix$1.identity(),U.translate(-I.x,-I.y).scale(B.width/I.width,B.height/I.height).translate(B.x,B.y),this.renderer.filter.transformAABB(U,C),C.fit(B),C.x=Math.round(C.x*E),C.y=Math.round(C.y*E),C.width=Math.round(C.width*E),C.height=Math.round(C.height*E))}push(C){C._scissorRectLocal||this.calcScissorRect(C);const{gl:E}=this.renderer;C._scissorRect||E.enable(E.SCISSOR_TEST),C._scissorCounter++,C._scissorRect=C._scissorRectLocal,this._useCurrent()}pop(C){const{gl:E}=this.renderer;C&&rectPool.push(C._scissorRectLocal),this.getStackLength()>0?this._useCurrent():E.disable(E.SCISSOR_TEST)}_useCurrent(){const C=this.maskStack[this.maskStack.length-1]._scissorRect;let E;this.renderer.renderTexture.current?E=C.y:E=this.renderer.height-C.height-C.y,this.renderer.gl.scissor(C.x,E,C.width,C.height)}};let ScissorSystem=_ScissorSystem;ScissorSystem.extension={type:ExtensionType.RendererSystem,name:"scissor"},extensions.add(ScissorSystem);class StencilSystem extends AbstractMaskSystem{constructor(E){super(E),this.glConst=settings.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const E=this.maskStack[this.maskStack.length-1];return E?E._stencilCounter:0}push(E){const I=E.maskObject,{gl:B}=this.renderer,U=E._stencilCounter;U===0&&(this.renderer.framebuffer.forceStencil(),B.clearStencil(0),B.clear(B.STENCIL_BUFFER_BIT),B.enable(B.STENCIL_TEST)),E._stencilCounter++;const V=E._colorMask;V!==0&&(E._colorMask=0,B.colorMask(!1,!1,!1,!1)),B.stencilFunc(B.EQUAL,U,4294967295),B.stencilOp(B.KEEP,B.KEEP,B.INCR),I.renderable=!0,I.render(this.renderer),this.renderer.batch.flush(),I.renderable=!1,V!==0&&(E._colorMask=V,B.colorMask((V&1)!==0,(V&2)!==0,(V&4)!==0,(V&8)!==0)),this._useCurrent()}pop(E){const I=this.renderer.gl;if(this.getStackLength()===0)I.disable(I.STENCIL_TEST);else{const B=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,U=B?B._colorMask:15;U!==0&&(B._colorMask=0,I.colorMask(!1,!1,!1,!1)),I.stencilOp(I.KEEP,I.KEEP,I.DECR),E.renderable=!0,E.render(this.renderer),this.renderer.batch.flush(),E.renderable=!1,U!==0&&(B._colorMask=U,I.colorMask((U&1)!==0,(U&2)!==0,(U&4)!==0,(U&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)}}StencilSystem.extension={type:ExtensionType.RendererSystem,name:"stencil"},extensions.add(StencilSystem);class PluginSystem{constructor(E){this.renderer=E,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return deprecation("7.0.0","renderer.plugins.extract has moved to renderer.extract"),E.extract}},prepare:{enumerable:!1,get(){return deprecation("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),E.prepare}},interaction:{enumerable:!1,get(){return deprecation("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),E.events}}})}init(){const E=this.rendererPlugins;for(const I in E)this.plugins[I]=new E[I](this.renderer)}destroy(){for(const E in this.plugins)this.plugins[E].destroy(),this.plugins[E]=null}}PluginSystem.extension={type:[ExtensionType.RendererSystem,ExtensionType.CanvasRendererSystem],name:"_plugin"},extensions.add(PluginSystem);class ProjectionSystem{constructor(E){this.renderer=E,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Matrix$2,this.transform=null}update(E,I,B,U){this.destinationFrame=E||this.destinationFrame||this.defaultFrame,this.sourceFrame=I||this.sourceFrame||E,this.calculateProjection(this.destinationFrame,this.sourceFrame,B,U),this.transform&&this.projectionMatrix.append(this.transform);const V=this.renderer;V.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,V.globalUniforms.update(),V.shader.shader&&V.shader.syncUniformGroup(V.shader.shader.uniforms.globals)}calculateProjection(E,I,B,U){const V=this.projectionMatrix,X=U?-1:1;V.identity(),V.a=1/I.width*2,V.d=X*(1/I.height*2),V.tx=-1-I.x*V.a,V.ty=-X-I.y*V.d}setTransform(E){}destroy(){this.renderer=null}}ProjectionSystem.extension={type:ExtensionType.RendererSystem,name:"projection"},extensions.add(ProjectionSystem);const tempTransform=new Transform;class GenerateTextureSystem{constructor(E){this.renderer=E,this._tempMatrix=new Matrix$2}generateTexture(E,I){const{region:B,...U}=I||{},V=B||E.getLocalBounds(null,!0);V.width===0&&(V.width=1),V.height===0&&(V.height=1);const X=RenderTexture.create({width:V.width,height:V.height,...U});this._tempMatrix.tx=-V.x,this._tempMatrix.ty=-V.y;const Y=E.transform;return E.transform=tempTransform,this.renderer.render(E,{renderTexture:X,transform:this._tempMatrix,skipUpdateTransform:!!E.parent,blit:!0}),E.transform=Y,X}destroy(){}}GenerateTextureSystem.extension={type:[ExtensionType.RendererSystem,ExtensionType.CanvasRendererSystem],name:"textureGenerator"},extensions.add(GenerateTextureSystem);const tempRect=new Rectangle,tempRect2=new Rectangle;class RenderTextureSystem{constructor(E){this.renderer=E,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Rectangle,this.destinationFrame=new Rectangle,this.viewportFrame=new Rectangle}bind(E=null,I,B){const U=this.renderer;this.current=E;let V,X,Y;E?(V=E.baseTexture,Y=V.resolution,I||(tempRect.width=E.frame.width,tempRect.height=E.frame.height,I=tempRect),B||(tempRect2.x=E.frame.x,tempRect2.y=E.frame.y,tempRect2.width=I.width,tempRect2.height=I.height,B=tempRect2),X=V.framebuffer):(Y=U.resolution,I||(tempRect.width=U._view.screen.width,tempRect.height=U._view.screen.height,I=tempRect),B||(B=tempRect,B.width=I.width,B.height=I.height));const K=this.viewportFrame;K.x=B.x*Y,K.y=B.y*Y,K.width=B.width*Y,K.height=B.height*Y,E||(K.y=U.view.height-(K.y+K.height)),K.ceil(),this.renderer.framebuffer.bind(X,K),this.renderer.projection.update(B,I,Y,!X),E?this.renderer.mask.setMaskStack(V.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(I),this.destinationFrame.copyFrom(B)}clear(E,I){const B=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,U=E?Color.shared.setValue(E):B,V=this.destinationFrame,X=this.current?this.current.baseTexture:this.renderer._view.screen,Y=V.width!==X.width||V.height!==X.height;if(Y){let{x:K,y:J,width:xe,height:Z}=this.viewportFrame;K=Math.round(K),J=Math.round(J),xe=Math.round(xe),Z=Math.round(Z),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(K,J,xe,Z)}this.renderer.framebuffer.clear(U.red,U.green,U.blue,U.alpha,I),Y&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}RenderTextureSystem.extension={type:ExtensionType.RendererSystem,name:"renderTexture"},extensions.add(RenderTextureSystem);class GLProgram{constructor(E,I){this.program=E,this.uniformData=I,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function getAttributeData(C,E){const I={},B=E.getProgramParameter(C,E.ACTIVE_ATTRIBUTES);for(let U=0;U<B;U++){const V=E.getActiveAttrib(C,U);if(V.name.startsWith("gl_"))continue;const X=mapType(E,V.type),Y={type:X,name:V.name,size:mapSize(X),location:E.getAttribLocation(C,V.name)};I[V.name]=Y}return I}function getUniformData(C,E){const I={},B=E.getProgramParameter(C,E.ACTIVE_UNIFORMS);for(let U=0;U<B;U++){const V=E.getActiveUniform(C,U),X=V.name.replace(/\[.*?\]$/,""),Y=!!V.name.match(/\[.*?\]$/),K=mapType(E,V.type);I[X]={name:X,index:U,type:K,size:V.size,isArray:Y,value:defaultValue(K,V.size)}}return I}function generateProgram(C,E){var K;const I=compileShader(C,C.VERTEX_SHADER,E.vertexSrc),B=compileShader(C,C.FRAGMENT_SHADER,E.fragmentSrc),U=C.createProgram();C.attachShader(U,I),C.attachShader(U,B);const V=(K=E.extra)==null?void 0:K.transformFeedbackVaryings;if(V&&(typeof C.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):C.transformFeedbackVaryings(U,V.names,V.bufferMode==="separate"?C.SEPARATE_ATTRIBS:C.INTERLEAVED_ATTRIBS)),C.linkProgram(U),C.getProgramParameter(U,C.LINK_STATUS)||logProgramError(C,U,I,B),E.attributeData=getAttributeData(U,C),E.uniformData=getUniformData(U,C),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(E.vertexSrc)){const J=Object.keys(E.attributeData);J.sort((xe,Z)=>xe>Z?1:-1);for(let xe=0;xe<J.length;xe++)E.attributeData[J[xe]].location=xe,C.bindAttribLocation(U,xe,J[xe]);C.linkProgram(U)}C.deleteShader(I),C.deleteShader(B);const X={};for(const J in E.uniformData){const xe=E.uniformData[J];X[J]={location:C.getUniformLocation(U,J),value:defaultValue(xe.type,xe.size)}}return new GLProgram(U,X)}function uboUpdate(C,E,I,B,U){I.buffer.update(U)}const UBO_TO_SINGLE_SETTERS={float:`
428
452
  data[offset] = v;
429
453
  `,vec2:`
430
454
  data[offset] = v[0];
@@ -462,7 +486,7 @@ void main(void)
462
486
  {
463
487
  data[offset + i] = v[i];
464
488
  }
465
- `},Od={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 Kw(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=Od[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 Zw(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 Qw(t,e){if(!t.autoManage)return{size:0,syncFunc:qw};const r=Zw(t.uniforms,e),{uboElements:n,size:i}=Kw(r),a=[`
489
+ `},GLSL_TO_STD40_SIZE={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 createUBOElements(C){const E=C.map(V=>({data:V,offset:0,dataLen:0,dirty:0}));let I=0,B=0,U=0;for(let V=0;V<E.length;V++){const X=E[V];if(I=GLSL_TO_STD40_SIZE[X.data.type],X.data.size>1&&(I=Math.max(I,16)*X.data.size),X.dataLen=I,B%I!==0&&B<16){const Y=B%I%16;B+=Y,U+=Y}B+I>16?(U=Math.ceil(U/16)*16,X.offset=U,U+=I,B=I):(X.offset=U,B+=I,U+=I)}return U=Math.ceil(U/16)*16,{uboElements:E,size:U}}function getUBOData(C,E){const I=[];for(const B in C)E[B]&&I.push(E[B]);return I.sort((B,U)=>B.index-U.index),I}function generateUniformBufferSync(C,E){if(!C.autoManage)return{size:0,syncFunc:uboUpdate};const I=getUBOData(C.uniforms,E),{uboElements:B,size:U}=createUBOElements(I),V=[`
466
490
  var v = null;
467
491
  var v2 = null;
468
492
  var cv = null;
@@ -470,31 +494,31 @@ void main(void)
470
494
  var gl = renderer.gl
471
495
  var index = 0;
472
496
  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<li.length;c++){const d=li[c];if(d.codeUbo&&d.test(l.data,f)){a.push(`offset = ${l.offset/4};`,li[c].codeUbo(l.data.name,f)),v=!0;break}}if(!v)if(l.data.size>1){const c=ad(l.data.type),d=Math.max(Od[l.data.type]/16,1),m=c/d,_=(4-m%4)%4;a.push(`
474
- cv = ud.${p}.value;
475
- v = uv.${p};
476
- offset = ${l.offset/4};
497
+ `];for(let X=0;X<B.length;X++){const Y=B[X],K=C.uniforms[Y.data.name],J=Y.data.name;let xe=!1;for(let Z=0;Z<uniformParsers.length;Z++){const _e=uniformParsers[Z];if(_e.codeUbo&&_e.test(Y.data,K)){V.push(`offset = ${Y.offset/4};`,uniformParsers[Z].codeUbo(Y.data.name,K)),xe=!0;break}}if(!xe)if(Y.data.size>1){const Z=mapSize(Y.data.type),_e=Math.max(GLSL_TO_STD40_SIZE[Y.data.type]/16,1),Se=Z/_e,Ee=(4-Se%4)%4;V.push(`
498
+ cv = ud.${J}.value;
499
+ v = uv.${J};
500
+ offset = ${Y.offset/4};
477
501
 
478
502
  t = 0;
479
503
 
480
- for(var i=0; i < ${l.data.size*d}; i++)
504
+ for(var i=0; i < ${Y.data.size*_e}; i++)
481
505
  {
482
- for(var j = 0; j < ${m}; j++)
506
+ for(var j = 0; j < ${Se}; j++)
483
507
  {
484
508
  data[offset++] = v[t++];
485
509
  }
486
- offset += ${_};
510
+ offset += ${Ee};
487
511
  }
488
512
 
489
- `)}else{const c=Yw[l.data.type];a.push(`
490
- cv = ud.${p}.value;
491
- v = uv.${p};
492
- offset = ${l.offset/4};
493
- ${c};
494
- `)}}return a.push(`
513
+ `)}else{const Z=UBO_TO_SINGLE_SETTERS[Y.data.type];V.push(`
514
+ cv = ud.${J}.value;
515
+ v = uv.${J};
516
+ offset = ${Y.offset/4};
517
+ ${Z};
518
+ `)}}return V.push(`
495
519
  renderer.buffer.update(buffer);
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 Xe(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;
520
+ `),{size:U,syncFunc:new Function("ud","uv","renderer","syncData","buffer",V.join(`
521
+ `))}}let UID=0;const defaultSyncData={textureCount:0,uboCount:0};class ShaderSystem{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=UID++}systemCheck(){if(!unsafeEvalSupported())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,I){E.disposeRunner.add(this),E.uniforms.globals=this.renderer.globalUniforms;const B=E.program,U=B.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(E);return this.shader=E,this.program!==B&&(this.program=B,this.gl.useProgram(U.program)),I||(defaultSyncData.textureCount=0,defaultSyncData.uboCount=0,this.syncUniformGroup(E.uniformGroup,defaultSyncData)),U}setUniforms(E){const I=this.shader.program,B=I.glPrograms[this.renderer.CONTEXT_UID];I.syncUniforms(B.uniformData,E,this.renderer)}syncUniformGroup(E,I){const B=this.getGlProgram();(!E.static||E.dirtyId!==B.uniformDirtyGroups[E.id])&&(B.uniformDirtyGroups[E.id]=E.dirtyId,this.syncUniforms(E,B,I))}syncUniforms(E,I,B){(E.syncUniforms[this.shader.program.id]||this.createSyncGroups(E))(I.uniformData,E.uniforms,this.renderer,B)}createSyncGroups(E){const I=this.getSignature(E,this.shader.program.uniformData,"u");return this.cache[I]||(this.cache[I]=generateUniformsSync(E,this.shader.program.uniformData)),E.syncUniforms[this.shader.program.id]=this.cache[I],E.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(E,I){const B=this.getGlProgram();if(!E.static||E.dirtyId!==0||!B.uniformGroups[E.id]){E.dirtyId=0;const U=B.uniformGroups[E.id]||this.createSyncBufferGroup(E,B,I);E.buffer.update(),U(B.uniformData,E.uniforms,this.renderer,defaultSyncData,E.buffer)}this.renderer.buffer.bindBufferBase(E.buffer,B.uniformBufferBindings[I])}createSyncBufferGroup(E,I,B){const{gl:U}=this.renderer;this.renderer.buffer.bind(E.buffer);const V=this.gl.getUniformBlockIndex(I.program,B);I.uniformBufferBindings[B]=this.shader.uniformBindCount,U.uniformBlockBinding(I.program,V,this.shader.uniformBindCount),this.shader.uniformBindCount++;const X=this.getSignature(E,this.shader.program.uniformData,"ubo");let Y=this._uboCache[X];if(Y||(Y=this._uboCache[X]=generateUniformBufferSync(E,this.shader.program.uniformData)),E.autoManage){const K=new Float32Array(Y.size/4);E.buffer.update(K)}return I.uniformGroups[E.id]=Y.syncFunc,I.uniformGroups[E.id]}getSignature(E,I,B){const U=E.uniforms,V=[`${B}-`];for(const X in U)V.push(X),I[X]&&V.push(I[X].type);return V.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(E){const I=this.gl,B=E.program,U=generateProgram(I,B);return B.glPrograms[this.renderer.CONTEXT_UID]=U,U}reset(){this.program=null,this.shader=null}disposeShader(E){this.shader===E&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}ShaderSystem.extension={type:ExtensionType.RendererSystem,name:"shader"},extensions.add(ShaderSystem);class StartupSystem{constructor(E){this.renderer=E}run(E){const{renderer:I}=this;I.runners.init.emit(I.options),E.hello&&console.log(`PixiJS 7.2.3 - ${I.rendererLogId} - https://pixijs.com`),I.resize(I.screen.width,I.screen.height)}destroy(){}}StartupSystem.defaultOptions={hello:!1},StartupSystem.extension={type:[ExtensionType.RendererSystem,ExtensionType.CanvasRendererSystem],name:"startup"},extensions.add(StartupSystem);function mapWebGLBlendModesToPixi(C,E=[]){return E[BLEND_MODES.NORMAL]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.ADD]=[C.ONE,C.ONE],E[BLEND_MODES.MULTIPLY]=[C.DST_COLOR,C.ONE_MINUS_SRC_ALPHA,C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.SCREEN]=[C.ONE,C.ONE_MINUS_SRC_COLOR,C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.OVERLAY]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.DARKEN]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.LIGHTEN]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.COLOR_DODGE]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.COLOR_BURN]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.HARD_LIGHT]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.SOFT_LIGHT]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.DIFFERENCE]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.EXCLUSION]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.HUE]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.SATURATION]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.COLOR]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.LUMINOSITY]=[C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.NONE]=[0,0],E[BLEND_MODES.NORMAL_NPM]=[C.SRC_ALPHA,C.ONE_MINUS_SRC_ALPHA,C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.ADD_NPM]=[C.SRC_ALPHA,C.ONE,C.ONE,C.ONE],E[BLEND_MODES.SCREEN_NPM]=[C.SRC_ALPHA,C.ONE_MINUS_SRC_COLOR,C.ONE,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.SRC_IN]=[C.DST_ALPHA,C.ZERO],E[BLEND_MODES.SRC_OUT]=[C.ONE_MINUS_DST_ALPHA,C.ZERO],E[BLEND_MODES.SRC_ATOP]=[C.DST_ALPHA,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.DST_OVER]=[C.ONE_MINUS_DST_ALPHA,C.ONE],E[BLEND_MODES.DST_IN]=[C.ZERO,C.SRC_ALPHA],E[BLEND_MODES.DST_OUT]=[C.ZERO,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.DST_ATOP]=[C.ONE_MINUS_DST_ALPHA,C.SRC_ALPHA],E[BLEND_MODES.XOR]=[C.ONE_MINUS_DST_ALPHA,C.ONE_MINUS_SRC_ALPHA],E[BLEND_MODES.SUBTRACT]=[C.ONE,C.ONE,C.ONE,C.ONE,C.FUNC_REVERSE_SUBTRACT,C.FUNC_ADD],E}const BLEND=0,OFFSET=1,CULLING=2,DEPTH_TEST=3,WINDING=4,DEPTH_MASK=5,_StateSystem=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=BLEND_MODES.NONE,this._blendEq=!1,this.map=[],this.map[BLEND]=this.setBlend,this.map[OFFSET]=this.setOffset,this.map[CULLING]=this.setCullFace,this.map[DEPTH_TEST]=this.setDepthTest,this.map[WINDING]=this.setFrontFace,this.map[DEPTH_MASK]=this.setDepthMask,this.checks=[],this.defaultState=new State$1,this.defaultState.blend=!0}contextChange(C){this.gl=C,this.blendModes=mapWebGLBlendModesToPixi(C),this.set(this.defaultState),this.reset()}set(C){if(C=C||this.defaultState,this.stateId!==C.data){let E=this.stateId^C.data,I=0;for(;E;)E&1&&this.map[I].call(this,!!(C.data&1<<I)),E=E>>1,I++;this.stateId=C.data}for(let E=0;E<this.checks.length;E++)this.checks[E](this,C)}forceState(C){C=C||this.defaultState;for(let E=0;E<this.map.length;E++)this.map[E].call(this,!!(C.data&1<<E));for(let E=0;E<this.checks.length;E++)this.checks[E](this,C);this.stateId=C.data}setBlend(C){this.updateCheck(_StateSystem.checkBlendMode,C),this.gl[C?"enable":"disable"](this.gl.BLEND)}setOffset(C){this.updateCheck(_StateSystem.checkPolygonOffset,C),this.gl[C?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(C){this.gl[C?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(C){this.gl.depthMask(C)}setCullFace(C){this.gl[C?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(C){this.gl.frontFace(this.gl[C?"CW":"CCW"])}setBlendMode(C){if(C===this.blendMode)return;this.blendMode=C;const E=this.blendModes[C],I=this.gl;E.length===2?I.blendFunc(E[0],E[1]):I.blendFuncSeparate(E[0],E[1],E[2],E[3]),E.length===6?(this._blendEq=!0,I.blendEquationSeparate(E[4],E[5])):this._blendEq&&(this._blendEq=!1,I.blendEquationSeparate(I.FUNC_ADD,I.FUNC_ADD))}setPolygonOffset(C,E){this.gl.polygonOffset(C,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(C,E){const I=this.checks.indexOf(C);E&&I===-1?this.checks.push(C):!E&&I!==-1&&this.checks.splice(I,1)}static checkBlendMode(C,E){C.setBlendMode(E.blendMode)}static checkPolygonOffset(C,E){C.setPolygonOffset(1,E.polygonOffset)}destroy(){this.gl=null}};let StateSystem=_StateSystem;StateSystem.extension={type:ExtensionType.RendererSystem,name:"state"},extensions.add(StateSystem);class SystemManager extends EventEmitter{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(E){this.addRunners(...E.runners);const I=(E.priority??[]).filter(U=>E.systems[U]),B=[...I,...Object.keys(E.systems).filter(U=>!I.includes(U))];for(const U of B)this.addSystem(E.systems[U],U)}addRunners(...E){E.forEach(I=>{this.runners[I]=new Runner(I)})}addSystem(E,I){const B=new E(this);if(this[I])throw new Error(`Whoops! The name "${I}" is already in use`);this[I]=B,this._systemsHash[I]=B;for(const U in this.runners)this.runners[U].add(B);return this}emitWithCustomOptions(E,I){const B=Object.keys(this._systemsHash);E.items.forEach(U=>{const V=B.find(X=>this._systemsHash[X]===U);U[E.name](I[V])})}destroy(){Object.values(this.runners).forEach(E=>{E.destroy()}),this._systemsHash={}}}const _TextureGCSystem=class{constructor(C){this.renderer=C,this.count=0,this.checkCount=0,this.maxIdle=_TextureGCSystem.defaultMaxIdle,this.checkCountMax=_TextureGCSystem.defaultCheckCountMax,this.mode=_TextureGCSystem.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==GC_MODES.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const C=this.renderer.texture,E=C.managedTextures;let I=!1;for(let B=0;B<E.length;B++){const U=E[B];!U.framebuffer&&this.count-U.touched>this.maxIdle&&(C.destroyTexture(U,!0),E[B]=null,I=!0)}if(I){let B=0;for(let U=0;U<E.length;U++)E[U]!==null&&(E[B++]=E[U]);E.length=B}}unload(C){const E=this.renderer.texture,I=C._texture;I&&!I.framebuffer&&E.destroyTexture(I);for(let B=C.children.length-1;B>=0;B--)this.unload(C.children[B])}destroy(){this.renderer=null}};let TextureGCSystem=_TextureGCSystem;TextureGCSystem.defaultMode=GC_MODES.AUTO,TextureGCSystem.defaultMaxIdle=60*60,TextureGCSystem.defaultCheckCountMax=60*10,TextureGCSystem.extension={type:ExtensionType.RendererSystem,name:"textureGC"},extensions.add(TextureGCSystem);class GLTexture{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=TYPES.UNSIGNED_BYTE,this.internalFormat=FORMATS.RGBA,this.samplerType=0}}function mapTypeAndFormatToInternalFormat(C){let E;return"WebGL2RenderingContext"in globalThis&&C instanceof globalThis.WebGL2RenderingContext?E={[TYPES.UNSIGNED_BYTE]:{[FORMATS.RGBA]:C.RGBA8,[FORMATS.RGB]:C.RGB8,[FORMATS.RG]:C.RG8,[FORMATS.RED]:C.R8,[FORMATS.RGBA_INTEGER]:C.RGBA8UI,[FORMATS.RGB_INTEGER]:C.RGB8UI,[FORMATS.RG_INTEGER]:C.RG8UI,[FORMATS.RED_INTEGER]:C.R8UI,[FORMATS.ALPHA]:C.ALPHA,[FORMATS.LUMINANCE]:C.LUMINANCE,[FORMATS.LUMINANCE_ALPHA]:C.LUMINANCE_ALPHA},[TYPES.BYTE]:{[FORMATS.RGBA]:C.RGBA8_SNORM,[FORMATS.RGB]:C.RGB8_SNORM,[FORMATS.RG]:C.RG8_SNORM,[FORMATS.RED]:C.R8_SNORM,[FORMATS.RGBA_INTEGER]:C.RGBA8I,[FORMATS.RGB_INTEGER]:C.RGB8I,[FORMATS.RG_INTEGER]:C.RG8I,[FORMATS.RED_INTEGER]:C.R8I},[TYPES.UNSIGNED_SHORT]:{[FORMATS.RGBA_INTEGER]:C.RGBA16UI,[FORMATS.RGB_INTEGER]:C.RGB16UI,[FORMATS.RG_INTEGER]:C.RG16UI,[FORMATS.RED_INTEGER]:C.R16UI,[FORMATS.DEPTH_COMPONENT]:C.DEPTH_COMPONENT16},[TYPES.SHORT]:{[FORMATS.RGBA_INTEGER]:C.RGBA16I,[FORMATS.RGB_INTEGER]:C.RGB16I,[FORMATS.RG_INTEGER]:C.RG16I,[FORMATS.RED_INTEGER]:C.R16I},[TYPES.UNSIGNED_INT]:{[FORMATS.RGBA_INTEGER]:C.RGBA32UI,[FORMATS.RGB_INTEGER]:C.RGB32UI,[FORMATS.RG_INTEGER]:C.RG32UI,[FORMATS.RED_INTEGER]:C.R32UI,[FORMATS.DEPTH_COMPONENT]:C.DEPTH_COMPONENT24},[TYPES.INT]:{[FORMATS.RGBA_INTEGER]:C.RGBA32I,[FORMATS.RGB_INTEGER]:C.RGB32I,[FORMATS.RG_INTEGER]:C.RG32I,[FORMATS.RED_INTEGER]:C.R32I},[TYPES.FLOAT]:{[FORMATS.RGBA]:C.RGBA32F,[FORMATS.RGB]:C.RGB32F,[FORMATS.RG]:C.RG32F,[FORMATS.RED]:C.R32F,[FORMATS.DEPTH_COMPONENT]:C.DEPTH_COMPONENT32F},[TYPES.HALF_FLOAT]:{[FORMATS.RGBA]:C.RGBA16F,[FORMATS.RGB]:C.RGB16F,[FORMATS.RG]:C.RG16F,[FORMATS.RED]:C.R16F},[TYPES.UNSIGNED_SHORT_5_6_5]:{[FORMATS.RGB]:C.RGB565},[TYPES.UNSIGNED_SHORT_4_4_4_4]:{[FORMATS.RGBA]:C.RGBA4},[TYPES.UNSIGNED_SHORT_5_5_5_1]:{[FORMATS.RGBA]:C.RGB5_A1},[TYPES.UNSIGNED_INT_2_10_10_10_REV]:{[FORMATS.RGBA]:C.RGB10_A2,[FORMATS.RGBA_INTEGER]:C.RGB10_A2UI},[TYPES.UNSIGNED_INT_10F_11F_11F_REV]:{[FORMATS.RGB]:C.R11F_G11F_B10F},[TYPES.UNSIGNED_INT_5_9_9_9_REV]:{[FORMATS.RGB]:C.RGB9_E5},[TYPES.UNSIGNED_INT_24_8]:{[FORMATS.DEPTH_STENCIL]:C.DEPTH24_STENCIL8},[TYPES.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[FORMATS.DEPTH_STENCIL]:C.DEPTH32F_STENCIL8}}:E={[TYPES.UNSIGNED_BYTE]:{[FORMATS.RGBA]:C.RGBA,[FORMATS.RGB]:C.RGB,[FORMATS.ALPHA]:C.ALPHA,[FORMATS.LUMINANCE]:C.LUMINANCE,[FORMATS.LUMINANCE_ALPHA]:C.LUMINANCE_ALPHA},[TYPES.UNSIGNED_SHORT_5_6_5]:{[FORMATS.RGB]:C.RGB},[TYPES.UNSIGNED_SHORT_4_4_4_4]:{[FORMATS.RGBA]:C.RGBA},[TYPES.UNSIGNED_SHORT_5_5_5_1]:{[FORMATS.RGBA]:C.RGBA}},E}class TextureSystem{constructor(E){this.renderer=E,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new BaseTexture,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=mapTypeAndFormatToInternalFormat(E);const I=E.getParameter(E.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=I;for(let U=0;U<I;U++)this.boundTextures[U]=null;this.emptyTextures={};const B=new GLTexture(E.createTexture());E.bindTexture(E.TEXTURE_2D,B.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]=B,this.emptyTextures[E.TEXTURE_CUBE_MAP]=new GLTexture(E.createTexture()),E.bindTexture(E.TEXTURE_CUBE_MAP,this.emptyTextures[E.TEXTURE_CUBE_MAP].texture);for(let U=0;U<6;U++)E.texImage2D(E.TEXTURE_CUBE_MAP_POSITIVE_X+U,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 U=0;U<this.boundTextures.length;U++)this.bind(null,U)}bind(E,I=0){const{gl:B}=this;if(E=E==null?void 0:E.castToBaseTexture(),E!=null&&E.valid&&!E.parentTextureArray){E.touched=this.renderer.textureGC.count;const U=E._glTextures[this.CONTEXT_UID]||this.initTexture(E);this.boundTextures[I]!==E&&(this.currentLocation!==I&&(this.currentLocation=I,B.activeTexture(B.TEXTURE0+I)),B.bindTexture(E.target,U.texture)),U.dirtyId!==E.dirtyId?(this.currentLocation!==I&&(this.currentLocation=I,B.activeTexture(B.TEXTURE0+I)),this.updateTexture(E)):U.dirtyStyleId!==E.dirtyStyleId&&this.updateTextureStyle(E),this.boundTextures[I]=E}else this.currentLocation!==I&&(this.currentLocation=I,B.activeTexture(B.TEXTURE0+I)),B.bindTexture(B.TEXTURE_2D,this.emptyTextures[B.TEXTURE_2D].texture),this.boundTextures[I]=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:I,boundTextures:B}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let U=0;U<B.length;U++)B[U]===this.unknownTexture&&this.bind(null,U)}for(let U=0;U<B.length;U++)B[U]===E&&(this.currentLocation!==U&&(I.activeTexture(I.TEXTURE0+U),this.currentLocation=U),I.bindTexture(E.target,this.emptyTextures[E.target].texture),B[U]=null)}ensureSamplerType(E){const{boundTextures:I,hasIntegerTextures:B,CONTEXT_UID:U}=this;if(B)for(let V=E-1;V>=0;--V){const X=I[V];X&&X._glTextures[U].samplerType!==SAMPLER_TYPES.FLOAT&&this.renderer.texture.unbind(X)}}initTexture(E){const I=new GLTexture(this.gl.createTexture());return I.dirtyId=-1,E._glTextures[this.CONTEXT_UID]=I,this.managedTextures.push(E),E.on("dispose",this.destroyTexture,this),I}initTextureType(E,I){var B;I.internalFormat=((B=this.internalFormats[E.type])==null?void 0:B[E.format])??E.format,this.webGLVersion===2&&E.type===TYPES.HALF_FLOAT?I.type=this.gl.HALF_FLOAT:I.type=E.type}updateTexture(E){var U;const I=E._glTextures[this.CONTEXT_UID];if(!I)return;const B=this.renderer;if(this.initTextureType(E,I),(U=E.resource)!=null&&U.upload(B,E,I))I.samplerType!==SAMPLER_TYPES.FLOAT&&(this.hasIntegerTextures=!0);else{const V=E.realWidth,X=E.realHeight,Y=B.gl;(I.width!==V||I.height!==X||I.dirtyId<0)&&(I.width=V,I.height=X,Y.texImage2D(E.target,0,I.internalFormat,V,X,0,E.format,I.type,null))}E.dirtyStyleId!==I.dirtyStyleId&&this.updateTextureStyle(E),I.dirtyId=E.dirtyId}destroyTexture(E,I){const{gl:B}=this;if(E=E.castToBaseTexture(),E._glTextures[this.CONTEXT_UID]&&(this.unbind(E),B.deleteTexture(E._glTextures[this.CONTEXT_UID].texture),E.off("dispose",this.destroyTexture,this),delete E._glTextures[this.CONTEXT_UID],!I)){const U=this.managedTextures.indexOf(E);U!==-1&&removeItems(this.managedTextures,U,1)}}updateTextureStyle(E){var B;const I=E._glTextures[this.CONTEXT_UID];I&&((E.mipmap===MIPMAP_MODES.POW2||this.webGLVersion!==2)&&!E.isPowerOfTwo?I.mipmap=!1:I.mipmap=E.mipmap>=1,this.webGLVersion!==2&&!E.isPowerOfTwo?I.wrapMode=WRAP_MODES.CLAMP:I.wrapMode=E.wrapMode,(B=E.resource)!=null&&B.style(this.renderer,E,I)||this.setStyle(E,I),I.dirtyStyleId=E.dirtyStyleId)}setStyle(E,I){const B=this.gl;if(I.mipmap&&E.mipmap!==MIPMAP_MODES.ON_MANUAL&&B.generateMipmap(E.target),B.texParameteri(E.target,B.TEXTURE_WRAP_S,I.wrapMode),B.texParameteri(E.target,B.TEXTURE_WRAP_T,I.wrapMode),I.mipmap){B.texParameteri(E.target,B.TEXTURE_MIN_FILTER,E.scaleMode===SCALE_MODES.LINEAR?B.LINEAR_MIPMAP_LINEAR:B.NEAREST_MIPMAP_NEAREST);const U=this.renderer.context.extensions.anisotropicFiltering;if(U&&E.anisotropicLevel>0&&E.scaleMode===SCALE_MODES.LINEAR){const V=Math.min(E.anisotropicLevel,B.getParameter(U.MAX_TEXTURE_MAX_ANISOTROPY_EXT));B.texParameterf(E.target,U.TEXTURE_MAX_ANISOTROPY_EXT,V)}}else B.texParameteri(E.target,B.TEXTURE_MIN_FILTER,E.scaleMode===SCALE_MODES.LINEAR?B.LINEAR:B.NEAREST);B.texParameteri(E.target,B.TEXTURE_MAG_FILTER,E.scaleMode===SCALE_MODES.LINEAR?B.LINEAR:B.NEAREST)}destroy(){this.renderer=null}}TextureSystem.extension={type:ExtensionType.RendererSystem,name:"texture"},extensions.add(TextureSystem);class TransformFeedbackSystem{constructor(E){this.renderer=E}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(E){const{gl:I,CONTEXT_UID:B}=this,U=E._glTransformFeedbacks[B]||this.createGLTransformFeedback(E);I.bindTransformFeedback(I.TRANSFORM_FEEDBACK,U)}unbind(){const{gl:E}=this;E.bindTransformFeedback(E.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(E,I){const{gl:B,renderer:U}=this;I&&U.shader.bind(I),B.beginTransformFeedback(E)}endTransformFeedback(){const{gl:E}=this;E.endTransformFeedback()}createGLTransformFeedback(E){const{gl:I,renderer:B,CONTEXT_UID:U}=this,V=I.createTransformFeedback();E._glTransformFeedbacks[U]=V,I.bindTransformFeedback(I.TRANSFORM_FEEDBACK,V);for(let X=0;X<E.buffers.length;X++){const Y=E.buffers[X];Y&&(B.buffer.update(Y),Y._glBuffers[U].refCount++,I.bindBufferBase(I.TRANSFORM_FEEDBACK_BUFFER,X,Y._glBuffers[U].buffer||null))}return I.bindTransformFeedback(I.TRANSFORM_FEEDBACK,null),E.disposeRunner.add(this),V}disposeTransformFeedback(E,I){const B=E._glTransformFeedbacks[this.CONTEXT_UID],U=this.gl;E.disposeRunner.remove(this);const V=this.renderer.buffer;if(V)for(let X=0;X<E.buffers.length;X++){const Y=E.buffers[X];if(!Y)continue;const K=Y._glBuffers[this.CONTEXT_UID];K&&(K.refCount--,K.refCount===0&&!I&&V.dispose(Y,I))}B&&(I||U.deleteTransformFeedback(B),delete E._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}TransformFeedbackSystem.extension={type:ExtensionType.RendererSystem,name:"transformFeedback"},extensions.add(TransformFeedbackSystem);class ViewSystem{constructor(E){this.renderer=E}init(E){this.screen=new Rectangle(0,0,E.width,E.height),this.element=E.view||settings.ADAPTER.createCanvas(),this.resolution=E.resolution||settings.RESOLUTION,this.autoDensity=!!E.autoDensity}resizeView(E,I){this.element.width=Math.round(E*this.resolution),this.element.height=Math.round(I*this.resolution);const B=this.element.width/this.resolution,U=this.element.height/this.resolution;this.screen.width=B,this.screen.height=U,this.autoDensity&&(this.element.style.width=`${B}px`,this.element.style.height=`${U}px`),this.renderer.emit("resize",B,U),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(E){var I;E&&((I=this.element.parentNode)==null||I.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}ViewSystem.defaultOptions={width:800,height:600,resolution:settings.RESOLUTION,autoDensity:!1},ViewSystem.extension={type:[ExtensionType.RendererSystem,ExtensionType.CanvasRendererSystem],name:"_view"},extensions.add(ViewSystem),settings.PREFER_ENV=ENV.WEBGL2,settings.STRICT_TEXTURE_CACHE=!1,settings.RENDER_OPTIONS={...ContextSystem.defaultOptions,...BackgroundSystem.defaultOptions,...ViewSystem.defaultOptions,...StartupSystem.defaultOptions},Object.defineProperties(settings,{WRAP_MODE:{get(){return BaseTexture.defaultOptions.wrapMode},set(C){deprecation("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),BaseTexture.defaultOptions.wrapMode=C}},SCALE_MODE:{get(){return BaseTexture.defaultOptions.scaleMode},set(C){deprecation("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),BaseTexture.defaultOptions.scaleMode=C}},MIPMAP_TEXTURES:{get(){return BaseTexture.defaultOptions.mipmap},set(C){deprecation("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),BaseTexture.defaultOptions.mipmap=C}},ANISOTROPIC_LEVEL:{get(){return BaseTexture.defaultOptions.anisotropicLevel},set(C){deprecation("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),BaseTexture.defaultOptions.anisotropicLevel=C}},FILTER_RESOLUTION:{get(){return deprecation("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Filter.defaultResolution},set(C){Filter.defaultResolution=C}},FILTER_MULTISAMPLE:{get(){return deprecation("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Filter.defaultMultisample},set(C){Filter.defaultMultisample=C}},SPRITE_MAX_TEXTURES:{get(){return BatchRenderer.defaultMaxTextures},set(C){deprecation("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),BatchRenderer.defaultMaxTextures=C}},SPRITE_BATCH_SIZE:{get(){return BatchRenderer.defaultBatchSize},set(C){deprecation("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),BatchRenderer.defaultBatchSize=C}},CAN_UPLOAD_SAME_BUFFER:{get(){return BatchRenderer.canUploadSameBuffer},set(C){deprecation("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),BatchRenderer.canUploadSameBuffer=C}},GC_MODE:{get(){return TextureGCSystem.defaultMode},set(C){deprecation("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),TextureGCSystem.defaultMode=C}},GC_MAX_IDLE:{get(){return TextureGCSystem.defaultMaxIdle},set(C){deprecation("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),TextureGCSystem.defaultMaxIdle=C}},GC_MAX_CHECK_COUNT:{get(){return TextureGCSystem.defaultCheckCountMax},set(C){deprecation("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),TextureGCSystem.defaultCheckCountMax=C}},PRECISION_VERTEX:{get(){return Program.defaultVertexPrecision},set(C){deprecation("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Program.defaultVertexPrecision=C}},PRECISION_FRAGMENT:{get(){return Program.defaultFragmentPrecision},set(C){deprecation("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Program.defaultFragmentPrecision=C}}});var UPDATE_PRIORITY=(C=>(C[C.INTERACTION=50]="INTERACTION",C[C.HIGH=25]="HIGH",C[C.NORMAL=0]="NORMAL",C[C.LOW=-25]="LOW",C[C.UTILITY=-50]="UTILITY",C))(UPDATE_PRIORITY||{});class TickerListener{constructor(E,I=null,B=0,U=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=E,this.context=I,this.priority=B,this.once=U}match(E,I=null){return this.fn===E&&this.context===I}emit(E){this.fn&&(this.context?this.fn.call(this.context,E):this.fn(E));const I=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),I}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 I=this.next;return this.next=E?null:I,this.previous=null,I}}const _Ticker=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 TickerListener(null,null,1/0),this.deltaMS=1/_Ticker.targetFPMS,this.elapsedMS=1/_Ticker.targetFPMS,this._tick=C=>{this._requestId=null,this.started&&(this.update(C),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(C,E,I=UPDATE_PRIORITY.NORMAL){return this._addListener(new TickerListener(C,E,I))}addOnce(C,E,I=UPDATE_PRIORITY.NORMAL){return this._addListener(new TickerListener(C,E,I,!0))}_addListener(C){let E=this._head.next,I=this._head;if(!E)C.connect(I);else{for(;E;){if(C.priority>E.priority){C.connect(I);break}I=E,E=E.next}C.previous||C.connect(I)}return this._startIfPossible(),this}remove(C,E){let I=this._head.next;for(;I;)I.match(C,E)?I=I.destroy():I=I.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let C=0,E=this._head;for(;E=E.next;)C++;return C}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let C=this._head.next;for(;C;)C=C.destroy(!0);this._head.destroy(),this._head=null}}update(C=performance.now()){let E;if(C>this.lastTime){if(E=this.elapsedMS=C-this.lastTime,E>this._maxElapsedMS&&(E=this._maxElapsedMS),E*=this.speed,this._minElapsedMS){const U=C-this._lastFrame|0;if(U<this._minElapsedMS)return;this._lastFrame=C-U%this._minElapsedMS}this.deltaMS=E,this.deltaTime=this.deltaMS*_Ticker.targetFPMS;const I=this._head;let B=I.next;for(;B;)B=B.emit(this.deltaTime);I.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=C}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(C){const E=Math.min(this.maxFPS,C),I=Math.min(Math.max(0,E)/1e3,_Ticker.targetFPMS);this._maxElapsedMS=1/I}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(C){if(C===0)this._minElapsedMS=0;else{const E=Math.max(this.minFPS,C);this._minElapsedMS=1/(E/1e3)}}static get shared(){if(!_Ticker._shared){const C=_Ticker._shared=new _Ticker;C.autoStart=!0,C._protected=!0}return _Ticker._shared}static get system(){if(!_Ticker._system){const C=_Ticker._system=new _Ticker;C.autoStart=!0,C._protected=!0}return _Ticker._system}};let Ticker=_Ticker;Ticker.targetFPMS=.06,Object.defineProperties(settings,{TARGET_FPMS:{get(){return Ticker.targetFPMS},set(C){deprecation("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),Ticker.targetFPMS=C}}});class TickerPlugin{static init(E){E=Object.assign({autoStart:!0,sharedTicker:!1},E),Object.defineProperty(this,"ticker",{set(I){this._ticker&&this._ticker.remove(this.render,this),this._ticker=I,I&&I.add(this.render,this,UPDATE_PRIORITY.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=E.sharedTicker?Ticker.shared:new Ticker,E.autoStart&&this.start()}static destroy(){if(this._ticker){const E=this._ticker;this.ticker=null,E.destroy()}}}TickerPlugin.extension=ExtensionType.Application,extensions.add(TickerPlugin);const renderers=[];extensions.handleByList(ExtensionType.Renderer,renderers);class MultisampleSystem{constructor(E){this.renderer=E}contextChange(E){let I;if(this.renderer.context.webGLVersion===1){const B=E.getParameter(E.FRAMEBUFFER_BINDING);E.bindFramebuffer(E.FRAMEBUFFER,null),I=E.getParameter(E.SAMPLES),E.bindFramebuffer(E.FRAMEBUFFER,B)}else{const B=E.getParameter(E.DRAW_FRAMEBUFFER_BINDING);E.bindFramebuffer(E.DRAW_FRAMEBUFFER,null),I=E.getParameter(E.SAMPLES),E.bindFramebuffer(E.DRAW_FRAMEBUFFER,B)}I>=MSAA_QUALITY.HIGH?this.multisample=MSAA_QUALITY.HIGH:I>=MSAA_QUALITY.MEDIUM?this.multisample=MSAA_QUALITY.MEDIUM:I>=MSAA_QUALITY.LOW?this.multisample=MSAA_QUALITY.LOW:this.multisample=MSAA_QUALITY.NONE}destroy(){}}MultisampleSystem.extension={type:ExtensionType.RendererSystem,name:"_multisample"},extensions.add(MultisampleSystem);class GLBuffer{constructor(E){this.buffer=E||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class BufferSystem{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:I,CONTEXT_UID:B}=this,U=E._glBuffers[B]||this.createGLBuffer(E);I.bindBuffer(E.type,U.buffer)}unbind(E){const{gl:I}=this;I.bindBuffer(E,null)}bindBufferBase(E,I){const{gl:B,CONTEXT_UID:U}=this;if(this.boundBufferBases[I]!==E){const V=E._glBuffers[U]||this.createGLBuffer(E);this.boundBufferBases[I]=E,B.bindBufferBase(B.UNIFORM_BUFFER,I,V.buffer)}}bindBufferRange(E,I,B){const{gl:U,CONTEXT_UID:V}=this;B=B||0;const X=E._glBuffers[V]||this.createGLBuffer(E);U.bindBufferRange(U.UNIFORM_BUFFER,I||0,X.buffer,B*256,256)}update(E){const{gl:I,CONTEXT_UID:B}=this,U=E._glBuffers[B]||this.createGLBuffer(E);if(E._updateID!==U.updateID)if(U.updateID=E._updateID,I.bindBuffer(E.type,U.buffer),U.byteLength>=E.data.byteLength)I.bufferSubData(E.type,0,E.data);else{const V=E.static?I.STATIC_DRAW:I.DYNAMIC_DRAW;U.byteLength=E.data.byteLength,I.bufferData(E.type,E.data,V)}}dispose(E,I){if(!this.managedBuffers[E.id])return;delete this.managedBuffers[E.id];const B=E._glBuffers[this.CONTEXT_UID],U=this.gl;E.disposeRunner.remove(this),B&&(I||U.deleteBuffer(B.buffer),delete E._glBuffers[this.CONTEXT_UID])}disposeAll(E){const I=Object.keys(this.managedBuffers);for(let B=0;B<I.length;B++)this.dispose(this.managedBuffers[I[B]],E)}createGLBuffer(E){const{CONTEXT_UID:I,gl:B}=this;return E._glBuffers[I]=new GLBuffer(B.createBuffer()),this.managedBuffers[E.id]=E,E.disposeRunner.add(this),E._glBuffers[I]}}BufferSystem.extension={type:ExtensionType.RendererSystem,name:"buffer"},extensions.add(BufferSystem);class ObjectRendererSystem{constructor(E){this.renderer=E}render(E,I){const B=this.renderer;let U,V,X,Y;if(I&&(U=I.renderTexture,V=I.clear,X=I.transform,Y=I.skipUpdateTransform),this.renderingToScreen=!U,B.runners.prerender.emit(),B.emit("prerender"),B.projection.transform=X,!B.context.isLost){if(U||(this.lastObjectRendered=E),!Y){const K=E.enableTempParent();E.updateTransform(),E.disableTempParent(K)}B.renderTexture.bind(U),B.batch.currentRenderer.start(),(V??B.background.clearBeforeRender)&&B.renderTexture.clear(),E.render(B),B.batch.currentRenderer.flush(),U&&(I.blit&&B.framebuffer.blit(),U.baseTexture.update()),B.runners.postrender.emit(),B.projection.transform=null,B.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}ObjectRendererSystem.extension={type:ExtensionType.RendererSystem,name:"objectRenderer"},extensions.add(ObjectRendererSystem);const _Renderer=class extends SystemManager{constructor(C){super(),this.type=RENDERER_TYPE.WEBGL,C=Object.assign({},settings.RENDER_OPTIONS,C),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new UniformGroup({projectionMatrix:new Matrix$2},!0);const E={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:_Renderer.__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 C&&(deprecation("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),C.premultipliedAlpha=C.useContextAlpha&&C.useContextAlpha!=="notMultiplied",C.backgroundAlpha=C.useContextAlpha===!1?1:C.backgroundAlpha),this._plugin.rendererPlugins=_Renderer.__plugins,this.options=C,this.startup.run(this.options)}static test(C){return C!=null&&C.forceCanvas?!1:isWebGLSupported()}render(C,E){this.objectRenderer.render(C,E)}resize(C,E){this._view.resizeView(C,E)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(C=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:C}),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(C){this._view.resolution=C,this.runners.resolutionChange.emit(C)}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 deprecation("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return deprecation("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return deprecation("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return deprecation("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(C){deprecation("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=C}get backgroundAlpha(){return deprecation("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(C){deprecation("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=C}get powerPreference(){return deprecation("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(C,E){return this.textureGenerator.generateTexture(C,E)}};let Renderer=_Renderer;Renderer.extension={type:ExtensionType.Renderer,priority:1},Renderer.__plugins={},Renderer.__systems={},extensions.handleByMap(ExtensionType.RendererPlugin,Renderer.__plugins),extensions.handleByMap(ExtensionType.RendererSystem,Renderer.__systems),extensions.add(Renderer);class AbstractMultiResource extends Resource{constructor(E,I){const{width:B,height:U}=I||{};super(B,U),this.items=[],this.itemDirtyIds=[];for(let V=0;V<E;V++){const X=new BaseTexture;this.items.push(X),this.itemDirtyIds.push(-2)}this.length=E,this._load=null,this.baseTexture=null}initFromArray(E,I){for(let B=0;B<this.length;B++)E[B]&&(E[B].castToBaseTexture?this.addBaseTextureAt(E[B].castToBaseTexture(),B):E[B]instanceof Resource?this.addResourceAt(E[B],B):this.addResourceAt(autoDetectResource(E[B],I),B))}dispose(){for(let E=0,I=this.length;E<I;E++)this.items[E].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(E,I){if(!this.items[I])throw new Error(`Index ${I} is out of bounds`);return E.valid&&!this.valid&&this.resize(E.width,E.height),this.items[I].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 I=0;I<this.length;I++)this.items[I].parentTextureArray=E,this.items[I].on("update",E.update,E)}unbind(E){super.unbind(E);for(let I=0;I<this.length;I++)this.items[I].parentTextureArray=null,this.items[I].off("update",E.update,E)}load(){if(this._load)return this._load;const I=this.items.map(B=>B.resource).filter(B=>B).map(B=>B.load());return this._load=Promise.all(I).then(()=>{const{realWidth:B,realHeight:U}=this.items[0];return this.resize(B,U),Promise.resolve(this)}),this._load}}class ArrayResource extends AbstractMultiResource{constructor(E,I){const{width:B,height:U}=I||{};let V,X;Array.isArray(E)?(V=E,X=E.length):X=E,super(X,{width:B,height:U}),V&&this.initFromArray(V,I)}addBaseTextureAt(E,I){if(E.resource)this.addResourceAt(E.resource,I);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(E){super.bind(E),E.target=TARGETS.TEXTURE_2D_ARRAY}upload(E,I,B){const{length:U,itemDirtyIds:V,items:X}=this,{gl:Y}=E;B.dirtyId<0&&Y.texImage3D(Y.TEXTURE_2D_ARRAY,0,B.internalFormat,this._width,this._height,U,0,I.format,B.type,null);for(let K=0;K<U;K++){const J=X[K];V[K]<J.dirtyId&&(V[K]=J.dirtyId,J.valid&&Y.texSubImage3D(Y.TEXTURE_2D_ARRAY,0,0,0,K,J.resource.width,J.resource.height,1,I.format,B.type,J.resource.source))}return!0}}class CanvasResource extends BaseImageResource{constructor(E){super(E)}static test(E){const{OffscreenCanvas:I}=globalThis;return I&&E instanceof I?!0:globalThis.HTMLCanvasElement&&E instanceof HTMLCanvasElement}}const _CubeResource=class extends AbstractMultiResource{constructor(C,E){const{width:I,height:B,autoLoad:U,linkBaseTexture:V}=E||{};if(C&&C.length!==_CubeResource.SIDES)throw new Error(`Invalid length. Got ${C.length}, expected 6`);super(6,{width:I,height:B});for(let X=0;X<_CubeResource.SIDES;X++)this.items[X].target=TARGETS.TEXTURE_CUBE_MAP_POSITIVE_X+X;this.linkBaseTexture=V!==!1,C&&this.initFromArray(C,E),U!==!1&&this.load()}bind(C){super.bind(C),C.target=TARGETS.TEXTURE_CUBE_MAP}addBaseTextureAt(C,E,I){if(I===void 0&&(I=this.linkBaseTexture),!this.items[E])throw new Error(`Index ${E} is out of bounds`);if(!this.linkBaseTexture||C.parentTextureArray||Object.keys(C._glTextures).length>0)if(C.resource)this.addResourceAt(C.resource,E);else throw new Error("CubeResource does not support copying of renderTexture.");else C.target=TARGETS.TEXTURE_CUBE_MAP_POSITIVE_X+E,C.parentTextureArray=this.baseTexture,this.items[E]=C;return C.valid&&!this.valid&&this.resize(C.realWidth,C.realHeight),this.items[E]=C,this}upload(C,E,I){const B=this.itemDirtyIds;for(let U=0;U<_CubeResource.SIDES;U++){const V=this.items[U];(B[U]<V.dirtyId||I.dirtyId<E.dirtyId)&&(V.valid&&V.resource?(V.resource.upload(C,V,I),B[U]=V.dirtyId):B[U]<-1&&(C.gl.texImage2D(V.target,0,I.internalFormat,E.realWidth,E.realHeight,0,E.format,I.type,null),B[U]=-1))}return!0}static test(C){return Array.isArray(C)&&C.length===_CubeResource.SIDES}};let CubeResource=_CubeResource;CubeResource.SIDES=6;class ImageBitmapResource extends BaseImageResource{constructor(E,I){I=I||{};let B,U;typeof E=="string"?(B=ImageBitmapResource.EMPTY,U=E):(B=E,U=null),super(B),this.url=U,this.crossOrigin=I.crossOrigin??!0,this.alphaMode=typeof I.alphaMode=="number"?I.alphaMode:null,this._load=null,I.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(E,I)=>{if(this.url===null){E(this);return}try{const B=await settings.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const U=await B.blob();if(this.destroyed)return;const V=await createImageBitmap(U,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===ALPHA_MODES.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=V,this.update(),E(this)}catch(B){if(this.destroyed)return;I(B),this.onError.emit(B)}}),this._load)}upload(E,I,B){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(I.alphaMode=this.alphaMode),super.upload(E,I,B)):(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 ImageBitmapResource._EMPTY=ImageBitmapResource._EMPTY??settings.ADAPTER.createCanvas(0,0),ImageBitmapResource._EMPTY}}const _SVGResource=class extends BaseImageResource{constructor(C,E){E=E||{},super(settings.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=C,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(C=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),C(this)},_SVGResource.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 C=new Image;BaseImageResource.crossOrigin(C,this.svg,this._crossorigin),C.src=this.svg,C.onerror=E=>{this._resolve&&(C.onerror=null,this.onError.emit(E))},C.onload=()=>{if(!this._resolve)return;const E=C.width,I=C.height;if(!E||!I)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let B=E*this.scale,U=I*this.scale;(this._overrideWidth||this._overrideHeight)&&(B=this._overrideWidth||this._overrideHeight/I*E,U=this._overrideHeight||this._overrideWidth/E*I),B=Math.round(B),U=Math.round(U);const V=this.source;V.width=B,V.height=U,V._pixiId=`canvas_${uid()}`,V.getContext("2d").drawImage(C,0,0,E,I,0,0,B,U),this._resolve(),this._resolve=null}}static getSize(C){const E=_SVGResource.SVG_SIZE.exec(C),I={};return E&&(I[E[1]]=Math.round(parseFloat(E[3])),I[E[5]]=Math.round(parseFloat(E[7]))),I}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(C,E){return E==="svg"||typeof C=="string"&&C.startsWith("data:image/svg+xml")||typeof C=="string"&&_SVGResource.SVG_XML.test(C)}};let SVGResource=_SVGResource;SVGResource.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,SVGResource.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const _VideoResource=class extends BaseImageResource{constructor(C,E){if(E=E||{},!(C instanceof HTMLVideoElement)){const I=document.createElement("video");I.setAttribute("preload","auto"),I.setAttribute("webkit-playsinline",""),I.setAttribute("playsinline",""),typeof C=="string"&&(C=[C]);const B=C[0].src||C[0];BaseImageResource.crossOrigin(I,B,E.crossorigin);for(let U=0;U<C.length;++U){const V=document.createElement("source");let{src:X,mime:Y}=C[U];X=X||C[U];const K=X.split("?").shift().toLowerCase(),J=K.slice(K.lastIndexOf(".")+1);Y=Y||_VideoResource.MIME_TYPES[J]||`video/${J}`,V.src=X,V.type=Y,I.appendChild(V)}C=I}super(C),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(C=0){if(!this.destroyed){const E=Ticker.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 C=this.source;return(C.readyState===C.HAVE_ENOUGH_DATA||C.readyState===C.HAVE_FUTURE_DATA)&&C.width&&C.height&&(C.complete=!0),C.addEventListener("play",this._onPlayStart.bind(this)),C.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(C.addEventListener("canplay",this._onCanPlay),C.addEventListener("canplaythrough",this._onCanPlay),C.addEventListener("error",this._onError,!0)),this._load=new Promise(E=>{this.valid?E(this):(this._resolve=E,C.load())}),this._load}_onError(C){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(C)}_isSourcePlaying(){const C=this.source;return!C.paused&&!C.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Ticker.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(Ticker.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const C=this.source;C.removeEventListener("canplay",this._onCanPlay),C.removeEventListener("canplaythrough",this._onCanPlay);const E=this.valid;this.resize(C.videoWidth,C.videoHeight),!E&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&C.play()}dispose(){this._isConnectedToTicker&&(Ticker.shared.remove(this.update,this),this._isConnectedToTicker=!1);const C=this.source;C&&(C.removeEventListener("error",this._onError,!0),C.pause(),C.src="",C.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(C){C!==this._autoUpdate&&(this._autoUpdate=C,!this._autoUpdate&&this._isConnectedToTicker?(Ticker.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Ticker.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(C){C!==this._updateFPS&&(this._updateFPS=C)}static test(C,E){return globalThis.HTMLVideoElement&&C instanceof HTMLVideoElement||_VideoResource.TYPES.includes(E)}};let VideoResource=_VideoResource;VideoResource.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],VideoResource.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},INSTALLED.push(ImageBitmapResource,ImageResource,CanvasResource,VideoResource,SVGResource,BufferResource,CubeResource,ArrayResource);var e$2=`attribute vec2 aVertexPosition;
498
522
  attribute vec2 aTextureCoord;
499
523
 
500
524
  uniform mat3 projectionMatrix;
@@ -505,7 +529,7 @@ void main(void)
505
529
  {
506
530
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
507
531
  vTextureCoord = aTextureCoord;
508
- }`,pT=`varying vec2 vTextureCoord;
532
+ }`,o$4=`varying vec2 vTextureCoord;
509
533
  uniform sampler2D uSampler;
510
534
 
511
535
  uniform float gamma;
@@ -536,7 +560,7 @@ void main(void)
536
560
 
537
561
  gl_FragColor = c * alpha;
538
562
  }
539
- `;let gT=class extends De{constructor(e){super(dT,pT),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 mT=`attribute vec2 aVertexPosition;
563
+ `;let s$4=class extends Filter{constructor(E){super(e$2,o$4),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,I,B,U){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,I,B,U)}};var c$6=`attribute vec2 aVertexPosition;
540
564
  attribute vec2 aTextureCoord;
541
565
 
542
566
  uniform mat3 projectionMatrix;
@@ -547,7 +571,7 @@ void main(void)
547
571
  {
548
572
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
549
573
  vTextureCoord = aTextureCoord;
550
- }`,vT=`
574
+ }`,v$2=`
551
575
  varying vec2 vTextureCoord;
552
576
  uniform sampler2D uSampler;
553
577
 
@@ -573,7 +597,7 @@ void main(void)
573
597
  color *= 0.25;
574
598
 
575
599
  gl_FragColor = color;
576
- }`,_T=`
600
+ }`,y$1=`
577
601
  varying vec2 vTextureCoord;
578
602
  uniform sampler2D uSampler;
579
603
 
@@ -601,7 +625,7 @@ void main(void)
601
625
 
602
626
  gl_FragColor = color;
603
627
  }
604
- `;let ls=class extends De{constructor(e=4,r=3,n=!1){super(mT,n?_T:vT),this._kernels=[],this._blur=4,this._quality=3,this.uniforms.uOffset=new Float32Array(2),this._pixelSize=new We,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 We?(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 Hd=`attribute vec2 aVertexPosition;
628
+ `;let _$1=class extends Filter{constructor(E=4,I=3,B=!1){super(c$6,B?y$1:v$2),this._kernels=[],this._blur=4,this._quality=3,this.uniforms.uOffset=new Float32Array(2),this._pixelSize=new Point,this.pixelSize=1,this._clamp=B,Array.isArray(E)?this.kernels=E:(this._blur=E,this.quality=I)}apply(E,I,B,U){const V=this._pixelSize.x/I._frame.width,X=this._pixelSize.y/I._frame.height;let Y;if(this._quality===1||this._blur===0)Y=this._kernels[0]+.5,this.uniforms.uOffset[0]=Y*V,this.uniforms.uOffset[1]=Y*X,E.applyFilter(this,I,B,U);else{const K=E.getFilterTexture();let J=I,xe=K,Z;const _e=this._quality-1;for(let Se=0;Se<_e;Se++)Y=this._kernels[Se]+.5,this.uniforms.uOffset[0]=Y*V,this.uniforms.uOffset[1]=Y*X,E.applyFilter(this,J,xe,1),Z=J,J=xe,xe=Z;Y=this._kernels[_e]+.5,this.uniforms.uOffset[0]=Y*V,this.uniforms.uOffset[1]=Y*X,E.applyFilter(this,J,B,U),E.returnFilterTexture(K)}}_updatePadding(){this.padding=Math.ceil(this._kernels.reduce((E,I)=>E+I+.5,0))}_generateKernels(){const E=this._blur,I=this._quality,B=[E];if(E>0){let U=E;const V=E/I;for(let X=1;X<I;X++)U-=V,B.push(U)}this._kernels=B,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 Point?(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 a$5=`attribute vec2 aVertexPosition;
605
629
  attribute vec2 aTextureCoord;
606
630
 
607
631
  uniform mat3 projectionMatrix;
@@ -612,7 +636,7 @@ void main(void)
612
636
  {
613
637
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
614
638
  vTextureCoord = aTextureCoord;
615
- }`,yT=`
639
+ }`,m$2=`
616
640
  uniform sampler2D uSampler;
617
641
  varying vec2 vTextureCoord;
618
642
 
@@ -633,7 +657,7 @@ void main() {
633
657
  gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
634
658
  }
635
659
  }
636
- `;let xT=class extends De{constructor(e=.5){super(Hd,yT),this.threshold=e}get threshold(){return this.uniforms.threshold}set threshold(e){this.uniforms.threshold=e}};var bT=`uniform sampler2D uSampler;
660
+ `;let x$2=class extends Filter{constructor(E=.5){super(a$5,m$2),this.threshold=E}get threshold(){return this.uniforms.threshold}set threshold(E){this.uniforms.threshold=E}};var g$1=`uniform sampler2D uSampler;
637
661
  varying vec2 vTextureCoord;
638
662
 
639
663
  uniform sampler2D bloomTexture;
@@ -647,7 +671,7 @@ void main() {
647
671
  bloomColor.rgb *= bloomScale;
648
672
  gl_FragColor = color + bloomColor;
649
673
  }
650
- `;const Vd=class extends De{constructor(e){super(Hd,bT),this.bloomScale=1,this.brightness=1,this._resolution=be.FILTER_RESOLUTION,typeof e=="number"&&(e={threshold:e});const r=Object.assign(Vd.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 xT(r.threshold),this._extractFilter.resolution=l,this._blurFilter=n?new ls(n):new ls(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 wT=Vd;wT.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:be.FILTER_RESOLUTION};var TT=`attribute vec2 aVertexPosition;
674
+ `;const c$5=class extends Filter{constructor(E){super(a$5,g$1),this.bloomScale=1,this.brightness=1,this._resolution=settings.FILTER_RESOLUTION,typeof E=="number"&&(E={threshold:E});const I=Object.assign(c$5.defaults,E);this.bloomScale=I.bloomScale,this.brightness=I.brightness;const{kernels:B,blur:U,quality:V,pixelSize:X,resolution:Y}=I;this._extractFilter=new x$2(I.threshold),this._extractFilter.resolution=Y,this._blurFilter=B?new _$1(B):new _$1(U,V),this.pixelSize=X,this.resolution=Y}apply(E,I,B,U,V){const X=E.getFilterTexture();this._extractFilter.apply(E,I,X,1,V);const Y=E.getFilterTexture();this._blurFilter.apply(E,X,Y,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=Y,E.applyFilter(this,I,B,U),E.returnFilterTexture(Y),E.returnFilterTexture(X)}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 b$1=c$5;b$1.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:settings.FILTER_RESOLUTION};var d$3=`attribute vec2 aVertexPosition;
651
675
  attribute vec2 aTextureCoord;
652
676
 
653
677
  uniform mat3 projectionMatrix;
@@ -658,7 +682,7 @@ void main(void)
658
682
  {
659
683
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
660
684
  vTextureCoord = aTextureCoord;
661
- }`,AT=`uniform float radius;
685
+ }`,u$3=`uniform float radius;
662
686
  uniform float strength;
663
687
  uniform vec2 center;
664
688
  uniform sampler2D uSampler;
@@ -691,7 +715,7 @@ void main()
691
715
 
692
716
  gl_FragColor = color;
693
717
  }
694
- `;const Xd=class extends De{constructor(e){super(TT,AT),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,Xd.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 ST=Xd;ST.defaults={center:[.5,.5],radius:100,strength:1};var ET=`const float PI = 3.1415926538;
718
+ `;const n$4=class extends Filter{constructor(E){super(d$3,u$3),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,n$4.defaults,E)}apply(E,I,B,U){const{width:V,height:X}=I.filterFrame;this.uniforms.dimensions[0]=V,this.uniforms.dimensions[1]=X,E.applyFilter(this,I,B,U)}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 t$2=n$4;t$2.defaults={center:[.5,.5],radius:100,strength:1};var Q=`const float PI = 3.1415926538;
695
719
  const float PI_2 = PI*2.;
696
720
 
697
721
  varying vec2 vTextureCoord;
@@ -818,7 +842,7 @@ void main(void) {
818
842
  // mix resulting color with current color
819
843
  gl_FragColor = gradientColor + currentColor*(1.-gradientColor.a);
820
844
  }
821
- `,CT=`attribute vec2 aVertexPosition;
845
+ `,W=`attribute vec2 aVertexPosition;
822
846
  attribute vec2 aTextureCoord;
823
847
 
824
848
  uniform mat3 projectionMatrix;
@@ -834,7 +858,7 @@ void main(void)
834
858
  vTextureCoord = aTextureCoord;
835
859
  vFilterCoord = vTextureCoord * inputSize.xy / outputFrame.zw;
836
860
  }
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()||U()||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 U(){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;
861
+ `,v$1=v$1||{};v$1.stringify=function(){var C={"visit_linear-gradient":function(E){return C.visit_gradient(E)},"visit_repeating-linear-gradient":function(E){return C.visit_gradient(E)},"visit_radial-gradient":function(E){return C.visit_gradient(E)},"visit_repeating-radial-gradient":function(E){return C.visit_gradient(E)},visit_gradient:function(E){var I=C.visit(E.orientation);return I&&(I+=", "),E.type+"("+I+C.visit(E.colorStops)+")"},visit_shape:function(E){var I=E.value,B=C.visit(E.at),U=C.visit(E.style);return U&&(I+=" "+U),B&&(I+=" at "+B),I},"visit_default-radial":function(E){var I="",B=C.visit(E.at);return B&&(I+=B),I},"visit_extent-keyword":function(E){var I=E.value,B=C.visit(E.at);return B&&(I+=" at "+B),I},"visit_position-keyword":function(E){return E.value},visit_position:function(E){return C.visit(E.value.x)+" "+C.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 C.visit_color(E.value,E)},visit_hex:function(E){return C.visit_color("#"+E.value,E)},visit_rgb:function(E){return C.visit_color("rgb("+E.value.join(", ")+")",E)},visit_rgba:function(E){return C.visit_color("rgba("+E.value.join(", ")+")",E)},visit_color:function(E,I){var B=E,U=C.visit(I.length);return U&&(B+=" "+U),B},visit_angular:function(E){return E.value+"deg"},visit_directional:function(E){return"to "+E.value},visit_array:function(E){var I="",B=E.length;return E.forEach(function(U,V){I+=C.visit(U),V<B-1&&(I+=", ")}),I},visit:function(E){if(!E)return"";var I="";if(E instanceof Array)return C.visit_array(E,I);if(E.type){var B=C["visit_"+E.type];if(B)return B(E);throw Error("Missing visitor visit_"+E.type)}else throw Error("Invalid node.")}};return function(E){return C.visit(E)}}();var v$1=v$1||{};v$1.parse=function(){var C={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 I(Ne){var Me=new Error(E+": "+Ne);throw Me.source=E,Me}function B(){var Ne=U();return E.length>0&&I("Invalid input not EOF"),Ne}function U(){return Pe(V)}function V(){return X("linear-gradient",C.linearGradient,K)||X("repeating-linear-gradient",C.repeatingLinearGradient,K)||X("radial-gradient",C.radialGradient,Z)||X("repeating-radial-gradient",C.repeatingRadialGradient,Z)}function X(Ne,Me,ke){return Y(Me,function(Ge){var Be=ke();return Be&&(He(C.comma)||I("Missing comma before color stops")),{type:Ne,orientation:Be,colorStops:Pe(Ie)}})}function Y(Ne,Me){var ke=He(Ne);if(ke){He(C.startCall)||I("Missing (");var Ge=Me(ke);return He(C.endCall)||I("Missing )"),Ge}}function K(){return J()||xe()}function J(){return ze("directional",C.sideOrCorner,1)}function xe(){return ze("angular",C.angleValue,1)}function Z(){var Ne,Me=_e(),ke;return Me&&(Ne=[],Ne.push(Me),ke=E,He(C.comma)&&(Me=_e(),Me?Ne.push(Me):E=ke)),Ne}function _e(){var Ne=Se()||Ee();if(Ne)Ne.at=Re();else{var Me=Ae();if(Me){Ne=Me;var ke=Re();ke&&(Ne.at=ke)}else{var Ge=Te();Ge&&(Ne={type:"default-radial",at:Ge})}}return Ne}function Se(){var Ne=ze("shape",/^(circle)/i,0);return Ne&&(Ne.style=je()||Ae()),Ne}function Ee(){var Ne=ze("shape",/^(ellipse)/i,0);return Ne&&(Ne.style=Ue()||Ae()),Ne}function Ae(){return ze("extent-keyword",C.extentKeywords,1)}function Re(){if(ze("position",/^at/,0)){var Ne=Te();return Ne||I("Missing positioning value"),Ne}}function Te(){var Ne=we();if(Ne.x||Ne.y)return{type:"position",value:Ne}}function we(){return{x:Ue(),y:Ue()}}function Pe(Ne){var Me=Ne(),ke=[];if(Me)for(ke.push(Me);He(C.comma);)Me=Ne(),Me?ke.push(Me):I("One extra comma");return ke}function Ie(){var Ne=Fe();return Ne||I("Expected color definition"),Ne.length=Ue(),Ne}function Fe(){return Le()||Ve()||$e()||Oe()}function Oe(){return ze("literal",C.literalColor,0)}function Le(){return ze("hex",C.hexColor,1)}function $e(){return Y(C.rgbColor,function(){return{type:"rgb",value:Pe(Xe)}})}function Ve(){return Y(C.rgbaColor,function(){return{type:"rgba",value:Pe(Xe)}})}function Xe(){return He(C.number)[1]}function Ue(){return ze("%",C.percentageValue,1)||We()||je()}function We(){return ze("position-keyword",C.positionKeywords,1)}function je(){return ze("px",C.pixelValue,1)||ze("em",C.emValue,1)}function ze(Ne,Me,ke){var Ge=He(Me);if(Ge)return{type:Ne,value:Ge[ke]}}function He(Ne){var Me,ke;return ke=/^[\n\r\t\s]+/.exec(E),ke&&De(ke[0].length),Me=Ne.exec(E),Me&&De(Me[0].length),Me}function De(Ne){E=E.substr(Ne)}return function(Ne){return E=Ne.toString(),B()}}();var ee=v$1.parse;v$1.stringify;var R={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]},G={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function te(C){var E,I=[],B=1,U;if(typeof C=="string")if(R[C])I=R[C].slice(),U="rgb";else if(C==="transparent")B=0,U="rgb",I=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(C)){var V=C.slice(1),X=V.length,Y=X<=4;B=1,Y?(I=[parseInt(V[0]+V[0],16),parseInt(V[1]+V[1],16),parseInt(V[2]+V[2],16)],X===4&&(B=parseInt(V[3]+V[3],16)/255)):(I=[parseInt(V[0]+V[1],16),parseInt(V[2]+V[3],16),parseInt(V[4]+V[5],16)],X===8&&(B=parseInt(V[6]+V[7],16)/255)),I[0]||(I[0]=0),I[1]||(I[1]=0),I[2]||(I[2]=0),U="rgb"}else if(E=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(C)){var K=E[1],J=K==="rgb",V=K.replace(/a$/,"");U=V;var X=V==="cmyk"?4:V==="gray"?1:3;I=E[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(_e,Se){if(/%$/.test(_e))return Se===X?parseFloat(_e)/100:V==="rgb"?parseFloat(_e)*255/100:parseFloat(_e);if(V[Se]==="h"){if(/deg$/.test(_e))return parseFloat(_e);if(G[_e]!==void 0)return G[_e]}return parseFloat(_e)}),K===V&&I.push(1),B=J||I[X]===void 0?1:I[X],I=I.slice(0,X)}else C.length>10&&/[0-9](?:\s|\/)/.test(C)&&(I=C.match(/([0-9]+)/g).map(function(xe){return parseFloat(xe)}),U=C.match(/([a-z])/ig).join("").toLowerCase());else isNaN(C)?Array.isArray(C)||C.length?(I=[C[0],C[1],C[2]],U="rgb",B=C.length===4?C[3]:1):C instanceof Object&&(C.r!=null||C.red!=null||C.R!=null?(U="rgb",I=[C.r||C.red||C.R||0,C.g||C.green||C.G||0,C.b||C.blue||C.B||0]):(U="hsl",I=[C.h||C.hue||C.H||0,C.s||C.saturation||C.S||0,C.l||C.lightness||C.L||C.b||C.brightness]),B=C.a||C.alpha||C.opacity||1,C.opacity!=null&&(B/=100)):(U="rgb",I=[C>>>16,(C&65280)>>>8,C&255]);return{space:U,values:I,alpha:B}}var A={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},S={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(C){var E=C[0]/360,I=C[1]/100,B=C[2]/100,U,V,X,Y,K;if(I===0)return K=B*255,[K,K,K];B<.5?V=B*(1+I):V=B+I-B*I,U=2*B-V,Y=[0,0,0];for(var J=0;J<3;J++)X=E+1/3*-(J-1),X<0?X++:X>1&&X--,6*X<1?K=U+(V-U)*6*X:2*X<1?K=V:3*X<2?K=U+(V-U)*(2/3-X)*6:K=U,Y[J]=K*255;return Y}};A.hsl=function(C){var E=C[0]/255,I=C[1]/255,B=C[2]/255,U=Math.min(E,I,B),V=Math.max(E,I,B),X=V-U,Y,K,J;return V===U?Y=0:E===V?Y=(I-B)/X:I===V?Y=2+(B-E)/X:B===V&&(Y=4+(E-I)/X),Y=Math.min(Y*60,360),Y<0&&(Y+=360),J=(U+V)/2,V===U?K=0:J<=.5?K=X/(V+U):K=X/(2-V-U),[Y,K*100,J*100]};function re(C){Array.isArray(C)&&C.raw&&(C=String.raw(...arguments));var E,I=te(C);if(!I.space)return[];const B=I.space[0]==="h"?S.min:A.min,U=I.space[0]==="h"?S.max:A.max;return E=Array(3),E[0]=Math.min(Math.max(I.values[0],B[0]),U[0]),E[1]=Math.min(Math.max(I.values[1],B[1]),U[1]),E[2]=Math.min(Math.max(I.values[2],B[2]),U[2]),I.space[0]==="h"&&(E=S.rgb(E)),E.push(Math.min(Math.max(I.alpha,0),1)),E}function L(C){switch(typeof C){case"string":return ne(C);case"number":return hex2rgb(C);default:return C}}function ne(C){const E=re(C);if(!E)throw new Error(`Unable to parse color "${C}" as RGBA.`);return[E[0]/255,E[1]/255,E[2]/255,E[3]]}function ie(C){const E=ee(ge(C));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 I=E[0],B=oe(I.type),U=ae(I.colorStops),V=ce(I.orientation);return{type:B,stops:U,angle:V}}function oe(C){const E={"linear-gradient":0,"radial-gradient":1};if(!(C in E))throw new Error(`Unsupported gradient type "${C}"`);return E[C]}function ae(C){const E=ue(C),I=[];for(let B=0;B<C.length;B++){const U=le(C[B]);I.push({offset:E[B],color:U.slice(0,3),alpha:U[3]})}return I}function le(C){return L(se(C))}function se(C){switch(C.type){case"hex":return`#${C.value}`;case"literal":return C.value;default:return`${C.type}(${C.value.join(",")})`}}function ue(C){const E=[];for(let U=0;U<C.length;U++){const V=C[U];let X=-1;V.type==="literal"&&V.length&&"type"in V.length&&V.length.type==="%"&&"value"in V.length&&(X=parseFloat(V.length.value)/100),E.push(X)}const I=U=>{for(let V=U;V<E.length;V++)if(E[V]!==-1)return{indexDelta:V-U,offset:E[V]};return{indexDelta:E.length-1-U,offset:1}};let B=0;for(let U=0;U<E.length;U++){const V=E[U];if(V!==-1)B=V;else if(U===0)E[U]=0;else if(U+1===E.length)E[U]=1;else{const X=I(U),Y=(X.offset-B)/(1+X.indexDelta);for(let K=0;K<=X.indexDelta;K++)E[U+K]=B+(K+1)*Y;U+=X.indexDelta,B=E[U]}}return E.map(fe)}function fe(C){return C.toString().length>6?parseFloat(C.toString().substring(0,6)):C}function ce(C){if(typeof C>"u")return 0;if("type"in C&&"value"in C)switch(C.type){case"angular":return parseFloat(C.value);case"directional":return pe(C.value)}return 0}function pe(C){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(!(C in E))throw new Error(`Unsupported directional value "${C}"`);return E[C]}function ge(C){let E=C.replace(/\s{2,}/gu," ");return E=E.replace(/;/g,""),E=E.replace(/ ,/g,","),E=E.replace(/\( /g,"("),E=E.replace(/ \)/g,")"),E.trim()}var he=Object.defineProperty,me=Object.defineProperties,de=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,z$1=(C,E,I)=>E in C?he(C,E,{enumerable:!0,configurable:!0,writable:!0,value:I}):C[E]=I,k=(C,E)=>{for(var I in E||(E={}))ve.call(E,I)&&z$1(C,I,E[I]);if(N)for(var I of N(E))ye.call(E,I)&&z$1(C,I,E[I]);return C},be=(C,E)=>me(C,de(E));const D=90;function Ce(C){return[...C].sort((E,I)=>E.offset-I.offset)}const P$1=class extends Filter{constructor(E){E&&"css"in E&&(E=be(k({},ie(E.css||"")),{alpha:E.alpha,maxColors:E.maxColors}));const I=k(k({},P$1.defaults),E);if(!I.stops||I.stops.length<2)throw new Error("ColorGradientFilter requires at least 2 color stops.");super(W,Q),this._stops=[],this.autoFit=!1,Object.assign(this,I)}get stops(){return this._stops}set stops(E){const I=Ce(E),B=new Float32Array(I.length*3),U=0,V=1,X=2;for(let Y=0;Y<I.length;Y++){const K=L(I[Y].color),J=Y*3;B[J+U]=K[U],B[J+V]=K[V],B[J+X]=K[X]}this.uniforms.uColors=B,this.uniforms.uOffsets=I.map(Y=>Y.offset),this.uniforms.uAlphas=I.map(Y=>Y.alpha),this.uniforms.uNumStops=I.length,this._stops=I}set type(E){this.uniforms.uType=E}get type(){return this.uniforms.uType}set angle(E){this.uniforms.uAngle=E-D}get angle(){return this.uniforms.uAngle+D}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 y=P$1;y.LINEAR=0,y.RADIAL=1,y.CONIC=2,y.defaults={type:P$1.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var o$3=`attribute vec2 aVertexPosition;
838
862
  attribute vec2 aTextureCoord;
839
863
 
840
864
  uniform mat3 projectionMatrix;
@@ -845,7 +869,7 @@ void main(void)
845
869
  {
846
870
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
847
871
  vTextureCoord = aTextureCoord;
848
- }`,KT=`precision mediump float;
872
+ }`,x$1=`precision mediump float;
849
873
 
850
874
  varying mediump vec2 vTextureCoord;
851
875
 
@@ -874,7 +898,7 @@ void main(void)
874
898
 
875
899
  gl_FragColor.a = c22.a;
876
900
  }
877
- `;let ZT=class extends De{constructor(e,r=200,n=200){super(YT,KT),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 QT=`attribute vec2 aVertexPosition;
901
+ `;let n$3=class extends Filter{constructor(E,I=200,B=200){super(o$3,x$1),this.uniforms.texelSize=new Float32Array(2),this.uniforms.matrix=new Float32Array(9),E!==void 0&&(this.matrix=E),this.width=I,this.height=B}get matrix(){return this.uniforms.matrix}set matrix(E){E.forEach((I,B)=>{this.uniforms.matrix[B]=I})}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 a$4=`attribute vec2 aVertexPosition;
878
902
  attribute vec2 aTextureCoord;
879
903
 
880
904
  uniform mat3 projectionMatrix;
@@ -885,7 +909,7 @@ void main(void)
885
909
  {
886
910
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
887
911
  vTextureCoord = aTextureCoord;
888
- }`,JT=`varying vec2 vTextureCoord;
912
+ }`,g=`varying vec2 vTextureCoord;
889
913
  uniform sampler2D uSampler;
890
914
 
891
915
  uniform vec4 filterArea;
@@ -951,7 +975,7 @@ void main(void)
951
975
 
952
976
  gl_FragColor.rgb = rgb;
953
977
  }
954
- `;const Qd=class extends De{constructor(e){super(QT,JT),this.time=0,this.seed=0,this.uniforms.dimensions=new Float32Array(2),Object.assign(this,Qd.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 eA=Qd;eA.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0};var tA=`attribute vec2 aVertexPosition;
978
+ `;const e$1=class extends Filter{constructor(E){super(a$4,g),this.time=0,this.seed=0,this.uniforms.dimensions=new Float32Array(2),Object.assign(this,e$1.defaults,E)}apply(E,I,B,U){const{width:V,height:X}=I.filterFrame;this.uniforms.dimensions[0]=V,this.uniforms.dimensions[1]=X,this.uniforms.seed=this.seed,this.uniforms.time=this.time,E.applyFilter(this,I,B,U)}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 t$1=e$1;t$1.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0};var w=`attribute vec2 aVertexPosition;
955
979
  attribute vec2 aTextureCoord;
956
980
 
957
981
  uniform mat3 projectionMatrix;
@@ -962,7 +986,7 @@ void main(void)
962
986
  {
963
987
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
964
988
  vTextureCoord = aTextureCoord;
965
- }`,rA=`varying vec2 vTextureCoord;
989
+ }`,O=`varying vec2 vTextureCoord;
966
990
  uniform sampler2D uSampler;
967
991
  uniform float alpha;
968
992
  uniform vec3 color;
@@ -980,7 +1004,7 @@ void main(void){
980
1004
  sample *= alpha;
981
1005
 
982
1006
  gl_FragColor = sample;
983
- }`,nA=Object.defineProperty,Jd=Object.getOwnPropertySymbols,iA=Object.prototype.hasOwnProperty,sA=Object.prototype.propertyIsEnumerable,ep=(t,e,r)=>e in t?nA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,tp=(t,e)=>{for(var r in e||(e={}))iA.call(e,r)&&ep(t,r,e[r]);if(Jd)for(var r of Jd(e))sA.call(e,r)&&ep(t,r,e[r]);return t};const _l=class extends De{constructor(e){super(),this.angle=45,this._distance=5,this._resolution=be.FILTER_RESOLUTION;const r=e?tp(tp({},_l.defaults),e):_l.defaults,{kernels:n,blur:i,quality:a,pixelSize:u,resolution:l}=r;this._offset=new In(this._updatePadding,this),this._tintFilter=new De(tA,rA),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=this._offset,this._tintFilter.resolution=l,this._blurFilter=n?new ls(n):new ls(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){Re("5.3.0","DropShadowFilter distance is deprecated, use offset"),this._distance=e,this._updatePadding(),this._updateShift()}get rotation(){return this.angle/rs}set rotation(e){Re("5.3.0","DropShadowFilter rotation is deprecated, use offset"),this.angle=e*rs,this._updateShift()}get alpha(){return this._tintFilter.uniforms.alpha}set alpha(e){this._tintFilter.uniforms.alpha=e}get color(){return Gu(this._tintFilter.uniforms.color)}set color(e){ra(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 aA=_l;aA.defaults={offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:be.FILTER_RESOLUTION};var oA=`attribute vec2 aVertexPosition;
1007
+ }`,P=Object.defineProperty,c$4=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,_=(C,E,I)=>E in C?P(C,E,{enumerable:!0,configurable:!0,writable:!0,value:I}):C[E]=I,b=(C,E)=>{for(var I in E||(E={}))T.call(E,I)&&_(C,I,E[I]);if(c$4)for(var I of c$4(E))z.call(E,I)&&_(C,I,E[I]);return C};const o$2=class extends Filter{constructor(E){super(),this.angle=45,this._distance=5,this._resolution=settings.FILTER_RESOLUTION;const I=E?b(b({},o$2.defaults),E):o$2.defaults,{kernels:B,blur:U,quality:V,pixelSize:X,resolution:Y}=I;this._offset=new ObservablePoint(this._updatePadding,this),this._tintFilter=new Filter(w,O),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=this._offset,this._tintFilter.resolution=Y,this._blurFilter=B?new _$1(B):new _$1(U,V),this.pixelSize=X,this.resolution=Y;const{shadowOnly:K,rotation:J,distance:xe,offset:Z,alpha:_e,color:Se}=I;this.shadowOnly=K,J!==void 0&&xe!==void 0?(this.rotation=J,this.distance=xe):this.offset=Z,this.alpha=_e,this.color=Se}apply(E,I,B,U){const V=E.getFilterTexture();this._tintFilter.apply(E,I,V,1),this._blurFilter.apply(E,V,B,U),this.shadowOnly!==!0&&E.applyFilter(this,I,B,0),E.returnFilterTexture(V)}_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){deprecation("5.3.0","DropShadowFilter distance is deprecated, use offset"),this._distance=E,this._updatePadding(),this._updateShift()}get rotation(){return this.angle/DEG_TO_RAD}set rotation(E){deprecation("5.3.0","DropShadowFilter rotation is deprecated, use offset"),this.angle=E*DEG_TO_RAD,this._updateShift()}get alpha(){return this._tintFilter.uniforms.alpha}set alpha(E){this._tintFilter.uniforms.alpha=E}get color(){return rgb2hex(this._tintFilter.uniforms.color)}set color(E){hex2rgb(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 F=o$2;F.defaults={offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:settings.FILTER_RESOLUTION};var p$1=`attribute vec2 aVertexPosition;
984
1008
  attribute vec2 aTextureCoord;
985
1009
 
986
1010
  uniform mat3 projectionMatrix;
@@ -991,7 +1015,7 @@ void main(void)
991
1015
  {
992
1016
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
993
1017
  vTextureCoord = aTextureCoord;
994
- }`,uA=`// precision highp float;
1018
+ }`,M=`// precision highp float;
995
1019
 
996
1020
  varying vec2 vTextureCoord;
997
1021
  uniform sampler2D uSampler;
@@ -1087,7 +1111,7 @@ void main(void)
1087
1111
  gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;
1088
1112
  gl_FragColor.a = texture2D(uSampler, coord).a;
1089
1113
  }
1090
- `;const yl=class extends De{constructor(e){super(oA,uA),this.offset=100,this.fillMode=yl.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=Me.from(this._canvas,{scaleMode:Ar.NEAREST}),Object.assign(this,yl.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*rs;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 pi=yl;pi.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},pi.TRANSPARENT=0,pi.ORIGINAL=1,pi.LOOP=2,pi.CLAMP=3,pi.MIRROR=4;var lA=`attribute vec2 aVertexPosition;
1114
+ `;const c$3=class extends Filter{constructor(E){super(p$1,M),this.offset=100,this.fillMode=c$3.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=Texture.from(this._canvas,{scaleMode:SCALE_MODES.NEAREST}),Object.assign(this,c$3.defaults,E)}apply(E,I,B,U){const{width:V,height:X}=I.filterFrame;this.uniforms.dimensions[0]=V,this.uniforms.dimensions[1]=X,this.uniforms.aspect=X/V,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,E.applyFilter(this,I,B,U)}_randomizeSizes(){const E=this._sizes,I=this._slices-1,B=this.sampleSize,U=Math.min(this.minSize/B,.9/this._slices);if(this.average){const V=this._slices;let X=1;for(let Y=0;Y<I;Y++){const K=X/(V-Y),J=Math.max(K*(1-Math.random()*.6),U);E[Y]=J,X-=J}E[I]=X}else{let V=1;const X=Math.sqrt(1/this._slices);for(let Y=0;Y<I;Y++){const K=Math.max(X*V*Math.random(),U);E[Y]=K,V-=K}E[I]=V}this.shuffle()}shuffle(){const E=this._sizes,I=this._slices-1;for(let B=I;B>0;B--){const U=Math.random()*B>>0,V=E[B];E[B]=E[U],E[U]=V}}_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,I=this.texture,B=this._canvas.getContext("2d");B.clearRect(0,0,8,E);let U,V=0;for(let X=0;X<this._slices;X++){U=Math.floor(this._offsets[X]*256);const Y=this._sizes[X]*E,K=U>0?U:0,J=U<0?-U:0;B.fillStyle=`rgba(${K}, ${J}, 0, 1)`,B.fillRect(0,V>>0,E,Y+1>>0),V+=Y}I.baseTexture.update(),this.uniforms.displacementMap=I}set sizes(E){const I=Math.min(this._slices,E.length);for(let B=0;B<I;B++)this._sizes[B]=E[B]}get sizes(){return this._sizes}set offsets(E){const I=Math.min(this._slices,E.length);for(let B=0;B<I;B++)this._offsets[B]=E[B]}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 I=E*DEG_TO_RAD;this.uniforms.sinDir=Math.sin(I),this.uniforms.cosDir=Math.cos(I)}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 l$4=c$3;l$4.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},l$4.TRANSPARENT=0,l$4.ORIGINAL=1,l$4.LOOP=2,l$4.CLAMP=3,l$4.MIRROR=4;var f$3=`attribute vec2 aVertexPosition;
1091
1115
  attribute vec2 aTextureCoord;
1092
1116
 
1093
1117
  uniform mat3 projectionMatrix;
@@ -1098,7 +1122,7 @@ void main(void)
1098
1122
  {
1099
1123
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1100
1124
  vTextureCoord = aTextureCoord;
1101
- }`,cA=`varying vec2 vTextureCoord;
1125
+ }`,p=`varying vec2 vTextureCoord;
1102
1126
  varying vec4 vColor;
1103
1127
 
1104
1128
  uniform sampler2D uSampler;
@@ -1164,7 +1188,7 @@ void main(void) {
1164
1188
  gl_FragColor = innerColor + outerGlowColor;
1165
1189
  }
1166
1190
  }
1167
- `;const rp=class extends De{constructor(t){const e=Object.assign({},rp.defaults,t),{outerStrength:r,innerStrength:n,color:i,knockout:a,quality:u,alpha:l}=e,f=Math.round(e.distance);super(lA,cA.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 Gu(this.uniforms.glowColor)}set color(t){ra(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 hA=rp;hA.defaults={distance:10,outerStrength:4,innerStrength:0,color:16777215,quality:.1,knockout:!1,alpha:1};var fA=`attribute vec2 aVertexPosition;
1191
+ `;const e=class extends Filter{constructor(C){const E=Object.assign({},e.defaults,C),{outerStrength:I,innerStrength:B,color:U,knockout:V,quality:X,alpha:Y}=E,K=Math.round(E.distance);super(f$3,p.replace(/__ANGLE_STEP_SIZE__/gi,`${(1/X/K).toFixed(7)}`).replace(/__DIST__/gi,`${K.toFixed(0)}.0`)),this.uniforms.glowColor=new Float32Array([0,0,0,1]),this.uniforms.alpha=1,Object.assign(this,{color:U,outerStrength:I,innerStrength:B,padding:K,knockout:V,alpha:Y})}get color(){return rgb2hex(this.uniforms.glowColor)}set color(C){hex2rgb(C,this.uniforms.glowColor)}get outerStrength(){return this.uniforms.outerStrength}set outerStrength(C){this.uniforms.outerStrength=C}get innerStrength(){return this.uniforms.innerStrength}set innerStrength(C){this.uniforms.innerStrength=C}get knockout(){return this.uniforms.knockout}set knockout(C){this.uniforms.knockout=C}get alpha(){return this.uniforms.alpha}set alpha(C){this.uniforms.alpha=C}};let l$3=e;l$3.defaults={distance:10,outerStrength:4,innerStrength:0,color:16777215,quality:.1,knockout:!1,alpha:1};var v=`attribute vec2 aVertexPosition;
1168
1192
  attribute vec2 aTextureCoord;
1169
1193
 
1170
1194
  uniform mat3 projectionMatrix;
@@ -1175,7 +1199,7 @@ void main(void)
1175
1199
  {
1176
1200
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1177
1201
  vTextureCoord = aTextureCoord;
1178
- }`,dA=`vec3 mod289(vec3 x)
1202
+ }`,f$2=`vec3 mod289(vec3 x)
1179
1203
  {
1180
1204
  return x - floor(x * (1.0 / 289.0)) * 289.0;
1181
1205
  }
@@ -1270,7 +1294,7 @@ float turb(vec3 P, vec3 rep, float lacunarity, float gain)
1270
1294
  }
1271
1295
  return abs(sum);
1272
1296
  }
1273
- `,pA=`varying vec2 vTextureCoord;
1297
+ `,x=`varying vec2 vTextureCoord;
1274
1298
  uniform sampler2D uSampler;
1275
1299
  uniform vec4 filterArea;
1276
1300
  uniform vec2 dimensions;
@@ -1315,7 +1339,7 @@ void main(void) {
1315
1339
  gl_FragColor = texture2D(uSampler, vTextureCoord) + mist;
1316
1340
 
1317
1341
  }
1318
- `;const np=class extends De{constructor(e){super(fA,pA.replace("${perlin}",dA)),this.parallel=!0,this.time=0,this._angle=0,this.uniforms.dimensions=new Float32Array(2);const r=Object.assign(np.defaults,e);this._angleLight=new We,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*rs;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 gA=np;gA.defaults={angle:30,gain:.5,lacunarity:2.5,time:0,parallel:!0,center:[0,0],alpha:1};var mA=`attribute vec2 aVertexPosition;
1342
+ `;const a$3=class extends Filter{constructor(E){super(v,x.replace("${perlin}",f$2)),this.parallel=!0,this.time=0,this._angle=0,this.uniforms.dimensions=new Float32Array(2);const I=Object.assign(a$3.defaults,E);this._angleLight=new Point,this.angle=I.angle,this.gain=I.gain,this.lacunarity=I.lacunarity,this.alpha=I.alpha,this.parallel=I.parallel,this.center=I.center,this.time=I.time}apply(E,I,B,U){const{width:V,height:X}=I.filterFrame;this.uniforms.light=this.parallel?this._angleLight:this.center,this.uniforms.parallel=this.parallel,this.uniforms.dimensions[0]=V,this.uniforms.dimensions[1]=X,this.uniforms.aspect=X/V,this.uniforms.time=this.time,this.uniforms.alpha=this.alpha,E.applyFilter(this,I,B,U)}get angle(){return this._angle}set angle(E){this._angle=E;const I=E*DEG_TO_RAD;this._angleLight.x=Math.cos(I),this._angleLight.y=Math.sin(I)}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 r$3=a$3;r$3.defaults={angle:30,gain:.5,lacunarity:2.5,time:0,parallel:!0,center:[0,0],alpha:1};var i$5=`attribute vec2 aVertexPosition;
1319
1343
  attribute vec2 aTextureCoord;
1320
1344
 
1321
1345
  uniform mat3 projectionMatrix;
@@ -1326,7 +1350,7 @@ void main(void)
1326
1350
  {
1327
1351
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1328
1352
  vTextureCoord = aTextureCoord;
1329
- }`,vA=`precision mediump float;
1353
+ }`,s$3=`precision mediump float;
1330
1354
 
1331
1355
  varying vec2 vTextureCoord;
1332
1356
  uniform sampler2D uSampler;
@@ -1384,7 +1408,7 @@ void main()
1384
1408
  // alpha
1385
1409
  gl_FragColor = mix(color, result, uAlpha);
1386
1410
  }
1387
- `;const ip=class extends De{constructor(t){super(mA,vA),this._hue=0;const e=Object.assign({},ip.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 _A=ip;_A.defaults={hue:0,saturation:0,lightness:0,colorize:!1,alpha:1};var yA=`attribute vec2 aVertexPosition;
1411
+ `;const t=class extends Filter{constructor(C){super(i$5,s$3),this._hue=0;const E=Object.assign({},t.defaults,C);Object.assign(this,E)}get hue(){return this._hue}set hue(C){this._hue=C,this.uniforms.uHue=this._hue*(Math.PI/180)}get alpha(){return this.uniforms.uAlpha}set alpha(C){this.uniforms.uAlpha=C}get colorize(){return this.uniforms.uColorize}set colorize(C){this.uniforms.uColorize=C}get lightness(){return this.uniforms.uLightness}set lightness(C){this.uniforms.uLightness=C}get saturation(){return this.uniforms.uSaturation}set saturation(C){this.uniforms.uSaturation=C}};let n$2=t;n$2.defaults={hue:0,saturation:0,lightness:0,colorize:!1,alpha:1};var l$2=`attribute vec2 aVertexPosition;
1388
1412
  attribute vec2 aTextureCoord;
1389
1413
 
1390
1414
  uniform mat3 projectionMatrix;
@@ -1395,7 +1419,7 @@ void main(void)
1395
1419
  {
1396
1420
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1397
1421
  vTextureCoord = aTextureCoord;
1398
- }`,xA=`varying vec2 vTextureCoord;
1422
+ }`,d$2=`varying vec2 vTextureCoord;
1399
1423
  uniform sampler2D uSampler;
1400
1424
  uniform vec4 filterArea;
1401
1425
  uniform vec2 dimensions;
@@ -1499,7 +1523,7 @@ void main()
1499
1523
 
1500
1524
  gl_FragColor.rgb = color;
1501
1525
  }
1502
- `;const sp=class extends De{constructor(e,r=0){super(yA,xA),this.seed=0,this.uniforms.dimensions=new Float32Array(2),typeof e=="number"?(this.seed=e,e=void 0):this.seed=r,Object.assign(this,sp.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 bA=sp;bA.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3};var wA=`attribute vec2 aVertexPosition;
1526
+ `;const s$2=class extends Filter{constructor(E,I=0){super(l$2,d$2),this.seed=0,this.uniforms.dimensions=new Float32Array(2),typeof E=="number"?(this.seed=E,E=void 0):this.seed=I,Object.assign(this,s$2.defaults,E)}apply(E,I,B,U){var V,X;this.uniforms.dimensions[0]=(V=I.filterFrame)==null?void 0:V.width,this.uniforms.dimensions[1]=(X=I.filterFrame)==null?void 0:X.height,this.uniforms.seed=this.seed,E.applyFilter(this,I,B,U)}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 r$2=s$2;r$2.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3};var u$2=`attribute vec2 aVertexPosition;
1503
1527
  attribute vec2 aTextureCoord;
1504
1528
 
1505
1529
  uniform mat3 projectionMatrix;
@@ -1510,7 +1534,7 @@ void main(void)
1510
1534
  {
1511
1535
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1512
1536
  vTextureCoord = aTextureCoord;
1513
- }`,TA=`varying vec2 vTextureCoord;
1537
+ }`,c$2=`varying vec2 vTextureCoord;
1514
1538
  uniform sampler2D uSampler;
1515
1539
  uniform vec4 filterClamp;
1516
1540
 
@@ -1548,7 +1572,7 @@ void main(void) {
1548
1572
  vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);
1549
1573
  gl_FragColor = contentColor + outlineColor;
1550
1574
  }
1551
- `;const Ca=class extends De{constructor(e=1,r=0,n=.1,i=1,a=!1){super(wA,TA.replace(/\$\{angleStep\}/,Ca.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*Ca.MAX_SAMPLES,Ca.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 Gu(this.uniforms.uColor)}set color(e){ra(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 ap=Ca;ap.MIN_SAMPLES=1,ap.MAX_SAMPLES=100;var AA=`attribute vec2 aVertexPosition;
1575
+ `;const r$1=class extends Filter{constructor(E=1,I=0,B=.1,U=1,V=!1){super(u$2,c$2.replace(/\$\{angleStep\}/,r$1.getAngleStep(B))),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=U,this.uniforms.uKnockout=V,Object.assign(this,{thickness:E,color:I,quality:B,alpha:U,knockout:V})}static getAngleStep(E){const I=Math.max(E*r$1.MAX_SAMPLES,r$1.MIN_SAMPLES);return(Math.PI*2/I).toFixed(7)}apply(E,I,B,U){this.uniforms.uThickness[0]=this._thickness/I._frame.width,this.uniforms.uThickness[1]=this._thickness/I._frame.height,this.uniforms.uAlpha=this._alpha,this.uniforms.uKnockout=this._knockout,E.applyFilter(this,I,B,U)}get alpha(){return this._alpha}set alpha(E){this._alpha=E}get color(){return rgb2hex(this.uniforms.uColor)}set color(E){hex2rgb(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 i$4=r$1;i$4.MIN_SAMPLES=1,i$4.MAX_SAMPLES=100;var m$1=`attribute vec2 aVertexPosition;
1552
1576
  attribute vec2 aTextureCoord;
1553
1577
 
1554
1578
  uniform mat3 projectionMatrix;
@@ -1559,7 +1583,7 @@ void main(void)
1559
1583
  {
1560
1584
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1561
1585
  vTextureCoord = aTextureCoord;
1562
- }`,SA=`varying vec2 vTextureCoord;
1586
+ }`,s$1=`varying vec2 vTextureCoord;
1563
1587
  uniform sampler2D uSampler;
1564
1588
 
1565
1589
  uniform vec4 filterArea;
@@ -1603,7 +1627,7 @@ void main(void)
1603
1627
 
1604
1628
  gl_FragColor = color * _alpha;
1605
1629
  }
1606
- `;const op=class extends De{constructor(e){super(AA,SA),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,op.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 EA=op;EA.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0};var CA=`attribute vec2 aVertexPosition;
1630
+ `;const i$3=class extends Filter{constructor(E){super(m$1,s$1),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,i$3.defaults,E)}apply(E,I,B,U){var V,X;this.uniforms.dimensions[0]=(V=I.filterFrame)==null?void 0:V.width,this.uniforms.dimensions[1]=(X=I.filterFrame)==null?void 0:X.height,this.uniforms.time=this.time,E.applyFilter(this,I,B,U)}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 o$1=i$3;o$1.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0};var s=`attribute vec2 aVertexPosition;
1607
1631
  attribute vec2 aTextureCoord;
1608
1632
 
1609
1633
  uniform mat3 projectionMatrix;
@@ -1614,7 +1638,7 @@ void main(void)
1614
1638
  {
1615
1639
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1616
1640
  vTextureCoord = aTextureCoord;
1617
- }`,IA=`varying vec2 vTextureCoord;
1641
+ }`,f$1=`varying vec2 vTextureCoord;
1618
1642
  uniform sampler2D uSampler;
1619
1643
  uniform vec4 filterArea;
1620
1644
  uniform vec4 filterClamp;
@@ -1683,7 +1707,7 @@ void main()
1683
1707
 
1684
1708
  gl_FragColor = color;
1685
1709
  }
1686
- `;const up=class extends De{constructor(e=[0,0],r,n=0){super(CA,IA),this.center=e,Object.assign(this,up.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 RA=up;RA.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1};var PA=`attribute vec2 aVertexPosition;
1710
+ `;const n$1=class extends Filter{constructor(E=[0,0],I,B=0){super(s,f$1),this.center=E,Object.assign(this,n$1.defaults,I),this.time=B}apply(E,I,B,U){this.uniforms.time=this.time,E.applyFilter(this,I,B,U)}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 i$2=n$1;i$2.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1};var m=`attribute vec2 aVertexPosition;
1687
1711
  attribute vec2 aTextureCoord;
1688
1712
 
1689
1713
  uniform mat3 projectionMatrix;
@@ -1694,7 +1718,7 @@ void main(void)
1694
1718
  {
1695
1719
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1696
1720
  vTextureCoord = aTextureCoord;
1697
- }`,MA=`varying vec2 vTextureCoord;
1721
+ }`,c$1=`varying vec2 vTextureCoord;
1698
1722
 
1699
1723
  uniform sampler2D uSampler;
1700
1724
  uniform float blur;
@@ -1733,7 +1757,7 @@ void main(void)
1733
1757
 
1734
1758
  gl_FragColor = color;
1735
1759
  }
1736
- `;let lp=class extends De{constructor(e){var r,n;super(PA,MA),this.uniforms.blur=e.blur,this.uniforms.gradientBlur=e.gradientBlur,this.uniforms.start=(r=e.start)!=null?r:new We(0,window.innerHeight/2),this.uniforms.end=(n=e.end)!=null?n:new We(600,window.innerHeight/2),this.uniforms.delta=new We(30,30),this.uniforms.texSize=new We(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()}},OA=class extends lp{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}},FA=class extends lp{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 cp=class extends De{constructor(e,r,n,i){super(),typeof e=="number"&&(Re("5.3.0","TiltShiftFilter constructor arguments is deprecated, use options."),e={blur:e,gradientBlur:r,start:n,end:i}),e=Object.assign({},cp.defaults,e),this.tiltShiftXFilter=new OA(e),this.tiltShiftYFilter=new FA(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 NA=cp;NA.defaults={blur:100,gradientBlur:600,start:void 0,end:void 0};var LA=`attribute vec2 aVertexPosition;
1760
+ `;let l$1=class extends Filter{constructor(E){var I,B;super(m,c$1),this.uniforms.blur=E.blur,this.uniforms.gradientBlur=E.gradientBlur,this.uniforms.start=(I=E.start)!=null?I:new Point(0,window.innerHeight/2),this.uniforms.end=(B=E.end)!=null?B:new Point(600,window.innerHeight/2),this.uniforms.delta=new Point(30,30),this.uniforms.texSize=new Point(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()}},a$2=class extends l$1{updateDelta(){const E=this.uniforms.end.x-this.uniforms.start.x,I=this.uniforms.end.y-this.uniforms.start.y,B=Math.sqrt(E*E+I*I);this.uniforms.delta.x=E/B,this.uniforms.delta.y=I/B}},u$1=class extends l$1{updateDelta(){const E=this.uniforms.end.x-this.uniforms.start.x,I=this.uniforms.end.y-this.uniforms.start.y,B=Math.sqrt(E*E+I*I);this.uniforms.delta.x=-I/B,this.uniforms.delta.y=E/B}};const d$1=class extends Filter{constructor(E,I,B,U){super(),typeof E=="number"&&(deprecation("5.3.0","TiltShiftFilter constructor arguments is deprecated, use options."),E={blur:E,gradientBlur:I,start:B,end:U}),E=Object.assign({},d$1.defaults,E),this.tiltShiftXFilter=new a$2(E),this.tiltShiftYFilter=new u$1(E)}apply(E,I,B,U){const V=E.getFilterTexture();this.tiltShiftXFilter.apply(E,I,V,1),this.tiltShiftYFilter.apply(E,V,B,U),E.returnFilterTexture(V)}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 h=d$1;h.defaults={blur:100,gradientBlur:600,start:void 0,end:void 0};var i$1=`attribute vec2 aVertexPosition;
1737
1761
  attribute vec2 aTextureCoord;
1738
1762
 
1739
1763
  uniform mat3 projectionMatrix;
@@ -1744,7 +1768,7 @@ void main(void)
1744
1768
  {
1745
1769
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1746
1770
  vTextureCoord = aTextureCoord;
1747
- }`,kA=`varying vec2 vTextureCoord;
1771
+ }`,a$1=`varying vec2 vTextureCoord;
1748
1772
 
1749
1773
  uniform sampler2D uSampler;
1750
1774
  uniform float radius;
@@ -1800,7 +1824,7 @@ void main(void)
1800
1824
  gl_FragColor = texture2D(uSampler, coord );
1801
1825
 
1802
1826
  }
1803
- `;const hp=class extends De{constructor(t){super(LA,kA),Object.assign(this,hp.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 BA=hp;BA.defaults={radius:200,angle:4,padding:20,offset:new We};var DA=`attribute vec2 aVertexPosition;
1827
+ `;const n=class extends Filter{constructor(C){super(i$1,a$1),Object.assign(this,n.defaults,C)}get offset(){return this.uniforms.offset}set offset(C){this.uniforms.offset=C}get radius(){return this.uniforms.radius}set radius(C){this.uniforms.radius=C}get angle(){return this.uniforms.angle}set angle(C){this.uniforms.angle=C}};let r=n;r.defaults={radius:200,angle:4,padding:20,offset:new Point};var l=`attribute vec2 aVertexPosition;
1804
1828
  attribute vec2 aTextureCoord;
1805
1829
 
1806
1830
  uniform mat3 projectionMatrix;
@@ -1811,7 +1835,7 @@ void main(void)
1811
1835
  {
1812
1836
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1813
1837
  vTextureCoord = aTextureCoord;
1814
- }`,UA=`varying vec2 vTextureCoord;
1838
+ }`,u=`varying vec2 vTextureCoord;
1815
1839
  uniform sampler2D uSampler;
1816
1840
  uniform vec4 filterArea;
1817
1841
 
@@ -1897,7 +1921,7 @@ void main() {
1897
1921
 
1898
1922
  gl_FragColor = color;
1899
1923
  }
1900
- `,fp=Object.getOwnPropertySymbols,$A=Object.prototype.hasOwnProperty,GA=Object.prototype.propertyIsEnumerable,zA=(t,e)=>{var r={};for(var n in t)$A.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&fp)for(var n of fp(t))e.indexOf(n)<0&&GA.call(t,n)&&(r[n]=t[n]);return r};const dp=class extends De{constructor(t){const e=Object.assign(dp.defaults,t),{maxKernelSize:r}=e,n=zA(e,["maxKernelSize"]);super(DA,UA.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 HA=dp;HA.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32};const cs=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}=t||{},m=new Fr.Filter(null,`
1924
+ `,i=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,c=(C,E)=>{var I={};for(var B in C)d.call(C,B)&&E.indexOf(B)<0&&(I[B]=C[B]);if(C!=null&&i)for(var B of i(C))E.indexOf(B)<0&&f.call(C,B)&&(I[B]=C[B]);return I};const a=class extends Filter{constructor(C){const E=Object.assign(a.defaults,C),{maxKernelSize:I}=E,B=c(E,["maxKernelSize"]);super(l,u.replace("${maxKernelSize}",I.toFixed(1))),Object.assign(this,B)}get center(){return this.uniforms.uCenter}set center(C){this.uniforms.uCenter=C}get strength(){return this.uniforms.uStrength}set strength(C){this.uniforms.uStrength=C}get innerRadius(){return this.uniforms.uInnerRadius}set innerRadius(C){this.uniforms.uInnerRadius=C}get radius(){return this.uniforms.uRadius}set radius(C){(C<0||C===1/0)&&(C=-1),this.uniforms.uRadius=C}};let o=a;o.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32};const withFiltersHook=C=>{const{contrast:E=1,saturation:I=1,brightness:B=1,alpha:U=1,red:V=1,blue:X=1,gamma:Y=1,green:K=1,blurRadius:J=0,temperature:xe=0,hue:Z=0,sharpness:_e=0,vignette:Se=0,noise:Ee=0}=C||{},Ae=new PIXI__namespace.Filter(null,`
1901
1925
  precision mediump float;
1902
1926
  varying vec2 vTextureCoord;
1903
1927
  uniform sampler2D uSampler;
@@ -1909,7 +1933,7 @@ void main() {
1909
1933
  color.b = color.b - (temperature / 100.0);
1910
1934
  gl_FragColor = color;
1911
1935
  }
1912
- `);m.uniforms.temperature=v;const _=new ZT([0,-d,0,-d,1+4*d,-d,0,-d,0]),b=new Fr.filters.ColorMatrixFilter;b.hue(c,!1);const w=new ls(p,1,!0);return{adjustmentFilter:new gT({...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:w,hueFilter:b,sharpnessFilter:_,temperatureFilter:m}},VA=()=>{const t=new Fr.Filter(null,`
1936
+ `);Ae.uniforms.temperature=xe;const Re=new n$3([0,-_e,0,-_e,1+4*_e,-_e,0,-_e,0]),Te=new PIXI__namespace.filters.ColorMatrixFilter;Te.hue(Z,!1);const we=new _$1(J,1,!0),Pe=new r$2({vignetting:Se}),Ie=new PIXI__namespace.filters.NoiseFilter(Ee);return{adjustmentFilter:new s$4({...Y&&{gamma:Y},...B&&{brightness:B},...E&&{contrast:E},...I&&{saturation:I},...V&&{red:V},...K&&{green:K},...X&&{blue:X},...U&&{alpha:U}}),blurFilter:we,hueFilter:Te,sharpnessFilter:Re,temperatureFilter:Ae,vignetteFilter:Pe,noiseFilter:Ie}},withEffectsHooks=()=>{const C=new PIXI__namespace.Filter(null,`
1913
1937
  precision mediump float;
1914
1938
  uniform mat3 uNightVisionMatrix;
1915
1939
  varying vec2 vTextureCoord;
@@ -1920,7 +1944,21 @@ void main() {
1920
1944
  vec3 color = texColor.rgb;
1921
1945
  gl_FragColor = vec4(uNightVisionMatrix * vec3(color), texColor.a);
1922
1946
  }
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(Je.Container,{ref:n,children:Fe.jsx(Je.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),U=d*(x+I),j=c*(x+I),ee=Math.atan2(k-N,L-O),se=Math.atan2(j-N,U-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 We(n[0],n[1]),l=new We(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,U=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*=_,U=-(I-N),j=S-O,ee=Math.sqrt(U*U+j*j),U/=ee,j/=ee,U*=_,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-U*X,I-j*X,v,!1)+4:d+=2,v.push(S-U*H,I-j*H,S+U*X,I+j*X));continue}const Pe=(-L+x)*(-k+I)-(-L+S)*(-k+E),Oe=(-U+O)*(-j+I)-(-U+S)*(-j+N),ze=(re*Oe-V*Pe)/ye,He=(K*Pe-ge*Oe)/ye,Ke=(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),Ze=xe?X:H,gr=Ce+Ze*Ze*b,Ot=Ke<=gr;let $r=a.join;if($r===hr.MITER&&Ke/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+U*H,I+j*H):v.push(S-L*X,I-k*X,ae,Ee,S-U*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+U*H,I+j*H,v,!0)+4,v.push(Q,W,S+U*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-U*X,I-j*X,v,!1)+4,v.push(S-U*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+U*H,I+j*H,v,!0)+2:d+=On(S,I,S-L*X,I-k*X,S-U*X,I-j*X,v,!1)+2;break}}v.push(S-U*X,I-j*X,S+U*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?Xe.EMPTY:(e=e||new Xe(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 Xe),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(e){e||(this._localBoundsRect||(this._localBoundsRect=new Xe),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!==pt.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 We,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 Xe(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 We;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}};/*!
1947
+ `),E=[.393,.769,.189,.349,.686,.168,.272,.534,.131];C.uniforms.uNightVisionMatrix=E;const I=new PIXI__namespace.Filter(null,`
1948
+ precision mediump float;
1949
+ varying vec2 vTextureCoord;
1950
+ uniform sampler2D uSampler;
1951
+ uniform vec4 vignetteColor;
1952
+ uniform float vignetteSize;
1953
+ uniform float vignetteStrength;
1954
+
1955
+ void main(void) {
1956
+ vec4 texColor = texture2D(uSampler, vTextureCoord);
1957
+ vec2 delta = vTextureCoord - vec2(0.5);
1958
+ float vignette = 1.0 - smoothstep(vignetteSize, 0.5, length(delta));
1959
+ gl_FragColor = texColor * vignetteColor * vignetteStrength * vignette;
1960
+ }
1961
+ `);return I.uniforms.vignetteColor=[0,0,0,1],I.uniforms.vignetteSize=.7,I.uniforms.vignetteStrength=.6,{nightVisionFilter:C,vignetteFilter:I}},PixiImageSprite=React__namespace.forwardRef((C,E)=>{const I=React.useRef(null),B=React.useRef(null),{src:U,visible:V,disabled:X,transformation:{x:Y,y:K,width:J,height:xe,anchor:Z,colorCorrection:_e={},effect:Se},pointerdown:Ee}=C,{blurRadius:Ae=0,vignette:Re=0,noise:Te=0}=_e,{temperatureFilter:we,sharpnessFilter:Pe,hueFilter:Ie,blurFilter:Fe,adjustmentFilter:Oe,vignetteFilter:Le,noiseFilter:$e}=withFiltersHook(_e),{nightVisionFilter:Ve}=withEffectsHooks();return React__namespace.useEffect(()=>()=>{console.log("PixiImageSprite unmounting")},[]),jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,children:jsxRuntimeExports.jsx(react.Container,{ref:B,children:jsxRuntimeExports.jsx(react.Sprite,{image:U,width:J,height:xe,anchor:Z,ref:I,alpha:V?1:0,x:Y,y:K,...!X&&V&&{interactive:!0,pointerdown:Ee},filters:[we,Pe,Ie,Oe,...Ae>0?[Fe]:[],...Se===Effects.NightVision?[Ve]:[],...Re>0?[Le]:[],...Te>0?[$e]:[]]})})})});PixiImageSprite.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const buildCircle={build(C){const E=C.points;let I,B,U,V,X,Y;if(C.type===SHAPES.CIRC){const Ee=C.shape;I=Ee.x,B=Ee.y,X=Y=Ee.radius,U=V=0}else if(C.type===SHAPES.ELIP){const Ee=C.shape;I=Ee.x,B=Ee.y,X=Ee.width,Y=Ee.height,U=V=0}else{const Ee=C.shape,Ae=Ee.width/2,Re=Ee.height/2;I=Ee.x+Ae,B=Ee.y+Re,X=Y=Math.max(0,Math.min(Ee.radius,Math.min(Ae,Re))),U=Ae-X,V=Re-Y}if(!(X>=0&&Y>=0&&U>=0&&V>=0)){E.length=0;return}const K=Math.ceil(2.3*Math.sqrt(X+Y)),J=K*8+(U?4:0)+(V?4:0);if(E.length=J,J===0)return;if(K===0){E.length=8,E[0]=E[6]=I+U,E[1]=E[3]=B+V,E[2]=E[4]=I-U,E[5]=E[7]=B-V;return}let xe=0,Z=K*4+(U?2:0)+2,_e=Z,Se=J;{const Ee=U+X,Ae=V,Re=I+Ee,Te=I-Ee,we=B+Ae;if(E[xe++]=Re,E[xe++]=we,E[--Z]=we,E[--Z]=Te,V){const Pe=B-Ae;E[_e++]=Te,E[_e++]=Pe,E[--Se]=Pe,E[--Se]=Re}}for(let Ee=1;Ee<K;Ee++){const Ae=Math.PI/2*(Ee/K),Re=U+Math.cos(Ae)*X,Te=V+Math.sin(Ae)*Y,we=I+Re,Pe=I-Re,Ie=B+Te,Fe=B-Te;E[xe++]=we,E[xe++]=Ie,E[--Z]=Ie,E[--Z]=Pe,E[_e++]=Pe,E[_e++]=Fe,E[--Se]=Fe,E[--Se]=we}{const Ee=U,Ae=V+Y,Re=I+Ee,Te=I-Ee,we=B+Ae,Pe=B-Ae;E[xe++]=Re,E[xe++]=we,E[--Se]=Pe,E[--Se]=Re,U&&(E[xe++]=Te,E[xe++]=we,E[--Se]=Pe,E[--Se]=Te)}},triangulate(C,E){const I=C.points,B=E.points,U=E.indices;if(I.length===0)return;let V=B.length/2;const X=V;let Y,K;if(C.type!==SHAPES.RREC){const xe=C.shape;Y=xe.x,K=xe.y}else{const xe=C.shape;Y=xe.x+xe.width/2,K=xe.y+xe.height/2}const J=C.matrix;B.push(C.matrix?J.a*Y+J.c*K+J.tx:Y,C.matrix?J.b*Y+J.d*K+J.ty:K),V++,B.push(I[0],I[1]);for(let xe=2;xe<I.length;xe+=2)B.push(I[xe],I[xe+1]),U.push(V++,X,V);U.push(X+1,X,V)}};function fixOrientation(C,E=!1){const I=C.length;if(I<6)return;let B=0;for(let U=0,V=C[I-2],X=C[I-1];U<I;U+=2){const Y=C[U],K=C[U+1];B+=(Y-V)*(K+X),V=Y,X=K}if(!E&&B>0||E&&B<=0){const U=I/2;for(let V=U+U%2;V<I;V+=2){const X=I-V-2,Y=I-V-1,K=V,J=V+1;[C[X],C[K]]=[C[K],C[X]],[C[Y],C[J]]=[C[J],C[Y]]}}}const buildPoly={build(C){C.points=C.shape.points.slice()},triangulate(C,E){let I=C.points;const B=C.holes,U=E.points,V=E.indices;if(I.length>=6){fixOrientation(I,!1);const X=[];for(let J=0;J<B.length;J++){const xe=B[J];fixOrientation(xe.points,!0),X.push(I.length/2),I=I.concat(xe.points)}const Y=earcut$1(I,X,2);if(!Y)return;const K=U.length/2;for(let J=0;J<Y.length;J+=3)V.push(Y[J]+K),V.push(Y[J+1]+K),V.push(Y[J+2]+K);for(let J=0;J<I.length;J++)U.push(I[J])}}},buildRectangle={build(C){const E=C.shape,I=E.x,B=E.y,U=E.width,V=E.height,X=C.points;X.length=0,U>=0&&V>=0&&X.push(I,B,I+U,B,I+U,B+V,I,B+V)},triangulate(C,E){const I=C.points,B=E.points;if(I.length===0)return;const U=B.length/2;B.push(I[0],I[1],I[2],I[3],I[6],I[7],I[4],I[5]),E.indices.push(U,U+1,U+2,U+1,U+2,U+3)}},buildRoundedRectangle={build(C){buildCircle.build(C)},triangulate(C,E){buildCircle.triangulate(C,E)}};var LINE_JOIN=(C=>(C.MITER="miter",C.BEVEL="bevel",C.ROUND="round",C))(LINE_JOIN||{}),LINE_CAP=(C=>(C.BUTT="butt",C.ROUND="round",C.SQUARE="square",C))(LINE_CAP||{});const curves={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(C,E=20){if(!this.adaptive||!C||isNaN(C))return E;let I=Math.ceil(C/this.maxLength);return I<this.minSegments?I=this.minSegments:I>this.maxSegments&&(I=this.maxSegments),I}};class ArcUtils{static curveTo(E,I,B,U,V,X){const Y=X[X.length-2],J=X[X.length-1]-I,xe=Y-E,Z=U-I,_e=B-E,Se=Math.abs(J*_e-xe*Z);if(Se<1e-8||V===0)return(X[X.length-2]!==E||X[X.length-1]!==I)&&X.push(E,I),null;const Ee=J*J+xe*xe,Ae=Z*Z+_e*_e,Re=J*Z+xe*_e,Te=V*Math.sqrt(Ee)/Se,we=V*Math.sqrt(Ae)/Se,Pe=Te*Re/Ee,Ie=we*Re/Ae,Fe=Te*_e+we*xe,Oe=Te*Z+we*J,Le=xe*(we+Pe),$e=J*(we+Pe),Ve=_e*(Te+Ie),Xe=Z*(Te+Ie),Ue=Math.atan2($e-Oe,Le-Fe),We=Math.atan2(Xe-Oe,Ve-Fe);return{cx:Fe+E,cy:Oe+I,radius:V,startAngle:Ue,endAngle:We,anticlockwise:xe*Z>_e*J}}static arc(E,I,B,U,V,X,Y,K,J){const xe=Y-X,Z=curves._segmentsCount(Math.abs(xe)*V,Math.ceil(Math.abs(xe)/PI_2)*40),_e=xe/(Z*2),Se=_e*2,Ee=Math.cos(_e),Ae=Math.sin(_e),Re=Z-1,Te=Re%1/Re;for(let we=0;we<=Re;++we){const Pe=we+Te*we,Ie=_e+X+Se*Pe,Fe=Math.cos(Ie),Oe=-Math.sin(Ie);J.push((Ee*Fe+Ae*Oe)*V+B,(Ee*-Oe+Ae*Fe)*V+U)}}}class BatchPart{constructor(){this.reset()}begin(E,I,B){this.reset(),this.style=E,this.start=I,this.attribStart=B}end(E,I){this.attribSize=I-this.attribStart,this.size=E-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class BezierUtils{static curveLength(E,I,B,U,V,X,Y,K){let xe=0,Z=0,_e=0,Se=0,Ee=0,Ae=0,Re=0,Te=0,we=0,Pe=0,Ie=0,Fe=E,Oe=I;for(let Le=1;Le<=10;++Le)Z=Le/10,_e=Z*Z,Se=_e*Z,Ee=1-Z,Ae=Ee*Ee,Re=Ae*Ee,Te=Re*E+3*Ae*Z*B+3*Ee*_e*V+Se*Y,we=Re*I+3*Ae*Z*U+3*Ee*_e*X+Se*K,Pe=Fe-Te,Ie=Oe-we,Fe=Te,Oe=we,xe+=Math.sqrt(Pe*Pe+Ie*Ie);return xe}static curveTo(E,I,B,U,V,X,Y){const K=Y[Y.length-2],J=Y[Y.length-1];Y.length-=2;const xe=curves._segmentsCount(BezierUtils.curveLength(K,J,E,I,B,U,V,X));let Z=0,_e=0,Se=0,Ee=0,Ae=0;Y.push(K,J);for(let Re=1,Te=0;Re<=xe;++Re)Te=Re/xe,Z=1-Te,_e=Z*Z,Se=_e*Z,Ee=Te*Te,Ae=Ee*Te,Y.push(Se*K+3*_e*Te*E+3*Z*Ee*B+Ae*V,Se*J+3*_e*Te*I+3*Z*Ee*U+Ae*X)}}function square(C,E,I,B,U,V,X,Y){const K=C-I*U,J=E-B*U,xe=C+I*V,Z=E+B*V;let _e,Se;X?(_e=B,Se=-I):(_e=-B,Se=I);const Ee=K+_e,Ae=J+Se,Re=xe+_e,Te=Z+Se;return Y.push(Ee,Ae,Re,Te),2}function round(C,E,I,B,U,V,X,Y){const K=I-C,J=B-E;let xe=Math.atan2(K,J),Z=Math.atan2(U-C,V-E);Y&&xe<Z?xe+=Math.PI*2:!Y&&xe>Z&&(Z+=Math.PI*2);let _e=xe;const Se=Z-xe,Ee=Math.abs(Se),Ae=Math.sqrt(K*K+J*J),Re=(15*Ee*Math.sqrt(Ae)/Math.PI>>0)+1,Te=Se/Re;if(_e+=Te,Y){X.push(C,E,I,B);for(let we=1,Pe=_e;we<Re;we++,Pe+=Te)X.push(C,E,C+Math.sin(Pe)*Ae,E+Math.cos(Pe)*Ae);X.push(C,E,U,V)}else{X.push(I,B,C,E);for(let we=1,Pe=_e;we<Re;we++,Pe+=Te)X.push(C+Math.sin(Pe)*Ae,E+Math.cos(Pe)*Ae,C,E);X.push(U,V,C,E)}return Re*2}function buildNonNativeLine(C,E){const I=C.shape;let B=C.points||I.points.slice();const U=E.closePointEps;if(B.length===0)return;const V=C.lineStyle,X=new Point(B[0],B[1]),Y=new Point(B[B.length-2],B[B.length-1]),K=I.type!==SHAPES.POLY||I.closeStroke,J=Math.abs(X.x-Y.x)<U&&Math.abs(X.y-Y.y)<U;if(K){B=B.slice(),J&&(B.pop(),B.pop(),Y.set(B[B.length-2],B[B.length-1]));const Ne=(X.x+Y.x)*.5,Me=(Y.y+X.y)*.5;B.unshift(Ne,Me),B.push(Ne,Me)}const xe=E.points,Z=B.length/2;let _e=B.length;const Se=xe.length/2,Ee=V.width/2,Ae=Ee*Ee,Re=V.miterLimit*V.miterLimit;let Te=B[0],we=B[1],Pe=B[2],Ie=B[3],Fe=0,Oe=0,Le=-(we-Ie),$e=Te-Pe,Ve=0,Xe=0,Ue=Math.sqrt(Le*Le+$e*$e);Le/=Ue,$e/=Ue,Le*=Ee,$e*=Ee;const We=V.alignment,je=(1-We)*2,ze=We*2;K||(V.cap===LINE_CAP.ROUND?_e+=round(Te-Le*(je-ze)*.5,we-$e*(je-ze)*.5,Te-Le*je,we-$e*je,Te+Le*ze,we+$e*ze,xe,!0)+2:V.cap===LINE_CAP.SQUARE&&(_e+=square(Te,we,Le,$e,je,ze,!0,xe))),xe.push(Te-Le*je,we-$e*je,Te+Le*ze,we+$e*ze);for(let Ne=1;Ne<Z-1;++Ne){Te=B[(Ne-1)*2],we=B[(Ne-1)*2+1],Pe=B[Ne*2],Ie=B[Ne*2+1],Fe=B[(Ne+1)*2],Oe=B[(Ne+1)*2+1],Le=-(we-Ie),$e=Te-Pe,Ue=Math.sqrt(Le*Le+$e*$e),Le/=Ue,$e/=Ue,Le*=Ee,$e*=Ee,Ve=-(Ie-Oe),Xe=Pe-Fe,Ue=Math.sqrt(Ve*Ve+Xe*Xe),Ve/=Ue,Xe/=Ue,Ve*=Ee,Xe*=Ee;const Me=Pe-Te,ke=we-Ie,Ge=Pe-Fe,Be=Oe-Ie,qe=Me*Ge+ke*Be,Ke=ke*Ge-Be*Me,Ye=Ke<0;if(Math.abs(Ke)<.001*Math.abs(qe)){xe.push(Pe-Le*je,Ie-$e*je,Pe+Le*ze,Ie+$e*ze),qe>=0&&(V.join===LINE_JOIN.ROUND?_e+=round(Pe,Ie,Pe-Le*je,Ie-$e*je,Pe-Ve*je,Ie-Xe*je,xe,!1)+4:_e+=2,xe.push(Pe-Ve*ze,Ie-Xe*ze,Pe+Ve*je,Ie+Xe*je));continue}const tt=(-Le+Te)*(-$e+Ie)-(-Le+Pe)*(-$e+we),et=(-Ve+Fe)*(-Xe+Ie)-(-Ve+Pe)*(-Xe+Oe),it=(Me*et-Ge*tt)/Ke,nt=(Be*tt-ke*et)/Ke,ot=(it-Pe)*(it-Pe)+(nt-Ie)*(nt-Ie),Ze=Pe+(it-Pe)*je,Je=Ie+(nt-Ie)*je,st=Pe-(it-Pe)*ze,rt=Ie-(nt-Ie)*ze,Qe=Math.min(Me*Me+ke*ke,Ge*Ge+Be*Be),at=Ye?je:ze,ht=Qe+at*at*Ae,ct=ot<=ht;let ft=V.join;if(ft===LINE_JOIN.MITER&&ot/Ae>Re&&(ft=LINE_JOIN.BEVEL),ct)switch(ft){case LINE_JOIN.MITER:{xe.push(Ze,Je,st,rt);break}case LINE_JOIN.BEVEL:{Ye?xe.push(Ze,Je,Pe+Le*ze,Ie+$e*ze,Ze,Je,Pe+Ve*ze,Ie+Xe*ze):xe.push(Pe-Le*je,Ie-$e*je,st,rt,Pe-Ve*je,Ie-Xe*je,st,rt),_e+=2;break}case LINE_JOIN.ROUND:{Ye?(xe.push(Ze,Je,Pe+Le*ze,Ie+$e*ze),_e+=round(Pe,Ie,Pe+Le*ze,Ie+$e*ze,Pe+Ve*ze,Ie+Xe*ze,xe,!0)+4,xe.push(Ze,Je,Pe+Ve*ze,Ie+Xe*ze)):(xe.push(Pe-Le*je,Ie-$e*je,st,rt),_e+=round(Pe,Ie,Pe-Le*je,Ie-$e*je,Pe-Ve*je,Ie-Xe*je,xe,!1)+4,xe.push(Pe-Ve*je,Ie-Xe*je,st,rt));break}}else{switch(xe.push(Pe-Le*je,Ie-$e*je,Pe+Le*ze,Ie+$e*ze),ft){case LINE_JOIN.MITER:{Ye?xe.push(st,rt,st,rt):xe.push(Ze,Je,Ze,Je),_e+=2;break}case LINE_JOIN.ROUND:{Ye?_e+=round(Pe,Ie,Pe+Le*ze,Ie+$e*ze,Pe+Ve*ze,Ie+Xe*ze,xe,!0)+2:_e+=round(Pe,Ie,Pe-Le*je,Ie-$e*je,Pe-Ve*je,Ie-Xe*je,xe,!1)+2;break}}xe.push(Pe-Ve*je,Ie-Xe*je,Pe+Ve*ze,Ie+Xe*ze),_e+=2}}Te=B[(Z-2)*2],we=B[(Z-2)*2+1],Pe=B[(Z-1)*2],Ie=B[(Z-1)*2+1],Le=-(we-Ie),$e=Te-Pe,Ue=Math.sqrt(Le*Le+$e*$e),Le/=Ue,$e/=Ue,Le*=Ee,$e*=Ee,xe.push(Pe-Le*je,Ie-$e*je,Pe+Le*ze,Ie+$e*ze),K||(V.cap===LINE_CAP.ROUND?_e+=round(Pe-Le*(je-ze)*.5,Ie-$e*(je-ze)*.5,Pe-Le*je,Ie-$e*je,Pe+Le*ze,Ie+$e*ze,xe,!1)+2:V.cap===LINE_CAP.SQUARE&&(_e+=square(Pe,Ie,Le,$e,je,ze,!1,xe)));const He=E.indices,De=curves.epsilon*curves.epsilon;for(let Ne=Se;Ne<_e+Se-2;++Ne)Te=xe[Ne*2],we=xe[Ne*2+1],Pe=xe[(Ne+1)*2],Ie=xe[(Ne+1)*2+1],Fe=xe[(Ne+2)*2],Oe=xe[(Ne+2)*2+1],!(Math.abs(Te*(Ie-Oe)+Pe*(Oe-we)+Fe*(we-Ie))<De)&&He.push(Ne,Ne+1,Ne+2)}function buildNativeLine(C,E){let I=0;const B=C.shape,U=C.points||B.points,V=B.type!==SHAPES.POLY||B.closeStroke;if(U.length===0)return;const X=E.points,Y=E.indices,K=U.length/2,J=X.length/2;let xe=J;for(X.push(U[0],U[1]),I=1;I<K;I++)X.push(U[I*2],U[I*2+1]),Y.push(xe,xe+1),xe++;V&&Y.push(xe,J)}function buildLine(C,E){C.lineStyle.native?buildNativeLine(C,E):buildNonNativeLine(C,E)}class QuadraticUtils{static curveLength(E,I,B,U,V,X){const Y=E-2*B+V,K=I-2*U+X,J=2*B-2*E,xe=2*U-2*I,Z=4*(Y*Y+K*K),_e=4*(Y*J+K*xe),Se=J*J+xe*xe,Ee=2*Math.sqrt(Z+_e+Se),Ae=Math.sqrt(Z),Re=2*Z*Ae,Te=2*Math.sqrt(Se),we=_e/Ae;return(Re*Ee+Ae*_e*(Ee-Te)+(4*Se*Z-_e*_e)*Math.log((2*Ae+we+Ee)/(we+Te)))/(4*Re)}static curveTo(E,I,B,U,V){const X=V[V.length-2],Y=V[V.length-1],K=curves._segmentsCount(QuadraticUtils.curveLength(X,Y,E,I,B,U));let J=0,xe=0;for(let Z=1;Z<=K;++Z){const _e=Z/K;J=X+(E-X)*_e,xe=Y+(I-Y)*_e,V.push(J+(E+(B-E)*_e-J)*_e,xe+(I+(U-I)*_e-xe)*_e)}}}const FILL_COMMANDS={[SHAPES.POLY]:buildPoly,[SHAPES.CIRC]:buildCircle,[SHAPES.ELIP]:buildCircle,[SHAPES.RECT]:buildRectangle,[SHAPES.RREC]:buildRoundedRectangle},BATCH_POOL=[],DRAW_CALL_POOL=[];class Bounds{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?Rectangle.EMPTY:(E=E||new Rectangle(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,I){const{a:B,b:U,c:V,d:X,tx:Y,ty:K}=E,J=B*I.x+V*I.y+Y,xe=U*I.x+X*I.y+K;this.minX=Math.min(this.minX,J),this.maxX=Math.max(this.maxX,J),this.minY=Math.min(this.minY,xe),this.maxY=Math.max(this.maxY,xe)}addQuad(E){let I=this.minX,B=this.minY,U=this.maxX,V=this.maxY,X=E[0],Y=E[1];I=X<I?X:I,B=Y<B?Y:B,U=X>U?X:U,V=Y>V?Y:V,X=E[2],Y=E[3],I=X<I?X:I,B=Y<B?Y:B,U=X>U?X:U,V=Y>V?Y:V,X=E[4],Y=E[5],I=X<I?X:I,B=Y<B?Y:B,U=X>U?X:U,V=Y>V?Y:V,X=E[6],Y=E[7],I=X<I?X:I,B=Y<B?Y:B,U=X>U?X:U,V=Y>V?Y:V,this.minX=I,this.minY=B,this.maxX=U,this.maxY=V}addFrame(E,I,B,U,V){this.addFrameMatrix(E.worldTransform,I,B,U,V)}addFrameMatrix(E,I,B,U,V){const X=E.a,Y=E.b,K=E.c,J=E.d,xe=E.tx,Z=E.ty;let _e=this.minX,Se=this.minY,Ee=this.maxX,Ae=this.maxY,Re=X*I+K*B+xe,Te=Y*I+J*B+Z;_e=Re<_e?Re:_e,Se=Te<Se?Te:Se,Ee=Re>Ee?Re:Ee,Ae=Te>Ae?Te:Ae,Re=X*U+K*B+xe,Te=Y*U+J*B+Z,_e=Re<_e?Re:_e,Se=Te<Se?Te:Se,Ee=Re>Ee?Re:Ee,Ae=Te>Ae?Te:Ae,Re=X*I+K*V+xe,Te=Y*I+J*V+Z,_e=Re<_e?Re:_e,Se=Te<Se?Te:Se,Ee=Re>Ee?Re:Ee,Ae=Te>Ae?Te:Ae,Re=X*U+K*V+xe,Te=Y*U+J*V+Z,_e=Re<_e?Re:_e,Se=Te<Se?Te:Se,Ee=Re>Ee?Re:Ee,Ae=Te>Ae?Te:Ae,this.minX=_e,this.minY=Se,this.maxX=Ee,this.maxY=Ae}addVertexData(E,I,B){let U=this.minX,V=this.minY,X=this.maxX,Y=this.maxY;for(let K=I;K<B;K+=2){const J=E[K],xe=E[K+1];U=J<U?J:U,V=xe<V?xe:V,X=J>X?J:X,Y=xe>Y?xe:Y}this.minX=U,this.minY=V,this.maxX=X,this.maxY=Y}addVertices(E,I,B,U){this.addVerticesMatrix(E.worldTransform,I,B,U)}addVerticesMatrix(E,I,B,U,V=0,X=V){const Y=E.a,K=E.b,J=E.c,xe=E.d,Z=E.tx,_e=E.ty;let Se=this.minX,Ee=this.minY,Ae=this.maxX,Re=this.maxY;for(let Te=B;Te<U;Te+=2){const we=I[Te],Pe=I[Te+1],Ie=Y*we+J*Pe+Z,Fe=xe*Pe+K*we+_e;Se=Math.min(Se,Ie-V),Ae=Math.max(Ae,Ie+V),Ee=Math.min(Ee,Fe-X),Re=Math.max(Re,Fe+X)}this.minX=Se,this.minY=Ee,this.maxX=Ae,this.maxY=Re}addBounds(E){const I=this.minX,B=this.minY,U=this.maxX,V=this.maxY;this.minX=E.minX<I?E.minX:I,this.minY=E.minY<B?E.minY:B,this.maxX=E.maxX>U?E.maxX:U,this.maxY=E.maxY>V?E.maxY:V}addBoundsMask(E,I){const B=E.minX>I.minX?E.minX:I.minX,U=E.minY>I.minY?E.minY:I.minY,V=E.maxX<I.maxX?E.maxX:I.maxX,X=E.maxY<I.maxY?E.maxY:I.maxY;if(B<=V&&U<=X){const Y=this.minX,K=this.minY,J=this.maxX,xe=this.maxY;this.minX=B<Y?B:Y,this.minY=U<K?U:K,this.maxX=V>J?V:J,this.maxY=X>xe?X:xe}}addBoundsMatrix(E,I){this.addFrameMatrix(I,E.minX,E.minY,E.maxX,E.maxY)}addBoundsArea(E,I){const B=E.minX>I.x?E.minX:I.x,U=E.minY>I.y?E.minY:I.y,V=E.maxX<I.x+I.width?E.maxX:I.x+I.width,X=E.maxY<I.y+I.height?E.maxY:I.y+I.height;if(B<=V&&U<=X){const Y=this.minX,K=this.minY,J=this.maxX,xe=this.maxY;this.minX=B<Y?B:Y,this.minY=U<K?U:K,this.maxX=V>J?V:J,this.maxY=X>xe?X:xe}}pad(E=0,I=E){this.isEmpty()||(this.minX-=E,this.maxX+=E,this.minY-=I,this.maxY+=I)}addFramePad(E,I,B,U,V,X){E-=V,I-=X,B+=V,U+=X,this.minX=this.minX<E?this.minX:E,this.maxX=this.maxX>B?this.maxX:B,this.minY=this.minY<I?this.minY:I,this.maxY=this.maxY>U?this.maxY:U}}class DisplayObject extends EventEmitter{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new Transform,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 Bounds,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 I=Object.keys(E);for(let B=0;B<I.length;++B){const U=I[B];Object.defineProperty(DisplayObject.prototype,U,Object.getOwnPropertyDescriptor(E,U))}}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,I){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),I||(this._boundsRect||(this._boundsRect=new Rectangle),I=this._boundsRect),this._bounds.getRectangle(I)}getLocalBounds(E){E||(this._localBoundsRect||(this._localBoundsRect=new Rectangle),E=this._localBoundsRect),this._localBounds||(this._localBounds=new Bounds);const I=this.transform,B=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const U=this._bounds,V=this._boundsID;this._bounds=this._localBounds;const X=this.getBounds(!1,E);return this.parent=B,this.transform=I,this._bounds=U,this._bounds.updateID+=this._boundsID-V,X}toGlobal(E,I,B=!1){return B||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(E,I)}toLocal(E,I,B,U){return I&&(E=I.toGlobal(E,B,U)),U||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(E,B)}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,I=0,B=1,U=1,V=0,X=0,Y=0,K=0,J=0){return this.position.x=E,this.position.y=I,this.scale.x=B||1,this.scale.y=U||1,this.rotation=V,this.skew.x=X,this.skew.y=Y,this.pivot.x=K,this.pivot.y=J,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 TemporaryDisplayObject),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*RAD_TO_DEG}set angle(E){this.transform.rotation=E*DEG_TO_RAD}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 I=this._mask.isMaskData?this._mask.maskObject:this._mask;I&&(I._maskRefCount--,I._maskRefCount===0&&(I.renderable=!0,I.isMask=!1))}if(this._mask=E,this._mask){const I=this._mask.isMaskData?this._mask.maskObject:this._mask;I&&(I._maskRefCount===0&&(I.renderable=!1,I.isMask=!0),I._maskRefCount++)}}}}class TemporaryDisplayObject extends DisplayObject{constructor(){super(...arguments),this.sortDirty=null}}DisplayObject.prototype.displayObjectUpdateTransform=DisplayObject.prototype.updateTransform;const tempMatrix=new Matrix$2;function sortChildren(C,E){return C.zIndex===E.zIndex?C._lastSortedIndex-E._lastSortedIndex:C.zIndex-E.zIndex}const _Container=class extends DisplayObject{constructor(){super(),this.children=[],this.sortableChildren=_Container.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(C){}addChild(...C){if(C.length>1)for(let E=0;E<C.length;E++)this.addChild(C[E]);else{const E=C[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 C[0]}addChildAt(C,E){if(E<0||E>this.children.length)throw new Error(`${C}addChildAt: The index ${E} supplied is out of bounds ${this.children.length}`);return C.parent&&C.parent.removeChild(C),C.parent=this,this.sortDirty=!0,C.transform._parentID=-1,this.children.splice(E,0,C),this._boundsID++,this.onChildrenChange(E),C.emit("added",this),this.emit("childAdded",C,this,E),C}swapChildren(C,E){if(C===E)return;const I=this.getChildIndex(C),B=this.getChildIndex(E);this.children[I]=E,this.children[B]=C,this.onChildrenChange(I<B?I:B)}getChildIndex(C){const E=this.children.indexOf(C);if(E===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return E}setChildIndex(C,E){if(E<0||E>=this.children.length)throw new Error(`The index ${E} supplied is out of bounds ${this.children.length}`);const I=this.getChildIndex(C);removeItems(this.children,I,1),this.children.splice(E,0,C),this.onChildrenChange(E)}getChildAt(C){if(C<0||C>=this.children.length)throw new Error(`getChildAt: Index (${C}) does not exist.`);return this.children[C]}removeChild(...C){if(C.length>1)for(let E=0;E<C.length;E++)this.removeChild(C[E]);else{const E=C[0],I=this.children.indexOf(E);if(I===-1)return null;E.parent=null,E.transform._parentID=-1,removeItems(this.children,I,1),this._boundsID++,this.onChildrenChange(I),E.emit("removed",this),this.emit("childRemoved",E,this,I)}return C[0]}removeChildAt(C){const E=this.getChildAt(C);return E.parent=null,E.transform._parentID=-1,removeItems(this.children,C,1),this._boundsID++,this.onChildrenChange(C),E.emit("removed",this),this.emit("childRemoved",E,this,C),E}removeChildren(C=0,E=this.children.length){const I=C,B=E,U=B-I;let V;if(U>0&&U<=B){V=this.children.splice(I,U);for(let X=0;X<V.length;++X)V[X].parent=null,V[X].transform&&(V[X].transform._parentID=-1);this._boundsID++,this.onChildrenChange(C);for(let X=0;X<V.length;++X)V[X].emit("removed",this),this.emit("childRemoved",V[X],this,X);return V}else if(U===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let C=!1;for(let E=0,I=this.children.length;E<I;++E){const B=this.children[E];B._lastSortedIndex=E,!C&&B.zIndex!==0&&(C=!0)}C&&this.children.length>1&&this.children.sort(sortChildren),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 C=0,E=this.children.length;C<E;++C){const I=this.children[C];I.visible&&I.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let C=0;C<this.children.length;C++){const E=this.children[C];if(!(!E.visible||!E.renderable))if(E.calculateBounds(),E._mask){const I=E._mask.isMaskData?E._mask.maskObject:E._mask;I?(I.calculateBounds(),this._bounds.addBoundsMask(E._bounds,I._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(C,E=!1){const I=super.getLocalBounds(C);if(!E)for(let B=0,U=this.children.length;B<U;++B){const V=this.children[B];V.visible&&V.updateTransform()}return I}_calculateBounds(){}_renderWithCulling(C){const E=C.renderTexture.sourceFrame;if(!(E.width>0&&E.height>0))return;let I,B;this.cullArea?(I=this.cullArea,B=this.worldTransform):this._render!==_Container.prototype._render&&(I=this.getBounds(!0));const U=C.projection.transform;if(U&&(B?(B=tempMatrix.copyFrom(B),B.prepend(U)):B=U),I&&E.intersects(I,B))this._render(C);else if(this.cullArea)return;for(let V=0,X=this.children.length;V<X;++V){const Y=this.children[V],K=Y.cullable;Y.cullable=K||!this.cullArea,Y.render(C),Y.cullable=K}}render(C){var E;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(E=this.filters)!=null&&E.length)this.renderAdvanced(C);else if(this.cullable)this._renderWithCulling(C);else{this._render(C);for(let I=0,B=this.children.length;I<B;++I)this.children[I].render(C)}}renderAdvanced(C){var U,V,X;const E=this.filters,I=this._mask;if(E){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let Y=0;Y<E.length;Y++)E[Y].enabled&&this._enabledFilters.push(E[Y])}const B=E&&((U=this._enabledFilters)==null?void 0:U.length)||I&&(!I.isMaskData||I.enabled&&(I.autoDetect||I.type!==MASK_TYPES.NONE));if(B&&C.batch.flush(),E&&((V=this._enabledFilters)!=null&&V.length)&&C.filter.push(this,this._enabledFilters),I&&C.mask.push(this,this._mask),this.cullable)this._renderWithCulling(C);else{this._render(C);for(let Y=0,K=this.children.length;Y<K;++Y)this.children[Y].render(C)}B&&C.batch.flush(),I&&C.mask.pop(this),E&&((X=this._enabledFilters)!=null&&X.length)&&C.filter.pop()}_render(C){}destroy(C){super.destroy(),this.sortDirty=!1;const E=typeof C=="boolean"?C:C==null?void 0:C.children,I=this.removeChildren(0,this.children.length);if(E)for(let B=0;B<I.length;++B)I[B].destroy(C)}get width(){return this.scale.x*this.getLocalBounds().width}set width(C){const E=this.getLocalBounds().width;E!==0?this.scale.x=C/E:this.scale.x=1,this._width=C}get height(){return this.scale.y*this.getLocalBounds().height}set height(C){const E=this.getLocalBounds().height;E!==0?this.scale.y=C/E:this.scale.y=1,this._height=C}};let Container=_Container;Container.defaultSortableChildren=!1,Container.prototype.containerUpdateTransform=Container.prototype.updateTransform,Object.defineProperties(settings,{SORTABLE_CHILDREN:{get(){return Container.defaultSortableChildren},set(C){deprecation("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Container.defaultSortableChildren=C}}});class GraphicsData{constructor(E,I=null,B=null,U=null){this.points=[],this.holes=[],this.shape=E,this.lineStyle=B,this.fillStyle=I,this.matrix=U,this.type=E.type}clone(){return new GraphicsData(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 tmpPoint=new Point,_GraphicsGeometry=class extends BatchGeometry{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 Bounds,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 C=0;C<this.drawCalls.length;C++)this.drawCalls[C].texArray.clear(),DRAW_CALL_POOL.push(this.drawCalls[C]);this.drawCalls.length=0;for(let C=0;C<this.batches.length;C++){const E=this.batches[C];E.reset(),BATCH_POOL.push(E)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(C,E=null,I=null,B=null){const U=new GraphicsData(C,E,I,B);return this.graphicsData.push(U),this.dirty++,this}drawHole(C,E=null){if(!this.graphicsData.length)return null;const I=new GraphicsData(C,null,null,E),B=this.graphicsData[this.graphicsData.length-1];return I.lineStyle=B.lineStyle,B.holes.push(I),this.dirty++,this}destroy(){super.destroy();for(let C=0;C<this.graphicsData.length;++C)this.graphicsData[C].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(C){const E=this.graphicsData;for(let I=0;I<E.length;++I){const B=E[I];if(B.fillStyle.visible&&B.shape&&(B.matrix?B.matrix.applyInverse(C,tmpPoint):tmpPoint.copyFrom(C),B.shape.contains(tmpPoint.x,tmpPoint.y))){let U=!1;if(B.holes){for(let V=0;V<B.holes.length;V++)if(B.holes[V].shape.contains(tmpPoint.x,tmpPoint.y)){U=!0;break}}if(!U)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const C=this.uvs,E=this.graphicsData;let I=null,B=null;this.batches.length>0&&(I=this.batches[this.batches.length-1],B=I.style);for(let Y=this.shapeIndex;Y<E.length;Y++){this.shapeIndex++;const K=E[Y],J=K.fillStyle,xe=K.lineStyle;FILL_COMMANDS[K.type].build(K),K.matrix&&this.transformPoints(K.points,K.matrix),(J.visible||xe.visible)&&this.processHoles(K.holes);for(let _e=0;_e<2;_e++){const Se=_e===0?J:xe;if(!Se.visible)continue;const Ee=Se.texture.baseTexture,Ae=this.indices.length,Re=this.points.length/2;Ee.wrapMode=WRAP_MODES.REPEAT,_e===0?this.processFill(K):this.processLine(K);const Te=this.points.length/2-Re;Te!==0&&(I&&!this._compareStyles(B,Se)&&(I.end(Ae,Re),I=null),I||(I=BATCH_POOL.pop()||new BatchPart,I.begin(Se,Ae,Re),this.batches.push(I),B=Se),this.addUvs(this.points,C,Se.texture,Re,Te,Se.matrix))}}const U=this.indices.length,V=this.points.length/2;if(I&&I.end(U,V),this.batches.length===0){this.batchable=!0;return}const X=V>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&X===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=X?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(C,E){return!(!C||!E||C.texture.baseTexture!==E.texture.baseTexture||C.color+C.alpha!==E.color+E.alpha||!!C.native!=!!E.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let C=0,E=this.graphicsData.length;C<E;C++){const I=this.graphicsData[C],B=I.fillStyle,U=I.lineStyle;if(B&&!B.texture.baseTexture.valid||U&&!U.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const C=this.batches;for(let E=0,I=C.length;E<I;E++){const B=C[E];for(let U=0;U<B.size;U++){const V=B.start+U;this.indicesUint16[V]=this.indicesUint16[V]-B.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const C=this.batches;for(let E=0;E<C.length;E++)if(C[E].style.native)return!1;return this.points.length<_GraphicsGeometry.BATCHABLE_SIZE*2}buildDrawCalls(){let C=++BaseTexture._globalBatch;for(let xe=0;xe<this.drawCalls.length;xe++)this.drawCalls[xe].texArray.clear(),DRAW_CALL_POOL.push(this.drawCalls[xe]);this.drawCalls.length=0;const E=this.colors,I=this.textureIds;let B=DRAW_CALL_POOL.pop();B||(B=new BatchDrawCall,B.texArray=new BatchTextureArray),B.texArray.count=0,B.start=0,B.size=0,B.type=DRAW_MODES.TRIANGLES;let U=0,V=null,X=0,Y=!1,K=DRAW_MODES.TRIANGLES,J=0;this.drawCalls.push(B);for(let xe=0;xe<this.batches.length;xe++){const Z=this.batches[xe],_e=8,Se=Z.style,Ee=Se.texture.baseTexture;Y!==!!Se.native&&(Y=!!Se.native,K=Y?DRAW_MODES.LINES:DRAW_MODES.TRIANGLES,V=null,U=_e,C++),V!==Ee&&(V=Ee,Ee._batchEnabled!==C&&(U===_e&&(C++,U=0,B.size>0&&(B=DRAW_CALL_POOL.pop(),B||(B=new BatchDrawCall,B.texArray=new BatchTextureArray),this.drawCalls.push(B)),B.start=J,B.size=0,B.texArray.count=0,B.type=K),Ee.touched=1,Ee._batchEnabled=C,Ee._batchLocation=U,Ee.wrapMode=WRAP_MODES.REPEAT,B.texArray.elements[B.texArray.count++]=Ee,U++)),B.size+=Z.size,J+=Z.size,X=Ee._batchLocation,this.addColors(E,Se.color,Se.alpha,Z.attribSize,Z.attribStart),this.addTextureIds(I,X,Z.attribSize,Z.attribStart)}BaseTexture._globalBatch=C,this.packAttributes()}packAttributes(){const C=this.points,E=this.uvs,I=this.colors,B=this.textureIds,U=new ArrayBuffer(C.length*3*4),V=new Float32Array(U),X=new Uint32Array(U);let Y=0;for(let K=0;K<C.length/2;K++)V[Y++]=C[K*2],V[Y++]=C[K*2+1],V[Y++]=E[K*2],V[Y++]=E[K*2+1],X[Y++]=I[K],V[Y++]=B[K];this._buffer.update(U),this._indexBuffer.update(this.indicesUint16)}processFill(C){C.holes.length?buildPoly.triangulate(C,this):FILL_COMMANDS[C.type].triangulate(C,this)}processLine(C){buildLine(C,this);for(let E=0;E<C.holes.length;E++)buildLine(C.holes[E],this)}processHoles(C){for(let E=0;E<C.length;E++){const I=C[E];FILL_COMMANDS[I.type].build(I),I.matrix&&this.transformPoints(I.points,I.matrix)}}calculateBounds(){const C=this._bounds;C.clear(),C.addVertexData(this.points,0,this.points.length),C.pad(this.boundsPadding,this.boundsPadding)}transformPoints(C,E){for(let I=0;I<C.length/2;I++){const B=C[I*2],U=C[I*2+1];C[I*2]=E.a*B+E.c*U+E.tx,C[I*2+1]=E.b*B+E.d*U+E.ty}}addColors(C,E,I,B,U=0){const V=Color.shared.setValue(E).toLittleEndianNumber(),X=Color.shared.setValue(V).toPremultiplied(I);C.length=Math.max(C.length,U+B);for(let Y=0;Y<B;Y++)C[U+Y]=X}addTextureIds(C,E,I,B=0){C.length=Math.max(C.length,B+I);for(let U=0;U<I;U++)C[B+U]=E}addUvs(C,E,I,B,U,V=null){let X=0;const Y=E.length,K=I.frame;for(;X<U;){let xe=C[(B+X)*2],Z=C[(B+X)*2+1];if(V){const _e=V.a*xe+V.c*Z+V.tx;Z=V.b*xe+V.d*Z+V.ty,xe=_e}X++,E.push(xe/K.width,Z/K.height)}const J=I.baseTexture;(K.width<J.width||K.height<J.height)&&this.adjustUvs(E,I,Y,U)}adjustUvs(C,E,I,B){const U=E.baseTexture,V=1e-6,X=I+B*2,Y=E.frame,K=Y.width/U.width,J=Y.height/U.height;let xe=Y.x/Y.width,Z=Y.y/Y.height,_e=Math.floor(C[I]+V),Se=Math.floor(C[I+1]+V);for(let Ee=I+2;Ee<X;Ee+=2)_e=Math.min(_e,Math.floor(C[Ee]+V)),Se=Math.min(Se,Math.floor(C[Ee+1]+V));xe-=_e,Z-=Se;for(let Ee=I;Ee<X;Ee+=2)C[Ee]=(C[Ee]+xe)*K,C[Ee+1]=(C[Ee+1]+Z)*J}};let GraphicsGeometry=_GraphicsGeometry;GraphicsGeometry.BATCHABLE_SIZE=100;class FillStyle{constructor(){this.color=16777215,this.alpha=1,this.texture=Texture.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const E=new FillStyle;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=Texture.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class LineStyle extends FillStyle{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=LINE_CAP.BUTT,this.join=LINE_JOIN.MITER,this.miterLimit=10}clone(){const E=new LineStyle;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 DEFAULT_SHADERS={},_Graphics=class extends Container{constructor(C=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 FillStyle,this._lineStyle=new LineStyle,this._matrix=null,this._holeMode=!1,this.state=State$1.for2d(),this._geometry=C||new GraphicsGeometry,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Color(16777215),this.blendMode=BLEND_MODES.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new _Graphics(this._geometry)}set blendMode(C){this.state.blendMode=C}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(C){this._tintColor.setValue(C)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(C=null,E=0,I,B=.5,U=!1){return typeof C=="number"&&(C={width:C,color:E,alpha:I,alignment:B,native:U}),this.lineTextureStyle(C)}lineTextureStyle(C){const E={width:0,texture:Texture.WHITE,color:C!=null&&C.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:LINE_CAP.BUTT,join:LINE_JOIN.MITER,miterLimit:10};C=Object.assign(E,C),this.normalizeColor(C),this.currentPath&&this.startPoly();const I=C.width>0&&C.alpha>0;return I?(C.matrix&&(C.matrix=C.matrix.clone(),C.matrix.invert()),Object.assign(this._lineStyle,{visible:I},C)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const C=this.currentPath.points,E=this.currentPath.points.length;E>2&&(this.drawShape(this.currentPath),this.currentPath=new Polygon,this.currentPath.closeStroke=!1,this.currentPath.points.push(C[E-2],C[E-1]))}else this.currentPath=new Polygon,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(C,E){return this.startPoly(),this.currentPath.points[0]=C,this.currentPath.points[1]=E,this}lineTo(C,E){this.currentPath||this.moveTo(0,0);const I=this.currentPath.points,B=I[I.length-2],U=I[I.length-1];return(B!==C||U!==E)&&I.push(C,E),this}_initCurve(C=0,E=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[C,E]):this.moveTo(C,E)}quadraticCurveTo(C,E,I,B){this._initCurve();const U=this.currentPath.points;return U.length===0&&this.moveTo(0,0),QuadraticUtils.curveTo(C,E,I,B,U),this}bezierCurveTo(C,E,I,B,U,V){return this._initCurve(),BezierUtils.curveTo(C,E,I,B,U,V,this.currentPath.points),this}arcTo(C,E,I,B,U){this._initCurve(C,E);const V=this.currentPath.points,X=ArcUtils.curveTo(C,E,I,B,U,V);if(X){const{cx:Y,cy:K,radius:J,startAngle:xe,endAngle:Z,anticlockwise:_e}=X;this.arc(Y,K,J,xe,Z,_e)}return this}arc(C,E,I,B,U,V=!1){if(B===U)return this;if(!V&&U<=B?U+=PI_2:V&&B<=U&&(B+=PI_2),U-B===0)return this;const Y=C+Math.cos(B)*I,K=E+Math.sin(B)*I,J=this._geometry.closePointEps;let xe=this.currentPath?this.currentPath.points:null;if(xe){const Z=Math.abs(xe[xe.length-2]-Y),_e=Math.abs(xe[xe.length-1]-K);Z<J&&_e<J||xe.push(Y,K)}else this.moveTo(Y,K),xe=this.currentPath.points;return ArcUtils.arc(Y,K,C,E,I,B,U,V,xe),this}beginFill(C=0,E){return this.beginTextureFill({texture:Texture.WHITE,color:C,alpha:E})}normalizeColor(C){const E=Color.shared.setValue(C.color??0);C.color=E.toNumber(),C.alpha??(C.alpha=E.alpha)}beginTextureFill(C){const E={texture:Texture.WHITE,color:16777215,matrix:null};C=Object.assign(E,C),this.normalizeColor(C),this.currentPath&&this.startPoly();const I=C.alpha>0;return I?(C.matrix&&(C.matrix=C.matrix.clone(),C.matrix.invert()),Object.assign(this._fillStyle,{visible:I},C)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(C,E,I,B){return this.drawShape(new Rectangle(C,E,I,B))}drawRoundedRect(C,E,I,B,U){return this.drawShape(new RoundedRectangle(C,E,I,B,U))}drawCircle(C,E,I){return this.drawShape(new Circle(C,E,I))}drawEllipse(C,E,I,B){return this.drawShape(new Ellipse$1(C,E,I,B))}drawPolygon(...C){let E,I=!0;const B=C[0];B.points?(I=B.closeStroke,E=B.points):Array.isArray(C[0])?E=C[0]:E=C;const U=new Polygon(E);return U.closeStroke=I,this.drawShape(U),this}drawShape(C){return this._holeMode?this._geometry.drawHole(C,this._matrix):this._geometry.drawShape(C,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 C=this._geometry.graphicsData;return C.length===1&&C[0].shape.type===SHAPES.RECT&&!C[0].matrix&&!C[0].holes.length&&!(C[0].lineStyle.visible&&C[0].lineStyle.width)}_render(C){this.finishPoly();const E=this._geometry;E.updateBatches(),E.batchable?(this.batchDirty!==E.batchDirty&&this._populateBatches(),this._renderBatched(C)):(C.batch.flush(),this._renderDirect(C))}_populateBatches(){const C=this._geometry,E=this.blendMode,I=C.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=C.batchDirty,this.batches.length=I,this.vertexData=new Float32Array(C.points);for(let B=0;B<I;B++){const U=C.batches[B],V=U.style.color,X=new Float32Array(this.vertexData.buffer,U.attribStart*4*2,U.attribSize*2),Y=new Float32Array(C.uvsFloat32.buffer,U.attribStart*4*2,U.attribSize*2),K=new Uint16Array(C.indicesUint16.buffer,U.start*2,U.size),J={vertexData:X,blendMode:E,indices:K,uvs:Y,_batchRGB:Color.shared.setValue(V).toRgbArray(),_tintRGB:V,_texture:U.style.texture,alpha:U.style.alpha,worldAlpha:1};this.batches[B]=J}}_renderBatched(C){if(this.batches.length){C.batch.setObjectRenderer(C.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let E=0,I=this.batches.length;E<I;E++){const B=this.batches[E];B.worldAlpha=this.worldAlpha*B.alpha,C.plugins[this.pluginName].render(B)}}}_renderDirect(C){const E=this._resolveDirectShader(C),I=this._geometry,B=this.worldAlpha,U=E.uniforms,V=I.drawCalls;U.translationMatrix=this.transform.worldTransform,Color.shared.setValue(this._tintColor).premultiply(B).toArray(U.tint),C.shader.bind(E),C.geometry.bind(I,E),C.state.set(this.state);for(let X=0,Y=V.length;X<Y;X++)this._renderDrawCallDirect(C,I.drawCalls[X])}_renderDrawCallDirect(C,E){const{texArray:I,type:B,size:U,start:V}=E,X=I.count;for(let Y=0;Y<X;Y++)C.texture.bind(I.elements[Y],Y);C.geometry.draw(B,U,V)}_resolveDirectShader(C){let E=this.shader;const I=this.pluginName;if(!E){if(!DEFAULT_SHADERS[I]){const{maxTextures:B}=C.plugins[I],U=new Int32Array(B);for(let Y=0;Y<B;Y++)U[Y]=Y;const V={tint:new Float32Array([1,1,1,1]),translationMatrix:new Matrix$2,default:UniformGroup.from({uSamplers:U},!0)},X=C.plugins[I]._shader.program;DEFAULT_SHADERS[I]=new Shader(X,V)}E=DEFAULT_SHADERS[I]}return E}_calculateBounds(){this.finishPoly();const C=this._geometry;if(!C.graphicsData.length)return;const{minX:E,minY:I,maxX:B,maxY:U}=C.bounds;this._bounds.addFrame(this.transform,E,I,B,U)}containsPoint(C){return this.worldTransform.applyInverse(C,_Graphics._TEMP_POINT),this._geometry.containsPoint(_Graphics._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let C=0;C<this.batches.length;C++){const E=this.batches[C];E._tintRGB=Color.shared.setValue(this._tintColor).multiply(E._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const C=this.transform._worldID;if(this._transformID===C)return;this._transformID=C;const E=this.transform.worldTransform,I=E.a,B=E.b,U=E.c,V=E.d,X=E.tx,Y=E.ty,K=this._geometry.points,J=this.vertexData;let xe=0;for(let Z=0;Z<K.length;Z+=2){const _e=K[Z],Se=K[Z+1];J[xe++]=I*_e+U*Se+X,J[xe++]=V*Se+B*_e+Y}}closePath(){const C=this.currentPath;return C&&(C.closeStroke=!0,this.finishPoly()),this}setMatrix(C){return this._matrix=C,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(C){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(C)}};let Graphics=_Graphics;Graphics.curves=curves,Graphics._TEMP_POINT=new Point;var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},parserExports={},parser={get exports(){return parserExports},set exports(C){parserExports=C}};/*!
1924
1962
  * d-path-parser - v1.0.0
1925
1963
  * by Massimo Artizzu (MaxArt2501)
1926
1964
  *
@@ -1928,10 +1966,10 @@ void main() {
1928
1966
  *
1929
1967
  * Licensed under the MIT License
1930
1968
  * 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,U=(-d-S)/u,j=Mp(1,0,N,L),ee=Mp(N,L,k,U);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],U=O[3],j=Math.abs(U)/(fs/4);Math.abs(1-j)<1e-7&&(j=1);var ee=Math.max(Math.ceil(j),1);U/=ee;for(var se=0;se<ee;se++)_.push(ES(k,U)),k+=U;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,U=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,U,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 U=c*L-v*k,j=v*L+c*k;O[N+0]=U+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=Je.useApp(),{temperatureFilter:N,sharpnessFilter:L,hueFilter:k,blurFilter:U,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="${w}" stroke-width="${x}" fill="${_||b}" d="${se}">
1969
+ */(function(C,E){(function(I,B){C.exports=B()})(commonjsGlobal,function(){return function(B){for(var U={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},V={number:function(Ae){return+Se("number",Ae)},"coordinate pair":function(Ae){var Re=Se("number",Ae);if(Re===null&&!Ae)return null;Se("comma");var Te=Se("number",!0);return{x:+Re,y:+Te}},"arc definition":function(Ae){var Re=V["coordinate pair"](Ae);if(!Re&&!Ae)return null;Se("comma");var Te=+Se("number",!0);Se("comma",!0);var we=!!+Se("flag",!0);Se("comma");var Pe=!!+Se("flag",!0);Se("comma");var Ie=V["coordinate pair"](!0);return{radii:Re,rotation:Te,large:we,clockwise:Pe,end:Ie}}},X=0,Y=[];X<B.length;){var K=Se("command"),J=K.toUpperCase(),xe=K!==J,Z;switch(J){case"M":Z=Ee("coordinate pair").map(function(Ae,Re){return Re===1&&(K=xe?"l":"L"),_e({end:Ae})});break;case"L":case"T":Z=Ee("coordinate pair").map(function(Ae){return _e({end:Ae})});break;case"C":if(Z=Ee("coordinate pair"),Z.length%3)throw Error("Expected coordinate pair triplet at position "+X);Z=Z.reduce(function(Ae,Re,Te){var we=Te%3;if(!we)Ae.push(_e({cp1:Re}));else{var Pe=Ae[Ae.length-1];Pe[we===1?"cp2":"end"]=Re}return Ae},[]);break;case"Q":case"S":if(Z=Ee("coordinate pair"),Z.length&1)throw Error("Expected coordinate pair couple at position "+X);Z=Z.reduce(function(Ae,Re,Te){var we=Te&1;if(!we)Ae.push(_e({cp:Re}));else{var Pe=Ae[Ae.length-1];Pe.end=Re}return Ae},[]);break;case"H":case"V":Z=Ee("number").map(function(Ae){return _e({value:Ae})});break;case"A":Z=Ee("arc definition").map(_e);break;case"Z":Z=[{code:"Z"}];break}Y.push.apply(Y,Z)}return Y;function _e(Ae){return Ae.code=K,Ae.relative=xe,Ae}function Se(Ae,Re){U[Ae].lastIndex=X;var Te=U[Ae].exec(B);if(!Te||Te.index!==X){if(!Re)return null;throw Error("Expected "+Ae+" at position "+X)}return X=U[Ae].lastIndex,Te[1]}function Ee(Ae){for(var Re=[],Te,we=!0;Te=V[Ae](we);)Re.push(Te),we=!!Se("comma");return Re}}})})(parser);const trimLeft=/^\s+/,trimRight=/\s+$/;function tinycolor(C,E){if(C=C||"",E=E||{},C instanceof tinycolor)return C;if(!(this instanceof tinycolor))return new tinycolor(C,E);var I=inputToRGB(C);this._originalInput=C,this._r=I.r,this._g=I.g,this._b=I.b,this._a=I.a,this._roundA=Math.round(100*this._a)/100,this._format=E.format||I.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=I.ok}tinycolor.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 C=this.toRgb();return(C.r*299+C.g*587+C.b*114)/1e3},getLuminance:function(){var C=this.toRgb(),E,I,B,U,V,X;return E=C.r/255,I=C.g/255,B=C.b/255,E<=.03928?U=E/12.92:U=Math.pow((E+.055)/1.055,2.4),I<=.03928?V=I/12.92:V=Math.pow((I+.055)/1.055,2.4),B<=.03928?X=B/12.92:X=Math.pow((B+.055)/1.055,2.4),.2126*U+.7152*V+.0722*X},setAlpha:function(C){return this._a=boundAlpha(C),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var C=rgbToHsv(this._r,this._g,this._b);return{h:C.h*360,s:C.s,v:C.v,a:this._a}},toHsvString:function(){var C=rgbToHsv(this._r,this._g,this._b),E=Math.round(C.h*360),I=Math.round(C.s*100),B=Math.round(C.v*100);return this._a==1?"hsv("+E+", "+I+"%, "+B+"%)":"hsva("+E+", "+I+"%, "+B+"%, "+this._roundA+")"},toHsl:function(){var C=rgbToHsl(this._r,this._g,this._b);return{h:C.h*360,s:C.s,l:C.l,a:this._a}},toHslString:function(){var C=rgbToHsl(this._r,this._g,this._b),E=Math.round(C.h*360),I=Math.round(C.s*100),B=Math.round(C.l*100);return this._a==1?"hsl("+E+", "+I+"%, "+B+"%)":"hsla("+E+", "+I+"%, "+B+"%, "+this._roundA+")"},toHex:function(C){return rgbToHex(this._r,this._g,this._b,C)},toHexString:function(C){return"#"+this.toHex(C)},toHex8:function(C){return rgbaToHex(this._r,this._g,this._b,this._a,C)},toHex8String:function(C){return"#"+this.toHex8(C)},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(bound01(this._r,255)*100)+"%",g:Math.round(bound01(this._g,255)*100)+"%",b:Math.round(bound01(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(bound01(this._r,255)*100)+"%, "+Math.round(bound01(this._g,255)*100)+"%, "+Math.round(bound01(this._b,255)*100)+"%)":"rgba("+Math.round(bound01(this._r,255)*100)+"%, "+Math.round(bound01(this._g,255)*100)+"%, "+Math.round(bound01(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:hexNames[rgbToHex(this._r,this._g,this._b,!0)]||!1},toFilter:function(C){var E="#"+rgbaToArgbHex(this._r,this._g,this._b,this._a),I=E,B=this._gradientType?"GradientType = 1, ":"";if(C){var U=tinycolor(C);I="#"+rgbaToArgbHex(U._r,U._g,U._b,U._a)}return"progid:DXImageTransform.Microsoft.gradient("+B+"startColorstr="+E+",endColorstr="+I+")"},toString:function(C){var E=!!C;C=C||this._format;var I=!1,B=this._a<1&&this._a>=0,U=!E&&B&&(C==="hex"||C==="hex6"||C==="hex3"||C==="hex4"||C==="hex8"||C==="name");return U?C==="name"&&this._a===0?this.toName():this.toRgbString():(C==="rgb"&&(I=this.toRgbString()),C==="prgb"&&(I=this.toPercentageRgbString()),(C==="hex"||C==="hex6")&&(I=this.toHexString()),C==="hex3"&&(I=this.toHexString(!0)),C==="hex4"&&(I=this.toHex8String(!0)),C==="hex8"&&(I=this.toHex8String()),C==="name"&&(I=this.toName()),C==="hsl"&&(I=this.toHslString()),C==="hsv"&&(I=this.toHsvString()),I||this.toHexString())},clone:function(){return tinycolor(this.toString())},_applyModification:function(C,E){var I=C.apply(null,[this].concat([].slice.call(E)));return this._r=I._r,this._g=I._g,this._b=I._b,this.setAlpha(I._a),this},lighten:function(){return this._applyModification(lighten,arguments)},brighten:function(){return this._applyModification(brighten,arguments)},darken:function(){return this._applyModification(darken,arguments)},desaturate:function(){return this._applyModification(desaturate,arguments)},saturate:function(){return this._applyModification(saturate,arguments)},greyscale:function(){return this._applyModification(greyscale,arguments)},spin:function(){return this._applyModification(spin,arguments)},_applyCombination:function(C,E){return C.apply(null,[this].concat([].slice.call(E)))},analogous:function(){return this._applyCombination(analogous,arguments)},complement:function(){return this._applyCombination(complement,arguments)},monochromatic:function(){return this._applyCombination(monochromatic,arguments)},splitcomplement:function(){return this._applyCombination(splitcomplement,arguments)},triad:function(){return this._applyCombination(polyad,[3])},tetrad:function(){return this._applyCombination(polyad,[4])}},tinycolor.fromRatio=function(C,E){if(typeof C=="object"){var I={};for(var B in C)C.hasOwnProperty(B)&&(B==="a"?I[B]=C[B]:I[B]=convertToPercentage(C[B]));C=I}return tinycolor(C,E)};function inputToRGB(C){var E={r:0,g:0,b:0},I=1,B=null,U=null,V=null,X=!1,Y=!1;return typeof C=="string"&&(C=stringInputToObject(C)),typeof C=="object"&&(isValidCSSUnit(C.r)&&isValidCSSUnit(C.g)&&isValidCSSUnit(C.b)?(E=rgbToRgb(C.r,C.g,C.b),X=!0,Y=String(C.r).substr(-1)==="%"?"prgb":"rgb"):isValidCSSUnit(C.h)&&isValidCSSUnit(C.s)&&isValidCSSUnit(C.v)?(B=convertToPercentage(C.s),U=convertToPercentage(C.v),E=hsvToRgb(C.h,B,U),X=!0,Y="hsv"):isValidCSSUnit(C.h)&&isValidCSSUnit(C.s)&&isValidCSSUnit(C.l)&&(B=convertToPercentage(C.s),V=convertToPercentage(C.l),E=hslToRgb(C.h,B,V),X=!0,Y="hsl"),C.hasOwnProperty("a")&&(I=C.a)),I=boundAlpha(I),{ok:X,format:C.format||Y,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:I}}function rgbToRgb(C,E,I){return{r:bound01(C,255)*255,g:bound01(E,255)*255,b:bound01(I,255)*255}}function rgbToHsl(C,E,I){C=bound01(C,255),E=bound01(E,255),I=bound01(I,255);var B=Math.max(C,E,I),U=Math.min(C,E,I),V,X,Y=(B+U)/2;if(B==U)V=X=0;else{var K=B-U;switch(X=Y>.5?K/(2-B-U):K/(B+U),B){case C:V=(E-I)/K+(E<I?6:0);break;case E:V=(I-C)/K+2;break;case I:V=(C-E)/K+4;break}V/=6}return{h:V,s:X,l:Y}}function hslToRgb(C,E,I){var B,U,V;C=bound01(C,360),E=bound01(E,100),I=bound01(I,100);function X(J,xe,Z){return Z<0&&(Z+=1),Z>1&&(Z-=1),Z<1/6?J+(xe-J)*6*Z:Z<1/2?xe:Z<2/3?J+(xe-J)*(2/3-Z)*6:J}if(E===0)B=U=V=I;else{var Y=I<.5?I*(1+E):I+E-I*E,K=2*I-Y;B=X(K,Y,C+1/3),U=X(K,Y,C),V=X(K,Y,C-1/3)}return{r:B*255,g:U*255,b:V*255}}function rgbToHsv(C,E,I){C=bound01(C,255),E=bound01(E,255),I=bound01(I,255);var B=Math.max(C,E,I),U=Math.min(C,E,I),V,X,Y=B,K=B-U;if(X=B===0?0:K/B,B==U)V=0;else{switch(B){case C:V=(E-I)/K+(E<I?6:0);break;case E:V=(I-C)/K+2;break;case I:V=(C-E)/K+4;break}V/=6}return{h:V,s:X,v:Y}}function hsvToRgb(C,E,I){C=bound01(C,360)*6,E=bound01(E,100),I=bound01(I,100);var B=Math.floor(C),U=C-B,V=I*(1-E),X=I*(1-U*E),Y=I*(1-(1-U)*E),K=B%6,J=[I,X,V,V,Y,I][K],xe=[Y,I,I,X,V,V][K],Z=[V,V,Y,I,I,X][K];return{r:J*255,g:xe*255,b:Z*255}}function rgbToHex(C,E,I,B){var U=[pad2(Math.round(C).toString(16)),pad2(Math.round(E).toString(16)),pad2(Math.round(I).toString(16))];return B&&U[0].charAt(0)==U[0].charAt(1)&&U[1].charAt(0)==U[1].charAt(1)&&U[2].charAt(0)==U[2].charAt(1)?U[0].charAt(0)+U[1].charAt(0)+U[2].charAt(0):U.join("")}function rgbaToHex(C,E,I,B,U){var V=[pad2(Math.round(C).toString(16)),pad2(Math.round(E).toString(16)),pad2(Math.round(I).toString(16)),pad2(convertDecimalToHex(B))];return U&&V[0].charAt(0)==V[0].charAt(1)&&V[1].charAt(0)==V[1].charAt(1)&&V[2].charAt(0)==V[2].charAt(1)&&V[3].charAt(0)==V[3].charAt(1)?V[0].charAt(0)+V[1].charAt(0)+V[2].charAt(0)+V[3].charAt(0):V.join("")}function rgbaToArgbHex(C,E,I,B){var U=[pad2(convertDecimalToHex(B)),pad2(Math.round(C).toString(16)),pad2(Math.round(E).toString(16)),pad2(Math.round(I).toString(16))];return U.join("")}tinycolor.equals=function(C,E){return!C||!E?!1:tinycolor(C).toRgbString()==tinycolor(E).toRgbString()},tinycolor.random=function(){return tinycolor.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function desaturate(C,E){E=E===0?0:E||10;var I=tinycolor(C).toHsl();return I.s-=E/100,I.s=clamp01(I.s),tinycolor(I)}function saturate(C,E){E=E===0?0:E||10;var I=tinycolor(C).toHsl();return I.s+=E/100,I.s=clamp01(I.s),tinycolor(I)}function greyscale(C){return tinycolor(C).desaturate(100)}function lighten(C,E){E=E===0?0:E||10;var I=tinycolor(C).toHsl();return I.l+=E/100,I.l=clamp01(I.l),tinycolor(I)}function brighten(C,E){E=E===0?0:E||10;var I=tinycolor(C).toRgb();return I.r=Math.max(0,Math.min(255,I.r-Math.round(255*-(E/100)))),I.g=Math.max(0,Math.min(255,I.g-Math.round(255*-(E/100)))),I.b=Math.max(0,Math.min(255,I.b-Math.round(255*-(E/100)))),tinycolor(I)}function darken(C,E){E=E===0?0:E||10;var I=tinycolor(C).toHsl();return I.l-=E/100,I.l=clamp01(I.l),tinycolor(I)}function spin(C,E){var I=tinycolor(C).toHsl(),B=(I.h+E)%360;return I.h=B<0?360+B:B,tinycolor(I)}function complement(C){var E=tinycolor(C).toHsl();return E.h=(E.h+180)%360,tinycolor(E)}function polyad(C,E){if(isNaN(E)||E<=0)throw new Error("Argument to polyad must be a positive number");for(var I=tinycolor(C).toHsl(),B=[tinycolor(C)],U=360/E,V=1;V<E;V++)B.push(tinycolor({h:(I.h+V*U)%360,s:I.s,l:I.l}));return B}function splitcomplement(C){var E=tinycolor(C).toHsl(),I=E.h;return[tinycolor(C),tinycolor({h:(I+72)%360,s:E.s,l:E.l}),tinycolor({h:(I+216)%360,s:E.s,l:E.l})]}function analogous(C,E,I){E=E||6,I=I||30;var B=tinycolor(C).toHsl(),U=360/I,V=[tinycolor(C)];for(B.h=(B.h-(U*E>>1)+720)%360;--E;)B.h=(B.h+U)%360,V.push(tinycolor(B));return V}function monochromatic(C,E){E=E||6;for(var I=tinycolor(C).toHsv(),B=I.h,U=I.s,V=I.v,X=[],Y=1/E;E--;)X.push(tinycolor({h:B,s:U,v:V})),V=(V+Y)%1;return X}tinycolor.mix=function(C,E,I){I=I===0?0:I||50;var B=tinycolor(C).toRgb(),U=tinycolor(E).toRgb(),V=I/100,X={r:(U.r-B.r)*V+B.r,g:(U.g-B.g)*V+B.g,b:(U.b-B.b)*V+B.b,a:(U.a-B.a)*V+B.a};return tinycolor(X)},tinycolor.readability=function(C,E){var I=tinycolor(C),B=tinycolor(E);return(Math.max(I.getLuminance(),B.getLuminance())+.05)/(Math.min(I.getLuminance(),B.getLuminance())+.05)},tinycolor.isReadable=function(C,E,I){var B=tinycolor.readability(C,E),U,V;switch(V=!1,U=validateWCAG2Parms(I),U.level+U.size){case"AAsmall":case"AAAlarge":V=B>=4.5;break;case"AAlarge":V=B>=3;break;case"AAAsmall":V=B>=7;break}return V},tinycolor.mostReadable=function(C,E,I){var B=null,U=0,V,X,Y,K;I=I||{},X=I.includeFallbackColors,Y=I.level,K=I.size;for(var J=0;J<E.length;J++)V=tinycolor.readability(C,E[J]),V>U&&(U=V,B=tinycolor(E[J]));return tinycolor.isReadable(C,B,{level:Y,size:K})||!X?B:(I.includeFallbackColors=!1,tinycolor.mostReadable(C,["#fff","#000"],I))};var names=tinycolor.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"},hexNames=tinycolor.hexNames=flip(names);function flip(C){var E={};for(var I in C)C.hasOwnProperty(I)&&(E[C[I]]=I);return E}function boundAlpha(C){return C=parseFloat(C),(isNaN(C)||C<0||C>1)&&(C=1),C}function bound01(C,E){isOnePointZero(C)&&(C="100%");var I=isPercentage(C);return C=Math.min(E,Math.max(0,parseFloat(C))),I&&(C=parseInt(C*E,10)/100),Math.abs(C-E)<1e-6?1:C%E/parseFloat(E)}function clamp01(C){return Math.min(1,Math.max(0,C))}function parseIntFromHex(C){return parseInt(C,16)}function isOnePointZero(C){return typeof C=="string"&&C.indexOf(".")!=-1&&parseFloat(C)===1}function isPercentage(C){return typeof C=="string"&&C.indexOf("%")!=-1}function pad2(C){return C.length==1?"0"+C:""+C}function convertToPercentage(C){return C<=1&&(C=C*100+"%"),C}function convertDecimalToHex(C){return Math.round(parseFloat(C)*255).toString(16)}function convertHexToDecimal(C){return parseIntFromHex(C)/255}var matchers=function(){var C="[-\\+]?\\d+%?",E="[-\\+]?\\d*\\.\\d+%?",I="(?:"+E+")|(?:"+C+")",B="[\\s|\\(]+("+I+")[,|\\s]+("+I+")[,|\\s]+("+I+")\\s*\\)?",U="[\\s|\\(]+("+I+")[,|\\s]+("+I+")[,|\\s]+("+I+")[,|\\s]+("+I+")\\s*\\)?";return{CSS_UNIT:new RegExp(I),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+U),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 isValidCSSUnit(C){return!!matchers.CSS_UNIT.exec(C)}function stringInputToObject(C){C=C.replace(trimLeft,"").replace(trimRight,"").toLowerCase();var E=!1;if(names[C])C=names[C],E=!0;else if(C=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var I;return(I=matchers.rgb.exec(C))?{r:I[1],g:I[2],b:I[3]}:(I=matchers.rgba.exec(C))?{r:I[1],g:I[2],b:I[3],a:I[4]}:(I=matchers.hsl.exec(C))?{h:I[1],s:I[2],l:I[3]}:(I=matchers.hsla.exec(C))?{h:I[1],s:I[2],l:I[3],a:I[4]}:(I=matchers.hsv.exec(C))?{h:I[1],s:I[2],v:I[3]}:(I=matchers.hsva.exec(C))?{h:I[1],s:I[2],v:I[3],a:I[4]}:(I=matchers.hex8.exec(C))?{r:parseIntFromHex(I[1]),g:parseIntFromHex(I[2]),b:parseIntFromHex(I[3]),a:convertHexToDecimal(I[4]),format:E?"name":"hex8"}:(I=matchers.hex6.exec(C))?{r:parseIntFromHex(I[1]),g:parseIntFromHex(I[2]),b:parseIntFromHex(I[3]),format:E?"name":"hex"}:(I=matchers.hex4.exec(C))?{r:parseIntFromHex(I[1]+""+I[1]),g:parseIntFromHex(I[2]+""+I[2]),b:parseIntFromHex(I[3]+""+I[3]),a:convertHexToDecimal(I[4]+""+I[4]),format:E?"name":"hex8"}:(I=matchers.hex3.exec(C))?{r:parseIntFromHex(I[1]+""+I[1]),g:parseIntFromHex(I[2]+""+I[2]),b:parseIntFromHex(I[3]+""+I[3]),format:E?"name":"hex"}:!1}function validateWCAG2Parms(C){var E,I;return C=C||{level:"AA",size:"small"},E=(C.level||"AA").toUpperCase(),I=(C.size||"small").toLowerCase(),E!=="AA"&&E!=="AAA"&&(E="AA"),I!=="small"&&I!=="large"&&(I="small"),{level:E,size:I}}var _slicedToArray=function(){function C(E,I){var B=[],U=!0,V=!1,X=void 0;try{for(var Y=E[Symbol.iterator](),K;!(U=(K=Y.next()).done)&&(B.push(K.value),!(I&&B.length===I));U=!0);}catch(J){V=!0,X=J}finally{try{!U&&Y.return&&Y.return()}finally{if(V)throw X}}return B}return function(E,I){if(Array.isArray(E))return E;if(Symbol.iterator in Object(E))return C(E,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),TAU$2=Math.PI*2,mapToEllipse=function(E,I,B,U,V,X,Y){var K=E.x,J=E.y;K*=I,J*=B;var xe=U*K-V*J,Z=V*K+U*J;return{x:xe+X,y:Z+Y}},approxUnitArc=function(E,I){var B=I===1.5707963267948966?.551915024494:I===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(I/4),U=Math.cos(E),V=Math.sin(E),X=Math.cos(E+I),Y=Math.sin(E+I);return[{x:U-V*B,y:V+U*B},{x:X+Y*B,y:Y-X*B},{x:X,y:Y}]},vectorAngle=function(E,I,B,U){var V=E*U-I*B<0?-1:1,X=E*B+I*U;return X>1&&(X=1),X<-1&&(X=-1),V*Math.acos(X)},getArcCenter=function(E,I,B,U,V,X,Y,K,J,xe,Z,_e){var Se=Math.pow(V,2),Ee=Math.pow(X,2),Ae=Math.pow(Z,2),Re=Math.pow(_e,2),Te=Se*Ee-Se*Re-Ee*Ae;Te<0&&(Te=0),Te/=Se*Re+Ee*Ae,Te=Math.sqrt(Te)*(Y===K?-1:1);var we=Te*V/X*_e,Pe=Te*-X/V*Z,Ie=xe*we-J*Pe+(E+B)/2,Fe=J*we+xe*Pe+(I+U)/2,Oe=(Z-we)/V,Le=(_e-Pe)/X,$e=(-Z-we)/V,Ve=(-_e-Pe)/X,Xe=vectorAngle(1,0,Oe,Le),Ue=vectorAngle(Oe,Le,$e,Ve);return K===0&&Ue>0&&(Ue-=TAU$2),K===1&&Ue<0&&(Ue+=TAU$2),[Ie,Fe,Xe,Ue]},arcToBezier=function(E){var I=E.px,B=E.py,U=E.cx,V=E.cy,X=E.rx,Y=E.ry,K=E.xAxisRotation,J=K===void 0?0:K,xe=E.largeArcFlag,Z=xe===void 0?0:xe,_e=E.sweepFlag,Se=_e===void 0?0:_e,Ee=[];if(X===0||Y===0)return[];var Ae=Math.sin(J*TAU$2/360),Re=Math.cos(J*TAU$2/360),Te=Re*(I-U)/2+Ae*(B-V)/2,we=-Ae*(I-U)/2+Re*(B-V)/2;if(Te===0&&we===0)return[];X=Math.abs(X),Y=Math.abs(Y);var Pe=Math.pow(Te,2)/Math.pow(X,2)+Math.pow(we,2)/Math.pow(Y,2);Pe>1&&(X*=Math.sqrt(Pe),Y*=Math.sqrt(Pe));var Ie=getArcCenter(I,B,U,V,X,Y,Z,Se,Ae,Re,Te,we),Fe=_slicedToArray(Ie,4),Oe=Fe[0],Le=Fe[1],$e=Fe[2],Ve=Fe[3],Xe=Math.abs(Ve)/(TAU$2/4);Math.abs(1-Xe)<1e-7&&(Xe=1);var Ue=Math.max(Math.ceil(Xe),1);Ve/=Ue;for(var We=0;We<Ue;We++)Ee.push(approxUnitArc($e,Ve)),$e+=Ve;return Ee.map(function(je){var ze=mapToEllipse(je[0],X,Y,Re,Ae,Oe,Le),He=ze.x,De=ze.y,Ne=mapToEllipse(je[1],X,Y,Re,Ae,Oe,Le),Me=Ne.x,ke=Ne.y,Ge=mapToEllipse(je[2],X,Y,Re,Ae,Oe,Le),Be=Ge.x,qe=Ge.y;return{x1:He,y1:De,x2:Me,y2:ke,x:Be,y:qe}})};class SVG extends Graphics{constructor(E){super(),this.lineColor=null,E&&this.drawSVG(E)}drawSVG(E){if(typeof E=="string"){const I=document.createElement("div");I.innerHTML=E.trim(),E=I.querySelector("svg")}if(!E)throw new Error("Missing <svg> element in SVG constructor");return this._svgFill(E),this._svgChildren(E.children),this}_svgChildren(E,I=!1){for(let B=0;B<E.length;B++){const U=E[B];switch(this._svgFill(U,I),U.nodeName.toLowerCase()){case"path":{this._svgPath(U);break}case"circle":case"ellipse":{this._svgCircle(U);break}case"rect":{this._svgRect(U);break}case"polygon":{this._svgPoly(U,!0);break}case"polyline":{this._svgPoly(U);break}case"g":break;default:{console.info(`[PIXI.SVG] <${U.nodeName}> elements unsupported`);break}}this._svgChildren(U.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:I,g:B,b:U}=tinycolor(E).toRgb();return(I<<16)+(B<<8)+U}_svgCircle(E){let I="r",B="r";const U=E.nodeName==="elipse";U&&(I+="x",B+="y");const V=parseFloat(E.getAttribute(B)),X=parseFloat(E.getAttribute(I)),Y=E.getAttribute("cx"),K=E.getAttribute("cy");let J=0,xe=0;Y!==null&&(J=parseFloat(Y)),K!==null&&(xe=parseFloat(K)),U?this.drawEllipse(J,xe,V,X):this.drawCircle(J,xe,V)}_svgRect(E){const I=parseFloat(E.getAttribute("x")),B=parseFloat(E.getAttribute("y")),U=parseFloat(E.getAttribute("width")),V=parseFloat(E.getAttribute("height")),X=parseFloat(E.getAttribute("rx"));X?this.drawRoundedRect(I,B,U,V,X):this.drawRect(I,B,U,V)}_convertStyleName(E){return E.trim().replace("-width","Width").replace(/.*-(line)?/,"")}_svgStyle(E){const I=E.getAttribute("style"),B=E.getAttribute("opacity"),U={fill:E.getAttribute("fill"),opacity:B||E.getAttribute("fill-opacity"),stroke:E.getAttribute("stroke"),strokeOpacity:B||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 I!==null&&I.split(";").forEach(V=>{const[X,Y]=V.split(":");if(X){const K=this._convertStyleName(X);U[K]||(U[K]=Y.trim())}}),U}_svgPoly(E,I){const B=E.getAttribute("points").split(/[ ,]/g).map(U=>parseInt(U,10));this.drawPolygon(B),I&&this.closePath()}_svgFill(E,I){const{fill:B,opacity:U,stroke:V,strokeOpacity:X,strokeWidth:Y,cap:K,join:J,miterLimit:xe}=this._svgStyle(E),_e=Y!==null?parseFloat(Y):V!==null?1:0,Se=V!==null?this._hexToUint(V):this.lineColor;B?B==="none"?this.beginFill(0,0):this.beginFill(this._hexToUint(B),U!==null?parseFloat(U):1):I||this.beginFill(0),this.lineStyle({width:V===null&&Y===null&&I?this.line.width:_e,alpha:X===null?this.line.alpha:parseFloat(X),color:V===null&&I?this.line.color:Se,cap:K===null&&I?this.line.cap:K,join:J===null&&I?this.line.join:J,miterLimit:xe===null&&I?this.line.miterLimit:parseFloat(xe)}),E.getAttribute("fill-rule")&&console.info('[PIXI.SVG] "fill-rule" attribute is not supported')}_svgPath(E){const I=E.getAttribute("d");let B=0,U=0;const V=parserExports(I.trim());for(let X=0;X<V.length;X++){const Y=V[X];switch(Y.code){case"m":{this.moveTo(B+=Y.end.x,U+=Y.end.y);break}case"M":{this.moveTo(B=Y.end.x,U=Y.end.y);break}case"H":{this.lineTo(B=Y.value,U);break}case"h":{this.lineTo(B+=Y.value,U);break}case"V":{this.lineTo(B,U=Y.value);break}case"v":{this.lineTo(B,U+=Y.value);break}case"Z":{this.closePath();break}case"L":{this.lineTo(B=Y.end.x,U=Y.end.y);break}case"l":{this.lineTo(B+=Y.end.x,U+=Y.end.y);break}case"C":{this.bezierCurveTo(Y.cp1.x,Y.cp1.y,Y.cp2.x,Y.cp2.y,B=Y.end.x,U=Y.end.y);break}case"c":{const K=B,J=U;this.bezierCurveTo(K+Y.cp1.x,J+Y.cp1.y,K+Y.cp2.x,J+Y.cp2.y,B+=Y.end.x,U+=Y.end.y);break}case"s":case"q":{const K=B,J=U;this.quadraticCurveTo(K+Y.cp.x,J+Y.cp.y,B+=Y.end.x,U+=Y.end.y);break}case"S":case"Q":{this.quadraticCurveTo(Y.cp.x,Y.cp.y,B=Y.end.x,U=Y.end.y);break}case"a":{arcToBezier({px:B,py:U,cx:B+=Y.end.x,cy:U+=Y.end.y,rx:Y.radii.x,ry:Y.radii.y,xAxisRotation:Y.rotation,largeArcFlag:Y.large?1:0,sweepFlag:Y.clockwise?1:0}).forEach(({x1:K,y1:J,x2:xe,y2:Z,x:_e,y:Se})=>this.bezierCurveTo(K,J,xe,Z,_e,Se));break}case"A":{arcToBezier({px:B,py:U,cx:B=Y.end.x,cy:U=Y.end.y,rx:Y.radii.x,ry:Y.radii.y,xAxisRotation:Y.rotation,largeArcFlag:Y.large?1:0,sweepFlag:Y.clockwise?1:0}).forEach(({x1:K,y1:J,x2:xe,y2:Z,x:_e,y:Se})=>this.bezierCurveTo(K,J,xe,Z,_e,Se));break}default:{console.info("[PIXI.SVG] Draw command not supported:",Y.code,Y);break}}}}}var paramCounts={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},SPECIAL_SPACES=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function isSpace(C){return C===10||C===13||C===8232||C===8233||C===32||C===9||C===11||C===12||C===160||C>=5760&&SPECIAL_SPACES.indexOf(C)>=0}function isCommand(C){switch(C|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 isArc(C){return(C|32)===97}function isDigit(C){return C>=48&&C<=57}function isDigitStart(C){return C>=48&&C<=57||C===43||C===45||C===46}function State(C){this.index=0,this.path=C,this.max=C.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function skipSpaces(C){for(;C.index<C.max&&isSpace(C.path.charCodeAt(C.index));)C.index++}function scanFlag(C){var E=C.path.charCodeAt(C.index);if(E===48){C.param=0,C.index++;return}if(E===49){C.param=1,C.index++;return}C.err="SvgPath: arc flag can be 0 or 1 only (at pos "+C.index+")"}function scanParam(C){var E=C.index,I=E,B=C.max,U=!1,V=!1,X=!1,Y=!1,K;if(I>=B){C.err="SvgPath: missed param (at pos "+I+")";return}if(K=C.path.charCodeAt(I),(K===43||K===45)&&(I++,K=I<B?C.path.charCodeAt(I):0),!isDigit(K)&&K!==46){C.err="SvgPath: param should start with 0..9 or `.` (at pos "+I+")";return}if(K!==46){if(U=K===48,I++,K=I<B?C.path.charCodeAt(I):0,U&&I<B&&K&&isDigit(K)){C.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+E+")";return}for(;I<B&&isDigit(C.path.charCodeAt(I));)I++,V=!0;K=I<B?C.path.charCodeAt(I):0}if(K===46){for(Y=!0,I++;isDigit(C.path.charCodeAt(I));)I++,X=!0;K=I<B?C.path.charCodeAt(I):0}if(K===101||K===69){if(Y&&!V&&!X){C.err="SvgPath: invalid float exponent (at pos "+I+")";return}if(I++,K=I<B?C.path.charCodeAt(I):0,(K===43||K===45)&&I++,I<B&&isDigit(C.path.charCodeAt(I)))for(;I<B&&isDigit(C.path.charCodeAt(I));)I++;else{C.err="SvgPath: invalid float exponent (at pos "+I+")";return}}C.index=I,C.param=parseFloat(C.path.slice(E,I))+0}function finalizeSegment(C){var E,I;E=C.path[C.segmentStart],I=E.toLowerCase();var B=C.data;if(I==="m"&&B.length>2&&(C.result.push([E,B[0],B[1]]),B=B.slice(2),I="l",E=E==="m"?"l":"L"),I==="r")C.result.push([E].concat(B));else for(;B.length>=paramCounts[I]&&(C.result.push([E].concat(B.splice(0,paramCounts[I]))),!!paramCounts[I]););}function scanSegment(C){var E=C.max,I,B,U,V,X;if(C.segmentStart=C.index,I=C.path.charCodeAt(C.index),B=isArc(I),!isCommand(I)){C.err="SvgPath: bad command "+C.path[C.index]+" (at pos "+C.index+")";return}if(V=paramCounts[C.path[C.index].toLowerCase()],C.index++,skipSpaces(C),C.data=[],!V){finalizeSegment(C);return}for(U=!1;;){for(X=V;X>0;X--){if(B&&(X===3||X===4)?scanFlag(C):scanParam(C),C.err.length){finalizeSegment(C);return}C.data.push(C.param),skipSpaces(C),U=!1,C.index<E&&C.path.charCodeAt(C.index)===44&&(C.index++,skipSpaces(C),U=!0)}if(!U&&(C.index>=C.max||!isDigitStart(C.path.charCodeAt(C.index))))break}finalizeSegment(C)}var path_parse=function(E){var I=new State(E),B=I.max;for(skipSpaces(I);I.index<B&&!I.err.length;)scanSegment(I);return I.result.length&&("mM".indexOf(I.result[0][0])<0?(I.err="SvgPath: string should start with `M` or `m`",I.result=[]):I.result[0][0]="M"),{err:I.err,segments:I.result}};function combine(C,E){return[C[0]*E[0]+C[2]*E[1],C[1]*E[0]+C[3]*E[1],C[0]*E[2]+C[2]*E[3],C[1]*E[2]+C[3]*E[3],C[0]*E[4]+C[2]*E[5]+C[4],C[1]*E[4]+C[3]*E[5]+C[5]]}function Matrix$1(){if(!(this instanceof Matrix$1))return new Matrix$1;this.queue=[],this.cache=null}Matrix$1.prototype.matrix=function(C){return C[0]===1&&C[1]===0&&C[2]===0&&C[3]===1&&C[4]===0&&C[5]===0?this:(this.cache=null,this.queue.push(C),this)},Matrix$1.prototype.translate=function(C,E){return(C!==0||E!==0)&&(this.cache=null,this.queue.push([1,0,0,1,C,E])),this},Matrix$1.prototype.scale=function(C,E){return(C!==1||E!==1)&&(this.cache=null,this.queue.push([C,0,0,E,0,0])),this},Matrix$1.prototype.rotate=function(C,E,I){var B,U,V;return C!==0&&(this.translate(E,I),B=C*Math.PI/180,U=Math.cos(B),V=Math.sin(B),this.queue.push([U,V,-V,U,0,0]),this.cache=null,this.translate(-E,-I)),this},Matrix$1.prototype.skewX=function(C){return C!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(C*Math.PI/180),1,0,0])),this},Matrix$1.prototype.skewY=function(C){return C!==0&&(this.cache=null,this.queue.push([1,Math.tan(C*Math.PI/180),0,1,0,0])),this},Matrix$1.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 C=1;C<this.queue.length;C++)this.cache=combine(this.cache,this.queue[C]);return this.cache},Matrix$1.prototype.calc=function(C,E,I){var B;return this.queue.length?(this.cache||(this.cache=this.toArray()),B=this.cache,[C*B[0]+E*B[2]+(I?0:B[4]),C*B[1]+E*B[3]+(I?0:B[5])]):[C,E]};var matrix$1=Matrix$1,Matrix=matrix$1,operations={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},CMD_SPLIT_RE=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,PARAMS_SPLIT_RE=/[\s,]+/,transform_parse=function(E){var I=new Matrix,B,U;return E.split(CMD_SPLIT_RE).forEach(function(V){if(V.length){if(typeof operations[V]<"u"){B=V;return}switch(U=V.split(PARAMS_SPLIT_RE).map(function(X){return+X||0}),B){case"matrix":U.length===6&&I.matrix(U);return;case"scale":U.length===1?I.scale(U[0],U[0]):U.length===2&&I.scale(U[0],U[1]);return;case"rotate":U.length===1?I.rotate(U[0],0,0):U.length===3&&I.rotate(U[0],U[1],U[2]);return;case"translate":U.length===1?I.translate(U[0],0):U.length===2&&I.translate(U[0],U[1]);return;case"skewX":U.length===1&&I.skewX(U[0]);return;case"skewY":U.length===1&&I.skewY(U[0]);return}}}),I},TAU$1=Math.PI*2;function unit_vector_angle(C,E,I,B){var U=C*B-E*I<0?-1:1,V=C*I+E*B;return V>1&&(V=1),V<-1&&(V=-1),U*Math.acos(V)}function get_arc_center(C,E,I,B,U,V,X,Y,K,J){var xe=J*(C-I)/2+K*(E-B)/2,Z=-K*(C-I)/2+J*(E-B)/2,_e=X*X,Se=Y*Y,Ee=xe*xe,Ae=Z*Z,Re=_e*Se-_e*Ae-Se*Ee;Re<0&&(Re=0),Re/=_e*Ae+Se*Ee,Re=Math.sqrt(Re)*(U===V?-1:1);var Te=Re*X/Y*Z,we=Re*-Y/X*xe,Pe=J*Te-K*we+(C+I)/2,Ie=K*Te+J*we+(E+B)/2,Fe=(xe-Te)/X,Oe=(Z-we)/Y,Le=(-xe-Te)/X,$e=(-Z-we)/Y,Ve=unit_vector_angle(1,0,Fe,Oe),Xe=unit_vector_angle(Fe,Oe,Le,$e);return V===0&&Xe>0&&(Xe-=TAU$1),V===1&&Xe<0&&(Xe+=TAU$1),[Pe,Ie,Ve,Xe]}function approximate_unit_arc(C,E){var I=1.3333333333333333*Math.tan(E/4),B=Math.cos(C),U=Math.sin(C),V=Math.cos(C+E),X=Math.sin(C+E);return[B,U,B-U*I,U+B*I,V+X*I,X-V*I,V,X]}var a2c$1=function(E,I,B,U,V,X,Y,K,J){var xe=Math.sin(J*TAU$1/360),Z=Math.cos(J*TAU$1/360),_e=Z*(E-B)/2+xe*(I-U)/2,Se=-xe*(E-B)/2+Z*(I-U)/2;if(_e===0&&Se===0)return[];if(Y===0||K===0)return[];Y=Math.abs(Y),K=Math.abs(K);var Ee=_e*_e/(Y*Y)+Se*Se/(K*K);Ee>1&&(Y*=Math.sqrt(Ee),K*=Math.sqrt(Ee));var Ae=get_arc_center(E,I,B,U,V,X,Y,K,xe,Z),Re=[],Te=Ae[2],we=Ae[3],Pe=Math.max(Math.ceil(Math.abs(we)/(TAU$1/4)),1);we/=Pe;for(var Ie=0;Ie<Pe;Ie++)Re.push(approximate_unit_arc(Te,we)),Te+=we;return Re.map(function(Fe){for(var Oe=0;Oe<Fe.length;Oe+=2){var Le=Fe[Oe+0],$e=Fe[Oe+1];Le*=Y,$e*=K;var Ve=Z*Le-xe*$e,Xe=xe*Le+Z*$e;Fe[Oe+0]=Ve+Ae[0],Fe[Oe+1]=Xe+Ae[1]}return Fe})},epsilon=1e-10,torad=Math.PI/180;function Ellipse(C,E,I){if(!(this instanceof Ellipse))return new Ellipse(C,E,I);this.rx=C,this.ry=E,this.ax=I}Ellipse.prototype.transform=function(C){var E=Math.cos(this.ax*torad),I=Math.sin(this.ax*torad),B=[this.rx*(C[0]*E+C[2]*I),this.rx*(C[1]*E+C[3]*I),this.ry*(-C[0]*I+C[2]*E),this.ry*(-C[1]*I+C[3]*E)],U=B[0]*B[0]+B[2]*B[2],V=B[1]*B[1]+B[3]*B[3],X=((B[0]-B[3])*(B[0]-B[3])+(B[2]+B[1])*(B[2]+B[1]))*((B[0]+B[3])*(B[0]+B[3])+(B[2]-B[1])*(B[2]-B[1])),Y=(U+V)/2;if(X<epsilon*Y)return this.rx=this.ry=Math.sqrt(Y),this.ax=0,this;var K=B[0]*B[1]+B[2]*B[3];X=Math.sqrt(X);var J=Y+X/2,xe=Y-X/2;return this.ax=Math.abs(K)<epsilon&&Math.abs(J-V)<epsilon?90:Math.atan(Math.abs(K)>Math.abs(J-V)?(J-U)/K:K/(J-V))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(J),this.ry=Math.sqrt(xe)):(this.ax+=90,this.rx=Math.sqrt(xe),this.ry=Math.sqrt(J)),this},Ellipse.prototype.isDegenerate=function(){return this.rx<epsilon*this.ry||this.ry<epsilon*this.rx};var ellipse$1=Ellipse,pathParse=path_parse,transformParse=transform_parse,matrix=matrix$1,a2c=a2c$1,ellipse=ellipse$1;function SvgPath(C){if(!(this instanceof SvgPath))return new SvgPath(C);var E=pathParse(C);this.segments=E.segments,this.err=E.err,this.__stack=[]}SvgPath.from=function(C){if(typeof C=="string")return new SvgPath(C);if(C instanceof SvgPath){var E=new SvgPath("");return E.err=C.err,E.segments=C.segments.map(function(I){return I.slice()}),E.__stack=C.__stack.map(function(I){return matrix().matrix(I.toArray())}),E}throw new Error("SvgPath.from: invalid param type "+C)},SvgPath.prototype.__matrix=function(C){var E=this,I;C.queue.length&&this.iterate(function(B,U,V,X){var Y,K,J,xe;switch(B[0]){case"v":Y=C.calc(0,B[1],!0),K=Y[0]===0?["v",Y[1]]:["l",Y[0],Y[1]];break;case"V":Y=C.calc(V,B[1],!1),K=Y[0]===C.calc(V,X,!1)[0]?["V",Y[1]]:["L",Y[0],Y[1]];break;case"h":Y=C.calc(B[1],0,!0),K=Y[1]===0?["h",Y[0]]:["l",Y[0],Y[1]];break;case"H":Y=C.calc(B[1],X,!1),K=Y[1]===C.calc(V,X,!1)[1]?["H",Y[0]]:["L",Y[0],Y[1]];break;case"a":case"A":var Z=C.toArray(),_e=ellipse(B[1],B[2],B[3]).transform(Z);if(Z[0]*Z[3]-Z[1]*Z[2]<0&&(B[5]=B[5]?"0":"1"),Y=C.calc(B[6],B[7],B[0]==="a"),B[0]==="A"&&B[6]===V&&B[7]===X||B[0]==="a"&&B[6]===0&&B[7]===0){K=[B[0]==="a"?"l":"L",Y[0],Y[1]];break}_e.isDegenerate()?K=[B[0]==="a"?"l":"L",Y[0],Y[1]]:K=[B[0],_e.rx,_e.ry,_e.ax,B[4],B[5],Y[0],Y[1]];break;case"m":xe=U>0,Y=C.calc(B[1],B[2],xe),K=["m",Y[0],Y[1]];break;default:for(J=B[0],K=[J],xe=J.toLowerCase()===J,I=1;I<B.length;I+=2)Y=C.calc(B[I],B[I+1],xe),K.push(Y[0],Y[1])}E.segments[U]=K},!0)},SvgPath.prototype.__evaluateStack=function(){var C,E;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(C=matrix(),E=this.__stack.length;--E>=0;)C.matrix(this.__stack[E].toArray());this.__matrix(C),this.__stack=[]}},SvgPath.prototype.toString=function(){var C="",E="",I=!1;this.__evaluateStack();for(var B=0,U=this.segments.length;B<U;B++){var V=this.segments[B],X=V[0];X!==E||X==="m"||X==="M"?(X==="m"&&E==="z"&&(C+=" "),C+=X,I=!1):I=!0;for(var Y=1;Y<V.length;Y++){var K=V[Y];Y===1?I&&K>=0&&(C+=" "):K>=0&&(C+=" "),C+=K}E=X}return C},SvgPath.prototype.translate=function(C,E){return this.__stack.push(matrix().translate(C,E||0)),this},SvgPath.prototype.scale=function(C,E){return this.__stack.push(matrix().scale(C,!E&&E!==0?C:E)),this},SvgPath.prototype.rotate=function(C,E,I){return this.__stack.push(matrix().rotate(C,E||0,I||0)),this},SvgPath.prototype.skewX=function(C){return this.__stack.push(matrix().skewX(C)),this},SvgPath.prototype.skewY=function(C){return this.__stack.push(matrix().skewY(C)),this},SvgPath.prototype.matrix=function(C){return this.__stack.push(matrix().matrix(C)),this},SvgPath.prototype.transform=function(C){return C.trim()?(this.__stack.push(transformParse(C)),this):this},SvgPath.prototype.round=function(C){var E=0,I=0,B=0,U=0,V;return C=C||0,this.__evaluateStack(),this.segments.forEach(function(X){var Y=X[0].toLowerCase()===X[0];switch(X[0]){case"H":case"h":Y&&(X[1]+=B),B=X[1]-X[1].toFixed(C),X[1]=+X[1].toFixed(C);return;case"V":case"v":Y&&(X[1]+=U),U=X[1]-X[1].toFixed(C),X[1]=+X[1].toFixed(C);return;case"Z":case"z":B=E,U=I;return;case"M":case"m":Y&&(X[1]+=B,X[2]+=U),B=X[1]-X[1].toFixed(C),U=X[2]-X[2].toFixed(C),E=B,I=U,X[1]=+X[1].toFixed(C),X[2]=+X[2].toFixed(C);return;case"A":case"a":Y&&(X[6]+=B,X[7]+=U),B=X[6]-X[6].toFixed(C),U=X[7]-X[7].toFixed(C),X[1]=+X[1].toFixed(C),X[2]=+X[2].toFixed(C),X[3]=+X[3].toFixed(C+2),X[6]=+X[6].toFixed(C),X[7]=+X[7].toFixed(C);return;default:V=X.length,Y&&(X[V-2]+=B,X[V-1]+=U),B=X[V-2]-X[V-2].toFixed(C),U=X[V-1]-X[V-1].toFixed(C),X.forEach(function(K,J){J&&(X[J]=+X[J].toFixed(C))});return}}),this},SvgPath.prototype.iterate=function(C,E){var I=this.segments,B={},U=!1,V=0,X=0,Y=0,K=0,J,xe,Z;if(E||this.__evaluateStack(),I.forEach(function(_e,Se){var Ee=C(_e,Se,V,X);Array.isArray(Ee)&&(B[Se]=Ee,U=!0);var Ae=_e[0]===_e[0].toLowerCase();switch(_e[0]){case"m":case"M":V=_e[1]+(Ae?V:0),X=_e[2]+(Ae?X:0),Y=V,K=X;return;case"h":case"H":V=_e[1]+(Ae?V:0);return;case"v":case"V":X=_e[1]+(Ae?X:0);return;case"z":case"Z":V=Y,X=K;return;default:V=_e[_e.length-2]+(Ae?V:0),X=_e[_e.length-1]+(Ae?X:0)}}),!U)return this;for(Z=[],J=0;J<I.length;J++)if(typeof B[J]<"u")for(xe=0;xe<B[J].length;xe++)Z.push(B[J][xe]);else Z.push(I[J]);return this.segments=Z,this},SvgPath.prototype.abs=function(){return this.iterate(function(C,E,I,B){var U=C[0],V=U.toUpperCase(),X;if(U!==V)switch(C[0]=V,U){case"v":C[1]+=B;return;case"a":C[6]+=I,C[7]+=B;return;default:for(X=1;X<C.length;X++)C[X]+=X%2?I:B}},!0),this},SvgPath.prototype.rel=function(){return this.iterate(function(C,E,I,B){var U=C[0],V=U.toLowerCase(),X;if(U!==V&&!(E===0&&U==="M"))switch(C[0]=V,U){case"V":C[1]-=B;return;case"A":C[6]-=I,C[7]-=B;return;default:for(X=1;X<C.length;X++)C[X]-=X%2?I:B}},!0),this},SvgPath.prototype.unarc=function(){return this.iterate(function(C,E,I,B){var U,V,X,Y=[],K=C[0];return K!=="A"&&K!=="a"?null:(K==="a"?(V=I+C[6],X=B+C[7]):(V=C[6],X=C[7]),U=a2c(I,B,V,X,C[4],C[5],C[1],C[2],C[3]),U.length===0?[[C[0]==="a"?"l":"L",C[6],C[7]]]:(U.forEach(function(J){Y.push(["C",J[2],J[3],J[4],J[5],J[6],J[7]])}),Y))}),this},SvgPath.prototype.unshort=function(){var C=this.segments,E,I,B,U,V;return this.iterate(function(X,Y,K,J){var xe=X[0],Z=xe.toUpperCase(),_e;Y&&(Z==="T"?(_e=xe==="t",B=C[Y-1],B[0]==="Q"?(E=B[1]-K,I=B[2]-J):B[0]==="q"?(E=B[1]-B[3],I=B[2]-B[4]):(E=0,I=0),U=-E,V=-I,_e||(U+=K,V+=J),C[Y]=[_e?"q":"Q",U,V,X[1],X[2]]):Z==="S"&&(_e=xe==="s",B=C[Y-1],B[0]==="C"?(E=B[3]-K,I=B[4]-J):B[0]==="c"?(E=B[3]-B[5],I=B[4]-B[6]):(E=0,I=0),U=-E,V=-I,_e||(U+=K,V+=J),C[Y]=[_e?"c":"C",U,V,X[1],X[2],X[3],X[4]]))}),this};var svgpath$2=SvgPath,svgpath=svgpath$2;const svgpath$1=getDefaultExportFromCjs(svgpath),PixiSvgPathSprite=React__namespace.forwardRef((C,E)=>{const[I,B]=React__namespace.useState(null),U=React.useRef(null),V=React.useRef(null),X=React.useRef(null),{path:Y,visible:K,disabled:J,transformation:{x:xe,y:Z,width:_e,height:Se,anchor:Ee,hexColor:Ae,fill:Re,stroke:Te="none",strokeWidth:we=0,colorCorrection:Pe={}},pointerdown:Ie,pointerup:Fe}=C,Oe=react.useApp(),{temperatureFilter:Le,sharpnessFilter:$e,hueFilter:Ve,blurFilter:Xe,adjustmentFilter:Ue,vignetteFilter:We,noiseFilter:je}=withFiltersHook(Pe),{blurRadius:ze=0,vignette:He=0,noise:De=0}=Pe;return React__namespace.useEffect(()=>{const Ne=svgpath$1(Y).scale(5).translate(0,0).toString(),Me=`<svg xmlns="http://www.w3.org/2000/svg" width="${_e}" height="${Se}">
1970
+ <path stroke="${Te}" stroke-width="${we}" fill="${Ae||Re}" d="${Ne}">
1933
1971
  </path>
1934
- </svg>`,H=new IS(X),ve=O.renderer.generateTexture(H);return n(ve),()=>{}},[O,l,w,x,_,b]),Fe.jsx(Wn,{...t,ref:e,children:Fe.jsx(Je.Container,{ref:a,children:Fe.jsx(Je.Container,{ref:u,children:r&&Fe.jsx(Je.Sprite,{texture:r,width:c,height:d,anchor:m,ref:i,x:p,y:v,alpha:f?1:0,...f&&{interactive:!0,pointerdown:S,pointerup:I},filters:[N,L,k,j,...ee>0?[U]:[]]})})})})});var kp={};/*!
1972
+ </svg>`,ke=new SVG(Me),Ge=Oe.renderer.generateTexture(ke);return B(Ge),()=>{}},[Oe,Y,Te,we,Ae,Re]),jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,children:jsxRuntimeExports.jsx(react.Container,{ref:V,children:jsxRuntimeExports.jsx(react.Container,{ref:X,children:I&&jsxRuntimeExports.jsx(react.Sprite,{texture:I,width:_e,height:Se,anchor:Ee,ref:U,x:xe,y:Z,alpha:K?1:0,...!J&&K&&{interactive:!0,pointerdown:Ie,pointerup:Fe},filters:[Le,$e,Ve,Ue,...ze>0?[Xe]:[],...He>0?[We]:[],...De>0?[je]:[]]})})})})});var howler={};/*!
1935
1973
  * howler.js v2.2.3
1936
1974
  * howlerjs.com
1937
1975
  *
@@ -1939,7 +1977,7 @@ void main() {
1939
1977
  * goldfirestudios.com
1940
1978
  *
1941
1979
  * 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 U=x._node;if(m._webAudio){var j=function(){m._playLock=!1,k(),m._refreshBuffer(x);var H=x._muted||m._muted?0:x._volume;U.gain.setValueAtTime(H,r.ctx.currentTime),x._playStart=r.ctx.currentTime,typeof U.bufferSource.start>"u"?x._loop?U.bufferSource.noteGrainOn(0,S,86400):U.bufferSource.noteGrainOn(0,S,I):x._loop?U.bufferSource.start(0,S,86400):U.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(){U.currentTime=S,U.muted=x._muted||m._muted||r._muted||U.muted,U.volume=x._volume*r.volume(),U.playbackRate=x._rate;try{var H=U.play();if(H&&typeof Promise<"u"&&(H instanceof Promise||typeof H.then=="function")?(m._playLock=!0,k(),H.then(function(){m._playLock=!1,U._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)),U.playbackRate=x._rate,U.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),U.removeEventListener("ended",m._endTimers[x._id],!1)},U.addEventListener("ended",m._endTimers[x._id],!1))}catch(ve){m._emit("playerror",x._id,ve)}};U.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(U.src=m._src,U.load());var se=window&&window.ejecta||!U.readyState&&r._navigator.isCocoonJS;if(U.readyState>=3||se)ee();else{m._playLock=!0,m._state="loading";var X=function(){m._state="loaded",ee(),U.removeEventListener(r._canPlayEvent,X,!1)};U.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)})();/*!
1980
+ */(function(C){(function(){var E=function(){this.init()};E.prototype={init:function(){var Z=this||I;return Z._counter=1e3,Z._html5AudioPool=[],Z.html5PoolSize=10,Z._codecs={},Z._howls=[],Z._muted=!1,Z._volume=1,Z._canPlayEvent="canplaythrough",Z._navigator=typeof window<"u"&&window.navigator?window.navigator:null,Z.masterGain=null,Z.noAudio=!1,Z.usingWebAudio=!0,Z.autoSuspend=!0,Z.ctx=null,Z.autoUnlock=!0,Z._setup(),Z},volume:function(Z){var _e=this||I;if(Z=parseFloat(Z),_e.ctx||xe(),typeof Z<"u"&&Z>=0&&Z<=1){if(_e._volume=Z,_e._muted)return _e;_e.usingWebAudio&&_e.masterGain.gain.setValueAtTime(Z,I.ctx.currentTime);for(var Se=0;Se<_e._howls.length;Se++)if(!_e._howls[Se]._webAudio)for(var Ee=_e._howls[Se]._getSoundIds(),Ae=0;Ae<Ee.length;Ae++){var Re=_e._howls[Se]._soundById(Ee[Ae]);Re&&Re._node&&(Re._node.volume=Re._volume*Z)}return _e}return _e._volume},mute:function(Z){var _e=this||I;_e.ctx||xe(),_e._muted=Z,_e.usingWebAudio&&_e.masterGain.gain.setValueAtTime(Z?0:_e._volume,I.ctx.currentTime);for(var Se=0;Se<_e._howls.length;Se++)if(!_e._howls[Se]._webAudio)for(var Ee=_e._howls[Se]._getSoundIds(),Ae=0;Ae<Ee.length;Ae++){var Re=_e._howls[Se]._soundById(Ee[Ae]);Re&&Re._node&&(Re._node.muted=Z?!0:Re._muted)}return _e},stop:function(){for(var Z=this||I,_e=0;_e<Z._howls.length;_e++)Z._howls[_e].stop();return Z},unload:function(){for(var Z=this||I,_e=Z._howls.length-1;_e>=0;_e--)Z._howls[_e].unload();return Z.usingWebAudio&&Z.ctx&&typeof Z.ctx.close<"u"&&(Z.ctx.close(),Z.ctx=null,xe()),Z},codecs:function(Z){return(this||I)._codecs[Z.replace(/^x-/,"")]},_setup:function(){var Z=this||I;if(Z.state=Z.ctx&&Z.ctx.state||"suspended",Z._autoSuspend(),!Z.usingWebAudio)if(typeof Audio<"u")try{var _e=new Audio;typeof _e.oncanplaythrough>"u"&&(Z._canPlayEvent="canplay")}catch{Z.noAudio=!0}else Z.noAudio=!0;try{var _e=new Audio;_e.muted&&(Z.noAudio=!0)}catch{}return Z.noAudio||Z._setupCodecs(),Z},_setupCodecs:function(){var Z=this||I,_e=null;try{_e=typeof Audio<"u"?new Audio:null}catch{return Z}if(!_e||typeof _e.canPlayType!="function")return Z;var Se=_e.canPlayType("audio/mpeg;").replace(/^no$/,""),Ee=Z._navigator?Z._navigator.userAgent:"",Ae=Ee.match(/OPR\/([0-6].)/g),Re=Ae&&parseInt(Ae[0].split("/")[1],10)<33,Te=Ee.indexOf("Safari")!==-1&&Ee.indexOf("Chrome")===-1,we=Ee.match(/Version\/(.*?) /),Pe=Te&&we&&parseInt(we[1],10)<15;return Z._codecs={mp3:!!(!Re&&(Se||_e.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!Se,opus:!!_e.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!_e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!_e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(_e.canPlayType('audio/wav; codecs="1"')||_e.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!_e.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!_e.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(_e.canPlayType("audio/x-m4a;")||_e.canPlayType("audio/m4a;")||_e.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(_e.canPlayType("audio/x-m4b;")||_e.canPlayType("audio/m4b;")||_e.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(_e.canPlayType("audio/x-mp4;")||_e.canPlayType("audio/mp4;")||_e.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!Pe&&_e.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!Pe&&_e.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!_e.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(_e.canPlayType("audio/x-flac;")||_e.canPlayType("audio/flac;")).replace(/^no$/,"")},Z},_unlockAudio:function(){var Z=this||I;if(!(Z._audioUnlocked||!Z.ctx)){Z._audioUnlocked=!1,Z.autoUnlock=!1,!Z._mobileUnloaded&&Z.ctx.sampleRate!==44100&&(Z._mobileUnloaded=!0,Z.unload()),Z._scratchBuffer=Z.ctx.createBuffer(1,1,22050);var _e=function(Se){for(;Z._html5AudioPool.length<Z.html5PoolSize;)try{var Ee=new Audio;Ee._unlocked=!0,Z._releaseHtml5Audio(Ee)}catch{Z.noAudio=!0;break}for(var Ae=0;Ae<Z._howls.length;Ae++)if(!Z._howls[Ae]._webAudio)for(var Re=Z._howls[Ae]._getSoundIds(),Te=0;Te<Re.length;Te++){var we=Z._howls[Ae]._soundById(Re[Te]);we&&we._node&&!we._node._unlocked&&(we._node._unlocked=!0,we._node.load())}Z._autoResume();var Pe=Z.ctx.createBufferSource();Pe.buffer=Z._scratchBuffer,Pe.connect(Z.ctx.destination),typeof Pe.start>"u"?Pe.noteOn(0):Pe.start(0),typeof Z.ctx.resume=="function"&&Z.ctx.resume(),Pe.onended=function(){Pe.disconnect(0),Z._audioUnlocked=!0,document.removeEventListener("touchstart",_e,!0),document.removeEventListener("touchend",_e,!0),document.removeEventListener("click",_e,!0),document.removeEventListener("keydown",_e,!0);for(var Ie=0;Ie<Z._howls.length;Ie++)Z._howls[Ie]._emit("unlock")}};return document.addEventListener("touchstart",_e,!0),document.addEventListener("touchend",_e,!0),document.addEventListener("click",_e,!0),document.addEventListener("keydown",_e,!0),Z}},_obtainHtml5Audio:function(){var Z=this||I;if(Z._html5AudioPool.length)return Z._html5AudioPool.pop();var _e=new Audio().play();return _e&&typeof Promise<"u"&&(_e instanceof Promise||typeof _e.then=="function")&&_e.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.")}),new Audio},_releaseHtml5Audio:function(Z){var _e=this||I;return Z._unlocked&&_e._html5AudioPool.push(Z),_e},_autoSuspend:function(){var Z=this;if(!(!Z.autoSuspend||!Z.ctx||typeof Z.ctx.suspend>"u"||!I.usingWebAudio)){for(var _e=0;_e<Z._howls.length;_e++)if(Z._howls[_e]._webAudio){for(var Se=0;Se<Z._howls[_e]._sounds.length;Se++)if(!Z._howls[_e]._sounds[Se]._paused)return Z}return Z._suspendTimer&&clearTimeout(Z._suspendTimer),Z._suspendTimer=setTimeout(function(){if(Z.autoSuspend){Z._suspendTimer=null,Z.state="suspending";var Ee=function(){Z.state="suspended",Z._resumeAfterSuspend&&(delete Z._resumeAfterSuspend,Z._autoResume())};Z.ctx.suspend().then(Ee,Ee)}},3e4),Z}},_autoResume:function(){var Z=this;if(!(!Z.ctx||typeof Z.ctx.resume>"u"||!I.usingWebAudio))return Z.state==="running"&&Z.ctx.state!=="interrupted"&&Z._suspendTimer?(clearTimeout(Z._suspendTimer),Z._suspendTimer=null):Z.state==="suspended"||Z.state==="running"&&Z.ctx.state==="interrupted"?(Z.ctx.resume().then(function(){Z.state="running";for(var _e=0;_e<Z._howls.length;_e++)Z._howls[_e]._emit("resume")}),Z._suspendTimer&&(clearTimeout(Z._suspendTimer),Z._suspendTimer=null)):Z.state==="suspending"&&(Z._resumeAfterSuspend=!0),Z}};var I=new E,B=function(Z){var _e=this;if(!Z.src||Z.src.length===0){console.error("An array of source files must be passed with any new Howl.");return}_e.init(Z)};B.prototype={init:function(Z){var _e=this;return I.ctx||xe(),_e._autoplay=Z.autoplay||!1,_e._format=typeof Z.format!="string"?Z.format:[Z.format],_e._html5=Z.html5||!1,_e._muted=Z.mute||!1,_e._loop=Z.loop||!1,_e._pool=Z.pool||5,_e._preload=typeof Z.preload=="boolean"||Z.preload==="metadata"?Z.preload:!0,_e._rate=Z.rate||1,_e._sprite=Z.sprite||{},_e._src=typeof Z.src!="string"?Z.src:[Z.src],_e._volume=Z.volume!==void 0?Z.volume:1,_e._xhr={method:Z.xhr&&Z.xhr.method?Z.xhr.method:"GET",headers:Z.xhr&&Z.xhr.headers?Z.xhr.headers:null,withCredentials:Z.xhr&&Z.xhr.withCredentials?Z.xhr.withCredentials:!1},_e._duration=0,_e._state="unloaded",_e._sounds=[],_e._endTimers={},_e._queue=[],_e._playLock=!1,_e._onend=Z.onend?[{fn:Z.onend}]:[],_e._onfade=Z.onfade?[{fn:Z.onfade}]:[],_e._onload=Z.onload?[{fn:Z.onload}]:[],_e._onloaderror=Z.onloaderror?[{fn:Z.onloaderror}]:[],_e._onplayerror=Z.onplayerror?[{fn:Z.onplayerror}]:[],_e._onpause=Z.onpause?[{fn:Z.onpause}]:[],_e._onplay=Z.onplay?[{fn:Z.onplay}]:[],_e._onstop=Z.onstop?[{fn:Z.onstop}]:[],_e._onmute=Z.onmute?[{fn:Z.onmute}]:[],_e._onvolume=Z.onvolume?[{fn:Z.onvolume}]:[],_e._onrate=Z.onrate?[{fn:Z.onrate}]:[],_e._onseek=Z.onseek?[{fn:Z.onseek}]:[],_e._onunlock=Z.onunlock?[{fn:Z.onunlock}]:[],_e._onresume=[],_e._webAudio=I.usingWebAudio&&!_e._html5,typeof I.ctx<"u"&&I.ctx&&I.autoUnlock&&I._unlockAudio(),I._howls.push(_e),_e._autoplay&&_e._queue.push({event:"play",action:function(){_e.play()}}),_e._preload&&_e._preload!=="none"&&_e.load(),_e},load:function(){var Z=this,_e=null;if(I.noAudio){Z._emit("loaderror",null,"No audio support.");return}typeof Z._src=="string"&&(Z._src=[Z._src]);for(var Se=0;Se<Z._src.length;Se++){var Ee,Ae;if(Z._format&&Z._format[Se])Ee=Z._format[Se];else{if(Ae=Z._src[Se],typeof Ae!="string"){Z._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}Ee=/^data:audio\/([^;,]+);/i.exec(Ae),Ee||(Ee=/\.([^.]+)$/.exec(Ae.split("?",1)[0])),Ee&&(Ee=Ee[1].toLowerCase())}if(Ee||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),Ee&&I.codecs(Ee)){_e=Z._src[Se];break}}if(!_e){Z._emit("loaderror",null,"No codec support for selected audio sources.");return}return Z._src=_e,Z._state="loading",window.location.protocol==="https:"&&_e.slice(0,5)==="http:"&&(Z._html5=!0,Z._webAudio=!1),new U(Z),Z._webAudio&&X(Z),Z},play:function(Z,_e){var Se=this,Ee=null;if(typeof Z=="number")Ee=Z,Z=null;else{if(typeof Z=="string"&&Se._state==="loaded"&&!Se._sprite[Z])return null;if(typeof Z>"u"&&(Z="__default",!Se._playLock)){for(var Ae=0,Re=0;Re<Se._sounds.length;Re++)Se._sounds[Re]._paused&&!Se._sounds[Re]._ended&&(Ae++,Ee=Se._sounds[Re]._id);Ae===1?Z=null:Ee=null}}var Te=Ee?Se._soundById(Ee):Se._inactiveSound();if(!Te)return null;if(Ee&&!Z&&(Z=Te._sprite||"__default"),Se._state!=="loaded"){Te._sprite=Z,Te._ended=!1;var we=Te._id;return Se._queue.push({event:"play",action:function(){Se.play(we)}}),we}if(Ee&&!Te._paused)return _e||Se._loadQueue("play"),Te._id;Se._webAudio&&I._autoResume();var Pe=Math.max(0,Te._seek>0?Te._seek:Se._sprite[Z][0]/1e3),Ie=Math.max(0,(Se._sprite[Z][0]+Se._sprite[Z][1])/1e3-Pe),Fe=Ie*1e3/Math.abs(Te._rate),Oe=Se._sprite[Z][0]/1e3,Le=(Se._sprite[Z][0]+Se._sprite[Z][1])/1e3;Te._sprite=Z,Te._ended=!1;var $e=function(){Te._paused=!1,Te._seek=Pe,Te._start=Oe,Te._stop=Le,Te._loop=!!(Te._loop||Se._sprite[Z][2])};if(Pe>=Le){Se._ended(Te);return}var Ve=Te._node;if(Se._webAudio){var Xe=function(){Se._playLock=!1,$e(),Se._refreshBuffer(Te);var ze=Te._muted||Se._muted?0:Te._volume;Ve.gain.setValueAtTime(ze,I.ctx.currentTime),Te._playStart=I.ctx.currentTime,typeof Ve.bufferSource.start>"u"?Te._loop?Ve.bufferSource.noteGrainOn(0,Pe,86400):Ve.bufferSource.noteGrainOn(0,Pe,Ie):Te._loop?Ve.bufferSource.start(0,Pe,86400):Ve.bufferSource.start(0,Pe,Ie),Fe!==1/0&&(Se._endTimers[Te._id]=setTimeout(Se._ended.bind(Se,Te),Fe)),_e||setTimeout(function(){Se._emit("play",Te._id),Se._loadQueue()},0)};I.state==="running"&&I.ctx.state!=="interrupted"?Xe():(Se._playLock=!0,Se.once("resume",Xe),Se._clearTimer(Te._id))}else{var Ue=function(){Ve.currentTime=Pe,Ve.muted=Te._muted||Se._muted||I._muted||Ve.muted,Ve.volume=Te._volume*I.volume(),Ve.playbackRate=Te._rate;try{var ze=Ve.play();if(ze&&typeof Promise<"u"&&(ze instanceof Promise||typeof ze.then=="function")?(Se._playLock=!0,$e(),ze.then(function(){Se._playLock=!1,Ve._unlocked=!0,_e?Se._loadQueue():Se._emit("play",Te._id)}).catch(function(){Se._playLock=!1,Se._emit("playerror",Te._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."),Te._ended=!0,Te._paused=!0})):_e||(Se._playLock=!1,$e(),Se._emit("play",Te._id)),Ve.playbackRate=Te._rate,Ve.paused){Se._emit("playerror",Te._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}Z!=="__default"||Te._loop?Se._endTimers[Te._id]=setTimeout(Se._ended.bind(Se,Te),Fe):(Se._endTimers[Te._id]=function(){Se._ended(Te),Ve.removeEventListener("ended",Se._endTimers[Te._id],!1)},Ve.addEventListener("ended",Se._endTimers[Te._id],!1))}catch(He){Se._emit("playerror",Te._id,He)}};Ve.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(Ve.src=Se._src,Ve.load());var We=window&&window.ejecta||!Ve.readyState&&I._navigator.isCocoonJS;if(Ve.readyState>=3||We)Ue();else{Se._playLock=!0,Se._state="loading";var je=function(){Se._state="loaded",Ue(),Ve.removeEventListener(I._canPlayEvent,je,!1)};Ve.addEventListener(I._canPlayEvent,je,!1),Se._clearTimer(Te._id)}}return Te._id},pause:function(Z){var _e=this;if(_e._state!=="loaded"||_e._playLock)return _e._queue.push({event:"pause",action:function(){_e.pause(Z)}}),_e;for(var Se=_e._getSoundIds(Z),Ee=0;Ee<Se.length;Ee++){_e._clearTimer(Se[Ee]);var Ae=_e._soundById(Se[Ee]);if(Ae&&!Ae._paused&&(Ae._seek=_e.seek(Se[Ee]),Ae._rateSeek=0,Ae._paused=!0,_e._stopFade(Se[Ee]),Ae._node))if(_e._webAudio){if(!Ae._node.bufferSource)continue;typeof Ae._node.bufferSource.stop>"u"?Ae._node.bufferSource.noteOff(0):Ae._node.bufferSource.stop(0),_e._cleanBuffer(Ae._node)}else(!isNaN(Ae._node.duration)||Ae._node.duration===1/0)&&Ae._node.pause();arguments[1]||_e._emit("pause",Ae?Ae._id:null)}return _e},stop:function(Z,_e){var Se=this;if(Se._state!=="loaded"||Se._playLock)return Se._queue.push({event:"stop",action:function(){Se.stop(Z)}}),Se;for(var Ee=Se._getSoundIds(Z),Ae=0;Ae<Ee.length;Ae++){Se._clearTimer(Ee[Ae]);var Re=Se._soundById(Ee[Ae]);Re&&(Re._seek=Re._start||0,Re._rateSeek=0,Re._paused=!0,Re._ended=!0,Se._stopFade(Ee[Ae]),Re._node&&(Se._webAudio?Re._node.bufferSource&&(typeof Re._node.bufferSource.stop>"u"?Re._node.bufferSource.noteOff(0):Re._node.bufferSource.stop(0),Se._cleanBuffer(Re._node)):(!isNaN(Re._node.duration)||Re._node.duration===1/0)&&(Re._node.currentTime=Re._start||0,Re._node.pause(),Re._node.duration===1/0&&Se._clearSound(Re._node))),_e||Se._emit("stop",Re._id))}return Se},mute:function(Z,_e){var Se=this;if(Se._state!=="loaded"||Se._playLock)return Se._queue.push({event:"mute",action:function(){Se.mute(Z,_e)}}),Se;if(typeof _e>"u")if(typeof Z=="boolean")Se._muted=Z;else return Se._muted;for(var Ee=Se._getSoundIds(_e),Ae=0;Ae<Ee.length;Ae++){var Re=Se._soundById(Ee[Ae]);Re&&(Re._muted=Z,Re._interval&&Se._stopFade(Re._id),Se._webAudio&&Re._node?Re._node.gain.setValueAtTime(Z?0:Re._volume,I.ctx.currentTime):Re._node&&(Re._node.muted=I._muted?!0:Z),Se._emit("mute",Re._id))}return Se},volume:function(){var Z=this,_e=arguments,Se,Ee;if(_e.length===0)return Z._volume;if(_e.length===1||_e.length===2&&typeof _e[1]>"u"){var Ae=Z._getSoundIds(),Re=Ae.indexOf(_e[0]);Re>=0?Ee=parseInt(_e[0],10):Se=parseFloat(_e[0])}else _e.length>=2&&(Se=parseFloat(_e[0]),Ee=parseInt(_e[1],10));var Te;if(typeof Se<"u"&&Se>=0&&Se<=1){if(Z._state!=="loaded"||Z._playLock)return Z._queue.push({event:"volume",action:function(){Z.volume.apply(Z,_e)}}),Z;typeof Ee>"u"&&(Z._volume=Se),Ee=Z._getSoundIds(Ee);for(var we=0;we<Ee.length;we++)Te=Z._soundById(Ee[we]),Te&&(Te._volume=Se,_e[2]||Z._stopFade(Ee[we]),Z._webAudio&&Te._node&&!Te._muted?Te._node.gain.setValueAtTime(Se,I.ctx.currentTime):Te._node&&!Te._muted&&(Te._node.volume=Se*I.volume()),Z._emit("volume",Te._id))}else return Te=Ee?Z._soundById(Ee):Z._sounds[0],Te?Te._volume:0;return Z},fade:function(Z,_e,Se,Ee){var Ae=this;if(Ae._state!=="loaded"||Ae._playLock)return Ae._queue.push({event:"fade",action:function(){Ae.fade(Z,_e,Se,Ee)}}),Ae;Z=Math.min(Math.max(0,parseFloat(Z)),1),_e=Math.min(Math.max(0,parseFloat(_e)),1),Se=parseFloat(Se),Ae.volume(Z,Ee);for(var Re=Ae._getSoundIds(Ee),Te=0;Te<Re.length;Te++){var we=Ae._soundById(Re[Te]);if(we){if(Ee||Ae._stopFade(Re[Te]),Ae._webAudio&&!we._muted){var Pe=I.ctx.currentTime,Ie=Pe+Se/1e3;we._volume=Z,we._node.gain.setValueAtTime(Z,Pe),we._node.gain.linearRampToValueAtTime(_e,Ie)}Ae._startFadeInterval(we,Z,_e,Se,Re[Te],typeof Ee>"u")}}return Ae},_startFadeInterval:function(Z,_e,Se,Ee,Ae,Re){var Te=this,we=_e,Pe=Se-_e,Ie=Math.abs(Pe/.01),Fe=Math.max(4,Ie>0?Ee/Ie:Ee),Oe=Date.now();Z._fadeTo=Se,Z._interval=setInterval(function(){var Le=(Date.now()-Oe)/Ee;Oe=Date.now(),we+=Pe*Le,we=Math.round(we*100)/100,Pe<0?we=Math.max(Se,we):we=Math.min(Se,we),Te._webAudio?Z._volume=we:Te.volume(we,Z._id,!0),Re&&(Te._volume=we),(Se<_e&&we<=Se||Se>_e&&we>=Se)&&(clearInterval(Z._interval),Z._interval=null,Z._fadeTo=null,Te.volume(Se,Z._id),Te._emit("fade",Z._id))},Fe)},_stopFade:function(Z){var _e=this,Se=_e._soundById(Z);return Se&&Se._interval&&(_e._webAudio&&Se._node.gain.cancelScheduledValues(I.ctx.currentTime),clearInterval(Se._interval),Se._interval=null,_e.volume(Se._fadeTo,Z),Se._fadeTo=null,_e._emit("fade",Z)),_e},loop:function(){var Z=this,_e=arguments,Se,Ee,Ae;if(_e.length===0)return Z._loop;if(_e.length===1)if(typeof _e[0]=="boolean")Se=_e[0],Z._loop=Se;else return Ae=Z._soundById(parseInt(_e[0],10)),Ae?Ae._loop:!1;else _e.length===2&&(Se=_e[0],Ee=parseInt(_e[1],10));for(var Re=Z._getSoundIds(Ee),Te=0;Te<Re.length;Te++)Ae=Z._soundById(Re[Te]),Ae&&(Ae._loop=Se,Z._webAudio&&Ae._node&&Ae._node.bufferSource&&(Ae._node.bufferSource.loop=Se,Se&&(Ae._node.bufferSource.loopStart=Ae._start||0,Ae._node.bufferSource.loopEnd=Ae._stop,Z.playing(Re[Te])&&(Z.pause(Re[Te],!0),Z.play(Re[Te],!0)))));return Z},rate:function(){var Z=this,_e=arguments,Se,Ee;if(_e.length===0)Ee=Z._sounds[0]._id;else if(_e.length===1){var Ae=Z._getSoundIds(),Re=Ae.indexOf(_e[0]);Re>=0?Ee=parseInt(_e[0],10):Se=parseFloat(_e[0])}else _e.length===2&&(Se=parseFloat(_e[0]),Ee=parseInt(_e[1],10));var Te;if(typeof Se=="number"){if(Z._state!=="loaded"||Z._playLock)return Z._queue.push({event:"rate",action:function(){Z.rate.apply(Z,_e)}}),Z;typeof Ee>"u"&&(Z._rate=Se),Ee=Z._getSoundIds(Ee);for(var we=0;we<Ee.length;we++)if(Te=Z._soundById(Ee[we]),Te){Z.playing(Ee[we])&&(Te._rateSeek=Z.seek(Ee[we]),Te._playStart=Z._webAudio?I.ctx.currentTime:Te._playStart),Te._rate=Se,Z._webAudio&&Te._node&&Te._node.bufferSource?Te._node.bufferSource.playbackRate.setValueAtTime(Se,I.ctx.currentTime):Te._node&&(Te._node.playbackRate=Se);var Pe=Z.seek(Ee[we]),Ie=(Z._sprite[Te._sprite][0]+Z._sprite[Te._sprite][1])/1e3-Pe,Fe=Ie*1e3/Math.abs(Te._rate);(Z._endTimers[Ee[we]]||!Te._paused)&&(Z._clearTimer(Ee[we]),Z._endTimers[Ee[we]]=setTimeout(Z._ended.bind(Z,Te),Fe)),Z._emit("rate",Te._id)}}else return Te=Z._soundById(Ee),Te?Te._rate:Z._rate;return Z},seek:function(){var Z=this,_e=arguments,Se,Ee;if(_e.length===0)Z._sounds.length&&(Ee=Z._sounds[0]._id);else if(_e.length===1){var Ae=Z._getSoundIds(),Re=Ae.indexOf(_e[0]);Re>=0?Ee=parseInt(_e[0],10):Z._sounds.length&&(Ee=Z._sounds[0]._id,Se=parseFloat(_e[0]))}else _e.length===2&&(Se=parseFloat(_e[0]),Ee=parseInt(_e[1],10));if(typeof Ee>"u")return 0;if(typeof Se=="number"&&(Z._state!=="loaded"||Z._playLock))return Z._queue.push({event:"seek",action:function(){Z.seek.apply(Z,_e)}}),Z;var Te=Z._soundById(Ee);if(Te)if(typeof Se=="number"&&Se>=0){var we=Z.playing(Ee);we&&Z.pause(Ee,!0),Te._seek=Se,Te._ended=!1,Z._clearTimer(Ee),!Z._webAudio&&Te._node&&!isNaN(Te._node.duration)&&(Te._node.currentTime=Se);var Pe=function(){we&&Z.play(Ee,!0),Z._emit("seek",Ee)};if(we&&!Z._webAudio){var Ie=function(){Z._playLock?setTimeout(Ie,0):Pe()};setTimeout(Ie,0)}else Pe()}else if(Z._webAudio){var Fe=Z.playing(Ee)?I.ctx.currentTime-Te._playStart:0,Oe=Te._rateSeek?Te._rateSeek-Te._seek:0;return Te._seek+(Oe+Fe*Math.abs(Te._rate))}else return Te._node.currentTime;return Z},playing:function(Z){var _e=this;if(typeof Z=="number"){var Se=_e._soundById(Z);return Se?!Se._paused:!1}for(var Ee=0;Ee<_e._sounds.length;Ee++)if(!_e._sounds[Ee]._paused)return!0;return!1},duration:function(Z){var _e=this,Se=_e._duration,Ee=_e._soundById(Z);return Ee&&(Se=_e._sprite[Ee._sprite][1]/1e3),Se},state:function(){return this._state},unload:function(){for(var Z=this,_e=Z._sounds,Se=0;Se<_e.length;Se++)_e[Se]._paused||Z.stop(_e[Se]._id),Z._webAudio||(Z._clearSound(_e[Se]._node),_e[Se]._node.removeEventListener("error",_e[Se]._errorFn,!1),_e[Se]._node.removeEventListener(I._canPlayEvent,_e[Se]._loadFn,!1),_e[Se]._node.removeEventListener("ended",_e[Se]._endFn,!1),I._releaseHtml5Audio(_e[Se]._node)),delete _e[Se]._node,Z._clearTimer(_e[Se]._id);var Ee=I._howls.indexOf(Z);Ee>=0&&I._howls.splice(Ee,1);var Ae=!0;for(Se=0;Se<I._howls.length;Se++)if(I._howls[Se]._src===Z._src||Z._src.indexOf(I._howls[Se]._src)>=0){Ae=!1;break}return V&&Ae&&delete V[Z._src],I.noAudio=!1,Z._state="unloaded",Z._sounds=[],Z=null,null},on:function(Z,_e,Se,Ee){var Ae=this,Re=Ae["_on"+Z];return typeof _e=="function"&&Re.push(Ee?{id:Se,fn:_e,once:Ee}:{id:Se,fn:_e}),Ae},off:function(Z,_e,Se){var Ee=this,Ae=Ee["_on"+Z],Re=0;if(typeof _e=="number"&&(Se=_e,_e=null),_e||Se)for(Re=0;Re<Ae.length;Re++){var Te=Se===Ae[Re].id;if(_e===Ae[Re].fn&&Te||!_e&&Te){Ae.splice(Re,1);break}}else if(Z)Ee["_on"+Z]=[];else{var we=Object.keys(Ee);for(Re=0;Re<we.length;Re++)we[Re].indexOf("_on")===0&&Array.isArray(Ee[we[Re]])&&(Ee[we[Re]]=[])}return Ee},once:function(Z,_e,Se){var Ee=this;return Ee.on(Z,_e,Se,1),Ee},_emit:function(Z,_e,Se){for(var Ee=this,Ae=Ee["_on"+Z],Re=Ae.length-1;Re>=0;Re--)(!Ae[Re].id||Ae[Re].id===_e||Z==="load")&&(setTimeout((function(Te){Te.call(this,_e,Se)}).bind(Ee,Ae[Re].fn),0),Ae[Re].once&&Ee.off(Z,Ae[Re].fn,Ae[Re].id));return Ee._loadQueue(Z),Ee},_loadQueue:function(Z){var _e=this;if(_e._queue.length>0){var Se=_e._queue[0];Se.event===Z&&(_e._queue.shift(),_e._loadQueue()),Z||Se.action()}return _e},_ended:function(Z){var _e=this,Se=Z._sprite;if(!_e._webAudio&&Z._node&&!Z._node.paused&&!Z._node.ended&&Z._node.currentTime<Z._stop)return setTimeout(_e._ended.bind(_e,Z),100),_e;var Ee=!!(Z._loop||_e._sprite[Se][2]);if(_e._emit("end",Z._id),!_e._webAudio&&Ee&&_e.stop(Z._id,!0).play(Z._id),_e._webAudio&&Ee){_e._emit("play",Z._id),Z._seek=Z._start||0,Z._rateSeek=0,Z._playStart=I.ctx.currentTime;var Ae=(Z._stop-Z._start)*1e3/Math.abs(Z._rate);_e._endTimers[Z._id]=setTimeout(_e._ended.bind(_e,Z),Ae)}return _e._webAudio&&!Ee&&(Z._paused=!0,Z._ended=!0,Z._seek=Z._start||0,Z._rateSeek=0,_e._clearTimer(Z._id),_e._cleanBuffer(Z._node),I._autoSuspend()),!_e._webAudio&&!Ee&&_e.stop(Z._id,!0),_e},_clearTimer:function(Z){var _e=this;if(_e._endTimers[Z]){if(typeof _e._endTimers[Z]!="function")clearTimeout(_e._endTimers[Z]);else{var Se=_e._soundById(Z);Se&&Se._node&&Se._node.removeEventListener("ended",_e._endTimers[Z],!1)}delete _e._endTimers[Z]}return _e},_soundById:function(Z){for(var _e=this,Se=0;Se<_e._sounds.length;Se++)if(Z===_e._sounds[Se]._id)return _e._sounds[Se];return null},_inactiveSound:function(){var Z=this;Z._drain();for(var _e=0;_e<Z._sounds.length;_e++)if(Z._sounds[_e]._ended)return Z._sounds[_e].reset();return new U(Z)},_drain:function(){var Z=this,_e=Z._pool,Se=0,Ee=0;if(!(Z._sounds.length<_e)){for(Ee=0;Ee<Z._sounds.length;Ee++)Z._sounds[Ee]._ended&&Se++;for(Ee=Z._sounds.length-1;Ee>=0;Ee--){if(Se<=_e)return;Z._sounds[Ee]._ended&&(Z._webAudio&&Z._sounds[Ee]._node&&Z._sounds[Ee]._node.disconnect(0),Z._sounds.splice(Ee,1),Se--)}}},_getSoundIds:function(Z){var _e=this;if(typeof Z>"u"){for(var Se=[],Ee=0;Ee<_e._sounds.length;Ee++)Se.push(_e._sounds[Ee]._id);return Se}else return[Z]},_refreshBuffer:function(Z){var _e=this;return Z._node.bufferSource=I.ctx.createBufferSource(),Z._node.bufferSource.buffer=V[_e._src],Z._panner?Z._node.bufferSource.connect(Z._panner):Z._node.bufferSource.connect(Z._node),Z._node.bufferSource.loop=Z._loop,Z._loop&&(Z._node.bufferSource.loopStart=Z._start||0,Z._node.bufferSource.loopEnd=Z._stop||0),Z._node.bufferSource.playbackRate.setValueAtTime(Z._rate,I.ctx.currentTime),_e},_cleanBuffer:function(Z){var _e=this,Se=I._navigator&&I._navigator.vendor.indexOf("Apple")>=0;if(I._scratchBuffer&&Z.bufferSource&&(Z.bufferSource.onended=null,Z.bufferSource.disconnect(0),Se))try{Z.bufferSource.buffer=I._scratchBuffer}catch{}return Z.bufferSource=null,_e},_clearSound:function(Z){var _e=/MSIE |Trident\//.test(I._navigator&&I._navigator.userAgent);_e||(Z.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA")}};var U=function(Z){this._parent=Z,this.init()};U.prototype={init:function(){var Z=this,_e=Z._parent;return Z._muted=_e._muted,Z._loop=_e._loop,Z._volume=_e._volume,Z._rate=_e._rate,Z._seek=0,Z._paused=!0,Z._ended=!0,Z._sprite="__default",Z._id=++I._counter,_e._sounds.push(Z),Z.create(),Z},create:function(){var Z=this,_e=Z._parent,Se=I._muted||Z._muted||Z._parent._muted?0:Z._volume;return _e._webAudio?(Z._node=typeof I.ctx.createGain>"u"?I.ctx.createGainNode():I.ctx.createGain(),Z._node.gain.setValueAtTime(Se,I.ctx.currentTime),Z._node.paused=!0,Z._node.connect(I.masterGain)):I.noAudio||(Z._node=I._obtainHtml5Audio(),Z._errorFn=Z._errorListener.bind(Z),Z._node.addEventListener("error",Z._errorFn,!1),Z._loadFn=Z._loadListener.bind(Z),Z._node.addEventListener(I._canPlayEvent,Z._loadFn,!1),Z._endFn=Z._endListener.bind(Z),Z._node.addEventListener("ended",Z._endFn,!1),Z._node.src=_e._src,Z._node.preload=_e._preload===!0?"auto":_e._preload,Z._node.volume=Se*I.volume(),Z._node.load()),Z},reset:function(){var Z=this,_e=Z._parent;return Z._muted=_e._muted,Z._loop=_e._loop,Z._volume=_e._volume,Z._rate=_e._rate,Z._seek=0,Z._rateSeek=0,Z._paused=!0,Z._ended=!0,Z._sprite="__default",Z._id=++I._counter,Z},_errorListener:function(){var Z=this;Z._parent._emit("loaderror",Z._id,Z._node.error?Z._node.error.code:0),Z._node.removeEventListener("error",Z._errorFn,!1)},_loadListener:function(){var Z=this,_e=Z._parent;_e._duration=Math.ceil(Z._node.duration*10)/10,Object.keys(_e._sprite).length===0&&(_e._sprite={__default:[0,_e._duration*1e3]}),_e._state!=="loaded"&&(_e._state="loaded",_e._emit("load"),_e._loadQueue()),Z._node.removeEventListener(I._canPlayEvent,Z._loadFn,!1)},_endListener:function(){var Z=this,_e=Z._parent;_e._duration===1/0&&(_e._duration=Math.ceil(Z._node.duration*10)/10,_e._sprite.__default[1]===1/0&&(_e._sprite.__default[1]=_e._duration*1e3),_e._ended(Z)),Z._node.removeEventListener("ended",Z._endFn,!1)}};var V={},X=function(Z){var _e=Z._src;if(V[_e]){Z._duration=V[_e].duration,J(Z);return}if(/^data:[^;]+;base64,/.test(_e)){for(var Se=atob(_e.split(",")[1]),Ee=new Uint8Array(Se.length),Ae=0;Ae<Se.length;++Ae)Ee[Ae]=Se.charCodeAt(Ae);K(Ee.buffer,Z)}else{var Re=new XMLHttpRequest;Re.open(Z._xhr.method,_e,!0),Re.withCredentials=Z._xhr.withCredentials,Re.responseType="arraybuffer",Z._xhr.headers&&Object.keys(Z._xhr.headers).forEach(function(Te){Re.setRequestHeader(Te,Z._xhr.headers[Te])}),Re.onload=function(){var Te=(Re.status+"")[0];if(Te!=="0"&&Te!=="2"&&Te!=="3"){Z._emit("loaderror",null,"Failed loading audio file with status: "+Re.status+".");return}K(Re.response,Z)},Re.onerror=function(){Z._webAudio&&(Z._html5=!0,Z._webAudio=!1,Z._sounds=[],delete V[_e],Z.load())},Y(Re)}},Y=function(Z){try{Z.send()}catch{Z.onerror()}},K=function(Z,_e){var Se=function(){_e._emit("loaderror",null,"Decoding audio data failed.")},Ee=function(Ae){Ae&&_e._sounds.length>0?(V[_e._src]=Ae,J(_e,Ae)):Se()};typeof Promise<"u"&&I.ctx.decodeAudioData.length===1?I.ctx.decodeAudioData(Z).then(Ee).catch(Se):I.ctx.decodeAudioData(Z,Ee,Se)},J=function(Z,_e){_e&&!Z._duration&&(Z._duration=_e.duration),Object.keys(Z._sprite).length===0&&(Z._sprite={__default:[0,Z._duration*1e3]}),Z._state!=="loaded"&&(Z._state="loaded",Z._emit("load"),Z._loadQueue())},xe=function(){if(I.usingWebAudio){try{typeof AudioContext<"u"?I.ctx=new AudioContext:typeof webkitAudioContext<"u"?I.ctx=new webkitAudioContext:I.usingWebAudio=!1}catch{I.usingWebAudio=!1}I.ctx||(I.usingWebAudio=!1);var Z=/iP(hone|od|ad)/.test(I._navigator&&I._navigator.platform),_e=I._navigator&&I._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),Se=_e?parseInt(_e[1],10):null;if(Z&&Se&&Se<9){var Ee=/safari/.test(I._navigator&&I._navigator.userAgent.toLowerCase());I._navigator&&!Ee&&(I.usingWebAudio=!1)}I.usingWebAudio&&(I.masterGain=typeof I.ctx.createGain>"u"?I.ctx.createGainNode():I.ctx.createGain(),I.masterGain.gain.setValueAtTime(I._muted?0:I._volume,I.ctx.currentTime),I.masterGain.connect(I.ctx.destination)),I._setup()}};C.Howler=I,C.Howl=B,typeof commonjsGlobal$1<"u"?(commonjsGlobal$1.HowlerGlobal=E,commonjsGlobal$1.Howler=I,commonjsGlobal$1.Howl=B,commonjsGlobal$1.Sound=U):typeof window<"u"&&(window.HowlerGlobal=E,window.Howler=I,window.Howl=B,window.Sound=U)})();/*!
1943
1981
  * Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
1944
1982
  *
1945
1983
  * howler.js v2.2.3
@@ -1949,30 +1987,19 @@ void main() {
1949
1987
  * goldfirestudios.com
1950
1988
  *
1951
1989
  * 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;dt(et.PAUSE,()=>{var N;n.current&&u.current&&((N=u.current)==null||N.pause(),i.current.isPlaying=!1)}),dt(et.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,U;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&&((U=l.current)!=null&&U.isActive())&&u.current&&(u.current.seek(L),u.current.play(),i.current.isPlaying=!0)},O=()=>{};return q.useEffect(()=>{let N=ut.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=ut.context(()=>{a.current=ut.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(),ut.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(Je.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,U,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,U,j;for(O=N=L=k=U=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[U++]=I[k],b++}for(b=U;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(Je.AnimatedSprite,{ref:n,...r,isPlaying:t})},vg=ie.memo(GM);var Wa={exports:{}};/**
1953
- * @license
1954
- * Lodash <https://lodash.com/>
1955
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1956
- * Released under MIT license <https://lodash.com/license>
1957
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1958
- * 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,U=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",U],["partial",O],["partialRight",N],["rearg",k]],Pe="[object Arguments]",Oe="[object Array]",ze="[object AsyncFunction]",He="[object Boolean]",Ke="[object Date]",Q="[object DOMException]",W="[object Error]",ae="[object Function]",Ee="[object GeneratorFunction]",Ce="[object Map]",Ze="[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,Qe={};Qe[Ul]=Qe[$l]=Qe[Gl]=Qe[zl]=Qe[Hl]=Qe[Vl]=Qe[Xl]=Qe[jl]=Qe[Wl]=!0,Qe[Pe]=Qe[Oe]=Qe[_s]=Qe[He]=Qe[Si]=Qe[Ke]=Qe[W]=Qe[ae]=Qe[Ce]=Qe[Ze]=Qe[Ot]=Qe[Ai]=Qe[vr]=Qe[ms]=Qe[vs]=!1;var qe={};qe[Pe]=qe[Oe]=qe[_s]=qe[Si]=qe[He]=qe[Ke]=qe[Ul]=qe[$l]=qe[Gl]=qe[zl]=qe[Hl]=qe[Ce]=qe[Ze]=qe[Ot]=qe[Ai]=qe[vr]=qe[ms]=qe[Ya]=qe[Vl]=qe[Xl]=qe[jl]=qe[Wl]=!0,qe[W]=qe[ae]=qe[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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vF={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},_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 gt=P[fe];B(J,gt,F(gt),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 gt=P[F];B(gt,F,P)&&(Be[fe++]=gt)}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,gt){if(B(fe,Be,gt))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,gt,je){F=J?(J=!1,Be):B(F,Be,gt,je)}),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 gt=P[F];(gt===B||gt===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,gt=B.Math,je=B.Object,fc=B.RegExp,jF=B.String,Qt=B.TypeError,ro=F.prototype,WF=Be.prototype,Mi=je.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(je),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(je.getPrototypeOf,je),pm=je.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(je,"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=gt.ceil,fo=gt.floor,dc=je.getOwnPropertySymbols,t3=ao?ao.isBuffer:r,vm=B.isFinite,r3=ro.join,n3=cm(je.keys,je),mt=gt.max,It=gt.min,i3=J.now,s3=B.parseInt,_m=gt.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(je,"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(ot(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,$=this.__iteratees__,G=$.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=$[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 $=de(s);if($){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(!qe[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=$?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=je(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 $=s[y],G=h==null?$:h($);if($=g||$!==0?$:0,C&&G===G){for(var Y=D;Y--;)if(o[Y]===G)continue e;M.push($)}else A(o,G,g)||M.push($)}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 je(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 je(s)}function j3(s,o,h){return s>=It(o,h)&&s<mt(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 $=s[C];C&&o&&($=rt($,Ht(o))),M=It($.length,M),R[C]=!h&&(o||y>=120&&$.length>=120)?new Bn(C&&$):r}$=s[0];var G=-1,Y=R[0];e:for(;++G<y&&D.length<M;){var te=$[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 ot(s)&&Ft(s)==Pe}function q3(s){return ot(s)&&Ft(s)==_s}function Y3(s){return ot(s)&&Ft(s)==Ke}function Is(s,o,h,g,y){return s===o?!0:s==null||o==null||!ot(s)&&!ot(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 $=M==Ot,G=D==Ot,Y=M==D;if(Y&&dn(s)){if(!dn(o))return!1;C=!0,$=!1}if(Y&&!$)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=$&&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 ot(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=je(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],$=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,$,M,s,o,G);if(!(Y===r?Is($,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 ot(s)&&Ft(s)==Ai}function J3(s){return ot(s)&&Rt(s)==vr}function eN(s){return ot(s)&&ko(s.length)&&!!Qe[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 je(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 $=A?A(R,M,h+"",s,o,C):r,G=$===r;if(G){var Y=de(M),te=!Y&&dn(M),ue=!Y&&!te&&Di(M);$=M,Y||te||ue?de(R)?$=R:ct(R)?$=kt(R):te?(G=!1,$=jm(M,!0)):ue?(G=!1,$=Wm(M,!0)):$=[]:Fs(M)||zn(M)?($=R,zn(R)?$=H0(R):(!at(R)||Wr(R))&&($=h0(M))):G=!1}G&&(C.set(M,$),y($,M,g,A,C),C.delete(M)),mc(s,h,$)}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],$=h?h(D):D;(M=y(R,$,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=mt(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 $=R[M];D=g?g($,M,R):r,D===r&&(D=at($)?$: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 $=fo((y+A)/2),G=h(s[$]),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=$+1:A=$}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 $=s[g],G=o?o($):$;if($=h||$!==0?$:0,C&&G===G){for(var Y=M.length;Y--;)if(M[Y]===G)continue e;o&&M.push(G),R.push($)}else y(M,G,h)||(M!==R&&M.push(G),R.push($))}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?je(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=mt(A-C,0),$=F(M+D),G=!g;++R<M;)$[R]=o[R];for(;++y<C;)(G||y<A)&&($[h[y]]=s[y]);for(;D--;)$[R++]=s[y++];return $}function Km(s,o,h,g){for(var y=-1,A=s.length,C=-1,R=h.length,M=-1,D=o.length,$=mt(A-R,0),G=F($+D),Y=!g;++y<$;)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=je(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=je(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=je(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 $=this&&this!==Tt&&this instanceof y?g:s;return zt($,this,C)}return y}function e0(s){return function(o,h,g){var y=je(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,$=D[0];if(C&&D.length==1&&de($))return C.plant($).value();for(var G=0,Y=h?o[G].apply(this,D):$;++G<h;)Y=o[G].call(this,Y);return Y}})}function Ao(s,o,h,g,y,A,C,R,M,D){var $=o&L,G=o&w,Y=o&x,te=o&(S|I),ue=o&U,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(),$&&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,$=g.length,G=F($+M),Y=this&&this!==Tt&&this instanceof C?A:s;++D<$;)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 $=o&S,G=$?C:r,Y=$?r:C,te=$?A:r,ue=$?r:A;o|=$?O:N,o&=~($?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=gt[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:mt(pe(C),0),R=R===r?R:pe(R),D-=y?y.length:0,o&N){var $=g,G=y;g=y=r}var Y=M?r:Dc(s),te=[s,o,h,g,y,$,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:mt(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),$=A.get(o);if(D&&$)return D==o&&$==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 Ke:case Ze: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 $=u0(R(s),R(o),g,y,A,C);return C.delete(s),$;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),$=D.length;if(M!=$&&!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=je(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=mt(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 Ke: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 Ze: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,`{
1960
- /* [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 je(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 je(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 je(s))o.push(h);return o}function DN(s){return so.call(s)}function p0(s,o,h){return o=mt(o===r?s.length-1:o,0),function(){for(var g=arguments,y=-1,A=mt(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=mt(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=mt(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?mt(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=mt(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?mt(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=mt(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=mt(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,$=!1,G=!1,Y=!0;if(typeof s!="function")throw new Qt(u);o=nr(o)||0,at(h)&&($=!!h.leading,G="maxWait"in h,A=G?mt(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),$?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,U)}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:mt(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 ot(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 ot(s)&&Bt(s)}function Gk(s){return s===!0||s===!1||ot(s)&&Ft(s)==He}var dn=t3||sh,zk=Zg?Ht(Zg):Y3;function Hk(s){return ot(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(!ot(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 ot(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"||ot(s)&&Ft(s)==Ze}function Fs(s){if(!ot(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)&&ot(s)&&Ft(s)==ms}function Xt(s){return typeof s=="symbol"||ot(s)&&Ft(s)==Ya}var Di=tm?Ht(tm):eN;function tB(s){return s===r}function rB(s){return ot(s)&&Rt(s)==vs}function nB(s){return ot(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=je(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],$=s[D];($===r||xr($,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,$=o.interpolate||Ka,G="__p += '",Y=fc((o.escape||Ka).source+"|"+$.source+"|"+($===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(Y,function(le,we,Ie,jt,Lt,Wt){return Ie||(Ie=jt),G+=s.slice(D,Wt).replace(XO,NF),we&&(R=!0,G+=`' +
1963
- __e(`+we+`) +
1964
- '`),Lt&&(M=!0,G+=`';
1965
- `+Lt+`;
1966
- __p += '`),Ie&&(G+=`' +
1967
- ((__t = (`+Ie+`)) == null ? '' : __t) +
1968
- '`),D=Wt+le.length,le}),G+=`';
1969
- `;var ue=Ge.call(o,"variable")&&o.variable;if(!ue)G=`with (obj) {
1970
- `+G+`
1971
- }
1972
- `;else if(kO.test(ue))throw new fe(l);G=(M?G.replace(xO,""):G).replace(bO,"$1").replace(wO,"$1;"),G="function("+(ue||"obj")+`) {
1973
- `+(ue?"":`obj || (obj = {});
1974
- `)+"var __t, __p = ''"+(R?", __e = _.escape":"")+(M?`, __j = Array.prototype.join;
1975
- function print() { __p += __j.call(arguments, '') }
1976
- `:`;
1977
- `)+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,$=M;for(y.global||(y=fc(y.source,Ue(Rg.exec(y))+"g")),y.lastIndex=0;D=y.exec($);)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 $=s(this.__wrapped__),G=$.__actions__=kt(this.__actions__);return G.push({func:M,args:arguments,thisArg:s}),$.__chain__=D,$}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=ot,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:mt(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],$=M||de(C),G=function(we){var Ie=y.apply(T,an([we],R));return g&&Y?Ie[0]:Ie};$&&h&&typeof D=="function"&&D.length!=1&&(M=$=!1);var Y=this.__chain__,te=!!this.__actions__.length,ue=A&&!Y,me=M&&!te;if(!A&&$){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:U=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),dt(et.PAUSE,()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)}),dt(et.SEEK_END,()=>{v.current&&(v.current.stop(),d.current.isPlaying=!1)}),dt(et.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:Ze,height:gr}=Ee,Ot=new Uint8Array(Ce);return Fr.Texture.fromBuffer(Ot,Ze,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)},Ke=()=>{l(!0)};return q.useEffect(()=>{let Q=ut.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=ut.context(()=>{m.current=ut.from(c.current,W,O),_.current.add(m.current,S)})}return()=>{m.current&&(m.current.kill(),ut.killTweensOf(m.current)),Q.revert()}},[X,S,I,O,N]),Fe.jsx(Wn,{...t,ref:e,ignoreTlForVideo:!0,isGif:!0,children:Fe.jsx(Je.Container,{ref:c,children:r&&r.length>0&&Fe.jsx(vg,{x:ee,y:se,width:U,height:j,animationSpeed:1,alpha:k?1:0,loop:L,textures:a,onComplete:Ke,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:U=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(U),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,U,N,x,I,S,ve,xe,Oe,Pe,ze,ee,L,k,H,se,X]);ie.useEffect(()=>{f.current={...d}},[d]);const Ke=()=>{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(Je.Container,{ref:n,children:Fe.jsx(Je.Container,{alpha:1,ref:u,children:Fe.jsx(Je.Text,{style:He,x:b,y:w,anchor:.5,text:v,alpha:p?1:0,...p&&!c&&{interactive:!0,buttonMode:!0,pointerdown:Ke},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,U=e-L;return c?hO(U,a-k):U}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:U=()=>{},pointerout:j=()=>{},pointerover:ee=()=>{}}=t,{tl:se,dragModeRef:X}=q.useContext(gn),{onPointerDown:H,onPointerOut:ve,onPointerOver:ke}=pO(ee,U,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]);dt(et.PAUSE,()=>{f.current&&(f.current.pause(),p.current.isPlaying=!1)}),dt(et.SCRUBBER_CLICKED,()=>{f.current&&(f.current.pause(),p.current.isPlaying=!1)}),dt(et.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=()=>{},Ke=()=>{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,Ze=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):(Ze!==p.current.isPlaying||!Ze)&&p.current.progress>.01&&p.current.progress<.99?(W=se.current)!=null&&W.isActive()&&v.current&&v.current.isActive()&&(Ze||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=ut.context(()=>{});if(l.current&&se.current){const W={duration:Number(x)-Number(w),onStart:Oe,onComplete:ze,onStartParams:[w,x],onCompleteParams:[],onInterrupt:He,onUpdate:Ke,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=ut.context(()=>{v.current=ut.from(l.current,W,w),se.current.add(v.current,_)})}return()=>{v.current&&(v.current.kill(),ut.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},Ze=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",Ze))}),()=>{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",Ze))}},[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(Je.Container,{ref:l,children:i&&Fe.jsx(Je.Sprite,{texture:i,width:O,height:N,anchor:.5,x:S,y:I,ref:u,alpha:E?1:0,...E&&{interactive:!0,pointerdown:U},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,a]=ie.useState(!1),u=q.useRef(null),l=q.useRef(null),f=q.useRef(null),p=q.useRef(null),v=q.useRef(null),c=q.useRef(!1),d=q.useRef(!1),{tl:m,totalDuration:_=0,reverseModeRef:b}=q.useContext(gn);dt(et.REVERSE_MODE_END,()=>{console.log("pixiSequence.tsx REVERSE_MODE_END",n)});const w=()=>{c.current||(c.current=!0,a(!0))},x=()=>{a(!1),c.current=!1},E=()=>{if(b.current&&p.current&&m.current){d.current=!0;const I=m.current.time();I>e&&I<r?(a(()=>!0),c.current=!0,l.current&&(l.current.alpha=1)):(a(()=>!1),c.current=!1,l.current&&(l.current.alpha=0))}},S=I=>{I<.2?(a(!0),c.current=!0):(a(!1),c.current=!1)};return ie.useEffect(()=>{const I={onStart:w,onStartParams:[{alpha:1}]},O={onComplete:x,onCompleteParams:[{alpha:e>0?0:1}]},N=Math.max(0,e-1),L=ut.context(()=>{if(u.current&&m.current){const k=ut.from(u.current,{alpha:e<.2?1:0,duration:.5,...I});m.current.add(k,N),m.current.to(u.current,{alpha:0,duration:.5,overwrite:"auto",...O},r-.5),e<.2&&(a(!0),c.current=!0),p.current=ut.to(f.current,{alpha:1,overwrite:"auto",duration:Number(r)-Number(e),onStart:w,onStartParams:[{alpha:1}],onUpdate:E,onComplete:x,onCompleteParams:[{alpha:e>0?0:1}]},e),m.current.add(p.current,e),_>.2&&m.current.call(S,[e],_-.3)}});return()=>{var k;(k=p.current)==null||k.kill(),L.revert()}},[e,r,_]),ie.useEffect(()=>{c.current=i;const I=ut.context(()=>{l.current&&m.current&&(v.current&&v.current.kill(),v.current=ut.to(l.current,{alpha:1,duration:.5,overwrite:"auto"}),m.current.add(v.current,e))}),O=setTimeout(()=>{var N,L,k,U;if(v.current&&m.current&&p.current&&!((N=v.current)!=null&&N.isActive())&&((L=v.current)==null?void 0:L.time())<.2){const j=(k=p.current)==null?void 0:k.time();(U=v.current)==null||U.time(j)}},50);return()=>{v.current&&v.current.kill(),I.revert(),clearInterval(O)}},[i,e]),console.log("acitve",n,i,e,r),Fe.jsx(Je.Container,{ref:u,alpha:1,children:Fe.jsx(Je.Container,{ref:f,children:i&&Fe.jsx(Je.Container,{ref:l,alpha:e<.2?1:0,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=et,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=dt,Object.defineProperty(Ve,Symbol.toStringTag,{value:"Module"})});
1990
+ */(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(I){var B=this;if(!B.ctx||!B.ctx.listener)return B;for(var U=B._howls.length-1;U>=0;U--)B._howls[U].stereo(I);return B},HowlerGlobal.prototype.pos=function(I,B,U){var V=this;if(!V.ctx||!V.ctx.listener)return V;if(B=typeof B!="number"?V._pos[1]:B,U=typeof U!="number"?V._pos[2]:U,typeof I=="number")V._pos=[I,B,U],typeof V.ctx.listener.positionX<"u"?(V.ctx.listener.positionX.setTargetAtTime(V._pos[0],Howler.ctx.currentTime,.1),V.ctx.listener.positionY.setTargetAtTime(V._pos[1],Howler.ctx.currentTime,.1),V.ctx.listener.positionZ.setTargetAtTime(V._pos[2],Howler.ctx.currentTime,.1)):V.ctx.listener.setPosition(V._pos[0],V._pos[1],V._pos[2]);else return V._pos;return V},HowlerGlobal.prototype.orientation=function(I,B,U,V,X,Y){var K=this;if(!K.ctx||!K.ctx.listener)return K;var J=K._orientation;if(B=typeof B!="number"?J[1]:B,U=typeof U!="number"?J[2]:U,V=typeof V!="number"?J[3]:V,X=typeof X!="number"?J[4]:X,Y=typeof Y!="number"?J[5]:Y,typeof I=="number")K._orientation=[I,B,U,V,X,Y],typeof K.ctx.listener.forwardX<"u"?(K.ctx.listener.forwardX.setTargetAtTime(I,Howler.ctx.currentTime,.1),K.ctx.listener.forwardY.setTargetAtTime(B,Howler.ctx.currentTime,.1),K.ctx.listener.forwardZ.setTargetAtTime(U,Howler.ctx.currentTime,.1),K.ctx.listener.upX.setTargetAtTime(V,Howler.ctx.currentTime,.1),K.ctx.listener.upY.setTargetAtTime(X,Howler.ctx.currentTime,.1),K.ctx.listener.upZ.setTargetAtTime(Y,Howler.ctx.currentTime,.1)):K.ctx.listener.setOrientation(I,B,U,V,X,Y);else return J;return K},Howl.prototype.init=function(I){return function(B){var U=this;return U._orientation=B.orientation||[1,0,0],U._stereo=B.stereo||null,U._pos=B.pos||null,U._pannerAttr={coneInnerAngle:typeof B.coneInnerAngle<"u"?B.coneInnerAngle:360,coneOuterAngle:typeof B.coneOuterAngle<"u"?B.coneOuterAngle:360,coneOuterGain:typeof B.coneOuterGain<"u"?B.coneOuterGain:0,distanceModel:typeof B.distanceModel<"u"?B.distanceModel:"inverse",maxDistance:typeof B.maxDistance<"u"?B.maxDistance:1e4,panningModel:typeof B.panningModel<"u"?B.panningModel:"HRTF",refDistance:typeof B.refDistance<"u"?B.refDistance:1,rolloffFactor:typeof B.rolloffFactor<"u"?B.rolloffFactor:1},U._onstereo=B.onstereo?[{fn:B.onstereo}]:[],U._onpos=B.onpos?[{fn:B.onpos}]:[],U._onorientation=B.onorientation?[{fn:B.onorientation}]:[],I.call(this,B)}}(Howl.prototype.init),Howl.prototype.stereo=function(I,B){var U=this;if(!U._webAudio)return U;if(U._state!=="loaded")return U._queue.push({event:"stereo",action:function(){U.stereo(I,B)}}),U;var V=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof B>"u")if(typeof I=="number")U._stereo=I,U._pos=[I,0,0];else return U._stereo;for(var X=U._getSoundIds(B),Y=0;Y<X.length;Y++){var K=U._soundById(X[Y]);if(K)if(typeof I=="number")K._stereo=I,K._pos=[I,0,0],K._node&&(K._pannerAttr.panningModel="equalpower",(!K._panner||!K._panner.pan)&&E(K,V),V==="spatial"?typeof K._panner.positionX<"u"?(K._panner.positionX.setValueAtTime(I,Howler.ctx.currentTime),K._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),K._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):K._panner.setPosition(I,0,0):K._panner.pan.setValueAtTime(I,Howler.ctx.currentTime)),U._emit("stereo",K._id);else return K._stereo}return U},Howl.prototype.pos=function(I,B,U,V){var X=this;if(!X._webAudio)return X;if(X._state!=="loaded")return X._queue.push({event:"pos",action:function(){X.pos(I,B,U,V)}}),X;if(B=typeof B!="number"?0:B,U=typeof U!="number"?-.5:U,typeof V>"u")if(typeof I=="number")X._pos=[I,B,U];else return X._pos;for(var Y=X._getSoundIds(V),K=0;K<Y.length;K++){var J=X._soundById(Y[K]);if(J)if(typeof I=="number")J._pos=[I,B,U],J._node&&((!J._panner||J._panner.pan)&&E(J,"spatial"),typeof J._panner.positionX<"u"?(J._panner.positionX.setValueAtTime(I,Howler.ctx.currentTime),J._panner.positionY.setValueAtTime(B,Howler.ctx.currentTime),J._panner.positionZ.setValueAtTime(U,Howler.ctx.currentTime)):J._panner.setPosition(I,B,U)),X._emit("pos",J._id);else return J._pos}return X},Howl.prototype.orientation=function(I,B,U,V){var X=this;if(!X._webAudio)return X;if(X._state!=="loaded")return X._queue.push({event:"orientation",action:function(){X.orientation(I,B,U,V)}}),X;if(B=typeof B!="number"?X._orientation[1]:B,U=typeof U!="number"?X._orientation[2]:U,typeof V>"u")if(typeof I=="number")X._orientation=[I,B,U];else return X._orientation;for(var Y=X._getSoundIds(V),K=0;K<Y.length;K++){var J=X._soundById(Y[K]);if(J)if(typeof I=="number")J._orientation=[I,B,U],J._node&&(J._panner||(J._pos||(J._pos=X._pos||[0,0,-.5]),E(J,"spatial")),typeof J._panner.orientationX<"u"?(J._panner.orientationX.setValueAtTime(I,Howler.ctx.currentTime),J._panner.orientationY.setValueAtTime(B,Howler.ctx.currentTime),J._panner.orientationZ.setValueAtTime(U,Howler.ctx.currentTime)):J._panner.setOrientation(I,B,U)),X._emit("orientation",J._id);else return J._orientation}return X},Howl.prototype.pannerAttr=function(){var I=this,B=arguments,U,V,X;if(!I._webAudio)return I;if(B.length===0)return I._pannerAttr;if(B.length===1)if(typeof B[0]=="object")U=B[0],typeof V>"u"&&(U.pannerAttr||(U.pannerAttr={coneInnerAngle:U.coneInnerAngle,coneOuterAngle:U.coneOuterAngle,coneOuterGain:U.coneOuterGain,distanceModel:U.distanceModel,maxDistance:U.maxDistance,refDistance:U.refDistance,rolloffFactor:U.rolloffFactor,panningModel:U.panningModel}),I._pannerAttr={coneInnerAngle:typeof U.pannerAttr.coneInnerAngle<"u"?U.pannerAttr.coneInnerAngle:I._coneInnerAngle,coneOuterAngle:typeof U.pannerAttr.coneOuterAngle<"u"?U.pannerAttr.coneOuterAngle:I._coneOuterAngle,coneOuterGain:typeof U.pannerAttr.coneOuterGain<"u"?U.pannerAttr.coneOuterGain:I._coneOuterGain,distanceModel:typeof U.pannerAttr.distanceModel<"u"?U.pannerAttr.distanceModel:I._distanceModel,maxDistance:typeof U.pannerAttr.maxDistance<"u"?U.pannerAttr.maxDistance:I._maxDistance,refDistance:typeof U.pannerAttr.refDistance<"u"?U.pannerAttr.refDistance:I._refDistance,rolloffFactor:typeof U.pannerAttr.rolloffFactor<"u"?U.pannerAttr.rolloffFactor:I._rolloffFactor,panningModel:typeof U.pannerAttr.panningModel<"u"?U.pannerAttr.panningModel:I._panningModel});else return X=I._soundById(parseInt(B[0],10)),X?X._pannerAttr:I._pannerAttr;else B.length===2&&(U=B[0],V=parseInt(B[1],10));for(var Y=I._getSoundIds(V),K=0;K<Y.length;K++)if(X=I._soundById(Y[K]),X){var J=X._pannerAttr;J={coneInnerAngle:typeof U.coneInnerAngle<"u"?U.coneInnerAngle:J.coneInnerAngle,coneOuterAngle:typeof U.coneOuterAngle<"u"?U.coneOuterAngle:J.coneOuterAngle,coneOuterGain:typeof U.coneOuterGain<"u"?U.coneOuterGain:J.coneOuterGain,distanceModel:typeof U.distanceModel<"u"?U.distanceModel:J.distanceModel,maxDistance:typeof U.maxDistance<"u"?U.maxDistance:J.maxDistance,refDistance:typeof U.refDistance<"u"?U.refDistance:J.refDistance,rolloffFactor:typeof U.rolloffFactor<"u"?U.rolloffFactor:J.rolloffFactor,panningModel:typeof U.panningModel<"u"?U.panningModel:J.panningModel};var xe=X._panner;xe?(xe.coneInnerAngle=J.coneInnerAngle,xe.coneOuterAngle=J.coneOuterAngle,xe.coneOuterGain=J.coneOuterGain,xe.distanceModel=J.distanceModel,xe.maxDistance=J.maxDistance,xe.refDistance=J.refDistance,xe.rolloffFactor=J.rolloffFactor,xe.panningModel=J.panningModel):(X._pos||(X._pos=I._pos||[0,0,-.5]),E(X,"spatial"))}return I},Sound.prototype.init=function(I){return function(){var B=this,U=B._parent;B._orientation=U._orientation,B._stereo=U._stereo,B._pos=U._pos,B._pannerAttr=U._pannerAttr,I.call(this),B._stereo?U.stereo(B._stereo):B._pos&&U.pos(B._pos[0],B._pos[1],B._pos[2],B._id)}}(Sound.prototype.init),Sound.prototype.reset=function(I){return function(){var B=this,U=B._parent;return B._orientation=U._orientation,B._stereo=U._stereo,B._pos=U._pos,B._pannerAttr=U._pannerAttr,B._stereo?U.stereo(B._stereo):B._pos?U.pos(B._pos[0],B._pos[1],B._pos[2],B._id):B._panner&&(B._panner.disconnect(0),B._panner=void 0,U._refreshBuffer(B)),I.call(this)}}(Sound.prototype.reset);var E=function(I,B){B=B||"spatial",B==="spatial"?(I._panner=Howler.ctx.createPanner(),I._panner.coneInnerAngle=I._pannerAttr.coneInnerAngle,I._panner.coneOuterAngle=I._pannerAttr.coneOuterAngle,I._panner.coneOuterGain=I._pannerAttr.coneOuterGain,I._panner.distanceModel=I._pannerAttr.distanceModel,I._panner.maxDistance=I._pannerAttr.maxDistance,I._panner.refDistance=I._pannerAttr.refDistance,I._panner.rolloffFactor=I._pannerAttr.rolloffFactor,I._panner.panningModel=I._pannerAttr.panningModel,typeof I._panner.positionX<"u"?(I._panner.positionX.setValueAtTime(I._pos[0],Howler.ctx.currentTime),I._panner.positionY.setValueAtTime(I._pos[1],Howler.ctx.currentTime),I._panner.positionZ.setValueAtTime(I._pos[2],Howler.ctx.currentTime)):I._panner.setPosition(I._pos[0],I._pos[1],I._pos[2]),typeof I._panner.orientationX<"u"?(I._panner.orientationX.setValueAtTime(I._orientation[0],Howler.ctx.currentTime),I._panner.orientationY.setValueAtTime(I._orientation[1],Howler.ctx.currentTime),I._panner.orientationZ.setValueAtTime(I._orientation[2],Howler.ctx.currentTime)):I._panner.setOrientation(I._orientation[0],I._orientation[1],I._orientation[2])):(I._panner=Howler.ctx.createStereoPanner(),I._panner.pan.setValueAtTime(I._stereo,Howler.ctx.currentTime)),I._panner.connect(I._node),I._paused||I._parent.pause(I._id,!0).play(I._id,!0)}})()})(howler);/**!
1991
+ * audioMotion-analyzer
1992
+ * High-resolution real-time graphic audio spectrum analyzer JS module
1993
+ *
1994
+ * @version 4.3.0
1995
+ * @author Henrique Avila Vianna <hvianna@gmail.com> <https://henriquevianna.com>
1996
+ * @license AGPL-3.0-or-later
1997
+ */const VERSION="4.3.0",PI=Math.PI,TAU=2*PI,HALF_PI=PI/2,C_1=8.17579892,CHANNEL_COMBINED="dual-combined",CHANNEL_HORIZONTAL="dual-horizontal",CHANNEL_SINGLE="single",CHANNEL_VERTICAL="dual-vertical",COLOR_BAR_INDEX="bar-index",COLOR_BAR_LEVEL="bar-level",COLOR_GRADIENT="gradient",DEBOUNCE_TIMEOUT=60,EVENT_CLICK="click",EVENT_FULLSCREENCHANGE="fullscreenchange",EVENT_RESIZE="resize",GRADIENT_DEFAULT_BGCOLOR="#111",FILTER_NONE="",FILTER_A="A",FILTER_B="B",FILTER_C="C",FILTER_D="D",FILTER_468="468",FONT_FAMILY="sans-serif",FPS_COLOR="#0f0",LEDS_UNLIT_COLOR="#7f7f7f22",MODE_GRAPH=10,REASON_CREATE="create",REASON_FSCHANGE="fschange",REASON_LORES="lores",REASON_RESIZE=EVENT_RESIZE,REASON_USER="user",SCALEX_BACKGROUND_COLOR="#000c",SCALEX_LABEL_COLOR="#fff",SCALEX_HIGHLIGHT_COLOR="#4f4",SCALEY_LABEL_COLOR="#888",SCALEY_MIDLINE_COLOR="#555",SCALE_BARK="bark",SCALE_LINEAR="linear",SCALE_LOG="log",SCALE_MEL="mel",PRISM=["#a35","#c66","#e94","#ed0","#9d5","#4d8","#2cb","#0bc","#09c","#36b"],GRADIENTS=[["classic",{colorStops:["red",{color:"yellow",level:.85,pos:.6},{color:"lime",level:.475}]}],["prism",{colorStops:PRISM}],["rainbow",{dir:"h",colorStops:["#817",...PRISM,"#639"]}],["orangered",{bgColor:"#3e2f29",colorStops:["OrangeRed"]}],["steelblue",{bgColor:"#222c35",colorStops:["SteelBlue"]}]],ERR_AUDIO_CONTEXT_FAIL=["ERR_AUDIO_CONTEXT_FAIL","Could not create audio context. Web Audio API not supported?"],ERR_INVALID_AUDIO_CONTEXT=["ERR_INVALID_AUDIO_CONTEXT","Provided audio context is not valid"],ERR_UNKNOWN_GRADIENT=["ERR_UNKNOWN_GRADIENT","Unknown gradient"],ERR_FREQUENCY_TOO_LOW=["ERR_FREQUENCY_TOO_LOW","Frequency values must be >= 1"],ERR_INVALID_MODE=["ERR_INVALID_MODE","Invalid mode"],ERR_REFLEX_OUT_OF_RANGE=["ERR_REFLEX_OUT_OF_RANGE","Reflex ratio must be >= 0 and < 1"],ERR_INVALID_AUDIO_SOURCE=["ERR_INVALID_AUDIO_SOURCE","Audio source must be an instance of HTMLMediaElement or AudioNode"],ERR_GRADIENT_INVALID_NAME=["ERR_GRADIENT_INVALID_NAME","Gradient name must be a non-empty string"],ERR_GRADIENT_NOT_AN_OBJECT=["ERR_GRADIENT_NOT_AN_OBJECT","Gradient options must be an object"],ERR_GRADIENT_MISSING_COLOR=["ERR_GRADIENT_MISSING_COLOR","Gradient colorStops must be a non-empty array"];class AudioMotionError extends Error{constructor(E,I){const[B,U]=E;super(U+(I!==void 0?`: ${I}`:"")),this.name="AudioMotionError",this.code=B}}const deprecate=(C,E)=>console.warn(`${C} is deprecated. Use ${E} instead.`),validateFromList=(C,E,I="toLowerCase")=>E[Math.max(0,E.indexOf((""+C)[I]()))],findY=(C,E,I,B,U)=>E+(B-E)*(U-C)/(I-C);Array.prototype.findLastIndex||(Array.prototype.findLastIndex=function(C){let E=this.length;for(;E-- >0;)if(C(this[E]))return E;return-1});class AudioMotionAnalyzer{constructor(E,I={}){this._ready=!1,this._aux={},this._canvasGradients=[],this._destroyed=!1,this._energy={val:0,peak:0,hold:0},this._flg={},this._fps=0,this._gradients={},this._last=0,this._outNodes=[],this._ownContext=!1,this._selectedGrads=[],this._sources=[];for(const[Z,_e]of GRADIENTS)this.registerGradient(Z,_e);this._container=E||document.body,this._defaultWidth=this._container.clientWidth||640,this._defaultHeight=this._container.clientHeight||270;let B;if(!(I.source&&(B=I.source.context))){if(!(B=I.audioCtx))try{B=new(window.AudioContext||window.webkitAudioContext),this._ownContext=!0}catch{throw new AudioMotionError(ERR_AUDIO_CONTEXT_FAIL)}}if(!B.createGain)throw new AudioMotionError(ERR_INVALID_AUDIO_CONTEXT);const U=this._analyzer=[B.createAnalyser(),B.createAnalyser()],V=this._splitter=B.createChannelSplitter(2),X=this._merger=B.createChannelMerger(2);this._input=B.createGain(),this._output=B.createGain(),I.source&&this.connectInput(I.source);for(const Z of[0,1])V.connect(U[Z],Z);X.connect(this._output),I.connectSpeakers!==!1&&this.connectOutput();const Y=document.createElement("canvas");Y.style="max-width: 100%;",this._ctx=Y.getContext("2d");for(const Z of["_scaleX","_scaleR"])this[Z]=document.createElement("canvas").getContext("2d");this._fsEl=I.fsElement||Y;const K=()=>{this._fsTimeout||(this._fsTimeout=window.setTimeout(()=>{this._fsChanging||(this._setCanvas(REASON_RESIZE),this._fsTimeout=0)},DEBOUNCE_TIMEOUT))};window.ResizeObserver&&(this._observer=new ResizeObserver(K),this._observer.observe(this._container)),this._controller=new AbortController;const J=this._controller.signal;window.addEventListener(EVENT_RESIZE,K,{signal:J}),Y.addEventListener(EVENT_FULLSCREENCHANGE,()=>{this._fsChanging=!0,this._fsTimeout&&window.clearTimeout(this._fsTimeout),this._setCanvas(REASON_FSCHANGE),this._fsTimeout=window.setTimeout(()=>{this._fsChanging=!1,this._fsTimeout=0},DEBOUNCE_TIMEOUT)},{signal:J});const xe=()=>{B.state=="suspended"&&B.resume(),window.removeEventListener(EVENT_CLICK,xe)};window.addEventListener(EVENT_CLICK,xe),document.addEventListener("visibilitychange",()=>{document.visibilityState!="hidden"&&(this._frames=0,this._time=performance.now())},{signal:J}),this._setProps(I,!0),this.useCanvas&&this._container.appendChild(Y),this._ready=!0,this._setCanvas(REASON_CREATE)}get alphaBars(){return this._alphaBars}set alphaBars(E){this._alphaBars=!!E,this._calcBars()}get ansiBands(){return this._ansiBands}set ansiBands(E){this._ansiBands=!!E,this._calcBars()}get barSpace(){return this._barSpace}set barSpace(E){this._barSpace=+E||0,this._calcBars()}get channelLayout(){return this._chLayout}set channelLayout(E){this._chLayout=validateFromList(E,[CHANNEL_SINGLE,CHANNEL_HORIZONTAL,CHANNEL_VERTICAL,CHANNEL_COMBINED]),this._input.disconnect(),this._input.connect(this._chLayout!=CHANNEL_SINGLE?this._splitter:this._analyzer[0]),this._analyzer[0].disconnect(),this._outNodes.length&&this._analyzer[0].connect(this._chLayout!=CHANNEL_SINGLE?this._merger:this._output),this._calcBars(),this._makeGrad()}get colorMode(){return this._colorMode}set colorMode(E){this._colorMode=validateFromList(E,[COLOR_GRADIENT,COLOR_BAR_INDEX,COLOR_BAR_LEVEL])}get fftSize(){return this._analyzer[0].fftSize}set fftSize(E){for(const B of[0,1])this._analyzer[B].fftSize=E;const I=this._analyzer[0].frequencyBinCount;this._fftData=[new Float32Array(I),new Float32Array(I)],this._calcBars()}get frequencyScale(){return this._frequencyScale}set frequencyScale(E){this._frequencyScale=validateFromList(E,[SCALE_LOG,SCALE_BARK,SCALE_MEL,SCALE_LINEAR]),this._calcBars()}get gradient(){return this._selectedGrads[0]}set gradient(E){this._setGradient(E)}get gradientLeft(){return this._selectedGrads[0]}set gradientLeft(E){this._setGradient(E,0)}get gradientRight(){return this._selectedGrads[1]}set gradientRight(E){this._setGradient(E,1)}get height(){return this._height}set height(E){this._height=E,this._setCanvas(REASON_USER)}get ledBars(){return this._showLeds}set ledBars(E){this._showLeds=!!E,this._calcBars()}get linearAmplitude(){return this._linearAmplitude}set linearAmplitude(E){this._linearAmplitude=!!E}get linearBoost(){return this._linearBoost}set linearBoost(E){this._linearBoost=E>=1?+E:1}get lineWidth(){return this._lineWidth}set lineWidth(E){this._lineWidth=+E||0}get loRes(){return this._loRes}set loRes(E){this._loRes=!!E,this._setCanvas(REASON_LORES)}get lumiBars(){return this._lumiBars}set lumiBars(E){this._lumiBars=!!E,this._calcBars(),this._makeGrad()}get maxDecibels(){return this._analyzer[0].maxDecibels}set maxDecibels(E){for(const I of[0,1])this._analyzer[I].maxDecibels=E}get maxFPS(){return this._maxFPS}set maxFPS(E){this._maxFPS=E<0?0:+E||0}get maxFreq(){return this._maxFreq}set maxFreq(E){if(E<1)throw new AudioMotionError(ERR_FREQUENCY_TOO_LOW);this._maxFreq=Math.min(E,this.audioCtx.sampleRate/2),this._calcBars()}get minDecibels(){return this._analyzer[0].minDecibels}set minDecibels(E){for(const I of[0,1])this._analyzer[I].minDecibels=E}get minFreq(){return this._minFreq}set minFreq(E){if(E<1)throw new AudioMotionError(ERR_FREQUENCY_TOO_LOW);this._minFreq=+E,this._calcBars()}get mirror(){return this._mirror}set mirror(E){this._mirror=Math.sign(E)|0,this._calcBars(),this._makeGrad()}get mode(){return this._mode}set mode(E){const I=E|0;if(I>=0&&I<=10&&I!=9)this._mode=I,this._calcBars(),this._makeGrad();else throw new AudioMotionError(ERR_INVALID_MODE,E)}get noteLabels(){return this._noteLabels}set noteLabels(E){this._noteLabels=!!E,this._createScales()}get outlineBars(){return this._outlineBars}set outlineBars(E){this._outlineBars=!!E,this._calcBars()}get peakLine(){return this._peakLine}set peakLine(E){this._peakLine=!!E}get radial(){return this._radial}set radial(E){this._radial=!!E,this._calcBars(),this._makeGrad()}get reflexRatio(){return this._reflexRatio}set reflexRatio(E){if(E=+E||0,E<0||E>=1)throw new AudioMotionError(ERR_REFLEX_OUT_OF_RANGE);this._reflexRatio=E,this._calcBars(),this._makeGrad()}get roundBars(){return this._roundBars}set roundBars(E){this._roundBars=!!E,this._calcBars()}get smoothing(){return this._analyzer[0].smoothingTimeConstant}set smoothing(E){for(const I of[0,1])this._analyzer[I].smoothingTimeConstant=E}get spinSpeed(){return this._spinSpeed}set spinSpeed(E){E=+E||0,(this._spinSpeed===void 0||E==0)&&(this._spinAngle=-HALF_PI),this._spinSpeed=E}get splitGradient(){return this._splitGradient}set splitGradient(E){this._splitGradient=!!E,this._makeGrad()}get stereo(){return deprecate("stereo","channelLayout"),this._chLayout!=CHANNEL_SINGLE}set stereo(E){deprecate("stereo","channelLayout"),this.channelLayout=E?CHANNEL_VERTICAL:CHANNEL_SINGLE}get trueLeds(){return this._trueLeds}set trueLeds(E){this._trueLeds=!!E}get volume(){return this._output.gain.value}set volume(E){this._output.gain.value=E}get weightingFilter(){return this._weightingFilter}set weightingFilter(E){this._weightingFilter=validateFromList(E,[FILTER_NONE,FILTER_A,FILTER_B,FILTER_C,FILTER_D,FILTER_468],"toUpperCase")}get width(){return this._width}set width(E){this._width=E,this._setCanvas(REASON_USER)}get audioCtx(){return this._input.context}get canvas(){return this._ctx.canvas}get canvasCtx(){return this._ctx}get connectedSources(){return this._sources}get connectedTo(){return this._outNodes}get fps(){return this._fps}get fsHeight(){return this._fsHeight}get fsWidth(){return this._fsWidth}get isAlphaBars(){return this._flg.isAlpha}get isBandsMode(){return this._flg.isBands}get isDestroyed(){return this._destroyed}get isFullscreen(){return this._fsEl&&(document.fullscreenElement||document.webkitFullscreenElement)===this._fsEl}get isLedBars(){return this._flg.isLeds}get isLumiBars(){return this._flg.isLumi}get isOctaveBands(){return this._flg.isOctaves}get isOn(){return!!this._runId}get isOutlineBars(){return this._flg.isOutline}get pixelRatio(){return this._pixelRatio}get isRoundBars(){return this._flg.isRound}static get version(){return VERSION}connectInput(E){const I=E instanceof HTMLMediaElement;if(!(I||E.connect))throw new AudioMotionError(ERR_INVALID_AUDIO_SOURCE);const B=I?this.audioCtx.createMediaElementSource(E):E;return this._sources.includes(B)||(B.connect(this._input),this._sources.push(B)),B}connectOutput(E=this.audioCtx.destination){if(!this._outNodes.includes(E)&&(this._output.connect(E),this._outNodes.push(E),this._outNodes.length==1))for(const I of[0,1])this._analyzer[I].connect(this._chLayout==CHANNEL_SINGLE&&!I?this._output:this._merger,0,I)}destroy(){if(!this._ready)return;const{audioCtx:E,canvas:I,_controller:B,_input:U,_merger:V,_observer:X,_ownContext:Y,_splitter:K}=this;this._destroyed=!0,this._ready=!1,this.stop(),B.abort(),X&&X.disconnect(),this.onCanvasResize=null,this.onCanvasDraw=null,this._fsEl=null,this.disconnectInput(),this.disconnectOutput(),U.disconnect(),K.disconnect(),V.disconnect(),Y&&E.close(),I.remove(),this._calcBars()}disconnectInput(E,I){E?Array.isArray(E)||(E=[E]):E=Array.from(this._sources);for(const B of E){const U=this._sources.indexOf(B);if(I&&B.mediaStream)for(const V of B.mediaStream.getAudioTracks())V.stop();U>=0&&(B.disconnect(this._input),this._sources.splice(U,1))}}disconnectOutput(E){if(!(E&&!this._outNodes.includes(E))&&(this._output.disconnect(E),this._outNodes=E?this._outNodes.filter(I=>I!==E):[],this._outNodes.length==0))for(const I of[0,1])this._analyzer[I].disconnect()}getBars(){return Array.from(this._bars,({posX:E,freq:I,freqLo:B,freqHi:U,hold:V,peak:X,value:Y})=>({posX:E,freq:I,freqLo:B,freqHi:U,hold:V,peak:X,value:Y}))}getEnergy(E,I){if(E===void 0)return this._energy.val;if(E!=+E){if(E=="peak")return this._energy.peak;const Y={bass:[20,250],lowMid:[250,500],mid:[500,2e3],highMid:[2e3,4e3],treble:[4e3,16e3]};if(!Y[E])return null;[E,I]=Y[E]}const B=this._freqToBin(E),U=I?this._freqToBin(I):B,V=this._chLayout==CHANNEL_SINGLE?1:2;let X=0;for(let Y=0;Y<V;Y++)for(let K=B;K<=U;K++)X+=this._normalizedB(this._fftData[Y][K]);return X/(U-B+1)/V}registerGradient(E,I){if(typeof E!="string"||E.trim().length==0)throw new AudioMotionError(ERR_GRADIENT_INVALID_NAME);if(typeof I!="object")throw new AudioMotionError(ERR_GRADIENT_NOT_AN_OBJECT);const{colorStops:B}=I;if(!Array.isArray(B)||!B.length)throw new AudioMotionError(ERR_GRADIENT_MISSING_COLOR);const U=B.length,V=X=>+X!=X||X<0||X>1;B.forEach((X,Y)=>{const K=Y/Math.max(1,U-1);typeof X!="object"?B[Y]={pos:K,color:X}:V(X.pos)&&(X.pos=K),V(X.level)&&(B[Y].level=1-Y/U)}),B.sort((X,Y)=>X.level<Y.level?1:X.level>Y.level?-1:0),B[0].level=1,this._gradients[E]={bgColor:I.bgColor||GRADIENT_DEFAULT_BGCOLOR,dir:I.dir,colorStops:B},this._selectedGrads.includes(E)&&this._makeGrad()}setCanvasSize(E,I){this._width=E,this._height=I,this._setCanvas(REASON_USER)}setFreqRange(E,I){if(E<1||I<1)throw new AudioMotionError(ERR_FREQUENCY_TOO_LOW);this._minFreq=Math.min(E,I),this.maxFreq=Math.max(E,I)}setLedParams(E){let I,B,U;E&&(I=E.maxLeds|0,B=+E.spaceV,U=+E.spaceH),this._ledParams=I>0&&B>0&&U>=0?[I,B,U]:void 0,this._calcBars()}setOptions(E){this._setProps(E)}setSensitivity(E,I){for(const B of[0,1])this._analyzer[B].minDecibels=Math.min(E,I),this._analyzer[B].maxDecibels=Math.max(E,I)}start(){this.toggleAnalyzer(!0)}stop(){this.toggleAnalyzer(!1)}toggleAnalyzer(E){const I=this.isOn;return E===void 0&&(E=!I),I&&!E?(cancelAnimationFrame(this._runId),this._runId=0):!I&&E&&!this._destroyed&&(this._frames=0,this._time=performance.now(),this._runId=requestAnimationFrame(B=>this._draw(B))),this.isOn}toggleFullscreen(){if(this.isFullscreen)document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen&&document.webkitExitFullscreen();else{const E=this._fsEl;if(!E)return;E.requestFullscreen?E.requestFullscreen():E.webkitRequestFullscreen&&E.webkitRequestFullscreen()}}_binToFreq(E){return E*this.audioCtx.sampleRate/this.fftSize||1}_calcBars(){const E=this._bars=[];if(!this._ready){this._flg={isAlpha:!1,isBands:!1,isLeds:!1,isLumi:!1,isOctaves:!1,isOutline:!1,isRound:!1,noLedGap:!1};return}const{_ansiBands:I,_barSpace:B,canvas:U,_chLayout:V,_maxFreq:X,_minFreq:Y,_mirror:K,_mode:J,_radial:xe,_reflexRatio:Z}=this,_e=U.width>>1,Se=U.height>>1,Ee=V==CHANNEL_VERTICAL&&!xe,Ae=V==CHANNEL_HORIZONTAL,Re=J%10!=0,Te=Re&&this._frequencyScale==SCALE_LOG,we=this._showLeds&&Re&&!xe,Pe=this._lumiBars&&Re&&!xe,Ie=this._alphaBars&&!Pe&&J!=MODE_GRAPH,Fe=this._outlineBars&&Re&&!Pe&&!we,Oe=this._roundBars&&Re&&!Pe&&!we,Le=V!=CHANNEL_VERTICAL||Z>0&&!Pe,$e=U.height-(Ee&&!we?.5:0)>>Ee,Ve=$e*(Pe||xe?1:1-Z)|0,Xe=U.width-_e*(Ae||K!=0),Ue=Ee?U.height-$e*2:0,We=_e*(K==-1&&!Ae&&!xe),je=Math.min(U.width,U.height)*(V==CHANNEL_VERTICAL?.375:.125)|0,ze=Math.min(_e,Se),He=Ye=>E.push({...Ye,peak:[0,0],hold:[0],value:[0]}),De=Ye=>{const tt=this._freqToBin(Ye,"floor"),et=this._binToFreq(tt),it=this._binToFreq(tt+1),nt=Math.log2(Ye/et)/Math.log2(it/et);return[tt,nt]};let Ne,Me,ke;if(Te){const Ye=(st,rt,Qe)=>+st.toPrecision(Qe?Math.max(rt,1+Math.log10(st)|0):rt),tt=st=>{const rt=[1,1.12,1.25,1.4,1.6,1.8,2,2.24,2.5,2.8,3.15,3.55,4,4.5,5,5.6,6.3,7.1,8,9,10],Qe=Math.log10(st)|0,at=st/10**Qe;let ht=1;for(;ht<rt.length&&at>rt[ht];)ht++;return at-rt[ht-1]<rt[ht]-at&&ht--,(rt[ht]*10**(Qe+5)|0)/1e5},et=[0,24,12,8,6,4,3,2,1][J],it=I?10**(3/(et*10)):2**(1/et),nt=it**.5;let ot=I?7.94328235/(et%2?1:nt):C_1;do{let st=ot;const rt=Ye(st/nt,4,!0),Qe=Ye(st*nt,4,!0),[at,ht]=De(rt),[ct,ft]=De(Qe);I?st=et<4?tt(st):Ye(st,st.toString()[0]<5?3:2):st=Ye(st,4,!0),st>=Y&&He({posX:0,freq:st,freqLo:rt,freqHi:Qe,binLo:at,binHi:ct,ratioLo:ht,ratioHi:ft}),ot*=it}while(ot<=X);Ne=Xe/E.length,E.forEach((st,rt)=>st.posX=We+rt*Ne);const Ze=E[0],Je=E[E.length-1];Me=this._freqScaling(Ze.freqLo),ke=Xe/(this._freqScaling(Je.freqHi)-Me),Ze.freqLo<Y&&(Ze.freqLo=Y,[Ze.binLo,Ze.ratioLo]=De(Y)),Je.freqHi>X&&(Je.freqHi=X,[Je.binHi,Je.ratioHi]=De(X))}else if(Re){const Ye=[0,24,12,8,6,4,3,2,1][J]*10,tt=et=>{switch(this._frequencyScale){case SCALE_BARK:return 1960/(26.81/(et+.53)-1);case SCALE_MEL:return 700*(2**et-1);case SCALE_LINEAR:return et}};Ne=Xe/Ye,Me=this._freqScaling(Y),ke=Xe/(this._freqScaling(X)-Me);for(let et=0,it=0;et<Ye;et++,it+=Ne){const nt=tt(Me+it/ke),ot=tt(Me+(it+Ne/2)/ke),Ze=tt(Me+(it+Ne)/ke),[Je,st]=De(nt),[rt,Qe]=De(Ze);He({posX:We+it,freq:ot,freqLo:nt,freqHi:Ze,binLo:Je,binHi:rt,ratioLo:st,ratioHi:Qe})}}else{Ne=1,Me=this._freqScaling(Y),ke=Xe/(this._freqScaling(X)-Me);const Ye=this._freqToBin(Y,"floor"),tt=this._freqToBin(X);let et=-999;for(let it=Ye;it<=tt;it++){const nt=this._binToFreq(it),ot=We+Math.round(ke*(this._freqScaling(nt)-Me));if(ot>et)He({posX:ot,freq:nt,freqLo:nt,freqHi:nt,binLo:it,binHi:it,ratioLo:0,ratioHi:0}),et=ot;else if(E.length){const Ze=E[E.length-1];Ze.binHi=it,Ze.freqHi=nt,Ze.freq=(Ze.freqLo*nt)**.5}}}let Ge=0,Be=0;if(we){const Ye=this._pixelRatio/(window.devicePixelRatio>1&&window.screen.height<=540?2:1),tt=[[],[128,3,.45],[128,4,.225],[96,6,.225],[80,6,.225],[80,6,.125],[64,6,.125],[48,8,.125],[24,16,.125]],et=this._ledParams,[it,nt,ot]=et||tt[J];let Ze,Je=Ve;if(et){const st=2*Ye;let rt;Ze=it+1;do Ze--,rt=Je/Ze/(1+nt),Be=rt*nt;while((rt<st||Be<st)&&Ze>1)}else{const st=540/nt;Be=Math.min(nt*Ye,Math.max(2,Je/st+.1|0))}Le&&(Je+=Be),et||(Ze=Math.min(it,Je/(Be*2)|0)),Ge=ot>=1?ot:Ne*ot,this._leds=[Ze,Ge,Be,Je/Ze-Be]}const qe=Math.min(Ne-1,B*(B>0&&B<1?Ne:1));Re&&(Ne-=Math.max(we?Ge:0,qe)),E.forEach((Ye,tt)=>{let et=Ye.posX,it=Ne;Re&&(B==0&&!we?(et|=0,it|=0,tt>0&&et>E[tt-1].posX+E[tt-1].width&&(et--,it++)):et+=Math.max(we?Ge:0,qe)/2,Ye.posX=et),Ye.barCenter=et+(Ne==1?0:it/2),Ye.width=it});const Ke=[];for(const Ye of[0,1]){const tt=V==CHANNEL_VERTICAL?($e+Ue)*Ye:0,et=tt+$e,it=tt+Ve-(!we||Le?0:Be);Ke.push({channelTop:tt,channelBottom:et,analyzerBottom:it})}this._aux={analyzerHeight:Ve,analyzerWidth:Xe,centerX:_e,centerY:Se,channelCoords:Ke,channelHeight:$e,channelGap:Ue,initialX:We,innerRadius:je,outerRadius:ze,scaleMin:Me,unitWidth:ke},this._flg={isAlpha:Ie,isBands:Re,isLeds:we,isLumi:Pe,isOctaves:Te,isOutline:Fe,isRound:Oe,noLedGap:Le},this._createScales()}_createScales(){if(!this._ready)return;const{analyzerWidth:E,initialX:I,innerRadius:B,scaleMin:U,unitWidth:V}=this._aux,{canvas:X,_frequencyScale:Y,_mirror:K,_noteLabels:J,_radial:xe,_scaleX:Z,_scaleR:_e}=this,Se=Z.canvas,Ee=_e.canvas,Ae=[],Re=this._chLayout==CHANNEL_HORIZONTAL,Te=this._chLayout==CHANNEL_VERTICAL,we=["C",,"D",,"E","F",,"G",,"A",,"B"],Pe=Math.min(X.width,X.height)/34|0,Ie=Se.height>>1,Fe=Pe>>1,Oe=Ie*(J?.7:1.5),Le=Fe*(J?1:2),$e=2**(1/12);if(!J&&(this._ansiBands||Y!=SCALE_LOG))Ae.push(16,31.5,63,125,250,500,1e3,2e3,4e3),Y==SCALE_LINEAR?Ae.push(6e3,8e3,1e4,12e3,14e3,16e3,18e3,2e4,22e3):Ae.push(8e3,16e3);else{let ze=C_1;for(let He=-1;He<11;He++)for(let De=0;De<12;De++){if(ze>=this._minFreq&&ze<=this._maxFreq){const Ne=we[De],Me=Ne=="C";(Ne&&J&&!K&&!Re||Me)&&Ae.push(J?[ze,Ne+(Me?He:"")]:ze)}ze*=$e}}Ee.width=Ee.height=(B<<1)+Te*Pe;const Ve=Ee.width>>1,Xe=Ve-Pe*.7,Ue=(ze,He)=>{const De=TAU*(ze/X.width),Ne=De-HALF_PI,Me=Xe*Math.cos(Ne),ke=Xe*Math.sin(Ne);_e.save(),_e.translate(Ve+Me,Ve+ke),_e.rotate(De),_e.fillText(He,0,0),_e.restore()};Se.width|=0,Z.fillStyle=_e.strokeStyle=SCALEX_BACKGROUND_COLOR,Z.fillRect(0,0,Se.width,Se.height),_e.arc(Ve,Ve,Ve-Pe/2,0,TAU),_e.lineWidth=Pe,_e.stroke(),Z.fillStyle=_e.fillStyle=SCALEX_LABEL_COLOR,Z.font=`${Ie}px ${FONT_FAMILY}`,_e.font=`${Fe}px ${FONT_FAMILY}`,Z.textAlign=_e.textAlign="center";let We=-Oe/4,je=-Le;for(const ze of Ae){const[He,De]=Array.isArray(ze)?ze:[ze,ze<1e3?ze|0:`${(ze/100|0)/10}k`],Ne=V*(this._freqScaling(He)-U),Me=Se.height*.75,ke=De[0]=="C",Ge=Ie*(J&&!K&&!Re?ke?1.2:.6:3);if(Z.fillStyle=_e.fillStyle=ke&&!K&&!Re?SCALEX_HIGHLIGHT_COLOR:SCALEX_LABEL_COLOR,J){const Be=Y==SCALE_LOG,qe=Y==SCALE_LINEAR;let Ke=["C"];if((Be||He>2e3||!qe&&He>250||(!xe||Te)&&(!qe&&He>125||He>1e3))&&Ke.push("G"),(Be||He>4e3||!qe&&He>500||(!xe||Te)&&(!qe&&He>250||He>2e3))&&Ke.push("E"),(qe&&He>4e3||(!xe||Te)&&(Be||He>2e3||!qe&&He>500))&&Ke.push("D","F","A","B"),!Ke.includes(De[0]))continue}Ne>=We+Oe/2&&Ne<=E&&(Z.fillText(De,Re&&K==-1?E-Ne:I+Ne,Me,Ge),(Re||K&&(Ne>Oe||K==1))&&Z.fillText(De,Re&&K!=1?E+Ne:(I||X.width)-Ne,Me,Ge),We=Ne+Math.min(Ge,Z.measureText(De).width)/2),Ne>=je+Le&&Ne<E-Le&&(Ue(Re&&K==1?E-Ne:Ne,De),(Re||K&&(Ne>Le||K==1))&&Ue(Re&&K!=-1?E+Ne:-Ne,De),je=Ne)}}_draw(E){this._runId=requestAnimationFrame(lt=>this._draw(lt));const I=E-this._time,B=E-this._last,U=this._maxFPS?975/this._maxFPS:0;if(B<U)return;this._last=E-(U?B%U:0),this._frames++,I>=1e3&&(this._fps=this._frames/I*1e3,this._frames=0,this._time=E);const{isAlpha:V,isBands:X,isLeds:Y,isLumi:K,isOctaves:J,isOutline:xe,isRound:Z,noLedGap:_e}=this._flg,{analyzerHeight:Se,centerX:Ee,centerY:Ae,channelCoords:Re,channelHeight:Te,channelGap:we,initialX:Pe,innerRadius:Ie,outerRadius:Fe}=this._aux,{_bars:Oe,canvas:Le,_canvasGradients:$e,_chLayout:Ve,_colorMode:Xe,_ctx:Ue,_energy:We,fillAlpha:je,_fps:ze,_linearAmplitude:He,_lineWidth:De,maxDecibels:Ne,minDecibels:Me,_mirror:ke,_mode:Ge,overlay:Be,_radial:qe,showBgColor:Ke,showPeaks:Ye,useCanvas:tt,_weightingFilter:et}=this,it=this._scaleX.canvas,nt=this._scaleR.canvas,ot=ze>>1,Ze=Ve==CHANNEL_COMBINED,Je=Ve==CHANNEL_HORIZONTAL,st=Ve==CHANNEL_VERTICAL,rt=Ve==CHANNEL_SINGLE,Qe=Y&&this._trueLeds&&Xe==COLOR_GRADIENT,at=qe?Le.width:this._aux.analyzerWidth,ht=Pe+at,ct=Ye&&this._peakLine&&Ge==MODE_GRAPH,ft=qe?Fe-Ie:Se,[xt,pt,mt,bt]=this._leds||[];We.val>0&&(this._spinAngle+=this._spinSpeed*TAU/(60*ze));const _t=lt=>{if(this._reflexRatio>0&&!K&&!qe){let yt,Dt;this.reflexFit||st?(yt=st&&lt==0?Te+we:0,Dt=Te-Se):(yt=Le.height-Se*2,Dt=Se),Ue.save(),Ue.globalAlpha=this.reflexAlpha,this.reflexBright!=1&&(Ue.filter=`brightness(${this.reflexBright})`),Ue.setTransform(1,0,0,-1,0,Le.height),Ue.drawImage(Le,0,Re[lt].channelTop,Le.width,Se,0,yt,Le.width,Dt),Ue.restore()}},vt=()=>{this.showScaleX&&(qe?(Ue.save(),Ue.translate(Ee,Ae),this._spinSpeed&&Ue.rotate(this._spinAngle+HALF_PI),Ue.drawImage(nt,-nt.width>>1,-nt.width>>1),Ue.restore()):Ue.drawImage(it,0,Le.height-it.height))},It=lt=>{const yt=lt**2,Dt=424.36,Ct=11599.29,Qt=25122.25,Bt=544496.41,Nt=148693636,zt=Ht=>20*Math.log10(Ht);switch(et){case FILTER_A:const Ht=Nt*yt**2/((yt+Dt)*Math.sqrt((yt+Ct)*(yt+Bt))*(yt+Nt));return 2+zt(Ht);case FILTER_B:const jt=Nt*yt*lt/((yt+Dt)*Math.sqrt(yt+Qt)*(yt+Nt));return .17+zt(jt);case FILTER_C:const rr=Nt*yt/((yt+Dt)*(yt+Nt));return .06+zt(rr);case FILTER_D:const Jt=((103791848e-2-yt)**2+108076816e-2*yt)/((9837328-yt)**2+11723776*yt),ir=lt/68966888496476e-18*Math.sqrt(Jt/((yt+79919.29)*(yt+1345600)));return zt(ir);case FILTER_468:const er=-4737338981378384e-39*lt**6+2043828333606125e-30*lt**4-1363894795463638e-22*yt+1,Xt=1306612257412824e-34*lt**5-2118150887518656e-26*lt**3+.0005559488023498642*lt,Mt=.0001246332637532143*lt/Math.hypot(er,Xt);return 18.2+zt(Mt)}return 0},At=(lt,yt,Dt)=>{Ue.beginPath(),Ue.moveTo(lt,yt),Ue.lineTo(lt,Dt),Ue.stroke()},Ft=lt=>{if(lt&&De){const yt=Ue.globalAlpha;Ue.globalAlpha=1,Ue.stroke(),Ue.globalAlpha=yt}},kt=lt=>Math.max(0,(lt*xt|0)*(bt+mt)-mt),qt=lt=>{We.val=lt,We.peak>0&&(We.hold--,We.hold<0&&(We.peak+=We.hold/(ot*ot/2))),lt>=We.peak&&(We.peak=lt,We.hold=ot)};Be&&Ue.clearRect(0,0,Le.width,Le.height);let Vt=0;const ar=Oe.length,or=rt?1:2;for(let lt=0;lt<or;lt++){const{channelTop:yt,channelBottom:Dt,analyzerBottom:Ct}=Re[lt],Qt=this._gradients[this._selectedGrads[lt]],Bt=Qt.colorStops,Nt=Bt.length,zt=!Ke||Y&&!Be?"#000":Qt.bgColor,Ht=st&&qe&&lt?-1:1,jt=!lt&&ke==-1||lt&&ke==1,rr=!Je||lt&&ke!=1?0:at>>(lt||!jt),Jt=Je&&jt?-1:1,ir=()=>{const ut=it.height,gt=ut>>1,dt=He?100:Ne,St=He?0:Me,Tt=He?20:5,Rt=Se/(dt-St),$t=ke!=-1&&(!Je||lt==0||ke==1),Gt=ke!=1&&(!Je||lt!=ke);Ue.save(),Ue.fillStyle=SCALEY_LABEL_COLOR,Ue.font=`${gt}px ${FONT_FAMILY}`,Ue.textAlign="right",Ue.lineWidth=1;for(let Ut=dt;Ut>St;Ut-=Tt){const Yt=yt+(dt-Ut)*Rt,Pt=Ut%2==0|0;if(Pt){const wt=Yt+gt*(Yt==yt?.8:.35);$t&&Ue.fillText(Ut,ut*.85,wt),Gt&&Ue.fillText(Ut,(Je?at:Le.width)-ut*.1,wt),Ue.strokeStyle=SCALEY_LABEL_COLOR,Ue.setLineDash([2,4]),Ue.lineDashOffset=0}else Ue.strokeStyle=SCALEY_MIDLINE_COLOR,Ue.setLineDash([2,8]),Ue.lineDashOffset=1;Ue.beginPath(),Ue.moveTo(Pe+ut*Pt*$t,~~Yt+.5),Ue.lineTo(ht-ut*Pt*Gt,~~Yt+.5),Ue.stroke()}Ue.restore()},er=(ut,gt)=>{const dt=Lt[ut]+(ut<Lt.length-1?(Lt[ut+1]-Lt[ut])*gt:0);return isNaN(dt)?-1/0:dt},Xt=(ut,gt=Jt)=>gt*TAU*((ut+rr)/Le.width)+this._spinAngle,Mt=(ut,gt,dt)=>{const St=Ie+gt*Ht,Tt=Xt(ut,dt);return[Ee+St*Math.cos(Tt),Ae+St*Math.sin(Tt)]},sr=(ut,gt,dt,St,Tt)=>{Ue.beginPath();for(const Rt of ke&&!Je?[1,-1]:[Jt]){const[$t,Gt]=Z?[Xt(ut,Rt),Xt(ut+dt,Rt)]:[];Ue.moveTo(...Mt(ut,gt,Rt)),Ue.lineTo(...Mt(ut,gt+St,Rt)),Z?Ue.arc(Ee,Ae,Ie+(gt+St)*Ht,$t,Gt,Rt!=1):Ue.lineTo(...Mt(ut+dt,gt+St,Rt)),Ue.lineTo(...Mt(ut+dt,gt,Rt)),Z&&!Tt&&Ue.arc(Ee,Ae,Ie+gt*Ht,Gt,$t,Rt==1)}Ft(Tt),Ue.fill()},nr=(ut=0,gt=0)=>{let dt;if(Xe==COLOR_GRADIENT&&!Qe||Ge==MODE_GRAPH)dt=$e[lt];else{const St=Xe==COLOR_BAR_INDEX?gt%Nt:Bt.findLastIndex(Tt=>Y?kt(ut)<=kt(Tt.level):ut<=Tt.level);dt=Bt[St].color}Ue.fillStyle=Ue.strokeStyle=dt};if(tt){if(Je&&!qe){const ut=at*(lt+jt),gt=jt?-1:1;Ue.setTransform(gt,0,0,1,ut,0)}if((!Be||Ke)&&(Be&&(Ue.globalAlpha=this.bgAlpha),Ue.fillStyle=zt,(lt==0||!qe&&!Ze)&&Ue.fillRect(Pe,yt-we,at,(Be&&this.reflexAlpha==1?Se:Te)+we),Ue.globalAlpha=1),this.showScaleY&&!K&&!qe&&(lt==0||!Ze)&&ir(),Y?(Ue.setLineDash([bt,mt]),Ue.lineWidth=Oe[0].width):Ue.lineWidth=xe?Math.min(De,Oe[0].width/2):De,Ue.save(),!qe){const ut=new Path2D;ut.rect(0,yt,Le.width,Se),Ue.clip(ut)}}let Lt=this._fftData[lt];this._analyzer[lt].getFloatFrequencyData(Lt),et&&(Lt=Lt.map((ut,gt)=>ut+It(this._binToFreq(gt)))),Ue.beginPath();let Zt=[];for(let ut=0;ut<ar;ut++){const gt=Oe[ut],{posX:dt,barCenter:St,width:Tt,freq:Rt,binLo:$t,binHi:Gt,ratioLo:Ut,ratioHi:Yt}=gt;let Pt=Math.max(er($t,Ut),er(Gt,Yt));for(let Et=$t+1;Et<Gt;Et++)Lt[Et]>Pt&&(Pt=Lt[Et]);if(Pt=this._normalizedB(Pt),gt.value[lt]=Pt,Vt+=Pt,gt.peak[lt]>0&&(gt.hold[lt]--,gt.hold[lt]<0&&(gt.peak[lt]+=gt.hold[lt]/(ot*ot/2))),Pt>=gt.peak[lt]&&(gt.peak[lt]=Pt,gt.hold[lt]=ot),!tt)continue;K||V?Ue.globalAlpha=Pt:xe&&(Ue.globalAlpha=je),nr(Pt,ut);const wt=K?ft:Y?kt(Pt):Pt*ft|0;if(Ge==MODE_GRAPH){const Et=ut?0:(this._normalizedB(Lt[Oe[1].binLo])*ft+wt)/2;if(qe){if(ut==0&&(Je&&Ue.moveTo(...Mt(0,0)),Ue.lineTo(...Mt(0,dt<0?Et:wt))),dt>=0){const Ot=[dt,wt];Ue.lineTo(...Mt(...Ot)),Zt.push(Ot)}}else{if(ut==0)if(ke==-1&&!Je)Ue.moveTo(Pe,Ct-(dt<Pe?Et:wt));else{const Ot=$t?this._normalizedB(Lt[$t-1])*ft:wt;Ue.moveTo(Pe-De,Ct-Ot)}(Je||ke!=-1||dt>=Pe)&&Ue.lineTo(dt,Ct-wt)}}else if(Y){if(Ke&&!Be&&(lt==0||!Ze)){const Et=Ue.globalAlpha;Ue.strokeStyle=LEDS_UNLIT_COLOR,Ue.globalAlpha=1,At(St,yt,Ct),Ue.strokeStyle=Ue.fillStyle,Ue.globalAlpha=Et}if(Qe){const Et=K?0:Bt.findLastIndex(Wt=>kt(Pt)<=kt(Wt.level));let Ot=Ct;for(let Wt=Nt-1;Wt>=Et;Wt--){Ue.strokeStyle=Bt[Wt].color;let lr=Ct-(Wt==Et?wt:kt(Bt[Wt].level));At(St,Ot,lr),Ot=lr-mt}}else At(St,Ct,Ct-wt)}else if(dt>=Pe)if(qe)sr(dt,0,Tt,wt,xe);else if(Z){const Et=Tt/2,Ot=Ct+Et;Ue.beginPath(),Ue.moveTo(dt,Ot),Ue.lineTo(dt,Ot-wt),Ue.arc(St,Ot-wt,Et,PI,TAU),Ue.lineTo(dt+Tt,Ot),Ft(xe),Ue.fill()}else{const Et=xe?Ue.lineWidth:0;Ue.beginPath(),Ue.rect(dt,Ct+Et,Tt,-wt-Et),Ft(xe),Ue.fill()}const Kt=gt.peak[lt];if(Kt>0&&Ye&&!ct&&!K&&dt>=Pe&&dt<ht)if(xe&&De>0?Ue.globalAlpha=1:V&&(Ue.globalAlpha=Kt),(Xe==COLOR_BAR_LEVEL||Qe)&&nr(Kt),Y){const Et=kt(Kt);Et>=mt&&Ue.fillRect(dt,Ct-Et,Tt,bt)}else qe?Ge!=MODE_GRAPH&&sr(dt,Kt*ft,Tt,-2):Ue.fillRect(dt,Ct-Kt*ft,Tt,2)}if(tt){if(Ue.globalAlpha=1,Ge==MODE_GRAPH){if(nr(),qe&&!Je){if(ke){let ut;for(;ut=Zt.pop();)Ue.lineTo(...Mt(...ut,-1))}Ue.closePath()}if(De>0&&Ue.stroke(),je>0){if(qe){const ut=Je?Xt(at>>1):0,gt=Je?Xt(at):TAU;Ue.moveTo(...Mt(Je?at>>1:0,0)),Ue.arc(Ee,Ae,Ie,ut,gt,Je?!jt:!0)}else Ue.lineTo(ht,Ct),Ue.lineTo(Pe,Ct);Ue.globalAlpha=je,Ue.fill(),Ue.globalAlpha=1}if((ct||qe&&Ye)&&(Zt=[],Ue.beginPath(),Oe.forEach((ut,gt)=>{let dt=ut.posX,St=ut.peak[lt],Tt=gt?"lineTo":"moveTo";if(qe&&dt<0){const Rt=Oe[gt+1];St=findY(dt,St,Rt.posX,Rt.peak[lt],0),dt=0}St*=ft,ct?(Ue[Tt](...qe?Mt(dt,St):[dt,Ct-St]),qe&&ke&&!Je&&Zt.push([dt,St])):St>0&&sr(dt,St,1,-2)}),ct)){let ut;for(;ut=Zt.pop();)Ue.lineTo(...Mt(...ut,-1));Ue.lineWidth=1,Ue.stroke()}}Ue.restore(),Je&&!qe&&Ue.setTransform(1,0,0,1,0,0),(!Je&&!Ze||lt)&&_t(lt)}}if(qt(Vt/(ar<<or-1)),tt&&(ke&&!qe&&!Je&&(Ue.setTransform(-1,0,0,1,Le.width-Pe,0),Ue.drawImage(Le,Pe,0,Ee,Le.height,0,0,Ee,Le.height),Ue.setTransform(1,0,0,1,0,0)),Ue.setLineDash([]),vt()),this.showFPS){const lt=it.height;Ue.font=`bold ${lt}px ${FONT_FAMILY}`,Ue.fillStyle=FPS_COLOR,Ue.textAlign="right",Ue.fillText(Math.round(ze),Le.width-lt,lt*2)}this.onCanvasDraw&&(Ue.save(),Ue.fillStyle=Ue.strokeStyle=$e[0],this.onCanvasDraw(this,{timestamp:E,_canvasGradients:$e}),Ue.restore())}_freqScaling(E){switch(this._frequencyScale){case SCALE_LOG:return Math.log2(E);case SCALE_BARK:return 26.81*E/(1960+E)-.53;case SCALE_MEL:return Math.log2(1+E/700);case SCALE_LINEAR:return E}}_freqToBin(E,I="round"){const B=this._analyzer[0].frequencyBinCount-1,U=Math[I](E*this.fftSize/this.audioCtx.sampleRate);return U<B?U:B}_makeGrad(){if(!this._ready)return;const{canvas:E,_ctx:I,_radial:B,_reflexRatio:U}=this,{analyzerWidth:V,centerX:X,centerY:Y,initialX:K,innerRadius:J,outerRadius:xe}=this._aux,{isLumi:Z}=this._flg,_e=this._chLayout==CHANNEL_VERTICAL,Se=1-U,Ee=Z?E.height:E.height*(1-U*!_e)|0;for(const Ae of[0,1]){const Re=this._gradients[this._selectedGrads[Ae]],Te=Re.colorStops,we=Re.dir=="h";let Pe;if(B?Pe=I.createRadialGradient(X,Y,xe,X,Y,J-(xe-J)*_e):Pe=I.createLinearGradient(...we?[K,0,K+V,0]:[0,0,0,Ee]),Te){const Ie=_e&&!this._splitGradient&&(!we||B);for(let Fe=0;Fe<1+Ie;Fe++){const Oe=Te.length-1;Te.forEach((Le,$e)=>{let Ve=Le.pos;if(Ie&&(Ve/=2),_e&&!Z&&!B&&!we&&(Ve*=Se,!Ie&&Ve>.5*Se&&(Ve+=.5*U)),Fe==1)if(B||Z){const Xe=Oe-$e;Le=Te[Xe],Ve=1-Le.pos/2}else $e==0&&Ve>0&&Pe.addColorStop(.5,Le.color),Ve+=.5;Pe.addColorStop(Ve,Le.color),_e&&$e==Oe&&Ve<.5&&Pe.addColorStop(.5,Le.color)})}}this._canvasGradients[Ae]=Pe}}_normalizedB(E){const I=this._linearAmplitude,B=I?1/this._linearBoost:1,U=(K,J,xe)=>K<=J?J:K>=xe?xe:K,V=K=>10**(K/20);let X=this.maxDecibels,Y=this.minDecibels;return I&&(X=V(X),Y=V(Y),E=V(E)**B),U((E-Y)/(X-Y)**B,0,1)}_setCanvas(E){if(!this._ready)return;const{canvas:I,_ctx:B}=this,U=this._scaleX.canvas,V=window.devicePixelRatio/(this._loRes+1);let X=window.screen.width*V,Y=window.screen.height*V;Math.abs(window.orientation)==90&&X<Y&&([X,Y]=[Y,X]);const K=this.isFullscreen,J=K&&this._fsEl==I,xe=J?X:(this._width||this._container.clientWidth||this._defaultWidth)*V|0,Z=J?Y:(this._height||this._container.clientHeight||this._defaultHeight)*V|0;this._pixelRatio=V,this._fsWidth=X,this._fsHeight=Y,!(I.width==xe&&I.height==Z)&&(I.width=xe,I.height=Z,this.overlay||(B.fillStyle="#000",B.fillRect(0,0,xe,Z)),B.lineJoin="bevel",U.width=xe,U.height=Math.max(20*V,Math.min(xe,Z)/32|0),this._calcBars(),this._makeGrad(),this._fsStatus!==void 0&&this._fsStatus!==K&&(E=REASON_FSCHANGE),this._fsStatus=K,this.onCanvasResize&&this.onCanvasResize(E,this))}_setGradient(E,I){if(!this._gradients.hasOwnProperty(E))throw new AudioMotionError(ERR_UNKNOWN_GRADIENT,E);[0,1].includes(I)||(this._selectedGrads[1]=E,I=0),this._selectedGrads[I]=E,this._makeGrad()}_setProps(E,I){const B={alphaBars:!1,ansiBands:!1,barSpace:.1,bgAlpha:.7,channelLayout:CHANNEL_SINGLE,colorMode:COLOR_GRADIENT,fftSize:8192,fillAlpha:1,frequencyScale:SCALE_LOG,gradient:GRADIENTS[0][0],ledBars:!1,linearAmplitude:!1,linearBoost:1,lineWidth:0,loRes:!1,lumiBars:!1,maxDecibels:-25,maxFPS:0,maxFreq:22e3,minDecibels:-85,minFreq:20,mirror:0,mode:0,noteLabels:!1,outlineBars:!1,overlay:!1,peakLine:!1,radial:!1,reflexAlpha:.15,reflexBright:1,reflexFit:!0,reflexRatio:0,roundBars:!1,showBgColor:!0,showFPS:!1,showPeaks:!0,showScaleX:!0,showScaleY:!1,smoothing:.5,spinSpeed:0,splitGradient:!1,start:!0,trueLeds:!1,useCanvas:!0,volume:1,weightingFilter:FILTER_NONE},U=["onCanvasDraw","onCanvasResize"],V=["gradientLeft","gradientRight","height","width","stereo"],X=Object.keys(B).filter(Y=>Y!="start").concat(U,V);(I||E===void 0)&&(E={...B,...E});for(const Y of Object.keys(E))U.includes(Y)&&typeof E[Y]!="function"?this[Y]=void 0:X.includes(Y)&&(this[Y]=E[Y]);E.start!==void 0&&this.toggleAnalyzer(E.start)}}const waveConfig={[Waveforms.NONE]:{mode:2},[Waveforms.ROUNDBARS]:{mode:2,alphaBars:!1,ansiBands:!1,barSpace:.25,channelLayout:"single",colorMode:"bar-level",frequencyScale:"log",gradient:"prism",ledBars:!1,linearAmplitude:!0,linearBoost:1.6,lumiBars:!1,maxFreq:16e3,minFreq:30,mirror:0,radial:!1,reflexRatio:.3,reflexAlpha:1,roundBars:!0,showPeaks:!1,showScaleX:!1,showScaleY:!1,smoothing:.7,weightingFilter:"D"},[Waveforms.LED]:{mode:3,barSpace:.6,ledBars:!0,showScaleX:!1,showScaleY:!1},[Waveforms.RADIAL_SPECTRUM]:{mode:3,barSpace:.25,bgAlpha:.5,fillAlpha:.5,gradient:"prism",ledBars:!1,linearAmplitude:!0,linearBoost:1.8,lineWidth:1.5,maxDecibels:-30,maxFreq:16e3,radial:!0,showBgColor:!0,showPeaks:!0,spinSpeed:2,outlineBars:!0,showScaleX:!1,showScaleY:!1,reflexFit:!0},[Waveforms.LUMI_BARS]:{mode:3,barSpace:.6,lumiBars:!0,reflexRatio:.5,fillAlpha:.3,frequencyScale:"bark",gradientLeft:"steelblue",gradientRight:"orangered",showScaleX:!1,showScaleY:!1},[Waveforms.EQUALIZER]:{mode:2,gradient:"rainbow",lineWidth:1.5,fillAlpha:.5,showPeaks:!1,showScaleX:!1,showScaleY:!1}},initalTransforms={x:0,y:0,width:0,height:0,anchor:.5,maxX:0,maxY:0,scale:1,rotation:0,waveform:Waveforms.NONE},useAudioVisualizer=C=>{const E=React__namespace.useRef(),I=React.useRef(document.body),B=React__namespace.useRef(),[U,V]=React__namespace.useState(""),{uniqueId:X,src:Y,transformation:K=initalTransforms}=C,{waveform:J=Waveforms.NONE,width:xe=300,height:Z=300}=K,_e=async Se=>{try{return await fetch(Se,{mode:"cors",referrerPolicy:"no-referrer-when-downgrade"})}catch(Ee){const Ae=Ee;throw Ae.message.includes("Failed to fetch")||Ae.message.includes("Load failed")||Ae.message.includes("NetworkError when attempting to fetch resource")?new TypeError(`Failed to read from ${Se}: ${Ae.message}. Does the resource support CORS?`):Ee}};return React__namespace.useEffect(()=>()=>{isEmpty$1(U)||URL.revokeObjectURL(U),B.current},[U]),React__namespace.useEffect(()=>{const Se=waveConfig[J]||{};if(console.log("waveFormCOnfig",Se),E.current&&(I.current.removeChild(E.current),E.current=void 0),J!==Waveforms.NONE){E.current=document.createElement("div"),E.current.setAttribute("id",`${X}${J}audioContainer`),I.current.appendChild(E.current);const Ae=new AudioMotionAnalyzer(E.current,{audioCtx:Howler.ctx,height:Z,width:xe,...Se});B.current=Ae}return(async()=>{if(!isEmpty$1(Y)){const Re=await(await _e(Y)).arrayBuffer(),Te=new Blob([Re]),we=URL.createObjectURL(Te);V(we),E.current&&(E.current.style.display="none")}})(),()=>{E.current&&I.current&&(console.log("clearing the canvas",E.current),I.current.removeChild(E.current),E.current=void 0)}},[J,Y,X,xe,Z]),{audioMotionRef:B,blobUrl:U,canvasRef:E}},PixiAudioSprite=React__namespace.forwardRef((C,E)=>{const I={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,B]=React__namespace.useState(!1),[U,V]=React__namespace.useState(!1),X=React.useRef(null),Y=React.useRef(I),K=React.useRef(null),J=React__namespace.useRef(null),xe=React.useRef(null),Z=React__namespace.useRef(),{tl:_e,dragModeRef:Se}=React.useContext(GsapPixieContext),{uniqueId:Ee,src:Ae,startAt:Re,endAt:Te,mute:we,speed:Pe,audioStartAt:Ie,audioEndAt:Fe,visible:Oe=!1,transformation:Le}=C,{width:$e=300,height:Ve=300,x:Xe=100,y:Ue=100,waveform:We=Waveforms.NONE}=Le||{},{audioMotionRef:je,blobUrl:ze,canvasRef:He}=useAudioVisualizer({uniqueId:Ee,src:Ae,transformation:Le});useCustomEventListener(Events.PAUSE,()=>{var Ge;X.current&&J.current&&((Ge=J.current)==null||Ge.pause(),Y.current.isPlaying=!1)}),useCustomEventListener(Events.COMPLETE,()=>{Ie>0&&J.current&&J.current.seek(Ie)}),useCustomEventListener(Events.SCRUBBER_CLICKED,()=>{var Ge;X.current&&J.current&&((Ge=J.current)==null||Ge.pause(),Y.current.isPlaying=!1)}),React__namespace.useEffect(()=>{J.current&&(Se.current?(J.current.pause(),Y.current.isPlaying=!1,Y.current.isDragging=!0):Y.current.isDragging=!1)},[Se]);const De=(Ge,Be)=>{_e.current&&_e.current.isActive()&&K.current&&K.current.isActive()&&!Se.current&&J.current&&(console.log("gsap on start 0020",Ee,Ge,Be),J.current.play(),Y.current.isPlaying=!0)},Ne=()=>{var Ge;X.current&&((Ge=J.current)==null||Ge.stop(),Y.current.isPlaying=!1,Y.current.completed=!0)},Me=Ge=>{var qe,Ke;const Be=Ge+((qe=K.current)==null?void 0:qe.time());J.current&&Se.current?(J.current.seek(Be),J.current.pause(),Y.current.isPlaying=!1):X.current&&!Y.current.isPlaying&&((Ke=_e.current)!=null&&Ke.isActive())&&J.current&&(J.current.seek(Be),J.current.play(),Y.current.isPlaying=!0),Z.current&&Z.current.update()},ke=()=>{};return React.useEffect(()=>{let Ge=gsap$2.context(()=>{});if(X.current&&_e.current){const Be={duration:Number(Fe)-Number(Ie),onStart:De,onComplete:Ne,onStartParams:[Ie,Fe],onCompleteParams:[],onInterrupt:ke,onUpdate:Me,onUpdateParams:[Ie,Fe],id:Ee};Ge=gsap$2.context(()=>{K.current=gsap$2.from(X.current,Be,Ie),_e.current.to(X.current,{alpha:1,duration:.01},Re).to(X.current,{alpha:0,duration:.1},Number(Te)),_e.current.add(K.current,Re)})}return()=>{K.current&&(K.current.kill(),gsap$2.killTweensOf(K.current)),Ge.revert()}},[Re,Te,Ie,Fe,Ee]),React__namespace.useEffect(()=>(X.current&&B(!0),()=>{console.log("unmounting audio sprite",Ee),console.log("audioContainerRef.current",J.current)}),[]),React__namespace.useEffect(()=>(Z.current&&Z.current.update(),()=>{}),[U]),React__namespace.useEffect(()=>(isEmpty$1(ze)||(J.current=new howler.Howl({src:[ze],format:["mp3"],html5:!0,autoplay:!1,loop:!1,rate:Pe||1,onload:()=>{var Ge;if(Y.current.loaded=!0,J.current&&(Ie>0&&J.current.seek(Ie),J.current.volume(!we&&Oe?1:0),J.current.rate(Pe||1),J.current.pause(),Y.current.isPlaying=!1,Y.current.completed=!1,je.current&&J.current)){console.log("reconnecting the audio motion analyser");try{je.current.connectInput(J.current._sounds[0]._node)}catch(qe){console.log("error connecting audio motion"),console.log(qe)}const Be=PIXI__namespace.Texture.from(je.current._fsEl,{pixiIdPrefix:`${(Ge=je.current._container)==null?void 0:Ge.id}`});Z.current=Be,He.current&&He.current.setAttribute("style","display:none"),V(!0)}},onend:()=>{console.log("end of playing audio sprite"+Ee),Y.current.isPlaying=!1,Y.current.completed=!0},onplay:()=>{console.log("play of playing audio sprite"+Ee),Y.current.isPlaying=!0},onpause:()=>{console.log("pause of playing audio sprite"+Ee),Y.current.isPlaying=!1},onstop:()=>{console.log("stop of playing audio sprite"+Ee),Y.current.isPlaying=!1}}),Howler.ctx.resume().then(()=>{console.log("audio ctx resumed")})),()=>{console.log("unmounting the howler useeffect"),je.current,J.current&&(J.current.stop(),J.current.unload(),J.current=void 0)}),[Ee,Ae,Re,Te,Ie,Fe,we,Oe,Pe,ze]),React__namespace.useEffect(()=>{J.current&&(console.log("running updateEffect 2002",Ee,Fe),J.current.volume(!we&&Oe?1:0),J.current.rate(Pe||1),Y.current.isPlaying=!0)},[we,Oe,Pe]),jsxRuntimeExports.jsx(react.Container,{ref:X,children:We!==Waveforms.NONE&&U&&Z.current&&jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,ignoreTlForVideo:!0,isGif:!0,children:jsxRuntimeExports.jsx(react.Sprite,{texture:Z.current,width:$e,height:Ve,anchor:.5,x:Xe,y:Ue,ref:xe,alpha:Oe?1:0})})})});function arrayMap$2(C,E){for(var I=-1,B=C==null?0:C.length,U=Array(B);++I<B;)U[I]=E(C[I],I,C);return U}var _arrayMap=arrayMap$2,Stack=_Stack,baseIsEqual$1=_baseIsEqual,COMPARE_PARTIAL_FLAG$1=1,COMPARE_UNORDERED_FLAG$1=2;function baseIsMatch$1(C,E,I,B){var U=I.length,V=U,X=!B;if(C==null)return!V;for(C=Object(C);U--;){var Y=I[U];if(X&&Y[2]?Y[1]!==C[Y[0]]:!(Y[0]in C))return!1}for(;++U<V;){Y=I[U];var K=Y[0],J=C[K],xe=Y[1];if(X&&Y[2]){if(J===void 0&&!(K in C))return!1}else{var Z=new Stack;if(B)var _e=B(J,xe,K,C,E,Z);if(!(_e===void 0?baseIsEqual$1(xe,J,COMPARE_PARTIAL_FLAG$1|COMPARE_UNORDERED_FLAG$1,B,Z):_e))return!1}}return!0}var _baseIsMatch=baseIsMatch$1,isObject$2=isObject_1;function isStrictComparable$2(C){return C===C&&!isObject$2(C)}var _isStrictComparable=isStrictComparable$2,isStrictComparable$1=_isStrictComparable,keys$1=keys_1;function getMatchData$1(C){for(var E=keys$1(C),I=E.length;I--;){var B=E[I],U=C[B];E[I]=[B,U,isStrictComparable$1(U)]}return E}var _getMatchData=getMatchData$1;function matchesStrictComparable$2(C,E){return function(I){return I==null?!1:I[C]===E&&(E!==void 0||C in Object(I))}}var _matchesStrictComparable=matchesStrictComparable$2,baseIsMatch=_baseIsMatch,getMatchData=_getMatchData,matchesStrictComparable$1=_matchesStrictComparable;function baseMatches$1(C){var E=getMatchData(C);return E.length==1&&E[0][2]?matchesStrictComparable$1(E[0][0],E[0][1]):function(I){return I===C||baseIsMatch(I,C,E)}}var _baseMatches=baseMatches$1,baseGetTag=_baseGetTag,isObjectLike=isObjectLike_1,symbolTag="[object Symbol]";function isSymbol$4(C){return typeof C=="symbol"||isObjectLike(C)&&baseGetTag(C)==symbolTag}var isSymbol_1=isSymbol$4,isArray$5=isArray_1,isSymbol$3=isSymbol_1,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey$3(C,E){if(isArray$5(C))return!1;var I=typeof C;return I=="number"||I=="symbol"||I=="boolean"||C==null||isSymbol$3(C)?!0:reIsPlainProp.test(C)||!reIsDeepProp.test(C)||E!=null&&C in Object(E)}var _isKey=isKey$3,MapCache=_MapCache,FUNC_ERROR_TEXT$1="Expected a function";function memoize$1(C,E){if(typeof C!="function"||E!=null&&typeof E!="function")throw new TypeError(FUNC_ERROR_TEXT$1);var I=function(){var B=arguments,U=E?E.apply(this,B):B[0],V=I.cache;if(V.has(U))return V.get(U);var X=C.apply(this,B);return I.cache=V.set(U,X)||V,X};return I.cache=new(memoize$1.Cache||MapCache),I}memoize$1.Cache=MapCache;var memoize_1=memoize$1,memoize=memoize_1,MAX_MEMOIZE_SIZE=500;function memoizeCapped$1(C){var E=memoize(C,function(B){return I.size===MAX_MEMOIZE_SIZE&&I.clear(),B}),I=E.cache;return E}var _memoizeCapped=memoizeCapped$1,memoizeCapped=_memoizeCapped,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath$1=memoizeCapped(function(C){var E=[];return C.charCodeAt(0)===46&&E.push(""),C.replace(rePropName,function(I,B,U,V){E.push(U?V.replace(reEscapeChar,"$1"):B||I)}),E}),_stringToPath=stringToPath$1,Symbol$1=_Symbol,arrayMap$1=_arrayMap,isArray$4=isArray_1,isSymbol$2=isSymbol_1,INFINITY$1=1/0,symbolProto=Symbol$1?Symbol$1.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function baseToString$1(C){if(typeof C=="string")return C;if(isArray$4(C))return arrayMap$1(C,baseToString$1)+"";if(isSymbol$2(C))return symbolToString?symbolToString.call(C):"";var E=C+"";return E=="0"&&1/C==-INFINITY$1?"-0":E}var _baseToString=baseToString$1,baseToString=_baseToString;function toString$1(C){return C==null?"":baseToString(C)}var toString_1=toString$1,isArray$3=isArray_1,isKey$2=_isKey,stringToPath=_stringToPath,toString=toString_1;function castPath$2(C,E){return isArray$3(C)?C:isKey$2(C,E)?[C]:stringToPath(toString(C))}var _castPath=castPath$2,isSymbol$1=isSymbol_1,INFINITY=1/0;function toKey$4(C){if(typeof C=="string"||isSymbol$1(C))return C;var E=C+"";return E=="0"&&1/C==-INFINITY?"-0":E}var _toKey=toKey$4,castPath$1=_castPath,toKey$3=_toKey;function baseGet$2(C,E){E=castPath$1(E,C);for(var I=0,B=E.length;C!=null&&I<B;)C=C[toKey$3(E[I++])];return I&&I==B?C:void 0}var _baseGet=baseGet$2,baseGet$1=_baseGet;function get$1(C,E,I){var B=C==null?void 0:baseGet$1(C,E);return B===void 0?I:B}var get_1=get$1;function baseHasIn$1(C,E){return C!=null&&E in Object(C)}var _baseHasIn=baseHasIn$1,castPath=_castPath,isArguments=isArguments_1,isArray$2=isArray_1,isIndex=_isIndex,isLength=isLength_1,toKey$2=_toKey;function hasPath$1(C,E,I){E=castPath(E,C);for(var B=-1,U=E.length,V=!1;++B<U;){var X=toKey$2(E[B]);if(!(V=C!=null&&I(C,X)))break;C=C[X]}return V||++B!=U?V:(U=C==null?0:C.length,!!U&&isLength(U)&&isIndex(X,U)&&(isArray$2(C)||isArguments(C)))}var _hasPath=hasPath$1,baseHasIn=_baseHasIn,hasPath=_hasPath;function hasIn$1(C,E){return C!=null&&hasPath(C,E,baseHasIn)}var hasIn_1=hasIn$1,baseIsEqual=_baseIsEqual,get=get_1,hasIn=hasIn_1,isKey$1=_isKey,isStrictComparable=_isStrictComparable,matchesStrictComparable=_matchesStrictComparable,toKey$1=_toKey,COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;function baseMatchesProperty$1(C,E){return isKey$1(C)&&isStrictComparable(E)?matchesStrictComparable(toKey$1(C),E):function(I){var B=get(I,C);return B===void 0&&B===E?hasIn(I,C):baseIsEqual(E,B,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}var _baseMatchesProperty=baseMatchesProperty$1;function identity$1(C){return C}var identity_1=identity$1;function baseProperty$1(C){return function(E){return E==null?void 0:E[C]}}var _baseProperty=baseProperty$1,baseGet=_baseGet;function basePropertyDeep$1(C){return function(E){return baseGet(E,C)}}var _basePropertyDeep=basePropertyDeep$1,baseProperty=_baseProperty,basePropertyDeep=_basePropertyDeep,isKey=_isKey,toKey=_toKey;function property$1(C){return isKey(C)?baseProperty(toKey(C)):basePropertyDeep(C)}var property_1=property$1,baseMatches=_baseMatches,baseMatchesProperty=_baseMatchesProperty,identity=identity_1,isArray$1=isArray_1,property=property_1;function baseIteratee$1(C){return typeof C=="function"?C:C==null?identity:typeof C=="object"?isArray$1(C)?baseMatchesProperty(C[0],C[1]):baseMatches(C):property(C)}var _baseIteratee=baseIteratee$1;function createBaseFor$1(C){return function(E,I,B){for(var U=-1,V=Object(E),X=B(E),Y=X.length;Y--;){var K=X[C?Y:++U];if(I(V[K],K,V)===!1)break}return E}}var _createBaseFor=createBaseFor$1,createBaseFor=_createBaseFor,baseFor$1=createBaseFor(),_baseFor=baseFor$1,baseFor=_baseFor,keys=keys_1;function baseForOwn$1(C,E){return C&&baseFor(C,E,keys)}var _baseForOwn=baseForOwn$1,isArrayLike$1=isArrayLike_1;function createBaseEach$1(C,E){return function(I,B){if(I==null)return I;if(!isArrayLike$1(I))return C(I,B);for(var U=I.length,V=E?U:-1,X=Object(I);(E?V--:++V<U)&&B(X[V],V,X)!==!1;);return I}}var _createBaseEach=createBaseEach$1,baseForOwn=_baseForOwn,createBaseEach=_createBaseEach,baseEach$1=createBaseEach(baseForOwn),_baseEach=baseEach$1,baseEach=_baseEach,isArrayLike=isArrayLike_1;function baseMap$1(C,E){var I=-1,B=isArrayLike(C)?Array(C.length):[];return baseEach(C,function(U,V,X){B[++I]=E(U,V,X)}),B}var _baseMap=baseMap$1,arrayMap=_arrayMap,baseIteratee=_baseIteratee,baseMap=_baseMap,isArray=isArray_1;function map(C,E){var I=isArray(C)?arrayMap:baseMap;return I(C,baseIteratee(E))}var map_1=map;const map$1=getDefaultExportFromCjs(map_1);var lib$1={},gif={},lib={};Object.defineProperty(lib,"__esModule",{value:!0}),lib.loop=lib.conditional=lib.parse=void 0;var parse=function C(E,I){var B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},U=arguments.length>3&&arguments[3]!==void 0?arguments[3]:B;if(Array.isArray(I))I.forEach(function(X){return C(E,X,B,U)});else if(typeof I=="function")I(E,B,U,C);else{var V=Object.keys(I)[0];Array.isArray(I[V])?(U[V]={},C(E,I[V],B,U[V])):U[V]=I[V](E,B,U,C)}return B};lib.parse=parse;var conditional=function(E,I){return function(B,U,V,X){I(B,U,V)&&X(B,E,U,V)}};lib.conditional=conditional;var loop=function(E,I){return function(B,U,V,X){for(var Y=[],K=B.pos;I(B,U,V);){var J={};if(X(B,E,U,J),B.pos===K)break;K=B.pos,Y.push(J)}return Y}};lib.loop=loop;var uint8={};Object.defineProperty(uint8,"__esModule",{value:!0}),uint8.readBits=uint8.readArray=uint8.readUnsigned=uint8.readString=uint8.peekBytes=uint8.readBytes=uint8.peekByte=uint8.readByte=uint8.buildStream=void 0;var buildStream=function(E){return{data:E,pos:0}};uint8.buildStream=buildStream;var readByte=function(){return function(E){return E.data[E.pos++]}};uint8.readByte=readByte;var peekByte=function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(I){return I.data[I.pos+E]}};uint8.peekByte=peekByte;var readBytes=function(E){return function(I){return I.data.subarray(I.pos,I.pos+=E)}};uint8.readBytes=readBytes;var peekBytes=function(E){return function(I){return I.data.subarray(I.pos,I.pos+E)}};uint8.peekBytes=peekBytes;var readString=function(E){return function(I){return Array.from(readBytes(E)(I)).map(function(B){return String.fromCharCode(B)}).join("")}};uint8.readString=readString;var readUnsigned=function(E){return function(I){var B=readBytes(2)(I);return E?(B[1]<<8)+B[0]:(B[0]<<8)+B[1]}};uint8.readUnsigned=readUnsigned;var readArray=function(E,I){return function(B,U,V){for(var X=typeof I=="function"?I(B,U,V):I,Y=readBytes(E),K=new Array(X),J=0;J<X;J++)K[J]=Y(B);return K}};uint8.readArray=readArray;var subBitsTotal=function(E,I,B){for(var U=0,V=0;V<B;V++)U+=E[I+V]&&Math.pow(2,B-V-1);return U},readBits=function(E){return function(I){for(var B=readByte()(I),U=new Array(8),V=0;V<8;V++)U[7-V]=!!(B&1<<V);return Object.keys(E).reduce(function(X,Y){var K=E[Y];return K.length?X[Y]=subBitsTotal(U,K.index,K.length):X[Y]=U[K.index],X},{})}};uint8.readBits=readBits,function(C){Object.defineProperty(C,"__esModule",{value:!0}),C.default=void 0;var E=lib,I=uint8,B={blocks:function(_e){for(var Se=0,Ee=[],Ae=_e.data.length,Re=0,Te=(0,I.readByte)()(_e);Te!==Se&&Te;Te=(0,I.readByte)()(_e)){if(_e.pos+Te>=Ae){var we=Ae-_e.pos;Ee.push((0,I.readBytes)(we)(_e)),Re+=we;break}Ee.push((0,I.readBytes)(Te)(_e)),Re+=Te}for(var Pe=new Uint8Array(Re),Ie=0,Fe=0;Fe<Ee.length;Fe++)Pe.set(Ee[Fe],Ie),Ie+=Ee[Fe].length;return Pe}},U=(0,E.conditional)({gce:[{codes:(0,I.readBytes)(2)},{byteSize:(0,I.readByte)()},{extras:(0,I.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,I.readUnsigned)(!0)},{transparentColorIndex:(0,I.readByte)()},{terminator:(0,I.readByte)()}]},function(Z){var _e=(0,I.peekBytes)(2)(Z);return _e[0]===33&&_e[1]===249}),V=(0,E.conditional)({image:[{code:(0,I.readByte)()},{descriptor:[{left:(0,I.readUnsigned)(!0)},{top:(0,I.readUnsigned)(!0)},{width:(0,I.readUnsigned)(!0)},{height:(0,I.readUnsigned)(!0)},{lct:(0,I.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,I.readArray)(3,function(Z,_e,Se){return Math.pow(2,Se.descriptor.lct.size+1)})},function(Z,_e,Se){return Se.descriptor.lct.exists}),{data:[{minCodeSize:(0,I.readByte)()},B]}]},function(Z){return(0,I.peekByte)()(Z)===44}),X=(0,E.conditional)({text:[{codes:(0,I.readBytes)(2)},{blockSize:(0,I.readByte)()},{preData:function(_e,Se,Ee){return(0,I.readBytes)(Ee.text.blockSize)(_e)}},B]},function(Z){var _e=(0,I.peekBytes)(2)(Z);return _e[0]===33&&_e[1]===1}),Y=(0,E.conditional)({application:[{codes:(0,I.readBytes)(2)},{blockSize:(0,I.readByte)()},{id:function(_e,Se,Ee){return(0,I.readString)(Ee.blockSize)(_e)}},B]},function(Z){var _e=(0,I.peekBytes)(2)(Z);return _e[0]===33&&_e[1]===255}),K=(0,E.conditional)({comment:[{codes:(0,I.readBytes)(2)},B]},function(Z){var _e=(0,I.peekBytes)(2)(Z);return _e[0]===33&&_e[1]===254}),J=[{header:[{signature:(0,I.readString)(3)},{version:(0,I.readString)(3)}]},{lsd:[{width:(0,I.readUnsigned)(!0)},{height:(0,I.readUnsigned)(!0)},{gct:(0,I.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,I.readByte)()},{pixelAspectRatio:(0,I.readByte)()}]},(0,E.conditional)({gct:(0,I.readArray)(3,function(Z,_e){return Math.pow(2,_e.lsd.gct.size+1)})},function(Z,_e){return _e.lsd.gct.exists}),{frames:(0,E.loop)([U,Y,K,V,X],function(Z){var _e=(0,I.peekByte)()(Z);return _e===33||_e===44})}],xe=J;C.default=xe}(gif);var deinterlace$1={};Object.defineProperty(deinterlace$1,"__esModule",{value:!0}),deinterlace$1.deinterlace=void 0;var deinterlace=function(E,I){for(var B=new Array(E.length),U=E.length/I,V=function(_e,Se){var Ee=E.slice(Se*I,(Se+1)*I);B.splice.apply(B,[_e*I,I].concat(Ee))},X=[0,4,2,1],Y=[8,8,4,2],K=0,J=0;J<4;J++)for(var xe=X[J];xe<U;xe+=Y[J])V(xe,K),K++;return B};deinterlace$1.deinterlace=deinterlace;var lzw$1={};Object.defineProperty(lzw$1,"__esModule",{value:!0}),lzw$1.lzw=void 0;var lzw=function(E,I,B){var U=4096,V=-1,X=B,Y,K,J,xe,Z,_e,Se,Oe,Ee,Ae,Fe,Re,Le,$e,Xe,Ve,Te=new Array(B),we=new Array(U),Pe=new Array(U),Ie=new Array(U+1);for(Re=E,K=1<<Re,Z=K+1,Y=K+2,Se=V,xe=Re+1,J=(1<<xe)-1,Ee=0;Ee<K;Ee++)we[Ee]=0,Pe[Ee]=Ee;var Fe,Oe,Le,$e,Ve,Xe;for(Fe=Oe=Le=$e=Ve=Xe=0,Ae=0;Ae<X;){if($e===0){if(Oe<xe){Fe+=I[Xe]<<Oe,Oe+=8,Xe++;continue}if(Ee=Fe&J,Fe>>=xe,Oe-=xe,Ee>Y||Ee==Z)break;if(Ee==K){xe=Re+1,J=(1<<xe)-1,Y=K+2,Se=V;continue}if(Se==V){Ie[$e++]=Pe[Ee],Se=Ee,Le=Ee;continue}for(_e=Ee,Ee==Y&&(Ie[$e++]=Le,Ee=Se);Ee>K;)Ie[$e++]=Pe[Ee],Ee=we[Ee];Le=Pe[Ee]&255,Ie[$e++]=Le,Y<U&&(we[Y]=Se,Pe[Y]=Le,Y++,!(Y&J)&&Y<U&&(xe++,J+=Y)),Se=_e}$e--,Te[Ve++]=Ie[$e],Ae++}for(Ae=Ve;Ae<X;Ae++)Te[Ae]=0;return Te};lzw$1.lzw=lzw,Object.defineProperty(lib$1,"__esModule",{value:!0}),lib$1.decompressFrames=lib$1.decompressFrame=lib$1.parseGIF=void 0;var _gif=_interopRequireDefault(gif),_jsBinarySchemaParser=lib,_uint=uint8,_deinterlace=deinterlace$1,_lzw=lzw$1;function _interopRequireDefault(C){return C&&C.__esModule?C:{default:C}}var parseGIF=function(E){var I=new Uint8Array(E);return(0,_jsBinarySchemaParser.parse)((0,_uint.buildStream)(I),_gif.default)};lib$1.parseGIF=parseGIF;var generatePatch=function(E){for(var I=E.pixels.length,B=new Uint8ClampedArray(I*4),U=0;U<I;U++){var V=U*4,X=E.pixels[U],Y=E.colorTable[X]||[0,0,0];B[V]=Y[0],B[V+1]=Y[1],B[V+2]=Y[2],B[V+3]=X!==E.transparentIndex?255:0}return B},decompressFrame=function(E,I,B){if(!E.image){console.warn("gif frame does not have associated image.");return}var U=E.image,V=U.descriptor.width*U.descriptor.height,X=(0,_lzw.lzw)(U.data.minCodeSize,U.data.blocks,V);U.descriptor.lct.interlaced&&(X=(0,_deinterlace.deinterlace)(X,U.descriptor.width));var Y={pixels:X,dims:{top:E.image.descriptor.top,left:E.image.descriptor.left,width:E.image.descriptor.width,height:E.image.descriptor.height}};return U.descriptor.lct&&U.descriptor.lct.exists?Y.colorTable=U.lct:Y.colorTable=I,E.gce&&(Y.delay=(E.gce.delay||10)*10,Y.disposalType=E.gce.extras.disposal,E.gce.extras.transparentColorGiven&&(Y.transparentIndex=E.gce.transparentColorIndex)),B&&(Y.patch=generatePatch(Y)),Y};lib$1.decompressFrame=decompressFrame;var decompressFrames=function(E,I){return E.frames.filter(function(B){return B.image}).map(function(B){return decompressFrame(B,E.gct,I)})};lib$1.decompressFrames=decompressFrames;const reducer=(C,E={})=>{typeof E=="function"&&(E=E(C));const I=E.loaded&&C.loaded!==E.loaded,{playing:B,...U}=E,V={...C,...U};return I&&Object.assign(V,{playing:V.autoPlay&&V.loaded}),(E.delays!=null||E.frames!=null)&&Object.assign(V,{length:V.frames.length}),(E.index!=null||E.frames!=null)&&Object.assign(V,{index:V.length===0?0:(V.length+V.index)%V.length}),E.playing!=null&&Object.assign(V,V.loaded?{playing:B}:{autoPlay:B}),V},initializer=C=>reducer({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},C),usePlayerState=C=>React.useReducer(reducer,C,initializer);var code='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 WorkerFactory(C){const E=new Blob([code],{type:"application/javascript"}),I=URL.createObjectURL(E),B=new Worker(I,C);return URL.revokeObjectURL(I),B}const genearate=C=>({...C,frames:C.frames.map(E=>{const I=new ImageData(C.width,C.height);return I.data.set(new Uint8ClampedArray(E)),I})}),createSingleton=(C,E)=>{const I={};return()=>(I.instance||(I.instance=C()),React.useLayoutEffect(()=>(I.timeout?(clearTimeout(I.timeout),delete I.timeout):I.usageCount=(I.usageCount||0)+1,()=>{I.timeout=setTimeout(()=>{I.usageCount=I.usageCount-1,I.usageCount===0&&(E&&E(I.instance),delete I.instance,delete I.timeout)})}),[I,E]),I.instance)},useUpdatedRef=C=>{const E=React.useRef(C);return React.useEffect(()=>{E.current=C},[C]),E},useEventCallback=C=>{const E=useUpdatedRef(C);return React.useCallback(I=>E.current&&E.current(I),[])},useWorkerSingleton=createSingleton(()=>new WorkerFactory,C=>C.terminate()),useWorkerParser=(C,E)=>{const I=useEventCallback(E),B=useWorkerSingleton();React.useEffect(()=>{if(typeof C=="string"){const U=V=>{const X=V.data||V;if(X.src===C){const Y=X.error?X:genearate(X);I(Y)}};return B.addEventListener("message",U),B.postMessage({src:C,type:"parse"}),()=>{B.postMessage({src:C,type:"cancel"}),B.removeEventListener("message",U)}}},[B,C])},PixiAnimatedSpriteComp=({isPlaying:C,forwardRef:E,...I})=>{const B=React__namespace.useRef(null);return React__namespace.useImperativeHandle(E,()=>B.current,[B]),React__namespace.useEffect(()=>{if(B.current===null)return;const U=B.current;U[C?"gotoAndPlay":"gotoAndStop"](U.currentFrame)},[C]),jsxRuntimeExports.jsx(react.AnimatedSprite,{ref:B,...I,isPlaying:C})},PixiAnimatedSprite=React__namespace.memo(PixiAnimatedSpriteComp),initialState$2={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0,currentFrame:0},PixiGifSprite=React__namespace.forwardRef((C,E)=>{const[I,B]=React__namespace.useState(0),[U,V]=React__namespace.useState([]),[,X]=React.useState(!1),Y=React.useRef(null),K=React.useRef(null),J=React.useRef(initialState$2),xe=React.useRef(),[Z,_e]=usePlayerState({autoPlay:!1}),{tl:Se}=React.useContext(GsapPixieContext),{src:Ee,uniqueId:Ae,startAt:Re,endAt:Te,frameStartAt:we,frameEndAt:Pe,loop:Ie,visible:Fe,disabled:Oe,transformation:{width:Le=0,height:$e=0,x:Ve,y:Xe,colorCorrection:Ue={}},pointerdown:We}=C,{frames:je,delays:ze}=Z;useWorkerParser(Ee,_e);const{temperatureFilter:He,sharpnessFilter:De,hueFilter:Ne,blurFilter:Me,adjustmentFilter:ke,vignetteFilter:Ge,noiseFilter:Be}=withFiltersHook(Ue),{blurRadius:qe=0,vignette:Ke=0,noise:Ye=0}=Ue,tt=.1;React__namespace.useEffect(()=>{if(!isEmpty$1(je)){const Ze=map$1(je,st=>{const{data:rt,width:Qe,height:at}=st,ht=new Uint8Array(rt);return PIXI__namespace.Texture.fromBuffer(ht,Qe,at)}).map((st,rt)=>({texture:st,time:ze[rt]}));V(Ze);let Je=0;ze.forEach(st=>{Je+=st}),B(Je/1e3),J.current.totalDuration=Je,J.current.totalFrames=je.length}},[Ae,je,ze]);const et=()=>{Y.current&&(Y.current.stop(),J.current.isPlaying=!1)},it=()=>{if(Y.current&&xe.current){const ot=xe.current.time();let Ze=ot===0?0:ot/tt;Ze=isNaN(Ze)?0:Ze;const Je=J.current.totalFrames;Ze=Ze>Je?Je:Ze,Ze=Math.round(Ze),Ze>=Je?(Y.current.gotoAndStop(0),J.current.isPlaying=!1):(Y.current.currentFrame=Ze,J.current.isPlaying=!0)}},nt=()=>{X(!0)};return React.useEffect(()=>{let ot=gsap$2.context(()=>{});if(K.current&&Se.current&&I>0){const Ze={duration:Number(I),onInterrupt:et,onUpdate:it,onUpdateParams:[we,Pe]},Je=Number(Te)-Number(Re),st=Math.max(0,Math.floor(Je/I)-1);xe.current&&xe.current.kill(),ot=gsap$2.context(()=>{xe.current=gsap$2.timeline({repeat:Ie?st:0,repeatDelay:0}).from(K.current,Ze,we),Se.current.add(xe.current,Re)})}return()=>{xe.current&&(xe.current.kill(),gsap$2.killTweensOf(xe.current)),ot.revert()}},[Ee,Ae,Re,Te,we,Pe,I,Ie]),jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,ignoreTlForVideo:!0,isGif:!0,children:jsxRuntimeExports.jsx(react.Container,{ref:K,children:!isEmpty$1(U)&&jsxRuntimeExports.jsx(PixiAnimatedSprite,{x:Ve,y:Xe,width:Le,height:$e,animationSpeed:1,alpha:Fe?1:0,loop:Ie,textures:U,onComplete:nt,anchor:.5,forwardRef:Y,...!Oe&&Fe&&{interactive:!0,pointerdown:We},filters:[He,De,Ne,ke,...qe>0?[Me]:[],...Ke>0?[Ge]:[],...Ye>0?[Be]:[]]})})})}),PixiTextSprite=React__namespace.forwardRef((C,E)=>{const B=React.useRef(0),U=React.useRef(null),V=React.useRef(16),X=React.useRef(null),Y=React.useRef(null),K=react.useApp(),{visible:J,text:xe,disabled:Z,transformation:_e,pointerdown:Se,onDobuleClick:Ee,uniqueId:Ae,startAt:Re,endAt:Te}=C,{x:we,y:Pe,fontFamily:Ie="Arial",fontWeight:Fe="normal",fontStyle:Oe="normal",fontSize:Le=16,fontVariant:$e="normal",fill:Ve="black",stroke:Xe,strokeThickness:Ue=0,blurRadius:We=0,blurEnabled:je=!1,dropShadowColor:ze=null,dropShadow:He=!1,dropShadowBlur:De=0,wordWrapWidth:Ne=5e7,leading:Me=0,letterSpacing:ke,colorCorrection:Ge={},backgroundColor:Be="transparent",width:qe,height:Ke}=_e,{temperatureFilter:Ye,sharpnessFilter:tt,hueFilter:et,blurFilter:it,adjustmentFilter:nt}=withFiltersHook(Ge),{blurRadius:ot=0}=Ge;useCustomEventListener(Events.FONTS_LOADED,()=>{U.current&&U.current.updateText&&U.current.updateText(!0)}),React__namespace.useEffect(()=>{V.current=Number(Le)},[Le]);const Ze=["italic","oblique"].includes(Oe)?Oe:void 0,Je=["small-caps"].includes($e),st=["bold","bolder","lighter","100","200","300"].includes(Fe)?Fe:void 0,rt=Number(ke)>0?ke:void 0,Qe=Be==="transparent"?null:PIXI__namespace.utils.string2hex(Be),at=React__namespace.useMemo(()=>new PIXI__namespace.TextStyle({fontFamily:Ie,fontSize:Le,fill:Ve||"white",...Xe&&Ue>0&&{stroke:Xe,strokeThickness:Ue},...Ze&&{fontStyle:Ze},...Je&&{fontVariant:Je},...st&&{fontWeight:st},...rt&&{letterSpacing:rt},...je&&{dropShadow:!0,dropShadowBlur:Number(We),dropShadowColor:(ze==null?void 0:ze.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...He&&{dropShadow:!0,dropShadowBlur:Number(De),dropShadowColor:(ze==null?void 0:ze.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:Ne||500,leading:Me||0}),[je,We,Ve,Ie,Le,Oe,Me,Ze,st,Je,rt,ze,Xe,Ue,Ne,He,De]);React__namespace.useEffect(()=>{X.current={..._e}},[_e]),React__namespace.useImperativeHandle(E,()=>({setWordWrap:(pt,mt={x:1,y:1})=>{if(U.current){U.current.style.wordWrapWidth=pt,U.current.dirty=!0;const bt=1/mt.x,_t=1/mt.y;U.current.scale.set(bt,_t),U.current.updateText(!0)}},setFontSizeAndTransform:(pt,mt,bt={x:1,y:1})=>{if(U.current){U.current.style.wordWrapWidth=pt,U.current.style.fontSize=mt,U.current.dirty=!0;const _t=1/bt.x,vt=1/bt.y;U.current.scale.set(_t,vt),U.current.updateText(!0)}},resetScale:()=>{U.current&&U.current.scale.set(1,1)}}),[Ae,Re,Te]);const ht=React__namespace.useCallback((pt,mt={x:1,y:1})=>{if(U.current){U.current.style.wordWrapWidth=pt,U.current.dirty=!0;const bt=1/mt.x,_t=1/mt.y;U.current.scale.set(bt,_t),U.current.updateText(!0)}},[U.current]),ct=React__namespace.useCallback((pt,mt,bt={x:1,y:1})=>{if(U.current){U.current.style.wordWrapWidth=pt,U.current.style.fontSize=mt,U.current.dirty=!0;const _t=1/bt.x,vt=1/bt.y;U.current.scale.set(_t,vt),U.current.updateText(!0)}},[U.current,X.current]);React__namespace.useEffect(()=>{if(Qe===null||Qe===0)return;const pt=new PIXI__namespace.Graphics;pt.beginFill(Qe||16724736),pt.drawRect(0,0,qe,Ke),pt.endFill(),Y.current&&(Y.current.texture=K.renderer.generateTexture(pt),Y.current.texture.update())},[Qe,qe,Ke]);const ft=()=>{const pt=new Date().getTime();pt-B.current<300&&Ee?Ee():Se&&Se(),B.current=pt},xt=()=>{!Z&&Ee&&Ee()};return jsxRuntimeExports.jsxs(AbstractContainer,{...C,ref:E,isText:!0,onDoubleClick:xt,handleDragWordWrap:ht,handleDragFontSize:ct,children:[jsxRuntimeExports.jsx(react.Sprite,{texture:PIXI__namespace.Texture.WHITE,x:we,y:Pe,width:qe||100,height:Ke||100,anchor:.5,alpha:J&&Qe?1:0,ref:Y}),jsxRuntimeExports.jsx(react.Text,{style:at,x:we,y:Pe,anchor:.5,text:xe,alpha:J?1:0,...J&&!Z&&{interactive:!0,buttonMode:!0,pointerdown:ft},ref:U,filters:[Ye,tt,et,nt,...ot>0?[it]:[]]})]})});var root=_root,now$1=function(){return root.Date.now()},now_1=now$1,reWhitespace=/\s/;function trimmedEndIndex$1(C){for(var E=C.length;E--&&reWhitespace.test(C.charAt(E)););return E}var _trimmedEndIndex=trimmedEndIndex$1,trimmedEndIndex=_trimmedEndIndex,reTrimStart=/^\s+/;function baseTrim$1(C){return C&&C.slice(0,trimmedEndIndex(C)+1).replace(reTrimStart,"")}var _baseTrim=baseTrim$1,baseTrim=_baseTrim,isObject$1=isObject_1,isSymbol=isSymbol_1,NAN=0/0,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsOctal=/^0o[0-7]+$/i,freeParseInt=parseInt;function toNumber$1(C){if(typeof C=="number")return C;if(isSymbol(C))return NAN;if(isObject$1(C)){var E=typeof C.valueOf=="function"?C.valueOf():C;C=isObject$1(E)?E+"":E}if(typeof C!="string")return C===0?C:+C;C=baseTrim(C);var I=reIsBinary.test(C);return I||reIsOctal.test(C)?freeParseInt(C.slice(2),I?2:8):reIsBadHex.test(C)?NAN:+C}var toNumber_1=toNumber$1,isObject=isObject_1,now=now_1,toNumber=toNumber_1,FUNC_ERROR_TEXT="Expected a function",nativeMax=Math.max,nativeMin=Math.min;function debounce(C,E,I){var B,U,V,X,Y,K,J=0,xe=!1,Z=!1,_e=!0;if(typeof C!="function")throw new TypeError(FUNC_ERROR_TEXT);E=toNumber(E)||0,isObject(I)&&(xe=!!I.leading,Z="maxWait"in I,V=Z?nativeMax(toNumber(I.maxWait)||0,E):V,_e="trailing"in I?!!I.trailing:_e);function Se(Oe){var Le=B,$e=U;return B=U=void 0,J=Oe,X=C.apply($e,Le),X}function Ee(Oe){return J=Oe,Y=setTimeout(Te,E),xe?Se(Oe):X}function Ae(Oe){var Le=Oe-K,$e=Oe-J,Ve=E-Le;return Z?nativeMin(Ve,V-$e):Ve}function Re(Oe){var Le=Oe-K,$e=Oe-J;return K===void 0||Le>=E||Le<0||Z&&$e>=V}function Te(){var Oe=now();if(Re(Oe))return we(Oe);Y=setTimeout(Te,Ae(Oe))}function we(Oe){return Y=void 0,_e&&B?Se(Oe):(B=U=void 0,X)}function Pe(){Y!==void 0&&clearTimeout(Y),J=0,B=K=U=Y=void 0}function Ie(){return Y===void 0?X:we(now())}function Fe(){var Oe=now(),Le=Re(Oe);if(B=arguments,U=this,K=Oe,Le){if(Y===void 0)return Ee(K);if(Z)return clearTimeout(Y),Y=setTimeout(Te,E),Se(K)}return Y===void 0&&(Y=setTimeout(Te,E)),X}return Fe.cancel=Pe,Fe.flush=Ie,Fe}var debounce_1=debounce;const debounce$1=getDefaultExportFromCjs(debounce_1),useDebouncedPointerEvents=(C,E,I,B)=>{const U=React.useCallback(debounce$1(C,B),[C,B]),V=React.useCallback(debounce$1(E,B),[E,B]),X=React.useCallback(debounce$1(I,B),[I,B]),Y=React.useCallback(()=>{U()},[U]),K=React.useCallback(()=>{V()},[V]),J=React.useCallback(()=>{X()},[X]);return{onPointerOver:Y,onPointerDown:K,onPointerOut:J}},initialState$1={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},PixiVideoSprite=React__namespace.forwardRef((C,E)=>{const[I,B]=React__namespace.useState(!1),U=React__namespace.useRef(),V=React.useRef(null),X=React.useRef(null),Y=React.useRef(null),K=React.useRef(initialState$1),J=React.useRef(),{uniqueId:xe,mute:Z=!1,src:_e,startAt:Se,endAt:Ee,frameStartAt:Ae,frameEndAt:Re,visible:Te,disabled:we,transformation:{x:Pe,y:Ie,width:Fe,height:Oe,animation:Le,colorCorrection:$e={}},pointerdown:Ve=()=>{},pointerout:Xe=()=>{},pointerover:Ue=()=>{},fps:We=0}=C,{tl:je,dragModeRef:ze,isRemotion:He}=React.useContext(GsapPixieContext),{onPointerDown:De,onPointerOut:Ne,onPointerOver:Me}=useDebouncedPointerEvents(Ue,Ve,Xe,1),{blurRadius:ke=0,vignette:Ge=0,noise:Be=0}=$e,{temperatureFilter:qe,sharpnessFilter:Ke,hueFilter:Ye,blurFilter:tt,adjustmentFilter:et,vignetteFilter:it,noiseFilter:nt}=withFiltersHook($e),ot=_e||"",Ze=React__namespace.useMemo(()=>{const at=document.createElement("video");return at.src=_e,at.crossOrigin="Anonymus",at.autoplay=!1,at.currentTime=Ae===0?.001:Ae,at},[_e,Ae]);useCustomEventListener(Events.PAUSE,()=>{Y.current&&(Y.current.pause(),K.current.isPlaying=!1)}),useCustomEventListener(Events.SCRUBBER_CLICKED,()=>{Y.current&&(Y.current.pause(),K.current.isPlaying=!1)}),useCustomEventListener(Events.REVERSE_MODE_END,()=>{Y.current&&(Y.current.pause(),K.current.isPlaying=!1)});const Je=at=>{if(Y.current){if(Y.current.currentTime=Number(at),!ze.current){const ht=Y.current,ct=ht.currentTime>0&&!ht.paused&&!ht.ended&&ht.readyState>ht.HAVE_CURRENT_DATA;je.current&&je.current.isActive()&&J.current&&J.current.isActive()&&(ct||Y.current.play(),K.current.isPlaying=!0)}K.current.progress=0}},st=()=>{if(Y.current){const at=Y.current;at.currentTime>0&&!at.paused&&!at.ended&&at.readyState>at.HAVE_CURRENT_DATA&&Y.current.pause(),K.current.isPlaying=!1,J.current&&(K.current.progress=J.current.progress())}},rt=()=>{},Qe=()=>{var at,ht;if(J.current&&(K.current.progress=J.current.progress()),Y.current&&J.current){const ct=Ae+((at=J==null?void 0:J.current)==null?void 0:at.time()),ft=Math.abs(Y.current.currentTime-ct),xt=Y.current,pt=xt.currentTime>0&&!xt.paused&&!xt.ended&&xt.readyState>xt.HAVE_CURRENT_DATA;ze.current&&U.current?(Y.current.currentTime=ct,U.current.update(),K.current.isPlaying=!1):(pt!==K.current.isPlaying||!pt)&&K.current.progress>.01&&K.current.progress<.99?(ht=je.current)!=null&&ht.isActive()&&J.current&&J.current.isActive()&&(pt||Y.current.play(),K.current.isPlaying=!0):ft>.3&&K.current.progress>.01&&K.current.progress<.99&&(Y.current.currentTime=ct)}};return React.useEffect(()=>{let at=gsap$2.context(()=>{});if(X.current&&je.current){const ht={duration:Number(Ee)-Number(Se),onStart:Je,onComplete:st,onStartParams:[Ae,Re],onCompleteParams:[],onInterrupt:rt,onUpdate:Qe,onUpdateParams:[Ae,Re],onPause:()=>{console.log("onPause video sprite pause",xe)},onResume:()=>{console.log("onResume video sprite resume",xe)},onReverseComplete:()=>{console.log("onReverseComplete video sprite reverse complete",xe)},onKill:()=>{console.log("onKill video sprite kill",xe)}};J.current&&(J.current.kill(),je.current.remove(J.current)),at=gsap$2.context(()=>{J.current=gsap$2.to(X.current,ht,Ae),je.current.add(J.current,Se)})}return()=>{J.current&&(J.current.kill(),gsap$2.killTweensOf(J.current)),at.revert()}},[Le,Se,Ee,Ae,Re,xe]),React__namespace.useEffect(()=>{Y.current&&(Y.current.muted=Z,K.current.isMuted=Z);const at=setTimeout(()=>{Y.current&&(Y.current.muted=Z,K.current.isMuted=Z)},1500);return()=>{clearTimeout(at)}},[Z]),React__namespace.useEffect(()=>{const at=Math.round((Number(Ae)+Number.EPSILON)*100)/100,ht=function(){Y.current&&(Y.current.currentTime=at,Y.current.muted=Z)},ct=function(){K.current.isWaiting=!1,K.current.isStalled=!1},ft=function(){K.current.isWaiting=!0,K.current.isStalled=!1},xt=function(){K.current.isWaiting=!1,K.current.isStalled=!1},pt=function(){K.current.isWaiting=!1,K.current.isStalled=!0},mt=Math.round((Number(Ae)+Number.EPSILON)*100)/100,bt=Math.round((Number(Re)+Number.EPSILON)*100)/100,_t=`${ot}#t=${mt},${bt}`;return PIXI__namespace.Texture.fromLoader(Ze,_t,xe,{pixiIdPrefix:xe,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:We?Math.max(120,Number(We)):30}}).then(vt=>{vt&&(U.current=vt,B(!0),Y.current=vt.baseTexture.resource.source,Y.current.id=xe,Y.current.addEventListener("loadedmetadata",ht),Y.current.addEventListener("ended",ct),Y.current.addEventListener("loadstart",ft),Y.current.addEventListener("canplaythrough",xt),Y.current.addEventListener("stalled",pt))}),()=>{Y.current&&(Y.current.pause(),Y.current.removeEventListener("loadedmetadata",ht),Y.current.removeEventListener("ended",ct),Y.current.removeEventListener("loadstart",ft),Y.current.removeEventListener("canplaythrough",xt),Y.current.removeEventListener("stalled",pt))}},[ot,xe,Ae,Re,Ze]),React__namespace.useEffect(()=>{const at=setTimeout(()=>{I&&U.current&&J.current&&je.current&&J.current.progress()<.1&&Y.current&&!J.current.isActive()&&!He&&(Y.current.currentTime=Ae,U.current.update())},30);return()=>{clearTimeout(at)}},[I]),jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,ignoreTlForVideo:!0,pointerdown:De,pointerover:Me,pointerout:Ne,children:jsxRuntimeExports.jsx(react.Container,{ref:X,children:U.current&&jsxRuntimeExports.jsx(react.Sprite,{texture:U.current,width:Fe,height:Oe,anchor:.5,x:Pe,y:Ie,ref:V,alpha:Te?1:0,...!we&&Te&&{interactive:!0,pointerdown:Ve},filters:[qe,Ke,Ye,et,...ke>0?[tt]:[],...Ge>0?[it]:[],...Be>0?[nt]:[]]})})})});PixiVideoSprite.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const PixiVideoCanvasSyncSprite=React__namespace.forwardRef((C,E)=>{const[I,B]=React__namespace.useState(),U=React.useRef(null),V=React.useRef(null),{visible:X,disabled:Y,transformation:{x:K,y:J,width:xe,height:Z,colorCorrection:_e={}},pointerdown:Se=()=>{},pointerout:Ee=()=>{},pointerover:Ae=()=>{},canvasImageRef:Re}=C,Te=Re&&(Re==null?void 0:Re.getCanvas()),we=react.useApp(),{onPointerDown:Pe,onPointerOut:Ie,onPointerOver:Fe}=useDebouncedPointerEvents(Ae,Se,Ee,1),{blurRadius:Oe=0,vignette:Le=0,noise:$e=0}=_e,{temperatureFilter:Ve,sharpnessFilter:Xe,hueFilter:Ue,blurFilter:We,adjustmentFilter:je,vignetteFilter:ze,noiseFilter:He}=withFiltersHook(_e);return react.useTick(()=>{if(U.current&&U.current.texture){const De=U.current.texture.baseTexture;De&&De.update(),V.current&&we.renderer.render(V.current)}}),React__namespace.useEffect(()=>{if(!isEmpty$1(Te)){const De=PIXI__namespace.Texture.from(Te);B(De)}},[Te]),jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,ignoreTlForVideo:!0,pointerdown:Pe,pointerover:Fe,pointerout:Ie,children:jsxRuntimeExports.jsx(react.Container,{ref:V,children:I&&jsxRuntimeExports.jsx(react.Sprite,{texture:I,width:xe,height:Z,anchor:.5,x:K,y:J,ref:U,alpha:X?1:0,...!Y&&X&&{interactive:!0,pointerdown:Se},filters:[Ve,Xe,Ue,je,...Oe>0?[We]:[],...Le>0?[ze]:[],...$e>0?[He]:[]]})})})}),PixiSequence=C=>{const{startAt:E,endAt:I,uniqueId:B}=C,U=React.useRef(null),V=React.useRef(null),X=React.useRef(null),Y=React.useRef(null),{tl:K,totalDuration:J=0}=React.useContext(GsapPixieContext);return React__namespace.useEffect(()=>{const xe=gsap$2.context(()=>{if(U.current&&K.current){Y.current&&(Y.current.kill(),K.current.remove(Y.current));const Z=E<.2?1:0;Y.current=gsap$2.timeline().set(U.current,{alpha:Z}).set(U.current,{pixi:{alpha:1,eventMode:"static"}},.01).to(U.current,{pixi:{},duration:Number(I)-Number(E)}).set(U.current,{alpha:0,eventMode:"none"}),K.current.add([Y.current],E)}});return()=>{Y.current&&(K.current.remove(Y.current),Y.current.progress(0).kill()),xe.revert()}},[E,I,J,B]),jsxRuntimeExports.jsx(react.Container,{ref:U,alpha:E<.2?1:0,eventMode:E<.2?"static":"none",children:jsxRuntimeExports.jsx(react.Container,{ref:X,children:jsxRuntimeExports.jsx(react.Container,{ref:V,alpha:1,children:C.children})})})},PixiSequenceWrapper=C=>{const{startAt:E,endAt:I}=C,{setTotalDuration:B}=React.useContext(GsapPixieContext);return React__namespace.useEffect(()=>{B&&B(Number(I)+.2)},[E,I]),C.children},PixiRemotionSprite=React__namespace.forwardRef((C,E)=>{const[I,B]=React__namespace.useState(),U=React.useRef(null),V=React.useRef(null),{visible:X,disabled:Y,transformation:{x:K,y:J,width:xe,height:Z,colorCorrection:_e={}},pointerdown:Se=()=>{},pointerout:Ee=()=>{},pointerover:Ae=()=>{},canvasImageRef:Re}=C,Te=Re&&(Re==null?void 0:Re.getCanvas()),we=react.useApp(),{onPointerDown:Pe,onPointerOut:Ie,onPointerOver:Fe}=useDebouncedPointerEvents(Ae,Se,Ee,1),{blurRadius:Oe=0,vignette:Le=0,noise:$e=0}=_e,{temperatureFilter:Ve,sharpnessFilter:Xe,hueFilter:Ue,blurFilter:We,adjustmentFilter:je,vignetteFilter:ze,noiseFilter:He}=withFiltersHook(_e);return react.useTick(()=>{if(U.current&&U.current.texture){const De=U.current.texture.baseTexture;De&&De.update(),V.current&&we.renderer.render(V.current)}}),React__namespace.useEffect(()=>{if(!isEmpty$1(Te)){const De=PIXI__namespace.Texture.from(Te);B(De)}},[Te]),jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,ignoreTlForVideo:!0,pointerdown:Pe,pointerover:Fe,pointerout:Ie,children:jsxRuntimeExports.jsx(react.Container,{ref:V,children:I&&jsxRuntimeExports.jsx(react.Sprite,{texture:I,width:xe,height:Z,anchor:.5,x:K,y:J,ref:U,alpha:X?1:0,...!Y&&X&&{interactive:!0,pointerdown:Se},filters:[Ve,Xe,Ue,je,...Oe>0?[We]:[],...Le>0?[ze]:[],...$e>0?[He]:[]]})})})});var lottie$1={exports:{}};(function(module,exports){typeof navigator<"u"&&function(C,E){module.exports=E()}(commonjsGlobal$1,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(E){_useWebWorker=!!E},getWebWorker=function(){return _useWebWorker},setLocationHref=function(E){locationHref=E},getLocationHref=function(){return locationHref};function createTag(C){return document.createElement(C)}function extendPrototype(C,E){var I,B=C.length,U;for(I=0;I<B;I+=1){U=C[I].prototype;for(var V in U)Object.prototype.hasOwnProperty.call(U,V)&&(E.prototype[V]=U[V])}}function getDescriptor(C,E){return Object.getOwnPropertyDescriptor(C,E)}function createProxyFunction(C){function E(){}return E.prototype=C,E}var audioControllerFactory=function(){function C(E){this.audios=[],this.audioFactory=E,this._volume=1,this._isMuted=!1}return C.prototype={addAudio:function(I){this.audios.push(I)},pause:function(){var I,B=this.audios.length;for(I=0;I<B;I+=1)this.audios[I].pause()},resume:function(){var I,B=this.audios.length;for(I=0;I<B;I+=1)this.audios[I].resume()},setRate:function(I){var B,U=this.audios.length;for(B=0;B<U;B+=1)this.audios[B].setRate(I)},createAudio:function(I){return this.audioFactory?this.audioFactory(I):window.Howl?new window.Howl({src:[I]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(I){this.audioFactory=I},setVolume:function(I){this._volume=I,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var I,B=this.audios.length;for(I=0;I<B;I+=1)this.audios[I].volume(this._volume*(this._isMuted?0:1))}},function(){return new C}}(),createTypedArray=function(){function C(I,B){var U=0,V=[],X;switch(I){case"int16":case"uint8c":X=1;break;default:X=1.1;break}for(U=0;U<B;U+=1)V.push(X);return V}function E(I,B){return I==="float32"?new Float32Array(B):I==="int16"?new Int16Array(B):I==="uint8c"?new Uint8ClampedArray(B):C(I,B)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?E:C}();function createSizedArray(C){return Array.apply(null,{length:C})}function _typeof$6(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$6=function(I){return typeof I}:_typeof$6=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},_typeof$6(C)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};(function(){var C=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],E,I=C.length;for(E=0;E<I;E+=1)BMMath[C[E]]=Math[C[E]]})(),BMMath.random=Math.random,BMMath.abs=function(C){var E=_typeof$6(C);if(E==="object"&&C.length){var I=createSizedArray(C.length),B,U=C.length;for(B=0;B<U;B+=1)I[B]=Math.abs(C[B]);return I}return Math.abs(C)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function styleDiv(C){C.style.position="absolute",C.style.top=0,C.style.left=0,C.style.display="block",C.style.transformOrigin="0 0",C.style.webkitTransformOrigin="0 0",C.style.backfaceVisibility="visible",C.style.webkitBackfaceVisibility="visible",C.style.transformStyle="preserve-3d",C.style.webkitTransformStyle="preserve-3d",C.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(C,E,I,B){this.type=C,this.currentTime=E,this.totalTime=I,this.direction=B<0?-1:1}function BMCompleteEvent(C,E){this.type=C,this.direction=E<0?-1:1}function BMCompleteLoopEvent(C,E,I,B){this.type=C,this.currentLoop=I,this.totalLoops=E,this.direction=B<0?-1:1}function BMSegmentStartEvent(C,E,I){this.type=C,this.firstFrame=E,this.totalFrames=I}function BMDestroyEvent(C,E){this.type=C,this.target=E}function BMRenderFrameErrorEvent(C,E){this.type="renderFrameError",this.nativeError=C,this.currentTime=E}function BMConfigErrorEvent(C){this.type="configError",this.nativeError=C}var createElementID=function(){var C=0;return function(){return C+=1,idPrefix$1+"__lottie_element_"+C}}();function HSVtoRGB(C,E,I){var B,U,V,X,Y,K,J,xe;switch(X=Math.floor(C*6),Y=C*6-X,K=I*(1-E),J=I*(1-Y*E),xe=I*(1-(1-Y)*E),X%6){case 0:B=I,U=xe,V=K;break;case 1:B=J,U=I,V=K;break;case 2:B=K,U=I,V=xe;break;case 3:B=K,U=J,V=I;break;case 4:B=xe,U=K,V=I;break;case 5:B=I,U=K,V=J;break}return[B,U,V]}function RGBtoHSV(C,E,I){var B=Math.max(C,E,I),U=Math.min(C,E,I),V=B-U,X,Y=B===0?0:V/B,K=B/255;switch(B){case U:X=0;break;case C:X=E-I+V*(E<I?6:0),X/=6*V;break;case E:X=I-C+V*2,X/=6*V;break;case I:X=C-E+V*4,X/=6*V;break}return[X,Y,K]}function addSaturationToRGB(C,E){var I=RGBtoHSV(C[0]*255,C[1]*255,C[2]*255);return I[1]+=E,I[1]>1?I[1]=1:I[1]<=0&&(I[1]=0),HSVtoRGB(I[0],I[1],I[2])}function addBrightnessToRGB(C,E){var I=RGBtoHSV(C[0]*255,C[1]*255,C[2]*255);return I[2]+=E,I[2]>1?I[2]=1:I[2]<0&&(I[2]=0),HSVtoRGB(I[0],I[1],I[2])}function addHueToRGB(C,E){var I=RGBtoHSV(C[0]*255,C[1]*255,C[2]*255);return I[0]+=E/360,I[0]>1?I[0]-=1:I[0]<0&&(I[0]+=1),HSVtoRGB(I[0],I[1],I[2])}var rgbToHex=function(){var C=[],E,I;for(E=0;E<256;E+=1)I=E.toString(16),C[E]=I.length===1?"0"+I:I;return function(B,U,V){return B<0&&(B=0),U<0&&(U=0),V<0&&(V=0),"#"+C[B]+C[U]+C[V]}}(),setSubframeEnabled=function(E){subframeEnabled=!!E},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(E){expressionsPlugin=E},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(E){expressionsInterfaces=E},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(E){defaultCurveSegments=E},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(E){idPrefix$1=E};function createNS(C){return document.createElementNS(svgNS,C)}function _typeof$5(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function(I){return typeof I}:_typeof$5=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},_typeof$5(C)}var dataManager=function(){var C=1,E=[],I,B,U={onmessage:function(){},postMessage:function(Se){I({data:Se})}},V={postMessage:function(Se){U.onmessage({data:Se})}};function X(_e){if(window.Worker&&window.Blob&&getWebWorker()){var Se=new Blob(["var _workerSelf = self; self.onmessage = ",_e.toString()],{type:"text/javascript"}),Ee=URL.createObjectURL(Se);return new Worker(Ee)}return I=_e,U}function Y(){B||(B=X(function(Se){function Ee(){function Re(He,De){var Ne,Me,ke=He.length,Ge,Be,qe,Ke;for(Me=0;Me<ke;Me+=1)if(Ne=He[Me],"ks"in Ne&&!Ne.completed){if(Ne.completed=!0,Ne.hasMask){var Ye=Ne.masksProperties;for(Be=Ye.length,Ge=0;Ge<Be;Ge+=1)if(Ye[Ge].pt.k.i)Fe(Ye[Ge].pt.k);else for(Ke=Ye[Ge].pt.k.length,qe=0;qe<Ke;qe+=1)Ye[Ge].pt.k[qe].s&&Fe(Ye[Ge].pt.k[qe].s[0]),Ye[Ge].pt.k[qe].e&&Fe(Ye[Ge].pt.k[qe].e[0])}Ne.ty===0?(Ne.layers=Pe(Ne.refId,De),Re(Ne.layers,De)):Ne.ty===4?Ie(Ne.shapes):Ne.ty===5&&je(Ne)}}function Te(He,De){if(He){var Ne=0,Me=He.length;for(Ne=0;Ne<Me;Ne+=1)He[Ne].t===1&&(He[Ne].data.layers=Pe(He[Ne].data.refId,De),Re(He[Ne].data.layers,De))}}function we(He,De){for(var Ne=0,Me=De.length;Ne<Me;){if(De[Ne].id===He)return De[Ne];Ne+=1}return null}function Pe(He,De){var Ne=we(He,De);return Ne?Ne.layers.__used?JSON.parse(JSON.stringify(Ne.layers)):(Ne.layers.__used=!0,Ne.layers):null}function Ie(He){var De,Ne=He.length,Me,ke;for(De=Ne-1;De>=0;De-=1)if(He[De].ty==="sh")if(He[De].ks.k.i)Fe(He[De].ks.k);else for(ke=He[De].ks.k.length,Me=0;Me<ke;Me+=1)He[De].ks.k[Me].s&&Fe(He[De].ks.k[Me].s[0]),He[De].ks.k[Me].e&&Fe(He[De].ks.k[Me].e[0]);else He[De].ty==="gr"&&Ie(He[De].it)}function Fe(He){var De,Ne=He.i.length;for(De=0;De<Ne;De+=1)He.i[De][0]+=He.v[De][0],He.i[De][1]+=He.v[De][1],He.o[De][0]+=He.v[De][0],He.o[De][1]+=He.v[De][1]}function Oe(He,De){var Ne=De?De.split("."):[100,100,100];return He[0]>Ne[0]?!0:Ne[0]>He[0]?!1:He[1]>Ne[1]?!0:Ne[1]>He[1]?!1:He[2]>Ne[2]?!0:Ne[2]>He[2]?!1:null}var Le=function(){var He=[4,4,14];function De(Me){var ke=Me.t.d;Me.t.d={k:[{s:ke,t:0}]}}function Ne(Me){var ke,Ge=Me.length;for(ke=0;ke<Ge;ke+=1)Me[ke].ty===5&&De(Me[ke])}return function(Me){if(Oe(He,Me.v)&&(Ne(Me.layers),Me.assets)){var ke,Ge=Me.assets.length;for(ke=0;ke<Ge;ke+=1)Me.assets[ke].layers&&Ne(Me.assets[ke].layers)}}}(),$e=function(){var He=[4,7,99];return function(De){if(De.chars&&!Oe(He,De.v)){var Ne,Me=De.chars.length;for(Ne=0;Ne<Me;Ne+=1){var ke=De.chars[Ne];ke.data&&ke.data.shapes&&(Ie(ke.data.shapes),ke.data.ip=0,ke.data.op=99999,ke.data.st=0,ke.data.sr=1,ke.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},De.chars[Ne].t||(ke.data.shapes.push({ty:"no"}),ke.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}}(),Ve=function(){var He=[5,7,15];function De(Me){var ke=Me.t.p;typeof ke.a=="number"&&(ke.a={a:0,k:ke.a}),typeof ke.p=="number"&&(ke.p={a:0,k:ke.p}),typeof ke.r=="number"&&(ke.r={a:0,k:ke.r})}function Ne(Me){var ke,Ge=Me.length;for(ke=0;ke<Ge;ke+=1)Me[ke].ty===5&&De(Me[ke])}return function(Me){if(Oe(He,Me.v)&&(Ne(Me.layers),Me.assets)){var ke,Ge=Me.assets.length;for(ke=0;ke<Ge;ke+=1)Me.assets[ke].layers&&Ne(Me.assets[ke].layers)}}}(),Xe=function(){var He=[4,1,9];function De(Me){var ke,Ge=Me.length,Be,qe;for(ke=0;ke<Ge;ke+=1)if(Me[ke].ty==="gr")De(Me[ke].it);else if(Me[ke].ty==="fl"||Me[ke].ty==="st")if(Me[ke].c.k&&Me[ke].c.k[0].i)for(qe=Me[ke].c.k.length,Be=0;Be<qe;Be+=1)Me[ke].c.k[Be].s&&(Me[ke].c.k[Be].s[0]/=255,Me[ke].c.k[Be].s[1]/=255,Me[ke].c.k[Be].s[2]/=255,Me[ke].c.k[Be].s[3]/=255),Me[ke].c.k[Be].e&&(Me[ke].c.k[Be].e[0]/=255,Me[ke].c.k[Be].e[1]/=255,Me[ke].c.k[Be].e[2]/=255,Me[ke].c.k[Be].e[3]/=255);else Me[ke].c.k[0]/=255,Me[ke].c.k[1]/=255,Me[ke].c.k[2]/=255,Me[ke].c.k[3]/=255}function Ne(Me){var ke,Ge=Me.length;for(ke=0;ke<Ge;ke+=1)Me[ke].ty===4&&De(Me[ke].shapes)}return function(Me){if(Oe(He,Me.v)&&(Ne(Me.layers),Me.assets)){var ke,Ge=Me.assets.length;for(ke=0;ke<Ge;ke+=1)Me.assets[ke].layers&&Ne(Me.assets[ke].layers)}}}(),Ue=function(){var He=[4,4,18];function De(Me){var ke,Ge=Me.length,Be,qe;for(ke=Ge-1;ke>=0;ke-=1)if(Me[ke].ty==="sh")if(Me[ke].ks.k.i)Me[ke].ks.k.c=Me[ke].closed;else for(qe=Me[ke].ks.k.length,Be=0;Be<qe;Be+=1)Me[ke].ks.k[Be].s&&(Me[ke].ks.k[Be].s[0].c=Me[ke].closed),Me[ke].ks.k[Be].e&&(Me[ke].ks.k[Be].e[0].c=Me[ke].closed);else Me[ke].ty==="gr"&&De(Me[ke].it)}function Ne(Me){var ke,Ge,Be=Me.length,qe,Ke,Ye,tt;for(Ge=0;Ge<Be;Ge+=1){if(ke=Me[Ge],ke.hasMask){var et=ke.masksProperties;for(Ke=et.length,qe=0;qe<Ke;qe+=1)if(et[qe].pt.k.i)et[qe].pt.k.c=et[qe].cl;else for(tt=et[qe].pt.k.length,Ye=0;Ye<tt;Ye+=1)et[qe].pt.k[Ye].s&&(et[qe].pt.k[Ye].s[0].c=et[qe].cl),et[qe].pt.k[Ye].e&&(et[qe].pt.k[Ye].e[0].c=et[qe].cl)}ke.ty===4&&De(ke.shapes)}}return function(Me){if(Oe(He,Me.v)&&(Ne(Me.layers),Me.assets)){var ke,Ge=Me.assets.length;for(ke=0;ke<Ge;ke+=1)Me.assets[ke].layers&&Ne(Me.assets[ke].layers)}}}();function We(He){He.__complete||(Xe(He),Le(He),$e(He),Ve(He),Ue(He),Re(He.layers,He.assets),Te(He.chars,He.assets),He.__complete=!0)}function je(He){He.t.a.length===0&&"m"in He.t.p}var ze={};return ze.completeData=We,ze.checkColors=Xe,ze.checkChars=$e,ze.checkPathProperties=Ve,ze.checkShapes=Ue,ze.completeLayers=Re,ze}if(V.dataManager||(V.dataManager=Ee()),V.assetLoader||(V.assetLoader=function(){function Re(we){var Pe=we.getResponseHeader("content-type");return Pe&&we.responseType==="json"&&Pe.indexOf("json")!==-1||we.response&&_typeof$5(we.response)==="object"?we.response:we.response&&typeof we.response=="string"?JSON.parse(we.response):we.responseText?JSON.parse(we.responseText):null}function Te(we,Pe,Ie,Fe){var Oe,Le=new XMLHttpRequest;try{Le.responseType="json"}catch{}Le.onreadystatechange=function(){if(Le.readyState===4)if(Le.status===200)Oe=Re(Le),Ie(Oe);else try{Oe=Re(Le),Ie(Oe)}catch($e){Fe&&Fe($e)}};try{Le.open(["G","E","T"].join(""),we,!0)}catch{Le.open(["G","E","T"].join(""),Pe+"/"+we,!0)}Le.send()}return{load:Te}}()),Se.data.type==="loadAnimation")V.assetLoader.load(Se.data.path,Se.data.fullPath,function(Re){V.dataManager.completeData(Re),V.postMessage({id:Se.data.id,payload:Re,status:"success"})},function(){V.postMessage({id:Se.data.id,status:"error"})});else if(Se.data.type==="complete"){var Ae=Se.data.animation;V.dataManager.completeData(Ae),V.postMessage({id:Se.data.id,payload:Ae,status:"success"})}else Se.data.type==="loadData"&&V.assetLoader.load(Se.data.path,Se.data.fullPath,function(Re){V.postMessage({id:Se.data.id,payload:Re,status:"success"})},function(){V.postMessage({id:Se.data.id,status:"error"})})}),B.onmessage=function(_e){var Se=_e.data,Ee=Se.id,Ae=E[Ee];E[Ee]=null,Se.status==="success"?Ae.onComplete(Se.payload):Ae.onError&&Ae.onError()})}function K(_e,Se){C+=1;var Ee="processId_"+C;return E[Ee]={onComplete:_e,onError:Se},Ee}function J(_e,Se,Ee){Y();var Ae=K(Se,Ee);B.postMessage({type:"loadAnimation",path:_e,fullPath:window.location.origin+window.location.pathname,id:Ae})}function xe(_e,Se,Ee){Y();var Ae=K(Se,Ee);B.postMessage({type:"loadData",path:_e,fullPath:window.location.origin+window.location.pathname,id:Ae})}function Z(_e,Se,Ee){Y();var Ae=K(Se,Ee);B.postMessage({type:"complete",animation:_e,id:Ae})}return{loadAnimation:J,loadData:xe,completeAnimation:Z}}(),ImagePreloader=function(){var C=function(){var Te=createTag("canvas");Te.width=1,Te.height=1;var we=Te.getContext("2d");return we.fillStyle="rgba(0,0,0,0)",we.fillRect(0,0,1,1),Te}();function E(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function I(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function B(Te,we,Pe){var Ie="";if(Te.e)Ie=Te.p;else if(we){var Fe=Te.p;Fe.indexOf("images/")!==-1&&(Fe=Fe.split("/")[1]),Ie=we+Fe}else Ie=Pe,Ie+=Te.u?Te.u:"",Ie+=Te.p;return Ie}function U(Te){var we=0,Pe=setInterval((function(){var Ie=Te.getBBox();(Ie.width||we>500)&&(this._imageLoaded(),clearInterval(Pe)),we+=1}).bind(this),50)}function V(Te){var we=B(Te,this.assetsPath,this.path),Pe=createNS("image");isSafari?this.testImageLoaded(Pe):Pe.addEventListener("load",this._imageLoaded,!1),Pe.addEventListener("error",(function(){Ie.img=C,this._imageLoaded()}).bind(this),!1),Pe.setAttributeNS("http://www.w3.org/1999/xlink","href",we),this._elementHelper.append?this._elementHelper.append(Pe):this._elementHelper.appendChild(Pe);var Ie={img:Pe,assetData:Te};return Ie}function X(Te){var we=B(Te,this.assetsPath,this.path),Pe=createTag("img");Pe.crossOrigin="anonymous",Pe.addEventListener("load",this._imageLoaded,!1),Pe.addEventListener("error",(function(){Ie.img=C,this._imageLoaded()}).bind(this),!1),Pe.src=we;var Ie={img:Pe,assetData:Te};return Ie}function Y(Te){var we={assetData:Te},Pe=B(Te,this.assetsPath,this.path);return dataManager.loadData(Pe,(function(Ie){we.img=Ie,this._footageLoaded()}).bind(this),(function(){we.img={},this._footageLoaded()}).bind(this)),we}function K(Te,we){this.imagesLoadedCb=we;var Pe,Ie=Te.length;for(Pe=0;Pe<Ie;Pe+=1)Te[Pe].layers||(!Te[Pe].t||Te[Pe].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(Te[Pe]))):Te[Pe].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(Te[Pe]))))}function J(Te){this.path=Te||""}function xe(Te){this.assetsPath=Te||""}function Z(Te){for(var we=0,Pe=this.images.length;we<Pe;){if(this.images[we].assetData===Te)return this.images[we].img;we+=1}return null}function _e(){this.imagesLoadedCb=null,this.images.length=0}function Se(){return this.totalImages===this.loadedAssets}function Ee(){return this.totalFootages===this.loadedFootagesCount}function Ae(Te,we){Te==="svg"?(this._elementHelper=we,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function Re(){this._imageLoaded=E.bind(this),this._footageLoaded=I.bind(this),this.testImageLoaded=U.bind(this),this.createFootageData=Y.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return Re.prototype={loadAssets:K,setAssetsPath:xe,setPath:J,loadedImages:Se,loadedFootages:Ee,destroy:_e,getAsset:Z,createImgData:X,createImageData:V,imageLoaded:E,footageLoaded:I,setCacheType:Ae},Re}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(E,I){if(this._cbs[E])for(var B=this._cbs[E],U=0;U<B.length;U+=1)B[U](I)},addEventListener:function(E,I){return this._cbs[E]||(this._cbs[E]=[]),this._cbs[E].push(I),(function(){this.removeEventListener(E,I)}).bind(this)},removeEventListener:function(E,I){if(!I)this._cbs[E]=null;else if(this._cbs[E]){for(var B=0,U=this._cbs[E].length;B<U;)this._cbs[E][B]===I&&(this._cbs[E].splice(B,1),B-=1,U-=1),B+=1;this._cbs[E].length||(this._cbs[E]=null)}}};var markerParser=function(){function C(E){for(var I=E.split(`\r
1998
+ `),B={},U,V=0,X=0;X<I.length;X+=1)U=I[X].split(":"),U.length===2&&(B[U[0]]=U[1].trim(),V+=1);if(V===0)throw new Error;return B}return function(E){for(var I=[],B=0;B<E.length;B+=1){var U=E[B],V={time:U.tm,duration:U.dr};try{V.payload=JSON.parse(E[B].cm)}catch{try{V.payload=C(E[B].cm)}catch{V.payload={name:E[B].cm}}}I.push(V)}return I}}(),ProjectInterface=function(){function C(E){this.compositions.push(E)}return function(){function E(I){for(var B=0,U=this.compositions.length;B<U;){if(this.compositions[B].data&&this.compositions[B].data.nm===I)return this.compositions[B].prepareFrame&&this.compositions[B].data.xt&&this.compositions[B].prepareFrame(this.currentFrame),this.compositions[B].compInterface;B+=1}return null}return E.compositions=[],E.currentFrame=0,E.registerComposition=C,E}}(),renderers={},registerRenderer=function(E,I){renderers[E]=I};function getRenderer(C){return renderers[C]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var C in renderers)if(renderers[C])return C;return""}function _typeof$4(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$4=function(I){return typeof I}:_typeof$4=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},_typeof$4(C)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(C){(C.wrapper||C.container)&&(this.wrapper=C.wrapper||C.container);var E="svg";C.animType?E=C.animType:C.renderer&&(E=C.renderer);var I=getRenderer(E);this.renderer=new I(this,C.rendererSettings),this.imagePreloader.setCacheType(E,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=E,C.loop===""||C.loop===null||C.loop===void 0||C.loop===!0?this.loop=!0:C.loop===!1?this.loop=!1:this.loop=parseInt(C.loop,10),this.autoplay="autoplay"in C?C.autoplay:!0,this.name=C.name?C.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(C,"autoloadSegments")?C.autoloadSegments:!0,this.assetsPath=C.assetsPath,this.initialSegment=C.initialSegment,C.audioFactory&&this.audioController.setAudioFactory(C.audioFactory),C.animationData?this.setupAnimation(C.animationData):C.path&&(C.path.lastIndexOf("\\")!==-1?this.path=C.path.substr(0,C.path.lastIndexOf("\\")+1):this.path=C.path.substr(0,C.path.lastIndexOf("/")+1),this.fileName=C.path.substr(C.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(C.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(C){dataManager.completeAnimation(C,this.configAnimation)},AnimationItem.prototype.setData=function(C,E){E&&_typeof$4(E)!=="object"&&(E=JSON.parse(E));var I={wrapper:C,animationData:E},B=C.attributes;I.path=B.getNamedItem("data-animation-path")?B.getNamedItem("data-animation-path").value:B.getNamedItem("data-bm-path")?B.getNamedItem("data-bm-path").value:B.getNamedItem("bm-path")?B.getNamedItem("bm-path").value:"",I.animType=B.getNamedItem("data-anim-type")?B.getNamedItem("data-anim-type").value:B.getNamedItem("data-bm-type")?B.getNamedItem("data-bm-type").value:B.getNamedItem("bm-type")?B.getNamedItem("bm-type").value:B.getNamedItem("data-bm-renderer")?B.getNamedItem("data-bm-renderer").value:B.getNamedItem("bm-renderer")?B.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var U=B.getNamedItem("data-anim-loop")?B.getNamedItem("data-anim-loop").value:B.getNamedItem("data-bm-loop")?B.getNamedItem("data-bm-loop").value:B.getNamedItem("bm-loop")?B.getNamedItem("bm-loop").value:"";U==="false"?I.loop=!1:U==="true"?I.loop=!0:U!==""&&(I.loop=parseInt(U,10));var V=B.getNamedItem("data-anim-autoplay")?B.getNamedItem("data-anim-autoplay").value:B.getNamedItem("data-bm-autoplay")?B.getNamedItem("data-bm-autoplay").value:B.getNamedItem("bm-autoplay")?B.getNamedItem("bm-autoplay").value:!0;I.autoplay=V!=="false",I.name=B.getNamedItem("data-name")?B.getNamedItem("data-name").value:B.getNamedItem("data-bm-name")?B.getNamedItem("data-bm-name").value:B.getNamedItem("bm-name")?B.getNamedItem("bm-name").value:"";var X=B.getNamedItem("data-anim-prerender")?B.getNamedItem("data-anim-prerender").value:B.getNamedItem("data-bm-prerender")?B.getNamedItem("data-bm-prerender").value:B.getNamedItem("bm-prerender")?B.getNamedItem("bm-prerender").value:"";X==="false"&&(I.prerender=!1),I.path?this.setParams(I):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(C){C.op>this.animationData.op&&(this.animationData.op=C.op,this.totalFrames=Math.floor(C.op-this.animationData.ip));var E=this.animationData.layers,I,B=E.length,U=C.layers,V,X=U.length;for(V=0;V<X;V+=1)for(I=0;I<B;){if(E[I].id===U[V].id){E[I]=U[V];break}I+=1}if((C.chars||C.fonts)&&(this.renderer.globalData.fontManager.addChars(C.chars),this.renderer.globalData.fontManager.addFonts(C.fonts,this.renderer.globalData.defs)),C.assets)for(B=C.assets.length,I=0;I<B;I+=1)this.animationData.assets.push(C.assets[I]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(C){this.animationData=C;var E=getExpressionsPlugin();E&&E.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var C=this.animationData.segments;if(!C||C.length===0||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var E=C.shift();this.timeCompleted=E.time*this.frameRate;var I=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(I,this.includeLayers.bind(this),(function(){this.trigger("data_failed")}).bind(this))},AnimationItem.prototype.loadSegments=function(){var C=this.animationData.segments;C||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(C){if(this.renderer)try{this.animationData=C,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(C),C.assets||(C.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(C.assets),this.markers=markerParser(C.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(E){this.triggerConfigError(E)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var C=getExpressionsPlugin();C&&C.initExpressions(this),this.renderer.initItems(),setTimeout((function(){this.trigger("DOMLoaded")}).bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(C,E){var I=typeof C=="number"?C:void 0,B=typeof E=="number"?E:void 0;this.renderer.updateContainerSize(I,B)},AnimationItem.prototype.setSubframe=function(C){this.isSubframeEnabled=!!C},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(C){this.triggerRenderFrameError(C)}},AnimationItem.prototype.play=function(C){C&&this.name!==C||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(C){C&&this.name!==C||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(C){C&&this.name!==C||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(C){C&&this.name!==C||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(C){for(var E,I=0;I<this.markers.length;I+=1)if(E=this.markers[I],E.payload&&E.payload.name===C)return E;return null},AnimationItem.prototype.goToAndStop=function(C,E,I){if(!(I&&this.name!==I)){var B=Number(C);if(isNaN(B)){var U=this.getMarkerData(C);U&&this.goToAndStop(U.time,!0)}else E?this.setCurrentRawFrameValue(C):this.setCurrentRawFrameValue(C*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(C,E,I){if(!(I&&this.name!==I)){var B=Number(C);if(isNaN(B)){var U=this.getMarkerData(C);U&&(U.duration?this.playSegments([U.time,U.time+U.duration],!0):this.goToAndStop(U.time,!0))}else this.goToAndStop(B,E,I);this.play()}},AnimationItem.prototype.advanceTime=function(C){if(!(this.isPaused===!0||this.isLoaded===!1)){var E=this.currentRawFrame+C*this.frameModifier,I=!1;E>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(E>this.totalFrames?E%this.totalFrames:0)||(I=!0,E=this.totalFrames-1):E>=this.totalFrames?(this.playCount+=1,this.checkSegments(E%this.totalFrames)||(this.setCurrentRawFrameValue(E%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(E):E<0?this.checkSegments(E%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+E%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(I=!0,E=0)):this.setCurrentRawFrameValue(E),I&&(this.setCurrentRawFrameValue(E),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(C,E){this.playCount=0,C[1]<C[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=C[0]-C[1],this.timeCompleted=this.totalFrames,this.firstFrame=C[1],this.setCurrentRawFrameValue(this.totalFrames-.001-E)):C[1]>C[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=C[1]-C[0],this.timeCompleted=this.totalFrames,this.firstFrame=C[0],this.setCurrentRawFrameValue(.001+E)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(C,E){var I=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<C?I=C:this.currentRawFrame+this.firstFrame>E&&(I=E-C)),this.firstFrame=C,this.totalFrames=E-C,this.timeCompleted=this.totalFrames,I!==-1&&this.goToAndStop(I,!0)},AnimationItem.prototype.playSegments=function(C,E){if(E&&(this.segments.length=0),_typeof$4(C[0])==="object"){var I,B=C.length;for(I=0;I<B;I+=1)this.segments.push(C[I])}else this.segments.push(C);this.segments.length&&E&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(C){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),C&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(C){return this.segments.length?(this.adjustSegment(this.segments.shift(),C),!0):!1},AnimationItem.prototype.destroy=function(C){C&&this.name!==C||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(C){this.currentRawFrame=C,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(C){this.playSpeed=C,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(C){this.playDirection=C<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(C){this.loop=C},AnimationItem.prototype.setVolume=function(C,E){E&&this.name!==E||this.audioController.setVolume(C)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(C){C&&this.name!==C||this.audioController.mute()},AnimationItem.prototype.unmute=function(C){C&&this.name!==C||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(C){var E="";if(C.e)E=C.p;else if(this.assetsPath){var I=C.p;I.indexOf("images/")!==-1&&(I=I.split("/")[1]),E=this.assetsPath+I}else E=this.path,E+=C.u?C.u:"",E+=C.p;return E},AnimationItem.prototype.getAssetData=function(C){for(var E=0,I=this.assets.length;E<I;){if(C===this.assets[E].id)return this.assets[E];E+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(C){return C?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(C,E,I){try{var B=this.renderer.getElementByPath(C);B.updateDocumentData(E,I)}catch{}},AnimationItem.prototype.trigger=function(C){if(this._cbs&&this._cbs[C])switch(C){case"enterFrame":this.triggerEvent(C,new BMEnterFrameEvent(C,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(C,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(C,new BMCompleteLoopEvent(C,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(C,new BMCompleteEvent(C,this.frameMult));break;case"segmentStart":this.triggerEvent(C,new BMSegmentStartEvent(C,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(C,new BMDestroyEvent(C,this));break;default:this.triggerEvent(C)}C==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(C,this.currentFrame,this.totalFrames,this.frameMult)),C==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(C,this.loop,this.playCount,this.frameMult)),C==="complete"&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(C,this.frameMult)),C==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(C,this.firstFrame,this.totalFrames)),C==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(C,this))},AnimationItem.prototype.triggerRenderFrameError=function(C){var E=new BMRenderFrameErrorEvent(C,this.currentFrame);this.triggerEvent("error",E),this.onError&&this.onError.call(this,E)},AnimationItem.prototype.triggerConfigError=function(C){var E=new BMConfigErrorEvent(C,this.currentFrame);this.triggerEvent("error",E),this.onError&&this.onError.call(this,E)};var animationManager=function(){var C={},E=[],I=0,B=0,U=0,V=!0,X=!1;function Y(De){for(var Ne=0,Me=De.target;Ne<B;)E[Ne].animation===Me&&(E.splice(Ne,1),Ne-=1,B-=1,Me.isPaused||Z()),Ne+=1}function K(De,Ne){if(!De)return null;for(var Me=0;Me<B;){if(E[Me].elem===De&&E[Me].elem!==null)return E[Me].animation;Me+=1}var ke=new AnimationItem;return _e(ke,De),ke.setData(De,Ne),ke}function J(){var De,Ne=E.length,Me=[];for(De=0;De<Ne;De+=1)Me.push(E[De].animation);return Me}function xe(){U+=1,Xe()}function Z(){U-=1}function _e(De,Ne){De.addEventListener("destroy",Y),De.addEventListener("_active",xe),De.addEventListener("_idle",Z),E.push({elem:Ne,animation:De}),B+=1}function Se(De){var Ne=new AnimationItem;return _e(Ne,null),Ne.setParams(De),Ne}function Ee(De,Ne){var Me;for(Me=0;Me<B;Me+=1)E[Me].animation.setSpeed(De,Ne)}function Ae(De,Ne){var Me;for(Me=0;Me<B;Me+=1)E[Me].animation.setDirection(De,Ne)}function Re(De){var Ne;for(Ne=0;Ne<B;Ne+=1)E[Ne].animation.play(De)}function Te(De){var Ne=De-I,Me;for(Me=0;Me<B;Me+=1)E[Me].animation.advanceTime(Ne);I=De,U&&!X?window.requestAnimationFrame(Te):V=!0}function we(De){I=De,window.requestAnimationFrame(Te)}function Pe(De){var Ne;for(Ne=0;Ne<B;Ne+=1)E[Ne].animation.pause(De)}function Ie(De,Ne,Me){var ke;for(ke=0;ke<B;ke+=1)E[ke].animation.goToAndStop(De,Ne,Me)}function Fe(De){var Ne;for(Ne=0;Ne<B;Ne+=1)E[Ne].animation.stop(De)}function Oe(De){var Ne;for(Ne=0;Ne<B;Ne+=1)E[Ne].animation.togglePause(De)}function Le(De){var Ne;for(Ne=B-1;Ne>=0;Ne-=1)E[Ne].animation.destroy(De)}function $e(De,Ne,Me){var ke=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),Ge,Be=ke.length;for(Ge=0;Ge<Be;Ge+=1)Me&&ke[Ge].setAttribute("data-bm-type",Me),K(ke[Ge],De);if(Ne&&Be===0){Me||(Me="svg");var qe=document.getElementsByTagName("body")[0];qe.innerText="";var Ke=createTag("div");Ke.style.width="100%",Ke.style.height="100%",Ke.setAttribute("data-bm-type",Me),qe.appendChild(Ke),K(Ke,De)}}function Ve(){var De;for(De=0;De<B;De+=1)E[De].animation.resize()}function Xe(){!X&&U&&V&&(window.requestAnimationFrame(we),V=!1)}function Ue(){X=!0}function We(){X=!1,Xe()}function je(De,Ne){var Me;for(Me=0;Me<B;Me+=1)E[Me].animation.setVolume(De,Ne)}function ze(De){var Ne;for(Ne=0;Ne<B;Ne+=1)E[Ne].animation.mute(De)}function He(De){var Ne;for(Ne=0;Ne<B;Ne+=1)E[Ne].animation.unmute(De)}return C.registerAnimation=K,C.loadAnimation=Se,C.setSpeed=Ee,C.setDirection=Ae,C.play=Re,C.pause=Pe,C.stop=Fe,C.togglePause=Oe,C.searchAnimations=$e,C.resize=Ve,C.goToAndStop=Ie,C.destroy=Le,C.freeze=Ue,C.unfreeze=We,C.setVolume=je,C.mute=ze,C.unmute=He,C.getRegisteredAnimations=J,C}(),BezierFactory=function(){var C={};C.getBezierEasing=I;var E={};function I(we,Pe,Ie,Fe,Oe){var Le=Oe||("bez_"+we+"_"+Pe+"_"+Ie+"_"+Fe).replace(/\./g,"p");if(E[Le])return E[Le];var $e=new Te([we,Pe,Ie,Fe]);return E[Le]=$e,$e}var B=4,U=.001,V=1e-7,X=10,Y=11,K=1/(Y-1),J=typeof Float32Array=="function";function xe(we,Pe){return 1-3*Pe+3*we}function Z(we,Pe){return 3*Pe-6*we}function _e(we){return 3*we}function Se(we,Pe,Ie){return((xe(Pe,Ie)*we+Z(Pe,Ie))*we+_e(Pe))*we}function Ee(we,Pe,Ie){return 3*xe(Pe,Ie)*we*we+2*Z(Pe,Ie)*we+_e(Pe)}function Ae(we,Pe,Ie,Fe,Oe){var Le,$e,Ve=0;do $e=Pe+(Ie-Pe)/2,Le=Se($e,Fe,Oe)-we,Le>0?Ie=$e:Pe=$e;while(Math.abs(Le)>V&&++Ve<X);return $e}function Re(we,Pe,Ie,Fe){for(var Oe=0;Oe<B;++Oe){var Le=Ee(Pe,Ie,Fe);if(Le===0)return Pe;var $e=Se(Pe,Ie,Fe)-we;Pe-=$e/Le}return Pe}function Te(we){this._p=we,this._mSampleValues=J?new Float32Array(Y):new Array(Y),this._precomputed=!1,this.get=this.get.bind(this)}return Te.prototype={get:function(Pe){var Ie=this._p[0],Fe=this._p[1],Oe=this._p[2],Le=this._p[3];return this._precomputed||this._precompute(),Ie===Fe&&Oe===Le?Pe:Pe===0?0:Pe===1?1:Se(this._getTForX(Pe),Fe,Le)},_precompute:function(){var Pe=this._p[0],Ie=this._p[1],Fe=this._p[2],Oe=this._p[3];this._precomputed=!0,(Pe!==Ie||Fe!==Oe)&&this._calcSampleValues()},_calcSampleValues:function(){for(var Pe=this._p[0],Ie=this._p[2],Fe=0;Fe<Y;++Fe)this._mSampleValues[Fe]=Se(Fe*K,Pe,Ie)},_getTForX:function(Pe){for(var Ie=this._p[0],Fe=this._p[2],Oe=this._mSampleValues,Le=0,$e=1,Ve=Y-1;$e!==Ve&&Oe[$e]<=Pe;++$e)Le+=K;--$e;var Xe=(Pe-Oe[$e])/(Oe[$e+1]-Oe[$e]),Ue=Le+Xe*K,We=Ee(Ue,Ie,Fe);return We>=U?Re(Pe,Ue,Ie,Fe):We===0?Ue:Ae(Pe,Le,Le+K,Ie,Fe)}},C}(),pooling=function(){function C(E){return E.concat(createSizedArray(E.length))}return{double:C}}(),poolFactory=function(){return function(C,E,I){var B=0,U=C,V=createSizedArray(U),X={newElement:Y,release:K};function Y(){var J;return B?(B-=1,J=V[B]):J=E(),J}function K(J){B===U&&(V=pooling.double(V),U*=2),I&&I(J),V[B]=J,B+=1}return X}}(),bezierLengthPool=function(){function C(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,C)}(),segmentsLengthPool=function(){function C(){return{lengths:[],totalLength:0}}function E(I){var B,U=I.lengths.length;for(B=0;B<U;B+=1)bezierLengthPool.release(I.lengths[B]);I.lengths.length=0}return poolFactory(8,C,E)}();function bezFunction(){var C=Math;function E(_e,Se,Ee,Ae,Re,Te){var we=_e*Ae+Se*Re+Ee*Te-Re*Ae-Te*_e-Ee*Se;return we>-.001&&we<.001}function I(_e,Se,Ee,Ae,Re,Te,we,Pe,Ie){if(Ee===0&&Te===0&&Ie===0)return E(_e,Se,Ae,Re,we,Pe);var Fe=C.sqrt(C.pow(Ae-_e,2)+C.pow(Re-Se,2)+C.pow(Te-Ee,2)),Oe=C.sqrt(C.pow(we-_e,2)+C.pow(Pe-Se,2)+C.pow(Ie-Ee,2)),Le=C.sqrt(C.pow(we-Ae,2)+C.pow(Pe-Re,2)+C.pow(Ie-Te,2)),$e;return Fe>Oe?Fe>Le?$e=Fe-Oe-Le:$e=Le-Oe-Fe:Le>Oe?$e=Le-Oe-Fe:$e=Oe-Fe-Le,$e>-1e-4&&$e<1e-4}var B=function(){return function(_e,Se,Ee,Ae){var Re=getDefaultCurveSegments(),Te,we,Pe,Ie,Fe,Oe=0,Le,$e=[],Ve=[],Xe=bezierLengthPool.newElement();for(Pe=Ee.length,Te=0;Te<Re;Te+=1){for(Fe=Te/(Re-1),Le=0,we=0;we<Pe;we+=1)Ie=bmPow(1-Fe,3)*_e[we]+3*bmPow(1-Fe,2)*Fe*Ee[we]+3*(1-Fe)*bmPow(Fe,2)*Ae[we]+bmPow(Fe,3)*Se[we],$e[we]=Ie,Ve[we]!==null&&(Le+=bmPow($e[we]-Ve[we],2)),Ve[we]=$e[we];Le&&(Le=bmSqrt(Le),Oe+=Le),Xe.percents[Te]=Fe,Xe.lengths[Te]=Oe}return Xe.addedLength=Oe,Xe}}();function U(_e){var Se=segmentsLengthPool.newElement(),Ee=_e.c,Ae=_e.v,Re=_e.o,Te=_e.i,we,Pe=_e._length,Ie=Se.lengths,Fe=0;for(we=0;we<Pe-1;we+=1)Ie[we]=B(Ae[we],Ae[we+1],Re[we],Te[we+1]),Fe+=Ie[we].addedLength;return Ee&&Pe&&(Ie[we]=B(Ae[we],Ae[0],Re[we],Te[0]),Fe+=Ie[we].addedLength),Se.totalLength=Fe,Se}function V(_e){this.segmentLength=0,this.points=new Array(_e)}function X(_e,Se){this.partialLength=_e,this.point=Se}var Y=function(){var _e={};return function(Se,Ee,Ae,Re){var Te=(Se[0]+"_"+Se[1]+"_"+Ee[0]+"_"+Ee[1]+"_"+Ae[0]+"_"+Ae[1]+"_"+Re[0]+"_"+Re[1]).replace(/\./g,"p");if(!_e[Te]){var we=getDefaultCurveSegments(),Pe,Ie,Fe,Oe,Le,$e=0,Ve,Xe,Ue=null;Se.length===2&&(Se[0]!==Ee[0]||Se[1]!==Ee[1])&&E(Se[0],Se[1],Ee[0],Ee[1],Se[0]+Ae[0],Se[1]+Ae[1])&&E(Se[0],Se[1],Ee[0],Ee[1],Ee[0]+Re[0],Ee[1]+Re[1])&&(we=2);var We=new V(we);for(Fe=Ae.length,Pe=0;Pe<we;Pe+=1){for(Xe=createSizedArray(Fe),Le=Pe/(we-1),Ve=0,Ie=0;Ie<Fe;Ie+=1)Oe=bmPow(1-Le,3)*Se[Ie]+3*bmPow(1-Le,2)*Le*(Se[Ie]+Ae[Ie])+3*(1-Le)*bmPow(Le,2)*(Ee[Ie]+Re[Ie])+bmPow(Le,3)*Ee[Ie],Xe[Ie]=Oe,Ue!==null&&(Ve+=bmPow(Xe[Ie]-Ue[Ie],2));Ve=bmSqrt(Ve),$e+=Ve,We.points[Pe]=new X(Ve,Xe),Ue=Xe}We.segmentLength=$e,_e[Te]=We}return _e[Te]}}();function K(_e,Se){var Ee=Se.percents,Ae=Se.lengths,Re=Ee.length,Te=bmFloor((Re-1)*_e),we=_e*Se.addedLength,Pe=0;if(Te===Re-1||Te===0||we===Ae[Te])return Ee[Te];for(var Ie=Ae[Te]>we?-1:1,Fe=!0;Fe;)if(Ae[Te]<=we&&Ae[Te+1]>we?(Pe=(we-Ae[Te])/(Ae[Te+1]-Ae[Te]),Fe=!1):Te+=Ie,Te<0||Te>=Re-1){if(Te===Re-1)return Ee[Te];Fe=!1}return Ee[Te]+(Ee[Te+1]-Ee[Te])*Pe}function J(_e,Se,Ee,Ae,Re,Te){var we=K(Re,Te),Pe=1-we,Ie=C.round((Pe*Pe*Pe*_e[0]+(we*Pe*Pe+Pe*we*Pe+Pe*Pe*we)*Ee[0]+(we*we*Pe+Pe*we*we+we*Pe*we)*Ae[0]+we*we*we*Se[0])*1e3)/1e3,Fe=C.round((Pe*Pe*Pe*_e[1]+(we*Pe*Pe+Pe*we*Pe+Pe*Pe*we)*Ee[1]+(we*we*Pe+Pe*we*we+we*Pe*we)*Ae[1]+we*we*we*Se[1])*1e3)/1e3;return[Ie,Fe]}var xe=createTypedArray("float32",8);function Z(_e,Se,Ee,Ae,Re,Te,we){Re<0?Re=0:Re>1&&(Re=1);var Pe=K(Re,we);Te=Te>1?1:Te;var Ie=K(Te,we),Fe,Oe=_e.length,Le=1-Pe,$e=1-Ie,Ve=Le*Le*Le,Xe=Pe*Le*Le*3,Ue=Pe*Pe*Le*3,We=Pe*Pe*Pe,je=Le*Le*$e,ze=Pe*Le*$e+Le*Pe*$e+Le*Le*Ie,He=Pe*Pe*$e+Le*Pe*Ie+Pe*Le*Ie,De=Pe*Pe*Ie,Ne=Le*$e*$e,Me=Pe*$e*$e+Le*Ie*$e+Le*$e*Ie,ke=Pe*Ie*$e+Le*Ie*Ie+Pe*$e*Ie,Ge=Pe*Ie*Ie,Be=$e*$e*$e,qe=Ie*$e*$e+$e*Ie*$e+$e*$e*Ie,Ke=Ie*Ie*$e+$e*Ie*Ie+Ie*$e*Ie,Ye=Ie*Ie*Ie;for(Fe=0;Fe<Oe;Fe+=1)xe[Fe*4]=C.round((Ve*_e[Fe]+Xe*Ee[Fe]+Ue*Ae[Fe]+We*Se[Fe])*1e3)/1e3,xe[Fe*4+1]=C.round((je*_e[Fe]+ze*Ee[Fe]+He*Ae[Fe]+De*Se[Fe])*1e3)/1e3,xe[Fe*4+2]=C.round((Ne*_e[Fe]+Me*Ee[Fe]+ke*Ae[Fe]+Ge*Se[Fe])*1e3)/1e3,xe[Fe*4+3]=C.round((Be*_e[Fe]+qe*Ee[Fe]+Ke*Ae[Fe]+Ye*Se[Fe])*1e3)/1e3;return xe}return{getSegmentsLength:U,getNewSegment:Z,getPointInSegment:J,buildBezierData:Y,pointOnLine2D:E,pointOnLine3D:I}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(C,E){var I=this.offsetTime,B;this.propType==="multidimensional"&&(B=createTypedArray("float32",this.pv.length));for(var U=E.lastIndex,V=U,X=this.keyframes.length-1,Y=!0,K,J,xe;Y;){if(K=this.keyframes[V],J=this.keyframes[V+1],V===X-1&&C>=J.t-I){K.h&&(K=J),U=0;break}if(J.t-I>C){U=V;break}V<X-1?V+=1:(U=0,Y=!1)}xe=this.keyframesMetadata[V]||{};var Z,_e,Se,Ee,Ae,Re,Te=J.t-I,we=K.t-I,Pe;if(K.to){xe.bezierData||(xe.bezierData=bez.buildBezierData(K.s,J.s||K.e,K.to,K.ti));var Ie=xe.bezierData;if(C>=Te||C<we){var Fe=C>=Te?Ie.points.length-1:0;for(_e=Ie.points[Fe].point.length,Z=0;Z<_e;Z+=1)B[Z]=Ie.points[Fe].point[Z]}else{xe.__fnct?Re=xe.__fnct:(Re=BezierFactory.getBezierEasing(K.o.x,K.o.y,K.i.x,K.i.y,K.n).get,xe.__fnct=Re),Se=Re((C-we)/(Te-we));var Oe=Ie.segmentLength*Se,Le,$e=E.lastFrame<C&&E._lastKeyframeIndex===V?E._lastAddedLength:0;for(Ae=E.lastFrame<C&&E._lastKeyframeIndex===V?E._lastPoint:0,Y=!0,Ee=Ie.points.length;Y;){if($e+=Ie.points[Ae].partialLength,Oe===0||Se===0||Ae===Ie.points.length-1){for(_e=Ie.points[Ae].point.length,Z=0;Z<_e;Z+=1)B[Z]=Ie.points[Ae].point[Z];break}else if(Oe>=$e&&Oe<$e+Ie.points[Ae+1].partialLength){for(Le=(Oe-$e)/Ie.points[Ae+1].partialLength,_e=Ie.points[Ae].point.length,Z=0;Z<_e;Z+=1)B[Z]=Ie.points[Ae].point[Z]+(Ie.points[Ae+1].point[Z]-Ie.points[Ae].point[Z])*Le;break}Ae<Ee-1?Ae+=1:Y=!1}E._lastPoint=Ae,E._lastAddedLength=$e-Ie.points[Ae].partialLength,E._lastKeyframeIndex=V}}else{var Ve,Xe,Ue,We,je;if(X=K.s.length,Pe=J.s||K.e,this.sh&&K.h!==1)if(C>=Te)B[0]=Pe[0],B[1]=Pe[1],B[2]=Pe[2];else if(C<=we)B[0]=K.s[0],B[1]=K.s[1],B[2]=K.s[2];else{var ze=createQuaternion(K.s),He=createQuaternion(Pe),De=(C-we)/(Te-we);quaternionToEuler(B,slerp(ze,He,De))}else for(V=0;V<X;V+=1)K.h!==1&&(C>=Te?Se=1:C<we?Se=0:(K.o.x.constructor===Array?(xe.__fnct||(xe.__fnct=[]),xe.__fnct[V]?Re=xe.__fnct[V]:(Ve=K.o.x[V]===void 0?K.o.x[0]:K.o.x[V],Xe=K.o.y[V]===void 0?K.o.y[0]:K.o.y[V],Ue=K.i.x[V]===void 0?K.i.x[0]:K.i.x[V],We=K.i.y[V]===void 0?K.i.y[0]:K.i.y[V],Re=BezierFactory.getBezierEasing(Ve,Xe,Ue,We).get,xe.__fnct[V]=Re)):xe.__fnct?Re=xe.__fnct:(Ve=K.o.x,Xe=K.o.y,Ue=K.i.x,We=K.i.y,Re=BezierFactory.getBezierEasing(Ve,Xe,Ue,We).get,K.keyframeMetadata=Re),Se=Re((C-we)/(Te-we)))),Pe=J.s||K.e,je=K.h===1?K.s[V]:K.s[V]+(Pe[V]-K.s[V])*Se,this.propType==="multidimensional"?B[V]=je:B=je}return E.lastIndex=U,B}function slerp(C,E,I){var B=[],U=C[0],V=C[1],X=C[2],Y=C[3],K=E[0],J=E[1],xe=E[2],Z=E[3],_e,Se,Ee,Ae,Re;return Se=U*K+V*J+X*xe+Y*Z,Se<0&&(Se=-Se,K=-K,J=-J,xe=-xe,Z=-Z),1-Se>1e-6?(_e=Math.acos(Se),Ee=Math.sin(_e),Ae=Math.sin((1-I)*_e)/Ee,Re=Math.sin(I*_e)/Ee):(Ae=1-I,Re=I),B[0]=Ae*U+Re*K,B[1]=Ae*V+Re*J,B[2]=Ae*X+Re*xe,B[3]=Ae*Y+Re*Z,B}function quaternionToEuler(C,E){var I=E[0],B=E[1],U=E[2],V=E[3],X=Math.atan2(2*B*V-2*I*U,1-2*B*B-2*U*U),Y=Math.asin(2*I*B+2*U*V),K=Math.atan2(2*I*V-2*B*U,1-2*I*I-2*U*U);C[0]=X/degToRads,C[1]=Y/degToRads,C[2]=K/degToRads}function createQuaternion(C){var E=C[0]*degToRads,I=C[1]*degToRads,B=C[2]*degToRads,U=Math.cos(E/2),V=Math.cos(I/2),X=Math.cos(B/2),Y=Math.sin(E/2),K=Math.sin(I/2),J=Math.sin(B/2),xe=U*V*X-Y*K*J,Z=Y*K*X+U*V*J,_e=Y*V*X+U*K*J,Se=U*K*X-Y*V*J;return[Z,_e,Se,xe]}function getValueAtCurrentTime(){var C=this.comp.renderedFrame-this.offsetTime,E=this.keyframes[0].t-this.offsetTime,I=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(C===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=I&&C>=I||this._caching.lastFrame<E&&C<E))){this._caching.lastFrame>=C&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var B=this.interpolateValue(C,this._caching);this.pv=B}return this._caching.lastFrame=C,this.pv}function setVValue(C){var E;if(this.propType==="unidimensional")E=C*this.mult,mathAbs(this.v-E)>1e-5&&(this.v=E,this._mdf=!0);else for(var I=0,B=this.v.length;I<B;)E=C[I]*this.mult,mathAbs(this.v[I]-E)>1e-5&&(this.v[I]=E,this._mdf=!0),I+=1}function processEffectsSequence(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var C,E=this.effectsSequence.length,I=this.kf?this.pv:this.data.k;for(C=0;C<E;C+=1)I=this.effectsSequence[C](I);this.setVValue(I),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(C){this.effectsSequence.push(C),this.container.addDynamicProperty(this)}function ValueProperty(C,E,I,B){this.propType="unidimensional",this.mult=I||1,this.data=E,this.v=I?E.k*I:E.k,this.pv=E.k,this._mdf=!1,this.elem=C,this.container=B,this.comp=C.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(C,E,I,B){this.propType="multidimensional",this.mult=I||1,this.data=E,this._mdf=!1,this.elem=C,this.container=B,this.comp=C.comp,this.k=!1,this.kf=!1,this.frameId=-1;var U,V=E.k.length;for(this.v=createTypedArray("float32",V),this.pv=createTypedArray("float32",V),this.vel=createTypedArray("float32",V),U=0;U<V;U+=1)this.v[U]=E.k[U]*this.mult,this.pv[U]=E.k[U];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(C,E,I,B){this.propType="unidimensional",this.keyframes=E.k,this.keyframesMetadata=[],this.offsetTime=C.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=E,this.mult=I||1,this.elem=C,this.container=B,this.comp=C.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(C,E,I,B){this.propType="multidimensional";var U,V=E.k.length,X,Y,K,J;for(U=0;U<V-1;U+=1)E.k[U].to&&E.k[U].s&&E.k[U+1]&&E.k[U+1].s&&(X=E.k[U].s,Y=E.k[U+1].s,K=E.k[U].to,J=E.k[U].ti,(X.length===2&&!(X[0]===Y[0]&&X[1]===Y[1])&&bez.pointOnLine2D(X[0],X[1],Y[0],Y[1],X[0]+K[0],X[1]+K[1])&&bez.pointOnLine2D(X[0],X[1],Y[0],Y[1],Y[0]+J[0],Y[1]+J[1])||X.length===3&&!(X[0]===Y[0]&&X[1]===Y[1]&&X[2]===Y[2])&&bez.pointOnLine3D(X[0],X[1],X[2],Y[0],Y[1],Y[2],X[0]+K[0],X[1]+K[1],X[2]+K[2])&&bez.pointOnLine3D(X[0],X[1],X[2],Y[0],Y[1],Y[2],Y[0]+J[0],Y[1]+J[1],Y[2]+J[2]))&&(E.k[U].to=null,E.k[U].ti=null),X[0]===Y[0]&&X[1]===Y[1]&&K[0]===0&&K[1]===0&&J[0]===0&&J[1]===0&&(X.length===2||X[2]===Y[2]&&K[2]===0&&J[2]===0)&&(E.k[U].to=null,E.k[U].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=E,this.keyframes=E.k,this.keyframesMetadata=[],this.offsetTime=C.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=I||1,this.elem=C,this.container=B,this.comp=C.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var xe=E.k[0].s.length;for(this.v=createTypedArray("float32",xe),this.pv=createTypedArray("float32",xe),U=0;U<xe;U+=1)this.v[U]=initFrame,this.pv[U]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",xe)},this.addEffect=addEffect}var PropertyFactory=function(){function C(I,B,U,V,X){B.sid&&(B=I.globalData.slotManager.getProp(B));var Y;if(!B.k.length)Y=new ValueProperty(I,B,V,X);else if(typeof B.k[0]=="number")Y=new MultiDimensionalProperty(I,B,V,X);else switch(U){case 0:Y=new KeyframedValueProperty(I,B,V,X);break;case 1:Y=new KeyframedMultidimensionalProperty(I,B,V,X);break}return Y.effectsSequence.length&&X.addDynamicProperty(Y),Y}var E={getProp:C};return E}();function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(E){this.dynamicProperties.indexOf(E)===-1&&(this.dynamicProperties.push(E),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var E,I=this.dynamicProperties.length;for(E=0;E<I;E+=1)this.dynamicProperties[E].getValue(),this.dynamicProperties[E]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(E){this.container=E,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=function(){function C(){return createTypedArray("float32",2)}return poolFactory(8,C)}();function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(C,E){this.c=C,this.setLength(E);for(var I=0;I<E;)this.v[I]=pointPool.newElement(),this.o[I]=pointPool.newElement(),this.i[I]=pointPool.newElement(),I+=1},ShapePath.prototype.setLength=function(C){for(;this._maxLength<C;)this.doubleArrayLength();this._length=C},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(C,E,I,B,U){var V;switch(this._length=Math.max(this._length,B+1),this._length>=this._maxLength&&this.doubleArrayLength(),I){case"v":V=this.v;break;case"i":V=this.i;break;case"o":V=this.o;break;default:V=[];break}(!V[B]||V[B]&&!U)&&(V[B]=pointPool.newElement()),V[B][0]=C,V[B][1]=E},ShapePath.prototype.setTripleAt=function(C,E,I,B,U,V,X,Y){this.setXYAt(C,E,"v",X,Y),this.setXYAt(I,B,"o",X,Y),this.setXYAt(U,V,"i",X,Y)},ShapePath.prototype.reverse=function(){var C=new ShapePath;C.setPathData(this.c,this._length);var E=this.v,I=this.o,B=this.i,U=0;this.c&&(C.setTripleAt(E[0][0],E[0][1],B[0][0],B[0][1],I[0][0],I[0][1],0,!1),U=1);var V=this._length-1,X=this._length,Y;for(Y=U;Y<X;Y+=1)C.setTripleAt(E[V][0],E[V][1],B[V][0],B[V][1],I[V][0],I[V][1],Y,!1),V-=1;return C},ShapePath.prototype.length=function(){return this._length};var shapePool=function(){function C(){return new ShapePath}function E(U){var V=U._length,X;for(X=0;X<V;X+=1)pointPool.release(U.v[X]),pointPool.release(U.i[X]),pointPool.release(U.o[X]),U.v[X]=null,U.i[X]=null,U.o[X]=null;U._length=0,U.c=!1}function I(U){var V=B.newElement(),X,Y=U._length===void 0?U.v.length:U._length;for(V.setLength(Y),V.c=U.c,X=0;X<Y;X+=1)V.setTripleAt(U.v[X][0],U.v[X][1],U.o[X][0],U.o[X][1],U.i[X][0],U.i[X][1],X);return V}var B=poolFactory(4,C,E);return B.clone=I,B}();function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(C){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=C,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var C;for(C=0;C<this._length;C+=1)shapePool.release(this.shapes[C]);this._length=0};var shapeCollectionPool=function(){var C={newShapeCollection:U,release:V},E=0,I=4,B=createSizedArray(I);function U(){var X;return E?(E-=1,X=B[E]):X=new ShapeCollection,X}function V(X){var Y,K=X._length;for(Y=0;Y<K;Y+=1)shapePool.release(X.shapes[Y]);X._length=0,E===I&&(B=pooling.double(B),I*=2),B[E]=X,E+=1}return C}(),ShapePropertyFactory=function(){var C=-999999;function E(Te,we,Pe){var Ie=Pe.lastIndex,Fe,Oe,Le,$e,Ve,Xe,Ue,We,je,ze=this.keyframes;if(Te<ze[0].t-this.offsetTime)Fe=ze[0].s[0],Le=!0,Ie=0;else if(Te>=ze[ze.length-1].t-this.offsetTime)Fe=ze[ze.length-1].s?ze[ze.length-1].s[0]:ze[ze.length-2].e[0],Le=!0;else{for(var He=Ie,De=ze.length-1,Ne=!0,Me,ke,Ge;Ne&&(Me=ze[He],ke=ze[He+1],!(ke.t-this.offsetTime>Te));)He<De-1?He+=1:Ne=!1;if(Ge=this.keyframesMetadata[He]||{},Le=Me.h===1,Ie=He,!Le){if(Te>=ke.t-this.offsetTime)We=1;else if(Te<Me.t-this.offsetTime)We=0;else{var Be;Ge.__fnct?Be=Ge.__fnct:(Be=BezierFactory.getBezierEasing(Me.o.x,Me.o.y,Me.i.x,Me.i.y).get,Ge.__fnct=Be),We=Be((Te-(Me.t-this.offsetTime))/(ke.t-this.offsetTime-(Me.t-this.offsetTime)))}Oe=ke.s?ke.s[0]:Me.e[0]}Fe=Me.s[0]}for(Xe=we._length,Ue=Fe.i[0].length,Pe.lastIndex=Ie,$e=0;$e<Xe;$e+=1)for(Ve=0;Ve<Ue;Ve+=1)je=Le?Fe.i[$e][Ve]:Fe.i[$e][Ve]+(Oe.i[$e][Ve]-Fe.i[$e][Ve])*We,we.i[$e][Ve]=je,je=Le?Fe.o[$e][Ve]:Fe.o[$e][Ve]+(Oe.o[$e][Ve]-Fe.o[$e][Ve])*We,we.o[$e][Ve]=je,je=Le?Fe.v[$e][Ve]:Fe.v[$e][Ve]+(Oe.v[$e][Ve]-Fe.v[$e][Ve])*We,we.v[$e][Ve]=je}function I(){var Te=this.comp.renderedFrame-this.offsetTime,we=this.keyframes[0].t-this.offsetTime,Pe=this.keyframes[this.keyframes.length-1].t-this.offsetTime,Ie=this._caching.lastFrame;return Ie!==C&&(Ie<we&&Te<we||Ie>Pe&&Te>Pe)||(this._caching.lastIndex=Ie<Te?this._caching.lastIndex:0,this.interpolateShape(Te,this.pv,this._caching)),this._caching.lastFrame=Te,this.pv}function B(){this.paths=this.localShapeCollection}function U(Te,we){if(Te._length!==we._length||Te.c!==we.c)return!1;var Pe,Ie=Te._length;for(Pe=0;Pe<Ie;Pe+=1)if(Te.v[Pe][0]!==we.v[Pe][0]||Te.v[Pe][1]!==we.v[Pe][1]||Te.o[Pe][0]!==we.o[Pe][0]||Te.o[Pe][1]!==we.o[Pe][1]||Te.i[Pe][0]!==we.i[Pe][0]||Te.i[Pe][1]!==we.i[Pe][1])return!1;return!0}function V(Te){U(this.v,Te)||(this.v=shapePool.clone(Te),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function X(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var Te;this.kf?Te=this.pv:this.data.ks?Te=this.data.ks.k:Te=this.data.pt.k;var we,Pe=this.effectsSequence.length;for(we=0;we<Pe;we+=1)Te=this.effectsSequence[we](Te);this.setVValue(Te),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function Y(Te,we,Pe){this.propType="shape",this.comp=Te.comp,this.container=Te,this.elem=Te,this.data=we,this.k=!1,this.kf=!1,this._mdf=!1;var Ie=Pe===3?we.pt.k:we.ks.k;this.v=shapePool.clone(Ie),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=B,this.effectsSequence=[]}function K(Te){this.effectsSequence.push(Te),this.container.addDynamicProperty(this)}Y.prototype.interpolateShape=E,Y.prototype.getValue=X,Y.prototype.setVValue=V,Y.prototype.addEffect=K;function J(Te,we,Pe){this.propType="shape",this.comp=Te.comp,this.elem=Te,this.container=Te,this.offsetTime=Te.data.st,this.keyframes=Pe===3?we.pt.k:we.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var Ie=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,Ie),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=C,this.reset=B,this._caching={lastFrame:C,lastIndex:0},this.effectsSequence=[I.bind(this)]}J.prototype.getValue=X,J.prototype.interpolateShape=E,J.prototype.setVValue=V,J.prototype.addEffect=K;var xe=function(){var Te=roundCorner;function we(Pe,Ie){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=Ie.d,this.elem=Pe,this.comp=Pe.comp,this.frameId=-1,this.initDynamicPropertyContainer(Pe),this.p=PropertyFactory.getProp(Pe,Ie.p,1,0,this),this.s=PropertyFactory.getProp(Pe,Ie.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return we.prototype={reset:B,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var Ie=this.p.v[0],Fe=this.p.v[1],Oe=this.s.v[0]/2,Le=this.s.v[1]/2,$e=this.d!==3,Ve=this.v;Ve.v[0][0]=Ie,Ve.v[0][1]=Fe-Le,Ve.v[1][0]=$e?Ie+Oe:Ie-Oe,Ve.v[1][1]=Fe,Ve.v[2][0]=Ie,Ve.v[2][1]=Fe+Le,Ve.v[3][0]=$e?Ie-Oe:Ie+Oe,Ve.v[3][1]=Fe,Ve.i[0][0]=$e?Ie-Oe*Te:Ie+Oe*Te,Ve.i[0][1]=Fe-Le,Ve.i[1][0]=$e?Ie+Oe:Ie-Oe,Ve.i[1][1]=Fe-Le*Te,Ve.i[2][0]=$e?Ie+Oe*Te:Ie-Oe*Te,Ve.i[2][1]=Fe+Le,Ve.i[3][0]=$e?Ie-Oe:Ie+Oe,Ve.i[3][1]=Fe+Le*Te,Ve.o[0][0]=$e?Ie+Oe*Te:Ie-Oe*Te,Ve.o[0][1]=Fe-Le,Ve.o[1][0]=$e?Ie+Oe:Ie-Oe,Ve.o[1][1]=Fe+Le*Te,Ve.o[2][0]=$e?Ie-Oe*Te:Ie+Oe*Te,Ve.o[2][1]=Fe+Le,Ve.o[3][0]=$e?Ie-Oe:Ie+Oe,Ve.o[3][1]=Fe-Le*Te}},extendPrototype([DynamicPropertyContainer],we),we}(),Z=function(){function Te(we,Pe){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=we,this.comp=we.comp,this.data=Pe,this.frameId=-1,this.d=Pe.d,this.initDynamicPropertyContainer(we),Pe.sy===1?(this.ir=PropertyFactory.getProp(we,Pe.ir,0,0,this),this.is=PropertyFactory.getProp(we,Pe.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(we,Pe.pt,0,0,this),this.p=PropertyFactory.getProp(we,Pe.p,1,0,this),this.r=PropertyFactory.getProp(we,Pe.r,0,degToRads,this),this.or=PropertyFactory.getProp(we,Pe.or,0,0,this),this.os=PropertyFactory.getProp(we,Pe.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return Te.prototype={reset:B,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var Pe=Math.floor(this.pt.v)*2,Ie=Math.PI*2/Pe,Fe=!0,Oe=this.or.v,Le=this.ir.v,$e=this.os.v,Ve=this.is.v,Xe=2*Math.PI*Oe/(Pe*2),Ue=2*Math.PI*Le/(Pe*2),We,je,ze,He,De=-Math.PI/2;De+=this.r.v;var Ne=this.data.d===3?-1:1;for(this.v._length=0,We=0;We<Pe;We+=1){je=Fe?Oe:Le,ze=Fe?$e:Ve,He=Fe?Xe:Ue;var Me=je*Math.cos(De),ke=je*Math.sin(De),Ge=Me===0&&ke===0?0:ke/Math.sqrt(Me*Me+ke*ke),Be=Me===0&&ke===0?0:-Me/Math.sqrt(Me*Me+ke*ke);Me+=+this.p.v[0],ke+=+this.p.v[1],this.v.setTripleAt(Me,ke,Me-Ge*He*ze*Ne,ke-Be*He*ze*Ne,Me+Ge*He*ze*Ne,ke+Be*He*ze*Ne,We,!0),Fe=!Fe,De+=Ie*Ne}},convertPolygonToPath:function(){var Pe=Math.floor(this.pt.v),Ie=Math.PI*2/Pe,Fe=this.or.v,Oe=this.os.v,Le=2*Math.PI*Fe/(Pe*4),$e,Ve=-Math.PI*.5,Xe=this.data.d===3?-1:1;for(Ve+=this.r.v,this.v._length=0,$e=0;$e<Pe;$e+=1){var Ue=Fe*Math.cos(Ve),We=Fe*Math.sin(Ve),je=Ue===0&&We===0?0:We/Math.sqrt(Ue*Ue+We*We),ze=Ue===0&&We===0?0:-Ue/Math.sqrt(Ue*Ue+We*We);Ue+=+this.p.v[0],We+=+this.p.v[1],this.v.setTripleAt(Ue,We,Ue-je*Le*Oe*Xe,We-ze*Le*Oe*Xe,Ue+je*Le*Oe*Xe,We+ze*Le*Oe*Xe,$e,!0),Ve+=Ie*Xe}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],Te),Te}(),_e=function(){function Te(we,Pe){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=we,this.comp=we.comp,this.frameId=-1,this.d=Pe.d,this.initDynamicPropertyContainer(we),this.p=PropertyFactory.getProp(we,Pe.p,1,0,this),this.s=PropertyFactory.getProp(we,Pe.s,1,0,this),this.r=PropertyFactory.getProp(we,Pe.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return Te.prototype={convertRectToPath:function(){var Pe=this.p.v[0],Ie=this.p.v[1],Fe=this.s.v[0]/2,Oe=this.s.v[1]/2,Le=bmMin(Fe,Oe,this.r.v),$e=Le*(1-roundCorner);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(Pe+Fe,Ie-Oe+Le,Pe+Fe,Ie-Oe+Le,Pe+Fe,Ie-Oe+$e,0,!0),this.v.setTripleAt(Pe+Fe,Ie+Oe-Le,Pe+Fe,Ie+Oe-$e,Pe+Fe,Ie+Oe-Le,1,!0),Le!==0?(this.v.setTripleAt(Pe+Fe-Le,Ie+Oe,Pe+Fe-Le,Ie+Oe,Pe+Fe-$e,Ie+Oe,2,!0),this.v.setTripleAt(Pe-Fe+Le,Ie+Oe,Pe-Fe+$e,Ie+Oe,Pe-Fe+Le,Ie+Oe,3,!0),this.v.setTripleAt(Pe-Fe,Ie+Oe-Le,Pe-Fe,Ie+Oe-Le,Pe-Fe,Ie+Oe-$e,4,!0),this.v.setTripleAt(Pe-Fe,Ie-Oe+Le,Pe-Fe,Ie-Oe+$e,Pe-Fe,Ie-Oe+Le,5,!0),this.v.setTripleAt(Pe-Fe+Le,Ie-Oe,Pe-Fe+Le,Ie-Oe,Pe-Fe+$e,Ie-Oe,6,!0),this.v.setTripleAt(Pe+Fe-Le,Ie-Oe,Pe+Fe-$e,Ie-Oe,Pe+Fe-Le,Ie-Oe,7,!0)):(this.v.setTripleAt(Pe-Fe,Ie+Oe,Pe-Fe+$e,Ie+Oe,Pe-Fe,Ie+Oe,2),this.v.setTripleAt(Pe-Fe,Ie-Oe,Pe-Fe,Ie-Oe+$e,Pe-Fe,Ie-Oe,3))):(this.v.setTripleAt(Pe+Fe,Ie-Oe+Le,Pe+Fe,Ie-Oe+$e,Pe+Fe,Ie-Oe+Le,0,!0),Le!==0?(this.v.setTripleAt(Pe+Fe-Le,Ie-Oe,Pe+Fe-Le,Ie-Oe,Pe+Fe-$e,Ie-Oe,1,!0),this.v.setTripleAt(Pe-Fe+Le,Ie-Oe,Pe-Fe+$e,Ie-Oe,Pe-Fe+Le,Ie-Oe,2,!0),this.v.setTripleAt(Pe-Fe,Ie-Oe+Le,Pe-Fe,Ie-Oe+Le,Pe-Fe,Ie-Oe+$e,3,!0),this.v.setTripleAt(Pe-Fe,Ie+Oe-Le,Pe-Fe,Ie+Oe-$e,Pe-Fe,Ie+Oe-Le,4,!0),this.v.setTripleAt(Pe-Fe+Le,Ie+Oe,Pe-Fe+Le,Ie+Oe,Pe-Fe+$e,Ie+Oe,5,!0),this.v.setTripleAt(Pe+Fe-Le,Ie+Oe,Pe+Fe-$e,Ie+Oe,Pe+Fe-Le,Ie+Oe,6,!0),this.v.setTripleAt(Pe+Fe,Ie+Oe-Le,Pe+Fe,Ie+Oe-Le,Pe+Fe,Ie+Oe-$e,7,!0)):(this.v.setTripleAt(Pe-Fe,Ie-Oe,Pe-Fe+$e,Ie-Oe,Pe-Fe,Ie-Oe,1,!0),this.v.setTripleAt(Pe-Fe,Ie+Oe,Pe-Fe,Ie+Oe-$e,Pe-Fe,Ie+Oe,2,!0),this.v.setTripleAt(Pe+Fe,Ie+Oe,Pe+Fe-$e,Ie+Oe,Pe+Fe,Ie+Oe,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:B},extendPrototype([DynamicPropertyContainer],Te),Te}();function Se(Te,we,Pe){var Ie;if(Pe===3||Pe===4){var Fe=Pe===3?we.pt:we.ks,Oe=Fe.k;Oe.length?Ie=new J(Te,we,Pe):Ie=new Y(Te,we,Pe)}else Pe===5?Ie=new _e(Te,we):Pe===6?Ie=new xe(Te,we):Pe===7&&(Ie=new Z(Te,we));return Ie.k&&Te.addDynamicProperty(Ie),Ie}function Ee(){return Y}function Ae(){return J}var Re={};return Re.getShapeProp=Se,Re.getConstructorFunction=Ee,Re.getKeyframedConstructorFunction=Ae,Re}();/*!
1999
+ Transformation Matrix v2.0
2000
+ (c) Epistemex 2014-2015
2001
+ www.epistemex.com
2002
+ By Ken Fyrstenberg
2003
+ Contributions by leeoniya.
2004
+ License: MIT, header required.
2005
+ */var Matrix=function(){var C=Math.cos,E=Math.sin,I=Math.tan,B=Math.round;function U(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function V(Me){if(Me===0)return this;var ke=C(Me),Ge=E(Me);return this._t(ke,-Ge,0,0,Ge,ke,0,0,0,0,1,0,0,0,0,1)}function X(Me){if(Me===0)return this;var ke=C(Me),Ge=E(Me);return this._t(1,0,0,0,0,ke,-Ge,0,0,Ge,ke,0,0,0,0,1)}function Y(Me){if(Me===0)return this;var ke=C(Me),Ge=E(Me);return this._t(ke,0,Ge,0,0,1,0,0,-Ge,0,ke,0,0,0,0,1)}function K(Me){if(Me===0)return this;var ke=C(Me),Ge=E(Me);return this._t(ke,-Ge,0,0,Ge,ke,0,0,0,0,1,0,0,0,0,1)}function J(Me,ke){return this._t(1,ke,Me,1,0,0)}function xe(Me,ke){return this.shear(I(Me),I(ke))}function Z(Me,ke){var Ge=C(ke),Be=E(ke);return this._t(Ge,Be,0,0,-Be,Ge,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,I(Me),1,0,0,0,0,1,0,0,0,0,1)._t(Ge,-Be,0,0,Be,Ge,0,0,0,0,1,0,0,0,0,1)}function _e(Me,ke,Ge){return!Ge&&Ge!==0&&(Ge=1),Me===1&&ke===1&&Ge===1?this:this._t(Me,0,0,0,0,ke,0,0,0,0,Ge,0,0,0,0,1)}function Se(Me,ke,Ge,Be,qe,Ke,Ye,tt,et,it,nt,ot,Ze,Je,st,rt){return this.props[0]=Me,this.props[1]=ke,this.props[2]=Ge,this.props[3]=Be,this.props[4]=qe,this.props[5]=Ke,this.props[6]=Ye,this.props[7]=tt,this.props[8]=et,this.props[9]=it,this.props[10]=nt,this.props[11]=ot,this.props[12]=Ze,this.props[13]=Je,this.props[14]=st,this.props[15]=rt,this}function Ee(Me,ke,Ge){return Ge=Ge||0,Me!==0||ke!==0||Ge!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,Me,ke,Ge,1):this}function Ae(Me,ke,Ge,Be,qe,Ke,Ye,tt,et,it,nt,ot,Ze,Je,st,rt){var Qe=this.props;if(Me===1&&ke===0&&Ge===0&&Be===0&&qe===0&&Ke===1&&Ye===0&&tt===0&&et===0&&it===0&&nt===1&&ot===0)return Qe[12]=Qe[12]*Me+Qe[15]*Ze,Qe[13]=Qe[13]*Ke+Qe[15]*Je,Qe[14]=Qe[14]*nt+Qe[15]*st,Qe[15]*=rt,this._identityCalculated=!1,this;var at=Qe[0],ht=Qe[1],ct=Qe[2],ft=Qe[3],xt=Qe[4],pt=Qe[5],mt=Qe[6],bt=Qe[7],_t=Qe[8],vt=Qe[9],It=Qe[10],At=Qe[11],Ft=Qe[12],kt=Qe[13],qt=Qe[14],Vt=Qe[15];return Qe[0]=at*Me+ht*qe+ct*et+ft*Ze,Qe[1]=at*ke+ht*Ke+ct*it+ft*Je,Qe[2]=at*Ge+ht*Ye+ct*nt+ft*st,Qe[3]=at*Be+ht*tt+ct*ot+ft*rt,Qe[4]=xt*Me+pt*qe+mt*et+bt*Ze,Qe[5]=xt*ke+pt*Ke+mt*it+bt*Je,Qe[6]=xt*Ge+pt*Ye+mt*nt+bt*st,Qe[7]=xt*Be+pt*tt+mt*ot+bt*rt,Qe[8]=_t*Me+vt*qe+It*et+At*Ze,Qe[9]=_t*ke+vt*Ke+It*it+At*Je,Qe[10]=_t*Ge+vt*Ye+It*nt+At*st,Qe[11]=_t*Be+vt*tt+It*ot+At*rt,Qe[12]=Ft*Me+kt*qe+qt*et+Vt*Ze,Qe[13]=Ft*ke+kt*Ke+qt*it+Vt*Je,Qe[14]=Ft*Ge+kt*Ye+qt*nt+Vt*st,Qe[15]=Ft*Be+kt*tt+qt*ot+Vt*rt,this._identityCalculated=!1,this}function Re(Me){var ke=Me.props;return this.transform(ke[0],ke[1],ke[2],ke[3],ke[4],ke[5],ke[6],ke[7],ke[8],ke[9],ke[10],ke[11],ke[12],ke[13],ke[14],ke[15])}function Te(){return this._identityCalculated||(this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),this._identityCalculated=!0),this._identity}function we(Me){for(var ke=0;ke<16;){if(Me.props[ke]!==this.props[ke])return!1;ke+=1}return!0}function Pe(Me){var ke;for(ke=0;ke<16;ke+=1)Me.props[ke]=this.props[ke];return Me}function Ie(Me){var ke;for(ke=0;ke<16;ke+=1)this.props[ke]=Me[ke]}function Fe(Me,ke,Ge){return{x:Me*this.props[0]+ke*this.props[4]+Ge*this.props[8]+this.props[12],y:Me*this.props[1]+ke*this.props[5]+Ge*this.props[9]+this.props[13],z:Me*this.props[2]+ke*this.props[6]+Ge*this.props[10]+this.props[14]}}function Oe(Me,ke,Ge){return Me*this.props[0]+ke*this.props[4]+Ge*this.props[8]+this.props[12]}function Le(Me,ke,Ge){return Me*this.props[1]+ke*this.props[5]+Ge*this.props[9]+this.props[13]}function $e(Me,ke,Ge){return Me*this.props[2]+ke*this.props[6]+Ge*this.props[10]+this.props[14]}function Ve(){var Me=this.props[0]*this.props[5]-this.props[1]*this.props[4],ke=this.props[5]/Me,Ge=-this.props[1]/Me,Be=-this.props[4]/Me,qe=this.props[0]/Me,Ke=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/Me,Ye=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/Me,tt=new Matrix;return tt.props[0]=ke,tt.props[1]=Ge,tt.props[4]=Be,tt.props[5]=qe,tt.props[12]=Ke,tt.props[13]=Ye,tt}function Xe(Me){var ke=this.getInverseMatrix();return ke.applyToPointArray(Me[0],Me[1],Me[2]||0)}function Ue(Me){var ke,Ge=Me.length,Be=[];for(ke=0;ke<Ge;ke+=1)Be[ke]=Xe(Me[ke]);return Be}function We(Me,ke,Ge){var Be=createTypedArray("float32",6);if(this.isIdentity())Be[0]=Me[0],Be[1]=Me[1],Be[2]=ke[0],Be[3]=ke[1],Be[4]=Ge[0],Be[5]=Ge[1];else{var qe=this.props[0],Ke=this.props[1],Ye=this.props[4],tt=this.props[5],et=this.props[12],it=this.props[13];Be[0]=Me[0]*qe+Me[1]*Ye+et,Be[1]=Me[0]*Ke+Me[1]*tt+it,Be[2]=ke[0]*qe+ke[1]*Ye+et,Be[3]=ke[0]*Ke+ke[1]*tt+it,Be[4]=Ge[0]*qe+Ge[1]*Ye+et,Be[5]=Ge[0]*Ke+Ge[1]*tt+it}return Be}function je(Me,ke,Ge){var Be;return this.isIdentity()?Be=[Me,ke,Ge]:Be=[Me*this.props[0]+ke*this.props[4]+Ge*this.props[8]+this.props[12],Me*this.props[1]+ke*this.props[5]+Ge*this.props[9]+this.props[13],Me*this.props[2]+ke*this.props[6]+Ge*this.props[10]+this.props[14]],Be}function ze(Me,ke){if(this.isIdentity())return Me+","+ke;var Ge=this.props;return Math.round((Me*Ge[0]+ke*Ge[4]+Ge[12])*100)/100+","+Math.round((Me*Ge[1]+ke*Ge[5]+Ge[13])*100)/100}function He(){for(var Me=0,ke=this.props,Ge="matrix3d(",Be=1e4;Me<16;)Ge+=B(ke[Me]*Be)/Be,Ge+=Me===15?")":",",Me+=1;return Ge}function De(Me){var ke=1e4;return Me<1e-6&&Me>0||Me>-1e-6&&Me<0?B(Me*ke)/ke:Me}function Ne(){var Me=this.props,ke=De(Me[0]),Ge=De(Me[1]),Be=De(Me[4]),qe=De(Me[5]),Ke=De(Me[12]),Ye=De(Me[13]);return"matrix("+ke+","+Ge+","+Be+","+qe+","+Ke+","+Ye+")"}return function(){this.reset=U,this.rotate=V,this.rotateX=X,this.rotateY=Y,this.rotateZ=K,this.skew=xe,this.skewFromAxis=Z,this.shear=J,this.scale=_e,this.setTransform=Se,this.translate=Ee,this.transform=Ae,this.multiply=Re,this.applyToPoint=Fe,this.applyToX=Oe,this.applyToY=Le,this.applyToZ=$e,this.applyToPointArray=je,this.applyToTriplePoints=We,this.applyToPointStringified=ze,this.toCSS=He,this.to2dCSS=Ne,this.clone=Pe,this.cloneFromProps=Ie,this.equals=we,this.inversePoints=Ue,this.inversePoint=Xe,this.getInverseMatrix=Ve,this._t=this.transform,this.isIdentity=Te,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$3=function(I){return typeof I}:_typeof$3=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},_typeof$3(C)}var lottie={};function setLocation(C){setLocationHref(C)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(C){setSubframeEnabled(C)}function setPrefix(C){setIdPrefix(C)}function loadAnimation(C){return animationManager.loadAnimation(C)}function setQuality(C){if(typeof C=="string")switch(C){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10);break}else!isNaN(C)&&C>1&&setDefaultCurveSegments(C)}function inBrowser(){return typeof navigator<"u"}function installPlugin(C,E){C==="expressions"&&setExpressionsPlugin(E)}function getFactory(C){switch(C){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.12.2";function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(C){for(var E=queryString.split("&"),I=0;I<E.length;I+=1){var B=E[I].split("=");if(decodeURIComponent(B[0])==C)return decodeURIComponent(B[1])}return null}var queryString="";{var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{_typeof$3(exports)!=="object"&&(window.bodymovin=lottie)}catch(C){}var ShapeModifiers=function(){var C={},E={};C.registerModifier=I,C.getModifier=B;function I(U,V){E[U]||(E[U]=V)}function B(U,V,X){return new E[U](V,X)}return C}();function ShapeModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(C){if(!this.closed){C.sh.container.addDynamicProperty(C.sh);var E={shape:C.sh,data:C,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(E),this.addShapeToModifier(E),this._isAnimated&&C.setAsAnimated()}},ShapeModifier.prototype.init=function(C,E){this.shapes=[],this.elem=C,this.initDynamicPropertyContainer(C),this.initModifierProperties(C,E),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier);function TrimModifier(){}extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(C,E){this.s=PropertyFactory.getProp(C,E.s,0,.01,this),this.e=PropertyFactory.getProp(C,E.e,0,.01,this),this.o=PropertyFactory.getProp(C,E.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=E.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(C){C.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(C,E,I,B,U){var V=[];E<=1?V.push({s:C,e:E}):C>=1?V.push({s:C-1,e:E-1}):(V.push({s:C,e:1}),V.push({s:0,e:E-1}));var X=[],Y,K=V.length,J;for(Y=0;Y<K;Y+=1)if(J=V[Y],!(J.e*U<B||J.s*U>B+I)){var xe,Z;J.s*U<=B?xe=0:xe=(J.s*U-B)/I,J.e*U>=B+I?Z=1:Z=(J.e*U-B)/I,X.push([xe,Z])}return X.length||X.push([0,0]),X},TrimModifier.prototype.releasePathsData=function(C){var E,I=C.length;for(E=0;E<I;E+=1)segmentsLengthPool.release(C[E]);return C.length=0,C},TrimModifier.prototype.processShapes=function(C){var E,I;if(this._mdf||C){var B=this.o.v%360/360;if(B<0&&(B+=1),this.s.v>1?E=1+B:this.s.v<0?E=0+B:E=this.s.v+B,this.e.v>1?I=1+B:this.e.v<0?I=0+B:I=this.e.v+B,E>I){var U=E;E=I,I=U}E=Math.round(E*1e4)*1e-4,I=Math.round(I*1e4)*1e-4,this.sValue=E,this.eValue=I}else E=this.sValue,I=this.eValue;var V,X,Y=this.shapes.length,K,J,xe,Z,_e,Se=0;if(I===E)for(X=0;X<Y;X+=1)this.shapes[X].localShapeCollection.releaseShapes(),this.shapes[X].shape._mdf=!0,this.shapes[X].shape.paths=this.shapes[X].localShapeCollection,this._mdf&&(this.shapes[X].pathsData.length=0);else if(I===1&&E===0||I===0&&E===1){if(this._mdf)for(X=0;X<Y;X+=1)this.shapes[X].pathsData.length=0,this.shapes[X].shape._mdf=!0}else{var Ee=[],Ae,Re;for(X=0;X<Y;X+=1)if(Ae=this.shapes[X],!Ae.shape._mdf&&!this._mdf&&!C&&this.m!==2)Ae.shape.paths=Ae.localShapeCollection;else{if(V=Ae.shape.paths,J=V._length,_e=0,!Ae.shape._mdf&&Ae.pathsData.length)_e=Ae.totalShapeLength;else{for(xe=this.releasePathsData(Ae.pathsData),K=0;K<J;K+=1)Z=bez.getSegmentsLength(V.shapes[K]),xe.push(Z),_e+=Z.totalLength;Ae.totalShapeLength=_e,Ae.pathsData=xe}Se+=_e,Ae.shape._mdf=!0}var Te=E,we=I,Pe=0,Ie;for(X=Y-1;X>=0;X-=1)if(Ae=this.shapes[X],Ae.shape._mdf){for(Re=Ae.localShapeCollection,Re.releaseShapes(),this.m===2&&Y>1?(Ie=this.calculateShapeEdges(E,I,Ae.totalShapeLength,Pe,Se),Pe+=Ae.totalShapeLength):Ie=[[Te,we]],J=Ie.length,K=0;K<J;K+=1){Te=Ie[K][0],we=Ie[K][1],Ee.length=0,we<=1?Ee.push({s:Ae.totalShapeLength*Te,e:Ae.totalShapeLength*we}):Te>=1?Ee.push({s:Ae.totalShapeLength*(Te-1),e:Ae.totalShapeLength*(we-1)}):(Ee.push({s:Ae.totalShapeLength*Te,e:Ae.totalShapeLength}),Ee.push({s:0,e:Ae.totalShapeLength*(we-1)}));var Fe=this.addShapes(Ae,Ee[0]);if(Ee[0].s!==Ee[0].e){if(Ee.length>1){var Oe=Ae.shape.paths.shapes[Ae.shape.paths._length-1];if(Oe.c){var Le=Fe.pop();this.addPaths(Fe,Re),Fe=this.addShapes(Ae,Ee[1],Le)}else this.addPaths(Fe,Re),Fe=this.addShapes(Ae,Ee[1])}this.addPaths(Fe,Re)}}Ae.shape.paths=Re}}},TrimModifier.prototype.addPaths=function(C,E){var I,B=C.length;for(I=0;I<B;I+=1)E.addShape(C[I])},TrimModifier.prototype.addSegment=function(C,E,I,B,U,V,X){U.setXYAt(E[0],E[1],"o",V),U.setXYAt(I[0],I[1],"i",V+1),X&&U.setXYAt(C[0],C[1],"v",V),U.setXYAt(B[0],B[1],"v",V+1)},TrimModifier.prototype.addSegmentFromArray=function(C,E,I,B){E.setXYAt(C[1],C[5],"o",I),E.setXYAt(C[2],C[6],"i",I+1),B&&E.setXYAt(C[0],C[4],"v",I),E.setXYAt(C[3],C[7],"v",I+1)},TrimModifier.prototype.addShapes=function(C,E,I){var B=C.pathsData,U=C.shape.paths.shapes,V,X=C.shape.paths._length,Y,K,J=0,xe,Z,_e,Se,Ee=[],Ae,Re=!0;for(I?(Z=I._length,Ae=I._length):(I=shapePool.newElement(),Z=0,Ae=0),Ee.push(I),V=0;V<X;V+=1){for(_e=B[V].lengths,I.c=U[V].c,K=U[V].c?_e.length:_e.length+1,Y=1;Y<K;Y+=1)if(xe=_e[Y-1],J+xe.addedLength<E.s)J+=xe.addedLength,I.c=!1;else if(J>E.e){I.c=!1;break}else E.s<=J&&E.e>=J+xe.addedLength?(this.addSegment(U[V].v[Y-1],U[V].o[Y-1],U[V].i[Y],U[V].v[Y],I,Z,Re),Re=!1):(Se=bez.getNewSegment(U[V].v[Y-1],U[V].v[Y],U[V].o[Y-1],U[V].i[Y],(E.s-J)/xe.addedLength,(E.e-J)/xe.addedLength,_e[Y-1]),this.addSegmentFromArray(Se,I,Z,Re),Re=!1,I.c=!1),J+=xe.addedLength,Z+=1;if(U[V].c&&_e.length){if(xe=_e[Y-1],J<=E.e){var Te=_e[Y-1].addedLength;E.s<=J&&E.e>=J+Te?(this.addSegment(U[V].v[Y-1],U[V].o[Y-1],U[V].i[0],U[V].v[0],I,Z,Re),Re=!1):(Se=bez.getNewSegment(U[V].v[Y-1],U[V].v[0],U[V].o[Y-1],U[V].i[0],(E.s-J)/Te,(E.e-J)/Te,_e[Y-1]),this.addSegmentFromArray(Se,I,Z,Re),Re=!1,I.c=!1)}else I.c=!1;J+=xe.addedLength,Z+=1}if(I._length&&(I.setXYAt(I.v[Ae][0],I.v[Ae][1],"i",Ae),I.setXYAt(I.v[I._length-1][0],I.v[I._length-1][1],"o",I._length-1)),J>E.e)break;V<X-1&&(I=shapePool.newElement(),Re=!0,Ee.push(I),Z=0)}return Ee};function PuckerAndBloatModifier(){}extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(C,E){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(C,E.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(C,E){var I=E/100,B=[0,0],U=C._length,V=0;for(V=0;V<U;V+=1)B[0]+=C.v[V][0],B[1]+=C.v[V][1];B[0]/=U,B[1]/=U;var X=shapePool.newElement();X.c=C.c;var Y,K,J,xe,Z,_e;for(V=0;V<U;V+=1)Y=C.v[V][0]+(B[0]-C.v[V][0])*I,K=C.v[V][1]+(B[1]-C.v[V][1])*I,J=C.o[V][0]+(B[0]-C.o[V][0])*-I,xe=C.o[V][1]+(B[1]-C.o[V][1])*-I,Z=C.i[V][0]+(B[0]-C.i[V][0])*-I,_e=C.i[V][1]+(B[1]-C.i[V][1])*-I,X.setTripleAt(Y,K,J,xe,Z,_e,V);return X},PuckerAndBloatModifier.prototype.processShapes=function(C){var E,I,B=this.shapes.length,U,V,X=this.amount.v;if(X!==0){var Y,K;for(I=0;I<B;I+=1){if(Y=this.shapes[I],K=Y.localShapeCollection,!(!Y.shape._mdf&&!this._mdf&&!C))for(K.releaseShapes(),Y.shape._mdf=!0,E=Y.shape.paths.shapes,V=Y.shape.paths._length,U=0;U<V;U+=1)K.addShape(this.processPath(E[U],X));Y.shape.paths=Y.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var C=[0,0];function E(K){var J=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||J,this.a&&K.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&K.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&K.skewFromAxis(-this.sk.v,this.sa.v),this.r?K.rotate(-this.r.v):K.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?K.translate(this.px.v,this.py.v,-this.pz.v):K.translate(this.px.v,this.py.v,0):K.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function I(K){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||K){var J;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var xe,Z;if(J=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(xe=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/J,0),Z=this.p.getValueAtTime(this.p.keyframes[0].t/J,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(xe=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/J,0),Z=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/J,0)):(xe=this.p.pv,Z=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/J,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){xe=[],Z=[];var _e=this.px,Se=this.py;_e._caching.lastFrame+_e.offsetTime<=_e.keyframes[0].t?(xe[0]=_e.getValueAtTime((_e.keyframes[0].t+.01)/J,0),xe[1]=Se.getValueAtTime((Se.keyframes[0].t+.01)/J,0),Z[0]=_e.getValueAtTime(_e.keyframes[0].t/J,0),Z[1]=Se.getValueAtTime(Se.keyframes[0].t/J,0)):_e._caching.lastFrame+_e.offsetTime>=_e.keyframes[_e.keyframes.length-1].t?(xe[0]=_e.getValueAtTime(_e.keyframes[_e.keyframes.length-1].t/J,0),xe[1]=Se.getValueAtTime(Se.keyframes[Se.keyframes.length-1].t/J,0),Z[0]=_e.getValueAtTime((_e.keyframes[_e.keyframes.length-1].t-.01)/J,0),Z[1]=Se.getValueAtTime((Se.keyframes[Se.keyframes.length-1].t-.01)/J,0)):(xe=[_e.pv,Se.pv],Z[0]=_e.getValueAtTime((_e._caching.lastFrame+_e.offsetTime-.01)/J,_e.offsetTime),Z[1]=Se.getValueAtTime((Se._caching.lastFrame+Se.offsetTime-.01)/J,Se.offsetTime))}else Z=C,xe=Z;this.v.rotate(-Math.atan2(xe[1]-Z[1],xe[0]-Z[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function B(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length&&(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}function U(){}function V(K){this._addDynamicProperty(K),this.elem.addDynamicProperty(K),this._isDirty=!0}function X(K,J,xe){if(this.elem=K,this.frameId=-1,this.propType="transform",this.data=J,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(xe||K),J.p&&J.p.s?(this.px=PropertyFactory.getProp(K,J.p.x,0,0,this),this.py=PropertyFactory.getProp(K,J.p.y,0,0,this),J.p.z&&(this.pz=PropertyFactory.getProp(K,J.p.z,0,0,this))):this.p=PropertyFactory.getProp(K,J.p||{k:[0,0,0]},1,0,this),J.rx){if(this.rx=PropertyFactory.getProp(K,J.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(K,J.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(K,J.rz,0,degToRads,this),J.or.k[0].ti){var Z,_e=J.or.k.length;for(Z=0;Z<_e;Z+=1)J.or.k[Z].to=null,J.or.k[Z].ti=null}this.or=PropertyFactory.getProp(K,J.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(K,J.r||{k:0},0,degToRads,this);J.sk&&(this.sk=PropertyFactory.getProp(K,J.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(K,J.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(K,J.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(K,J.s||{k:[100,100,100]},1,.01,this),J.o?this.o=PropertyFactory.getProp(K,J.o,0,.01,K):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}X.prototype={applyToMatrix:E,getValue:I,precalculateMatrix:B,autoOrient:U},extendPrototype([DynamicPropertyContainer],X),X.prototype.addDynamicProperty=V,X.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty;function Y(K,J,xe){return new X(K,J,xe)}return{getTransformProperty:Y}}();function RepeaterModifier(){}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(C,E){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(C,E.c,0,null,this),this.o=PropertyFactory.getProp(C,E.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(C,E.tr,this),this.so=PropertyFactory.getProp(C,E.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(C,E.tr.eo,0,.01,this),this.data=E,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(C,E,I,B,U,V){var X=V?-1:1,Y=B.s.v[0]+(1-B.s.v[0])*(1-U),K=B.s.v[1]+(1-B.s.v[1])*(1-U);C.translate(B.p.v[0]*X*U,B.p.v[1]*X*U,B.p.v[2]),E.translate(-B.a.v[0],-B.a.v[1],B.a.v[2]),E.rotate(-B.r.v*X*U),E.translate(B.a.v[0],B.a.v[1],B.a.v[2]),I.translate(-B.a.v[0],-B.a.v[1],B.a.v[2]),I.scale(V?1/Y:Y,V?1/K:K),I.translate(B.a.v[0],B.a.v[1],B.a.v[2])},RepeaterModifier.prototype.init=function(C,E,I,B){for(this.elem=C,this.arr=E,this.pos=I,this.elemsData=B,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(C),this.initModifierProperties(C,E[I]);I>0;)I-=1,this._elements.unshift(E[I]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(C){var E,I=C.length;for(E=0;E<I;E+=1)C[E]._processed=!1,C[E].ty==="gr"&&this.resetElements(C[E].it)},RepeaterModifier.prototype.cloneElements=function(C){var E=JSON.parse(JSON.stringify(C));return this.resetElements(E),E},RepeaterModifier.prototype.changeGroupRender=function(C,E){var I,B=C.length;for(I=0;I<B;I+=1)C[I]._render=E,C[I].ty==="gr"&&this.changeGroupRender(C[I].it,E)},RepeaterModifier.prototype.processShapes=function(C){var E,I,B,U,V,X=!1;if(this._mdf||C){var Y=Math.ceil(this.c.v);if(this._groups.length<Y){for(;this._groups.length<Y;){var K={it:this.cloneElements(this._elements),ty:"gr"};K.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,K),this._groups.splice(0,0,K),this._currentCopies+=1}this.elem.reloadShapes(),X=!0}V=0;var J;for(B=0;B<=this._groups.length-1;B+=1){if(J=V<Y,this._groups[B]._render=J,this.changeGroupRender(this._groups[B].it,J),!J){var xe=this.elemsData[B].it,Z=xe[xe.length-1];Z.transform.op.v!==0?(Z.transform.op._mdf=!0,Z.transform.op.v=0):Z.transform.op._mdf=!1}V+=1}this._currentCopies=Y;var _e=this.o.v,Se=_e%1,Ee=_e>0?Math.floor(_e):Math.ceil(_e),Ae=this.pMatrix.props,Re=this.rMatrix.props,Te=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var we=0;if(_e>0){for(;we<Ee;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),we+=1;Se&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,Se,!1),we+=Se)}else if(_e<0){for(;we>Ee;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),we-=1;Se&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-Se,!0),we-=Se)}B=this.data.m===1?0:this._currentCopies-1,U=this.data.m===1?1:-1,V=this._currentCopies;for(var Pe,Ie;V;){if(E=this.elemsData[B].it,I=E[E.length-1].transform.mProps.v.props,Ie=I.length,E[E.length-1].transform.mProps._mdf=!0,E[E.length-1].transform.op._mdf=!0,E[E.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(B/(this._currentCopies-1)),we!==0){for((B!==0&&U===1||B!==this._currentCopies-1&&U===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(Re[0],Re[1],Re[2],Re[3],Re[4],Re[5],Re[6],Re[7],Re[8],Re[9],Re[10],Re[11],Re[12],Re[13],Re[14],Re[15]),this.matrix.transform(Te[0],Te[1],Te[2],Te[3],Te[4],Te[5],Te[6],Te[7],Te[8],Te[9],Te[10],Te[11],Te[12],Te[13],Te[14],Te[15]),this.matrix.transform(Ae[0],Ae[1],Ae[2],Ae[3],Ae[4],Ae[5],Ae[6],Ae[7],Ae[8],Ae[9],Ae[10],Ae[11],Ae[12],Ae[13],Ae[14],Ae[15]),Pe=0;Pe<Ie;Pe+=1)I[Pe]=this.matrix.props[Pe];this.matrix.reset()}else for(this.matrix.reset(),Pe=0;Pe<Ie;Pe+=1)I[Pe]=this.matrix.props[Pe];we+=1,V-=1,B+=U}}else for(V=this._currentCopies,B=0,U=1;V;)E=this.elemsData[B].it,I=E[E.length-1].transform.mProps.v.props,E[E.length-1].transform.mProps._mdf=!1,E[E.length-1].transform.op._mdf=!1,V-=1,B+=U;return X},RepeaterModifier.prototype.addShape=function(){};function RoundCornersModifier(){}extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(C,E){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(C,E.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(C,E){var I=shapePool.newElement();I.c=C.c;var B,U=C._length,V,X,Y,K,J,xe,Z=0,_e,Se,Ee,Ae,Re,Te;for(B=0;B<U;B+=1)V=C.v[B],Y=C.o[B],X=C.i[B],V[0]===Y[0]&&V[1]===Y[1]&&V[0]===X[0]&&V[1]===X[1]?(B===0||B===U-1)&&!C.c?(I.setTripleAt(V[0],V[1],Y[0],Y[1],X[0],X[1],Z),Z+=1):(B===0?K=C.v[U-1]:K=C.v[B-1],J=Math.sqrt(Math.pow(V[0]-K[0],2)+Math.pow(V[1]-K[1],2)),xe=J?Math.min(J/2,E)/J:0,Re=V[0]+(K[0]-V[0])*xe,_e=Re,Te=V[1]-(V[1]-K[1])*xe,Se=Te,Ee=_e-(_e-V[0])*roundCorner,Ae=Se-(Se-V[1])*roundCorner,I.setTripleAt(_e,Se,Ee,Ae,Re,Te,Z),Z+=1,B===U-1?K=C.v[0]:K=C.v[B+1],J=Math.sqrt(Math.pow(V[0]-K[0],2)+Math.pow(V[1]-K[1],2)),xe=J?Math.min(J/2,E)/J:0,Ee=V[0]+(K[0]-V[0])*xe,_e=Ee,Ae=V[1]+(K[1]-V[1])*xe,Se=Ae,Re=_e-(_e-V[0])*roundCorner,Te=Se-(Se-V[1])*roundCorner,I.setTripleAt(_e,Se,Ee,Ae,Re,Te,Z),Z+=1):(I.setTripleAt(C.v[B][0],C.v[B][1],C.o[B][0],C.o[B][1],C.i[B][0],C.i[B][1],Z),Z+=1);return I},RoundCornersModifier.prototype.processShapes=function(C){var E,I,B=this.shapes.length,U,V,X=this.rd.v;if(X!==0){var Y,K;for(I=0;I<B;I+=1){if(Y=this.shapes[I],K=Y.localShapeCollection,!(!Y.shape._mdf&&!this._mdf&&!C))for(K.releaseShapes(),Y.shape._mdf=!0,E=Y.shape.paths.shapes,V=Y.shape.paths._length,U=0;U<V;U+=1)K.addShape(this.processPath(E[U],X));Y.shape.paths=Y.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function floatEqual(C,E){return Math.abs(C-E)*1e5<=Math.min(Math.abs(C),Math.abs(E))}function floatZero(C){return Math.abs(C)<=1e-5}function lerp(C,E,I){return C*(1-I)+E*I}function lerpPoint(C,E,I){return[lerp(C[0],E[0],I),lerp(C[1],E[1],I)]}function quadRoots(C,E,I){if(C===0)return[];var B=E*E-4*C*I;if(B<0)return[];var U=-E/(2*C);if(B===0)return[U];var V=Math.sqrt(B)/(2*C);return[U-V,U+V]}function polynomialCoefficients(C,E,I,B){return[-C+3*E-3*I+B,3*C-6*E+3*I,-3*C+3*E,C]}function singlePoint(C){return new PolynomialBezier(C,C,C,C,!1)}function PolynomialBezier(C,E,I,B,U){U&&pointEqual(C,E)&&(E=lerpPoint(C,B,1/3)),U&&pointEqual(I,B)&&(I=lerpPoint(C,B,2/3));var V=polynomialCoefficients(C[0],E[0],I[0],B[0]),X=polynomialCoefficients(C[1],E[1],I[1],B[1]);this.a=[V[0],X[0]],this.b=[V[1],X[1]],this.c=[V[2],X[2]],this.d=[V[3],X[3]],this.points=[C,E,I,B]}PolynomialBezier.prototype.point=function(C){return[((this.a[0]*C+this.b[0])*C+this.c[0])*C+this.d[0],((this.a[1]*C+this.b[1])*C+this.c[1])*C+this.d[1]]},PolynomialBezier.prototype.derivative=function(C){return[(3*C*this.a[0]+2*this.b[0])*C+this.c[0],(3*C*this.a[1]+2*this.b[1])*C+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(C){var E=this.derivative(C);return Math.atan2(E[1],E[0])},PolynomialBezier.prototype.normalAngle=function(C){var E=this.derivative(C);return Math.atan2(E[0],E[1])},PolynomialBezier.prototype.inflectionPoints=function(){var C=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(C))return[];var E=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/C,I=E*E-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/C;if(I<0)return[];var B=Math.sqrt(I);return floatZero(B)?B>0&&B<1?[E]:[]:[E-B,E+B].filter(function(U){return U>0&&U<1})},PolynomialBezier.prototype.split=function(C){if(C<=0)return[singlePoint(this.points[0]),this];if(C>=1)return[this,singlePoint(this.points[this.points.length-1])];var E=lerpPoint(this.points[0],this.points[1],C),I=lerpPoint(this.points[1],this.points[2],C),B=lerpPoint(this.points[2],this.points[3],C),U=lerpPoint(E,I,C),V=lerpPoint(I,B,C),X=lerpPoint(U,V,C);return[new PolynomialBezier(this.points[0],E,U,X,!0),new PolynomialBezier(X,V,B,this.points[3],!0)]};function extrema(C,E){var I=C.points[0][E],B=C.points[C.points.length-1][E];if(I>B){var U=B;B=I,I=U}for(var V=quadRoots(3*C.a[E],2*C.b[E],C.c[E]),X=0;X<V.length;X+=1)if(V[X]>0&&V[X]<1){var Y=C.point(V[X])[E];Y<I?I=Y:Y>B&&(B=Y)}return{min:I,max:B}}PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var C=this.bounds();return{left:C.x.min,right:C.x.max,top:C.y.min,bottom:C.y.max,width:C.x.max-C.x.min,height:C.y.max-C.y.min,cx:(C.x.max+C.x.min)/2,cy:(C.y.max+C.y.min)/2}};function intersectData(C,E,I){var B=C.boundingBox();return{cx:B.cx,cy:B.cy,width:B.width,height:B.height,bez:C,t:(E+I)/2,t1:E,t2:I}}function splitData(C){var E=C.bez.split(.5);return[intersectData(E[0],C.t1,C.t),intersectData(E[1],C.t,C.t2)]}function boxIntersect(C,E){return Math.abs(C.cx-E.cx)*2<C.width+E.width&&Math.abs(C.cy-E.cy)*2<C.height+E.height}function intersectsImpl(C,E,I,B,U,V){if(boxIntersect(C,E)){if(I>=V||C.width<=B&&C.height<=B&&E.width<=B&&E.height<=B){U.push([C.t,E.t]);return}var X=splitData(C),Y=splitData(E);intersectsImpl(X[0],Y[0],I+1,B,U,V),intersectsImpl(X[0],Y[1],I+1,B,U,V),intersectsImpl(X[1],Y[0],I+1,B,U,V),intersectsImpl(X[1],Y[1],I+1,B,U,V)}}PolynomialBezier.prototype.intersections=function(C,E,I){E===void 0&&(E=2),I===void 0&&(I=7);var B=[];return intersectsImpl(intersectData(this,0,1),intersectData(C,0,1),0,E,B,I),B},PolynomialBezier.shapeSegment=function(C,E){var I=(E+1)%C.length();return new PolynomialBezier(C.v[E],C.o[E],C.i[I],C.v[I],!0)},PolynomialBezier.shapeSegmentInverted=function(C,E){var I=(E+1)%C.length();return new PolynomialBezier(C.v[I],C.i[I],C.o[E],C.v[E],!0)};function crossProduct(C,E){return[C[1]*E[2]-C[2]*E[1],C[2]*E[0]-C[0]*E[2],C[0]*E[1]-C[1]*E[0]]}function lineIntersection(C,E,I,B){var U=[C[0],C[1],1],V=[E[0],E[1],1],X=[I[0],I[1],1],Y=[B[0],B[1],1],K=crossProduct(crossProduct(U,V),crossProduct(X,Y));return floatZero(K[2])?null:[K[0]/K[2],K[1]/K[2]]}function polarOffset(C,E,I){return[C[0]+Math.cos(E)*I,C[1]-Math.sin(E)*I]}function pointDistance(C,E){return Math.hypot(C[0]-E[0],C[1]-E[1])}function pointEqual(C,E){return floatEqual(C[0],E[0])&&floatEqual(C[1],E[1])}function ZigZagModifier(){}extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(C,E){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(C,E.s,0,null,this),this.frequency=PropertyFactory.getProp(C,E.r,0,null,this),this.pointsType=PropertyFactory.getProp(C,E.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function setPoint(C,E,I,B,U,V,X){var Y=I-Math.PI/2,K=I+Math.PI/2,J=E[0]+Math.cos(I)*B*U,xe=E[1]-Math.sin(I)*B*U;C.setTripleAt(J,xe,J+Math.cos(Y)*V,xe-Math.sin(Y)*V,J+Math.cos(K)*X,xe-Math.sin(K)*X,C.length())}function getPerpendicularVector(C,E){var I=[E[0]-C[0],E[1]-C[1]],B=-Math.PI*.5,U=[Math.cos(B)*I[0]-Math.sin(B)*I[1],Math.sin(B)*I[0]+Math.cos(B)*I[1]];return U}function getProjectingAngle(C,E){var I=E===0?C.length()-1:E-1,B=(E+1)%C.length(),U=C.v[I],V=C.v[B],X=getPerpendicularVector(U,V);return Math.atan2(0,1)-Math.atan2(X[1],X[0])}function zigZagCorner(C,E,I,B,U,V,X){var Y=getProjectingAngle(E,I),K=E.v[I%E._length],J=E.v[I===0?E._length-1:I-1],xe=E.v[(I+1)%E._length],Z=V===2?Math.sqrt(Math.pow(K[0]-J[0],2)+Math.pow(K[1]-J[1],2)):0,_e=V===2?Math.sqrt(Math.pow(K[0]-xe[0],2)+Math.pow(K[1]-xe[1],2)):0;setPoint(C,E.v[I%E._length],Y,X,B,_e/((U+1)*2),Z/((U+1)*2))}function zigZagSegment(C,E,I,B,U,V){for(var X=0;X<B;X+=1){var Y=(X+1)/(B+1),K=U===2?Math.sqrt(Math.pow(E.points[3][0]-E.points[0][0],2)+Math.pow(E.points[3][1]-E.points[0][1],2)):0,J=E.normalAngle(Y),xe=E.point(Y);setPoint(C,xe,J,V,I,K/((B+1)*2),K/((B+1)*2)),V=-V}return V}ZigZagModifier.prototype.processPath=function(C,E,I,B){var U=C._length,V=shapePool.newElement();if(V.c=C.c,C.c||(U-=1),U===0)return V;var X=-1,Y=PolynomialBezier.shapeSegment(C,0);zigZagCorner(V,C,0,E,I,B,X);for(var K=0;K<U;K+=1)X=zigZagSegment(V,Y,E,I,B,-X),K===U-1&&!C.c?Y=null:Y=PolynomialBezier.shapeSegment(C,(K+1)%U),zigZagCorner(V,C,K+1,E,I,B,X);return V},ZigZagModifier.prototype.processShapes=function(C){var E,I,B=this.shapes.length,U,V,X=this.amplitude.v,Y=Math.max(0,Math.round(this.frequency.v)),K=this.pointsType.v;if(X!==0){var J,xe;for(I=0;I<B;I+=1){if(J=this.shapes[I],xe=J.localShapeCollection,!(!J.shape._mdf&&!this._mdf&&!C))for(xe.releaseShapes(),J.shape._mdf=!0,E=J.shape.paths.shapes,V=J.shape.paths._length,U=0;U<V;U+=1)xe.addShape(this.processPath(E[U],X,Y,K));J.shape.paths=J.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function linearOffset(C,E,I){var B=Math.atan2(E[0]-C[0],E[1]-C[1]);return[polarOffset(C,B,I),polarOffset(E,B,I)]}function offsetSegment(C,E){var I,B,U,V,X,Y,K;K=linearOffset(C.points[0],C.points[1],E),I=K[0],B=K[1],K=linearOffset(C.points[1],C.points[2],E),U=K[0],V=K[1],K=linearOffset(C.points[2],C.points[3],E),X=K[0],Y=K[1];var J=lineIntersection(I,B,U,V);J===null&&(J=B);var xe=lineIntersection(X,Y,U,V);return xe===null&&(xe=X),new PolynomialBezier(I,J,xe,Y)}function joinLines(C,E,I,B,U){var V=E.points[3],X=I.points[0];if(B===3||pointEqual(V,X))return V;if(B===2){var Y=-E.tangentAngle(1),K=-I.tangentAngle(0)+Math.PI,J=lineIntersection(V,polarOffset(V,Y+Math.PI/2,100),X,polarOffset(X,Y+Math.PI/2,100)),xe=J?pointDistance(J,V):pointDistance(V,X)/2,Z=polarOffset(V,Y,2*xe*roundCorner);return C.setXYAt(Z[0],Z[1],"o",C.length()-1),Z=polarOffset(X,K,2*xe*roundCorner),C.setTripleAt(X[0],X[1],X[0],X[1],Z[0],Z[1],C.length()),X}var _e=pointEqual(V,E.points[2])?E.points[0]:E.points[2],Se=pointEqual(X,I.points[1])?I.points[3]:I.points[1],Ee=lineIntersection(_e,V,X,Se);return Ee&&pointDistance(Ee,V)<U?(C.setTripleAt(Ee[0],Ee[1],Ee[0],Ee[1],Ee[0],Ee[1],C.length()),Ee):V}function getIntersection(C,E){var I=C.intersections(E);return I.length&&floatEqual(I[0][0],1)&&I.shift(),I.length?I[0]:null}function pruneSegmentIntersection(C,E){var I=C.slice(),B=E.slice(),U=getIntersection(C[C.length-1],E[0]);return U&&(I[C.length-1]=C[C.length-1].split(U[0])[0],B[0]=E[0].split(U[1])[1]),C.length>1&&E.length>1&&(U=getIntersection(C[0],E[E.length-1]),U)?[[C[0].split(U[0])[0]],[E[E.length-1].split(U[1])[1]]]:[I,B]}function pruneIntersections(C){for(var E,I=1;I<C.length;I+=1)E=pruneSegmentIntersection(C[I-1],C[I]),C[I-1]=E[0],C[I]=E[1];return C.length>1&&(E=pruneSegmentIntersection(C[C.length-1],C[0]),C[C.length-1]=E[0],C[0]=E[1]),C}function offsetSegmentSplit(C,E){var I=C.inflectionPoints(),B,U,V,X;if(I.length===0)return[offsetSegment(C,E)];if(I.length===1||floatEqual(I[1],1))return V=C.split(I[0]),B=V[0],U=V[1],[offsetSegment(B,E),offsetSegment(U,E)];V=C.split(I[0]),B=V[0];var Y=(I[1]-I[0])/(1-I[0]);return V=V[1].split(Y),X=V[0],U=V[1],[offsetSegment(B,E),offsetSegment(X,E),offsetSegment(U,E)]}function OffsetPathModifier(){}extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(C,E){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(C,E.a,0,null,this),this.miterLimit=PropertyFactory.getProp(C,E.ml,0,null,this),this.lineJoin=E.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(C,E,I,B){var U=shapePool.newElement();U.c=C.c;var V=C.length();C.c||(V-=1);var X,Y,K,J=[];for(X=0;X<V;X+=1)K=PolynomialBezier.shapeSegment(C,X),J.push(offsetSegmentSplit(K,E));if(!C.c)for(X=V-1;X>=0;X-=1)K=PolynomialBezier.shapeSegmentInverted(C,X),J.push(offsetSegmentSplit(K,E));J=pruneIntersections(J);var xe=null,Z=null;for(X=0;X<J.length;X+=1){var _e=J[X];for(Z&&(xe=joinLines(U,Z,_e[0],I,B)),Z=_e[_e.length-1],Y=0;Y<_e.length;Y+=1)K=_e[Y],xe&&pointEqual(K.points[0],xe)?U.setXYAt(K.points[1][0],K.points[1][1],"o",U.length()-1):U.setTripleAt(K.points[0][0],K.points[0][1],K.points[1][0],K.points[1][1],K.points[0][0],K.points[0][1],U.length()),U.setTripleAt(K.points[3][0],K.points[3][1],K.points[3][0],K.points[3][1],K.points[2][0],K.points[2][1],U.length()),xe=K.points[3]}return J.length&&joinLines(U,Z,J[0][0],I,B),U},OffsetPathModifier.prototype.processShapes=function(C){var E,I,B=this.shapes.length,U,V,X=this.amount.v,Y=this.miterLimit.v,K=this.lineJoin;if(X!==0){var J,xe;for(I=0;I<B;I+=1){if(J=this.shapes[I],xe=J.localShapeCollection,!(!J.shape._mdf&&!this._mdf&&!C))for(xe.releaseShapes(),J.shape._mdf=!0,E=J.shape.paths.shapes,V=J.shape.paths._length,U=0;U<V;U+=1)xe.addShape(this.processPath(E[U],X,K,Y));J.shape.paths=J.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function getFontProperties(C){for(var E=C.fStyle?C.fStyle.split(" "):[],I="normal",B="normal",U=E.length,V,X=0;X<U;X+=1)switch(V=E[X].toLowerCase(),V){case"italic":B="italic";break;case"bold":I="700";break;case"black":I="900";break;case"medium":I="500";break;case"regular":case"normal":I="400";break;case"light":case"thin":I="200";break}return{style:B,weight:C.fWeight||I}}var FontManager=function(){var C=5e3,E={w:0,size:0,shapes:[],data:{shapes:[]}},I=[];I=I.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var B=127988,U=917631,V=917601,X=917626,Y=65039,K=8205,J=127462,xe=127487,Z=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function _e(De){var Ne=De.split(","),Me,ke=Ne.length,Ge=[];for(Me=0;Me<ke;Me+=1)Ne[Me]!=="sans-serif"&&Ne[Me]!=="monospace"&&Ge.push(Ne[Me]);return Ge.join(",")}function Se(De,Ne){var Me=createTag("span");Me.setAttribute("aria-hidden",!0),Me.style.fontFamily=Ne;var ke=createTag("span");ke.innerText="giItT1WQy@!-/#",Me.style.position="absolute",Me.style.left="-10000px",Me.style.top="-10000px",Me.style.fontSize="300px",Me.style.fontVariant="normal",Me.style.fontStyle="normal",Me.style.fontWeight="normal",Me.style.letterSpacing="0",Me.appendChild(ke),document.body.appendChild(Me);var Ge=ke.offsetWidth;return ke.style.fontFamily=_e(De)+", "+Ne,{node:ke,w:Ge,parent:Me}}function Ee(){var De,Ne=this.fonts.length,Me,ke,Ge=Ne;for(De=0;De<Ne;De+=1)this.fonts[De].loaded?Ge-=1:this.fonts[De].fOrigin==="n"||this.fonts[De].origin===0?this.fonts[De].loaded=!0:(Me=this.fonts[De].monoCase.node,ke=this.fonts[De].monoCase.w,Me.offsetWidth!==ke?(Ge-=1,this.fonts[De].loaded=!0):(Me=this.fonts[De].sansCase.node,ke=this.fonts[De].sansCase.w,Me.offsetWidth!==ke&&(Ge-=1,this.fonts[De].loaded=!0)),this.fonts[De].loaded&&(this.fonts[De].sansCase.parent.parentNode.removeChild(this.fonts[De].sansCase.parent),this.fonts[De].monoCase.parent.parentNode.removeChild(this.fonts[De].monoCase.parent)));Ge!==0&&Date.now()-this.initTime<C?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)}function Ae(De,Ne){var Me=document.body&&Ne?"svg":"canvas",ke,Ge=getFontProperties(De);if(Me==="svg"){var Be=createNS("text");Be.style.fontSize="100px",Be.setAttribute("font-family",De.fFamily),Be.setAttribute("font-style",Ge.style),Be.setAttribute("font-weight",Ge.weight),Be.textContent="1",De.fClass?(Be.style.fontFamily="inherit",Be.setAttribute("class",De.fClass)):Be.style.fontFamily=De.fFamily,Ne.appendChild(Be),ke=Be}else{var qe=new OffscreenCanvas(500,500).getContext("2d");qe.font=Ge.style+" "+Ge.weight+" 100px "+De.fFamily,ke=qe}function Ke(Ye){return Me==="svg"?(ke.textContent=Ye,ke.getComputedTextLength()):ke.measureText(Ye).width}return{measureText:Ke}}function Re(De,Ne){if(!De){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=De.list;return}if(!document.body){this.isLoaded=!0,De.list.forEach(function(nt){nt.helper=Ae(nt),nt.cache={}}),this.fonts=De.list;return}var Me=De.list,ke,Ge=Me.length,Be=Ge;for(ke=0;ke<Ge;ke+=1){var qe=!0,Ke,Ye;if(Me[ke].loaded=!1,Me[ke].monoCase=Se(Me[ke].fFamily,"monospace"),Me[ke].sansCase=Se(Me[ke].fFamily,"sans-serif"),!Me[ke].fPath)Me[ke].loaded=!0,Be-=1;else if(Me[ke].fOrigin==="p"||Me[ke].origin===3){if(Ke=document.querySelectorAll('style[f-forigin="p"][f-family="'+Me[ke].fFamily+'"], style[f-origin="3"][f-family="'+Me[ke].fFamily+'"]'),Ke.length>0&&(qe=!1),qe){var tt=createTag("style");tt.setAttribute("f-forigin",Me[ke].fOrigin),tt.setAttribute("f-origin",Me[ke].origin),tt.setAttribute("f-family",Me[ke].fFamily),tt.type="text/css",tt.innerText="@font-face {font-family: "+Me[ke].fFamily+"; font-style: normal; src: url('"+Me[ke].fPath+"');}",Ne.appendChild(tt)}}else if(Me[ke].fOrigin==="g"||Me[ke].origin===1){for(Ke=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),Ye=0;Ye<Ke.length;Ye+=1)Ke[Ye].href.indexOf(Me[ke].fPath)!==-1&&(qe=!1);if(qe){var et=createTag("link");et.setAttribute("f-forigin",Me[ke].fOrigin),et.setAttribute("f-origin",Me[ke].origin),et.type="text/css",et.rel="stylesheet",et.href=Me[ke].fPath,document.body.appendChild(et)}}else if(Me[ke].fOrigin==="t"||Me[ke].origin===2){for(Ke=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),Ye=0;Ye<Ke.length;Ye+=1)Me[ke].fPath===Ke[Ye].src&&(qe=!1);if(qe){var it=createTag("link");it.setAttribute("f-forigin",Me[ke].fOrigin),it.setAttribute("f-origin",Me[ke].origin),it.setAttribute("rel","stylesheet"),it.setAttribute("href",Me[ke].fPath),Ne.appendChild(it)}}Me[ke].helper=Ae(Me[ke],Ne),Me[ke].cache={},this.fonts.push(Me[ke])}Be===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}function Te(De){if(De){this.chars||(this.chars=[]);var Ne,Me=De.length,ke,Ge=this.chars.length,Be;for(Ne=0;Ne<Me;Ne+=1){for(ke=0,Be=!1;ke<Ge;)this.chars[ke].style===De[Ne].style&&this.chars[ke].fFamily===De[Ne].fFamily&&this.chars[ke].ch===De[Ne].ch&&(Be=!0),ke+=1;Be||(this.chars.push(De[Ne]),Ge+=1)}}}function we(De,Ne,Me){for(var ke=0,Ge=this.chars.length;ke<Ge;){if(this.chars[ke].ch===De&&this.chars[ke].style===Ne&&this.chars[ke].fFamily===Me)return this.chars[ke];ke+=1}return(typeof De=="string"&&De.charCodeAt(0)!==13||!De)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",De,Ne,Me)),E}function Pe(De,Ne,Me){var ke=this.getFontByName(Ne),Ge=De;if(!ke.cache[Ge]){var Be=ke.helper;if(De===" "){var qe=Be.measureText("|"+De+"|"),Ke=Be.measureText("||");ke.cache[Ge]=(qe-Ke)/100}else ke.cache[Ge]=Be.measureText(De)/100}return ke.cache[Ge]*Me}function Ie(De){for(var Ne=0,Me=this.fonts.length;Ne<Me;){if(this.fonts[Ne].fName===De)return this.fonts[Ne];Ne+=1}return this.fonts[0]}function Fe(De){var Ne=0,Me=De.charCodeAt(0);if(Me>=55296&&Me<=56319){var ke=De.charCodeAt(1);ke>=56320&&ke<=57343&&(Ne=(Me-55296)*1024+ke-56320+65536)}return Ne}function Oe(De,Ne){var Me=De.toString(16)+Ne.toString(16);return Z.indexOf(Me)!==-1}function Le(De){return De===K}function $e(De){return De===Y}function Ve(De){var Ne=Fe(De);return Ne>=J&&Ne<=xe}function Xe(De){return Ve(De.substr(0,2))&&Ve(De.substr(2,2))}function Ue(De){return I.indexOf(De)!==-1}function We(De,Ne){var Me=Fe(De.substr(Ne,2));if(Me!==B)return!1;var ke=0;for(Ne+=2;ke<5;){if(Me=Fe(De.substr(Ne,2)),Me<V||Me>X)return!1;ke+=1,Ne+=2}return Fe(De.substr(Ne,2))===U}function je(){this.isLoaded=!0}var ze=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};ze.isModifier=Oe,ze.isZeroWidthJoiner=Le,ze.isFlagEmoji=Xe,ze.isRegionalCode=Ve,ze.isCombinedCharacter=Ue,ze.isRegionalFlag=We,ze.isVariationSelector=$e,ze.BLACK_FLAG_CODE_POINT=B;var He={addChars:Te,addFonts:Re,getCharData:we,getFontByName:Ie,measureText:Pe,checkLoadedFonts:Ee,setIsLoaded:je};return ze.prototype=He,ze}();function SlotManager(C){this.animationData=C}SlotManager.prototype.getProp=function(C){return this.animationData.slots&&this.animationData.slots[C.sid]?Object.assign(C,this.animationData.slots[C.sid].p):C};function slotFactory(C){return new SlotManager(C)}function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(E){this.renderableComponents.indexOf(E)===-1&&this.renderableComponents.push(E)},removeRenderableComponent:function(E){this.renderableComponents.indexOf(E)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(E),1)},prepareRenderableFrame:function(E){this.checkLayerLimits(E)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(E){this.data.ip-this.data.st<=E&&this.data.op-this.data.st>E?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var E,I=this.renderableComponents.length;for(E=0;E<I;E+=1)this.renderableComponents[E].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=function(){var C={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"};return function(E){return C[E]||""}}();function SliderEffect(C,E,I){this.p=PropertyFactory.getProp(E,C.v,0,0,I)}function AngleEffect(C,E,I){this.p=PropertyFactory.getProp(E,C.v,0,0,I)}function ColorEffect(C,E,I){this.p=PropertyFactory.getProp(E,C.v,1,0,I)}function PointEffect(C,E,I){this.p=PropertyFactory.getProp(E,C.v,1,0,I)}function LayerIndexEffect(C,E,I){this.p=PropertyFactory.getProp(E,C.v,0,0,I)}function MaskIndexEffect(C,E,I){this.p=PropertyFactory.getProp(E,C.v,0,0,I)}function CheckboxEffect(C,E,I){this.p=PropertyFactory.getProp(E,C.v,0,0,I)}function NoValueEffect(){this.p={}}function EffectsManager(C,E){var I=C.ef||[];this.effectElements=[];var B,U=I.length,V;for(B=0;B<U;B+=1)V=new GroupEffect(I[B],E),this.effectElements.push(V)}function GroupEffect(C,E){this.init(C,E)}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(C,E){this.data=C,this.effectElements=[],this.initDynamicPropertyContainer(E);var I,B=this.data.ef.length,U,V=this.data.ef;for(I=0;I<B;I+=1){switch(U=null,V[I].ty){case 0:U=new SliderEffect(V[I],E,this);break;case 1:U=new AngleEffect(V[I],E,this);break;case 2:U=new ColorEffect(V[I],E,this);break;case 3:U=new PointEffect(V[I],E,this);break;case 4:case 7:U=new CheckboxEffect(V[I],E,this);break;case 10:U=new LayerIndexEffect(V[I],E,this);break;case 11:U=new MaskIndexEffect(V[I],E,this);break;case 5:U=new EffectsManager(V[I],E);break;default:U=new NoValueEffect(V[I]);break}U&&this.effectElements.push(U)}};function BaseElement(){}BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var E=0,I=this.data.masksProperties.length;E<I;){if(this.data.masksProperties[E].mode!=="n"&&this.data.masksProperties[E].cl!==!1)return!0;E+=1}return!1},initExpressions:function(){var E=getExpressionInterfaces();if(E){var I=E("layer"),B=E("effects"),U=E("shape"),V=E("text"),X=E("comp");this.layerInterface=I(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var Y=B.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(Y),this.data.ty===0||this.data.xt?this.compInterface=X(this):this.data.ty===4?(this.layerInterface.shapeInterface=U(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):this.data.ty===5&&(this.layerInterface.textInterface=V(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var E=getBlendMode(this.data.bm),I=this.baseElement||this.layerElement;I.style["mix-blend-mode"]=E},initBaseData:function(E,I,B){this.globalData=I,this.comp=B,this.data=E,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}};function FrameElement(){}FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(E,I){var B,U=this.dynamicProperties.length;for(B=0;B<U;B+=1)(I||this._isParent&&this.dynamicProperties[B].propType==="transform")&&(this.dynamicProperties[B].getValue(),this.dynamicProperties[B]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(E){this.dynamicProperties.indexOf(E)===-1&&this.dynamicProperties.push(E)}};function FootageElement(C,E,I){this.initFrame(),this.initRenderable(),this.assetData=E.getAssetData(C.refId),this.footageData=E.imageLoader.getAsset(this.assetData),this.initBaseData(C,E,I)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var C=getExpressionInterfaces();if(C){var E=C("footage");this.layerInterface=E(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData};function AudioElement(C,E,I){this.initFrame(),this.initRenderable(),this.assetData=E.getAssetData(C.refId),this.initBaseData(C,E,I),this._isPlaying=!1,this._canPlay=!1;var B=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(B),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=C.tm?PropertyFactory.getProp(this,C.tm,0,E.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,C.au&&C.au.lv?C.au.lv:{k:[100]},1,.01,this)}AudioElement.prototype.prepareFrame=function(C){if(this.prepareRenderableFrame(C,!0),this.prepareProperties(C,!0),this.tm._placeholder)this._currentTime=C/this.data.sr;else{var E=this.tm.v;this._currentTime=E}this._volume=this.lv.v[0];var I=this._volume*this._volumeMultiplier;this._previousVolume!==I&&(this._previousVolume=I,this.audio.volume(I))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(C){this.audio.rate(C)},AudioElement.prototype.volume=function(C){this._volumeMultiplier=C,this._previousVolume=C*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){};function BaseRenderer(){}BaseRenderer.prototype.checkLayers=function(C){var E,I=this.layers.length,B;for(this.completeLayers=!0,E=I-1;E>=0;E-=1)this.elements[E]||(B=this.layers[E],B.ip-B.st<=C-this.layers[E].st&&B.op-B.st>C-this.layers[E].st&&this.buildItem(E)),this.completeLayers=this.elements[E]?this.completeLayers:!1;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(C){switch(C.ty){case 2:return this.createImage(C);case 0:return this.createComp(C);case 1:return this.createSolid(C);case 3:return this.createNull(C);case 4:return this.createShape(C);case 5:return this.createText(C);case 6:return this.createAudio(C);case 13:return this.createCamera(C);case 15:return this.createFootage(C);default:return this.createNull(C)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(C){return new AudioElement(C,this.globalData,this)},BaseRenderer.prototype.createFootage=function(C){return new FootageElement(C,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var C,E=this.layers.length;for(C=0;C<E;C+=1)this.buildItem(C);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(C){this.completeLayers=!1;var E,I=C.length,B,U=this.layers.length;for(E=0;E<I;E+=1)for(B=0;B<U;){if(this.layers[B].id===C[E].id){this.layers[B]=C[E];break}B+=1}},BaseRenderer.prototype.setProjectInterface=function(C){this.globalData.projectInterface=C},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(C,E,I){for(var B=this.elements,U=this.layers,V=0,X=U.length;V<X;)U[V].ind==E&&(!B[V]||B[V]===!0?(this.buildItem(V),this.addPendingElement(C)):(I.push(B[V]),B[V].setAsParent(),U[V].parent!==void 0?this.buildElementParenting(C,U[V].parent,I):C.setHierarchy(I))),V+=1},BaseRenderer.prototype.addPendingElement=function(C){this.pendingElements.push(C)},BaseRenderer.prototype.searchExtraCompositions=function(C){var E,I=C.length;for(E=0;E<I;E+=1)if(C[E].xt){var B=this.createComp(C[E]);B.initExpressions(),this.globalData.projectInterface.registerComposition(B)}},BaseRenderer.prototype.getElementById=function(C){var E,I=this.elements.length;for(E=0;E<I;E+=1)if(this.elements[E].data.ind===C)return this.elements[E];return null},BaseRenderer.prototype.getElementByPath=function(C){var E=C.shift(),I;if(typeof E=="number")I=this.elements[E];else{var B,U=this.elements.length;for(B=0;B<U;B+=1)if(this.elements[B].data.nm===E){I=this.elements[B];break}}return C.length===0?I:I.getElementByPath(C)},BaseRenderer.prototype.setupGlobalData=function(C,E){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(C),this.globalData.fontManager.addChars(C.chars),this.globalData.fontManager.addFonts(C.fonts,E),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=C.fr,this.globalData.nm=C.nm,this.globalData.compSize={w:C.w,h:C.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}TransformElement.prototype={initTransform:function(){var E=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:E,localMat:E,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var E,I=this.finalTransform.mat,B=0,U=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;B<U;){if(this.hierarchy[B].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}B+=1}if(this.finalTransform._matMdf)for(E=this.finalTransform.mProp.v.props,I.cloneFromProps(E),B=0;B<U;B+=1)I.multiply(this.hierarchy[B].finalTransform.mProp.v)}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var E=0,I=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;E<I;)this.localTransforms[E]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[E]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),E+=1;if(this.finalTransform._localMatMdf){var B=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(B),E=1;E<I;E+=1){var U=this.localTransforms[E].matrix;B.multiply(U)}B.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var V=this.finalTransform.localOpacity;for(E=0;E<I;E+=1)V*=this.localTransforms[E].opacity*.01;this.finalTransform.localOpacity=V}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var E=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(E.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var I=0,B=E.length;for(I=0;I<B;I+=1)this.localTransforms.push(E[I])}}},globalToLocal:function(E){var I=[];I.push(this.finalTransform);for(var B=!0,U=this.comp;B;)U.finalTransform?(U.data.hasMask&&I.splice(0,0,U.finalTransform),U=U.comp):B=!1;var V,X=I.length,Y;for(V=0;V<X;V+=1)Y=I[V].mat.applyToPointArray(0,0,0),E=[E[0]-Y[0],E[1]-Y[1],0];return E},mHelper:new Matrix};function MaskElement(C,E,I){this.data=C,this.element=E,this.globalData=I,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var B=this.globalData.defs,U,V=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(V),this.solidPath="";var X,Y=this.masksProperties,K=0,J=[],xe,Z,_e=createElementID(),Se,Ee,Ae,Re,Te="clipPath",we="clip-path";for(U=0;U<V;U+=1)if((Y[U].mode!=="a"&&Y[U].mode!=="n"||Y[U].inv||Y[U].o.k!==100||Y[U].o.x)&&(Te="mask",we="mask"),(Y[U].mode==="s"||Y[U].mode==="i")&&K===0?(Se=createNS("rect"),Se.setAttribute("fill","#ffffff"),Se.setAttribute("width",this.element.comp.data.w||0),Se.setAttribute("height",this.element.comp.data.h||0),J.push(Se)):Se=null,X=createNS("path"),Y[U].mode==="n")this.viewData[U]={op:PropertyFactory.getProp(this.element,Y[U].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,Y[U],3),elem:X,lastPath:""},B.appendChild(X);else{K+=1,X.setAttribute("fill",Y[U].mode==="s"?"#000000":"#ffffff"),X.setAttribute("clip-rule","nonzero");var Pe;if(Y[U].x.k!==0?(Te="mask",we="mask",Re=PropertyFactory.getProp(this.element,Y[U].x,0,null,this.element),Pe=createElementID(),Ee=createNS("filter"),Ee.setAttribute("id",Pe),Ae=createNS("feMorphology"),Ae.setAttribute("operator","erode"),Ae.setAttribute("in","SourceGraphic"),Ae.setAttribute("radius","0"),Ee.appendChild(Ae),B.appendChild(Ee),X.setAttribute("stroke",Y[U].mode==="s"?"#000000":"#ffffff")):(Ae=null,Re=null),this.storedData[U]={elem:X,x:Re,expan:Ae,lastPath:"",lastOperator:"",filterId:Pe,lastRadius:0},Y[U].mode==="i"){Z=J.length;var Ie=createNS("g");for(xe=0;xe<Z;xe+=1)Ie.appendChild(J[xe]);var Fe=createNS("mask");Fe.setAttribute("mask-type","alpha"),Fe.setAttribute("id",_e+"_"+K),Fe.appendChild(X),B.appendChild(Fe),Ie.setAttribute("mask","url("+getLocationHref()+"#"+_e+"_"+K+")"),J.length=0,J.push(Ie)}else J.push(X);Y[U].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[U]={elem:X,lastPath:"",op:PropertyFactory.getProp(this.element,Y[U].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,Y[U],3),invRect:Se},this.viewData[U].prop.k||this.drawPath(Y[U],this.viewData[U].prop.v,this.viewData[U])}for(this.maskElement=createNS(Te),V=J.length,U=0;U<V;U+=1)this.maskElement.appendChild(J[U]);K>0&&(this.maskElement.setAttribute("id",_e),this.element.maskedElement.setAttribute(we,"url("+getLocationHref()+"#"+_e+")"),B.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}MaskElement.prototype.getMaskProperty=function(C){return this.viewData[C].prop},MaskElement.prototype.renderFrame=function(C){var E=this.element.finalTransform.mat,I,B=this.masksProperties.length;for(I=0;I<B;I+=1)if((this.viewData[I].prop._mdf||C)&&this.drawPath(this.masksProperties[I],this.viewData[I].prop.v,this.viewData[I]),(this.viewData[I].op._mdf||C)&&this.viewData[I].elem.setAttribute("fill-opacity",this.viewData[I].op.v),this.masksProperties[I].mode!=="n"&&(this.viewData[I].invRect&&(this.element.finalTransform.mProp._mdf||C)&&this.viewData[I].invRect.setAttribute("transform",E.getInverseMatrix().to2dCSS()),this.storedData[I].x&&(this.storedData[I].x._mdf||C))){var U=this.storedData[I].expan;this.storedData[I].x.v<0?(this.storedData[I].lastOperator!=="erode"&&(this.storedData[I].lastOperator="erode",this.storedData[I].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[I].filterId+")")),U.setAttribute("radius",-this.storedData[I].x.v)):(this.storedData[I].lastOperator!=="dilate"&&(this.storedData[I].lastOperator="dilate",this.storedData[I].elem.setAttribute("filter",null)),this.storedData[I].elem.setAttribute("stroke-width",this.storedData[I].x.v*2))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var C="M0,0 ";return C+=" h"+this.globalData.compSize.w,C+=" v"+this.globalData.compSize.h,C+=" h-"+this.globalData.compSize.w,C+=" v-"+this.globalData.compSize.h+" ",C},MaskElement.prototype.drawPath=function(C,E,I){var B=" M"+E.v[0][0]+","+E.v[0][1],U,V;for(V=E._length,U=1;U<V;U+=1)B+=" C"+E.o[U-1][0]+","+E.o[U-1][1]+" "+E.i[U][0]+","+E.i[U][1]+" "+E.v[U][0]+","+E.v[U][1];if(E.c&&V>1&&(B+=" C"+E.o[U-1][0]+","+E.o[U-1][1]+" "+E.i[0][0]+","+E.i[0][1]+" "+E.v[0][0]+","+E.v[0][1]),I.lastPath!==B){var X="";I.elem&&(E.c&&(X=C.inv?this.solidPath+B:B),I.elem.setAttribute("d",X)),I.lastPath=B}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var C={};C.createFilter=E,C.createAlphaToLuminanceFilter=I;function E(B,U){var V=createNS("filter");return V.setAttribute("id",B),U!==!0&&(V.setAttribute("filterUnits","objectBoundingBox"),V.setAttribute("x","0%"),V.setAttribute("y","0%"),V.setAttribute("width","100%"),V.setAttribute("height","100%")),V}function I(){var B=createNS("feColorMatrix");return B.setAttribute("type","matrix"),B.setAttribute("color-interpolation-filters","sRGB"),B.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),B}return C}(),featureSupport=function(){var C={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(C.maskType=!1),/firefox/i.test(navigator.userAgent)&&(C.svgLumaHidden=!1),C}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(C){var E,I="SourceGraphic",B=C.data.ef?C.data.ef.length:0,U=createElementID(),V=filtersFactory.createFilter(U,!0),X=0;this.filters=[];var Y;for(E=0;E<B;E+=1){Y=null;var K=C.data.ef[E].ty;if(registeredEffects$1[K]){var J=registeredEffects$1[K].effect;Y=new J(V,C.effectsManager.effectElements[E],C,idPrefix+X,I),I=idPrefix+X,registeredEffects$1[K].countsAsEffect&&(X+=1)}Y&&this.filters.push(Y)}X&&(C.globalData.defs.appendChild(V),C.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+U+")")),this.filters.length&&C.addRenderableComponent(this)}SVGEffects.prototype.renderFrame=function(C){var E,I=this.filters.length;for(E=0;E<I;E+=1)this.filters[E].renderFrame(C)},SVGEffects.prototype.getEffects=function(C){var E,I=this.filters.length,B=[];for(E=0;E<I;E+=1)this.filters[E].type===C&&B.push(this.filters[E]);return B};function registerEffect$1(C,E,I){registeredEffects$1[C]={effect:E,countsAsEffect:I}}function SVGBaseElement(){}SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var E=null;if(this.data.td){this.matteMasks={};var I=createNS("g");I.setAttribute("id",this.layerId),I.appendChild(this.layerElement),E=I,this.globalData.defs.appendChild(I)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),E=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.ty===0&&!this.data.hd){var B=createNS("clipPath"),U=createNS("path");U.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var V=createElementID();if(B.setAttribute("id",V),B.appendChild(U),this.globalData.defs.appendChild(B),this.checkMasks()){var X=createNS("g");X.setAttribute("clip-path","url("+getLocationHref()+"#"+V+")"),X.appendChild(this.layerElement),this.transformedElement=X,E?E.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+V+")")}this.data.bm!==0&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(E){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[E]){var I=this.layerId+"_"+E,B,U,V,X;if(E===1||E===3){var Y=createNS("mask");Y.setAttribute("id",I),Y.setAttribute("mask-type",E===3?"luminance":"alpha"),V=createNS("use"),V.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),Y.appendChild(V),this.globalData.defs.appendChild(Y),!featureSupport.maskType&&E===1&&(Y.setAttribute("mask-type","luminance"),B=createElementID(),U=filtersFactory.createFilter(B),this.globalData.defs.appendChild(U),U.appendChild(filtersFactory.createAlphaToLuminanceFilter()),X=createNS("g"),X.appendChild(V),Y.appendChild(X),X.setAttribute("filter","url("+getLocationHref()+"#"+B+")"))}else if(E===2){var K=createNS("mask");K.setAttribute("id",I),K.setAttribute("mask-type","alpha");var J=createNS("g");K.appendChild(J),B=createElementID(),U=filtersFactory.createFilter(B);var xe=createNS("feComponentTransfer");xe.setAttribute("in","SourceGraphic"),U.appendChild(xe);var Z=createNS("feFuncA");Z.setAttribute("type","table"),Z.setAttribute("tableValues","1.0 0.0"),xe.appendChild(Z),this.globalData.defs.appendChild(U);var _e=createNS("rect");_e.setAttribute("width",this.comp.data.w),_e.setAttribute("height",this.comp.data.h),_e.setAttribute("x","0"),_e.setAttribute("y","0"),_e.setAttribute("fill","#ffffff"),_e.setAttribute("opacity","0"),J.setAttribute("filter","url("+getLocationHref()+"#"+B+")"),J.appendChild(_e),V=createNS("use"),V.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),J.appendChild(V),featureSupport.maskType||(K.setAttribute("mask-type","luminance"),U.appendChild(filtersFactory.createAlphaToLuminanceFilter()),X=createNS("g"),J.appendChild(_e),X.appendChild(this.layerElement),J.appendChild(X)),this.globalData.defs.appendChild(K)}this.matteMasks[E]=I}return this.matteMasks[E]},setMatte:function(E){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+E+")")}};function HierarchyElement(){}HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(E){this.hierarchy=E},setAsParent:function(){this._isParent=!0},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[])}};function RenderableDOMElement(){}(function(){var C={initElement:function(I,B,U){this.initFrame(),this.initBaseData(I,B,U),this.initTransform(I,B,U),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){if(!this.hidden&&(!this.isInRange||this.isTransparent)){var I=this.baseElement||this.layerElement;I.style.display="none",this.hidden=!0}},show:function(){if(this.isInRange&&!this.isTransparent){if(!this.data.hd){var I=this.baseElement||this.layerElement;I.style.display="block"}this.hidden=!1,this._isFirstFrame=!0}},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(I){this._mdf=!1,this.prepareRenderableFrame(I),this.prepareProperties(I,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}};extendPrototype([RenderableElement,createProxyFunction(C)],RenderableDOMElement)})();function IImageElement(C,E,I){this.assetData=E.getAssetData(C.refId),this.assetData&&this.assetData.sid&&(this.assetData=E.slotManager.getProp(this.assetData)),this.initElement(C,E,I),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var C=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",C),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect};function ProcessedElement(C,E){this.elem=C,this.pos=E}function IShapeElement(){}IShapeElement.prototype={addShapeToModifiers:function(E){var I,B=this.shapeModifiers.length;for(I=0;I<B;I+=1)this.shapeModifiers[I].addShape(E)},isShapeInAnimatedModifiers:function(E){for(var I=0,B=this.shapeModifiers.length;I<B;)if(this.shapeModifiers[I].isAnimatedWithShape(E))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var E,I=this.shapes.length;for(E=0;E<I;E+=1)this.shapes[E].sh.reset();I=this.shapeModifiers.length;var B;for(E=I-1;E>=0&&(B=this.shapeModifiers[E].processShapes(this._isFirstFrame),!B);E-=1);}},searchProcessedElement:function(E){for(var I=this.processedElements,B=0,U=I.length;B<U;){if(I[B].elem===E)return I[B].pos;B+=1}return 0},addProcessedElement:function(E,I){for(var B=this.processedElements,U=B.length;U;)if(U-=1,B[U].elem===E){B[U].pos=I;return}B.push(new ProcessedElement(E,I))},prepareFrame:function(E){this.prepareRenderableFrame(E),this.prepareProperties(E,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(C,E,I){this.caches=[],this.styles=[],this.transformers=C,this.lStr="",this.sh=I,this.lvl=E,this._isAnimated=!!I.k;for(var B=0,U=C.length;B<U;){if(C[B].mProps.dynamicProperties.length){this._isAnimated=!0;break}B+=1}}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0};function SVGStyleData(C,E){this.data=C,this.type=C.ty,this.d="",this.lvl=E,this._mdf=!1,this.closed=C.hd===!0,this.pElem=createNS("path"),this.msElem=null}SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1};function DashProperty(C,E,I,B){this.elem=C,this.frameId=-1,this.dataProps=createSizedArray(E.length),this.renderer=I,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",E.length?E.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(B);var U,V=E.length||0,X;for(U=0;U<V;U+=1)X=PropertyFactory.getProp(C,E[U].v,0,0,this),this.k=X.k||this.k,this.dataProps[U]={n:E[U].n,p:X};this.k||this.getValue(!0),this._isAnimated=this.k}DashProperty.prototype.getValue=function(C){if(!(this.elem.globalData.frameId===this.frameId&&!C)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||C,this._mdf)){var E=0,I=this.dataProps.length;for(this.renderer==="svg"&&(this.dashStr=""),E=0;E<I;E+=1)this.dataProps[E].n!=="o"?this.renderer==="svg"?this.dashStr+=" "+this.dataProps[E].p.v:this.dashArray[E]=this.dataProps[E].p.v:this.dashoffset[0]=this.dataProps[E].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty);function SVGStrokeStyleData(C,E,I){this.initDynamicPropertyContainer(C),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(C,E.o,0,.01,this),this.w=PropertyFactory.getProp(C,E.w,0,null,this),this.d=new DashProperty(C,E.d||{},"svg",this),this.c=PropertyFactory.getProp(C,E.c,1,255,this),this.style=I,this._isAnimated=!!this._isAnimated}extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData);function SVGFillStyleData(C,E,I){this.initDynamicPropertyContainer(C),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(C,E.o,0,.01,this),this.c=PropertyFactory.getProp(C,E.c,1,255,this),this.style=I}extendPrototype([DynamicPropertyContainer],SVGFillStyleData);function SVGNoStyleData(C,E,I){this.initDynamicPropertyContainer(C),this.getValue=this.iterateDynamicProperties,this.style=I}extendPrototype([DynamicPropertyContainer],SVGNoStyleData);function GradientProperty(C,E,I){this.data=E,this.c=createTypedArray("uint8c",E.p*4);var B=E.k.k[0].s?E.k.k[0].s.length-E.p*4:E.k.k.length-E.p*4;this.o=createTypedArray("float32",B),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=B,this.initDynamicPropertyContainer(I),this.prop=PropertyFactory.getProp(C,E.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}GradientProperty.prototype.comparePoints=function(C,E){for(var I=0,B=this.o.length/2,U;I<B;){if(U=Math.abs(C[I*4]-C[E*4+I*2]),U>.01)return!1;I+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var C=0,E=this.data.k.k.length;C<E;){if(!this.comparePoints(this.data.k.k[C].s,this.data.p))return!1;C+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(C){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||C){var E,I=this.data.p*4,B,U;for(E=0;E<I;E+=1)B=E%4===0?100:255,U=Math.round(this.prop.v[E]*B),this.c[E]!==U&&(this.c[E]=U,this._cmdf=!C);if(this.o.length)for(I=this.prop.v.length,E=this.data.p*4;E<I;E+=1)B=E%2===0?100:1,U=E%2===0?Math.round(this.prop.v[E]*100):this.prop.v[E],this.o[E-this.data.p*4]!==U&&(this.o[E-this.data.p*4]=U,this._omdf=!C);this._mdf=!C}},extendPrototype([DynamicPropertyContainer],GradientProperty);function SVGGradientFillStyleData(C,E,I){this.initDynamicPropertyContainer(C),this.getValue=this.iterateDynamicProperties,this.initGradientData(C,E,I)}SVGGradientFillStyleData.prototype.initGradientData=function(C,E,I){this.o=PropertyFactory.getProp(C,E.o,0,.01,this),this.s=PropertyFactory.getProp(C,E.s,1,null,this),this.e=PropertyFactory.getProp(C,E.e,1,null,this),this.h=PropertyFactory.getProp(C,E.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(C,E.a||{k:0},0,degToRads,this),this.g=new GradientProperty(C,E.g,this),this.style=I,this.stops=[],this.setGradientData(I.pElem,E),this.setGradientOpacity(E,I),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(C,E){var I=createElementID(),B=createNS(E.t===1?"linearGradient":"radialGradient");B.setAttribute("id",I),B.setAttribute("spreadMethod","pad"),B.setAttribute("gradientUnits","userSpaceOnUse");var U=[],V,X,Y;for(Y=E.g.p*4,X=0;X<Y;X+=4)V=createNS("stop"),B.appendChild(V),U.push(V);C.setAttribute(E.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+I+")"),this.gf=B,this.cst=U},SVGGradientFillStyleData.prototype.setGradientOpacity=function(C,E){if(this.g._hasOpacity&&!this.g._collapsable){var I,B,U,V=createNS("mask"),X=createNS("path");V.appendChild(X);var Y=createElementID(),K=createElementID();V.setAttribute("id",K);var J=createNS(C.t===1?"linearGradient":"radialGradient");J.setAttribute("id",Y),J.setAttribute("spreadMethod","pad"),J.setAttribute("gradientUnits","userSpaceOnUse"),U=C.g.k.k[0].s?C.g.k.k[0].s.length:C.g.k.k.length;var xe=this.stops;for(B=C.g.p*4;B<U;B+=2)I=createNS("stop"),I.setAttribute("stop-color","rgb(255,255,255)"),J.appendChild(I),xe.push(I);X.setAttribute(C.ty==="gf"?"fill":"stroke","url("+getLocationHref()+"#"+Y+")"),C.ty==="gs"&&(X.setAttribute("stroke-linecap",lineCapEnum[C.lc||2]),X.setAttribute("stroke-linejoin",lineJoinEnum[C.lj||2]),C.lj===1&&X.setAttribute("stroke-miterlimit",C.ml)),this.of=J,this.ms=V,this.ost=xe,this.maskId=K,E.msElem=X}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData);function SVGGradientStrokeStyleData(C,E,I){this.initDynamicPropertyContainer(C),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(C,E.w,0,null,this),this.d=new DashProperty(C,E.d||{},"svg",this),this.initGradientData(C,E,I),this._isAnimated=!!this._isAnimated}extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(C,E,I){this.transform={mProps:C,op:E,container:I},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}var buildShapeString=function(E,I,B,U){if(I===0)return"";var V=E.o,X=E.i,Y=E.v,K,J=" M"+U.applyToPointStringified(Y[0][0],Y[0][1]);for(K=1;K<I;K+=1)J+=" C"+U.applyToPointStringified(V[K-1][0],V[K-1][1])+" "+U.applyToPointStringified(X[K][0],X[K][1])+" "+U.applyToPointStringified(Y[K][0],Y[K][1]);return B&&I&&(J+=" C"+U.applyToPointStringified(V[K-1][0],V[K-1][1])+" "+U.applyToPointStringified(X[0][0],X[0][1])+" "+U.applyToPointStringified(Y[0][0],Y[0][1]),J+="z"),J},SVGElementsRenderer=function(){var C=new Matrix,E=new Matrix,I={createRenderFunction:B};function B(Z){switch(Z.ty){case"fl":return Y;case"gf":return J;case"gs":return K;case"st":return xe;case"sh":case"el":case"rc":case"sr":return X;case"tr":return U;case"no":return V;default:return null}}function U(Z,_e,Se){(Se||_e.transform.op._mdf)&&_e.transform.container.setAttribute("opacity",_e.transform.op.v),(Se||_e.transform.mProps._mdf)&&_e.transform.container.setAttribute("transform",_e.transform.mProps.v.to2dCSS())}function V(){}function X(Z,_e,Se){var Ee,Ae,Re,Te,we,Pe,Ie=_e.styles.length,Fe=_e.lvl,Oe,Le,$e,Ve;for(Pe=0;Pe<Ie;Pe+=1){if(Te=_e.sh._mdf||Se,_e.styles[Pe].lvl<Fe){for(Le=E.reset(),$e=Fe-_e.styles[Pe].lvl,Ve=_e.transformers.length-1;!Te&&$e>0;)Te=_e.transformers[Ve].mProps._mdf||Te,$e-=1,Ve-=1;if(Te)for($e=Fe-_e.styles[Pe].lvl,Ve=_e.transformers.length-1;$e>0;)Le.multiply(_e.transformers[Ve].mProps.v),$e-=1,Ve-=1}else Le=C;if(Oe=_e.sh.paths,Ae=Oe._length,Te){for(Re="",Ee=0;Ee<Ae;Ee+=1)we=Oe.shapes[Ee],we&&we._length&&(Re+=buildShapeString(we,we._length,we.c,Le));_e.caches[Pe]=Re}else Re=_e.caches[Pe];_e.styles[Pe].d+=Z.hd===!0?"":Re,_e.styles[Pe]._mdf=Te||_e.styles[Pe]._mdf}}function Y(Z,_e,Se){var Ee=_e.style;(_e.c._mdf||Se)&&Ee.pElem.setAttribute("fill","rgb("+bmFloor(_e.c.v[0])+","+bmFloor(_e.c.v[1])+","+bmFloor(_e.c.v[2])+")"),(_e.o._mdf||Se)&&Ee.pElem.setAttribute("fill-opacity",_e.o.v)}function K(Z,_e,Se){J(Z,_e,Se),xe(Z,_e,Se)}function J(Z,_e,Se){var Ee=_e.gf,Ae=_e.g._hasOpacity,Re=_e.s.v,Te=_e.e.v;if(_e.o._mdf||Se){var we=Z.ty==="gf"?"fill-opacity":"stroke-opacity";_e.style.pElem.setAttribute(we,_e.o.v)}if(_e.s._mdf||Se){var Pe=Z.t===1?"x1":"cx",Ie=Pe==="x1"?"y1":"cy";Ee.setAttribute(Pe,Re[0]),Ee.setAttribute(Ie,Re[1]),Ae&&!_e.g._collapsable&&(_e.of.setAttribute(Pe,Re[0]),_e.of.setAttribute(Ie,Re[1]))}var Fe,Oe,Le,$e;if(_e.g._cmdf||Se){Fe=_e.cst;var Ve=_e.g.c;for(Le=Fe.length,Oe=0;Oe<Le;Oe+=1)$e=Fe[Oe],$e.setAttribute("offset",Ve[Oe*4]+"%"),$e.setAttribute("stop-color","rgb("+Ve[Oe*4+1]+","+Ve[Oe*4+2]+","+Ve[Oe*4+3]+")")}if(Ae&&(_e.g._omdf||Se)){var Xe=_e.g.o;for(_e.g._collapsable?Fe=_e.cst:Fe=_e.ost,Le=Fe.length,Oe=0;Oe<Le;Oe+=1)$e=Fe[Oe],_e.g._collapsable||$e.setAttribute("offset",Xe[Oe*2]+"%"),$e.setAttribute("stop-opacity",Xe[Oe*2+1])}if(Z.t===1)(_e.e._mdf||Se)&&(Ee.setAttribute("x2",Te[0]),Ee.setAttribute("y2",Te[1]),Ae&&!_e.g._collapsable&&(_e.of.setAttribute("x2",Te[0]),_e.of.setAttribute("y2",Te[1])));else{var Ue;if((_e.s._mdf||_e.e._mdf||Se)&&(Ue=Math.sqrt(Math.pow(Re[0]-Te[0],2)+Math.pow(Re[1]-Te[1],2)),Ee.setAttribute("r",Ue),Ae&&!_e.g._collapsable&&_e.of.setAttribute("r",Ue)),_e.e._mdf||_e.h._mdf||_e.a._mdf||Se){Ue||(Ue=Math.sqrt(Math.pow(Re[0]-Te[0],2)+Math.pow(Re[1]-Te[1],2)));var We=Math.atan2(Te[1]-Re[1],Te[0]-Re[0]),je=_e.h.v;je>=1?je=.99:je<=-1&&(je=-.99);var ze=Ue*je,He=Math.cos(We+_e.a.v)*ze+Re[0],De=Math.sin(We+_e.a.v)*ze+Re[1];Ee.setAttribute("fx",He),Ee.setAttribute("fy",De),Ae&&!_e.g._collapsable&&(_e.of.setAttribute("fx",He),_e.of.setAttribute("fy",De))}}}function xe(Z,_e,Se){var Ee=_e.style,Ae=_e.d;Ae&&(Ae._mdf||Se)&&Ae.dashStr&&(Ee.pElem.setAttribute("stroke-dasharray",Ae.dashStr),Ee.pElem.setAttribute("stroke-dashoffset",Ae.dashoffset[0])),_e.c&&(_e.c._mdf||Se)&&Ee.pElem.setAttribute("stroke","rgb("+bmFloor(_e.c.v[0])+","+bmFloor(_e.c.v[1])+","+bmFloor(_e.c.v[2])+")"),(_e.o._mdf||Se)&&Ee.pElem.setAttribute("stroke-opacity",_e.o.v),(_e.w._mdf||Se)&&(Ee.pElem.setAttribute("stroke-width",_e.w.v),Ee.msElem&&Ee.msElem.setAttribute("stroke-width",_e.w.v))}return I}();function SVGShapeElement(C,E,I){this.shapes=[],this.shapesData=C.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(C,E,I),this.prevViewData=[]}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var C,E=this.shapes.length,I,B,U=this.stylesList.length,V,X=[],Y=!1;for(B=0;B<U;B+=1){for(V=this.stylesList[B],Y=!1,X.length=0,C=0;C<E;C+=1)I=this.shapes[C],I.styles.indexOf(V)!==-1&&(X.push(I),Y=I._isAnimated||Y);X.length>1&&Y&&this.setShapesAsAnimated(X)}},SVGShapeElement.prototype.setShapesAsAnimated=function(C){var E,I=C.length;for(E=0;E<I;E+=1)C[E].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(C,E){var I,B=new SVGStyleData(C,E),U=B.pElem;if(C.ty==="st")I=new SVGStrokeStyleData(this,C,B);else if(C.ty==="fl")I=new SVGFillStyleData(this,C,B);else if(C.ty==="gf"||C.ty==="gs"){var V=C.ty==="gf"?SVGGradientFillStyleData:SVGGradientStrokeStyleData;I=new V(this,C,B),this.globalData.defs.appendChild(I.gf),I.maskId&&(this.globalData.defs.appendChild(I.ms),this.globalData.defs.appendChild(I.of),U.setAttribute("mask","url("+getLocationHref()+"#"+I.maskId+")"))}else C.ty==="no"&&(I=new SVGNoStyleData(this,C,B));return(C.ty==="st"||C.ty==="gs")&&(U.setAttribute("stroke-linecap",lineCapEnum[C.lc||2]),U.setAttribute("stroke-linejoin",lineJoinEnum[C.lj||2]),U.setAttribute("fill-opacity","0"),C.lj===1&&U.setAttribute("stroke-miterlimit",C.ml)),C.r===2&&U.setAttribute("fill-rule","evenodd"),C.ln&&U.setAttribute("id",C.ln),C.cl&&U.setAttribute("class",C.cl),C.bm&&(U.style["mix-blend-mode"]=getBlendMode(C.bm)),this.stylesList.push(B),this.addToAnimatedContents(C,I),I},SVGShapeElement.prototype.createGroupElement=function(C){var E=new ShapeGroupData;return C.ln&&E.gr.setAttribute("id",C.ln),C.cl&&E.gr.setAttribute("class",C.cl),C.bm&&(E.gr.style["mix-blend-mode"]=getBlendMode(C.bm)),E},SVGShapeElement.prototype.createTransformElement=function(C,E){var I=TransformPropertyFactory.getTransformProperty(this,C,this),B=new SVGTransformData(I,I.o,E);return this.addToAnimatedContents(C,B),B},SVGShapeElement.prototype.createShapeElement=function(C,E,I){var B=4;C.ty==="rc"?B=5:C.ty==="el"?B=6:C.ty==="sr"&&(B=7);var U=ShapePropertyFactory.getShapeProp(this,C,B,this),V=new SVGShapeData(E,I,U);return this.shapes.push(V),this.addShapeToModifiers(V),this.addToAnimatedContents(C,V),V},SVGShapeElement.prototype.addToAnimatedContents=function(C,E){for(var I=0,B=this.animatedContents.length;I<B;){if(this.animatedContents[I].element===E)return;I+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(C),element:E,data:C})},SVGShapeElement.prototype.setElementStyles=function(C){var E=C.styles,I,B=this.stylesList.length;for(I=0;I<B;I+=1)this.stylesList[I].closed||E.push(this.stylesList[I])},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var C,E=this.itemsData.length;for(C=0;C<E;C+=1)this.prevViewData[C]=this.itemsData[C];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),E=this.dynamicProperties.length,C=0;C<E;C+=1)this.dynamicProperties[C].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(C,E,I,B,U,V,X){var Y=[].concat(V),K,J=C.length-1,xe,Z,_e=[],Se=[],Ee,Ae,Re;for(K=J;K>=0;K-=1){if(Re=this.searchProcessedElement(C[K]),Re?E[K]=I[Re-1]:C[K]._render=X,C[K].ty==="fl"||C[K].ty==="st"||C[K].ty==="gf"||C[K].ty==="gs"||C[K].ty==="no")Re?E[K].style.closed=!1:E[K]=this.createStyleElement(C[K],U),C[K]._render&&E[K].style.pElem.parentNode!==B&&B.appendChild(E[K].style.pElem),_e.push(E[K].style);else if(C[K].ty==="gr"){if(!Re)E[K]=this.createGroupElement(C[K]);else for(Z=E[K].it.length,xe=0;xe<Z;xe+=1)E[K].prevViewData[xe]=E[K].it[xe];this.searchShapes(C[K].it,E[K].it,E[K].prevViewData,E[K].gr,U+1,Y,X),C[K]._render&&E[K].gr.parentNode!==B&&B.appendChild(E[K].gr)}else C[K].ty==="tr"?(Re||(E[K]=this.createTransformElement(C[K],B)),Ee=E[K].transform,Y.push(Ee)):C[K].ty==="sh"||C[K].ty==="rc"||C[K].ty==="el"||C[K].ty==="sr"?(Re||(E[K]=this.createShapeElement(C[K],Y,U)),this.setElementStyles(E[K])):C[K].ty==="tm"||C[K].ty==="rd"||C[K].ty==="ms"||C[K].ty==="pb"||C[K].ty==="zz"||C[K].ty==="op"?(Re?(Ae=E[K],Ae.closed=!1):(Ae=ShapeModifiers.getModifier(C[K].ty),Ae.init(this,C[K]),E[K]=Ae,this.shapeModifiers.push(Ae)),Se.push(Ae)):C[K].ty==="rp"&&(Re?(Ae=E[K],Ae.closed=!0):(Ae=ShapeModifiers.getModifier(C[K].ty),E[K]=Ae,Ae.init(this,C,K,E),this.shapeModifiers.push(Ae),X=!1),Se.push(Ae));this.addProcessedElement(C[K],K+1)}for(J=_e.length,K=0;K<J;K+=1)_e[K].closed=!0;for(J=Se.length,K=0;K<J;K+=1)Se[K].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var C,E=this.stylesList.length;for(C=0;C<E;C+=1)this.stylesList[C].reset();for(this.renderShape(),C=0;C<E;C+=1)(this.stylesList[C]._mdf||this._isFirstFrame)&&(this.stylesList[C].msElem&&(this.stylesList[C].msElem.setAttribute("d",this.stylesList[C].d),this.stylesList[C].d="M0 0"+this.stylesList[C].d),this.stylesList[C].pElem.setAttribute("d",this.stylesList[C].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var C,E=this.animatedContents.length,I;for(C=0;C<E;C+=1)I=this.animatedContents[C],(this._isFirstFrame||I.element._isAnimated)&&I.data!==!0&&I.fn(I.data,I.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null};function LetterProps(C,E,I,B,U,V){this.o=C,this.sw=E,this.sc=I,this.fc=B,this.m=U,this.p=V,this._mdf={o:!0,sw:!!E,sc:!!I,fc:!!B,m:!0,p:!0}}LetterProps.prototype.update=function(C,E,I,B,U,V){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var X=!1;return this.o!==C&&(this.o=C,this._mdf.o=!0,X=!0),this.sw!==E&&(this.sw=E,this._mdf.sw=!0,X=!0),this.sc!==I&&(this.sc=I,this._mdf.sc=!0,X=!0),this.fc!==B&&(this.fc=B,this._mdf.fc=!0,X=!0),this.m!==U&&(this.m=U,this._mdf.m=!0,X=!0),V.length&&(this.p[0]!==V[0]||this.p[1]!==V[1]||this.p[4]!==V[4]||this.p[5]!==V[5]||this.p[12]!==V[12]||this.p[13]!==V[13])&&(this.p=V,this._mdf.p=!0,X=!0),X};function TextProperty(C,E){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,E.d&&E.d.sid&&(E.d=C.globalData.slotManager.getProp(E.d)),this.data=E,this.elem=C,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(C,E){for(var I in E)Object.prototype.hasOwnProperty.call(E,I)&&(C[I]=E[I]);return C},TextProperty.prototype.setCurrentData=function(C){C.__complete||this.completeTextData(C),this.currentData=C,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(C){this.effectsSequence.push(C),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(C){if(!((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!C)){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var E=this.currentData,I=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var B,U=this.effectsSequence.length,V=C||this.data.d.k[this.keysIndex].s;for(B=0;B<U;B+=1)I!==this.keysIndex?V=this.effectsSequence[B](V,V.t):V=this.effectsSequence[B](this.currentData,V.t);E!==V&&this.setCurrentData(V),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}},TextProperty.prototype.getKeyframeValue=function(){for(var C=this.data.d.k,E=this.elem.comp.renderedFrame,I=0,B=C.length;I<=B-1&&!(I===B-1||C[I+1].t>E);)I+=1;return this.keysIndex!==I&&(this.keysIndex=I),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(C){for(var E=[],I=0,B=C.length,U,V,X=!1,Y=!1,K="";I<B;)X=Y,Y=!1,U=C.charCodeAt(I),K=C.charAt(I),FontManager.isCombinedCharacter(U)?X=!0:U>=55296&&U<=56319?FontManager.isRegionalFlag(C,I)?K=C.substr(I,14):(V=C.charCodeAt(I+1),V>=56320&&V<=57343&&(FontManager.isModifier(U,V)?(K=C.substr(I,2),X=!0):FontManager.isFlagEmoji(C.substr(I,4))?K=C.substr(I,4):K=C.substr(I,2))):U>56319?(V=C.charCodeAt(I+1),FontManager.isVariationSelector(U)&&(X=!0)):FontManager.isZeroWidthJoiner(U)&&(X=!0,Y=!0),X?(E[E.length-1]+=K,X=!1):E.push(K),I+=K.length;return E},TextProperty.prototype.completeTextData=function(C){C.__complete=!0;var E=this.elem.globalData.fontManager,I=this.data,B=[],U,V,X,Y=0,K,J=I.m.g,xe=0,Z=0,_e=0,Se=[],Ee=0,Ae=0,Re,Te,we=E.getFontByName(C.f),Pe,Ie=0,Fe=getFontProperties(we);C.fWeight=Fe.weight,C.fStyle=Fe.style,C.finalSize=C.s,C.finalText=this.buildFinalText(C.t),V=C.finalText.length,C.finalLineHeight=C.lh;var Oe=C.tr/1e3*C.finalSize,Le;if(C.sz)for(var $e=!0,Ve=C.sz[0],Xe=C.sz[1],Ue,We;$e;){We=this.buildFinalText(C.t),Ue=0,Ee=0,V=We.length,Oe=C.tr/1e3*C.finalSize;var je=-1;for(U=0;U<V;U+=1)Le=We[U].charCodeAt(0),X=!1,We[U]===" "?je=U:(Le===13||Le===3)&&(Ee=0,X=!0,Ue+=C.finalLineHeight||C.finalSize*1.2),E.chars?(Pe=E.getCharData(We[U],we.fStyle,we.fFamily),Ie=X?0:Pe.w*C.finalSize/100):Ie=E.measureText(We[U],C.f,C.finalSize),Ee+Ie>Ve&&We[U]!==" "?(je===-1?V+=1:U=je,Ue+=C.finalLineHeight||C.finalSize*1.2,We.splice(U,je===U?1:0,"\r"),je=-1,Ee=0):(Ee+=Ie,Ee+=Oe);Ue+=we.ascent*C.finalSize/100,this.canResize&&C.finalSize>this.minimumFontSize&&Xe<Ue?(C.finalSize-=1,C.finalLineHeight=C.finalSize*C.lh/C.s):(C.finalText=We,V=C.finalText.length,$e=!1)}Ee=-Oe,Ie=0;var ze=0,He;for(U=0;U<V;U+=1)if(X=!1,He=C.finalText[U],Le=He.charCodeAt(0),Le===13||Le===3?(ze=0,Se.push(Ee),Ae=Ee>Ae?Ee:Ae,Ee=-2*Oe,K="",X=!0,_e+=1):K=He,E.chars?(Pe=E.getCharData(He,we.fStyle,E.getFontByName(C.f).fFamily),Ie=X?0:Pe.w*C.finalSize/100):Ie=E.measureText(K,C.f,C.finalSize),He===" "?ze+=Ie+Oe:(Ee+=Ie+Oe+ze,ze=0),B.push({l:Ie,an:Ie,add:xe,n:X,anIndexes:[],val:K,line:_e,animatorJustifyOffset:0}),J==2){if(xe+=Ie,K===""||K===" "||U===V-1){for((K===""||K===" ")&&(xe-=Ie);Z<=U;)B[Z].an=xe,B[Z].ind=Y,B[Z].extra=Ie,Z+=1;Y+=1,xe=0}}else if(J==3){if(xe+=Ie,K===""||U===V-1){for(K===""&&(xe-=Ie);Z<=U;)B[Z].an=xe,B[Z].ind=Y,B[Z].extra=Ie,Z+=1;xe=0,Y+=1}}else B[Y].ind=Y,B[Y].extra=0,Y+=1;if(C.l=B,Ae=Ee>Ae?Ee:Ae,Se.push(Ee),C.sz)C.boxWidth=C.sz[0],C.justifyOffset=0;else switch(C.boxWidth=Ae,C.j){case 1:C.justifyOffset=-C.boxWidth;break;case 2:C.justifyOffset=-C.boxWidth/2;break;default:C.justifyOffset=0}C.lineWidths=Se;var De=I.a,Ne,Me;Te=De.length;var ke,Ge,Be=[];for(Re=0;Re<Te;Re+=1){for(Ne=De[Re],Ne.a.sc&&(C.strokeColorAnim=!0),Ne.a.sw&&(C.strokeWidthAnim=!0),(Ne.a.fc||Ne.a.fh||Ne.a.fs||Ne.a.fb)&&(C.fillColorAnim=!0),Ge=0,ke=Ne.s.b,U=0;U<V;U+=1)Me=B[U],Me.anIndexes[Re]=Ge,(ke==1&&Me.val!==""||ke==2&&Me.val!==""&&Me.val!==" "||ke==3&&(Me.n||Me.val==" "||U==V-1)||ke==4&&(Me.n||U==V-1))&&(Ne.s.rn===1&&Be.push(Ge),Ge+=1);I.a[Re].s.totalChars=Ge;var qe=-1,Ke;if(Ne.s.rn===1)for(U=0;U<V;U+=1)Me=B[U],qe!=Me.anIndexes[Re]&&(qe=Me.anIndexes[Re],Ke=Be.splice(Math.floor(Math.random()*Be.length),1)[0]),Me.anIndexes[Re]=Ke}C.yOffset=C.finalLineHeight||C.finalSize*1.2,C.ls=C.ls||0,C.ascent=we.ascent*C.finalSize/100},TextProperty.prototype.updateDocumentData=function(C,E){E=E===void 0?this.keysIndex:E;var I=this.copyData({},this.data.d.k[E].s);I=this.copyData(I,C),this.data.d.k[E].s=I,this.recalculate(E),this.setCurrentData(I),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(C){var E=this.data.d.k[C].s;E.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(E)},TextProperty.prototype.canResizeFont=function(C){this.canResize=C,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(C){this.minimumFontSize=Math.floor(C)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var C=Math.max,E=Math.min,I=Math.floor;function B(V,X){this._currentTextLength=-1,this.k=!1,this.data=X,this.elem=V,this.comp=V.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(V),this.s=PropertyFactory.getProp(V,X.s||{k:0},0,0,this),"e"in X?this.e=PropertyFactory.getProp(V,X.e,0,0,this):this.e={v:100},this.o=PropertyFactory.getProp(V,X.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(V,X.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(V,X.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(V,X.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(V,X.a,0,.01,this),this.dynamicProperties.length||this.getValue()}B.prototype={getMult:function(X){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var Y=0,K=0,J=1,xe=1;this.ne.v>0?Y=this.ne.v/100:K=-this.ne.v/100,this.xe.v>0?J=1-this.xe.v/100:xe=1+this.xe.v/100;var Z=BezierFactory.getBezierEasing(Y,K,J,xe).get,_e=0,Se=this.finalS,Ee=this.finalE,Ae=this.data.sh;if(Ae===2)Ee===Se?_e=X>=Ee?1:0:_e=C(0,E(.5/(Ee-Se)+(X-Se)/(Ee-Se),1)),_e=Z(_e);else if(Ae===3)Ee===Se?_e=X>=Ee?0:1:_e=1-C(0,E(.5/(Ee-Se)+(X-Se)/(Ee-Se),1)),_e=Z(_e);else if(Ae===4)Ee===Se?_e=0:(_e=C(0,E(.5/(Ee-Se)+(X-Se)/(Ee-Se),1)),_e<.5?_e*=2:_e=1-2*(_e-.5)),_e=Z(_e);else if(Ae===5){if(Ee===Se)_e=0;else{var Re=Ee-Se;X=E(C(0,X+.5-Se),Ee-Se);var Te=-Re/2+X,we=Re/2;_e=Math.sqrt(1-Te*Te/(we*we))}_e=Z(_e)}else Ae===6?(Ee===Se?_e=0:(X=E(C(0,X+.5-Se),Ee-Se),_e=(1+Math.cos(Math.PI+Math.PI*2*X/(Ee-Se)))/2),_e=Z(_e)):(X>=I(Se)&&(X-Se<0?_e=C(0,E(E(Ee,1)-(Se-X),1)):_e=C(0,E(Ee-X,1))),_e=Z(_e));if(this.sm.v!==100){var Pe=this.sm.v*.01;Pe===0&&(Pe=1e-8);var Ie=.5-Pe*.5;_e<Ie?_e=0:(_e=(_e-Ie)/Pe,_e>1&&(_e=1))}return _e*this.a.v},getValue:function(X){this.iterateDynamicProperties(),this._mdf=X||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,X&&this.data.r===2&&(this.e.v=this._currentTextLength);var Y=this.data.r===2?1:100/this.data.totalChars,K=this.o.v/Y,J=this.s.v/Y+K,xe=this.e.v/Y+K;if(J>xe){var Z=J;J=xe,xe=Z}this.finalS=J,this.finalE=xe}},extendPrototype([DynamicPropertyContainer],B);function U(V,X,Y){return new B(V,X)}return{getTextSelectorProp:U}}();function TextAnimatorDataProperty(C,E,I){var B={propType:!1},U=PropertyFactory.getProp,V=E.a;this.a={r:V.r?U(C,V.r,0,degToRads,I):B,rx:V.rx?U(C,V.rx,0,degToRads,I):B,ry:V.ry?U(C,V.ry,0,degToRads,I):B,sk:V.sk?U(C,V.sk,0,degToRads,I):B,sa:V.sa?U(C,V.sa,0,degToRads,I):B,s:V.s?U(C,V.s,1,.01,I):B,a:V.a?U(C,V.a,1,0,I):B,o:V.o?U(C,V.o,0,.01,I):B,p:V.p?U(C,V.p,1,0,I):B,sw:V.sw?U(C,V.sw,0,0,I):B,sc:V.sc?U(C,V.sc,1,0,I):B,fc:V.fc?U(C,V.fc,1,0,I):B,fh:V.fh?U(C,V.fh,0,0,I):B,fs:V.fs?U(C,V.fs,0,.01,I):B,fb:V.fb?U(C,V.fb,0,.01,I):B,t:V.t?U(C,V.t,0,0,I):B},this.s=TextSelectorProp.getTextSelectorProp(C,E.s,I),this.s.t=E.s.t}function TextAnimatorProperty(C,E,I){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=C,this._renderType=E,this._elem=I,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(I)}TextAnimatorProperty.prototype.searchProperties=function(){var C,E=this._textData.a.length,I,B=PropertyFactory.getProp;for(C=0;C<E;C+=1)I=this._textData.a[C],this._animatorsData[C]=new TextAnimatorDataProperty(this._elem,I,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:B(this._elem,this._textData.p.a,0,0,this),f:B(this._elem,this._textData.p.f,0,0,this),l:B(this._elem,this._textData.p.l,0,0,this),r:B(this._elem,this._textData.p.r,0,0,this),p:B(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=B(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(C,E){if(this.lettersChangedFlag=E,!(!this._mdf&&!this._isFirstFrame&&!E&&(!this._hasMaskedPath||!this._pathData.m._mdf))){this._isFirstFrame=!1;var I=this._moreOptions.alignment.v,B=this._animatorsData,U=this._textData,V=this.mHelper,X=this._renderType,Y=this.renderedLetters.length,K,J,xe,Z,_e=C.l,Se,Ee,Ae,Re,Te,we,Pe,Ie,Fe,Oe,Le,$e,Ve,Xe,Ue;if(this._hasMaskedPath){if(Ue=this._pathData.m,!this._pathData.n||this._pathData._mdf){var We=Ue.v;this._pathData.r.v&&(We=We.reverse()),Se={tLength:0,segments:[]},Z=We._length-1;var je;for($e=0,xe=0;xe<Z;xe+=1)je=bez.buildBezierData(We.v[xe],We.v[xe+1],[We.o[xe][0]-We.v[xe][0],We.o[xe][1]-We.v[xe][1]],[We.i[xe+1][0]-We.v[xe+1][0],We.i[xe+1][1]-We.v[xe+1][1]]),Se.tLength+=je.segmentLength,Se.segments.push(je),$e+=je.segmentLength;xe=Z,Ue.v.c&&(je=bez.buildBezierData(We.v[xe],We.v[0],[We.o[xe][0]-We.v[xe][0],We.o[xe][1]-We.v[xe][1]],[We.i[0][0]-We.v[0][0],We.i[0][1]-We.v[0][1]]),Se.tLength+=je.segmentLength,Se.segments.push(je),$e+=je.segmentLength),this._pathData.pi=Se}if(Se=this._pathData.pi,Ee=this._pathData.f.v,Pe=0,we=1,Re=0,Te=!0,Oe=Se.segments,Ee<0&&Ue.v.c)for(Se.tLength<Math.abs(Ee)&&(Ee=-Math.abs(Ee)%Se.tLength),Pe=Oe.length-1,Fe=Oe[Pe].points,we=Fe.length-1;Ee<0;)Ee+=Fe[we].partialLength,we-=1,we<0&&(Pe-=1,Fe=Oe[Pe].points,we=Fe.length-1);Fe=Oe[Pe].points,Ie=Fe[we-1],Ae=Fe[we],Le=Ae.partialLength}Z=_e.length,K=0,J=0;var ze=C.finalSize*1.2*.714,He=!0,De,Ne,Me,ke,Ge;ke=B.length;var Be,qe=-1,Ke,Ye,tt,et=Ee,it=Pe,nt=we,ot=-1,Ze,Je,st,rt,Qe,at,ht,ct,ft="",xt=this.defaultPropsArray,pt;if(C.j===2||C.j===1){var mt=0,bt=0,_t=C.j===2?-.5:-1,vt=0,It=!0;for(xe=0;xe<Z;xe+=1)if(_e[xe].n){for(mt&&(mt+=bt);vt<xe;)_e[vt].animatorJustifyOffset=mt,vt+=1;mt=0,It=!0}else{for(Me=0;Me<ke;Me+=1)De=B[Me].a,De.t.propType&&(It&&C.j===2&&(bt+=De.t.v*_t),Ne=B[Me].s,Be=Ne.getMult(_e[xe].anIndexes[Me],U.a[Me].s.totalChars),Be.length?mt+=De.t.v*Be[0]*_t:mt+=De.t.v*Be*_t);It=!1}for(mt&&(mt+=bt);vt<xe;)_e[vt].animatorJustifyOffset=mt,vt+=1}for(xe=0;xe<Z;xe+=1){if(V.reset(),Ze=1,_e[xe].n)K=0,J+=C.yOffset,J+=He?1:0,Ee=et,He=!1,this._hasMaskedPath&&(Pe=it,we=nt,Fe=Oe[Pe].points,Ie=Fe[we-1],Ae=Fe[we],Le=Ae.partialLength,Re=0),ft="",ct="",at="",pt="",xt=this.defaultPropsArray;else{if(this._hasMaskedPath){if(ot!==_e[xe].line){switch(C.j){case 1:Ee+=$e-C.lineWidths[_e[xe].line];break;case 2:Ee+=($e-C.lineWidths[_e[xe].line])/2;break}ot=_e[xe].line}qe!==_e[xe].ind&&(_e[qe]&&(Ee+=_e[qe].extra),Ee+=_e[xe].an/2,qe=_e[xe].ind),Ee+=I[0]*_e[xe].an*.005;var At=0;for(Me=0;Me<ke;Me+=1)De=B[Me].a,De.p.propType&&(Ne=B[Me].s,Be=Ne.getMult(_e[xe].anIndexes[Me],U.a[Me].s.totalChars),Be.length?At+=De.p.v[0]*Be[0]:At+=De.p.v[0]*Be),De.a.propType&&(Ne=B[Me].s,Be=Ne.getMult(_e[xe].anIndexes[Me],U.a[Me].s.totalChars),Be.length?At+=De.a.v[0]*Be[0]:At+=De.a.v[0]*Be);for(Te=!0,this._pathData.a.v&&(Ee=_e[0].an*.5+($e-this._pathData.f.v-_e[0].an*.5-_e[_e.length-1].an*.5)*qe/(Z-1),Ee+=this._pathData.f.v);Te;)Re+Le>=Ee+At||!Fe?(Ve=(Ee+At-Re)/Ae.partialLength,Ye=Ie.point[0]+(Ae.point[0]-Ie.point[0])*Ve,tt=Ie.point[1]+(Ae.point[1]-Ie.point[1])*Ve,V.translate(-I[0]*_e[xe].an*.005,-(I[1]*ze)*.01),Te=!1):Fe&&(Re+=Ae.partialLength,we+=1,we>=Fe.length&&(we=0,Pe+=1,Oe[Pe]?Fe=Oe[Pe].points:Ue.v.c?(we=0,Pe=0,Fe=Oe[Pe].points):(Re-=Ae.partialLength,Fe=null)),Fe&&(Ie=Ae,Ae=Fe[we],Le=Ae.partialLength));Ke=_e[xe].an/2-_e[xe].add,V.translate(-Ke,0,0)}else Ke=_e[xe].an/2-_e[xe].add,V.translate(-Ke,0,0),V.translate(-I[0]*_e[xe].an*.005,-I[1]*ze*.01,0);for(Me=0;Me<ke;Me+=1)De=B[Me].a,De.t.propType&&(Ne=B[Me].s,Be=Ne.getMult(_e[xe].anIndexes[Me],U.a[Me].s.totalChars),(K!==0||C.j!==0)&&(this._hasMaskedPath?Be.length?Ee+=De.t.v*Be[0]:Ee+=De.t.v*Be:Be.length?K+=De.t.v*Be[0]:K+=De.t.v*Be));for(C.strokeWidthAnim&&(st=C.sw||0),C.strokeColorAnim&&(C.sc?Je=[C.sc[0],C.sc[1],C.sc[2]]:Je=[0,0,0]),C.fillColorAnim&&C.fc&&(rt=[C.fc[0],C.fc[1],C.fc[2]]),Me=0;Me<ke;Me+=1)De=B[Me].a,De.a.propType&&(Ne=B[Me].s,Be=Ne.getMult(_e[xe].anIndexes[Me],U.a[Me].s.totalChars),Be.length?V.translate(-De.a.v[0]*Be[0],-De.a.v[1]*Be[1],De.a.v[2]*Be[2]):V.translate(-De.a.v[0]*Be,-De.a.v[1]*Be,De.a.v[2]*Be));for(Me=0;Me<ke;Me+=1)De=B[Me].a,De.s.propType&&(Ne=B[Me].s,Be=Ne.getMult(_e[xe].anIndexes[Me],U.a[Me].s.totalChars),Be.length?V.scale(1+(De.s.v[0]-1)*Be[0],1+(De.s.v[1]-1)*Be[1],1):V.scale(1+(De.s.v[0]-1)*Be,1+(De.s.v[1]-1)*Be,1));for(Me=0;Me<ke;Me+=1){if(De=B[Me].a,Ne=B[Me].s,Be=Ne.getMult(_e[xe].anIndexes[Me],U.a[Me].s.totalChars),De.sk.propType&&(Be.length?V.skewFromAxis(-De.sk.v*Be[0],De.sa.v*Be[1]):V.skewFromAxis(-De.sk.v*Be,De.sa.v*Be)),De.r.propType&&(Be.length?V.rotateZ(-De.r.v*Be[2]):V.rotateZ(-De.r.v*Be)),De.ry.propType&&(Be.length?V.rotateY(De.ry.v*Be[1]):V.rotateY(De.ry.v*Be)),De.rx.propType&&(Be.length?V.rotateX(De.rx.v*Be[0]):V.rotateX(De.rx.v*Be)),De.o.propType&&(Be.length?Ze+=(De.o.v*Be[0]-Ze)*Be[0]:Ze+=(De.o.v*Be-Ze)*Be),C.strokeWidthAnim&&De.sw.propType&&(Be.length?st+=De.sw.v*Be[0]:st+=De.sw.v*Be),C.strokeColorAnim&&De.sc.propType)for(Qe=0;Qe<3;Qe+=1)Be.length?Je[Qe]+=(De.sc.v[Qe]-Je[Qe])*Be[0]:Je[Qe]+=(De.sc.v[Qe]-Je[Qe])*Be;if(C.fillColorAnim&&C.fc){if(De.fc.propType)for(Qe=0;Qe<3;Qe+=1)Be.length?rt[Qe]+=(De.fc.v[Qe]-rt[Qe])*Be[0]:rt[Qe]+=(De.fc.v[Qe]-rt[Qe])*Be;De.fh.propType&&(Be.length?rt=addHueToRGB(rt,De.fh.v*Be[0]):rt=addHueToRGB(rt,De.fh.v*Be)),De.fs.propType&&(Be.length?rt=addSaturationToRGB(rt,De.fs.v*Be[0]):rt=addSaturationToRGB(rt,De.fs.v*Be)),De.fb.propType&&(Be.length?rt=addBrightnessToRGB(rt,De.fb.v*Be[0]):rt=addBrightnessToRGB(rt,De.fb.v*Be))}}for(Me=0;Me<ke;Me+=1)De=B[Me].a,De.p.propType&&(Ne=B[Me].s,Be=Ne.getMult(_e[xe].anIndexes[Me],U.a[Me].s.totalChars),this._hasMaskedPath?Be.length?V.translate(0,De.p.v[1]*Be[0],-De.p.v[2]*Be[1]):V.translate(0,De.p.v[1]*Be,-De.p.v[2]*Be):Be.length?V.translate(De.p.v[0]*Be[0],De.p.v[1]*Be[1],-De.p.v[2]*Be[2]):V.translate(De.p.v[0]*Be,De.p.v[1]*Be,-De.p.v[2]*Be));if(C.strokeWidthAnim&&(at=st<0?0:st),C.strokeColorAnim&&(ht="rgb("+Math.round(Je[0]*255)+","+Math.round(Je[1]*255)+","+Math.round(Je[2]*255)+")"),C.fillColorAnim&&C.fc&&(ct="rgb("+Math.round(rt[0]*255)+","+Math.round(rt[1]*255)+","+Math.round(rt[2]*255)+")"),this._hasMaskedPath){if(V.translate(0,-C.ls),V.translate(0,I[1]*ze*.01+J,0),this._pathData.p.v){Xe=(Ae.point[1]-Ie.point[1])/(Ae.point[0]-Ie.point[0]);var Ft=Math.atan(Xe)*180/Math.PI;Ae.point[0]<Ie.point[0]&&(Ft+=180),V.rotate(-Ft*Math.PI/180)}V.translate(Ye,tt,0),Ee-=I[0]*_e[xe].an*.005,_e[xe+1]&&qe!==_e[xe+1].ind&&(Ee+=_e[xe].an/2,Ee+=C.tr*.001*C.finalSize)}else{switch(V.translate(K,J,0),C.ps&&V.translate(C.ps[0],C.ps[1]+C.ascent,0),C.j){case 1:V.translate(_e[xe].animatorJustifyOffset+C.justifyOffset+(C.boxWidth-C.lineWidths[_e[xe].line]),0,0);break;case 2:V.translate(_e[xe].animatorJustifyOffset+C.justifyOffset+(C.boxWidth-C.lineWidths[_e[xe].line])/2,0,0);break}V.translate(0,-C.ls),V.translate(Ke,0,0),V.translate(I[0]*_e[xe].an*.005,I[1]*ze*.01,0),K+=_e[xe].l+C.tr*.001*C.finalSize}X==="html"?ft=V.toCSS():X==="svg"?ft=V.to2dCSS():xt=[V.props[0],V.props[1],V.props[2],V.props[3],V.props[4],V.props[5],V.props[6],V.props[7],V.props[8],V.props[9],V.props[10],V.props[11],V.props[12],V.props[13],V.props[14],V.props[15]],pt=Ze}Y<=xe?(Ge=new LetterProps(pt,at,ht,ct,ft,xt),this.renderedLetters.push(Ge),Y+=1,this.lettersChangedFlag=!0):(Ge=this.renderedLetters[xe],this.lettersChangedFlag=Ge.update(pt,at,ht,ct,ft,xt)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty);function ITextElement(){}ITextElement.prototype.initElement=function(C,E,I){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(C,E,I),this.textProperty=new TextProperty(this,C.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(C.t,this.renderType,this),this.initTransform(C,E,I),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(C){this._mdf=!1,this.prepareRenderableFrame(C),this.prepareProperties(C,this.isInRange)},ITextElement.prototype.createPathShape=function(C,E){var I,B=E.length,U,V="";for(I=0;I<B;I+=1)E[I].ty==="sh"&&(U=E[I].ks.k,V+=buildShapeString(U,U.i.length,!0,C));return V},ITextElement.prototype.updateDocumentData=function(C,E){this.textProperty.updateDocumentData(C,E)},ITextElement.prototype.canResizeFont=function(C){this.textProperty.canResizeFont(C)},ITextElement.prototype.setMinimumFontSize=function(C){this.textProperty.setMinimumFontSize(C)},ITextElement.prototype.applyTextPropertiesToMatrix=function(C,E,I,B,U){switch(C.ps&&E.translate(C.ps[0],C.ps[1]+C.ascent,0),E.translate(0,-C.ls,0),C.j){case 1:E.translate(C.justifyOffset+(C.boxWidth-C.lineWidths[I]),0,0);break;case 2:E.translate(C.justifyOffset+(C.boxWidth-C.lineWidths[I])/2,0,0);break}E.translate(B,U,0)},ITextElement.prototype.buildColor=function(C){return"rgb("+Math.round(C[0]*255)+","+Math.round(C[1]*255)+","+Math.round(C[2]*255)+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(C,E,I){this.textSpans=[],this.renderType="svg",this.initElement(C,E,I)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(C){for(var E=0,I=C.length,B=[],U="";E<I;)C[E]===String.fromCharCode(13)||C[E]===String.fromCharCode(3)?(B.push(U),U=""):U+=C[E],E+=1;return B.push(U),B},SVGTextLottieElement.prototype.buildShapeData=function(C,E){if(C.shapes&&C.shapes.length){var I=C.shapes[0];if(I.it){var B=I.it[I.it.length-1];B.s&&(B.s.k[0]=E,B.s.k[1]=E)}}return C},SVGTextLottieElement.prototype.buildNewText=function(){this.addDynamicProperty(this);var C,E,I=this.textProperty.currentData;this.renderedLetters=createSizedArray(I?I.l.length:0),I.fc?this.layerElement.setAttribute("fill",this.buildColor(I.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),I.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(I.sc)),this.layerElement.setAttribute("stroke-width",I.sw)),this.layerElement.setAttribute("font-size",I.finalSize);var B=this.globalData.fontManager.getFontByName(I.f);if(B.fClass)this.layerElement.setAttribute("class",B.fClass);else{this.layerElement.setAttribute("font-family",B.fFamily);var U=I.fWeight,V=I.fStyle;this.layerElement.setAttribute("font-style",V),this.layerElement.setAttribute("font-weight",U)}this.layerElement.setAttribute("aria-label",I.t);var X=I.l||[],Y=!!this.globalData.fontManager.chars;E=X.length;var K,J=this.mHelper,xe="",Z=this.data.singleShape,_e=0,Se=0,Ee=!0,Ae=I.tr*.001*I.finalSize;if(Z&&!Y&&!I.sz){var Re=this.textContainer,Te="start";switch(I.j){case 1:Te="end";break;case 2:Te="middle";break;default:Te="start";break}Re.setAttribute("text-anchor",Te),Re.setAttribute("letter-spacing",Ae);var we=this.buildTextContents(I.finalText);for(E=we.length,Se=I.ps?I.ps[1]+I.ascent:0,C=0;C<E;C+=1)K=this.textSpans[C].span||createNS("tspan"),K.textContent=we[C],K.setAttribute("x",0),K.setAttribute("y",Se),K.style.display="inherit",Re.appendChild(K),this.textSpans[C]||(this.textSpans[C]={span:null,glyph:null}),this.textSpans[C].span=K,Se+=I.finalLineHeight;this.layerElement.appendChild(Re)}else{var Pe=this.textSpans.length,Ie;for(C=0;C<E;C+=1){if(this.textSpans[C]||(this.textSpans[C]={span:null,childSpan:null,glyph:null}),!Y||!Z||C===0){if(K=Pe>C?this.textSpans[C].span:createNS(Y?"g":"text"),Pe<=C){if(K.setAttribute("stroke-linecap","butt"),K.setAttribute("stroke-linejoin","round"),K.setAttribute("stroke-miterlimit","4"),this.textSpans[C].span=K,Y){var Fe=createNS("g");K.appendChild(Fe),this.textSpans[C].childSpan=Fe}this.textSpans[C].span=K,this.layerElement.appendChild(K)}K.style.display="inherit"}if(J.reset(),Z&&(X[C].n&&(_e=-Ae,Se+=I.yOffset,Se+=Ee?1:0,Ee=!1),this.applyTextPropertiesToMatrix(I,J,X[C].line,_e,Se),_e+=X[C].l||0,_e+=Ae),Y){Ie=this.globalData.fontManager.getCharData(I.finalText[C],B.fStyle,this.globalData.fontManager.getFontByName(I.f).fFamily);var Oe;if(Ie.t===1)Oe=new SVGCompElement(Ie.data,this.globalData,this);else{var Le=emptyShapeData;Ie.data&&Ie.data.shapes&&(Le=this.buildShapeData(Ie.data,I.finalSize)),Oe=new SVGShapeElement(Le,this.globalData,this)}if(this.textSpans[C].glyph){var $e=this.textSpans[C].glyph;this.textSpans[C].childSpan.removeChild($e.layerElement),$e.destroy()}this.textSpans[C].glyph=Oe,Oe._debug=!0,Oe.prepareFrame(0),Oe.renderFrame(),this.textSpans[C].childSpan.appendChild(Oe.layerElement),Ie.t===1&&this.textSpans[C].childSpan.setAttribute("transform","scale("+I.finalSize/100+","+I.finalSize/100+")")}else Z&&K.setAttribute("transform","translate("+J.props[12]+","+J.props[13]+")"),K.textContent=X[C].val,K.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}Z&&K&&K.setAttribute("d",xe)}for(;C<this.textSpans.length;)this.textSpans[C].span.style.display="none",C+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var C=this.layerElement.getBBox();this.bbox={top:C.y,left:C.x,width:C.width,height:C.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var C,E=this.textSpans.length,I;for(this.renderedFrame=this.comp.renderedFrame,C=0;C<E;C+=1)I=this.textSpans[C].glyph,I&&(I.prepareFrame(this.comp.renderedFrame-this.data.st),I._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var C,E,I=this.textAnimator.renderedLetters,B=this.textProperty.currentData.l;E=B.length;var U,V,X;for(C=0;C<E;C+=1)B[C].n||(U=I[C],V=this.textSpans[C].span,X=this.textSpans[C].glyph,X&&X.renderFrame(),U._mdf.m&&V.setAttribute("transform",U.m),U._mdf.o&&V.setAttribute("opacity",U.o),U._mdf.sw&&V.setAttribute("stroke-width",U.sw),U._mdf.sc&&V.setAttribute("stroke",U.sc),U._mdf.fc&&V.setAttribute("fill",U.fc))}};function ISolidElement(C,E,I){this.initElement(C,E,I)}extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var C=createNS("rect");C.setAttribute("width",this.data.sw),C.setAttribute("height",this.data.sh),C.setAttribute("fill",this.data.sc),this.layerElement.appendChild(C)};function NullElement(C,E,I){this.initFrame(),this.initBaseData(C,E,I),this.initFrame(),this.initTransform(C,E,I),this.initHierarchy()}NullElement.prototype.prepareFrame=function(C){this.prepareProperties(C,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement);function SVGRendererBase(){}extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(C){return new NullElement(C,this.globalData,this)},SVGRendererBase.prototype.createShape=function(C){return new SVGShapeElement(C,this.globalData,this)},SVGRendererBase.prototype.createText=function(C){return new SVGTextLottieElement(C,this.globalData,this)},SVGRendererBase.prototype.createImage=function(C){return new IImageElement(C,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(C){return new ISolidElement(C,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(C){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+C.w+" "+C.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",C.w),this.svgElement.setAttribute("height",C.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),this.renderConfig.focusable!==void 0&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var E=this.globalData.defs;this.setupGlobalData(C,E),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=C;var I=createNS("clipPath"),B=createNS("rect");B.setAttribute("width",C.w),B.setAttribute("height",C.h),B.setAttribute("x",0),B.setAttribute("y",0);var U=createElementID();I.setAttribute("id",U),I.appendChild(B),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+U+")"),E.appendChild(I),this.layers=C.layers,this.elements=createSizedArray(C.layers.length)},SVGRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var C,E=this.layers?this.layers.length:0;for(C=0;C<E;C+=1)this.elements[C]&&this.elements[C].destroy&&this.elements[C].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(C){var E=0,I=this.layers.length;for(E=0;E<I;E+=1)if(this.layers[E].ind===C)return E;return-1},SVGRendererBase.prototype.buildItem=function(C){var E=this.elements;if(!(E[C]||this.layers[C].ty===99)){E[C]=!0;var I=this.createItem(this.layers[C]);if(E[C]=I,getExpressionsPlugin()&&(this.layers[C].ty===0&&this.globalData.projectInterface.registerComposition(I),I.initExpressions()),this.appendElementInPos(I,C),this.layers[C].tt){var B="tp"in this.layers[C]?this.findIndexByInd(this.layers[C].tp):C-1;if(B===-1)return;if(!this.elements[B]||this.elements[B]===!0)this.buildItem(B),this.addPendingElement(I);else{var U=E[B],V=U.getMatte(this.layers[C].tt);I.setMatte(V)}}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var C=this.pendingElements.pop();if(C.checkParenting(),C.data.tt)for(var E=0,I=this.elements.length;E<I;){if(this.elements[E]===C){var B="tp"in C.data?this.findIndexByInd(C.data.tp):E-1,U=this.elements[B],V=U.getMatte(this.layers[E].tt);C.setMatte(V);break}E+=1}}},SVGRendererBase.prototype.renderFrame=function(C){if(!(this.renderedFrame===C||this.destroyed)){C===null?C=this.renderedFrame:this.renderedFrame=C,this.globalData.frameNum=C,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=C,this.globalData._mdf=!1;var E,I=this.layers.length;for(this.completeLayers||this.checkLayers(C),E=I-1;E>=0;E-=1)(this.completeLayers||this.elements[E])&&this.elements[E].prepareFrame(C-this.layers[E].st);if(this.globalData._mdf)for(E=0;E<I;E+=1)(this.completeLayers||this.elements[E])&&this.elements[E].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(C,E){var I=C.getBaseElement();if(I){for(var B=0,U;B<E;)this.elements[B]&&this.elements[B]!==!0&&this.elements[B].getBaseElement()&&(U=this.elements[B].getBaseElement()),B+=1;U?this.layerElement.insertBefore(I,U):this.layerElement.appendChild(I)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"};function ICompElement(){}extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(C,E,I){this.initFrame(),this.initBaseData(C,E,I),this.initTransform(C,E,I),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),(this.data.xt||!E.progressiveLoad)&&this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(C){if(this._mdf=!1,this.prepareRenderableFrame(C),this.prepareProperties(C,this.isInRange),!(!this.isInRange&&!this.data.xt)){if(this.tm._placeholder)this.renderedFrame=C/this.data.sr;else{var E=this.tm.v;E===this.data.op&&(E=this.data.op-1),this.renderedFrame=E}var I,B=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),I=B-1;I>=0;I-=1)(this.completeLayers||this.elements[I])&&(this.elements[I].prepareFrame(this.renderedFrame-this.layers[I].st),this.elements[I]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var C,E=this.layers.length;for(C=0;C<E;C+=1)(this.completeLayers||this.elements[C])&&this.elements[C].renderFrame()},ICompElement.prototype.setElements=function(C){this.elements=C},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var C,E=this.layers.length;for(C=0;C<E;C+=1)this.elements[C]&&this.elements[C].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()};function SVGCompElement(C,E,I){this.layers=C.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(C,E,I),this.tm=C.tm?PropertyFactory.getProp(this,C.tm,0,E.frameRate,this):{_placeholder:!0}}extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(C){return new SVGCompElement(C,this.globalData,this)};function SVGRenderer(C,E){this.animationItem=C,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var I="";if(E&&E.title){var B=createNS("title"),U=createElementID();B.setAttribute("id",U),B.textContent=E.title,this.svgElement.appendChild(B),I+=U}if(E&&E.description){var V=createNS("desc"),X=createElementID();V.setAttribute("id",X),V.textContent=E.description,this.svgElement.appendChild(V),I+=" "+X}I&&this.svgElement.setAttribute("aria-labelledby",I);var Y=createNS("defs");this.svgElement.appendChild(Y);var K=createNS("g");this.svgElement.appendChild(K),this.layerElement=K,this.renderConfig={preserveAspectRatio:E&&E.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:E&&E.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:E&&E.contentVisibility||"visible",progressiveLoad:E&&E.progressiveLoad||!1,hideOnTransparent:!(E&&E.hideOnTransparent===!1),viewBoxOnly:E&&E.viewBoxOnly||!1,viewBoxSize:E&&E.viewBoxSize||!1,className:E&&E.className||"",id:E&&E.id||"",focusable:E&&E.focusable,filterSize:{width:E&&E.filterSize&&E.filterSize.width||"100%",height:E&&E.filterSize&&E.filterSize.height||"100%",x:E&&E.filterSize&&E.filterSize.x||"0%",y:E&&E.filterSize&&E.filterSize.y||"0%"},width:E&&E.width,height:E&&E.height,runExpressions:!E||E.runExpressions===void 0||E.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:Y,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(C){return new SVGCompElement(C,this.globalData,this)};function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}ShapeTransformManager.prototype={addTransformSequence:function(E){var I,B=E.length,U="_";for(I=0;I<B;I+=1)U+=E[I].transform.key+"_";var V=this.sequences[U];return V||(V={transforms:[].concat(E),finalTransform:new Matrix,_mdf:!1},this.sequences[U]=V,this.sequenceList.push(V)),V},processSequence:function(E,I){for(var B=0,U=E.transforms.length,V=I;B<U&&!I;){if(E.transforms[B].transform.mProps._mdf){V=!0;break}B+=1}if(V)for(E.finalTransform.reset(),B=U-1;B>=0;B-=1)E.finalTransform.multiply(E.transforms[B].transform.mProps.v);E._mdf=V},processSequences:function(E){var I,B=this.sequenceList.length;for(I=0;I<B;I+=1)this.processSequence(this.sequenceList[I],E)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var E="__lottie_element_luma_buffer",I=null,B=null,U=null;function V(){var K=createNS("svg"),J=createNS("filter"),xe=createNS("feColorMatrix");return J.setAttribute("id",E),xe.setAttribute("type","matrix"),xe.setAttribute("color-interpolation-filters","sRGB"),xe.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),J.appendChild(xe),K.appendChild(J),K.setAttribute("id",E+"_svg"),featureSupport.svgLumaHidden&&(K.style.display="none"),K}function X(){I||(U=V(),document.body.appendChild(U),I=createTag("canvas"),B=I.getContext("2d"),B.filter="url(#"+E+")",B.fillStyle="rgba(0,0,0,0)",B.fillRect(0,0,1,1))}function Y(K){return I||X(),I.width=K.width,I.height=K.height,B.filter="url(#"+E+")",I}return{load:X,get:Y}};function createCanvas(C,E){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(C,E);var I=createTag("canvas");return I.width=C,I.height=E,I}var assetLoader=function(){return{loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas}}(),registeredEffects={};function CVEffects(C){var E,I=C.data.ef?C.data.ef.length:0;this.filters=[];var B;for(E=0;E<I;E+=1){B=null;var U=C.data.ef[E].ty;if(registeredEffects[U]){var V=registeredEffects[U].effect;B=new V(C.effectsManager.effectElements[E],C)}B&&this.filters.push(B)}this.filters.length&&C.addRenderableComponent(this)}CVEffects.prototype.renderFrame=function(C){var E,I=this.filters.length;for(E=0;E<I;E+=1)this.filters[E].renderFrame(C)},CVEffects.prototype.getEffects=function(C){var E,I=this.filters.length,B=[];for(E=0;E<I;E+=1)this.filters[E].type===C&&B.push(this.filters[E]);return B};function registerEffect(C,E){registeredEffects[C]={effect:E}}function CVMaskElement(C,E){this.data=C,this.element=E,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var I,B=this.masksProperties.length,U=!1;for(I=0;I<B;I+=1)this.masksProperties[I].mode!=="n"&&(U=!0),this.viewData[I]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[I],3);this.hasMasks=U,U&&this.element.addRenderableComponent(this)}CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var C=this.element.finalTransform.mat,E=this.element.canvasContext,I,B=this.masksProperties.length,U,V,X;for(E.beginPath(),I=0;I<B;I+=1)if(this.masksProperties[I].mode!=="n"){this.masksProperties[I].inv&&(E.moveTo(0,0),E.lineTo(this.element.globalData.compSize.w,0),E.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),E.lineTo(0,this.element.globalData.compSize.h),E.lineTo(0,0)),X=this.viewData[I].v,U=C.applyToPointArray(X.v[0][0],X.v[0][1],0),E.moveTo(U[0],U[1]);var Y,K=X._length;for(Y=1;Y<K;Y+=1)V=C.applyToTriplePoints(X.o[Y-1],X.i[Y],X.v[Y]),E.bezierCurveTo(V[0],V[1],V[2],V[3],V[4],V[5]);V=C.applyToTriplePoints(X.o[Y-1],X.i[0],X.v[0]),E.bezierCurveTo(V[0],V[1],V[2],V[3],V[4],V[5])}this.element.globalData.renderer.save(!0),E.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};function CVBaseElement(){}var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var E=this.globalData.canvasContext,I=assetLoader.createCanvas(E.canvas.width,E.canvas.height);this.buffers.push(I);var B=assetLoader.createCanvas(E.canvas.width,E.canvas.height);this.buffers.push(B),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var E=this.globalData;if(E.blendMode!==this.data.bm){E.blendMode=this.data.bm;var I=getBlendMode(this.data.bm);E.canvasContext.globalCompositeOperation=I}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){!this.hidden&&(!this.isInRange||this.isTransparent)&&(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(E){E.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var E=this.buffers[0],I=E.getContext("2d");this.clearCanvas(I),I.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var E=this.buffers[1],I=E.getContext("2d");this.clearCanvas(I),I.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform);var B=this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1);if(B.renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var U=assetLoader.getLumaCanvas(this.canvasContext.canvas),V=U.getContext("2d");V.drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(U,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(E,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(E){if(!(this.hidden||this.data.hd)&&!(this.data.td===1&&!E)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var I=this.data.ty===0;this.prepareLayer(),this.globalData.renderer.save(I),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(I),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement;function CVShapeData(C,E,I,B){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var U=4;E.ty==="rc"?U=5:E.ty==="el"?U=6:E.ty==="sr"&&(U=7),this.sh=ShapePropertyFactory.getShapeProp(C,E,U,C);var V,X=I.length,Y;for(V=0;V<X;V+=1)I[V].closed||(Y={transforms:B.addTransformSequence(I[V].transforms),trNodes:[]},this.styledShapes.push(Y),I[V].elements.push(Y))}CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated;function CVShapeElement(C,E,I){this.shapes=[],this.shapesData=C.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(C,E,I)}extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(C,E){var I={data:C,type:C.ty,preTransforms:this.transformsManager.addTransformSequence(E),transforms:[],elements:[],closed:C.hd===!0},B={};if(C.ty==="fl"||C.ty==="st"?(B.c=PropertyFactory.getProp(this,C.c,1,255,this),B.c.k||(I.co="rgb("+bmFloor(B.c.v[0])+","+bmFloor(B.c.v[1])+","+bmFloor(B.c.v[2])+")")):(C.ty==="gf"||C.ty==="gs")&&(B.s=PropertyFactory.getProp(this,C.s,1,null,this),B.e=PropertyFactory.getProp(this,C.e,1,null,this),B.h=PropertyFactory.getProp(this,C.h||{k:0},0,.01,this),B.a=PropertyFactory.getProp(this,C.a||{k:0},0,degToRads,this),B.g=new GradientProperty(this,C.g,this)),B.o=PropertyFactory.getProp(this,C.o,0,.01,this),C.ty==="st"||C.ty==="gs"){if(I.lc=lineCapEnum[C.lc||2],I.lj=lineJoinEnum[C.lj||2],C.lj==1&&(I.ml=C.ml),B.w=PropertyFactory.getProp(this,C.w,0,null,this),B.w.k||(I.wi=B.w.v),C.d){var U=new DashProperty(this,C.d,"canvas",this);B.d=U,B.d.k||(I.da=B.d.dashArray,I.do=B.d.dashoffset[0])}}else I.r=C.r===2?"evenodd":"nonzero";return this.stylesList.push(I),B.style=I,B},CVShapeElement.prototype.createGroupElement=function(){var C={it:[],prevViewData:[]};return C},CVShapeElement.prototype.createTransformElement=function(C){var E={transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,C.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,C,this)}};return E},CVShapeElement.prototype.createShapeElement=function(C){var E=new CVShapeData(this,C,this.stylesList,this.transformsManager);return this.shapes.push(E),this.addShapeToModifiers(E),E},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var C,E=this.itemsData.length;for(C=0;C<E;C+=1)this.prevViewData[C]=this.itemsData[C];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),E=this.dynamicProperties.length,C=0;C<E;C+=1)this.dynamicProperties[C].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(C){var E,I=this.stylesList.length;for(E=0;E<I;E+=1)this.stylesList[E].closed||this.stylesList[E].transforms.push(C)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var C,E=this.stylesList.length;for(C=0;C<E;C+=1)this.stylesList[C].closed||this.stylesList[C].transforms.pop()},CVShapeElement.prototype.closeStyles=function(C){var E,I=C.length;for(E=0;E<I;E+=1)C[E].closed=!0},CVShapeElement.prototype.searchShapes=function(C,E,I,B,U){var V,X=C.length-1,Y,K,J=[],xe=[],Z,_e,Se,Ee=[].concat(U);for(V=X;V>=0;V-=1){if(Z=this.searchProcessedElement(C[V]),Z?E[V]=I[Z-1]:C[V]._shouldRender=B,C[V].ty==="fl"||C[V].ty==="st"||C[V].ty==="gf"||C[V].ty==="gs")Z?E[V].style.closed=!1:E[V]=this.createStyleElement(C[V],Ee),J.push(E[V].style);else if(C[V].ty==="gr"){if(!Z)E[V]=this.createGroupElement(C[V]);else for(K=E[V].it.length,Y=0;Y<K;Y+=1)E[V].prevViewData[Y]=E[V].it[Y];this.searchShapes(C[V].it,E[V].it,E[V].prevViewData,B,Ee)}else C[V].ty==="tr"?(Z||(Se=this.createTransformElement(C[V]),E[V]=Se),Ee.push(E[V]),this.addTransformToStyleList(E[V])):C[V].ty==="sh"||C[V].ty==="rc"||C[V].ty==="el"||C[V].ty==="sr"?Z||(E[V]=this.createShapeElement(C[V])):C[V].ty==="tm"||C[V].ty==="rd"||C[V].ty==="pb"||C[V].ty==="zz"||C[V].ty==="op"?(Z?(_e=E[V],_e.closed=!1):(_e=ShapeModifiers.getModifier(C[V].ty),_e.init(this,C[V]),E[V]=_e,this.shapeModifiers.push(_e)),xe.push(_e)):C[V].ty==="rp"&&(Z?(_e=E[V],_e.closed=!0):(_e=ShapeModifiers.getModifier(C[V].ty),E[V]=_e,_e.init(this,C,V,E),this.shapeModifiers.push(_e),B=!1),xe.push(_e));this.addProcessedElement(C[V],V+1)}for(this.removeTransformFromStyleList(),this.closeStyles(J),X=xe.length,V=0;V<X;V+=1)xe[V].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(C,E){(C._opMdf||E.op._mdf||this._isFirstFrame)&&(E.opacity=C.opacity,E.opacity*=E.op.v,E._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var C,E=this.stylesList.length,I,B,U,V,X,Y,K=this.globalData.renderer,J=this.globalData.canvasContext,xe,Z;for(C=0;C<E;C+=1)if(Z=this.stylesList[C],xe=Z.type,!((xe==="st"||xe==="gs")&&Z.wi===0||!Z.data._shouldRender||Z.coOp===0||this.globalData.currentGlobalAlpha===0)){for(K.save(),X=Z.elements,xe==="st"||xe==="gs"?(K.ctxStrokeStyle(xe==="st"?Z.co:Z.grd),K.ctxLineWidth(Z.wi),K.ctxLineCap(Z.lc),K.ctxLineJoin(Z.lj),K.ctxMiterLimit(Z.ml||0)):K.ctxFillStyle(xe==="fl"?Z.co:Z.grd),K.ctxOpacity(Z.coOp),xe!=="st"&&xe!=="gs"&&J.beginPath(),K.ctxTransform(Z.preTransforms.finalTransform.props),B=X.length,I=0;I<B;I+=1){for((xe==="st"||xe==="gs")&&(J.beginPath(),Z.da&&(J.setLineDash(Z.da),J.lineDashOffset=Z.do)),Y=X[I].trNodes,V=Y.length,U=0;U<V;U+=1)Y[U].t==="m"?J.moveTo(Y[U].p[0],Y[U].p[1]):Y[U].t==="c"?J.bezierCurveTo(Y[U].pts[0],Y[U].pts[1],Y[U].pts[2],Y[U].pts[3],Y[U].pts[4],Y[U].pts[5]):J.closePath();(xe==="st"||xe==="gs")&&(K.ctxStroke(),Z.da&&J.setLineDash(this.dashResetter))}xe!=="st"&&xe!=="gs"&&this.globalData.renderer.ctxFill(Z.r),K.restore()}},CVShapeElement.prototype.renderShape=function(C,E,I,B){var U,V=E.length-1,X;for(X=C,U=V;U>=0;U-=1)E[U].ty==="tr"?(X=I[U].transform,this.renderShapeTransform(C,X)):E[U].ty==="sh"||E[U].ty==="el"||E[U].ty==="rc"||E[U].ty==="sr"?this.renderPath(E[U],I[U]):E[U].ty==="fl"?this.renderFill(E[U],I[U],X):E[U].ty==="st"?this.renderStroke(E[U],I[U],X):E[U].ty==="gf"||E[U].ty==="gs"?this.renderGradientFill(E[U],I[U],X):E[U].ty==="gr"?this.renderShape(X,E[U].it,I[U].it):E[U].ty;B&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(C,E){if(this._isFirstFrame||E._mdf||C.transforms._mdf){var I=C.trNodes,B=E.paths,U,V,X,Y=B._length;I.length=0;var K=C.transforms.finalTransform;for(X=0;X<Y;X+=1){var J=B.shapes[X];if(J&&J.v){for(V=J._length,U=1;U<V;U+=1)U===1&&I.push({t:"m",p:K.applyToPointArray(J.v[0][0],J.v[0][1],0)}),I.push({t:"c",pts:K.applyToTriplePoints(J.o[U-1],J.i[U],J.v[U])});V===1&&I.push({t:"m",p:K.applyToPointArray(J.v[0][0],J.v[0][1],0)}),J.c&&V&&(I.push({t:"c",pts:K.applyToTriplePoints(J.o[U-1],J.i[0],J.v[0])}),I.push({t:"z"}))}}C.trNodes=I}},CVShapeElement.prototype.renderPath=function(C,E){if(C.hd!==!0&&C._shouldRender){var I,B=E.styledShapes.length;for(I=0;I<B;I+=1)this.renderStyledShape(E.styledShapes[I],E.sh)}},CVShapeElement.prototype.renderFill=function(C,E,I){var B=E.style;(E.c._mdf||this._isFirstFrame)&&(B.co="rgb("+bmFloor(E.c.v[0])+","+bmFloor(E.c.v[1])+","+bmFloor(E.c.v[2])+")"),(E.o._mdf||I._opMdf||this._isFirstFrame)&&(B.coOp=E.o.v*I.opacity)},CVShapeElement.prototype.renderGradientFill=function(C,E,I){var B=E.style,U;if(!B.grd||E.g._mdf||E.s._mdf||E.e._mdf||C.t!==1&&(E.h._mdf||E.a._mdf)){var V=this.globalData.canvasContext,X=E.s.v,Y=E.e.v;if(C.t===1)U=V.createLinearGradient(X[0],X[1],Y[0],Y[1]);else{var K=Math.sqrt(Math.pow(X[0]-Y[0],2)+Math.pow(X[1]-Y[1],2)),J=Math.atan2(Y[1]-X[1],Y[0]-X[0]),xe=E.h.v;xe>=1?xe=.99:xe<=-1&&(xe=-.99);var Z=K*xe,_e=Math.cos(J+E.a.v)*Z+X[0],Se=Math.sin(J+E.a.v)*Z+X[1];U=V.createRadialGradient(_e,Se,0,X[0],X[1],K)}var Ee,Ae=C.g.p,Re=E.g.c,Te=1;for(Ee=0;Ee<Ae;Ee+=1)E.g._hasOpacity&&E.g._collapsable&&(Te=E.g.o[Ee*2+1]),U.addColorStop(Re[Ee*4]/100,"rgba("+Re[Ee*4+1]+","+Re[Ee*4+2]+","+Re[Ee*4+3]+","+Te+")");B.grd=U}B.coOp=E.o.v*I.opacity},CVShapeElement.prototype.renderStroke=function(C,E,I){var B=E.style,U=E.d;U&&(U._mdf||this._isFirstFrame)&&(B.da=U.dashArray,B.do=U.dashoffset[0]),(E.c._mdf||this._isFirstFrame)&&(B.co="rgb("+bmFloor(E.c.v[0])+","+bmFloor(E.c.v[1])+","+bmFloor(E.c.v[2])+")"),(E.o._mdf||I._opMdf||this._isFirstFrame)&&(B.coOp=E.o.v*I.opacity),(E.w._mdf||this._isFirstFrame)&&(B.wi=E.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0};function CVTextElement(C,E,I){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(C,E,I)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var C=this.textProperty.currentData;this.renderedLetters=createSizedArray(C.l?C.l.length:0);var E=!1;C.fc?(E=!0,this.values.fill=this.buildColor(C.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=E;var I=!1;C.sc&&(I=!0,this.values.stroke=this.buildColor(C.sc),this.values.sWidth=C.sw);var B=this.globalData.fontManager.getFontByName(C.f),U,V,X=C.l,Y=this.mHelper;this.stroke=I,this.values.fValue=C.finalSize+"px "+this.globalData.fontManager.getFontByName(C.f).fFamily,V=C.finalText.length;var K,J,xe,Z,_e,Se,Ee,Ae,Re,Te,we=this.data.singleShape,Pe=C.tr*.001*C.finalSize,Ie=0,Fe=0,Oe=!0,Le=0;for(U=0;U<V;U+=1){K=this.globalData.fontManager.getCharData(C.finalText[U],B.fStyle,this.globalData.fontManager.getFontByName(C.f).fFamily),J=K&&K.data||{},Y.reset(),we&&X[U].n&&(Ie=-Pe,Fe+=C.yOffset,Fe+=Oe?1:0,Oe=!1),_e=J.shapes?J.shapes[0].it:[],Ee=_e.length,Y.scale(C.finalSize/100,C.finalSize/100),we&&this.applyTextPropertiesToMatrix(C,Y,X[U].line,Ie,Fe),Re=createSizedArray(Ee-1);var $e=0;for(Se=0;Se<Ee;Se+=1)if(_e[Se].ty==="sh"){for(Z=_e[Se].ks.k.i.length,Ae=_e[Se].ks.k,Te=[],xe=1;xe<Z;xe+=1)xe===1&&Te.push(Y.applyToX(Ae.v[0][0],Ae.v[0][1],0),Y.applyToY(Ae.v[0][0],Ae.v[0][1],0)),Te.push(Y.applyToX(Ae.o[xe-1][0],Ae.o[xe-1][1],0),Y.applyToY(Ae.o[xe-1][0],Ae.o[xe-1][1],0),Y.applyToX(Ae.i[xe][0],Ae.i[xe][1],0),Y.applyToY(Ae.i[xe][0],Ae.i[xe][1],0),Y.applyToX(Ae.v[xe][0],Ae.v[xe][1],0),Y.applyToY(Ae.v[xe][0],Ae.v[xe][1],0));Te.push(Y.applyToX(Ae.o[xe-1][0],Ae.o[xe-1][1],0),Y.applyToY(Ae.o[xe-1][0],Ae.o[xe-1][1],0),Y.applyToX(Ae.i[0][0],Ae.i[0][1],0),Y.applyToY(Ae.i[0][0],Ae.i[0][1],0),Y.applyToX(Ae.v[0][0],Ae.v[0][1],0),Y.applyToY(Ae.v[0][0],Ae.v[0][1],0)),Re[$e]=Te,$e+=1}we&&(Ie+=X[U].l,Ie+=Pe),this.textSpans[Le]?this.textSpans[Le].elem=Re:this.textSpans[Le]={elem:Re},Le+=1}},CVTextElement.prototype.renderInnerContent=function(){this.validateText();var C=this.canvasContext;C.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var E,I,B,U,V,X,Y=this.textAnimator.renderedLetters,K=this.textProperty.currentData.l;I=K.length;var J,xe=null,Z=null,_e=null,Se,Ee,Ae=this.globalData.renderer;for(E=0;E<I;E+=1)if(!K[E].n){if(J=Y[E],J&&(Ae.save(),Ae.ctxTransform(J.p),Ae.ctxOpacity(J.o)),this.fill){for(J&&J.fc?xe!==J.fc&&(Ae.ctxFillStyle(J.fc),xe=J.fc):xe!==this.values.fill&&(xe=this.values.fill,Ae.ctxFillStyle(this.values.fill)),Se=this.textSpans[E].elem,U=Se.length,this.globalData.canvasContext.beginPath(),B=0;B<U;B+=1)for(Ee=Se[B],X=Ee.length,this.globalData.canvasContext.moveTo(Ee[0],Ee[1]),V=2;V<X;V+=6)this.globalData.canvasContext.bezierCurveTo(Ee[V],Ee[V+1],Ee[V+2],Ee[V+3],Ee[V+4],Ee[V+5]);this.globalData.canvasContext.closePath(),Ae.ctxFill()}if(this.stroke){for(J&&J.sw?_e!==J.sw&&(_e=J.sw,Ae.ctxLineWidth(J.sw)):_e!==this.values.sWidth&&(_e=this.values.sWidth,Ae.ctxLineWidth(this.values.sWidth)),J&&J.sc?Z!==J.sc&&(Z=J.sc,Ae.ctxStrokeStyle(J.sc)):Z!==this.values.stroke&&(Z=this.values.stroke,Ae.ctxStrokeStyle(this.values.stroke)),Se=this.textSpans[E].elem,U=Se.length,this.globalData.canvasContext.beginPath(),B=0;B<U;B+=1)for(Ee=Se[B],X=Ee.length,this.globalData.canvasContext.moveTo(Ee[0],Ee[1]),V=2;V<X;V+=6)this.globalData.canvasContext.bezierCurveTo(Ee[V],Ee[V+1],Ee[V+2],Ee[V+3],Ee[V+4],Ee[V+5]);this.globalData.canvasContext.closePath(),Ae.ctxStroke()}J&&this.globalData.renderer.restore()}};function CVImageElement(C,E,I){this.assetData=E.getAssetData(C.refId),this.img=E.imageLoader.getAsset(this.assetData),this.initElement(C,E,I)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var C=createTag("canvas");C.width=this.assetData.w,C.height=this.assetData.h;var E=C.getContext("2d"),I=this.img.width,B=this.img.height,U=I/B,V=this.assetData.w/this.assetData.h,X,Y,K=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;U>V&&K==="xMidYMid slice"||U<V&&K!=="xMidYMid slice"?(Y=B,X=Y*V):(X=I,Y=X/V),E.drawImage(this.img,(I-X)/2,(B-Y)/2,X,Y,0,0,this.assetData.w,this.assetData.h),this.img=C}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null};function CVSolidElement(C,E,I){this.initElement(C,E,I)}extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)};function CanvasRendererBase(){}extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(C){return new CVShapeElement(C,this.globalData,this)},CanvasRendererBase.prototype.createText=function(C){return new CVTextElement(C,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(C){return new CVImageElement(C,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(C){return new CVSolidElement(C,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(C){C[0]===1&&C[1]===0&&C[4]===0&&C[5]===1&&C[12]===0&&C[13]===0||this.canvasContext.transform(C[0],C[1],C[4],C[5],C[12],C[13])},CanvasRendererBase.prototype.ctxOpacity=function(C){this.canvasContext.globalAlpha*=C<0?0:C},CanvasRendererBase.prototype.ctxFillStyle=function(C){this.canvasContext.fillStyle=C},CanvasRendererBase.prototype.ctxStrokeStyle=function(C){this.canvasContext.strokeStyle=C},CanvasRendererBase.prototype.ctxLineWidth=function(C){this.canvasContext.lineWidth=C},CanvasRendererBase.prototype.ctxLineCap=function(C){this.canvasContext.lineCap=C},CanvasRendererBase.prototype.ctxLineJoin=function(C){this.canvasContext.lineJoin=C},CanvasRendererBase.prototype.ctxMiterLimit=function(C){this.canvasContext.miterLimit=C},CanvasRendererBase.prototype.ctxFill=function(C){this.canvasContext.fill(C)},CanvasRendererBase.prototype.ctxFillRect=function(C,E,I,B){this.canvasContext.fillRect(C,E,I,B)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}this.contextData.reset()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(C){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}C&&(this.globalData.blendMode="source-over"),this.contextData.restore(C)},CanvasRendererBase.prototype.configAnimation=function(C){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var E=this.animationItem.container.style;E.width="100%",E.height="100%";var I="0px 0px 0px";E.transformOrigin=I,E.mozTransformOrigin=I,E.webkitTransformOrigin=I,E["-webkit-transform"]=I,E.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=C,this.layers=C.layers,this.transformCanvas={w:C.w,h:C.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(C,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(C.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(C,E){this.reset();var I,B;C?(I=C,B=E,this.canvasContext.canvas.width=I,this.canvasContext.canvas.height=B):(this.animationItem.wrapper&&this.animationItem.container?(I=this.animationItem.wrapper.offsetWidth,B=this.animationItem.wrapper.offsetHeight):(I=this.canvasContext.canvas.width,B=this.canvasContext.canvas.height),this.canvasContext.canvas.width=I*this.renderConfig.dpr,this.canvasContext.canvas.height=B*this.renderConfig.dpr);var U,V;if(this.renderConfig.preserveAspectRatio.indexOf("meet")!==-1||this.renderConfig.preserveAspectRatio.indexOf("slice")!==-1){var X=this.renderConfig.preserveAspectRatio.split(" "),Y=X[1]||"meet",K=X[0]||"xMidYMid",J=K.substr(0,4),xe=K.substr(4);U=I/B,V=this.transformCanvas.w/this.transformCanvas.h,V>U&&Y==="meet"||V<U&&Y==="slice"?(this.transformCanvas.sx=I/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=I/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=B/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=B/(this.transformCanvas.h/this.renderConfig.dpr)),J==="xMid"&&(V<U&&Y==="meet"||V>U&&Y==="slice")?this.transformCanvas.tx=(I-this.transformCanvas.w*(B/this.transformCanvas.h))/2*this.renderConfig.dpr:J==="xMax"&&(V<U&&Y==="meet"||V>U&&Y==="slice")?this.transformCanvas.tx=(I-this.transformCanvas.w*(B/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,xe==="YMid"&&(V>U&&Y==="meet"||V<U&&Y==="slice")?this.transformCanvas.ty=(B-this.transformCanvas.h*(I/this.transformCanvas.w))/2*this.renderConfig.dpr:xe==="YMax"&&(V>U&&Y==="meet"||V<U&&Y==="slice")?this.transformCanvas.ty=(B-this.transformCanvas.h*(I/this.transformCanvas.w))*this.renderConfig.dpr:this.transformCanvas.ty=0}else this.renderConfig.preserveAspectRatio==="none"?(this.transformCanvas.sx=I/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=B/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText="");var C,E=this.layers?this.layers.length:0;for(C=E-1;C>=0;C-=1)this.elements[C]&&this.elements[C].destroy&&this.elements[C].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(C,E){if(!(this.renderedFrame===C&&this.renderConfig.clearCanvas===!0&&!E||this.destroyed||C===-1)){this.renderedFrame=C,this.globalData.frameNum=C-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||E,this.globalData.projectInterface.currentFrame=C;var I,B=this.layers.length;for(this.completeLayers||this.checkLayers(C),I=B-1;I>=0;I-=1)(this.completeLayers||this.elements[I])&&this.elements[I].prepareFrame(C-this.layers[I].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),I=B-1;I>=0;I-=1)(this.completeLayers||this.elements[I])&&this.elements[I].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(C){var E=this.elements;if(!(E[C]||this.layers[C].ty===99)){var I=this.createItem(this.layers[C],this,this.globalData);E[C]=I,I.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var C=this.pendingElements.pop();C.checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"};function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){this.stack=[],this.cArrPos=0,this.cTr=new Matrix;var C,E=15;for(C=0;C<E;C+=1){var I=new CanvasContext;this.stack[C]=I}this._length=E,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}CVContextData.prototype.duplicate=function(){var C=this._length*2,E=0;for(E=this._length;E<C;E+=1)this.stack[E]=new CanvasContext;this._length=C},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(C){this.cArrPos-=1;var E=this.stack[this.cArrPos],I=E.transform,B,U=this.cTr.props;for(B=0;B<16;B+=1)U[B]=I[B];if(C){this.nativeContext.restore();var V=this.stack[this.cArrPos+1];this.appliedFillStyle=V.fillStyle,this.appliedStrokeStyle=V.strokeStyle,this.appliedLineWidth=V.lineWidth,this.appliedLineCap=V.lineCap,this.appliedLineJoin=V.lineJoin,this.appliedMiterLimit=V.miterLimit}this.nativeContext.setTransform(I[0],I[1],I[4],I[5],I[12],I[13]),(C||E.opacity!==-1&&this.currentOpacity!==E.opacity)&&(this.nativeContext.globalAlpha=E.opacity,this.currentOpacity=E.opacity),this.currentFillStyle=E.fillStyle,this.currentStrokeStyle=E.strokeStyle,this.currentLineWidth=E.lineWidth,this.currentLineCap=E.lineCap,this.currentLineJoin=E.lineJoin,this.currentMiterLimit=E.miterLimit},CVContextData.prototype.save=function(C){C&&this.nativeContext.save();var E=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var I=this.stack[this.cArrPos],B;for(B=0;B<16;B+=1)I.transform[B]=E[B];this.cArrPos+=1;var U=this.stack[this.cArrPos];U.opacity=I.opacity,U.fillStyle=I.fillStyle,U.strokeStyle=I.strokeStyle,U.lineWidth=I.lineWidth,U.lineCap=I.lineCap,U.lineJoin=I.lineJoin,U.miterLimit=I.miterLimit},CVContextData.prototype.setOpacity=function(C){this.stack[this.cArrPos].opacity=C},CVContextData.prototype.setContext=function(C){this.nativeContext=C},CVContextData.prototype.fillStyle=function(C){this.stack[this.cArrPos].fillStyle!==C&&(this.currentFillStyle=C,this.stack[this.cArrPos].fillStyle=C)},CVContextData.prototype.strokeStyle=function(C){this.stack[this.cArrPos].strokeStyle!==C&&(this.currentStrokeStyle=C,this.stack[this.cArrPos].strokeStyle=C)},CVContextData.prototype.lineWidth=function(C){this.stack[this.cArrPos].lineWidth!==C&&(this.currentLineWidth=C,this.stack[this.cArrPos].lineWidth=C)},CVContextData.prototype.lineCap=function(C){this.stack[this.cArrPos].lineCap!==C&&(this.currentLineCap=C,this.stack[this.cArrPos].lineCap=C)},CVContextData.prototype.lineJoin=function(C){this.stack[this.cArrPos].lineJoin!==C&&(this.currentLineJoin=C,this.stack[this.cArrPos].lineJoin=C)},CVContextData.prototype.miterLimit=function(C){this.stack[this.cArrPos].miterLimit!==C&&(this.currentMiterLimit=C,this.stack[this.cArrPos].miterLimit=C)},CVContextData.prototype.transform=function(C){this.transformMat.cloneFromProps(C);var E=this.cTr;this.transformMat.multiply(E),E.cloneFromProps(this.transformMat.props);var I=E.props;this.nativeContext.setTransform(I[0],I[1],I[4],I[5],I[12],I[13])},CVContextData.prototype.opacity=function(C){var E=this.stack[this.cArrPos].opacity;E*=C<0?0:C,this.stack[this.cArrPos].opacity!==E&&(this.currentOpacity!==C&&(this.nativeContext.globalAlpha=C,this.currentOpacity=C),this.stack[this.cArrPos].opacity=E)},CVContextData.prototype.fill=function(C){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(C)},CVContextData.prototype.fillRect=function(C,E,I,B){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(C,E,I,B)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()};function CVCompElement(C,E,I){this.completeLayers=!1,this.layers=C.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(C,E,I),this.tm=C.tm?PropertyFactory.getProp(this,C.tm,0,E.frameRate,this):{_placeholder:!0}}extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var C=this.canvasContext;C.beginPath(),C.moveTo(0,0),C.lineTo(this.data.w,0),C.lineTo(this.data.w,this.data.h),C.lineTo(0,this.data.h),C.lineTo(0,0),C.clip();var E,I=this.layers.length;for(E=I-1;E>=0;E-=1)(this.completeLayers||this.elements[E])&&this.elements[E].renderFrame()},CVCompElement.prototype.destroy=function(){var C,E=this.layers.length;for(C=E-1;C>=0;C-=1)this.elements[C]&&this.elements[C].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(C){return new CVCompElement(C,this.globalData,this)};function CanvasRenderer(C,E){this.animationItem=C,this.renderConfig={clearCanvas:E&&E.clearCanvas!==void 0?E.clearCanvas:!0,context:E&&E.context||null,progressiveLoad:E&&E.progressiveLoad||!1,preserveAspectRatio:E&&E.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:E&&E.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:E&&E.contentVisibility||"visible",className:E&&E.className||"",id:E&&E.id||"",runExpressions:!E||E.runExpressions===void 0||E.runExpressions},this.renderConfig.dpr=E&&E.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=E&&E.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(C){return new CVCompElement(C,this.globalData,this)};function HBaseElement(){}HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var E=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var I=this.finalTransform.mat.toCSS();E.transform=I,E.webkitTransform=I}this.finalTransform._opMdf&&(E.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting;function HSolidElement(C,E,I){this.initElement(C,E,I)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var C;this.data.hasMask?(C=createNS("rect"),C.setAttribute("width",this.data.sw),C.setAttribute("height",this.data.sh),C.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):(C=createTag("div"),C.style.width=this.data.sw+"px",C.style.height=this.data.sh+"px",C.style.backgroundColor=this.data.sc),this.layerElement.appendChild(C)};function HShapeElement(C,E,I){this.shapes=[],this.shapesData=C.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(C,E,I),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var C;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),C=this.svgElement;else{C=createNS("svg");var E=this.comp.data?this.comp.data:this.globalData.compSize;C.setAttribute("width",E.w),C.setAttribute("height",E.h),C.appendChild(this.shapesContainer),this.layerElement.appendChild(C)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=C},HShapeElement.prototype.getTransformedPoint=function(C,E){var I,B=C.length;for(I=0;I<B;I+=1)E=C[I].mProps.v.applyToPointArray(E[0],E[1],0);return E},HShapeElement.prototype.calculateShapeBoundingBox=function(C,E){var I=C.sh.v,B=C.transformers,U,V=I._length,X,Y,K,J;if(!(V<=1)){for(U=0;U<V-1;U+=1)X=this.getTransformedPoint(B,I.v[U]),Y=this.getTransformedPoint(B,I.o[U]),K=this.getTransformedPoint(B,I.i[U+1]),J=this.getTransformedPoint(B,I.v[U+1]),this.checkBounds(X,Y,K,J,E);I.c&&(X=this.getTransformedPoint(B,I.v[U]),Y=this.getTransformedPoint(B,I.o[U]),K=this.getTransformedPoint(B,I.i[0]),J=this.getTransformedPoint(B,I.v[0]),this.checkBounds(X,Y,K,J,E))}},HShapeElement.prototype.checkBounds=function(C,E,I,B,U){this.getBoundsOfCurve(C,E,I,B);var V=this.shapeBoundingBox;U.x=bmMin(V.left,U.x),U.xMax=bmMax(V.right,U.xMax),U.y=bmMin(V.top,U.y),U.yMax=bmMax(V.bottom,U.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(C,E,I,B){for(var U=[[C[0],B[0]],[C[1],B[1]]],V,X,Y,K,J,xe,Z,_e=0;_e<2;++_e)X=6*C[_e]-12*E[_e]+6*I[_e],V=-3*C[_e]+9*E[_e]-9*I[_e]+3*B[_e],Y=3*E[_e]-3*C[_e],X|=0,V|=0,Y|=0,V===0&&X===0||(V===0?(K=-Y/X,K>0&&K<1&&U[_e].push(this.calculateF(K,C,E,I,B,_e))):(J=X*X-4*Y*V,J>=0&&(xe=(-X+bmSqrt(J))/(2*V),xe>0&&xe<1&&U[_e].push(this.calculateF(xe,C,E,I,B,_e)),Z=(-X-bmSqrt(J))/(2*V),Z>0&&Z<1&&U[_e].push(this.calculateF(Z,C,E,I,B,_e)))));this.shapeBoundingBox.left=bmMin.apply(null,U[0]),this.shapeBoundingBox.top=bmMin.apply(null,U[1]),this.shapeBoundingBox.right=bmMax.apply(null,U[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,U[1])},HShapeElement.prototype.calculateF=function(C,E,I,B,U,V){return bmPow(1-C,3)*E[V]+3*bmPow(1-C,2)*C*I[V]+3*(1-C)*bmPow(C,2)*B[V]+bmPow(C,3)*U[V]},HShapeElement.prototype.calculateBoundingBox=function(C,E){var I,B=C.length;for(I=0;I<B;I+=1)C[I]&&C[I].sh?this.calculateShapeBoundingBox(C[I],E):C[I]&&C[I].it?this.calculateBoundingBox(C[I].it,E):C[I]&&C[I].style&&C[I].w&&this.expandStrokeBoundingBox(C[I].w,E)},HShapeElement.prototype.expandStrokeBoundingBox=function(C,E){var I=0;if(C.keyframes){for(var B=0;B<C.keyframes.length;B+=1){var U=C.keyframes[B].s;U>I&&(I=U)}I*=C.mult}else I=C.v*C.mult;E.x-=I,E.xMax+=I,E.y-=I,E.yMax+=I},HShapeElement.prototype.currentBoxContains=function(C){return this.currentBBox.x<=C.x&&this.currentBBox.y<=C.y&&this.currentBBox.width+this.currentBBox.x>=C.x+C.width&&this.currentBBox.height+this.currentBBox.y>=C.y+C.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var C=this.tempBoundingBox,E=999999;if(C.x=E,C.xMax=-E,C.y=E,C.yMax=-E,this.calculateBoundingBox(this.itemsData,C),C.width=C.xMax<C.x?0:C.xMax-C.x,C.height=C.yMax<C.y?0:C.yMax-C.y,this.currentBoxContains(C))return;var I=!1;if(this.currentBBox.w!==C.width&&(this.currentBBox.w=C.width,this.shapeCont.setAttribute("width",C.width),I=!0),this.currentBBox.h!==C.height&&(this.currentBBox.h=C.height,this.shapeCont.setAttribute("height",C.height),I=!0),I||this.currentBBox.x!==C.x||this.currentBBox.y!==C.y){this.currentBBox.w=C.width,this.currentBBox.h=C.height,this.currentBBox.x=C.x,this.currentBBox.y=C.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var B=this.shapeCont.style,U="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";B.transform=U,B.webkitTransform=U}}};function HTextElement(C,E,I){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(C,E,I)}extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var C=createNS("g");this.maskedElement.appendChild(C),this.innerElem=C}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var C=this.textProperty.currentData;this.renderedLetters=createSizedArray(C.l?C.l.length:0);var E=this.innerElem.style,I=C.fc?this.buildColor(C.fc):"rgba(0,0,0,0)";E.fill=I,E.color=I,C.sc&&(E.stroke=this.buildColor(C.sc),E.strokeWidth=C.sw+"px");var B=this.globalData.fontManager.getFontByName(C.f);if(!this.globalData.fontManager.chars)if(E.fontSize=C.finalSize+"px",E.lineHeight=C.finalSize+"px",B.fClass)this.innerElem.className=B.fClass;else{E.fontFamily=B.fFamily;var U=C.fWeight,V=C.fStyle;E.fontStyle=V,E.fontWeight=U}var X,Y,K=C.l;Y=K.length;var J,xe,Z,_e=this.mHelper,Se,Ee="",Ae=0;for(X=0;X<Y;X+=1){if(this.globalData.fontManager.chars?(this.textPaths[Ae]?J=this.textPaths[Ae]:(J=createNS("path"),J.setAttribute("stroke-linecap",lineCapEnum[1]),J.setAttribute("stroke-linejoin",lineJoinEnum[2]),J.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[Ae]?(xe=this.textSpans[Ae],Z=xe.children[0]):(xe=createTag("div"),xe.style.lineHeight=0,Z=createNS("svg"),Z.appendChild(J),styleDiv(xe)))):this.isMasked?J=this.textPaths[Ae]?this.textPaths[Ae]:createNS("text"):this.textSpans[Ae]?(xe=this.textSpans[Ae],J=this.textPaths[Ae]):(xe=createTag("span"),styleDiv(xe),J=createTag("span"),styleDiv(J),xe.appendChild(J)),this.globalData.fontManager.chars){var Re=this.globalData.fontManager.getCharData(C.finalText[X],B.fStyle,this.globalData.fontManager.getFontByName(C.f).fFamily),Te;if(Re?Te=Re.data:Te=null,_e.reset(),Te&&Te.shapes&&Te.shapes.length&&(Se=Te.shapes[0].it,_e.scale(C.finalSize/100,C.finalSize/100),Ee=this.createPathShape(_e,Se),J.setAttribute("d",Ee)),this.isMasked)this.innerElem.appendChild(J);else{if(this.innerElem.appendChild(xe),Te&&Te.shapes){document.body.appendChild(Z);var we=Z.getBBox();Z.setAttribute("width",we.width+2),Z.setAttribute("height",we.height+2),Z.setAttribute("viewBox",we.x-1+" "+(we.y-1)+" "+(we.width+2)+" "+(we.height+2));var Pe=Z.style,Ie="translate("+(we.x-1)+"px,"+(we.y-1)+"px)";Pe.transform=Ie,Pe.webkitTransform=Ie,K[X].yOffset=we.y-1}else Z.setAttribute("width",1),Z.setAttribute("height",1);xe.appendChild(Z)}}else if(J.textContent=K[X].val,J.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(J);else{this.innerElem.appendChild(xe);var Fe=J.style,Oe="translate3d(0,"+-C.finalSize/1.2+"px,0)";Fe.transform=Oe,Fe.webkitTransform=Oe}this.isMasked?this.textSpans[Ae]=J:this.textSpans[Ae]=xe,this.textSpans[Ae].style.display="block",this.textPaths[Ae]=J,Ae+=1}for(;Ae<this.textSpans.length;)this.textSpans[Ae].style.display="none",Ae+=1},HTextElement.prototype.renderInnerContent=function(){this.validateText();var C;if(this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),C=this.svgElement.style;var E="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";C.transform=E,C.webkitTransform=E}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),!(!this.lettersChangedFlag&&!this.textAnimator.lettersChangedFlag)){var I,B,U=0,V=this.textAnimator.renderedLetters,X=this.textProperty.currentData.l;B=X.length;var Y,K,J;for(I=0;I<B;I+=1)X[I].n?U+=1:(K=this.textSpans[I],J=this.textPaths[I],Y=V[U],U+=1,Y._mdf.m&&(this.isMasked?K.setAttribute("transform",Y.m):(K.style.webkitTransform=Y.m,K.style.transform=Y.m)),K.style.opacity=Y.o,Y.sw&&Y._mdf.sw&&J.setAttribute("stroke-width",Y.sw),Y.sc&&Y._mdf.sc&&J.setAttribute("stroke",Y.sc),Y.fc&&Y._mdf.fc&&(J.setAttribute("fill",Y.fc),J.style.color=Y.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var xe=this.innerElem.getBBox();this.currentBBox.w!==xe.width&&(this.currentBBox.w=xe.width,this.svgElement.setAttribute("width",xe.width)),this.currentBBox.h!==xe.height&&(this.currentBBox.h=xe.height,this.svgElement.setAttribute("height",xe.height));var Z=1;if(this.currentBBox.w!==xe.width+Z*2||this.currentBBox.h!==xe.height+Z*2||this.currentBBox.x!==xe.x-Z||this.currentBBox.y!==xe.y-Z){this.currentBBox.w=xe.width+Z*2,this.currentBBox.h=xe.height+Z*2,this.currentBBox.x=xe.x-Z,this.currentBBox.y=xe.y-Z,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),C=this.svgElement.style;var _e="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";C.transform=_e,C.webkitTransform=_e}}}};function HCameraElement(C,E,I){this.initFrame(),this.initBaseData(C,E,I),this.initHierarchy();var B=PropertyFactory.getProp;if(this.pe=B(this,C.pe,0,0,this),C.ks.p.s?(this.px=B(this,C.ks.p.x,1,0,this),this.py=B(this,C.ks.p.y,1,0,this),this.pz=B(this,C.ks.p.z,1,0,this)):this.p=B(this,C.ks.p,1,0,this),C.ks.a&&(this.a=B(this,C.ks.a,1,0,this)),C.ks.or.k.length&&C.ks.or.k[0].to){var U,V=C.ks.or.k.length;for(U=0;U<V;U+=1)C.ks.or.k[U].to=null,C.ks.or.k[U].ti=null}this.or=B(this,C.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=B(this,C.ks.rx,0,degToRads,this),this.ry=B(this,C.ks.ry,0,degToRads,this),this.rz=B(this,C.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var C,E=this.comp.threeDElements.length,I,B,U;for(C=0;C<E;C+=1)if(I=this.comp.threeDElements[C],I.type==="3d"){B=I.perspectiveElem.style,U=I.container.style;var V=this.pe.v+"px",X="0px 0px 0px",Y="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";B.perspective=V,B.webkitPerspective=V,U.transformOrigin=X,U.mozTransformOrigin=X,U.webkitTransformOrigin=X,B.transform=Y,B.webkitTransform=Y}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var C=this._isFirstFrame,E,I;if(this.hierarchy)for(I=this.hierarchy.length,E=0;E<I;E+=1)C=this.hierarchy[E].finalTransform.mProp._mdf||C;if(C||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(I=this.hierarchy.length-1,E=I;E>=0;E-=1){var B=this.hierarchy[E].finalTransform.mProp;this.mat.translate(-B.p.v[0],-B.p.v[1],B.p.v[2]),this.mat.rotateX(-B.or.v[0]).rotateY(-B.or.v[1]).rotateZ(B.or.v[2]),this.mat.rotateX(-B.rx.v).rotateY(-B.ry.v).rotateZ(B.rz.v),this.mat.scale(1/B.s.v[0],1/B.s.v[1],1/B.s.v[2]),this.mat.translate(B.a.v[0],B.a.v[1],B.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var U;this.p?U=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:U=[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var V=Math.sqrt(Math.pow(U[0],2)+Math.pow(U[1],2)+Math.pow(U[2],2)),X=[U[0]/V,U[1]/V,U[2]/V],Y=Math.sqrt(X[2]*X[2]+X[0]*X[0]),K=Math.atan2(X[1],Y),J=Math.atan2(X[0],-X[2]);this.mat.rotateY(J).rotateX(-K)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var xe=!this._prevMat.equals(this.mat);if((xe||this.pe._mdf)&&this.comp.threeDElements){I=this.comp.threeDElements.length;var Z,_e,Se;for(E=0;E<I;E+=1)if(Z=this.comp.threeDElements[E],Z.type==="3d"){if(xe){var Ee=this.mat.toCSS();Se=Z.container.style,Se.transform=Ee,Se.webkitTransform=Ee}this.pe._mdf&&(_e=Z.perspectiveElem.style,_e.perspective=this.pe.v+"px",_e.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(C){this.prepareProperties(C,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null};function HImageElement(C,E,I){this.assetData=E.getAssetData(C.refId),this.initElement(C,E,I)}extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var C=this.globalData.getAssetsPath(this.assetData),E=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",C),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(E),E.crossOrigin="anonymous",E.src=C,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)};function HybridRendererBase(C,E){this.animationItem=C,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:E&&E.className||"",imagePreserveAspectRatio:E&&E.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(E&&E.hideOnTransparent===!1),filterSize:{width:E&&E.filterSize&&E.filterSize.width||"400%",height:E&&E.filterSize&&E.filterSize.height||"400%",x:E&&E.filterSize&&E.filterSize.x||"-100%",y:E&&E.filterSize&&E.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var C=this.pendingElements.pop();C.checkParenting()}},HybridRendererBase.prototype.appendElementInPos=function(C,E){var I=C.getBaseElement();if(I){var B=this.layers[E];if(!B.ddd||!this.supports3d)if(this.threeDElements)this.addTo3dContainer(I,E);else{for(var U=0,V,X,Y;U<E;)this.elements[U]&&this.elements[U]!==!0&&this.elements[U].getBaseElement&&(X=this.elements[U],Y=this.layers[U].ddd?this.getThreeDContainerByPos(U):X.getBaseElement(),V=Y||V),U+=1;V?(!B.ddd||!this.supports3d)&&this.layerElement.insertBefore(I,V):(!B.ddd||!this.supports3d)&&this.layerElement.appendChild(I)}else this.addTo3dContainer(I,E)}},HybridRendererBase.prototype.createShape=function(C){return this.supports3d?new HShapeElement(C,this.globalData,this):new SVGShapeElement(C,this.globalData,this)},HybridRendererBase.prototype.createText=function(C){return this.supports3d?new HTextElement(C,this.globalData,this):new SVGTextLottieElement(C,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(C){return this.camera=new HCameraElement(C,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(C){return this.supports3d?new HImageElement(C,this.globalData,this):new IImageElement(C,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(C){return this.supports3d?new HSolidElement(C,this.globalData,this):new ISolidElement(C,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(C){for(var E=0,I=this.threeDElements.length;E<I;){if(this.threeDElements[E].startPos<=C&&this.threeDElements[E].endPos>=C)return this.threeDElements[E].perspectiveElem;E+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(C,E){var I=createTag("div"),B,U;styleDiv(I);var V=createTag("div");if(styleDiv(V),E==="3d"){B=I.style,B.width=this.globalData.compSize.w+"px",B.height=this.globalData.compSize.h+"px";var X="50% 50%";B.webkitTransformOrigin=X,B.mozTransformOrigin=X,B.transformOrigin=X,U=V.style;var Y="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";U.transform=Y,U.webkitTransform=Y}I.appendChild(V);var K={container:V,perspectiveElem:I,startPos:C,endPos:C,type:E};return this.threeDElements.push(K),K},HybridRendererBase.prototype.build3dContainers=function(){var C,E=this.layers.length,I,B="";for(C=0;C<E;C+=1)this.layers[C].ddd&&this.layers[C].ty!==3?(B!=="3d"&&(B="3d",I=this.createThreeDContainer(C,"3d")),I.endPos=Math.max(I.endPos,C)):(B!=="2d"&&(B="2d",I=this.createThreeDContainer(C,"2d")),I.endPos=Math.max(I.endPos,C));for(E=this.threeDElements.length,C=E-1;C>=0;C-=1)this.resizerElem.appendChild(this.threeDElements[C].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(C,E){for(var I=0,B=this.threeDElements.length;I<B;){if(E<=this.threeDElements[I].endPos){for(var U=this.threeDElements[I].startPos,V;U<E;)this.elements[U]&&this.elements[U].getBaseElement&&(V=this.elements[U].getBaseElement()),U+=1;V?this.threeDElements[I].container.insertBefore(C,V):this.threeDElements[I].container.appendChild(C);break}I+=1}},HybridRendererBase.prototype.configAnimation=function(C){var E=createTag("div"),I=this.animationItem.wrapper,B=E.style;B.width=C.w+"px",B.height=C.h+"px",this.resizerElem=E,styleDiv(E),B.transformStyle="flat",B.mozTransformStyle="flat",B.webkitTransformStyle="flat",this.renderConfig.className&&E.setAttribute("class",this.renderConfig.className),I.appendChild(E),B.overflow="hidden";var U=createNS("svg");U.setAttribute("width","1"),U.setAttribute("height","1"),styleDiv(U),this.resizerElem.appendChild(U);var V=createNS("defs");U.appendChild(V),this.data=C,this.setupGlobalData(C,U),this.globalData.defs=V,this.layers=C.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var C,E=this.layers?this.layers.length:0;for(C=0;C<E;C+=1)this.elements[C]&&this.elements[C].destroy&&this.elements[C].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var C=this.animationItem.wrapper.offsetWidth,E=this.animationItem.wrapper.offsetHeight,I=C/E,B=this.globalData.compSize.w/this.globalData.compSize.h,U,V,X,Y;B>I?(U=C/this.globalData.compSize.w,V=C/this.globalData.compSize.w,X=0,Y=(E-this.globalData.compSize.h*(C/this.globalData.compSize.w))/2):(U=E/this.globalData.compSize.h,V=E/this.globalData.compSize.h,X=(C-this.globalData.compSize.w*(E/this.globalData.compSize.h))/2,Y=0);var K=this.resizerElem.style;K.webkitTransform="matrix3d("+U+",0,0,0,0,"+V+",0,0,0,0,1,0,"+X+","+Y+",0,1)",K.transform=K.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var C=this.globalData.compSize.w,E=this.globalData.compSize.h,I,B=this.threeDElements.length;for(I=0;I<B;I+=1){var U=this.threeDElements[I].perspectiveElem.style;U.webkitPerspective=Math.sqrt(Math.pow(C,2)+Math.pow(E,2))+"px",U.perspective=U.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(C){var E,I=C.length,B=createTag("div");for(E=0;E<I;E+=1)if(C[E].xt){var U=this.createComp(C[E],B,this.globalData.comp,null);U.initExpressions(),this.globalData.projectInterface.registerComposition(U)}};function HCompElement(C,E,I){this.layers=C.layers,this.supports3d=!C.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(C,E,I),this.tm=C.tm?PropertyFactory.getProp(this,C.tm,0,E.frameRate,this):{_placeholder:!0}}extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(C,E){for(var I=0,B;I<E;)this.elements[I]&&this.elements[I].getBaseElement&&(B=this.elements[I].getBaseElement()),I+=1;B?this.layerElement.insertBefore(C,B):this.layerElement.appendChild(C)},HCompElement.prototype.createComp=function(C){return this.supports3d?new HCompElement(C,this.globalData,this):new SVGCompElement(C,this.globalData,this)};function HybridRenderer(C,E){this.animationItem=C,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:E&&E.className||"",imagePreserveAspectRatio:E&&E.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(E&&E.hideOnTransparent===!1),filterSize:{width:E&&E.filterSize&&E.filterSize.width||"400%",height:E&&E.filterSize&&E.filterSize.height||"400%",x:E&&E.filterSize&&E.filterSize.x||"-100%",y:E&&E.filterSize&&E.filterSize.y||"-100%"},runExpressions:!E||E.runExpressions===void 0||E.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(C){return this.supports3d?new HCompElement(C,this.globalData,this):new SVGCompElement(C,this.globalData,this)};var CompExpressionInterface=function(){return function(C){function E(I){for(var B=0,U=C.layers.length;B<U;){if(C.layers[B].nm===I||C.layers[B].ind===I)return C.elements[B].layerInterface;B+=1}return null}return Object.defineProperty(E,"_name",{value:C.data.nm}),E.layer=E,E.pixelAspect=1,E.height=C.data.h||C.globalData.compSize.h,E.width=C.data.w||C.globalData.compSize.w,E.pixelAspect=1,E.frameDuration=1/C.globalData.frameRate,E.displayStartTime=0,E.numLayers=C.layers.length,E}}();function _typeof$2(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$2=function(I){return typeof I}:_typeof$2=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},_typeof$2(C)}function seedRandom(C,E){var I=this,B=256,U=6,V=52,X="random",Y=E.pow(B,U),K=E.pow(2,V),J=K*2,xe=B-1,Z;function _e(Pe,Ie,Fe){var Oe=[];Ie=Ie===!0?{entropy:!0}:Ie||{};var Le=Re(Ae(Ie.entropy?[Pe,we(C)]:Pe===null?Te():Pe,3),Oe),$e=new Se(Oe),Ve=function(){for(var Ue=$e.g(U),We=Y,je=0;Ue<K;)Ue=(Ue+je)*B,We*=B,je=$e.g(1);for(;Ue>=J;)Ue/=2,We/=2,je>>>=1;return(Ue+je)/We};return Ve.int32=function(){return $e.g(4)|0},Ve.quick=function(){return $e.g(4)/4294967296},Ve.double=Ve,Re(we($e.S),C),(Ie.pass||Fe||function(Xe,Ue,We,je){return je&&(je.S&&Ee(je,$e),Xe.state=function(){return Ee($e,{})}),We?(E[X]=Xe,Ue):Xe})(Ve,Le,"global"in Ie?Ie.global:this==E,Ie.state)}E["seed"+X]=_e;function Se(Pe){var Ie,Fe=Pe.length,Oe=this,Le=0,$e=Oe.i=Oe.j=0,Ve=Oe.S=[];for(Fe||(Pe=[Fe++]);Le<B;)Ve[Le]=Le++;for(Le=0;Le<B;Le++)Ve[Le]=Ve[$e=xe&$e+Pe[Le%Fe]+(Ie=Ve[Le])],Ve[$e]=Ie;Oe.g=function(Xe){for(var Ue,We=0,je=Oe.i,ze=Oe.j,He=Oe.S;Xe--;)Ue=He[je=xe&je+1],We=We*B+He[xe&(He[je]=He[ze=xe&ze+Ue])+(He[ze]=Ue)];return Oe.i=je,Oe.j=ze,We}}function Ee(Pe,Ie){return Ie.i=Pe.i,Ie.j=Pe.j,Ie.S=Pe.S.slice(),Ie}function Ae(Pe,Ie){var Fe=[],Oe=_typeof$2(Pe),Le;if(Ie&&Oe=="object")for(Le in Pe)try{Fe.push(Ae(Pe[Le],Ie-1))}catch{}return Fe.length?Fe:Oe=="string"?Pe:Pe+"\0"}function Re(Pe,Ie){for(var Fe=Pe+"",Oe,Le=0;Le<Fe.length;)Ie[xe&Le]=xe&(Oe^=Ie[xe&Le]*19)+Fe.charCodeAt(Le++);return we(Ie)}function Te(){try{var Pe=new Uint8Array(B);return(I.crypto||I.msCrypto).getRandomValues(Pe),we(Pe)}catch{var Ie=I.navigator,Fe=Ie&&Ie.plugins;return[+new Date,I,Fe,I.screen,we(C)]}}function we(Pe){return String.fromCharCode.apply(0,Pe)}Re(E.random(),C)}function initialize$2(C){seedRandom([],C)}var propTypes={SHAPE:"shape"};function _typeof$1(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$1=function(I){return typeof I}:_typeof$1=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},_typeof$1(C)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};initialize$2(BMMath);function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(C){return C.constructor===Array||C.constructor===Float32Array}function isNumerable(C,E){return C==="number"||E instanceof Number||C==="boolean"||C==="string"}function $bm_neg(C){var E=_typeof$1(C);if(E==="number"||C instanceof Number||E==="boolean")return-C;if($bm_isInstanceOfArray(C)){var I,B=C.length,U=[];for(I=0;I<B;I+=1)U[I]=-C[I];return U}return C.propType?C.v:-C}var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(C,E){var I=_typeof$1(C),B=_typeof$1(E);if(isNumerable(I,C)&&isNumerable(B,E)||I==="string"||B==="string")return C+E;if($bm_isInstanceOfArray(C)&&isNumerable(B,E))return C=C.slice(0),C[0]+=E,C;if(isNumerable(I,C)&&$bm_isInstanceOfArray(E))return E=E.slice(0),E[0]=C+E[0],E;if($bm_isInstanceOfArray(C)&&$bm_isInstanceOfArray(E)){for(var U=0,V=C.length,X=E.length,Y=[];U<V||U<X;)(typeof C[U]=="number"||C[U]instanceof Number)&&(typeof E[U]=="number"||E[U]instanceof Number)?Y[U]=C[U]+E[U]:Y[U]=E[U]===void 0?C[U]:C[U]||E[U],U+=1;return Y}return 0}var add=sum;function sub(C,E){var I=_typeof$1(C),B=_typeof$1(E);if(isNumerable(I,C)&&isNumerable(B,E))return I==="string"&&(C=parseInt(C,10)),B==="string"&&(E=parseInt(E,10)),C-E;if($bm_isInstanceOfArray(C)&&isNumerable(B,E))return C=C.slice(0),C[0]-=E,C;if(isNumerable(I,C)&&$bm_isInstanceOfArray(E))return E=E.slice(0),E[0]=C-E[0],E;if($bm_isInstanceOfArray(C)&&$bm_isInstanceOfArray(E)){for(var U=0,V=C.length,X=E.length,Y=[];U<V||U<X;)(typeof C[U]=="number"||C[U]instanceof Number)&&(typeof E[U]=="number"||E[U]instanceof Number)?Y[U]=C[U]-E[U]:Y[U]=E[U]===void 0?C[U]:C[U]||E[U],U+=1;return Y}return 0}function mul(C,E){var I=_typeof$1(C),B=_typeof$1(E),U;if(isNumerable(I,C)&&isNumerable(B,E))return C*E;var V,X;if($bm_isInstanceOfArray(C)&&isNumerable(B,E)){for(X=C.length,U=createTypedArray("float32",X),V=0;V<X;V+=1)U[V]=C[V]*E;return U}if(isNumerable(I,C)&&$bm_isInstanceOfArray(E)){for(X=E.length,U=createTypedArray("float32",X),V=0;V<X;V+=1)U[V]=C*E[V];return U}return 0}function div(C,E){var I=_typeof$1(C),B=_typeof$1(E),U;if(isNumerable(I,C)&&isNumerable(B,E))return C/E;var V,X;if($bm_isInstanceOfArray(C)&&isNumerable(B,E)){for(X=C.length,U=createTypedArray("float32",X),V=0;V<X;V+=1)U[V]=C[V]/E;return U}if(isNumerable(I,C)&&$bm_isInstanceOfArray(E)){for(X=E.length,U=createTypedArray("float32",X),V=0;V<X;V+=1)U[V]=C/E[V];return U}return 0}function mod(C,E){return typeof C=="string"&&(C=parseInt(C,10)),typeof E=="string"&&(E=parseInt(E,10)),C%E}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;function clamp(C,E,I){if(E>I){var B=I;I=E,E=B}return Math.min(Math.max(C,E),I)}function radiansToDegrees(C){return C/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(C){return C*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(C,E){if(typeof C=="number"||C instanceof Number)return E=E||0,Math.abs(C-E);E||(E=helperLengthArray);var I,B=Math.min(C.length,E.length),U=0;for(I=0;I<B;I+=1)U+=Math.pow(E[I]-C[I],2);return Math.sqrt(U)}function normalize(C){return div(C,length(C))}function rgbToHsl(C){var E=C[0],I=C[1],B=C[2],U=Math.max(E,I,B),V=Math.min(E,I,B),X,Y,K=(U+V)/2;if(U===V)X=0,Y=0;else{var J=U-V;switch(Y=K>.5?J/(2-U-V):J/(U+V),U){case E:X=(I-B)/J+(I<B?6:0);break;case I:X=(B-E)/J+2;break;case B:X=(E-I)/J+4;break}X/=6}return[X,Y,K,C[3]]}function hue2rgb(C,E,I){return I<0&&(I+=1),I>1&&(I-=1),I<1/6?C+(E-C)*6*I:I<1/2?E:I<2/3?C+(E-C)*(2/3-I)*6:C}function hslToRgb(C){var E=C[0],I=C[1],B=C[2],U,V,X;if(I===0)U=B,X=B,V=B;else{var Y=B<.5?B*(1+I):B+I-B*I,K=2*B-Y;U=hue2rgb(K,Y,E+1/3),V=hue2rgb(K,Y,E),X=hue2rgb(K,Y,E-1/3)}return[U,V,X,C[3]]}function linear(C,E,I,B,U){if((B===void 0||U===void 0)&&(B=E,U=I,E=0,I=1),I<E){var V=I;I=E,E=V}if(C<=E)return B;if(C>=I)return U;var X=I===E?0:(C-E)/(I-E);if(!B.length)return B+(U-B)*X;var Y,K=B.length,J=createTypedArray("float32",K);for(Y=0;Y<K;Y+=1)J[Y]=B[Y]+(U[Y]-B[Y])*X;return J}function random(C,E){if(E===void 0&&(C===void 0?(C=0,E=1):(E=C,C=void 0)),E.length){var I,B=E.length;C||(C=createTypedArray("float32",B));var U=createTypedArray("float32",B),V=BMMath.random();for(I=0;I<B;I+=1)U[I]=C[I]+V*(E[I]-C[I]);return U}C===void 0&&(C=0);var X=BMMath.random();return C+X*(E-C)}function createPath(C,E,I,B){var U,V=C.length,X=shapePool.newElement();X.setPathData(!!B,V);var Y=[0,0],K,J;for(U=0;U<V;U+=1)K=E&&E[U]?E[U]:Y,J=I&&I[U]?I[U]:Y,X.setTripleAt(C[U][0],C[U][1],J[0]+C[U][0],J[1]+C[U][1],K[0]+C[U][0],K[1]+C[U][1],U,!0);return X}function initiateExpression(elem,data,property){function noOp(C){return C}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=val.indexOf("random")!==-1,elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||this.data.hd!==!0,wiggle=(function C(E,I){var B,U,V=this.pv.length?this.pv.length:1,X=createTypedArray("float32",V);E=5;var Y=Math.floor(time*E);for(B=0,U=0;B<Y;){for(U=0;U<V;U+=1)X[U]+=-I+I*2*BMMath.random();B+=1}var K=time*E,J=K-Math.floor(K),xe=createTypedArray("float32",V);if(V>1){for(U=0;U<V;U+=1)xe[U]=this.pv[U]+X[U]+(-I+I*2*BMMath.random())*J;return xe}return this.pv+X[0]+(-I+I*2*BMMath.random())*J}).bind(this);thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty));function loopInDuration(C,E){return loopIn(C,E,!0)}function loopOutDuration(C,E){return loopOut(C,E,!0)}this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);function lookAt(C,E){var I=[E[0]-C[0],E[1]-C[1],E[2]-C[2]],B=Math.atan2(I[0],Math.sqrt(I[1]*I[1]+I[2]*I[2]))/degToRads,U=-Math.atan2(I[1],I[2])/degToRads;return[U,B,0]}function easeOut(C,E,I,B,U){return applyEase(easeOutBez,C,E,I,B,U)}function easeIn(C,E,I,B,U){return applyEase(easeInBez,C,E,I,B,U)}function ease(C,E,I,B,U){return applyEase(easeInOutBez,C,E,I,B,U)}function applyEase(C,E,I,B,U,V){U===void 0?(U=I,V=B):E=(E-I)/(B-I),E>1?E=1:E<0&&(E=0);var X=C(E);if($bm_isInstanceOfArray(U)){var Y,K=U.length,J=createTypedArray("float32",K);for(Y=0;Y<K;Y+=1)J[Y]=(V[Y]-U[Y])*X+U[Y];return J}return(V-U)*X+U}function nearestKey(C){var E,I=data.k.length,B,U;if(!data.k.length||typeof data.k[0]=="number")B=0,U=0;else if(B=-1,C*=elem.comp.globalData.frameRate,C<data.k[0].t)B=1,U=data.k[0].t;else{for(E=0;E<I-1;E+=1)if(C===data.k[E].t){B=E+1,U=data.k[E].t;break}else if(C>data.k[E].t&&C<data.k[E+1].t){C-data.k[E].t>data.k[E+1].t-C?(B=E+2,U=data.k[E+1].t):(B=E+1,U=data.k[E].t);break}B===-1&&(B=E+1,U=data.k[E].t)}var V={};return V.index=B,V.time=U/elem.comp.globalData.frameRate,V}function key(C){var E,I,B;if(!data.k.length||typeof data.k[0]=="number")throw new Error("The property has no keyframe at index "+C);C-=1,E={time:data.k[C].t/elem.comp.globalData.frameRate,value:[]};var U=Object.prototype.hasOwnProperty.call(data.k[C],"s")?data.k[C].s:data.k[C-1].e;for(B=U.length,I=0;I<B;I+=1)E[I]=U[I],E.value[I]=U[I];return E}function framesToTime(C,E){return E||(E=elem.comp.globalData.frameRate),C/E}function timeToFrames(C,E){return!C&&C!==0&&(C=time),E||(E=elem.comp.globalData.frameRate),C*E}function seedRandom(C){BMMath.seedrandom(randSeed+C)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(C,E){return typeof value=="string"?E===void 0?value.substring(C):value.substring(C,E):""}function substr(C,E){return typeof value=="string"?E===void 0?value.substr(C):value.substr(C,E):""}function posterizeTime(C){time=C===0?0:Math.floor(time*C)/C,value=valueAtTime(time)}var time,velocity,value,text,textIndex,textTotal,selectorValue,index=elem.data.ind,hasParent=!!(elem.hierarchy&&elem.hierarchy.length),parent,randSeed=Math.floor(Math.random()*1e6),globalData=elem.globalData;function executeExpression(C){return value=C,this.frameExpressionId===elem.globalData.frameId&&this.propType!=="textSelector"?value:(this.propType==="textSelector"&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),elemType===4&&!content&&(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),hasParent=!!(elem.hierarchy&&elem.hierarchy.length),hasParent&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt,scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var C={};C.initExpressions=E,C.resetFrame=ExpressionManager.resetFrame;function E(I){var B=0,U=[];function V(){B+=1}function X(){B-=1,B===0&&K()}function Y(J){U.indexOf(J)===-1&&U.push(J)}function K(){var J,xe=U.length;for(J=0;J<xe;J+=1)U[J].release();U.length=0}I.renderer.compInterface=CompExpressionInterface(I.renderer),I.renderer.globalData.projectInterface.registerComposition(I.renderer),I.renderer.globalData.pushExpression=V,I.renderer.globalData.popExpression=X,I.renderer.globalData.registerExpressionProperty=Y}return C}(),MaskManagerInterface=function(){function C(I,B){this._mask=I,this._data=B}Object.defineProperty(C.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(C.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),this._mask.op.v*100}});var E=function(B){var U=createSizedArray(B.viewData.length),V,X=B.viewData.length;for(V=0;V<X;V+=1)U[V]=new C(B.viewData[V],B.masksProperties[V]);var Y=function(J){for(V=0;V<X;){if(B.masksProperties[V].nm===J)return U[V];V+=1}return null};return Y};return E}(),ExpressionPropertyInterface=function(){var C={pv:0,v:0,mult:1},E={pv:[0,0,0],v:[0,0,0],mult:1};function I(X,Y,K){Object.defineProperty(X,"velocity",{get:function(){return Y.getVelocityAtTime(Y.comp.currentFrame)}}),X.numKeys=Y.keyframes?Y.keyframes.length:0,X.key=function(J){if(!X.numKeys)return 0;var xe="";"s"in Y.keyframes[J-1]?xe=Y.keyframes[J-1].s:"e"in Y.keyframes[J-2]?xe=Y.keyframes[J-2].e:xe=Y.keyframes[J-2].s;var Z=K==="unidimensional"?new Number(xe):Object.assign({},xe);return Z.time=Y.keyframes[J-1].t/Y.elem.comp.globalData.frameRate,Z.value=K==="unidimensional"?xe[0]:xe,Z},X.valueAtTime=Y.getValueAtTime,X.speedAtTime=Y.getSpeedAtTime,X.velocityAtTime=Y.getVelocityAtTime,X.propertyGroup=Y.propertyGroup}function B(X){(!X||!("pv"in X))&&(X=C);var Y=1/X.mult,K=X.pv*Y,J=new Number(K);return J.value=K,I(J,X,"unidimensional"),function(){return X.k&&X.getValue(),K=X.v*Y,J.value!==K&&(J=new Number(K),J.value=K,I(J,X,"unidimensional")),J}}function U(X){(!X||!("pv"in X))&&(X=E);var Y=1/X.mult,K=X.data&&X.data.l||X.pv.length,J=createTypedArray("float32",K),xe=createTypedArray("float32",K);return J.value=xe,I(J,X,"multidimensional"),function(){X.k&&X.getValue();for(var Z=0;Z<K;Z+=1)xe[Z]=X.v[Z]*Y,J[Z]=xe[Z];return J}}function V(){return C}return function(X){return X?X.propType==="unidimensional"?B(X):U(X):V}}(),TransformExpressionInterface=function(){return function(C){function E(X){switch(X){case"scale":case"Scale":case"ADBE Scale":case 6:return E.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return E.rotation;case"ADBE Rotate X":return E.xRotation;case"ADBE Rotate Y":return E.yRotation;case"position":case"Position":case"ADBE Position":case 2:return E.position;case"ADBE Position_0":return E.xPosition;case"ADBE Position_1":return E.yPosition;case"ADBE Position_2":return E.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return E.anchorPoint;case"opacity":case"Opacity":case 11:return E.opacity;default:return null}}Object.defineProperty(E,"rotation",{get:ExpressionPropertyInterface(C.r||C.rz)}),Object.defineProperty(E,"zRotation",{get:ExpressionPropertyInterface(C.rz||C.r)}),Object.defineProperty(E,"xRotation",{get:ExpressionPropertyInterface(C.rx)}),Object.defineProperty(E,"yRotation",{get:ExpressionPropertyInterface(C.ry)}),Object.defineProperty(E,"scale",{get:ExpressionPropertyInterface(C.s)});var I,B,U,V;return C.p?V=ExpressionPropertyInterface(C.p):(I=ExpressionPropertyInterface(C.px),B=ExpressionPropertyInterface(C.py),C.pz&&(U=ExpressionPropertyInterface(C.pz))),Object.defineProperty(E,"position",{get:function(){return C.p?V():[I(),B(),U?U():0]}}),Object.defineProperty(E,"xPosition",{get:ExpressionPropertyInterface(C.px)}),Object.defineProperty(E,"yPosition",{get:ExpressionPropertyInterface(C.py)}),Object.defineProperty(E,"zPosition",{get:ExpressionPropertyInterface(C.pz)}),Object.defineProperty(E,"anchorPoint",{get:ExpressionPropertyInterface(C.a)}),Object.defineProperty(E,"opacity",{get:ExpressionPropertyInterface(C.o)}),Object.defineProperty(E,"skew",{get:ExpressionPropertyInterface(C.sk)}),Object.defineProperty(E,"skewAxis",{get:ExpressionPropertyInterface(C.sa)}),Object.defineProperty(E,"orientation",{get:ExpressionPropertyInterface(C.or)}),E}}(),LayerExpressionInterface=function(){function C(J){var xe=new Matrix;if(J!==void 0){var Z=this._elem.finalTransform.mProp.getValueAtTime(J);Z.clone(xe)}else{var _e=this._elem.finalTransform.mProp;_e.applyToMatrix(xe)}return xe}function E(J,xe){var Z=this.getMatrix(xe);return Z.props[12]=0,Z.props[13]=0,Z.props[14]=0,this.applyPoint(Z,J)}function I(J,xe){var Z=this.getMatrix(xe);return this.applyPoint(Z,J)}function B(J,xe){var Z=this.getMatrix(xe);return Z.props[12]=0,Z.props[13]=0,Z.props[14]=0,this.invertPoint(Z,J)}function U(J,xe){var Z=this.getMatrix(xe);return this.invertPoint(Z,J)}function V(J,xe){if(this._elem.hierarchy&&this._elem.hierarchy.length){var Z,_e=this._elem.hierarchy.length;for(Z=0;Z<_e;Z+=1)this._elem.hierarchy[Z].finalTransform.mProp.applyToMatrix(J)}return J.applyToPointArray(xe[0],xe[1],xe[2]||0)}function X(J,xe){if(this._elem.hierarchy&&this._elem.hierarchy.length){var Z,_e=this._elem.hierarchy.length;for(Z=0;Z<_e;Z+=1)this._elem.hierarchy[Z].finalTransform.mProp.applyToMatrix(J)}return J.inversePoint(xe)}function Y(J){var xe=new Matrix;if(xe.reset(),this._elem.finalTransform.mProp.applyToMatrix(xe),this._elem.hierarchy&&this._elem.hierarchy.length){var Z,_e=this._elem.hierarchy.length;for(Z=0;Z<_e;Z+=1)this._elem.hierarchy[Z].finalTransform.mProp.applyToMatrix(xe);return xe.inversePoint(J)}return xe.inversePoint(J)}function K(){return[1,1,1,1]}return function(J){var xe;function Z(Ae){Se.mask=new MaskManagerInterface(Ae,J)}function _e(Ae){Se.effect=Ae}function Se(Ae){switch(Ae){case"ADBE Root Vectors Group":case"Contents":case 2:return Se.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return xe;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return Se.effect;case"ADBE Text Properties":return Se.textInterface;default:return null}}Se.getMatrix=C,Se.invertPoint=X,Se.applyPoint=V,Se.toWorld=I,Se.toWorldVec=E,Se.fromWorld=U,Se.fromWorldVec=B,Se.toComp=I,Se.fromComp=Y,Se.sampleImage=K,Se.sourceRectAtTime=J.sourceRectAtTime.bind(J),Se._elem=J,xe=TransformExpressionInterface(J.finalTransform.mProp);var Ee=getDescriptor(xe,"anchorPoint");return Object.defineProperties(Se,{hasParent:{get:function(){return J.hierarchy.length}},parent:{get:function(){return J.hierarchy[0].layerInterface}},rotation:getDescriptor(xe,"rotation"),scale:getDescriptor(xe,"scale"),position:getDescriptor(xe,"position"),opacity:getDescriptor(xe,"opacity"),anchorPoint:Ee,anchor_point:Ee,transform:{get:function(){return xe}},active:{get:function(){return J.isInRange}}}),Se.startTime=J.data.st,Se.index=J.data.ind,Se.source=J.data.refId,Se.height=J.data.ty===0?J.data.h:100,Se.width=J.data.ty===0?J.data.w:100,Se.inPoint=J.data.ip/J.comp.globalData.frameRate,Se.outPoint=J.data.op/J.comp.globalData.frameRate,Se._name=J.data.nm,Se.registerMaskInterface=Z,Se.registerEffectsInterface=_e,Se}}(),propertyGroupFactory=function(){return function(C,E){return function(I){return I=I===void 0?1:I,I<=0?C:E(I-1)}}}(),PropertyInterface=function(){return function(C,E){var I={_name:C};function B(U){return U=U===void 0?1:U,U<=0?I:E(U-1)}return B}}(),EffectsExpressionInterface=function(){var C={createEffectsInterface:E};function E(U,V){if(U.effectsManager){var X=[],Y=U.data.ef,K,J=U.effectsManager.effectElements.length;for(K=0;K<J;K+=1)X.push(I(Y[K],U.effectsManager.effectElements[K],V,U));var xe=U.data.ef||[],Z=function(Se){for(K=0,J=xe.length;K<J;){if(Se===xe[K].nm||Se===xe[K].mn||Se===xe[K].ix)return X[K];K+=1}return null};return Object.defineProperty(Z,"numProperties",{get:function(){return xe.length}}),Z}return null}function I(U,V,X,Y){function K(Se){for(var Ee=U.ef,Ae=0,Re=Ee.length;Ae<Re;){if(Se===Ee[Ae].nm||Se===Ee[Ae].mn||Se===Ee[Ae].ix)return Ee[Ae].ty===5?xe[Ae]:xe[Ae]();Ae+=1}throw new Error}var J=propertyGroupFactory(K,X),xe=[],Z,_e=U.ef.length;for(Z=0;Z<_e;Z+=1)U.ef[Z].ty===5?xe.push(I(U.ef[Z],V.effectElements[Z],V.effectElements[Z].propertyGroup,Y)):xe.push(B(V.effectElements[Z],U.ef[Z].ty,Y,J));return U.mn==="ADBE Color Control"&&Object.defineProperty(K,"color",{get:function(){return xe[0]()}}),Object.defineProperties(K,{numProperties:{get:function(){return U.np}},_name:{value:U.nm},propertyGroup:{value:J}}),K.enabled=U.en!==0,K.active=K.enabled,K}function B(U,V,X,Y){var K=ExpressionPropertyInterface(U.p);function J(){return V===10?X.comp.compInterface(U.p.v):K()}return U.p.setGroupProperty&&U.p.setGroupProperty(PropertyInterface("",Y)),J}return C}(),ShapePathInterface=function(){return function(E,I,B){var U=I.sh;function V(Y){return Y==="Shape"||Y==="shape"||Y==="Path"||Y==="path"||Y==="ADBE Vector Shape"||Y===2?V.path:null}var X=propertyGroupFactory(V,B);return U.setGroupProperty(PropertyInterface("Path",X)),Object.defineProperties(V,{path:{get:function(){return U.k&&U.getValue(),U}},shape:{get:function(){return U.k&&U.getValue(),U}},_name:{value:E.nm},ix:{value:E.ix},propertyIndex:{value:E.ix},mn:{value:E.mn},propertyGroup:{value:B}}),V}}(),ShapeExpressionInterface=function(){function C(Ee,Ae,Re){var Te=[],we,Pe=Ee?Ee.length:0;for(we=0;we<Pe;we+=1)Ee[we].ty==="gr"?Te.push(I(Ee[we],Ae[we],Re)):Ee[we].ty==="fl"?Te.push(B(Ee[we],Ae[we],Re)):Ee[we].ty==="st"?Te.push(X(Ee[we],Ae[we],Re)):Ee[we].ty==="tm"?Te.push(Y(Ee[we],Ae[we],Re)):Ee[we].ty==="tr"||(Ee[we].ty==="el"?Te.push(J(Ee[we],Ae[we],Re)):Ee[we].ty==="sr"?Te.push(xe(Ee[we],Ae[we],Re)):Ee[we].ty==="sh"?Te.push(ShapePathInterface(Ee[we],Ae[we],Re)):Ee[we].ty==="rc"?Te.push(Z(Ee[we],Ae[we],Re)):Ee[we].ty==="rd"?Te.push(_e(Ee[we],Ae[we],Re)):Ee[we].ty==="rp"?Te.push(Se(Ee[we],Ae[we],Re)):Ee[we].ty==="gf"?Te.push(U(Ee[we],Ae[we],Re)):Te.push(V(Ee[we],Ae[we])));return Te}function E(Ee,Ae,Re){var Te,we=function(Fe){for(var Oe=0,Le=Te.length;Oe<Le;){if(Te[Oe]._name===Fe||Te[Oe].mn===Fe||Te[Oe].propertyIndex===Fe||Te[Oe].ix===Fe||Te[Oe].ind===Fe)return Te[Oe];Oe+=1}return typeof Fe=="number"?Te[Fe-1]:null};we.propertyGroup=propertyGroupFactory(we,Re),Te=C(Ee.it,Ae.it,we.propertyGroup),we.numProperties=Te.length;var Pe=K(Ee.it[Ee.it.length-1],Ae.it[Ae.it.length-1],we.propertyGroup);return we.transform=Pe,we.propertyIndex=Ee.cix,we._name=Ee.nm,we}function I(Ee,Ae,Re){var Te=function(Fe){switch(Fe){case"ADBE Vectors Group":case"Contents":case 2:return Te.content;default:return Te.transform}};Te.propertyGroup=propertyGroupFactory(Te,Re);var we=E(Ee,Ae,Te.propertyGroup),Pe=K(Ee.it[Ee.it.length-1],Ae.it[Ae.it.length-1],Te.propertyGroup);return Te.content=we,Te.transform=Pe,Object.defineProperty(Te,"_name",{get:function(){return Ee.nm}}),Te.numProperties=Ee.np,Te.propertyIndex=Ee.ix,Te.nm=Ee.nm,Te.mn=Ee.mn,Te}function B(Ee,Ae,Re){function Te(we){return we==="Color"||we==="color"?Te.color:we==="Opacity"||we==="opacity"?Te.opacity:null}return Object.defineProperties(Te,{color:{get:ExpressionPropertyInterface(Ae.c)},opacity:{get:ExpressionPropertyInterface(Ae.o)},_name:{value:Ee.nm},mn:{value:Ee.mn}}),Ae.c.setGroupProperty(PropertyInterface("Color",Re)),Ae.o.setGroupProperty(PropertyInterface("Opacity",Re)),Te}function U(Ee,Ae,Re){function Te(we){return we==="Start Point"||we==="start point"?Te.startPoint:we==="End Point"||we==="end point"?Te.endPoint:we==="Opacity"||we==="opacity"?Te.opacity:null}return Object.defineProperties(Te,{startPoint:{get:ExpressionPropertyInterface(Ae.s)},endPoint:{get:ExpressionPropertyInterface(Ae.e)},opacity:{get:ExpressionPropertyInterface(Ae.o)},type:{get:function(){return"a"}},_name:{value:Ee.nm},mn:{value:Ee.mn}}),Ae.s.setGroupProperty(PropertyInterface("Start Point",Re)),Ae.e.setGroupProperty(PropertyInterface("End Point",Re)),Ae.o.setGroupProperty(PropertyInterface("Opacity",Re)),Te}function V(){function Ee(){return null}return Ee}function X(Ee,Ae,Re){var Te=propertyGroupFactory(Le,Re),we=propertyGroupFactory(Oe,Te);function Pe($e){Object.defineProperty(Oe,Ee.d[$e].nm,{get:ExpressionPropertyInterface(Ae.d.dataProps[$e].p)})}var Ie,Fe=Ee.d?Ee.d.length:0,Oe={};for(Ie=0;Ie<Fe;Ie+=1)Pe(Ie),Ae.d.dataProps[Ie].p.setGroupProperty(we);function Le($e){return $e==="Color"||$e==="color"?Le.color:$e==="Opacity"||$e==="opacity"?Le.opacity:$e==="Stroke Width"||$e==="stroke width"?Le.strokeWidth:null}return Object.defineProperties(Le,{color:{get:ExpressionPropertyInterface(Ae.c)},opacity:{get:ExpressionPropertyInterface(Ae.o)},strokeWidth:{get:ExpressionPropertyInterface(Ae.w)},dash:{get:function(){return Oe}},_name:{value:Ee.nm},mn:{value:Ee.mn}}),Ae.c.setGroupProperty(PropertyInterface("Color",Te)),Ae.o.setGroupProperty(PropertyInterface("Opacity",Te)),Ae.w.setGroupProperty(PropertyInterface("Stroke Width",Te)),Le}function Y(Ee,Ae,Re){function Te(Pe){return Pe===Ee.e.ix||Pe==="End"||Pe==="end"?Te.end:Pe===Ee.s.ix?Te.start:Pe===Ee.o.ix?Te.offset:null}var we=propertyGroupFactory(Te,Re);return Te.propertyIndex=Ee.ix,Ae.s.setGroupProperty(PropertyInterface("Start",we)),Ae.e.setGroupProperty(PropertyInterface("End",we)),Ae.o.setGroupProperty(PropertyInterface("Offset",we)),Te.propertyIndex=Ee.ix,Te.propertyGroup=Re,Object.defineProperties(Te,{start:{get:ExpressionPropertyInterface(Ae.s)},end:{get:ExpressionPropertyInterface(Ae.e)},offset:{get:ExpressionPropertyInterface(Ae.o)},_name:{value:Ee.nm}}),Te.mn=Ee.mn,Te}function K(Ee,Ae,Re){function Te(Pe){return Ee.a.ix===Pe||Pe==="Anchor Point"?Te.anchorPoint:Ee.o.ix===Pe||Pe==="Opacity"?Te.opacity:Ee.p.ix===Pe||Pe==="Position"?Te.position:Ee.r.ix===Pe||Pe==="Rotation"||Pe==="ADBE Vector Rotation"?Te.rotation:Ee.s.ix===Pe||Pe==="Scale"?Te.scale:Ee.sk&&Ee.sk.ix===Pe||Pe==="Skew"?Te.skew:Ee.sa&&Ee.sa.ix===Pe||Pe==="Skew Axis"?Te.skewAxis:null}var we=propertyGroupFactory(Te,Re);return Ae.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",we)),Ae.transform.mProps.p.setGroupProperty(PropertyInterface("Position",we)),Ae.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",we)),Ae.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",we)),Ae.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",we)),Ae.transform.mProps.sk&&(Ae.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",we)),Ae.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",we))),Ae.transform.op.setGroupProperty(PropertyInterface("Opacity",we)),Object.defineProperties(Te,{opacity:{get:ExpressionPropertyInterface(Ae.transform.mProps.o)},position:{get:ExpressionPropertyInterface(Ae.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(Ae.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(Ae.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(Ae.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(Ae.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(Ae.transform.mProps.sa)},_name:{value:Ee.nm}}),Te.ty="tr",Te.mn=Ee.mn,Te.propertyGroup=Re,Te}function J(Ee,Ae,Re){function Te(Ie){return Ee.p.ix===Ie?Te.position:Ee.s.ix===Ie?Te.size:null}var we=propertyGroupFactory(Te,Re);Te.propertyIndex=Ee.ix;var Pe=Ae.sh.ty==="tm"?Ae.sh.prop:Ae.sh;return Pe.s.setGroupProperty(PropertyInterface("Size",we)),Pe.p.setGroupProperty(PropertyInterface("Position",we)),Object.defineProperties(Te,{size:{get:ExpressionPropertyInterface(Pe.s)},position:{get:ExpressionPropertyInterface(Pe.p)},_name:{value:Ee.nm}}),Te.mn=Ee.mn,Te}function xe(Ee,Ae,Re){function Te(Ie){return Ee.p.ix===Ie?Te.position:Ee.r.ix===Ie?Te.rotation:Ee.pt.ix===Ie?Te.points:Ee.or.ix===Ie||Ie==="ADBE Vector Star Outer Radius"?Te.outerRadius:Ee.os.ix===Ie?Te.outerRoundness:Ee.ir&&(Ee.ir.ix===Ie||Ie==="ADBE Vector Star Inner Radius")?Te.innerRadius:Ee.is&&Ee.is.ix===Ie?Te.innerRoundness:null}var we=propertyGroupFactory(Te,Re),Pe=Ae.sh.ty==="tm"?Ae.sh.prop:Ae.sh;return Te.propertyIndex=Ee.ix,Pe.or.setGroupProperty(PropertyInterface("Outer Radius",we)),Pe.os.setGroupProperty(PropertyInterface("Outer Roundness",we)),Pe.pt.setGroupProperty(PropertyInterface("Points",we)),Pe.p.setGroupProperty(PropertyInterface("Position",we)),Pe.r.setGroupProperty(PropertyInterface("Rotation",we)),Ee.ir&&(Pe.ir.setGroupProperty(PropertyInterface("Inner Radius",we)),Pe.is.setGroupProperty(PropertyInterface("Inner Roundness",we))),Object.defineProperties(Te,{position:{get:ExpressionPropertyInterface(Pe.p)},rotation:{get:ExpressionPropertyInterface(Pe.r)},points:{get:ExpressionPropertyInterface(Pe.pt)},outerRadius:{get:ExpressionPropertyInterface(Pe.or)},outerRoundness:{get:ExpressionPropertyInterface(Pe.os)},innerRadius:{get:ExpressionPropertyInterface(Pe.ir)},innerRoundness:{get:ExpressionPropertyInterface(Pe.is)},_name:{value:Ee.nm}}),Te.mn=Ee.mn,Te}function Z(Ee,Ae,Re){function Te(Ie){return Ee.p.ix===Ie?Te.position:Ee.r.ix===Ie?Te.roundness:Ee.s.ix===Ie||Ie==="Size"||Ie==="ADBE Vector Rect Size"?Te.size:null}var we=propertyGroupFactory(Te,Re),Pe=Ae.sh.ty==="tm"?Ae.sh.prop:Ae.sh;return Te.propertyIndex=Ee.ix,Pe.p.setGroupProperty(PropertyInterface("Position",we)),Pe.s.setGroupProperty(PropertyInterface("Size",we)),Pe.r.setGroupProperty(PropertyInterface("Rotation",we)),Object.defineProperties(Te,{position:{get:ExpressionPropertyInterface(Pe.p)},roundness:{get:ExpressionPropertyInterface(Pe.r)},size:{get:ExpressionPropertyInterface(Pe.s)},_name:{value:Ee.nm}}),Te.mn=Ee.mn,Te}function _e(Ee,Ae,Re){function Te(Ie){return Ee.r.ix===Ie||Ie==="Round Corners 1"?Te.radius:null}var we=propertyGroupFactory(Te,Re),Pe=Ae;return Te.propertyIndex=Ee.ix,Pe.rd.setGroupProperty(PropertyInterface("Radius",we)),Object.defineProperties(Te,{radius:{get:ExpressionPropertyInterface(Pe.rd)},_name:{value:Ee.nm}}),Te.mn=Ee.mn,Te}function Se(Ee,Ae,Re){function Te(Ie){return Ee.c.ix===Ie||Ie==="Copies"?Te.copies:Ee.o.ix===Ie||Ie==="Offset"?Te.offset:null}var we=propertyGroupFactory(Te,Re),Pe=Ae;return Te.propertyIndex=Ee.ix,Pe.c.setGroupProperty(PropertyInterface("Copies",we)),Pe.o.setGroupProperty(PropertyInterface("Offset",we)),Object.defineProperties(Te,{copies:{get:ExpressionPropertyInterface(Pe.c)},offset:{get:ExpressionPropertyInterface(Pe.o)},_name:{value:Ee.nm}}),Te.mn=Ee.mn,Te}return function(Ee,Ae,Re){var Te;function we(Ie){if(typeof Ie=="number")return Ie=Ie===void 0?1:Ie,Ie===0?Re:Te[Ie-1];for(var Fe=0,Oe=Te.length;Fe<Oe;){if(Te[Fe]._name===Ie)return Te[Fe];Fe+=1}return null}function Pe(){return Re}return we.propertyGroup=propertyGroupFactory(we,Pe),Te=C(Ee,Ae,we.propertyGroup),we.numProperties=Te.length,we._name="Contents",we}}(),TextExpressionInterface=function(){return function(C){var E;function I(B){switch(B){case"ADBE Text Document":return I.sourceText;default:return null}}return Object.defineProperty(I,"sourceText",{get:function(){C.textProperty.getValue();var U=C.textProperty.currentData.t;return(!E||U!==E.value)&&(E=new String(U),E.value=U||new String(U),Object.defineProperty(E,"style",{get:function(){return{fillColor:C.textProperty.currentData.fc}}})),E}}),I}}();function _typeof(C){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(I){return typeof I}:_typeof=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},_typeof(C)}var FootageInterface=function(){var C=function(B){var U="",V=B.getFootageData();function X(){return U="",V=B.getFootageData(),Y}function Y(K){if(V[K])return U=K,V=V[K],_typeof(V)==="object"?Y:V;var J=K.indexOf(U);if(J!==-1){var xe=parseInt(K.substr(J+U.length),10);return V=V[xe],_typeof(V)==="object"?Y:V}return""}return X},E=function(B){function U(V){return V==="Outline"?U.outlineInterface():null}return U._name="Outline",U.outlineInterface=C(B),U};return function(I){function B(U){return U==="Data"?B.dataInterface:null}return B._name="Data",B.dataInterface=E(I),B}}(),interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(C){return interfaces[C]||null}var expressionHelpers=function(){function C(X,Y,K){Y.x&&(K.k=!0,K.x=!0,K.initiateExpression=ExpressionManager.initiateExpression,K.effectsSequence.push(K.initiateExpression(X,Y,K).bind(K)))}function E(X){return X*=this.elem.globalData.frameRate,X-=this.offsetTime,X!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<X?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(X,this._cachingAtTime),this._cachingAtTime.lastFrame=X),this._cachingAtTime.value}function I(X){var Y=-.01,K=this.getValueAtTime(X),J=this.getValueAtTime(X+Y),xe=0;if(K.length){var Z;for(Z=0;Z<K.length;Z+=1)xe+=Math.pow(J[Z]-K[Z],2);xe=Math.sqrt(xe)*100}else xe=0;return xe}function B(X){if(this.vel!==void 0)return this.vel;var Y=-.001,K=this.getValueAtTime(X),J=this.getValueAtTime(X+Y),xe;if(K.length){xe=createTypedArray("float32",K.length);var Z;for(Z=0;Z<K.length;Z+=1)xe[Z]=(J[Z]-K[Z])/Y}else xe=(J-K)/Y;return xe}function U(){return this.pv}function V(X){this.propertyGroup=X}return{searchExpressions:C,getSpeedAtTime:I,getVelocityAtTime:B,getValueAtTime:E,getStaticValueAtTime:U,setGroupProperty:V}}();function addPropertyDecorator(){function C(_e,Se,Ee){if(!this.k||!this.keyframes)return this.pv;_e=_e?_e.toLowerCase():"";var Ae=this.comp.renderedFrame,Re=this.keyframes,Te=Re[Re.length-1].t;if(Ae<=Te)return this.pv;var we,Pe;Ee?(Se?we=Math.abs(Te-this.elem.comp.globalData.frameRate*Se):we=Math.max(0,Te-this.elem.data.ip),Pe=Te-we):((!Se||Se>Re.length-1)&&(Se=Re.length-1),Pe=Re[Re.length-1-Se].t,we=Te-Pe);var Ie,Fe,Oe;if(_e==="pingpong"){var Le=Math.floor((Ae-Pe)/we);if(Le%2!==0)return this.getValueAtTime((we-(Ae-Pe)%we+Pe)/this.comp.globalData.frameRate,0)}else if(_e==="offset"){var $e=this.getValueAtTime(Pe/this.comp.globalData.frameRate,0),Ve=this.getValueAtTime(Te/this.comp.globalData.frameRate,0),Xe=this.getValueAtTime(((Ae-Pe)%we+Pe)/this.comp.globalData.frameRate,0),Ue=Math.floor((Ae-Pe)/we);if(this.pv.length){for(Oe=new Array($e.length),Fe=Oe.length,Ie=0;Ie<Fe;Ie+=1)Oe[Ie]=(Ve[Ie]-$e[Ie])*Ue+Xe[Ie];return Oe}return(Ve-$e)*Ue+Xe}else if(_e==="continue"){var We=this.getValueAtTime(Te/this.comp.globalData.frameRate,0),je=this.getValueAtTime((Te-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(Oe=new Array(We.length),Fe=Oe.length,Ie=0;Ie<Fe;Ie+=1)Oe[Ie]=We[Ie]+(We[Ie]-je[Ie])*((Ae-Te)/this.comp.globalData.frameRate)/5e-4;return Oe}return We+(We-je)*((Ae-Te)/.001)}return this.getValueAtTime(((Ae-Pe)%we+Pe)/this.comp.globalData.frameRate,0)}function E(_e,Se,Ee){if(!this.k)return this.pv;_e=_e?_e.toLowerCase():"";var Ae=this.comp.renderedFrame,Re=this.keyframes,Te=Re[0].t;if(Ae>=Te)return this.pv;var we,Pe;Ee?(Se?we=Math.abs(this.elem.comp.globalData.frameRate*Se):we=Math.max(0,this.elem.data.op-Te),Pe=Te+we):((!Se||Se>Re.length-1)&&(Se=Re.length-1),Pe=Re[Se].t,we=Pe-Te);var Ie,Fe,Oe;if(_e==="pingpong"){var Le=Math.floor((Te-Ae)/we);if(Le%2===0)return this.getValueAtTime(((Te-Ae)%we+Te)/this.comp.globalData.frameRate,0)}else if(_e==="offset"){var $e=this.getValueAtTime(Te/this.comp.globalData.frameRate,0),Ve=this.getValueAtTime(Pe/this.comp.globalData.frameRate,0),Xe=this.getValueAtTime((we-(Te-Ae)%we+Te)/this.comp.globalData.frameRate,0),Ue=Math.floor((Te-Ae)/we)+1;if(this.pv.length){for(Oe=new Array($e.length),Fe=Oe.length,Ie=0;Ie<Fe;Ie+=1)Oe[Ie]=Xe[Ie]-(Ve[Ie]-$e[Ie])*Ue;return Oe}return Xe-(Ve-$e)*Ue}else if(_e==="continue"){var We=this.getValueAtTime(Te/this.comp.globalData.frameRate,0),je=this.getValueAtTime((Te+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(Oe=new Array(We.length),Fe=Oe.length,Ie=0;Ie<Fe;Ie+=1)Oe[Ie]=We[Ie]+(We[Ie]-je[Ie])*(Te-Ae)/.001;return Oe}return We+(We-je)*(Te-Ae)/.001}return this.getValueAtTime((we-((Te-Ae)%we+Te))/this.comp.globalData.frameRate,0)}function I(_e,Se){if(!this.k)return this.pv;if(_e=(_e||.4)*.5,Se=Math.floor(Se||5),Se<=1)return this.pv;var Ee=this.comp.renderedFrame/this.comp.globalData.frameRate,Ae=Ee-_e,Re=Ee+_e,Te=Se>1?(Re-Ae)/(Se-1):1,we=0,Pe=0,Ie;this.pv.length?Ie=createTypedArray("float32",this.pv.length):Ie=0;for(var Fe;we<Se;){if(Fe=this.getValueAtTime(Ae+we*Te),this.pv.length)for(Pe=0;Pe<this.pv.length;Pe+=1)Ie[Pe]+=Fe[Pe];else Ie+=Fe;we+=1}if(this.pv.length)for(Pe=0;Pe<this.pv.length;Pe+=1)Ie[Pe]/=Se;else Ie/=Se;return Ie}function B(_e){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var Se=this._transformCachingAtTime.v;if(Se.cloneFromProps(this.pre.props),this.appliedTransformations<1){var Ee=this.a.getValueAtTime(_e);Se.translate(-Ee[0]*this.a.mult,-Ee[1]*this.a.mult,Ee[2]*this.a.mult)}if(this.appliedTransformations<2){var Ae=this.s.getValueAtTime(_e);Se.scale(Ae[0]*this.s.mult,Ae[1]*this.s.mult,Ae[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var Re=this.sk.getValueAtTime(_e),Te=this.sa.getValueAtTime(_e);Se.skewFromAxis(-Re*this.sk.mult,Te*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var we=this.r.getValueAtTime(_e);Se.rotate(-we*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var Pe=this.rz.getValueAtTime(_e),Ie=this.ry.getValueAtTime(_e),Fe=this.rx.getValueAtTime(_e),Oe=this.or.getValueAtTime(_e);Se.rotateZ(-Pe*this.rz.mult).rotateY(Ie*this.ry.mult).rotateX(Fe*this.rx.mult).rotateZ(-Oe[2]*this.or.mult).rotateY(Oe[1]*this.or.mult).rotateX(Oe[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var Le=this.px.getValueAtTime(_e),$e=this.py.getValueAtTime(_e);if(this.data.p.z){var Ve=this.pz.getValueAtTime(_e);Se.translate(Le*this.px.mult,$e*this.py.mult,-Ve*this.pz.mult)}else Se.translate(Le*this.px.mult,$e*this.py.mult,0)}else{var Xe=this.p.getValueAtTime(_e);Se.translate(Xe[0]*this.p.mult,Xe[1]*this.p.mult,-Xe[2]*this.p.mult)}return Se}function U(){return this.v.clone(new Matrix)}var V=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(_e,Se,Ee){var Ae=V(_e,Se,Ee);return Ae.dynamicProperties.length?Ae.getValueAtTime=B.bind(Ae):Ae.getValueAtTime=U.bind(Ae),Ae.setGroupProperty=expressionHelpers.setGroupProperty,Ae};var X=PropertyFactory.getProp;PropertyFactory.getProp=function(_e,Se,Ee,Ae,Re){var Te=X(_e,Se,Ee,Ae,Re);Te.kf?Te.getValueAtTime=expressionHelpers.getValueAtTime.bind(Te):Te.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(Te),Te.setGroupProperty=expressionHelpers.setGroupProperty,Te.loopOut=C,Te.loopIn=E,Te.smooth=I,Te.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(Te),Te.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(Te),Te.numKeys=Se.a===1?Se.k.length:0,Te.propertyIndex=Se.ix;var we=0;return Ee!==0&&(we=createTypedArray("float32",Se.a===1?Se.k[0].s.length:Se.k.length)),Te._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:we},expressionHelpers.searchExpressions(_e,Se,Te),Te.k&&Re.addDynamicProperty(Te),Te};function Y(_e){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),_e*=this.elem.globalData.frameRate,_e-=this.offsetTime,_e!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<_e?this._caching.lastIndex:0,this._cachingAtTime.lastTime=_e,this.interpolateShape(_e,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue}var K=ShapePropertyFactory.getConstructorFunction(),J=ShapePropertyFactory.getKeyframedConstructorFunction();function xe(){}xe.prototype={vertices:function(Se,Ee){this.k&&this.getValue();var Ae=this.v;Ee!==void 0&&(Ae=this.getValueAtTime(Ee,0));var Re,Te=Ae._length,we=Ae[Se],Pe=Ae.v,Ie=createSizedArray(Te);for(Re=0;Re<Te;Re+=1)Se==="i"||Se==="o"?Ie[Re]=[we[Re][0]-Pe[Re][0],we[Re][1]-Pe[Re][1]]:Ie[Re]=[we[Re][0],we[Re][1]];return Ie},points:function(Se){return this.vertices("v",Se)},inTangents:function(Se){return this.vertices("i",Se)},outTangents:function(Se){return this.vertices("o",Se)},isClosed:function(){return this.v.c},pointOnPath:function(Se,Ee){var Ae=this.v;Ee!==void 0&&(Ae=this.getValueAtTime(Ee,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(Ae));for(var Re=this._segmentsLength,Te=Re.lengths,we=Re.totalLength*Se,Pe=0,Ie=Te.length,Fe=0,Oe;Pe<Ie;){if(Fe+Te[Pe].addedLength>we){var Le=Pe,$e=Ae.c&&Pe===Ie-1?0:Pe+1,Ve=(we-Fe)/Te[Pe].addedLength;Oe=bez.getPointInSegment(Ae.v[Le],Ae.v[$e],Ae.o[Le],Ae.i[$e],Ve,Te[Pe]);break}else Fe+=Te[Pe].addedLength;Pe+=1}return Oe||(Oe=Ae.c?[Ae.v[0][0],Ae.v[0][1]]:[Ae.v[Ae._length-1][0],Ae.v[Ae._length-1][1]]),Oe},vectorOnPath:function(Se,Ee,Ae){Se==1?Se=this.v.c:Se==0&&(Se=.999);var Re=this.pointOnPath(Se,Ee),Te=this.pointOnPath(Se+.001,Ee),we=Te[0]-Re[0],Pe=Te[1]-Re[1],Ie=Math.sqrt(Math.pow(we,2)+Math.pow(Pe,2));if(Ie===0)return[0,0];var Fe=Ae==="tangent"?[we/Ie,Pe/Ie]:[-Pe/Ie,we/Ie];return Fe},tangentOnPath:function(Se,Ee){return this.vectorOnPath(Se,Ee,"tangent")},normalOnPath:function(Se,Ee){return this.vectorOnPath(Se,Ee,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([xe],K),extendPrototype([xe],J),J.prototype.getValueAtTime=Y,J.prototype.initiateExpression=ExpressionManager.initiateExpression;var Z=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(_e,Se,Ee,Ae,Re){var Te=Z(_e,Se,Ee,Ae,Re);return Te.propertyIndex=Se.ix,Te.lock=!1,Ee===3?expressionHelpers.searchExpressions(_e,Se.pt,Te):Ee===4&&expressionHelpers.searchExpressions(_e,Se.ks,Te),Te.k&&_e.addDynamicProperty(Te),Te}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function C(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}TextProperty.prototype.getExpressionValue=function(E,I){var B=this.calculateExpression(I);if(E.t!==B){var U={};return this.copyData(U,E),U.t=B.toString(),U.__complete=!1,U}return E},TextProperty.prototype.searchProperty=function(){var E=this.searchKeyframes(),I=this.searchExpressions();return this.kf=E||I,this.kf},TextProperty.prototype.searchExpressions=C}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function C(E,I){var B=createNS("feMerge");B.setAttribute("result",E);var U,V;for(V=0;V<I.length;V+=1)U=createNS("feMergeNode"),U.setAttribute("in",I[V]),B.appendChild(U),B.appendChild(U);return B}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(C,E,I,B,U){this.filterManager=E;var V=createNS("feColorMatrix");V.setAttribute("type","matrix"),V.setAttribute("color-interpolation-filters","linearRGB"),V.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=V,V.setAttribute("result",B+"_tint_1"),C.appendChild(V),V=createNS("feColorMatrix"),V.setAttribute("type","matrix"),V.setAttribute("color-interpolation-filters","sRGB"),V.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),V.setAttribute("result",B+"_tint_2"),C.appendChild(V),this.matrixFilter=V;var X=this.createMergeNode(B,[U,B+"_tint_1",B+"_tint_2"]);C.appendChild(X)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(C){if(C||this.filterManager._mdf){var E=this.filterManager.effectElements[0].p.v,I=this.filterManager.effectElements[1].p.v,B=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+B+" 0"),this.matrixFilter.setAttribute("values",I[0]-E[0]+" 0 0 0 "+E[0]+" "+(I[1]-E[1])+" 0 0 0 "+E[1]+" "+(I[2]-E[2])+" 0 0 0 "+E[2]+" 0 0 0 1 0")}};function SVGFillFilter(C,E,I,B){this.filterManager=E;var U=createNS("feColorMatrix");U.setAttribute("type","matrix"),U.setAttribute("color-interpolation-filters","sRGB"),U.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),U.setAttribute("result",B),C.appendChild(U),this.matrixFilter=U}SVGFillFilter.prototype.renderFrame=function(C){if(C||this.filterManager._mdf){var E=this.filterManager.effectElements[2].p.v,I=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+E[0]+" 0 0 0 0 "+E[1]+" 0 0 0 0 "+E[2]+" 0 0 0 "+I+" 0")}};function SVGStrokeEffect(C,E,I){this.initialized=!1,this.filterManager=E,this.elem=I,this.paths=[]}SVGStrokeEffect.prototype.initialize=function(){var C=this.elem.layerElement.children||this.elem.layerElement.childNodes,E,I,B,U;for(this.filterManager.effectElements[1].p.v===1?(U=this.elem.maskManager.masksProperties.length,B=0):(B=this.filterManager.effectElements[0].p.v-1,U=B+1),I=createNS("g"),I.setAttribute("fill","none"),I.setAttribute("stroke-linecap","round"),I.setAttribute("stroke-dashoffset",1),B;B<U;B+=1)E=createNS("path"),I.appendChild(E),this.paths.push({p:E,m:B});if(this.filterManager.effectElements[10].p.v===3){var V=createNS("mask"),X=createElementID();V.setAttribute("id",X),V.setAttribute("mask-type","alpha"),V.appendChild(I),this.elem.globalData.defs.appendChild(V);var Y=createNS("g");for(Y.setAttribute("mask","url("+getLocationHref()+"#"+X+")");C[0];)Y.appendChild(C[0]);this.elem.layerElement.appendChild(Y),this.masker=V,I.setAttribute("stroke","#fff")}else if(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2){if(this.filterManager.effectElements[10].p.v===2)for(C=this.elem.layerElement.children||this.elem.layerElement.childNodes;C.length;)this.elem.layerElement.removeChild(C[0]);this.elem.layerElement.appendChild(I),this.elem.layerElement.removeAttribute("mask"),I.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=I},SVGStrokeEffect.prototype.renderFrame=function(C){this.initialized||this.initialize();var E,I=this.paths.length,B,U;for(E=0;E<I;E+=1)if(this.paths[E].m!==-1&&(B=this.elem.maskManager.viewData[this.paths[E].m],U=this.paths[E].p,(C||this.filterManager._mdf||B.prop._mdf)&&U.setAttribute("d",B.lastPath),C||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||B.prop._mdf)){var V;if(this.filterManager.effectElements[7].p.v!==0||this.filterManager.effectElements[8].p.v!==100){var X=Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,Y=Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)*.01,K=U.getTotalLength();V="0 0 0 "+K*X+" ";var J=K*(Y-X),xe=1+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01,Z=Math.floor(J/xe),_e;for(_e=0;_e<Z;_e+=1)V+="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01+" ";V+="0 "+K*10+" 0 0"}else V="1 "+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v*.01;U.setAttribute("stroke-dasharray",V)}if((C||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",this.filterManager.effectElements[4].p.v*2),(C||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(this.filterManager.effectElements[10].p.v===1||this.filterManager.effectElements[10].p.v===2)&&(C||this.filterManager.effectElements[3].p._mdf)){var Se=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(Se[0]*255)+","+bmFloor(Se[1]*255)+","+bmFloor(Se[2]*255)+")")}};function SVGTritoneFilter(C,E,I,B){this.filterManager=E;var U=createNS("feColorMatrix");U.setAttribute("type","matrix"),U.setAttribute("color-interpolation-filters","linearRGB"),U.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),C.appendChild(U);var V=createNS("feComponentTransfer");V.setAttribute("color-interpolation-filters","sRGB"),V.setAttribute("result",B),this.matrixFilter=V;var X=createNS("feFuncR");X.setAttribute("type","table"),V.appendChild(X),this.feFuncR=X;var Y=createNS("feFuncG");Y.setAttribute("type","table"),V.appendChild(Y),this.feFuncG=Y;var K=createNS("feFuncB");K.setAttribute("type","table"),V.appendChild(K),this.feFuncB=K,C.appendChild(V)}SVGTritoneFilter.prototype.renderFrame=function(C){if(C||this.filterManager._mdf){var E=this.filterManager.effectElements[0].p.v,I=this.filterManager.effectElements[1].p.v,B=this.filterManager.effectElements[2].p.v,U=B[0]+" "+I[0]+" "+E[0],V=B[1]+" "+I[1]+" "+E[1],X=B[2]+" "+I[2]+" "+E[2];this.feFuncR.setAttribute("tableValues",U),this.feFuncG.setAttribute("tableValues",V),this.feFuncB.setAttribute("tableValues",X)}};function SVGProLevelsFilter(C,E,I,B){this.filterManager=E;var U=this.filterManager.effectElements,V=createNS("feComponentTransfer");(U[10].p.k||U[10].p.v!==0||U[11].p.k||U[11].p.v!==1||U[12].p.k||U[12].p.v!==1||U[13].p.k||U[13].p.v!==0||U[14].p.k||U[14].p.v!==1)&&(this.feFuncR=this.createFeFunc("feFuncR",V)),(U[17].p.k||U[17].p.v!==0||U[18].p.k||U[18].p.v!==1||U[19].p.k||U[19].p.v!==1||U[20].p.k||U[20].p.v!==0||U[21].p.k||U[21].p.v!==1)&&(this.feFuncG=this.createFeFunc("feFuncG",V)),(U[24].p.k||U[24].p.v!==0||U[25].p.k||U[25].p.v!==1||U[26].p.k||U[26].p.v!==1||U[27].p.k||U[27].p.v!==0||U[28].p.k||U[28].p.v!==1)&&(this.feFuncB=this.createFeFunc("feFuncB",V)),(U[31].p.k||U[31].p.v!==0||U[32].p.k||U[32].p.v!==1||U[33].p.k||U[33].p.v!==1||U[34].p.k||U[34].p.v!==0||U[35].p.k||U[35].p.v!==1)&&(this.feFuncA=this.createFeFunc("feFuncA",V)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(V.setAttribute("color-interpolation-filters","sRGB"),C.appendChild(V)),(U[3].p.k||U[3].p.v!==0||U[4].p.k||U[4].p.v!==1||U[5].p.k||U[5].p.v!==1||U[6].p.k||U[6].p.v!==0||U[7].p.k||U[7].p.v!==1)&&(V=createNS("feComponentTransfer"),V.setAttribute("color-interpolation-filters","sRGB"),V.setAttribute("result",B),C.appendChild(V),this.feFuncRComposed=this.createFeFunc("feFuncR",V),this.feFuncGComposed=this.createFeFunc("feFuncG",V),this.feFuncBComposed=this.createFeFunc("feFuncB",V))}SVGProLevelsFilter.prototype.createFeFunc=function(C,E){var I=createNS(C);return I.setAttribute("type","table"),E.appendChild(I),I},SVGProLevelsFilter.prototype.getTableValue=function(C,E,I,B,U){for(var V=0,X=256,Y,K=Math.min(C,E),J=Math.max(C,E),xe=Array.call(null,{length:X}),Z,_e=0,Se=U-B,Ee=E-C;V<=256;)Y=V/256,Y<=K?Z=Ee<0?U:B:Y>=J?Z=Ee<0?B:U:Z=B+Se*Math.pow((Y-C)/Ee,1/I),xe[_e]=Z,_e+=1,V+=256/(X-1);return xe.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(C){if(C||this.filterManager._mdf){var E,I=this.filterManager.effectElements;this.feFuncRComposed&&(C||I[3].p._mdf||I[4].p._mdf||I[5].p._mdf||I[6].p._mdf||I[7].p._mdf)&&(E=this.getTableValue(I[3].p.v,I[4].p.v,I[5].p.v,I[6].p.v,I[7].p.v),this.feFuncRComposed.setAttribute("tableValues",E),this.feFuncGComposed.setAttribute("tableValues",E),this.feFuncBComposed.setAttribute("tableValues",E)),this.feFuncR&&(C||I[10].p._mdf||I[11].p._mdf||I[12].p._mdf||I[13].p._mdf||I[14].p._mdf)&&(E=this.getTableValue(I[10].p.v,I[11].p.v,I[12].p.v,I[13].p.v,I[14].p.v),this.feFuncR.setAttribute("tableValues",E)),this.feFuncG&&(C||I[17].p._mdf||I[18].p._mdf||I[19].p._mdf||I[20].p._mdf||I[21].p._mdf)&&(E=this.getTableValue(I[17].p.v,I[18].p.v,I[19].p.v,I[20].p.v,I[21].p.v),this.feFuncG.setAttribute("tableValues",E)),this.feFuncB&&(C||I[24].p._mdf||I[25].p._mdf||I[26].p._mdf||I[27].p._mdf||I[28].p._mdf)&&(E=this.getTableValue(I[24].p.v,I[25].p.v,I[26].p.v,I[27].p.v,I[28].p.v),this.feFuncB.setAttribute("tableValues",E)),this.feFuncA&&(C||I[31].p._mdf||I[32].p._mdf||I[33].p._mdf||I[34].p._mdf||I[35].p._mdf)&&(E=this.getTableValue(I[31].p.v,I[32].p.v,I[33].p.v,I[34].p.v,I[35].p.v),this.feFuncA.setAttribute("tableValues",E))}};function SVGDropShadowEffect(C,E,I,B,U){var V=E.container.globalData.renderConfig.filterSize,X=E.data.fs||V;C.setAttribute("x",X.x||V.x),C.setAttribute("y",X.y||V.y),C.setAttribute("width",X.width||V.width),C.setAttribute("height",X.height||V.height),this.filterManager=E;var Y=createNS("feGaussianBlur");Y.setAttribute("in","SourceAlpha"),Y.setAttribute("result",B+"_drop_shadow_1"),Y.setAttribute("stdDeviation","0"),this.feGaussianBlur=Y,C.appendChild(Y);var K=createNS("feOffset");K.setAttribute("dx","25"),K.setAttribute("dy","0"),K.setAttribute("in",B+"_drop_shadow_1"),K.setAttribute("result",B+"_drop_shadow_2"),this.feOffset=K,C.appendChild(K);var J=createNS("feFlood");J.setAttribute("flood-color","#00ff00"),J.setAttribute("flood-opacity","1"),J.setAttribute("result",B+"_drop_shadow_3"),this.feFlood=J,C.appendChild(J);var xe=createNS("feComposite");xe.setAttribute("in",B+"_drop_shadow_3"),xe.setAttribute("in2",B+"_drop_shadow_2"),xe.setAttribute("operator","in"),xe.setAttribute("result",B+"_drop_shadow_4"),C.appendChild(xe);var Z=this.createMergeNode(B,[B+"_drop_shadow_4",U]);C.appendChild(Z)}extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(C){if(C||this.filterManager._mdf){if((C||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),C||this.filterManager.effectElements[0].p._mdf){var E=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(E[0]*255),Math.round(E[1]*255),Math.round(E[2]*255)))}if((C||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),C||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var I=this.filterManager.effectElements[3].p.v,B=(this.filterManager.effectElements[2].p.v-90)*degToRads,U=I*Math.cos(B),V=I*Math.sin(B);this.feOffset.setAttribute("dx",U),this.feOffset.setAttribute("dy",V)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(C,E,I){this.initialized=!1,this.filterManager=E,this.filterElem=C,this.elem=I,I.matteElement=createNS("g"),I.matteElement.appendChild(I.layerElement),I.matteElement.appendChild(I.transformedElement),I.baseElement=I.matteElement}SVGMatte3Effect.prototype.findSymbol=function(C){for(var E=0,I=_svgMatteSymbols.length;E<I;){if(_svgMatteSymbols[E]===C)return _svgMatteSymbols[E];E+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(C,E){var I=C.layerElement.parentNode;if(I){for(var B=I.children,U=0,V=B.length;U<V&&B[U]!==C.layerElement;)U+=1;var X;U<=V-2&&(X=B[U+1]);var Y=createNS("use");Y.setAttribute("href","#"+E),X?I.insertBefore(Y,X):I.appendChild(Y)}},SVGMatte3Effect.prototype.setElementAsMask=function(C,E){if(!this.findSymbol(E)){var I=createElementID(),B=createNS("mask");B.setAttribute("id",E.layerId),B.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(E);var U=C.globalData.defs;U.appendChild(B);var V=createNS("symbol");V.setAttribute("id",I),this.replaceInParent(E,I),V.appendChild(E.layerElement),U.appendChild(V);var X=createNS("use");X.setAttribute("href","#"+I),B.appendChild(X),E.data.hd=!1,E.show()}C.setMatte(E.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var C=this.filterManager.effectElements[0].p.v,E=this.elem.comp.elements,I=0,B=E.length;I<B;)E[I]&&E[I].data.ind===C&&this.setElementAsMask(this.elem,E[I]),I+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()};function SVGGaussianBlurEffect(C,E,I,B){C.setAttribute("x","-100%"),C.setAttribute("y","-100%"),C.setAttribute("width","300%"),C.setAttribute("height","300%"),this.filterManager=E;var U=createNS("feGaussianBlur");U.setAttribute("result",B),C.appendChild(U),this.feGaussianBlur=U}SVGGaussianBlurEffect.prototype.renderFrame=function(C){if(C||this.filterManager._mdf){var E=.3,I=this.filterManager.effectElements[0].p.v*E,B=this.filterManager.effectElements[1].p.v,U=B==3?0:I,V=B==2?0:I;this.feGaussianBlur.setAttribute("stdDeviation",U+" "+V);var X=this.filterManager.effectElements[2].p.v==1?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",X)}};function TransformEffect(){}TransformEffect.prototype.init=function(C){this.effectsManager=C,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(C){if(this._opMdf=!1,this._mdf=!1,C||this.effectsManager._mdf){var E=this.effectsManager.effectElements,I=E[0].p.v,B=E[1].p.v,U=E[2].p.v===1,V=E[3].p.v,X=U?V:E[4].p.v,Y=E[5].p.v,K=E[6].p.v,J=E[7].p.v;this.matrix.reset(),this.matrix.translate(-I[0],-I[1],I[2]),this.matrix.scale(X*.01,V*.01,1),this.matrix.rotate(-J*degToRads),this.matrix.skewFromAxis(-Y*degToRads,(K+90)*degToRads),this.matrix.translate(B[0],B[1],0),this._mdf=!0,this.opacity!==E[8].p.v&&(this.opacity=E[8].p.v,this._opMdf=!0)}};function SVGTransformEffect(C,E){this.init(E)}extendPrototype([TransformEffect],SVGTransformEffect);function CVTransformEffect(C){this.init(C)}return extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie})})(lottie$1,lottie$1.exports);var lottieExports=lottie$1.exports;const lottie=getDefaultExportFromCjs(lottieExports),initialState={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},PixiLottieSprite=React__namespace.forwardRef((C,E)=>{const[I,B]=React__namespace.useState(0),[U,V]=React__namespace.useState(!1),X=React__namespace.useRef(null),Y=React__namespace.useRef(null),K=React__namespace.useRef(),J=React__namespace.useRef(),xe=React.useRef(),Z=React.useRef(initialState),_e=React__namespace.useRef(),Se=React.useRef(document.body),{uniqueId:Ee,src:Ae,startAt:Re,endAt:Te,frameStartAt:we,frameEndAt:Pe,visible:Ie,disabled:Fe,loop:Oe=!1,transformation:{x:Le,y:$e,width:Ve,height:Xe,colorCorrection:Ue={}},pointerdown:We=()=>{},pointerout:je=()=>{},pointerover:ze=()=>{}}=C,{tl:He}=React.useContext(GsapPixieContext);useCustomEventListener(Events.PAUSE,()=>{J.current&&J.current.pause()});const{onPointerDown:De,onPointerOut:Ne,onPointerOver:Me}=useDebouncedPointerEvents(ze,We,je,1),{blurRadius:ke=0,vignette:Ge=0,noise:Be=0}=Ue,{temperatureFilter:qe,sharpnessFilter:Ke,hueFilter:Ye,blurFilter:tt,adjustmentFilter:et,vignetteFilter:it,noiseFilter:nt}=withFiltersHook(Ue);React__namespace.useLayoutEffect(()=>{K.current=document.createElement("canvas"),K.current.setAttribute("id","lottieContainersvg"),K.current.setAttribute("id",`${Ee}lottieContainer`),K.current.setAttribute("width",`${Ve}`),K.current.setAttribute("height",`${Xe}`);const Ze=Se.current;return Ze.appendChild(K.current),()=>{K.current&&Ze.removeChild(K.current)}},[]),React__namespace.useEffect(()=>{async function Ze(){J.current&&J.current.destroy(),K.current.removeAttribute("style"),J.current=lottie.loadAnimation({container:K.current||document.getElementById("lottieroot"),renderer:"canvas",loop:!1,autoplay:!1,path:Ae,rendererSettings:{context:K.current.getContext("2d"),clearCanvas:!0,progressiveLoad:!1,preserveAspectRatio:"xMaxYMax meet"}}),J.current.addEventListener("data_ready",()=>{if(K.current&&K.current.setAttribute("style","display:none"),J.current&&J.current.renderer.canvasContext){const Je=J.current.totalFrames;Z.current.totalFrames=Je;const st=J.current.getDuration();Z.current.totalDuration=st;const rt=J.current.renderer.canvasContext.canvas,Qe=PIXI__namespace.Texture.from(rt);_e.current=Qe,V(!0),B(st)}}),J.current.addEventListener("loaded_images",()=>{}),J.current.addEventListener("complete",()=>{}),J.current.addEventListener("loopComplete",()=>{}),J.current.addEventListener("enterFrame",()=>{}),J.current.addEventListener("config_ready",()=>{console.log("config_ready",J.current)}),J.current.addEventListener("error",Je=>{console.log("error",Je)})}return Ze(),()=>{J.current&&(J.current.removeEventListener("complete"),J.current.removeEventListener("config_ready"),J.current.removeEventListener("enterFrame"),J.current.removeEventListener("loaded_images"),J.current.removeEventListener("loopComplete"),J.current.removeEventListener("data_ready"),J.current.removeEventListener("error"),J.current.destroy())}},[Ae,Ee]),React__namespace.useEffect(()=>(_e.current&&_e.current.update(),()=>{}),[U]);const ot=Ze=>{if(J.current&&X.current&&xe.current){const st=Ze(xe.current.time())/xe.current.duration()*Z.current.totalFrames,rt=Z.current.totalFrames;let Qe=st;Qe=Math.round(Math.floor(Qe)),Qe>=rt?(J.current.goToAndStop(0,!0),_e.current&&_e.current.update(),Z.current.isPlaying=!1):(J.current.goToAndStop(Qe,!0),_e.current&&_e.current.update(),Z.current.isPlaying=!0)}};return React__namespace.useEffect(()=>{let Ze=gsap$2.context(()=>{});if(Y.current&&He.current&&I>0){const Je=Number(Te)-Number(Re);xe.current&&(xe.current.kill(),He.current.remove(xe.current)),Ze=gsap$2.context(()=>{const st=gsap$2.utils.wrap(Re,I);xe.current=gsap$2.timeline({}).to(Y.current,{duration:Number(Je),onUpdate:ot,onUpdateParams:[st,we,Pe]},we),He.current.add(xe.current,Re)})}return()=>{xe.current&&(xe.current.kill(),gsap$2.killTweensOf(xe.current)),Ze.revert()}},[Re,Te,we,Pe,Ee,I,Oe]),jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,ignoreTlForVideo:!0,pointerdown:De,pointerover:Me,pointerout:Ne,children:jsxRuntimeExports.jsx(react.Container,{ref:Y,children:_e.current&&jsxRuntimeExports.jsx(react.Sprite,{texture:_e.current,width:Ve,height:Xe,anchor:.5,x:Le,y:$e,ref:X,alpha:Ie?1:0,...!Fe&&Ie&&{interactive:!0,pointerdown:We},filters:[qe,Ke,Ye,et,...ke>0?[tt]:[],...Ge>0?[it]:[],...Be>0?[nt]:[]]})})})});PixiLottieSprite.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiLottieSprite"};var BlendModes=(C=>(C[C.NORMAL=0]="NORMAL",C[C.ADD=1]="ADD",C[C.MULTIPLY=2]="MULTIPLY",C[C.SCREEN=3]="SCREEN",C[C.OVERLAY=4]="OVERLAY",C[C.DARKEN=5]="DARKEN",C[C.LIGHTEN=6]="LIGHTEN",C[C.COLOR_DODGE=7]="COLOR_DODGE",C[C.COLOR_BURN=8]="COLOR_BURN",C[C.HARD_LIGHT=9]="HARD_LIGHT",C[C.SOFT_LIGHT=10]="SOFT_LIGHT",C[C.DIFFERENCE=11]="DIFFERENCE",C[C.EXCLUSION=12]="EXCLUSION",C[C.HUE=13]="HUE",C[C.SATURATION=14]="SATURATION",C[C.COLOR=15]="COLOR",C[C.LUMINOSITY=16]="LUMINOSITY",C))(BlendModes||{});exports.Animations=Animations,exports.BlendModes=BlendModes,exports.Events=Events,exports.GsapPixieContext=GsapPixieContext,exports.GsapPixieContextProvider=GsapPixieContextProvider,exports.PixiAnimatedSprite=PixiAnimatedSprite,exports.PixiAudioSprite=PixiAudioSprite,exports.PixiGifSprite=PixiGifSprite,exports.PixiImageSprite=PixiImageSprite,exports.PixiLottieSprite=PixiLottieSprite,exports.PixiRemotionSprite=PixiRemotionSprite,exports.PixiSequence=PixiSequence,exports.PixiSequenceWrapper=PixiSequenceWrapper,exports.PixiSvgPathSprite=PixiSvgPathSprite,exports.PixiTextSprite=PixiTextSprite,exports.PixiVideoCanvasSyncSprite=PixiVideoCanvasSyncSprite,exports.PixiVideoSprite=PixiVideoSprite,exports.emitCustomEvent=emitCustomEvent,exports.newCustomEventEmitter=newCustomEventEmitter,exports.useCustomEventListener=useCustomEventListener,exports.useGsapEffect=useGsapEffect,Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})});