reacthub-pixitweenjs 0.2.107-alpha.107 → 0.2.107-alpha.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Chroma Software Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -16,19 +16,16 @@ Make sure you install the devDependencies in your project.
16
16
 
17
17
  ```js
18
18
  npm install
19
- "@pixi-essentials/react-bindings": "2.0.0",
20
- "@pixi-essentials/transformer": "2.5.6",
21
- "@pixi/assets": "6.5.9",
22
- "@pixi/basis": "6.5.9",
23
- "@pixi/filter-adjustment": "5.1.1",
24
- "@pixi/gif": "1.1.3",
25
- "@pixi/interaction": "6.5.9",
26
- "@pixi/picture": "^3.0.3",
27
- "@pixi/react": "7.0.0",
28
- "@pixi/sound": "^4.3.1",
29
- "pixi-filters": "5.1.1",
30
- "pixi-svg": "3.2.0",
31
- "pixi.js": "6.5.9",
19
+ "@pixi/gif": "^2.1.0",
20
+ "@pixi/react": "~7.1.0",
21
+ "@pixi/sound": "^5.2.1",
22
+ "pixi-filters": "^5.2.1",
23
+ "pixi-svg": "^3.2.0",
24
+ "pixi.js": "^7.2.3",
25
+ "gsap": "3.11.5",
26
+ "howler": "^2.2.3",
27
+ "lottie-web": "^5.10.2",
28
+ "react-custom-events": "^1.1.1",
32
29
  ```
33
30
 
34
31
  ## Description
@@ -38,3 +35,27 @@ PixiTweenJs is designed to help you build animated time-controlled canvas elemen
38
35
  ## Usage
39
36
 
40
37
  Visit the [storybook](https://64b9d71094fa7aed0c7291cf-bpnkkrlkgw.chromatic.com)
38
+
39
+ ## Documentation
40
+
41
+ ## License
42
+
43
+ This library is licensed under the MIT License. See the LICENSE.md file for details.
44
+
45
+ Note: This library comes with restrictions. You are not allowed to copy, modify, or sell this library or any derivative work on behalf of the original author. Usage is permitted only under the terms specified in the license.
46
+
47
+ For example:
48
+
49
+ - Allowed: Use in personal and non-commercial projects.
50
+ - Not Allowed: Copying, modification, or commercial use without explicit permission.
51
+
52
+ ## Contributing
53
+
54
+ Want to contribute to pixitweenjs? Our [contributing guide](Contribution.md) has you covered.
55
+
56
+ ## See also
57
+
58
+ - [editly](https://github.com/mifi/editly) - Declarative video API I also created earlier
59
+ - [remotion](https://github.com/remotion-dev/remotion) - Great inspiration
60
+
61
+ Made with ❤️ in 🇦🇺
package/dist/.gitkeep ADDED
File without changes
package/dist/index.es.js CHANGED
@@ -1589,7 +1589,7 @@ function useGsapEffect() {
1589
1589
  []
1590
1590
  ) };
1591
1591
  }
1592
- var Animations = /* @__PURE__ */ ((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))(Animations || {});
1592
+ var Animations = /* @__PURE__ */ ((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 || {});
1593
1593
  const CYAN = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], initalTransforms$1 = {
1594
1594
  x: 0,
1595
1595
  y: 0,
@@ -19291,11 +19291,17 @@ const PixiVideoCanvasSyncSprite = React.forwardRef((C, E) => {
19291
19291
  if (U.current && K.current) {
19292
19292
  Y.current && (Y.current.kill(), K.current.remove(Y.current));
19293
19293
  const Z = E < 0.2 ? 1 : 0;
19294
- Y.current = gsap$2.timeline().set(U.current, { alpha: Z }).to(U.current, {
19295
- pixi: {
19296
- alpha: 1,
19297
- eventMode: "static"
19294
+ Y.current = gsap$2.timeline().set(U.current, { alpha: Z }).set(
19295
+ U.current,
19296
+ {
19297
+ pixi: {
19298
+ alpha: 1,
19299
+ eventMode: "static"
19300
+ }
19298
19301
  },
19302
+ 0.01
19303
+ ).to(U.current, {
19304
+ pixi: {},
19299
19305
  duration: Number(I) - Number(E)
19300
19306
  }).set(U.current, { alpha: 0, eventMode: "none" }), K.current.add([Y.current], E);
19301
19307
  }
package/dist/index.umd.js CHANGED
@@ -30,7 +30,7 @@
30
30
  * Subject to the terms at https://greensock.com/standard-license or for
31
31
  * Club GreenSock members, the agreement issued with that membership.
32
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))(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},AbstractContainer=React__namespace.forwardRef((C,E)=>{const[I,B]=React__namespace.useState(!1),[U,V]=React.useState(!1),[X,Y]=React.useState(!1),[K,J]=React.useState(),xe=useDebounce(K,300),Z=React.useRef(null),_e=React.useRef(null),Se=React.useRef(null),Ee=React.useRef(null),Ae=React.useRef(null),Re=React.useRef(null),{tl:Te}=React.useContext(GsapPixieContext),we=react.useApp(),Pe=we.screen.width,Ie=we.screen.height,{uniqueId:Fe,visible:Oe,startAt:Le,transformation:De=initalTransforms$1,applyTransformer:Ve,disabled:Xe,pointerdown:Ue,pointerout:We,pointerover:je,isText:ze,isDragging:He,isGif:$e,onDoubleClick:Ne,isTextEditMode:Me}=C,{x:ke=0,y:Ge=0,width:Be,height:qe,scale:Ke=[1,1],rotation:Ye=0,effect:et,overlay:Qe,animation:it=Animations.NONE}=De,nt=useGsapEffect();useCustomEventListener(Events.COMPLETE,()=>{Z.current}),React__namespace.useImperativeHandle(E,()=>({getIsTransformerDragging:()=>U,getIsMouseOverTransformer:()=>X}),[U,X]),React__namespace.useEffect(()=>{Z.current&&B(!0)},[]),React__namespace.useEffect(()=>{J({x:ke,y:Ge,width:Be,height:qe,animation:it,maxX:Pe,maxY:Ie})},[it,ke,Ge,Be,qe,Pe,Ie]),React__namespace.useEffect(()=>{if(!_e.current)return;const rt=gsap$2.context(()=>{if(Te.current&&xe){const{x:tt,y:at,animation:ut,maxX:mt,maxY:pt}=xe||{},yt=Te.current.progress(),gt=nt.updateEffect(Z.current,ut,{immediateRender:!1,x:tt,y:at,overwrite:!0,maxX:mt,maxY:pt});Ae.current&&(Te.current.remove(Ae.current),Ae.current.progress(0).kill()),yt>.1?(gt.eventCallback("onComplete",()=>{gt.remove("onComplete"),Te.current.add(gt,Le),Ae.current=gt}),gt.play()):(gt.progress(1),Te.current.add(gt,Le),Ae.current=gt)}else Ae.current&&Ae.current.progress(0).kill()},_e.current);return()=>{rt.revert()}},[Le,xe]);const ot=React__namespace.useCallback(()=>{Y(!0),je&&je()},[]),Ze=React__namespace.useCallback(()=>{V(!0)},[]),Je=React__namespace.useCallback(rt=>{C.onAnchorTransformationEnd&&C.onAnchorTransformationEnd(rt),V(!1)},[]),st=react.withFilters(react.Container,{matrix:PIXI__namespace.filters.ColorMatrixFilter});return jsxRuntimeExports.jsxs(react.Container,{ref:_e,children:[jsxRuntimeExports.jsx(react.Container,{ref:Z,position:[ke,Ge],pivot:[ke,Ge],width:Be,height:qe,scale:Ke,rotation:Ye,...!Xe&&Oe&&!U&&!He&&{interactive:!0,buttonMode:!0,pointerdown:Ue,pointerover:je,pointerout:We},children:jsxRuntimeExports.jsxs(react.Container,{ref:Re,children:[!$e&&jsxRuntimeExports.jsx(st,{scale:1,apply:({matrix:rt})=>{et===Effects.BlackAndWhite?rt.desaturate():et===Effects.Sepia?rt.sepia():et===Effects.RetroVintage||et===Effects.NightVision?rt.negative():et===Effects.Normal&&rt.reset()},matrix:{enabled:!0,matrix:CYAN},children:jsxRuntimeExports.jsx(react.Container,{ref:Se,children:C.children})}),$e&&jsxRuntimeExports.jsx(react.Container,{ref:Se,children:C.children}),!isEmpty$1(Qe)&&Qe!==OverlayTypes.NONE&&Qe!==OverlayTypes.NORMAL&&jsxRuntimeExports.jsx(PixiOverlayTilingSprite,{overlay:Qe,width:Be,height:qe,x:ke,y:Ge})]})}),Ve&&Oe&&!Me&&jsxRuntimeExports.jsx(PixiTransformer,{pixiTransformerRef:Ee,imageRef:Z,isMounted:I,transformCommit:Je,transformChange:Ze,mouseoverEvent:ot,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 De(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("."),et=Ve(Ye,Be).join(".");return Ke+et}function Ue(Ge){for(var Be=[],qe=0,Ke=Ge.length,Ye,et;qe<Ke;)Ye=Ge.charCodeAt(qe++),Ye>=55296&&Ye<=56319&&qe<Ke?(et=Ge.charCodeAt(qe++),(et&64512)==56320?Be.push(((Ye&1023)<<10)+(et&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 $e(Ge){var Be=[],qe=Ge.length,Ke,Ye=0,et=Ee,Qe=Se,it,nt,ot,Ze,Je,st,rt,tt,at;for(it=Ge.lastIndexOf(Ae),it<0&&(it=0),nt=0;nt<it;++nt)Ge.charCodeAt(nt)>=128&&De("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&&De("invalid-input"),rt=je(Ge.charCodeAt(ot++)),(rt>=K||rt>Fe((Y-Ye)/Je))&&De("overflow"),Ye+=rt*Je,tt=st<=Qe?J:st>=Qe+xe?xe:st-Qe,!(rt<tt);st+=K)at=K-tt,Je>Fe(Y/at)&&De("overflow"),Je*=at;Ke=Be.length+1,Qe=He(Ye-Ze,Ke,Ze==0),Fe(Ye/Ke)>Y-et&&De("overflow"),et+=Fe(Ye/Ke),Ye%=Ke,Be.splice(Ye++,0,et)}return We(Be)}function Ne(Ge){var Be,qe,Ke,Ye,et,Qe,it,nt,ot,Ze,Je,st=[],rt,tt,at,ut;for(Ge=Ue(Ge),rt=Ge.length,Be=Ee,qe=0,et=Se,Qe=0;Qe<rt;++Qe)Je=Ge[Qe],Je<128&&st.push(Oe(Je));for(Ke=Ye=st.length,Ye&&st.push(Ae);Ke<rt;){for(it=Y,Qe=0;Qe<rt;++Qe)Je=Ge[Qe],Je>=Be&&Je<it&&(it=Je);for(tt=Ke+1,it-Be>Fe((Y-qe)/tt)&&De("overflow"),qe+=(it-Be)*tt,Be=it,Qe=0;Qe<rt;++Qe)if(Je=Ge[Qe],Je<Be&&++qe>Y&&De("overflow"),Je==Be){for(nt=qe,ot=K;Ze=ot<=et?J:ot>=et+xe?xe:ot-et,!(nt<Ze);ot+=K)ut=nt-Ze,at=K-Ze,st.push(Oe(ze(Ze+ut%at,0))),nt=Fe(ut/at);st.push(Oe(ze(nt,0))),et=He(qe,tt,Ke==Ye),qe=0,++Ke}++qe,++Be}return st.join("")}function Me(Ge){return Xe(Ge,function(Be){return Re.test(Be)?$e(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:$e,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 $e={depth:V.depth};return has$3(V,"quoteStyle")&&($e.quoteStyle=V.quoteStyle),C(je,$e,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),De=gPO?gPO(E)===Object.prototype:E instanceof Object||E.constructor===Object,Ve=E instanceof Object?"":"null prototype",Xe=!De&&toStringTag&&Object(E)===E&&toStringTag in E?$slice.call(toStr(E),8,-1):Ve?"Object":"",Ue=De||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],`
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},AbstractContainer=React__namespace.forwardRef((C,E)=>{const[I,B]=React__namespace.useState(!1),[U,V]=React.useState(!1),[X,Y]=React.useState(!1),[K,J]=React.useState(),xe=useDebounce(K,300),Z=React.useRef(null),_e=React.useRef(null),Se=React.useRef(null),Ee=React.useRef(null),Ae=React.useRef(null),Re=React.useRef(null),{tl:Te}=React.useContext(GsapPixieContext),we=react.useApp(),Pe=we.screen.width,Ie=we.screen.height,{uniqueId:Fe,visible:Oe,startAt:Le,transformation:De=initalTransforms$1,applyTransformer:Ve,disabled:Xe,pointerdown:Ue,pointerout:We,pointerover:je,isText:ze,isDragging:He,isGif:$e,onDoubleClick:Ne,isTextEditMode:Me}=C,{x:ke=0,y:Ge=0,width:Be,height:qe,scale:Ke=[1,1],rotation:Ye=0,effect:et,overlay:Qe,animation:it=Animations.NONE}=De,nt=useGsapEffect();useCustomEventListener(Events.COMPLETE,()=>{Z.current}),React__namespace.useImperativeHandle(E,()=>({getIsTransformerDragging:()=>U,getIsMouseOverTransformer:()=>X}),[U,X]),React__namespace.useEffect(()=>{Z.current&&B(!0)},[]),React__namespace.useEffect(()=>{J({x:ke,y:Ge,width:Be,height:qe,animation:it,maxX:Pe,maxY:Ie})},[it,ke,Ge,Be,qe,Pe,Ie]),React__namespace.useEffect(()=>{if(!_e.current)return;const rt=gsap$2.context(()=>{if(Te.current&&xe){const{x:tt,y:at,animation:ut,maxX:mt,maxY:pt}=xe||{},yt=Te.current.progress(),gt=nt.updateEffect(Z.current,ut,{immediateRender:!1,x:tt,y:at,overwrite:!0,maxX:mt,maxY:pt});Ae.current&&(Te.current.remove(Ae.current),Ae.current.progress(0).kill()),yt>.1?(gt.eventCallback("onComplete",()=>{gt.remove("onComplete"),Te.current.add(gt,Le),Ae.current=gt}),gt.play()):(gt.progress(1),Te.current.add(gt,Le),Ae.current=gt)}else Ae.current&&Ae.current.progress(0).kill()},_e.current);return()=>{rt.revert()}},[Le,xe]);const ot=React__namespace.useCallback(()=>{Y(!0),je&&je()},[]),Ze=React__namespace.useCallback(()=>{V(!0)},[]),Je=React__namespace.useCallback(rt=>{C.onAnchorTransformationEnd&&C.onAnchorTransformationEnd(rt),V(!1)},[]),st=react.withFilters(react.Container,{matrix:PIXI__namespace.filters.ColorMatrixFilter});return jsxRuntimeExports.jsxs(react.Container,{ref:_e,children:[jsxRuntimeExports.jsx(react.Container,{ref:Z,position:[ke,Ge],pivot:[ke,Ge],width:Be,height:qe,scale:Ke,rotation:Ye,...!Xe&&Oe&&!U&&!He&&{interactive:!0,buttonMode:!0,pointerdown:Ue,pointerover:je,pointerout:We},children:jsxRuntimeExports.jsxs(react.Container,{ref:Re,children:[!$e&&jsxRuntimeExports.jsx(st,{scale:1,apply:({matrix:rt})=>{et===Effects.BlackAndWhite?rt.desaturate():et===Effects.Sepia?rt.sepia():et===Effects.RetroVintage||et===Effects.NightVision?rt.negative():et===Effects.Normal&&rt.reset()},matrix:{enabled:!0,matrix:CYAN},children:jsxRuntimeExports.jsx(react.Container,{ref:Se,children:C.children})}),$e&&jsxRuntimeExports.jsx(react.Container,{ref:Se,children:C.children}),!isEmpty$1(Qe)&&Qe!==OverlayTypes.NONE&&Qe!==OverlayTypes.NORMAL&&jsxRuntimeExports.jsx(PixiOverlayTilingSprite,{overlay:Qe,width:Be,height:qe,x:ke,y:Ge})]})}),Ve&&Oe&&!Me&&jsxRuntimeExports.jsx(PixiTransformer,{pixiTransformerRef:Ee,imageRef:Z,isMounted:I,transformCommit:Je,transformChange:Ze,mouseoverEvent:ot,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 De(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("."),et=Ve(Ye,Be).join(".");return Ke+et}function Ue(Ge){for(var Be=[],qe=0,Ke=Ge.length,Ye,et;qe<Ke;)Ye=Ge.charCodeAt(qe++),Ye>=55296&&Ye<=56319&&qe<Ke?(et=Ge.charCodeAt(qe++),(et&64512)==56320?Be.push(((Ye&1023)<<10)+(et&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 $e(Ge){var Be=[],qe=Ge.length,Ke,Ye=0,et=Ee,Qe=Se,it,nt,ot,Ze,Je,st,rt,tt,at;for(it=Ge.lastIndexOf(Ae),it<0&&(it=0),nt=0;nt<it;++nt)Ge.charCodeAt(nt)>=128&&De("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&&De("invalid-input"),rt=je(Ge.charCodeAt(ot++)),(rt>=K||rt>Fe((Y-Ye)/Je))&&De("overflow"),Ye+=rt*Je,tt=st<=Qe?J:st>=Qe+xe?xe:st-Qe,!(rt<tt);st+=K)at=K-tt,Je>Fe(Y/at)&&De("overflow"),Je*=at;Ke=Be.length+1,Qe=He(Ye-Ze,Ke,Ze==0),Fe(Ye/Ke)>Y-et&&De("overflow"),et+=Fe(Ye/Ke),Ye%=Ke,Be.splice(Ye++,0,et)}return We(Be)}function Ne(Ge){var Be,qe,Ke,Ye,et,Qe,it,nt,ot,Ze,Je,st=[],rt,tt,at,ut;for(Ge=Ue(Ge),rt=Ge.length,Be=Ee,qe=0,et=Se,Qe=0;Qe<rt;++Qe)Je=Ge[Qe],Je<128&&st.push(Oe(Je));for(Ke=Ye=st.length,Ye&&st.push(Ae);Ke<rt;){for(it=Y,Qe=0;Qe<rt;++Qe)Je=Ge[Qe],Je>=Be&&Je<it&&(it=Je);for(tt=Ke+1,it-Be>Fe((Y-qe)/tt)&&De("overflow"),qe+=(it-Be)*tt,Be=it,Qe=0;Qe<rt;++Qe)if(Je=Ge[Qe],Je<Be&&++qe>Y&&De("overflow"),Je==Be){for(nt=qe,ot=K;Ze=ot<=et?J:ot>=et+xe?xe:ot-et,!(nt<Ze);ot+=K)ut=nt-Ze,at=K-Ze,st.push(Oe(ze(Ze+ut%at,0))),nt=Fe(ut/at);st.push(Oe(ze(nt,0))),et=He(qe,tt,Ke==Ye),qe=0,++Ke}++qe,++Be}return st.join("")}function Me(Ge){return Xe(Ge,function(Be){return Re.test(Be)?$e(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:$e,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 $e={depth:V.depth};return has$3(V,"quoteStyle")&&($e.quoteStyle=V.quoteStyle),C(je,$e,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),De=gPO?gPO(E)===Object.prototype:E instanceof Object||E.constructor===Object,Ve=E instanceof Object?"":"null prototype",Xe=!De&&toStringTag&&Object(E)===E&&toStringTag in E?$slice.call(toStr(E),8,-1):Ve?"Object":"",Ue=De||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
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
35
  `+E.prev+E.base;return I+$join.call(C,","+I)+`
36
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($e){return $e instanceof Date?Z($e):$e})),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 De;if(B==="comma"&&isArray$7(Te))Ee&&Y&&(Te=utils$1.maybeMap(Te,Y)),De=[{value:Te.length>0?Te.join(",")||null:void 0}];else if(isArray$7(K))De=K;else{var Ve=Object.keys(Te);De=J?Ve.sort(J):Ve}for(var Xe=U&&isArray$7(Te)&&Te.length===1?I+"[]":I,Ue=0;Ue<De.length;++Ue){var We=De[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",`
@@ -1994,7 +1994,7 @@ void main() {
1994
1994
  * @version 4.3.0
1995
1995
  * @author Henrique Avila Vianna <hvianna@gmail.com> <https://henriquevianna.com>
1996
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,De=U.height-(Ee&&!we?.5:0)>>Ee,Ve=De*(Pe||xe?1:1-Z)|0,Xe=U.width-_e*(Ae||K!=0),Ue=Ee?U.height-De*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]}),$e=Ye=>{const et=this._freqToBin(Ye,"floor"),Qe=this._binToFreq(et),it=this._binToFreq(et+1),nt=Math.log2(Ye/Qe)/Math.log2(it/Qe);return[et,nt]};let Ne,Me,ke;if(Te){const Ye=(st,rt,tt)=>+st.toPrecision(tt?Math.max(rt,1+Math.log10(st)|0):rt),et=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],tt=Math.log10(st)|0,at=st/10**tt;let ut=1;for(;ut<rt.length&&at>rt[ut];)ut++;return at-rt[ut-1]<rt[ut]-at&&ut--,(rt[ut]*10**(tt+5)|0)/1e5},Qe=[0,24,12,8,6,4,3,2,1][J],it=I?10**(3/(Qe*10)):2**(1/Qe),nt=it**.5;let ot=I?7.94328235/(Qe%2?1:nt):C_1;do{let st=ot;const rt=Ye(st/nt,4,!0),tt=Ye(st*nt,4,!0),[at,ut]=$e(rt),[mt,pt]=$e(tt);I?st=Qe<4?et(st):Ye(st,st.toString()[0]<5?3:2):st=Ye(st,4,!0),st>=Y&&He({posX:0,freq:st,freqLo:rt,freqHi:tt,binLo:at,binHi:mt,ratioLo:ut,ratioHi:pt}),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]=$e(Y)),Je.freqHi>X&&(Je.freqHi=X,[Je.binHi,Je.ratioHi]=$e(X))}else if(Re){const Ye=[0,24,12,8,6,4,3,2,1][J]*10,et=Qe=>{switch(this._frequencyScale){case SCALE_BARK:return 1960/(26.81/(Qe+.53)-1);case SCALE_MEL:return 700*(2**Qe-1);case SCALE_LINEAR:return Qe}};Ne=Xe/Ye,Me=this._freqScaling(Y),ke=Xe/(this._freqScaling(X)-Me);for(let Qe=0,it=0;Qe<Ye;Qe++,it+=Ne){const nt=et(Me+it/ke),ot=et(Me+(it+Ne/2)/ke),Ze=et(Me+(it+Ne)/ke),[Je,st]=$e(nt),[rt,tt]=$e(Ze);He({posX:We+it,freq:ot,freqLo:nt,freqHi:Ze,binLo:Je,binHi:rt,ratioLo:st,ratioHi:tt})}}else{Ne=1,Me=this._freqScaling(Y),ke=Xe/(this._freqScaling(X)-Me);const Ye=this._freqToBin(Y,"floor"),et=this._freqToBin(X);let Qe=-999;for(let it=Ye;it<=et;it++){const nt=this._binToFreq(it),ot=We+Math.round(ke*(this._freqScaling(nt)-Me));if(ot>Qe)He({posX:ot,freq:nt,freqLo:nt,freqHi:nt,binLo:it,binHi:it,ratioLo:0,ratioHi:0}),Qe=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),et=[[],[128,3,.45],[128,4,.225],[96,6,.225],[80,6,.225],[80,6,.125],[64,6,.125],[48,8,.125],[24,16,.125]],Qe=this._ledParams,[it,nt,ot]=Qe||et[J];let Ze,Je=Ve;if(Qe){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),Qe||(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,et)=>{let Qe=Ye.posX,it=Ne;Re&&(B==0&&!we?(Qe|=0,it|=0,et>0&&Qe>E[et-1].posX+E[et-1].width&&(Qe--,it++)):Qe+=Math.max(we?Ge:0,qe)/2,Ye.posX=Qe),Ye.barCenter=Qe+(Ne==1?0:it/2),Ye.width=it});const Ke=[];for(const Ye of[0,1]){const et=V==CHANNEL_VERTICAL?(De+Ue)*Ye:0,Qe=et+De,it=et+Ve-(!we||Le?0:Be);Ke.push({channelTop:et,channelBottom:Qe,analyzerBottom:it})}this._aux={analyzerHeight:Ve,analyzerWidth:Xe,centerX:_e,centerY:Se,channelCoords:Ke,channelHeight:De,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),De=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 $e=0;$e<12;$e++){if(ze>=this._minFreq&&ze<=this._maxFreq){const Ne=we[$e],Me=Ne=="C";(Ne&&J&&!K&&!Re||Me)&&Ae.push(J?[ze,Ne+(Me?He:"")]:ze)}ze*=De}}Ee.width=Ee.height=(B<<1)+Te*Pe;const Ve=Ee.width>>1,Xe=Ve-Pe*.7,Ue=(ze,He)=>{const $e=TAU*(ze/X.width),Ne=$e-HALF_PI,Me=Xe*Math.cos(Ne),ke=Xe*Math.sin(Ne);_e.save(),_e.translate(Ve+Me,Ve+ke),_e.rotate($e),_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,$e]=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=$e[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($e[0]))continue}Ne>=We+Oe/2&&Ne<=E&&(Z.fillText($e,Re&&K==-1?E-Ne:I+Ne,Me,Ge),(Re||K&&(Ne>Oe||K==1))&&Z.fillText($e,Re&&K!=1?E+Ne:(I||X.width)-Ne,Me,Ge),We=Ne+Math.min(Ge,Z.measureText($e).width)/2),Ne>=je+Le&&Ne<E-Le&&(Ue(Re&&K==1?E-Ne:Ne,$e),(Re||K&&(Ne>Le||K==1))&&Ue(Re&&K!=-1?E+Ne:-Ne,$e),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:De,_chLayout:Ve,_colorMode:Xe,_ctx:Ue,_energy:We,fillAlpha:je,_fps:ze,_linearAmplitude:He,_lineWidth:$e,maxDecibels:Ne,minDecibels:Me,_mirror:ke,_mode:Ge,overlay:Be,_radial:qe,showBgColor:Ke,showPeaks:Ye,useCanvas:et,_weightingFilter:Qe}=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,tt=Y&&this._trueLeds&&Xe==COLOR_GRADIENT,at=qe?Le.width:this._aux.analyzerWidth,ut=Pe+at,mt=Ye&&this._peakLine&&Ge==MODE_GRAPH,pt=qe?Fe-Ie:Se,[yt,gt,_t,Pt]=this._leds||[];We.val>0&&(this._spinAngle+=this._spinSpeed*TAU/(60*ze));const It=lt=>{if(this._reflexRatio>0&&!K&&!qe){let dt,$t;this.reflexFit||st?(dt=st&&lt==0?Te+we:0,$t=Te-Se):(dt=Le.height-Se*2,$t=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,dt,Le.width,$t),Ue.restore()}},St=()=>{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))},Lt=lt=>{const dt=lt**2,$t=424.36,Et=11599.29,Qt=25122.25,Bt=544496.41,Nt=148693636,zt=Ht=>20*Math.log10(Ht);switch(Qe){case FILTER_A:const Ht=Nt*dt**2/((dt+$t)*Math.sqrt((dt+Et)*(dt+Bt))*(dt+Nt));return 2+zt(Ht);case FILTER_B:const jt=Nt*dt*lt/((dt+$t)*Math.sqrt(dt+Qt)*(dt+Nt));return .17+zt(jt);case FILTER_C:const rr=Nt*dt/((dt+$t)*(dt+Nt));return .06+zt(rr);case FILTER_D:const Jt=((103791848e-2-dt)**2+108076816e-2*dt)/((9837328-dt)**2+11723776*dt),ir=lt/68966888496476e-18*Math.sqrt(Jt/((dt+79919.29)*(dt+1345600)));return zt(ir);case FILTER_468:const er=-4737338981378384e-39*lt**6+2043828333606125e-30*lt**4-1363894795463638e-22*dt+1,Xt=1306612257412824e-34*lt**5-2118150887518656e-26*lt**3+.0005559488023498642*lt,Rt=.0001246332637532143*lt/Math.hypot(er,Xt);return 18.2+zt(Rt)}return 0},At=(lt,dt,$t)=>{Ue.beginPath(),Ue.moveTo(lt,dt),Ue.lineTo(lt,$t),Ue.stroke()},kt=lt=>{if(lt&&$e){const dt=Ue.globalAlpha;Ue.globalAlpha=1,Ue.stroke(),Ue.globalAlpha=dt}},Mt=lt=>Math.max(0,(lt*yt|0)*(Pt+_t)-_t),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:dt,channelBottom:$t,analyzerBottom:Et}=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 ht=it.height,ft=ht>>1,ct=He?100:Ne,vt=He?0:Me,bt=He?20:5,wt=Se/(ct-vt),Dt=ke!=-1&&(!Je||lt==0||ke==1),Gt=ke!=1&&(!Je||lt!=ke);Ue.save(),Ue.fillStyle=SCALEY_LABEL_COLOR,Ue.font=`${ft}px ${FONT_FAMILY}`,Ue.textAlign="right",Ue.lineWidth=1;for(let Ut=ct;Ut>vt;Ut-=bt){const Yt=dt+(ct-Ut)*wt,Tt=Ut%2==0|0;if(Tt){const Ct=Yt+ft*(Yt==dt?.8:.35);Dt&&Ue.fillText(Ut,ht*.85,Ct),Gt&&Ue.fillText(Ut,(Je?at:Le.width)-ht*.1,Ct),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+ht*Tt*Dt,~~Yt+.5),Ue.lineTo(ut-ht*Tt*Gt,~~Yt+.5),Ue.stroke()}Ue.restore()},er=(ht,ft)=>{const ct=Ot[ht]+(ht<Ot.length-1?(Ot[ht+1]-Ot[ht])*ft:0);return isNaN(ct)?-1/0:ct},Xt=(ht,ft=Jt)=>ft*TAU*((ht+rr)/Le.width)+this._spinAngle,Rt=(ht,ft,ct)=>{const vt=Ie+ft*Ht,bt=Xt(ht,ct);return[Ee+vt*Math.cos(bt),Ae+vt*Math.sin(bt)]},sr=(ht,ft,ct,vt,bt)=>{Ue.beginPath();for(const wt of ke&&!Je?[1,-1]:[Jt]){const[Dt,Gt]=Z?[Xt(ht,wt),Xt(ht+ct,wt)]:[];Ue.moveTo(...Rt(ht,ft,wt)),Ue.lineTo(...Rt(ht,ft+vt,wt)),Z?Ue.arc(Ee,Ae,Ie+(ft+vt)*Ht,Dt,Gt,wt!=1):Ue.lineTo(...Rt(ht+ct,ft+vt,wt)),Ue.lineTo(...Rt(ht+ct,ft,wt)),Z&&!bt&&Ue.arc(Ee,Ae,Ie+ft*Ht,Gt,Dt,wt==1)}kt(bt),Ue.fill()},nr=(ht=0,ft=0)=>{let ct;if(Xe==COLOR_GRADIENT&&!tt||Ge==MODE_GRAPH)ct=De[lt];else{const vt=Xe==COLOR_BAR_INDEX?ft%Nt:Bt.findLastIndex(bt=>Y?Mt(ht)<=Mt(bt.level):ht<=bt.level);ct=Bt[vt].color}Ue.fillStyle=Ue.strokeStyle=ct};if(et){if(Je&&!qe){const ht=at*(lt+jt),ft=jt?-1:1;Ue.setTransform(ft,0,0,1,ht,0)}if((!Be||Ke)&&(Be&&(Ue.globalAlpha=this.bgAlpha),Ue.fillStyle=zt,(lt==0||!qe&&!Ze)&&Ue.fillRect(Pe,dt-we,at,(Be&&this.reflexAlpha==1?Se:Te)+we),Ue.globalAlpha=1),this.showScaleY&&!K&&!qe&&(lt==0||!Ze)&&ir(),Y?(Ue.setLineDash([Pt,_t]),Ue.lineWidth=Oe[0].width):Ue.lineWidth=xe?Math.min($e,Oe[0].width/2):$e,Ue.save(),!qe){const ht=new Path2D;ht.rect(0,dt,Le.width,Se),Ue.clip(ht)}}let Ot=this._fftData[lt];this._analyzer[lt].getFloatFrequencyData(Ot),Qe&&(Ot=Ot.map((ht,ft)=>ht+Lt(this._binToFreq(ft)))),Ue.beginPath();let Zt=[];for(let ht=0;ht<ar;ht++){const ft=Oe[ht],{posX:ct,barCenter:vt,width:bt,freq:wt,binLo:Dt,binHi:Gt,ratioLo:Ut,ratioHi:Yt}=ft;let Tt=Math.max(er(Dt,Ut),er(Gt,Yt));for(let xt=Dt+1;xt<Gt;xt++)Ot[xt]>Tt&&(Tt=Ot[xt]);if(Tt=this._normalizedB(Tt),ft.value[lt]=Tt,Vt+=Tt,ft.peak[lt]>0&&(ft.hold[lt]--,ft.hold[lt]<0&&(ft.peak[lt]+=ft.hold[lt]/(ot*ot/2))),Tt>=ft.peak[lt]&&(ft.peak[lt]=Tt,ft.hold[lt]=ot),!et)continue;K||V?Ue.globalAlpha=Tt:xe&&(Ue.globalAlpha=je),nr(Tt,ht);const Ct=K?pt:Y?Mt(Tt):Tt*pt|0;if(Ge==MODE_GRAPH){const xt=ht?0:(this._normalizedB(Ot[Oe[1].binLo])*pt+Ct)/2;if(qe){if(ht==0&&(Je&&Ue.moveTo(...Rt(0,0)),Ue.lineTo(...Rt(0,ct<0?xt:Ct))),ct>=0){const Ft=[ct,Ct];Ue.lineTo(...Rt(...Ft)),Zt.push(Ft)}}else{if(ht==0)if(ke==-1&&!Je)Ue.moveTo(Pe,Et-(ct<Pe?xt:Ct));else{const Ft=Dt?this._normalizedB(Ot[Dt-1])*pt:Ct;Ue.moveTo(Pe-$e,Et-Ft)}(Je||ke!=-1||ct>=Pe)&&Ue.lineTo(ct,Et-Ct)}}else if(Y){if(Ke&&!Be&&(lt==0||!Ze)){const xt=Ue.globalAlpha;Ue.strokeStyle=LEDS_UNLIT_COLOR,Ue.globalAlpha=1,At(vt,dt,Et),Ue.strokeStyle=Ue.fillStyle,Ue.globalAlpha=xt}if(tt){const xt=K?0:Bt.findLastIndex(Wt=>Mt(Tt)<=Mt(Wt.level));let Ft=Et;for(let Wt=Nt-1;Wt>=xt;Wt--){Ue.strokeStyle=Bt[Wt].color;let lr=Et-(Wt==xt?Ct:Mt(Bt[Wt].level));At(vt,Ft,lr),Ft=lr-_t}}else At(vt,Et,Et-Ct)}else if(ct>=Pe)if(qe)sr(ct,0,bt,Ct,xe);else if(Z){const xt=bt/2,Ft=Et+xt;Ue.beginPath(),Ue.moveTo(ct,Ft),Ue.lineTo(ct,Ft-Ct),Ue.arc(vt,Ft-Ct,xt,PI,TAU),Ue.lineTo(ct+bt,Ft),kt(xe),Ue.fill()}else{const xt=xe?Ue.lineWidth:0;Ue.beginPath(),Ue.rect(ct,Et+xt,bt,-Ct-xt),kt(xe),Ue.fill()}const Kt=ft.peak[lt];if(Kt>0&&Ye&&!mt&&!K&&ct>=Pe&&ct<ut)if(xe&&$e>0?Ue.globalAlpha=1:V&&(Ue.globalAlpha=Kt),(Xe==COLOR_BAR_LEVEL||tt)&&nr(Kt),Y){const xt=Mt(Kt);xt>=_t&&Ue.fillRect(ct,Et-xt,bt,Pt)}else qe?Ge!=MODE_GRAPH&&sr(ct,Kt*pt,bt,-2):Ue.fillRect(ct,Et-Kt*pt,bt,2)}if(et){if(Ue.globalAlpha=1,Ge==MODE_GRAPH){if(nr(),qe&&!Je){if(ke){let ht;for(;ht=Zt.pop();)Ue.lineTo(...Rt(...ht,-1))}Ue.closePath()}if($e>0&&Ue.stroke(),je>0){if(qe){const ht=Je?Xt(at>>1):0,ft=Je?Xt(at):TAU;Ue.moveTo(...Rt(Je?at>>1:0,0)),Ue.arc(Ee,Ae,Ie,ht,ft,Je?!jt:!0)}else Ue.lineTo(ut,Et),Ue.lineTo(Pe,Et);Ue.globalAlpha=je,Ue.fill(),Ue.globalAlpha=1}if((mt||qe&&Ye)&&(Zt=[],Ue.beginPath(),Oe.forEach((ht,ft)=>{let ct=ht.posX,vt=ht.peak[lt],bt=ft?"lineTo":"moveTo";if(qe&&ct<0){const wt=Oe[ft+1];vt=findY(ct,vt,wt.posX,wt.peak[lt],0),ct=0}vt*=pt,mt?(Ue[bt](...qe?Rt(ct,vt):[ct,Et-vt]),qe&&ke&&!Je&&Zt.push([ct,vt])):vt>0&&sr(ct,vt,1,-2)}),mt)){let ht;for(;ht=Zt.pop();)Ue.lineTo(...Rt(...ht,-1));Ue.lineWidth=1,Ue.stroke()}}Ue.restore(),Je&&!qe&&Ue.setTransform(1,0,0,1,0,0),(!Je&&!Ze||lt)&&It(lt)}}if(qt(Vt/(ar<<or-1)),et&&(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([]),St()),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=De[0],this.onCanvasDraw(this,{timestamp:E,_canvasGradients:De}),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,De)=>{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-De;Le=Te[Xe],Ve=1-Le.pos/2}else De==0&&Ve>0&&Pe.addColorStop(.5,Le.color),Ve+=.5;Pe.addColorStop(Ve,Le.color),_e&&De==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:De=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 $e=(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:$e,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:De,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,De,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,De,Ve,Xe;for(Fe=Oe=Le=De=Ve=Xe=0,Ae=0;Ae<X;){if(De===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[De++]=Pe[Ee],Se=Ee,Le=Ee;continue}for(_e=Ee,Ee==Y&&(Ie[De++]=Le,Ee=Se);Ee>K;)Ie[De++]=Pe[Ee],Ee=we[Ee];Le=Pe[Ee]&255,Ie[De++]=Le,Y<U&&(we[Y]=Se,Pe[Y]=Le,Y++,!(Y&J)&&Y<U&&(xe++,J+=Y)),Se=_e}De--,Te[Ve++]=Ie[De],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:De=0,x:Ve,y:Xe,colorCorrection:Ue={}},pointerdown:We}=C,{frames:je,delays:ze}=Z;useWorkerParser(Ee,_e);const{temperatureFilter:He,sharpnessFilter:$e,hueFilter:Ne,blurFilter:Me,adjustmentFilter:ke,vignetteFilter:Ge,noiseFilter:Be}=withFiltersHook(Ue),{blurRadius:qe=0,vignette:Ke=0,noise:Ye=0}=Ue,et=.1;React__namespace.useEffect(()=>{if(!isEmpty$1(je)){const Ze=map$1(je,st=>{const{data:rt,width:tt,height:at}=st,ut=new Uint8Array(rt);return PIXI__namespace.Texture.fromBuffer(ut,tt,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 Qe=()=>{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/et;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:Qe,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:De,animationSpeed:1,alpha:Fe?1:0,loop:Ie,textures:U,onComplete:nt,anchor:.5,forwardRef:Y,...!Oe&&Fe&&{interactive:!0,pointerdown:We},filters:[He,$e,Ne,ke,...qe>0?[Me]:[],...Ke>0?[Ge]:[],...Ye>0?[Be]:[]]})})})}),PixiTextSprite=React__namespace.forwardRef((C,E)=>{const B=React.useRef(null),U=React.useRef(0),V=React.useRef(null),X=React.useRef(null),Y=React.useRef(16),K=React.useRef(null),{visible:J,text:xe,disabled:Z,transformation:_e,pointerdown:Se,onDobuleClick:Ee}=C,{x:Ae,y:Re,fontFamily:Te="Arial",fontWeight:we="normal",fontStyle:Pe="normal",fontSize:Ie=16,fontVariant:Fe="normal",fill:Oe="black",stroke:Le,strokeThickness:De=0,blurRadius:Ve=0,blurEnabled:Xe=!1,dropShadowColor:Ue=null,dropShadow:We=!1,dropShadowBlur:je=0,wordWrapWidth:ze=5e7,leading:He=0,letterSpacing:$e,colorCorrection:Ne={}}=_e,{temperatureFilter:Me,sharpnessFilter:ke,hueFilter:Ge,blurFilter:Be,adjustmentFilter:qe}=withFiltersHook(Ne),{blurRadius:Ke=0}=Ne;React__namespace.useEffect(()=>{Y.current=Number(Ie)},[Ie]);const Ye=["italic","oblique"].includes(Pe)?Pe:void 0,et=["small-caps"].includes(Fe),Qe=["bold","bolder","lighter","100","200","300"].includes(we)?we:void 0,it=Number($e)>0?$e:void 0,nt=React__namespace.useMemo(()=>new PIXI__namespace.TextStyle({fontFamily:Te,fontSize:Ie,fill:Oe||"white",...Le&&De>0&&{stroke:Le,strokeThickness:De},...Ye&&{fontStyle:Ye},...et&&{fontVariant:et},...Qe&&{fontWeight:Qe},...it&&{letterSpacing:it},...Xe&&{dropShadow:!0,dropShadowBlur:Number(Ve),dropShadowColor:(Ue==null?void 0:Ue.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...We&&{dropShadow:!0,dropShadowBlur:Number(je),dropShadowColor:(Ue==null?void 0:Ue.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:ze||500,leading:He||0}),[Xe,Ve,Oe,Te,Ie,Pe,He,Ye,Qe,et,it,Ue,Le,De,ze,We,je]);React__namespace.useEffect(()=>{K.current={..._e}},[_e]);const ot=()=>{const Je=new Date().getTime();Je-U.current<300&&Ee?Ee():Se&&Se(),U.current=Je},Ze=()=>{!Z&&Ee&&Ee()};return jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,isText:!0,onDoubleClick:Ze,children:jsxRuntimeExports.jsx(react.Container,{ref:B,children:jsxRuntimeExports.jsx(react.Container,{alpha:1,ref:X,children:jsxRuntimeExports.jsx(react.Text,{style:nt,x:Ae,y:Re,anchor:.5,text:xe,alpha:J?1:0,...J&&!Z&&{interactive:!0,buttonMode:!0,pointerdown:ot},ref:V,filters:[Me,ke,Ge,qe,...Ke>0?[Be]:[]]})})})})});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,De=U;return B=U=void 0,J=Oe,X=C.apply(De,Le),X}function Ee(Oe){return J=Oe,Y=setTimeout(Te,E),xe?Se(Oe):X}function Ae(Oe){var Le=Oe-K,De=Oe-J,Ve=E-Le;return Z?nativeMin(Ve,V-De):Ve}function Re(Oe){var Le=Oe-K,De=Oe-J;return K===void 0||Le>=E||Le<0||Z&&De>=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:De={}},pointerdown:Ve=()=>{},pointerout:Xe=()=>{},pointerover:Ue=()=>{},fps:We=0}=C,{tl:je,dragModeRef:ze,isRemotion:He}=React.useContext(GsapPixieContext),{onPointerDown:$e,onPointerOut:Ne,onPointerOver:Me}=useDebouncedPointerEvents(Ue,Ve,Xe,1),{blurRadius:ke=0,vignette:Ge=0,noise:Be=0}=De,{temperatureFilter:qe,sharpnessFilter:Ke,hueFilter:Ye,blurFilter:et,adjustmentFilter:Qe,vignetteFilter:it,noiseFilter:nt}=withFiltersHook(De),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 ut=Y.current,mt=ut.currentTime>0&&!ut.paused&&!ut.ended&&ut.readyState>ut.HAVE_CURRENT_DATA;je.current&&je.current.isActive()&&J.current&&J.current.isActive()&&(mt||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=()=>{},tt=()=>{var at,ut;if(J.current&&(K.current.progress=J.current.progress()),Y.current&&J.current){const mt=Ae+((at=J==null?void 0:J.current)==null?void 0:at.time()),pt=Math.abs(Y.current.currentTime-mt),yt=Y.current,gt=yt.currentTime>0&&!yt.paused&&!yt.ended&&yt.readyState>yt.HAVE_CURRENT_DATA;ze.current&&U.current?(Y.current.currentTime=mt,U.current.update(),K.current.isPlaying=!1):(gt!==K.current.isPlaying||!gt)&&K.current.progress>.01&&K.current.progress<.99?(ut=je.current)!=null&&ut.isActive()&&J.current&&J.current.isActive()&&(gt||Y.current.play(),K.current.isPlaying=!0):pt>.3&&K.current.progress>.01&&K.current.progress<.99&&(Y.current.currentTime=mt)}};return React.useEffect(()=>{let at=gsap$2.context(()=>{});if(X.current&&je.current){const ut={duration:Number(Ee)-Number(Se),onStart:Je,onComplete:st,onStartParams:[Ae,Re],onCompleteParams:[],onInterrupt:rt,onUpdate:tt,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,ut,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,ut=function(){Y.current&&(Y.current.currentTime=at,Y.current.muted=Z)},mt=function(){K.current.isWaiting=!1,K.current.isStalled=!1},pt=function(){K.current.isWaiting=!0,K.current.isStalled=!1},yt=function(){K.current.isWaiting=!1,K.current.isStalled=!1},gt=function(){K.current.isWaiting=!1,K.current.isStalled=!0},_t=Math.round((Number(Ae)+Number.EPSILON)*100)/100,Pt=Math.round((Number(Re)+Number.EPSILON)*100)/100,It=`${ot}#t=${_t},${Pt}`;return PIXI__namespace.Texture.fromLoader(Ze,It,xe,{pixiIdPrefix:xe,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:We?Math.max(120,Number(We)):30}}).then(St=>{St&&(U.current=St,B(!0),Y.current=St.baseTexture.resource.source,Y.current.id=xe,Y.current.addEventListener("loadedmetadata",ut),Y.current.addEventListener("ended",mt),Y.current.addEventListener("loadstart",pt),Y.current.addEventListener("canplaythrough",yt),Y.current.addEventListener("stalled",gt))}),()=>{Y.current&&(Y.current.pause(),Y.current.removeEventListener("loadedmetadata",ut),Y.current.removeEventListener("ended",mt),Y.current.removeEventListener("loadstart",pt),Y.current.removeEventListener("canplaythrough",yt),Y.current.removeEventListener("stalled",gt))}},[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:$e,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,Qe,...ke>0?[et]:[],...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:De=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 $e=U.current.texture.baseTexture;$e&&$e.update(),V.current&&we.renderer.render(V.current)}}),React__namespace.useEffect(()=>{if(!isEmpty$1(Te)){const $e=PIXI__namespace.Texture.from(Te);B($e)}},[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]:[],...De>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}).to(U.current,{pixi:{alpha:1,eventMode:"static"},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:De=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 $e=U.current.texture.baseTexture;$e&&$e.update(),V.current&&we.renderer.render(V.current)}}),React__namespace.useEffect(()=>{if(!isEmpty$1(Te)){const $e=PIXI__namespace.Texture.from(Te);B($e)}},[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]:[],...De>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,$e){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,$e),Re(Ne.layers,$e)):Ne.ty===4?Ie(Ne.shapes):Ne.ty===5&&je(Ne)}}function Te(He,$e){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,$e),Re(He[Ne].data.layers,$e))}}function we(He,$e){for(var Ne=0,Me=$e.length;Ne<Me;){if($e[Ne].id===He)return $e[Ne];Ne+=1}return null}function Pe(He,$e){var Ne=we(He,$e);return Ne?Ne.layers.__used?JSON.parse(JSON.stringify(Ne.layers)):(Ne.layers.__used=!0,Ne.layers):null}function Ie(He){var $e,Ne=He.length,Me,ke;for($e=Ne-1;$e>=0;$e-=1)if(He[$e].ty==="sh")if(He[$e].ks.k.i)Fe(He[$e].ks.k);else for(ke=He[$e].ks.k.length,Me=0;Me<ke;Me+=1)He[$e].ks.k[Me].s&&Fe(He[$e].ks.k[Me].s[0]),He[$e].ks.k[Me].e&&Fe(He[$e].ks.k[Me].e[0]);else He[$e].ty==="gr"&&Ie(He[$e].it)}function Fe(He){var $e,Ne=He.i.length;for($e=0;$e<Ne;$e+=1)He.i[$e][0]+=He.v[$e][0],He.i[$e][1]+=He.v[$e][1],He.o[$e][0]+=He.v[$e][0],He.o[$e][1]+=He.v[$e][1]}function Oe(He,$e){var Ne=$e?$e.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 $e(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&&$e(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)}}}(),De=function(){var He=[4,7,99];return function($e){if($e.chars&&!Oe(He,$e.v)){var Ne,Me=$e.chars.length;for(Ne=0;Ne<Me;Ne+=1){var ke=$e.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}},$e.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 $e(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&&$e(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 $e(Me){var ke,Ge=Me.length,Be,qe;for(ke=0;ke<Ge;ke+=1)if(Me[ke].ty==="gr")$e(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&&$e(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 $e(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"&&$e(Me[ke].it)}function Ne(Me){var ke,Ge,Be=Me.length,qe,Ke,Ye,et;for(Ge=0;Ge<Be;Ge+=1){if(ke=Me[Ge],ke.hasMask){var Qe=ke.masksProperties;for(Ke=Qe.length,qe=0;qe<Ke;qe+=1)if(Qe[qe].pt.k.i)Qe[qe].pt.k.c=Qe[qe].cl;else for(et=Qe[qe].pt.k.length,Ye=0;Ye<et;Ye+=1)Qe[qe].pt.k[Ye].s&&(Qe[qe].pt.k[Ye].s[0].c=Qe[qe].cl),Qe[qe].pt.k[Ye].e&&(Qe[qe].pt.k[Ye].e[0].c=Qe[qe].cl)}ke.ty===4&&$e(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),De(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=De,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(De){Fe&&Fe(De)}};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
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,De=U.height-(Ee&&!we?.5:0)>>Ee,Ve=De*(Pe||xe?1:1-Z)|0,Xe=U.width-_e*(Ae||K!=0),Ue=Ee?U.height-De*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]}),$e=Ye=>{const et=this._freqToBin(Ye,"floor"),Qe=this._binToFreq(et),it=this._binToFreq(et+1),nt=Math.log2(Ye/Qe)/Math.log2(it/Qe);return[et,nt]};let Ne,Me,ke;if(Te){const Ye=(st,rt,tt)=>+st.toPrecision(tt?Math.max(rt,1+Math.log10(st)|0):rt),et=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],tt=Math.log10(st)|0,at=st/10**tt;let ut=1;for(;ut<rt.length&&at>rt[ut];)ut++;return at-rt[ut-1]<rt[ut]-at&&ut--,(rt[ut]*10**(tt+5)|0)/1e5},Qe=[0,24,12,8,6,4,3,2,1][J],it=I?10**(3/(Qe*10)):2**(1/Qe),nt=it**.5;let ot=I?7.94328235/(Qe%2?1:nt):C_1;do{let st=ot;const rt=Ye(st/nt,4,!0),tt=Ye(st*nt,4,!0),[at,ut]=$e(rt),[mt,pt]=$e(tt);I?st=Qe<4?et(st):Ye(st,st.toString()[0]<5?3:2):st=Ye(st,4,!0),st>=Y&&He({posX:0,freq:st,freqLo:rt,freqHi:tt,binLo:at,binHi:mt,ratioLo:ut,ratioHi:pt}),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]=$e(Y)),Je.freqHi>X&&(Je.freqHi=X,[Je.binHi,Je.ratioHi]=$e(X))}else if(Re){const Ye=[0,24,12,8,6,4,3,2,1][J]*10,et=Qe=>{switch(this._frequencyScale){case SCALE_BARK:return 1960/(26.81/(Qe+.53)-1);case SCALE_MEL:return 700*(2**Qe-1);case SCALE_LINEAR:return Qe}};Ne=Xe/Ye,Me=this._freqScaling(Y),ke=Xe/(this._freqScaling(X)-Me);for(let Qe=0,it=0;Qe<Ye;Qe++,it+=Ne){const nt=et(Me+it/ke),ot=et(Me+(it+Ne/2)/ke),Ze=et(Me+(it+Ne)/ke),[Je,st]=$e(nt),[rt,tt]=$e(Ze);He({posX:We+it,freq:ot,freqLo:nt,freqHi:Ze,binLo:Je,binHi:rt,ratioLo:st,ratioHi:tt})}}else{Ne=1,Me=this._freqScaling(Y),ke=Xe/(this._freqScaling(X)-Me);const Ye=this._freqToBin(Y,"floor"),et=this._freqToBin(X);let Qe=-999;for(let it=Ye;it<=et;it++){const nt=this._binToFreq(it),ot=We+Math.round(ke*(this._freqScaling(nt)-Me));if(ot>Qe)He({posX:ot,freq:nt,freqLo:nt,freqHi:nt,binLo:it,binHi:it,ratioLo:0,ratioHi:0}),Qe=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),et=[[],[128,3,.45],[128,4,.225],[96,6,.225],[80,6,.225],[80,6,.125],[64,6,.125],[48,8,.125],[24,16,.125]],Qe=this._ledParams,[it,nt,ot]=Qe||et[J];let Ze,Je=Ve;if(Qe){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),Qe||(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,et)=>{let Qe=Ye.posX,it=Ne;Re&&(B==0&&!we?(Qe|=0,it|=0,et>0&&Qe>E[et-1].posX+E[et-1].width&&(Qe--,it++)):Qe+=Math.max(we?Ge:0,qe)/2,Ye.posX=Qe),Ye.barCenter=Qe+(Ne==1?0:it/2),Ye.width=it});const Ke=[];for(const Ye of[0,1]){const et=V==CHANNEL_VERTICAL?(De+Ue)*Ye:0,Qe=et+De,it=et+Ve-(!we||Le?0:Be);Ke.push({channelTop:et,channelBottom:Qe,analyzerBottom:it})}this._aux={analyzerHeight:Ve,analyzerWidth:Xe,centerX:_e,centerY:Se,channelCoords:Ke,channelHeight:De,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),De=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 $e=0;$e<12;$e++){if(ze>=this._minFreq&&ze<=this._maxFreq){const Ne=we[$e],Me=Ne=="C";(Ne&&J&&!K&&!Re||Me)&&Ae.push(J?[ze,Ne+(Me?He:"")]:ze)}ze*=De}}Ee.width=Ee.height=(B<<1)+Te*Pe;const Ve=Ee.width>>1,Xe=Ve-Pe*.7,Ue=(ze,He)=>{const $e=TAU*(ze/X.width),Ne=$e-HALF_PI,Me=Xe*Math.cos(Ne),ke=Xe*Math.sin(Ne);_e.save(),_e.translate(Ve+Me,Ve+ke),_e.rotate($e),_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,$e]=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=$e[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($e[0]))continue}Ne>=We+Oe/2&&Ne<=E&&(Z.fillText($e,Re&&K==-1?E-Ne:I+Ne,Me,Ge),(Re||K&&(Ne>Oe||K==1))&&Z.fillText($e,Re&&K!=1?E+Ne:(I||X.width)-Ne,Me,Ge),We=Ne+Math.min(Ge,Z.measureText($e).width)/2),Ne>=je+Le&&Ne<E-Le&&(Ue(Re&&K==1?E-Ne:Ne,$e),(Re||K&&(Ne>Le||K==1))&&Ue(Re&&K!=-1?E+Ne:-Ne,$e),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:De,_chLayout:Ve,_colorMode:Xe,_ctx:Ue,_energy:We,fillAlpha:je,_fps:ze,_linearAmplitude:He,_lineWidth:$e,maxDecibels:Ne,minDecibels:Me,_mirror:ke,_mode:Ge,overlay:Be,_radial:qe,showBgColor:Ke,showPeaks:Ye,useCanvas:et,_weightingFilter:Qe}=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,tt=Y&&this._trueLeds&&Xe==COLOR_GRADIENT,at=qe?Le.width:this._aux.analyzerWidth,ut=Pe+at,mt=Ye&&this._peakLine&&Ge==MODE_GRAPH,pt=qe?Fe-Ie:Se,[yt,gt,_t,Pt]=this._leds||[];We.val>0&&(this._spinAngle+=this._spinSpeed*TAU/(60*ze));const It=lt=>{if(this._reflexRatio>0&&!K&&!qe){let dt,$t;this.reflexFit||st?(dt=st&&lt==0?Te+we:0,$t=Te-Se):(dt=Le.height-Se*2,$t=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,dt,Le.width,$t),Ue.restore()}},St=()=>{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))},Lt=lt=>{const dt=lt**2,$t=424.36,Et=11599.29,Qt=25122.25,Bt=544496.41,Nt=148693636,zt=Ht=>20*Math.log10(Ht);switch(Qe){case FILTER_A:const Ht=Nt*dt**2/((dt+$t)*Math.sqrt((dt+Et)*(dt+Bt))*(dt+Nt));return 2+zt(Ht);case FILTER_B:const jt=Nt*dt*lt/((dt+$t)*Math.sqrt(dt+Qt)*(dt+Nt));return .17+zt(jt);case FILTER_C:const rr=Nt*dt/((dt+$t)*(dt+Nt));return .06+zt(rr);case FILTER_D:const Jt=((103791848e-2-dt)**2+108076816e-2*dt)/((9837328-dt)**2+11723776*dt),ir=lt/68966888496476e-18*Math.sqrt(Jt/((dt+79919.29)*(dt+1345600)));return zt(ir);case FILTER_468:const er=-4737338981378384e-39*lt**6+2043828333606125e-30*lt**4-1363894795463638e-22*dt+1,Xt=1306612257412824e-34*lt**5-2118150887518656e-26*lt**3+.0005559488023498642*lt,Rt=.0001246332637532143*lt/Math.hypot(er,Xt);return 18.2+zt(Rt)}return 0},At=(lt,dt,$t)=>{Ue.beginPath(),Ue.moveTo(lt,dt),Ue.lineTo(lt,$t),Ue.stroke()},kt=lt=>{if(lt&&$e){const dt=Ue.globalAlpha;Ue.globalAlpha=1,Ue.stroke(),Ue.globalAlpha=dt}},Mt=lt=>Math.max(0,(lt*yt|0)*(Pt+_t)-_t),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:dt,channelBottom:$t,analyzerBottom:Et}=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 ht=it.height,ft=ht>>1,ct=He?100:Ne,vt=He?0:Me,bt=He?20:5,wt=Se/(ct-vt),Dt=ke!=-1&&(!Je||lt==0||ke==1),Gt=ke!=1&&(!Je||lt!=ke);Ue.save(),Ue.fillStyle=SCALEY_LABEL_COLOR,Ue.font=`${ft}px ${FONT_FAMILY}`,Ue.textAlign="right",Ue.lineWidth=1;for(let Ut=ct;Ut>vt;Ut-=bt){const Yt=dt+(ct-Ut)*wt,Tt=Ut%2==0|0;if(Tt){const Ct=Yt+ft*(Yt==dt?.8:.35);Dt&&Ue.fillText(Ut,ht*.85,Ct),Gt&&Ue.fillText(Ut,(Je?at:Le.width)-ht*.1,Ct),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+ht*Tt*Dt,~~Yt+.5),Ue.lineTo(ut-ht*Tt*Gt,~~Yt+.5),Ue.stroke()}Ue.restore()},er=(ht,ft)=>{const ct=Ot[ht]+(ht<Ot.length-1?(Ot[ht+1]-Ot[ht])*ft:0);return isNaN(ct)?-1/0:ct},Xt=(ht,ft=Jt)=>ft*TAU*((ht+rr)/Le.width)+this._spinAngle,Rt=(ht,ft,ct)=>{const vt=Ie+ft*Ht,bt=Xt(ht,ct);return[Ee+vt*Math.cos(bt),Ae+vt*Math.sin(bt)]},sr=(ht,ft,ct,vt,bt)=>{Ue.beginPath();for(const wt of ke&&!Je?[1,-1]:[Jt]){const[Dt,Gt]=Z?[Xt(ht,wt),Xt(ht+ct,wt)]:[];Ue.moveTo(...Rt(ht,ft,wt)),Ue.lineTo(...Rt(ht,ft+vt,wt)),Z?Ue.arc(Ee,Ae,Ie+(ft+vt)*Ht,Dt,Gt,wt!=1):Ue.lineTo(...Rt(ht+ct,ft+vt,wt)),Ue.lineTo(...Rt(ht+ct,ft,wt)),Z&&!bt&&Ue.arc(Ee,Ae,Ie+ft*Ht,Gt,Dt,wt==1)}kt(bt),Ue.fill()},nr=(ht=0,ft=0)=>{let ct;if(Xe==COLOR_GRADIENT&&!tt||Ge==MODE_GRAPH)ct=De[lt];else{const vt=Xe==COLOR_BAR_INDEX?ft%Nt:Bt.findLastIndex(bt=>Y?Mt(ht)<=Mt(bt.level):ht<=bt.level);ct=Bt[vt].color}Ue.fillStyle=Ue.strokeStyle=ct};if(et){if(Je&&!qe){const ht=at*(lt+jt),ft=jt?-1:1;Ue.setTransform(ft,0,0,1,ht,0)}if((!Be||Ke)&&(Be&&(Ue.globalAlpha=this.bgAlpha),Ue.fillStyle=zt,(lt==0||!qe&&!Ze)&&Ue.fillRect(Pe,dt-we,at,(Be&&this.reflexAlpha==1?Se:Te)+we),Ue.globalAlpha=1),this.showScaleY&&!K&&!qe&&(lt==0||!Ze)&&ir(),Y?(Ue.setLineDash([Pt,_t]),Ue.lineWidth=Oe[0].width):Ue.lineWidth=xe?Math.min($e,Oe[0].width/2):$e,Ue.save(),!qe){const ht=new Path2D;ht.rect(0,dt,Le.width,Se),Ue.clip(ht)}}let Ot=this._fftData[lt];this._analyzer[lt].getFloatFrequencyData(Ot),Qe&&(Ot=Ot.map((ht,ft)=>ht+Lt(this._binToFreq(ft)))),Ue.beginPath();let Zt=[];for(let ht=0;ht<ar;ht++){const ft=Oe[ht],{posX:ct,barCenter:vt,width:bt,freq:wt,binLo:Dt,binHi:Gt,ratioLo:Ut,ratioHi:Yt}=ft;let Tt=Math.max(er(Dt,Ut),er(Gt,Yt));for(let xt=Dt+1;xt<Gt;xt++)Ot[xt]>Tt&&(Tt=Ot[xt]);if(Tt=this._normalizedB(Tt),ft.value[lt]=Tt,Vt+=Tt,ft.peak[lt]>0&&(ft.hold[lt]--,ft.hold[lt]<0&&(ft.peak[lt]+=ft.hold[lt]/(ot*ot/2))),Tt>=ft.peak[lt]&&(ft.peak[lt]=Tt,ft.hold[lt]=ot),!et)continue;K||V?Ue.globalAlpha=Tt:xe&&(Ue.globalAlpha=je),nr(Tt,ht);const Ct=K?pt:Y?Mt(Tt):Tt*pt|0;if(Ge==MODE_GRAPH){const xt=ht?0:(this._normalizedB(Ot[Oe[1].binLo])*pt+Ct)/2;if(qe){if(ht==0&&(Je&&Ue.moveTo(...Rt(0,0)),Ue.lineTo(...Rt(0,ct<0?xt:Ct))),ct>=0){const Ft=[ct,Ct];Ue.lineTo(...Rt(...Ft)),Zt.push(Ft)}}else{if(ht==0)if(ke==-1&&!Je)Ue.moveTo(Pe,Et-(ct<Pe?xt:Ct));else{const Ft=Dt?this._normalizedB(Ot[Dt-1])*pt:Ct;Ue.moveTo(Pe-$e,Et-Ft)}(Je||ke!=-1||ct>=Pe)&&Ue.lineTo(ct,Et-Ct)}}else if(Y){if(Ke&&!Be&&(lt==0||!Ze)){const xt=Ue.globalAlpha;Ue.strokeStyle=LEDS_UNLIT_COLOR,Ue.globalAlpha=1,At(vt,dt,Et),Ue.strokeStyle=Ue.fillStyle,Ue.globalAlpha=xt}if(tt){const xt=K?0:Bt.findLastIndex(Wt=>Mt(Tt)<=Mt(Wt.level));let Ft=Et;for(let Wt=Nt-1;Wt>=xt;Wt--){Ue.strokeStyle=Bt[Wt].color;let lr=Et-(Wt==xt?Ct:Mt(Bt[Wt].level));At(vt,Ft,lr),Ft=lr-_t}}else At(vt,Et,Et-Ct)}else if(ct>=Pe)if(qe)sr(ct,0,bt,Ct,xe);else if(Z){const xt=bt/2,Ft=Et+xt;Ue.beginPath(),Ue.moveTo(ct,Ft),Ue.lineTo(ct,Ft-Ct),Ue.arc(vt,Ft-Ct,xt,PI,TAU),Ue.lineTo(ct+bt,Ft),kt(xe),Ue.fill()}else{const xt=xe?Ue.lineWidth:0;Ue.beginPath(),Ue.rect(ct,Et+xt,bt,-Ct-xt),kt(xe),Ue.fill()}const Kt=ft.peak[lt];if(Kt>0&&Ye&&!mt&&!K&&ct>=Pe&&ct<ut)if(xe&&$e>0?Ue.globalAlpha=1:V&&(Ue.globalAlpha=Kt),(Xe==COLOR_BAR_LEVEL||tt)&&nr(Kt),Y){const xt=Mt(Kt);xt>=_t&&Ue.fillRect(ct,Et-xt,bt,Pt)}else qe?Ge!=MODE_GRAPH&&sr(ct,Kt*pt,bt,-2):Ue.fillRect(ct,Et-Kt*pt,bt,2)}if(et){if(Ue.globalAlpha=1,Ge==MODE_GRAPH){if(nr(),qe&&!Je){if(ke){let ht;for(;ht=Zt.pop();)Ue.lineTo(...Rt(...ht,-1))}Ue.closePath()}if($e>0&&Ue.stroke(),je>0){if(qe){const ht=Je?Xt(at>>1):0,ft=Je?Xt(at):TAU;Ue.moveTo(...Rt(Je?at>>1:0,0)),Ue.arc(Ee,Ae,Ie,ht,ft,Je?!jt:!0)}else Ue.lineTo(ut,Et),Ue.lineTo(Pe,Et);Ue.globalAlpha=je,Ue.fill(),Ue.globalAlpha=1}if((mt||qe&&Ye)&&(Zt=[],Ue.beginPath(),Oe.forEach((ht,ft)=>{let ct=ht.posX,vt=ht.peak[lt],bt=ft?"lineTo":"moveTo";if(qe&&ct<0){const wt=Oe[ft+1];vt=findY(ct,vt,wt.posX,wt.peak[lt],0),ct=0}vt*=pt,mt?(Ue[bt](...qe?Rt(ct,vt):[ct,Et-vt]),qe&&ke&&!Je&&Zt.push([ct,vt])):vt>0&&sr(ct,vt,1,-2)}),mt)){let ht;for(;ht=Zt.pop();)Ue.lineTo(...Rt(...ht,-1));Ue.lineWidth=1,Ue.stroke()}}Ue.restore(),Je&&!qe&&Ue.setTransform(1,0,0,1,0,0),(!Je&&!Ze||lt)&&It(lt)}}if(qt(Vt/(ar<<or-1)),et&&(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([]),St()),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=De[0],this.onCanvasDraw(this,{timestamp:E,_canvasGradients:De}),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,De)=>{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-De;Le=Te[Xe],Ve=1-Le.pos/2}else De==0&&Ve>0&&Pe.addColorStop(.5,Le.color),Ve+=.5;Pe.addColorStop(Ve,Le.color),_e&&De==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:De=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 $e=(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:$e,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:De,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,De,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,De,Ve,Xe;for(Fe=Oe=Le=De=Ve=Xe=0,Ae=0;Ae<X;){if(De===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[De++]=Pe[Ee],Se=Ee,Le=Ee;continue}for(_e=Ee,Ee==Y&&(Ie[De++]=Le,Ee=Se);Ee>K;)Ie[De++]=Pe[Ee],Ee=we[Ee];Le=Pe[Ee]&255,Ie[De++]=Le,Y<U&&(we[Y]=Se,Pe[Y]=Le,Y++,!(Y&J)&&Y<U&&(xe++,J+=Y)),Se=_e}De--,Te[Ve++]=Ie[De],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:De=0,x:Ve,y:Xe,colorCorrection:Ue={}},pointerdown:We}=C,{frames:je,delays:ze}=Z;useWorkerParser(Ee,_e);const{temperatureFilter:He,sharpnessFilter:$e,hueFilter:Ne,blurFilter:Me,adjustmentFilter:ke,vignetteFilter:Ge,noiseFilter:Be}=withFiltersHook(Ue),{blurRadius:qe=0,vignette:Ke=0,noise:Ye=0}=Ue,et=.1;React__namespace.useEffect(()=>{if(!isEmpty$1(je)){const Ze=map$1(je,st=>{const{data:rt,width:tt,height:at}=st,ut=new Uint8Array(rt);return PIXI__namespace.Texture.fromBuffer(ut,tt,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 Qe=()=>{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/et;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:Qe,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:De,animationSpeed:1,alpha:Fe?1:0,loop:Ie,textures:U,onComplete:nt,anchor:.5,forwardRef:Y,...!Oe&&Fe&&{interactive:!0,pointerdown:We},filters:[He,$e,Ne,ke,...qe>0?[Me]:[],...Ke>0?[Ge]:[],...Ye>0?[Be]:[]]})})})}),PixiTextSprite=React__namespace.forwardRef((C,E)=>{const B=React.useRef(null),U=React.useRef(0),V=React.useRef(null),X=React.useRef(null),Y=React.useRef(16),K=React.useRef(null),{visible:J,text:xe,disabled:Z,transformation:_e,pointerdown:Se,onDobuleClick:Ee}=C,{x:Ae,y:Re,fontFamily:Te="Arial",fontWeight:we="normal",fontStyle:Pe="normal",fontSize:Ie=16,fontVariant:Fe="normal",fill:Oe="black",stroke:Le,strokeThickness:De=0,blurRadius:Ve=0,blurEnabled:Xe=!1,dropShadowColor:Ue=null,dropShadow:We=!1,dropShadowBlur:je=0,wordWrapWidth:ze=5e7,leading:He=0,letterSpacing:$e,colorCorrection:Ne={}}=_e,{temperatureFilter:Me,sharpnessFilter:ke,hueFilter:Ge,blurFilter:Be,adjustmentFilter:qe}=withFiltersHook(Ne),{blurRadius:Ke=0}=Ne;React__namespace.useEffect(()=>{Y.current=Number(Ie)},[Ie]);const Ye=["italic","oblique"].includes(Pe)?Pe:void 0,et=["small-caps"].includes(Fe),Qe=["bold","bolder","lighter","100","200","300"].includes(we)?we:void 0,it=Number($e)>0?$e:void 0,nt=React__namespace.useMemo(()=>new PIXI__namespace.TextStyle({fontFamily:Te,fontSize:Ie,fill:Oe||"white",...Le&&De>0&&{stroke:Le,strokeThickness:De},...Ye&&{fontStyle:Ye},...et&&{fontVariant:et},...Qe&&{fontWeight:Qe},...it&&{letterSpacing:it},...Xe&&{dropShadow:!0,dropShadowBlur:Number(Ve),dropShadowColor:(Ue==null?void 0:Ue.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...We&&{dropShadow:!0,dropShadowBlur:Number(je),dropShadowColor:(Ue==null?void 0:Ue.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:ze||500,leading:He||0}),[Xe,Ve,Oe,Te,Ie,Pe,He,Ye,Qe,et,it,Ue,Le,De,ze,We,je]);React__namespace.useEffect(()=>{K.current={..._e}},[_e]);const ot=()=>{const Je=new Date().getTime();Je-U.current<300&&Ee?Ee():Se&&Se(),U.current=Je},Ze=()=>{!Z&&Ee&&Ee()};return jsxRuntimeExports.jsx(AbstractContainer,{...C,ref:E,isText:!0,onDoubleClick:Ze,children:jsxRuntimeExports.jsx(react.Container,{ref:B,children:jsxRuntimeExports.jsx(react.Container,{alpha:1,ref:X,children:jsxRuntimeExports.jsx(react.Text,{style:nt,x:Ae,y:Re,anchor:.5,text:xe,alpha:J?1:0,...J&&!Z&&{interactive:!0,buttonMode:!0,pointerdown:ot},ref:V,filters:[Me,ke,Ge,qe,...Ke>0?[Be]:[]]})})})})});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,De=U;return B=U=void 0,J=Oe,X=C.apply(De,Le),X}function Ee(Oe){return J=Oe,Y=setTimeout(Te,E),xe?Se(Oe):X}function Ae(Oe){var Le=Oe-K,De=Oe-J,Ve=E-Le;return Z?nativeMin(Ve,V-De):Ve}function Re(Oe){var Le=Oe-K,De=Oe-J;return K===void 0||Le>=E||Le<0||Z&&De>=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:De={}},pointerdown:Ve=()=>{},pointerout:Xe=()=>{},pointerover:Ue=()=>{},fps:We=0}=C,{tl:je,dragModeRef:ze,isRemotion:He}=React.useContext(GsapPixieContext),{onPointerDown:$e,onPointerOut:Ne,onPointerOver:Me}=useDebouncedPointerEvents(Ue,Ve,Xe,1),{blurRadius:ke=0,vignette:Ge=0,noise:Be=0}=De,{temperatureFilter:qe,sharpnessFilter:Ke,hueFilter:Ye,blurFilter:et,adjustmentFilter:Qe,vignetteFilter:it,noiseFilter:nt}=withFiltersHook(De),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 ut=Y.current,mt=ut.currentTime>0&&!ut.paused&&!ut.ended&&ut.readyState>ut.HAVE_CURRENT_DATA;je.current&&je.current.isActive()&&J.current&&J.current.isActive()&&(mt||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=()=>{},tt=()=>{var at,ut;if(J.current&&(K.current.progress=J.current.progress()),Y.current&&J.current){const mt=Ae+((at=J==null?void 0:J.current)==null?void 0:at.time()),pt=Math.abs(Y.current.currentTime-mt),yt=Y.current,gt=yt.currentTime>0&&!yt.paused&&!yt.ended&&yt.readyState>yt.HAVE_CURRENT_DATA;ze.current&&U.current?(Y.current.currentTime=mt,U.current.update(),K.current.isPlaying=!1):(gt!==K.current.isPlaying||!gt)&&K.current.progress>.01&&K.current.progress<.99?(ut=je.current)!=null&&ut.isActive()&&J.current&&J.current.isActive()&&(gt||Y.current.play(),K.current.isPlaying=!0):pt>.3&&K.current.progress>.01&&K.current.progress<.99&&(Y.current.currentTime=mt)}};return React.useEffect(()=>{let at=gsap$2.context(()=>{});if(X.current&&je.current){const ut={duration:Number(Ee)-Number(Se),onStart:Je,onComplete:st,onStartParams:[Ae,Re],onCompleteParams:[],onInterrupt:rt,onUpdate:tt,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,ut,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,ut=function(){Y.current&&(Y.current.currentTime=at,Y.current.muted=Z)},mt=function(){K.current.isWaiting=!1,K.current.isStalled=!1},pt=function(){K.current.isWaiting=!0,K.current.isStalled=!1},yt=function(){K.current.isWaiting=!1,K.current.isStalled=!1},gt=function(){K.current.isWaiting=!1,K.current.isStalled=!0},_t=Math.round((Number(Ae)+Number.EPSILON)*100)/100,Pt=Math.round((Number(Re)+Number.EPSILON)*100)/100,It=`${ot}#t=${_t},${Pt}`;return PIXI__namespace.Texture.fromLoader(Ze,It,xe,{pixiIdPrefix:xe,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:We?Math.max(120,Number(We)):30}}).then(St=>{St&&(U.current=St,B(!0),Y.current=St.baseTexture.resource.source,Y.current.id=xe,Y.current.addEventListener("loadedmetadata",ut),Y.current.addEventListener("ended",mt),Y.current.addEventListener("loadstart",pt),Y.current.addEventListener("canplaythrough",yt),Y.current.addEventListener("stalled",gt))}),()=>{Y.current&&(Y.current.pause(),Y.current.removeEventListener("loadedmetadata",ut),Y.current.removeEventListener("ended",mt),Y.current.removeEventListener("loadstart",pt),Y.current.removeEventListener("canplaythrough",yt),Y.current.removeEventListener("stalled",gt))}},[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:$e,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,Qe,...ke>0?[et]:[],...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:De=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 $e=U.current.texture.baseTexture;$e&&$e.update(),V.current&&we.renderer.render(V.current)}}),React__namespace.useEffect(()=>{if(!isEmpty$1(Te)){const $e=PIXI__namespace.Texture.from(Te);B($e)}},[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]:[],...De>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:De=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 $e=U.current.texture.baseTexture;$e&&$e.update(),V.current&&we.renderer.render(V.current)}}),React__namespace.useEffect(()=>{if(!isEmpty$1(Te)){const $e=PIXI__namespace.Texture.from(Te);B($e)}},[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]:[],...De>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,$e){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,$e),Re(Ne.layers,$e)):Ne.ty===4?Ie(Ne.shapes):Ne.ty===5&&je(Ne)}}function Te(He,$e){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,$e),Re(He[Ne].data.layers,$e))}}function we(He,$e){for(var Ne=0,Me=$e.length;Ne<Me;){if($e[Ne].id===He)return $e[Ne];Ne+=1}return null}function Pe(He,$e){var Ne=we(He,$e);return Ne?Ne.layers.__used?JSON.parse(JSON.stringify(Ne.layers)):(Ne.layers.__used=!0,Ne.layers):null}function Ie(He){var $e,Ne=He.length,Me,ke;for($e=Ne-1;$e>=0;$e-=1)if(He[$e].ty==="sh")if(He[$e].ks.k.i)Fe(He[$e].ks.k);else for(ke=He[$e].ks.k.length,Me=0;Me<ke;Me+=1)He[$e].ks.k[Me].s&&Fe(He[$e].ks.k[Me].s[0]),He[$e].ks.k[Me].e&&Fe(He[$e].ks.k[Me].e[0]);else He[$e].ty==="gr"&&Ie(He[$e].it)}function Fe(He){var $e,Ne=He.i.length;for($e=0;$e<Ne;$e+=1)He.i[$e][0]+=He.v[$e][0],He.i[$e][1]+=He.v[$e][1],He.o[$e][0]+=He.v[$e][0],He.o[$e][1]+=He.v[$e][1]}function Oe(He,$e){var Ne=$e?$e.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 $e(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&&$e(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)}}}(),De=function(){var He=[4,7,99];return function($e){if($e.chars&&!Oe(He,$e.v)){var Ne,Me=$e.chars.length;for(Ne=0;Ne<Me;Ne+=1){var ke=$e.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}},$e.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 $e(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&&$e(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 $e(Me){var ke,Ge=Me.length,Be,qe;for(ke=0;ke<Ge;ke+=1)if(Me[ke].ty==="gr")$e(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&&$e(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 $e(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"&&$e(Me[ke].it)}function Ne(Me){var ke,Ge,Be=Me.length,qe,Ke,Ye,et;for(Ge=0;Ge<Be;Ge+=1){if(ke=Me[Ge],ke.hasMask){var Qe=ke.masksProperties;for(Ke=Qe.length,qe=0;qe<Ke;qe+=1)if(Qe[qe].pt.k.i)Qe[qe].pt.k.c=Qe[qe].cl;else for(et=Qe[qe].pt.k.length,Ye=0;Ye<et;Ye+=1)Qe[qe].pt.k[Ye].s&&(Qe[qe].pt.k[Ye].s[0].c=Qe[qe].cl),Qe[qe].pt.k[Ye].e&&(Qe[qe].pt.k[Ye].e[0].c=Qe[qe].cl)}ke.ty===4&&$e(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),De(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=De,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(De){Fe&&Fe(De)}};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
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($e){for(var Ne=0,Me=$e.target;Ne<B;)E[Ne].animation===Me&&(E.splice(Ne,1),Ne-=1,B-=1,Me.isPaused||Z()),Ne+=1}function K($e,Ne){if(!$e)return null;for(var Me=0;Me<B;){if(E[Me].elem===$e&&E[Me].elem!==null)return E[Me].animation;Me+=1}var ke=new AnimationItem;return _e(ke,$e),ke.setData($e,Ne),ke}function J(){var $e,Ne=E.length,Me=[];for($e=0;$e<Ne;$e+=1)Me.push(E[$e].animation);return Me}function xe(){U+=1,Xe()}function Z(){U-=1}function _e($e,Ne){$e.addEventListener("destroy",Y),$e.addEventListener("_active",xe),$e.addEventListener("_idle",Z),E.push({elem:Ne,animation:$e}),B+=1}function Se($e){var Ne=new AnimationItem;return _e(Ne,null),Ne.setParams($e),Ne}function Ee($e,Ne){var Me;for(Me=0;Me<B;Me+=1)E[Me].animation.setSpeed($e,Ne)}function Ae($e,Ne){var Me;for(Me=0;Me<B;Me+=1)E[Me].animation.setDirection($e,Ne)}function Re($e){var Ne;for(Ne=0;Ne<B;Ne+=1)E[Ne].animation.play($e)}function Te($e){var Ne=$e-I,Me;for(Me=0;Me<B;Me+=1)E[Me].animation.advanceTime(Ne);I=$e,U&&!X?window.requestAnimationFrame(Te):V=!0}function we($e){I=$e,window.requestAnimationFrame(Te)}function Pe($e){var Ne;for(Ne=0;Ne<B;Ne+=1)E[Ne].animation.pause($e)}function Ie($e,Ne,Me){var ke;for(ke=0;ke<B;ke+=1)E[ke].animation.goToAndStop($e,Ne,Me)}function Fe($e){var Ne;for(Ne=0;Ne<B;Ne+=1)E[Ne].animation.stop($e)}function Oe($e){var Ne;for(Ne=0;Ne<B;Ne+=1)E[Ne].animation.togglePause($e)}function Le($e){var Ne;for(Ne=B-1;Ne>=0;Ne-=1)E[Ne].animation.destroy($e)}function De($e,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],$e);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,$e)}}function Ve(){var $e;for($e=0;$e<B;$e+=1)E[$e].animation.resize()}function Xe(){!X&&U&&V&&(window.requestAnimationFrame(we),V=!1)}function Ue(){X=!0}function We(){X=!1,Xe()}function je($e,Ne){var Me;for(Me=0;Me<B;Me+=1)E[Me].animation.setVolume($e,Ne)}function ze($e){var Ne;for(Ne=0;Ne<B;Ne+=1)E[Ne].animation.mute($e)}function He($e){var Ne;for(Ne=0;Ne<B;Ne+=1)E[Ne].animation.unmute($e)}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=De,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 De=new Te([we,Pe,Ie,Fe]);return E[Le]=De,De}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,De,Ve=0;do De=Pe+(Ie-Pe)/2,Le=Se(De,Fe,Oe)-we,Le>0?Ie=De:Pe=De;while(Math.abs(Le)>V&&++Ve<X);return De}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 De=Se(Pe,Ie,Fe)-we;Pe-=De/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,De=1,Ve=Y-1;De!==Ve&&Oe[De]<=Pe;++De)Le+=K;--De;var Xe=(Pe-Oe[De])/(Oe[De+1]-Oe[De]),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)),De;return Fe>Oe?Fe>Le?De=Fe-Oe-Le:De=Le-Oe-Fe:Le>Oe?De=Le-Oe-Fe:De=Oe-Fe-Le,De>-1e-4&&De<1e-4}var B=function(){return function(_e,Se,Ee,Ae){var Re=getDefaultCurveSegments(),Te,we,Pe,Ie,Fe,Oe=0,Le,De=[],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],De[we]=Ie,Ve[we]!==null&&(Le+=bmPow(De[we]-Ve[we],2)),Ve[we]=De[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,De=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),De+=Ve,We.points[Pe]=new X(Ve,Xe),Ue=Xe}We.segmentLength=De,_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,De=1-Ie,Ve=Le*Le*Le,Xe=Pe*Le*Le*3,Ue=Pe*Pe*Le*3,We=Pe*Pe*Pe,je=Le*Le*De,ze=Pe*Le*De+Le*Pe*De+Le*Le*Ie,He=Pe*Pe*De+Le*Pe*Ie+Pe*Le*Ie,$e=Pe*Pe*Ie,Ne=Le*De*De,Me=Pe*De*De+Le*Ie*De+Le*De*Ie,ke=Pe*Ie*De+Le*Ie*Ie+Pe*De*Ie,Ge=Pe*Ie*Ie,Be=De*De*De,qe=Ie*De*De+De*Ie*De+De*De*Ie,Ke=Ie*Ie*De+De*Ie*Ie+Ie*De*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]+$e*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,De=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(De+=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>=De&&Oe<De+Ie.points[Ae+1].partialLength){for(Le=(Oe-De)/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=De-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),$e=(C-we)/(Te-we);quaternionToEuler(B,slerp(ze,He,$e))}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,De,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,$e=ze.length-1,Ne=!0,Me,ke,Ge;Ne&&(Me=ze[He],ke=ze[He+1],!(ke.t-this.offsetTime>Te));)He<$e-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,De=0;De<Xe;De+=1)for(Ve=0;Ve<Ue;Ve+=1)je=Le?Fe.i[De][Ve]:Fe.i[De][Ve]+(Oe.i[De][Ve]-Fe.i[De][Ve])*We,we.i[De][Ve]=je,je=Le?Fe.o[De][Ve]:Fe.o[De][Ve]+(Oe.o[De][Ve]-Fe.o[De][Ve])*We,we.o[De][Ve]=je,je=Le?Fe.v[De][Ve]:Fe.v[De][Ve]+(Oe.v[De][Ve]-Fe.v[De][Ve])*We,we.v[De][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,De=this.d!==3,Ve=this.v;Ve.v[0][0]=Ie,Ve.v[0][1]=Fe-Le,Ve.v[1][0]=De?Ie+Oe:Ie-Oe,Ve.v[1][1]=Fe,Ve.v[2][0]=Ie,Ve.v[2][1]=Fe+Le,Ve.v[3][0]=De?Ie-Oe:Ie+Oe,Ve.v[3][1]=Fe,Ve.i[0][0]=De?Ie-Oe*Te:Ie+Oe*Te,Ve.i[0][1]=Fe-Le,Ve.i[1][0]=De?Ie+Oe:Ie-Oe,Ve.i[1][1]=Fe-Le*Te,Ve.i[2][0]=De?Ie+Oe*Te:Ie-Oe*Te,Ve.i[2][1]=Fe+Le,Ve.i[3][0]=De?Ie-Oe:Ie+Oe,Ve.i[3][1]=Fe+Le*Te,Ve.o[0][0]=De?Ie+Oe*Te:Ie-Oe*Te,Ve.o[0][1]=Fe-Le,Ve.o[1][0]=De?Ie+Oe:Ie-Oe,Ve.o[1][1]=Fe+Le*Te,Ve.o[2][0]=De?Ie-Oe*Te:Ie+Oe*Te,Ve.o[2][1]=Fe+Le,Ve.o[3][0]=De?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,De=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,$e=-Math.PI/2;$e+=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?De:Ve,He=Fe?Xe:Ue;var Me=je*Math.cos($e),ke=je*Math.sin($e),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,$e+=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),De,Ve=-Math.PI*.5,Xe=this.data.d===3?-1:1;for(Ve+=this.r.v,this.v._length=0,De=0;De<Pe;De+=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,De,!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),De=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+De,0,!0),this.v.setTripleAt(Pe+Fe,Ie+Oe-Le,Pe+Fe,Ie+Oe-De,Pe+Fe,Ie+Oe-Le,1,!0),Le!==0?(this.v.setTripleAt(Pe+Fe-Le,Ie+Oe,Pe+Fe-Le,Ie+Oe,Pe+Fe-De,Ie+Oe,2,!0),this.v.setTripleAt(Pe-Fe+Le,Ie+Oe,Pe-Fe+De,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-De,4,!0),this.v.setTripleAt(Pe-Fe,Ie-Oe+Le,Pe-Fe,Ie-Oe+De,Pe-Fe,Ie-Oe+Le,5,!0),this.v.setTripleAt(Pe-Fe+Le,Ie-Oe,Pe-Fe+Le,Ie-Oe,Pe-Fe+De,Ie-Oe,6,!0),this.v.setTripleAt(Pe+Fe-Le,Ie-Oe,Pe+Fe-De,Ie-Oe,Pe+Fe-Le,Ie-Oe,7,!0)):(this.v.setTripleAt(Pe-Fe,Ie+Oe,Pe-Fe+De,Ie+Oe,Pe-Fe,Ie+Oe,2),this.v.setTripleAt(Pe-Fe,Ie-Oe,Pe-Fe,Ie-Oe+De,Pe-Fe,Ie-Oe,3))):(this.v.setTripleAt(Pe+Fe,Ie-Oe+Le,Pe+Fe,Ie-Oe+De,Pe+Fe,Ie-Oe+Le,0,!0),Le!==0?(this.v.setTripleAt(Pe+Fe-Le,Ie-Oe,Pe+Fe-Le,Ie-Oe,Pe+Fe-De,Ie-Oe,1,!0),this.v.setTripleAt(Pe-Fe+Le,Ie-Oe,Pe-Fe+De,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+De,3,!0),this.v.setTripleAt(Pe-Fe,Ie+Oe-Le,Pe-Fe,Ie+Oe-De,Pe-Fe,Ie+Oe-Le,4,!0),this.v.setTripleAt(Pe-Fe+Le,Ie+Oe,Pe-Fe+Le,Ie+Oe,Pe-Fe+De,Ie+Oe,5,!0),this.v.setTripleAt(Pe+Fe-Le,Ie+Oe,Pe+Fe-De,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-De,7,!0)):(this.v.setTripleAt(Pe-Fe,Ie-Oe,Pe-Fe+De,Ie-Oe,Pe-Fe,Ie-Oe,1,!0),this.v.setTripleAt(Pe-Fe,Ie+Oe,Pe-Fe,Ie+Oe-De,Pe-Fe,Ie+Oe,2,!0),this.v.setTripleAt(Pe+Fe,Ie+Oe,Pe+Fe-De,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
1999
  Transformation Matrix v2.0
2000
2000
  (c) Epistemex 2014-2015
@@ -59,7 +59,8 @@ export declare enum Animations {
59
59
  BACK = "BACK",
60
60
  CIRCULAR = "CIRCULAR",
61
61
  EXPO = "EXPO",
62
- SINE = "SINE"
62
+ SINE = "SINE",
63
+ SPIN = "SPIN"
63
64
  }
64
65
  export interface IGsapAnimInterface {
65
66
  from?: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reacthub-pixitweenjs",
3
- "version": "0.2.107-alpha.107",
3
+ "version": "0.2.107-alpha.109",
4
4
  "description": "reacthub-pixitweenjs is a library that provides a powerful combination of React, PixiJS, GSAP, and image manipulation capabilities in a timeline sequence. With this library, you can easily create stunning animations and interactive graphics for your React applications",
5
5
  "author": "khanzzirfan <reacthub.ai@gmail.com>",
6
6
  "main": "dist/index.es.js",
@@ -36,11 +36,12 @@
36
36
  "test": "vitest",
37
37
  "storybook": "storybook dev -p 6006",
38
38
  "start": "npm run storybook",
39
- "build-storybook": "storybook build",
39
+ "build-storybook": "storybook build --loglevel warn",
40
40
  "init-msw": "msw init public/",
41
41
  "release": "standard-version --release-as patch &&npm publish",
42
42
  "release:alpha": "standard-version --prerelease alpha &&npm publish",
43
- "chromatic": "env-cmd -f .env.dev chromatic --auto-accept-changes"
43
+ "chromatic": "env-cmd -f .env.dev chromatic --auto-accept-changes",
44
+ "deploy": "netlify deploy --prod"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@chakra-ui/icons": "^2.0.15",
@@ -114,7 +115,6 @@
114
115
  "react-dom": "^18.2.0",
115
116
  "react-fast-compare": "^3.2.0",
116
117
  "reacthub-react-bindings": "latest",
117
- "siriwave": "^2.4.0",
118
118
  "standard-version": "^9.5.0",
119
119
  "storybook": "^7.1.0",
120
120
  "storybook-react-context": "^0.6.0",