From faa5305f3bd10c168d93235d11747843bf0e5d6f Mon Sep 17 00:00:00 2001 From: Github Actions Date: Thu, 12 Dec 2024 13:25:02 +0000 Subject: [PATCH] ci: automatic build fixes --- ...der-96bb9f4d.js => ClipLoader-0106d300.js} | 2 +- ...on-17bddea7.js => DailyMotion-4413fcec.js} | 2 +- ...ebook-be32f7c0.js => Facebook-7ca1b704.js} | 2 +- ...yer-daa67492.js => FilePlayer-e0068219.js} | 2 +- ...altura-f34b51f2.js => Kaltura-8042c8ed.js} | 2 +- ...cloud-93b2d8f0.js => Mixcloud-63b86ddc.js} | 2 +- ...review-40b44430.js => Preview-90673f14.js} | 2 +- ...leton-4c8a0434.js => Skeleton-fe703092.js} | 2 +- ...oud-3d6c217d.js => SoundCloud-8d2be6f4.js} | 2 +- .../{Stack-a8b59155.js => Stack-b3992130.js} | 2 +- ...ble-6fbd6333.js => Streamable-8a8c4cd3.js} | 2 +- .../{Tabs-fd2a0376.js => Tabs-33c59ae4.js} | 2 +- ...71cf36.js => TextareaAutosize-e216d6db.js} | 2 +- ...{Twitch-8cf0a6a4.js => Twitch-45ac7eb0.js} | 2 +- ...phy-5718a5a5.js => Typography-02db806b.js} | 2 +- ...idyard-adceec55.js => Vidyard-6eb1a22b.js} | 2 +- .../{Vimeo-6c31b7ae.js => Vimeo-dc0a0e41.js} | 2 +- ...{Wistia-fc8a836e.js => Wistia-798cf390.js} | 2 +- ...ouTube-669c494c.js => YouTube-4922b2e3.js} | 2 +- ...ants-fa18afce.js => constants-380035da.js} | 2 +- ...-6ef3ed46.js => createSvgIcon-fa140fa5.js} | 2 +- .../{index-ae6439d2.js => index-14cee051.js} | 2 +- .../{index-053bf7ca.js => index-2cd18ef8.js} | 2 +- .../{index-761a8d1c.js => index-49d70c3e.js} | 2 +- .../{index-edf7575c.js => index-562bc714.js} | 128 +++++++++--------- .../{index-6cd4b515.js => index-64d5234f.js} | 4 +- .../{index-455ca637.js => index-6d6e756f.js} | 2 +- .../{index-04a78d33.js => index-70104819.js} | 2 +- .../{index-b5ee4351.js => index-7545798f.js} | 2 +- .../{index-2f22123e.js => index-77dce891.js} | 2 +- .../{index-17ed06be.js => index-787c3ef8.js} | 2 +- .../{index-1f130f3c.js => index-792a21d1.js} | 2 +- .../{index-48b3b053.js => index-798db353.js} | 2 +- .../{index-3c0c8d74.js => index-8b765fc7.js} | 2 +- .../{index-432a2a9e.js => index-90c40e8b.js} | 2 +- .../{index-6f7e416d.js => index-94d47251.js} | 2 +- .../{index-d53910a0.js => index-a8281b7f.js} | 2 +- .../{index-c5811e62.js => index-b15c0dc1.js} | 2 +- .../{index-887745b1.js => index-bb9e0a43.js} | 2 +- .../{index-10fd1675.js => index-cefe14af.js} | 6 +- .../{index-ed087dc3.js => index-d501a02f.js} | 4 +- .../{index-98d70581.js => index-e48d517d.js} | 2 +- .../{index-0796c92a.js => index-ee5b3a5b.js} | 2 +- .../{index-9261e06d.js => index-efed0068.js} | 2 +- .../{index-7a1dc0fc.js => index-f3f8c0bc.js} | 2 +- .../{index-6c946cd6.js => index-fe0be4c5.js} | 2 +- ...-9d6a7051.js => isPlainObject-528c68e4.js} | 2 +- build/index.html | 2 +- 48 files changed, 115 insertions(+), 115 deletions(-) rename build/assets/{ClipLoader-96bb9f4d.js => ClipLoader-0106d300.js} (97%) rename build/assets/{DailyMotion-17bddea7.js => DailyMotion-4413fcec.js} (95%) rename build/assets/{Facebook-be32f7c0.js => Facebook-7ca1b704.js} (96%) rename build/assets/{FilePlayer-daa67492.js => FilePlayer-e0068219.js} (98%) rename build/assets/{Kaltura-f34b51f2.js => Kaltura-8042c8ed.js} (95%) rename build/assets/{Mixcloud-93b2d8f0.js => Mixcloud-63b86ddc.js} (95%) rename build/assets/{Preview-40b44430.js => Preview-90673f14.js} (97%) rename build/assets/{Skeleton-4c8a0434.js => Skeleton-fe703092.js} (97%) rename build/assets/{SoundCloud-3d6c217d.js => SoundCloud-8d2be6f4.js} (95%) rename build/assets/{Stack-a8b59155.js => Stack-b3992130.js} (99%) rename build/assets/{Streamable-6fbd6333.js => Streamable-8a8c4cd3.js} (95%) rename build/assets/{Tabs-fd2a0376.js => Tabs-33c59ae4.js} (99%) rename build/assets/{TextareaAutosize-f571cf36.js => TextareaAutosize-e216d6db.js} (97%) rename build/assets/{Twitch-8cf0a6a4.js => Twitch-45ac7eb0.js} (95%) rename build/assets/{Typography-5718a5a5.js => Typography-02db806b.js} (93%) rename build/assets/{Vidyard-adceec55.js => Vidyard-6eb1a22b.js} (95%) rename build/assets/{Vimeo-6c31b7ae.js => Vimeo-dc0a0e41.js} (96%) rename build/assets/{Wistia-fc8a836e.js => Wistia-798cf390.js} (96%) rename build/assets/{YouTube-669c494c.js => YouTube-4922b2e3.js} (97%) rename build/assets/{constants-fa18afce.js => constants-380035da.js} (80%) rename build/assets/{createSvgIcon-6ef3ed46.js => createSvgIcon-fa140fa5.js} (97%) rename build/assets/{index-ae6439d2.js => index-14cee051.js} (96%) rename build/assets/{index-053bf7ca.js => index-2cd18ef8.js} (69%) rename build/assets/{index-761a8d1c.js => index-49d70c3e.js} (97%) rename build/assets/{index-edf7575c.js => index-562bc714.js} (59%) rename build/assets/{index-6cd4b515.js => index-64d5234f.js} (99%) rename build/assets/{index-455ca637.js => index-6d6e756f.js} (99%) rename build/assets/{index-04a78d33.js => index-70104819.js} (92%) rename build/assets/{index-b5ee4351.js => index-7545798f.js} (95%) rename build/assets/{index-2f22123e.js => index-77dce891.js} (99%) rename build/assets/{index-17ed06be.js => index-787c3ef8.js} (99%) rename build/assets/{index-1f130f3c.js => index-792a21d1.js} (96%) rename build/assets/{index-48b3b053.js => index-798db353.js} (85%) rename build/assets/{index-3c0c8d74.js => index-8b765fc7.js} (96%) rename build/assets/{index-432a2a9e.js => index-90c40e8b.js} (99%) rename build/assets/{index-6f7e416d.js => index-94d47251.js} (91%) rename build/assets/{index-d53910a0.js => index-a8281b7f.js} (96%) rename build/assets/{index-c5811e62.js => index-b15c0dc1.js} (92%) rename build/assets/{index-887745b1.js => index-bb9e0a43.js} (97%) rename build/assets/{index-10fd1675.js => index-cefe14af.js} (97%) rename build/assets/{index-ed087dc3.js => index-d501a02f.js} (99%) rename build/assets/{index-98d70581.js => index-e48d517d.js} (98%) rename build/assets/{index-0796c92a.js => index-ee5b3a5b.js} (98%) rename build/assets/{index-9261e06d.js => index-efed0068.js} (99%) rename build/assets/{index-7a1dc0fc.js => index-f3f8c0bc.js} (93%) rename build/assets/{index-6c946cd6.js => index-fe0be4c5.js} (93%) rename build/assets/{isPlainObject-9d6a7051.js => isPlainObject-528c68e4.js} (98%) diff --git a/build/assets/ClipLoader-96bb9f4d.js b/build/assets/ClipLoader-0106d300.js similarity index 97% rename from build/assets/ClipLoader-96bb9f4d.js rename to build/assets/ClipLoader-0106d300.js index e5d3f489a..acdc122a8 100644 --- a/build/assets/ClipLoader-96bb9f4d.js +++ b/build/assets/ClipLoader-0106d300.js @@ -1,4 +1,4 @@ -import{r as m}from"./index-17ed06be.js";var g={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function h(e){if(typeof e=="number")return{value:e,unit:"px"};var t,a=(e.match(/^[0-9.]*/)||"").toString();a.includes(".")?t=parseFloat(a):t=parseInt(a,10);var r=(e.match(/[^0-9]*$/)||"").toString();return g[r]?{value:t,unit:r}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}function d(e){var t=h(e);return"".concat(t.value).concat(t.unit)}var b=function(e,t,a){var r="react-spinners-".concat(e,"-").concat(a);if(typeof window>"u"||!window.document)return r;var n=document.createElement("style");document.head.appendChild(n);var o=n.sheet,l=` +import{r as m}from"./index-787c3ef8.js";var g={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function h(e){if(typeof e=="number")return{value:e,unit:"px"};var t,a=(e.match(/^[0-9.]*/)||"").toString();a.includes(".")?t=parseFloat(a):t=parseInt(a,10);var r=(e.match(/[^0-9]*$/)||"").toString();return g[r]?{value:t,unit:r}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}function d(e){var t=h(e);return"".concat(t.value).concat(t.unit)}var b=function(e,t,a){var r="react-spinners-".concat(e,"-").concat(a);if(typeof window>"u"||!window.document)return r;var n=document.createElement("style");document.head.appendChild(n);var o=n.sheet,l=` @keyframes `.concat(r,` { `).concat(t,` } diff --git a/build/assets/DailyMotion-17bddea7.js b/build/assets/DailyMotion-4413fcec.js similarity index 95% rename from build/assets/DailyMotion-17bddea7.js rename to build/assets/DailyMotion-4413fcec.js index c2435d664..13bcc66d7 100644 --- a/build/assets/DailyMotion-17bddea7.js +++ b/build/assets/DailyMotion-4413fcec.js @@ -1 +1 @@ -import{a9 as P,r as v}from"./index-17ed06be.js";import{u as D,p as O}from"./index-ed087dc3.js";function b(t,e){for(var r=0;ro[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var M=Object.create,s=Object.defineProperty,w=Object.getOwnPropertyDescriptor,S=Object.getOwnPropertyNames,j=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty,E=(t,e,r)=>e in t?s(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,A=(t,e)=>{for(var r in e)s(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of S(e))!T.call(t,a)&&a!==r&&s(t,a,{get:()=>e[a],enumerable:!(o=w(e,a))||o.enumerable});return t},L=(t,e,r)=>(r=t!=null?M(j(t)):{},h(e||!t||!t.__esModule?s(r,"default",{value:t,enumerable:!0}):r,t)),C=t=>h(s({},"__esModule",{value:!0}),t),n=(t,e,r)=>(E(t,typeof e!="symbol"?e+"":e,r),r),d={};A(d,{default:()=>p});var _=C(d),c=L(v),l=D,f=O;const x="https://api.dmcdn.net/all.js",N="DM",K="dmAsyncInit";class p extends c.Component{constructor(){super(...arguments),n(this,"callPlayer",l.callPlayer),n(this,"onDurationChange",()=>{const e=this.getDuration();this.props.onDuration(e)}),n(this,"mute",()=>{this.callPlayer("setMuted",!0)}),n(this,"unmute",()=>{this.callPlayer("setMuted",!1)}),n(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{controls:r,config:o,onError:a,playing:i}=this.props,[,y]=e.match(f.MATCH_URL_DAILYMOTION);if(this.player){this.player.load(y,{start:(0,l.parseStartTime)(e),autoplay:i});return}(0,l.getSDK)(x,N,K,u=>u.player).then(u=>{if(!this.container)return;const m=u.player;this.player=new m(this.container,{width:"100%",height:"100%",video:y,params:{controls:r,autoplay:this.props.playing,mute:this.props.muted,start:(0,l.parseStartTime)(e),origin:window.location.origin,...o.params},events:{apiready:this.props.onReady,seeked:()=>this.props.onSeek(this.player.currentTime),video_end:this.props.onEnded,durationchange:this.onDurationChange,pause:this.props.onPause,playing:this.props.onPlay,waiting:this.props.onBuffer,error:g=>a(g)}})},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.player.duration||null}getCurrentTime(){return this.player.currentTime}getSecondsLoaded(){return this.player.bufferedTime}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return c.default.createElement("div",{style:r},c.default.createElement("div",{ref:this.ref}))}}n(p,"displayName","DailyMotion");n(p,"canPlay",f.canPlay.dailymotion);n(p,"loopOnEnded",!0);const R=P(_),k=b({__proto__:null,default:R},[_]);export{k as D}; +import{a9 as P,r as v}from"./index-787c3ef8.js";import{u as D,p as O}from"./index-d501a02f.js";function b(t,e){for(var r=0;ro[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var M=Object.create,s=Object.defineProperty,w=Object.getOwnPropertyDescriptor,S=Object.getOwnPropertyNames,j=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty,E=(t,e,r)=>e in t?s(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,A=(t,e)=>{for(var r in e)s(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of S(e))!T.call(t,a)&&a!==r&&s(t,a,{get:()=>e[a],enumerable:!(o=w(e,a))||o.enumerable});return t},L=(t,e,r)=>(r=t!=null?M(j(t)):{},h(e||!t||!t.__esModule?s(r,"default",{value:t,enumerable:!0}):r,t)),C=t=>h(s({},"__esModule",{value:!0}),t),n=(t,e,r)=>(E(t,typeof e!="symbol"?e+"":e,r),r),d={};A(d,{default:()=>p});var _=C(d),c=L(v),l=D,f=O;const x="https://api.dmcdn.net/all.js",N="DM",K="dmAsyncInit";class p extends c.Component{constructor(){super(...arguments),n(this,"callPlayer",l.callPlayer),n(this,"onDurationChange",()=>{const e=this.getDuration();this.props.onDuration(e)}),n(this,"mute",()=>{this.callPlayer("setMuted",!0)}),n(this,"unmute",()=>{this.callPlayer("setMuted",!1)}),n(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{controls:r,config:o,onError:a,playing:i}=this.props,[,y]=e.match(f.MATCH_URL_DAILYMOTION);if(this.player){this.player.load(y,{start:(0,l.parseStartTime)(e),autoplay:i});return}(0,l.getSDK)(x,N,K,u=>u.player).then(u=>{if(!this.container)return;const m=u.player;this.player=new m(this.container,{width:"100%",height:"100%",video:y,params:{controls:r,autoplay:this.props.playing,mute:this.props.muted,start:(0,l.parseStartTime)(e),origin:window.location.origin,...o.params},events:{apiready:this.props.onReady,seeked:()=>this.props.onSeek(this.player.currentTime),video_end:this.props.onEnded,durationchange:this.onDurationChange,pause:this.props.onPause,playing:this.props.onPlay,waiting:this.props.onBuffer,error:g=>a(g)}})},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.player.duration||null}getCurrentTime(){return this.player.currentTime}getSecondsLoaded(){return this.player.bufferedTime}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return c.default.createElement("div",{style:r},c.default.createElement("div",{ref:this.ref}))}}n(p,"displayName","DailyMotion");n(p,"canPlay",f.canPlay.dailymotion);n(p,"loopOnEnded",!0);const R=P(_),k=b({__proto__:null,default:R},[_]);export{k as D}; diff --git a/build/assets/Facebook-be32f7c0.js b/build/assets/Facebook-7ca1b704.js similarity index 96% rename from build/assets/Facebook-be32f7c0.js rename to build/assets/Facebook-7ca1b704.js index 705eb8d06..9395e1a91 100644 --- a/build/assets/Facebook-be32f7c0.js +++ b/build/assets/Facebook-7ca1b704.js @@ -1 +1 @@ -import{a9 as _,r as P}from"./index-17ed06be.js";import{u as g,p as m}from"./index-ed087dc3.js";function v(t,e){for(var r=0;ra[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var O=Object.create,i=Object.defineProperty,D=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,I=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,k=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of E(e))!j.call(t,s)&&s!==r&&i(t,s,{get:()=>e[s],enumerable:!(a=D(e,s))||a.enumerable});return t},w=(t,e,r)=>(r=t!=null?O(S(t)):{},h(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),F=t=>h(i({},"__esModule",{value:!0}),t),o=(t,e,r)=>(I(t,typeof e!="symbol"?e+"":e,r),r),b={};k(b,{default:()=>l});var d=F(b),u=w(P),n=g,x=m;const c="https://connect.facebook.net/en_US/sdk.js",f="FB",y="fbAsyncInit",L="facebook-player-";class l extends u.Component{constructor(){super(...arguments),o(this,"callPlayer",n.callPlayer),o(this,"playerID",this.props.config.playerId||`${L}${(0,n.randomString)()}`),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unmute")})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){if(r){(0,n.getSDK)(c,f,y).then(a=>a.XFBML.parse());return}(0,n.getSDK)(c,f,y).then(a=>{a.init({appId:this.props.config.appId,xfbml:!0,version:this.props.config.version}),a.Event.subscribe("xfbml.render",s=>{this.props.onLoaded()}),a.Event.subscribe("xfbml.ready",s=>{s.type==="video"&&s.id===this.playerID&&(this.player=s.instance,this.player.subscribe("startedPlaying",this.props.onPlay),this.player.subscribe("paused",this.props.onPause),this.player.subscribe("finishedPlaying",this.props.onEnded),this.player.subscribe("startedBuffering",this.props.onBuffer),this.player.subscribe("finishedBuffering",this.props.onBufferEnd),this.player.subscribe("error",this.props.onError),this.props.muted?this.callPlayer("mute"):this.callPlayer("unmute"),this.props.onReady(),document.getElementById(this.playerID).querySelector("iframe").style.visibility="visible")})})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentPosition")}getSecondsLoaded(){return null}render(){const{attributes:e}=this.props.config,r={width:"100%",height:"100%"};return u.default.createElement("div",{style:r,id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false",...e})}}o(l,"displayName","Facebook");o(l,"canPlay",x.canPlay.facebook);o(l,"loopOnEnded",!0);const M=_(d),N=v({__proto__:null,default:M},[d]);export{N as F}; +import{a9 as _,r as P}from"./index-787c3ef8.js";import{u as g,p as m}from"./index-d501a02f.js";function v(t,e){for(var r=0;ra[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var O=Object.create,i=Object.defineProperty,D=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,I=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,k=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of E(e))!j.call(t,s)&&s!==r&&i(t,s,{get:()=>e[s],enumerable:!(a=D(e,s))||a.enumerable});return t},w=(t,e,r)=>(r=t!=null?O(S(t)):{},h(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),F=t=>h(i({},"__esModule",{value:!0}),t),o=(t,e,r)=>(I(t,typeof e!="symbol"?e+"":e,r),r),b={};k(b,{default:()=>l});var d=F(b),u=w(P),n=g,x=m;const c="https://connect.facebook.net/en_US/sdk.js",f="FB",y="fbAsyncInit",L="facebook-player-";class l extends u.Component{constructor(){super(...arguments),o(this,"callPlayer",n.callPlayer),o(this,"playerID",this.props.config.playerId||`${L}${(0,n.randomString)()}`),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unmute")})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){if(r){(0,n.getSDK)(c,f,y).then(a=>a.XFBML.parse());return}(0,n.getSDK)(c,f,y).then(a=>{a.init({appId:this.props.config.appId,xfbml:!0,version:this.props.config.version}),a.Event.subscribe("xfbml.render",s=>{this.props.onLoaded()}),a.Event.subscribe("xfbml.ready",s=>{s.type==="video"&&s.id===this.playerID&&(this.player=s.instance,this.player.subscribe("startedPlaying",this.props.onPlay),this.player.subscribe("paused",this.props.onPause),this.player.subscribe("finishedPlaying",this.props.onEnded),this.player.subscribe("startedBuffering",this.props.onBuffer),this.player.subscribe("finishedBuffering",this.props.onBufferEnd),this.player.subscribe("error",this.props.onError),this.props.muted?this.callPlayer("mute"):this.callPlayer("unmute"),this.props.onReady(),document.getElementById(this.playerID).querySelector("iframe").style.visibility="visible")})})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentPosition")}getSecondsLoaded(){return null}render(){const{attributes:e}=this.props.config,r={width:"100%",height:"100%"};return u.default.createElement("div",{style:r,id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false",...e})}}o(l,"displayName","Facebook");o(l,"canPlay",x.canPlay.facebook);o(l,"loopOnEnded",!0);const M=_(d),N=v({__proto__:null,default:M},[d]);export{N as F}; diff --git a/build/assets/FilePlayer-daa67492.js b/build/assets/FilePlayer-e0068219.js similarity index 98% rename from build/assets/FilePlayer-daa67492.js rename to build/assets/FilePlayer-e0068219.js index 60d54e222..fa9c3d2cc 100644 --- a/build/assets/FilePlayer-daa67492.js +++ b/build/assets/FilePlayer-e0068219.js @@ -1 +1 @@ -import{a9 as b,r as _}from"./index-17ed06be.js";import{u as O,p as A}from"./index-ed087dc3.js";function R(s,e){for(var t=0;ti[n]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var I=Object.create,u=Object.defineProperty,D=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,M=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty,U=(s,e,t)=>e in s?u(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,N=(s,e)=>{for(var t in e)u(s,t,{get:e[t],enumerable:!0})},E=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of w(e))!k.call(s,n)&&n!==t&&u(s,n,{get:()=>e[n],enumerable:!(i=D(e,n))||i.enumerable});return s},j=(s,e,t)=>(t=s!=null?I(M(s)):{},E(e||!s||!s.__esModule?u(t,"default",{value:s,enumerable:!0}):t,s)),H=s=>E(u({},"__esModule",{value:!0}),s),r=(s,e,t)=>(U(s,typeof e!="symbol"?e+"":e,t),t),m={};N(m,{default:()=>P});var g=H(m),c=j(_),a=O,d=A;const y=typeof navigator<"u",F=y&&navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,v=y&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||F)&&!window.MSStream,V=y&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&!window.MSStream,T="https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js",C="Hls",B="https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js",x="dashjs",K="https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js",G="flvjs",X=/www\.dropbox\.com\/.+/,f=/https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/,W="https://videodelivery.net/{id}/manifest/video.m3u8";class P extends c.Component{constructor(){super(...arguments),r(this,"onReady",(...e)=>this.props.onReady(...e)),r(this,"onPlay",(...e)=>this.props.onPlay(...e)),r(this,"onBuffer",(...e)=>this.props.onBuffer(...e)),r(this,"onBufferEnd",(...e)=>this.props.onBufferEnd(...e)),r(this,"onPause",(...e)=>this.props.onPause(...e)),r(this,"onEnded",(...e)=>this.props.onEnded(...e)),r(this,"onError",(...e)=>this.props.onError(...e)),r(this,"onPlayBackRateChange",e=>this.props.onPlaybackRateChange(e.target.playbackRate)),r(this,"onEnablePIP",(...e)=>this.props.onEnablePIP(...e)),r(this,"onDisablePIP",e=>{const{onDisablePIP:t,playing:i}=this.props;t(e),i&&this.play()}),r(this,"onPresentationModeChange",e=>{if(this.player&&(0,a.supportsWebKitPresentationMode)(this.player)){const{webkitPresentationMode:t}=this.player;t==="picture-in-picture"?this.onEnablePIP(e):t==="inline"&&this.onDisablePIP(e)}}),r(this,"onSeek",e=>{this.props.onSeek(e.target.currentTime)}),r(this,"mute",()=>{this.player.muted=!0}),r(this,"unmute",()=>{this.player.muted=!1}),r(this,"renderSourceElement",(e,t)=>typeof e=="string"?c.default.createElement("source",{key:t,src:e}):c.default.createElement("source",{key:t,...e})),r(this,"renderTrack",(e,t)=>c.default.createElement("track",{key:t,...e})),r(this,"ref",e=>{this.player&&(this.prevPlayer=this.player),this.player=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this),this.addListeners(this.player);const e=this.getSource(this.props.url);e&&(this.player.src=e),(v||this.props.config.forceDisableHls)&&this.player.load()}componentDidUpdate(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&(this.removeListeners(this.prevPlayer,e.url),this.addListeners(this.player)),this.props.url!==e.url&&!(0,a.isMediaStream)(this.props.url)&&!(this.props.url instanceof Array)&&(this.player.srcObject=null)}componentWillUnmount(){this.player.removeAttribute("src"),this.removeListeners(this.player),this.hls&&this.hls.destroy()}addListeners(e){const{url:t,playsinline:i}=this.props;e.addEventListener("play",this.onPlay),e.addEventListener("waiting",this.onBuffer),e.addEventListener("playing",this.onBufferEnd),e.addEventListener("pause",this.onPause),e.addEventListener("seeked",this.onSeek),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError),e.addEventListener("ratechange",this.onPlayBackRateChange),e.addEventListener("enterpictureinpicture",this.onEnablePIP),e.addEventListener("leavepictureinpicture",this.onDisablePIP),e.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.addEventListener("canplay",this.onReady),i&&(e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("x5-playsinline",""))}removeListeners(e,t){e.removeEventListener("canplay",this.onReady),e.removeEventListener("play",this.onPlay),e.removeEventListener("waiting",this.onBuffer),e.removeEventListener("playing",this.onBufferEnd),e.removeEventListener("pause",this.onPause),e.removeEventListener("seeked",this.onSeek),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError),e.removeEventListener("ratechange",this.onPlayBackRateChange),e.removeEventListener("enterpictureinpicture",this.onEnablePIP),e.removeEventListener("leavepictureinpicture",this.onDisablePIP),e.removeEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.removeEventListener("canplay",this.onReady)}shouldUseAudio(e){return e.config.forceVideo||e.config.attributes.poster?!1:d.AUDIO_EXTENSIONS.test(e.url)||e.config.forceAudio}shouldUseHLS(e){return V&&this.props.config.forceSafariHLS||this.props.config.forceHLS?!0:v||this.props.config.forceDisableHls?!1:d.HLS_EXTENSIONS.test(e)||f.test(e)}shouldUseDASH(e){return d.DASH_EXTENSIONS.test(e)||this.props.config.forceDASH}shouldUseFLV(e){return d.FLV_EXTENSIONS.test(e)||this.props.config.forceFLV}load(e){const{hlsVersion:t,hlsOptions:i,dashVersion:n,flvVersion:l}=this.props.config;if(this.hls&&this.hls.destroy(),this.dash&&this.dash.reset(),this.shouldUseHLS(e)&&(0,a.getSDK)(T.replace("VERSION",t),C).then(o=>{if(this.hls=new o(i),this.hls.on(o.Events.MANIFEST_PARSED,()=>{this.props.onReady()}),this.hls.on(o.Events.ERROR,(h,p)=>{this.props.onError(h,p,this.hls,o)}),f.test(e)){const h=e.match(f)[1];this.hls.loadSource(W.replace("{id}",h))}else this.hls.loadSource(e);this.hls.attachMedia(this.player),this.props.onLoaded()}),this.shouldUseDASH(e)&&(0,a.getSDK)(B.replace("VERSION",n),x).then(o=>{this.dash=o.MediaPlayer().create(),this.dash.initialize(this.player,e,this.props.playing),this.dash.on("error",this.props.onError),parseInt(n)<3?this.dash.getDebug().setLogToBrowserConsole(!1):this.dash.updateSettings({debug:{logLevel:o.Debug.LOG_LEVEL_NONE}}),this.props.onLoaded()}),this.shouldUseFLV(e)&&(0,a.getSDK)(K.replace("VERSION",l),G).then(o=>{this.flv=o.createPlayer({type:"flv",url:e}),this.flv.attachMediaElement(this.player),this.flv.on(o.Events.ERROR,(h,p)=>{this.props.onError(h,p,this.flv,o)}),this.flv.load(),this.props.onLoaded()}),e instanceof Array)this.player.load();else if((0,a.isMediaStream)(e))try{this.player.srcObject=e}catch{this.player.src=window.URL.createObjectURL(e)}}play(){const e=this.player.play();e&&e.catch(this.props.onError)}pause(){this.player.pause()}stop(){this.player.removeAttribute("src"),this.dash&&this.dash.reset()}seekTo(e,t=!0){this.player.currentTime=e,t||this.pause()}setVolume(e){this.player.volume=e}enablePIP(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player?this.player.requestPictureInPicture():(0,a.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="picture-in-picture"&&this.player.webkitSetPresentationMode("picture-in-picture")}disablePIP(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player?document.exitPictureInPicture():(0,a.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="inline"&&this.player.webkitSetPresentationMode("inline")}setPlaybackRate(e){try{this.player.playbackRate=e}catch(t){this.props.onError(t)}}getDuration(){if(!this.player)return null;const{duration:e,seekable:t}=this.player;return e===1/0&&t.length>0?t.end(t.length-1):e}getCurrentTime(){return this.player?this.player.currentTime:null}getSecondsLoaded(){if(!this.player)return null;const{buffered:e}=this.player;if(e.length===0)return 0;const t=e.end(e.length-1),i=this.getDuration();return t>i?i:t}getSource(e){const t=this.shouldUseHLS(e),i=this.shouldUseDASH(e),n=this.shouldUseFLV(e);if(!(e instanceof Array||(0,a.isMediaStream)(e)||t||i||n))return X.test(e)?e.replace("www.dropbox.com","dl.dropboxusercontent.com"):e}render(){const{url:e,playing:t,loop:i,controls:n,muted:l,config:o,width:h,height:p}=this.props,L=this.shouldUseAudio(this.props)?"audio":"video",S={width:h==="auto"?h:"100%",height:p==="auto"?p:"100%"};return c.default.createElement(L,{ref:this.ref,src:this.getSource(e),style:S,preload:"auto",autoPlay:t||void 0,controls:n,muted:l,loop:i,...o.attributes},e instanceof Array&&e.map(this.renderSourceElement),o.tracks.map(this.renderTrack))}}r(P,"displayName","FilePlayer");r(P,"canPlay",d.canPlay.file);const z=b(g),Q=R({__proto__:null,default:z},[g]);export{Q as F}; +import{a9 as b,r as _}from"./index-787c3ef8.js";import{u as O,p as A}from"./index-d501a02f.js";function R(s,e){for(var t=0;ti[n]})}}}return Object.freeze(Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}))}var I=Object.create,u=Object.defineProperty,D=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,M=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty,U=(s,e,t)=>e in s?u(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,N=(s,e)=>{for(var t in e)u(s,t,{get:e[t],enumerable:!0})},E=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of w(e))!k.call(s,n)&&n!==t&&u(s,n,{get:()=>e[n],enumerable:!(i=D(e,n))||i.enumerable});return s},j=(s,e,t)=>(t=s!=null?I(M(s)):{},E(e||!s||!s.__esModule?u(t,"default",{value:s,enumerable:!0}):t,s)),H=s=>E(u({},"__esModule",{value:!0}),s),r=(s,e,t)=>(U(s,typeof e!="symbol"?e+"":e,t),t),m={};N(m,{default:()=>P});var g=H(m),c=j(_),a=O,d=A;const y=typeof navigator<"u",F=y&&navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,v=y&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||F)&&!window.MSStream,V=y&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&!window.MSStream,T="https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js",C="Hls",B="https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js",x="dashjs",K="https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js",G="flvjs",X=/www\.dropbox\.com\/.+/,f=/https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/,W="https://videodelivery.net/{id}/manifest/video.m3u8";class P extends c.Component{constructor(){super(...arguments),r(this,"onReady",(...e)=>this.props.onReady(...e)),r(this,"onPlay",(...e)=>this.props.onPlay(...e)),r(this,"onBuffer",(...e)=>this.props.onBuffer(...e)),r(this,"onBufferEnd",(...e)=>this.props.onBufferEnd(...e)),r(this,"onPause",(...e)=>this.props.onPause(...e)),r(this,"onEnded",(...e)=>this.props.onEnded(...e)),r(this,"onError",(...e)=>this.props.onError(...e)),r(this,"onPlayBackRateChange",e=>this.props.onPlaybackRateChange(e.target.playbackRate)),r(this,"onEnablePIP",(...e)=>this.props.onEnablePIP(...e)),r(this,"onDisablePIP",e=>{const{onDisablePIP:t,playing:i}=this.props;t(e),i&&this.play()}),r(this,"onPresentationModeChange",e=>{if(this.player&&(0,a.supportsWebKitPresentationMode)(this.player)){const{webkitPresentationMode:t}=this.player;t==="picture-in-picture"?this.onEnablePIP(e):t==="inline"&&this.onDisablePIP(e)}}),r(this,"onSeek",e=>{this.props.onSeek(e.target.currentTime)}),r(this,"mute",()=>{this.player.muted=!0}),r(this,"unmute",()=>{this.player.muted=!1}),r(this,"renderSourceElement",(e,t)=>typeof e=="string"?c.default.createElement("source",{key:t,src:e}):c.default.createElement("source",{key:t,...e})),r(this,"renderTrack",(e,t)=>c.default.createElement("track",{key:t,...e})),r(this,"ref",e=>{this.player&&(this.prevPlayer=this.player),this.player=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this),this.addListeners(this.player);const e=this.getSource(this.props.url);e&&(this.player.src=e),(v||this.props.config.forceDisableHls)&&this.player.load()}componentDidUpdate(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&(this.removeListeners(this.prevPlayer,e.url),this.addListeners(this.player)),this.props.url!==e.url&&!(0,a.isMediaStream)(this.props.url)&&!(this.props.url instanceof Array)&&(this.player.srcObject=null)}componentWillUnmount(){this.player.removeAttribute("src"),this.removeListeners(this.player),this.hls&&this.hls.destroy()}addListeners(e){const{url:t,playsinline:i}=this.props;e.addEventListener("play",this.onPlay),e.addEventListener("waiting",this.onBuffer),e.addEventListener("playing",this.onBufferEnd),e.addEventListener("pause",this.onPause),e.addEventListener("seeked",this.onSeek),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError),e.addEventListener("ratechange",this.onPlayBackRateChange),e.addEventListener("enterpictureinpicture",this.onEnablePIP),e.addEventListener("leavepictureinpicture",this.onDisablePIP),e.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.addEventListener("canplay",this.onReady),i&&(e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("x5-playsinline",""))}removeListeners(e,t){e.removeEventListener("canplay",this.onReady),e.removeEventListener("play",this.onPlay),e.removeEventListener("waiting",this.onBuffer),e.removeEventListener("playing",this.onBufferEnd),e.removeEventListener("pause",this.onPause),e.removeEventListener("seeked",this.onSeek),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError),e.removeEventListener("ratechange",this.onPlayBackRateChange),e.removeEventListener("enterpictureinpicture",this.onEnablePIP),e.removeEventListener("leavepictureinpicture",this.onDisablePIP),e.removeEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.removeEventListener("canplay",this.onReady)}shouldUseAudio(e){return e.config.forceVideo||e.config.attributes.poster?!1:d.AUDIO_EXTENSIONS.test(e.url)||e.config.forceAudio}shouldUseHLS(e){return V&&this.props.config.forceSafariHLS||this.props.config.forceHLS?!0:v||this.props.config.forceDisableHls?!1:d.HLS_EXTENSIONS.test(e)||f.test(e)}shouldUseDASH(e){return d.DASH_EXTENSIONS.test(e)||this.props.config.forceDASH}shouldUseFLV(e){return d.FLV_EXTENSIONS.test(e)||this.props.config.forceFLV}load(e){const{hlsVersion:t,hlsOptions:i,dashVersion:n,flvVersion:l}=this.props.config;if(this.hls&&this.hls.destroy(),this.dash&&this.dash.reset(),this.shouldUseHLS(e)&&(0,a.getSDK)(T.replace("VERSION",t),C).then(o=>{if(this.hls=new o(i),this.hls.on(o.Events.MANIFEST_PARSED,()=>{this.props.onReady()}),this.hls.on(o.Events.ERROR,(h,p)=>{this.props.onError(h,p,this.hls,o)}),f.test(e)){const h=e.match(f)[1];this.hls.loadSource(W.replace("{id}",h))}else this.hls.loadSource(e);this.hls.attachMedia(this.player),this.props.onLoaded()}),this.shouldUseDASH(e)&&(0,a.getSDK)(B.replace("VERSION",n),x).then(o=>{this.dash=o.MediaPlayer().create(),this.dash.initialize(this.player,e,this.props.playing),this.dash.on("error",this.props.onError),parseInt(n)<3?this.dash.getDebug().setLogToBrowserConsole(!1):this.dash.updateSettings({debug:{logLevel:o.Debug.LOG_LEVEL_NONE}}),this.props.onLoaded()}),this.shouldUseFLV(e)&&(0,a.getSDK)(K.replace("VERSION",l),G).then(o=>{this.flv=o.createPlayer({type:"flv",url:e}),this.flv.attachMediaElement(this.player),this.flv.on(o.Events.ERROR,(h,p)=>{this.props.onError(h,p,this.flv,o)}),this.flv.load(),this.props.onLoaded()}),e instanceof Array)this.player.load();else if((0,a.isMediaStream)(e))try{this.player.srcObject=e}catch{this.player.src=window.URL.createObjectURL(e)}}play(){const e=this.player.play();e&&e.catch(this.props.onError)}pause(){this.player.pause()}stop(){this.player.removeAttribute("src"),this.dash&&this.dash.reset()}seekTo(e,t=!0){this.player.currentTime=e,t||this.pause()}setVolume(e){this.player.volume=e}enablePIP(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player?this.player.requestPictureInPicture():(0,a.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="picture-in-picture"&&this.player.webkitSetPresentationMode("picture-in-picture")}disablePIP(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player?document.exitPictureInPicture():(0,a.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="inline"&&this.player.webkitSetPresentationMode("inline")}setPlaybackRate(e){try{this.player.playbackRate=e}catch(t){this.props.onError(t)}}getDuration(){if(!this.player)return null;const{duration:e,seekable:t}=this.player;return e===1/0&&t.length>0?t.end(t.length-1):e}getCurrentTime(){return this.player?this.player.currentTime:null}getSecondsLoaded(){if(!this.player)return null;const{buffered:e}=this.player;if(e.length===0)return 0;const t=e.end(e.length-1),i=this.getDuration();return t>i?i:t}getSource(e){const t=this.shouldUseHLS(e),i=this.shouldUseDASH(e),n=this.shouldUseFLV(e);if(!(e instanceof Array||(0,a.isMediaStream)(e)||t||i||n))return X.test(e)?e.replace("www.dropbox.com","dl.dropboxusercontent.com"):e}render(){const{url:e,playing:t,loop:i,controls:n,muted:l,config:o,width:h,height:p}=this.props,L=this.shouldUseAudio(this.props)?"audio":"video",S={width:h==="auto"?h:"100%",height:p==="auto"?p:"100%"};return c.default.createElement(L,{ref:this.ref,src:this.getSource(e),style:S,preload:"auto",autoPlay:t||void 0,controls:n,muted:l,loop:i,...o.attributes},e instanceof Array&&e.map(this.renderSourceElement),o.tracks.map(this.renderTrack))}}r(P,"displayName","FilePlayer");r(P,"canPlay",d.canPlay.file);const z=b(g),Q=R({__proto__:null,default:z},[g]);export{Q as F}; diff --git a/build/assets/Kaltura-f34b51f2.js b/build/assets/Kaltura-8042c8ed.js similarity index 95% rename from build/assets/Kaltura-f34b51f2.js rename to build/assets/Kaltura-8042c8ed.js index a13a891d2..ef2ad7763 100644 --- a/build/assets/Kaltura-f34b51f2.js +++ b/build/assets/Kaltura-8042c8ed.js @@ -1 +1 @@ -import{a9 as y,r as f}from"./index-17ed06be.js";import{u as _,p as m}from"./index-ed087dc3.js";function P(r,e){for(var t=0;to[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,n=Object.defineProperty,b=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,O=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,j=(r,e,t)=>e in r?n(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,L=(r,e)=>{for(var t in e)n(r,t,{get:e[t],enumerable:!0})},c=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of v(e))!w.call(r,a)&&a!==t&&n(r,a,{get:()=>e[a],enumerable:!(o=b(e,a))||o.enumerable});return r},K=(r,e,t)=>(t=r!=null?g(O(r)):{},c(e||!r||!r.__esModule?n(t,"default",{value:r,enumerable:!0}):t,r)),D=r=>c(n({},"__esModule",{value:!0}),r),s=(r,e,t)=>(j(r,typeof e!="symbol"?e+"":e,t),t),h={};L(h,{default:()=>i});var d=D(h),u=K(f),p=_,S=m;const T="https://cdn.embed.ly/player-0.1.0.min.js",E="playerjs";class i extends u.Component{constructor(){super(...arguments),s(this,"callPlayer",p.callPlayer),s(this,"duration",null),s(this,"currentTime",null),s(this,"secondsLoaded",null),s(this,"mute",()=>{this.callPlayer("mute")}),s(this,"unmute",()=>{this.callPlayer("unmute")}),s(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,p.getSDK)(T,E).then(t=>{this.iframe&&(this.player=new t.Player(this.iframe),this.player.on("ready",()=>{setTimeout(()=>{this.player.isReady=!0,this.player.setLoop(this.props.loop),this.props.muted&&this.player.mute(),this.addListeners(this.player,this.props),this.props.onReady()},500)}))},this.props.onError)}addListeners(e,t){e.on("play",t.onPlay),e.on("pause",t.onPause),e.on("ended",t.onEnded),e.on("error",t.onError),e.on("timeupdate",({duration:o,seconds:a})=>{this.duration=o,this.currentTime=a})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("setCurrentTime",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e={width:"100%",height:"100%"};return u.default.createElement("iframe",{ref:this.ref,src:this.props.url,frameBorder:"0",scrolling:"no",style:e,allow:"encrypted-media; autoplay; fullscreen;",referrerPolicy:"no-referrer-when-downgrade"})}}s(i,"displayName","Kaltura");s(i,"canPlay",S.canPlay.kaltura);const M=y(d),N=P({__proto__:null,default:M},[d]);export{N as K}; +import{a9 as y,r as f}from"./index-787c3ef8.js";import{u as _,p as m}from"./index-d501a02f.js";function P(r,e){for(var t=0;to[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,n=Object.defineProperty,b=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,O=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,j=(r,e,t)=>e in r?n(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,L=(r,e)=>{for(var t in e)n(r,t,{get:e[t],enumerable:!0})},c=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of v(e))!w.call(r,a)&&a!==t&&n(r,a,{get:()=>e[a],enumerable:!(o=b(e,a))||o.enumerable});return r},K=(r,e,t)=>(t=r!=null?g(O(r)):{},c(e||!r||!r.__esModule?n(t,"default",{value:r,enumerable:!0}):t,r)),D=r=>c(n({},"__esModule",{value:!0}),r),s=(r,e,t)=>(j(r,typeof e!="symbol"?e+"":e,t),t),h={};L(h,{default:()=>i});var d=D(h),u=K(f),p=_,S=m;const T="https://cdn.embed.ly/player-0.1.0.min.js",E="playerjs";class i extends u.Component{constructor(){super(...arguments),s(this,"callPlayer",p.callPlayer),s(this,"duration",null),s(this,"currentTime",null),s(this,"secondsLoaded",null),s(this,"mute",()=>{this.callPlayer("mute")}),s(this,"unmute",()=>{this.callPlayer("unmute")}),s(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,p.getSDK)(T,E).then(t=>{this.iframe&&(this.player=new t.Player(this.iframe),this.player.on("ready",()=>{setTimeout(()=>{this.player.isReady=!0,this.player.setLoop(this.props.loop),this.props.muted&&this.player.mute(),this.addListeners(this.player,this.props),this.props.onReady()},500)}))},this.props.onError)}addListeners(e,t){e.on("play",t.onPlay),e.on("pause",t.onPause),e.on("ended",t.onEnded),e.on("error",t.onError),e.on("timeupdate",({duration:o,seconds:a})=>{this.duration=o,this.currentTime=a})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("setCurrentTime",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e={width:"100%",height:"100%"};return u.default.createElement("iframe",{ref:this.ref,src:this.props.url,frameBorder:"0",scrolling:"no",style:e,allow:"encrypted-media; autoplay; fullscreen;",referrerPolicy:"no-referrer-when-downgrade"})}}s(i,"displayName","Kaltura");s(i,"canPlay",S.canPlay.kaltura);const M=y(d),N=P({__proto__:null,default:M},[d]);export{N as K}; diff --git a/build/assets/Mixcloud-93b2d8f0.js b/build/assets/Mixcloud-63b86ddc.js similarity index 95% rename from build/assets/Mixcloud-93b2d8f0.js rename to build/assets/Mixcloud-63b86ddc.js index 6756f58a9..a95c29ff0 100644 --- a/build/assets/Mixcloud-93b2d8f0.js +++ b/build/assets/Mixcloud-63b86ddc.js @@ -1 +1 @@ -import{a9 as _,r as f}from"./index-17ed06be.js";import{u as m,p as g}from"./index-ed087dc3.js";function v(t,e){for(var r=0;rs[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var P=Object.create,i=Object.defineProperty,O=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,M=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,x=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,j=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},c=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of b(e))!w.call(t,o)&&o!==r&&i(t,o,{get:()=>e[o],enumerable:!(s=O(e,o))||s.enumerable});return t},D=(t,e,r)=>(r=t!=null?P(M(t)):{},c(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),S=t=>c(i({},"__esModule",{value:!0}),t),a=(t,e,r)=>(x(t,typeof e!="symbol"?e+"":e,r),r),d={};j(d,{default:()=>l});var h=S(d),u=D(f),p=m,y=g;const E="https://widget.mixcloud.com/media/js/widgetApi.js",L="Mixcloud";class l extends u.Component{constructor(){super(...arguments),a(this,"callPlayer",p.callPlayer),a(this,"duration",null),a(this,"currentTime",null),a(this,"secondsLoaded",null),a(this,"mute",()=>{}),a(this,"unmute",()=>{}),a(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,p.getSDK)(E,L).then(r=>{this.player=r.PlayerWidget(this.iframe),this.player.ready.then(()=>{this.player.events.play.on(this.props.onPlay),this.player.events.pause.on(this.props.onPause),this.player.events.ended.on(this.props.onEnded),this.player.events.error.on(this.props.error),this.player.events.progress.on((s,o)=>{this.currentTime=s,this.duration=o}),this.props.onReady()})},this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return null}render(){const{url:e,config:r}=this.props,s=e.match(y.MATCH_URL_MIXCLOUD)[1],o={width:"100%",height:"100%"},n=(0,p.queryString)({...r.options,feed:`/${s}/`});return u.default.createElement("iframe",{key:s,ref:this.ref,style:o,src:`https://www.mixcloud.com/widget/iframe/?${n}`,frameBorder:"0",allow:"autoplay"})}}a(l,"displayName","Mixcloud");a(l,"canPlay",y.canPlay.mixcloud);a(l,"loopOnEnded",!0);const T=_(h),N=v({__proto__:null,default:T},[h]);export{N as M}; +import{a9 as _,r as f}from"./index-787c3ef8.js";import{u as m,p as g}from"./index-d501a02f.js";function v(t,e){for(var r=0;rs[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var P=Object.create,i=Object.defineProperty,O=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,M=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,x=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,j=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},c=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of b(e))!w.call(t,o)&&o!==r&&i(t,o,{get:()=>e[o],enumerable:!(s=O(e,o))||s.enumerable});return t},D=(t,e,r)=>(r=t!=null?P(M(t)):{},c(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),S=t=>c(i({},"__esModule",{value:!0}),t),a=(t,e,r)=>(x(t,typeof e!="symbol"?e+"":e,r),r),d={};j(d,{default:()=>l});var h=S(d),u=D(f),p=m,y=g;const E="https://widget.mixcloud.com/media/js/widgetApi.js",L="Mixcloud";class l extends u.Component{constructor(){super(...arguments),a(this,"callPlayer",p.callPlayer),a(this,"duration",null),a(this,"currentTime",null),a(this,"secondsLoaded",null),a(this,"mute",()=>{}),a(this,"unmute",()=>{}),a(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,p.getSDK)(E,L).then(r=>{this.player=r.PlayerWidget(this.iframe),this.player.ready.then(()=>{this.player.events.play.on(this.props.onPlay),this.player.events.pause.on(this.props.onPause),this.player.events.ended.on(this.props.onEnded),this.player.events.error.on(this.props.error),this.player.events.progress.on((s,o)=>{this.currentTime=s,this.duration=o}),this.props.onReady()})},this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return null}render(){const{url:e,config:r}=this.props,s=e.match(y.MATCH_URL_MIXCLOUD)[1],o={width:"100%",height:"100%"},n=(0,p.queryString)({...r.options,feed:`/${s}/`});return u.default.createElement("iframe",{key:s,ref:this.ref,style:o,src:`https://www.mixcloud.com/widget/iframe/?${n}`,frameBorder:"0",allow:"autoplay"})}}a(l,"displayName","Mixcloud");a(l,"canPlay",y.canPlay.mixcloud);a(l,"loopOnEnded",!0);const T=_(h),N=v({__proto__:null,default:T},[h]);export{N as M}; diff --git a/build/assets/Preview-40b44430.js b/build/assets/Preview-90673f14.js similarity index 97% rename from build/assets/Preview-40b44430.js rename to build/assets/Preview-90673f14.js index a74bc32e8..ac87c34b4 100644 --- a/build/assets/Preview-40b44430.js +++ b/build/assets/Preview-90673f14.js @@ -1 +1 @@ -import{a9 as y,r as b}from"./index-17ed06be.js";function v(r,e){for(var t=0;tn[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var w=Object.create,i=Object.defineProperty,P=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,x=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty,j=(r,e,t)=>e in r?i(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,E=(r,e)=>{for(var t in e)i(r,t,{get:e[t],enumerable:!0})},h=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of O(e))!I.call(r,a)&&a!==t&&i(r,a,{get:()=>e[a],enumerable:!(n=P(e,a))||n.enumerable});return r},S=(r,e,t)=>(t=r!=null?w(x(r)):{},h(e||!r||!r.__esModule?i(t,"default",{value:r,enumerable:!0}):t,r)),C=r=>h(i({},"__esModule",{value:!0}),r),p=(r,e,t)=>(j(r,typeof e!="symbol"?e+"":e,t),t),_={};E(_,{default:()=>N});var g=C(_),s=S(b);const u="64px",d={};class N extends s.Component{constructor(){super(...arguments),p(this,"mounted",!1),p(this,"state",{image:null}),p(this,"handleKeyPress",e=>{(e.key==="Enter"||e.key===" ")&&this.props.onClick()})}componentDidMount(){this.mounted=!0,this.fetchImage(this.props)}componentDidUpdate(e){const{url:t,light:n}=this.props;(e.url!==t||e.light!==n)&&this.fetchImage(this.props)}componentWillUnmount(){this.mounted=!1}fetchImage({url:e,light:t,oEmbedUrl:n}){if(!s.default.isValidElement(t)){if(typeof t=="string"){this.setState({image:t});return}if(d[e]){this.setState({image:d[e]});return}return this.setState({image:null}),window.fetch(n.replace("{url}",e)).then(a=>a.json()).then(a=>{if(a.thumbnail_url&&this.mounted){const o=a.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");this.setState({image:o}),d[e]=o}})}}render(){const{light:e,onClick:t,playIcon:n,previewTabIndex:a}=this.props,{image:o}=this.state,l=s.default.isValidElement(e),f={display:"flex",alignItems:"center",justifyContent:"center"},c={preview:{width:"100%",height:"100%",backgroundImage:o&&!l?`url(${o})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...f},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:u,width:u,height:u,position:l?"absolute":void 0,...f},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},m=s.default.createElement("div",{style:c.shadow,className:"react-player__shadow"},s.default.createElement("div",{style:c.playIcon,className:"react-player__play-icon"}));return s.default.createElement("div",{style:c.preview,className:"react-player__preview",onClick:t,tabIndex:a,onKeyPress:this.handleKeyPress},l?e:null,n||m)}}const k=y(g),M=v({__proto__:null,default:k},[g]);export{M as P}; +import{a9 as y,r as b}from"./index-787c3ef8.js";function v(r,e){for(var t=0;tn[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var w=Object.create,i=Object.defineProperty,P=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,x=Object.getPrototypeOf,I=Object.prototype.hasOwnProperty,j=(r,e,t)=>e in r?i(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,E=(r,e)=>{for(var t in e)i(r,t,{get:e[t],enumerable:!0})},h=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of O(e))!I.call(r,a)&&a!==t&&i(r,a,{get:()=>e[a],enumerable:!(n=P(e,a))||n.enumerable});return r},S=(r,e,t)=>(t=r!=null?w(x(r)):{},h(e||!r||!r.__esModule?i(t,"default",{value:r,enumerable:!0}):t,r)),C=r=>h(i({},"__esModule",{value:!0}),r),p=(r,e,t)=>(j(r,typeof e!="symbol"?e+"":e,t),t),_={};E(_,{default:()=>N});var g=C(_),s=S(b);const u="64px",d={};class N extends s.Component{constructor(){super(...arguments),p(this,"mounted",!1),p(this,"state",{image:null}),p(this,"handleKeyPress",e=>{(e.key==="Enter"||e.key===" ")&&this.props.onClick()})}componentDidMount(){this.mounted=!0,this.fetchImage(this.props)}componentDidUpdate(e){const{url:t,light:n}=this.props;(e.url!==t||e.light!==n)&&this.fetchImage(this.props)}componentWillUnmount(){this.mounted=!1}fetchImage({url:e,light:t,oEmbedUrl:n}){if(!s.default.isValidElement(t)){if(typeof t=="string"){this.setState({image:t});return}if(d[e]){this.setState({image:d[e]});return}return this.setState({image:null}),window.fetch(n.replace("{url}",e)).then(a=>a.json()).then(a=>{if(a.thumbnail_url&&this.mounted){const o=a.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");this.setState({image:o}),d[e]=o}})}}render(){const{light:e,onClick:t,playIcon:n,previewTabIndex:a}=this.props,{image:o}=this.state,l=s.default.isValidElement(e),f={display:"flex",alignItems:"center",justifyContent:"center"},c={preview:{width:"100%",height:"100%",backgroundImage:o&&!l?`url(${o})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...f},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:u,width:u,height:u,position:l?"absolute":void 0,...f},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},m=s.default.createElement("div",{style:c.shadow,className:"react-player__shadow"},s.default.createElement("div",{style:c.playIcon,className:"react-player__play-icon"}));return s.default.createElement("div",{style:c.preview,className:"react-player__preview",onClick:t,tabIndex:a,onKeyPress:this.handleKeyPress},l?e:null,n||m)}}const k=y(g),M=v({__proto__:null,default:k},[g]);export{M as P}; diff --git a/build/assets/Skeleton-4c8a0434.js b/build/assets/Skeleton-fe703092.js similarity index 97% rename from build/assets/Skeleton-4c8a0434.js rename to build/assets/Skeleton-fe703092.js index 1540201c1..22e8b26e5 100644 --- a/build/assets/Skeleton-4c8a0434.js +++ b/build/assets/Skeleton-fe703092.js @@ -1,4 +1,4 @@ -import{L as x,M as y,bv as b,O as R,x as o,P as S,bw as u,r as _,S as U,H as $,j as M,U as j,V as A}from"./index-17ed06be.js";function X(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function N(t){return parseFloat(t)}function P(t){return x("MuiSkeleton",t)}y("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const B=["animation","className","component","height","style","variant","width"];let r=t=>t,p,g,m,f;const E=t=>{const{classes:a,variant:e,animation:i,hasChildren:n,width:l,height:s}=t;return A({root:["root",e,i,n&&"withChildren",n&&!l&&"fitContent",n&&!s&&"heightAuto"]},P,a)},F=b(p||(p=r` +import{L as x,M as y,bv as b,O as R,x as o,P as S,bw as u,r as _,S as U,H as $,j as M,U as j,V as A}from"./index-787c3ef8.js";function X(t){return String(t).match(/[\d.\-+]*\s*(.*)/)[1]||""}function N(t){return parseFloat(t)}function P(t){return x("MuiSkeleton",t)}y("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const B=["animation","className","component","height","style","variant","width"];let r=t=>t,p,g,m,f;const E=t=>{const{classes:a,variant:e,animation:i,hasChildren:n,width:l,height:s}=t;return A({root:["root",e,i,n&&"withChildren",n&&!l&&"fitContent",n&&!s&&"heightAuto"]},P,a)},F=b(p||(p=r` 0% { opacity: 1; } diff --git a/build/assets/SoundCloud-3d6c217d.js b/build/assets/SoundCloud-8d2be6f4.js similarity index 95% rename from build/assets/SoundCloud-3d6c217d.js rename to build/assets/SoundCloud-8d2be6f4.js index e9628f09c..acf6f2819 100644 --- a/build/assets/SoundCloud-3d6c217d.js +++ b/build/assets/SoundCloud-8d2be6f4.js @@ -1 +1 @@ -import{a9 as P,r as g}from"./index-17ed06be.js";import{u as b,p as v}from"./index-ed087dc3.js";function O(t,e){for(var r=0;rs[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var S=Object.create,l=Object.defineProperty,w=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyNames,C=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty,D=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,L=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},d=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of j(e))!E.call(t,o)&&o!==r&&l(t,o,{get:()=>e[o],enumerable:!(s=w(e,o))||s.enumerable});return t},R=(t,e,r)=>(r=t!=null?S(C(t)):{},d(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),T=t=>d(l({},"__esModule",{value:!0}),t),a=(t,e,r)=>(D(t,typeof e!="symbol"?e+"":e,r),r),h={};L(h,{default:()=>u});var f=T(h),p=R(g),c=b,M=v;const x="https://w.soundcloud.com/player/api.js",A="SC";class u extends p.Component{constructor(){super(...arguments),a(this,"callPlayer",c.callPlayer),a(this,"duration",null),a(this,"currentTime",null),a(this,"fractionLoaded",null),a(this,"mute",()=>{this.setVolume(0)}),a(this,"unmute",()=>{this.props.volume!==null&&this.setVolume(this.props.volume)}),a(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){(0,c.getSDK)(x,A).then(s=>{if(!this.iframe)return;const{PLAY:o,PLAY_PROGRESS:i,PAUSE:y,FINISH:_,ERROR:m}=s.Widget.Events;r||(this.player=s.Widget(this.iframe),this.player.bind(o,this.props.onPlay),this.player.bind(y,()=>{this.duration-this.currentTime<.05||this.props.onPause()}),this.player.bind(i,n=>{this.currentTime=n.currentPosition/1e3,this.fractionLoaded=n.loadedProgress}),this.player.bind(_,()=>this.props.onEnded()),this.player.bind(m,n=>this.props.onError(n))),this.player.load(e,{...this.props.config.options,callback:()=>{this.player.getDuration(n=>{this.duration=n/1e3,this.props.onReady()})}})})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seekTo",e*1e3),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.fractionLoaded*this.duration}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return p.default.createElement("iframe",{ref:this.ref,src:`https://w.soundcloud.com/player/?url=${encodeURIComponent(this.props.url)}`,style:r,frameBorder:0,allow:"autoplay"})}}a(u,"displayName","SoundCloud");a(u,"canPlay",M.canPlay.soundcloud);a(u,"loopOnEnded",!0);const N=P(f),I=O({__proto__:null,default:N},[f]);export{I as S}; +import{a9 as P,r as g}from"./index-787c3ef8.js";import{u as b,p as v}from"./index-d501a02f.js";function O(t,e){for(var r=0;rs[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var S=Object.create,l=Object.defineProperty,w=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyNames,C=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty,D=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,L=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},d=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of j(e))!E.call(t,o)&&o!==r&&l(t,o,{get:()=>e[o],enumerable:!(s=w(e,o))||s.enumerable});return t},R=(t,e,r)=>(r=t!=null?S(C(t)):{},d(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),T=t=>d(l({},"__esModule",{value:!0}),t),a=(t,e,r)=>(D(t,typeof e!="symbol"?e+"":e,r),r),h={};L(h,{default:()=>u});var f=T(h),p=R(g),c=b,M=v;const x="https://w.soundcloud.com/player/api.js",A="SC";class u extends p.Component{constructor(){super(...arguments),a(this,"callPlayer",c.callPlayer),a(this,"duration",null),a(this,"currentTime",null),a(this,"fractionLoaded",null),a(this,"mute",()=>{this.setVolume(0)}),a(this,"unmute",()=>{this.props.volume!==null&&this.setVolume(this.props.volume)}),a(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){(0,c.getSDK)(x,A).then(s=>{if(!this.iframe)return;const{PLAY:o,PLAY_PROGRESS:i,PAUSE:y,FINISH:_,ERROR:m}=s.Widget.Events;r||(this.player=s.Widget(this.iframe),this.player.bind(o,this.props.onPlay),this.player.bind(y,()=>{this.duration-this.currentTime<.05||this.props.onPause()}),this.player.bind(i,n=>{this.currentTime=n.currentPosition/1e3,this.fractionLoaded=n.loadedProgress}),this.player.bind(_,()=>this.props.onEnded()),this.player.bind(m,n=>this.props.onError(n))),this.player.load(e,{...this.props.config.options,callback:()=>{this.player.getDuration(n=>{this.duration=n/1e3,this.props.onReady()})}})})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seekTo",e*1e3),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.fractionLoaded*this.duration}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return p.default.createElement("iframe",{ref:this.ref,src:`https://w.soundcloud.com/player/?url=${encodeURIComponent(this.props.url)}`,style:r,frameBorder:0,allow:"autoplay"})}}a(u,"displayName","SoundCloud");a(u,"canPlay",M.canPlay.soundcloud);a(u,"loopOnEnded",!0);const N=P(f),I=O({__proto__:null,default:N},[f]);export{I as S}; diff --git a/build/assets/Stack-a8b59155.js b/build/assets/Stack-b3992130.js similarity index 99% rename from build/assets/Stack-a8b59155.js rename to build/assets/Stack-b3992130.js index 3dae975be..bd586f360 100644 --- a/build/assets/Stack-a8b59155.js +++ b/build/assets/Stack-b3992130.js @@ -1 +1 @@ -import{r as E,a8 as Bt,H as ae,x as T,c2 as Ft,c3 as Wt,c4 as Vt,c5 as Lt,c6 as Nt,bz as Ke,by as Ae,c7 as Ht,c1 as It,c8 as Ut,j as K,c9 as Qe,V as ke,L as Te,M as ht,Z as et,$ as tt,O as Me,ca as qt,S as Be,Y as gt,U as zt}from"./index-17ed06be.js";import{J as rt,aR as Yt,Y as Xt}from"./index-2f22123e.js";function Se(e,t){var r,o;return E.isValidElement(e)&&t.indexOf((r=e.type.muiName)!=null?r:(o=e.type)==null||(o=o._payload)==null||(o=o.value)==null?void 0:o.muiName)!==-1}let ot=0;function Gt(e){const[t,r]=E.useState(e),o=e||t;return E.useEffect(()=>{t==null&&(ot+=1,r(`mui-${ot}`))},[t]),o}const nt=Bt["useId".toString()];function Ho(e){if(nt!==void 0){const t=nt();return e??t}return Gt(e)}function Io({controlled:e,default:t,name:r,state:o="value"}){const{current:n}=E.useRef(e!==void 0),[a,c]=E.useState(t),s=n?e:a,i=E.useCallback(f=>{n||c(f)},[]);return[s,i]}const _t=["sx"],Jt=e=>{var t,r;const o={systemProps:{},otherProps:{}},n=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:Ft;return Object.keys(e).forEach(a=>{n[a]?o.systemProps[a]=e[a]:o.otherProps[a]=e[a]}),o};function Zt(e){const{sx:t}=e,r=ae(e,_t),{systemProps:o,otherProps:n}=Jt(r);let a;return Array.isArray(t)?a=[o,...t]:typeof t=="function"?a=(...c)=>{const s=t(...c);return Wt(s)?T({},o,s):o}:a=T({},o,t),T({},n,{sx:a})}function yt(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tt.root});function nr(e){return Nt({props:e,name:"MuiStack",defaultTheme:rr})}function ar(e,t){const r=E.Children.toArray(e).filter(Boolean);return r.reduce((o,n,a)=>(o.push(n),a({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],sr=({ownerState:e,theme:t})=>{let r=T({display:"flex",flexDirection:"column"},Ke({theme:t},Ae({values:e.direction,breakpoints:t.breakpoints.values}),o=>({flexDirection:o})));if(e.spacing){const o=Ht(t),n=Object.keys(t.breakpoints.values).reduce((i,f)=>((typeof e.spacing=="object"&&e.spacing[f]!=null||typeof e.direction=="object"&&e.direction[f]!=null)&&(i[f]=!0),i),{}),a=Ae({values:e.direction,base:n}),c=Ae({values:e.spacing,base:n});typeof a=="object"&&Object.keys(a).forEach((i,f,l)=>{if(!a[i]){const h=f>0?a[l[f-1]]:"column";a[i]=h}}),r=It(r,Ke({theme:t},c,(i,f)=>e.useFlexGap?{gap:Qe(o,i)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${ir(f?a[f]:e.direction)}`]:Qe(o,i)}}))}return r=Ut(t.breakpoints,r),r};function lr(e={}){const{createStyledComponent:t=or,useThemeProps:r=nr,componentName:o="MuiStack"}=e,n=()=>ke({root:["root"]},i=>Te(o,i),{}),a=t(sr);return E.forwardRef(function(i,f){const l=r(i),v=Zt(l),{component:h="div",direction:p="column",spacing:x=0,divider:d,children:m,className:w,useFlexGap:P=!1}=v,b=ae(v,tr),u={direction:p,spacing:x,useFlexGap:P},g=n();return K.jsx(a,T({as:h,ownerState:u,ref:f,className:Kt(g.root,w)},b,{children:d?ar(m,d):m}))})}const cr={disableDefaultClasses:!1},fr=E.createContext(cr);function ur(e){const{disableDefaultClasses:t}=E.useContext(fr);return r=>t?"":e(r)}var B="top",N="bottom",H="right",F="left",Fe="auto",de=[B,N,H,F],te="start",ue="end",pr="clippingParents",bt="viewport",le="popper",dr="reference",at=de.reduce(function(e,t){return e.concat([t+"-"+te,t+"-"+ue])},[]),xt=[].concat(de,[Fe]).reduce(function(e,t){return e.concat([t,t+"-"+te,t+"-"+ue])},[]),vr="beforeRead",mr="read",hr="afterRead",gr="beforeMain",yr="main",br="afterMain",xr="beforeWrite",wr="write",Or="afterWrite",Pr=[vr,mr,hr,gr,yr,br,xr,wr,Or];function U(e){return e?(e.nodeName||"").toLowerCase():null}function W(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Q(e){var t=W(e).Element;return e instanceof t||e instanceof Element}function L(e){var t=W(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function We(e){if(typeof ShadowRoot>"u")return!1;var t=W(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Er(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var o=t.styles[r]||{},n=t.attributes[r]||{},a=t.elements[r];!L(a)||!U(a)||(Object.assign(a.style,o),Object.keys(n).forEach(function(c){var s=n[c];s===!1?a.removeAttribute(c):a.setAttribute(c,s===!0?"":s)}))})}function Cr(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(o){var n=t.elements[o],a=t.attributes[o]||{},c=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:r[o]),s=c.reduce(function(i,f){return i[f]="",i},{});!L(n)||!U(n)||(Object.assign(n.style,s),Object.keys(a).forEach(function(i){n.removeAttribute(i)}))})}}const Rr={name:"applyStyles",enabled:!0,phase:"write",fn:Er,effect:Cr,requires:["computeStyles"]};function I(e){return e.split("-")[0]}var Z=Math.max,we=Math.min,re=Math.round;function $e(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function wt(){return!/^((?!chrome|android).)*safari/i.test($e())}function oe(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var o=e.getBoundingClientRect(),n=1,a=1;t&&L(e)&&(n=e.offsetWidth>0&&re(o.width)/e.offsetWidth||1,a=e.offsetHeight>0&&re(o.height)/e.offsetHeight||1);var c=Q(e)?W(e):window,s=c.visualViewport,i=!wt()&&r,f=(o.left+(i&&s?s.offsetLeft:0))/n,l=(o.top+(i&&s?s.offsetTop:0))/a,v=o.width/n,h=o.height/a;return{width:v,height:h,top:l,right:f+v,bottom:l+h,left:f,x:f,y:l}}function Ve(e){var t=oe(e),r=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:o}}function Ot(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&We(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function q(e){return W(e).getComputedStyle(e)}function Ar(e){return["table","td","th"].indexOf(U(e))>=0}function X(e){return((Q(e)?e.ownerDocument:e.document)||window.document).documentElement}function Oe(e){return U(e)==="html"?e:e.assignedSlot||e.parentNode||(We(e)?e.host:null)||X(e)}function it(e){return!L(e)||q(e).position==="fixed"?null:e.offsetParent}function Sr(e){var t=/firefox/i.test($e()),r=/Trident/i.test($e());if(r&&L(e)){var o=q(e);if(o.position==="fixed")return null}var n=Oe(e);for(We(n)&&(n=n.host);L(n)&&["html","body"].indexOf(U(n))<0;){var a=q(n);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return n;n=n.parentNode}return null}function ve(e){for(var t=W(e),r=it(e);r&&Ar(r)&&q(r).position==="static";)r=it(r);return r&&(U(r)==="html"||U(r)==="body"&&q(r).position==="static")?t:r||Sr(e)||t}function Le(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ce(e,t,r){return Z(e,we(t,r))}function $r(e,t,r){var o=ce(e,t,r);return o>r?r:o}function Pt(){return{top:0,right:0,bottom:0,left:0}}function Et(e){return Object.assign({},Pt(),e)}function Ct(e,t){return t.reduce(function(r,o){return r[o]=e,r},{})}var Dr=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Et(typeof t!="number"?t:Ct(t,de))};function jr(e){var t,r=e.state,o=e.name,n=e.options,a=r.elements.arrow,c=r.modifiersData.popperOffsets,s=I(r.placement),i=Le(s),f=[F,H].indexOf(s)>=0,l=f?"height":"width";if(!(!a||!c)){var v=Dr(n.padding,r),h=Ve(a),p=i==="y"?B:F,x=i==="y"?N:H,d=r.rects.reference[l]+r.rects.reference[i]-c[i]-r.rects.popper[l],m=c[i]-r.rects.reference[i],w=ve(a),P=w?i==="y"?w.clientHeight||0:w.clientWidth||0:0,b=d/2-m/2,u=v[p],g=P-h[l]-v[x],y=P/2-h[l]/2+b,O=ce(u,y,g),A=i;r.modifiersData[o]=(t={},t[A]=O,t.centerOffset=O-y,t)}}function kr(e){var t=e.state,r=e.options,o=r.element,n=o===void 0?"[data-popper-arrow]":o;n!=null&&(typeof n=="string"&&(n=t.elements.popper.querySelector(n),!n)||Ot(t.elements.popper,n)&&(t.elements.arrow=n))}const Tr={name:"arrow",enabled:!0,phase:"main",fn:jr,effect:kr,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ne(e){return e.split("-")[1]}var Mr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Br(e,t){var r=e.x,o=e.y,n=t.devicePixelRatio||1;return{x:re(r*n)/n||0,y:re(o*n)/n||0}}function st(e){var t,r=e.popper,o=e.popperRect,n=e.placement,a=e.variation,c=e.offsets,s=e.position,i=e.gpuAcceleration,f=e.adaptive,l=e.roundOffsets,v=e.isFixed,h=c.x,p=h===void 0?0:h,x=c.y,d=x===void 0?0:x,m=typeof l=="function"?l({x:p,y:d}):{x:p,y:d};p=m.x,d=m.y;var w=c.hasOwnProperty("x"),P=c.hasOwnProperty("y"),b=F,u=B,g=window;if(f){var y=ve(r),O="clientHeight",A="clientWidth";if(y===W(r)&&(y=X(r),q(y).position!=="static"&&s==="absolute"&&(O="scrollHeight",A="scrollWidth")),y=y,n===B||(n===F||n===H)&&a===ue){u=N;var C=v&&y===g&&g.visualViewport?g.visualViewport.height:y[O];d-=C-o.height,d*=i?1:-1}if(n===F||(n===B||n===N)&&a===ue){b=H;var R=v&&y===g&&g.visualViewport?g.visualViewport.width:y[A];p-=R-o.width,p*=i?1:-1}}var $=Object.assign({position:s},f&&Mr),k=l===!0?Br({x:p,y:d},W(r)):{x:p,y:d};if(p=k.x,d=k.y,i){var S;return Object.assign({},$,(S={},S[u]=P?"0":"",S[b]=w?"0":"",S.transform=(g.devicePixelRatio||1)<=1?"translate("+p+"px, "+d+"px)":"translate3d("+p+"px, "+d+"px, 0)",S))}return Object.assign({},$,(t={},t[u]=P?d+"px":"",t[b]=w?p+"px":"",t.transform="",t))}function Fr(e){var t=e.state,r=e.options,o=r.gpuAcceleration,n=o===void 0?!0:o,a=r.adaptive,c=a===void 0?!0:a,s=r.roundOffsets,i=s===void 0?!0:s,f={placement:I(t.placement),variation:ne(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,st(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:i})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,st(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:i})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Wr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Fr,data:{}};var be={passive:!0};function Vr(e){var t=e.state,r=e.instance,o=e.options,n=o.scroll,a=n===void 0?!0:n,c=o.resize,s=c===void 0?!0:c,i=W(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&f.forEach(function(l){l.addEventListener("scroll",r.update,be)}),s&&i.addEventListener("resize",r.update,be),function(){a&&f.forEach(function(l){l.removeEventListener("scroll",r.update,be)}),s&&i.removeEventListener("resize",r.update,be)}}const Lr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Vr,data:{}};var Nr={left:"right",right:"left",bottom:"top",top:"bottom"};function xe(e){return e.replace(/left|right|bottom|top/g,function(t){return Nr[t]})}var Hr={start:"end",end:"start"};function lt(e){return e.replace(/start|end/g,function(t){return Hr[t]})}function Ne(e){var t=W(e),r=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:r,scrollTop:o}}function He(e){return oe(X(e)).left+Ne(e).scrollLeft}function Ir(e,t){var r=W(e),o=X(e),n=r.visualViewport,a=o.clientWidth,c=o.clientHeight,s=0,i=0;if(n){a=n.width,c=n.height;var f=wt();(f||!f&&t==="fixed")&&(s=n.offsetLeft,i=n.offsetTop)}return{width:a,height:c,x:s+He(e),y:i}}function Ur(e){var t,r=X(e),o=Ne(e),n=(t=e.ownerDocument)==null?void 0:t.body,a=Z(r.scrollWidth,r.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),c=Z(r.scrollHeight,r.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),s=-o.scrollLeft+He(e),i=-o.scrollTop;return q(n||r).direction==="rtl"&&(s+=Z(r.clientWidth,n?n.clientWidth:0)-a),{width:a,height:c,x:s,y:i}}function Ie(e){var t=q(e),r=t.overflow,o=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+n+o)}function Rt(e){return["html","body","#document"].indexOf(U(e))>=0?e.ownerDocument.body:L(e)&&Ie(e)?e:Rt(Oe(e))}function fe(e,t){var r;t===void 0&&(t=[]);var o=Rt(e),n=o===((r=e.ownerDocument)==null?void 0:r.body),a=W(o),c=n?[a].concat(a.visualViewport||[],Ie(o)?o:[]):o,s=t.concat(c);return n?s:s.concat(fe(Oe(c)))}function De(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function qr(e,t){var r=oe(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function ct(e,t,r){return t===bt?De(Ir(e,r)):Q(t)?qr(t,r):De(Ur(X(e)))}function zr(e){var t=fe(Oe(e)),r=["absolute","fixed"].indexOf(q(e).position)>=0,o=r&&L(e)?ve(e):e;return Q(o)?t.filter(function(n){return Q(n)&&Ot(n,o)&&U(n)!=="body"}):[]}function Yr(e,t,r,o){var n=t==="clippingParents"?zr(e):[].concat(t),a=[].concat(n,[r]),c=a[0],s=a.reduce(function(i,f){var l=ct(e,f,o);return i.top=Z(l.top,i.top),i.right=we(l.right,i.right),i.bottom=we(l.bottom,i.bottom),i.left=Z(l.left,i.left),i},ct(e,c,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function At(e){var t=e.reference,r=e.element,o=e.placement,n=o?I(o):null,a=o?ne(o):null,c=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,i;switch(n){case B:i={x:c,y:t.y-r.height};break;case N:i={x:c,y:t.y+t.height};break;case H:i={x:t.x+t.width,y:s};break;case F:i={x:t.x-r.width,y:s};break;default:i={x:t.x,y:t.y}}var f=n?Le(n):null;if(f!=null){var l=f==="y"?"height":"width";switch(a){case te:i[f]=i[f]-(t[l]/2-r[l]/2);break;case ue:i[f]=i[f]+(t[l]/2-r[l]/2);break}}return i}function pe(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=o===void 0?e.placement:o,a=r.strategy,c=a===void 0?e.strategy:a,s=r.boundary,i=s===void 0?pr:s,f=r.rootBoundary,l=f===void 0?bt:f,v=r.elementContext,h=v===void 0?le:v,p=r.altBoundary,x=p===void 0?!1:p,d=r.padding,m=d===void 0?0:d,w=Et(typeof m!="number"?m:Ct(m,de)),P=h===le?dr:le,b=e.rects.popper,u=e.elements[x?P:h],g=Yr(Q(u)?u:u.contextElement||X(e.elements.popper),i,l,c),y=oe(e.elements.reference),O=At({reference:y,element:b,strategy:"absolute",placement:n}),A=De(Object.assign({},b,O)),C=h===le?A:y,R={top:g.top-C.top+w.top,bottom:C.bottom-g.bottom+w.bottom,left:g.left-C.left+w.left,right:C.right-g.right+w.right},$=e.modifiersData.offset;if(h===le&&$){var k=$[n];Object.keys(R).forEach(function(S){var j=[H,N].indexOf(S)>=0?1:-1,V=[B,N].indexOf(S)>=0?"y":"x";R[S]+=k[V]*j})}return R}function Xr(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=r.boundary,a=r.rootBoundary,c=r.padding,s=r.flipVariations,i=r.allowedAutoPlacements,f=i===void 0?xt:i,l=ne(o),v=l?s?at:at.filter(function(x){return ne(x)===l}):de,h=v.filter(function(x){return f.indexOf(x)>=0});h.length===0&&(h=v);var p=h.reduce(function(x,d){return x[d]=pe(e,{placement:d,boundary:n,rootBoundary:a,padding:c})[I(d)],x},{});return Object.keys(p).sort(function(x,d){return p[x]-p[d]})}function Gr(e){if(I(e)===Fe)return[];var t=xe(e);return[lt(e),t,lt(t)]}function _r(e){var t=e.state,r=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var n=r.mainAxis,a=n===void 0?!0:n,c=r.altAxis,s=c===void 0?!0:c,i=r.fallbackPlacements,f=r.padding,l=r.boundary,v=r.rootBoundary,h=r.altBoundary,p=r.flipVariations,x=p===void 0?!0:p,d=r.allowedAutoPlacements,m=t.options.placement,w=I(m),P=w===m,b=i||(P||!x?[xe(m)]:Gr(m)),u=[m].concat(b).reduce(function(ee,Y){return ee.concat(I(Y)===Fe?Xr(t,{placement:Y,boundary:l,rootBoundary:v,padding:f,flipVariations:x,allowedAutoPlacements:d}):Y)},[]),g=t.rects.reference,y=t.rects.popper,O=new Map,A=!0,C=u[0],R=0;R=0,V=j?"width":"height",D=pe(t,{placement:$,boundary:l,rootBoundary:v,altBoundary:h,padding:f}),M=j?S?H:F:S?N:B;g[V]>y[V]&&(M=xe(M));var z=xe(M),G=[];if(a&&G.push(D[k]<=0),s&&G.push(D[M]<=0,D[z]<=0),G.every(function(ee){return ee})){C=$,A=!1;break}O.set($,G)}if(A)for(var me=x?3:1,Pe=function(Y){var se=u.find(function(ge){var _=O.get(ge);if(_)return _.slice(0,Y).every(function(Ee){return Ee})});if(se)return C=se,"break"},ie=me;ie>0;ie--){var he=Pe(ie);if(he==="break")break}t.placement!==C&&(t.modifiersData[o]._skip=!0,t.placement=C,t.reset=!0)}}const Jr={name:"flip",enabled:!0,phase:"main",fn:_r,requiresIfExists:["offset"],data:{_skip:!1}};function ft(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ut(e){return[B,H,N,F].some(function(t){return e[t]>=0})}function Zr(e){var t=e.state,r=e.name,o=t.rects.reference,n=t.rects.popper,a=t.modifiersData.preventOverflow,c=pe(t,{elementContext:"reference"}),s=pe(t,{altBoundary:!0}),i=ft(c,o),f=ft(s,n,a),l=ut(i),v=ut(f);t.modifiersData[r]={referenceClippingOffsets:i,popperEscapeOffsets:f,isReferenceHidden:l,hasPopperEscaped:v},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":v})}const Kr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Zr};function Qr(e,t,r){var o=I(e),n=[F,B].indexOf(o)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,c=a[0],s=a[1];return c=c||0,s=(s||0)*n,[F,H].indexOf(o)>=0?{x:s,y:c}:{x:c,y:s}}function eo(e){var t=e.state,r=e.options,o=e.name,n=r.offset,a=n===void 0?[0,0]:n,c=xt.reduce(function(l,v){return l[v]=Qr(v,t.rects,a),l},{}),s=c[t.placement],i=s.x,f=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=f),t.modifiersData[o]=c}const to={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:eo};function ro(e){var t=e.state,r=e.name;t.modifiersData[r]=At({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const oo={name:"popperOffsets",enabled:!0,phase:"read",fn:ro,data:{}};function no(e){return e==="x"?"y":"x"}function ao(e){var t=e.state,r=e.options,o=e.name,n=r.mainAxis,a=n===void 0?!0:n,c=r.altAxis,s=c===void 0?!1:c,i=r.boundary,f=r.rootBoundary,l=r.altBoundary,v=r.padding,h=r.tether,p=h===void 0?!0:h,x=r.tetherOffset,d=x===void 0?0:x,m=pe(t,{boundary:i,rootBoundary:f,padding:v,altBoundary:l}),w=I(t.placement),P=ne(t.placement),b=!P,u=Le(w),g=no(u),y=t.modifiersData.popperOffsets,O=t.rects.reference,A=t.rects.popper,C=typeof d=="function"?d(Object.assign({},t.rects,{placement:t.placement})):d,R=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(y){if(a){var S,j=u==="y"?B:F,V=u==="y"?N:H,D=u==="y"?"height":"width",M=y[u],z=M+m[j],G=M-m[V],me=p?-A[D]/2:0,Pe=P===te?O[D]:A[D],ie=P===te?-A[D]:-O[D],he=t.elements.arrow,ee=p&&he?Ve(he):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Pt(),se=Y[j],ge=Y[V],_=ce(0,O[D],ee[D]),Ee=b?O[D]/2-me-_-se-R.mainAxis:Pe-_-se-R.mainAxis,$t=b?-O[D]/2+me+_+ge+R.mainAxis:ie+_+ge+R.mainAxis,Ce=t.elements.arrow&&ve(t.elements.arrow),Dt=Ce?u==="y"?Ce.clientTop||0:Ce.clientLeft||0:0,Ue=(S=$==null?void 0:$[u])!=null?S:0,jt=M+Ee-Ue-Dt,kt=M+$t-Ue,qe=ce(p?we(z,jt):z,M,p?Z(G,kt):G);y[u]=qe,k[u]=qe-M}if(s){var ze,Tt=u==="x"?B:F,Mt=u==="x"?N:H,J=y[g],ye=g==="y"?"height":"width",Ye=J+m[Tt],Xe=J-m[Mt],Re=[B,F].indexOf(w)!==-1,Ge=(ze=$==null?void 0:$[g])!=null?ze:0,_e=Re?Ye:J-O[ye]-A[ye]-Ge+R.altAxis,Je=Re?J+O[ye]+A[ye]-Ge-R.altAxis:Xe,Ze=p&&Re?$r(_e,J,Je):ce(p?_e:Ye,J,p?Je:Xe);y[g]=Ze,k[g]=Ze-J}t.modifiersData[o]=k}}const io={name:"preventOverflow",enabled:!0,phase:"main",fn:ao,requiresIfExists:["offset"]};function so(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function lo(e){return e===W(e)||!L(e)?Ne(e):so(e)}function co(e){var t=e.getBoundingClientRect(),r=re(t.width)/e.offsetWidth||1,o=re(t.height)/e.offsetHeight||1;return r!==1||o!==1}function fo(e,t,r){r===void 0&&(r=!1);var o=L(t),n=L(t)&&co(t),a=X(t),c=oe(e,n,r),s={scrollLeft:0,scrollTop:0},i={x:0,y:0};return(o||!o&&!r)&&((U(t)!=="body"||Ie(a))&&(s=lo(t)),L(t)?(i=oe(t,!0),i.x+=t.clientLeft,i.y+=t.clientTop):a&&(i.x=He(a))),{x:c.left+s.scrollLeft-i.x,y:c.top+s.scrollTop-i.y,width:c.width,height:c.height}}function uo(e){var t=new Map,r=new Set,o=[];e.forEach(function(a){t.set(a.name,a)});function n(a){r.add(a.name);var c=[].concat(a.requires||[],a.requiresIfExists||[]);c.forEach(function(s){if(!r.has(s)){var i=t.get(s);i&&n(i)}}),o.push(a)}return e.forEach(function(a){r.has(a.name)||n(a)}),o}function po(e){var t=uo(e);return Pr.reduce(function(r,o){return r.concat(t.filter(function(n){return n.phase===o}))},[])}function vo(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function mo(e){var t=e.reduce(function(r,o){var n=r[o.name];return r[o.name]=n?Object.assign({},n,o,{options:Object.assign({},n.options,o.options),data:Object.assign({},n.data,o.data)}):o,r},{});return Object.keys(t).map(function(r){return t[r]})}var pt={placement:"bottom",modifiers:[],strategy:"absolute"};function dt(){for(var e=arguments.length,t=new Array(e),r=0;rke({root:["root"]},ur(bo)),Co={},Ro=E.forwardRef(function(t,r){var o;const{anchorEl:n,children:a,direction:c,disablePortal:s,modifiers:i,open:f,placement:l,popperOptions:v,popperRef:h,slotProps:p={},slots:x={},TransitionProps:d}=t,m=ae(t,xo),w=E.useRef(null),P=et(w,r),b=E.useRef(null),u=et(b,h),g=E.useRef(u);tt(()=>{g.current=u},[u]),E.useImperativeHandle(h,()=>b.current,[]);const y=Oo(l,c),[O,A]=E.useState(y),[C,R]=E.useState(je(n));E.useEffect(()=>{b.current&&b.current.forceUpdate()}),E.useEffect(()=>{n&&R(je(n))},[n]),tt(()=>{if(!C||!f)return;const V=z=>{A(z.placement)};let D=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:z})=>{V(z)}}];i!=null&&(D=D.concat(i)),v&&v.modifiers!=null&&(D=D.concat(v.modifiers));const M=yo(C,w.current,T({placement:y},v,{modifiers:D}));return g.current(M),()=>{M.destroy(),g.current(null)}},[C,s,i,f,v,y]);const $={placement:O};d!==null&&($.TransitionProps=d);const k=Eo(),S=(o=x.root)!=null?o:"div",j=Xt({elementType:S,externalSlotProps:p.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:P},ownerState:t,className:k.root});return K.jsx(S,T({},j,{children:typeof a=="function"?a($):a}))}),Ao=E.forwardRef(function(t,r){const{anchorEl:o,children:n,container:a,direction:c="ltr",disablePortal:s=!1,keepMounted:i=!1,modifiers:f,open:l,placement:v="bottom",popperOptions:h=Co,popperRef:p,style:x,transition:d=!1,slotProps:m={},slots:w={}}=t,P=ae(t,wo),[b,u]=E.useState(!0),g=()=>{u(!1)},y=()=>{u(!0)};if(!i&&!l&&(!d||b))return null;let O;if(a)O=a;else if(o){const R=je(o);O=R&&Po(R)?rt(R).body:rt(null).body}const A=!l&&i&&(!d||b)?"none":void 0,C=d?{in:l,onEnter:g,onExited:y}:void 0;return K.jsx(Yt,{disablePortal:s,container:O,children:K.jsx(Ro,T({anchorEl:o,direction:c,disablePortal:s,modifiers:f,ref:r,open:d?!b:l,placement:v,popperOptions:h,popperRef:p,slotProps:m,slots:w},P,{style:T({position:"fixed",top:0,left:0,display:A},x),TransitionProps:C,children:n}))})}),So=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],$o=Me(Ao,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Do=E.forwardRef(function(t,r){var o;const n=qt(),a=Be({props:t,name:"MuiPopper"}),{anchorEl:c,component:s,components:i,componentsProps:f,container:l,disablePortal:v,keepMounted:h,modifiers:p,open:x,placement:d,popperOptions:m,popperRef:w,transition:P,slots:b,slotProps:u}=a,g=ae(a,So),y=(o=b==null?void 0:b.root)!=null?o:i==null?void 0:i.Root,O=T({anchorEl:c,container:l,disablePortal:v,keepMounted:h,modifiers:p,open:x,placement:d,popperOptions:m,popperRef:w,transition:P},g);return K.jsx($o,T({as:s,direction:n==null?void 0:n.direction,slots:{root:y},slotProps:u??f},O,{ref:r}))}),Uo=Do;function qo({props:e,states:t,muiFormControl:r}){return t.reduce((o,n)=>(o[n]=e[n],r&&typeof e[n]>"u"&&(o[n]=r[n]),o),{})}const jo=E.createContext(void 0),St=jo;function zo(){return E.useContext(St)}function vt(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function mt(e,t=!1){return e&&(vt(e.value)&&e.value!==""||t&&vt(e.defaultValue)&&e.defaultValue!=="")}function ko(e){return e.startAdornment}function To(e){return Te("MuiFormControl",e)}ht("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Mo=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Bo=e=>{const{classes:t,margin:r,fullWidth:o}=e,n={root:["root",r!=="none"&&`margin${gt(r)}`,o&&"fullWidth"]};return ke(n,To,t)},Fo=Me("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>T({},t.root,t[`margin${gt(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>T({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),Wo=E.forwardRef(function(t,r){const o=Be({props:t,name:"MuiFormControl"}),{children:n,className:a,color:c="primary",component:s="div",disabled:i=!1,error:f=!1,focused:l,fullWidth:v=!1,hiddenLabel:h=!1,margin:p="none",required:x=!1,size:d="medium",variant:m="outlined"}=o,w=ae(o,Mo),P=T({},o,{color:c,component:s,disabled:i,error:f,fullWidth:v,hiddenLabel:h,margin:p,required:x,size:d,variant:m}),b=Bo(P),[u,g]=E.useState(()=>{let S=!1;return n&&E.Children.forEach(n,j=>{if(!Se(j,["Input","Select"]))return;const V=Se(j,["Select"])?j.props.input:j;V&&ko(V.props)&&(S=!0)}),S}),[y,O]=E.useState(()=>{let S=!1;return n&&E.Children.forEach(n,j=>{Se(j,["Input","Select"])&&(mt(j.props,!0)||mt(j.props.inputProps,!0))&&(S=!0)}),S}),[A,C]=E.useState(!1);i&&A&&C(!1);const R=l!==void 0&&!i?l:A;let $;const k=E.useMemo(()=>({adornedStart:u,setAdornedStart:g,color:c,disabled:i,error:f,filled:y,focused:R,fullWidth:v,hiddenLabel:h,size:d,onBlur:()=>{C(!1)},onEmpty:()=>{O(!1)},onFilled:()=>{O(!0)},onFocus:()=>{C(!0)},registerEffect:$,required:x,variant:m}),[u,c,i,f,y,R,v,h,$,x,d,m]);return K.jsx(St.Provider,{value:k,children:K.jsx(Fo,T({as:s,ownerState:P,className:zt(b.root,a),ref:r},w,{children:n}))})}),Yo=Wo,Vo=lr({createStyledComponent:Me("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Be({props:e,name:"MuiStack"})}),Xo=Vo;export{Yo as F,Uo as P,Xo as S,Ho as a,zo as b,St as c,Zt as e,qo as f,mt as i,Io as u}; +import{r as E,a8 as Bt,H as ae,x as T,c2 as Ft,c3 as Wt,c4 as Vt,c5 as Lt,c6 as Nt,bz as Ke,by as Ae,c7 as Ht,c1 as It,c8 as Ut,j as K,c9 as Qe,V as ke,L as Te,M as ht,Z as et,$ as tt,O as Me,ca as qt,S as Be,Y as gt,U as zt}from"./index-787c3ef8.js";import{J as rt,aR as Yt,Y as Xt}from"./index-77dce891.js";function Se(e,t){var r,o;return E.isValidElement(e)&&t.indexOf((r=e.type.muiName)!=null?r:(o=e.type)==null||(o=o._payload)==null||(o=o.value)==null?void 0:o.muiName)!==-1}let ot=0;function Gt(e){const[t,r]=E.useState(e),o=e||t;return E.useEffect(()=>{t==null&&(ot+=1,r(`mui-${ot}`))},[t]),o}const nt=Bt["useId".toString()];function Ho(e){if(nt!==void 0){const t=nt();return e??t}return Gt(e)}function Io({controlled:e,default:t,name:r,state:o="value"}){const{current:n}=E.useRef(e!==void 0),[a,c]=E.useState(t),s=n?e:a,i=E.useCallback(f=>{n||c(f)},[]);return[s,i]}const _t=["sx"],Jt=e=>{var t,r;const o={systemProps:{},otherProps:{}},n=(t=e==null||(r=e.theme)==null?void 0:r.unstable_sxConfig)!=null?t:Ft;return Object.keys(e).forEach(a=>{n[a]?o.systemProps[a]=e[a]:o.otherProps[a]=e[a]}),o};function Zt(e){const{sx:t}=e,r=ae(e,_t),{systemProps:o,otherProps:n}=Jt(r);let a;return Array.isArray(t)?a=[o,...t]:typeof t=="function"?a=(...c)=>{const s=t(...c);return Wt(s)?T({},o,s):o}:a=T({},o,t),T({},n,{sx:a})}function yt(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tt.root});function nr(e){return Nt({props:e,name:"MuiStack",defaultTheme:rr})}function ar(e,t){const r=E.Children.toArray(e).filter(Boolean);return r.reduce((o,n,a)=>(o.push(n),a({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],sr=({ownerState:e,theme:t})=>{let r=T({display:"flex",flexDirection:"column"},Ke({theme:t},Ae({values:e.direction,breakpoints:t.breakpoints.values}),o=>({flexDirection:o})));if(e.spacing){const o=Ht(t),n=Object.keys(t.breakpoints.values).reduce((i,f)=>((typeof e.spacing=="object"&&e.spacing[f]!=null||typeof e.direction=="object"&&e.direction[f]!=null)&&(i[f]=!0),i),{}),a=Ae({values:e.direction,base:n}),c=Ae({values:e.spacing,base:n});typeof a=="object"&&Object.keys(a).forEach((i,f,l)=>{if(!a[i]){const h=f>0?a[l[f-1]]:"column";a[i]=h}}),r=It(r,Ke({theme:t},c,(i,f)=>e.useFlexGap?{gap:Qe(o,i)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${ir(f?a[f]:e.direction)}`]:Qe(o,i)}}))}return r=Ut(t.breakpoints,r),r};function lr(e={}){const{createStyledComponent:t=or,useThemeProps:r=nr,componentName:o="MuiStack"}=e,n=()=>ke({root:["root"]},i=>Te(o,i),{}),a=t(sr);return E.forwardRef(function(i,f){const l=r(i),v=Zt(l),{component:h="div",direction:p="column",spacing:x=0,divider:d,children:m,className:w,useFlexGap:P=!1}=v,b=ae(v,tr),u={direction:p,spacing:x,useFlexGap:P},g=n();return K.jsx(a,T({as:h,ownerState:u,ref:f,className:Kt(g.root,w)},b,{children:d?ar(m,d):m}))})}const cr={disableDefaultClasses:!1},fr=E.createContext(cr);function ur(e){const{disableDefaultClasses:t}=E.useContext(fr);return r=>t?"":e(r)}var B="top",N="bottom",H="right",F="left",Fe="auto",de=[B,N,H,F],te="start",ue="end",pr="clippingParents",bt="viewport",le="popper",dr="reference",at=de.reduce(function(e,t){return e.concat([t+"-"+te,t+"-"+ue])},[]),xt=[].concat(de,[Fe]).reduce(function(e,t){return e.concat([t,t+"-"+te,t+"-"+ue])},[]),vr="beforeRead",mr="read",hr="afterRead",gr="beforeMain",yr="main",br="afterMain",xr="beforeWrite",wr="write",Or="afterWrite",Pr=[vr,mr,hr,gr,yr,br,xr,wr,Or];function U(e){return e?(e.nodeName||"").toLowerCase():null}function W(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Q(e){var t=W(e).Element;return e instanceof t||e instanceof Element}function L(e){var t=W(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function We(e){if(typeof ShadowRoot>"u")return!1;var t=W(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Er(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var o=t.styles[r]||{},n=t.attributes[r]||{},a=t.elements[r];!L(a)||!U(a)||(Object.assign(a.style,o),Object.keys(n).forEach(function(c){var s=n[c];s===!1?a.removeAttribute(c):a.setAttribute(c,s===!0?"":s)}))})}function Cr(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(o){var n=t.elements[o],a=t.attributes[o]||{},c=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:r[o]),s=c.reduce(function(i,f){return i[f]="",i},{});!L(n)||!U(n)||(Object.assign(n.style,s),Object.keys(a).forEach(function(i){n.removeAttribute(i)}))})}}const Rr={name:"applyStyles",enabled:!0,phase:"write",fn:Er,effect:Cr,requires:["computeStyles"]};function I(e){return e.split("-")[0]}var Z=Math.max,we=Math.min,re=Math.round;function $e(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function wt(){return!/^((?!chrome|android).)*safari/i.test($e())}function oe(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var o=e.getBoundingClientRect(),n=1,a=1;t&&L(e)&&(n=e.offsetWidth>0&&re(o.width)/e.offsetWidth||1,a=e.offsetHeight>0&&re(o.height)/e.offsetHeight||1);var c=Q(e)?W(e):window,s=c.visualViewport,i=!wt()&&r,f=(o.left+(i&&s?s.offsetLeft:0))/n,l=(o.top+(i&&s?s.offsetTop:0))/a,v=o.width/n,h=o.height/a;return{width:v,height:h,top:l,right:f+v,bottom:l+h,left:f,x:f,y:l}}function Ve(e){var t=oe(e),r=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:o}}function Ot(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&We(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function q(e){return W(e).getComputedStyle(e)}function Ar(e){return["table","td","th"].indexOf(U(e))>=0}function X(e){return((Q(e)?e.ownerDocument:e.document)||window.document).documentElement}function Oe(e){return U(e)==="html"?e:e.assignedSlot||e.parentNode||(We(e)?e.host:null)||X(e)}function it(e){return!L(e)||q(e).position==="fixed"?null:e.offsetParent}function Sr(e){var t=/firefox/i.test($e()),r=/Trident/i.test($e());if(r&&L(e)){var o=q(e);if(o.position==="fixed")return null}var n=Oe(e);for(We(n)&&(n=n.host);L(n)&&["html","body"].indexOf(U(n))<0;){var a=q(n);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return n;n=n.parentNode}return null}function ve(e){for(var t=W(e),r=it(e);r&&Ar(r)&&q(r).position==="static";)r=it(r);return r&&(U(r)==="html"||U(r)==="body"&&q(r).position==="static")?t:r||Sr(e)||t}function Le(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ce(e,t,r){return Z(e,we(t,r))}function $r(e,t,r){var o=ce(e,t,r);return o>r?r:o}function Pt(){return{top:0,right:0,bottom:0,left:0}}function Et(e){return Object.assign({},Pt(),e)}function Ct(e,t){return t.reduce(function(r,o){return r[o]=e,r},{})}var Dr=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Et(typeof t!="number"?t:Ct(t,de))};function jr(e){var t,r=e.state,o=e.name,n=e.options,a=r.elements.arrow,c=r.modifiersData.popperOffsets,s=I(r.placement),i=Le(s),f=[F,H].indexOf(s)>=0,l=f?"height":"width";if(!(!a||!c)){var v=Dr(n.padding,r),h=Ve(a),p=i==="y"?B:F,x=i==="y"?N:H,d=r.rects.reference[l]+r.rects.reference[i]-c[i]-r.rects.popper[l],m=c[i]-r.rects.reference[i],w=ve(a),P=w?i==="y"?w.clientHeight||0:w.clientWidth||0:0,b=d/2-m/2,u=v[p],g=P-h[l]-v[x],y=P/2-h[l]/2+b,O=ce(u,y,g),A=i;r.modifiersData[o]=(t={},t[A]=O,t.centerOffset=O-y,t)}}function kr(e){var t=e.state,r=e.options,o=r.element,n=o===void 0?"[data-popper-arrow]":o;n!=null&&(typeof n=="string"&&(n=t.elements.popper.querySelector(n),!n)||Ot(t.elements.popper,n)&&(t.elements.arrow=n))}const Tr={name:"arrow",enabled:!0,phase:"main",fn:jr,effect:kr,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ne(e){return e.split("-")[1]}var Mr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Br(e,t){var r=e.x,o=e.y,n=t.devicePixelRatio||1;return{x:re(r*n)/n||0,y:re(o*n)/n||0}}function st(e){var t,r=e.popper,o=e.popperRect,n=e.placement,a=e.variation,c=e.offsets,s=e.position,i=e.gpuAcceleration,f=e.adaptive,l=e.roundOffsets,v=e.isFixed,h=c.x,p=h===void 0?0:h,x=c.y,d=x===void 0?0:x,m=typeof l=="function"?l({x:p,y:d}):{x:p,y:d};p=m.x,d=m.y;var w=c.hasOwnProperty("x"),P=c.hasOwnProperty("y"),b=F,u=B,g=window;if(f){var y=ve(r),O="clientHeight",A="clientWidth";if(y===W(r)&&(y=X(r),q(y).position!=="static"&&s==="absolute"&&(O="scrollHeight",A="scrollWidth")),y=y,n===B||(n===F||n===H)&&a===ue){u=N;var C=v&&y===g&&g.visualViewport?g.visualViewport.height:y[O];d-=C-o.height,d*=i?1:-1}if(n===F||(n===B||n===N)&&a===ue){b=H;var R=v&&y===g&&g.visualViewport?g.visualViewport.width:y[A];p-=R-o.width,p*=i?1:-1}}var $=Object.assign({position:s},f&&Mr),k=l===!0?Br({x:p,y:d},W(r)):{x:p,y:d};if(p=k.x,d=k.y,i){var S;return Object.assign({},$,(S={},S[u]=P?"0":"",S[b]=w?"0":"",S.transform=(g.devicePixelRatio||1)<=1?"translate("+p+"px, "+d+"px)":"translate3d("+p+"px, "+d+"px, 0)",S))}return Object.assign({},$,(t={},t[u]=P?d+"px":"",t[b]=w?p+"px":"",t.transform="",t))}function Fr(e){var t=e.state,r=e.options,o=r.gpuAcceleration,n=o===void 0?!0:o,a=r.adaptive,c=a===void 0?!0:a,s=r.roundOffsets,i=s===void 0?!0:s,f={placement:I(t.placement),variation:ne(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,st(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:c,roundOffsets:i})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,st(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:i})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Wr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Fr,data:{}};var be={passive:!0};function Vr(e){var t=e.state,r=e.instance,o=e.options,n=o.scroll,a=n===void 0?!0:n,c=o.resize,s=c===void 0?!0:c,i=W(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&f.forEach(function(l){l.addEventListener("scroll",r.update,be)}),s&&i.addEventListener("resize",r.update,be),function(){a&&f.forEach(function(l){l.removeEventListener("scroll",r.update,be)}),s&&i.removeEventListener("resize",r.update,be)}}const Lr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Vr,data:{}};var Nr={left:"right",right:"left",bottom:"top",top:"bottom"};function xe(e){return e.replace(/left|right|bottom|top/g,function(t){return Nr[t]})}var Hr={start:"end",end:"start"};function lt(e){return e.replace(/start|end/g,function(t){return Hr[t]})}function Ne(e){var t=W(e),r=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:r,scrollTop:o}}function He(e){return oe(X(e)).left+Ne(e).scrollLeft}function Ir(e,t){var r=W(e),o=X(e),n=r.visualViewport,a=o.clientWidth,c=o.clientHeight,s=0,i=0;if(n){a=n.width,c=n.height;var f=wt();(f||!f&&t==="fixed")&&(s=n.offsetLeft,i=n.offsetTop)}return{width:a,height:c,x:s+He(e),y:i}}function Ur(e){var t,r=X(e),o=Ne(e),n=(t=e.ownerDocument)==null?void 0:t.body,a=Z(r.scrollWidth,r.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),c=Z(r.scrollHeight,r.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),s=-o.scrollLeft+He(e),i=-o.scrollTop;return q(n||r).direction==="rtl"&&(s+=Z(r.clientWidth,n?n.clientWidth:0)-a),{width:a,height:c,x:s,y:i}}function Ie(e){var t=q(e),r=t.overflow,o=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+n+o)}function Rt(e){return["html","body","#document"].indexOf(U(e))>=0?e.ownerDocument.body:L(e)&&Ie(e)?e:Rt(Oe(e))}function fe(e,t){var r;t===void 0&&(t=[]);var o=Rt(e),n=o===((r=e.ownerDocument)==null?void 0:r.body),a=W(o),c=n?[a].concat(a.visualViewport||[],Ie(o)?o:[]):o,s=t.concat(c);return n?s:s.concat(fe(Oe(c)))}function De(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function qr(e,t){var r=oe(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function ct(e,t,r){return t===bt?De(Ir(e,r)):Q(t)?qr(t,r):De(Ur(X(e)))}function zr(e){var t=fe(Oe(e)),r=["absolute","fixed"].indexOf(q(e).position)>=0,o=r&&L(e)?ve(e):e;return Q(o)?t.filter(function(n){return Q(n)&&Ot(n,o)&&U(n)!=="body"}):[]}function Yr(e,t,r,o){var n=t==="clippingParents"?zr(e):[].concat(t),a=[].concat(n,[r]),c=a[0],s=a.reduce(function(i,f){var l=ct(e,f,o);return i.top=Z(l.top,i.top),i.right=we(l.right,i.right),i.bottom=we(l.bottom,i.bottom),i.left=Z(l.left,i.left),i},ct(e,c,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function At(e){var t=e.reference,r=e.element,o=e.placement,n=o?I(o):null,a=o?ne(o):null,c=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,i;switch(n){case B:i={x:c,y:t.y-r.height};break;case N:i={x:c,y:t.y+t.height};break;case H:i={x:t.x+t.width,y:s};break;case F:i={x:t.x-r.width,y:s};break;default:i={x:t.x,y:t.y}}var f=n?Le(n):null;if(f!=null){var l=f==="y"?"height":"width";switch(a){case te:i[f]=i[f]-(t[l]/2-r[l]/2);break;case ue:i[f]=i[f]+(t[l]/2-r[l]/2);break}}return i}function pe(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=o===void 0?e.placement:o,a=r.strategy,c=a===void 0?e.strategy:a,s=r.boundary,i=s===void 0?pr:s,f=r.rootBoundary,l=f===void 0?bt:f,v=r.elementContext,h=v===void 0?le:v,p=r.altBoundary,x=p===void 0?!1:p,d=r.padding,m=d===void 0?0:d,w=Et(typeof m!="number"?m:Ct(m,de)),P=h===le?dr:le,b=e.rects.popper,u=e.elements[x?P:h],g=Yr(Q(u)?u:u.contextElement||X(e.elements.popper),i,l,c),y=oe(e.elements.reference),O=At({reference:y,element:b,strategy:"absolute",placement:n}),A=De(Object.assign({},b,O)),C=h===le?A:y,R={top:g.top-C.top+w.top,bottom:C.bottom-g.bottom+w.bottom,left:g.left-C.left+w.left,right:C.right-g.right+w.right},$=e.modifiersData.offset;if(h===le&&$){var k=$[n];Object.keys(R).forEach(function(S){var j=[H,N].indexOf(S)>=0?1:-1,V=[B,N].indexOf(S)>=0?"y":"x";R[S]+=k[V]*j})}return R}function Xr(e,t){t===void 0&&(t={});var r=t,o=r.placement,n=r.boundary,a=r.rootBoundary,c=r.padding,s=r.flipVariations,i=r.allowedAutoPlacements,f=i===void 0?xt:i,l=ne(o),v=l?s?at:at.filter(function(x){return ne(x)===l}):de,h=v.filter(function(x){return f.indexOf(x)>=0});h.length===0&&(h=v);var p=h.reduce(function(x,d){return x[d]=pe(e,{placement:d,boundary:n,rootBoundary:a,padding:c})[I(d)],x},{});return Object.keys(p).sort(function(x,d){return p[x]-p[d]})}function Gr(e){if(I(e)===Fe)return[];var t=xe(e);return[lt(e),t,lt(t)]}function _r(e){var t=e.state,r=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var n=r.mainAxis,a=n===void 0?!0:n,c=r.altAxis,s=c===void 0?!0:c,i=r.fallbackPlacements,f=r.padding,l=r.boundary,v=r.rootBoundary,h=r.altBoundary,p=r.flipVariations,x=p===void 0?!0:p,d=r.allowedAutoPlacements,m=t.options.placement,w=I(m),P=w===m,b=i||(P||!x?[xe(m)]:Gr(m)),u=[m].concat(b).reduce(function(ee,Y){return ee.concat(I(Y)===Fe?Xr(t,{placement:Y,boundary:l,rootBoundary:v,padding:f,flipVariations:x,allowedAutoPlacements:d}):Y)},[]),g=t.rects.reference,y=t.rects.popper,O=new Map,A=!0,C=u[0],R=0;R=0,V=j?"width":"height",D=pe(t,{placement:$,boundary:l,rootBoundary:v,altBoundary:h,padding:f}),M=j?S?H:F:S?N:B;g[V]>y[V]&&(M=xe(M));var z=xe(M),G=[];if(a&&G.push(D[k]<=0),s&&G.push(D[M]<=0,D[z]<=0),G.every(function(ee){return ee})){C=$,A=!1;break}O.set($,G)}if(A)for(var me=x?3:1,Pe=function(Y){var se=u.find(function(ge){var _=O.get(ge);if(_)return _.slice(0,Y).every(function(Ee){return Ee})});if(se)return C=se,"break"},ie=me;ie>0;ie--){var he=Pe(ie);if(he==="break")break}t.placement!==C&&(t.modifiersData[o]._skip=!0,t.placement=C,t.reset=!0)}}const Jr={name:"flip",enabled:!0,phase:"main",fn:_r,requiresIfExists:["offset"],data:{_skip:!1}};function ft(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function ut(e){return[B,H,N,F].some(function(t){return e[t]>=0})}function Zr(e){var t=e.state,r=e.name,o=t.rects.reference,n=t.rects.popper,a=t.modifiersData.preventOverflow,c=pe(t,{elementContext:"reference"}),s=pe(t,{altBoundary:!0}),i=ft(c,o),f=ft(s,n,a),l=ut(i),v=ut(f);t.modifiersData[r]={referenceClippingOffsets:i,popperEscapeOffsets:f,isReferenceHidden:l,hasPopperEscaped:v},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":v})}const Kr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Zr};function Qr(e,t,r){var o=I(e),n=[F,B].indexOf(o)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,c=a[0],s=a[1];return c=c||0,s=(s||0)*n,[F,H].indexOf(o)>=0?{x:s,y:c}:{x:c,y:s}}function eo(e){var t=e.state,r=e.options,o=e.name,n=r.offset,a=n===void 0?[0,0]:n,c=xt.reduce(function(l,v){return l[v]=Qr(v,t.rects,a),l},{}),s=c[t.placement],i=s.x,f=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=f),t.modifiersData[o]=c}const to={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:eo};function ro(e){var t=e.state,r=e.name;t.modifiersData[r]=At({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const oo={name:"popperOffsets",enabled:!0,phase:"read",fn:ro,data:{}};function no(e){return e==="x"?"y":"x"}function ao(e){var t=e.state,r=e.options,o=e.name,n=r.mainAxis,a=n===void 0?!0:n,c=r.altAxis,s=c===void 0?!1:c,i=r.boundary,f=r.rootBoundary,l=r.altBoundary,v=r.padding,h=r.tether,p=h===void 0?!0:h,x=r.tetherOffset,d=x===void 0?0:x,m=pe(t,{boundary:i,rootBoundary:f,padding:v,altBoundary:l}),w=I(t.placement),P=ne(t.placement),b=!P,u=Le(w),g=no(u),y=t.modifiersData.popperOffsets,O=t.rects.reference,A=t.rects.popper,C=typeof d=="function"?d(Object.assign({},t.rects,{placement:t.placement})):d,R=typeof C=="number"?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),$=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(y){if(a){var S,j=u==="y"?B:F,V=u==="y"?N:H,D=u==="y"?"height":"width",M=y[u],z=M+m[j],G=M-m[V],me=p?-A[D]/2:0,Pe=P===te?O[D]:A[D],ie=P===te?-A[D]:-O[D],he=t.elements.arrow,ee=p&&he?Ve(he):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Pt(),se=Y[j],ge=Y[V],_=ce(0,O[D],ee[D]),Ee=b?O[D]/2-me-_-se-R.mainAxis:Pe-_-se-R.mainAxis,$t=b?-O[D]/2+me+_+ge+R.mainAxis:ie+_+ge+R.mainAxis,Ce=t.elements.arrow&&ve(t.elements.arrow),Dt=Ce?u==="y"?Ce.clientTop||0:Ce.clientLeft||0:0,Ue=(S=$==null?void 0:$[u])!=null?S:0,jt=M+Ee-Ue-Dt,kt=M+$t-Ue,qe=ce(p?we(z,jt):z,M,p?Z(G,kt):G);y[u]=qe,k[u]=qe-M}if(s){var ze,Tt=u==="x"?B:F,Mt=u==="x"?N:H,J=y[g],ye=g==="y"?"height":"width",Ye=J+m[Tt],Xe=J-m[Mt],Re=[B,F].indexOf(w)!==-1,Ge=(ze=$==null?void 0:$[g])!=null?ze:0,_e=Re?Ye:J-O[ye]-A[ye]-Ge+R.altAxis,Je=Re?J+O[ye]+A[ye]-Ge-R.altAxis:Xe,Ze=p&&Re?$r(_e,J,Je):ce(p?_e:Ye,J,p?Je:Xe);y[g]=Ze,k[g]=Ze-J}t.modifiersData[o]=k}}const io={name:"preventOverflow",enabled:!0,phase:"main",fn:ao,requiresIfExists:["offset"]};function so(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function lo(e){return e===W(e)||!L(e)?Ne(e):so(e)}function co(e){var t=e.getBoundingClientRect(),r=re(t.width)/e.offsetWidth||1,o=re(t.height)/e.offsetHeight||1;return r!==1||o!==1}function fo(e,t,r){r===void 0&&(r=!1);var o=L(t),n=L(t)&&co(t),a=X(t),c=oe(e,n,r),s={scrollLeft:0,scrollTop:0},i={x:0,y:0};return(o||!o&&!r)&&((U(t)!=="body"||Ie(a))&&(s=lo(t)),L(t)?(i=oe(t,!0),i.x+=t.clientLeft,i.y+=t.clientTop):a&&(i.x=He(a))),{x:c.left+s.scrollLeft-i.x,y:c.top+s.scrollTop-i.y,width:c.width,height:c.height}}function uo(e){var t=new Map,r=new Set,o=[];e.forEach(function(a){t.set(a.name,a)});function n(a){r.add(a.name);var c=[].concat(a.requires||[],a.requiresIfExists||[]);c.forEach(function(s){if(!r.has(s)){var i=t.get(s);i&&n(i)}}),o.push(a)}return e.forEach(function(a){r.has(a.name)||n(a)}),o}function po(e){var t=uo(e);return Pr.reduce(function(r,o){return r.concat(t.filter(function(n){return n.phase===o}))},[])}function vo(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function mo(e){var t=e.reduce(function(r,o){var n=r[o.name];return r[o.name]=n?Object.assign({},n,o,{options:Object.assign({},n.options,o.options),data:Object.assign({},n.data,o.data)}):o,r},{});return Object.keys(t).map(function(r){return t[r]})}var pt={placement:"bottom",modifiers:[],strategy:"absolute"};function dt(){for(var e=arguments.length,t=new Array(e),r=0;rke({root:["root"]},ur(bo)),Co={},Ro=E.forwardRef(function(t,r){var o;const{anchorEl:n,children:a,direction:c,disablePortal:s,modifiers:i,open:f,placement:l,popperOptions:v,popperRef:h,slotProps:p={},slots:x={},TransitionProps:d}=t,m=ae(t,xo),w=E.useRef(null),P=et(w,r),b=E.useRef(null),u=et(b,h),g=E.useRef(u);tt(()=>{g.current=u},[u]),E.useImperativeHandle(h,()=>b.current,[]);const y=Oo(l,c),[O,A]=E.useState(y),[C,R]=E.useState(je(n));E.useEffect(()=>{b.current&&b.current.forceUpdate()}),E.useEffect(()=>{n&&R(je(n))},[n]),tt(()=>{if(!C||!f)return;const V=z=>{A(z.placement)};let D=[{name:"preventOverflow",options:{altBoundary:s}},{name:"flip",options:{altBoundary:s}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:z})=>{V(z)}}];i!=null&&(D=D.concat(i)),v&&v.modifiers!=null&&(D=D.concat(v.modifiers));const M=yo(C,w.current,T({placement:y},v,{modifiers:D}));return g.current(M),()=>{M.destroy(),g.current(null)}},[C,s,i,f,v,y]);const $={placement:O};d!==null&&($.TransitionProps=d);const k=Eo(),S=(o=x.root)!=null?o:"div",j=Xt({elementType:S,externalSlotProps:p.root,externalForwardedProps:m,additionalProps:{role:"tooltip",ref:P},ownerState:t,className:k.root});return K.jsx(S,T({},j,{children:typeof a=="function"?a($):a}))}),Ao=E.forwardRef(function(t,r){const{anchorEl:o,children:n,container:a,direction:c="ltr",disablePortal:s=!1,keepMounted:i=!1,modifiers:f,open:l,placement:v="bottom",popperOptions:h=Co,popperRef:p,style:x,transition:d=!1,slotProps:m={},slots:w={}}=t,P=ae(t,wo),[b,u]=E.useState(!0),g=()=>{u(!1)},y=()=>{u(!0)};if(!i&&!l&&(!d||b))return null;let O;if(a)O=a;else if(o){const R=je(o);O=R&&Po(R)?rt(R).body:rt(null).body}const A=!l&&i&&(!d||b)?"none":void 0,C=d?{in:l,onEnter:g,onExited:y}:void 0;return K.jsx(Yt,{disablePortal:s,container:O,children:K.jsx(Ro,T({anchorEl:o,direction:c,disablePortal:s,modifiers:f,ref:r,open:d?!b:l,placement:v,popperOptions:h,popperRef:p,slotProps:m,slots:w},P,{style:T({position:"fixed",top:0,left:0,display:A},x),TransitionProps:C,children:n}))})}),So=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],$o=Me(Ao,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Do=E.forwardRef(function(t,r){var o;const n=qt(),a=Be({props:t,name:"MuiPopper"}),{anchorEl:c,component:s,components:i,componentsProps:f,container:l,disablePortal:v,keepMounted:h,modifiers:p,open:x,placement:d,popperOptions:m,popperRef:w,transition:P,slots:b,slotProps:u}=a,g=ae(a,So),y=(o=b==null?void 0:b.root)!=null?o:i==null?void 0:i.Root,O=T({anchorEl:c,container:l,disablePortal:v,keepMounted:h,modifiers:p,open:x,placement:d,popperOptions:m,popperRef:w,transition:P},g);return K.jsx($o,T({as:s,direction:n==null?void 0:n.direction,slots:{root:y},slotProps:u??f},O,{ref:r}))}),Uo=Do;function qo({props:e,states:t,muiFormControl:r}){return t.reduce((o,n)=>(o[n]=e[n],r&&typeof e[n]>"u"&&(o[n]=r[n]),o),{})}const jo=E.createContext(void 0),St=jo;function zo(){return E.useContext(St)}function vt(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function mt(e,t=!1){return e&&(vt(e.value)&&e.value!==""||t&&vt(e.defaultValue)&&e.defaultValue!=="")}function ko(e){return e.startAdornment}function To(e){return Te("MuiFormControl",e)}ht("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Mo=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Bo=e=>{const{classes:t,margin:r,fullWidth:o}=e,n={root:["root",r!=="none"&&`margin${gt(r)}`,o&&"fullWidth"]};return ke(n,To,t)},Fo=Me("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>T({},t.root,t[`margin${gt(e.margin)}`],e.fullWidth&&t.fullWidth)})(({ownerState:e})=>T({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},e.margin==="normal"&&{marginTop:16,marginBottom:8},e.margin==="dense"&&{marginTop:8,marginBottom:4},e.fullWidth&&{width:"100%"})),Wo=E.forwardRef(function(t,r){const o=Be({props:t,name:"MuiFormControl"}),{children:n,className:a,color:c="primary",component:s="div",disabled:i=!1,error:f=!1,focused:l,fullWidth:v=!1,hiddenLabel:h=!1,margin:p="none",required:x=!1,size:d="medium",variant:m="outlined"}=o,w=ae(o,Mo),P=T({},o,{color:c,component:s,disabled:i,error:f,fullWidth:v,hiddenLabel:h,margin:p,required:x,size:d,variant:m}),b=Bo(P),[u,g]=E.useState(()=>{let S=!1;return n&&E.Children.forEach(n,j=>{if(!Se(j,["Input","Select"]))return;const V=Se(j,["Select"])?j.props.input:j;V&&ko(V.props)&&(S=!0)}),S}),[y,O]=E.useState(()=>{let S=!1;return n&&E.Children.forEach(n,j=>{Se(j,["Input","Select"])&&(mt(j.props,!0)||mt(j.props.inputProps,!0))&&(S=!0)}),S}),[A,C]=E.useState(!1);i&&A&&C(!1);const R=l!==void 0&&!i?l:A;let $;const k=E.useMemo(()=>({adornedStart:u,setAdornedStart:g,color:c,disabled:i,error:f,filled:y,focused:R,fullWidth:v,hiddenLabel:h,size:d,onBlur:()=>{C(!1)},onEmpty:()=>{O(!1)},onFilled:()=>{O(!0)},onFocus:()=>{C(!0)},registerEffect:$,required:x,variant:m}),[u,c,i,f,y,R,v,h,$,x,d,m]);return K.jsx(St.Provider,{value:k,children:K.jsx(Fo,T({as:s,ownerState:P,className:zt(b.root,a),ref:r},w,{children:n}))})}),Yo=Wo,Vo=lr({createStyledComponent:Me("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Be({props:e,name:"MuiStack"})}),Xo=Vo;export{Yo as F,Uo as P,Xo as S,Ho as a,zo as b,St as c,Zt as e,qo as f,mt as i,Io as u}; diff --git a/build/assets/Streamable-6fbd6333.js b/build/assets/Streamable-8a8c4cd3.js similarity index 95% rename from build/assets/Streamable-6fbd6333.js rename to build/assets/Streamable-8a8c4cd3.js index a902b1af1..b988b0236 100644 --- a/build/assets/Streamable-6fbd6333.js +++ b/build/assets/Streamable-8a8c4cd3.js @@ -1 +1 @@ -import{a9 as m,r as f}from"./index-17ed06be.js";import{u as _,p as b}from"./index-ed087dc3.js";function P(t,e){for(var r=0;rs[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,l=Object.defineProperty,v=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,L=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,w=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},c=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of O(e))!j.call(t,a)&&a!==r&&l(t,a,{get:()=>e[a],enumerable:!(s=v(e,a))||s.enumerable});return t},D=(t,e,r)=>(r=t!=null?g(S(t)):{},c(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),E=t=>c(l({},"__esModule",{value:!0}),t),o=(t,e,r)=>(L(t,typeof e!="symbol"?e+"":e,r),r),h={};w(h,{default:()=>i});var y=E(h),p=D(f),u=_,d=b;const M="https://cdn.embed.ly/player-0.1.0.min.js",T="playerjs";class i extends p.Component{constructor(){super(...arguments),o(this,"callPlayer",u.callPlayer),o(this,"duration",null),o(this,"currentTime",null),o(this,"secondsLoaded",null),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unmute")}),o(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,u.getSDK)(M,T).then(r=>{this.iframe&&(this.player=new r.Player(this.iframe),this.player.setLoop(this.props.loop),this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seeked",this.props.onSeek),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",({duration:s,seconds:a})=>{this.duration=s,this.currentTime=a}),this.player.on("buffered",({percent:s})=>{this.duration&&(this.secondsLoaded=this.duration*s)}),this.props.muted&&this.player.mute())},this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("setCurrentTime",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e=this.props.url.match(d.MATCH_URL_STREAMABLE)[1],r={width:"100%",height:"100%"};return p.default.createElement("iframe",{ref:this.ref,src:`https://streamable.com/o/${e}`,frameBorder:"0",scrolling:"no",style:r,allow:"encrypted-media; autoplay; fullscreen;"})}}o(i,"displayName","Streamable");o(i,"canPlay",d.canPlay.streamable);const x=m(y),N=P({__proto__:null,default:x},[y]);export{N as S}; +import{a9 as m,r as f}from"./index-787c3ef8.js";import{u as _,p as b}from"./index-d501a02f.js";function P(t,e){for(var r=0;rs[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,l=Object.defineProperty,v=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,L=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,w=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},c=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of O(e))!j.call(t,a)&&a!==r&&l(t,a,{get:()=>e[a],enumerable:!(s=v(e,a))||s.enumerable});return t},D=(t,e,r)=>(r=t!=null?g(S(t)):{},c(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),E=t=>c(l({},"__esModule",{value:!0}),t),o=(t,e,r)=>(L(t,typeof e!="symbol"?e+"":e,r),r),h={};w(h,{default:()=>i});var y=E(h),p=D(f),u=_,d=b;const M="https://cdn.embed.ly/player-0.1.0.min.js",T="playerjs";class i extends p.Component{constructor(){super(...arguments),o(this,"callPlayer",u.callPlayer),o(this,"duration",null),o(this,"currentTime",null),o(this,"secondsLoaded",null),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unmute")}),o(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,u.getSDK)(M,T).then(r=>{this.iframe&&(this.player=new r.Player(this.iframe),this.player.setLoop(this.props.loop),this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seeked",this.props.onSeek),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",({duration:s,seconds:a})=>{this.duration=s,this.currentTime=a}),this.player.on("buffered",({percent:s})=>{this.duration&&(this.secondsLoaded=this.duration*s)}),this.props.muted&&this.player.mute())},this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("setCurrentTime",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e=this.props.url.match(d.MATCH_URL_STREAMABLE)[1],r={width:"100%",height:"100%"};return p.default.createElement("iframe",{ref:this.ref,src:`https://streamable.com/o/${e}`,frameBorder:"0",scrolling:"no",style:r,allow:"encrypted-media; autoplay; fullscreen;"})}}o(i,"displayName","Streamable");o(i,"canPlay",d.canPlay.streamable);const x=m(y),N=P({__proto__:null,default:x},[y]);export{N as S}; diff --git a/build/assets/Tabs-fd2a0376.js b/build/assets/Tabs-33c59ae4.js similarity index 99% rename from build/assets/Tabs-fd2a0376.js rename to build/assets/Tabs-33c59ae4.js index 623f4c1e7..1a00bcf6b 100644 --- a/build/assets/Tabs-fd2a0376.js +++ b/build/assets/Tabs-33c59ae4.js @@ -1 +1 @@ -import{M as ft,L as pt,O,X as Pt,Y as Lt,x as b,r as c,S as ht,H as rt,U as L,j as S,V as St,$ as Zt,a3 as Nt,a2 as ut}from"./index-17ed06be.js";import{U as $t,L as kt,Y as lt,J as te}from"./index-2f22123e.js";import{c as Ft}from"./createSvgIcon-6ef3ed46.js";let Y;function At(){if(Y)return Y;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),Y="reverse",t.scrollLeft>0?Y="default":(t.scrollLeft=1,t.scrollLeft===0&&(Y="negative")),document.body.removeChild(t),Y}function ee(t,e){const r=t.scrollLeft;if(e!=="rtl")return r;switch(At()){case"negative":return t.scrollWidth-t.clientWidth+r;case"reverse":return t.scrollWidth-t.clientWidth-r;default:return r}}function oe(t){return pt("MuiTab",t)}const le=ft("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),A=le,re=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ne=t=>{const{classes:e,textColor:r,fullWidth:a,wrapped:n,icon:d,label:h,selected:p,disabled:u}=t,m={root:["root",d&&h&&"labelIcon",`textColor${Lt(r)}`,a&&"fullWidth",n&&"wrapped",p&&"selected",u&&"disabled"],iconWrapper:["iconWrapper"]};return St(m,oe,e)},se=O(Pt,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.label&&r.icon&&e.labelIcon,e[`textColor${Lt(r.textColor)}`],r.fullWidth&&e.fullWidth,r.wrapped&&e.wrapped]}})(({theme:t,ownerState:e})=>b({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${A.iconWrapper}`]:b({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${A.selected}`]:{opacity:1},[`&.${A.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${A.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${A.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${A.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${A.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),ae=c.forwardRef(function(e,r){const a=ht({props:e,name:"MuiTab"}),{className:n,disabled:d=!1,disableFocusRipple:h=!1,fullWidth:p,icon:u,iconPosition:m="top",indicator:w,label:T,onChange:y,onClick:x,onFocus:j,selected:I,selectionFollowsFocus:g,textColor:H="inherit",value:C,wrapped:nt=!1}=a,X=rt(a,re),_=b({},a,{disabled:d,disableFocusRipple:h,selected:I,icon:!!u,iconPosition:m,label:!!T,fullWidth:p,textColor:H,wrapped:nt}),D=ne(_),N=u&&T&&c.isValidElement(u)?c.cloneElement(u,{className:L(D.iconWrapper,u.props.className)}):u,J=R=>{!I&&y&&y(R,C),x&&x(R)},U=R=>{g&&!I&&y&&y(R,C),j&&j(R)};return S.jsxs(se,b({focusRipple:!h,className:L(D.root,n),ref:r,role:"tab","aria-selected":I,disabled:d,onClick:J,onFocus:U,ownerState:_,tabIndex:I?0:-1},X,{children:[m==="top"||m==="start"?S.jsxs(c.Fragment,{children:[N,T]}):S.jsxs(c.Fragment,{children:[T,N]}),w]}))}),ke=ae,ie=Ft(S.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),ce=Ft(S.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function de(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function ue(t,e,r,a={},n=()=>{}){const{ease:d=de,duration:h=300}=a;let p=null;const u=e[t];let m=!1;const w=()=>{m=!0},T=y=>{if(m){n(new Error("Animation cancelled"));return}p===null&&(p=y);const x=Math.min(1,(y-p)/h);if(e[t]=d(x)*(r-u)+u,x>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(T)};return u===r?(n(new Error("Element already at target position")),w):(requestAnimationFrame(T),w)}const be=["onChange"],fe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function pe(t){const{onChange:e}=t,r=rt(t,be),a=c.useRef(),n=c.useRef(null),d=()=>{a.current=n.current.offsetHeight-n.current.clientHeight};return Zt(()=>{const h=$t(()=>{const u=a.current;d(),u!==a.current&&e(a.current)}),p=kt(n.current);return p.addEventListener("resize",h),()=>{h.clear(),p.removeEventListener("resize",h)}},[e]),c.useEffect(()=>{d(),e(a.current)},[e]),S.jsx("div",b({style:fe,ref:n},r))}function he(t){return pt("MuiTabScrollButton",t)}const Se=ft("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),ve=Se,me=["className","slots","slotProps","direction","orientation","disabled"],xe=t=>{const{classes:e,orientation:r,disabled:a}=t;return St({root:["root",r,a&&"disabled"]},he,e)},ge=O(Pt,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.orientation&&e[r.orientation]]}})(({ownerState:t})=>b({width:40,flexShrink:0,opacity:.8,[`&.${ve.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),ye=c.forwardRef(function(e,r){var a,n;const d=ht({props:e,name:"MuiTabScrollButton"}),{className:h,slots:p={},slotProps:u={},direction:m}=d,w=rt(d,me),y=Nt().direction==="rtl",x=b({isRtl:y},d),j=xe(x),I=(a=p.StartScrollButtonIcon)!=null?a:ie,g=(n=p.EndScrollButtonIcon)!=null?n:ce,H=lt({elementType:I,externalSlotProps:u.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:x}),C=lt({elementType:g,externalSlotProps:u.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:x});return S.jsx(ge,b({component:"div",className:L(j.root,h),ref:r,role:null,ownerState:x,tabIndex:null},w,{children:m==="left"?S.jsx(I,b({},H)):S.jsx(g,b({},C))}))}),Ce=ye;function Be(t){return pt("MuiTabs",t)}const we=ft("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),bt=we,Te=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Rt=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,zt=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,ot=(t,e,r)=>{let a=!1,n=r(t,e);for(;n;){if(n===t.firstChild){if(a)return;a=!0}const d=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||d)n=r(t,n);else{n.focus();return}}},Ie=t=>{const{vertical:e,fixed:r,hideScrollbar:a,scrollableX:n,scrollableY:d,centered:h,scrollButtonsHideMobile:p,classes:u}=t;return St({root:["root",e&&"vertical"],scroller:["scroller",r&&"fixed",a&&"hideScrollbar",n&&"scrollableX",d&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",h&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",p&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[a&&"hideScrollbar"]},Be,u)},Ee=O("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${bt.scrollButtons}`]:e.scrollButtons},{[`& .${bt.scrollButtons}`]:r.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,r.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>b({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${bt.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Me=O("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.scroller,r.fixed&&e.fixed,r.hideScrollbar&&e.hideScrollbar,r.scrollableX&&e.scrollableX,r.scrollableY&&e.scrollableY]}})(({ownerState:t})=>b({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Re=O("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.flexContainer,r.vertical&&e.flexContainerVertical,r.centered&&e.centered]}})(({ownerState:t})=>b({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),ze=O("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>b({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),We=O(pe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Wt={},Pe=c.forwardRef(function(e,r){const a=ht({props:e,name:"MuiTabs"}),n=Nt(),d=n.direction==="rtl",{"aria-label":h,"aria-labelledby":p,action:u,centered:m=!1,children:w,className:T,component:y="div",allowScrollButtonsMobile:x=!1,indicatorColor:j="primary",onChange:I,orientation:g="horizontal",ScrollButtonComponent:H=Ce,scrollButtons:C="auto",selectionFollowsFocus:nt,slots:X={},slotProps:_={},TabIndicatorProps:D={},TabScrollButtonProps:N={},textColor:J="primary",value:U,variant:R="standard",visibleScrollbar:st=!1}=a,Ot=rt(a,Te),E=R==="scrollable",B=g==="vertical",V=B?"scrollTop":"scrollLeft",Q=B?"top":"left",Z=B?"bottom":"right",at=B?"clientHeight":"clientWidth",K=B?"height":"width",$=b({},a,{component:y,allowScrollButtonsMobile:x,indicatorColor:j,orientation:g,vertical:B,scrollButtons:C,textColor:J,variant:R,visibleScrollbar:st,fixed:!E,hideScrollbar:E&&!st,scrollableX:E&&!B,scrollableY:E&&B,centered:m&&!E,scrollButtonsHideMobile:!x}),W=Ie($),jt=lt({elementType:X.StartScrollButtonIcon,externalSlotProps:_.startScrollButtonIcon,ownerState:$}),Ht=lt({elementType:X.EndScrollButtonIcon,externalSlotProps:_.endScrollButtonIcon,ownerState:$}),[vt,Xt]=c.useState(!1),[k,mt]=c.useState(Wt),[xt,Dt]=c.useState(!1),[gt,Ut]=c.useState(!1),[yt,Yt]=c.useState(!1),[Ct,_t]=c.useState({overflow:"hidden",scrollbarWidth:0}),Bt=new Map,z=c.useRef(null),F=c.useRef(null),wt=()=>{const o=z.current;let l;if(o){const s=o.getBoundingClientRect();l={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:ee(o,n.direction),scrollWidth:o.scrollWidth,top:s.top,bottom:s.bottom,left:s.left,right:s.right}}let i;if(o&&U!==!1){const s=F.current.children;if(s.length>0){const f=s[Bt.get(U)];i=f?f.getBoundingClientRect():null}}return{tabsMeta:l,tabMeta:i}},q=ut(()=>{const{tabsMeta:o,tabMeta:l}=wt();let i=0,s;if(B)s="top",l&&o&&(i=l.top-o.top+o.scrollTop);else if(s=d?"right":"left",l&&o){const v=d?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;i=(d?-1:1)*(l[s]-o[s]+v)}const f={[s]:i,[K]:l?l[K]:0};if(isNaN(k[s])||isNaN(k[K]))mt(f);else{const v=Math.abs(k[s]-f[s]),M=Math.abs(k[K]-f[K]);(v>=1||M>=1)&&mt(f)}}),it=(o,{animation:l=!0}={})=>{l?ue(V,z.current,o,{duration:n.transitions.duration.standard}):z.current[V]=o},Tt=o=>{let l=z.current[V];B?l+=o:(l+=o*(d?-1:1),l*=d&&At()==="reverse"?-1:1),it(l)},It=()=>{const o=z.current[at];let l=0;const i=Array.from(F.current.children);for(let s=0;so){s===0&&(l=o);break}l+=f[at]}return l},Vt=()=>{Tt(-1*It())},Kt=()=>{Tt(It())},qt=c.useCallback(o=>{_t({overflow:null,scrollbarWidth:o})},[]),Gt=()=>{const o={};o.scrollbarSizeListener=E?S.jsx(We,{onChange:qt,className:L(W.scrollableX,W.hideScrollbar)}):null;const i=E&&(C==="auto"&&(xt||gt)||C===!0);return o.scrollButtonStart=i?S.jsx(H,b({slots:{StartScrollButtonIcon:X.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:jt},orientation:g,direction:d?"right":"left",onClick:Vt,disabled:!xt},N,{className:L(W.scrollButtons,N.className)})):null,o.scrollButtonEnd=i?S.jsx(H,b({slots:{EndScrollButtonIcon:X.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Ht},orientation:g,direction:d?"left":"right",onClick:Kt,disabled:!gt},N,{className:L(W.scrollButtons,N.className)})):null,o},Et=ut(o=>{const{tabsMeta:l,tabMeta:i}=wt();if(!(!i||!l)){if(i[Q]l[Z]){const s=l[V]+(i[Z]-l[Z]);it(s,{animation:o})}}}),tt=ut(()=>{E&&C!==!1&&Yt(!yt)});c.useEffect(()=>{const o=$t(()=>{z.current&&q()});let l;const i=v=>{v.forEach(M=>{M.removedNodes.forEach(G=>{var P;(P=l)==null||P.unobserve(G)}),M.addedNodes.forEach(G=>{var P;(P=l)==null||P.observe(G)})}),o(),tt()},s=kt(z.current);s.addEventListener("resize",o);let f;return typeof ResizeObserver<"u"&&(l=new ResizeObserver(o),Array.from(F.current.children).forEach(v=>{l.observe(v)})),typeof MutationObserver<"u"&&(f=new MutationObserver(i),f.observe(F.current,{childList:!0})),()=>{var v,M;o.clear(),s.removeEventListener("resize",o),(v=f)==null||v.disconnect(),(M=l)==null||M.disconnect()}},[q,tt]),c.useEffect(()=>{const o=Array.from(F.current.children),l=o.length;if(typeof IntersectionObserver<"u"&&l>0&&E&&C!==!1){const i=o[0],s=o[l-1],f={root:z.current,threshold:.99},v=dt=>{Dt(!dt[0].isIntersecting)},M=new IntersectionObserver(v,f);M.observe(i);const G=dt=>{Ut(!dt[0].isIntersecting)},P=new IntersectionObserver(G,f);return P.observe(s),()=>{M.disconnect(),P.disconnect()}}},[E,C,yt,w==null?void 0:w.length]),c.useEffect(()=>{Xt(!0)},[]),c.useEffect(()=>{q()}),c.useEffect(()=>{Et(Wt!==k)},[Et,k]),c.useImperativeHandle(u,()=>({updateIndicator:q,updateScrollButtons:tt}),[q,tt]);const Mt=S.jsx(ze,b({},D,{className:L(W.indicator,D.className),ownerState:$,style:b({},k,D.style)}));let et=0;const Jt=c.Children.map(w,o=>{if(!c.isValidElement(o))return null;const l=o.props.value===void 0?et:o.props.value;Bt.set(l,et);const i=l===U;return et+=1,c.cloneElement(o,b({fullWidth:R==="fullWidth",indicator:i&&!vt&&Mt,selected:i,selectionFollowsFocus:nt,onChange:I,textColor:J,value:l},et===1&&U===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),Qt=o=>{const l=F.current,i=te(l).activeElement;if(i.getAttribute("role")!=="tab")return;let f=g==="horizontal"?"ArrowLeft":"ArrowUp",v=g==="horizontal"?"ArrowRight":"ArrowDown";switch(g==="horizontal"&&d&&(f="ArrowRight",v="ArrowLeft"),o.key){case f:o.preventDefault(),ot(l,i,zt);break;case v:o.preventDefault(),ot(l,i,Rt);break;case"Home":o.preventDefault(),ot(l,null,Rt);break;case"End":o.preventDefault(),ot(l,null,zt);break}},ct=Gt();return S.jsxs(Ee,b({className:L(W.root,T),ownerState:$,ref:r,as:y},Ot,{children:[ct.scrollButtonStart,ct.scrollbarSizeListener,S.jsxs(Me,{className:W.scroller,ownerState:$,style:{overflow:Ct.overflow,[B?`margin${d?"Left":"Right"}`:"marginBottom"]:st?void 0:-Ct.scrollbarWidth},ref:z,children:[S.jsx(Re,{"aria-label":h,"aria-labelledby":p,"aria-orientation":g==="vertical"?"vertical":null,className:W.flexContainer,ownerState:$,onKeyDown:Qt,ref:F,role:"tablist",children:Jt}),vt&&Mt]}),ct.scrollButtonEnd]}))}),Fe=Pe;export{Fe as T,ke as a}; +import{M as ft,L as pt,O,X as Pt,Y as Lt,x as b,r as c,S as ht,H as rt,U as L,j as S,V as St,$ as Zt,a3 as Nt,a2 as ut}from"./index-787c3ef8.js";import{U as $t,L as kt,Y as lt,J as te}from"./index-77dce891.js";import{c as Ft}from"./createSvgIcon-fa140fa5.js";let Y;function At(){if(Y)return Y;const t=document.createElement("div"),e=document.createElement("div");return e.style.width="10px",e.style.height="1px",t.appendChild(e),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),Y="reverse",t.scrollLeft>0?Y="default":(t.scrollLeft=1,t.scrollLeft===0&&(Y="negative")),document.body.removeChild(t),Y}function ee(t,e){const r=t.scrollLeft;if(e!=="rtl")return r;switch(At()){case"negative":return t.scrollWidth-t.clientWidth+r;case"reverse":return t.scrollWidth-t.clientWidth-r;default:return r}}function oe(t){return pt("MuiTab",t)}const le=ft("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),A=le,re=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],ne=t=>{const{classes:e,textColor:r,fullWidth:a,wrapped:n,icon:d,label:h,selected:p,disabled:u}=t,m={root:["root",d&&h&&"labelIcon",`textColor${Lt(r)}`,a&&"fullWidth",n&&"wrapped",p&&"selected",u&&"disabled"],iconWrapper:["iconWrapper"]};return St(m,oe,e)},se=O(Pt,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.label&&r.icon&&e.labelIcon,e[`textColor${Lt(r.textColor)}`],r.fullWidth&&e.fullWidth,r.wrapped&&e.wrapped]}})(({theme:t,ownerState:e})=>b({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${A.iconWrapper}`]:b({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${A.selected}`]:{opacity:1},[`&.${A.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${A.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${A.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${A.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${A.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),ae=c.forwardRef(function(e,r){const a=ht({props:e,name:"MuiTab"}),{className:n,disabled:d=!1,disableFocusRipple:h=!1,fullWidth:p,icon:u,iconPosition:m="top",indicator:w,label:T,onChange:y,onClick:x,onFocus:j,selected:I,selectionFollowsFocus:g,textColor:H="inherit",value:C,wrapped:nt=!1}=a,X=rt(a,re),_=b({},a,{disabled:d,disableFocusRipple:h,selected:I,icon:!!u,iconPosition:m,label:!!T,fullWidth:p,textColor:H,wrapped:nt}),D=ne(_),N=u&&T&&c.isValidElement(u)?c.cloneElement(u,{className:L(D.iconWrapper,u.props.className)}):u,J=R=>{!I&&y&&y(R,C),x&&x(R)},U=R=>{g&&!I&&y&&y(R,C),j&&j(R)};return S.jsxs(se,b({focusRipple:!h,className:L(D.root,n),ref:r,role:"tab","aria-selected":I,disabled:d,onClick:J,onFocus:U,ownerState:_,tabIndex:I?0:-1},X,{children:[m==="top"||m==="start"?S.jsxs(c.Fragment,{children:[N,T]}):S.jsxs(c.Fragment,{children:[T,N]}),w]}))}),ke=ae,ie=Ft(S.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),ce=Ft(S.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function de(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function ue(t,e,r,a={},n=()=>{}){const{ease:d=de,duration:h=300}=a;let p=null;const u=e[t];let m=!1;const w=()=>{m=!0},T=y=>{if(m){n(new Error("Animation cancelled"));return}p===null&&(p=y);const x=Math.min(1,(y-p)/h);if(e[t]=d(x)*(r-u)+u,x>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(T)};return u===r?(n(new Error("Element already at target position")),w):(requestAnimationFrame(T),w)}const be=["onChange"],fe={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function pe(t){const{onChange:e}=t,r=rt(t,be),a=c.useRef(),n=c.useRef(null),d=()=>{a.current=n.current.offsetHeight-n.current.clientHeight};return Zt(()=>{const h=$t(()=>{const u=a.current;d(),u!==a.current&&e(a.current)}),p=kt(n.current);return p.addEventListener("resize",h),()=>{h.clear(),p.removeEventListener("resize",h)}},[e]),c.useEffect(()=>{d(),e(a.current)},[e]),S.jsx("div",b({style:fe,ref:n},r))}function he(t){return pt("MuiTabScrollButton",t)}const Se=ft("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),ve=Se,me=["className","slots","slotProps","direction","orientation","disabled"],xe=t=>{const{classes:e,orientation:r,disabled:a}=t;return St({root:["root",r,a&&"disabled"]},he,e)},ge=O(Pt,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.orientation&&e[r.orientation]]}})(({ownerState:t})=>b({width:40,flexShrink:0,opacity:.8,[`&.${ve.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),ye=c.forwardRef(function(e,r){var a,n;const d=ht({props:e,name:"MuiTabScrollButton"}),{className:h,slots:p={},slotProps:u={},direction:m}=d,w=rt(d,me),y=Nt().direction==="rtl",x=b({isRtl:y},d),j=xe(x),I=(a=p.StartScrollButtonIcon)!=null?a:ie,g=(n=p.EndScrollButtonIcon)!=null?n:ce,H=lt({elementType:I,externalSlotProps:u.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:x}),C=lt({elementType:g,externalSlotProps:u.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:x});return S.jsx(ge,b({component:"div",className:L(j.root,h),ref:r,role:null,ownerState:x,tabIndex:null},w,{children:m==="left"?S.jsx(I,b({},H)):S.jsx(g,b({},C))}))}),Ce=ye;function Be(t){return pt("MuiTabs",t)}const we=ft("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),bt=we,Te=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Rt=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,zt=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,ot=(t,e,r)=>{let a=!1,n=r(t,e);for(;n;){if(n===t.firstChild){if(a)return;a=!0}const d=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||d)n=r(t,n);else{n.focus();return}}},Ie=t=>{const{vertical:e,fixed:r,hideScrollbar:a,scrollableX:n,scrollableY:d,centered:h,scrollButtonsHideMobile:p,classes:u}=t;return St({root:["root",e&&"vertical"],scroller:["scroller",r&&"fixed",a&&"hideScrollbar",n&&"scrollableX",d&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",h&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",p&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[a&&"hideScrollbar"]},Be,u)},Ee=O("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${bt.scrollButtons}`]:e.scrollButtons},{[`& .${bt.scrollButtons}`]:r.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,r.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>b({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${bt.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),Me=O("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.scroller,r.fixed&&e.fixed,r.hideScrollbar&&e.hideScrollbar,r.scrollableX&&e.scrollableX,r.scrollableY&&e.scrollableY]}})(({ownerState:t})=>b({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Re=O("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.flexContainer,r.vertical&&e.flexContainerVertical,r.centered&&e.centered]}})(({ownerState:t})=>b({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),ze=O("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>b({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),We=O(pe)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Wt={},Pe=c.forwardRef(function(e,r){const a=ht({props:e,name:"MuiTabs"}),n=Nt(),d=n.direction==="rtl",{"aria-label":h,"aria-labelledby":p,action:u,centered:m=!1,children:w,className:T,component:y="div",allowScrollButtonsMobile:x=!1,indicatorColor:j="primary",onChange:I,orientation:g="horizontal",ScrollButtonComponent:H=Ce,scrollButtons:C="auto",selectionFollowsFocus:nt,slots:X={},slotProps:_={},TabIndicatorProps:D={},TabScrollButtonProps:N={},textColor:J="primary",value:U,variant:R="standard",visibleScrollbar:st=!1}=a,Ot=rt(a,Te),E=R==="scrollable",B=g==="vertical",V=B?"scrollTop":"scrollLeft",Q=B?"top":"left",Z=B?"bottom":"right",at=B?"clientHeight":"clientWidth",K=B?"height":"width",$=b({},a,{component:y,allowScrollButtonsMobile:x,indicatorColor:j,orientation:g,vertical:B,scrollButtons:C,textColor:J,variant:R,visibleScrollbar:st,fixed:!E,hideScrollbar:E&&!st,scrollableX:E&&!B,scrollableY:E&&B,centered:m&&!E,scrollButtonsHideMobile:!x}),W=Ie($),jt=lt({elementType:X.StartScrollButtonIcon,externalSlotProps:_.startScrollButtonIcon,ownerState:$}),Ht=lt({elementType:X.EndScrollButtonIcon,externalSlotProps:_.endScrollButtonIcon,ownerState:$}),[vt,Xt]=c.useState(!1),[k,mt]=c.useState(Wt),[xt,Dt]=c.useState(!1),[gt,Ut]=c.useState(!1),[yt,Yt]=c.useState(!1),[Ct,_t]=c.useState({overflow:"hidden",scrollbarWidth:0}),Bt=new Map,z=c.useRef(null),F=c.useRef(null),wt=()=>{const o=z.current;let l;if(o){const s=o.getBoundingClientRect();l={clientWidth:o.clientWidth,scrollLeft:o.scrollLeft,scrollTop:o.scrollTop,scrollLeftNormalized:ee(o,n.direction),scrollWidth:o.scrollWidth,top:s.top,bottom:s.bottom,left:s.left,right:s.right}}let i;if(o&&U!==!1){const s=F.current.children;if(s.length>0){const f=s[Bt.get(U)];i=f?f.getBoundingClientRect():null}}return{tabsMeta:l,tabMeta:i}},q=ut(()=>{const{tabsMeta:o,tabMeta:l}=wt();let i=0,s;if(B)s="top",l&&o&&(i=l.top-o.top+o.scrollTop);else if(s=d?"right":"left",l&&o){const v=d?o.scrollLeftNormalized+o.clientWidth-o.scrollWidth:o.scrollLeft;i=(d?-1:1)*(l[s]-o[s]+v)}const f={[s]:i,[K]:l?l[K]:0};if(isNaN(k[s])||isNaN(k[K]))mt(f);else{const v=Math.abs(k[s]-f[s]),M=Math.abs(k[K]-f[K]);(v>=1||M>=1)&&mt(f)}}),it=(o,{animation:l=!0}={})=>{l?ue(V,z.current,o,{duration:n.transitions.duration.standard}):z.current[V]=o},Tt=o=>{let l=z.current[V];B?l+=o:(l+=o*(d?-1:1),l*=d&&At()==="reverse"?-1:1),it(l)},It=()=>{const o=z.current[at];let l=0;const i=Array.from(F.current.children);for(let s=0;so){s===0&&(l=o);break}l+=f[at]}return l},Vt=()=>{Tt(-1*It())},Kt=()=>{Tt(It())},qt=c.useCallback(o=>{_t({overflow:null,scrollbarWidth:o})},[]),Gt=()=>{const o={};o.scrollbarSizeListener=E?S.jsx(We,{onChange:qt,className:L(W.scrollableX,W.hideScrollbar)}):null;const i=E&&(C==="auto"&&(xt||gt)||C===!0);return o.scrollButtonStart=i?S.jsx(H,b({slots:{StartScrollButtonIcon:X.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:jt},orientation:g,direction:d?"right":"left",onClick:Vt,disabled:!xt},N,{className:L(W.scrollButtons,N.className)})):null,o.scrollButtonEnd=i?S.jsx(H,b({slots:{EndScrollButtonIcon:X.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:Ht},orientation:g,direction:d?"left":"right",onClick:Kt,disabled:!gt},N,{className:L(W.scrollButtons,N.className)})):null,o},Et=ut(o=>{const{tabsMeta:l,tabMeta:i}=wt();if(!(!i||!l)){if(i[Q]l[Z]){const s=l[V]+(i[Z]-l[Z]);it(s,{animation:o})}}}),tt=ut(()=>{E&&C!==!1&&Yt(!yt)});c.useEffect(()=>{const o=$t(()=>{z.current&&q()});let l;const i=v=>{v.forEach(M=>{M.removedNodes.forEach(G=>{var P;(P=l)==null||P.unobserve(G)}),M.addedNodes.forEach(G=>{var P;(P=l)==null||P.observe(G)})}),o(),tt()},s=kt(z.current);s.addEventListener("resize",o);let f;return typeof ResizeObserver<"u"&&(l=new ResizeObserver(o),Array.from(F.current.children).forEach(v=>{l.observe(v)})),typeof MutationObserver<"u"&&(f=new MutationObserver(i),f.observe(F.current,{childList:!0})),()=>{var v,M;o.clear(),s.removeEventListener("resize",o),(v=f)==null||v.disconnect(),(M=l)==null||M.disconnect()}},[q,tt]),c.useEffect(()=>{const o=Array.from(F.current.children),l=o.length;if(typeof IntersectionObserver<"u"&&l>0&&E&&C!==!1){const i=o[0],s=o[l-1],f={root:z.current,threshold:.99},v=dt=>{Dt(!dt[0].isIntersecting)},M=new IntersectionObserver(v,f);M.observe(i);const G=dt=>{Ut(!dt[0].isIntersecting)},P=new IntersectionObserver(G,f);return P.observe(s),()=>{M.disconnect(),P.disconnect()}}},[E,C,yt,w==null?void 0:w.length]),c.useEffect(()=>{Xt(!0)},[]),c.useEffect(()=>{q()}),c.useEffect(()=>{Et(Wt!==k)},[Et,k]),c.useImperativeHandle(u,()=>({updateIndicator:q,updateScrollButtons:tt}),[q,tt]);const Mt=S.jsx(ze,b({},D,{className:L(W.indicator,D.className),ownerState:$,style:b({},k,D.style)}));let et=0;const Jt=c.Children.map(w,o=>{if(!c.isValidElement(o))return null;const l=o.props.value===void 0?et:o.props.value;Bt.set(l,et);const i=l===U;return et+=1,c.cloneElement(o,b({fullWidth:R==="fullWidth",indicator:i&&!vt&&Mt,selected:i,selectionFollowsFocus:nt,onChange:I,textColor:J,value:l},et===1&&U===!1&&!o.props.tabIndex?{tabIndex:0}:{}))}),Qt=o=>{const l=F.current,i=te(l).activeElement;if(i.getAttribute("role")!=="tab")return;let f=g==="horizontal"?"ArrowLeft":"ArrowUp",v=g==="horizontal"?"ArrowRight":"ArrowDown";switch(g==="horizontal"&&d&&(f="ArrowRight",v="ArrowLeft"),o.key){case f:o.preventDefault(),ot(l,i,zt);break;case v:o.preventDefault(),ot(l,i,Rt);break;case"Home":o.preventDefault(),ot(l,null,Rt);break;case"End":o.preventDefault(),ot(l,null,zt);break}},ct=Gt();return S.jsxs(Ee,b({className:L(W.root,T),ownerState:$,ref:r,as:y},Ot,{children:[ct.scrollButtonStart,ct.scrollbarSizeListener,S.jsxs(Me,{className:W.scroller,ownerState:$,style:{overflow:Ct.overflow,[B?`margin${d?"Left":"Right"}`:"marginBottom"]:st?void 0:-Ct.scrollbarWidth},ref:z,children:[S.jsx(Re,{"aria-label":h,"aria-labelledby":p,"aria-orientation":g==="vertical"?"vertical":null,className:W.flexContainer,ownerState:$,onKeyDown:Qt,ref:F,role:"tablist",children:Jt}),vt&&Mt]}),ct.scrollButtonEnd]}))}),Fe=Pe;export{Fe as T,ke as a}; diff --git a/build/assets/TextareaAutosize-f571cf36.js b/build/assets/TextareaAutosize-e216d6db.js similarity index 97% rename from build/assets/TextareaAutosize-f571cf36.js rename to build/assets/TextareaAutosize-e216d6db.js index 1af5705a8..9f6161ce0 100644 --- a/build/assets/TextareaAutosize-f571cf36.js +++ b/build/assets/TextareaAutosize-e216d6db.js @@ -1,2 +1,2 @@ -import{r as o,H as _,Z as I,$ as T,j as v,x as b,a1 as U}from"./index-17ed06be.js";import{L as F,U as Z}from"./index-2f22123e.js";const D=["onChange","maxRows","minRows","style","value"];function m(r){return parseInt(r,10)||0}const P={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function M(r){return r==null||Object.keys(r).length===0||r.outerHeightStyle===0&&!r.overflow}const q=o.forwardRef(function(l,O){const{onChange:R,maxRows:x,minRows:h=1,style:S,value:y}=l,k=_(l,D),{current:A}=o.useRef(y!=null),p=o.useRef(null),L=I(O,p),H=o.useRef(null),c=o.useRef(0),[z,E]=o.useState({outerHeightStyle:0}),f=o.useCallback(()=>{const e=p.current,n=F(e).getComputedStyle(e);if(n.width==="0px")return{outerHeightStyle:0};const t=H.current;t.style.width=n.width,t.value=e.value||l.placeholder||"x",t.value.slice(-1)===` +import{r as o,H as _,Z as I,$ as T,j as v,x as b,a1 as U}from"./index-787c3ef8.js";import{L as F,U as Z}from"./index-77dce891.js";const D=["onChange","maxRows","minRows","style","value"];function m(r){return parseInt(r,10)||0}const P={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function M(r){return r==null||Object.keys(r).length===0||r.outerHeightStyle===0&&!r.overflow}const q=o.forwardRef(function(l,O){const{onChange:R,maxRows:x,minRows:h=1,style:S,value:y}=l,k=_(l,D),{current:A}=o.useRef(y!=null),p=o.useRef(null),L=I(O,p),H=o.useRef(null),c=o.useRef(0),[z,E]=o.useState({outerHeightStyle:0}),f=o.useCallback(()=>{const e=p.current,n=F(e).getComputedStyle(e);if(n.width==="0px")return{outerHeightStyle:0};const t=H.current;t.style.width=n.width,t.value=e.value||l.placeholder||"x",t.value.slice(-1)===` `&&(t.value+=" ");const g=n.boxSizing,w=m(n.paddingBottom)+m(n.paddingTop),a=m(n.borderBottomWidth)+m(n.borderTopWidth),u=t.scrollHeight;t.value="x";const d=t.scrollHeight;let s=u;h&&(s=Math.max(Number(h)*d,s)),x&&(s=Math.min(Number(x)*d,s)),s=Math.max(s,d);const j=s+(g==="border-box"?w+a:0),B=Math.abs(s-u)<=1;return{outerHeightStyle:j,overflow:B}},[x,h,l.placeholder]),C=(e,i)=>{const{outerHeightStyle:n,overflow:t}=i;return c.current<20&&(n>0&&Math.abs((e.outerHeightStyle||0)-n)>1||e.overflow!==t)?(c.current+=1,{overflow:t,outerHeightStyle:n}):e},W=o.useCallback(()=>{const e=f();M(e)||E(i=>C(i,e))},[f]);T(()=>{const e=()=>{const u=f();M(u)||U.flushSync(()=>{E(d=>C(d,u))})},i=()=>{c.current=0,e()};let n;const t=Z(i),g=p.current,w=F(g);w.addEventListener("resize",t);let a;return typeof ResizeObserver<"u"&&(a=new ResizeObserver(i),a.observe(g)),()=>{t.clear(),cancelAnimationFrame(n),w.removeEventListener("resize",t),a&&a.disconnect()}},[f]),T(()=>{W()}),o.useEffect(()=>{c.current=0},[y]);const N=e=>{c.current=0,A||W(),R&&R(e)};return v.jsxs(o.Fragment,{children:[v.jsx("textarea",b({value:y,onChange:N,ref:L,rows:h,style:b({height:z.outerHeightStyle,overflow:z.overflow?"hidden":void 0},S)},k)),v.jsx("textarea",{"aria-hidden":!0,className:l.className,readOnly:!0,ref:H,tabIndex:-1,style:b({},P.shadow,S,{paddingTop:0,paddingBottom:0})})]})});export{q as T}; diff --git a/build/assets/Twitch-8cf0a6a4.js b/build/assets/Twitch-45ac7eb0.js similarity index 95% rename from build/assets/Twitch-8cf0a6a4.js rename to build/assets/Twitch-45ac7eb0.js index f7c4dae5c..d2accf0fb 100644 --- a/build/assets/Twitch-8cf0a6a4.js +++ b/build/assets/Twitch-45ac7eb0.js @@ -1 +1 @@ -import{a9 as w,r as D}from"./index-17ed06be.js";import{u as C,p as N}from"./index-ed087dc3.js";function I(t,e){for(var r=0;rs[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var S=Object.create,l=Object.defineProperty,j=Object.getOwnPropertyDescriptor,A=Object.getOwnPropertyNames,M=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty,R=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},_=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of A(e))!H.call(t,a)&&a!==r&&l(t,a,{get:()=>e[a],enumerable:!(s=j(e,a))||s.enumerable});return t},F=(t,e,r)=>(r=t!=null?S(M(t)):{},_(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),U=t=>_(l({},"__esModule",{value:!0}),t),o=(t,e,r)=>(R(t,typeof e!="symbol"?e+"":e,r),r),P={};x(P,{default:()=>h});var f=U(P),d=F(D),c=C,u=N;const K="https://player.twitch.tv/js/embed/v1.js",V="Twitch",$="twitch-player-";class h extends d.Component{constructor(){super(...arguments),o(this,"callPlayer",c.callPlayer),o(this,"playerID",this.props.config.playerId||`${$}${(0,c.randomString)()}`),o(this,"mute",()=>{this.callPlayer("setMuted",!0)}),o(this,"unmute",()=>{this.callPlayer("setMuted",!1)})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){const{playsinline:s,onError:a,config:n,controls:v}=this.props,i=u.MATCH_URL_TWITCH_CHANNEL.test(e),p=i?e.match(u.MATCH_URL_TWITCH_CHANNEL)[1]:e.match(u.MATCH_URL_TWITCH_VIDEO)[1];if(r){i?this.player.setChannel(p):this.player.setVideo("v"+p);return}(0,c.getSDK)(K,V).then(y=>{this.player=new y.Player(this.playerID,{video:i?"":p,channel:i?p:"",height:"100%",width:"100%",playsinline:s,autoplay:this.props.playing,muted:this.props.muted,controls:i?!0:v,time:(0,c.parseStartTime)(e),...n.options});const{READY:m,PLAYING:g,PAUSE:E,ENDED:O,ONLINE:L,OFFLINE:b,SEEK:T}=y.Player;this.player.addEventListener(m,this.props.onReady),this.player.addEventListener(g,this.props.onPlay),this.player.addEventListener(E,this.props.onPause),this.player.addEventListener(O,this.props.onEnded),this.player.addEventListener(T,this.props.onSeek),this.player.addEventListener(L,this.props.onLoaded),this.player.addEventListener(b,this.props.onLoaded)},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.callPlayer("pause")}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentTime")}getSecondsLoaded(){return null}render(){const e={width:"100%",height:"100%"};return d.default.createElement("div",{style:e,id:this.playerID})}}o(h,"displayName","Twitch");o(h,"canPlay",u.canPlay.twitch);o(h,"loopOnEnded",!0);const W=w(f),k=I({__proto__:null,default:W},[f]);export{k as T}; +import{a9 as w,r as D}from"./index-787c3ef8.js";import{u as C,p as N}from"./index-d501a02f.js";function I(t,e){for(var r=0;rs[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var S=Object.create,l=Object.defineProperty,j=Object.getOwnPropertyDescriptor,A=Object.getOwnPropertyNames,M=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty,R=(t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,x=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},_=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of A(e))!H.call(t,a)&&a!==r&&l(t,a,{get:()=>e[a],enumerable:!(s=j(e,a))||s.enumerable});return t},F=(t,e,r)=>(r=t!=null?S(M(t)):{},_(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),U=t=>_(l({},"__esModule",{value:!0}),t),o=(t,e,r)=>(R(t,typeof e!="symbol"?e+"":e,r),r),P={};x(P,{default:()=>h});var f=U(P),d=F(D),c=C,u=N;const K="https://player.twitch.tv/js/embed/v1.js",V="Twitch",$="twitch-player-";class h extends d.Component{constructor(){super(...arguments),o(this,"callPlayer",c.callPlayer),o(this,"playerID",this.props.config.playerId||`${$}${(0,c.randomString)()}`),o(this,"mute",()=>{this.callPlayer("setMuted",!0)}),o(this,"unmute",()=>{this.callPlayer("setMuted",!1)})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,r){const{playsinline:s,onError:a,config:n,controls:v}=this.props,i=u.MATCH_URL_TWITCH_CHANNEL.test(e),p=i?e.match(u.MATCH_URL_TWITCH_CHANNEL)[1]:e.match(u.MATCH_URL_TWITCH_VIDEO)[1];if(r){i?this.player.setChannel(p):this.player.setVideo("v"+p);return}(0,c.getSDK)(K,V).then(y=>{this.player=new y.Player(this.playerID,{video:i?"":p,channel:i?p:"",height:"100%",width:"100%",playsinline:s,autoplay:this.props.playing,muted:this.props.muted,controls:i?!0:v,time:(0,c.parseStartTime)(e),...n.options});const{READY:m,PLAYING:g,PAUSE:E,ENDED:O,ONLINE:L,OFFLINE:b,SEEK:T}=y.Player;this.player.addEventListener(m,this.props.onReady),this.player.addEventListener(g,this.props.onPlay),this.player.addEventListener(E,this.props.onPause),this.player.addEventListener(O,this.props.onEnded),this.player.addEventListener(T,this.props.onSeek),this.player.addEventListener(L,this.props.onLoaded),this.player.addEventListener(b,this.props.onLoaded)},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.callPlayer("pause")}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentTime")}getSecondsLoaded(){return null}render(){const e={width:"100%",height:"100%"};return d.default.createElement("div",{style:e,id:this.playerID})}}o(h,"displayName","Twitch");o(h,"canPlay",u.canPlay.twitch);o(h,"loopOnEnded",!0);const W=w(f),k=I({__proto__:null,default:W},[f]);export{k as T}; diff --git a/build/assets/Typography-5718a5a5.js b/build/assets/Typography-02db806b.js similarity index 93% rename from build/assets/Typography-5718a5a5.js rename to build/assets/Typography-02db806b.js index 7eb6b02c1..7dd20cf01 100644 --- a/build/assets/Typography-5718a5a5.js +++ b/build/assets/Typography-02db806b.js @@ -1 +1 @@ -import{L as b,M as B,O as W,Y as u,x as s,r as C,S as M,H as R,j as P,U,V as j}from"./index-17ed06be.js";import{e as L}from"./Stack-a8b59155.js";function N(a){return b("MuiTypography",a)}B("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const _=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],$=a=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:e,variant:o,classes:p}=a,i={root:["root",o,a.align!=="inherit"&&`align${u(t)}`,r&&"gutterBottom",n&&"noWrap",e&&"paragraph"]};return j(i,N,p)},E=W("span",{name:"MuiTypography",slot:"Root",overridesResolver:(a,t)=>{const{ownerState:r}=a;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${u(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(({theme:a,ownerState:t})=>s({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&a.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),y={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},O={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},V=a=>O[a]||a,z=C.forwardRef(function(t,r){const n=M({props:t,name:"MuiTypography"}),e=V(n.color),o=L(s({},n,{color:e})),{align:p="inherit",className:i,component:g,gutterBottom:d=!1,noWrap:f=!1,paragraph:l=!1,variant:h="body1",variantMapping:c=y}=o,x=R(o,_),m=s({},o,{align:p,color:e,className:i,component:g,gutterBottom:d,noWrap:f,paragraph:l,variant:h,variantMapping:c}),v=g||(l?"p":c[h]||y[h])||"span",T=$(m);return P.jsx(E,s({as:v,ref:r,ownerState:m,className:U(T.root,i)},x))}),H=z;export{H as T}; +import{L as b,M as B,O as W,Y as u,x as s,r as C,S as M,H as R,j as P,U,V as j}from"./index-787c3ef8.js";import{e as L}from"./Stack-b3992130.js";function N(a){return b("MuiTypography",a)}B("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const _=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],$=a=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:e,variant:o,classes:p}=a,i={root:["root",o,a.align!=="inherit"&&`align${u(t)}`,r&&"gutterBottom",n&&"noWrap",e&&"paragraph"]};return j(i,N,p)},E=W("span",{name:"MuiTypography",slot:"Root",overridesResolver:(a,t)=>{const{ownerState:r}=a;return[t.root,r.variant&&t[r.variant],r.align!=="inherit"&&t[`align${u(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})(({theme:a,ownerState:t})=>s({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&a.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),y={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},O={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},V=a=>O[a]||a,z=C.forwardRef(function(t,r){const n=M({props:t,name:"MuiTypography"}),e=V(n.color),o=L(s({},n,{color:e})),{align:p="inherit",className:i,component:g,gutterBottom:d=!1,noWrap:f=!1,paragraph:l=!1,variant:h="body1",variantMapping:c=y}=o,x=R(o,_),m=s({},o,{align:p,color:e,className:i,component:g,gutterBottom:d,noWrap:f,paragraph:l,variant:h,variantMapping:c}),v=g||(l?"p":c[h]||y[h])||"span",T=$(m);return P.jsx(E,s({as:v,ref:r,ownerState:m,className:U(T.root,i)},x))}),H=z;export{H as T}; diff --git a/build/assets/Vidyard-adceec55.js b/build/assets/Vidyard-6eb1a22b.js similarity index 95% rename from build/assets/Vidyard-adceec55.js rename to build/assets/Vidyard-6eb1a22b.js index 1395e4c69..e00b638ec 100644 --- a/build/assets/Vidyard-adceec55.js +++ b/build/assets/Vidyard-6eb1a22b.js @@ -1 +1 @@ -import{a9 as g,r as v}from"./index-17ed06be.js";import{u as b,p as O}from"./index-ed087dc3.js";function V(t,e){for(var r=0;ro[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var D=Object.create,i=Object.defineProperty,j=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,S=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty,A=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,E=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of w(e))!M.call(t,a)&&a!==r&&i(t,a,{get:()=>e[a],enumerable:!(o=j(e,a))||o.enumerable});return t},L=(t,e,r)=>(r=t!=null?D(S(t)):{},h(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),R=t=>h(i({},"__esModule",{value:!0}),t),s=(t,e,r)=>(A(t,typeof e!="symbol"?e+"":e,r),r),_={};E(_,{default:()=>y});var f=R(_),c=L(v),d=b,P=O;const x="https://play.vidyard.com/embed/v4.js",C="VidyardV4",N="onVidyardAPI";class y extends c.Component{constructor(){super(...arguments),s(this,"callPlayer",d.callPlayer),s(this,"mute",()=>{this.setVolume(0)}),s(this,"unmute",()=>{this.props.volume!==null&&this.setVolume(this.props.volume)}),s(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{playing:r,config:o,onError:a,onDuration:n}=this.props,l=e&&e.match(P.MATCH_URL_VIDYARD)[1];this.player&&this.stop(),(0,d.getSDK)(x,C,N).then(p=>{this.container&&(p.api.addReadyListener((u,m)=>{this.player||(this.player=m,this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seek",this.props.onSeek),this.player.on("playerComplete",this.props.onEnded))},l),p.api.renderPlayer({uuid:l,container:this.container,autoplay:r?1:0,...o.options}),p.api.getPlayerMetadata(l).then(u=>{this.duration=u.length_in_seconds,n(u.length_in_seconds)}))},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){window.VidyardV4.api.destroyPlayer(this.player)}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setPlaybackRate(e){this.callPlayer("setPlaybackSpeed",e)}getDuration(){return this.duration}getCurrentTime(){return this.callPlayer("currentTime")}getSecondsLoaded(){return null}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return c.default.createElement("div",{style:r},c.default.createElement("div",{ref:this.ref}))}}s(y,"displayName","Vidyard");s(y,"canPlay",P.canPlay.vidyard);const T=g(f),B=V({__proto__:null,default:T},[f]);export{B as V}; +import{a9 as g,r as v}from"./index-787c3ef8.js";import{u as b,p as O}from"./index-d501a02f.js";function V(t,e){for(var r=0;ro[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var D=Object.create,i=Object.defineProperty,j=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,S=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty,A=(t,e,r)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,E=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of w(e))!M.call(t,a)&&a!==r&&i(t,a,{get:()=>e[a],enumerable:!(o=j(e,a))||o.enumerable});return t},L=(t,e,r)=>(r=t!=null?D(S(t)):{},h(e||!t||!t.__esModule?i(r,"default",{value:t,enumerable:!0}):r,t)),R=t=>h(i({},"__esModule",{value:!0}),t),s=(t,e,r)=>(A(t,typeof e!="symbol"?e+"":e,r),r),_={};E(_,{default:()=>y});var f=R(_),c=L(v),d=b,P=O;const x="https://play.vidyard.com/embed/v4.js",C="VidyardV4",N="onVidyardAPI";class y extends c.Component{constructor(){super(...arguments),s(this,"callPlayer",d.callPlayer),s(this,"mute",()=>{this.setVolume(0)}),s(this,"unmute",()=>{this.props.volume!==null&&this.setVolume(this.props.volume)}),s(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{playing:r,config:o,onError:a,onDuration:n}=this.props,l=e&&e.match(P.MATCH_URL_VIDYARD)[1];this.player&&this.stop(),(0,d.getSDK)(x,C,N).then(p=>{this.container&&(p.api.addReadyListener((u,m)=>{this.player||(this.player=m,this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seek",this.props.onSeek),this.player.on("playerComplete",this.props.onEnded))},l),p.api.renderPlayer({uuid:l,container:this.container,autoplay:r?1:0,...o.options}),p.api.getPlayerMetadata(l).then(u=>{this.duration=u.length_in_seconds,n(u.length_in_seconds)}))},a)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){window.VidyardV4.api.destroyPlayer(this.player)}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setPlaybackRate(e){this.callPlayer("setPlaybackSpeed",e)}getDuration(){return this.duration}getCurrentTime(){return this.callPlayer("currentTime")}getSecondsLoaded(){return null}render(){const{display:e}=this.props,r={width:"100%",height:"100%",display:e};return c.default.createElement("div",{style:r},c.default.createElement("div",{ref:this.ref}))}}s(y,"displayName","Vidyard");s(y,"canPlay",P.canPlay.vidyard);const T=g(f),B=V({__proto__:null,default:T},[f]);export{B as V}; diff --git a/build/assets/Vimeo-6c31b7ae.js b/build/assets/Vimeo-dc0a0e41.js similarity index 96% rename from build/assets/Vimeo-6c31b7ae.js rename to build/assets/Vimeo-dc0a0e41.js index f12ed02d8..f68f24d26 100644 --- a/build/assets/Vimeo-6c31b7ae.js +++ b/build/assets/Vimeo-dc0a0e41.js @@ -1 +1 @@ -import{a9 as d,r as f}from"./index-17ed06be.js";import{u as m,p as _}from"./index-ed087dc3.js";function P(t,e){for(var r=0;ra[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,n=Object.defineProperty,b=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,O=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty,w=(t,e,r)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,j=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of v(e))!D.call(t,o)&&o!==r&&n(t,o,{get:()=>e[o],enumerable:!(a=b(e,o))||a.enumerable});return t},M=(t,e,r)=>(r=t!=null?g(O(t)):{},h(e||!t||!t.__esModule?n(r,"default",{value:t,enumerable:!0}):r,t)),E=t=>h(n({},"__esModule",{value:!0}),t),i=(t,e,r)=>(w(t,typeof e!="symbol"?e+"":e,r),r),c={};j(c,{default:()=>l});var y=E(c),p=M(f),u=m,L=_;const S="https://player.vimeo.com/api/player.js",V="Vimeo",k=t=>t.replace("/manage/videos","");class l extends p.Component{constructor(){super(...arguments),i(this,"callPlayer",u.callPlayer),i(this,"duration",null),i(this,"currentTime",null),i(this,"secondsLoaded",null),i(this,"mute",()=>{this.setMuted(!0)}),i(this,"unmute",()=>{this.setMuted(!1)}),i(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){this.duration=null,(0,u.getSDK)(S,V).then(r=>{if(!this.container)return;const{playerOptions:a,title:o}=this.props.config;this.player=new r.Player(this.container,{url:k(e),autoplay:this.props.playing,muted:this.props.muted,loop:this.props.loop,playsinline:this.props.playsinline,controls:this.props.controls,...a}),this.player.ready().then(()=>{const s=this.container.querySelector("iframe");s.style.width="100%",s.style.height="100%",o&&(s.title=o)}).catch(this.props.onError),this.player.on("loaded",()=>{this.props.onReady(),this.refreshDuration()}),this.player.on("play",()=>{this.props.onPlay(),this.refreshDuration()}),this.player.on("pause",this.props.onPause),this.player.on("seeked",s=>this.props.onSeek(s.seconds)),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",({seconds:s})=>{this.currentTime=s}),this.player.on("progress",({seconds:s})=>{this.secondsLoaded=s}),this.player.on("bufferstart",this.props.onBuffer),this.player.on("bufferend",this.props.onBufferEnd),this.player.on("playbackratechange",s=>this.props.onPlaybackRateChange(s.playbackRate))},this.props.onError)}refreshDuration(){this.player.getDuration().then(e=>{this.duration=e})}play(){const e=this.callPlayer("play");e&&e.catch(this.props.onError)}pause(){this.callPlayer("pause")}stop(){this.callPlayer("unload")}seekTo(e,r=!0){this.callPlayer("setCurrentTime",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setMuted(e){this.callPlayer("setMuted",e)}setLoop(e){this.callPlayer("setLoop",e)}setPlaybackRate(e){this.callPlayer("setPlaybackRate",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const{display:e}=this.props,r={width:"100%",height:"100%",overflow:"hidden",display:e};return p.default.createElement("div",{key:this.props.url,ref:this.ref,style:r})}}i(l,"displayName","Vimeo");i(l,"canPlay",L.canPlay.vimeo);i(l,"forceLoad",!0);const T=d(y),R=P({__proto__:null,default:T},[y]);export{R as V}; +import{a9 as d,r as f}from"./index-787c3ef8.js";import{u as m,p as _}from"./index-d501a02f.js";function P(t,e){for(var r=0;ra[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,n=Object.defineProperty,b=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,O=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty,w=(t,e,r)=>e in t?n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,j=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},h=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of v(e))!D.call(t,o)&&o!==r&&n(t,o,{get:()=>e[o],enumerable:!(a=b(e,o))||a.enumerable});return t},M=(t,e,r)=>(r=t!=null?g(O(t)):{},h(e||!t||!t.__esModule?n(r,"default",{value:t,enumerable:!0}):r,t)),E=t=>h(n({},"__esModule",{value:!0}),t),i=(t,e,r)=>(w(t,typeof e!="symbol"?e+"":e,r),r),c={};j(c,{default:()=>l});var y=E(c),p=M(f),u=m,L=_;const S="https://player.vimeo.com/api/player.js",V="Vimeo",k=t=>t.replace("/manage/videos","");class l extends p.Component{constructor(){super(...arguments),i(this,"callPlayer",u.callPlayer),i(this,"duration",null),i(this,"currentTime",null),i(this,"secondsLoaded",null),i(this,"mute",()=>{this.setMuted(!0)}),i(this,"unmute",()=>{this.setMuted(!1)}),i(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){this.duration=null,(0,u.getSDK)(S,V).then(r=>{if(!this.container)return;const{playerOptions:a,title:o}=this.props.config;this.player=new r.Player(this.container,{url:k(e),autoplay:this.props.playing,muted:this.props.muted,loop:this.props.loop,playsinline:this.props.playsinline,controls:this.props.controls,...a}),this.player.ready().then(()=>{const s=this.container.querySelector("iframe");s.style.width="100%",s.style.height="100%",o&&(s.title=o)}).catch(this.props.onError),this.player.on("loaded",()=>{this.props.onReady(),this.refreshDuration()}),this.player.on("play",()=>{this.props.onPlay(),this.refreshDuration()}),this.player.on("pause",this.props.onPause),this.player.on("seeked",s=>this.props.onSeek(s.seconds)),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",({seconds:s})=>{this.currentTime=s}),this.player.on("progress",({seconds:s})=>{this.secondsLoaded=s}),this.player.on("bufferstart",this.props.onBuffer),this.player.on("bufferend",this.props.onBufferEnd),this.player.on("playbackratechange",s=>this.props.onPlaybackRateChange(s.playbackRate))},this.props.onError)}refreshDuration(){this.player.getDuration().then(e=>{this.duration=e})}play(){const e=this.callPlayer("play");e&&e.catch(this.props.onError)}pause(){this.callPlayer("pause")}stop(){this.callPlayer("unload")}seekTo(e,r=!0){this.callPlayer("setCurrentTime",e),r||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setMuted(e){this.callPlayer("setMuted",e)}setLoop(e){this.callPlayer("setLoop",e)}setPlaybackRate(e){this.callPlayer("setPlaybackRate",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const{display:e}=this.props,r={width:"100%",height:"100%",overflow:"hidden",display:e};return p.default.createElement("div",{key:this.props.url,ref:this.ref,style:r})}}i(l,"displayName","Vimeo");i(l,"canPlay",L.canPlay.vimeo);i(l,"forceLoad",!0);const T=d(y),R=P({__proto__:null,default:T},[y]);export{R as V}; diff --git a/build/assets/Wistia-fc8a836e.js b/build/assets/Wistia-798cf390.js similarity index 96% rename from build/assets/Wistia-fc8a836e.js rename to build/assets/Wistia-798cf390.js index d507aa1ee..d68b7542e 100644 --- a/build/assets/Wistia-fc8a836e.js +++ b/build/assets/Wistia-798cf390.js @@ -1 +1 @@ -import{a9 as m,r as g}from"./index-17ed06be.js";import{u as v,p as w}from"./index-ed087dc3.js";function O(t,e){for(var a=0;as[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var C=Object.create,i=Object.defineProperty,k=Object.getOwnPropertyDescriptor,D=Object.getOwnPropertyNames,E=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty,R=(t,e,a)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,j=(t,e)=>{for(var a in e)i(t,a,{get:e[a],enumerable:!0})},h=(t,e,a,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of D(e))!S.call(t,r)&&r!==a&&i(t,r,{get:()=>e[r],enumerable:!(s=k(e,r))||s.enumerable});return t},I=(t,e,a)=>(a=t!=null?C(E(t)):{},h(e||!t||!t.__esModule?i(a,"default",{value:t,enumerable:!0}):a,t)),W=t=>h(i({},"__esModule",{value:!0}),t),n=(t,e,a)=>(R(t,typeof e!="symbol"?e+"":e,a),a),d={};j(d,{default:()=>l});var _=W(d),y=I(g),c=v,P=w;const M="https://fast.wistia.com/assets/external/E-v1.js",x="Wistia",A="wistia-player-";class l extends y.Component{constructor(){super(...arguments),n(this,"callPlayer",c.callPlayer),n(this,"playerID",this.props.config.playerId||`${A}${(0,c.randomString)()}`),n(this,"onPlay",(...e)=>this.props.onPlay(...e)),n(this,"onPause",(...e)=>this.props.onPause(...e)),n(this,"onSeek",(...e)=>this.props.onSeek(...e)),n(this,"onEnded",(...e)=>this.props.onEnded(...e)),n(this,"onPlaybackRateChange",(...e)=>this.props.onPlaybackRateChange(...e)),n(this,"mute",()=>{this.callPlayer("mute")}),n(this,"unmute",()=>{this.callPlayer("unmute")})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{playing:a,muted:s,controls:r,onReady:o,config:p,onError:b}=this.props;(0,c.getSDK)(M,x).then(f=>{p.customControls&&p.customControls.forEach(u=>f.defineControl(u)),window._wq=window._wq||[],window._wq.push({id:this.playerID,options:{autoPlay:a,silentAutoPlay:"allow",muted:s,controlsVisibleOnLoad:r,fullscreenButton:r,playbar:r,playbackRateControl:r,qualityControl:r,volumeControl:r,settingsControl:r,smallPlayButton:r,...p.options},onReady:u=>{this.player=u,this.unbind(),this.player.bind("play",this.onPlay),this.player.bind("pause",this.onPause),this.player.bind("seek",this.onSeek),this.player.bind("end",this.onEnded),this.player.bind("playbackratechange",this.onPlaybackRateChange),o()}})},b)}unbind(){this.player.unbind("play",this.onPlay),this.player.unbind("pause",this.onPause),this.player.unbind("seek",this.onSeek),this.player.unbind("end",this.onEnded),this.player.unbind("playbackratechange",this.onPlaybackRateChange)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.unbind(),this.callPlayer("remove")}seekTo(e,a=!0){this.callPlayer("time",e),a||this.pause()}setVolume(e){this.callPlayer("volume",e)}setPlaybackRate(e){this.callPlayer("playbackRate",e)}getDuration(){return this.callPlayer("duration")}getCurrentTime(){return this.callPlayer("time")}getSecondsLoaded(){return null}render(){const{url:e}=this.props,a=e&&e.match(P.MATCH_URL_WISTIA)[1],s=`wistia_embed wistia_async_${a}`,r={width:"100%",height:"100%"};return y.default.createElement("div",{id:this.playerID,key:a,className:s,style:r})}}n(l,"displayName","Wistia");n(l,"canPlay",P.canPlay.wistia);n(l,"loopOnEnded",!0);const L=m(_),$=O({__proto__:null,default:L},[_]);export{$ as W}; +import{a9 as m,r as g}from"./index-787c3ef8.js";import{u as v,p as w}from"./index-d501a02f.js";function O(t,e){for(var a=0;as[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var C=Object.create,i=Object.defineProperty,k=Object.getOwnPropertyDescriptor,D=Object.getOwnPropertyNames,E=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty,R=(t,e,a)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a,j=(t,e)=>{for(var a in e)i(t,a,{get:e[a],enumerable:!0})},h=(t,e,a,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of D(e))!S.call(t,r)&&r!==a&&i(t,r,{get:()=>e[r],enumerable:!(s=k(e,r))||s.enumerable});return t},I=(t,e,a)=>(a=t!=null?C(E(t)):{},h(e||!t||!t.__esModule?i(a,"default",{value:t,enumerable:!0}):a,t)),W=t=>h(i({},"__esModule",{value:!0}),t),n=(t,e,a)=>(R(t,typeof e!="symbol"?e+"":e,a),a),d={};j(d,{default:()=>l});var _=W(d),y=I(g),c=v,P=w;const M="https://fast.wistia.com/assets/external/E-v1.js",x="Wistia",A="wistia-player-";class l extends y.Component{constructor(){super(...arguments),n(this,"callPlayer",c.callPlayer),n(this,"playerID",this.props.config.playerId||`${A}${(0,c.randomString)()}`),n(this,"onPlay",(...e)=>this.props.onPlay(...e)),n(this,"onPause",(...e)=>this.props.onPause(...e)),n(this,"onSeek",(...e)=>this.props.onSeek(...e)),n(this,"onEnded",(...e)=>this.props.onEnded(...e)),n(this,"onPlaybackRateChange",(...e)=>this.props.onPlaybackRateChange(...e)),n(this,"mute",()=>{this.callPlayer("mute")}),n(this,"unmute",()=>{this.callPlayer("unmute")})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{playing:a,muted:s,controls:r,onReady:o,config:p,onError:b}=this.props;(0,c.getSDK)(M,x).then(f=>{p.customControls&&p.customControls.forEach(u=>f.defineControl(u)),window._wq=window._wq||[],window._wq.push({id:this.playerID,options:{autoPlay:a,silentAutoPlay:"allow",muted:s,controlsVisibleOnLoad:r,fullscreenButton:r,playbar:r,playbackRateControl:r,qualityControl:r,volumeControl:r,settingsControl:r,smallPlayButton:r,...p.options},onReady:u=>{this.player=u,this.unbind(),this.player.bind("play",this.onPlay),this.player.bind("pause",this.onPause),this.player.bind("seek",this.onSeek),this.player.bind("end",this.onEnded),this.player.bind("playbackratechange",this.onPlaybackRateChange),o()}})},b)}unbind(){this.player.unbind("play",this.onPlay),this.player.unbind("pause",this.onPause),this.player.unbind("seek",this.onSeek),this.player.unbind("end",this.onEnded),this.player.unbind("playbackratechange",this.onPlaybackRateChange)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.unbind(),this.callPlayer("remove")}seekTo(e,a=!0){this.callPlayer("time",e),a||this.pause()}setVolume(e){this.callPlayer("volume",e)}setPlaybackRate(e){this.callPlayer("playbackRate",e)}getDuration(){return this.callPlayer("duration")}getCurrentTime(){return this.callPlayer("time")}getSecondsLoaded(){return null}render(){const{url:e}=this.props,a=e&&e.match(P.MATCH_URL_WISTIA)[1],s=`wistia_embed wistia_async_${a}`,r={width:"100%",height:"100%"};return y.default.createElement("div",{id:this.playerID,key:a,className:s,style:r})}}n(l,"displayName","Wistia");n(l,"canPlay",P.canPlay.wistia);n(l,"loopOnEnded",!0);const L=m(_),$=O({__proto__:null,default:L},[_]);export{$ as W}; diff --git a/build/assets/YouTube-669c494c.js b/build/assets/YouTube-4922b2e3.js similarity index 97% rename from build/assets/YouTube-669c494c.js rename to build/assets/YouTube-4922b2e3.js index 41431891a..64b1fe210 100644 --- a/build/assets/YouTube-669c494c.js +++ b/build/assets/YouTube-4922b2e3.js @@ -1 +1 @@ -import{a9 as U,r as I}from"./index-17ed06be.js";import{u as L,p as Y}from"./index-ed087dc3.js";function k(a,e){for(var t=0;ts[r]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var M=Object.create,u=Object.defineProperty,j=Object.getOwnPropertyDescriptor,N=Object.getOwnPropertyNames,V=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty,x=(a,e,t)=>e in a?u(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,K=(a,e)=>{for(var t in e)u(a,t,{get:e[t],enumerable:!0})},v=(a,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of N(e))!B.call(a,r)&&r!==t&&u(a,r,{get:()=>e[r],enumerable:!(s=j(e,r))||s.enumerable});return a},F=(a,e,t)=>(t=a!=null?M(V(a)):{},v(e||!a||!a.__esModule?u(t,"default",{value:a,enumerable:!0}):t,a)),H=a=>v(u({},"__esModule",{value:!0}),a),o=(a,e,t)=>(x(a,typeof e!="symbol"?e+"":e,t),t),w={};K(w,{default:()=>O});var S=H(w),m=F(I),p=L,D=Y;const G="https://www.youtube.com/iframe_api",T="YT",z="onYouTubeIframeAPIReady",f=/[?&](?:list|channel)=([a-zA-Z0-9_-]+)/,b=/user\/([a-zA-Z0-9_-]+)\/?/,Q=/youtube-nocookie\.com/,Z="https://www.youtube-nocookie.com";class O extends m.Component{constructor(){super(...arguments),o(this,"callPlayer",p.callPlayer),o(this,"parsePlaylist",e=>{if(e instanceof Array)return{listType:"playlist",playlist:e.map(this.getID).join(",")};if(f.test(e)){const[,t]=e.match(f);return{listType:"playlist",list:t.replace(/^UC/,"UU")}}if(b.test(e)){const[,t]=e.match(b);return{listType:"user_uploads",list:t}}return{}}),o(this,"onStateChange",e=>{const{data:t}=e,{onPlay:s,onPause:r,onBuffer:n,onBufferEnd:P,onEnded:_,onReady:g,loop:y,config:{playerVars:l,onUnstarted:h}}=this.props,{UNSTARTED:d,PLAYING:c,PAUSED:i,BUFFERING:E,ENDED:A,CUED:C}=window[T].PlayerState;if(t===d&&h(),t===c&&(s(),P()),t===i&&r(),t===E&&n(),t===A){const R=!!this.callPlayer("getPlaylist");y&&!R&&(l.start?this.seekTo(l.start):this.play()),_()}t===C&&g()}),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unMute")}),o(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}getID(e){return!e||e instanceof Array||f.test(e)?null:e.match(D.MATCH_URL_YOUTUBE)[1]}load(e,t){const{playing:s,muted:r,playsinline:n,controls:P,loop:_,config:g,onError:y}=this.props,{playerVars:l,embedOptions:h}=g,d=this.getID(e);if(t){if(f.test(e)||b.test(e)||e instanceof Array){this.player.loadPlaylist(this.parsePlaylist(e));return}this.player.cueVideoById({videoId:d,startSeconds:(0,p.parseStartTime)(e)||l.start,endSeconds:(0,p.parseEndTime)(e)||l.end});return}(0,p.getSDK)(G,T,z,c=>c.loaded).then(c=>{this.container&&(this.player=new c.Player(this.container,{width:"100%",height:"100%",videoId:d,playerVars:{autoplay:s?1:0,mute:r?1:0,controls:P?1:0,start:(0,p.parseStartTime)(e),end:(0,p.parseEndTime)(e),origin:window.location.origin,playsinline:n?1:0,...this.parsePlaylist(e),...l},events:{onReady:()=>{_&&this.player.setLoop(!0),this.props.onReady()},onPlaybackRateChange:i=>this.props.onPlaybackRateChange(i.data),onPlaybackQualityChange:i=>this.props.onPlaybackQualityChange(i),onStateChange:this.onStateChange,onError:i=>y(i.data)},host:Q.test(e)?Z:void 0,...h}))},y),h.events&&console.warn("Using `embedOptions.events` will likely break things. Use ReactPlayer’s callback props instead, eg onReady, onPlay, onPause")}play(){this.callPlayer("playVideo")}pause(){this.callPlayer("pauseVideo")}stop(){document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}seekTo(e,t=!1){this.callPlayer("seekTo",e),!t&&!this.props.playing&&this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}setPlaybackRate(e){this.callPlayer("setPlaybackRate",e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentTime")}getSecondsLoaded(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}render(){const{display:e}=this.props,t={width:"100%",height:"100%",display:e};return m.default.createElement("div",{style:t},m.default.createElement("div",{ref:this.ref}))}}o(O,"displayName","YouTube");o(O,"canPlay",D.canPlay.youtube);const $=U(S),W=k({__proto__:null,default:$},[S]);export{W as Y}; +import{a9 as U,r as I}from"./index-787c3ef8.js";import{u as L,p as Y}from"./index-d501a02f.js";function k(a,e){for(var t=0;ts[r]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var M=Object.create,u=Object.defineProperty,j=Object.getOwnPropertyDescriptor,N=Object.getOwnPropertyNames,V=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty,x=(a,e,t)=>e in a?u(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,K=(a,e)=>{for(var t in e)u(a,t,{get:e[t],enumerable:!0})},v=(a,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of N(e))!B.call(a,r)&&r!==t&&u(a,r,{get:()=>e[r],enumerable:!(s=j(e,r))||s.enumerable});return a},F=(a,e,t)=>(t=a!=null?M(V(a)):{},v(e||!a||!a.__esModule?u(t,"default",{value:a,enumerable:!0}):t,a)),H=a=>v(u({},"__esModule",{value:!0}),a),o=(a,e,t)=>(x(a,typeof e!="symbol"?e+"":e,t),t),w={};K(w,{default:()=>O});var S=H(w),m=F(I),p=L,D=Y;const G="https://www.youtube.com/iframe_api",T="YT",z="onYouTubeIframeAPIReady",f=/[?&](?:list|channel)=([a-zA-Z0-9_-]+)/,b=/user\/([a-zA-Z0-9_-]+)\/?/,Q=/youtube-nocookie\.com/,Z="https://www.youtube-nocookie.com";class O extends m.Component{constructor(){super(...arguments),o(this,"callPlayer",p.callPlayer),o(this,"parsePlaylist",e=>{if(e instanceof Array)return{listType:"playlist",playlist:e.map(this.getID).join(",")};if(f.test(e)){const[,t]=e.match(f);return{listType:"playlist",list:t.replace(/^UC/,"UU")}}if(b.test(e)){const[,t]=e.match(b);return{listType:"user_uploads",list:t}}return{}}),o(this,"onStateChange",e=>{const{data:t}=e,{onPlay:s,onPause:r,onBuffer:n,onBufferEnd:P,onEnded:_,onReady:g,loop:y,config:{playerVars:l,onUnstarted:h}}=this.props,{UNSTARTED:d,PLAYING:c,PAUSED:i,BUFFERING:E,ENDED:A,CUED:C}=window[T].PlayerState;if(t===d&&h(),t===c&&(s(),P()),t===i&&r(),t===E&&n(),t===A){const R=!!this.callPlayer("getPlaylist");y&&!R&&(l.start?this.seekTo(l.start):this.play()),_()}t===C&&g()}),o(this,"mute",()=>{this.callPlayer("mute")}),o(this,"unmute",()=>{this.callPlayer("unMute")}),o(this,"ref",e=>{this.container=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}getID(e){return!e||e instanceof Array||f.test(e)?null:e.match(D.MATCH_URL_YOUTUBE)[1]}load(e,t){const{playing:s,muted:r,playsinline:n,controls:P,loop:_,config:g,onError:y}=this.props,{playerVars:l,embedOptions:h}=g,d=this.getID(e);if(t){if(f.test(e)||b.test(e)||e instanceof Array){this.player.loadPlaylist(this.parsePlaylist(e));return}this.player.cueVideoById({videoId:d,startSeconds:(0,p.parseStartTime)(e)||l.start,endSeconds:(0,p.parseEndTime)(e)||l.end});return}(0,p.getSDK)(G,T,z,c=>c.loaded).then(c=>{this.container&&(this.player=new c.Player(this.container,{width:"100%",height:"100%",videoId:d,playerVars:{autoplay:s?1:0,mute:r?1:0,controls:P?1:0,start:(0,p.parseStartTime)(e),end:(0,p.parseEndTime)(e),origin:window.location.origin,playsinline:n?1:0,...this.parsePlaylist(e),...l},events:{onReady:()=>{_&&this.player.setLoop(!0),this.props.onReady()},onPlaybackRateChange:i=>this.props.onPlaybackRateChange(i.data),onPlaybackQualityChange:i=>this.props.onPlaybackQualityChange(i),onStateChange:this.onStateChange,onError:i=>y(i.data)},host:Q.test(e)?Z:void 0,...h}))},y),h.events&&console.warn("Using `embedOptions.events` will likely break things. Use ReactPlayer’s callback props instead, eg onReady, onPlay, onPause")}play(){this.callPlayer("playVideo")}pause(){this.callPlayer("pauseVideo")}stop(){document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}seekTo(e,t=!1){this.callPlayer("seekTo",e),!t&&!this.props.playing&&this.pause()}setVolume(e){this.callPlayer("setVolume",e*100)}setPlaybackRate(e){this.callPlayer("setPlaybackRate",e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentTime")}getSecondsLoaded(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}render(){const{display:e}=this.props,t={width:"100%",height:"100%",display:e};return m.default.createElement("div",{style:t},m.default.createElement("div",{ref:this.ref}))}}o(O,"displayName","YouTube");o(O,"canPlay",D.canPlay.youtube);const $=U(S),W=k({__proto__:null,default:$},[S]);export{W as Y}; diff --git a/build/assets/constants-fa18afce.js b/build/assets/constants-380035da.js similarity index 80% rename from build/assets/constants-fa18afce.js rename to build/assets/constants-380035da.js index 3678e233a..22c588b94 100644 --- a/build/assets/constants-fa18afce.js +++ b/build/assets/constants-380035da.js @@ -1,4 +1,4 @@ -import{s,a$ as t,aZ as a,a_ as o,b0 as n}from"./index-17ed06be.js";import{f as c}from"./index-2f22123e.js";const i={[t]:"RSS link",[a]:"Twitter Handle",[o]:"Youtube channel",[n]:"Github Repository"},r="Sources Table",E="Queued Sources",I="Topics",S="View Content",u="date",p="edge_count",_="alphabetically",l="https://twitter.com",A="IS_ALIAS",d="https://www.twitter.com/anyuser/status/",L=s(c)` +import{s,a$ as t,aZ as a,a_ as o,b0 as n}from"./index-787c3ef8.js";import{f as c}from"./index-77dce891.js";const i={[t]:"RSS link",[a]:"Twitter Handle",[o]:"Youtube channel",[n]:"Github Repository"},r="Sources Table",E="Queued Sources",I="Topics",S="View Content",u="date",p="edge_count",_="alphabetically",l="https://twitter.com",A="IS_ALIAS",d="https://www.twitter.com/anyuser/status/",L=s(c)` && { vertical-align: middle; margin: 5px 0 0 4px; diff --git a/build/assets/createSvgIcon-6ef3ed46.js b/build/assets/createSvgIcon-fa140fa5.js similarity index 97% rename from build/assets/createSvgIcon-6ef3ed46.js rename to build/assets/createSvgIcon-fa140fa5.js index 3fc3ec7ca..6e4f4d5c7 100644 --- a/build/assets/createSvgIcon-6ef3ed46.js +++ b/build/assets/createSvgIcon-fa140fa5.js @@ -1 +1 @@ -import{L as I,M as C,O as w,Y as f,r as v,S as R,H as b,x as S,j as g,U as j,V as M}from"./index-17ed06be.js";function N(o){return I("MuiSvgIcon",o)}C("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const A=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],B=o=>{const{color:e,fontSize:t,classes:i}=o,n={root:["root",e!=="inherit"&&`color${f(e)}`,`fontSize${f(t)}`]};return M(n,N,i)},T=w("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:t}=o;return[e.root,t.color!=="inherit"&&e[`color${f(t.color)}`],e[`fontSize${f(t.fontSize)}`]]}})(({theme:o,ownerState:e})=>{var t,i,n,u,m,a,h,p,d,r,s,c,l;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(t=o.transitions)==null||(i=t.create)==null?void 0:i.call(t,"fill",{duration:(n=o.transitions)==null||(n=n.duration)==null?void 0:n.shorter}),fontSize:{inherit:"inherit",small:((u=o.typography)==null||(m=u.pxToRem)==null?void 0:m.call(u,20))||"1.25rem",medium:((a=o.typography)==null||(h=a.pxToRem)==null?void 0:h.call(a,24))||"1.5rem",large:((p=o.typography)==null||(d=p.pxToRem)==null?void 0:d.call(p,35))||"2.1875rem"}[e.fontSize],color:(r=(s=(o.vars||o).palette)==null||(s=s[e.color])==null?void 0:s.main)!=null?r:{action:(c=(o.vars||o).palette)==null||(c=c.action)==null?void 0:c.active,disabled:(l=(o.vars||o).palette)==null||(l=l.action)==null?void 0:l.disabled,inherit:void 0}[e.color]}}),_=v.forwardRef(function(e,t){const i=R({props:e,name:"MuiSvgIcon"}),{children:n,className:u,color:m="inherit",component:a="svg",fontSize:h="medium",htmlColor:p,inheritViewBox:d=!1,titleAccess:r,viewBox:s="0 0 24 24"}=i,c=b(i,A),l=v.isValidElement(n)&&n.type==="svg",y=S({},i,{color:m,component:a,fontSize:h,instanceFontSize:e.fontSize,inheritViewBox:d,viewBox:s,hasSvgAsChild:l}),x={};d||(x.viewBox=s);const z=B(y);return g.jsxs(T,S({as:a,className:j(z.root,u),focusable:"false",color:p,"aria-hidden":r?void 0:!0,role:r?"img":void 0,ref:t},x,c,l&&n.props,{ownerState:y,children:[l?n.props.children:n,r?g.jsx("title",{children:r}):null]}))});_.muiName="SvgIcon";const $=_;function E(o,e){function t(i,n){return g.jsx($,S({"data-testid":`${e}Icon`,ref:n},i,{children:o}))}return t.muiName=$.muiName,v.memo(v.forwardRef(t))}export{E as c}; +import{L as I,M as C,O as w,Y as f,r as v,S as R,H as b,x as S,j as g,U as j,V as M}from"./index-787c3ef8.js";function N(o){return I("MuiSvgIcon",o)}C("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const A=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],B=o=>{const{color:e,fontSize:t,classes:i}=o,n={root:["root",e!=="inherit"&&`color${f(e)}`,`fontSize${f(t)}`]};return M(n,N,i)},T=w("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:t}=o;return[e.root,t.color!=="inherit"&&e[`color${f(t.color)}`],e[`fontSize${f(t.fontSize)}`]]}})(({theme:o,ownerState:e})=>{var t,i,n,u,m,a,h,p,d,r,s,c,l;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:e.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(t=o.transitions)==null||(i=t.create)==null?void 0:i.call(t,"fill",{duration:(n=o.transitions)==null||(n=n.duration)==null?void 0:n.shorter}),fontSize:{inherit:"inherit",small:((u=o.typography)==null||(m=u.pxToRem)==null?void 0:m.call(u,20))||"1.25rem",medium:((a=o.typography)==null||(h=a.pxToRem)==null?void 0:h.call(a,24))||"1.5rem",large:((p=o.typography)==null||(d=p.pxToRem)==null?void 0:d.call(p,35))||"2.1875rem"}[e.fontSize],color:(r=(s=(o.vars||o).palette)==null||(s=s[e.color])==null?void 0:s.main)!=null?r:{action:(c=(o.vars||o).palette)==null||(c=c.action)==null?void 0:c.active,disabled:(l=(o.vars||o).palette)==null||(l=l.action)==null?void 0:l.disabled,inherit:void 0}[e.color]}}),_=v.forwardRef(function(e,t){const i=R({props:e,name:"MuiSvgIcon"}),{children:n,className:u,color:m="inherit",component:a="svg",fontSize:h="medium",htmlColor:p,inheritViewBox:d=!1,titleAccess:r,viewBox:s="0 0 24 24"}=i,c=b(i,A),l=v.isValidElement(n)&&n.type==="svg",y=S({},i,{color:m,component:a,fontSize:h,instanceFontSize:e.fontSize,inheritViewBox:d,viewBox:s,hasSvgAsChild:l}),x={};d||(x.viewBox=s);const z=B(y);return g.jsxs(T,S({as:a,className:j(z.root,u),focusable:"false",color:p,"aria-hidden":r?void 0:!0,role:r?"img":void 0,ref:t},x,c,l&&n.props,{ownerState:y,children:[l?n.props.children:n,r?g.jsx("title",{children:r}):null]}))});_.muiName="SvgIcon";const $=_;function E(o,e){function t(i,n){return g.jsx($,S({"data-testid":`${e}Icon`,ref:n},i,{children:o}))}return t.muiName=$.muiName,v.memo(v.forwardRef(t))}export{E as c}; diff --git a/build/assets/index-ae6439d2.js b/build/assets/index-14cee051.js similarity index 96% rename from build/assets/index-ae6439d2.js rename to build/assets/index-14cee051.js index 0f6ab2cff..b60417730 100644 --- a/build/assets/index-ae6439d2.js +++ b/build/assets/index-14cee051.js @@ -1,4 +1,4 @@ -import{z as Z,s as g,a as b,F as t,T,b as V,r as y,j as e,B as C,aX as ee,b5 as te,ao as se,aV as L,aW as F,ba as B,bb as ne,q as oe,bc as re,bd as ie,be as ae,e as O,t as ce,u as le,aU as de,N as I,aY as pe,v as xe,ah as me,ag as ue,b8 as he}from"./index-17ed06be.js";import{ad as fe,i as ye}from"./index-2f22123e.js";import{f as ge}from"./index-10fd1675.js";import{C as U}from"./ClipLoader-96bb9f4d.js";import{p as q}from"./index-83069401.js";import{A as je}from"./index-9261e06d.js";import{c as we}from"./index-64f1c910.js";import"./three.module-9c942ca6.js";import"./Stack-a8b59155.js";import"./createSvgIcon-6ef3ed46.js";import"./TextareaAutosize-f571cf36.js";const be=async(o,a,c="")=>await Z.post(`/${o}`,JSON.stringify(a),{Authorization:c}),Se=async(o,a,c,m,d,r)=>{const x=o==="Create custom type"?"schema":"node",l={node_data:{...a,...o==="Image"&&{source_link:c}},node_type:o,name:m,pubkey:r};return be(x,l,d)},Ne=({onClick:o,loading:a,error:c})=>{const m=V(l=>l.budget),[d,r]=y.useState(10),x="node";return y.useEffect(()=>{(async()=>{try{const h=await te(x);r(h.data.price)}catch(h){console.error("cannot fetch",h)}})()},[x]),e.jsxs(t,{children:[e.jsx(t,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(t,{align:"center",direction:"row",children:e.jsx(ke,{children:"Approve Cost"})})}),e.jsxs(t,{align:"center",direction:"row",justify:"space-between",mb:20,children:[e.jsxs(Te,{children:[e.jsx("div",{className:"title",children:"COST"}),e.jsxs("div",{className:"value","data-testid":"check-price",children:[d," sats"]})]}),e.jsxs(Ce,{children:[e.jsx("div",{className:"title",children:"BUDGET"}),e.jsxs("div",{className:"value",children:[ge(m)," sats"]})]})]}),e.jsx(t,{children:e.jsx(C,{color:"secondary","data-testid":"check-icon",disabled:a||!!c,onClick:o,size:"large",startIcon:a?e.jsx(R,{children:e.jsx(U,{color:b.lightGray,size:12})}):e.jsxs(R,{children:[" ",e.jsx(fe,{})]}),type:"submit",variant:"contained",children:"Approve"})}),c?e.jsx(ze,{children:e.jsxs(ve,{children:[e.jsx(ee,{className:"errorIcon"}),e.jsx("span",{children:c})]})}):null]})},Te=g(t).attrs({direction:"column",align:"space-between",justify:"flex-start"})` +import{z as Z,s as g,a as b,F as t,T,b as V,r as y,j as e,B as C,aX as ee,b5 as te,ao as se,aV as L,aW as F,ba as B,bb as ne,q as oe,bc as re,bd as ie,be as ae,e as O,t as ce,u as le,aU as de,N as I,aY as pe,v as xe,ah as me,ag as ue,b8 as he}from"./index-787c3ef8.js";import{ad as fe,i as ye}from"./index-77dce891.js";import{f as ge}from"./index-cefe14af.js";import{C as U}from"./ClipLoader-0106d300.js";import{p as q}from"./index-83069401.js";import{A as je}from"./index-efed0068.js";import{c as we}from"./index-64f1c910.js";import"./three.module-9c942ca6.js";import"./Stack-b3992130.js";import"./createSvgIcon-fa140fa5.js";import"./TextareaAutosize-e216d6db.js";const be=async(o,a,c="")=>await Z.post(`/${o}`,JSON.stringify(a),{Authorization:c}),Se=async(o,a,c,m,d,r)=>{const x=o==="Create custom type"?"schema":"node",l={node_data:{...a,...o==="Image"&&{source_link:c}},node_type:o,name:m,pubkey:r};return be(x,l,d)},Ne=({onClick:o,loading:a,error:c})=>{const m=V(l=>l.budget),[d,r]=y.useState(10),x="node";return y.useEffect(()=>{(async()=>{try{const h=await te(x);r(h.data.price)}catch(h){console.error("cannot fetch",h)}})()},[x]),e.jsxs(t,{children:[e.jsx(t,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(t,{align:"center",direction:"row",children:e.jsx(ke,{children:"Approve Cost"})})}),e.jsxs(t,{align:"center",direction:"row",justify:"space-between",mb:20,children:[e.jsxs(Te,{children:[e.jsx("div",{className:"title",children:"COST"}),e.jsxs("div",{className:"value","data-testid":"check-price",children:[d," sats"]})]}),e.jsxs(Ce,{children:[e.jsx("div",{className:"title",children:"BUDGET"}),e.jsxs("div",{className:"value",children:[ge(m)," sats"]})]})]}),e.jsx(t,{children:e.jsx(C,{color:"secondary","data-testid":"check-icon",disabled:a||!!c,onClick:o,size:"large",startIcon:a?e.jsx(R,{children:e.jsx(U,{color:b.lightGray,size:12})}):e.jsxs(R,{children:[" ",e.jsx(fe,{})]}),type:"submit",variant:"contained",children:"Approve"})}),c?e.jsx(ze,{children:e.jsxs(ve,{children:[e.jsx(ee,{className:"errorIcon"}),e.jsx("span",{children:c})]})}):null]})},Te=g(t).attrs({direction:"column",align:"space-between",justify:"flex-start"})` width: 141px; height: 61px; border: 1px solid ${b.GRAY7}; diff --git a/build/assets/index-053bf7ca.js b/build/assets/index-2cd18ef8.js similarity index 69% rename from build/assets/index-053bf7ca.js rename to build/assets/index-2cd18ef8.js index e25e6f87a..cb67d9498 100644 --- a/build/assets/index-053bf7ca.js +++ b/build/assets/index-2cd18ef8.js @@ -1 +1 @@ -import"./index-17ed06be.js";import{i as o}from"./index-2f22123e.js";const a=()=>{const{simulation:s,simulationHelpers:e}=o(r=>r);return{nodes:(s==null?void 0:s.nodes())||[],links:e.getLinks()}};export{a as u}; +import"./index-787c3ef8.js";import{i as o}from"./index-77dce891.js";const a=()=>{const{simulation:s,simulationHelpers:e}=o(r=>r);return{nodes:(s==null?void 0:s.nodes())||[],links:e.getLinks()}};export{a as u}; diff --git a/build/assets/index-761a8d1c.js b/build/assets/index-49d70c3e.js similarity index 97% rename from build/assets/index-761a8d1c.js rename to build/assets/index-49d70c3e.js index f43e215bd..34d8adc68 100644 --- a/build/assets/index-761a8d1c.js +++ b/build/assets/index-49d70c3e.js @@ -1,4 +1,4 @@ -import{r as c,x as ue,c as fe,j as e,s as m,a as b,F as C,T as O,u as D,d as te,y as he,N as U,z as xe,A as me,D as re,E as ge}from"./index-17ed06be.js";import{Universe as we}from"./index-edf7575c.js";import{b as se,c as L,d as ye,e as je,f as be,g as Ce,h as ve,i as _e,a as Ee}from"./index-2f22123e.js";import{S as Se,R as Te,s as J,M as Ie}from"./index-ed087dc3.js";import{u as H,a as oe,m as Re,T as ze,f as $e,H as Pe,C as Me}from"./index-6cd4b515.js";import{W as ke,L as Q,H as Ae,D as He,F as Le,V as $,S as We}from"./three.module-9c942ca6.js";import"./index-6f7e416d.js";import"./TextareaAutosize-f571cf36.js";import"./index-053bf7ca.js";import"./ClipLoader-96bb9f4d.js";import"./Skeleton-4c8a0434.js";import"./Stack-a8b59155.js";import"./isPlainObject-9d6a7051.js";import"./Typography-5718a5a5.js";import"./createSvgIcon-6ef3ed46.js";import"./index-432a2a9e.js";function Fe(t,r,s){const{gl:n,size:i,viewport:d}=H(),w=typeof t=="number"?t:i.width*d.dpr,l=typeof r=="number"?r:i.height*d.dpr,o=(typeof t=="number"?s:t)||{},{samples:a=0,depth:x,...f}=o,p=c.useMemo(()=>{let u;return u=new ke(w,l,{minFilter:Q,magFilter:Q,encoding:n.outputEncoding,type:Ae,...f}),x&&(u.depthTexture=new He(w,l,Le)),u.samples=a,u},[]);return c.useLayoutEffect(()=>{p.setSize(w,l),a&&(p.samples=a)},[a,p,w,l]),c.useEffect(()=>()=>p.dispose(),[]),p}const Be=t=>typeof t=="function",De=c.forwardRef(({envMap:t,resolution:r=256,frames:s=1/0,children:n,makeDefault:i,...d},w)=>{const l=H(({set:g})=>g),o=H(({camera:g})=>g),a=H(({size:g})=>g),x=c.useRef(null),f=c.useRef(null),p=Fe(r);c.useLayoutEffect(()=>{d.manual||x.current.updateProjectionMatrix()},[a,d]),c.useLayoutEffect(()=>{x.current.updateProjectionMatrix()}),c.useLayoutEffect(()=>{if(i){const g=o;return l(()=>({camera:x.current})),()=>l(()=>({camera:g}))}},[x,i,l]);let u=0,h=null;const j=Be(n);return oe(g=>{j&&(s===1/0||u({...Ne,setSelectedEpisodeId:r=>t({selectedEpisodeId:r}),setSelectedEpisodeLink:r=>t({selectedEpisodeLink:r}),setSelectedEpisode:r=>t({selectedEpisode:r})})),Ge=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 30 28",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M7.2998 2.55199C7.2998 1.51094 8.11675 0.666992 9.1245 0.666992H12.1299C13.1376 0.666992 13.9546 1.51094 13.9546 2.55199C13.9546 3.59305 13.1376 4.43699 12.1299 4.43699H9.1245C8.11675 4.43699 7.2998 3.59305 7.2998 2.55199Z",fill:"currentColor"}),e.jsx("path",{d:"M7.2998 25.449C7.2998 26.49 8.11675 27.334 9.1245 27.334H12.1299C13.1376 27.334 13.9546 26.49 13.9546 25.449C13.9546 24.4079 13.1376 23.564 12.1299 23.564H9.1245C8.11675 23.564 7.2998 24.4079 7.2998 25.449Z",fill:"currentColor"}),e.jsx("path",{d:"M2.79102 8.29613C2.79102 7.25508 3.60796 6.41113 4.61571 6.41113H12.1292C13.1369 6.41113 13.9539 7.25508 13.9539 8.29613C13.9539 9.33719 13.1369 10.1811 12.1292 10.1811H4.61571C3.60796 10.1811 2.79102 9.33719 2.79102 8.29613Z",fill:"currentColor"}),e.jsx("path",{d:"M2.79102 19.7039C2.79102 20.7449 3.60796 21.5889 4.61571 21.5889H12.1292C13.1369 21.5889 13.9539 20.7449 13.9539 19.7039C13.9539 18.6628 13.1369 17.8189 12.1292 17.8189H4.61571C3.60796 17.8189 2.79102 18.6628 2.79102 19.7039Z",fill:"currentColor"}),e.jsx("path",{d:"M0 14.094C0 13.0529 0.816945 12.209 1.8247 12.209H12.1289C13.1366 12.209 13.9536 13.0529 13.9536 14.094C13.9536 15.135 13.1366 15.979 12.1289 15.979H1.8247C0.816946 15.979 0 15.135 0 14.094Z",fill:"currentColor"}),e.jsx("path",{d:"M22.7002 25.448C22.7002 26.4891 21.8833 27.333 20.8755 27.333H17.8701C16.8624 27.333 16.0454 26.4891 16.0454 25.448C16.0454 24.407 16.8624 23.563 17.8701 23.563H20.8755C21.8832 23.563 22.7002 24.407 22.7002 25.448Z",fill:"currentColor"}),e.jsx("path",{d:"M22.7002 2.55199C22.7002 1.51094 21.8833 0.666992 20.8755 0.666992H17.8701C16.8624 0.666992 16.0454 1.51094 16.0454 2.55199C16.0454 3.59305 16.8624 4.43699 17.8701 4.43699H20.8755C21.8832 4.43699 22.7002 3.59305 22.7002 2.55199Z",fill:"currentColor"}),e.jsx("path",{d:"M27.209 19.7029C27.209 20.7439 26.392 21.5879 25.3843 21.5879H17.8708C16.8631 21.5879 16.0461 20.7439 16.0461 19.7029C16.0461 18.6618 16.8631 17.8179 17.8708 17.8179H25.3843C26.392 17.8179 27.209 18.6618 27.209 19.7029Z",fill:"currentColor"}),e.jsx("path",{d:"M27.209 8.29613C27.209 7.25508 26.392 6.41113 25.3843 6.41113H17.8708C16.8631 6.41113 16.0461 7.25508 16.0461 8.29613C16.0461 9.33719 16.8631 10.1811 17.8708 10.1811H25.3843C26.392 10.1811 27.209 9.33719 27.209 8.29613Z",fill:"currentColor"}),e.jsx("path",{d:"M30 14.093C30 13.052 29.1831 12.208 28.1753 12.208H17.8711C16.8634 12.208 16.0464 13.052 16.0464 14.093C16.0464 15.1341 16.8634 15.978 17.8711 15.978H28.1753C29.1831 15.978 30 15.1341 30 14.093Z",fill:"currentColor"})]}),Ze=()=>e.jsxs(Ve,{children:[e.jsx(Oe,{children:e.jsx(Ye,{children:e.jsx(Ge,{})})}),e.jsx(qe,{children:"Graph Mindset"})]}),Ve=m(C).attrs({align:"center",direction:"row",grow:1,justify:"flex-start"})` +import{r as c,x as ue,c as fe,j as e,s as m,a as b,F as C,T as O,u as D,d as te,y as he,N as U,z as xe,A as me,D as re,E as ge}from"./index-787c3ef8.js";import{Universe as we}from"./index-562bc714.js";import{b as se,c as L,d as ye,e as je,f as be,g as Ce,h as ve,i as _e,a as Ee}from"./index-77dce891.js";import{S as Se,R as Te,s as J,M as Ie}from"./index-d501a02f.js";import{u as H,a as oe,m as Re,T as ze,f as $e,H as Pe,C as Me}from"./index-64d5234f.js";import{W as ke,L as Q,H as Ae,D as He,F as Le,V as $,S as We}from"./three.module-9c942ca6.js";import"./index-94d47251.js";import"./TextareaAutosize-e216d6db.js";import"./index-2cd18ef8.js";import"./ClipLoader-0106d300.js";import"./Skeleton-fe703092.js";import"./Stack-b3992130.js";import"./isPlainObject-528c68e4.js";import"./Typography-02db806b.js";import"./createSvgIcon-fa140fa5.js";import"./index-90c40e8b.js";function Fe(t,r,s){const{gl:n,size:i,viewport:d}=H(),w=typeof t=="number"?t:i.width*d.dpr,l=typeof r=="number"?r:i.height*d.dpr,o=(typeof t=="number"?s:t)||{},{samples:a=0,depth:x,...f}=o,p=c.useMemo(()=>{let u;return u=new ke(w,l,{minFilter:Q,magFilter:Q,encoding:n.outputEncoding,type:Ae,...f}),x&&(u.depthTexture=new He(w,l,Le)),u.samples=a,u},[]);return c.useLayoutEffect(()=>{p.setSize(w,l),a&&(p.samples=a)},[a,p,w,l]),c.useEffect(()=>()=>p.dispose(),[]),p}const Be=t=>typeof t=="function",De=c.forwardRef(({envMap:t,resolution:r=256,frames:s=1/0,children:n,makeDefault:i,...d},w)=>{const l=H(({set:g})=>g),o=H(({camera:g})=>g),a=H(({size:g})=>g),x=c.useRef(null),f=c.useRef(null),p=Fe(r);c.useLayoutEffect(()=>{d.manual||x.current.updateProjectionMatrix()},[a,d]),c.useLayoutEffect(()=>{x.current.updateProjectionMatrix()}),c.useLayoutEffect(()=>{if(i){const g=o;return l(()=>({camera:x.current})),()=>l(()=>({camera:g}))}},[x,i,l]);let u=0,h=null;const j=Be(n);return oe(g=>{j&&(s===1/0||u({...Ne,setSelectedEpisodeId:r=>t({selectedEpisodeId:r}),setSelectedEpisodeLink:r=>t({selectedEpisodeLink:r}),setSelectedEpisode:r=>t({selectedEpisode:r})})),Ge=t=>e.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 30 28",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M7.2998 2.55199C7.2998 1.51094 8.11675 0.666992 9.1245 0.666992H12.1299C13.1376 0.666992 13.9546 1.51094 13.9546 2.55199C13.9546 3.59305 13.1376 4.43699 12.1299 4.43699H9.1245C8.11675 4.43699 7.2998 3.59305 7.2998 2.55199Z",fill:"currentColor"}),e.jsx("path",{d:"M7.2998 25.449C7.2998 26.49 8.11675 27.334 9.1245 27.334H12.1299C13.1376 27.334 13.9546 26.49 13.9546 25.449C13.9546 24.4079 13.1376 23.564 12.1299 23.564H9.1245C8.11675 23.564 7.2998 24.4079 7.2998 25.449Z",fill:"currentColor"}),e.jsx("path",{d:"M2.79102 8.29613C2.79102 7.25508 3.60796 6.41113 4.61571 6.41113H12.1292C13.1369 6.41113 13.9539 7.25508 13.9539 8.29613C13.9539 9.33719 13.1369 10.1811 12.1292 10.1811H4.61571C3.60796 10.1811 2.79102 9.33719 2.79102 8.29613Z",fill:"currentColor"}),e.jsx("path",{d:"M2.79102 19.7039C2.79102 20.7449 3.60796 21.5889 4.61571 21.5889H12.1292C13.1369 21.5889 13.9539 20.7449 13.9539 19.7039C13.9539 18.6628 13.1369 17.8189 12.1292 17.8189H4.61571C3.60796 17.8189 2.79102 18.6628 2.79102 19.7039Z",fill:"currentColor"}),e.jsx("path",{d:"M0 14.094C0 13.0529 0.816945 12.209 1.8247 12.209H12.1289C13.1366 12.209 13.9536 13.0529 13.9536 14.094C13.9536 15.135 13.1366 15.979 12.1289 15.979H1.8247C0.816946 15.979 0 15.135 0 14.094Z",fill:"currentColor"}),e.jsx("path",{d:"M22.7002 25.448C22.7002 26.4891 21.8833 27.333 20.8755 27.333H17.8701C16.8624 27.333 16.0454 26.4891 16.0454 25.448C16.0454 24.407 16.8624 23.563 17.8701 23.563H20.8755C21.8832 23.563 22.7002 24.407 22.7002 25.448Z",fill:"currentColor"}),e.jsx("path",{d:"M22.7002 2.55199C22.7002 1.51094 21.8833 0.666992 20.8755 0.666992H17.8701C16.8624 0.666992 16.0454 1.51094 16.0454 2.55199C16.0454 3.59305 16.8624 4.43699 17.8701 4.43699H20.8755C21.8832 4.43699 22.7002 3.59305 22.7002 2.55199Z",fill:"currentColor"}),e.jsx("path",{d:"M27.209 19.7029C27.209 20.7439 26.392 21.5879 25.3843 21.5879H17.8708C16.8631 21.5879 16.0461 20.7439 16.0461 19.7029C16.0461 18.6618 16.8631 17.8179 17.8708 17.8179H25.3843C26.392 17.8179 27.209 18.6618 27.209 19.7029Z",fill:"currentColor"}),e.jsx("path",{d:"M27.209 8.29613C27.209 7.25508 26.392 6.41113 25.3843 6.41113H17.8708C16.8631 6.41113 16.0461 7.25508 16.0461 8.29613C16.0461 9.33719 16.8631 10.1811 17.8708 10.1811H25.3843C26.392 10.1811 27.209 9.33719 27.209 8.29613Z",fill:"currentColor"}),e.jsx("path",{d:"M30 14.093C30 13.052 29.1831 12.208 28.1753 12.208H17.8711C16.8634 12.208 16.0464 13.052 16.0464 14.093C16.0464 15.1341 16.8634 15.978 17.8711 15.978H28.1753C29.1831 15.978 30 15.1341 30 14.093Z",fill:"currentColor"})]}),Ze=()=>e.jsxs(Ve,{children:[e.jsx(Oe,{children:e.jsx(Ye,{children:e.jsx(Ge,{})})}),e.jsx(qe,{children:"Graph Mindset"})]}),Ve=m(C).attrs({align:"center",direction:"row",grow:1,justify:"flex-start"})` height: 64px; box-sizing: border-box; padding: 20px 23px; diff --git a/build/assets/index-edf7575c.js b/build/assets/index-562bc714.js similarity index 59% rename from build/assets/index-edf7575c.js rename to build/assets/index-562bc714.js index aaab9e1a3..02e5e1e08 100644 --- a/build/assets/index-edf7575c.js +++ b/build/assets/index-562bc714.js @@ -1,62 +1,62 @@ -import{r as y,a1 as au,x as Ee,j as B,R as Xf,a8 as u_,J as I,a9 as h_,c as Zf,s as Ke,a as Ae,F as Qn,B as Kf,u as Os,b as Qf,k as mo,n as d_,d as cu,aa as Jf,A as ep,ab as f_,l as p_,e as No,D as m_,ac as g_,ad as __,i as y_,ae as v_,af as b_}from"./index-17ed06be.js";import{u as ze,a as Wt,m as ec,b as tc,e as lu,L as tp,c as x_,d as w_,q as k_,g as T_,h as E_,T as np,i as sp,H as go,t as rp,P as C_,f as S_,j as O_,C as A_,k as P_,l as R_}from"./index-6cd4b515.js";import{P as ke}from"./index-6f7e416d.js";import{m as Ph,H as D_,E as M_,n as Jn,i as mt,o as uu,p as hu,g as Rh,b as I_,D as N_,I as $_,q as F_,r as L_,s as j_,t as V_,v as z_,w as Dh,x as U_,y as B_,R as W_,h as q_,z as H_,N as Y_,P as G_,O as X_}from"./index-2f22123e.js";import{T as Z_}from"./TextareaAutosize-f571cf36.js";import{a as $o,b as K_,V as ae,c as Q_,d as J_,M as ur,e as we,f as ey,B as ty,S as ip,P as Mc,g as ny,h as ia,i as Ds,T as nc,j as hl,k as sy,l as Mh,m as _o,Q as ry,G as iy,C as du,n as oy,o as op,p as ay,q as cy,r as ly,E as uy,s as hy,t as dy,u as sc,v as fy,w as Ih,x as py}from"./three.module-9c942ca6.js";import{u as my}from"./index-053bf7ca.js";import{C as gy}from"./ClipLoader-96bb9f4d.js";const _y=["top","right","bottom","left"],_s=Math.min,Ft=Math.max,da=Math.round,Fo=Math.floor,ys=n=>({x:n,y:n}),yy={left:"right",right:"left",bottom:"top",top:"bottom"},vy={start:"end",end:"start"};function dl(n,e,t){return Ft(n,_s(e,t))}function Wn(n,e){return typeof n=="function"?n(e):n}function qn(n){return n.split("-")[0]}function Zr(n){return n.split("-")[1]}function fu(n){return n==="x"?"y":"x"}function pu(n){return n==="y"?"height":"width"}function Kr(n){return["top","bottom"].includes(qn(n))?"y":"x"}function mu(n){return fu(Kr(n))}function by(n,e,t){t===void 0&&(t=!1);const s=Zr(n),r=mu(n),i=pu(r);let o=r==="x"?s===(t?"end":"start")?"right":"left":s==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=fa(o)),[o,fa(o)]}function xy(n){const e=fa(n);return[fl(n),e,fl(e)]}function fl(n){return n.replace(/start|end/g,e=>vy[e])}function wy(n,e,t){const s=["left","right"],r=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(n){case"top":case"bottom":return t?e?r:s:e?s:r;case"left":case"right":return e?i:o;default:return[]}}function ky(n,e,t,s){const r=Zr(n);let i=wy(qn(n),t==="start",s);return r&&(i=i.map(o=>o+"-"+r),e&&(i=i.concat(i.map(fl)))),i}function fa(n){return n.replace(/left|right|bottom|top/g,e=>yy[e])}function Ty(n){return{top:0,right:0,bottom:0,left:0,...n}}function ap(n){return typeof n!="number"?Ty(n):{top:n,right:n,bottom:n,left:n}}function pa(n){return{...n,top:n.y,left:n.x,right:n.x+n.width,bottom:n.y+n.height}}function Nh(n,e,t){let{reference:s,floating:r}=n;const i=Kr(e),o=mu(e),a=pu(o),c=qn(e),l=i==="y",u=s.x+s.width/2-r.width/2,h=s.y+s.height/2-r.height/2,d=s[a]/2-r[a]/2;let f;switch(c){case"top":f={x:u,y:s.y-r.height};break;case"bottom":f={x:u,y:s.y+s.height};break;case"right":f={x:s.x+s.width,y:h};break;case"left":f={x:s.x-r.width,y:h};break;default:f={x:s.x,y:s.y}}switch(Zr(e)){case"start":f[o]-=d*(t&&l?-1:1);break;case"end":f[o]+=d*(t&&l?-1:1);break}return f}const Ey=async(n,e,t)=>{const{placement:s="bottom",strategy:r="absolute",middleware:i=[],platform:o}=t,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:n,floating:e,strategy:r}),{x:u,y:h}=Nh(l,s,c),d=s,f={},m=0;for(let p=0;p({name:"arrow",options:n,async fn(e){const{x:t,y:s,placement:r,rects:i,platform:o,elements:a,middlewareData:c}=e,{element:l,padding:u=0}=Wn(n,e)||{};if(l==null)return{};const h=ap(u),d={x:t,y:s},f=mu(r),m=pu(f),p=await o.getDimensions(l),g=f==="y",_=g?"top":"left",x=g?"bottom":"right",k=g?"clientHeight":"clientWidth",v=i.reference[m]+i.reference[f]-d[f]-i.floating[m],b=d[f]-i.reference[f],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let E=T?T[k]:0;(!E||!await(o.isElement==null?void 0:o.isElement(T)))&&(E=a.floating[k]||i.floating[m]);const w=v/2-b/2,C=E/2-p[m]/2-1,S=_s(h[_],C),R=_s(h[x],C),O=S,L=E-p[m]-R,j=E/2-p[m]/2+w,q=dl(O,j,L),z=!c.arrow&&Zr(r)!=null&&j!=q&&i.reference[m]/2-(jO<=0)){var C,S;const O=(((C=i.flip)==null?void 0:C.index)||0)+1,L=b[O];if(L)return{data:{index:O,overflows:w},reset:{placement:L}};let j=(S=w.filter(q=>q.overflows[0]<=0).sort((q,z)=>q.overflows[1]-z.overflows[1])[0])==null?void 0:S.placement;if(!j)switch(f){case"bestFit":{var R;const q=(R=w.map(z=>[z.placement,z.overflows.filter(V=>V>0).reduce((V,U)=>V+U,0)]).sort((z,V)=>z[1]-V[1])[0])==null?void 0:R[0];q&&(j=q);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function Fh(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function Lh(n){return _y.some(e=>n[e]>=0)}const Sy=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:t}=e,{strategy:s="referenceHidden",...r}=Wn(n,e);switch(s){case"referenceHidden":{const i=await Fi(e,{...r,elementContext:"reference"}),o=Fh(i,t.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Lh(o)}}}case"escaped":{const i=await Fi(e,{...r,altBoundary:!0}),o=Fh(i,t.floating);return{data:{escapedOffsets:o,escaped:Lh(o)}}}default:return{}}}}};async function Oy(n,e){const{placement:t,platform:s,elements:r}=n,i=await(s.isRTL==null?void 0:s.isRTL(r.floating)),o=qn(t),a=Zr(t),c=Kr(t)==="y",l=["left","top"].includes(o)?-1:1,u=i&&c?-1:1,h=Wn(e,n);let{mainAxis:d,crossAxis:f,alignmentAxis:m}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return a&&typeof m=="number"&&(f=a==="end"?m*-1:m),c?{x:f*u,y:d*l}:{x:d*l,y:f*u}}const Ay=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,s;const{x:r,y:i,placement:o,middlewareData:a}=e,c=await Oy(e,n);return o===((t=a.offset)==null?void 0:t.placement)&&(s=a.arrow)!=null&&s.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:o}}}}},Py=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:t,y:s,placement:r}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:_,y:x}=g;return{x:_,y:x}}},...c}=Wn(n,e),l={x:t,y:s},u=await Fi(e,c),h=Kr(qn(r)),d=fu(h);let f=l[d],m=l[h];if(i){const g=d==="y"?"top":"left",_=d==="y"?"bottom":"right",x=f+u[g],k=f-u[_];f=dl(x,f,k)}if(o){const g=h==="y"?"top":"left",_=h==="y"?"bottom":"right",x=m+u[g],k=m-u[_];m=dl(x,m,k)}const p=a.fn({...e,[d]:f,[h]:m});return{...p,data:{x:p.x-t,y:p.y-s}}}}},Ry=function(n){return n===void 0&&(n={}),{options:n,fn(e){const{x:t,y:s,placement:r,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Wn(n,e),u={x:t,y:s},h=Kr(r),d=fu(h);let f=u[d],m=u[h];const p=Wn(a,e),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const k=d==="y"?"height":"width",v=i.reference[d]-i.floating[k]+g.mainAxis,b=i.reference[d]+i.reference[k]-g.mainAxis;fb&&(f=b)}if(l){var _,x;const k=d==="y"?"width":"height",v=["top","left"].includes(qn(r)),b=i.reference[h]-i.floating[k]+(v&&((_=o.offset)==null?void 0:_[h])||0)+(v?0:g.crossAxis),T=i.reference[h]+i.reference[k]+(v?0:((x=o.offset)==null?void 0:x[h])||0)-(v?g.crossAxis:0);mT&&(m=T)}return{[d]:f,[h]:m}}}},Dy=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){const{placement:t,rects:s,platform:r,elements:i}=e,{apply:o=()=>{},...a}=Wn(n,e),c=await Fi(e,a),l=qn(t),u=Zr(t),h=Kr(t)==="y",{width:d,height:f}=s.floating;let m,p;l==="top"||l==="bottom"?(m=l,p=u===(await(r.isRTL==null?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(p=l,m=u==="end"?"top":"bottom");const g=f-c[m],_=d-c[p],x=!e.middlewareData.shift;let k=g,v=_;if(h){const T=d-c.left-c.right;v=u||x?_s(_,T):T}else{const T=f-c.top-c.bottom;k=u||x?_s(g,T):T}if(x&&!u){const T=Ft(c.left,0),E=Ft(c.right,0),w=Ft(c.top,0),C=Ft(c.bottom,0);h?v=d-2*(T!==0||E!==0?T+E:Ft(c.left,c.right)):k=f-2*(w!==0||C!==0?w+C:Ft(c.top,c.bottom))}await o({...e,availableWidth:v,availableHeight:k});const b=await r.getDimensions(i.floating);return d!==b.width||f!==b.height?{reset:{rects:!0}}:{}}}};function vs(n){return cp(n)?(n.nodeName||"").toLowerCase():"#document"}function Vt(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function es(n){var e;return(e=(cp(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function cp(n){return n instanceof Node||n instanceof Vt(n).Node}function Hn(n){return n instanceof Element||n instanceof Vt(n).Element}function En(n){return n instanceof HTMLElement||n instanceof Vt(n).HTMLElement}function jh(n){return typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Vt(n).ShadowRoot}function yo(n){const{overflow:e,overflowX:t,overflowY:s,display:r}=Qt(n);return/auto|scroll|overlay|hidden|clip/.test(e+s+t)&&!["inline","contents"].includes(r)}function My(n){return["table","td","th"].includes(vs(n))}function gu(n){const e=_u(),t=Qt(n);return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(s=>(t.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(t.contain||"").includes(s))}function Iy(n){let e=Nr(n);for(;En(e)&&!rc(e);){if(gu(e))return e;e=Nr(e)}return null}function _u(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function rc(n){return["html","body","#document"].includes(vs(n))}function Qt(n){return Vt(n).getComputedStyle(n)}function ic(n){return Hn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function Nr(n){if(vs(n)==="html")return n;const e=n.assignedSlot||n.parentNode||jh(n)&&n.host||es(n);return jh(e)?e.host:e}function lp(n){const e=Nr(n);return rc(e)?n.ownerDocument?n.ownerDocument.body:n.body:En(e)&&yo(e)?e:lp(e)}function Li(n,e,t){var s;e===void 0&&(e=[]),t===void 0&&(t=!0);const r=lp(n),i=r===((s=n.ownerDocument)==null?void 0:s.body),o=Vt(r);return i?e.concat(o,o.visualViewport||[],yo(r)?r:[],o.frameElement&&t?Li(o.frameElement):[]):e.concat(r,Li(r,[],t))}function up(n){const e=Qt(n);let t=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const r=En(n),i=r?n.offsetWidth:t,o=r?n.offsetHeight:s,a=da(t)!==i||da(s)!==o;return a&&(t=i,s=o),{width:t,height:s,$:a}}function yu(n){return Hn(n)?n:n.contextElement}function Sr(n){const e=yu(n);if(!En(e))return ys(1);const t=e.getBoundingClientRect(),{width:s,height:r,$:i}=up(e);let o=(i?da(t.width):t.width)/s,a=(i?da(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const Ny=ys(0);function hp(n){const e=Vt(n);return!_u()||!e.visualViewport?Ny:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function $y(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==Vt(n)?!1:e}function Xs(n,e,t,s){e===void 0&&(e=!1),t===void 0&&(t=!1);const r=n.getBoundingClientRect(),i=yu(n);let o=ys(1);e&&(s?Hn(s)&&(o=Sr(s)):o=Sr(n));const a=$y(i,t,s)?hp(i):ys(0);let c=(r.left+a.x)/o.x,l=(r.top+a.y)/o.y,u=r.width/o.x,h=r.height/o.y;if(i){const d=Vt(i),f=s&&Hn(s)?Vt(s):s;let m=d.frameElement;for(;m&&s&&f!==d;){const p=Sr(m),g=m.getBoundingClientRect(),_=Qt(m),x=g.left+(m.clientLeft+parseFloat(_.paddingLeft))*p.x,k=g.top+(m.clientTop+parseFloat(_.paddingTop))*p.y;c*=p.x,l*=p.y,u*=p.x,h*=p.y,c+=x,l+=k,m=Vt(m).frameElement}}return pa({width:u,height:h,x:c,y:l})}function Fy(n){let{rect:e,offsetParent:t,strategy:s}=n;const r=En(t),i=es(t);if(t===i)return e;let o={scrollLeft:0,scrollTop:0},a=ys(1);const c=ys(0);if((r||!r&&s!=="fixed")&&((vs(t)!=="body"||yo(i))&&(o=ic(t)),En(t))){const l=Xs(t);a=Sr(t),c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+c.x,y:e.y*a.y-o.scrollTop*a.y+c.y}}function Ly(n){return Array.from(n.getClientRects())}function dp(n){return Xs(es(n)).left+ic(n).scrollLeft}function jy(n){const e=es(n),t=ic(n),s=n.ownerDocument.body,r=Ft(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),i=Ft(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let o=-t.scrollLeft+dp(n);const a=-t.scrollTop;return Qt(s).direction==="rtl"&&(o+=Ft(e.clientWidth,s.clientWidth)-r),{width:r,height:i,x:o,y:a}}function Vy(n,e){const t=Vt(n),s=es(n),r=t.visualViewport;let i=s.clientWidth,o=s.clientHeight,a=0,c=0;if(r){i=r.width,o=r.height;const l=_u();(!l||l&&e==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:o,x:a,y:c}}function zy(n,e){const t=Xs(n,!0,e==="fixed"),s=t.top+n.clientTop,r=t.left+n.clientLeft,i=En(n)?Sr(n):ys(1),o=n.clientWidth*i.x,a=n.clientHeight*i.y,c=r*i.x,l=s*i.y;return{width:o,height:a,x:c,y:l}}function Vh(n,e,t){let s;if(e==="viewport")s=Vy(n,t);else if(e==="document")s=jy(es(n));else if(Hn(e))s=zy(e,t);else{const r=hp(n);s={...e,x:e.x-r.x,y:e.y-r.y}}return pa(s)}function fp(n,e){const t=Nr(n);return t===e||!Hn(t)||rc(t)?!1:Qt(t).position==="fixed"||fp(t,e)}function Uy(n,e){const t=e.get(n);if(t)return t;let s=Li(n,[],!1).filter(a=>Hn(a)&&vs(a)!=="body"),r=null;const i=Qt(n).position==="fixed";let o=i?Nr(n):n;for(;Hn(o)&&!rc(o);){const a=Qt(o),c=gu(o);!c&&a.position==="fixed"&&(r=null),(i?!c&&!r:!c&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||yo(o)&&!c&&fp(n,o))?s=s.filter(u=>u!==o):r=a,o=Nr(o)}return e.set(n,s),s}function By(n){let{element:e,boundary:t,rootBoundary:s,strategy:r}=n;const o=[...t==="clippingAncestors"?Uy(e,this._c):[].concat(t),s],a=o[0],c=o.reduce((l,u)=>{const h=Vh(e,u,r);return l.top=Ft(h.top,l.top),l.right=_s(h.right,l.right),l.bottom=_s(h.bottom,l.bottom),l.left=Ft(h.left,l.left),l},Vh(e,a,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Wy(n){return up(n)}function qy(n,e,t){const s=En(e),r=es(e),i=t==="fixed",o=Xs(n,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=ys(0);if(s||!s&&!i)if((vs(e)!=="body"||yo(r))&&(a=ic(e)),s){const l=Xs(e,!0,i,e);c.x=l.x+e.clientLeft,c.y=l.y+e.clientTop}else r&&(c.x=dp(r));return{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function zh(n,e){return!En(n)||Qt(n).position==="fixed"?null:e?e(n):n.offsetParent}function pp(n,e){const t=Vt(n);if(!En(n))return t;let s=zh(n,e);for(;s&&My(s)&&Qt(s).position==="static";)s=zh(s,e);return s&&(vs(s)==="html"||vs(s)==="body"&&Qt(s).position==="static"&&!gu(s))?t:s||Iy(n)||t}const Hy=async function(n){let{reference:e,floating:t,strategy:s}=n;const r=this.getOffsetParent||pp,i=this.getDimensions;return{reference:qy(e,await r(t),s),floating:{x:0,y:0,...await i(t)}}};function Yy(n){return Qt(n).direction==="rtl"}const Gy={convertOffsetParentRelativeRectToViewportRelativeRect:Fy,getDocumentElement:es,getClippingRect:By,getOffsetParent:pp,getElementRects:Hy,getClientRects:Ly,getDimensions:Wy,getScale:Sr,isElement:Hn,isRTL:Yy};function Xy(n,e){let t=null,s;const r=es(n);function i(){clearTimeout(s),t&&t.disconnect(),t=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:h,height:d}=n.getBoundingClientRect();if(a||e(),!h||!d)return;const f=Fo(u),m=Fo(r.clientWidth-(l+h)),p=Fo(r.clientHeight-(u+d)),g=Fo(l),x={rootMargin:-f+"px "+-m+"px "+-p+"px "+-g+"px",threshold:Ft(0,_s(1,c))||1};let k=!0;function v(b){const T=b[0].intersectionRatio;if(T!==c){if(!k)return o();T?o(!1,T):s=setTimeout(()=>{o(!1,1e-7)},100)}k=!1}try{t=new IntersectionObserver(v,{...x,root:r.ownerDocument})}catch{t=new IntersectionObserver(v,x)}t.observe(n)}return o(!0),i}function Zy(n,e,t,s){s===void 0&&(s={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=s,l=yu(n),u=r||i?[...l?Li(l):[],...Li(e)]:[];u.forEach(_=>{r&&_.addEventListener("scroll",t,{passive:!0}),i&&_.addEventListener("resize",t)});const h=l&&a?Xy(l,t):null;let d=-1,f=null;o&&(f=new ResizeObserver(_=>{let[x]=_;x&&x.target===l&&f&&(f.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{f&&f.observe(e)})),t()}),l&&!c&&f.observe(l),f.observe(e));let m,p=c?Xs(n):null;c&&g();function g(){const _=Xs(n);p&&(_.x!==p.x||_.y!==p.y||_.width!==p.width||_.height!==p.height)&&t(),p=_,m=requestAnimationFrame(g)}return t(),()=>{u.forEach(_=>{r&&_.removeEventListener("scroll",t),i&&_.removeEventListener("resize",t)}),h&&h(),f&&f.disconnect(),f=null,c&&cancelAnimationFrame(m)}}const Ky=(n,e,t)=>{const s=new Map,r={platform:Gy,...t},i={...r.platform,_c:s};return Ey(n,e,{...r,platform:i})},Qy=n=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:s,padding:r}=typeof n=="function"?n(t):n;return s&&e(s)?s.current!=null?$h({element:s.current,padding:r}).fn(t):{}:s?$h({element:s,padding:r}).fn(t):{}}}};var oa=typeof document<"u"?y.useLayoutEffect:y.useEffect;function ma(n,e){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(typeof n=="function"&&n.toString()===e.toString())return!0;let t,s,r;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!=e.length)return!1;for(s=t;s--!==0;)if(!ma(n[s],e[s]))return!1;return!0}if(r=Object.keys(n),t=r.length,t!==Object.keys(e).length)return!1;for(s=t;s--!==0;)if(!{}.hasOwnProperty.call(e,r[s]))return!1;for(s=t;s--!==0;){const i=r[s];if(!(i==="_owner"&&n.$$typeof)&&!ma(n[i],e[i]))return!1}return!0}return n!==n&&e!==e}function mp(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Uh(n,e){const t=mp(n);return Math.round(e*t)/t}function Bh(n){const e=y.useRef(n);return oa(()=>{e.current=n}),e}function Jy(n){n===void 0&&(n={});const{placement:e="bottom",strategy:t="absolute",middleware:s=[],platform:r,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=n,[u,h]=y.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[d,f]=y.useState(s);ma(d,s)||f(s);const[m,p]=y.useState(null),[g,_]=y.useState(null),x=y.useCallback(z=>{z!=T.current&&(T.current=z,p(z))},[p]),k=y.useCallback(z=>{z!==E.current&&(E.current=z,_(z))},[_]),v=i||m,b=o||g,T=y.useRef(null),E=y.useRef(null),w=y.useRef(u),C=Bh(c),S=Bh(r),R=y.useCallback(()=>{if(!T.current||!E.current)return;const z={placement:e,strategy:t,middleware:d};S.current&&(z.platform=S.current),Ky(T.current,E.current,z).then(V=>{const U={...V,isPositioned:!0};O.current&&!ma(w.current,U)&&(w.current=U,au.flushSync(()=>{h(U)}))})},[d,e,t,S]);oa(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,h(z=>({...z,isPositioned:!1})))},[l]);const O=y.useRef(!1);oa(()=>(O.current=!0,()=>{O.current=!1}),[]),oa(()=>{if(v&&(T.current=v),b&&(E.current=b),v&&b){if(C.current)return C.current(v,b,R);R()}},[v,b,R,C]);const L=y.useMemo(()=>({reference:T,floating:E,setReference:x,setFloating:k}),[x,k]),j=y.useMemo(()=>({reference:v,floating:b}),[v,b]),q=y.useMemo(()=>{const z={position:t,left:0,top:0};if(!j.floating)return z;const V=Uh(j.floating,u.x),U=Uh(j.floating,u.y);return a?{...z,transform:"translate("+V+"px, "+U+"px)",...mp(j.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:V,top:U}},[t,a,j.floating,u.x,u.y]);return y.useMemo(()=>({...u,update:R,refs:L,elements:j,floatingStyles:q}),[u,R,L,j,q])}function e1(n){let e;const t=new Set,s=(l,u)=>{const h=typeof l=="function"?l(e):l;if(h!==e){const d=e;e=u?h:Object.assign({},e,h),t.forEach(f=>f(e,d))}},r=()=>e,i=(l,u=r,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let d=u(e);function f(){const m=u(e);if(!h(d,m)){const p=d;l(d=m,p)}}return t.add(f),()=>t.delete(f)},c={setState:s,getState:r,subscribe:(l,u,h)=>u||h?i(l,u,h):(t.add(l),()=>t.delete(l)),destroy:()=>t.clear()};return e=n(s,r,c),c}const t1=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Wh=t1?y.useEffect:y.useLayoutEffect;function n1(n){const e=typeof n=="function"?e1(n):n,t=(s=e.getState,r=Object.is)=>{const[,i]=y.useReducer(g=>g+1,0),o=e.getState(),a=y.useRef(o),c=y.useRef(s),l=y.useRef(r),u=y.useRef(!1),h=y.useRef();h.current===void 0&&(h.current=s(o));let d,f=!1;(a.current!==o||c.current!==s||l.current!==r||u.current)&&(d=s(o),f=!r(h.current,d)),Wh(()=>{f&&(h.current=d),a.current=o,c.current=s,l.current=r,u.current=!1});const m=y.useRef(o);Wh(()=>{const g=()=>{try{const x=e.getState(),k=c.current(x);l.current(h.current,k)||(a.current=x,h.current=k,i())}catch{u.current=!0,i()}},_=e.subscribe(g);return e.getState()!==m.current&&g(),_},[]);const p=f?d:h.current;return y.useDebugValue(p),p};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const s=[t,e];return{next(){const r=s.length<=0;return{value:s.shift(),done:r}}}},t}let ai=0;const s1=n1(n=>($o.onStart=(e,t,s)=>{n({active:!0,item:e,loaded:t,total:s,progress:(t-ai)/(s-ai)*100})},$o.onLoad=()=>{n({active:!1})},$o.onError=e=>n(t=>({errors:[...t.errors,e]})),$o.onProgress=(e,t,s)=>{t===s&&(ai=s),n({active:!0,item:e,loaded:t,total:s,progress:(t-ai)/(s-ai)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0})),r1=n=>`Loading ${n.toFixed(2)}%`;function i1({containerStyles:n,innerStyles:e,barStyles:t,dataStyles:s,dataInterpolation:r=r1,initialState:i=o=>o}){const{active:o,progress:a}=s1(),c=y.useRef(0),l=y.useRef(0),u=y.useRef(null),[h,d]=y.useState(i(o));y.useEffect(()=>{let m;return o!==h&&(m=setTimeout(()=>d(o),300)),()=>clearTimeout(m)},[h,o]);const f=y.useCallback(()=>{u.current&&(c.current+=(a-c.current)/2,(c.current>.95*a||a===100)&&(c.current=a),u.current.innerText=r(c.current),c.current(f(),()=>cancelAnimationFrame(l.current)),[f]),h?y.createElement("div",{style:{...Lo.container,opacity:o?1:0,...n}},y.createElement("div",null,y.createElement("div",{style:{...Lo.inner,...e}},y.createElement("div",{style:{...Lo.bar,transform:`scaleX(${a/100})`,...t}}),y.createElement("span",{ref:u,style:{...Lo.data,...s}})))):null}const Lo={container:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"#171717",display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity 300ms ease",zIndex:1e3},inner:{width:100,height:3,background:"#272727",textAlign:"center"},bar:{height:3,width:"100%",background:"white",transition:"transform 200ms",transformOrigin:"left center"},data:{display:"inline-block",position:"relative",fontVariantNumeric:"tabular-nums",marginTop:"0.8em",color:"#f0f0f0",fontSize:"0.6em",fontFamily:'-apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, Roboto, Ubuntu, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',whiteSpace:"nowrap"}},Ic=new K_,Nc=new ae,hr=new ae,nn=new ae,Dn=new ae,_n=new ae,Mn=new ae,In=new ae,ci=new ae,li=new ae,ui=new ae,jo=new ae,hi=new ae,di=new ae,fi=new ae;class o1{constructor(e,t,s){this.camera=e,this.scene=t,this.startPoint=new ae,this.endPoint=new ae,this.collection=[],this.deep=s||Number.MAX_VALUE}select(e,t){return this.startPoint=e||this.startPoint,this.endPoint=t||this.endPoint,this.collection=[],this.updateFrustum(this.startPoint,this.endPoint),this.searchChildInFrustum(Ic,this.scene),this.collection}updateFrustum(e,t){if(e=e||this.startPoint,t=t||this.endPoint,e.x===t.x&&(t.x+=Number.EPSILON),e.y===t.y&&(t.y+=Number.EPSILON),this.camera.updateProjectionMatrix(),this.camera.updateMatrixWorld(),this.camera.isPerspectiveCamera){hr.copy(e),hr.x=Math.min(e.x,t.x),hr.y=Math.max(e.y,t.y),t.x=Math.max(e.x,t.x),t.y=Math.min(e.y,t.y),nn.setFromMatrixPosition(this.camera.matrixWorld),Dn.copy(hr),_n.set(t.x,hr.y,0),Mn.copy(t),In.set(hr.x,t.y,0),Dn.unproject(this.camera),_n.unproject(this.camera),Mn.unproject(this.camera),In.unproject(this.camera),hi.copy(Dn).sub(nn),di.copy(_n).sub(nn),fi.copy(Mn).sub(nn),hi.normalize(),di.normalize(),fi.normalize(),hi.multiplyScalar(this.deep),di.multiplyScalar(this.deep),fi.multiplyScalar(this.deep),hi.add(nn),di.add(nn),fi.add(nn);var s=Ic.planes;s[0].setFromCoplanarPoints(nn,Dn,_n),s[1].setFromCoplanarPoints(nn,_n,Mn),s[2].setFromCoplanarPoints(Mn,In,nn),s[3].setFromCoplanarPoints(In,Dn,nn),s[4].setFromCoplanarPoints(_n,Mn,In),s[5].setFromCoplanarPoints(fi,di,hi),s[5].normal.multiplyScalar(-1)}else if(this.camera.isOrthographicCamera){const r=Math.min(e.x,t.x),i=Math.max(e.y,t.y),o=Math.max(e.x,t.x),a=Math.min(e.y,t.y);Dn.set(r,i,-1),_n.set(o,i,-1),Mn.set(o,a,-1),In.set(r,a,-1),ci.set(r,i,1),li.set(o,i,1),ui.set(o,a,1),jo.set(r,a,1),Dn.unproject(this.camera),_n.unproject(this.camera),Mn.unproject(this.camera),In.unproject(this.camera),ci.unproject(this.camera),li.unproject(this.camera),ui.unproject(this.camera),jo.unproject(this.camera);var s=Ic.planes;s[0].setFromCoplanarPoints(Dn,ci,li),s[1].setFromCoplanarPoints(_n,li,ui),s[2].setFromCoplanarPoints(ui,jo,In),s[3].setFromCoplanarPoints(jo,ci,Dn),s[4].setFromCoplanarPoints(_n,Mn,In),s[5].setFromCoplanarPoints(ui,li,ci),s[5].normal.multiplyScalar(-1)}else console.error("THREE.SelectionBox: Unsupported camera type.")}searchChildInFrustum(e,t){if((t.isMesh||t.isLine||t.isPoints)&&t.material!==void 0&&(t.geometry.boundingSphere===null&&t.geometry.computeBoundingSphere(),Nc.copy(t.geometry.boundingSphere.center),Nc.applyMatrix4(t.matrixWorld),e.containsPoint(Nc)&&this.collection.push(t)),t.children.length>0)for(let s=0;s0?X.copy(O[O.length-1]):X.identity())}function r($){const F=new Ds,A=new we,M=new we,Y=new we;let N=!0,W=!1;const re=$.getAttribute("d").match(/[a-df-z][^a-df-z]*/gi);for(let ie=0,ne=re.length;ie0&&(A.copy(Y),F.currentPath.currentPoint.copy(A),N=!0);break;default:console.warn(ge)}W=!1}return F}function i($){if(!(!$.sheet||!$.sheet.cssRules||!$.sheet.cssRules.length))for(let F=0;F<$.sheet.cssRules.length;F++){const A=$.sheet.cssRules[F];if(A.type!==1)continue;const M=A.selectorText.split(/,/gm).filter(Boolean).map(Y=>Y.trim());for(let Y=0;Y1){const is=Math.sqrt(J);F=is*F,A=is*A,te=F*F,H=A*A}const se=te*P+H*D,le=(te*H-se)/se;let ye=Math.sqrt(Math.max(0,le));Y===N&&(ye=-ye);const Qe=ye*F*ge/A,ee=-ye*A*ne/F,fe=Math.cos(M)*Qe-Math.sin(M)*ee+(W.x+oe.x)/2,Je=Math.sin(M)*Qe+Math.cos(M)*ee+(W.y+oe.y)/2,it=a(1,0,(ne-Qe)/F,(ge-ee)/A),Nt=a((ne-Qe)/F,(ge-ee)/A,(-ne-Qe)/F,(-ge-ee)/A)%(Math.PI*2);$.currentPath.absellipse(fe,Je,F,A,it,it+Nt,N===0,M)}function a($,F,A,M){const Y=$*A+F*M,N=Math.sqrt($*$+F*F)*Math.sqrt(A*A+M*M);let W=Math.acos(Math.max(-1,Math.min(1,Y/N)));return $*M-F*A<0&&(W=-W),W}function c($){const F=k($.getAttribute("x")||0),A=k($.getAttribute("y")||0),M=k($.getAttribute("rx")||$.getAttribute("ry")||0),Y=k($.getAttribute("ry")||$.getAttribute("rx")||0),N=k($.getAttribute("width")),W=k($.getAttribute("height")),oe=1-.551915024494,re=new Ds;return re.moveTo(F+M,A),re.lineTo(F+N-M,A),(M!==0||Y!==0)&&re.bezierCurveTo(F+N-M*oe,A,F+N,A+Y*oe,F+N,A+Y),re.lineTo(F+N,A+W-Y),(M!==0||Y!==0)&&re.bezierCurveTo(F+N,A+W-Y*oe,F+N-M*oe,A+W,F+N-M,A+W),re.lineTo(F+M,A+W),(M!==0||Y!==0)&&re.bezierCurveTo(F+M*oe,A+W,F,A+W-Y*oe,F,A+W-Y),re.lineTo(F,A+Y),(M!==0||Y!==0)&&re.bezierCurveTo(F,A+Y*oe,F+M*oe,A,F+M,A),re}function l($){function F(N,W,oe){const re=k(W),ie=k(oe);Y===0?M.moveTo(re,ie):M.lineTo(re,ie),Y++}const A=/(-?[\d\.?]+)[,|\s](-?[\d\.?]+)/g,M=new Ds;let Y=0;return $.getAttribute("points").replace(A,F),M.currentPath.autoClose=!0,M}function u($){function F(N,W,oe){const re=k(W),ie=k(oe);Y===0?M.moveTo(re,ie):M.lineTo(re,ie),Y++}const A=/(-?[\d\.?]+)[,|\s](-?[\d\.?]+)/g,M=new Ds;let Y=0;return $.getAttribute("points").replace(A,F),M.currentPath.autoClose=!1,M}function h($){const F=k($.getAttribute("cx")||0),A=k($.getAttribute("cy")||0),M=k($.getAttribute("r")||0),Y=new Mc;Y.absarc(F,A,M,0,Math.PI*2);const N=new Ds;return N.subPaths.push(Y),N}function d($){const F=k($.getAttribute("cx")||0),A=k($.getAttribute("cy")||0),M=k($.getAttribute("rx")||0),Y=k($.getAttribute("ry")||0),N=new Mc;N.absellipse(F,A,M,Y,0,Math.PI*2);const W=new Ds;return W.subPaths.push(N),W}function f($){const F=k($.getAttribute("x1")||0),A=k($.getAttribute("y1")||0),M=k($.getAttribute("x2")||0),Y=k($.getAttribute("y2")||0),N=new Ds;return N.moveTo(F,A),N.lineTo(M,Y),N.currentPath.autoClose=!1,N}function m($,F){F=Object.assign({},F);let A={};if($.hasAttribute("class")){const W=$.getAttribute("class").split(/\s/).filter(Boolean).map(oe=>oe.trim());for(let oe=0;oe0&&F.premultiply(O[O.length-1]),X.copy(F),O.push(F),F}function b($){const F=new ur,A=L;if($.nodeName==="use"&&($.hasAttribute("x")||$.hasAttribute("y"))){const M=k($.getAttribute("x")),Y=k($.getAttribute("y"));F.translate(M,Y)}if($.hasAttribute("transform")){const M=$.getAttribute("transform").split(")");for(let Y=M.length-1;Y>=0;Y--){const N=M[Y].trim();if(N==="")continue;const W=N.indexOf("("),oe=N.length;if(W>0&&W=1){const ne=ie[0];let ge=ne;ie.length>=2&&(ge=ie[1]),A.translate(ne,ge)}break;case"rotate":if(ie.length>=1){let ne=0,ge=0,te=0;ne=-ie[0]*Math.PI/180,ie.length>=3&&(ge=ie[1],te=ie[2]),j.identity().translate(-ge,-te),q.identity().rotate(ne),z.multiplyMatrices(q,j),j.identity().translate(ge,te),A.multiplyMatrices(j,z)}break;case"scale":if(ie.length>=1){const ne=ie[0];let ge=ne;ie.length>=2&&(ge=ie[1]),A.scale(ne,ge)}break;case"skewX":ie.length===1&&A.set(1,Math.tan(ie[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":ie.length===1&&A.set(1,0,0,Math.tan(ie[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":ie.length===6&&A.set(ie[0],ie[2],ie[4],ie[1],ie[3],ie[5],0,0,1);break}}F.premultiply(A)}}return F}function T($,F){function A(N){U.set(N.x,N.y,1).applyMatrix3(F),N.set(U.x,U.y)}const M=E(F),Y=$.subPaths;for(let N=0,W=Y.length;N=1||z<0||z>1)return null;if(O===0&&j===0){for(let V=0;V<2;V++)if(o(V===0?x:k,g,_),r.loc==s.ORIGIN){const U=V===0?x:k;return{x:U.x,y:U.y,t:r.t}}else if(r.loc==s.BETWEEN){const U=+(v+r.t*(b-v)).toPrecision(10),X=+(w+r.t*(C-w)).toPrecision(10);return{x:U,y:X,t:r.t}}return null}else{for(let X=0;X<2;X++)if(o(X===0?x:k,g,_),r.loc==s.ORIGIN){const Z=X===0?x:k;return{x:Z.x,y:Z.y,t:r.t}}const V=+(v+q*(b-v)).toPrecision(10),U=+(w+q*(C-w)).toPrecision(10);return{x:V,y:U,t:q}}}function o(g,_,x){const k=x.x-_.x,v=x.y-_.y,b=g.x-_.x,T=g.y-_.y,E=k*T-b*v;if(g.x===_.x&&g.y===_.y){r.loc=s.ORIGIN,r.t=0;return}if(g.x===x.x&&g.y===x.y){r.loc=s.DESTINATION,r.t=1;return}if(E<-Number.EPSILON){r.loc=s.LEFT;return}if(E>Number.EPSILON){r.loc=s.RIGHT;return}if(k*b<0||v*T<0){r.loc=s.BEHIND;return}if(Math.sqrt(k*k+v*v)R.t<=S.t+Number.EPSILON&&R.t>=S.t-Number.EPSILON)===void 0&&(x.push(S),k.push(new we(S.x,S.y)))}}return k}function c(g,_,x){const k=new we;_.getCenter(k);const v=[];return x.forEach(b=>{b.boundingBox.containsPoint(k)&&a(g,b.points).forEach(E=>{v.push({identifier:b.identifier,isCW:b.isCW,point:E})})}),v.sort((b,T)=>b.point.x-T.point.x),v}function l(g,_,x,k,v){(v==null||v==="")&&(v="nonzero");const b=new we;g.boundingBox.getCenter(b);const T=[new we(x,b.y),new we(k,b.y)],E=c(T,g.boundingBox,_);E.sort((L,j)=>L.point.x-j.point.x);const w=[],C=[];E.forEach(L=>{L.identifier===g.identifier?w.push(L):C.push(L)});const S=w[0].point.x,R=[];let O=0;for(;O0&&R[R.length-1]===C[O].identifier?R.pop():R.push(C[O].identifier),O++;if(R.push(g.identifier),v==="evenodd"){const L=R.length%2===0,j=R[R.length-2];return{identifier:g.identifier,isHole:L,for:j}}else if(v==="nonzero"){let L=!0,j=null,q=null;for(let z=0;z{const _=g.getPoints();let x=-999999999,k=999999999,v=-999999999,b=999999999;for(let T=0;T<_.length;T++){const E=_[T];E.y>x&&(x=E.y),E.yv&&(v=E.x),E.x=b&&(h=b-1),{curves:g.curves,points:_,isCW:ey.isClockWise(_),identifier:u++,boundingBox:new ty(new we(b,k),new we(v,x))}});f=f.filter(g=>g.points.length>1);const m=f.map(g=>l(g,f,h,d,e.userData.style.fillRule)),p=[];return f.forEach(g=>{if(!m[g.identifier].isHole){const x=new ip;x.curves=g.curves,m.filter(v=>v.isHole&&v.for===g.identifier).forEach(v=>{const b=f[v.identifier],T=new Mc;T.curves=b.curves,x.holes.push(T)}),p.push(x)}}),p}static getStrokeStyle(e,t,s,r,i){return e=e!==void 0?e:1,t=t!==void 0?t:"#000",s=s!==void 0?s:"miter",r=r!==void 0?r:"butt",i=i!==void 0?i:4,{strokeColor:t,strokeWidth:e,strokeLineJoin:s,strokeLineCap:r,strokeMiterLimit:i}}static pointsToStroke(e,t,s,r){const i=[],o=[],a=[];if(Oi.pointsToStrokeWithBuffers(e,t,s,r,i,o,a)===0)return null;const c=new ny;return c.setAttribute("position",new ia(i,3)),c.setAttribute("normal",new ia(o,3)),c.setAttribute("uv",new ia(a,2)),c}static pointsToStrokeWithBuffers(e,t,s,r,i,o,a,c){const l=new we,u=new we,h=new we,d=new we,f=new we,m=new we,p=new we,g=new we,_=new we,x=new we,k=new we,v=new we,b=new we,T=new we,E=new we,w=new we,C=new we;s=s!==void 0?s:12,r=r!==void 0?r:.001,c=c!==void 0?c:0,e=ge(e);const S=e.length;if(S<2)return 0;const R=e[0].equals(e[S-1]);let O,L=e[0],j;const q=t.strokeWidth/2,z=1/(S-1);let V=0,U,X,Z,Q,$=!1,F=0,A=c*3,M=c*2;Y(e[0],e[1],l).multiplyScalar(q),g.copy(e[0]).sub(l),_.copy(e[0]).add(l),x.copy(g),k.copy(_);for(let te=1;te=r&&D.push(te[P]);return D.push(te[te.length-1]),D}}}function a1(n,e){if(Object.is(n,e))return!0;if(typeof n!="object"||n===null||typeof e!="object"||e===null)return!1;const t=Object.keys(n);if(t.length!==Object.keys(e).length)return!1;for(let s=0;sc,...a}){const{setEvents:c,camera:l,raycaster:u,gl:h,controls:d,size:f,get:m}=ze(),[p,g]=y.useState(!1),[_,x]=y.useReducer((T,{object:E,shift:w})=>E===void 0?[]:Array.isArray(E)?E:w?T.includes(E)?T.filter(C=>C!==E):[E,...T]:T[0]===E?[]:[E],[]);y.useEffect(()=>void(s==null?void 0:s(_)),[_]);const k=y.useCallback(T=>{T.stopPropagation(),x({object:o([T.object])[0],shift:e&&T.shiftKey})},[]),v=y.useCallback(T=>!p&&x({}),[p]),b=y.useRef(null);return y.useEffect(()=>{if(!n||!e)return;const T=new o1(l,b.current),E=document.createElement("div");E.style.pointerEvents="none",E.style.border=r,E.style.backgroundColor=i,E.style.position="fixed";const w=new we,C=new we,S=new we,R=m().events.enabled,O=d==null?void 0:d.enabled;let L=!1;function j($,F){const{offsetX:A,offsetY:M}=$,{width:Y,height:N}=f;F.set(A/Y*2-1,-(M/N)*2+1)}function q($){var F;d&&(d.enabled=!1),c({enabled:!1}),L=!0,(F=h.domElement.parentElement)==null||F.appendChild(E),E.style.left=`${$.clientX}px`,E.style.top=`${$.clientY}px`,E.style.width="0px",E.style.height="0px",w.x=$.clientX,w.y=$.clientY}function z($){S.x=Math.max(w.x,$.clientX),S.y=Math.max(w.y,$.clientY),C.x=Math.min(w.x,$.clientX),C.y=Math.min(w.y,$.clientY),E.style.left=`${C.x}px`,E.style.top=`${C.y}px`,E.style.width=`${S.x-C.x}px`,E.style.height=`${S.y-C.y}px`}function V(){if(L){var $;d&&(d.enabled=O),c({enabled:R}),L=!1,($=E.parentElement)==null||$.removeChild(E)}}function U($){$.shiftKey&&(q($),j($,T.startPoint))}let X=[];function Z($){if(L){z($),j($,T.endPoint);const F=T.select().sort(A=>A.uuid).filter(A=>A.isMesh);a1(F,X)||(X=F,x({object:o(F)}))}}function Q($){L&&V()}return document.addEventListener("pointerdown",U,{passive:!0}),document.addEventListener("pointermove",Z,{passive:!0,capture:!0}),document.addEventListener("pointerup",Q,{passive:!0}),()=>{document.removeEventListener("pointerdown",U),document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",Q)}},[f.width,f.height,u,l,d,h]),y.createElement("group",Ee({ref:b,onClick:k,onPointerOver:()=>g(!0),onPointerOut:()=>g(!1),onPointerMissed:v},a),y.createElement(c1.Provider,{value:_},t))}const vu=y.forwardRef(function({follow:e=!0,lockX:t=!1,lockY:s=!1,lockZ:r=!1,...i},o){const a=y.useRef();return Wt(({camera:c})=>{if(!e||!a.current)return;const l=a.current.rotation.clone();c.getWorldQuaternion(a.current.quaternion),t&&(a.current.rotation.x=l.x),s&&(a.current.rotation.y=l.y),r&&(a.current.rotation.z=l.z)}),y.createElement("group",Ee({ref:ec([a,o])},i))}),qh=n=>n===Object(n)&&!Array.isArray(n)&&typeof n!="function";function Us(n,e){const t=ze(r=>r.gl),s=tc(nc,qh(n)?Object.values(n):n);if(y.useLayoutEffect(()=>{e==null||e(s)},[e]),y.useEffect(()=>{(Array.isArray(s)?s:[s]).forEach(t.initTexture)},[t,s]),qh(n)){const r=Object.keys(n),i={};return r.forEach(o=>Object.assign(i,{[o]:s[r.indexOf(o)]})),i}else return s}Us.preload=n=>tc.preload(nc,n);Us.clear=n=>tc.clear(nc,n);const u1=y.forwardRef(function({src:e,skipFill:t,skipStrokes:s,fillMaterial:r,strokeMaterial:i,fillMeshProps:o,strokeMeshProps:a,...c},l){const u=tc(Oi,e.startsWith("s?[]:u.paths.map(d=>{var f;return((f=d.userData)==null?void 0:f.style.stroke)===void 0||d.userData.style.stroke==="none"?null:d.subPaths.map(m=>Oi.pointsToStroke(m.getPoints(),d.userData.style))}),[u,s]);return y.useEffect(()=>()=>h.forEach(d=>d&&d.map(f=>f.dispose())),[h]),y.createElement("object3D",Ee({ref:l},c),y.createElement("object3D",{scale:[1,-1,1]},u.paths.map((d,f)=>{var m,p;return y.createElement(y.Fragment,{key:f},!t&&((m=d.userData)==null?void 0:m.style.fill)!==void 0&&d.userData.style.fill!=="none"&&Oi.createShapes(d).map((g,_)=>y.createElement("mesh",Ee({key:_},o),y.createElement("shapeGeometry",{args:[g]}),y.createElement("meshBasicMaterial",Ee({color:d.userData.style.fill,opacity:d.userData.style.fillOpacity,transparent:!0,side:hl,depthWrite:!1},r)))),!s&&((p=d.userData)==null?void 0:p.style.stroke)!==void 0&&d.userData.style.stroke!=="none"&&d.subPaths.map((g,_)=>y.createElement("mesh",Ee({key:_,geometry:h[f][_]},a),y.createElement("meshBasicMaterial",Ee({color:d.userData.style.stroke,opacity:d.userData.style.strokeOpacity,transparent:!0,side:hl,depthWrite:!1},i)))))})))});/*! +import{r as y,a1 as au,x as Ee,j as U,R as Xf,a8 as d_,J as M,a9 as f_,c as Zf,s as Ke,a as Ae,F as Qn,B as Kf,u as Os,b as Qf,k as mo,n as p_,d as cu,aa as Jf,A as ep,ab as m_,l as g_,e as No,D as __,ac as y_,ad as v_,i as b_,ae as x_,af as w_}from"./index-787c3ef8.js";import{u as We,a as Nt,m as tc,b as nc,e as lu,L as tp,c as k_,d as T_,q as E_,g as C_,h as S_,T as np,P as O_,f as A_,t as sp,i as rp,H as go,j as P_,C as R_,k as D_,l as M_}from"./index-64d5234f.js";import{P as ke}from"./index-94d47251.js";import{m as Ah,H as I_,E as N_,n as Jn,i as mt,I as $_,o as uu,p as ip,g as Ph,b as F_,D as L_,q as j_,r as V_,s as z_,t as U_,v as B_,w as Rh,x as W_,y as q_,R as H_,h as Y_,z as G_,N as X_,P as Z_,O as K_}from"./index-77dce891.js";import{T as Q_}from"./TextareaAutosize-e216d6db.js";import{a as $o,b as J_,V as ae,c as ey,d as ty,M as ur,e as we,f as ny,B as sy,S as op,P as Ic,g as ry,h as ia,i as Ds,T as sc,j as da,k as iy,l as Dh,m as _o,Q as oy,G as ay,C as hu,n as cy,o as ap,p as ly,q as uy,r as hy,E as dy,s as fy,t as py,u as rc,v as Mh,w as Ih,x as my}from"./three.module-9c942ca6.js";import{u as gy}from"./index-2cd18ef8.js";import{C as _y}from"./ClipLoader-0106d300.js";const yy=["top","right","bottom","left"],_s=Math.min,Lt=Math.max,fa=Math.round,Fo=Math.floor,ys=n=>({x:n,y:n}),vy={left:"right",right:"left",bottom:"top",top:"bottom"},by={start:"end",end:"start"};function dl(n,e,t){return Lt(n,_s(e,t))}function Wn(n,e){return typeof n=="function"?n(e):n}function qn(n){return n.split("-")[0]}function Zr(n){return n.split("-")[1]}function du(n){return n==="x"?"y":"x"}function fu(n){return n==="y"?"height":"width"}function Kr(n){return["top","bottom"].includes(qn(n))?"y":"x"}function pu(n){return du(Kr(n))}function xy(n,e,t){t===void 0&&(t=!1);const s=Zr(n),r=pu(n),i=fu(r);let o=r==="x"?s===(t?"end":"start")?"right":"left":s==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=pa(o)),[o,pa(o)]}function wy(n){const e=pa(n);return[fl(n),e,fl(e)]}function fl(n){return n.replace(/start|end/g,e=>by[e])}function ky(n,e,t){const s=["left","right"],r=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(n){case"top":case"bottom":return t?e?r:s:e?s:r;case"left":case"right":return e?i:o;default:return[]}}function Ty(n,e,t,s){const r=Zr(n);let i=ky(qn(n),t==="start",s);return r&&(i=i.map(o=>o+"-"+r),e&&(i=i.concat(i.map(fl)))),i}function pa(n){return n.replace(/left|right|bottom|top/g,e=>vy[e])}function Ey(n){return{top:0,right:0,bottom:0,left:0,...n}}function cp(n){return typeof n!="number"?Ey(n):{top:n,right:n,bottom:n,left:n}}function ma(n){return{...n,top:n.y,left:n.x,right:n.x+n.width,bottom:n.y+n.height}}function Nh(n,e,t){let{reference:s,floating:r}=n;const i=Kr(e),o=pu(e),a=fu(o),c=qn(e),l=i==="y",u=s.x+s.width/2-r.width/2,h=s.y+s.height/2-r.height/2,d=s[a]/2-r[a]/2;let f;switch(c){case"top":f={x:u,y:s.y-r.height};break;case"bottom":f={x:u,y:s.y+s.height};break;case"right":f={x:s.x+s.width,y:h};break;case"left":f={x:s.x-r.width,y:h};break;default:f={x:s.x,y:s.y}}switch(Zr(e)){case"start":f[o]-=d*(t&&l?-1:1);break;case"end":f[o]+=d*(t&&l?-1:1);break}return f}const Cy=async(n,e,t)=>{const{placement:s="bottom",strategy:r="absolute",middleware:i=[],platform:o}=t,a=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let l=await o.getElementRects({reference:n,floating:e,strategy:r}),{x:u,y:h}=Nh(l,s,c),d=s,f={},m=0;for(let p=0;p({name:"arrow",options:n,async fn(e){const{x:t,y:s,placement:r,rects:i,platform:o,elements:a,middlewareData:c}=e,{element:l,padding:u=0}=Wn(n,e)||{};if(l==null)return{};const h=cp(u),d={x:t,y:s},f=pu(r),m=fu(f),p=await o.getDimensions(l),g=f==="y",_=g?"top":"left",w=g?"bottom":"right",k=g?"clientHeight":"clientWidth",b=i.reference[m]+i.reference[f]-d[f]-i.floating[m],v=d[f]-i.reference[f],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let E=T?T[k]:0;(!E||!await(o.isElement==null?void 0:o.isElement(T)))&&(E=a.floating[k]||i.floating[m]);const x=b/2-v/2,C=E/2-p[m]/2-1,S=_s(h[_],C),R=_s(h[w],C),O=S,L=E-p[m]-R,j=E/2-p[m]/2+x,W=dl(O,j,L),B=!c.arrow&&Zr(r)!=null&&j!=W&&i.reference[m]/2-(jO<=0)){var C,S;const O=(((C=i.flip)==null?void 0:C.index)||0)+1,L=v[O];if(L)return{data:{index:O,overflows:x},reset:{placement:L}};let j=(S=x.filter(W=>W.overflows[0]<=0).sort((W,B)=>W.overflows[1]-B.overflows[1])[0])==null?void 0:S.placement;if(!j)switch(f){case"bestFit":{var R;const W=(R=x.map(B=>[B.placement,B.overflows.filter(V=>V>0).reduce((V,z)=>V+z,0)]).sort((B,V)=>B[1]-V[1])[0])==null?void 0:R[0];W&&(j=W);break}case"initialPlacement":j=a;break}if(r!==j)return{reset:{placement:j}}}return{}}}};function Fh(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function Lh(n){return yy.some(e=>n[e]>=0)}const Oy=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:t}=e,{strategy:s="referenceHidden",...r}=Wn(n,e);switch(s){case"referenceHidden":{const i=await Fi(e,{...r,elementContext:"reference"}),o=Fh(i,t.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Lh(o)}}}case"escaped":{const i=await Fi(e,{...r,altBoundary:!0}),o=Fh(i,t.floating);return{data:{escapedOffsets:o,escaped:Lh(o)}}}default:return{}}}}};async function Ay(n,e){const{placement:t,platform:s,elements:r}=n,i=await(s.isRTL==null?void 0:s.isRTL(r.floating)),o=qn(t),a=Zr(t),c=Kr(t)==="y",l=["left","top"].includes(o)?-1:1,u=i&&c?-1:1,h=Wn(e,n);let{mainAxis:d,crossAxis:f,alignmentAxis:m}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return a&&typeof m=="number"&&(f=a==="end"?m*-1:m),c?{x:f*u,y:d*l}:{x:d*l,y:f*u}}const Py=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,s;const{x:r,y:i,placement:o,middlewareData:a}=e,c=await Ay(e,n);return o===((t=a.offset)==null?void 0:t.placement)&&(s=a.arrow)!=null&&s.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:o}}}}},Ry=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:t,y:s,placement:r}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:g=>{let{x:_,y:w}=g;return{x:_,y:w}}},...c}=Wn(n,e),l={x:t,y:s},u=await Fi(e,c),h=Kr(qn(r)),d=du(h);let f=l[d],m=l[h];if(i){const g=d==="y"?"top":"left",_=d==="y"?"bottom":"right",w=f+u[g],k=f-u[_];f=dl(w,f,k)}if(o){const g=h==="y"?"top":"left",_=h==="y"?"bottom":"right",w=m+u[g],k=m-u[_];m=dl(w,m,k)}const p=a.fn({...e,[d]:f,[h]:m});return{...p,data:{x:p.x-t,y:p.y-s}}}}},Dy=function(n){return n===void 0&&(n={}),{options:n,fn(e){const{x:t,y:s,placement:r,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Wn(n,e),u={x:t,y:s},h=Kr(r),d=du(h);let f=u[d],m=u[h];const p=Wn(a,e),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(c){const k=d==="y"?"height":"width",b=i.reference[d]-i.floating[k]+g.mainAxis,v=i.reference[d]+i.reference[k]-g.mainAxis;fv&&(f=v)}if(l){var _,w;const k=d==="y"?"width":"height",b=["top","left"].includes(qn(r)),v=i.reference[h]-i.floating[k]+(b&&((_=o.offset)==null?void 0:_[h])||0)+(b?0:g.crossAxis),T=i.reference[h]+i.reference[k]+(b?0:((w=o.offset)==null?void 0:w[h])||0)-(b?g.crossAxis:0);mT&&(m=T)}return{[d]:f,[h]:m}}}},My=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){const{placement:t,rects:s,platform:r,elements:i}=e,{apply:o=()=>{},...a}=Wn(n,e),c=await Fi(e,a),l=qn(t),u=Zr(t),h=Kr(t)==="y",{width:d,height:f}=s.floating;let m,p;l==="top"||l==="bottom"?(m=l,p=u===(await(r.isRTL==null?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(p=l,m=u==="end"?"top":"bottom");const g=f-c[m],_=d-c[p],w=!e.middlewareData.shift;let k=g,b=_;if(h){const T=d-c.left-c.right;b=u||w?_s(_,T):T}else{const T=f-c.top-c.bottom;k=u||w?_s(g,T):T}if(w&&!u){const T=Lt(c.left,0),E=Lt(c.right,0),x=Lt(c.top,0),C=Lt(c.bottom,0);h?b=d-2*(T!==0||E!==0?T+E:Lt(c.left,c.right)):k=f-2*(x!==0||C!==0?x+C:Lt(c.top,c.bottom))}await o({...e,availableWidth:b,availableHeight:k});const v=await r.getDimensions(i.floating);return d!==v.width||f!==v.height?{reset:{rects:!0}}:{}}}};function vs(n){return lp(n)?(n.nodeName||"").toLowerCase():"#document"}function zt(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function es(n){var e;return(e=(lp(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function lp(n){return n instanceof Node||n instanceof zt(n).Node}function Hn(n){return n instanceof Element||n instanceof zt(n).Element}function En(n){return n instanceof HTMLElement||n instanceof zt(n).HTMLElement}function jh(n){return typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof zt(n).ShadowRoot}function yo(n){const{overflow:e,overflowX:t,overflowY:s,display:r}=Qt(n);return/auto|scroll|overlay|hidden|clip/.test(e+s+t)&&!["inline","contents"].includes(r)}function Iy(n){return["table","td","th"].includes(vs(n))}function mu(n){const e=gu(),t=Qt(n);return t.transform!=="none"||t.perspective!=="none"||(t.containerType?t.containerType!=="normal":!1)||!e&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!e&&(t.filter?t.filter!=="none":!1)||["transform","perspective","filter"].some(s=>(t.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(t.contain||"").includes(s))}function Ny(n){let e=Nr(n);for(;En(e)&&!ic(e);){if(mu(e))return e;e=Nr(e)}return null}function gu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ic(n){return["html","body","#document"].includes(vs(n))}function Qt(n){return zt(n).getComputedStyle(n)}function oc(n){return Hn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function Nr(n){if(vs(n)==="html")return n;const e=n.assignedSlot||n.parentNode||jh(n)&&n.host||es(n);return jh(e)?e.host:e}function up(n){const e=Nr(n);return ic(e)?n.ownerDocument?n.ownerDocument.body:n.body:En(e)&&yo(e)?e:up(e)}function Li(n,e,t){var s;e===void 0&&(e=[]),t===void 0&&(t=!0);const r=up(n),i=r===((s=n.ownerDocument)==null?void 0:s.body),o=zt(r);return i?e.concat(o,o.visualViewport||[],yo(r)?r:[],o.frameElement&&t?Li(o.frameElement):[]):e.concat(r,Li(r,[],t))}function hp(n){const e=Qt(n);let t=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const r=En(n),i=r?n.offsetWidth:t,o=r?n.offsetHeight:s,a=fa(t)!==i||fa(s)!==o;return a&&(t=i,s=o),{width:t,height:s,$:a}}function _u(n){return Hn(n)?n:n.contextElement}function Sr(n){const e=_u(n);if(!En(e))return ys(1);const t=e.getBoundingClientRect(),{width:s,height:r,$:i}=hp(e);let o=(i?fa(t.width):t.width)/s,a=(i?fa(t.height):t.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const $y=ys(0);function dp(n){const e=zt(n);return!gu()||!e.visualViewport?$y:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Fy(n,e,t){return e===void 0&&(e=!1),!t||e&&t!==zt(n)?!1:e}function Xs(n,e,t,s){e===void 0&&(e=!1),t===void 0&&(t=!1);const r=n.getBoundingClientRect(),i=_u(n);let o=ys(1);e&&(s?Hn(s)&&(o=Sr(s)):o=Sr(n));const a=Fy(i,t,s)?dp(i):ys(0);let c=(r.left+a.x)/o.x,l=(r.top+a.y)/o.y,u=r.width/o.x,h=r.height/o.y;if(i){const d=zt(i),f=s&&Hn(s)?zt(s):s;let m=d.frameElement;for(;m&&s&&f!==d;){const p=Sr(m),g=m.getBoundingClientRect(),_=Qt(m),w=g.left+(m.clientLeft+parseFloat(_.paddingLeft))*p.x,k=g.top+(m.clientTop+parseFloat(_.paddingTop))*p.y;c*=p.x,l*=p.y,u*=p.x,h*=p.y,c+=w,l+=k,m=zt(m).frameElement}}return ma({width:u,height:h,x:c,y:l})}function Ly(n){let{rect:e,offsetParent:t,strategy:s}=n;const r=En(t),i=es(t);if(t===i)return e;let o={scrollLeft:0,scrollTop:0},a=ys(1);const c=ys(0);if((r||!r&&s!=="fixed")&&((vs(t)!=="body"||yo(i))&&(o=oc(t)),En(t))){const l=Xs(t);a=Sr(t),c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-o.scrollLeft*a.x+c.x,y:e.y*a.y-o.scrollTop*a.y+c.y}}function jy(n){return Array.from(n.getClientRects())}function fp(n){return Xs(es(n)).left+oc(n).scrollLeft}function Vy(n){const e=es(n),t=oc(n),s=n.ownerDocument.body,r=Lt(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),i=Lt(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let o=-t.scrollLeft+fp(n);const a=-t.scrollTop;return Qt(s).direction==="rtl"&&(o+=Lt(e.clientWidth,s.clientWidth)-r),{width:r,height:i,x:o,y:a}}function zy(n,e){const t=zt(n),s=es(n),r=t.visualViewport;let i=s.clientWidth,o=s.clientHeight,a=0,c=0;if(r){i=r.width,o=r.height;const l=gu();(!l||l&&e==="fixed")&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:o,x:a,y:c}}function Uy(n,e){const t=Xs(n,!0,e==="fixed"),s=t.top+n.clientTop,r=t.left+n.clientLeft,i=En(n)?Sr(n):ys(1),o=n.clientWidth*i.x,a=n.clientHeight*i.y,c=r*i.x,l=s*i.y;return{width:o,height:a,x:c,y:l}}function Vh(n,e,t){let s;if(e==="viewport")s=zy(n,t);else if(e==="document")s=Vy(es(n));else if(Hn(e))s=Uy(e,t);else{const r=dp(n);s={...e,x:e.x-r.x,y:e.y-r.y}}return ma(s)}function pp(n,e){const t=Nr(n);return t===e||!Hn(t)||ic(t)?!1:Qt(t).position==="fixed"||pp(t,e)}function By(n,e){const t=e.get(n);if(t)return t;let s=Li(n,[],!1).filter(a=>Hn(a)&&vs(a)!=="body"),r=null;const i=Qt(n).position==="fixed";let o=i?Nr(n):n;for(;Hn(o)&&!ic(o);){const a=Qt(o),c=mu(o);!c&&a.position==="fixed"&&(r=null),(i?!c&&!r:!c&&a.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||yo(o)&&!c&&pp(n,o))?s=s.filter(u=>u!==o):r=a,o=Nr(o)}return e.set(n,s),s}function Wy(n){let{element:e,boundary:t,rootBoundary:s,strategy:r}=n;const o=[...t==="clippingAncestors"?By(e,this._c):[].concat(t),s],a=o[0],c=o.reduce((l,u)=>{const h=Vh(e,u,r);return l.top=Lt(h.top,l.top),l.right=_s(h.right,l.right),l.bottom=_s(h.bottom,l.bottom),l.left=Lt(h.left,l.left),l},Vh(e,a,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function qy(n){return hp(n)}function Hy(n,e,t){const s=En(e),r=es(e),i=t==="fixed",o=Xs(n,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=ys(0);if(s||!s&&!i)if((vs(e)!=="body"||yo(r))&&(a=oc(e)),s){const l=Xs(e,!0,i,e);c.x=l.x+e.clientLeft,c.y=l.y+e.clientTop}else r&&(c.x=fp(r));return{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function zh(n,e){return!En(n)||Qt(n).position==="fixed"?null:e?e(n):n.offsetParent}function mp(n,e){const t=zt(n);if(!En(n))return t;let s=zh(n,e);for(;s&&Iy(s)&&Qt(s).position==="static";)s=zh(s,e);return s&&(vs(s)==="html"||vs(s)==="body"&&Qt(s).position==="static"&&!mu(s))?t:s||Ny(n)||t}const Yy=async function(n){let{reference:e,floating:t,strategy:s}=n;const r=this.getOffsetParent||mp,i=this.getDimensions;return{reference:Hy(e,await r(t),s),floating:{x:0,y:0,...await i(t)}}};function Gy(n){return Qt(n).direction==="rtl"}const Xy={convertOffsetParentRelativeRectToViewportRelativeRect:Ly,getDocumentElement:es,getClippingRect:Wy,getOffsetParent:mp,getElementRects:Yy,getClientRects:jy,getDimensions:qy,getScale:Sr,isElement:Hn,isRTL:Gy};function Zy(n,e){let t=null,s;const r=es(n);function i(){clearTimeout(s),t&&t.disconnect(),t=null}function o(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:h,height:d}=n.getBoundingClientRect();if(a||e(),!h||!d)return;const f=Fo(u),m=Fo(r.clientWidth-(l+h)),p=Fo(r.clientHeight-(u+d)),g=Fo(l),w={rootMargin:-f+"px "+-m+"px "+-p+"px "+-g+"px",threshold:Lt(0,_s(1,c))||1};let k=!0;function b(v){const T=v[0].intersectionRatio;if(T!==c){if(!k)return o();T?o(!1,T):s=setTimeout(()=>{o(!1,1e-7)},100)}k=!1}try{t=new IntersectionObserver(b,{...w,root:r.ownerDocument})}catch{t=new IntersectionObserver(b,w)}t.observe(n)}return o(!0),i}function Ky(n,e,t,s){s===void 0&&(s={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=s,l=_u(n),u=r||i?[...l?Li(l):[],...Li(e)]:[];u.forEach(_=>{r&&_.addEventListener("scroll",t,{passive:!0}),i&&_.addEventListener("resize",t)});const h=l&&a?Zy(l,t):null;let d=-1,f=null;o&&(f=new ResizeObserver(_=>{let[w]=_;w&&w.target===l&&f&&(f.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{f&&f.observe(e)})),t()}),l&&!c&&f.observe(l),f.observe(e));let m,p=c?Xs(n):null;c&&g();function g(){const _=Xs(n);p&&(_.x!==p.x||_.y!==p.y||_.width!==p.width||_.height!==p.height)&&t(),p=_,m=requestAnimationFrame(g)}return t(),()=>{u.forEach(_=>{r&&_.removeEventListener("scroll",t),i&&_.removeEventListener("resize",t)}),h&&h(),f&&f.disconnect(),f=null,c&&cancelAnimationFrame(m)}}const Qy=(n,e,t)=>{const s=new Map,r={platform:Xy,...t},i={...r.platform,_c:s};return Cy(n,e,{...r,platform:i})},Jy=n=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){const{element:s,padding:r}=typeof n=="function"?n(t):n;return s&&e(s)?s.current!=null?$h({element:s.current,padding:r}).fn(t):{}:s?$h({element:s,padding:r}).fn(t):{}}}};var oa=typeof document<"u"?y.useLayoutEffect:y.useEffect;function ga(n,e){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(typeof n=="function"&&n.toString()===e.toString())return!0;let t,s,r;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!=e.length)return!1;for(s=t;s--!==0;)if(!ga(n[s],e[s]))return!1;return!0}if(r=Object.keys(n),t=r.length,t!==Object.keys(e).length)return!1;for(s=t;s--!==0;)if(!{}.hasOwnProperty.call(e,r[s]))return!1;for(s=t;s--!==0;){const i=r[s];if(!(i==="_owner"&&n.$$typeof)&&!ga(n[i],e[i]))return!1}return!0}return n!==n&&e!==e}function gp(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Uh(n,e){const t=gp(n);return Math.round(e*t)/t}function Bh(n){const e=y.useRef(n);return oa(()=>{e.current=n}),e}function e1(n){n===void 0&&(n={});const{placement:e="bottom",strategy:t="absolute",middleware:s=[],platform:r,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:c,open:l}=n,[u,h]=y.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[d,f]=y.useState(s);ga(d,s)||f(s);const[m,p]=y.useState(null),[g,_]=y.useState(null),w=y.useCallback(B=>{B!=T.current&&(T.current=B,p(B))},[p]),k=y.useCallback(B=>{B!==E.current&&(E.current=B,_(B))},[_]),b=i||m,v=o||g,T=y.useRef(null),E=y.useRef(null),x=y.useRef(u),C=Bh(c),S=Bh(r),R=y.useCallback(()=>{if(!T.current||!E.current)return;const B={placement:e,strategy:t,middleware:d};S.current&&(B.platform=S.current),Qy(T.current,E.current,B).then(V=>{const z={...V,isPositioned:!0};O.current&&!ga(x.current,z)&&(x.current=z,au.flushSync(()=>{h(z)}))})},[d,e,t,S]);oa(()=>{l===!1&&x.current.isPositioned&&(x.current.isPositioned=!1,h(B=>({...B,isPositioned:!1})))},[l]);const O=y.useRef(!1);oa(()=>(O.current=!0,()=>{O.current=!1}),[]),oa(()=>{if(b&&(T.current=b),v&&(E.current=v),b&&v){if(C.current)return C.current(b,v,R);R()}},[b,v,R,C]);const L=y.useMemo(()=>({reference:T,floating:E,setReference:w,setFloating:k}),[w,k]),j=y.useMemo(()=>({reference:b,floating:v}),[b,v]),W=y.useMemo(()=>{const B={position:t,left:0,top:0};if(!j.floating)return B;const V=Uh(j.floating,u.x),z=Uh(j.floating,u.y);return a?{...B,transform:"translate("+V+"px, "+z+"px)",...gp(j.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:V,top:z}},[t,a,j.floating,u.x,u.y]);return y.useMemo(()=>({...u,update:R,refs:L,elements:j,floatingStyles:W}),[u,R,L,j,W])}function t1(n){let e;const t=new Set,s=(l,u)=>{const h=typeof l=="function"?l(e):l;if(h!==e){const d=e;e=u?h:Object.assign({},e,h),t.forEach(f=>f(e,d))}},r=()=>e,i=(l,u=r,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let d=u(e);function f(){const m=u(e);if(!h(d,m)){const p=d;l(d=m,p)}}return t.add(f),()=>t.delete(f)},c={setState:s,getState:r,subscribe:(l,u,h)=>u||h?i(l,u,h):(t.add(l),()=>t.delete(l)),destroy:()=>t.clear()};return e=n(s,r,c),c}const n1=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Wh=n1?y.useEffect:y.useLayoutEffect;function s1(n){const e=typeof n=="function"?t1(n):n,t=(s=e.getState,r=Object.is)=>{const[,i]=y.useReducer(g=>g+1,0),o=e.getState(),a=y.useRef(o),c=y.useRef(s),l=y.useRef(r),u=y.useRef(!1),h=y.useRef();h.current===void 0&&(h.current=s(o));let d,f=!1;(a.current!==o||c.current!==s||l.current!==r||u.current)&&(d=s(o),f=!r(h.current,d)),Wh(()=>{f&&(h.current=d),a.current=o,c.current=s,l.current=r,u.current=!1});const m=y.useRef(o);Wh(()=>{const g=()=>{try{const w=e.getState(),k=c.current(w);l.current(h.current,k)||(a.current=w,h.current=k,i())}catch{u.current=!0,i()}},_=e.subscribe(g);return e.getState()!==m.current&&g(),_},[]);const p=f?d:h.current;return y.useDebugValue(p),p};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const s=[t,e];return{next(){const r=s.length<=0;return{value:s.shift(),done:r}}}},t}let ai=0;const r1=s1(n=>($o.onStart=(e,t,s)=>{n({active:!0,item:e,loaded:t,total:s,progress:(t-ai)/(s-ai)*100})},$o.onLoad=()=>{n({active:!1})},$o.onError=e=>n(t=>({errors:[...t.errors,e]})),$o.onProgress=(e,t,s)=>{t===s&&(ai=s),n({active:!0,item:e,loaded:t,total:s,progress:(t-ai)/(s-ai)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0})),i1=n=>`Loading ${n.toFixed(2)}%`;function o1({containerStyles:n,innerStyles:e,barStyles:t,dataStyles:s,dataInterpolation:r=i1,initialState:i=o=>o}){const{active:o,progress:a}=r1(),c=y.useRef(0),l=y.useRef(0),u=y.useRef(null),[h,d]=y.useState(i(o));y.useEffect(()=>{let m;return o!==h&&(m=setTimeout(()=>d(o),300)),()=>clearTimeout(m)},[h,o]);const f=y.useCallback(()=>{u.current&&(c.current+=(a-c.current)/2,(c.current>.95*a||a===100)&&(c.current=a),u.current.innerText=r(c.current),c.current(f(),()=>cancelAnimationFrame(l.current)),[f]),h?y.createElement("div",{style:{...Lo.container,opacity:o?1:0,...n}},y.createElement("div",null,y.createElement("div",{style:{...Lo.inner,...e}},y.createElement("div",{style:{...Lo.bar,transform:`scaleX(${a/100})`,...t}}),y.createElement("span",{ref:u,style:{...Lo.data,...s}})))):null}const Lo={container:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"#171717",display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity 300ms ease",zIndex:1e3},inner:{width:100,height:3,background:"#272727",textAlign:"center"},bar:{height:3,width:"100%",background:"white",transition:"transform 200ms",transformOrigin:"left center"},data:{display:"inline-block",position:"relative",fontVariantNumeric:"tabular-nums",marginTop:"0.8em",color:"#f0f0f0",fontSize:"0.6em",fontFamily:'-apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, Roboto, Ubuntu, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',whiteSpace:"nowrap"}},Nc=new J_,$c=new ae,hr=new ae,nn=new ae,Dn=new ae,_n=new ae,Mn=new ae,In=new ae,ci=new ae,li=new ae,ui=new ae,jo=new ae,hi=new ae,di=new ae,fi=new ae;class a1{constructor(e,t,s){this.camera=e,this.scene=t,this.startPoint=new ae,this.endPoint=new ae,this.collection=[],this.deep=s||Number.MAX_VALUE}select(e,t){return this.startPoint=e||this.startPoint,this.endPoint=t||this.endPoint,this.collection=[],this.updateFrustum(this.startPoint,this.endPoint),this.searchChildInFrustum(Nc,this.scene),this.collection}updateFrustum(e,t){if(e=e||this.startPoint,t=t||this.endPoint,e.x===t.x&&(t.x+=Number.EPSILON),e.y===t.y&&(t.y+=Number.EPSILON),this.camera.updateProjectionMatrix(),this.camera.updateMatrixWorld(),this.camera.isPerspectiveCamera){hr.copy(e),hr.x=Math.min(e.x,t.x),hr.y=Math.max(e.y,t.y),t.x=Math.max(e.x,t.x),t.y=Math.min(e.y,t.y),nn.setFromMatrixPosition(this.camera.matrixWorld),Dn.copy(hr),_n.set(t.x,hr.y,0),Mn.copy(t),In.set(hr.x,t.y,0),Dn.unproject(this.camera),_n.unproject(this.camera),Mn.unproject(this.camera),In.unproject(this.camera),hi.copy(Dn).sub(nn),di.copy(_n).sub(nn),fi.copy(Mn).sub(nn),hi.normalize(),di.normalize(),fi.normalize(),hi.multiplyScalar(this.deep),di.multiplyScalar(this.deep),fi.multiplyScalar(this.deep),hi.add(nn),di.add(nn),fi.add(nn);var s=Nc.planes;s[0].setFromCoplanarPoints(nn,Dn,_n),s[1].setFromCoplanarPoints(nn,_n,Mn),s[2].setFromCoplanarPoints(Mn,In,nn),s[3].setFromCoplanarPoints(In,Dn,nn),s[4].setFromCoplanarPoints(_n,Mn,In),s[5].setFromCoplanarPoints(fi,di,hi),s[5].normal.multiplyScalar(-1)}else if(this.camera.isOrthographicCamera){const r=Math.min(e.x,t.x),i=Math.max(e.y,t.y),o=Math.max(e.x,t.x),a=Math.min(e.y,t.y);Dn.set(r,i,-1),_n.set(o,i,-1),Mn.set(o,a,-1),In.set(r,a,-1),ci.set(r,i,1),li.set(o,i,1),ui.set(o,a,1),jo.set(r,a,1),Dn.unproject(this.camera),_n.unproject(this.camera),Mn.unproject(this.camera),In.unproject(this.camera),ci.unproject(this.camera),li.unproject(this.camera),ui.unproject(this.camera),jo.unproject(this.camera);var s=Nc.planes;s[0].setFromCoplanarPoints(Dn,ci,li),s[1].setFromCoplanarPoints(_n,li,ui),s[2].setFromCoplanarPoints(ui,jo,In),s[3].setFromCoplanarPoints(jo,ci,Dn),s[4].setFromCoplanarPoints(_n,Mn,In),s[5].setFromCoplanarPoints(ui,li,ci),s[5].normal.multiplyScalar(-1)}else console.error("THREE.SelectionBox: Unsupported camera type.")}searchChildInFrustum(e,t){if((t.isMesh||t.isLine||t.isPoints)&&t.material!==void 0&&(t.geometry.boundingSphere===null&&t.geometry.computeBoundingSphere(),$c.copy(t.geometry.boundingSphere.center),$c.applyMatrix4(t.matrixWorld),e.containsPoint($c)&&this.collection.push(t)),t.children.length>0)for(let s=0;s0?X.copy(O[O.length-1]):X.identity())}function r($){const F=new Ds,A=new we,I=new we,Y=new we;let N=!0,q=!1;const re=$.getAttribute("d").match(/[a-df-z][^a-df-z]*/gi);for(let ie=0,ne=re.length;ie0&&(A.copy(Y),F.currentPath.currentPoint.copy(A),N=!0);break;default:console.warn(ge)}q=!1}return F}function i($){if(!(!$.sheet||!$.sheet.cssRules||!$.sheet.cssRules.length))for(let F=0;F<$.sheet.cssRules.length;F++){const A=$.sheet.cssRules[F];if(A.type!==1)continue;const I=A.selectorText.split(/,/gm).filter(Boolean).map(Y=>Y.trim());for(let Y=0;Y1){const is=Math.sqrt(Q);F=is*F,A=is*A,te=F*F,H=A*A}const se=te*P+H*D,le=(te*H-se)/se;let ye=Math.sqrt(Math.max(0,le));Y===N&&(ye=-ye);const Qe=ye*F*ge/A,ee=-ye*A*ne/F,fe=Math.cos(I)*Qe-Math.sin(I)*ee+(q.x+oe.x)/2,Je=Math.sin(I)*Qe+Math.cos(I)*ee+(q.y+oe.y)/2,it=a(1,0,(ne-Qe)/F,(ge-ee)/A),$t=a((ne-Qe)/F,(ge-ee)/A,(-ne-Qe)/F,(-ge-ee)/A)%(Math.PI*2);$.currentPath.absellipse(fe,Je,F,A,it,it+$t,N===0,I)}function a($,F,A,I){const Y=$*A+F*I,N=Math.sqrt($*$+F*F)*Math.sqrt(A*A+I*I);let q=Math.acos(Math.max(-1,Math.min(1,Y/N)));return $*I-F*A<0&&(q=-q),q}function c($){const F=k($.getAttribute("x")||0),A=k($.getAttribute("y")||0),I=k($.getAttribute("rx")||$.getAttribute("ry")||0),Y=k($.getAttribute("ry")||$.getAttribute("rx")||0),N=k($.getAttribute("width")),q=k($.getAttribute("height")),oe=1-.551915024494,re=new Ds;return re.moveTo(F+I,A),re.lineTo(F+N-I,A),(I!==0||Y!==0)&&re.bezierCurveTo(F+N-I*oe,A,F+N,A+Y*oe,F+N,A+Y),re.lineTo(F+N,A+q-Y),(I!==0||Y!==0)&&re.bezierCurveTo(F+N,A+q-Y*oe,F+N-I*oe,A+q,F+N-I,A+q),re.lineTo(F+I,A+q),(I!==0||Y!==0)&&re.bezierCurveTo(F+I*oe,A+q,F,A+q-Y*oe,F,A+q-Y),re.lineTo(F,A+Y),(I!==0||Y!==0)&&re.bezierCurveTo(F,A+Y*oe,F+I*oe,A,F+I,A),re}function l($){function F(N,q,oe){const re=k(q),ie=k(oe);Y===0?I.moveTo(re,ie):I.lineTo(re,ie),Y++}const A=/(-?[\d\.?]+)[,|\s](-?[\d\.?]+)/g,I=new Ds;let Y=0;return $.getAttribute("points").replace(A,F),I.currentPath.autoClose=!0,I}function u($){function F(N,q,oe){const re=k(q),ie=k(oe);Y===0?I.moveTo(re,ie):I.lineTo(re,ie),Y++}const A=/(-?[\d\.?]+)[,|\s](-?[\d\.?]+)/g,I=new Ds;let Y=0;return $.getAttribute("points").replace(A,F),I.currentPath.autoClose=!1,I}function h($){const F=k($.getAttribute("cx")||0),A=k($.getAttribute("cy")||0),I=k($.getAttribute("r")||0),Y=new Ic;Y.absarc(F,A,I,0,Math.PI*2);const N=new Ds;return N.subPaths.push(Y),N}function d($){const F=k($.getAttribute("cx")||0),A=k($.getAttribute("cy")||0),I=k($.getAttribute("rx")||0),Y=k($.getAttribute("ry")||0),N=new Ic;N.absellipse(F,A,I,Y,0,Math.PI*2);const q=new Ds;return q.subPaths.push(N),q}function f($){const F=k($.getAttribute("x1")||0),A=k($.getAttribute("y1")||0),I=k($.getAttribute("x2")||0),Y=k($.getAttribute("y2")||0),N=new Ds;return N.moveTo(F,A),N.lineTo(I,Y),N.currentPath.autoClose=!1,N}function m($,F){F=Object.assign({},F);let A={};if($.hasAttribute("class")){const q=$.getAttribute("class").split(/\s/).filter(Boolean).map(oe=>oe.trim());for(let oe=0;oe0&&F.premultiply(O[O.length-1]),X.copy(F),O.push(F),F}function v($){const F=new ur,A=L;if($.nodeName==="use"&&($.hasAttribute("x")||$.hasAttribute("y"))){const I=k($.getAttribute("x")),Y=k($.getAttribute("y"));F.translate(I,Y)}if($.hasAttribute("transform")){const I=$.getAttribute("transform").split(")");for(let Y=I.length-1;Y>=0;Y--){const N=I[Y].trim();if(N==="")continue;const q=N.indexOf("("),oe=N.length;if(q>0&&q=1){const ne=ie[0];let ge=ne;ie.length>=2&&(ge=ie[1]),A.translate(ne,ge)}break;case"rotate":if(ie.length>=1){let ne=0,ge=0,te=0;ne=-ie[0]*Math.PI/180,ie.length>=3&&(ge=ie[1],te=ie[2]),j.identity().translate(-ge,-te),W.identity().rotate(ne),B.multiplyMatrices(W,j),j.identity().translate(ge,te),A.multiplyMatrices(j,B)}break;case"scale":if(ie.length>=1){const ne=ie[0];let ge=ne;ie.length>=2&&(ge=ie[1]),A.scale(ne,ge)}break;case"skewX":ie.length===1&&A.set(1,Math.tan(ie[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":ie.length===1&&A.set(1,0,0,Math.tan(ie[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":ie.length===6&&A.set(ie[0],ie[2],ie[4],ie[1],ie[3],ie[5],0,0,1);break}}F.premultiply(A)}}return F}function T($,F){function A(N){z.set(N.x,N.y,1).applyMatrix3(F),N.set(z.x,z.y)}const I=E(F),Y=$.subPaths;for(let N=0,q=Y.length;N=1||B<0||B>1)return null;if(O===0&&j===0){for(let V=0;V<2;V++)if(o(V===0?w:k,g,_),r.loc==s.ORIGIN){const z=V===0?w:k;return{x:z.x,y:z.y,t:r.t}}else if(r.loc==s.BETWEEN){const z=+(b+r.t*(v-b)).toPrecision(10),X=+(x+r.t*(C-x)).toPrecision(10);return{x:z,y:X,t:r.t}}return null}else{for(let X=0;X<2;X++)if(o(X===0?w:k,g,_),r.loc==s.ORIGIN){const K=X===0?w:k;return{x:K.x,y:K.y,t:r.t}}const V=+(b+W*(v-b)).toPrecision(10),z=+(x+W*(C-x)).toPrecision(10);return{x:V,y:z,t:W}}}function o(g,_,w){const k=w.x-_.x,b=w.y-_.y,v=g.x-_.x,T=g.y-_.y,E=k*T-v*b;if(g.x===_.x&&g.y===_.y){r.loc=s.ORIGIN,r.t=0;return}if(g.x===w.x&&g.y===w.y){r.loc=s.DESTINATION,r.t=1;return}if(E<-Number.EPSILON){r.loc=s.LEFT;return}if(E>Number.EPSILON){r.loc=s.RIGHT;return}if(k*v<0||b*T<0){r.loc=s.BEHIND;return}if(Math.sqrt(k*k+b*b)R.t<=S.t+Number.EPSILON&&R.t>=S.t-Number.EPSILON)===void 0&&(w.push(S),k.push(new we(S.x,S.y)))}}return k}function c(g,_,w){const k=new we;_.getCenter(k);const b=[];return w.forEach(v=>{v.boundingBox.containsPoint(k)&&a(g,v.points).forEach(E=>{b.push({identifier:v.identifier,isCW:v.isCW,point:E})})}),b.sort((v,T)=>v.point.x-T.point.x),b}function l(g,_,w,k,b){(b==null||b==="")&&(b="nonzero");const v=new we;g.boundingBox.getCenter(v);const T=[new we(w,v.y),new we(k,v.y)],E=c(T,g.boundingBox,_);E.sort((L,j)=>L.point.x-j.point.x);const x=[],C=[];E.forEach(L=>{L.identifier===g.identifier?x.push(L):C.push(L)});const S=x[0].point.x,R=[];let O=0;for(;O0&&R[R.length-1]===C[O].identifier?R.pop():R.push(C[O].identifier),O++;if(R.push(g.identifier),b==="evenodd"){const L=R.length%2===0,j=R[R.length-2];return{identifier:g.identifier,isHole:L,for:j}}else if(b==="nonzero"){let L=!0,j=null,W=null;for(let B=0;B{const _=g.getPoints();let w=-999999999,k=999999999,b=-999999999,v=999999999;for(let T=0;T<_.length;T++){const E=_[T];E.y>w&&(w=E.y),E.yb&&(b=E.x),E.x=v&&(h=v-1),{curves:g.curves,points:_,isCW:ny.isClockWise(_),identifier:u++,boundingBox:new sy(new we(v,k),new we(b,w))}});f=f.filter(g=>g.points.length>1);const m=f.map(g=>l(g,f,h,d,e.userData.style.fillRule)),p=[];return f.forEach(g=>{if(!m[g.identifier].isHole){const w=new op;w.curves=g.curves,m.filter(b=>b.isHole&&b.for===g.identifier).forEach(b=>{const v=f[b.identifier],T=new Ic;T.curves=v.curves,w.holes.push(T)}),p.push(w)}}),p}static getStrokeStyle(e,t,s,r,i){return e=e!==void 0?e:1,t=t!==void 0?t:"#000",s=s!==void 0?s:"miter",r=r!==void 0?r:"butt",i=i!==void 0?i:4,{strokeColor:t,strokeWidth:e,strokeLineJoin:s,strokeLineCap:r,strokeMiterLimit:i}}static pointsToStroke(e,t,s,r){const i=[],o=[],a=[];if(Oi.pointsToStrokeWithBuffers(e,t,s,r,i,o,a)===0)return null;const c=new ry;return c.setAttribute("position",new ia(i,3)),c.setAttribute("normal",new ia(o,3)),c.setAttribute("uv",new ia(a,2)),c}static pointsToStrokeWithBuffers(e,t,s,r,i,o,a,c){const l=new we,u=new we,h=new we,d=new we,f=new we,m=new we,p=new we,g=new we,_=new we,w=new we,k=new we,b=new we,v=new we,T=new we,E=new we,x=new we,C=new we;s=s!==void 0?s:12,r=r!==void 0?r:.001,c=c!==void 0?c:0,e=ge(e);const S=e.length;if(S<2)return 0;const R=e[0].equals(e[S-1]);let O,L=e[0],j;const W=t.strokeWidth/2,B=1/(S-1);let V=0,z,X,K,J,$=!1,F=0,A=c*3,I=c*2;Y(e[0],e[1],l).multiplyScalar(W),g.copy(e[0]).sub(l),_.copy(e[0]).add(l),w.copy(g),k.copy(_);for(let te=1;te=r&&D.push(te[P]);return D.push(te[te.length-1]),D}}}function c1(n,e){if(Object.is(n,e))return!0;if(typeof n!="object"||n===null||typeof e!="object"||e===null)return!1;const t=Object.keys(n);if(t.length!==Object.keys(e).length)return!1;for(let s=0;sc,...a}){const{setEvents:c,camera:l,raycaster:u,gl:h,controls:d,size:f,get:m}=We(),[p,g]=y.useState(!1),[_,w]=y.useReducer((T,{object:E,shift:x})=>E===void 0?[]:Array.isArray(E)?E:x?T.includes(E)?T.filter(C=>C!==E):[E,...T]:T[0]===E?[]:[E],[]);y.useEffect(()=>void(s==null?void 0:s(_)),[_]);const k=y.useCallback(T=>{T.stopPropagation(),w({object:o([T.object])[0],shift:e&&T.shiftKey})},[]),b=y.useCallback(T=>!p&&w({}),[p]),v=y.useRef(null);return y.useEffect(()=>{if(!n||!e)return;const T=new a1(l,v.current),E=document.createElement("div");E.style.pointerEvents="none",E.style.border=r,E.style.backgroundColor=i,E.style.position="fixed";const x=new we,C=new we,S=new we,R=m().events.enabled,O=d==null?void 0:d.enabled;let L=!1;function j($,F){const{offsetX:A,offsetY:I}=$,{width:Y,height:N}=f;F.set(A/Y*2-1,-(I/N)*2+1)}function W($){var F;d&&(d.enabled=!1),c({enabled:!1}),L=!0,(F=h.domElement.parentElement)==null||F.appendChild(E),E.style.left=`${$.clientX}px`,E.style.top=`${$.clientY}px`,E.style.width="0px",E.style.height="0px",x.x=$.clientX,x.y=$.clientY}function B($){S.x=Math.max(x.x,$.clientX),S.y=Math.max(x.y,$.clientY),C.x=Math.min(x.x,$.clientX),C.y=Math.min(x.y,$.clientY),E.style.left=`${C.x}px`,E.style.top=`${C.y}px`,E.style.width=`${S.x-C.x}px`,E.style.height=`${S.y-C.y}px`}function V(){if(L){var $;d&&(d.enabled=O),c({enabled:R}),L=!1,($=E.parentElement)==null||$.removeChild(E)}}function z($){$.shiftKey&&(W($),j($,T.startPoint))}let X=[];function K($){if(L){B($),j($,T.endPoint);const F=T.select().sort(A=>A.uuid).filter(A=>A.isMesh);c1(F,X)||(X=F,w({object:o(F)}))}}function J($){L&&V()}return document.addEventListener("pointerdown",z,{passive:!0}),document.addEventListener("pointermove",K,{passive:!0,capture:!0}),document.addEventListener("pointerup",J,{passive:!0}),()=>{document.removeEventListener("pointerdown",z),document.removeEventListener("pointermove",K),document.removeEventListener("pointerup",J)}},[f.width,f.height,u,l,d,h]),y.createElement("group",Ee({ref:v,onClick:k,onPointerOver:()=>g(!0),onPointerOut:()=>g(!1),onPointerMissed:b},a),y.createElement(l1.Provider,{value:_},t))}const yu=y.forwardRef(function({follow:e=!0,lockX:t=!1,lockY:s=!1,lockZ:r=!1,...i},o){const a=y.useRef();return Nt(({camera:c})=>{if(!e||!a.current)return;const l=a.current.rotation.clone();c.getWorldQuaternion(a.current.quaternion),t&&(a.current.rotation.x=l.x),s&&(a.current.rotation.y=l.y),r&&(a.current.rotation.z=l.z)}),y.createElement("group",Ee({ref:tc([a,o])},i))}),qh=n=>n===Object(n)&&!Array.isArray(n)&&typeof n!="function";function Us(n,e){const t=We(r=>r.gl),s=nc(sc,qh(n)?Object.values(n):n);if(y.useLayoutEffect(()=>{e==null||e(s)},[e]),y.useEffect(()=>{(Array.isArray(s)?s:[s]).forEach(t.initTexture)},[t,s]),qh(n)){const r=Object.keys(n),i={};return r.forEach(o=>Object.assign(i,{[o]:s[r.indexOf(o)]})),i}else return s}Us.preload=n=>nc.preload(sc,n);Us.clear=n=>nc.clear(sc,n);const h1=y.forwardRef(function({src:e,skipFill:t,skipStrokes:s,fillMaterial:r,strokeMaterial:i,fillMeshProps:o,strokeMeshProps:a,...c},l){const u=nc(Oi,e.startsWith("s?[]:u.paths.map(d=>{var f;return((f=d.userData)==null?void 0:f.style.stroke)===void 0||d.userData.style.stroke==="none"?null:d.subPaths.map(m=>Oi.pointsToStroke(m.getPoints(),d.userData.style))}),[u,s]);return y.useEffect(()=>()=>h.forEach(d=>d&&d.map(f=>f.dispose())),[h]),y.createElement("object3D",Ee({ref:l},c),y.createElement("object3D",{scale:[1,-1,1]},u.paths.map((d,f)=>{var m,p;return y.createElement(y.Fragment,{key:f},!t&&((m=d.userData)==null?void 0:m.style.fill)!==void 0&&d.userData.style.fill!=="none"&&Oi.createShapes(d).map((g,_)=>y.createElement("mesh",Ee({key:_},o),y.createElement("shapeGeometry",{args:[g]}),y.createElement("meshBasicMaterial",Ee({color:d.userData.style.fill,opacity:d.userData.style.fillOpacity,transparent:!0,side:da,depthWrite:!1},r)))),!s&&((p=d.userData)==null?void 0:p.style.stroke)!==void 0&&d.userData.style.stroke!=="none"&&d.subPaths.map((g,_)=>y.createElement("mesh",Ee({key:_,geometry:h[f][_]},a),y.createElement("meshBasicMaterial",Ee({color:d.userData.style.stroke,opacity:d.userData.style.strokeOpacity,transparent:!0,side:da,depthWrite:!1},i)))))})))});/*! * camera-controls * https://github.com/yomotsu/camera-controls * (c) 2017 @yomotsu * Released under the MIT License. - */const pe={LEFT:1,RIGHT:2,MIDDLE:4},G=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),dr={NONE:0,IN:1,OUT:-1};function Ms(n){return n.isPerspectiveCamera}function as(n){return n.isOrthographicCamera}const fr=Math.PI*2,Hh=Math.PI/2,gp=1e-5,pi=Math.PI/180;function sn(n,e,t){return Math.max(e,Math.min(t,n))}function $e(n,e=gp){return Math.abs(n)0==f>u&&(f=u,t.value=(f-u)/i),f}function Gh(n,e,t,s,r=1/0,i,o){s=Math.max(1e-4,s);const a=2/s,c=a*i,l=1/(1+c+.48*c*c+.235*c*c*c);let u=e.x,h=e.y,d=e.z,f=n.x-u,m=n.y-h,p=n.z-d;const g=u,_=h,x=d,k=r*s,v=k*k,b=f*f+m*m+p*p;if(b>v){const q=Math.sqrt(b);f=f/q*k,m=m/q*k,p=p/q*k}u=n.x-f,h=n.y-m,d=n.z-p;const T=(t.x+a*f)*i,E=(t.y+a*m)*i,w=(t.z+a*p)*i;t.x=(t.x-a*T)*l,t.y=(t.y-a*E)*l,t.z=(t.z-a*w)*l,o.x=u+(f+T)*l,o.y=h+(m+E)*l,o.z=d+(p+w)*l;const C=g-n.x,S=_-n.y,R=x-n.z,O=o.x-g,L=o.y-_,j=o.z-x;return C*O+S*L+R*j>0&&(o.x=g,o.y=_,o.z=x,t.x=(o.x-g)/i,t.y=(o.y-_)/i,t.z=(o.z-x)/i),o}function $c(n,e){e.set(0,0),n.forEach(t=>{e.x+=t.clientX,e.y+=t.clientY}),e.x/=n.length,e.y/=n.length}function Fc(n,e){return as(n)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}class h1{constructor(){this._listeners={}}addEventListener(e,t){const s=this._listeners;s[e]===void 0&&(s[e]=[]),s[e].indexOf(t)===-1&&s[e].push(t)}hasEventListener(e,t){const s=this._listeners;return s[e]!==void 0&&s[e].indexOf(t)!==-1}removeEventListener(e,t){const r=this._listeners[e];if(r!==void 0){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){const s=this._listeners[e.type];if(s!==void 0){e.target=this;const r=s.slice(0);for(let i=0,o=r.length;i{},this._enabled=!0,this._state=G.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=dr.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new he.Vector3,this._focalOffsetVelocity=new he.Vector3,this._zoomVelocity={value:0},this._truckInternal=(v,b,T)=>{let E,w;if(Ms(this._camera)){const C=_e.copy(this._camera.position).sub(this._target),S=this._camera.getEffectiveFOV()*pi,R=C.length()*Math.tan(S*.5);E=this.truckSpeed*v*R/this._elementRect.height,w=this.truckSpeed*b*R/this._elementRect.height}else if(as(this._camera)){const C=this._camera;E=v*(C.right-C.left)/C.zoom/this._elementRect.width,w=b*(C.top-C.bottom)/C.zoom/this._elementRect.height}else return;this.verticalDragToForward?(T?this.setFocalOffset(this._focalOffsetEnd.x+E,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(E,0,!0),this.forward(-w,!0)):T?this.setFocalOffset(this._focalOffsetEnd.x+E,this._focalOffsetEnd.y+w,this._focalOffsetEnd.z,!0):this.truck(E,w,!0)},this._rotateInternal=(v,b)=>{const T=fr*this.azimuthRotateSpeed*v/this._elementRect.height,E=fr*this.polarRotateSpeed*b/this._elementRect.height;this.rotate(T,E,!0)},this._dollyInternal=(v,b,T)=>{const E=Math.pow(.95,-v*this.dollySpeed),w=this._sphericalEnd.radius,C=this._sphericalEnd.radius*E,S=sn(C,this.minDistance,this.maxDistance),R=S-C;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(C,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(R,!0),this._dollyToNoClamp(S,!0)):this._dollyToNoClamp(S,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?C:S)-w,this._dollyControlCoord.set(b,T)),this._lastDollyDirection=Math.sign(-v)},this._zoomInternal=(v,b,T)=>{const E=Math.pow(.95,v*this.dollySpeed),w=this._zoom,C=this._zoom*E;this.zoomTo(C,!0),this.dollyToCursor&&(this._changedZoom+=C-w,this._dollyControlCoord.set(b,T))},typeof he>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=new he.Quaternion().setFromUnitVectors(this._camera.up,Uo),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=G.NONE,this._target=new he.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new he.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new he.Spherical().setFromVector3(_e.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new he.Vector3,new he.Vector3,new he.Vector3,new he.Vector3],this._updateNearPlaneCorners(),this._boundary=new he.Box3(new he.Vector3(-1/0,-1/0,-1/0),new he.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new he.Vector2,this.mouseButtons={left:G.ROTATE,middle:G.DOLLY,right:G.TRUCK,wheel:Ms(this._camera)?G.DOLLY:as(this._camera)?G.ZOOM:G.NONE},this.touches={one:G.TOUCH_ROTATE,two:Ms(this._camera)?G.TOUCH_DOLLY_TRUCK:as(this._camera)?G.TOUCH_ZOOM_TRUCK:G.NONE,three:G.TOUCH_TRUCK};const s=new he.Vector2,r=new he.Vector2,i=new he.Vector2,o=v=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const E=this._domElement.getBoundingClientRect(),w=v.clientX/E.width,C=v.clientY/E.height;if(wthis._interactiveArea.right||Cthis._interactiveArea.bottom)return}const b=v.pointerType!=="mouse"?null:(v.buttons&pe.LEFT)===pe.LEFT?pe.LEFT:(v.buttons&pe.MIDDLE)===pe.MIDDLE?pe.MIDDLE:(v.buttons&pe.RIGHT)===pe.RIGHT?pe.RIGHT:null;if(b!==null){const E=this._findPointerByMouseButton(b);E&&this._disposePointer(E)}if((v.buttons&pe.LEFT)===pe.LEFT&&this._lockedPointer)return;const T={pointerId:v.pointerId,clientX:v.clientX,clientY:v.clientY,deltaX:0,deltaY:0,mouseButton:b};this._activePointers.push(T),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.addEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),this._isDragging=!0,p(v)},a=v=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const E=this._domElement.getBoundingClientRect(),w=v.clientX/E.width,C=v.clientY/E.height;if(wthis._interactiveArea.right||Cthis._interactiveArea.bottom)return}const b=(v.buttons&pe.LEFT)===pe.LEFT?pe.LEFT:(v.buttons&pe.MIDDLE)===pe.MIDDLE?pe.MIDDLE:(v.buttons&pe.RIGHT)===pe.RIGHT?pe.RIGHT:null;if(b!==null){const E=this._findPointerByMouseButton(b);E&&this._disposePointer(E)}const T={pointerId:1,clientX:v.clientX,clientY:v.clientY,deltaX:0,deltaY:0,mouseButton:(v.buttons&pe.LEFT)===pe.LEFT?pe.LEFT:(v.buttons&pe.MIDDLE)===pe.LEFT?pe.MIDDLE:(v.buttons&pe.RIGHT)===pe.LEFT?pe.RIGHT:null};this._activePointers.push(T),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",h),this._domElement.ownerDocument.addEventListener("mousemove",l),this._domElement.ownerDocument.addEventListener("mouseup",h),this._isDragging=!0,p(v)},c=v=>{v.cancelable&&v.preventDefault();const b=v.pointerId,T=this._lockedPointer||this._findPointerById(b);if(T){if(T.clientX=v.clientX,T.clientY=v.clientY,T.deltaX=v.movementX,T.deltaY=v.movementY,this._state=0,v.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(v.buttons&pe.LEFT)===pe.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(v.buttons&pe.MIDDLE)===pe.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(v.buttons&pe.RIGHT)===pe.RIGHT&&(this._state=this._state|this.mouseButtons.right);g()}},l=v=>{const b=this._lockedPointer||this._findPointerById(1);b&&(b.clientX=v.clientX,b.clientY=v.clientY,b.deltaX=v.movementX,b.deltaY=v.movementY,this._state=0,(this._lockedPointer||(v.buttons&pe.LEFT)===pe.LEFT)&&(this._state=this._state|this.mouseButtons.left),(v.buttons&pe.MIDDLE)===pe.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(v.buttons&pe.RIGHT)===pe.RIGHT&&(this._state=this._state|this.mouseButtons.right),g())},u=v=>{const b=this._findPointerById(v.pointerId);if(!(b&&b===this._lockedPointer)){if(b&&this._disposePointer(b),v.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=G.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=G.NONE;_()}},h=()=>{const v=this._findPointerById(1);v&&v===this._lockedPointer||(v&&this._disposePointer(v),this._state=G.NONE,_())};let d=-1;const f=v=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===G.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const C=this._domElement.getBoundingClientRect(),S=v.clientX/C.width,R=v.clientY/C.height;if(Sthis._interactiveArea.right||Rthis._interactiveArea.bottom)return}if(v.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===G.ROTATE||this.mouseButtons.wheel===G.TRUCK){const C=performance.now();d-C<1e3&&this._getClientRect(this._elementRect),d=C}const b=f1?-1:-3,T=v.deltaMode===1?v.deltaY/b:v.deltaY/(b*10),E=this.dollyToCursor?(v.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,w=this.dollyToCursor?(v.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case G.ROTATE:{this._rotateInternal(v.deltaX,v.deltaY),this._isUserControllingRotate=!0;break}case G.TRUCK:{this._truckInternal(v.deltaX,v.deltaY,!1),this._isUserControllingTruck=!0;break}case G.OFFSET:{this._truckInternal(v.deltaX,v.deltaY,!0),this._isUserControllingOffset=!0;break}case G.DOLLY:{this._dollyInternal(-T,E,w),this._isUserControllingDolly=!0;break}case G.ZOOM:{this._zoomInternal(-T,E,w),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},m=v=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===pl.ACTION.NONE){const b=v instanceof PointerEvent?v.pointerId:(v instanceof MouseEvent,0),T=this._findPointerById(b);T&&this._disposePointer(T),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",h);return}v.preventDefault()}},p=v=>{if(!this._enabled)return;if($c(this._activePointers,Et),this._getClientRect(this._elementRect),s.copy(Et),r.copy(Et),this._activePointers.length>=2){const T=Et.x-this._activePointers[1].clientX,E=Et.y-this._activePointers[1].clientY,w=Math.sqrt(T*T+E*E);i.set(0,w);const C=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,S=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;r.set(C,S)}if(this._state=0,!v)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in v&&v.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(v.buttons&pe.LEFT)===pe.LEFT&&(this._state=this._state|this.mouseButtons.left),(v.buttons&pe.MIDDLE)===pe.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(v.buttons&pe.RIGHT)===pe.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&G.ROTATE)===G.ROTATE||(this._state&G.TOUCH_ROTATE)===G.TOUCH_ROTATE||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE||(this._state&G.TOUCH_ZOOM_ROTATE)===G.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&G.TRUCK)===G.TRUCK||(this._state&G.TOUCH_TRUCK)===G.TOUCH_TRUCK||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_ZOOM_TRUCK)===G.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&G.DOLLY)===G.DOLLY||(this._state&G.TOUCH_DOLLY)===G.TOUCH_DOLLY||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&G.ZOOM)===G.ZOOM||(this._state&G.TOUCH_ZOOM)===G.TOUCH_ZOOM||(this._state&G.TOUCH_ZOOM_TRUCK)===G.TOUCH_ZOOM_TRUCK||(this._state&G.TOUCH_ZOOM_OFFSET)===G.TOUCH_ZOOM_OFFSET||(this._state&G.TOUCH_ZOOM_ROTATE)===G.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&G.OFFSET)===G.OFFSET||(this._state&G.TOUCH_OFFSET)===G.TOUCH_OFFSET||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET||(this._state&G.TOUCH_ZOOM_OFFSET)===G.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},g=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,$c(this._activePointers,Et);const b=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,T=b?-b.deltaX:r.x-Et.x,E=b?-b.deltaY:r.y-Et.y;if(r.copy(Et),((this._state&G.ROTATE)===G.ROTATE||(this._state&G.TOUCH_ROTATE)===G.TOUCH_ROTATE||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE||(this._state&G.TOUCH_ZOOM_ROTATE)===G.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(T,E),this._isUserControllingRotate=!0),(this._state&G.DOLLY)===G.DOLLY||(this._state&G.ZOOM)===G.ZOOM){const w=this.dollyToCursor?(s.x-this._elementRect.x)/this._elementRect.width*2-1:0,C=this.dollyToCursor?(s.y-this._elementRect.y)/this._elementRect.height*-2+1:0,S=this.dollyDragInverted?-1:1;(this._state&G.DOLLY)===G.DOLLY?(this._dollyInternal(S*E*zo,w,C),this._isUserControllingDolly=!0):(this._zoomInternal(S*E*zo,w,C),this._isUserControllingZoom=!0)}if((this._state&G.TOUCH_DOLLY)===G.TOUCH_DOLLY||(this._state&G.TOUCH_ZOOM)===G.TOUCH_ZOOM||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_ZOOM_TRUCK)===G.TOUCH_ZOOM_TRUCK||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET||(this._state&G.TOUCH_ZOOM_OFFSET)===G.TOUCH_ZOOM_OFFSET||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE||(this._state&G.TOUCH_ZOOM_ROTATE)===G.TOUCH_ZOOM_ROTATE){const w=Et.x-this._activePointers[1].clientX,C=Et.y-this._activePointers[1].clientY,S=Math.sqrt(w*w+C*C),R=i.y-S;i.set(0,S);const O=this.dollyToCursor?(r.x-this._elementRect.x)/this._elementRect.width*2-1:0,L=this.dollyToCursor?(r.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&G.TOUCH_DOLLY)===G.TOUCH_DOLLY||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET?(this._dollyInternal(R*zo,O,L),this._isUserControllingDolly=!0):(this._zoomInternal(R*zo,O,L),this._isUserControllingZoom=!0)}((this._state&G.TRUCK)===G.TRUCK||(this._state&G.TOUCH_TRUCK)===G.TOUCH_TRUCK||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_ZOOM_TRUCK)===G.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(T,E,!1),this._isUserControllingTruck=!0),((this._state&G.OFFSET)===G.OFFSET||(this._state&G.TOUCH_OFFSET)===G.TOUCH_OFFSET||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET||(this._state&G.TOUCH_ZOOM_OFFSET)===G.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(T,E,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},_=()=>{$c(this._activePointers,Et),r.copy(Et),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mouseup",h),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",x),this._domElement.ownerDocument.addEventListener("pointerlockerror",k),this._domElement.ownerDocument.addEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),p())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",x),this._domElement.ownerDocument.removeEventListener("pointerlockerror",k))};const x=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},k=()=>{this.unlockPointer()};this._addAllEventListeners=v=>{this._domElement=v,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",o),p1&&this._domElement.addEventListener("mousedown",a),this._domElement.addEventListener("pointercancel",u),this._domElement.addEventListener("wheel",f,{passive:!1}),this._domElement.addEventListener("contextmenu",m)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",o),this._domElement.removeEventListener("mousedown",a),this._domElement.removeEventListener("pointercancel",u),this._domElement.removeEventListener("wheel",f,{passive:!1}),this._domElement.removeEventListener("contextmenu",m),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mouseup",h),this._domElement.ownerDocument.removeEventListener("pointerlockchange",x),this._domElement.ownerDocument.removeEventListener("pointerlockerror",k))},this.cancel=()=>{this._state!==G.NONE&&(this._state=G.NONE,this._activePointers.length=0,_())},t&&this.connect(t),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=sn(e.width,0,1),this._interactiveArea.height=sn(e.height,0,1),this._interactiveArea.x=sn(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=sn(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,s=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,s)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,s=!1){this._isUserControllingRotate=!1;const r=sn(e,this.minAzimuthAngle,this.maxAzimuthAngle),i=sn(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=r,this._sphericalEnd.phi=i,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,s||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const o=!s||Te(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Te(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(o)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=dr.NONE,this._changedDolly=0,this._dollyToNoClamp(sn(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){const s=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const o=this._collisionTest(),a=Te(o,this._spherical.radius);if(!(s>e)&&a)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,o)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);const i=!t||Te(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(i)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(_i).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const s=!t||Te(this._target.x,this._targetEnd.x,this.restThreshold)&&Te(this._target.y,this._targetEnd.y,this.restThreshold)&&Te(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(s)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=sn(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const s=!t||Te(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(s)}pan(e,t,s=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,s)}truck(e,t,s=!1){this._camera.updateMatrix(),yn.setFromMatrixColumn(this._camera.matrix,0),vn.setFromMatrixColumn(this._camera.matrix,1),yn.multiplyScalar(e),vn.multiplyScalar(-t);const r=_e.copy(yn).add(vn),i=xe.copy(this._targetEnd).add(r);return this.moveTo(i.x,i.y,i.z,s)}forward(e,t=!1){_e.setFromMatrixColumn(this._camera.matrix,0),_e.crossVectors(this._camera.up,_e),_e.multiplyScalar(e);const s=xe.copy(this._targetEnd).add(_e);return this.moveTo(s.x,s.y,s.z,t)}elevate(e,t=!1){return _e.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+_e.x,this._targetEnd.y+_e.y,this._targetEnd.z+_e.z,t)}moveTo(e,t,s,r=!1){this._isUserControllingTruck=!1;const i=_e.set(e,t,s).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,i,this.boundaryFriction),this._needsUpdate=!0,r||this._target.copy(this._targetEnd);const o=!r||Te(this._target.x,this._targetEnd.x,this.restThreshold)&&Te(this._target.y,this._targetEnd.y,this.restThreshold)&&Te(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(o)}lookInDirectionOf(e,t,s,r=!1){const a=_e.set(e,t,s).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(a.x,a.y,a.z,r)}fitToBox(e,t,{cover:s=!1,paddingLeft:r=0,paddingRight:i=0,paddingBottom:o=0,paddingTop:a=0}={}){const c=[],l=e.isBox3?mr.copy(e):mr.setFromObject(e);l.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const u=Yh(this._sphericalEnd.theta,Hh),h=Yh(this._sphericalEnd.phi,Hh);c.push(this.rotateTo(u,h,t));const d=_e.setFromSpherical(this._sphericalEnd).normalize(),f=Jh.setFromUnitVectors(d,Lc),m=Te(Math.abs(d.y),1);m&&f.multiply(Vc.setFromAxisAngle(Uo,u)),f.multiply(this._yAxisUpSpaceInverse);const p=Qh.makeEmpty();xe.copy(l.min).applyQuaternion(f),p.expandByPoint(xe),xe.copy(l.min).setX(l.max.x).applyQuaternion(f),p.expandByPoint(xe),xe.copy(l.min).setY(l.max.y).applyQuaternion(f),p.expandByPoint(xe),xe.copy(l.max).setZ(l.min.z).applyQuaternion(f),p.expandByPoint(xe),xe.copy(l.min).setZ(l.max.z).applyQuaternion(f),p.expandByPoint(xe),xe.copy(l.max).setY(l.min.y).applyQuaternion(f),p.expandByPoint(xe),xe.copy(l.max).setX(l.min.x).applyQuaternion(f),p.expandByPoint(xe),xe.copy(l.max).applyQuaternion(f),p.expandByPoint(xe),p.min.x-=r,p.min.y-=o,p.max.x+=i,p.max.y+=a,f.setFromUnitVectors(Lc,d),m&&f.premultiply(Vc.invert()),f.premultiply(this._yAxisUpSpace);const g=p.getSize(_e),_=p.getCenter(xe).applyQuaternion(f);if(Ms(this._camera)){const x=this.getDistanceToFitBox(g.x,g.y,g.z,s);c.push(this.moveTo(_.x,_.y,_.z,t)),c.push(this.dollyTo(x,t)),c.push(this.setFocalOffset(0,0,0,t))}else if(as(this._camera)){const x=this._camera,k=x.right-x.left,v=x.top-x.bottom,b=s?Math.max(k/g.x,v/g.y):Math.min(k/g.x,v/g.y);c.push(this.moveTo(_.x,_.y,_.z,t)),c.push(this.zoomTo(b,t)),c.push(this.setFocalOffset(0,0,0,t))}return Promise.all(c)}fitToSphere(e,t){const s=[],i=e instanceof he.Sphere?jc.copy(e):pl.createBoundingSphere(e,jc);if(s.push(this.moveTo(i.center.x,i.center.y,i.center.z,t)),Ms(this._camera)){const o=this.getDistanceToFitSphere(i.radius);s.push(this.dollyTo(o,t))}else if(as(this._camera)){const o=this._camera.right-this._camera.left,a=this._camera.top-this._camera.bottom,c=2*i.radius,l=Math.min(o/c,a/c);s.push(this.zoomTo(l,t))}return s.push(this.setFocalOffset(0,0,0,t)),Promise.all(s)}setLookAt(e,t,s,r,i,o,a=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=dr.NONE,this._changedDolly=0;const c=xe.set(r,i,o),l=_e.set(e,t,s);this._targetEnd.copy(c),this._sphericalEnd.setFromVector3(l.sub(c).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,a||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const u=!a||Te(this._target.x,this._targetEnd.x,this.restThreshold)&&Te(this._target.y,this._targetEnd.y,this.restThreshold)&&Te(this._target.z,this._targetEnd.z,this.restThreshold)&&Te(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Te(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Te(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(u)}lerpLookAt(e,t,s,r,i,o,a,c,l,u,h,d,f,m=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=dr.NONE,this._changedDolly=0;const p=_e.set(r,i,o),g=xe.set(e,t,s);qt.setFromVector3(g.sub(p).applyQuaternion(this._yAxisUpSpace));const _=pr.set(u,h,d),x=xe.set(a,c,l);yi.setFromVector3(x.sub(_).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(p.lerp(_,f));const k=yi.theta-qt.theta,v=yi.phi-qt.phi,b=yi.radius-qt.radius;this._sphericalEnd.set(qt.radius+b*f,qt.phi+v*f,qt.theta+k*f),this.normalizeRotations(),this._needsUpdate=!0,m||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const T=!m||Te(this._target.x,this._targetEnd.x,this.restThreshold)&&Te(this._target.y,this._targetEnd.y,this.restThreshold)&&Te(this._target.z,this._targetEnd.z,this.restThreshold)&&Te(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Te(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Te(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(T)}setPosition(e,t,s,r=!1){return this.setLookAt(e,t,s,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,r)}setTarget(e,t,s,r=!1){const i=this.getPosition(_e),o=this.setLookAt(i.x,i.y,i.z,e,t,s,r);return this._sphericalEnd.phi=sn(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),o}setFocalOffset(e,t,s,r=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,s),this._needsUpdate=!0,r||this._focalOffset.copy(this._focalOffsetEnd);const i=!r||Te(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&Te(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&Te(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(i)}setOrbitPoint(e,t,s){this._camera.updateMatrixWorld(),yn.setFromMatrixColumn(this._camera.matrixWorldInverse,0),vn.setFromMatrixColumn(this._camera.matrixWorldInverse,1),Is.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const r=_e.set(e,t,s),i=r.distanceTo(this._camera.position),o=r.sub(this._camera.position);yn.multiplyScalar(o.x),vn.multiplyScalar(o.y),Is.multiplyScalar(o.z),_e.copy(yn).add(vn).add(Is),_e.z=_e.z+i,this.dollyTo(i,!1),this.setFocalOffset(-_e.x,_e.y,-_e.z,!1),this.moveTo(e,t,s,!1)}setBoundary(e){if(!e){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,s,r){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new he.Vector4,typeof e=="number"?this._viewport.set(e,t,s,r):this._viewport.copy(e)}getDistanceToFitBox(e,t,s,r=!1){if(Fc(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const i=e/t,o=this._camera.getEffectiveFOV()*pi,a=this._camera.aspect;return((r?i>a:it.pointerId===e)}_findPointerByMouseButton(e){return this._activePointers.find(t=>t.mouseButton===e)}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,s){const r=t.lengthSq();if(r===0)return e;const i=xe.copy(t).add(e),a=this._boundary.clampPoint(i,pr).sub(i),c=a.lengthSq();if(c===0)return e.add(t);if(c===r)return e;if(s===0)return e.add(t).add(a);{const l=1+s*c/t.dot(a);return e.add(xe.copy(t).multiplyScalar(l)).add(a.multiplyScalar(1-s))}}_updateNearPlaneCorners(){if(Ms(this._camera)){const e=this._camera,t=e.near,s=e.getEffectiveFOV()*pi,r=Math.tan(s*.5)*t,i=r*e.aspect;this._nearPlaneCorners[0].set(-i,-r,0),this._nearPlaneCorners[1].set(i,-r,0),this._nearPlaneCorners[2].set(i,r,0),this._nearPlaneCorners[3].set(-i,r,0)}else if(as(this._camera)){const e=this._camera,t=1/e.zoom,s=e.left*t,r=e.right*t,i=e.top*t,o=e.bottom*t;this._nearPlaneCorners[0].set(s,i,0),this._nearPlaneCorners[1].set(r,i,0),this._nearPlaneCorners[2].set(r,o,0),this._nearPlaneCorners[3].set(s,o,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||Fc(this._camera,"_collisionTest"))return e;const s=this._getTargetDirection(_i);zc.lookAt(Xh,s,this._camera.up);for(let r=0;r<4;r++){const i=xe.copy(this._nearPlaneCorners[r]);i.applyMatrix4(zc);const o=pr.addVectors(this._target,i);Bo.set(o,s),Bo.far=this._spherical.radius+1;const a=Bo.intersectObjects(this.colliderMeshes);a.length!==0&&a[0].distance{const s=()=>{this.removeEventListener("rest",s),t()};this.addEventListener("rest",s)}))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e,t=new he.Sphere){const s=t,r=s.center;mr.makeEmpty(),e.traverseVisible(o=>{o.isMesh&&mr.expandByObject(o)}),mr.getCenter(r);let i=0;return e.traverseVisible(o=>{if(!o.isMesh)return;const a=o,c=a.geometry.clone();c.applyMatrix4(a.matrixWorld);const u=c.attributes.position;for(let h=0,d=u.count;h{y.useMemo(()=>{Uc.install({THREE:sy}),lu({CameraControlsImpl:Uc})},[]);const{camera:t,domElement:s,makeDefault:r,onStart:i,onEnd:o,onChange:a,regress:c,...l}=n,u=ze(b=>b.camera),h=ze(b=>b.gl),d=ze(b=>b.invalidate),f=ze(b=>b.events),m=ze(b=>b.setEvents),p=ze(b=>b.set),g=ze(b=>b.get),_=ze(b=>b.performance),x=t||u,k=s||f.connected||h.domElement,v=y.useMemo(()=>new Uc(x),[x]);return Wt((b,T)=>{v.enabled&&v.update(T)},-1),y.useEffect(()=>(v.connect(k),()=>void v.disconnect()),[k,v]),y.useEffect(()=>{const b=w=>{d(),c&&_.regress(),a&&a(w)},T=w=>{i&&i(w)},E=w=>{o&&o(w)};return v.addEventListener("update",b),v.addEventListener("controlstart",T),v.addEventListener("controlend",E),()=>{v.removeEventListener("update",b),v.removeEventListener("controlstart",T),v.removeEventListener("controlend",E)}},[v,i,o,d,m,c,a]),y.useEffect(()=>{if(r){const b=g().controls;return p({controls:v}),()=>p({controls:b})}},[r,v]),y.createElement("primitive",Ee({ref:e,object:v},l))});ke.func.isRequired,ke.arrayOf(ke.oneOfType([ke.element,ke.func])).isRequired;const ed=new _o,td=new _o,Wo=[],vi=new op;class g1 extends iy{constructor(){super(),this.color=new du("white"),this.instance={current:void 0},this.instanceKey={current:void 0}}get geometry(){var e;return(e=this.instance.current)==null?void 0:e.geometry}raycast(e,t){const s=this.instance.current;if(!s||!s.geometry||!s.material)return;vi.geometry=s.geometry;const r=s.matrixWorld,i=s.userData.instances.indexOf(this.instanceKey);if(!(i===-1||i>s.count)){s.getMatrixAt(i,ed),td.multiplyMatrices(r,ed),vi.matrixWorld=td,s.material instanceof oy?vi.material.side=s.material.side:vi.material.side=s.material[0].side,vi.raycast(e,Wo);for(let o=0,a=Wo.length;o{y.useMemo(()=>lu({PositionMesh:g1}),[]);const r=y.useRef(),{subscribe:i,getParent:o}=y.useContext(n||yp);return y.useLayoutEffect(()=>i(r),[]),y.createElement("positionMesh",Ee({instance:o(),instanceKey:r,ref:ec([s,r])},t),e)}),y1=y.forwardRef(({children:n,range:e,limit:t=1e3,frames:s=1/0,...r},i)=>{const[{context:o,instance:a}]=y.useState(()=>{const g=y.createContext(null);return{context:g,instance:y.forwardRef((_,x)=>y.createElement(vp,Ee({context:g},_,{ref:x})))}}),c=y.useRef(null),[l,u]=y.useState([]),[[h,d]]=y.useState(()=>{const g=new Float32Array(t*16);for(let _=0;_1))]});y.useEffect(()=>{c.current.instanceMatrix.needsUpdate=!0});let f=0,m=0;Wt(()=>{if(s===1/0||f({getParent:()=>c,subscribe:g=>(u(_=>[..._,g]),()=>u(_=>_.filter(x=>x.current!==g.current)))}),[]);return y.createElement("instancedMesh",Ee({userData:{instances:l},matrixAutoUpdate:!1,ref:ec([i,c]),args:[null,null,0],raycast:()=>null},r),y.createElement("instancedBufferAttribute",{attach:"instanceMatrix",count:h.length/16,array:h,itemSize:16,usage:Mh}),y.createElement("instancedBufferAttribute",{attach:"instanceColor",count:d.length/3,array:d,itemSize:3,usage:Mh}),typeof n=="function"?y.createElement(o.Provider,{value:p},n(a)):y.createElement(yp.Provider,{value:p},n))}),bp=y.createContext(null),v1=y.forwardRef((n,e)=>{y.useMemo(()=>lu({SegmentObject:b1}),[]);const{limit:t=1e3,lineWidth:s=1,children:r,...i}=n,[o,a]=y.useState([]),[c]=y.useState(()=>new tp),[l]=y.useState(()=>new x_),[u]=y.useState(()=>new w_),[h]=y.useState(()=>new we(512,512)),[d]=y.useState(()=>Array(t*6).fill(0)),[f]=y.useState(()=>Array(t*6).fill(0)),m=y.useMemo(()=>({subscribe:p=>(a(g=>[...g,p]),()=>a(g=>g.filter(_=>_.current!==p.current)))}),[]);return Wt(()=>{for(let g=0;gn instanceof ae?n:new ae(...typeof n=="number"?[n,n,n]:n),x1=y.forwardRef(({color:n,start:e,end:t},s)=>{const r=y.useContext(bp);if(!r)throw"Segment must used inside Segments component.";const i=y.useRef(null);return y.useLayoutEffect(()=>r.subscribe(i),[]),y.createElement("segmentObject",{ref:ec([i,s]),color:n,start:ad(e),end:ad(t)})});function w1({all:n,scene:e,camera:t}){const s=ze(({gl:o})=>o),r=ze(({camera:o})=>o),i=ze(({scene:o})=>o);return y.useLayoutEffect(()=>{const o=[];n&&(e||i).traverse(l=>{l.visible===!1&&(o.push(l),l.visible=!0)}),s.compile(e||i,t||r);const a=new ay(128);new cy(.01,1e5,a).update(s,e||i),a.dispose(),o.forEach(l=>l.visible=!1)},[]),null}function k1({pixelated:n}){const e=ze(o=>o.gl),t=ze(o=>o.internal.active),s=ze(o=>o.performance.current),r=ze(o=>o.viewport.initialDpr),i=ze(o=>o.setDpr);return y.useEffect(()=>{const o=e.domElement;return()=>{t&&i(r),n&&o&&(o.style.imageRendering="auto")}},[]),y.useEffect(()=>{i(s*r),n&&e.domElement&&(e.domElement.style.imageRendering=s===1?"auto":"pixelated")},[s]),null}function T1(){const n=ze(s=>s.get),e=ze(s=>s.setEvents),t=ze(s=>s.performance.current);return y.useEffect(()=>{const s=n().events.enabled;return()=>e({enabled:s})},[]),y.useEffect(()=>e({enabled:t===1}),[t]),null}const E1=y.createContext(null);function C1({children:n,enabled:e=!0}){const[t,s]=y.useState([]),r=y.useMemo(()=>({selected:t,select:s,enabled:e}),[t,s,e]);return B.jsx(E1.Provider,{value:r,children:n})}function S1(n,e){typeof n=="function"?n(e):n!=null&&(n.current=e)}function xp(...n){return e=>n.forEach(t=>S1(t,e))}function Qr(...n){return y.useCallback(xp(...n),n)}const wp=y.forwardRef((n,e)=>{const{children:t,...s}=n,r=y.Children.toArray(t),i=r.find(O1);if(i){const o=i.props.children,a=r.map(c=>c===i?y.Children.count(o)>1?y.Children.only(null):y.isValidElement(o)?o.props.children:null:c);return y.createElement(ml,Ee({},s,{ref:e}),y.isValidElement(o)?y.cloneElement(o,void 0,a):null)}return y.createElement(ml,Ee({},s,{ref:e}),t)});wp.displayName="Slot";const ml=y.forwardRef((n,e)=>{const{children:t,...s}=n;return y.isValidElement(t)?y.cloneElement(t,{...A1(s,t.props),ref:e?xp(e,t.ref):t.ref}):y.Children.count(t)>1?y.Children.only(null):null});ml.displayName="SlotClone";const kp=({children:n})=>y.createElement(y.Fragment,null,n);function O1(n){return y.isValidElement(n)&&n.type===kp}function A1(n,e){const t={...e};for(const s in e){const r=n[s],i=e[s];/^on[A-Z]/.test(s)?r&&i?t[s]=(...a)=>{i(...a),r(...a)}:r&&(t[s]=r):s==="style"?t[s]={...r,...i}:s==="className"&&(t[s]=[r,i].filter(Boolean).join(" "))}return{...n,...t}}const P1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],rr=P1.reduce((n,e)=>{const t=y.forwardRef((s,r)=>{const{asChild:i,...o}=s,a=i?wp:e;return y.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),y.createElement(a,Ee({},o,{ref:r}))});return t.displayName=`Primitive.${e}`,{...n,[e]:t}},{});function R1(n,e){n&&au.flushSync(()=>n.dispatchEvent(e))}const D1=y.forwardRef((n,e)=>{var t;const{container:s=globalThis==null||(t=globalThis.document)===null||t===void 0?void 0:t.body,...r}=n;return s?Xf.createPortal(y.createElement(rr.div,Ee({},r,{ref:e})),s):null}),M1=D1;var cd=Object.prototype.hasOwnProperty;function ji(n,e){var t,s;if(n===e)return!0;if(n&&e&&(t=n.constructor)===e.constructor){if(t===Date)return n.getTime()===e.getTime();if(t===RegExp)return n.toString()===e.toString();if(t===Array){if((s=n.length)===e.length)for(;s--&&ji(n[s],e[s]););return s===-1}if(!t||typeof n=="object"){s=0;for(t in n)if(cd.call(n,t)&&++s&&!cd.call(e,t)||!(t in e)||!ji(n[t],e[t]))return!1;return Object.keys(e).length===s}}return n!==n&&e!==e}function vo(n,e){if(Object.is(n,e))return!0;if(typeof n!="object"||n===null||typeof e!="object"||e===null)return!1;const t=Object.keys(n);if(t.length!==Object.keys(e).length)return!1;for(let s=0;s0;)o[a]=arguments[a+4];n.call(this,o),n.captureStackTrace&&n.captureStackTrace(this,e),this.rule=t,this.value=s,this.cause=r,this.target=i}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e}(Error),Cn=function(e,t){e===void 0&&(e=[]),t===void 0&&(t=[]),this.chain=e,this.nextRuleModifiers=t};Cn.prototype._applyRule=function(e,t){var s=this;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return s.chain.push(new oc(t,e.apply(s,r),r,s.nextRuleModifiers)),s.nextRuleModifiers=[],s}};Cn.prototype._applyModifier=function(e,t){return this.nextRuleModifiers.push(new I1(t,e.simple,e.async)),this};Cn.prototype._clone=function(){return new Cn(this.chain.slice(),this.nextRuleModifiers.slice())};Cn.prototype.test=function(e){return this.chain.every(function(t){return t._test(e)})};Cn.prototype.testAll=function(e){var t=[];return this.chain.forEach(function(s){try{s._check(e)}catch(r){t.push(new bu(s,e,r))}}),t};Cn.prototype.check=function(e){this.chain.forEach(function(t){try{t._check(e)}catch(s){throw new bu(t,e,s)}})};Cn.prototype.testAsync=function(e){var t=this;return new Promise(function(s,r){Cp(e,t.chain.slice(),s,r)})};function Cp(n,e,t,s){if(e.length){var r=e.shift();r._testAsync(n).then(function(){Cp(n,e,t,s)},function(i){s(new bu(r,n,i))})}else t(n)}var ld=function(n,e){return e&&typeof n=="string"&&n.trim().length===0?!0:n==null};function N1(n,e){return e===void 0&&(e=!1),{simple:function(t){return ld(t,e)||n.check(t)===void 0},async:function(t){return ld(t,e)||n.testAsync(t)}}}function St(){return typeof Proxy<"u"?Sp(new Cn):gl(new Cn)}var Vi={};St.extend=function(n){Object.assign(Vi,n)};St.clearCustomRules=function(){Vi={}};function Sp(n){return new Proxy(n,{get:function(t,s){if(s in t)return t[s];var r=Sp(n._clone());if(s in ga)return r._applyModifier(ga[s],s);if(s in Vi)return r._applyRule(Vi[s],s);if(s in _l)return r._applyRule(_l[s],s)}})}function gl(n){var e=function(r,i){return Object.keys(r).forEach(function(o){i[o]=function(){for(var a=[],c=arguments.length;c--;)a[c]=arguments[c];var l=gl(i._clone()),u=l._applyRule(r[o],o).apply(void 0,a);return u}}),i},t=e(_l,n),s=e(Vi,t);return Object.keys(ga).forEach(function(r){Object.defineProperty(s,r,{get:function(){var i=gl(s._clone());return i._applyModifier(ga[r],r)}})}),s}var ga={not:{simple:function(n){return function(e){return!n(e)}},async:function(n){return function(e){return Promise.resolve(n(e)).then(function(t){return!t}).catch(function(){return!0})}}},some:{simple:function(n){return function(e){return qo(e).some(function(t){try{return n(t)}catch{return!1}})}},async:function(n){return function(e){return Promise.all(qo(e).map(function(t){try{return n(t).catch(function(){return!1})}catch{return!1}})).then(function(t){return t.some(Boolean)})}}},every:{simple:function(n){return function(e){return e!==!1&&qo(e).every(n)}},async:function(n){return function(e){return Promise.all(qo(e).map(n)).then(function(t){return t.every(Boolean)})}}},strict:{simple:function(n,e){return function(t){return ud(e)&&t&&typeof t=="object"?Object.keys(e.args[0]).length===Object.keys(t).length&&n(t):n(t)}},async:function(n,e){return function(t){return Promise.resolve(n(t)).then(function(s){return ud(e)&&t&&typeof t=="object"?Object.keys(e.args[0]).length===Object.keys(t).length&&s:s}).catch(function(){return!1})}}}};function ud(n){return n&&n.name==="schema"&&n.args.length>0&&typeof n.args[0]=="object"}function qo(n){return typeof n=="string"?n.split(""):n}var _l={equal:function(n){return function(e){return e==n}},exact:function(n){return function(e){return e===n}},number:function(n){return n===void 0&&(n=!0),function(e){return typeof e=="number"&&(n||isFinite(e))}},integer:function(){return function(n){var e=Number.isInteger||$1;return e(n)}},numeric:function(){return function(n){return!isNaN(parseFloat(n))&&isFinite(n)}},string:function(){return gr("string")},boolean:function(){return gr("boolean")},undefined:function(){return gr("undefined")},null:function(){return gr("null")},array:function(){return gr("array")},object:function(){return gr("object")},instanceOf:function(n){return function(e){return e instanceof n}},pattern:function(n){return function(e){return n.test(e)}},lowercase:function(){return function(n){return typeof n=="boolean"||n===n.toLowerCase()&&n.trim()!==""}},uppercase:function(){return function(n){return n===n.toUpperCase()&&n.trim()!==""}},vowel:function(){return function(n){return/^[aeiou]+$/i.test(n)}},consonant:function(){return function(n){return/^(?=[^aeiou])([a-z]+)$/i.test(n)}},first:function(n){return function(e){return e[0]==n}},last:function(n){return function(e){return e[e.length-1]==n}},empty:function(){return function(n){return n.length===0}},length:function(n,e){return function(t){return t.length>=n&&t.length<=(e||n)}},minLength:function(n){return function(e){return e.length>=n}},maxLength:function(n){return function(e){return e.length<=n}},negative:function(){return function(n){return n<0}},positive:function(){return function(n){return n>=0}},between:function(n,e){return function(t){return t>=n&&t<=e}},range:function(n,e){return function(t){return t>=n&&t<=e}},lessThan:function(n){return function(e){return en}},greaterThanOrEqual:function(n){return function(e){return e>=n}},even:function(){return function(n){return n%2===0}},odd:function(){return function(n){return n%2!==0}},includes:function(n){return function(e){return~e.indexOf(n)}},schema:function(n){return F1(n)},passesAnyOf:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return function(t){return n.some(function(s){return s.test(t)})}},optional:N1};function gr(n){return function(e){return Array.isArray(e)&&n==="array"||e===null&&n==="null"||typeof e===n}}function $1(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n}function F1(n){return{simple:function(e){var t=[];if(Object.keys(n).forEach(function(s){var r=n[s];try{r.check((e||{})[s])}catch(i){i.target=s,t.push(i)}}),t.length>0)throw t;return!0},async:function(e){var t=[],s=Object.keys(n).map(function(r){var i=n[r];return i.testAsync((e||{})[r]).catch(function(o){o.target=r,t.push(o)})});return Promise.all(s).then(function(){if(t.length>0)throw t;return!0})}}}function jn(n,e,{checkForDefaultPrevented:t=!0}={}){return function(r){if(n==null||n(r),t===!1||!r.defaultPrevented)return e==null?void 0:e(r)}}function Op(n,e=[]){let t=[];function s(i,o){const a=y.createContext(o),c=t.length;t=[...t,o];function l(h){const{scope:d,children:f,...m}=h,p=(d==null?void 0:d[n][c])||a,g=y.useMemo(()=>m,Object.values(m));return y.createElement(p.Provider,{value:g},f)}function u(h,d){const f=(d==null?void 0:d[n][c])||a,m=y.useContext(f);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const r=()=>{const i=t.map(o=>y.createContext(o));return function(a){const c=(a==null?void 0:a[n])||i;return y.useMemo(()=>({[`__scope${n}`]:{...a,[n]:c}}),[a,c])}};return r.scopeName=n,[s,L1(r,...e)]}function L1(...n){const e=n[0];if(n.length===1)return e;const t=()=>{const s=n.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const o=s.reduce((a,{useScope:c,scopeName:l})=>{const h=c(i)[`__scope${l}`];return{...a,...h}},{});return y.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}function Jr(n){const e=y.useRef(n);return y.useEffect(()=>{e.current=n}),y.useMemo(()=>(...t)=>{var s;return(s=e.current)===null||s===void 0?void 0:s.call(e,...t)},[])}function j1(n,e=globalThis==null?void 0:globalThis.document){const t=Jr(n);y.useEffect(()=>{const s=r=>{r.key==="Escape"&&t(r)};return e.addEventListener("keydown",s),()=>e.removeEventListener("keydown",s)},[t,e])}const yl="dismissableLayer.update",V1="dismissableLayer.pointerDownOutside",z1="dismissableLayer.focusOutside";let hd;const U1=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),B1=y.forwardRef((n,e)=>{var t;const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:c,...l}=n,u=y.useContext(U1),[h,d]=y.useState(null),f=(t=h==null?void 0:h.ownerDocument)!==null&&t!==void 0?t:globalThis==null?void 0:globalThis.document,[,m]=y.useState({}),p=Qr(e,w=>d(w)),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(_),k=h?g.indexOf(h):-1,v=u.layersWithOutsidePointerEventsDisabled.size>0,b=k>=x,T=W1(w=>{const C=w.target,S=[...u.branches].some(R=>R.contains(C));!b||S||(i==null||i(w),a==null||a(w),w.defaultPrevented||c==null||c())},f),E=q1(w=>{const C=w.target;[...u.branches].some(R=>R.contains(C))||(o==null||o(w),a==null||a(w),w.defaultPrevented||c==null||c())},f);return j1(w=>{k===u.layers.size-1&&(r==null||r(w),!w.defaultPrevented&&c&&(w.preventDefault(),c()))},f),y.useEffect(()=>{if(h)return s&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(hd=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(h)),u.layers.add(h),dd(),()=>{s&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=hd)}},[h,f,s,u]),y.useEffect(()=>()=>{h&&(u.layers.delete(h),u.layersWithOutsidePointerEventsDisabled.delete(h),dd())},[h,u]),y.useEffect(()=>{const w=()=>m({});return document.addEventListener(yl,w),()=>document.removeEventListener(yl,w)},[]),y.createElement(rr.div,Ee({},l,{ref:p,style:{pointerEvents:v?b?"auto":"none":void 0,...n.style},onFocusCapture:jn(n.onFocusCapture,E.onFocusCapture),onBlurCapture:jn(n.onBlurCapture,E.onBlurCapture),onPointerDownCapture:jn(n.onPointerDownCapture,T.onPointerDownCapture)}))});function W1(n,e=globalThis==null?void 0:globalThis.document){const t=Jr(n),s=y.useRef(!1),r=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!s.current){let l=function(){Ap(V1,t,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",r.current),r.current=l,e.addEventListener("click",r.current,{once:!0})):l()}else e.removeEventListener("click",r.current);s.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",r.current)}},[e,t]),{onPointerDownCapture:()=>s.current=!0}}function q1(n,e=globalThis==null?void 0:globalThis.document){const t=Jr(n),s=y.useRef(!1);return y.useEffect(()=>{const r=i=>{i.target&&!s.current&&Ap(z1,t,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,t]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function dd(){const n=new CustomEvent(yl);document.dispatchEvent(n)}function Ap(n,e,t,{discrete:s}){const r=t.originalEvent.target,i=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:t});e&&r.addEventListener(n,e,{once:!0}),s?R1(r,i):r.dispatchEvent(i)}const $r=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},H1=u_["useId".toString()]||(()=>{});let Y1=0;function G1(n){const[e,t]=y.useState(H1());return $r(()=>{n||t(s=>s??String(Y1++))},[n]),n||(e?`radix-${e}`:"")}const X1=y.forwardRef((n,e)=>{const{children:t,width:s=10,height:r=5,...i}=n;return y.createElement(rr.svg,Ee({},i,{ref:e,width:s,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),n.asChild?t:y.createElement("polygon",{points:"0,0 30,0 15,10"}))}),Z1=X1;function K1(n){const[e,t]=y.useState(void 0);return $r(()=>{if(n){t({width:n.offsetWidth,height:n.offsetHeight});const s=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.blockSize}else o=n.offsetWidth,a=n.offsetHeight;t({width:o,height:a})});return s.observe(n,{box:"border-box"}),()=>s.unobserve(n)}else t(void 0)},[n]),e}const Pp="Popper",[Rp,Dp]=Op(Pp),[Q1,Mp]=Rp(Pp),J1=n=>{const{__scopePopper:e,children:t}=n,[s,r]=y.useState(null);return y.createElement(Q1,{scope:e,anchor:s,onAnchorChange:r},t)},ev="PopperAnchor",tv=y.forwardRef((n,e)=>{const{__scopePopper:t,virtualRef:s,...r}=n,i=Mp(ev,t),o=y.useRef(null),a=Qr(e,o);return y.useEffect(()=>{i.onAnchorChange((s==null?void 0:s.current)||o.current)}),s?null:y.createElement(rr.div,Ee({},r,{ref:a}))}),Ip="PopperContent",[nv,sv]=Rp(Ip),rv=y.forwardRef((n,e)=>{var t,s,r,i,o,a,c,l;const{__scopePopper:u,side:h="bottom",sideOffset:d=0,align:f="center",alignOffset:m=0,arrowPadding:p=0,avoidCollisions:g=!0,collisionBoundary:_=[],collisionPadding:x=0,sticky:k="partial",hideWhenDetached:v=!1,updatePositionStrategy:b="optimized",onPlaced:T,...E}=n,w=Mp(Ip,u),[C,S]=y.useState(null),R=Qr(e,H=>S(H)),[O,L]=y.useState(null),j=K1(O),q=(t=j==null?void 0:j.width)!==null&&t!==void 0?t:0,z=(s=j==null?void 0:j.height)!==null&&s!==void 0?s:0,V=h+(f!=="center"?"-"+f:""),U=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},X=Array.isArray(_)?_:[_],Z=X.length>0,Q={padding:U,boundary:X.filter(cv),altBoundary:Z},{refs:$,floatingStyles:F,placement:A,isPositioned:M,middlewareData:Y}=Jy({strategy:"fixed",placement:V,whileElementsMounted:(...H)=>Zy(...H,{animationFrame:b==="always"}),elements:{reference:w.anchor},middleware:[Ay({mainAxis:d+z,alignmentAxis:m}),g&&Py({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Ry():void 0,...Q}),g&&Cy({...Q}),Dy({...Q,apply:({elements:H,rects:D,availableWidth:P,availableHeight:J})=>{const{width:se,height:le}=D.reference,ye=H.floating.style;ye.setProperty("--radix-popper-available-width",`${P}px`),ye.setProperty("--radix-popper-available-height",`${J}px`),ye.setProperty("--radix-popper-anchor-width",`${se}px`),ye.setProperty("--radix-popper-anchor-height",`${le}px`)}}),O&&Qy({element:O,padding:p}),lv({arrowWidth:q,arrowHeight:z}),v&&Sy({strategy:"referenceHidden",...Q})]}),[N,W]=Np(A),oe=Jr(T);$r(()=>{M&&(oe==null||oe())},[M,oe]);const re=(r=Y.arrow)===null||r===void 0?void 0:r.x,ie=(i=Y.arrow)===null||i===void 0?void 0:i.y,ne=((o=Y.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[ge,te]=y.useState();return $r(()=>{C&&te(window.getComputedStyle(C).zIndex)},[C]),y.createElement("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:M?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(a=Y.transformOrigin)===null||a===void 0?void 0:a.x,(c=Y.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:n.dir},y.createElement(nv,{scope:u,placedSide:N,onArrowChange:L,arrowX:re,arrowY:ie,shouldHideArrow:ne},y.createElement(rr.div,Ee({"data-side":N,"data-align":W},E,{ref:R,style:{...E.style,animation:M?void 0:"none",opacity:(l=Y.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))}),iv="PopperArrow",ov={top:"bottom",right:"left",bottom:"top",left:"right"},av=y.forwardRef(function(e,t){const{__scopePopper:s,...r}=e,i=sv(iv,s),o=ov[i.placedSide];return y.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},y.createElement(Z1,Ee({},r,{ref:t,style:{...r.style,display:"block"}})))});function cv(n){return n!==null}const lv=n=>({name:"transformOrigin",options:n,fn(e){var t,s,r,i,o;const{placement:a,rects:c,middlewareData:l}=e,h=((t=l.arrow)===null||t===void 0?void 0:t.centerOffset)!==0,d=h?0:n.arrowWidth,f=h?0:n.arrowHeight,[m,p]=Np(a),g={start:"0%",center:"50%",end:"100%"}[p],_=((s=(r=l.arrow)===null||r===void 0?void 0:r.x)!==null&&s!==void 0?s:0)+d/2,x=((i=(o=l.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+f/2;let k="",v="";return m==="bottom"?(k=h?g:`${_}px`,v=`${-f}px`):m==="top"?(k=h?g:`${_}px`,v=`${c.floating.height+f}px`):m==="right"?(k=`${-f}px`,v=h?g:`${x}px`):m==="left"&&(k=`${c.floating.width+f}px`,v=h?g:`${x}px`),{data:{x:k,y:v}}}});function Np(n){const[e,t="center"]=n.split("-");return[e,t]}const uv=J1,hv=tv,dv=rv,fv=av;function pv(n,e){return y.useReducer((t,s)=>{const r=e[t][s];return r??t},n)}const $p=n=>{const{present:e,children:t}=n,s=mv(e),r=typeof t=="function"?t({present:s.isPresent}):y.Children.only(t),i=Qr(s.ref,r.ref);return typeof t=="function"||s.isPresent?y.cloneElement(r,{ref:i}):null};$p.displayName="Presence";function mv(n){const[e,t]=y.useState(),s=y.useRef({}),r=y.useRef(n),i=y.useRef("none"),o=n?"mounted":"unmounted",[a,c]=pv(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=Ho(s.current);i.current=a==="mounted"?l:"none"},[a]),$r(()=>{const l=s.current,u=r.current;if(u!==n){const d=i.current,f=Ho(l);n?c("MOUNT"):f==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==f?"ANIMATION_OUT":"UNMOUNT"),r.current=n}},[n,c]),$r(()=>{if(e){const l=h=>{const f=Ho(s.current).includes(h.animationName);h.target===e&&f&&au.flushSync(()=>c("ANIMATION_END"))},u=h=>{h.target===e&&(i.current=Ho(s.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(l=>{l&&(s.current=getComputedStyle(l)),t(l)},[])}}function Ho(n){return(n==null?void 0:n.animationName)||"none"}function gv({prop:n,defaultProp:e,onChange:t=()=>{}}){const[s,r]=_v({defaultProp:e,onChange:t}),i=n!==void 0,o=i?n:s,a=Jr(t),c=y.useCallback(l=>{if(i){const h=typeof l=="function"?l(n):l;h!==n&&a(h)}else r(l)},[i,n,r,a]);return[o,c]}function _v({defaultProp:n,onChange:e}){const t=y.useState(n),[s]=t,r=y.useRef(s),i=Jr(e);return y.useEffect(()=>{r.current!==s&&(i(s),r.current=s)},[s,r,i]),t}const yv=y.forwardRef((n,e)=>y.createElement(rr.span,Ee({},n,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...n.style}}))),vv=yv,[ac,WD]=Op("Tooltip",[Dp]),cc=Dp(),bv="TooltipProvider",vl="tooltip.open",[qD,xu]=ac(bv),wu="Tooltip",[xv,lc]=ac(wu),wv=n=>{const{__scopeTooltip:e,children:t,open:s,defaultOpen:r=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=n,c=xu(wu,n.__scopeTooltip),l=cc(e),[u,h]=y.useState(null),d=G1(),f=y.useRef(0),m=o??c.disableHoverableContent,p=a??c.delayDuration,g=y.useRef(!1),[_=!1,x]=gv({prop:s,defaultProp:r,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(vl))):c.onClose(),i==null||i(E)}}),k=y.useMemo(()=>_?g.current?"delayed-open":"instant-open":"closed",[_]),v=y.useCallback(()=>{window.clearTimeout(f.current),g.current=!1,x(!0)},[x]),b=y.useCallback(()=>{window.clearTimeout(f.current),x(!1)},[x]),T=y.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,x(!0)},p)},[p,x]);return y.useEffect(()=>()=>window.clearTimeout(f.current),[]),y.createElement(uv,l,y.createElement(xv,{scope:e,contentId:d,open:_,stateAttribute:k,trigger:u,onTriggerChange:h,onTriggerEnter:y.useCallback(()=>{c.isOpenDelayed?T():v()},[c.isOpenDelayed,T,v]),onTriggerLeave:y.useCallback(()=>{m?b():window.clearTimeout(f.current)},[b,m]),onOpen:v,onClose:b,disableHoverableContent:m},t))},fd="TooltipTrigger",kv=y.forwardRef((n,e)=>{const{__scopeTooltip:t,...s}=n,r=lc(fd,t),i=xu(fd,t),o=cc(t),a=y.useRef(null),c=Qr(e,a,r.onTriggerChange),l=y.useRef(!1),u=y.useRef(!1),h=y.useCallback(()=>l.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),y.createElement(hv,Ee({asChild:!0},o),y.createElement(rr.button,Ee({"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute},s,{ref:c,onPointerMove:jn(n.onPointerMove,d=>{d.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:jn(n.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:jn(n.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:jn(n.onFocus,()=>{l.current||r.onOpen()}),onBlur:jn(n.onBlur,r.onClose),onClick:jn(n.onClick,r.onClose)})))}),Tv="TooltipPortal",[HD,Ev]=ac(Tv,{forceMount:void 0}),zi="TooltipContent",Cv=y.forwardRef((n,e)=>{const t=Ev(zi,n.__scopeTooltip),{forceMount:s=t.forceMount,side:r="top",...i}=n,o=lc(zi,n.__scopeTooltip);return y.createElement($p,{present:s||o.open},o.disableHoverableContent?y.createElement(Fp,Ee({side:r},i,{ref:e})):y.createElement(Sv,Ee({side:r},i,{ref:e})))}),Sv=y.forwardRef((n,e)=>{const t=lc(zi,n.__scopeTooltip),s=xu(zi,n.__scopeTooltip),r=y.useRef(null),i=Qr(e,r),[o,a]=y.useState(null),{trigger:c,onClose:l}=t,u=r.current,{onPointerInTransitChange:h}=s,d=y.useCallback(()=>{a(null),h(!1)},[h]),f=y.useCallback((m,p)=>{const g=m.currentTarget,_={x:m.clientX,y:m.clientY},x=Dv(_,g.getBoundingClientRect()),k=Mv(_,x),v=Iv(p.getBoundingClientRect()),b=$v([...k,...v]);a(b),h(!0)},[h]);return y.useEffect(()=>()=>d(),[d]),y.useEffect(()=>{if(c&&u){const m=g=>f(g,u),p=g=>f(g,c);return c.addEventListener("pointerleave",m),u.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",m),u.removeEventListener("pointerleave",p)}}},[c,u,f,d]),y.useEffect(()=>{if(o){const m=p=>{const g=p.target,_={x:p.clientX,y:p.clientY},x=(c==null?void 0:c.contains(g))||(u==null?void 0:u.contains(g)),k=!Nv(_,o);x?d():k&&(d(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,u,o,l,d]),y.createElement(Fp,Ee({},n,{ref:i}))}),[Ov,Av]=ac(wu,{isInside:!1}),Fp=y.forwardRef((n,e)=>{const{__scopeTooltip:t,children:s,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=n,c=lc(zi,t),l=cc(t),{onClose:u}=c;return y.useEffect(()=>(document.addEventListener(vl,u),()=>document.removeEventListener(vl,u)),[u]),y.useEffect(()=>{if(c.trigger){const h=d=>{const f=d.target;f!=null&&f.contains(c.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,u]),y.createElement(B1,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:u},y.createElement(dv,Ee({"data-state":c.stateAttribute},l,a,{ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),y.createElement(kp,null,s),y.createElement(Ov,{scope:t,isInside:!0},y.createElement(vv,{id:c.contentId,role:"tooltip"},r||s))))}),Pv="TooltipArrow",Rv=y.forwardRef((n,e)=>{const{__scopeTooltip:t,...s}=n,r=cc(t);return Av(Pv,t).isInside?null:y.createElement(fv,Ee({},r,s,{ref:e}))});function Dv(n,e){const t=Math.abs(e.top-n.y),s=Math.abs(e.bottom-n.y),r=Math.abs(e.right-n.x),i=Math.abs(e.left-n.x);switch(Math.min(t,s,r,i)){case i:return"left";case r:return"right";case t:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function Mv(n,e,t=5){const s=[];switch(e){case"top":s.push({x:n.x-t,y:n.y+t},{x:n.x+t,y:n.y+t});break;case"bottom":s.push({x:n.x-t,y:n.y-t},{x:n.x+t,y:n.y-t});break;case"left":s.push({x:n.x+t,y:n.y-t},{x:n.x+t,y:n.y+t});break;case"right":s.push({x:n.x-t,y:n.y-t},{x:n.x-t,y:n.y+t});break}return s}function Iv(n){const{top:e,right:t,bottom:s,left:r}=n;return[{x:r,y:e},{x:t,y:e},{x:t,y:s},{x:r,y:s}]}function Nv(n,e){const{x:t,y:s}=n;let r=!1;for(let i=0,o=e.length-1;is!=u>s&&t<(l-a)*(s-c)/(u-c)+a&&(r=!r)}return r}function $v(n){const e=n.slice();return e.sort((t,s)=>t.xs.x?1:t.ys.y?1:0),Fv(e)}function Fv(n){if(n.length<=1)return n.slice();const e=[];for(let s=0;s=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(r.y-o.y)>=(i.y-o.y)*(r.x-o.x))e.pop();else break}e.push(r)}e.pop();const t=[];for(let s=n.length-1;s>=0;s--){const r=n[s];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(r.y-o.y)>=(i.y-o.y)*(r.x-o.x))t.pop();else break}t.push(r)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}const Lv=wv,jv=kv,Vv=Cv,zv=Rv;function Uv(n,e){if(n==null)return{};var t={},s=Object.keys(n),r,i;for(i=0;i=0)&&(t[r]=n[r]);return t}function Pe(n,e){if(n==null)return{};var t=Uv(n,e),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(n,s)&&(t[s]=n[s])}return t}let We;(function(n){n[n.UNSUPPORTED_INPUT=0]="UNSUPPORTED_INPUT",n[n.NO_COMPONENT_FOR_TYPE=1]="NO_COMPONENT_FOR_TYPE",n[n.UNKNOWN_INPUT=2]="UNKNOWN_INPUT",n[n.DUPLICATE_KEYS=3]="DUPLICATE_KEYS",n[n.ALREADY_REGISTERED_TYPE=4]="ALREADY_REGISTERED_TYPE",n[n.CLIPBOARD_ERROR=5]="CLIPBOARD_ERROR",n[n.THEME_ERROR=6]="THEME_ERROR",n[n.PATH_DOESNT_EXIST=7]="PATH_DOESNT_EXIST",n[n.INPUT_TYPE_OVERRIDE=8]="INPUT_TYPE_OVERRIDE",n[n.EMPTY_KEY=9]="EMPTY_KEY"})(We||(We={}));const Bv={[We.UNSUPPORTED_INPUT]:(n,e)=>[`An input with type \`${n}\` input was found at path \`${e}\` but it's not supported yet.`],[We.NO_COMPONENT_FOR_TYPE]:(n,e)=>[`Type \`${n}\` found at path \`${e}\` can't be displayed in panel because no component supports it yet.`],[We.UNKNOWN_INPUT]:(n,e)=>[`input at path \`${n}\` is not recognized.`,e],[We.DUPLICATE_KEYS]:(n,e,t)=>[`Key \`${n}\` of path \`${e}\` already exists at path \`${t}\`. Even nested keys need to be unique. Rename one of the keys.`],[We.ALREADY_REGISTERED_TYPE]:n=>[`Type ${n} has already been registered. You can't register a component with the same type.`],[We.CLIPBOARD_ERROR]:n=>["Error copying the value",n],[We.THEME_ERROR]:(n,e)=>[`Error accessing the theme \`${n}.${e}\` value.`],[We.PATH_DOESNT_EXIST]:n=>[`Error getting the value at path \`${n}\`. There is probably an error in your \`render\` function.`],[We.PATH_DOESNT_EXIST]:n=>[`Error accessing the value at path \`${n}\``],[We.INPUT_TYPE_OVERRIDE]:(n,e,t)=>[`Input at path \`${n}\` already exists with type: \`${e}\`. Its type cannot be overridden with type \`${t}\`.`],[We.EMPTY_KEY]:()=>["Keys can not be empty, if you want to hide a label use whitespace."]};function Lp(n,e,...t){const[s,...r]=Bv[e](...t);console[n]("LEVA: "+s,...r)}const zn=Lp.bind(null,"warn"),Wv=Lp.bind(null,"log"),qv=["value"],Hv=["schema"],Yv=["value"],jp=[],Zs={};function pd(n){let{value:e}=n,t=Pe(n,qv);for(let s of jp){const r=s(e,t);if(r)return r}}function ts(n,e){let{schema:t}=e,s=Pe(e,Hv);if(n in Zs){zn(We.ALREADY_REGISTERED_TYPE,n);return}jp.push((r,i)=>t(r,i)&&n),Zs[n]=s}function Bc(n,e,t,s){const{normalize:r}=Zs[n];if(r)return r(e,t,s);if(typeof e!="object"||!("value"in e))return{value:e};const{value:i}=e,o=Pe(e,Yv);return{value:i,settings:o}}function Gv(n,e,t,s,r,i){const{sanitize:o}=Zs[n];return o?o(e,t,s,r,i):e}function md(n,e,t){const{format:s}=Zs[n];return s?s(e,t):e}function Xv(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function gd(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);e&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,s)}return t}function de(n){for(var e=1;en>t?t:n{if(n===""||typeof n=="number")return n;try{const e=cs(n);if(!isNaN(e))return e}catch{}return parseFloat(n)},Kv=Math.log(10);function _d(n){let e=Math.abs(+String(n).replace(".",""));if(e===0)return .01;for(;e!==0&&e%10===0;)e/=10;const t=Math.floor(Math.log(e)/Kv)+1,s=Math.floor(Math.log10(Math.abs(n))),r=Math.pow(10,s-t);return Math.max(r,.001)}const _a=(n,e,t)=>t===e?0:(bs(n,e,t)-e)/(t-e),ya=(n,e,t)=>n*(t-e)+e,Qv=()=>"_"+Math.random().toString(36).substr(2,9),yd=/\(([0-9+\-*/^ .]+)\)/,vd=/(\d+(?:\.\d+)?) ?\^ ?(\d+(?:\.\d+)?)/,bd=/(\d+(?:\.\d+)?) ?\* ?(\d+(?:\.\d+)?)/,xd=/(\d+(?:\.\d+)?) ?\/ ?(\d+(?:\.\d+)?)/,wd=/(\d+(?:\.\d+)?) ?\+ ?(\d+(?:\.\d+)?)/,kd=/(\d+(?:\.\d+)?) ?- ?(\d+(?:\.\d+)?)/;function cs(n){if(isNaN(Number(n)))if(yd.test(n)){const e=n.replace(yd,(t,s)=>String(cs(s)));return cs(e)}else if(vd.test(n)){const e=n.replace(vd,(t,s,r)=>String(Math.pow(Number(s),Number(r))));return cs(e)}else if(bd.test(n)){const e=n.replace(bd,(t,s,r)=>String(Number(s)*Number(r)));return cs(e)}else if(xd.test(n)){const e=n.replace(xd,(t,s,r)=>{if(r!=0)return String(Number(s)/Number(r));throw new Error("Division by zero")});return cs(e)}else if(wd.test(n)){const e=n.replace(wd,(t,s,r)=>String(Number(s)+Number(r)));return cs(e)}else if(kd.test(n)){const e=n.replace(kd,(t,s,r)=>String(Number(s)-Number(r)));return cs(e)}else return Number(n);return Number(n)}function Jv(n,e){return e.reduce((t,s)=>(n&&n.hasOwnProperty(s)&&(t[s]=n[s]),t),{})}function eb(n,e){const t=de({},n);return e.forEach(s=>s in n&&delete t[s]),t}function tb(n,e){return n.reduce((t,s,r)=>Object.assign(t,{[e[r]]:s}),{})}function Vp(n){return Object.prototype.toString.call(n)==="[object Object]"}const nb=n=>Vp(n)&&Object.keys(n).length===0;let cn;(function(n){n.BUTTON="BUTTON",n.BUTTON_GROUP="BUTTON_GROUP",n.MONITOR="MONITOR",n.FOLDER="FOLDER"})(cn||(cn={}));let un;(function(n){n.SELECT="SELECT",n.IMAGE="IMAGE",n.NUMBER="NUMBER",n.COLOR="COLOR",n.STRING="STRING",n.BOOLEAN="BOOLEAN",n.INTERVAL="INTERVAL",n.VECTOR3D="VECTOR3D",n.VECTOR2D="VECTOR2D"})(un||(un={}));const sb=["type","__customInput"],rb=["render","label","optional","order","disabled","hint","onChange","onEditStart","onEditEnd","transient"],ib=["type"];function zp(n,e,t={},s){var r,i;if(typeof n!="object"||Array.isArray(n))return{type:s,input:n,options:de({key:e,label:e,optional:!1,disabled:!1,order:0},t)};if("__customInput"in n){const{type:b,__customInput:T}=n,E=Pe(n,sb);return zp(T,e,E,b)}const{render:o,label:a,optional:c,order:l=0,disabled:u,hint:h,onChange:d,onEditStart:f,onEditEnd:m,transient:p}=n,g=Pe(n,rb),_=de({render:o,key:e,label:a??e,hint:h,transient:p??!!d,onEditStart:f,onEditEnd:m,disabled:u,optional:c,order:l},t);let{type:x}=g,k=Pe(g,ib);if(x=s??x,x in cn)return{type:x,input:k,options:_};let v;return s&&Vp(k)&&"value"in k?v=k.value:v=nb(k)?void 0:k,{type:x,input:v,options:de(de({},_),{},{onChange:d,optional:(r=_.optional)!==null&&r!==void 0?r:!1,disabled:(i=_.disabled)!==null&&i!==void 0?i:!1})}}function ob(n,e,t,s){const r=zp(n,e),{type:i,input:o,options:a}=r;if(i)return i in cn?r:{type:i,input:Bc(i,o,t,s),options:a};let c=pd(o);return c?{type:c,input:Bc(c,o,t,s),options:a}:(c=pd({value:o}),c?{type:c,input:Bc(c,{value:o},t,s),options:a}:!1)}function Td(n,e,t,s,r){const{value:i,type:o,settings:a}=n;n.value=Up({type:o,value:i,settings:a},e,t,s),n.fromPanel=r}const ab=function(e,t,s){this.type="LEVA_ERROR",this.message="LEVA: "+e,this.previousValue=t,this.error=s};function Up({type:n,value:e,settings:t},s,r,i){const o=n!=="SELECT"&&typeof s=="function"?s(e):s;let a;try{a=Gv(n,o,t,e,r,i)}catch(c){throw new ab(`The value \`${s}\` did not result in a correct value.`,e,c)}return ji(a,e)?e:a}const Bp=(n,e,t=!1)=>{let s=0;return function(){const r=arguments,i=t&&!s,o=()=>n.apply(this,r);window.clearTimeout(s),s=window.setTimeout(o,e),i&&o()}},Wp=n=>n.shiftKey?5:n.altKey?1/5:1;function cb(n,e){const t=console.error;console.error=()=>{},Xf.render(n,e),console.error=t}const lb=["value"],ub=["min","max"],hb=n=>{if(typeof n=="number")return!0;if(typeof n=="string"){const e=parseFloat(n);return isNaN(e)?!1:n.substring((""+e).length).trim().length<4}return!1},qp=(n,{min:e=-1/0,max:t=1/0,suffix:s})=>{const r=parseFloat(n);if(n===""||isNaN(r))throw Error("Invalid number");const i=bs(r,e,t);return s?i+s:i},db=(n,{pad:e=0,suffix:t})=>{const s=parseFloat(n).toFixed(e);return t?s+t:s},Hp=n=>{let{value:e}=n,t=Pe(n,lb);const{min:s=-1/0,max:r=1/0}=t,i=Pe(t,ub);let o=parseFloat(e);const a=typeof e=="string"?e.substring((""+o).length):void 0;o=bs(o,s,r);let c=t.step;c||(Number.isFinite(s)?Number.isFinite(r)?c=+(Math.abs(r-s)/100).toPrecision(1):c=+(Math.abs(o-s)/100).toPrecision(1):Number.isFinite(r)&&(c=+(Math.abs(r-o)/100).toPrecision(1)));const l=c?_d(c)*10:_d(o);c=c||l/10;const u=Math.round(bs(Math.log10(1/l),0,2));return{value:a?o+a:o,settings:de({initialValue:o,step:c,pad:u,min:s,max:r,suffix:a},i)}},Yp=(n,{step:e,initialValue:t})=>{const s=Math.round((n-t)/e);return t+s*e};var Gp=Object.freeze({__proto__:null,schema:hb,sanitize:qp,format:db,normalize:Hp,sanitizeStep:Yp});function Ze(){return Ze=Object.assign?Object.assign.bind():function(n){for(var e=1;e({colors:{elevation1:"#292d39",elevation2:"#181c20",elevation3:"#373c4b",accent1:"#0066dc",accent2:"#007bff",accent3:"#3c93ff",highlight1:"#535760",highlight2:"#8c92a4",highlight3:"#fefefe",vivid1:"#ffcc00",folderWidgetColor:"$highlight2",folderTextColor:"$highlight3",toolTipBackground:"$highlight3",toolTipText:"$elevation2"},radii:{xs:"2px",sm:"3px",lg:"10px"},space:{xs:"3px",sm:"6px",md:"10px",rowGap:"7px",colGap:"7px"},fonts:{mono:"ui-monospace, SFMono-Regular, Menlo, 'Roboto Mono', monospace",sans:"system-ui, sans-serif"},fontSizes:{root:"11px",toolTip:"$root"},sizes:{rootWidth:"280px",controlWidth:"160px",numberInputMinWidth:"38px",scrubberWidth:"8px",scrubberHeight:"16px",rowHeight:"24px",folderTitleHeight:"20px",checkboxSize:"16px",joystickWidth:"100px",joystickHeight:"100px",colorPickerWidth:"$controlWidth",colorPickerHeight:"100px",imagePreviewWidth:"$controlWidth",imagePreviewHeight:"100px",monitorHeight:"60px",titleBarHeight:"39px"},shadows:{level1:"0 0 9px 0 #00000088",level2:"0 4px 14px #00000033"},borderWidths:{root:"0px",input:"1px",focus:"1px",hover:"1px",active:"1px",folder:"1px"},fontWeights:{label:"normal",folder:"normal",button:"normal"}});function Yo(n,e){const[t,s]=n.split(" "),r={};return t!=="none"&&(r.boxShadow=`${e.inset?"inset ":""}0 0 0 $borderWidths${[e.key]} $colors${t!=="default"&&t||e.borderColor}`),s&&(r.backgroundColor=s),r}const bi={$inputStyle:()=>n=>Yo(n,{key:"$input",borderColor:"$highlight1",inset:!0}),$focusStyle:()=>n=>Yo(n,{key:"$focus",borderColor:"$accent2"}),$hoverStyle:()=>n=>Yo(n,{key:"$hover",borderColor:"$accent1",inset:!0}),$activeStyle:()=>n=>Yo(n,{key:"$active",borderColor:"$accent1",inset:!0})},{styled:ce,css:YD,createTheme:pb,globalCss:mb,keyframes:GD}=k_({prefix:"leva",theme:Qp(),utils:de(de({},bi),{},{$flex:()=>({display:"flex",alignItems:"center"}),$flexCenter:()=>({display:"flex",alignItems:"center",justifyContent:"center"}),$reset:()=>({outline:"none",fontSize:"inherit",fontWeight:"inherit",color:"inherit",fontFamily:"inherit",border:"none",backgroundColor:"transparent",appearance:"none"}),$draggable:()=>({touchAction:"none",WebkitUserDrag:"none",userSelect:"none"}),$focus:n=>({"&:focus":bi.$focusStyle()(n)}),$focusWithin:n=>({"&:focus-within":bi.$focusStyle()(n)}),$hover:n=>({"&:hover":bi.$hoverStyle()(n)}),$active:n=>({"&:active":bi.$activeStyle()(n)})})}),gb=mb({".leva__panel__dragged":{WebkitUserDrag:"none",userSelect:"none",input:{userSelect:"none"},"*":{cursor:"ew-resize !important"}}});function _b(n){const e=Qp();if(!n)return{theme:e,className:""};Object.keys(n).forEach(s=>{Object.assign(e[s],n[s])});const t=pb(e);return{theme:e,className:t.className}}function Un(n,e){const{theme:t}=y.useContext(ku);if(!(n in t)||!(e in t[n]))return zn(We.THEME_ERROR,n,e),"";let s=e;for(;;){let r=t[n][s];if(typeof r=="string"&&r.charAt(0)==="$")s=r.substr(1);else return r}}const Jp=ce("input",{$reset:"",padding:"0 $sm",width:0,minWidth:0,flex:1,height:"100%",variants:{levaType:{number:{textAlign:"right"}},as:{textarea:{padding:"$sm"}}}}),e0=ce("div",{$draggable:"",height:"100%",$flexCenter:"",position:"relative",padding:"0 $xs",fontSize:"0.8em",opacity:.8,cursor:"default",touchAction:"none",[`& + ${Jp}`]:{paddingLeft:0}}),yb=ce(e0,{cursor:"ew-resize",marginRight:"-$xs",textTransform:"uppercase",opacity:.3,"&:hover":{opacity:1},variants:{dragging:{true:{backgroundColor:"$accent2",opacity:1}}}}),vb=ce("div",{$flex:"",position:"relative",borderRadius:"$sm",overflow:"hidden",color:"inherit",height:"$rowHeight",backgroundColor:"$elevation3",$inputStyle:"$elevation1",$hover:"",$focusWithin:"",variants:{textArea:{true:{height:"auto"}}}}),bb=["innerLabel","value","onUpdate","onChange","onKeyDown","type","id","inputType","rows"],xb=["onUpdate"];function Tu(n){let{innerLabel:e,value:t,onUpdate:s,onChange:r,onKeyDown:i,type:o,id:a,inputType:c="text",rows:l=0}=n,u=Pe(n,bb);const{id:h,emitOnEditStart:d,emitOnEditEnd:f,disabled:m}=_t(),p=a||h,g=y.useRef(null),_=l>0,x=_?"textarea":"input",k=y.useCallback(T=>E=>{const w=E.currentTarget.value;T(w)},[]);I.useEffect(()=>{const T=g.current,E=k(w=>{s(w),f()});return T==null||T.addEventListener("blur",E),()=>T==null?void 0:T.removeEventListener("blur",E)},[k,s,f]);const v=y.useCallback(T=>{T.key==="Enter"&&k(s)(T)},[k,s]),b=Object.assign({as:x},_?{rows:l}:{},u);return I.createElement(vb,{textArea:_},e&&typeof e=="string"?I.createElement(e0,null,e):e,I.createElement(Jp,Ze({levaType:o,ref:g,id:p,type:c,autoComplete:"off",spellCheck:"false",value:t,onChange:k(r),onFocus:()=>d(),onKeyPress:v,onKeyDown:i,disabled:m},b)))}function wb(n){let{onUpdate:e}=n,t=Pe(n,xb);const s=y.useCallback(i=>e(Zv(i)),[e]),r=y.useCallback(i=>{const o=i.key==="ArrowUp"?1:i.key==="ArrowDown"?-1:0;if(o){i.preventDefault();const a=i.altKey?.1:i.shiftKey?10:1;e(c=>parseFloat(c)+o*a)}},[e]);return I.createElement(Tu,Ze({},t,{onUpdate:s,onKeyDown:r,type:"number"}))}const va=ce("div",{}),bl=ce("div",{position:"relative",background:"$elevation2",transition:"height 300ms ease",variants:{fill:{true:{},false:{}},flat:{false:{},true:{}},isRoot:{true:{},false:{paddingLeft:"$md","&::after":{content:'""',position:"absolute",left:0,top:0,width:"$borderWidths$folder",height:"100%",backgroundColor:"$folderWidgetColor",opacity:.4,transform:"translateX(-50%)"}}}},compoundVariants:[{isRoot:!0,fill:!1,css:{overflowY:"auto",maxHeight:"calc(100vh - 20px - $$titleBarHeight)"}},{isRoot:!0,flat:!1,css:{borderRadius:"$lg"}}]}),kb=ce("div",{$flex:"",color:"$folderTextColor",userSelect:"none",cursor:"pointer",height:"$folderTitleHeight",fontWeight:"$folder","> svg":{marginLeft:-4,marginRight:4,cursor:"pointer",fill:"$folderWidgetColor",opacity:.6},"&:hover > svg":{fill:"$folderWidgetColor"},[`&:hover + ${bl}::after`]:{opacity:.6},[`${va}:hover > & + ${bl}::after`]:{opacity:.6},[`${va}:hover > & > svg`]:{opacity:1}}),t0=ce("div",{position:"relative",display:"grid",gridTemplateColumns:"100%",rowGap:"$rowGap",transition:"opacity 250ms ease",variants:{toggled:{true:{opacity:1,transitionDelay:"250ms"},false:{opacity:0,transitionDelay:"0ms",pointerEvents:"none"}},isRoot:{true:{"& > div":{paddingLeft:"$md",paddingRight:"$md"},"& > div:first-of-type":{paddingTop:"$sm"},"& > div:last-of-type":{paddingBottom:"$sm"},[`> ${va}:not(:first-of-type)`]:{paddingTop:"$sm",marginTop:"$md",borderTop:"$borderWidths$folder solid $colors$elevation1"}}}}}),n0=ce("div",{position:"relative",zIndex:100,display:"grid",rowGap:"$rowGap",gridTemplateRows:"minmax($sizes$rowHeight, max-content)",alignItems:"center",color:"$highlight2",[`${t0} > &`]:{"&:first-of-type":{marginTop:"$rowGap"},"&:last-of-type":{marginBottom:"$rowGap"}},variants:{disabled:{true:{pointerEvents:"none"},false:{"&:hover,&:focus-within":{color:"$highlight3"}}}}}),s0=ce(n0,{gridTemplateColumns:"auto $sizes$controlWidth",columnGap:"$colGap"}),Tb=ce("div",{$flex:"",height:"100%",position:"relative",overflow:"hidden","& > div":{marginLeft:"$colGap",padding:"0 $xs",opacity:.4},"& > div:hover":{opacity:.8},"& > div > svg":{display:"none",cursor:"pointer",width:13,minWidth:13,height:13,backgroundColor:"$elevation2"},"&:hover > div > svg":{display:"block"},variants:{align:{top:{height:"100%",alignItems:"flex-start",paddingTop:"$sm"}}}}),Eb=ce("input",{$reset:"",height:0,width:0,opacity:0,margin:0,"& + label":{position:"relative",$flexCenter:"",height:"100%",userSelect:"none",cursor:"pointer",paddingLeft:2,paddingRight:"$sm",pointerEvents:"auto"},"& + label:after":{content:'""',width:6,height:6,backgroundColor:"$elevation3",borderRadius:"50%",$activeStyle:""},"&:focus + label:after":{$focusStyle:""},"& + label:active:after":{backgroundColor:"$accent1",$focusStyle:""},"&:checked + label:after":{backgroundColor:"$accent1"}}),xl=ce("label",{fontWeight:"$label",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > svg":{display:"block"}}),Cb=ce("div",{opacity:1,variants:{disabled:{true:{opacity:.6,pointerEvents:"none",[`& ${xl}`]:{pointerEvents:"auto"}}}}}),r0=ce("div",{position:"fixed",top:0,bottom:0,right:0,left:0,zIndex:1e3,userSelect:"none"}),Sb=ce("div",{background:"$toolTipBackground",fontFamily:"$sans",fontSize:"$toolTip",padding:"$xs $sm",color:"$toolTipText",borderRadius:"$xs",boxShadow:"$level2",maxWidth:260}),Ob=ce(zv,{fill:"$toolTipBackground"});function Eu({children:n}){const{className:e}=y.useContext(ku);return I.createElement(M1,{className:e},n)}const Ab=["align"];function Pb(){const{id:n,disable:e,disabled:t}=_t();return I.createElement(I.Fragment,null,I.createElement(Eb,{id:n+"__disable",type:"checkbox",checked:!t,onChange:()=>e(!t)}),I.createElement("label",{htmlFor:n+"__disable"}))}function Rb(n){const{id:e,optional:t,hint:s}=_t(),r=n.htmlFor||(e?{htmlFor:e}:null),i=!s&&typeof n.children=="string"?{title:n.children}:null;return I.createElement(I.Fragment,null,t&&I.createElement(Pb,null),s!==void 0?I.createElement(Lv,null,I.createElement(jv,{asChild:!0},I.createElement(xl,Ze({},r,n))),I.createElement(Vv,{side:"top",sideOffset:2},I.createElement(Sb,null,s,I.createElement(Ob,null)))):I.createElement(xl,Ze({},r,i,n)))}function fn(n){let{align:e}=n,t=Pe(n,Ab);const{value:s,label:r,key:i,disabled:o}=_t(),{hideCopyButton:a}=fb(),c=!a&&i!==void 0,[l,u]=y.useState(!1),h=async()=>{try{await navigator.clipboard.writeText(JSON.stringify({[i]:s??""})),u(!0)}catch{zn(We.CLIPBOARD_ERROR,{[i]:s})}};return I.createElement(Tb,{align:e,onPointerLeave:()=>u(!1)},I.createElement(Rb,t),c&&!o&&I.createElement("div",{title:`Click to copy ${typeof r=="string"?r:i} value`},l?I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},I.createElement("path",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),I.createElement("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm9.707 5.707a1 1 0 00-1.414-1.414L9 12.586l-1.293-1.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})):I.createElement("svg",{onClick:h,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},I.createElement("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),I.createElement("path",{d:"M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z"}))))}const Db=["toggled"],Mb=ce("svg",{fill:"currentColor",transition:"transform 350ms ease, fill 250ms ease"});function Cu(n){let{toggled:e}=n,t=Pe(n,Db);return I.createElement(Mb,Ze({width:"9",height:"5",viewBox:"0 0 9 5",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${e?0:-90}deg)`}},t),I.createElement("path",{d:"M3.8 4.4c.4.3 1 .3 1.4 0L8 1.7A1 1 0 007.4 0H1.6a1 1 0 00-.7 1.7l3 2.7z"}))}const Ib=["input"];function tn(n){let{input:e}=n,t=Pe(n,Ib);return e?I.createElement(s0,t):I.createElement(n0,t)}function i0({value:n,type:e,settings:t,setValue:s}){const[r,i]=y.useState(md(e,n,t)),o=y.useRef(n),a=y.useRef(t);a.current=t;const c=y.useCallback(u=>i(md(e,u,a.current)),[e]),l=y.useCallback(u=>{try{s(u)}catch(h){const{type:d,previousValue:f}=h;if(d!=="LEVA_ERROR")throw h;c(f)}},[c,s]);return y.useEffect(()=>{ji(n,o.current)||c(n),o.current=n},[n,c]),{displayValue:r,onChange:i,onUpdate:l}}function xo(n,e){const{emitOnEditStart:t,emitOnEditEnd:s}=_t();return T_(r=>{r.first&&(document.body.classList.add("leva__panel__dragged"),t==null||t());const i=n(r);return r.last&&(document.body.classList.remove("leva__panel__dragged"),s==null||s()),i},e)}function Nb(n){const e=y.useRef(null),t=y.useRef(null),s=y.useRef(!1);return y.useEffect(()=>{const r=Bp(()=>{e.current.width=e.current.offsetWidth*window.devicePixelRatio,e.current.height=e.current.offsetHeight*window.devicePixelRatio,n(e.current,t.current)},250);return window.addEventListener("resize",r),s.current||(r(),s.current=!0),()=>window.removeEventListener("resize",r)},[n]),y.useEffect(()=>{t.current=e.current.getContext("2d")},[]),[e,t]}function o0(){const n=y.useRef(null),e=y.useRef({x:0,y:0}),t=y.useCallback(s=>{Object.assign(e.current,s),n.current&&(n.current.style.transform=`translate3d(${e.current.x}px, ${e.current.y}px, 0)`)},[]);return[n,t]}const $b=["__refCount"],Wc=(n,e)=>{if(!n[e])return null;const t=n[e];return Pe(t,$b)};function Fb(n){const e=bo(),[t,s]=y.useState(Wc(e.getData(),n)),r=y.useCallback(l=>e.setValueAtPath(n,l,!0),[n,e]),i=y.useCallback(l=>e.setSettingsAtPath(n,l),[n,e]),o=y.useCallback(l=>e.disableInputAtPath(n,l),[n,e]),a=y.useCallback(()=>e.emitOnEditStart(n),[n,e]),c=y.useCallback(()=>e.emitOnEditEnd(n),[n,e]);return y.useEffect(()=>{s(Wc(e.getData(),n));const l=e.useStore.subscribe(u=>Wc(u.data,n),s,{equalityFn:vo});return()=>l()},[e,n]),[t,{set:r,setSettings:i,disable:o,storeId:e.storeId,emitOnEditStart:a,emitOnEditEnd:c}]}const Lb=ce("div",{variants:{hasRange:{true:{position:"relative",display:"grid",gridTemplateColumns:"auto $sizes$numberInputMinWidth",columnGap:"$colGap",alignItems:"center"}}}}),a0=ce("div",{position:"relative",width:"100%",height:2,borderRadius:"$xs",backgroundColor:"$elevation1"}),wl=ce("div",{position:"absolute",width:"$scrubberWidth",height:"$scrubberHeight",borderRadius:"$xs",boxShadow:"0 0 0 2px $colors$elevation2",backgroundColor:"$accent2",cursor:"pointer",$active:"none $accent1",$hover:"none $accent3",variants:{position:{left:{borderTopRightRadius:0,borderBottomRightRadius:0,transform:"translateX(calc(-0.5 * ($sizes$scrubberWidth + 4px)))"},right:{borderTopLeftRadius:0,borderBottomLeftRadius:0,transform:"translateX(calc(0.5 * ($sizes$scrubberWidth + 4px)))"}}}}),c0=ce("div",{position:"relative",$flex:"",height:"100%",cursor:"pointer",touchAction:"none"}),l0=ce("div",{position:"absolute",height:"100%",backgroundColor:"$accent2"});function jb({value:n,min:e,max:t,onDrag:s,step:r,initialValue:i}){const o=y.useRef(null),a=y.useRef(null),c=y.useRef(0),l=Un("sizes","scrubberWidth"),u=xo(({event:d,first:f,xy:[m],movement:[p],memo:g})=>{if(f){const{width:x,left:k}=o.current.getBoundingClientRect();c.current=x-parseFloat(l),g=(d==null?void 0:d.target)===a.current?n:ya((m-k)/x,e,t)}const _=g+ya(p/c.current,0,t-e);return s(Yp(_,{step:r,initialValue:i})),g}),h=_a(n,e,t);return I.createElement(c0,Ze({ref:o},u()),I.createElement(a0,null,I.createElement(l0,{style:{left:0,right:`${(1-h)*100}%`}})),I.createElement(wl,{ref:a,style:{left:`calc(${h} * (100% - ${l}))`}}))}const Vb=I.memo(({label:n,onUpdate:e,step:t,innerLabelTrim:s})=>{const[r,i]=y.useState(!1),o=xo(({active:a,delta:[c],event:l,memo:u=0})=>(i(a),u+=c/2,Math.abs(u)>=1&&(e(h=>parseFloat(h)+Math.floor(u)*t*Wp(l)),u=0),u));return I.createElement(yb,Ze({dragging:r,title:n.length>1?n:""},o()),n.slice(0,s))});function u0({label:n,id:e,displayValue:t,onUpdate:s,onChange:r,settings:i,innerLabelTrim:o=1}){const a=o>0&&I.createElement(Vb,{label:n,step:i.step,onUpdate:s,innerLabelTrim:o});return I.createElement(wb,{id:e,value:String(t),onUpdate:s,onChange:r,innerLabel:a})}function zb(){const n=_t(),{label:e,value:t,onUpdate:s,settings:r,id:i}=n,{min:o,max:a}=r,c=a!==1/0&&o!==-1/0;return I.createElement(tn,{input:!0},I.createElement(fn,null,e),I.createElement(Lb,{hasRange:c},c&&I.createElement(jb,Ze({value:parseFloat(t),onDrag:s},r)),I.createElement(u0,Ze({},n,{id:i,label:"value",innerLabelTrim:c?0:1}))))}const{sanitizeStep:Ub}=Gp,Bb=Pe(Gp,["sanitizeStep"]);var Wb=de({component:zb},Bb);const qb=(n,e)=>St().schema({options:St().passesAnyOf(St().object(),St().array())}).test(e),Hb=(n,{values:e})=>{if(e.indexOf(n)<0)throw Error("Selected value doesn't match Select options");return n},Yb=(n,{values:e})=>e.indexOf(n),Gb=n=>{let{value:e,options:t}=n,s,r;return Array.isArray(t)?(r=t,s=t.map(i=>String(i))):(r=Object.values(t),s=Object.keys(t)),"value"in n?r.includes(e)||(s.unshift(String(e)),r.unshift(e)):e=r[0],Object.values(t).includes(e)||(t[String(e)]=e),{value:e,settings:{keys:s,values:r}}};var Xb=Object.freeze({__proto__:null,schema:qb,sanitize:Hb,format:Yb,normalize:Gb});const Zb=ce("div",{$flexCenter:"",position:"relative","> svg":{pointerEvents:"none",position:"absolute",right:"$md"}}),kl=ce("select",{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0}),Kb=ce("div",{display:"flex",alignItems:"center",width:"100%",height:"$rowHeight",backgroundColor:"$elevation3",borderRadius:"$sm",padding:"0 $sm",cursor:"pointer",[`${kl}:focus + &`]:{$focusStyle:""},[`${kl}:hover + &`]:{$hoverStyle:""}});function Qb({displayValue:n,value:e,onUpdate:t,id:s,settings:r,disabled:i}){const{keys:o,values:a}=r,c=y.useRef();return e===a[n]&&(c.current=o[n]),I.createElement(Zb,null,I.createElement(kl,{id:s,value:n,onChange:l=>t(a[Number(l.currentTarget.value)]),disabled:i},o.map((l,u)=>I.createElement("option",{key:l,value:u},l))),I.createElement(Kb,null,c.current),I.createElement(Cu,{toggled:!0}))}function Jb(){const{label:n,value:e,displayValue:t,onUpdate:s,id:r,disabled:i,settings:o}=_t();return I.createElement(tn,{input:!0},I.createElement(fn,null,n),I.createElement(Qb,{id:r,value:e,displayValue:t,onUpdate:s,settings:o,disabled:i}))}var ex=de({component:Jb},Xb);const tx=n=>St().string().test(n),nx=n=>{if(typeof n!="string")throw Error("Invalid string");return n},sx=({value:n,editable:e=!0,rows:t=!1})=>({value:n,settings:{editable:e,rows:typeof t=="number"?t:t?5:0}});var rx=Object.freeze({__proto__:null,schema:tx,sanitize:nx,normalize:sx});const ix=["displayValue","onUpdate","onChange","editable"],ox=ce("div",{whiteSpace:"pre-wrap"});function ax(n){let{displayValue:e,onUpdate:t,onChange:s,editable:r=!0}=n,i=Pe(n,ix);return r?I.createElement(Tu,Ze({value:e,onUpdate:t,onChange:s},i)):I.createElement(ox,null,e)}function cx(){const{label:n,settings:e,displayValue:t,onUpdate:s,onChange:r}=_t();return I.createElement(tn,{input:!0},I.createElement(fn,null,n),I.createElement(ax,Ze({displayValue:t,onUpdate:s,onChange:r},e)))}var lx=de({component:cx},rx);const ux=n=>St().boolean().test(n),hx=n=>{if(typeof n!="boolean")throw Error("Invalid boolean");return n};var dx=Object.freeze({__proto__:null,schema:ux,sanitize:hx});const fx=ce("div",{position:"relative",$flex:"",height:"$rowHeight",input:{$reset:"",height:0,width:0,opacity:0,margin:0},label:{position:"relative",$flexCenter:"",userSelect:"none",cursor:"pointer",height:"$checkboxSize",width:"$checkboxSize",backgroundColor:"$elevation3",borderRadius:"$sm",$hover:""},"input:focus + label":{$focusStyle:""},"input:focus:checked + label, input:checked + label:hover":{$hoverStyle:"$accent3"},"input + label:active":{backgroundColor:"$accent1"},"input:checked + label:active":{backgroundColor:"$accent1"},"label > svg":{display:"none",width:"90%",height:"90%",stroke:"$highlight3"},"input:checked + label":{backgroundColor:"$accent2"},"input:checked + label > svg":{display:"block"}});function px({value:n,onUpdate:e,id:t,disabled:s}){return I.createElement(fx,null,I.createElement("input",{id:t,type:"checkbox",checked:n,onChange:r=>e(r.currentTarget.checked),disabled:s}),I.createElement("label",{htmlFor:t},I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},I.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}))))}function mx(){const{label:n,value:e,onUpdate:t,disabled:s,id:r}=_t();return I.createElement(tn,{input:!0},I.createElement(fn,null,n),I.createElement(px,{value:e,onUpdate:t,id:r,disabled:s}))}var gx=de({component:mx},dx);const _x=["locked"];function yx({value:n,id:e,valueKey:t,settings:s,onUpdate:r,innerLabelTrim:i}){const o=y.useRef(n[t]);o.current=n[t];const a=y.useCallback(l=>r({[t]:Up({type:"NUMBER",value:o.current,settings:s},l)}),[r,s,t]),c=i0({type:"NUMBER",value:n[t],settings:s,setValue:a});return I.createElement(u0,{id:e,label:t,value:n[t],displayValue:c.displayValue,onUpdate:c.onUpdate,onChange:c.onChange,settings:s,innerLabelTrim:i})}const vx=ce("div",{display:"grid",columnGap:"$colGap",gridAutoFlow:"column dense",alignItems:"center",variants:{withLock:{true:{gridTemplateColumns:"10px auto","> svg":{cursor:"pointer"}}}}});function bx(n){let{locked:e}=n,t=Pe(n,_x);return I.createElement("svg",Ze({width:"10",height:"10",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),e?I.createElement("path",{d:"M5 4.63601C5 3.76031 5.24219 3.1054 5.64323 2.67357C6.03934 2.24705 6.64582 1.9783 7.5014 1.9783C8.35745 1.9783 8.96306 2.24652 9.35823 2.67208C9.75838 3.10299 10 3.75708 10 4.63325V5.99999H5V4.63601ZM4 5.99999V4.63601C4 3.58148 4.29339 2.65754 4.91049 1.99307C5.53252 1.32329 6.42675 0.978302 7.5014 0.978302C8.57583 0.978302 9.46952 1.32233 10.091 1.99162C10.7076 2.65557 11 3.57896 11 4.63325V5.99999H12C12.5523 5.99999 13 6.44771 13 6.99999V13C13 13.5523 12.5523 14 12 14H3C2.44772 14 2 13.5523 2 13V6.99999C2 6.44771 2.44772 5.99999 3 5.99999H4ZM3 6.99999H12V13H3V6.99999Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}):I.createElement("path",{d:"M9 3.63601C9 2.76044 9.24207 2.11211 9.64154 1.68623C10.0366 1.26502 10.6432 1 11.5014 1C12.4485 1 13.0839 1.30552 13.4722 1.80636C13.8031 2.23312 14 2.84313 14 3.63325H15C15 2.68242 14.7626 1.83856 14.2625 1.19361C13.6389 0.38943 12.6743 0 11.5014 0C10.4294 0 9.53523 0.337871 8.91218 1.0021C8.29351 1.66167 8 2.58135 8 3.63601V6H1C0.447715 6 0 6.44772 0 7V13C0 13.5523 0.447715 14 1 14H10C10.5523 14 11 13.5523 11 13V7C11 6.44772 10.5523 6 10 6H9V3.63601ZM1 7H10V13H1V7Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function Su({value:n,onUpdate:e,settings:t,innerLabelTrim:s}){const{id:r,setSettings:i}=_t(),{lock:o,locked:a}=t;return I.createElement(vx,{withLock:o},o&&I.createElement(bx,{locked:a,onClick:()=>i({locked:!a})}),Object.keys(n).map((c,l)=>I.createElement(yx,{id:l===0?r:`${r}.${c}`,key:c,valueKey:c,value:n,settings:t[c],onUpdate:e,innerLabelTrim:s})))}const h0=(n,e)=>{const t={};let s=0,r=1/0;Object.entries(n).forEach(([i,o])=>{t[i]=Hp(de({value:o},e[i])).settings,s=Math.max(s,t[i].step),r=Math.min(r,t[i].pad)});for(let i in t){const{step:o,min:a,max:c}=e[i]||{};!isFinite(o)&&(!isFinite(a)||!isFinite(c))&&(t[i].step=s,t[i].pad=r)}return t},xx=["lock"],wx=["value"];function kx(n){const e=St().array().length(n).every.number(),t=s=>{if(!s||typeof s!="object")return!1;const r=Object.values(s);return r.length===n&&r.every(i=>isFinite(i))};return s=>e.test(s)||t(s)}function Tx(n){return Array.isArray(n)?"array":"object"}function Ai(n,e,t){return Tx(n)===e?n:e==="array"?Object.values(n):tb(n,t)}const Ex=(n,e,t)=>{const s=Ai(n,"object",e.keys);for(let o in s)s[o]=qp(s[o],e[o]);const r=Object.keys(s);let i={};if(r.length===e.keys.length)i=s;else{const o=Ai(t,"object",e.keys);if(r.length===1&&e.locked){const a=r[0],c=s[a],l=o[a],u=l!==0?c/l:1;for(let h in o)h===a?i[a]=c:i[h]=o[h]*u}else i=de(de({},o),s)}return Ai(i,e.format,e.keys)},Cx=(n,e)=>Ai(n,"object",e.keys),Sx=n=>!!n&&("step"in n||"min"in n||"max"in n);function Ox(n,e,t=[]){const{lock:s=!1}=e,r=Pe(e,xx),i=Array.isArray(n)?"array":"object",o=i==="object"?Object.keys(n):t,a=Ai(n,"object",o),c=Sx(r)?o.reduce((u,h)=>Object.assign(u,{[h]:r}),{}):r,l=h0(a,c);return{value:i==="array"?n:a,settings:de(de({},l),{},{format:i,keys:o,lock:s,locked:!1})}}function d0(n){return{schema:kx(n.length),normalize:e=>{let{value:t}=e,s=Pe(e,wx);return Ox(t,s,n)},format:(e,t)=>Cx(e,t),sanitize:(e,t,s)=>Ex(e,t,s)}}var Ax={grad:.9,turn:360,rad:360/(2*Math.PI)},Nn=function(n){return typeof n=="string"?n.length>0:typeof n=="number"},at=function(n,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*n)/t+0},Gt=function(n,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),n>t?t:n>e?n:e},f0=function(n){return(n=isFinite(n)?n%360:0)>0?n:n+360},Ed=function(n){return{r:Gt(n.r,0,255),g:Gt(n.g,0,255),b:Gt(n.b,0,255),a:Gt(n.a)}},qc=function(n){return{r:at(n.r),g:at(n.g),b:at(n.b),a:at(n.a,3)}},Px=/^#([0-9a-f]{3,8})$/i,Go=function(n){var e=n.toString(16);return e.length<2?"0"+e:e},p0=function(n){var e=n.r,t=n.g,s=n.b,r=n.a,i=Math.max(e,t,s),o=i-Math.min(e,t,s),a=o?i===e?(t-s)/o:i===t?2+(s-e)/o:4+(e-t)/o:0;return{h:60*(a<0?a+6:a),s:i?o/i*100:0,v:i/255*100,a:r}},m0=function(n){var e=n.h,t=n.s,s=n.v,r=n.a;e=e/360*6,t/=100,s/=100;var i=Math.floor(e),o=s*(1-t),a=s*(1-(e-i)*t),c=s*(1-(1-e+i)*t),l=i%6;return{r:255*[s,a,o,o,c,s][l],g:255*[c,s,s,a,o,o][l],b:255*[o,o,c,s,s,a][l],a:r}},Cd=function(n){return{h:f0(n.h),s:Gt(n.s,0,100),l:Gt(n.l,0,100),a:Gt(n.a)}},Sd=function(n){return{h:at(n.h),s:at(n.s),l:at(n.l),a:at(n.a,3)}},Od=function(n){return m0((t=(e=n).s,{h:e.h,s:(t*=((s=e.l)<50?s:100-s)/100)>0?2*t/(s+t)*100:0,v:s+t,a:e.a}));var e,t,s},Pi=function(n){return{h:(e=p0(n)).h,s:(r=(200-(t=e.s))*(s=e.v)/100)>0&&r<200?t*s/100/(r<=100?r:200-r)*100:0,l:r/2,a:e.a};var e,t,s,r},Rx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Dx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Mx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ix=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Tl={string:[[function(n){var e=Px.exec(n);return e?(n=e[1]).length<=4?{r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:n.length===4?at(parseInt(n[3]+n[3],16)/255,2):1}:n.length===6||n.length===8?{r:parseInt(n.substr(0,2),16),g:parseInt(n.substr(2,2),16),b:parseInt(n.substr(4,2),16),a:n.length===8?at(parseInt(n.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(n){var e=Mx.exec(n)||Ix.exec(n);return e?e[2]!==e[4]||e[4]!==e[6]?null:Ed({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(n){var e=Rx.exec(n)||Dx.exec(n);if(!e)return null;var t,s,r=Cd({h:(t=e[1],s=e[2],s===void 0&&(s="deg"),Number(t)*(Ax[s]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Od(r)},"hsl"]],object:[[function(n){var e=n.r,t=n.g,s=n.b,r=n.a,i=r===void 0?1:r;return Nn(e)&&Nn(t)&&Nn(s)?Ed({r:Number(e),g:Number(t),b:Number(s),a:Number(i)}):null},"rgb"],[function(n){var e=n.h,t=n.s,s=n.l,r=n.a,i=r===void 0?1:r;if(!Nn(e)||!Nn(t)||!Nn(s))return null;var o=Cd({h:Number(e),s:Number(t),l:Number(s),a:Number(i)});return Od(o)},"hsl"],[function(n){var e=n.h,t=n.s,s=n.v,r=n.a,i=r===void 0?1:r;if(!Nn(e)||!Nn(t)||!Nn(s))return null;var o=function(a){return{h:f0(a.h),s:Gt(a.s,0,100),v:Gt(a.v,0,100),a:Gt(a.a)}}({h:Number(e),s:Number(t),v:Number(s),a:Number(i)});return m0(o)},"hsv"]]},Ad=function(n,e){for(var t=0;t=.5},n.prototype.toHex=function(){return e=qc(this.rgba),t=e.r,s=e.g,r=e.b,o=(i=e.a)<1?Go(at(255*i)):"","#"+Go(t)+Go(s)+Go(r)+o;var e,t,s,r,i,o},n.prototype.toRgb=function(){return qc(this.rgba)},n.prototype.toRgbString=function(){return e=qc(this.rgba),t=e.r,s=e.g,r=e.b,(i=e.a)<1?"rgba("+t+", "+s+", "+r+", "+i+")":"rgb("+t+", "+s+", "+r+")";var e,t,s,r,i},n.prototype.toHsl=function(){return Sd(Pi(this.rgba))},n.prototype.toHslString=function(){return e=Sd(Pi(this.rgba)),t=e.h,s=e.s,r=e.l,(i=e.a)<1?"hsla("+t+", "+s+"%, "+r+"%, "+i+")":"hsl("+t+", "+s+"%, "+r+"%)";var e,t,s,r,i},n.prototype.toHsv=function(){return e=p0(this.rgba),{h:at(e.h),s:at(e.s),v:at(e.v),a:at(e.a,3)};var e},n.prototype.invert=function(){return vt({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},n.prototype.saturate=function(e){return e===void 0&&(e=.1),vt(Hc(this.rgba,e))},n.prototype.desaturate=function(e){return e===void 0&&(e=.1),vt(Hc(this.rgba,-e))},n.prototype.grayscale=function(){return vt(Hc(this.rgba,-1))},n.prototype.lighten=function(e){return e===void 0&&(e=.1),vt(Pd(this.rgba,e))},n.prototype.darken=function(e){return e===void 0&&(e=.1),vt(Pd(this.rgba,-e))},n.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},n.prototype.alpha=function(e){return typeof e=="number"?vt({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):at(this.rgba.a,3);var t},n.prototype.hue=function(e){var t=Pi(this.rgba);return typeof e=="number"?vt({h:e,s:t.s,l:t.l,a:t.a}):at(t.h)},n.prototype.isEqual=function(e){return this.toHex()===vt(e).toHex()},n}(),vt=function(n){return n instanceof El?n:new El(n)},Rd=[],$x=function(n){n.forEach(function(e){Rd.indexOf(e)<0&&(e(El,Tl),Rd.push(e))})};function Fx(n,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},s={};for(var r in t)s[t[r]]=r;var i={};n.prototype.toName=function(o){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,c,l=s[this.toHex()];if(l)return l;if(o!=null&&o.closest){var u=this.toRgb(),h=1/0,d="black";if(!i.length)for(var f in t)i[f]=new n(t[f]).toRgb();for(var m in t){var p=(a=u,c=i[m],Math.pow(a.r-c.r,2)+Math.pow(a.g-c.g,2)+Math.pow(a.b-c.b,2));p=0||(r[t]=n[t]);return r}function Cl(n){var e=y.useRef(n),t=y.useRef(function(s){e.current&&e.current(s)});return e.current=n,t.current}var Fr=function(n,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),n>t?t:n0:g.buttons>0)&&r.current?i(Dd(r.current,g,a.current)):p(!1)},m=function(){return p(!1)};function p(g){var _=c.current,x=Sl(r.current),k=g?x.addEventListener:x.removeEventListener;k(_?"touchmove":"mousemove",f),k(_?"touchend":"mouseup",m)}return[function(g){var _=g.nativeEvent,x=r.current;if(x&&(Md(_),!function(v,b){return b&&!Ri(v)}(_,c.current)&&x)){if(Ri(_)){c.current=!0;var k=_.changedTouches||[];k.length&&(a.current=k[0].identifier)}x.focus(),i(Dd(x,_,a.current)),p(!0)}},function(g){var _=g.which||g.keyCode;_<37||_>40||(g.preventDefault(),o({left:_===39?.05:_===37?-.05:0,top:_===40?.05:_===38?-.05:0}))},p]},[o,i]),u=l[0],h=l[1],d=l[2];return y.useEffect(function(){return d},[d]),I.createElement("div",ei({},s,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:r,onKeyDown:h,tabIndex:0,role:"slider"}))}),wo=function(n){return n.filter(Boolean).join(" ")},Pu=function(n){var e=n.color,t=n.left,s=n.top,r=s===void 0?.5:s,i=wo(["react-colorful__pointer",n.className]);return I.createElement("div",{className:i,style:{top:100*r+"%",left:100*t+"%"}},I.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},wt=function(n,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*n)/t},_0=function(n){var e=n.s,t=n.v,s=n.a,r=(200-e)*t/100;return{h:wt(n.h),s:wt(r>0&&r<200?e*t/100/(r<=100?r:200-r)*100:0),l:wt(r/2),a:wt(s,2)}},Ol=function(n){var e=_0(n);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},Gc=function(n){var e=_0(n);return"hsla("+e.h+", "+e.s+"%, "+e.l+"%, "+e.a+")"},y0=function(n){var e=n.h,t=n.s,s=n.v,r=n.a;e=e/360*6,t/=100,s/=100;var i=Math.floor(e),o=s*(1-t),a=s*(1-(e-i)*t),c=s*(1-(1-e+i)*t),l=i%6;return{r:wt(255*[s,a,o,o,c,s][l]),g:wt(255*[c,s,s,a,o,o][l]),b:wt(255*[o,o,c,s,s,a][l]),a:wt(r,2)}},v0=function(n){var e=n.r,t=n.g,s=n.b,r=n.a,i=Math.max(e,t,s),o=i-Math.min(e,t,s),a=o?i===e?(t-s)/o:i===t?2+(s-e)/o:4+(e-t)/o:0;return{h:wt(60*(a<0?a+6:a)),s:wt(i?o/i*100:0),v:wt(i/255*100),a:r}},b0=I.memo(function(n){var e=n.hue,t=n.onChange,s=wo(["react-colorful__hue",n.className]);return I.createElement("div",{className:s},I.createElement(Au,{onMove:function(r){t({h:360*r.left})},onKey:function(r){t({h:Fr(e+360*r.left,0,360)})},"aria-label":"Hue","aria-valuenow":wt(e),"aria-valuemax":"360","aria-valuemin":"0"},I.createElement(Pu,{className:"react-colorful__hue-pointer",left:e/360,color:Ol({h:e,s:100,v:100,a:1})})))}),x0=I.memo(function(n){var e=n.hsva,t=n.onChange,s={backgroundColor:Ol({h:e.h,s:100,v:100,a:1})};return I.createElement("div",{className:"react-colorful__saturation",style:s},I.createElement(Au,{onMove:function(r){t({s:100*r.left,v:100-100*r.top})},onKey:function(r){t({s:Fr(e.s+100*r.left,0,100),v:Fr(e.v-100*r.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+wt(e.s)+"%, Brightness "+wt(e.v)+"%"},I.createElement(Pu,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:Ol(e)})))}),Ru=function(n,e){if(n===e)return!0;for(var t in n)if(n[t]!==e[t])return!1;return!0};function w0(n,e,t){var s=Cl(t),r=y.useState(function(){return n.toHsva(e)}),i=r[0],o=r[1],a=y.useRef({color:e,hsva:i});y.useEffect(function(){if(!n.equal(e,a.current.color)){var l=n.toHsva(e);a.current={hsva:l,color:e},o(l)}},[e,n]),y.useEffect(function(){var l;Ru(i,a.current.hsva)||n.equal(l=n.fromHsva(i),a.current.color)||(a.current={hsva:i,color:l},s(l))},[i,n,s]);var c=y.useCallback(function(l){o(function(u){return Object.assign({},u,l)})},[]);return[i,c]}var Lx=typeof window<"u"?y.useLayoutEffect:y.useEffect,jx=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Id=new Map,k0=function(n){Lx(function(){var e=n.current?n.current.ownerDocument:document;if(e!==void 0&&!Id.has(e)){var t=e.createElement("style");t.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,Id.set(e,t);var s=jx();s&&t.setAttribute("nonce",s),e.head.appendChild(t)}},[])},Vx=function(n){var e=n.className,t=n.colorModel,s=n.color,r=s===void 0?t.defaultColor:s,i=n.onChange,o=Ou(n,["className","colorModel","color","onChange"]),a=y.useRef(null);k0(a);var c=w0(t,r,i),l=c[0],u=c[1],h=wo(["react-colorful",e]);return I.createElement("div",ei({},o,{ref:a,className:h}),I.createElement(x0,{hsva:l,onChange:u}),I.createElement(b0,{hue:l.h,onChange:u,className:"react-colorful__last-control"}))},zx=function(n){var e=n.className,t=n.hsva,s=n.onChange,r={backgroundImage:"linear-gradient(90deg, "+Gc(Object.assign({},t,{a:0}))+", "+Gc(Object.assign({},t,{a:1}))+")"},i=wo(["react-colorful__alpha",e]),o=wt(100*t.a);return I.createElement("div",{className:i},I.createElement("div",{className:"react-colorful__alpha-gradient",style:r}),I.createElement(Au,{onMove:function(a){s({a:a.left})},onKey:function(a){s({a:Fr(t.a+a.left)})},"aria-label":"Alpha","aria-valuetext":o+"%","aria-valuenow":o,"aria-valuemin":"0","aria-valuemax":"100"},I.createElement(Pu,{className:"react-colorful__alpha-pointer",left:t.a,color:Gc(t)})))},Ux=function(n){var e=n.className,t=n.colorModel,s=n.color,r=s===void 0?t.defaultColor:s,i=n.onChange,o=Ou(n,["className","colorModel","color","onChange"]),a=y.useRef(null);k0(a);var c=w0(t,r,i),l=c[0],u=c[1],h=wo(["react-colorful",e]);return I.createElement("div",ei({},o,{ref:a,className:h}),I.createElement(x0,{hsva:l,onChange:u}),I.createElement(b0,{hue:l.h,onChange:u}),I.createElement(zx,{hsva:l,onChange:u,className:"react-colorful__last-control"}))},Bx={defaultColor:{r:0,g:0,b:0,a:1},toHsva:v0,fromHsva:y0,equal:Ru},Wx=function(n){return I.createElement(Ux,ei({},n,{colorModel:Bx}))},qx={defaultColor:{r:0,g:0,b:0},toHsva:function(n){return v0({r:n.r,g:n.g,b:n.b,a:1})},fromHsva:function(n){return{r:(e=y0(n)).r,g:e.g,b:e.b};var e},equal:Ru},Hx=function(n){return I.createElement(Vx,ei({},n,{colorModel:qx}))};function pn(n,e,t,s){var r=arguments.length,i=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(e,t,i):o(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i}function Ie(n,e,t,s){function r(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{l(s.next(u))}catch(h){o(h)}}function c(u){try{l(s.throw(u))}catch(h){o(h)}}function l(u){u.done?i(u.value):r(u.value).then(a,c)}l((s=s.apply(n,e||[])).next())})}function ti(n,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,r,i,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(s)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(t=0)),t;)try{if(s=1,r&&(i=l[0]&2?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,r=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]0)&&!(r=s.next()).done;)i.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(t=s.return)&&t.call(s)}finally{if(o)throw o.error}}return i}function Gx(){for(var n=[],e=0;e0?s:n.name,writable:!1,configurable:!1,enumerable:!0})}return t}function Zx(n){var e=n.name,t=e&&e.lastIndexOf(".")!==-1;if(t&&!n.type){var s=e.split(".").pop().toLowerCase(),r=Xx.get(s);r&&Object.defineProperty(n,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return n}var Kx=[".DS_Store","Thumbs.db"];function Qx(n){return Ie(this,void 0,void 0,function(){return ti(this,function(e){return ba(n)&&Jx(n)?[2,sw(n.dataTransfer,n.type)]:ew(n)?[2,tw(n)]:Array.isArray(n)&&n.every(function(t){return"getFile"in t&&typeof t.getFile=="function"})?[2,nw(n)]:[2,[]]})})}function Jx(n){return ba(n.dataTransfer)}function ew(n){return ba(n)&&ba(n.target)}function ba(n){return typeof n=="object"&&n!==null}function tw(n){return Al(n.target.files).map(function(e){return ko(e)})}function nw(n){return Ie(this,void 0,void 0,function(){var e;return ti(this,function(t){switch(t.label){case 0:return[4,Promise.all(n.map(function(s){return s.getFile()}))];case 1:return e=t.sent(),[2,e.map(function(s){return ko(s)})]}})})}function sw(n,e){return Ie(this,void 0,void 0,function(){var t,s;return ti(this,function(r){switch(r.label){case 0:return n===null?[2,[]]:n.items?(t=Al(n.items).filter(function(i){return i.kind==="file"}),e!=="drop"?[2,t]:[4,Promise.all(t.map(rw))]):[3,2];case 1:return s=r.sent(),[2,Nd(T0(s))];case 2:return[2,Nd(Al(n.files).map(function(i){return ko(i)}))]}})})}function Nd(n){return n.filter(function(e){return Kx.indexOf(e.name)===-1})}function Al(n){if(n===null)return[];for(var e=[],t=0;tn.length)&&(e=n.length);for(var t=0,s=new Array(e);tt)return[!1,zd(t)];if(n.sizet)return[!1,zd(t)]}return[!0,null]}function xi(n){return n!=null}function yw(n){var e=n.files,t=n.accept,s=n.minSize,r=n.maxSize,i=n.multiple,o=n.maxFiles;return!i&&e.length>1||i&&o>=1&&e.length>o?!1:e.every(function(a){var c=S0(a,t),l=jd(c,1),u=l[0],h=O0(a,s,r),d=jd(h,1),f=d[0];return u&&f})}function xa(n){return typeof n.isPropagationStopped=="function"?n.isPropagationStopped():typeof n.cancelBubble<"u"?n.cancelBubble:!1}function Xo(n){return n.dataTransfer?Array.prototype.some.call(n.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!n.target&&!!n.target.files}function Bd(n){n.preventDefault()}function vw(n){return n.indexOf("MSIE")!==-1||n.indexOf("Trident/")!==-1}function bw(n){return n.indexOf("Edge/")!==-1}function xw(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return vw(n)||bw(n)}function bn(){for(var n=arguments.length,e=new Array(n),t=0;t1?r-1:0),o=1;on.length)&&(e=n.length);for(var t=0,s=new Array(e);t=0)&&Object.prototype.propertyIsEnumerable.call(n,s)&&(t[s]=n[s])}return t}function Fw(n,e){if(n==null)return{};var t={},s=Object.keys(n),r,i;for(i=0;i=0)&&(t[r]=n[r]);return t}var Du=y.forwardRef(function(n,e){var t=n.children,s=wa(n,Cw),r=R0(s),i=r.open,o=wa(r,Sw);return y.useImperativeHandle(e,function(){return{open:i}},[i]),I.createElement(y.Fragment,null,t(Be(Be({},o),{},{open:i})))});Du.displayName="Dropzone";var P0={disabled:!1,getFilesFromEvent:Qx,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};Du.defaultProps=P0;Du.propTypes={children:ke.func,accept:ke.oneOfType([ke.string,ke.arrayOf(ke.string)]),multiple:ke.bool,preventDropOnDocument:ke.bool,noClick:ke.bool,noKeyboard:ke.bool,noDrag:ke.bool,noDragEventsBubbling:ke.bool,minSize:ke.number,maxSize:ke.number,maxFiles:ke.number,disabled:ke.bool,getFilesFromEvent:ke.func,onFileDialogCancel:ke.func,onFileDialogOpen:ke.func,useFsAccessApi:ke.bool,onDragEnter:ke.func,onDragLeave:ke.func,onDragOver:ke.func,onDrop:ke.func,onDropAccepted:ke.func,onDropRejected:ke.func,validator:ke.func};var Dl={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function R0(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=Be(Be({},P0),n),t=e.accept,s=e.disabled,r=e.getFilesFromEvent,i=e.maxSize,o=e.minSize,a=e.multiple,c=e.maxFiles,l=e.onDragEnter,u=e.onDragLeave,h=e.onDragOver,d=e.onDrop,f=e.onDropAccepted,m=e.onDropRejected,p=e.onFileDialogCancel,g=e.onFileDialogOpen,_=e.useFsAccessApi,x=e.preventDropOnDocument,k=e.noClick,v=e.noKeyboard,b=e.noDrag,T=e.noDragEventsBubbling,E=e.validator,w=y.useMemo(function(){return typeof g=="function"?g:qd},[g]),C=y.useMemo(function(){return typeof p=="function"?p:qd},[p]),S=y.useRef(null),R=y.useRef(null),O=y.useReducer(Lw,Dl),L=Xc(O,2),j=L[0],q=L[1],z=j.isFocused,V=j.isFileDialogActive,U=j.draggedFiles,X=y.useRef(typeof window<"u"&&window.isSecureContext&&_&&ww()),Z=function(){!X.current&&V&&setTimeout(function(){if(R.current){var fe=R.current.files;fe.length||(q({type:"closeDialog"}),C())}},300)};y.useEffect(function(){return window.addEventListener("focus",Z,!1),function(){window.removeEventListener("focus",Z,!1)}},[R,V,C,X]);var Q=y.useRef([]),$=function(fe){S.current&&S.current.contains(fe.target)||(fe.preventDefault(),Q.current=[])};y.useEffect(function(){return x&&(document.addEventListener("dragover",Bd,!1),document.addEventListener("drop",$,!1)),function(){x&&(document.removeEventListener("dragover",Bd),document.removeEventListener("drop",$))}},[S,x]);var F=y.useCallback(function(ee){ee.preventDefault(),ee.persist(),D(ee),Q.current=[].concat(Pw(Q.current),[ee.target]),Xo(ee)&&Promise.resolve(r(ee)).then(function(fe){xa(ee)&&!T||(q({draggedFiles:fe,isDragActive:!0,type:"setDraggedFiles"}),l&&l(ee))})},[r,l,T]),A=y.useCallback(function(ee){ee.preventDefault(),ee.persist(),D(ee);var fe=Xo(ee);if(fe&&ee.dataTransfer)try{ee.dataTransfer.dropEffect="copy"}catch{}return fe&&h&&h(ee),!1},[h,T]),M=y.useCallback(function(ee){ee.preventDefault(),ee.persist(),D(ee);var fe=Q.current.filter(function(it){return S.current&&S.current.contains(it)}),Je=fe.indexOf(ee.target);Je!==-1&&fe.splice(Je,1),Q.current=fe,!(fe.length>0)&&(q({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),Xo(ee)&&u&&u(ee))},[S,u,T]),Y=y.useCallback(function(ee,fe){var Je=[],it=[];ee.forEach(function(Nt){var is=S0(Nt,t),lr=Xc(is,2),Cc=lr[0],Sc=lr[1],Oc=O0(Nt,o,i),Io=Xc(Oc,2),Ac=Io[0],Pc=Io[1],Rc=E?E(Nt):null;if(Cc&&Ac&&!Rc)Je.push(Nt);else{var Dc=[Sc,Pc];Rc&&(Dc=Dc.concat(Rc)),it.push({file:Nt,errors:Dc.filter(function(l_){return l_})})}}),(!a&&Je.length>1||a&&c>=1&&Je.length>c)&&(Je.forEach(function(Nt){it.push({file:Nt,errors:[_w]})}),Je.splice(0)),q({acceptedFiles:Je,fileRejections:it,type:"setFiles"}),d&&d(Je,it,fe),it.length>0&&m&&m(it,fe),Je.length>0&&f&&f(Je,fe)},[q,a,t,o,i,c,d,f,m,E]),N=y.useCallback(function(ee){ee.preventDefault(),ee.persist(),D(ee),Q.current=[],Xo(ee)&&Promise.resolve(r(ee)).then(function(fe){xa(ee)&&!T||Y(fe,ee)}),q({type:"reset"})},[r,Y,T]),W=y.useCallback(function(){if(X.current){q({type:"openDialog"}),w();var ee={multiple:a,types:kw(t)};window.showOpenFilePicker(ee).then(function(fe){return r(fe)}).then(function(fe){Y(fe,null),q({type:"closeDialog"})}).catch(function(fe){Tw(fe)?(C(fe),q({type:"closeDialog"})):Ew(fe)&&(X.current=!1,R.current&&(R.current.value=null,R.current.click()))});return}R.current&&(q({type:"openDialog"}),w(),R.current.value=null,R.current.click())},[q,w,C,_,Y,t,a]),oe=y.useCallback(function(ee){!S.current||!S.current.isEqualNode(ee.target)||(ee.key===" "||ee.key==="Enter"||ee.keyCode===32||ee.keyCode===13)&&(ee.preventDefault(),W())},[S,W]),re=y.useCallback(function(){q({type:"focus"})},[]),ie=y.useCallback(function(){q({type:"blur"})},[]),ne=y.useCallback(function(){k||(xw()?setTimeout(W,0):W())},[k,W]),ge=function(fe){return s?null:fe},te=function(fe){return v?null:ge(fe)},H=function(fe){return b?null:ge(fe)},D=function(fe){T&&fe.stopPropagation()},P=y.useMemo(function(){return function(){var ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},fe=ee.refKey,Je=fe===void 0?"ref":fe,it=ee.role,Nt=ee.onKeyDown,is=ee.onFocus,lr=ee.onBlur,Cc=ee.onClick,Sc=ee.onDragEnter,Oc=ee.onDragOver,Io=ee.onDragLeave,Ac=ee.onDrop,Pc=wa(ee,Ow);return Be(Be(Rl({onKeyDown:te(bn(Nt,oe)),onFocus:te(bn(is,re)),onBlur:te(bn(lr,ie)),onClick:ge(bn(Cc,ne)),onDragEnter:H(bn(Sc,F)),onDragOver:H(bn(Oc,A)),onDragLeave:H(bn(Io,M)),onDrop:H(bn(Ac,N)),role:typeof it=="string"&&it!==""?it:"button"},Je,S),!s&&!v?{tabIndex:0}:{}),Pc)}},[S,oe,re,ie,ne,F,A,M,N,v,b,s]),J=y.useCallback(function(ee){ee.stopPropagation()},[]),se=y.useMemo(function(){return function(){var ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},fe=ee.refKey,Je=fe===void 0?"ref":fe,it=ee.onChange,Nt=ee.onClick,is=wa(ee,Aw),lr=Rl({accept:t,multiple:a,type:"file",style:{display:"none"},onChange:ge(bn(it,N)),onClick:ge(bn(Nt,J)),tabIndex:-1},Je,R);return Be(Be({},lr),is)}},[R,t,a,N,s]),le=U.length,ye=le>0&&yw({files:U,accept:t,minSize:o,maxSize:i,multiple:a,maxFiles:c}),Qe=le>0&&!ye;return Be(Be({},j),{},{isDragAccept:ye,isDragReject:Qe,isFocused:z&&!s,getRootProps:P,getInputProps:se,rootRef:S,inputRef:R,open:ge(W)})}function Lw(n,e){switch(e.type){case"focus":return Be(Be({},n),{},{isFocused:!0});case"blur":return Be(Be({},n),{},{isFocused:!1});case"openDialog":return Be(Be({},Dl),{},{isFileDialogActive:!0});case"closeDialog":return Be(Be({},n),{},{isFileDialogActive:!1});case"setDraggedFiles":var t=e.isDragActive,s=e.draggedFiles;return Be(Be({},n),{},{draggedFiles:s,isDragActive:t});case"setFiles":return Be(Be({},n),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return Be({},Dl);default:return n}}function qd(){}function jw(n){let e;const t=new Set,s=(l,u)=>{const h=typeof l=="function"?l(e):l;if(h!==e){const d=e;e=u?h:Object.assign({},e,h),t.forEach(f=>f(e,d))}},r=()=>e,i=(l,u=r,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let d=u(e);function f(){const m=u(e);if(!h(d,m)){const p=d;l(d=m,p)}}return t.add(f),()=>t.delete(f)},c={setState:s,getState:r,subscribe:(l,u,h)=>u||h?i(l,u,h):(t.add(l),()=>t.delete(l)),destroy:()=>t.clear()};return e=n(s,r,c),c}const Vw=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Hd=Vw?y.useEffect:y.useLayoutEffect;function zw(n){const e=typeof n=="function"?jw(n):n,t=(s=e.getState,r=Object.is)=>{const[,i]=y.useReducer(g=>g+1,0),o=e.getState(),a=y.useRef(o),c=y.useRef(s),l=y.useRef(r),u=y.useRef(!1),h=y.useRef();h.current===void 0&&(h.current=s(o));let d,f=!1;(a.current!==o||c.current!==s||l.current!==r||u.current)&&(d=s(o),f=!r(h.current,d)),Hd(()=>{f&&(h.current=d),a.current=o,c.current=s,l.current=r,u.current=!1});const m=y.useRef(o);Hd(()=>{const g=()=>{try{const x=e.getState(),k=c.current(x);l.current(h.current,k)||(a.current=x,h.current=k,i())}catch{u.current=!0,i()}},_=e.subscribe(g);return e.getState()!==m.current&&g(),_},[]);const p=f?d:h.current;return y.useDebugValue(p),p};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const s=[t,e];return{next(){const r=s.length<=0;return{value:s.shift(),done:r}}}},t}const Uw=n=>(e,t,s)=>{const r=s.subscribe;return s.subscribe=(o,a,c)=>{let l=o;if(a){const u=(c==null?void 0:c.equalityFn)||Object.is;let h=o(s.getState());l=d=>{const f=o(d);if(!u(h,f)){const m=h;a(h=f,m)}},c!=null&&c.fireImmediately&&a(h,h)}return r(l)},n(e,t,s)};/*! + */const pe={LEFT:1,RIGHT:2,MIDDLE:4},G=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),dr={NONE:0,IN:1,OUT:-1};function Ms(n){return n.isPerspectiveCamera}function as(n){return n.isOrthographicCamera}const fr=Math.PI*2,Hh=Math.PI/2,_p=1e-5,pi=Math.PI/180;function sn(n,e,t){return Math.max(e,Math.min(t,n))}function $e(n,e=_p){return Math.abs(n)0==f>u&&(f=u,t.value=(f-u)/i),f}function Gh(n,e,t,s,r=1/0,i,o){s=Math.max(1e-4,s);const a=2/s,c=a*i,l=1/(1+c+.48*c*c+.235*c*c*c);let u=e.x,h=e.y,d=e.z,f=n.x-u,m=n.y-h,p=n.z-d;const g=u,_=h,w=d,k=r*s,b=k*k,v=f*f+m*m+p*p;if(v>b){const W=Math.sqrt(v);f=f/W*k,m=m/W*k,p=p/W*k}u=n.x-f,h=n.y-m,d=n.z-p;const T=(t.x+a*f)*i,E=(t.y+a*m)*i,x=(t.z+a*p)*i;t.x=(t.x-a*T)*l,t.y=(t.y-a*E)*l,t.z=(t.z-a*x)*l,o.x=u+(f+T)*l,o.y=h+(m+E)*l,o.z=d+(p+x)*l;const C=g-n.x,S=_-n.y,R=w-n.z,O=o.x-g,L=o.y-_,j=o.z-w;return C*O+S*L+R*j>0&&(o.x=g,o.y=_,o.z=w,t.x=(o.x-g)/i,t.y=(o.y-_)/i,t.z=(o.z-w)/i),o}function Fc(n,e){e.set(0,0),n.forEach(t=>{e.x+=t.clientX,e.y+=t.clientY}),e.x/=n.length,e.y/=n.length}function Lc(n,e){return as(n)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}class d1{constructor(){this._listeners={}}addEventListener(e,t){const s=this._listeners;s[e]===void 0&&(s[e]=[]),s[e].indexOf(t)===-1&&s[e].push(t)}hasEventListener(e,t){const s=this._listeners;return s[e]!==void 0&&s[e].indexOf(t)!==-1}removeEventListener(e,t){const r=this._listeners[e];if(r!==void 0){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){const s=this._listeners[e.type];if(s!==void 0){e.target=this;const r=s.slice(0);for(let i=0,o=r.length;i{},this._enabled=!0,this._state=G.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._dragNeedsUpdate=!0,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=dr.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new he.Vector3,this._focalOffsetVelocity=new he.Vector3,this._zoomVelocity={value:0},this._truckInternal=(b,v,T)=>{let E,x;if(Ms(this._camera)){const C=_e.copy(this._camera.position).sub(this._target),S=this._camera.getEffectiveFOV()*pi,R=C.length()*Math.tan(S*.5);E=this.truckSpeed*b*R/this._elementRect.height,x=this.truckSpeed*v*R/this._elementRect.height}else if(as(this._camera)){const C=this._camera;E=b*(C.right-C.left)/C.zoom/this._elementRect.width,x=v*(C.top-C.bottom)/C.zoom/this._elementRect.height}else return;this.verticalDragToForward?(T?this.setFocalOffset(this._focalOffsetEnd.x+E,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(E,0,!0),this.forward(-x,!0)):T?this.setFocalOffset(this._focalOffsetEnd.x+E,this._focalOffsetEnd.y+x,this._focalOffsetEnd.z,!0):this.truck(E,x,!0)},this._rotateInternal=(b,v)=>{const T=fr*this.azimuthRotateSpeed*b/this._elementRect.height,E=fr*this.polarRotateSpeed*v/this._elementRect.height;this.rotate(T,E,!0)},this._dollyInternal=(b,v,T)=>{const E=Math.pow(.95,-b*this.dollySpeed),x=this._sphericalEnd.radius,C=this._sphericalEnd.radius*E,S=sn(C,this.minDistance,this.maxDistance),R=S-C;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(C,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(R,!0),this._dollyToNoClamp(S,!0)):this._dollyToNoClamp(S,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?C:S)-x,this._dollyControlCoord.set(v,T)),this._lastDollyDirection=Math.sign(-b)},this._zoomInternal=(b,v,T)=>{const E=Math.pow(.95,b*this.dollySpeed),x=this._zoom,C=this._zoom*E;this.zoomTo(C,!0),this.dollyToCursor&&(this._changedZoom+=C-x,this._dollyControlCoord.set(v,T))},typeof he>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=new he.Quaternion().setFromUnitVectors(this._camera.up,Uo),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=G.NONE,this._target=new he.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new he.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new he.Spherical().setFromVector3(_e.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new he.Vector3,new he.Vector3,new he.Vector3,new he.Vector3],this._updateNearPlaneCorners(),this._boundary=new he.Box3(new he.Vector3(-1/0,-1/0,-1/0),new he.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new he.Vector2,this.mouseButtons={left:G.ROTATE,middle:G.DOLLY,right:G.TRUCK,wheel:Ms(this._camera)?G.DOLLY:as(this._camera)?G.ZOOM:G.NONE},this.touches={one:G.TOUCH_ROTATE,two:Ms(this._camera)?G.TOUCH_DOLLY_TRUCK:as(this._camera)?G.TOUCH_ZOOM_TRUCK:G.NONE,three:G.TOUCH_TRUCK};const s=new he.Vector2,r=new he.Vector2,i=new he.Vector2,o=b=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const E=this._domElement.getBoundingClientRect(),x=b.clientX/E.width,C=b.clientY/E.height;if(xthis._interactiveArea.right||Cthis._interactiveArea.bottom)return}const v=b.pointerType!=="mouse"?null:(b.buttons&pe.LEFT)===pe.LEFT?pe.LEFT:(b.buttons&pe.MIDDLE)===pe.MIDDLE?pe.MIDDLE:(b.buttons&pe.RIGHT)===pe.RIGHT?pe.RIGHT:null;if(v!==null){const E=this._findPointerByMouseButton(v);E&&this._disposePointer(E)}if((b.buttons&pe.LEFT)===pe.LEFT&&this._lockedPointer)return;const T={pointerId:b.pointerId,clientX:b.clientX,clientY:b.clientY,deltaX:0,deltaY:0,mouseButton:v};this._activePointers.push(T),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.addEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),this._isDragging=!0,p(b)},a=b=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const E=this._domElement.getBoundingClientRect(),x=b.clientX/E.width,C=b.clientY/E.height;if(xthis._interactiveArea.right||Cthis._interactiveArea.bottom)return}const v=(b.buttons&pe.LEFT)===pe.LEFT?pe.LEFT:(b.buttons&pe.MIDDLE)===pe.MIDDLE?pe.MIDDLE:(b.buttons&pe.RIGHT)===pe.RIGHT?pe.RIGHT:null;if(v!==null){const E=this._findPointerByMouseButton(v);E&&this._disposePointer(E)}const T={pointerId:1,clientX:b.clientX,clientY:b.clientY,deltaX:0,deltaY:0,mouseButton:(b.buttons&pe.LEFT)===pe.LEFT?pe.LEFT:(b.buttons&pe.MIDDLE)===pe.LEFT?pe.MIDDLE:(b.buttons&pe.RIGHT)===pe.LEFT?pe.RIGHT:null};this._activePointers.push(T),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",h),this._domElement.ownerDocument.addEventListener("mousemove",l),this._domElement.ownerDocument.addEventListener("mouseup",h),this._isDragging=!0,p(b)},c=b=>{b.cancelable&&b.preventDefault();const v=b.pointerId,T=this._lockedPointer||this._findPointerById(v);if(T){if(T.clientX=b.clientX,T.clientY=b.clientY,T.deltaX=b.movementX,T.deltaY=b.movementY,this._state=0,b.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(b.buttons&pe.LEFT)===pe.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(b.buttons&pe.MIDDLE)===pe.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(b.buttons&pe.RIGHT)===pe.RIGHT&&(this._state=this._state|this.mouseButtons.right);g()}},l=b=>{const v=this._lockedPointer||this._findPointerById(1);v&&(v.clientX=b.clientX,v.clientY=b.clientY,v.deltaX=b.movementX,v.deltaY=b.movementY,this._state=0,(this._lockedPointer||(b.buttons&pe.LEFT)===pe.LEFT)&&(this._state=this._state|this.mouseButtons.left),(b.buttons&pe.MIDDLE)===pe.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(b.buttons&pe.RIGHT)===pe.RIGHT&&(this._state=this._state|this.mouseButtons.right),g())},u=b=>{const v=this._findPointerById(b.pointerId);if(!(v&&v===this._lockedPointer)){if(v&&this._disposePointer(v),b.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=G.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=G.NONE;_()}},h=()=>{const b=this._findPointerById(1);b&&b===this._lockedPointer||(b&&this._disposePointer(b),this._state=G.NONE,_())};let d=-1;const f=b=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===G.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const C=this._domElement.getBoundingClientRect(),S=b.clientX/C.width,R=b.clientY/C.height;if(Sthis._interactiveArea.right||Rthis._interactiveArea.bottom)return}if(b.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===G.ROTATE||this.mouseButtons.wheel===G.TRUCK){const C=performance.now();d-C<1e3&&this._getClientRect(this._elementRect),d=C}const v=p1?-1:-3,T=b.deltaMode===1?b.deltaY/v:b.deltaY/(v*10),E=this.dollyToCursor?(b.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,x=this.dollyToCursor?(b.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case G.ROTATE:{this._rotateInternal(b.deltaX,b.deltaY),this._isUserControllingRotate=!0;break}case G.TRUCK:{this._truckInternal(b.deltaX,b.deltaY,!1),this._isUserControllingTruck=!0;break}case G.OFFSET:{this._truckInternal(b.deltaX,b.deltaY,!0),this._isUserControllingOffset=!0;break}case G.DOLLY:{this._dollyInternal(-T,E,x),this._isUserControllingDolly=!0;break}case G.ZOOM:{this._zoomInternal(-T,E,x),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},m=b=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===pl.ACTION.NONE){const v=b instanceof PointerEvent?b.pointerId:(b instanceof MouseEvent,0),T=this._findPointerById(v);T&&this._disposePointer(T),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("mouseup",h);return}b.preventDefault()}},p=b=>{if(!this._enabled)return;if(Fc(this._activePointers,Et),this._getClientRect(this._elementRect),s.copy(Et),r.copy(Et),this._activePointers.length>=2){const T=Et.x-this._activePointers[1].clientX,E=Et.y-this._activePointers[1].clientY,x=Math.sqrt(T*T+E*E);i.set(0,x);const C=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,S=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;r.set(C,S)}if(this._state=0,!b)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in b&&b.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(b.buttons&pe.LEFT)===pe.LEFT&&(this._state=this._state|this.mouseButtons.left),(b.buttons&pe.MIDDLE)===pe.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(b.buttons&pe.RIGHT)===pe.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&G.ROTATE)===G.ROTATE||(this._state&G.TOUCH_ROTATE)===G.TOUCH_ROTATE||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE||(this._state&G.TOUCH_ZOOM_ROTATE)===G.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&G.TRUCK)===G.TRUCK||(this._state&G.TOUCH_TRUCK)===G.TOUCH_TRUCK||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_ZOOM_TRUCK)===G.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&G.DOLLY)===G.DOLLY||(this._state&G.TOUCH_DOLLY)===G.TOUCH_DOLLY||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&G.ZOOM)===G.ZOOM||(this._state&G.TOUCH_ZOOM)===G.TOUCH_ZOOM||(this._state&G.TOUCH_ZOOM_TRUCK)===G.TOUCH_ZOOM_TRUCK||(this._state&G.TOUCH_ZOOM_OFFSET)===G.TOUCH_ZOOM_OFFSET||(this._state&G.TOUCH_ZOOM_ROTATE)===G.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&G.OFFSET)===G.OFFSET||(this._state&G.TOUCH_OFFSET)===G.TOUCH_OFFSET||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET||(this._state&G.TOUCH_ZOOM_OFFSET)===G.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},g=()=>{if(!this._enabled||!this._dragNeedsUpdate)return;this._dragNeedsUpdate=!1,Fc(this._activePointers,Et);const v=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,T=v?-v.deltaX:r.x-Et.x,E=v?-v.deltaY:r.y-Et.y;if(r.copy(Et),((this._state&G.ROTATE)===G.ROTATE||(this._state&G.TOUCH_ROTATE)===G.TOUCH_ROTATE||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE||(this._state&G.TOUCH_ZOOM_ROTATE)===G.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(T,E),this._isUserControllingRotate=!0),(this._state&G.DOLLY)===G.DOLLY||(this._state&G.ZOOM)===G.ZOOM){const x=this.dollyToCursor?(s.x-this._elementRect.x)/this._elementRect.width*2-1:0,C=this.dollyToCursor?(s.y-this._elementRect.y)/this._elementRect.height*-2+1:0,S=this.dollyDragInverted?-1:1;(this._state&G.DOLLY)===G.DOLLY?(this._dollyInternal(S*E*zo,x,C),this._isUserControllingDolly=!0):(this._zoomInternal(S*E*zo,x,C),this._isUserControllingZoom=!0)}if((this._state&G.TOUCH_DOLLY)===G.TOUCH_DOLLY||(this._state&G.TOUCH_ZOOM)===G.TOUCH_ZOOM||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_ZOOM_TRUCK)===G.TOUCH_ZOOM_TRUCK||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET||(this._state&G.TOUCH_ZOOM_OFFSET)===G.TOUCH_ZOOM_OFFSET||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE||(this._state&G.TOUCH_ZOOM_ROTATE)===G.TOUCH_ZOOM_ROTATE){const x=Et.x-this._activePointers[1].clientX,C=Et.y-this._activePointers[1].clientY,S=Math.sqrt(x*x+C*C),R=i.y-S;i.set(0,S);const O=this.dollyToCursor?(r.x-this._elementRect.x)/this._elementRect.width*2-1:0,L=this.dollyToCursor?(r.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&G.TOUCH_DOLLY)===G.TOUCH_DOLLY||(this._state&G.TOUCH_DOLLY_ROTATE)===G.TOUCH_DOLLY_ROTATE||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET?(this._dollyInternal(R*zo,O,L),this._isUserControllingDolly=!0):(this._zoomInternal(R*zo,O,L),this._isUserControllingZoom=!0)}((this._state&G.TRUCK)===G.TRUCK||(this._state&G.TOUCH_TRUCK)===G.TOUCH_TRUCK||(this._state&G.TOUCH_DOLLY_TRUCK)===G.TOUCH_DOLLY_TRUCK||(this._state&G.TOUCH_ZOOM_TRUCK)===G.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(T,E,!1),this._isUserControllingTruck=!0),((this._state&G.OFFSET)===G.OFFSET||(this._state&G.TOUCH_OFFSET)===G.TOUCH_OFFSET||(this._state&G.TOUCH_DOLLY_OFFSET)===G.TOUCH_DOLLY_OFFSET||(this._state&G.TOUCH_ZOOM_OFFSET)===G.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(T,E,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},_=()=>{Fc(this._activePointers,Et),r.copy(Et),this._dragNeedsUpdate=!1,(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mouseup",h),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",w),this._domElement.ownerDocument.addEventListener("pointerlockerror",k),this._domElement.ownerDocument.addEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",u),p())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",w),this._domElement.ownerDocument.removeEventListener("pointerlockerror",k))};const w=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},k=()=>{this.unlockPointer()};this._addAllEventListeners=b=>{this._domElement=b,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",o),m1&&this._domElement.addEventListener("mousedown",a),this._domElement.addEventListener("pointercancel",u),this._domElement.addEventListener("wheel",f,{passive:!1}),this._domElement.addEventListener("contextmenu",m)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",o),this._domElement.removeEventListener("mousedown",a),this._domElement.removeEventListener("pointercancel",u),this._domElement.removeEventListener("wheel",f,{passive:!1}),this._domElement.removeEventListener("contextmenu",m),this._domElement.ownerDocument.removeEventListener("pointermove",c,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",l),this._domElement.ownerDocument.removeEventListener("pointerup",u),this._domElement.ownerDocument.removeEventListener("mouseup",h),this._domElement.ownerDocument.removeEventListener("pointerlockchange",w),this._domElement.ownerDocument.removeEventListener("pointerlockerror",k))},this.cancel=()=>{this._state!==G.NONE&&(this._state=G.NONE,this._activePointers.length=0,_())},t&&this.connect(t),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=sn(e.width,0,1),this._interactiveArea.height=sn(e.height,0,1),this._interactiveArea.x=sn(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=sn(e.y,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,s=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,s)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,s=!1){this._isUserControllingRotate=!1;const r=sn(e,this.minAzimuthAngle,this.maxAzimuthAngle),i=sn(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=r,this._sphericalEnd.phi=i,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,s||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const o=!s||Te(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Te(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(o)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=dr.NONE,this._changedDolly=0,this._dollyToNoClamp(sn(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){const s=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const o=this._collisionTest(),a=Te(o,this._spherical.radius);if(!(s>e)&&a)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,o)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);const i=!t||Te(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(i)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(_i).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const s=!t||Te(this._target.x,this._targetEnd.x,this.restThreshold)&&Te(this._target.y,this._targetEnd.y,this.restThreshold)&&Te(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(s)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=sn(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const s=!t||Te(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(s)}pan(e,t,s=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,s)}truck(e,t,s=!1){this._camera.updateMatrix(),yn.setFromMatrixColumn(this._camera.matrix,0),vn.setFromMatrixColumn(this._camera.matrix,1),yn.multiplyScalar(e),vn.multiplyScalar(-t);const r=_e.copy(yn).add(vn),i=xe.copy(this._targetEnd).add(r);return this.moveTo(i.x,i.y,i.z,s)}forward(e,t=!1){_e.setFromMatrixColumn(this._camera.matrix,0),_e.crossVectors(this._camera.up,_e),_e.multiplyScalar(e);const s=xe.copy(this._targetEnd).add(_e);return this.moveTo(s.x,s.y,s.z,t)}elevate(e,t=!1){return _e.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+_e.x,this._targetEnd.y+_e.y,this._targetEnd.z+_e.z,t)}moveTo(e,t,s,r=!1){this._isUserControllingTruck=!1;const i=_e.set(e,t,s).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,i,this.boundaryFriction),this._needsUpdate=!0,r||this._target.copy(this._targetEnd);const o=!r||Te(this._target.x,this._targetEnd.x,this.restThreshold)&&Te(this._target.y,this._targetEnd.y,this.restThreshold)&&Te(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(o)}lookInDirectionOf(e,t,s,r=!1){const a=_e.set(e,t,s).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(a.x,a.y,a.z,r)}fitToBox(e,t,{cover:s=!1,paddingLeft:r=0,paddingRight:i=0,paddingBottom:o=0,paddingTop:a=0}={}){const c=[],l=e.isBox3?mr.copy(e):mr.setFromObject(e);l.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const u=Yh(this._sphericalEnd.theta,Hh),h=Yh(this._sphericalEnd.phi,Hh);c.push(this.rotateTo(u,h,t));const d=_e.setFromSpherical(this._sphericalEnd).normalize(),f=Jh.setFromUnitVectors(d,jc),m=Te(Math.abs(d.y),1);m&&f.multiply(zc.setFromAxisAngle(Uo,u)),f.multiply(this._yAxisUpSpaceInverse);const p=Qh.makeEmpty();xe.copy(l.min).applyQuaternion(f),p.expandByPoint(xe),xe.copy(l.min).setX(l.max.x).applyQuaternion(f),p.expandByPoint(xe),xe.copy(l.min).setY(l.max.y).applyQuaternion(f),p.expandByPoint(xe),xe.copy(l.max).setZ(l.min.z).applyQuaternion(f),p.expandByPoint(xe),xe.copy(l.min).setZ(l.max.z).applyQuaternion(f),p.expandByPoint(xe),xe.copy(l.max).setY(l.min.y).applyQuaternion(f),p.expandByPoint(xe),xe.copy(l.max).setX(l.min.x).applyQuaternion(f),p.expandByPoint(xe),xe.copy(l.max).applyQuaternion(f),p.expandByPoint(xe),p.min.x-=r,p.min.y-=o,p.max.x+=i,p.max.y+=a,f.setFromUnitVectors(jc,d),m&&f.premultiply(zc.invert()),f.premultiply(this._yAxisUpSpace);const g=p.getSize(_e),_=p.getCenter(xe).applyQuaternion(f);if(Ms(this._camera)){const w=this.getDistanceToFitBox(g.x,g.y,g.z,s);c.push(this.moveTo(_.x,_.y,_.z,t)),c.push(this.dollyTo(w,t)),c.push(this.setFocalOffset(0,0,0,t))}else if(as(this._camera)){const w=this._camera,k=w.right-w.left,b=w.top-w.bottom,v=s?Math.max(k/g.x,b/g.y):Math.min(k/g.x,b/g.y);c.push(this.moveTo(_.x,_.y,_.z,t)),c.push(this.zoomTo(v,t)),c.push(this.setFocalOffset(0,0,0,t))}return Promise.all(c)}fitToSphere(e,t){const s=[],i=e instanceof he.Sphere?Vc.copy(e):pl.createBoundingSphere(e,Vc);if(s.push(this.moveTo(i.center.x,i.center.y,i.center.z,t)),Ms(this._camera)){const o=this.getDistanceToFitSphere(i.radius);s.push(this.dollyTo(o,t))}else if(as(this._camera)){const o=this._camera.right-this._camera.left,a=this._camera.top-this._camera.bottom,c=2*i.radius,l=Math.min(o/c,a/c);s.push(this.zoomTo(l,t))}return s.push(this.setFocalOffset(0,0,0,t)),Promise.all(s)}setLookAt(e,t,s,r,i,o,a=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=dr.NONE,this._changedDolly=0;const c=xe.set(r,i,o),l=_e.set(e,t,s);this._targetEnd.copy(c),this._sphericalEnd.setFromVector3(l.sub(c).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,a||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const u=!a||Te(this._target.x,this._targetEnd.x,this.restThreshold)&&Te(this._target.y,this._targetEnd.y,this.restThreshold)&&Te(this._target.z,this._targetEnd.z,this.restThreshold)&&Te(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Te(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Te(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(u)}lerpLookAt(e,t,s,r,i,o,a,c,l,u,h,d,f,m=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=dr.NONE,this._changedDolly=0;const p=_e.set(r,i,o),g=xe.set(e,t,s);qt.setFromVector3(g.sub(p).applyQuaternion(this._yAxisUpSpace));const _=pr.set(u,h,d),w=xe.set(a,c,l);yi.setFromVector3(w.sub(_).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(p.lerp(_,f));const k=yi.theta-qt.theta,b=yi.phi-qt.phi,v=yi.radius-qt.radius;this._sphericalEnd.set(qt.radius+v*f,qt.phi+b*f,qt.theta+k*f),this.normalizeRotations(),this._needsUpdate=!0,m||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const T=!m||Te(this._target.x,this._targetEnd.x,this.restThreshold)&&Te(this._target.y,this._targetEnd.y,this.restThreshold)&&Te(this._target.z,this._targetEnd.z,this.restThreshold)&&Te(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&Te(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&Te(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(T)}setPosition(e,t,s,r=!1){return this.setLookAt(e,t,s,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,r)}setTarget(e,t,s,r=!1){const i=this.getPosition(_e),o=this.setLookAt(i.x,i.y,i.z,e,t,s,r);return this._sphericalEnd.phi=sn(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),o}setFocalOffset(e,t,s,r=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,s),this._needsUpdate=!0,r||this._focalOffset.copy(this._focalOffsetEnd);const i=!r||Te(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&Te(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&Te(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(i)}setOrbitPoint(e,t,s){this._camera.updateMatrixWorld(),yn.setFromMatrixColumn(this._camera.matrixWorldInverse,0),vn.setFromMatrixColumn(this._camera.matrixWorldInverse,1),Is.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const r=_e.set(e,t,s),i=r.distanceTo(this._camera.position),o=r.sub(this._camera.position);yn.multiplyScalar(o.x),vn.multiplyScalar(o.y),Is.multiplyScalar(o.z),_e.copy(yn).add(vn).add(Is),_e.z=_e.z+i,this.dollyTo(i,!1),this.setFocalOffset(-_e.x,_e.y,-_e.z,!1),this.moveTo(e,t,s,!1)}setBoundary(e){if(!e){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,s,r){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new he.Vector4,typeof e=="number"?this._viewport.set(e,t,s,r):this._viewport.copy(e)}getDistanceToFitBox(e,t,s,r=!1){if(Lc(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const i=e/t,o=this._camera.getEffectiveFOV()*pi,a=this._camera.aspect;return((r?i>a:it.pointerId===e)}_findPointerByMouseButton(e){return this._activePointers.find(t=>t.mouseButton===e)}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,s){const r=t.lengthSq();if(r===0)return e;const i=xe.copy(t).add(e),a=this._boundary.clampPoint(i,pr).sub(i),c=a.lengthSq();if(c===0)return e.add(t);if(c===r)return e;if(s===0)return e.add(t).add(a);{const l=1+s*c/t.dot(a);return e.add(xe.copy(t).multiplyScalar(l)).add(a.multiplyScalar(1-s))}}_updateNearPlaneCorners(){if(Ms(this._camera)){const e=this._camera,t=e.near,s=e.getEffectiveFOV()*pi,r=Math.tan(s*.5)*t,i=r*e.aspect;this._nearPlaneCorners[0].set(-i,-r,0),this._nearPlaneCorners[1].set(i,-r,0),this._nearPlaneCorners[2].set(i,r,0),this._nearPlaneCorners[3].set(-i,r,0)}else if(as(this._camera)){const e=this._camera,t=1/e.zoom,s=e.left*t,r=e.right*t,i=e.top*t,o=e.bottom*t;this._nearPlaneCorners[0].set(s,i,0),this._nearPlaneCorners[1].set(r,i,0),this._nearPlaneCorners[2].set(r,o,0),this._nearPlaneCorners[3].set(s,o,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||Lc(this._camera,"_collisionTest"))return e;const s=this._getTargetDirection(_i);Uc.lookAt(Xh,s,this._camera.up);for(let r=0;r<4;r++){const i=xe.copy(this._nearPlaneCorners[r]);i.applyMatrix4(Uc);const o=pr.addVectors(this._target,i);Bo.set(o,s),Bo.far=this._spherical.radius+1;const a=Bo.intersectObjects(this.colliderMeshes);a.length!==0&&a[0].distance{const s=()=>{this.removeEventListener("rest",s),t()};this.addEventListener("rest",s)}))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e,t=new he.Sphere){const s=t,r=s.center;mr.makeEmpty(),e.traverseVisible(o=>{o.isMesh&&mr.expandByObject(o)}),mr.getCenter(r);let i=0;return e.traverseVisible(o=>{if(!o.isMesh)return;const a=o,c=a.geometry.clone();c.applyMatrix4(a.matrixWorld);const u=c.attributes.position;for(let h=0,d=u.count;h{y.useMemo(()=>{Bc.install({THREE:iy}),lu({CameraControlsImpl:Bc})},[]);const{camera:t,domElement:s,makeDefault:r,onStart:i,onEnd:o,onChange:a,regress:c,...l}=n,u=We(v=>v.camera),h=We(v=>v.gl),d=We(v=>v.invalidate),f=We(v=>v.events),m=We(v=>v.setEvents),p=We(v=>v.set),g=We(v=>v.get),_=We(v=>v.performance),w=t||u,k=s||f.connected||h.domElement,b=y.useMemo(()=>new Bc(w),[w]);return Nt((v,T)=>{b.enabled&&b.update(T)},-1),y.useEffect(()=>(b.connect(k),()=>void b.disconnect()),[k,b]),y.useEffect(()=>{const v=x=>{d(),c&&_.regress(),a&&a(x)},T=x=>{i&&i(x)},E=x=>{o&&o(x)};return b.addEventListener("update",v),b.addEventListener("controlstart",T),b.addEventListener("controlend",E),()=>{b.removeEventListener("update",v),b.removeEventListener("controlstart",T),b.removeEventListener("controlend",E)}},[b,i,o,d,m,c,a]),y.useEffect(()=>{if(r){const v=g().controls;return p({controls:b}),()=>p({controls:v})}},[r,b]),y.createElement("primitive",Ee({ref:e,object:b},l))});ke.func.isRequired,ke.arrayOf(ke.oneOfType([ke.element,ke.func])).isRequired;const ed=new _o,td=new _o,Wo=[],vi=new ap;class _1 extends ay{constructor(){super(),this.color=new hu("white"),this.instance={current:void 0},this.instanceKey={current:void 0}}get geometry(){var e;return(e=this.instance.current)==null?void 0:e.geometry}raycast(e,t){const s=this.instance.current;if(!s||!s.geometry||!s.material)return;vi.geometry=s.geometry;const r=s.matrixWorld,i=s.userData.instances.indexOf(this.instanceKey);if(!(i===-1||i>s.count)){s.getMatrixAt(i,ed),td.multiplyMatrices(r,ed),vi.matrixWorld=td,s.material instanceof cy?vi.material.side=s.material.side:vi.material.side=s.material[0].side,vi.raycast(e,Wo);for(let o=0,a=Wo.length;o{y.useMemo(()=>lu({PositionMesh:_1}),[]);const r=y.useRef(),{subscribe:i,getParent:o}=y.useContext(n||vp);return y.useLayoutEffect(()=>i(r),[]),y.createElement("positionMesh",Ee({instance:o(),instanceKey:r,ref:tc([s,r])},t),e)}),v1=y.forwardRef(({children:n,range:e,limit:t=1e3,frames:s=1/0,...r},i)=>{const[{context:o,instance:a}]=y.useState(()=>{const g=y.createContext(null);return{context:g,instance:y.forwardRef((_,w)=>y.createElement(bp,Ee({context:g},_,{ref:w})))}}),c=y.useRef(null),[l,u]=y.useState([]),[[h,d]]=y.useState(()=>{const g=new Float32Array(t*16);for(let _=0;_1))]});y.useEffect(()=>{c.current.instanceMatrix.needsUpdate=!0});let f=0,m=0;Nt(()=>{if(s===1/0||f({getParent:()=>c,subscribe:g=>(u(_=>[..._,g]),()=>u(_=>_.filter(w=>w.current!==g.current)))}),[]);return y.createElement("instancedMesh",Ee({userData:{instances:l},matrixAutoUpdate:!1,ref:tc([i,c]),args:[null,null,0],raycast:()=>null},r),y.createElement("instancedBufferAttribute",{attach:"instanceMatrix",count:h.length/16,array:h,itemSize:16,usage:Dh}),y.createElement("instancedBufferAttribute",{attach:"instanceColor",count:d.length/3,array:d,itemSize:3,usage:Dh}),typeof n=="function"?y.createElement(o.Provider,{value:p},n(a)):y.createElement(vp.Provider,{value:p},n))}),xp=y.createContext(null),b1=y.forwardRef((n,e)=>{y.useMemo(()=>lu({SegmentObject:x1}),[]);const{limit:t=1e3,lineWidth:s=1,children:r,...i}=n,[o,a]=y.useState([]),[c]=y.useState(()=>new tp),[l]=y.useState(()=>new k_),[u]=y.useState(()=>new T_),[h]=y.useState(()=>new we(512,512)),[d]=y.useState(()=>Array(t*6).fill(0)),[f]=y.useState(()=>Array(t*6).fill(0)),m=y.useMemo(()=>({subscribe:p=>(a(g=>[...g,p]),()=>a(g=>g.filter(_=>_.current!==p.current)))}),[]);return Nt(()=>{for(let g=0;gn instanceof ae?n:new ae(...typeof n=="number"?[n,n,n]:n),w1=y.forwardRef(({color:n,start:e,end:t},s)=>{const r=y.useContext(xp);if(!r)throw"Segment must used inside Segments component.";const i=y.useRef(null);return y.useLayoutEffect(()=>r.subscribe(i),[]),y.createElement("segmentObject",{ref:tc([i,s]),color:n,start:ad(e),end:ad(t)})});function k1({all:n,scene:e,camera:t}){const s=We(({gl:o})=>o),r=We(({camera:o})=>o),i=We(({scene:o})=>o);return y.useLayoutEffect(()=>{const o=[];n&&(e||i).traverse(l=>{l.visible===!1&&(o.push(l),l.visible=!0)}),s.compile(e||i,t||r);const a=new ly(128);new uy(.01,1e5,a).update(s,e||i),a.dispose(),o.forEach(l=>l.visible=!1)},[]),null}function T1({pixelated:n}){const e=We(o=>o.gl),t=We(o=>o.internal.active),s=We(o=>o.performance.current),r=We(o=>o.viewport.initialDpr),i=We(o=>o.setDpr);return y.useEffect(()=>{const o=e.domElement;return()=>{t&&i(r),n&&o&&(o.style.imageRendering="auto")}},[]),y.useEffect(()=>{i(s*r),n&&e.domElement&&(e.domElement.style.imageRendering=s===1?"auto":"pixelated")},[s]),null}function E1(){const n=We(s=>s.get),e=We(s=>s.setEvents),t=We(s=>s.performance.current);return y.useEffect(()=>{const s=n().events.enabled;return()=>e({enabled:s})},[]),y.useEffect(()=>e({enabled:t===1}),[t]),null}const C1=y.createContext(null);function S1({children:n,enabled:e=!0}){const[t,s]=y.useState([]),r=y.useMemo(()=>({selected:t,select:s,enabled:e}),[t,s,e]);return U.jsx(C1.Provider,{value:r,children:n})}function O1(n,e){typeof n=="function"?n(e):n!=null&&(n.current=e)}function wp(...n){return e=>n.forEach(t=>O1(t,e))}function Qr(...n){return y.useCallback(wp(...n),n)}const kp=y.forwardRef((n,e)=>{const{children:t,...s}=n,r=y.Children.toArray(t),i=r.find(A1);if(i){const o=i.props.children,a=r.map(c=>c===i?y.Children.count(o)>1?y.Children.only(null):y.isValidElement(o)?o.props.children:null:c);return y.createElement(ml,Ee({},s,{ref:e}),y.isValidElement(o)?y.cloneElement(o,void 0,a):null)}return y.createElement(ml,Ee({},s,{ref:e}),t)});kp.displayName="Slot";const ml=y.forwardRef((n,e)=>{const{children:t,...s}=n;return y.isValidElement(t)?y.cloneElement(t,{...P1(s,t.props),ref:e?wp(e,t.ref):t.ref}):y.Children.count(t)>1?y.Children.only(null):null});ml.displayName="SlotClone";const Tp=({children:n})=>y.createElement(y.Fragment,null,n);function A1(n){return y.isValidElement(n)&&n.type===Tp}function P1(n,e){const t={...e};for(const s in e){const r=n[s],i=e[s];/^on[A-Z]/.test(s)?r&&i?t[s]=(...a)=>{i(...a),r(...a)}:r&&(t[s]=r):s==="style"?t[s]={...r,...i}:s==="className"&&(t[s]=[r,i].filter(Boolean).join(" "))}return{...n,...t}}const R1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],rr=R1.reduce((n,e)=>{const t=y.forwardRef((s,r)=>{const{asChild:i,...o}=s,a=i?kp:e;return y.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),y.createElement(a,Ee({},o,{ref:r}))});return t.displayName=`Primitive.${e}`,{...n,[e]:t}},{});function D1(n,e){n&&au.flushSync(()=>n.dispatchEvent(e))}const M1=y.forwardRef((n,e)=>{var t;const{container:s=globalThis==null||(t=globalThis.document)===null||t===void 0?void 0:t.body,...r}=n;return s?Xf.createPortal(y.createElement(rr.div,Ee({},r,{ref:e})),s):null}),I1=M1;var cd=Object.prototype.hasOwnProperty;function ji(n,e){var t,s;if(n===e)return!0;if(n&&e&&(t=n.constructor)===e.constructor){if(t===Date)return n.getTime()===e.getTime();if(t===RegExp)return n.toString()===e.toString();if(t===Array){if((s=n.length)===e.length)for(;s--&&ji(n[s],e[s]););return s===-1}if(!t||typeof n=="object"){s=0;for(t in n)if(cd.call(n,t)&&++s&&!cd.call(e,t)||!(t in e)||!ji(n[t],e[t]))return!1;return Object.keys(e).length===s}}return n!==n&&e!==e}function vo(n,e){if(Object.is(n,e))return!0;if(typeof n!="object"||n===null||typeof e!="object"||e===null)return!1;const t=Object.keys(n);if(t.length!==Object.keys(e).length)return!1;for(let s=0;s0;)o[a]=arguments[a+4];n.call(this,o),n.captureStackTrace&&n.captureStackTrace(this,e),this.rule=t,this.value=s,this.cause=r,this.target=i}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e}(Error),Cn=function(e,t){e===void 0&&(e=[]),t===void 0&&(t=[]),this.chain=e,this.nextRuleModifiers=t};Cn.prototype._applyRule=function(e,t){var s=this;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return s.chain.push(new ac(t,e.apply(s,r),r,s.nextRuleModifiers)),s.nextRuleModifiers=[],s}};Cn.prototype._applyModifier=function(e,t){return this.nextRuleModifiers.push(new N1(t,e.simple,e.async)),this};Cn.prototype._clone=function(){return new Cn(this.chain.slice(),this.nextRuleModifiers.slice())};Cn.prototype.test=function(e){return this.chain.every(function(t){return t._test(e)})};Cn.prototype.testAll=function(e){var t=[];return this.chain.forEach(function(s){try{s._check(e)}catch(r){t.push(new vu(s,e,r))}}),t};Cn.prototype.check=function(e){this.chain.forEach(function(t){try{t._check(e)}catch(s){throw new vu(t,e,s)}})};Cn.prototype.testAsync=function(e){var t=this;return new Promise(function(s,r){Sp(e,t.chain.slice(),s,r)})};function Sp(n,e,t,s){if(e.length){var r=e.shift();r._testAsync(n).then(function(){Sp(n,e,t,s)},function(i){s(new vu(r,n,i))})}else t(n)}var ld=function(n,e){return e&&typeof n=="string"&&n.trim().length===0?!0:n==null};function $1(n,e){return e===void 0&&(e=!1),{simple:function(t){return ld(t,e)||n.check(t)===void 0},async:function(t){return ld(t,e)||n.testAsync(t)}}}function St(){return typeof Proxy<"u"?Op(new Cn):gl(new Cn)}var Vi={};St.extend=function(n){Object.assign(Vi,n)};St.clearCustomRules=function(){Vi={}};function Op(n){return new Proxy(n,{get:function(t,s){if(s in t)return t[s];var r=Op(n._clone());if(s in _a)return r._applyModifier(_a[s],s);if(s in Vi)return r._applyRule(Vi[s],s);if(s in _l)return r._applyRule(_l[s],s)}})}function gl(n){var e=function(r,i){return Object.keys(r).forEach(function(o){i[o]=function(){for(var a=[],c=arguments.length;c--;)a[c]=arguments[c];var l=gl(i._clone()),u=l._applyRule(r[o],o).apply(void 0,a);return u}}),i},t=e(_l,n),s=e(Vi,t);return Object.keys(_a).forEach(function(r){Object.defineProperty(s,r,{get:function(){var i=gl(s._clone());return i._applyModifier(_a[r],r)}})}),s}var _a={not:{simple:function(n){return function(e){return!n(e)}},async:function(n){return function(e){return Promise.resolve(n(e)).then(function(t){return!t}).catch(function(){return!0})}}},some:{simple:function(n){return function(e){return qo(e).some(function(t){try{return n(t)}catch{return!1}})}},async:function(n){return function(e){return Promise.all(qo(e).map(function(t){try{return n(t).catch(function(){return!1})}catch{return!1}})).then(function(t){return t.some(Boolean)})}}},every:{simple:function(n){return function(e){return e!==!1&&qo(e).every(n)}},async:function(n){return function(e){return Promise.all(qo(e).map(n)).then(function(t){return t.every(Boolean)})}}},strict:{simple:function(n,e){return function(t){return ud(e)&&t&&typeof t=="object"?Object.keys(e.args[0]).length===Object.keys(t).length&&n(t):n(t)}},async:function(n,e){return function(t){return Promise.resolve(n(t)).then(function(s){return ud(e)&&t&&typeof t=="object"?Object.keys(e.args[0]).length===Object.keys(t).length&&s:s}).catch(function(){return!1})}}}};function ud(n){return n&&n.name==="schema"&&n.args.length>0&&typeof n.args[0]=="object"}function qo(n){return typeof n=="string"?n.split(""):n}var _l={equal:function(n){return function(e){return e==n}},exact:function(n){return function(e){return e===n}},number:function(n){return n===void 0&&(n=!0),function(e){return typeof e=="number"&&(n||isFinite(e))}},integer:function(){return function(n){var e=Number.isInteger||F1;return e(n)}},numeric:function(){return function(n){return!isNaN(parseFloat(n))&&isFinite(n)}},string:function(){return gr("string")},boolean:function(){return gr("boolean")},undefined:function(){return gr("undefined")},null:function(){return gr("null")},array:function(){return gr("array")},object:function(){return gr("object")},instanceOf:function(n){return function(e){return e instanceof n}},pattern:function(n){return function(e){return n.test(e)}},lowercase:function(){return function(n){return typeof n=="boolean"||n===n.toLowerCase()&&n.trim()!==""}},uppercase:function(){return function(n){return n===n.toUpperCase()&&n.trim()!==""}},vowel:function(){return function(n){return/^[aeiou]+$/i.test(n)}},consonant:function(){return function(n){return/^(?=[^aeiou])([a-z]+)$/i.test(n)}},first:function(n){return function(e){return e[0]==n}},last:function(n){return function(e){return e[e.length-1]==n}},empty:function(){return function(n){return n.length===0}},length:function(n,e){return function(t){return t.length>=n&&t.length<=(e||n)}},minLength:function(n){return function(e){return e.length>=n}},maxLength:function(n){return function(e){return e.length<=n}},negative:function(){return function(n){return n<0}},positive:function(){return function(n){return n>=0}},between:function(n,e){return function(t){return t>=n&&t<=e}},range:function(n,e){return function(t){return t>=n&&t<=e}},lessThan:function(n){return function(e){return en}},greaterThanOrEqual:function(n){return function(e){return e>=n}},even:function(){return function(n){return n%2===0}},odd:function(){return function(n){return n%2!==0}},includes:function(n){return function(e){return~e.indexOf(n)}},schema:function(n){return L1(n)},passesAnyOf:function(){for(var n=[],e=arguments.length;e--;)n[e]=arguments[e];return function(t){return n.some(function(s){return s.test(t)})}},optional:$1};function gr(n){return function(e){return Array.isArray(e)&&n==="array"||e===null&&n==="null"||typeof e===n}}function F1(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n}function L1(n){return{simple:function(e){var t=[];if(Object.keys(n).forEach(function(s){var r=n[s];try{r.check((e||{})[s])}catch(i){i.target=s,t.push(i)}}),t.length>0)throw t;return!0},async:function(e){var t=[],s=Object.keys(n).map(function(r){var i=n[r];return i.testAsync((e||{})[r]).catch(function(o){o.target=r,t.push(o)})});return Promise.all(s).then(function(){if(t.length>0)throw t;return!0})}}}function jn(n,e,{checkForDefaultPrevented:t=!0}={}){return function(r){if(n==null||n(r),t===!1||!r.defaultPrevented)return e==null?void 0:e(r)}}function Ap(n,e=[]){let t=[];function s(i,o){const a=y.createContext(o),c=t.length;t=[...t,o];function l(h){const{scope:d,children:f,...m}=h,p=(d==null?void 0:d[n][c])||a,g=y.useMemo(()=>m,Object.values(m));return y.createElement(p.Provider,{value:g},f)}function u(h,d){const f=(d==null?void 0:d[n][c])||a,m=y.useContext(f);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const r=()=>{const i=t.map(o=>y.createContext(o));return function(a){const c=(a==null?void 0:a[n])||i;return y.useMemo(()=>({[`__scope${n}`]:{...a,[n]:c}}),[a,c])}};return r.scopeName=n,[s,j1(r,...e)]}function j1(...n){const e=n[0];if(n.length===1)return e;const t=()=>{const s=n.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const o=s.reduce((a,{useScope:c,scopeName:l})=>{const h=c(i)[`__scope${l}`];return{...a,...h}},{});return y.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return t.scopeName=e.scopeName,t}function Jr(n){const e=y.useRef(n);return y.useEffect(()=>{e.current=n}),y.useMemo(()=>(...t)=>{var s;return(s=e.current)===null||s===void 0?void 0:s.call(e,...t)},[])}function V1(n,e=globalThis==null?void 0:globalThis.document){const t=Jr(n);y.useEffect(()=>{const s=r=>{r.key==="Escape"&&t(r)};return e.addEventListener("keydown",s),()=>e.removeEventListener("keydown",s)},[t,e])}const yl="dismissableLayer.update",z1="dismissableLayer.pointerDownOutside",U1="dismissableLayer.focusOutside";let hd;const B1=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),W1=y.forwardRef((n,e)=>{var t;const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:c,...l}=n,u=y.useContext(B1),[h,d]=y.useState(null),f=(t=h==null?void 0:h.ownerDocument)!==null&&t!==void 0?t:globalThis==null?void 0:globalThis.document,[,m]=y.useState({}),p=Qr(e,x=>d(x)),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(_),k=h?g.indexOf(h):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,v=k>=w,T=q1(x=>{const C=x.target,S=[...u.branches].some(R=>R.contains(C));!v||S||(i==null||i(x),a==null||a(x),x.defaultPrevented||c==null||c())},f),E=H1(x=>{const C=x.target;[...u.branches].some(R=>R.contains(C))||(o==null||o(x),a==null||a(x),x.defaultPrevented||c==null||c())},f);return V1(x=>{k===u.layers.size-1&&(r==null||r(x),!x.defaultPrevented&&c&&(x.preventDefault(),c()))},f),y.useEffect(()=>{if(h)return s&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(hd=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(h)),u.layers.add(h),dd(),()=>{s&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=hd)}},[h,f,s,u]),y.useEffect(()=>()=>{h&&(u.layers.delete(h),u.layersWithOutsidePointerEventsDisabled.delete(h),dd())},[h,u]),y.useEffect(()=>{const x=()=>m({});return document.addEventListener(yl,x),()=>document.removeEventListener(yl,x)},[]),y.createElement(rr.div,Ee({},l,{ref:p,style:{pointerEvents:b?v?"auto":"none":void 0,...n.style},onFocusCapture:jn(n.onFocusCapture,E.onFocusCapture),onBlurCapture:jn(n.onBlurCapture,E.onBlurCapture),onPointerDownCapture:jn(n.onPointerDownCapture,T.onPointerDownCapture)}))});function q1(n,e=globalThis==null?void 0:globalThis.document){const t=Jr(n),s=y.useRef(!1),r=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!s.current){let l=function(){Pp(z1,t,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",r.current),r.current=l,e.addEventListener("click",r.current,{once:!0})):l()}else e.removeEventListener("click",r.current);s.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",r.current)}},[e,t]),{onPointerDownCapture:()=>s.current=!0}}function H1(n,e=globalThis==null?void 0:globalThis.document){const t=Jr(n),s=y.useRef(!1);return y.useEffect(()=>{const r=i=>{i.target&&!s.current&&Pp(U1,t,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,t]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function dd(){const n=new CustomEvent(yl);document.dispatchEvent(n)}function Pp(n,e,t,{discrete:s}){const r=t.originalEvent.target,i=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:t});e&&r.addEventListener(n,e,{once:!0}),s?D1(r,i):r.dispatchEvent(i)}const $r=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},Y1=d_["useId".toString()]||(()=>{});let G1=0;function X1(n){const[e,t]=y.useState(Y1());return $r(()=>{n||t(s=>s??String(G1++))},[n]),n||(e?`radix-${e}`:"")}const Z1=y.forwardRef((n,e)=>{const{children:t,width:s=10,height:r=5,...i}=n;return y.createElement(rr.svg,Ee({},i,{ref:e,width:s,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),n.asChild?t:y.createElement("polygon",{points:"0,0 30,0 15,10"}))}),K1=Z1;function Q1(n){const[e,t]=y.useState(void 0);return $r(()=>{if(n){t({width:n.offsetWidth,height:n.offsetHeight});const s=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let o,a;if("borderBoxSize"in i){const c=i.borderBoxSize,l=Array.isArray(c)?c[0]:c;o=l.inlineSize,a=l.blockSize}else o=n.offsetWidth,a=n.offsetHeight;t({width:o,height:a})});return s.observe(n,{box:"border-box"}),()=>s.unobserve(n)}else t(void 0)},[n]),e}const Rp="Popper",[Dp,Mp]=Ap(Rp),[J1,Ip]=Dp(Rp),ev=n=>{const{__scopePopper:e,children:t}=n,[s,r]=y.useState(null);return y.createElement(J1,{scope:e,anchor:s,onAnchorChange:r},t)},tv="PopperAnchor",nv=y.forwardRef((n,e)=>{const{__scopePopper:t,virtualRef:s,...r}=n,i=Ip(tv,t),o=y.useRef(null),a=Qr(e,o);return y.useEffect(()=>{i.onAnchorChange((s==null?void 0:s.current)||o.current)}),s?null:y.createElement(rr.div,Ee({},r,{ref:a}))}),Np="PopperContent",[sv,rv]=Dp(Np),iv=y.forwardRef((n,e)=>{var t,s,r,i,o,a,c,l;const{__scopePopper:u,side:h="bottom",sideOffset:d=0,align:f="center",alignOffset:m=0,arrowPadding:p=0,avoidCollisions:g=!0,collisionBoundary:_=[],collisionPadding:w=0,sticky:k="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:T,...E}=n,x=Ip(Np,u),[C,S]=y.useState(null),R=Qr(e,H=>S(H)),[O,L]=y.useState(null),j=Q1(O),W=(t=j==null?void 0:j.width)!==null&&t!==void 0?t:0,B=(s=j==null?void 0:j.height)!==null&&s!==void 0?s:0,V=h+(f!=="center"?"-"+f:""),z=typeof w=="number"?w:{top:0,right:0,bottom:0,left:0,...w},X=Array.isArray(_)?_:[_],K=X.length>0,J={padding:z,boundary:X.filter(lv),altBoundary:K},{refs:$,floatingStyles:F,placement:A,isPositioned:I,middlewareData:Y}=e1({strategy:"fixed",placement:V,whileElementsMounted:(...H)=>Ky(...H,{animationFrame:v==="always"}),elements:{reference:x.anchor},middleware:[Py({mainAxis:d+B,alignmentAxis:m}),g&&Ry({mainAxis:!0,crossAxis:!1,limiter:k==="partial"?Dy():void 0,...J}),g&&Sy({...J}),My({...J,apply:({elements:H,rects:D,availableWidth:P,availableHeight:Q})=>{const{width:se,height:le}=D.reference,ye=H.floating.style;ye.setProperty("--radix-popper-available-width",`${P}px`),ye.setProperty("--radix-popper-available-height",`${Q}px`),ye.setProperty("--radix-popper-anchor-width",`${se}px`),ye.setProperty("--radix-popper-anchor-height",`${le}px`)}}),O&&Jy({element:O,padding:p}),uv({arrowWidth:W,arrowHeight:B}),b&&Oy({strategy:"referenceHidden",...J})]}),[N,q]=$p(A),oe=Jr(T);$r(()=>{I&&(oe==null||oe())},[I,oe]);const re=(r=Y.arrow)===null||r===void 0?void 0:r.x,ie=(i=Y.arrow)===null||i===void 0?void 0:i.y,ne=((o=Y.arrow)===null||o===void 0?void 0:o.centerOffset)!==0,[ge,te]=y.useState();return $r(()=>{C&&te(window.getComputedStyle(C).zIndex)},[C]),y.createElement("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:I?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(a=Y.transformOrigin)===null||a===void 0?void 0:a.x,(c=Y.transformOrigin)===null||c===void 0?void 0:c.y].join(" ")},dir:n.dir},y.createElement(sv,{scope:u,placedSide:N,onArrowChange:L,arrowX:re,arrowY:ie,shouldHideArrow:ne},y.createElement(rr.div,Ee({"data-side":N,"data-align":q},E,{ref:R,style:{...E.style,animation:I?void 0:"none",opacity:(l=Y.hide)!==null&&l!==void 0&&l.referenceHidden?0:void 0}}))))}),ov="PopperArrow",av={top:"bottom",right:"left",bottom:"top",left:"right"},cv=y.forwardRef(function(e,t){const{__scopePopper:s,...r}=e,i=rv(ov,s),o=av[i.placedSide];return y.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},y.createElement(K1,Ee({},r,{ref:t,style:{...r.style,display:"block"}})))});function lv(n){return n!==null}const uv=n=>({name:"transformOrigin",options:n,fn(e){var t,s,r,i,o;const{placement:a,rects:c,middlewareData:l}=e,h=((t=l.arrow)===null||t===void 0?void 0:t.centerOffset)!==0,d=h?0:n.arrowWidth,f=h?0:n.arrowHeight,[m,p]=$p(a),g={start:"0%",center:"50%",end:"100%"}[p],_=((s=(r=l.arrow)===null||r===void 0?void 0:r.x)!==null&&s!==void 0?s:0)+d/2,w=((i=(o=l.arrow)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0)+f/2;let k="",b="";return m==="bottom"?(k=h?g:`${_}px`,b=`${-f}px`):m==="top"?(k=h?g:`${_}px`,b=`${c.floating.height+f}px`):m==="right"?(k=`${-f}px`,b=h?g:`${w}px`):m==="left"&&(k=`${c.floating.width+f}px`,b=h?g:`${w}px`),{data:{x:k,y:b}}}});function $p(n){const[e,t="center"]=n.split("-");return[e,t]}const hv=ev,dv=nv,fv=iv,pv=cv;function mv(n,e){return y.useReducer((t,s)=>{const r=e[t][s];return r??t},n)}const Fp=n=>{const{present:e,children:t}=n,s=gv(e),r=typeof t=="function"?t({present:s.isPresent}):y.Children.only(t),i=Qr(s.ref,r.ref);return typeof t=="function"||s.isPresent?y.cloneElement(r,{ref:i}):null};Fp.displayName="Presence";function gv(n){const[e,t]=y.useState(),s=y.useRef({}),r=y.useRef(n),i=y.useRef("none"),o=n?"mounted":"unmounted",[a,c]=mv(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=Ho(s.current);i.current=a==="mounted"?l:"none"},[a]),$r(()=>{const l=s.current,u=r.current;if(u!==n){const d=i.current,f=Ho(l);n?c("MOUNT"):f==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&d!==f?"ANIMATION_OUT":"UNMOUNT"),r.current=n}},[n,c]),$r(()=>{if(e){const l=h=>{const f=Ho(s.current).includes(h.animationName);h.target===e&&f&&au.flushSync(()=>c("ANIMATION_END"))},u=h=>{h.target===e&&(i.current=Ho(s.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(l=>{l&&(s.current=getComputedStyle(l)),t(l)},[])}}function Ho(n){return(n==null?void 0:n.animationName)||"none"}function _v({prop:n,defaultProp:e,onChange:t=()=>{}}){const[s,r]=yv({defaultProp:e,onChange:t}),i=n!==void 0,o=i?n:s,a=Jr(t),c=y.useCallback(l=>{if(i){const h=typeof l=="function"?l(n):l;h!==n&&a(h)}else r(l)},[i,n,r,a]);return[o,c]}function yv({defaultProp:n,onChange:e}){const t=y.useState(n),[s]=t,r=y.useRef(s),i=Jr(e);return y.useEffect(()=>{r.current!==s&&(i(s),r.current=s)},[s,r,i]),t}const vv=y.forwardRef((n,e)=>y.createElement(rr.span,Ee({},n,{ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...n.style}}))),bv=vv,[cc,qD]=Ap("Tooltip",[Mp]),lc=Mp(),xv="TooltipProvider",vl="tooltip.open",[HD,bu]=cc(xv),xu="Tooltip",[wv,uc]=cc(xu),kv=n=>{const{__scopeTooltip:e,children:t,open:s,defaultOpen:r=!1,onOpenChange:i,disableHoverableContent:o,delayDuration:a}=n,c=bu(xu,n.__scopeTooltip),l=lc(e),[u,h]=y.useState(null),d=X1(),f=y.useRef(0),m=o??c.disableHoverableContent,p=a??c.delayDuration,g=y.useRef(!1),[_=!1,w]=_v({prop:s,defaultProp:r,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(vl))):c.onClose(),i==null||i(E)}}),k=y.useMemo(()=>_?g.current?"delayed-open":"instant-open":"closed",[_]),b=y.useCallback(()=>{window.clearTimeout(f.current),g.current=!1,w(!0)},[w]),v=y.useCallback(()=>{window.clearTimeout(f.current),w(!1)},[w]),T=y.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,w(!0)},p)},[p,w]);return y.useEffect(()=>()=>window.clearTimeout(f.current),[]),y.createElement(hv,l,y.createElement(wv,{scope:e,contentId:d,open:_,stateAttribute:k,trigger:u,onTriggerChange:h,onTriggerEnter:y.useCallback(()=>{c.isOpenDelayed?T():b()},[c.isOpenDelayed,T,b]),onTriggerLeave:y.useCallback(()=>{m?v():window.clearTimeout(f.current)},[v,m]),onOpen:b,onClose:v,disableHoverableContent:m},t))},fd="TooltipTrigger",Tv=y.forwardRef((n,e)=>{const{__scopeTooltip:t,...s}=n,r=uc(fd,t),i=bu(fd,t),o=lc(t),a=y.useRef(null),c=Qr(e,a,r.onTriggerChange),l=y.useRef(!1),u=y.useRef(!1),h=y.useCallback(()=>l.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),y.createElement(dv,Ee({asChild:!0},o),y.createElement(rr.button,Ee({"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute},s,{ref:c,onPointerMove:jn(n.onPointerMove,d=>{d.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:jn(n.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:jn(n.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:jn(n.onFocus,()=>{l.current||r.onOpen()}),onBlur:jn(n.onBlur,r.onClose),onClick:jn(n.onClick,r.onClose)})))}),Ev="TooltipPortal",[YD,Cv]=cc(Ev,{forceMount:void 0}),zi="TooltipContent",Sv=y.forwardRef((n,e)=>{const t=Cv(zi,n.__scopeTooltip),{forceMount:s=t.forceMount,side:r="top",...i}=n,o=uc(zi,n.__scopeTooltip);return y.createElement(Fp,{present:s||o.open},o.disableHoverableContent?y.createElement(Lp,Ee({side:r},i,{ref:e})):y.createElement(Ov,Ee({side:r},i,{ref:e})))}),Ov=y.forwardRef((n,e)=>{const t=uc(zi,n.__scopeTooltip),s=bu(zi,n.__scopeTooltip),r=y.useRef(null),i=Qr(e,r),[o,a]=y.useState(null),{trigger:c,onClose:l}=t,u=r.current,{onPointerInTransitChange:h}=s,d=y.useCallback(()=>{a(null),h(!1)},[h]),f=y.useCallback((m,p)=>{const g=m.currentTarget,_={x:m.clientX,y:m.clientY},w=Mv(_,g.getBoundingClientRect()),k=Iv(_,w),b=Nv(p.getBoundingClientRect()),v=Fv([...k,...b]);a(v),h(!0)},[h]);return y.useEffect(()=>()=>d(),[d]),y.useEffect(()=>{if(c&&u){const m=g=>f(g,u),p=g=>f(g,c);return c.addEventListener("pointerleave",m),u.addEventListener("pointerleave",p),()=>{c.removeEventListener("pointerleave",m),u.removeEventListener("pointerleave",p)}}},[c,u,f,d]),y.useEffect(()=>{if(o){const m=p=>{const g=p.target,_={x:p.clientX,y:p.clientY},w=(c==null?void 0:c.contains(g))||(u==null?void 0:u.contains(g)),k=!$v(_,o);w?d():k&&(d(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[c,u,o,l,d]),y.createElement(Lp,Ee({},n,{ref:i}))}),[Av,Pv]=cc(xu,{isInside:!1}),Lp=y.forwardRef((n,e)=>{const{__scopeTooltip:t,children:s,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=n,c=uc(zi,t),l=lc(t),{onClose:u}=c;return y.useEffect(()=>(document.addEventListener(vl,u),()=>document.removeEventListener(vl,u)),[u]),y.useEffect(()=>{if(c.trigger){const h=d=>{const f=d.target;f!=null&&f.contains(c.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,u]),y.createElement(W1,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:u},y.createElement(fv,Ee({"data-state":c.stateAttribute},l,a,{ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),y.createElement(Tp,null,s),y.createElement(Av,{scope:t,isInside:!0},y.createElement(bv,{id:c.contentId,role:"tooltip"},r||s))))}),Rv="TooltipArrow",Dv=y.forwardRef((n,e)=>{const{__scopeTooltip:t,...s}=n,r=lc(t);return Pv(Rv,t).isInside?null:y.createElement(pv,Ee({},r,s,{ref:e}))});function Mv(n,e){const t=Math.abs(e.top-n.y),s=Math.abs(e.bottom-n.y),r=Math.abs(e.right-n.x),i=Math.abs(e.left-n.x);switch(Math.min(t,s,r,i)){case i:return"left";case r:return"right";case t:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function Iv(n,e,t=5){const s=[];switch(e){case"top":s.push({x:n.x-t,y:n.y+t},{x:n.x+t,y:n.y+t});break;case"bottom":s.push({x:n.x-t,y:n.y-t},{x:n.x+t,y:n.y-t});break;case"left":s.push({x:n.x+t,y:n.y-t},{x:n.x+t,y:n.y+t});break;case"right":s.push({x:n.x-t,y:n.y-t},{x:n.x-t,y:n.y+t});break}return s}function Nv(n){const{top:e,right:t,bottom:s,left:r}=n;return[{x:r,y:e},{x:t,y:e},{x:t,y:s},{x:r,y:s}]}function $v(n,e){const{x:t,y:s}=n;let r=!1;for(let i=0,o=e.length-1;is!=u>s&&t<(l-a)*(s-c)/(u-c)+a&&(r=!r)}return r}function Fv(n){const e=n.slice();return e.sort((t,s)=>t.xs.x?1:t.ys.y?1:0),Lv(e)}function Lv(n){if(n.length<=1)return n.slice();const e=[];for(let s=0;s=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(r.y-o.y)>=(i.y-o.y)*(r.x-o.x))e.pop();else break}e.push(r)}e.pop();const t=[];for(let s=n.length-1;s>=0;s--){const r=n[s];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(r.y-o.y)>=(i.y-o.y)*(r.x-o.x))t.pop();else break}t.push(r)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}const jv=kv,Vv=Tv,zv=Sv,Uv=Dv;function Bv(n,e){if(n==null)return{};var t={},s=Object.keys(n),r,i;for(i=0;i=0)&&(t[r]=n[r]);return t}function Pe(n,e){if(n==null)return{};var t=Bv(n,e),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(n,s)&&(t[s]=n[s])}return t}let Be;(function(n){n[n.UNSUPPORTED_INPUT=0]="UNSUPPORTED_INPUT",n[n.NO_COMPONENT_FOR_TYPE=1]="NO_COMPONENT_FOR_TYPE",n[n.UNKNOWN_INPUT=2]="UNKNOWN_INPUT",n[n.DUPLICATE_KEYS=3]="DUPLICATE_KEYS",n[n.ALREADY_REGISTERED_TYPE=4]="ALREADY_REGISTERED_TYPE",n[n.CLIPBOARD_ERROR=5]="CLIPBOARD_ERROR",n[n.THEME_ERROR=6]="THEME_ERROR",n[n.PATH_DOESNT_EXIST=7]="PATH_DOESNT_EXIST",n[n.INPUT_TYPE_OVERRIDE=8]="INPUT_TYPE_OVERRIDE",n[n.EMPTY_KEY=9]="EMPTY_KEY"})(Be||(Be={}));const Wv={[Be.UNSUPPORTED_INPUT]:(n,e)=>[`An input with type \`${n}\` input was found at path \`${e}\` but it's not supported yet.`],[Be.NO_COMPONENT_FOR_TYPE]:(n,e)=>[`Type \`${n}\` found at path \`${e}\` can't be displayed in panel because no component supports it yet.`],[Be.UNKNOWN_INPUT]:(n,e)=>[`input at path \`${n}\` is not recognized.`,e],[Be.DUPLICATE_KEYS]:(n,e,t)=>[`Key \`${n}\` of path \`${e}\` already exists at path \`${t}\`. Even nested keys need to be unique. Rename one of the keys.`],[Be.ALREADY_REGISTERED_TYPE]:n=>[`Type ${n} has already been registered. You can't register a component with the same type.`],[Be.CLIPBOARD_ERROR]:n=>["Error copying the value",n],[Be.THEME_ERROR]:(n,e)=>[`Error accessing the theme \`${n}.${e}\` value.`],[Be.PATH_DOESNT_EXIST]:n=>[`Error getting the value at path \`${n}\`. There is probably an error in your \`render\` function.`],[Be.PATH_DOESNT_EXIST]:n=>[`Error accessing the value at path \`${n}\``],[Be.INPUT_TYPE_OVERRIDE]:(n,e,t)=>[`Input at path \`${n}\` already exists with type: \`${e}\`. Its type cannot be overridden with type \`${t}\`.`],[Be.EMPTY_KEY]:()=>["Keys can not be empty, if you want to hide a label use whitespace."]};function jp(n,e,...t){const[s,...r]=Wv[e](...t);console[n]("LEVA: "+s,...r)}const zn=jp.bind(null,"warn"),qv=jp.bind(null,"log"),Hv=["value"],Yv=["schema"],Gv=["value"],Vp=[],Zs={};function pd(n){let{value:e}=n,t=Pe(n,Hv);for(let s of Vp){const r=s(e,t);if(r)return r}}function ts(n,e){let{schema:t}=e,s=Pe(e,Yv);if(n in Zs){zn(Be.ALREADY_REGISTERED_TYPE,n);return}Vp.push((r,i)=>t(r,i)&&n),Zs[n]=s}function Wc(n,e,t,s){const{normalize:r}=Zs[n];if(r)return r(e,t,s);if(typeof e!="object"||!("value"in e))return{value:e};const{value:i}=e,o=Pe(e,Gv);return{value:i,settings:o}}function Xv(n,e,t,s,r,i){const{sanitize:o}=Zs[n];return o?o(e,t,s,r,i):e}function md(n,e,t){const{format:s}=Zs[n];return s?s(e,t):e}function Zv(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function gd(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);e&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,s)}return t}function de(n){for(var e=1;en>t?t:n{if(n===""||typeof n=="number")return n;try{const e=cs(n);if(!isNaN(e))return e}catch{}return parseFloat(n)},Qv=Math.log(10);function _d(n){let e=Math.abs(+String(n).replace(".",""));if(e===0)return .01;for(;e!==0&&e%10===0;)e/=10;const t=Math.floor(Math.log(e)/Qv)+1,s=Math.floor(Math.log10(Math.abs(n))),r=Math.pow(10,s-t);return Math.max(r,.001)}const ya=(n,e,t)=>t===e?0:(bs(n,e,t)-e)/(t-e),va=(n,e,t)=>n*(t-e)+e,Jv=()=>"_"+Math.random().toString(36).substr(2,9),yd=/\(([0-9+\-*/^ .]+)\)/,vd=/(\d+(?:\.\d+)?) ?\^ ?(\d+(?:\.\d+)?)/,bd=/(\d+(?:\.\d+)?) ?\* ?(\d+(?:\.\d+)?)/,xd=/(\d+(?:\.\d+)?) ?\/ ?(\d+(?:\.\d+)?)/,wd=/(\d+(?:\.\d+)?) ?\+ ?(\d+(?:\.\d+)?)/,kd=/(\d+(?:\.\d+)?) ?- ?(\d+(?:\.\d+)?)/;function cs(n){if(isNaN(Number(n)))if(yd.test(n)){const e=n.replace(yd,(t,s)=>String(cs(s)));return cs(e)}else if(vd.test(n)){const e=n.replace(vd,(t,s,r)=>String(Math.pow(Number(s),Number(r))));return cs(e)}else if(bd.test(n)){const e=n.replace(bd,(t,s,r)=>String(Number(s)*Number(r)));return cs(e)}else if(xd.test(n)){const e=n.replace(xd,(t,s,r)=>{if(r!=0)return String(Number(s)/Number(r));throw new Error("Division by zero")});return cs(e)}else if(wd.test(n)){const e=n.replace(wd,(t,s,r)=>String(Number(s)+Number(r)));return cs(e)}else if(kd.test(n)){const e=n.replace(kd,(t,s,r)=>String(Number(s)-Number(r)));return cs(e)}else return Number(n);return Number(n)}function eb(n,e){return e.reduce((t,s)=>(n&&n.hasOwnProperty(s)&&(t[s]=n[s]),t),{})}function tb(n,e){const t=de({},n);return e.forEach(s=>s in n&&delete t[s]),t}function nb(n,e){return n.reduce((t,s,r)=>Object.assign(t,{[e[r]]:s}),{})}function zp(n){return Object.prototype.toString.call(n)==="[object Object]"}const sb=n=>zp(n)&&Object.keys(n).length===0;let cn;(function(n){n.BUTTON="BUTTON",n.BUTTON_GROUP="BUTTON_GROUP",n.MONITOR="MONITOR",n.FOLDER="FOLDER"})(cn||(cn={}));let un;(function(n){n.SELECT="SELECT",n.IMAGE="IMAGE",n.NUMBER="NUMBER",n.COLOR="COLOR",n.STRING="STRING",n.BOOLEAN="BOOLEAN",n.INTERVAL="INTERVAL",n.VECTOR3D="VECTOR3D",n.VECTOR2D="VECTOR2D"})(un||(un={}));const rb=["type","__customInput"],ib=["render","label","optional","order","disabled","hint","onChange","onEditStart","onEditEnd","transient"],ob=["type"];function Up(n,e,t={},s){var r,i;if(typeof n!="object"||Array.isArray(n))return{type:s,input:n,options:de({key:e,label:e,optional:!1,disabled:!1,order:0},t)};if("__customInput"in n){const{type:v,__customInput:T}=n,E=Pe(n,rb);return Up(T,e,E,v)}const{render:o,label:a,optional:c,order:l=0,disabled:u,hint:h,onChange:d,onEditStart:f,onEditEnd:m,transient:p}=n,g=Pe(n,ib),_=de({render:o,key:e,label:a??e,hint:h,transient:p??!!d,onEditStart:f,onEditEnd:m,disabled:u,optional:c,order:l},t);let{type:w}=g,k=Pe(g,ob);if(w=s??w,w in cn)return{type:w,input:k,options:_};let b;return s&&zp(k)&&"value"in k?b=k.value:b=sb(k)?void 0:k,{type:w,input:b,options:de(de({},_),{},{onChange:d,optional:(r=_.optional)!==null&&r!==void 0?r:!1,disabled:(i=_.disabled)!==null&&i!==void 0?i:!1})}}function ab(n,e,t,s){const r=Up(n,e),{type:i,input:o,options:a}=r;if(i)return i in cn?r:{type:i,input:Wc(i,o,t,s),options:a};let c=pd(o);return c?{type:c,input:Wc(c,o,t,s),options:a}:(c=pd({value:o}),c?{type:c,input:Wc(c,{value:o},t,s),options:a}:!1)}function Td(n,e,t,s,r){const{value:i,type:o,settings:a}=n;n.value=Bp({type:o,value:i,settings:a},e,t,s),n.fromPanel=r}const cb=function(e,t,s){this.type="LEVA_ERROR",this.message="LEVA: "+e,this.previousValue=t,this.error=s};function Bp({type:n,value:e,settings:t},s,r,i){const o=n!=="SELECT"&&typeof s=="function"?s(e):s;let a;try{a=Xv(n,o,t,e,r,i)}catch(c){throw new cb(`The value \`${s}\` did not result in a correct value.`,e,c)}return ji(a,e)?e:a}const Wp=(n,e,t=!1)=>{let s=0;return function(){const r=arguments,i=t&&!s,o=()=>n.apply(this,r);window.clearTimeout(s),s=window.setTimeout(o,e),i&&o()}},qp=n=>n.shiftKey?5:n.altKey?1/5:1;function lb(n,e){const t=console.error;console.error=()=>{},Xf.render(n,e),console.error=t}const ub=["value"],hb=["min","max"],db=n=>{if(typeof n=="number")return!0;if(typeof n=="string"){const e=parseFloat(n);return isNaN(e)?!1:n.substring((""+e).length).trim().length<4}return!1},Hp=(n,{min:e=-1/0,max:t=1/0,suffix:s})=>{const r=parseFloat(n);if(n===""||isNaN(r))throw Error("Invalid number");const i=bs(r,e,t);return s?i+s:i},fb=(n,{pad:e=0,suffix:t})=>{const s=parseFloat(n).toFixed(e);return t?s+t:s},Yp=n=>{let{value:e}=n,t=Pe(n,ub);const{min:s=-1/0,max:r=1/0}=t,i=Pe(t,hb);let o=parseFloat(e);const a=typeof e=="string"?e.substring((""+o).length):void 0;o=bs(o,s,r);let c=t.step;c||(Number.isFinite(s)?Number.isFinite(r)?c=+(Math.abs(r-s)/100).toPrecision(1):c=+(Math.abs(o-s)/100).toPrecision(1):Number.isFinite(r)&&(c=+(Math.abs(r-o)/100).toPrecision(1)));const l=c?_d(c)*10:_d(o);c=c||l/10;const u=Math.round(bs(Math.log10(1/l),0,2));return{value:a?o+a:o,settings:de({initialValue:o,step:c,pad:u,min:s,max:r,suffix:a},i)}},Gp=(n,{step:e,initialValue:t})=>{const s=Math.round((n-t)/e);return t+s*e};var Xp=Object.freeze({__proto__:null,schema:db,sanitize:Hp,format:fb,normalize:Yp,sanitizeStep:Gp});function Ze(){return Ze=Object.assign?Object.assign.bind():function(n){for(var e=1;e({colors:{elevation1:"#292d39",elevation2:"#181c20",elevation3:"#373c4b",accent1:"#0066dc",accent2:"#007bff",accent3:"#3c93ff",highlight1:"#535760",highlight2:"#8c92a4",highlight3:"#fefefe",vivid1:"#ffcc00",folderWidgetColor:"$highlight2",folderTextColor:"$highlight3",toolTipBackground:"$highlight3",toolTipText:"$elevation2"},radii:{xs:"2px",sm:"3px",lg:"10px"},space:{xs:"3px",sm:"6px",md:"10px",rowGap:"7px",colGap:"7px"},fonts:{mono:"ui-monospace, SFMono-Regular, Menlo, 'Roboto Mono', monospace",sans:"system-ui, sans-serif"},fontSizes:{root:"11px",toolTip:"$root"},sizes:{rootWidth:"280px",controlWidth:"160px",numberInputMinWidth:"38px",scrubberWidth:"8px",scrubberHeight:"16px",rowHeight:"24px",folderTitleHeight:"20px",checkboxSize:"16px",joystickWidth:"100px",joystickHeight:"100px",colorPickerWidth:"$controlWidth",colorPickerHeight:"100px",imagePreviewWidth:"$controlWidth",imagePreviewHeight:"100px",monitorHeight:"60px",titleBarHeight:"39px"},shadows:{level1:"0 0 9px 0 #00000088",level2:"0 4px 14px #00000033"},borderWidths:{root:"0px",input:"1px",focus:"1px",hover:"1px",active:"1px",folder:"1px"},fontWeights:{label:"normal",folder:"normal",button:"normal"}});function Yo(n,e){const[t,s]=n.split(" "),r={};return t!=="none"&&(r.boxShadow=`${e.inset?"inset ":""}0 0 0 $borderWidths${[e.key]} $colors${t!=="default"&&t||e.borderColor}`),s&&(r.backgroundColor=s),r}const bi={$inputStyle:()=>n=>Yo(n,{key:"$input",borderColor:"$highlight1",inset:!0}),$focusStyle:()=>n=>Yo(n,{key:"$focus",borderColor:"$accent2"}),$hoverStyle:()=>n=>Yo(n,{key:"$hover",borderColor:"$accent1",inset:!0}),$activeStyle:()=>n=>Yo(n,{key:"$active",borderColor:"$accent1",inset:!0})},{styled:ce,css:GD,createTheme:mb,globalCss:gb,keyframes:XD}=E_({prefix:"leva",theme:Jp(),utils:de(de({},bi),{},{$flex:()=>({display:"flex",alignItems:"center"}),$flexCenter:()=>({display:"flex",alignItems:"center",justifyContent:"center"}),$reset:()=>({outline:"none",fontSize:"inherit",fontWeight:"inherit",color:"inherit",fontFamily:"inherit",border:"none",backgroundColor:"transparent",appearance:"none"}),$draggable:()=>({touchAction:"none",WebkitUserDrag:"none",userSelect:"none"}),$focus:n=>({"&:focus":bi.$focusStyle()(n)}),$focusWithin:n=>({"&:focus-within":bi.$focusStyle()(n)}),$hover:n=>({"&:hover":bi.$hoverStyle()(n)}),$active:n=>({"&:active":bi.$activeStyle()(n)})})}),_b=gb({".leva__panel__dragged":{WebkitUserDrag:"none",userSelect:"none",input:{userSelect:"none"},"*":{cursor:"ew-resize !important"}}});function yb(n){const e=Jp();if(!n)return{theme:e,className:""};Object.keys(n).forEach(s=>{Object.assign(e[s],n[s])});const t=mb(e);return{theme:e,className:t.className}}function Un(n,e){const{theme:t}=y.useContext(wu);if(!(n in t)||!(e in t[n]))return zn(Be.THEME_ERROR,n,e),"";let s=e;for(;;){let r=t[n][s];if(typeof r=="string"&&r.charAt(0)==="$")s=r.substr(1);else return r}}const e0=ce("input",{$reset:"",padding:"0 $sm",width:0,minWidth:0,flex:1,height:"100%",variants:{levaType:{number:{textAlign:"right"}},as:{textarea:{padding:"$sm"}}}}),t0=ce("div",{$draggable:"",height:"100%",$flexCenter:"",position:"relative",padding:"0 $xs",fontSize:"0.8em",opacity:.8,cursor:"default",touchAction:"none",[`& + ${e0}`]:{paddingLeft:0}}),vb=ce(t0,{cursor:"ew-resize",marginRight:"-$xs",textTransform:"uppercase",opacity:.3,"&:hover":{opacity:1},variants:{dragging:{true:{backgroundColor:"$accent2",opacity:1}}}}),bb=ce("div",{$flex:"",position:"relative",borderRadius:"$sm",overflow:"hidden",color:"inherit",height:"$rowHeight",backgroundColor:"$elevation3",$inputStyle:"$elevation1",$hover:"",$focusWithin:"",variants:{textArea:{true:{height:"auto"}}}}),xb=["innerLabel","value","onUpdate","onChange","onKeyDown","type","id","inputType","rows"],wb=["onUpdate"];function ku(n){let{innerLabel:e,value:t,onUpdate:s,onChange:r,onKeyDown:i,type:o,id:a,inputType:c="text",rows:l=0}=n,u=Pe(n,xb);const{id:h,emitOnEditStart:d,emitOnEditEnd:f,disabled:m}=_t(),p=a||h,g=y.useRef(null),_=l>0,w=_?"textarea":"input",k=y.useCallback(T=>E=>{const x=E.currentTarget.value;T(x)},[]);M.useEffect(()=>{const T=g.current,E=k(x=>{s(x),f()});return T==null||T.addEventListener("blur",E),()=>T==null?void 0:T.removeEventListener("blur",E)},[k,s,f]);const b=y.useCallback(T=>{T.key==="Enter"&&k(s)(T)},[k,s]),v=Object.assign({as:w},_?{rows:l}:{},u);return M.createElement(bb,{textArea:_},e&&typeof e=="string"?M.createElement(t0,null,e):e,M.createElement(e0,Ze({levaType:o,ref:g,id:p,type:c,autoComplete:"off",spellCheck:"false",value:t,onChange:k(r),onFocus:()=>d(),onKeyPress:b,onKeyDown:i,disabled:m},v)))}function kb(n){let{onUpdate:e}=n,t=Pe(n,wb);const s=y.useCallback(i=>e(Kv(i)),[e]),r=y.useCallback(i=>{const o=i.key==="ArrowUp"?1:i.key==="ArrowDown"?-1:0;if(o){i.preventDefault();const a=i.altKey?.1:i.shiftKey?10:1;e(c=>parseFloat(c)+o*a)}},[e]);return M.createElement(ku,Ze({},t,{onUpdate:s,onKeyDown:r,type:"number"}))}const ba=ce("div",{}),bl=ce("div",{position:"relative",background:"$elevation2",transition:"height 300ms ease",variants:{fill:{true:{},false:{}},flat:{false:{},true:{}},isRoot:{true:{},false:{paddingLeft:"$md","&::after":{content:'""',position:"absolute",left:0,top:0,width:"$borderWidths$folder",height:"100%",backgroundColor:"$folderWidgetColor",opacity:.4,transform:"translateX(-50%)"}}}},compoundVariants:[{isRoot:!0,fill:!1,css:{overflowY:"auto",maxHeight:"calc(100vh - 20px - $$titleBarHeight)"}},{isRoot:!0,flat:!1,css:{borderRadius:"$lg"}}]}),Tb=ce("div",{$flex:"",color:"$folderTextColor",userSelect:"none",cursor:"pointer",height:"$folderTitleHeight",fontWeight:"$folder","> svg":{marginLeft:-4,marginRight:4,cursor:"pointer",fill:"$folderWidgetColor",opacity:.6},"&:hover > svg":{fill:"$folderWidgetColor"},[`&:hover + ${bl}::after`]:{opacity:.6},[`${ba}:hover > & + ${bl}::after`]:{opacity:.6},[`${ba}:hover > & > svg`]:{opacity:1}}),n0=ce("div",{position:"relative",display:"grid",gridTemplateColumns:"100%",rowGap:"$rowGap",transition:"opacity 250ms ease",variants:{toggled:{true:{opacity:1,transitionDelay:"250ms"},false:{opacity:0,transitionDelay:"0ms",pointerEvents:"none"}},isRoot:{true:{"& > div":{paddingLeft:"$md",paddingRight:"$md"},"& > div:first-of-type":{paddingTop:"$sm"},"& > div:last-of-type":{paddingBottom:"$sm"},[`> ${ba}:not(:first-of-type)`]:{paddingTop:"$sm",marginTop:"$md",borderTop:"$borderWidths$folder solid $colors$elevation1"}}}}}),s0=ce("div",{position:"relative",zIndex:100,display:"grid",rowGap:"$rowGap",gridTemplateRows:"minmax($sizes$rowHeight, max-content)",alignItems:"center",color:"$highlight2",[`${n0} > &`]:{"&:first-of-type":{marginTop:"$rowGap"},"&:last-of-type":{marginBottom:"$rowGap"}},variants:{disabled:{true:{pointerEvents:"none"},false:{"&:hover,&:focus-within":{color:"$highlight3"}}}}}),r0=ce(s0,{gridTemplateColumns:"auto $sizes$controlWidth",columnGap:"$colGap"}),Eb=ce("div",{$flex:"",height:"100%",position:"relative",overflow:"hidden","& > div":{marginLeft:"$colGap",padding:"0 $xs",opacity:.4},"& > div:hover":{opacity:.8},"& > div > svg":{display:"none",cursor:"pointer",width:13,minWidth:13,height:13,backgroundColor:"$elevation2"},"&:hover > div > svg":{display:"block"},variants:{align:{top:{height:"100%",alignItems:"flex-start",paddingTop:"$sm"}}}}),Cb=ce("input",{$reset:"",height:0,width:0,opacity:0,margin:0,"& + label":{position:"relative",$flexCenter:"",height:"100%",userSelect:"none",cursor:"pointer",paddingLeft:2,paddingRight:"$sm",pointerEvents:"auto"},"& + label:after":{content:'""',width:6,height:6,backgroundColor:"$elevation3",borderRadius:"50%",$activeStyle:""},"&:focus + label:after":{$focusStyle:""},"& + label:active:after":{backgroundColor:"$accent1",$focusStyle:""},"&:checked + label:after":{backgroundColor:"$accent1"}}),xl=ce("label",{fontWeight:"$label",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > svg":{display:"block"}}),Sb=ce("div",{opacity:1,variants:{disabled:{true:{opacity:.6,pointerEvents:"none",[`& ${xl}`]:{pointerEvents:"auto"}}}}}),i0=ce("div",{position:"fixed",top:0,bottom:0,right:0,left:0,zIndex:1e3,userSelect:"none"}),Ob=ce("div",{background:"$toolTipBackground",fontFamily:"$sans",fontSize:"$toolTip",padding:"$xs $sm",color:"$toolTipText",borderRadius:"$xs",boxShadow:"$level2",maxWidth:260}),Ab=ce(Uv,{fill:"$toolTipBackground"});function Tu({children:n}){const{className:e}=y.useContext(wu);return M.createElement(I1,{className:e},n)}const Pb=["align"];function Rb(){const{id:n,disable:e,disabled:t}=_t();return M.createElement(M.Fragment,null,M.createElement(Cb,{id:n+"__disable",type:"checkbox",checked:!t,onChange:()=>e(!t)}),M.createElement("label",{htmlFor:n+"__disable"}))}function Db(n){const{id:e,optional:t,hint:s}=_t(),r=n.htmlFor||(e?{htmlFor:e}:null),i=!s&&typeof n.children=="string"?{title:n.children}:null;return M.createElement(M.Fragment,null,t&&M.createElement(Rb,null),s!==void 0?M.createElement(jv,null,M.createElement(Vv,{asChild:!0},M.createElement(xl,Ze({},r,n))),M.createElement(zv,{side:"top",sideOffset:2},M.createElement(Ob,null,s,M.createElement(Ab,null)))):M.createElement(xl,Ze({},r,i,n)))}function fn(n){let{align:e}=n,t=Pe(n,Pb);const{value:s,label:r,key:i,disabled:o}=_t(),{hideCopyButton:a}=pb(),c=!a&&i!==void 0,[l,u]=y.useState(!1),h=async()=>{try{await navigator.clipboard.writeText(JSON.stringify({[i]:s??""})),u(!0)}catch{zn(Be.CLIPBOARD_ERROR,{[i]:s})}};return M.createElement(Eb,{align:e,onPointerLeave:()=>u(!1)},M.createElement(Db,t),c&&!o&&M.createElement("div",{title:`Click to copy ${typeof r=="string"?r:i} value`},l?M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},M.createElement("path",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),M.createElement("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm9.707 5.707a1 1 0 00-1.414-1.414L9 12.586l-1.293-1.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})):M.createElement("svg",{onClick:h,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},M.createElement("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),M.createElement("path",{d:"M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z"}))))}const Mb=["toggled"],Ib=ce("svg",{fill:"currentColor",transition:"transform 350ms ease, fill 250ms ease"});function Eu(n){let{toggled:e}=n,t=Pe(n,Mb);return M.createElement(Ib,Ze({width:"9",height:"5",viewBox:"0 0 9 5",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${e?0:-90}deg)`}},t),M.createElement("path",{d:"M3.8 4.4c.4.3 1 .3 1.4 0L8 1.7A1 1 0 007.4 0H1.6a1 1 0 00-.7 1.7l3 2.7z"}))}const Nb=["input"];function tn(n){let{input:e}=n,t=Pe(n,Nb);return e?M.createElement(r0,t):M.createElement(s0,t)}function o0({value:n,type:e,settings:t,setValue:s}){const[r,i]=y.useState(md(e,n,t)),o=y.useRef(n),a=y.useRef(t);a.current=t;const c=y.useCallback(u=>i(md(e,u,a.current)),[e]),l=y.useCallback(u=>{try{s(u)}catch(h){const{type:d,previousValue:f}=h;if(d!=="LEVA_ERROR")throw h;c(f)}},[c,s]);return y.useEffect(()=>{ji(n,o.current)||c(n),o.current=n},[n,c]),{displayValue:r,onChange:i,onUpdate:l}}function xo(n,e){const{emitOnEditStart:t,emitOnEditEnd:s}=_t();return C_(r=>{r.first&&(document.body.classList.add("leva__panel__dragged"),t==null||t());const i=n(r);return r.last&&(document.body.classList.remove("leva__panel__dragged"),s==null||s()),i},e)}function $b(n){const e=y.useRef(null),t=y.useRef(null),s=y.useRef(!1);return y.useEffect(()=>{const r=Wp(()=>{e.current.width=e.current.offsetWidth*window.devicePixelRatio,e.current.height=e.current.offsetHeight*window.devicePixelRatio,n(e.current,t.current)},250);return window.addEventListener("resize",r),s.current||(r(),s.current=!0),()=>window.removeEventListener("resize",r)},[n]),y.useEffect(()=>{t.current=e.current.getContext("2d")},[]),[e,t]}function a0(){const n=y.useRef(null),e=y.useRef({x:0,y:0}),t=y.useCallback(s=>{Object.assign(e.current,s),n.current&&(n.current.style.transform=`translate3d(${e.current.x}px, ${e.current.y}px, 0)`)},[]);return[n,t]}const Fb=["__refCount"],qc=(n,e)=>{if(!n[e])return null;const t=n[e];return Pe(t,Fb)};function Lb(n){const e=bo(),[t,s]=y.useState(qc(e.getData(),n)),r=y.useCallback(l=>e.setValueAtPath(n,l,!0),[n,e]),i=y.useCallback(l=>e.setSettingsAtPath(n,l),[n,e]),o=y.useCallback(l=>e.disableInputAtPath(n,l),[n,e]),a=y.useCallback(()=>e.emitOnEditStart(n),[n,e]),c=y.useCallback(()=>e.emitOnEditEnd(n),[n,e]);return y.useEffect(()=>{s(qc(e.getData(),n));const l=e.useStore.subscribe(u=>qc(u.data,n),s,{equalityFn:vo});return()=>l()},[e,n]),[t,{set:r,setSettings:i,disable:o,storeId:e.storeId,emitOnEditStart:a,emitOnEditEnd:c}]}const jb=ce("div",{variants:{hasRange:{true:{position:"relative",display:"grid",gridTemplateColumns:"auto $sizes$numberInputMinWidth",columnGap:"$colGap",alignItems:"center"}}}}),c0=ce("div",{position:"relative",width:"100%",height:2,borderRadius:"$xs",backgroundColor:"$elevation1"}),wl=ce("div",{position:"absolute",width:"$scrubberWidth",height:"$scrubberHeight",borderRadius:"$xs",boxShadow:"0 0 0 2px $colors$elevation2",backgroundColor:"$accent2",cursor:"pointer",$active:"none $accent1",$hover:"none $accent3",variants:{position:{left:{borderTopRightRadius:0,borderBottomRightRadius:0,transform:"translateX(calc(-0.5 * ($sizes$scrubberWidth + 4px)))"},right:{borderTopLeftRadius:0,borderBottomLeftRadius:0,transform:"translateX(calc(0.5 * ($sizes$scrubberWidth + 4px)))"}}}}),l0=ce("div",{position:"relative",$flex:"",height:"100%",cursor:"pointer",touchAction:"none"}),u0=ce("div",{position:"absolute",height:"100%",backgroundColor:"$accent2"});function Vb({value:n,min:e,max:t,onDrag:s,step:r,initialValue:i}){const o=y.useRef(null),a=y.useRef(null),c=y.useRef(0),l=Un("sizes","scrubberWidth"),u=xo(({event:d,first:f,xy:[m],movement:[p],memo:g})=>{if(f){const{width:w,left:k}=o.current.getBoundingClientRect();c.current=w-parseFloat(l),g=(d==null?void 0:d.target)===a.current?n:va((m-k)/w,e,t)}const _=g+va(p/c.current,0,t-e);return s(Gp(_,{step:r,initialValue:i})),g}),h=ya(n,e,t);return M.createElement(l0,Ze({ref:o},u()),M.createElement(c0,null,M.createElement(u0,{style:{left:0,right:`${(1-h)*100}%`}})),M.createElement(wl,{ref:a,style:{left:`calc(${h} * (100% - ${l}))`}}))}const zb=M.memo(({label:n,onUpdate:e,step:t,innerLabelTrim:s})=>{const[r,i]=y.useState(!1),o=xo(({active:a,delta:[c],event:l,memo:u=0})=>(i(a),u+=c/2,Math.abs(u)>=1&&(e(h=>parseFloat(h)+Math.floor(u)*t*qp(l)),u=0),u));return M.createElement(vb,Ze({dragging:r,title:n.length>1?n:""},o()),n.slice(0,s))});function h0({label:n,id:e,displayValue:t,onUpdate:s,onChange:r,settings:i,innerLabelTrim:o=1}){const a=o>0&&M.createElement(zb,{label:n,step:i.step,onUpdate:s,innerLabelTrim:o});return M.createElement(kb,{id:e,value:String(t),onUpdate:s,onChange:r,innerLabel:a})}function Ub(){const n=_t(),{label:e,value:t,onUpdate:s,settings:r,id:i}=n,{min:o,max:a}=r,c=a!==1/0&&o!==-1/0;return M.createElement(tn,{input:!0},M.createElement(fn,null,e),M.createElement(jb,{hasRange:c},c&&M.createElement(Vb,Ze({value:parseFloat(t),onDrag:s},r)),M.createElement(h0,Ze({},n,{id:i,label:"value",innerLabelTrim:c?0:1}))))}const{sanitizeStep:Bb}=Xp,Wb=Pe(Xp,["sanitizeStep"]);var qb=de({component:Ub},Wb);const Hb=(n,e)=>St().schema({options:St().passesAnyOf(St().object(),St().array())}).test(e),Yb=(n,{values:e})=>{if(e.indexOf(n)<0)throw Error("Selected value doesn't match Select options");return n},Gb=(n,{values:e})=>e.indexOf(n),Xb=n=>{let{value:e,options:t}=n,s,r;return Array.isArray(t)?(r=t,s=t.map(i=>String(i))):(r=Object.values(t),s=Object.keys(t)),"value"in n?r.includes(e)||(s.unshift(String(e)),r.unshift(e)):e=r[0],Object.values(t).includes(e)||(t[String(e)]=e),{value:e,settings:{keys:s,values:r}}};var Zb=Object.freeze({__proto__:null,schema:Hb,sanitize:Yb,format:Gb,normalize:Xb});const Kb=ce("div",{$flexCenter:"",position:"relative","> svg":{pointerEvents:"none",position:"absolute",right:"$md"}}),kl=ce("select",{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0}),Qb=ce("div",{display:"flex",alignItems:"center",width:"100%",height:"$rowHeight",backgroundColor:"$elevation3",borderRadius:"$sm",padding:"0 $sm",cursor:"pointer",[`${kl}:focus + &`]:{$focusStyle:""},[`${kl}:hover + &`]:{$hoverStyle:""}});function Jb({displayValue:n,value:e,onUpdate:t,id:s,settings:r,disabled:i}){const{keys:o,values:a}=r,c=y.useRef();return e===a[n]&&(c.current=o[n]),M.createElement(Kb,null,M.createElement(kl,{id:s,value:n,onChange:l=>t(a[Number(l.currentTarget.value)]),disabled:i},o.map((l,u)=>M.createElement("option",{key:l,value:u},l))),M.createElement(Qb,null,c.current),M.createElement(Eu,{toggled:!0}))}function ex(){const{label:n,value:e,displayValue:t,onUpdate:s,id:r,disabled:i,settings:o}=_t();return M.createElement(tn,{input:!0},M.createElement(fn,null,n),M.createElement(Jb,{id:r,value:e,displayValue:t,onUpdate:s,settings:o,disabled:i}))}var tx=de({component:ex},Zb);const nx=n=>St().string().test(n),sx=n=>{if(typeof n!="string")throw Error("Invalid string");return n},rx=({value:n,editable:e=!0,rows:t=!1})=>({value:n,settings:{editable:e,rows:typeof t=="number"?t:t?5:0}});var ix=Object.freeze({__proto__:null,schema:nx,sanitize:sx,normalize:rx});const ox=["displayValue","onUpdate","onChange","editable"],ax=ce("div",{whiteSpace:"pre-wrap"});function cx(n){let{displayValue:e,onUpdate:t,onChange:s,editable:r=!0}=n,i=Pe(n,ox);return r?M.createElement(ku,Ze({value:e,onUpdate:t,onChange:s},i)):M.createElement(ax,null,e)}function lx(){const{label:n,settings:e,displayValue:t,onUpdate:s,onChange:r}=_t();return M.createElement(tn,{input:!0},M.createElement(fn,null,n),M.createElement(cx,Ze({displayValue:t,onUpdate:s,onChange:r},e)))}var ux=de({component:lx},ix);const hx=n=>St().boolean().test(n),dx=n=>{if(typeof n!="boolean")throw Error("Invalid boolean");return n};var fx=Object.freeze({__proto__:null,schema:hx,sanitize:dx});const px=ce("div",{position:"relative",$flex:"",height:"$rowHeight",input:{$reset:"",height:0,width:0,opacity:0,margin:0},label:{position:"relative",$flexCenter:"",userSelect:"none",cursor:"pointer",height:"$checkboxSize",width:"$checkboxSize",backgroundColor:"$elevation3",borderRadius:"$sm",$hover:""},"input:focus + label":{$focusStyle:""},"input:focus:checked + label, input:checked + label:hover":{$hoverStyle:"$accent3"},"input + label:active":{backgroundColor:"$accent1"},"input:checked + label:active":{backgroundColor:"$accent1"},"label > svg":{display:"none",width:"90%",height:"90%",stroke:"$highlight3"},"input:checked + label":{backgroundColor:"$accent2"},"input:checked + label > svg":{display:"block"}});function mx({value:n,onUpdate:e,id:t,disabled:s}){return M.createElement(px,null,M.createElement("input",{id:t,type:"checkbox",checked:n,onChange:r=>e(r.currentTarget.checked),disabled:s}),M.createElement("label",{htmlFor:t},M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},M.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}))))}function gx(){const{label:n,value:e,onUpdate:t,disabled:s,id:r}=_t();return M.createElement(tn,{input:!0},M.createElement(fn,null,n),M.createElement(mx,{value:e,onUpdate:t,id:r,disabled:s}))}var _x=de({component:gx},fx);const yx=["locked"];function vx({value:n,id:e,valueKey:t,settings:s,onUpdate:r,innerLabelTrim:i}){const o=y.useRef(n[t]);o.current=n[t];const a=y.useCallback(l=>r({[t]:Bp({type:"NUMBER",value:o.current,settings:s},l)}),[r,s,t]),c=o0({type:"NUMBER",value:n[t],settings:s,setValue:a});return M.createElement(h0,{id:e,label:t,value:n[t],displayValue:c.displayValue,onUpdate:c.onUpdate,onChange:c.onChange,settings:s,innerLabelTrim:i})}const bx=ce("div",{display:"grid",columnGap:"$colGap",gridAutoFlow:"column dense",alignItems:"center",variants:{withLock:{true:{gridTemplateColumns:"10px auto","> svg":{cursor:"pointer"}}}}});function xx(n){let{locked:e}=n,t=Pe(n,yx);return M.createElement("svg",Ze({width:"10",height:"10",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),e?M.createElement("path",{d:"M5 4.63601C5 3.76031 5.24219 3.1054 5.64323 2.67357C6.03934 2.24705 6.64582 1.9783 7.5014 1.9783C8.35745 1.9783 8.96306 2.24652 9.35823 2.67208C9.75838 3.10299 10 3.75708 10 4.63325V5.99999H5V4.63601ZM4 5.99999V4.63601C4 3.58148 4.29339 2.65754 4.91049 1.99307C5.53252 1.32329 6.42675 0.978302 7.5014 0.978302C8.57583 0.978302 9.46952 1.32233 10.091 1.99162C10.7076 2.65557 11 3.57896 11 4.63325V5.99999H12C12.5523 5.99999 13 6.44771 13 6.99999V13C13 13.5523 12.5523 14 12 14H3C2.44772 14 2 13.5523 2 13V6.99999C2 6.44771 2.44772 5.99999 3 5.99999H4ZM3 6.99999H12V13H3V6.99999Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}):M.createElement("path",{d:"M9 3.63601C9 2.76044 9.24207 2.11211 9.64154 1.68623C10.0366 1.26502 10.6432 1 11.5014 1C12.4485 1 13.0839 1.30552 13.4722 1.80636C13.8031 2.23312 14 2.84313 14 3.63325H15C15 2.68242 14.7626 1.83856 14.2625 1.19361C13.6389 0.38943 12.6743 0 11.5014 0C10.4294 0 9.53523 0.337871 8.91218 1.0021C8.29351 1.66167 8 2.58135 8 3.63601V6H1C0.447715 6 0 6.44772 0 7V13C0 13.5523 0.447715 14 1 14H10C10.5523 14 11 13.5523 11 13V7C11 6.44772 10.5523 6 10 6H9V3.63601ZM1 7H10V13H1V7Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function Cu({value:n,onUpdate:e,settings:t,innerLabelTrim:s}){const{id:r,setSettings:i}=_t(),{lock:o,locked:a}=t;return M.createElement(bx,{withLock:o},o&&M.createElement(xx,{locked:a,onClick:()=>i({locked:!a})}),Object.keys(n).map((c,l)=>M.createElement(vx,{id:l===0?r:`${r}.${c}`,key:c,valueKey:c,value:n,settings:t[c],onUpdate:e,innerLabelTrim:s})))}const d0=(n,e)=>{const t={};let s=0,r=1/0;Object.entries(n).forEach(([i,o])=>{t[i]=Yp(de({value:o},e[i])).settings,s=Math.max(s,t[i].step),r=Math.min(r,t[i].pad)});for(let i in t){const{step:o,min:a,max:c}=e[i]||{};!isFinite(o)&&(!isFinite(a)||!isFinite(c))&&(t[i].step=s,t[i].pad=r)}return t},wx=["lock"],kx=["value"];function Tx(n){const e=St().array().length(n).every.number(),t=s=>{if(!s||typeof s!="object")return!1;const r=Object.values(s);return r.length===n&&r.every(i=>isFinite(i))};return s=>e.test(s)||t(s)}function Ex(n){return Array.isArray(n)?"array":"object"}function Ai(n,e,t){return Ex(n)===e?n:e==="array"?Object.values(n):nb(n,t)}const Cx=(n,e,t)=>{const s=Ai(n,"object",e.keys);for(let o in s)s[o]=Hp(s[o],e[o]);const r=Object.keys(s);let i={};if(r.length===e.keys.length)i=s;else{const o=Ai(t,"object",e.keys);if(r.length===1&&e.locked){const a=r[0],c=s[a],l=o[a],u=l!==0?c/l:1;for(let h in o)h===a?i[a]=c:i[h]=o[h]*u}else i=de(de({},o),s)}return Ai(i,e.format,e.keys)},Sx=(n,e)=>Ai(n,"object",e.keys),Ox=n=>!!n&&("step"in n||"min"in n||"max"in n);function Ax(n,e,t=[]){const{lock:s=!1}=e,r=Pe(e,wx),i=Array.isArray(n)?"array":"object",o=i==="object"?Object.keys(n):t,a=Ai(n,"object",o),c=Ox(r)?o.reduce((u,h)=>Object.assign(u,{[h]:r}),{}):r,l=d0(a,c);return{value:i==="array"?n:a,settings:de(de({},l),{},{format:i,keys:o,lock:s,locked:!1})}}function f0(n){return{schema:Tx(n.length),normalize:e=>{let{value:t}=e,s=Pe(e,kx);return Ax(t,s,n)},format:(e,t)=>Sx(e,t),sanitize:(e,t,s)=>Cx(e,t,s)}}var Px={grad:.9,turn:360,rad:360/(2*Math.PI)},Nn=function(n){return typeof n=="string"?n.length>0:typeof n=="number"},at=function(n,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*n)/t+0},Gt=function(n,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),n>t?t:n>e?n:e},p0=function(n){return(n=isFinite(n)?n%360:0)>0?n:n+360},Ed=function(n){return{r:Gt(n.r,0,255),g:Gt(n.g,0,255),b:Gt(n.b,0,255),a:Gt(n.a)}},Hc=function(n){return{r:at(n.r),g:at(n.g),b:at(n.b),a:at(n.a,3)}},Rx=/^#([0-9a-f]{3,8})$/i,Go=function(n){var e=n.toString(16);return e.length<2?"0"+e:e},m0=function(n){var e=n.r,t=n.g,s=n.b,r=n.a,i=Math.max(e,t,s),o=i-Math.min(e,t,s),a=o?i===e?(t-s)/o:i===t?2+(s-e)/o:4+(e-t)/o:0;return{h:60*(a<0?a+6:a),s:i?o/i*100:0,v:i/255*100,a:r}},g0=function(n){var e=n.h,t=n.s,s=n.v,r=n.a;e=e/360*6,t/=100,s/=100;var i=Math.floor(e),o=s*(1-t),a=s*(1-(e-i)*t),c=s*(1-(1-e+i)*t),l=i%6;return{r:255*[s,a,o,o,c,s][l],g:255*[c,s,s,a,o,o][l],b:255*[o,o,c,s,s,a][l],a:r}},Cd=function(n){return{h:p0(n.h),s:Gt(n.s,0,100),l:Gt(n.l,0,100),a:Gt(n.a)}},Sd=function(n){return{h:at(n.h),s:at(n.s),l:at(n.l),a:at(n.a,3)}},Od=function(n){return g0((t=(e=n).s,{h:e.h,s:(t*=((s=e.l)<50?s:100-s)/100)>0?2*t/(s+t)*100:0,v:s+t,a:e.a}));var e,t,s},Pi=function(n){return{h:(e=m0(n)).h,s:(r=(200-(t=e.s))*(s=e.v)/100)>0&&r<200?t*s/100/(r<=100?r:200-r)*100:0,l:r/2,a:e.a};var e,t,s,r},Dx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Mx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ix=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Nx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Tl={string:[[function(n){var e=Rx.exec(n);return e?(n=e[1]).length<=4?{r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:n.length===4?at(parseInt(n[3]+n[3],16)/255,2):1}:n.length===6||n.length===8?{r:parseInt(n.substr(0,2),16),g:parseInt(n.substr(2,2),16),b:parseInt(n.substr(4,2),16),a:n.length===8?at(parseInt(n.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(n){var e=Ix.exec(n)||Nx.exec(n);return e?e[2]!==e[4]||e[4]!==e[6]?null:Ed({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(n){var e=Dx.exec(n)||Mx.exec(n);if(!e)return null;var t,s,r=Cd({h:(t=e[1],s=e[2],s===void 0&&(s="deg"),Number(t)*(Px[s]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return Od(r)},"hsl"]],object:[[function(n){var e=n.r,t=n.g,s=n.b,r=n.a,i=r===void 0?1:r;return Nn(e)&&Nn(t)&&Nn(s)?Ed({r:Number(e),g:Number(t),b:Number(s),a:Number(i)}):null},"rgb"],[function(n){var e=n.h,t=n.s,s=n.l,r=n.a,i=r===void 0?1:r;if(!Nn(e)||!Nn(t)||!Nn(s))return null;var o=Cd({h:Number(e),s:Number(t),l:Number(s),a:Number(i)});return Od(o)},"hsl"],[function(n){var e=n.h,t=n.s,s=n.v,r=n.a,i=r===void 0?1:r;if(!Nn(e)||!Nn(t)||!Nn(s))return null;var o=function(a){return{h:p0(a.h),s:Gt(a.s,0,100),v:Gt(a.v,0,100),a:Gt(a.a)}}({h:Number(e),s:Number(t),v:Number(s),a:Number(i)});return g0(o)},"hsv"]]},Ad=function(n,e){for(var t=0;t=.5},n.prototype.toHex=function(){return e=Hc(this.rgba),t=e.r,s=e.g,r=e.b,o=(i=e.a)<1?Go(at(255*i)):"","#"+Go(t)+Go(s)+Go(r)+o;var e,t,s,r,i,o},n.prototype.toRgb=function(){return Hc(this.rgba)},n.prototype.toRgbString=function(){return e=Hc(this.rgba),t=e.r,s=e.g,r=e.b,(i=e.a)<1?"rgba("+t+", "+s+", "+r+", "+i+")":"rgb("+t+", "+s+", "+r+")";var e,t,s,r,i},n.prototype.toHsl=function(){return Sd(Pi(this.rgba))},n.prototype.toHslString=function(){return e=Sd(Pi(this.rgba)),t=e.h,s=e.s,r=e.l,(i=e.a)<1?"hsla("+t+", "+s+"%, "+r+"%, "+i+")":"hsl("+t+", "+s+"%, "+r+"%)";var e,t,s,r,i},n.prototype.toHsv=function(){return e=m0(this.rgba),{h:at(e.h),s:at(e.s),v:at(e.v),a:at(e.a,3)};var e},n.prototype.invert=function(){return vt({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},n.prototype.saturate=function(e){return e===void 0&&(e=.1),vt(Yc(this.rgba,e))},n.prototype.desaturate=function(e){return e===void 0&&(e=.1),vt(Yc(this.rgba,-e))},n.prototype.grayscale=function(){return vt(Yc(this.rgba,-1))},n.prototype.lighten=function(e){return e===void 0&&(e=.1),vt(Pd(this.rgba,e))},n.prototype.darken=function(e){return e===void 0&&(e=.1),vt(Pd(this.rgba,-e))},n.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},n.prototype.alpha=function(e){return typeof e=="number"?vt({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):at(this.rgba.a,3);var t},n.prototype.hue=function(e){var t=Pi(this.rgba);return typeof e=="number"?vt({h:e,s:t.s,l:t.l,a:t.a}):at(t.h)},n.prototype.isEqual=function(e){return this.toHex()===vt(e).toHex()},n}(),vt=function(n){return n instanceof El?n:new El(n)},Rd=[],Fx=function(n){n.forEach(function(e){Rd.indexOf(e)<0&&(e(El,Tl),Rd.push(e))})};function Lx(n,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},s={};for(var r in t)s[t[r]]=r;var i={};n.prototype.toName=function(o){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,c,l=s[this.toHex()];if(l)return l;if(o!=null&&o.closest){var u=this.toRgb(),h=1/0,d="black";if(!i.length)for(var f in t)i[f]=new n(t[f]).toRgb();for(var m in t){var p=(a=u,c=i[m],Math.pow(a.r-c.r,2)+Math.pow(a.g-c.g,2)+Math.pow(a.b-c.b,2));p=0||(r[t]=n[t]);return r}function Cl(n){var e=y.useRef(n),t=y.useRef(function(s){e.current&&e.current(s)});return e.current=n,t.current}var Fr=function(n,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),n>t?t:n0:g.buttons>0)&&r.current?i(Dd(r.current,g,a.current)):p(!1)},m=function(){return p(!1)};function p(g){var _=c.current,w=Sl(r.current),k=g?w.addEventListener:w.removeEventListener;k(_?"touchmove":"mousemove",f),k(_?"touchend":"mouseup",m)}return[function(g){var _=g.nativeEvent,w=r.current;if(w&&(Md(_),!function(b,v){return v&&!Ri(b)}(_,c.current)&&w)){if(Ri(_)){c.current=!0;var k=_.changedTouches||[];k.length&&(a.current=k[0].identifier)}w.focus(),i(Dd(w,_,a.current)),p(!0)}},function(g){var _=g.which||g.keyCode;_<37||_>40||(g.preventDefault(),o({left:_===39?.05:_===37?-.05:0,top:_===40?.05:_===38?-.05:0}))},p]},[o,i]),u=l[0],h=l[1],d=l[2];return y.useEffect(function(){return d},[d]),M.createElement("div",ei({},s,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:r,onKeyDown:h,tabIndex:0,role:"slider"}))}),wo=function(n){return n.filter(Boolean).join(" ")},Au=function(n){var e=n.color,t=n.left,s=n.top,r=s===void 0?.5:s,i=wo(["react-colorful__pointer",n.className]);return M.createElement("div",{className:i,style:{top:100*r+"%",left:100*t+"%"}},M.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},wt=function(n,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*n)/t},y0=function(n){var e=n.s,t=n.v,s=n.a,r=(200-e)*t/100;return{h:wt(n.h),s:wt(r>0&&r<200?e*t/100/(r<=100?r:200-r)*100:0),l:wt(r/2),a:wt(s,2)}},Ol=function(n){var e=y0(n);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},Xc=function(n){var e=y0(n);return"hsla("+e.h+", "+e.s+"%, "+e.l+"%, "+e.a+")"},v0=function(n){var e=n.h,t=n.s,s=n.v,r=n.a;e=e/360*6,t/=100,s/=100;var i=Math.floor(e),o=s*(1-t),a=s*(1-(e-i)*t),c=s*(1-(1-e+i)*t),l=i%6;return{r:wt(255*[s,a,o,o,c,s][l]),g:wt(255*[c,s,s,a,o,o][l]),b:wt(255*[o,o,c,s,s,a][l]),a:wt(r,2)}},b0=function(n){var e=n.r,t=n.g,s=n.b,r=n.a,i=Math.max(e,t,s),o=i-Math.min(e,t,s),a=o?i===e?(t-s)/o:i===t?2+(s-e)/o:4+(e-t)/o:0;return{h:wt(60*(a<0?a+6:a)),s:wt(i?o/i*100:0),v:wt(i/255*100),a:r}},x0=M.memo(function(n){var e=n.hue,t=n.onChange,s=wo(["react-colorful__hue",n.className]);return M.createElement("div",{className:s},M.createElement(Ou,{onMove:function(r){t({h:360*r.left})},onKey:function(r){t({h:Fr(e+360*r.left,0,360)})},"aria-label":"Hue","aria-valuenow":wt(e),"aria-valuemax":"360","aria-valuemin":"0"},M.createElement(Au,{className:"react-colorful__hue-pointer",left:e/360,color:Ol({h:e,s:100,v:100,a:1})})))}),w0=M.memo(function(n){var e=n.hsva,t=n.onChange,s={backgroundColor:Ol({h:e.h,s:100,v:100,a:1})};return M.createElement("div",{className:"react-colorful__saturation",style:s},M.createElement(Ou,{onMove:function(r){t({s:100*r.left,v:100-100*r.top})},onKey:function(r){t({s:Fr(e.s+100*r.left,0,100),v:Fr(e.v-100*r.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+wt(e.s)+"%, Brightness "+wt(e.v)+"%"},M.createElement(Au,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:Ol(e)})))}),Pu=function(n,e){if(n===e)return!0;for(var t in n)if(n[t]!==e[t])return!1;return!0};function k0(n,e,t){var s=Cl(t),r=y.useState(function(){return n.toHsva(e)}),i=r[0],o=r[1],a=y.useRef({color:e,hsva:i});y.useEffect(function(){if(!n.equal(e,a.current.color)){var l=n.toHsva(e);a.current={hsva:l,color:e},o(l)}},[e,n]),y.useEffect(function(){var l;Pu(i,a.current.hsva)||n.equal(l=n.fromHsva(i),a.current.color)||(a.current={hsva:i,color:l},s(l))},[i,n,s]);var c=y.useCallback(function(l){o(function(u){return Object.assign({},u,l)})},[]);return[i,c]}var jx=typeof window<"u"?y.useLayoutEffect:y.useEffect,Vx=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Id=new Map,T0=function(n){jx(function(){var e=n.current?n.current.ownerDocument:document;if(e!==void 0&&!Id.has(e)){var t=e.createElement("style");t.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,Id.set(e,t);var s=Vx();s&&t.setAttribute("nonce",s),e.head.appendChild(t)}},[])},zx=function(n){var e=n.className,t=n.colorModel,s=n.color,r=s===void 0?t.defaultColor:s,i=n.onChange,o=Su(n,["className","colorModel","color","onChange"]),a=y.useRef(null);T0(a);var c=k0(t,r,i),l=c[0],u=c[1],h=wo(["react-colorful",e]);return M.createElement("div",ei({},o,{ref:a,className:h}),M.createElement(w0,{hsva:l,onChange:u}),M.createElement(x0,{hue:l.h,onChange:u,className:"react-colorful__last-control"}))},Ux=function(n){var e=n.className,t=n.hsva,s=n.onChange,r={backgroundImage:"linear-gradient(90deg, "+Xc(Object.assign({},t,{a:0}))+", "+Xc(Object.assign({},t,{a:1}))+")"},i=wo(["react-colorful__alpha",e]),o=wt(100*t.a);return M.createElement("div",{className:i},M.createElement("div",{className:"react-colorful__alpha-gradient",style:r}),M.createElement(Ou,{onMove:function(a){s({a:a.left})},onKey:function(a){s({a:Fr(t.a+a.left)})},"aria-label":"Alpha","aria-valuetext":o+"%","aria-valuenow":o,"aria-valuemin":"0","aria-valuemax":"100"},M.createElement(Au,{className:"react-colorful__alpha-pointer",left:t.a,color:Xc(t)})))},Bx=function(n){var e=n.className,t=n.colorModel,s=n.color,r=s===void 0?t.defaultColor:s,i=n.onChange,o=Su(n,["className","colorModel","color","onChange"]),a=y.useRef(null);T0(a);var c=k0(t,r,i),l=c[0],u=c[1],h=wo(["react-colorful",e]);return M.createElement("div",ei({},o,{ref:a,className:h}),M.createElement(w0,{hsva:l,onChange:u}),M.createElement(x0,{hue:l.h,onChange:u}),M.createElement(Ux,{hsva:l,onChange:u,className:"react-colorful__last-control"}))},Wx={defaultColor:{r:0,g:0,b:0,a:1},toHsva:b0,fromHsva:v0,equal:Pu},qx=function(n){return M.createElement(Bx,ei({},n,{colorModel:Wx}))},Hx={defaultColor:{r:0,g:0,b:0},toHsva:function(n){return b0({r:n.r,g:n.g,b:n.b,a:1})},fromHsva:function(n){return{r:(e=v0(n)).r,g:e.g,b:e.b};var e},equal:Pu},Yx=function(n){return M.createElement(zx,ei({},n,{colorModel:Hx}))};function pn(n,e,t,s){var r=arguments.length,i=r<3?e:s===null?s=Object.getOwnPropertyDescriptor(e,t):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,e,t,s);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(i=(r<3?o(i):r>3?o(e,t,i):o(e,t))||i);return r>3&&i&&Object.defineProperty(e,t,i),i}function Ie(n,e,t,s){function r(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function a(u){try{l(s.next(u))}catch(h){o(h)}}function c(u){try{l(s.throw(u))}catch(h){o(h)}}function l(u){u.done?i(u.value):r(u.value).then(a,c)}l((s=s.apply(n,e||[])).next())})}function ti(n,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},s,r,i,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(s)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(t=0)),t;)try{if(s=1,r&&(i=l[0]&2?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[l[0]&2,i.value]),l[0]){case 0:case 1:i=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,r=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!i||l[1]>i[0]&&l[1]0)&&!(r=s.next()).done;)i.push(r.value)}catch(a){o={error:a}}finally{try{r&&!r.done&&(t=s.return)&&t.call(s)}finally{if(o)throw o.error}}return i}function Xx(){for(var n=[],e=0;e0?s:n.name,writable:!1,configurable:!1,enumerable:!0})}return t}function Kx(n){var e=n.name,t=e&&e.lastIndexOf(".")!==-1;if(t&&!n.type){var s=e.split(".").pop().toLowerCase(),r=Zx.get(s);r&&Object.defineProperty(n,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return n}var Qx=[".DS_Store","Thumbs.db"];function Jx(n){return Ie(this,void 0,void 0,function(){return ti(this,function(e){return xa(n)&&ew(n)?[2,rw(n.dataTransfer,n.type)]:tw(n)?[2,nw(n)]:Array.isArray(n)&&n.every(function(t){return"getFile"in t&&typeof t.getFile=="function"})?[2,sw(n)]:[2,[]]})})}function ew(n){return xa(n.dataTransfer)}function tw(n){return xa(n)&&xa(n.target)}function xa(n){return typeof n=="object"&&n!==null}function nw(n){return Al(n.target.files).map(function(e){return ko(e)})}function sw(n){return Ie(this,void 0,void 0,function(){var e;return ti(this,function(t){switch(t.label){case 0:return[4,Promise.all(n.map(function(s){return s.getFile()}))];case 1:return e=t.sent(),[2,e.map(function(s){return ko(s)})]}})})}function rw(n,e){return Ie(this,void 0,void 0,function(){var t,s;return ti(this,function(r){switch(r.label){case 0:return n===null?[2,[]]:n.items?(t=Al(n.items).filter(function(i){return i.kind==="file"}),e!=="drop"?[2,t]:[4,Promise.all(t.map(iw))]):[3,2];case 1:return s=r.sent(),[2,Nd(E0(s))];case 2:return[2,Nd(Al(n.files).map(function(i){return ko(i)}))]}})})}function Nd(n){return n.filter(function(e){return Qx.indexOf(e.name)===-1})}function Al(n){if(n===null)return[];for(var e=[],t=0;tn.length)&&(e=n.length);for(var t=0,s=new Array(e);tt)return[!1,zd(t)];if(n.sizet)return[!1,zd(t)]}return[!0,null]}function xi(n){return n!=null}function vw(n){var e=n.files,t=n.accept,s=n.minSize,r=n.maxSize,i=n.multiple,o=n.maxFiles;return!i&&e.length>1||i&&o>=1&&e.length>o?!1:e.every(function(a){var c=O0(a,t),l=jd(c,1),u=l[0],h=A0(a,s,r),d=jd(h,1),f=d[0];return u&&f})}function wa(n){return typeof n.isPropagationStopped=="function"?n.isPropagationStopped():typeof n.cancelBubble<"u"?n.cancelBubble:!1}function Xo(n){return n.dataTransfer?Array.prototype.some.call(n.dataTransfer.types,function(e){return e==="Files"||e==="application/x-moz-file"}):!!n.target&&!!n.target.files}function Bd(n){n.preventDefault()}function bw(n){return n.indexOf("MSIE")!==-1||n.indexOf("Trident/")!==-1}function xw(n){return n.indexOf("Edge/")!==-1}function ww(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return bw(n)||xw(n)}function bn(){for(var n=arguments.length,e=new Array(n),t=0;t1?r-1:0),o=1;on.length)&&(e=n.length);for(var t=0,s=new Array(e);t=0)&&Object.prototype.propertyIsEnumerable.call(n,s)&&(t[s]=n[s])}return t}function Lw(n,e){if(n==null)return{};var t={},s=Object.keys(n),r,i;for(i=0;i=0)&&(t[r]=n[r]);return t}var Ru=y.forwardRef(function(n,e){var t=n.children,s=ka(n,Sw),r=D0(s),i=r.open,o=ka(r,Ow);return y.useImperativeHandle(e,function(){return{open:i}},[i]),M.createElement(y.Fragment,null,t(Ue(Ue({},o),{},{open:i})))});Ru.displayName="Dropzone";var R0={disabled:!1,getFilesFromEvent:Jx,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};Ru.defaultProps=R0;Ru.propTypes={children:ke.func,accept:ke.oneOfType([ke.string,ke.arrayOf(ke.string)]),multiple:ke.bool,preventDropOnDocument:ke.bool,noClick:ke.bool,noKeyboard:ke.bool,noDrag:ke.bool,noDragEventsBubbling:ke.bool,minSize:ke.number,maxSize:ke.number,maxFiles:ke.number,disabled:ke.bool,getFilesFromEvent:ke.func,onFileDialogCancel:ke.func,onFileDialogOpen:ke.func,useFsAccessApi:ke.bool,onDragEnter:ke.func,onDragLeave:ke.func,onDragOver:ke.func,onDrop:ke.func,onDropAccepted:ke.func,onDropRejected:ke.func,validator:ke.func};var Dl={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function D0(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=Ue(Ue({},R0),n),t=e.accept,s=e.disabled,r=e.getFilesFromEvent,i=e.maxSize,o=e.minSize,a=e.multiple,c=e.maxFiles,l=e.onDragEnter,u=e.onDragLeave,h=e.onDragOver,d=e.onDrop,f=e.onDropAccepted,m=e.onDropRejected,p=e.onFileDialogCancel,g=e.onFileDialogOpen,_=e.useFsAccessApi,w=e.preventDropOnDocument,k=e.noClick,b=e.noKeyboard,v=e.noDrag,T=e.noDragEventsBubbling,E=e.validator,x=y.useMemo(function(){return typeof g=="function"?g:qd},[g]),C=y.useMemo(function(){return typeof p=="function"?p:qd},[p]),S=y.useRef(null),R=y.useRef(null),O=y.useReducer(jw,Dl),L=Zc(O,2),j=L[0],W=L[1],B=j.isFocused,V=j.isFileDialogActive,z=j.draggedFiles,X=y.useRef(typeof window<"u"&&window.isSecureContext&&_&&kw()),K=function(){!X.current&&V&&setTimeout(function(){if(R.current){var fe=R.current.files;fe.length||(W({type:"closeDialog"}),C())}},300)};y.useEffect(function(){return window.addEventListener("focus",K,!1),function(){window.removeEventListener("focus",K,!1)}},[R,V,C,X]);var J=y.useRef([]),$=function(fe){S.current&&S.current.contains(fe.target)||(fe.preventDefault(),J.current=[])};y.useEffect(function(){return w&&(document.addEventListener("dragover",Bd,!1),document.addEventListener("drop",$,!1)),function(){w&&(document.removeEventListener("dragover",Bd),document.removeEventListener("drop",$))}},[S,w]);var F=y.useCallback(function(ee){ee.preventDefault(),ee.persist(),D(ee),J.current=[].concat(Rw(J.current),[ee.target]),Xo(ee)&&Promise.resolve(r(ee)).then(function(fe){wa(ee)&&!T||(W({draggedFiles:fe,isDragActive:!0,type:"setDraggedFiles"}),l&&l(ee))})},[r,l,T]),A=y.useCallback(function(ee){ee.preventDefault(),ee.persist(),D(ee);var fe=Xo(ee);if(fe&&ee.dataTransfer)try{ee.dataTransfer.dropEffect="copy"}catch{}return fe&&h&&h(ee),!1},[h,T]),I=y.useCallback(function(ee){ee.preventDefault(),ee.persist(),D(ee);var fe=J.current.filter(function(it){return S.current&&S.current.contains(it)}),Je=fe.indexOf(ee.target);Je!==-1&&fe.splice(Je,1),J.current=fe,!(fe.length>0)&&(W({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),Xo(ee)&&u&&u(ee))},[S,u,T]),Y=y.useCallback(function(ee,fe){var Je=[],it=[];ee.forEach(function($t){var is=O0($t,t),lr=Zc(is,2),Sc=lr[0],Oc=lr[1],Ac=A0($t,o,i),Io=Zc(Ac,2),Pc=Io[0],Rc=Io[1],Dc=E?E($t):null;if(Sc&&Pc&&!Dc)Je.push($t);else{var Mc=[Oc,Rc];Dc&&(Mc=Mc.concat(Dc)),it.push({file:$t,errors:Mc.filter(function(h_){return h_})})}}),(!a&&Je.length>1||a&&c>=1&&Je.length>c)&&(Je.forEach(function($t){it.push({file:$t,errors:[yw]})}),Je.splice(0)),W({acceptedFiles:Je,fileRejections:it,type:"setFiles"}),d&&d(Je,it,fe),it.length>0&&m&&m(it,fe),Je.length>0&&f&&f(Je,fe)},[W,a,t,o,i,c,d,f,m,E]),N=y.useCallback(function(ee){ee.preventDefault(),ee.persist(),D(ee),J.current=[],Xo(ee)&&Promise.resolve(r(ee)).then(function(fe){wa(ee)&&!T||Y(fe,ee)}),W({type:"reset"})},[r,Y,T]),q=y.useCallback(function(){if(X.current){W({type:"openDialog"}),x();var ee={multiple:a,types:Tw(t)};window.showOpenFilePicker(ee).then(function(fe){return r(fe)}).then(function(fe){Y(fe,null),W({type:"closeDialog"})}).catch(function(fe){Ew(fe)?(C(fe),W({type:"closeDialog"})):Cw(fe)&&(X.current=!1,R.current&&(R.current.value=null,R.current.click()))});return}R.current&&(W({type:"openDialog"}),x(),R.current.value=null,R.current.click())},[W,x,C,_,Y,t,a]),oe=y.useCallback(function(ee){!S.current||!S.current.isEqualNode(ee.target)||(ee.key===" "||ee.key==="Enter"||ee.keyCode===32||ee.keyCode===13)&&(ee.preventDefault(),q())},[S,q]),re=y.useCallback(function(){W({type:"focus"})},[]),ie=y.useCallback(function(){W({type:"blur"})},[]),ne=y.useCallback(function(){k||(ww()?setTimeout(q,0):q())},[k,q]),ge=function(fe){return s?null:fe},te=function(fe){return b?null:ge(fe)},H=function(fe){return v?null:ge(fe)},D=function(fe){T&&fe.stopPropagation()},P=y.useMemo(function(){return function(){var ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},fe=ee.refKey,Je=fe===void 0?"ref":fe,it=ee.role,$t=ee.onKeyDown,is=ee.onFocus,lr=ee.onBlur,Sc=ee.onClick,Oc=ee.onDragEnter,Ac=ee.onDragOver,Io=ee.onDragLeave,Pc=ee.onDrop,Rc=ka(ee,Aw);return Ue(Ue(Rl({onKeyDown:te(bn($t,oe)),onFocus:te(bn(is,re)),onBlur:te(bn(lr,ie)),onClick:ge(bn(Sc,ne)),onDragEnter:H(bn(Oc,F)),onDragOver:H(bn(Ac,A)),onDragLeave:H(bn(Io,I)),onDrop:H(bn(Pc,N)),role:typeof it=="string"&&it!==""?it:"button"},Je,S),!s&&!b?{tabIndex:0}:{}),Rc)}},[S,oe,re,ie,ne,F,A,I,N,b,v,s]),Q=y.useCallback(function(ee){ee.stopPropagation()},[]),se=y.useMemo(function(){return function(){var ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},fe=ee.refKey,Je=fe===void 0?"ref":fe,it=ee.onChange,$t=ee.onClick,is=ka(ee,Pw),lr=Rl({accept:t,multiple:a,type:"file",style:{display:"none"},onChange:ge(bn(it,N)),onClick:ge(bn($t,Q)),tabIndex:-1},Je,R);return Ue(Ue({},lr),is)}},[R,t,a,N,s]),le=z.length,ye=le>0&&vw({files:z,accept:t,minSize:o,maxSize:i,multiple:a,maxFiles:c}),Qe=le>0&&!ye;return Ue(Ue({},j),{},{isDragAccept:ye,isDragReject:Qe,isFocused:B&&!s,getRootProps:P,getInputProps:se,rootRef:S,inputRef:R,open:ge(q)})}function jw(n,e){switch(e.type){case"focus":return Ue(Ue({},n),{},{isFocused:!0});case"blur":return Ue(Ue({},n),{},{isFocused:!1});case"openDialog":return Ue(Ue({},Dl),{},{isFileDialogActive:!0});case"closeDialog":return Ue(Ue({},n),{},{isFileDialogActive:!1});case"setDraggedFiles":var t=e.isDragActive,s=e.draggedFiles;return Ue(Ue({},n),{},{draggedFiles:s,isDragActive:t});case"setFiles":return Ue(Ue({},n),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return Ue({},Dl);default:return n}}function qd(){}function Vw(n){let e;const t=new Set,s=(l,u)=>{const h=typeof l=="function"?l(e):l;if(h!==e){const d=e;e=u?h:Object.assign({},e,h),t.forEach(f=>f(e,d))}},r=()=>e,i=(l,u=r,h=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let d=u(e);function f(){const m=u(e);if(!h(d,m)){const p=d;l(d=m,p)}}return t.add(f),()=>t.delete(f)},c={setState:s,getState:r,subscribe:(l,u,h)=>u||h?i(l,u,h):(t.add(l),()=>t.delete(l)),destroy:()=>t.clear()};return e=n(s,r,c),c}const zw=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Hd=zw?y.useEffect:y.useLayoutEffect;function Uw(n){const e=typeof n=="function"?Vw(n):n,t=(s=e.getState,r=Object.is)=>{const[,i]=y.useReducer(g=>g+1,0),o=e.getState(),a=y.useRef(o),c=y.useRef(s),l=y.useRef(r),u=y.useRef(!1),h=y.useRef();h.current===void 0&&(h.current=s(o));let d,f=!1;(a.current!==o||c.current!==s||l.current!==r||u.current)&&(d=s(o),f=!r(h.current,d)),Hd(()=>{f&&(h.current=d),a.current=o,c.current=s,l.current=r,u.current=!1});const m=y.useRef(o);Hd(()=>{const g=()=>{try{const w=e.getState(),k=c.current(w);l.current(h.current,k)||(a.current=w,h.current=k,i())}catch{u.current=!0,i()}},_=e.subscribe(g);return e.getState()!==m.current&&g(),_},[]);const p=f?d:h.current;return y.useDebugValue(p),p};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const s=[t,e];return{next(){const r=s.length<=0;return{value:s.shift(),done:r}}}},t}const Bw=n=>(e,t,s)=>{const r=s.subscribe;return s.subscribe=(o,a,c)=>{let l=o;if(a){const u=(c==null?void 0:c.equalityFn)||Object.is;let h=o(s.getState());l=d=>{const f=o(d);if(!u(h,f)){const m=h;a(h=f,m)}},c!=null&&c.fireImmediately&&a(h,h)}return r(l)},n(e,t,s)};/*! * isobject * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var Bw=function(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1};/*! + */var Ww=function(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1};/*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var Ww=Bw;function Yd(n){return Ww(n)===!0&&Object.prototype.toString.call(n)==="[object Object]"}var D0=function(e){var t,s;return!(Yd(e)===!1||(t=e.constructor,typeof t!="function")||(s=t.prototype,Yd(s)===!1)||s.hasOwnProperty("isPrototypeOf")===!1)};/*! + */var qw=Ww;function Yd(n){return qw(n)===!0&&Object.prototype.toString.call(n)==="[object Object]"}var M0=function(e){var t,s;return!(Yd(e)===!1||(t=e.constructor,typeof t!="function")||(s=t.prototype,Yd(s)===!1)||s.hasOwnProperty("isPrototypeOf")===!1)};/*! * is-extendable * * Copyright (c) 2015-2017, Jon Schlinkert. * Released under the MIT License. - */var qw=D0,Mu=function(e){return qw(e)||typeof e=="function"||Array.isArray(e)};/*! + */var Hw=M0,Du=function(e){return Hw(e)||typeof e=="function"||Array.isArray(e)};/*! * for-in * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */var Hw=function(e,t,s){for(var r in e)if(t.call(s,e[r],r,e)===!1)break},Yw=Mu,Gw=Hw;function M0(n,e){for(var t=arguments.length,s=0;++s * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. - */var Qw=function(n,e,t,s,r){if(!Jw(n)||!e)return n;if(e=Zo(e),t&&(e+="."+Zo(t)),s&&(e+="."+Zo(s)),r&&(e+="."+Zo(r)),e in n)return n[e];for(var i=e.split("."),o=i.length,a=-1;n&&++a * * Copyright (c) 2015, Jon Schlinkert. * Licensed under the MIT License. - */var ek=function(n,e){if(n===null||typeof n>"u")throw new TypeError("expected first argument to be an object.");if(typeof e>"u"||typeof Symbol>"u"||typeof Object.getOwnPropertySymbols!="function")return n;for(var t=Object.prototype.propertyIsEnumerable,s=Object(n),r=arguments.length,i=0;++i"u")throw new TypeError("Cannot convert undefined or null to object");Gd(n)||(n={});for(var e=1;e"u")throw new TypeError("expected first argument to be an object.");if(typeof e>"u"||typeof Symbol>"u"||typeof Object.getOwnPropertySymbols!="function")return n;for(var t=Object.prototype.propertyIsEnumerable,s=Object(n),r=arguments.length,i=0;++i"u")throw new TypeError("Cannot convert undefined or null to object");Gd(n)||(n={});for(var e=1;e * * Copyright (c) 2015-2017, Jon Schlinkert. * Released under the MIT License. - */var ck=sk,lk=function(n,e,t){if(typeof n!="string")throw new TypeError("expected a string");typeof e=="function"&&(t=e,e=null),typeof e=="string"&&(e={sep:e});var s=ck({sep:"."},e),r=s.quotes||['"',"'","`"],i;s.brackets===!0?i={"<":">","(":")","[":"]","{":"}"}:s.brackets&&(i=s.brackets);var o=[],a=[],c=[""],l=s.sep,u=n.length,h=-1,d;function f(){if(i&&a.length)return i[a[a.length-1]]}for(;++h","(":")","[":"]","{":"}"}:s.brackets&&(i=s.brackets);var o=[],a=[],c=[""],l=s.sep,u=n.length,h=-1,d;function f(){if(i&&a.length)return i[a[a.length-1]]}for(;++h * * Copyright (c) 2015, Jon Schlinkert. * Licensed under the MIT License. - */var dk=function(e){return typeof e<"u"&&e!==null&&(typeof e=="object"||typeof e=="function")},Xd=dk,fk=function(e){Xd(e)||(e={});for(var t=arguments.length,s=1;s * * Copyright (c) 2015, Jon Schlinkert. * Licensed under the MIT License. - */var gk=function(e){return typeof e<"u"&&e!==null&&(typeof e=="object"||typeof e=="function")};/*! + */var _k=function(e){return typeof e<"u"&&e!==null&&(typeof e=="object"||typeof e=="function")};/*! * set-value * * Copyright (c) 2014-2015, 2017, Jon Schlinkert. * Released under the MIT License. - */var _k=lk,yk=fk,Zd=D0,Kd=gk,vk=function(n,e,t){if(!Kd(n)||(Array.isArray(e)&&(e=[].concat.apply([],e).join(".")),typeof e!="string"))return n;for(var s=_k(e,{sep:".",brackets:!0}).filter(bk),r=s.length,i=-1,o=n;++in.filter(Boolean).join(".");function Tk(n){const e=n.split(".");return[e.pop(),e.join(".")||void 0]}function Ek(n,e){return Object.entries(Jv(n,e)).reduce((t,[,{value:s,disabled:r,key:i}])=>(t[i]=r?void 0:s,t),{})}function Ck(n,e){const t=y.useRef();return(e?ji:vo)(n,t.current)||(t.current=n),t.current}function I0(n,e){return y.useMemo(n,Ck(e,!0))}function Sk(n){const e=y.useRef(null),t=y.useRef(null),s=y.useRef(!0);return y.useLayoutEffect(()=>{n||(e.current.style.height="0px",e.current.style.overflow="hidden")},[]),y.useEffect(()=>{if(s.current){s.current=!1;return}let r;const i=e.current,o=()=>{n&&(i.style.removeProperty("height"),i.style.removeProperty("overflow"),t.current.scrollIntoView({behavior:"smooth",block:"nearest"}))};i.addEventListener("transitionend",o,{once:!0});const{height:a}=t.current.getBoundingClientRect();return i.style.height=a+"px",n||(i.style.overflow="hidden",r=window.setTimeout(()=>i.style.height="0px",50)),()=>{i.removeEventListener("transitionend",o),clearTimeout(r)}},[n]),{wrapperRef:e,contentRef:t}}const Ok=n=>{const[e,t]=y.useState(n.getVisiblePaths());return y.useEffect(()=>{t(n.getVisiblePaths());const s=n.useStore.subscribe(n.getVisiblePaths,t,{equalityFn:vo});return()=>s()},[n]),e};function Ak(n,e,t){return n.useStore(r=>{const i=de(de({},t),r.data);return Ek(i,e)},vo)}function N0(n=3){const e=y.useRef(null),t=y.useRef(null),[s,r]=y.useState(!1),i=y.useCallback(()=>r(!0),[]),o=y.useCallback(()=>r(!1),[]);return y.useLayoutEffect(()=>{if(s){const{bottom:a,top:c,left:l}=e.current.getBoundingClientRect(),{height:u}=t.current.getBoundingClientRect(),h=a+u>window.innerHeight-40?"up":"down";t.current.style.position="fixed",t.current.style.zIndex="10000",t.current.style.left=l+"px",h==="down"?t.current.style.top=a+n+"px":t.current.style.bottom=window.innerHeight-c+n+"px"}},[n,s]),{popinRef:e,wrapperRef:t,shown:s,show:i,hide:o}}$x([Fx]);const Pk={rgb:"toRgb",hsl:"toHsl",hsv:"toHsv",hex:"toHex"};St.extend({color:()=>n=>vt(n).isValid()});const Rk=n=>St().color().test(n);function $0(n,{format:e,hasAlpha:t,isString:s}){const r=Pk[e]+(s&&e!=="hex"?"String":""),i=n[r]();return typeof i=="object"&&!t?eb(i,["a"]):i}const F0=(n,e)=>{const t=vt(n);if(!t.isValid())throw Error("Invalid color");return $0(t,e)},Dk=(n,e)=>$0(vt(n),de(de({},e),{},{isString:!0,format:"hex"})),Mk=({value:n})=>{const e=Nx(n),t=e==="name"?"hex":e,s=typeof n=="object"?"a"in n:e==="hex"&&n.length===8||/^(rgba)|(hsla)|(hsva)/.test(n),r={format:t,hasAlpha:s,isString:typeof n=="string"};return{value:F0(n,r),settings:r}};var Ik=Object.freeze({__proto__:null,schema:Rk,sanitize:F0,format:Dk,normalize:Mk});const Nk=ce("div",{position:"relative",boxSizing:"border-box",borderRadius:"$sm",overflow:"hidden",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",backgroundColor:"#fff",backgroundImage:`url('data:image/svg+xml;charset=utf-8,')`,$inputStyle:"",$hover:"",zIndex:1,variants:{active:{true:{$inputStyle:"$accent1"}}},"&::before":{content:'""',position:"absolute",top:0,bottom:0,right:0,left:0,backgroundColor:"currentColor",zIndex:1}}),$k=ce("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto",columnGap:"$colGap",alignItems:"center"}),Fk=ce("div",{width:"$colorPickerWidth",height:"$colorPickerHeight",".react-colorful":{width:"100%",height:"100%",boxShadow:"$level2",cursor:"crosshair"},".react-colorful__saturation":{borderRadius:"$sm $sm 0 0"},".react-colorful__alpha, .react-colorful__hue":{height:10},".react-colorful__last-control":{borderRadius:"0 0 $sm $sm"},".react-colorful__pointer":{height:12,width:12}});function ef(n,e){return e!=="rgb"?vt(n).toRgb():n}function Lk({value:n,displayValue:e,settings:t,onUpdate:s}){const{emitOnEditStart:r,emitOnEditEnd:i}=_t(),{format:o,hasAlpha:a}=t,{popinRef:c,wrapperRef:l,shown:u,show:h,hide:d}=N0(),f=y.useRef(0),[m,p]=y.useState(()=>ef(n,o)),g=a?Wx:Hx,_=()=>{p(ef(n,o)),h(),r()},x=()=>{d(),i(),window.clearTimeout(f.current)},k=()=>{f.current=window.setTimeout(x,500)};return y.useEffect(()=>()=>window.clearTimeout(f.current),[]),I.createElement(I.Fragment,null,I.createElement(Nk,{ref:c,active:u,onClick:()=>_(),style:{color:e}}),u&&I.createElement(Eu,null,I.createElement(r0,{onPointerUp:x}),I.createElement(Fk,{ref:l,onMouseEnter:()=>window.clearTimeout(f.current),onMouseLeave:v=>v.buttons===0&&k()},I.createElement(g,{color:m,onChange:s}))))}function jk(){const{value:n,displayValue:e,label:t,onChange:s,onUpdate:r,settings:i}=_t();return I.createElement(tn,{input:!0},I.createElement(fn,null,t),I.createElement($k,null,I.createElement(Lk,{value:n,displayValue:e,onChange:s,onUpdate:r,settings:i}),I.createElement(Tu,{value:e,onChange:s,onUpdate:r})))}var Vk=de({component:jk},Ik);function zk(){const{label:n,displayValue:e,onUpdate:t,settings:s}=_t();return I.createElement(tn,{input:!0},I.createElement(fn,null,n),I.createElement(Su,{value:e,settings:s,onUpdate:t}))}var Uk=de({component:zk},d0(["x","y","z"]));const Bk=ce("div",{$flexCenter:"",position:"relative",backgroundColor:"$elevation3",borderRadius:"$sm",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",touchAction:"none",$draggable:"",$hover:"","&:active":{cursor:"none"},"&::after":{content:'""',backgroundColor:"$accent2",height:4,width:4,borderRadius:2}}),Wk=ce("div",{$flexCenter:"",width:"$joystickWidth",height:"$joystickHeight",borderRadius:"$sm",boxShadow:"$level2",position:"fixed",zIndex:1e4,overflow:"hidden",$draggable:"",transform:"translate(-50%, -50%)",variants:{isOutOfBounds:{true:{backgroundColor:"$elevation1"},false:{backgroundColor:"$elevation3"}}},"> div":{position:"absolute",$flexCenter:"",borderStyle:"solid",borderWidth:1,borderColor:"$highlight1",backgroundColor:"$elevation3",width:"80%",height:"80%","&::after,&::before":{content:'""',position:"absolute",zindex:10,backgroundColor:"$highlight1"},"&::before":{width:"100%",height:1},"&::after":{height:"100%",width:1}},"> span":{position:"relative",zindex:100,width:10,height:10,backgroundColor:"$accent2",borderRadius:"50%"}});function qk({value:n,settings:e,onUpdate:t}){const s=y.useRef(),r=y.useRef(0),i=y.useRef(0),o=y.useRef(1),[a,c]=y.useState(!1),[l,u]=y.useState(!1),[h,d]=o0(),f=y.useRef(null),m=y.useRef(null);y.useLayoutEffect(()=>{if(a){const{top:O,left:L,width:j,height:q}=f.current.getBoundingClientRect();m.current.style.left=L+j/2+"px",m.current.style.top=O+q/2+"px"}},[a]);const{keys:[p,g],joystick:_}=e,x=_==="invertY"?1:-1,{[p]:{step:k},[g]:{step:v}}=e,b=Un("sizes","joystickWidth"),T=Un("sizes","joystickHeight"),E=parseFloat(b)*.8/2,w=parseFloat(T)*.8/2,C=y.useCallback(()=>{s.current||(u(!0),r.current&&d({x:r.current*E}),i.current&&d({y:i.current*-w}),s.current=window.setInterval(()=>{t(O=>{const L=k*r.current*o.current,j=x*v*i.current*o.current;return Array.isArray(O)?{[p]:O[0]+L,[g]:O[1]+j}:{[p]:O[p]+L,[g]:O[g]+j}})},16))},[E,w,t,d,k,v,p,g,x]),S=y.useCallback(()=>{window.clearTimeout(s.current),s.current=void 0,u(!1)},[]);y.useEffect(()=>{function O(L){o.current=Wp(L)}return window.addEventListener("keydown",O),window.addEventListener("keyup",O),()=>{window.clearTimeout(s.current),window.removeEventListener("keydown",O),window.removeEventListener("keyup",O)}},[]);const R=xo(({first:O,active:L,delta:[j,q],movement:[z,V]})=>{O&&c(!0);const U=bs(z,-E,E),X=bs(V,-w,w);r.current=Math.abs(z)>Math.abs(U)?Math.sign(z-U):0,i.current=Math.abs(V)>Math.abs(X)?Math.sign(X-V):0;let Z=n[p],Q=n[g];L?(r.current||(Z+=j*k*o.current,d({x:U})),i.current||(Q-=x*q*v*o.current,d({y:X})),r.current||i.current?C():S(),t({[p]:Z,[g]:Q})):(c(!1),r.current=0,i.current=0,d({x:0,y:0}),S())});return I.createElement(Bk,Ze({ref:f},R()),a&&I.createElement(Eu,null,I.createElement(Wk,{ref:m,isOutOfBounds:l},I.createElement("div",null),I.createElement("span",{ref:h}))))}const Hk=ce("div",{display:"grid",columnGap:"$colGap",variants:{withJoystick:{true:{gridTemplateColumns:"$sizes$rowHeight auto"},false:{gridTemplateColumns:"auto"}}}});function Yk(){const{label:n,displayValue:e,onUpdate:t,settings:s}=_t();return I.createElement(tn,{input:!0},I.createElement(fn,null,n),I.createElement(Hk,{withJoystick:!!s.joystick},s.joystick&&I.createElement(qk,{value:e,settings:s,onUpdate:t}),I.createElement(Su,{value:e,settings:s,onUpdate:t})))}const Gk=["joystick"],L0=d0(["x","y"]),Xk=n=>{let{joystick:e=!0}=n,t=Pe(n,Gk);const{value:s,settings:r}=L0.normalize(t);return{value:s,settings:de(de({},r),{},{joystick:e})}};var Zk=de(de({component:Yk},L0),{},{normalize:Xk});const Kk=n=>{if(n!==void 0){if(n instanceof File)try{return URL.createObjectURL(n)}catch{return}if(typeof n=="string"&&n.indexOf("blob:")===0)return n;throw Error("Invalid image format [undefined | blob | File].")}},Qk=(n,e)=>typeof e=="object"&&"image"in e,Jk=({image:n})=>({value:n});var eT=Object.freeze({__proto__:null,sanitize:Kk,schema:Qk,normalize:Jk});const tT=ce("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto 20px",columnGap:"$colGap",alignItems:"center"}),nT=ce("div",{$flexCenter:"",overflow:"hidden",height:"$rowHeight",background:"$elevation3",textAlign:"center",color:"inherit",borderRadius:"$sm",outline:"none",userSelect:"none",cursor:"pointer",$inputStyle:"",$hover:"",$focusWithin:"",$active:"$accent1 $elevation1",variants:{isDragAccept:{true:{$inputStyle:"$accent1",backgroundColor:"$elevation1"}}}}),sT=ce("div",{boxSizing:"border-box",borderRadius:"$sm",height:"$rowHeight",width:"$rowHeight",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center",variants:{hasImage:{true:{cursor:"pointer",$hover:"",$active:""}}}}),rT=ce("div",{$flexCenter:"",width:"$imagePreviewWidth",height:"$imagePreviewHeight",borderRadius:"$sm",boxShadow:"$level2",pointerEvents:"none",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center"}),iT=ce("div",{fontSize:"0.8em",height:"100%",padding:"$rowGap $md"}),oT=ce("div",{$flexCenter:"",top:"0",right:"0",marginRight:"$sm",height:"100%",cursor:"pointer",variants:{disabled:{true:{color:"$elevation3",cursor:"default"}}},"&::after,&::before":{content:'""',position:"absolute",height:2,width:10,borderRadius:1,backgroundColor:"currentColor"},"&::after":{transform:"rotate(45deg)"},"&::before":{transform:"rotate(-45deg)"}});function aT(){const{label:n,value:e,onUpdate:t,disabled:s}=_t(),{popinRef:r,wrapperRef:i,shown:o,show:a,hide:c}=N0(),l=y.useCallback(m=>{m.length&&t(m[0])},[t]),u=y.useCallback(m=>{m.stopPropagation(),t(void 0)},[t]),{getRootProps:h,getInputProps:d,isDragAccept:f}=R0({maxFiles:1,accept:"image/*",onDrop:l,disabled:s});return I.createElement(tn,{input:!0},I.createElement(fn,null,n),I.createElement(tT,null,I.createElement(sT,{ref:r,hasImage:!!e,onPointerDown:()=>!!e&&a(),onPointerUp:c,style:{backgroundImage:e?`url(${e})`:"none"}}),o&&!!e&&I.createElement(Eu,null,I.createElement(r0,{onPointerUp:c,style:{cursor:"pointer"}}),I.createElement(rT,{ref:i,style:{backgroundImage:`url(${e})`}})),I.createElement(nT,h({isDragAccept:f}),I.createElement("input",d()),I.createElement(iT,null,f?"drop image":"click or drop")),I.createElement(oT,{onClick:u,disabled:!e})))}var cT=de({component:aT},eT);const tf=St().number(),lT=(n,e)=>St().array().length(2).every.number().test(n)&&St().schema({min:tf,max:tf}).test(e),ka=n=>({min:n[0],max:n[1]}),j0=(n,{bounds:[e,t]},s)=>{const r=Array.isArray(n)?ka(n):n,i={min:s[0],max:s[1]},{min:o,max:a}=de(de({},i),r);return[bs(Number(o),e,Math.max(e,a)),bs(Number(a),Math.min(t,o),t)]},uT=({value:n,min:e,max:t})=>{const s={min:e,max:t},r=h0(ka(n),{min:s,max:s}),i=[e,t],o=de(de({},r),{},{bounds:i});return{value:j0(ka(n),o,n),settings:o}};var hT=Object.freeze({__proto__:null,schema:lT,format:ka,sanitize:j0,normalize:uT});const dT=["value","bounds","onDrag"],fT=["bounds"],pT=ce("div",{display:"grid",columnGap:"$colGap",gridTemplateColumns:"auto calc($sizes$numberInputMinWidth * 2 + $space$rowGap)"});function mT(n){let{value:e,bounds:[t,s],onDrag:r}=n,i=Pe(n,dT);const o=y.useRef(null),a=y.useRef(null),c=y.useRef(null),l=y.useRef(0),u=Un("sizes","scrubberWidth"),h=xo(({event:m,first:p,xy:[g],movement:[_],memo:x={}})=>{if(p){const{width:v,left:b}=o.current.getBoundingClientRect();l.current=v-parseFloat(u);const T=(m==null?void 0:m.target)===a.current||(m==null?void 0:m.target)===c.current;x.pos=ya((g-b)/v,t,s);const E=Math.abs(x.pos-e.min)-Math.abs(x.pos-e.max);x.key=E<0||E===0&&x.pos<=e.min?"min":"max",T&&(x.pos=e[x.key])}const k=x.pos+ya(_/l.current,0,s-t);return r({[x.key]:Ub(k,i[x.key])}),x}),d=`calc(${_a(e.min,t,s)} * (100% - ${u} - 8px) + 4px)`,f=`calc(${1-_a(e.max,t,s)} * (100% - ${u} - 8px) + 4px)`;return I.createElement(c0,Ze({ref:o},h()),I.createElement(a0,null,I.createElement(l0,{style:{left:d,right:f}})),I.createElement(wl,{position:"left",ref:a,style:{left:d}}),I.createElement(wl,{position:"right",ref:c,style:{right:f}}))}function gT(){const{label:n,displayValue:e,onUpdate:t,settings:s}=_t(),r=Pe(s,fT);return I.createElement(I.Fragment,null,I.createElement(tn,{input:!0},I.createElement(fn,null,n),I.createElement(pT,null,I.createElement(mT,Ze({value:e},s,{onDrag:t})),I.createElement(Su,{value:e,settings:r,onUpdate:t,innerLabelTrim:0}))))}var _T=de({component:gT},hT);const yT=()=>{const n=new Map;return{on:(e,t)=>{let s=n.get(e);s===void 0&&(s=new Set,n.set(e,s)),s.add(t)},off:(e,t)=>{const s=n.get(e);s!==void 0&&(s.delete(t),s.size===0&&n.delete(e))},emit:(e,...t)=>{const s=n.get(e);if(s!==void 0)for(const r of s)r(...t)}}},vT=["type","value"],bT=["onChange","transient","onEditStart","onEditEnd"],xT=function(){const e=zw(Uw(()=>({data:{}}))),t=yT();this.storeId=Qv(),this.useStore=e;const s={},r=new Set;this.getVisiblePaths=()=>{const o=this.getData(),a=Object.keys(o),c=[];Object.entries(s).forEach(([u,h])=>{h.render&&a.some(d=>d.indexOf(u)===0)&&!h.render(this.get)&&c.push(u+".")});const l=[];return r.forEach(u=>{u in o&&o[u].__refCount>0&&c.every(h=>u.indexOf(h)===-1)&&(!o[u].render||o[u].render(this.get))&&l.push(u)}),l},this.setOrderedPaths=o=>{o.forEach(a=>r.add(a))},this.orderPaths=o=>(this.setOrderedPaths(o),o),this.disposePaths=o=>{e.setState(a=>{const c=a.data;return o.forEach(l=>{if(l in c){const u=c[l];u.__refCount--,u.__refCount===0&&u.type in cn&&delete c[l]}}),{data:c}})},this.dispose=()=>{e.setState(()=>({data:{}}))},this.getFolderSettings=o=>s[o]||{},this.getData=()=>e.getState().data,this.addData=(o,a)=>{e.setState(c=>{const l=c.data;return Object.entries(o).forEach(([u,h])=>{let d=l[u];if(d){const{type:f,value:m}=h,p=Pe(h,vT);f!==d.type?zn(We.INPUT_TYPE_OVERRIDE,f):((d.__refCount===0||a)&&Object.assign(d,p),d.__refCount++)}else l[u]=de(de({},h),{},{__refCount:1})}),{data:l}})},this.setValueAtPath=(o,a,c)=>{e.setState(l=>{const u=l.data;return Td(u[o],a,o,this,c),{data:u}})},this.setSettingsAtPath=(o,a)=>{e.setState(c=>{const l=c.data;return l[o].settings=de(de({},l[o].settings),a),{data:l}})},this.disableInputAtPath=(o,a)=>{e.setState(c=>{const l=c.data;return l[o].disabled=a,{data:l}})},this.set=(o,a)=>{e.setState(c=>{const l=c.data;return Object.entries(o).forEach(([u,h])=>{try{Td(l[u],h,void 0,void 0,a)}catch{}}),{data:l}})},this.getInput=o=>{try{return this.getData()[o]}catch{zn(We.PATH_DOESNT_EXIST,o)}},this.get=o=>{var a;return(a=this.getInput(o))===null||a===void 0?void 0:a.value},this.emitOnEditStart=o=>{t.emit(`onEditStart:${o}`,this.get(o),o,de(de({},this.getInput(o)),{},{get:this.get}))},this.emitOnEditEnd=o=>{t.emit(`onEditEnd:${o}`,this.get(o),o,de(de({},this.getInput(o)),{},{get:this.get}))},this.subscribeToEditStart=(o,a)=>{const c=`onEditStart:${o}`;return t.on(c,a),()=>t.off(c,a)},this.subscribeToEditEnd=(o,a)=>{const c=`onEditEnd:${o}`;return t.on(c,a),()=>t.off(c,a)};const i=(o,a,c)=>{const l={};return Object.entries(o).forEach(([u,h])=>{if(u==="")return zn(We.EMPTY_KEY);let d=Iu(a,u);if(h.type===cn.FOLDER){const f=i(h.schema,d,c);Object.assign(l,f),d in s||(s[d]=h.settings)}else if(u in c)zn(We.DUPLICATE_KEYS,u,d,c[u].path);else{const f=ob(h,u,d,l);if(f){const{type:m,options:p,input:g}=f,{onChange:_,transient:x,onEditStart:k,onEditEnd:v}=p,b=Pe(p,bT);l[d]=de(de(de({type:m},b),g),{},{fromPanel:!0}),c[u]={path:d,onChange:_,transient:x,onEditStart:k,onEditEnd:v}}else zn(We.UNKNOWN_INPUT,d,h)}}),l};this.getDataFromSchema=o=>{const a={};return[i(o,"",a),a]}},V0=new xT,wT={collapsed:!1};function kT(n,e){return{type:cn.FOLDER,schema:n,settings:de(de({},wT),e)}}const nf=n=>"__levaInput"in n,TT=(n,e)=>{const t={},s=e?e.toLowerCase():null;return n.forEach(r=>{const[i,o]=Tk(r);(!s||i.toLowerCase().indexOf(s)>-1)&&kk(t,o,{[i]:{__levaInput:!0,path:r}})}),t},ET=["type","label","path","valueKey","value","settings","setValue","disabled"];function CT(n){let{type:e,label:t,path:s,valueKey:r,value:i,settings:o,setValue:a,disabled:c}=n,l=Pe(n,ET);const{displayValue:u,onChange:h,onUpdate:d}=i0({type:e,value:i,settings:o,setValue:a}),f=Zs[e].component;return f?I.createElement(Xp.Provider,{value:de({key:r,path:s,id:""+s,label:t,displayValue:u,value:i,onChange:h,onUpdate:d,settings:o,setValue:a,disabled:c},l)},I.createElement(Cb,{disabled:c},I.createElement(f,null))):(zn(We.NO_COMPONENT_FOR_TYPE,e,s),null)}const ST=ce("button",{display:"block",$reset:"",fontWeight:"$button",height:"$rowHeight",borderStyle:"none",borderRadius:"$sm",backgroundColor:"$elevation1",color:"$highlight1","&:not(:disabled)":{color:"$highlight3",backgroundColor:"$accent2",cursor:"pointer",$hover:"$accent3",$active:"$accent3 $accent1",$focus:""}});function OT({onClick:n,settings:e,label:t}){const s=bo();return I.createElement(tn,null,I.createElement(ST,{disabled:e.disabled,onClick:()=>n(s.get)},t))}const AT=ce("div",{$flex:"",justifyContent:"flex-end",gap:"$colGap"}),PT=ce("button",{$reset:"",cursor:"pointer",borderRadius:"$xs","&:hover":{backgroundColor:"$elevation3"}}),RT=({label:n,opts:e})=>{let t=typeof n=="string"&&n.trim()===""?null:n,s=e;return typeof e.opts=="object"&&(s.label!==void 0&&(t=e.label),s=e.opts),{label:t,opts:s}};function DT(n){const{label:e,opts:t}=RT(n),s=bo();return I.createElement(tn,{input:!!e},e&&I.createElement(fn,null,e),I.createElement(AT,null,Object.entries(t).map(([r,i])=>I.createElement(PT,{key:r,onClick:()=>i(s.get)},r))))}const MT=ce("canvas",{height:"$monitorHeight",width:"100%",display:"block",borderRadius:"$sm"}),z0=100;function IT(n,e){n.push(e),n.length>z0&&n.shift()}const NT=y.forwardRef(function({initialValue:n},e){const t=Un("colors","highlight3"),s=Un("colors","elevation2"),r=Un("colors","highlight1"),[i,o]=y.useMemo(()=>[vt(r).alpha(.4).toRgbString(),vt(r).alpha(.1).toRgbString()],[r]),a=y.useRef([n]),c=y.useRef(n),l=y.useRef(n),u=y.useRef(),h=y.useCallback((m,p)=>{if(!m)return;const{width:g,height:_}=m,x=new Path2D,k=g/z0,v=_*.05;for(let E=0;E({frame:m=>{(c.current===void 0||ml.current)&&(l.current=m),IT(a.current,m),u.current=requestAnimationFrame(()=>h(d.current,f.current))}}),[d,f,h]),y.useEffect(()=>()=>cancelAnimationFrame(u.current),[]),I.createElement(MT,{ref:d})}),sf=n=>Number.isFinite(n)?n.toPrecision(2):n.toString(),$T=y.forwardRef(function({initialValue:n},e){const[t,s]=y.useState(sf(n));return y.useImperativeHandle(e,()=>({frame:r=>s(sf(r))}),[]),I.createElement("div",null,t)});function rf(n){return typeof n=="function"?n():n.current}function FT({label:n,objectOrFn:e,settings:t}){const s=y.useRef(),r=y.useRef(rf(e));return y.useEffect(()=>{const i=window.setInterval(()=>{var o;document.hidden||(o=s.current)===null||o===void 0||o.frame(rf(e))},t.interval);return()=>window.clearInterval(i)},[e,t.interval]),I.createElement(tn,{input:!0},I.createElement(fn,{align:"top"},n),t.graph?I.createElement(NT,{ref:s,initialValue:r.current}):I.createElement($T,{ref:s,initialValue:r.current}))}const LT=["type","label","key"],jT={[cn.BUTTON]:OT,[cn.BUTTON_GROUP]:DT,[cn.MONITOR]:FT},VT=I.memo(({path:n})=>{const[e,{set:t,setSettings:s,disable:r,storeId:i,emitOnEditStart:o,emitOnEditEnd:a}]=Fb(n);if(!e)return null;const{type:c,label:l,key:u}=e,h=Pe(e,LT);if(c in cn){const d=jT[c];return I.createElement(d,Ze({label:l,path:n},h))}return c in Zs?I.createElement(CT,Ze({key:i+n,type:c,label:l,storeId:i,path:n,valueKey:u,setValue:t,setSettings:s,disable:r,emitOnEditStart:o,emitOnEditEnd:a},h)):(Wv(We.UNSUPPORTED_INPUT,c,n),null)});function zT({toggle:n,toggled:e,name:t}){return I.createElement(kb,{onClick:()=>n()},I.createElement(Cu,{toggled:e}),I.createElement("div",null,t))}const UT=({name:n,path:e,tree:t})=>{const s=bo(),r=Iu(e,n),{collapsed:i,color:o}=s.getFolderSettings(r),[a,c]=y.useState(!i),l=y.useRef(null),u=Un("colors","folderWidgetColor"),h=Un("colors","folderTextColor");return y.useLayoutEffect(()=>{l.current.style.setProperty("--leva-colors-folderWidgetColor",o||u),l.current.style.setProperty("--leva-colors-folderTextColor",o||h)},[o,u,h]),I.createElement(va,{ref:l},I.createElement(zT,{name:n,toggled:a,toggle:()=>c(d=>!d)}),I.createElement(U0,{parent:r,tree:t,toggled:a}))},U0=I.memo(({isRoot:n=!1,fill:e=!1,flat:t=!1,parent:s,tree:r,toggled:i})=>{const{wrapperRef:o,contentRef:a}=Sk(i),c=bo(),l=([h,d])=>{var f;return(nf(d)?(f=c.getInput(d.path))===null||f===void 0?void 0:f.order:c.getFolderSettings(Iu(s,h)).order)||0},u=Object.entries(r).sort((h,d)=>l(h)-l(d));return I.createElement(bl,{ref:o,isRoot:n,fill:e,flat:t},I.createElement(t0,{ref:a,isRoot:n,toggled:i},u.map(([h,d])=>nf(d)?I.createElement(VT,{key:d.path,valueKey:d.valueKey,path:d.path}):I.createElement(UT,{key:h,name:h,path:s,tree:d}))))}),BT=ce("div",{position:"relative",fontFamily:"$mono",fontSize:"$root",color:"$rootText",backgroundColor:"$elevation1",variants:{fill:{false:{position:"fixed",top:"10px",right:"10px",zIndex:1e3,width:"$rootWidth"},true:{position:"relative",width:"100%"}},flat:{false:{borderRadius:"$lg",boxShadow:"$level1"}},oneLineLabels:{true:{[`${s0}`]:{gridTemplateColumns:"auto",gridAutoColumns:"minmax(max-content, 1fr)",gridAutoRows:"minmax($sizes$rowHeight), auto)",rowGap:0,columnGap:0,marginTop:"$rowGap"}}},hideTitleBar:{true:{$$titleBarHeight:"0px"},false:{$$titleBarHeight:"$sizes$titleBarHeight"}}},"&,*,*:after,*:before":{boxSizing:"border-box"},"*::selection":{backgroundColor:"$accent2"}}),B0=40,Ta=ce("i",{$flexCenter:"",width:B0,userSelect:"none",cursor:"pointer","> svg":{fill:"$highlight1",transition:"transform 350ms ease, fill 250ms ease"},"&:hover > svg":{fill:"$highlight3"},variants:{active:{true:{"> svg":{fill:"$highlight2"}}}}}),WT=ce("div",{display:"flex",alignItems:"stretch",justifyContent:"space-between",height:"$titleBarHeight",variants:{mode:{drag:{cursor:"grab"}}}}),qT=ce("div",{$flex:"",position:"relative",width:"100%",overflow:"hidden",transition:"height 250ms ease",color:"$highlight3",paddingLeft:"$md",[`> ${Ta}`]:{height:30},variants:{toggled:{true:{height:30},false:{height:0}}}}),HT=ce("input",{$reset:"",flex:1,position:"relative",height:30,width:"100%",backgroundColor:"transparent",fontSize:"10px",borderRadius:"$root","&:focus":{},"&::placeholder":{color:"$highlight2"}}),YT=ce("div",{touchAction:"none",$flexCenter:"",flex:1,"> svg":{fill:"$highlight1"},color:"$highlight1",variants:{drag:{true:{$draggable:"","> svg":{transition:"fill 250ms ease"},"&:hover":{color:"$highlight3"},"&:hover > svg":{fill:"$highlight3"}}},filterEnabled:{false:{paddingRight:B0}}}}),GT=I.forwardRef(({setFilter:n,toggle:e},t)=>{const[s,r]=y.useState(""),i=y.useMemo(()=>Bp(n,250),[n]),o=()=>{n(""),r("")},a=c=>{const l=c.currentTarget.value;e(!0),r(l)};return y.useEffect(()=>{i(s)},[s,i]),I.createElement(I.Fragment,null,I.createElement(HT,{ref:t,value:s,placeholder:"[Open filter with CMD+SHIFT+L]",onPointerDown:c=>c.stopPropagation(),onChange:a}),I.createElement(Ta,{onClick:()=>o(),style:{visibility:s?"visible":"hidden"}},I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"14",width:"14",viewBox:"0 0 20 20",fill:"currentColor"},I.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))))});function XT({setFilter:n,onDrag:e,onDragStart:t,onDragEnd:s,toggle:r,toggled:i,title:o,drag:a,filterEnabled:c,from:l}){const[u,h]=y.useState(!1),d=y.useRef(null);y.useEffect(()=>{var m,p;u?(m=d.current)===null||m===void 0||m.focus():(p=d.current)===null||p===void 0||p.blur()},[u]);const f=xo(({offset:[m,p],first:g,last:_})=>{e({x:m,y:p}),g&&t({x:m,y:p}),_&&s({x:m,y:p})},{filterTaps:!0,from:({offset:[m,p]})=>[(l==null?void 0:l.x)||m,(l==null?void 0:l.y)||p]});return y.useEffect(()=>{const m=p=>{p.key==="L"&&p.shiftKey&&p.metaKey&&h(g=>!g)};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[]),I.createElement(I.Fragment,null,I.createElement(WT,{mode:a?"drag":void 0},I.createElement(Ta,{active:!i,onClick:()=>r()},I.createElement(Cu,{toggled:i,width:12,height:8})),I.createElement(YT,Ze({},a?f():{},{drag:a,filterEnabled:c}),o===void 0&&a?I.createElement("svg",{width:"20",height:"10",viewBox:"0 0 28 14",xmlns:"http://www.w3.org/2000/svg"},I.createElement("circle",{cx:"2",cy:"2",r:"2"}),I.createElement("circle",{cx:"14",cy:"2",r:"2"}),I.createElement("circle",{cx:"26",cy:"2",r:"2"}),I.createElement("circle",{cx:"2",cy:"12",r:"2"}),I.createElement("circle",{cx:"14",cy:"12",r:"2"}),I.createElement("circle",{cx:"26",cy:"12",r:"2"})):o),c&&I.createElement(Ta,{active:u,onClick:()=>h(m=>!m)},I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",viewBox:"0 0 20 20"},I.createElement("path",{d:"M9 9a2 2 0 114 0 2 2 0 01-4 0z"}),I.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-13a4 4 0 00-3.446 6.032l-2.261 2.26a1 1 0 101.414 1.415l2.261-2.261A4 4 0 1011 5z",clipRule:"evenodd"})))),I.createElement(qT,{toggled:u},I.createElement(GT,{ref:d,setFilter:n,toggle:r})))}const ZT=["store","hidden","theme","collapsed"];function KT(n){let{store:e,hidden:t=!1,theme:s,collapsed:r=!1}=n,i=Pe(n,ZT);const o=I0(()=>_b(s),[s]),[a,c]=y.useState(!r),l=typeof r=="object"?!r.collapsed:a,u=y.useMemo(()=>typeof r=="object"?h=>{typeof h=="function"?r.onChange(!h(!r.collapsed)):r.onChange(!h)}:c,[r]);return!e||t?null:I.createElement(ku.Provider,{value:o},I.createElement(QT,Ze({store:e},i,{toggled:l,setToggle:u,rootClass:o.className})))}const QT=I.memo(({store:n,rootClass:e,fill:t=!1,flat:s=!1,neverHide:r=!1,oneLineLabels:i=!1,titleBar:o={title:void 0,drag:!0,filter:!0,position:void 0,onDrag:void 0,onDragStart:void 0,onDragEnd:void 0},hideCopyButton:a=!1,toggled:c,setToggle:l})=>{var u,h;const d=Ok(n),[f,m]=y.useState(""),p=y.useMemo(()=>TT(d,f),[d,f]),[g,_]=o0(),x=r||d.length>0,k=typeof o=="object"&&o.title||void 0,v=typeof o=="object"&&(u=o.drag)!==null&&u!==void 0?u:!0,b=typeof o=="object"&&(h=o.filter)!==null&&h!==void 0?h:!0,T=typeof o=="object"&&o.position||void 0,E=typeof o=="object"&&o.onDrag||void 0,w=typeof o=="object"&&o.onDragStart||void 0,C=typeof o=="object"&&o.onDragEnd||void 0;return I.useEffect(()=>{_({x:T==null?void 0:T.x,y:T==null?void 0:T.y})},[T,_]),gb(),I.createElement(Kp.Provider,{value:{hideCopyButton:a}},I.createElement(BT,{ref:g,className:e,fill:t,flat:s,oneLineLabels:i,hideTitleBar:!o,style:{display:x?"block":"none"}},o&&I.createElement(XT,{onDrag:S=>{_(S),E==null||E(S)},onDragStart:S=>w==null?void 0:w(S),onDragEnd:S=>C==null?void 0:C(S),setFilter:m,toggle:S=>l(R=>S??!R),toggled:c,title:k,drag:v,filterEnabled:b,from:T}),x&&I.createElement(Zp.Provider,{value:n},I.createElement(U0,{isRoot:!0,fill:t,flat:s,tree:p,toggled:c}))))}),JT=["isRoot"];let Ea=!1,js=null;function W0(n){let{isRoot:e=!1}=n,t=Pe(n,JT);return y.useEffect(()=>(Ea=!0,!e&&js&&(js.remove(),js=null),()=>{e||(Ea=!1)}),[e]),I.createElement(KT,Ze({store:V0},t))}function eE(n){y.useEffect(()=>{n&&!Ea&&(js||(js=document.getElementById("leva__root")||Object.assign(document.createElement("div"),{id:"leva__root"}),document.body&&(document.body.appendChild(js),cb(I.createElement(W0,{isRoot:!0}),js))),Ea=!0)},[n])}function tE(n,e,t,s,r){let i,o,a,c,l;return typeof n=="string"?(o=n,i=e,Array.isArray(t)?l=t:t&&("store"in t?(c=t,l=s):(a=t,Array.isArray(s)?l=s:(c=s,l=r)))):(i=n,Array.isArray(e)?l=e:(c=e,l=t)),{schema:i,folderName:o,folderSettings:a,hookSettings:c,deps:l||[]}}function nE(n,e,t,s,r){const{folderName:i,schema:o,folderSettings:a,hookSettings:c,deps:l}=tE(n,e,t,s,r),u=typeof o=="function",h=y.useRef(!1),d=y.useRef(!0),f=I0(()=>{h.current=!0;const R=typeof o=="function"?o():o;return i?{[i]:kT(R,a)}:R},l),m=!(c!=null&&c.store);eE(m);const[p]=y.useState(()=>(c==null?void 0:c.store)||V0),[g,_]=y.useMemo(()=>p.getDataFromSchema(f),[p,f]),[x,k,v,b,T]=y.useMemo(()=>{const R=[],O=[],L={},j={},q={};return Object.values(_).forEach(({path:z,onChange:V,onEditStart:U,onEditEnd:X,transient:Z})=>{R.push(z),V?(L[z]=V,Z||O.push(z)):O.push(z),U&&(j[z]=U),X&&(q[z]=X)}),[R,O,L,j,q]},[_]),E=y.useMemo(()=>p.orderPaths(x),[x,p]),w=Ak(p,k,g),C=y.useCallback(R=>{const O=Object.entries(R).reduce((L,[j,q])=>Object.assign(L,{[_[j].path]:q}),{});p.set(O,!1)},[p,_]),S=y.useCallback(R=>p.get(_[R].path),[p,_]);return y.useEffect(()=>{const R=!d.current&&h.current;return p.addData(g,R),d.current=!1,h.current=!1,()=>p.disposePaths(E)},[p,E,g]),y.useEffect(()=>{const R=[];return Object.entries(v).forEach(([O,L])=>{L(p.get(O),O,de({initial:!0,get:p.get},p.getInput(O)));const j=p.useStore.subscribe(q=>{const z=q.data[O];return[z.disabled?void 0:z.value,z]},([q,z])=>L(q,O,de({initial:!1,get:p.get},z)),{equalityFn:vo});R.push(j)}),()=>R.forEach(O=>O())},[p,v]),y.useEffect(()=>{const R=[];return Object.entries(b).forEach(([O,L])=>R.push(p.subscribeToEditStart(O,L))),Object.entries(T).forEach(([O,L])=>R.push(p.subscribeToEditEnd(O,L))),()=>R.forEach(O=>O())},[b,T,p]),u?[w,C,S]:w}ts(un.SELECT,ex);ts(un.IMAGE,cT);ts(un.NUMBER,Wb);ts(un.COLOR,Vk);ts(un.STRING,lx);ts(un.BOOLEAN,gx);ts(un.INTERVAL,_T);ts(un.VECTOR3D,Uk);ts(un.VECTOR2D,Zk);const sE={isUserDragging:!1,isUserScrolling:!1,userMovedCamera:!1,isUserScrollingOnHtmlPanel:!1},fs=Zf(n=>({...sE,setIsUserDragging:e=>n({isUserDragging:e}),setIsUserScrolling:e=>n({isUserScrolling:e}),setUserMovedCamera:e=>n({userMovedCamera:e}),setIsUserScrollingOnHtmlPanel:e=>n({isUserScrollingOnHtmlPanel:e})})),rE=()=>{const[n,e]=y.useState(""),t=y.useRef(null),{fetchData:s,setAbortRequests:r,seedQuestions:i}=Os(v=>v),[o]=Qf(v=>[v.setBudget]),{setUniverseQuestionIsOpen:a,setSidebarOpen:c,setShowCollapseButton:l}=mo(v=>({setUniverseQuestionIsOpen:v.setUniverseQuestionIsOpen,setSidebarOpen:v.setSidebarOpen,setShowCollapseButton:v.setShowCollapseButton})),u=d_(v=>v.resetAiSummaryAnswer),[h,d]=y.useState([]);y.useEffect(()=>{i&&d(x(i).slice(0,4))},[i]),y.useEffect(()=>{t.current&&t.current.focus()},[]);const f=async v=>{v&&(u(),a(),c(!0),l(!0)),await s(o,r,v)},m=!!n.trim().length,p=async v=>{v.keyCode===13&&v.shiftKey===!1&&m&&(v.preventDefault(),f(n))},g=async v=>{e(v),await f(v)},_=()=>{a(),c(!0),l(!0)},x=v=>{const b=[...v];let T=b.length-1;for(;T>0;){const E=Math.floor(Math.random()*(T+1));[b[T],b[E]]=[b[E],b[T]],T-=1}return b},k=!!n&&n.trim().length>0;return B.jsxs(aE,{children:["Ideas have shapes",B.jsxs(oE,{onKeyDown:p,py:12,tabIndex:-1,children:[B.jsx(iE,{ref:t,onChange:v=>e(v.target.value),placeholder:"What do you want to know?",value:n}),B.jsx(cE,{color:"secondary",disabled:!k,onClick:()=>f(n),variant:"contained",children:k?B.jsxs(B.Fragment,{children:["Search ",B.jsx(Ph,{})]}):B.jsx(Ph,{})})]}),h.length>0&&B.jsx(uE,{children:h.map(v=>B.jsxs(hE,{onClick:()=>g(v),children:[B.jsx(D_,{}),v]},v))}),B.jsx(lE,{"data-testid":"explore-graph-btn",onClick:_,startIcon:B.jsx(M_,{}),children:"Explore Graph"})]})},iE=Ke(Z_).attrs({maxRows:3})` + */var yk=uk,vk=pk,Zd=M0,Kd=_k,bk=function(n,e,t){if(!Kd(n)||(Array.isArray(e)&&(e=[].concat.apply([],e).join(".")),typeof e!="string"))return n;for(var s=yk(e,{sep:".",brackets:!0}).filter(xk),r=s.length,i=-1,o=n;++in.filter(Boolean).join(".");function Ek(n){const e=n.split(".");return[e.pop(),e.join(".")||void 0]}function Ck(n,e){return Object.entries(eb(n,e)).reduce((t,[,{value:s,disabled:r,key:i}])=>(t[i]=r?void 0:s,t),{})}function Sk(n,e){const t=y.useRef();return(e?ji:vo)(n,t.current)||(t.current=n),t.current}function N0(n,e){return y.useMemo(n,Sk(e,!0))}function Ok(n){const e=y.useRef(null),t=y.useRef(null),s=y.useRef(!0);return y.useLayoutEffect(()=>{n||(e.current.style.height="0px",e.current.style.overflow="hidden")},[]),y.useEffect(()=>{if(s.current){s.current=!1;return}let r;const i=e.current,o=()=>{n&&(i.style.removeProperty("height"),i.style.removeProperty("overflow"),t.current.scrollIntoView({behavior:"smooth",block:"nearest"}))};i.addEventListener("transitionend",o,{once:!0});const{height:a}=t.current.getBoundingClientRect();return i.style.height=a+"px",n||(i.style.overflow="hidden",r=window.setTimeout(()=>i.style.height="0px",50)),()=>{i.removeEventListener("transitionend",o),clearTimeout(r)}},[n]),{wrapperRef:e,contentRef:t}}const Ak=n=>{const[e,t]=y.useState(n.getVisiblePaths());return y.useEffect(()=>{t(n.getVisiblePaths());const s=n.useStore.subscribe(n.getVisiblePaths,t,{equalityFn:vo});return()=>s()},[n]),e};function Pk(n,e,t){return n.useStore(r=>{const i=de(de({},t),r.data);return Ck(i,e)},vo)}function $0(n=3){const e=y.useRef(null),t=y.useRef(null),[s,r]=y.useState(!1),i=y.useCallback(()=>r(!0),[]),o=y.useCallback(()=>r(!1),[]);return y.useLayoutEffect(()=>{if(s){const{bottom:a,top:c,left:l}=e.current.getBoundingClientRect(),{height:u}=t.current.getBoundingClientRect(),h=a+u>window.innerHeight-40?"up":"down";t.current.style.position="fixed",t.current.style.zIndex="10000",t.current.style.left=l+"px",h==="down"?t.current.style.top=a+n+"px":t.current.style.bottom=window.innerHeight-c+n+"px"}},[n,s]),{popinRef:e,wrapperRef:t,shown:s,show:i,hide:o}}Fx([Lx]);const Rk={rgb:"toRgb",hsl:"toHsl",hsv:"toHsv",hex:"toHex"};St.extend({color:()=>n=>vt(n).isValid()});const Dk=n=>St().color().test(n);function F0(n,{format:e,hasAlpha:t,isString:s}){const r=Rk[e]+(s&&e!=="hex"?"String":""),i=n[r]();return typeof i=="object"&&!t?tb(i,["a"]):i}const L0=(n,e)=>{const t=vt(n);if(!t.isValid())throw Error("Invalid color");return F0(t,e)},Mk=(n,e)=>F0(vt(n),de(de({},e),{},{isString:!0,format:"hex"})),Ik=({value:n})=>{const e=$x(n),t=e==="name"?"hex":e,s=typeof n=="object"?"a"in n:e==="hex"&&n.length===8||/^(rgba)|(hsla)|(hsva)/.test(n),r={format:t,hasAlpha:s,isString:typeof n=="string"};return{value:L0(n,r),settings:r}};var Nk=Object.freeze({__proto__:null,schema:Dk,sanitize:L0,format:Mk,normalize:Ik});const $k=ce("div",{position:"relative",boxSizing:"border-box",borderRadius:"$sm",overflow:"hidden",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",backgroundColor:"#fff",backgroundImage:`url('data:image/svg+xml;charset=utf-8,')`,$inputStyle:"",$hover:"",zIndex:1,variants:{active:{true:{$inputStyle:"$accent1"}}},"&::before":{content:'""',position:"absolute",top:0,bottom:0,right:0,left:0,backgroundColor:"currentColor",zIndex:1}}),Fk=ce("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto",columnGap:"$colGap",alignItems:"center"}),Lk=ce("div",{width:"$colorPickerWidth",height:"$colorPickerHeight",".react-colorful":{width:"100%",height:"100%",boxShadow:"$level2",cursor:"crosshair"},".react-colorful__saturation":{borderRadius:"$sm $sm 0 0"},".react-colorful__alpha, .react-colorful__hue":{height:10},".react-colorful__last-control":{borderRadius:"0 0 $sm $sm"},".react-colorful__pointer":{height:12,width:12}});function ef(n,e){return e!=="rgb"?vt(n).toRgb():n}function jk({value:n,displayValue:e,settings:t,onUpdate:s}){const{emitOnEditStart:r,emitOnEditEnd:i}=_t(),{format:o,hasAlpha:a}=t,{popinRef:c,wrapperRef:l,shown:u,show:h,hide:d}=$0(),f=y.useRef(0),[m,p]=y.useState(()=>ef(n,o)),g=a?qx:Yx,_=()=>{p(ef(n,o)),h(),r()},w=()=>{d(),i(),window.clearTimeout(f.current)},k=()=>{f.current=window.setTimeout(w,500)};return y.useEffect(()=>()=>window.clearTimeout(f.current),[]),M.createElement(M.Fragment,null,M.createElement($k,{ref:c,active:u,onClick:()=>_(),style:{color:e}}),u&&M.createElement(Tu,null,M.createElement(i0,{onPointerUp:w}),M.createElement(Lk,{ref:l,onMouseEnter:()=>window.clearTimeout(f.current),onMouseLeave:b=>b.buttons===0&&k()},M.createElement(g,{color:m,onChange:s}))))}function Vk(){const{value:n,displayValue:e,label:t,onChange:s,onUpdate:r,settings:i}=_t();return M.createElement(tn,{input:!0},M.createElement(fn,null,t),M.createElement(Fk,null,M.createElement(jk,{value:n,displayValue:e,onChange:s,onUpdate:r,settings:i}),M.createElement(ku,{value:e,onChange:s,onUpdate:r})))}var zk=de({component:Vk},Nk);function Uk(){const{label:n,displayValue:e,onUpdate:t,settings:s}=_t();return M.createElement(tn,{input:!0},M.createElement(fn,null,n),M.createElement(Cu,{value:e,settings:s,onUpdate:t}))}var Bk=de({component:Uk},f0(["x","y","z"]));const Wk=ce("div",{$flexCenter:"",position:"relative",backgroundColor:"$elevation3",borderRadius:"$sm",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",touchAction:"none",$draggable:"",$hover:"","&:active":{cursor:"none"},"&::after":{content:'""',backgroundColor:"$accent2",height:4,width:4,borderRadius:2}}),qk=ce("div",{$flexCenter:"",width:"$joystickWidth",height:"$joystickHeight",borderRadius:"$sm",boxShadow:"$level2",position:"fixed",zIndex:1e4,overflow:"hidden",$draggable:"",transform:"translate(-50%, -50%)",variants:{isOutOfBounds:{true:{backgroundColor:"$elevation1"},false:{backgroundColor:"$elevation3"}}},"> div":{position:"absolute",$flexCenter:"",borderStyle:"solid",borderWidth:1,borderColor:"$highlight1",backgroundColor:"$elevation3",width:"80%",height:"80%","&::after,&::before":{content:'""',position:"absolute",zindex:10,backgroundColor:"$highlight1"},"&::before":{width:"100%",height:1},"&::after":{height:"100%",width:1}},"> span":{position:"relative",zindex:100,width:10,height:10,backgroundColor:"$accent2",borderRadius:"50%"}});function Hk({value:n,settings:e,onUpdate:t}){const s=y.useRef(),r=y.useRef(0),i=y.useRef(0),o=y.useRef(1),[a,c]=y.useState(!1),[l,u]=y.useState(!1),[h,d]=a0(),f=y.useRef(null),m=y.useRef(null);y.useLayoutEffect(()=>{if(a){const{top:O,left:L,width:j,height:W}=f.current.getBoundingClientRect();m.current.style.left=L+j/2+"px",m.current.style.top=O+W/2+"px"}},[a]);const{keys:[p,g],joystick:_}=e,w=_==="invertY"?1:-1,{[p]:{step:k},[g]:{step:b}}=e,v=Un("sizes","joystickWidth"),T=Un("sizes","joystickHeight"),E=parseFloat(v)*.8/2,x=parseFloat(T)*.8/2,C=y.useCallback(()=>{s.current||(u(!0),r.current&&d({x:r.current*E}),i.current&&d({y:i.current*-x}),s.current=window.setInterval(()=>{t(O=>{const L=k*r.current*o.current,j=w*b*i.current*o.current;return Array.isArray(O)?{[p]:O[0]+L,[g]:O[1]+j}:{[p]:O[p]+L,[g]:O[g]+j}})},16))},[E,x,t,d,k,b,p,g,w]),S=y.useCallback(()=>{window.clearTimeout(s.current),s.current=void 0,u(!1)},[]);y.useEffect(()=>{function O(L){o.current=qp(L)}return window.addEventListener("keydown",O),window.addEventListener("keyup",O),()=>{window.clearTimeout(s.current),window.removeEventListener("keydown",O),window.removeEventListener("keyup",O)}},[]);const R=xo(({first:O,active:L,delta:[j,W],movement:[B,V]})=>{O&&c(!0);const z=bs(B,-E,E),X=bs(V,-x,x);r.current=Math.abs(B)>Math.abs(z)?Math.sign(B-z):0,i.current=Math.abs(V)>Math.abs(X)?Math.sign(X-V):0;let K=n[p],J=n[g];L?(r.current||(K+=j*k*o.current,d({x:z})),i.current||(J-=w*W*b*o.current,d({y:X})),r.current||i.current?C():S(),t({[p]:K,[g]:J})):(c(!1),r.current=0,i.current=0,d({x:0,y:0}),S())});return M.createElement(Wk,Ze({ref:f},R()),a&&M.createElement(Tu,null,M.createElement(qk,{ref:m,isOutOfBounds:l},M.createElement("div",null),M.createElement("span",{ref:h}))))}const Yk=ce("div",{display:"grid",columnGap:"$colGap",variants:{withJoystick:{true:{gridTemplateColumns:"$sizes$rowHeight auto"},false:{gridTemplateColumns:"auto"}}}});function Gk(){const{label:n,displayValue:e,onUpdate:t,settings:s}=_t();return M.createElement(tn,{input:!0},M.createElement(fn,null,n),M.createElement(Yk,{withJoystick:!!s.joystick},s.joystick&&M.createElement(Hk,{value:e,settings:s,onUpdate:t}),M.createElement(Cu,{value:e,settings:s,onUpdate:t})))}const Xk=["joystick"],j0=f0(["x","y"]),Zk=n=>{let{joystick:e=!0}=n,t=Pe(n,Xk);const{value:s,settings:r}=j0.normalize(t);return{value:s,settings:de(de({},r),{},{joystick:e})}};var Kk=de(de({component:Gk},j0),{},{normalize:Zk});const Qk=n=>{if(n!==void 0){if(n instanceof File)try{return URL.createObjectURL(n)}catch{return}if(typeof n=="string"&&n.indexOf("blob:")===0)return n;throw Error("Invalid image format [undefined | blob | File].")}},Jk=(n,e)=>typeof e=="object"&&"image"in e,eT=({image:n})=>({value:n});var tT=Object.freeze({__proto__:null,sanitize:Qk,schema:Jk,normalize:eT});const nT=ce("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto 20px",columnGap:"$colGap",alignItems:"center"}),sT=ce("div",{$flexCenter:"",overflow:"hidden",height:"$rowHeight",background:"$elevation3",textAlign:"center",color:"inherit",borderRadius:"$sm",outline:"none",userSelect:"none",cursor:"pointer",$inputStyle:"",$hover:"",$focusWithin:"",$active:"$accent1 $elevation1",variants:{isDragAccept:{true:{$inputStyle:"$accent1",backgroundColor:"$elevation1"}}}}),rT=ce("div",{boxSizing:"border-box",borderRadius:"$sm",height:"$rowHeight",width:"$rowHeight",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center",variants:{hasImage:{true:{cursor:"pointer",$hover:"",$active:""}}}}),iT=ce("div",{$flexCenter:"",width:"$imagePreviewWidth",height:"$imagePreviewHeight",borderRadius:"$sm",boxShadow:"$level2",pointerEvents:"none",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center"}),oT=ce("div",{fontSize:"0.8em",height:"100%",padding:"$rowGap $md"}),aT=ce("div",{$flexCenter:"",top:"0",right:"0",marginRight:"$sm",height:"100%",cursor:"pointer",variants:{disabled:{true:{color:"$elevation3",cursor:"default"}}},"&::after,&::before":{content:'""',position:"absolute",height:2,width:10,borderRadius:1,backgroundColor:"currentColor"},"&::after":{transform:"rotate(45deg)"},"&::before":{transform:"rotate(-45deg)"}});function cT(){const{label:n,value:e,onUpdate:t,disabled:s}=_t(),{popinRef:r,wrapperRef:i,shown:o,show:a,hide:c}=$0(),l=y.useCallback(m=>{m.length&&t(m[0])},[t]),u=y.useCallback(m=>{m.stopPropagation(),t(void 0)},[t]),{getRootProps:h,getInputProps:d,isDragAccept:f}=D0({maxFiles:1,accept:"image/*",onDrop:l,disabled:s});return M.createElement(tn,{input:!0},M.createElement(fn,null,n),M.createElement(nT,null,M.createElement(rT,{ref:r,hasImage:!!e,onPointerDown:()=>!!e&&a(),onPointerUp:c,style:{backgroundImage:e?`url(${e})`:"none"}}),o&&!!e&&M.createElement(Tu,null,M.createElement(i0,{onPointerUp:c,style:{cursor:"pointer"}}),M.createElement(iT,{ref:i,style:{backgroundImage:`url(${e})`}})),M.createElement(sT,h({isDragAccept:f}),M.createElement("input",d()),M.createElement(oT,null,f?"drop image":"click or drop")),M.createElement(aT,{onClick:u,disabled:!e})))}var lT=de({component:cT},tT);const tf=St().number(),uT=(n,e)=>St().array().length(2).every.number().test(n)&&St().schema({min:tf,max:tf}).test(e),Ta=n=>({min:n[0],max:n[1]}),V0=(n,{bounds:[e,t]},s)=>{const r=Array.isArray(n)?Ta(n):n,i={min:s[0],max:s[1]},{min:o,max:a}=de(de({},i),r);return[bs(Number(o),e,Math.max(e,a)),bs(Number(a),Math.min(t,o),t)]},hT=({value:n,min:e,max:t})=>{const s={min:e,max:t},r=d0(Ta(n),{min:s,max:s}),i=[e,t],o=de(de({},r),{},{bounds:i});return{value:V0(Ta(n),o,n),settings:o}};var dT=Object.freeze({__proto__:null,schema:uT,format:Ta,sanitize:V0,normalize:hT});const fT=["value","bounds","onDrag"],pT=["bounds"],mT=ce("div",{display:"grid",columnGap:"$colGap",gridTemplateColumns:"auto calc($sizes$numberInputMinWidth * 2 + $space$rowGap)"});function gT(n){let{value:e,bounds:[t,s],onDrag:r}=n,i=Pe(n,fT);const o=y.useRef(null),a=y.useRef(null),c=y.useRef(null),l=y.useRef(0),u=Un("sizes","scrubberWidth"),h=xo(({event:m,first:p,xy:[g],movement:[_],memo:w={}})=>{if(p){const{width:b,left:v}=o.current.getBoundingClientRect();l.current=b-parseFloat(u);const T=(m==null?void 0:m.target)===a.current||(m==null?void 0:m.target)===c.current;w.pos=va((g-v)/b,t,s);const E=Math.abs(w.pos-e.min)-Math.abs(w.pos-e.max);w.key=E<0||E===0&&w.pos<=e.min?"min":"max",T&&(w.pos=e[w.key])}const k=w.pos+va(_/l.current,0,s-t);return r({[w.key]:Bb(k,i[w.key])}),w}),d=`calc(${ya(e.min,t,s)} * (100% - ${u} - 8px) + 4px)`,f=`calc(${1-ya(e.max,t,s)} * (100% - ${u} - 8px) + 4px)`;return M.createElement(l0,Ze({ref:o},h()),M.createElement(c0,null,M.createElement(u0,{style:{left:d,right:f}})),M.createElement(wl,{position:"left",ref:a,style:{left:d}}),M.createElement(wl,{position:"right",ref:c,style:{right:f}}))}function _T(){const{label:n,displayValue:e,onUpdate:t,settings:s}=_t(),r=Pe(s,pT);return M.createElement(M.Fragment,null,M.createElement(tn,{input:!0},M.createElement(fn,null,n),M.createElement(mT,null,M.createElement(gT,Ze({value:e},s,{onDrag:t})),M.createElement(Cu,{value:e,settings:r,onUpdate:t,innerLabelTrim:0}))))}var yT=de({component:_T},dT);const vT=()=>{const n=new Map;return{on:(e,t)=>{let s=n.get(e);s===void 0&&(s=new Set,n.set(e,s)),s.add(t)},off:(e,t)=>{const s=n.get(e);s!==void 0&&(s.delete(t),s.size===0&&n.delete(e))},emit:(e,...t)=>{const s=n.get(e);if(s!==void 0)for(const r of s)r(...t)}}},bT=["type","value"],xT=["onChange","transient","onEditStart","onEditEnd"],wT=function(){const e=Uw(Bw(()=>({data:{}}))),t=vT();this.storeId=Jv(),this.useStore=e;const s={},r=new Set;this.getVisiblePaths=()=>{const o=this.getData(),a=Object.keys(o),c=[];Object.entries(s).forEach(([u,h])=>{h.render&&a.some(d=>d.indexOf(u)===0)&&!h.render(this.get)&&c.push(u+".")});const l=[];return r.forEach(u=>{u in o&&o[u].__refCount>0&&c.every(h=>u.indexOf(h)===-1)&&(!o[u].render||o[u].render(this.get))&&l.push(u)}),l},this.setOrderedPaths=o=>{o.forEach(a=>r.add(a))},this.orderPaths=o=>(this.setOrderedPaths(o),o),this.disposePaths=o=>{e.setState(a=>{const c=a.data;return o.forEach(l=>{if(l in c){const u=c[l];u.__refCount--,u.__refCount===0&&u.type in cn&&delete c[l]}}),{data:c}})},this.dispose=()=>{e.setState(()=>({data:{}}))},this.getFolderSettings=o=>s[o]||{},this.getData=()=>e.getState().data,this.addData=(o,a)=>{e.setState(c=>{const l=c.data;return Object.entries(o).forEach(([u,h])=>{let d=l[u];if(d){const{type:f,value:m}=h,p=Pe(h,bT);f!==d.type?zn(Be.INPUT_TYPE_OVERRIDE,f):((d.__refCount===0||a)&&Object.assign(d,p),d.__refCount++)}else l[u]=de(de({},h),{},{__refCount:1})}),{data:l}})},this.setValueAtPath=(o,a,c)=>{e.setState(l=>{const u=l.data;return Td(u[o],a,o,this,c),{data:u}})},this.setSettingsAtPath=(o,a)=>{e.setState(c=>{const l=c.data;return l[o].settings=de(de({},l[o].settings),a),{data:l}})},this.disableInputAtPath=(o,a)=>{e.setState(c=>{const l=c.data;return l[o].disabled=a,{data:l}})},this.set=(o,a)=>{e.setState(c=>{const l=c.data;return Object.entries(o).forEach(([u,h])=>{try{Td(l[u],h,void 0,void 0,a)}catch{}}),{data:l}})},this.getInput=o=>{try{return this.getData()[o]}catch{zn(Be.PATH_DOESNT_EXIST,o)}},this.get=o=>{var a;return(a=this.getInput(o))===null||a===void 0?void 0:a.value},this.emitOnEditStart=o=>{t.emit(`onEditStart:${o}`,this.get(o),o,de(de({},this.getInput(o)),{},{get:this.get}))},this.emitOnEditEnd=o=>{t.emit(`onEditEnd:${o}`,this.get(o),o,de(de({},this.getInput(o)),{},{get:this.get}))},this.subscribeToEditStart=(o,a)=>{const c=`onEditStart:${o}`;return t.on(c,a),()=>t.off(c,a)},this.subscribeToEditEnd=(o,a)=>{const c=`onEditEnd:${o}`;return t.on(c,a),()=>t.off(c,a)};const i=(o,a,c)=>{const l={};return Object.entries(o).forEach(([u,h])=>{if(u==="")return zn(Be.EMPTY_KEY);let d=Mu(a,u);if(h.type===cn.FOLDER){const f=i(h.schema,d,c);Object.assign(l,f),d in s||(s[d]=h.settings)}else if(u in c)zn(Be.DUPLICATE_KEYS,u,d,c[u].path);else{const f=ab(h,u,d,l);if(f){const{type:m,options:p,input:g}=f,{onChange:_,transient:w,onEditStart:k,onEditEnd:b}=p,v=Pe(p,xT);l[d]=de(de(de({type:m},v),g),{},{fromPanel:!0}),c[u]={path:d,onChange:_,transient:w,onEditStart:k,onEditEnd:b}}else zn(Be.UNKNOWN_INPUT,d,h)}}),l};this.getDataFromSchema=o=>{const a={};return[i(o,"",a),a]}},z0=new wT,kT={collapsed:!1};function TT(n,e){return{type:cn.FOLDER,schema:n,settings:de(de({},kT),e)}}const nf=n=>"__levaInput"in n,ET=(n,e)=>{const t={},s=e?e.toLowerCase():null;return n.forEach(r=>{const[i,o]=Ek(r);(!s||i.toLowerCase().indexOf(s)>-1)&&Tk(t,o,{[i]:{__levaInput:!0,path:r}})}),t},CT=["type","label","path","valueKey","value","settings","setValue","disabled"];function ST(n){let{type:e,label:t,path:s,valueKey:r,value:i,settings:o,setValue:a,disabled:c}=n,l=Pe(n,CT);const{displayValue:u,onChange:h,onUpdate:d}=o0({type:e,value:i,settings:o,setValue:a}),f=Zs[e].component;return f?M.createElement(Zp.Provider,{value:de({key:r,path:s,id:""+s,label:t,displayValue:u,value:i,onChange:h,onUpdate:d,settings:o,setValue:a,disabled:c},l)},M.createElement(Sb,{disabled:c},M.createElement(f,null))):(zn(Be.NO_COMPONENT_FOR_TYPE,e,s),null)}const OT=ce("button",{display:"block",$reset:"",fontWeight:"$button",height:"$rowHeight",borderStyle:"none",borderRadius:"$sm",backgroundColor:"$elevation1",color:"$highlight1","&:not(:disabled)":{color:"$highlight3",backgroundColor:"$accent2",cursor:"pointer",$hover:"$accent3",$active:"$accent3 $accent1",$focus:""}});function AT({onClick:n,settings:e,label:t}){const s=bo();return M.createElement(tn,null,M.createElement(OT,{disabled:e.disabled,onClick:()=>n(s.get)},t))}const PT=ce("div",{$flex:"",justifyContent:"flex-end",gap:"$colGap"}),RT=ce("button",{$reset:"",cursor:"pointer",borderRadius:"$xs","&:hover":{backgroundColor:"$elevation3"}}),DT=({label:n,opts:e})=>{let t=typeof n=="string"&&n.trim()===""?null:n,s=e;return typeof e.opts=="object"&&(s.label!==void 0&&(t=e.label),s=e.opts),{label:t,opts:s}};function MT(n){const{label:e,opts:t}=DT(n),s=bo();return M.createElement(tn,{input:!!e},e&&M.createElement(fn,null,e),M.createElement(PT,null,Object.entries(t).map(([r,i])=>M.createElement(RT,{key:r,onClick:()=>i(s.get)},r))))}const IT=ce("canvas",{height:"$monitorHeight",width:"100%",display:"block",borderRadius:"$sm"}),U0=100;function NT(n,e){n.push(e),n.length>U0&&n.shift()}const $T=y.forwardRef(function({initialValue:n},e){const t=Un("colors","highlight3"),s=Un("colors","elevation2"),r=Un("colors","highlight1"),[i,o]=y.useMemo(()=>[vt(r).alpha(.4).toRgbString(),vt(r).alpha(.1).toRgbString()],[r]),a=y.useRef([n]),c=y.useRef(n),l=y.useRef(n),u=y.useRef(),h=y.useCallback((m,p)=>{if(!m)return;const{width:g,height:_}=m,w=new Path2D,k=g/U0,b=_*.05;for(let E=0;E({frame:m=>{(c.current===void 0||ml.current)&&(l.current=m),NT(a.current,m),u.current=requestAnimationFrame(()=>h(d.current,f.current))}}),[d,f,h]),y.useEffect(()=>()=>cancelAnimationFrame(u.current),[]),M.createElement(IT,{ref:d})}),sf=n=>Number.isFinite(n)?n.toPrecision(2):n.toString(),FT=y.forwardRef(function({initialValue:n},e){const[t,s]=y.useState(sf(n));return y.useImperativeHandle(e,()=>({frame:r=>s(sf(r))}),[]),M.createElement("div",null,t)});function rf(n){return typeof n=="function"?n():n.current}function LT({label:n,objectOrFn:e,settings:t}){const s=y.useRef(),r=y.useRef(rf(e));return y.useEffect(()=>{const i=window.setInterval(()=>{var o;document.hidden||(o=s.current)===null||o===void 0||o.frame(rf(e))},t.interval);return()=>window.clearInterval(i)},[e,t.interval]),M.createElement(tn,{input:!0},M.createElement(fn,{align:"top"},n),t.graph?M.createElement($T,{ref:s,initialValue:r.current}):M.createElement(FT,{ref:s,initialValue:r.current}))}const jT=["type","label","key"],VT={[cn.BUTTON]:AT,[cn.BUTTON_GROUP]:MT,[cn.MONITOR]:LT},zT=M.memo(({path:n})=>{const[e,{set:t,setSettings:s,disable:r,storeId:i,emitOnEditStart:o,emitOnEditEnd:a}]=Lb(n);if(!e)return null;const{type:c,label:l,key:u}=e,h=Pe(e,jT);if(c in cn){const d=VT[c];return M.createElement(d,Ze({label:l,path:n},h))}return c in Zs?M.createElement(ST,Ze({key:i+n,type:c,label:l,storeId:i,path:n,valueKey:u,setValue:t,setSettings:s,disable:r,emitOnEditStart:o,emitOnEditEnd:a},h)):(qv(Be.UNSUPPORTED_INPUT,c,n),null)});function UT({toggle:n,toggled:e,name:t}){return M.createElement(Tb,{onClick:()=>n()},M.createElement(Eu,{toggled:e}),M.createElement("div",null,t))}const BT=({name:n,path:e,tree:t})=>{const s=bo(),r=Mu(e,n),{collapsed:i,color:o}=s.getFolderSettings(r),[a,c]=y.useState(!i),l=y.useRef(null),u=Un("colors","folderWidgetColor"),h=Un("colors","folderTextColor");return y.useLayoutEffect(()=>{l.current.style.setProperty("--leva-colors-folderWidgetColor",o||u),l.current.style.setProperty("--leva-colors-folderTextColor",o||h)},[o,u,h]),M.createElement(ba,{ref:l},M.createElement(UT,{name:n,toggled:a,toggle:()=>c(d=>!d)}),M.createElement(B0,{parent:r,tree:t,toggled:a}))},B0=M.memo(({isRoot:n=!1,fill:e=!1,flat:t=!1,parent:s,tree:r,toggled:i})=>{const{wrapperRef:o,contentRef:a}=Ok(i),c=bo(),l=([h,d])=>{var f;return(nf(d)?(f=c.getInput(d.path))===null||f===void 0?void 0:f.order:c.getFolderSettings(Mu(s,h)).order)||0},u=Object.entries(r).sort((h,d)=>l(h)-l(d));return M.createElement(bl,{ref:o,isRoot:n,fill:e,flat:t},M.createElement(n0,{ref:a,isRoot:n,toggled:i},u.map(([h,d])=>nf(d)?M.createElement(zT,{key:d.path,valueKey:d.valueKey,path:d.path}):M.createElement(BT,{key:h,name:h,path:s,tree:d}))))}),WT=ce("div",{position:"relative",fontFamily:"$mono",fontSize:"$root",color:"$rootText",backgroundColor:"$elevation1",variants:{fill:{false:{position:"fixed",top:"10px",right:"10px",zIndex:1e3,width:"$rootWidth"},true:{position:"relative",width:"100%"}},flat:{false:{borderRadius:"$lg",boxShadow:"$level1"}},oneLineLabels:{true:{[`${r0}`]:{gridTemplateColumns:"auto",gridAutoColumns:"minmax(max-content, 1fr)",gridAutoRows:"minmax($sizes$rowHeight), auto)",rowGap:0,columnGap:0,marginTop:"$rowGap"}}},hideTitleBar:{true:{$$titleBarHeight:"0px"},false:{$$titleBarHeight:"$sizes$titleBarHeight"}}},"&,*,*:after,*:before":{boxSizing:"border-box"},"*::selection":{backgroundColor:"$accent2"}}),W0=40,Ea=ce("i",{$flexCenter:"",width:W0,userSelect:"none",cursor:"pointer","> svg":{fill:"$highlight1",transition:"transform 350ms ease, fill 250ms ease"},"&:hover > svg":{fill:"$highlight3"},variants:{active:{true:{"> svg":{fill:"$highlight2"}}}}}),qT=ce("div",{display:"flex",alignItems:"stretch",justifyContent:"space-between",height:"$titleBarHeight",variants:{mode:{drag:{cursor:"grab"}}}}),HT=ce("div",{$flex:"",position:"relative",width:"100%",overflow:"hidden",transition:"height 250ms ease",color:"$highlight3",paddingLeft:"$md",[`> ${Ea}`]:{height:30},variants:{toggled:{true:{height:30},false:{height:0}}}}),YT=ce("input",{$reset:"",flex:1,position:"relative",height:30,width:"100%",backgroundColor:"transparent",fontSize:"10px",borderRadius:"$root","&:focus":{},"&::placeholder":{color:"$highlight2"}}),GT=ce("div",{touchAction:"none",$flexCenter:"",flex:1,"> svg":{fill:"$highlight1"},color:"$highlight1",variants:{drag:{true:{$draggable:"","> svg":{transition:"fill 250ms ease"},"&:hover":{color:"$highlight3"},"&:hover > svg":{fill:"$highlight3"}}},filterEnabled:{false:{paddingRight:W0}}}}),XT=M.forwardRef(({setFilter:n,toggle:e},t)=>{const[s,r]=y.useState(""),i=y.useMemo(()=>Wp(n,250),[n]),o=()=>{n(""),r("")},a=c=>{const l=c.currentTarget.value;e(!0),r(l)};return y.useEffect(()=>{i(s)},[s,i]),M.createElement(M.Fragment,null,M.createElement(YT,{ref:t,value:s,placeholder:"[Open filter with CMD+SHIFT+L]",onPointerDown:c=>c.stopPropagation(),onChange:a}),M.createElement(Ea,{onClick:()=>o(),style:{visibility:s?"visible":"hidden"}},M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"14",width:"14",viewBox:"0 0 20 20",fill:"currentColor"},M.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))))});function ZT({setFilter:n,onDrag:e,onDragStart:t,onDragEnd:s,toggle:r,toggled:i,title:o,drag:a,filterEnabled:c,from:l}){const[u,h]=y.useState(!1),d=y.useRef(null);y.useEffect(()=>{var m,p;u?(m=d.current)===null||m===void 0||m.focus():(p=d.current)===null||p===void 0||p.blur()},[u]);const f=xo(({offset:[m,p],first:g,last:_})=>{e({x:m,y:p}),g&&t({x:m,y:p}),_&&s({x:m,y:p})},{filterTaps:!0,from:({offset:[m,p]})=>[(l==null?void 0:l.x)||m,(l==null?void 0:l.y)||p]});return y.useEffect(()=>{const m=p=>{p.key==="L"&&p.shiftKey&&p.metaKey&&h(g=>!g)};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[]),M.createElement(M.Fragment,null,M.createElement(qT,{mode:a?"drag":void 0},M.createElement(Ea,{active:!i,onClick:()=>r()},M.createElement(Eu,{toggled:i,width:12,height:8})),M.createElement(GT,Ze({},a?f():{},{drag:a,filterEnabled:c}),o===void 0&&a?M.createElement("svg",{width:"20",height:"10",viewBox:"0 0 28 14",xmlns:"http://www.w3.org/2000/svg"},M.createElement("circle",{cx:"2",cy:"2",r:"2"}),M.createElement("circle",{cx:"14",cy:"2",r:"2"}),M.createElement("circle",{cx:"26",cy:"2",r:"2"}),M.createElement("circle",{cx:"2",cy:"12",r:"2"}),M.createElement("circle",{cx:"14",cy:"12",r:"2"}),M.createElement("circle",{cx:"26",cy:"12",r:"2"})):o),c&&M.createElement(Ea,{active:u,onClick:()=>h(m=>!m)},M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",viewBox:"0 0 20 20"},M.createElement("path",{d:"M9 9a2 2 0 114 0 2 2 0 01-4 0z"}),M.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-13a4 4 0 00-3.446 6.032l-2.261 2.26a1 1 0 101.414 1.415l2.261-2.261A4 4 0 1011 5z",clipRule:"evenodd"})))),M.createElement(HT,{toggled:u},M.createElement(XT,{ref:d,setFilter:n,toggle:r})))}const KT=["store","hidden","theme","collapsed"];function QT(n){let{store:e,hidden:t=!1,theme:s,collapsed:r=!1}=n,i=Pe(n,KT);const o=N0(()=>yb(s),[s]),[a,c]=y.useState(!r),l=typeof r=="object"?!r.collapsed:a,u=y.useMemo(()=>typeof r=="object"?h=>{typeof h=="function"?r.onChange(!h(!r.collapsed)):r.onChange(!h)}:c,[r]);return!e||t?null:M.createElement(wu.Provider,{value:o},M.createElement(JT,Ze({store:e},i,{toggled:l,setToggle:u,rootClass:o.className})))}const JT=M.memo(({store:n,rootClass:e,fill:t=!1,flat:s=!1,neverHide:r=!1,oneLineLabels:i=!1,titleBar:o={title:void 0,drag:!0,filter:!0,position:void 0,onDrag:void 0,onDragStart:void 0,onDragEnd:void 0},hideCopyButton:a=!1,toggled:c,setToggle:l})=>{var u,h;const d=Ak(n),[f,m]=y.useState(""),p=y.useMemo(()=>ET(d,f),[d,f]),[g,_]=a0(),w=r||d.length>0,k=typeof o=="object"&&o.title||void 0,b=typeof o=="object"&&(u=o.drag)!==null&&u!==void 0?u:!0,v=typeof o=="object"&&(h=o.filter)!==null&&h!==void 0?h:!0,T=typeof o=="object"&&o.position||void 0,E=typeof o=="object"&&o.onDrag||void 0,x=typeof o=="object"&&o.onDragStart||void 0,C=typeof o=="object"&&o.onDragEnd||void 0;return M.useEffect(()=>{_({x:T==null?void 0:T.x,y:T==null?void 0:T.y})},[T,_]),_b(),M.createElement(Qp.Provider,{value:{hideCopyButton:a}},M.createElement(WT,{ref:g,className:e,fill:t,flat:s,oneLineLabels:i,hideTitleBar:!o,style:{display:w?"block":"none"}},o&&M.createElement(ZT,{onDrag:S=>{_(S),E==null||E(S)},onDragStart:S=>x==null?void 0:x(S),onDragEnd:S=>C==null?void 0:C(S),setFilter:m,toggle:S=>l(R=>S??!R),toggled:c,title:k,drag:b,filterEnabled:v,from:T}),w&&M.createElement(Kp.Provider,{value:n},M.createElement(B0,{isRoot:!0,fill:t,flat:s,tree:p,toggled:c}))))}),eE=["isRoot"];let Ca=!1,js=null;function q0(n){let{isRoot:e=!1}=n,t=Pe(n,eE);return y.useEffect(()=>(Ca=!0,!e&&js&&(js.remove(),js=null),()=>{e||(Ca=!1)}),[e]),M.createElement(QT,Ze({store:z0},t))}function tE(n){y.useEffect(()=>{n&&!Ca&&(js||(js=document.getElementById("leva__root")||Object.assign(document.createElement("div"),{id:"leva__root"}),document.body&&(document.body.appendChild(js),lb(M.createElement(q0,{isRoot:!0}),js))),Ca=!0)},[n])}function nE(n,e,t,s,r){let i,o,a,c,l;return typeof n=="string"?(o=n,i=e,Array.isArray(t)?l=t:t&&("store"in t?(c=t,l=s):(a=t,Array.isArray(s)?l=s:(c=s,l=r)))):(i=n,Array.isArray(e)?l=e:(c=e,l=t)),{schema:i,folderName:o,folderSettings:a,hookSettings:c,deps:l||[]}}function sE(n,e,t,s,r){const{folderName:i,schema:o,folderSettings:a,hookSettings:c,deps:l}=nE(n,e,t,s,r),u=typeof o=="function",h=y.useRef(!1),d=y.useRef(!0),f=N0(()=>{h.current=!0;const R=typeof o=="function"?o():o;return i?{[i]:TT(R,a)}:R},l),m=!(c!=null&&c.store);tE(m);const[p]=y.useState(()=>(c==null?void 0:c.store)||z0),[g,_]=y.useMemo(()=>p.getDataFromSchema(f),[p,f]),[w,k,b,v,T]=y.useMemo(()=>{const R=[],O=[],L={},j={},W={};return Object.values(_).forEach(({path:B,onChange:V,onEditStart:z,onEditEnd:X,transient:K})=>{R.push(B),V?(L[B]=V,K||O.push(B)):O.push(B),z&&(j[B]=z),X&&(W[B]=X)}),[R,O,L,j,W]},[_]),E=y.useMemo(()=>p.orderPaths(w),[w,p]),x=Pk(p,k,g),C=y.useCallback(R=>{const O=Object.entries(R).reduce((L,[j,W])=>Object.assign(L,{[_[j].path]:W}),{});p.set(O,!1)},[p,_]),S=y.useCallback(R=>p.get(_[R].path),[p,_]);return y.useEffect(()=>{const R=!d.current&&h.current;return p.addData(g,R),d.current=!1,h.current=!1,()=>p.disposePaths(E)},[p,E,g]),y.useEffect(()=>{const R=[];return Object.entries(b).forEach(([O,L])=>{L(p.get(O),O,de({initial:!0,get:p.get},p.getInput(O)));const j=p.useStore.subscribe(W=>{const B=W.data[O];return[B.disabled?void 0:B.value,B]},([W,B])=>L(W,O,de({initial:!1,get:p.get},B)),{equalityFn:vo});R.push(j)}),()=>R.forEach(O=>O())},[p,b]),y.useEffect(()=>{const R=[];return Object.entries(v).forEach(([O,L])=>R.push(p.subscribeToEditStart(O,L))),Object.entries(T).forEach(([O,L])=>R.push(p.subscribeToEditEnd(O,L))),()=>R.forEach(O=>O())},[v,T,p]),u?[x,C,S]:x}ts(un.SELECT,tx);ts(un.IMAGE,lT);ts(un.NUMBER,qb);ts(un.COLOR,zk);ts(un.STRING,ux);ts(un.BOOLEAN,_x);ts(un.INTERVAL,yT);ts(un.VECTOR3D,Bk);ts(un.VECTOR2D,Kk);const rE={isUserDragging:!1,isUserScrolling:!1,userMovedCamera:!1,isUserScrollingOnHtmlPanel:!1},fs=Zf(n=>({...rE,setIsUserDragging:e=>n({isUserDragging:e}),setIsUserScrolling:e=>n({isUserScrolling:e}),setUserMovedCamera:e=>n({userMovedCamera:e}),setIsUserScrollingOnHtmlPanel:e=>n({isUserScrollingOnHtmlPanel:e})})),iE=()=>{const[n,e]=y.useState(""),t=y.useRef(null),{fetchData:s,setAbortRequests:r,seedQuestions:i}=Os(b=>b),[o]=Qf(b=>[b.setBudget]),{setUniverseQuestionIsOpen:a,setSidebarOpen:c,setShowCollapseButton:l}=mo(b=>({setUniverseQuestionIsOpen:b.setUniverseQuestionIsOpen,setSidebarOpen:b.setSidebarOpen,setShowCollapseButton:b.setShowCollapseButton})),u=p_(b=>b.resetAiSummaryAnswer),[h,d]=y.useState([]);y.useEffect(()=>{i&&d(w(i).slice(0,4))},[i]),y.useEffect(()=>{t.current&&t.current.focus()},[]);const f=async b=>{b&&(u(),a(),c(!0),l(!0)),await s(o,r,b)},m=!!n.trim().length,p=async b=>{b.keyCode===13&&b.shiftKey===!1&&m&&(b.preventDefault(),f(n))},g=async b=>{e(b),await f(b)},_=()=>{a(),c(!0),l(!0)},w=b=>{const v=[...b];let T=v.length-1;for(;T>0;){const E=Math.floor(Math.random()*(T+1));[v[T],v[E]]=[v[E],v[T]],T-=1}return v},k=!!n&&n.trim().length>0;return U.jsxs(cE,{children:["Ideas have shapes",U.jsxs(aE,{onKeyDown:p,py:12,tabIndex:-1,children:[U.jsx(oE,{ref:t,onChange:b=>e(b.target.value),placeholder:"What do you want to know?",value:n}),U.jsx(lE,{color:"secondary",disabled:!k,onClick:()=>f(n),variant:"contained",children:k?U.jsxs(U.Fragment,{children:["Search ",U.jsx(Ah,{})]}):U.jsx(Ah,{})})]}),h.length>0&&U.jsx(hE,{children:h.map(b=>U.jsxs(dE,{onClick:()=>g(b),children:[U.jsx(I_,{}),b]},b))}),U.jsx(uE,{"data-testid":"explore-graph-btn",onClick:_,startIcon:U.jsx(N_,{}),children:"Explore Graph"})]})},oE=Ke(Q_).attrs({maxRows:3})` background: ${Ae.BG1}; max-width: 700px; width: 700px; @@ -91,7 +91,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho margin: 13px; overflow-y: hidden; } -`,oE=Ke(Qn)` +`,aE=Ke(Qn)` position: relative; margin-top: 30px; background: ${Ae.BG1}; @@ -104,7 +104,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho outline: none; border-radius: 12px; box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.5); -`,aE=Ke(Qn)` +`,cE=Ke(Qn)` background: #16161de3; position: absolute; left: 0; @@ -119,7 +119,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho font-weight: 700; line-height: 16px; font-family: 'Barlow'; -`,cE=Ke(Kf)` +`,lE=Ke(Kf)` && { position: absolute; bottom: 16px; @@ -138,21 +138,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho width: 11px; height: 11px; } -`,lE=Ke(Kf)` +`,uE=Ke(Kf)` && { position: absolute; bottom: 20px; right: 20px; border-radius: 16px; } -`,uE=Ke.div` +`,hE=Ke.div` display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; max-width: 702px; width: 100%; -`,hE=Ke.div` +`,dE=Ke.div` background: ${Ae.BG1}; color: ${Ae.white}; padding: 15px 12px; @@ -181,9 +181,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho path { fill: ${Ae.modalWhiteOverlayBg}; } -`,dE=new ae(0,0,0),of=1,fE=16777215,pE=50,mE=(n,e)=>{var i,o;if(!(n!=null&&n.ref_id)||!(e!=null&&e.ref_id))return!1;let t=!1;const s=n.guests,r=e.guests;return((i=n.children)!=null&&i.includes(e.ref_id)||(o=e.children)!=null&&o.includes(n.ref_id))&&(t=!0),(s!=null&&s.find(a=>a.ref_id===e.ref_id)||r!=null&&r.find(a=>a.ref_id===n.ref_id))&&(t=!0),t},Di=new ae(0,0,0),af=100,gE=600,_E=2e3,Kc={x:172.7392402058252,y:-239.04675366094037,z:-2e3},q0="14.8.49",cf=(n,e,t)=>({endTime:e,insertTime:t,type:"exponentialRampToValue",value:n}),lf=(n,e,t)=>({endTime:e,insertTime:t,type:"linearRampToValue",value:n}),Nl=(n,e)=>({startTime:e,type:"setValue",value:n}),H0=(n,e,t)=>({duration:t,startTime:e,type:"setValueCurve",values:n}),Y0=(n,e,{startTime:t,target:s,timeConstant:r})=>s+(e-s)*Math.exp((t-n)/r),wr=n=>n.type==="exponentialRampToValue",Ca=n=>n.type==="linearRampToValue",ls=n=>wr(n)||Ca(n),Nu=n=>n.type==="setValue",Fn=n=>n.type==="setValueCurve",Sa=(n,e,t,s)=>{const r=n[e];return r===void 0?s:ls(r)||Nu(r)?r.value:Fn(r)?r.values[r.values.length-1]:Y0(t,Sa(n,e-1,r.startTime,s),r)},uf=(n,e,t,s,r)=>t===void 0?[s.insertTime,r]:ls(t)?[t.endTime,t.value]:Nu(t)?[t.startTime,t.value]:Fn(t)?[t.startTime+t.duration,t.values[t.values.length-1]]:[t.startTime,Sa(n,e-1,t.startTime,r)],$l=n=>n.type==="cancelAndHold",Fl=n=>n.type==="cancelScheduledValues",os=n=>$l(n)||Fl(n)?n.cancelTime:wr(n)||Ca(n)?n.endTime:n.startTime,hf=(n,e,t,{endTime:s,value:r})=>t===r?r:0t+(n-e)/(s-e)*(r-t),yE=(n,e)=>{const t=Math.floor(e),s=Math.ceil(e);return t===s?n[t]:(1-(e-t))*n[t]+(1-(s-e))*n[s]},vE=(n,{duration:e,startTime:t,values:s})=>{const r=(n-t)/e*(s.length-1);return yE(s,r)},Ko=n=>n.type==="setTarget";class bE{constructor(e){this._automationEvents=[],this._currenTime=0,this._defaultValue=e}[Symbol.iterator](){return this._automationEvents[Symbol.iterator]()}add(e){const t=os(e);if($l(e)||Fl(e)){const s=this._automationEvents.findIndex(i=>Fl(e)&&Fn(i)?i.startTime+i.duration>=t:os(i)>=t),r=this._automationEvents[s];if(s!==-1&&(this._automationEvents=this._automationEvents.slice(0,s)),$l(e)){const i=this._automationEvents[this._automationEvents.length-1];if(r!==void 0&&ls(r)){if(i!==void 0&&Ko(i))throw new Error("The internal list is malformed.");const o=i===void 0?r.insertTime:Fn(i)?i.startTime+i.duration:os(i),a=i===void 0?this._defaultValue:Fn(i)?i.values[i.values.length-1]:i.value,c=wr(r)?hf(t,o,a,r):df(t,o,a,r),l=wr(r)?cf(c,t,this._currenTime):lf(c,t,this._currenTime);this._automationEvents.push(l)}if(i!==void 0&&Ko(i)&&this._automationEvents.push(Nl(this.getValue(t),t)),i!==void 0&&Fn(i)&&i.startTime+i.duration>t){const o=t-i.startTime,a=(i.values.length-1)/i.duration,c=Math.max(2,1+Math.ceil(o*a)),l=o/(c-1)*a,u=i.values.slice(0,c);if(l<1)for(let h=1;hos(o)>t),r=s===-1?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[s-1];if(r!==void 0&&Fn(r)&&os(r)+r.duration>t)return!1;const i=wr(e)?cf(e.value,e.endTime,this._currenTime):Ca(e)?lf(e.value,t,this._currenTime):e;if(s===-1)this._automationEvents.push(i);else{if(Fn(e)&&t+e.duration>os(this._automationEvents[s]))return!1;this._automationEvents.splice(s,0,i)}}return!0}flush(e){const t=this._automationEvents.findIndex(s=>os(s)>e);if(t>1){const s=this._automationEvents.slice(t-1),r=s[0];Ko(r)&&s.unshift(Nl(Sa(this._automationEvents,t-2,r.startTime,this._defaultValue),r.startTime)),this._automationEvents=s}}getValue(e){if(this._automationEvents.length===0)return this._defaultValue;const t=this._automationEvents.findIndex(o=>os(o)>e),s=this._automationEvents[t],r=(t===-1?this._automationEvents.length:t)-1,i=this._automationEvents[r];if(i!==void 0&&Ko(i)&&(s===void 0||!ls(s)||s.insertTime>e))return Y0(e,Sa(this._automationEvents,r-1,i.startTime,this._defaultValue),i);if(i!==void 0&&Nu(i)&&(s===void 0||!ls(s)))return i.value;if(i!==void 0&&Fn(i)&&(s===void 0||!ls(s)||i.startTime+i.duration>e))return e({cancelTime:n,type:"cancelAndHold"}),wE=n=>({cancelTime:n,type:"cancelScheduledValues"}),kE=(n,e)=>({endTime:e,type:"exponentialRampToValue",value:n}),TE=(n,e)=>({endTime:e,type:"linearRampToValue",value:n}),EE=(n,e,t)=>({startTime:e,target:n,timeConstant:t,type:"setTarget"}),CE=()=>new DOMException("","AbortError"),SE=n=>(e,t,[s,r,i],o)=>{n(e[r],[t,s,i],a=>a[0]===t&&a[1]===s,o)},OE=n=>(e,t,s)=>{const r=[];for(let i=0;i(e,t)=>{n.set(e,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:t})},Lr=new WeakSet,G0=new WeakMap,$u=new WeakMap,X0=new WeakMap,Fu=new WeakMap,uc=new WeakMap,Z0=new WeakMap,Ll=new WeakMap,jl=new WeakMap,Vl=new WeakMap,K0={construct(){return K0}},PE=n=>{try{const e=new Proxy(n,K0);new e}catch{return!1}return!0},ff=/^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/,pf=(n,e)=>{const t=[];let s=n.replace(/^[\s]+/,""),r=s.match(ff);for(;r!==null;){const i=r[1].slice(1,-1),o=r[0].replace(/([\s]+)?;?$/,"").replace(i,new URL(i,e).toString());t.push(o),s=s.slice(r[0].length).replace(/^[\s]+/,""),r=s.match(ff)}return[t.join(";"),s]},mf=n=>{if(n!==void 0&&!Array.isArray(n))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},gf=n=>{if(!PE(n))throw new TypeError("The given value for processorCtor should be a constructor.");if(n.prototype===null||typeof n.prototype!="object")throw new TypeError("The given value for processorCtor should have a prototype.")},RE=(n,e,t,s,r,i,o,a,c,l,u,h,d)=>{let f=0;return(m,p,g={credentials:"omit"})=>{const _=u.get(m);if(_!==void 0&&_.has(p))return Promise.resolve();const x=l.get(m);if(x!==void 0){const b=x.get(p);if(b!==void 0)return b}const k=i(m),v=k.audioWorklet===void 0?r(p).then(([b,T])=>{const[E,w]=pf(b,T),C=`${E};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${w} -})})(window,'_AWGS')`;return t(C)}).then(()=>{const b=d._AWGS.pop();if(b===void 0)throw new SyntaxError;s(k.currentTime,k.sampleRate,()=>b(class{},void 0,(T,E)=>{if(T.trim()==="")throw e();const w=jl.get(k);if(w!==void 0){if(w.has(T))throw e();gf(E),mf(E.parameterDescriptors),w.set(T,E)}else gf(E),mf(E.parameterDescriptors),jl.set(k,new Map([[T,E]]))},k.sampleRate,void 0,void 0))}):Promise.all([r(p),Promise.resolve(n(h,h))]).then(([[b,T],E])=>{const w=f+1;f=w;const[C,S]=pf(b,T),j=`${C};((AudioWorkletProcessor,registerProcessor)=>{${S} -})(${E?"AudioWorkletProcessor":"class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}"},(n,p)=>registerProcessor(n,class extends p{${E?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${E?"":"i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));"}return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}));registerProcessor('__sac${w}',class extends AudioWorkletProcessor{process(){return !1}})`,q=new Blob([j],{type:"application/javascript; charset=utf-8"}),z=URL.createObjectURL(q);return k.audioWorklet.addModule(z,g).then(()=>{if(a(k))return k;const V=o(k);return V.audioWorklet.addModule(z,g).then(()=>V)}).then(V=>{if(c===null)throw new SyntaxError;try{new c(V,`__sac${w}`)}catch{throw new SyntaxError}}).finally(()=>URL.revokeObjectURL(z))});return x===void 0?l.set(m,new Map([[p,v]])):x.set(p,v),v.then(()=>{const b=u.get(m);b===void 0?u.set(m,new Set([p])):b.add(p)}).finally(()=>{const b=l.get(m);b!==void 0&&b.delete(p)}),v}},hn=(n,e)=>{const t=n.get(e);if(t===void 0)throw new Error("A value with the given key could not be found.");return t},hc=(n,e)=>{const t=Array.from(n).filter(e);if(t.length>1)throw Error("More than one element was found.");if(t.length===0)throw Error("No element was found.");const[s]=t;return n.delete(s),s},Q0=(n,e,t,s)=>{const r=hn(n,e),i=hc(r,o=>o[0]===t&&o[1]===s);return r.size===0&&n.delete(e),i},To=n=>hn(Z0,n),jr=n=>{if(Lr.has(n))throw new Error("The AudioNode is already stored.");Lr.add(n),To(n).forEach(e=>e(!0))},J0=n=>"port"in n,Eo=n=>{if(!Lr.has(n))throw new Error("The AudioNode is not stored.");Lr.delete(n),To(n).forEach(e=>e(!1))},zl=(n,e)=>{!J0(n)&&e.every(t=>t.size===0)&&Eo(n)},DE=(n,e,t,s,r,i,o,a,c,l,u,h,d)=>{const f=new WeakMap;return(m,p,g,_,x)=>{const{activeInputs:k,passiveInputs:v}=i(p),{outputs:b}=i(m),T=a(m),E=w=>{const C=c(p),S=c(m);if(w){const R=Q0(v,m,g,_);n(k,m,R,!1),!x&&!h(m)&&t(S,C,g,_),d(p)&&jr(p)}else{const R=s(k,m,g,_);e(v,_,R,!1),!x&&!h(m)&&r(S,C,g,_);const O=o(p);if(O===0)u(p)&&zl(p,k);else{const L=f.get(p);L!==void 0&&clearTimeout(L),f.set(p,setTimeout(()=>{u(p)&&zl(p,k)},O*1e3))}}};return l(b,[p,g,_],w=>w[0]===p&&w[1]===g&&w[2]===_,!0)?(T.add(E),u(m)?n(k,m,[g,_,E],!0):e(v,_,[m,g,E],!0),!0):!1}},ME=n=>(e,t,[s,r,i],o)=>{const a=e.get(s);a===void 0?e.set(s,new Set([[r,t,i]])):n(a,[r,t,i],c=>c[0]===r&&c[1]===t,o)},IE=n=>(e,t)=>{const s=n(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});t.connect(s).connect(e.destination);const r=()=>{t.removeEventListener("ended",r),t.disconnect(s),s.disconnect()};t.addEventListener("ended",r)},NE=n=>(e,t)=>{n(e).add(t)},$E={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},FE=(n,e,t,s,r,i)=>class extends n{constructor(a,c){const l=r(a),u={...$E,...c},h=s(l,u),d=i(l)?e():null;super(a,!1,h,d),this._nativeAnalyserNode=h}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(a){this._nativeAnalyserNode.fftSize=a}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(a){const c=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=a,!(a>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=c,t()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(a){const c=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=a,!(this._nativeAnalyserNode.maxDecibels>a))throw this._nativeAnalyserNode.minDecibels=c,t()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(a){this._nativeAnalyserNode.smoothingTimeConstant=a}getByteFrequencyData(a){this._nativeAnalyserNode.getByteFrequencyData(a)}getByteTimeDomainData(a){this._nativeAnalyserNode.getByteTimeDomainData(a)}getFloatFrequencyData(a){this._nativeAnalyserNode.getFloatFrequencyData(a)}getFloatTimeDomainData(a){this._nativeAnalyserNode.getFloatTimeDomainData(a)}},yt=(n,e)=>n.context===e,LE=(n,e,t)=>()=>{const s=new WeakMap,r=async(i,o)=>{let a=e(i);if(!yt(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,fftSize:a.fftSize,maxDecibels:a.maxDecibels,minDecibels:a.minDecibels,smoothingTimeConstant:a.smoothingTimeConstant};a=n(o,l)}return s.set(o,a),await t(i,o,a),a};return{render(i,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},Oa=n=>{try{n.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},An=()=>new DOMException("","IndexSizeError"),Lu=n=>{n.getChannelData=(e=>t=>{try{return e.call(n,t)}catch(s){throw s.code===12?An():s}})(n.getChannelData)},jE={numberOfChannels:1},VE=(n,e,t,s,r,i,o,a)=>{let c=null;return class em{constructor(u){if(r===null)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:h,numberOfChannels:d,sampleRate:f}={...jE,...u};c===null&&(c=new r(1,1,44100));const m=s!==null&&e(i,i)?new s({length:h,numberOfChannels:d,sampleRate:f}):c.createBuffer(d,h,f);if(m.numberOfChannels===0)throw t();return typeof m.copyFromChannel!="function"?(o(m),Lu(m)):e(Oa,()=>Oa(m))||a(m),n.add(m),m}static[Symbol.hasInstance](u){return u!==null&&typeof u=="object"&&Object.getPrototypeOf(u)===em.prototype||n.has(u)}}},Ct=-34028234663852886e22,bt=-Ct,Bn=n=>Lr.has(n),zE={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},UE=(n,e,t,s,r,i,o,a)=>class extends n{constructor(l,u){const h=i(l),d={...zE,...u},f=r(h,d),m=o(h),p=m?e():null;super(l,!1,f,p),this._audioBufferSourceNodeRenderer=p,this._isBufferNullified=!1,this._isBufferSet=d.buffer!==null,this._nativeAudioBufferSourceNode=f,this._onended=null,this._playbackRate=t(this,m,f.playbackRate,bt,Ct)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(l){if(this._nativeAudioBufferSourceNode.buffer=l,l!==null){if(this._isBufferSet)throw s();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(l){this._nativeAudioBufferSourceNode.loop=l}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(l){this._nativeAudioBufferSourceNode.loopEnd=l}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(l){this._nativeAudioBufferSourceNode.loopStart=l}get onended(){return this._onended}set onended(l){const u=typeof l=="function"?a(this,l):null;this._nativeAudioBufferSourceNode.onended=u;const h=this._nativeAudioBufferSourceNode.onended;this._onended=h!==null&&h===u?l:h}get playbackRate(){return this._playbackRate}start(l=0,u=0,h){if(this._nativeAudioBufferSourceNode.start(l,u,h),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.start=h===void 0?[l,u]:[l,u,h]),this.context.state!=="closed"){jr(this);const d=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",d),Bn(this)&&Eo(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",d)}}stop(l=0){this._nativeAudioBufferSourceNode.stop(l),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.stop=l)}},BE=(n,e,t,s,r)=>()=>{const i=new WeakMap;let o=null,a=null;const c=async(l,u)=>{let h=t(l);const d=yt(h,u);if(!d){const f={buffer:h.buffer,channelCount:h.channelCount,channelCountMode:h.channelCountMode,channelInterpretation:h.channelInterpretation,loop:h.loop,loopEnd:h.loopEnd,loopStart:h.loopStart,playbackRate:h.playbackRate.value};h=e(u,f),o!==null&&h.start(...o),a!==null&&h.stop(a)}return i.set(u,h),d?await n(u,l.playbackRate,h.playbackRate):await s(u,l.playbackRate,h.playbackRate),await r(l,u,h),h};return{set start(l){o=l},set stop(l){a=l},render(l,u){const h=i.get(u);return h!==void 0?Promise.resolve(h):c(l,u)}}},WE=n=>"playbackRate"in n,qE=n=>"frequency"in n&&"gain"in n,HE=n=>"offset"in n,YE=n=>!("frequency"in n)&&"gain"in n,GE=n=>"detune"in n&&"frequency"in n,XE=n=>"pan"in n,kt=n=>hn(G0,n),Co=n=>hn(X0,n),Ul=(n,e)=>{const{activeInputs:t}=kt(n);t.forEach(r=>r.forEach(([i])=>{e.includes(n)||Ul(i,[...e,n])}));const s=WE(n)?[n.playbackRate]:J0(n)?Array.from(n.parameters.values()):qE(n)?[n.Q,n.detune,n.frequency,n.gain]:HE(n)?[n.offset]:YE(n)?[n.gain]:GE(n)?[n.detune,n.frequency]:XE(n)?[n.pan]:[];for(const r of s){const i=Co(r);i!==void 0&&i.activeInputs.forEach(([o])=>Ul(o,e))}Bn(n)&&Eo(n)},tm=n=>{Ul(n.destination,[])},ZE=n=>n===void 0||typeof n=="number"||typeof n=="string"&&(n==="balanced"||n==="interactive"||n==="playback"),KE=(n,e,t,s,r,i,o,a,c)=>class extends n{constructor(u={}){if(c===null)throw new Error("Missing the native AudioContext constructor.");let h;try{h=new c(u)}catch(m){throw m.code===12&&m.message==="sampleRate is not in range"?t():m}if(h===null)throw s();if(!ZE(u.latencyHint))throw new TypeError(`The provided value '${u.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(u.sampleRate!==void 0&&h.sampleRate!==u.sampleRate)throw t();super(h,2);const{latencyHint:d}=u,{sampleRate:f}=h;if(this._baseLatency=typeof h.baseLatency=="number"?h.baseLatency:d==="balanced"?512/f:d==="interactive"||d===void 0?256/f:d==="playback"?1024/f:Math.max(2,Math.min(128,Math.round(d*f/128)))*128/f,this._nativeAudioContext=h,c.name==="webkitAudioContext"?(this._nativeGainNode=h.createGain(),this._nativeOscillatorNode=h.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(h.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,h.state==="running"){this._state="suspended";const m=()=>{this._state==="suspended"&&(this._state=null),h.removeEventListener("statechange",m)};h.addEventListener("statechange",m)}}get baseLatency(){return this._baseLatency}get state(){return this._state!==null?this._state:this._nativeAudioContext.state}close(){return this.state==="closed"?this._nativeAudioContext.close().then(()=>{throw e()}):(this._state==="suspended"&&(this._state=null),this._nativeAudioContext.close().then(()=>{this._nativeGainNode!==null&&this._nativeOscillatorNode!==null&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),tm(this)}))}createMediaElementSource(u){return new r(this,{mediaElement:u})}createMediaStreamDestination(){return new i(this)}createMediaStreamSource(u){return new o(this,{mediaStream:u})}createMediaStreamTrackSource(u){return new a(this,{mediaStreamTrack:u})}resume(){return this._state==="suspended"?new Promise((u,h)=>{const d=()=>{this._nativeAudioContext.removeEventListener("statechange",d),this._nativeAudioContext.state==="running"?u():this.resume().then(u,h)};this._nativeAudioContext.addEventListener("statechange",d)}):this._nativeAudioContext.resume().catch(u=>{throw u===void 0||u.code===15?e():u})}suspend(){return this._nativeAudioContext.suspend().catch(u=>{throw u===void 0?e():u})}},QE=(n,e,t,s,r,i,o,a)=>class extends n{constructor(l,u){const h=i(l),d=o(h),f=r(h,u,d),m=d?e(a):null;super(l,!1,f,m),this._isNodeOfNativeOfflineAudioContext=d,this._nativeAudioDestinationNode=f}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(l){if(this._isNodeOfNativeOfflineAudioContext)throw s();if(l>this._nativeAudioDestinationNode.maxChannelCount)throw t();this._nativeAudioDestinationNode.channelCount=l}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(l){if(this._isNodeOfNativeOfflineAudioContext)throw s();this._nativeAudioDestinationNode.channelCountMode=l}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}},JE=n=>{const e=new WeakMap,t=async(s,r)=>{const i=r.destination;return e.set(r,i),await n(s,r,i),i};return{render(s,r){const i=e.get(r);return i!==void 0?Promise.resolve(i):t(s,r)}}},eC=(n,e,t,s,r,i,o,a)=>(c,l)=>{const u=l.listener,h=()=>{const b=new Float32Array(1),T=e(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),E=o(l);let w=!1,C=[0,0,-1,0,1,0],S=[0,0,0];const R=()=>{if(w)return;w=!0;const q=s(l,256,9,0);q.onaudioprocess=({inputBuffer:z})=>{const V=[i(z,b,0),i(z,b,1),i(z,b,2),i(z,b,3),i(z,b,4),i(z,b,5)];V.some((X,Z)=>X!==C[Z])&&(u.setOrientation(...V),C=V);const U=[i(z,b,6),i(z,b,7),i(z,b,8)];U.some((X,Z)=>X!==S[Z])&&(u.setPosition(...U),S=U)},T.connect(q)},O=q=>z=>{z!==C[q]&&(C[q]=z,u.setOrientation(...C))},L=q=>z=>{z!==S[q]&&(S[q]=z,u.setPosition(...S))},j=(q,z,V)=>{const U=t(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:z});U.connect(T,0,q),U.start(),Object.defineProperty(U.offset,"defaultValue",{get(){return z}});const X=n({context:c},E,U.offset,bt,Ct);return a(X,"value",Z=>()=>Z.call(X),Z=>Q=>{try{Z.call(X,Q)}catch($){if($.code!==9)throw $}R(),E&&V(Q)}),X.cancelAndHoldAtTime=(Z=>E?()=>{throw r()}:(...Q)=>{const $=Z.apply(X,Q);return R(),$})(X.cancelAndHoldAtTime),X.cancelScheduledValues=(Z=>E?()=>{throw r()}:(...Q)=>{const $=Z.apply(X,Q);return R(),$})(X.cancelScheduledValues),X.exponentialRampToValueAtTime=(Z=>E?()=>{throw r()}:(...Q)=>{const $=Z.apply(X,Q);return R(),$})(X.exponentialRampToValueAtTime),X.linearRampToValueAtTime=(Z=>E?()=>{throw r()}:(...Q)=>{const $=Z.apply(X,Q);return R(),$})(X.linearRampToValueAtTime),X.setTargetAtTime=(Z=>E?()=>{throw r()}:(...Q)=>{const $=Z.apply(X,Q);return R(),$})(X.setTargetAtTime),X.setValueAtTime=(Z=>E?()=>{throw r()}:(...Q)=>{const $=Z.apply(X,Q);return R(),$})(X.setValueAtTime),X.setValueCurveAtTime=(Z=>E?()=>{throw r()}:(...Q)=>{const $=Z.apply(X,Q);return R(),$})(X.setValueCurveAtTime),X};return{forwardX:j(0,0,O(0)),forwardY:j(1,0,O(1)),forwardZ:j(2,-1,O(2)),positionX:j(6,0,L(0)),positionY:j(7,0,L(1)),positionZ:j(8,0,L(2)),upX:j(3,0,O(3)),upY:j(4,1,O(4)),upZ:j(5,0,O(5))}},{forwardX:d,forwardY:f,forwardZ:m,positionX:p,positionY:g,positionZ:_,upX:x,upY:k,upZ:v}=u.forwardX===void 0?h():u;return{get forwardX(){return d},get forwardY(){return f},get forwardZ(){return m},get positionX(){return p},get positionY(){return g},get positionZ(){return _},get upX(){return x},get upY(){return k},get upZ(){return v}}},Aa=n=>"context"in n,So=n=>Aa(n[0]),ir=(n,e,t,s)=>{for(const r of n)if(t(r)){if(s)return!1;throw Error("The set contains at least one similar element.")}return n.add(e),!0},_f=(n,e,[t,s],r)=>{ir(n,[e,t,s],i=>i[0]===e&&i[1]===t,r)},yf=(n,[e,t,s],r)=>{const i=n.get(e);i===void 0?n.set(e,new Set([[t,s]])):ir(i,[t,s],o=>o[0]===t,r)},ni=n=>"inputs"in n,Pa=(n,e,t,s)=>{if(ni(e)){const r=e.inputs[s];return n.connect(r,t,0),[r,t,0]}return n.connect(e,t,s),[e,t,s]},nm=(n,e,t)=>{for(const s of n)if(s[0]===e&&s[1]===t)return n.delete(s),s;return null},tC=(n,e,t)=>hc(n,s=>s[0]===e&&s[1]===t),sm=(n,e)=>{if(!To(n).delete(e))throw new Error("Missing the expected event listener.")},rm=(n,e,t)=>{const s=hn(n,e),r=hc(s,i=>i[0]===t);return s.size===0&&n.delete(e),r},Ra=(n,e,t,s)=>{ni(e)?n.disconnect(e.inputs[s],t,0):n.disconnect(e,t,s)},Ve=n=>hn($u,n),Ui=n=>hn(Fu,n),Ks=n=>Ll.has(n),aa=n=>!Lr.has(n),vf=(n,e)=>new Promise(t=>{if(e!==null)t(!0);else{const s=n.createScriptProcessor(256,1,1),r=n.createGain(),i=n.createBuffer(1,2,44100),o=i.getChannelData(0);o[0]=1,o[1]=1;const a=n.createBufferSource();a.buffer=i,a.loop=!0,a.connect(s).connect(n.destination),a.connect(r),a.disconnect(r),s.onaudioprocess=c=>{const l=c.inputBuffer.getChannelData(0);Array.prototype.some.call(l,u=>u===1)?t(!0):t(!1),a.stop(),s.onaudioprocess=null,a.disconnect(s),s.disconnect(n.destination)},a.start()}}),Qc=(n,e)=>{const t=new Map;for(const s of n)for(const r of s){const i=t.get(r);t.set(r,i===void 0?1:i+1)}t.forEach((s,r)=>e(r,s))},Da=n=>"context"in n,nC=n=>{const e=new Map;n.connect=(t=>(s,r=0,i=0)=>{const o=Da(s)?t(s,r,i):t(s,r),a=e.get(s);return a===void 0?e.set(s,[{input:i,output:r}]):a.every(c=>c.input!==i||c.output!==r)&&a.push({input:i,output:r}),o})(n.connect.bind(n)),n.disconnect=(t=>(s,r,i)=>{if(t.apply(n),s===void 0)e.clear();else if(typeof s=="number")for(const[o,a]of e){const c=a.filter(l=>l.output!==s);c.length===0?e.delete(o):e.set(o,c)}else if(e.has(s))if(r===void 0)e.delete(s);else{const o=e.get(s);if(o!==void 0){const a=o.filter(c=>c.output!==r&&(c.input!==i||i===void 0));a.length===0?e.delete(s):e.set(s,a)}}for(const[o,a]of e)a.forEach(c=>{Da(o)?n.connect(o,c.output,c.input):n.connect(o,c.output)})})(n.disconnect)},sC=(n,e,t,s)=>{const{activeInputs:r,passiveInputs:i}=Co(e),{outputs:o}=kt(n),a=To(n),c=l=>{const u=Ve(n),h=Ui(e);if(l){const d=rm(i,n,t);_f(r,n,d,!1),!s&&!Ks(n)&&u.connect(h,t)}else{const d=tC(r,n,t);yf(i,d,!1),!s&&!Ks(n)&&u.disconnect(h,t)}};return ir(o,[e,t],l=>l[0]===e&&l[1]===t,!0)?(a.add(c),Bn(n)?_f(r,n,[t,c],!0):yf(i,[n,t,c],!0),!0):!1},rC=(n,e,t,s)=>{const{activeInputs:r,passiveInputs:i}=kt(e),o=nm(r[s],n,t);return o===null?[Q0(i,n,t,s)[2],!1]:[o[2],!0]},iC=(n,e,t)=>{const{activeInputs:s,passiveInputs:r}=Co(e),i=nm(s,n,t);return i===null?[rm(r,n,t)[1],!1]:[i[2],!0]},ju=(n,e,t,s,r)=>{const[i,o]=rC(n,t,s,r);if(i!==null&&(sm(n,i),o&&!e&&!Ks(n)&&Ra(Ve(n),Ve(t),s,r)),Bn(t)){const{activeInputs:a}=kt(t);zl(t,a)}},Vu=(n,e,t,s)=>{const[r,i]=iC(n,t,s);r!==null&&(sm(n,r),i&&!e&&!Ks(n)&&Ve(n).disconnect(Ui(t),s))},oC=(n,e)=>{const t=kt(n),s=[];for(const r of t.outputs)So(r)?ju(n,e,...r):Vu(n,e,...r),s.push(r[0]);return t.outputs.clear(),s},aC=(n,e,t)=>{const s=kt(n),r=[];for(const i of s.outputs)i[1]===t&&(So(i)?ju(n,e,...i):Vu(n,e,...i),r.push(i[0]),s.outputs.delete(i));return r},cC=(n,e,t,s,r)=>{const i=kt(n);return Array.from(i.outputs).filter(o=>o[0]===t&&(s===void 0||o[1]===s)&&(r===void 0||o[2]===r)).map(o=>(So(o)?ju(n,e,...o):Vu(n,e,...o),i.outputs.delete(o),o[0]))},lC=(n,e,t,s,r,i,o,a,c,l,u,h,d,f,m,p)=>class extends l{constructor(_,x,k,v){super(k),this._context=_,this._nativeAudioNode=k;const b=u(_);h(b)&&t(vf,()=>vf(b,p))!==!0&&nC(k),$u.set(this,k),Z0.set(this,new Set),_.state!=="closed"&&x&&jr(this),n(this,v,k)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(_){this._nativeAudioNode.channelCount=_}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(_){this._nativeAudioNode.channelCountMode=_}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(_){this._nativeAudioNode.channelInterpretation=_}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(_,x=0,k=0){if(x<0||x>=this._nativeAudioNode.numberOfOutputs)throw r();const v=u(this._context),b=m(v);if(d(_)||f(_))throw i();if(Aa(_)){const w=Ve(_);try{const S=Pa(this._nativeAudioNode,w,x,k),R=aa(this);(b||R)&&this._nativeAudioNode.disconnect(...S),this.context.state!=="closed"&&!R&&aa(_)&&jr(_)}catch(S){throw S.code===12?i():S}if(e(this,_,x,k,b)){const S=c([this],_);Qc(S,s(b))}return _}const T=Ui(_);if(T.name==="playbackRate"&&T.maxValue===1024)throw o();try{this._nativeAudioNode.connect(T,x),(b||aa(this))&&this._nativeAudioNode.disconnect(T,x)}catch(w){throw w.code===12?i():w}if(sC(this,_,x,b)){const w=c([this],_);Qc(w,s(b))}}disconnect(_,x,k){let v;const b=u(this._context),T=m(b);if(_===void 0)v=oC(this,T);else if(typeof _=="number"){if(_<0||_>=this.numberOfOutputs)throw r();v=aC(this,T,_)}else{if(x!==void 0&&(x<0||x>=this.numberOfOutputs)||Aa(_)&&k!==void 0&&(k<0||k>=_.numberOfInputs))throw r();if(v=cC(this,T,_,x,k),v.length===0)throw i()}for(const E of v){const w=c([this],E);Qc(w,a)}}},uC=(n,e,t,s,r,i,o,a,c,l,u,h,d)=>(f,m,p,g=null,_=null)=>{const x=p.value,k=new bE(x),v=m?s(k):null,b={get defaultValue(){return x},get maxValue(){return g===null?p.maxValue:g},get minValue(){return _===null?p.minValue:_},get value(){return p.value},set value(T){p.value=T,b.setValueAtTime(T,f.context.currentTime)},cancelAndHoldAtTime(T){if(typeof p.cancelAndHoldAtTime=="function")v===null&&k.flush(f.context.currentTime),k.add(r(T)),p.cancelAndHoldAtTime(T);else{const E=Array.from(k).pop();v===null&&k.flush(f.context.currentTime),k.add(r(T));const w=Array.from(k).pop();p.cancelScheduledValues(T),E!==w&&w!==void 0&&(w.type==="exponentialRampToValue"?p.exponentialRampToValueAtTime(w.value,w.endTime):w.type==="linearRampToValue"?p.linearRampToValueAtTime(w.value,w.endTime):w.type==="setValue"?p.setValueAtTime(w.value,w.startTime):w.type==="setValueCurve"&&p.setValueCurveAtTime(w.values,w.startTime,w.duration))}return b},cancelScheduledValues(T){return v===null&&k.flush(f.context.currentTime),k.add(i(T)),p.cancelScheduledValues(T),b},exponentialRampToValueAtTime(T,E){if(T===0)throw new RangeError;if(!Number.isFinite(E)||E<0)throw new RangeError;const w=f.context.currentTime;return v===null&&k.flush(w),Array.from(k).length===0&&(k.add(l(x,w)),p.setValueAtTime(x,w)),k.add(o(T,E)),p.exponentialRampToValueAtTime(T,E),b},linearRampToValueAtTime(T,E){const w=f.context.currentTime;return v===null&&k.flush(w),Array.from(k).length===0&&(k.add(l(x,w)),p.setValueAtTime(x,w)),k.add(a(T,E)),p.linearRampToValueAtTime(T,E),b},setTargetAtTime(T,E,w){return v===null&&k.flush(f.context.currentTime),k.add(c(T,E,w)),p.setTargetAtTime(T,E,w),b},setValueAtTime(T,E){return v===null&&k.flush(f.context.currentTime),k.add(l(T,E)),p.setValueAtTime(T,E),b},setValueCurveAtTime(T,E,w){const C=T instanceof Float32Array?T:new Float32Array(T);if(h!==null&&h.name==="webkitAudioContext"){const S=E+w,R=f.context.sampleRate,O=Math.ceil(E*R),L=Math.floor(S*R),j=L-O,q=new Float32Array(j);for(let V=0;V({replay(e){for(const t of n)if(t.type==="exponentialRampToValue"){const{endTime:s,value:r}=t;e.exponentialRampToValueAtTime(r,s)}else if(t.type==="linearRampToValue"){const{endTime:s,value:r}=t;e.linearRampToValueAtTime(r,s)}else if(t.type==="setTarget"){const{startTime:s,target:r,timeConstant:i}=t;e.setTargetAtTime(r,s,i)}else if(t.type==="setValue"){const{startTime:s,value:r}=t;e.setValueAtTime(r,s)}else if(t.type==="setValueCurve"){const{duration:s,startTime:r,values:i}=t;e.setValueCurveAtTime(i,r,s)}else throw new Error("Can't apply an unknown automation.")}});class im{constructor(e){this._map=new Map(e)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(e,t=null){return this._map.forEach((s,r)=>e.call(t,s,r,this))}get(e){return this._map.get(e)}has(e){return this._map.has(e)}keys(){return this._map.keys()}values(){return this._map.values()}}const dC={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}},fC=(n,e,t,s,r,i,o,a,c,l,u,h,d,f)=>class extends e{constructor(p,g,_){var x;const k=a(p),v=c(k),b=u({...dC,..._});d(b);const T=jl.get(k),E=T==null?void 0:T.get(g),w=v||k.state!=="closed"?k:(x=o(k))!==null&&x!==void 0?x:k,C=r(w,v?null:p.baseLatency,l,g,E,b),S=v?s(g,b,E):null;super(p,!0,C,S);const R=[];C.parameters.forEach((L,j)=>{const q=t(this,v,L);R.push([j,q])}),this._nativeAudioWorkletNode=C,this._onprocessorerror=null,this._parameters=new im(R),v&&n(k,this);const{activeInputs:O}=i(this);h(C,O)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(p){const g=typeof p=="function"?f(this,p):null;this._nativeAudioWorkletNode.onprocessorerror=g;const _=this._nativeAudioWorkletNode.onprocessorerror;this._onprocessorerror=_!==null&&_===g?p:_}get parameters(){return this._parameters===null?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}};function Ma(n,e,t,s,r){if(typeof n.copyFromChannel=="function")e[t].byteLength===0&&(e[t]=new Float32Array(128)),n.copyFromChannel(e[t],s,r);else{const i=n.getChannelData(s);if(e[t].byteLength===0)e[t]=i.slice(r,r+128);else{const o=new Float32Array(i.buffer,r*Float32Array.BYTES_PER_ELEMENT,128);e[t].set(o)}}}const om=(n,e,t,s,r)=>{typeof n.copyToChannel=="function"?e[t].byteLength!==0&&n.copyToChannel(e[t],s,r):e[t].byteLength!==0&&n.getChannelData(s).set(e[t],r)},Ia=(n,e)=>{const t=[];for(let s=0;s{const t=hn(Vl,n),s=Ve(e);return hn(t,s)},mC=async(n,e,t,s,r,i,o)=>{const a=e===null?Math.ceil(n.context.length/128)*128:e.length,c=s.channelCount*s.numberOfInputs,l=r.reduce((g,_)=>g+_,0),u=l===0?null:t.createBuffer(l,a,t.sampleRate);if(i===void 0)throw new Error("Missing the processor constructor.");const h=kt(n),d=await pC(t,n),f=Ia(s.numberOfInputs,s.channelCount),m=Ia(s.numberOfOutputs,r),p=Array.from(n.parameters.keys()).reduce((g,_)=>({...g,[_]:new Float32Array(128)}),{});for(let g=0;g0&&e!==null)for(let _=0;_{Ma(e,p,_,c+x,g)});for(let _=0;_h.activeInputs[v].size===0?[]:k),x=o(g/t.sampleRate,t.sampleRate,()=>d.process(_,m,p));if(u!==null)for(let k=0,v=0;k(g,_,x)=>{const k=new WeakMap;let v=null;const b=async(T,E)=>{let w=u(T),C=null;const S=yt(w,E),R=Array.isArray(_.outputChannelCount)?_.outputChannelCount:Array.from(_.outputChannelCount);if(h===null){const O=R.reduce((z,V)=>z+V,0),L=r(E,{channelCount:Math.max(1,O),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,O)}),j=[];for(let z=0;z{const Q=new d(X,Math.ceil(T.context.length/128)*128,E.sampleRate),$=[],F=[];for(let Y=0;Y<_.numberOfInputs;Y+=1)$.push(o(Q,{channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation,gain:1})),F.push(r(Q,{channelCount:_.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:_.channelCount}));const A=await Promise.all(Array.from(T.parameters.values()).map(async Y=>{const N=i(Q,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:Y.value});return await f(Q,Y,N.offset),N})),M=s(Q,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,V+U)});for(let Y=0;Y<_.numberOfInputs;Y+=1){$[Y].connect(F[Y]);for(let N=0;N<_.channelCount;N+=1)F[Y].connect(M,N,Y*_.channelCount+N)}for(const[Y,N]of A.entries())N.connect(M,0,V+Y),N.start(0);return M.connect(Q.destination),await Promise.all($.map(Y=>m(T,Q,Y))),p(Q)})(),E,_,R,x,l)}const O=await v,L=t(E,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[j,q,z]=C;O!==null&&(L.buffer=O,L.start(0)),L.connect(j);for(let V=0,U=0;Vclass extends m{constructor(b,T){super(b,T),this._nativeContext=b,this._audioWorklet=n===void 0?void 0:{addModule:(E,w)=>n(this,E,w)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new e(this)}createBiquadFilter(){return new r(this)}createBuffer(b,T,E){return new t({length:T,numberOfChannels:b,sampleRate:E})}createBufferSource(){return new s(this)}createChannelMerger(b=6){return new i(this,{numberOfInputs:b})}createChannelSplitter(b=6){return new o(this,{numberOfOutputs:b})}createConstantSource(){return new a(this)}createConvolver(){return new c(this)}createDelay(b=1){return new u(this,{maxDelayTime:b})}createDynamicsCompressor(){return new h(this)}createGain(){return new d(this)}createIIRFilter(b,T){return new f(this,{feedback:T,feedforward:b})}createOscillator(){return new p(this)}createPanner(){return new g(this)}createPeriodicWave(b,T,E={disableNormalization:!1}){return new _(this,{...E,imag:T,real:b})}createStereoPanner(){return new x(this)}createWaveShaper(){return new k(this)}decodeAudioData(b,T,E){return l(this._nativeContext,b).then(w=>(typeof T=="function"&&T(w),w),w=>{throw typeof E=="function"&&E(w),w})}},yC={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},vC=(n,e,t,s,r,i,o,a)=>class extends n{constructor(l,u){const h=i(l),d={...yC,...u},f=r(h,d),m=o(h),p=m?t():null;super(l,!1,f,p),this._Q=e(this,m,f.Q,bt,Ct),this._detune=e(this,m,f.detune,1200*Math.log2(bt),-1200*Math.log2(bt)),this._frequency=e(this,m,f.frequency,l.sampleRate/2,0),this._gain=e(this,m,f.gain,40*Math.log10(bt),Ct),this._nativeBiquadFilterNode=f,a(this,1)}get detune(){return this._detune}get frequency(){return this._frequency}get gain(){return this._gain}get Q(){return this._Q}get type(){return this._nativeBiquadFilterNode.type}set type(l){this._nativeBiquadFilterNode.type=l}getFrequencyResponse(l,u,h){try{this._nativeBiquadFilterNode.getFrequencyResponse(l,u,h)}catch(d){throw d.code===11?s():d}if(l.length!==u.length||u.length!==h.length)throw s()}},bC=(n,e,t,s,r)=>()=>{const i=new WeakMap,o=async(a,c)=>{let l=t(a);const u=yt(l,c);if(!u){const h={Q:l.Q.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,detune:l.detune.value,frequency:l.frequency.value,gain:l.gain.value,type:l.type};l=e(c,h)}return i.set(c,l),u?(await n(c,a.Q,l.Q),await n(c,a.detune,l.detune),await n(c,a.frequency,l.frequency),await n(c,a.gain,l.gain)):(await s(c,a.Q,l.Q),await s(c,a.detune,l.detune),await s(c,a.frequency,l.frequency),await s(c,a.gain,l.gain)),await r(a,c,l),l};return{render(a,c){const l=i.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},xC=(n,e)=>(t,s)=>{const r=e.get(t);if(r!==void 0)return r;const i=n.get(t);if(i!==void 0)return i;try{const o=s();return o instanceof Promise?(n.set(t,o),o.catch(()=>!1).then(a=>(n.delete(t),e.set(t,a),a))):(e.set(t,o),o)}catch{return e.set(t,!1),!1}},wC={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},kC=(n,e,t,s,r)=>class extends n{constructor(o,a){const c=s(o),l={...wC,...a},u=t(c,l),h=r(c)?e():null;super(o,!1,u,h)}},TC=(n,e,t)=>()=>{const s=new WeakMap,r=async(i,o)=>{let a=e(i);if(!yt(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfInputs:a.numberOfInputs};a=n(o,l)}return s.set(o,a),await t(i,o,a),a};return{render(i,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},EC={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},CC=(n,e,t,s,r,i)=>class extends n{constructor(a,c){const l=s(a),u=i({...EC,...c}),h=t(l,u),d=r(l)?e():null;super(a,!1,h,d)}},SC=(n,e,t)=>()=>{const s=new WeakMap,r=async(i,o)=>{let a=e(i);if(!yt(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfOutputs:a.numberOfOutputs};a=n(o,l)}return s.set(o,a),await t(i,o,a),a};return{render(i,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},OC=n=>(e,t,s)=>n(t,e,s),AC=n=>(e,t,s=0,r=0)=>{const i=e[s];if(i===void 0)throw n();return Da(t)?i.connect(t,0,r):i.connect(t,0)},PC=n=>(e,t)=>{const s=n(e,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),r=e.createBuffer(1,2,44100);return s.buffer=r,s.loop=!0,s.connect(t),s.start(),()=>{s.stop(),s.disconnect(t)}},RC={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},DC=(n,e,t,s,r,i,o)=>class extends n{constructor(c,l){const u=r(c),h={...RC,...l},d=s(u,h),f=i(u),m=f?t():null;super(c,!1,d,m),this._constantSourceNodeRenderer=m,this._nativeConstantSourceNode=d,this._offset=e(this,f,d.offset,bt,Ct),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(c){const l=typeof c=="function"?o(this,c):null;this._nativeConstantSourceNode.onended=l;const u=this._nativeConstantSourceNode.onended;this._onended=u!==null&&u===l?c:u}start(c=0){if(this._nativeConstantSourceNode.start(c),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.start=c),this.context.state!=="closed"){jr(this);const l=()=>{this._nativeConstantSourceNode.removeEventListener("ended",l),Bn(this)&&Eo(this)};this._nativeConstantSourceNode.addEventListener("ended",l)}}stop(c=0){this._nativeConstantSourceNode.stop(c),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.stop=c)}},MC=(n,e,t,s,r)=>()=>{const i=new WeakMap;let o=null,a=null;const c=async(l,u)=>{let h=t(l);const d=yt(h,u);if(!d){const f={channelCount:h.channelCount,channelCountMode:h.channelCountMode,channelInterpretation:h.channelInterpretation,offset:h.offset.value};h=e(u,f),o!==null&&h.start(o),a!==null&&h.stop(a)}return i.set(u,h),d?await n(u,l.offset,h.offset):await s(u,l.offset,h.offset),await r(l,u,h),h};return{set start(l){o=l},set stop(l){a=l},render(l,u){const h=i.get(u);return h!==void 0?Promise.resolve(h):c(l,u)}}},IC=n=>e=>(n[0]=e,n[0]),NC={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},$C=(n,e,t,s,r,i)=>class extends n{constructor(a,c){const l=s(a),u={...NC,...c},h=t(l,u),f=r(l)?e():null;super(a,!1,h,f),this._isBufferNullified=!1,this._nativeConvolverNode=h,u.buffer!==null&&i(this,u.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(a){if(this._nativeConvolverNode.buffer=a,a===null&&this._nativeConvolverNode.buffer!==null){const c=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=c.createBuffer(1,1,c.sampleRate),this._isBufferNullified=!0,i(this,0)}else this._isBufferNullified=!1,i(this,this._nativeConvolverNode.buffer===null?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(a){this._nativeConvolverNode.normalize=a}},FC=(n,e,t)=>()=>{const s=new WeakMap,r=async(i,o)=>{let a=e(i);if(!yt(a,o)){const l={buffer:a.buffer,channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,disableNormalization:!a.normalize};a=n(o,l)}return s.set(o,a),ni(a)?await t(i,o,a.inputs[0]):await t(i,o,a),a};return{render(i,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},LC=(n,e)=>(t,s,r)=>{if(e===null)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new e(t,s,r)}catch(i){throw i.name==="SyntaxError"?n():i}},jC=()=>new DOMException("","DataCloneError"),bf=n=>{const{port1:e,port2:t}=new MessageChannel;return new Promise(s=>{const r=()=>{t.onmessage=null,e.close(),t.close(),s()};t.onmessage=()=>r();try{e.postMessage(n,[n])}catch{}finally{r()}})},VC=(n,e,t,s,r,i,o,a,c,l,u)=>(h,d)=>{const f=o(h)?h:i(h);if(r.has(d)){const m=t();return Promise.reject(m)}try{r.add(d)}catch{}return e(c,()=>c(f))?f.decodeAudioData(d).then(m=>(bf(d).catch(()=>{}),e(a,()=>a(m))||u(m),n.add(m),m)):new Promise((m,p)=>{const g=async()=>{try{await bf(d)}catch{}},_=x=>{p(x),g()};try{f.decodeAudioData(d,x=>{typeof x.copyFromChannel!="function"&&(l(x),Lu(x)),n.add(x),g().then(()=>m(x))},x=>{_(x===null?s():x)})}catch(x){_(x)}})},zC=(n,e,t,s,r,i,o,a)=>(c,l)=>{const u=e.get(c);if(u===void 0)throw new Error("Missing the expected cycle count.");const h=i(c.context),d=a(h);if(u===l){if(e.delete(c),!d&&o(c)){const f=s(c),{outputs:m}=t(c);for(const p of m)if(So(p)){const g=s(p[0]);n(f,g,p[1],p[2])}else{const g=r(p[0]);f.connect(g,p[1])}}}else e.set(c,u-l)},UC={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},BC=(n,e,t,s,r,i,o)=>class extends n{constructor(c,l){const u=r(c),h={...UC,...l},d=s(u,h),f=i(u),m=f?t(h.maxDelayTime):null;super(c,!1,d,m),this._delayTime=e(this,f,d.delayTime),o(this,h.maxDelayTime)}get delayTime(){return this._delayTime}},WC=(n,e,t,s,r)=>i=>{const o=new WeakMap,a=async(c,l)=>{let u=t(c);const h=yt(u,l);if(!h){const d={channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,delayTime:u.delayTime.value,maxDelayTime:i};u=e(l,d)}return o.set(l,u),h?await n(l,c.delayTime,u.delayTime):await s(l,c.delayTime,u.delayTime),await r(c,l,u),u};return{render(c,l){const u=o.get(l);return u!==void 0?Promise.resolve(u):a(c,l)}}},qC=n=>(e,t,s,r)=>n(e[r],i=>i[0]===t&&i[1]===s),HC=n=>(e,t)=>{n(e).delete(t)},YC=n=>"delayTime"in n,GC=(n,e,t)=>function s(r,i){const o=Aa(i)?i:t(n,i);if(YC(o))return[];if(r[0]===o)return[r];if(r.includes(o))return[];const{outputs:a}=e(o);return Array.from(a).map(c=>s([...r,o],c[0])).reduce((c,l)=>c.concat(l),[])},Qo=(n,e,t)=>{const s=e[t];if(s===void 0)throw n();return s},XC=n=>(e,t=void 0,s=void 0,r=0)=>t===void 0?e.forEach(i=>i.disconnect()):typeof t=="number"?Qo(n,e,t).disconnect():Da(t)?s===void 0?e.forEach(i=>i.disconnect(t)):r===void 0?Qo(n,e,s).disconnect(t,0):Qo(n,e,s).disconnect(t,0,r):s===void 0?e.forEach(i=>i.disconnect(t)):Qo(n,e,s).disconnect(t,0),ZC={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},KC=(n,e,t,s,r,i,o,a)=>class extends n{constructor(l,u){const h=i(l),d={...ZC,...u},f=s(h,d),m=o(h),p=m?t():null;super(l,!1,f,p),this._attack=e(this,m,f.attack),this._knee=e(this,m,f.knee),this._nativeDynamicsCompressorNode=f,this._ratio=e(this,m,f.ratio),this._release=e(this,m,f.release),this._threshold=e(this,m,f.threshold),a(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(l){const u=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=l,l>2)throw this._nativeDynamicsCompressorNode.channelCount=u,r()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(l){const u=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=l,l==="max")throw this._nativeDynamicsCompressorNode.channelCountMode=u,r()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return typeof this._nativeDynamicsCompressorNode.reduction.value=="number"?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}},QC=(n,e,t,s,r)=>()=>{const i=new WeakMap,o=async(a,c)=>{let l=t(a);const u=yt(l,c);if(!u){const h={attack:l.attack.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,knee:l.knee.value,ratio:l.ratio.value,release:l.release.value,threshold:l.threshold.value};l=e(c,h)}return i.set(c,l),u?(await n(c,a.attack,l.attack),await n(c,a.knee,l.knee),await n(c,a.ratio,l.ratio),await n(c,a.release,l.release),await n(c,a.threshold,l.threshold)):(await s(c,a.attack,l.attack),await s(c,a.knee,l.knee),await s(c,a.ratio,l.ratio),await s(c,a.release,l.release),await s(c,a.threshold,l.threshold)),await r(a,c,l),l};return{render(a,c){const l=i.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},JC=()=>new DOMException("","EncodingError"),eS=n=>e=>new Promise((t,s)=>{if(n===null){s(new SyntaxError);return}const r=n.document.head;if(r===null)s(new SyntaxError);else{const i=n.document.createElement("script"),o=new Blob([e],{type:"application/javascript"}),a=URL.createObjectURL(o),c=n.onerror,l=()=>{n.onerror=c,URL.revokeObjectURL(a)};n.onerror=(u,h,d,f,m)=>{if(h===a||h===n.location.href&&d===1&&f===1)return l(),s(m),!1;if(c!==null)return c(u,h,d,f,m)},i.onerror=()=>{l(),s(new SyntaxError)},i.onload=()=>{l(),t()},i.src=a,i.type="module",r.appendChild(i)}}),tS=n=>class{constructor(t){this._nativeEventTarget=t,this._listeners=new WeakMap}addEventListener(t,s,r){if(s!==null){let i=this._listeners.get(s);i===void 0&&(i=n(this,s),typeof s=="function"&&this._listeners.set(s,i)),this._nativeEventTarget.addEventListener(t,i,r)}}dispatchEvent(t){return this._nativeEventTarget.dispatchEvent(t)}removeEventListener(t,s,r){const i=s===null?void 0:this._listeners.get(s);this._nativeEventTarget.removeEventListener(t,i===void 0?null:i,r)}},nS=n=>(e,t,s)=>{Object.defineProperties(n,{currentFrame:{configurable:!0,get(){return Math.round(e*t)}},currentTime:{configurable:!0,get(){return e}}});try{return s()}finally{n!==null&&(delete n.currentFrame,delete n.currentTime)}},sS=n=>async e=>{try{const t=await fetch(e);if(t.ok)return[await t.text(),t.url]}catch{}throw n()},rS={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},iS=(n,e,t,s,r,i)=>class extends n{constructor(a,c){const l=r(a),u={...rS,...c},h=s(l,u),d=i(l),f=d?t():null;super(a,!1,h,f),this._gain=e(this,d,h.gain,bt,Ct)}get gain(){return this._gain}},oS=(n,e,t,s,r)=>()=>{const i=new WeakMap,o=async(a,c)=>{let l=t(a);const u=yt(l,c);if(!u){const h={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,gain:l.gain.value};l=e(c,h)}return i.set(c,l),u?await n(c,a.gain,l.gain):await s(c,a.gain,l.gain),await r(a,c,l),l};return{render(a,c){const l=i.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},aS=(n,e)=>t=>e(n,t),cS=n=>e=>{const t=n(e);if(t.renderer===null)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return t.renderer},lS=n=>e=>{var t;return(t=n.get(e))!==null&&t!==void 0?t:0},uS=n=>e=>{const t=n(e);if(t.renderer===null)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return t.renderer},hS=n=>e=>n.get(e),lt=()=>new DOMException("","InvalidStateError"),dS=n=>e=>{const t=n.get(e);if(t===void 0)throw lt();return t},fS=(n,e)=>t=>{let s=n.get(t);if(s!==void 0)return s;if(e===null)throw new Error("Missing the native OfflineAudioContext constructor.");return s=new e(1,1,44100),n.set(t,s),s},pS=n=>e=>{const t=n.get(e);if(t===void 0)throw new Error("The context has no set of AudioWorkletNodes.");return t},dc=()=>new DOMException("","InvalidAccessError"),mS=n=>{n.getFrequencyResponse=(e=>(t,s,r)=>{if(t.length!==s.length||s.length!==r.length)throw dc();return e.call(n,t,s,r)})(n.getFrequencyResponse)},gS={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},_S=(n,e,t,s,r,i)=>class extends n{constructor(a,c){const l=s(a),u=r(l),h={...gS,...c},d=e(l,u?null:a.baseLatency,h),f=u?t(h.feedback,h.feedforward):null;super(a,!1,d,f),mS(d),this._nativeIIRFilterNode=d,i(this,1)}getFrequencyResponse(a,c,l){return this._nativeIIRFilterNode.getFrequencyResponse(a,c,l)}},am=(n,e,t,s,r,i,o,a,c,l,u)=>{const h=l.length;let d=a;for(let f=0;f{const r=t instanceof Float64Array?t:new Float64Array(t),i=s instanceof Float64Array?s:new Float64Array(s),o=r.length,a=i.length,c=Math.min(o,a);if(r[0]!==1){for(let m=0;m(i,o)=>{const a=new WeakMap;let c=null;const l=async(u,h)=>{let d=null,f=e(u);const m=yt(f,h);if(h.createIIRFilter===void 0?d=n(h,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):m||(f=h.createIIRFilter(o,i)),a.set(h,d===null?f:d),d!==null){if(c===null){if(t===null)throw new Error("Missing the native OfflineAudioContext constructor.");const g=new t(u.context.destination.channelCount,u.context.length,h.sampleRate);c=(async()=>{await s(u,g,g.destination);const _=await r(g);return yS(_,h,i,o)})()}const p=await c;return d.buffer=p,d.start(0),d}return await s(u,h,f),f};return{render(u,h){const d=a.get(h);return d!==void 0?Promise.resolve(d):l(u,h)}}},bS=(n,e,t,s,r,i)=>o=>(a,c)=>{const l=n.get(a);if(l===void 0){if(!o&&i(a)){const u=s(a),{outputs:h}=t(a);for(const d of h)if(So(d)){const f=s(d[0]);e(u,f,d[1],d[2])}else{const f=r(d[0]);u.disconnect(f,d[1])}}n.set(a,c)}else n.set(a,l+c)},xS=(n,e)=>t=>{const s=n.get(t);return e(s)||e(t)},wS=(n,e)=>t=>n.has(t)||e(t),kS=(n,e)=>t=>n.has(t)||e(t),TS=(n,e)=>t=>{const s=n.get(t);return e(s)||e(t)},ES=n=>e=>n!==null&&e instanceof n,CS=n=>e=>n!==null&&typeof n.AudioNode=="function"&&e instanceof n.AudioNode,SS=n=>e=>n!==null&&typeof n.AudioParam=="function"&&e instanceof n.AudioParam,OS=(n,e)=>t=>n(t)||e(t),AS=n=>e=>n!==null&&e instanceof n,PS=n=>n!==null&&n.isSecureContext,RS=(n,e,t,s)=>class extends n{constructor(i,o){const a=t(i),c=e(a,o);if(s(a))throw TypeError();super(i,!0,c,null),this._nativeMediaElementAudioSourceNode=c}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}},DS={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},MS=(n,e,t,s)=>class extends n{constructor(i,o){const a=t(i);if(s(a))throw new TypeError;const c={...DS,...o},l=e(a,c);super(i,!1,l,null),this._nativeMediaStreamAudioDestinationNode=l}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}},IS=(n,e,t,s)=>class extends n{constructor(i,o){const a=t(i),c=e(a,o);if(s(a))throw new TypeError;super(i,!0,c,null),this._nativeMediaStreamAudioSourceNode=c}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}},NS=(n,e,t)=>class extends n{constructor(r,i){const o=t(r),a=e(o,i);super(r,!0,a,null)}},$S=(n,e,t,s,r,i)=>class extends t{constructor(a,c){super(a),this._nativeContext=a,uc.set(this,a),s(a)&&r.set(a,new Set),this._destination=new n(this,c),this._listener=e(this,a),this._onstatechange=null}get currentTime(){return this._nativeContext.currentTime}get destination(){return this._destination}get listener(){return this._listener}get onstatechange(){return this._onstatechange}set onstatechange(a){const c=typeof a=="function"?i(this,a):null;this._nativeContext.onstatechange=c;const l=this._nativeContext.onstatechange;this._onstatechange=l!==null&&l===c?a:l}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}},Bi=n=>{const e=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const t=n.decodeAudioData(e.buffer,()=>{});return t===void 0?!1:(t.catch(()=>{}),!0)}catch{}return!1},FS=(n,e)=>(t,s,r)=>{const i=new Set;return t.connect=(o=>(a,c=0,l=0)=>{const u=i.size===0;if(e(a))return o.call(t,a,c,l),n(i,[a,c,l],h=>h[0]===a&&h[1]===c&&h[2]===l,!0),u&&s(),a;o.call(t,a,c),n(i,[a,c],h=>h[0]===a&&h[1]===c,!0),u&&s()})(t.connect),t.disconnect=(o=>(a,c,l)=>{const u=i.size>0;if(a===void 0)o.apply(t),i.clear();else if(typeof a=="number"){o.call(t,a);for(const d of i)d[1]===a&&i.delete(d)}else{e(a)?o.call(t,a,c,l):o.call(t,a,c);for(const d of i)d[0]===a&&(c===void 0||d[1]===c)&&(l===void 0||d[2]===l)&&i.delete(d)}const h=i.size===0;u&&h&&r()})(t.disconnect),t},Ue=(n,e,t)=>{const s=e[t];s!==void 0&&s!==n[t]&&(n[t]=s)},ot=(n,e)=>{Ue(n,e,"channelCount"),Ue(n,e,"channelCountMode"),Ue(n,e,"channelInterpretation")},xf=n=>typeof n.getFloatTimeDomainData=="function",LS=n=>{n.getFloatTimeDomainData=e=>{const t=new Uint8Array(e.length);n.getByteTimeDomainData(t);const s=Math.max(t.length,n.fftSize);for(let r=0;r(t,s)=>{const r=t.createAnalyser();if(ot(r,s),!(s.maxDecibels>s.minDecibels))throw e();return Ue(r,s,"fftSize"),Ue(r,s,"maxDecibels"),Ue(r,s,"minDecibels"),Ue(r,s,"smoothingTimeConstant"),n(xf,()=>xf(r))||LS(r),r},VS=n=>n===null?null:n.hasOwnProperty("AudioBuffer")?n.AudioBuffer:null,Ye=(n,e,t)=>{const s=e[t];s!==void 0&&s!==n[t].value&&(n[t].value=s)},zS=n=>{n.start=(e=>{let t=!1;return(s=0,r=0,i)=>{if(t)throw lt();e.call(n,s,r,i),t=!0}})(n.start)},zu=n=>{n.start=(e=>(t=0,s=0,r)=>{if(typeof r=="number"&&r<0||s<0||t<0)throw new RangeError("The parameters can't be negative.");e.call(n,t,s,r)})(n.start)},Uu=n=>{n.stop=(e=>(t=0)=>{if(t<0)throw new RangeError("The parameter can't be negative.");e.call(n,t)})(n.stop)},US=(n,e,t,s,r,i,o,a,c,l,u)=>(h,d)=>{const f=h.createBufferSource();return ot(f,d),Ye(f,d,"playbackRate"),Ue(f,d,"buffer"),Ue(f,d,"loop"),Ue(f,d,"loopEnd"),Ue(f,d,"loopStart"),e(t,()=>t(h))||zS(f),e(s,()=>s(h))||c(f),e(r,()=>r(h))||l(f,h),e(i,()=>i(h))||zu(f),e(o,()=>o(h))||u(f,h),e(a,()=>a(h))||Uu(f),n(h,f),f},BS=n=>n===null?null:n.hasOwnProperty("AudioContext")?n.AudioContext:n.hasOwnProperty("webkitAudioContext")?n.webkitAudioContext:null,WS=(n,e)=>(t,s,r)=>{const i=t.destination;if(i.channelCount!==s)try{i.channelCount=s}catch{}r&&i.channelCountMode!=="explicit"&&(i.channelCountMode="explicit"),i.maxChannelCount===0&&Object.defineProperty(i,"maxChannelCount",{value:s});const o=n(t,{channelCount:s,channelCountMode:i.channelCountMode,channelInterpretation:i.channelInterpretation,gain:1});return e(o,"channelCount",a=>()=>a.call(o),a=>c=>{a.call(o,c);try{i.channelCount=c}catch(l){if(c>i.maxChannelCount)throw l}}),e(o,"channelCountMode",a=>()=>a.call(o),a=>c=>{a.call(o,c),i.channelCountMode=c}),e(o,"channelInterpretation",a=>()=>a.call(o),a=>c=>{a.call(o,c),i.channelInterpretation=c}),Object.defineProperty(o,"maxChannelCount",{get:()=>i.maxChannelCount}),o.connect(i),o},qS=n=>n===null?null:n.hasOwnProperty("AudioWorkletNode")?n.AudioWorkletNode:null,HS=n=>{const{port1:e}=new MessageChannel;try{e.postMessage(n)}finally{e.close()}},YS=(n,e,t,s,r)=>(i,o,a,c,l,u)=>{if(a!==null)try{const h=new a(i,c,u),d=new Map;let f=null;if(Object.defineProperties(h,{channelCount:{get:()=>u.channelCount,set:()=>{throw n()}},channelCountMode:{get:()=>"explicit",set:()=>{throw n()}},onprocessorerror:{get:()=>f,set:m=>{typeof f=="function"&&h.removeEventListener("processorerror",f),f=typeof m=="function"?m:null,typeof f=="function"&&h.addEventListener("processorerror",f)}}}),h.addEventListener=(m=>(...p)=>{if(p[0]==="processorerror"){const g=typeof p[1]=="function"?p[1]:typeof p[1]=="object"&&p[1]!==null&&typeof p[1].handleEvent=="function"?p[1].handleEvent:null;if(g!==null){const _=d.get(p[1]);_!==void 0?p[1]=_:(p[1]=x=>{x.type==="error"?(Object.defineProperties(x,{type:{value:"processorerror"}}),g(x)):g(new ErrorEvent(p[0],{...x}))},d.set(g,p[1]))}}return m.call(h,"error",p[1],p[2]),m.call(h,...p)})(h.addEventListener),h.removeEventListener=(m=>(...p)=>{if(p[0]==="processorerror"){const g=d.get(p[1]);g!==void 0&&(d.delete(p[1]),p[1]=g)}return m.call(h,"error",p[1],p[2]),m.call(h,p[0],p[1],p[2])})(h.removeEventListener),u.numberOfOutputs!==0){const m=t(i,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return h.connect(m).connect(i.destination),r(h,()=>m.disconnect(),()=>m.connect(i.destination))}return h}catch(h){throw h.code===11?s():h}if(l===void 0)throw s();return HS(u),e(i,o,l,u)},cm=(n,e)=>n===null?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(n*e))))),GS=n=>new Promise((e,t)=>{const{port1:s,port2:r}=new MessageChannel;s.onmessage=({data:i})=>{s.close(),r.close(),e(i)},s.onmessageerror=({data:i})=>{s.close(),r.close(),t(i)},r.postMessage(n)}),XS=async(n,e)=>{const t=await GS(e);return new n(t)},ZS=(n,e,t,s)=>{let r=Vl.get(n);r===void 0&&(r=new WeakMap,Vl.set(n,r));const i=XS(t,s);return r.set(e,i),i},KS=(n,e,t,s,r,i,o,a,c,l,u,h,d)=>(f,m,p,g)=>{if(g.numberOfInputs===0&&g.numberOfOutputs===0)throw c();const _=Array.isArray(g.outputChannelCount)?g.outputChannelCount:Array.from(g.outputChannelCount);if(_.some(H=>H<1))throw c();if(_.length!==g.numberOfOutputs)throw e();if(g.channelCountMode!=="explicit")throw c();const x=g.channelCount*g.numberOfInputs,k=_.reduce((H,D)=>H+D,0),v=p.parameterDescriptors===void 0?0:p.parameterDescriptors.length;if(x+v>6||k>6)throw c();const b=new MessageChannel,T=[],E=[];for(let H=0;HH===void 0?0:H},maxValue:{get:()=>D===void 0?bt:D},minValue:{get:()=>P===void 0?Ct:P}}),w.push(se)}const C=s(f,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,x+v)}),S=cm(m,f.sampleRate),R=a(f,S,x+v,Math.max(1,k)),O=r(f,{channelCount:Math.max(1,k),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,k)}),L=[];for(let H=0;H{const P=w[D];return P.connect(C,0,x+D),P.start(0),[H,P.offset]}));C.connect(R);let q=g.channelInterpretation,z=null;const V=g.numberOfOutputs===0?[R]:L,U={get bufferSize(){return S},get channelCount(){return g.channelCount},set channelCount(H){throw t()},get channelCountMode(){return g.channelCountMode},set channelCountMode(H){throw t()},get channelInterpretation(){return q},set channelInterpretation(H){for(const D of T)D.channelInterpretation=H;q=H},get context(){return R.context},get inputs(){return T},get numberOfInputs(){return g.numberOfInputs},get numberOfOutputs(){return g.numberOfOutputs},get onprocessorerror(){return z},set onprocessorerror(H){typeof z=="function"&&U.removeEventListener("processorerror",z),z=typeof H=="function"?H:null,typeof z=="function"&&U.addEventListener("processorerror",z)},get parameters(){return j},get port(){return b.port2},addEventListener(...H){return R.addEventListener(H[0],H[1],H[2])},connect:n.bind(null,V),disconnect:l.bind(null,V),dispatchEvent(...H){return R.dispatchEvent(H[0])},removeEventListener(...H){return R.removeEventListener(H[0],H[1],H[2])}},X=new Map;b.port1.addEventListener=(H=>(...D)=>{if(D[0]==="message"){const P=typeof D[1]=="function"?D[1]:typeof D[1]=="object"&&D[1]!==null&&typeof D[1].handleEvent=="function"?D[1].handleEvent:null;if(P!==null){const J=X.get(D[1]);J!==void 0?D[1]=J:(D[1]=se=>{u(f.currentTime,f.sampleRate,()=>P(se))},X.set(P,D[1]))}}return H.call(b.port1,D[0],D[1],D[2])})(b.port1.addEventListener),b.port1.removeEventListener=(H=>(...D)=>{if(D[0]==="message"){const P=X.get(D[1]);P!==void 0&&(X.delete(D[1]),D[1]=P)}return H.call(b.port1,D[0],D[1],D[2])})(b.port1.removeEventListener);let Z=null;Object.defineProperty(b.port1,"onmessage",{get:()=>Z,set:H=>{typeof Z=="function"&&b.port1.removeEventListener("message",Z),Z=typeof H=="function"?H:null,typeof Z=="function"&&(b.port1.addEventListener("message",Z),b.port1.start())}}),p.prototype.port=b.port1;let Q=null;ZS(f,U,p,g).then(H=>Q=H);const F=Ia(g.numberOfInputs,g.channelCount),A=Ia(g.numberOfOutputs,_),M=p.parameterDescriptors===void 0?[]:p.parameterDescriptors.reduce((H,{name:D})=>({...H,[D]:new Float32Array(128)}),{});let Y=!0;const N=()=>{g.numberOfOutputs>0&&R.disconnect(O);for(let H=0,D=0;H{if(Q!==null){const P=h(U);for(let J=0;J{Ma(H,M,se,x+le,J)});for(let se=0;se{if(P[Qe].size>0)return W.set(Qe,S/128),ye;const fe=W.get(Qe);return fe===void 0?[]:(ye.every(Je=>Je.every(it=>it===0))&&(fe===1?W.delete(Qe):W.set(Qe,fe-1)),ye)});Y=u(f.currentTime+J/f.sampleRate,f.sampleRate,()=>Q.process(se,A,M));for(let ye=0,Qe=0;yeR.connect(re).connect(f.destination),ne=()=>{R.disconnect(re),re.disconnect()},ge=()=>{if(Y){ne(),g.numberOfOutputs>0&&R.connect(O);for(let H=0,D=0;H{Y&&(ie(),N()),oe=!1};return ie(),d(U,ge,te)},lm=(n,e)=>{const t=n.createBiquadFilter();return ot(t,e),Ye(t,e,"Q"),Ye(t,e,"detune"),Ye(t,e,"frequency"),Ye(t,e,"gain"),Ue(t,e,"type"),t},QS=(n,e)=>(t,s)=>{const r=t.createChannelMerger(s.numberOfInputs);return n!==null&&n.name==="webkitAudioContext"&&e(t,r),ot(r,s),r},JS=n=>{const e=n.numberOfOutputs;Object.defineProperty(n,"channelCount",{get:()=>e,set:t=>{if(t!==e)throw lt()}}),Object.defineProperty(n,"channelCountMode",{get:()=>"explicit",set:t=>{if(t!=="explicit")throw lt()}}),Object.defineProperty(n,"channelInterpretation",{get:()=>"discrete",set:t=>{if(t!=="discrete")throw lt()}})},Oo=(n,e)=>{const t=n.createChannelSplitter(e.numberOfOutputs);return ot(t,e),JS(t),t},eO=(n,e,t,s,r)=>(i,o)=>{if(i.createConstantSource===void 0)return t(i,o);const a=i.createConstantSource();return ot(a,o),Ye(a,o,"offset"),e(s,()=>s(i))||zu(a),e(r,()=>r(i))||Uu(a),n(i,a),a},si=(n,e)=>(n.connect=e.connect.bind(e),n.disconnect=e.disconnect.bind(e),n),tO=(n,e,t,s)=>(r,{offset:i,...o})=>{const a=r.createBuffer(1,2,44100),c=e(r,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),l=t(r,{...o,gain:i}),u=a.getChannelData(0);u[0]=1,u[1]=1,c.buffer=a,c.loop=!0;const h={get bufferSize(){},get channelCount(){return l.channelCount},set channelCount(m){l.channelCount=m},get channelCountMode(){return l.channelCountMode},set channelCountMode(m){l.channelCountMode=m},get channelInterpretation(){return l.channelInterpretation},set channelInterpretation(m){l.channelInterpretation=m},get context(){return l.context},get inputs(){return[]},get numberOfInputs(){return c.numberOfInputs},get numberOfOutputs(){return l.numberOfOutputs},get offset(){return l.gain},get onended(){return c.onended},set onended(m){c.onended=m},addEventListener(...m){return c.addEventListener(m[0],m[1],m[2])},dispatchEvent(...m){return c.dispatchEvent(m[0])},removeEventListener(...m){return c.removeEventListener(m[0],m[1],m[2])},start(m=0){c.start.call(c,m)},stop(m=0){c.stop.call(c,m)}},d=()=>c.connect(l),f=()=>c.disconnect(l);return n(r,c),s(si(h,l),d,f)},nO=(n,e)=>(t,s)=>{const r=t.createConvolver();if(ot(r,s),s.disableNormalization===r.normalize&&(r.normalize=!s.disableNormalization),Ue(r,s,"buffer"),s.channelCount>2||(e(r,"channelCount",i=>()=>i.call(r),i=>o=>{if(o>2)throw n();return i.call(r,o)}),s.channelCountMode==="max"))throw n();return e(r,"channelCountMode",i=>()=>i.call(r),i=>o=>{if(o==="max")throw n();return i.call(r,o)}),r},um=(n,e)=>{const t=n.createDelay(e.maxDelayTime);return ot(t,e),Ye(t,e,"delayTime"),t},sO=n=>(e,t)=>{const s=e.createDynamicsCompressor();if(ot(s,t),t.channelCount>2||t.channelCountMode==="max")throw n();return Ye(s,t,"attack"),Ye(s,t,"knee"),Ye(s,t,"ratio"),Ye(s,t,"release"),Ye(s,t,"threshold"),s},Mt=(n,e)=>{const t=n.createGain();return ot(t,e),Ye(t,e,"gain"),t},rO=n=>(e,t,s)=>{if(e.createIIRFilter===void 0)return n(e,t,s);const r=e.createIIRFilter(s.feedforward,s.feedback);return ot(r,s),r};function iO(n,e){const t=e[0]*e[0]+e[1]*e[1];return[(n[0]*e[0]+n[1]*e[1])/t,(n[1]*e[0]-n[0]*e[1])/t]}function oO(n,e){return[n[0]*e[0]-n[1]*e[1],n[0]*e[1]+n[1]*e[0]]}function wf(n,e){let t=[0,0];for(let s=n.length-1;s>=0;s-=1)t=oO(t,e),t[0]+=n[s];return t}const aO=(n,e,t,s)=>(r,i,{channelCount:o,channelCountMode:a,channelInterpretation:c,feedback:l,feedforward:u})=>{const h=cm(i,r.sampleRate),d=l instanceof Float64Array?l:new Float64Array(l),f=u instanceof Float64Array?u:new Float64Array(u),m=d.length,p=f.length,g=Math.min(m,p);if(m===0||m>20)throw s();if(d[0]===0)throw e();if(p===0||p>20)throw s();if(f[0]===0)throw e();if(d[0]!==1){for(let w=0;w{const C=w.inputBuffer,S=w.outputBuffer,R=C.numberOfChannels;for(let O=0;On.createMediaElementSource(e.mediaElement),lO=(n,e)=>{const t=n.createMediaStreamDestination();return ot(t,e),t.numberOfOutputs===1&&Object.defineProperty(t,"numberOfOutputs",{get:()=>0}),t},uO=(n,{mediaStream:e})=>{const t=e.getAudioTracks();t.sort((i,o)=>i.ido.id?1:0);const s=t.slice(0,1),r=n.createMediaStreamSource(new MediaStream(s));return Object.defineProperty(r,"mediaStream",{value:e}),r},hO=(n,e)=>(t,{mediaStreamTrack:s})=>{if(typeof t.createMediaStreamTrackSource=="function")return t.createMediaStreamTrackSource(s);const r=new MediaStream([s]),i=t.createMediaStreamSource(r);if(s.kind!=="audio")throw n();if(e(t))throw new TypeError;return i},dO=n=>n===null?null:n.hasOwnProperty("OfflineAudioContext")?n.OfflineAudioContext:n.hasOwnProperty("webkitOfflineAudioContext")?n.webkitOfflineAudioContext:null,fO=(n,e,t,s,r,i)=>(o,a)=>{const c=o.createOscillator();return ot(c,a),Ye(c,a,"detune"),Ye(c,a,"frequency"),a.periodicWave!==void 0?c.setPeriodicWave(a.periodicWave):Ue(c,a,"type"),e(t,()=>t(o))||zu(c),e(s,()=>s(o))||i(c,o),e(r,()=>r(o))||Uu(c),n(o,c),c},pO=n=>(e,t)=>{const s=e.createPanner();return s.orientationX===void 0?n(e,t):(ot(s,t),Ye(s,t,"orientationX"),Ye(s,t,"orientationY"),Ye(s,t,"orientationZ"),Ye(s,t,"positionX"),Ye(s,t,"positionY"),Ye(s,t,"positionZ"),Ue(s,t,"coneInnerAngle"),Ue(s,t,"coneOuterAngle"),Ue(s,t,"coneOuterGain"),Ue(s,t,"distanceModel"),Ue(s,t,"maxDistance"),Ue(s,t,"panningModel"),Ue(s,t,"refDistance"),Ue(s,t,"rolloffFactor"),s)},mO=(n,e,t,s,r,i,o,a,c,l)=>(u,{coneInnerAngle:h,coneOuterAngle:d,coneOuterGain:f,distanceModel:m,maxDistance:p,orientationX:g,orientationY:_,orientationZ:x,panningModel:k,positionX:v,positionY:b,positionZ:T,refDistance:E,rolloffFactor:w,...C})=>{const S=u.createPanner();if(C.channelCount>2||C.channelCountMode==="max")throw o();ot(S,C);const R={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},O=t(u,{...R,channelInterpretation:"speakers",numberOfInputs:6}),L=s(u,{...C,gain:1}),j=s(u,{...R,gain:1}),q=s(u,{...R,gain:0}),z=s(u,{...R,gain:0}),V=s(u,{...R,gain:0}),U=s(u,{...R,gain:0}),X=s(u,{...R,gain:0}),Z=r(u,256,6,1),Q=i(u,{...R,curve:new Float32Array([1,1]),oversample:"none"});let $=[g,_,x],F=[v,b,T];const A=new Float32Array(1);Z.onaudioprocess=({inputBuffer:W})=>{const oe=[c(W,A,0),c(W,A,1),c(W,A,2)];oe.some((ie,ne)=>ie!==$[ne])&&(S.setOrientation(...oe),$=oe);const re=[c(W,A,3),c(W,A,4),c(W,A,5)];re.some((ie,ne)=>ie!==F[ne])&&(S.setPosition(...re),F=re)},Object.defineProperty(q.gain,"defaultValue",{get:()=>0}),Object.defineProperty(z.gain,"defaultValue",{get:()=>0}),Object.defineProperty(V.gain,"defaultValue",{get:()=>0}),Object.defineProperty(U.gain,"defaultValue",{get:()=>0}),Object.defineProperty(X.gain,"defaultValue",{get:()=>0});const M={get bufferSize(){},get channelCount(){return S.channelCount},set channelCount(W){if(W>2)throw o();L.channelCount=W,S.channelCount=W},get channelCountMode(){return S.channelCountMode},set channelCountMode(W){if(W==="max")throw o();L.channelCountMode=W,S.channelCountMode=W},get channelInterpretation(){return S.channelInterpretation},set channelInterpretation(W){L.channelInterpretation=W,S.channelInterpretation=W},get coneInnerAngle(){return S.coneInnerAngle},set coneInnerAngle(W){S.coneInnerAngle=W},get coneOuterAngle(){return S.coneOuterAngle},set coneOuterAngle(W){S.coneOuterAngle=W},get coneOuterGain(){return S.coneOuterGain},set coneOuterGain(W){if(W<0||W>1)throw e();S.coneOuterGain=W},get context(){return S.context},get distanceModel(){return S.distanceModel},set distanceModel(W){S.distanceModel=W},get inputs(){return[L]},get maxDistance(){return S.maxDistance},set maxDistance(W){if(W<0)throw new RangeError;S.maxDistance=W},get numberOfInputs(){return S.numberOfInputs},get numberOfOutputs(){return S.numberOfOutputs},get orientationX(){return j.gain},get orientationY(){return q.gain},get orientationZ(){return z.gain},get panningModel(){return S.panningModel},set panningModel(W){S.panningModel=W},get positionX(){return V.gain},get positionY(){return U.gain},get positionZ(){return X.gain},get refDistance(){return S.refDistance},set refDistance(W){if(W<0)throw new RangeError;S.refDistance=W},get rolloffFactor(){return S.rolloffFactor},set rolloffFactor(W){if(W<0)throw new RangeError;S.rolloffFactor=W},addEventListener(...W){return L.addEventListener(W[0],W[1],W[2])},dispatchEvent(...W){return L.dispatchEvent(W[0])},removeEventListener(...W){return L.removeEventListener(W[0],W[1],W[2])}};h!==M.coneInnerAngle&&(M.coneInnerAngle=h),d!==M.coneOuterAngle&&(M.coneOuterAngle=d),f!==M.coneOuterGain&&(M.coneOuterGain=f),m!==M.distanceModel&&(M.distanceModel=m),p!==M.maxDistance&&(M.maxDistance=p),g!==M.orientationX.value&&(M.orientationX.value=g),_!==M.orientationY.value&&(M.orientationY.value=_),x!==M.orientationZ.value&&(M.orientationZ.value=x),k!==M.panningModel&&(M.panningModel=k),v!==M.positionX.value&&(M.positionX.value=v),b!==M.positionY.value&&(M.positionY.value=b),T!==M.positionZ.value&&(M.positionZ.value=T),E!==M.refDistance&&(M.refDistance=E),w!==M.rolloffFactor&&(M.rolloffFactor=w),($[0]!==1||$[1]!==0||$[2]!==0)&&S.setOrientation(...$),(F[0]!==0||F[1]!==0||F[2]!==0)&&S.setPosition(...F);const Y=()=>{L.connect(S),n(L,Q,0,0),Q.connect(j).connect(O,0,0),Q.connect(q).connect(O,0,1),Q.connect(z).connect(O,0,2),Q.connect(V).connect(O,0,3),Q.connect(U).connect(O,0,4),Q.connect(X).connect(O,0,5),O.connect(Z).connect(u.destination)},N=()=>{L.disconnect(S),a(L,Q,0,0),Q.disconnect(j),j.disconnect(O),Q.disconnect(q),q.disconnect(O),Q.disconnect(z),z.disconnect(O),Q.disconnect(V),V.disconnect(O),Q.disconnect(U),U.disconnect(O),Q.disconnect(X),X.disconnect(O),O.disconnect(Z),Z.disconnect(u.destination)};return l(si(M,S),Y,N)},gO=n=>(e,{disableNormalization:t,imag:s,real:r})=>{const i=s instanceof Float32Array?s:new Float32Array(s),o=r instanceof Float32Array?r:new Float32Array(r),a=e.createPeriodicWave(o,i,{disableNormalization:t});if(Array.from(s).length<2)throw n();return a},Ao=(n,e,t,s)=>n.createScriptProcessor(e,t,s),_O=(n,e)=>(t,s)=>{const r=s.channelCountMode;if(r==="clamped-max")throw e();if(t.createStereoPanner===void 0)return n(t,s);const i=t.createStereoPanner();return ot(i,s),Ye(i,s,"pan"),Object.defineProperty(i,"channelCountMode",{get:()=>r,set:o=>{if(o!==r)throw e()}}),i},yO=(n,e,t,s,r,i)=>{const a=new Float32Array([1,1]),c=Math.PI/2,l={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},u={...l,oversample:"none"},h=(m,p,g,_)=>{const x=new Float32Array(16385),k=new Float32Array(16385);for(let C=0;C<16385;C+=1){const S=C/16384*c;x[C]=Math.cos(S),k[C]=Math.sin(S)}const v=t(m,{...l,gain:0}),b=s(m,{...u,curve:x}),T=s(m,{...u,curve:a}),E=t(m,{...l,gain:0}),w=s(m,{...u,curve:k});return{connectGraph(){p.connect(v),p.connect(T.inputs===void 0?T:T.inputs[0]),p.connect(E),T.connect(g),g.connect(b.inputs===void 0?b:b.inputs[0]),g.connect(w.inputs===void 0?w:w.inputs[0]),b.connect(v.gain),w.connect(E.gain),v.connect(_,0,0),E.connect(_,0,1)},disconnectGraph(){p.disconnect(v),p.disconnect(T.inputs===void 0?T:T.inputs[0]),p.disconnect(E),T.disconnect(g),g.disconnect(b.inputs===void 0?b:b.inputs[0]),g.disconnect(w.inputs===void 0?w:w.inputs[0]),b.disconnect(v.gain),w.disconnect(E.gain),v.disconnect(_,0,0),E.disconnect(_,0,1)}}},d=(m,p,g,_)=>{const x=new Float32Array(16385),k=new Float32Array(16385),v=new Float32Array(16385),b=new Float32Array(16385),T=Math.floor(16385/2);for(let V=0;V<16385;V+=1)if(V>T){const U=(V-T)/(16384-T)*c;x[V]=Math.cos(U),k[V]=Math.sin(U),v[V]=0,b[V]=1}else{const U=V/(16384-T)*c;x[V]=1,k[V]=0,v[V]=Math.cos(U),b[V]=Math.sin(U)}const E=e(m,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),w=t(m,{...l,gain:0}),C=s(m,{...u,curve:x}),S=t(m,{...l,gain:0}),R=s(m,{...u,curve:k}),O=s(m,{...u,curve:a}),L=t(m,{...l,gain:0}),j=s(m,{...u,curve:v}),q=t(m,{...l,gain:0}),z=s(m,{...u,curve:b});return{connectGraph(){p.connect(E),p.connect(O.inputs===void 0?O:O.inputs[0]),E.connect(w,0),E.connect(S,0),E.connect(L,1),E.connect(q,1),O.connect(g),g.connect(C.inputs===void 0?C:C.inputs[0]),g.connect(R.inputs===void 0?R:R.inputs[0]),g.connect(j.inputs===void 0?j:j.inputs[0]),g.connect(z.inputs===void 0?z:z.inputs[0]),C.connect(w.gain),R.connect(S.gain),j.connect(L.gain),z.connect(q.gain),w.connect(_,0,0),L.connect(_,0,0),S.connect(_,0,1),q.connect(_,0,1)},disconnectGraph(){p.disconnect(E),p.disconnect(O.inputs===void 0?O:O.inputs[0]),E.disconnect(w,0),E.disconnect(S,0),E.disconnect(L,1),E.disconnect(q,1),O.disconnect(g),g.disconnect(C.inputs===void 0?C:C.inputs[0]),g.disconnect(R.inputs===void 0?R:R.inputs[0]),g.disconnect(j.inputs===void 0?j:j.inputs[0]),g.disconnect(z.inputs===void 0?z:z.inputs[0]),C.disconnect(w.gain),R.disconnect(S.gain),j.disconnect(L.gain),z.disconnect(q.gain),w.disconnect(_,0,0),L.disconnect(_,0,0),S.disconnect(_,0,1),q.disconnect(_,0,1)}}},f=(m,p,g,_,x)=>{if(p===1)return h(m,g,_,x);if(p===2)return d(m,g,_,x);throw r()};return(m,{channelCount:p,channelCountMode:g,pan:_,...x})=>{if(g==="max")throw r();const k=n(m,{...x,channelCount:1,channelCountMode:g,numberOfInputs:2}),v=t(m,{...x,channelCount:p,channelCountMode:g,gain:1}),b=t(m,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:_});let{connectGraph:T,disconnectGraph:E}=f(m,p,v,b,k);Object.defineProperty(b.gain,"defaultValue",{get:()=>0}),Object.defineProperty(b.gain,"maxValue",{get:()=>1}),Object.defineProperty(b.gain,"minValue",{get:()=>-1});const w={get bufferSize(){},get channelCount(){return v.channelCount},set channelCount(O){v.channelCount!==O&&(C&&E(),{connectGraph:T,disconnectGraph:E}=f(m,O,v,b,k),C&&T()),v.channelCount=O},get channelCountMode(){return v.channelCountMode},set channelCountMode(O){if(O==="clamped-max"||O==="max")throw r();v.channelCountMode=O},get channelInterpretation(){return v.channelInterpretation},set channelInterpretation(O){v.channelInterpretation=O},get context(){return v.context},get inputs(){return[v]},get numberOfInputs(){return v.numberOfInputs},get numberOfOutputs(){return v.numberOfOutputs},get pan(){return b.gain},addEventListener(...O){return v.addEventListener(O[0],O[1],O[2])},dispatchEvent(...O){return v.dispatchEvent(O[0])},removeEventListener(...O){return v.removeEventListener(O[0],O[1],O[2])}};let C=!1;const S=()=>{T(),C=!0},R=()=>{E(),C=!1};return i(si(w,k),S,R)}},vO=(n,e,t,s,r,i,o)=>(a,c)=>{const l=a.createWaveShaper();if(i!==null&&i.name==="webkitAudioContext"&&a.createGain().gain.automationRate===void 0)return t(a,c);ot(l,c);const u=c.curve===null||c.curve instanceof Float32Array?c.curve:new Float32Array(c.curve);if(u!==null&&u.length<2)throw e();Ue(l,{curve:u},"curve"),Ue(l,c,"oversample");let h=null,d=!1;return o(l,"curve",p=>()=>p.call(l),p=>g=>(p.call(l,g),d&&(s(g)&&h===null?h=n(a,l):!s(g)&&h!==null&&(h(),h=null)),g)),r(l,()=>{d=!0,s(l.curve)&&(h=n(a,l))},()=>{d=!1,h!==null&&(h(),h=null)})},bO=(n,e,t,s,r)=>(i,{curve:o,oversample:a,...c})=>{const l=i.createWaveShaper(),u=i.createWaveShaper();ot(l,c),ot(u,c);const h=t(i,{...c,gain:1}),d=t(i,{...c,gain:-1}),f=t(i,{...c,gain:1}),m=t(i,{...c,gain:-1});let p=null,g=!1,_=null;const x={get bufferSize(){},get channelCount(){return l.channelCount},set channelCount(b){h.channelCount=b,d.channelCount=b,l.channelCount=b,f.channelCount=b,u.channelCount=b,m.channelCount=b},get channelCountMode(){return l.channelCountMode},set channelCountMode(b){h.channelCountMode=b,d.channelCountMode=b,l.channelCountMode=b,f.channelCountMode=b,u.channelCountMode=b,m.channelCountMode=b},get channelInterpretation(){return l.channelInterpretation},set channelInterpretation(b){h.channelInterpretation=b,d.channelInterpretation=b,l.channelInterpretation=b,f.channelInterpretation=b,u.channelInterpretation=b,m.channelInterpretation=b},get context(){return l.context},get curve(){return _},set curve(b){if(b!==null&&b.length<2)throw e();if(b===null)l.curve=b,u.curve=b;else{const T=b.length,E=new Float32Array(T+2-T%2),w=new Float32Array(T+2-T%2);E[0]=b[0],w[0]=-b[T-1];const C=Math.ceil((T+1)/2),S=(T+1)/2-1;for(let R=1;R{h.connect(l).connect(f),h.connect(d).connect(u).connect(m).connect(f),g=!0,s(_)&&(p=n(i,h))},v=()=>{h.disconnect(l),l.disconnect(f),h.disconnect(d),d.disconnect(u),u.disconnect(m),m.disconnect(f),g=!1,p!==null&&(p(),p=null)};return r(si(x,f),k,v)},Tt=()=>new DOMException("","NotSupportedError"),xO={numberOfChannels:1},wO=(n,e,t,s,r)=>class extends n{constructor(o,a,c){let l;if(typeof o=="number"&&a!==void 0&&c!==void 0)l={length:a,numberOfChannels:o,sampleRate:c};else if(typeof o=="object")l=o;else throw new Error("The given parameters are not valid.");const{length:u,numberOfChannels:h,sampleRate:d}={...xO,...l},f=s(h,u,d);e(Bi,()=>Bi(f))||f.addEventListener("statechange",(()=>{let m=0;const p=g=>{this._state==="running"&&(m>0?(f.removeEventListener("statechange",p),g.stopImmediatePropagation(),this._waitForThePromiseToSettle(g)):m+=1)};return p})()),super(f,h),this._length=u,this._nativeOfflineAudioContext=f,this._state=null}get length(){return this._nativeOfflineAudioContext.length===void 0?this._length:this._nativeOfflineAudioContext.length}get state(){return this._state===null?this._nativeOfflineAudioContext.state:this._state}startRendering(){return this._state==="running"?Promise.reject(t()):(this._state="running",r(this.destination,this._nativeOfflineAudioContext).finally(()=>{this._state=null,tm(this)}))}_waitForThePromiseToSettle(o){this._state===null?this._nativeOfflineAudioContext.dispatchEvent(o):setTimeout(()=>this._waitForThePromiseToSettle(o))}},kO={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},TO=(n,e,t,s,r,i,o)=>class extends n{constructor(c,l){const u=r(c),h={...kO,...l},d=t(u,h),f=i(u),m=f?s():null,p=c.sampleRate/2;super(c,!1,d,m),this._detune=e(this,f,d.detune,153600,-153600),this._frequency=e(this,f,d.frequency,p,-p),this._nativeOscillatorNode=d,this._onended=null,this._oscillatorNodeRenderer=m,this._oscillatorNodeRenderer!==null&&h.periodicWave!==void 0&&(this._oscillatorNodeRenderer.periodicWave=h.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(c){const l=typeof c=="function"?o(this,c):null;this._nativeOscillatorNode.onended=l;const u=this._nativeOscillatorNode.onended;this._onended=u!==null&&u===l?c:u}get type(){return this._nativeOscillatorNode.type}set type(c){this._nativeOscillatorNode.type=c,this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(c){this._nativeOscillatorNode.setPeriodicWave(c),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=c)}start(c=0){if(this._nativeOscillatorNode.start(c),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.start=c),this.context.state!=="closed"){jr(this);const l=()=>{this._nativeOscillatorNode.removeEventListener("ended",l),Bn(this)&&Eo(this)};this._nativeOscillatorNode.addEventListener("ended",l)}}stop(c=0){this._nativeOscillatorNode.stop(c),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.stop=c)}},EO=(n,e,t,s,r)=>()=>{const i=new WeakMap;let o=null,a=null,c=null;const l=async(u,h)=>{let d=t(u);const f=yt(d,h);if(!f){const m={channelCount:d.channelCount,channelCountMode:d.channelCountMode,channelInterpretation:d.channelInterpretation,detune:d.detune.value,frequency:d.frequency.value,periodicWave:o===null?void 0:o,type:d.type};d=e(h,m),a!==null&&d.start(a),c!==null&&d.stop(c)}return i.set(h,d),f?(await n(h,u.detune,d.detune),await n(h,u.frequency,d.frequency)):(await s(h,u.detune,d.detune),await s(h,u.frequency,d.frequency)),await r(u,h,d),d};return{set periodicWave(u){o=u},set start(u){a=u},set stop(u){c=u},render(u,h){const d=i.get(h);return d!==void 0?Promise.resolve(d):l(u,h)}}},CO={channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,distanceModel:"inverse",maxDistance:1e4,orientationX:1,orientationY:0,orientationZ:0,panningModel:"equalpower",positionX:0,positionY:0,positionZ:0,refDistance:1,rolloffFactor:1},SO=(n,e,t,s,r,i,o)=>class extends n{constructor(c,l){const u=r(c),h={...CO,...l},d=t(u,h),f=i(u),m=f?s():null;super(c,!1,d,m),this._nativePannerNode=d,this._orientationX=e(this,f,d.orientationX,bt,Ct),this._orientationY=e(this,f,d.orientationY,bt,Ct),this._orientationZ=e(this,f,d.orientationZ,bt,Ct),this._positionX=e(this,f,d.positionX,bt,Ct),this._positionY=e(this,f,d.positionY,bt,Ct),this._positionZ=e(this,f,d.positionZ,bt,Ct),o(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(c){this._nativePannerNode.coneInnerAngle=c}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(c){this._nativePannerNode.coneOuterAngle=c}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(c){this._nativePannerNode.coneOuterGain=c}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(c){this._nativePannerNode.distanceModel=c}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(c){this._nativePannerNode.maxDistance=c}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(c){this._nativePannerNode.panningModel=c}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(c){this._nativePannerNode.refDistance=c}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(c){this._nativePannerNode.rolloffFactor=c}},OO=(n,e,t,s,r,i,o,a,c,l)=>()=>{const u=new WeakMap;let h=null;const d=async(f,m)=>{let p=null,g=i(f);const _={channelCount:g.channelCount,channelCountMode:g.channelCountMode,channelInterpretation:g.channelInterpretation},x={..._,coneInnerAngle:g.coneInnerAngle,coneOuterAngle:g.coneOuterAngle,coneOuterGain:g.coneOuterGain,distanceModel:g.distanceModel,maxDistance:g.maxDistance,panningModel:g.panningModel,refDistance:g.refDistance,rolloffFactor:g.rolloffFactor},k=yt(g,m);if("bufferSize"in g)p=s(m,{..._,gain:1});else if(!k){const v={...x,orientationX:g.orientationX.value,orientationY:g.orientationY.value,orientationZ:g.orientationZ.value,positionX:g.positionX.value,positionY:g.positionY.value,positionZ:g.positionZ.value};g=r(m,v)}if(u.set(m,p===null?g:p),p!==null){if(h===null){if(o===null)throw new Error("Missing the native OfflineAudioContext constructor.");const R=new o(6,f.context.length,m.sampleRate),O=e(R,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});O.connect(R.destination),h=(async()=>{const L=await Promise.all([f.orientationX,f.orientationY,f.orientationZ,f.positionX,f.positionY,f.positionZ].map(async(j,q)=>{const z=t(R,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:q===0?1:0});return await a(R,j,z.offset),z}));for(let j=0;j<6;j+=1)L[j].connect(O,0,j),L[j].start(0);return l(R)})()}const v=await h,b=s(m,{..._,gain:1});await c(f,m,b);const T=[];for(let R=0;Rj!==E[q])||L.some((j,q)=>j!==w[q])){E=O,w=L;const j=R/m.sampleRate;C.gain.setValueAtTime(0,j),C=s(m,{..._,gain:0}),S=r(m,{...x,orientationX:E[0],orientationY:E[1],orientationZ:E[2],positionX:w[0],positionY:w[1],positionZ:w[2]}),C.gain.setValueAtTime(1,j),b.connect(C).connect(S.inputs[0]),S.connect(p)}}return p}return k?(await n(m,f.orientationX,g.orientationX),await n(m,f.orientationY,g.orientationY),await n(m,f.orientationZ,g.orientationZ),await n(m,f.positionX,g.positionX),await n(m,f.positionY,g.positionY),await n(m,f.positionZ,g.positionZ)):(await a(m,f.orientationX,g.orientationX),await a(m,f.orientationY,g.orientationY),await a(m,f.orientationZ,g.orientationZ),await a(m,f.positionX,g.positionX),await a(m,f.positionY,g.positionY),await a(m,f.positionZ,g.positionZ)),ni(g)?await c(f,m,g.inputs[0]):await c(f,m,g),g};return{render(f,m){const p=u.get(m);return p!==void 0?Promise.resolve(p):d(f,m)}}},AO={disableNormalization:!1},PO=(n,e,t,s)=>class hm{constructor(i,o){const a=e(i),c=s({...AO,...o}),l=n(a,c);return t.add(l),l}static[Symbol.hasInstance](i){return i!==null&&typeof i=="object"&&Object.getPrototypeOf(i)===hm.prototype||t.has(i)}},RO=(n,e)=>(t,s,r)=>(n(s).replay(r),e(s,t,r)),DO=(n,e,t)=>async(s,r,i)=>{const o=n(s);await Promise.all(o.activeInputs.map((a,c)=>Array.from(a).map(async([l,u])=>{const d=await e(l).render(l,r),f=s.context.destination;!t(l)&&(s!==f||!t(s))&&d.connect(i,u,c)})).reduce((a,c)=>[...a,...c],[]))},MO=(n,e,t)=>async(s,r,i)=>{const o=e(s);await Promise.all(Array.from(o.activeInputs).map(async([a,c])=>{const u=await n(a).render(a,r);t(a)||u.connect(i,c)}))},IO=(n,e,t,s)=>r=>n(Bi,()=>Bi(r))?Promise.resolve(n(s,s)).then(i=>{if(!i){const o=t(r,512,0,1);r.oncomplete=()=>{o.onaudioprocess=null,o.disconnect()},o.onaudioprocess=()=>r.currentTime,o.connect(r.destination)}return r.startRendering()}):new Promise(i=>{const o=e(r,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});r.oncomplete=a=>{o.disconnect(),i(a.renderedBuffer)},o.connect(r.destination),r.startRendering()}),NO=n=>(e,t)=>{n.set(e,t)},$O=n=>(e,t)=>n.set(e,t),FO=(n,e,t,s,r,i,o,a)=>(c,l)=>t(c).render(c,l).then(()=>Promise.all(Array.from(s(l)).map(u=>t(u).render(u,l)))).then(()=>r(l)).then(u=>(typeof u.copyFromChannel!="function"?(o(u),Lu(u)):e(i,()=>i(u))||a(u),n.add(u),u)),LO={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},jO=(n,e,t,s,r,i)=>class extends n{constructor(a,c){const l=r(a),u={...LO,...c},h=t(l,u),d=i(l),f=d?s():null;super(a,!1,h,f),this._pan=e(this,d,h.pan)}get pan(){return this._pan}},VO=(n,e,t,s,r)=>()=>{const i=new WeakMap,o=async(a,c)=>{let l=t(a);const u=yt(l,c);if(!u){const h={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,pan:l.pan.value};l=e(c,h)}return i.set(c,l),u?await n(c,a.pan,l.pan):await s(c,a.pan,l.pan),ni(l)?await r(a,c,l.inputs[0]):await r(a,c,l),l};return{render(a,c){const l=i.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},zO=n=>()=>{if(n===null)return!1;try{new n({length:1,sampleRate:44100})}catch{return!1}return!0},UO=(n,e)=>async()=>{if(n===null)return!0;if(e===null)return!1;const t=new Blob(['class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),s=new e(1,128,44100),r=URL.createObjectURL(t);let i=!1,o=!1;try{await s.audioWorklet.addModule(r);const a=new n(s,"a",{numberOfOutputs:0}),c=s.createOscillator();a.port.onmessage=()=>i=!0,a.onprocessorerror=()=>o=!0,c.connect(a),c.start(0),await s.startRendering(),await new Promise(l=>setTimeout(l))}catch{}finally{URL.revokeObjectURL(r)}return i&&!o},BO=(n,e)=>()=>{if(e===null)return Promise.resolve(!1);const t=new e(1,1,44100),s=n(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise(r=>{t.oncomplete=()=>{s.disconnect(),r(t.currentTime!==0)},t.startRendering()})},WO=()=>new DOMException("","UnknownError"),qO={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},HO=(n,e,t,s,r,i,o)=>class extends n{constructor(c,l){const u=r(c),h={...qO,...l},d=t(u,h),m=i(u)?s():null;super(c,!0,d,m),this._isCurveNullified=!1,this._nativeWaveShaperNode=d,o(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(c){if(c===null)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(c.length<2)throw e();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=c}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(c){this._nativeWaveShaperNode.oversample=c}},YO=(n,e,t)=>()=>{const s=new WeakMap,r=async(i,o)=>{let a=e(i);if(!yt(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,curve:a.curve,oversample:a.oversample};a=n(o,l)}return s.set(o,a),ni(a)?await t(i,o,a.inputs[0]):await t(i,o,a),a};return{render(i,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},GO=()=>typeof window>"u"?null:window,XO=(n,e)=>t=>{t.copyFromChannel=(s,r,i=0)=>{const o=n(i),a=n(r);if(a>=t.numberOfChannels)throw e();const c=t.length,l=t.getChannelData(a),u=s.length;for(let h=o<0?-o:0;h+o{const o=n(i),a=n(r);if(a>=t.numberOfChannels)throw e();const c=t.length,l=t.getChannelData(a),u=s.length;for(let h=o<0?-o:0;h+oe=>{e.copyFromChannel=(t=>(s,r,i=0)=>{const o=n(i),a=n(r);if(o(s,r,i=0)=>{const o=n(i),a=n(r);if(o(e,t)=>{const s=t.createBuffer(1,1,44100);e.buffer===null&&(e.buffer=s),n(e,"buffer",r=>()=>{const i=r.call(e);return i===s?null:i},r=>i=>r.call(e,i===null?s:i))},QO=(n,e)=>(t,s)=>{s.channelCount=1,s.channelCountMode="explicit",Object.defineProperty(s,"channelCount",{get:()=>1,set:()=>{throw n()}}),Object.defineProperty(s,"channelCountMode",{get:()=>"explicit",set:()=>{throw n()}});const r=t.createBufferSource();e(s,()=>{const a=s.numberOfInputs;for(let c=0;cr.disconnect(s))},dm=(n,e,t)=>n.copyFromChannel===void 0?n.getChannelData(t)[0]:(n.copyFromChannel(e,t),e[0]),fm=n=>{if(n===null)return!1;const e=n.length;return e%2!==0?n[Math.floor(e/2)]!==0:n[e/2-1]+n[e/2]!==0},Po=(n,e,t,s)=>{let r=n;for(;!r.hasOwnProperty(e);)r=Object.getPrototypeOf(r);const{get:i,set:o}=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(n,e,{get:t(i),set:s(o)})},JO=n=>({...n,outputChannelCount:n.outputChannelCount!==void 0?n.outputChannelCount:n.numberOfInputs===1&&n.numberOfOutputs===1?[n.channelCount]:Array.from({length:n.numberOfOutputs},()=>1)}),e2=n=>({...n,channelCount:n.numberOfOutputs}),t2=n=>{const{imag:e,real:t}=n;return e===void 0?t===void 0?{...n,imag:[0,0],real:[0,0]}:{...n,imag:Array.from(t,()=>0),real:t}:t===void 0?{...n,imag:e,real:Array.from(e,()=>0)}:{...n,imag:e,real:t}},pm=(n,e,t)=>{try{n.setValueAtTime(e,t)}catch(s){if(s.code!==9)throw s;pm(n,e,t+1e-7)}},n2=n=>{const e=n.createBufferSource();e.start();try{e.start()}catch{return!0}return!1},s2=n=>{const e=n.createBufferSource(),t=n.createBuffer(1,1,44100);e.buffer=t;try{e.start(0,1)}catch{return!1}return!0},r2=n=>{const e=n.createBufferSource();e.start();try{e.stop()}catch{return!1}return!0},Bu=n=>{const e=n.createOscillator();try{e.start(-1)}catch(t){return t instanceof RangeError}return!1},mm=n=>{const e=n.createBuffer(1,1,44100),t=n.createBufferSource();t.buffer=e,t.start(),t.stop();try{return t.stop(),!0}catch{return!1}},Wu=n=>{const e=n.createOscillator();try{e.stop(-1)}catch(t){return t instanceof RangeError}return!1},i2=n=>{const{port1:e,port2:t}=new MessageChannel;try{e.postMessage(n)}finally{e.close(),t.close()}},o2=n=>{n.start=(e=>(t=0,s=0,r)=>{const i=n.buffer,o=i===null?s:Math.min(i.duration,s);i!==null&&o>i.duration-.5/n.context.sampleRate?e.call(n,t,0,0):e.call(n,t,o,r)})(n.start)},gm=(n,e)=>{const t=e.createGain();n.connect(t);const s=(r=>()=>{r.call(n,t),n.removeEventListener("ended",s)})(n.disconnect);n.addEventListener("ended",s),si(n,t),n.stop=(r=>{let i=!1;return(o=0)=>{if(i)try{r.call(n,o)}catch{t.gain.setValueAtTime(0,o)}else r.call(n,o),i=!0}})(n.stop)},ri=(n,e)=>t=>{const s={value:n};return Object.defineProperties(t,{currentTarget:s,target:s}),typeof e=="function"?e.call(n,t):e.handleEvent.call(n,t)},a2=SE(ir),c2=ME(ir),l2=qC(hc),_m=new WeakMap,u2=lS(_m),mn=xC(new Map,new WeakMap),Sn=GO(),ym=jS(mn,An),qu=cS(kt),ht=DO(kt,qu,Ks),h2=LE(ym,Ve,ht),Le=dS(uc),ns=dO(Sn),Re=AS(ns),vm=new WeakMap,bm=tS(ri),Ro=BS(Sn),Hu=ES(Ro),Yu=CS(Sn),xm=SS(Sn),Wi=qS(Sn),st=lC(OE(G0),DE(a2,c2,Pa,l2,Ra,kt,u2,To,Ve,ir,Bn,Ks,aa),mn,bS(Ll,Ra,kt,Ve,Ui,Bn),An,dc,Tt,zC(Pa,Ll,kt,Ve,Ui,Le,Bn,Re),GC(vm,kt,hn),bm,Le,Hu,Yu,xm,Re,Wi),d2=FE(st,h2,An,ym,Le,Re),Gu=new WeakSet,kf=VS(Sn),wm=IC(new Uint32Array(1)),Xu=XO(wm,An),Zu=ZO(wm),km=VE(Gu,mn,Tt,kf,ns,zO(kf),Xu,Zu),fc=IE(Mt),Tm=MO(qu,Co,Ks),Pn=OC(Tm),ii=US(fc,mn,n2,s2,r2,Bu,mm,Wu,o2,KO(Po),gm),Rn=RO(uS(Co),Tm),f2=BE(Pn,ii,Ve,Rn,ht),gn=uC(AE(X0),vm,Fu,hC,xE,wE,kE,TE,EE,Nl,H0,Ro,pm),p2=UE(st,f2,gn,lt,ii,Le,Re,ri),m2=QE(st,JE,An,lt,WS(Mt,Po),Le,Re,ht),g2=bC(Pn,lm,Ve,Rn,ht),or=$O(_m),_2=vC(st,gn,g2,dc,lm,Le,Re,or),As=FS(ir,Yu),y2=QO(lt,As),Ps=QS(Ro,y2),v2=TC(Ps,Ve,ht),b2=kC(st,v2,Ps,Le,Re),x2=SC(Oo,Ve,ht),w2=CC(st,x2,Oo,Le,Re,e2),k2=tO(fc,ii,Mt,As),oi=eO(fc,mn,k2,Bu,Wu),T2=MC(Pn,oi,Ve,Rn,ht),E2=DC(st,gn,T2,oi,Le,Re,ri),Em=nO(Tt,Po),C2=FC(Em,Ve,ht),S2=$C(st,C2,Em,Le,Re,or),O2=WC(Pn,um,Ve,Rn,ht),A2=BC(st,gn,O2,um,Le,Re,or),Cm=sO(Tt),P2=QC(Pn,Cm,Ve,Rn,ht),R2=KC(st,gn,P2,Cm,Tt,Le,Re,or),D2=oS(Pn,Mt,Ve,Rn,ht),M2=iS(st,gn,D2,Mt,Le,Re),I2=aO(dc,lt,Ao,Tt),pc=IO(mn,Mt,Ao,BO(Mt,ns)),N2=vS(ii,Ve,ns,ht,pc),$2=rO(I2),F2=_S(st,$2,N2,Le,Re,or),L2=eC(gn,Ps,oi,Ao,Tt,dm,Re,Po),Sm=new WeakMap,j2=$S(m2,L2,bm,Re,Sm,ri),Om=fO(fc,mn,Bu,mm,Wu,gm),V2=EO(Pn,Om,Ve,Rn,ht),z2=TO(st,gn,Om,V2,Le,Re,ri),Am=PC(ii),U2=bO(Am,lt,Mt,fm,As),mc=vO(Am,lt,U2,fm,As,Ro,Po),B2=mO(Pa,lt,Ps,Mt,Ao,mc,Tt,Ra,dm,As),Pm=pO(B2),W2=OO(Pn,Ps,oi,Mt,Pm,Ve,ns,Rn,ht,pc),q2=SO(st,gn,Pm,W2,Le,Re,or),H2=gO(An),Y2=PO(H2,Le,new WeakSet,t2),G2=yO(Ps,Oo,Mt,mc,Tt,As),Rm=_O(G2,Tt),X2=VO(Pn,Rm,Ve,Rn,ht),Z2=jO(st,gn,Rm,X2,Le,Re),K2=YO(mc,Ve,ht),Q2=HO(st,lt,mc,K2,Le,Re,or),Dm=PS(Sn),Ku=nS(Sn),Mm=new WeakMap,J2=fS(Mm,ns),eA=Dm?RE(mn,Tt,eS(Sn),Ku,sS(CE),Le,J2,Re,Wi,new WeakMap,new WeakMap,UO(Wi,ns),Sn):void 0,tA=OS(Hu,Re),nA=VC(Gu,mn,jC,JC,new WeakSet,Le,tA,Oa,Bi,Xu,Zu),Im=_C(eA,d2,km,p2,_2,b2,w2,E2,S2,nA,A2,R2,M2,F2,j2,z2,q2,Y2,Z2,Q2),sA=RS(st,cO,Le,Re),rA=MS(st,lO,Le,Re),iA=IS(st,uO,Le,Re),oA=hO(lt,Re),aA=NS(st,oA,Le),cA=KE(Im,lt,Tt,WO,sA,rA,iA,aA,Ro),Qu=pS(Sm),lA=NE(Qu),Nm=AC(An),uA=HC(Qu),$m=XC(An),Fm=new WeakMap,hA=aS(Fm,hn),dA=KS(Nm,An,lt,Ps,Oo,oi,Mt,Ao,Tt,$m,Ku,hA,As),fA=YS(lt,dA,Mt,Tt,As),pA=gC(Pn,Nm,ii,Ps,Oo,oi,Mt,uA,$m,Ku,Ve,Wi,ns,Rn,ht,pc),mA=hS(Mm),gA=NO(Fm),Tf=Dm?fC(lA,st,gn,pA,fA,kt,mA,Le,Re,Wi,JO,gA,i2,ri):void 0,_A=LC(Tt,ns),yA=FO(Gu,mn,qu,Qu,pc,Oa,Xu,Zu),vA=wO(Im,mn,lt,_A,yA),bA=xS(uc,Hu),xA=wS($u,Yu),wA=kS(Fu,xm),kA=TS(uc,Re);function zt(n){return typeof n>"u"}function ve(n){return!zt(n)}function TA(n){return typeof n=="function"}function xs(n){return typeof n=="number"}function Bs(n){return Object.prototype.toString.call(n)==="[object Object]"&&n.constructor===Object}function EA(n){return typeof n=="boolean"}function ln(n){return Array.isArray(n)}function Yn(n){return typeof n=="string"}function Jo(n){return Yn(n)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(n)}function me(n,e){if(!n)throw new Error(e)}function dn(n,e,t=1/0){if(!(e<=n&&n<=t))throw new RangeError(`Value must be within [${e}, ${t}], got: ${n}`)}function Lm(n){!n.isOffline&&n.state!=="running"&&Ju('The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.')}let jm=!1,Ef=!1;function Cf(n){jm=n}function CA(n){zt(n)&&jm&&!Ef&&(Ef=!0,Ju("Events scheduled inside of scheduled callbacks should use the passed in scheduling time. See https://github.com/Tonejs/Tone.js/wiki/Accurate-Timing"))}let Vm=console;function SA(...n){Vm.log(...n)}function Ju(...n){Vm.warn(...n)}function OA(n){return new cA(n)}function AA(n,e,t){return new vA(n,e,t)}const Ws=typeof self=="object"?self:null,PA=Ws&&(Ws.hasOwnProperty("AudioContext")||Ws.hasOwnProperty("webkitAudioContext"));function RA(n,e,t){return me(ve(Tf),"This node only works in a secure context (https or localhost)"),new Tf(n,e,t)}class DA{constructor(e,t,s,r){this._callback=e,this._type=t,this._minimumUpdateInterval=Math.max(128/(r||44100),.001),this.updateInterval=s,this._createClock()}_createWorker(){const e=new Blob([` +`,fE=new ae(0,0,0),of=1,pE=16777215,mE=50,gE=(n,e)=>{var i,o;if(!(n!=null&&n.ref_id)||!(e!=null&&e.ref_id))return!1;let t=!1;const s=n.guests,r=e.guests;return((i=n.children)!=null&&i.includes(e.ref_id)||(o=e.children)!=null&&o.includes(n.ref_id))&&(t=!0),(s!=null&&s.find(a=>a.ref_id===e.ref_id)||r!=null&&r.find(a=>a.ref_id===n.ref_id))&&(t=!0),t},Di=new ae(0,0,0),af=100,_E=600,yE=2e3,Qc={x:172.7392402058252,y:-239.04675366094037,z:-2e3},H0="14.8.49",cf=(n,e,t)=>({endTime:e,insertTime:t,type:"exponentialRampToValue",value:n}),lf=(n,e,t)=>({endTime:e,insertTime:t,type:"linearRampToValue",value:n}),Nl=(n,e)=>({startTime:e,type:"setValue",value:n}),Y0=(n,e,t)=>({duration:t,startTime:e,type:"setValueCurve",values:n}),G0=(n,e,{startTime:t,target:s,timeConstant:r})=>s+(e-s)*Math.exp((t-n)/r),wr=n=>n.type==="exponentialRampToValue",Sa=n=>n.type==="linearRampToValue",ls=n=>wr(n)||Sa(n),Iu=n=>n.type==="setValue",Fn=n=>n.type==="setValueCurve",Oa=(n,e,t,s)=>{const r=n[e];return r===void 0?s:ls(r)||Iu(r)?r.value:Fn(r)?r.values[r.values.length-1]:G0(t,Oa(n,e-1,r.startTime,s),r)},uf=(n,e,t,s,r)=>t===void 0?[s.insertTime,r]:ls(t)?[t.endTime,t.value]:Iu(t)?[t.startTime,t.value]:Fn(t)?[t.startTime+t.duration,t.values[t.values.length-1]]:[t.startTime,Oa(n,e-1,t.startTime,r)],$l=n=>n.type==="cancelAndHold",Fl=n=>n.type==="cancelScheduledValues",os=n=>$l(n)||Fl(n)?n.cancelTime:wr(n)||Sa(n)?n.endTime:n.startTime,hf=(n,e,t,{endTime:s,value:r})=>t===r?r:0t+(n-e)/(s-e)*(r-t),vE=(n,e)=>{const t=Math.floor(e),s=Math.ceil(e);return t===s?n[t]:(1-(e-t))*n[t]+(1-(s-e))*n[s]},bE=(n,{duration:e,startTime:t,values:s})=>{const r=(n-t)/e*(s.length-1);return vE(s,r)},Ko=n=>n.type==="setTarget";class xE{constructor(e){this._automationEvents=[],this._currenTime=0,this._defaultValue=e}[Symbol.iterator](){return this._automationEvents[Symbol.iterator]()}add(e){const t=os(e);if($l(e)||Fl(e)){const s=this._automationEvents.findIndex(i=>Fl(e)&&Fn(i)?i.startTime+i.duration>=t:os(i)>=t),r=this._automationEvents[s];if(s!==-1&&(this._automationEvents=this._automationEvents.slice(0,s)),$l(e)){const i=this._automationEvents[this._automationEvents.length-1];if(r!==void 0&&ls(r)){if(i!==void 0&&Ko(i))throw new Error("The internal list is malformed.");const o=i===void 0?r.insertTime:Fn(i)?i.startTime+i.duration:os(i),a=i===void 0?this._defaultValue:Fn(i)?i.values[i.values.length-1]:i.value,c=wr(r)?hf(t,o,a,r):df(t,o,a,r),l=wr(r)?cf(c,t,this._currenTime):lf(c,t,this._currenTime);this._automationEvents.push(l)}if(i!==void 0&&Ko(i)&&this._automationEvents.push(Nl(this.getValue(t),t)),i!==void 0&&Fn(i)&&i.startTime+i.duration>t){const o=t-i.startTime,a=(i.values.length-1)/i.duration,c=Math.max(2,1+Math.ceil(o*a)),l=o/(c-1)*a,u=i.values.slice(0,c);if(l<1)for(let h=1;hos(o)>t),r=s===-1?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[s-1];if(r!==void 0&&Fn(r)&&os(r)+r.duration>t)return!1;const i=wr(e)?cf(e.value,e.endTime,this._currenTime):Sa(e)?lf(e.value,t,this._currenTime):e;if(s===-1)this._automationEvents.push(i);else{if(Fn(e)&&t+e.duration>os(this._automationEvents[s]))return!1;this._automationEvents.splice(s,0,i)}}return!0}flush(e){const t=this._automationEvents.findIndex(s=>os(s)>e);if(t>1){const s=this._automationEvents.slice(t-1),r=s[0];Ko(r)&&s.unshift(Nl(Oa(this._automationEvents,t-2,r.startTime,this._defaultValue),r.startTime)),this._automationEvents=s}}getValue(e){if(this._automationEvents.length===0)return this._defaultValue;const t=this._automationEvents.findIndex(o=>os(o)>e),s=this._automationEvents[t],r=(t===-1?this._automationEvents.length:t)-1,i=this._automationEvents[r];if(i!==void 0&&Ko(i)&&(s===void 0||!ls(s)||s.insertTime>e))return G0(e,Oa(this._automationEvents,r-1,i.startTime,this._defaultValue),i);if(i!==void 0&&Iu(i)&&(s===void 0||!ls(s)))return i.value;if(i!==void 0&&Fn(i)&&(s===void 0||!ls(s)||i.startTime+i.duration>e))return e({cancelTime:n,type:"cancelAndHold"}),kE=n=>({cancelTime:n,type:"cancelScheduledValues"}),TE=(n,e)=>({endTime:e,type:"exponentialRampToValue",value:n}),EE=(n,e)=>({endTime:e,type:"linearRampToValue",value:n}),CE=(n,e,t)=>({startTime:e,target:n,timeConstant:t,type:"setTarget"}),SE=()=>new DOMException("","AbortError"),OE=n=>(e,t,[s,r,i],o)=>{n(e[r],[t,s,i],a=>a[0]===t&&a[1]===s,o)},AE=n=>(e,t,s)=>{const r=[];for(let i=0;i(e,t)=>{n.set(e,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:t})},Lr=new WeakSet,X0=new WeakMap,Nu=new WeakMap,Z0=new WeakMap,$u=new WeakMap,hc=new WeakMap,K0=new WeakMap,Ll=new WeakMap,jl=new WeakMap,Vl=new WeakMap,Q0={construct(){return Q0}},RE=n=>{try{const e=new Proxy(n,Q0);new e}catch{return!1}return!0},ff=/^import(?:(?:[\s]+[\w]+|(?:[\s]+[\w]+[\s]*,)?[\s]*\{[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?(?:[\s]*,[\s]*[\w]+(?:[\s]+as[\s]+[\w]+)?)*[\s]*}|(?:[\s]+[\w]+[\s]*,)?[\s]*\*[\s]+as[\s]+[\w]+)[\s]+from)?(?:[\s]*)("([^"\\]|\\.)+"|'([^'\\]|\\.)+')(?:[\s]*);?/,pf=(n,e)=>{const t=[];let s=n.replace(/^[\s]+/,""),r=s.match(ff);for(;r!==null;){const i=r[1].slice(1,-1),o=r[0].replace(/([\s]+)?;?$/,"").replace(i,new URL(i,e).toString());t.push(o),s=s.slice(r[0].length).replace(/^[\s]+/,""),r=s.match(ff)}return[t.join(";"),s]},mf=n=>{if(n!==void 0&&!Array.isArray(n))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},gf=n=>{if(!RE(n))throw new TypeError("The given value for processorCtor should be a constructor.");if(n.prototype===null||typeof n.prototype!="object")throw new TypeError("The given value for processorCtor should have a prototype.")},DE=(n,e,t,s,r,i,o,a,c,l,u,h,d)=>{let f=0;return(m,p,g={credentials:"omit"})=>{const _=u.get(m);if(_!==void 0&&_.has(p))return Promise.resolve();const w=l.get(m);if(w!==void 0){const v=w.get(p);if(v!==void 0)return v}const k=i(m),b=k.audioWorklet===void 0?r(p).then(([v,T])=>{const[E,x]=pf(v,T),C=`${E};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${x} +})})(window,'_AWGS')`;return t(C)}).then(()=>{const v=d._AWGS.pop();if(v===void 0)throw new SyntaxError;s(k.currentTime,k.sampleRate,()=>v(class{},void 0,(T,E)=>{if(T.trim()==="")throw e();const x=jl.get(k);if(x!==void 0){if(x.has(T))throw e();gf(E),mf(E.parameterDescriptors),x.set(T,E)}else gf(E),mf(E.parameterDescriptors),jl.set(k,new Map([[T,E]]))},k.sampleRate,void 0,void 0))}):Promise.all([r(p),Promise.resolve(n(h,h))]).then(([[v,T],E])=>{const x=f+1;f=x;const[C,S]=pf(v,T),j=`${C};((AudioWorkletProcessor,registerProcessor)=>{${S} +})(${E?"AudioWorkletProcessor":"class extends AudioWorkletProcessor {__b=new WeakSet();constructor(){super();(p=>p.postMessage=(q=>(m,t)=>q.call(p,m,t?t.filter(u=>!this.__b.has(u)):t))(p.postMessage))(this.port)}}"},(n,p)=>registerProcessor(n,class extends p{${E?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${E?"":"i.forEach(this.__c);o.forEach(this.__c);this.__c(Object.values(p));"}return super.process(i.map(j=>j.some(k=>k.length===0)?[]:j),o,p)}}));registerProcessor('__sac${x}',class extends AudioWorkletProcessor{process(){return !1}})`,W=new Blob([j],{type:"application/javascript; charset=utf-8"}),B=URL.createObjectURL(W);return k.audioWorklet.addModule(B,g).then(()=>{if(a(k))return k;const V=o(k);return V.audioWorklet.addModule(B,g).then(()=>V)}).then(V=>{if(c===null)throw new SyntaxError;try{new c(V,`__sac${x}`)}catch{throw new SyntaxError}}).finally(()=>URL.revokeObjectURL(B))});return w===void 0?l.set(m,new Map([[p,b]])):w.set(p,b),b.then(()=>{const v=u.get(m);v===void 0?u.set(m,new Set([p])):v.add(p)}).finally(()=>{const v=l.get(m);v!==void 0&&v.delete(p)}),b}},hn=(n,e)=>{const t=n.get(e);if(t===void 0)throw new Error("A value with the given key could not be found.");return t},dc=(n,e)=>{const t=Array.from(n).filter(e);if(t.length>1)throw Error("More than one element was found.");if(t.length===0)throw Error("No element was found.");const[s]=t;return n.delete(s),s},J0=(n,e,t,s)=>{const r=hn(n,e),i=dc(r,o=>o[0]===t&&o[1]===s);return r.size===0&&n.delete(e),i},To=n=>hn(K0,n),jr=n=>{if(Lr.has(n))throw new Error("The AudioNode is already stored.");Lr.add(n),To(n).forEach(e=>e(!0))},em=n=>"port"in n,Eo=n=>{if(!Lr.has(n))throw new Error("The AudioNode is not stored.");Lr.delete(n),To(n).forEach(e=>e(!1))},zl=(n,e)=>{!em(n)&&e.every(t=>t.size===0)&&Eo(n)},ME=(n,e,t,s,r,i,o,a,c,l,u,h,d)=>{const f=new WeakMap;return(m,p,g,_,w)=>{const{activeInputs:k,passiveInputs:b}=i(p),{outputs:v}=i(m),T=a(m),E=x=>{const C=c(p),S=c(m);if(x){const R=J0(b,m,g,_);n(k,m,R,!1),!w&&!h(m)&&t(S,C,g,_),d(p)&&jr(p)}else{const R=s(k,m,g,_);e(b,_,R,!1),!w&&!h(m)&&r(S,C,g,_);const O=o(p);if(O===0)u(p)&&zl(p,k);else{const L=f.get(p);L!==void 0&&clearTimeout(L),f.set(p,setTimeout(()=>{u(p)&&zl(p,k)},O*1e3))}}};return l(v,[p,g,_],x=>x[0]===p&&x[1]===g&&x[2]===_,!0)?(T.add(E),u(m)?n(k,m,[g,_,E],!0):e(b,_,[m,g,E],!0),!0):!1}},IE=n=>(e,t,[s,r,i],o)=>{const a=e.get(s);a===void 0?e.set(s,new Set([[r,t,i]])):n(a,[r,t,i],c=>c[0]===r&&c[1]===t,o)},NE=n=>(e,t)=>{const s=n(e,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});t.connect(s).connect(e.destination);const r=()=>{t.removeEventListener("ended",r),t.disconnect(s),s.disconnect()};t.addEventListener("ended",r)},$E=n=>(e,t)=>{n(e).add(t)},FE={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},LE=(n,e,t,s,r,i)=>class extends n{constructor(a,c){const l=r(a),u={...FE,...c},h=s(l,u),d=i(l)?e():null;super(a,!1,h,d),this._nativeAnalyserNode=h}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(a){this._nativeAnalyserNode.fftSize=a}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(a){const c=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=a,!(a>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=c,t()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(a){const c=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=a,!(this._nativeAnalyserNode.maxDecibels>a))throw this._nativeAnalyserNode.minDecibels=c,t()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(a){this._nativeAnalyserNode.smoothingTimeConstant=a}getByteFrequencyData(a){this._nativeAnalyserNode.getByteFrequencyData(a)}getByteTimeDomainData(a){this._nativeAnalyserNode.getByteTimeDomainData(a)}getFloatFrequencyData(a){this._nativeAnalyserNode.getFloatFrequencyData(a)}getFloatTimeDomainData(a){this._nativeAnalyserNode.getFloatTimeDomainData(a)}},yt=(n,e)=>n.context===e,jE=(n,e,t)=>()=>{const s=new WeakMap,r=async(i,o)=>{let a=e(i);if(!yt(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,fftSize:a.fftSize,maxDecibels:a.maxDecibels,minDecibels:a.minDecibels,smoothingTimeConstant:a.smoothingTimeConstant};a=n(o,l)}return s.set(o,a),await t(i,o,a),a};return{render(i,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},Aa=n=>{try{n.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},An=()=>new DOMException("","IndexSizeError"),Fu=n=>{n.getChannelData=(e=>t=>{try{return e.call(n,t)}catch(s){throw s.code===12?An():s}})(n.getChannelData)},VE={numberOfChannels:1},zE=(n,e,t,s,r,i,o,a)=>{let c=null;return class tm{constructor(u){if(r===null)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:h,numberOfChannels:d,sampleRate:f}={...VE,...u};c===null&&(c=new r(1,1,44100));const m=s!==null&&e(i,i)?new s({length:h,numberOfChannels:d,sampleRate:f}):c.createBuffer(d,h,f);if(m.numberOfChannels===0)throw t();return typeof m.copyFromChannel!="function"?(o(m),Fu(m)):e(Aa,()=>Aa(m))||a(m),n.add(m),m}static[Symbol.hasInstance](u){return u!==null&&typeof u=="object"&&Object.getPrototypeOf(u)===tm.prototype||n.has(u)}}},Ct=-34028234663852886e22,bt=-Ct,Bn=n=>Lr.has(n),UE={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},BE=(n,e,t,s,r,i,o,a)=>class extends n{constructor(l,u){const h=i(l),d={...UE,...u},f=r(h,d),m=o(h),p=m?e():null;super(l,!1,f,p),this._audioBufferSourceNodeRenderer=p,this._isBufferNullified=!1,this._isBufferSet=d.buffer!==null,this._nativeAudioBufferSourceNode=f,this._onended=null,this._playbackRate=t(this,m,f.playbackRate,bt,Ct)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(l){if(this._nativeAudioBufferSourceNode.buffer=l,l!==null){if(this._isBufferSet)throw s();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(l){this._nativeAudioBufferSourceNode.loop=l}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(l){this._nativeAudioBufferSourceNode.loopEnd=l}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(l){this._nativeAudioBufferSourceNode.loopStart=l}get onended(){return this._onended}set onended(l){const u=typeof l=="function"?a(this,l):null;this._nativeAudioBufferSourceNode.onended=u;const h=this._nativeAudioBufferSourceNode.onended;this._onended=h!==null&&h===u?l:h}get playbackRate(){return this._playbackRate}start(l=0,u=0,h){if(this._nativeAudioBufferSourceNode.start(l,u,h),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.start=h===void 0?[l,u]:[l,u,h]),this.context.state!=="closed"){jr(this);const d=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",d),Bn(this)&&Eo(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",d)}}stop(l=0){this._nativeAudioBufferSourceNode.stop(l),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.stop=l)}},WE=(n,e,t,s,r)=>()=>{const i=new WeakMap;let o=null,a=null;const c=async(l,u)=>{let h=t(l);const d=yt(h,u);if(!d){const f={buffer:h.buffer,channelCount:h.channelCount,channelCountMode:h.channelCountMode,channelInterpretation:h.channelInterpretation,loop:h.loop,loopEnd:h.loopEnd,loopStart:h.loopStart,playbackRate:h.playbackRate.value};h=e(u,f),o!==null&&h.start(...o),a!==null&&h.stop(a)}return i.set(u,h),d?await n(u,l.playbackRate,h.playbackRate):await s(u,l.playbackRate,h.playbackRate),await r(l,u,h),h};return{set start(l){o=l},set stop(l){a=l},render(l,u){const h=i.get(u);return h!==void 0?Promise.resolve(h):c(l,u)}}},qE=n=>"playbackRate"in n,HE=n=>"frequency"in n&&"gain"in n,YE=n=>"offset"in n,GE=n=>!("frequency"in n)&&"gain"in n,XE=n=>"detune"in n&&"frequency"in n,ZE=n=>"pan"in n,kt=n=>hn(X0,n),Co=n=>hn(Z0,n),Ul=(n,e)=>{const{activeInputs:t}=kt(n);t.forEach(r=>r.forEach(([i])=>{e.includes(n)||Ul(i,[...e,n])}));const s=qE(n)?[n.playbackRate]:em(n)?Array.from(n.parameters.values()):HE(n)?[n.Q,n.detune,n.frequency,n.gain]:YE(n)?[n.offset]:GE(n)?[n.gain]:XE(n)?[n.detune,n.frequency]:ZE(n)?[n.pan]:[];for(const r of s){const i=Co(r);i!==void 0&&i.activeInputs.forEach(([o])=>Ul(o,e))}Bn(n)&&Eo(n)},nm=n=>{Ul(n.destination,[])},KE=n=>n===void 0||typeof n=="number"||typeof n=="string"&&(n==="balanced"||n==="interactive"||n==="playback"),QE=(n,e,t,s,r,i,o,a,c)=>class extends n{constructor(u={}){if(c===null)throw new Error("Missing the native AudioContext constructor.");let h;try{h=new c(u)}catch(m){throw m.code===12&&m.message==="sampleRate is not in range"?t():m}if(h===null)throw s();if(!KE(u.latencyHint))throw new TypeError(`The provided value '${u.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(u.sampleRate!==void 0&&h.sampleRate!==u.sampleRate)throw t();super(h,2);const{latencyHint:d}=u,{sampleRate:f}=h;if(this._baseLatency=typeof h.baseLatency=="number"?h.baseLatency:d==="balanced"?512/f:d==="interactive"||d===void 0?256/f:d==="playback"?1024/f:Math.max(2,Math.min(128,Math.round(d*f/128)))*128/f,this._nativeAudioContext=h,c.name==="webkitAudioContext"?(this._nativeGainNode=h.createGain(),this._nativeOscillatorNode=h.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(h.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,h.state==="running"){this._state="suspended";const m=()=>{this._state==="suspended"&&(this._state=null),h.removeEventListener("statechange",m)};h.addEventListener("statechange",m)}}get baseLatency(){return this._baseLatency}get state(){return this._state!==null?this._state:this._nativeAudioContext.state}close(){return this.state==="closed"?this._nativeAudioContext.close().then(()=>{throw e()}):(this._state==="suspended"&&(this._state=null),this._nativeAudioContext.close().then(()=>{this._nativeGainNode!==null&&this._nativeOscillatorNode!==null&&(this._nativeOscillatorNode.stop(),this._nativeGainNode.disconnect(),this._nativeOscillatorNode.disconnect()),nm(this)}))}createMediaElementSource(u){return new r(this,{mediaElement:u})}createMediaStreamDestination(){return new i(this)}createMediaStreamSource(u){return new o(this,{mediaStream:u})}createMediaStreamTrackSource(u){return new a(this,{mediaStreamTrack:u})}resume(){return this._state==="suspended"?new Promise((u,h)=>{const d=()=>{this._nativeAudioContext.removeEventListener("statechange",d),this._nativeAudioContext.state==="running"?u():this.resume().then(u,h)};this._nativeAudioContext.addEventListener("statechange",d)}):this._nativeAudioContext.resume().catch(u=>{throw u===void 0||u.code===15?e():u})}suspend(){return this._nativeAudioContext.suspend().catch(u=>{throw u===void 0?e():u})}},JE=(n,e,t,s,r,i,o,a)=>class extends n{constructor(l,u){const h=i(l),d=o(h),f=r(h,u,d),m=d?e(a):null;super(l,!1,f,m),this._isNodeOfNativeOfflineAudioContext=d,this._nativeAudioDestinationNode=f}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(l){if(this._isNodeOfNativeOfflineAudioContext)throw s();if(l>this._nativeAudioDestinationNode.maxChannelCount)throw t();this._nativeAudioDestinationNode.channelCount=l}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(l){if(this._isNodeOfNativeOfflineAudioContext)throw s();this._nativeAudioDestinationNode.channelCountMode=l}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}},eC=n=>{const e=new WeakMap,t=async(s,r)=>{const i=r.destination;return e.set(r,i),await n(s,r,i),i};return{render(s,r){const i=e.get(r);return i!==void 0?Promise.resolve(i):t(s,r)}}},tC=(n,e,t,s,r,i,o,a)=>(c,l)=>{const u=l.listener,h=()=>{const v=new Float32Array(1),T=e(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),E=o(l);let x=!1,C=[0,0,-1,0,1,0],S=[0,0,0];const R=()=>{if(x)return;x=!0;const W=s(l,256,9,0);W.onaudioprocess=({inputBuffer:B})=>{const V=[i(B,v,0),i(B,v,1),i(B,v,2),i(B,v,3),i(B,v,4),i(B,v,5)];V.some((X,K)=>X!==C[K])&&(u.setOrientation(...V),C=V);const z=[i(B,v,6),i(B,v,7),i(B,v,8)];z.some((X,K)=>X!==S[K])&&(u.setPosition(...z),S=z)},T.connect(W)},O=W=>B=>{B!==C[W]&&(C[W]=B,u.setOrientation(...C))},L=W=>B=>{B!==S[W]&&(S[W]=B,u.setPosition(...S))},j=(W,B,V)=>{const z=t(l,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:B});z.connect(T,0,W),z.start(),Object.defineProperty(z.offset,"defaultValue",{get(){return B}});const X=n({context:c},E,z.offset,bt,Ct);return a(X,"value",K=>()=>K.call(X),K=>J=>{try{K.call(X,J)}catch($){if($.code!==9)throw $}R(),E&&V(J)}),X.cancelAndHoldAtTime=(K=>E?()=>{throw r()}:(...J)=>{const $=K.apply(X,J);return R(),$})(X.cancelAndHoldAtTime),X.cancelScheduledValues=(K=>E?()=>{throw r()}:(...J)=>{const $=K.apply(X,J);return R(),$})(X.cancelScheduledValues),X.exponentialRampToValueAtTime=(K=>E?()=>{throw r()}:(...J)=>{const $=K.apply(X,J);return R(),$})(X.exponentialRampToValueAtTime),X.linearRampToValueAtTime=(K=>E?()=>{throw r()}:(...J)=>{const $=K.apply(X,J);return R(),$})(X.linearRampToValueAtTime),X.setTargetAtTime=(K=>E?()=>{throw r()}:(...J)=>{const $=K.apply(X,J);return R(),$})(X.setTargetAtTime),X.setValueAtTime=(K=>E?()=>{throw r()}:(...J)=>{const $=K.apply(X,J);return R(),$})(X.setValueAtTime),X.setValueCurveAtTime=(K=>E?()=>{throw r()}:(...J)=>{const $=K.apply(X,J);return R(),$})(X.setValueCurveAtTime),X};return{forwardX:j(0,0,O(0)),forwardY:j(1,0,O(1)),forwardZ:j(2,-1,O(2)),positionX:j(6,0,L(0)),positionY:j(7,0,L(1)),positionZ:j(8,0,L(2)),upX:j(3,0,O(3)),upY:j(4,1,O(4)),upZ:j(5,0,O(5))}},{forwardX:d,forwardY:f,forwardZ:m,positionX:p,positionY:g,positionZ:_,upX:w,upY:k,upZ:b}=u.forwardX===void 0?h():u;return{get forwardX(){return d},get forwardY(){return f},get forwardZ(){return m},get positionX(){return p},get positionY(){return g},get positionZ(){return _},get upX(){return w},get upY(){return k},get upZ(){return b}}},Pa=n=>"context"in n,So=n=>Pa(n[0]),ir=(n,e,t,s)=>{for(const r of n)if(t(r)){if(s)return!1;throw Error("The set contains at least one similar element.")}return n.add(e),!0},_f=(n,e,[t,s],r)=>{ir(n,[e,t,s],i=>i[0]===e&&i[1]===t,r)},yf=(n,[e,t,s],r)=>{const i=n.get(e);i===void 0?n.set(e,new Set([[t,s]])):ir(i,[t,s],o=>o[0]===t,r)},ni=n=>"inputs"in n,Ra=(n,e,t,s)=>{if(ni(e)){const r=e.inputs[s];return n.connect(r,t,0),[r,t,0]}return n.connect(e,t,s),[e,t,s]},sm=(n,e,t)=>{for(const s of n)if(s[0]===e&&s[1]===t)return n.delete(s),s;return null},nC=(n,e,t)=>dc(n,s=>s[0]===e&&s[1]===t),rm=(n,e)=>{if(!To(n).delete(e))throw new Error("Missing the expected event listener.")},im=(n,e,t)=>{const s=hn(n,e),r=dc(s,i=>i[0]===t);return s.size===0&&n.delete(e),r},Da=(n,e,t,s)=>{ni(e)?n.disconnect(e.inputs[s],t,0):n.disconnect(e,t,s)},Ve=n=>hn(Nu,n),Ui=n=>hn($u,n),Ks=n=>Ll.has(n),aa=n=>!Lr.has(n),vf=(n,e)=>new Promise(t=>{if(e!==null)t(!0);else{const s=n.createScriptProcessor(256,1,1),r=n.createGain(),i=n.createBuffer(1,2,44100),o=i.getChannelData(0);o[0]=1,o[1]=1;const a=n.createBufferSource();a.buffer=i,a.loop=!0,a.connect(s).connect(n.destination),a.connect(r),a.disconnect(r),s.onaudioprocess=c=>{const l=c.inputBuffer.getChannelData(0);Array.prototype.some.call(l,u=>u===1)?t(!0):t(!1),a.stop(),s.onaudioprocess=null,a.disconnect(s),s.disconnect(n.destination)},a.start()}}),Jc=(n,e)=>{const t=new Map;for(const s of n)for(const r of s){const i=t.get(r);t.set(r,i===void 0?1:i+1)}t.forEach((s,r)=>e(r,s))},Ma=n=>"context"in n,sC=n=>{const e=new Map;n.connect=(t=>(s,r=0,i=0)=>{const o=Ma(s)?t(s,r,i):t(s,r),a=e.get(s);return a===void 0?e.set(s,[{input:i,output:r}]):a.every(c=>c.input!==i||c.output!==r)&&a.push({input:i,output:r}),o})(n.connect.bind(n)),n.disconnect=(t=>(s,r,i)=>{if(t.apply(n),s===void 0)e.clear();else if(typeof s=="number")for(const[o,a]of e){const c=a.filter(l=>l.output!==s);c.length===0?e.delete(o):e.set(o,c)}else if(e.has(s))if(r===void 0)e.delete(s);else{const o=e.get(s);if(o!==void 0){const a=o.filter(c=>c.output!==r&&(c.input!==i||i===void 0));a.length===0?e.delete(s):e.set(s,a)}}for(const[o,a]of e)a.forEach(c=>{Ma(o)?n.connect(o,c.output,c.input):n.connect(o,c.output)})})(n.disconnect)},rC=(n,e,t,s)=>{const{activeInputs:r,passiveInputs:i}=Co(e),{outputs:o}=kt(n),a=To(n),c=l=>{const u=Ve(n),h=Ui(e);if(l){const d=im(i,n,t);_f(r,n,d,!1),!s&&!Ks(n)&&u.connect(h,t)}else{const d=nC(r,n,t);yf(i,d,!1),!s&&!Ks(n)&&u.disconnect(h,t)}};return ir(o,[e,t],l=>l[0]===e&&l[1]===t,!0)?(a.add(c),Bn(n)?_f(r,n,[t,c],!0):yf(i,[n,t,c],!0),!0):!1},iC=(n,e,t,s)=>{const{activeInputs:r,passiveInputs:i}=kt(e),o=sm(r[s],n,t);return o===null?[J0(i,n,t,s)[2],!1]:[o[2],!0]},oC=(n,e,t)=>{const{activeInputs:s,passiveInputs:r}=Co(e),i=sm(s,n,t);return i===null?[im(r,n,t)[1],!1]:[i[2],!0]},Lu=(n,e,t,s,r)=>{const[i,o]=iC(n,t,s,r);if(i!==null&&(rm(n,i),o&&!e&&!Ks(n)&&Da(Ve(n),Ve(t),s,r)),Bn(t)){const{activeInputs:a}=kt(t);zl(t,a)}},ju=(n,e,t,s)=>{const[r,i]=oC(n,t,s);r!==null&&(rm(n,r),i&&!e&&!Ks(n)&&Ve(n).disconnect(Ui(t),s))},aC=(n,e)=>{const t=kt(n),s=[];for(const r of t.outputs)So(r)?Lu(n,e,...r):ju(n,e,...r),s.push(r[0]);return t.outputs.clear(),s},cC=(n,e,t)=>{const s=kt(n),r=[];for(const i of s.outputs)i[1]===t&&(So(i)?Lu(n,e,...i):ju(n,e,...i),r.push(i[0]),s.outputs.delete(i));return r},lC=(n,e,t,s,r)=>{const i=kt(n);return Array.from(i.outputs).filter(o=>o[0]===t&&(s===void 0||o[1]===s)&&(r===void 0||o[2]===r)).map(o=>(So(o)?Lu(n,e,...o):ju(n,e,...o),i.outputs.delete(o),o[0]))},uC=(n,e,t,s,r,i,o,a,c,l,u,h,d,f,m,p)=>class extends l{constructor(_,w,k,b){super(k),this._context=_,this._nativeAudioNode=k;const v=u(_);h(v)&&t(vf,()=>vf(v,p))!==!0&&sC(k),Nu.set(this,k),K0.set(this,new Set),_.state!=="closed"&&w&&jr(this),n(this,b,k)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(_){this._nativeAudioNode.channelCount=_}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(_){this._nativeAudioNode.channelCountMode=_}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(_){this._nativeAudioNode.channelInterpretation=_}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(_,w=0,k=0){if(w<0||w>=this._nativeAudioNode.numberOfOutputs)throw r();const b=u(this._context),v=m(b);if(d(_)||f(_))throw i();if(Pa(_)){const x=Ve(_);try{const S=Ra(this._nativeAudioNode,x,w,k),R=aa(this);(v||R)&&this._nativeAudioNode.disconnect(...S),this.context.state!=="closed"&&!R&&aa(_)&&jr(_)}catch(S){throw S.code===12?i():S}if(e(this,_,w,k,v)){const S=c([this],_);Jc(S,s(v))}return _}const T=Ui(_);if(T.name==="playbackRate"&&T.maxValue===1024)throw o();try{this._nativeAudioNode.connect(T,w),(v||aa(this))&&this._nativeAudioNode.disconnect(T,w)}catch(x){throw x.code===12?i():x}if(rC(this,_,w,v)){const x=c([this],_);Jc(x,s(v))}}disconnect(_,w,k){let b;const v=u(this._context),T=m(v);if(_===void 0)b=aC(this,T);else if(typeof _=="number"){if(_<0||_>=this.numberOfOutputs)throw r();b=cC(this,T,_)}else{if(w!==void 0&&(w<0||w>=this.numberOfOutputs)||Pa(_)&&k!==void 0&&(k<0||k>=_.numberOfInputs))throw r();if(b=lC(this,T,_,w,k),b.length===0)throw i()}for(const E of b){const x=c([this],E);Jc(x,a)}}},hC=(n,e,t,s,r,i,o,a,c,l,u,h,d)=>(f,m,p,g=null,_=null)=>{const w=p.value,k=new xE(w),b=m?s(k):null,v={get defaultValue(){return w},get maxValue(){return g===null?p.maxValue:g},get minValue(){return _===null?p.minValue:_},get value(){return p.value},set value(T){p.value=T,v.setValueAtTime(T,f.context.currentTime)},cancelAndHoldAtTime(T){if(typeof p.cancelAndHoldAtTime=="function")b===null&&k.flush(f.context.currentTime),k.add(r(T)),p.cancelAndHoldAtTime(T);else{const E=Array.from(k).pop();b===null&&k.flush(f.context.currentTime),k.add(r(T));const x=Array.from(k).pop();p.cancelScheduledValues(T),E!==x&&x!==void 0&&(x.type==="exponentialRampToValue"?p.exponentialRampToValueAtTime(x.value,x.endTime):x.type==="linearRampToValue"?p.linearRampToValueAtTime(x.value,x.endTime):x.type==="setValue"?p.setValueAtTime(x.value,x.startTime):x.type==="setValueCurve"&&p.setValueCurveAtTime(x.values,x.startTime,x.duration))}return v},cancelScheduledValues(T){return b===null&&k.flush(f.context.currentTime),k.add(i(T)),p.cancelScheduledValues(T),v},exponentialRampToValueAtTime(T,E){if(T===0)throw new RangeError;if(!Number.isFinite(E)||E<0)throw new RangeError;const x=f.context.currentTime;return b===null&&k.flush(x),Array.from(k).length===0&&(k.add(l(w,x)),p.setValueAtTime(w,x)),k.add(o(T,E)),p.exponentialRampToValueAtTime(T,E),v},linearRampToValueAtTime(T,E){const x=f.context.currentTime;return b===null&&k.flush(x),Array.from(k).length===0&&(k.add(l(w,x)),p.setValueAtTime(w,x)),k.add(a(T,E)),p.linearRampToValueAtTime(T,E),v},setTargetAtTime(T,E,x){return b===null&&k.flush(f.context.currentTime),k.add(c(T,E,x)),p.setTargetAtTime(T,E,x),v},setValueAtTime(T,E){return b===null&&k.flush(f.context.currentTime),k.add(l(T,E)),p.setValueAtTime(T,E),v},setValueCurveAtTime(T,E,x){const C=T instanceof Float32Array?T:new Float32Array(T);if(h!==null&&h.name==="webkitAudioContext"){const S=E+x,R=f.context.sampleRate,O=Math.ceil(E*R),L=Math.floor(S*R),j=L-O,W=new Float32Array(j);for(let V=0;V({replay(e){for(const t of n)if(t.type==="exponentialRampToValue"){const{endTime:s,value:r}=t;e.exponentialRampToValueAtTime(r,s)}else if(t.type==="linearRampToValue"){const{endTime:s,value:r}=t;e.linearRampToValueAtTime(r,s)}else if(t.type==="setTarget"){const{startTime:s,target:r,timeConstant:i}=t;e.setTargetAtTime(r,s,i)}else if(t.type==="setValue"){const{startTime:s,value:r}=t;e.setValueAtTime(r,s)}else if(t.type==="setValueCurve"){const{duration:s,startTime:r,values:i}=t;e.setValueCurveAtTime(i,r,s)}else throw new Error("Can't apply an unknown automation.")}});class om{constructor(e){this._map=new Map(e)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(e,t=null){return this._map.forEach((s,r)=>e.call(t,s,r,this))}get(e){return this._map.get(e)}has(e){return this._map.has(e)}keys(){return this._map.keys()}values(){return this._map.values()}}const fC={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}},pC=(n,e,t,s,r,i,o,a,c,l,u,h,d,f)=>class extends e{constructor(p,g,_){var w;const k=a(p),b=c(k),v=u({...fC,..._});d(v);const T=jl.get(k),E=T==null?void 0:T.get(g),x=b||k.state!=="closed"?k:(w=o(k))!==null&&w!==void 0?w:k,C=r(x,b?null:p.baseLatency,l,g,E,v),S=b?s(g,v,E):null;super(p,!0,C,S);const R=[];C.parameters.forEach((L,j)=>{const W=t(this,b,L);R.push([j,W])}),this._nativeAudioWorkletNode=C,this._onprocessorerror=null,this._parameters=new om(R),b&&n(k,this);const{activeInputs:O}=i(this);h(C,O)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(p){const g=typeof p=="function"?f(this,p):null;this._nativeAudioWorkletNode.onprocessorerror=g;const _=this._nativeAudioWorkletNode.onprocessorerror;this._onprocessorerror=_!==null&&_===g?p:_}get parameters(){return this._parameters===null?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}};function Ia(n,e,t,s,r){if(typeof n.copyFromChannel=="function")e[t].byteLength===0&&(e[t]=new Float32Array(128)),n.copyFromChannel(e[t],s,r);else{const i=n.getChannelData(s);if(e[t].byteLength===0)e[t]=i.slice(r,r+128);else{const o=new Float32Array(i.buffer,r*Float32Array.BYTES_PER_ELEMENT,128);e[t].set(o)}}}const am=(n,e,t,s,r)=>{typeof n.copyToChannel=="function"?e[t].byteLength!==0&&n.copyToChannel(e[t],s,r):e[t].byteLength!==0&&n.getChannelData(s).set(e[t],r)},Na=(n,e)=>{const t=[];for(let s=0;s{const t=hn(Vl,n),s=Ve(e);return hn(t,s)},gC=async(n,e,t,s,r,i,o)=>{const a=e===null?Math.ceil(n.context.length/128)*128:e.length,c=s.channelCount*s.numberOfInputs,l=r.reduce((g,_)=>g+_,0),u=l===0?null:t.createBuffer(l,a,t.sampleRate);if(i===void 0)throw new Error("Missing the processor constructor.");const h=kt(n),d=await mC(t,n),f=Na(s.numberOfInputs,s.channelCount),m=Na(s.numberOfOutputs,r),p=Array.from(n.parameters.keys()).reduce((g,_)=>({...g,[_]:new Float32Array(128)}),{});for(let g=0;g0&&e!==null)for(let _=0;_{Ia(e,p,_,c+w,g)});for(let _=0;_h.activeInputs[b].size===0?[]:k),w=o(g/t.sampleRate,t.sampleRate,()=>d.process(_,m,p));if(u!==null)for(let k=0,b=0;k(g,_,w)=>{const k=new WeakMap;let b=null;const v=async(T,E)=>{let x=u(T),C=null;const S=yt(x,E),R=Array.isArray(_.outputChannelCount)?_.outputChannelCount:Array.from(_.outputChannelCount);if(h===null){const O=R.reduce((B,V)=>B+V,0),L=r(E,{channelCount:Math.max(1,O),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,O)}),j=[];for(let B=0;B{const J=new d(X,Math.ceil(T.context.length/128)*128,E.sampleRate),$=[],F=[];for(let Y=0;Y<_.numberOfInputs;Y+=1)$.push(o(J,{channelCount:_.channelCount,channelCountMode:_.channelCountMode,channelInterpretation:_.channelInterpretation,gain:1})),F.push(r(J,{channelCount:_.channelCount,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:_.channelCount}));const A=await Promise.all(Array.from(T.parameters.values()).map(async Y=>{const N=i(J,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:Y.value});return await f(J,Y,N.offset),N})),I=s(J,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,V+z)});for(let Y=0;Y<_.numberOfInputs;Y+=1){$[Y].connect(F[Y]);for(let N=0;N<_.channelCount;N+=1)F[Y].connect(I,N,Y*_.channelCount+N)}for(const[Y,N]of A.entries())N.connect(I,0,V+Y),N.start(0);return I.connect(J.destination),await Promise.all($.map(Y=>m(T,J,Y))),p(J)})(),E,_,R,w,l)}const O=await b,L=t(E,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[j,W,B]=C;O!==null&&(L.buffer=O,L.start(0)),L.connect(j);for(let V=0,z=0;Vclass extends m{constructor(v,T){super(v,T),this._nativeContext=v,this._audioWorklet=n===void 0?void 0:{addModule:(E,x)=>n(this,E,x)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new e(this)}createBiquadFilter(){return new r(this)}createBuffer(v,T,E){return new t({length:T,numberOfChannels:v,sampleRate:E})}createBufferSource(){return new s(this)}createChannelMerger(v=6){return new i(this,{numberOfInputs:v})}createChannelSplitter(v=6){return new o(this,{numberOfOutputs:v})}createConstantSource(){return new a(this)}createConvolver(){return new c(this)}createDelay(v=1){return new u(this,{maxDelayTime:v})}createDynamicsCompressor(){return new h(this)}createGain(){return new d(this)}createIIRFilter(v,T){return new f(this,{feedback:T,feedforward:v})}createOscillator(){return new p(this)}createPanner(){return new g(this)}createPeriodicWave(v,T,E={disableNormalization:!1}){return new _(this,{...E,imag:T,real:v})}createStereoPanner(){return new w(this)}createWaveShaper(){return new k(this)}decodeAudioData(v,T,E){return l(this._nativeContext,v).then(x=>(typeof T=="function"&&T(x),x),x=>{throw typeof E=="function"&&E(x),x})}},vC={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},bC=(n,e,t,s,r,i,o,a)=>class extends n{constructor(l,u){const h=i(l),d={...vC,...u},f=r(h,d),m=o(h),p=m?t():null;super(l,!1,f,p),this._Q=e(this,m,f.Q,bt,Ct),this._detune=e(this,m,f.detune,1200*Math.log2(bt),-1200*Math.log2(bt)),this._frequency=e(this,m,f.frequency,l.sampleRate/2,0),this._gain=e(this,m,f.gain,40*Math.log10(bt),Ct),this._nativeBiquadFilterNode=f,a(this,1)}get detune(){return this._detune}get frequency(){return this._frequency}get gain(){return this._gain}get Q(){return this._Q}get type(){return this._nativeBiquadFilterNode.type}set type(l){this._nativeBiquadFilterNode.type=l}getFrequencyResponse(l,u,h){try{this._nativeBiquadFilterNode.getFrequencyResponse(l,u,h)}catch(d){throw d.code===11?s():d}if(l.length!==u.length||u.length!==h.length)throw s()}},xC=(n,e,t,s,r)=>()=>{const i=new WeakMap,o=async(a,c)=>{let l=t(a);const u=yt(l,c);if(!u){const h={Q:l.Q.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,detune:l.detune.value,frequency:l.frequency.value,gain:l.gain.value,type:l.type};l=e(c,h)}return i.set(c,l),u?(await n(c,a.Q,l.Q),await n(c,a.detune,l.detune),await n(c,a.frequency,l.frequency),await n(c,a.gain,l.gain)):(await s(c,a.Q,l.Q),await s(c,a.detune,l.detune),await s(c,a.frequency,l.frequency),await s(c,a.gain,l.gain)),await r(a,c,l),l};return{render(a,c){const l=i.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},wC=(n,e)=>(t,s)=>{const r=e.get(t);if(r!==void 0)return r;const i=n.get(t);if(i!==void 0)return i;try{const o=s();return o instanceof Promise?(n.set(t,o),o.catch(()=>!1).then(a=>(n.delete(t),e.set(t,a),a))):(e.set(t,o),o)}catch{return e.set(t,!1),!1}},kC={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},TC=(n,e,t,s,r)=>class extends n{constructor(o,a){const c=s(o),l={...kC,...a},u=t(c,l),h=r(c)?e():null;super(o,!1,u,h)}},EC=(n,e,t)=>()=>{const s=new WeakMap,r=async(i,o)=>{let a=e(i);if(!yt(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfInputs:a.numberOfInputs};a=n(o,l)}return s.set(o,a),await t(i,o,a),a};return{render(i,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},CC={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},SC=(n,e,t,s,r,i)=>class extends n{constructor(a,c){const l=s(a),u=i({...CC,...c}),h=t(l,u),d=r(l)?e():null;super(a,!1,h,d)}},OC=(n,e,t)=>()=>{const s=new WeakMap,r=async(i,o)=>{let a=e(i);if(!yt(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,numberOfOutputs:a.numberOfOutputs};a=n(o,l)}return s.set(o,a),await t(i,o,a),a};return{render(i,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},AC=n=>(e,t,s)=>n(t,e,s),PC=n=>(e,t,s=0,r=0)=>{const i=e[s];if(i===void 0)throw n();return Ma(t)?i.connect(t,0,r):i.connect(t,0)},RC=n=>(e,t)=>{const s=n(e,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),r=e.createBuffer(1,2,44100);return s.buffer=r,s.loop=!0,s.connect(t),s.start(),()=>{s.stop(),s.disconnect(t)}},DC={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},MC=(n,e,t,s,r,i,o)=>class extends n{constructor(c,l){const u=r(c),h={...DC,...l},d=s(u,h),f=i(u),m=f?t():null;super(c,!1,d,m),this._constantSourceNodeRenderer=m,this._nativeConstantSourceNode=d,this._offset=e(this,f,d.offset,bt,Ct),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(c){const l=typeof c=="function"?o(this,c):null;this._nativeConstantSourceNode.onended=l;const u=this._nativeConstantSourceNode.onended;this._onended=u!==null&&u===l?c:u}start(c=0){if(this._nativeConstantSourceNode.start(c),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.start=c),this.context.state!=="closed"){jr(this);const l=()=>{this._nativeConstantSourceNode.removeEventListener("ended",l),Bn(this)&&Eo(this)};this._nativeConstantSourceNode.addEventListener("ended",l)}}stop(c=0){this._nativeConstantSourceNode.stop(c),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.stop=c)}},IC=(n,e,t,s,r)=>()=>{const i=new WeakMap;let o=null,a=null;const c=async(l,u)=>{let h=t(l);const d=yt(h,u);if(!d){const f={channelCount:h.channelCount,channelCountMode:h.channelCountMode,channelInterpretation:h.channelInterpretation,offset:h.offset.value};h=e(u,f),o!==null&&h.start(o),a!==null&&h.stop(a)}return i.set(u,h),d?await n(u,l.offset,h.offset):await s(u,l.offset,h.offset),await r(l,u,h),h};return{set start(l){o=l},set stop(l){a=l},render(l,u){const h=i.get(u);return h!==void 0?Promise.resolve(h):c(l,u)}}},NC=n=>e=>(n[0]=e,n[0]),$C={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},FC=(n,e,t,s,r,i)=>class extends n{constructor(a,c){const l=s(a),u={...$C,...c},h=t(l,u),f=r(l)?e():null;super(a,!1,h,f),this._isBufferNullified=!1,this._nativeConvolverNode=h,u.buffer!==null&&i(this,u.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(a){if(this._nativeConvolverNode.buffer=a,a===null&&this._nativeConvolverNode.buffer!==null){const c=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=c.createBuffer(1,1,c.sampleRate),this._isBufferNullified=!0,i(this,0)}else this._isBufferNullified=!1,i(this,this._nativeConvolverNode.buffer===null?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(a){this._nativeConvolverNode.normalize=a}},LC=(n,e,t)=>()=>{const s=new WeakMap,r=async(i,o)=>{let a=e(i);if(!yt(a,o)){const l={buffer:a.buffer,channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,disableNormalization:!a.normalize};a=n(o,l)}return s.set(o,a),ni(a)?await t(i,o,a.inputs[0]):await t(i,o,a),a};return{render(i,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},jC=(n,e)=>(t,s,r)=>{if(e===null)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new e(t,s,r)}catch(i){throw i.name==="SyntaxError"?n():i}},VC=()=>new DOMException("","DataCloneError"),bf=n=>{const{port1:e,port2:t}=new MessageChannel;return new Promise(s=>{const r=()=>{t.onmessage=null,e.close(),t.close(),s()};t.onmessage=()=>r();try{e.postMessage(n,[n])}catch{}finally{r()}})},zC=(n,e,t,s,r,i,o,a,c,l,u)=>(h,d)=>{const f=o(h)?h:i(h);if(r.has(d)){const m=t();return Promise.reject(m)}try{r.add(d)}catch{}return e(c,()=>c(f))?f.decodeAudioData(d).then(m=>(bf(d).catch(()=>{}),e(a,()=>a(m))||u(m),n.add(m),m)):new Promise((m,p)=>{const g=async()=>{try{await bf(d)}catch{}},_=w=>{p(w),g()};try{f.decodeAudioData(d,w=>{typeof w.copyFromChannel!="function"&&(l(w),Fu(w)),n.add(w),g().then(()=>m(w))},w=>{_(w===null?s():w)})}catch(w){_(w)}})},UC=(n,e,t,s,r,i,o,a)=>(c,l)=>{const u=e.get(c);if(u===void 0)throw new Error("Missing the expected cycle count.");const h=i(c.context),d=a(h);if(u===l){if(e.delete(c),!d&&o(c)){const f=s(c),{outputs:m}=t(c);for(const p of m)if(So(p)){const g=s(p[0]);n(f,g,p[1],p[2])}else{const g=r(p[0]);f.connect(g,p[1])}}}else e.set(c,u-l)},BC={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},WC=(n,e,t,s,r,i,o)=>class extends n{constructor(c,l){const u=r(c),h={...BC,...l},d=s(u,h),f=i(u),m=f?t(h.maxDelayTime):null;super(c,!1,d,m),this._delayTime=e(this,f,d.delayTime),o(this,h.maxDelayTime)}get delayTime(){return this._delayTime}},qC=(n,e,t,s,r)=>i=>{const o=new WeakMap,a=async(c,l)=>{let u=t(c);const h=yt(u,l);if(!h){const d={channelCount:u.channelCount,channelCountMode:u.channelCountMode,channelInterpretation:u.channelInterpretation,delayTime:u.delayTime.value,maxDelayTime:i};u=e(l,d)}return o.set(l,u),h?await n(l,c.delayTime,u.delayTime):await s(l,c.delayTime,u.delayTime),await r(c,l,u),u};return{render(c,l){const u=o.get(l);return u!==void 0?Promise.resolve(u):a(c,l)}}},HC=n=>(e,t,s,r)=>n(e[r],i=>i[0]===t&&i[1]===s),YC=n=>(e,t)=>{n(e).delete(t)},GC=n=>"delayTime"in n,XC=(n,e,t)=>function s(r,i){const o=Pa(i)?i:t(n,i);if(GC(o))return[];if(r[0]===o)return[r];if(r.includes(o))return[];const{outputs:a}=e(o);return Array.from(a).map(c=>s([...r,o],c[0])).reduce((c,l)=>c.concat(l),[])},Qo=(n,e,t)=>{const s=e[t];if(s===void 0)throw n();return s},ZC=n=>(e,t=void 0,s=void 0,r=0)=>t===void 0?e.forEach(i=>i.disconnect()):typeof t=="number"?Qo(n,e,t).disconnect():Ma(t)?s===void 0?e.forEach(i=>i.disconnect(t)):r===void 0?Qo(n,e,s).disconnect(t,0):Qo(n,e,s).disconnect(t,0,r):s===void 0?e.forEach(i=>i.disconnect(t)):Qo(n,e,s).disconnect(t,0),KC={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},QC=(n,e,t,s,r,i,o,a)=>class extends n{constructor(l,u){const h=i(l),d={...KC,...u},f=s(h,d),m=o(h),p=m?t():null;super(l,!1,f,p),this._attack=e(this,m,f.attack),this._knee=e(this,m,f.knee),this._nativeDynamicsCompressorNode=f,this._ratio=e(this,m,f.ratio),this._release=e(this,m,f.release),this._threshold=e(this,m,f.threshold),a(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(l){const u=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=l,l>2)throw this._nativeDynamicsCompressorNode.channelCount=u,r()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(l){const u=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=l,l==="max")throw this._nativeDynamicsCompressorNode.channelCountMode=u,r()}get knee(){return this._knee}get ratio(){return this._ratio}get reduction(){return typeof this._nativeDynamicsCompressorNode.reduction.value=="number"?this._nativeDynamicsCompressorNode.reduction.value:this._nativeDynamicsCompressorNode.reduction}get release(){return this._release}get threshold(){return this._threshold}},JC=(n,e,t,s,r)=>()=>{const i=new WeakMap,o=async(a,c)=>{let l=t(a);const u=yt(l,c);if(!u){const h={attack:l.attack.value,channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,knee:l.knee.value,ratio:l.ratio.value,release:l.release.value,threshold:l.threshold.value};l=e(c,h)}return i.set(c,l),u?(await n(c,a.attack,l.attack),await n(c,a.knee,l.knee),await n(c,a.ratio,l.ratio),await n(c,a.release,l.release),await n(c,a.threshold,l.threshold)):(await s(c,a.attack,l.attack),await s(c,a.knee,l.knee),await s(c,a.ratio,l.ratio),await s(c,a.release,l.release),await s(c,a.threshold,l.threshold)),await r(a,c,l),l};return{render(a,c){const l=i.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},eS=()=>new DOMException("","EncodingError"),tS=n=>e=>new Promise((t,s)=>{if(n===null){s(new SyntaxError);return}const r=n.document.head;if(r===null)s(new SyntaxError);else{const i=n.document.createElement("script"),o=new Blob([e],{type:"application/javascript"}),a=URL.createObjectURL(o),c=n.onerror,l=()=>{n.onerror=c,URL.revokeObjectURL(a)};n.onerror=(u,h,d,f,m)=>{if(h===a||h===n.location.href&&d===1&&f===1)return l(),s(m),!1;if(c!==null)return c(u,h,d,f,m)},i.onerror=()=>{l(),s(new SyntaxError)},i.onload=()=>{l(),t()},i.src=a,i.type="module",r.appendChild(i)}}),nS=n=>class{constructor(t){this._nativeEventTarget=t,this._listeners=new WeakMap}addEventListener(t,s,r){if(s!==null){let i=this._listeners.get(s);i===void 0&&(i=n(this,s),typeof s=="function"&&this._listeners.set(s,i)),this._nativeEventTarget.addEventListener(t,i,r)}}dispatchEvent(t){return this._nativeEventTarget.dispatchEvent(t)}removeEventListener(t,s,r){const i=s===null?void 0:this._listeners.get(s);this._nativeEventTarget.removeEventListener(t,i===void 0?null:i,r)}},sS=n=>(e,t,s)=>{Object.defineProperties(n,{currentFrame:{configurable:!0,get(){return Math.round(e*t)}},currentTime:{configurable:!0,get(){return e}}});try{return s()}finally{n!==null&&(delete n.currentFrame,delete n.currentTime)}},rS=n=>async e=>{try{const t=await fetch(e);if(t.ok)return[await t.text(),t.url]}catch{}throw n()},iS={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},oS=(n,e,t,s,r,i)=>class extends n{constructor(a,c){const l=r(a),u={...iS,...c},h=s(l,u),d=i(l),f=d?t():null;super(a,!1,h,f),this._gain=e(this,d,h.gain,bt,Ct)}get gain(){return this._gain}},aS=(n,e,t,s,r)=>()=>{const i=new WeakMap,o=async(a,c)=>{let l=t(a);const u=yt(l,c);if(!u){const h={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,gain:l.gain.value};l=e(c,h)}return i.set(c,l),u?await n(c,a.gain,l.gain):await s(c,a.gain,l.gain),await r(a,c,l),l};return{render(a,c){const l=i.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},cS=(n,e)=>t=>e(n,t),lS=n=>e=>{const t=n(e);if(t.renderer===null)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return t.renderer},uS=n=>e=>{var t;return(t=n.get(e))!==null&&t!==void 0?t:0},hS=n=>e=>{const t=n(e);if(t.renderer===null)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return t.renderer},dS=n=>e=>n.get(e),lt=()=>new DOMException("","InvalidStateError"),fS=n=>e=>{const t=n.get(e);if(t===void 0)throw lt();return t},pS=(n,e)=>t=>{let s=n.get(t);if(s!==void 0)return s;if(e===null)throw new Error("Missing the native OfflineAudioContext constructor.");return s=new e(1,1,44100),n.set(t,s),s},mS=n=>e=>{const t=n.get(e);if(t===void 0)throw new Error("The context has no set of AudioWorkletNodes.");return t},fc=()=>new DOMException("","InvalidAccessError"),gS=n=>{n.getFrequencyResponse=(e=>(t,s,r)=>{if(t.length!==s.length||s.length!==r.length)throw fc();return e.call(n,t,s,r)})(n.getFrequencyResponse)},_S={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},yS=(n,e,t,s,r,i)=>class extends n{constructor(a,c){const l=s(a),u=r(l),h={..._S,...c},d=e(l,u?null:a.baseLatency,h),f=u?t(h.feedback,h.feedforward):null;super(a,!1,d,f),gS(d),this._nativeIIRFilterNode=d,i(this,1)}getFrequencyResponse(a,c,l){return this._nativeIIRFilterNode.getFrequencyResponse(a,c,l)}},cm=(n,e,t,s,r,i,o,a,c,l,u)=>{const h=l.length;let d=a;for(let f=0;f{const r=t instanceof Float64Array?t:new Float64Array(t),i=s instanceof Float64Array?s:new Float64Array(s),o=r.length,a=i.length,c=Math.min(o,a);if(r[0]!==1){for(let m=0;m(i,o)=>{const a=new WeakMap;let c=null;const l=async(u,h)=>{let d=null,f=e(u);const m=yt(f,h);if(h.createIIRFilter===void 0?d=n(h,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):m||(f=h.createIIRFilter(o,i)),a.set(h,d===null?f:d),d!==null){if(c===null){if(t===null)throw new Error("Missing the native OfflineAudioContext constructor.");const g=new t(u.context.destination.channelCount,u.context.length,h.sampleRate);c=(async()=>{await s(u,g,g.destination);const _=await r(g);return vS(_,h,i,o)})()}const p=await c;return d.buffer=p,d.start(0),d}return await s(u,h,f),f};return{render(u,h){const d=a.get(h);return d!==void 0?Promise.resolve(d):l(u,h)}}},xS=(n,e,t,s,r,i)=>o=>(a,c)=>{const l=n.get(a);if(l===void 0){if(!o&&i(a)){const u=s(a),{outputs:h}=t(a);for(const d of h)if(So(d)){const f=s(d[0]);e(u,f,d[1],d[2])}else{const f=r(d[0]);u.disconnect(f,d[1])}}n.set(a,c)}else n.set(a,l+c)},wS=(n,e)=>t=>{const s=n.get(t);return e(s)||e(t)},kS=(n,e)=>t=>n.has(t)||e(t),TS=(n,e)=>t=>n.has(t)||e(t),ES=(n,e)=>t=>{const s=n.get(t);return e(s)||e(t)},CS=n=>e=>n!==null&&e instanceof n,SS=n=>e=>n!==null&&typeof n.AudioNode=="function"&&e instanceof n.AudioNode,OS=n=>e=>n!==null&&typeof n.AudioParam=="function"&&e instanceof n.AudioParam,AS=(n,e)=>t=>n(t)||e(t),PS=n=>e=>n!==null&&e instanceof n,RS=n=>n!==null&&n.isSecureContext,DS=(n,e,t,s)=>class extends n{constructor(i,o){const a=t(i),c=e(a,o);if(s(a))throw TypeError();super(i,!0,c,null),this._nativeMediaElementAudioSourceNode=c}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}},MS={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},IS=(n,e,t,s)=>class extends n{constructor(i,o){const a=t(i);if(s(a))throw new TypeError;const c={...MS,...o},l=e(a,c);super(i,!1,l,null),this._nativeMediaStreamAudioDestinationNode=l}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}},NS=(n,e,t,s)=>class extends n{constructor(i,o){const a=t(i),c=e(a,o);if(s(a))throw new TypeError;super(i,!0,c,null),this._nativeMediaStreamAudioSourceNode=c}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}},$S=(n,e,t)=>class extends n{constructor(r,i){const o=t(r),a=e(o,i);super(r,!0,a,null)}},FS=(n,e,t,s,r,i)=>class extends t{constructor(a,c){super(a),this._nativeContext=a,hc.set(this,a),s(a)&&r.set(a,new Set),this._destination=new n(this,c),this._listener=e(this,a),this._onstatechange=null}get currentTime(){return this._nativeContext.currentTime}get destination(){return this._destination}get listener(){return this._listener}get onstatechange(){return this._onstatechange}set onstatechange(a){const c=typeof a=="function"?i(this,a):null;this._nativeContext.onstatechange=c;const l=this._nativeContext.onstatechange;this._onstatechange=l!==null&&l===c?a:l}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}},Bi=n=>{const e=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const t=n.decodeAudioData(e.buffer,()=>{});return t===void 0?!1:(t.catch(()=>{}),!0)}catch{}return!1},LS=(n,e)=>(t,s,r)=>{const i=new Set;return t.connect=(o=>(a,c=0,l=0)=>{const u=i.size===0;if(e(a))return o.call(t,a,c,l),n(i,[a,c,l],h=>h[0]===a&&h[1]===c&&h[2]===l,!0),u&&s(),a;o.call(t,a,c),n(i,[a,c],h=>h[0]===a&&h[1]===c,!0),u&&s()})(t.connect),t.disconnect=(o=>(a,c,l)=>{const u=i.size>0;if(a===void 0)o.apply(t),i.clear();else if(typeof a=="number"){o.call(t,a);for(const d of i)d[1]===a&&i.delete(d)}else{e(a)?o.call(t,a,c,l):o.call(t,a,c);for(const d of i)d[0]===a&&(c===void 0||d[1]===c)&&(l===void 0||d[2]===l)&&i.delete(d)}const h=i.size===0;u&&h&&r()})(t.disconnect),t},ze=(n,e,t)=>{const s=e[t];s!==void 0&&s!==n[t]&&(n[t]=s)},ot=(n,e)=>{ze(n,e,"channelCount"),ze(n,e,"channelCountMode"),ze(n,e,"channelInterpretation")},xf=n=>typeof n.getFloatTimeDomainData=="function",jS=n=>{n.getFloatTimeDomainData=e=>{const t=new Uint8Array(e.length);n.getByteTimeDomainData(t);const s=Math.max(t.length,n.fftSize);for(let r=0;r(t,s)=>{const r=t.createAnalyser();if(ot(r,s),!(s.maxDecibels>s.minDecibels))throw e();return ze(r,s,"fftSize"),ze(r,s,"maxDecibels"),ze(r,s,"minDecibels"),ze(r,s,"smoothingTimeConstant"),n(xf,()=>xf(r))||jS(r),r},zS=n=>n===null?null:n.hasOwnProperty("AudioBuffer")?n.AudioBuffer:null,Ye=(n,e,t)=>{const s=e[t];s!==void 0&&s!==n[t].value&&(n[t].value=s)},US=n=>{n.start=(e=>{let t=!1;return(s=0,r=0,i)=>{if(t)throw lt();e.call(n,s,r,i),t=!0}})(n.start)},Vu=n=>{n.start=(e=>(t=0,s=0,r)=>{if(typeof r=="number"&&r<0||s<0||t<0)throw new RangeError("The parameters can't be negative.");e.call(n,t,s,r)})(n.start)},zu=n=>{n.stop=(e=>(t=0)=>{if(t<0)throw new RangeError("The parameter can't be negative.");e.call(n,t)})(n.stop)},BS=(n,e,t,s,r,i,o,a,c,l,u)=>(h,d)=>{const f=h.createBufferSource();return ot(f,d),Ye(f,d,"playbackRate"),ze(f,d,"buffer"),ze(f,d,"loop"),ze(f,d,"loopEnd"),ze(f,d,"loopStart"),e(t,()=>t(h))||US(f),e(s,()=>s(h))||c(f),e(r,()=>r(h))||l(f,h),e(i,()=>i(h))||Vu(f),e(o,()=>o(h))||u(f,h),e(a,()=>a(h))||zu(f),n(h,f),f},WS=n=>n===null?null:n.hasOwnProperty("AudioContext")?n.AudioContext:n.hasOwnProperty("webkitAudioContext")?n.webkitAudioContext:null,qS=(n,e)=>(t,s,r)=>{const i=t.destination;if(i.channelCount!==s)try{i.channelCount=s}catch{}r&&i.channelCountMode!=="explicit"&&(i.channelCountMode="explicit"),i.maxChannelCount===0&&Object.defineProperty(i,"maxChannelCount",{value:s});const o=n(t,{channelCount:s,channelCountMode:i.channelCountMode,channelInterpretation:i.channelInterpretation,gain:1});return e(o,"channelCount",a=>()=>a.call(o),a=>c=>{a.call(o,c);try{i.channelCount=c}catch(l){if(c>i.maxChannelCount)throw l}}),e(o,"channelCountMode",a=>()=>a.call(o),a=>c=>{a.call(o,c),i.channelCountMode=c}),e(o,"channelInterpretation",a=>()=>a.call(o),a=>c=>{a.call(o,c),i.channelInterpretation=c}),Object.defineProperty(o,"maxChannelCount",{get:()=>i.maxChannelCount}),o.connect(i),o},HS=n=>n===null?null:n.hasOwnProperty("AudioWorkletNode")?n.AudioWorkletNode:null,YS=n=>{const{port1:e}=new MessageChannel;try{e.postMessage(n)}finally{e.close()}},GS=(n,e,t,s,r)=>(i,o,a,c,l,u)=>{if(a!==null)try{const h=new a(i,c,u),d=new Map;let f=null;if(Object.defineProperties(h,{channelCount:{get:()=>u.channelCount,set:()=>{throw n()}},channelCountMode:{get:()=>"explicit",set:()=>{throw n()}},onprocessorerror:{get:()=>f,set:m=>{typeof f=="function"&&h.removeEventListener("processorerror",f),f=typeof m=="function"?m:null,typeof f=="function"&&h.addEventListener("processorerror",f)}}}),h.addEventListener=(m=>(...p)=>{if(p[0]==="processorerror"){const g=typeof p[1]=="function"?p[1]:typeof p[1]=="object"&&p[1]!==null&&typeof p[1].handleEvent=="function"?p[1].handleEvent:null;if(g!==null){const _=d.get(p[1]);_!==void 0?p[1]=_:(p[1]=w=>{w.type==="error"?(Object.defineProperties(w,{type:{value:"processorerror"}}),g(w)):g(new ErrorEvent(p[0],{...w}))},d.set(g,p[1]))}}return m.call(h,"error",p[1],p[2]),m.call(h,...p)})(h.addEventListener),h.removeEventListener=(m=>(...p)=>{if(p[0]==="processorerror"){const g=d.get(p[1]);g!==void 0&&(d.delete(p[1]),p[1]=g)}return m.call(h,"error",p[1],p[2]),m.call(h,p[0],p[1],p[2])})(h.removeEventListener),u.numberOfOutputs!==0){const m=t(i,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return h.connect(m).connect(i.destination),r(h,()=>m.disconnect(),()=>m.connect(i.destination))}return h}catch(h){throw h.code===11?s():h}if(l===void 0)throw s();return YS(u),e(i,o,l,u)},lm=(n,e)=>n===null?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(n*e))))),XS=n=>new Promise((e,t)=>{const{port1:s,port2:r}=new MessageChannel;s.onmessage=({data:i})=>{s.close(),r.close(),e(i)},s.onmessageerror=({data:i})=>{s.close(),r.close(),t(i)},r.postMessage(n)}),ZS=async(n,e)=>{const t=await XS(e);return new n(t)},KS=(n,e,t,s)=>{let r=Vl.get(n);r===void 0&&(r=new WeakMap,Vl.set(n,r));const i=ZS(t,s);return r.set(e,i),i},QS=(n,e,t,s,r,i,o,a,c,l,u,h,d)=>(f,m,p,g)=>{if(g.numberOfInputs===0&&g.numberOfOutputs===0)throw c();const _=Array.isArray(g.outputChannelCount)?g.outputChannelCount:Array.from(g.outputChannelCount);if(_.some(H=>H<1))throw c();if(_.length!==g.numberOfOutputs)throw e();if(g.channelCountMode!=="explicit")throw c();const w=g.channelCount*g.numberOfInputs,k=_.reduce((H,D)=>H+D,0),b=p.parameterDescriptors===void 0?0:p.parameterDescriptors.length;if(w+b>6||k>6)throw c();const v=new MessageChannel,T=[],E=[];for(let H=0;HH===void 0?0:H},maxValue:{get:()=>D===void 0?bt:D},minValue:{get:()=>P===void 0?Ct:P}}),x.push(se)}const C=s(f,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,w+b)}),S=lm(m,f.sampleRate),R=a(f,S,w+b,Math.max(1,k)),O=r(f,{channelCount:Math.max(1,k),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,k)}),L=[];for(let H=0;H{const P=x[D];return P.connect(C,0,w+D),P.start(0),[H,P.offset]}));C.connect(R);let W=g.channelInterpretation,B=null;const V=g.numberOfOutputs===0?[R]:L,z={get bufferSize(){return S},get channelCount(){return g.channelCount},set channelCount(H){throw t()},get channelCountMode(){return g.channelCountMode},set channelCountMode(H){throw t()},get channelInterpretation(){return W},set channelInterpretation(H){for(const D of T)D.channelInterpretation=H;W=H},get context(){return R.context},get inputs(){return T},get numberOfInputs(){return g.numberOfInputs},get numberOfOutputs(){return g.numberOfOutputs},get onprocessorerror(){return B},set onprocessorerror(H){typeof B=="function"&&z.removeEventListener("processorerror",B),B=typeof H=="function"?H:null,typeof B=="function"&&z.addEventListener("processorerror",B)},get parameters(){return j},get port(){return v.port2},addEventListener(...H){return R.addEventListener(H[0],H[1],H[2])},connect:n.bind(null,V),disconnect:l.bind(null,V),dispatchEvent(...H){return R.dispatchEvent(H[0])},removeEventListener(...H){return R.removeEventListener(H[0],H[1],H[2])}},X=new Map;v.port1.addEventListener=(H=>(...D)=>{if(D[0]==="message"){const P=typeof D[1]=="function"?D[1]:typeof D[1]=="object"&&D[1]!==null&&typeof D[1].handleEvent=="function"?D[1].handleEvent:null;if(P!==null){const Q=X.get(D[1]);Q!==void 0?D[1]=Q:(D[1]=se=>{u(f.currentTime,f.sampleRate,()=>P(se))},X.set(P,D[1]))}}return H.call(v.port1,D[0],D[1],D[2])})(v.port1.addEventListener),v.port1.removeEventListener=(H=>(...D)=>{if(D[0]==="message"){const P=X.get(D[1]);P!==void 0&&(X.delete(D[1]),D[1]=P)}return H.call(v.port1,D[0],D[1],D[2])})(v.port1.removeEventListener);let K=null;Object.defineProperty(v.port1,"onmessage",{get:()=>K,set:H=>{typeof K=="function"&&v.port1.removeEventListener("message",K),K=typeof H=="function"?H:null,typeof K=="function"&&(v.port1.addEventListener("message",K),v.port1.start())}}),p.prototype.port=v.port1;let J=null;KS(f,z,p,g).then(H=>J=H);const F=Na(g.numberOfInputs,g.channelCount),A=Na(g.numberOfOutputs,_),I=p.parameterDescriptors===void 0?[]:p.parameterDescriptors.reduce((H,{name:D})=>({...H,[D]:new Float32Array(128)}),{});let Y=!0;const N=()=>{g.numberOfOutputs>0&&R.disconnect(O);for(let H=0,D=0;H{if(J!==null){const P=h(z);for(let Q=0;Q{Ia(H,I,se,w+le,Q)});for(let se=0;se{if(P[Qe].size>0)return q.set(Qe,S/128),ye;const fe=q.get(Qe);return fe===void 0?[]:(ye.every(Je=>Je.every(it=>it===0))&&(fe===1?q.delete(Qe):q.set(Qe,fe-1)),ye)});Y=u(f.currentTime+Q/f.sampleRate,f.sampleRate,()=>J.process(se,A,I));for(let ye=0,Qe=0;yeR.connect(re).connect(f.destination),ne=()=>{R.disconnect(re),re.disconnect()},ge=()=>{if(Y){ne(),g.numberOfOutputs>0&&R.connect(O);for(let H=0,D=0;H{Y&&(ie(),N()),oe=!1};return ie(),d(z,ge,te)},um=(n,e)=>{const t=n.createBiquadFilter();return ot(t,e),Ye(t,e,"Q"),Ye(t,e,"detune"),Ye(t,e,"frequency"),Ye(t,e,"gain"),ze(t,e,"type"),t},JS=(n,e)=>(t,s)=>{const r=t.createChannelMerger(s.numberOfInputs);return n!==null&&n.name==="webkitAudioContext"&&e(t,r),ot(r,s),r},eO=n=>{const e=n.numberOfOutputs;Object.defineProperty(n,"channelCount",{get:()=>e,set:t=>{if(t!==e)throw lt()}}),Object.defineProperty(n,"channelCountMode",{get:()=>"explicit",set:t=>{if(t!=="explicit")throw lt()}}),Object.defineProperty(n,"channelInterpretation",{get:()=>"discrete",set:t=>{if(t!=="discrete")throw lt()}})},Oo=(n,e)=>{const t=n.createChannelSplitter(e.numberOfOutputs);return ot(t,e),eO(t),t},tO=(n,e,t,s,r)=>(i,o)=>{if(i.createConstantSource===void 0)return t(i,o);const a=i.createConstantSource();return ot(a,o),Ye(a,o,"offset"),e(s,()=>s(i))||Vu(a),e(r,()=>r(i))||zu(a),n(i,a),a},si=(n,e)=>(n.connect=e.connect.bind(e),n.disconnect=e.disconnect.bind(e),n),nO=(n,e,t,s)=>(r,{offset:i,...o})=>{const a=r.createBuffer(1,2,44100),c=e(r,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),l=t(r,{...o,gain:i}),u=a.getChannelData(0);u[0]=1,u[1]=1,c.buffer=a,c.loop=!0;const h={get bufferSize(){},get channelCount(){return l.channelCount},set channelCount(m){l.channelCount=m},get channelCountMode(){return l.channelCountMode},set channelCountMode(m){l.channelCountMode=m},get channelInterpretation(){return l.channelInterpretation},set channelInterpretation(m){l.channelInterpretation=m},get context(){return l.context},get inputs(){return[]},get numberOfInputs(){return c.numberOfInputs},get numberOfOutputs(){return l.numberOfOutputs},get offset(){return l.gain},get onended(){return c.onended},set onended(m){c.onended=m},addEventListener(...m){return c.addEventListener(m[0],m[1],m[2])},dispatchEvent(...m){return c.dispatchEvent(m[0])},removeEventListener(...m){return c.removeEventListener(m[0],m[1],m[2])},start(m=0){c.start.call(c,m)},stop(m=0){c.stop.call(c,m)}},d=()=>c.connect(l),f=()=>c.disconnect(l);return n(r,c),s(si(h,l),d,f)},sO=(n,e)=>(t,s)=>{const r=t.createConvolver();if(ot(r,s),s.disableNormalization===r.normalize&&(r.normalize=!s.disableNormalization),ze(r,s,"buffer"),s.channelCount>2||(e(r,"channelCount",i=>()=>i.call(r),i=>o=>{if(o>2)throw n();return i.call(r,o)}),s.channelCountMode==="max"))throw n();return e(r,"channelCountMode",i=>()=>i.call(r),i=>o=>{if(o==="max")throw n();return i.call(r,o)}),r},hm=(n,e)=>{const t=n.createDelay(e.maxDelayTime);return ot(t,e),Ye(t,e,"delayTime"),t},rO=n=>(e,t)=>{const s=e.createDynamicsCompressor();if(ot(s,t),t.channelCount>2||t.channelCountMode==="max")throw n();return Ye(s,t,"attack"),Ye(s,t,"knee"),Ye(s,t,"ratio"),Ye(s,t,"release"),Ye(s,t,"threshold"),s},Mt=(n,e)=>{const t=n.createGain();return ot(t,e),Ye(t,e,"gain"),t},iO=n=>(e,t,s)=>{if(e.createIIRFilter===void 0)return n(e,t,s);const r=e.createIIRFilter(s.feedforward,s.feedback);return ot(r,s),r};function oO(n,e){const t=e[0]*e[0]+e[1]*e[1];return[(n[0]*e[0]+n[1]*e[1])/t,(n[1]*e[0]-n[0]*e[1])/t]}function aO(n,e){return[n[0]*e[0]-n[1]*e[1],n[0]*e[1]+n[1]*e[0]]}function wf(n,e){let t=[0,0];for(let s=n.length-1;s>=0;s-=1)t=aO(t,e),t[0]+=n[s];return t}const cO=(n,e,t,s)=>(r,i,{channelCount:o,channelCountMode:a,channelInterpretation:c,feedback:l,feedforward:u})=>{const h=lm(i,r.sampleRate),d=l instanceof Float64Array?l:new Float64Array(l),f=u instanceof Float64Array?u:new Float64Array(u),m=d.length,p=f.length,g=Math.min(m,p);if(m===0||m>20)throw s();if(d[0]===0)throw e();if(p===0||p>20)throw s();if(f[0]===0)throw e();if(d[0]!==1){for(let x=0;x{const C=x.inputBuffer,S=x.outputBuffer,R=C.numberOfChannels;for(let O=0;On.createMediaElementSource(e.mediaElement),uO=(n,e)=>{const t=n.createMediaStreamDestination();return ot(t,e),t.numberOfOutputs===1&&Object.defineProperty(t,"numberOfOutputs",{get:()=>0}),t},hO=(n,{mediaStream:e})=>{const t=e.getAudioTracks();t.sort((i,o)=>i.ido.id?1:0);const s=t.slice(0,1),r=n.createMediaStreamSource(new MediaStream(s));return Object.defineProperty(r,"mediaStream",{value:e}),r},dO=(n,e)=>(t,{mediaStreamTrack:s})=>{if(typeof t.createMediaStreamTrackSource=="function")return t.createMediaStreamTrackSource(s);const r=new MediaStream([s]),i=t.createMediaStreamSource(r);if(s.kind!=="audio")throw n();if(e(t))throw new TypeError;return i},fO=n=>n===null?null:n.hasOwnProperty("OfflineAudioContext")?n.OfflineAudioContext:n.hasOwnProperty("webkitOfflineAudioContext")?n.webkitOfflineAudioContext:null,pO=(n,e,t,s,r,i)=>(o,a)=>{const c=o.createOscillator();return ot(c,a),Ye(c,a,"detune"),Ye(c,a,"frequency"),a.periodicWave!==void 0?c.setPeriodicWave(a.periodicWave):ze(c,a,"type"),e(t,()=>t(o))||Vu(c),e(s,()=>s(o))||i(c,o),e(r,()=>r(o))||zu(c),n(o,c),c},mO=n=>(e,t)=>{const s=e.createPanner();return s.orientationX===void 0?n(e,t):(ot(s,t),Ye(s,t,"orientationX"),Ye(s,t,"orientationY"),Ye(s,t,"orientationZ"),Ye(s,t,"positionX"),Ye(s,t,"positionY"),Ye(s,t,"positionZ"),ze(s,t,"coneInnerAngle"),ze(s,t,"coneOuterAngle"),ze(s,t,"coneOuterGain"),ze(s,t,"distanceModel"),ze(s,t,"maxDistance"),ze(s,t,"panningModel"),ze(s,t,"refDistance"),ze(s,t,"rolloffFactor"),s)},gO=(n,e,t,s,r,i,o,a,c,l)=>(u,{coneInnerAngle:h,coneOuterAngle:d,coneOuterGain:f,distanceModel:m,maxDistance:p,orientationX:g,orientationY:_,orientationZ:w,panningModel:k,positionX:b,positionY:v,positionZ:T,refDistance:E,rolloffFactor:x,...C})=>{const S=u.createPanner();if(C.channelCount>2||C.channelCountMode==="max")throw o();ot(S,C);const R={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},O=t(u,{...R,channelInterpretation:"speakers",numberOfInputs:6}),L=s(u,{...C,gain:1}),j=s(u,{...R,gain:1}),W=s(u,{...R,gain:0}),B=s(u,{...R,gain:0}),V=s(u,{...R,gain:0}),z=s(u,{...R,gain:0}),X=s(u,{...R,gain:0}),K=r(u,256,6,1),J=i(u,{...R,curve:new Float32Array([1,1]),oversample:"none"});let $=[g,_,w],F=[b,v,T];const A=new Float32Array(1);K.onaudioprocess=({inputBuffer:q})=>{const oe=[c(q,A,0),c(q,A,1),c(q,A,2)];oe.some((ie,ne)=>ie!==$[ne])&&(S.setOrientation(...oe),$=oe);const re=[c(q,A,3),c(q,A,4),c(q,A,5)];re.some((ie,ne)=>ie!==F[ne])&&(S.setPosition(...re),F=re)},Object.defineProperty(W.gain,"defaultValue",{get:()=>0}),Object.defineProperty(B.gain,"defaultValue",{get:()=>0}),Object.defineProperty(V.gain,"defaultValue",{get:()=>0}),Object.defineProperty(z.gain,"defaultValue",{get:()=>0}),Object.defineProperty(X.gain,"defaultValue",{get:()=>0});const I={get bufferSize(){},get channelCount(){return S.channelCount},set channelCount(q){if(q>2)throw o();L.channelCount=q,S.channelCount=q},get channelCountMode(){return S.channelCountMode},set channelCountMode(q){if(q==="max")throw o();L.channelCountMode=q,S.channelCountMode=q},get channelInterpretation(){return S.channelInterpretation},set channelInterpretation(q){L.channelInterpretation=q,S.channelInterpretation=q},get coneInnerAngle(){return S.coneInnerAngle},set coneInnerAngle(q){S.coneInnerAngle=q},get coneOuterAngle(){return S.coneOuterAngle},set coneOuterAngle(q){S.coneOuterAngle=q},get coneOuterGain(){return S.coneOuterGain},set coneOuterGain(q){if(q<0||q>1)throw e();S.coneOuterGain=q},get context(){return S.context},get distanceModel(){return S.distanceModel},set distanceModel(q){S.distanceModel=q},get inputs(){return[L]},get maxDistance(){return S.maxDistance},set maxDistance(q){if(q<0)throw new RangeError;S.maxDistance=q},get numberOfInputs(){return S.numberOfInputs},get numberOfOutputs(){return S.numberOfOutputs},get orientationX(){return j.gain},get orientationY(){return W.gain},get orientationZ(){return B.gain},get panningModel(){return S.panningModel},set panningModel(q){S.panningModel=q},get positionX(){return V.gain},get positionY(){return z.gain},get positionZ(){return X.gain},get refDistance(){return S.refDistance},set refDistance(q){if(q<0)throw new RangeError;S.refDistance=q},get rolloffFactor(){return S.rolloffFactor},set rolloffFactor(q){if(q<0)throw new RangeError;S.rolloffFactor=q},addEventListener(...q){return L.addEventListener(q[0],q[1],q[2])},dispatchEvent(...q){return L.dispatchEvent(q[0])},removeEventListener(...q){return L.removeEventListener(q[0],q[1],q[2])}};h!==I.coneInnerAngle&&(I.coneInnerAngle=h),d!==I.coneOuterAngle&&(I.coneOuterAngle=d),f!==I.coneOuterGain&&(I.coneOuterGain=f),m!==I.distanceModel&&(I.distanceModel=m),p!==I.maxDistance&&(I.maxDistance=p),g!==I.orientationX.value&&(I.orientationX.value=g),_!==I.orientationY.value&&(I.orientationY.value=_),w!==I.orientationZ.value&&(I.orientationZ.value=w),k!==I.panningModel&&(I.panningModel=k),b!==I.positionX.value&&(I.positionX.value=b),v!==I.positionY.value&&(I.positionY.value=v),T!==I.positionZ.value&&(I.positionZ.value=T),E!==I.refDistance&&(I.refDistance=E),x!==I.rolloffFactor&&(I.rolloffFactor=x),($[0]!==1||$[1]!==0||$[2]!==0)&&S.setOrientation(...$),(F[0]!==0||F[1]!==0||F[2]!==0)&&S.setPosition(...F);const Y=()=>{L.connect(S),n(L,J,0,0),J.connect(j).connect(O,0,0),J.connect(W).connect(O,0,1),J.connect(B).connect(O,0,2),J.connect(V).connect(O,0,3),J.connect(z).connect(O,0,4),J.connect(X).connect(O,0,5),O.connect(K).connect(u.destination)},N=()=>{L.disconnect(S),a(L,J,0,0),J.disconnect(j),j.disconnect(O),J.disconnect(W),W.disconnect(O),J.disconnect(B),B.disconnect(O),J.disconnect(V),V.disconnect(O),J.disconnect(z),z.disconnect(O),J.disconnect(X),X.disconnect(O),O.disconnect(K),K.disconnect(u.destination)};return l(si(I,S),Y,N)},_O=n=>(e,{disableNormalization:t,imag:s,real:r})=>{const i=s instanceof Float32Array?s:new Float32Array(s),o=r instanceof Float32Array?r:new Float32Array(r),a=e.createPeriodicWave(o,i,{disableNormalization:t});if(Array.from(s).length<2)throw n();return a},Ao=(n,e,t,s)=>n.createScriptProcessor(e,t,s),yO=(n,e)=>(t,s)=>{const r=s.channelCountMode;if(r==="clamped-max")throw e();if(t.createStereoPanner===void 0)return n(t,s);const i=t.createStereoPanner();return ot(i,s),Ye(i,s,"pan"),Object.defineProperty(i,"channelCountMode",{get:()=>r,set:o=>{if(o!==r)throw e()}}),i},vO=(n,e,t,s,r,i)=>{const a=new Float32Array([1,1]),c=Math.PI/2,l={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},u={...l,oversample:"none"},h=(m,p,g,_)=>{const w=new Float32Array(16385),k=new Float32Array(16385);for(let C=0;C<16385;C+=1){const S=C/16384*c;w[C]=Math.cos(S),k[C]=Math.sin(S)}const b=t(m,{...l,gain:0}),v=s(m,{...u,curve:w}),T=s(m,{...u,curve:a}),E=t(m,{...l,gain:0}),x=s(m,{...u,curve:k});return{connectGraph(){p.connect(b),p.connect(T.inputs===void 0?T:T.inputs[0]),p.connect(E),T.connect(g),g.connect(v.inputs===void 0?v:v.inputs[0]),g.connect(x.inputs===void 0?x:x.inputs[0]),v.connect(b.gain),x.connect(E.gain),b.connect(_,0,0),E.connect(_,0,1)},disconnectGraph(){p.disconnect(b),p.disconnect(T.inputs===void 0?T:T.inputs[0]),p.disconnect(E),T.disconnect(g),g.disconnect(v.inputs===void 0?v:v.inputs[0]),g.disconnect(x.inputs===void 0?x:x.inputs[0]),v.disconnect(b.gain),x.disconnect(E.gain),b.disconnect(_,0,0),E.disconnect(_,0,1)}}},d=(m,p,g,_)=>{const w=new Float32Array(16385),k=new Float32Array(16385),b=new Float32Array(16385),v=new Float32Array(16385),T=Math.floor(16385/2);for(let V=0;V<16385;V+=1)if(V>T){const z=(V-T)/(16384-T)*c;w[V]=Math.cos(z),k[V]=Math.sin(z),b[V]=0,v[V]=1}else{const z=V/(16384-T)*c;w[V]=1,k[V]=0,b[V]=Math.cos(z),v[V]=Math.sin(z)}const E=e(m,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),x=t(m,{...l,gain:0}),C=s(m,{...u,curve:w}),S=t(m,{...l,gain:0}),R=s(m,{...u,curve:k}),O=s(m,{...u,curve:a}),L=t(m,{...l,gain:0}),j=s(m,{...u,curve:b}),W=t(m,{...l,gain:0}),B=s(m,{...u,curve:v});return{connectGraph(){p.connect(E),p.connect(O.inputs===void 0?O:O.inputs[0]),E.connect(x,0),E.connect(S,0),E.connect(L,1),E.connect(W,1),O.connect(g),g.connect(C.inputs===void 0?C:C.inputs[0]),g.connect(R.inputs===void 0?R:R.inputs[0]),g.connect(j.inputs===void 0?j:j.inputs[0]),g.connect(B.inputs===void 0?B:B.inputs[0]),C.connect(x.gain),R.connect(S.gain),j.connect(L.gain),B.connect(W.gain),x.connect(_,0,0),L.connect(_,0,0),S.connect(_,0,1),W.connect(_,0,1)},disconnectGraph(){p.disconnect(E),p.disconnect(O.inputs===void 0?O:O.inputs[0]),E.disconnect(x,0),E.disconnect(S,0),E.disconnect(L,1),E.disconnect(W,1),O.disconnect(g),g.disconnect(C.inputs===void 0?C:C.inputs[0]),g.disconnect(R.inputs===void 0?R:R.inputs[0]),g.disconnect(j.inputs===void 0?j:j.inputs[0]),g.disconnect(B.inputs===void 0?B:B.inputs[0]),C.disconnect(x.gain),R.disconnect(S.gain),j.disconnect(L.gain),B.disconnect(W.gain),x.disconnect(_,0,0),L.disconnect(_,0,0),S.disconnect(_,0,1),W.disconnect(_,0,1)}}},f=(m,p,g,_,w)=>{if(p===1)return h(m,g,_,w);if(p===2)return d(m,g,_,w);throw r()};return(m,{channelCount:p,channelCountMode:g,pan:_,...w})=>{if(g==="max")throw r();const k=n(m,{...w,channelCount:1,channelCountMode:g,numberOfInputs:2}),b=t(m,{...w,channelCount:p,channelCountMode:g,gain:1}),v=t(m,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:_});let{connectGraph:T,disconnectGraph:E}=f(m,p,b,v,k);Object.defineProperty(v.gain,"defaultValue",{get:()=>0}),Object.defineProperty(v.gain,"maxValue",{get:()=>1}),Object.defineProperty(v.gain,"minValue",{get:()=>-1});const x={get bufferSize(){},get channelCount(){return b.channelCount},set channelCount(O){b.channelCount!==O&&(C&&E(),{connectGraph:T,disconnectGraph:E}=f(m,O,b,v,k),C&&T()),b.channelCount=O},get channelCountMode(){return b.channelCountMode},set channelCountMode(O){if(O==="clamped-max"||O==="max")throw r();b.channelCountMode=O},get channelInterpretation(){return b.channelInterpretation},set channelInterpretation(O){b.channelInterpretation=O},get context(){return b.context},get inputs(){return[b]},get numberOfInputs(){return b.numberOfInputs},get numberOfOutputs(){return b.numberOfOutputs},get pan(){return v.gain},addEventListener(...O){return b.addEventListener(O[0],O[1],O[2])},dispatchEvent(...O){return b.dispatchEvent(O[0])},removeEventListener(...O){return b.removeEventListener(O[0],O[1],O[2])}};let C=!1;const S=()=>{T(),C=!0},R=()=>{E(),C=!1};return i(si(x,k),S,R)}},bO=(n,e,t,s,r,i,o)=>(a,c)=>{const l=a.createWaveShaper();if(i!==null&&i.name==="webkitAudioContext"&&a.createGain().gain.automationRate===void 0)return t(a,c);ot(l,c);const u=c.curve===null||c.curve instanceof Float32Array?c.curve:new Float32Array(c.curve);if(u!==null&&u.length<2)throw e();ze(l,{curve:u},"curve"),ze(l,c,"oversample");let h=null,d=!1;return o(l,"curve",p=>()=>p.call(l),p=>g=>(p.call(l,g),d&&(s(g)&&h===null?h=n(a,l):!s(g)&&h!==null&&(h(),h=null)),g)),r(l,()=>{d=!0,s(l.curve)&&(h=n(a,l))},()=>{d=!1,h!==null&&(h(),h=null)})},xO=(n,e,t,s,r)=>(i,{curve:o,oversample:a,...c})=>{const l=i.createWaveShaper(),u=i.createWaveShaper();ot(l,c),ot(u,c);const h=t(i,{...c,gain:1}),d=t(i,{...c,gain:-1}),f=t(i,{...c,gain:1}),m=t(i,{...c,gain:-1});let p=null,g=!1,_=null;const w={get bufferSize(){},get channelCount(){return l.channelCount},set channelCount(v){h.channelCount=v,d.channelCount=v,l.channelCount=v,f.channelCount=v,u.channelCount=v,m.channelCount=v},get channelCountMode(){return l.channelCountMode},set channelCountMode(v){h.channelCountMode=v,d.channelCountMode=v,l.channelCountMode=v,f.channelCountMode=v,u.channelCountMode=v,m.channelCountMode=v},get channelInterpretation(){return l.channelInterpretation},set channelInterpretation(v){h.channelInterpretation=v,d.channelInterpretation=v,l.channelInterpretation=v,f.channelInterpretation=v,u.channelInterpretation=v,m.channelInterpretation=v},get context(){return l.context},get curve(){return _},set curve(v){if(v!==null&&v.length<2)throw e();if(v===null)l.curve=v,u.curve=v;else{const T=v.length,E=new Float32Array(T+2-T%2),x=new Float32Array(T+2-T%2);E[0]=v[0],x[0]=-v[T-1];const C=Math.ceil((T+1)/2),S=(T+1)/2-1;for(let R=1;R{h.connect(l).connect(f),h.connect(d).connect(u).connect(m).connect(f),g=!0,s(_)&&(p=n(i,h))},b=()=>{h.disconnect(l),l.disconnect(f),h.disconnect(d),d.disconnect(u),u.disconnect(m),m.disconnect(f),g=!1,p!==null&&(p(),p=null)};return r(si(w,f),k,b)},Tt=()=>new DOMException("","NotSupportedError"),wO={numberOfChannels:1},kO=(n,e,t,s,r)=>class extends n{constructor(o,a,c){let l;if(typeof o=="number"&&a!==void 0&&c!==void 0)l={length:a,numberOfChannels:o,sampleRate:c};else if(typeof o=="object")l=o;else throw new Error("The given parameters are not valid.");const{length:u,numberOfChannels:h,sampleRate:d}={...wO,...l},f=s(h,u,d);e(Bi,()=>Bi(f))||f.addEventListener("statechange",(()=>{let m=0;const p=g=>{this._state==="running"&&(m>0?(f.removeEventListener("statechange",p),g.stopImmediatePropagation(),this._waitForThePromiseToSettle(g)):m+=1)};return p})()),super(f,h),this._length=u,this._nativeOfflineAudioContext=f,this._state=null}get length(){return this._nativeOfflineAudioContext.length===void 0?this._length:this._nativeOfflineAudioContext.length}get state(){return this._state===null?this._nativeOfflineAudioContext.state:this._state}startRendering(){return this._state==="running"?Promise.reject(t()):(this._state="running",r(this.destination,this._nativeOfflineAudioContext).finally(()=>{this._state=null,nm(this)}))}_waitForThePromiseToSettle(o){this._state===null?this._nativeOfflineAudioContext.dispatchEvent(o):setTimeout(()=>this._waitForThePromiseToSettle(o))}},TO={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},EO=(n,e,t,s,r,i,o)=>class extends n{constructor(c,l){const u=r(c),h={...TO,...l},d=t(u,h),f=i(u),m=f?s():null,p=c.sampleRate/2;super(c,!1,d,m),this._detune=e(this,f,d.detune,153600,-153600),this._frequency=e(this,f,d.frequency,p,-p),this._nativeOscillatorNode=d,this._onended=null,this._oscillatorNodeRenderer=m,this._oscillatorNodeRenderer!==null&&h.periodicWave!==void 0&&(this._oscillatorNodeRenderer.periodicWave=h.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(c){const l=typeof c=="function"?o(this,c):null;this._nativeOscillatorNode.onended=l;const u=this._nativeOscillatorNode.onended;this._onended=u!==null&&u===l?c:u}get type(){return this._nativeOscillatorNode.type}set type(c){this._nativeOscillatorNode.type=c,this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(c){this._nativeOscillatorNode.setPeriodicWave(c),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=c)}start(c=0){if(this._nativeOscillatorNode.start(c),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.start=c),this.context.state!=="closed"){jr(this);const l=()=>{this._nativeOscillatorNode.removeEventListener("ended",l),Bn(this)&&Eo(this)};this._nativeOscillatorNode.addEventListener("ended",l)}}stop(c=0){this._nativeOscillatorNode.stop(c),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.stop=c)}},CO=(n,e,t,s,r)=>()=>{const i=new WeakMap;let o=null,a=null,c=null;const l=async(u,h)=>{let d=t(u);const f=yt(d,h);if(!f){const m={channelCount:d.channelCount,channelCountMode:d.channelCountMode,channelInterpretation:d.channelInterpretation,detune:d.detune.value,frequency:d.frequency.value,periodicWave:o===null?void 0:o,type:d.type};d=e(h,m),a!==null&&d.start(a),c!==null&&d.stop(c)}return i.set(h,d),f?(await n(h,u.detune,d.detune),await n(h,u.frequency,d.frequency)):(await s(h,u.detune,d.detune),await s(h,u.frequency,d.frequency)),await r(u,h,d),d};return{set periodicWave(u){o=u},set start(u){a=u},set stop(u){c=u},render(u,h){const d=i.get(h);return d!==void 0?Promise.resolve(d):l(u,h)}}},SO={channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",coneInnerAngle:360,coneOuterAngle:360,coneOuterGain:0,distanceModel:"inverse",maxDistance:1e4,orientationX:1,orientationY:0,orientationZ:0,panningModel:"equalpower",positionX:0,positionY:0,positionZ:0,refDistance:1,rolloffFactor:1},OO=(n,e,t,s,r,i,o)=>class extends n{constructor(c,l){const u=r(c),h={...SO,...l},d=t(u,h),f=i(u),m=f?s():null;super(c,!1,d,m),this._nativePannerNode=d,this._orientationX=e(this,f,d.orientationX,bt,Ct),this._orientationY=e(this,f,d.orientationY,bt,Ct),this._orientationZ=e(this,f,d.orientationZ,bt,Ct),this._positionX=e(this,f,d.positionX,bt,Ct),this._positionY=e(this,f,d.positionY,bt,Ct),this._positionZ=e(this,f,d.positionZ,bt,Ct),o(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(c){this._nativePannerNode.coneInnerAngle=c}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(c){this._nativePannerNode.coneOuterAngle=c}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(c){this._nativePannerNode.coneOuterGain=c}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(c){this._nativePannerNode.distanceModel=c}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(c){this._nativePannerNode.maxDistance=c}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(c){this._nativePannerNode.panningModel=c}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(c){this._nativePannerNode.refDistance=c}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(c){this._nativePannerNode.rolloffFactor=c}},AO=(n,e,t,s,r,i,o,a,c,l)=>()=>{const u=new WeakMap;let h=null;const d=async(f,m)=>{let p=null,g=i(f);const _={channelCount:g.channelCount,channelCountMode:g.channelCountMode,channelInterpretation:g.channelInterpretation},w={..._,coneInnerAngle:g.coneInnerAngle,coneOuterAngle:g.coneOuterAngle,coneOuterGain:g.coneOuterGain,distanceModel:g.distanceModel,maxDistance:g.maxDistance,panningModel:g.panningModel,refDistance:g.refDistance,rolloffFactor:g.rolloffFactor},k=yt(g,m);if("bufferSize"in g)p=s(m,{..._,gain:1});else if(!k){const b={...w,orientationX:g.orientationX.value,orientationY:g.orientationY.value,orientationZ:g.orientationZ.value,positionX:g.positionX.value,positionY:g.positionY.value,positionZ:g.positionZ.value};g=r(m,b)}if(u.set(m,p===null?g:p),p!==null){if(h===null){if(o===null)throw new Error("Missing the native OfflineAudioContext constructor.");const R=new o(6,f.context.length,m.sampleRate),O=e(R,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});O.connect(R.destination),h=(async()=>{const L=await Promise.all([f.orientationX,f.orientationY,f.orientationZ,f.positionX,f.positionY,f.positionZ].map(async(j,W)=>{const B=t(R,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:W===0?1:0});return await a(R,j,B.offset),B}));for(let j=0;j<6;j+=1)L[j].connect(O,0,j),L[j].start(0);return l(R)})()}const b=await h,v=s(m,{..._,gain:1});await c(f,m,v);const T=[];for(let R=0;Rj!==E[W])||L.some((j,W)=>j!==x[W])){E=O,x=L;const j=R/m.sampleRate;C.gain.setValueAtTime(0,j),C=s(m,{..._,gain:0}),S=r(m,{...w,orientationX:E[0],orientationY:E[1],orientationZ:E[2],positionX:x[0],positionY:x[1],positionZ:x[2]}),C.gain.setValueAtTime(1,j),v.connect(C).connect(S.inputs[0]),S.connect(p)}}return p}return k?(await n(m,f.orientationX,g.orientationX),await n(m,f.orientationY,g.orientationY),await n(m,f.orientationZ,g.orientationZ),await n(m,f.positionX,g.positionX),await n(m,f.positionY,g.positionY),await n(m,f.positionZ,g.positionZ)):(await a(m,f.orientationX,g.orientationX),await a(m,f.orientationY,g.orientationY),await a(m,f.orientationZ,g.orientationZ),await a(m,f.positionX,g.positionX),await a(m,f.positionY,g.positionY),await a(m,f.positionZ,g.positionZ)),ni(g)?await c(f,m,g.inputs[0]):await c(f,m,g),g};return{render(f,m){const p=u.get(m);return p!==void 0?Promise.resolve(p):d(f,m)}}},PO={disableNormalization:!1},RO=(n,e,t,s)=>class dm{constructor(i,o){const a=e(i),c=s({...PO,...o}),l=n(a,c);return t.add(l),l}static[Symbol.hasInstance](i){return i!==null&&typeof i=="object"&&Object.getPrototypeOf(i)===dm.prototype||t.has(i)}},DO=(n,e)=>(t,s,r)=>(n(s).replay(r),e(s,t,r)),MO=(n,e,t)=>async(s,r,i)=>{const o=n(s);await Promise.all(o.activeInputs.map((a,c)=>Array.from(a).map(async([l,u])=>{const d=await e(l).render(l,r),f=s.context.destination;!t(l)&&(s!==f||!t(s))&&d.connect(i,u,c)})).reduce((a,c)=>[...a,...c],[]))},IO=(n,e,t)=>async(s,r,i)=>{const o=e(s);await Promise.all(Array.from(o.activeInputs).map(async([a,c])=>{const u=await n(a).render(a,r);t(a)||u.connect(i,c)}))},NO=(n,e,t,s)=>r=>n(Bi,()=>Bi(r))?Promise.resolve(n(s,s)).then(i=>{if(!i){const o=t(r,512,0,1);r.oncomplete=()=>{o.onaudioprocess=null,o.disconnect()},o.onaudioprocess=()=>r.currentTime,o.connect(r.destination)}return r.startRendering()}):new Promise(i=>{const o=e(r,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});r.oncomplete=a=>{o.disconnect(),i(a.renderedBuffer)},o.connect(r.destination),r.startRendering()}),$O=n=>(e,t)=>{n.set(e,t)},FO=n=>(e,t)=>n.set(e,t),LO=(n,e,t,s,r,i,o,a)=>(c,l)=>t(c).render(c,l).then(()=>Promise.all(Array.from(s(l)).map(u=>t(u).render(u,l)))).then(()=>r(l)).then(u=>(typeof u.copyFromChannel!="function"?(o(u),Fu(u)):e(i,()=>i(u))||a(u),n.add(u),u)),jO={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},VO=(n,e,t,s,r,i)=>class extends n{constructor(a,c){const l=r(a),u={...jO,...c},h=t(l,u),d=i(l),f=d?s():null;super(a,!1,h,f),this._pan=e(this,d,h.pan)}get pan(){return this._pan}},zO=(n,e,t,s,r)=>()=>{const i=new WeakMap,o=async(a,c)=>{let l=t(a);const u=yt(l,c);if(!u){const h={channelCount:l.channelCount,channelCountMode:l.channelCountMode,channelInterpretation:l.channelInterpretation,pan:l.pan.value};l=e(c,h)}return i.set(c,l),u?await n(c,a.pan,l.pan):await s(c,a.pan,l.pan),ni(l)?await r(a,c,l.inputs[0]):await r(a,c,l),l};return{render(a,c){const l=i.get(c);return l!==void 0?Promise.resolve(l):o(a,c)}}},UO=n=>()=>{if(n===null)return!1;try{new n({length:1,sampleRate:44100})}catch{return!1}return!0},BO=(n,e)=>async()=>{if(n===null)return!0;if(e===null)return!1;const t=new Blob(['class A extends AudioWorkletProcessor{process(i){this.port.postMessage(i,[i[0][0].buffer])}}registerProcessor("a",A)'],{type:"application/javascript; charset=utf-8"}),s=new e(1,128,44100),r=URL.createObjectURL(t);let i=!1,o=!1;try{await s.audioWorklet.addModule(r);const a=new n(s,"a",{numberOfOutputs:0}),c=s.createOscillator();a.port.onmessage=()=>i=!0,a.onprocessorerror=()=>o=!0,c.connect(a),c.start(0),await s.startRendering(),await new Promise(l=>setTimeout(l))}catch{}finally{URL.revokeObjectURL(r)}return i&&!o},WO=(n,e)=>()=>{if(e===null)return Promise.resolve(!1);const t=new e(1,1,44100),s=n(t,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise(r=>{t.oncomplete=()=>{s.disconnect(),r(t.currentTime!==0)},t.startRendering()})},qO=()=>new DOMException("","UnknownError"),HO={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},YO=(n,e,t,s,r,i,o)=>class extends n{constructor(c,l){const u=r(c),h={...HO,...l},d=t(u,h),m=i(u)?s():null;super(c,!0,d,m),this._isCurveNullified=!1,this._nativeWaveShaperNode=d,o(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(c){if(c===null)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(c.length<2)throw e();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=c}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(c){this._nativeWaveShaperNode.oversample=c}},GO=(n,e,t)=>()=>{const s=new WeakMap,r=async(i,o)=>{let a=e(i);if(!yt(a,o)){const l={channelCount:a.channelCount,channelCountMode:a.channelCountMode,channelInterpretation:a.channelInterpretation,curve:a.curve,oversample:a.oversample};a=n(o,l)}return s.set(o,a),ni(a)?await t(i,o,a.inputs[0]):await t(i,o,a),a};return{render(i,o){const a=s.get(o);return a!==void 0?Promise.resolve(a):r(i,o)}}},XO=()=>typeof window>"u"?null:window,ZO=(n,e)=>t=>{t.copyFromChannel=(s,r,i=0)=>{const o=n(i),a=n(r);if(a>=t.numberOfChannels)throw e();const c=t.length,l=t.getChannelData(a),u=s.length;for(let h=o<0?-o:0;h+o{const o=n(i),a=n(r);if(a>=t.numberOfChannels)throw e();const c=t.length,l=t.getChannelData(a),u=s.length;for(let h=o<0?-o:0;h+oe=>{e.copyFromChannel=(t=>(s,r,i=0)=>{const o=n(i),a=n(r);if(o(s,r,i=0)=>{const o=n(i),a=n(r);if(o(e,t)=>{const s=t.createBuffer(1,1,44100);e.buffer===null&&(e.buffer=s),n(e,"buffer",r=>()=>{const i=r.call(e);return i===s?null:i},r=>i=>r.call(e,i===null?s:i))},JO=(n,e)=>(t,s)=>{s.channelCount=1,s.channelCountMode="explicit",Object.defineProperty(s,"channelCount",{get:()=>1,set:()=>{throw n()}}),Object.defineProperty(s,"channelCountMode",{get:()=>"explicit",set:()=>{throw n()}});const r=t.createBufferSource();e(s,()=>{const a=s.numberOfInputs;for(let c=0;cr.disconnect(s))},fm=(n,e,t)=>n.copyFromChannel===void 0?n.getChannelData(t)[0]:(n.copyFromChannel(e,t),e[0]),pm=n=>{if(n===null)return!1;const e=n.length;return e%2!==0?n[Math.floor(e/2)]!==0:n[e/2-1]+n[e/2]!==0},Po=(n,e,t,s)=>{let r=n;for(;!r.hasOwnProperty(e);)r=Object.getPrototypeOf(r);const{get:i,set:o}=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(n,e,{get:t(i),set:s(o)})},e2=n=>({...n,outputChannelCount:n.outputChannelCount!==void 0?n.outputChannelCount:n.numberOfInputs===1&&n.numberOfOutputs===1?[n.channelCount]:Array.from({length:n.numberOfOutputs},()=>1)}),t2=n=>({...n,channelCount:n.numberOfOutputs}),n2=n=>{const{imag:e,real:t}=n;return e===void 0?t===void 0?{...n,imag:[0,0],real:[0,0]}:{...n,imag:Array.from(t,()=>0),real:t}:t===void 0?{...n,imag:e,real:Array.from(e,()=>0)}:{...n,imag:e,real:t}},mm=(n,e,t)=>{try{n.setValueAtTime(e,t)}catch(s){if(s.code!==9)throw s;mm(n,e,t+1e-7)}},s2=n=>{const e=n.createBufferSource();e.start();try{e.start()}catch{return!0}return!1},r2=n=>{const e=n.createBufferSource(),t=n.createBuffer(1,1,44100);e.buffer=t;try{e.start(0,1)}catch{return!1}return!0},i2=n=>{const e=n.createBufferSource();e.start();try{e.stop()}catch{return!1}return!0},Uu=n=>{const e=n.createOscillator();try{e.start(-1)}catch(t){return t instanceof RangeError}return!1},gm=n=>{const e=n.createBuffer(1,1,44100),t=n.createBufferSource();t.buffer=e,t.start(),t.stop();try{return t.stop(),!0}catch{return!1}},Bu=n=>{const e=n.createOscillator();try{e.stop(-1)}catch(t){return t instanceof RangeError}return!1},o2=n=>{const{port1:e,port2:t}=new MessageChannel;try{e.postMessage(n)}finally{e.close(),t.close()}},a2=n=>{n.start=(e=>(t=0,s=0,r)=>{const i=n.buffer,o=i===null?s:Math.min(i.duration,s);i!==null&&o>i.duration-.5/n.context.sampleRate?e.call(n,t,0,0):e.call(n,t,o,r)})(n.start)},_m=(n,e)=>{const t=e.createGain();n.connect(t);const s=(r=>()=>{r.call(n,t),n.removeEventListener("ended",s)})(n.disconnect);n.addEventListener("ended",s),si(n,t),n.stop=(r=>{let i=!1;return(o=0)=>{if(i)try{r.call(n,o)}catch{t.gain.setValueAtTime(0,o)}else r.call(n,o),i=!0}})(n.stop)},ri=(n,e)=>t=>{const s={value:n};return Object.defineProperties(t,{currentTarget:s,target:s}),typeof e=="function"?e.call(n,t):e.handleEvent.call(n,t)},c2=OE(ir),l2=IE(ir),u2=HC(dc),ym=new WeakMap,h2=uS(ym),mn=wC(new Map,new WeakMap),Sn=XO(),vm=VS(mn,An),Wu=lS(kt),ht=MO(kt,Wu,Ks),d2=jE(vm,Ve,ht),Le=fS(hc),ns=fO(Sn),Re=PS(ns),bm=new WeakMap,xm=nS(ri),Ro=WS(Sn),qu=CS(Ro),Hu=SS(Sn),wm=OS(Sn),Wi=HS(Sn),st=uC(AE(X0),ME(c2,l2,Ra,u2,Da,kt,h2,To,Ve,ir,Bn,Ks,aa),mn,xS(Ll,Da,kt,Ve,Ui,Bn),An,fc,Tt,UC(Ra,Ll,kt,Ve,Ui,Le,Bn,Re),XC(bm,kt,hn),xm,Le,qu,Hu,wm,Re,Wi),f2=LE(st,d2,An,vm,Le,Re),Yu=new WeakSet,kf=zS(Sn),km=NC(new Uint32Array(1)),Gu=ZO(km,An),Xu=KO(km),Tm=zE(Yu,mn,Tt,kf,ns,UO(kf),Gu,Xu),pc=NE(Mt),Em=IO(Wu,Co,Ks),Pn=AC(Em),ii=BS(pc,mn,s2,r2,i2,Uu,gm,Bu,a2,QO(Po),_m),Rn=DO(hS(Co),Em),p2=WE(Pn,ii,Ve,Rn,ht),gn=hC(PE(Z0),bm,$u,dC,wE,kE,TE,EE,CE,Nl,Y0,Ro,mm),m2=BE(st,p2,gn,lt,ii,Le,Re,ri),g2=JE(st,eC,An,lt,qS(Mt,Po),Le,Re,ht),_2=xC(Pn,um,Ve,Rn,ht),or=FO(ym),y2=bC(st,gn,_2,fc,um,Le,Re,or),As=LS(ir,Hu),v2=JO(lt,As),Ps=JS(Ro,v2),b2=EC(Ps,Ve,ht),x2=TC(st,b2,Ps,Le,Re),w2=OC(Oo,Ve,ht),k2=SC(st,w2,Oo,Le,Re,t2),T2=nO(pc,ii,Mt,As),oi=tO(pc,mn,T2,Uu,Bu),E2=IC(Pn,oi,Ve,Rn,ht),C2=MC(st,gn,E2,oi,Le,Re,ri),Cm=sO(Tt,Po),S2=LC(Cm,Ve,ht),O2=FC(st,S2,Cm,Le,Re,or),A2=qC(Pn,hm,Ve,Rn,ht),P2=WC(st,gn,A2,hm,Le,Re,or),Sm=rO(Tt),R2=JC(Pn,Sm,Ve,Rn,ht),D2=QC(st,gn,R2,Sm,Tt,Le,Re,or),M2=aS(Pn,Mt,Ve,Rn,ht),I2=oS(st,gn,M2,Mt,Le,Re),N2=cO(fc,lt,Ao,Tt),mc=NO(mn,Mt,Ao,WO(Mt,ns)),$2=bS(ii,Ve,ns,ht,mc),F2=iO(N2),L2=yS(st,F2,$2,Le,Re,or),j2=tC(gn,Ps,oi,Ao,Tt,fm,Re,Po),Om=new WeakMap,V2=FS(g2,j2,xm,Re,Om,ri),Am=pO(pc,mn,Uu,gm,Bu,_m),z2=CO(Pn,Am,Ve,Rn,ht),U2=EO(st,gn,Am,z2,Le,Re,ri),Pm=RC(ii),B2=xO(Pm,lt,Mt,pm,As),gc=bO(Pm,lt,B2,pm,As,Ro,Po),W2=gO(Ra,lt,Ps,Mt,Ao,gc,Tt,Da,fm,As),Rm=mO(W2),q2=AO(Pn,Ps,oi,Mt,Rm,Ve,ns,Rn,ht,mc),H2=OO(st,gn,Rm,q2,Le,Re,or),Y2=_O(An),G2=RO(Y2,Le,new WeakSet,n2),X2=vO(Ps,Oo,Mt,gc,Tt,As),Dm=yO(X2,Tt),Z2=zO(Pn,Dm,Ve,Rn,ht),K2=VO(st,gn,Dm,Z2,Le,Re),Q2=GO(gc,Ve,ht),J2=YO(st,lt,gc,Q2,Le,Re,or),Mm=RS(Sn),Zu=sS(Sn),Im=new WeakMap,eA=pS(Im,ns),tA=Mm?DE(mn,Tt,tS(Sn),Zu,rS(SE),Le,eA,Re,Wi,new WeakMap,new WeakMap,BO(Wi,ns),Sn):void 0,nA=AS(qu,Re),sA=zC(Yu,mn,VC,eS,new WeakSet,Le,nA,Aa,Bi,Gu,Xu),Nm=yC(tA,f2,Tm,m2,y2,x2,k2,C2,O2,sA,P2,D2,I2,L2,V2,U2,H2,G2,K2,J2),rA=DS(st,lO,Le,Re),iA=IS(st,uO,Le,Re),oA=NS(st,hO,Le,Re),aA=dO(lt,Re),cA=$S(st,aA,Le),lA=QE(Nm,lt,Tt,qO,rA,iA,oA,cA,Ro),Ku=mS(Om),uA=$E(Ku),$m=PC(An),hA=YC(Ku),Fm=ZC(An),Lm=new WeakMap,dA=cS(Lm,hn),fA=QS($m,An,lt,Ps,Oo,oi,Mt,Ao,Tt,Fm,Zu,dA,As),pA=GS(lt,fA,Mt,Tt,As),mA=_C(Pn,$m,ii,Ps,Oo,oi,Mt,hA,Fm,Zu,Ve,Wi,ns,Rn,ht,mc),gA=dS(Im),_A=$O(Lm),Tf=Mm?pC(uA,st,gn,mA,pA,kt,gA,Le,Re,Wi,e2,_A,o2,ri):void 0,yA=jC(Tt,ns),vA=LO(Yu,mn,Wu,Ku,mc,Aa,Gu,Xu),bA=kO(Nm,mn,lt,yA,vA),xA=wS(hc,qu),wA=kS(Nu,Hu),kA=TS($u,wm),TA=ES(hc,Re);function Ut(n){return typeof n>"u"}function ve(n){return!Ut(n)}function EA(n){return typeof n=="function"}function xs(n){return typeof n=="number"}function Bs(n){return Object.prototype.toString.call(n)==="[object Object]"&&n.constructor===Object}function CA(n){return typeof n=="boolean"}function ln(n){return Array.isArray(n)}function Yn(n){return typeof n=="string"}function Jo(n){return Yn(n)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(n)}function me(n,e){if(!n)throw new Error(e)}function dn(n,e,t=1/0){if(!(e<=n&&n<=t))throw new RangeError(`Value must be within [${e}, ${t}], got: ${n}`)}function jm(n){!n.isOffline&&n.state!=="running"&&Qu('The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.')}let Vm=!1,Ef=!1;function Cf(n){Vm=n}function SA(n){Ut(n)&&Vm&&!Ef&&(Ef=!0,Qu("Events scheduled inside of scheduled callbacks should use the passed in scheduling time. See https://github.com/Tonejs/Tone.js/wiki/Accurate-Timing"))}let zm=console;function OA(...n){zm.log(...n)}function Qu(...n){zm.warn(...n)}function AA(n){return new lA(n)}function PA(n,e,t){return new bA(n,e,t)}const Ws=typeof self=="object"?self:null,RA=Ws&&(Ws.hasOwnProperty("AudioContext")||Ws.hasOwnProperty("webkitAudioContext"));function DA(n,e,t){return me(ve(Tf),"This node only works in a secure context (https or localhost)"),new Tf(n,e,t)}class MA{constructor(e,t,s,r){this._callback=e,this._type=t,this._minimumUpdateInterval=Math.max(128/(r||44100),.001),this.updateInterval=s,this._createClock()}_createWorker(){const e=new Blob([` // the initial timeout time let timeoutTime = ${(this._updateInterval*1e3).toFixed(1)}; // onmessage callback @@ -198,12 +198,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } // call tick initially tick(); - `],{type:"text/javascript"}),t=URL.createObjectURL(e),s=new Worker(t);s.onmessage=this._callback.bind(this),this._worker=s}_createTimeout(){this._timeout=setTimeout(()=>{this._createTimeout(),this._callback()},this._updateInterval*1e3)}_createClock(){if(this._type==="worker")try{this._createWorker()}catch{this._type="timeout",this._createClock()}else this._type==="timeout"&&this._createTimeout()}_disposeClock(){this._timeout&&clearTimeout(this._timeout),this._worker&&(this._worker.terminate(),this._worker.onmessage=null)}get updateInterval(){return this._updateInterval}set updateInterval(e){var t;this._updateInterval=Math.max(e,this._minimumUpdateInterval),this._type==="worker"&&((t=this._worker)===null||t===void 0||t.postMessage(this._updateInterval*1e3))}get type(){return this._type}set type(e){this._disposeClock(),this._type=e,this._createClock()}dispose(){this._disposeClock()}}function Qs(n){return wA(n)}function ps(n){return xA(n)}function ca(n){return kA(n)}function xr(n){return bA(n)}function MA(n){return n instanceof km}function IA(n,e){return n==="value"||Qs(e)||ps(e)||MA(e)}function Ar(n,...e){if(!e.length)return n;const t=e.shift();if(Bs(n)&&Bs(t))for(const s in t)IA(s,t[s])?n[s]=t[s]:Bs(t[s])?(n[s]||Object.assign(n,{[s]:{}}),Ar(n[s],t[s])):Object.assign(n,{[s]:t[s]});return Ar(n,...e)}function NA(n,e){return n.length===e.length&&n.every((t,s)=>e[s]===t)}function K(n,e,t=[],s){const r={},i=Array.from(e);if(Bs(i[0])&&s&&!Reflect.has(i[0],s)&&(Object.keys(i[0]).some(a=>Reflect.has(n,a))||(Ar(r,{[s]:i[0]}),t.splice(t.indexOf(s),1),i.shift())),i.length===1&&Bs(i[0]))Ar(r,i[0]);else for(let o=0;o{Reflect.has(n,t)&&delete n[t]}),n}/** + `],{type:"text/javascript"}),t=URL.createObjectURL(e),s=new Worker(t);s.onmessage=this._callback.bind(this),this._worker=s}_createTimeout(){this._timeout=setTimeout(()=>{this._createTimeout(),this._callback()},this._updateInterval*1e3)}_createClock(){if(this._type==="worker")try{this._createWorker()}catch{this._type="timeout",this._createClock()}else this._type==="timeout"&&this._createTimeout()}_disposeClock(){this._timeout&&clearTimeout(this._timeout),this._worker&&(this._worker.terminate(),this._worker.onmessage=null)}get updateInterval(){return this._updateInterval}set updateInterval(e){var t;this._updateInterval=Math.max(e,this._minimumUpdateInterval),this._type==="worker"&&((t=this._worker)===null||t===void 0||t.postMessage(this._updateInterval*1e3))}get type(){return this._type}set type(e){this._disposeClock(),this._type=e,this._createClock()}dispose(){this._disposeClock()}}function Qs(n){return kA(n)}function ps(n){return wA(n)}function ca(n){return TA(n)}function xr(n){return xA(n)}function IA(n){return n instanceof Tm}function NA(n,e){return n==="value"||Qs(e)||ps(e)||IA(e)}function Ar(n,...e){if(!e.length)return n;const t=e.shift();if(Bs(n)&&Bs(t))for(const s in t)NA(s,t[s])?n[s]=t[s]:Bs(t[s])?(n[s]||Object.assign(n,{[s]:{}}),Ar(n[s],t[s])):Object.assign(n,{[s]:t[s]});return Ar(n,...e)}function $A(n,e){return n.length===e.length&&n.every((t,s)=>e[s]===t)}function Z(n,e,t=[],s){const r={},i=Array.from(e);if(Bs(i[0])&&s&&!Reflect.has(i[0],s)&&(Object.keys(i[0]).some(a=>Reflect.has(n,a))||(Ar(r,{[s]:i[0]}),t.splice(t.indexOf(s),1),i.shift())),i.length===1&&Bs(i[0]))Ar(r,i[0]);else for(let o=0;o{Reflect.has(n,t)&&delete n[t]}),n}/** * Tone.js * @author Yotam Mann * @license http://opensource.org/licenses/MIT MIT License * @copyright 2014-2019 Yotam Mann - */class ss{constructor(){this.debug=!1,this._wasDisposed=!1}static getDefaults(){return{}}log(...e){(this.debug||Ws&&this.toString()===Ws.TONE_DEBUG_CLASS)&&SA(this,...e)}dispose(){return this._wasDisposed=!0,this}get disposed(){return this._wasDisposed}toString(){return this.name}}ss.version=q0;const eh=1e-6;function Vr(n,e){return n>e+eh}function Bl(n,e){return Vr(n,e)||rn(n,e)}function Na(n,e){return n+ehthis.memory){const t=this.length-this.memory;this._timeline.splice(0,t)}return this}remove(e){const t=this._timeline.indexOf(e);return t!==-1&&this._timeline.splice(t,1),this}get(e,t="time"){const s=this._search(e,t);return s!==-1?this._timeline[s]:null}peek(){return this._timeline[0]}shift(){return this._timeline.shift()}getAfter(e,t="time"){const s=this._search(e,t);return s+10&&this._timeline[t-1].time=0?this._timeline[s-1]:null}cancel(e){if(this._timeline.length>1){let t=this._search(e);if(t>=0)if(rn(this._timeline[t].time,e)){for(let s=t;s>=0&&rn(this._timeline[s].time,e);s--)t=s;this._timeline=this._timeline.slice(0,t)}else this._timeline=this._timeline.slice(0,t+1);else this._timeline=[]}else this._timeline.length===1&&Bl(this._timeline[0].time,e)&&(this._timeline=[]);return this}cancelBefore(e){const t=this._search(e);return t>=0&&(this._timeline=this._timeline.slice(t+1)),this}previousEvent(e){const t=this._timeline.indexOf(e);return t>0?this._timeline[t-1]:null}_search(e,t="time"){if(this._timeline.length===0)return-1;let s=0;const r=this._timeline.length;let i=r;if(r>0&&this._timeline[r-1][t]<=e)return r-1;for(;s=0&&this._timeline[s].time>=e;)s--;return this._iterate(t,s+1),this}forEachAtTime(e,t){const s=this._search(e);if(s!==-1&&rn(this._timeline[s].time,e)){let r=s;for(let i=s;i>=0&&rn(this._timeline[i].time,e);i--)r=i;this._iterate(i=>{t(i)},r,s)}return this}dispose(){return super.dispose(),this._timeline=[],this}};const Um=[];function gc(n){Um.push(n)}function LA(n){Um.forEach(e=>e(n))}const Bm=[];function _c(n){Bm.push(n)}function jA(n){Bm.forEach(e=>e(n))}class Do extends ss{constructor(){super(...arguments),this.name="Emitter"}on(e,t){return e.split(/\W+/).forEach(r=>{zt(this._events)&&(this._events={}),this._events.hasOwnProperty(r)||(this._events[r]=[]),this._events[r].push(t)}),this}once(e,t){const s=(...r)=>{t(...r),this.off(e,s)};return this.on(e,s),this}off(e,t){return e.split(/\W+/).forEach(r=>{if(zt(this._events)&&(this._events={}),this._events.hasOwnProperty(r))if(zt(t))this._events[r]=[];else{const i=this._events[r];for(let o=i.length-1;o>=0;o--)i[o]===t&&i.splice(o,1)}}),this}emit(e,...t){if(this._events&&this._events.hasOwnProperty(e)){const s=this._events[e].slice(0);for(let r=0,i=s.length;r{const s=Object.getOwnPropertyDescriptor(Do.prototype,t);Object.defineProperty(e.prototype,t,s)})}dispose(){return super.dispose(),this._events=void 0,this}}class Wm extends Do{constructor(){super(...arguments),this.isOffline=!1}toJSON(){return{}}}let th=class qm extends Wm{constructor(){var e,t;super(),this.name="Context",this._constants=new Map,this._timeouts=new kn,this._timeoutIds=0,this._initialized=!1,this._closeStarted=!1,this.isOffline=!1,this._workletPromise=null;const s=K(qm.getDefaults(),arguments,["context"]);s.context?(this._context=s.context,this._latencyHint=((e=arguments[0])===null||e===void 0?void 0:e.latencyHint)||""):(this._context=OA({latencyHint:s.latencyHint}),this._latencyHint=s.latencyHint),this._ticker=new DA(this.emit.bind(this,"tick"),s.clockSource,s.updateInterval,this._context.sampleRate),this.on("tick",this._timeoutLoop.bind(this)),this._context.onstatechange=()=>{this.emit("statechange",this.state)},this[!((t=arguments[0])===null||t===void 0)&&t.hasOwnProperty("updateInterval")?"_lookAhead":"lookAhead"]=s.lookAhead}static getDefaults(){return{clockSource:"worker",latencyHint:"interactive",lookAhead:.1,updateInterval:.05}}initialize(){return this._initialized||(LA(this),this._initialized=!0),this}createAnalyser(){return this._context.createAnalyser()}createOscillator(){return this._context.createOscillator()}createBufferSource(){return this._context.createBufferSource()}createBiquadFilter(){return this._context.createBiquadFilter()}createBuffer(e,t,s){return this._context.createBuffer(e,t,s)}createChannelMerger(e){return this._context.createChannelMerger(e)}createChannelSplitter(e){return this._context.createChannelSplitter(e)}createConstantSource(){return this._context.createConstantSource()}createConvolver(){return this._context.createConvolver()}createDelay(e){return this._context.createDelay(e)}createDynamicsCompressor(){return this._context.createDynamicsCompressor()}createGain(){return this._context.createGain()}createIIRFilter(e,t){return this._context.createIIRFilter(e,t)}createPanner(){return this._context.createPanner()}createPeriodicWave(e,t,s){return this._context.createPeriodicWave(e,t,s)}createStereoPanner(){return this._context.createStereoPanner()}createWaveShaper(){return this._context.createWaveShaper()}createMediaStreamSource(e){return me(xr(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamSource(e)}createMediaElementSource(e){return me(xr(this._context),"Not available if OfflineAudioContext"),this._context.createMediaElementSource(e)}createMediaStreamDestination(){return me(xr(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamDestination()}decodeAudioData(e){return this._context.decodeAudioData(e)}get currentTime(){return this._context.currentTime}get state(){return this._context.state}get sampleRate(){return this._context.sampleRate}get listener(){return this.initialize(),this._listener}set listener(e){me(!this._initialized,"The listener cannot be set after initialization."),this._listener=e}get transport(){return this.initialize(),this._transport}set transport(e){me(!this._initialized,"The transport cannot be set after initialization."),this._transport=e}get draw(){return this.initialize(),this._draw}set draw(e){me(!this._initialized,"Draw cannot be set after initialization."),this._draw=e}get destination(){return this.initialize(),this._destination}set destination(e){me(!this._initialized,"The destination cannot be set after initialization."),this._destination=e}createAudioWorkletNode(e,t){return RA(this.rawContext,e,t)}addAudioWorkletModule(e){return Ie(this,void 0,void 0,function*(){me(ve(this.rawContext.audioWorklet),"AudioWorkletNode is only available in a secure context (https or localhost)"),this._workletPromise||(this._workletPromise=this.rawContext.audioWorklet.addModule(e)),yield this._workletPromise})}workletsAreReady(){return Ie(this,void 0,void 0,function*(){(yield this._workletPromise)?this._workletPromise:Promise.resolve()})}get updateInterval(){return this._ticker.updateInterval}set updateInterval(e){this._ticker.updateInterval=e}get clockSource(){return this._ticker.type}set clockSource(e){this._ticker.type=e}get lookAhead(){return this._lookAhead}set lookAhead(e){this._lookAhead=e,this.updateInterval=e?e/2:.01}get latencyHint(){return this._latencyHint}get rawContext(){return this._context}now(){return this._context.currentTime+this._lookAhead}immediate(){return this._context.currentTime}resume(){return xr(this._context)?this._context.resume():Promise.resolve()}close(){return Ie(this,void 0,void 0,function*(){xr(this._context)&&this.state!=="closed"&&!this._closeStarted&&(this._closeStarted=!0,yield this._context.close()),this._initialized&&jA(this)})}getConstant(e){if(this._constants.has(e))return this._constants.get(e);{const t=this._context.createBuffer(1,128,this._context.sampleRate),s=t.getChannelData(0);for(let i=0;ithis._constants[e].disconnect()),this.close(),this}_timeoutLoop(){const e=this.now();let t=this._timeouts.peek();for(;this._timeouts.length&&t&&t.time<=e;)t.callback(),this._timeouts.shift(),t=this._timeouts.peek()}setTimeout(e,t){this._timeoutIds++;const s=this.now();return this._timeouts.add({callback:e,id:this._timeoutIds,time:s+t}),this._timeoutIds}clearTimeout(e){return this._timeouts.forEach(t=>{t.id===e&&this._timeouts.remove(t)}),this}clearInterval(e){return this.clearTimeout(e)}setInterval(e,t){const s=++this._timeoutIds,r=()=>{const i=this.now();this._timeouts.add({callback:()=>{e(),r()},id:s,time:i+t})};return r(),s}};class VA extends Wm{constructor(){super(...arguments),this.lookAhead=0,this.latencyHint=0,this.isOffline=!1}createAnalyser(){return{}}createOscillator(){return{}}createBufferSource(){return{}}createBiquadFilter(){return{}}createBuffer(e,t,s){return{}}createChannelMerger(e){return{}}createChannelSplitter(e){return{}}createConstantSource(){return{}}createConvolver(){return{}}createDelay(e){return{}}createDynamicsCompressor(){return{}}createGain(){return{}}createIIRFilter(e,t){return{}}createPanner(){return{}}createPeriodicWave(e,t,s){return{}}createStereoPanner(){return{}}createWaveShaper(){return{}}createMediaStreamSource(e){return{}}createMediaElementSource(e){return{}}createMediaStreamDestination(){return{}}decodeAudioData(e){return Promise.resolve({})}createAudioWorkletNode(e,t){return{}}get rawContext(){return{}}addAudioWorkletModule(e){return Ie(this,void 0,void 0,function*(){return Promise.resolve()})}resume(){return Promise.resolve()}setTimeout(e,t){return 0}clearTimeout(e){return this}setInterval(e,t){return 0}clearInterval(e){return this}getConstant(e){return{}}get currentTime(){return 0}get state(){return{}}get sampleRate(){return 0}get listener(){return{}}get transport(){return{}}get draw(){return{}}set draw(e){}get destination(){return{}}set destination(e){}now(){return 0}immediate(){return 0}}function je(n,e){ln(e)?e.forEach(t=>je(n,t)):Object.defineProperty(n,e,{enumerable:!0,writable:!1})}function nh(n,e){ln(e)?e.forEach(t=>nh(n,t)):Object.defineProperty(n,e,{writable:!0})}const Ce=()=>{};class Se extends ss{constructor(){super(),this.name="ToneAudioBuffer",this.onload=Ce;const e=K(Se.getDefaults(),arguments,["url","onload","onerror"]);this.reverse=e.reverse,this.onload=e.onload,Yn(e.url)?this.load(e.url).catch(e.onerror):e.url&&this.set(e.url)}static getDefaults(){return{onerror:Ce,onload:Ce,reverse:!1}}get sampleRate(){return this._buffer?this._buffer.sampleRate:on().sampleRate}set(e){return e instanceof Se?e.loaded?this._buffer=e.get():e.onload=()=>{this.set(e),this.onload(this)}:this._buffer=e,this._reversed&&this._reverse(),this}get(){return this._buffer}load(e){return Ie(this,void 0,void 0,function*(){const t=Se.load(e).then(s=>{this.set(s),this.onload(this)});Se.downloads.push(t);try{yield t}finally{const s=Se.downloads.indexOf(t);Se.downloads.splice(s,1)}return this})}dispose(){return super.dispose(),this._buffer=void 0,this}fromArray(e){const t=ln(e)&&e[0].length>0,s=t?e.length:1,r=t?e[0].length:e.length,i=on(),o=i.createBuffer(s,r,i.sampleRate),a=!t&&s===1?[e]:e;for(let c=0;cr/s),this.fromArray(t)}return this}toArray(e){if(xs(e))return this.getChannelData(e);if(this.numberOfChannels===1)return this.toArray(0);{const t=[];for(let s=0;s0}get duration(){return this._buffer?this._buffer.duration:0}get length(){return this._buffer?this._buffer.length:0}get numberOfChannels(){return this._buffer?this._buffer.numberOfChannels:0}get reverse(){return this._reversed}set reverse(e){this._reversed!==e&&(this._reversed=e,this._reverse())}static fromArray(e){return new Se().fromArray(e)}static fromUrl(e){return Ie(this,void 0,void 0,function*(){return yield new Se().load(e)})}static load(e){return Ie(this,void 0,void 0,function*(){const t=e.match(/\[([^\]\[]+\|.+)\]$/);if(t){const c=t[1].split("|");let l=c[0];for(const u of c)if(Se.supportsType(u)){l=u;break}e=e.replace(t[0],l)}const s=Se.baseUrl===""||Se.baseUrl.endsWith("/")?Se.baseUrl:Se.baseUrl+"/",r=document.createElement("a");r.href=s+e,r.pathname=(r.pathname+r.hash).split("/").map(encodeURIComponent).join("/");const i=yield fetch(r.href);if(!i.ok)throw new Error(`could not load url: ${e}`);const o=yield i.arrayBuffer();return yield on().decodeAudioData(o)})}static supportsType(e){const t=e.split("."),s=t[t.length-1];return document.createElement("audio").canPlayType("audio/"+s)!==""}static loaded(){return Ie(this,void 0,void 0,function*(){for(yield Promise.resolve();Se.downloads.length;)yield Se.downloads[0]})}}Se.baseUrl="";Se.downloads=[];class yc extends th{constructor(){super({clockSource:"offline",context:ca(arguments[0])?arguments[0]:AA(arguments[0],arguments[1]*arguments[2],arguments[2]),lookAhead:0,updateInterval:ca(arguments[0])?128/arguments[0].sampleRate:128/arguments[2]}),this.name="OfflineContext",this._currentTime=0,this.isOffline=!0,this._duration=ca(arguments[0])?arguments[0].length/arguments[0].sampleRate:arguments[1]}now(){return this._currentTime}get currentTime(){return this._currentTime}_renderClock(e){return Ie(this,void 0,void 0,function*(){let t=0;for(;this._duration-this._currentTime>=0;){this.emit("tick"),this._currentTime+=128/this.sampleRate,t++;const s=Math.floor(this.sampleRate/128);e&&t%s===0&&(yield new Promise(r=>setTimeout(r,1)))}})}render(e=!0){return Ie(this,void 0,void 0,function*(){yield this.workletsAreReady(),yield this._renderClock(e);const t=yield this._context.startRendering();return new Se(t)})}close(){return Promise.resolve()}}const Hm=new VA;let Vs=Hm;function on(){return Vs===Hm&&PA&&zA(new th),Vs}function zA(n,e=!1){e&&Vs.dispose(),xr(n)?Vs=new th(n):ca(n)?Vs=new yc(n):Vs=n}function UA(){return Vs.resume()}if(Ws&&!Ws.TONE_SILENCE_LOGGING){const e=` * Tone.js v${q0} * `;console.log(`%c${e}`,"background: #000; color: #fff")}function BA(n){return Math.pow(10,n/20)}function WA(n){return 20*(Math.log(n)/Math.LN10)}function Ym(n){return Math.pow(2,n/12)}let vc=440;function qA(){return vc}function HA(n){vc=n}function Wl(n){return Math.round(Gm(n))}function Gm(n){return 69+12*Math.log2(n/vc)}function YA(n){return vc*Math.pow(2,(n-69)/12)}class sh extends ss{constructor(e,t,s){super(),this.defaultUnits="s",this._val=t,this._units=s,this.context=e,this._expressions=this._getExpressions()}_getExpressions(){return{hz:{method:e=>this._frequencyToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)hz$/i},i:{method:e=>this._ticksToUnits(parseInt(e,10)),regexp:/^(\d+)i$/i},m:{method:e=>this._beatsToUnits(parseInt(e,10)*this._getTimeSignature()),regexp:/^(\d+)m$/i},n:{method:(e,t)=>{const s=parseInt(e,10),r=t==="."?1.5:1;return s===1?this._beatsToUnits(this._getTimeSignature())*r:this._beatsToUnits(4/s)*r},regexp:/^(\d+)n(\.?)$/i},number:{method:e=>this._expressions[this.defaultUnits].method.call(this,e),regexp:/^(\d+(?:\.\d+)?)$/},s:{method:e=>this._secondsToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)s$/},samples:{method:e=>parseInt(e,10)/this.context.sampleRate,regexp:/^(\d+)samples$/},t:{method:e=>{const t=parseInt(e,10);return this._beatsToUnits(8/(Math.floor(t)*3))},regexp:/^(\d+)t$/i},tr:{method:(e,t,s)=>{let r=0;return e&&e!=="0"&&(r+=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&t!=="0"&&(r+=this._beatsToUnits(parseFloat(t))),s&&s!=="0"&&(r+=this._beatsToUnits(parseFloat(s)/4)),r},regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/}}}valueOf(){if(this._val instanceof sh&&this.fromType(this._val),zt(this._val))return this._noArg();if(Yn(this._val)&&zt(this._units)){for(const e in this._expressions)if(this._expressions[e].regexp.test(this._val.trim())){this._units=e;break}}else if(Bs(this._val)){let e=0;for(const t in this._val)if(ve(this._val[t])){const s=this._val[t],r=new this.constructor(this.context,t).valueOf()*s;e+=r}return e}if(ve(this._units)){const e=this._expressions[this._units],t=this._val.toString().trim().match(e.regexp);return t?e.method.apply(this,t.slice(1)):e.method.call(this,this._val)}else return Yn(this._val)?parseFloat(this._val):this._val}_frequencyToUnits(e){return 1/e}_beatsToUnits(e){return 60/this._getBpm()*e}_secondsToUnits(e){return e}_ticksToUnits(e){return e*this._beatsToUnits(1)/this._getPPQ()}_noArg(){return this._now()}_getBpm(){return this.context.transport.bpm.value}_getTimeSignature(){return this.context.transport.timeSignature}_getPPQ(){return this.context.transport.PPQ}fromType(e){switch(this._units=void 0,this.defaultUnits){case"s":this._val=e.toSeconds();break;case"i":this._val=e.toTicks();break;case"hz":this._val=e.toFrequency();break;case"midi":this._val=e.toMidi();break}return this}toFrequency(){return 1/this.toSeconds()}toSamples(){return this.toSeconds()*this.context.sampleRate}toMilliseconds(){return this.toSeconds()*1e3}}class an extends sh{constructor(){super(...arguments),this.name="TimeClass"}_getExpressions(){return Object.assign(super._getExpressions(),{now:{method:e=>this._now()+new this.constructor(this.context,e).valueOf(),regexp:/^\+(.+)/},quantize:{method:e=>{const t=new an(this.context,e).valueOf();return this._secondsToUnits(this.context.transport.nextSubdivision(t))},regexp:/^@(.+)/}})}quantize(e,t=1){const s=new this.constructor(this.context,e).valueOf(),r=this.valueOf(),a=Math.round(r/s)*s-r;return r+a*t}toNotation(){const e=this.toSeconds(),t=["1m"];for(let i=1;i<9;i++){const o=Math.pow(2,i);t.push(o+"n."),t.push(o+"n"),t.push(o+"t")}t.push("0");let s=t[0],r=new an(this.context,t[0]).toSeconds();return t.forEach(i=>{const o=new an(this.context,i).toSeconds();Math.abs(o-e)3&&(r=parseFloat(parseFloat(i).toFixed(3))),[s,t,r].join(":")}toTicks(){const e=this._beatsToUnits(1);return this.valueOf()/e*this._getPPQ()}toSeconds(){return this.valueOf()}toMidi(){return Wl(this.toFrequency())}_now(){return this.context.now()}}class Xt extends an{constructor(){super(...arguments),this.name="Frequency",this.defaultUnits="hz"}static get A4(){return qA()}static set A4(e){HA(e)}_getExpressions(){return Object.assign({},super._getExpressions(),{midi:{regexp:/^(\d+(?:\.\d+)?midi)/,method(e){return this.defaultUnits==="midi"?e:Xt.mtof(e)}},note:{regexp:/^([a-g]{1}(?:b|#|##|x|bb|###|#x|x#|bbb)?)(-?[0-9]+)/i,method(e,t){const r=GA[e.toLowerCase()]+(parseInt(t,10)+1)*12;return this.defaultUnits==="midi"?r:Xt.mtof(r)}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method(e,t,s){let r=1;return e&&e!=="0"&&(r*=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&t!=="0"&&(r*=this._beatsToUnits(parseFloat(t))),s&&s!=="0"&&(r*=this._beatsToUnits(parseFloat(s)/4)),r}}})}transpose(e){return new Xt(this.context,this.valueOf()*Ym(e))}harmonize(e){return e.map(t=>this.transpose(t))}toMidi(){return Wl(this.valueOf())}toNote(){const e=this.toFrequency(),t=Math.log2(e/Xt.A4);let s=Math.round(12*t)+57;const r=Math.floor(s/12);return r<0&&(s+=-12*r),XA[s%12]+r.toString()}toSeconds(){return 1/super.toSeconds()}toTicks(){const e=this._beatsToUnits(1),t=this.valueOf()/e;return Math.floor(t*this._getPPQ())}_noArg(){return 0}_frequencyToUnits(e){return e}_ticksToUnits(e){return 1/(e*60/(this._getBpm()*this._getPPQ()))}_beatsToUnits(e){return 1/super._beatsToUnits(e)}_secondsToUnits(e){return 1/e}static mtof(e){return YA(e)}static ftom(e){return Wl(e)}}const GA={cbbb:-3,cbb:-2,cb:-1,c:0,"c#":1,cx:2,"c##":2,"c###":3,"cx#":3,"c#x":3,dbbb:-1,dbb:0,db:1,d:2,"d#":3,dx:4,"d##":4,"d###":5,"dx#":5,"d#x":5,ebbb:1,ebb:2,eb:3,e:4,"e#":5,ex:6,"e##":6,"e###":7,"ex#":7,"e#x":7,fbbb:2,fbb:3,fb:4,f:5,"f#":6,fx:7,"f##":7,"f###":8,"fx#":8,"f#x":8,gbbb:4,gbb:5,gb:6,g:7,"g#":8,gx:9,"g##":9,"g###":10,"gx#":10,"g#x":10,abbb:6,abb:7,ab:8,a:9,"a#":10,ax:11,"a##":11,"a###":12,"ax#":12,"a#x":12,bbbb:8,bbb:9,bb:10,b:11,"b#":12,bx:13,"b##":13,"b###":14,"bx#":14,"b#x":14},XA=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"];class Mi extends an{constructor(){super(...arguments),this.name="TransportTime"}_now(){return this.context.transport.seconds}}class Ot extends ss{constructor(){super();const e=K(Ot.getDefaults(),arguments,["context"]);this.defaultContext?this.context=this.defaultContext:this.context=e.context}static getDefaults(){return{context:on()}}now(){return this.context.currentTime+this.context.lookAhead}immediate(){return this.context.currentTime}get sampleTime(){return 1/this.context.sampleRate}get blockTime(){return 128/this.context.sampleRate}toSeconds(e){return CA(e),new an(this.context,e).toSeconds()}toFrequency(e){return new Xt(this.context,e).toFrequency()}toTicks(e){return new Mi(this.context,e).toTicks()}_getPartialProperties(e){const t=this.get();return Object.keys(t).forEach(s=>{zt(e[s])&&delete t[s]}),t}get(){const e=$A(this);return Object.keys(e).forEach(t=>{if(Reflect.has(this,t)){const s=this[t];ve(s)&&ve(s.value)&&ve(s.setValueAtTime)?e[t]=s.value:s instanceof Ot?e[t]=s._getPartialProperties(e[t]):ln(s)||xs(s)||Yn(s)||EA(s)?e[t]=s:delete e[t]}}),e}set(e){return Object.keys(e).forEach(t=>{Reflect.has(this,t)&&ve(this[t])&&(this[t]&&ve(this[t].value)&&ve(this[t].setValueAtTime)?this[t].value!==e[t]&&(this[t].value=e[t]):this[t]instanceof Ot?this[t].set(e[t]):this[t]=e[t])}),this}}class rh extends kn{constructor(e="stopped"){super(),this.name="StateTimeline",this._initial=e,this.setStateAtTime(this._initial,0)}getValueAtTime(e){const t=this.get(e);return t!==null?t.state:this._initial}setStateAtTime(e,t,s){return dn(t,0),this.add(Object.assign({},s,{state:e,time:t})),this}getLastState(e,t){const s=this._search(t);for(let r=s;r>=0;r--){const i=this._timeline[r];if(i.state===e)return i}}getNextState(e,t){const s=this._search(t);if(s!==-1)for(let r=s;r0,"timeConstant must be a number greater than 0");const i=this.toSeconds(t);return this._assertRange(r),me(isFinite(r)&&isFinite(i),`Invalid argument(s) to setTargetAtTime: ${JSON.stringify(e)}, ${JSON.stringify(t)}`),this._events.add({constant:s,time:i,type:"setTargetAtTime",value:r}),this.log(this.units,"setTargetAtTime",e,i,s),this._param.setTargetAtTime(r,i,s),this}setValueCurveAtTime(e,t,s,r=1){s=this.toSeconds(s),t=this.toSeconds(t);const i=this._fromType(e[0])*r;this.setValueAtTime(this._toType(i),t);const o=s/(e.length-1);for(let a=1;a{r.type==="cancelScheduledValues"?e.cancelScheduledValues(r.time):r.type==="setTargetAtTime"?e.setTargetAtTime(r.value,r.time,r.constant):e[r.type](r.value,r.time)}),this}setParam(e){me(this._swappable,"The Param must be assigned as 'swappable' in the constructor");const t=this.input;return t.disconnect(this._param),this.apply(e),this._param=e,t.connect(this._param),this}dispose(){return super.dispose(),this._events.dispose(),this}get defaultValue(){return this._toType(this._param.defaultValue)}_exponentialApproach(e,t,s,r,i){return s+(t-s)*Math.exp(-(i-e)/r)}_linearInterpolate(e,t,s,r,i){return t+(r-t)*((i-e)/(s-e))}_exponentialInterpolate(e,t,s,r,i){return t*Math.pow(r/t,(i-e)/(s-e))}}class ue extends Ot{constructor(){super(...arguments),this._internalChannels=[]}get numberOfInputs(){return ve(this.input)?Qs(this.input)||this.input instanceof Oe?1:this.input.numberOfInputs:0}get numberOfOutputs(){return ve(this.output)?this.output.numberOfOutputs:0}_isAudioNode(e){return ve(e)&&(e instanceof ue||ps(e))}_getInternalNodes(){const e=this._internalChannels.slice(0);return this._isAudioNode(this.input)&&e.push(this.input),this._isAudioNode(this.output)&&this.input!==this.output&&e.push(this.output),e}_setChannelProperties(e){this._getInternalNodes().forEach(s=>{s.channelCount=e.channelCount,s.channelCountMode=e.channelCountMode,s.channelInterpretation=e.channelInterpretation})}_getChannelProperties(){const e=this._getInternalNodes();me(e.length>0,"ToneAudioNode does not have any internal nodes");const t=e[0];return{channelCount:t.channelCount,channelCountMode:t.channelCountMode,channelInterpretation:t.channelInterpretation}}get channelCount(){return this._getChannelProperties().channelCount}set channelCount(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCount:e}))}get channelCountMode(){return this._getChannelProperties().channelCountMode}set channelCountMode(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCountMode:e}))}get channelInterpretation(){return this._getChannelProperties().channelInterpretation}set channelInterpretation(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelInterpretation:e}))}connect(e,t=0,s=0){return ws(this,e,t,s),this}toDestination(){return this.connect(this.context.destination),this}toMaster(){return Ju("toMaster() has been renamed toDestination()"),this.toDestination()}disconnect(e,t=0,s=0){return ZA(this,e,t,s),this}chain(...e){return qi(this,...e),this}fan(...e){return e.forEach(t=>this.connect(t)),this}dispose(){return super.dispose(),ve(this.input)&&(this.input instanceof ue?this.input.dispose():ps(this.input)&&this.input.disconnect()),ve(this.output)&&(this.output instanceof ue?this.output.dispose():ps(this.output)&&this.output.disconnect()),this._internalChannels=[],this}}function qi(...n){const e=n.shift();n.reduce((t,s)=>(t instanceof ue?t.connect(s):ps(t)&&ws(t,s),s),e)}function ws(n,e,t=0,s=0){for(me(ve(n),"Cannot connect from undefined node"),me(ve(e),"Cannot connect to undefined node"),(e instanceof ue||ps(e))&&me(e.numberOfInputs>0,"Cannot connect to node with no inputs"),me(n.numberOfOutputs>0,"Cannot connect from node with no outputs");e instanceof ue||e instanceof Oe;)ve(e.input)&&(e=e.input);for(;n instanceof ue;)ve(n.output)&&(n=n.output);Qs(e)?n.connect(e,t):n.connect(e,t,s)}function ZA(n,e,t=0,s=0){if(ve(e))for(;e instanceof ue;)e=e.input;for(;!ps(n);)ve(n.output)&&(n=n.output);Qs(e)?n.disconnect(e,t):ps(e)?n.disconnect(e,t,s):n.disconnect()}class Ne extends ue{constructor(){super(K(Ne.getDefaults(),arguments,["gain","units"])),this.name="Gain",this._gainNode=this.context.createGain(),this.input=this._gainNode,this.output=this._gainNode;const e=K(Ne.getDefaults(),arguments,["gain","units"]);this.gain=new Oe({context:this.context,convert:e.convert,param:this._gainNode.gain,units:e.units,value:e.gain,minValue:e.minValue,maxValue:e.maxValue}),je(this,"gain")}static getDefaults(){return Object.assign(ue.getDefaults(),{convert:!0,gain:1,units:"gain"})}dispose(){return super.dispose(),this._gainNode.disconnect(),this.gain.dispose(),this}}class zr extends ue{constructor(e){super(e),this.onended=Ce,this._startTime=-1,this._stopTime=-1,this._timeout=-1,this.output=new Ne({context:this.context,gain:0}),this._gainNode=this.output,this.getStateAtTime=function(t){const s=this.toSeconds(t);return this._startTime!==-1&&s>=this._startTime&&(this._stopTime===-1||s<=this._stopTime)?"started":"stopped"},this._fadeIn=e.fadeIn,this._fadeOut=e.fadeOut,this._curve=e.curve,this.onended=e.onended}static getDefaults(){return Object.assign(ue.getDefaults(),{curve:"linear",fadeIn:0,fadeOut:0,onended:Ce})}_startGain(e,t=1){me(this._startTime===-1,"Source cannot be started more than once");const s=this.toSeconds(this._fadeIn);return this._startTime=e+s,this._startTime=Math.max(this._startTime,this.context.currentTime),s>0?(this._gainNode.gain.setValueAtTime(0,e),this._curve==="linear"?this._gainNode.gain.linearRampToValueAtTime(t,e+s):this._gainNode.gain.exponentialApproachValueAtTime(t,e,s)):this._gainNode.gain.setValueAtTime(t,e),this}stop(e){return this.log("stop",e),this._stopGain(this.toSeconds(e)),this}_stopGain(e){me(this._startTime!==-1,"'start' must be called before 'stop'"),this.cancelStop();const t=this.toSeconds(this._fadeOut);return this._stopTime=this.toSeconds(e)+t,this._stopTime=Math.max(this._stopTime,this.now()),t>0?this._curve==="linear"?this._gainNode.gain.linearRampTo(0,t,e):this._gainNode.gain.targetRampTo(0,t,e):(this._gainNode.gain.cancelAndHoldAtTime(e),this._gainNode.gain.setValueAtTime(0,e)),this.context.clearTimeout(this._timeout),this._timeout=this.context.setTimeout(()=>{const s=this._curve==="exponential"?t*2:0;this._stopSource(this.now()+s),this._onended()},this._stopTime-this.context.currentTime),this}_onended(){if(this.onended!==Ce&&(this.onended(this),this.onended=Ce,!this.context.isOffline)){const e=()=>this.dispose();typeof window.requestIdleCallback<"u"?window.requestIdleCallback(e):setTimeout(e,1e3)}}get state(){return this.getStateAtTime(this.now())}cancelStop(){return this.log("cancelStop"),me(this._startTime!==-1,"Source is not started"),this._gainNode.gain.cancelScheduledValues(this._startTime+this.sampleTime),this.context.clearTimeout(this._timeout),this._stopTime=-1,this}dispose(){return super.dispose(),this._gainNode.dispose(),this.onended=Ce,this}}class $a extends zr{constructor(){super(K($a.getDefaults(),arguments,["offset"])),this.name="ToneConstantSource",this._source=this.context.createConstantSource();const e=K($a.getDefaults(),arguments,["offset"]);ws(this._source,this._gainNode),this.offset=new Oe({context:this.context,convert:e.convert,param:this._source.offset,units:e.units,value:e.offset,minValue:e.minValue,maxValue:e.maxValue})}static getDefaults(){return Object.assign(zr.getDefaults(),{convert:!0,offset:1,units:"number"})}start(e){const t=this.toSeconds(e);return this.log("start",t),this._startGain(t),this._source.start(t),this}_stopSource(e){this._source.stop(e)}dispose(){return super.dispose(),this.state==="started"&&this.stop(),this._source.disconnect(),this.offset.dispose(),this}}class Fe extends ue{constructor(){super(K(Fe.getDefaults(),arguments,["value","units"])),this.name="Signal",this.override=!0;const e=K(Fe.getDefaults(),arguments,["value","units"]);this.output=this._constantSource=new $a({context:this.context,convert:e.convert,offset:e.value,units:e.units,minValue:e.minValue,maxValue:e.maxValue}),this._constantSource.start(0),this.input=this._param=this._constantSource.offset}static getDefaults(){return Object.assign(ue.getDefaults(),{convert:!0,units:"number",value:0})}connect(e,t=0,s=0){return ih(this,e,t,s),this}dispose(){return super.dispose(),this._param.dispose(),this._constantSource.dispose(),this}setValueAtTime(e,t){return this._param.setValueAtTime(e,t),this}getValueAtTime(e){return this._param.getValueAtTime(e)}setRampPoint(e){return this._param.setRampPoint(e),this}linearRampToValueAtTime(e,t){return this._param.linearRampToValueAtTime(e,t),this}exponentialRampToValueAtTime(e,t){return this._param.exponentialRampToValueAtTime(e,t),this}exponentialRampTo(e,t,s){return this._param.exponentialRampTo(e,t,s),this}linearRampTo(e,t,s){return this._param.linearRampTo(e,t,s),this}targetRampTo(e,t,s){return this._param.targetRampTo(e,t,s),this}exponentialApproachValueAtTime(e,t,s){return this._param.exponentialApproachValueAtTime(e,t,s),this}setTargetAtTime(e,t,s){return this._param.setTargetAtTime(e,t,s),this}setValueCurveAtTime(e,t,s,r){return this._param.setValueCurveAtTime(e,t,s,r),this}cancelScheduledValues(e){return this._param.cancelScheduledValues(e),this}cancelAndHoldAtTime(e){return this._param.cancelAndHoldAtTime(e),this}rampTo(e,t,s){return this._param.rampTo(e,t,s),this}get value(){return this._param.value}set value(e){this._param.value=e}get convert(){return this._param.convert}set convert(e){this._param.convert=e}get units(){return this._param.units}get overridden(){return this._param.overridden}set overridden(e){this._param.overridden=e}get maxValue(){return this._param.maxValue}get minValue(){return this._param.minValue}apply(e){return this._param.apply(e),this}}function ih(n,e,t,s){(e instanceof Oe||Qs(e)||e instanceof Fe&&e.override)&&(e.cancelScheduledValues(0),e.setValueAtTime(0,0),e instanceof Fe&&(e.overridden=!0)),ws(n,e,t,s)}class Fa extends Oe{constructor(){super(K(Fa.getDefaults(),arguments,["value"])),this.name="TickParam",this._events=new kn(1/0),this._multiplier=1;const e=K(Fa.getDefaults(),arguments,["value"]);this._multiplier=e.multiplier,this._events.cancel(0),this._events.add({ticks:0,time:0,type:"setValueAtTime",value:this._fromType(e.value)}),this.setValueAtTime(e.value,0)}static getDefaults(){return Object.assign(Oe.getDefaults(),{multiplier:1,units:"hertz",value:1})}setTargetAtTime(e,t,s){t=this.toSeconds(t),this.setRampPoint(t);const r=this._fromType(e),i=this._events.get(t),o=Math.round(Math.max(1/s,1));for(let a=0;a<=o;a++){const c=s*a+t,l=this._exponentialApproach(i.time,i.value,r,s,c);this.linearRampToValueAtTime(this._toType(l),c)}return this}setValueAtTime(e,t){const s=this.toSeconds(t);super.setValueAtTime(e,t);const r=this._events.get(s),i=this._events.previousEvent(r),o=this._getTicksUntilEvent(i,s);return r.ticks=Math.max(o,0),this}linearRampToValueAtTime(e,t){const s=this.toSeconds(t);super.linearRampToValueAtTime(e,t);const r=this._events.get(s),i=this._events.previousEvent(r),o=this._getTicksUntilEvent(i,s);return r.ticks=Math.max(o,0),this}exponentialRampToValueAtTime(e,t){t=this.toSeconds(t);const s=this._fromType(e),r=this._events.get(t),i=Math.round(Math.max((t-r.time)*10,1)),o=(t-r.time)/i;for(let a=0;a<=i;a++){const c=o*a+r.time,l=this._exponentialInterpolate(r.time,r.value,t,s,c);this.linearRampToValueAtTime(this._toType(l),c)}return this}_getTicksUntilEvent(e,t){if(e===null)e={ticks:0,time:0,type:"setValueAtTime",value:0};else if(zt(e.ticks)){const o=this._events.previousEvent(e);e.ticks=this._getTicksUntilEvent(o,e.time)}const s=this._fromType(this.getValueAtTime(e.time));let r=this._fromType(this.getValueAtTime(t));const i=this._events.get(t);return i&&i.time===t&&i.type==="setValueAtTime"&&(r=this._fromType(this.getValueAtTime(t-this.sampleTime))),.5*(t-e.time)*(s+r)+e.ticks}getTicksAtTime(e){const t=this.toSeconds(e),s=this._events.get(t);return Math.max(this._getTicksUntilEvent(s,t),0)}getDurationOfTicks(e,t){const s=this.toSeconds(t),r=this.getTicksAtTime(t);return this.getTimeOfTick(r+e)-s}getTimeOfTick(e){const t=this._events.get(e,"ticks"),s=this._events.getAfter(e,"ticks");if(t&&t.ticks===e)return t.time;if(t&&s&&s.type==="linearRampToValueAtTime"&&t.value!==s.value){const r=this._fromType(this.getValueAtTime(t.time)),o=(this._fromType(this.getValueAtTime(s.time))-r)/(s.time-t.time),a=Math.sqrt(Math.pow(r,2)-2*o*(t.ticks-e)),c=(-r+a)/o,l=(-r-a)/o;return(c>0?c:l)+t.time}else return t?t.value===0?1/0:t.time+(e-t.ticks)/t.value:e/this._initialValue}ticksToTime(e,t){return this.getDurationOfTicks(e,t)}timeToTicks(e,t){const s=this.toSeconds(t),r=this.toSeconds(e),i=this.getTicksAtTime(s);return this.getTicksAtTime(s+r)-i}_fromType(e){return this.units==="bpm"&&this.multiplier?1/(60/e/this.multiplier):super._fromType(e)}_toType(e){return this.units==="bpm"&&this.multiplier?e/this.multiplier*60:super._toType(e)}get multiplier(){return this._multiplier}set multiplier(e){const t=this.value;this._multiplier=e,this.cancelScheduledValues(0),this.setValueAtTime(t,0)}}class La extends Fe{constructor(){super(K(La.getDefaults(),arguments,["value"])),this.name="TickSignal";const e=K(La.getDefaults(),arguments,["value"]);this.input=this._param=new Fa({context:this.context,convert:e.convert,multiplier:e.multiplier,param:this._constantSource.offset,units:e.units,value:e.value})}static getDefaults(){return Object.assign(Fe.getDefaults(),{multiplier:1,units:"hertz",value:1})}ticksToTime(e,t){return this._param.ticksToTime(e,t)}timeToTicks(e,t){return this._param.timeToTicks(e,t)}getTimeOfTick(e){return this._param.getTimeOfTick(e)}getDurationOfTicks(e,t){return this._param.getDurationOfTicks(e,t)}getTicksAtTime(e){return this._param.getTicksAtTime(e)}get multiplier(){return this._param.multiplier}set multiplier(e){this._param.multiplier=e}dispose(){return super.dispose(),this._param.dispose(),this}}class ja extends Ot{constructor(){super(K(ja.getDefaults(),arguments,["frequency"])),this.name="TickSource",this._state=new rh,this._tickOffset=new kn,this._ticksAtTime=new kn,this._secondsAtTime=new kn;const e=K(ja.getDefaults(),arguments,["frequency"]);this.frequency=new La({context:this.context,units:e.units,value:e.frequency}),je(this,"frequency"),this._state.setStateAtTime("stopped",0),this.setTicksAtTime(0,0)}static getDefaults(){return Object.assign({frequency:1,units:"hertz"},Ot.getDefaults())}get state(){return this.getStateAtTime(this.now())}start(e,t){const s=this.toSeconds(e);return this._state.getValueAtTime(s)!=="started"&&(this._state.setStateAtTime("started",s),ve(t)&&this.setTicksAtTime(t,s),this._ticksAtTime.cancel(s),this._secondsAtTime.cancel(s)),this}stop(e){const t=this.toSeconds(e);if(this._state.getValueAtTime(t)==="stopped"){const s=this._state.get(t);s&&s.time>0&&(this._tickOffset.cancel(s.time),this._state.cancel(s.time))}return this._state.cancel(t),this._state.setStateAtTime("stopped",t),this.setTicksAtTime(0,t),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t),this}pause(e){const t=this.toSeconds(e);return this._state.getValueAtTime(t)==="started"&&(this._state.setStateAtTime("paused",t),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t)),this}cancel(e){return e=this.toSeconds(e),this._state.cancel(e),this._tickOffset.cancel(e),this._ticksAtTime.cancel(e),this._secondsAtTime.cancel(e),this}getTicksAtTime(e){const t=this.toSeconds(e),s=this._state.getLastState("stopped",t),r=this._ticksAtTime.get(t),i={state:"paused",time:t};this._state.add(i);let o=r||s,a=r?r.ticks:0,c=null;return this._state.forEachBetween(o.time,t+this.sampleTime,l=>{let u=o.time;const h=this._tickOffset.get(l.time);h&&h.time>=o.time&&(a=h.ticks,u=h.time),o.state==="started"&&l.state!=="started"&&(a+=this.frequency.getTicksAtTime(l.time)-this.frequency.getTicksAtTime(u),l.time!=i.time&&(c={state:l.state,time:l.time,ticks:a})),o=l}),this._state.remove(i),c&&this._ticksAtTime.add(c),a}get ticks(){return this.getTicksAtTime(this.now())}set ticks(e){this.setTicksAtTime(e,this.now())}get seconds(){return this.getSecondsAtTime(this.now())}set seconds(e){const t=this.now(),s=this.frequency.timeToTicks(e,t);this.setTicksAtTime(s,t)}getSecondsAtTime(e){e=this.toSeconds(e);const t=this._state.getLastState("stopped",e),s={state:"paused",time:e};this._state.add(s);const r=this._secondsAtTime.get(e);let i=r||t,o=r?r.seconds:0,a=null;return this._state.forEachBetween(i.time,e+this.sampleTime,c=>{let l=i.time;const u=this._tickOffset.get(c.time);u&&u.time>=i.time&&(o=u.seconds,l=u.time),i.state==="started"&&c.state!=="started"&&(o+=c.time-l,c.time!=s.time&&(a={state:c.state,time:c.time,seconds:o})),i=c}),this._state.remove(s),a&&this._secondsAtTime.add(a),o}setTicksAtTime(e,t){return t=this.toSeconds(t),this._tickOffset.cancel(t),this._tickOffset.add({seconds:this.frequency.getDurationOfTicks(e,t),ticks:e,time:t}),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t),this}getStateAtTime(e){return e=this.toSeconds(e),this._state.getValueAtTime(e)}getTimeOfTick(e,t=this.now()){const s=this._tickOffset.get(t),r=this._state.get(t),i=Math.max(s.time,r.time),o=this.frequency.getTicksAtTime(i)+e-s.ticks;return this.frequency.getTimeOfTick(o)}forEachTickBetween(e,t,s){let r=this._state.get(e);this._state.forEachBetween(e,t,o=>{r&&r.state==="started"&&o.state!=="started"&&this.forEachTickBetween(Math.max(r.time,e),o.time-this.sampleTime,s),r=o});let i=null;if(r&&r.state==="started"){const o=Math.max(r.time,e),a=this.frequency.getTicksAtTime(o),c=this.frequency.getTicksAtTime(r.time),l=a-c;let u=Math.ceil(l)-l;u=rn(u,1)?0:u;let h=this.frequency.getTimeOfTick(a+u);for(;h{switch(s.state){case"started":const r=this._tickSource.getTicksAtTime(s.time);this.emit("start",s.time,r);break;case"stopped":s.time!==0&&this.emit("stop",s.time);break;case"paused":this.emit("pause",s.time);break}}),this._tickSource.forEachTickBetween(e,t,(s,r)=>{this.callback(s,r)}))}getStateAtTime(e){const t=this.toSeconds(e);return this._state.getValueAtTime(t)}dispose(){return super.dispose(),this.context.off("tick",this._boundLoop),this._tickSource.dispose(),this._state.dispose(),this}}Do.mixin(Hi);class oh extends ss{constructor(){super(),this.name="ToneAudioBuffers",this._buffers=new Map,this._loadingCount=0;const e=K(oh.getDefaults(),arguments,["urls","onload","baseUrl"],"urls");this.baseUrl=e.baseUrl,Object.keys(e.urls).forEach(t=>{this._loadingCount++;const s=e.urls[t];this.add(t,s,this._bufferLoaded.bind(this,e.onload),e.onerror)})}static getDefaults(){return{baseUrl:"",onerror:Ce,onload:Ce,urls:{}}}has(e){return this._buffers.has(e.toString())}get(e){return me(this.has(e),`ToneAudioBuffers has no buffer named: ${e}`),this._buffers.get(e.toString())}_bufferLoaded(e){this._loadingCount--,this._loadingCount===0&&e&&e()}get loaded(){return Array.from(this._buffers).every(([e,t])=>t.loaded)}add(e,t,s=Ce,r=Ce){return Yn(t)?(this.baseUrl&&t.trim().substring(0,11).toLowerCase()==="data:audio/"&&(this.baseUrl=""),this._buffers.set(e.toString(),new Se(this.baseUrl+t,s,r))):this._buffers.set(e.toString(),new Se(t,s,r)),this}dispose(){return super.dispose(),this._buffers.forEach(e=>e.dispose()),this._buffers.clear(),this}}class Tr extends Mi{constructor(){super(...arguments),this.name="Ticks",this.defaultUnits="i"}_now(){return this.context.transport.ticks}_beatsToUnits(e){return this._getPPQ()*e}_secondsToUnits(e){return Math.floor(e/(60/this._getBpm())*this._getPPQ())}_ticksToUnits(e){return e}toTicks(){return this.valueOf()}toSeconds(){return this.valueOf()/this._getPPQ()*(60/this._getBpm())}}class KA extends Ot{constructor(){super(...arguments),this.name="Draw",this.expiration=.25,this.anticipation=.008,this._events=new kn,this._boundDrawLoop=this._drawLoop.bind(this),this._animationFrame=-1}schedule(e,t){return this._events.add({callback:e,time:this.toSeconds(t)}),this._events.length===1&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop)),this}cancel(e){return this._events.cancel(this.toSeconds(e)),this}_drawLoop(){const e=this.context.currentTime;for(;this._events.length&&this._events.peek().time-this.anticipation<=e;){const t=this._events.shift();t&&e-t.time<=this.expiration&&t.callback()}this._events.length>0&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop))}dispose(){return super.dispose(),this._events.dispose(),cancelAnimationFrame(this._animationFrame),this}}gc(n=>{n.draw=new KA({context:n})});_c(n=>{n.draw.dispose()});class QA extends ss{constructor(){super(...arguments),this.name="IntervalTimeline",this._root=null,this._length=0}add(e){me(ve(e.time),"Events must have a time property"),me(ve(e.duration),"Events must have a duration parameter"),e.time=e.time.valueOf();let t=new JA(e.time,e.time+e.duration,e);for(this._root===null?this._root=t:this._root.insert(t),this._length++;t!==null;)t.updateHeight(),t.updateMax(),this._rebalance(t),t=t.parent;return this}remove(e){if(this._root!==null){const t=[];this._root.search(e.time,t);for(const s of t)if(s.event===e){this._removeNode(s),this._length--;break}}return this}get length(){return this._length}cancel(e){return this.forEachFrom(e,t=>this.remove(t)),this}_setRoot(e){this._root=e,this._root!==null&&(this._root.parent=null)}_replaceNodeInParent(e,t){e.parent!==null?(e.isLeftChild()?e.parent.left=t:e.parent.right=t,this._rebalance(e.parent)):this._setRoot(t)}_removeNode(e){if(e.left===null&&e.right===null)this._replaceNodeInParent(e,null);else if(e.right===null)this._replaceNodeInParent(e,e.left);else if(e.left===null)this._replaceNodeInParent(e,e.right);else{const t=e.getBalance();let s,r=null;if(t>0)if(e.left.right===null)s=e.left,s.right=e.right,r=s;else{for(s=e.left.right;s.right!==null;)s=s.right;s.parent&&(s.parent.right=s.left,r=s.parent,s.left=e.left,s.right=e.right)}else if(e.right.left===null)s=e.right,s.left=e.left,r=s;else{for(s=e.right.left;s.left!==null;)s=s.left;s.parent&&(s.parent.left=s.right,r=s.parent,s.left=e.left,s.right=e.right)}e.parent!==null?e.isLeftChild()?e.parent.left=s:e.parent.right=s:this._setRoot(s),r&&this._rebalance(r)}e.dispose()}_rotateLeft(e){const t=e.parent,s=e.isLeftChild(),r=e.right;r&&(e.right=r.left,r.left=e),t!==null?s?t.left=r:t.right=r:this._setRoot(r)}_rotateRight(e){const t=e.parent,s=e.isLeftChild(),r=e.left;r&&(e.left=r.right,r.right=e),t!==null?s?t.left=r:t.right=r:this._setRoot(r)}_rebalance(e){const t=e.getBalance();t>1&&e.left?e.left.getBalance()<0?this._rotateLeft(e.left):this._rotateRight(e):t<-1&&e.right&&(e.right.getBalance()>0?this._rotateRight(e.right):this._rotateLeft(e))}get(e){if(this._root!==null){const t=[];if(this._root.search(e,t),t.length>0){let s=t[0];for(let r=1;rs.low&&(s=t[r]);return s.event}}return null}forEach(e){if(this._root!==null){const t=[];this._root.traverse(s=>t.push(s)),t.forEach(s=>{s.event&&e(s.event)})}return this}forEachAtTime(e,t){if(this._root!==null){const s=[];this._root.search(e,s),s.forEach(r=>{r.event&&t(r.event)})}return this}forEachFrom(e,t){if(this._root!==null){const s=[];this._root.searchAfter(e,s),s.forEach(r=>{r.event&&t(r.event)})}return this}dispose(){return super.dispose(),this._root!==null&&this._root.traverse(e=>e.dispose()),this._root=null,this}}class JA{constructor(e,t,s){this._left=null,this._right=null,this.parent=null,this.height=0,this.event=s,this.low=e,this.high=t,this.max=this.high}insert(e){e.low<=this.low?this.left===null?this.left=e:this.left.insert(e):this.right===null?this.right=e:this.right.insert(e)}search(e,t){e>this.max||(this.left!==null&&this.left.search(e,t),this.low<=e&&this.high>e&&t.push(this),!(this.low>e)&&this.right!==null&&this.right.search(e,t))}searchAfter(e,t){this.low>=e&&(t.push(this),this.left!==null&&this.left.searchAfter(e,t)),this.right!==null&&this.right.searchAfter(e,t)}traverse(e){e(this),this.left!==null&&this.left.traverse(e),this.right!==null&&this.right.traverse(e)}updateHeight(){this.left!==null&&this.right!==null?this.height=Math.max(this.left.height,this.right.height)+1:this.right!==null?this.height=this.right.height+1:this.left!==null?this.height=this.left.height+1:this.height=0}updateMax(){this.max=this.high,this.left!==null&&(this.max=Math.max(this.max,this.left.max)),this.right!==null&&(this.max=Math.max(this.max,this.right.max))}getBalance(){let e=0;return this.left!==null&&this.right!==null?e=this.left.height-this.right.height:this.left!==null?e=this.left.height+1:this.right!==null&&(e=-(this.right.height+1)),e}isLeftChild(){return this.parent!==null&&this.parent.left===this}get left(){return this._left}set left(e){this._left=e,e!==null&&(e.parent=this),this.updateHeight(),this.updateMax()}get right(){return this._right}set right(e){this._right=e,e!==null&&(e.parent=this),this.updateHeight(),this.updateMax()}dispose(){this.parent=null,this._left=null,this._right=null,this.event=null}}class ks extends ue{constructor(){super(K(ks.getDefaults(),arguments,["volume"])),this.name="Volume";const e=K(ks.getDefaults(),arguments,["volume"]);this.input=this.output=new Ne({context:this.context,gain:e.volume,units:"decibels"}),this.volume=this.output.gain,je(this,"volume"),this._unmutedVolume=e.volume,this.mute=e.mute}static getDefaults(){return Object.assign(ue.getDefaults(),{mute:!1,volume:0})}get mute(){return this.volume.value===-1/0}set mute(e){!this.mute&&e?(this._unmutedVolume=this.volume.value,this.volume.value=-1/0):this.mute&&!e&&(this.volume.value=this._unmutedVolume)}dispose(){return super.dispose(),this.input.dispose(),this.volume.dispose(),this}}let eP=class ql extends ue{constructor(){super(K(ql.getDefaults(),arguments)),this.name="Destination",this.input=new ks({context:this.context}),this.output=new Ne({context:this.context}),this.volume=this.input.volume;const e=K(ql.getDefaults(),arguments);qi(this.input,this.output,this.context.rawContext.destination),this.mute=e.mute,this._internalChannels=[this.input,this.context.rawContext.destination,this.output]}static getDefaults(){return Object.assign(ue.getDefaults(),{mute:!1,volume:0})}get mute(){return this.input.mute}set mute(e){this.input.mute=e}chain(...e){return this.input.disconnect(),e.unshift(this.input),e.push(this.output),qi(...e),this}get maxChannelCount(){return this.context.rawContext.destination.maxChannelCount}dispose(){return super.dispose(),this.volume.dispose(),this}};gc(n=>{n.destination=new eP({context:n})});_c(n=>{n.destination.dispose()});class tP extends ss{constructor(e){super(),this.name="TimelineValue",this._timeline=new kn({memory:10}),this._initialValue=e}set(e,t){return this._timeline.add({value:e,time:t}),this}get(e){const t=this._timeline.get(e);return t?t.value:this._initialValue}}class Gn extends ue{constructor(){super(Object.assign(K(Gn.getDefaults(),arguments,["context"])))}connect(e,t=0,s=0){return ih(this,e,t,s),this}}class Js extends Gn{constructor(){super(Object.assign(K(Js.getDefaults(),arguments,["mapping","length"]))),this.name="WaveShaper",this._shaper=this.context.createWaveShaper(),this.input=this._shaper,this.output=this._shaper;const e=K(Js.getDefaults(),arguments,["mapping","length"]);ln(e.mapping)||e.mapping instanceof Float32Array?this.curve=Float32Array.from(e.mapping):TA(e.mapping)&&this.setMap(e.mapping,e.length)}static getDefaults(){return Object.assign(Fe.getDefaults(),{length:1024})}setMap(e,t=1024){const s=new Float32Array(t);for(let r=0,i=t;rs.includes(e));me(t,"oversampling must be either 'none', '2x', or '4x'"),this._shaper.oversample=e}dispose(){return super.dispose(),this._shaper.disconnect(),this}}class Yi extends Gn{constructor(){super(Object.assign(K(Yi.getDefaults(),arguments,["value"]))),this.name="Pow";const e=K(Yi.getDefaults(),arguments,["value"]);this._exponentScaler=this.input=this.output=new Js({context:this.context,mapping:this._expFunc(e.value),length:8192}),this._exponent=e.value}static getDefaults(){return Object.assign(Gn.getDefaults(),{value:1})}_expFunc(e){return t=>Math.pow(Math.abs(t),e)}get value(){return this._exponent}set value(e){this._exponent=e,this._exponentScaler.setMap(this._expFunc(this._exponent))}dispose(){return super.dispose(),this._exponentScaler.dispose(),this}}class Ts{constructor(e,t){this.id=Ts._eventId++,this._remainderTime=0;const s=Object.assign(Ts.getDefaults(),t);this.transport=e,this.callback=s.callback,this._once=s.once,this.time=Math.floor(s.time),this._remainderTime=s.time-this.time}static getDefaults(){return{callback:Ce,once:!1,time:0}}get floatTime(){return this.time+this._remainderTime}invoke(e){if(this.callback){const t=this.transport.bpm.getDurationOfTicks(1,e);this.callback(e+this._remainderTime*t),this._once&&this.transport.clear(this.id)}}dispose(){return this.callback=void 0,this}}Ts._eventId=0;class ah extends Ts{constructor(e,t){super(e,t),this._currentId=-1,this._nextId=-1,this._nextTick=this.time,this._boundRestart=this._restart.bind(this);const s=Object.assign(ah.getDefaults(),t);this.duration=s.duration,this._interval=s.interval,this._nextTick=s.time,this.transport.on("start",this._boundRestart),this.transport.on("loopStart",this._boundRestart),this.transport.on("ticks",this._boundRestart),this.context=this.transport.context,this._restart()}static getDefaults(){return Object.assign({},Ts.getDefaults(),{duration:1/0,interval:1,once:!1})}invoke(e){this._createEvents(e),super.invoke(e)}_createEvent(){return Na(this._nextTick,this.floatTime+this.duration)?this.transport.scheduleOnce(this.invoke.bind(this),new Tr(this.context,this._nextTick).toSeconds()):-1}_createEvents(e){Na(this._nextTick+this._interval,this.floatTime+this.duration)&&(this._nextTick+=this._interval,this._currentId=this._nextId,this._nextId=this.transport.scheduleOnce(this.invoke.bind(this),new Tr(this.context,this._nextTick).toSeconds()))}_restart(e){this.transport.clear(this._currentId),this.transport.clear(this._nextId),this._nextTick=this.floatTime;const t=this.transport.getTicksAtTime(e);Vr(t,this.time)&&(this._nextTick=this.floatTime+Math.ceil((t-this.floatTime)/this._interval)*this._interval),this._currentId=this._createEvent(),this._nextTick+=this._interval,this._nextId=this._createEvent()}dispose(){return super.dispose(),this.transport.clear(this._currentId),this.transport.clear(this._nextId),this.transport.off("start",this._boundRestart),this.transport.off("loopStart",this._boundRestart),this.transport.off("ticks",this._boundRestart),this}}class Gi extends Ot{constructor(){super(K(Gi.getDefaults(),arguments)),this.name="Transport",this._loop=new tP(!1),this._loopStart=0,this._loopEnd=0,this._scheduledEvents={},this._timeline=new kn,this._repeatedEvents=new QA,this._syncedSignals=[],this._swingAmount=0;const e=K(Gi.getDefaults(),arguments);this._ppq=e.ppq,this._clock=new Hi({callback:this._processTick.bind(this),context:this.context,frequency:0,units:"bpm"}),this._bindClockEvents(),this.bpm=this._clock.frequency,this._clock.frequency.multiplier=e.ppq,this.bpm.setValueAtTime(e.bpm,0),je(this,"bpm"),this._timeSignature=e.timeSignature,this._swingTicks=e.ppq/2}static getDefaults(){return Object.assign(Ot.getDefaults(),{bpm:120,loopEnd:"4m",loopStart:0,ppq:192,swing:0,swingSubdivision:"8n",timeSignature:4})}_processTick(e,t){if(this._loop.get(e)&&t>=this._loopEnd&&(this.emit("loopEnd",e),this._clock.setTicksAtTime(this._loopStart,e),t=this._loopStart,this.emit("loopStart",e,this._clock.getSecondsAtTime(e)),this.emit("loop",e)),this._swingAmount>0&&t%this._ppq!==0&&t%(this._swingTicks*2)!==0){const s=t%(this._swingTicks*2)/(this._swingTicks*2),r=Math.sin(s*Math.PI)*this._swingAmount;e+=new Tr(this.context,this._swingTicks*2/3).toSeconds()*r}Cf(!0),this._timeline.forEachAtTime(t,s=>s.invoke(e)),Cf(!1)}schedule(e,t){const s=new Ts(this,{callback:e,time:new Mi(this.context,t).toTicks()});return this._addEvent(s,this._timeline)}scheduleRepeat(e,t,s,r=1/0){const i=new ah(this,{callback:e,duration:new an(this.context,r).toTicks(),interval:new an(this.context,t).toTicks(),time:new Mi(this.context,s).toTicks()});return this._addEvent(i,this._repeatedEvents)}scheduleOnce(e,t){const s=new Ts(this,{callback:e,once:!0,time:new Mi(this.context,t).toTicks()});return this._addEvent(s,this._timeline)}clear(e){if(this._scheduledEvents.hasOwnProperty(e)){const t=this._scheduledEvents[e.toString()];t.timeline.remove(t.event),t.event.dispose(),delete this._scheduledEvents[e.toString()]}return this}_addEvent(e,t){return this._scheduledEvents[e.id.toString()]={event:e,timeline:t},t.add(e),e.id}cancel(e=0){const t=this.toTicks(e);return this._timeline.forEachFrom(t,s=>this.clear(s.id)),this._repeatedEvents.forEachFrom(t,s=>this.clear(s.id)),this}_bindClockEvents(){this._clock.on("start",(e,t)=>{t=new Tr(this.context,t).toSeconds(),this.emit("start",e,t)}),this._clock.on("stop",e=>{this.emit("stop",e)}),this._clock.on("pause",e=>{this.emit("pause",e)})}get state(){return this._clock.getStateAtTime(this.now())}start(e,t){this.context.resume();let s;return ve(t)&&(s=this.toTicks(t)),this._clock.start(e,s),this}stop(e){return this._clock.stop(e),this}pause(e){return this._clock.pause(e),this}toggle(e){return e=this.toSeconds(e),this._clock.getStateAtTime(e)!=="started"?this.start(e):this.stop(e),this}get timeSignature(){return this._timeSignature}set timeSignature(e){ln(e)&&(e=e[0]/e[1]*4),this._timeSignature=e}get loopStart(){return new an(this.context,this._loopStart,"i").toSeconds()}set loopStart(e){this._loopStart=this.toTicks(e)}get loopEnd(){return new an(this.context,this._loopEnd,"i").toSeconds()}set loopEnd(e){this._loopEnd=this.toTicks(e)}get loop(){return this._loop.get(this.now())}set loop(e){this._loop.set(e,this.now())}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get swing(){return this._swingAmount}set swing(e){this._swingAmount=e}get swingSubdivision(){return new Tr(this.context,this._swingTicks).toNotation()}set swingSubdivision(e){this._swingTicks=this.toTicks(e)}get position(){const e=this.now(),t=this._clock.getTicksAtTime(e);return new Tr(this.context,t).toBarsBeatsSixteenths()}set position(e){const t=this.toTicks(e);this.ticks=t}get seconds(){return this._clock.seconds}set seconds(e){const t=this.now(),s=this._clock.frequency.timeToTicks(e,t);this.ticks=s}get progress(){if(this.loop){const e=this.now();return(this._clock.getTicksAtTime(e)-this._loopStart)/(this._loopEnd-this._loopStart)}else return 0}get ticks(){return this._clock.ticks}set ticks(e){if(this._clock.ticks!==e){const t=this.now();if(this.state==="started"){const s=this._clock.getTicksAtTime(t),r=this._clock.frequency.getDurationOfTicks(Math.ceil(s)-s,t),i=t+r;this.emit("stop",i),this._clock.setTicksAtTime(e,i),this.emit("start",i,this._clock.getSecondsAtTime(i))}else this.emit("ticks",t),this._clock.setTicksAtTime(e,t)}}getTicksAtTime(e){return this._clock.getTicksAtTime(e)}getSecondsAtTime(e){return this._clock.getSecondsAtTime(e)}get PPQ(){return this._clock.frequency.multiplier}set PPQ(e){this._clock.frequency.multiplier=e}nextSubdivision(e){if(e=this.toTicks(e),this.state!=="started")return 0;{const t=this.now(),s=this.getTicksAtTime(t),r=e-s%e;return this._clock.nextTickTime(r,t)}}syncSignal(e,t){const s=this.now();let r=this.bpm,i=1/(60/r.getValueAtTime(s)/this.PPQ),o=[];if(e.units==="time"){const c=.015625/i,l=new Ne(c),u=new Yi(-1),h=new Ne(c);r.chain(l,u,h),r=h,i=1/i,o=[l,u,h]}t||(e.getValueAtTime(s)!==0?t=e.getValueAtTime(s)/i:t=0);const a=new Ne(t);return r.connect(a),a.connect(e._param),o.push(a),this._syncedSignals.push({initial:e.value,nodes:o,signal:e}),e.value=0,this}unsyncSignal(e){for(let t=this._syncedSignals.length-1;t>=0;t--){const s=this._syncedSignals[t];s.signal===e&&(s.nodes.forEach(r=>r.dispose()),s.signal.value=s.initial,this._syncedSignals.splice(t,1))}return this}dispose(){return super.dispose(),this._clock.dispose(),nh(this,"bpm"),this._timeline.dispose(),this._repeatedEvents.dispose(),this}}Do.mixin(Gi);gc(n=>{n.transport=new Gi({context:n})});_c(n=>{n.transport.dispose()});class gt extends ue{constructor(e){super(e),this.input=void 0,this._state=new rh("stopped"),this._synced=!1,this._scheduled=[],this._syncedStart=Ce,this._syncedStop=Ce,this._state.memory=100,this._state.increasing=!0,this._volume=this.output=new ks({context:this.context,mute:e.mute,volume:e.volume}),this.volume=this._volume.volume,je(this,"volume"),this.onstop=e.onstop}static getDefaults(){return Object.assign(ue.getDefaults(),{mute:!1,onstop:Ce,volume:0})}get state(){return this._synced?this.context.transport.state==="started"?this._state.getValueAtTime(this.context.transport.seconds):"stopped":this._state.getValueAtTime(this.now())}get mute(){return this._volume.mute}set mute(e){this._volume.mute=e}_clampToCurrentTime(e){return this._synced?e:Math.max(e,this.context.currentTime)}start(e,t,s){let r=zt(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(r=this._clampToCurrentTime(r),!this._synced&&this._state.getValueAtTime(r)==="started")me(Vr(r,this._state.get(r).time),"Start time must be strictly greater than previous start time"),this._state.cancel(r),this._state.setStateAtTime("started",r),this.log("restart",r),this.restart(r,t,s);else if(this.log("start",r),this._state.setStateAtTime("started",r),this._synced){const i=this._state.get(r);i&&(i.offset=this.toSeconds(Pr(t,0)),i.duration=s?this.toSeconds(s):void 0);const o=this.context.transport.schedule(a=>{this._start(a,t,s)},r);this._scheduled.push(o),this.context.transport.state==="started"&&this.context.transport.getSecondsAtTime(this.immediate())>r&&this._syncedStart(this.now(),this.context.transport.seconds)}else Lm(this.context),this._start(r,t,s);return this}stop(e){let t=zt(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(t=this._clampToCurrentTime(t),this._state.getValueAtTime(t)==="started"||ve(this._state.getNextState("started",t))){if(this.log("stop",t),!this._synced)this._stop(t);else{const s=this.context.transport.schedule(this._stop.bind(this),t);this._scheduled.push(s)}this._state.cancel(t),this._state.setStateAtTime("stopped",t)}return this}restart(e,t,s){return e=this.toSeconds(e),this._state.getValueAtTime(e)==="started"&&(this._state.cancel(e),this._restart(e,t,s)),this}sync(){return this._synced||(this._synced=!0,this._syncedStart=(e,t)=>{if(Vr(t,0)){const s=this._state.get(t);if(s&&s.state==="started"&&s.time!==t){const r=t-this.toSeconds(s.time);let i;s.duration&&(i=this.toSeconds(s.duration)-r),this._start(e,this.toSeconds(s.offset)+r,i)}}},this._syncedStop=e=>{const t=this.context.transport.getSecondsAtTime(Math.max(e-this.sampleTime,0));this._state.getValueAtTime(t)==="started"&&this._stop(e)},this.context.transport.on("start",this._syncedStart),this.context.transport.on("loopStart",this._syncedStart),this.context.transport.on("stop",this._syncedStop),this.context.transport.on("pause",this._syncedStop),this.context.transport.on("loopEnd",this._syncedStop)),this}unsync(){return this._synced&&(this.context.transport.off("stop",this._syncedStop),this.context.transport.off("pause",this._syncedStop),this.context.transport.off("loopEnd",this._syncedStop),this.context.transport.off("start",this._syncedStart),this.context.transport.off("loopStart",this._syncedStart)),this._synced=!1,this._scheduled.forEach(e=>this.context.transport.clear(e)),this._scheduled=[],this._state.cancel(0),this._stop(0),this}dispose(){return super.dispose(),this.onstop=Ce,this.unsync(),this._volume.dispose(),this._state.dispose(),this}}class Ur extends zr{constructor(){super(K(Ur.getDefaults(),arguments,["url","onload"])),this.name="ToneBufferSource",this._source=this.context.createBufferSource(),this._internalChannels=[this._source],this._sourceStarted=!1,this._sourceStopped=!1;const e=K(Ur.getDefaults(),arguments,["url","onload"]);ws(this._source,this._gainNode),this._source.onended=()=>this._stopSource(),this.playbackRate=new Oe({context:this.context,param:this._source.playbackRate,units:"positive",value:e.playbackRate}),this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this._buffer=new Se(e.url,e.onload,e.onerror),this._internalChannels.push(this._source)}static getDefaults(){return Object.assign(zr.getDefaults(),{url:new Se,loop:!1,loopEnd:0,loopStart:0,onload:Ce,onerror:Ce,playbackRate:1})}get fadeIn(){return this._fadeIn}set fadeIn(e){this._fadeIn=e}get fadeOut(){return this._fadeOut}set fadeOut(e){this._fadeOut=e}get curve(){return this._curve}set curve(e){this._curve=e}start(e,t,s,r=1){me(this.buffer.loaded,"buffer is either not set or not loaded");const i=this.toSeconds(e);this._startGain(i,r),this.loop?t=Pr(t,this.loopStart):t=Pr(t,0);let o=Math.max(this.toSeconds(t),0);if(this.loop){const a=this.toSeconds(this.loopEnd)||this.buffer.duration,c=this.toSeconds(this.loopStart),l=a-c;Bl(o,a)&&(o=(o-c)%l+c),rn(o,this.buffer.duration)&&(o=0)}if(this._source.buffer=this.buffer.get(),this._source.loopEnd=this.toSeconds(this.loopEnd)||this.buffer.duration,Na(o,this.buffer.duration)&&(this._sourceStarted=!0,this._source.start(i,o)),ve(s)){let a=this.toSeconds(s);a=Math.max(a,0),this.stop(i+a)}return this}_stopSource(e){!this._sourceStopped&&this._sourceStarted&&(this._sourceStopped=!0,this._source.stop(this.toSeconds(e)),this._onended())}get loopStart(){return this._source.loopStart}set loopStart(e){this._source.loopStart=this.toSeconds(e)}get loopEnd(){return this._source.loopEnd}set loopEnd(e){this._source.loopEnd=this.toSeconds(e)}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._source.loop}set loop(e){this._source.loop=e,this._sourceStarted&&this.cancelStop()}dispose(){return super.dispose(),this._source.onended=null,this._source.disconnect(),this._buffer.dispose(),this.playbackRate.dispose(),this}}class Xi extends gt{constructor(){super(K(Xi.getDefaults(),arguments,["type"])),this.name="Noise",this._source=null;const e=K(Xi.getDefaults(),arguments,["type"]);this._playbackRate=e.playbackRate,this.type=e.type,this._fadeIn=e.fadeIn,this._fadeOut=e.fadeOut}static getDefaults(){return Object.assign(gt.getDefaults(),{fadeIn:0,fadeOut:0,playbackRate:1,type:"white"})}get type(){return this._type}set type(e){if(me(e in Sf,"Noise: invalid type: "+e),this._type!==e&&(this._type=e,this.state==="started")){const t=this.now();this._stop(t),this._start(t)}}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e,this._source&&(this._source.playbackRate.value=e)}_start(e){const t=Sf[this._type];this._source=new Ur({url:t,context:this.context,fadeIn:this._fadeIn,fadeOut:this._fadeOut,loop:!0,onended:()=>this.onstop(this),playbackRate:this._playbackRate}).connect(this.output),this._source.start(this.toSeconds(e),Math.random()*(t.duration-.001))}_stop(e){this._source&&(this._source.stop(this.toSeconds(e)),this._source=null)}get fadeIn(){return this._fadeIn}set fadeIn(e){this._fadeIn=e,this._source&&(this._source.fadeIn=this._fadeIn)}get fadeOut(){return this._fadeOut}set fadeOut(e){this._fadeOut=e,this._source&&(this._source.fadeOut=this._fadeOut)}_restart(e){this._stop(e),this._start(e)}dispose(){return super.dispose(),this._source&&this._source.disconnect(),this}}const _r=44100*5,Jc=2,$n={brown:null,pink:null,white:null},Sf={get brown(){if(!$n.brown){const n=[];for(let e=0;ethis.onstop(this)});this._oscillator=s,this._wave?this._oscillator.setPeriodicWave(this._wave):this._oscillator.type=this._type,this._oscillator.connect(this.output),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.start(t)}_stop(e){const t=this.toSeconds(e);this._oscillator&&this._oscillator.stop(t)}_restart(e){const t=this.toSeconds(e);return this.log("restart",t),this._oscillator&&this._oscillator.cancelStop(),this._state.cancel(t),this}syncFrequency(){return this.context.transport.syncSignal(this.frequency),this}unsyncFrequency(){return this.context.transport.unsyncSignal(this.frequency),this}_getCachedPeriodicWave(){if(this._type==="custom")return nt._periodicWaveCache.find(t=>t.phase===this._phase&&NA(t.partials,this._partials));{const e=nt._periodicWaveCache.find(t=>t.type===this._type&&t.phase===this._phase);return this._partialCount=e?e.partialCount:this._partialCount,e}}get type(){return this._type}set type(e){this._type=e;const t=["sine","square","sawtooth","triangle"].indexOf(e)!==-1;if(this._phase===0&&t)this._wave=void 0,this._partialCount=0,this._oscillator!==null&&(this._oscillator.type=e);else{const s=this._getCachedPeriodicWave();if(ve(s)){const{partials:r,wave:i}=s;this._wave=i,this._partials=r,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave)}else{const[r,i]=this._getRealImaginary(e,this._phase),o=this.context.createPeriodicWave(r,i);this._wave=o,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave),nt._periodicWaveCache.push({imag:i,partialCount:this._partialCount,partials:this._partials,phase:this._phase,real:r,type:this._type,wave:this._wave}),nt._periodicWaveCache.length>100&&nt._periodicWaveCache.shift()}}}get baseType(){return this._type.replace(this.partialCount.toString(),"")}set baseType(e){this.partialCount&&this._type!=="custom"&&e!=="custom"?this.type=e+this.partialCount:this.type=e}get partialCount(){return this._partialCount}set partialCount(e){dn(e,0);let t=this._type;const s=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(this._type);if(s&&(t=s[1]),this._type!=="custom")e===0?this.type=t:this.type=t+e.toString();else{const r=new Float32Array(e);this._partials.forEach((i,o)=>r[o]=i),this._partials=Array.from(r),this.type=this._type}}_getRealImaginary(e,t){let r=2048;const i=new Float32Array(r),o=new Float32Array(r);let a=1;if(e==="custom"){if(a=this._partials.length+1,this._partialCount=this._partials.length,r=a,this._partials.length===0)return[i,o]}else{const c=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(e);c?(a=parseInt(c[2],10)+1,this._partialCount=parseInt(c[2],10),e=c[1],a=Math.max(a,2),r=a):this._partialCount=0,this._partials=[]}for(let c=1;c>1&1?-1:1):u=0,this._partials[c-1]=u;break;case"custom":u=this._partials[c-1];break;default:throw new TypeError("Oscillator: invalid type: "+e)}u!==0?(i[c]=-u*Math.sin(t*c),o[c]=u*Math.cos(t*c)):(i[c]=0,o[c]=0)}return[i,o]}_inverseFFT(e,t,s){let r=0;const i=e.length;for(let o=0;o(e+1)/2}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Es extends Fe{constructor(){super(Object.assign(K(Es.getDefaults(),arguments,["value"]))),this.name="Multiply",this.override=!1;const e=K(Es.getDefaults(),arguments,["value"]);this._mult=this.input=this.output=new Ne({context:this.context,minValue:e.minValue,maxValue:e.maxValue}),this.factor=this._param=this._mult.gain,this.factor.setValueAtTime(e.value,0)}static getDefaults(){return Object.assign(Fe.getDefaults(),{value:0})}dispose(){return super.dispose(),this._mult.dispose(),this}}class Zi extends gt{constructor(){super(K(Zi.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="AMOscillator",this._modulationScale=new nP({context:this.context}),this._modulationNode=new Ne({context:this.context});const e=K(Zi.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new nt({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase,type:e.type}),this.frequency=this._carrier.frequency,this.detune=this._carrier.detune,this._modulator=new nt({context:this.context,phase:e.phase,type:e.modulationType}),this.harmonicity=new Es({context:this.context,units:"positive",value:e.harmonicity}),this.frequency.chain(this.harmonicity,this._modulator.frequency),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),je(this,["frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(nt.getDefaults(),{harmonicity:1,modulationType:"square"})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){this._modulator.restart(e),this._carrier.restart(e)}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return ar(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this._modulationScale.dispose(),this}}class Ki extends gt{constructor(){super(K(Ki.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="FMOscillator",this._modulationNode=new Ne({context:this.context,gain:0});const e=K(Ki.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new nt({context:this.context,detune:e.detune,frequency:0,onstop:()=>this.onstop(this),phase:e.phase,type:e.type}),this.detune=this._carrier.detune,this.frequency=new Fe({context:this.context,units:"frequency",value:e.frequency}),this._modulator=new nt({context:this.context,phase:e.phase,type:e.modulationType}),this.harmonicity=new Es({context:this.context,units:"positive",value:e.harmonicity}),this.modulationIndex=new Es({context:this.context,units:"positive",value:e.modulationIndex}),this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.frequency.chain(this.modulationIndex,this._modulationNode),this._modulator.connect(this._modulationNode.gain),this._modulationNode.connect(this._carrier.frequency),this._carrier.connect(this.output),this.detune.connect(this._modulator.detune),je(this,["modulationIndex","frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(nt.getDefaults(),{harmonicity:1,modulationIndex:2,modulationType:"square"})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){return this._modulator.restart(e),this._carrier.restart(e),this}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return ar(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this.modulationIndex.dispose(),this}}class Br extends gt{constructor(){super(K(Br.getDefaults(),arguments,["frequency","width"])),this.name="PulseOscillator",this._widthGate=new Ne({context:this.context,gain:0}),this._thresh=new Js({context:this.context,mapping:t=>t<=0?-1:1});const e=K(Br.getDefaults(),arguments,["frequency","width"]);this.width=new Fe({context:this.context,units:"audioRange",value:e.width}),this._triangle=new nt({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase,type:"triangle"}),this.frequency=this._triangle.frequency,this.detune=this._triangle.detune,this._triangle.chain(this._thresh,this.output),this.width.chain(this._widthGate,this._thresh),je(this,["width","frequency","detune"])}static getDefaults(){return Object.assign(gt.getDefaults(),{detune:0,frequency:440,phase:0,type:"pulse",width:.2})}_start(e){e=this.toSeconds(e),this._triangle.start(e),this._widthGate.gain.setValueAtTime(1,e)}_stop(e){e=this.toSeconds(e),this._triangle.stop(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(0,e)}_restart(e){this._triangle.restart(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(1,e)}get phase(){return this._triangle.phase}set phase(e){this._triangle.phase=e}get type(){return"pulse"}get baseType(){return"pulse"}get partials(){return[]}get partialCount(){return 0}set carrierType(e){this._triangle.type=e}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return ar(this,e)})}dispose(){return super.dispose(),this._triangle.dispose(),this.width.dispose(),this._widthGate.dispose(),this._thresh.dispose(),this}}class Qi extends gt{constructor(){super(K(Qi.getDefaults(),arguments,["frequency","type","spread"])),this.name="FatOscillator",this._oscillators=[];const e=K(Qi.getDefaults(),arguments,["frequency","type","spread"]);this.frequency=new Fe({context:this.context,units:"frequency",value:e.frequency}),this.detune=new Fe({context:this.context,units:"cents",value:e.detune}),this._spread=e.spread,this._type=e.type,this._phase=e.phase,this._partials=e.partials,this._partialCount=e.partialCount,this.count=e.count,je(this,["frequency","detune"])}static getDefaults(){return Object.assign(nt.getDefaults(),{count:3,spread:20,type:"sawtooth"})}_start(e){e=this.toSeconds(e),this._forEach(t=>t.start(e))}_stop(e){e=this.toSeconds(e),this._forEach(t=>t.stop(e))}_restart(e){this._forEach(t=>t.restart(e))}_forEach(e){for(let t=0;tt.type=e)}get spread(){return this._spread}set spread(e){if(this._spread=e,this._oscillators.length>1){const t=-e/2,s=e/(this._oscillators.length-1);this._forEach((r,i)=>r.detune.value=t+s*i)}}get count(){return this._oscillators.length}set count(e){if(dn(e,1),this._oscillators.length!==e){this._forEach(t=>t.dispose()),this._oscillators=[];for(let t=0;tthis.onstop(this):Ce});this.type==="custom"&&(s.partials=this._partials),this.frequency.connect(s.frequency),this.detune.connect(s.detune),s.detune.overridden=!1,s.connect(this.output),this._oscillators[t]=s}this.spread=this._spread,this.state==="started"&&this._forEach(t=>t.start())}}get phase(){return this._phase}set phase(e){this._phase=e,this._forEach((t,s)=>t.phase=this._phase+s/this.count*360)}get baseType(){return this._oscillators[0].baseType}set baseType(e){this._forEach(t=>t.baseType=e),this._type=this._oscillators[0].type}get partials(){return this._oscillators[0].partials}set partials(e){this._partials=e,this._partialCount=this._partials.length,e.length&&(this._type="custom",this._forEach(t=>t.partials=e))}get partialCount(){return this._oscillators[0].partialCount}set partialCount(e){this._partialCount=e,this._forEach(t=>t.partialCount=e),this._type=this._oscillators[0].type}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return ar(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this._forEach(e=>e.dispose()),this}}class Ji extends gt{constructor(){super(K(Ji.getDefaults(),arguments,["frequency","modulationFrequency"])),this.name="PWMOscillator",this.sourceType="pwm",this._scale=new Es({context:this.context,value:2});const e=K(Ji.getDefaults(),arguments,["frequency","modulationFrequency"]);this._pulse=new Br({context:this.context,frequency:e.modulationFrequency}),this._pulse.carrierType="sine",this.modulationFrequency=this._pulse.frequency,this._modulator=new nt({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase}),this.frequency=this._modulator.frequency,this.detune=this._modulator.detune,this._modulator.chain(this._scale,this._pulse.width),this._pulse.connect(this.output),je(this,["modulationFrequency","frequency","detune"])}static getDefaults(){return Object.assign(gt.getDefaults(),{detune:0,frequency:440,modulationFrequency:.4,phase:0,type:"pwm"})}_start(e){e=this.toSeconds(e),this._modulator.start(e),this._pulse.start(e)}_stop(e){e=this.toSeconds(e),this._modulator.stop(e),this._pulse.stop(e)}_restart(e){this._modulator.restart(e),this._pulse.restart(e)}get type(){return"pwm"}get baseType(){return"pwm"}get partials(){return[]}get partialCount(){return 0}get phase(){return this._modulator.phase}set phase(e){this._modulator.phase=e}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return ar(this,e)})}dispose(){return super.dispose(),this._pulse.dispose(),this._scale.dispose(),this._modulator.dispose(),this}}const Of={am:Zi,fat:Qi,fm:Ki,oscillator:nt,pulse:Br,pwm:Ji};class er extends gt{constructor(){super(K(er.getDefaults(),arguments,["frequency","type"])),this.name="OmniOscillator";const e=K(er.getDefaults(),arguments,["frequency","type"]);this.frequency=new Fe({context:this.context,units:"frequency",value:e.frequency}),this.detune=new Fe({context:this.context,units:"cents",value:e.detune}),je(this,["frequency","detune"]),this.set(e)}static getDefaults(){return Object.assign(nt.getDefaults(),Ki.getDefaults(),Zi.getDefaults(),Qi.getDefaults(),Br.getDefaults(),Ji.getDefaults())}_start(e){this._oscillator.start(e)}_stop(e){this._oscillator.stop(e)}_restart(e){return this._oscillator.restart(e),this}get type(){let e="";return["am","fm","fat"].some(t=>this._sourceType===t)&&(e=this._sourceType),e+this._oscillator.type}set type(e){e.substr(0,2)==="fm"?(this._createNewOscillator("fm"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):e.substr(0,2)==="am"?(this._createNewOscillator("am"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):e.substr(0,3)==="fat"?(this._createNewOscillator("fat"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(3)):e==="pwm"?(this._createNewOscillator("pwm"),this._oscillator=this._oscillator):e==="pulse"?this._createNewOscillator("pulse"):(this._createNewOscillator("oscillator"),this._oscillator=this._oscillator,this._oscillator.type=e)}get partials(){return this._oscillator.partials}set partials(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partials=e)}get partialCount(){return this._oscillator.partialCount}set partialCount(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partialCount=e)}set(e){return Reflect.has(e,"type")&&e.type&&(this.type=e.type),super.set(e),this}_createNewOscillator(e){if(e!==this._sourceType){this._sourceType=e;const t=Of[e],s=this.now();if(this._oscillator){const r=this._oscillator;r.stop(s),this.context.setTimeout(()=>r.dispose(),this.blockTime)}this._oscillator=new t({context:this.context}),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.connect(this.output),this._oscillator.onstop=()=>this.onstop(this),this.state==="started"&&this._oscillator.start(s)}}get phase(){return this._oscillator.phase}set phase(e){this._oscillator.phase=e}get sourceType(){return this._sourceType}set sourceType(e){let t="sine";this._oscillator.type!=="pwm"&&this._oscillator.type!=="pulse"&&(t=this._oscillator.type),e==="fm"?this.type="fm"+t:e==="am"?this.type="am"+t:e==="fat"?this.type="fat"+t:e==="oscillator"?this.type=t:e==="pulse"?this.type="pulse":e==="pwm"&&(this.type="pwm")}_getOscType(e,t){return e instanceof Of[t]}get baseType(){return this._oscillator.baseType}set baseType(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&e!=="pulse"&&e!=="pwm"&&(this._oscillator.baseType=e)}get width(){if(this._getOscType(this._oscillator,"pulse"))return this._oscillator.width}get count(){if(this._getOscType(this._oscillator,"fat"))return this._oscillator.count}set count(e){this._getOscType(this._oscillator,"fat")&&xs(e)&&(this._oscillator.count=e)}get spread(){if(this._getOscType(this._oscillator,"fat"))return this._oscillator.spread}set spread(e){this._getOscType(this._oscillator,"fat")&&xs(e)&&(this._oscillator.spread=e)}get modulationType(){if(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))return this._oscillator.modulationType}set modulationType(e){(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))&&Yn(e)&&(this._oscillator.modulationType=e)}get modulationIndex(){if(this._getOscType(this._oscillator,"fm"))return this._oscillator.modulationIndex}get harmonicity(){if(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))return this._oscillator.harmonicity}get modulationFrequency(){if(this._getOscType(this._oscillator,"pwm"))return this._oscillator.modulationFrequency}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return ar(this,e)})}dispose(){return super.dispose(),this.detune.dispose(),this.frequency.dispose(),this._oscillator.dispose(),this}}class ch extends Fe{constructor(){super(Object.assign(K(ch.getDefaults(),arguments,["value"]))),this.override=!1,this.name="Add",this._sum=new Ne({context:this.context}),this.input=this._sum,this.output=this._sum,this.addend=this._param,qi(this._constantSource,this._sum)}static getDefaults(){return Object.assign(Fe.getDefaults(),{value:0})}dispose(){return super.dispose(),this._sum.dispose(),this}}class za extends Gn{constructor(){super(Object.assign(K(za.getDefaults(),arguments,["min","max"]))),this.name="Scale";const e=K(za.getDefaults(),arguments,["min","max"]);this._mult=this.input=new Es({context:this.context,value:e.max-e.min}),this._add=this.output=new ch({context:this.context,value:e.min}),this._min=e.min,this._max=e.max,this.input.connect(this.output)}static getDefaults(){return Object.assign(Gn.getDefaults(),{max:1,min:0})}get min(){return this._min}set min(e){this._min=e,this._setRange()}get max(){return this._max}set max(e){this._max=e,this._setRange()}_setRange(){this._add.value=this._min,this._mult.value=this._max-this._min}dispose(){return super.dispose(),this._add.dispose(),this._mult.dispose(),this}}function Xm(n,e=1/0){const t=new WeakMap;return function(s,r){Reflect.defineProperty(s,r,{configurable:!0,enumerable:!0,get:function(){return t.get(this)},set:function(i){dn(i,n,e),t.set(this,i)}})}}function rs(n,e=1/0){const t=new WeakMap;return function(s,r){Reflect.defineProperty(s,r,{configurable:!0,enumerable:!0,get:function(){return t.get(this)},set:function(i){dn(this.toSeconds(i),n,e),t.set(this,i)}})}}class eo extends gt{constructor(){super(K(eo.getDefaults(),arguments,["url","onload"])),this.name="Player",this._activeSources=new Set;const e=K(eo.getDefaults(),arguments,["url","onload"]);this._buffer=new Se({onload:this._onload.bind(this,e.onload),onerror:e.onerror,reverse:e.reverse,url:e.url}),this.autostart=e.autostart,this._loop=e.loop,this._loopStart=e.loopStart,this._loopEnd=e.loopEnd,this._playbackRate=e.playbackRate,this.fadeIn=e.fadeIn,this.fadeOut=e.fadeOut}static getDefaults(){return Object.assign(gt.getDefaults(),{autostart:!1,fadeIn:0,fadeOut:0,loop:!1,loopEnd:0,loopStart:0,onload:Ce,onerror:Ce,playbackRate:1,reverse:!1})}load(e){return Ie(this,void 0,void 0,function*(){return yield this._buffer.load(e),this._onload(),this})}_onload(e=Ce){e(),this.autostart&&this.start()}_onSourceEnd(e){this.onstop(this),this._activeSources.delete(e),this._activeSources.size===0&&!this._synced&&this._state.getValueAtTime(this.now())==="started"&&(this._state.cancel(this.now()),this._state.setStateAtTime("stopped",this.now()))}start(e,t,s){return super.start(e,t,s),this}_start(e,t,s){this._loop?t=Pr(t,this._loopStart):t=Pr(t,0);const r=this.toSeconds(t),i=s;s=Pr(s,Math.max(this._buffer.duration-r,0));let o=this.toSeconds(s);o=o/this._playbackRate,e=this.toSeconds(e);const a=new Ur({url:this._buffer,context:this.context,fadeIn:this.fadeIn,fadeOut:this.fadeOut,loop:this._loop,loopEnd:this._loopEnd,loopStart:this._loopStart,onended:this._onSourceEnd.bind(this),playbackRate:this._playbackRate}).connect(this.output);!this._loop&&!this._synced&&(this._state.cancel(e+o),this._state.setStateAtTime("stopped",e+o,{implicitEnd:!0})),this._activeSources.add(a),this._loop&&zt(i)?a.start(e,r):a.start(e,r,o-this.toSeconds(this.fadeOut))}_stop(e){const t=this.toSeconds(e);this._activeSources.forEach(s=>s.stop(t))}restart(e,t,s){return super.restart(e,t,s),this}_restart(e,t,s){var r;(r=[...this._activeSources].pop())===null||r===void 0||r.stop(e),this._start(e,t,s)}seek(e,t){const s=this.toSeconds(t);if(this._state.getValueAtTime(s)==="started"){const r=this.toSeconds(e);this._stop(s),this._start(s,r)}return this}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get loopStart(){return this._loopStart}set loopStart(e){this._loopStart=e,this.buffer.loaded&&dn(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach(t=>{t.loopStart=e})}get loopEnd(){return this._loopEnd}set loopEnd(e){this._loopEnd=e,this.buffer.loaded&&dn(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach(t=>{t.loopEnd=e})}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._loop}set loop(e){if(this._loop!==e&&(this._loop=e,this._activeSources.forEach(t=>{t.loop=e}),e)){const t=this._state.getNextState("stopped",this.now());t&&this._state.cancel(t.time)}}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e;const t=this.now(),s=this._state.getNextState("stopped",t);s&&s.implicitEnd&&(this._state.cancel(s.time),this._activeSources.forEach(r=>r.cancelStop())),this._activeSources.forEach(r=>{r.playbackRate.setValueAtTime(e,t)})}get reverse(){return this._buffer.reverse}set reverse(e){this._buffer.reverse=e}get loaded(){return this._buffer.loaded}dispose(){return super.dispose(),this._activeSources.forEach(e=>e.dispose()),this._activeSources.clear(),this._buffer.dispose(),this}}pn([rs(0)],eo.prototype,"fadeIn",void 0);pn([rs(0)],eo.prototype,"fadeOut",void 0);class sP extends Gn{constructor(){super(...arguments),this.name="GainToAudio",this._norm=new Js({context:this.context,mapping:e=>Math.abs(e)*2-1}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Jt extends ue{constructor(){super(K(Jt.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="Envelope",this._sig=new Fe({context:this.context,value:0}),this.output=this._sig,this.input=void 0;const e=K(Jt.getDefaults(),arguments,["attack","decay","sustain","release"]);this.attack=e.attack,this.decay=e.decay,this.sustain=e.sustain,this.release=e.release,this.attackCurve=e.attackCurve,this.releaseCurve=e.releaseCurve,this.decayCurve=e.decayCurve}static getDefaults(){return Object.assign(ue.getDefaults(),{attack:.01,attackCurve:"linear",decay:.1,decayCurve:"exponential",release:1,releaseCurve:"exponential",sustain:.5})}get value(){return this.getValueAtTime(this.now())}_getCurve(e,t){if(Yn(e))return e;{let s;for(s in ea)if(ea[s][t]===e)return s;return e}}_setCurve(e,t,s){if(Yn(s)&&Reflect.has(ea,s)){const r=ea[s];Bs(r)?e!=="_decayCurve"&&(this[e]=r[t]):this[e]=r}else if(ln(s)&&e!=="_decayCurve")this[e]=s;else throw new Error("Envelope: invalid curve: "+s)}get attackCurve(){return this._getCurve(this._attackCurve,"In")}set attackCurve(e){this._setCurve("_attackCurve","In",e)}get releaseCurve(){return this._getCurve(this._releaseCurve,"Out")}set releaseCurve(e){this._setCurve("_releaseCurve","Out",e)}get decayCurve(){return this._getCurve(this._decayCurve,"Out")}set decayCurve(e){this._setCurve("_decayCurve","Out",e)}triggerAttack(e,t=1){this.log("triggerAttack",e,t),e=this.toSeconds(e);let r=this.toSeconds(this.attack);const i=this.toSeconds(this.decay),o=this.getValueAtTime(e);if(o>0){const a=1/r;r=(1-o)/a}if(r0){const s=this.toSeconds(this.release);s{let e,t;const s=[];for(e=0;e<128;e++)s[e]=Math.sin(e/(128-1)*(Math.PI/2));const r=[],i=6.4;for(e=0;e<128-1;e++){t=e/(128-1);const d=Math.sin(t*(Math.PI*2)*i-Math.PI/2)+1;r[e]=d/10+t*.83}r[128-1]=1;const o=[],a=5;for(e=0;e<128;e++)o[e]=Math.ceil(e/(128-1)*a)/a;const c=[];for(e=0;e<128;e++)t=e/(128-1),c[e]=.5*(1-Math.cos(Math.PI*t));const l=[];for(e=0;e<128;e++){t=e/(128-1);const d=Math.pow(t,3)*4+.2,f=Math.cos(d*Math.PI*2*t);l[e]=Math.abs(f*(1-t))}function u(d){const f=new Array(d.length);for(let m=0;mthis._original_triggerRelease(t);const e=K(tr.getDefaults(),arguments);this._volume=this.output=new ks({context:this.context,volume:e.volume}),this.volume=this._volume.volume,je(this,"volume")}static getDefaults(){return Object.assign(ue.getDefaults(),{volume:0})}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",0),this.context.transport.on("stop",this._syncedRelease),this.context.transport.on("pause",this._syncedRelease),this.context.transport.on("loopEnd",this._syncedRelease)),this}_syncState(){let e=!1;return this._synced||(this._synced=!0,e=!0),e}_syncMethod(e,t){const s=this["_original_"+e]=this[e];this[e]=(...r)=>{const i=r[t],o=this.context.transport.schedule(a=>{r[t]=a,s.apply(this,r)},i);this._scheduledEvents.push(o)}}unsync(){return this._scheduledEvents.forEach(e=>this.context.transport.clear(e)),this._scheduledEvents=[],this._synced&&(this._synced=!1,this.triggerAttack=this._original_triggerAttack,this.triggerRelease=this._original_triggerRelease,this.context.transport.off("stop",this._syncedRelease),this.context.transport.off("pause",this._syncedRelease),this.context.transport.off("loopEnd",this._syncedRelease)),this}triggerAttackRelease(e,t,s,r){const i=this.toSeconds(s),o=this.toSeconds(t);return this.triggerAttack(e,i,r),this.triggerRelease(i+o),this}dispose(){return super.dispose(),this._volume.dispose(),this.unsync(),this._scheduledEvents=[],this}}class Xn extends tr{constructor(){super(K(Xn.getDefaults(),arguments));const e=K(Xn.getDefaults(),arguments);this.portamento=e.portamento,this.onsilence=e.onsilence}static getDefaults(){return Object.assign(tr.getDefaults(),{detune:0,onsilence:Ce,portamento:0})}triggerAttack(e,t,s=1){this.log("triggerAttack",e,t,s);const r=this.toSeconds(t);return this._triggerEnvelopeAttack(r,s),this.setNote(e,r),this}triggerRelease(e){this.log("triggerRelease",e);const t=this.toSeconds(e);return this._triggerEnvelopeRelease(t),this}setNote(e,t){const s=this.toSeconds(t),r=e instanceof Xt?e.toFrequency():e;if(this.portamento>0&&this.getLevelAtTime(s)>.05){const i=this.toSeconds(this.portamento);this.frequency.exponentialRampTo(r,i,s)}else this.frequency.setValueAtTime(r,s);return this}}pn([rs(0)],Xn.prototype,"portamento",void 0);class bc extends Jt{constructor(){super(K(bc.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="AmplitudeEnvelope",this._gainNode=new Ne({context:this.context,gain:0}),this.output=this._gainNode,this.input=this._gainNode,this._sig.connect(this._gainNode.gain),this.output=this._gainNode,this.input=this._gainNode}dispose(){return super.dispose(),this._gainNode.dispose(),this}}class to extends Xn{constructor(){super(K(to.getDefaults(),arguments)),this.name="Synth";const e=K(to.getDefaults(),arguments);this.oscillator=new er(Object.assign({context:this.context,detune:e.detune,onstop:()=>this.onsilence(this)},e.oscillator)),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.envelope=new bc(Object.assign({context:this.context},e.envelope)),this.oscillator.chain(this.envelope,this.output),je(this,["oscillator","frequency","detune","envelope"])}static getDefaults(){return Object.assign(Xn.getDefaults(),{envelope:Object.assign(kr(Jt.getDefaults(),Object.keys(ue.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.3}),oscillator:Object.assign(kr(er.getDefaults(),[...Object.keys(gt.getDefaults()),"frequency","detune"]),{type:"triangle"})})}_triggerEnvelopeAttack(e,t){if(this.envelope.triggerAttack(e,t),this.oscillator.start(e),this.envelope.sustain===0){const s=this.toSeconds(this.envelope.attack),r=this.toSeconds(this.envelope.decay);this.oscillator.stop(e+s+r)}}_triggerEnvelopeRelease(e){this.envelope.triggerRelease(e),this.oscillator.stop(e+this.toSeconds(this.envelope.release))}getLevelAtTime(e){return e=this.toSeconds(e),this.envelope.getValueAtTime(e)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this}}class no extends ue{constructor(){super(K(no.getDefaults(),arguments,["frequency","type"])),this.name="BiquadFilter";const e=K(no.getDefaults(),arguments,["frequency","type"]);this._filter=this.context.createBiquadFilter(),this.input=this.output=this._filter,this.Q=new Oe({context:this.context,units:"number",value:e.Q,param:this._filter.Q}),this.frequency=new Oe({context:this.context,units:"frequency",value:e.frequency,param:this._filter.frequency}),this.detune=new Oe({context:this.context,units:"cents",value:e.detune,param:this._filter.detune}),this.gain=new Oe({context:this.context,units:"decibels",convert:!1,value:e.gain,param:this._filter.gain}),this.type=e.type}static getDefaults(){return Object.assign(ue.getDefaults(),{Q:1,type:"lowpass",frequency:350,detune:0,gain:0})}get type(){return this._filter.type}set type(e){me(["lowpass","highpass","bandpass","lowshelf","highshelf","notch","allpass","peaking"].indexOf(e)!==-1,`Invalid filter type: ${e}`),this._filter.type=e}getFrequencyResponse(e=128){const t=new Float32Array(e);for(let o=0;os.type=e)}get rolloff(){return this._rolloff}set rolloff(e){const t=xs(e)?e:parseInt(e,10),s=[-12,-24,-48,-96];let r=s.indexOf(t);me(r!==-1,`rolloff can only be ${s.join(", ")}`),r+=1,this._rolloff=t,this.input.disconnect(),this._filters.forEach(i=>i.disconnect()),this._filters=new Array(r);for(let i=0;i1);return this._filters.forEach(()=>{t.getFrequencyResponse(e).forEach((i,o)=>s[o]*=i)}),t.dispose(),s}dispose(){return super.dispose(),this._filters.forEach(e=>{e.dispose()}),nh(this,["detune","frequency","gain","Q"]),this.frequency.dispose(),this.Q.dispose(),this.detune.dispose(),this.gain.dispose(),this}}class so extends Jt{constructor(){super(K(so.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="FrequencyEnvelope";const e=K(so.getDefaults(),arguments,["attack","decay","sustain","release"]);this._octaves=e.octaves,this._baseFrequency=this.toFrequency(e.baseFrequency),this._exponent=this.input=new Yi({context:this.context,value:e.exponent}),this._scale=this.output=new za({context:this.context,min:this._baseFrequency,max:this._baseFrequency*Math.pow(2,this._octaves)}),this._sig.chain(this._exponent,this._scale)}static getDefaults(){return Object.assign(Jt.getDefaults(),{baseFrequency:200,exponent:1,octaves:4})}get baseFrequency(){return this._baseFrequency}set baseFrequency(e){const t=this.toFrequency(e);dn(t,0),this._baseFrequency=t,this._scale.min=this._baseFrequency,this.octaves=this._octaves}get octaves(){return this._octaves}set octaves(e){this._octaves=e,this._scale.max=this._baseFrequency*Math.pow(2,e)}get exponent(){return this._exponent.value}set exponent(e){this._exponent.value=e}dispose(){return super.dispose(),this._exponent.dispose(),this._scale.dispose(),this}}class ro extends Xn{constructor(){super(K(ro.getDefaults(),arguments)),this.name="MonoSynth";const e=K(ro.getDefaults(),arguments);this.oscillator=new er(Object.assign(e.oscillator,{context:this.context,detune:e.detune,onstop:()=>this.onsilence(this)})),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.filter=new Wr(Object.assign(e.filter,{context:this.context})),this.filterEnvelope=new so(Object.assign(e.filterEnvelope,{context:this.context})),this.envelope=new bc(Object.assign(e.envelope,{context:this.context})),this.oscillator.chain(this.filter,this.envelope,this.output),this.filterEnvelope.connect(this.filter.frequency),je(this,["oscillator","frequency","detune","filter","filterEnvelope","envelope"])}static getDefaults(){return Object.assign(Xn.getDefaults(),{envelope:Object.assign(kr(Jt.getDefaults(),Object.keys(ue.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.9}),filter:Object.assign(kr(Wr.getDefaults(),Object.keys(ue.getDefaults())),{Q:1,rolloff:-12,type:"lowpass"}),filterEnvelope:Object.assign(kr(so.getDefaults(),Object.keys(ue.getDefaults())),{attack:.6,baseFrequency:200,decay:.2,exponent:2,octaves:3,release:2,sustain:.5}),oscillator:Object.assign(kr(er.getDefaults(),Object.keys(gt.getDefaults())),{type:"sawtooth"})})}_triggerEnvelopeAttack(e,t=1){if(this.envelope.triggerAttack(e,t),this.filterEnvelope.triggerAttack(e),this.oscillator.start(e),this.envelope.sustain===0){const s=this.toSeconds(this.envelope.attack),r=this.toSeconds(this.envelope.decay);this.oscillator.stop(e+s+r)}}_triggerEnvelopeRelease(e){this.envelope.triggerRelease(e),this.filterEnvelope.triggerRelease(e),this.oscillator.stop(e+this.toSeconds(this.envelope.release))}getLevelAtTime(e){return e=this.toSeconds(e),this.envelope.getValueAtTime(e)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this.filterEnvelope.dispose(),this.filter.dispose(),this}}class io extends to{constructor(){super(K(io.getDefaults(),arguments)),this.name="MembraneSynth",this.portamento=0;const e=K(io.getDefaults(),arguments);this.pitchDecay=e.pitchDecay,this.octaves=e.octaves,je(this,["oscillator","envelope"])}static getDefaults(){return Ar(Xn.getDefaults(),to.getDefaults(),{envelope:{attack:.001,attackCurve:"exponential",decay:.4,release:1.4,sustain:.01},octaves:10,oscillator:{type:"sine"},pitchDecay:.05})}setNote(e,t){const s=this.toSeconds(t),r=this.toFrequency(e instanceof Xt?e.toFrequency():e),i=r*this.octaves;return this.oscillator.frequency.setValueAtTime(i,s),this.oscillator.frequency.exponentialRampToValueAtTime(r,s+this.toSeconds(this.pitchDecay)),this}dispose(){return super.dispose(),this}}pn([Xm(0)],io.prototype,"octaves",void 0);pn([rs(0)],io.prototype,"pitchDecay",void 0);const Zm=new Set;function lh(n){Zm.add(n)}function Km(n,e){const t=`registerProcessor("${n}", ${e})`;Zm.add(t)}const rP=` + */class ss{constructor(){this.debug=!1,this._wasDisposed=!1}static getDefaults(){return{}}log(...e){(this.debug||Ws&&this.toString()===Ws.TONE_DEBUG_CLASS)&&OA(this,...e)}dispose(){return this._wasDisposed=!0,this}get disposed(){return this._wasDisposed}toString(){return this.name}}ss.version=H0;const Ju=1e-6;function Vr(n,e){return n>e+Ju}function Bl(n,e){return Vr(n,e)||rn(n,e)}function $a(n,e){return n+Juthis.memory){const t=this.length-this.memory;this._timeline.splice(0,t)}return this}remove(e){const t=this._timeline.indexOf(e);return t!==-1&&this._timeline.splice(t,1),this}get(e,t="time"){const s=this._search(e,t);return s!==-1?this._timeline[s]:null}peek(){return this._timeline[0]}shift(){return this._timeline.shift()}getAfter(e,t="time"){const s=this._search(e,t);return s+10&&this._timeline[t-1].time=0?this._timeline[s-1]:null}cancel(e){if(this._timeline.length>1){let t=this._search(e);if(t>=0)if(rn(this._timeline[t].time,e)){for(let s=t;s>=0&&rn(this._timeline[s].time,e);s--)t=s;this._timeline=this._timeline.slice(0,t)}else this._timeline=this._timeline.slice(0,t+1);else this._timeline=[]}else this._timeline.length===1&&Bl(this._timeline[0].time,e)&&(this._timeline=[]);return this}cancelBefore(e){const t=this._search(e);return t>=0&&(this._timeline=this._timeline.slice(t+1)),this}previousEvent(e){const t=this._timeline.indexOf(e);return t>0?this._timeline[t-1]:null}_search(e,t="time"){if(this._timeline.length===0)return-1;let s=0;const r=this._timeline.length;let i=r;if(r>0&&this._timeline[r-1][t]<=e)return r-1;for(;s=0&&this._timeline[s].time>=e;)s--;return this._iterate(t,s+1),this}forEachAtTime(e,t){const s=this._search(e);if(s!==-1&&rn(this._timeline[s].time,e)){let r=s;for(let i=s;i>=0&&rn(this._timeline[i].time,e);i--)r=i;this._iterate(i=>{t(i)},r,s)}return this}dispose(){return super.dispose(),this._timeline=[],this}};const Bm=[];function _c(n){Bm.push(n)}function jA(n){Bm.forEach(e=>e(n))}const Wm=[];function yc(n){Wm.push(n)}function VA(n){Wm.forEach(e=>e(n))}class Do extends ss{constructor(){super(...arguments),this.name="Emitter"}on(e,t){return e.split(/\W+/).forEach(r=>{Ut(this._events)&&(this._events={}),this._events.hasOwnProperty(r)||(this._events[r]=[]),this._events[r].push(t)}),this}once(e,t){const s=(...r)=>{t(...r),this.off(e,s)};return this.on(e,s),this}off(e,t){return e.split(/\W+/).forEach(r=>{if(Ut(this._events)&&(this._events={}),this._events.hasOwnProperty(r))if(Ut(t))this._events[r]=[];else{const i=this._events[r];for(let o=i.length-1;o>=0;o--)i[o]===t&&i.splice(o,1)}}),this}emit(e,...t){if(this._events&&this._events.hasOwnProperty(e)){const s=this._events[e].slice(0);for(let r=0,i=s.length;r{const s=Object.getOwnPropertyDescriptor(Do.prototype,t);Object.defineProperty(e.prototype,t,s)})}dispose(){return super.dispose(),this._events=void 0,this}}class qm extends Do{constructor(){super(...arguments),this.isOffline=!1}toJSON(){return{}}}let eh=class Hm extends qm{constructor(){var e,t;super(),this.name="Context",this._constants=new Map,this._timeouts=new kn,this._timeoutIds=0,this._initialized=!1,this._closeStarted=!1,this.isOffline=!1,this._workletPromise=null;const s=Z(Hm.getDefaults(),arguments,["context"]);s.context?(this._context=s.context,this._latencyHint=((e=arguments[0])===null||e===void 0?void 0:e.latencyHint)||""):(this._context=AA({latencyHint:s.latencyHint}),this._latencyHint=s.latencyHint),this._ticker=new MA(this.emit.bind(this,"tick"),s.clockSource,s.updateInterval,this._context.sampleRate),this.on("tick",this._timeoutLoop.bind(this)),this._context.onstatechange=()=>{this.emit("statechange",this.state)},this[!((t=arguments[0])===null||t===void 0)&&t.hasOwnProperty("updateInterval")?"_lookAhead":"lookAhead"]=s.lookAhead}static getDefaults(){return{clockSource:"worker",latencyHint:"interactive",lookAhead:.1,updateInterval:.05}}initialize(){return this._initialized||(jA(this),this._initialized=!0),this}createAnalyser(){return this._context.createAnalyser()}createOscillator(){return this._context.createOscillator()}createBufferSource(){return this._context.createBufferSource()}createBiquadFilter(){return this._context.createBiquadFilter()}createBuffer(e,t,s){return this._context.createBuffer(e,t,s)}createChannelMerger(e){return this._context.createChannelMerger(e)}createChannelSplitter(e){return this._context.createChannelSplitter(e)}createConstantSource(){return this._context.createConstantSource()}createConvolver(){return this._context.createConvolver()}createDelay(e){return this._context.createDelay(e)}createDynamicsCompressor(){return this._context.createDynamicsCompressor()}createGain(){return this._context.createGain()}createIIRFilter(e,t){return this._context.createIIRFilter(e,t)}createPanner(){return this._context.createPanner()}createPeriodicWave(e,t,s){return this._context.createPeriodicWave(e,t,s)}createStereoPanner(){return this._context.createStereoPanner()}createWaveShaper(){return this._context.createWaveShaper()}createMediaStreamSource(e){return me(xr(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamSource(e)}createMediaElementSource(e){return me(xr(this._context),"Not available if OfflineAudioContext"),this._context.createMediaElementSource(e)}createMediaStreamDestination(){return me(xr(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamDestination()}decodeAudioData(e){return this._context.decodeAudioData(e)}get currentTime(){return this._context.currentTime}get state(){return this._context.state}get sampleRate(){return this._context.sampleRate}get listener(){return this.initialize(),this._listener}set listener(e){me(!this._initialized,"The listener cannot be set after initialization."),this._listener=e}get transport(){return this.initialize(),this._transport}set transport(e){me(!this._initialized,"The transport cannot be set after initialization."),this._transport=e}get draw(){return this.initialize(),this._draw}set draw(e){me(!this._initialized,"Draw cannot be set after initialization."),this._draw=e}get destination(){return this.initialize(),this._destination}set destination(e){me(!this._initialized,"The destination cannot be set after initialization."),this._destination=e}createAudioWorkletNode(e,t){return DA(this.rawContext,e,t)}addAudioWorkletModule(e){return Ie(this,void 0,void 0,function*(){me(ve(this.rawContext.audioWorklet),"AudioWorkletNode is only available in a secure context (https or localhost)"),this._workletPromise||(this._workletPromise=this.rawContext.audioWorklet.addModule(e)),yield this._workletPromise})}workletsAreReady(){return Ie(this,void 0,void 0,function*(){(yield this._workletPromise)?this._workletPromise:Promise.resolve()})}get updateInterval(){return this._ticker.updateInterval}set updateInterval(e){this._ticker.updateInterval=e}get clockSource(){return this._ticker.type}set clockSource(e){this._ticker.type=e}get lookAhead(){return this._lookAhead}set lookAhead(e){this._lookAhead=e,this.updateInterval=e?e/2:.01}get latencyHint(){return this._latencyHint}get rawContext(){return this._context}now(){return this._context.currentTime+this._lookAhead}immediate(){return this._context.currentTime}resume(){return xr(this._context)?this._context.resume():Promise.resolve()}close(){return Ie(this,void 0,void 0,function*(){xr(this._context)&&this.state!=="closed"&&!this._closeStarted&&(this._closeStarted=!0,yield this._context.close()),this._initialized&&VA(this)})}getConstant(e){if(this._constants.has(e))return this._constants.get(e);{const t=this._context.createBuffer(1,128,this._context.sampleRate),s=t.getChannelData(0);for(let i=0;ithis._constants[e].disconnect()),this.close(),this}_timeoutLoop(){const e=this.now();let t=this._timeouts.peek();for(;this._timeouts.length&&t&&t.time<=e;)t.callback(),this._timeouts.shift(),t=this._timeouts.peek()}setTimeout(e,t){this._timeoutIds++;const s=this.now();return this._timeouts.add({callback:e,id:this._timeoutIds,time:s+t}),this._timeoutIds}clearTimeout(e){return this._timeouts.forEach(t=>{t.id===e&&this._timeouts.remove(t)}),this}clearInterval(e){return this.clearTimeout(e)}setInterval(e,t){const s=++this._timeoutIds,r=()=>{const i=this.now();this._timeouts.add({callback:()=>{e(),r()},id:s,time:i+t})};return r(),s}};class zA extends qm{constructor(){super(...arguments),this.lookAhead=0,this.latencyHint=0,this.isOffline=!1}createAnalyser(){return{}}createOscillator(){return{}}createBufferSource(){return{}}createBiquadFilter(){return{}}createBuffer(e,t,s){return{}}createChannelMerger(e){return{}}createChannelSplitter(e){return{}}createConstantSource(){return{}}createConvolver(){return{}}createDelay(e){return{}}createDynamicsCompressor(){return{}}createGain(){return{}}createIIRFilter(e,t){return{}}createPanner(){return{}}createPeriodicWave(e,t,s){return{}}createStereoPanner(){return{}}createWaveShaper(){return{}}createMediaStreamSource(e){return{}}createMediaElementSource(e){return{}}createMediaStreamDestination(){return{}}decodeAudioData(e){return Promise.resolve({})}createAudioWorkletNode(e,t){return{}}get rawContext(){return{}}addAudioWorkletModule(e){return Ie(this,void 0,void 0,function*(){return Promise.resolve()})}resume(){return Promise.resolve()}setTimeout(e,t){return 0}clearTimeout(e){return this}setInterval(e,t){return 0}clearInterval(e){return this}getConstant(e){return{}}get currentTime(){return 0}get state(){return{}}get sampleRate(){return 0}get listener(){return{}}get transport(){return{}}get draw(){return{}}set draw(e){}get destination(){return{}}set destination(e){}now(){return 0}immediate(){return 0}}function je(n,e){ln(e)?e.forEach(t=>je(n,t)):Object.defineProperty(n,e,{enumerable:!0,writable:!1})}function th(n,e){ln(e)?e.forEach(t=>th(n,t)):Object.defineProperty(n,e,{writable:!0})}const Ce=()=>{};class Se extends ss{constructor(){super(),this.name="ToneAudioBuffer",this.onload=Ce;const e=Z(Se.getDefaults(),arguments,["url","onload","onerror"]);this.reverse=e.reverse,this.onload=e.onload,Yn(e.url)?this.load(e.url).catch(e.onerror):e.url&&this.set(e.url)}static getDefaults(){return{onerror:Ce,onload:Ce,reverse:!1}}get sampleRate(){return this._buffer?this._buffer.sampleRate:on().sampleRate}set(e){return e instanceof Se?e.loaded?this._buffer=e.get():e.onload=()=>{this.set(e),this.onload(this)}:this._buffer=e,this._reversed&&this._reverse(),this}get(){return this._buffer}load(e){return Ie(this,void 0,void 0,function*(){const t=Se.load(e).then(s=>{this.set(s),this.onload(this)});Se.downloads.push(t);try{yield t}finally{const s=Se.downloads.indexOf(t);Se.downloads.splice(s,1)}return this})}dispose(){return super.dispose(),this._buffer=void 0,this}fromArray(e){const t=ln(e)&&e[0].length>0,s=t?e.length:1,r=t?e[0].length:e.length,i=on(),o=i.createBuffer(s,r,i.sampleRate),a=!t&&s===1?[e]:e;for(let c=0;cr/s),this.fromArray(t)}return this}toArray(e){if(xs(e))return this.getChannelData(e);if(this.numberOfChannels===1)return this.toArray(0);{const t=[];for(let s=0;s0}get duration(){return this._buffer?this._buffer.duration:0}get length(){return this._buffer?this._buffer.length:0}get numberOfChannels(){return this._buffer?this._buffer.numberOfChannels:0}get reverse(){return this._reversed}set reverse(e){this._reversed!==e&&(this._reversed=e,this._reverse())}static fromArray(e){return new Se().fromArray(e)}static fromUrl(e){return Ie(this,void 0,void 0,function*(){return yield new Se().load(e)})}static load(e){return Ie(this,void 0,void 0,function*(){const t=e.match(/\[([^\]\[]+\|.+)\]$/);if(t){const c=t[1].split("|");let l=c[0];for(const u of c)if(Se.supportsType(u)){l=u;break}e=e.replace(t[0],l)}const s=Se.baseUrl===""||Se.baseUrl.endsWith("/")?Se.baseUrl:Se.baseUrl+"/",r=document.createElement("a");r.href=s+e,r.pathname=(r.pathname+r.hash).split("/").map(encodeURIComponent).join("/");const i=yield fetch(r.href);if(!i.ok)throw new Error(`could not load url: ${e}`);const o=yield i.arrayBuffer();return yield on().decodeAudioData(o)})}static supportsType(e){const t=e.split("."),s=t[t.length-1];return document.createElement("audio").canPlayType("audio/"+s)!==""}static loaded(){return Ie(this,void 0,void 0,function*(){for(yield Promise.resolve();Se.downloads.length;)yield Se.downloads[0]})}}Se.baseUrl="";Se.downloads=[];class vc extends eh{constructor(){super({clockSource:"offline",context:ca(arguments[0])?arguments[0]:PA(arguments[0],arguments[1]*arguments[2],arguments[2]),lookAhead:0,updateInterval:ca(arguments[0])?128/arguments[0].sampleRate:128/arguments[2]}),this.name="OfflineContext",this._currentTime=0,this.isOffline=!0,this._duration=ca(arguments[0])?arguments[0].length/arguments[0].sampleRate:arguments[1]}now(){return this._currentTime}get currentTime(){return this._currentTime}_renderClock(e){return Ie(this,void 0,void 0,function*(){let t=0;for(;this._duration-this._currentTime>=0;){this.emit("tick"),this._currentTime+=128/this.sampleRate,t++;const s=Math.floor(this.sampleRate/128);e&&t%s===0&&(yield new Promise(r=>setTimeout(r,1)))}})}render(e=!0){return Ie(this,void 0,void 0,function*(){yield this.workletsAreReady(),yield this._renderClock(e);const t=yield this._context.startRendering();return new Se(t)})}close(){return Promise.resolve()}}const Ym=new zA;let Vs=Ym;function on(){return Vs===Ym&&RA&&UA(new eh),Vs}function UA(n,e=!1){e&&Vs.dispose(),xr(n)?Vs=new eh(n):ca(n)?Vs=new vc(n):Vs=n}function BA(){return Vs.resume()}if(Ws&&!Ws.TONE_SILENCE_LOGGING){const e=` * Tone.js v${H0} * `;console.log(`%c${e}`,"background: #000; color: #fff")}function WA(n){return Math.pow(10,n/20)}function qA(n){return 20*(Math.log(n)/Math.LN10)}function Gm(n){return Math.pow(2,n/12)}let bc=440;function HA(){return bc}function YA(n){bc=n}function Wl(n){return Math.round(Xm(n))}function Xm(n){return 69+12*Math.log2(n/bc)}function GA(n){return bc*Math.pow(2,(n-69)/12)}class nh extends ss{constructor(e,t,s){super(),this.defaultUnits="s",this._val=t,this._units=s,this.context=e,this._expressions=this._getExpressions()}_getExpressions(){return{hz:{method:e=>this._frequencyToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)hz$/i},i:{method:e=>this._ticksToUnits(parseInt(e,10)),regexp:/^(\d+)i$/i},m:{method:e=>this._beatsToUnits(parseInt(e,10)*this._getTimeSignature()),regexp:/^(\d+)m$/i},n:{method:(e,t)=>{const s=parseInt(e,10),r=t==="."?1.5:1;return s===1?this._beatsToUnits(this._getTimeSignature())*r:this._beatsToUnits(4/s)*r},regexp:/^(\d+)n(\.?)$/i},number:{method:e=>this._expressions[this.defaultUnits].method.call(this,e),regexp:/^(\d+(?:\.\d+)?)$/},s:{method:e=>this._secondsToUnits(parseFloat(e)),regexp:/^(\d+(?:\.\d+)?)s$/},samples:{method:e=>parseInt(e,10)/this.context.sampleRate,regexp:/^(\d+)samples$/},t:{method:e=>{const t=parseInt(e,10);return this._beatsToUnits(8/(Math.floor(t)*3))},regexp:/^(\d+)t$/i},tr:{method:(e,t,s)=>{let r=0;return e&&e!=="0"&&(r+=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&t!=="0"&&(r+=this._beatsToUnits(parseFloat(t))),s&&s!=="0"&&(r+=this._beatsToUnits(parseFloat(s)/4)),r},regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/}}}valueOf(){if(this._val instanceof nh&&this.fromType(this._val),Ut(this._val))return this._noArg();if(Yn(this._val)&&Ut(this._units)){for(const e in this._expressions)if(this._expressions[e].regexp.test(this._val.trim())){this._units=e;break}}else if(Bs(this._val)){let e=0;for(const t in this._val)if(ve(this._val[t])){const s=this._val[t],r=new this.constructor(this.context,t).valueOf()*s;e+=r}return e}if(ve(this._units)){const e=this._expressions[this._units],t=this._val.toString().trim().match(e.regexp);return t?e.method.apply(this,t.slice(1)):e.method.call(this,this._val)}else return Yn(this._val)?parseFloat(this._val):this._val}_frequencyToUnits(e){return 1/e}_beatsToUnits(e){return 60/this._getBpm()*e}_secondsToUnits(e){return e}_ticksToUnits(e){return e*this._beatsToUnits(1)/this._getPPQ()}_noArg(){return this._now()}_getBpm(){return this.context.transport.bpm.value}_getTimeSignature(){return this.context.transport.timeSignature}_getPPQ(){return this.context.transport.PPQ}fromType(e){switch(this._units=void 0,this.defaultUnits){case"s":this._val=e.toSeconds();break;case"i":this._val=e.toTicks();break;case"hz":this._val=e.toFrequency();break;case"midi":this._val=e.toMidi();break}return this}toFrequency(){return 1/this.toSeconds()}toSamples(){return this.toSeconds()*this.context.sampleRate}toMilliseconds(){return this.toSeconds()*1e3}}class an extends nh{constructor(){super(...arguments),this.name="TimeClass"}_getExpressions(){return Object.assign(super._getExpressions(),{now:{method:e=>this._now()+new this.constructor(this.context,e).valueOf(),regexp:/^\+(.+)/},quantize:{method:e=>{const t=new an(this.context,e).valueOf();return this._secondsToUnits(this.context.transport.nextSubdivision(t))},regexp:/^@(.+)/}})}quantize(e,t=1){const s=new this.constructor(this.context,e).valueOf(),r=this.valueOf(),a=Math.round(r/s)*s-r;return r+a*t}toNotation(){const e=this.toSeconds(),t=["1m"];for(let i=1;i<9;i++){const o=Math.pow(2,i);t.push(o+"n."),t.push(o+"n"),t.push(o+"t")}t.push("0");let s=t[0],r=new an(this.context,t[0]).toSeconds();return t.forEach(i=>{const o=new an(this.context,i).toSeconds();Math.abs(o-e)3&&(r=parseFloat(parseFloat(i).toFixed(3))),[s,t,r].join(":")}toTicks(){const e=this._beatsToUnits(1);return this.valueOf()/e*this._getPPQ()}toSeconds(){return this.valueOf()}toMidi(){return Wl(this.toFrequency())}_now(){return this.context.now()}}class Xt extends an{constructor(){super(...arguments),this.name="Frequency",this.defaultUnits="hz"}static get A4(){return HA()}static set A4(e){YA(e)}_getExpressions(){return Object.assign({},super._getExpressions(),{midi:{regexp:/^(\d+(?:\.\d+)?midi)/,method(e){return this.defaultUnits==="midi"?e:Xt.mtof(e)}},note:{regexp:/^([a-g]{1}(?:b|#|##|x|bb|###|#x|x#|bbb)?)(-?[0-9]+)/i,method(e,t){const r=XA[e.toLowerCase()]+(parseInt(t,10)+1)*12;return this.defaultUnits==="midi"?r:Xt.mtof(r)}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method(e,t,s){let r=1;return e&&e!=="0"&&(r*=this._beatsToUnits(this._getTimeSignature()*parseFloat(e))),t&&t!=="0"&&(r*=this._beatsToUnits(parseFloat(t))),s&&s!=="0"&&(r*=this._beatsToUnits(parseFloat(s)/4)),r}}})}transpose(e){return new Xt(this.context,this.valueOf()*Gm(e))}harmonize(e){return e.map(t=>this.transpose(t))}toMidi(){return Wl(this.valueOf())}toNote(){const e=this.toFrequency(),t=Math.log2(e/Xt.A4);let s=Math.round(12*t)+57;const r=Math.floor(s/12);return r<0&&(s+=-12*r),ZA[s%12]+r.toString()}toSeconds(){return 1/super.toSeconds()}toTicks(){const e=this._beatsToUnits(1),t=this.valueOf()/e;return Math.floor(t*this._getPPQ())}_noArg(){return 0}_frequencyToUnits(e){return e}_ticksToUnits(e){return 1/(e*60/(this._getBpm()*this._getPPQ()))}_beatsToUnits(e){return 1/super._beatsToUnits(e)}_secondsToUnits(e){return 1/e}static mtof(e){return GA(e)}static ftom(e){return Wl(e)}}const XA={cbbb:-3,cbb:-2,cb:-1,c:0,"c#":1,cx:2,"c##":2,"c###":3,"cx#":3,"c#x":3,dbbb:-1,dbb:0,db:1,d:2,"d#":3,dx:4,"d##":4,"d###":5,"dx#":5,"d#x":5,ebbb:1,ebb:2,eb:3,e:4,"e#":5,ex:6,"e##":6,"e###":7,"ex#":7,"e#x":7,fbbb:2,fbb:3,fb:4,f:5,"f#":6,fx:7,"f##":7,"f###":8,"fx#":8,"f#x":8,gbbb:4,gbb:5,gb:6,g:7,"g#":8,gx:9,"g##":9,"g###":10,"gx#":10,"g#x":10,abbb:6,abb:7,ab:8,a:9,"a#":10,ax:11,"a##":11,"a###":12,"ax#":12,"a#x":12,bbbb:8,bbb:9,bb:10,b:11,"b#":12,bx:13,"b##":13,"b###":14,"bx#":14,"b#x":14},ZA=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"];class Mi extends an{constructor(){super(...arguments),this.name="TransportTime"}_now(){return this.context.transport.seconds}}class Ot extends ss{constructor(){super();const e=Z(Ot.getDefaults(),arguments,["context"]);this.defaultContext?this.context=this.defaultContext:this.context=e.context}static getDefaults(){return{context:on()}}now(){return this.context.currentTime+this.context.lookAhead}immediate(){return this.context.currentTime}get sampleTime(){return 1/this.context.sampleRate}get blockTime(){return 128/this.context.sampleRate}toSeconds(e){return SA(e),new an(this.context,e).toSeconds()}toFrequency(e){return new Xt(this.context,e).toFrequency()}toTicks(e){return new Mi(this.context,e).toTicks()}_getPartialProperties(e){const t=this.get();return Object.keys(t).forEach(s=>{Ut(e[s])&&delete t[s]}),t}get(){const e=FA(this);return Object.keys(e).forEach(t=>{if(Reflect.has(this,t)){const s=this[t];ve(s)&&ve(s.value)&&ve(s.setValueAtTime)?e[t]=s.value:s instanceof Ot?e[t]=s._getPartialProperties(e[t]):ln(s)||xs(s)||Yn(s)||CA(s)?e[t]=s:delete e[t]}}),e}set(e){return Object.keys(e).forEach(t=>{Reflect.has(this,t)&&ve(this[t])&&(this[t]&&ve(this[t].value)&&ve(this[t].setValueAtTime)?this[t].value!==e[t]&&(this[t].value=e[t]):this[t]instanceof Ot?this[t].set(e[t]):this[t]=e[t])}),this}}class sh extends kn{constructor(e="stopped"){super(),this.name="StateTimeline",this._initial=e,this.setStateAtTime(this._initial,0)}getValueAtTime(e){const t=this.get(e);return t!==null?t.state:this._initial}setStateAtTime(e,t,s){return dn(t,0),this.add(Object.assign({},s,{state:e,time:t})),this}getLastState(e,t){const s=this._search(t);for(let r=s;r>=0;r--){const i=this._timeline[r];if(i.state===e)return i}}getNextState(e,t){const s=this._search(t);if(s!==-1)for(let r=s;r0,"timeConstant must be a number greater than 0");const i=this.toSeconds(t);return this._assertRange(r),me(isFinite(r)&&isFinite(i),`Invalid argument(s) to setTargetAtTime: ${JSON.stringify(e)}, ${JSON.stringify(t)}`),this._events.add({constant:s,time:i,type:"setTargetAtTime",value:r}),this.log(this.units,"setTargetAtTime",e,i,s),this._param.setTargetAtTime(r,i,s),this}setValueCurveAtTime(e,t,s,r=1){s=this.toSeconds(s),t=this.toSeconds(t);const i=this._fromType(e[0])*r;this.setValueAtTime(this._toType(i),t);const o=s/(e.length-1);for(let a=1;a{r.type==="cancelScheduledValues"?e.cancelScheduledValues(r.time):r.type==="setTargetAtTime"?e.setTargetAtTime(r.value,r.time,r.constant):e[r.type](r.value,r.time)}),this}setParam(e){me(this._swappable,"The Param must be assigned as 'swappable' in the constructor");const t=this.input;return t.disconnect(this._param),this.apply(e),this._param=e,t.connect(this._param),this}dispose(){return super.dispose(),this._events.dispose(),this}get defaultValue(){return this._toType(this._param.defaultValue)}_exponentialApproach(e,t,s,r,i){return s+(t-s)*Math.exp(-(i-e)/r)}_linearInterpolate(e,t,s,r,i){return t+(r-t)*((i-e)/(s-e))}_exponentialInterpolate(e,t,s,r,i){return t*Math.pow(r/t,(i-e)/(s-e))}}class ue extends Ot{constructor(){super(...arguments),this._internalChannels=[]}get numberOfInputs(){return ve(this.input)?Qs(this.input)||this.input instanceof Oe?1:this.input.numberOfInputs:0}get numberOfOutputs(){return ve(this.output)?this.output.numberOfOutputs:0}_isAudioNode(e){return ve(e)&&(e instanceof ue||ps(e))}_getInternalNodes(){const e=this._internalChannels.slice(0);return this._isAudioNode(this.input)&&e.push(this.input),this._isAudioNode(this.output)&&this.input!==this.output&&e.push(this.output),e}_setChannelProperties(e){this._getInternalNodes().forEach(s=>{s.channelCount=e.channelCount,s.channelCountMode=e.channelCountMode,s.channelInterpretation=e.channelInterpretation})}_getChannelProperties(){const e=this._getInternalNodes();me(e.length>0,"ToneAudioNode does not have any internal nodes");const t=e[0];return{channelCount:t.channelCount,channelCountMode:t.channelCountMode,channelInterpretation:t.channelInterpretation}}get channelCount(){return this._getChannelProperties().channelCount}set channelCount(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCount:e}))}get channelCountMode(){return this._getChannelProperties().channelCountMode}set channelCountMode(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelCountMode:e}))}get channelInterpretation(){return this._getChannelProperties().channelInterpretation}set channelInterpretation(e){const t=this._getChannelProperties();this._setChannelProperties(Object.assign(t,{channelInterpretation:e}))}connect(e,t=0,s=0){return ws(this,e,t,s),this}toDestination(){return this.connect(this.context.destination),this}toMaster(){return Qu("toMaster() has been renamed toDestination()"),this.toDestination()}disconnect(e,t=0,s=0){return KA(this,e,t,s),this}chain(...e){return qi(this,...e),this}fan(...e){return e.forEach(t=>this.connect(t)),this}dispose(){return super.dispose(),ve(this.input)&&(this.input instanceof ue?this.input.dispose():ps(this.input)&&this.input.disconnect()),ve(this.output)&&(this.output instanceof ue?this.output.dispose():ps(this.output)&&this.output.disconnect()),this._internalChannels=[],this}}function qi(...n){const e=n.shift();n.reduce((t,s)=>(t instanceof ue?t.connect(s):ps(t)&&ws(t,s),s),e)}function ws(n,e,t=0,s=0){for(me(ve(n),"Cannot connect from undefined node"),me(ve(e),"Cannot connect to undefined node"),(e instanceof ue||ps(e))&&me(e.numberOfInputs>0,"Cannot connect to node with no inputs"),me(n.numberOfOutputs>0,"Cannot connect from node with no outputs");e instanceof ue||e instanceof Oe;)ve(e.input)&&(e=e.input);for(;n instanceof ue;)ve(n.output)&&(n=n.output);Qs(e)?n.connect(e,t):n.connect(e,t,s)}function KA(n,e,t=0,s=0){if(ve(e))for(;e instanceof ue;)e=e.input;for(;!ps(n);)ve(n.output)&&(n=n.output);Qs(e)?n.disconnect(e,t):ps(e)?n.disconnect(e,t,s):n.disconnect()}class Ne extends ue{constructor(){super(Z(Ne.getDefaults(),arguments,["gain","units"])),this.name="Gain",this._gainNode=this.context.createGain(),this.input=this._gainNode,this.output=this._gainNode;const e=Z(Ne.getDefaults(),arguments,["gain","units"]);this.gain=new Oe({context:this.context,convert:e.convert,param:this._gainNode.gain,units:e.units,value:e.gain,minValue:e.minValue,maxValue:e.maxValue}),je(this,"gain")}static getDefaults(){return Object.assign(ue.getDefaults(),{convert:!0,gain:1,units:"gain"})}dispose(){return super.dispose(),this._gainNode.disconnect(),this.gain.dispose(),this}}class zr extends ue{constructor(e){super(e),this.onended=Ce,this._startTime=-1,this._stopTime=-1,this._timeout=-1,this.output=new Ne({context:this.context,gain:0}),this._gainNode=this.output,this.getStateAtTime=function(t){const s=this.toSeconds(t);return this._startTime!==-1&&s>=this._startTime&&(this._stopTime===-1||s<=this._stopTime)?"started":"stopped"},this._fadeIn=e.fadeIn,this._fadeOut=e.fadeOut,this._curve=e.curve,this.onended=e.onended}static getDefaults(){return Object.assign(ue.getDefaults(),{curve:"linear",fadeIn:0,fadeOut:0,onended:Ce})}_startGain(e,t=1){me(this._startTime===-1,"Source cannot be started more than once");const s=this.toSeconds(this._fadeIn);return this._startTime=e+s,this._startTime=Math.max(this._startTime,this.context.currentTime),s>0?(this._gainNode.gain.setValueAtTime(0,e),this._curve==="linear"?this._gainNode.gain.linearRampToValueAtTime(t,e+s):this._gainNode.gain.exponentialApproachValueAtTime(t,e,s)):this._gainNode.gain.setValueAtTime(t,e),this}stop(e){return this.log("stop",e),this._stopGain(this.toSeconds(e)),this}_stopGain(e){me(this._startTime!==-1,"'start' must be called before 'stop'"),this.cancelStop();const t=this.toSeconds(this._fadeOut);return this._stopTime=this.toSeconds(e)+t,this._stopTime=Math.max(this._stopTime,this.now()),t>0?this._curve==="linear"?this._gainNode.gain.linearRampTo(0,t,e):this._gainNode.gain.targetRampTo(0,t,e):(this._gainNode.gain.cancelAndHoldAtTime(e),this._gainNode.gain.setValueAtTime(0,e)),this.context.clearTimeout(this._timeout),this._timeout=this.context.setTimeout(()=>{const s=this._curve==="exponential"?t*2:0;this._stopSource(this.now()+s),this._onended()},this._stopTime-this.context.currentTime),this}_onended(){if(this.onended!==Ce&&(this.onended(this),this.onended=Ce,!this.context.isOffline)){const e=()=>this.dispose();typeof window.requestIdleCallback<"u"?window.requestIdleCallback(e):setTimeout(e,1e3)}}get state(){return this.getStateAtTime(this.now())}cancelStop(){return this.log("cancelStop"),me(this._startTime!==-1,"Source is not started"),this._gainNode.gain.cancelScheduledValues(this._startTime+this.sampleTime),this.context.clearTimeout(this._timeout),this._stopTime=-1,this}dispose(){return super.dispose(),this._gainNode.dispose(),this.onended=Ce,this}}class Fa extends zr{constructor(){super(Z(Fa.getDefaults(),arguments,["offset"])),this.name="ToneConstantSource",this._source=this.context.createConstantSource();const e=Z(Fa.getDefaults(),arguments,["offset"]);ws(this._source,this._gainNode),this.offset=new Oe({context:this.context,convert:e.convert,param:this._source.offset,units:e.units,value:e.offset,minValue:e.minValue,maxValue:e.maxValue})}static getDefaults(){return Object.assign(zr.getDefaults(),{convert:!0,offset:1,units:"number"})}start(e){const t=this.toSeconds(e);return this.log("start",t),this._startGain(t),this._source.start(t),this}_stopSource(e){this._source.stop(e)}dispose(){return super.dispose(),this.state==="started"&&this.stop(),this._source.disconnect(),this.offset.dispose(),this}}class Fe extends ue{constructor(){super(Z(Fe.getDefaults(),arguments,["value","units"])),this.name="Signal",this.override=!0;const e=Z(Fe.getDefaults(),arguments,["value","units"]);this.output=this._constantSource=new Fa({context:this.context,convert:e.convert,offset:e.value,units:e.units,minValue:e.minValue,maxValue:e.maxValue}),this._constantSource.start(0),this.input=this._param=this._constantSource.offset}static getDefaults(){return Object.assign(ue.getDefaults(),{convert:!0,units:"number",value:0})}connect(e,t=0,s=0){return rh(this,e,t,s),this}dispose(){return super.dispose(),this._param.dispose(),this._constantSource.dispose(),this}setValueAtTime(e,t){return this._param.setValueAtTime(e,t),this}getValueAtTime(e){return this._param.getValueAtTime(e)}setRampPoint(e){return this._param.setRampPoint(e),this}linearRampToValueAtTime(e,t){return this._param.linearRampToValueAtTime(e,t),this}exponentialRampToValueAtTime(e,t){return this._param.exponentialRampToValueAtTime(e,t),this}exponentialRampTo(e,t,s){return this._param.exponentialRampTo(e,t,s),this}linearRampTo(e,t,s){return this._param.linearRampTo(e,t,s),this}targetRampTo(e,t,s){return this._param.targetRampTo(e,t,s),this}exponentialApproachValueAtTime(e,t,s){return this._param.exponentialApproachValueAtTime(e,t,s),this}setTargetAtTime(e,t,s){return this._param.setTargetAtTime(e,t,s),this}setValueCurveAtTime(e,t,s,r){return this._param.setValueCurveAtTime(e,t,s,r),this}cancelScheduledValues(e){return this._param.cancelScheduledValues(e),this}cancelAndHoldAtTime(e){return this._param.cancelAndHoldAtTime(e),this}rampTo(e,t,s){return this._param.rampTo(e,t,s),this}get value(){return this._param.value}set value(e){this._param.value=e}get convert(){return this._param.convert}set convert(e){this._param.convert=e}get units(){return this._param.units}get overridden(){return this._param.overridden}set overridden(e){this._param.overridden=e}get maxValue(){return this._param.maxValue}get minValue(){return this._param.minValue}apply(e){return this._param.apply(e),this}}function rh(n,e,t,s){(e instanceof Oe||Qs(e)||e instanceof Fe&&e.override)&&(e.cancelScheduledValues(0),e.setValueAtTime(0,0),e instanceof Fe&&(e.overridden=!0)),ws(n,e,t,s)}class La extends Oe{constructor(){super(Z(La.getDefaults(),arguments,["value"])),this.name="TickParam",this._events=new kn(1/0),this._multiplier=1;const e=Z(La.getDefaults(),arguments,["value"]);this._multiplier=e.multiplier,this._events.cancel(0),this._events.add({ticks:0,time:0,type:"setValueAtTime",value:this._fromType(e.value)}),this.setValueAtTime(e.value,0)}static getDefaults(){return Object.assign(Oe.getDefaults(),{multiplier:1,units:"hertz",value:1})}setTargetAtTime(e,t,s){t=this.toSeconds(t),this.setRampPoint(t);const r=this._fromType(e),i=this._events.get(t),o=Math.round(Math.max(1/s,1));for(let a=0;a<=o;a++){const c=s*a+t,l=this._exponentialApproach(i.time,i.value,r,s,c);this.linearRampToValueAtTime(this._toType(l),c)}return this}setValueAtTime(e,t){const s=this.toSeconds(t);super.setValueAtTime(e,t);const r=this._events.get(s),i=this._events.previousEvent(r),o=this._getTicksUntilEvent(i,s);return r.ticks=Math.max(o,0),this}linearRampToValueAtTime(e,t){const s=this.toSeconds(t);super.linearRampToValueAtTime(e,t);const r=this._events.get(s),i=this._events.previousEvent(r),o=this._getTicksUntilEvent(i,s);return r.ticks=Math.max(o,0),this}exponentialRampToValueAtTime(e,t){t=this.toSeconds(t);const s=this._fromType(e),r=this._events.get(t),i=Math.round(Math.max((t-r.time)*10,1)),o=(t-r.time)/i;for(let a=0;a<=i;a++){const c=o*a+r.time,l=this._exponentialInterpolate(r.time,r.value,t,s,c);this.linearRampToValueAtTime(this._toType(l),c)}return this}_getTicksUntilEvent(e,t){if(e===null)e={ticks:0,time:0,type:"setValueAtTime",value:0};else if(Ut(e.ticks)){const o=this._events.previousEvent(e);e.ticks=this._getTicksUntilEvent(o,e.time)}const s=this._fromType(this.getValueAtTime(e.time));let r=this._fromType(this.getValueAtTime(t));const i=this._events.get(t);return i&&i.time===t&&i.type==="setValueAtTime"&&(r=this._fromType(this.getValueAtTime(t-this.sampleTime))),.5*(t-e.time)*(s+r)+e.ticks}getTicksAtTime(e){const t=this.toSeconds(e),s=this._events.get(t);return Math.max(this._getTicksUntilEvent(s,t),0)}getDurationOfTicks(e,t){const s=this.toSeconds(t),r=this.getTicksAtTime(t);return this.getTimeOfTick(r+e)-s}getTimeOfTick(e){const t=this._events.get(e,"ticks"),s=this._events.getAfter(e,"ticks");if(t&&t.ticks===e)return t.time;if(t&&s&&s.type==="linearRampToValueAtTime"&&t.value!==s.value){const r=this._fromType(this.getValueAtTime(t.time)),o=(this._fromType(this.getValueAtTime(s.time))-r)/(s.time-t.time),a=Math.sqrt(Math.pow(r,2)-2*o*(t.ticks-e)),c=(-r+a)/o,l=(-r-a)/o;return(c>0?c:l)+t.time}else return t?t.value===0?1/0:t.time+(e-t.ticks)/t.value:e/this._initialValue}ticksToTime(e,t){return this.getDurationOfTicks(e,t)}timeToTicks(e,t){const s=this.toSeconds(t),r=this.toSeconds(e),i=this.getTicksAtTime(s);return this.getTicksAtTime(s+r)-i}_fromType(e){return this.units==="bpm"&&this.multiplier?1/(60/e/this.multiplier):super._fromType(e)}_toType(e){return this.units==="bpm"&&this.multiplier?e/this.multiplier*60:super._toType(e)}get multiplier(){return this._multiplier}set multiplier(e){const t=this.value;this._multiplier=e,this.cancelScheduledValues(0),this.setValueAtTime(t,0)}}class ja extends Fe{constructor(){super(Z(ja.getDefaults(),arguments,["value"])),this.name="TickSignal";const e=Z(ja.getDefaults(),arguments,["value"]);this.input=this._param=new La({context:this.context,convert:e.convert,multiplier:e.multiplier,param:this._constantSource.offset,units:e.units,value:e.value})}static getDefaults(){return Object.assign(Fe.getDefaults(),{multiplier:1,units:"hertz",value:1})}ticksToTime(e,t){return this._param.ticksToTime(e,t)}timeToTicks(e,t){return this._param.timeToTicks(e,t)}getTimeOfTick(e){return this._param.getTimeOfTick(e)}getDurationOfTicks(e,t){return this._param.getDurationOfTicks(e,t)}getTicksAtTime(e){return this._param.getTicksAtTime(e)}get multiplier(){return this._param.multiplier}set multiplier(e){this._param.multiplier=e}dispose(){return super.dispose(),this._param.dispose(),this}}class Va extends Ot{constructor(){super(Z(Va.getDefaults(),arguments,["frequency"])),this.name="TickSource",this._state=new sh,this._tickOffset=new kn,this._ticksAtTime=new kn,this._secondsAtTime=new kn;const e=Z(Va.getDefaults(),arguments,["frequency"]);this.frequency=new ja({context:this.context,units:e.units,value:e.frequency}),je(this,"frequency"),this._state.setStateAtTime("stopped",0),this.setTicksAtTime(0,0)}static getDefaults(){return Object.assign({frequency:1,units:"hertz"},Ot.getDefaults())}get state(){return this.getStateAtTime(this.now())}start(e,t){const s=this.toSeconds(e);return this._state.getValueAtTime(s)!=="started"&&(this._state.setStateAtTime("started",s),ve(t)&&this.setTicksAtTime(t,s),this._ticksAtTime.cancel(s),this._secondsAtTime.cancel(s)),this}stop(e){const t=this.toSeconds(e);if(this._state.getValueAtTime(t)==="stopped"){const s=this._state.get(t);s&&s.time>0&&(this._tickOffset.cancel(s.time),this._state.cancel(s.time))}return this._state.cancel(t),this._state.setStateAtTime("stopped",t),this.setTicksAtTime(0,t),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t),this}pause(e){const t=this.toSeconds(e);return this._state.getValueAtTime(t)==="started"&&(this._state.setStateAtTime("paused",t),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t)),this}cancel(e){return e=this.toSeconds(e),this._state.cancel(e),this._tickOffset.cancel(e),this._ticksAtTime.cancel(e),this._secondsAtTime.cancel(e),this}getTicksAtTime(e){const t=this.toSeconds(e),s=this._state.getLastState("stopped",t),r=this._ticksAtTime.get(t),i={state:"paused",time:t};this._state.add(i);let o=r||s,a=r?r.ticks:0,c=null;return this._state.forEachBetween(o.time,t+this.sampleTime,l=>{let u=o.time;const h=this._tickOffset.get(l.time);h&&h.time>=o.time&&(a=h.ticks,u=h.time),o.state==="started"&&l.state!=="started"&&(a+=this.frequency.getTicksAtTime(l.time)-this.frequency.getTicksAtTime(u),l.time!=i.time&&(c={state:l.state,time:l.time,ticks:a})),o=l}),this._state.remove(i),c&&this._ticksAtTime.add(c),a}get ticks(){return this.getTicksAtTime(this.now())}set ticks(e){this.setTicksAtTime(e,this.now())}get seconds(){return this.getSecondsAtTime(this.now())}set seconds(e){const t=this.now(),s=this.frequency.timeToTicks(e,t);this.setTicksAtTime(s,t)}getSecondsAtTime(e){e=this.toSeconds(e);const t=this._state.getLastState("stopped",e),s={state:"paused",time:e};this._state.add(s);const r=this._secondsAtTime.get(e);let i=r||t,o=r?r.seconds:0,a=null;return this._state.forEachBetween(i.time,e+this.sampleTime,c=>{let l=i.time;const u=this._tickOffset.get(c.time);u&&u.time>=i.time&&(o=u.seconds,l=u.time),i.state==="started"&&c.state!=="started"&&(o+=c.time-l,c.time!=s.time&&(a={state:c.state,time:c.time,seconds:o})),i=c}),this._state.remove(s),a&&this._secondsAtTime.add(a),o}setTicksAtTime(e,t){return t=this.toSeconds(t),this._tickOffset.cancel(t),this._tickOffset.add({seconds:this.frequency.getDurationOfTicks(e,t),ticks:e,time:t}),this._ticksAtTime.cancel(t),this._secondsAtTime.cancel(t),this}getStateAtTime(e){return e=this.toSeconds(e),this._state.getValueAtTime(e)}getTimeOfTick(e,t=this.now()){const s=this._tickOffset.get(t),r=this._state.get(t),i=Math.max(s.time,r.time),o=this.frequency.getTicksAtTime(i)+e-s.ticks;return this.frequency.getTimeOfTick(o)}forEachTickBetween(e,t,s){let r=this._state.get(e);this._state.forEachBetween(e,t,o=>{r&&r.state==="started"&&o.state!=="started"&&this.forEachTickBetween(Math.max(r.time,e),o.time-this.sampleTime,s),r=o});let i=null;if(r&&r.state==="started"){const o=Math.max(r.time,e),a=this.frequency.getTicksAtTime(o),c=this.frequency.getTicksAtTime(r.time),l=a-c;let u=Math.ceil(l)-l;u=rn(u,1)?0:u;let h=this.frequency.getTimeOfTick(a+u);for(;h{switch(s.state){case"started":const r=this._tickSource.getTicksAtTime(s.time);this.emit("start",s.time,r);break;case"stopped":s.time!==0&&this.emit("stop",s.time);break;case"paused":this.emit("pause",s.time);break}}),this._tickSource.forEachTickBetween(e,t,(s,r)=>{this.callback(s,r)}))}getStateAtTime(e){const t=this.toSeconds(e);return this._state.getValueAtTime(t)}dispose(){return super.dispose(),this.context.off("tick",this._boundLoop),this._tickSource.dispose(),this._state.dispose(),this}}Do.mixin(Hi);class ih extends ss{constructor(){super(),this.name="ToneAudioBuffers",this._buffers=new Map,this._loadingCount=0;const e=Z(ih.getDefaults(),arguments,["urls","onload","baseUrl"],"urls");this.baseUrl=e.baseUrl,Object.keys(e.urls).forEach(t=>{this._loadingCount++;const s=e.urls[t];this.add(t,s,this._bufferLoaded.bind(this,e.onload),e.onerror)})}static getDefaults(){return{baseUrl:"",onerror:Ce,onload:Ce,urls:{}}}has(e){return this._buffers.has(e.toString())}get(e){return me(this.has(e),`ToneAudioBuffers has no buffer named: ${e}`),this._buffers.get(e.toString())}_bufferLoaded(e){this._loadingCount--,this._loadingCount===0&&e&&e()}get loaded(){return Array.from(this._buffers).every(([e,t])=>t.loaded)}add(e,t,s=Ce,r=Ce){return Yn(t)?(this.baseUrl&&t.trim().substring(0,11).toLowerCase()==="data:audio/"&&(this.baseUrl=""),this._buffers.set(e.toString(),new Se(this.baseUrl+t,s,r))):this._buffers.set(e.toString(),new Se(t,s,r)),this}dispose(){return super.dispose(),this._buffers.forEach(e=>e.dispose()),this._buffers.clear(),this}}class Tr extends Mi{constructor(){super(...arguments),this.name="Ticks",this.defaultUnits="i"}_now(){return this.context.transport.ticks}_beatsToUnits(e){return this._getPPQ()*e}_secondsToUnits(e){return Math.floor(e/(60/this._getBpm())*this._getPPQ())}_ticksToUnits(e){return e}toTicks(){return this.valueOf()}toSeconds(){return this.valueOf()/this._getPPQ()*(60/this._getBpm())}}class QA extends Ot{constructor(){super(...arguments),this.name="Draw",this.expiration=.25,this.anticipation=.008,this._events=new kn,this._boundDrawLoop=this._drawLoop.bind(this),this._animationFrame=-1}schedule(e,t){return this._events.add({callback:e,time:this.toSeconds(t)}),this._events.length===1&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop)),this}cancel(e){return this._events.cancel(this.toSeconds(e)),this}_drawLoop(){const e=this.context.currentTime;for(;this._events.length&&this._events.peek().time-this.anticipation<=e;){const t=this._events.shift();t&&e-t.time<=this.expiration&&t.callback()}this._events.length>0&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop))}dispose(){return super.dispose(),this._events.dispose(),cancelAnimationFrame(this._animationFrame),this}}_c(n=>{n.draw=new QA({context:n})});yc(n=>{n.draw.dispose()});class JA extends ss{constructor(){super(...arguments),this.name="IntervalTimeline",this._root=null,this._length=0}add(e){me(ve(e.time),"Events must have a time property"),me(ve(e.duration),"Events must have a duration parameter"),e.time=e.time.valueOf();let t=new eP(e.time,e.time+e.duration,e);for(this._root===null?this._root=t:this._root.insert(t),this._length++;t!==null;)t.updateHeight(),t.updateMax(),this._rebalance(t),t=t.parent;return this}remove(e){if(this._root!==null){const t=[];this._root.search(e.time,t);for(const s of t)if(s.event===e){this._removeNode(s),this._length--;break}}return this}get length(){return this._length}cancel(e){return this.forEachFrom(e,t=>this.remove(t)),this}_setRoot(e){this._root=e,this._root!==null&&(this._root.parent=null)}_replaceNodeInParent(e,t){e.parent!==null?(e.isLeftChild()?e.parent.left=t:e.parent.right=t,this._rebalance(e.parent)):this._setRoot(t)}_removeNode(e){if(e.left===null&&e.right===null)this._replaceNodeInParent(e,null);else if(e.right===null)this._replaceNodeInParent(e,e.left);else if(e.left===null)this._replaceNodeInParent(e,e.right);else{const t=e.getBalance();let s,r=null;if(t>0)if(e.left.right===null)s=e.left,s.right=e.right,r=s;else{for(s=e.left.right;s.right!==null;)s=s.right;s.parent&&(s.parent.right=s.left,r=s.parent,s.left=e.left,s.right=e.right)}else if(e.right.left===null)s=e.right,s.left=e.left,r=s;else{for(s=e.right.left;s.left!==null;)s=s.left;s.parent&&(s.parent.left=s.right,r=s.parent,s.left=e.left,s.right=e.right)}e.parent!==null?e.isLeftChild()?e.parent.left=s:e.parent.right=s:this._setRoot(s),r&&this._rebalance(r)}e.dispose()}_rotateLeft(e){const t=e.parent,s=e.isLeftChild(),r=e.right;r&&(e.right=r.left,r.left=e),t!==null?s?t.left=r:t.right=r:this._setRoot(r)}_rotateRight(e){const t=e.parent,s=e.isLeftChild(),r=e.left;r&&(e.left=r.right,r.right=e),t!==null?s?t.left=r:t.right=r:this._setRoot(r)}_rebalance(e){const t=e.getBalance();t>1&&e.left?e.left.getBalance()<0?this._rotateLeft(e.left):this._rotateRight(e):t<-1&&e.right&&(e.right.getBalance()>0?this._rotateRight(e.right):this._rotateLeft(e))}get(e){if(this._root!==null){const t=[];if(this._root.search(e,t),t.length>0){let s=t[0];for(let r=1;rs.low&&(s=t[r]);return s.event}}return null}forEach(e){if(this._root!==null){const t=[];this._root.traverse(s=>t.push(s)),t.forEach(s=>{s.event&&e(s.event)})}return this}forEachAtTime(e,t){if(this._root!==null){const s=[];this._root.search(e,s),s.forEach(r=>{r.event&&t(r.event)})}return this}forEachFrom(e,t){if(this._root!==null){const s=[];this._root.searchAfter(e,s),s.forEach(r=>{r.event&&t(r.event)})}return this}dispose(){return super.dispose(),this._root!==null&&this._root.traverse(e=>e.dispose()),this._root=null,this}}class eP{constructor(e,t,s){this._left=null,this._right=null,this.parent=null,this.height=0,this.event=s,this.low=e,this.high=t,this.max=this.high}insert(e){e.low<=this.low?this.left===null?this.left=e:this.left.insert(e):this.right===null?this.right=e:this.right.insert(e)}search(e,t){e>this.max||(this.left!==null&&this.left.search(e,t),this.low<=e&&this.high>e&&t.push(this),!(this.low>e)&&this.right!==null&&this.right.search(e,t))}searchAfter(e,t){this.low>=e&&(t.push(this),this.left!==null&&this.left.searchAfter(e,t)),this.right!==null&&this.right.searchAfter(e,t)}traverse(e){e(this),this.left!==null&&this.left.traverse(e),this.right!==null&&this.right.traverse(e)}updateHeight(){this.left!==null&&this.right!==null?this.height=Math.max(this.left.height,this.right.height)+1:this.right!==null?this.height=this.right.height+1:this.left!==null?this.height=this.left.height+1:this.height=0}updateMax(){this.max=this.high,this.left!==null&&(this.max=Math.max(this.max,this.left.max)),this.right!==null&&(this.max=Math.max(this.max,this.right.max))}getBalance(){let e=0;return this.left!==null&&this.right!==null?e=this.left.height-this.right.height:this.left!==null?e=this.left.height+1:this.right!==null&&(e=-(this.right.height+1)),e}isLeftChild(){return this.parent!==null&&this.parent.left===this}get left(){return this._left}set left(e){this._left=e,e!==null&&(e.parent=this),this.updateHeight(),this.updateMax()}get right(){return this._right}set right(e){this._right=e,e!==null&&(e.parent=this),this.updateHeight(),this.updateMax()}dispose(){this.parent=null,this._left=null,this._right=null,this.event=null}}class ks extends ue{constructor(){super(Z(ks.getDefaults(),arguments,["volume"])),this.name="Volume";const e=Z(ks.getDefaults(),arguments,["volume"]);this.input=this.output=new Ne({context:this.context,gain:e.volume,units:"decibels"}),this.volume=this.output.gain,je(this,"volume"),this._unmutedVolume=e.volume,this.mute=e.mute}static getDefaults(){return Object.assign(ue.getDefaults(),{mute:!1,volume:0})}get mute(){return this.volume.value===-1/0}set mute(e){!this.mute&&e?(this._unmutedVolume=this.volume.value,this.volume.value=-1/0):this.mute&&!e&&(this.volume.value=this._unmutedVolume)}dispose(){return super.dispose(),this.input.dispose(),this.volume.dispose(),this}}let tP=class ql extends ue{constructor(){super(Z(ql.getDefaults(),arguments)),this.name="Destination",this.input=new ks({context:this.context}),this.output=new Ne({context:this.context}),this.volume=this.input.volume;const e=Z(ql.getDefaults(),arguments);qi(this.input,this.output,this.context.rawContext.destination),this.mute=e.mute,this._internalChannels=[this.input,this.context.rawContext.destination,this.output]}static getDefaults(){return Object.assign(ue.getDefaults(),{mute:!1,volume:0})}get mute(){return this.input.mute}set mute(e){this.input.mute=e}chain(...e){return this.input.disconnect(),e.unshift(this.input),e.push(this.output),qi(...e),this}get maxChannelCount(){return this.context.rawContext.destination.maxChannelCount}dispose(){return super.dispose(),this.volume.dispose(),this}};_c(n=>{n.destination=new tP({context:n})});yc(n=>{n.destination.dispose()});class nP extends ss{constructor(e){super(),this.name="TimelineValue",this._timeline=new kn({memory:10}),this._initialValue=e}set(e,t){return this._timeline.add({value:e,time:t}),this}get(e){const t=this._timeline.get(e);return t?t.value:this._initialValue}}class Gn extends ue{constructor(){super(Object.assign(Z(Gn.getDefaults(),arguments,["context"])))}connect(e,t=0,s=0){return rh(this,e,t,s),this}}class Js extends Gn{constructor(){super(Object.assign(Z(Js.getDefaults(),arguments,["mapping","length"]))),this.name="WaveShaper",this._shaper=this.context.createWaveShaper(),this.input=this._shaper,this.output=this._shaper;const e=Z(Js.getDefaults(),arguments,["mapping","length"]);ln(e.mapping)||e.mapping instanceof Float32Array?this.curve=Float32Array.from(e.mapping):EA(e.mapping)&&this.setMap(e.mapping,e.length)}static getDefaults(){return Object.assign(Fe.getDefaults(),{length:1024})}setMap(e,t=1024){const s=new Float32Array(t);for(let r=0,i=t;rs.includes(e));me(t,"oversampling must be either 'none', '2x', or '4x'"),this._shaper.oversample=e}dispose(){return super.dispose(),this._shaper.disconnect(),this}}class Yi extends Gn{constructor(){super(Object.assign(Z(Yi.getDefaults(),arguments,["value"]))),this.name="Pow";const e=Z(Yi.getDefaults(),arguments,["value"]);this._exponentScaler=this.input=this.output=new Js({context:this.context,mapping:this._expFunc(e.value),length:8192}),this._exponent=e.value}static getDefaults(){return Object.assign(Gn.getDefaults(),{value:1})}_expFunc(e){return t=>Math.pow(Math.abs(t),e)}get value(){return this._exponent}set value(e){this._exponent=e,this._exponentScaler.setMap(this._expFunc(this._exponent))}dispose(){return super.dispose(),this._exponentScaler.dispose(),this}}class Ts{constructor(e,t){this.id=Ts._eventId++,this._remainderTime=0;const s=Object.assign(Ts.getDefaults(),t);this.transport=e,this.callback=s.callback,this._once=s.once,this.time=Math.floor(s.time),this._remainderTime=s.time-this.time}static getDefaults(){return{callback:Ce,once:!1,time:0}}get floatTime(){return this.time+this._remainderTime}invoke(e){if(this.callback){const t=this.transport.bpm.getDurationOfTicks(1,e);this.callback(e+this._remainderTime*t),this._once&&this.transport.clear(this.id)}}dispose(){return this.callback=void 0,this}}Ts._eventId=0;class oh extends Ts{constructor(e,t){super(e,t),this._currentId=-1,this._nextId=-1,this._nextTick=this.time,this._boundRestart=this._restart.bind(this);const s=Object.assign(oh.getDefaults(),t);this.duration=s.duration,this._interval=s.interval,this._nextTick=s.time,this.transport.on("start",this._boundRestart),this.transport.on("loopStart",this._boundRestart),this.transport.on("ticks",this._boundRestart),this.context=this.transport.context,this._restart()}static getDefaults(){return Object.assign({},Ts.getDefaults(),{duration:1/0,interval:1,once:!1})}invoke(e){this._createEvents(e),super.invoke(e)}_createEvent(){return $a(this._nextTick,this.floatTime+this.duration)?this.transport.scheduleOnce(this.invoke.bind(this),new Tr(this.context,this._nextTick).toSeconds()):-1}_createEvents(e){$a(this._nextTick+this._interval,this.floatTime+this.duration)&&(this._nextTick+=this._interval,this._currentId=this._nextId,this._nextId=this.transport.scheduleOnce(this.invoke.bind(this),new Tr(this.context,this._nextTick).toSeconds()))}_restart(e){this.transport.clear(this._currentId),this.transport.clear(this._nextId),this._nextTick=this.floatTime;const t=this.transport.getTicksAtTime(e);Vr(t,this.time)&&(this._nextTick=this.floatTime+Math.ceil((t-this.floatTime)/this._interval)*this._interval),this._currentId=this._createEvent(),this._nextTick+=this._interval,this._nextId=this._createEvent()}dispose(){return super.dispose(),this.transport.clear(this._currentId),this.transport.clear(this._nextId),this.transport.off("start",this._boundRestart),this.transport.off("loopStart",this._boundRestart),this.transport.off("ticks",this._boundRestart),this}}class Gi extends Ot{constructor(){super(Z(Gi.getDefaults(),arguments)),this.name="Transport",this._loop=new nP(!1),this._loopStart=0,this._loopEnd=0,this._scheduledEvents={},this._timeline=new kn,this._repeatedEvents=new JA,this._syncedSignals=[],this._swingAmount=0;const e=Z(Gi.getDefaults(),arguments);this._ppq=e.ppq,this._clock=new Hi({callback:this._processTick.bind(this),context:this.context,frequency:0,units:"bpm"}),this._bindClockEvents(),this.bpm=this._clock.frequency,this._clock.frequency.multiplier=e.ppq,this.bpm.setValueAtTime(e.bpm,0),je(this,"bpm"),this._timeSignature=e.timeSignature,this._swingTicks=e.ppq/2}static getDefaults(){return Object.assign(Ot.getDefaults(),{bpm:120,loopEnd:"4m",loopStart:0,ppq:192,swing:0,swingSubdivision:"8n",timeSignature:4})}_processTick(e,t){if(this._loop.get(e)&&t>=this._loopEnd&&(this.emit("loopEnd",e),this._clock.setTicksAtTime(this._loopStart,e),t=this._loopStart,this.emit("loopStart",e,this._clock.getSecondsAtTime(e)),this.emit("loop",e)),this._swingAmount>0&&t%this._ppq!==0&&t%(this._swingTicks*2)!==0){const s=t%(this._swingTicks*2)/(this._swingTicks*2),r=Math.sin(s*Math.PI)*this._swingAmount;e+=new Tr(this.context,this._swingTicks*2/3).toSeconds()*r}Cf(!0),this._timeline.forEachAtTime(t,s=>s.invoke(e)),Cf(!1)}schedule(e,t){const s=new Ts(this,{callback:e,time:new Mi(this.context,t).toTicks()});return this._addEvent(s,this._timeline)}scheduleRepeat(e,t,s,r=1/0){const i=new oh(this,{callback:e,duration:new an(this.context,r).toTicks(),interval:new an(this.context,t).toTicks(),time:new Mi(this.context,s).toTicks()});return this._addEvent(i,this._repeatedEvents)}scheduleOnce(e,t){const s=new Ts(this,{callback:e,once:!0,time:new Mi(this.context,t).toTicks()});return this._addEvent(s,this._timeline)}clear(e){if(this._scheduledEvents.hasOwnProperty(e)){const t=this._scheduledEvents[e.toString()];t.timeline.remove(t.event),t.event.dispose(),delete this._scheduledEvents[e.toString()]}return this}_addEvent(e,t){return this._scheduledEvents[e.id.toString()]={event:e,timeline:t},t.add(e),e.id}cancel(e=0){const t=this.toTicks(e);return this._timeline.forEachFrom(t,s=>this.clear(s.id)),this._repeatedEvents.forEachFrom(t,s=>this.clear(s.id)),this}_bindClockEvents(){this._clock.on("start",(e,t)=>{t=new Tr(this.context,t).toSeconds(),this.emit("start",e,t)}),this._clock.on("stop",e=>{this.emit("stop",e)}),this._clock.on("pause",e=>{this.emit("pause",e)})}get state(){return this._clock.getStateAtTime(this.now())}start(e,t){this.context.resume();let s;return ve(t)&&(s=this.toTicks(t)),this._clock.start(e,s),this}stop(e){return this._clock.stop(e),this}pause(e){return this._clock.pause(e),this}toggle(e){return e=this.toSeconds(e),this._clock.getStateAtTime(e)!=="started"?this.start(e):this.stop(e),this}get timeSignature(){return this._timeSignature}set timeSignature(e){ln(e)&&(e=e[0]/e[1]*4),this._timeSignature=e}get loopStart(){return new an(this.context,this._loopStart,"i").toSeconds()}set loopStart(e){this._loopStart=this.toTicks(e)}get loopEnd(){return new an(this.context,this._loopEnd,"i").toSeconds()}set loopEnd(e){this._loopEnd=this.toTicks(e)}get loop(){return this._loop.get(this.now())}set loop(e){this._loop.set(e,this.now())}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get swing(){return this._swingAmount}set swing(e){this._swingAmount=e}get swingSubdivision(){return new Tr(this.context,this._swingTicks).toNotation()}set swingSubdivision(e){this._swingTicks=this.toTicks(e)}get position(){const e=this.now(),t=this._clock.getTicksAtTime(e);return new Tr(this.context,t).toBarsBeatsSixteenths()}set position(e){const t=this.toTicks(e);this.ticks=t}get seconds(){return this._clock.seconds}set seconds(e){const t=this.now(),s=this._clock.frequency.timeToTicks(e,t);this.ticks=s}get progress(){if(this.loop){const e=this.now();return(this._clock.getTicksAtTime(e)-this._loopStart)/(this._loopEnd-this._loopStart)}else return 0}get ticks(){return this._clock.ticks}set ticks(e){if(this._clock.ticks!==e){const t=this.now();if(this.state==="started"){const s=this._clock.getTicksAtTime(t),r=this._clock.frequency.getDurationOfTicks(Math.ceil(s)-s,t),i=t+r;this.emit("stop",i),this._clock.setTicksAtTime(e,i),this.emit("start",i,this._clock.getSecondsAtTime(i))}else this.emit("ticks",t),this._clock.setTicksAtTime(e,t)}}getTicksAtTime(e){return this._clock.getTicksAtTime(e)}getSecondsAtTime(e){return this._clock.getSecondsAtTime(e)}get PPQ(){return this._clock.frequency.multiplier}set PPQ(e){this._clock.frequency.multiplier=e}nextSubdivision(e){if(e=this.toTicks(e),this.state!=="started")return 0;{const t=this.now(),s=this.getTicksAtTime(t),r=e-s%e;return this._clock.nextTickTime(r,t)}}syncSignal(e,t){const s=this.now();let r=this.bpm,i=1/(60/r.getValueAtTime(s)/this.PPQ),o=[];if(e.units==="time"){const c=.015625/i,l=new Ne(c),u=new Yi(-1),h=new Ne(c);r.chain(l,u,h),r=h,i=1/i,o=[l,u,h]}t||(e.getValueAtTime(s)!==0?t=e.getValueAtTime(s)/i:t=0);const a=new Ne(t);return r.connect(a),a.connect(e._param),o.push(a),this._syncedSignals.push({initial:e.value,nodes:o,signal:e}),e.value=0,this}unsyncSignal(e){for(let t=this._syncedSignals.length-1;t>=0;t--){const s=this._syncedSignals[t];s.signal===e&&(s.nodes.forEach(r=>r.dispose()),s.signal.value=s.initial,this._syncedSignals.splice(t,1))}return this}dispose(){return super.dispose(),this._clock.dispose(),th(this,"bpm"),this._timeline.dispose(),this._repeatedEvents.dispose(),this}}Do.mixin(Gi);_c(n=>{n.transport=new Gi({context:n})});yc(n=>{n.transport.dispose()});class gt extends ue{constructor(e){super(e),this.input=void 0,this._state=new sh("stopped"),this._synced=!1,this._scheduled=[],this._syncedStart=Ce,this._syncedStop=Ce,this._state.memory=100,this._state.increasing=!0,this._volume=this.output=new ks({context:this.context,mute:e.mute,volume:e.volume}),this.volume=this._volume.volume,je(this,"volume"),this.onstop=e.onstop}static getDefaults(){return Object.assign(ue.getDefaults(),{mute:!1,onstop:Ce,volume:0})}get state(){return this._synced?this.context.transport.state==="started"?this._state.getValueAtTime(this.context.transport.seconds):"stopped":this._state.getValueAtTime(this.now())}get mute(){return this._volume.mute}set mute(e){this._volume.mute=e}_clampToCurrentTime(e){return this._synced?e:Math.max(e,this.context.currentTime)}start(e,t,s){let r=Ut(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(r=this._clampToCurrentTime(r),!this._synced&&this._state.getValueAtTime(r)==="started")me(Vr(r,this._state.get(r).time),"Start time must be strictly greater than previous start time"),this._state.cancel(r),this._state.setStateAtTime("started",r),this.log("restart",r),this.restart(r,t,s);else if(this.log("start",r),this._state.setStateAtTime("started",r),this._synced){const i=this._state.get(r);i&&(i.offset=this.toSeconds(Pr(t,0)),i.duration=s?this.toSeconds(s):void 0);const o=this.context.transport.schedule(a=>{this._start(a,t,s)},r);this._scheduled.push(o),this.context.transport.state==="started"&&this.context.transport.getSecondsAtTime(this.immediate())>r&&this._syncedStart(this.now(),this.context.transport.seconds)}else jm(this.context),this._start(r,t,s);return this}stop(e){let t=Ut(e)&&this._synced?this.context.transport.seconds:this.toSeconds(e);if(t=this._clampToCurrentTime(t),this._state.getValueAtTime(t)==="started"||ve(this._state.getNextState("started",t))){if(this.log("stop",t),!this._synced)this._stop(t);else{const s=this.context.transport.schedule(this._stop.bind(this),t);this._scheduled.push(s)}this._state.cancel(t),this._state.setStateAtTime("stopped",t)}return this}restart(e,t,s){return e=this.toSeconds(e),this._state.getValueAtTime(e)==="started"&&(this._state.cancel(e),this._restart(e,t,s)),this}sync(){return this._synced||(this._synced=!0,this._syncedStart=(e,t)=>{if(Vr(t,0)){const s=this._state.get(t);if(s&&s.state==="started"&&s.time!==t){const r=t-this.toSeconds(s.time);let i;s.duration&&(i=this.toSeconds(s.duration)-r),this._start(e,this.toSeconds(s.offset)+r,i)}}},this._syncedStop=e=>{const t=this.context.transport.getSecondsAtTime(Math.max(e-this.sampleTime,0));this._state.getValueAtTime(t)==="started"&&this._stop(e)},this.context.transport.on("start",this._syncedStart),this.context.transport.on("loopStart",this._syncedStart),this.context.transport.on("stop",this._syncedStop),this.context.transport.on("pause",this._syncedStop),this.context.transport.on("loopEnd",this._syncedStop)),this}unsync(){return this._synced&&(this.context.transport.off("stop",this._syncedStop),this.context.transport.off("pause",this._syncedStop),this.context.transport.off("loopEnd",this._syncedStop),this.context.transport.off("start",this._syncedStart),this.context.transport.off("loopStart",this._syncedStart)),this._synced=!1,this._scheduled.forEach(e=>this.context.transport.clear(e)),this._scheduled=[],this._state.cancel(0),this._stop(0),this}dispose(){return super.dispose(),this.onstop=Ce,this.unsync(),this._volume.dispose(),this._state.dispose(),this}}class Ur extends zr{constructor(){super(Z(Ur.getDefaults(),arguments,["url","onload"])),this.name="ToneBufferSource",this._source=this.context.createBufferSource(),this._internalChannels=[this._source],this._sourceStarted=!1,this._sourceStopped=!1;const e=Z(Ur.getDefaults(),arguments,["url","onload"]);ws(this._source,this._gainNode),this._source.onended=()=>this._stopSource(),this.playbackRate=new Oe({context:this.context,param:this._source.playbackRate,units:"positive",value:e.playbackRate}),this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this._buffer=new Se(e.url,e.onload,e.onerror),this._internalChannels.push(this._source)}static getDefaults(){return Object.assign(zr.getDefaults(),{url:new Se,loop:!1,loopEnd:0,loopStart:0,onload:Ce,onerror:Ce,playbackRate:1})}get fadeIn(){return this._fadeIn}set fadeIn(e){this._fadeIn=e}get fadeOut(){return this._fadeOut}set fadeOut(e){this._fadeOut=e}get curve(){return this._curve}set curve(e){this._curve=e}start(e,t,s,r=1){me(this.buffer.loaded,"buffer is either not set or not loaded");const i=this.toSeconds(e);this._startGain(i,r),this.loop?t=Pr(t,this.loopStart):t=Pr(t,0);let o=Math.max(this.toSeconds(t),0);if(this.loop){const a=this.toSeconds(this.loopEnd)||this.buffer.duration,c=this.toSeconds(this.loopStart),l=a-c;Bl(o,a)&&(o=(o-c)%l+c),rn(o,this.buffer.duration)&&(o=0)}if(this._source.buffer=this.buffer.get(),this._source.loopEnd=this.toSeconds(this.loopEnd)||this.buffer.duration,$a(o,this.buffer.duration)&&(this._sourceStarted=!0,this._source.start(i,o)),ve(s)){let a=this.toSeconds(s);a=Math.max(a,0),this.stop(i+a)}return this}_stopSource(e){!this._sourceStopped&&this._sourceStarted&&(this._sourceStopped=!0,this._source.stop(this.toSeconds(e)),this._onended())}get loopStart(){return this._source.loopStart}set loopStart(e){this._source.loopStart=this.toSeconds(e)}get loopEnd(){return this._source.loopEnd}set loopEnd(e){this._source.loopEnd=this.toSeconds(e)}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._source.loop}set loop(e){this._source.loop=e,this._sourceStarted&&this.cancelStop()}dispose(){return super.dispose(),this._source.onended=null,this._source.disconnect(),this._buffer.dispose(),this.playbackRate.dispose(),this}}class Xi extends gt{constructor(){super(Z(Xi.getDefaults(),arguments,["type"])),this.name="Noise",this._source=null;const e=Z(Xi.getDefaults(),arguments,["type"]);this._playbackRate=e.playbackRate,this.type=e.type,this._fadeIn=e.fadeIn,this._fadeOut=e.fadeOut}static getDefaults(){return Object.assign(gt.getDefaults(),{fadeIn:0,fadeOut:0,playbackRate:1,type:"white"})}get type(){return this._type}set type(e){if(me(e in Sf,"Noise: invalid type: "+e),this._type!==e&&(this._type=e,this.state==="started")){const t=this.now();this._stop(t),this._start(t)}}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e,this._source&&(this._source.playbackRate.value=e)}_start(e){const t=Sf[this._type];this._source=new Ur({url:t,context:this.context,fadeIn:this._fadeIn,fadeOut:this._fadeOut,loop:!0,onended:()=>this.onstop(this),playbackRate:this._playbackRate}).connect(this.output),this._source.start(this.toSeconds(e),Math.random()*(t.duration-.001))}_stop(e){this._source&&(this._source.stop(this.toSeconds(e)),this._source=null)}get fadeIn(){return this._fadeIn}set fadeIn(e){this._fadeIn=e,this._source&&(this._source.fadeIn=this._fadeIn)}get fadeOut(){return this._fadeOut}set fadeOut(e){this._fadeOut=e,this._source&&(this._source.fadeOut=this._fadeOut)}_restart(e){this._stop(e),this._start(e)}dispose(){return super.dispose(),this._source&&this._source.disconnect(),this}}const _r=44100*5,el=2,$n={brown:null,pink:null,white:null},Sf={get brown(){if(!$n.brown){const n=[];for(let e=0;ethis.onstop(this)});this._oscillator=s,this._wave?this._oscillator.setPeriodicWave(this._wave):this._oscillator.type=this._type,this._oscillator.connect(this.output),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.start(t)}_stop(e){const t=this.toSeconds(e);this._oscillator&&this._oscillator.stop(t)}_restart(e){const t=this.toSeconds(e);return this.log("restart",t),this._oscillator&&this._oscillator.cancelStop(),this._state.cancel(t),this}syncFrequency(){return this.context.transport.syncSignal(this.frequency),this}unsyncFrequency(){return this.context.transport.unsyncSignal(this.frequency),this}_getCachedPeriodicWave(){if(this._type==="custom")return nt._periodicWaveCache.find(t=>t.phase===this._phase&&$A(t.partials,this._partials));{const e=nt._periodicWaveCache.find(t=>t.type===this._type&&t.phase===this._phase);return this._partialCount=e?e.partialCount:this._partialCount,e}}get type(){return this._type}set type(e){this._type=e;const t=["sine","square","sawtooth","triangle"].indexOf(e)!==-1;if(this._phase===0&&t)this._wave=void 0,this._partialCount=0,this._oscillator!==null&&(this._oscillator.type=e);else{const s=this._getCachedPeriodicWave();if(ve(s)){const{partials:r,wave:i}=s;this._wave=i,this._partials=r,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave)}else{const[r,i]=this._getRealImaginary(e,this._phase),o=this.context.createPeriodicWave(r,i);this._wave=o,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave),nt._periodicWaveCache.push({imag:i,partialCount:this._partialCount,partials:this._partials,phase:this._phase,real:r,type:this._type,wave:this._wave}),nt._periodicWaveCache.length>100&&nt._periodicWaveCache.shift()}}}get baseType(){return this._type.replace(this.partialCount.toString(),"")}set baseType(e){this.partialCount&&this._type!=="custom"&&e!=="custom"?this.type=e+this.partialCount:this.type=e}get partialCount(){return this._partialCount}set partialCount(e){dn(e,0);let t=this._type;const s=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(this._type);if(s&&(t=s[1]),this._type!=="custom")e===0?this.type=t:this.type=t+e.toString();else{const r=new Float32Array(e);this._partials.forEach((i,o)=>r[o]=i),this._partials=Array.from(r),this.type=this._type}}_getRealImaginary(e,t){let r=2048;const i=new Float32Array(r),o=new Float32Array(r);let a=1;if(e==="custom"){if(a=this._partials.length+1,this._partialCount=this._partials.length,r=a,this._partials.length===0)return[i,o]}else{const c=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(e);c?(a=parseInt(c[2],10)+1,this._partialCount=parseInt(c[2],10),e=c[1],a=Math.max(a,2),r=a):this._partialCount=0,this._partials=[]}for(let c=1;c>1&1?-1:1):u=0,this._partials[c-1]=u;break;case"custom":u=this._partials[c-1];break;default:throw new TypeError("Oscillator: invalid type: "+e)}u!==0?(i[c]=-u*Math.sin(t*c),o[c]=u*Math.cos(t*c)):(i[c]=0,o[c]=0)}return[i,o]}_inverseFFT(e,t,s){let r=0;const i=e.length;for(let o=0;o(e+1)/2}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Es extends Fe{constructor(){super(Object.assign(Z(Es.getDefaults(),arguments,["value"]))),this.name="Multiply",this.override=!1;const e=Z(Es.getDefaults(),arguments,["value"]);this._mult=this.input=this.output=new Ne({context:this.context,minValue:e.minValue,maxValue:e.maxValue}),this.factor=this._param=this._mult.gain,this.factor.setValueAtTime(e.value,0)}static getDefaults(){return Object.assign(Fe.getDefaults(),{value:0})}dispose(){return super.dispose(),this._mult.dispose(),this}}class Zi extends gt{constructor(){super(Z(Zi.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="AMOscillator",this._modulationScale=new sP({context:this.context}),this._modulationNode=new Ne({context:this.context});const e=Z(Zi.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new nt({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase,type:e.type}),this.frequency=this._carrier.frequency,this.detune=this._carrier.detune,this._modulator=new nt({context:this.context,phase:e.phase,type:e.modulationType}),this.harmonicity=new Es({context:this.context,units:"positive",value:e.harmonicity}),this.frequency.chain(this.harmonicity,this._modulator.frequency),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),je(this,["frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(nt.getDefaults(),{harmonicity:1,modulationType:"square"})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){this._modulator.restart(e),this._carrier.restart(e)}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return ar(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this._modulationScale.dispose(),this}}class Ki extends gt{constructor(){super(Z(Ki.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="FMOscillator",this._modulationNode=new Ne({context:this.context,gain:0});const e=Z(Ki.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new nt({context:this.context,detune:e.detune,frequency:0,onstop:()=>this.onstop(this),phase:e.phase,type:e.type}),this.detune=this._carrier.detune,this.frequency=new Fe({context:this.context,units:"frequency",value:e.frequency}),this._modulator=new nt({context:this.context,phase:e.phase,type:e.modulationType}),this.harmonicity=new Es({context:this.context,units:"positive",value:e.harmonicity}),this.modulationIndex=new Es({context:this.context,units:"positive",value:e.modulationIndex}),this.frequency.connect(this._carrier.frequency),this.frequency.chain(this.harmonicity,this._modulator.frequency),this.frequency.chain(this.modulationIndex,this._modulationNode),this._modulator.connect(this._modulationNode.gain),this._modulationNode.connect(this._carrier.frequency),this._carrier.connect(this.output),this.detune.connect(this._modulator.detune),je(this,["modulationIndex","frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(nt.getDefaults(),{harmonicity:1,modulationIndex:2,modulationType:"square"})}_start(e){this._modulator.start(e),this._carrier.start(e)}_stop(e){this._modulator.stop(e),this._carrier.stop(e)}_restart(e){return this._modulator.restart(e),this._carrier.restart(e),this}get type(){return this._carrier.type}set type(e){this._carrier.type=e}get baseType(){return this._carrier.baseType}set baseType(e){this._carrier.baseType=e}get partialCount(){return this._carrier.partialCount}set partialCount(e){this._carrier.partialCount=e}get modulationType(){return this._modulator.type}set modulationType(e){this._modulator.type=e}get phase(){return this._carrier.phase}set phase(e){this._carrier.phase=e,this._modulator.phase=e}get partials(){return this._carrier.partials}set partials(e){this._carrier.partials=e}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return ar(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this.modulationIndex.dispose(),this}}class Br extends gt{constructor(){super(Z(Br.getDefaults(),arguments,["frequency","width"])),this.name="PulseOscillator",this._widthGate=new Ne({context:this.context,gain:0}),this._thresh=new Js({context:this.context,mapping:t=>t<=0?-1:1});const e=Z(Br.getDefaults(),arguments,["frequency","width"]);this.width=new Fe({context:this.context,units:"audioRange",value:e.width}),this._triangle=new nt({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase,type:"triangle"}),this.frequency=this._triangle.frequency,this.detune=this._triangle.detune,this._triangle.chain(this._thresh,this.output),this.width.chain(this._widthGate,this._thresh),je(this,["width","frequency","detune"])}static getDefaults(){return Object.assign(gt.getDefaults(),{detune:0,frequency:440,phase:0,type:"pulse",width:.2})}_start(e){e=this.toSeconds(e),this._triangle.start(e),this._widthGate.gain.setValueAtTime(1,e)}_stop(e){e=this.toSeconds(e),this._triangle.stop(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(0,e)}_restart(e){this._triangle.restart(e),this._widthGate.gain.cancelScheduledValues(e),this._widthGate.gain.setValueAtTime(1,e)}get phase(){return this._triangle.phase}set phase(e){this._triangle.phase=e}get type(){return"pulse"}get baseType(){return"pulse"}get partials(){return[]}get partialCount(){return 0}set carrierType(e){this._triangle.type=e}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return ar(this,e)})}dispose(){return super.dispose(),this._triangle.dispose(),this.width.dispose(),this._widthGate.dispose(),this._thresh.dispose(),this}}class Qi extends gt{constructor(){super(Z(Qi.getDefaults(),arguments,["frequency","type","spread"])),this.name="FatOscillator",this._oscillators=[];const e=Z(Qi.getDefaults(),arguments,["frequency","type","spread"]);this.frequency=new Fe({context:this.context,units:"frequency",value:e.frequency}),this.detune=new Fe({context:this.context,units:"cents",value:e.detune}),this._spread=e.spread,this._type=e.type,this._phase=e.phase,this._partials=e.partials,this._partialCount=e.partialCount,this.count=e.count,je(this,["frequency","detune"])}static getDefaults(){return Object.assign(nt.getDefaults(),{count:3,spread:20,type:"sawtooth"})}_start(e){e=this.toSeconds(e),this._forEach(t=>t.start(e))}_stop(e){e=this.toSeconds(e),this._forEach(t=>t.stop(e))}_restart(e){this._forEach(t=>t.restart(e))}_forEach(e){for(let t=0;tt.type=e)}get spread(){return this._spread}set spread(e){if(this._spread=e,this._oscillators.length>1){const t=-e/2,s=e/(this._oscillators.length-1);this._forEach((r,i)=>r.detune.value=t+s*i)}}get count(){return this._oscillators.length}set count(e){if(dn(e,1),this._oscillators.length!==e){this._forEach(t=>t.dispose()),this._oscillators=[];for(let t=0;tthis.onstop(this):Ce});this.type==="custom"&&(s.partials=this._partials),this.frequency.connect(s.frequency),this.detune.connect(s.detune),s.detune.overridden=!1,s.connect(this.output),this._oscillators[t]=s}this.spread=this._spread,this.state==="started"&&this._forEach(t=>t.start())}}get phase(){return this._phase}set phase(e){this._phase=e,this._forEach((t,s)=>t.phase=this._phase+s/this.count*360)}get baseType(){return this._oscillators[0].baseType}set baseType(e){this._forEach(t=>t.baseType=e),this._type=this._oscillators[0].type}get partials(){return this._oscillators[0].partials}set partials(e){this._partials=e,this._partialCount=this._partials.length,e.length&&(this._type="custom",this._forEach(t=>t.partials=e))}get partialCount(){return this._oscillators[0].partialCount}set partialCount(e){this._partialCount=e,this._forEach(t=>t.partialCount=e),this._type=this._oscillators[0].type}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return ar(this,e)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this._forEach(e=>e.dispose()),this}}class Ji extends gt{constructor(){super(Z(Ji.getDefaults(),arguments,["frequency","modulationFrequency"])),this.name="PWMOscillator",this.sourceType="pwm",this._scale=new Es({context:this.context,value:2});const e=Z(Ji.getDefaults(),arguments,["frequency","modulationFrequency"]);this._pulse=new Br({context:this.context,frequency:e.modulationFrequency}),this._pulse.carrierType="sine",this.modulationFrequency=this._pulse.frequency,this._modulator=new nt({context:this.context,detune:e.detune,frequency:e.frequency,onstop:()=>this.onstop(this),phase:e.phase}),this.frequency=this._modulator.frequency,this.detune=this._modulator.detune,this._modulator.chain(this._scale,this._pulse.width),this._pulse.connect(this.output),je(this,["modulationFrequency","frequency","detune"])}static getDefaults(){return Object.assign(gt.getDefaults(),{detune:0,frequency:440,modulationFrequency:.4,phase:0,type:"pwm"})}_start(e){e=this.toSeconds(e),this._modulator.start(e),this._pulse.start(e)}_stop(e){e=this.toSeconds(e),this._modulator.stop(e),this._pulse.stop(e)}_restart(e){this._modulator.restart(e),this._pulse.restart(e)}get type(){return"pwm"}get baseType(){return"pwm"}get partials(){return[]}get partialCount(){return 0}get phase(){return this._modulator.phase}set phase(e){this._modulator.phase=e}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return ar(this,e)})}dispose(){return super.dispose(),this._pulse.dispose(),this._scale.dispose(),this._modulator.dispose(),this}}const Of={am:Zi,fat:Qi,fm:Ki,oscillator:nt,pulse:Br,pwm:Ji};class er extends gt{constructor(){super(Z(er.getDefaults(),arguments,["frequency","type"])),this.name="OmniOscillator";const e=Z(er.getDefaults(),arguments,["frequency","type"]);this.frequency=new Fe({context:this.context,units:"frequency",value:e.frequency}),this.detune=new Fe({context:this.context,units:"cents",value:e.detune}),je(this,["frequency","detune"]),this.set(e)}static getDefaults(){return Object.assign(nt.getDefaults(),Ki.getDefaults(),Zi.getDefaults(),Qi.getDefaults(),Br.getDefaults(),Ji.getDefaults())}_start(e){this._oscillator.start(e)}_stop(e){this._oscillator.stop(e)}_restart(e){return this._oscillator.restart(e),this}get type(){let e="";return["am","fm","fat"].some(t=>this._sourceType===t)&&(e=this._sourceType),e+this._oscillator.type}set type(e){e.substr(0,2)==="fm"?(this._createNewOscillator("fm"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):e.substr(0,2)==="am"?(this._createNewOscillator("am"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(2)):e.substr(0,3)==="fat"?(this._createNewOscillator("fat"),this._oscillator=this._oscillator,this._oscillator.type=e.substr(3)):e==="pwm"?(this._createNewOscillator("pwm"),this._oscillator=this._oscillator):e==="pulse"?this._createNewOscillator("pulse"):(this._createNewOscillator("oscillator"),this._oscillator=this._oscillator,this._oscillator.type=e)}get partials(){return this._oscillator.partials}set partials(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partials=e)}get partialCount(){return this._oscillator.partialCount}set partialCount(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partialCount=e)}set(e){return Reflect.has(e,"type")&&e.type&&(this.type=e.type),super.set(e),this}_createNewOscillator(e){if(e!==this._sourceType){this._sourceType=e;const t=Of[e],s=this.now();if(this._oscillator){const r=this._oscillator;r.stop(s),this.context.setTimeout(()=>r.dispose(),this.blockTime)}this._oscillator=new t({context:this.context}),this.frequency.connect(this._oscillator.frequency),this.detune.connect(this._oscillator.detune),this._oscillator.connect(this.output),this._oscillator.onstop=()=>this.onstop(this),this.state==="started"&&this._oscillator.start(s)}}get phase(){return this._oscillator.phase}set phase(e){this._oscillator.phase=e}get sourceType(){return this._sourceType}set sourceType(e){let t="sine";this._oscillator.type!=="pwm"&&this._oscillator.type!=="pulse"&&(t=this._oscillator.type),e==="fm"?this.type="fm"+t:e==="am"?this.type="am"+t:e==="fat"?this.type="fat"+t:e==="oscillator"?this.type=t:e==="pulse"?this.type="pulse":e==="pwm"&&(this.type="pwm")}_getOscType(e,t){return e instanceof Of[t]}get baseType(){return this._oscillator.baseType}set baseType(e){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&e!=="pulse"&&e!=="pwm"&&(this._oscillator.baseType=e)}get width(){if(this._getOscType(this._oscillator,"pulse"))return this._oscillator.width}get count(){if(this._getOscType(this._oscillator,"fat"))return this._oscillator.count}set count(e){this._getOscType(this._oscillator,"fat")&&xs(e)&&(this._oscillator.count=e)}get spread(){if(this._getOscType(this._oscillator,"fat"))return this._oscillator.spread}set spread(e){this._getOscType(this._oscillator,"fat")&&xs(e)&&(this._oscillator.spread=e)}get modulationType(){if(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))return this._oscillator.modulationType}set modulationType(e){(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))&&Yn(e)&&(this._oscillator.modulationType=e)}get modulationIndex(){if(this._getOscType(this._oscillator,"fm"))return this._oscillator.modulationIndex}get harmonicity(){if(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))return this._oscillator.harmonicity}get modulationFrequency(){if(this._getOscType(this._oscillator,"pwm"))return this._oscillator.modulationFrequency}asArray(e=1024){return Ie(this,void 0,void 0,function*(){return ar(this,e)})}dispose(){return super.dispose(),this.detune.dispose(),this.frequency.dispose(),this._oscillator.dispose(),this}}class ah extends Fe{constructor(){super(Object.assign(Z(ah.getDefaults(),arguments,["value"]))),this.override=!1,this.name="Add",this._sum=new Ne({context:this.context}),this.input=this._sum,this.output=this._sum,this.addend=this._param,qi(this._constantSource,this._sum)}static getDefaults(){return Object.assign(Fe.getDefaults(),{value:0})}dispose(){return super.dispose(),this._sum.dispose(),this}}class Ua extends Gn{constructor(){super(Object.assign(Z(Ua.getDefaults(),arguments,["min","max"]))),this.name="Scale";const e=Z(Ua.getDefaults(),arguments,["min","max"]);this._mult=this.input=new Es({context:this.context,value:e.max-e.min}),this._add=this.output=new ah({context:this.context,value:e.min}),this._min=e.min,this._max=e.max,this.input.connect(this.output)}static getDefaults(){return Object.assign(Gn.getDefaults(),{max:1,min:0})}get min(){return this._min}set min(e){this._min=e,this._setRange()}get max(){return this._max}set max(e){this._max=e,this._setRange()}_setRange(){this._add.value=this._min,this._mult.value=this._max-this._min}dispose(){return super.dispose(),this._add.dispose(),this._mult.dispose(),this}}function Zm(n,e=1/0){const t=new WeakMap;return function(s,r){Reflect.defineProperty(s,r,{configurable:!0,enumerable:!0,get:function(){return t.get(this)},set:function(i){dn(i,n,e),t.set(this,i)}})}}function rs(n,e=1/0){const t=new WeakMap;return function(s,r){Reflect.defineProperty(s,r,{configurable:!0,enumerable:!0,get:function(){return t.get(this)},set:function(i){dn(this.toSeconds(i),n,e),t.set(this,i)}})}}class eo extends gt{constructor(){super(Z(eo.getDefaults(),arguments,["url","onload"])),this.name="Player",this._activeSources=new Set;const e=Z(eo.getDefaults(),arguments,["url","onload"]);this._buffer=new Se({onload:this._onload.bind(this,e.onload),onerror:e.onerror,reverse:e.reverse,url:e.url}),this.autostart=e.autostart,this._loop=e.loop,this._loopStart=e.loopStart,this._loopEnd=e.loopEnd,this._playbackRate=e.playbackRate,this.fadeIn=e.fadeIn,this.fadeOut=e.fadeOut}static getDefaults(){return Object.assign(gt.getDefaults(),{autostart:!1,fadeIn:0,fadeOut:0,loop:!1,loopEnd:0,loopStart:0,onload:Ce,onerror:Ce,playbackRate:1,reverse:!1})}load(e){return Ie(this,void 0,void 0,function*(){return yield this._buffer.load(e),this._onload(),this})}_onload(e=Ce){e(),this.autostart&&this.start()}_onSourceEnd(e){this.onstop(this),this._activeSources.delete(e),this._activeSources.size===0&&!this._synced&&this._state.getValueAtTime(this.now())==="started"&&(this._state.cancel(this.now()),this._state.setStateAtTime("stopped",this.now()))}start(e,t,s){return super.start(e,t,s),this}_start(e,t,s){this._loop?t=Pr(t,this._loopStart):t=Pr(t,0);const r=this.toSeconds(t),i=s;s=Pr(s,Math.max(this._buffer.duration-r,0));let o=this.toSeconds(s);o=o/this._playbackRate,e=this.toSeconds(e);const a=new Ur({url:this._buffer,context:this.context,fadeIn:this.fadeIn,fadeOut:this.fadeOut,loop:this._loop,loopEnd:this._loopEnd,loopStart:this._loopStart,onended:this._onSourceEnd.bind(this),playbackRate:this._playbackRate}).connect(this.output);!this._loop&&!this._synced&&(this._state.cancel(e+o),this._state.setStateAtTime("stopped",e+o,{implicitEnd:!0})),this._activeSources.add(a),this._loop&&Ut(i)?a.start(e,r):a.start(e,r,o-this.toSeconds(this.fadeOut))}_stop(e){const t=this.toSeconds(e);this._activeSources.forEach(s=>s.stop(t))}restart(e,t,s){return super.restart(e,t,s),this}_restart(e,t,s){var r;(r=[...this._activeSources].pop())===null||r===void 0||r.stop(e),this._start(e,t,s)}seek(e,t){const s=this.toSeconds(t);if(this._state.getValueAtTime(s)==="started"){const r=this.toSeconds(e);this._stop(s),this._start(s,r)}return this}setLoopPoints(e,t){return this.loopStart=e,this.loopEnd=t,this}get loopStart(){return this._loopStart}set loopStart(e){this._loopStart=e,this.buffer.loaded&&dn(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach(t=>{t.loopStart=e})}get loopEnd(){return this._loopEnd}set loopEnd(e){this._loopEnd=e,this.buffer.loaded&&dn(this.toSeconds(e),0,this.buffer.duration),this._activeSources.forEach(t=>{t.loopEnd=e})}get buffer(){return this._buffer}set buffer(e){this._buffer.set(e)}get loop(){return this._loop}set loop(e){if(this._loop!==e&&(this._loop=e,this._activeSources.forEach(t=>{t.loop=e}),e)){const t=this._state.getNextState("stopped",this.now());t&&this._state.cancel(t.time)}}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e;const t=this.now(),s=this._state.getNextState("stopped",t);s&&s.implicitEnd&&(this._state.cancel(s.time),this._activeSources.forEach(r=>r.cancelStop())),this._activeSources.forEach(r=>{r.playbackRate.setValueAtTime(e,t)})}get reverse(){return this._buffer.reverse}set reverse(e){this._buffer.reverse=e}get loaded(){return this._buffer.loaded}dispose(){return super.dispose(),this._activeSources.forEach(e=>e.dispose()),this._activeSources.clear(),this._buffer.dispose(),this}}pn([rs(0)],eo.prototype,"fadeIn",void 0);pn([rs(0)],eo.prototype,"fadeOut",void 0);class rP extends Gn{constructor(){super(...arguments),this.name="GainToAudio",this._norm=new Js({context:this.context,mapping:e=>Math.abs(e)*2-1}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Jt extends ue{constructor(){super(Z(Jt.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="Envelope",this._sig=new Fe({context:this.context,value:0}),this.output=this._sig,this.input=void 0;const e=Z(Jt.getDefaults(),arguments,["attack","decay","sustain","release"]);this.attack=e.attack,this.decay=e.decay,this.sustain=e.sustain,this.release=e.release,this.attackCurve=e.attackCurve,this.releaseCurve=e.releaseCurve,this.decayCurve=e.decayCurve}static getDefaults(){return Object.assign(ue.getDefaults(),{attack:.01,attackCurve:"linear",decay:.1,decayCurve:"exponential",release:1,releaseCurve:"exponential",sustain:.5})}get value(){return this.getValueAtTime(this.now())}_getCurve(e,t){if(Yn(e))return e;{let s;for(s in ea)if(ea[s][t]===e)return s;return e}}_setCurve(e,t,s){if(Yn(s)&&Reflect.has(ea,s)){const r=ea[s];Bs(r)?e!=="_decayCurve"&&(this[e]=r[t]):this[e]=r}else if(ln(s)&&e!=="_decayCurve")this[e]=s;else throw new Error("Envelope: invalid curve: "+s)}get attackCurve(){return this._getCurve(this._attackCurve,"In")}set attackCurve(e){this._setCurve("_attackCurve","In",e)}get releaseCurve(){return this._getCurve(this._releaseCurve,"Out")}set releaseCurve(e){this._setCurve("_releaseCurve","Out",e)}get decayCurve(){return this._getCurve(this._decayCurve,"Out")}set decayCurve(e){this._setCurve("_decayCurve","Out",e)}triggerAttack(e,t=1){this.log("triggerAttack",e,t),e=this.toSeconds(e);let r=this.toSeconds(this.attack);const i=this.toSeconds(this.decay),o=this.getValueAtTime(e);if(o>0){const a=1/r;r=(1-o)/a}if(r0){const s=this.toSeconds(this.release);s{let e,t;const s=[];for(e=0;e<128;e++)s[e]=Math.sin(e/(128-1)*(Math.PI/2));const r=[],i=6.4;for(e=0;e<128-1;e++){t=e/(128-1);const d=Math.sin(t*(Math.PI*2)*i-Math.PI/2)+1;r[e]=d/10+t*.83}r[128-1]=1;const o=[],a=5;for(e=0;e<128;e++)o[e]=Math.ceil(e/(128-1)*a)/a;const c=[];for(e=0;e<128;e++)t=e/(128-1),c[e]=.5*(1-Math.cos(Math.PI*t));const l=[];for(e=0;e<128;e++){t=e/(128-1);const d=Math.pow(t,3)*4+.2,f=Math.cos(d*Math.PI*2*t);l[e]=Math.abs(f*(1-t))}function u(d){const f=new Array(d.length);for(let m=0;mthis._original_triggerRelease(t);const e=Z(tr.getDefaults(),arguments);this._volume=this.output=new ks({context:this.context,volume:e.volume}),this.volume=this._volume.volume,je(this,"volume")}static getDefaults(){return Object.assign(ue.getDefaults(),{volume:0})}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",0),this.context.transport.on("stop",this._syncedRelease),this.context.transport.on("pause",this._syncedRelease),this.context.transport.on("loopEnd",this._syncedRelease)),this}_syncState(){let e=!1;return this._synced||(this._synced=!0,e=!0),e}_syncMethod(e,t){const s=this["_original_"+e]=this[e];this[e]=(...r)=>{const i=r[t],o=this.context.transport.schedule(a=>{r[t]=a,s.apply(this,r)},i);this._scheduledEvents.push(o)}}unsync(){return this._scheduledEvents.forEach(e=>this.context.transport.clear(e)),this._scheduledEvents=[],this._synced&&(this._synced=!1,this.triggerAttack=this._original_triggerAttack,this.triggerRelease=this._original_triggerRelease,this.context.transport.off("stop",this._syncedRelease),this.context.transport.off("pause",this._syncedRelease),this.context.transport.off("loopEnd",this._syncedRelease)),this}triggerAttackRelease(e,t,s,r){const i=this.toSeconds(s),o=this.toSeconds(t);return this.triggerAttack(e,i,r),this.triggerRelease(i+o),this}dispose(){return super.dispose(),this._volume.dispose(),this.unsync(),this._scheduledEvents=[],this}}class Xn extends tr{constructor(){super(Z(Xn.getDefaults(),arguments));const e=Z(Xn.getDefaults(),arguments);this.portamento=e.portamento,this.onsilence=e.onsilence}static getDefaults(){return Object.assign(tr.getDefaults(),{detune:0,onsilence:Ce,portamento:0})}triggerAttack(e,t,s=1){this.log("triggerAttack",e,t,s);const r=this.toSeconds(t);return this._triggerEnvelopeAttack(r,s),this.setNote(e,r),this}triggerRelease(e){this.log("triggerRelease",e);const t=this.toSeconds(e);return this._triggerEnvelopeRelease(t),this}setNote(e,t){const s=this.toSeconds(t),r=e instanceof Xt?e.toFrequency():e;if(this.portamento>0&&this.getLevelAtTime(s)>.05){const i=this.toSeconds(this.portamento);this.frequency.exponentialRampTo(r,i,s)}else this.frequency.setValueAtTime(r,s);return this}}pn([rs(0)],Xn.prototype,"portamento",void 0);class xc extends Jt{constructor(){super(Z(xc.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="AmplitudeEnvelope",this._gainNode=new Ne({context:this.context,gain:0}),this.output=this._gainNode,this.input=this._gainNode,this._sig.connect(this._gainNode.gain),this.output=this._gainNode,this.input=this._gainNode}dispose(){return super.dispose(),this._gainNode.dispose(),this}}class to extends Xn{constructor(){super(Z(to.getDefaults(),arguments)),this.name="Synth";const e=Z(to.getDefaults(),arguments);this.oscillator=new er(Object.assign({context:this.context,detune:e.detune,onstop:()=>this.onsilence(this)},e.oscillator)),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.envelope=new xc(Object.assign({context:this.context},e.envelope)),this.oscillator.chain(this.envelope,this.output),je(this,["oscillator","frequency","detune","envelope"])}static getDefaults(){return Object.assign(Xn.getDefaults(),{envelope:Object.assign(kr(Jt.getDefaults(),Object.keys(ue.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.3}),oscillator:Object.assign(kr(er.getDefaults(),[...Object.keys(gt.getDefaults()),"frequency","detune"]),{type:"triangle"})})}_triggerEnvelopeAttack(e,t){if(this.envelope.triggerAttack(e,t),this.oscillator.start(e),this.envelope.sustain===0){const s=this.toSeconds(this.envelope.attack),r=this.toSeconds(this.envelope.decay);this.oscillator.stop(e+s+r)}}_triggerEnvelopeRelease(e){this.envelope.triggerRelease(e),this.oscillator.stop(e+this.toSeconds(this.envelope.release))}getLevelAtTime(e){return e=this.toSeconds(e),this.envelope.getValueAtTime(e)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this}}class no extends ue{constructor(){super(Z(no.getDefaults(),arguments,["frequency","type"])),this.name="BiquadFilter";const e=Z(no.getDefaults(),arguments,["frequency","type"]);this._filter=this.context.createBiquadFilter(),this.input=this.output=this._filter,this.Q=new Oe({context:this.context,units:"number",value:e.Q,param:this._filter.Q}),this.frequency=new Oe({context:this.context,units:"frequency",value:e.frequency,param:this._filter.frequency}),this.detune=new Oe({context:this.context,units:"cents",value:e.detune,param:this._filter.detune}),this.gain=new Oe({context:this.context,units:"decibels",convert:!1,value:e.gain,param:this._filter.gain}),this.type=e.type}static getDefaults(){return Object.assign(ue.getDefaults(),{Q:1,type:"lowpass",frequency:350,detune:0,gain:0})}get type(){return this._filter.type}set type(e){me(["lowpass","highpass","bandpass","lowshelf","highshelf","notch","allpass","peaking"].indexOf(e)!==-1,`Invalid filter type: ${e}`),this._filter.type=e}getFrequencyResponse(e=128){const t=new Float32Array(e);for(let o=0;os.type=e)}get rolloff(){return this._rolloff}set rolloff(e){const t=xs(e)?e:parseInt(e,10),s=[-12,-24,-48,-96];let r=s.indexOf(t);me(r!==-1,`rolloff can only be ${s.join(", ")}`),r+=1,this._rolloff=t,this.input.disconnect(),this._filters.forEach(i=>i.disconnect()),this._filters=new Array(r);for(let i=0;i1);return this._filters.forEach(()=>{t.getFrequencyResponse(e).forEach((i,o)=>s[o]*=i)}),t.dispose(),s}dispose(){return super.dispose(),this._filters.forEach(e=>{e.dispose()}),th(this,["detune","frequency","gain","Q"]),this.frequency.dispose(),this.Q.dispose(),this.detune.dispose(),this.gain.dispose(),this}}class so extends Jt{constructor(){super(Z(so.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="FrequencyEnvelope";const e=Z(so.getDefaults(),arguments,["attack","decay","sustain","release"]);this._octaves=e.octaves,this._baseFrequency=this.toFrequency(e.baseFrequency),this._exponent=this.input=new Yi({context:this.context,value:e.exponent}),this._scale=this.output=new Ua({context:this.context,min:this._baseFrequency,max:this._baseFrequency*Math.pow(2,this._octaves)}),this._sig.chain(this._exponent,this._scale)}static getDefaults(){return Object.assign(Jt.getDefaults(),{baseFrequency:200,exponent:1,octaves:4})}get baseFrequency(){return this._baseFrequency}set baseFrequency(e){const t=this.toFrequency(e);dn(t,0),this._baseFrequency=t,this._scale.min=this._baseFrequency,this.octaves=this._octaves}get octaves(){return this._octaves}set octaves(e){this._octaves=e,this._scale.max=this._baseFrequency*Math.pow(2,e)}get exponent(){return this._exponent.value}set exponent(e){this._exponent.value=e}dispose(){return super.dispose(),this._exponent.dispose(),this._scale.dispose(),this}}class ro extends Xn{constructor(){super(Z(ro.getDefaults(),arguments)),this.name="MonoSynth";const e=Z(ro.getDefaults(),arguments);this.oscillator=new er(Object.assign(e.oscillator,{context:this.context,detune:e.detune,onstop:()=>this.onsilence(this)})),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.filter=new Wr(Object.assign(e.filter,{context:this.context})),this.filterEnvelope=new so(Object.assign(e.filterEnvelope,{context:this.context})),this.envelope=new xc(Object.assign(e.envelope,{context:this.context})),this.oscillator.chain(this.filter,this.envelope,this.output),this.filterEnvelope.connect(this.filter.frequency),je(this,["oscillator","frequency","detune","filter","filterEnvelope","envelope"])}static getDefaults(){return Object.assign(Xn.getDefaults(),{envelope:Object.assign(kr(Jt.getDefaults(),Object.keys(ue.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.9}),filter:Object.assign(kr(Wr.getDefaults(),Object.keys(ue.getDefaults())),{Q:1,rolloff:-12,type:"lowpass"}),filterEnvelope:Object.assign(kr(so.getDefaults(),Object.keys(ue.getDefaults())),{attack:.6,baseFrequency:200,decay:.2,exponent:2,octaves:3,release:2,sustain:.5}),oscillator:Object.assign(kr(er.getDefaults(),Object.keys(gt.getDefaults())),{type:"sawtooth"})})}_triggerEnvelopeAttack(e,t=1){if(this.envelope.triggerAttack(e,t),this.filterEnvelope.triggerAttack(e),this.oscillator.start(e),this.envelope.sustain===0){const s=this.toSeconds(this.envelope.attack),r=this.toSeconds(this.envelope.decay);this.oscillator.stop(e+s+r)}}_triggerEnvelopeRelease(e){this.envelope.triggerRelease(e),this.filterEnvelope.triggerRelease(e),this.oscillator.stop(e+this.toSeconds(this.envelope.release))}getLevelAtTime(e){return e=this.toSeconds(e),this.envelope.getValueAtTime(e)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this.filterEnvelope.dispose(),this.filter.dispose(),this}}class io extends to{constructor(){super(Z(io.getDefaults(),arguments)),this.name="MembraneSynth",this.portamento=0;const e=Z(io.getDefaults(),arguments);this.pitchDecay=e.pitchDecay,this.octaves=e.octaves,je(this,["oscillator","envelope"])}static getDefaults(){return Ar(Xn.getDefaults(),to.getDefaults(),{envelope:{attack:.001,attackCurve:"exponential",decay:.4,release:1.4,sustain:.01},octaves:10,oscillator:{type:"sine"},pitchDecay:.05})}setNote(e,t){const s=this.toSeconds(t),r=this.toFrequency(e instanceof Xt?e.toFrequency():e),i=r*this.octaves;return this.oscillator.frequency.setValueAtTime(i,s),this.oscillator.frequency.exponentialRampToValueAtTime(r,s+this.toSeconds(this.pitchDecay)),this}dispose(){return super.dispose(),this}}pn([Zm(0)],io.prototype,"octaves",void 0);pn([rs(0)],io.prototype,"pitchDecay",void 0);const Km=new Set;function ch(n){Km.add(n)}function Qm(n,e){const t=`registerProcessor("${n}", ${e})`;Km.add(t)}const iP=` /** * The base AudioWorkletProcessor for use in Tone.js. Works with the [[ToneAudioWorklet]]. */ @@ -233,7 +233,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho }; } } -`;lh(rP);const iP=` +`;ch(iP);const oP=` /** * Abstract class for a single input/output processor. * has a 'generate' function which processes one sample at a time @@ -300,7 +300,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return !this.disposed; } }; -`;lh(iP);const oP=` +`;ch(oP);const aP=` /** * A multichannel buffer for use within an AudioWorkletProcessor as a delay line */ @@ -344,7 +344,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return this.buffer[channel][readHead]; } } -`;lh(oP);const aP="feedback-comb-filter",cP=` +`;ch(aP);const cP="feedback-comb-filter",lP=` class FeedbackCombFilterWorklet extends SingleIOProcessor { constructor(options) { @@ -374,7 +374,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return delayedSample; } } -`;Km(aP,cP);class oo extends tr{constructor(){super(K(oo.getDefaults(),arguments,["urls","onload","baseUrl"],"urls")),this.name="Sampler",this._activeSources=new Map;const e=K(oo.getDefaults(),arguments,["urls","onload","baseUrl"],"urls"),t={};Object.keys(e.urls).forEach(s=>{const r=parseInt(s,10);if(me(Jo(s)||xs(r)&&isFinite(r),`url key is neither a note or midi pitch: ${s}`),Jo(s)){const i=new Xt(this.context,s).toMidi();t[i]=e.urls[s]}else xs(r)&&isFinite(r)&&(t[r]=e.urls[r])}),this._buffers=new oh({urls:t,onload:e.onload,baseUrl:e.baseUrl,onerror:e.onerror}),this.attack=e.attack,this.release=e.release,this.curve=e.curve,this._buffers.loaded&&Promise.resolve().then(e.onload)}static getDefaults(){return Object.assign(tr.getDefaults(),{attack:0,baseUrl:"",curve:"exponential",onload:Ce,onerror:Ce,release:.1,urls:{}})}_findClosest(e){let s=0;for(;s<96;){if(this._buffers.has(e+s))return-s;if(this._buffers.has(e-s))return s;s++}throw new Error(`No available buffers for note: ${e}`)}triggerAttack(e,t,s=1){return this.log("triggerAttack",e,t,s),Array.isArray(e)||(e=[e]),e.forEach(r=>{const i=Gm(new Xt(this.context,r).toFrequency()),o=Math.round(i),a=i-o,c=this._findClosest(o),l=o-c,u=this._buffers.get(l),h=Ym(c+a),d=new Ur({url:u,context:this.context,curve:this.curve,fadeIn:this.attack,fadeOut:this.release,playbackRate:h}).connect(this.output);d.start(t,0,u.duration/h,s),ln(this._activeSources.get(o))||this._activeSources.set(o,[]),this._activeSources.get(o).push(d),d.onended=()=>{if(this._activeSources&&this._activeSources.has(o)){const f=this._activeSources.get(o),m=f.indexOf(d);m!==-1&&f.splice(m,1)}}}),this}triggerRelease(e,t){return this.log("triggerRelease",e,t),Array.isArray(e)||(e=[e]),e.forEach(s=>{const r=new Xt(this.context,s).toMidi();if(this._activeSources.has(r)&&this._activeSources.get(r).length){const i=this._activeSources.get(r);t=this.toSeconds(t),i.forEach(o=>{o.stop(t)}),this._activeSources.set(r,[])}}),this}releaseAll(e){const t=this.toSeconds(e);return this._activeSources.forEach(s=>{for(;s.length;)s.shift().stop(t)}),this}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",1)),this}triggerAttackRelease(e,t,s,r=1){const i=this.toSeconds(s);return this.triggerAttack(e,i,r),ln(t)?(me(ln(e),"notes must be an array when duration is array"),e.forEach((o,a)=>{const c=t[Math.min(a,t.length-1)];this.triggerRelease(o,i+this.toSeconds(c))})):this.triggerRelease(e,i+this.toSeconds(t)),this}add(e,t,s){if(me(Jo(e)||isFinite(e),`note must be a pitch or midi: ${e}`),Jo(e)){const r=new Xt(this.context,e).toMidi();this._buffers.add(r,t,s)}else this._buffers.add(e,t,s);return this}get loaded(){return this._buffers.loaded}dispose(){return super.dispose(),this._buffers.dispose(),this._activeSources.forEach(e=>{e.forEach(t=>t.dispose())}),this._activeSources.clear(),this}}pn([rs(0)],oo.prototype,"attack",void 0);pn([rs(0)],oo.prototype,"release",void 0);class Ua extends ue{constructor(){super(Object.assign(K(Ua.getDefaults(),arguments,["fade"]))),this.name="CrossFade",this._panner=this.context.createStereoPanner(),this._split=this.context.createChannelSplitter(2),this._g2a=new sP({context:this.context}),this.a=new Ne({context:this.context,gain:0}),this.b=new Ne({context:this.context,gain:0}),this.output=new Ne({context:this.context}),this._internalChannels=[this.a,this.b];const e=K(Ua.getDefaults(),arguments,["fade"]);this.fade=new Fe({context:this.context,units:"normalRange",value:e.fade}),je(this,"fade"),this.context.getConstant(1).connect(this._panner),this._panner.connect(this._split),this._panner.channelCount=1,this._panner.channelCountMode="explicit",ws(this._split,this.a.gain,0),ws(this._split,this.b.gain,1),this.fade.chain(this._g2a,this._panner.pan),this.a.connect(this.output),this.b.connect(this.output)}static getDefaults(){return Object.assign(ue.getDefaults(),{fade:.5})}dispose(){return super.dispose(),this.a.dispose(),this.b.dispose(),this.output.dispose(),this.fade.dispose(),this._g2a.dispose(),this._panner.disconnect(),this._split.disconnect(),this}}class Af extends ue{constructor(e){super(e),this.name="Effect",this._dryWet=new Ua({context:this.context}),this.wet=this._dryWet.fade,this.effectSend=new Ne({context:this.context}),this.effectReturn=new Ne({context:this.context}),this.input=new Ne({context:this.context}),this.output=this._dryWet,this.input.fan(this._dryWet.a,this.effectSend),this.effectReturn.connect(this._dryWet.b),this.wet.setValueAtTime(e.wet,0),this._internalChannels=[this.effectReturn,this.effectSend],je(this,"wet")}static getDefaults(){return Object.assign(ue.getDefaults(),{wet:1})}connectEffect(e){return this._internalChannels.push(e),this.effectSend.chain(e,this.effectReturn),this}dispose(){return super.dispose(),this._dryWet.dispose(),this.effectSend.dispose(),this.effectReturn.dispose(),this.wet.dispose(),this}}class Ba extends ue{constructor(){super(Object.assign(K(Ba.getDefaults(),arguments,["pan"]))),this.name="Panner",this._panner=this.context.createStereoPanner(),this.input=this._panner,this.output=this._panner;const e=K(Ba.getDefaults(),arguments,["pan"]);this.pan=new Oe({context:this.context,param:this._panner.pan,value:e.pan,minValue:-1,maxValue:1}),this._panner.channelCount=e.channelCount,this._panner.channelCountMode="explicit",je(this,"pan")}static getDefaults(){return Object.assign(ue.getDefaults(),{pan:0,channelCount:1})}dispose(){return super.dispose(),this._panner.disconnect(),this.pan.dispose(),this}}const lP="bit-crusher",uP=` +`;Qm(cP,lP);class oo extends tr{constructor(){super(Z(oo.getDefaults(),arguments,["urls","onload","baseUrl"],"urls")),this.name="Sampler",this._activeSources=new Map;const e=Z(oo.getDefaults(),arguments,["urls","onload","baseUrl"],"urls"),t={};Object.keys(e.urls).forEach(s=>{const r=parseInt(s,10);if(me(Jo(s)||xs(r)&&isFinite(r),`url key is neither a note or midi pitch: ${s}`),Jo(s)){const i=new Xt(this.context,s).toMidi();t[i]=e.urls[s]}else xs(r)&&isFinite(r)&&(t[r]=e.urls[r])}),this._buffers=new ih({urls:t,onload:e.onload,baseUrl:e.baseUrl,onerror:e.onerror}),this.attack=e.attack,this.release=e.release,this.curve=e.curve,this._buffers.loaded&&Promise.resolve().then(e.onload)}static getDefaults(){return Object.assign(tr.getDefaults(),{attack:0,baseUrl:"",curve:"exponential",onload:Ce,onerror:Ce,release:.1,urls:{}})}_findClosest(e){let s=0;for(;s<96;){if(this._buffers.has(e+s))return-s;if(this._buffers.has(e-s))return s;s++}throw new Error(`No available buffers for note: ${e}`)}triggerAttack(e,t,s=1){return this.log("triggerAttack",e,t,s),Array.isArray(e)||(e=[e]),e.forEach(r=>{const i=Xm(new Xt(this.context,r).toFrequency()),o=Math.round(i),a=i-o,c=this._findClosest(o),l=o-c,u=this._buffers.get(l),h=Gm(c+a),d=new Ur({url:u,context:this.context,curve:this.curve,fadeIn:this.attack,fadeOut:this.release,playbackRate:h}).connect(this.output);d.start(t,0,u.duration/h,s),ln(this._activeSources.get(o))||this._activeSources.set(o,[]),this._activeSources.get(o).push(d),d.onended=()=>{if(this._activeSources&&this._activeSources.has(o)){const f=this._activeSources.get(o),m=f.indexOf(d);m!==-1&&f.splice(m,1)}}}),this}triggerRelease(e,t){return this.log("triggerRelease",e,t),Array.isArray(e)||(e=[e]),e.forEach(s=>{const r=new Xt(this.context,s).toMidi();if(this._activeSources.has(r)&&this._activeSources.get(r).length){const i=this._activeSources.get(r);t=this.toSeconds(t),i.forEach(o=>{o.stop(t)}),this._activeSources.set(r,[])}}),this}releaseAll(e){const t=this.toSeconds(e);return this._activeSources.forEach(s=>{for(;s.length;)s.shift().stop(t)}),this}sync(){return this._syncState()&&(this._syncMethod("triggerAttack",1),this._syncMethod("triggerRelease",1)),this}triggerAttackRelease(e,t,s,r=1){const i=this.toSeconds(s);return this.triggerAttack(e,i,r),ln(t)?(me(ln(e),"notes must be an array when duration is array"),e.forEach((o,a)=>{const c=t[Math.min(a,t.length-1)];this.triggerRelease(o,i+this.toSeconds(c))})):this.triggerRelease(e,i+this.toSeconds(t)),this}add(e,t,s){if(me(Jo(e)||isFinite(e),`note must be a pitch or midi: ${e}`),Jo(e)){const r=new Xt(this.context,e).toMidi();this._buffers.add(r,t,s)}else this._buffers.add(e,t,s);return this}get loaded(){return this._buffers.loaded}dispose(){return super.dispose(),this._buffers.dispose(),this._activeSources.forEach(e=>{e.forEach(t=>t.dispose())}),this._activeSources.clear(),this}}pn([rs(0)],oo.prototype,"attack",void 0);pn([rs(0)],oo.prototype,"release",void 0);class Ba extends ue{constructor(){super(Object.assign(Z(Ba.getDefaults(),arguments,["fade"]))),this.name="CrossFade",this._panner=this.context.createStereoPanner(),this._split=this.context.createChannelSplitter(2),this._g2a=new rP({context:this.context}),this.a=new Ne({context:this.context,gain:0}),this.b=new Ne({context:this.context,gain:0}),this.output=new Ne({context:this.context}),this._internalChannels=[this.a,this.b];const e=Z(Ba.getDefaults(),arguments,["fade"]);this.fade=new Fe({context:this.context,units:"normalRange",value:e.fade}),je(this,"fade"),this.context.getConstant(1).connect(this._panner),this._panner.connect(this._split),this._panner.channelCount=1,this._panner.channelCountMode="explicit",ws(this._split,this.a.gain,0),ws(this._split,this.b.gain,1),this.fade.chain(this._g2a,this._panner.pan),this.a.connect(this.output),this.b.connect(this.output)}static getDefaults(){return Object.assign(ue.getDefaults(),{fade:.5})}dispose(){return super.dispose(),this.a.dispose(),this.b.dispose(),this.output.dispose(),this.fade.dispose(),this._g2a.dispose(),this._panner.disconnect(),this._split.disconnect(),this}}class Af extends ue{constructor(e){super(e),this.name="Effect",this._dryWet=new Ba({context:this.context}),this.wet=this._dryWet.fade,this.effectSend=new Ne({context:this.context}),this.effectReturn=new Ne({context:this.context}),this.input=new Ne({context:this.context}),this.output=this._dryWet,this.input.fan(this._dryWet.a,this.effectSend),this.effectReturn.connect(this._dryWet.b),this.wet.setValueAtTime(e.wet,0),this._internalChannels=[this.effectReturn,this.effectSend],je(this,"wet")}static getDefaults(){return Object.assign(ue.getDefaults(),{wet:1})}connectEffect(e){return this._internalChannels.push(e),this.effectSend.chain(e,this.effectReturn),this}dispose(){return super.dispose(),this._dryWet.dispose(),this.effectSend.dispose(),this.effectReturn.dispose(),this.wet.dispose(),this}}class Wa extends ue{constructor(){super(Object.assign(Z(Wa.getDefaults(),arguments,["pan"]))),this.name="Panner",this._panner=this.context.createStereoPanner(),this.input=this._panner,this.output=this._panner;const e=Z(Wa.getDefaults(),arguments,["pan"]);this.pan=new Oe({context:this.context,param:this._panner.pan,value:e.pan,minValue:-1,maxValue:1}),this._panner.channelCount=e.channelCount,this._panner.channelCountMode="explicit",je(this,"pan")}static getDefaults(){return Object.assign(ue.getDefaults(),{pan:0,channelCount:1})}dispose(){return super.dispose(),this._panner.disconnect(),this.pan.dispose(),this}}const uP="bit-crusher",hP=` class BitCrusherWorklet extends SingleIOProcessor { static get parameterDescriptors() { @@ -393,7 +393,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho return val; } } -`;Km(lP,uP);class Wa extends ue{constructor(){super(K(Wa.getDefaults(),arguments,["channels"])),this.name="Merge";const e=K(Wa.getDefaults(),arguments,["channels"]);this._merger=this.output=this.input=this.context.createChannelMerger(e.channels)}static getDefaults(){return Object.assign(ue.getDefaults(),{channels:2})}dispose(){return super.dispose(),this._merger.disconnect(),this}}class qa extends Af{constructor(){super(K(qa.getDefaults(),arguments,["decay"])),this.name="Reverb",this._convolver=this.context.createConvolver(),this.ready=Promise.resolve();const e=K(qa.getDefaults(),arguments,["decay"]);this._decay=e.decay,this._preDelay=e.preDelay,this.generate(),this.connectEffect(this._convolver)}static getDefaults(){return Object.assign(Af.getDefaults(),{decay:1.5,preDelay:.01})}get decay(){return this._decay}set decay(e){e=this.toSeconds(e),dn(e,.001),this._decay=e,this.generate()}get preDelay(){return this._preDelay}set preDelay(e){e=this.toSeconds(e),dn(e,0),this._preDelay=e,this.generate()}generate(){return Ie(this,void 0,void 0,function*(){const e=this.ready,t=new yc(2,this._decay+this._preDelay,this.context.sampleRate),s=new Xi({context:t}),r=new Xi({context:t}),i=new Wa({context:t});s.connect(i,0,0),r.connect(i,0,1);const o=new Ne({context:t}).toDestination();i.connect(o),s.start(0),r.start(0),o.gain.setValueAtTime(0,0),o.gain.setValueAtTime(1,this._preDelay),o.gain.exponentialApproachValueAtTime(0,this._preDelay,this.decay);const a=t.render();return this.ready=a.then(Ce),yield e,this._convolver.buffer=(yield a).get(),this})}dispose(){return super.dispose(),this._convolver.disconnect(),this}}class et extends ue{constructor(){super(K(et.getDefaults(),arguments,["solo"])),this.name="Solo";const e=K(et.getDefaults(),arguments,["solo"]);this.input=this.output=new Ne({context:this.context}),et._allSolos.has(this.context)||et._allSolos.set(this.context,new Set),et._allSolos.get(this.context).add(this),this.solo=e.solo}static getDefaults(){return Object.assign(ue.getDefaults(),{solo:!1})}get solo(){return this._isSoloed()}set solo(e){e?this._addSolo():this._removeSolo(),et._allSolos.get(this.context).forEach(t=>t._updateSolo())}get muted(){return this.input.gain.value===0}_addSolo(){et._soloed.has(this.context)||et._soloed.set(this.context,new Set),et._soloed.get(this.context).add(this)}_removeSolo(){et._soloed.has(this.context)&&et._soloed.get(this.context).delete(this)}_isSoloed(){return et._soloed.has(this.context)&&et._soloed.get(this.context).has(this)}_noSolos(){return!et._soloed.has(this.context)||et._soloed.has(this.context)&&et._soloed.get(this.context).size===0}_updateSolo(){this._isSoloed()?this.input.gain.value=1:this._noSolos()?this.input.gain.value=1:this.input.gain.value=0}dispose(){return super.dispose(),et._allSolos.get(this.context).delete(this),this._removeSolo(),this}}et._allSolos=new Map;et._soloed=new Map;class Ha extends ue{constructor(){super(K(Ha.getDefaults(),arguments,["pan","volume"])),this.name="PanVol";const e=K(Ha.getDefaults(),arguments,["pan","volume"]);this._panner=this.input=new Ba({context:this.context,pan:e.pan,channelCount:e.channelCount}),this.pan=this._panner.pan,this._volume=this.output=new ks({context:this.context,volume:e.volume}),this.volume=this._volume.volume,this._panner.connect(this._volume),this.mute=e.mute,je(this,["pan","volume"])}static getDefaults(){return Object.assign(ue.getDefaults(),{mute:!1,pan:0,volume:0,channelCount:1})}get mute(){return this._volume.mute}set mute(e){this._volume.mute=e}dispose(){return super.dispose(),this._panner.dispose(),this.pan.dispose(),this._volume.dispose(),this.volume.dispose(),this}}class Ls extends ue{constructor(){super(K(Ls.getDefaults(),arguments,["volume","pan"])),this.name="Channel";const e=K(Ls.getDefaults(),arguments,["volume","pan"]);this._solo=this.input=new et({solo:e.solo,context:this.context}),this._panVol=this.output=new Ha({context:this.context,pan:e.pan,volume:e.volume,mute:e.mute,channelCount:e.channelCount}),this.pan=this._panVol.pan,this.volume=this._panVol.volume,this._solo.connect(this._panVol),je(this,["pan","volume"])}static getDefaults(){return Object.assign(ue.getDefaults(),{pan:0,volume:0,mute:!1,solo:!1,channelCount:1})}get solo(){return this._solo.solo}set solo(e){this._solo.solo=e}get muted(){return this._solo.muted||this.mute}get mute(){return this._panVol.mute}set mute(e){this._panVol.mute=e}_getBus(e){return Ls.buses.has(e)||Ls.buses.set(e,new Ne({context:this.context})),Ls.buses.get(e)}send(e,t=0){const s=this._getBus(e),r=new Ne({context:this.context,units:"decibels",gain:t});return this.connect(r),r.connect(s),r}receive(e){return this._getBus(e).connect(this),this}dispose(){return super.dispose(),this._panVol.dispose(),this.pan.dispose(),this.volume.dispose(),this._solo.dispose(),this}}Ls.buses=new Map;class hP extends ue{constructor(){super(...arguments),this.name="Listener",this.positionX=new Oe({context:this.context,param:this.context.rawContext.listener.positionX}),this.positionY=new Oe({context:this.context,param:this.context.rawContext.listener.positionY}),this.positionZ=new Oe({context:this.context,param:this.context.rawContext.listener.positionZ}),this.forwardX=new Oe({context:this.context,param:this.context.rawContext.listener.forwardX}),this.forwardY=new Oe({context:this.context,param:this.context.rawContext.listener.forwardY}),this.forwardZ=new Oe({context:this.context,param:this.context.rawContext.listener.forwardZ}),this.upX=new Oe({context:this.context,param:this.context.rawContext.listener.upX}),this.upY=new Oe({context:this.context,param:this.context.rawContext.listener.upY}),this.upZ=new Oe({context:this.context,param:this.context.rawContext.listener.upZ})}static getDefaults(){return Object.assign(ue.getDefaults(),{positionX:0,positionY:0,positionZ:0,forwardX:0,forwardY:0,forwardZ:-1,upX:0,upY:1,upZ:0})}dispose(){return super.dispose(),this.positionX.dispose(),this.positionY.dispose(),this.positionZ.dispose(),this.forwardX.dispose(),this.forwardY.dispose(),this.forwardZ.dispose(),this.upX.dispose(),this.upY.dispose(),this.upZ.dispose(),this}}gc(n=>{n.listener=new hP({context:n})});_c(n=>{n.listener.dispose()});on().transport;const uh=on().destination;on().destination;on().listener;on().draw;on();const hh=new Wr(900,"highpass"),Qm=new ks(-6);Qm.chain(hh,uh);const dP=new qa(3).connect(Qm),xc=new ro({envelope:{attack:0,decay:.9,sustain:.2,release:.1}});xc.oscillator.type="triangle2";xc.volume.value=-6;xc.chain(hh,uh);const wc=new ro({envelope:{attack:.4,decay:.9,sustain:.7,release:.6}}).connect(dP);wc.oscillator.type="triangle";wc.volume.value=-6;wc.chain(hh,uh);function fP(){return Math.floor((Math.random()-.5)*20)}let Pf=!1;const pP=async(n=0)=>{Pf||(await UA(),Pf=!0);try{if(n>2e3)wc.triggerAttackRelease(60,.3);else if(n>1e3){let e=310;e+=fP(),xc.triggerAttackRelease(e,.001)}}catch(e){console.warn(e)}},ta=1800,mP=(n,e)=>n.clone().normalize().clone().negate().normalize().multiplyScalar(e).add(n),gP=(n,e,t,s,r)=>{const i=new ip,o=1e-5;i.absarc(o,o,o,-Math.PI/2,-Math.PI,!0),i.absarc(o,e-s*2,o,Math.PI,Math.PI/2,!0),i.absarc(n-s*2,e-s*2,o,Math.PI/2,0,!0),i.absarc(n-s*2,o,o,0,-Math.PI/2,!0);const a=new uy(i,{depth:t-s*2,bevelEnabled:!0,bevelSegments:r,steps:2,bevelSize:s,bevelThickness:s,curveSegments:r});a.center();const c=[],l=a.getAttribute("normal"),u=a.getAttribute("position");for(let h=0;h.9?(m=f.x/n+.5,p=1-(f.z/t+.5)):Math.abs(d.x)>.9?(m=-f.z/t+.5,p=1-(-f.y/e+.5)):Math.abs(d.z)>.9&&(m=f.x/n+.5,p=1-(-f.y/e+.5)),c.push(m,p)}return a.setAttribute("uv",new ia(c,2)),a};gP(10,10,10,2,10);new ly(10,10,10);const _P=500,yP=800;let wi=null;const vP=500,Jm=(n,e)=>{if(wi)return null;wi=setTimeout(()=>{wi&&(clearTimeout(wi),wi=null)},vP);const t=[];return n.forEach(r=>{const i=e.position.distanceTo(dE.set(r.x,r.y,r.z));ir.distance-i.distance).slice(0,_P).map(r=>r.id)};let yr,ki;const bP=1e3,xP=2e3,wP=n=>{const e=Jn(),t=fs(w=>w.isUserDragging),s=fs(w=>w.isUserScrolling),r=fs(w=>w.setUserMovedCamera),{data:i,graphStyle:o,showSelectionGraph:a,setNearbyNodeIds:c,cameraFocusTrigger:l,graphRadius:u}=mt(w=>w),{camera:h}=ze(),[d,f]=y.useState(!1),[m,p]=y.useState(!1),[g,_]=y.useState(af),x=y.useMemo(()=>{if(a)return new ae(0,0,0);const w=i==null?void 0:i.nodes.find(R=>R.ref_id===(e==null?void 0:e.ref_id)),C=u+300;let S=new ae(0,0,C);if(w&&i){const R=i==null?void 0:i.nodes.filter(z=>{var V;return(V=w.children)==null?void 0:V.find(U=>U===z.id)}),O=new ae(w.x,w.y,w.z);let L=new ae(0,0,0);R.map(z=>(L=L.add(new ae(z.x,z.y,z.z).normalize()),z));const j=w.scale?1-1/(w.scale+10):1,q=O.sub(L).multiplyScalar(.8*j);S=O.add(q)}return S},[a,e,i,u]),k=y.useMemo(()=>{if(a)return new ae(0,0,0);const w=i==null?void 0:i.nodes.find(C=>C.ref_id===(e==null?void 0:e.ref_id));return new ae((w==null?void 0:w.x)||0,(w==null?void 0:w.y)||0,(w==null?void 0:w.z)||0)},[a,e,i]);y.useEffect(()=>{var w;a&&((w=n.current)==null||w.setLookAt(Kc.x,Kc.y,Kc.z,0,0,0,!1)),v()},[a]),y.useEffect(()=>{a?_(_E):(e==null?void 0:e.node_type)==="topic"?_(gE):_(af)},[e,_,a]),y.useEffect(()=>{b()},[l]),y.useEffect(()=>{(t||s)&&(f(!0),p(!0))},[t,s,f,p]),y.useEffect(()=>{if(e)if(!a&&o==="earth"&&(n!=null&&n.current)){const w=n.current.camera.position.distanceTo(new ae),C=mP(k,-w/2);n.current.setLookAt(C.x,C.y,C.z,0,0,0,!0)}else yr&&clearTimeout(yr),yr=setTimeout(()=>{p(!0),clearTimeout(yr)},xP),v();return()=>{yr&&clearTimeout(yr),ki&&clearTimeout(ki)}},[e]),Wt(w=>{n.current&&(d||T(x,w.camera),m||E(k,w.camera))});const v=()=>{if(e){const w=h.position.distanceTo(x);pP(w)}b()},b=()=>{f(!1),p(!1),r(!1),ki&&clearTimeout(ki),ki=setTimeout(()=>{f(!0),p(!0)},bP)},T=(w,C)=>{if(C.position.distanceTo(w){var S;(S=n==null?void 0:n.current)==null||S.setLookAt(C.position.x,C.position.y,C.position.z,w.x,w.y,w.z,!0)};return null},kP=1;let na=null;const TP=(n,{enabled:e})=>{const t=Jn();wP(n);const s=fs(a=>a.isUserDragging),{graphStyle:r,graphRadius:i,disableCameraRotation:o}=mt(a=>a);return y.useEffect(()=>{e||(na==null||na.kill(),na=null)},[e]),y.useEffect(()=>{n.current&&i&&(r==="sphere"?(n.current.maxDistance=8e3,n.current.minDistance=200,n.current.setTarget(0,0,500,!0)):(n.current.maxDistance=n.current.getDistanceToFitSphere(i+200),n.current.minDistance=100))},[i,r,n]),y.useEffect(()=>{!t&&n.current&&n.current.setLookAt(Di.x,Di.y,i,0,0,0,!0)},[t,i]),Wt((a,c)=>{n.current&&(!o&&!s&&(n.current.azimuthAngle+=kP*c*hy.DEG2RAD),n.current.update(c))}),null},EP=({disableAnimations:n})=>{const e=y.useRef(null),{data:t,setNearbyNodeIds:s,setDisableCameraRotation:r}=mt(h=>h),[i]=y.useState(.8),{camera:o}=ze(),[a,c,l,u]=fs(h=>[h.isUserDragging,h.setIsUserDragging,h.isUserScrolling,h.isUserScrollingOnHtmlPanel]);return TP(e,{enabled:!n&&!l&&!a}),y.useEffect(()=>{if(!a){const h=Jm((t==null?void 0:t.nodes)||[],o);h&&s(h)}},[o,o.position,o.position.x,o.position.y,o.position.z,t==null?void 0:t.nodes,s,a]),y.useEffect(()=>{a&&r(!0)},[a,r]),B.jsx(m1,{ref:e,boundaryEnclosesCamera:!0,enabled:!u,makeDefault:!0,maxDistance:12e3,minDistance:100,onEnd:()=>c(!1),onStart:()=>c(!0),smoothTime:i})};function Ln(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function eg(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}/*! +`;Qm(uP,hP);class qa extends ue{constructor(){super(Z(qa.getDefaults(),arguments,["channels"])),this.name="Merge";const e=Z(qa.getDefaults(),arguments,["channels"]);this._merger=this.output=this.input=this.context.createChannelMerger(e.channels)}static getDefaults(){return Object.assign(ue.getDefaults(),{channels:2})}dispose(){return super.dispose(),this._merger.disconnect(),this}}class Ha extends Af{constructor(){super(Z(Ha.getDefaults(),arguments,["decay"])),this.name="Reverb",this._convolver=this.context.createConvolver(),this.ready=Promise.resolve();const e=Z(Ha.getDefaults(),arguments,["decay"]);this._decay=e.decay,this._preDelay=e.preDelay,this.generate(),this.connectEffect(this._convolver)}static getDefaults(){return Object.assign(Af.getDefaults(),{decay:1.5,preDelay:.01})}get decay(){return this._decay}set decay(e){e=this.toSeconds(e),dn(e,.001),this._decay=e,this.generate()}get preDelay(){return this._preDelay}set preDelay(e){e=this.toSeconds(e),dn(e,0),this._preDelay=e,this.generate()}generate(){return Ie(this,void 0,void 0,function*(){const e=this.ready,t=new vc(2,this._decay+this._preDelay,this.context.sampleRate),s=new Xi({context:t}),r=new Xi({context:t}),i=new qa({context:t});s.connect(i,0,0),r.connect(i,0,1);const o=new Ne({context:t}).toDestination();i.connect(o),s.start(0),r.start(0),o.gain.setValueAtTime(0,0),o.gain.setValueAtTime(1,this._preDelay),o.gain.exponentialApproachValueAtTime(0,this._preDelay,this.decay);const a=t.render();return this.ready=a.then(Ce),yield e,this._convolver.buffer=(yield a).get(),this})}dispose(){return super.dispose(),this._convolver.disconnect(),this}}class et extends ue{constructor(){super(Z(et.getDefaults(),arguments,["solo"])),this.name="Solo";const e=Z(et.getDefaults(),arguments,["solo"]);this.input=this.output=new Ne({context:this.context}),et._allSolos.has(this.context)||et._allSolos.set(this.context,new Set),et._allSolos.get(this.context).add(this),this.solo=e.solo}static getDefaults(){return Object.assign(ue.getDefaults(),{solo:!1})}get solo(){return this._isSoloed()}set solo(e){e?this._addSolo():this._removeSolo(),et._allSolos.get(this.context).forEach(t=>t._updateSolo())}get muted(){return this.input.gain.value===0}_addSolo(){et._soloed.has(this.context)||et._soloed.set(this.context,new Set),et._soloed.get(this.context).add(this)}_removeSolo(){et._soloed.has(this.context)&&et._soloed.get(this.context).delete(this)}_isSoloed(){return et._soloed.has(this.context)&&et._soloed.get(this.context).has(this)}_noSolos(){return!et._soloed.has(this.context)||et._soloed.has(this.context)&&et._soloed.get(this.context).size===0}_updateSolo(){this._isSoloed()?this.input.gain.value=1:this._noSolos()?this.input.gain.value=1:this.input.gain.value=0}dispose(){return super.dispose(),et._allSolos.get(this.context).delete(this),this._removeSolo(),this}}et._allSolos=new Map;et._soloed=new Map;class Ya extends ue{constructor(){super(Z(Ya.getDefaults(),arguments,["pan","volume"])),this.name="PanVol";const e=Z(Ya.getDefaults(),arguments,["pan","volume"]);this._panner=this.input=new Wa({context:this.context,pan:e.pan,channelCount:e.channelCount}),this.pan=this._panner.pan,this._volume=this.output=new ks({context:this.context,volume:e.volume}),this.volume=this._volume.volume,this._panner.connect(this._volume),this.mute=e.mute,je(this,["pan","volume"])}static getDefaults(){return Object.assign(ue.getDefaults(),{mute:!1,pan:0,volume:0,channelCount:1})}get mute(){return this._volume.mute}set mute(e){this._volume.mute=e}dispose(){return super.dispose(),this._panner.dispose(),this.pan.dispose(),this._volume.dispose(),this.volume.dispose(),this}}class Ls extends ue{constructor(){super(Z(Ls.getDefaults(),arguments,["volume","pan"])),this.name="Channel";const e=Z(Ls.getDefaults(),arguments,["volume","pan"]);this._solo=this.input=new et({solo:e.solo,context:this.context}),this._panVol=this.output=new Ya({context:this.context,pan:e.pan,volume:e.volume,mute:e.mute,channelCount:e.channelCount}),this.pan=this._panVol.pan,this.volume=this._panVol.volume,this._solo.connect(this._panVol),je(this,["pan","volume"])}static getDefaults(){return Object.assign(ue.getDefaults(),{pan:0,volume:0,mute:!1,solo:!1,channelCount:1})}get solo(){return this._solo.solo}set solo(e){this._solo.solo=e}get muted(){return this._solo.muted||this.mute}get mute(){return this._panVol.mute}set mute(e){this._panVol.mute=e}_getBus(e){return Ls.buses.has(e)||Ls.buses.set(e,new Ne({context:this.context})),Ls.buses.get(e)}send(e,t=0){const s=this._getBus(e),r=new Ne({context:this.context,units:"decibels",gain:t});return this.connect(r),r.connect(s),r}receive(e){return this._getBus(e).connect(this),this}dispose(){return super.dispose(),this._panVol.dispose(),this.pan.dispose(),this.volume.dispose(),this._solo.dispose(),this}}Ls.buses=new Map;class dP extends ue{constructor(){super(...arguments),this.name="Listener",this.positionX=new Oe({context:this.context,param:this.context.rawContext.listener.positionX}),this.positionY=new Oe({context:this.context,param:this.context.rawContext.listener.positionY}),this.positionZ=new Oe({context:this.context,param:this.context.rawContext.listener.positionZ}),this.forwardX=new Oe({context:this.context,param:this.context.rawContext.listener.forwardX}),this.forwardY=new Oe({context:this.context,param:this.context.rawContext.listener.forwardY}),this.forwardZ=new Oe({context:this.context,param:this.context.rawContext.listener.forwardZ}),this.upX=new Oe({context:this.context,param:this.context.rawContext.listener.upX}),this.upY=new Oe({context:this.context,param:this.context.rawContext.listener.upY}),this.upZ=new Oe({context:this.context,param:this.context.rawContext.listener.upZ})}static getDefaults(){return Object.assign(ue.getDefaults(),{positionX:0,positionY:0,positionZ:0,forwardX:0,forwardY:0,forwardZ:-1,upX:0,upY:1,upZ:0})}dispose(){return super.dispose(),this.positionX.dispose(),this.positionY.dispose(),this.positionZ.dispose(),this.forwardX.dispose(),this.forwardY.dispose(),this.forwardZ.dispose(),this.upX.dispose(),this.upY.dispose(),this.upZ.dispose(),this}}_c(n=>{n.listener=new dP({context:n})});yc(n=>{n.listener.dispose()});on().transport;const lh=on().destination;on().destination;on().listener;on().draw;on();const uh=new Wr(900,"highpass"),Jm=new ks(-6);Jm.chain(uh,lh);const fP=new Ha(3).connect(Jm),wc=new ro({envelope:{attack:0,decay:.9,sustain:.2,release:.1}});wc.oscillator.type="triangle2";wc.volume.value=-6;wc.chain(uh,lh);const kc=new ro({envelope:{attack:.4,decay:.9,sustain:.7,release:.6}}).connect(fP);kc.oscillator.type="triangle";kc.volume.value=-6;kc.chain(uh,lh);function pP(){return Math.floor((Math.random()-.5)*20)}let Pf=!1;const mP=async(n=0)=>{Pf||(await BA(),Pf=!0);try{if(n>2e3)kc.triggerAttackRelease(60,.3);else if(n>1e3){let e=310;e+=pP(),wc.triggerAttackRelease(e,.001)}}catch(e){console.warn(e)}},ta=1800,gP=(n,e)=>n.clone().normalize().clone().negate().normalize().multiplyScalar(e).add(n),_P=(n,e,t,s,r)=>{const i=new op,o=1e-5;i.absarc(o,o,o,-Math.PI/2,-Math.PI,!0),i.absarc(o,e-s*2,o,Math.PI,Math.PI/2,!0),i.absarc(n-s*2,e-s*2,o,Math.PI/2,0,!0),i.absarc(n-s*2,o,o,0,-Math.PI/2,!0);const a=new dy(i,{depth:t-s*2,bevelEnabled:!0,bevelSegments:r,steps:2,bevelSize:s,bevelThickness:s,curveSegments:r});a.center();const c=[],l=a.getAttribute("normal"),u=a.getAttribute("position");for(let h=0;h.9?(m=f.x/n+.5,p=1-(f.z/t+.5)):Math.abs(d.x)>.9?(m=-f.z/t+.5,p=1-(-f.y/e+.5)):Math.abs(d.z)>.9&&(m=f.x/n+.5,p=1-(-f.y/e+.5)),c.push(m,p)}return a.setAttribute("uv",new ia(c,2)),a};_P(10,10,10,2,10);new hy(10,10,10);const yP=500,vP=800;let wi=null;const bP=500,eg=(n,e)=>{if(wi)return null;wi=setTimeout(()=>{wi&&(clearTimeout(wi),wi=null)},bP);const t=[];return n.forEach(r=>{const i=e.position.distanceTo(fE.set(r.x,r.y,r.z));ir.distance-i.distance).slice(0,yP).map(r=>r.id)};let yr,ki;const xP=1e3,wP=2e3,kP=n=>{const e=Jn(),t=fs(x=>x.isUserDragging),s=fs(x=>x.isUserScrolling),r=fs(x=>x.setUserMovedCamera),{data:i,graphStyle:o,showSelectionGraph:a,setNearbyNodeIds:c,cameraFocusTrigger:l,graphRadius:u}=mt(x=>x),{camera:h}=We(),[d,f]=y.useState(!1),[m,p]=y.useState(!1),[g,_]=y.useState(af),w=y.useMemo(()=>{if(a)return new ae(0,0,0);const x=i==null?void 0:i.nodes.find(R=>R.ref_id===(e==null?void 0:e.ref_id)),C=u+300;let S=new ae(0,0,C);if(x&&i){const R=i==null?void 0:i.nodes.filter(B=>{var V;return(V=x.children)==null?void 0:V.find(z=>z===B.id)}),O=new ae(x.x,x.y,x.z);let L=new ae(0,0,0);R.map(B=>(L=L.add(new ae(B.x,B.y,B.z).normalize()),B));const j=x.scale?1-1/(x.scale+10):1,W=O.sub(L).multiplyScalar(.8*j);S=O.add(W)}return S},[a,e,i,u]),k=y.useMemo(()=>{if(a)return new ae(0,0,0);const x=i==null?void 0:i.nodes.find(C=>C.ref_id===(e==null?void 0:e.ref_id));return new ae((x==null?void 0:x.x)||0,(x==null?void 0:x.y)||0,(x==null?void 0:x.z)||0)},[a,e,i]);y.useEffect(()=>{var x;a&&((x=n.current)==null||x.setLookAt(Qc.x,Qc.y,Qc.z,0,0,0,!1)),b()},[a]),y.useEffect(()=>{a?_(yE):(e==null?void 0:e.node_type)==="topic"?_(_E):_(af)},[e,_,a]),y.useEffect(()=>{v()},[l]),y.useEffect(()=>{(t||s)&&(f(!0),p(!0))},[t,s,f,p]),y.useEffect(()=>{if(e)if(!a&&o==="earth"&&(n!=null&&n.current)){const x=n.current.camera.position.distanceTo(new ae),C=gP(k,-x/2);n.current.setLookAt(C.x,C.y,C.z,0,0,0,!0)}else yr&&clearTimeout(yr),yr=setTimeout(()=>{p(!0),clearTimeout(yr)},wP),b();return()=>{yr&&clearTimeout(yr),ki&&clearTimeout(ki)}},[e]),Nt(x=>{n.current&&(d||T(w,x.camera),m||E(k,x.camera))});const b=()=>{if(e){const x=h.position.distanceTo(w);mP(x)}v()},v=()=>{f(!1),p(!1),r(!1),ki&&clearTimeout(ki),ki=setTimeout(()=>{f(!0),p(!0)},xP)},T=(x,C)=>{if(C.position.distanceTo(x){var S;(S=n==null?void 0:n.current)==null||S.setLookAt(C.position.x,C.position.y,C.position.z,x.x,x.y,x.z,!0)};return null},TP=1;let na=null;const EP=(n,{enabled:e})=>{const t=Jn();kP(n);const s=fs(a=>a.isUserDragging),{graphStyle:r,graphRadius:i,disableCameraRotation:o}=mt(a=>a);return y.useEffect(()=>{e||(na==null||na.kill(),na=null)},[e]),y.useEffect(()=>{n.current&&i&&(r==="sphere"?(n.current.maxDistance=8e3,n.current.minDistance=200,n.current.setTarget(0,0,500,!0)):(n.current.maxDistance=n.current.getDistanceToFitSphere(i+200),n.current.minDistance=100))},[i,r,n]),y.useEffect(()=>{!t&&n.current&&n.current.setLookAt(Di.x,Di.y,i,0,0,0,!0)},[t,i]),Nt((a,c)=>{n.current&&(!o&&!s&&(n.current.azimuthAngle+=TP*c*fy.DEG2RAD),n.current.update(c))}),null},CP=({disableAnimations:n})=>{const e=y.useRef(null),{data:t,setNearbyNodeIds:s,setDisableCameraRotation:r}=mt(h=>h),[i]=y.useState(.8),{camera:o}=We(),[a,c,l,u]=fs(h=>[h.isUserDragging,h.setIsUserDragging,h.isUserScrolling,h.isUserScrollingOnHtmlPanel]);return EP(e,{enabled:!n&&!l&&!a}),y.useEffect(()=>{if(!a){const h=eg((t==null?void 0:t.nodes)||[],o);h&&s(h)}},[o,o.position,o.position.x,o.position.y,o.position.z,t==null?void 0:t.nodes,s,a]),y.useEffect(()=>{a&&r(!0)},[a,r]),U.jsx(g1,{ref:e,boundaryEnclosesCamera:!0,enabled:!u,makeDefault:!0,maxDistance:12e3,minDistance:100,onEnd:()=>c(!1),onStart:()=>c(!0),smoothTime:i})};function Ln(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function tg(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}/*! * GSAP 3.12.4 * https://gsap.com * @@ -401,7 +401,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * Subject to the terms at https://gsap.com/standard-license or for * Club GSAP members, the agreement issued with that membership. * @author: Jack Doyle, jack@greensock.com -*/var Ut={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},qr={duration:.5,overwrite:!1,delay:0},dh,ft,Ge,Zt=1e8,Me=1/Zt,Hl=Math.PI*2,CP=Hl/4,SP=0,tg=Math.sqrt,OP=Math.cos,AP=Math.sin,ut=function(e){return typeof e=="string"},Xe=function(e){return typeof e=="function"},Zn=function(e){return typeof e=="number"},fh=function(e){return typeof e>"u"},On=function(e){return typeof e=="object"},At=function(e){return e!==!1},ph=function(){return typeof window<"u"},sa=function(e){return Xe(e)||ut(e)},ng=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},pt=Array.isArray,Yl=/(?:-?\.?\d|\.)+/gi,sg=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Er=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,el=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,rg=/[+-]=-?[.\d]+/,ig=/[^,'"\[\]\s]+/gi,PP=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,qe,Yt,Gl,mh,Bt={},Ya={},og,ag=function(e){return(Ya=nr(e,Bt))&&It},gh=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},ao=function(e,t){return!t&&console.warn(e)},cg=function(e,t){return e&&(Bt[e]=t)&&Ya&&(Ya[e]=t)||Bt},co=function(){return 0},RP={suppressEvents:!0,isStart:!0,kill:!1},la={suppressEvents:!0,kill:!1},DP={suppressEvents:!0},_h={},ms=[],Xl={},lg,$t={},tl={},Rf=30,ua=[],yh="",vh=function(e){var t=e[0],s,r;if(On(t)||Xe(t)||(e=[e]),!(s=(t._gsap||{}).harness)){for(r=ua.length;r--&&!ua[r].targetTest(t););s=ua[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new Mg(e[r],s)))||e.splice(r,1);return e},qs=function(e){return e._gsap||vh(Kt(e))[0]._gsap},ug=function(e,t,s){return(s=e[t])&&Xe(s)?e[t]():fh(s)&&e.getAttribute&&e.getAttribute(t)||s},Pt=function(e,t){return(e=e.split(",")).forEach(t)||e},tt=function(e){return Math.round(e*1e5)/1e5||0},ct=function(e){return Math.round(e*1e7)/1e7||0},Rr=function(e,t){var s=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),s==="+"?e+r:s==="-"?e-r:s==="*"?e*r:e/r},MP=function(e,t){for(var s=t.length,r=0;e.indexOf(t[r])<0&&++ra;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[s],e[s]=t),t._next?t._next._prev=t:e[r]=t,t._prev=o,t.parent=t._dp=e,t},kc=function(e,t,s,r){s===void 0&&(s="_first"),r===void 0&&(r="_last");var i=t._prev,o=t._next;i?i._next=o:e[s]===t&&(e[s]=o),o?o._prev=i:e[r]===t&&(e[r]=i),t._next=t._prev=t.parent=null},Cs=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Hs=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var s=e;s;)s._dirty=1,s=s.parent;return e},$P=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Zl=function(e,t,s,r){return e._startAt&&(ft?e._startAt.revert(la):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},FP=function n(e){return!e||e._ts&&n(e.parent)},Mf=function(e){return e._repeat?Hr(e._tTime,e=e.duration()+e._rDelay)*e:0},Hr=function(e,t){var s=Math.floor(e/=t);return e&&s===e?s-1:s},Za=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Tc=function(e){return e._end=ct(e._start+(e._tDur/Math.abs(e._ts||e._rts||Me)||0))},Ec=function(e,t){var s=e._dp;return s&&s.smoothChildTiming&&e._ts&&(e._start=ct(s._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Tc(e),s._dirty||Hs(s,e)),e},mg=function(e,t){var s;if((t._time||!t._dur&&t._initted||t._startMe)&&t.render(s,!0)),Hs(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur=0&&s.totalTime(s._tTime),s=s._dp;e._zTime=-Me}},xn=function(e,t,s,r){return t.parent&&Cs(t),t._start=ct((Zn(s)?s:s||e!==qe?Ht(e,s,t):e._time)+t._delay),t._end=ct(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),pg(e,t,"_first","_last",e._sort?"_start":0),Kl(t)||(e._recent=t),r||mg(e,t),e._ts<0&&Ec(e,e._tTime),e},gg=function(e,t){return(Bt.ScrollTrigger||gh("scrollTrigger",t))&&Bt.ScrollTrigger.create(t,e)},_g=function(e,t,s,r,i){if(xh(e,t,i),!e._initted)return 1;if(!s&&e._pt&&!ft&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&lg!==Lt.frame)return ms.push(e),e._lazy=[i,r],1},LP=function n(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||n(t))},Kl=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},jP=function(e,t,s,r){var i=e.ratio,o=t<0||!t&&(!e._start&&LP(e)&&!(!e._initted&&Kl(e))||(e._ts<0||e._dp._ts<0)&&!Kl(e))?0:1,a=e._rDelay,c=0,l,u,h;if(a&&e._repeat&&(c=Mo(0,e._tDur,t),u=Hr(c,a),e._yoyo&&u&1&&(o=1-o),u!==Hr(e._tTime,a)&&(i=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==i||ft||r||e._zTime===Me||!t&&e._zTime){if(!e._initted&&_g(e,t,r,s,c))return;for(h=e._zTime,e._zTime=t||(s?Me:0),s||(s=t&&!h),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=c,l=e._pt;l;)l.r(o,l.d),l=l._next;t<0&&Zl(e,t,s,!0),e._onUpdate&&!s&&jt(e,"onUpdate"),c&&e._repeat&&!s&&e.parent&&jt(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&Cs(e,1),!s&&!ft&&(jt(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},VP=function(e,t,s){var r;if(s>t)for(r=e._first;r&&r._start<=s;){if(r.data==="isPause"&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=s;){if(r.data==="isPause"&&r._start0&&!r&&Ec(e,e._tTime=e._tDur*a),e.parent&&Tc(e),s||Hs(e.parent,e),e},If=function(e){return e instanceof xt?Hs(e):Yr(e,e._dur)},zP={_start:0,endTime:co,totalDuration:co},Ht=function n(e,t,s){var r=e.labels,i=e._recent||zP,o=e.duration()>=Zt?i.endTime(!1):e._dur,a,c,l;return ut(t)&&(isNaN(t)||t in r)?(c=t.charAt(0),l=t.substr(-1)==="%",a=t.indexOf("="),c==="<"||c===">"?(a>=0&&(t=t.replace(/=/,"")),(c==="<"?i._start:i.endTime(i._repeat>=0))+(parseFloat(t.substr(1))||0)*(l?(a<0?i:s).totalDuration()/100:1)):a<0?(t in r||(r[t]=o),r[t]):(c=parseFloat(t.charAt(a-1)+t.substr(a+1)),l&&s&&(c=c/100*(pt(s)?s[0]:s).totalDuration()),a>1?n(e,t.substr(0,a-1),s)+c:o+c)):t==null?o:+t},Ni=function(e,t,s){var r=Zn(t[1]),i=(r?2:1)+(e<2?0:1),o=t[i],a,c;if(r&&(o.duration=t[1]),o.parent=s,e){for(a=o,c=s;c&&!("immediateRender"in a);)a=c.vars.defaults||{},c=At(c.vars.inherit)&&c.parent;o.immediateRender=At(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[i-1]}return new rt(t[0],o,t[i+1])},Rs=function(e,t){return e||e===0?t(e):t},Mo=function(e,t,s){return st?t:s},dt=function(e,t){return!ut(e)||!(t=PP.exec(e))?"":t[1]},UP=function(e,t,s){return Rs(s,function(r){return Mo(e,t,r)})},Ql=[].slice,yg=function(e,t){return e&&On(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&On(e[0]))&&!e.nodeType&&e!==Yt},BP=function(e,t,s){return s===void 0&&(s=[]),e.forEach(function(r){var i;return ut(r)&&!t||yg(r,1)?(i=s).push.apply(i,Kt(r)):s.push(r)})||s},Kt=function(e,t,s){return Ge&&!t&&Ge.selector?Ge.selector(e):ut(e)&&!s&&(Gl||!Gr())?Ql.call((t||mh).querySelectorAll(e),0):pt(e)?BP(e,s):yg(e)?Ql.call(e,0):e?[e]:[]},Jl=function(e){return e=Kt(e)[0]||ao("Invalid scope")||{},function(t){var s=e.current||e.nativeElement||e;return Kt(t,s.querySelectorAll?s:s===e?ao("Invalid scope")||mh.createElement("div"):e)}},vg=function(e){return e.sort(function(){return .5-Math.random()})},bg=function(e){if(Xe(e))return e;var t=On(e)?e:{each:e},s=Ys(t.ease),r=t.from||0,i=parseFloat(t.base)||0,o={},a=r>0&&r<1,c=isNaN(r)||a,l=t.axis,u=r,h=r;return ut(r)?u=h={center:.5,edges:.5,end:1}[r]||0:!a&&c&&(u=r[0],h=r[1]),function(d,f,m){var p=(m||t).length,g=o[p],_,x,k,v,b,T,E,w,C;if(!g){if(C=t.grid==="auto"?0:(t.grid||[1,Zt])[1],!C){for(E=-Zt;E<(E=m[C++].getBoundingClientRect().left)&&CE&&(E=b),bp?p-1:l?l==="y"?p/C:C:Math.max(C,p/C))||0)*(r==="edges"?-1:1),g.b=p<0?i-p:i,g.u=dt(t.amount||t.each)||0,s=s&&p<0?Pg(s):s}return p=(g[d]-g.min)/g.max||0,ct(g.b+(s?s(p):p)*g.v)+g.u}},eu=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(s){var r=ct(Math.round(parseFloat(s)/e)*e*t);return(r-r%1)/t+(Zn(s)?0:dt(s))}},xg=function(e,t){var s=pt(e),r,i;return!s&&On(e)&&(r=s=e.radius||Zt,e.values?(e=Kt(e.values),(i=!Zn(e[0]))&&(r*=r)):e=eu(e.increment)),Rs(t,s?Xe(e)?function(o){return i=e(o),Math.abs(i-o)<=r?i:o}:function(o){for(var a=parseFloat(i?o.x:o),c=parseFloat(i?o.y:0),l=Zt,u=0,h=e.length,d,f;h--;)i?(d=e[h].x-a,f=e[h].y-c,d=d*d+f*f):d=Math.abs(e[h]-a),dr?i-o:o)})},lo=function(e){for(var t=0,s="",r,i,o,a;~(r=e.indexOf("random(",t));)o=e.indexOf(")",r),a=e.charAt(r+7)==="[",i=e.substr(r+7,o-r-7).match(a?ig:Yl),s+=e.substr(t,r-t)+wg(a?i:+i[0],a?0:+i[1],+i[2]||1e-5),t=o+1;return s+e.substr(t,e.length-t)},Tg=function(e,t,s,r,i){var o=t-e,a=r-s;return Rs(i,function(c){return s+((c-e)/o*a||0)})},XP=function n(e,t,s,r){var i=isNaN(e+t)?0:function(f){return(1-f)*e+f*t};if(!i){var o=ut(e),a={},c,l,u,h,d;if(s===!0&&(r=1)&&(s=null),o)e={p:e},t={p:t};else if(pt(e)&&!pt(t)){for(u=[],h=e.length,d=h-2,l=1;l(a=Math.abs(a))&&(c=o,i=a);return c},jt=function(e,t,s){var r=e.vars,i=r[t],o=Ge,a=e._ctx,c,l,u;if(i)return c=r[t+"Params"],l=r.callbackScope||e,s&&ms.length&&Ga(),a&&(Ge=a),u=c?i.apply(l,c):i.call(l),Ge=o,u},Ci=function(e){return Cs(e),e.scrollTrigger&&e.scrollTrigger.kill(!!ft),e.progress()<1&&jt(e,"onInterrupt"),e},Cr,Eg=[],Cg=function(e){if(ph()&&e){e=!e.name&&e.default||e;var t=e.name,s=Xe(e),r=t&&!s&&e.init?function(){this._props=[]}:e,i={init:co,render:Th,add:bh,kill:hR,modifier:uR,rawVars:0},o={targetTest:0,get:0,getSetter:kh,aliases:{},register:0};if(Gr(),e!==r){if($t[t])return;en(r,en(Xa(e,i),o)),nr(r.prototype,nr(i,Xa(e,o))),$t[r.prop=t]=r,e.targetTest&&(ua.push(r),_h[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}cg(t,r),e.register&&e.register(It,r,Rt)}else e&&Eg.push(e)},De=255,Si={aqua:[0,De,De],lime:[0,De,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,De],navy:[0,0,128],white:[De,De,De],olive:[128,128,0],yellow:[De,De,0],orange:[De,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[De,0,0],pink:[De,192,203],cyan:[0,De,De],transparent:[De,De,De,0]},nl=function(e,t,s){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(s-t)*e*6:e<.5?s:e*3<2?t+(s-t)*(2/3-e)*6:t)*De+.5|0},Sg=function(e,t,s){var r=e?Zn(e)?[e>>16,e>>8&De,e&De]:0:Si.black,i,o,a,c,l,u,h,d,f,m;if(!r){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Si[e])r=Si[e];else if(e.charAt(0)==="#"){if(e.length<6&&(i=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+i+i+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return r=parseInt(e.substr(1,6),16),[r>>16,r>>8&De,r&De,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&De,e&De]}else if(e.substr(0,3)==="hsl"){if(r=m=e.match(Yl),!t)c=+r[0]%360/360,l=+r[1]/100,u=+r[2]/100,o=u<=.5?u*(l+1):u+l-u*l,i=u*2-o,r.length>3&&(r[3]*=1),r[0]=nl(c+1/3,i,o),r[1]=nl(c,i,o),r[2]=nl(c-1/3,i,o);else if(~e.indexOf("="))return r=e.match(sg),s&&r.length<4&&(r[3]=1),r}else r=e.match(Yl)||Si.transparent;r=r.map(Number)}return t&&!m&&(i=r[0]/De,o=r[1]/De,a=r[2]/De,h=Math.max(i,o,a),d=Math.min(i,o,a),u=(h+d)/2,h===d?c=l=0:(f=h-d,l=u>.5?f/(2-h-d):f/(h+d),c=h===i?(o-a)/f+(oe&&(s+=_-t),r+=_,b=r-s,k=b-o,(k>0||x)&&(T=++h.frame,d=b-h.time*1e3,h.time=b=b/1e3,o+=k+(k>=i?4:i-k),v=1),x||(c=l(p)),v)for(f=0;f=_&&f--},_listeners:a},h}(),Gr=function(){return!uo&&Lt.wake()},be={},KP=/^[\d.\-M][\d.\-,\s]/,QP=/["']/g,JP=function(e){for(var t={},s=e.substr(1,e.length-3).split(":"),r=s[0],i=1,o=s.length,a,c,l;i1&&s.config?s.config.apply(null,~e.indexOf("{")?[JP(t[1])]:eR(e).split(",").map(dg)):be._CE&&KP.test(e)?be._CE("",e):s},Pg=function(e){return function(t){return 1-e(1-t)}},Rg=function n(e,t){for(var s=e._first,r;s;)s instanceof xt?n(s,t):s.vars.yoyoEase&&(!s._yoyo||!s._repeat)&&s._yoyo!==t&&(s.timeline?n(s.timeline,t):(r=s._ease,s._ease=s._yEase,s._yEase=r,s._yoyo=t)),s=s._next},Ys=function(e,t){return e&&(Xe(e)?e:be[e]||tR(e))||t},cr=function(e,t,s,r){s===void 0&&(s=function(c){return 1-t(1-c)}),r===void 0&&(r=function(c){return c<.5?t(c*2)/2:1-t((1-c)*2)/2});var i={easeIn:t,easeOut:s,easeInOut:r},o;return Pt(e,function(a){be[a]=Bt[a]=i,be[o=a.toLowerCase()]=s;for(var c in i)be[o+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=be[a+"."+c]=i[c]}),i},Dg=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},sl=function n(e,t,s){var r=t>=1?t:1,i=(s||(e?.3:.45))/(t<1?t:1),o=i/Hl*(Math.asin(1/r)||0),a=function(u){return u===1?1:r*Math.pow(2,-10*u)*AP((u-o)*i)+1},c=e==="out"?a:e==="in"?function(l){return 1-a(1-l)}:Dg(a);return i=Hl/i,c.config=function(l,u){return n(e,l,u)},c},rl=function n(e,t){t===void 0&&(t=1.70158);var s=function(o){return o?--o*o*((t+1)*o+t)+1:0},r=e==="out"?s:e==="in"?function(i){return 1-s(1-i)}:Dg(s);return r.config=function(i){return n(e,i)},r};Pt("Linear,Quad,Cubic,Quart,Quint,Strong",function(n,e){var t=e<5?e+1:e;cr(n+",Power"+(t-1),e?function(s){return Math.pow(s,t)}:function(s){return s},function(s){return 1-Math.pow(1-s,t)},function(s){return s<.5?Math.pow(s*2,t)/2:1-Math.pow((1-s)*2,t)/2})});be.Linear.easeNone=be.none=be.Linear.easeIn;cr("Elastic",sl("in"),sl("out"),sl());(function(n,e){var t=1/e,s=2*t,r=2.5*t,i=function(a){return a0?s+(s+this._rDelay)*this._repeat:s):this.totalDuration()&&this._dur},e.totalDuration=function(s){return arguments.length?(this._dirty=0,Yr(this,this._repeat<0?s:(s-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(s,r){if(Gr(),!arguments.length)return this._tTime;var i=this._dp;if(i&&i.smoothChildTiming&&this._ts){for(Ec(this,s),!i._dp||i.parent||mg(i,this);i&&i.parent;)i.parent._time!==i._start+(i._ts>=0?i._tTime/i._ts:(i.totalDuration()-i._tTime)/-i._ts)&&i.totalTime(i._tTime,!0),i=i.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&s0||!this._tDur&&!s)&&xn(this._dp,this,this._start-this._delay)}return(this._tTime!==s||!this._dur&&!r||this._initted&&Math.abs(this._zTime)===Me||!s&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=s),hg(this,s,r)),this},e.time=function(s,r){return arguments.length?this.totalTime(Math.min(this.totalDuration(),s+Mf(this))%(this._dur+this._rDelay)||(s?this._dur:0),r):this._time},e.totalProgress=function(s,r){return arguments.length?this.totalTime(this.totalDuration()*s,r):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(s,r){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-s:s)+Mf(this),r):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(s,r){var i=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(s-1)*i,r):this._repeat?Hr(this._tTime,i)+1:1},e.timeScale=function(s,r){if(!arguments.length)return this._rts===-Me?0:this._rts;if(this._rts===s)return this;var i=this.parent&&this._ts?Za(this.parent._time,this):this._tTime;return this._rts=+s||0,this._ts=this._ps||s===-Me?0:this._rts,this.totalTime(Mo(-Math.abs(this._delay),this._tDur,i),r!==!1),Tc(this),$P(this)},e.paused=function(s){return arguments.length?(this._ps!==s&&(this._ps=s,s?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Gr(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Me&&(this._tTime-=Me)))),this):this._ps},e.startTime=function(s){if(arguments.length){this._start=s;var r=this.parent||this._dp;return r&&(r._sort||!this.parent)&&xn(r,this,s-this._delay),this}return this._start},e.endTime=function(s){return this._start+(At(s)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(s){var r=this.parent||this._dp;return r?s&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Za(r.rawTime(s),this):this._tTime:this._tTime},e.revert=function(s){s===void 0&&(s=DP);var r=ft;return ft=s,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(s),this.totalTime(-.01,s.suppressEvents)),this.data!=="nested"&&s.kill!==!1&&this.kill(),ft=r,this},e.globalTime=function(s){for(var r=this,i=arguments.length?s:r.rawTime();r;)i=r._start+i/(Math.abs(r._ts)||1),r=r._dp;return!this.parent&&this._sat?this._sat.globalTime(s):i},e.repeat=function(s){return arguments.length?(this._repeat=s===1/0?-2:s,If(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(s){if(arguments.length){var r=this._time;return this._rDelay=s,If(this),r?this.time(r):this}return this._rDelay},e.yoyo=function(s){return arguments.length?(this._yoyo=s,this):this._yoyo},e.seek=function(s,r){return this.totalTime(Ht(this,s),At(r))},e.restart=function(s,r){return this.play().totalTime(s?-this._delay:0,At(r))},e.play=function(s,r){return s!=null&&this.seek(s,r),this.reversed(!1).paused(!1)},e.reverse=function(s,r){return s!=null&&this.seek(s||this.totalDuration(),r),this.reversed(!0).paused(!1)},e.pause=function(s,r){return s!=null&&this.seek(s,r),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(s){return arguments.length?(!!s!==this.reversed()&&this.timeScale(-this._rts||(s?-Me:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-Me,this},e.isActive=function(){var s=this.parent||this._dp,r=this._start,i;return!!(!s||this._ts&&this._initted&&s.isActive()&&(i=s.rawTime(!0))>=r&&i1?(r?(o[s]=r,i&&(o[s+"Params"]=i),s==="onUpdate"&&(this._onUpdate=r)):delete o[s],this):o[s]},e.then=function(s){var r=this;return new Promise(function(i){var o=Xe(s)?s:fg,a=function(){var l=r.then;r.then=null,Xe(o)&&(o=o(r))&&(o.then||o===r)&&(r.then=l),i(o),r.then=l};r._initted&&r.totalProgress()===1&&r._ts>=0||!r._tTime&&r._ts<0?a():r._prom=a})},e.kill=function(){Ci(this)},n}();en(ho.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Me,_prom:0,_ps:!1,_rts:1});var xt=function(n){eg(e,n);function e(s,r){var i;return s===void 0&&(s={}),i=n.call(this,s)||this,i.labels={},i.smoothChildTiming=!!s.smoothChildTiming,i.autoRemoveChildren=!!s.autoRemoveChildren,i._sort=At(s.sortChildren),qe&&xn(s.parent||qe,Ln(i),r),s.reversed&&i.reverse(),s.paused&&i.paused(!0),s.scrollTrigger&&gg(Ln(i),s.scrollTrigger),i}var t=e.prototype;return t.to=function(r,i,o){return Ni(0,arguments,this),this},t.from=function(r,i,o){return Ni(1,arguments,this),this},t.fromTo=function(r,i,o,a){return Ni(2,arguments,this),this},t.set=function(r,i,o){return i.duration=0,i.parent=this,Ii(i).repeatDelay||(i.repeat=0),i.immediateRender=!!i.immediateRender,new rt(r,i,Ht(this,o),1),this},t.call=function(r,i,o){return xn(this,rt.delayedCall(0,r,i),o)},t.staggerTo=function(r,i,o,a,c,l,u){return o.duration=i,o.stagger=o.stagger||a,o.onComplete=l,o.onCompleteParams=u,o.parent=this,new rt(r,o,Ht(this,c)),this},t.staggerFrom=function(r,i,o,a,c,l,u){return o.runBackwards=1,Ii(o).immediateRender=At(o.immediateRender),this.staggerTo(r,i,o,a,c,l,u)},t.staggerFromTo=function(r,i,o,a,c,l,u,h){return a.startAt=o,Ii(a).immediateRender=At(a.immediateRender),this.staggerTo(r,i,a,c,l,u,h)},t.render=function(r,i,o){var a=this._time,c=this._dirty?this.totalDuration():this._tDur,l=this._dur,u=r<=0?0:ct(r),h=this._zTime<0!=r<0&&(this._initted||!l),d,f,m,p,g,_,x,k,v,b,T,E;if(this!==qe&&u>c&&r>=0&&(u=c),u!==this._tTime||o||h){if(a!==this._time&&l&&(u+=this._time-a,r+=this._time-a),d=u,v=this._start,k=this._ts,_=!k,h&&(l||(a=this._zTime),(r||!i)&&(this._zTime=r)),this._repeat){if(T=this._yoyo,g=l+this._rDelay,this._repeat<-1&&r<0)return this.totalTime(g*100+r,i,o);if(d=ct(u%g),u===c?(p=this._repeat,d=l):(p=~~(u/g),p&&p===u/g&&(d=l,p--),d>l&&(d=l)),b=Hr(this._tTime,g),!a&&this._tTime&&b!==p&&this._tTime-b*g-this._dur<=0&&(b=p),T&&p&1&&(d=l-d,E=1),p!==b&&!this._lock){var w=T&&b&1,C=w===(T&&p&1);if(p=a&&r>=0)for(f=this._first;f;){if(m=f._next,(f._act||d>=f._start)&&f._ts&&x!==f){if(f.parent!==this)return this.render(r,i,o);if(f.render(f._ts>0?(d-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(d-f._start)*f._ts,i,o),d!==this._time||!this._ts&&!_){x=0,m&&(u+=this._zTime=-Me);break}}f=m}else{f=this._last;for(var S=r<0?r:d;f;){if(m=f._prev,(f._act||S<=f._end)&&f._ts&&x!==f){if(f.parent!==this)return this.render(r,i,o);if(f.render(f._ts>0?(S-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(S-f._start)*f._ts,i,o||ft&&(f._initted||f._startAt)),d!==this._time||!this._ts&&!_){x=0,m&&(u+=this._zTime=S?-Me:Me);break}}f=m}}if(x&&!i&&(this.pause(),x.render(d>=a?0:-Me)._zTime=d>=a?1:-1,this._ts))return this._start=v,Tc(this),this.render(r,i,o);this._onUpdate&&!i&&jt(this,"onUpdate",!0),(u===c&&this._tTime>=this.totalDuration()||!u&&a)&&(v===this._start||Math.abs(k)!==Math.abs(this._ts))&&(this._lock||((r||!l)&&(u===c&&this._ts>0||!u&&this._ts<0)&&Cs(this,1),!i&&!(r<0&&!a)&&(u||a||!c)&&(jt(this,u===c&&r>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(u0)&&this._prom())))}return this},t.add=function(r,i){var o=this;if(Zn(i)||(i=Ht(this,i,r)),!(r instanceof ho)){if(pt(r))return r.forEach(function(a){return o.add(a,i)}),this;if(ut(r))return this.addLabel(r,i);if(Xe(r))r=rt.delayedCall(0,r);else return this}return this!==r?xn(this,r,i):this},t.getChildren=function(r,i,o,a){r===void 0&&(r=!0),i===void 0&&(i=!0),o===void 0&&(o=!0),a===void 0&&(a=-Zt);for(var c=[],l=this._first;l;)l._start>=a&&(l instanceof rt?i&&c.push(l):(o&&c.push(l),r&&c.push.apply(c,l.getChildren(!0,i,o)))),l=l._next;return c},t.getById=function(r){for(var i=this.getChildren(1,1,1),o=i.length;o--;)if(i[o].vars.id===r)return i[o]},t.remove=function(r){return ut(r)?this.removeLabel(r):Xe(r)?this.killTweensOf(r):(kc(this,r),r===this._recent&&(this._recent=this._last),Hs(this))},t.totalTime=function(r,i){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ct(Lt.time-(this._ts>0?r/this._ts:(this.totalDuration()-r)/-this._ts))),n.prototype.totalTime.call(this,r,i),this._forcing=0,this):this._tTime},t.addLabel=function(r,i){return this.labels[r]=Ht(this,i),this},t.removeLabel=function(r){return delete this.labels[r],this},t.addPause=function(r,i,o){var a=rt.delayedCall(0,i||co,o);return a.data="isPause",this._hasPause=1,xn(this,a,Ht(this,r))},t.removePause=function(r){var i=this._first;for(r=Ht(this,r);i;)i._start===r&&i.data==="isPause"&&Cs(i),i=i._next},t.killTweensOf=function(r,i,o){for(var a=this.getTweensOf(r,o),c=a.length;c--;)us!==a[c]&&a[c].kill(r,i);return this},t.getTweensOf=function(r,i){for(var o=[],a=Kt(r),c=this._first,l=Zn(i),u;c;)c instanceof rt?MP(c._targets,a)&&(l?(!us||c._initted&&c._ts)&&c.globalTime(0)<=i&&c.globalTime(c.totalDuration())>i:!i||c.isActive())&&o.push(c):(u=c.getTweensOf(a,i)).length&&o.push.apply(o,u),c=c._next;return o},t.tweenTo=function(r,i){i=i||{};var o=this,a=Ht(o,r),c=i,l=c.startAt,u=c.onStart,h=c.onStartParams,d=c.immediateRender,f,m=rt.to(o,en({ease:i.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:i.duration||Math.abs((a-(l&&"time"in l?l.time:o._time))/o.timeScale())||Me,onStart:function(){if(o.pause(),!f){var g=i.duration||Math.abs((a-(l&&"time"in l?l.time:o._time))/o.timeScale());m._dur!==g&&Yr(m,g,0,1).render(m._time,!0,!0),f=1}u&&u.apply(m,h||[])}},i));return d?m.render(0):m},t.tweenFromTo=function(r,i,o){return this.tweenTo(i,en({startAt:{time:Ht(this,r)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(r){return r===void 0&&(r=this._time),Nf(this,Ht(this,r))},t.previousLabel=function(r){return r===void 0&&(r=this._time),Nf(this,Ht(this,r),1)},t.currentLabel=function(r){return arguments.length?this.seek(r,!0):this.previousLabel(this._time+Me)},t.shiftChildren=function(r,i,o){o===void 0&&(o=0);for(var a=this._first,c=this.labels,l;a;)a._start>=o&&(a._start+=r,a._end+=r),a=a._next;if(i)for(l in c)c[l]>=o&&(c[l]+=r);return Hs(this)},t.invalidate=function(r){var i=this._first;for(this._lock=0;i;)i.invalidate(r),i=i._next;return n.prototype.invalidate.call(this,r)},t.clear=function(r){r===void 0&&(r=!0);for(var i=this._first,o;i;)o=i._next,this.remove(i),i=o;return this._dp&&(this._time=this._tTime=this._pTime=0),r&&(this.labels={}),Hs(this)},t.totalDuration=function(r){var i=0,o=this,a=o._last,c=Zt,l,u,h;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-r:r));if(o._dirty){for(h=o.parent;a;)l=a._prev,a._dirty&&a.totalDuration(),u=a._start,u>c&&o._sort&&a._ts&&!o._lock?(o._lock=1,xn(o,a,u-a._delay,1)._lock=0):c=u,u<0&&a._ts&&(i-=u,(!h&&!o._dp||h&&h.smoothChildTiming)&&(o._start+=u/o._ts,o._time-=u,o._tTime-=u),o.shiftChildren(-u,!1,-1/0),c=0),a._end>i&&a._ts&&(i=a._end),a=l;Yr(o,o===qe&&o._time>i?o._time:i,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(r){if(qe._ts&&(hg(qe,Za(r,qe)),lg=Lt.frame),Lt.frame>=Rf){Rf+=Ut.autoSleep||120;var i=qe._first;if((!i||!i._ts)&&Ut.autoSleep&&Lt._listeners.length<2){for(;i&&!i._ts;)i=i._next;i||Lt.sleep()}}},e}(ho);en(xt.prototype,{_lock:0,_hasPause:0,_forcing:0});var nR=function(e,t,s,r,i,o,a){var c=new Rt(this._pt,e,t,0,1,jg,null,i),l=0,u=0,h,d,f,m,p,g,_,x;for(c.b=s,c.e=r,s+="",r+="",(_=~r.indexOf("random("))&&(r=lo(r)),o&&(x=[s,r],o(x,e,t),s=x[0],r=x[1]),d=s.match(el)||[];h=el.exec(r);)m=h[0],p=r.substring(l,h.index),f?f=(f+1)%5:p.substr(-5)==="rgba("&&(f=1),m!==d[u++]&&(g=parseFloat(d[u-1])||0,c._pt={_next:c._pt,p:p||u===1?p:",",s:g,c:m.charAt(1)==="="?Rr(g,m)-g:parseFloat(m)-g,m:f&&f<4?Math.round:0},l=el.lastIndex);return c.c=l")}),v.duration();else{T={};for(w in m)w==="ease"||w==="easeEach"||oR(w,m[w],T,m.easeEach);for(w in T)for(L=T[w].sort(function(z,V){return z.t-V.t}),O=0,b=0;bc-Me&&!u?c:rl&&(d=l)),_=this._yoyo&&m&1,_&&(v=this._yEase,d=l-d),g=Hr(this._tTime,p),d===a&&!o&&this._initted&&m===g)return this._tTime=h,this;m!==g&&(k&&this._yEase&&Rg(k,_),this.vars.repeatRefresh&&!_&&!this._lock&&this._time!==l&&this._initted&&(this._lock=o=1,this.render(ct(p*m),!0).invalidate()._lock=0))}if(!this._initted){if(_g(this,u?r:d,o,i,h))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&m!==g))return this;if(l!==this._dur)return this.render(r,i,o)}if(this._tTime=h,this._time=d,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=x=(v||this._ease)(d/l),this._from&&(this.ratio=x=1-x),d&&!a&&!i&&!m&&(jt(this,"onStart"),this._tTime!==h))return this;for(f=this._pt;f;)f.r(x,f.d),f=f._next;k&&k.render(r<0?r:!d&&_?-Me:k._dur*k._ease(d/this._dur),i,o)||this._startAt&&(this._zTime=r),this._onUpdate&&!i&&(u&&Zl(this,r,i,o),jt(this,"onUpdate")),this._repeat&&m!==g&&this.vars.onRepeat&&!i&&this.parent&&jt(this,"onRepeat"),(h===this._tDur||!h)&&this._tTime===h&&(u&&!this._onUpdate&&Zl(this,r,!0,!0),(r||!l)&&(h===this._tDur&&this._ts>0||!h&&this._ts<0)&&Cs(this,1),!i&&!(u&&!a)&&(h||a||_)&&(jt(this,h===c?"onComplete":"onReverseComplete",!0),this._prom&&!(h0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(r){return(!r||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(r),n.prototype.invalidate.call(this,r)},t.resetTo=function(r,i,o,a,c){uo||Lt.wake(),this._ts||this.play();var l=Math.min(this._dur,(this._dp._time-this._start)*this._ts),u;return this._initted||xh(this,l),u=this._ease(l/this._dur),rR(this,r,i,o,a,u,l,c)?this.resetTo(r,i,o,a,1):(Ec(this,0),this.parent||pg(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(r,i){if(i===void 0&&(i="all"),!r&&(!i||i==="all"))return this._lazy=this._pt=0,this.parent?Ci(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(r,i,us&&us.vars.overwrite!==!0)._first||Ci(this),this.parent&&o!==this.timeline.totalDuration()&&Yr(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,c=r?Kt(r):a,l=this._ptLookup,u=this._pt,h,d,f,m,p,g,_;if((!i||i==="all")&&NP(a,c))return i==="all"&&(this._pt=0),Ci(this);for(h=this._op=this._op||[],i!=="all"&&(ut(i)&&(p={},Pt(i,function(x){return p[x]=1}),i=p),i=iR(a,i)),_=a.length;_--;)if(~c.indexOf(a[_])){d=l[_],i==="all"?(h[_]=i,m=d,f={}):(f=h[_]=h[_]||{},m=i);for(p in m)g=d&&d[p],g&&((!("kill"in g.d)||g.d.kill(p)===!0)&&kc(this,g,"_pt"),delete d[p]),f!=="all"&&(f[p]=1)}return this._initted&&!this._pt&&u&&Ci(this),this},e.to=function(r,i){return new e(r,i,arguments[2])},e.from=function(r,i){return Ni(1,arguments)},e.delayedCall=function(r,i,o,a){return new e(i,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:r,onComplete:i,onReverseComplete:i,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(r,i,o){return Ni(2,arguments)},e.set=function(r,i){return i.duration=0,i.repeatDelay||(i.repeat=0),new e(r,i)},e.killTweensOf=function(r,i,o){return qe.killTweensOf(r,i,o)},e}(ho);en(rt.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});Pt("staggerTo,staggerFrom,staggerFromTo",function(n){rt[n]=function(){var e=new xt,t=Ql.call(arguments,0);return t.splice(n==="staggerFromTo"?5:4,0,0),e[n].apply(e,t)}});var wh=function(e,t,s){return e[t]=s},Fg=function(e,t,s){return e[t](s)},aR=function(e,t,s,r){return e[t](r.fp,s)},cR=function(e,t,s){return e.setAttribute(t,s)},kh=function(e,t){return Xe(e[t])?Fg:fh(e[t])&&e.setAttribute?cR:wh},Lg=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},lR=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},jg=function(e,t){var s=t._pt,r="";if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;s;)r=s.p+(s.m?s.m(s.s+s.c*e):Math.round((s.s+s.c*e)*1e4)/1e4)+r,s=s._next;r+=t.c}t.set(t.t,t.p,r,t)},Th=function(e,t){for(var s=t._pt;s;)s.r(e,s.d),s=s._next},uR=function(e,t,s,r){for(var i=this._pt,o;i;)o=i._next,i.p===r&&i.modifier(e,t,s),i=o},hR=function(e){for(var t=this._pt,s,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?kc(this,t,"_pt"):t.dep||(s=1),t=r;return!s},dR=function(e,t,s,r){r.mSet(e,t,r.m.call(r.tween,s,r.mt),r)},Vg=function(e){for(var t=e._pt,s,r,i,o;t;){for(s=t._next,r=i;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:o)?t._prev._next=t:i=t,(t._next=r)?r._prev=t:o=t,t=s}e._pt=i},Rt=function(){function n(t,s,r,i,o,a,c,l,u){this.t=s,this.s=i,this.c=o,this.p=r,this.r=a||Lg,this.d=c||this,this.set=l||wh,this.pr=u||0,this._next=t,t&&(t._prev=this)}var e=n.prototype;return e.modifier=function(s,r,i){this.mSet=this.mSet||this.set,this.set=dR,this.m=s,this.mt=i,this.tween=r},n}();Pt(yh+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(n){return _h[n]=1});Bt.TweenMax=Bt.TweenLite=rt;Bt.TimelineLite=Bt.TimelineMax=xt;qe=new xt({sortChildren:!1,defaults:qr,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Ut.stringFilter=Ag;var Gs=[],ha={},fR=[],Ff=0,pR=0,il=function(e){return(ha[e]||fR).map(function(t){return t()})},nu=function(){var e=Date.now(),t=[];e-Ff>2&&(il("matchMediaInit"),Gs.forEach(function(s){var r=s.queries,i=s.conditions,o,a,c,l;for(a in r)o=Yt.matchMedia(r[a]).matches,o&&(c=1),o!==i[a]&&(i[a]=o,l=1);l&&(s.revert(),c&&t.push(s))}),il("matchMediaRevert"),t.forEach(function(s){return s.onMatch(s,function(r){return s.add(null,r)})}),Ff=e,il("matchMedia"))},zg=function(){function n(t,s){this.selector=s&&Jl(s),this.data=[],this._r=[],this.isReverted=!1,this.id=pR++,t&&this.add(t)}var e=n.prototype;return e.add=function(s,r,i){Xe(s)&&(i=r,r=s,s=Xe);var o=this,a=function(){var l=Ge,u=o.selector,h;return l&&l!==o&&l.data.push(o),i&&(o.selector=Jl(i)),Ge=o,h=r.apply(o,arguments),Xe(h)&&o._r.push(h),Ge=l,o.selector=u,o.isReverted=!1,h};return o.last=a,s===Xe?a(o,function(c){return o.add(null,c)}):s?o[s]=a:a},e.ignore=function(s){var r=Ge;Ge=null,s(this),Ge=r},e.getTweens=function(){var s=[];return this.data.forEach(function(r){return r instanceof n?s.push.apply(s,r.getTweens()):r instanceof rt&&!(r.parent&&r.parent.data==="nested")&&s.push(r)}),s},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(s,r){var i=this;if(s?function(){for(var a=i.getTweens(),c=i.data.length,l;c--;)l=i.data[c],l.data==="isFlip"&&(l.revert(),l.getChildren(!0,!0,!1).forEach(function(u){return a.splice(a.indexOf(u),1)}));for(a.map(function(u){return{g:u._dur||u._delay||u._sat&&!u._sat.vars.immediateRender?u.globalTime(0):-1/0,t:u}}).sort(function(u,h){return h.g-u.g||-1/0}).forEach(function(u){return u.t.revert(s)}),c=i.data.length;c--;)l=i.data[c],l instanceof xt?l.data!=="nested"&&(l.scrollTrigger&&l.scrollTrigger.revert(),l.kill()):!(l instanceof rt)&&l.revert&&l.revert(s);i._r.forEach(function(u){return u(s,i)}),i.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),r)for(var o=Gs.length;o--;)Gs[o].id===this.id&&Gs.splice(o,1)},e.revert=function(s){this.kill(s||{})},n}(),mR=function(){function n(t){this.contexts=[],this.scope=t}var e=n.prototype;return e.add=function(s,r,i){On(s)||(s={matches:s});var o=new zg(0,i||this.scope),a=o.conditions={},c,l,u;Ge&&!o.selector&&(o.selector=Ge.selector),this.contexts.push(o),r=o.add("onMatch",r),o.queries=s;for(l in s)l==="all"?u=1:(c=Yt.matchMedia(s[l]),c&&(Gs.indexOf(o)<0&&Gs.push(o),(a[l]=c.matches)&&(u=1),c.addListener?c.addListener(nu):c.addEventListener("change",nu)));return u&&r(o,function(h){return o.add(null,h)}),this},e.revert=function(s){this.kill(s||{})},e.kill=function(s){this.contexts.forEach(function(r){return r.kill(s,!0)})},n}(),Ka={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),s=0;s1){var r=e.map(function(u){return It.quickSetter(u,t,s)}),i=r.length;return function(u){for(var h=i;h--;)r[h](u)}}e=e[0]||{};var o=$t[t],a=qs(e),c=a.harness&&(a.harness.aliases||{})[t]||t,l=o?function(u){var h=new o;Cr._pt=0,h.init(e,s?u+s:u,Cr,0,[e]),h.render(1,h),Cr._pt&&Th(1,Cr)}:a.set(e,c);return o?l:function(u){return l(e,c,s?u+s:u,a,1)}},quickTo:function(e,t,s){var r,i=It.to(e,nr((r={},r[t]="+=0.1",r.paused=!0,r),s||{})),o=function(c,l,u){return i.resetTo(t,c,l,u)};return o.tween=i,o},isTweening:function(e){return qe.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Ys(e.ease,qr.ease)),Df(qr,e||{})},config:function(e){return Df(Ut,e||{})},registerEffect:function(e){var t=e.name,s=e.effect,r=e.plugins,i=e.defaults,o=e.extendTimeline;(r||"").split(",").forEach(function(a){return a&&!$t[a]&&!Bt[a]&&ao(t+" effect requires "+a+" plugin.")}),tl[t]=function(a,c,l){return s(Kt(a),en(c||{},i),l)},o&&(xt.prototype[t]=function(a,c,l){return this.add(tl[t](a,On(c)?c:(l=c)&&{},this),l)})},registerEase:function(e,t){be[e]=Ys(t)},parseEase:function(e,t){return arguments.length?Ys(e,t):be},getById:function(e){return qe.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var s=new xt(e),r,i;for(s.smoothChildTiming=At(e.smoothChildTiming),qe.remove(s),s._dp=0,s._time=s._tTime=qe._time,r=qe._first;r;)i=r._next,(t||!(!r._dur&&r instanceof rt&&r.vars.onComplete===r._targets[0]))&&xn(s,r,r._start-r._delay),r=i;return xn(qe,s,0),s},context:function(e,t){return e?new zg(e,t):Ge},matchMedia:function(e){return new mR(e)},matchMediaRefresh:function(){return Gs.forEach(function(e){var t=e.conditions,s,r;for(r in t)t[r]&&(t[r]=!1,s=1);s&&e.revert()})||nu()},addEventListener:function(e,t){var s=ha[e]||(ha[e]=[]);~s.indexOf(t)||s.push(t)},removeEventListener:function(e,t){var s=ha[e],r=s&&s.indexOf(t);r>=0&&s.splice(r,1)},utils:{wrap:YP,wrapYoyo:GP,distribute:bg,random:wg,snap:xg,normalize:HP,getUnit:dt,clamp:UP,splitColor:Sg,toArray:Kt,selector:Jl,mapRange:Tg,pipe:WP,unitize:qP,interpolate:XP,shuffle:vg},install:ag,effects:tl,ticker:Lt,updateRoot:xt.updateRoot,plugins:$t,globalTimeline:qe,core:{PropTween:Rt,globals:cg,Tween:rt,Timeline:xt,Animation:ho,getCache:qs,_removeLinkedListItem:kc,reverting:function(){return ft},context:function(e){return e&&Ge&&(Ge.data.push(e),e._ctx=Ge),Ge},suppressOverwrites:function(e){return dh=e}}};Pt("to,from,fromTo,delayedCall,set,killTweensOf",function(n){return Ka[n]=rt[n]});Lt.add(xt.updateRoot);Cr=Ka.to({},{duration:0});var gR=function(e,t){for(var s=e._pt;s&&s.p!==t&&s.op!==t&&s.fp!==t;)s=s._next;return s},_R=function(e,t){var s=e._targets,r,i,o;for(r in t)for(i=s.length;i--;)o=e._ptLookup[i][r],o&&(o=o.d)&&(o._pt&&(o=gR(o,r)),o&&o.modifier&&o.modifier(t[r],e,s[i],r))},ol=function(e,t){return{name:e,rawVars:1,init:function(r,i,o){o._onInit=function(a){var c,l;if(ut(i)&&(c={},Pt(i,function(u){return c[u]=1}),i=c),t){c={};for(l in i)c[l]=t(i[l]);i=c}_R(a,i)}}}},It=Ka.registerPlugin({name:"attr",init:function(e,t,s,r,i){var o,a,c;this.tween=s;for(o in t)c=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(c||0)+"",t[o],r,i,0,0,o),a.op=o,a.b=c,this._props.push(o)},render:function(e,t){for(var s=t._pt;s;)ft?s.set(s.t,s.p,s.b,s):s.r(e,s.d),s=s._next}},{name:"endArray",init:function(e,t){for(var s=t.length;s--;)this.add(e,s,e[s]||0,t[s],0,0,0,0,0,1)}},ol("roundProps",eu),ol("modifiers"),ol("snap",xg))||Ka;rt.version=xt.version=It.version="3.12.4";og=1;ph()&&Gr();be.Power0;be.Power1;be.Power2;be.Power3;be.Power4;be.Linear;be.Quad;be.Cubic;be.Quart;be.Quint;be.Strong;be.Elastic;be.Back;be.SteppedEase;be.Bounce;be.Sine;be.Expo;be.Circ;/*! +*/var Bt={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},qr={duration:.5,overwrite:!1,delay:0},hh,ft,Ge,Zt=1e8,Me=1/Zt,Hl=Math.PI*2,SP=Hl/4,OP=0,ng=Math.sqrt,AP=Math.cos,PP=Math.sin,ut=function(e){return typeof e=="string"},Xe=function(e){return typeof e=="function"},Zn=function(e){return typeof e=="number"},dh=function(e){return typeof e>"u"},On=function(e){return typeof e=="object"},At=function(e){return e!==!1},fh=function(){return typeof window<"u"},sa=function(e){return Xe(e)||ut(e)},sg=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},pt=Array.isArray,Yl=/(?:-?\.?\d|\.)+/gi,rg=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Er=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,tl=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,ig=/[+-]=-?[.\d]+/,og=/[^,'"\[\]\s]+/gi,RP=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,qe,Yt,Gl,ph,Wt={},Ga={},ag,cg=function(e){return(Ga=nr(e,Wt))&&It},mh=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},ao=function(e,t){return!t&&console.warn(e)},lg=function(e,t){return e&&(Wt[e]=t)&&Ga&&(Ga[e]=t)||Wt},co=function(){return 0},DP={suppressEvents:!0,isStart:!0,kill:!1},la={suppressEvents:!0,kill:!1},MP={suppressEvents:!0},gh={},ms=[],Xl={},ug,Ft={},nl={},Rf=30,ua=[],_h="",yh=function(e){var t=e[0],s,r;if(On(t)||Xe(t)||(e=[e]),!(s=(t._gsap||{}).harness)){for(r=ua.length;r--&&!ua[r].targetTest(t););s=ua[r]}for(r=e.length;r--;)e[r]&&(e[r]._gsap||(e[r]._gsap=new Ig(e[r],s)))||e.splice(r,1);return e},qs=function(e){return e._gsap||yh(Kt(e))[0]._gsap},hg=function(e,t,s){return(s=e[t])&&Xe(s)?e[t]():dh(s)&&e.getAttribute&&e.getAttribute(t)||s},Pt=function(e,t){return(e=e.split(",")).forEach(t)||e},tt=function(e){return Math.round(e*1e5)/1e5||0},ct=function(e){return Math.round(e*1e7)/1e7||0},Rr=function(e,t){var s=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),s==="+"?e+r:s==="-"?e-r:s==="*"?e*r:e/r},IP=function(e,t){for(var s=t.length,r=0;e.indexOf(t[r])<0&&++ra;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[s],e[s]=t),t._next?t._next._prev=t:e[r]=t,t._prev=o,t.parent=t._dp=e,t},Tc=function(e,t,s,r){s===void 0&&(s="_first"),r===void 0&&(r="_last");var i=t._prev,o=t._next;i?i._next=o:e[s]===t&&(e[s]=o),o?o._prev=i:e[r]===t&&(e[r]=i),t._next=t._prev=t.parent=null},Cs=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Hs=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var s=e;s;)s._dirty=1,s=s.parent;return e},FP=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},Zl=function(e,t,s,r){return e._startAt&&(ft?e._startAt.revert(la):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},LP=function n(e){return!e||e._ts&&n(e.parent)},Mf=function(e){return e._repeat?Hr(e._tTime,e=e.duration()+e._rDelay)*e:0},Hr=function(e,t){var s=Math.floor(e/=t);return e&&s===e?s-1:s},Ka=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Ec=function(e){return e._end=ct(e._start+(e._tDur/Math.abs(e._ts||e._rts||Me)||0))},Cc=function(e,t){var s=e._dp;return s&&s.smoothChildTiming&&e._ts&&(e._start=ct(s._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Ec(e),s._dirty||Hs(s,e)),e},gg=function(e,t){var s;if((t._time||!t._dur&&t._initted||t._startMe)&&t.render(s,!0)),Hs(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur=0&&s.totalTime(s._tTime),s=s._dp;e._zTime=-Me}},xn=function(e,t,s,r){return t.parent&&Cs(t),t._start=ct((Zn(s)?s:s||e!==qe?Ht(e,s,t):e._time)+t._delay),t._end=ct(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),mg(e,t,"_first","_last",e._sort?"_start":0),Kl(t)||(e._recent=t),r||gg(e,t),e._ts<0&&Cc(e,e._tTime),e},_g=function(e,t){return(Wt.ScrollTrigger||mh("scrollTrigger",t))&&Wt.ScrollTrigger.create(t,e)},yg=function(e,t,s,r,i){if(bh(e,t,i),!e._initted)return 1;if(!s&&e._pt&&!ft&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&ug!==jt.frame)return ms.push(e),e._lazy=[i,r],1},jP=function n(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||n(t))},Kl=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},VP=function(e,t,s,r){var i=e.ratio,o=t<0||!t&&(!e._start&&jP(e)&&!(!e._initted&&Kl(e))||(e._ts<0||e._dp._ts<0)&&!Kl(e))?0:1,a=e._rDelay,c=0,l,u,h;if(a&&e._repeat&&(c=Mo(0,e._tDur,t),u=Hr(c,a),e._yoyo&&u&1&&(o=1-o),u!==Hr(e._tTime,a)&&(i=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==i||ft||r||e._zTime===Me||!t&&e._zTime){if(!e._initted&&yg(e,t,r,s,c))return;for(h=e._zTime,e._zTime=t||(s?Me:0),s||(s=t&&!h),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=c,l=e._pt;l;)l.r(o,l.d),l=l._next;t<0&&Zl(e,t,s,!0),e._onUpdate&&!s&&Vt(e,"onUpdate"),c&&e._repeat&&!s&&e.parent&&Vt(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&Cs(e,1),!s&&!ft&&(Vt(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},zP=function(e,t,s){var r;if(s>t)for(r=e._first;r&&r._start<=s;){if(r.data==="isPause"&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=s;){if(r.data==="isPause"&&r._start0&&!r&&Cc(e,e._tTime=e._tDur*a),e.parent&&Ec(e),s||Hs(e.parent,e),e},If=function(e){return e instanceof xt?Hs(e):Yr(e,e._dur)},UP={_start:0,endTime:co,totalDuration:co},Ht=function n(e,t,s){var r=e.labels,i=e._recent||UP,o=e.duration()>=Zt?i.endTime(!1):e._dur,a,c,l;return ut(t)&&(isNaN(t)||t in r)?(c=t.charAt(0),l=t.substr(-1)==="%",a=t.indexOf("="),c==="<"||c===">"?(a>=0&&(t=t.replace(/=/,"")),(c==="<"?i._start:i.endTime(i._repeat>=0))+(parseFloat(t.substr(1))||0)*(l?(a<0?i:s).totalDuration()/100:1)):a<0?(t in r||(r[t]=o),r[t]):(c=parseFloat(t.charAt(a-1)+t.substr(a+1)),l&&s&&(c=c/100*(pt(s)?s[0]:s).totalDuration()),a>1?n(e,t.substr(0,a-1),s)+c:o+c)):t==null?o:+t},Ni=function(e,t,s){var r=Zn(t[1]),i=(r?2:1)+(e<2?0:1),o=t[i],a,c;if(r&&(o.duration=t[1]),o.parent=s,e){for(a=o,c=s;c&&!("immediateRender"in a);)a=c.vars.defaults||{},c=At(c.vars.inherit)&&c.parent;o.immediateRender=At(a.immediateRender),e<2?o.runBackwards=1:o.startAt=t[i-1]}return new rt(t[0],o,t[i+1])},Rs=function(e,t){return e||e===0?t(e):t},Mo=function(e,t,s){return st?t:s},dt=function(e,t){return!ut(e)||!(t=RP.exec(e))?"":t[1]},BP=function(e,t,s){return Rs(s,function(r){return Mo(e,t,r)})},Ql=[].slice,vg=function(e,t){return e&&On(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&On(e[0]))&&!e.nodeType&&e!==Yt},WP=function(e,t,s){return s===void 0&&(s=[]),e.forEach(function(r){var i;return ut(r)&&!t||vg(r,1)?(i=s).push.apply(i,Kt(r)):s.push(r)})||s},Kt=function(e,t,s){return Ge&&!t&&Ge.selector?Ge.selector(e):ut(e)&&!s&&(Gl||!Gr())?Ql.call((t||ph).querySelectorAll(e),0):pt(e)?WP(e,s):vg(e)?Ql.call(e,0):e?[e]:[]},Jl=function(e){return e=Kt(e)[0]||ao("Invalid scope")||{},function(t){var s=e.current||e.nativeElement||e;return Kt(t,s.querySelectorAll?s:s===e?ao("Invalid scope")||ph.createElement("div"):e)}},bg=function(e){return e.sort(function(){return .5-Math.random()})},xg=function(e){if(Xe(e))return e;var t=On(e)?e:{each:e},s=Ys(t.ease),r=t.from||0,i=parseFloat(t.base)||0,o={},a=r>0&&r<1,c=isNaN(r)||a,l=t.axis,u=r,h=r;return ut(r)?u=h={center:.5,edges:.5,end:1}[r]||0:!a&&c&&(u=r[0],h=r[1]),function(d,f,m){var p=(m||t).length,g=o[p],_,w,k,b,v,T,E,x,C;if(!g){if(C=t.grid==="auto"?0:(t.grid||[1,Zt])[1],!C){for(E=-Zt;E<(E=m[C++].getBoundingClientRect().left)&&CE&&(E=v),vp?p-1:l?l==="y"?p/C:C:Math.max(C,p/C))||0)*(r==="edges"?-1:1),g.b=p<0?i-p:i,g.u=dt(t.amount||t.each)||0,s=s&&p<0?Rg(s):s}return p=(g[d]-g.min)/g.max||0,ct(g.b+(s?s(p):p)*g.v)+g.u}},eu=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(s){var r=ct(Math.round(parseFloat(s)/e)*e*t);return(r-r%1)/t+(Zn(s)?0:dt(s))}},wg=function(e,t){var s=pt(e),r,i;return!s&&On(e)&&(r=s=e.radius||Zt,e.values?(e=Kt(e.values),(i=!Zn(e[0]))&&(r*=r)):e=eu(e.increment)),Rs(t,s?Xe(e)?function(o){return i=e(o),Math.abs(i-o)<=r?i:o}:function(o){for(var a=parseFloat(i?o.x:o),c=parseFloat(i?o.y:0),l=Zt,u=0,h=e.length,d,f;h--;)i?(d=e[h].x-a,f=e[h].y-c,d=d*d+f*f):d=Math.abs(e[h]-a),dr?i-o:o)})},lo=function(e){for(var t=0,s="",r,i,o,a;~(r=e.indexOf("random(",t));)o=e.indexOf(")",r),a=e.charAt(r+7)==="[",i=e.substr(r+7,o-r-7).match(a?og:Yl),s+=e.substr(t,r-t)+kg(a?i:+i[0],a?0:+i[1],+i[2]||1e-5),t=o+1;return s+e.substr(t,e.length-t)},Eg=function(e,t,s,r,i){var o=t-e,a=r-s;return Rs(i,function(c){return s+((c-e)/o*a||0)})},ZP=function n(e,t,s,r){var i=isNaN(e+t)?0:function(f){return(1-f)*e+f*t};if(!i){var o=ut(e),a={},c,l,u,h,d;if(s===!0&&(r=1)&&(s=null),o)e={p:e},t={p:t};else if(pt(e)&&!pt(t)){for(u=[],h=e.length,d=h-2,l=1;l(a=Math.abs(a))&&(c=o,i=a);return c},Vt=function(e,t,s){var r=e.vars,i=r[t],o=Ge,a=e._ctx,c,l,u;if(i)return c=r[t+"Params"],l=r.callbackScope||e,s&&ms.length&&Xa(),a&&(Ge=a),u=c?i.apply(l,c):i.call(l),Ge=o,u},Ci=function(e){return Cs(e),e.scrollTrigger&&e.scrollTrigger.kill(!!ft),e.progress()<1&&Vt(e,"onInterrupt"),e},Cr,Cg=[],Sg=function(e){if(fh()&&e){e=!e.name&&e.default||e;var t=e.name,s=Xe(e),r=t&&!s&&e.init?function(){this._props=[]}:e,i={init:co,render:kh,add:vh,kill:dR,modifier:hR,rawVars:0},o={targetTest:0,get:0,getSetter:wh,aliases:{},register:0};if(Gr(),e!==r){if(Ft[t])return;en(r,en(Za(e,i),o)),nr(r.prototype,nr(i,Za(e,o))),Ft[r.prop=t]=r,e.targetTest&&(ua.push(r),gh[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}lg(t,r),e.register&&e.register(It,r,Rt)}else e&&Cg.push(e)},De=255,Si={aqua:[0,De,De],lime:[0,De,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,De],navy:[0,0,128],white:[De,De,De],olive:[128,128,0],yellow:[De,De,0],orange:[De,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[De,0,0],pink:[De,192,203],cyan:[0,De,De],transparent:[De,De,De,0]},sl=function(e,t,s){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(s-t)*e*6:e<.5?s:e*3<2?t+(s-t)*(2/3-e)*6:t)*De+.5|0},Og=function(e,t,s){var r=e?Zn(e)?[e>>16,e>>8&De,e&De]:0:Si.black,i,o,a,c,l,u,h,d,f,m;if(!r){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Si[e])r=Si[e];else if(e.charAt(0)==="#"){if(e.length<6&&(i=e.charAt(1),o=e.charAt(2),a=e.charAt(3),e="#"+i+i+o+o+a+a+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return r=parseInt(e.substr(1,6),16),[r>>16,r>>8&De,r&De,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),r=[e>>16,e>>8&De,e&De]}else if(e.substr(0,3)==="hsl"){if(r=m=e.match(Yl),!t)c=+r[0]%360/360,l=+r[1]/100,u=+r[2]/100,o=u<=.5?u*(l+1):u+l-u*l,i=u*2-o,r.length>3&&(r[3]*=1),r[0]=sl(c+1/3,i,o),r[1]=sl(c,i,o),r[2]=sl(c-1/3,i,o);else if(~e.indexOf("="))return r=e.match(rg),s&&r.length<4&&(r[3]=1),r}else r=e.match(Yl)||Si.transparent;r=r.map(Number)}return t&&!m&&(i=r[0]/De,o=r[1]/De,a=r[2]/De,h=Math.max(i,o,a),d=Math.min(i,o,a),u=(h+d)/2,h===d?c=l=0:(f=h-d,l=u>.5?f/(2-h-d):f/(h+d),c=h===i?(o-a)/f+(oe&&(s+=_-t),r+=_,v=r-s,k=v-o,(k>0||w)&&(T=++h.frame,d=v-h.time*1e3,h.time=v=v/1e3,o+=k+(k>=i?4:i-k),b=1),w||(c=l(p)),b)for(f=0;f=_&&f--},_listeners:a},h}(),Gr=function(){return!uo&&jt.wake()},be={},QP=/^[\d.\-M][\d.\-,\s]/,JP=/["']/g,eR=function(e){for(var t={},s=e.substr(1,e.length-3).split(":"),r=s[0],i=1,o=s.length,a,c,l;i1&&s.config?s.config.apply(null,~e.indexOf("{")?[eR(t[1])]:tR(e).split(",").map(fg)):be._CE&&QP.test(e)?be._CE("",e):s},Rg=function(e){return function(t){return 1-e(1-t)}},Dg=function n(e,t){for(var s=e._first,r;s;)s instanceof xt?n(s,t):s.vars.yoyoEase&&(!s._yoyo||!s._repeat)&&s._yoyo!==t&&(s.timeline?n(s.timeline,t):(r=s._ease,s._ease=s._yEase,s._yEase=r,s._yoyo=t)),s=s._next},Ys=function(e,t){return e&&(Xe(e)?e:be[e]||nR(e))||t},cr=function(e,t,s,r){s===void 0&&(s=function(c){return 1-t(1-c)}),r===void 0&&(r=function(c){return c<.5?t(c*2)/2:1-t((1-c)*2)/2});var i={easeIn:t,easeOut:s,easeInOut:r},o;return Pt(e,function(a){be[a]=Wt[a]=i,be[o=a.toLowerCase()]=s;for(var c in i)be[o+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=be[a+"."+c]=i[c]}),i},Mg=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},rl=function n(e,t,s){var r=t>=1?t:1,i=(s||(e?.3:.45))/(t<1?t:1),o=i/Hl*(Math.asin(1/r)||0),a=function(u){return u===1?1:r*Math.pow(2,-10*u)*PP((u-o)*i)+1},c=e==="out"?a:e==="in"?function(l){return 1-a(1-l)}:Mg(a);return i=Hl/i,c.config=function(l,u){return n(e,l,u)},c},il=function n(e,t){t===void 0&&(t=1.70158);var s=function(o){return o?--o*o*((t+1)*o+t)+1:0},r=e==="out"?s:e==="in"?function(i){return 1-s(1-i)}:Mg(s);return r.config=function(i){return n(e,i)},r};Pt("Linear,Quad,Cubic,Quart,Quint,Strong",function(n,e){var t=e<5?e+1:e;cr(n+",Power"+(t-1),e?function(s){return Math.pow(s,t)}:function(s){return s},function(s){return 1-Math.pow(1-s,t)},function(s){return s<.5?Math.pow(s*2,t)/2:1-Math.pow((1-s)*2,t)/2})});be.Linear.easeNone=be.none=be.Linear.easeIn;cr("Elastic",rl("in"),rl("out"),rl());(function(n,e){var t=1/e,s=2*t,r=2.5*t,i=function(a){return a0?s+(s+this._rDelay)*this._repeat:s):this.totalDuration()&&this._dur},e.totalDuration=function(s){return arguments.length?(this._dirty=0,Yr(this,this._repeat<0?s:(s-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(s,r){if(Gr(),!arguments.length)return this._tTime;var i=this._dp;if(i&&i.smoothChildTiming&&this._ts){for(Cc(this,s),!i._dp||i.parent||gg(i,this);i&&i.parent;)i.parent._time!==i._start+(i._ts>=0?i._tTime/i._ts:(i.totalDuration()-i._tTime)/-i._ts)&&i.totalTime(i._tTime,!0),i=i.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&s0||!this._tDur&&!s)&&xn(this._dp,this,this._start-this._delay)}return(this._tTime!==s||!this._dur&&!r||this._initted&&Math.abs(this._zTime)===Me||!s&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=s),dg(this,s,r)),this},e.time=function(s,r){return arguments.length?this.totalTime(Math.min(this.totalDuration(),s+Mf(this))%(this._dur+this._rDelay)||(s?this._dur:0),r):this._time},e.totalProgress=function(s,r){return arguments.length?this.totalTime(this.totalDuration()*s,r):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},e.progress=function(s,r){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-s:s)+Mf(this),r):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(s,r){var i=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(s-1)*i,r):this._repeat?Hr(this._tTime,i)+1:1},e.timeScale=function(s,r){if(!arguments.length)return this._rts===-Me?0:this._rts;if(this._rts===s)return this;var i=this.parent&&this._ts?Ka(this.parent._time,this):this._tTime;return this._rts=+s||0,this._ts=this._ps||s===-Me?0:this._rts,this.totalTime(Mo(-Math.abs(this._delay),this._tDur,i),r!==!1),Ec(this),FP(this)},e.paused=function(s){return arguments.length?(this._ps!==s&&(this._ps=s,s?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Gr(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==Me&&(this._tTime-=Me)))),this):this._ps},e.startTime=function(s){if(arguments.length){this._start=s;var r=this.parent||this._dp;return r&&(r._sort||!this.parent)&&xn(r,this,s-this._delay),this}return this._start},e.endTime=function(s){return this._start+(At(s)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(s){var r=this.parent||this._dp;return r?s&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Ka(r.rawTime(s),this):this._tTime:this._tTime},e.revert=function(s){s===void 0&&(s=MP);var r=ft;return ft=s,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(s),this.totalTime(-.01,s.suppressEvents)),this.data!=="nested"&&s.kill!==!1&&this.kill(),ft=r,this},e.globalTime=function(s){for(var r=this,i=arguments.length?s:r.rawTime();r;)i=r._start+i/(Math.abs(r._ts)||1),r=r._dp;return!this.parent&&this._sat?this._sat.globalTime(s):i},e.repeat=function(s){return arguments.length?(this._repeat=s===1/0?-2:s,If(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(s){if(arguments.length){var r=this._time;return this._rDelay=s,If(this),r?this.time(r):this}return this._rDelay},e.yoyo=function(s){return arguments.length?(this._yoyo=s,this):this._yoyo},e.seek=function(s,r){return this.totalTime(Ht(this,s),At(r))},e.restart=function(s,r){return this.play().totalTime(s?-this._delay:0,At(r))},e.play=function(s,r){return s!=null&&this.seek(s,r),this.reversed(!1).paused(!1)},e.reverse=function(s,r){return s!=null&&this.seek(s||this.totalDuration(),r),this.reversed(!0).paused(!1)},e.pause=function(s,r){return s!=null&&this.seek(s,r),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(s){return arguments.length?(!!s!==this.reversed()&&this.timeScale(-this._rts||(s?-Me:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-Me,this},e.isActive=function(){var s=this.parent||this._dp,r=this._start,i;return!!(!s||this._ts&&this._initted&&s.isActive()&&(i=s.rawTime(!0))>=r&&i1?(r?(o[s]=r,i&&(o[s+"Params"]=i),s==="onUpdate"&&(this._onUpdate=r)):delete o[s],this):o[s]},e.then=function(s){var r=this;return new Promise(function(i){var o=Xe(s)?s:pg,a=function(){var l=r.then;r.then=null,Xe(o)&&(o=o(r))&&(o.then||o===r)&&(r.then=l),i(o),r.then=l};r._initted&&r.totalProgress()===1&&r._ts>=0||!r._tTime&&r._ts<0?a():r._prom=a})},e.kill=function(){Ci(this)},n}();en(ho.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Me,_prom:0,_ps:!1,_rts:1});var xt=function(n){tg(e,n);function e(s,r){var i;return s===void 0&&(s={}),i=n.call(this,s)||this,i.labels={},i.smoothChildTiming=!!s.smoothChildTiming,i.autoRemoveChildren=!!s.autoRemoveChildren,i._sort=At(s.sortChildren),qe&&xn(s.parent||qe,Ln(i),r),s.reversed&&i.reverse(),s.paused&&i.paused(!0),s.scrollTrigger&&_g(Ln(i),s.scrollTrigger),i}var t=e.prototype;return t.to=function(r,i,o){return Ni(0,arguments,this),this},t.from=function(r,i,o){return Ni(1,arguments,this),this},t.fromTo=function(r,i,o,a){return Ni(2,arguments,this),this},t.set=function(r,i,o){return i.duration=0,i.parent=this,Ii(i).repeatDelay||(i.repeat=0),i.immediateRender=!!i.immediateRender,new rt(r,i,Ht(this,o),1),this},t.call=function(r,i,o){return xn(this,rt.delayedCall(0,r,i),o)},t.staggerTo=function(r,i,o,a,c,l,u){return o.duration=i,o.stagger=o.stagger||a,o.onComplete=l,o.onCompleteParams=u,o.parent=this,new rt(r,o,Ht(this,c)),this},t.staggerFrom=function(r,i,o,a,c,l,u){return o.runBackwards=1,Ii(o).immediateRender=At(o.immediateRender),this.staggerTo(r,i,o,a,c,l,u)},t.staggerFromTo=function(r,i,o,a,c,l,u,h){return a.startAt=o,Ii(a).immediateRender=At(a.immediateRender),this.staggerTo(r,i,a,c,l,u,h)},t.render=function(r,i,o){var a=this._time,c=this._dirty?this.totalDuration():this._tDur,l=this._dur,u=r<=0?0:ct(r),h=this._zTime<0!=r<0&&(this._initted||!l),d,f,m,p,g,_,w,k,b,v,T,E;if(this!==qe&&u>c&&r>=0&&(u=c),u!==this._tTime||o||h){if(a!==this._time&&l&&(u+=this._time-a,r+=this._time-a),d=u,b=this._start,k=this._ts,_=!k,h&&(l||(a=this._zTime),(r||!i)&&(this._zTime=r)),this._repeat){if(T=this._yoyo,g=l+this._rDelay,this._repeat<-1&&r<0)return this.totalTime(g*100+r,i,o);if(d=ct(u%g),u===c?(p=this._repeat,d=l):(p=~~(u/g),p&&p===u/g&&(d=l,p--),d>l&&(d=l)),v=Hr(this._tTime,g),!a&&this._tTime&&v!==p&&this._tTime-v*g-this._dur<=0&&(v=p),T&&p&1&&(d=l-d,E=1),p!==v&&!this._lock){var x=T&&v&1,C=x===(T&&p&1);if(p=a&&r>=0)for(f=this._first;f;){if(m=f._next,(f._act||d>=f._start)&&f._ts&&w!==f){if(f.parent!==this)return this.render(r,i,o);if(f.render(f._ts>0?(d-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(d-f._start)*f._ts,i,o),d!==this._time||!this._ts&&!_){w=0,m&&(u+=this._zTime=-Me);break}}f=m}else{f=this._last;for(var S=r<0?r:d;f;){if(m=f._prev,(f._act||S<=f._end)&&f._ts&&w!==f){if(f.parent!==this)return this.render(r,i,o);if(f.render(f._ts>0?(S-f._start)*f._ts:(f._dirty?f.totalDuration():f._tDur)+(S-f._start)*f._ts,i,o||ft&&(f._initted||f._startAt)),d!==this._time||!this._ts&&!_){w=0,m&&(u+=this._zTime=S?-Me:Me);break}}f=m}}if(w&&!i&&(this.pause(),w.render(d>=a?0:-Me)._zTime=d>=a?1:-1,this._ts))return this._start=b,Ec(this),this.render(r,i,o);this._onUpdate&&!i&&Vt(this,"onUpdate",!0),(u===c&&this._tTime>=this.totalDuration()||!u&&a)&&(b===this._start||Math.abs(k)!==Math.abs(this._ts))&&(this._lock||((r||!l)&&(u===c&&this._ts>0||!u&&this._ts<0)&&Cs(this,1),!i&&!(r<0&&!a)&&(u||a||!c)&&(Vt(this,u===c&&r>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(u0)&&this._prom())))}return this},t.add=function(r,i){var o=this;if(Zn(i)||(i=Ht(this,i,r)),!(r instanceof ho)){if(pt(r))return r.forEach(function(a){return o.add(a,i)}),this;if(ut(r))return this.addLabel(r,i);if(Xe(r))r=rt.delayedCall(0,r);else return this}return this!==r?xn(this,r,i):this},t.getChildren=function(r,i,o,a){r===void 0&&(r=!0),i===void 0&&(i=!0),o===void 0&&(o=!0),a===void 0&&(a=-Zt);for(var c=[],l=this._first;l;)l._start>=a&&(l instanceof rt?i&&c.push(l):(o&&c.push(l),r&&c.push.apply(c,l.getChildren(!0,i,o)))),l=l._next;return c},t.getById=function(r){for(var i=this.getChildren(1,1,1),o=i.length;o--;)if(i[o].vars.id===r)return i[o]},t.remove=function(r){return ut(r)?this.removeLabel(r):Xe(r)?this.killTweensOf(r):(Tc(this,r),r===this._recent&&(this._recent=this._last),Hs(this))},t.totalTime=function(r,i){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ct(jt.time-(this._ts>0?r/this._ts:(this.totalDuration()-r)/-this._ts))),n.prototype.totalTime.call(this,r,i),this._forcing=0,this):this._tTime},t.addLabel=function(r,i){return this.labels[r]=Ht(this,i),this},t.removeLabel=function(r){return delete this.labels[r],this},t.addPause=function(r,i,o){var a=rt.delayedCall(0,i||co,o);return a.data="isPause",this._hasPause=1,xn(this,a,Ht(this,r))},t.removePause=function(r){var i=this._first;for(r=Ht(this,r);i;)i._start===r&&i.data==="isPause"&&Cs(i),i=i._next},t.killTweensOf=function(r,i,o){for(var a=this.getTweensOf(r,o),c=a.length;c--;)us!==a[c]&&a[c].kill(r,i);return this},t.getTweensOf=function(r,i){for(var o=[],a=Kt(r),c=this._first,l=Zn(i),u;c;)c instanceof rt?IP(c._targets,a)&&(l?(!us||c._initted&&c._ts)&&c.globalTime(0)<=i&&c.globalTime(c.totalDuration())>i:!i||c.isActive())&&o.push(c):(u=c.getTweensOf(a,i)).length&&o.push.apply(o,u),c=c._next;return o},t.tweenTo=function(r,i){i=i||{};var o=this,a=Ht(o,r),c=i,l=c.startAt,u=c.onStart,h=c.onStartParams,d=c.immediateRender,f,m=rt.to(o,en({ease:i.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:i.duration||Math.abs((a-(l&&"time"in l?l.time:o._time))/o.timeScale())||Me,onStart:function(){if(o.pause(),!f){var g=i.duration||Math.abs((a-(l&&"time"in l?l.time:o._time))/o.timeScale());m._dur!==g&&Yr(m,g,0,1).render(m._time,!0,!0),f=1}u&&u.apply(m,h||[])}},i));return d?m.render(0):m},t.tweenFromTo=function(r,i,o){return this.tweenTo(i,en({startAt:{time:Ht(this,r)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(r){return r===void 0&&(r=this._time),Nf(this,Ht(this,r))},t.previousLabel=function(r){return r===void 0&&(r=this._time),Nf(this,Ht(this,r),1)},t.currentLabel=function(r){return arguments.length?this.seek(r,!0):this.previousLabel(this._time+Me)},t.shiftChildren=function(r,i,o){o===void 0&&(o=0);for(var a=this._first,c=this.labels,l;a;)a._start>=o&&(a._start+=r,a._end+=r),a=a._next;if(i)for(l in c)c[l]>=o&&(c[l]+=r);return Hs(this)},t.invalidate=function(r){var i=this._first;for(this._lock=0;i;)i.invalidate(r),i=i._next;return n.prototype.invalidate.call(this,r)},t.clear=function(r){r===void 0&&(r=!0);for(var i=this._first,o;i;)o=i._next,this.remove(i),i=o;return this._dp&&(this._time=this._tTime=this._pTime=0),r&&(this.labels={}),Hs(this)},t.totalDuration=function(r){var i=0,o=this,a=o._last,c=Zt,l,u,h;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-r:r));if(o._dirty){for(h=o.parent;a;)l=a._prev,a._dirty&&a.totalDuration(),u=a._start,u>c&&o._sort&&a._ts&&!o._lock?(o._lock=1,xn(o,a,u-a._delay,1)._lock=0):c=u,u<0&&a._ts&&(i-=u,(!h&&!o._dp||h&&h.smoothChildTiming)&&(o._start+=u/o._ts,o._time-=u,o._tTime-=u),o.shiftChildren(-u,!1,-1/0),c=0),a._end>i&&a._ts&&(i=a._end),a=l;Yr(o,o===qe&&o._time>i?o._time:i,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(r){if(qe._ts&&(dg(qe,Ka(r,qe)),ug=jt.frame),jt.frame>=Rf){Rf+=Bt.autoSleep||120;var i=qe._first;if((!i||!i._ts)&&Bt.autoSleep&&jt._listeners.length<2){for(;i&&!i._ts;)i=i._next;i||jt.sleep()}}},e}(ho);en(xt.prototype,{_lock:0,_hasPause:0,_forcing:0});var sR=function(e,t,s,r,i,o,a){var c=new Rt(this._pt,e,t,0,1,Vg,null,i),l=0,u=0,h,d,f,m,p,g,_,w;for(c.b=s,c.e=r,s+="",r+="",(_=~r.indexOf("random("))&&(r=lo(r)),o&&(w=[s,r],o(w,e,t),s=w[0],r=w[1]),d=s.match(tl)||[];h=tl.exec(r);)m=h[0],p=r.substring(l,h.index),f?f=(f+1)%5:p.substr(-5)==="rgba("&&(f=1),m!==d[u++]&&(g=parseFloat(d[u-1])||0,c._pt={_next:c._pt,p:p||u===1?p:",",s:g,c:m.charAt(1)==="="?Rr(g,m)-g:parseFloat(m)-g,m:f&&f<4?Math.round:0},l=tl.lastIndex);return c.c=l")}),b.duration();else{T={};for(x in m)x==="ease"||x==="easeEach"||aR(x,m[x],T,m.easeEach);for(x in T)for(L=T[x].sort(function(B,V){return B.t-V.t}),O=0,v=0;vc-Me&&!u?c:rl&&(d=l)),_=this._yoyo&&m&1,_&&(b=this._yEase,d=l-d),g=Hr(this._tTime,p),d===a&&!o&&this._initted&&m===g)return this._tTime=h,this;m!==g&&(k&&this._yEase&&Dg(k,_),this.vars.repeatRefresh&&!_&&!this._lock&&this._time!==l&&this._initted&&(this._lock=o=1,this.render(ct(p*m),!0).invalidate()._lock=0))}if(!this._initted){if(yg(this,u?r:d,o,i,h))return this._tTime=0,this;if(a!==this._time&&!(o&&this.vars.repeatRefresh&&m!==g))return this;if(l!==this._dur)return this.render(r,i,o)}if(this._tTime=h,this._time=d,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=w=(b||this._ease)(d/l),this._from&&(this.ratio=w=1-w),d&&!a&&!i&&!m&&(Vt(this,"onStart"),this._tTime!==h))return this;for(f=this._pt;f;)f.r(w,f.d),f=f._next;k&&k.render(r<0?r:!d&&_?-Me:k._dur*k._ease(d/this._dur),i,o)||this._startAt&&(this._zTime=r),this._onUpdate&&!i&&(u&&Zl(this,r,i,o),Vt(this,"onUpdate")),this._repeat&&m!==g&&this.vars.onRepeat&&!i&&this.parent&&Vt(this,"onRepeat"),(h===this._tDur||!h)&&this._tTime===h&&(u&&!this._onUpdate&&Zl(this,r,!0,!0),(r||!l)&&(h===this._tDur&&this._ts>0||!h&&this._ts<0)&&Cs(this,1),!i&&!(u&&!a)&&(h||a||_)&&(Vt(this,h===c?"onComplete":"onReverseComplete",!0),this._prom&&!(h0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(r){return(!r||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(r),n.prototype.invalidate.call(this,r)},t.resetTo=function(r,i,o,a,c){uo||jt.wake(),this._ts||this.play();var l=Math.min(this._dur,(this._dp._time-this._start)*this._ts),u;return this._initted||bh(this,l),u=this._ease(l/this._dur),iR(this,r,i,o,a,u,l,c)?this.resetTo(r,i,o,a,1):(Cc(this,0),this.parent||mg(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(r,i){if(i===void 0&&(i="all"),!r&&(!i||i==="all"))return this._lazy=this._pt=0,this.parent?Ci(this):this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(r,i,us&&us.vars.overwrite!==!0)._first||Ci(this),this.parent&&o!==this.timeline.totalDuration()&&Yr(this,this._dur*this.timeline._tDur/o,0,1),this}var a=this._targets,c=r?Kt(r):a,l=this._ptLookup,u=this._pt,h,d,f,m,p,g,_;if((!i||i==="all")&&$P(a,c))return i==="all"&&(this._pt=0),Ci(this);for(h=this._op=this._op||[],i!=="all"&&(ut(i)&&(p={},Pt(i,function(w){return p[w]=1}),i=p),i=oR(a,i)),_=a.length;_--;)if(~c.indexOf(a[_])){d=l[_],i==="all"?(h[_]=i,m=d,f={}):(f=h[_]=h[_]||{},m=i);for(p in m)g=d&&d[p],g&&((!("kill"in g.d)||g.d.kill(p)===!0)&&Tc(this,g,"_pt"),delete d[p]),f!=="all"&&(f[p]=1)}return this._initted&&!this._pt&&u&&Ci(this),this},e.to=function(r,i){return new e(r,i,arguments[2])},e.from=function(r,i){return Ni(1,arguments)},e.delayedCall=function(r,i,o,a){return new e(i,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:r,onComplete:i,onReverseComplete:i,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:a})},e.fromTo=function(r,i,o){return Ni(2,arguments)},e.set=function(r,i){return i.duration=0,i.repeatDelay||(i.repeat=0),new e(r,i)},e.killTweensOf=function(r,i,o){return qe.killTweensOf(r,i,o)},e}(ho);en(rt.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});Pt("staggerTo,staggerFrom,staggerFromTo",function(n){rt[n]=function(){var e=new xt,t=Ql.call(arguments,0);return t.splice(n==="staggerFromTo"?5:4,0,0),e[n].apply(e,t)}});var xh=function(e,t,s){return e[t]=s},Lg=function(e,t,s){return e[t](s)},cR=function(e,t,s,r){return e[t](r.fp,s)},lR=function(e,t,s){return e.setAttribute(t,s)},wh=function(e,t){return Xe(e[t])?Lg:dh(e[t])&&e.setAttribute?lR:xh},jg=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},uR=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},Vg=function(e,t){var s=t._pt,r="";if(!e&&t.b)r=t.b;else if(e===1&&t.e)r=t.e;else{for(;s;)r=s.p+(s.m?s.m(s.s+s.c*e):Math.round((s.s+s.c*e)*1e4)/1e4)+r,s=s._next;r+=t.c}t.set(t.t,t.p,r,t)},kh=function(e,t){for(var s=t._pt;s;)s.r(e,s.d),s=s._next},hR=function(e,t,s,r){for(var i=this._pt,o;i;)o=i._next,i.p===r&&i.modifier(e,t,s),i=o},dR=function(e){for(var t=this._pt,s,r;t;)r=t._next,t.p===e&&!t.op||t.op===e?Tc(this,t,"_pt"):t.dep||(s=1),t=r;return!s},fR=function(e,t,s,r){r.mSet(e,t,r.m.call(r.tween,s,r.mt),r)},zg=function(e){for(var t=e._pt,s,r,i,o;t;){for(s=t._next,r=i;r&&r.pr>t.pr;)r=r._next;(t._prev=r?r._prev:o)?t._prev._next=t:i=t,(t._next=r)?r._prev=t:o=t,t=s}e._pt=i},Rt=function(){function n(t,s,r,i,o,a,c,l,u){this.t=s,this.s=i,this.c=o,this.p=r,this.r=a||jg,this.d=c||this,this.set=l||xh,this.pr=u||0,this._next=t,t&&(t._prev=this)}var e=n.prototype;return e.modifier=function(s,r,i){this.mSet=this.mSet||this.set,this.set=fR,this.m=s,this.mt=i,this.tween=r},n}();Pt(_h+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(n){return gh[n]=1});Wt.TweenMax=Wt.TweenLite=rt;Wt.TimelineLite=Wt.TimelineMax=xt;qe=new xt({sortChildren:!1,defaults:qr,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Bt.stringFilter=Pg;var Gs=[],ha={},pR=[],Ff=0,mR=0,ol=function(e){return(ha[e]||pR).map(function(t){return t()})},nu=function(){var e=Date.now(),t=[];e-Ff>2&&(ol("matchMediaInit"),Gs.forEach(function(s){var r=s.queries,i=s.conditions,o,a,c,l;for(a in r)o=Yt.matchMedia(r[a]).matches,o&&(c=1),o!==i[a]&&(i[a]=o,l=1);l&&(s.revert(),c&&t.push(s))}),ol("matchMediaRevert"),t.forEach(function(s){return s.onMatch(s,function(r){return s.add(null,r)})}),Ff=e,ol("matchMedia"))},Ug=function(){function n(t,s){this.selector=s&&Jl(s),this.data=[],this._r=[],this.isReverted=!1,this.id=mR++,t&&this.add(t)}var e=n.prototype;return e.add=function(s,r,i){Xe(s)&&(i=r,r=s,s=Xe);var o=this,a=function(){var l=Ge,u=o.selector,h;return l&&l!==o&&l.data.push(o),i&&(o.selector=Jl(i)),Ge=o,h=r.apply(o,arguments),Xe(h)&&o._r.push(h),Ge=l,o.selector=u,o.isReverted=!1,h};return o.last=a,s===Xe?a(o,function(c){return o.add(null,c)}):s?o[s]=a:a},e.ignore=function(s){var r=Ge;Ge=null,s(this),Ge=r},e.getTweens=function(){var s=[];return this.data.forEach(function(r){return r instanceof n?s.push.apply(s,r.getTweens()):r instanceof rt&&!(r.parent&&r.parent.data==="nested")&&s.push(r)}),s},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(s,r){var i=this;if(s?function(){for(var a=i.getTweens(),c=i.data.length,l;c--;)l=i.data[c],l.data==="isFlip"&&(l.revert(),l.getChildren(!0,!0,!1).forEach(function(u){return a.splice(a.indexOf(u),1)}));for(a.map(function(u){return{g:u._dur||u._delay||u._sat&&!u._sat.vars.immediateRender?u.globalTime(0):-1/0,t:u}}).sort(function(u,h){return h.g-u.g||-1/0}).forEach(function(u){return u.t.revert(s)}),c=i.data.length;c--;)l=i.data[c],l instanceof xt?l.data!=="nested"&&(l.scrollTrigger&&l.scrollTrigger.revert(),l.kill()):!(l instanceof rt)&&l.revert&&l.revert(s);i._r.forEach(function(u){return u(s,i)}),i.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),r)for(var o=Gs.length;o--;)Gs[o].id===this.id&&Gs.splice(o,1)},e.revert=function(s){this.kill(s||{})},n}(),gR=function(){function n(t){this.contexts=[],this.scope=t}var e=n.prototype;return e.add=function(s,r,i){On(s)||(s={matches:s});var o=new Ug(0,i||this.scope),a=o.conditions={},c,l,u;Ge&&!o.selector&&(o.selector=Ge.selector),this.contexts.push(o),r=o.add("onMatch",r),o.queries=s;for(l in s)l==="all"?u=1:(c=Yt.matchMedia(s[l]),c&&(Gs.indexOf(o)<0&&Gs.push(o),(a[l]=c.matches)&&(u=1),c.addListener?c.addListener(nu):c.addEventListener("change",nu)));return u&&r(o,function(h){return o.add(null,h)}),this},e.revert=function(s){this.kill(s||{})},e.kill=function(s){this.contexts.forEach(function(r){return r.kill(s,!0)})},n}(),Qa={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),s=0;s1){var r=e.map(function(u){return It.quickSetter(u,t,s)}),i=r.length;return function(u){for(var h=i;h--;)r[h](u)}}e=e[0]||{};var o=Ft[t],a=qs(e),c=a.harness&&(a.harness.aliases||{})[t]||t,l=o?function(u){var h=new o;Cr._pt=0,h.init(e,s?u+s:u,Cr,0,[e]),h.render(1,h),Cr._pt&&kh(1,Cr)}:a.set(e,c);return o?l:function(u){return l(e,c,s?u+s:u,a,1)}},quickTo:function(e,t,s){var r,i=It.to(e,nr((r={},r[t]="+=0.1",r.paused=!0,r),s||{})),o=function(c,l,u){return i.resetTo(t,c,l,u)};return o.tween=i,o},isTweening:function(e){return qe.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Ys(e.ease,qr.ease)),Df(qr,e||{})},config:function(e){return Df(Bt,e||{})},registerEffect:function(e){var t=e.name,s=e.effect,r=e.plugins,i=e.defaults,o=e.extendTimeline;(r||"").split(",").forEach(function(a){return a&&!Ft[a]&&!Wt[a]&&ao(t+" effect requires "+a+" plugin.")}),nl[t]=function(a,c,l){return s(Kt(a),en(c||{},i),l)},o&&(xt.prototype[t]=function(a,c,l){return this.add(nl[t](a,On(c)?c:(l=c)&&{},this),l)})},registerEase:function(e,t){be[e]=Ys(t)},parseEase:function(e,t){return arguments.length?Ys(e,t):be},getById:function(e){return qe.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var s=new xt(e),r,i;for(s.smoothChildTiming=At(e.smoothChildTiming),qe.remove(s),s._dp=0,s._time=s._tTime=qe._time,r=qe._first;r;)i=r._next,(t||!(!r._dur&&r instanceof rt&&r.vars.onComplete===r._targets[0]))&&xn(s,r,r._start-r._delay),r=i;return xn(qe,s,0),s},context:function(e,t){return e?new Ug(e,t):Ge},matchMedia:function(e){return new gR(e)},matchMediaRefresh:function(){return Gs.forEach(function(e){var t=e.conditions,s,r;for(r in t)t[r]&&(t[r]=!1,s=1);s&&e.revert()})||nu()},addEventListener:function(e,t){var s=ha[e]||(ha[e]=[]);~s.indexOf(t)||s.push(t)},removeEventListener:function(e,t){var s=ha[e],r=s&&s.indexOf(t);r>=0&&s.splice(r,1)},utils:{wrap:GP,wrapYoyo:XP,distribute:xg,random:kg,snap:wg,normalize:YP,getUnit:dt,clamp:BP,splitColor:Og,toArray:Kt,selector:Jl,mapRange:Eg,pipe:qP,unitize:HP,interpolate:ZP,shuffle:bg},install:cg,effects:nl,ticker:jt,updateRoot:xt.updateRoot,plugins:Ft,globalTimeline:qe,core:{PropTween:Rt,globals:lg,Tween:rt,Timeline:xt,Animation:ho,getCache:qs,_removeLinkedListItem:Tc,reverting:function(){return ft},context:function(e){return e&&Ge&&(Ge.data.push(e),e._ctx=Ge),Ge},suppressOverwrites:function(e){return hh=e}}};Pt("to,from,fromTo,delayedCall,set,killTweensOf",function(n){return Qa[n]=rt[n]});jt.add(xt.updateRoot);Cr=Qa.to({},{duration:0});var _R=function(e,t){for(var s=e._pt;s&&s.p!==t&&s.op!==t&&s.fp!==t;)s=s._next;return s},yR=function(e,t){var s=e._targets,r,i,o;for(r in t)for(i=s.length;i--;)o=e._ptLookup[i][r],o&&(o=o.d)&&(o._pt&&(o=_R(o,r)),o&&o.modifier&&o.modifier(t[r],e,s[i],r))},al=function(e,t){return{name:e,rawVars:1,init:function(r,i,o){o._onInit=function(a){var c,l;if(ut(i)&&(c={},Pt(i,function(u){return c[u]=1}),i=c),t){c={};for(l in i)c[l]=t(i[l]);i=c}yR(a,i)}}}},It=Qa.registerPlugin({name:"attr",init:function(e,t,s,r,i){var o,a,c;this.tween=s;for(o in t)c=e.getAttribute(o)||"",a=this.add(e,"setAttribute",(c||0)+"",t[o],r,i,0,0,o),a.op=o,a.b=c,this._props.push(o)},render:function(e,t){for(var s=t._pt;s;)ft?s.set(s.t,s.p,s.b,s):s.r(e,s.d),s=s._next}},{name:"endArray",init:function(e,t){for(var s=t.length;s--;)this.add(e,s,e[s]||0,t[s],0,0,0,0,0,1)}},al("roundProps",eu),al("modifiers"),al("snap",wg))||Qa;rt.version=xt.version=It.version="3.12.4";ag=1;fh()&&Gr();be.Power0;be.Power1;be.Power2;be.Power3;be.Power4;be.Linear;be.Quad;be.Cubic;be.Quart;be.Quint;be.Strong;be.Elastic;be.Back;be.SteppedEase;be.Bounce;be.Sine;be.Expo;be.Circ;/*! * CSSPlugin 3.12.4 * https://gsap.com * @@ -409,7 +409,29 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * Subject to the terms at https://gsap.com/standard-license or for * Club GSAP members, the agreement issued with that membership. * @author: Jack Doyle, jack@greensock.com -*/var Lf,hs,Dr,Eh,zs,jf,Ch,yR=function(){return typeof window<"u"},Kn={},Fs=180/Math.PI,Mr=Math.PI/180,vr=Math.atan2,Vf=1e8,Sh=/([A-Z])/g,vR=/(left|right|width|margin|padding|x)/i,bR=/[\s,\(]\S/,wn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},su=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},xR=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},wR=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},kR=function(e,t){var s=t.s+t.c*e;t.set(t.t,t.p,~~(s+(s<0?-.5:.5))+t.u,t)},Ug=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Bg=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},TR=function(e,t,s){return e.style[t]=s},ER=function(e,t,s){return e.style.setProperty(t,s)},CR=function(e,t,s){return e._gsap[t]=s},SR=function(e,t,s){return e._gsap.scaleX=e._gsap.scaleY=s},OR=function(e,t,s,r,i){var o=e._gsap;o.scaleX=o.scaleY=s,o.renderTransform(i,o)},AR=function(e,t,s,r,i){var o=e._gsap;o[t]=s,o.renderTransform(i,o)},He="transform",Dt=He+"Origin",PR=function n(e,t){var s=this,r=this.target,i=r.style,o=r._gsap;if(e in Kn&&i){if(this.tfm=this.tfm||{},e!=="transform")e=wn[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return s.tfm[a]=Vn(r,a)}):this.tfm[e]=o.x?o[e]:Vn(r,e),e===Dt&&(this.tfm.zOrigin=o.zOrigin);else return wn.transform.split(",").forEach(function(a){return n.call(s,a,t)});if(this.props.indexOf(He)>=0)return;o.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(Dt,t,"")),e=He}(i||t)&&this.props.push(e,t,i[e])},Wg=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},RR=function(){var e=this.props,t=this.target,s=t.style,r=t._gsap,i,o;for(i=0;i=0?zf[o]:"")+e},iu=function(){yR()&&window.document&&(Lf=window,hs=Lf.document,Dr=hs.documentElement,zs=ru("div")||{style:{}},ru("div"),He=Xr(He),Dt=He+"Origin",zs.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Hg=!!Xr("perspective"),Ch=It.core.reverting,Eh=1)},al=function n(e){var t=ru("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),s=this.parentNode,r=this.nextSibling,i=this.style.cssText,o;if(Dr.appendChild(t),t.appendChild(this),this.style.display="block",e)try{o=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=n}catch{}else this._gsapBBox&&(o=this._gsapBBox());return s&&(r?s.insertBefore(this,r):s.appendChild(this)),Dr.removeChild(t),this.style.cssText=i,o},Uf=function(e,t){for(var s=t.length;s--;)if(e.hasAttribute(t[s]))return e.getAttribute(t[s])},Yg=function(e){var t;try{t=e.getBBox()}catch{t=al.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===al||(t=al.call(e,!0)),t&&!t.width&&!t.x&&!t.y?{x:+Uf(e,["x","cx","x1"])||0,y:+Uf(e,["y","cy","y1"])||0,width:0,height:0}:t},Gg=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&Yg(e))},sr=function(e,t){if(t){var s=e.style,r;t in Kn&&t!==Dt&&(t=He),s.removeProperty?(r=t.substr(0,2),(r==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),s.removeProperty(r==="--"?t:t.replace(Sh,"-$1").toLowerCase())):s.removeAttribute(t)}},ds=function(e,t,s,r,i,o){var a=new Rt(e._pt,t,s,0,1,o?Bg:Ug);return e._pt=a,a.b=r,a.e=i,e._props.push(s),a},Bf={deg:1,rad:1,turn:1},DR={grid:1,flex:1},Ss=function n(e,t,s,r){var i=parseFloat(s)||0,o=(s+"").trim().substr((i+"").length)||"px",a=zs.style,c=vR.test(t),l=e.tagName.toLowerCase()==="svg",u=(l?"client":"offset")+(c?"Width":"Height"),h=100,d=r==="px",f=r==="%",m,p,g,_;if(r===o||!i||Bf[r]||Bf[o])return i;if(o!=="px"&&!d&&(i=n(e,t,s,"px")),_=e.getCTM&&Gg(e),(f||o==="%")&&(Kn[t]||~t.indexOf("adius")))return m=_?e.getBBox()[c?"width":"height"]:e[u],tt(f?i/m*h:i/100*m);if(a[c?"width":"height"]=h+(d?o:r),p=~t.indexOf("adius")||r==="em"&&e.appendChild&&!l?e:e.parentNode,_&&(p=(e.ownerSVGElement||{}).parentNode),(!p||p===hs||!p.appendChild)&&(p=hs.body),g=p._gsap,g&&f&&g.width&&c&&g.time===Lt.time&&!g.uncache)return tt(i/g.width*h);if(f&&(t==="height"||t==="width")){var x=e.style[t];e.style[t]=h+r,m=e[u],x?e.style[t]=x:sr(e,t)}else(f||o==="%")&&!DR[Tn(p,"display")]&&(a.position=Tn(e,"position")),p===e&&(a.position="static"),p.appendChild(zs),m=zs[u],p.removeChild(zs),a.position="absolute";return c&&f&&(g=qs(p),g.time=Lt.time,g.width=p[u]),tt(d?m*i/h:m&&i?h/m*i:0)},Vn=function(e,t,s,r){var i;return Eh||iu(),t in wn&&t!=="transform"&&(t=wn[t],~t.indexOf(",")&&(t=t.split(",")[0])),Kn[t]&&t!=="transform"?(i=po(e,r),i=t!=="transformOrigin"?i[t]:i.svg?i.origin:Ja(Tn(e,Dt))+" "+i.zOrigin+"px"):(i=e.style[t],(!i||i==="auto"||r||~(i+"").indexOf("calc("))&&(i=Qa[t]&&Qa[t](e,t,s)||Tn(e,t)||ug(e,t)||(t==="opacity"?1:0))),s&&!~(i+"").trim().indexOf(" ")?Ss(e,t,i,s)+s:i},MR=function(e,t,s,r){if(!s||s==="none"){var i=Xr(t,e,1),o=i&&Tn(e,i,1);o&&o!==s?(t=i,s=o):t==="borderColor"&&(s=Tn(e,"borderTopColor"))}var a=new Rt(this._pt,e.style,t,0,1,jg),c=0,l=0,u,h,d,f,m,p,g,_,x,k,v,b;if(a.b=s,a.e=r,s+="",r+="",r==="auto"&&(p=e.style[t],e.style[t]=r,r=Tn(e,t)||r,p?e.style[t]=p:sr(e,t)),u=[s,r],Ag(u),s=u[0],r=u[1],d=s.match(Er)||[],b=r.match(Er)||[],b.length){for(;h=Er.exec(r);)g=h[0],x=r.substring(c,h.index),m?m=(m+1)%5:(x.substr(-5)==="rgba("||x.substr(-5)==="hsla(")&&(m=1),g!==(p=d[l++]||"")&&(f=parseFloat(p)||0,v=p.substr((f+"").length),g.charAt(1)==="="&&(g=Rr(f,g)+v),_=parseFloat(g),k=g.substr((_+"").length),c=Er.lastIndex-k.length,k||(k=k||Ut.units[t]||v,c===r.length&&(r+=k,a.e+=k)),v!==k&&(f=Ss(e,t,p,k)||0),a._pt={_next:a._pt,p:x||l===1?x:",",s:f,c:_-f,m:m&&m<4||t==="zIndex"?Math.round:0});a.c=c-1;)a=i[l],Kn[a]&&(c=1,a=a==="transformOrigin"?Dt:He),sr(s,a);c&&(sr(s,He),o&&(o.svg&&s.removeAttribute("transform"),po(s,1),o.uncache=1,Wg(r)))}},Qa={clearProps:function(e,t,s,r,i){if(i.data!=="isFromStart"){var o=e._pt=new Rt(e._pt,t,s,0,0,NR);return o.u=r,o.pr=-10,o.tween=i,e._props.push(s),1}}},fo=[1,0,0,1,0,0],Xg={},Zg=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},qf=function(e){var t=Tn(e,He);return Zg(t)?fo:t.substr(7).match(sg).map(tt)},Oh=function(e,t){var s=e._gsap||qs(e),r=e.style,i=qf(e),o,a,c,l;return s.svg&&e.getAttribute("transform")?(c=e.transform.baseVal.consolidate().matrix,i=[c.a,c.b,c.c,c.d,c.e,c.f],i.join(",")==="1,0,0,1,0,0"?fo:i):(i===fo&&!e.offsetParent&&e!==Dr&&!s.svg&&(c=r.display,r.display="block",o=e.parentNode,(!o||!e.offsetParent)&&(l=1,a=e.nextElementSibling,Dr.appendChild(e)),i=qf(e),c?r.display=c:sr(e,"display"),l&&(a?o.insertBefore(e,a):o?o.appendChild(e):Dr.removeChild(e))),t&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i)},ou=function(e,t,s,r,i,o){var a=e._gsap,c=i||Oh(e,!0),l=a.xOrigin||0,u=a.yOrigin||0,h=a.xOffset||0,d=a.yOffset||0,f=c[0],m=c[1],p=c[2],g=c[3],_=c[4],x=c[5],k=t.split(" "),v=parseFloat(k[0])||0,b=parseFloat(k[1])||0,T,E,w,C;s?c!==fo&&(E=f*g-m*p)&&(w=v*(g/E)+b*(-p/E)+(p*x-g*_)/E,C=v*(-m/E)+b*(f/E)-(f*x-m*_)/E,v=w,b=C):(T=Yg(e),v=T.x+(~k[0].indexOf("%")?v/100*T.width:v),b=T.y+(~(k[1]||k[0]).indexOf("%")?b/100*T.height:b)),r||r!==!1&&a.smooth?(_=v-l,x=b-u,a.xOffset=h+(_*f+x*p)-_,a.yOffset=d+(_*m+x*g)-x):a.xOffset=a.yOffset=0,a.xOrigin=v,a.yOrigin=b,a.smooth=!!r,a.origin=t,a.originIsAbsolute=!!s,e.style[Dt]="0px 0px",o&&(ds(o,a,"xOrigin",l,v),ds(o,a,"yOrigin",u,b),ds(o,a,"xOffset",h,a.xOffset),ds(o,a,"yOffset",d,a.yOffset)),e.setAttribute("data-svg-origin",v+" "+b)},po=function(e,t){var s=e._gsap||new Mg(e);if("x"in s&&!t&&!s.uncache)return s;var r=e.style,i=s.scaleX<0,o="px",a="deg",c=getComputedStyle(e),l=Tn(e,Dt)||"0",u,h,d,f,m,p,g,_,x,k,v,b,T,E,w,C,S,R,O,L,j,q,z,V,U,X,Z,Q,$,F,A,M;return u=h=d=p=g=_=x=k=v=0,f=m=1,s.svg=!!(e.getCTM&&Gg(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(r[He]=(c.translate!=="none"?"translate3d("+(c.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(c.rotate!=="none"?"rotate("+c.rotate+") ":"")+(c.scale!=="none"?"scale("+c.scale.split(" ").join(",")+") ":"")+(c[He]!=="none"?c[He]:"")),r.scale=r.rotate=r.translate="none"),E=Oh(e,s.svg),s.svg&&(s.uncache?(U=e.getBBox(),l=s.xOrigin-U.x+"px "+(s.yOrigin-U.y)+"px",V=""):V=!t&&e.getAttribute("data-svg-origin"),ou(e,V||l,!!V||s.originIsAbsolute,s.smooth!==!1,E)),b=s.xOrigin||0,T=s.yOrigin||0,E!==fo&&(R=E[0],O=E[1],L=E[2],j=E[3],u=q=E[4],h=z=E[5],E.length===6?(f=Math.sqrt(R*R+O*O),m=Math.sqrt(j*j+L*L),p=R||O?vr(O,R)*Fs:0,x=L||j?vr(L,j)*Fs+p:0,x&&(m*=Math.abs(Math.cos(x*Mr))),s.svg&&(u-=b-(b*R+T*L),h-=T-(b*O+T*j))):(M=E[6],F=E[7],Z=E[8],Q=E[9],$=E[10],A=E[11],u=E[12],h=E[13],d=E[14],w=vr(M,$),g=w*Fs,w&&(C=Math.cos(-w),S=Math.sin(-w),V=q*C+Z*S,U=z*C+Q*S,X=M*C+$*S,Z=q*-S+Z*C,Q=z*-S+Q*C,$=M*-S+$*C,A=F*-S+A*C,q=V,z=U,M=X),w=vr(-L,$),_=w*Fs,w&&(C=Math.cos(-w),S=Math.sin(-w),V=R*C-Z*S,U=O*C-Q*S,X=L*C-$*S,A=j*S+A*C,R=V,O=U,L=X),w=vr(O,R),p=w*Fs,w&&(C=Math.cos(w),S=Math.sin(w),V=R*C+O*S,U=q*C+z*S,O=O*C-R*S,z=z*C-q*S,R=V,q=U),g&&Math.abs(g)+Math.abs(p)>359.9&&(g=p=0,_=180-_),f=tt(Math.sqrt(R*R+O*O+L*L)),m=tt(Math.sqrt(z*z+M*M)),w=vr(q,z),x=Math.abs(w)>2e-4?w*Fs:0,v=A?1/(A<0?-A:A):0),s.svg&&(V=e.getAttribute("transform"),s.forceCSS=e.setAttribute("transform","")||!Zg(Tn(e,He)),V&&e.setAttribute("transform",V))),Math.abs(x)>90&&Math.abs(x)<270&&(i?(f*=-1,x+=p<=0?180:-180,p+=p<=0?180:-180):(m*=-1,x+=x<=0?180:-180)),t=t||s.uncache,s.x=u-((s.xPercent=u&&(!t&&s.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-u)?-50:0)))?e.offsetWidth*s.xPercent/100:0)+o,s.y=h-((s.yPercent=h&&(!t&&s.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-h)?-50:0)))?e.offsetHeight*s.yPercent/100:0)+o,s.z=d+o,s.scaleX=tt(f),s.scaleY=tt(m),s.rotation=tt(p)+a,s.rotationX=tt(g)+a,s.rotationY=tt(_)+a,s.skewX=x+a,s.skewY=k+a,s.transformPerspective=v+o,(s.zOrigin=parseFloat(l.split(" ")[2])||!t&&s.zOrigin||0)&&(r[Dt]=Ja(l)),s.xOffset=s.yOffset=0,s.force3D=Ut.force3D,s.renderTransform=s.svg?FR:Hg?Kg:$R,s.uncache=0,s},Ja=function(e){return(e=e.split(" "))[0]+" "+e[1]},cl=function(e,t,s){var r=dt(t);return tt(parseFloat(t)+parseFloat(Ss(e,"x",s+"px",r)))+r},$R=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,Kg(e,t)},Ns="0deg",Ti="0px",$s=") ",Kg=function(e,t){var s=t||this,r=s.xPercent,i=s.yPercent,o=s.x,a=s.y,c=s.z,l=s.rotation,u=s.rotationY,h=s.rotationX,d=s.skewX,f=s.skewY,m=s.scaleX,p=s.scaleY,g=s.transformPerspective,_=s.force3D,x=s.target,k=s.zOrigin,v="",b=_==="auto"&&e&&e!==1||_===!0;if(k&&(h!==Ns||u!==Ns)){var T=parseFloat(u)*Mr,E=Math.sin(T),w=Math.cos(T),C;T=parseFloat(h)*Mr,C=Math.cos(T),o=cl(x,o,E*C*-k),a=cl(x,a,-Math.sin(T)*-k),c=cl(x,c,w*C*-k+k)}g!==Ti&&(v+="perspective("+g+$s),(r||i)&&(v+="translate("+r+"%, "+i+"%) "),(b||o!==Ti||a!==Ti||c!==Ti)&&(v+=c!==Ti||b?"translate3d("+o+", "+a+", "+c+") ":"translate("+o+", "+a+$s),l!==Ns&&(v+="rotate("+l+$s),u!==Ns&&(v+="rotateY("+u+$s),h!==Ns&&(v+="rotateX("+h+$s),(d!==Ns||f!==Ns)&&(v+="skew("+d+", "+f+$s),(m!==1||p!==1)&&(v+="scale("+m+", "+p+$s),x.style[He]=v||"translate(0, 0)"},FR=function(e,t){var s=t||this,r=s.xPercent,i=s.yPercent,o=s.x,a=s.y,c=s.rotation,l=s.skewX,u=s.skewY,h=s.scaleX,d=s.scaleY,f=s.target,m=s.xOrigin,p=s.yOrigin,g=s.xOffset,_=s.yOffset,x=s.forceCSS,k=parseFloat(o),v=parseFloat(a),b,T,E,w,C;c=parseFloat(c),l=parseFloat(l),u=parseFloat(u),u&&(u=parseFloat(u),l+=u,c+=u),c||l?(c*=Mr,l*=Mr,b=Math.cos(c)*h,T=Math.sin(c)*h,E=Math.sin(c-l)*-d,w=Math.cos(c-l)*d,l&&(u*=Mr,C=Math.tan(l-u),C=Math.sqrt(1+C*C),E*=C,w*=C,u&&(C=Math.tan(u),C=Math.sqrt(1+C*C),b*=C,T*=C)),b=tt(b),T=tt(T),E=tt(E),w=tt(w)):(b=h,w=d,T=E=0),(k&&!~(o+"").indexOf("px")||v&&!~(a+"").indexOf("px"))&&(k=Ss(f,"x",o,"px"),v=Ss(f,"y",a,"px")),(m||p||g||_)&&(k=tt(k+m-(m*b+p*E)+g),v=tt(v+p-(m*T+p*w)+_)),(r||i)&&(C=f.getBBox(),k=tt(k+r/100*C.width),v=tt(v+i/100*C.height)),C="matrix("+b+","+T+","+E+","+w+","+k+","+v+")",f.setAttribute("transform",C),x&&(f.style[He]=C)},LR=function(e,t,s,r,i){var o=360,a=ut(i),c=parseFloat(i)*(a&&~i.indexOf("rad")?Fs:1),l=c-r,u=r+l+"deg",h,d;return a&&(h=i.split("_")[1],h==="short"&&(l%=o,l!==l%(o/2)&&(l+=l<0?o:-o)),h==="cw"&&l<0?l=(l+o*Vf)%o-~~(l/o)*o:h==="ccw"&&l>0&&(l=(l-o*Vf)%o-~~(l/o)*o)),e._pt=d=new Rt(e._pt,t,s,r,l,xR),d.e=u,d.u="deg",e._props.push(s),d},Hf=function(e,t){for(var s in t)e[s]=t[s];return e},jR=function(e,t,s){var r=Hf({},s._gsap),i="perspective,force3D,transformOrigin,svgOrigin",o=s.style,a,c,l,u,h,d,f,m;r.svg?(l=s.getAttribute("transform"),s.setAttribute("transform",""),o[He]=t,a=po(s,1),sr(s,He),s.setAttribute("transform",l)):(l=getComputedStyle(s)[He],o[He]=t,a=po(s,1),o[He]=l);for(c in Kn)l=r[c],u=a[c],l!==u&&i.indexOf(c)<0&&(f=dt(l),m=dt(u),h=f!==m?Ss(s,c,l,m):parseFloat(l),d=parseFloat(u),e._pt=new Rt(e._pt,a,c,h,d-h,su),e._pt.u=m||0,e._props.push(c));Hf(a,r)};Pt("padding,margin,Width,Radius",function(n,e){var t="Top",s="Right",r="Bottom",i="Left",o=(e<3?[t,s,r,i]:[t+i,t+s,r+s,r+i]).map(function(a){return e<2?n+a:"border"+a+n});Qa[e>1?"border"+n:n]=function(a,c,l,u,h){var d,f;if(arguments.length<4)return d=o.map(function(m){return Vn(a,m,l)}),f=d.join(" "),f.split(d[0]).length===5?d[0]:f;d=(u+"").split(" "),f={},o.forEach(function(m,p){return f[m]=d[p]=d[p]||d[(p-1)/2|0]}),a.init(c,f,h)}});var Qg={name:"css",register:iu,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,s,r,i){var o=this._props,a=e.style,c=s.vars.startAt,l,u,h,d,f,m,p,g,_,x,k,v,b,T,E,w;Eh||iu(),this.styles=this.styles||qg(e),w=this.styles.props,this.tween=s;for(p in t)if(p!=="autoRound"&&(u=t[p],!($t[p]&&Ig(p,t,s,r,e,i)))){if(f=typeof u,m=Qa[p],f==="function"&&(u=u.call(s,r,e,i),f=typeof u),f==="string"&&~u.indexOf("random(")&&(u=lo(u)),m)m(this,e,p,u,s)&&(E=1);else if(p.substr(0,2)==="--")l=(getComputedStyle(e).getPropertyValue(p)+"").trim(),u+="",gs.lastIndex=0,gs.test(l)||(g=dt(l),_=dt(u)),_?g!==_&&(l=Ss(e,p,l,_)+_):g&&(u+=g),this.add(a,"setProperty",l,u,r,i,0,0,p),o.push(p),w.push(p,0,a[p]);else if(f!=="undefined"){if(c&&p in c?(l=typeof c[p]=="function"?c[p].call(s,r,e,i):c[p],ut(l)&&~l.indexOf("random(")&&(l=lo(l)),dt(l+"")||l==="auto"||(l+=Ut.units[p]||dt(Vn(e,p))||""),(l+"").charAt(1)==="="&&(l=Vn(e,p))):l=Vn(e,p),d=parseFloat(l),x=f==="string"&&u.charAt(1)==="="&&u.substr(0,2),x&&(u=u.substr(2)),h=parseFloat(u),p in wn&&(p==="autoAlpha"&&(d===1&&Vn(e,"visibility")==="hidden"&&h&&(d=0),w.push("visibility",0,a.visibility),ds(this,a,"visibility",d?"inherit":"hidden",h?"inherit":"hidden",!h)),p!=="scale"&&p!=="transform"&&(p=wn[p],~p.indexOf(",")&&(p=p.split(",")[0]))),k=p in Kn,k){if(this.styles.save(p),v||(b=e._gsap,b.renderTransform&&!t.parseTransform||po(e,t.parseTransform),T=t.smoothOrigin!==!1&&b.smooth,v=this._pt=new Rt(this._pt,a,He,0,1,b.renderTransform,b,0,-1),v.dep=1),p==="scale")this._pt=new Rt(this._pt,b,"scaleY",b.scaleY,(x?Rr(b.scaleY,x+h):h)-b.scaleY||0,su),this._pt.u=0,o.push("scaleY",p),p+="X";else if(p==="transformOrigin"){w.push(Dt,0,a[Dt]),u=IR(u),b.svg?ou(e,u,0,T,0,this):(_=parseFloat(u.split(" ")[2])||0,_!==b.zOrigin&&ds(this,b,"zOrigin",b.zOrigin,_),ds(this,a,p,Ja(l),Ja(u)));continue}else if(p==="svgOrigin"){ou(e,u,1,T,0,this);continue}else if(p in Xg){LR(this,b,p,d,x?Rr(d,x+u):u);continue}else if(p==="smoothOrigin"){ds(this,b,"smooth",b.smooth,u);continue}else if(p==="force3D"){b[p]=u;continue}else if(p==="transform"){jR(this,u,e);continue}}else p in a||(p=Xr(p)||p);if(k||(h||h===0)&&(d||d===0)&&!bR.test(u)&&p in a)g=(l+"").substr((d+"").length),h||(h=0),_=dt(u)||(p in Ut.units?Ut.units[p]:g),g!==_&&(d=Ss(e,p,l,_)),this._pt=new Rt(this._pt,k?b:a,p,d,(x?Rr(d,x+h):h)-d,!k&&(_==="px"||p==="zIndex")&&t.autoRound!==!1?kR:su),this._pt.u=_||0,g!==_&&_!=="%"&&(this._pt.b=l,this._pt.r=wR);else if(p in a)MR.call(this,e,p,l,x?x+u:u);else if(p in e)this.add(e,p,l||e[p],x?x+u:u,r,i);else if(p!=="parseTransform"){gh(p,u);continue}k||(p in a?w.push(p,0,a[p]):w.push(p,1,l||e[p])),o.push(p)}}E&&Vg(this)},render:function(e,t){if(t.tween._time||!Ch())for(var s=t._pt;s;)s.r(e,s.d),s=s._next;else t.styles.revert()},get:Vn,aliases:wn,getSetter:function(e,t,s){var r=wn[t];return r&&r.indexOf(",")<0&&(t=r),t in Kn&&t!==Dt&&(e._gsap.x||Vn(e,"x"))?s&&jf===s?t==="scale"?SR:CR:(jf=s||{})&&(t==="scale"?OR:AR):e.style&&!fh(e.style[t])?TR:~t.indexOf("-")?ER:kh(e,t)},core:{_removeProperty:sr,_getMatrix:Oh}};It.utils.checkPrefix=Xr;It.core.getStyleSaver=qg;(function(n,e,t,s){var r=Pt(n+","+e+","+t,function(i){Kn[i]=1});Pt(e,function(i){Ut.units[i]="deg",Xg[i]=1}),wn[r[13]]=n+","+e,Pt(s,function(i){var o=i.split(":");wn[o[1]]=r[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");Pt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(n){Ut.units[n]="px"});It.registerPlugin(Qg);var Ir=It.registerPlugin(Qg)||It;Ir.core.Tween;const Jg=({isSelected:n,position:e,label:t,target:s,source:r})=>{const i=y.useRef(null);return y.useEffect(()=>{if(i.current){const o=i.current;Ir.fromTo(o.material,{linewidth:of*15},{linewidth:of,duration:1})}},[n,i]),Wt(()=>{const{selectedNode:o,hoveredNode:a}=mt.getState();if(i.current){const c=i.current,l=o||a;(l==null?void 0:l.ref_id)===r||(l==null?void 0:l.ref_id)===s?(c.visible=!0,Ir.to(c.material,{linewidth:6,duration:.5,ease:"power1.out"})):Ir.to(c.material,{linewidth:1,duration:.5,ease:"power1.out"})}}),B.jsxs("group",{children:[B.jsx(E_,{ref:i,isLine2:!0,name:"line",opacity:.5,points:[new ae(e.sx,e.sy,e.sz),new ae(e.tx,e.ty,e.tz)]}),B.jsx(vu,{children:B.jsx(np,{anchorX:"center",anchorY:"middle",color:"white",fontSize:10,children:t})})]})};Jg.displayName="LineComponent";const VR=y.memo(Jg),e_=y.memo(({linksPosition:n})=>{const e=Os(r=>r.dataInitial),{showSelectionGraph:t}=mt(r=>r),s=Jn();return B.jsx("group",{name:"simulation-3d-group__connections",visible:!t||!0,children:e==null?void 0:e.links.map(r=>{const i=(s==null?void 0:s.ref_id)===r.source||(s==null?void 0:s.ref_id)===r.target,o=n.get(r.ref_id)||{sx:0,sy:0,sz:0,tx:0,ty:0,tz:0};return B.jsx(VR,{isSelected:i,label:r.edge_type,position:o,source:r.source,target:r.target},r.ref_id)})})});e_.displayName="Connections";const zR=({color:n,scale:e})=>B.jsx(vu,{follow:!0,lockX:!1,lockY:!1,lockZ:!1,children:B.jsx(vp,{color:n,scale:e})}),UR=["#fff","#9747FF","#00887A","#0098A6","#0288D1","#33691E","#465A65","#512DA7","#5C6BC0","#5D4038","#662C00","#689F39","#6B1B00","#750000","#78909C","#7E57C2","#8C6E63","#AA47BC","#BF360C","#C2175B","#EC407A","#EF6C00","#F5511E","#FF9696","#FFC064","#FFCD29","#FFEA60"],BR=()=>{const n=Jn(),e=Os(i=>i.dataInitial),{normalizedSchemasByType:t}=cu(i=>i),s=Jf(),r=y.useMemo(()=>new dy(30,2,16,100),[]);return B.jsx(B.Fragment,{children:B.jsxs(y1,{geometry:r,limit:1e3,range:1e3,visible:!n,children:[B.jsx("meshBasicMaterial",{}),e==null?void 0:e.nodes.map(i=>{var c;const a=((c=t[i.node_type])==null?void 0:c.primary_color)??(UR[s.indexOf(i.node_type)]||Ae.white);return B.jsx(zR,{color:a,scale:i.scale||1},i.ref_id)})]})})},WR=y.memo(BR),qR=Ke(Qn)` +*/var Lf,hs,Dr,Th,zs,jf,Eh,vR=function(){return typeof window<"u"},Kn={},Fs=180/Math.PI,Mr=Math.PI/180,vr=Math.atan2,Vf=1e8,Ch=/([A-Z])/g,bR=/(left|right|width|margin|padding|x)/i,xR=/[\s,\(]\S/,wn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},su=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},wR=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},kR=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},TR=function(e,t){var s=t.s+t.c*e;t.set(t.t,t.p,~~(s+(s<0?-.5:.5))+t.u,t)},Bg=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},Wg=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},ER=function(e,t,s){return e.style[t]=s},CR=function(e,t,s){return e.style.setProperty(t,s)},SR=function(e,t,s){return e._gsap[t]=s},OR=function(e,t,s){return e._gsap.scaleX=e._gsap.scaleY=s},AR=function(e,t,s,r,i){var o=e._gsap;o.scaleX=o.scaleY=s,o.renderTransform(i,o)},PR=function(e,t,s,r,i){var o=e._gsap;o[t]=s,o.renderTransform(i,o)},He="transform",Dt=He+"Origin",RR=function n(e,t){var s=this,r=this.target,i=r.style,o=r._gsap;if(e in Kn&&i){if(this.tfm=this.tfm||{},e!=="transform")e=wn[e]||e,~e.indexOf(",")?e.split(",").forEach(function(a){return s.tfm[a]=Vn(r,a)}):this.tfm[e]=o.x?o[e]:Vn(r,e),e===Dt&&(this.tfm.zOrigin=o.zOrigin);else return wn.transform.split(",").forEach(function(a){return n.call(s,a,t)});if(this.props.indexOf(He)>=0)return;o.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(Dt,t,"")),e=He}(i||t)&&this.props.push(e,t,i[e])},qg=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},DR=function(){var e=this.props,t=this.target,s=t.style,r=t._gsap,i,o;for(i=0;i=0?zf[o]:"")+e},iu=function(){vR()&&window.document&&(Lf=window,hs=Lf.document,Dr=hs.documentElement,zs=ru("div")||{style:{}},ru("div"),He=Xr(He),Dt=He+"Origin",zs.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Yg=!!Xr("perspective"),Eh=It.core.reverting,Th=1)},cl=function n(e){var t=ru("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),s=this.parentNode,r=this.nextSibling,i=this.style.cssText,o;if(Dr.appendChild(t),t.appendChild(this),this.style.display="block",e)try{o=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=n}catch{}else this._gsapBBox&&(o=this._gsapBBox());return s&&(r?s.insertBefore(this,r):s.appendChild(this)),Dr.removeChild(t),this.style.cssText=i,o},Uf=function(e,t){for(var s=t.length;s--;)if(e.hasAttribute(t[s]))return e.getAttribute(t[s])},Gg=function(e){var t;try{t=e.getBBox()}catch{t=cl.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===cl||(t=cl.call(e,!0)),t&&!t.width&&!t.x&&!t.y?{x:+Uf(e,["x","cx","x1"])||0,y:+Uf(e,["y","cy","y1"])||0,width:0,height:0}:t},Xg=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&Gg(e))},sr=function(e,t){if(t){var s=e.style,r;t in Kn&&t!==Dt&&(t=He),s.removeProperty?(r=t.substr(0,2),(r==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),s.removeProperty(r==="--"?t:t.replace(Ch,"-$1").toLowerCase())):s.removeAttribute(t)}},ds=function(e,t,s,r,i,o){var a=new Rt(e._pt,t,s,0,1,o?Wg:Bg);return e._pt=a,a.b=r,a.e=i,e._props.push(s),a},Bf={deg:1,rad:1,turn:1},MR={grid:1,flex:1},Ss=function n(e,t,s,r){var i=parseFloat(s)||0,o=(s+"").trim().substr((i+"").length)||"px",a=zs.style,c=bR.test(t),l=e.tagName.toLowerCase()==="svg",u=(l?"client":"offset")+(c?"Width":"Height"),h=100,d=r==="px",f=r==="%",m,p,g,_;if(r===o||!i||Bf[r]||Bf[o])return i;if(o!=="px"&&!d&&(i=n(e,t,s,"px")),_=e.getCTM&&Xg(e),(f||o==="%")&&(Kn[t]||~t.indexOf("adius")))return m=_?e.getBBox()[c?"width":"height"]:e[u],tt(f?i/m*h:i/100*m);if(a[c?"width":"height"]=h+(d?o:r),p=~t.indexOf("adius")||r==="em"&&e.appendChild&&!l?e:e.parentNode,_&&(p=(e.ownerSVGElement||{}).parentNode),(!p||p===hs||!p.appendChild)&&(p=hs.body),g=p._gsap,g&&f&&g.width&&c&&g.time===jt.time&&!g.uncache)return tt(i/g.width*h);if(f&&(t==="height"||t==="width")){var w=e.style[t];e.style[t]=h+r,m=e[u],w?e.style[t]=w:sr(e,t)}else(f||o==="%")&&!MR[Tn(p,"display")]&&(a.position=Tn(e,"position")),p===e&&(a.position="static"),p.appendChild(zs),m=zs[u],p.removeChild(zs),a.position="absolute";return c&&f&&(g=qs(p),g.time=jt.time,g.width=p[u]),tt(d?m*i/h:m&&i?h/m*i:0)},Vn=function(e,t,s,r){var i;return Th||iu(),t in wn&&t!=="transform"&&(t=wn[t],~t.indexOf(",")&&(t=t.split(",")[0])),Kn[t]&&t!=="transform"?(i=po(e,r),i=t!=="transformOrigin"?i[t]:i.svg?i.origin:ec(Tn(e,Dt))+" "+i.zOrigin+"px"):(i=e.style[t],(!i||i==="auto"||r||~(i+"").indexOf("calc("))&&(i=Ja[t]&&Ja[t](e,t,s)||Tn(e,t)||hg(e,t)||(t==="opacity"?1:0))),s&&!~(i+"").trim().indexOf(" ")?Ss(e,t,i,s)+s:i},IR=function(e,t,s,r){if(!s||s==="none"){var i=Xr(t,e,1),o=i&&Tn(e,i,1);o&&o!==s?(t=i,s=o):t==="borderColor"&&(s=Tn(e,"borderTopColor"))}var a=new Rt(this._pt,e.style,t,0,1,Vg),c=0,l=0,u,h,d,f,m,p,g,_,w,k,b,v;if(a.b=s,a.e=r,s+="",r+="",r==="auto"&&(p=e.style[t],e.style[t]=r,r=Tn(e,t)||r,p?e.style[t]=p:sr(e,t)),u=[s,r],Pg(u),s=u[0],r=u[1],d=s.match(Er)||[],v=r.match(Er)||[],v.length){for(;h=Er.exec(r);)g=h[0],w=r.substring(c,h.index),m?m=(m+1)%5:(w.substr(-5)==="rgba("||w.substr(-5)==="hsla(")&&(m=1),g!==(p=d[l++]||"")&&(f=parseFloat(p)||0,b=p.substr((f+"").length),g.charAt(1)==="="&&(g=Rr(f,g)+b),_=parseFloat(g),k=g.substr((_+"").length),c=Er.lastIndex-k.length,k||(k=k||Bt.units[t]||b,c===r.length&&(r+=k,a.e+=k)),b!==k&&(f=Ss(e,t,p,k)||0),a._pt={_next:a._pt,p:w||l===1?w:",",s:f,c:_-f,m:m&&m<4||t==="zIndex"?Math.round:0});a.c=c-1;)a=i[l],Kn[a]&&(c=1,a=a==="transformOrigin"?Dt:He),sr(s,a);c&&(sr(s,He),o&&(o.svg&&s.removeAttribute("transform"),po(s,1),o.uncache=1,qg(r)))}},Ja={clearProps:function(e,t,s,r,i){if(i.data!=="isFromStart"){var o=e._pt=new Rt(e._pt,t,s,0,0,$R);return o.u=r,o.pr=-10,o.tween=i,e._props.push(s),1}}},fo=[1,0,0,1,0,0],Zg={},Kg=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},qf=function(e){var t=Tn(e,He);return Kg(t)?fo:t.substr(7).match(rg).map(tt)},Sh=function(e,t){var s=e._gsap||qs(e),r=e.style,i=qf(e),o,a,c,l;return s.svg&&e.getAttribute("transform")?(c=e.transform.baseVal.consolidate().matrix,i=[c.a,c.b,c.c,c.d,c.e,c.f],i.join(",")==="1,0,0,1,0,0"?fo:i):(i===fo&&!e.offsetParent&&e!==Dr&&!s.svg&&(c=r.display,r.display="block",o=e.parentNode,(!o||!e.offsetParent)&&(l=1,a=e.nextElementSibling,Dr.appendChild(e)),i=qf(e),c?r.display=c:sr(e,"display"),l&&(a?o.insertBefore(e,a):o?o.appendChild(e):Dr.removeChild(e))),t&&i.length>6?[i[0],i[1],i[4],i[5],i[12],i[13]]:i)},ou=function(e,t,s,r,i,o){var a=e._gsap,c=i||Sh(e,!0),l=a.xOrigin||0,u=a.yOrigin||0,h=a.xOffset||0,d=a.yOffset||0,f=c[0],m=c[1],p=c[2],g=c[3],_=c[4],w=c[5],k=t.split(" "),b=parseFloat(k[0])||0,v=parseFloat(k[1])||0,T,E,x,C;s?c!==fo&&(E=f*g-m*p)&&(x=b*(g/E)+v*(-p/E)+(p*w-g*_)/E,C=b*(-m/E)+v*(f/E)-(f*w-m*_)/E,b=x,v=C):(T=Gg(e),b=T.x+(~k[0].indexOf("%")?b/100*T.width:b),v=T.y+(~(k[1]||k[0]).indexOf("%")?v/100*T.height:v)),r||r!==!1&&a.smooth?(_=b-l,w=v-u,a.xOffset=h+(_*f+w*p)-_,a.yOffset=d+(_*m+w*g)-w):a.xOffset=a.yOffset=0,a.xOrigin=b,a.yOrigin=v,a.smooth=!!r,a.origin=t,a.originIsAbsolute=!!s,e.style[Dt]="0px 0px",o&&(ds(o,a,"xOrigin",l,b),ds(o,a,"yOrigin",u,v),ds(o,a,"xOffset",h,a.xOffset),ds(o,a,"yOffset",d,a.yOffset)),e.setAttribute("data-svg-origin",b+" "+v)},po=function(e,t){var s=e._gsap||new Ig(e);if("x"in s&&!t&&!s.uncache)return s;var r=e.style,i=s.scaleX<0,o="px",a="deg",c=getComputedStyle(e),l=Tn(e,Dt)||"0",u,h,d,f,m,p,g,_,w,k,b,v,T,E,x,C,S,R,O,L,j,W,B,V,z,X,K,J,$,F,A,I;return u=h=d=p=g=_=w=k=b=0,f=m=1,s.svg=!!(e.getCTM&&Xg(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(r[He]=(c.translate!=="none"?"translate3d("+(c.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(c.rotate!=="none"?"rotate("+c.rotate+") ":"")+(c.scale!=="none"?"scale("+c.scale.split(" ").join(",")+") ":"")+(c[He]!=="none"?c[He]:"")),r.scale=r.rotate=r.translate="none"),E=Sh(e,s.svg),s.svg&&(s.uncache?(z=e.getBBox(),l=s.xOrigin-z.x+"px "+(s.yOrigin-z.y)+"px",V=""):V=!t&&e.getAttribute("data-svg-origin"),ou(e,V||l,!!V||s.originIsAbsolute,s.smooth!==!1,E)),v=s.xOrigin||0,T=s.yOrigin||0,E!==fo&&(R=E[0],O=E[1],L=E[2],j=E[3],u=W=E[4],h=B=E[5],E.length===6?(f=Math.sqrt(R*R+O*O),m=Math.sqrt(j*j+L*L),p=R||O?vr(O,R)*Fs:0,w=L||j?vr(L,j)*Fs+p:0,w&&(m*=Math.abs(Math.cos(w*Mr))),s.svg&&(u-=v-(v*R+T*L),h-=T-(v*O+T*j))):(I=E[6],F=E[7],K=E[8],J=E[9],$=E[10],A=E[11],u=E[12],h=E[13],d=E[14],x=vr(I,$),g=x*Fs,x&&(C=Math.cos(-x),S=Math.sin(-x),V=W*C+K*S,z=B*C+J*S,X=I*C+$*S,K=W*-S+K*C,J=B*-S+J*C,$=I*-S+$*C,A=F*-S+A*C,W=V,B=z,I=X),x=vr(-L,$),_=x*Fs,x&&(C=Math.cos(-x),S=Math.sin(-x),V=R*C-K*S,z=O*C-J*S,X=L*C-$*S,A=j*S+A*C,R=V,O=z,L=X),x=vr(O,R),p=x*Fs,x&&(C=Math.cos(x),S=Math.sin(x),V=R*C+O*S,z=W*C+B*S,O=O*C-R*S,B=B*C-W*S,R=V,W=z),g&&Math.abs(g)+Math.abs(p)>359.9&&(g=p=0,_=180-_),f=tt(Math.sqrt(R*R+O*O+L*L)),m=tt(Math.sqrt(B*B+I*I)),x=vr(W,B),w=Math.abs(x)>2e-4?x*Fs:0,b=A?1/(A<0?-A:A):0),s.svg&&(V=e.getAttribute("transform"),s.forceCSS=e.setAttribute("transform","")||!Kg(Tn(e,He)),V&&e.setAttribute("transform",V))),Math.abs(w)>90&&Math.abs(w)<270&&(i?(f*=-1,w+=p<=0?180:-180,p+=p<=0?180:-180):(m*=-1,w+=w<=0?180:-180)),t=t||s.uncache,s.x=u-((s.xPercent=u&&(!t&&s.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-u)?-50:0)))?e.offsetWidth*s.xPercent/100:0)+o,s.y=h-((s.yPercent=h&&(!t&&s.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-h)?-50:0)))?e.offsetHeight*s.yPercent/100:0)+o,s.z=d+o,s.scaleX=tt(f),s.scaleY=tt(m),s.rotation=tt(p)+a,s.rotationX=tt(g)+a,s.rotationY=tt(_)+a,s.skewX=w+a,s.skewY=k+a,s.transformPerspective=b+o,(s.zOrigin=parseFloat(l.split(" ")[2])||!t&&s.zOrigin||0)&&(r[Dt]=ec(l)),s.xOffset=s.yOffset=0,s.force3D=Bt.force3D,s.renderTransform=s.svg?LR:Yg?Qg:FR,s.uncache=0,s},ec=function(e){return(e=e.split(" "))[0]+" "+e[1]},ll=function(e,t,s){var r=dt(t);return tt(parseFloat(t)+parseFloat(Ss(e,"x",s+"px",r)))+r},FR=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,Qg(e,t)},Ns="0deg",Ti="0px",$s=") ",Qg=function(e,t){var s=t||this,r=s.xPercent,i=s.yPercent,o=s.x,a=s.y,c=s.z,l=s.rotation,u=s.rotationY,h=s.rotationX,d=s.skewX,f=s.skewY,m=s.scaleX,p=s.scaleY,g=s.transformPerspective,_=s.force3D,w=s.target,k=s.zOrigin,b="",v=_==="auto"&&e&&e!==1||_===!0;if(k&&(h!==Ns||u!==Ns)){var T=parseFloat(u)*Mr,E=Math.sin(T),x=Math.cos(T),C;T=parseFloat(h)*Mr,C=Math.cos(T),o=ll(w,o,E*C*-k),a=ll(w,a,-Math.sin(T)*-k),c=ll(w,c,x*C*-k+k)}g!==Ti&&(b+="perspective("+g+$s),(r||i)&&(b+="translate("+r+"%, "+i+"%) "),(v||o!==Ti||a!==Ti||c!==Ti)&&(b+=c!==Ti||v?"translate3d("+o+", "+a+", "+c+") ":"translate("+o+", "+a+$s),l!==Ns&&(b+="rotate("+l+$s),u!==Ns&&(b+="rotateY("+u+$s),h!==Ns&&(b+="rotateX("+h+$s),(d!==Ns||f!==Ns)&&(b+="skew("+d+", "+f+$s),(m!==1||p!==1)&&(b+="scale("+m+", "+p+$s),w.style[He]=b||"translate(0, 0)"},LR=function(e,t){var s=t||this,r=s.xPercent,i=s.yPercent,o=s.x,a=s.y,c=s.rotation,l=s.skewX,u=s.skewY,h=s.scaleX,d=s.scaleY,f=s.target,m=s.xOrigin,p=s.yOrigin,g=s.xOffset,_=s.yOffset,w=s.forceCSS,k=parseFloat(o),b=parseFloat(a),v,T,E,x,C;c=parseFloat(c),l=parseFloat(l),u=parseFloat(u),u&&(u=parseFloat(u),l+=u,c+=u),c||l?(c*=Mr,l*=Mr,v=Math.cos(c)*h,T=Math.sin(c)*h,E=Math.sin(c-l)*-d,x=Math.cos(c-l)*d,l&&(u*=Mr,C=Math.tan(l-u),C=Math.sqrt(1+C*C),E*=C,x*=C,u&&(C=Math.tan(u),C=Math.sqrt(1+C*C),v*=C,T*=C)),v=tt(v),T=tt(T),E=tt(E),x=tt(x)):(v=h,x=d,T=E=0),(k&&!~(o+"").indexOf("px")||b&&!~(a+"").indexOf("px"))&&(k=Ss(f,"x",o,"px"),b=Ss(f,"y",a,"px")),(m||p||g||_)&&(k=tt(k+m-(m*v+p*E)+g),b=tt(b+p-(m*T+p*x)+_)),(r||i)&&(C=f.getBBox(),k=tt(k+r/100*C.width),b=tt(b+i/100*C.height)),C="matrix("+v+","+T+","+E+","+x+","+k+","+b+")",f.setAttribute("transform",C),w&&(f.style[He]=C)},jR=function(e,t,s,r,i){var o=360,a=ut(i),c=parseFloat(i)*(a&&~i.indexOf("rad")?Fs:1),l=c-r,u=r+l+"deg",h,d;return a&&(h=i.split("_")[1],h==="short"&&(l%=o,l!==l%(o/2)&&(l+=l<0?o:-o)),h==="cw"&&l<0?l=(l+o*Vf)%o-~~(l/o)*o:h==="ccw"&&l>0&&(l=(l-o*Vf)%o-~~(l/o)*o)),e._pt=d=new Rt(e._pt,t,s,r,l,wR),d.e=u,d.u="deg",e._props.push(s),d},Hf=function(e,t){for(var s in t)e[s]=t[s];return e},VR=function(e,t,s){var r=Hf({},s._gsap),i="perspective,force3D,transformOrigin,svgOrigin",o=s.style,a,c,l,u,h,d,f,m;r.svg?(l=s.getAttribute("transform"),s.setAttribute("transform",""),o[He]=t,a=po(s,1),sr(s,He),s.setAttribute("transform",l)):(l=getComputedStyle(s)[He],o[He]=t,a=po(s,1),o[He]=l);for(c in Kn)l=r[c],u=a[c],l!==u&&i.indexOf(c)<0&&(f=dt(l),m=dt(u),h=f!==m?Ss(s,c,l,m):parseFloat(l),d=parseFloat(u),e._pt=new Rt(e._pt,a,c,h,d-h,su),e._pt.u=m||0,e._props.push(c));Hf(a,r)};Pt("padding,margin,Width,Radius",function(n,e){var t="Top",s="Right",r="Bottom",i="Left",o=(e<3?[t,s,r,i]:[t+i,t+s,r+s,r+i]).map(function(a){return e<2?n+a:"border"+a+n});Ja[e>1?"border"+n:n]=function(a,c,l,u,h){var d,f;if(arguments.length<4)return d=o.map(function(m){return Vn(a,m,l)}),f=d.join(" "),f.split(d[0]).length===5?d[0]:f;d=(u+"").split(" "),f={},o.forEach(function(m,p){return f[m]=d[p]=d[p]||d[(p-1)/2|0]}),a.init(c,f,h)}});var Jg={name:"css",register:iu,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,s,r,i){var o=this._props,a=e.style,c=s.vars.startAt,l,u,h,d,f,m,p,g,_,w,k,b,v,T,E,x;Th||iu(),this.styles=this.styles||Hg(e),x=this.styles.props,this.tween=s;for(p in t)if(p!=="autoRound"&&(u=t[p],!(Ft[p]&&Ng(p,t,s,r,e,i)))){if(f=typeof u,m=Ja[p],f==="function"&&(u=u.call(s,r,e,i),f=typeof u),f==="string"&&~u.indexOf("random(")&&(u=lo(u)),m)m(this,e,p,u,s)&&(E=1);else if(p.substr(0,2)==="--")l=(getComputedStyle(e).getPropertyValue(p)+"").trim(),u+="",gs.lastIndex=0,gs.test(l)||(g=dt(l),_=dt(u)),_?g!==_&&(l=Ss(e,p,l,_)+_):g&&(u+=g),this.add(a,"setProperty",l,u,r,i,0,0,p),o.push(p),x.push(p,0,a[p]);else if(f!=="undefined"){if(c&&p in c?(l=typeof c[p]=="function"?c[p].call(s,r,e,i):c[p],ut(l)&&~l.indexOf("random(")&&(l=lo(l)),dt(l+"")||l==="auto"||(l+=Bt.units[p]||dt(Vn(e,p))||""),(l+"").charAt(1)==="="&&(l=Vn(e,p))):l=Vn(e,p),d=parseFloat(l),w=f==="string"&&u.charAt(1)==="="&&u.substr(0,2),w&&(u=u.substr(2)),h=parseFloat(u),p in wn&&(p==="autoAlpha"&&(d===1&&Vn(e,"visibility")==="hidden"&&h&&(d=0),x.push("visibility",0,a.visibility),ds(this,a,"visibility",d?"inherit":"hidden",h?"inherit":"hidden",!h)),p!=="scale"&&p!=="transform"&&(p=wn[p],~p.indexOf(",")&&(p=p.split(",")[0]))),k=p in Kn,k){if(this.styles.save(p),b||(v=e._gsap,v.renderTransform&&!t.parseTransform||po(e,t.parseTransform),T=t.smoothOrigin!==!1&&v.smooth,b=this._pt=new Rt(this._pt,a,He,0,1,v.renderTransform,v,0,-1),b.dep=1),p==="scale")this._pt=new Rt(this._pt,v,"scaleY",v.scaleY,(w?Rr(v.scaleY,w+h):h)-v.scaleY||0,su),this._pt.u=0,o.push("scaleY",p),p+="X";else if(p==="transformOrigin"){x.push(Dt,0,a[Dt]),u=NR(u),v.svg?ou(e,u,0,T,0,this):(_=parseFloat(u.split(" ")[2])||0,_!==v.zOrigin&&ds(this,v,"zOrigin",v.zOrigin,_),ds(this,a,p,ec(l),ec(u)));continue}else if(p==="svgOrigin"){ou(e,u,1,T,0,this);continue}else if(p in Zg){jR(this,v,p,d,w?Rr(d,w+u):u);continue}else if(p==="smoothOrigin"){ds(this,v,"smooth",v.smooth,u);continue}else if(p==="force3D"){v[p]=u;continue}else if(p==="transform"){VR(this,u,e);continue}}else p in a||(p=Xr(p)||p);if(k||(h||h===0)&&(d||d===0)&&!xR.test(u)&&p in a)g=(l+"").substr((d+"").length),h||(h=0),_=dt(u)||(p in Bt.units?Bt.units[p]:g),g!==_&&(d=Ss(e,p,l,_)),this._pt=new Rt(this._pt,k?v:a,p,d,(w?Rr(d,w+h):h)-d,!k&&(_==="px"||p==="zIndex")&&t.autoRound!==!1?TR:su),this._pt.u=_||0,g!==_&&_!=="%"&&(this._pt.b=l,this._pt.r=kR);else if(p in a)IR.call(this,e,p,l,w?w+u:u);else if(p in e)this.add(e,p,l||e[p],w?w+u:u,r,i);else if(p!=="parseTransform"){mh(p,u);continue}k||(p in a?x.push(p,0,a[p]):x.push(p,1,l||e[p])),o.push(p)}}E&&zg(this)},render:function(e,t){if(t.tween._time||!Eh())for(var s=t._pt;s;)s.r(e,s.d),s=s._next;else t.styles.revert()},get:Vn,aliases:wn,getSetter:function(e,t,s){var r=wn[t];return r&&r.indexOf(",")<0&&(t=r),t in Kn&&t!==Dt&&(e._gsap.x||Vn(e,"x"))?s&&jf===s?t==="scale"?OR:SR:(jf=s||{})&&(t==="scale"?AR:PR):e.style&&!dh(e.style[t])?ER:~t.indexOf("-")?CR:wh(e,t)},core:{_removeProperty:sr,_getMatrix:Sh}};It.utils.checkPrefix=Xr;It.core.getStyleSaver=Hg;(function(n,e,t,s){var r=Pt(n+","+e+","+t,function(i){Kn[i]=1});Pt(e,function(i){Bt.units[i]="deg",Zg[i]=1}),wn[r[13]]=n+","+e,Pt(s,function(i){var o=i.split(":");wn[o[1]]=r[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");Pt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(n){Bt.units[n]="px"});It.registerPlugin(Jg);var Ir=It.registerPlugin(Jg)||It;Ir.core.Tween;const e_=({isSelected:n,position:e,label:t,target:s,source:r})=>{const i=y.useRef(null);return y.useEffect(()=>{if(i.current){const o=i.current;Ir.fromTo(o.material,{linewidth:of*15},{linewidth:of,duration:1})}},[n,i]),Nt(()=>{const{selectedNode:o,hoveredNode:a}=mt.getState();if(i.current){const c=i.current,l=o||a;(l==null?void 0:l.ref_id)===r||(l==null?void 0:l.ref_id)===s?(c.visible=!0,Ir.to(c.material,{linewidth:6,duration:.5,ease:"power1.out"})):Ir.to(c.material,{linewidth:1,duration:.5,ease:"power1.out"})}}),U.jsxs("group",{children:[U.jsx(S_,{ref:i,isLine2:!0,name:"line",opacity:.5,points:[new ae(e.sx,e.sy,e.sz),new ae(e.tx,e.ty,e.tz)]}),U.jsx(yu,{children:U.jsx(np,{anchorX:"center",anchorY:"middle",color:"white",fontSize:10,children:t})})]})};e_.displayName="LineComponent";const zR=y.memo(e_),t_=y.memo(({linksPosition:n})=>{const e=Os(r=>r.dataInitial),{showSelectionGraph:t}=mt(r=>r),s=Jn();return U.jsx("group",{name:"simulation-3d-group__connections",visible:!t||!0,children:e==null?void 0:e.links.map(r=>{const i=(s==null?void 0:s.ref_id)===r.source||(s==null?void 0:s.ref_id)===r.target,o=n.get(r.ref_id)||{sx:0,sy:0,sz:0,tx:0,ty:0,tz:0};return U.jsx(zR,{isSelected:i,label:r.edge_type,position:o,source:r.source,target:r.target},r.ref_id)})})});t_.displayName="Connections";const UR=({color:n,scale:e})=>U.jsx(yu,{follow:!0,lockX:!1,lockY:!1,lockZ:!1,children:U.jsx(bp,{color:n,scale:e})}),BR=["#fff","#9747FF","#00887A","#0098A6","#0288D1","#33691E","#465A65","#512DA7","#5C6BC0","#5D4038","#662C00","#689F39","#6B1B00","#750000","#78909C","#7E57C2","#8C6E63","#AA47BC","#BF360C","#C2175B","#EC407A","#EF6C00","#F5511E","#FF9696","#FFC064","#FFCD29","#FFEA60"],WR=()=>{const n=Jn(),e=Os(i=>i.dataInitial),{normalizedSchemasByType:t}=cu(i=>i),s=Jf(),r=y.useMemo(()=>new py(30,2,16,100),[]);return U.jsx(U.Fragment,{children:U.jsxs(v1,{geometry:r,limit:1e3,range:1e3,visible:!n,children:[U.jsx("meshBasicMaterial",{}),e==null?void 0:e.nodes.map(i=>{var c;const a=((c=t[i.node_type])==null?void 0:c.primary_color)??(BR[s.indexOf(i.node_type)]||Ae.white);return U.jsx(UR,{color:a,scale:i.scale||1},i.ref_id)})]})})},qR=y.memo(WR);function HR(n){const e=y.useRef(n);y.useEffect(()=>{const t=Object.entries(n).reduce((s,[r,i])=>(e.current[r]!==i&&(s[r]=[e.current[r],i]),s),{});Object.keys(t).length>0&&console.log("Changed props:",t),e.current=n})}const YR=n=>{const e=/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g;return n.replace(e,t=>/^[\d*#]$/.test(t)?t:"")},n_={metalness:.9,roughness:0},s_=new sc,r_=s_.load("noimage.jpeg");new rc({...n_,map:r_});const GR=.4;new rc({...n_,map:r_,transparent:!0,opacity:GR});const ra={},XR=n=>{const[e,t]=y.useState(null);return y.useEffect(()=>{var r;if(!n){t(null);return}const s=n;if((r=ra[s])!=null&&r.texture){t(ra[s].texture);return}s_.load(n,i=>{ra[s]={texture:i,material:new rc({map:i})},t(i)},void 0,()=>{t(null)})},[n]),y.useEffect(()=>()=>{e&&(Object.values(ra).some(r=>r.texture===e)||e.dispose())},[e]),{texture:e}};function ZR(n){const e=sp(n,30),t=e.split(" ");if(t.length<=5)return e;const s=Math.ceil(t.length/3),r=s*2,i=t.slice(0,s).join(" "),o=t.slice(s,r).join(" "),a=t.slice(r).join(" ");return`${i} +${o} +${a}`}const Oh=y.memo(n=>{var b,v,T,E;const{node:e,hide:t,ignoreDistance:s,color:r}=n,i=y.useRef(null),o=y.useRef(null),a=y.useRef(null);HR(n);const c=y.useRef(new ae),{texture:l}=XR(((b=e.properties)==null?void 0:b.image_url)||""),{normalizedSchemasByType:u,getNodeKeysByType:h}=cu(x=>x);Nt(({camera:x,clock:C})=>{const{selectedNode:S,hoveredNode:R,activeEdge:O}=mt.getState(),L=()=>{const W=c.current.setFromMatrixPosition(o.current.matrixWorld);o.current&&(o.current.visible=s?!0:W.distanceTo(x.position)<1500)};if(e.ref_id===(S==null?void 0:S.ref_id)||e.ref_id===(R==null?void 0:R.ref_id)||(O==null?void 0:O.target)===e.ref_id||(O==null?void 0:O.source)===e.ref_id){o.current&&(o.current.visible=!0);const W=C.getElapsedTime(),B=2,V=W%B/B,z=1+V*2,X=1-V;if(a.current){a.current.visible=!0,a.current.scale.set(z,z,z);const{material:K}=a.current;K instanceof Mh&&(K.opacity=X)}return}a.current&&(a.current.visible=!1),L()});const d=(v=u[e.node_type])==null?void 0:v.primary_color,f=(T=u[e.node_type])==null?void 0:T.icon,m=d??r,g=(f?$_[f]:null)?f:"NodesIcon",_=h(e.node_type)||"",w=_&&(e!=null&&e.properties)?YR(String((e==null?void 0:e.properties[_])||"")):"",k={u_texture:{value:l},u_radius:{value:.5}};return U.jsx(yu,{follow:!0,lockX:!1,lockY:!1,lockZ:!1,name:"billboard",userData:e,children:U.jsxs("mesh",{ref:o,name:e.ref_id,userData:e,visible:!t,children:[U.jsxs("mesh",{ref:a,position:[0,0,-2],children:[U.jsx("ringGeometry",{args:[29,30,32]})," ",U.jsx("meshBasicMaterial",{color:m,opacity:.5,side:da,transparent:!0})]}),(E=e.properties)!=null&&E.image_url&&l?U.jsx(O_,{args:[10*2,10*2],scale:2,children:U.jsx("shaderMaterial",{fragmentShader:` + uniform sampler2D u_texture; + uniform float u_radius; + varying vec2 vUv; + + void main() { + vec2 center = vec2(0.5, 0.5); // Center of the circle + float dist = distance(vUv, center); + if (dist < u_radius) { + gl_FragColor = texture2D(u_texture, vUv); + } else { + discard; // Discard pixels outside the circle + } + } + `,uniforms:k,vertexShader:` + varying vec2 vUv; + void main() { + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); + } + `})}):U.jsx(h1,{ref:i,name:"svg",onUpdate:x=>{x.traverse(C=>{C instanceof ap&&(C.material=new Mh({color:r}))})},position:[-15,15,0],scale:2,src:`svg-icons/${g}.svg`,strokeMaterial:{color:"yellow"},userData:e}),w&&U.jsx(np,{color:r,fillOpacity:1,name:"text",position:[0,-65,0],scale:1,userData:e,...A_,fontSize:20,children:ZR(w)})]})})},(n,e)=>n.hide===e.hide&&n.ignoreDistance===e.ignoreDistance&&n.node.ref_id===e.node.ref_id);Oh.displayName="TextNode";const Yf={x:20,y:20},i_=y.memo(n=>{const{node:e,color:t,index:s}=n,r=mt(a=>a.simulation),i=y.useRef(!1),o=y.useRef(null);return Nt(({camera:a,size:c})=>{if(o.current&&r){const l=r.nodes()[s];if(!l)return;if(!i.current){const h=new ae(-1+Yf.x*2/c.width,1-Yf.y*2/c.height,0).unproject(a),d=5,f=h.sub(a.position).normalize(),m=a.position.clone().add(f.multiplyScalar(d));o.current.position.copy(m),o.current.scale.set(.1,.1,.1),o.current.visible=!1}l.fx&&!i.current&&(o.current.visible=!0,i.current=!0,Ir.to(o.current.position,{x:l.fx,y:l.fy,z:l.fz,duration:4,ease:"power2.in"}),Ir.to(o.current.scale,{x:1,y:1,z:1,duration:4.5,ease:"power2.in"}))}}),U.jsxs("mesh",{ref:o,name:"wr2",scale:e.scale||1,userData:e,children:[U.jsx("boxGeometry",{args:[40,40,40]}),U.jsx("meshStandardMaterial",{opacity:0,transparent:!0}),U.jsx(Oh,{color:t,ignoreDistance:!1,node:e,scale:e.scale||1},e.ref_id)]},e.ref_id)},(n,e)=>n.node.ref_id===e.node.ref_id);i_.displayName="NodeWrapper";const KR=Ke(Qn)` text-align: center; width: ${n=>n.type==="topic"?"auto":`${n.size}px`}; height: ${n=>n.type==="topic"?"auto":`${n.size}px`}; @@ -463,7 +485,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho top: -7px; left: -14px; } -`,HR=Ke(Qn)` +`,QR=Ke(Qn)` text-align: center; outline: 1px solid ${Ae.white}; outline-offset: 0px; @@ -563,7 +585,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho font-weight: 500; border-radius: 6px; margin-right: 5px; -`;const YR=new ae,GR=({position:n,userData:e,color:t})=>{const s=y.useRef(null),{selectedNode:r,setSelectedNode:i,showSelectionGraph:o,hoveredNode:a,setHoveredNode:c}=mt(uu(f=>f)),l=((e==null?void 0:e.node_type)||"")==="Topic"||!!e.name,u=((e==null?void 0:e.node_type)||"")==="Guest"||((e==null?void 0:e.node_type)||"")==="Person";Wt(()=>{if(o&&s.current){const f=YR.set((e==null?void 0:e.x)||0,(e==null?void 0:e.y)||0,(e==null?void 0:e.z)||0);s.current.position.copy(f)}}),y.useEffect(()=>function(){s.current&&s.current.clear()},[s]);const h=y.useMemo(()=>(a==null?void 0:a.ref_id)===(e==null?void 0:e.ref_id),[a==null?void 0:a.ref_id,e==null?void 0:e.ref_id]),d=(r==null?void 0:r.ref_id)===(e==null?void 0:e.ref_id);return l||d&&o||!d?B.jsx("group",{ref:s,position:n,children:B.jsx(go,{center:!0,sprite:!0,zIndexRange:[0,0],children:l?B.jsxs(HR,{direction:"column",onClick:f=>{f.stopPropagation(),e&&i(e)},onPointerOut:f=>{f.stopPropagation()},onPointerOver:f=>{f.stopPropagation()},children:[B.jsx("div",{className:"badge-wrapper",children:B.jsx(Rh,{type:(e==null?void 0:e.node_type)||""})}),e!=null&&e.name?B.jsx("span",{children:rp(e==null?void 0:e.name,20)}):null]}):B.jsxs(qR,{className:ep(e==null?void 0:e.node_type,{selected:d}),color:t,fontColor:Ae.white,fontSize:l?64:20,onClick:f=>{f.stopPropagation(),e&&i(e)},onPointerOut:f=>{f.stopPropagation()},onPointerOver:f=>{f.stopPropagation()},scale:h?1.05:1,selected:!1,size:d?68:40,type:(e==null?void 0:e.node_type)||"",children:[!u&&!l?B.jsx("div",{className:"badge-wrapper",children:B.jsx(Rh,{type:(e==null?void 0:e.node_type)||""})}):null,e!=null&&e.name?e==null?void 0:e.name:B.jsx(I_,{rounded:u,size:d?60:52,src:(e==null?void 0:e.image_url)||"audio_default.svg",type:e==null?void 0:e.node_type})]})})}):null},t_=y.memo(()=>{const{simulation:n,showSelectionGraph:e,selectedNode:t,selectionGraphData:s}=mt(uu(o=>o)),r=hu(),i=y.useMemo(()=>{const o=(n==null?void 0:n.nodes())||[];return(e?s.nodes:o).filter(u=>r.includes((u==null?void 0:u.ref_id)||"")||(t==null?void 0:t.ref_id)===(u==null?void 0:u.ref_id)).slice(0,pE).map(u=>{const h=sp(u.node_type||"",!0),d=new ae((u==null?void 0:u.x)||0,(u==null?void 0:u.y)||0,(u==null?void 0:u.z)||0),f=o.filter(m=>m.ref_id&&mE(m,u)).map(m=>(m==null?void 0:m.ref_id)||"")||[];return B.jsx(GR,{color:h,position:d,relativeIds:f,userData:u},`node-badge-${u.ref_id}`)})},[n,e,s.nodes,r,t==null?void 0:t.ref_id]);return B.jsx(y.Fragment,{children:i.length?i:null},"node-badges")});t_.displayName="RelevanceBadges";const XR=({link:n,animated:e})=>{const t=y.useRef(null),s=Jn(),[r,i]=y.useState(new ae(0,0,0)),[o,a]=y.useState(new ae(0,0,0)),[c,l]=y.useState(8947848),u=mt(h=>h.selectionGraphData);return y.useEffect(()=>{var f,m,p,g,_,x;const h=(s==null?void 0:s.ref_id)||"",d=s&&(h===n.target||h===n.source);!n.onlyVisibleOnSelect||d?(i(new ae(((f=n.sourcePosition)==null?void 0:f.x)||0,((m=n.sourcePosition)==null?void 0:m.y)||0,((p=n.sourcePosition)==null?void 0:p.z)||0)),a(new ae(((g=n.targetPosition)==null?void 0:g.x)||0,((_=n.targetPosition)==null?void 0:_.y)||0,((x=n.targetPosition)==null?void 0:x.z)||0))):(i(new ae(0,0,0)),a(new ae(0,0,0))),l(d?n.color||f_.children.segmentColor:s?5592405:8947848)},[s,n]),Wt(()=>{if(e&&t.current){const h=u.nodes.find(f=>f.ref_id===n.source),d=u.nodes.find(f=>f.ref_id===n.target);t.current.start.set((h==null?void 0:h.x)||0,(h==null?void 0:h.y)||0,(h==null?void 0:h.z)||0),t.current.end.set((d==null?void 0:d.x)||0,(d==null?void 0:d.y)||0,(d==null?void 0:d.z)||0)}}),B.jsx(B.Fragment,{children:B.jsx(x1,{ref:t,color:"0xFFFFFF",end:o,start:r})})},ZR=({links:n,simulation:e})=>{const t=y.useRef(null);return y.useEffect(()=>function(){t.current&&t.current.clear()},[t]),Wt(()=>{if(t.current){const s=e.nodes();t.current.children.forEach((i,o)=>{var u;const a=n[o],c=s.find(h=>a.source===h.ref_id),l=s.find(h=>a.target===h.ref_id);(u=i.position)==null||u.set((c.x+l.x)/2,(c.y+l.y)/2,(c.z+l.z)/2)})}}),n.length?B.jsx("group",{ref:t,children:n.map(s=>B.jsx("mesh",{children:B.jsx(go,{center:!0,sprite:!0,children:B.jsxs(KR,{direction:"row",justify:"center",onClick:r=>{r.stopPropagation()},onPointerOut:r=>{r.stopPropagation()},onPointerOver:r=>{r.stopPropagation()},children:[B.jsx("span",{children:s.edge_type}),B.jsx(Qn,{className:"icon",children:B.jsx(N_,{})})]})})},s.ref_id))}):null},KR=Ke(Qn)` +`;const JR=new ae,eD=({position:n,userData:e,color:t})=>{const s=y.useRef(null),{selectedNode:r,setSelectedNode:i,showSelectionGraph:o,hoveredNode:a,setHoveredNode:c}=mt(uu(f=>f)),l=((e==null?void 0:e.node_type)||"")==="Topic"||!!e.name,u=((e==null?void 0:e.node_type)||"")==="Guest"||((e==null?void 0:e.node_type)||"")==="Person";Nt(()=>{if(o&&s.current){const f=JR.set((e==null?void 0:e.x)||0,(e==null?void 0:e.y)||0,(e==null?void 0:e.z)||0);s.current.position.copy(f)}}),y.useEffect(()=>function(){s.current&&s.current.clear()},[s]);const h=y.useMemo(()=>(a==null?void 0:a.ref_id)===(e==null?void 0:e.ref_id),[a==null?void 0:a.ref_id,e==null?void 0:e.ref_id]),d=(r==null?void 0:r.ref_id)===(e==null?void 0:e.ref_id);return l||d&&o||!d?U.jsx("group",{ref:s,position:n,children:U.jsx(go,{center:!0,sprite:!0,zIndexRange:[0,0],children:l?U.jsxs(QR,{direction:"column",onClick:f=>{f.stopPropagation(),e&&i(e)},onPointerOut:f=>{f.stopPropagation()},onPointerOver:f=>{f.stopPropagation()},children:[U.jsx("div",{className:"badge-wrapper",children:U.jsx(Ph,{type:(e==null?void 0:e.node_type)||""})}),e!=null&&e.name?U.jsx("span",{children:sp(e==null?void 0:e.name,20)}):null]}):U.jsxs(KR,{className:ep(e==null?void 0:e.node_type,{selected:d}),color:t,fontColor:Ae.white,fontSize:l?64:20,onClick:f=>{f.stopPropagation(),e&&i(e)},onPointerOut:f=>{f.stopPropagation()},onPointerOver:f=>{f.stopPropagation()},scale:h?1.05:1,selected:!1,size:d?68:40,type:(e==null?void 0:e.node_type)||"",children:[!u&&!l?U.jsx("div",{className:"badge-wrapper",children:U.jsx(Ph,{type:(e==null?void 0:e.node_type)||""})}):null,e!=null&&e.name?e==null?void 0:e.name:U.jsx(F_,{rounded:u,size:d?60:52,src:(e==null?void 0:e.image_url)||"audio_default.svg",type:e==null?void 0:e.node_type})]})})}):null},o_=y.memo(()=>{const{simulation:n,showSelectionGraph:e,selectedNode:t,selectionGraphData:s}=mt(uu(o=>o)),r=ip(),i=y.useMemo(()=>{const o=(n==null?void 0:n.nodes())||[];return(e?s.nodes:o).filter(u=>r.includes((u==null?void 0:u.ref_id)||"")||(t==null?void 0:t.ref_id)===(u==null?void 0:u.ref_id)).slice(0,mE).map(u=>{const h=rp(u.node_type||"",!0),d=new ae((u==null?void 0:u.x)||0,(u==null?void 0:u.y)||0,(u==null?void 0:u.z)||0),f=o.filter(m=>m.ref_id&&gE(m,u)).map(m=>(m==null?void 0:m.ref_id)||"")||[];return U.jsx(eD,{color:h,position:d,relativeIds:f,userData:u},`node-badge-${u.ref_id}`)})},[n,e,s.nodes,r,t==null?void 0:t.ref_id]);return U.jsx(y.Fragment,{children:i.length?i:null},"node-badges")});o_.displayName="RelevanceBadges";const tD=({link:n,animated:e})=>{const t=y.useRef(null),s=Jn(),[r,i]=y.useState(new ae(0,0,0)),[o,a]=y.useState(new ae(0,0,0)),[c,l]=y.useState(8947848),u=mt(h=>h.selectionGraphData);return y.useEffect(()=>{var f,m,p,g,_,w;const h=(s==null?void 0:s.ref_id)||"",d=s&&(h===n.target||h===n.source);!n.onlyVisibleOnSelect||d?(i(new ae(((f=n.sourcePosition)==null?void 0:f.x)||0,((m=n.sourcePosition)==null?void 0:m.y)||0,((p=n.sourcePosition)==null?void 0:p.z)||0)),a(new ae(((g=n.targetPosition)==null?void 0:g.x)||0,((_=n.targetPosition)==null?void 0:_.y)||0,((w=n.targetPosition)==null?void 0:w.z)||0))):(i(new ae(0,0,0)),a(new ae(0,0,0))),l(d?n.color||m_.children.segmentColor:s?5592405:8947848)},[s,n]),Nt(()=>{if(e&&t.current){const h=u.nodes.find(f=>f.ref_id===n.source),d=u.nodes.find(f=>f.ref_id===n.target);t.current.start.set((h==null?void 0:h.x)||0,(h==null?void 0:h.y)||0,(h==null?void 0:h.z)||0),t.current.end.set((d==null?void 0:d.x)||0,(d==null?void 0:d.y)||0,(d==null?void 0:d.z)||0)}}),U.jsx(U.Fragment,{children:U.jsx(w1,{ref:t,color:"0xFFFFFF",end:o,start:r})})},nD=({links:n,simulation:e})=>{const t=y.useRef(null);return y.useEffect(()=>function(){t.current&&t.current.clear()},[t]),Nt(()=>{if(t.current){const s=e.nodes();t.current.children.forEach((i,o)=>{var u;const a=n[o],c=s.find(h=>a.source===h.ref_id),l=s.find(h=>a.target===h.ref_id);(u=i.position)==null||u.set((c.x+l.x)/2,(c.y+l.y)/2,(c.z+l.z)/2)})}}),n.length?U.jsx("group",{ref:t,children:n.map(s=>U.jsx("mesh",{children:U.jsx(go,{center:!0,sprite:!0,children:U.jsxs(sD,{direction:"row",justify:"center",onClick:r=>{r.stopPropagation()},onPointerOut:r=>{r.stopPropagation()},onPointerOver:r=>{r.stopPropagation()},children:[U.jsx("span",{children:s.edge_type}),U.jsx(Qn,{className:"icon",children:U.jsx(L_,{})})]})})},s.ref_id))}):null},sD=Ke(Qn)` text-align: center; outline-offset: 0px; @@ -614,29 +636,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho top: -7px; left: -14px; } -`;function QR(n){const e=y.useRef(n);y.useEffect(()=>{const t=Object.entries(n).reduce((s,[r,i])=>(e.current[r]!==i&&(s[r]=[e.current[r],i]),s),{});Object.keys(t).length>0&&console.log("Changed props:",t),e.current=n})}const JR=n=>{const e=/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g;return n.replace(e,t=>/^[\d*#]$/.test(t)?t:"")},n_={metalness:.9,roughness:0},s_=new nc,r_=s_.load("noimage.jpeg");new sc({...n_,map:r_});const eD=.4;new sc({...n_,map:r_,transparent:!0,opacity:eD});const ra={},tD=n=>{const[e,t]=y.useState(null);return y.useEffect(()=>{var r;if(!n){t(null);return}const s=n;if((r=ra[s])!=null&&r.texture){t(ra[s].texture);return}s_.load(n,i=>{ra[s]={texture:i,material:new sc({map:i})},t(i)},void 0,()=>{t(null)})},[n]),y.useEffect(()=>()=>{e&&(Object.values(ra).some(r=>r.texture===e)||e.dispose())},[e]),{texture:e}};function nD(n){const e=rp(n,30),t=e.split(" ");if(t.length<=5)return e;const s=Math.ceil(t.length/3),r=s*2,i=t.slice(0,s).join(" "),o=t.slice(s,r).join(" "),a=t.slice(r).join(" ");return`${i} -${o} -${a}`}const Yf={x:20,y:20},Ah=y.memo(n=>{var O,L,j,q;const{node:e,hide:t,ignoreDistance:s,color:r,index:i}=n,o=mt(z=>z.simulation),a=y.useRef(null),c=y.useRef(null),l=y.useRef(!1),u=y.useRef(null),h=y.useRef(null),d=y.useRef(null),f=y.useRef(null),{camera:m,size:p}=ze();QR(n);const g=y.useRef(new ae),{texture:_}=tD(((O=e.properties)==null?void 0:O.image_url)||""),{normalizedSchemasByType:x,getNodeKeysByType:k}=cu(z=>z);Wt(({camera:z,clock:V})=>{var F,A;const{selectedNode:U,hoveredNode:X,activeEdge:Z}=mt.getState(),Q=()=>{const M=g.current.setFromMatrixPosition(h.current.matrixWorld);h.current&&(h.current.visible=s?!0:M.distanceTo(z.position)<1500)};if(e.ref_id===(U==null?void 0:U.ref_id)||e.ref_id===(X==null?void 0:X.ref_id)||(Z==null?void 0:Z.target)===e.ref_id||(Z==null?void 0:Z.source)===e.ref_id){h.current&&(h.current.visible=!0);const M=3+.2*Math.sin(V.getElapsedTime()*2);d.current&&(d.current.visible=!0,d.current.scale.set(M,M,M));return}if(d.current&&(d.current.visible=!0),l.current&&Q(),f.current&&o){const M=o.nodes()[i];if(!M)return;if(!l.current){const N=new ae(-1+Yf.x*2/p.width,1-Yf.y*2/p.height,0).unproject(m),W=5,oe=N.sub(m.position).normalize(),re=m.position.clone().add(oe.multiplyScalar(W));f.current.position.copy(re),f.current.scale.set(.1,.1,.1),f.current.visible=!1}M.fx&&!l.current&&(f.current.visible=!0,l.current=!0,(F=a==null?void 0:a.current)==null||F.kill(),(A=c==null?void 0:c.current)==null||A.kill(),a.current=Ir.to(f.current.position,{x:M.fx,y:M.fy,z:M.fz,duration:4,ease:"power2.in"}),c.current=Ir.to(f.current.scale,{x:1,y:1,z:1,duration:4.5,ease:"power2.in"}))}});const v=(L=x[e.node_type])==null?void 0:L.primary_color,b=(j=x[e.node_type])==null?void 0:j.icon,T=v??r,w=(b?$_[b]:null)?b:"NodesIcon",C=k(e.node_type)||"",S=C&&(e!=null&&e.properties)?JR(String((e==null?void 0:e.properties[C])||"")):"",R={u_texture:{value:_},u_radius:{value:.5}};return B.jsxs("mesh",{ref:f,name:"wr2",scale:e.scale||1,userData:e,children:[B.jsx("boxGeometry",{args:[40,40,40]}),B.jsx("meshStandardMaterial",{opacity:0,transparent:!0}),B.jsx(vu,{follow:!0,lockX:!1,lockY:!1,lockZ:!1,name:"billboard",userData:e,children:B.jsxs("mesh",{ref:h,name:e.ref_id,userData:e,visible:!t,children:[B.jsxs("mesh",{ref:d,position:[0,0,-2],visible:!1,children:[B.jsx("circleGeometry",{args:[30,32]}),B.jsx("meshBasicMaterial",{color:T,opacity:.5,transparent:!0})]}),(q=e.properties)!=null&&q.image_url&&_?B.jsx(C_,{args:[10*2,10*2],scale:2,children:B.jsx("shaderMaterial",{fragmentShader:` - uniform sampler2D u_texture; - uniform float u_radius; - varying vec2 vUv; - - void main() { - vec2 center = vec2(0.5, 0.5); // Center of the circle - float dist = distance(vUv, center); - if (dist < u_radius) { - gl_FragColor = texture2D(u_texture, vUv); - } else { - discard; // Discard pixels outside the circle - } - } - `,uniforms:R,vertexShader:` - varying vec2 vUv; - void main() { - vUv = uv; - gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); - } - `})}):B.jsx(u1,{ref:u,name:"svg",onUpdate:z=>{z.traverse(V=>{V instanceof op&&(V.material=new fy({color:r}))})},position:[-15,15,0],scale:2,src:`svg-icons/${w}.svg`,strokeMaterial:{color:"yellow"},userData:e}),S&&B.jsx(np,{color:r,fillOpacity:1,name:"text",position:[0,-65,0],scale:1,userData:e,...S_,fontSize:20,children:nD(S)})]})})]},e.ref_id)},(n,e)=>n.hide===e.hide&&n.ignoreDistance===e.ignoreDistance&&n.node.ref_id===e.node.ref_id);Ah.displayName="TextNode";const i_=y.memo(()=>{const[n,e]=y.useState(null),{dataInitial:t}=Os(l=>l),s=Jn(),r=y.useRef(null),i=hu(),o=O_(t==null?void 0:t.nodes.length),{selectionGraphData:a,setSelectionData:c}=mt(uu(l=>l));return y.useEffect(()=>{const l=structuredClone((t==null?void 0:t.nodes)||[]),u=structuredClone((t==null?void 0:t.links)||[]);if(o===l.length)return;const h=l.filter(d=>d.ref_id===(s==null?void 0:s.ref_id)||i.includes((d==null?void 0:d.ref_id)||"")).map(d=>{const f=d.ref_id===(s==null?void 0:s.ref_id)?{fx:0,fy:0,fz:0}:{};return{...d,x:0,y:0,z:0,...f}});if(h){const d=u.filter(f=>h.some(m=>m.ref_id===f.target)&&h.some(m=>m.ref_id===f.source));c({nodes:h,links:d})}},[t,s,i,c,o]),y.useEffect(()=>{if(n||!a.nodes.length)return;const l=structuredClone(a.links),u=F_([]).numDimensions(2).stop().nodes(a.nodes).force("link",L_().links(l).id(h=>h.ref_id)).force("collide",j_().radius(()=>150).strength(1).iterations(1)).alpha(1).restart();e(u)},[a,n]),y.useEffect(()=>()=>{c({nodes:[],links:[]})},[c]),y.useEffect(()=>{n&&n.on("tick",()=>{r.current&&r.current.children.forEach((u,h)=>{const d=n.nodes()[h];d&&u.position.set(d.x,d.y,d.z)})})},[n]),B.jsxs(B.Fragment,{children:[B.jsx("group",{ref:r,name:"simulation-2d-group",children:a==null?void 0:a.nodes.map((l,u)=>B.jsx("mesh",{children:B.jsx(Ah,{color:"white",hide:!0,ignoreDistance:!0,index:u,node:l,scale:1},l.ref_id||l.id)},l.ref_id))}),B.jsx(v1,{fog:!0,lineWidth:.9,children:(a==null?void 0:a.links).map((l,u)=>B.jsx(XR,{animated:!0,link:l},u.toString()))},`selection-links-${a==null?void 0:a.links.length}`),n&&B.jsx(ZR,{links:a.links,simulation:n})]})});i_.displayName="SelectionDataNodes";const sD=200,rD=["#fff","#9747FF","#00887A","#0098A6","#0288D1","#33691E","#465A65","#512DA7","#5C6BC0","#5D4038","#662C00","#689F39","#6B1B00","#750000","#78909C","#7E57C2","#8C6E63","#AA47BC","#BF360C","#C2175B","#EC407A","#EF6C00","#F5511E","#FF9696","#FFC064","#FFCD29","#FFEA60"],o_=y.memo(()=>{const n=Jn(),e=V_(),t=hu(),{selectionGraphData:s,showSelectionGraph:r,setHoveredNode:i,setIsHovering:o}=mt(g=>g),a=Jf(),c=Os(g=>g.dataInitial),l=mo(g=>g.setTranscriptOpen),u=y.useCallback(g=>!!(r&&!s.nodes.find(_=>_.ref_id===g.ref_id)),[r,s]),h=y.useCallback(g=>{const _=g==null?void 0:g[0];_&&(l(!1),_.userData&&(u(_.userData)||mt.getState().setSelectedNode((_==null?void 0:_.userData)||null)))},[l,u]),d=y.useRef(null),f=y.useCallback(g=>{g.stopPropagation(),d.current&&(clearTimeout(d.current),d.current=null),e&&(o(!1),i(null))},[o,i,e]),m=y.useCallback(g=>{var k;const x=g.intersections.map(v=>v.object)[0];if(d.current&&(clearTimeout(d.current),d.current=null),(k=x==null?void 0:x.userData)!=null&&k.ref_id){const v=x.userData;u(v)||(g.stopPropagation(),d.current=setTimeout(()=>{o(!0),i(v)},sD))}},[i,u,o]),p=r&&!!n;return B.jsxs(l1,{filter:g=>g.filter(_=>{var x;return!!((x=_.userData)!=null&&x.ref_id)}),onChange:h,onPointerOut:f,onPointerOver:m,children:[B.jsx(t_,{}),B.jsx("group",{name:"simulation-3d-group__nodes",visible:!p,children:c==null?void 0:c.nodes.map((g,_)=>{const x=!!n&&(t.includes(g.ref_id)||n.ref_id===g.ref_id),k=rD[a.indexOf(g.node_type)]||Ae.white;return B.jsx(Ah,{color:k,hide:p||x,ignoreDistance:!1,index:_,node:g,scale:g.scale||1},g.ref_id)})}),B.jsx("group",{name:"simulation-3d-group__node-points",children:B.jsx(WR,{})}),p&&B.jsx(i_,{})]})});o_.displayName="Cubes";const iD={earthRef:null},oD=Zf(n=>({...iD,setEarthRef:e=>n({earthRef:e})})),aD=new ae(0,0,0),cD=()=>{const n=y.useRef(null),e=y.useRef(null),{graphStyle:t,showSelectionGraph:s}=mt(a=>a),r=oD(a=>a.setEarthRef),i=Us("textures/earth/galaxy.png"),o=Us("textures/earth/clouds.png");return Wt(({camera:a})=>{e.current&&e.current.position.copy(a.getWorldPosition(aD))}),y.useLayoutEffect(()=>{n.current&&r(n)},[r]),t!=="earth"||s?null:B.jsxs(B.Fragment,{children:[B.jsxs("mesh",{ref:n,userData:{type:"earth"},children:[B.jsx("sphereGeometry",{args:[ta,200,200]}),B.jsx(lD,{})]}),B.jsxs("mesh",{children:[B.jsx("sphereGeometry",{args:[ta+2,200,200]}),B.jsx("meshStandardMaterial",{alphaMap:o,map:o,transparent:!0})]}),B.jsxs("mesh",{children:[B.jsx("sphereGeometry",{args:[ta*4,200,200]}),B.jsx("meshStandardMaterial",{map:i,opacity:.4,side:hl,transparent:!0})]}),B.jsx("directionalLight",{ref:e,intensity:.9,position:[0,0,ta*3]})]})},lD=()=>{const n=Us("textures/earth/earth.jpeg"),e=Us("textures/earth/bump.jpeg"),t=Us("textures/earth/water.png"),s=y.useMemo(()=>new sc({map:n,bumpMap:e,aoMap:e,roughnessMap:e,metalnessMap:t,toneMapped:!0,roughness:35,metalness:0}),[n,e,t]);return B.jsx("meshStandardMaterial",{...s})},uD="C",hD=256,dD=256,fD={g:"LottieFiles AE 0.1.20"},pD=[{ty:0,nm:"I",sr:1,st:0,op:26,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[128,128,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],w:256,h:256,refId:"comp_0",ind:1},{ty:0,nm:"I",sr:1,st:26,op:52,ip:26,hasMask:!1,ao:0,ks:{a:{a:0,k:[128,128,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],w:256,h:256,refId:"comp_1",ind:2},{ty:0,nm:"I",sr:1,st:52,op:78,ip:52,hasMask:!1,ao:0,ks:{a:{a:0,k:[128,128,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],w:256,h:256,refId:"comp_2",ind:3},{ty:0,nm:"I",sr:1,st:78,op:108,ip:78,hasMask:!1,ao:0,ks:{a:{a:0,k:[128,128,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],w:256,h:256,refId:"comp_3",ind:4}],mD="5.5.7",gD=60,_D=104,yD=0,vD=[{nm:"",id:"comp_0",layers:[{ty:4,nm:"I",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.656,.016],[0,20],[-34.641,0],[.016,-19.984]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[51.962,10],[17.321,30],[17.321,-10],[51.962,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,-9.984],[17.32,10],[17.32,-30],[-17.32,-50.016]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,30],[17.32,50],[17.305,10],[-17.32,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.321,10],[-17.321,-30],[17.321,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.321,10],[-51.962,30],[-51.962,-10],[-17.321,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.641,0],[0,20],[-34.641,0],[0,-20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:1}]},{nm:"",id:"comp_1",layers:[{ty:4,nm:"R",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:0}},ef:[],shapes:[],ind:1},{ty:4,nm:"S",sr:1,st:-20,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,-10.016],[-17.32,-30],[17.32,-50],[51.961,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:2,parent:1},{ty:4,nm:"T",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.641,0],[.015,-20],[0,20],[34.641,40]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:3,parent:1},{ty:4,nm:"S",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,-10.016],[-17.32,-30],[17.32,-50],[51.961,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:4,parent:1},{ty:4,nm:"F",sr:1,st:-20,op:33,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.324,30],[-17.34,-9.984],[17.336,-30.016],[17.336,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:5,parent:1},{ty:4,nm:"T",sr:1,st:-20,op:35,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.641,0],[.015,-20],[0,20],[34.641,40]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:6,parent:1},{ty:4,nm:"F",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.324,30],[-17.34,-9.984],[17.336,-30.016],[17.336,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:7,parent:1},{ty:4,nm:"F",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.305,30],[-17.336,-9.984],[17.336,-30.016],[17.32,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:8,parent:1},{ty:4,nm:"T",sr:1,st:-20,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[.016,-20.016],[-34.643,-40],[-34.641,.016],[0,20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:9,parent:1},{ty:4,nm:"S",sr:1,st:-20,op:31,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,-10],[17.321,30],[-17.321,10],[-17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.305,50],[-51.961,30],[-17.321,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:10,parent:1},{ty:4,nm:"F",sr:1,st:-20,op:34,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.305,30],[-17.336,-9.984],[17.336,-30.016],[17.32,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:11,parent:1},{ty:4,nm:"S",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,-10],[17.321,30],[-17.321,10],[-17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.305,50],[-51.961,30],[-17.321,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:12,parent:1},{ty:4,nm:"T",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[.016,-20.016],[-34.643,-40],[-34.641,.016],[0,20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:13,parent:1}]},{nm:"",id:"comp_2",layers:[{ty:4,nm:"R",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:0}},ef:[],shapes:[],ind:1},{ty:4,nm:"T",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-34.656,.031],[.047,-19.969],[34.652,.031],[0,20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:2,parent:1},{ty:4,nm:"S",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,10],[17.32,-9.984],[17.32,-50],[-17.32,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:3,parent:1},{ty:4,nm:"F",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.321,30],[-51.962,10],[-51.962,-30],[-17.321,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:4,parent:1},{ty:4,nm:"S",sr:1,st:0,op:30,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,10],[17.32,-9.984],[17.32,-50],[-17.32,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:5,parent:1},{ty:4,nm:"F",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[51.962,30],[17.321,10],[17.321,-30],[51.962,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:6,parent:1},{ty:4,nm:"S",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.321,10],[-17.321,-30],[17.321,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,50],[17.32,30],[17.336,-10],[-17.336,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:7,parent:1},{ty:4,nm:"F",sr:1,st:0,op:30,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[51.962,30],[17.321,10],[17.321,-30],[51.962,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:8,parent:1},{ty:4,nm:"T",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-34.656,0],[.015,-20],[34.656,0],[.012,20.062]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:9,parent:1}]},{nm:"",id:"comp_3",layers:[{ty:4,nm:"R",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:0}},ef:[],shapes:[],ind:1},{ty:4,nm:"S",sr:1,st:0,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.321,10],[-17.321,-30],[17.321,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-10],[-17.32,-30.016],[-51.961,-10],[-17.305,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:2,parent:1},{ty:4,nm:"T",sr:1,st:0,op:32,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[.015,60.016],[-34.642,40],[-34.641,0],[0,20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:3,parent:1},{ty:4,nm:"S",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,10],[-17.32,-30],[17.32,-10],[17.32,30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.312,-10],[-17.313,10],[17.332,30],[51.977,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:4,parent:1},{ty:4,nm:"F",sr:1,st:0,op:32,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-29.984],[17.348,10],[-17.305,30],[-17.305,-9.984]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:5,parent:1},{ty:4,nm:"F",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-30],[17.32,10],[-17.32,30],[-17.336,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:6,parent:1},{ty:4,nm:"S",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.321,10],[-17.321,-30],[17.321,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-10],[-17.32,-30.016],[-51.961,-10],[-17.305,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:7,parent:1},{ty:4,nm:"T",sr:1,st:0,op:32,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.641,0],[0,-20],[0,-60.016],[34.641,-40]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:8,parent:1},{ty:4,nm:"S",sr:1,st:0,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,10],[-17.32,-30],[17.32,-10],[17.32,30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.312,-10],[-17.313,10],[17.332,30],[51.977,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:9,parent:1},{ty:4,nm:"F",sr:1,st:0,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-30],[17.32,10],[-17.32,30],[-17.336,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:10,parent:1}]}],bD={nm:uD,h:hD,w:dD,meta:fD,layers:pD,v:mD,fr:gD,op:_D,ip:yD,assets:vD},xD=({meshId:n})=>{const e=y.useRef(null);return y.useEffect(()=>{const t=document.getElementById(`lottie-animation-${n}`);return t&&(e.current=p_.loadAnimation({container:t,animationData:bD,loop:!0,autoplay:!0})),()=>{e.current&&e.current.destroy()}},[n]),B.jsx("div",{id:`lottie-animation-${n}`,style:{width:"2em",height:"2em"}})},ll=()=>Math.floor(Math.random()*2001)-1e3,wD=()=>B.jsx(B.Fragment,{children:["a","b","c"].map(n=>{const e=ll(),t=ll(),s=ll();return B.jsx("mesh",{position:[e,t,s],children:B.jsx(go,{center:!0,sprite:!0,children:B.jsx(kD,{children:B.jsx(xD,{meshId:n})})})},n)})}),kD=Ke.div` +`,a_=y.memo(()=>{const[n,e]=y.useState(null),{dataInitial:t}=Os(l=>l),s=Jn(),r=y.useRef(null),i=ip(),o=P_(t==null?void 0:t.nodes.length),{selectionGraphData:a,setSelectionData:c}=mt(uu(l=>l));return y.useEffect(()=>{const l=structuredClone((t==null?void 0:t.nodes)||[]),u=structuredClone((t==null?void 0:t.links)||[]);if(o===l.length)return;const h=l.filter(d=>d.ref_id===(s==null?void 0:s.ref_id)||i.includes((d==null?void 0:d.ref_id)||"")).map(d=>{const f=d.ref_id===(s==null?void 0:s.ref_id)?{fx:0,fy:0,fz:0}:{};return{...d,x:0,y:0,z:0,...f}});if(h){const d=u.filter(f=>h.some(m=>m.ref_id===f.target)&&h.some(m=>m.ref_id===f.source));c({nodes:h,links:d})}},[t,s,i,c,o]),y.useEffect(()=>{if(n||!a.nodes.length)return;const l=structuredClone(a.links),u=j_([]).numDimensions(2).stop().nodes(a.nodes).force("link",V_().links(l).id(h=>h.ref_id)).force("collide",z_().radius(()=>150).strength(1).iterations(1)).alpha(1).restart();e(u)},[a,n]),y.useEffect(()=>()=>{c({nodes:[],links:[]})},[c]),y.useEffect(()=>{n&&n.on("tick",()=>{r.current&&r.current.children.forEach((u,h)=>{const d=n.nodes()[h];d&&u.position.set(d.x,d.y,d.z)})})},[n]),U.jsxs(U.Fragment,{children:[U.jsx("group",{ref:r,name:"simulation-2d-group",children:a==null?void 0:a.nodes.map(l=>U.jsx("mesh",{children:U.jsx(Oh,{color:"white",hide:!0,ignoreDistance:!0,node:l,scale:1},l.ref_id||l.id)},l.ref_id))}),U.jsx(b1,{fog:!0,lineWidth:.9,children:(a==null?void 0:a.links).map((l,u)=>U.jsx(tD,{animated:!0,link:l},u.toString()))},`selection-links-${a==null?void 0:a.links.length}`),n&&U.jsx(nD,{links:a.links,simulation:n})]})});a_.displayName="SelectionDataNodes";const rD=200,iD=["#fff","#9747FF","#00887A","#0098A6","#0288D1","#33691E","#465A65","#512DA7","#5C6BC0","#5D4038","#662C00","#689F39","#6B1B00","#750000","#78909C","#7E57C2","#8C6E63","#AA47BC","#BF360C","#C2175B","#EC407A","#EF6C00","#F5511E","#FF9696","#FFC064","#FFCD29","#FFEA60"],c_=y.memo(()=>{const n=Jn(),e=U_(),{selectionGraphData:t,showSelectionGraph:s,setHoveredNode:r,setIsHovering:i}=mt(p=>p),o=Jf(),a=Os(p=>p.dataInitial),c=mo(p=>p.setTranscriptOpen),l=y.useCallback(p=>!!(s&&!t.nodes.find(g=>g.ref_id===p.ref_id)),[s,t]),u=y.useCallback(p=>{const g=p==null?void 0:p[0];g&&(c(!1),g.userData&&(l(g.userData)||mt.getState().setSelectedNode((g==null?void 0:g.userData)||null)))},[c,l]),h=y.useRef(null),d=y.useCallback(p=>{p.stopPropagation(),h.current&&(clearTimeout(h.current),h.current=null),e&&(i(!1),r(null))},[i,r,e]),f=y.useCallback(p=>{var w;const _=p.intersections.map(k=>k.object)[0];if(h.current&&(clearTimeout(h.current),h.current=null),(w=_==null?void 0:_.userData)!=null&&w.ref_id){const k=_.userData;l(k)||(p.stopPropagation(),h.current=setTimeout(()=>{i(!0),r(k)},rD))}},[r,l,i]),m=s&&!!n;return U.jsxs(U.Fragment,{children:[U.jsxs(u1,{filter:p=>p.filter(g=>{var _;return!!((_=g.userData)!=null&&_.ref_id)}),onChange:u,onPointerOut:d,onPointerOver:f,children:[U.jsx("group",{name:"simulation-3d-group__nodes",visible:!m,children:a==null?void 0:a.nodes.map((p,g)=>{const _=iD[o.indexOf(p.node_type)]||Ae.white;return U.jsx(i_,{color:_,index:g,node:p,scale:p.scale||1},p.ref_id)})}),U.jsx("group",{name:"simulation-3d-group__node-points",children:U.jsx(qR,{})}),m&&U.jsx(a_,{})]}),U.jsx(o_,{})]})});c_.displayName="Cubes";const oD={earthRef:null},aD=Zf(n=>({...oD,setEarthRef:e=>n({earthRef:e})})),cD=new ae(0,0,0),lD=()=>{const n=y.useRef(null),e=y.useRef(null),{graphStyle:t,showSelectionGraph:s}=mt(a=>a),r=aD(a=>a.setEarthRef),i=Us("textures/earth/galaxy.png"),o=Us("textures/earth/clouds.png");return Nt(({camera:a})=>{e.current&&e.current.position.copy(a.getWorldPosition(cD))}),y.useLayoutEffect(()=>{n.current&&r(n)},[r]),t!=="earth"||s?null:U.jsxs(U.Fragment,{children:[U.jsxs("mesh",{ref:n,userData:{type:"earth"},children:[U.jsx("sphereGeometry",{args:[ta,200,200]}),U.jsx(uD,{})]}),U.jsxs("mesh",{children:[U.jsx("sphereGeometry",{args:[ta+2,200,200]}),U.jsx("meshStandardMaterial",{alphaMap:o,map:o,transparent:!0})]}),U.jsxs("mesh",{children:[U.jsx("sphereGeometry",{args:[ta*4,200,200]}),U.jsx("meshStandardMaterial",{map:i,opacity:.4,side:da,transparent:!0})]}),U.jsx("directionalLight",{ref:e,intensity:.9,position:[0,0,ta*3]})]})},uD=()=>{const n=Us("textures/earth/earth.jpeg"),e=Us("textures/earth/bump.jpeg"),t=Us("textures/earth/water.png"),s=y.useMemo(()=>new rc({map:n,bumpMap:e,aoMap:e,roughnessMap:e,metalnessMap:t,toneMapped:!0,roughness:35,metalness:0}),[n,e,t]);return U.jsx("meshStandardMaterial",{...s})},hD="C",dD=256,fD=256,pD={g:"LottieFiles AE 0.1.20"},mD=[{ty:0,nm:"I",sr:1,st:0,op:26,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[128,128,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],w:256,h:256,refId:"comp_0",ind:1},{ty:0,nm:"I",sr:1,st:26,op:52,ip:26,hasMask:!1,ao:0,ks:{a:{a:0,k:[128,128,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],w:256,h:256,refId:"comp_1",ind:2},{ty:0,nm:"I",sr:1,st:52,op:78,ip:52,hasMask:!1,ao:0,ks:{a:{a:0,k:[128,128,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],w:256,h:256,refId:"comp_2",ind:3},{ty:0,nm:"I",sr:1,st:78,op:108,ip:78,hasMask:!1,ao:0,ks:{a:{a:0,k:[128,128,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],w:256,h:256,refId:"comp_3",ind:4}],gD="5.5.7",_D=60,yD=104,vD=0,bD=[{nm:"",id:"comp_0",layers:[{ty:4,nm:"I",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.656,.016],[0,20],[-34.641,0],[.016,-19.984]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[51.962,10],[17.321,30],[17.321,-10],[51.962,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,-9.984],[17.32,10],[17.32,-30],[-17.32,-50.016]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,30],[17.32,50],[17.305,10],[-17.32,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.321,10],[-17.321,-30],[17.321,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.321,10],[-51.962,30],[-51.962,-10],[-17.321,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]},{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.641,0],[0,20],[-34.641,0],[0,-20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:1}]},{nm:"",id:"comp_1",layers:[{ty:4,nm:"R",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:0}},ef:[],shapes:[],ind:1},{ty:4,nm:"S",sr:1,st:-20,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,-10.016],[-17.32,-30],[17.32,-50],[51.961,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:2,parent:1},{ty:4,nm:"T",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.641,0],[.015,-20],[0,20],[34.641,40]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:3,parent:1},{ty:4,nm:"S",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,-10.016],[-17.32,-30],[17.32,-50],[51.961,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:4,parent:1},{ty:4,nm:"F",sr:1,st:-20,op:33,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.324,30],[-17.34,-9.984],[17.336,-30.016],[17.336,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:5,parent:1},{ty:4,nm:"T",sr:1,st:-20,op:35,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.641,0],[.015,-20],[0,20],[34.641,40]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:6,parent:1},{ty:4,nm:"F",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.324,30],[-17.34,-9.984],[17.336,-30.016],[17.336,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:7,parent:1},{ty:4,nm:"F",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.305,30],[-17.336,-9.984],[17.336,-30.016],[17.32,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:8,parent:1},{ty:4,nm:"T",sr:1,st:-20,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[.016,-20.016],[-34.643,-40],[-34.641,.016],[0,20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:9,parent:1},{ty:4,nm:"S",sr:1,st:-20,op:31,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,-10],[17.321,30],[-17.321,10],[-17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.305,50],[-51.961,30],[-17.321,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:10,parent:1},{ty:4,nm:"F",sr:1,st:-20,op:34,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.305,30],[-17.336,-9.984],[17.336,-30.016],[17.32,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:11,parent:1},{ty:4,nm:"S",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,-10],[17.321,30],[-17.321,10],[-17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.305,50],[-51.961,30],[-17.321,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:12,parent:1},{ty:4,nm:"T",sr:1,st:-20,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[.016,-20.016],[-34.643,-40],[-34.641,.016],[0,20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:13,parent:1}]},{nm:"",id:"comp_2",layers:[{ty:4,nm:"R",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:0}},ef:[],shapes:[],ind:1},{ty:4,nm:"T",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-34.656,.031],[.047,-19.969],[34.652,.031],[0,20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:2,parent:1},{ty:4,nm:"S",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,10],[17.32,-9.984],[17.32,-50],[-17.32,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:3,parent:1},{ty:4,nm:"F",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.321,30],[-51.962,10],[-51.962,-30],[-17.321,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:4,parent:1},{ty:4,nm:"S",sr:1,st:0,op:30,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,30],[-17.32,10],[-17.32,-30],[17.32,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,10],[17.32,-9.984],[17.32,-50],[-17.32,-30]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:5,parent:1},{ty:4,nm:"F",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[51.962,30],[17.321,10],[17.321,-30],[51.962,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:6,parent:1},{ty:4,nm:"S",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.321,10],[-17.321,-30],[17.321,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,50],[17.32,30],[17.336,-10],[-17.336,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:7,parent:1},{ty:4,nm:"F",sr:1,st:0,op:30,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[51.962,30],[17.321,10],[17.321,-30],[51.962,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:8,parent:1},{ty:4,nm:"T",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-34.656,0],[.015,-20],[34.656,0],[.012,20.062]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:9,parent:1}]},{nm:"",id:"comp_3",layers:[{ty:4,nm:"R",sr:1,st:0,op:30,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[0,0,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[128,128,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:0}},ef:[],shapes:[],ind:1},{ty:4,nm:"S",sr:1,st:0,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.321,10],[-17.321,-30],[17.321,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-10],[-17.32,-30.016],[-51.961,-10],[-17.305,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:2,parent:1},{ty:4,nm:"T",sr:1,st:0,op:32,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[.015,60.016],[-34.642,40],[-34.641,0],[0,20]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,30]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:3,parent:1},{ty:4,nm:"S",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,10],[-17.32,-30],[17.32,-10],[17.32,30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.312,-10],[-17.313,10],[17.332,30],[51.977,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:4,parent:1},{ty:4,nm:"F",sr:1,st:0,op:32,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,10],[-17.321,30],[-17.321,-10],[17.321,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-29.984],[17.348,10],[-17.305,30],[-17.305,-9.984]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:5,parent:1},{ty:4,nm:"F",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-30],[17.32,10],[-17.32,30],[-17.336,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:6,parent:1},{ty:4,nm:"S",sr:1,st:0,op:13,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.321,30],[-17.321,10],[-17.321,-30],[17.321,-10]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-10],[-17.32,-30.016],[-51.961,-10],[-17.305,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[61.962,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:7,parent:1},{ty:4,nm:"T",sr:1,st:0,op:32,ip:0,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"T",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[0,20],[-34.641,0],[0,-20],[34.641,0]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[34.641,0],[0,-20],[0,-60.016],[34.641,-40]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[44.641,70]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:8,parent:1},{ty:4,nm:"S",sr:1,st:0,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"S",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[-17.32,10],[-17.32,-30],[17.32,-10],[17.32,30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.312,-10],[-17.313,10],[17.332,30],[51.977,10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,60]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:9,parent:1},{ty:4,nm:"F",sr:1,st:0,op:32,ip:13,hasMask:!1,ao:0,ks:{a:{a:0,k:[44.641,50,0]},s:{a:0,k:[100,100,100]},sk:{a:0,k:0},p:{a:0,k:[0,0,0]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}},ef:[],shapes:[{ty:"gr",nm:"F",it:[{ty:"sh",nm:"P",d:1,ks:{a:1,k:[{o:{x:.8,y:0},i:{x:.2,y:1},s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.32,10],[-17.32,30],[-17.32,-10],[17.32,-30]]}],t:0},{s:[{c:!0,i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[17.336,-30],[17.32,10],[-17.32,30],[-17.336,-10]]}],t:26}]}},{ty:"st",nm:"S",lc:1,lj:2,ml:1,o:{a:0,k:100},w:{a:0,k:4},c:{a:0,k:[1,1,1]}},{ty:"tr",a:{a:0,k:[0,0]},s:{a:0,k:[100,100]},sk:{a:0,k:0},p:{a:0,k:[27.32,40]},r:{a:0,k:0},sa:{a:0,k:0},o:{a:0,k:100}}]}],ind:10,parent:1}]}],xD={nm:hD,h:dD,w:fD,meta:pD,layers:mD,v:gD,fr:_D,op:yD,ip:vD,assets:bD},wD=({meshId:n})=>{const e=y.useRef(null);return y.useEffect(()=>{const t=document.getElementById(`lottie-animation-${n}`);return t&&(e.current=g_.loadAnimation({container:t,animationData:xD,loop:!0,autoplay:!0})),()=>{e.current&&e.current.destroy()}},[n]),U.jsx("div",{id:`lottie-animation-${n}`,style:{width:"2em",height:"2em"}})},ul=()=>Math.floor(Math.random()*2001)-1e3,kD=()=>U.jsx(U.Fragment,{children:["a","b","c"].map(n=>{const e=ul(),t=ul(),s=ul();return U.jsx("mesh",{position:[e,t,s],children:U.jsx(go,{center:!0,sprite:!0,children:U.jsx(TD,{children:U.jsx(wD,{meshId:n})})})},n)})}),TD=Ke.div` border: 2px solid white; border-radius: 50%; display: flex; @@ -644,7 +644,7 @@ ${a}`}const Yf={x:20,y:20},Ah=y.memo(n=>{var O,L,j,q;const{node:e,hide:t,ignoreD justify-content: center; color: white; font-size: 20px; -`,Ei=n=>({close:{backgroundColor:"rgba(48, 51, 66, 1)",borderColor:"#fff",fontColor:"rgba(255, 255, 255, 1)"},focus:{backgroundColor:n?"rgba(255, 255, 255, 0.90);":"rgba(255, 255, 255, 0.90)",borderColor:n?"#FFDB58bb":"#fff",fontColor:"rgba(48, 51, 66, 1)"},menu:{backgroundColor:"#00000066",borderColor:n?"#ffffff66":"#5078f2",fontColor:n?"#ffffff66":"#fff"}}),TD=new ae,a_=y.memo(()=>{var w,C;const n=y.useRef(null),e=mo(S=>S.setSidebarOpen),[t,s]=I.useState(null),{open:r}=No("editNodeName"),{open:i}=No("addEdgeToNode"),{open:o}=No("mergeToNode"),{open:a}=No("createBounty"),[c]=Qf(S=>[S.isAdmin]),[l]=Os(S=>[S.addNewNode]),u=Jn(),{showSelectionGraph:h,selectionGraphData:d,setSelectedNode:f,setShowSelectionGraph:m}=mt(S=>S),p=my(),g=y.useCallback(async()=>{try{if(u!=null&&u.ref_id){const S=await m_(u==null?void 0:u.ref_id,d.nodes.length||0);S&&l(S)}}catch(S){console.error(S)}},[l,u==null?void 0:u.ref_id,d.nodes.length]);Wt(()=>{_()});const _=y.useCallback(()=>{const S=h?d:p;if(n.current){const R=S==null?void 0:S.nodes.find(O=>O.ref_id===(u==null?void 0:u.ref_id));if(R){const O=TD.set(R==null?void 0:R.x,R==null?void 0:R.y,R==null?void 0:R.z);n.current.position.copy(O)}}},[u,h,d,p]),x=y.useMemo(()=>{const S=c?[{key:"control-key-1",colors:Ei(h).focus,icon:B.jsx(q_,{}),left:-80,className:"add",onClick:O=>{s(O.currentTarget)}},{key:"control-key-2",colors:Ei(h).focus,icon:B.jsx(H_,{}),left:-40,className:"edit",onClick:()=>{r()}}]:[],R=[{key:"control-key-4",colors:Ei(h).focus,icon:B.jsx(g_,{}),left:0,className:"expand",onClick:()=>{const O=!h;m(O),O&&e(!0)}},{key:"control-key-5",colors:Ei(!0).close,icon:B.jsx(Y_,{}),left:40,className:"exit",onClick:()=>{g()}},{key:"control-key-6",colors:Ei(!0).close,icon:B.jsx(__,{}),left:40,className:"exit",onClick:()=>{m(!1),f(null)}}];return[...S,...R].map((O,L)=>({...O,left:-80+L*40}))},[c,h,r,m,e,g,f]);if(!u)return null;const k=()=>{s(null)},v=!!t,b=v?"simple-popover":void 0,T=((w=u==null?void 0:u.node_type)==null?void 0:w.toLowerCase())==="repository",E=!!(u&&((C=u==null?void 0:u.node_type)==null?void 0:C.toLowerCase())==="function");return B.jsx("group",{ref:n,children:B.jsxs(go,{center:!0,className:"control-panel",onClick:S=>S.stopPropagation(),onKeyDown:S=>S.stopPropagation(),onPointerDown:S=>S.stopPropagation(),onPointerOut:S=>S.stopPropagation(),onPointerOver:S=>S.stopPropagation(),onPointerUp:S=>S.stopPropagation(),sprite:!0,zIndexRange:[16777271,16777272],children:[x.map(S=>B.jsx(ED,{backgroundColor:S.colors.backgroundColor,borderColor:S.colors.borderColor,className:S.className,fontColor:S.colors.fontColor,left:S.left,onClick:R=>{R.stopPropagation(),S.onClick(R)},children:S.icon},S.key)),E&&B.jsx(SD,{left:2,onClick:()=>{a()},children:"Create Test"}),B.jsx(CD,{anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"right"},id:b,onClose:k,open:v,transformOrigin:{vertical:"top",horizontal:"right"},children:T?B.jsxs(B.Fragment,{children:[B.jsxs(br,{"data-testid":"generate_tests",onClick:()=>{k()},children:[B.jsx(Gf,{children:B.jsx(Dh,{"data-testid":"AddCircleIcon"})}),"Generate Tests"]}),B.jsxs(br,{"data-testid":"add_comments",onClick:()=>{k()},children:[B.jsxs(Gf,{children:[B.jsx(U_,{"data-testid":"DocumentIcon"})," "]}),"Add Comments"]}),B.jsxs(br,{"data-testid":"review_bugs",onClick:()=>{k()},children:[B.jsx(B_,{"data-testid":"ConstructionIcon"})," Review Bugs"]}),B.jsxs(br,{"data-testid":"find_vulnerabilities",onClick:()=>{k()},children:[B.jsx(W_,{"data-testid":"RobotIcon"})," Find Vulnerabilities"]})]}):B.jsxs(B.Fragment,{children:[B.jsxs(br,{"data-testid":"merge",onClick:()=>{o(),k()},children:[B.jsx(z_,{"data-testid":"MergeIcon"})," Merge"]}),B.jsxs(br,{"data-testid":"add_edge",onClick:()=>{i(),k()},children:[B.jsx(Dh,{"data-testid":"AddCircleIcon"}),"Add edge"]})]})})]})})});a_.displayName="NodeControls";const ED=Ke.div` +`,Ei=n=>({close:{backgroundColor:"rgba(48, 51, 66, 1)",borderColor:"#fff",fontColor:"rgba(255, 255, 255, 1)"},focus:{backgroundColor:n?"rgba(255, 255, 255, 0.90);":"rgba(255, 255, 255, 0.90)",borderColor:n?"#FFDB58bb":"#fff",fontColor:"rgba(48, 51, 66, 1)"},menu:{backgroundColor:"#00000066",borderColor:n?"#ffffff66":"#5078f2",fontColor:n?"#ffffff66":"#fff"}}),ED=new ae,l_=y.memo(()=>{var x,C;const n=y.useRef(null),e=mo(S=>S.setSidebarOpen),[t,s]=M.useState(null),{open:r}=No("editNodeName"),{open:i}=No("addEdgeToNode"),{open:o}=No("mergeToNode"),{open:a}=No("createBounty"),[c]=Qf(S=>[S.isAdmin]),[l]=Os(S=>[S.addNewNode]),u=Jn(),{showSelectionGraph:h,selectionGraphData:d,setSelectedNode:f,setShowSelectionGraph:m}=mt(S=>S),p=gy(),g=y.useCallback(async()=>{try{if(u!=null&&u.ref_id){const S=await __(u==null?void 0:u.ref_id,d.nodes.length||0);S&&l(S)}}catch(S){console.error(S)}},[l,u==null?void 0:u.ref_id,d.nodes.length]);Nt(()=>{_()});const _=y.useCallback(()=>{const S=h?d:p;if(n.current){const R=S==null?void 0:S.nodes.find(O=>O.ref_id===(u==null?void 0:u.ref_id));if(R){const O=ED.set(R==null?void 0:R.x,R==null?void 0:R.y,R==null?void 0:R.z);n.current.position.copy(O)}}},[u,h,d,p]),w=y.useMemo(()=>{const S=c?[{key:"control-key-1",colors:Ei(h).focus,icon:U.jsx(Y_,{}),left:-80,className:"add",onClick:O=>{s(O.currentTarget)}},{key:"control-key-2",colors:Ei(h).focus,icon:U.jsx(G_,{}),left:-40,className:"edit",onClick:()=>{r()}}]:[],R=[{key:"control-key-4",colors:Ei(h).focus,icon:U.jsx(y_,{}),left:0,className:"expand",onClick:()=>{const O=!h;m(O),O&&e(!0)}},{key:"control-key-5",colors:Ei(!0).close,icon:U.jsx(X_,{}),left:40,className:"exit",onClick:()=>{g()}},{key:"control-key-6",colors:Ei(!0).close,icon:U.jsx(v_,{}),left:40,className:"exit",onClick:()=>{m(!1),f(null)}}];return[...S,...R].map((O,L)=>({...O,left:-80+L*40}))},[c,h,r,m,e,g,f]);if(!u)return null;const k=()=>{s(null)},b=!!t,v=b?"simple-popover":void 0,T=((x=u==null?void 0:u.node_type)==null?void 0:x.toLowerCase())==="repository",E=!!(u&&((C=u==null?void 0:u.node_type)==null?void 0:C.toLowerCase())==="function");return U.jsx("group",{ref:n,children:U.jsxs(go,{center:!0,className:"control-panel",onClick:S=>S.stopPropagation(),onKeyDown:S=>S.stopPropagation(),onPointerDown:S=>S.stopPropagation(),onPointerOut:S=>S.stopPropagation(),onPointerOver:S=>S.stopPropagation(),onPointerUp:S=>S.stopPropagation(),sprite:!0,zIndexRange:[16777271,16777272],children:[w.map(S=>U.jsx(CD,{backgroundColor:S.colors.backgroundColor,borderColor:S.colors.borderColor,className:S.className,fontColor:S.colors.fontColor,left:S.left,onClick:R=>{R.stopPropagation(),S.onClick(R)},children:S.icon},S.key)),E&&U.jsx(OD,{left:2,onClick:()=>{a()},children:"Create Test"}),U.jsx(SD,{anchorEl:t,anchorOrigin:{vertical:"bottom",horizontal:"right"},id:v,onClose:k,open:b,transformOrigin:{vertical:"top",horizontal:"right"},children:T?U.jsxs(U.Fragment,{children:[U.jsxs(br,{"data-testid":"generate_tests",onClick:()=>{k()},children:[U.jsx(Gf,{children:U.jsx(Rh,{"data-testid":"AddCircleIcon"})}),"Generate Tests"]}),U.jsxs(br,{"data-testid":"add_comments",onClick:()=>{k()},children:[U.jsxs(Gf,{children:[U.jsx(W_,{"data-testid":"DocumentIcon"})," "]}),"Add Comments"]}),U.jsxs(br,{"data-testid":"review_bugs",onClick:()=>{k()},children:[U.jsx(q_,{"data-testid":"ConstructionIcon"})," Review Bugs"]}),U.jsxs(br,{"data-testid":"find_vulnerabilities",onClick:()=>{k()},children:[U.jsx(H_,{"data-testid":"RobotIcon"})," Find Vulnerabilities"]})]}):U.jsxs(U.Fragment,{children:[U.jsxs(br,{"data-testid":"merge",onClick:()=>{o(),k()},children:[U.jsx(B_,{"data-testid":"MergeIcon"})," Merge"]}),U.jsxs(br,{"data-testid":"add_edge",onClick:()=>{i(),k()},children:[U.jsx(Rh,{"data-testid":"AddCircleIcon"}),"Add edge"]})]})})]})})});l_.displayName="NodeControls";const CD=Ke.div` position: fixed; top: -60px; left: ${n=>-7+n.left}px; @@ -675,7 +675,7 @@ ${a}`}const Yf={x:20,y:20},Ah=y.memo(n=>{var O,L,j,q;const{node:e,hide:t,ignoreD background: ${Ae.BUTTON1_HOVER}; color: ${Ae.GRAY3}; } -`,CD=Ke(G_)` +`,SD=Ke(Z_)` && { z-index: 9999; } @@ -701,7 +701,7 @@ ${a}`}const Yf={x:20,y:20},Ah=y.memo(n=>{var O,L,j,q;const{node:e,hide:t,ignoreD width: 12px; height: 12px; } -`,SD=Ke.div` +`,OD=Ke.div` position: fixed; top: 40px; left: ${n=>-53+n.left}px; @@ -720,7 +720,7 @@ ${a}`}const Yf={x:20,y:20},Ah=y.memo(n=>{var O,L,j,q;const{node:e,hide:t,ignoreD &:hover { transform: scale(1.05); } -`,c_=y.memo(()=>B.jsx(B.Fragment,{children:B.jsx(a_,{})}));c_.displayName="NodeDetailsPanel";const OD=()=>{const{dataInitial:n,isLoadingNew:e,isFetching:t,dataNew:s,resetDataNew:r}=Os(p=>p),i=y.useRef(null),o=y.useRef(!1),{normalizedSchemasByType:a}=cu(p=>p),c=y.useRef(new Map),{setData:l,simulation:u,simulationCreate:h,simulationHelpers:d,graphStyle:f,setGraphRadius:m}=mt(p=>p);return y.useEffect(()=>{if(!s)return;const p=s.nodes||[],g=s.links||[],_=structuredClone(p),x=structuredClone(g);if(u){const k=y_.isEqual(s,n);d.addNodesAndLinks(_,x,k)}u||h(_,x),r()},[l,s,u,h,r,d,n]),y.useEffect(()=>{u&&d.setForces()},[f,d,u]),y.useEffect(()=>{u&&(u.on("tick",()=>{if(!o.current&&u.alpha()<.1){const p=u.nodes().map(x=>new ae(x.x,x.y,x.z)),g=new Ih().setFromPoints(p),_=new py;g.getBoundingSphere(_),Math.min(5e3,_.radius)}}),u.on("end",()=>{const p=u.nodes().map(_=>(_.fx=_.x,_.fy=_.y,_.fz=_.z,new ae(_.x,_.y,_.z)));if(i.current){const _=i.current.getObjectByName("simulation-3d-group__node-points"),x=i.current.getObjectByName("simulation-3d-group__connections");_&&_.children[0].children.forEach((k,v)=>{const b=u.nodes()[v];b&&k.position.set(b.x,b.y,b.z)}),x&&(c.current.clear(),x.children.forEach((k,v)=>{var E;const b=k.children[0],T=k.children[1];if(b instanceof tp){const w=b,C=n==null?void 0:n.links[v];if(C){const S=u.nodes().find(Q=>Q.ref_id===C.source),R=u.nodes().find(Q=>Q.ref_id===C.target);if(!S||!R){console.warn(`Missing source or target node for link: ${C==null?void 0:C.ref_id}`);return}const{x:O,y:L,z:j}=S,{x:q,y:z,z:V}=R;c.current.set(C.ref_id,{sx:O,sy:L,sz:j,tx:q,ty:z,tz:V});const U=new ae((O+q)/2,(L+z)/2,(j+V)/2);T.position.set(U.x,U.y,U.z);const X=((E=a[S.node_type])==null?void 0:E.primary_color)||"white";w.geometry.setPositions([O,L,j,q,z,V]);const{material:Z}=w;Z.color=new du(X),Z.transparent=!0,Z.opacity=.3}}}))}const g=new Ih().setFromPoints(p);console.log(g)}))},[n,u,m,a]),u?B.jsxs("group",{ref:i,children:[B.jsx(o_,{}),f==="earth"&&B.jsx(cD,{}),(e||t)&&B.jsx(wD,{}),f!=="earth"&&B.jsx(e_,{linksPosition:c.current}),B.jsx(c_,{})]}):null},AD=({fullSize:n=!0})=>{const e=mo(t=>t.sidebarIsOpen);return B.jsx(PD,{align:"center",className:ep({"sidebar-is-open":e&&!n}),justify:"center",children:B.jsx(gy,{color:Ae.SECONDARY_BLUE,size:64})})},PD=Ke(Qn)` +`,u_=y.memo(()=>U.jsx(U.Fragment,{children:U.jsx(l_,{})}));u_.displayName="NodeDetailsPanel";const AD=()=>{const{dataInitial:n,isLoadingNew:e,isFetching:t,dataNew:s,resetDataNew:r}=Os(p=>p),i=y.useRef(null),o=y.useRef(!1),{normalizedSchemasByType:a}=cu(p=>p),c=y.useRef(new Map),{setData:l,simulation:u,simulationCreate:h,simulationHelpers:d,graphStyle:f,setGraphRadius:m}=mt(p=>p);return y.useEffect(()=>{if(!s)return;const p=s.nodes||[],g=s.links||[],_=structuredClone(p),w=structuredClone(g);if(u){const k=b_.isEqual(s,n);d.addNodesAndLinks(_,w,k)}u||h(_,w),r()},[l,s,u,h,r,d,n]),y.useEffect(()=>{u&&d.setForces()},[f,d,u]),y.useEffect(()=>{u&&(u.on("tick",()=>{if(!o.current&&u.alpha()<.1){const p=u.nodes().map(w=>new ae(w.x,w.y,w.z)),g=new Ih().setFromPoints(p),_=new my;g.getBoundingSphere(_),Math.min(5e3,_.radius)}}),u.on("end",()=>{const p=u.nodes().map(_=>(_.fx=_.x,_.fy=_.y,_.fz=_.z,new ae(_.x,_.y,_.z)));if(i.current){const _=i.current.getObjectByName("simulation-3d-group__node-points"),w=i.current.getObjectByName("simulation-3d-group__connections");_&&_.children[0].children.forEach((k,b)=>{const v=u.nodes()[b];v&&k.position.set(v.x,v.y,v.z)}),w&&(c.current.clear(),w.children.forEach((k,b)=>{var E;const v=k.children[0],T=k.children[1];if(v instanceof tp){const x=v,C=n==null?void 0:n.links[b];if(C){const S=u.nodes().find(J=>J.ref_id===C.source),R=u.nodes().find(J=>J.ref_id===C.target);if(!S||!R){console.warn(`Missing source or target node for link: ${C==null?void 0:C.ref_id}`);return}const{x:O,y:L,z:j}=S,{x:W,y:B,z:V}=R;c.current.set(C.ref_id,{sx:O,sy:L,sz:j,tx:W,ty:B,tz:V});const z=new ae((O+W)/2,(L+B)/2,(j+V)/2);T.position.set(z.x,z.y,z.z);const X=((E=a[S.node_type])==null?void 0:E.primary_color)||"white";x.geometry.setPositions([O,L,j,W,B,V]);const{material:K}=x;K.color=new hu(X),K.transparent=!0,K.opacity=.3}}}))}const g=new Ih().setFromPoints(p);console.log(g)}))},[n,u,m,a]),u?U.jsxs("group",{ref:i,children:[U.jsx(c_,{}),f==="earth"&&U.jsx(lD,{}),(e||t)&&U.jsx(kD,{}),f!=="earth"&&U.jsx(t_,{linksPosition:c.current}),U.jsx(u_,{})]}):null},PD=({fullSize:n=!0})=>{const e=mo(t=>t.sidebarIsOpen);return U.jsx(RD,{align:"center",className:ep({"sidebar-is-open":e&&!n}),justify:"center",children:U.jsx(_y,{color:Ae.SECONDARY_BLUE,size:64})})},RD=Ke(Qn)` position: absolute; left: 0; right: 0; @@ -728,7 +728,7 @@ ${a}`}const Yf={x:20,y:20},Ah=y.memo(n=>{var O,L,j,q;const{node:e,hide:t,ignoreD top: 0; background-color: ${Ae.black}; z-index: 1; -`,RD=()=>B.jsx(go,{children:B.jsx(i1,{})}),DD=()=>{const{universeColor:n}=nE("universe",{universeColor:Ae.black}),e=Jn();return y.useMemo(()=>e!=null&&e.node_type?sp(e.node_type):fE,[e]),B.jsxs(B.Fragment,{children:[B.jsx("color",{args:[n],attach:"background"}),B.jsx(R_,{}),B.jsx(EP,{}),B.jsxs(C1,{children:[!1,B.jsx(OD,{})]})]})};let ul=null;const MD={aspect:window.innerWidth/window.innerHeight,far:3e4,near:1,position:[Di.x,Di.y,Di.z]},ID=()=>{const[n,e,t]=[fs(a=>a.setIsUserScrollingOnHtmlPanel),fs(a=>a.setIsUserScrolling),fs(a=>a.setUserMovedCamera)],s=Os(a=>a.isFetching),r=mo(a=>a.universeQuestionIsOpen),i=y.useCallback(a=>{var u;const{target:c}=a,{offsetParent:l}=c;ul&&clearTimeout(ul),(u=l==null?void 0:l.classList)!=null&&u.contains("html-panel")&&l.clientHeight{e(!1),n(!1)},200)},[e,n,t]),o=y.useCallback(a=>v_(a,"threeState"),[]);return B.jsxs(ND,{children:[B.jsxs(y.Suspense,{fallback:null,children:[B.jsx(W0,{hidden:!0,isRoot:!0}),B.jsxs(A_,{camera:MD,id:"universe-canvas",onCreated:o,onWheel:i,children:[b_&&B.jsx(P_,{position:"top-right",style:{top:"80px"}}),B.jsxs(y.Suspense,{fallback:B.jsx(RD,{}),children:[B.jsx(w1,{}),B.jsx(k1,{}),B.jsx(T1,{}),B.jsx(DD,{})]})]})]}),r&&B.jsx(rE,{}),s&&B.jsx(AD,{fullSize:!1}),B.jsx(X_,{})]})},ND=Ke(Qn)` +`,DD=()=>U.jsx(go,{children:U.jsx(o1,{})}),MD=()=>{const{universeColor:n}=sE("universe",{universeColor:Ae.black}),e=Jn();return y.useMemo(()=>e!=null&&e.node_type?rp(e.node_type):pE,[e]),U.jsxs(U.Fragment,{children:[U.jsx("color",{args:[n],attach:"background"}),U.jsx(M_,{}),U.jsx(CP,{}),U.jsxs(S1,{children:[!1,U.jsx(AD,{})]})]})};let hl=null;const ID={aspect:window.innerWidth/window.innerHeight,far:3e4,near:1,position:[Di.x,Di.y,Di.z]},ND=()=>{const[n,e,t]=[fs(a=>a.setIsUserScrollingOnHtmlPanel),fs(a=>a.setIsUserScrolling),fs(a=>a.setUserMovedCamera)],s=Os(a=>a.isFetching),r=mo(a=>a.universeQuestionIsOpen),i=y.useCallback(a=>{var u;const{target:c}=a,{offsetParent:l}=c;hl&&clearTimeout(hl),(u=l==null?void 0:l.classList)!=null&&u.contains("html-panel")&&l.clientHeight{e(!1),n(!1)},200)},[e,n,t]),o=y.useCallback(a=>x_(a,"threeState"),[]);return U.jsxs($D,{children:[U.jsxs(y.Suspense,{fallback:null,children:[U.jsx(q0,{hidden:!0,isRoot:!0}),U.jsxs(R_,{camera:ID,id:"universe-canvas",onCreated:o,onWheel:i,children:[w_&&U.jsx(D_,{position:"top-right",style:{top:"80px"}}),U.jsxs(y.Suspense,{fallback:U.jsx(DD,{}),children:[U.jsx(k1,{}),U.jsx(T1,{}),U.jsx(E1,{}),U.jsx(MD,{})]})]})]}),r&&U.jsx(iE,{}),s&&U.jsx(PD,{fullSize:!1}),U.jsx(K_,{})]})},$D=Ke(Qn)` flex: 1 1 100%; position: relative; -`,kM=y.memo(ID);export{kM as Universe}; +`,TM=y.memo(ND);export{TM as Universe}; diff --git a/build/assets/index-6cd4b515.js b/build/assets/index-64d5234f.js similarity index 99% rename from build/assets/index-6cd4b515.js rename to build/assets/index-64d5234f.js index aa2cb99f7..20654ca81 100644 --- a/build/assets/index-6cd4b515.js +++ b/build/assets/index-64d5234f.js @@ -1,4 +1,4 @@ -import{r as P,a9 as hf,x as qr,bI as pf,J as er,bJ as $d,j as L,a as fo,bK as e1,bL as t1}from"./index-17ed06be.js";import{U as Aa,X as vl,Y as n1,Z as r1,g as mf,n as i1,C as wo,_ as o1,O as yl,J as xl,$ as Rs,a0 as Ia,a1 as s1,a2 as a1,a3 as l1,a4 as u1,a5 as c1,a6 as f1,a7 as d1,V as ct,e as $r,a8 as h1,k as p1,j as Sl,w as Ds,a9 as gf,h as el,aa as tl,ab as Mi,ac as m1,x as wl,ad as g1,ae as nl,af as oc,ag as v1,ah as Ai,m as vf,ai as y1,o as Co,s as yf,aj as x1,ak as S1,al as w1,am as C1,an as _1,L as sc,ao as E1,ap as k1,M as T1,v as P1,aq as Cl,ar as ac,as as Zr,at as M1,l as Da}from"./three.module-9c942ca6.js";var xf={exports:{}},ei={};/** +import{r as P,a9 as hf,x as qr,bI as pf,J as er,bJ as $d,j as L,a as fo,bK as e1,bL as t1}from"./index-787c3ef8.js";import{U as Aa,X as vl,Y as n1,Z as r1,g as mf,n as i1,C as wo,_ as o1,O as yl,J as xl,$ as Rs,a0 as Ia,a1 as s1,a2 as a1,a3 as l1,a4 as u1,a5 as c1,a6 as f1,a7 as d1,V as ct,e as $r,a8 as h1,k as p1,j as Sl,w as Ds,a9 as gf,h as el,aa as tl,ab as Mi,ac as m1,x as wl,ad as g1,ae as nl,af as oc,ag as v1,ah as Ai,m as vf,ai as y1,o as Co,s as yf,aj as x1,ak as S1,al as w1,am as C1,an as _1,L as sc,ao as E1,ap as k1,M as T1,v as P1,aq as Cl,ar as ac,as as Zr,at as M1,l as Da}from"./three.module-9c942ca6.js";var xf={exports:{}},ei={};/** * @license React * react-reconciler-constants.production.min.js * @@ -670,4 +670,4 @@ $& vTroikaGlyphColor = uTroikaUseGlyphColors ? aTroikaGlyphColor / 255.0 : diffuse; `))),{vertexShader:s,fragmentShader:c}}});return n.transparent=!0,Object.defineProperties(n,{isTroikaTextMaterial:{value:!0},shadowSide:{get(){return this.side},set(){}}}),n}const bl=new P1({color:16777215,side:Sl,transparent:!0}),Yc=8421504,Kc=new vf,Ps=new ct,Ya=new ct,mo=[],y0=new ct,Ka="+x+y";function Jc(o){return Array.isArray(o)?o[0]:o}let cd=()=>{const o=new Co(new Cl(1,1),bl);return cd=()=>o,o},fd=()=>{const o=new Co(new Cl(1,1,32,1),bl);return fd=()=>o,o};const x0={type:"syncstart"},S0={type:"synccomplete"},dd=["font","fontSize","letterSpacing","lineHeight","maxWidth","overflowWrap","text","direction","textAlign","textIndent","whiteSpace","anchorX","anchorY","colorRanges","sdfGlyphSize"],w0=dd.concat("material","color","depthOffset","clipRect","curveRadius","orientation","glyphGeometryDetail");let hd=class extends Co{constructor(){const n=new d0;super(n,null),this.text="",this.anchorX=0,this.anchorY=0,this.curveRadius=0,this.direction="auto",this.font=null,this.fontSize=.1,this.letterSpacing=0,this.lineHeight="normal",this.maxWidth=1/0,this.overflowWrap="normal",this.textAlign="left",this.textIndent=0,this.whiteSpace="normal",this.material=null,this.color=null,this.colorRanges=null,this.outlineWidth=0,this.outlineColor=0,this.outlineOpacity=1,this.outlineBlur=0,this.outlineOffsetX=0,this.outlineOffsetY=0,this.strokeWidth=0,this.strokeColor=Yc,this.strokeOpacity=1,this.fillOpacity=1,this.depthOffset=0,this.clipRect=null,this.orientation=Ka,this.glyphGeometryDetail=1,this.sdfGlyphSize=null,this.gpuAccelerateSDF=!0,this.debugSDF=!1}sync(n){this._needsSync&&(this._needsSync=!1,this._isSyncing?(this._queuedSyncs||(this._queuedSyncs=[])).push(n):(this._isSyncing=!0,this.dispatchEvent(x0),ad({text:this.text,font:this.font,fontSize:this.fontSize||.1,letterSpacing:this.letterSpacing||0,lineHeight:this.lineHeight||"normal",maxWidth:this.maxWidth,direction:this.direction||"auto",textAlign:this.textAlign,textIndent:this.textIndent,whiteSpace:this.whiteSpace,overflowWrap:this.overflowWrap,anchorX:this.anchorX,anchorY:this.anchorY,colorRanges:this.colorRanges,includeCaretPositions:!0,sdfGlyphSize:this.sdfGlyphSize,gpuAccelerateSDF:this.gpuAccelerateSDF},s=>{this._isSyncing=!1,this._textRenderInfo=s,this.geometry.updateGlyphs(s.glyphBounds,s.glyphAtlasIndices,s.blockBounds,s.chunkedBounds,s.glyphColors);const c=this._queuedSyncs;c&&(this._queuedSyncs=null,this._needsSync=!0,this.sync(()=>{c.forEach(i=>i&&i())})),this.dispatchEvent(S0),n&&n()})))}onBeforeRender(n,s,c,i,r,l){this.sync(),r.isTroikaTextMaterial&&this._prepareForRender(r),r._hadOwnSide=r.hasOwnProperty("side"),this.geometry.setSide(r._actualSide=r.side),r.side=_1}onAfterRender(n,s,c,i,r,l){r._hadOwnSide?r.side=r._actualSide:delete r.side}dispose(){this.geometry.dispose()}get textRenderInfo(){return this._textRenderInfo||null}get material(){let n=this._derivedMaterial;const s=this._baseMaterial||this._defaultMaterial||(this._defaultMaterial=bl.clone());if((!n||n.baseMaterial!==s)&&(n=this._derivedMaterial=v0(s),s.addEventListener("dispose",function c(){s.removeEventListener("dispose",c),n.dispose()})),this.outlineWidth||this.outlineBlur||this.outlineOffsetX||this.outlineOffsetY){let c=n._outlineMtl;return c||(c=n._outlineMtl=Object.create(n,{id:{value:n.id+.1}}),c.isTextOutlineMaterial=!0,c.depthWrite=!1,c.map=null,n.addEventListener("dispose",function i(){n.removeEventListener("dispose",i),c.dispose()})),[c,n]}else return n}set material(n){n&&n.isTroikaTextMaterial?(this._derivedMaterial=n,this._baseMaterial=n.baseMaterial):this._baseMaterial=n}get glyphGeometryDetail(){return this.geometry.detail}set glyphGeometryDetail(n){this.geometry.detail=n}get curveRadius(){return this.geometry.curveRadius}set curveRadius(n){this.geometry.curveRadius=n}get customDepthMaterial(){return Jc(this.material).getDepthMaterial()}get customDistanceMaterial(){return Jc(this.material).getDistanceMaterial()}_prepareForRender(n){const s=n.isTextOutlineMaterial,c=n.uniforms,i=this.textRenderInfo;if(i){const{sdfTexture:f,blockBounds:u}=i;c.uTroikaSDFTexture.value=f,c.uTroikaSDFTextureSize.value.set(f.image.width,f.image.height),c.uTroikaSDFGlyphSize.value=i.sdfGlyphSize,c.uTroikaSDFExponent.value=i.sdfExponent,c.uTroikaTotalBounds.value.fromArray(u),c.uTroikaUseGlyphColors.value=!s&&!!i.glyphColors;let p=0,h=0,g=0,v,x,w,k=0,_=0;if(s){let{outlineWidth:S,outlineOffsetX:T,outlineOffsetY:A,outlineBlur:R,outlineOpacity:b}=this;p=this._parsePercent(S)||0,h=Math.max(0,this._parsePercent(R)||0),v=b,k=this._parsePercent(T)||0,_=this._parsePercent(A)||0}else g=Math.max(0,this._parsePercent(this.strokeWidth)||0),g&&(w=this.strokeColor,c.uTroikaStrokeColor.value.set(w??Yc),x=this.strokeOpacity,x==null&&(x=1)),v=this.fillOpacity;c.uTroikaDistanceOffset.value=p,c.uTroikaPositionOffset.value.set(k,_),c.uTroikaBlurRadius.value=h,c.uTroikaStrokeWidth.value=g,c.uTroikaStrokeOpacity.value=x,c.uTroikaFillOpacity.value=v??1,c.uTroikaCurveRadius.value=this.curveRadius||0;let C=this.clipRect;if(C&&Array.isArray(C)&&C.length===4)c.uTroikaClipRect.value.fromArray(C);else{const S=(this.fontSize||.1)*100;c.uTroikaClipRect.value.set(u[0]-S,u[1]-S,u[2]+S,u[3]+S)}this.geometry.applyClipRect(c.uTroikaClipRect.value)}c.uTroikaSDFDebug.value=!!this.debugSDF,n.polygonOffset=!!this.depthOffset,n.polygonOffsetFactor=n.polygonOffsetUnits=this.depthOffset||0;const r=s?this.outlineColor||0:this.color;if(r==null)delete n.color;else{const f=n.hasOwnProperty("color")?n.color:n.color=new wo;(r!==f._input||typeof r=="object")&&f.set(f._input=r)}let l=this.orientation||Ka;if(l!==n._orientation){let f=c.uTroikaOrient.value;l=l.replace(/[^-+xyz]/g,"");let u=l!==Ka&&l.match(/^([-+])([xyz])([-+])([xyz])$/);if(u){let[,p,h,g,v]=u;Ps.set(0,0,0)[h]=p==="-"?1:-1,Ya.set(0,0,0)[v]=g==="-"?-1:1,Kc.lookAt(y0,Ps.cross(Ya),Ya),f.setFromMatrix4(Kc)}else f.identity();n._orientation=l}}_parsePercent(n){if(typeof n=="string"){let s=n.match(/^(-?[\d.]+)%$/),c=s?parseFloat(s[1]):NaN;n=(isNaN(c)?0:c/100)*this.fontSize}return n}localPositionToTextCoords(n,s=new $r){s.copy(n);const c=this.curveRadius;return c&&(s.x=Math.atan2(n.x,Math.abs(c)-Math.abs(n.z))*Math.abs(c)),s}worldPositionToTextCoords(n,s=new $r){return Ps.copy(n),this.localPositionToTextCoords(this.worldToLocal(Ps),s)}raycast(n,s){const{textRenderInfo:c,curveRadius:i}=this;if(c){const r=c.blockBounds,l=i?fd():cd(),f=l.geometry,{position:u,uv:p}=f.attributes;for(let h=0;h{this[c]=n[c]}),this}clone(){return new this.constructor().copy(this)}};dd.forEach(o=>{const n="_private_"+o;Object.defineProperty(hd.prototype,o,{get(){return this[n]},set(s){s!==this[n]&&(this[n]=s,this._needsSync=!0)}})});function C0(o,n,s=(c,i)=>c===i){if(o===n)return!0;if(!o||!n)return!1;const c=o.length;if(n.length!==c)return!1;for(let i=0;ii.response=r).then(()=>{c.lifespan&&c.lifespan>0&&setTimeout(()=>{const r=Ms.indexOf(i);r!==-1&&Ms.splice(r,1)},c.lifespan)}).catch(r=>i.error=r)};if(Ms.push(i),!s)throw i.promise}const E0=(o,n,s)=>_0(o,n,!1,s),qc=P.forwardRef(({anchorX:o="center",anchorY:n="middle",font:s,fontSize:c=1,children:i,characters:r,onSync:l,...f},u)=>{const p=Di(({invalidate:x})=>x),[h]=P.useState(()=>new hd),[g,v]=P.useMemo(()=>{const x=[];let w="";return P.Children.forEach(i,k=>{typeof k=="string"||typeof k=="number"?w+=k:x.push(k)}),[x,w]},[i]);return E0(()=>new Promise(x=>i0({font:s,characters:r},x)),["troika-text",s,r]),P.useLayoutEffect(()=>void h.sync(()=>{p(),l&&l(h)})),P.useEffect(()=>()=>h.dispose(),[h]),P.createElement("primitive",qr({object:h,ref:u,font:s,text:v,anchorX:o,anchorY:n,fontSize:c},f),g)});function pd(o){const n=o+"Geometry";return P.forwardRef(({args:s,children:c,...i},r)=>P.createElement("mesh",qr({ref:r},i),P.createElement(n,{attach:"geometry",args:s}),c))}const Rm=pd("circle"),Am=pd("plane");var $e="colors",nn="sizes",ye="space",k0={gap:ye,gridGap:ye,columnGap:ye,gridColumnGap:ye,rowGap:ye,gridRowGap:ye,inset:ye,insetBlock:ye,insetBlockEnd:ye,insetBlockStart:ye,insetInline:ye,insetInlineEnd:ye,insetInlineStart:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,marginBlock:ye,marginBlockEnd:ye,marginBlockStart:ye,marginInline:ye,marginInlineEnd:ye,marginInlineStart:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,paddingBlock:ye,paddingBlockEnd:ye,paddingBlockStart:ye,paddingInline:ye,paddingInlineEnd:ye,paddingInlineStart:ye,top:ye,right:ye,bottom:ye,left:ye,scrollMargin:ye,scrollMarginTop:ye,scrollMarginRight:ye,scrollMarginBottom:ye,scrollMarginLeft:ye,scrollMarginX:ye,scrollMarginY:ye,scrollMarginBlock:ye,scrollMarginBlockEnd:ye,scrollMarginBlockStart:ye,scrollMarginInline:ye,scrollMarginInlineEnd:ye,scrollMarginInlineStart:ye,scrollPadding:ye,scrollPaddingTop:ye,scrollPaddingRight:ye,scrollPaddingBottom:ye,scrollPaddingLeft:ye,scrollPaddingX:ye,scrollPaddingY:ye,scrollPaddingBlock:ye,scrollPaddingBlockEnd:ye,scrollPaddingBlockStart:ye,scrollPaddingInline:ye,scrollPaddingInlineEnd:ye,scrollPaddingInlineStart:ye,fontSize:"fontSizes",background:$e,backgroundColor:$e,backgroundImage:$e,borderImage:$e,border:$e,borderBlock:$e,borderBlockEnd:$e,borderBlockStart:$e,borderBottom:$e,borderBottomColor:$e,borderColor:$e,borderInline:$e,borderInlineEnd:$e,borderInlineStart:$e,borderLeft:$e,borderLeftColor:$e,borderRight:$e,borderRightColor:$e,borderTop:$e,borderTopColor:$e,caretColor:$e,color:$e,columnRuleColor:$e,fill:$e,outline:$e,outlineColor:$e,stroke:$e,textDecorationColor:$e,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:nn,minBlockSize:nn,maxBlockSize:nn,inlineSize:nn,minInlineSize:nn,maxInlineSize:nn,width:nn,minWidth:nn,maxWidth:nn,height:nn,minHeight:nn,maxHeight:nn,flexBasis:nn,gridTemplateColumns:nn,gridTemplateRows:nn,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},T0=(o,n)=>typeof n=="function"?{"()":Function.prototype.toString.call(n)}:n,Oi=()=>{const o=Object.create(null);return(n,s,...c)=>{const i=(r=>JSON.stringify(r,T0))(n);return i in o?o[i]:o[i]=s(n,...c)}},Kr=Symbol.for("sxs.internal"),Ll=(o,n)=>Object.defineProperties(o,Object.getOwnPropertyDescriptors(n)),$c=o=>{for(const n in o)return!0;return!1},{hasOwnProperty:P0}=Object.prototype,pl=o=>o.includes("-")?o:o.replace(/[A-Z]/g,n=>"-"+n.toLowerCase()),M0=/\s+(?![^()]*\))/,ki=o=>n=>o(...typeof n=="string"?String(n).split(M0):[n]),ef={appearance:o=>({WebkitAppearance:o,appearance:o}),backfaceVisibility:o=>({WebkitBackfaceVisibility:o,backfaceVisibility:o}),backdropFilter:o=>({WebkitBackdropFilter:o,backdropFilter:o}),backgroundClip:o=>({WebkitBackgroundClip:o,backgroundClip:o}),boxDecorationBreak:o=>({WebkitBoxDecorationBreak:o,boxDecorationBreak:o}),clipPath:o=>({WebkitClipPath:o,clipPath:o}),content:o=>({content:o.includes('"')||o.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(o)?o:`"${o}"`}),hyphens:o=>({WebkitHyphens:o,hyphens:o}),maskImage:o=>({WebkitMaskImage:o,maskImage:o}),maskSize:o=>({WebkitMaskSize:o,maskSize:o}),tabSize:o=>({MozTabSize:o,tabSize:o}),textSizeAdjust:o=>({WebkitTextSizeAdjust:o,textSizeAdjust:o}),userSelect:o=>({WebkitUserSelect:o,userSelect:o}),marginBlock:ki((o,n)=>({marginBlockStart:o,marginBlockEnd:n||o})),marginInline:ki((o,n)=>({marginInlineStart:o,marginInlineEnd:n||o})),maxSize:ki((o,n)=>({maxBlockSize:o,maxInlineSize:n||o})),minSize:ki((o,n)=>({minBlockSize:o,minInlineSize:n||o})),paddingBlock:ki((o,n)=>({paddingBlockStart:o,paddingBlockEnd:n||o})),paddingInline:ki((o,n)=>({paddingInlineStart:o,paddingInlineEnd:n||o}))},Ja=/([\d.]+)([^]*)/,b0=(o,n)=>o.length?o.reduce((s,c)=>(s.push(...n.map(i=>i.includes("&")?i.replace(/&/g,/[ +>|~]/.test(c)&&/&.*&/.test(i)?`:is(${c})`:c):c+" "+i)),s),[]):n,L0=(o,n)=>o in U0&&typeof n=="string"?n.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(s,c,i,r)=>c+(i==="stretch"?`-moz-available${r};${pl(o)}:${c}-webkit-fill-available`:`-moz-fit-content${r};${pl(o)}:${c}fit-content`)+r):String(n),U0={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},mr=o=>o?o+"-":"",md=(o,n,s)=>o.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,(c,i,r,l,f)=>l=="$"==!!r?c:(i||l=="--"?"calc(":"")+"var(--"+(l==="$"?mr(n)+(f.includes("$")?"":mr(s))+f.replace(/\$/g,"-"):f)+")"+(i||l=="--"?"*"+(i||"")+(r||"1")+")":"")),R0=/\s*,\s*(?![^()]*\))/,A0=Object.prototype.toString,Ui=(o,n,s,c,i)=>{let r,l,f;const u=(p,h,g)=>{let v,x;const w=k=>{for(v in k){const S=v.charCodeAt(0)===64,T=S&&Array.isArray(k[v])?k[v]:[k[v]];for(x of T){const A=/[A-Z]/.test(C=v)?C:C.replace(/-[^]/g,b=>b[1].toUpperCase()),R=typeof x=="object"&&x&&x.toString===A0&&(!c.utils[A]||!h.length);if(A in c.utils&&!R){const b=c.utils[A];if(b!==l){l=b,w(b(x)),l=null;continue}}else if(A in ef){const b=ef[A];if(b!==f){f=b,w(b(x)),f=null;continue}}if(S&&(_=v.slice(1)in c.media?"@media "+c.media[v.slice(1)]:v,v=_.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(b,O,z,Q,ee,N)=>{const D=Ja.test(O),J=.0625*(D?-1:1),[K,re]=D?[Q,O]:[O,Q];return"("+(z[0]==="="?"":z[0]===">"===D?"max-":"min-")+K+":"+(z[0]!=="="&&z.length===1?re.replace(Ja,(se,pe,G)=>Number(pe)+J*(z===">"?1:-1)+G):re)+(ee?") and ("+(ee[0]===">"?"min-":"max-")+K+":"+(ee.length===1?N.replace(Ja,(se,pe,G)=>Number(pe)+J*(ee===">"?-1:1)+G):N):"")+")"})),R){const b=S?g.concat(v):[...g],O=S?[...h]:b0(h,v.split(R0));r!==void 0&&i(tf(...r)),r=void 0,u(x,O,b)}else r===void 0&&(r=[[],h,g]),v=S||v.charCodeAt(0)!==36?v:`--${mr(c.prefix)}${v.slice(1).replace(/\$/g,"-")}`,x=R?x:typeof x=="number"?x&&A in I0?String(x)+"px":String(x):md(L0(A,x??""),c.prefix,c.themeMap[A]),r[0].push(`${S?`${v} `:`${pl(v)}:`}${x}`)}}var _,C};w(p),r!==void 0&&i(tf(...r)),r=void 0};u(o,n,s)},tf=(o,n,s)=>`${s.map(c=>`${c}{`).join("")}${n.length?`${n.join(",")}{`:""}${o.join(";")}${n.length?"}":""}${Array(s.length?s.length+1:0).join("}")}`,I0={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},nf=o=>String.fromCharCode(o+(o>25?39:97)),Jr=o=>(n=>{let s,c="";for(s=Math.abs(n);s>52;s=s/52|0)c=nf(s%52)+c;return nf(s%52)+c})(((n,s)=>{let c=s.length;for(;c;)n=33*n^s.charCodeAt(--c);return n})(5381,JSON.stringify(o))>>>0),yo=["themed","global","styled","onevar","resonevar","allvar","inline"],D0=o=>{if(o.href&&!o.href.startsWith(location.origin))return!1;try{return!!o.cssRules}catch{return!1}},O0=o=>{let n;const s=()=>{const{cssRules:i}=n.sheet;return[].map.call(i,(r,l)=>{const{cssText:f}=r;let u="";if(f.startsWith("--sxs"))return"";if(i[l-1]&&(u=i[l-1].cssText).startsWith("--sxs")){if(!r.cssRules.length)return"";for(const p in n.rules)if(n.rules[p].group===r)return`--sxs{--sxs:${[...n.rules[p].cache].join(" ")}}${f}`;return r.cssRules.length?`${u}${f}`:""}return f}).join("")},c=()=>{if(n){const{rules:f,sheet:u}=n;if(!u.deleteRule){for(;Object(Object(u.cssRules)[0]).type===3;)u.cssRules.splice(0,1);u.cssRules=[]}for(const p in f)delete f[p]}const i=Object(o).styleSheets||[];for(const f of i)if(D0(f)){for(let u=0,p=f.cssRules;p[u];++u){const h=Object(p[u]);if(h.type!==1)continue;const g=Object(p[u+1]);if(g.type!==4)continue;++u;const{cssText:v}=h;if(!v.startsWith("--sxs"))continue;const x=v.slice(14,-3).trim().split(/\s+/),w=yo[x[0]];w&&(n||(n={sheet:f,reset:c,rules:{},toString:s}),n.rules[w]={group:g,index:u,cache:new Set(x)})}if(n)break}if(!n){const f=(u,p)=>({type:p,cssRules:[],insertRule(h,g){this.cssRules.splice(g,0,f(h,{import:3,undefined:1}[(h.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return u==="@media{}"?`@media{${[].map.call(this.cssRules,h=>h.cssText).join("")}}`:u}});n={sheet:o?(o.head||o).appendChild(document.createElement("style")).sheet:f("","text/css"),rules:{},reset:c,toString:s}}const{sheet:r,rules:l}=n;for(let f=yo.length-1;f>=0;--f){const u=yo[f];if(!l[u]){const p=yo[f+1],h=l[p]?l[p].index:r.cssRules.length;r.insertRule("@media{}",h),r.insertRule(`--sxs{--sxs:${f}}`,h),l[u]={group:r.cssRules[h+1],index:h,cache:new Set([f])}}F0(l[u])}};return c(),n},F0=o=>{const n=o.group;let s=n.cssRules.length;o.apply=c=>{try{n.insertRule(c,s),++s}catch{}}},go=Symbol(),j0=Oi(),rf=(o,n)=>j0(o,()=>(...s)=>{let c={type:null,composers:new Set};for(const i of s)if(i!=null)if(i[Kr]){c.type==null&&(c.type=i[Kr].type);for(const r of i[Kr].composers)c.composers.add(r)}else i.constructor!==Object||i.$$typeof?c.type==null&&(c.type=i):c.composers.add(z0(i,o));return c.type==null&&(c.type="span"),c.composers.size||c.composers.add(["PJLV",{},[],[],{},[]]),B0(o,c,n)}),z0=({variants:o,compoundVariants:n,defaultVariants:s,...c},i)=>{const r=`${mr(i.prefix)}c-${Jr(c)}`,l=[],f=[],u=Object.create(null),p=[];for(const v in s)u[v]=String(s[v]);if(typeof o=="object"&&o)for(const v in o){h=u,g=v,P0.call(h,g)||(u[v]="undefined");const x=o[v];for(const w in x){const k={[v]:String(w)};String(w)==="undefined"&&p.push(v);const _=x[w],C=[k,_,!$c(_)];l.push(C)}}var h,g;if(typeof n=="object"&&n)for(const v of n){let{css:x,...w}=v;x=typeof x=="object"&&x||{};for(const _ in w)w[_]=String(w[_]);const k=[w,x,!$c(x)];f.push(k)}return[r,c,l,f,u,p]},B0=(o,n,s)=>{const[c,i,r,l]=N0(n.composers),f=typeof n.type=="function"||n.type.$$typeof?(g=>{function v(){for(let x=0;xv.rules[x]={apply:w=>v[go].push([x,w])}),v})(s):null,u=(f||s).rules,p=`.${c}${i.length>1?`:where(.${i.slice(1).join(".")})`:""}`,h=g=>{g=typeof g=="object"&&g||W0;const{css:v,...x}=g,w={};for(const C in r)if(delete x[C],C in g){let S=g[C];typeof S=="object"&&S?w[C]={"@initial":r[C],...S}:(S=String(S),w[C]=S!=="undefined"||l.has(C)?S:r[C])}else w[C]=r[C];const k=new Set([...i]);for(const[C,S,T,A]of n.composers){s.rules.styled.cache.has(C)||(s.rules.styled.cache.add(C),Ui(S,[`.${C}`],[],o,O=>{u.styled.apply(O)}));const R=of(T,w,o.media),b=of(A,w,o.media,!0);for(const O of R)if(O!==void 0)for(const[z,Q,ee]of O){const N=`${C}-${Jr(Q)}-${z}`;k.add(N);const D=(ee?s.rules.resonevar:s.rules.onevar).cache,J=ee?u.resonevar:u.onevar;D.has(N)||(D.add(N),Ui(Q,[`.${N}`],[],o,K=>{J.apply(K)}))}for(const O of b)if(O!==void 0)for(const[z,Q]of O){const ee=`${C}-${Jr(Q)}-${z}`;k.add(ee),s.rules.allvar.cache.has(ee)||(s.rules.allvar.cache.add(ee),Ui(Q,[`.${ee}`],[],o,N=>{u.allvar.apply(N)}))}}if(typeof v=="object"&&v){const C=`${c}-i${Jr(v)}-css`;k.add(C),s.rules.inline.cache.has(C)||(s.rules.inline.cache.add(C),Ui(v,[`.${C}`],[],o,S=>{u.inline.apply(S)}))}for(const C of String(g.className||"").trim().split(/\s+/))C&&k.add(C);const _=x.className=[...k].join(" ");return{type:n.type,className:_,selector:p,props:x,toString:()=>_,deferredInjector:f}};return Ll(h,{className:c,selector:p,[Kr]:n,toString:()=>(s.rules.styled.cache.has(c)||h(),c)})},N0=o=>{let n="";const s=[],c={},i=[];for(const[r,,,,l,f]of o){n===""&&(n=r),s.push(r),i.push(...f);for(const u in l){const p=l[u];(c[u]===void 0||p!=="undefined"||f.includes(p))&&(c[u]=p)}}return[n,s,c,new Set(i)]},of=(o,n,s,c)=>{const i=[];e:for(let[r,l,f]of o){if(f)continue;let u,p=0,h=!1;for(u in r){const g=r[u];let v=n[u];if(v!==g){if(typeof v!="object"||!v)continue e;{let x,w,k=0;for(const _ in v){if(g===String(v[_])){if(_!=="@initial"){const C=_.slice(1);(w=w||[]).push(C in s?s[C]:_.replace(/^@media ?/,"")),h=!0}p+=k,x=!0}++k}if(w&&w.length&&(l={["@media "+w.join(", ")]:l}),!x)continue e}}}(i[p]=i[p]||[]).push([c?"cv":`${u}-${r[u]}`,l,h])}return i},W0={},G0=Oi(),H0=(o,n)=>G0(o,()=>(...s)=>{const c=()=>{for(let i of s){i=typeof i=="object"&&i||{};let r=Jr(i);if(!n.rules.global.cache.has(r)){if(n.rules.global.cache.add(r),"@import"in i){let l=[].indexOf.call(n.sheet.cssRules,n.rules.themed.group)-1;for(let f of[].concat(i["@import"]))f=f.includes('"')||f.includes("'")?f:`"${f}"`,n.sheet.insertRule(`@import ${f};`,l++);delete i["@import"]}Ui(i,[],[],o,l=>{n.rules.global.apply(l)})}}return""};return Ll(c,{toString:c})}),V0=Oi(),Z0=(o,n)=>V0(o,()=>s=>{const c=`${mr(o.prefix)}k-${Jr(s)}`,i=()=>{if(!n.rules.global.cache.has(c)){n.rules.global.cache.add(c);const r=[];Ui(s,[],[],o,f=>r.push(f));const l=`@keyframes ${c}{${r.join("")}}`;n.rules.global.apply(l)}return c};return Ll(i,{get name(){return i()},toString:i})}),X0=class{constructor(o,n,s,c){this.token=o==null?"":String(o),this.value=n==null?"":String(n),this.scale=s==null?"":String(s),this.prefix=c==null?"":String(c)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+mr(this.prefix)+mr(this.scale)+this.token}toString(){return this.computedValue}},Q0=Oi(),Y0=(o,n)=>Q0(o,()=>(s,c)=>{c=typeof s=="object"&&s||Object(c);const i=`.${s=(s=typeof s=="string"?s:"")||`${mr(o.prefix)}t-${Jr(c)}`}`,r={},l=[];for(const u in c){r[u]={};for(const p in c[u]){const h=`--${mr(o.prefix)}${u}-${p}`,g=md(String(c[u][p]),o.prefix,u);r[u][p]=new X0(p,g,u,o.prefix),l.push(`${h}:${g}`)}}const f=()=>{if(l.length&&!n.rules.themed.cache.has(s)){n.rules.themed.cache.add(s);const u=`${c===o.theme?":root,":""}.${s}{${l.join(";")}}`;n.rules.themed.apply(u)}return s};return{...r,get className(){return f()},selector:i,toString:f}}),K0=Oi(),sf,J0=Oi(),q0=o=>{const n=(s=>{let c=!1;const i=K0(s,r=>{c=!0;const l="prefix"in(r=typeof r=="object"&&r||{})?String(r.prefix):"",f=typeof r.media=="object"&&r.media||{},u=typeof r.root=="object"?r.root||null:globalThis.document||null,p=typeof r.theme=="object"&&r.theme||{},h={prefix:l,media:f,theme:p,themeMap:typeof r.themeMap=="object"&&r.themeMap||{...k0},utils:typeof r.utils=="object"&&r.utils||{}},g=O0(u),v={css:rf(h,g),globalCss:H0(h,g),keyframes:Z0(h,g),createTheme:Y0(h,g),reset(){g.reset(),v.theme.toString()},theme:{},sheet:g,config:h,prefix:l,getCssText:g.toString,toString:g.toString};return String(v.theme=v.createTheme(p)),v});return c||i.reset(),i})(o);return n.styled=(({config:s,sheet:c})=>J0(s,()=>{const i=rf(s,c);return(...r)=>{const l=i(...r),f=l[Kr].type,u=er.forwardRef((p,h)=>{const g=p&&p.as||f,{props:v,deferredInjector:x}=l(p);return delete v.as,v.ref=h,x?er.createElement(er.Fragment,null,er.createElement(g,v),er.createElement(x,null)):er.createElement(g,v)});return u.className=l.className,u.displayName=`Styled.${f.displayName||f.name||f}`,u.selector=l.selector,u.toString=()=>l.selector,u[Kr]=l[Kr],u}}))(n),n},$0=()=>sf||(sf=q0()),Tt=(...o)=>$0().styled(...o);function St(o,n){if(o==null)return{};var s={},c=Object.keys(o),i,r;for(r=0;r=0)&&(s[i]=o[i]);return s}var e2=["color"],gd=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,e2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M0 1.5C0 1.22386 0.223858 1 0.5 1H2.5C2.77614 1 3 1.22386 3 1.5C3 1.77614 2.77614 2 2.5 2H0.5C0.223858 2 0 1.77614 0 1.5ZM4 1.5C4 1.22386 4.22386 1 4.5 1H14.5C14.7761 1 15 1.22386 15 1.5C15 1.77614 14.7761 2 14.5 2H4.5C4.22386 2 4 1.77614 4 1.5ZM4 4.5C4 4.22386 4.22386 4 4.5 4H11.5C11.7761 4 12 4.22386 12 4.5C12 4.77614 11.7761 5 11.5 5H4.5C4.22386 5 4 4.77614 4 4.5ZM0 7.5C0 7.22386 0.223858 7 0.5 7H2.5C2.77614 7 3 7.22386 3 7.5C3 7.77614 2.77614 8 2.5 8H0.5C0.223858 8 0 7.77614 0 7.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H14.5C14.7761 7 15 7.22386 15 7.5C15 7.77614 14.7761 8 14.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H4.5C4.22386 11 4 10.7761 4 10.5ZM0 13.5C0 13.2239 0.223858 13 0.5 13H2.5C2.77614 13 3 13.2239 3 13.5C3 13.7761 2.77614 14 2.5 14H0.5C0.223858 14 0 13.7761 0 13.5ZM4 13.5C4 13.2239 4.22386 13 4.5 13H14.5C14.7761 13 15 13.2239 15 13.5C15 13.7761 14.7761 14 14.5 14H4.5C4.22386 14 4 13.7761 4 13.5Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),t2=["color"],n2=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,t2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M11.5 1C11.7761 1 12 1.22386 12 1.5V13.5C12 13.7761 11.7761 14 11.5 14C11.2239 14 11 13.7761 11 13.5V1.5C11 1.22386 11.2239 1 11.5 1ZM9.5 3C9.77614 3 10 3.22386 10 3.5V13.5C10 13.7761 9.77614 14 9.5 14C9.22386 14 9 13.7761 9 13.5V3.5C9 3.22386 9.22386 3 9.5 3ZM13.5 3C13.7761 3 14 3.22386 14 3.5V13.5C14 13.7761 13.7761 14 13.5 14C13.2239 14 13 13.7761 13 13.5V3.5C13 3.22386 13.2239 3 13.5 3ZM5.5 4C5.77614 4 6 4.22386 6 4.5V13.5C6 13.7761 5.77614 14 5.5 14C5.22386 14 5 13.7761 5 13.5V4.5C5 4.22386 5.22386 4 5.5 4ZM1.5 5C1.77614 5 2 5.22386 2 5.5V13.5C2 13.7761 1.77614 14 1.5 14C1.22386 14 1 13.7761 1 13.5V5.5C1 5.22386 1.22386 5 1.5 5ZM7.5 5C7.77614 5 8 5.22386 8 5.5V13.5C8 13.7761 7.77614 14 7.5 14C7.22386 14 7 13.7761 7 13.5V5.5C7 5.22386 7.22386 5 7.5 5ZM3.5 7C3.77614 7 4 7.22386 4 7.5V13.5C4 13.7761 3.77614 14 3.5 14C3.22386 14 3 13.7761 3 13.5V7.5C3 7.22386 3.22386 7 3.5 7Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),r2=["color"],i2=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,r2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M2 5H13C13.5523 5 14 5.44772 14 6V9C14 9.55228 13.5523 10 13 10H2C1.44772 10 1 9.55228 1 9V6C1 5.44772 1.44772 5 2 5ZM0 6C0 4.89543 0.895431 4 2 4H13C14.1046 4 15 4.89543 15 6V9C15 10.1046 14.1046 11 13 11H2C0.89543 11 0 10.1046 0 9V6ZM4.5 6.75C4.08579 6.75 3.75 7.08579 3.75 7.5C3.75 7.91421 4.08579 8.25 4.5 8.25C4.91421 8.25 5.25 7.91421 5.25 7.5C5.25 7.08579 4.91421 6.75 4.5 6.75ZM6.75 7.5C6.75 7.08579 7.08579 6.75 7.5 6.75C7.91421 6.75 8.25 7.08579 8.25 7.5C8.25 7.91421 7.91421 8.25 7.5 8.25C7.08579 8.25 6.75 7.91421 6.75 7.5ZM10.5 6.75C10.0858 6.75 9.75 7.08579 9.75 7.5C9.75 7.91421 10.0858 8.25 10.5 8.25C10.9142 8.25 11.25 7.91421 11.25 7.5C11.25 7.08579 10.9142 6.75 10.5 6.75Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),o2=["color"],s2=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,o2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M7.28856 0.796908C7.42258 0.734364 7.57742 0.734364 7.71144 0.796908L13.7114 3.59691C13.8875 3.67906 14 3.85574 14 4.05V10.95C14 11.1443 13.8875 11.3209 13.7114 11.4031L7.71144 14.2031C7.57742 14.2656 7.42258 14.2656 7.28856 14.2031L1.28856 11.4031C1.11252 11.3209 1 11.1443 1 10.95V4.05C1 3.85574 1.11252 3.67906 1.28856 3.59691L7.28856 0.796908ZM2 4.80578L7 6.93078V12.9649L2 10.6316V4.80578ZM8 12.9649L13 10.6316V4.80578L8 6.93078V12.9649ZM7.5 6.05672L12.2719 4.02866L7.5 1.80176L2.72809 4.02866L7.5 6.05672Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),a2=["color"],l2=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,a2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M7.5 9.125C8.39746 9.125 9.125 8.39746 9.125 7.5C9.125 6.60254 8.39746 5.875 7.5 5.875C6.60254 5.875 5.875 6.60254 5.875 7.5C5.875 8.39746 6.60254 9.125 7.5 9.125ZM7.5 10.125C8.94975 10.125 10.125 8.94975 10.125 7.5C10.125 6.05025 8.94975 4.875 7.5 4.875C6.05025 4.875 4.875 6.05025 4.875 7.5C4.875 8.94975 6.05025 10.125 7.5 10.125Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),u2=["color"],c2=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,u2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M7.49999 3.09998C7.27907 3.09998 7.09999 3.27906 7.09999 3.49998C7.09999 3.72089 7.27907 3.89998 7.49999 3.89998H14.5C14.7209 3.89998 14.9 3.72089 14.9 3.49998C14.9 3.27906 14.7209 3.09998 14.5 3.09998H7.49999ZM7.49998 5.1C7.27907 5.1 7.09998 5.27908 7.09998 5.5C7.09998 5.72091 7.27907 5.9 7.49998 5.9H14.5C14.7209 5.9 14.9 5.72091 14.9 5.5C14.9 5.27908 14.7209 5.1 14.5 5.1H7.49998ZM7.1 7.5C7.1 7.27908 7.27909 7.1 7.5 7.1H14.5C14.7209 7.1 14.9 7.27908 14.9 7.5C14.9 7.72091 14.7209 7.9 14.5 7.9H7.5C7.27909 7.9 7.1 7.72091 7.1 7.5ZM7.49998 9.1C7.27907 9.1 7.09998 9.27908 7.09998 9.5C7.09998 9.72091 7.27907 9.9 7.49998 9.9H14.5C14.7209 9.9 14.9 9.72091 14.9 9.5C14.9 9.27908 14.7209 9.1 14.5 9.1H7.49998ZM7.09998 11.5C7.09998 11.2791 7.27907 11.1 7.49998 11.1H14.5C14.7209 11.1 14.9 11.2791 14.9 11.5C14.9 11.7209 14.7209 11.9 14.5 11.9H7.49998C7.27907 11.9 7.09998 11.7209 7.09998 11.5ZM2.5 9.25003L5 6.00003H0L2.5 9.25003Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),f2=["color"],d2=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,f2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),h2=["color"],p2=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,h2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),m2=["color"],ml=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,m2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5C1 1.67157 1.67157 1 2.5 1ZM2.5 2C2.22386 2 2 2.22386 2 2.5V8.3636L3.6818 6.6818C3.76809 6.59551 3.88572 6.54797 4.00774 6.55007C4.12975 6.55216 4.24568 6.60372 4.32895 6.69293L7.87355 10.4901L10.6818 7.6818C10.8575 7.50607 11.1425 7.50607 11.3182 7.6818L13 9.3636V2.5C13 2.22386 12.7761 2 12.5 2H2.5ZM2 12.5V9.6364L3.98887 7.64753L7.5311 11.4421L8.94113 13H2.5C2.22386 13 2 12.7761 2 12.5ZM12.5 13H10.155L8.48336 11.153L11 8.6364L13 10.6364V12.5C13 12.7761 12.7761 13 12.5 13ZM6.64922 5.5C6.64922 5.03013 7.03013 4.64922 7.5 4.64922C7.96987 4.64922 8.35078 5.03013 8.35078 5.5C8.35078 5.96987 7.96987 6.35078 7.5 6.35078C7.03013 6.35078 6.64922 5.96987 6.64922 5.5ZM7.5 3.74922C6.53307 3.74922 5.74922 4.53307 5.74922 5.5C5.74922 6.46693 6.53307 7.25078 7.5 7.25078C8.46693 7.25078 9.25078 6.46693 9.25078 5.5C9.25078 4.53307 8.46693 3.74922 7.5 3.74922Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),g2=["color"],v2=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,g2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L12.058 2.05806C12.3021 1.81398 12.6978 1.81398 12.9419 2.05806C13.186 2.30214 13.186 2.69786 12.9419 2.94194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13361 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.49998 8.49998V4.09998C5.06992 4.09998 3.09998 6.06992 3.09998 8.49998C3.09998 10.93 5.06992 12.9 7.49998 12.9C8.715 12.9 9.815 12.4075 10.6112 11.6112L7.49998 8.49998Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),y2=["color"],x2=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,y2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M7.75432 0.819537C7.59742 0.726821 7.4025 0.726821 7.24559 0.819537L1.74559 4.06954C1.59336 4.15949 1.49996 4.32317 1.49996 4.5C1.49996 4.67683 1.59336 4.84051 1.74559 4.93046L7.24559 8.18046C7.4025 8.27318 7.59742 8.27318 7.75432 8.18046L13.2543 4.93046C13.4066 4.84051 13.5 4.67683 13.5 4.5C13.5 4.32317 13.4066 4.15949 13.2543 4.06954L7.75432 0.819537ZM7.49996 7.16923L2.9828 4.5L7.49996 1.83077L12.0171 4.5L7.49996 7.16923ZM1.5695 7.49564C1.70998 7.2579 2.01659 7.17906 2.25432 7.31954L7.49996 10.4192L12.7456 7.31954C12.9833 7.17906 13.2899 7.2579 13.4304 7.49564C13.5709 7.73337 13.4921 8.03998 13.2543 8.18046L7.75432 11.4305C7.59742 11.5232 7.4025 11.5232 7.24559 11.4305L1.74559 8.18046C1.50786 8.03998 1.42901 7.73337 1.5695 7.49564ZM1.56949 10.4956C1.70998 10.2579 2.01658 10.1791 2.25432 10.3195L7.49996 13.4192L12.7456 10.3195C12.9833 10.1791 13.2899 10.2579 13.4304 10.4956C13.5709 10.7334 13.4921 11.04 13.2543 11.1805L7.75432 14.4305C7.59742 14.5232 7.4025 14.5232 7.24559 14.4305L1.74559 11.1805C1.50785 11.04 1.42901 10.7334 1.56949 10.4956Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),S2=["color"],w2=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,S2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M8.69667 0.0403541C8.90859 0.131038 9.03106 0.354857 8.99316 0.582235L8.0902 6.00001H12.5C12.6893 6.00001 12.8625 6.10701 12.9472 6.27641C13.0319 6.4458 13.0136 6.6485 12.8999 6.80001L6.89997 14.8C6.76167 14.9844 6.51521 15.0503 6.30328 14.9597C6.09135 14.869 5.96888 14.6452 6.00678 14.4178L6.90974 9H2.49999C2.31061 9 2.13748 8.893 2.05278 8.72361C1.96809 8.55422 1.98636 8.35151 2.09999 8.2L8.09997 0.200038C8.23828 0.0156255 8.48474 -0.0503301 8.69667 0.0403541ZM3.49999 8.00001H7.49997C7.64695 8.00001 7.78648 8.06467 7.88148 8.17682C7.97648 8.28896 8.01733 8.43723 7.99317 8.5822L7.33027 12.5596L11.5 7.00001H7.49997C7.353 7.00001 7.21347 6.93534 7.11846 6.8232C7.02346 6.71105 6.98261 6.56279 7.00678 6.41781L7.66968 2.44042L3.49999 8.00001Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),C2=["color"],_2=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,C2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M1.49988 2.00012C1.77602 2.00012 1.99988 1.77626 1.99988 1.50012C1.99988 1.22398 1.77602 1.00012 1.49988 1.00012C1.22374 1.00012 0.999878 1.22398 0.999878 1.50012C0.999878 1.77626 1.22374 2.00012 1.49988 2.00012ZM4.49988 2.00012C4.77602 2.00012 4.99988 1.77626 4.99988 1.50012C4.99988 1.22398 4.77602 1.00012 4.49988 1.00012C4.22374 1.00012 3.99988 1.22398 3.99988 1.50012C3.99988 1.77626 4.22374 2.00012 4.49988 2.00012ZM7.99988 1.50012C7.99988 1.77626 7.77602 2.00012 7.49988 2.00012C7.22374 2.00012 6.99988 1.77626 6.99988 1.50012C6.99988 1.22398 7.22374 1.00012 7.49988 1.00012C7.77602 1.00012 7.99988 1.22398 7.99988 1.50012ZM10.4999 2.00012C10.776 2.00012 10.9999 1.77626 10.9999 1.50012C10.9999 1.22398 10.776 1.00012 10.4999 1.00012C10.2237 1.00012 9.99988 1.22398 9.99988 1.50012C9.99988 1.77626 10.2237 2.00012 10.4999 2.00012ZM13.9999 1.50012C13.9999 1.77626 13.776 2.00012 13.4999 2.00012C13.2237 2.00012 12.9999 1.77626 12.9999 1.50012C12.9999 1.22398 13.2237 1.00012 13.4999 1.00012C13.776 1.00012 13.9999 1.22398 13.9999 1.50012ZM1.49988 14.0001C1.77602 14.0001 1.99988 13.7763 1.99988 13.5001C1.99988 13.224 1.77602 13.0001 1.49988 13.0001C1.22374 13.0001 0.999878 13.224 0.999878 13.5001C0.999878 13.7763 1.22374 14.0001 1.49988 14.0001ZM1.99988 10.5001C1.99988 10.7763 1.77602 11.0001 1.49988 11.0001C1.22374 11.0001 0.999878 10.7763 0.999878 10.5001C0.999878 10.224 1.22374 10.0001 1.49988 10.0001C1.77602 10.0001 1.99988 10.224 1.99988 10.5001ZM1.49988 8.00012C1.77602 8.00012 1.99988 7.77626 1.99988 7.50012C1.99988 7.22398 1.77602 7.00012 1.49988 7.00012C1.22374 7.00012 0.999878 7.22398 0.999878 7.50012C0.999878 7.77626 1.22374 8.00012 1.49988 8.00012ZM1.99988 4.50012C1.99988 4.77626 1.77602 5.00012 1.49988 5.00012C1.22374 5.00012 0.999878 4.77626 0.999878 4.50012C0.999878 4.22398 1.22374 4.00012 1.49988 4.00012C1.77602 4.00012 1.99988 4.22398 1.99988 4.50012ZM13.4999 11.0001C13.776 11.0001 13.9999 10.7763 13.9999 10.5001C13.9999 10.224 13.776 10.0001 13.4999 10.0001C13.2237 10.0001 12.9999 10.224 12.9999 10.5001C12.9999 10.7763 13.2237 11.0001 13.4999 11.0001ZM13.9999 7.50012C13.9999 7.77626 13.776 8.00012 13.4999 8.00012C13.2237 8.00012 12.9999 7.77626 12.9999 7.50012C12.9999 7.22398 13.2237 7.00012 13.4999 7.00012C13.776 7.00012 13.9999 7.22398 13.9999 7.50012ZM13.4999 5.00012C13.776 5.00012 13.9999 4.77626 13.9999 4.50012C13.9999 4.22398 13.776 4.00012 13.4999 4.00012C13.2237 4.00012 12.9999 4.22398 12.9999 4.50012C12.9999 4.77626 13.2237 5.00012 13.4999 5.00012ZM4.99988 13.5001C4.99988 13.7763 4.77602 14.0001 4.49988 14.0001C4.22374 14.0001 3.99988 13.7763 3.99988 13.5001C3.99988 13.224 4.22374 13.0001 4.49988 13.0001C4.77602 13.0001 4.99988 13.224 4.99988 13.5001ZM7.49988 14.0001C7.77602 14.0001 7.99988 13.7763 7.99988 13.5001C7.99988 13.224 7.77602 13.0001 7.49988 13.0001C7.22374 13.0001 6.99988 13.224 6.99988 13.5001C6.99988 13.7763 7.22374 14.0001 7.49988 14.0001ZM10.9999 13.5001C10.9999 13.7763 10.776 14.0001 10.4999 14.0001C10.2237 14.0001 9.99988 13.7763 9.99988 13.5001C9.99988 13.224 10.2237 13.0001 10.4999 13.0001C10.776 13.0001 10.9999 13.224 10.9999 13.5001ZM13.4999 14.0001C13.776 14.0001 13.9999 13.7763 13.9999 13.5001C13.9999 13.224 13.776 13.0001 13.4999 13.0001C13.2237 13.0001 12.9999 13.224 12.9999 13.5001C12.9999 13.7763 13.2237 14.0001 13.4999 14.0001ZM3.99988 5.00012C3.99988 4.44784 4.44759 4.00012 4.99988 4.00012H9.99988C10.5522 4.00012 10.9999 4.44784 10.9999 5.00012V10.0001C10.9999 10.5524 10.5522 11.0001 9.99988 11.0001H4.99988C4.44759 11.0001 3.99988 10.5524 3.99988 10.0001V5.00012ZM4.99988 5.00012H9.99988V10.0001H4.99988V5.00012Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),E2=["color"],k2=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,E2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M2.25 7.5C2.25 7.22386 2.47386 7 2.75 7H12.25C12.5261 7 12.75 7.22386 12.75 7.5C12.75 7.77614 12.5261 8 12.25 8H2.75C2.47386 8 2.25 7.77614 2.25 7.5Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),T2=["color"],P2=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,T2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M6.04995 2.74998C6.04995 2.44623 5.80371 2.19998 5.49995 2.19998C5.19619 2.19998 4.94995 2.44623 4.94995 2.74998V12.25C4.94995 12.5537 5.19619 12.8 5.49995 12.8C5.80371 12.8 6.04995 12.5537 6.04995 12.25V2.74998ZM10.05 2.74998C10.05 2.44623 9.80371 2.19998 9.49995 2.19998C9.19619 2.19998 8.94995 2.44623 8.94995 2.74998V12.25C8.94995 12.5537 9.19619 12.8 9.49995 12.8C9.80371 12.8 10.05 12.5537 10.05 12.25V2.74998Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),M2=["color"],b2=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,M2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M6.85357 3.85355L7.65355 3.05353C8.2981 2.40901 9.42858 1.96172 10.552 1.80125C11.1056 1.72217 11.6291 1.71725 12.0564 1.78124C12.4987 1.84748 12.7698 1.97696 12.8965 2.10357C13.0231 2.23018 13.1526 2.50125 13.2188 2.94357C13.2828 3.37086 13.2779 3.89439 13.1988 4.44801C13.0383 5.57139 12.591 6.70188 11.9464 7.34645L7.49999 11.7929L6.35354 10.6465C6.15827 10.4512 5.84169 10.4512 5.64643 10.6465C5.45117 10.8417 5.45117 11.1583 5.64643 11.3536L7.14644 12.8536C7.34171 13.0488 7.65829 13.0488 7.85355 12.8536L8.40073 12.3064L9.57124 14.2572C9.65046 14.3893 9.78608 14.4774 9.9389 14.4963C10.0917 14.5151 10.2447 14.4624 10.3535 14.3536L12.3535 12.3536C12.4648 12.2423 12.5172 12.0851 12.495 11.9293L12.0303 8.67679L12.6536 8.05355C13.509 7.19808 14.0117 5.82855 14.1887 4.58943C14.2784 3.9618 14.2891 3.33847 14.2078 2.79546C14.1287 2.26748 13.9519 1.74482 13.6035 1.39645C13.2552 1.04809 12.7325 0.871332 12.2045 0.792264C11.6615 0.710945 11.0382 0.721644 10.4105 0.8113C9.17143 0.988306 7.80189 1.491 6.94644 2.34642L6.32322 2.96968L3.07071 2.50504C2.91492 2.48278 2.75773 2.53517 2.64645 2.64646L0.646451 4.64645C0.537579 4.75533 0.484938 4.90829 0.50375 5.0611C0.522563 5.21391 0.61073 5.34954 0.742757 5.42876L2.69364 6.59928L2.14646 7.14645C2.0527 7.24022 2.00002 7.3674 2.00002 7.50001C2.00002 7.63261 2.0527 7.75979 2.14646 7.85356L3.64647 9.35356C3.84173 9.54883 4.15831 9.54883 4.35357 9.35356C4.54884 9.1583 4.54884 8.84172 4.35357 8.64646L3.20712 7.50001L3.85357 6.85356L6.85357 3.85355ZM10.0993 13.1936L9.12959 11.5775L11.1464 9.56067L11.4697 11.8232L10.0993 13.1936ZM3.42251 5.87041L5.43935 3.85356L3.17678 3.53034L1.80638 4.90074L3.42251 5.87041ZM2.35356 10.3535C2.54882 10.1583 2.54882 9.8417 2.35356 9.64644C2.1583 9.45118 1.84171 9.45118 1.64645 9.64644L0.646451 10.6464C0.451188 10.8417 0.451188 11.1583 0.646451 11.3535C0.841713 11.5488 1.1583 11.5488 1.35356 11.3535L2.35356 10.3535ZM3.85358 11.8536C4.04884 11.6583 4.04885 11.3417 3.85359 11.1465C3.65833 10.9512 3.34175 10.9512 3.14648 11.1465L1.14645 13.1464C0.95119 13.3417 0.951187 13.6583 1.14645 13.8535C1.34171 14.0488 1.65829 14.0488 1.85355 13.8536L3.85358 11.8536ZM5.35356 13.3535C5.54882 13.1583 5.54882 12.8417 5.35356 12.6464C5.1583 12.4512 4.84171 12.4512 4.64645 12.6464L3.64645 13.6464C3.45119 13.8417 3.45119 14.1583 3.64645 14.3535C3.84171 14.5488 4.1583 14.5488 4.35356 14.3535L5.35356 13.3535ZM9.49997 6.74881C10.1897 6.74881 10.7488 6.1897 10.7488 5.5C10.7488 4.8103 10.1897 4.25118 9.49997 4.25118C8.81026 4.25118 8.25115 4.8103 8.25115 5.5C8.25115 6.1897 8.81026 6.74881 9.49997 6.74881Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),L2=["color"],U2=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,L2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M0.5 4C0.223858 4 0 4.22386 0 4.5V10.5C0 10.7761 0.223858 11 0.5 11H14.5C14.7761 11 15 10.7761 15 10.5V4.5C15 4.22386 14.7761 4 14.5 4H0.5ZM1 10V5H2.075V7.5C2.075 7.73472 2.26528 7.925 2.5 7.925C2.73472 7.925 2.925 7.73472 2.925 7.5V5H4.075V6.5C4.075 6.73472 4.26528 6.925 4.5 6.925C4.73472 6.925 4.925 6.73472 4.925 6.5V5H6.075V6.5C6.075 6.73472 6.26528 6.925 6.5 6.925C6.73472 6.925 6.925 6.73472 6.925 6.5V5H8.075V7.5C8.075 7.73472 8.26528 7.925 8.5 7.925C8.73472 7.925 8.925 7.73472 8.925 7.5V5H10.075V6.5C10.075 6.73472 10.2653 6.925 10.5 6.925C10.7347 6.925 10.925 6.73472 10.925 6.5V5H12.075V6.5C12.075 6.73472 12.2653 6.925 12.5 6.925C12.7347 6.925 12.925 6.73472 12.925 6.5V5H14V10H1Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),R2=["color"],A2=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,R2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M2.5 4C2.22386 4 2 4.22386 2 4.5C2 4.77614 2.22386 5 2.5 5H12.5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4H2.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))}),I2=["color"],vd=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,I2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M4 6H11L7.5 10.5L4 6Z",fill:c}))}),D2=["color"],yd=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,D2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M4 9H11L7.5 4.5L4 9Z",fill:c}))}),O2=["color"],xd=P.forwardRef(function(o,n){var s=o.color,c=s===void 0?"currentColor":s,i=St(o,O2);return P.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:n}),P.createElement("path",{d:"M7.49998 1L6.92321 2.00307L1.17498 12L0.599976 13H1.7535H13.2464H14.4L13.825 12L8.07674 2.00307L7.49998 1ZM7.49998 3.00613L2.3285 12H12.6714L7.49998 3.00613Z",fill:c,fillRule:"evenodd",clipRule:"evenodd"}))});function F2(o,n){if(typeof o!="object"||o===null)return o;var s=o[Symbol.toPrimitive];if(s!==void 0){var c=s.call(o,n||"default");if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(o)}function j2(o){var n=F2(o,"string");return typeof n=="symbol"?n:String(n)}function z2(o,n,s){return n=j2(n),n in o?Object.defineProperty(o,n,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[n]=s,o}function af(o,n){var s=Object.keys(o);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(o);n&&(c=c.filter(function(i){return Object.getOwnPropertyDescriptor(o,i).enumerable})),s.push.apply(s,c)}return s}function gl(o){for(var n=1;n(o==null?void 0:o.reduce((n,s)=>n+s,0))/o.length;class B2{constructor(n={}){this.names=[""],this.finished=[],this.gl=void 0,this.extension=void 0,this.query=void 0,this.paused=!1,this.overClock=!1,this.queryHasResult=!1,this.queryCreated=!1,this.isWebGL2=!0,this.memAccums=[],this.gpuAccums=[],this.activeAccums=[],this.logsAccums={mem:[],gpu:[],cpu:[],fps:[],fpsFixed:[]},this.fpsChart=[],this.gpuChart=[],this.cpuChart=[],this.memChart=[],this.paramLogger=()=>{},this.glFinish=()=>{},this.chartLogger=()=>{},this.chartLen=60,this.maxMemory=1500,this.chartHz=10,this.startCpuProfiling=!1,this.lastCalculateFixed=0,this.chartFrame=0,this.gpuTimeProcess=0,this.chartTime=0,this.activeQueries=0,this.circularId=0,this.detected=0,this.frameId=0,this.rafId=0,this.idleCbId=0,this.checkQueryId=0,this.uuid=void 0,this.currentCpu=0,this.currentMem=0,this.paramFrame=0,this.paramTime=0,this.now=()=>{},this.t0=0,window.GLPerf=window.GLPerf||{},Object.assign(this,n),this.fpsChart=new Array(this.chartLen).fill(0),this.gpuChart=new Array(this.chartLen).fill(0),this.cpuChart=new Array(this.chartLen).fill(0),this.memChart=new Array(this.chartLen).fill(0),this.now=()=>window.performance&&window.performance.now?window.performance.now():Date.now(),this.initGpu(),this.is120hz()}initGpu(){this.uuid=yf.generateUUID(),this.gl&&(this.isWebGL2=!0,this.extension||(this.extension=this.gl.getExtension("EXT_disjoint_timer_query_webgl2")),this.extension===null&&(this.isWebGL2=!1))}is120hz(){let n=0;const s=c=>{++n<20?this.rafId=window.requestAnimationFrame(s):(this.detected=Math.ceil(1e3*n/(c-this.t0)/70),window.cancelAnimationFrame(this.rafId)),this.t0||(this.t0=c)};this.rafId=window.requestAnimationFrame(s)}addUI(n){this.names.indexOf(n)===-1&&(this.names.push(n),this.gpuAccums.push(0),this.activeAccums.push(!1))}nextFps(n){const s=16.666666666666668,c=s-n.timeRemaining(),i=s*In.fpsLimit/10/c;i<0||(In.value=i,In.isOverLimit<25?In.isOverLimit++:Ge.setState({overclockingFps:!0}))}nextFrame(n){this.frameId++;const s=n||this.now();let c=s-this.paramTime,i=0;if(this.frameId<=1)this.paramFrame=this.frameId,this.paramTime=s;else if(s>=this.paramTime){this.maxMemory=window.performance.memory?window.performance.memory.jsHeapSizeLimit/1048576:0;const r=this.frameId-this.paramFrame,l=r*1e3/c,f=Ge.getState().overclockingFps?In.value:l;if(i=this.isWebGL2?this.gpuAccums[0]:this.gpuAccums[0]/c,this.isWebGL2?this.gpuAccums[0]=0:Promise.all(this.finished).then(()=>{this.gpuAccums[0]=0,this.finished=[]}),this.currentMem=Math.round(window.performance&&window.performance.memory?window.performance.memory.usedJSHeapSize/1048576:0),window.performance&&this.startCpuProfiling){window.performance.mark("cpu-finished");const u=performance.measure("cpu-duration","cpu-started","cpu-finished");this.currentCpu=u.duration,this.logsAccums.cpu.push(this.currentCpu),this.startCpuProfiling=!1}this.logsAccums.mem.push(this.currentMem),this.logsAccums.fpsFixed.push(l),this.logsAccums.fps.push(f),this.logsAccums.gpu.push(i),this.overClock&&typeof window.requestIdleCallback<"u"&&(In.isOverLimit>0&&f>l?In.isOverLimit--:Ge.getState().overclockingFps&&Ge.setState({overclockingFps:!1})),s>=this.paramTime+180&&(this.paramLogger({cpu:vo(this.logsAccums.cpu),gpu:vo(this.logsAccums.gpu),mem:vo(this.logsAccums.mem),fps:vo(this.logsAccums.fps),duration:Math.round(c),maxMemory:this.maxMemory,frameCount:r}),this.logsAccums.mem=[],this.logsAccums.fps=[],this.logsAccums.gpu=[],this.logsAccums.cpu=[],this.paramFrame=this.frameId,this.paramTime=s),this.overClock&&s-this.lastCalculateFixed>=2*1e3&&(this.lastCalculateFixed=n,In.fpsLimit=Math.round(vo(this.logsAccums.fpsFixed)/10)*100,Ge.setState({fpsLimit:In.fpsLimit/10}),this.logsAccums.fpsFixed=[],this.paramFrame=this.frameId,this.paramTime=s)}if(!this.detected||!this.chartFrame)this.chartFrame=this.frameId,this.chartTime=s,this.circularId=0;else{const r=s-this.chartTime;let l=this.chartHz*r/1e3;for(;--l>0&&this.detected;){const u=(this.frameId-this.chartFrame)/r*1e3,p=Ge.getState().overclockingFps?In.value:u;this.fpsChart[this.circularId%this.chartLen]=p;const h=1e3/this.currentMem,g=this.currentCpu,v=(this.isWebGL2?this.gpuAccums[1]*2:Math.round(this.gpuAccums[1]/c*100))+4;v>0&&(this.gpuChart[this.circularId%this.chartLen]=v),g>0&&(this.cpuChart[this.circularId%this.chartLen]=g),h>0&&(this.memChart[this.circularId%this.chartLen]=h);for(let x=0;x0&&(i||this.activeAccums.forEach((u,p)=>{this.gpuAccums[p]=f}))}}(c||!this.query)&&(this.queryCreated=!0,this.query=n.createQuery(),n.beginQuery(s.TIME_ELAPSED_EXT,this.query))}}endGpu(){const n=this.extension,s=this.gl;this.isWebGL2&&this.queryCreated&&s.getQuery(n.TIME_ELAPSED_EXT,s.CURRENT_QUERY)&&s.endQuery(n.TIME_ELAPSED_EXT)}begin(n){this.startGpu(),this.updateAccums(n)}end(n){this.endGpu(),this.updateAccums(n)}updateAccums(n){let s=this.names.indexOf(n);s===-1&&(s=this.names.length,this.addUI(n));const c=this.now();this.activeAccums[s]=!this.activeAccums[s],this.t0=c}}const N2=o=>{o.forEach((n,s)=>{const{meshes:c}=n;if(!c)return;let i={total:0,type:"Triangle",data:[]};Object.keys(c).forEach(r=>{const l=c[r],{geometry:f,material:u}=l;let p=f.index;const h=f.attributes.position;if(!h)return;let g=1;u.wireframe===!0&&(g=0);const v=p!==null?p.count:h.count,x=f.drawRange.start*g,w=f.drawRange.count*g,k=x,_=Math.min(v,x+w)-1;let C=1;const S=l.count||1;let T="Triangle",A=0;l.isMesh?u.wireframe===!0?(T="Line",C=C/2):(T="Triangle",C=C/3):l.isLine?(T="Line",l.isLineSegments?C=C/2:l.isLineLoop?C=C:C=C-1):l.isPoints?(T="Point",C=C):l.isSprite&&(T="Triangle",C=C/3);const R=Math.round(Math.max(0,_-k+1)*(C*S));R>A&&(A=R,i.type=T),i.total+=R,i.data.push({drawCount:R,type:T}),l.userData.drawCount={type:T,count:R}}),n.drawCounts=i})},W2=Zr.prototype.updateMatrixWorld,G2=Zr.prototype.updateWorldMatrix,lf=Zr.prototype.updateMatrix;let Ri={value:0},nr={value:0};const H2=o=>{let n=""+o;return n=n.match("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"),n!==null},uf=(o,n)=>{o.defines||(o.defines={}),o.defines&&!o.defines.muiPerf&&(o.defines=Object.assign(o.defines||{},{muiPerf:o.uuid}));const s=o.uuid;return n[s]||(n[s]={meshes:{},material:o},o.needsUpdate=!0),o.needsUpdate=!1,s},V2=o=>o==="muiPerf",Ge=$d(o=>({log:null,paused:!1,triggerProgramsUpdate:0,customData:0,fpsLimit:60,overclockingFps:!1,chart:{data:{fps:[],cpu:[],gpu:[],mem:[]},circularId:0},gl:void 0,objectWithMaterials:null,scene:void 0,programs:new Map,sceneLength:void 0,tab:"infos"})),Sd=({trackCPU:o,overClock:n,chart:s,deepAnalyze:c,matrixUpdate:i})=>{const{gl:r,scene:l}=Di();Ge.setState({gl:r,scene:l});const f=P.useMemo(()=>{const u=new B2({trackGPU:!0,overClock:n,chartLen:s?s.length:120,chartHz:s?s.hz:60,gl:r.getContext(),chartLogger:g=>{Ge.setState({chart:g})},paramLogger:g=>{Ge.setState({log:{maxMemory:g.maxMemory,gpu:g.gpu,cpu:g.cpu,mem:g.mem,fps:g.fps,totalTime:g.duration,frameCount:g.frameCount}})}}),p=new Map,h=new Map;return Object.defineProperty(Rs.prototype,"onBeforeRender",{get(){return(...g)=>{var v;u&&u.begin("profiler"),(v=p.get(this))===null||v===void 0||v(...g)}},set(g){p.set(this,g)},configurable:!0}),Object.defineProperty(Rs.prototype,"onAfterRender",{get(){return(...g)=>{var v;u&&u.end("profiler"),(v=h.get(this))===null||v===void 0||v(...g)}},set(g){h.set(this,g)},configurable:!0}),u},[]);return P.useEffect(()=>{f&&(f.overClock=n||!1,n===!1&&(Ge.setState({overclockingFps:!1}),In.value=0,In.isOverLimit=0),f.chartHz=(s==null?void 0:s.hz)||60,f.chartLen=(s==null?void 0:s.length)||120)},[n,f,s==null?void 0:s.length,s==null?void 0:s.hz]),P.useEffect(()=>{i&&(Zr.prototype.updateMatrixWorld=function(){(this.matrixWorldNeedsUpdate||arguments[0])&&Ri.value++,W2.apply(this,arguments)},Zr.prototype.updateWorldMatrix=function(){Ri.value++,G2.apply(this,arguments)},Zr.prototype.updateMatrix=function(){nr.value++,lf.apply(this,arguments)}),r.info.autoReset=!1;let u=null,p=null;if(r.info)return u=q1(function(){Ge.getState().paused&&Ge.setState({paused:!1}),window.performance&&(window.performance.mark("cpu-started"),f.startCpuProfiling=!0),nr.value-=1,Ri.value=0,nr.value=0,r.info&&r.info.reset()}),p=$1(function(){if(f&&!f.paused&&(f.nextFrame(window.performance.now()),n&&typeof window.requestIdleCallback<"u"&&(f.idleCbId=requestIdleCallback(f.nextFps))),c){var g,v;const x={},w=new Map;l.traverse(function(_){if((_ instanceof Co||_ instanceof M1)&&_.material){let C=_.material.uuid;Array.isArray(_.material)&&_.material.length>1?C=uf(_.material[1],x):C=uf(_.material,x),x[C].meshes[_.uuid]=_}}),r==null||(g=r.info)===null||g===void 0||(v=g.programs)===null||v===void 0||v.forEach(k=>{const _=k.cacheKey.split(","),C=_[_.findIndex(V2)+1];if(H2(C)&&x[C]){const{material:S,meshes:T}=x[C];w.set(C,{program:k,material:S,meshes:T,drawCounts:{total:0,type:"triangle",data:[]},expand:!1,visible:!0})}}),w.size!==Ge.getState().programs.size&&(N2(w),Ge.setState({programs:w,triggerProgramsUpdate:Ge.getState().triggerProgramsUpdate++}))}}),()=>{f&&(typeof window.cancelIdleCallback<"u"&&window.cancelIdleCallback(f.idleCbId),window.cancelAnimationFrame(f.rafId),window.cancelAnimationFrame(f.checkQueryId)),i&&(Zr.prototype.updateMatrixWorld=lf),u(),p()}},[f,r,o,s,i]),P.useEffect(()=>{const u=eh(function(){return f&&(f.paused=!0,nr.value=0,Ri.value=0,Ge.setState({paused:!0,log:{maxMemory:0,gpu:0,mem:0,cpu:0,fps:0,totalTime:0,frameCount:0}})),!1});return()=>{u()}},[]),null},Z2=Tt("div",{position:"fixed",top:0,right:0,zIndex:9999,fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif`,backgroundColor:"rgba(36, 36, 36, .9)",color:"#fff",margin:0,minHeight:"100px",padding:"4px 0","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale",userSelect:"none","&.top-left":{right:"initial",left:0},"&.bottom-left":{right:"initial",top:"initial",bottom:0,left:0,".__perf_toggle":{top:"-20px",bottom:"initial"}},"&.bottom-right":{top:"initial",bottom:0,".__perf_toggle":{top:"-20px",bottom:"initial"}},"&.minimal":{backgroundColor:"rgba(36, 36, 36, .75)"},"*":{margin:"0",padding:"0",border:"0",fontSize:"100%",lineHeight:"1",verticalAlign:"baseline"}}),qa=Tt("small",{position:"absolute",right:0,fontSize:"10px"}),Ht=Tt("div",{display:"inline-flex",fontStyle:"normal",padding:0,lineHeight:"13px",fontSize:"14px",width:"62px",position:"relative",pointerEvents:"auto",cursor:"default",fontWeight:500,letterSpacing:"0px",textAlign:"left",height:"29px",whiteSpace:"nowrap",justifyContent:"space-evenly",fontVariantNumeric:"tabular-nums",small:{paddingLeft:"12px"},svg:{padding:0,color:"rgba(145, 145, 145, 0.3)",fontSize:"40px",position:"absolute",zIndex:1,maxHeight:"20px",left:" 50%",marginLeft:"-23px",top:"4px"}}),cn=Tt("span",{verticalAlign:"bottom",position:"absolute",bottom:"5px",color:"rgba(101, 197, 188, 1)",textAlign:"right",letterSpacing:"1px",fontSize:"8px",fontWeight:"500",width:"60px"}),X2=Tt("div",{display:"flex"}),Q2=Tt("div",{backgroundColor:"#404040",padding:"6px",display:"block",fontSize:"12px",marginBottom:"6px",cursor:"pointer","*":{cursor:"pointer !important"},"> span":{},small:{fontSize:"9px"},"> b":{marginRight:"4px",cursor:"pointer"}}),Y2=Tt("div",{height:"66px",overflow:"hidden",position:"absolute",pointerEvents:"none",display:"flex",top:"0px",justifyContent:"center",width:"100%",minWidth:"310px",margin:"0 auto",canvas:{background:"transparent !important",position:"absolute !important"}}),K2=Tt("div",{textAlign:"center",fontWeight:700,fontSize:"12px",lineHeight:"12px",display:"flex",justifyContent:"center",alignItems:"center",verticalAlign:"middle",color:"#f1f1f1",padding:"7px",width:"100%",backgroundColor:"rgba(36, 36, 37, 0.8)",zIndex:1,position:"absolute",height:"100%"}),Ul=Tt("div",{pointerEvents:"auto",justifyContent:"center",cursor:"pointer",fontSize:"12px",backgroundColor:"rgb(41, 43, 45)",marginTop:"6px",width:"auto",margin:"0",color:"rgba(145, 145, 145, 1)",textAlign:"center",display:"inline-block",verticalAlign:"middle",padding:"4px 6px","&.__perf_toggle_tab_active":{backgroundColor:"rgb(31 31 31)"},svg:{width:"12px",height:"12px",float:"left"}}),J2=Tt("div",{pointerEvents:"auto",justifyContent:"center",cursor:"pointer",fontSize:"12px",float:"right",backgroundColor:"rgb(41, 43, 45)",width:"auto",margin:"0",color:"rgba(145, 145, 145, 1)",textAlign:"center",display:"inline-block",verticalAlign:"middle",padding:"4px 6px","&.__perf_toggle_tab_active":{backgroundColor:"rgb(31 31 31)"},svg:{width:"12px",height:"12px",float:"left"}}),q2=Tt("div",{padding:"4px 6px",fontSize:"12px",pointerEvents:"auto"}),$2=Tt("span",{fontWeight:"bold",letterSpacing:"0.08em",maxWidth:"145px",overflow:"hidden",textOverflow:"ellipsis",display:"inline-block",verticalAlign:"middle",fontSize:"11px",marginRight:"10px"}),em=Tt("div",{maxHeight:"50vh",overflowY:"auto",marginTop:"38px"}),tm=Tt("div",{marginTop:"0"}),cf=Tt("div",{display:"flex",position:"relative",fontWeight:"bold",color:"#fff",lineHeight:"14px",svg:{marginRight:"4px",display:"inline-block"}}),wd=Tt("ul",{display:"block",position:"relative",paddingLeft:"10px",margin:"6px 6px",img:{maxHeight:"60px",maxWidth:"100%",margin:"6px auto",display:"block"},"&:after":{content:"",position:"absolute",left:"0px",top:"0px",width:"1px",height:"100%",backgroundColor:"grey",transform:"translateX(-50%)",maxHeight:"50vh",overflowY:"auto"},li:{borderBottom:"1px solid #313131",display:"block",padding:"4px",margin:0,lineHeight:1,verticalAlign:"middle",height:"24px"},b:{fontWeight:"bold"},small:{textAlign:"revert",letterSpacing:"1px",fontSize:"10px",fontWeight:"500",marginLeft:"2px",color:"rgb(101, 197, 188)"}}),Cd=Tt("button",{fontWeight:"bold",letterSpacing:"0.02em",backgroundColor:"rgb(41, 43, 45)",color:"rgb(211, 211, 211)",overflow:"hidden",textOverflow:"ellipsis",cursor:"pointer",display:"block",verticalAlign:"middle",fontSize:"11px",padding:"5px",margin:"4px auto"}),nm=Tt("div",{display:"flex",justifyContent:"center",cursor:"pointer",fontSize:"12px",backgroundColor:"rgb(41, 43, 45)",marginTop:"6px",width:"auto",margin:"0 auto",color:"rgba(145, 145, 145, 1)",textAlign:"center",position:"absolute",right:0,bottom:" -20px",svg:{width:"12px",height:"12px",float:"left"}}),rm=Tt("li",{display:"flex !important",height:"auto !important",span:{height:"40px",display:"block",position:"relative"},b:{paddingLeft:"12px"}}),An=P.memo(({isPerf:o,color:n,colorBlind:s,customData:c,isMemory:i,isShadersInfo:r,metric:l,fontSize:f,offsetY:u=0,offsetX:p,round:h,hasInstance:g})=>{const{width:v,height:x}=Di(_=>_.viewport),w=P.useRef(null),k=P.useRef(null);return Eo(function(){const C=Ge.getState().gl,S=Ge.getState().log;if(!S||!w.current||(c&&(w.current.text=Ge.getState().customData),!l))return;let T=S[l];if(r){var A;T=(A=C.info.programs)===null||A===void 0?void 0:A.length}else l==="matriceCount"?T=nr.value:!o&&C.info.render&&(T=(i?C.info.memory:C.info.render)[l]);if(l==="fps"&&(w.current.color=Ge.getState().overclockingFps?Vt(s).overClock.toString():`rgb(${Vt(s).fps.toString()})`),w.current.text=(Math.round(T*Math.pow(10,h))/Math.pow(10,h)).toFixed(h),g){const R=C.info.instance;if(typeof R>"u"&&l!=="matriceCount")return;let b;l==="matriceCount"?b=Ri.value:b=R[l],b>0?(w.current.fontSize=f/1.15,k.current.fontSize=T>0?f/1.4:f,w.current.position.y=x/2-u-f/1.9,k.current.text=" ± "+(Math.round(b*Math.pow(10,h))/Math.pow(10,h)).toFixed(h)):(w.current.position.y=x/2-u-f,w.current.fontSize=f)}nr.value-=1,w.current.updateMatrix(),w.current.matrixWorld.copy(w.current.matrix)}),L.jsxs(P.Suspense,{fallback:null,children:[L.jsxs(qc,{textAlign:"justify",matrixAutoUpdate:!1,ref:w,fontSize:f,position:[-v/2+p+f,x/2-u-f,0],color:n,characters:"0123456789",onUpdate:_=>{_.updateMatrix(),nr.value-=1,_.matrixWorld.copy(_.matrix)},children:[L.jsx("meshBasicMaterial",{blending:ac}),"0"]}),g&&L.jsx(qc,{textAlign:"justify",matrixAutoUpdate:!1,ref:k,fontSize:8,position:[-v/2+p+f,x/2-u-f*1.15,0],color:"lightgrey",characters:"0123456789",onUpdate:_=>{_.updateMatrix(),nr.value-=1,_.matrixWorld.copy(_.matrix)},children:L.jsx("meshBasicMaterial",{blending:ac})})]})}),im=({colorBlind:o,customData:n,minimal:s,matrixUpdate:c})=>L.jsxs(L.Fragment,{children:[L.jsx(An,{colorBlind:o,color:`rgb(${Vt(o).fps.toString()})`,isPerf:!0,metric:"fps",fontSize:14,offsetX:140,round:0}),L.jsx(An,{color:`rgb(${Vt(o).cpu.toString()})`,isPerf:!0,metric:"cpu",fontSize:14,offsetX:72,round:3}),L.jsx(An,{color:`rgb(${Vt(o).gpu.toString()})`,isPerf:!0,metric:"gpu",fontSize:14,offsetX:10,round:3}),s?null:L.jsxs(L.Fragment,{children:[L.jsx(An,{metric:"calls",fontSize:14,offsetX:200,round:0,hasInstance:!0}),L.jsx(An,{metric:"triangles",fontSize:14,offsetX:260,round:0,hasInstance:!0}),L.jsx(An,{isMemory:!0,metric:"geometries",fontSize:14,offsetY:30,offsetX:0,round:0}),L.jsx(An,{isMemory:!0,metric:"textures",fontSize:14,offsetY:30,offsetX:80,round:0}),L.jsx(An,{isShadersInfo:!0,metric:"programs",fontSize:14,offsetY:30,offsetX:140,round:0}),L.jsx(An,{metric:"lines",fontSize:14,offsetY:30,offsetX:200,round:0,hasInstance:!0}),L.jsx(An,{metric:"points",fontSize:14,offsetY:30,offsetX:260,round:0,hasInstance:!0}),c&&L.jsx(An,{isPerf:!0,metric:"matriceCount",fontSize:14,offsetY:30,offsetX:320,round:0,hasInstance:!0})]}),n&&L.jsx(An,{color:`rgb(${Vt(o).custom.toString()})`,customData:n,fontSize:14,offsetY:0,offsetX:s?200:320,round:0})]}),om=({colorBlind:o,minimal:n,chart:s={length:30,hz:15}})=>{const c=P.useMemo(()=>({fps:new Float32Array(s.length*3),cpu:new Float32Array(s.length*3),gpu:new Float32Array(s.length*3)}),[s]),i=P.useRef(null),r=P.useRef(null),l=P.useRef(null),f=P.useRef(null),u=P.useMemo(()=>new ct(0,0,0),[]),p=(h,g=1,v,x)=>{let w=0;const{width:k,height:_}=x,C=Ge.getState().chart.data[h];if(!C||C.length===0)return;const S=n?2:6,T=n?12:50;let A=C.length;for(let R=0;Rw&&(w=C[b]*g),u.set(S+R/(A-1)*(k-S*2)-k/2,Math.min(100,C[b])*g/100*(_-S*2-T)-_/2,0),u.toArray(v.attributes.position.array,R*3))}v.attributes.position.needsUpdate=!0};return Eo(function({viewport:g}){p("fps",1,i.current,g),r.current&&r.current.color.set(Ge.getState().overclockingFps?Vt(o).overClock.toString():`rgb(${Vt(o).fps.toString()})`),p("gpu",5,l.current,g),p("cpu",5,f.current,g)}),L.jsxs(L.Fragment,{children:[L.jsxs("line",{children:[L.jsx("bufferGeometry",{ref:i,children:L.jsx("bufferAttribute",{attach:"attributes-position",count:s.length,array:c.fps,itemSize:3,usage:Da,needsUpdate:!0})}),L.jsx("lineBasicMaterial",{ref:r,color:`rgb(${Vt(o).fps.toString()})`,transparent:!0,opacity:.5})]}),L.jsxs("line",{children:[L.jsx("bufferGeometry",{ref:l,children:L.jsx("bufferAttribute",{attach:"attributes-position",count:s.length,array:c.gpu,itemSize:3,usage:Da,needsUpdate:!0})}),L.jsx("lineBasicMaterial",{color:`rgb(${Vt(o).gpu.toString()})`,transparent:!0,opacity:.5})]}),L.jsxs("line",{children:[L.jsx("bufferGeometry",{ref:f,children:L.jsx("bufferAttribute",{attach:"attributes-position",count:s.length,array:c.cpu,itemSize:3,usage:Da,needsUpdate:!0})}),L.jsx("lineBasicMaterial",{color:`rgb(${Vt(o).cpu.toString()})`,transparent:!0,opacity:.5})]})]})},sm=({colorBlind:o,chart:n,customData:s,matrixUpdate:c,showGraph:i=!0,antialias:r=!0,minimal:l})=>{const f=P.useRef(void 0),u=Ge(p=>p.paused);return L.jsxs(Y2,{style:{display:"flex",position:"absolute",height:`${l?37:i?100:60}px`,minWidth:`${l?"100px":s?"370px":"310px"}`},children:[L.jsx(_h,{ref:f,orthographic:!0,dpr:r?[1,2]:1,gl:{antialias:!0,alpha:!0,stencil:!1,depth:!1},onCreated:({scene:p})=>{p.traverse(h=>{h.matrixWorldAutoUpdate=!1,h.matrixAutoUpdate=!1})},flat:!0,style:{marginBottom:"-42px",position:"relative",pointerEvents:"none",background:"transparent !important",height:`${l?37:i?100:60}px`},children:u?null:L.jsxs(L.Fragment,{children:[L.jsx(am,{}),L.jsx(im,{customData:s,minimal:l,matrixUpdate:c}),i&&L.jsx(om,{colorBlind:o,minimal:l,chart:n})]})}),u&&L.jsxs(K2,{children:[L.jsx(P2,{})," PAUSED"]})]})},am=()=>(Eo(function({gl:n,scene:s,camera:c}){c.updateMatrix(),nr.value-=1,c.matrixWorld.copy(c.matrix),c.matrixWorldInverse.copy(c.matrixWorld).invert(),n.render(s,c),Ri.value=0,nr.value=0},1/0),null);function lm(o,n){if(o==null)return{};var s={},c=Object.keys(o),i,r;for(r=0;r=0)&&(s[i]=o[i]);return s}function um(o,n){if(o==null)return{};var s=lm(o,n),c,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(o,c)&&(s[c]=o[c])}return s}const cm=["portal","className","children"],fm=P.forwardRef((o,n)=>{let{portal:s,className:c,children:i}=o,r=um(o,cm);const l=Di(h=>h.gl),f=P.useRef(null),u=P.useRef(null),p=(s==null?void 0:s.current)!=null?s.current:l.domElement.parentNode;return P.useLayoutEffect(()=>{if(!f.current||!p)return;const h=document.createElement("div"),g=u.current=pf(h);return p.appendChild(h),()=>{g.unmount(),u.current=null,p.removeChild(h)}},[p]),P.useLayoutEffect(()=>{const h=u.current;h&&h.render(L.jsx("div",{ref:n,className:c,children:i}))}),L.jsx("group",gl(gl({},r),{},{ref:f}))}),ff=(o,n)=>{const s=i=>{switch(i){case 1e3:return"RepeatWrapping";case 1001:return"ClampToEdgeWrapping";case 1002:return"MirroredRepeatWrapping";default:return"ClampToEdgeWrapping"}},c=i=>{switch(i){case 3e3:return"LinearEncoding";case 3001:return"sRGBEncoding";case 3002:return"RGBEEncoding";case 3003:return"LogLuvEncoding";case 3004:return"RGBM7Encoding";case 3005:return"RGBM16Encoding";case 3006:return"RGBDEncoding";case 3007:return"GammaEncoding";default:return"ClampToEdgeWrapping"}};return{name:o,url:n.image.currentSrc,encoding:c(n.encoding),wrapT:s(n.image.wrapT),flipY:n.flipY.toString()}},dm=({program:o,material:n,setTexNumber:s})=>{const c=Ge(l=>l.gl),[i,r]=P.useState(null);return P.useEffect(()=>{if(c){const l=o==null?void 0:o.getUniforms();let f=0;const u=new Map;l.seq.forEach(p=>{if(!p.id.includes("uTroika")&&p.id!=="isOrthographic"&&p.id!=="uvTransform"&&p.id!=="lightProbe"&&p.id!=="projectionMatrix"&&p.id!=="viewMatrix"&&p.id!=="normalMatrix"&&p.id!=="modelMatrix"&&p.id!=="modelViewMatrix"){let h=[],g={name:p.id};p.cache&&(p.cache.forEach(v=>{typeof v<"u"&&h.push(v.toString().substring(0,4))}),g.value=h.join(),n[p.id]&&n[p.id].image&&n[p.id].image&&(f++,g.value=ff(p.id,n[p.id])),g.value||(g.value="empty"),u.set(p.id,g))}}),n.uniforms&&Object.keys(n.uniforms).forEach(p=>{const h=n.uniforms[p];if(h.value){const{value:g}=h;let v={name:p};if(p.includes("uTroika"))return;if(g instanceof vl)f++,v.value=ff(p,g);else{let x=JSON.stringify(g);try{x=JSON.stringify(g)}catch{x=g.toString()}v.value=x}u.set(p,v)}}),f>0&&s(f),r(u)}},[]),L.jsx(wd,{children:i&&Array.from(i.values()).map(l=>L.jsx("span",{children:typeof l.value=="string"?L.jsx("li",{children:L.jsxs("span",{children:[l.name," :"," ",L.jsxs("b",{children:[l.value.substring(0,30),l.value.length>30?"...":""]})]})}):L.jsxs(L.Fragment,{children:[L.jsx("li",{children:L.jsxs("b",{children:[l.value.name,":"]})}),L.jsxs("div",{children:[Object.keys(l.value).map(f=>f!=="name"?L.jsx("div",{children:f==="url"?L.jsx("a",{href:l.value[f],target:"_blank",children:L.jsx("img",{src:l.value[f]})}):L.jsxs("li",{children:[f,": ",L.jsx("b",{children:l.value[f]})]})},f):null),L.jsxs(Cd,{onClick:()=>{var f;console.info(n[l.value.name]||(n==null||(f=n.uniforms[l.value.name])===null||f===void 0?void 0:f.value))},children:["console.info(",l.value.name,");"]})]})]})},l.name))})},hm=({el:o})=>{Ge(c=>c.log);const n=Ge(c=>c.gl),s=c=>{if(!n)return 0;const i=Math.round(c.drawCounts.total/(n.info.render.triangles+n.info.render.lines+n.info.render.points)*100*10)/10;return isFinite(i)&&i||0};return L.jsx(L.Fragment,{children:o.drawCounts.total>0&&L.jsxs(Ht,{style:{height:"auto",width:"auto",margin:"0 4px"},children:[o.drawCounts.type==="Triangle"?L.jsx(xd,{style:{top:"-1px"}}):L.jsx(gd,{style:{top:"-1px"}}),o.drawCounts.total,L.jsxs("small",{children:[o.drawCounts.type,"s"]}),n&&L.jsxs(cn,{style:{bottom:"-10px",width:"40px",fontWeight:"bold"},children:[o.visible&&!o.material.wireframe?s(o):0,"%"]})]})})},pm=({el:o})=>{const[n,s]=P.useState(o.visible),[c,i]=P.useState(o.expand),[r,l]=P.useState(0),{meshes:f,program:u,material:p}=o;return L.jsxs(q2,{children:[L.jsxs(Q2,{onClick:()=>{o.expand=!c,Object.keys(f).forEach(h=>{const g=f[h];g.material.wireframe=!1}),i(!c)},children:[L.jsx(Ul,{style:{marginRight:"6px"},children:c?L.jsx("span",{children:L.jsx(vd,{})}):L.jsx("span",{children:L.jsx(yd,{})})}),u&&L.jsxs("span",{children:[L.jsx($2,{children:u.name}),L.jsxs(Ht,{style:{height:"auto",width:"auto",margin:"0 4px"},children:[L.jsx(x2,{style:{top:"-1px"}}),Object.keys(f).length,L.jsx("small",{children:Object.keys(f).length>1?"users":"user"})]}),r>0&&L.jsxs(Ht,{style:{height:"auto",width:"auto",margin:"0 4px"},children:[r>1?L.jsx(ml,{style:{top:"-1px"}}):L.jsx(ml,{style:{top:"-1px"}}),r,L.jsx("small",{children:"tex"})]}),L.jsx(hm,{el:o}),p.glslVersion==="300 es"&&L.jsxs(Ht,{style:{height:"auto",width:"auto",margin:"0 4px"},children:[L.jsx(b2,{style:{top:"-1px"}}),"300",L.jsx("small",{children:"es"}),L.jsx(cn,{style:{bottom:"-10px",width:"40px"},children:"glsl"})]})]}),L.jsx(J2,{onPointerEnter:()=>{Object.keys(f).forEach(h=>{const g=f[h];g.material.wireframe=!0})},onPointerLeave:()=>{Object.keys(f).forEach(h=>{const g=f[h];g.material.wireframe=!1})},onClick:h=>{h.stopPropagation(),Object.keys(f).forEach(g=>{const v=f[g],x=!n;v.visible=x,o.visible=x,s(x)})},children:n?L.jsx(p2,{}):L.jsx(d2,{})})]}),L.jsxs("div",{style:{maxHeight:c?"9999px":0,overflow:"hidden"},children:[L.jsxs(cf,{children:[L.jsx(i2,{})," Uniforms:"]}),L.jsx(dm,{program:u,material:p,setTexNumber:l}),L.jsxs(cf,{children:[L.jsx(s2,{})," Geometries:"]}),L.jsx(wd,{children:f&&Object.keys(f).map(h=>f[h]&&f[h].geometry&&L.jsxs(rm,{children:[L.jsxs("span",{children:[f[h].geometry.type,": "]}),f[h].userData&&f[h].userData.drawCount&&L.jsxs("b",{children:[L.jsxs("div",{children:[f[h].userData.drawCount.count,L.jsxs("small",{children:[" ",f[h].userData.drawCount.type,"s"]})]}),L.jsx("br",{}),L.jsxs("div",{children:[Math.round(kp(f[h].geometry)/1024*1e3)/1e3,"Kb",L.jsx("small",{children:" memory used"})]})]})]},h))}),L.jsxs(Cd,{onClick:()=>{console.info(p)},children:["console.info(",p.type,")"]})]})]})},mm=()=>{Ge(n=>n.triggerProgramsUpdate);const o=Ge(n=>n.programs);return L.jsx(tm,{children:o&&Array.from(o.values()).map(n=>n&&n?L.jsx(pm,{el:n},n.material.uuid):null)})},Vt=o=>({overClock:"#ff6eff",fps:o?"100, 143, 255":"238,38,110",cpu:o?"254, 254, 98":"66,226,46",gpu:o?"254,254,254":"253,151,31",custom:o?"86,180,233":"40,255,255"}),gm=({showGraph:o,colorBlind:n})=>{const s=Ge(i=>i.overclockingFps),c=Ge(i=>i.fpsLimit);return L.jsxs(cn,{style:o?{color:s?Vt(n).overClock.toString():`rgb(${Vt(n).fps})`}:{},children:["FPS ",s?`${c}🚀`:""]})},vm=({showGraph:o,colorBlind:n,customData:s,minimal:c})=>{const i=Ge(r=>r.gl);return i?L.jsxs(X2,{children:[L.jsxs(Ht,{children:[L.jsx(w2,{}),L.jsx(cn,{style:o?{color:`rgb(${Vt(n).gpu.toString()})`}:{},children:"GPU"}),L.jsx(qa,{children:"ms"})]}),L.jsxs(Ht,{children:[L.jsx(U2,{}),L.jsx(cn,{style:o?{color:`rgb(${Vt(n).cpu.toString()})`}:{},children:"CPU"}),L.jsx(qa,{children:"ms"})]}),L.jsxs(Ht,{children:[L.jsx(v2,{}),L.jsx(gm,{showGraph:o,colorBlind:n})]}),!c&&i&&L.jsxs(Ht,{children:[L.jsx(A2,{}),L.jsx(cn,{children:i.info.render.calls===1?"call":"calls"})]}),!c&&i&&L.jsxs(Ht,{children:[L.jsx(xd,{}),L.jsx(cn,{children:"Triangles"})]}),s&&L.jsxs(Ht,{children:[L.jsx(n2,{}),L.jsx(cn,{style:o?{color:`rgb(${Vt(n).custom})`}:{},children:s.name}),s.info&&L.jsx(qa,{children:s.info})]})]}):null},ym=({showGraph:o,colorBlind:n,deepAnalyze:s,customData:c,matrixUpdate:i,openByDefault:r,minimal:l})=>L.jsxs(L.Fragment,{children:[L.jsx(vm,{showGraph:o,colorBlind:n,customData:c,minimal:l}),!l&&L.jsx(Sm,{matrixUpdate:i,openByDefault:r,deepAnalyze:s,showGraph:o})]}),xm=({matrixUpdate:o})=>L.jsxs("div",{children:[L.jsxs(Ht,{children:[L.jsx(_2,{}),L.jsx(cn,{children:"Geometries"})]}),L.jsxs(Ht,{children:[L.jsx(ml,{}),L.jsx(cn,{children:"Textures"})]}),L.jsxs(Ht,{children:[L.jsx(gd,{}),L.jsx(cn,{children:"shaders"})]}),L.jsxs(Ht,{children:[L.jsx(k2,{}),L.jsx(cn,{children:"Lines"})]}),L.jsxs(Ht,{children:[L.jsx(l2,{}),L.jsx(cn,{children:"Points"})]}),o&&L.jsxs(Ht,{children:[L.jsx(c2,{}),L.jsx(cn,{children:"Matrices"})]})]}),df=({tab:o,title:n,set:s})=>{const c=Ge(i=>i.tab);return L.jsx(Ul,{className:`${c===o?" __perf_toggle_tab_active":""}`,onClick:()=>{s(!0),Ge.setState({tab:o})},children:L.jsx("span",{children:n})})},Sm=({openByDefault:o,showGraph:n,deepAnalyze:s,matrixUpdate:c})=>{const[i,r]=er.useState(o);return L.jsxs("span",{children:[L.jsx(wm,{show:i,showGraph:n,matrixUpdate:c}),o&&!s?null:L.jsxs(nm,{className:"__perf_toggle",children:[s&&L.jsx(df,{tab:"programs",title:"Programs",set:r}),s&&L.jsx(df,{tab:"infos",title:"Infos",set:r}),L.jsx(Ul,{onClick:()=>{r(!i)},children:i?L.jsxs("span",{children:[L.jsx(vd,{})," Minimize"]}):L.jsxs("span",{children:[L.jsx(yd,{})," More"]})})]})]})},wm=({show:o,showGraph:n,matrixUpdate:s})=>{const c=Ge(i=>i.tab);return L.jsxs(L.Fragment,{children:[L.jsx(xm,{matrixUpdate:s}),o&&L.jsx("div",{children:L.jsx(em,{style:{marginTop:n?"38px":0},children:c==="programs"&&L.jsx(mm,{})})})]})},Cm=({showGraph:o,colorBlind:n,openByDefault:s,className:c,overClock:i,style:r,position:l,chart:f,deepAnalyze:u,antialias:p,customData:h,matrixUpdate:g,minimal:v})=>{const x=P.useRef(null);return L.jsxs(L.Fragment,{children:[L.jsx(Sd,{chart:f,overClock:i,deepAnalyze:u,matrixUpdate:g}),L.jsx(fm,{transform:!1,children:L.jsxs(Z2,{className:(c?" ".concat(c):" ")+` ${l||""} ${v?"minimal":""}`,style:gl({minHeight:v?"37px":o?"100px":"60px"},r),ref:x,children:[L.jsx(sm,{perfContainerRef:x,colorBlind:n,chart:f,showGraph:o,antialias:p,customData:h,minimal:v,matrixUpdate:g}),L.jsx(ym,{colorBlind:n,showGraph:o,deepAnalyze:u,openByDefault:s,customData:h,matrixUpdate:g,minimal:v})]})})]})},Im=({headless:o=!1,colorBlind:n=!1,overClock:s=!1,showGraph:c=!0,trackCPU:i=!1,deepAnalyze:r=!1,antialias:l=!0,openByDefault:f=!0,customData:u,matrixUpdate:p=!1,position:h="top-right",chart:g={length:30,hz:15},className:v,style:x,minimal:w=!1})=>o?L.jsx(Sd,{chart:g,deepAnalyze:r,matrixUpdate:p,overClock:s}):L.jsx(Cm,{colorBlind:n,showGraph:c,trackCPU:i,openByDefault:f,className:v,style:x,overClock:s,position:h,antialias:l,chart:g,deepAnalyze:r,minimal:w,customData:u,matrixUpdate:p}),$a=5e3,_m={show:"#FF723C",clip:"#FFFF00",episode:"#FF7F50",guest:"#E066FF",topic:"#F8F8FF",Topic:"#F8F8FF",Organization:"#FF7F50"},Dm=(o,n)=>{const s=_m[o]||"#F8F8FF";return n?s:parseInt(s.replace("#","0x"),16)},Om=(o,n)=>o.length>n?`${o.substring(0,n)}...`:o,Fm=o=>{const n=P.useRef();return P.useEffect(()=>{n.current=o}),n.current},jm={font:"/fonts/Inter-Bold.woff",characters:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!",fontSize:1,letterSpacing:-.05,lineHeight:1,"material-toneMapped":!1},zm=()=>{const o=P.useRef(null),n=P.useRef(null),s=P.useRef(null);return Eo(({camera:c,clock:i})=>{const r=i.getElapsedTime();if(o.current){const f=Math.sin(r/8)*1e3;o.current.position.setZ(f)}if(n.current&&n.current.position.lerp(c.position,.5),s.current){const l=r*.5,f=Math.sin(l)*$a,u=Math.cos(l)*$a;s.current.position.set(f,0,u)}}),L.jsxs(L.Fragment,{children:[L.jsx("hemisphereLight",{args:[fo.white,e1,t1]}),L.jsx("ambientLight",{color:fo.white,intensity:1}),L.jsx("pointLight",{ref:n,color:fo.white,distance:4e3,intensity:5,position:[0,0,0]}),L.jsx("directionalLight",{ref:s,color:fo.white,intensity:8,position:[$a,0,0]}),L.jsx("pointLight",{ref:o,color:fo.white,distance:4e3,intensity:8,position:[0,0,0]})]})};export{_h as C,Pm as H,Mp as L,Am as P,qc as T,Eo as a,Bf as b,Ml as c,Pl as d,z1 as e,jm as f,bm as g,Lm as h,Dm as i,Fm as j,Im as k,zm as l,Mm as m,Rm as n,q0 as q,Om as t,Di as u}; + sans-serif`,backgroundColor:"rgba(36, 36, 36, .9)",color:"#fff",margin:0,minHeight:"100px",padding:"4px 0","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale",userSelect:"none","&.top-left":{right:"initial",left:0},"&.bottom-left":{right:"initial",top:"initial",bottom:0,left:0,".__perf_toggle":{top:"-20px",bottom:"initial"}},"&.bottom-right":{top:"initial",bottom:0,".__perf_toggle":{top:"-20px",bottom:"initial"}},"&.minimal":{backgroundColor:"rgba(36, 36, 36, .75)"},"*":{margin:"0",padding:"0",border:"0",fontSize:"100%",lineHeight:"1",verticalAlign:"baseline"}}),qa=Tt("small",{position:"absolute",right:0,fontSize:"10px"}),Ht=Tt("div",{display:"inline-flex",fontStyle:"normal",padding:0,lineHeight:"13px",fontSize:"14px",width:"62px",position:"relative",pointerEvents:"auto",cursor:"default",fontWeight:500,letterSpacing:"0px",textAlign:"left",height:"29px",whiteSpace:"nowrap",justifyContent:"space-evenly",fontVariantNumeric:"tabular-nums",small:{paddingLeft:"12px"},svg:{padding:0,color:"rgba(145, 145, 145, 0.3)",fontSize:"40px",position:"absolute",zIndex:1,maxHeight:"20px",left:" 50%",marginLeft:"-23px",top:"4px"}}),cn=Tt("span",{verticalAlign:"bottom",position:"absolute",bottom:"5px",color:"rgba(101, 197, 188, 1)",textAlign:"right",letterSpacing:"1px",fontSize:"8px",fontWeight:"500",width:"60px"}),X2=Tt("div",{display:"flex"}),Q2=Tt("div",{backgroundColor:"#404040",padding:"6px",display:"block",fontSize:"12px",marginBottom:"6px",cursor:"pointer","*":{cursor:"pointer !important"},"> span":{},small:{fontSize:"9px"},"> b":{marginRight:"4px",cursor:"pointer"}}),Y2=Tt("div",{height:"66px",overflow:"hidden",position:"absolute",pointerEvents:"none",display:"flex",top:"0px",justifyContent:"center",width:"100%",minWidth:"310px",margin:"0 auto",canvas:{background:"transparent !important",position:"absolute !important"}}),K2=Tt("div",{textAlign:"center",fontWeight:700,fontSize:"12px",lineHeight:"12px",display:"flex",justifyContent:"center",alignItems:"center",verticalAlign:"middle",color:"#f1f1f1",padding:"7px",width:"100%",backgroundColor:"rgba(36, 36, 37, 0.8)",zIndex:1,position:"absolute",height:"100%"}),Ul=Tt("div",{pointerEvents:"auto",justifyContent:"center",cursor:"pointer",fontSize:"12px",backgroundColor:"rgb(41, 43, 45)",marginTop:"6px",width:"auto",margin:"0",color:"rgba(145, 145, 145, 1)",textAlign:"center",display:"inline-block",verticalAlign:"middle",padding:"4px 6px","&.__perf_toggle_tab_active":{backgroundColor:"rgb(31 31 31)"},svg:{width:"12px",height:"12px",float:"left"}}),J2=Tt("div",{pointerEvents:"auto",justifyContent:"center",cursor:"pointer",fontSize:"12px",float:"right",backgroundColor:"rgb(41, 43, 45)",width:"auto",margin:"0",color:"rgba(145, 145, 145, 1)",textAlign:"center",display:"inline-block",verticalAlign:"middle",padding:"4px 6px","&.__perf_toggle_tab_active":{backgroundColor:"rgb(31 31 31)"},svg:{width:"12px",height:"12px",float:"left"}}),q2=Tt("div",{padding:"4px 6px",fontSize:"12px",pointerEvents:"auto"}),$2=Tt("span",{fontWeight:"bold",letterSpacing:"0.08em",maxWidth:"145px",overflow:"hidden",textOverflow:"ellipsis",display:"inline-block",verticalAlign:"middle",fontSize:"11px",marginRight:"10px"}),em=Tt("div",{maxHeight:"50vh",overflowY:"auto",marginTop:"38px"}),tm=Tt("div",{marginTop:"0"}),cf=Tt("div",{display:"flex",position:"relative",fontWeight:"bold",color:"#fff",lineHeight:"14px",svg:{marginRight:"4px",display:"inline-block"}}),wd=Tt("ul",{display:"block",position:"relative",paddingLeft:"10px",margin:"6px 6px",img:{maxHeight:"60px",maxWidth:"100%",margin:"6px auto",display:"block"},"&:after":{content:"",position:"absolute",left:"0px",top:"0px",width:"1px",height:"100%",backgroundColor:"grey",transform:"translateX(-50%)",maxHeight:"50vh",overflowY:"auto"},li:{borderBottom:"1px solid #313131",display:"block",padding:"4px",margin:0,lineHeight:1,verticalAlign:"middle",height:"24px"},b:{fontWeight:"bold"},small:{textAlign:"revert",letterSpacing:"1px",fontSize:"10px",fontWeight:"500",marginLeft:"2px",color:"rgb(101, 197, 188)"}}),Cd=Tt("button",{fontWeight:"bold",letterSpacing:"0.02em",backgroundColor:"rgb(41, 43, 45)",color:"rgb(211, 211, 211)",overflow:"hidden",textOverflow:"ellipsis",cursor:"pointer",display:"block",verticalAlign:"middle",fontSize:"11px",padding:"5px",margin:"4px auto"}),nm=Tt("div",{display:"flex",justifyContent:"center",cursor:"pointer",fontSize:"12px",backgroundColor:"rgb(41, 43, 45)",marginTop:"6px",width:"auto",margin:"0 auto",color:"rgba(145, 145, 145, 1)",textAlign:"center",position:"absolute",right:0,bottom:" -20px",svg:{width:"12px",height:"12px",float:"left"}}),rm=Tt("li",{display:"flex !important",height:"auto !important",span:{height:"40px",display:"block",position:"relative"},b:{paddingLeft:"12px"}}),An=P.memo(({isPerf:o,color:n,colorBlind:s,customData:c,isMemory:i,isShadersInfo:r,metric:l,fontSize:f,offsetY:u=0,offsetX:p,round:h,hasInstance:g})=>{const{width:v,height:x}=Di(_=>_.viewport),w=P.useRef(null),k=P.useRef(null);return Eo(function(){const C=Ge.getState().gl,S=Ge.getState().log;if(!S||!w.current||(c&&(w.current.text=Ge.getState().customData),!l))return;let T=S[l];if(r){var A;T=(A=C.info.programs)===null||A===void 0?void 0:A.length}else l==="matriceCount"?T=nr.value:!o&&C.info.render&&(T=(i?C.info.memory:C.info.render)[l]);if(l==="fps"&&(w.current.color=Ge.getState().overclockingFps?Vt(s).overClock.toString():`rgb(${Vt(s).fps.toString()})`),w.current.text=(Math.round(T*Math.pow(10,h))/Math.pow(10,h)).toFixed(h),g){const R=C.info.instance;if(typeof R>"u"&&l!=="matriceCount")return;let b;l==="matriceCount"?b=Ri.value:b=R[l],b>0?(w.current.fontSize=f/1.15,k.current.fontSize=T>0?f/1.4:f,w.current.position.y=x/2-u-f/1.9,k.current.text=" ± "+(Math.round(b*Math.pow(10,h))/Math.pow(10,h)).toFixed(h)):(w.current.position.y=x/2-u-f,w.current.fontSize=f)}nr.value-=1,w.current.updateMatrix(),w.current.matrixWorld.copy(w.current.matrix)}),L.jsxs(P.Suspense,{fallback:null,children:[L.jsxs(qc,{textAlign:"justify",matrixAutoUpdate:!1,ref:w,fontSize:f,position:[-v/2+p+f,x/2-u-f,0],color:n,characters:"0123456789",onUpdate:_=>{_.updateMatrix(),nr.value-=1,_.matrixWorld.copy(_.matrix)},children:[L.jsx("meshBasicMaterial",{blending:ac}),"0"]}),g&&L.jsx(qc,{textAlign:"justify",matrixAutoUpdate:!1,ref:k,fontSize:8,position:[-v/2+p+f,x/2-u-f*1.15,0],color:"lightgrey",characters:"0123456789",onUpdate:_=>{_.updateMatrix(),nr.value-=1,_.matrixWorld.copy(_.matrix)},children:L.jsx("meshBasicMaterial",{blending:ac})})]})}),im=({colorBlind:o,customData:n,minimal:s,matrixUpdate:c})=>L.jsxs(L.Fragment,{children:[L.jsx(An,{colorBlind:o,color:`rgb(${Vt(o).fps.toString()})`,isPerf:!0,metric:"fps",fontSize:14,offsetX:140,round:0}),L.jsx(An,{color:`rgb(${Vt(o).cpu.toString()})`,isPerf:!0,metric:"cpu",fontSize:14,offsetX:72,round:3}),L.jsx(An,{color:`rgb(${Vt(o).gpu.toString()})`,isPerf:!0,metric:"gpu",fontSize:14,offsetX:10,round:3}),s?null:L.jsxs(L.Fragment,{children:[L.jsx(An,{metric:"calls",fontSize:14,offsetX:200,round:0,hasInstance:!0}),L.jsx(An,{metric:"triangles",fontSize:14,offsetX:260,round:0,hasInstance:!0}),L.jsx(An,{isMemory:!0,metric:"geometries",fontSize:14,offsetY:30,offsetX:0,round:0}),L.jsx(An,{isMemory:!0,metric:"textures",fontSize:14,offsetY:30,offsetX:80,round:0}),L.jsx(An,{isShadersInfo:!0,metric:"programs",fontSize:14,offsetY:30,offsetX:140,round:0}),L.jsx(An,{metric:"lines",fontSize:14,offsetY:30,offsetX:200,round:0,hasInstance:!0}),L.jsx(An,{metric:"points",fontSize:14,offsetY:30,offsetX:260,round:0,hasInstance:!0}),c&&L.jsx(An,{isPerf:!0,metric:"matriceCount",fontSize:14,offsetY:30,offsetX:320,round:0,hasInstance:!0})]}),n&&L.jsx(An,{color:`rgb(${Vt(o).custom.toString()})`,customData:n,fontSize:14,offsetY:0,offsetX:s?200:320,round:0})]}),om=({colorBlind:o,minimal:n,chart:s={length:30,hz:15}})=>{const c=P.useMemo(()=>({fps:new Float32Array(s.length*3),cpu:new Float32Array(s.length*3),gpu:new Float32Array(s.length*3)}),[s]),i=P.useRef(null),r=P.useRef(null),l=P.useRef(null),f=P.useRef(null),u=P.useMemo(()=>new ct(0,0,0),[]),p=(h,g=1,v,x)=>{let w=0;const{width:k,height:_}=x,C=Ge.getState().chart.data[h];if(!C||C.length===0)return;const S=n?2:6,T=n?12:50;let A=C.length;for(let R=0;Rw&&(w=C[b]*g),u.set(S+R/(A-1)*(k-S*2)-k/2,Math.min(100,C[b])*g/100*(_-S*2-T)-_/2,0),u.toArray(v.attributes.position.array,R*3))}v.attributes.position.needsUpdate=!0};return Eo(function({viewport:g}){p("fps",1,i.current,g),r.current&&r.current.color.set(Ge.getState().overclockingFps?Vt(o).overClock.toString():`rgb(${Vt(o).fps.toString()})`),p("gpu",5,l.current,g),p("cpu",5,f.current,g)}),L.jsxs(L.Fragment,{children:[L.jsxs("line",{children:[L.jsx("bufferGeometry",{ref:i,children:L.jsx("bufferAttribute",{attach:"attributes-position",count:s.length,array:c.fps,itemSize:3,usage:Da,needsUpdate:!0})}),L.jsx("lineBasicMaterial",{ref:r,color:`rgb(${Vt(o).fps.toString()})`,transparent:!0,opacity:.5})]}),L.jsxs("line",{children:[L.jsx("bufferGeometry",{ref:l,children:L.jsx("bufferAttribute",{attach:"attributes-position",count:s.length,array:c.gpu,itemSize:3,usage:Da,needsUpdate:!0})}),L.jsx("lineBasicMaterial",{color:`rgb(${Vt(o).gpu.toString()})`,transparent:!0,opacity:.5})]}),L.jsxs("line",{children:[L.jsx("bufferGeometry",{ref:f,children:L.jsx("bufferAttribute",{attach:"attributes-position",count:s.length,array:c.cpu,itemSize:3,usage:Da,needsUpdate:!0})}),L.jsx("lineBasicMaterial",{color:`rgb(${Vt(o).cpu.toString()})`,transparent:!0,opacity:.5})]})]})},sm=({colorBlind:o,chart:n,customData:s,matrixUpdate:c,showGraph:i=!0,antialias:r=!0,minimal:l})=>{const f=P.useRef(void 0),u=Ge(p=>p.paused);return L.jsxs(Y2,{style:{display:"flex",position:"absolute",height:`${l?37:i?100:60}px`,minWidth:`${l?"100px":s?"370px":"310px"}`},children:[L.jsx(_h,{ref:f,orthographic:!0,dpr:r?[1,2]:1,gl:{antialias:!0,alpha:!0,stencil:!1,depth:!1},onCreated:({scene:p})=>{p.traverse(h=>{h.matrixWorldAutoUpdate=!1,h.matrixAutoUpdate=!1})},flat:!0,style:{marginBottom:"-42px",position:"relative",pointerEvents:"none",background:"transparent !important",height:`${l?37:i?100:60}px`},children:u?null:L.jsxs(L.Fragment,{children:[L.jsx(am,{}),L.jsx(im,{customData:s,minimal:l,matrixUpdate:c}),i&&L.jsx(om,{colorBlind:o,minimal:l,chart:n})]})}),u&&L.jsxs(K2,{children:[L.jsx(P2,{})," PAUSED"]})]})},am=()=>(Eo(function({gl:n,scene:s,camera:c}){c.updateMatrix(),nr.value-=1,c.matrixWorld.copy(c.matrix),c.matrixWorldInverse.copy(c.matrixWorld).invert(),n.render(s,c),Ri.value=0,nr.value=0},1/0),null);function lm(o,n){if(o==null)return{};var s={},c=Object.keys(o),i,r;for(r=0;r=0)&&(s[i]=o[i]);return s}function um(o,n){if(o==null)return{};var s=lm(o,n),c,i;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(o,c)&&(s[c]=o[c])}return s}const cm=["portal","className","children"],fm=P.forwardRef((o,n)=>{let{portal:s,className:c,children:i}=o,r=um(o,cm);const l=Di(h=>h.gl),f=P.useRef(null),u=P.useRef(null),p=(s==null?void 0:s.current)!=null?s.current:l.domElement.parentNode;return P.useLayoutEffect(()=>{if(!f.current||!p)return;const h=document.createElement("div"),g=u.current=pf(h);return p.appendChild(h),()=>{g.unmount(),u.current=null,p.removeChild(h)}},[p]),P.useLayoutEffect(()=>{const h=u.current;h&&h.render(L.jsx("div",{ref:n,className:c,children:i}))}),L.jsx("group",gl(gl({},r),{},{ref:f}))}),ff=(o,n)=>{const s=i=>{switch(i){case 1e3:return"RepeatWrapping";case 1001:return"ClampToEdgeWrapping";case 1002:return"MirroredRepeatWrapping";default:return"ClampToEdgeWrapping"}},c=i=>{switch(i){case 3e3:return"LinearEncoding";case 3001:return"sRGBEncoding";case 3002:return"RGBEEncoding";case 3003:return"LogLuvEncoding";case 3004:return"RGBM7Encoding";case 3005:return"RGBM16Encoding";case 3006:return"RGBDEncoding";case 3007:return"GammaEncoding";default:return"ClampToEdgeWrapping"}};return{name:o,url:n.image.currentSrc,encoding:c(n.encoding),wrapT:s(n.image.wrapT),flipY:n.flipY.toString()}},dm=({program:o,material:n,setTexNumber:s})=>{const c=Ge(l=>l.gl),[i,r]=P.useState(null);return P.useEffect(()=>{if(c){const l=o==null?void 0:o.getUniforms();let f=0;const u=new Map;l.seq.forEach(p=>{if(!p.id.includes("uTroika")&&p.id!=="isOrthographic"&&p.id!=="uvTransform"&&p.id!=="lightProbe"&&p.id!=="projectionMatrix"&&p.id!=="viewMatrix"&&p.id!=="normalMatrix"&&p.id!=="modelMatrix"&&p.id!=="modelViewMatrix"){let h=[],g={name:p.id};p.cache&&(p.cache.forEach(v=>{typeof v<"u"&&h.push(v.toString().substring(0,4))}),g.value=h.join(),n[p.id]&&n[p.id].image&&n[p.id].image&&(f++,g.value=ff(p.id,n[p.id])),g.value||(g.value="empty"),u.set(p.id,g))}}),n.uniforms&&Object.keys(n.uniforms).forEach(p=>{const h=n.uniforms[p];if(h.value){const{value:g}=h;let v={name:p};if(p.includes("uTroika"))return;if(g instanceof vl)f++,v.value=ff(p,g);else{let x=JSON.stringify(g);try{x=JSON.stringify(g)}catch{x=g.toString()}v.value=x}u.set(p,v)}}),f>0&&s(f),r(u)}},[]),L.jsx(wd,{children:i&&Array.from(i.values()).map(l=>L.jsx("span",{children:typeof l.value=="string"?L.jsx("li",{children:L.jsxs("span",{children:[l.name," :"," ",L.jsxs("b",{children:[l.value.substring(0,30),l.value.length>30?"...":""]})]})}):L.jsxs(L.Fragment,{children:[L.jsx("li",{children:L.jsxs("b",{children:[l.value.name,":"]})}),L.jsxs("div",{children:[Object.keys(l.value).map(f=>f!=="name"?L.jsx("div",{children:f==="url"?L.jsx("a",{href:l.value[f],target:"_blank",children:L.jsx("img",{src:l.value[f]})}):L.jsxs("li",{children:[f,": ",L.jsx("b",{children:l.value[f]})]})},f):null),L.jsxs(Cd,{onClick:()=>{var f;console.info(n[l.value.name]||(n==null||(f=n.uniforms[l.value.name])===null||f===void 0?void 0:f.value))},children:["console.info(",l.value.name,");"]})]})]})},l.name))})},hm=({el:o})=>{Ge(c=>c.log);const n=Ge(c=>c.gl),s=c=>{if(!n)return 0;const i=Math.round(c.drawCounts.total/(n.info.render.triangles+n.info.render.lines+n.info.render.points)*100*10)/10;return isFinite(i)&&i||0};return L.jsx(L.Fragment,{children:o.drawCounts.total>0&&L.jsxs(Ht,{style:{height:"auto",width:"auto",margin:"0 4px"},children:[o.drawCounts.type==="Triangle"?L.jsx(xd,{style:{top:"-1px"}}):L.jsx(gd,{style:{top:"-1px"}}),o.drawCounts.total,L.jsxs("small",{children:[o.drawCounts.type,"s"]}),n&&L.jsxs(cn,{style:{bottom:"-10px",width:"40px",fontWeight:"bold"},children:[o.visible&&!o.material.wireframe?s(o):0,"%"]})]})})},pm=({el:o})=>{const[n,s]=P.useState(o.visible),[c,i]=P.useState(o.expand),[r,l]=P.useState(0),{meshes:f,program:u,material:p}=o;return L.jsxs(q2,{children:[L.jsxs(Q2,{onClick:()=>{o.expand=!c,Object.keys(f).forEach(h=>{const g=f[h];g.material.wireframe=!1}),i(!c)},children:[L.jsx(Ul,{style:{marginRight:"6px"},children:c?L.jsx("span",{children:L.jsx(vd,{})}):L.jsx("span",{children:L.jsx(yd,{})})}),u&&L.jsxs("span",{children:[L.jsx($2,{children:u.name}),L.jsxs(Ht,{style:{height:"auto",width:"auto",margin:"0 4px"},children:[L.jsx(x2,{style:{top:"-1px"}}),Object.keys(f).length,L.jsx("small",{children:Object.keys(f).length>1?"users":"user"})]}),r>0&&L.jsxs(Ht,{style:{height:"auto",width:"auto",margin:"0 4px"},children:[r>1?L.jsx(ml,{style:{top:"-1px"}}):L.jsx(ml,{style:{top:"-1px"}}),r,L.jsx("small",{children:"tex"})]}),L.jsx(hm,{el:o}),p.glslVersion==="300 es"&&L.jsxs(Ht,{style:{height:"auto",width:"auto",margin:"0 4px"},children:[L.jsx(b2,{style:{top:"-1px"}}),"300",L.jsx("small",{children:"es"}),L.jsx(cn,{style:{bottom:"-10px",width:"40px"},children:"glsl"})]})]}),L.jsx(J2,{onPointerEnter:()=>{Object.keys(f).forEach(h=>{const g=f[h];g.material.wireframe=!0})},onPointerLeave:()=>{Object.keys(f).forEach(h=>{const g=f[h];g.material.wireframe=!1})},onClick:h=>{h.stopPropagation(),Object.keys(f).forEach(g=>{const v=f[g],x=!n;v.visible=x,o.visible=x,s(x)})},children:n?L.jsx(p2,{}):L.jsx(d2,{})})]}),L.jsxs("div",{style:{maxHeight:c?"9999px":0,overflow:"hidden"},children:[L.jsxs(cf,{children:[L.jsx(i2,{})," Uniforms:"]}),L.jsx(dm,{program:u,material:p,setTexNumber:l}),L.jsxs(cf,{children:[L.jsx(s2,{})," Geometries:"]}),L.jsx(wd,{children:f&&Object.keys(f).map(h=>f[h]&&f[h].geometry&&L.jsxs(rm,{children:[L.jsxs("span",{children:[f[h].geometry.type,": "]}),f[h].userData&&f[h].userData.drawCount&&L.jsxs("b",{children:[L.jsxs("div",{children:[f[h].userData.drawCount.count,L.jsxs("small",{children:[" ",f[h].userData.drawCount.type,"s"]})]}),L.jsx("br",{}),L.jsxs("div",{children:[Math.round(kp(f[h].geometry)/1024*1e3)/1e3,"Kb",L.jsx("small",{children:" memory used"})]})]})]},h))}),L.jsxs(Cd,{onClick:()=>{console.info(p)},children:["console.info(",p.type,")"]})]})]})},mm=()=>{Ge(n=>n.triggerProgramsUpdate);const o=Ge(n=>n.programs);return L.jsx(tm,{children:o&&Array.from(o.values()).map(n=>n&&n?L.jsx(pm,{el:n},n.material.uuid):null)})},Vt=o=>({overClock:"#ff6eff",fps:o?"100, 143, 255":"238,38,110",cpu:o?"254, 254, 98":"66,226,46",gpu:o?"254,254,254":"253,151,31",custom:o?"86,180,233":"40,255,255"}),gm=({showGraph:o,colorBlind:n})=>{const s=Ge(i=>i.overclockingFps),c=Ge(i=>i.fpsLimit);return L.jsxs(cn,{style:o?{color:s?Vt(n).overClock.toString():`rgb(${Vt(n).fps})`}:{},children:["FPS ",s?`${c}🚀`:""]})},vm=({showGraph:o,colorBlind:n,customData:s,minimal:c})=>{const i=Ge(r=>r.gl);return i?L.jsxs(X2,{children:[L.jsxs(Ht,{children:[L.jsx(w2,{}),L.jsx(cn,{style:o?{color:`rgb(${Vt(n).gpu.toString()})`}:{},children:"GPU"}),L.jsx(qa,{children:"ms"})]}),L.jsxs(Ht,{children:[L.jsx(U2,{}),L.jsx(cn,{style:o?{color:`rgb(${Vt(n).cpu.toString()})`}:{},children:"CPU"}),L.jsx(qa,{children:"ms"})]}),L.jsxs(Ht,{children:[L.jsx(v2,{}),L.jsx(gm,{showGraph:o,colorBlind:n})]}),!c&&i&&L.jsxs(Ht,{children:[L.jsx(A2,{}),L.jsx(cn,{children:i.info.render.calls===1?"call":"calls"})]}),!c&&i&&L.jsxs(Ht,{children:[L.jsx(xd,{}),L.jsx(cn,{children:"Triangles"})]}),s&&L.jsxs(Ht,{children:[L.jsx(n2,{}),L.jsx(cn,{style:o?{color:`rgb(${Vt(n).custom})`}:{},children:s.name}),s.info&&L.jsx(qa,{children:s.info})]})]}):null},ym=({showGraph:o,colorBlind:n,deepAnalyze:s,customData:c,matrixUpdate:i,openByDefault:r,minimal:l})=>L.jsxs(L.Fragment,{children:[L.jsx(vm,{showGraph:o,colorBlind:n,customData:c,minimal:l}),!l&&L.jsx(Sm,{matrixUpdate:i,openByDefault:r,deepAnalyze:s,showGraph:o})]}),xm=({matrixUpdate:o})=>L.jsxs("div",{children:[L.jsxs(Ht,{children:[L.jsx(_2,{}),L.jsx(cn,{children:"Geometries"})]}),L.jsxs(Ht,{children:[L.jsx(ml,{}),L.jsx(cn,{children:"Textures"})]}),L.jsxs(Ht,{children:[L.jsx(gd,{}),L.jsx(cn,{children:"shaders"})]}),L.jsxs(Ht,{children:[L.jsx(k2,{}),L.jsx(cn,{children:"Lines"})]}),L.jsxs(Ht,{children:[L.jsx(l2,{}),L.jsx(cn,{children:"Points"})]}),o&&L.jsxs(Ht,{children:[L.jsx(c2,{}),L.jsx(cn,{children:"Matrices"})]})]}),df=({tab:o,title:n,set:s})=>{const c=Ge(i=>i.tab);return L.jsx(Ul,{className:`${c===o?" __perf_toggle_tab_active":""}`,onClick:()=>{s(!0),Ge.setState({tab:o})},children:L.jsx("span",{children:n})})},Sm=({openByDefault:o,showGraph:n,deepAnalyze:s,matrixUpdate:c})=>{const[i,r]=er.useState(o);return L.jsxs("span",{children:[L.jsx(wm,{show:i,showGraph:n,matrixUpdate:c}),o&&!s?null:L.jsxs(nm,{className:"__perf_toggle",children:[s&&L.jsx(df,{tab:"programs",title:"Programs",set:r}),s&&L.jsx(df,{tab:"infos",title:"Infos",set:r}),L.jsx(Ul,{onClick:()=>{r(!i)},children:i?L.jsxs("span",{children:[L.jsx(vd,{})," Minimize"]}):L.jsxs("span",{children:[L.jsx(yd,{})," More"]})})]})]})},wm=({show:o,showGraph:n,matrixUpdate:s})=>{const c=Ge(i=>i.tab);return L.jsxs(L.Fragment,{children:[L.jsx(xm,{matrixUpdate:s}),o&&L.jsx("div",{children:L.jsx(em,{style:{marginTop:n?"38px":0},children:c==="programs"&&L.jsx(mm,{})})})]})},Cm=({showGraph:o,colorBlind:n,openByDefault:s,className:c,overClock:i,style:r,position:l,chart:f,deepAnalyze:u,antialias:p,customData:h,matrixUpdate:g,minimal:v})=>{const x=P.useRef(null);return L.jsxs(L.Fragment,{children:[L.jsx(Sd,{chart:f,overClock:i,deepAnalyze:u,matrixUpdate:g}),L.jsx(fm,{transform:!1,children:L.jsxs(Z2,{className:(c?" ".concat(c):" ")+` ${l||""} ${v?"minimal":""}`,style:gl({minHeight:v?"37px":o?"100px":"60px"},r),ref:x,children:[L.jsx(sm,{perfContainerRef:x,colorBlind:n,chart:f,showGraph:o,antialias:p,customData:h,minimal:v,matrixUpdate:g}),L.jsx(ym,{colorBlind:n,showGraph:o,deepAnalyze:u,openByDefault:s,customData:h,matrixUpdate:g,minimal:v})]})})]})},Im=({headless:o=!1,colorBlind:n=!1,overClock:s=!1,showGraph:c=!0,trackCPU:i=!1,deepAnalyze:r=!1,antialias:l=!0,openByDefault:f=!0,customData:u,matrixUpdate:p=!1,position:h="top-right",chart:g={length:30,hz:15},className:v,style:x,minimal:w=!1})=>o?L.jsx(Sd,{chart:g,deepAnalyze:r,matrixUpdate:p,overClock:s}):L.jsx(Cm,{colorBlind:n,showGraph:c,trackCPU:i,openByDefault:f,className:v,style:x,overClock:s,position:h,antialias:l,chart:g,deepAnalyze:r,minimal:w,customData:u,matrixUpdate:p}),$a=5e3,_m={show:"#FF723C",clip:"#FFFF00",episode:"#FF7F50",guest:"#E066FF",topic:"#F8F8FF",Topic:"#F8F8FF",Organization:"#FF7F50"},Dm=(o,n)=>{const s=_m[o]||"#F8F8FF";return n?s:parseInt(s.replace("#","0x"),16)},Om=(o,n)=>o.length>n?`${o.substring(0,n)}...`:o,Fm={font:"/fonts/Inter-Bold.woff",characters:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!",fontSize:1,letterSpacing:-.05,lineHeight:1,"material-toneMapped":!1},jm=o=>{const n=P.useRef();return P.useEffect(()=>{n.current=o}),n.current},zm=()=>{const o=P.useRef(null),n=P.useRef(null),s=P.useRef(null);return Eo(({camera:c,clock:i})=>{const r=i.getElapsedTime();if(o.current){const f=Math.sin(r/8)*1e3;o.current.position.setZ(f)}if(n.current&&n.current.position.lerp(c.position,.5),s.current){const l=r*.5,f=Math.sin(l)*$a,u=Math.cos(l)*$a;s.current.position.set(f,0,u)}}),L.jsxs(L.Fragment,{children:[L.jsx("hemisphereLight",{args:[fo.white,e1,t1]}),L.jsx("ambientLight",{color:fo.white,intensity:1}),L.jsx("pointLight",{ref:n,color:fo.white,distance:4e3,intensity:5,position:[0,0,0]}),L.jsx("directionalLight",{ref:s,color:fo.white,intensity:8,position:[$a,0,0]}),L.jsx("pointLight",{ref:o,color:fo.white,distance:4e3,intensity:8,position:[0,0,0]})]})};export{_h as C,Pm as H,Mp as L,Am as P,qc as T,Eo as a,Bf as b,Ml as c,Pl as d,z1 as e,Fm as f,bm as g,Lm as h,Dm as i,jm as j,Im as k,zm as l,Mm as m,Rm as n,q0 as q,Om as t,Di as u}; diff --git a/build/assets/index-455ca637.js b/build/assets/index-6d6e756f.js similarity index 99% rename from build/assets/index-455ca637.js rename to build/assets/index-6d6e756f.js index bde39e43d..bc8537df4 100644 --- a/build/assets/index-455ca637.js +++ b/build/assets/index-6d6e756f.js @@ -1,4 +1,4 @@ -import{r as y,L as _o,M as jo,O as Wt,x as oe,S as Oo,a3 as Ei,H as Po,j as p,U as To,by as En,bz as gr,V as $o,Y as bt,P as Zr,ak as Ci,al as Si,s as O,a as j,t as br,bd as _i,bc as xr,T as _e,F as $,aV as hn,aW as gn,ba as ji,B as Cn,bA as Oi,bB as Hn,v as Ao,bC as Pi,C as mr,bD as Ti,J as c,k as vr,an as Jr,bE as $i,ao as Ai,bF as Qr,bG as Mo,bb as ko,e as Ro,bH as Mi,N as gt,z as ar,d as yr,af as ki,y as ea,aY as Ri}from"./index-17ed06be.js";import{A as Dt}from"./index-9261e06d.js";import{C as Ie}from"./ClipLoader-96bb9f4d.js";import{I as or,f as Bi,D as Fi,h as Bo,r as ta,aK as na,aL as ra,s as aa,q as Ni,aM as Ii,aN as Di}from"./index-2f22123e.js";import{S as Hi,j as zi,p as Li,q as Gi,r as Wi,m as Ui,F as Vi}from"./isPlainObject-9d6a7051.js";import{P as E}from"./index-6f7e416d.js";import{T as Yi,a as Xi}from"./Tabs-fd2a0376.js";import{p as ir,c as Ki,g as qi}from"./index-83069401.js";import{e as Zi}from"./Stack-a8b59155.js";import{h as Ji,m as Qi,u as me,a as Sn,t as sr,T as Fo,f as No,g as es,n as ts,H as ns,j as oa,C as rs,k as as,l as os}from"./index-6cd4b515.js";import{R as is,y as ss,z as ls,V as G,A as qe,I as Ze,Q as ia,J as ln,O as cn,K as sa,e as de,N as cs,r as us,C as ps}from"./three.module-9c942ca6.js";import"./createSvgIcon-6ef3ed46.js";import"./TextareaAutosize-f571cf36.js";import"./Typography-5718a5a5.js";const ds=y.createContext(),la=ds;function fs(t){return _o("MuiGrid",t)}const hs=[0,1,2,3,4,5,6,7,8,9,10],gs=["column-reverse","column","row-reverse","row"],bs=["nowrap","wrap-reverse","wrap"],Mt=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],xs=jo("MuiGrid",["root","container","item","zeroMinWidth",...hs.map(t=>`spacing-xs-${t}`),...gs.map(t=>`direction-xs-${t}`),...bs.map(t=>`wrap-xs-${t}`),...Mt.map(t=>`grid-xs-${t}`),...Mt.map(t=>`grid-sm-${t}`),...Mt.map(t=>`grid-md-${t}`),...Mt.map(t=>`grid-lg-${t}`),...Mt.map(t=>`grid-xl-${t}`)]),zt=xs,ms=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function xt(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function vs({theme:t,ownerState:e}){let n;return t.breakpoints.keys.reduce((r,a)=>{let o={};if(e[a]&&(n=e[a]),!n)return r;if(n===!0)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=En({values:e.columns,breakpoints:t.breakpoints.values}),i=typeof s=="object"?s[a]:s;if(i==null)return r;const l=`${Math.round(n/i*1e8)/1e6}%`;let u={};if(e.container&&e.item&&e.columnSpacing!==0){const d=t.spacing(e.columnSpacing);if(d!=="0px"){const f=`calc(${l} + ${xt(d)})`;u={flexBasis:f,maxWidth:f}}}o=oe({flexBasis:l,flexGrow:0,maxWidth:l},u)}return t.breakpoints.values[a]===0?Object.assign(r,o):r[t.breakpoints.up(a)]=o,r},{})}function ys({theme:t,ownerState:e}){const n=En({values:e.direction,breakpoints:t.breakpoints.values});return gr({theme:t},n,r=>{const a={flexDirection:r};return r.indexOf("column")===0&&(a[`& > .${zt.item}`]={maxWidth:"none"}),a})}function Io({breakpoints:t,values:e}){let n="";Object.keys(e).forEach(a=>{n===""&&e[a]!==0&&(n=a)});const r=Object.keys(t).sort((a,o)=>t[a]-t[o]);return r.slice(0,r.indexOf(n))}function ws({theme:t,ownerState:e}){const{container:n,rowSpacing:r}=e;let a={};if(n&&r!==0){const o=En({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=Io({breakpoints:t.breakpoints.values,values:o})),a=gr({theme:t},o,(i,l)=>{var u;const d=t.spacing(i);return d!=="0px"?{marginTop:`-${xt(d)}`,[`& > .${zt.item}`]:{paddingTop:xt(d)}}:(u=s)!=null&&u.includes(l)?{}:{marginTop:0,[`& > .${zt.item}`]:{paddingTop:0}}})}return a}function Es({theme:t,ownerState:e}){const{container:n,columnSpacing:r}=e;let a={};if(n&&r!==0){const o=En({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=Io({breakpoints:t.breakpoints.values,values:o})),a=gr({theme:t},o,(i,l)=>{var u;const d=t.spacing(i);return d!=="0px"?{width:`calc(100% + ${xt(d)})`,marginLeft:`-${xt(d)}`,[`& > .${zt.item}`]:{paddingLeft:xt(d)}}:(u=s)!=null&&u.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${zt.item}`]:{paddingLeft:0}}})}return a}function Cs(t,e,n={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[n[`spacing-xs-${String(t)}`]];const r=[];return e.forEach(a=>{const o=t[a];Number(o)>0&&r.push(n[`spacing-${a}-${String(o)}`])}),r}const Ss=Wt("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{container:r,direction:a,item:o,spacing:s,wrap:i,zeroMinWidth:l,breakpoints:u}=n;let d=[];r&&(d=Cs(s,u,e));const f=[];return u.forEach(h=>{const g=n[h];g&&f.push(e[`grid-${h}-${String(g)}`])}),[e.root,r&&e.container,o&&e.item,l&&e.zeroMinWidth,...d,a!=="row"&&e[`direction-xs-${String(a)}`],i!=="wrap"&&e[`wrap-xs-${String(i)}`],...f]}})(({ownerState:t})=>oe({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),ys,ws,Es,vs);function _s(t,e){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const n=[];return e.forEach(r=>{const a=t[r];if(Number(a)>0){const o=`spacing-${r}-${String(a)}`;n.push(o)}}),n}const js=t=>{const{classes:e,container:n,direction:r,item:a,spacing:o,wrap:s,zeroMinWidth:i,breakpoints:l}=t;let u=[];n&&(u=_s(o,l));const d=[];l.forEach(h=>{const g=t[h];g&&d.push(`grid-${h}-${String(g)}`)});const f={root:["root",n&&"container",a&&"item",i&&"zeroMinWidth",...u,r!=="row"&&`direction-xs-${String(r)}`,s!=="wrap"&&`wrap-xs-${String(s)}`,...d]};return $o(f,fs,e)},Os=y.forwardRef(function(e,n){const r=Oo({props:e,name:"MuiGrid"}),{breakpoints:a}=Ei(),o=Zi(r),{className:s,columns:i,columnSpacing:l,component:u="div",container:d=!1,direction:f="row",item:h=!1,rowSpacing:g,spacing:x=0,wrap:m="wrap",zeroMinWidth:v=!1}=o,w=Po(o,ms),_=g||x,B=l||x,P=y.useContext(la),T=d?i||12:P,M={},L=oe({},w);a.keys.forEach(S=>{w[S]!=null&&(M[S]=w[S],delete L[S])});const H=oe({},o,{columns:T,container:d,direction:f,item:h,rowSpacing:_,columnSpacing:B,wrap:m,zeroMinWidth:v,spacing:x},M,{breakpoints:a.keys}),V=js(H);return p.jsx(la.Provider,{value:T,children:p.jsx(Ss,oe({ownerState:H,className:To(V.root,s),as:u,ref:n},L))})}),je=Os;function Ps(t){return _o("MuiSwitch",t)}const Ts=jo("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Q=Ts,$s=["className","color","edge","size","sx"],As=t=>{const{classes:e,edge:n,size:r,color:a,checked:o,disabled:s}=t,i={root:["root",n&&`edge${bt(n)}`,`size${bt(r)}`],switchBase:["switchBase",`color${bt(a)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=$o(i,Ps,e);return oe({},e,l)},Ms=Wt("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.edge&&e[`edge${bt(n.edge)}`],e[`size${bt(n.size)}`]]}})(({ownerState:t})=>oe({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},t.edge==="start"&&{marginLeft:-8},t.edge==="end"&&{marginRight:-8},t.size==="small"&&{width:40,height:24,padding:7,[`& .${Q.thumb}`]:{width:16,height:16},[`& .${Q.switchBase}`]:{padding:4,[`&.${Q.checked}`]:{transform:"translateX(16px)"}}})),ks=Wt(Hi,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.switchBase,{[`& .${Q.input}`]:e.input},n.color!=="default"&&e[`color${bt(n.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${Q.checked}`]:{transform:"translateX(20px)"},[`&.${Q.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${Q.checked} + .${Q.track}`]:{opacity:.5},[`&.${Q.disabled} + .${Q.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${Q.input}`]:{left:"-100%",width:"300%"}}),({theme:t,ownerState:e})=>oe({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Zr(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${Q.checked}`]:{color:(t.vars||t).palette[e.color].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Zr(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Q.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${e.color}DisabledColor`]:`${t.palette.mode==="light"?Ci(t.palette[e.color].main,.62):Si(t.palette[e.color].main,.55)}`}},[`&.${Q.checked} + .${Q.track}`]:{backgroundColor:(t.vars||t).palette[e.color].main}})),Rs=Wt("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,e)=>e.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),Bs=Wt("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,e)=>e.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),Fs=y.forwardRef(function(e,n){const r=Oo({props:e,name:"MuiSwitch"}),{className:a,color:o="primary",edge:s=!1,size:i="medium",sx:l}=r,u=Po(r,$s),d=oe({},r,{color:o,edge:s,size:i}),f=As(d),h=p.jsx(Bs,{className:f.thumb,ownerState:d});return p.jsxs(Ms,{className:To(f.root,a),sx:l,ownerState:d,children:[p.jsx(ks,oe({type:"checkbox",icon:h,checkedIcon:h,ref:n,ownerState:d},u,{classes:oe({},f,{root:f.switchBase})})),p.jsx(Rs,{className:f.track,ownerState:d})]})}),Do=Fs;var Ns=Object.defineProperty,Is=(t,e,n)=>e in t?Ns(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,R=(t,e,n)=>(Is(t,typeof e!="symbol"?e+"":e,n),n);const un=new is,ca=new ss,Ds=Math.cos(70*(Math.PI/180)),ua=(t,e)=>(t%e+e)%e;let Hs=class extends ls{constructor(e,n){super(),R(this,"object"),R(this,"domElement"),R(this,"enabled",!0),R(this,"target",new G),R(this,"minDistance",0),R(this,"maxDistance",1/0),R(this,"minZoom",0),R(this,"maxZoom",1/0),R(this,"minPolarAngle",0),R(this,"maxPolarAngle",Math.PI),R(this,"minAzimuthAngle",-1/0),R(this,"maxAzimuthAngle",1/0),R(this,"enableDamping",!1),R(this,"dampingFactor",.05),R(this,"enableZoom",!0),R(this,"zoomSpeed",1),R(this,"enableRotate",!0),R(this,"rotateSpeed",1),R(this,"enablePan",!0),R(this,"panSpeed",1),R(this,"screenSpacePanning",!0),R(this,"keyPanSpeed",7),R(this,"zoomToCursor",!1),R(this,"autoRotate",!1),R(this,"autoRotateSpeed",2),R(this,"reverseOrbit",!1),R(this,"reverseHorizontalOrbit",!1),R(this,"reverseVerticalOrbit",!1),R(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),R(this,"mouseButtons",{LEFT:qe.ROTATE,MIDDLE:qe.DOLLY,RIGHT:qe.PAN}),R(this,"touches",{ONE:Ze.ROTATE,TWO:Ze.DOLLY_PAN}),R(this,"target0"),R(this,"position0"),R(this,"zoom0"),R(this,"_domElementKeyEvents",null),R(this,"getPolarAngle"),R(this,"getAzimuthalAngle"),R(this,"setPolarAngle"),R(this,"setAzimuthalAngle"),R(this,"getDistance"),R(this,"listenToKeyEvents"),R(this,"stopListenToKeyEvents"),R(this,"saveState"),R(this,"reset"),R(this,"update"),R(this,"connect"),R(this,"dispose"),this.object=e,this.domElement=n,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>d.phi,this.getAzimuthalAngle=()=>d.theta,this.setPolarAngle=b=>{let C=ua(b,2*Math.PI),F=d.phi;F<0&&(F+=2*Math.PI),C<0&&(C+=2*Math.PI);let U=Math.abs(C-F);2*Math.PI-U{let C=ua(b,2*Math.PI),F=d.theta;F<0&&(F+=2*Math.PI),C<0&&(C+=2*Math.PI);let U=Math.abs(C-F);2*Math.PI-Ur.object.position.distanceTo(r.target),this.listenToKeyEvents=b=>{b.addEventListener("keydown",jt),this._domElementKeyEvents=b},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",jt),this._domElementKeyEvents=null},this.saveState=()=>{r.target0.copy(r.target),r.position0.copy(r.object.position),r.zoom0=r.object.zoom},this.reset=()=>{r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.zoom=r.zoom0,r.object.updateProjectionMatrix(),r.dispatchEvent(a),r.update(),l=i.NONE},this.update=(()=>{const b=new G,C=new G(0,1,0),F=new ia().setFromUnitVectors(e.up,C),U=F.clone().invert(),Z=new G,we=new ia,Me=2*Math.PI;return function(){const qr=r.object.position;F.setFromUnitVectors(e.up,C),U.copy(F).invert(),b.copy(qr).sub(r.target),b.applyQuaternion(F),d.setFromVector3(b),r.autoRotate&&l===i.NONE&&K(X()),r.enableDamping?(d.theta+=f.theta*r.dampingFactor,d.phi+=f.phi*r.dampingFactor):(d.theta+=f.theta,d.phi+=f.phi);let Ee=r.minAzimuthAngle,Ce=r.maxAzimuthAngle;isFinite(Ee)&&isFinite(Ce)&&(Ee<-Math.PI?Ee+=Me:Ee>Math.PI&&(Ee-=Me),Ce<-Math.PI?Ce+=Me:Ce>Math.PI&&(Ce-=Me),Ee<=Ce?d.theta=Math.max(Ee,Math.min(Ce,d.theta)):d.theta=d.theta>(Ee+Ce)/2?Math.max(Ee,d.theta):Math.min(Ce,d.theta)),d.phi=Math.max(r.minPolarAngle,Math.min(r.maxPolarAngle,d.phi)),d.makeSafe(),r.enableDamping===!0?r.target.addScaledVector(g,r.dampingFactor):r.target.add(g),r.zoomToCursor&&V||r.object.isOrthographicCamera?d.radius=Fe(d.radius):d.radius=Fe(d.radius*h),b.setFromSpherical(d),b.applyQuaternion(U),qr.copy(r.target).add(b),r.object.matrixAutoUpdate||r.object.updateMatrix(),r.object.lookAt(r.target),r.enableDamping===!0?(f.theta*=1-r.dampingFactor,f.phi*=1-r.dampingFactor,g.multiplyScalar(1-r.dampingFactor)):(f.set(0,0,0),g.set(0,0,0));let on=!1;if(r.zoomToCursor&&V){let $t=null;if(r.object instanceof ln&&r.object.isPerspectiveCamera){const At=b.length();$t=Fe(At*h);const sn=At-$t;r.object.position.addScaledVector(L,sn),r.object.updateMatrixWorld()}else if(r.object.isOrthographicCamera){const At=new G(H.x,H.y,0);At.unproject(r.object),r.object.zoom=Math.max(r.minZoom,Math.min(r.maxZoom,r.object.zoom/h)),r.object.updateProjectionMatrix(),on=!0;const sn=new G(H.x,H.y,0);sn.unproject(r.object),r.object.position.sub(sn).add(At),r.object.updateMatrixWorld(),$t=b.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),r.zoomToCursor=!1;$t!==null&&(r.screenSpacePanning?r.target.set(0,0,-1).transformDirection(r.object.matrix).multiplyScalar($t).add(r.object.position):(un.origin.copy(r.object.position),un.direction.set(0,0,-1).transformDirection(r.object.matrix),Math.abs(r.object.up.dot(un.direction))u||8*(1-we.dot(r.object.quaternion))>u?(r.dispatchEvent(a),Z.copy(r.object.position),we.copy(r.object.quaternion),on=!1,!0):!1}})(),this.connect=b=>{b===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),r.domElement=b,r.domElement.style.touchAction="none",r.domElement.addEventListener("contextmenu",Ot),r.domElement.addEventListener("pointerdown",Xe),r.domElement.addEventListener("pointercancel",z),r.domElement.addEventListener("wheel",le)},this.dispose=()=>{var b,C,F,U,Z,we;(b=r.domElement)==null||b.removeEventListener("contextmenu",Ot),(C=r.domElement)==null||C.removeEventListener("pointerdown",Xe),(F=r.domElement)==null||F.removeEventListener("pointercancel",z),(U=r.domElement)==null||U.removeEventListener("wheel",le),(Z=r.domElement)==null||Z.ownerDocument.removeEventListener("pointermove",Ke),(we=r.domElement)==null||we.ownerDocument.removeEventListener("pointerup",k),r._domElementKeyEvents!==null&&r._domElementKeyEvents.removeEventListener("keydown",jt)};const r=this,a={type:"change"},o={type:"start"},s={type:"end"},i={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=i.NONE;const u=1e-6,d=new sa,f=new sa;let h=1;const g=new G,x=new de,m=new de,v=new de,w=new de,_=new de,B=new de,P=new de,T=new de,M=new de,L=new G,H=new de;let V=!1;const S=[],D={};function X(){return 2*Math.PI/60/60*r.autoRotateSpeed}function I(){return Math.pow(.95,r.zoomSpeed)}function K(b){r.reverseOrbit||r.reverseHorizontalOrbit?f.theta+=b:f.theta-=b}function re(b){r.reverseOrbit||r.reverseVerticalOrbit?f.phi+=b:f.phi-=b}const xe=(()=>{const b=new G;return function(F,U){b.setFromMatrixColumn(U,0),b.multiplyScalar(-F),g.add(b)}})(),Te=(()=>{const b=new G;return function(F,U){r.screenSpacePanning===!0?b.setFromMatrixColumn(U,1):(b.setFromMatrixColumn(U,0),b.crossVectors(r.object.up,b)),b.multiplyScalar(F),g.add(b)}})(),pe=(()=>{const b=new G;return function(F,U){const Z=r.domElement;if(Z&&r.object instanceof ln&&r.object.isPerspectiveCamera){const we=r.object.position;b.copy(we).sub(r.target);let Me=b.length();Me*=Math.tan(r.object.fov/2*Math.PI/180),xe(2*F*Me/Z.clientHeight,r.object.matrix),Te(2*U*Me/Z.clientHeight,r.object.matrix)}else Z&&r.object instanceof cn&&r.object.isOrthographicCamera?(xe(F*(r.object.right-r.object.left)/r.object.zoom/Z.clientWidth,r.object.matrix),Te(U*(r.object.top-r.object.bottom)/r.object.zoom/Z.clientHeight,r.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),r.enablePan=!1)}})();function Et(b){r.object instanceof ln&&r.object.isPerspectiveCamera||r.object instanceof cn&&r.object.isOrthographicCamera?h/=b:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function Ue(b){r.object instanceof ln&&r.object.isPerspectiveCamera||r.object instanceof cn&&r.object.isOrthographicCamera?h*=b:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function $e(b){if(!r.zoomToCursor||!r.domElement)return;V=!0;const C=r.domElement.getBoundingClientRect(),F=b.clientX-C.left,U=b.clientY-C.top,Z=C.width,we=C.height;H.x=F/Z*2-1,H.y=-(U/we)*2+1,L.set(H.x,H.y,1).unproject(r.object).sub(r.object.position).normalize()}function Fe(b){return Math.max(r.minDistance,Math.min(r.maxDistance,b))}function ye(b){x.set(b.clientX,b.clientY)}function Ct(b){$e(b),P.set(b.clientX,b.clientY)}function St(b){w.set(b.clientX,b.clientY)}function kn(b){m.set(b.clientX,b.clientY),v.subVectors(m,x).multiplyScalar(r.rotateSpeed);const C=r.domElement;C&&(K(2*Math.PI*v.x/C.clientHeight),re(2*Math.PI*v.y/C.clientHeight)),x.copy(m),r.update()}function Jt(b){T.set(b.clientX,b.clientY),M.subVectors(T,P),M.y>0?Et(I()):M.y<0&&Ue(I()),P.copy(T),r.update()}function Rn(b){_.set(b.clientX,b.clientY),B.subVectors(_,w).multiplyScalar(r.panSpeed),pe(B.x,B.y),w.copy(_),r.update()}function ee(b){$e(b),b.deltaY<0?Ue(I()):b.deltaY>0&&Et(I()),r.update()}function Bn(b){let C=!1;switch(b.code){case r.keys.UP:pe(0,r.keyPanSpeed),C=!0;break;case r.keys.BOTTOM:pe(0,-r.keyPanSpeed),C=!0;break;case r.keys.LEFT:pe(r.keyPanSpeed,0),C=!0;break;case r.keys.RIGHT:pe(-r.keyPanSpeed,0),C=!0;break}C&&(b.preventDefault(),r.update())}function Ve(){if(S.length==1)x.set(S[0].pageX,S[0].pageY);else{const b=.5*(S[0].pageX+S[1].pageX),C=.5*(S[0].pageY+S[1].pageY);x.set(b,C)}}function Ae(){if(S.length==1)w.set(S[0].pageX,S[0].pageY);else{const b=.5*(S[0].pageX+S[1].pageX),C=.5*(S[0].pageY+S[1].pageY);w.set(b,C)}}function Qt(){const b=S[0].pageX-S[1].pageX,C=S[0].pageY-S[1].pageY,F=Math.sqrt(b*b+C*C);P.set(0,F)}function Fn(){r.enableZoom&&Qt(),r.enablePan&&Ae()}function Nn(){r.enableZoom&&Qt(),r.enableRotate&&Ve()}function _t(b){if(S.length==1)m.set(b.pageX,b.pageY);else{const F=Dn(b),U=.5*(b.pageX+F.x),Z=.5*(b.pageY+F.y);m.set(U,Z)}v.subVectors(m,x).multiplyScalar(r.rotateSpeed);const C=r.domElement;C&&(K(2*Math.PI*v.x/C.clientHeight),re(2*Math.PI*v.y/C.clientHeight)),x.copy(m)}function en(b){if(S.length==1)_.set(b.pageX,b.pageY);else{const C=Dn(b),F=.5*(b.pageX+C.x),U=.5*(b.pageY+C.y);_.set(F,U)}B.subVectors(_,w).multiplyScalar(r.panSpeed),pe(B.x,B.y),w.copy(_)}function tn(b){const C=Dn(b),F=b.pageX-C.x,U=b.pageY-C.y,Z=Math.sqrt(F*F+U*U);T.set(0,Z),M.set(0,Math.pow(T.y/P.y,r.zoomSpeed)),Et(M.y),P.copy(T)}function Ye(b){r.enableZoom&&tn(b),r.enablePan&&en(b)}function In(b){r.enableZoom&&tn(b),r.enableRotate&&_t(b)}function Xe(b){var C,F;r.enabled!==!1&&(S.length===0&&((C=r.domElement)==null||C.ownerDocument.addEventListener("pointermove",Ke),(F=r.domElement)==null||F.ownerDocument.addEventListener("pointerup",k)),an(b),b.pointerType==="touch"?nn(b):J(b))}function Ke(b){r.enabled!==!1&&(b.pointerType==="touch"?rn(b):se(b))}function k(b){var C,F,U;Pt(b),S.length===0&&((C=r.domElement)==null||C.releasePointerCapture(b.pointerId),(F=r.domElement)==null||F.ownerDocument.removeEventListener("pointermove",Ke),(U=r.domElement)==null||U.ownerDocument.removeEventListener("pointerup",k)),r.dispatchEvent(s),l=i.NONE}function z(b){Pt(b)}function J(b){let C;switch(b.button){case 0:C=r.mouseButtons.LEFT;break;case 1:C=r.mouseButtons.MIDDLE;break;case 2:C=r.mouseButtons.RIGHT;break;default:C=-1}switch(C){case qe.DOLLY:if(r.enableZoom===!1)return;Ct(b),l=i.DOLLY;break;case qe.ROTATE:if(b.ctrlKey||b.metaKey||b.shiftKey){if(r.enablePan===!1)return;St(b),l=i.PAN}else{if(r.enableRotate===!1)return;ye(b),l=i.ROTATE}break;case qe.PAN:if(b.ctrlKey||b.metaKey||b.shiftKey){if(r.enableRotate===!1)return;ye(b),l=i.ROTATE}else{if(r.enablePan===!1)return;St(b),l=i.PAN}break;default:l=i.NONE}l!==i.NONE&&r.dispatchEvent(o)}function se(b){if(r.enabled!==!1)switch(l){case i.ROTATE:if(r.enableRotate===!1)return;kn(b);break;case i.DOLLY:if(r.enableZoom===!1)return;Jt(b);break;case i.PAN:if(r.enablePan===!1)return;Rn(b);break}}function le(b){r.enabled===!1||r.enableZoom===!1||l!==i.NONE&&l!==i.ROTATE||(b.preventDefault(),r.dispatchEvent(o),ee(b),r.dispatchEvent(s))}function jt(b){r.enabled===!1||r.enablePan===!1||Bn(b)}function nn(b){switch(Tt(b),S.length){case 1:switch(r.touches.ONE){case Ze.ROTATE:if(r.enableRotate===!1)return;Ve(),l=i.TOUCH_ROTATE;break;case Ze.PAN:if(r.enablePan===!1)return;Ae(),l=i.TOUCH_PAN;break;default:l=i.NONE}break;case 2:switch(r.touches.TWO){case Ze.DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;Fn(),l=i.TOUCH_DOLLY_PAN;break;case Ze.DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;Nn(),l=i.TOUCH_DOLLY_ROTATE;break;default:l=i.NONE}break;default:l=i.NONE}l!==i.NONE&&r.dispatchEvent(o)}function rn(b){switch(Tt(b),l){case i.TOUCH_ROTATE:if(r.enableRotate===!1)return;_t(b),r.update();break;case i.TOUCH_PAN:if(r.enablePan===!1)return;en(b),r.update();break;case i.TOUCH_DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;Ye(b),r.update();break;case i.TOUCH_DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;In(b),r.update();break;default:l=i.NONE}}function Ot(b){r.enabled!==!1&&b.preventDefault()}function an(b){S.push(b)}function Pt(b){delete D[b.pointerId];for(let C=0;Cnew cs(void 0,void 0,void 0)),u=y.useCallback((f,h,g,x=20)=>(f instanceof G?l.v0.copy(f):l.v0.set(...f),h instanceof G?l.v2.copy(h):l.v2.set(...h),g instanceof G?l.v1.copy(g):l.v1.copy(l.v0.clone().add(l.v2.clone().sub(l.v0)).add(zs.set(0,l.v0.y-l.v2.y,0))),l.getPoints(x)),[]);y.useLayoutEffect(()=>{i.current.setPoints=(f,h,g)=>{const x=u(f,h,g);i.current.geometry&&i.current.geometry.setPositions(x.map(m=>m.toArray()).flat())}},[]);const d=y.useMemo(()=>u(e,n,r,a),[e,n,r,a]);return y.createElement(Ji,oe({ref:Qi([i,s]),points:d},o))}),Ls=y.forwardRef(({makeDefault:t,camera:e,regress:n,domElement:r,enableDamping:a=!0,onChange:o,onStart:s,onEnd:i,...l},u)=>{const d=me(T=>T.invalidate),f=me(T=>T.camera),h=me(T=>T.gl),g=me(T=>T.events),x=me(T=>T.setEvents),m=me(T=>T.set),v=me(T=>T.get),w=me(T=>T.performance),_=e||f,B=r||g.connected||h.domElement,P=y.useMemo(()=>new Hs(_),[_]);return Sn(()=>{P.enabled&&P.update()},-1),y.useEffect(()=>(P.connect(B),()=>void P.dispose()),[B,n,P,d]),y.useEffect(()=>{const T=H=>{d(),n&&w.regress(),o&&o(H)},M=H=>{s&&s(H)},L=H=>{i&&i(H)};return P.addEventListener("change",T),P.addEventListener("start",M),P.addEventListener("end",L),()=>{P.removeEventListener("start",M),P.removeEventListener("end",L),P.removeEventListener("change",T)}},[o,s,i,P,d,x]),y.useEffect(()=>{if(t){const T=v().controls;return m({controls:P}),()=>m({controls:T})}},[t,P]),y.createElement("primitive",oe({ref:u,object:P,enableDamping:a},l))}),Gs={type:"",parent:""},da=({onSelect:t,dataTestId:e,edgeLink:n,hideSelectAll:r,placeholder:a})=>{const o=br({mode:"onChange",defaultValues:Gs}),{watch:s,setValue:i}=o,[l,u]=y.useState([]),[d,f]=y.useState(!1),h=v=>{i("parent",(v==null?void 0:v.value)||""),t(v==null?void 0:v.value)},g=v=>v.charAt(0).toUpperCase()+v.slice(1);y.useEffect(()=>{(async()=>{f(!0);try{const _=(await xr()).schemas.filter(P=>!P.is_deleted&&P.type).map(P=>P.type==="thing"?{label:"No Parent",value:P.type}:{label:g(P.type),value:P.type}).filter((P,T,M)=>T===M.findIndex(L=>L.value===P.value));u(r?_:[{label:"Select all",value:"all"},..._]),n&&i("parent",n)}catch(w){console.warn(w)}finally{f(!1)}})()},[n,i,r]);const x=s("parent"),m=()=>{const v=l==null?void 0:l.find(w=>w.value===x);if(v)return v;if(n)return{label:n,value:n}};return p.jsx(Ws,{dataTestId:e,disabled:!!n,isLoading:d,onSelect:h,options:l||_i,placeholder:a,selectedValue:m()})},Ws=O(Dt)` +import{r as y,L as _o,M as jo,O as Wt,x as oe,S as Oo,a3 as Ei,H as Po,j as p,U as To,by as En,bz as gr,V as $o,Y as bt,P as Zr,ak as Ci,al as Si,s as O,a as j,t as br,bd as _i,bc as xr,T as _e,F as $,aV as hn,aW as gn,ba as ji,B as Cn,bA as Oi,bB as Hn,v as Ao,bC as Pi,C as mr,bD as Ti,J as c,k as vr,an as Jr,bE as $i,ao as Ai,bF as Qr,bG as Mo,bb as ko,e as Ro,bH as Mi,N as gt,z as ar,d as yr,af as ki,y as ea,aY as Ri}from"./index-787c3ef8.js";import{A as Dt}from"./index-efed0068.js";import{C as Ie}from"./ClipLoader-0106d300.js";import{I as or,f as Bi,D as Fi,h as Bo,r as ta,aK as na,aL as ra,s as aa,q as Ni,aM as Ii,aN as Di}from"./index-77dce891.js";import{S as Hi,j as zi,p as Li,q as Gi,r as Wi,m as Ui,F as Vi}from"./isPlainObject-528c68e4.js";import{P as E}from"./index-94d47251.js";import{T as Yi,a as Xi}from"./Tabs-33c59ae4.js";import{p as ir,c as Ki,g as qi}from"./index-83069401.js";import{e as Zi}from"./Stack-b3992130.js";import{h as Ji,m as Qi,u as me,a as Sn,t as sr,T as Fo,f as No,g as es,n as ts,H as ns,j as oa,C as rs,k as as,l as os}from"./index-64d5234f.js";import{R as is,y as ss,z as ls,V as G,A as qe,I as Ze,Q as ia,J as ln,O as cn,K as sa,e as de,N as cs,r as us,C as ps}from"./three.module-9c942ca6.js";import"./createSvgIcon-fa140fa5.js";import"./TextareaAutosize-e216d6db.js";import"./Typography-02db806b.js";const ds=y.createContext(),la=ds;function fs(t){return _o("MuiGrid",t)}const hs=[0,1,2,3,4,5,6,7,8,9,10],gs=["column-reverse","column","row-reverse","row"],bs=["nowrap","wrap-reverse","wrap"],Mt=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],xs=jo("MuiGrid",["root","container","item","zeroMinWidth",...hs.map(t=>`spacing-xs-${t}`),...gs.map(t=>`direction-xs-${t}`),...bs.map(t=>`wrap-xs-${t}`),...Mt.map(t=>`grid-xs-${t}`),...Mt.map(t=>`grid-sm-${t}`),...Mt.map(t=>`grid-md-${t}`),...Mt.map(t=>`grid-lg-${t}`),...Mt.map(t=>`grid-xl-${t}`)]),zt=xs,ms=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function xt(t){const e=parseFloat(t);return`${e}${String(t).replace(String(e),"")||"px"}`}function vs({theme:t,ownerState:e}){let n;return t.breakpoints.keys.reduce((r,a)=>{let o={};if(e[a]&&(n=e[a]),!n)return r;if(n===!0)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=En({values:e.columns,breakpoints:t.breakpoints.values}),i=typeof s=="object"?s[a]:s;if(i==null)return r;const l=`${Math.round(n/i*1e8)/1e6}%`;let u={};if(e.container&&e.item&&e.columnSpacing!==0){const d=t.spacing(e.columnSpacing);if(d!=="0px"){const f=`calc(${l} + ${xt(d)})`;u={flexBasis:f,maxWidth:f}}}o=oe({flexBasis:l,flexGrow:0,maxWidth:l},u)}return t.breakpoints.values[a]===0?Object.assign(r,o):r[t.breakpoints.up(a)]=o,r},{})}function ys({theme:t,ownerState:e}){const n=En({values:e.direction,breakpoints:t.breakpoints.values});return gr({theme:t},n,r=>{const a={flexDirection:r};return r.indexOf("column")===0&&(a[`& > .${zt.item}`]={maxWidth:"none"}),a})}function Io({breakpoints:t,values:e}){let n="";Object.keys(e).forEach(a=>{n===""&&e[a]!==0&&(n=a)});const r=Object.keys(t).sort((a,o)=>t[a]-t[o]);return r.slice(0,r.indexOf(n))}function ws({theme:t,ownerState:e}){const{container:n,rowSpacing:r}=e;let a={};if(n&&r!==0){const o=En({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=Io({breakpoints:t.breakpoints.values,values:o})),a=gr({theme:t},o,(i,l)=>{var u;const d=t.spacing(i);return d!=="0px"?{marginTop:`-${xt(d)}`,[`& > .${zt.item}`]:{paddingTop:xt(d)}}:(u=s)!=null&&u.includes(l)?{}:{marginTop:0,[`& > .${zt.item}`]:{paddingTop:0}}})}return a}function Es({theme:t,ownerState:e}){const{container:n,columnSpacing:r}=e;let a={};if(n&&r!==0){const o=En({values:r,breakpoints:t.breakpoints.values});let s;typeof o=="object"&&(s=Io({breakpoints:t.breakpoints.values,values:o})),a=gr({theme:t},o,(i,l)=>{var u;const d=t.spacing(i);return d!=="0px"?{width:`calc(100% + ${xt(d)})`,marginLeft:`-${xt(d)}`,[`& > .${zt.item}`]:{paddingLeft:xt(d)}}:(u=s)!=null&&u.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${zt.item}`]:{paddingLeft:0}}})}return a}function Cs(t,e,n={}){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[n[`spacing-xs-${String(t)}`]];const r=[];return e.forEach(a=>{const o=t[a];Number(o)>0&&r.push(n[`spacing-${a}-${String(o)}`])}),r}const Ss=Wt("div",{name:"MuiGrid",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t,{container:r,direction:a,item:o,spacing:s,wrap:i,zeroMinWidth:l,breakpoints:u}=n;let d=[];r&&(d=Cs(s,u,e));const f=[];return u.forEach(h=>{const g=n[h];g&&f.push(e[`grid-${h}-${String(g)}`])}),[e.root,r&&e.container,o&&e.item,l&&e.zeroMinWidth,...d,a!=="row"&&e[`direction-xs-${String(a)}`],i!=="wrap"&&e[`wrap-xs-${String(i)}`],...f]}})(({ownerState:t})=>oe({boxSizing:"border-box"},t.container&&{display:"flex",flexWrap:"wrap",width:"100%"},t.item&&{margin:0},t.zeroMinWidth&&{minWidth:0},t.wrap!=="wrap"&&{flexWrap:t.wrap}),ys,ws,Es,vs);function _s(t,e){if(!t||t<=0)return[];if(typeof t=="string"&&!Number.isNaN(Number(t))||typeof t=="number")return[`spacing-xs-${String(t)}`];const n=[];return e.forEach(r=>{const a=t[r];if(Number(a)>0){const o=`spacing-${r}-${String(a)}`;n.push(o)}}),n}const js=t=>{const{classes:e,container:n,direction:r,item:a,spacing:o,wrap:s,zeroMinWidth:i,breakpoints:l}=t;let u=[];n&&(u=_s(o,l));const d=[];l.forEach(h=>{const g=t[h];g&&d.push(`grid-${h}-${String(g)}`)});const f={root:["root",n&&"container",a&&"item",i&&"zeroMinWidth",...u,r!=="row"&&`direction-xs-${String(r)}`,s!=="wrap"&&`wrap-xs-${String(s)}`,...d]};return $o(f,fs,e)},Os=y.forwardRef(function(e,n){const r=Oo({props:e,name:"MuiGrid"}),{breakpoints:a}=Ei(),o=Zi(r),{className:s,columns:i,columnSpacing:l,component:u="div",container:d=!1,direction:f="row",item:h=!1,rowSpacing:g,spacing:x=0,wrap:m="wrap",zeroMinWidth:v=!1}=o,w=Po(o,ms),_=g||x,B=l||x,P=y.useContext(la),T=d?i||12:P,M={},L=oe({},w);a.keys.forEach(S=>{w[S]!=null&&(M[S]=w[S],delete L[S])});const H=oe({},o,{columns:T,container:d,direction:f,item:h,rowSpacing:_,columnSpacing:B,wrap:m,zeroMinWidth:v,spacing:x},M,{breakpoints:a.keys}),V=js(H);return p.jsx(la.Provider,{value:T,children:p.jsx(Ss,oe({ownerState:H,className:To(V.root,s),as:u,ref:n},L))})}),je=Os;function Ps(t){return _o("MuiSwitch",t)}const Ts=jo("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Q=Ts,$s=["className","color","edge","size","sx"],As=t=>{const{classes:e,edge:n,size:r,color:a,checked:o,disabled:s}=t,i={root:["root",n&&`edge${bt(n)}`,`size${bt(r)}`],switchBase:["switchBase",`color${bt(a)}`,o&&"checked",s&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=$o(i,Ps,e);return oe({},e,l)},Ms=Wt("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.edge&&e[`edge${bt(n.edge)}`],e[`size${bt(n.size)}`]]}})(({ownerState:t})=>oe({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},t.edge==="start"&&{marginLeft:-8},t.edge==="end"&&{marginRight:-8},t.size==="small"&&{width:40,height:24,padding:7,[`& .${Q.thumb}`]:{width:16,height:16},[`& .${Q.switchBase}`]:{padding:4,[`&.${Q.checked}`]:{transform:"translateX(16px)"}}})),ks=Wt(Hi,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.switchBase,{[`& .${Q.input}`]:e.input},n.color!=="default"&&e[`color${bt(n.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${Q.checked}`]:{transform:"translateX(20px)"},[`&.${Q.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${Q.checked} + .${Q.track}`]:{opacity:.5},[`&.${Q.disabled} + .${Q.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${Q.input}`]:{left:"-100%",width:"300%"}}),({theme:t,ownerState:e})=>oe({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Zr(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},e.color!=="default"&&{[`&.${Q.checked}`]:{color:(t.vars||t).palette[e.color].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[e.color].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Zr(t.palette[e.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Q.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${e.color}DisabledColor`]:`${t.palette.mode==="light"?Ci(t.palette[e.color].main,.62):Si(t.palette[e.color].main,.55)}`}},[`&.${Q.checked} + .${Q.track}`]:{backgroundColor:(t.vars||t).palette[e.color].main}})),Rs=Wt("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,e)=>e.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),Bs=Wt("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,e)=>e.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),Fs=y.forwardRef(function(e,n){const r=Oo({props:e,name:"MuiSwitch"}),{className:a,color:o="primary",edge:s=!1,size:i="medium",sx:l}=r,u=Po(r,$s),d=oe({},r,{color:o,edge:s,size:i}),f=As(d),h=p.jsx(Bs,{className:f.thumb,ownerState:d});return p.jsxs(Ms,{className:To(f.root,a),sx:l,ownerState:d,children:[p.jsx(ks,oe({type:"checkbox",icon:h,checkedIcon:h,ref:n,ownerState:d},u,{classes:oe({},f,{root:f.switchBase})})),p.jsx(Rs,{className:f.track,ownerState:d})]})}),Do=Fs;var Ns=Object.defineProperty,Is=(t,e,n)=>e in t?Ns(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,R=(t,e,n)=>(Is(t,typeof e!="symbol"?e+"":e,n),n);const un=new is,ca=new ss,Ds=Math.cos(70*(Math.PI/180)),ua=(t,e)=>(t%e+e)%e;let Hs=class extends ls{constructor(e,n){super(),R(this,"object"),R(this,"domElement"),R(this,"enabled",!0),R(this,"target",new G),R(this,"minDistance",0),R(this,"maxDistance",1/0),R(this,"minZoom",0),R(this,"maxZoom",1/0),R(this,"minPolarAngle",0),R(this,"maxPolarAngle",Math.PI),R(this,"minAzimuthAngle",-1/0),R(this,"maxAzimuthAngle",1/0),R(this,"enableDamping",!1),R(this,"dampingFactor",.05),R(this,"enableZoom",!0),R(this,"zoomSpeed",1),R(this,"enableRotate",!0),R(this,"rotateSpeed",1),R(this,"enablePan",!0),R(this,"panSpeed",1),R(this,"screenSpacePanning",!0),R(this,"keyPanSpeed",7),R(this,"zoomToCursor",!1),R(this,"autoRotate",!1),R(this,"autoRotateSpeed",2),R(this,"reverseOrbit",!1),R(this,"reverseHorizontalOrbit",!1),R(this,"reverseVerticalOrbit",!1),R(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),R(this,"mouseButtons",{LEFT:qe.ROTATE,MIDDLE:qe.DOLLY,RIGHT:qe.PAN}),R(this,"touches",{ONE:Ze.ROTATE,TWO:Ze.DOLLY_PAN}),R(this,"target0"),R(this,"position0"),R(this,"zoom0"),R(this,"_domElementKeyEvents",null),R(this,"getPolarAngle"),R(this,"getAzimuthalAngle"),R(this,"setPolarAngle"),R(this,"setAzimuthalAngle"),R(this,"getDistance"),R(this,"listenToKeyEvents"),R(this,"stopListenToKeyEvents"),R(this,"saveState"),R(this,"reset"),R(this,"update"),R(this,"connect"),R(this,"dispose"),this.object=e,this.domElement=n,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>d.phi,this.getAzimuthalAngle=()=>d.theta,this.setPolarAngle=b=>{let C=ua(b,2*Math.PI),F=d.phi;F<0&&(F+=2*Math.PI),C<0&&(C+=2*Math.PI);let U=Math.abs(C-F);2*Math.PI-U{let C=ua(b,2*Math.PI),F=d.theta;F<0&&(F+=2*Math.PI),C<0&&(C+=2*Math.PI);let U=Math.abs(C-F);2*Math.PI-Ur.object.position.distanceTo(r.target),this.listenToKeyEvents=b=>{b.addEventListener("keydown",jt),this._domElementKeyEvents=b},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",jt),this._domElementKeyEvents=null},this.saveState=()=>{r.target0.copy(r.target),r.position0.copy(r.object.position),r.zoom0=r.object.zoom},this.reset=()=>{r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.zoom=r.zoom0,r.object.updateProjectionMatrix(),r.dispatchEvent(a),r.update(),l=i.NONE},this.update=(()=>{const b=new G,C=new G(0,1,0),F=new ia().setFromUnitVectors(e.up,C),U=F.clone().invert(),Z=new G,we=new ia,Me=2*Math.PI;return function(){const qr=r.object.position;F.setFromUnitVectors(e.up,C),U.copy(F).invert(),b.copy(qr).sub(r.target),b.applyQuaternion(F),d.setFromVector3(b),r.autoRotate&&l===i.NONE&&K(X()),r.enableDamping?(d.theta+=f.theta*r.dampingFactor,d.phi+=f.phi*r.dampingFactor):(d.theta+=f.theta,d.phi+=f.phi);let Ee=r.minAzimuthAngle,Ce=r.maxAzimuthAngle;isFinite(Ee)&&isFinite(Ce)&&(Ee<-Math.PI?Ee+=Me:Ee>Math.PI&&(Ee-=Me),Ce<-Math.PI?Ce+=Me:Ce>Math.PI&&(Ce-=Me),Ee<=Ce?d.theta=Math.max(Ee,Math.min(Ce,d.theta)):d.theta=d.theta>(Ee+Ce)/2?Math.max(Ee,d.theta):Math.min(Ce,d.theta)),d.phi=Math.max(r.minPolarAngle,Math.min(r.maxPolarAngle,d.phi)),d.makeSafe(),r.enableDamping===!0?r.target.addScaledVector(g,r.dampingFactor):r.target.add(g),r.zoomToCursor&&V||r.object.isOrthographicCamera?d.radius=Fe(d.radius):d.radius=Fe(d.radius*h),b.setFromSpherical(d),b.applyQuaternion(U),qr.copy(r.target).add(b),r.object.matrixAutoUpdate||r.object.updateMatrix(),r.object.lookAt(r.target),r.enableDamping===!0?(f.theta*=1-r.dampingFactor,f.phi*=1-r.dampingFactor,g.multiplyScalar(1-r.dampingFactor)):(f.set(0,0,0),g.set(0,0,0));let on=!1;if(r.zoomToCursor&&V){let $t=null;if(r.object instanceof ln&&r.object.isPerspectiveCamera){const At=b.length();$t=Fe(At*h);const sn=At-$t;r.object.position.addScaledVector(L,sn),r.object.updateMatrixWorld()}else if(r.object.isOrthographicCamera){const At=new G(H.x,H.y,0);At.unproject(r.object),r.object.zoom=Math.max(r.minZoom,Math.min(r.maxZoom,r.object.zoom/h)),r.object.updateProjectionMatrix(),on=!0;const sn=new G(H.x,H.y,0);sn.unproject(r.object),r.object.position.sub(sn).add(At),r.object.updateMatrixWorld(),$t=b.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),r.zoomToCursor=!1;$t!==null&&(r.screenSpacePanning?r.target.set(0,0,-1).transformDirection(r.object.matrix).multiplyScalar($t).add(r.object.position):(un.origin.copy(r.object.position),un.direction.set(0,0,-1).transformDirection(r.object.matrix),Math.abs(r.object.up.dot(un.direction))u||8*(1-we.dot(r.object.quaternion))>u?(r.dispatchEvent(a),Z.copy(r.object.position),we.copy(r.object.quaternion),on=!1,!0):!1}})(),this.connect=b=>{b===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),r.domElement=b,r.domElement.style.touchAction="none",r.domElement.addEventListener("contextmenu",Ot),r.domElement.addEventListener("pointerdown",Xe),r.domElement.addEventListener("pointercancel",z),r.domElement.addEventListener("wheel",le)},this.dispose=()=>{var b,C,F,U,Z,we;(b=r.domElement)==null||b.removeEventListener("contextmenu",Ot),(C=r.domElement)==null||C.removeEventListener("pointerdown",Xe),(F=r.domElement)==null||F.removeEventListener("pointercancel",z),(U=r.domElement)==null||U.removeEventListener("wheel",le),(Z=r.domElement)==null||Z.ownerDocument.removeEventListener("pointermove",Ke),(we=r.domElement)==null||we.ownerDocument.removeEventListener("pointerup",k),r._domElementKeyEvents!==null&&r._domElementKeyEvents.removeEventListener("keydown",jt)};const r=this,a={type:"change"},o={type:"start"},s={type:"end"},i={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=i.NONE;const u=1e-6,d=new sa,f=new sa;let h=1;const g=new G,x=new de,m=new de,v=new de,w=new de,_=new de,B=new de,P=new de,T=new de,M=new de,L=new G,H=new de;let V=!1;const S=[],D={};function X(){return 2*Math.PI/60/60*r.autoRotateSpeed}function I(){return Math.pow(.95,r.zoomSpeed)}function K(b){r.reverseOrbit||r.reverseHorizontalOrbit?f.theta+=b:f.theta-=b}function re(b){r.reverseOrbit||r.reverseVerticalOrbit?f.phi+=b:f.phi-=b}const xe=(()=>{const b=new G;return function(F,U){b.setFromMatrixColumn(U,0),b.multiplyScalar(-F),g.add(b)}})(),Te=(()=>{const b=new G;return function(F,U){r.screenSpacePanning===!0?b.setFromMatrixColumn(U,1):(b.setFromMatrixColumn(U,0),b.crossVectors(r.object.up,b)),b.multiplyScalar(F),g.add(b)}})(),pe=(()=>{const b=new G;return function(F,U){const Z=r.domElement;if(Z&&r.object instanceof ln&&r.object.isPerspectiveCamera){const we=r.object.position;b.copy(we).sub(r.target);let Me=b.length();Me*=Math.tan(r.object.fov/2*Math.PI/180),xe(2*F*Me/Z.clientHeight,r.object.matrix),Te(2*U*Me/Z.clientHeight,r.object.matrix)}else Z&&r.object instanceof cn&&r.object.isOrthographicCamera?(xe(F*(r.object.right-r.object.left)/r.object.zoom/Z.clientWidth,r.object.matrix),Te(U*(r.object.top-r.object.bottom)/r.object.zoom/Z.clientHeight,r.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),r.enablePan=!1)}})();function Et(b){r.object instanceof ln&&r.object.isPerspectiveCamera||r.object instanceof cn&&r.object.isOrthographicCamera?h/=b:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function Ue(b){r.object instanceof ln&&r.object.isPerspectiveCamera||r.object instanceof cn&&r.object.isOrthographicCamera?h*=b:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function $e(b){if(!r.zoomToCursor||!r.domElement)return;V=!0;const C=r.domElement.getBoundingClientRect(),F=b.clientX-C.left,U=b.clientY-C.top,Z=C.width,we=C.height;H.x=F/Z*2-1,H.y=-(U/we)*2+1,L.set(H.x,H.y,1).unproject(r.object).sub(r.object.position).normalize()}function Fe(b){return Math.max(r.minDistance,Math.min(r.maxDistance,b))}function ye(b){x.set(b.clientX,b.clientY)}function Ct(b){$e(b),P.set(b.clientX,b.clientY)}function St(b){w.set(b.clientX,b.clientY)}function kn(b){m.set(b.clientX,b.clientY),v.subVectors(m,x).multiplyScalar(r.rotateSpeed);const C=r.domElement;C&&(K(2*Math.PI*v.x/C.clientHeight),re(2*Math.PI*v.y/C.clientHeight)),x.copy(m),r.update()}function Jt(b){T.set(b.clientX,b.clientY),M.subVectors(T,P),M.y>0?Et(I()):M.y<0&&Ue(I()),P.copy(T),r.update()}function Rn(b){_.set(b.clientX,b.clientY),B.subVectors(_,w).multiplyScalar(r.panSpeed),pe(B.x,B.y),w.copy(_),r.update()}function ee(b){$e(b),b.deltaY<0?Ue(I()):b.deltaY>0&&Et(I()),r.update()}function Bn(b){let C=!1;switch(b.code){case r.keys.UP:pe(0,r.keyPanSpeed),C=!0;break;case r.keys.BOTTOM:pe(0,-r.keyPanSpeed),C=!0;break;case r.keys.LEFT:pe(r.keyPanSpeed,0),C=!0;break;case r.keys.RIGHT:pe(-r.keyPanSpeed,0),C=!0;break}C&&(b.preventDefault(),r.update())}function Ve(){if(S.length==1)x.set(S[0].pageX,S[0].pageY);else{const b=.5*(S[0].pageX+S[1].pageX),C=.5*(S[0].pageY+S[1].pageY);x.set(b,C)}}function Ae(){if(S.length==1)w.set(S[0].pageX,S[0].pageY);else{const b=.5*(S[0].pageX+S[1].pageX),C=.5*(S[0].pageY+S[1].pageY);w.set(b,C)}}function Qt(){const b=S[0].pageX-S[1].pageX,C=S[0].pageY-S[1].pageY,F=Math.sqrt(b*b+C*C);P.set(0,F)}function Fn(){r.enableZoom&&Qt(),r.enablePan&&Ae()}function Nn(){r.enableZoom&&Qt(),r.enableRotate&&Ve()}function _t(b){if(S.length==1)m.set(b.pageX,b.pageY);else{const F=Dn(b),U=.5*(b.pageX+F.x),Z=.5*(b.pageY+F.y);m.set(U,Z)}v.subVectors(m,x).multiplyScalar(r.rotateSpeed);const C=r.domElement;C&&(K(2*Math.PI*v.x/C.clientHeight),re(2*Math.PI*v.y/C.clientHeight)),x.copy(m)}function en(b){if(S.length==1)_.set(b.pageX,b.pageY);else{const C=Dn(b),F=.5*(b.pageX+C.x),U=.5*(b.pageY+C.y);_.set(F,U)}B.subVectors(_,w).multiplyScalar(r.panSpeed),pe(B.x,B.y),w.copy(_)}function tn(b){const C=Dn(b),F=b.pageX-C.x,U=b.pageY-C.y,Z=Math.sqrt(F*F+U*U);T.set(0,Z),M.set(0,Math.pow(T.y/P.y,r.zoomSpeed)),Et(M.y),P.copy(T)}function Ye(b){r.enableZoom&&tn(b),r.enablePan&&en(b)}function In(b){r.enableZoom&&tn(b),r.enableRotate&&_t(b)}function Xe(b){var C,F;r.enabled!==!1&&(S.length===0&&((C=r.domElement)==null||C.ownerDocument.addEventListener("pointermove",Ke),(F=r.domElement)==null||F.ownerDocument.addEventListener("pointerup",k)),an(b),b.pointerType==="touch"?nn(b):J(b))}function Ke(b){r.enabled!==!1&&(b.pointerType==="touch"?rn(b):se(b))}function k(b){var C,F,U;Pt(b),S.length===0&&((C=r.domElement)==null||C.releasePointerCapture(b.pointerId),(F=r.domElement)==null||F.ownerDocument.removeEventListener("pointermove",Ke),(U=r.domElement)==null||U.ownerDocument.removeEventListener("pointerup",k)),r.dispatchEvent(s),l=i.NONE}function z(b){Pt(b)}function J(b){let C;switch(b.button){case 0:C=r.mouseButtons.LEFT;break;case 1:C=r.mouseButtons.MIDDLE;break;case 2:C=r.mouseButtons.RIGHT;break;default:C=-1}switch(C){case qe.DOLLY:if(r.enableZoom===!1)return;Ct(b),l=i.DOLLY;break;case qe.ROTATE:if(b.ctrlKey||b.metaKey||b.shiftKey){if(r.enablePan===!1)return;St(b),l=i.PAN}else{if(r.enableRotate===!1)return;ye(b),l=i.ROTATE}break;case qe.PAN:if(b.ctrlKey||b.metaKey||b.shiftKey){if(r.enableRotate===!1)return;ye(b),l=i.ROTATE}else{if(r.enablePan===!1)return;St(b),l=i.PAN}break;default:l=i.NONE}l!==i.NONE&&r.dispatchEvent(o)}function se(b){if(r.enabled!==!1)switch(l){case i.ROTATE:if(r.enableRotate===!1)return;kn(b);break;case i.DOLLY:if(r.enableZoom===!1)return;Jt(b);break;case i.PAN:if(r.enablePan===!1)return;Rn(b);break}}function le(b){r.enabled===!1||r.enableZoom===!1||l!==i.NONE&&l!==i.ROTATE||(b.preventDefault(),r.dispatchEvent(o),ee(b),r.dispatchEvent(s))}function jt(b){r.enabled===!1||r.enablePan===!1||Bn(b)}function nn(b){switch(Tt(b),S.length){case 1:switch(r.touches.ONE){case Ze.ROTATE:if(r.enableRotate===!1)return;Ve(),l=i.TOUCH_ROTATE;break;case Ze.PAN:if(r.enablePan===!1)return;Ae(),l=i.TOUCH_PAN;break;default:l=i.NONE}break;case 2:switch(r.touches.TWO){case Ze.DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;Fn(),l=i.TOUCH_DOLLY_PAN;break;case Ze.DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;Nn(),l=i.TOUCH_DOLLY_ROTATE;break;default:l=i.NONE}break;default:l=i.NONE}l!==i.NONE&&r.dispatchEvent(o)}function rn(b){switch(Tt(b),l){case i.TOUCH_ROTATE:if(r.enableRotate===!1)return;_t(b),r.update();break;case i.TOUCH_PAN:if(r.enablePan===!1)return;en(b),r.update();break;case i.TOUCH_DOLLY_PAN:if(r.enableZoom===!1&&r.enablePan===!1)return;Ye(b),r.update();break;case i.TOUCH_DOLLY_ROTATE:if(r.enableZoom===!1&&r.enableRotate===!1)return;In(b),r.update();break;default:l=i.NONE}}function Ot(b){r.enabled!==!1&&b.preventDefault()}function an(b){S.push(b)}function Pt(b){delete D[b.pointerId];for(let C=0;Cnew cs(void 0,void 0,void 0)),u=y.useCallback((f,h,g,x=20)=>(f instanceof G?l.v0.copy(f):l.v0.set(...f),h instanceof G?l.v2.copy(h):l.v2.set(...h),g instanceof G?l.v1.copy(g):l.v1.copy(l.v0.clone().add(l.v2.clone().sub(l.v0)).add(zs.set(0,l.v0.y-l.v2.y,0))),l.getPoints(x)),[]);y.useLayoutEffect(()=>{i.current.setPoints=(f,h,g)=>{const x=u(f,h,g);i.current.geometry&&i.current.geometry.setPositions(x.map(m=>m.toArray()).flat())}},[]);const d=y.useMemo(()=>u(e,n,r,a),[e,n,r,a]);return y.createElement(Ji,oe({ref:Qi([i,s]),points:d},o))}),Ls=y.forwardRef(({makeDefault:t,camera:e,regress:n,domElement:r,enableDamping:a=!0,onChange:o,onStart:s,onEnd:i,...l},u)=>{const d=me(T=>T.invalidate),f=me(T=>T.camera),h=me(T=>T.gl),g=me(T=>T.events),x=me(T=>T.setEvents),m=me(T=>T.set),v=me(T=>T.get),w=me(T=>T.performance),_=e||f,B=r||g.connected||h.domElement,P=y.useMemo(()=>new Hs(_),[_]);return Sn(()=>{P.enabled&&P.update()},-1),y.useEffect(()=>(P.connect(B),()=>void P.dispose()),[B,n,P,d]),y.useEffect(()=>{const T=H=>{d(),n&&w.regress(),o&&o(H)},M=H=>{s&&s(H)},L=H=>{i&&i(H)};return P.addEventListener("change",T),P.addEventListener("start",M),P.addEventListener("end",L),()=>{P.removeEventListener("start",M),P.removeEventListener("end",L),P.removeEventListener("change",T)}},[o,s,i,P,d,x]),y.useEffect(()=>{if(t){const T=v().controls;return m({controls:P}),()=>m({controls:T})}},[t,P]),y.createElement("primitive",oe({ref:u,object:P,enableDamping:a},l))}),Gs={type:"",parent:""},da=({onSelect:t,dataTestId:e,edgeLink:n,hideSelectAll:r,placeholder:a})=>{const o=br({mode:"onChange",defaultValues:Gs}),{watch:s,setValue:i}=o,[l,u]=y.useState([]),[d,f]=y.useState(!1),h=v=>{i("parent",(v==null?void 0:v.value)||""),t(v==null?void 0:v.value)},g=v=>v.charAt(0).toUpperCase()+v.slice(1);y.useEffect(()=>{(async()=>{f(!0);try{const _=(await xr()).schemas.filter(P=>!P.is_deleted&&P.type).map(P=>P.type==="thing"?{label:"No Parent",value:P.type}:{label:g(P.type),value:P.type}).filter((P,T,M)=>T===M.findIndex(L=>L.value===P.value));u(r?_:[{label:"Select all",value:"all"},..._]),n&&i("parent",n)}catch(w){console.warn(w)}finally{f(!1)}})()},[n,i,r]);const x=s("parent"),m=()=>{const v=l==null?void 0:l.find(w=>w.value===x);if(v)return v;if(n)return{label:n,value:n}};return p.jsx(Ws,{dataTestId:e,disabled:!!n,isLoading:d,onSelect:h,options:l||_i,placeholder:a,selectedValue:m()})},Ws=O(Dt)` .MuiInputBase-input { font-family: Barlow; font-size: 14px; diff --git a/build/assets/index-04a78d33.js b/build/assets/index-70104819.js similarity index 92% rename from build/assets/index-04a78d33.js rename to build/assets/index-70104819.js index 0fb3c92fc..1b54c6fb3 100644 --- a/build/assets/index-04a78d33.js +++ b/build/assets/index-70104819.js @@ -1,4 +1,4 @@ -import{s as i,a as t,F as c,j as e,e as j,r as l,u as $,B as w,bt as C,bu as R,aY as I}from"./index-17ed06be.js";import{aJ as z,i as D,n as E}from"./index-2f22123e.js";import{S as L}from"./Skeleton-4c8a0434.js";import{C as T}from"./ClipLoader-96bb9f4d.js";const G=({nodeName:p})=>e.jsx(c,{children:e.jsxs(c,{align:"center",direction:"column",justify:"space-between",children:[e.jsx(A,{children:e.jsx(z,{})}),e.jsxs(M,{children:["Are you sure you want to delete ",p||"this item","?"]})]})}),M=i(c)` +import{s as i,a as t,F as c,j as e,e as j,r as l,u as $,B as w,bt as C,bu as R,aY as I}from"./index-787c3ef8.js";import{aJ as z,i as D,n as E}from"./index-77dce891.js";import{S as L}from"./Skeleton-fe703092.js";import{C as T}from"./ClipLoader-0106d300.js";const G=({nodeName:p})=>e.jsx(c,{children:e.jsxs(c,{align:"center",direction:"column",justify:"space-between",children:[e.jsx(A,{children:e.jsx(z,{})}),e.jsxs(M,{children:["Are you sure you want to delete ",p||"this item","?"]})]})}),M=i(c)` color: ${t.white}; font-family: 'Barlow'; font-size: 20px; diff --git a/build/assets/index-b5ee4351.js b/build/assets/index-7545798f.js similarity index 95% rename from build/assets/index-b5ee4351.js rename to build/assets/index-7545798f.js index 597ac737d..d9b63c69b 100644 --- a/build/assets/index-b5ee4351.js +++ b/build/assets/index-7545798f.js @@ -1,4 +1,4 @@ -import{s as c,a as b,T as E,F as s,e as x,q as A,r as l,j as e,aV as O,aW as V,t as P,v as k,B as I,bt as q,br as G,u as Y,aY as H}from"./index-17ed06be.js";import{n as F,g as J,aI as K}from"./index-2f22123e.js";import{S as Q}from"./Skeleton-4c8a0434.js";import{C as X}from"./ClipLoader-96bb9f4d.js";const Z=/^https:\/\/\S+\.(png|jpe?g|svg)$/;function ee(r){return!!Z.test(r)}function te(r){return r.split("_").map(d=>d.charAt(0).toUpperCase()+d.slice(1)).join(" ")}const ae=()=>{const{open:r}=x("changeNodeType"),{close:d}=x("editNodeName"),{changeNodeTypeFeatureFlag:f}=A(o=>({changeNodeTypeFeatureFlag:o.changeNodeTypeFeatureFlag})),a=F(),j=a==null?void 0:a.node_type,[m,u]=l.useState({});l.useEffect(()=>{a!=null&&a.properties&&u(a.properties)},[a]);const y=()=>{d(),r()},g=(o,n)=>{u(N=>({...N,[o]:n}))};return e.jsxs(s,{children:[e.jsx(s,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsxs(s,{align:"center",direction:"row",children:[e.jsx(oe,{children:"Edit Node"}),e.jsxs(se,{children:[e.jsx(J,{type:j}),f&&e.jsx(re,{onClick:y,children:e.jsx(K,{})})]})]})}),e.jsx(ie,{children:Object.keys(m).map(o=>e.jsxs(s,{mb:18,children:[e.jsx(ne,{style:{marginBottom:8},children:te(o)}),e.jsx(O,{id:`cy-${o}`,maxLength:50,name:`properties.${o}`,onChange:n=>g(o,n),placeholder:`Please Enter the ${o}`,rules:o==="name"?{...V}:{}})]},o))})]})},oe=c(E)` +import{s as c,a as b,T as E,F as s,e as x,q as A,r as l,j as e,aV as O,aW as V,t as P,v as k,B as I,bt as q,br as G,u as Y,aY as H}from"./index-787c3ef8.js";import{n as F,g as J,aI as K}from"./index-77dce891.js";import{S as Q}from"./Skeleton-fe703092.js";import{C as X}from"./ClipLoader-0106d300.js";const Z=/^https:\/\/\S+\.(png|jpe?g|svg)$/;function ee(r){return!!Z.test(r)}function te(r){return r.split("_").map(d=>d.charAt(0).toUpperCase()+d.slice(1)).join(" ")}const ae=()=>{const{open:r}=x("changeNodeType"),{close:d}=x("editNodeName"),{changeNodeTypeFeatureFlag:f}=A(o=>({changeNodeTypeFeatureFlag:o.changeNodeTypeFeatureFlag})),a=F(),j=a==null?void 0:a.node_type,[m,u]=l.useState({});l.useEffect(()=>{a!=null&&a.properties&&u(a.properties)},[a]);const y=()=>{d(),r()},g=(o,n)=>{u(N=>({...N,[o]:n}))};return e.jsxs(s,{children:[e.jsx(s,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsxs(s,{align:"center",direction:"row",children:[e.jsx(oe,{children:"Edit Node"}),e.jsxs(se,{children:[e.jsx(J,{type:j}),f&&e.jsx(re,{onClick:y,children:e.jsx(K,{})})]})]})}),e.jsx(ie,{children:Object.keys(m).map(o=>e.jsxs(s,{mb:18,children:[e.jsx(ne,{style:{marginBottom:8},children:te(o)}),e.jsx(O,{id:`cy-${o}`,maxLength:50,name:`properties.${o}`,onChange:n=>g(o,n),placeholder:`Please Enter the ${o}`,rules:o==="name"?{...V}:{}})]},o))})]})},oe=c(E)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; diff --git a/build/assets/index-2f22123e.js b/build/assets/index-77dce891.js similarity index 99% rename from build/assets/index-2f22123e.js rename to build/assets/index-77dce891.js index 093417133..01a2556fe 100644 --- a/build/assets/index-2f22123e.js +++ b/build/assets/index-77dce891.js @@ -1,4 +1,4 @@ -import{G as w3,R as $1,H as o1,J as Z1,K as W2,L as N1,M as R1,O as f1,x as b,P as A1,r as L,S as O1,j as r,U as d1,V as U1,X as v3,Y as y1,Z as p1,$ as j2,a0 as k2,a1 as _3,a2 as y2,a3 as G2,c as X2,u as G1,s as D,a as U,F as O,B as Y2,C as a2,a4 as j3,a5 as k3,k as K2,b as y3,d as L3,T as r1,a6 as H3,I as M3}from"./index-17ed06be.js";function V3(e){return e?String(e).replace(/[[]{2}/g,"").replace(/[\]]{2}/g,""):""}const b3=e=>{const[t,n,i]=e.split(":"),s=parseInt(t,10),o=parseInt(n,10),l=parseInt(i,10);return s*3600+o*60+l};function L2(...e){return e.reduce((t,n)=>n==null?t:function(...s){t.apply(this,s),n.apply(this,s)},()=>{})}function Z3(e,t=166){let n;function i(...s){const o=()=>{e.apply(this,s)};clearTimeout(n),n=setTimeout(o,t)}return i.clear=()=>{clearTimeout(n)},i}function l1(e){return e&&e.ownerDocument||document}function T1(e){return l1(e).defaultView||window}function E3(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const S3=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},H2=S3,M2={disabled:!1};var I3=function(t){return t.scrollTop},E1="unmounted",c1="exited",h1="entering",k1="entered",s2="exiting",a1=function(e){w3(t,e);function t(i,s){var o;o=e.call(this,i,s)||this;var l=s,C=l&&!l.isMounting?i.enter:i.appear,a;return o.appearStatus=null,i.in?C?(a=c1,o.appearStatus=h1):a=k1:i.unmountOnExit||i.mountOnEnter?a=E1:a=c1,o.state={status:a},o.nextCallback=null,o}t.getDerivedStateFromProps=function(s,o){var l=s.in;return l&&o.status===E1?{status:c1}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(s){var o=null;if(s!==this.props){var l=this.state.status;this.props.in?l!==h1&&l!==k1&&(o=h1):(l===h1||l===k1)&&(o=s2)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var s=this.props.timeout,o,l,C;return o=l=C=s,s!=null&&typeof s!="number"&&(o=s.exit,l=s.enter,C=s.appear!==void 0?s.appear:l),{exit:o,enter:l,appear:C}},n.updateStatus=function(s,o){if(s===void 0&&(s=!1),o!==null)if(this.cancelNextCallback(),o===h1){if(this.props.unmountOnExit||this.props.mountOnEnter){var l=this.props.nodeRef?this.props.nodeRef.current:$1.findDOMNode(this);l&&I3(l)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===c1&&this.setState({status:E1})},n.performEnter=function(s){var o=this,l=this.props.enter,C=this.context?this.context.isMounting:s,a=this.props.nodeRef?[C]:[$1.findDOMNode(this),C],h=a[0],c=a[1],d=this.getTimeouts(),p=C?d.appear:d.enter;if(!s&&!l||M2.disabled){this.safeSetState({status:k1},function(){o.props.onEntered(h)});return}this.props.onEnter(h,c),this.safeSetState({status:h1},function(){o.props.onEntering(h,c),o.onTransitionEnd(p,function(){o.safeSetState({status:k1},function(){o.props.onEntered(h,c)})})})},n.performExit=function(){var s=this,o=this.props.exit,l=this.getTimeouts(),C=this.props.nodeRef?void 0:$1.findDOMNode(this);if(!o||M2.disabled){this.safeSetState({status:c1},function(){s.props.onExited(C)});return}this.props.onExit(C),this.safeSetState({status:s2},function(){s.props.onExiting(C),s.onTransitionEnd(l.exit,function(){s.safeSetState({status:c1},function(){s.props.onExited(C)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(s,o){o=this.setNextCallback(o),this.setState(s,o)},n.setNextCallback=function(s){var o=this,l=!0;return this.nextCallback=function(C){l&&(l=!1,o.nextCallback=null,s(C))},this.nextCallback.cancel=function(){l=!1},this.nextCallback},n.onTransitionEnd=function(s,o){this.setNextCallback(o);var l=this.props.nodeRef?this.props.nodeRef.current:$1.findDOMNode(this),C=s==null&&!this.props.addEndListener;if(!l||C){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[l,this.nextCallback],h=a[0],c=a[1];this.props.addEndListener(h,c)}s!=null&&setTimeout(this.nextCallback,s)},n.render=function(){var s=this.state.status;if(s===E1)return null;var o=this.props,l=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var C=o1(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Z1.createElement(W2.Provider,{value:null},typeof l=="function"?l(s,C):Z1.cloneElement(Z1.Children.only(l),C))},t}(Z1.Component);a1.contextType=W2;a1.propTypes={};function j1(){}a1.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:j1,onEntering:j1,onEntered:j1,onExit:j1,onExiting:j1,onExited:j1};a1.UNMOUNTED=E1;a1.EXITED=c1;a1.ENTERING=h1;a1.ENTERED=k1;a1.EXITING=s2;const Q2=a1,J2=e=>e.scrollTop;function F1(e,t){var n,i;const{timeout:s,easing:o,style:l={}}=e;return{duration:(n=l.transitionDuration)!=null?n:typeof s=="number"?s:s[t.mode]||0,easing:(i=l.transitionTimingFunction)!=null?i:typeof o=="object"?o[t.mode]:o,delay:l.transitionDelay}}function P3(e){return N1("MuiPaper",e)}R1("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const T3=["className","component","elevation","square","variant"],B3=e=>{const{square:t,elevation:n,variant:i,classes:s}=e,o={root:["root",i,!t&&"rounded",i==="elevation"&&`elevation${n}`]};return U1(o,P3,s)},N3=f1("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return b({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&b({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${A1("#fff",H2(t.elevation))}, ${A1("#fff",H2(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),R3=L.forwardRef(function(t,n){const i=O1({props:t,name:"MuiPaper"}),{className:s,component:o="div",elevation:l=1,square:C=!1,variant:a="elevation"}=i,h=o1(i,T3),c=b({},i,{component:o,elevation:l,square:C,variant:a}),d=B3(c);return r.jsx(N3,b({as:o,ownerState:c,className:d1(d.root,s),ref:n},h))}),O3=R3;function U3(e){return N1("MuiIconButton",e)}const $3=R1("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),z3=$3,A3=["edge","children","className","color","disabled","disableFocusRipple","size"],F3=e=>{const{classes:t,disabled:n,color:i,edge:s,size:o}=e,l={root:["root",n&&"disabled",i!=="default"&&`color${y1(i)}`,s&&`edge${y1(s)}`,`size${y1(o)}`]};return U1(l,U3,t)},D3=f1(v3,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${y1(n.color)}`],n.edge&&t[`edge${y1(n.edge)}`],t[`size${y1(n.size)}`]]}})(({theme:e,ownerState:t})=>b({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:A1(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const i=(n=(e.vars||e).palette)==null?void 0:n[t.color];return b({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&b({color:i==null?void 0:i.main},!t.disableRipple&&{"&:hover":b({},i&&{backgroundColor:e.vars?`rgba(${i.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:A1(i.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${z3.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),q3=L.forwardRef(function(t,n){const i=O1({props:t,name:"MuiIconButton"}),{edge:s=!1,children:o,className:l,color:C="default",disabled:a=!1,disableFocusRipple:h=!1,size:c="medium"}=i,d=o1(i,A3),p=b({},i,{edge:s,color:C,disabled:a,disableFocusRipple:h,size:c}),x=F3(p);return r.jsx(D3,b({className:d1(x.root,l),centerRipple:!0,focusRipple:!h,disabled:a,ref:n,ownerState:p},d,{children:o}))}),e3=q3;function t3(e){return typeof e=="string"}function W3(e,t,n){return e===void 0||t3(e)?t:b({},t,{ownerState:b({},t.ownerState,n)})}function n3(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(i=>i.match(/^on[A-Z]/)&&typeof e[i]=="function"&&!t.includes(i)).forEach(i=>{n[i]=e[i]}),n}function G3(e,t,n){return typeof e=="function"?e(t,n):e}function r3(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function X3(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:i,externalForwardedProps:s,className:o}=e;if(!t){const x=V2(n==null?void 0:n.className,o,s==null?void 0:s.className,i==null?void 0:i.className),f=b({},n==null?void 0:n.style,s==null?void 0:s.style,i==null?void 0:i.style),_=b({},n,s,i);return x.length>0&&(_.className=x),Object.keys(f).length>0&&(_.style=f),{props:_,internalRef:void 0}}const l=n3(b({},s,i)),C=b2(i),a=b2(s),h=t(l),c=V2(h==null?void 0:h.className,n==null?void 0:n.className,o,s==null?void 0:s.className,i==null?void 0:i.className),d=b({},h==null?void 0:h.style,n==null?void 0:n.style,s==null?void 0:s.style,i==null?void 0:i.style),p=b({},h,n,a,C);return c.length>0&&(p.className=c),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:h.ref}}const Y3=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function D1(e){var t;const{elementType:n,externalSlotProps:i,ownerState:s,skipResolvingSlotProps:o=!1}=e,l=o1(e,Y3),C=o?{}:G3(i,s),{props:a,internalRef:h}=X3(b({},l,{externalSlotProps:C})),c=p1(h,C==null?void 0:C.ref,(t=e.additionalProps)==null?void 0:t.ref);return W3(n,b({},a,{ref:c}),s)}const K3=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Q3(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function J3(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=i=>e.ownerDocument.querySelector(`input[type="radio"]${i}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function e5(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||J3(e))}function t5(e){const t=[],n=[];return Array.from(e.querySelectorAll(K3)).forEach((i,s)=>{const o=Q3(i);o===-1||!e5(i)||(o===0?t.push(i):n.push({documentOrder:s,tabIndex:o,node:i}))}),n.sort((i,s)=>i.tabIndex===s.tabIndex?i.documentOrder-s.documentOrder:i.tabIndex-s.tabIndex).map(i=>i.node).concat(t)}function n5(){return!0}function r5(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:i=!1,disableRestoreFocus:s=!1,getTabbable:o=t5,isEnabled:l=n5,open:C}=e,a=L.useRef(!1),h=L.useRef(null),c=L.useRef(null),d=L.useRef(null),p=L.useRef(null),x=L.useRef(!1),f=L.useRef(null),_=p1(t.ref,f),w=L.useRef(null);L.useEffect(()=>{!C||!f.current||(x.current=!n)},[n,C]),L.useEffect(()=>{if(!C||!f.current)return;const g=l1(f.current);return f.current.contains(g.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex","-1"),x.current&&f.current.focus()),()=>{s||(d.current&&d.current.focus&&(a.current=!0,d.current.focus()),d.current=null)}},[C]),L.useEffect(()=>{if(!C||!f.current)return;const g=l1(f.current),v=y=>{w.current=y,!(i||!l()||y.key!=="Tab")&&g.activeElement===f.current&&y.shiftKey&&(a.current=!0,c.current&&c.current.focus())},m=()=>{const y=f.current;if(y===null)return;if(!g.hasFocus()||!l()||a.current){a.current=!1;return}if(y.contains(g.activeElement)||i&&g.activeElement!==h.current&&g.activeElement!==c.current)return;if(g.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!x.current)return;let H=[];if((g.activeElement===h.current||g.activeElement===c.current)&&(H=o(f.current)),H.length>0){var M,S;const P=!!((M=w.current)!=null&&M.shiftKey&&((S=w.current)==null?void 0:S.key)==="Tab"),V=H[0],$=H[H.length-1];typeof V!="string"&&typeof $!="string"&&(P?$.focus():V.focus())}else y.focus()};g.addEventListener("focusin",m),g.addEventListener("keydown",v,!0);const k=setInterval(()=>{g.activeElement&&g.activeElement.tagName==="BODY"&&m()},50);return()=>{clearInterval(k),g.removeEventListener("focusin",m),g.removeEventListener("keydown",v,!0)}},[n,i,s,l,C,o]);const u=g=>{d.current===null&&(d.current=g.relatedTarget),x.current=!0,p.current=g.target;const v=t.props.onFocus;v&&v(g)},j=g=>{d.current===null&&(d.current=g.relatedTarget),x.current=!0};return r.jsxs(L.Fragment,{children:[r.jsx("div",{tabIndex:C?0:-1,onFocus:j,ref:h,"data-testid":"sentinelStart"}),L.cloneElement(t,{ref:_,onFocus:u}),r.jsx("div",{tabIndex:C?0:-1,onFocus:j,ref:c,"data-testid":"sentinelEnd"})]})}function i5(e){return typeof e=="function"?e():e}const s5=L.forwardRef(function(t,n){const{children:i,container:s,disablePortal:o=!1}=t,[l,C]=L.useState(null),a=p1(L.isValidElement(i)?i.ref:null,n);if(j2(()=>{o||C(i5(s)||document.body)},[s,o]),j2(()=>{if(l&&!o)return k2(n,l),()=>{k2(n,null)}},[n,l,o]),o){if(L.isValidElement(i)){const h={ref:a};return L.cloneElement(i,h)}return r.jsx(L.Fragment,{children:i})}return r.jsx(L.Fragment,{children:l&&_3.createPortal(i,l)})});function o5(e){const t=l1(e);return t.body===e?T1(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function P1(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Z2(e){return parseInt(T1(e).getComputedStyle(e).paddingRight,10)||0}function l5(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,i=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||i}function E2(e,t,n,i,s){const o=[t,n,...i];[].forEach.call(e.children,l=>{const C=o.indexOf(l)===-1,a=!l5(l);C&&a&&P1(l,s)})}function Q1(e,t){let n=-1;return e.some((i,s)=>t(i)?(n=s,!0):!1),n}function C5(e,t){const n=[],i=e.container;if(!t.disableScrollLock){if(o5(i)){const l=E3(l1(i));n.push({value:i.style.paddingRight,property:"padding-right",el:i}),i.style.paddingRight=`${Z2(i)+l}px`;const C=l1(i).querySelectorAll(".mui-fixed");[].forEach.call(C,a=>{n.push({value:a.style.paddingRight,property:"padding-right",el:a}),a.style.paddingRight=`${Z2(a)+l}px`})}let o;if(i.parentNode instanceof DocumentFragment)o=l1(i).body;else{const l=i.parentElement,C=T1(i);o=(l==null?void 0:l.nodeName)==="HTML"&&C.getComputedStyle(l).overflowY==="scroll"?l:i}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:l,property:C})=>{o?l.style.setProperty(C,o):l.style.removeProperty(C)})}}function a5(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class c5{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let i=this.modals.indexOf(t);if(i!==-1)return i;i=this.modals.length,this.modals.push(t),t.modalRef&&P1(t.modalRef,!1);const s=a5(n);E2(n,t.mount,t.modalRef,s,!0);const o=Q1(this.containers,l=>l.container===n);return o!==-1?(this.containers[o].modals.push(t),i):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:s}),i)}mount(t,n){const i=Q1(this.containers,o=>o.modals.indexOf(t)!==-1),s=this.containers[i];s.restore||(s.restore=C5(s,n))}remove(t,n=!0){const i=this.modals.indexOf(t);if(i===-1)return i;const s=Q1(this.containers,l=>l.modals.indexOf(t)!==-1),o=this.containers[s];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(i,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&P1(t.modalRef,n),E2(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(s,1);else{const l=o.modals[o.modals.length-1];l.modalRef&&P1(l.modalRef,!1)}return i}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function h5(e){return typeof e=="function"?e():e}function d5(e){return e?e.props.hasOwnProperty("in"):!1}const u5=new c5;function f5(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:i=!1,manager:s=u5,closeAfterTransition:o=!1,onTransitionEnter:l,onTransitionExited:C,children:a,onClose:h,open:c,rootRef:d}=e,p=L.useRef({}),x=L.useRef(null),f=L.useRef(null),_=p1(f,d),[w,u]=L.useState(!c),j=d5(a);let g=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(g=!1);const v=()=>l1(x.current),m=()=>(p.current.modalRef=f.current,p.current.mount=x.current,p.current),k=()=>{s.mount(m(),{disableScrollLock:i}),f.current&&(f.current.scrollTop=0)},y=y2(()=>{const E=h5(t)||v().body;s.add(m(),E),f.current&&k()}),H=L.useCallback(()=>s.isTopModal(m()),[s]),M=y2(E=>{x.current=E,E&&(c&&H()?k():f.current&&P1(f.current,g))}),S=L.useCallback(()=>{s.remove(m(),g)},[g,s]);L.useEffect(()=>()=>{S()},[S]),L.useEffect(()=>{c?y():(!j||!o)&&S()},[c,S,j,o,y]);const P=E=>I=>{var q;(q=E.onKeyDown)==null||q.call(E,I),!(I.key!=="Escape"||I.which===229||!H())&&(n||(I.stopPropagation(),h&&h(I,"escapeKeyDown")))},V=E=>I=>{var q;(q=E.onClick)==null||q.call(E,I),I.target===I.currentTarget&&h&&h(I,"backdropClick")};return{getRootProps:(E={})=>{const I=n3(e);delete I.onTransitionEnter,delete I.onTransitionExited;const q=b({},I,E);return b({role:"presentation"},q,{onKeyDown:P(q),ref:_})},getBackdropProps:(E={})=>{const I=E;return b({"aria-hidden":!0},I,{onClick:V(I),open:c})},getTransitionProps:()=>{const E=()=>{u(!1),l&&l()},I=()=>{u(!0),C&&C(),o&&S()};return{onEnter:L2(E,a==null?void 0:a.props.onEnter),onExited:L2(I,a==null?void 0:a.props.onExited)}},rootRef:_,portalRef:M,isTopModal:H,exited:w,hasTransition:j}}const p5=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],x5={entering:{opacity:1},entered:{opacity:1}},g5=L.forwardRef(function(t,n){const i=G2(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{addEndListener:o,appear:l=!0,children:C,easing:a,in:h,onEnter:c,onEntered:d,onEntering:p,onExit:x,onExited:f,onExiting:_,style:w,timeout:u=s,TransitionComponent:j=Q2}=t,g=o1(t,p5),v=L.useRef(null),m=p1(v,C.ref,n),k=T=>Z=>{if(T){const E=v.current;Z===void 0?T(E):T(E,Z)}},y=k(p),H=k((T,Z)=>{J2(T);const E=F1({style:w,timeout:u,easing:a},{mode:"enter"});T.style.webkitTransition=i.transitions.create("opacity",E),T.style.transition=i.transitions.create("opacity",E),c&&c(T,Z)}),M=k(d),S=k(_),P=k(T=>{const Z=F1({style:w,timeout:u,easing:a},{mode:"exit"});T.style.webkitTransition=i.transitions.create("opacity",Z),T.style.transition=i.transitions.create("opacity",Z),x&&x(T)}),V=k(f),$=T=>{o&&o(v.current,T)};return r.jsx(j,b({appear:l,in:h,nodeRef:v,onEnter:H,onEntered:M,onEntering:y,onExit:P,onExited:V,onExiting:S,addEndListener:$,timeout:u},g,{children:(T,Z)=>L.cloneElement(C,b({style:b({opacity:0,visibility:T==="exited"&&!h?"hidden":void 0},x5[T],w,C.props.style),ref:m},Z))}))}),m5=g5;function w5(e){return N1("MuiBackdrop",e)}R1("MuiBackdrop",["root","invisible"]);const v5=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],_5=e=>{const{classes:t,invisible:n}=e;return U1({root:["root",n&&"invisible"]},w5,t)},j5=f1("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>b({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),k5=L.forwardRef(function(t,n){var i,s,o;const l=O1({props:t,name:"MuiBackdrop"}),{children:C,className:a,component:h="div",components:c={},componentsProps:d={},invisible:p=!1,open:x,slotProps:f={},slots:_={},TransitionComponent:w=m5,transitionDuration:u}=l,j=o1(l,v5),g=b({},l,{component:h,invisible:p}),v=_5(g),m=(i=f.root)!=null?i:d.root;return r.jsx(w,b({in:x,timeout:u},j,{children:r.jsx(j5,b({"aria-hidden":!0},m,{as:(s=(o=_.root)!=null?o:c.Root)!=null?s:h,className:d1(v.root,a,m==null?void 0:m.className),ownerState:b({},g,m==null?void 0:m.ownerState),classes:v,ref:n,children:C}))}))}),y5=k5;function L5(e){return N1("MuiModal",e)}R1("MuiModal",["root","hidden","backdrop"]);const H5=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],M5=e=>{const{open:t,exited:n,classes:i}=e;return U1({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},L5,i)},V5=f1("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>b({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),b5=f1(y5,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Z5=L.forwardRef(function(t,n){var i,s,o,l,C,a;const h=O1({name:"MuiModal",props:t}),{BackdropComponent:c=b5,BackdropProps:d,className:p,closeAfterTransition:x=!1,children:f,container:_,component:w,components:u={},componentsProps:j={},disableAutoFocus:g=!1,disableEnforceFocus:v=!1,disableEscapeKeyDown:m=!1,disablePortal:k=!1,disableRestoreFocus:y=!1,disableScrollLock:H=!1,hideBackdrop:M=!1,keepMounted:S=!1,onBackdropClick:P,open:V,slotProps:$,slots:T}=h,Z=o1(h,H5),E=b({},h,{closeAfterTransition:x,disableAutoFocus:g,disableEnforceFocus:v,disableEscapeKeyDown:m,disablePortal:k,disableRestoreFocus:y,disableScrollLock:H,hideBackdrop:M,keepMounted:S}),{getRootProps:I,getBackdropProps:q,getTransitionProps:R,portalRef:Y,isTopModal:z,exited:A,hasTransition:t1}=f5(b({},E,{rootRef:n})),G=b({},E,{exited:A}),F=M5(G),g1={};if(f.props.tabIndex===void 0&&(g1.tabIndex="-1"),t1){const{onEnter:B,onExited:W}=R();g1.onEnter=B,g1.onExited=W}const m1=(i=(s=T==null?void 0:T.root)!=null?s:u.Root)!=null?i:V5,H1=(o=(l=T==null?void 0:T.backdrop)!=null?l:u.Backdrop)!=null?o:c,M1=(C=$==null?void 0:$.root)!=null?C:j.root,w1=(a=$==null?void 0:$.backdrop)!=null?a:j.backdrop,Y1=D1({elementType:m1,externalSlotProps:M1,externalForwardedProps:Z,getSlotProps:I,additionalProps:{ref:n,as:w},ownerState:G,className:d1(p,M1==null?void 0:M1.className,F==null?void 0:F.root,!G.open&&G.exited&&(F==null?void 0:F.hidden))}),K1=D1({elementType:H1,externalSlotProps:w1,additionalProps:d,getSlotProps:B=>q(b({},B,{onClick:W=>{P&&P(W),B!=null&&B.onClick&&B.onClick(W)}})),className:d1(w1==null?void 0:w1.className,d==null?void 0:d.className,F==null?void 0:F.backdrop),ownerState:G});return!S&&!V&&(!t1||A)?null:r.jsx(s5,{ref:Y,container:_,disablePortal:k,children:r.jsxs(m1,b({},Y1,{children:[!M&&c?r.jsx(H1,b({},K1)):null,r.jsx(r5,{disableEnforceFocus:v,disableAutoFocus:g,disableRestoreFocus:y,isEnabled:z,open:V,children:L.cloneElement(f,g1)})]}))})}),E5=Z5,S5=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function o2(e){return`scale(${e}, ${e**2})`}const I5={entering:{opacity:1,transform:o2(1)},entered:{opacity:1,transform:"none"}},J1=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),i3=L.forwardRef(function(t,n){const{addEndListener:i,appear:s=!0,children:o,easing:l,in:C,onEnter:a,onEntered:h,onEntering:c,onExit:d,onExited:p,onExiting:x,style:f,timeout:_="auto",TransitionComponent:w=Q2}=t,u=o1(t,S5),j=L.useRef(),g=L.useRef(),v=G2(),m=L.useRef(null),k=p1(m,o.ref,n),y=Z=>E=>{if(Z){const I=m.current;E===void 0?Z(I):Z(I,E)}},H=y(c),M=y((Z,E)=>{J2(Z);const{duration:I,delay:q,easing:R}=F1({style:f,timeout:_,easing:l},{mode:"enter"});let Y;_==="auto"?(Y=v.transitions.getAutoHeightDuration(Z.clientHeight),g.current=Y):Y=I,Z.style.transition=[v.transitions.create("opacity",{duration:Y,delay:q}),v.transitions.create("transform",{duration:J1?Y:Y*.666,delay:q,easing:R})].join(","),a&&a(Z,E)}),S=y(h),P=y(x),V=y(Z=>{const{duration:E,delay:I,easing:q}=F1({style:f,timeout:_,easing:l},{mode:"exit"});let R;_==="auto"?(R=v.transitions.getAutoHeightDuration(Z.clientHeight),g.current=R):R=E,Z.style.transition=[v.transitions.create("opacity",{duration:R,delay:I}),v.transitions.create("transform",{duration:J1?R:R*.666,delay:J1?I:I||R*.333,easing:q})].join(","),Z.style.opacity=0,Z.style.transform=o2(.75),d&&d(Z)}),$=y(p),T=Z=>{_==="auto"&&(j.current=setTimeout(Z,g.current||0)),i&&i(m.current,Z)};return L.useEffect(()=>()=>{clearTimeout(j.current)},[]),r.jsx(w,b({appear:s,in:C,nodeRef:m,onEnter:M,onEntered:S,onEntering:H,onExit:V,onExited:$,onExiting:P,addEndListener:T,timeout:_==="auto"?null:_},u,{children:(Z,E)=>L.cloneElement(o,b({style:b({opacity:0,transform:o2(.75),visibility:Z==="exited"&&!C?"hidden":void 0},I5[Z],f,o.props.style),ref:k},E))}))});i3.muiSupportAuto=!0;const P5=i3;function T5(e){return N1("MuiPopover",e)}R1("MuiPopover",["root","paper"]);const B5=["onEntering"],N5=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],R5=["slotProps"];function S2(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function I2(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function P2(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function e2(e){return typeof e=="function"?e():e}const O5=e=>{const{classes:t}=e;return U1({root:["root"],paper:["paper"]},T5,t)},U5=f1(E5,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),$5=f1(O3,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),z5=L.forwardRef(function(t,n){var i,s,o;const l=O1({props:t,name:"MuiPopover"}),{action:C,anchorEl:a,anchorOrigin:h={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:d="anchorEl",children:p,className:x,container:f,elevation:_=8,marginThreshold:w=16,open:u,PaperProps:j={},slots:g,slotProps:v,transformOrigin:m={vertical:"top",horizontal:"left"},TransitionComponent:k=P5,transitionDuration:y="auto",TransitionProps:{onEntering:H}={},disableScrollLock:M=!1}=l,S=o1(l.TransitionProps,B5),P=o1(l,N5),V=(i=v==null?void 0:v.paper)!=null?i:j,$=L.useRef(),T=p1($,V.ref),Z=b({},l,{anchorOrigin:h,anchorReference:d,elevation:_,marginThreshold:w,externalPaperSlotProps:V,transformOrigin:m,TransitionComponent:k,transitionDuration:y,TransitionProps:S}),E=O5(Z),I=L.useCallback(()=>{if(d==="anchorPosition")return c;const B=e2(a),n1=(B&&B.nodeType===1?B:l1($.current).body).getBoundingClientRect();return{top:n1.top+S2(n1,h.vertical),left:n1.left+I2(n1,h.horizontal)}},[a,h.horizontal,h.vertical,c,d]),q=L.useCallback(B=>({vertical:S2(B,m.vertical),horizontal:I2(B,m.horizontal)}),[m.horizontal,m.vertical]),R=L.useCallback(B=>{const W={width:B.offsetWidth,height:B.offsetHeight},n1=q(W);if(d==="none")return{top:null,left:null,transformOrigin:P2(n1)};const x2=I();let v1=x2.top-n1.vertical,_1=x2.left-n1.horizontal;const g2=v1+W.height,m2=_1+W.width,w2=T1(e2(a)),v2=w2.innerHeight-w,_2=w2.innerWidth-w;if(w!==null&&v1v2){const s1=g2-v2;v1-=s1,n1.vertical+=s1}if(w!==null&&_1_2){const s1=m2-_2;_1-=s1,n1.horizontal+=s1}return{top:`${Math.round(v1)}px`,left:`${Math.round(_1)}px`,transformOrigin:P2(n1)}},[a,d,I,q,w]),[Y,z]=L.useState(u),A=L.useCallback(()=>{const B=$.current;if(!B)return;const W=R(B);W.top!==null&&(B.style.top=W.top),W.left!==null&&(B.style.left=W.left),B.style.transformOrigin=W.transformOrigin,z(!0)},[R]);L.useEffect(()=>(M&&window.addEventListener("scroll",A),()=>window.removeEventListener("scroll",A)),[a,M,A]);const t1=(B,W)=>{H&&H(B,W),A()},G=()=>{z(!1)};L.useEffect(()=>{u&&A()}),L.useImperativeHandle(C,()=>u?{updatePosition:()=>{A()}}:null,[u,A]),L.useEffect(()=>{if(!u)return;const B=Z3(()=>{A()}),W=T1(a);return W.addEventListener("resize",B),()=>{B.clear(),W.removeEventListener("resize",B)}},[a,u,A]);let F=y;y==="auto"&&!k.muiSupportAuto&&(F=void 0);const g1=f||(a?l1(e2(a)).body:void 0),m1=(s=g==null?void 0:g.root)!=null?s:U5,H1=(o=g==null?void 0:g.paper)!=null?o:$5,M1=D1({elementType:H1,externalSlotProps:b({},V,{style:Y?V.style:b({},V.style,{opacity:0})}),additionalProps:{elevation:_,ref:T},ownerState:Z,className:d1(E.paper,V==null?void 0:V.className)}),w1=D1({elementType:m1,externalSlotProps:(v==null?void 0:v.root)||{},externalForwardedProps:P,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:g1,open:u},ownerState:Z,className:d1(E.root,x)}),{slotProps:Y1}=w1,K1=o1(w1,R5);return r.jsx(m1,b({},K1,!t3(m1)&&{slotProps:Y1,disableScrollLock:M},{children:r.jsx(k,b({appear:!0,in:u,onEntering:t1,onExited:G,timeout:F},S,{children:r.jsx(H1,b({},M1,{children:p}))}))}))}),z7=z5;function A5(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,s]of e)if(!Object.is(s,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let i=0;i{const i=e(n);return A5(t.current,i)?t.current:t.current=i}}const q5=e=>r.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:r.jsxs("g",{id:"bubble_chart",children:[r.jsx("mask",{id:"mask0_1551_42",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:r.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),r.jsx("g",{mask:"url(#mask0_1551_42)",children:r.jsx("path",{id:"bubble_chart_2",d:"M5.83333 15C4.91667 15 4.13194 14.6736 3.47917 14.0208C2.82639 13.3681 2.5 12.5833 2.5 11.6667C2.5 10.75 2.82639 9.96528 3.47917 9.3125C4.13194 8.65972 4.91667 8.33333 5.83333 8.33333C6.75 8.33333 7.53472 8.65972 8.1875 9.3125C8.84028 9.96528 9.16667 10.75 9.16667 11.6667C9.16667 12.5833 8.84028 13.3681 8.1875 14.0208C7.53472 14.6736 6.75 15 5.83333 15ZM13.75 11.6667C12.4722 11.6667 11.3889 11.2222 10.5 10.3333C9.61111 9.44444 9.16667 8.36111 9.16667 7.08333C9.16667 5.80556 9.61111 4.72222 10.5 3.83333C11.3889 2.94444 12.4722 2.5 13.75 2.5C15.0278 2.5 16.1111 2.94444 17 3.83333C17.8889 4.72222 18.3333 5.80556 18.3333 7.08333C18.3333 8.36111 17.8889 9.44444 17 10.3333C16.1111 11.2222 15.0278 11.6667 13.75 11.6667ZM12.0833 17.5C11.3889 17.5 10.7986 17.2569 10.3125 16.7708C9.82639 16.2847 9.58333 15.6944 9.58333 15C9.58333 14.3056 9.82639 13.7153 10.3125 13.2292C10.7986 12.7431 11.3889 12.5 12.0833 12.5C12.7778 12.5 13.3681 12.7431 13.8542 13.2292C14.3403 13.7153 14.5833 14.3056 14.5833 15C14.5833 15.6944 14.3403 16.2847 13.8542 16.7708C13.3681 17.2569 12.7778 17.5 12.0833 17.5Z",fill:"currentColor"})})]})}),W5=e=>r.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:r.jsxs("g",{id:"communities",children:[r.jsx("mask",{id:"mask0_1551_39",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:r.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),r.jsx("g",{mask:"url(#mask0_1551_39)",children:r.jsx("path",{id:"communities_2",d:"M7.50002 13.125C7.90494 13.125 8.24921 12.9832 8.53285 12.6995C8.81651 12.4159 8.95833 12.0716 8.95833 11.6667C8.95833 11.2618 8.81651 10.9175 8.53285 10.6339C8.24921 10.3502 7.90494 10.2084 7.50002 10.2084C7.0951 10.2084 6.75083 10.3502 6.46719 10.6339C6.18353 10.9175 6.04171 11.2618 6.04171 11.6667C6.04171 12.0716 6.18353 12.4159 6.46719 12.6995C6.75083 12.9832 7.0951 13.125 7.50002 13.125ZM12.5 13.125C12.9049 13.125 13.2492 12.9832 13.5329 12.6995C13.8165 12.4159 13.9583 12.0716 13.9583 11.6667C13.9583 11.2618 13.8165 10.9175 13.5329 10.6339C13.2492 10.3502 12.9049 10.2084 12.5 10.2084C12.0951 10.2084 11.7508 10.3502 11.4672 10.6339C11.1835 10.9175 11.0417 11.2618 11.0417 11.6667C11.0417 12.0716 11.1835 12.4159 11.4672 12.6995C11.7508 12.9832 12.0951 13.125 12.5 13.125ZM10 8.95833C10.4049 8.95833 10.7492 8.81651 11.0329 8.53285C11.3165 8.24922 11.4583 7.90494 11.4583 7.50002C11.4583 7.0951 11.3165 6.75083 11.0329 6.46719C10.7492 6.18354 10.4049 6.04171 10 6.04171C9.5951 6.04171 9.25083 6.18354 8.96719 6.46719C8.68354 6.75083 8.54171 7.0951 8.54171 7.50002C8.54171 7.90494 8.68354 8.24922 8.96719 8.53285C9.25083 8.81651 9.5951 8.95833 10 8.95833ZM10.0014 17.9167C8.90647 17.9167 7.87728 17.7089 6.91383 17.2933C5.95037 16.8778 5.1123 16.3138 4.39962 15.6015C3.68693 14.8891 3.12271 14.0514 2.70698 13.0884C2.29124 12.1253 2.08337 11.0964 2.08337 10.0014C2.08337 8.90647 2.29115 7.87728 2.70671 6.91383C3.12226 5.95037 3.68622 5.11231 4.39858 4.39963C5.11096 3.68693 5.94866 3.12272 6.91169 2.70698C7.8747 2.29124 8.90368 2.08337 9.99862 2.08337C11.0936 2.08337 12.1228 2.29115 13.0862 2.70671C14.0497 3.12226 14.8877 3.68622 15.6004 4.39858C16.3131 5.11096 16.8773 5.94866 17.2931 6.91169C17.7088 7.8747 17.9167 8.90368 17.9167 9.99863C17.9167 11.0936 17.7089 12.1228 17.2933 13.0862C16.8778 14.0497 16.3138 14.8877 15.6015 15.6004C14.8891 16.3131 14.0514 16.8773 13.0884 17.2931C12.1253 17.7088 11.0964 17.9167 10.0014 17.9167ZM10 16.6667C11.8611 16.6667 13.4375 16.0209 14.7292 14.7292C16.0209 13.4375 16.6667 11.8611 16.6667 10C16.6667 8.13891 16.0209 6.56252 14.7292 5.27085C13.4375 3.97919 11.8611 3.33335 10 3.33335C8.13891 3.33335 6.56252 3.97919 5.27085 5.27085C3.97919 6.56252 3.33335 8.13891 3.33335 10C3.33335 11.8611 3.97919 13.4375 5.27085 14.7292C6.56252 16.0209 8.13891 16.6667 10 16.6667Z",fill:"currentColor"})})]})}),G5=e=>r.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:r.jsxs("g",{id:"grain",children:[r.jsx("mask",{id:"mask0_1551_45",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:r.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),r.jsx("g",{mask:"url(#mask0_1551_45)",children:r.jsx("path",{id:"grain_2",d:"M4.99999 16.5064C4.57906 16.5064 4.22276 16.3605 3.93109 16.0689C3.63942 15.7772 3.49359 15.4209 3.49359 15C3.49359 14.5791 3.63942 14.2228 3.93109 13.9311C4.22276 13.6394 4.57906 13.4936 4.99999 13.4936C5.42092 13.4936 5.77722 13.6394 6.06888 13.9311C6.36055 14.2228 6.50638 14.5791 6.50638 15C6.50638 15.4209 6.36055 15.7772 6.06888 16.0689C5.77722 16.3605 5.42092 16.5064 4.99999 16.5064ZM11.6667 16.5064C11.2457 16.5064 10.8894 16.3605 10.5978 16.0689C10.3061 15.7772 10.1603 15.4209 10.1603 15C10.1603 14.5791 10.3061 14.2228 10.5978 13.9311C10.8894 13.6394 11.2457 13.4936 11.6667 13.4936C12.0876 13.4936 12.4439 13.6394 12.7355 13.9311C13.0272 14.2228 13.1731 14.5791 13.1731 15C13.1731 15.4209 13.0272 15.7772 12.7355 16.0689C12.4439 16.3605 12.0876 16.5064 11.6667 16.5064ZM8.33332 13.1731C7.91239 13.1731 7.55609 13.0272 7.26442 12.7355C6.97276 12.4439 6.82692 12.0876 6.82692 11.6667C6.82692 11.2457 6.97276 10.8894 7.26442 10.5978C7.55609 10.3061 7.91239 10.1603 8.33332 10.1603C8.75425 10.1603 9.11055 10.3061 9.40222 10.5978C9.69388 10.8894 9.83972 11.2457 9.83972 11.6667C9.83972 12.0876 9.69388 12.4439 9.40222 12.7355C9.11055 13.0272 8.75425 13.1731 8.33332 13.1731ZM15 13.1731C14.5791 13.1731 14.2228 13.0272 13.9311 12.7355C13.6394 12.4439 13.4936 12.0876 13.4936 11.6667C13.4936 11.2457 13.6394 10.8894 13.9311 10.5978C14.2228 10.3061 14.5791 10.1603 15 10.1603C15.4209 10.1603 15.7772 10.3061 16.0689 10.5978C16.3605 10.8894 16.5064 11.2457 16.5064 11.6667C16.5064 12.0876 16.3605 12.4439 16.0689 12.7355C15.7772 13.0272 15.4209 13.1731 15 13.1731ZM4.99999 9.83972C4.57906 9.83972 4.22276 9.69388 3.93109 9.40222C3.63942 9.11055 3.49359 8.75425 3.49359 8.33332C3.49359 7.91239 3.63942 7.55609 3.93109 7.26442C4.22276 6.97276 4.57906 6.82692 4.99999 6.82692C5.42092 6.82692 5.77722 6.97276 6.06888 7.26442C6.36055 7.55609 6.50638 7.91239 6.50638 8.33332C6.50638 8.75425 6.36055 9.11055 6.06888 9.40222C5.77722 9.69388 5.42092 9.83972 4.99999 9.83972ZM11.6667 9.83972C11.2457 9.83972 10.8894 9.69388 10.5978 9.40222C10.3061 9.11055 10.1603 8.75425 10.1603 8.33332C10.1603 7.91239 10.3061 7.55609 10.5978 7.26442C10.8894 6.97276 11.2457 6.82692 11.6667 6.82692C12.0876 6.82692 12.4439 6.97276 12.7355 7.26442C13.0272 7.55609 13.1731 7.91239 13.1731 8.33332C13.1731 8.75425 13.0272 9.11055 12.7355 9.40222C12.4439 9.69388 12.0876 9.83972 11.6667 9.83972ZM8.33332 6.50638C7.91239 6.50638 7.55609 6.36055 7.26442 6.06888C6.97276 5.77722 6.82692 5.42092 6.82692 4.99999C6.82692 4.57906 6.97276 4.22276 7.26442 3.93109C7.55609 3.63942 7.91239 3.49359 8.33332 3.49359C8.75425 3.49359 9.11055 3.63942 9.40222 3.93109C9.69388 4.22276 9.83972 4.57906 9.83972 4.99999C9.83972 5.42092 9.69388 5.77722 9.40222 6.06888C9.11055 6.36055 8.75425 6.50638 8.33332 6.50638ZM15 6.50638C14.5791 6.50638 14.2228 6.36055 13.9311 6.06888C13.6394 5.77722 13.4936 5.42092 13.4936 4.99999C13.4936 4.57906 13.6394 4.22276 13.9311 3.93109C14.2228 3.63942 14.5791 3.49359 15 3.49359C15.4209 3.49359 15.7772 3.63942 16.0689 3.93109C16.3605 4.22276 16.5064 4.57906 16.5064 4.99999C16.5064 5.42092 16.3605 5.77722 16.0689 6.06888C15.7772 6.36055 15.4209 6.50638 15 6.50638Z",fill:"currentColor"})})]})}),X5=e=>r.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:r.jsxs("g",{id:"public",children:[r.jsx("mask",{id:"mask0_1551_36",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:r.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),r.jsx("g",{mask:"url(#mask0_1551_36)",children:r.jsx("path",{id:"public_2",d:"M10.0028 17.5C8.96567 17.5 7.9906 17.3032 7.07758 16.9096C6.16457 16.516 5.37037 15.9818 4.69498 15.3071C4.0196 14.6323 3.48493 13.8389 3.09096 12.9267C2.69699 12.0145 2.5 11.0399 2.5 10.0028C2.5 8.96567 2.6968 7.9906 3.0904 7.07758C3.48401 6.16457 4.01819 5.37037 4.69294 4.69498C5.36769 4.0196 6.16114 3.48493 7.07329 3.09096C7.98546 2.69699 8.9601 2.5 9.99721 2.5C11.0343 2.5 12.0094 2.6968 12.9224 3.0904C13.8354 3.48401 14.6296 4.01819 15.305 4.69294C15.9804 5.36769 16.5151 6.16114 16.909 7.07329C17.303 7.98546 17.5 8.9601 17.5 9.99721C17.5 11.0343 17.3032 12.0094 16.9096 12.9224C16.516 13.8354 15.9818 14.6296 15.3071 15.305C14.6323 15.9804 13.8389 16.5151 12.9267 16.909C12.0145 17.303 11.0399 17.5 10.0028 17.5ZM9.16667 16.625V15C8.70833 15 8.31597 14.8368 7.98958 14.5104C7.66319 14.184 7.5 13.7917 7.5 13.3333V12.5L3.5 8.5C3.45833 8.75 3.42014 9 3.38542 9.25C3.35069 9.5 3.33333 9.75 3.33333 10C3.33333 11.6806 3.88542 13.1528 4.98958 14.4167C6.09375 15.6806 7.48611 16.4167 9.16667 16.625ZM14.9167 14.5C15.1944 14.1944 15.4444 13.8646 15.6667 13.5104C15.8889 13.1562 16.0729 12.7882 16.2187 12.4062C16.3646 12.0243 16.4757 11.6319 16.5521 11.2292C16.6285 10.8264 16.6667 10.4167 16.6667 10C16.6667 8.63083 16.2909 7.38042 15.5393 6.24877C14.7877 5.11712 13.7746 4.30129 12.5 3.80129V4.16667C12.5 4.625 12.3368 5.01736 12.0104 5.34375C11.684 5.67014 11.2917 5.83333 10.8333 5.83333H9.16667V7.5C9.16667 7.73611 9.08681 7.93403 8.92708 8.09375C8.76736 8.25347 8.56944 8.33333 8.33333 8.33333H6.66667V10H11.6667C11.9028 10 12.1007 10.0799 12.2604 10.2396C12.4201 10.3993 12.5 10.5972 12.5 10.8333V13.3333H13.3333C13.6944 13.3333 14.0208 13.441 14.3125 13.6562C14.6042 13.8715 14.8056 14.1528 14.9167 14.5Z",fill:"currentColor"})})]})});function T2(e,t,n){var i,s=1;e==null&&(e=0),t==null&&(t=0),n==null&&(n=0);function o(){var l,C=i.length,a,h=0,c=0,d=0;for(l=0;l=(a=(l+C)/2))?l=a:C=a,i=s,!(s=s[d=+c]))return i[d]=o,e;if(h=+e._x.call(null,s.data),t===h)return o.next=s,i?i[d]=o:e._root=o,e;do i=i?i[d]=new Array(2):e._root=new Array(2),(c=t>=(a=(l+C)/2))?l=a:C=a;while((d=+c)==(p=+(h>=a)));return i[p]=s,i[d]=o,e}function K5(e){Array.isArray(e)||(e=Array.from(e));const t=e.length,n=new Float64Array(t);let i=1/0,s=-1/0;for(let o=0,l;os&&(s=l));if(i>s)return this;this.cover(i).cover(s);for(let o=0;oe||e>=n;)switch(l=+(el||(o=h.x1)=d))&&(h=C[C.length-1],C[C.length-1]=C[C.length-1-c],C[C.length-1-c]=h)}else{var p=Math.abs(e-+this._x.call(null,a.data));p=(h=(l+C)/2))?l=h:C=h,t=n,!(n=n[d=+c]))return this;if(!n.length)break;t[d+1&1]&&(i=t,p=d)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,s?(o?s.next=o:delete s.next,this):t?(o?t[d]=o:delete t[d],(n=t[0]||t[1])&&n===(t[1]||t[0])&&!n.length&&(i?i[p]=n:this._root=n),this):(this._root=o,this)}function r0(e){for(var t=0,n=e.length;t=(d=(C+h)/2))?C=d:h=d,(w=n>=(p=(a+c)/2))?a=p:c=p,s=o,!(o=o[u=w<<1|_]))return s[u]=l,e;if(x=+e._x.call(null,o.data),f=+e._y.call(null,o.data),t===x&&n===f)return l.next=o,s?s[u]=l:e._root=l,e;do s=s?s[u]=new Array(4):e._root=new Array(4),(_=t>=(d=(C+h)/2))?C=d:h=d,(w=n>=(p=(a+c)/2))?a=p:c=p;while((u=w<<1|_)===(j=(f>=p)<<1|x>=d));return s[j]=o,s[u]=l,e}function h0(e){var t,n,i=e.length,s,o,l=new Array(i),C=new Array(i),a=1/0,h=1/0,c=-1/0,d=-1/0;for(n=0;nc&&(c=s),od&&(d=o));if(a>c||h>d)return this;for(this.cover(a,h).cover(c,d),n=0;ne||e>=s||i>t||t>=o;)switch(h=(tc||(C=f.y0)>d||(a=f.x1)=u)<<1|e>=w)&&(f=p[p.length-1],p[p.length-1]=p[p.length-1-_],p[p.length-1-_]=f)}else{var j=e-+this._x.call(null,x.data),g=t-+this._y.call(null,x.data),v=j*j+g*g;if(v=(p=(l+a)/2))?l=p:a=p,(_=d>=(x=(C+h)/2))?C=x:h=x,t=n,!(n=n[w=_<<1|f]))return this;if(!n.length)break;(t[w+1&3]||t[w+2&3]||t[w+3&3])&&(i=t,u=w)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,s?(o?s.next=o:delete s.next,this):t?(o?t[w]=o:delete t[w],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(i?i[u]=n:this._root=n),this):(this._root=o,this)}function g0(e){for(var t=0,n=e.length;t=(f=(a+d)/2))?a=f:d=f,(m=n>=(_=(h+p)/2))?h=_:p=_,(k=i>=(w=(c+x)/2))?c=w:x=w,o=l,!(l=l[y=k<<2|m<<1|v]))return o[y]=C,e;if(u=+e._x.call(null,l.data),j=+e._y.call(null,l.data),g=+e._z.call(null,l.data),t===u&&n===j&&i===g)return C.next=l,o?o[y]=C:e._root=C,e;do o=o?o[y]=new Array(8):e._root=new Array(8),(v=t>=(f=(a+d)/2))?a=f:d=f,(m=n>=(_=(h+p)/2))?h=_:p=_,(k=i>=(w=(c+x)/2))?c=w:x=w;while((y=k<<2|m<<1|v)===(H=(g>=w)<<2|(j>=_)<<1|u>=f));return o[H]=l,o[y]=C,e}function M0(e){Array.isArray(e)||(e=Array.from(e));const t=e.length,n=new Float64Array(t),i=new Float64Array(t),s=new Float64Array(t);let o=1/0,l=1/0,C=1/0,a=-1/0,h=-1/0,c=-1/0;for(let d=0,p,x,f,_;da&&(a=x),fh&&(h=f),_c&&(c=_));if(o>a||l>h||C>c)return this;this.cover(o,l,C).cover(a,h,c);for(let d=0;de||e>=l||s>t||t>=C||o>n||n>=a;)switch(p=(nf||(h=g.y0)>_||(c=g.z0)>w||(d=g.x1)=y)<<2|(t>=k)<<1|e>=m)&&(g=u[u.length-1],u[u.length-1]=u[u.length-1-v],u[u.length-1-v]=g)}else{var H=e-+this._x.call(null,j.data),M=t-+this._y.call(null,j.data),S=n-+this._z.call(null,j.data),P=H*H+M*M+S*S;if(P=(_=(l+h)/2))?l=_:h=_,(g=x>=(w=(C+c)/2))?C=w:c=w,(v=f>=(u=(a+d)/2))?a=u:d=u,t=n,!(n=n[m=v<<2|g<<1|j]))return this;if(!n.length)break;(t[m+1&7]||t[m+2&7]||t[m+3&7]||t[m+4&7]||t[m+5&7]||t[m+6&7]||t[m+7&7])&&(i=t,k=m)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,s?(o?s.next=o:delete s.next,this):t?(o?t[m]=o:delete t[m],(n=t[0]||t[1]||t[2]||t[3]||t[4]||t[5]||t[6]||t[7])&&n===(t[7]||t[6]||t[5]||t[4]||t[3]||t[2]||t[1]||t[0])&&!n.length&&(i?i[k]=n:this._root=n),this):(this._root=o,this)}function I0(e){for(var t=0,n=e.length;t1&&(_=x.y+x.vy),n>2&&(w=x.z+x.vz),p.visit(v);function v(m,k,y,H,M,S,P){var V=[k,y,H,M,S,P],$=V[0],T=V[1],Z=V[2],E=V[n],I=V[n+1],q=V[n+2],R=m.data,Y=m.r,z=u+Y;if(R){if(R.index>x.index){var A=f-R.x-R.vx,t1=n>1?_-R.y-R.vy:0,G=n>2?w-R.z-R.vz:0,F=A*A+t1*t1+G*G;F1&&t1===0&&(t1=i1(s),F+=t1*t1),n>2&&G===0&&(G=i1(s),F+=G*G),F=(z-(F=Math.sqrt(F)))/F*o,x.vx+=(A*=F)*(z=(Y*=Y)/(j+Y)),n>1&&(x.vy+=(t1*=F)*z),n>2&&(x.vz+=(G*=F)*z),R.vx-=A*(z=1-z),n>1&&(R.vy-=t1*z),n>2&&(R.vz-=G*z))}return}return $>f+z||E1&&(T>_+z||I<_-z)||n>2&&(Z>w+z||qc.r&&(c.r=c[d].r)}function h(){if(t){var c,d=t.length,p;for(i=new Array(d),c=0;ctypeof p=="function")||Math.random,n=d.find(p=>[1,2,3].includes(p))||2,h()},C.iterations=function(c){return arguments.length?(l=+c,C):l},C.strength=function(c){return arguments.length?(o=+c,C):o},C.radius=function(c){return arguments.length?(e=typeof c=="function"?c:Q(+c),h(),C):e},C}function D0(e){return e.index}function U2(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function q0(e){var t=D0,n=p,i,s=Q(30),o,l,C,a,h,c,d=1;e==null&&(e=[]);function p(u){return 1/Math.min(a[u.source.index],a[u.target.index])}function x(u){for(var j=0,g=e.length;j1&&(M=y.y+y.vy-k.y-k.vy||i1(c)),C>2&&(S=y.z+y.vz-k.z-k.vz||i1(c)),P=Math.sqrt(H*H+M*M+S*S),P=(P-o[v])/P*u*i[v],H*=P,M*=P,S*=P,y.vx-=H*(V=h[v]),C>1&&(y.vy-=M*V),C>2&&(y.vz-=S*V),k.vx+=H*(V=1-V),C>1&&(k.vy+=M*V),C>2&&(k.vz+=S*V)}function f(){if(l){var u,j=l.length,g=e.length,v=new Map(l.map((k,y)=>[t(k,y,l),k])),m;for(u=0,a=new Array(j);utypeof g=="function")||Math.random,C=j.find(g=>[1,2,3].includes(g))||2,f()},x.links=function(u){return arguments.length?(e=u,f(),x):e},x.id=function(u){return arguments.length?(t=u,x):t},x.iterations=function(u){return arguments.length?(d=+u,x):d},x.strength=function(u){return arguments.length?(n=typeof u=="function"?u:Q(+u),_(),x):n},x.distance=function(u){return arguments.length?(s=typeof u=="function"?u:Q(+u),w(),x):s},x}var W0={value:()=>{}};function C3(){for(var e=0,t=arguments.length,n={},i;e=0&&(i=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}z1.prototype=C3.prototype={constructor:z1,on:function(e,t){var n=this._,i=G0(e+"",n),s,o=-1,l=i.length;if(arguments.length<2){for(;++o0)for(var n=new Array(s),i=0,s,o;i=0&&e._call.call(void 0,t),e=e._next;--L1}function z2(){u1=(W1=B1.now())+X1,L1=S1=0;try{K0()}finally{L1=0,J0(),u1=0}}function Q0(){var e=B1.now(),t=e-W1;t>a3&&(X1-=t,W1=e)}function J0(){for(var e,t=q1,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:q1=n);I1=e,C2(i)}function C2(e){if(!L1){S1&&(S1=clearTimeout(S1));var t=e-u1;t>24?(e<1/0&&(S1=setTimeout(z2,e-B1.now()-X1)),V1&&(V1=clearInterval(V1))):(V1||(W1=B1.now(),V1=setInterval(Q0,a3)),L1=1,c3(z2))}}const e6=1664525,t6=1013904223,A2=4294967296;function n6(){let e=1;return()=>(e=(e6*e+t6)%A2)/A2}var F2=3;function r2(e){return e.x}function D2(e){return e.y}function r6(e){return e.z}var i6=10,s6=Math.PI*(3-Math.sqrt(5)),o6=Math.PI*20/(9+Math.sqrt(221));function l6(e,t){t=t||2;var n=Math.min(F2,Math.max(1,Math.round(t))),i,s=1,o=.001,l=1-Math.pow(o,1/300),C=0,a=.6,h=new Map,c=d3(x),d=C3("tick","end"),p=n6();e==null&&(e=[]);function x(){f(),d.call("tick",i),s1&&(v.fy==null?v.y+=v.vy*=a:(v.y=v.fy,v.vy=0)),n>2&&(v.fz==null?v.z+=v.vz*=a:(v.z=v.fz,v.vz=0));return i}function _(){for(var u=0,j=e.length,g;u1&&isNaN(g.y)||n>2&&isNaN(g.z)){var v=i6*(n>2?Math.cbrt(.5+u):n>1?Math.sqrt(.5+u):u),m=u*s6,k=u*o6;n===1?g.x=v:n===2?(g.x=v*Math.cos(m),g.y=v*Math.sin(m)):(g.x=v*Math.sin(m)*Math.cos(k),g.y=v*Math.cos(m),g.z=v*Math.sin(m)*Math.sin(k))}(isNaN(g.vx)||n>1&&isNaN(g.vy)||n>2&&isNaN(g.vz))&&(g.vx=0,n>1&&(g.vy=0),n>2&&(g.vz=0))}}function w(u){return u.initialize&&u.initialize(e,p,n),u}return _(),i={tick:f,restart:function(){return c.restart(x),i},stop:function(){return c.stop(),i},numDimensions:function(u){return arguments.length?(n=Math.min(F2,Math.max(1,Math.round(u))),h.forEach(w),i):n},nodes:function(u){return arguments.length?(e=u,_(),h.forEach(w),i):e},alpha:function(u){return arguments.length?(s=+u,i):s},alphaMin:function(u){return arguments.length?(o=+u,i):o},alphaDecay:function(u){return arguments.length?(l=+u,i):+l},alphaTarget:function(u){return arguments.length?(C=+u,i):C},velocityDecay:function(u){return arguments.length?(a=1-u,i):1-a},randomSource:function(u){return arguments.length?(p=u,h.forEach(w),i):p},force:function(u,j){return arguments.length>1?(j==null?h.delete(u):h.set(u,w(j)),i):h.get(u)},find:function(){var u=Array.prototype.slice.call(arguments),j=u.shift()||0,g=(n>1?u.shift():null)||0,v=(n>2?u.shift():null)||0,m=u.shift()||1/0,k=0,y=e.length,H,M,S,P,V,$;for(m*=m,k=0;k1?(d.on(u,j),i):d.on(u)}}}function C6(){var e,t,n,i,s,o=Q(-30),l,C=1,a=1/0,h=.81;function c(f){var _,w=e.length,u=(t===1?c2(e,r2):t===2?d2(e,r2,D2):t===3?f2(e,r2,D2,r6):null).visitAfter(p);for(s=f,_=0;_1&&(f.y=v/j),t>2&&(f.z=m/j)}else{w=f,w.x=w.data.x,t>1&&(w.y=w.data.y),t>2&&(w.z=w.data.z);do _+=l[w.data.index];while(w=w.next)}f.value=_}function x(f,_,w,u,j){if(!f.value)return!0;var g=[w,u,j][t-1],v=f.x-n.x,m=t>1?f.y-n.y:0,k=t>2?f.z-n.z:0,y=g-_,H=v*v+m*m+k*k;if(y*y/h1&&m===0&&(m=i1(i),H+=m*m),t>2&&k===0&&(k=i1(i),H+=k*k),H1&&(n.vy+=m*f.value*s/H),t>2&&(n.vz+=k*f.value*s/H)),!0;if(f.length||H>=a)return;(f.data!==n||f.next)&&(v===0&&(v=i1(i),H+=v*v),t>1&&m===0&&(m=i1(i),H+=m*m),t>2&&k===0&&(k=i1(i),H+=k*k),H1&&(n.vy+=m*y),t>2&&(n.vz+=k*y));while(f=f.next)}return c.initialize=function(f,..._){e=f,i=_.find(w=>typeof w=="function")||Math.random,t=_.find(w=>[1,2,3].includes(w))||2,d()},c.strength=function(f){return arguments.length?(o=typeof f=="function"?f:Q(+f),d(),c):o},c.distanceMin=function(f){return arguments.length?(C=f*f,c):Math.sqrt(C)},c.distanceMax=function(f){return arguments.length?(a=f*f,c):Math.sqrt(a)},c.theta=function(f){return arguments.length?(h=f*f,c):Math.sqrt(h)},c}function q2(e,t,n,i){var s,o,l=Q(.1),C,a;typeof e!="function"&&(e=Q(+e)),t==null&&(t=0),n==null&&(n=0),i==null&&(i=0);function h(d){for(var p=0,x=s.length;p1&&(f.vy+=w*g),o>2&&(f.vz+=u*g)}}function c(){if(s){var d,p=s.length;for(C=new Array(p),a=new Array(p),d=0;d[1,2,3].includes(x))||2,c()},h.strength=function(d){return arguments.length?(l=typeof d=="function"?d:Q(+d),c(),h):l},h.radius=function(d){return arguments.length?(e=typeof d=="function"?d:Q(+d),c(),h):e},h.x=function(d){return arguments.length?(t=+d,h):t},h.y=function(d){return arguments.length?(n=+d,h):n},h.z=function(d){return arguments.length?(i=+d,h):i},h}function a6(e){var t=Q(.1),n,i,s;typeof e!="function"&&(e=Q(e==null?0:+e));function o(C){for(var a=0,h=n.length,c;a{},setForces:()=>{},addRadialForce:()=>{},addDefaultForce:()=>{},addSplitForce:()=>{},simulationRestart:()=>{},getLinks:()=>[]},h6={data:null,simulation:null,selectionGraphData:{nodes:[],links:[]},disableCameraRotation:!1,scrollEventsDisabled:!1,graphRadius:1500,graphStyle:"sphere",hoveredNode:null,selectedNode:null,activeEdge:null,cameraFocusTrigger:!1,nearbyNodeIds:[],showSelectionGraph:!1,simulationHelpers:c6,isHovering:!1},x1=X2()((e,t)=>({...h6,setData:n=>{e({data:n})},setSelectionData:n=>e({selectionGraphData:n}),setScrollEventsDisabled:n=>e({scrollEventsDisabled:n}),setDisableCameraRotation:n=>e({disableCameraRotation:n}),setIsHovering:n=>e({isHovering:n}),setGraphRadius:n=>e({graphRadius:n}),setGraphStyle:n=>e({graphStyle:"sphere"}),setHoveredNode:n=>{e({hoveredNode:n})},setActiveEdge:n=>{e({activeEdge:n})},setSelectedNode:n=>{const{selectedNode:i,simulation:s}=t();if((i==null?void 0:i.ref_id)!==(n==null?void 0:n.ref_id)){const o=s.nodes().find(l=>l.ref_id===(n==null?void 0:n.ref_id))||null;e({hoveredNode:null,selectedNode:o,disableCameraRotation:!0})}},setCameraFocusTrigger:n=>e({cameraFocusTrigger:n}),setNearbyNodeIds:n=>{const i=t().nearbyNodeIds;(n.length!==i.length||n[0]!==i[0])&&e({nearbyNodeIds:n})},setShowSelectionGraph:n=>e({showSelectionGraph:n}),simulationHelpers:{addNodesAndLinks:(n,i,s)=>{const{simulation:o,simulationHelpers:l}=t();o.stop();const C=structuredClone(n),a=structuredClone(i);o.stop();const h=s?[]:o.nodes(),c=s?[]:o.force("link").links();h.push(...C),c.push(...a);try{o.nodes(h),o.force("link").links([]).links(c),l.simulationRestart()}catch(d){console.error(d)}},addRadialForce:()=>{const{simulation:n}=t();n.nodes(n.nodes().map(i=>({...i,...i2}))).force("y",null).force("radial",q2(200,0,0,0).strength(.1)).force("center",T2().strength(1)).force("collide",n2().radius(()=>250).strength(1).iterations(1))},addDefaultForce:()=>{const{simulation:n}=t();n.nodes(n.nodes().map(i=>({...i,...i2}))).force("y",null).force("charge",C6().strength(-20)).force("center",T2().strength(1)).force("collide",n2().radius(()=>250).strength(1).iterations(1))},addSplitForce:()=>{const{simulation:n}=t(),{nodeTypes:i}=G1.getState();n.stop().nodes(n.nodes().map(s=>({...s,...i2}))).force("radial",q2(200,0,0,0).strength(.1)).force("collide",n2().radius(()=>250).strength(1).iterations(1)).force("y",a6().y(s=>{const o=i.indexOf(s.node_type),l=Math.floor(o/2)*400;return o%2===0?l:-l}).strength(10))},getLinks:()=>{const{simulation:n}=t();return n?n.force("link").links():[]},setForces:()=>{const{graphStyle:n,simulationHelpers:i}=t();n==="split"&&i.addSplitForce(),n==="sphere"&&i.addRadialForce(),n==="force"&&i.addDefaultForce(),i.simulationRestart()},simulationRestart:()=>{const{simulation:n}=t();n.alpha(1).restart()}},simulationCreate:(n,i)=>{const s=structuredClone(n),o=structuredClone(i),l=l6([]).numDimensions(3).stop().nodes(s).force("link",q0().links(o).id(C=>C.ref_id));e({simulation:l})}})),u3=()=>x1(e=>e.selectedNode),A7=()=>x1(e=>e.hoveredNode),d6=()=>x1(e=>e.setSelectedNode),F7=()=>{const e=x1(s=>s.selectedNode);if(!e)return[];const{dataInitial:t}=G1.getState();return((t==null?void 0:t.links)||[]).reduce((s,o)=>(o.source===(e==null?void 0:e.ref_id)&&s.push(o.target),o.target===(e==null?void 0:e.ref_id)&&s.push(o.source),s),[])},u6=()=>(x1(D5(e=>[e.graphStyle,e.setGraphStyle])),null);D(O).attrs({direction:"row",align:"center",justify:"space-between"})` +import{G as w3,R as $1,H as o1,J as Z1,K as W2,L as N1,M as R1,O as f1,x as b,P as A1,r as L,S as O1,j as r,U as d1,V as U1,X as v3,Y as y1,Z as p1,$ as j2,a0 as k2,a1 as _3,a2 as y2,a3 as G2,c as X2,u as G1,s as D,a as U,F as O,B as Y2,C as a2,a4 as j3,a5 as k3,k as K2,b as y3,d as L3,T as r1,a6 as H3,I as M3}from"./index-787c3ef8.js";function V3(e){return e?String(e).replace(/[[]{2}/g,"").replace(/[\]]{2}/g,""):""}const b3=e=>{const[t,n,i]=e.split(":"),s=parseInt(t,10),o=parseInt(n,10),l=parseInt(i,10);return s*3600+o*60+l};function L2(...e){return e.reduce((t,n)=>n==null?t:function(...s){t.apply(this,s),n.apply(this,s)},()=>{})}function Z3(e,t=166){let n;function i(...s){const o=()=>{e.apply(this,s)};clearTimeout(n),n=setTimeout(o,t)}return i.clear=()=>{clearTimeout(n)},i}function l1(e){return e&&e.ownerDocument||document}function T1(e){return l1(e).defaultView||window}function E3(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const S3=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},H2=S3,M2={disabled:!1};var I3=function(t){return t.scrollTop},E1="unmounted",c1="exited",h1="entering",k1="entered",s2="exiting",a1=function(e){w3(t,e);function t(i,s){var o;o=e.call(this,i,s)||this;var l=s,C=l&&!l.isMounting?i.enter:i.appear,a;return o.appearStatus=null,i.in?C?(a=c1,o.appearStatus=h1):a=k1:i.unmountOnExit||i.mountOnEnter?a=E1:a=c1,o.state={status:a},o.nextCallback=null,o}t.getDerivedStateFromProps=function(s,o){var l=s.in;return l&&o.status===E1?{status:c1}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(s){var o=null;if(s!==this.props){var l=this.state.status;this.props.in?l!==h1&&l!==k1&&(o=h1):(l===h1||l===k1)&&(o=s2)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var s=this.props.timeout,o,l,C;return o=l=C=s,s!=null&&typeof s!="number"&&(o=s.exit,l=s.enter,C=s.appear!==void 0?s.appear:l),{exit:o,enter:l,appear:C}},n.updateStatus=function(s,o){if(s===void 0&&(s=!1),o!==null)if(this.cancelNextCallback(),o===h1){if(this.props.unmountOnExit||this.props.mountOnEnter){var l=this.props.nodeRef?this.props.nodeRef.current:$1.findDOMNode(this);l&&I3(l)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===c1&&this.setState({status:E1})},n.performEnter=function(s){var o=this,l=this.props.enter,C=this.context?this.context.isMounting:s,a=this.props.nodeRef?[C]:[$1.findDOMNode(this),C],h=a[0],c=a[1],d=this.getTimeouts(),p=C?d.appear:d.enter;if(!s&&!l||M2.disabled){this.safeSetState({status:k1},function(){o.props.onEntered(h)});return}this.props.onEnter(h,c),this.safeSetState({status:h1},function(){o.props.onEntering(h,c),o.onTransitionEnd(p,function(){o.safeSetState({status:k1},function(){o.props.onEntered(h,c)})})})},n.performExit=function(){var s=this,o=this.props.exit,l=this.getTimeouts(),C=this.props.nodeRef?void 0:$1.findDOMNode(this);if(!o||M2.disabled){this.safeSetState({status:c1},function(){s.props.onExited(C)});return}this.props.onExit(C),this.safeSetState({status:s2},function(){s.props.onExiting(C),s.onTransitionEnd(l.exit,function(){s.safeSetState({status:c1},function(){s.props.onExited(C)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(s,o){o=this.setNextCallback(o),this.setState(s,o)},n.setNextCallback=function(s){var o=this,l=!0;return this.nextCallback=function(C){l&&(l=!1,o.nextCallback=null,s(C))},this.nextCallback.cancel=function(){l=!1},this.nextCallback},n.onTransitionEnd=function(s,o){this.setNextCallback(o);var l=this.props.nodeRef?this.props.nodeRef.current:$1.findDOMNode(this),C=s==null&&!this.props.addEndListener;if(!l||C){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[l,this.nextCallback],h=a[0],c=a[1];this.props.addEndListener(h,c)}s!=null&&setTimeout(this.nextCallback,s)},n.render=function(){var s=this.state.status;if(s===E1)return null;var o=this.props,l=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var C=o1(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Z1.createElement(W2.Provider,{value:null},typeof l=="function"?l(s,C):Z1.cloneElement(Z1.Children.only(l),C))},t}(Z1.Component);a1.contextType=W2;a1.propTypes={};function j1(){}a1.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:j1,onEntering:j1,onEntered:j1,onExit:j1,onExiting:j1,onExited:j1};a1.UNMOUNTED=E1;a1.EXITED=c1;a1.ENTERING=h1;a1.ENTERED=k1;a1.EXITING=s2;const Q2=a1,J2=e=>e.scrollTop;function F1(e,t){var n,i;const{timeout:s,easing:o,style:l={}}=e;return{duration:(n=l.transitionDuration)!=null?n:typeof s=="number"?s:s[t.mode]||0,easing:(i=l.transitionTimingFunction)!=null?i:typeof o=="object"?o[t.mode]:o,delay:l.transitionDelay}}function P3(e){return N1("MuiPaper",e)}R1("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const T3=["className","component","elevation","square","variant"],B3=e=>{const{square:t,elevation:n,variant:i,classes:s}=e,o={root:["root",i,!t&&"rounded",i==="elevation"&&`elevation${n}`]};return U1(o,P3,s)},N3=f1("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return b({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&b({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${A1("#fff",H2(t.elevation))}, ${A1("#fff",H2(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),R3=L.forwardRef(function(t,n){const i=O1({props:t,name:"MuiPaper"}),{className:s,component:o="div",elevation:l=1,square:C=!1,variant:a="elevation"}=i,h=o1(i,T3),c=b({},i,{component:o,elevation:l,square:C,variant:a}),d=B3(c);return r.jsx(N3,b({as:o,ownerState:c,className:d1(d.root,s),ref:n},h))}),O3=R3;function U3(e){return N1("MuiIconButton",e)}const $3=R1("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),z3=$3,A3=["edge","children","className","color","disabled","disableFocusRipple","size"],F3=e=>{const{classes:t,disabled:n,color:i,edge:s,size:o}=e,l={root:["root",n&&"disabled",i!=="default"&&`color${y1(i)}`,s&&`edge${y1(s)}`,`size${y1(o)}`]};return U1(l,U3,t)},D3=f1(v3,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${y1(n.color)}`],n.edge&&t[`edge${y1(n.edge)}`],t[`size${y1(n.size)}`]]}})(({theme:e,ownerState:t})=>b({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:A1(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const i=(n=(e.vars||e).palette)==null?void 0:n[t.color];return b({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&b({color:i==null?void 0:i.main},!t.disableRipple&&{"&:hover":b({},i&&{backgroundColor:e.vars?`rgba(${i.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:A1(i.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${z3.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),q3=L.forwardRef(function(t,n){const i=O1({props:t,name:"MuiIconButton"}),{edge:s=!1,children:o,className:l,color:C="default",disabled:a=!1,disableFocusRipple:h=!1,size:c="medium"}=i,d=o1(i,A3),p=b({},i,{edge:s,color:C,disabled:a,disableFocusRipple:h,size:c}),x=F3(p);return r.jsx(D3,b({className:d1(x.root,l),centerRipple:!0,focusRipple:!h,disabled:a,ref:n,ownerState:p},d,{children:o}))}),e3=q3;function t3(e){return typeof e=="string"}function W3(e,t,n){return e===void 0||t3(e)?t:b({},t,{ownerState:b({},t.ownerState,n)})}function n3(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(i=>i.match(/^on[A-Z]/)&&typeof e[i]=="function"&&!t.includes(i)).forEach(i=>{n[i]=e[i]}),n}function G3(e,t,n){return typeof e=="function"?e(t,n):e}function r3(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function X3(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:i,externalForwardedProps:s,className:o}=e;if(!t){const x=V2(n==null?void 0:n.className,o,s==null?void 0:s.className,i==null?void 0:i.className),f=b({},n==null?void 0:n.style,s==null?void 0:s.style,i==null?void 0:i.style),_=b({},n,s,i);return x.length>0&&(_.className=x),Object.keys(f).length>0&&(_.style=f),{props:_,internalRef:void 0}}const l=n3(b({},s,i)),C=b2(i),a=b2(s),h=t(l),c=V2(h==null?void 0:h.className,n==null?void 0:n.className,o,s==null?void 0:s.className,i==null?void 0:i.className),d=b({},h==null?void 0:h.style,n==null?void 0:n.style,s==null?void 0:s.style,i==null?void 0:i.style),p=b({},h,n,a,C);return c.length>0&&(p.className=c),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:h.ref}}const Y3=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function D1(e){var t;const{elementType:n,externalSlotProps:i,ownerState:s,skipResolvingSlotProps:o=!1}=e,l=o1(e,Y3),C=o?{}:G3(i,s),{props:a,internalRef:h}=X3(b({},l,{externalSlotProps:C})),c=p1(h,C==null?void 0:C.ref,(t=e.additionalProps)==null?void 0:t.ref);return W3(n,b({},a,{ref:c}),s)}const K3=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Q3(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function J3(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=i=>e.ownerDocument.querySelector(`input[type="radio"]${i}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function e5(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||J3(e))}function t5(e){const t=[],n=[];return Array.from(e.querySelectorAll(K3)).forEach((i,s)=>{const o=Q3(i);o===-1||!e5(i)||(o===0?t.push(i):n.push({documentOrder:s,tabIndex:o,node:i}))}),n.sort((i,s)=>i.tabIndex===s.tabIndex?i.documentOrder-s.documentOrder:i.tabIndex-s.tabIndex).map(i=>i.node).concat(t)}function n5(){return!0}function r5(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:i=!1,disableRestoreFocus:s=!1,getTabbable:o=t5,isEnabled:l=n5,open:C}=e,a=L.useRef(!1),h=L.useRef(null),c=L.useRef(null),d=L.useRef(null),p=L.useRef(null),x=L.useRef(!1),f=L.useRef(null),_=p1(t.ref,f),w=L.useRef(null);L.useEffect(()=>{!C||!f.current||(x.current=!n)},[n,C]),L.useEffect(()=>{if(!C||!f.current)return;const g=l1(f.current);return f.current.contains(g.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex","-1"),x.current&&f.current.focus()),()=>{s||(d.current&&d.current.focus&&(a.current=!0,d.current.focus()),d.current=null)}},[C]),L.useEffect(()=>{if(!C||!f.current)return;const g=l1(f.current),v=y=>{w.current=y,!(i||!l()||y.key!=="Tab")&&g.activeElement===f.current&&y.shiftKey&&(a.current=!0,c.current&&c.current.focus())},m=()=>{const y=f.current;if(y===null)return;if(!g.hasFocus()||!l()||a.current){a.current=!1;return}if(y.contains(g.activeElement)||i&&g.activeElement!==h.current&&g.activeElement!==c.current)return;if(g.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!x.current)return;let H=[];if((g.activeElement===h.current||g.activeElement===c.current)&&(H=o(f.current)),H.length>0){var M,S;const P=!!((M=w.current)!=null&&M.shiftKey&&((S=w.current)==null?void 0:S.key)==="Tab"),V=H[0],$=H[H.length-1];typeof V!="string"&&typeof $!="string"&&(P?$.focus():V.focus())}else y.focus()};g.addEventListener("focusin",m),g.addEventListener("keydown",v,!0);const k=setInterval(()=>{g.activeElement&&g.activeElement.tagName==="BODY"&&m()},50);return()=>{clearInterval(k),g.removeEventListener("focusin",m),g.removeEventListener("keydown",v,!0)}},[n,i,s,l,C,o]);const u=g=>{d.current===null&&(d.current=g.relatedTarget),x.current=!0,p.current=g.target;const v=t.props.onFocus;v&&v(g)},j=g=>{d.current===null&&(d.current=g.relatedTarget),x.current=!0};return r.jsxs(L.Fragment,{children:[r.jsx("div",{tabIndex:C?0:-1,onFocus:j,ref:h,"data-testid":"sentinelStart"}),L.cloneElement(t,{ref:_,onFocus:u}),r.jsx("div",{tabIndex:C?0:-1,onFocus:j,ref:c,"data-testid":"sentinelEnd"})]})}function i5(e){return typeof e=="function"?e():e}const s5=L.forwardRef(function(t,n){const{children:i,container:s,disablePortal:o=!1}=t,[l,C]=L.useState(null),a=p1(L.isValidElement(i)?i.ref:null,n);if(j2(()=>{o||C(i5(s)||document.body)},[s,o]),j2(()=>{if(l&&!o)return k2(n,l),()=>{k2(n,null)}},[n,l,o]),o){if(L.isValidElement(i)){const h={ref:a};return L.cloneElement(i,h)}return r.jsx(L.Fragment,{children:i})}return r.jsx(L.Fragment,{children:l&&_3.createPortal(i,l)})});function o5(e){const t=l1(e);return t.body===e?T1(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function P1(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Z2(e){return parseInt(T1(e).getComputedStyle(e).paddingRight,10)||0}function l5(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,i=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||i}function E2(e,t,n,i,s){const o=[t,n,...i];[].forEach.call(e.children,l=>{const C=o.indexOf(l)===-1,a=!l5(l);C&&a&&P1(l,s)})}function Q1(e,t){let n=-1;return e.some((i,s)=>t(i)?(n=s,!0):!1),n}function C5(e,t){const n=[],i=e.container;if(!t.disableScrollLock){if(o5(i)){const l=E3(l1(i));n.push({value:i.style.paddingRight,property:"padding-right",el:i}),i.style.paddingRight=`${Z2(i)+l}px`;const C=l1(i).querySelectorAll(".mui-fixed");[].forEach.call(C,a=>{n.push({value:a.style.paddingRight,property:"padding-right",el:a}),a.style.paddingRight=`${Z2(a)+l}px`})}let o;if(i.parentNode instanceof DocumentFragment)o=l1(i).body;else{const l=i.parentElement,C=T1(i);o=(l==null?void 0:l.nodeName)==="HTML"&&C.getComputedStyle(l).overflowY==="scroll"?l:i}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:l,property:C})=>{o?l.style.setProperty(C,o):l.style.removeProperty(C)})}}function a5(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class c5{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let i=this.modals.indexOf(t);if(i!==-1)return i;i=this.modals.length,this.modals.push(t),t.modalRef&&P1(t.modalRef,!1);const s=a5(n);E2(n,t.mount,t.modalRef,s,!0);const o=Q1(this.containers,l=>l.container===n);return o!==-1?(this.containers[o].modals.push(t),i):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:s}),i)}mount(t,n){const i=Q1(this.containers,o=>o.modals.indexOf(t)!==-1),s=this.containers[i];s.restore||(s.restore=C5(s,n))}remove(t,n=!0){const i=this.modals.indexOf(t);if(i===-1)return i;const s=Q1(this.containers,l=>l.modals.indexOf(t)!==-1),o=this.containers[s];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(i,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&P1(t.modalRef,n),E2(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(s,1);else{const l=o.modals[o.modals.length-1];l.modalRef&&P1(l.modalRef,!1)}return i}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function h5(e){return typeof e=="function"?e():e}function d5(e){return e?e.props.hasOwnProperty("in"):!1}const u5=new c5;function f5(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:i=!1,manager:s=u5,closeAfterTransition:o=!1,onTransitionEnter:l,onTransitionExited:C,children:a,onClose:h,open:c,rootRef:d}=e,p=L.useRef({}),x=L.useRef(null),f=L.useRef(null),_=p1(f,d),[w,u]=L.useState(!c),j=d5(a);let g=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(g=!1);const v=()=>l1(x.current),m=()=>(p.current.modalRef=f.current,p.current.mount=x.current,p.current),k=()=>{s.mount(m(),{disableScrollLock:i}),f.current&&(f.current.scrollTop=0)},y=y2(()=>{const E=h5(t)||v().body;s.add(m(),E),f.current&&k()}),H=L.useCallback(()=>s.isTopModal(m()),[s]),M=y2(E=>{x.current=E,E&&(c&&H()?k():f.current&&P1(f.current,g))}),S=L.useCallback(()=>{s.remove(m(),g)},[g,s]);L.useEffect(()=>()=>{S()},[S]),L.useEffect(()=>{c?y():(!j||!o)&&S()},[c,S,j,o,y]);const P=E=>I=>{var q;(q=E.onKeyDown)==null||q.call(E,I),!(I.key!=="Escape"||I.which===229||!H())&&(n||(I.stopPropagation(),h&&h(I,"escapeKeyDown")))},V=E=>I=>{var q;(q=E.onClick)==null||q.call(E,I),I.target===I.currentTarget&&h&&h(I,"backdropClick")};return{getRootProps:(E={})=>{const I=n3(e);delete I.onTransitionEnter,delete I.onTransitionExited;const q=b({},I,E);return b({role:"presentation"},q,{onKeyDown:P(q),ref:_})},getBackdropProps:(E={})=>{const I=E;return b({"aria-hidden":!0},I,{onClick:V(I),open:c})},getTransitionProps:()=>{const E=()=>{u(!1),l&&l()},I=()=>{u(!0),C&&C(),o&&S()};return{onEnter:L2(E,a==null?void 0:a.props.onEnter),onExited:L2(I,a==null?void 0:a.props.onExited)}},rootRef:_,portalRef:M,isTopModal:H,exited:w,hasTransition:j}}const p5=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],x5={entering:{opacity:1},entered:{opacity:1}},g5=L.forwardRef(function(t,n){const i=G2(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{addEndListener:o,appear:l=!0,children:C,easing:a,in:h,onEnter:c,onEntered:d,onEntering:p,onExit:x,onExited:f,onExiting:_,style:w,timeout:u=s,TransitionComponent:j=Q2}=t,g=o1(t,p5),v=L.useRef(null),m=p1(v,C.ref,n),k=T=>Z=>{if(T){const E=v.current;Z===void 0?T(E):T(E,Z)}},y=k(p),H=k((T,Z)=>{J2(T);const E=F1({style:w,timeout:u,easing:a},{mode:"enter"});T.style.webkitTransition=i.transitions.create("opacity",E),T.style.transition=i.transitions.create("opacity",E),c&&c(T,Z)}),M=k(d),S=k(_),P=k(T=>{const Z=F1({style:w,timeout:u,easing:a},{mode:"exit"});T.style.webkitTransition=i.transitions.create("opacity",Z),T.style.transition=i.transitions.create("opacity",Z),x&&x(T)}),V=k(f),$=T=>{o&&o(v.current,T)};return r.jsx(j,b({appear:l,in:h,nodeRef:v,onEnter:H,onEntered:M,onEntering:y,onExit:P,onExited:V,onExiting:S,addEndListener:$,timeout:u},g,{children:(T,Z)=>L.cloneElement(C,b({style:b({opacity:0,visibility:T==="exited"&&!h?"hidden":void 0},x5[T],w,C.props.style),ref:m},Z))}))}),m5=g5;function w5(e){return N1("MuiBackdrop",e)}R1("MuiBackdrop",["root","invisible"]);const v5=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],_5=e=>{const{classes:t,invisible:n}=e;return U1({root:["root",n&&"invisible"]},w5,t)},j5=f1("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>b({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),k5=L.forwardRef(function(t,n){var i,s,o;const l=O1({props:t,name:"MuiBackdrop"}),{children:C,className:a,component:h="div",components:c={},componentsProps:d={},invisible:p=!1,open:x,slotProps:f={},slots:_={},TransitionComponent:w=m5,transitionDuration:u}=l,j=o1(l,v5),g=b({},l,{component:h,invisible:p}),v=_5(g),m=(i=f.root)!=null?i:d.root;return r.jsx(w,b({in:x,timeout:u},j,{children:r.jsx(j5,b({"aria-hidden":!0},m,{as:(s=(o=_.root)!=null?o:c.Root)!=null?s:h,className:d1(v.root,a,m==null?void 0:m.className),ownerState:b({},g,m==null?void 0:m.ownerState),classes:v,ref:n,children:C}))}))}),y5=k5;function L5(e){return N1("MuiModal",e)}R1("MuiModal",["root","hidden","backdrop"]);const H5=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],M5=e=>{const{open:t,exited:n,classes:i}=e;return U1({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},L5,i)},V5=f1("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>b({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),b5=f1(y5,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Z5=L.forwardRef(function(t,n){var i,s,o,l,C,a;const h=O1({name:"MuiModal",props:t}),{BackdropComponent:c=b5,BackdropProps:d,className:p,closeAfterTransition:x=!1,children:f,container:_,component:w,components:u={},componentsProps:j={},disableAutoFocus:g=!1,disableEnforceFocus:v=!1,disableEscapeKeyDown:m=!1,disablePortal:k=!1,disableRestoreFocus:y=!1,disableScrollLock:H=!1,hideBackdrop:M=!1,keepMounted:S=!1,onBackdropClick:P,open:V,slotProps:$,slots:T}=h,Z=o1(h,H5),E=b({},h,{closeAfterTransition:x,disableAutoFocus:g,disableEnforceFocus:v,disableEscapeKeyDown:m,disablePortal:k,disableRestoreFocus:y,disableScrollLock:H,hideBackdrop:M,keepMounted:S}),{getRootProps:I,getBackdropProps:q,getTransitionProps:R,portalRef:Y,isTopModal:z,exited:A,hasTransition:t1}=f5(b({},E,{rootRef:n})),G=b({},E,{exited:A}),F=M5(G),g1={};if(f.props.tabIndex===void 0&&(g1.tabIndex="-1"),t1){const{onEnter:B,onExited:W}=R();g1.onEnter=B,g1.onExited=W}const m1=(i=(s=T==null?void 0:T.root)!=null?s:u.Root)!=null?i:V5,H1=(o=(l=T==null?void 0:T.backdrop)!=null?l:u.Backdrop)!=null?o:c,M1=(C=$==null?void 0:$.root)!=null?C:j.root,w1=(a=$==null?void 0:$.backdrop)!=null?a:j.backdrop,Y1=D1({elementType:m1,externalSlotProps:M1,externalForwardedProps:Z,getSlotProps:I,additionalProps:{ref:n,as:w},ownerState:G,className:d1(p,M1==null?void 0:M1.className,F==null?void 0:F.root,!G.open&&G.exited&&(F==null?void 0:F.hidden))}),K1=D1({elementType:H1,externalSlotProps:w1,additionalProps:d,getSlotProps:B=>q(b({},B,{onClick:W=>{P&&P(W),B!=null&&B.onClick&&B.onClick(W)}})),className:d1(w1==null?void 0:w1.className,d==null?void 0:d.className,F==null?void 0:F.backdrop),ownerState:G});return!S&&!V&&(!t1||A)?null:r.jsx(s5,{ref:Y,container:_,disablePortal:k,children:r.jsxs(m1,b({},Y1,{children:[!M&&c?r.jsx(H1,b({},K1)):null,r.jsx(r5,{disableEnforceFocus:v,disableAutoFocus:g,disableRestoreFocus:y,isEnabled:z,open:V,children:L.cloneElement(f,g1)})]}))})}),E5=Z5,S5=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function o2(e){return`scale(${e}, ${e**2})`}const I5={entering:{opacity:1,transform:o2(1)},entered:{opacity:1,transform:"none"}},J1=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),i3=L.forwardRef(function(t,n){const{addEndListener:i,appear:s=!0,children:o,easing:l,in:C,onEnter:a,onEntered:h,onEntering:c,onExit:d,onExited:p,onExiting:x,style:f,timeout:_="auto",TransitionComponent:w=Q2}=t,u=o1(t,S5),j=L.useRef(),g=L.useRef(),v=G2(),m=L.useRef(null),k=p1(m,o.ref,n),y=Z=>E=>{if(Z){const I=m.current;E===void 0?Z(I):Z(I,E)}},H=y(c),M=y((Z,E)=>{J2(Z);const{duration:I,delay:q,easing:R}=F1({style:f,timeout:_,easing:l},{mode:"enter"});let Y;_==="auto"?(Y=v.transitions.getAutoHeightDuration(Z.clientHeight),g.current=Y):Y=I,Z.style.transition=[v.transitions.create("opacity",{duration:Y,delay:q}),v.transitions.create("transform",{duration:J1?Y:Y*.666,delay:q,easing:R})].join(","),a&&a(Z,E)}),S=y(h),P=y(x),V=y(Z=>{const{duration:E,delay:I,easing:q}=F1({style:f,timeout:_,easing:l},{mode:"exit"});let R;_==="auto"?(R=v.transitions.getAutoHeightDuration(Z.clientHeight),g.current=R):R=E,Z.style.transition=[v.transitions.create("opacity",{duration:R,delay:I}),v.transitions.create("transform",{duration:J1?R:R*.666,delay:J1?I:I||R*.333,easing:q})].join(","),Z.style.opacity=0,Z.style.transform=o2(.75),d&&d(Z)}),$=y(p),T=Z=>{_==="auto"&&(j.current=setTimeout(Z,g.current||0)),i&&i(m.current,Z)};return L.useEffect(()=>()=>{clearTimeout(j.current)},[]),r.jsx(w,b({appear:s,in:C,nodeRef:m,onEnter:M,onEntered:S,onEntering:H,onExit:V,onExited:$,onExiting:P,addEndListener:T,timeout:_==="auto"?null:_},u,{children:(Z,E)=>L.cloneElement(o,b({style:b({opacity:0,transform:o2(.75),visibility:Z==="exited"&&!C?"hidden":void 0},I5[Z],f,o.props.style),ref:k},E))}))});i3.muiSupportAuto=!0;const P5=i3;function T5(e){return N1("MuiPopover",e)}R1("MuiPopover",["root","paper"]);const B5=["onEntering"],N5=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],R5=["slotProps"];function S2(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function I2(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function P2(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function e2(e){return typeof e=="function"?e():e}const O5=e=>{const{classes:t}=e;return U1({root:["root"],paper:["paper"]},T5,t)},U5=f1(E5,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),$5=f1(O3,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),z5=L.forwardRef(function(t,n){var i,s,o;const l=O1({props:t,name:"MuiPopover"}),{action:C,anchorEl:a,anchorOrigin:h={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:d="anchorEl",children:p,className:x,container:f,elevation:_=8,marginThreshold:w=16,open:u,PaperProps:j={},slots:g,slotProps:v,transformOrigin:m={vertical:"top",horizontal:"left"},TransitionComponent:k=P5,transitionDuration:y="auto",TransitionProps:{onEntering:H}={},disableScrollLock:M=!1}=l,S=o1(l.TransitionProps,B5),P=o1(l,N5),V=(i=v==null?void 0:v.paper)!=null?i:j,$=L.useRef(),T=p1($,V.ref),Z=b({},l,{anchorOrigin:h,anchorReference:d,elevation:_,marginThreshold:w,externalPaperSlotProps:V,transformOrigin:m,TransitionComponent:k,transitionDuration:y,TransitionProps:S}),E=O5(Z),I=L.useCallback(()=>{if(d==="anchorPosition")return c;const B=e2(a),n1=(B&&B.nodeType===1?B:l1($.current).body).getBoundingClientRect();return{top:n1.top+S2(n1,h.vertical),left:n1.left+I2(n1,h.horizontal)}},[a,h.horizontal,h.vertical,c,d]),q=L.useCallback(B=>({vertical:S2(B,m.vertical),horizontal:I2(B,m.horizontal)}),[m.horizontal,m.vertical]),R=L.useCallback(B=>{const W={width:B.offsetWidth,height:B.offsetHeight},n1=q(W);if(d==="none")return{top:null,left:null,transformOrigin:P2(n1)};const x2=I();let v1=x2.top-n1.vertical,_1=x2.left-n1.horizontal;const g2=v1+W.height,m2=_1+W.width,w2=T1(e2(a)),v2=w2.innerHeight-w,_2=w2.innerWidth-w;if(w!==null&&v1v2){const s1=g2-v2;v1-=s1,n1.vertical+=s1}if(w!==null&&_1_2){const s1=m2-_2;_1-=s1,n1.horizontal+=s1}return{top:`${Math.round(v1)}px`,left:`${Math.round(_1)}px`,transformOrigin:P2(n1)}},[a,d,I,q,w]),[Y,z]=L.useState(u),A=L.useCallback(()=>{const B=$.current;if(!B)return;const W=R(B);W.top!==null&&(B.style.top=W.top),W.left!==null&&(B.style.left=W.left),B.style.transformOrigin=W.transformOrigin,z(!0)},[R]);L.useEffect(()=>(M&&window.addEventListener("scroll",A),()=>window.removeEventListener("scroll",A)),[a,M,A]);const t1=(B,W)=>{H&&H(B,W),A()},G=()=>{z(!1)};L.useEffect(()=>{u&&A()}),L.useImperativeHandle(C,()=>u?{updatePosition:()=>{A()}}:null,[u,A]),L.useEffect(()=>{if(!u)return;const B=Z3(()=>{A()}),W=T1(a);return W.addEventListener("resize",B),()=>{B.clear(),W.removeEventListener("resize",B)}},[a,u,A]);let F=y;y==="auto"&&!k.muiSupportAuto&&(F=void 0);const g1=f||(a?l1(e2(a)).body:void 0),m1=(s=g==null?void 0:g.root)!=null?s:U5,H1=(o=g==null?void 0:g.paper)!=null?o:$5,M1=D1({elementType:H1,externalSlotProps:b({},V,{style:Y?V.style:b({},V.style,{opacity:0})}),additionalProps:{elevation:_,ref:T},ownerState:Z,className:d1(E.paper,V==null?void 0:V.className)}),w1=D1({elementType:m1,externalSlotProps:(v==null?void 0:v.root)||{},externalForwardedProps:P,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:g1,open:u},ownerState:Z,className:d1(E.root,x)}),{slotProps:Y1}=w1,K1=o1(w1,R5);return r.jsx(m1,b({},K1,!t3(m1)&&{slotProps:Y1,disableScrollLock:M},{children:r.jsx(k,b({appear:!0,in:u,onEntering:t1,onExited:G,timeout:F},S,{children:r.jsx(H1,b({},M1,{children:p}))}))}))}),z7=z5;function A5(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,s]of e)if(!Object.is(s,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let i=0;i{const i=e(n);return A5(t.current,i)?t.current:t.current=i}}const q5=e=>r.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:r.jsxs("g",{id:"bubble_chart",children:[r.jsx("mask",{id:"mask0_1551_42",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:r.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),r.jsx("g",{mask:"url(#mask0_1551_42)",children:r.jsx("path",{id:"bubble_chart_2",d:"M5.83333 15C4.91667 15 4.13194 14.6736 3.47917 14.0208C2.82639 13.3681 2.5 12.5833 2.5 11.6667C2.5 10.75 2.82639 9.96528 3.47917 9.3125C4.13194 8.65972 4.91667 8.33333 5.83333 8.33333C6.75 8.33333 7.53472 8.65972 8.1875 9.3125C8.84028 9.96528 9.16667 10.75 9.16667 11.6667C9.16667 12.5833 8.84028 13.3681 8.1875 14.0208C7.53472 14.6736 6.75 15 5.83333 15ZM13.75 11.6667C12.4722 11.6667 11.3889 11.2222 10.5 10.3333C9.61111 9.44444 9.16667 8.36111 9.16667 7.08333C9.16667 5.80556 9.61111 4.72222 10.5 3.83333C11.3889 2.94444 12.4722 2.5 13.75 2.5C15.0278 2.5 16.1111 2.94444 17 3.83333C17.8889 4.72222 18.3333 5.80556 18.3333 7.08333C18.3333 8.36111 17.8889 9.44444 17 10.3333C16.1111 11.2222 15.0278 11.6667 13.75 11.6667ZM12.0833 17.5C11.3889 17.5 10.7986 17.2569 10.3125 16.7708C9.82639 16.2847 9.58333 15.6944 9.58333 15C9.58333 14.3056 9.82639 13.7153 10.3125 13.2292C10.7986 12.7431 11.3889 12.5 12.0833 12.5C12.7778 12.5 13.3681 12.7431 13.8542 13.2292C14.3403 13.7153 14.5833 14.3056 14.5833 15C14.5833 15.6944 14.3403 16.2847 13.8542 16.7708C13.3681 17.2569 12.7778 17.5 12.0833 17.5Z",fill:"currentColor"})})]})}),W5=e=>r.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:r.jsxs("g",{id:"communities",children:[r.jsx("mask",{id:"mask0_1551_39",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:r.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),r.jsx("g",{mask:"url(#mask0_1551_39)",children:r.jsx("path",{id:"communities_2",d:"M7.50002 13.125C7.90494 13.125 8.24921 12.9832 8.53285 12.6995C8.81651 12.4159 8.95833 12.0716 8.95833 11.6667C8.95833 11.2618 8.81651 10.9175 8.53285 10.6339C8.24921 10.3502 7.90494 10.2084 7.50002 10.2084C7.0951 10.2084 6.75083 10.3502 6.46719 10.6339C6.18353 10.9175 6.04171 11.2618 6.04171 11.6667C6.04171 12.0716 6.18353 12.4159 6.46719 12.6995C6.75083 12.9832 7.0951 13.125 7.50002 13.125ZM12.5 13.125C12.9049 13.125 13.2492 12.9832 13.5329 12.6995C13.8165 12.4159 13.9583 12.0716 13.9583 11.6667C13.9583 11.2618 13.8165 10.9175 13.5329 10.6339C13.2492 10.3502 12.9049 10.2084 12.5 10.2084C12.0951 10.2084 11.7508 10.3502 11.4672 10.6339C11.1835 10.9175 11.0417 11.2618 11.0417 11.6667C11.0417 12.0716 11.1835 12.4159 11.4672 12.6995C11.7508 12.9832 12.0951 13.125 12.5 13.125ZM10 8.95833C10.4049 8.95833 10.7492 8.81651 11.0329 8.53285C11.3165 8.24922 11.4583 7.90494 11.4583 7.50002C11.4583 7.0951 11.3165 6.75083 11.0329 6.46719C10.7492 6.18354 10.4049 6.04171 10 6.04171C9.5951 6.04171 9.25083 6.18354 8.96719 6.46719C8.68354 6.75083 8.54171 7.0951 8.54171 7.50002C8.54171 7.90494 8.68354 8.24922 8.96719 8.53285C9.25083 8.81651 9.5951 8.95833 10 8.95833ZM10.0014 17.9167C8.90647 17.9167 7.87728 17.7089 6.91383 17.2933C5.95037 16.8778 5.1123 16.3138 4.39962 15.6015C3.68693 14.8891 3.12271 14.0514 2.70698 13.0884C2.29124 12.1253 2.08337 11.0964 2.08337 10.0014C2.08337 8.90647 2.29115 7.87728 2.70671 6.91383C3.12226 5.95037 3.68622 5.11231 4.39858 4.39963C5.11096 3.68693 5.94866 3.12272 6.91169 2.70698C7.8747 2.29124 8.90368 2.08337 9.99862 2.08337C11.0936 2.08337 12.1228 2.29115 13.0862 2.70671C14.0497 3.12226 14.8877 3.68622 15.6004 4.39858C16.3131 5.11096 16.8773 5.94866 17.2931 6.91169C17.7088 7.8747 17.9167 8.90368 17.9167 9.99863C17.9167 11.0936 17.7089 12.1228 17.2933 13.0862C16.8778 14.0497 16.3138 14.8877 15.6015 15.6004C14.8891 16.3131 14.0514 16.8773 13.0884 17.2931C12.1253 17.7088 11.0964 17.9167 10.0014 17.9167ZM10 16.6667C11.8611 16.6667 13.4375 16.0209 14.7292 14.7292C16.0209 13.4375 16.6667 11.8611 16.6667 10C16.6667 8.13891 16.0209 6.56252 14.7292 5.27085C13.4375 3.97919 11.8611 3.33335 10 3.33335C8.13891 3.33335 6.56252 3.97919 5.27085 5.27085C3.97919 6.56252 3.33335 8.13891 3.33335 10C3.33335 11.8611 3.97919 13.4375 5.27085 14.7292C6.56252 16.0209 8.13891 16.6667 10 16.6667Z",fill:"currentColor"})})]})}),G5=e=>r.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:r.jsxs("g",{id:"grain",children:[r.jsx("mask",{id:"mask0_1551_45",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:r.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),r.jsx("g",{mask:"url(#mask0_1551_45)",children:r.jsx("path",{id:"grain_2",d:"M4.99999 16.5064C4.57906 16.5064 4.22276 16.3605 3.93109 16.0689C3.63942 15.7772 3.49359 15.4209 3.49359 15C3.49359 14.5791 3.63942 14.2228 3.93109 13.9311C4.22276 13.6394 4.57906 13.4936 4.99999 13.4936C5.42092 13.4936 5.77722 13.6394 6.06888 13.9311C6.36055 14.2228 6.50638 14.5791 6.50638 15C6.50638 15.4209 6.36055 15.7772 6.06888 16.0689C5.77722 16.3605 5.42092 16.5064 4.99999 16.5064ZM11.6667 16.5064C11.2457 16.5064 10.8894 16.3605 10.5978 16.0689C10.3061 15.7772 10.1603 15.4209 10.1603 15C10.1603 14.5791 10.3061 14.2228 10.5978 13.9311C10.8894 13.6394 11.2457 13.4936 11.6667 13.4936C12.0876 13.4936 12.4439 13.6394 12.7355 13.9311C13.0272 14.2228 13.1731 14.5791 13.1731 15C13.1731 15.4209 13.0272 15.7772 12.7355 16.0689C12.4439 16.3605 12.0876 16.5064 11.6667 16.5064ZM8.33332 13.1731C7.91239 13.1731 7.55609 13.0272 7.26442 12.7355C6.97276 12.4439 6.82692 12.0876 6.82692 11.6667C6.82692 11.2457 6.97276 10.8894 7.26442 10.5978C7.55609 10.3061 7.91239 10.1603 8.33332 10.1603C8.75425 10.1603 9.11055 10.3061 9.40222 10.5978C9.69388 10.8894 9.83972 11.2457 9.83972 11.6667C9.83972 12.0876 9.69388 12.4439 9.40222 12.7355C9.11055 13.0272 8.75425 13.1731 8.33332 13.1731ZM15 13.1731C14.5791 13.1731 14.2228 13.0272 13.9311 12.7355C13.6394 12.4439 13.4936 12.0876 13.4936 11.6667C13.4936 11.2457 13.6394 10.8894 13.9311 10.5978C14.2228 10.3061 14.5791 10.1603 15 10.1603C15.4209 10.1603 15.7772 10.3061 16.0689 10.5978C16.3605 10.8894 16.5064 11.2457 16.5064 11.6667C16.5064 12.0876 16.3605 12.4439 16.0689 12.7355C15.7772 13.0272 15.4209 13.1731 15 13.1731ZM4.99999 9.83972C4.57906 9.83972 4.22276 9.69388 3.93109 9.40222C3.63942 9.11055 3.49359 8.75425 3.49359 8.33332C3.49359 7.91239 3.63942 7.55609 3.93109 7.26442C4.22276 6.97276 4.57906 6.82692 4.99999 6.82692C5.42092 6.82692 5.77722 6.97276 6.06888 7.26442C6.36055 7.55609 6.50638 7.91239 6.50638 8.33332C6.50638 8.75425 6.36055 9.11055 6.06888 9.40222C5.77722 9.69388 5.42092 9.83972 4.99999 9.83972ZM11.6667 9.83972C11.2457 9.83972 10.8894 9.69388 10.5978 9.40222C10.3061 9.11055 10.1603 8.75425 10.1603 8.33332C10.1603 7.91239 10.3061 7.55609 10.5978 7.26442C10.8894 6.97276 11.2457 6.82692 11.6667 6.82692C12.0876 6.82692 12.4439 6.97276 12.7355 7.26442C13.0272 7.55609 13.1731 7.91239 13.1731 8.33332C13.1731 8.75425 13.0272 9.11055 12.7355 9.40222C12.4439 9.69388 12.0876 9.83972 11.6667 9.83972ZM8.33332 6.50638C7.91239 6.50638 7.55609 6.36055 7.26442 6.06888C6.97276 5.77722 6.82692 5.42092 6.82692 4.99999C6.82692 4.57906 6.97276 4.22276 7.26442 3.93109C7.55609 3.63942 7.91239 3.49359 8.33332 3.49359C8.75425 3.49359 9.11055 3.63942 9.40222 3.93109C9.69388 4.22276 9.83972 4.57906 9.83972 4.99999C9.83972 5.42092 9.69388 5.77722 9.40222 6.06888C9.11055 6.36055 8.75425 6.50638 8.33332 6.50638ZM15 6.50638C14.5791 6.50638 14.2228 6.36055 13.9311 6.06888C13.6394 5.77722 13.4936 5.42092 13.4936 4.99999C13.4936 4.57906 13.6394 4.22276 13.9311 3.93109C14.2228 3.63942 14.5791 3.49359 15 3.49359C15.4209 3.49359 15.7772 3.63942 16.0689 3.93109C16.3605 4.22276 16.5064 4.57906 16.5064 4.99999C16.5064 5.42092 16.3605 5.77722 16.0689 6.06888C15.7772 6.36055 15.4209 6.50638 15 6.50638Z",fill:"currentColor"})})]})}),X5=e=>r.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:r.jsxs("g",{id:"public",children:[r.jsx("mask",{id:"mask0_1551_36",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:r.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),r.jsx("g",{mask:"url(#mask0_1551_36)",children:r.jsx("path",{id:"public_2",d:"M10.0028 17.5C8.96567 17.5 7.9906 17.3032 7.07758 16.9096C6.16457 16.516 5.37037 15.9818 4.69498 15.3071C4.0196 14.6323 3.48493 13.8389 3.09096 12.9267C2.69699 12.0145 2.5 11.0399 2.5 10.0028C2.5 8.96567 2.6968 7.9906 3.0904 7.07758C3.48401 6.16457 4.01819 5.37037 4.69294 4.69498C5.36769 4.0196 6.16114 3.48493 7.07329 3.09096C7.98546 2.69699 8.9601 2.5 9.99721 2.5C11.0343 2.5 12.0094 2.6968 12.9224 3.0904C13.8354 3.48401 14.6296 4.01819 15.305 4.69294C15.9804 5.36769 16.5151 6.16114 16.909 7.07329C17.303 7.98546 17.5 8.9601 17.5 9.99721C17.5 11.0343 17.3032 12.0094 16.9096 12.9224C16.516 13.8354 15.9818 14.6296 15.3071 15.305C14.6323 15.9804 13.8389 16.5151 12.9267 16.909C12.0145 17.303 11.0399 17.5 10.0028 17.5ZM9.16667 16.625V15C8.70833 15 8.31597 14.8368 7.98958 14.5104C7.66319 14.184 7.5 13.7917 7.5 13.3333V12.5L3.5 8.5C3.45833 8.75 3.42014 9 3.38542 9.25C3.35069 9.5 3.33333 9.75 3.33333 10C3.33333 11.6806 3.88542 13.1528 4.98958 14.4167C6.09375 15.6806 7.48611 16.4167 9.16667 16.625ZM14.9167 14.5C15.1944 14.1944 15.4444 13.8646 15.6667 13.5104C15.8889 13.1562 16.0729 12.7882 16.2187 12.4062C16.3646 12.0243 16.4757 11.6319 16.5521 11.2292C16.6285 10.8264 16.6667 10.4167 16.6667 10C16.6667 8.63083 16.2909 7.38042 15.5393 6.24877C14.7877 5.11712 13.7746 4.30129 12.5 3.80129V4.16667C12.5 4.625 12.3368 5.01736 12.0104 5.34375C11.684 5.67014 11.2917 5.83333 10.8333 5.83333H9.16667V7.5C9.16667 7.73611 9.08681 7.93403 8.92708 8.09375C8.76736 8.25347 8.56944 8.33333 8.33333 8.33333H6.66667V10H11.6667C11.9028 10 12.1007 10.0799 12.2604 10.2396C12.4201 10.3993 12.5 10.5972 12.5 10.8333V13.3333H13.3333C13.6944 13.3333 14.0208 13.441 14.3125 13.6562C14.6042 13.8715 14.8056 14.1528 14.9167 14.5Z",fill:"currentColor"})})]})});function T2(e,t,n){var i,s=1;e==null&&(e=0),t==null&&(t=0),n==null&&(n=0);function o(){var l,C=i.length,a,h=0,c=0,d=0;for(l=0;l=(a=(l+C)/2))?l=a:C=a,i=s,!(s=s[d=+c]))return i[d]=o,e;if(h=+e._x.call(null,s.data),t===h)return o.next=s,i?i[d]=o:e._root=o,e;do i=i?i[d]=new Array(2):e._root=new Array(2),(c=t>=(a=(l+C)/2))?l=a:C=a;while((d=+c)==(p=+(h>=a)));return i[p]=s,i[d]=o,e}function K5(e){Array.isArray(e)||(e=Array.from(e));const t=e.length,n=new Float64Array(t);let i=1/0,s=-1/0;for(let o=0,l;os&&(s=l));if(i>s)return this;this.cover(i).cover(s);for(let o=0;oe||e>=n;)switch(l=+(el||(o=h.x1)=d))&&(h=C[C.length-1],C[C.length-1]=C[C.length-1-c],C[C.length-1-c]=h)}else{var p=Math.abs(e-+this._x.call(null,a.data));p=(h=(l+C)/2))?l=h:C=h,t=n,!(n=n[d=+c]))return this;if(!n.length)break;t[d+1&1]&&(i=t,p=d)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,s?(o?s.next=o:delete s.next,this):t?(o?t[d]=o:delete t[d],(n=t[0]||t[1])&&n===(t[1]||t[0])&&!n.length&&(i?i[p]=n:this._root=n),this):(this._root=o,this)}function r0(e){for(var t=0,n=e.length;t=(d=(C+h)/2))?C=d:h=d,(w=n>=(p=(a+c)/2))?a=p:c=p,s=o,!(o=o[u=w<<1|_]))return s[u]=l,e;if(x=+e._x.call(null,o.data),f=+e._y.call(null,o.data),t===x&&n===f)return l.next=o,s?s[u]=l:e._root=l,e;do s=s?s[u]=new Array(4):e._root=new Array(4),(_=t>=(d=(C+h)/2))?C=d:h=d,(w=n>=(p=(a+c)/2))?a=p:c=p;while((u=w<<1|_)===(j=(f>=p)<<1|x>=d));return s[j]=o,s[u]=l,e}function h0(e){var t,n,i=e.length,s,o,l=new Array(i),C=new Array(i),a=1/0,h=1/0,c=-1/0,d=-1/0;for(n=0;nc&&(c=s),od&&(d=o));if(a>c||h>d)return this;for(this.cover(a,h).cover(c,d),n=0;ne||e>=s||i>t||t>=o;)switch(h=(tc||(C=f.y0)>d||(a=f.x1)=u)<<1|e>=w)&&(f=p[p.length-1],p[p.length-1]=p[p.length-1-_],p[p.length-1-_]=f)}else{var j=e-+this._x.call(null,x.data),g=t-+this._y.call(null,x.data),v=j*j+g*g;if(v=(p=(l+a)/2))?l=p:a=p,(_=d>=(x=(C+h)/2))?C=x:h=x,t=n,!(n=n[w=_<<1|f]))return this;if(!n.length)break;(t[w+1&3]||t[w+2&3]||t[w+3&3])&&(i=t,u=w)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,s?(o?s.next=o:delete s.next,this):t?(o?t[w]=o:delete t[w],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(i?i[u]=n:this._root=n),this):(this._root=o,this)}function g0(e){for(var t=0,n=e.length;t=(f=(a+d)/2))?a=f:d=f,(m=n>=(_=(h+p)/2))?h=_:p=_,(k=i>=(w=(c+x)/2))?c=w:x=w,o=l,!(l=l[y=k<<2|m<<1|v]))return o[y]=C,e;if(u=+e._x.call(null,l.data),j=+e._y.call(null,l.data),g=+e._z.call(null,l.data),t===u&&n===j&&i===g)return C.next=l,o?o[y]=C:e._root=C,e;do o=o?o[y]=new Array(8):e._root=new Array(8),(v=t>=(f=(a+d)/2))?a=f:d=f,(m=n>=(_=(h+p)/2))?h=_:p=_,(k=i>=(w=(c+x)/2))?c=w:x=w;while((y=k<<2|m<<1|v)===(H=(g>=w)<<2|(j>=_)<<1|u>=f));return o[H]=l,o[y]=C,e}function M0(e){Array.isArray(e)||(e=Array.from(e));const t=e.length,n=new Float64Array(t),i=new Float64Array(t),s=new Float64Array(t);let o=1/0,l=1/0,C=1/0,a=-1/0,h=-1/0,c=-1/0;for(let d=0,p,x,f,_;da&&(a=x),fh&&(h=f),_c&&(c=_));if(o>a||l>h||C>c)return this;this.cover(o,l,C).cover(a,h,c);for(let d=0;de||e>=l||s>t||t>=C||o>n||n>=a;)switch(p=(nf||(h=g.y0)>_||(c=g.z0)>w||(d=g.x1)=y)<<2|(t>=k)<<1|e>=m)&&(g=u[u.length-1],u[u.length-1]=u[u.length-1-v],u[u.length-1-v]=g)}else{var H=e-+this._x.call(null,j.data),M=t-+this._y.call(null,j.data),S=n-+this._z.call(null,j.data),P=H*H+M*M+S*S;if(P=(_=(l+h)/2))?l=_:h=_,(g=x>=(w=(C+c)/2))?C=w:c=w,(v=f>=(u=(a+d)/2))?a=u:d=u,t=n,!(n=n[m=v<<2|g<<1|j]))return this;if(!n.length)break;(t[m+1&7]||t[m+2&7]||t[m+3&7]||t[m+4&7]||t[m+5&7]||t[m+6&7]||t[m+7&7])&&(i=t,k=m)}for(;n.data!==e;)if(s=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,s?(o?s.next=o:delete s.next,this):t?(o?t[m]=o:delete t[m],(n=t[0]||t[1]||t[2]||t[3]||t[4]||t[5]||t[6]||t[7])&&n===(t[7]||t[6]||t[5]||t[4]||t[3]||t[2]||t[1]||t[0])&&!n.length&&(i?i[k]=n:this._root=n),this):(this._root=o,this)}function I0(e){for(var t=0,n=e.length;t1&&(_=x.y+x.vy),n>2&&(w=x.z+x.vz),p.visit(v);function v(m,k,y,H,M,S,P){var V=[k,y,H,M,S,P],$=V[0],T=V[1],Z=V[2],E=V[n],I=V[n+1],q=V[n+2],R=m.data,Y=m.r,z=u+Y;if(R){if(R.index>x.index){var A=f-R.x-R.vx,t1=n>1?_-R.y-R.vy:0,G=n>2?w-R.z-R.vz:0,F=A*A+t1*t1+G*G;F1&&t1===0&&(t1=i1(s),F+=t1*t1),n>2&&G===0&&(G=i1(s),F+=G*G),F=(z-(F=Math.sqrt(F)))/F*o,x.vx+=(A*=F)*(z=(Y*=Y)/(j+Y)),n>1&&(x.vy+=(t1*=F)*z),n>2&&(x.vz+=(G*=F)*z),R.vx-=A*(z=1-z),n>1&&(R.vy-=t1*z),n>2&&(R.vz-=G*z))}return}return $>f+z||E1&&(T>_+z||I<_-z)||n>2&&(Z>w+z||qc.r&&(c.r=c[d].r)}function h(){if(t){var c,d=t.length,p;for(i=new Array(d),c=0;ctypeof p=="function")||Math.random,n=d.find(p=>[1,2,3].includes(p))||2,h()},C.iterations=function(c){return arguments.length?(l=+c,C):l},C.strength=function(c){return arguments.length?(o=+c,C):o},C.radius=function(c){return arguments.length?(e=typeof c=="function"?c:Q(+c),h(),C):e},C}function D0(e){return e.index}function U2(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function q0(e){var t=D0,n=p,i,s=Q(30),o,l,C,a,h,c,d=1;e==null&&(e=[]);function p(u){return 1/Math.min(a[u.source.index],a[u.target.index])}function x(u){for(var j=0,g=e.length;j1&&(M=y.y+y.vy-k.y-k.vy||i1(c)),C>2&&(S=y.z+y.vz-k.z-k.vz||i1(c)),P=Math.sqrt(H*H+M*M+S*S),P=(P-o[v])/P*u*i[v],H*=P,M*=P,S*=P,y.vx-=H*(V=h[v]),C>1&&(y.vy-=M*V),C>2&&(y.vz-=S*V),k.vx+=H*(V=1-V),C>1&&(k.vy+=M*V),C>2&&(k.vz+=S*V)}function f(){if(l){var u,j=l.length,g=e.length,v=new Map(l.map((k,y)=>[t(k,y,l),k])),m;for(u=0,a=new Array(j);utypeof g=="function")||Math.random,C=j.find(g=>[1,2,3].includes(g))||2,f()},x.links=function(u){return arguments.length?(e=u,f(),x):e},x.id=function(u){return arguments.length?(t=u,x):t},x.iterations=function(u){return arguments.length?(d=+u,x):d},x.strength=function(u){return arguments.length?(n=typeof u=="function"?u:Q(+u),_(),x):n},x.distance=function(u){return arguments.length?(s=typeof u=="function"?u:Q(+u),w(),x):s},x}var W0={value:()=>{}};function C3(){for(var e=0,t=arguments.length,n={},i;e=0&&(i=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}z1.prototype=C3.prototype={constructor:z1,on:function(e,t){var n=this._,i=G0(e+"",n),s,o=-1,l=i.length;if(arguments.length<2){for(;++o0)for(var n=new Array(s),i=0,s,o;i=0&&e._call.call(void 0,t),e=e._next;--L1}function z2(){u1=(W1=B1.now())+X1,L1=S1=0;try{K0()}finally{L1=0,J0(),u1=0}}function Q0(){var e=B1.now(),t=e-W1;t>a3&&(X1-=t,W1=e)}function J0(){for(var e,t=q1,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:q1=n);I1=e,C2(i)}function C2(e){if(!L1){S1&&(S1=clearTimeout(S1));var t=e-u1;t>24?(e<1/0&&(S1=setTimeout(z2,e-B1.now()-X1)),V1&&(V1=clearInterval(V1))):(V1||(W1=B1.now(),V1=setInterval(Q0,a3)),L1=1,c3(z2))}}const e6=1664525,t6=1013904223,A2=4294967296;function n6(){let e=1;return()=>(e=(e6*e+t6)%A2)/A2}var F2=3;function r2(e){return e.x}function D2(e){return e.y}function r6(e){return e.z}var i6=10,s6=Math.PI*(3-Math.sqrt(5)),o6=Math.PI*20/(9+Math.sqrt(221));function l6(e,t){t=t||2;var n=Math.min(F2,Math.max(1,Math.round(t))),i,s=1,o=.001,l=1-Math.pow(o,1/300),C=0,a=.6,h=new Map,c=d3(x),d=C3("tick","end"),p=n6();e==null&&(e=[]);function x(){f(),d.call("tick",i),s1&&(v.fy==null?v.y+=v.vy*=a:(v.y=v.fy,v.vy=0)),n>2&&(v.fz==null?v.z+=v.vz*=a:(v.z=v.fz,v.vz=0));return i}function _(){for(var u=0,j=e.length,g;u1&&isNaN(g.y)||n>2&&isNaN(g.z)){var v=i6*(n>2?Math.cbrt(.5+u):n>1?Math.sqrt(.5+u):u),m=u*s6,k=u*o6;n===1?g.x=v:n===2?(g.x=v*Math.cos(m),g.y=v*Math.sin(m)):(g.x=v*Math.sin(m)*Math.cos(k),g.y=v*Math.cos(m),g.z=v*Math.sin(m)*Math.sin(k))}(isNaN(g.vx)||n>1&&isNaN(g.vy)||n>2&&isNaN(g.vz))&&(g.vx=0,n>1&&(g.vy=0),n>2&&(g.vz=0))}}function w(u){return u.initialize&&u.initialize(e,p,n),u}return _(),i={tick:f,restart:function(){return c.restart(x),i},stop:function(){return c.stop(),i},numDimensions:function(u){return arguments.length?(n=Math.min(F2,Math.max(1,Math.round(u))),h.forEach(w),i):n},nodes:function(u){return arguments.length?(e=u,_(),h.forEach(w),i):e},alpha:function(u){return arguments.length?(s=+u,i):s},alphaMin:function(u){return arguments.length?(o=+u,i):o},alphaDecay:function(u){return arguments.length?(l=+u,i):+l},alphaTarget:function(u){return arguments.length?(C=+u,i):C},velocityDecay:function(u){return arguments.length?(a=1-u,i):1-a},randomSource:function(u){return arguments.length?(p=u,h.forEach(w),i):p},force:function(u,j){return arguments.length>1?(j==null?h.delete(u):h.set(u,w(j)),i):h.get(u)},find:function(){var u=Array.prototype.slice.call(arguments),j=u.shift()||0,g=(n>1?u.shift():null)||0,v=(n>2?u.shift():null)||0,m=u.shift()||1/0,k=0,y=e.length,H,M,S,P,V,$;for(m*=m,k=0;k1?(d.on(u,j),i):d.on(u)}}}function C6(){var e,t,n,i,s,o=Q(-30),l,C=1,a=1/0,h=.81;function c(f){var _,w=e.length,u=(t===1?c2(e,r2):t===2?d2(e,r2,D2):t===3?f2(e,r2,D2,r6):null).visitAfter(p);for(s=f,_=0;_1&&(f.y=v/j),t>2&&(f.z=m/j)}else{w=f,w.x=w.data.x,t>1&&(w.y=w.data.y),t>2&&(w.z=w.data.z);do _+=l[w.data.index];while(w=w.next)}f.value=_}function x(f,_,w,u,j){if(!f.value)return!0;var g=[w,u,j][t-1],v=f.x-n.x,m=t>1?f.y-n.y:0,k=t>2?f.z-n.z:0,y=g-_,H=v*v+m*m+k*k;if(y*y/h1&&m===0&&(m=i1(i),H+=m*m),t>2&&k===0&&(k=i1(i),H+=k*k),H1&&(n.vy+=m*f.value*s/H),t>2&&(n.vz+=k*f.value*s/H)),!0;if(f.length||H>=a)return;(f.data!==n||f.next)&&(v===0&&(v=i1(i),H+=v*v),t>1&&m===0&&(m=i1(i),H+=m*m),t>2&&k===0&&(k=i1(i),H+=k*k),H1&&(n.vy+=m*y),t>2&&(n.vz+=k*y));while(f=f.next)}return c.initialize=function(f,..._){e=f,i=_.find(w=>typeof w=="function")||Math.random,t=_.find(w=>[1,2,3].includes(w))||2,d()},c.strength=function(f){return arguments.length?(o=typeof f=="function"?f:Q(+f),d(),c):o},c.distanceMin=function(f){return arguments.length?(C=f*f,c):Math.sqrt(C)},c.distanceMax=function(f){return arguments.length?(a=f*f,c):Math.sqrt(a)},c.theta=function(f){return arguments.length?(h=f*f,c):Math.sqrt(h)},c}function q2(e,t,n,i){var s,o,l=Q(.1),C,a;typeof e!="function"&&(e=Q(+e)),t==null&&(t=0),n==null&&(n=0),i==null&&(i=0);function h(d){for(var p=0,x=s.length;p1&&(f.vy+=w*g),o>2&&(f.vz+=u*g)}}function c(){if(s){var d,p=s.length;for(C=new Array(p),a=new Array(p),d=0;d[1,2,3].includes(x))||2,c()},h.strength=function(d){return arguments.length?(l=typeof d=="function"?d:Q(+d),c(),h):l},h.radius=function(d){return arguments.length?(e=typeof d=="function"?d:Q(+d),c(),h):e},h.x=function(d){return arguments.length?(t=+d,h):t},h.y=function(d){return arguments.length?(n=+d,h):n},h.z=function(d){return arguments.length?(i=+d,h):i},h}function a6(e){var t=Q(.1),n,i,s;typeof e!="function"&&(e=Q(e==null?0:+e));function o(C){for(var a=0,h=n.length,c;a{},setForces:()=>{},addRadialForce:()=>{},addDefaultForce:()=>{},addSplitForce:()=>{},simulationRestart:()=>{},getLinks:()=>[]},h6={data:null,simulation:null,selectionGraphData:{nodes:[],links:[]},disableCameraRotation:!1,scrollEventsDisabled:!1,graphRadius:1500,graphStyle:"sphere",hoveredNode:null,selectedNode:null,activeEdge:null,cameraFocusTrigger:!1,nearbyNodeIds:[],showSelectionGraph:!1,simulationHelpers:c6,isHovering:!1},x1=X2()((e,t)=>({...h6,setData:n=>{e({data:n})},setSelectionData:n=>e({selectionGraphData:n}),setScrollEventsDisabled:n=>e({scrollEventsDisabled:n}),setDisableCameraRotation:n=>e({disableCameraRotation:n}),setIsHovering:n=>e({isHovering:n}),setGraphRadius:n=>e({graphRadius:n}),setGraphStyle:n=>e({graphStyle:"sphere"}),setHoveredNode:n=>{e({hoveredNode:n})},setActiveEdge:n=>{e({activeEdge:n})},setSelectedNode:n=>{const{selectedNode:i,simulation:s}=t();if((i==null?void 0:i.ref_id)!==(n==null?void 0:n.ref_id)){const o=s.nodes().find(l=>l.ref_id===(n==null?void 0:n.ref_id))||null;e({hoveredNode:null,selectedNode:o,disableCameraRotation:!0})}},setCameraFocusTrigger:n=>e({cameraFocusTrigger:n}),setNearbyNodeIds:n=>{const i=t().nearbyNodeIds;(n.length!==i.length||n[0]!==i[0])&&e({nearbyNodeIds:n})},setShowSelectionGraph:n=>e({showSelectionGraph:n}),simulationHelpers:{addNodesAndLinks:(n,i,s)=>{const{simulation:o,simulationHelpers:l}=t();o.stop();const C=structuredClone(n),a=structuredClone(i);o.stop();const h=s?[]:o.nodes(),c=s?[]:o.force("link").links();h.push(...C),c.push(...a);try{o.nodes(h),o.force("link").links([]).links(c),l.simulationRestart()}catch(d){console.error(d)}},addRadialForce:()=>{const{simulation:n}=t();n.nodes(n.nodes().map(i=>({...i,...i2}))).force("y",null).force("radial",q2(200,0,0,0).strength(.1)).force("center",T2().strength(1)).force("collide",n2().radius(()=>250).strength(1).iterations(1))},addDefaultForce:()=>{const{simulation:n}=t();n.nodes(n.nodes().map(i=>({...i,...i2}))).force("y",null).force("charge",C6().strength(-20)).force("center",T2().strength(1)).force("collide",n2().radius(()=>250).strength(1).iterations(1))},addSplitForce:()=>{const{simulation:n}=t(),{nodeTypes:i}=G1.getState();n.stop().nodes(n.nodes().map(s=>({...s,...i2}))).force("radial",q2(200,0,0,0).strength(.1)).force("collide",n2().radius(()=>250).strength(1).iterations(1)).force("y",a6().y(s=>{const o=i.indexOf(s.node_type),l=Math.floor(o/2)*400;return o%2===0?l:-l}).strength(10))},getLinks:()=>{const{simulation:n}=t();return n?n.force("link").links():[]},setForces:()=>{const{graphStyle:n,simulationHelpers:i}=t();n==="split"&&i.addSplitForce(),n==="sphere"&&i.addRadialForce(),n==="force"&&i.addDefaultForce(),i.simulationRestart()},simulationRestart:()=>{const{simulation:n}=t();n.alpha(1).restart()}},simulationCreate:(n,i)=>{const s=structuredClone(n),o=structuredClone(i),l=l6([]).numDimensions(3).stop().nodes(s).force("link",q0().links(o).id(C=>C.ref_id));e({simulation:l})}})),u3=()=>x1(e=>e.selectedNode),A7=()=>x1(e=>e.hoveredNode),d6=()=>x1(e=>e.setSelectedNode),F7=()=>{const e=x1(s=>s.selectedNode);if(!e)return[];const{dataInitial:t}=G1.getState();return((t==null?void 0:t.links)||[]).reduce((s,o)=>(o.source===(e==null?void 0:e.ref_id)&&s.push(o.target),o.target===(e==null?void 0:e.ref_id)&&s.push(o.source),s),[])},u6=()=>(x1(D5(e=>[e.graphStyle,e.setGraphStyle])),null);D(O).attrs({direction:"row",align:"center",justify:"space-between"})` padding: 6px 6px 6px 11px; background: ${U.BG1}; border-radius: 200px; diff --git a/build/assets/index-17ed06be.js b/build/assets/index-787c3ef8.js similarity index 99% rename from build/assets/index-17ed06be.js rename to build/assets/index-787c3ef8.js index 855e5e304..23e57e100 100644 --- a/build/assets/index-17ed06be.js +++ b/build/assets/index-787c3ef8.js @@ -831,4 +831,4 @@ PROCEED WITH CAUTION! align-items: center; width: 100%; height: 100%; -`,LazyApp=reactExports.lazy(()=>__vitePreload(()=>import("./index-10fd1675.js").then(et=>et.i),["assets/index-10fd1675.js","assets/index-2f22123e.js"]).then(({App:et})=>({default:et}))),LazyMindSet=reactExports.lazy(()=>__vitePreload(()=>import("./index-761a8d1c.js"),["assets/index-761a8d1c.js","assets/index-edf7575c.js","assets/index-6cd4b515.js","assets/three.module-9c942ca6.js","assets/index-6f7e416d.js","assets/index-2f22123e.js","assets/TextareaAutosize-f571cf36.js","assets/index-053bf7ca.js","assets/ClipLoader-96bb9f4d.js","assets/index-ed087dc3.js","assets/Skeleton-4c8a0434.js","assets/Stack-a8b59155.js","assets/isPlainObject-9d6a7051.js","assets/Typography-5718a5a5.js","assets/createSvgIcon-6ef3ed46.js","assets/index-432a2a9e.js"]).then(({MindSet:et})=>({default:et}))),AppContainer=()=>{var tt;const et=((tt=window.location)==null?void 0:tt.hostname)==="graphmindset.sphinx.chat"||window.location.hostname==="localhost"&&!isE2E;return jsxRuntimeExports.jsxs(AppProviders,{children:[jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx("div",{children:"Loading..."}),children:jsxRuntimeExports.jsxs(Routes,{children:[et&&jsxRuntimeExports.jsx(Route,{element:jsxRuntimeExports.jsx(LazyMindSet,{}),path:"/"}),jsxRuntimeExports.jsx(Route,{element:jsxRuntimeExports.jsx(AuthGuard,{children:jsxRuntimeExports.jsx(LazyApp,{})}),path:"/"}),jsxRuntimeExports.jsx(Route,{element:jsxRuntimeExports.jsx(AuthGuard,{children:jsxRuntimeExports.jsx(LazyApp,{})}),path:"/search"}),jsxRuntimeExports.jsx(Route,{element:jsxRuntimeExports.jsx(AuthGuard,{children:jsxRuntimeExports.jsx(LazyApp,{})}),path:"*"})]})}),jsxRuntimeExports.jsx(E2ETests,{})]})},index="",root=client$1.createRoot(document.getElementById("root"));root.render(isE2E?jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsx(AppContainer,{})}):jsxRuntimeExports.jsx(React.StrictMode,{children:jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsx(AppContainer,{})})}));reportWebVitals();overrideConsole();export{useEnhancedEffect$1 as $,clsx as A,Button$1 as B,ClearIcon as C,fetchNodeEdges as D,getNode as E,Flex as F,_inheritsLoose as G,_objectWithoutPropertiesLoose as H,InfoIcon as I,React as J,TransitionGroupContext as K,generateUtilityClass as L,generateUtilityClasses as M,NODE_ADD_ERROR as N,styled$1 as O,alpha as P,Q,ReactDOM as R,useThemeProps as S,Text as T,clsx$2 as U,composeClasses as V,We as W,ButtonBase$1 as X,capitalize as Y,useForkRef as Z,__vitePreload as _,colors as a,RSS as a$,setRef as a0,reactDomExports as a1,useEventCallback as a2,useTheme as a3,devtools as a4,LinearProgress$1 as a5,SocketContext as a6,isSphinx as a7,$2AODx$react as a8,getDefaultExportFromCjs as a9,_Symbol as aA,isArguments_1 as aB,isArray_1 as aC,_arrayPush as aD,_baseUnary as aE,_defineProperty as aF,eq_1 as aG,isArrayLike_1 as aH,_isIndex as aI,isObject_1 as aJ,_root as aK,_baseAssignValue as aL,keys_1 as aM,MdBolt as aN,getFullTranscript as aO,MdPlayArrow as aP,MdAccessTime as aQ,getAugmentedNamespace as aR,useHasAiChats as aS,postAboutData as aT,SuccessNotify as aU,TextInput as aV,requiredRule as aW,MdError as aX,BaseModal as aY,TWITTER_HANDLE as aZ,YOUTUBE_CHANNEL as a_,useNodeTypes as aa,NODE_RELATIVE_HIGHLIGHT_COLORS as ab,MdViewInAr as ac,MdClose as ad,addToGlobalForE2e as ae,isDevelopment as af,distExports$1 as ag,executeIfProd as ah,useIsFocusVisible as ai,rootShouldForwardProp as aj,lighten as ak,darken as al,slotShouldForwardProp as am,Ce as an,useFormContext as ao,useHasAiChatsResponseLoading as ap,Ue as aq,hooks as ar,commonjsGlobal as as,commonjsRequire as at,useFilteredNodes as au,_baseGetTag as av,isObjectLike_1 as aw,isObject$8 as ax,isFunction$4 as ay,_Set as az,useUserStore as b,THEME_ID as b$,GITHUB_REPOSITORY as b0,LINK as b1,TWITTER_SOURCE as b2,WEB_PAGE as b3,DOCUMENT as b4,getPriceData as b5,isE2E as b6,sphinxBridge as b7,getLSat as b8,payLsat as b9,updateEdgeType as bA,postBluePrintType as bB,deleteEdgeType as bC,cloneDeep_1 as bD,useFieldArray as bE,OptionTypes as bF,NoParent as bG,editNodeSchemaUpdate as bH,createRoot as bI,react as bJ,GRAPH_GROUND_COLOR as bK,GRAPH_LIGHT_INTENSITY as bL,_MapCache as bM,_Uint8Array as bN,_getAllKeys as bO,_Stack as bP,_getTag as bQ,isBufferExports as bR,isTypedArray_1 as bS,isLength_1 as bT,_getPrototype as bU,request as bV,buffer$2 as bW,sphinx$1 as bX,Global as bY,useTheme$2 as bZ,defaultTheme$1 as b_,noSpacePattern as ba,getNodeType as bb,getNodeSchemaTypes as bc,OPTIONS as bd,initialValue as be,getNodeContent as bf,MdCheckCircle as bg,MdCancel as bh,approveRadarData as bi,deleteRadarData as bj,getRadarData as bk,BaseTextInput as bl,MdCheck as bm,putRadarData as bn,getEdgeTypes as bo,getEdges as bp,postEdgeType as bq,putNodeData as br,postMergeTopics as bs,getTopicsData as bt,deleteNode as bu,keyframes as bv,css as bw,changeNodeType as bx,resolveBreakpointValues as by,handleBreakpoints as bz,create as c,formatMuiErrorMessage as c0,deepmerge as c1,defaultSxConfig$1 as c2,isPlainObject$1 as c3,createStyled as c4,createTheme$1 as c5,useThemeProps$1 as c6,createUnarySpacing as c7,mergeBreakpointsInOrder as c8,getValue as c9,useTheme$3 as ca,index$1 as cb,useSchemaStore as d,useModal as e,getStats as f,getTotalProcessing as g,formatStatsResponse as h,lodashExports as i,jsxRuntimeExports as j,useAppStore as k,lottie as l,media as m,useAiSummaryStore as n,useNavigate as o,useSearchParams as p,useFeatureFlagStore as q,reactExports as r,styled$3 as s,useForm as t,useDataStore as u,FormProvider as v,updateBudget as w,_extends as x,getSchemaAll as y,api$1 as z}; +`,LazyApp=reactExports.lazy(()=>__vitePreload(()=>import("./index-cefe14af.js").then(et=>et.i),["assets/index-cefe14af.js","assets/index-77dce891.js"]).then(({App:et})=>({default:et}))),LazyMindSet=reactExports.lazy(()=>__vitePreload(()=>import("./index-49d70c3e.js"),["assets/index-49d70c3e.js","assets/index-562bc714.js","assets/index-64d5234f.js","assets/three.module-9c942ca6.js","assets/index-94d47251.js","assets/index-77dce891.js","assets/TextareaAutosize-e216d6db.js","assets/index-2cd18ef8.js","assets/ClipLoader-0106d300.js","assets/index-d501a02f.js","assets/Skeleton-fe703092.js","assets/Stack-b3992130.js","assets/isPlainObject-528c68e4.js","assets/Typography-02db806b.js","assets/createSvgIcon-fa140fa5.js","assets/index-90c40e8b.js"]).then(({MindSet:et})=>({default:et}))),AppContainer=()=>{var tt;const et=((tt=window.location)==null?void 0:tt.hostname)==="graphmindset.sphinx.chat"||window.location.hostname==="localhost"&&!isE2E;return jsxRuntimeExports.jsxs(AppProviders,{children:[jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx("div",{children:"Loading..."}),children:jsxRuntimeExports.jsxs(Routes,{children:[et&&jsxRuntimeExports.jsx(Route,{element:jsxRuntimeExports.jsx(LazyMindSet,{}),path:"/"}),jsxRuntimeExports.jsx(Route,{element:jsxRuntimeExports.jsx(AuthGuard,{children:jsxRuntimeExports.jsx(LazyApp,{})}),path:"/"}),jsxRuntimeExports.jsx(Route,{element:jsxRuntimeExports.jsx(AuthGuard,{children:jsxRuntimeExports.jsx(LazyApp,{})}),path:"/search"}),jsxRuntimeExports.jsx(Route,{element:jsxRuntimeExports.jsx(AuthGuard,{children:jsxRuntimeExports.jsx(LazyApp,{})}),path:"*"})]})}),jsxRuntimeExports.jsx(E2ETests,{})]})},index="",root=client$1.createRoot(document.getElementById("root"));root.render(isE2E?jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsx(AppContainer,{})}):jsxRuntimeExports.jsx(React.StrictMode,{children:jsxRuntimeExports.jsx(BrowserRouter,{children:jsxRuntimeExports.jsx(AppContainer,{})})}));reportWebVitals();overrideConsole();export{useEnhancedEffect$1 as $,clsx as A,Button$1 as B,ClearIcon as C,fetchNodeEdges as D,getNode as E,Flex as F,_inheritsLoose as G,_objectWithoutPropertiesLoose as H,InfoIcon as I,React as J,TransitionGroupContext as K,generateUtilityClass as L,generateUtilityClasses as M,NODE_ADD_ERROR as N,styled$1 as O,alpha as P,Q,ReactDOM as R,useThemeProps as S,Text as T,clsx$2 as U,composeClasses as V,We as W,ButtonBase$1 as X,capitalize as Y,useForkRef as Z,__vitePreload as _,colors as a,RSS as a$,setRef as a0,reactDomExports as a1,useEventCallback as a2,useTheme as a3,devtools as a4,LinearProgress$1 as a5,SocketContext as a6,isSphinx as a7,$2AODx$react as a8,getDefaultExportFromCjs as a9,_Symbol as aA,isArguments_1 as aB,isArray_1 as aC,_arrayPush as aD,_baseUnary as aE,_defineProperty as aF,eq_1 as aG,isArrayLike_1 as aH,_isIndex as aI,isObject_1 as aJ,_root as aK,_baseAssignValue as aL,keys_1 as aM,MdBolt as aN,getFullTranscript as aO,MdPlayArrow as aP,MdAccessTime as aQ,getAugmentedNamespace as aR,useHasAiChats as aS,postAboutData as aT,SuccessNotify as aU,TextInput as aV,requiredRule as aW,MdError as aX,BaseModal as aY,TWITTER_HANDLE as aZ,YOUTUBE_CHANNEL as a_,useNodeTypes as aa,NODE_RELATIVE_HIGHLIGHT_COLORS as ab,MdViewInAr as ac,MdClose as ad,addToGlobalForE2e as ae,isDevelopment as af,distExports$1 as ag,executeIfProd as ah,useIsFocusVisible as ai,rootShouldForwardProp as aj,lighten as ak,darken as al,slotShouldForwardProp as am,Ce as an,useFormContext as ao,useHasAiChatsResponseLoading as ap,Ue as aq,hooks as ar,commonjsGlobal as as,commonjsRequire as at,useFilteredNodes as au,_baseGetTag as av,isObjectLike_1 as aw,isObject$8 as ax,isFunction$4 as ay,_Set as az,useUserStore as b,THEME_ID as b$,GITHUB_REPOSITORY as b0,LINK as b1,TWITTER_SOURCE as b2,WEB_PAGE as b3,DOCUMENT as b4,getPriceData as b5,isE2E as b6,sphinxBridge as b7,getLSat as b8,payLsat as b9,updateEdgeType as bA,postBluePrintType as bB,deleteEdgeType as bC,cloneDeep_1 as bD,useFieldArray as bE,OptionTypes as bF,NoParent as bG,editNodeSchemaUpdate as bH,createRoot as bI,react as bJ,GRAPH_GROUND_COLOR as bK,GRAPH_LIGHT_INTENSITY as bL,_MapCache as bM,_Uint8Array as bN,_getAllKeys as bO,_Stack as bP,_getTag as bQ,isBufferExports as bR,isTypedArray_1 as bS,isLength_1 as bT,_getPrototype as bU,request as bV,buffer$2 as bW,sphinx$1 as bX,Global as bY,useTheme$2 as bZ,defaultTheme$1 as b_,noSpacePattern as ba,getNodeType as bb,getNodeSchemaTypes as bc,OPTIONS as bd,initialValue as be,getNodeContent as bf,MdCheckCircle as bg,MdCancel as bh,approveRadarData as bi,deleteRadarData as bj,getRadarData as bk,BaseTextInput as bl,MdCheck as bm,putRadarData as bn,getEdgeTypes as bo,getEdges as bp,postEdgeType as bq,putNodeData as br,postMergeTopics as bs,getTopicsData as bt,deleteNode as bu,keyframes as bv,css as bw,changeNodeType as bx,resolveBreakpointValues as by,handleBreakpoints as bz,create as c,formatMuiErrorMessage as c0,deepmerge as c1,defaultSxConfig$1 as c2,isPlainObject$1 as c3,createStyled as c4,createTheme$1 as c5,useThemeProps$1 as c6,createUnarySpacing as c7,mergeBreakpointsInOrder as c8,getValue as c9,useTheme$3 as ca,index$1 as cb,useSchemaStore as d,useModal as e,getStats as f,getTotalProcessing as g,formatStatsResponse as h,lodashExports as i,jsxRuntimeExports as j,useAppStore as k,lottie as l,media as m,useAiSummaryStore as n,useNavigate as o,useSearchParams as p,useFeatureFlagStore as q,reactExports as r,styled$3 as s,useForm as t,useDataStore as u,FormProvider as v,updateBudget as w,_extends as x,getSchemaAll as y,api$1 as z}; diff --git a/build/assets/index-1f130f3c.js b/build/assets/index-792a21d1.js similarity index 96% rename from build/assets/index-1f130f3c.js rename to build/assets/index-792a21d1.js index c873afb7f..d891ca3b0 100644 --- a/build/assets/index-1f130f3c.js +++ b/build/assets/index-792a21d1.js @@ -1,4 +1,4 @@ -import{s as v,a as B,T as F,F as r,r as f,ao as $,j as e,aV as J,aW as K,ba as Q,B as E,bb as U,q as X,bc as Z,e as D,t as N,N as O,aY as ee,v as te,bt as ne,bx as re}from"./index-17ed06be.js";import{p as V}from"./index-83069401.js";import{C as W}from"./ClipLoader-96bb9f4d.js";import{n as Y}from"./index-2f22123e.js";import{A as G}from"./index-9261e06d.js";import{c as oe}from"./index-64f1c910.js";import"./three.module-9c942ca6.js";import"./Stack-a8b59155.js";import"./createSvgIcon-6ef3ed46.js";import"./TextareaAutosize-f571cf36.js";const q=a=>a.charAt(0).toUpperCase()+a.slice(1).replace(/_/g," "),k=a=>a?[...a].sort((l,x)=>Number(x.required)-Number(l.required)):[],H=a=>a?a.filter(l=>l.key!=="node_key"):[],ae=({handleSelectType:a,skipToStep:l,nodeType:x,selectedValues:n})=>{const[h,w]=f.useState(!1),[m,C]=f.useState(),{watch:j,formState:{isValid:t}}=$();f.useEffect(()=>{(async()=>{w(!0);const o=await U(x),T=V(o),A=H(T);C(A),w(!1)})()},[x,j]);const s=c=>c.charAt(0).toUpperCase()+c.slice(1).replace(/_/g," "),p=(m?[...m].sort((c,o)=>c.required&&!o.required?-1:!c.required&&o.required?1:0):[]).filter(c=>!!(c.required&&!Object.values(n).includes(c.key))),S=()=>{a(""),l("sourceType")},b=!t||h||p.some(c=>{var o;return c.required&&!((o=j(c.key))!=null&&o.trim())});return e.jsxs(r,{children:[e.jsx(r,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(r,{align:"center",direction:"row",children:e.jsx(se,{children:"Required Properties"})})}),e.jsx(ie,{children:h?e.jsx(r,{style:{margin:"auto"},children:e.jsx(W,{color:B.SECONDARY_BLUE})}):e.jsx(r,{className:"input__wrapper",children:p==null?void 0:p.map(({key:c,required:o})=>e.jsx(e.Fragment,{children:e.jsxs(ce,{children:[e.jsx(F,{children:s(c)}),e.jsx(J,{id:"item-name",maxLength:50,name:c,placeholder:o?"Required":"Optional",rules:{...o?{...K,pattern:{message:"No leading whitespace allowed",value:Q}}:{}}})]})}))})}),e.jsxs(r,{direction:"row",children:[e.jsx(r,{grow:1,children:e.jsx(E,{color:"secondary",onClick:S,size:"large",variant:"contained",children:"Prev"})}),e.jsx(r,{grow:1,ml:20,children:e.jsx(E,{color:"secondary",disabled:b,onClick:()=>l("createConfirmation"),size:"large",variant:"contained",children:"Next"})})]})]})},se=v(F)` +import{s as v,a as B,T as F,F as r,r as f,ao as $,j as e,aV as J,aW as K,ba as Q,B as E,bb as U,q as X,bc as Z,e as D,t as N,N as O,aY as ee,v as te,bt as ne,bx as re}from"./index-787c3ef8.js";import{p as V}from"./index-83069401.js";import{C as W}from"./ClipLoader-0106d300.js";import{n as Y}from"./index-77dce891.js";import{A as G}from"./index-efed0068.js";import{c as oe}from"./index-64f1c910.js";import"./three.module-9c942ca6.js";import"./Stack-b3992130.js";import"./createSvgIcon-fa140fa5.js";import"./TextareaAutosize-e216d6db.js";const q=a=>a.charAt(0).toUpperCase()+a.slice(1).replace(/_/g," "),k=a=>a?[...a].sort((l,x)=>Number(x.required)-Number(l.required)):[],H=a=>a?a.filter(l=>l.key!=="node_key"):[],ae=({handleSelectType:a,skipToStep:l,nodeType:x,selectedValues:n})=>{const[h,w]=f.useState(!1),[m,C]=f.useState(),{watch:j,formState:{isValid:t}}=$();f.useEffect(()=>{(async()=>{w(!0);const o=await U(x),T=V(o),A=H(T);C(A),w(!1)})()},[x,j]);const s=c=>c.charAt(0).toUpperCase()+c.slice(1).replace(/_/g," "),p=(m?[...m].sort((c,o)=>c.required&&!o.required?-1:!c.required&&o.required?1:0):[]).filter(c=>!!(c.required&&!Object.values(n).includes(c.key))),S=()=>{a(""),l("sourceType")},b=!t||h||p.some(c=>{var o;return c.required&&!((o=j(c.key))!=null&&o.trim())});return e.jsxs(r,{children:[e.jsx(r,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(r,{align:"center",direction:"row",children:e.jsx(se,{children:"Required Properties"})})}),e.jsx(ie,{children:h?e.jsx(r,{style:{margin:"auto"},children:e.jsx(W,{color:B.SECONDARY_BLUE})}):e.jsx(r,{className:"input__wrapper",children:p==null?void 0:p.map(({key:c,required:o})=>e.jsx(e.Fragment,{children:e.jsxs(ce,{children:[e.jsx(F,{children:s(c)}),e.jsx(J,{id:"item-name",maxLength:50,name:c,placeholder:o?"Required":"Optional",rules:{...o?{...K,pattern:{message:"No leading whitespace allowed",value:Q}}:{}}})]})}))})}),e.jsxs(r,{direction:"row",children:[e.jsx(r,{grow:1,children:e.jsx(E,{color:"secondary",onClick:S,size:"large",variant:"contained",children:"Prev"})}),e.jsx(r,{grow:1,ml:20,children:e.jsx(E,{color:"secondary",disabled:b,onClick:()=>l("createConfirmation"),size:"large",variant:"contained",children:"Next"})})]})]})},se=v(F)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; diff --git a/build/assets/index-48b3b053.js b/build/assets/index-798db353.js similarity index 85% rename from build/assets/index-48b3b053.js rename to build/assets/index-798db353.js index 18d7365f0..3dcd3be2a 100644 --- a/build/assets/index-48b3b053.js +++ b/build/assets/index-798db353.js @@ -1 +1 @@ -import{c as f,bt as m}from"./index-17ed06be.js";import{D as y}from"./constants-fa18afce.js";const c={data:null,ids:[],loading:!1,total:0,filters:{is_muted:!1,sortBy:y,page:0,pageSize:50}};let s=null;const S=f((a,n)=>({...c,setTopics:async()=>{a({loading:!0}),s&&s.abort();const t=new AbortController,{signal:p}=t;s=t;const{data:d,ids:g,filters:e}=n(),u=T(e);e.page===0&&a({data:null,ids:[],total:0});try{const o=await m(u,p),i=e.page===0?{}:{...d||{}},l=e.page===0?[]:[...g];o.data.forEach(r=>{i[r.ref_id]=r,l.push(r.ref_id)}),a({data:i,ids:l,total:o.totalCount}),a({loading:!1})}catch(o){console.error(o)}},setFilters:t=>a({filters:{...n().filters,page:0,...t}}),terminate:()=>a(c)})),T=a=>({muted:a.is_muted?"True":"False",skip:String(a.page*a.pageSize),limit:String(a.pageSize),sort_by:a.sortBy,...a.search?{search:a.search}:{node_type:"Topic"}});export{S as u}; +import{c as f,bt as m}from"./index-787c3ef8.js";import{D as y}from"./constants-380035da.js";const c={data:null,ids:[],loading:!1,total:0,filters:{is_muted:!1,sortBy:y,page:0,pageSize:50}};let s=null;const S=f((a,n)=>({...c,setTopics:async()=>{a({loading:!0}),s&&s.abort();const t=new AbortController,{signal:p}=t;s=t;const{data:d,ids:g,filters:e}=n(),u=T(e);e.page===0&&a({data:null,ids:[],total:0});try{const o=await m(u,p),i=e.page===0?{}:{...d||{}},l=e.page===0?[]:[...g];o.data.forEach(r=>{i[r.ref_id]=r,l.push(r.ref_id)}),a({data:i,ids:l,total:o.totalCount}),a({loading:!1})}catch(o){console.error(o)}},setFilters:t=>a({filters:{...n().filters,page:0,...t}}),terminate:()=>a(c)})),T=a=>({muted:a.is_muted?"True":"False",skip:String(a.page*a.pageSize),limit:String(a.pageSize),sort_by:a.sortBy,...a.search?{search:a.search}:{node_type:"Topic"}});export{S as u}; diff --git a/build/assets/index-3c0c8d74.js b/build/assets/index-8b765fc7.js similarity index 96% rename from build/assets/index-3c0c8d74.js rename to build/assets/index-8b765fc7.js index 35b5970d3..cfbbd9b28 100644 --- a/build/assets/index-3c0c8d74.js +++ b/build/assets/index-8b765fc7.js @@ -1,4 +1,4 @@ -import{e as a,o as M,n as B,u as T,k as z,q as G,b as L,a7 as N,j as e,T as t,s as c,a as n,F as l}from"./index-17ed06be.js";import{M as O,j as D,k as E,S as R,C as U,l as W,F as Y}from"./index-2f22123e.js";const K=()=>{const{open:r}=a("sourcesTable"),{open:p}=a("addItem"),{open:u}=a("addContent"),{open:h}=a("settings"),{open:x}=a("blueprintGraph"),{open:b}=a("feedback"),g=M(),{resetAiSummaryAnswer:j,setNewLoading:m}=B(),{abortFetchData:k,resetGraph:f}=T(o=>o),{setUniverseQuestionIsOpen:y,setSidebarOpen:w,setShowCollapseButton:S}=z(o=>o),{customSchemaFeatureFlag:C,userFeedbackFeatureFlag:F,chatInterfaceFeatureFlag:I}=G(o=>o),{isAdmin:d}=L(o=>o),v=N(),A=()=>{m(null),k(),j(),f(),g("/")},$=()=>{y(),w(!0),S(!0)};return e.jsxs(q,{children:[e.jsx(Q,{onClick:A,children:e.jsx("img",{alt:"Second brain",src:"logo.svg"})}),I?e.jsxs(i,{onClick:$,children:[e.jsx(s,{children:e.jsx(O,{})}),e.jsx(t,{children:"New Chat"})]}):null,d?e.jsxs(i,{"data-testid":"add-item-modal",onClick:p,children:[e.jsx(s,{children:e.jsx(D,{})}),e.jsx(t,{children:"Add Item"})]}):null,e.jsxs(i,{"data-testid":"add-content-modal",onClick:u,children:[e.jsx(s,{children:e.jsx(E,{})}),e.jsx(t,{children:"Add Content"})]}),e.jsxs(i,{id:"cy-open-soure-table",onClick:r,children:[e.jsx(s,{children:e.jsx(R,{})}),e.jsx(t,{children:"Source Table"})]}),C&&d?e.jsxs(i,{"data-testid":"add-blueprint-modal",id:"cy-open-soure-table",onClick:x,children:[e.jsx(s,{children:e.jsx(U,{})}),e.jsx(t,{children:"Blueprint"})]}):null,e.jsxs(i,{"data-testid":"settings-modal",onClick:h,children:[e.jsx(s,{children:e.jsx(W,{})}),e.jsx(t,{children:"Settings"})]}),F&&v?e.jsxs(X,{"data-testid":"feedback-modal",onClick:b,children:[e.jsx(s,{children:e.jsx(Y,{})}),e.jsx(t,{children:"Send Feedback"})]}):null]})},q=c(l).attrs({align:"flex-start",direction:"column",justify:"flex-start"})` +import{e as a,o as M,n as B,u as T,k as z,q as G,b as L,a7 as N,j as e,T as t,s as c,a as n,F as l}from"./index-787c3ef8.js";import{M as O,j as D,k as E,S as R,C as U,l as W,F as Y}from"./index-77dce891.js";const K=()=>{const{open:r}=a("sourcesTable"),{open:p}=a("addItem"),{open:u}=a("addContent"),{open:h}=a("settings"),{open:x}=a("blueprintGraph"),{open:b}=a("feedback"),g=M(),{resetAiSummaryAnswer:j,setNewLoading:m}=B(),{abortFetchData:k,resetGraph:f}=T(o=>o),{setUniverseQuestionIsOpen:y,setSidebarOpen:w,setShowCollapseButton:S}=z(o=>o),{customSchemaFeatureFlag:C,userFeedbackFeatureFlag:F,chatInterfaceFeatureFlag:I}=G(o=>o),{isAdmin:d}=L(o=>o),v=N(),A=()=>{m(null),k(),j(),f(),g("/")},$=()=>{y(),w(!0),S(!0)};return e.jsxs(q,{children:[e.jsx(Q,{onClick:A,children:e.jsx("img",{alt:"Second brain",src:"logo.svg"})}),I?e.jsxs(i,{onClick:$,children:[e.jsx(s,{children:e.jsx(O,{})}),e.jsx(t,{children:"New Chat"})]}):null,d?e.jsxs(i,{"data-testid":"add-item-modal",onClick:p,children:[e.jsx(s,{children:e.jsx(D,{})}),e.jsx(t,{children:"Add Item"})]}):null,e.jsxs(i,{"data-testid":"add-content-modal",onClick:u,children:[e.jsx(s,{children:e.jsx(E,{})}),e.jsx(t,{children:"Add Content"})]}),e.jsxs(i,{id:"cy-open-soure-table",onClick:r,children:[e.jsx(s,{children:e.jsx(R,{})}),e.jsx(t,{children:"Source Table"})]}),C&&d?e.jsxs(i,{"data-testid":"add-blueprint-modal",id:"cy-open-soure-table",onClick:x,children:[e.jsx(s,{children:e.jsx(U,{})}),e.jsx(t,{children:"Blueprint"})]}):null,e.jsxs(i,{"data-testid":"settings-modal",onClick:h,children:[e.jsx(s,{children:e.jsx(W,{})}),e.jsx(t,{children:"Settings"})]}),F&&v?e.jsxs(X,{"data-testid":"feedback-modal",onClick:b,children:[e.jsx(s,{children:e.jsx(Y,{})}),e.jsx(t,{children:"Send Feedback"})]}):null]})},q=c(l).attrs({align:"flex-start",direction:"column",justify:"flex-start"})` flex: 0 0 64px; z-index: 31; transition: opacity 1s; diff --git a/build/assets/index-432a2a9e.js b/build/assets/index-90c40e8b.js similarity index 99% rename from build/assets/index-432a2a9e.js rename to build/assets/index-90c40e8b.js index da4116e14..6e394bc8a 100644 --- a/build/assets/index-432a2a9e.js +++ b/build/assets/index-90c40e8b.js @@ -1,4 +1,4 @@ -import{as as He,a9 as Pr,j as V,s as zn,a as Bn,r as Un,e as vt,k as zr,b as Lr,u as Or,A as Dr,F as fe,T as Ft,B as vr,c as Fr,aY as Rr}from"./index-17ed06be.js";import{d as Br,aS as Nr,aT as Mr}from"./index-2f22123e.js";function _r(n,e){const t=e||{};return(n[n.length-1]===""?[...n,""]:n).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const jr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hr=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ur={};function Ue(n,e){return((e||Ur).jsx?Hr:jr).test(n)}const Vr=/[ \t\n\f\r]/g;function qr(n){return typeof n=="object"?n.type==="text"?Ve(n.value):!1:Ve(n)}function Ve(n){return n.replace(Vr,"")===""}class jn{constructor(e,t,r){this.property=e,this.normal=t,r&&(this.space=r)}}jn.prototype.property={};jn.prototype.normal={};jn.prototype.space=null;function Rt(n,e){const t={},r={};let i=-1;for(;++i4&&t.slice(0,4)==="data"&&Yr.test(e)){if(e.charAt(4)==="-"){const l=e.slice(5).replace($e,Zr);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=e.slice(4);if(!$e.test(l)){let o=l.replace(Kr,Jr);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}i=Se}return new i(r,e)}function Jr(n){return"-"+n.toLowerCase()}function Zr(n){return n.charAt(1).toUpperCase()}const ni={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},ei=Rt([Mt,Nt,Ht,Ut,Qr],"html"),Ce=Rt([Mt,Nt,Ht,Ut,Xr],"svg");function ti(n){return n.join(" ").trim()}var Vt={},We=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ri=/\n/g,ii=/^\s*/,li=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,oi=/^:\s*/,ai=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ui=/^[;\s]*/,si=/^\s+|\s+$/g,ci=` +import{as as He,a9 as Pr,j as V,s as zn,a as Bn,r as Un,e as vt,k as zr,b as Lr,u as Or,A as Dr,F as fe,T as Ft,B as vr,c as Fr,aY as Rr}from"./index-787c3ef8.js";import{d as Br,aS as Nr,aT as Mr}from"./index-77dce891.js";function _r(n,e){const t=e||{};return(n[n.length-1]===""?[...n,""]:n).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const jr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hr=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ur={};function Ue(n,e){return((e||Ur).jsx?Hr:jr).test(n)}const Vr=/[ \t\n\f\r]/g;function qr(n){return typeof n=="object"?n.type==="text"?Ve(n.value):!1:Ve(n)}function Ve(n){return n.replace(Vr,"")===""}class jn{constructor(e,t,r){this.property=e,this.normal=t,r&&(this.space=r)}}jn.prototype.property={};jn.prototype.normal={};jn.prototype.space=null;function Rt(n,e){const t={},r={};let i=-1;for(;++i4&&t.slice(0,4)==="data"&&Yr.test(e)){if(e.charAt(4)==="-"){const l=e.slice(5).replace($e,Zr);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=e.slice(4);if(!$e.test(l)){let o=l.replace(Kr,Jr);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}i=Se}return new i(r,e)}function Jr(n){return"-"+n.toLowerCase()}function Zr(n){return n.charAt(1).toUpperCase()}const ni={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},ei=Rt([Mt,Nt,Ht,Ut,Qr],"html"),Ce=Rt([Mt,Nt,Ht,Ut,Xr],"svg");function ti(n){return n.join(" ").trim()}var Vt={},We=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ri=/\n/g,ii=/^\s*/,li=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,oi=/^:\s*/,ai=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,ui=/^[;\s]*/,si=/^\s+|\s+$/g,ci=` `,Qe="/",Xe="*",Sn="",pi="comment",fi="declaration",hi=function(n,e){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];e=e||{};var t=1,r=1;function i(y){var k=y.match(ri);k&&(t+=k.length);var I=y.lastIndexOf(ci);r=~I?y.length-I:r+y.length}function l(){var y={line:t,column:r};return function(k){return k.position=new o(y),s(),k}}function o(y){this.start=y,this.end={line:t,column:r},this.source=e.source}o.prototype.content=n;function a(y){var k=new Error(e.source+":"+t+":"+r+": "+y);if(k.reason=y,k.filename=e.source,k.line=t,k.column=r,k.source=n,!e.silent)throw k}function u(y){var k=y.exec(n);if(k){var I=k[0];return i(I),n=n.slice(I.length),k}}function s(){u(ii)}function c(y){var k;for(y=y||[];k=f();)k!==!1&&y.push(k);return y}function f(){var y=l();if(!(Qe!=n.charAt(0)||Xe!=n.charAt(1))){for(var k=2;Sn!=n.charAt(k)&&(Xe!=n.charAt(k)||Qe!=n.charAt(k+1));)++k;if(k+=2,Sn===n.charAt(k-1))return a("End of comment missing");var I=n.slice(2,k-2);return r+=2,i(I),n=n.slice(k),r+=2,y({type:pi,comment:I})}}function d(){var y=l(),k=u(li);if(k){if(f(),!u(oi))return a("property missing ':'");var I=u(ai),w=y({type:fi,property:Ye(k[0].replace(We,Sn)),value:I?Ye(I[0].replace(We,Sn)):Sn});return u(ui),w}}function p(){var y=[];c(y);for(var k;k=d();)k!==!1&&(y.push(k),c(y));return y}return s(),p()};function Ye(n){return n?n.replace(si,Sn):Sn}var mi=He&&He.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Vt,"__esModule",{value:!0});var di=mi(hi);function gi(n,e){var t=null;if(!n||typeof n!="string")return t;var r=(0,di.default)(n),i=typeof e=="function";return r.forEach(function(l){if(l.type==="declaration"){var o=l.property,a=l.value;i?e(o,a,l):a&&(t=t||{},t[o]=a)}}),t}var Ke=Vt.default=gi;const yi=Ke.default||Ke,qt=$t("end"),Ee=$t("start");function $t(n){return e;function e(t){const r=t&&t.position&&t.position[n]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function xi(n){const e=Ee(n),t=qt(n);if(e&&t)return{start:e,end:t}}function Nn(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Ge(n.position):"start"in n||"end"in n?Ge(n):"line"in n||"column"in n?de(n):""}function de(n){return Je(n&&n.line)+":"+Je(n&&n.column)}function Ge(n){return de(n&&n.start)+"-"+de(n&&n.end)}function Je(n){return n&&typeof n=="number"?n:1}class K extends Error{constructor(e,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof e=="string"?i=e:!l.cause&&e&&(o=!0,i=e.message,l.cause=e),!l.ruleId&&!l.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?l.ruleId=r:(l.source=r.slice(0,u),l.ruleId=r.slice(u+1))}if(!l.place&&l.ancestors&&l.ancestors){const u=l.ancestors[l.ancestors.length-1];u&&(l.place=u.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=Nn(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual,this.expected,this.note,this.url}}K.prototype.file="";K.prototype.name="";K.prototype.reason="";K.prototype.message="";K.prototype.stack="";K.prototype.column=void 0;K.prototype.line=void 0;K.prototype.ancestors=void 0;K.prototype.cause=void 0;K.prototype.fatal=void 0;K.prototype.place=void 0;K.prototype.ruleId=void 0;K.prototype.source=void 0;const Ie={}.hasOwnProperty,ki=new Map,bi=/[A-Z]/g,wi=/-([a-z])/g,Si=new Set(["table","tbody","thead","tfoot","tr"]),Ci=new Set(["td","th"]),Wt="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ei(n,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=e.filePath||void 0;let r;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Di(t,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Oi(t,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:r,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?Ce:ei,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},l=Qt(i,n,void 0);return l&&typeof l!="string"?l:i.create(n,i.Fragment,{children:l||void 0},void 0)}function Qt(n,e,t){if(e.type==="element")return Ii(n,e,t);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return Ai(n,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return Pi(n,e,t);if(e.type==="mdxjsEsm")return Ti(n,e);if(e.type==="root")return zi(n,e,t);if(e.type==="text")return Li(n,e)}function Ii(n,e,t){const r=n.schema;let i=r;e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ce,n.schema=i),n.ancestors.push(e);const l=Yt(n,e.tagName,!1),o=vi(n,e);let a=Te(n,e);return Si.has(e.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!qr(u):!0})),Xt(n,o,l,e),Ae(o,a),n.ancestors.pop(),n.schema=r,n.create(e,l,o,t)}function Ai(n,e){if(e.data&&e.data.estree&&n.evaluater){const r=e.data.estree.body[0];return r.type,n.evaluater.evaluateExpression(r.expression)}_n(n,e.position)}function Ti(n,e){if(e.data&&e.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(e.data.estree);_n(n,e.position)}function Pi(n,e,t){const r=n.schema;let i=r;e.name==="svg"&&r.space==="html"&&(i=Ce,n.schema=i),n.ancestors.push(e);const l=e.name===null?n.Fragment:Yt(n,e.name,!0),o=Fi(n,e),a=Te(n,e);return Xt(n,o,l,e),Ae(o,a),n.ancestors.pop(),n.schema=r,n.create(e,l,o,t)}function zi(n,e,t){const r={};return Ae(r,Te(n,e)),n.create(e,n.Fragment,r,t)}function Li(n,e){return e.value}function Xt(n,e,t,r){typeof t!="string"&&t!==n.Fragment&&n.passNode&&(e.node=r)}function Ae(n,e){if(e.length>0){const t=e.length>1?e:e[0];t&&(n.children=t)}}function Oi(n,e,t){return r;function r(i,l,o,a){const s=Array.isArray(o.children)?t:e;return a?s(l,o,a):s(l,o)}}function Di(n,e){return t;function t(r,i,l,o){const a=Array.isArray(l.children),u=Ee(r);return e(i,l,o,a,{columnNumber:u?u.column-1:void 0,fileName:n,lineNumber:u?u.line:void 0},void 0)}}function vi(n,e){const t={};let r,i;for(i in e.properties)if(i!=="children"&&Ie.call(e.properties,i)){const l=Ri(n,i,e.properties[i]);if(l){const[o,a]=l;n.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&Ci.has(e.tagName)?r=a:t[o]=a}}if(r){const l=t.style||(t.style={});l[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Fi(n,e){const t={};for(const r of e.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&n.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const a=o.properties[0];a.type,Object.assign(t,n.evaluater.evaluateExpression(a.argument))}else _n(n,e.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&n.evaluater){const a=r.value.data.estree.body[0];a.type,l=n.evaluater.evaluateExpression(a.expression)}else _n(n,e.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function Te(n,e){const t=[];let r=-1;const i=n.passKeys?new Map:ki;for(;++ri?0:i+e:e=e>i?i:e,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(e,t),n.splice(...o);else for(t&&n.splice(e,t);l0?(pn(n,n.length,0,e),n):e}const et={}.hasOwnProperty;function qi(n){const e={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Pn(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Qi=xn(/\p{P}/u),cn=xn(/[A-Za-z]/),en=xn(/[\dA-Za-z]/),Xi=xn(/[#-'*+\--9=?A-Z^-~]/);function ge(n){return n!==null&&(n<32||n===127)}const ye=xn(/\d/),Yi=xn(/[\dA-Fa-f]/),Jt=xn(/[!-/:-@[-`{-~]/);function P(n){return n!==null&&n<-2}function J(n){return n!==null&&(n<0||n===32)}function B(n){return n===-2||n===-1||n===32}function Ki(n){return Jt(n)||Qi(n)}const Gi=xn(/\s/);function xn(n){return e;function e(t){return t!==null&&t>-1&&n.test(String.fromCharCode(t))}}function On(n){const e=[];let t=-1,r=0,i=0;for(;++t55295&&l<57344){const a=n.charCodeAt(t+1);l<56320&&a>56319&&a<57344?(o=String.fromCharCode(l,a),i=1):o="�"}else o=String.fromCharCode(l);o&&(e.push(n.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return e.join("")+n.slice(r)}function j(n,e,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(u){return B(u)?(n.enter(t),a(u)):e(u)}function a(u){return B(u)&&l++o))return;const R=e.events.length;let q=R,M,H;for(;q--;)if(e.events[q][0]==="exit"&&e.events[q][1].type==="chunkFlow"){if(M){H=e.events[q][1].end;break}M=!0}for(w(r),x=R;xC;){const O=t[D];e.containerState=O[1],O[0].exit.call(e,n)}t.length=C}function E(){i.write([null]),l=void 0,i=void 0,e.containerState._closeFlow=void 0}}function tl(n,e,t){return j(n,n.attempt(this.parser.constructs.document,e,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function rt(n){if(n===null||J(n)||Gi(n))return 1;if(Ki(n))return 2}function ze(n,e,t){const r=[];let i=-1;for(;++i1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const f=Object.assign({},n[r][1].end),d=Object.assign({},n[t][1].start);it(f,-u),it(d,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},n[r][1].end)},a={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},n[t][1].start),end:d},l={type:u>1?"strongText":"emphasisText",start:Object.assign({},n[r][1].end),end:Object.assign({},n[t][1].start)},i={type:u>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},a.end)},n[r][1].end=Object.assign({},o.start),n[t][1].start=Object.assign({},a.end),s=[],n[r][1].end.offset-n[r][1].start.offset&&(s=tn(s,[["enter",n[r][1],e],["exit",n[r][1],e]])),s=tn(s,[["enter",i,e],["enter",o,e],["exit",o,e],["enter",l,e]]),s=tn(s,ze(e.parser.constructs.insideSpan.null,n.slice(r+1,t),e)),s=tn(s,[["exit",l,e],["enter",a,e],["exit",a,e],["exit",i,e]]),n[t][1].end.offset-n[t][1].start.offset?(c=2,s=tn(s,[["enter",n[t][1],e],["exit",n[t][1],e]])):c=0,pn(n,r-1,t-r+3,s),t=r+s.length-c-2;break}}for(t=-1;++t0&&B(x)?j(n,E,"linePrefix",l+1)(x):E(x)}function E(x){return x===null||P(x)?n.check(lt,k,D)(x):(n.enter("codeFlowValue"),C(x))}function C(x){return x===null||P(x)?(n.exit("codeFlowValue"),E(x)):(n.consume(x),C)}function D(x){return n.exit("codeFenced"),e(x)}function O(x,R,q){let M=0;return H;function H(F){return x.enter("lineEnding"),x.consume(F),x.exit("lineEnding"),T}function T(F){return x.enter("codeFencedFence"),B(F)?j(x,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):A(F)}function A(F){return F===a?(x.enter("codeFencedFenceSequence"),U(F)):q(F)}function U(F){return F===a?(M++,x.consume(F),U):M>=o?(x.exit("codeFencedFenceSequence"),B(F)?j(x,$,"whitespace")(F):$(F)):q(F)}function $(F){return F===null||P(F)?(x.exit("codeFencedFence"),R(F)):q(F)}}}function ml(n,e,t){const r=this;return i;function i(o){return o===null?t(o):(n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):e(o)}}const re={name:"codeIndented",tokenize:gl},dl={tokenize:yl,partial:!0};function gl(n,e,t){const r=this;return i;function i(s){return n.enter("codeIndented"),j(n,l,"linePrefix",4+1)(s)}function l(s){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(s):t(s)}function o(s){return s===null?u(s):P(s)?n.attempt(dl,o,u)(s):(n.enter("codeFlowValue"),a(s))}function a(s){return s===null||P(s)?(n.exit("codeFlowValue"),o(s)):(n.consume(s),a)}function u(s){return n.exit("codeIndented"),e(s)}}function yl(n,e,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):P(o)?(n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),i):j(n,l,"linePrefix",4+1)(o)}function l(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(o):P(o)?i(o):t(o)}}const xl={name:"codeText",tokenize:wl,resolve:kl,previous:bl};function kl(n){let e=n.length-4,t=3,r,i;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[e][1].type==="lineEnding"||n[e][1].type==="space")){for(r=t;++r=4?e(o):n.interrupt(r.parser.constructs.flow,t,e)(o)}}function rr(n,e,t,r,i,l,o,a,u){const s=u||Number.POSITIVE_INFINITY;let c=0;return f;function f(w){return w===60?(n.enter(r),n.enter(i),n.enter(l),n.consume(w),n.exit(l),d):w===null||w===32||w===41||ge(w)?t(w):(n.enter(r),n.enter(o),n.enter(a),n.enter("chunkString",{contentType:"string"}),k(w))}function d(w){return w===62?(n.enter(l),n.consume(w),n.exit(l),n.exit(i),n.exit(r),e):(n.enter(a),n.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===62?(n.exit("chunkString"),n.exit(a),d(w)):w===null||w===60||P(w)?t(w):(n.consume(w),w===92?y:p)}function y(w){return w===60||w===62||w===92?(n.consume(w),p):p(w)}function k(w){return!c&&(w===null||w===41||J(w))?(n.exit("chunkString"),n.exit(a),n.exit(o),n.exit(r),e(w)):c999||p===null||p===91||p===93&&!u||p===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(p):p===93?(n.exit(l),n.enter(i),n.consume(p),n.exit(i),n.exit(r),e):P(p)?(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),c):(n.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||P(p)||a++>999?(n.exit("chunkString"),c(p)):(n.consume(p),u||(u=!B(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(n.consume(p),a++,f):f(p)}}function lr(n,e,t,r,i,l){let o;return a;function a(d){return d===34||d===39||d===40?(n.enter(r),n.enter(i),n.consume(d),n.exit(i),o=d===40?41:d,u):t(d)}function u(d){return d===o?(n.enter(i),n.consume(d),n.exit(i),n.exit(r),e):(n.enter(l),s(d))}function s(d){return d===o?(n.exit(l),u(o)):d===null?t(d):P(d)?(n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),j(n,s,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||P(d)?(n.exit("chunkString"),s(d)):(n.consume(d),d===92?f:c)}function f(d){return d===o||d===92?(n.consume(d),c):c(d)}}function Mn(n,e){let t;return r;function r(i){return P(i)?(n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),t=!0,r):B(i)?j(n,r,t?"linePrefix":"lineSuffix")(i):e(i)}}const Pl={name:"definition",tokenize:Ll},zl={tokenize:Ol,partial:!0};function Ll(n,e,t){const r=this;let i;return l;function l(p){return n.enter("definition"),o(p)}function o(p){return ir.call(r,n,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=Pn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(n.enter("definitionMarker"),n.consume(p),n.exit("definitionMarker"),u):t(p)}function u(p){return J(p)?Mn(n,s)(p):s(p)}function s(p){return rr(n,c,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return n.attempt(zl,f,f)(p)}function f(p){return B(p)?j(n,d,"whitespace")(p):d(p)}function d(p){return p===null||P(p)?(n.exit("definition"),r.parser.defined.push(i),e(p)):t(p)}}function Ol(n,e,t){return r;function r(a){return J(a)?Mn(n,i)(a):t(a)}function i(a){return lr(n,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return B(a)?j(n,o,"whitespace")(a):o(a)}function o(a){return a===null||P(a)?e(a):t(a)}}const Dl={name:"hardBreakEscape",tokenize:vl};function vl(n,e,t){return r;function r(l){return n.enter("hardBreakEscape"),n.consume(l),i}function i(l){return P(l)?(n.exit("hardBreakEscape"),e(l)):t(l)}}const Fl={name:"headingAtx",tokenize:Bl,resolve:Rl};function Rl(n,e){let t=n.length-2,r=3,i,l;return n[r][1].type==="whitespace"&&(r+=2),t-2>r&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&n[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:n[r][1].start,end:n[t][1].end},l={type:"chunkText",start:n[r][1].start,end:n[t][1].end,contentType:"text"},pn(n,r,t-r+1,[["enter",i,e],["enter",l,e],["exit",l,e],["exit",i,e]])),n}function Bl(n,e,t){let r=0;return i;function i(c){return n.enter("atxHeading"),l(c)}function l(c){return n.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(n.consume(c),o):c===null||J(c)?(n.exit("atxHeadingSequence"),a(c)):t(c)}function a(c){return c===35?(n.enter("atxHeadingSequence"),u(c)):c===null||P(c)?(n.exit("atxHeading"),e(c)):B(c)?j(n,a,"whitespace")(c):(n.enter("atxHeadingText"),s(c))}function u(c){return c===35?(n.consume(c),u):(n.exit("atxHeadingSequence"),a(c))}function s(c){return c===null||c===35||J(c)?(n.exit("atxHeadingText"),a(c)):(n.consume(c),s)}}const Nl=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],at=["pre","script","style","textarea"],Ml={name:"htmlFlow",tokenize:Ul,resolveTo:Hl,concrete:!0},_l={tokenize:ql,partial:!0},jl={tokenize:Vl,partial:!0};function Hl(n){let e=n.length;for(;e--&&!(n[e][0]==="enter"&&n[e][1].type==="htmlFlow"););return e>1&&n[e-2][1].type==="linePrefix"&&(n[e][1].start=n[e-2][1].start,n[e+1][1].start=n[e-2][1].start,n.splice(e-2,2)),n}function Ul(n,e,t){const r=this;let i,l,o,a,u;return s;function s(m){return c(m)}function c(m){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(m),f}function f(m){return m===33?(n.consume(m),d):m===47?(n.consume(m),l=!0,k):m===63?(n.consume(m),i=3,r.interrupt?e:h):cn(m)?(n.consume(m),o=String.fromCharCode(m),I):t(m)}function d(m){return m===45?(n.consume(m),i=2,p):m===91?(n.consume(m),i=5,a=0,y):cn(m)?(n.consume(m),i=4,r.interrupt?e:h):t(m)}function p(m){return m===45?(n.consume(m),r.interrupt?e:h):t(m)}function y(m){const an="CDATA[";return m===an.charCodeAt(a++)?(n.consume(m),a===an.length?r.interrupt?e:A:y):t(m)}function k(m){return cn(m)?(n.consume(m),o=String.fromCharCode(m),I):t(m)}function I(m){if(m===null||m===47||m===62||J(m)){const an=m===47,kn=o.toLowerCase();return!an&&!l&&at.includes(kn)?(i=1,r.interrupt?e(m):A(m)):Nl.includes(o.toLowerCase())?(i=6,an?(n.consume(m),w):r.interrupt?e(m):A(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):l?E(m):C(m))}return m===45||en(m)?(n.consume(m),o+=String.fromCharCode(m),I):t(m)}function w(m){return m===62?(n.consume(m),r.interrupt?e:A):t(m)}function E(m){return B(m)?(n.consume(m),E):H(m)}function C(m){return m===47?(n.consume(m),H):m===58||m===95||cn(m)?(n.consume(m),D):B(m)?(n.consume(m),C):H(m)}function D(m){return m===45||m===46||m===58||m===95||en(m)?(n.consume(m),D):O(m)}function O(m){return m===61?(n.consume(m),x):B(m)?(n.consume(m),O):C(m)}function x(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(n.consume(m),u=m,R):B(m)?(n.consume(m),x):q(m)}function R(m){return m===u?(n.consume(m),u=null,M):m===null||P(m)?t(m):(n.consume(m),R)}function q(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||J(m)?O(m):(n.consume(m),q)}function M(m){return m===47||m===62||B(m)?C(m):t(m)}function H(m){return m===62?(n.consume(m),T):t(m)}function T(m){return m===null||P(m)?A(m):B(m)?(n.consume(m),T):t(m)}function A(m){return m===45&&i===2?(n.consume(m),Y):m===60&&i===1?(n.consume(m),Q):m===62&&i===4?(n.consume(m),on):m===63&&i===3?(n.consume(m),h):m===93&&i===5?(n.consume(m),fn):P(m)&&(i===6||i===7)?(n.exit("htmlFlowData"),n.check(_l,hn,U)(m)):m===null||P(m)?(n.exit("htmlFlowData"),U(m)):(n.consume(m),A)}function U(m){return n.check(jl,$,hn)(m)}function $(m){return n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),F}function F(m){return m===null||P(m)?U(m):(n.enter("htmlFlowData"),A(m))}function Y(m){return m===45?(n.consume(m),h):A(m)}function Q(m){return m===47?(n.consume(m),o="",ln):A(m)}function ln(m){if(m===62){const an=o.toLowerCase();return at.includes(an)?(n.consume(m),on):A(m)}return cn(m)&&o.length<8?(n.consume(m),o+=String.fromCharCode(m),ln):A(m)}function fn(m){return m===93?(n.consume(m),h):A(m)}function h(m){return m===62?(n.consume(m),on):m===45&&i===2?(n.consume(m),h):A(m)}function on(m){return m===null||P(m)?(n.exit("htmlFlowData"),hn(m)):(n.consume(m),on)}function hn(m){return n.exit("htmlFlow"),e(m)}}function Vl(n,e,t){const r=this;return i;function i(o){return P(o)?(n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):e(o)}}function ql(n,e,t){return r;function r(i){return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),n.attempt(Gn,e,t)}}const $l={name:"htmlText",tokenize:Wl};function Wl(n,e,t){const r=this;let i,l,o;return a;function a(h){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(h),u}function u(h){return h===33?(n.consume(h),s):h===47?(n.consume(h),O):h===63?(n.consume(h),C):cn(h)?(n.consume(h),q):t(h)}function s(h){return h===45?(n.consume(h),c):h===91?(n.consume(h),l=0,y):cn(h)?(n.consume(h),E):t(h)}function c(h){return h===45?(n.consume(h),p):t(h)}function f(h){return h===null?t(h):h===45?(n.consume(h),d):P(h)?(o=f,Q(h)):(n.consume(h),f)}function d(h){return h===45?(n.consume(h),p):f(h)}function p(h){return h===62?Y(h):h===45?d(h):f(h)}function y(h){const on="CDATA[";return h===on.charCodeAt(l++)?(n.consume(h),l===on.length?k:y):t(h)}function k(h){return h===null?t(h):h===93?(n.consume(h),I):P(h)?(o=k,Q(h)):(n.consume(h),k)}function I(h){return h===93?(n.consume(h),w):k(h)}function w(h){return h===62?Y(h):h===93?(n.consume(h),w):k(h)}function E(h){return h===null||h===62?Y(h):P(h)?(o=E,Q(h)):(n.consume(h),E)}function C(h){return h===null?t(h):h===63?(n.consume(h),D):P(h)?(o=C,Q(h)):(n.consume(h),C)}function D(h){return h===62?Y(h):C(h)}function O(h){return cn(h)?(n.consume(h),x):t(h)}function x(h){return h===45||en(h)?(n.consume(h),x):R(h)}function R(h){return P(h)?(o=R,Q(h)):B(h)?(n.consume(h),R):Y(h)}function q(h){return h===45||en(h)?(n.consume(h),q):h===47||h===62||J(h)?M(h):t(h)}function M(h){return h===47?(n.consume(h),Y):h===58||h===95||cn(h)?(n.consume(h),H):P(h)?(o=M,Q(h)):B(h)?(n.consume(h),M):Y(h)}function H(h){return h===45||h===46||h===58||h===95||en(h)?(n.consume(h),H):T(h)}function T(h){return h===61?(n.consume(h),A):P(h)?(o=T,Q(h)):B(h)?(n.consume(h),T):M(h)}function A(h){return h===null||h===60||h===61||h===62||h===96?t(h):h===34||h===39?(n.consume(h),i=h,U):P(h)?(o=A,Q(h)):B(h)?(n.consume(h),A):(n.consume(h),$)}function U(h){return h===i?(n.consume(h),i=void 0,F):h===null?t(h):P(h)?(o=U,Q(h)):(n.consume(h),U)}function $(h){return h===null||h===34||h===39||h===60||h===61||h===96?t(h):h===47||h===62||J(h)?M(h):(n.consume(h),$)}function F(h){return h===47||h===62||J(h)?M(h):t(h)}function Y(h){return h===62?(n.consume(h),n.exit("htmlTextData"),n.exit("htmlText"),e):t(h)}function Q(h){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(h),n.exit("lineEnding"),ln}function ln(h){return B(h)?j(n,fn,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h):fn(h)}function fn(h){return n.enter("htmlTextData"),o(h)}}const Le={name:"labelEnd",tokenize:Jl,resolveTo:Gl,resolveAll:Kl},Ql={tokenize:Zl},Xl={tokenize:no},Yl={tokenize:eo};function Kl(n){let e=-1;for(;++e=3&&(s===null||P(s))?(n.exit("thematicBreak"),e(s)):t(s)}function u(s){return s===i?(n.consume(s),r++,u):(n.exit("thematicBreakSequence"),B(s)?j(n,a,"whitespace")(s):a(s))}}const G={name:"list",tokenize:co,continuation:{tokenize:po},exit:ho},uo={tokenize:mo,partial:!0},so={tokenize:fo,partial:!0};function co(n,e,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(p){const y=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:ye(p)){if(r.containerState.type||(r.containerState.type=y,n.enter(y,{_container:!0})),y==="listUnordered")return n.enter("listItemPrefix"),p===42||p===45?n.check(Wn,t,s)(p):s(p);if(!r.interrupt||p===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),u(p)}return t(p)}function u(p){return ye(p)&&++o<10?(n.consume(p),u):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(n.exit("listItemValue"),s(p)):t(p)}function s(p){return n.enter("listItemMarker"),n.consume(p),n.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,n.check(Gn,r.interrupt?t:c,n.attempt(uo,d,f))}function c(p){return r.containerState.initialBlankLine=!0,l++,d(p)}function f(p){return B(p)?(n.enter("listItemPrefixWhitespace"),n.consume(p),n.exit("listItemPrefixWhitespace"),d):t(p)}function d(p){return r.containerState.size=l+r.sliceSerialize(n.exit("listItemPrefix"),!0).length,e(p)}}function po(n,e,t){const r=this;return r.containerState._closeFlow=void 0,n.check(Gn,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,j(n,e,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!B(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,n.attempt(so,e,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,j(n,n.attempt(G,e,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function fo(n,e,t){const r=this;return j(n,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?e(l):t(l)}}function ho(n){n.exit(this.containerState.type)}function mo(n,e,t){const r=this;return j(n,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(l){const o=r.events[r.events.length-1];return!B(l)&&o&&o[1].type==="listItemPrefixWhitespace"?e(l):t(l)}}const ut={name:"setextUnderline",tokenize:yo,resolveTo:go};function go(n,e){let t=n.length,r,i,l;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){r=t;break}n[t][1].type==="paragraph"&&(i=t)}else n[t][1].type==="content"&&n.splice(t,1),!l&&n[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:Object.assign({},n[i][1].start),end:Object.assign({},n[n.length-1][1].end)};return n[i][1].type="setextHeadingText",l?(n.splice(i,0,["enter",o,e]),n.splice(l+1,0,["exit",n[r][1],e]),n[r][1].end=Object.assign({},n[l][1].end)):n[r][1]=o,n.push(["exit",o,e]),n}function yo(n,e,t){const r=this;let i;return l;function l(s){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(n.enter("setextHeadingLine"),i=s,o(s)):t(s)}function o(s){return n.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===i?(n.consume(s),a):(n.exit("setextHeadingLineSequence"),B(s)?j(n,u,"lineSuffix")(s):u(s))}function u(s){return s===null||P(s)?(n.exit("setextHeadingLine"),e(s)):t(s)}}const xo={tokenize:ko};function ko(n){const e=this,t=n.attempt(Gn,r,n.attempt(this.parser.constructs.flowInitial,i,j(n,n.attempt(this.parser.constructs.flow,i,n.attempt(Cl,i)),"linePrefix")));return t;function r(l){if(l===null){n.consume(l);return}return n.enter("lineEndingBlank"),n.consume(l),n.exit("lineEndingBlank"),e.currentConstruct=void 0,t}function i(l){if(l===null){n.consume(l);return}return n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),e.currentConstruct=void 0,t}}const bo={resolveAll:ar()},wo=or("string"),So=or("text");function or(n){return{tokenize:e,resolveAll:ar(n==="text"?Co:void 0)};function e(t){const r=this,i=this.parser.constructs[n],l=t.attempt(i,o,a);return o;function o(c){return s(c)?l(c):a(c)}function a(c){if(c===null){t.consume(c);return}return t.enter("data"),t.consume(c),u}function u(c){return s(c)?(t.exit("data"),l(c)):(t.consume(c),u)}function s(c){if(c===null)return!0;const f=i[c];let d=-1;if(f)for(;++d-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}l>0&&o.push(n[i].slice(0,l))}return o}function Ao(n,e){let t=-1;const r=[];let i;for(;++t0){const un=z.tokenStack[z.tokenStack.length-1];(un[1]||ct).call(z,void 0,un[0])}for(S.position={start:yn(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:yn(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},N=-1;++N(A(R(a=>[a.graphStyle,a.setGraphStyle])),null);t(n).attrs({direction:"row",align:"center",justify:"space-between"})` +import{s as t,a as o,F as n,T as S,r as b,j as e,B as v,t as C,k as $,b as T,aT as G,aU as k,N as y,v as z,aV as w,aW as M,aX as D,e as j,aY as I}from"./index-787c3ef8.js";import{i as A,o as R}from"./index-77dce891.js";import{C as B}from"./ClipLoader-0106d300.js";import{T as E,a as L}from"./Tabs-33c59ae4.js";import"./createSvgIcon-fa140fa5.js";const V=()=>(A(R(a=>[a.graphStyle,a.setGraphStyle])),null);t(n).attrs({direction:"row",align:"center",justify:"space-between"})` width: 447px; height: 48px; background: ${o.appearanceBg}; diff --git a/build/assets/index-c5811e62.js b/build/assets/index-b15c0dc1.js similarity index 92% rename from build/assets/index-c5811e62.js rename to build/assets/index-b15c0dc1.js index 8843207ee..c7daaa98c 100644 --- a/build/assets/index-c5811e62.js +++ b/build/assets/index-b15c0dc1.js @@ -1,4 +1,4 @@ -import{r as p,i as T,j as e,F as x,C as I,bd as _,bp as L,s as n,T as v,e as A,t as B,aY as E,v as F,a as M,bs as N,B as k}from"./index-17ed06be.js";import{ay as z,az as O,aA as D,n as Y}from"./index-2f22123e.js";import{u as w}from"./index-48b3b053.js";import{S as P,A as R,I as X}from"./constants-fa18afce.js";import{A as H,T as W}from"./index-9261e06d.js";import{C as U}from"./ClipLoader-96bb9f4d.js";import"./Stack-a8b59155.js";import"./createSvgIcon-6ef3ed46.js";import"./TextareaAutosize-f571cf36.js";const $=({topicId:s,onSelect:a,selectedValue:d,dataId:c})=>{const[u,h]=p.useState([]),[m,f]=p.useState(!1),j=p.useMemo(()=>{const o=async i=>{const g={is_muted:"False",sort_by:R,search:i,skip:"0",limit:"1000"};f(!0);try{const C=(await L(g.search)).data.filter(y=>(y==null?void 0:y.ref_id)!==s);h(C)}catch{h([])}finally{f(!1)}};return T.debounce(o,300)},[s]),r=o=>{const i=o.trim();if(!i){h([]);return}i.length>2&&j(o)},b=o=>{const i=o?u.find(g=>g.ref_id===o.value):null;a(i||null)},t=o=>({label:o.search_value,value:o.ref_id,type:o.node_type}),S=o=>o.map(t);return d?e.jsxs(x,{align:"center",basis:"100%",direction:"row",grow:1,shrink:1,children:[e.jsx("span",{children:d.search_value}),e.jsx(P,{onClick:()=>a(null),size:"medium",children:e.jsx(I,{})})]}):e.jsx(H,{dataId:c,handleInputChange:r,isLoading:m,onSelect:b,options:S(u)||_,selectedValue:d?t(d):null})},q=({from:s,onSelect:a,selectedToNode:d,isSwapped:c,setIsSwapped:u})=>e.jsxs(x,{mb:20,children:[e.jsx(x,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(x,{align:"center",direction:"row",children:e.jsx(G,{children:"Merge topic"})})}),e.jsxs(Q,{swap:c,children:[e.jsx(J,{children:e.jsx(V,{disabled:!0,label:c?"To":"From",swap:c,value:s==null?void 0:s.name})}),e.jsxs(x,{my:16,children:[e.jsx(ee,{children:"Type"}),e.jsx(v,{children:"IS ALIAS"})]}),e.jsx(x,{"data-testid":"to-section-container",children:e.jsxs(Z,{children:[e.jsx(te,{children:c?"From":"To"}),e.jsx($,{dataId:"to-node",onSelect:a,selectedValue:d,topicId:s==null?void 0:s.ref_id})]})}),e.jsxs(K,{children:[e.jsx(oe,{children:e.jsx(z,{})}),e.jsx(se,{"data-testid":"swap-icon",onClick:u,children:e.jsx(O,{})}),e.jsx(ne,{children:e.jsx(D,{})})]})]})]}),G=n(v)` +import{r as p,i as T,j as e,F as x,C as I,bd as _,bp as L,s as n,T as v,e as A,t as B,aY as E,v as F,a as M,bs as N,B as k}from"./index-787c3ef8.js";import{ay as z,az as O,aA as D,n as Y}from"./index-77dce891.js";import{u as w}from"./index-798db353.js";import{S as P,A as R,I as X}from"./constants-380035da.js";import{A as H,T as W}from"./index-efed0068.js";import{C as U}from"./ClipLoader-0106d300.js";import"./Stack-b3992130.js";import"./createSvgIcon-fa140fa5.js";import"./TextareaAutosize-e216d6db.js";const $=({topicId:s,onSelect:a,selectedValue:d,dataId:c})=>{const[u,h]=p.useState([]),[m,f]=p.useState(!1),j=p.useMemo(()=>{const o=async i=>{const g={is_muted:"False",sort_by:R,search:i,skip:"0",limit:"1000"};f(!0);try{const C=(await L(g.search)).data.filter(y=>(y==null?void 0:y.ref_id)!==s);h(C)}catch{h([])}finally{f(!1)}};return T.debounce(o,300)},[s]),r=o=>{const i=o.trim();if(!i){h([]);return}i.length>2&&j(o)},b=o=>{const i=o?u.find(g=>g.ref_id===o.value):null;a(i||null)},t=o=>({label:o.search_value,value:o.ref_id,type:o.node_type}),S=o=>o.map(t);return d?e.jsxs(x,{align:"center",basis:"100%",direction:"row",grow:1,shrink:1,children:[e.jsx("span",{children:d.search_value}),e.jsx(P,{onClick:()=>a(null),size:"medium",children:e.jsx(I,{})})]}):e.jsx(H,{dataId:c,handleInputChange:r,isLoading:m,onSelect:b,options:S(u)||_,selectedValue:d?t(d):null})},q=({from:s,onSelect:a,selectedToNode:d,isSwapped:c,setIsSwapped:u})=>e.jsxs(x,{mb:20,children:[e.jsx(x,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(x,{align:"center",direction:"row",children:e.jsx(G,{children:"Merge topic"})})}),e.jsxs(Q,{swap:c,children:[e.jsx(J,{children:e.jsx(V,{disabled:!0,label:c?"To":"From",swap:c,value:s==null?void 0:s.name})}),e.jsxs(x,{my:16,children:[e.jsx(ee,{children:"Type"}),e.jsx(v,{children:"IS ALIAS"})]}),e.jsx(x,{"data-testid":"to-section-container",children:e.jsxs(Z,{children:[e.jsx(te,{children:c?"From":"To"}),e.jsx($,{dataId:"to-node",onSelect:a,selectedValue:d,topicId:s==null?void 0:s.ref_id})]})}),e.jsxs(K,{children:[e.jsx(oe,{children:e.jsx(z,{})}),e.jsx(se,{"data-testid":"swap-icon",onClick:u,children:e.jsx(O,{})}),e.jsx(ne,{children:e.jsx(D,{})})]})]})]}),G=n(v)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; diff --git a/build/assets/index-887745b1.js b/build/assets/index-bb9e0a43.js similarity index 97% rename from build/assets/index-887745b1.js rename to build/assets/index-bb9e0a43.js index 3ae5ae4ac..0d126db37 100644 --- a/build/assets/index-887745b1.js +++ b/build/assets/index-bb9e0a43.js @@ -1,4 +1,4 @@ -import{s as a,j as e,F as s,aV as g,aW as j,B as w,T as i,a as n,e as S,t as y,r as m,aU as k,aY as v,v as F,z as B}from"./index-17ed06be.js";import{aO as T}from"./index-2f22123e.js";const E=({allowNextStep:r})=>e.jsxs(s,{p:12,children:[e.jsx(s,{align:"center",direction:"row",justify:"space-between",mb:25,children:e.jsx(s,{align:"center",direction:"row",children:e.jsx(z,{children:"Feedback"})})}),e.jsx(s,{mb:30,children:e.jsx(g,{id:"feedback-message",isTextArea:!0,maxLength:500,name:"message",placeholder:"Leave your feedback here ...",rules:j})}),e.jsx(s,{children:e.jsx(w,{color:"secondary","data-testid":"submit-feedback-btn",disabled:!r,size:"large",type:"submit",variant:"contained",children:"Submit"})})]}),z=a(i)` +import{s as a,j as e,F as s,aV as g,aW as j,B as w,T as i,a as n,e as S,t as y,r as m,aU as k,aY as v,v as F,z as B}from"./index-787c3ef8.js";import{aO as T}from"./index-77dce891.js";const E=({allowNextStep:r})=>e.jsxs(s,{p:12,children:[e.jsx(s,{align:"center",direction:"row",justify:"space-between",mb:25,children:e.jsx(s,{align:"center",direction:"row",children:e.jsx(z,{children:"Feedback"})})}),e.jsx(s,{mb:30,children:e.jsx(g,{id:"feedback-message",isTextArea:!0,maxLength:500,name:"message",placeholder:"Leave your feedback here ...",rules:j})}),e.jsx(s,{children:e.jsx(w,{color:"secondary","data-testid":"submit-feedback-btn",disabled:!r,size:"large",type:"submit",variant:"contained",children:"Submit"})})]}),z=a(i)` font-size: 22px; font-weight: 600; font-family: 'Barlow'; diff --git a/build/assets/index-10fd1675.js b/build/assets/index-cefe14af.js similarity index 97% rename from build/assets/index-10fd1675.js rename to build/assets/index-cefe14af.js index cdb34bb39..198a63e40 100644 --- a/build/assets/index-10fd1675.js +++ b/build/assets/index-cefe14af.js @@ -1,4 +1,4 @@ -import{W as x0,c as s0,r as x,_ as h,j as a,s as c,a as r,F as d,u as P,I as r0,C as e0,l as o0,b as Z,d as m0,e as n0,g as c0,f as l0,h as h0,i as p0,m as d0,k as a0,n as i0,o as f0,T as L,B as y0,Q as G0,p as b0,q as u0,t as E0,v as A0,w as B0}from"./index-17ed06be.js";import{P as D0,T as N,u as t0,B as V0,I as S0,N as g0,a as F0,O as j0,A as w0}from"./index-2f22123e.js";function v0(i){return i===null?"?":i.toLocaleString("en-US").split(",").join(" ")}const P0=x0` +import{W as x0,c as s0,r as x,_ as h,j as a,s as c,a as r,F as d,u as P,I as r0,C as e0,l as o0,b as Z,d as m0,e as n0,g as c0,f as l0,h as h0,i as p0,m as d0,k as a0,n as i0,o as f0,T as L,B as y0,Q as G0,p as b0,q as u0,t as E0,v as A0,w as B0}from"./index-787c3ef8.js";import{P as D0,T as N,u as t0,B as V0,I as S0,N as g0,a as F0,O as j0,A as w0}from"./index-77dce891.js";function v0(i){return i===null?"?":i.toLocaleString("en-US").split(",").join(" ")}const P0=x0` html { box-sizing: border-box; } @@ -50,7 +50,7 @@ import{W as x0,c as s0,r as x,_ as h,j as a,s as c,a as r,F as d,u as P,I as r0, border-collapse: collapse; border-spacing: 0; } -`,_0={askedQuestions:null,askedQuestionsAnswers:null,hasQuestionInProgress:!1,hasTeachingInProgress:!1,hasInstagraphInProgress:!1,teachMeAnswer:null,instgraphAnswser:null},M0=s0(i=>({..._0,setAskedQuestion:t=>i(e=>({askedQuestions:[...e.askedQuestions||[],t],hasQuestionInProgress:!0})),setAskedQuestionAnswer:t=>i(e=>({askedQuestionsAnswers:[...e.askedQuestionsAnswers||[],t],hasQuestionInProgress:!1})),setHasQuestionInProgress:t=>i({hasQuestionInProgress:t}),setHasTeachingInProgress:t=>i({hasTeachingInProgress:t}),setHasInstagraphInProgress:t=>i({hasInstagraphInProgress:t}),setTeachMeAnswer:t=>i({hasTeachingInProgress:!1,teachMeAnswer:t}),setInstagraphAnswer:t=>{var e,n,o,G;(e=t==null?void 0:t.instagraph)!=null&&e.edges&&((n=t==null?void 0:t.instagraph)!=null&&n.nodes)&&i({hasInstagraphInProgress:!1,instgraphAnswser:{edges:(o=t==null?void 0:t.instagraph)==null?void 0:o.edges,nodes:(G=t==null?void 0:t.instagraph)==null?void 0:G.nodes}})}})),C0="0.1.106",T0=x.lazy(()=>h(()=>import("./index-d53910a0.js"),["assets/index-d53910a0.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css","assets/index-2f22123e.js","assets/ClipLoader-96bb9f4d.js","assets/Tabs-fd2a0376.js","assets/createSvgIcon-6ef3ed46.js"]).then(({SettingsModal:i})=>({default:i}))),I0=x.lazy(()=>h(()=>import("./index-0796c92a.js"),["assets/index-0796c92a.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css","assets/index-2f22123e.js","assets/ClipLoader-96bb9f4d.js"]).then(({AddContentModal:i})=>({default:i}))),z0=x.lazy(()=>h(()=>import("./index-ae6439d2.js"),["assets/index-ae6439d2.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css","assets/index-2f22123e.js","assets/ClipLoader-96bb9f4d.js","assets/index-83069401.js","assets/three.module-9c942ca6.js","assets/index-9261e06d.js","assets/Stack-a8b59155.js","assets/createSvgIcon-6ef3ed46.js","assets/TextareaAutosize-f571cf36.js","assets/index-64f1c910.js"]).then(({AddItemModal:i})=>({default:i}))),L0=x.lazy(()=>h(()=>import("./index-98d70581.js"),["assets/index-98d70581.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css","assets/index-2f22123e.js","assets/constants-fa18afce.js","assets/ClipLoader-96bb9f4d.js","assets/index-9261e06d.js","assets/Stack-a8b59155.js","assets/createSvgIcon-6ef3ed46.js","assets/TextareaAutosize-f571cf36.js","assets/index-48b3b053.js","assets/Typography-5718a5a5.js","assets/Tabs-fd2a0376.js"]).then(({SourcesTableModal:i})=>({default:i}))),N0=x.lazy(()=>h(()=>import("./index-b5ee4351.js"),["assets/index-b5ee4351.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css","assets/index-2f22123e.js","assets/Skeleton-4c8a0434.js","assets/ClipLoader-96bb9f4d.js"]).then(({EditNodeNameModal:i})=>({default:i}))),R0=x.lazy(()=>h(()=>import("./index-04a78d33.js"),["assets/index-04a78d33.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css","assets/index-2f22123e.js","assets/Skeleton-4c8a0434.js","assets/ClipLoader-96bb9f4d.js"]).then(({RemoveNodeModal:i})=>({default:i}))),O0=x.lazy(()=>h(()=>import("./index-7a1dc0fc.js"),["assets/index-7a1dc0fc.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css","assets/index-2f22123e.js","assets/index-9261e06d.js","assets/Stack-a8b59155.js","assets/createSvgIcon-6ef3ed46.js","assets/TextareaAutosize-f571cf36.js","assets/constants-fa18afce.js","assets/ClipLoader-96bb9f4d.js"]).then(({AddNodeEdgeModal:i})=>({default:i}))),$0=x.lazy(()=>h(()=>import("./index-c5811e62.js"),["assets/index-c5811e62.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css","assets/index-2f22123e.js","assets/index-48b3b053.js","assets/constants-fa18afce.js","assets/index-9261e06d.js","assets/Stack-a8b59155.js","assets/createSvgIcon-6ef3ed46.js","assets/TextareaAutosize-f571cf36.js","assets/ClipLoader-96bb9f4d.js"]).then(({MergeNodeModal:i})=>({default:i}))),q0=x.lazy(()=>h(()=>import("./index-1f130f3c.js"),["assets/index-1f130f3c.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css","assets/index-83069401.js","assets/three.module-9c942ca6.js","assets/ClipLoader-96bb9f4d.js","assets/index-2f22123e.js","assets/index-9261e06d.js","assets/Stack-a8b59155.js","assets/createSvgIcon-6ef3ed46.js","assets/TextareaAutosize-f571cf36.js","assets/index-64f1c910.js"]).then(({ChangeNodeTypeModal:i})=>({default:i}))),Q0=x.lazy(()=>h(()=>import("./index-455ca637.js"),["assets/index-455ca637.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css","assets/index-9261e06d.js","assets/index-2f22123e.js","assets/Stack-a8b59155.js","assets/createSvgIcon-6ef3ed46.js","assets/TextareaAutosize-f571cf36.js","assets/ClipLoader-96bb9f4d.js","assets/isPlainObject-9d6a7051.js","assets/Typography-5718a5a5.js","assets/index-6f7e416d.js","assets/Tabs-fd2a0376.js","assets/index-83069401.js","assets/three.module-9c942ca6.js","assets/index-6cd4b515.js"]).then(({BlueprintModal:i})=>({default:i}))),U0=x.lazy(()=>h(()=>import("./index-887745b1.js"),["assets/index-887745b1.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css","assets/index-2f22123e.js"]).then(({UserFeedBackModal:i})=>({default:i}))),W0=x.lazy(()=>h(()=>import("./index-6c946cd6.js"),["assets/index-6c946cd6.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css","assets/index-2f22123e.js","assets/index-9261e06d.js","assets/Stack-a8b59155.js","assets/createSvgIcon-6ef3ed46.js","assets/TextareaAutosize-f571cf36.js"]).then(({CreateBountyModal:i})=>({default:i}))),H0=x.lazy(()=>h(()=>import("./index-17ed06be.js").then(i=>i.cb),["assets/index-17ed06be.js","assets/index-b4d03b7b.css"]).then(({OnboardingModal:i})=>({default:i}))),Y0=x.lazy(()=>h(()=>import("./index-432a2a9e.js"),["assets/index-432a2a9e.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css","assets/index-2f22123e.js"]).then(({BriefDescription:i})=>({default:i}))),J0=()=>a.jsxs(a.Fragment,{children:[a.jsx(z0,{}),a.jsx(I0,{}),a.jsx(T0,{}),a.jsx(N0,{}),a.jsx(R0,{}),a.jsx(L0,{}),a.jsx(O0,{}),a.jsx(q0,{}),a.jsx(Q0,{}),a.jsx($0,{}),a.jsx(U0,{}),a.jsx(W0,{}),a.jsx(H0,{}),a.jsx(Y0,{})]}),K0=()=>{const[i,t]=x.useState(null),{runningProjectMessages:e}=P(m=>m),n=m=>{t(m.currentTarget)},o=()=>{t(null)},G=!!i,u=G?"simple-popover":void 0;return e.length?a.jsxs(X0,{ml:8,children:[a.jsx(aa,{onClick:n,children:a.jsxs(N,{content:"Messages",margin:"18px",children:[a.jsx("div",{className:"icon",children:a.jsx(r0,{})}),a.jsx("div",{className:"text",children:a.jsx("p",{children:e.length})})]})}),a.jsxs(ia,{anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"right"},id:u,onClose:o,open:G,children:[a.jsx(k0,{onClick:o,children:a.jsx(e0,{})}),a.jsx(Z0,{p:16,children:e.map(m=>a.jsx("p",{className:"item",children:m},m))})]})]}):null},X0=c(d).attrs({align:"center",direction:"row",grow:0,justify:"flex-start"})``,Z0=c(d)` +`,_0={askedQuestions:null,askedQuestionsAnswers:null,hasQuestionInProgress:!1,hasTeachingInProgress:!1,hasInstagraphInProgress:!1,teachMeAnswer:null,instgraphAnswser:null},M0=s0(i=>({..._0,setAskedQuestion:t=>i(e=>({askedQuestions:[...e.askedQuestions||[],t],hasQuestionInProgress:!0})),setAskedQuestionAnswer:t=>i(e=>({askedQuestionsAnswers:[...e.askedQuestionsAnswers||[],t],hasQuestionInProgress:!1})),setHasQuestionInProgress:t=>i({hasQuestionInProgress:t}),setHasTeachingInProgress:t=>i({hasTeachingInProgress:t}),setHasInstagraphInProgress:t=>i({hasInstagraphInProgress:t}),setTeachMeAnswer:t=>i({hasTeachingInProgress:!1,teachMeAnswer:t}),setInstagraphAnswer:t=>{var e,n,o,G;(e=t==null?void 0:t.instagraph)!=null&&e.edges&&((n=t==null?void 0:t.instagraph)!=null&&n.nodes)&&i({hasInstagraphInProgress:!1,instgraphAnswser:{edges:(o=t==null?void 0:t.instagraph)==null?void 0:o.edges,nodes:(G=t==null?void 0:t.instagraph)==null?void 0:G.nodes}})}})),C0="0.1.106",T0=x.lazy(()=>h(()=>import("./index-a8281b7f.js"),["assets/index-a8281b7f.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css","assets/index-77dce891.js","assets/ClipLoader-0106d300.js","assets/Tabs-33c59ae4.js","assets/createSvgIcon-fa140fa5.js"]).then(({SettingsModal:i})=>({default:i}))),I0=x.lazy(()=>h(()=>import("./index-ee5b3a5b.js"),["assets/index-ee5b3a5b.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css","assets/index-77dce891.js","assets/ClipLoader-0106d300.js"]).then(({AddContentModal:i})=>({default:i}))),z0=x.lazy(()=>h(()=>import("./index-14cee051.js"),["assets/index-14cee051.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css","assets/index-77dce891.js","assets/ClipLoader-0106d300.js","assets/index-83069401.js","assets/three.module-9c942ca6.js","assets/index-efed0068.js","assets/Stack-b3992130.js","assets/createSvgIcon-fa140fa5.js","assets/TextareaAutosize-e216d6db.js","assets/index-64f1c910.js"]).then(({AddItemModal:i})=>({default:i}))),L0=x.lazy(()=>h(()=>import("./index-e48d517d.js"),["assets/index-e48d517d.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css","assets/index-77dce891.js","assets/constants-380035da.js","assets/ClipLoader-0106d300.js","assets/index-efed0068.js","assets/Stack-b3992130.js","assets/createSvgIcon-fa140fa5.js","assets/TextareaAutosize-e216d6db.js","assets/index-798db353.js","assets/Typography-02db806b.js","assets/Tabs-33c59ae4.js"]).then(({SourcesTableModal:i})=>({default:i}))),N0=x.lazy(()=>h(()=>import("./index-7545798f.js"),["assets/index-7545798f.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css","assets/index-77dce891.js","assets/Skeleton-fe703092.js","assets/ClipLoader-0106d300.js"]).then(({EditNodeNameModal:i})=>({default:i}))),R0=x.lazy(()=>h(()=>import("./index-70104819.js"),["assets/index-70104819.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css","assets/index-77dce891.js","assets/Skeleton-fe703092.js","assets/ClipLoader-0106d300.js"]).then(({RemoveNodeModal:i})=>({default:i}))),O0=x.lazy(()=>h(()=>import("./index-f3f8c0bc.js"),["assets/index-f3f8c0bc.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css","assets/index-77dce891.js","assets/index-efed0068.js","assets/Stack-b3992130.js","assets/createSvgIcon-fa140fa5.js","assets/TextareaAutosize-e216d6db.js","assets/constants-380035da.js","assets/ClipLoader-0106d300.js"]).then(({AddNodeEdgeModal:i})=>({default:i}))),$0=x.lazy(()=>h(()=>import("./index-b15c0dc1.js"),["assets/index-b15c0dc1.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css","assets/index-77dce891.js","assets/index-798db353.js","assets/constants-380035da.js","assets/index-efed0068.js","assets/Stack-b3992130.js","assets/createSvgIcon-fa140fa5.js","assets/TextareaAutosize-e216d6db.js","assets/ClipLoader-0106d300.js"]).then(({MergeNodeModal:i})=>({default:i}))),q0=x.lazy(()=>h(()=>import("./index-792a21d1.js"),["assets/index-792a21d1.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css","assets/index-83069401.js","assets/three.module-9c942ca6.js","assets/ClipLoader-0106d300.js","assets/index-77dce891.js","assets/index-efed0068.js","assets/Stack-b3992130.js","assets/createSvgIcon-fa140fa5.js","assets/TextareaAutosize-e216d6db.js","assets/index-64f1c910.js"]).then(({ChangeNodeTypeModal:i})=>({default:i}))),Q0=x.lazy(()=>h(()=>import("./index-6d6e756f.js"),["assets/index-6d6e756f.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css","assets/index-efed0068.js","assets/index-77dce891.js","assets/Stack-b3992130.js","assets/createSvgIcon-fa140fa5.js","assets/TextareaAutosize-e216d6db.js","assets/ClipLoader-0106d300.js","assets/isPlainObject-528c68e4.js","assets/Typography-02db806b.js","assets/index-94d47251.js","assets/Tabs-33c59ae4.js","assets/index-83069401.js","assets/three.module-9c942ca6.js","assets/index-64d5234f.js"]).then(({BlueprintModal:i})=>({default:i}))),U0=x.lazy(()=>h(()=>import("./index-bb9e0a43.js"),["assets/index-bb9e0a43.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css","assets/index-77dce891.js"]).then(({UserFeedBackModal:i})=>({default:i}))),W0=x.lazy(()=>h(()=>import("./index-fe0be4c5.js"),["assets/index-fe0be4c5.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css","assets/index-77dce891.js","assets/index-efed0068.js","assets/Stack-b3992130.js","assets/createSvgIcon-fa140fa5.js","assets/TextareaAutosize-e216d6db.js"]).then(({CreateBountyModal:i})=>({default:i}))),H0=x.lazy(()=>h(()=>import("./index-787c3ef8.js").then(i=>i.cb),["assets/index-787c3ef8.js","assets/index-b4d03b7b.css"]).then(({OnboardingModal:i})=>({default:i}))),Y0=x.lazy(()=>h(()=>import("./index-90c40e8b.js"),["assets/index-90c40e8b.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css","assets/index-77dce891.js"]).then(({BriefDescription:i})=>({default:i}))),J0=()=>a.jsxs(a.Fragment,{children:[a.jsx(z0,{}),a.jsx(I0,{}),a.jsx(T0,{}),a.jsx(N0,{}),a.jsx(R0,{}),a.jsx(L0,{}),a.jsx(O0,{}),a.jsx(q0,{}),a.jsx(Q0,{}),a.jsx($0,{}),a.jsx(U0,{}),a.jsx(W0,{}),a.jsx(H0,{}),a.jsx(Y0,{})]}),K0=()=>{const[i,t]=x.useState(null),{runningProjectMessages:e}=P(m=>m),n=m=>{t(m.currentTarget)},o=()=>{t(null)},G=!!i,u=G?"simple-popover":void 0;return e.length?a.jsxs(X0,{ml:8,children:[a.jsx(aa,{onClick:n,children:a.jsxs(N,{content:"Messages",margin:"18px",children:[a.jsx("div",{className:"icon",children:a.jsx(r0,{})}),a.jsx("div",{className:"text",children:a.jsx("p",{children:e.length})})]})}),a.jsxs(ia,{anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"right"},id:u,onClose:o,open:G,children:[a.jsx(k0,{onClick:o,children:a.jsx(e0,{})}),a.jsx(Z0,{p:16,children:e.map(m=>a.jsx("p",{className:"item",children:m},m))})]})]}):null},X0=c(d).attrs({align:"center",direction:"row",grow:0,justify:"flex-start"})``,Z0=c(d)` max-height: 50vh; max-width: 30vw; background: transparent; @@ -360,4 +360,4 @@ import{W as x0,c as s0,r as x,_ as h,j as a,s as c,a as r,F as d,u as P,I as r0, color: ${r.white}; font-size: 12px; opacity: 0.5; -`,Pa=x.lazy(()=>h(()=>import("./index-3c0c8d74.js"),["assets/index-3c0c8d74.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css","assets/index-2f22123e.js"]).then(({MainToolbar:i})=>({default:i}))),_a=x.lazy(()=>h(()=>import("./index-edf7575c.js"),["assets/index-edf7575c.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css","assets/index-6cd4b515.js","assets/three.module-9c942ca6.js","assets/index-6f7e416d.js","assets/index-2f22123e.js","assets/TextareaAutosize-f571cf36.js","assets/index-053bf7ca.js","assets/ClipLoader-96bb9f4d.js"]).then(({Universe:i})=>({default:i}))),Ma=x.lazy(()=>h(()=>import("./index-ed087dc3.js").then(i=>i.i),["assets/index-ed087dc3.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css","assets/index-2f22123e.js","assets/ClipLoader-96bb9f4d.js","assets/Skeleton-4c8a0434.js","assets/Stack-a8b59155.js","assets/isPlainObject-9d6a7051.js","assets/Typography-5718a5a5.js","assets/createSvgIcon-6ef3ed46.js","assets/index-432a2a9e.js","assets/index-6f7e416d.js","assets/index-053bf7ca.js"]).then(({SideBar:i})=>({default:i}))),Ca=()=>{const[i]=b0(),t=i.get("q"),{setBudget:e,setNodeCount:n}=Z(k=>k),o=x.useRef(null),G=x.useRef(null),{setSidebarOpen:u,currentSearch:m,setCurrentSearch:V,setRelevanceSelected:_,setTranscriptOpen:M,universeQuestionIsOpen:C,setUniverseQuestionIsOpen:S}=a0(k=>k),T=M0(k=>k.setTeachMeAnswer),{fetchData:g,setCategoryFilter:F,setAbortRequests:j,addNewNode:s,splashDataLoading:p,runningProjectId:f,setRunningProjectMessages:B,isFetching:D}=P(k=>k),{setAiSummaryAnswer:y,getKeyExist:R,aiRefId:I}=i0(k=>k),w=t0(),[O,E]=u0(k=>[k.realtimeGraphFeatureFlag,k.chatInterfaceFeatureFlag]),l=F0(),$=E0({mode:"onChange"}),{setValue:q}=$;x.useEffect(()=>{q("search",t??""),M(!1),w(null),_(!1),V(t??""),T(""),F(null)},[t,F,V,_,w,T,M,q]),x.useEffect(()=>{(async()=>{await g(e,j),u(!0),m?await B0(e):w(null)})()},[m,g,e,j,u,w]);const Q=x.useCallback(()=>{n("INCREMENT")},[n]),U=x.useCallback(k=>{D||(o.current||(o.current={nodes:[],edges:[]}),k.edges&&o.current.edges.push(...k.edges),k.nodes&&o.current.nodes.push(...k.nodes),G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{if(o.current){const{nodes:b,edges:A}=o.current,v={nodes:b,edges:A};o.current={nodes:[],edges:[]},s(v)}},3e3))},[s,D]),W=x.useCallback(k=>{k.ref_id&&y(k.ref_id,{answer:k.answer,answerLoading:!1})},[y]),H=x.useCallback(k=>{k.ref_id&&y(k.ref_id,{audio_en:k.audio_EN})},[y]),Y=x.useCallback(k=>{k.ref_id&&y(k.ref_id,{questions:k.relevant_questions.map(b=>b.question),questionsLoading:!1})},[y]),J=x.useCallback(k=>{k.ref_id&&y(k.ref_id,{sources:k.sources.map(b=>b.ref_id),sourcesLoading:!1})},[y]),K=x.useCallback(k=>{k.question&&R(I)&&y(I,{answerLoading:!1,entities:k.entities})},[y,R,I]);return x.useEffect(()=>(l&&(l.connect(),l.on("connect_error",k=>{console.error("Socket connection error:",k)}),l.on("newnode",Q),E&&l.on("extractedentitieshook",K),E&&l.on("askquestionhook",W),E&&l.on("relevantquestionshook",Y),E&&l.on("answersourceshook",J),O&&l.on("new_node_created",U),E&&l.on("answeraudiohook",H)),()=>{l&&l.off()}),[l,Q,U,O,W,E,Y,J,K,H]),x.useEffect(()=>{},[f,B]),x.useEffect(()=>{if(f)try{l==null||l.emit("update_project_id",{id:f})}catch(k){console.error(k)}},[f,l]),x.useEffect(()=>{p||E&&S()},[S,p,E]),a.jsxs(a.Fragment,{children:[a.jsx(P0,{}),a.jsx(ga,{}),a.jsx(x.Suspense,{fallback:a.jsx("div",{children:"Loading..."}),children:p?null:a.jsxs(wa,{direction:"row",children:[a.jsxs(A0,{...$,children:[a.jsx(Pa,{}),!C&&a.jsx(Ma,{}),a.jsx(_a,{}),a.jsx(j0,{}),a.jsx(Aa,{}),a.jsxs(va,{children:["v",C0]}),a.jsx(w0,{})]}),a.jsx(J0,{}),a.jsx(ja,{})]})})]})},za=Object.freeze(Object.defineProperty({__proto__:null,App:Ca},Symbol.toStringTag,{value:"Module"}));export{v0 as f,za as i}; +`,Pa=x.lazy(()=>h(()=>import("./index-8b765fc7.js"),["assets/index-8b765fc7.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css","assets/index-77dce891.js"]).then(({MainToolbar:i})=>({default:i}))),_a=x.lazy(()=>h(()=>import("./index-562bc714.js"),["assets/index-562bc714.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css","assets/index-64d5234f.js","assets/three.module-9c942ca6.js","assets/index-94d47251.js","assets/index-77dce891.js","assets/TextareaAutosize-e216d6db.js","assets/index-2cd18ef8.js","assets/ClipLoader-0106d300.js"]).then(({Universe:i})=>({default:i}))),Ma=x.lazy(()=>h(()=>import("./index-d501a02f.js").then(i=>i.i),["assets/index-d501a02f.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css","assets/index-77dce891.js","assets/ClipLoader-0106d300.js","assets/Skeleton-fe703092.js","assets/Stack-b3992130.js","assets/isPlainObject-528c68e4.js","assets/Typography-02db806b.js","assets/createSvgIcon-fa140fa5.js","assets/index-90c40e8b.js","assets/index-94d47251.js","assets/index-2cd18ef8.js"]).then(({SideBar:i})=>({default:i}))),Ca=()=>{const[i]=b0(),t=i.get("q"),{setBudget:e,setNodeCount:n}=Z(k=>k),o=x.useRef(null),G=x.useRef(null),{setSidebarOpen:u,currentSearch:m,setCurrentSearch:V,setRelevanceSelected:_,setTranscriptOpen:M,universeQuestionIsOpen:C,setUniverseQuestionIsOpen:S}=a0(k=>k),T=M0(k=>k.setTeachMeAnswer),{fetchData:g,setCategoryFilter:F,setAbortRequests:j,addNewNode:s,splashDataLoading:p,runningProjectId:f,setRunningProjectMessages:B,isFetching:D}=P(k=>k),{setAiSummaryAnswer:y,getKeyExist:R,aiRefId:I}=i0(k=>k),w=t0(),[O,E]=u0(k=>[k.realtimeGraphFeatureFlag,k.chatInterfaceFeatureFlag]),l=F0(),$=E0({mode:"onChange"}),{setValue:q}=$;x.useEffect(()=>{q("search",t??""),M(!1),w(null),_(!1),V(t??""),T(""),F(null)},[t,F,V,_,w,T,M,q]),x.useEffect(()=>{(async()=>{await g(e,j),u(!0),m?await B0(e):w(null)})()},[m,g,e,j,u,w]);const Q=x.useCallback(()=>{n("INCREMENT")},[n]),U=x.useCallback(k=>{D||(o.current||(o.current={nodes:[],edges:[]}),k.edges&&o.current.edges.push(...k.edges),k.nodes&&o.current.nodes.push(...k.nodes),G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{if(o.current){const{nodes:b,edges:A}=o.current,v={nodes:b,edges:A};o.current={nodes:[],edges:[]},s(v)}},3e3))},[s,D]),W=x.useCallback(k=>{k.ref_id&&y(k.ref_id,{answer:k.answer,answerLoading:!1})},[y]),H=x.useCallback(k=>{k.ref_id&&y(k.ref_id,{audio_en:k.audio_EN})},[y]),Y=x.useCallback(k=>{k.ref_id&&y(k.ref_id,{questions:k.relevant_questions.map(b=>b.question),questionsLoading:!1})},[y]),J=x.useCallback(k=>{k.ref_id&&y(k.ref_id,{sources:k.sources.map(b=>b.ref_id),sourcesLoading:!1})},[y]),K=x.useCallback(k=>{k.question&&R(I)&&y(I,{answerLoading:!1,entities:k.entities})},[y,R,I]);return x.useEffect(()=>(l&&(l.connect(),l.on("connect_error",k=>{console.error("Socket connection error:",k)}),l.on("newnode",Q),E&&l.on("extractedentitieshook",K),E&&l.on("askquestionhook",W),E&&l.on("relevantquestionshook",Y),E&&l.on("answersourceshook",J),O&&l.on("new_node_created",U),E&&l.on("answeraudiohook",H)),()=>{l&&l.off()}),[l,Q,U,O,W,E,Y,J,K,H]),x.useEffect(()=>{},[f,B]),x.useEffect(()=>{if(f)try{l==null||l.emit("update_project_id",{id:f})}catch(k){console.error(k)}},[f,l]),x.useEffect(()=>{p||E&&S()},[S,p,E]),a.jsxs(a.Fragment,{children:[a.jsx(P0,{}),a.jsx(ga,{}),a.jsx(x.Suspense,{fallback:a.jsx("div",{children:"Loading..."}),children:p?null:a.jsxs(wa,{direction:"row",children:[a.jsxs(A0,{...$,children:[a.jsx(Pa,{}),!C&&a.jsx(Ma,{}),a.jsx(_a,{}),a.jsx(j0,{}),a.jsx(Aa,{}),a.jsxs(va,{children:["v",C0]}),a.jsx(w0,{})]}),a.jsx(J0,{}),a.jsx(ja,{})]})})]})},za=Object.freeze(Object.defineProperty({__proto__:null,App:Ca},Symbol.toStringTag,{value:"Module"}));export{v0 as f,za as i}; diff --git a/build/assets/index-ed087dc3.js b/build/assets/index-d501a02f.js similarity index 99% rename from build/assets/index-ed087dc3.js rename to build/assets/index-d501a02f.js index 633f03ae4..1ee3f92fc 100644 --- a/build/assets/index-ed087dc3.js +++ b/build/assets/index-d501a02f.js @@ -1,4 +1,4 @@ -import{z as qO,ag as xa,i as Lv,ah as GL,r as P,ai as HO,Z as zs,$ as zL,a2 as Ps,x as ce,j as h,M as pb,L as fb,O as Mr,aj as qL,Y as Jt,P as Hi,S as gb,H as jl,U as Cr,V as hb,a3 as Fl,ak as HL,al as WL,am as WO,s as B,a as M,an as VO,ao as mb,o as Bl,F,t as VL,u as Pr,b as Ul,ap as YO,v as YL,T as mt,aq as KL,A as dn,k as Ct,d as KO,ar as ei,as as Tt,at as XL,a9 as pt,B as Mt,n as XO,q as ZO,C as JO,y as ZL,au as QO,e as Mv,p as JL,av as e1,aw as t1,ax as ti,ay as Ne,J as U,az as QL,aA as eM,aB as tM,aC as Gl,aD as rM,aE as nM,aF as aM,aG as iM,aH as r1,aI as oM,aJ as zl,aK as sM,aL as lM,aM as uM,aN as cM,ad as dM,aO as Pv,l as pM,aP as fM,aQ as gM,I as hM,_ as ir,aR as mM,aS as bM}from"./index-17ed06be.js";import{G as na,J as $s,K as ac,L as n1,Q as yM,U as vM,V as SM,W as $v,X as js,Y as Tn,Z as jv,_ as fs,$ as a1,a0 as EM,h as bb,a1 as i1,b as $r,g as ri,a2 as vn,a3 as o1,i as s1,a4 as xM,u as Mo,a5 as wM,a6 as yb,a7 as ql,a8 as vb,a9 as _M,aa as l1,ab as u1,ac as TM,P as AM,ad as c1,ae as OM,af as kM,ag as RM,ah as IM,d as Sb,e as Eb,ai as NM,aj as CM,ak as DM,n as Pt,al as d1,am as LM,f as p1,an as MM,c as Po,ao as PM,ap as $M,aq as jM,ar as FM,as as BM,at as f1,au as UM}from"./index-2f22123e.js";import{c as GM,a as ic,C as Hl}from"./ClipLoader-96bb9f4d.js";import{S as g1}from"./Skeleton-4c8a0434.js";import{u as h1,P as xb,a as zM,F as qM}from"./Stack-a8b59155.js";import{S as HM,F as Fv,i as $o,g as yr,t as WM,_ as m1,a as VM,b as YM,c as ia,d as wb,e as KM,f as XM,h as ZM,j as jo,m as JM,k as QM,l as eP,n as b1,o as tP,p as rP}from"./isPlainObject-9d6a7051.js";import{c as _b}from"./createSvgIcon-6ef3ed46.js";import{useBriefDescriptionStore as nP}from"./index-432a2a9e.js";import{P as we,p as aP}from"./index-6f7e416d.js";import{u as y1}from"./index-053bf7ca.js";const Bv="023d8eb306f0027b902fbdc81d33b49b6558b3434d374626f8c324979c92d47c21",iP=async e=>{let t=await xa.enable(!0);if(t||console.warn("Sphinx enable failed, means no pubkey and no budget (including budget of 0)"),t=await xa.keysend(Bv,e),!(t!=null&&t.success)){if(t=await xa.topup(),t||(t=await xa.authorize()),!(t!=null&&t.budget)||(t==null?void 0:t.budget){const r=await iP(t),n={amount:t,refid:e};return await qO.post("/boost",JSON.stringify(n)),r},sP=e=>{const[t,r]=e.split("-")||["",""];return parseInt(r,10)!==0?`${t} - ${r}`:t},v1=(e,t)=>{if(!t)return null;const r=e.filter(i=>i.show_title&&i.link&&i.show_title===t.show_title&&i.episode_title===t.episode_title),n=Lv.groupBy(r,i=>i.timestamp),a=Lv.values(n).reduce((i,o)=>(o[0]&&i.push(o[0]),i),[]);return a.sort((i,o)=>{var p,g;const[s]=((p=i.timestamp)==null?void 0:p.split("-"))||[""],[l]=((g=o.timestamp)==null?void 0:g.split("-"))||[""],c=na(s),d=na(l);return c-d}),a},lP=async e=>{await GL(async()=>{try{await xa.saveGraphData({metaData:{date:Math.floor(new Date().getTime()/1e3),...e},type:"second_brain_consumed_content"})}catch(t){console.warn(t)}})},uP=e=>{const t=/((http|https):\/\/[^\s]+)/g,r=/@(\w+)/g;let n=e.replace(/\\/g,"");return n=n.replace(/'/g,"’"),n=n.replace(/\n/g,"
"),n=n.replace(t,'$1'),n=n.replace(r,'@$1'),n},cP={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},dP=cP;function pP(e,t,r=(n,a)=>n===a){return e.length===t.length&&e.every((n,a)=>r(n,t[a]))}const fP=2;function S1(e,t){return e-t}function hi(e,t,r){return e==null?t:Math.min(Math.max(t,e),r)}function Uv(e,t){var r;const{index:n}=(r=e.reduce((a,i,o)=>{const s=Math.abs(t-i);return a===null||s({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},yP=e=>e;let bs;function oc(){return bs===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?bs=CSS.supports("touch-action","none"):bs=!0),bs}function vP(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:a=!1,isRtl:i=!1,marks:o=!1,max:s=100,min:l=0,name:c,onChange:d,onChangeCommitted:p,orientation:g="horizontal",rootRef:m,scale:b=yP,step:v=1,tabIndex:S,value:O}=e,_=P.useRef(),[w,A]=P.useState(-1),[x,E]=P.useState(-1),[k,N]=P.useState(!1),I=P.useRef(0),[D,L]=h1({controlled:O,default:r??l,name:"Slider"}),j=d&&((te,de,ye)=>{const ve=te.nativeEvent||te,ge=new ve.constructor(ve.type,ve);Object.defineProperty(ge,"target",{writable:!0,value:{value:de,name:c}}),d(ge,de,ye)}),z=Array.isArray(D);let q=z?D.slice().sort(S1):[D];q=q.map(te=>hi(te,l,s));const H=o===!0&&v!==null?[...Array(Math.floor((s-l)/v)+1)].map((te,de)=>({value:l+v*de})):o||[],V=H.map(te=>te.value),{isFocusVisibleRef:K,onBlur:G,onFocus:W,ref:J}=HO(),[ae,re]=P.useState(-1),ue=P.useRef(),Se=zs(J,ue),Q=zs(m,Se),Ie=te=>de=>{var ye;const ve=Number(de.currentTarget.getAttribute("data-index"));W(de),K.current===!0&&re(ve),E(ve),te==null||(ye=te.onFocus)==null||ye.call(te,de)},Ue=te=>de=>{var ye;G(de),K.current===!1&&re(-1),E(-1),te==null||(ye=te.onBlur)==null||ye.call(te,de)};zL(()=>{if(n&&ue.current.contains(document.activeElement)){var te;(te=document.activeElement)==null||te.blur()}},[n]),n&&w!==-1&&A(-1),n&&ae!==-1&&re(-1);const xe=te=>de=>{var ye;(ye=te.onChange)==null||ye.call(te,de);const ve=Number(de.currentTarget.getAttribute("data-index")),ge=q[ve],qe=V.indexOf(ge);let De=de.target.valueAsNumber;if(H&&v==null){const Ge=V[V.length-1];De>Ge?De=Ge:De{const{current:ye}=ue,{width:ve,height:ge,bottom:qe,left:De}=ye.getBoundingClientRect();let Ge;oe.indexOf("vertical")===0?Ge=(qe-te.y)/ge:Ge=(te.x-De)/ve,oe.indexOf("-reverse")!==-1&&(Ge=1-Ge);let Je;if(Je=gP(Ge,l,s),v)Je=mP(Je,v,l);else{const rr=Uv(V,Je);Je=V[rr]}Je=hi(Je,l,s);let jt=0;if(z){de?jt=ee.current:jt=Uv(q,Je),a&&(Je=hi(Je,q[jt-1]||-1/0,q[jt+1]||1/0));const rr=Je;Je=Gv({values:q,newValue:Je,index:jt}),a&&de||(jt=Je.indexOf(rr),ee.current=jt)}return{newValue:Je,activeIndex:jt}},X=Ps(te=>{const de=gs(te,_);if(!de)return;if(I.current+=1,te.type==="mousemove"&&te.buttons===0){Ee(te);return}const{newValue:ye,activeIndex:ve}=ie({finger:de,move:!0});hs({sliderRef:ue,activeIndex:ve,setActive:A}),L(ye),!k&&I.current>fP&&N(!0),j&&!ms(ye,D)&&j(te,ye,ve)}),Ee=Ps(te=>{const de=gs(te,_);if(N(!1),!de)return;const{newValue:ye}=ie({finger:de,move:!0});A(-1),te.type==="touchend"&&E(-1),p&&p(te,ye),_.current=void 0,he()}),fe=Ps(te=>{if(n)return;oc()||te.preventDefault();const de=te.changedTouches[0];de!=null&&(_.current=de.identifier);const ye=gs(te,_);if(ye!==!1){const{newValue:ge,activeIndex:qe}=ie({finger:ye});hs({sliderRef:ue,activeIndex:qe,setActive:A}),L(ge),j&&!ms(ge,D)&&j(te,ge,qe)}I.current=0;const ve=$s(ue.current);ve.addEventListener("touchmove",X),ve.addEventListener("touchend",Ee)}),he=P.useCallback(()=>{const te=$s(ue.current);te.removeEventListener("mousemove",X),te.removeEventListener("mouseup",Ee),te.removeEventListener("touchmove",X),te.removeEventListener("touchend",Ee)},[Ee,X]);P.useEffect(()=>{const{current:te}=ue;return te.addEventListener("touchstart",fe,{passive:oc()}),()=>{te.removeEventListener("touchstart",fe,{passive:oc()}),he()}},[he,fe]),P.useEffect(()=>{n&&he()},[n,he]);const je=te=>de=>{var ye;if((ye=te.onMouseDown)==null||ye.call(te,de),n||de.defaultPrevented||de.button!==0)return;de.preventDefault();const ve=gs(de,_);if(ve!==!1){const{newValue:qe,activeIndex:De}=ie({finger:ve});hs({sliderRef:ue,activeIndex:De,setActive:A}),L(qe),j&&!ms(qe,D)&&j(de,qe,De)}I.current=0;const ge=$s(ue.current);ge.addEventListener("mousemove",X),ge.addEventListener("mouseup",Ee)},nt=qs(z?q[0]:l,l,s),et=qs(q[q.length-1],l,s)-nt,tr=(te={})=>{const de=ac(te),ye={onMouseDown:je(de||{})},ve=ce({},de,ye);return ce({},te,{ref:Q},ve)},Pe=te=>de=>{var ye;(ye=te.onMouseOver)==null||ye.call(te,de);const ve=Number(de.currentTarget.getAttribute("data-index"));E(ve)},$e=te=>de=>{var ye;(ye=te.onMouseLeave)==null||ye.call(te,de),E(-1)};return{active:w,axis:oe,axisProps:bP,dragging:k,focusedThumbIndex:ae,getHiddenInputProps:(te={})=>{var de;const ye=ac(te),ve={onChange:xe(ye||{}),onFocus:Ie(ye||{}),onBlur:Ue(ye||{})},ge=ce({},ye,ve);return ce({tabIndex:S,"aria-labelledby":t,"aria-orientation":g,"aria-valuemax":b(s),"aria-valuemin":b(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(de=e.step)!=null?de:void 0,disabled:n},te,ge,{style:ce({},dP,{direction:i?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:tr,getThumbProps:(te={})=>{const de=ac(te),ye={onMouseOver:Pe(de||{}),onMouseLeave:$e(de||{})};return ce({},te,de,ye)},marks:H,open:x,range:z,rootRef:Q,trackLeap:et,trackOffset:nt,values:q,getThumbStyle:te=>({pointerEvents:w!==-1&&w!==te?"none":void 0})}}const SP=_b(h.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),EP=_b(h.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),xP=_b(h.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function wP(e){return fb("MuiCheckbox",e)}const _P=pb("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),sc=_P,TP=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],AP=e=>{const{classes:t,indeterminate:r,color:n,size:a}=e,i={root:["root",r&&"indeterminate",`color${Jt(n)}`,`size${Jt(a)}`]},o=hb(i,wP,t);return ce({},t,o)},OP=Mr(HM,{shouldForwardProp:e=>qL(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${Jt(r.size)}`],r.color!=="default"&&t[`color${Jt(r.color)}`]]}})(({theme:e,ownerState:t})=>ce({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Hi(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${sc.checked}, &.${sc.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${sc.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),kP=h.jsx(EP,{}),RP=h.jsx(SP,{}),IP=h.jsx(xP,{}),NP=P.forwardRef(function(t,r){var n,a;const i=gb({props:t,name:"MuiCheckbox"}),{checkedIcon:o=kP,color:s="primary",icon:l=RP,indeterminate:c=!1,indeterminateIcon:d=IP,inputProps:p,size:g="medium",className:m}=i,b=jl(i,TP),v=c?d:l,S=c?d:o,O=ce({},i,{color:s,indeterminate:c,size:g}),_=AP(O);return h.jsx(OP,ce({type:"checkbox",inputProps:ce({"data-indeterminate":c},p),icon:P.cloneElement(v,{fontSize:(n=v.props.fontSize)!=null?n:g}),checkedIcon:P.cloneElement(S,{fontSize:(a=S.props.fontSize)!=null?a:g}),ownerState:O,ref:r,className:Cr(_.root,m)},b,{classes:_}))}),CP=NP,DP=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function LP(e,t,r){const n=t.getBoundingClientRect(),a=r&&r.getBoundingClientRect(),i=n1(t);let o;if(t.fakeTransform)o=t.fakeTransform;else{const c=i.getComputedStyle(t);o=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let s=0,l=0;if(o&&o!=="none"&&typeof o=="string"){const c=o.split("(")[1].split(")")[0].split(",");s=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?a?`translateX(${a.right+s-n.left}px)`:`translateX(${i.innerWidth+s-n.left}px)`:e==="right"?a?`translateX(-${n.right-a.left-s}px)`:`translateX(-${n.left+n.width-s}px)`:e==="up"?a?`translateY(${a.bottom+l-n.top}px)`:`translateY(${i.innerHeight+l-n.top}px)`:a?`translateY(-${n.top-a.top+n.height-l}px)`:`translateY(-${n.top+n.height-l}px)`}function MP(e){return typeof e=="function"?e():e}function ys(e,t,r){const n=MP(r),a=LP(e,t,n);a&&(t.style.webkitTransform=a,t.style.transform=a)}const PP=P.forwardRef(function(t,r){const n=Fl(),a={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:l,container:c,direction:d="down",easing:p=a,in:g,onEnter:m,onEntered:b,onEntering:v,onExit:S,onExited:O,onExiting:_,style:w,timeout:A=i,TransitionComponent:x=yM}=t,E=jl(t,DP),k=P.useRef(null),N=zs(l.ref,k,r),I=G=>W=>{G&&(W===void 0?G(k.current):G(k.current,W))},D=I((G,W)=>{ys(d,G,c),SM(G),m&&m(G,W)}),L=I((G,W)=>{const J=$v({timeout:A,style:w,easing:p},{mode:"enter"});G.style.webkitTransition=n.transitions.create("-webkit-transform",ce({},J)),G.style.transition=n.transitions.create("transform",ce({},J)),G.style.webkitTransform="none",G.style.transform="none",v&&v(G,W)}),j=I(b),z=I(_),q=I(G=>{const W=$v({timeout:A,style:w,easing:p},{mode:"exit"});G.style.webkitTransition=n.transitions.create("-webkit-transform",W),G.style.transition=n.transitions.create("transform",W),ys(d,G,c),S&&S(G)}),H=I(G=>{G.style.webkitTransition="",G.style.transition="",O&&O(G)}),V=G=>{o&&o(k.current,G)},K=P.useCallback(()=>{k.current&&ys(d,k.current,c)},[d,c]);return P.useEffect(()=>{if(g||d==="down"||d==="right")return;const G=vM(()=>{k.current&&ys(d,k.current,c)}),W=n1(k.current);return W.addEventListener("resize",G),()=>{G.clear(),W.removeEventListener("resize",G)}},[d,g,c]),P.useEffect(()=>{g||K()},[g,K]),h.jsx(x,ce({nodeRef:k,onEnter:D,onEntered:j,onEntering:L,onExit:q,onExited:H,onExiting:z,addEndListener:V,appear:s,in:g,timeout:A},E,{children:(G,W)=>P.cloneElement(l,ce({ref:N,style:ce({visibility:G==="exited"&&!g?"hidden":void 0},w,l.props.style)},W))}))}),Ca=PP,$P=e=>!e||!js(e),jP=$P;function FP(e){return fb("MuiSlider",e)}const BP=pb("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),Dr=BP,UP=e=>{const{open:t}=e;return{offset:Cr(t&&Dr.valueLabelOpen),circle:Dr.valueLabelCircle,label:Dr.valueLabelLabel}};function GP(e){const{children:t,className:r,value:n}=e,a=UP(e);return t?P.cloneElement(t,{className:Cr(t.props.className)},h.jsxs(P.Fragment,{children:[t.props.children,h.jsx("span",{className:Cr(a.offset,r),"aria-hidden":!0,children:h.jsx("span",{className:a.circle,children:h.jsx("span",{className:a.label,children:n})})})]})):null}const zP=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function zv(e){return e}const qP=Mr("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${Jt(r.color)}`],r.size!=="medium"&&t[`size${Jt(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(({theme:e,ownerState:t})=>ce({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:(e.vars||e).palette[t.color].main,WebkitTapHighlightColor:"transparent"},t.orientation==="horizontal"&&ce({height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}},t.size==="small"&&{height:2},t.marked&&{marginBottom:20}),t.orientation==="vertical"&&ce({height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}},t.size==="small"&&{width:2},t.marked&&{marginRight:44}),{"@media print":{colorAdjust:"exact"},[`&.${Dr.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Dr.dragging}`]:{[`& .${Dr.thumb}, & .${Dr.track}`]:{transition:"none"}}})),HP=Mr("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>ce({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},e.orientation==="horizontal"&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},e.orientation==="vertical"&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},e.track==="inverted"&&{opacity:1})),WP=Mr("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const r=e.palette.mode==="light"?HL(e.palette[t.color].main,.62):WL(e.palette[t.color].main,.5);return ce({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{border:"none"},t.orientation==="horizontal"&&{height:"inherit",top:"50%",transform:"translateY(-50%)"},t.orientation==="vertical"&&{width:"inherit",left:"50%",transform:"translateX(-50%)"},t.track===!1&&{display:"none"},t.track==="inverted"&&{backgroundColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:r,borderColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:r})}),VP=Mr("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${Jt(r.color)}`],r.size!=="medium"&&t[`thumbSize${Jt(r.size)}`]]}})(({theme:e,ownerState:t})=>ce({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{width:12,height:12},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-50%, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 50%)"},{"&:before":ce({position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},t.size==="small"&&{boxShadow:"none"}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&:hover, &.${Dr.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:Hi(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${Dr.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:Hi(e.palette[t.color].main,.16)}`},[`&.${Dr.disabled}`]:{"&:hover":{boxShadow:"none"}}})),YP=Mr(GP,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>ce({[`&.${Dr.valueLabelOpen}`]:{transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(1)`},zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(0)`,position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem"},t.orientation==="horizontal"&&{top:"-10px",transformOrigin:"bottom center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"}},t.orientation==="vertical"&&{right:t.size==="small"?"20px":"30px",top:"50%",transformOrigin:"right center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"}},t.size==="small"&&{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"})),KP=Mr("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>WO(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(({theme:e,ownerState:t,markActive:r})=>ce({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-1px, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 1px)"},r&&{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8})),XP=Mr("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>WO(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t,markLabelActive:r})=>ce({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap"},t.orientation==="horizontal"&&{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}},t.orientation==="vertical"&&{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}},r&&{color:(e.vars||e).palette.text.primary})),ZP=e=>{const{disabled:t,dragging:r,marked:n,orientation:a,track:i,classes:o,color:s,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",a==="vertical"&&"vertical",i==="inverted"&&"trackInverted",i===!1&&"trackFalse",s&&`color${Jt(s)}`,l&&`size${Jt(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${Jt(l)}`,s&&`thumbColor${Jt(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return hb(c,FP,o)},JP=({children:e})=>e,QP=P.forwardRef(function(t,r){var n,a,i,o,s,l,c,d,p,g,m,b,v,S,O,_,w,A,x,E,k,N,I,D;const L=gb({props:t,name:"MuiSlider"}),z=Fl().direction==="rtl",{"aria-label":q,"aria-valuetext":H,"aria-labelledby":V,component:K="span",components:G={},componentsProps:W={},color:J="primary",classes:ae,className:re,disableSwap:ue=!1,disabled:Se=!1,getAriaLabel:Q,getAriaValueText:Ie,marks:Ue=!1,max:xe=100,min:ee=0,orientation:oe="horizontal",size:ie="medium",step:X=1,scale:Ee=zv,slotProps:fe,slots:he,track:je="normal",valueLabelDisplay:nt="off",valueLabelFormat:et=zv}=L,tr=jl(L,zP),Pe=ce({},L,{isRtl:z,max:xe,min:ee,classes:ae,disabled:Se,disableSwap:ue,orientation:oe,marks:Ue,color:J,size:ie,step:X,scale:Ee,track:je,valueLabelDisplay:nt,valueLabelFormat:et}),{axisProps:$e,getRootProps:Ye,getHiddenInputProps:$t,getThumbProps:Kt,open:te,active:de,axis:ye,focusedThumbIndex:ve,range:ge,dragging:qe,marks:De,values:Ge,trackOffset:Je,trackLeap:jt,getThumbStyle:rr}=vP(ce({},Pe,{rootRef:r}));Pe.marked=De.length>0&&De.some(_e=>_e.label),Pe.dragging=qe,Pe.focusedThumbIndex=ve;const ze=ZP(Pe),Kr=(n=(a=he==null?void 0:he.root)!=null?a:G.Root)!=null?n:qP,Xr=(i=(o=he==null?void 0:he.rail)!=null?o:G.Rail)!=null?i:HP,Zr=(s=(l=he==null?void 0:he.track)!=null?l:G.Track)!=null?s:WP,He=(c=(d=he==null?void 0:he.thumb)!=null?d:G.Thumb)!=null?c:VP,Bn=(p=(g=he==null?void 0:he.valueLabel)!=null?g:G.ValueLabel)!=null?p:YP,Jr=(m=(b=he==null?void 0:he.mark)!=null?b:G.Mark)!=null?m:KP,xr=(v=(S=he==null?void 0:he.markLabel)!=null?S:G.MarkLabel)!=null?v:XP,Qr=(O=(_=he==null?void 0:he.input)!=null?_:G.Input)!=null?O:"input",wr=(w=fe==null?void 0:fe.root)!=null?w:W.root,_r=(A=fe==null?void 0:fe.rail)!=null?A:W.rail,Tr=(x=fe==null?void 0:fe.track)!=null?x:W.track,Un=(E=fe==null?void 0:fe.thumb)!=null?E:W.thumb,Fr=(k=fe==null?void 0:fe.valueLabel)!=null?k:W.valueLabel,li=(N=fe==null?void 0:fe.mark)!=null?N:W.mark,Ar=(I=fe==null?void 0:fe.markLabel)!=null?I:W.markLabel,En=(D=fe==null?void 0:fe.input)!=null?D:W.input,le=Tn({elementType:Kr,getSlotProps:Ye,externalSlotProps:wr,externalForwardedProps:tr,additionalProps:ce({},jP(Kr)&&{as:K}),ownerState:ce({},Pe,wr==null?void 0:wr.ownerState),className:[ze.root,re]}),Gn=Tn({elementType:Xr,externalSlotProps:_r,ownerState:Pe,className:ze.rail}),Ft=Tn({elementType:Zr,externalSlotProps:Tr,additionalProps:{style:ce({},$e[ye].offset(Je),$e[ye].leap(jt))},ownerState:ce({},Pe,Tr==null?void 0:Tr.ownerState),className:ze.track}),ut=Tn({elementType:He,getSlotProps:Kt,externalSlotProps:Un,ownerState:ce({},Pe,Un==null?void 0:Un.ownerState),className:ze.thumb}),zn=Tn({elementType:Bn,externalSlotProps:Fr,ownerState:ce({},Pe,Fr==null?void 0:Fr.ownerState),className:ze.valueLabel}),Oe=Tn({elementType:Jr,externalSlotProps:li,ownerState:Pe,className:ze.mark}),nr=Tn({elementType:xr,externalSlotProps:Ar,ownerState:Pe,className:ze.markLabel}),da=Tn({elementType:Qr,getSlotProps:$t,externalSlotProps:En,ownerState:Pe});return h.jsxs(Kr,ce({},le,{children:[h.jsx(Xr,ce({},Gn)),h.jsx(Zr,ce({},Ft)),De.filter(_e=>_e.value>=ee&&_e.value<=xe).map((_e,We)=>{const kt=qs(_e.value,ee,xe),tt=$e[ye].offset(kt);let ct;return je===!1?ct=Ge.indexOf(_e.value)!==-1:ct=je==="normal"&&(ge?_e.value>=Ge[0]&&_e.value<=Ge[Ge.length-1]:_e.value<=Ge[0])||je==="inverted"&&(ge?_e.value<=Ge[0]||_e.value>=Ge[Ge.length-1]:_e.value>=Ge[0]),h.jsxs(P.Fragment,{children:[h.jsx(Jr,ce({"data-index":We},Oe,!js(Jr)&&{markActive:ct},{style:ce({},tt,Oe.style),className:Cr(Oe.className,ct&&ze.markActive)})),_e.label!=null?h.jsx(xr,ce({"aria-hidden":!0,"data-index":We},nr,!js(xr)&&{markLabelActive:ct},{style:ce({},tt,nr.style),className:Cr(ze.markLabel,nr.className,ct&&ze.markLabelActive),children:_e.label})):null]},We)}),Ge.map((_e,We)=>{const kt=qs(_e,ee,xe),tt=$e[ye].offset(kt),ct=nt==="off"?JP:Bn;return h.jsx(ct,ce({},!js(ct)&&{valueLabelFormat:et,valueLabelDisplay:nt,value:typeof et=="function"?et(Ee(_e),We):et,index:We,open:te===We||de===We||nt==="on",disabled:Se},zn,{children:h.jsx(He,ce({"data-index":We},ut,{className:Cr(ze.thumb,ut.className,de===We&&ze.active,ve===We&&ze.focusVisible),style:ce({},tt,rr(We),ut.style),children:h.jsx(Qr,ce({"data-index":We,"aria-label":Q?Q(We):q,"aria-valuenow":Ee(_e),"aria-labelledby":V,"aria-valuetext":Ie?Ie(Ee(_e),We):H,value:Ge[We]},da))}))}),We)})]}))}),Wl=QP;function e$(e){return fb("MuiTooltip",e)}const t$=pb("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Nn=t$,r$=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function n$(e){return Math.round(e*1e5)/1e5}const a$=e=>{const{classes:t,disableInteractive:r,arrow:n,touch:a,placement:i}=e,o={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",a&&"touch",`tooltipPlacement${Jt(i.split("-")[0])}`],arrow:["arrow"]};return hb(o,e$,t)},i$=Mr(xb,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})(({theme:e,ownerState:t,open:r})=>ce({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${Nn.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Nn.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Nn.arrow}`]:ce({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Nn.arrow}`]:ce({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),o$=Mr("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${Jt(r.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>ce({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Hi(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${n$(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${Nn.popper}[data-popper-placement*="left"] &`]:ce({transformOrigin:"right center"},t.isRtl?ce({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):ce({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${Nn.popper}[data-popper-placement*="right"] &`]:ce({transformOrigin:"left center"},t.isRtl?ce({marginRight:"14px"},t.touch&&{marginRight:"24px"}):ce({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${Nn.popper}[data-popper-placement*="top"] &`]:ce({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${Nn.popper}[data-popper-placement*="bottom"] &`]:ce({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),s$=Mr("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Hi(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let vs=!1,lc=null,mi={x:0,y:0};function Ss(e,t){return r=>{t&&t(r),e(r)}}const l$=P.forwardRef(function(t,r){var n,a,i,o,s,l,c,d,p,g,m,b,v,S,O,_,w,A,x;const E=gb({props:t,name:"MuiTooltip"}),{arrow:k=!1,children:N,components:I={},componentsProps:D={},describeChild:L=!1,disableFocusListener:j=!1,disableHoverListener:z=!1,disableInteractive:q=!1,disableTouchListener:H=!1,enterDelay:V=100,enterNextDelay:K=0,enterTouchDelay:G=700,followCursor:W=!1,id:J,leaveDelay:ae=0,leaveTouchDelay:re=1500,onClose:ue,onOpen:Se,open:Q,placement:Ie="bottom",PopperComponent:Ue,PopperProps:xe={},slotProps:ee={},slots:oe={},title:ie,TransitionComponent:X=jv,TransitionProps:Ee}=E,fe=jl(E,r$),he=P.isValidElement(N)?N:h.jsx("span",{children:N}),je=Fl(),nt=je.direction==="rtl",[et,tr]=P.useState(),[Pe,$e]=P.useState(null),Ye=P.useRef(!1),$t=q||W,Kt=P.useRef(),te=P.useRef(),de=P.useRef(),ye=P.useRef(),[ve,ge]=h1({controlled:Q,default:!1,name:"Tooltip",state:"open"});let qe=ve;const De=zM(J),Ge=P.useRef(),Je=P.useCallback(()=>{Ge.current!==void 0&&(document.body.style.WebkitUserSelect=Ge.current,Ge.current=void 0),clearTimeout(ye.current)},[]);P.useEffect(()=>()=>{clearTimeout(Kt.current),clearTimeout(te.current),clearTimeout(de.current),Je()},[Je]);const jt=ke=>{clearTimeout(lc),vs=!0,ge(!0),Se&&!qe&&Se(ke)},rr=Ps(ke=>{clearTimeout(lc),lc=setTimeout(()=>{vs=!1},800+ae),ge(!1),ue&&qe&&ue(ke),clearTimeout(Kt.current),Kt.current=setTimeout(()=>{Ye.current=!1},je.transitions.duration.shortest)}),ze=ke=>{Ye.current&&ke.type!=="touchstart"||(et&&et.removeAttribute("title"),clearTimeout(te.current),clearTimeout(de.current),V||vs&&K?te.current=setTimeout(()=>{jt(ke)},vs?K:V):jt(ke))},Kr=ke=>{clearTimeout(te.current),clearTimeout(de.current),de.current=setTimeout(()=>{rr(ke)},ae)},{isFocusVisibleRef:Xr,onBlur:Zr,onFocus:He,ref:Bn}=HO(),[,Jr]=P.useState(!1),xr=ke=>{Zr(ke),Xr.current===!1&&(Jr(!1),Kr(ke))},Qr=ke=>{et||tr(ke.currentTarget),He(ke),Xr.current===!0&&(Jr(!0),ze(ke))},wr=ke=>{Ye.current=!0;const Bt=he.props;Bt.onTouchStart&&Bt.onTouchStart(ke)},_r=ze,Tr=Kr,Un=ke=>{wr(ke),clearTimeout(de.current),clearTimeout(Kt.current),Je(),Ge.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ye.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Ge.current,ze(ke)},G)},Fr=ke=>{he.props.onTouchEnd&&he.props.onTouchEnd(ke),Je(),clearTimeout(de.current),de.current=setTimeout(()=>{rr(ke)},re)};P.useEffect(()=>{if(!qe)return;function ke(Bt){(Bt.key==="Escape"||Bt.key==="Esc")&&rr(Bt)}return document.addEventListener("keydown",ke),()=>{document.removeEventListener("keydown",ke)}},[rr,qe]);const li=zs(he.ref,Bn,tr,r);!ie&&ie!==0&&(qe=!1);const Ar=P.useRef(),En=ke=>{const Bt=he.props;Bt.onMouseMove&&Bt.onMouseMove(ke),mi={x:ke.clientX,y:ke.clientY},Ar.current&&Ar.current.update()},le={},Gn=typeof ie=="string";L?(le.title=!qe&&Gn&&!z?ie:null,le["aria-describedby"]=qe?De:null):(le["aria-label"]=Gn?ie:null,le["aria-labelledby"]=qe&&!Gn?De:null);const Ft=ce({},le,fe,he.props,{className:Cr(fe.className,he.props.className),onTouchStart:wr,ref:li},W?{onMouseMove:En}:{}),ut={};H||(Ft.onTouchStart=Un,Ft.onTouchEnd=Fr),z||(Ft.onMouseOver=Ss(_r,Ft.onMouseOver),Ft.onMouseLeave=Ss(Tr,Ft.onMouseLeave),$t||(ut.onMouseOver=_r,ut.onMouseLeave=Tr)),j||(Ft.onFocus=Ss(Qr,Ft.onFocus),Ft.onBlur=Ss(xr,Ft.onBlur),$t||(ut.onFocus=Qr,ut.onBlur=xr));const zn=P.useMemo(()=>{var ke;let Bt=[{name:"arrow",enabled:!!Pe,options:{element:Pe,padding:4}}];return(ke=xe.popperOptions)!=null&&ke.modifiers&&(Bt=Bt.concat(xe.popperOptions.modifiers)),ce({},xe.popperOptions,{modifiers:Bt})},[Pe,xe]),Oe=ce({},E,{isRtl:nt,arrow:k,disableInteractive:$t,placement:Ie,PopperComponentProp:Ue,touch:Ye.current}),nr=a$(Oe),da=(n=(a=oe.popper)!=null?a:I.Popper)!=null?n:i$,_e=(i=(o=(s=oe.transition)!=null?s:I.Transition)!=null?o:X)!=null?i:jv,We=(l=(c=oe.tooltip)!=null?c:I.Tooltip)!=null?l:o$,kt=(d=(p=oe.arrow)!=null?p:I.Arrow)!=null?d:s$,tt=fs(da,ce({},xe,(g=ee.popper)!=null?g:D.popper,{className:Cr(nr.popper,xe==null?void 0:xe.className,(m=(b=ee.popper)!=null?b:D.popper)==null?void 0:m.className)}),Oe),ct=fs(_e,ce({},Ee,(v=ee.transition)!=null?v:D.transition),Oe),Or=fs(We,ce({},(S=ee.tooltip)!=null?S:D.tooltip,{className:Cr(nr.tooltip,(O=(_=ee.tooltip)!=null?_:D.tooltip)==null?void 0:O.className)}),Oe),en=fs(kt,ce({},(w=ee.arrow)!=null?w:D.arrow,{className:Cr(nr.arrow,(A=(x=ee.arrow)!=null?x:D.arrow)==null?void 0:A.className)}),Oe);return h.jsxs(P.Fragment,{children:[P.cloneElement(he,Ft),h.jsx(da,ce({as:Ue??xb,placement:Ie,anchorEl:W?{getBoundingClientRect:()=>({top:mi.y,left:mi.x,right:mi.x,bottom:mi.y,width:0,height:0})}:et,popperRef:Ar,open:et?qe:!1,id:De,transition:!0},ut,tt,{popperOptions:zn,children:({TransitionProps:ke})=>h.jsx(_e,ce({timeout:je.transitions.duration.shorter},ke,ct,{children:h.jsxs(We,ce({},Or,{children:[ie,k?h.jsx(kt,ce({},en,{ref:$e})):null]}))}))}))]})}),u$=l$,c$=(e,t="down")=>{const r=Fl(),[n,a]=P.useState(!1),i=r.breakpoints[t](e).split("@media")[1].trim();return P.useEffect(()=>{const o=()=>{const{matches:s}=window.matchMedia(i);a(s)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[i]),n},d$=e=>e.filter(t=>t.tldr).length>=2&&e.some(t=>t.audio_EN);function p$(e){return e.tldr_topic??e.name}var Hs=globalThis&&globalThis.__assign||function(){return Hs=Object.assign||function(e){for(var t,r=1,n=arguments.length;r({autoCorrect:"off",autoComplete:"off"}))` +import{z as qO,ag as xa,i as Lv,ah as GL,r as P,ai as HO,Z as zs,$ as zL,a2 as Ps,x as ce,j as h,M as pb,L as fb,O as Mr,aj as qL,Y as Jt,P as Hi,S as gb,H as jl,U as Cr,V as hb,a3 as Fl,ak as HL,al as WL,am as WO,s as B,a as M,an as VO,ao as mb,o as Bl,F,t as VL,u as Pr,b as Ul,ap as YO,v as YL,T as mt,aq as KL,A as dn,k as Ct,d as KO,ar as ei,as as Tt,at as XL,a9 as pt,B as Mt,n as XO,q as ZO,C as JO,y as ZL,au as QO,e as Mv,p as JL,av as e1,aw as t1,ax as ti,ay as Ne,J as U,az as QL,aA as eM,aB as tM,aC as Gl,aD as rM,aE as nM,aF as aM,aG as iM,aH as r1,aI as oM,aJ as zl,aK as sM,aL as lM,aM as uM,aN as cM,ad as dM,aO as Pv,l as pM,aP as fM,aQ as gM,I as hM,_ as ir,aR as mM,aS as bM}from"./index-787c3ef8.js";import{G as na,J as $s,K as ac,L as n1,Q as yM,U as vM,V as SM,W as $v,X as js,Y as Tn,Z as jv,_ as fs,$ as a1,a0 as EM,h as bb,a1 as i1,b as $r,g as ri,a2 as vn,a3 as o1,i as s1,a4 as xM,u as Mo,a5 as wM,a6 as yb,a7 as ql,a8 as vb,a9 as _M,aa as l1,ab as u1,ac as TM,P as AM,ad as c1,ae as OM,af as kM,ag as RM,ah as IM,d as Sb,e as Eb,ai as NM,aj as CM,ak as DM,n as Pt,al as d1,am as LM,f as p1,an as MM,c as Po,ao as PM,ap as $M,aq as jM,ar as FM,as as BM,at as f1,au as UM}from"./index-77dce891.js";import{c as GM,a as ic,C as Hl}from"./ClipLoader-0106d300.js";import{S as g1}from"./Skeleton-fe703092.js";import{u as h1,P as xb,a as zM,F as qM}from"./Stack-b3992130.js";import{S as HM,F as Fv,i as $o,g as yr,t as WM,_ as m1,a as VM,b as YM,c as ia,d as wb,e as KM,f as XM,h as ZM,j as jo,m as JM,k as QM,l as eP,n as b1,o as tP,p as rP}from"./isPlainObject-528c68e4.js";import{c as _b}from"./createSvgIcon-fa140fa5.js";import{useBriefDescriptionStore as nP}from"./index-90c40e8b.js";import{P as we,p as aP}from"./index-94d47251.js";import{u as y1}from"./index-2cd18ef8.js";const Bv="023d8eb306f0027b902fbdc81d33b49b6558b3434d374626f8c324979c92d47c21",iP=async e=>{let t=await xa.enable(!0);if(t||console.warn("Sphinx enable failed, means no pubkey and no budget (including budget of 0)"),t=await xa.keysend(Bv,e),!(t!=null&&t.success)){if(t=await xa.topup(),t||(t=await xa.authorize()),!(t!=null&&t.budget)||(t==null?void 0:t.budget){const r=await iP(t),n={amount:t,refid:e};return await qO.post("/boost",JSON.stringify(n)),r},sP=e=>{const[t,r]=e.split("-")||["",""];return parseInt(r,10)!==0?`${t} - ${r}`:t},v1=(e,t)=>{if(!t)return null;const r=e.filter(i=>i.show_title&&i.link&&i.show_title===t.show_title&&i.episode_title===t.episode_title),n=Lv.groupBy(r,i=>i.timestamp),a=Lv.values(n).reduce((i,o)=>(o[0]&&i.push(o[0]),i),[]);return a.sort((i,o)=>{var p,g;const[s]=((p=i.timestamp)==null?void 0:p.split("-"))||[""],[l]=((g=o.timestamp)==null?void 0:g.split("-"))||[""],c=na(s),d=na(l);return c-d}),a},lP=async e=>{await GL(async()=>{try{await xa.saveGraphData({metaData:{date:Math.floor(new Date().getTime()/1e3),...e},type:"second_brain_consumed_content"})}catch(t){console.warn(t)}})},uP=e=>{const t=/((http|https):\/\/[^\s]+)/g,r=/@(\w+)/g;let n=e.replace(/\\/g,"");return n=n.replace(/'/g,"’"),n=n.replace(/\n/g,"
"),n=n.replace(t,'$1'),n=n.replace(r,'@$1'),n},cP={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},dP=cP;function pP(e,t,r=(n,a)=>n===a){return e.length===t.length&&e.every((n,a)=>r(n,t[a]))}const fP=2;function S1(e,t){return e-t}function hi(e,t,r){return e==null?t:Math.min(Math.max(t,e),r)}function Uv(e,t){var r;const{index:n}=(r=e.reduce((a,i,o)=>{const s=Math.abs(t-i);return a===null||s({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},yP=e=>e;let bs;function oc(){return bs===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?bs=CSS.supports("touch-action","none"):bs=!0),bs}function vP(e){const{"aria-labelledby":t,defaultValue:r,disabled:n=!1,disableSwap:a=!1,isRtl:i=!1,marks:o=!1,max:s=100,min:l=0,name:c,onChange:d,onChangeCommitted:p,orientation:g="horizontal",rootRef:m,scale:b=yP,step:v=1,tabIndex:S,value:O}=e,_=P.useRef(),[w,A]=P.useState(-1),[x,E]=P.useState(-1),[k,N]=P.useState(!1),I=P.useRef(0),[D,L]=h1({controlled:O,default:r??l,name:"Slider"}),j=d&&((te,de,ye)=>{const ve=te.nativeEvent||te,ge=new ve.constructor(ve.type,ve);Object.defineProperty(ge,"target",{writable:!0,value:{value:de,name:c}}),d(ge,de,ye)}),z=Array.isArray(D);let q=z?D.slice().sort(S1):[D];q=q.map(te=>hi(te,l,s));const H=o===!0&&v!==null?[...Array(Math.floor((s-l)/v)+1)].map((te,de)=>({value:l+v*de})):o||[],V=H.map(te=>te.value),{isFocusVisibleRef:K,onBlur:G,onFocus:W,ref:J}=HO(),[ae,re]=P.useState(-1),ue=P.useRef(),Se=zs(J,ue),Q=zs(m,Se),Ie=te=>de=>{var ye;const ve=Number(de.currentTarget.getAttribute("data-index"));W(de),K.current===!0&&re(ve),E(ve),te==null||(ye=te.onFocus)==null||ye.call(te,de)},Ue=te=>de=>{var ye;G(de),K.current===!1&&re(-1),E(-1),te==null||(ye=te.onBlur)==null||ye.call(te,de)};zL(()=>{if(n&&ue.current.contains(document.activeElement)){var te;(te=document.activeElement)==null||te.blur()}},[n]),n&&w!==-1&&A(-1),n&&ae!==-1&&re(-1);const xe=te=>de=>{var ye;(ye=te.onChange)==null||ye.call(te,de);const ve=Number(de.currentTarget.getAttribute("data-index")),ge=q[ve],qe=V.indexOf(ge);let De=de.target.valueAsNumber;if(H&&v==null){const Ge=V[V.length-1];De>Ge?De=Ge:De{const{current:ye}=ue,{width:ve,height:ge,bottom:qe,left:De}=ye.getBoundingClientRect();let Ge;oe.indexOf("vertical")===0?Ge=(qe-te.y)/ge:Ge=(te.x-De)/ve,oe.indexOf("-reverse")!==-1&&(Ge=1-Ge);let Je;if(Je=gP(Ge,l,s),v)Je=mP(Je,v,l);else{const rr=Uv(V,Je);Je=V[rr]}Je=hi(Je,l,s);let jt=0;if(z){de?jt=ee.current:jt=Uv(q,Je),a&&(Je=hi(Je,q[jt-1]||-1/0,q[jt+1]||1/0));const rr=Je;Je=Gv({values:q,newValue:Je,index:jt}),a&&de||(jt=Je.indexOf(rr),ee.current=jt)}return{newValue:Je,activeIndex:jt}},X=Ps(te=>{const de=gs(te,_);if(!de)return;if(I.current+=1,te.type==="mousemove"&&te.buttons===0){Ee(te);return}const{newValue:ye,activeIndex:ve}=ie({finger:de,move:!0});hs({sliderRef:ue,activeIndex:ve,setActive:A}),L(ye),!k&&I.current>fP&&N(!0),j&&!ms(ye,D)&&j(te,ye,ve)}),Ee=Ps(te=>{const de=gs(te,_);if(N(!1),!de)return;const{newValue:ye}=ie({finger:de,move:!0});A(-1),te.type==="touchend"&&E(-1),p&&p(te,ye),_.current=void 0,he()}),fe=Ps(te=>{if(n)return;oc()||te.preventDefault();const de=te.changedTouches[0];de!=null&&(_.current=de.identifier);const ye=gs(te,_);if(ye!==!1){const{newValue:ge,activeIndex:qe}=ie({finger:ye});hs({sliderRef:ue,activeIndex:qe,setActive:A}),L(ge),j&&!ms(ge,D)&&j(te,ge,qe)}I.current=0;const ve=$s(ue.current);ve.addEventListener("touchmove",X),ve.addEventListener("touchend",Ee)}),he=P.useCallback(()=>{const te=$s(ue.current);te.removeEventListener("mousemove",X),te.removeEventListener("mouseup",Ee),te.removeEventListener("touchmove",X),te.removeEventListener("touchend",Ee)},[Ee,X]);P.useEffect(()=>{const{current:te}=ue;return te.addEventListener("touchstart",fe,{passive:oc()}),()=>{te.removeEventListener("touchstart",fe,{passive:oc()}),he()}},[he,fe]),P.useEffect(()=>{n&&he()},[n,he]);const je=te=>de=>{var ye;if((ye=te.onMouseDown)==null||ye.call(te,de),n||de.defaultPrevented||de.button!==0)return;de.preventDefault();const ve=gs(de,_);if(ve!==!1){const{newValue:qe,activeIndex:De}=ie({finger:ve});hs({sliderRef:ue,activeIndex:De,setActive:A}),L(qe),j&&!ms(qe,D)&&j(de,qe,De)}I.current=0;const ge=$s(ue.current);ge.addEventListener("mousemove",X),ge.addEventListener("mouseup",Ee)},nt=qs(z?q[0]:l,l,s),et=qs(q[q.length-1],l,s)-nt,tr=(te={})=>{const de=ac(te),ye={onMouseDown:je(de||{})},ve=ce({},de,ye);return ce({},te,{ref:Q},ve)},Pe=te=>de=>{var ye;(ye=te.onMouseOver)==null||ye.call(te,de);const ve=Number(de.currentTarget.getAttribute("data-index"));E(ve)},$e=te=>de=>{var ye;(ye=te.onMouseLeave)==null||ye.call(te,de),E(-1)};return{active:w,axis:oe,axisProps:bP,dragging:k,focusedThumbIndex:ae,getHiddenInputProps:(te={})=>{var de;const ye=ac(te),ve={onChange:xe(ye||{}),onFocus:Ie(ye||{}),onBlur:Ue(ye||{})},ge=ce({},ye,ve);return ce({tabIndex:S,"aria-labelledby":t,"aria-orientation":g,"aria-valuemax":b(s),"aria-valuemin":b(l),name:c,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(de=e.step)!=null?de:void 0,disabled:n},te,ge,{style:ce({},dP,{direction:i?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:tr,getThumbProps:(te={})=>{const de=ac(te),ye={onMouseOver:Pe(de||{}),onMouseLeave:$e(de||{})};return ce({},te,de,ye)},marks:H,open:x,range:z,rootRef:Q,trackLeap:et,trackOffset:nt,values:q,getThumbStyle:te=>({pointerEvents:w!==-1&&w!==te?"none":void 0})}}const SP=_b(h.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),EP=_b(h.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),xP=_b(h.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function wP(e){return fb("MuiCheckbox",e)}const _P=pb("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),sc=_P,TP=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],AP=e=>{const{classes:t,indeterminate:r,color:n,size:a}=e,i={root:["root",r&&"indeterminate",`color${Jt(n)}`,`size${Jt(a)}`]},o=hb(i,wP,t);return ce({},t,o)},OP=Mr(HM,{shouldForwardProp:e=>qL(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.indeterminate&&t.indeterminate,t[`size${Jt(r.size)}`],r.color!=="default"&&t[`color${Jt(r.color)}`]]}})(({theme:e,ownerState:t})=>ce({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${t.color==="default"?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Hi(t.color==="default"?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.color!=="default"&&{[`&.${sc.checked}, &.${sc.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${sc.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),kP=h.jsx(EP,{}),RP=h.jsx(SP,{}),IP=h.jsx(xP,{}),NP=P.forwardRef(function(t,r){var n,a;const i=gb({props:t,name:"MuiCheckbox"}),{checkedIcon:o=kP,color:s="primary",icon:l=RP,indeterminate:c=!1,indeterminateIcon:d=IP,inputProps:p,size:g="medium",className:m}=i,b=jl(i,TP),v=c?d:l,S=c?d:o,O=ce({},i,{color:s,indeterminate:c,size:g}),_=AP(O);return h.jsx(OP,ce({type:"checkbox",inputProps:ce({"data-indeterminate":c},p),icon:P.cloneElement(v,{fontSize:(n=v.props.fontSize)!=null?n:g}),checkedIcon:P.cloneElement(S,{fontSize:(a=S.props.fontSize)!=null?a:g}),ownerState:O,ref:r,className:Cr(_.root,m)},b,{classes:_}))}),CP=NP,DP=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function LP(e,t,r){const n=t.getBoundingClientRect(),a=r&&r.getBoundingClientRect(),i=n1(t);let o;if(t.fakeTransform)o=t.fakeTransform;else{const c=i.getComputedStyle(t);o=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let s=0,l=0;if(o&&o!=="none"&&typeof o=="string"){const c=o.split("(")[1].split(")")[0].split(",");s=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?a?`translateX(${a.right+s-n.left}px)`:`translateX(${i.innerWidth+s-n.left}px)`:e==="right"?a?`translateX(-${n.right-a.left-s}px)`:`translateX(-${n.left+n.width-s}px)`:e==="up"?a?`translateY(${a.bottom+l-n.top}px)`:`translateY(${i.innerHeight+l-n.top}px)`:a?`translateY(-${n.top-a.top+n.height-l}px)`:`translateY(-${n.top+n.height-l}px)`}function MP(e){return typeof e=="function"?e():e}function ys(e,t,r){const n=MP(r),a=LP(e,t,n);a&&(t.style.webkitTransform=a,t.style.transform=a)}const PP=P.forwardRef(function(t,r){const n=Fl(),a={enter:n.transitions.easing.easeOut,exit:n.transitions.easing.sharp},i={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:l,container:c,direction:d="down",easing:p=a,in:g,onEnter:m,onEntered:b,onEntering:v,onExit:S,onExited:O,onExiting:_,style:w,timeout:A=i,TransitionComponent:x=yM}=t,E=jl(t,DP),k=P.useRef(null),N=zs(l.ref,k,r),I=G=>W=>{G&&(W===void 0?G(k.current):G(k.current,W))},D=I((G,W)=>{ys(d,G,c),SM(G),m&&m(G,W)}),L=I((G,W)=>{const J=$v({timeout:A,style:w,easing:p},{mode:"enter"});G.style.webkitTransition=n.transitions.create("-webkit-transform",ce({},J)),G.style.transition=n.transitions.create("transform",ce({},J)),G.style.webkitTransform="none",G.style.transform="none",v&&v(G,W)}),j=I(b),z=I(_),q=I(G=>{const W=$v({timeout:A,style:w,easing:p},{mode:"exit"});G.style.webkitTransition=n.transitions.create("-webkit-transform",W),G.style.transition=n.transitions.create("transform",W),ys(d,G,c),S&&S(G)}),H=I(G=>{G.style.webkitTransition="",G.style.transition="",O&&O(G)}),V=G=>{o&&o(k.current,G)},K=P.useCallback(()=>{k.current&&ys(d,k.current,c)},[d,c]);return P.useEffect(()=>{if(g||d==="down"||d==="right")return;const G=vM(()=>{k.current&&ys(d,k.current,c)}),W=n1(k.current);return W.addEventListener("resize",G),()=>{G.clear(),W.removeEventListener("resize",G)}},[d,g,c]),P.useEffect(()=>{g||K()},[g,K]),h.jsx(x,ce({nodeRef:k,onEnter:D,onEntered:j,onEntering:L,onExit:q,onExited:H,onExiting:z,addEndListener:V,appear:s,in:g,timeout:A},E,{children:(G,W)=>P.cloneElement(l,ce({ref:N,style:ce({visibility:G==="exited"&&!g?"hidden":void 0},w,l.props.style)},W))}))}),Ca=PP,$P=e=>!e||!js(e),jP=$P;function FP(e){return fb("MuiSlider",e)}const BP=pb("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),Dr=BP,UP=e=>{const{open:t}=e;return{offset:Cr(t&&Dr.valueLabelOpen),circle:Dr.valueLabelCircle,label:Dr.valueLabelLabel}};function GP(e){const{children:t,className:r,value:n}=e,a=UP(e);return t?P.cloneElement(t,{className:Cr(t.props.className)},h.jsxs(P.Fragment,{children:[t.props.children,h.jsx("span",{className:Cr(a.offset,r),"aria-hidden":!0,children:h.jsx("span",{className:a.circle,children:h.jsx("span",{className:a.label,children:n})})})]})):null}const zP=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function zv(e){return e}const qP=Mr("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`color${Jt(r.color)}`],r.size!=="medium"&&t[`size${Jt(r.size)}`],r.marked&&t.marked,r.orientation==="vertical"&&t.vertical,r.track==="inverted"&&t.trackInverted,r.track===!1&&t.trackFalse]}})(({theme:e,ownerState:t})=>ce({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:(e.vars||e).palette[t.color].main,WebkitTapHighlightColor:"transparent"},t.orientation==="horizontal"&&ce({height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}},t.size==="small"&&{height:2},t.marked&&{marginBottom:20}),t.orientation==="vertical"&&ce({height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}},t.size==="small"&&{width:2},t.marked&&{marginRight:44}),{"@media print":{colorAdjust:"exact"},[`&.${Dr.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Dr.dragging}`]:{[`& .${Dr.thumb}, & .${Dr.track}`]:{transition:"none"}}})),HP=Mr("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})(({ownerState:e})=>ce({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},e.orientation==="horizontal"&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},e.orientation==="vertical"&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},e.track==="inverted"&&{opacity:1})),WP=Mr("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e,ownerState:t})=>{const r=e.palette.mode==="light"?HL(e.palette[t.color].main,.62):WL(e.palette[t.color].main,.5);return ce({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{border:"none"},t.orientation==="horizontal"&&{height:"inherit",top:"50%",transform:"translateY(-50%)"},t.orientation==="vertical"&&{width:"inherit",left:"50%",transform:"translateX(-50%)"},t.track===!1&&{display:"none"},t.track==="inverted"&&{backgroundColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:r,borderColor:e.vars?e.vars.palette.Slider[`${t.color}Track`]:r})}),VP=Mr("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.thumb,t[`thumbColor${Jt(r.color)}`],r.size!=="medium"&&t[`thumbSize${Jt(r.size)}`]]}})(({theme:e,ownerState:t})=>ce({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest})},t.size==="small"&&{width:12,height:12},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-50%, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 50%)"},{"&:before":ce({position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},t.size==="small"&&{boxShadow:"none"}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&:hover, &.${Dr.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:Hi(e.palette[t.color].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${Dr.active}`]:{boxShadow:`0px 0px 0px 14px ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.16)`:Hi(e.palette[t.color].main,.16)}`},[`&.${Dr.disabled}`]:{"&:hover":{boxShadow:"none"}}})),YP=Mr(GP,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e,ownerState:t})=>ce({[`&.${Dr.valueLabelOpen}`]:{transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(1)`},zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),transform:`${t.orientation==="vertical"?"translateY(-50%)":"translateY(-100%)"} scale(0)`,position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem"},t.orientation==="horizontal"&&{top:"-10px",transformOrigin:"bottom center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"}},t.orientation==="vertical"&&{right:t.size==="small"?"20px":"30px",top:"50%",transformOrigin:"right center","&:before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"}},t.size==="small"&&{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"})),KP=Mr("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>WO(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:r}=e;return[t.mark,r&&t.markActive]}})(({theme:e,ownerState:t,markActive:r})=>ce({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},t.orientation==="horizontal"&&{top:"50%",transform:"translate(-1px, -50%)"},t.orientation==="vertical"&&{left:"50%",transform:"translate(-50%, 1px)"},r&&{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8})),XP=Mr("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>WO(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e,ownerState:t,markLabelActive:r})=>ce({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap"},t.orientation==="horizontal"&&{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}},t.orientation==="vertical"&&{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}},r&&{color:(e.vars||e).palette.text.primary})),ZP=e=>{const{disabled:t,dragging:r,marked:n,orientation:a,track:i,classes:o,color:s,size:l}=e,c={root:["root",t&&"disabled",r&&"dragging",n&&"marked",a==="vertical"&&"vertical",i==="inverted"&&"trackInverted",i===!1&&"trackFalse",s&&`color${Jt(s)}`,l&&`size${Jt(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${Jt(l)}`,s&&`thumbColor${Jt(s)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return hb(c,FP,o)},JP=({children:e})=>e,QP=P.forwardRef(function(t,r){var n,a,i,o,s,l,c,d,p,g,m,b,v,S,O,_,w,A,x,E,k,N,I,D;const L=gb({props:t,name:"MuiSlider"}),z=Fl().direction==="rtl",{"aria-label":q,"aria-valuetext":H,"aria-labelledby":V,component:K="span",components:G={},componentsProps:W={},color:J="primary",classes:ae,className:re,disableSwap:ue=!1,disabled:Se=!1,getAriaLabel:Q,getAriaValueText:Ie,marks:Ue=!1,max:xe=100,min:ee=0,orientation:oe="horizontal",size:ie="medium",step:X=1,scale:Ee=zv,slotProps:fe,slots:he,track:je="normal",valueLabelDisplay:nt="off",valueLabelFormat:et=zv}=L,tr=jl(L,zP),Pe=ce({},L,{isRtl:z,max:xe,min:ee,classes:ae,disabled:Se,disableSwap:ue,orientation:oe,marks:Ue,color:J,size:ie,step:X,scale:Ee,track:je,valueLabelDisplay:nt,valueLabelFormat:et}),{axisProps:$e,getRootProps:Ye,getHiddenInputProps:$t,getThumbProps:Kt,open:te,active:de,axis:ye,focusedThumbIndex:ve,range:ge,dragging:qe,marks:De,values:Ge,trackOffset:Je,trackLeap:jt,getThumbStyle:rr}=vP(ce({},Pe,{rootRef:r}));Pe.marked=De.length>0&&De.some(_e=>_e.label),Pe.dragging=qe,Pe.focusedThumbIndex=ve;const ze=ZP(Pe),Kr=(n=(a=he==null?void 0:he.root)!=null?a:G.Root)!=null?n:qP,Xr=(i=(o=he==null?void 0:he.rail)!=null?o:G.Rail)!=null?i:HP,Zr=(s=(l=he==null?void 0:he.track)!=null?l:G.Track)!=null?s:WP,He=(c=(d=he==null?void 0:he.thumb)!=null?d:G.Thumb)!=null?c:VP,Bn=(p=(g=he==null?void 0:he.valueLabel)!=null?g:G.ValueLabel)!=null?p:YP,Jr=(m=(b=he==null?void 0:he.mark)!=null?b:G.Mark)!=null?m:KP,xr=(v=(S=he==null?void 0:he.markLabel)!=null?S:G.MarkLabel)!=null?v:XP,Qr=(O=(_=he==null?void 0:he.input)!=null?_:G.Input)!=null?O:"input",wr=(w=fe==null?void 0:fe.root)!=null?w:W.root,_r=(A=fe==null?void 0:fe.rail)!=null?A:W.rail,Tr=(x=fe==null?void 0:fe.track)!=null?x:W.track,Un=(E=fe==null?void 0:fe.thumb)!=null?E:W.thumb,Fr=(k=fe==null?void 0:fe.valueLabel)!=null?k:W.valueLabel,li=(N=fe==null?void 0:fe.mark)!=null?N:W.mark,Ar=(I=fe==null?void 0:fe.markLabel)!=null?I:W.markLabel,En=(D=fe==null?void 0:fe.input)!=null?D:W.input,le=Tn({elementType:Kr,getSlotProps:Ye,externalSlotProps:wr,externalForwardedProps:tr,additionalProps:ce({},jP(Kr)&&{as:K}),ownerState:ce({},Pe,wr==null?void 0:wr.ownerState),className:[ze.root,re]}),Gn=Tn({elementType:Xr,externalSlotProps:_r,ownerState:Pe,className:ze.rail}),Ft=Tn({elementType:Zr,externalSlotProps:Tr,additionalProps:{style:ce({},$e[ye].offset(Je),$e[ye].leap(jt))},ownerState:ce({},Pe,Tr==null?void 0:Tr.ownerState),className:ze.track}),ut=Tn({elementType:He,getSlotProps:Kt,externalSlotProps:Un,ownerState:ce({},Pe,Un==null?void 0:Un.ownerState),className:ze.thumb}),zn=Tn({elementType:Bn,externalSlotProps:Fr,ownerState:ce({},Pe,Fr==null?void 0:Fr.ownerState),className:ze.valueLabel}),Oe=Tn({elementType:Jr,externalSlotProps:li,ownerState:Pe,className:ze.mark}),nr=Tn({elementType:xr,externalSlotProps:Ar,ownerState:Pe,className:ze.markLabel}),da=Tn({elementType:Qr,getSlotProps:$t,externalSlotProps:En,ownerState:Pe});return h.jsxs(Kr,ce({},le,{children:[h.jsx(Xr,ce({},Gn)),h.jsx(Zr,ce({},Ft)),De.filter(_e=>_e.value>=ee&&_e.value<=xe).map((_e,We)=>{const kt=qs(_e.value,ee,xe),tt=$e[ye].offset(kt);let ct;return je===!1?ct=Ge.indexOf(_e.value)!==-1:ct=je==="normal"&&(ge?_e.value>=Ge[0]&&_e.value<=Ge[Ge.length-1]:_e.value<=Ge[0])||je==="inverted"&&(ge?_e.value<=Ge[0]||_e.value>=Ge[Ge.length-1]:_e.value>=Ge[0]),h.jsxs(P.Fragment,{children:[h.jsx(Jr,ce({"data-index":We},Oe,!js(Jr)&&{markActive:ct},{style:ce({},tt,Oe.style),className:Cr(Oe.className,ct&&ze.markActive)})),_e.label!=null?h.jsx(xr,ce({"aria-hidden":!0,"data-index":We},nr,!js(xr)&&{markLabelActive:ct},{style:ce({},tt,nr.style),className:Cr(ze.markLabel,nr.className,ct&&ze.markLabelActive),children:_e.label})):null]},We)}),Ge.map((_e,We)=>{const kt=qs(_e,ee,xe),tt=$e[ye].offset(kt),ct=nt==="off"?JP:Bn;return h.jsx(ct,ce({},!js(ct)&&{valueLabelFormat:et,valueLabelDisplay:nt,value:typeof et=="function"?et(Ee(_e),We):et,index:We,open:te===We||de===We||nt==="on",disabled:Se},zn,{children:h.jsx(He,ce({"data-index":We},ut,{className:Cr(ze.thumb,ut.className,de===We&&ze.active,ve===We&&ze.focusVisible),style:ce({},tt,rr(We),ut.style),children:h.jsx(Qr,ce({"data-index":We,"aria-label":Q?Q(We):q,"aria-valuenow":Ee(_e),"aria-labelledby":V,"aria-valuetext":Ie?Ie(Ee(_e),We):H,value:Ge[We]},da))}))}),We)})]}))}),Wl=QP;function e$(e){return fb("MuiTooltip",e)}const t$=pb("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Nn=t$,r$=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function n$(e){return Math.round(e*1e5)/1e5}const a$=e=>{const{classes:t,disableInteractive:r,arrow:n,touch:a,placement:i}=e,o={popper:["popper",!r&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",a&&"touch",`tooltipPlacement${Jt(i.split("-")[0])}`],arrow:["arrow"]};return hb(o,e$,t)},i$=Mr(xb,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.popper,!r.disableInteractive&&t.popperInteractive,r.arrow&&t.popperArrow,!r.open&&t.popperClose]}})(({theme:e,ownerState:t,open:r})=>ce({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${Nn.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Nn.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Nn.arrow}`]:ce({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Nn.arrow}`]:ce({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),o$=Mr("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.tooltip,r.touch&&t.touch,r.arrow&&t.tooltipArrow,t[`tooltipPlacement${Jt(r.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>ce({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:Hi(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${n$(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${Nn.popper}[data-popper-placement*="left"] &`]:ce({transformOrigin:"right center"},t.isRtl?ce({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):ce({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${Nn.popper}[data-popper-placement*="right"] &`]:ce({transformOrigin:"left center"},t.isRtl?ce({marginRight:"14px"},t.touch&&{marginRight:"24px"}):ce({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${Nn.popper}[data-popper-placement*="top"] &`]:ce({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${Nn.popper}[data-popper-placement*="bottom"] &`]:ce({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),s$=Mr("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:Hi(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let vs=!1,lc=null,mi={x:0,y:0};function Ss(e,t){return r=>{t&&t(r),e(r)}}const l$=P.forwardRef(function(t,r){var n,a,i,o,s,l,c,d,p,g,m,b,v,S,O,_,w,A,x;const E=gb({props:t,name:"MuiTooltip"}),{arrow:k=!1,children:N,components:I={},componentsProps:D={},describeChild:L=!1,disableFocusListener:j=!1,disableHoverListener:z=!1,disableInteractive:q=!1,disableTouchListener:H=!1,enterDelay:V=100,enterNextDelay:K=0,enterTouchDelay:G=700,followCursor:W=!1,id:J,leaveDelay:ae=0,leaveTouchDelay:re=1500,onClose:ue,onOpen:Se,open:Q,placement:Ie="bottom",PopperComponent:Ue,PopperProps:xe={},slotProps:ee={},slots:oe={},title:ie,TransitionComponent:X=jv,TransitionProps:Ee}=E,fe=jl(E,r$),he=P.isValidElement(N)?N:h.jsx("span",{children:N}),je=Fl(),nt=je.direction==="rtl",[et,tr]=P.useState(),[Pe,$e]=P.useState(null),Ye=P.useRef(!1),$t=q||W,Kt=P.useRef(),te=P.useRef(),de=P.useRef(),ye=P.useRef(),[ve,ge]=h1({controlled:Q,default:!1,name:"Tooltip",state:"open"});let qe=ve;const De=zM(J),Ge=P.useRef(),Je=P.useCallback(()=>{Ge.current!==void 0&&(document.body.style.WebkitUserSelect=Ge.current,Ge.current=void 0),clearTimeout(ye.current)},[]);P.useEffect(()=>()=>{clearTimeout(Kt.current),clearTimeout(te.current),clearTimeout(de.current),Je()},[Je]);const jt=ke=>{clearTimeout(lc),vs=!0,ge(!0),Se&&!qe&&Se(ke)},rr=Ps(ke=>{clearTimeout(lc),lc=setTimeout(()=>{vs=!1},800+ae),ge(!1),ue&&qe&&ue(ke),clearTimeout(Kt.current),Kt.current=setTimeout(()=>{Ye.current=!1},je.transitions.duration.shortest)}),ze=ke=>{Ye.current&&ke.type!=="touchstart"||(et&&et.removeAttribute("title"),clearTimeout(te.current),clearTimeout(de.current),V||vs&&K?te.current=setTimeout(()=>{jt(ke)},vs?K:V):jt(ke))},Kr=ke=>{clearTimeout(te.current),clearTimeout(de.current),de.current=setTimeout(()=>{rr(ke)},ae)},{isFocusVisibleRef:Xr,onBlur:Zr,onFocus:He,ref:Bn}=HO(),[,Jr]=P.useState(!1),xr=ke=>{Zr(ke),Xr.current===!1&&(Jr(!1),Kr(ke))},Qr=ke=>{et||tr(ke.currentTarget),He(ke),Xr.current===!0&&(Jr(!0),ze(ke))},wr=ke=>{Ye.current=!0;const Bt=he.props;Bt.onTouchStart&&Bt.onTouchStart(ke)},_r=ze,Tr=Kr,Un=ke=>{wr(ke),clearTimeout(de.current),clearTimeout(Kt.current),Je(),Ge.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",ye.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Ge.current,ze(ke)},G)},Fr=ke=>{he.props.onTouchEnd&&he.props.onTouchEnd(ke),Je(),clearTimeout(de.current),de.current=setTimeout(()=>{rr(ke)},re)};P.useEffect(()=>{if(!qe)return;function ke(Bt){(Bt.key==="Escape"||Bt.key==="Esc")&&rr(Bt)}return document.addEventListener("keydown",ke),()=>{document.removeEventListener("keydown",ke)}},[rr,qe]);const li=zs(he.ref,Bn,tr,r);!ie&&ie!==0&&(qe=!1);const Ar=P.useRef(),En=ke=>{const Bt=he.props;Bt.onMouseMove&&Bt.onMouseMove(ke),mi={x:ke.clientX,y:ke.clientY},Ar.current&&Ar.current.update()},le={},Gn=typeof ie=="string";L?(le.title=!qe&&Gn&&!z?ie:null,le["aria-describedby"]=qe?De:null):(le["aria-label"]=Gn?ie:null,le["aria-labelledby"]=qe&&!Gn?De:null);const Ft=ce({},le,fe,he.props,{className:Cr(fe.className,he.props.className),onTouchStart:wr,ref:li},W?{onMouseMove:En}:{}),ut={};H||(Ft.onTouchStart=Un,Ft.onTouchEnd=Fr),z||(Ft.onMouseOver=Ss(_r,Ft.onMouseOver),Ft.onMouseLeave=Ss(Tr,Ft.onMouseLeave),$t||(ut.onMouseOver=_r,ut.onMouseLeave=Tr)),j||(Ft.onFocus=Ss(Qr,Ft.onFocus),Ft.onBlur=Ss(xr,Ft.onBlur),$t||(ut.onFocus=Qr,ut.onBlur=xr));const zn=P.useMemo(()=>{var ke;let Bt=[{name:"arrow",enabled:!!Pe,options:{element:Pe,padding:4}}];return(ke=xe.popperOptions)!=null&&ke.modifiers&&(Bt=Bt.concat(xe.popperOptions.modifiers)),ce({},xe.popperOptions,{modifiers:Bt})},[Pe,xe]),Oe=ce({},E,{isRtl:nt,arrow:k,disableInteractive:$t,placement:Ie,PopperComponentProp:Ue,touch:Ye.current}),nr=a$(Oe),da=(n=(a=oe.popper)!=null?a:I.Popper)!=null?n:i$,_e=(i=(o=(s=oe.transition)!=null?s:I.Transition)!=null?o:X)!=null?i:jv,We=(l=(c=oe.tooltip)!=null?c:I.Tooltip)!=null?l:o$,kt=(d=(p=oe.arrow)!=null?p:I.Arrow)!=null?d:s$,tt=fs(da,ce({},xe,(g=ee.popper)!=null?g:D.popper,{className:Cr(nr.popper,xe==null?void 0:xe.className,(m=(b=ee.popper)!=null?b:D.popper)==null?void 0:m.className)}),Oe),ct=fs(_e,ce({},Ee,(v=ee.transition)!=null?v:D.transition),Oe),Or=fs(We,ce({},(S=ee.tooltip)!=null?S:D.tooltip,{className:Cr(nr.tooltip,(O=(_=ee.tooltip)!=null?_:D.tooltip)==null?void 0:O.className)}),Oe),en=fs(kt,ce({},(w=ee.arrow)!=null?w:D.arrow,{className:Cr(nr.arrow,(A=(x=ee.arrow)!=null?x:D.arrow)==null?void 0:A.className)}),Oe);return h.jsxs(P.Fragment,{children:[P.cloneElement(he,Ft),h.jsx(da,ce({as:Ue??xb,placement:Ie,anchorEl:W?{getBoundingClientRect:()=>({top:mi.y,left:mi.x,right:mi.x,bottom:mi.y,width:0,height:0})}:et,popperRef:Ar,open:et?qe:!1,id:De,transition:!0},ut,tt,{popperOptions:zn,children:({TransitionProps:ke})=>h.jsx(_e,ce({timeout:je.transitions.duration.shorter},ke,ct,{children:h.jsxs(We,ce({},Or,{children:[ie,k?h.jsx(kt,ce({},en,{ref:$e})):null]}))}))}))]})}),u$=l$,c$=(e,t="down")=>{const r=Fl(),[n,a]=P.useState(!1),i=r.breakpoints[t](e).split("@media")[1].trim();return P.useEffect(()=>{const o=()=>{const{matches:s}=window.matchMedia(i);a(s)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[i]),n},d$=e=>e.filter(t=>t.tldr).length>=2&&e.some(t=>t.audio_EN);function p$(e){return e.tldr_topic??e.name}var Hs=globalThis&&globalThis.__assign||function(){return Hs=Object.assign||function(e){for(var t,r=1,n=arguments.length;r({autoCorrect:"off",autoComplete:"off"}))` pointer-events: auto; height: 48px; padding: 0 40px 0 18px; @@ -1900,7 +1900,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `,boe=B.audio` height: 0; width: 0; -`,yoe=()=>{const e=Pt(),{setPlayingNode:t}=Po(r=>r);switch(P.useEffect(()=>{var n,a;if(!e)return;(e.media_url||e.link||((n=e.properties)==null?void 0:n.link)||((a=e.properties)==null?void 0:a.media_url))&&t(e)},[t,e]),e==null?void 0:e.node_type){case"guest":case"person":return h.jsx(s7,{});case"data_series":return h.jsx(oX,{});case"tribe_message":return h.jsx(n7,{});case"Tweet":return h.jsx(b7,{});case"topic":return h.jsx(m7,{});case"show":return h.jsx(h7,{});case"video":case"podcast":case"clip":case"twitter_space":return h.jsx(XR,{});case"document":return h.jsx(poe,{});case"episode":return h.jsx(JX,{},e.ref_id);case"image":return h.jsx(r7,{});default:return h.jsx(eoe,{})}},voe=P.memo(yoe);var Soe=function(t,r,n){var a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("script");typeof r=="function"&&(n=r,r={}),r=r||{},n=n||function(){},i.type=r.type||"text/javascript",i.charset=r.charset||"utf8",i.async="async"in r?!!r.async:!0,i.src=t,r.attrs&&Eoe(i,r.attrs),r.text&&(i.text=""+r.text);var o="onload"in i?PO:xoe;o(i,n),i.onload||PO(i,n),a.appendChild(i)};function Eoe(e,t){for(var r in t)e.setAttribute(r,t[r])}function PO(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function xoe(e,t){e.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,t(null,e))}}var woe=function(t){return _oe(t)&&!Toe(t)};function _oe(e){return!!e&&typeof e=="object"}function Toe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||koe(e)}var Aoe=typeof Symbol=="function"&&Symbol.for,Ooe=Aoe?Symbol.for("react.element"):60103;function koe(e){return e.$$typeof===Ooe}function Roe(e){return Array.isArray(e)?[]:{}}function Lo(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Qa(Roe(e),e,t):e}function Ioe(e,t,r){return e.concat(t).map(function(n){return Lo(n,r)})}function Noe(e,t){if(!t.customMerge)return Qa;var r=t.customMerge(e);return typeof r=="function"?r:Qa}function Coe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function $O(e){return Object.keys(e).concat(Coe(e))}function DI(e,t){try{return t in e}catch{return!1}}function Doe(e,t){return DI(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Loe(e,t,r){var n={};return r.isMergeableObject(e)&&$O(e).forEach(function(a){n[a]=Lo(e[a],r)}),$O(t).forEach(function(a){Doe(e,a)||(DI(e,a)&&r.isMergeableObject(t[a])?n[a]=Noe(a,r)(e[a],t[a],r):n[a]=Lo(t[a],r))}),n}function Qa(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||Ioe,r.isMergeableObject=r.isMergeableObject||woe,r.cloneUnlessOtherwiseSpecified=Lo;var n=Array.isArray(t),a=Array.isArray(e),i=n===a;return i?n?r.arrayMerge(e,t,r):Loe(e,t,r):Lo(t,r)}Qa.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,a){return Qa(n,a,r)},{})};var Moe=Qa,LI=Moe,Poe=Object.create,Pu=Object.defineProperty,$oe=Object.getOwnPropertyDescriptor,joe=Object.getOwnPropertyNames,Foe=Object.getPrototypeOf,Boe=Object.prototype.hasOwnProperty,Uoe=(e,t)=>{for(var r in t)Pu(e,r,{get:t[r],enumerable:!0})},MI=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of joe(t))!Boe.call(e,a)&&a!==r&&Pu(e,a,{get:()=>t[a],enumerable:!(n=$oe(t,a))||n.enumerable});return e},Hy=(e,t,r)=>(r=e!=null?Poe(Foe(e)):{},MI(t||!e||!e.__esModule?Pu(r,"default",{value:e,enumerable:!0}):r,e)),Goe=e=>MI(Pu({},"__esModule",{value:!0}),e),PI={};Uoe(PI,{callPlayer:()=>ase,getConfig:()=>rse,getSDK:()=>tse,isBlobUrl:()=>ose,isMediaStream:()=>ise,lazy:()=>Woe,omit:()=>nse,parseEndTime:()=>Joe,parseStartTime:()=>Zoe,queryString:()=>ese,randomString:()=>Qoe,supportsWebKitPresentationMode:()=>sse});var $u=Goe(PI),zoe=Hy(P),qoe=Hy(Soe),Hoe=Hy(LI);const Woe=e=>zoe.default.lazy(async()=>{const t=await e();return typeof t.default=="function"?t:t.default}),Voe=/[?&#](?:start|t)=([0-9hms]+)/,Yoe=/[?&#]end=([0-9hms]+)/,lb=/(\d+)(h|m|s)/g,Koe=/^\d+$/;function $I(e,t){if(e instanceof Array)return;const r=e.match(t);if(r){const n=r[1];if(n.match(lb))return Xoe(n);if(Koe.test(n))return parseInt(n)}}function Xoe(e){let t=0,r=lb.exec(e);for(;r!==null;){const[,n,a]=r;a==="h"&&(t+=parseInt(n,10)*60*60),a==="m"&&(t+=parseInt(n,10)*60),a==="s"&&(t+=parseInt(n,10)),r=lb.exec(e)}return t}function Zoe(e){return $I(e,Voe)}function Joe(e){return $I(e,Yoe)}function Qoe(){return Math.random().toString(36).substr(2,5)}function ese(e){return Object.keys(e).map(t=>`${t}=${e[t]}`).join("&")}function qh(e){return window[e]?window[e]:window.exports&&window.exports[e]?window.exports[e]:window.module&&window.module.exports&&window.module.exports[e]?window.module.exports[e]:null}const Sa={},tse=function(t,r,n=null,a=()=>!0,i=qoe.default){const o=qh(r);return o&&a(o)?Promise.resolve(o):new Promise((s,l)=>{if(Sa[t]){Sa[t].push({resolve:s,reject:l});return}Sa[t]=[{resolve:s,reject:l}];const c=d=>{Sa[t].forEach(p=>p.resolve(d))};if(n){const d=window[n];window[n]=function(){d&&d(),c(qh(r))}}i(t,d=>{d?(Sa[t].forEach(p=>p.reject(d)),Sa[t]=null):n||c(qh(r))})})};function rse(e,t){return(0,Hoe.default)(t.config,e.config)}function nse(e,...t){const r=[].concat(...t),n={},a=Object.keys(e);for(const i of a)r.indexOf(i)===-1&&(n[i]=e[i]);return n}function ase(e,...t){if(!this.player||!this.player[e]){let r=`ReactPlayer: ${this.constructor.displayName} player could not call %c${e}%c – `;return this.player?this.player[e]||(r+="The method was not available"):r+="The player was not available",console.warn(r,"font-weight: bold",""),null}return this.player[e](...t)}function ise(e){return typeof window<"u"&&typeof window.MediaStream<"u"&&e instanceof window.MediaStream}function ose(e){return/^blob:/.test(e)}function sse(e=document.createElement("video")){const t=/iPhone|iPod/.test(navigator.userAgent)===!1;return e.webkitSupportsPresentationMode&&typeof e.webkitSetPresentationMode=="function"&&t}var Wy=Object.defineProperty,lse=Object.getOwnPropertyDescriptor,use=Object.getOwnPropertyNames,cse=Object.prototype.hasOwnProperty,dse=(e,t)=>{for(var r in t)Wy(e,r,{get:t[r],enumerable:!0})},pse=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of use(t))!cse.call(e,a)&&a!==r&&Wy(e,a,{get:()=>t[a],enumerable:!(n=lse(t,a))||n.enumerable});return e},fse=e=>pse(Wy({},"__esModule",{value:!0}),e),jI={};dse(jI,{AUDIO_EXTENSIONS:()=>Vy,DASH_EXTENSIONS:()=>ZI,FLV_EXTENSIONS:()=>JI,HLS_EXTENSIONS:()=>Ky,MATCH_URL_DAILYMOTION:()=>VI,MATCH_URL_FACEBOOK:()=>UI,MATCH_URL_FACEBOOK_WATCH:()=>GI,MATCH_URL_KALTURA:()=>XI,MATCH_URL_MIXCLOUD:()=>YI,MATCH_URL_SOUNDCLOUD:()=>FI,MATCH_URL_STREAMABLE:()=>zI,MATCH_URL_TWITCH_CHANNEL:()=>WI,MATCH_URL_TWITCH_VIDEO:()=>HI,MATCH_URL_VIDYARD:()=>KI,MATCH_URL_VIMEO:()=>BI,MATCH_URL_WISTIA:()=>qI,MATCH_URL_YOUTUBE:()=>ub,VIDEO_EXTENSIONS:()=>Yy,canPlay:()=>hse});var gse=fse(jI),jO=$u;const ub=/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//,FI=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/,BI=/vimeo\.com\/(?!progressive_redirect).+/,UI=/^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/,GI=/^https?:\/\/fb\.watch\/.+$/,zI=/streamable\.com\/([a-z0-9]+)$/,qI=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/,HI=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,WI=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/,VI=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/,YI=/mixcloud\.com\/([^/]+\/[^/]+)/,KI=/vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/,XI=/^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_].*)$/,Vy=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,Yy=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,Ky=/\.(m3u8)($|\?)/i,ZI=/\.(mpd)($|\?)/i,JI=/\.(flv)($|\?)/i,cb=e=>{if(e instanceof Array){for(const t of e)if(typeof t=="string"&&cb(t)||cb(t.src))return!0;return!1}return(0,jO.isMediaStream)(e)||(0,jO.isBlobUrl)(e)?!0:Vy.test(e)||Yy.test(e)||Ky.test(e)||ZI.test(e)||JI.test(e)},hse={youtube:e=>e instanceof Array?e.every(t=>ub.test(t)):ub.test(e),soundcloud:e=>FI.test(e)&&!Vy.test(e),vimeo:e=>BI.test(e)&&!Yy.test(e)&&!Ky.test(e),facebook:e=>UI.test(e)||GI.test(e),streamable:e=>zI.test(e),wistia:e=>qI.test(e),twitch:e=>HI.test(e)||WI.test(e),dailymotion:e=>VI.test(e),mixcloud:e=>YI.test(e),vidyard:e=>KI.test(e),kaltura:e=>XI.test(e),file:cb};var Xy=Object.defineProperty,mse=Object.getOwnPropertyDescriptor,bse=Object.getOwnPropertyNames,yse=Object.prototype.hasOwnProperty,vse=(e,t)=>{for(var r in t)Xy(e,r,{get:t[r],enumerable:!0})},Sse=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of bse(t))!yse.call(e,a)&&a!==r&&Xy(e,a,{get:()=>t[a],enumerable:!(n=mse(t,a))||n.enumerable});return e},Ese=e=>Sse(Xy({},"__esModule",{value:!0}),e),QI={};vse(QI,{default:()=>wse});var xse=Ese(QI),ar=$u,Zt=gse,wse=[{key:"youtube",name:"YouTube",canPlay:Zt.canPlay.youtube,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./YouTube-669c494c.js").then(e=>e.Y),["assets/YouTube-669c494c.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css"]))},{key:"soundcloud",name:"SoundCloud",canPlay:Zt.canPlay.soundcloud,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./SoundCloud-3d6c217d.js").then(e=>e.S),["assets/SoundCloud-3d6c217d.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css"]))},{key:"vimeo",name:"Vimeo",canPlay:Zt.canPlay.vimeo,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Vimeo-6c31b7ae.js").then(e=>e.V),["assets/Vimeo-6c31b7ae.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css"]))},{key:"facebook",name:"Facebook",canPlay:Zt.canPlay.facebook,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Facebook-be32f7c0.js").then(e=>e.F),["assets/Facebook-be32f7c0.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css"]))},{key:"streamable",name:"Streamable",canPlay:Zt.canPlay.streamable,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Streamable-6fbd6333.js").then(e=>e.S),["assets/Streamable-6fbd6333.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css"]))},{key:"wistia",name:"Wistia",canPlay:Zt.canPlay.wistia,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Wistia-fc8a836e.js").then(e=>e.W),["assets/Wistia-fc8a836e.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css"]))},{key:"twitch",name:"Twitch",canPlay:Zt.canPlay.twitch,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Twitch-8cf0a6a4.js").then(e=>e.T),["assets/Twitch-8cf0a6a4.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css"]))},{key:"dailymotion",name:"DailyMotion",canPlay:Zt.canPlay.dailymotion,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./DailyMotion-17bddea7.js").then(e=>e.D),["assets/DailyMotion-17bddea7.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css"]))},{key:"mixcloud",name:"Mixcloud",canPlay:Zt.canPlay.mixcloud,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Mixcloud-93b2d8f0.js").then(e=>e.M),["assets/Mixcloud-93b2d8f0.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css"]))},{key:"vidyard",name:"Vidyard",canPlay:Zt.canPlay.vidyard,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Vidyard-adceec55.js").then(e=>e.V),["assets/Vidyard-adceec55.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css"]))},{key:"kaltura",name:"Kaltura",canPlay:Zt.canPlay.kaltura,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Kaltura-f34b51f2.js").then(e=>e.K),["assets/Kaltura-f34b51f2.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css"]))},{key:"file",name:"FilePlayer",canPlay:Zt.canPlay.file,canEnablePIP:e=>Zt.canPlay.file(e)&&(document.pictureInPictureEnabled||(0,ar.supportsWebKitPresentationMode)())&&!Zt.AUDIO_EXTENSIONS.test(e),lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./FilePlayer-daa67492.js").then(e=>e.F),["assets/FilePlayer-daa67492.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css"]))}],FO=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function _se(e,t){return!!(e===t||FO(e)&&FO(t))}function Tse(e,t){if(e.length!==t.length)return!1;for(var r=0;r{for(var r in t)ju(e,r,{get:t[r],enumerable:!0})},tN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Mse(t))!$se.call(e,a)&&a!==r&&ju(e,a,{get:()=>t[a],enumerable:!(n=Lse(t,a))||n.enumerable});return e},Fse=(e,t,r)=>(r=e!=null?Dse(Pse(e)):{},tN(t||!e||!e.__esModule?ju(r,"default",{value:e,enumerable:!0}):r,e)),Bse=e=>tN(ju({},"__esModule",{value:!0}),e),rN={};jse(rN,{defaultProps:()=>zse,propTypes:()=>Gse});var nN=Bse(rN),Use=Fse(aP);const{string:qt,bool:Ht,number:Ea,array:Hh,oneOfType:Ii,shape:gr,object:Wt,func:vt,node:BO}=Use.default,Gse={url:Ii([qt,Hh,Wt]),playing:Ht,loop:Ht,controls:Ht,volume:Ea,muted:Ht,playbackRate:Ea,width:Ii([qt,Ea]),height:Ii([qt,Ea]),style:Wt,progressInterval:Ea,playsinline:Ht,pip:Ht,stopOnUnmount:Ht,light:Ii([Ht,qt,Wt]),playIcon:BO,previewTabIndex:Ea,fallback:BO,oEmbedUrl:qt,wrapper:Ii([qt,vt,gr({render:vt.isRequired})]),config:gr({soundcloud:gr({options:Wt}),youtube:gr({playerVars:Wt,embedOptions:Wt,onUnstarted:vt}),facebook:gr({appId:qt,version:qt,playerId:qt,attributes:Wt}),dailymotion:gr({params:Wt}),vimeo:gr({playerOptions:Wt,title:qt}),file:gr({attributes:Wt,tracks:Hh,forceVideo:Ht,forceAudio:Ht,forceHLS:Ht,forceSafariHLS:Ht,forceDisableHls:Ht,forceDASH:Ht,forceFLV:Ht,hlsOptions:Wt,hlsVersion:qt,dashVersion:qt,flvVersion:qt}),wistia:gr({options:Wt,playerId:qt,customControls:Hh}),mixcloud:gr({options:Wt}),twitch:gr({options:Wt,playerId:qt}),vidyard:gr({options:Wt})}),onReady:vt,onStart:vt,onPlay:vt,onPause:vt,onBuffer:vt,onBufferEnd:vt,onEnded:vt,onError:vt,onDuration:vt,onSeek:vt,onPlaybackRateChange:vt,onPlaybackQualityChange:vt,onProgress:vt,onClickPreview:vt,onEnablePIP:vt,onDisablePIP:vt},Rt=()=>{},zse={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,oEmbedUrl:"https://noembed.com/embed?url={url}",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:Rt},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},title:null},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"1.1.4",dashVersion:"3.1.3",flvVersion:"1.5.0",forceDisableHls:!1},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:Rt,onStart:Rt,onPlay:Rt,onPause:Rt,onBuffer:Rt,onBufferEnd:Rt,onEnded:Rt,onError:Rt,onDuration:Rt,onSeek:Rt,onPlaybackRateChange:Rt,onPlaybackQualityChange:Rt,onProgress:Rt,onClickPreview:Rt,onEnablePIP:Rt,onDisablePIP:Rt};var qse=Object.create,Jo=Object.defineProperty,Hse=Object.getOwnPropertyDescriptor,Wse=Object.getOwnPropertyNames,Vse=Object.getPrototypeOf,Yse=Object.prototype.hasOwnProperty,Kse=(e,t,r)=>t in e?Jo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xse=(e,t)=>{for(var r in t)Jo(e,r,{get:t[r],enumerable:!0})},aN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Wse(t))!Yse.call(e,a)&&a!==r&&Jo(e,a,{get:()=>t[a],enumerable:!(n=Hse(t,a))||n.enumerable});return e},iN=(e,t,r)=>(r=e!=null?qse(Vse(e)):{},aN(t||!e||!e.__esModule?Jo(r,"default",{value:e,enumerable:!0}):r,e)),Zse=e=>aN(Jo({},"__esModule",{value:!0}),e),ht=(e,t,r)=>(Kse(e,typeof t!="symbol"?t+"":t,r),r),oN={};Xse(oN,{default:()=>Fu});var Jse=Zse(oN),UO=iN(P),Qse=iN(eN),sN=nN,ele=$u;const tle=5e3;class Fu extends UO.Component{constructor(){super(...arguments),ht(this,"mounted",!1),ht(this,"isReady",!1),ht(this,"isPlaying",!1),ht(this,"isLoading",!0),ht(this,"loadOnReady",null),ht(this,"startOnPlay",!0),ht(this,"seekOnPlay",null),ht(this,"onDurationCalled",!1),ht(this,"handlePlayerMount",t=>{if(this.player){this.progress();return}this.player=t,this.player.load(this.props.url),this.progress()}),ht(this,"getInternalPlayer",t=>this.player?this.player[t]:null),ht(this,"progress",()=>{if(this.props.url&&this.player&&this.isReady){const t=this.getCurrentTime()||0,r=this.getSecondsLoaded(),n=this.getDuration();if(n){const a={playedSeconds:t,played:t/n};r!==null&&(a.loadedSeconds=r,a.loaded=r/n),(a.playedSeconds!==this.prevPlayed||a.loadedSeconds!==this.prevLoaded)&&this.props.onProgress(a),this.prevPlayed=a.playedSeconds,this.prevLoaded=a.loadedSeconds}}this.progressTimeout=setTimeout(this.progress,this.props.progressFrequency||this.props.progressInterval)}),ht(this,"handleReady",()=>{if(!this.mounted)return;this.isReady=!0,this.isLoading=!1;const{onReady:t,playing:r,volume:n,muted:a}=this.props;t(),!a&&n!==null&&this.player.setVolume(n),this.loadOnReady?(this.player.load(this.loadOnReady,!0),this.loadOnReady=null):r&&this.player.play(),this.handleDurationCheck()}),ht(this,"handlePlay",()=>{this.isPlaying=!0,this.isLoading=!1;const{onStart:t,onPlay:r,playbackRate:n}=this.props;this.startOnPlay&&(this.player.setPlaybackRate&&n!==1&&this.player.setPlaybackRate(n),t(),this.startOnPlay=!1),r(),this.seekOnPlay&&(this.seekTo(this.seekOnPlay),this.seekOnPlay=null),this.handleDurationCheck()}),ht(this,"handlePause",t=>{this.isPlaying=!1,this.isLoading||this.props.onPause(t)}),ht(this,"handleEnded",()=>{const{activePlayer:t,loop:r,onEnded:n}=this.props;t.loopOnEnded&&r&&this.seekTo(0),r||(this.isPlaying=!1,n())}),ht(this,"handleError",(...t)=>{this.isLoading=!1,this.props.onError(...t)}),ht(this,"handleDurationCheck",()=>{clearTimeout(this.durationCheckTimeout);const t=this.getDuration();t?this.onDurationCalled||(this.props.onDuration(t),this.onDurationCalled=!0):this.durationCheckTimeout=setTimeout(this.handleDurationCheck,100)}),ht(this,"handleLoaded",()=>{this.isLoading=!1})}componentDidMount(){this.mounted=!0}componentWillUnmount(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.props.stopOnUnmount&&(this.player.stop(),this.player.disablePIP&&this.player.disablePIP()),this.mounted=!1}componentDidUpdate(t){if(!this.player)return;const{url:r,playing:n,volume:a,muted:i,playbackRate:o,pip:s,loop:l,activePlayer:c,disableDeferredLoading:d}=this.props;if(!(0,Qse.default)(t.url,r)){if(this.isLoading&&!c.forceLoad&&!d&&!(0,ele.isMediaStream)(r)){console.warn(`ReactPlayer: the attempt to load ${r} is being deferred until the player has loaded`),this.loadOnReady=r;return}this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(r,this.isReady)}!t.playing&&n&&!this.isPlaying&&this.player.play(),t.playing&&!n&&this.isPlaying&&this.player.pause(),!t.pip&&s&&this.player.enablePIP&&this.player.enablePIP(),t.pip&&!s&&this.player.disablePIP&&this.player.disablePIP(),t.volume!==a&&a!==null&&this.player.setVolume(a),t.muted!==i&&(i?this.player.mute():(this.player.unmute(),a!==null&&setTimeout(()=>this.player.setVolume(a)))),t.playbackRate!==o&&this.player.setPlaybackRate&&this.player.setPlaybackRate(o),t.loop!==l&&this.player.setLoop&&this.player.setLoop(l)}getDuration(){return this.isReady?this.player.getDuration():null}getCurrentTime(){return this.isReady?this.player.getCurrentTime():null}getSecondsLoaded(){return this.isReady?this.player.getSecondsLoaded():null}seekTo(t,r,n){if(!this.isReady){t!==0&&(this.seekOnPlay=t,setTimeout(()=>{this.seekOnPlay=null},tle));return}if(r?r==="fraction":t>0&&t<1){const i=this.player.getDuration();if(!i){console.warn("ReactPlayer: could not seek using fraction – duration not yet available");return}this.player.seekTo(i*t,n);return}this.player.seekTo(t,n)}render(){const t=this.props.activePlayer;return t?UO.default.createElement(t,{...this.props,onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError}):null}}ht(Fu,"displayName","Player");ht(Fu,"propTypes",sN.propTypes);ht(Fu,"defaultProps",sN.defaultProps);var rle=Object.create,Qo=Object.defineProperty,nle=Object.getOwnPropertyDescriptor,ale=Object.getOwnPropertyNames,ile=Object.getPrototypeOf,ole=Object.prototype.hasOwnProperty,sle=(e,t,r)=>t in e?Qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lle=(e,t)=>{for(var r in t)Qo(e,r,{get:t[r],enumerable:!0})},lN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ale(t))!ole.call(e,a)&&a!==r&&Qo(e,a,{get:()=>t[a],enumerable:!(n=nle(t,a))||n.enumerable});return e},es=(e,t,r)=>(r=e!=null?rle(ile(e)):{},lN(t||!e||!e.__esModule?Qo(r,"default",{value:e,enumerable:!0}):r,e)),ule=e=>lN(Qo({},"__esModule",{value:!0}),e),gt=(e,t,r)=>(sle(e,typeof t!="symbol"?t+"":t,r),r),uN={};lle(uN,{createReactPlayer:()=>yle});var cle=ule(uN),_a=es(P),dle=es(LI),Wh=es(kse),GO=es(eN),$i=nN,cN=$u,ple=es(Jse);const fle=(0,cN.lazy)(()=>ir(()=>import("./Preview-40b44430.js").then(e=>e.P),["assets/Preview-40b44430.js","assets/index-17ed06be.js","assets/index-b4d03b7b.css"])),gle=typeof window<"u"&&window.document,hle=typeof Tt<"u"&&Tt.window&&Tt.window.document,mle=Object.keys($i.propTypes),ble=gle||hle?_a.Suspense:()=>null,Ni=[],yle=(e,t)=>{var r;return r=class extends _a.Component{constructor(){super(...arguments),gt(this,"state",{showPreview:!!this.props.light}),gt(this,"references",{wrapper:n=>{this.wrapper=n},player:n=>{this.player=n}}),gt(this,"handleClickPreview",n=>{this.setState({showPreview:!1}),this.props.onClickPreview(n)}),gt(this,"showPreview",()=>{this.setState({showPreview:!0})}),gt(this,"getDuration",()=>this.player?this.player.getDuration():null),gt(this,"getCurrentTime",()=>this.player?this.player.getCurrentTime():null),gt(this,"getSecondsLoaded",()=>this.player?this.player.getSecondsLoaded():null),gt(this,"getInternalPlayer",(n="player")=>this.player?this.player.getInternalPlayer(n):null),gt(this,"seekTo",(n,a,i)=>{if(!this.player)return null;this.player.seekTo(n,a,i)}),gt(this,"handleReady",()=>{this.props.onReady(this)}),gt(this,"getActivePlayer",(0,Wh.default)(n=>{for(const a of[...Ni,...e])if(a.canPlay(n))return a;return t||null})),gt(this,"getConfig",(0,Wh.default)((n,a)=>{const{config:i}=this.props;return dle.default.all([$i.defaultProps.config,$i.defaultProps.config[a]||{},i,i[a]||{}])})),gt(this,"getAttributes",(0,Wh.default)(n=>(0,cN.omit)(this.props,mle))),gt(this,"renderActivePlayer",n=>{if(!n)return null;const a=this.getActivePlayer(n);if(!a)return null;const i=this.getConfig(n,a.key);return _a.default.createElement(ple.default,{...this.props,key:a.key,ref:this.references.player,config:i,activePlayer:a.lazyPlayer||a,onReady:this.handleReady})})}shouldComponentUpdate(n,a){return!(0,GO.default)(this.props,n)||!(0,GO.default)(this.state,a)}componentDidUpdate(n){const{light:a}=this.props;!n.light&&a&&this.setState({showPreview:!0}),n.light&&!a&&this.setState({showPreview:!1})}renderPreview(n){if(!n)return null;const{light:a,playIcon:i,previewTabIndex:o,oEmbedUrl:s}=this.props;return _a.default.createElement(fle,{url:n,light:a,playIcon:i,previewTabIndex:o,oEmbedUrl:s,onClick:this.handleClickPreview})}render(){const{url:n,style:a,width:i,height:o,fallback:s,wrapper:l}=this.props,{showPreview:c}=this.state,d=this.getAttributes(n),p=typeof l=="string"?this.references.wrapper:void 0;return _a.default.createElement(l,{ref:p,style:{...a,width:i,height:o},...d},_a.default.createElement(ble,{fallback:s},c?this.renderPreview(n):this.renderActivePlayer(n)))}},gt(r,"displayName","ReactPlayer"),gt(r,"propTypes",$i.propTypes),gt(r,"defaultProps",$i.defaultProps),gt(r,"addCustomPlayer",n=>{Ni.push(n)}),gt(r,"removeCustomPlayers",()=>{Ni.length=0}),gt(r,"canPlay",n=>{for(const a of[...Ni,...e])if(a.canPlay(n))return!0;return!1}),gt(r,"canEnablePIP",n=>{for(const a of[...Ni,...e])if(a.canEnablePIP&&a.canEnablePIP(n))return!0;return!1}),r};var vle=Object.create,Bu=Object.defineProperty,Sle=Object.getOwnPropertyDescriptor,Ele=Object.getOwnPropertyNames,xle=Object.getPrototypeOf,wle=Object.prototype.hasOwnProperty,_le=(e,t)=>{for(var r in t)Bu(e,r,{get:t[r],enumerable:!0})},dN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ele(t))!wle.call(e,a)&&a!==r&&Bu(e,a,{get:()=>t[a],enumerable:!(n=Sle(t,a))||n.enumerable});return e},Tle=(e,t,r)=>(r=e!=null?vle(xle(e)):{},dN(t||!e||!e.__esModule?Bu(r,"default",{value:e,enumerable:!0}):r,e)),Ale=e=>dN(Bu({},"__esModule",{value:!0}),e),pN={};_le(pN,{default:()=>Ile});var Ole=Ale(pN),db=Tle(xse),kle=cle;const Rle=db.default[db.default.length-1];var Ile=(0,kle.createReactPlayer)(db.default,Rle);const Nle=pt(Ole),zO=e=>{const t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=Math.floor(e%60),a=t>0?`${t}:`:"",i=t>0?r.toString().padStart(2,"0"):r.toString(),o=n.toString().padStart(2,"0");return`${a}${i}:${o}`},Cle=({isPlaying:e,isFullScreen:t,setIsPlaying:r,playingTime:n,duration:a,handleProgressChange:i,handleVolumeChange:o,onFullScreenClick:s,showToolbar:l})=>{const[c,d]=P.useState(.5),[p,g]=P.useState(!1),[m,b]=P.useState(.5),v=(O,_)=>{const w=Array.isArray(_)?_[0]:_;d(w),o(O,w),p&&g(!1)},S=()=>{p?(d(m),o(new Event("input"),m)):(b(c),d(0),o(new Event("input"),0)),g(!p)};return h.jsxs(F,{children:[(!l||t)&&h.jsx(Fle,{"aria-label":"Small","data-testid":"progress-bar",isFullScreen:t,max:a,onChange:i,size:"small",value:n}),h.jsxs(Dle,{align:"center",direction:"row",showToolbar:l||t,children:[h.jsx(Ple,{onClick:r,size:"small",children:e?h.jsx(Sb,{}):h.jsx(Eb,{})}),h.jsxs(Ble,{direction:"row",children:[h.jsx("span",{children:zO(n)}),h.jsx("span",{className:"separator",children:"/"}),h.jsx("span",{className:"duration",children:zO(a)})]}),h.jsxs($le,{direction:"row",px:9,children:[h.jsx(Wl,{className:"volume-slider",max:1,min:0,onChange:v,size:"small",step:.1,value:c}),h.jsx(Lle,{onClick:S,children:p?h.jsx(Mle,{children:h.jsx(PM,{})}):h.jsx($M,{})})]}),h.jsx(jle,{"data-testid":"fullscreen-button",onClick:s,children:t?h.jsx(FM,{}):h.jsx(jM,{})})]})]})},Dle=B(F)` +`,yoe=()=>{const e=Pt(),{setPlayingNode:t}=Po(r=>r);switch(P.useEffect(()=>{var n,a;if(!e)return;(e.media_url||e.link||((n=e.properties)==null?void 0:n.link)||((a=e.properties)==null?void 0:a.media_url))&&t(e)},[t,e]),e==null?void 0:e.node_type){case"guest":case"person":return h.jsx(s7,{});case"data_series":return h.jsx(oX,{});case"tribe_message":return h.jsx(n7,{});case"Tweet":return h.jsx(b7,{});case"topic":return h.jsx(m7,{});case"show":return h.jsx(h7,{});case"video":case"podcast":case"clip":case"twitter_space":return h.jsx(XR,{});case"document":return h.jsx(poe,{});case"episode":return h.jsx(JX,{},e.ref_id);case"image":return h.jsx(r7,{});default:return h.jsx(eoe,{})}},voe=P.memo(yoe);var Soe=function(t,r,n){var a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("script");typeof r=="function"&&(n=r,r={}),r=r||{},n=n||function(){},i.type=r.type||"text/javascript",i.charset=r.charset||"utf8",i.async="async"in r?!!r.async:!0,i.src=t,r.attrs&&Eoe(i,r.attrs),r.text&&(i.text=""+r.text);var o="onload"in i?PO:xoe;o(i,n),i.onload||PO(i,n),a.appendChild(i)};function Eoe(e,t){for(var r in t)e.setAttribute(r,t[r])}function PO(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function xoe(e,t){e.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,t(null,e))}}var woe=function(t){return _oe(t)&&!Toe(t)};function _oe(e){return!!e&&typeof e=="object"}function Toe(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||koe(e)}var Aoe=typeof Symbol=="function"&&Symbol.for,Ooe=Aoe?Symbol.for("react.element"):60103;function koe(e){return e.$$typeof===Ooe}function Roe(e){return Array.isArray(e)?[]:{}}function Lo(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Qa(Roe(e),e,t):e}function Ioe(e,t,r){return e.concat(t).map(function(n){return Lo(n,r)})}function Noe(e,t){if(!t.customMerge)return Qa;var r=t.customMerge(e);return typeof r=="function"?r:Qa}function Coe(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function $O(e){return Object.keys(e).concat(Coe(e))}function DI(e,t){try{return t in e}catch{return!1}}function Doe(e,t){return DI(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function Loe(e,t,r){var n={};return r.isMergeableObject(e)&&$O(e).forEach(function(a){n[a]=Lo(e[a],r)}),$O(t).forEach(function(a){Doe(e,a)||(DI(e,a)&&r.isMergeableObject(t[a])?n[a]=Noe(a,r)(e[a],t[a],r):n[a]=Lo(t[a],r))}),n}function Qa(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||Ioe,r.isMergeableObject=r.isMergeableObject||woe,r.cloneUnlessOtherwiseSpecified=Lo;var n=Array.isArray(t),a=Array.isArray(e),i=n===a;return i?n?r.arrayMerge(e,t,r):Loe(e,t,r):Lo(t,r)}Qa.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,a){return Qa(n,a,r)},{})};var Moe=Qa,LI=Moe,Poe=Object.create,Pu=Object.defineProperty,$oe=Object.getOwnPropertyDescriptor,joe=Object.getOwnPropertyNames,Foe=Object.getPrototypeOf,Boe=Object.prototype.hasOwnProperty,Uoe=(e,t)=>{for(var r in t)Pu(e,r,{get:t[r],enumerable:!0})},MI=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of joe(t))!Boe.call(e,a)&&a!==r&&Pu(e,a,{get:()=>t[a],enumerable:!(n=$oe(t,a))||n.enumerable});return e},Hy=(e,t,r)=>(r=e!=null?Poe(Foe(e)):{},MI(t||!e||!e.__esModule?Pu(r,"default",{value:e,enumerable:!0}):r,e)),Goe=e=>MI(Pu({},"__esModule",{value:!0}),e),PI={};Uoe(PI,{callPlayer:()=>ase,getConfig:()=>rse,getSDK:()=>tse,isBlobUrl:()=>ose,isMediaStream:()=>ise,lazy:()=>Woe,omit:()=>nse,parseEndTime:()=>Joe,parseStartTime:()=>Zoe,queryString:()=>ese,randomString:()=>Qoe,supportsWebKitPresentationMode:()=>sse});var $u=Goe(PI),zoe=Hy(P),qoe=Hy(Soe),Hoe=Hy(LI);const Woe=e=>zoe.default.lazy(async()=>{const t=await e();return typeof t.default=="function"?t:t.default}),Voe=/[?&#](?:start|t)=([0-9hms]+)/,Yoe=/[?&#]end=([0-9hms]+)/,lb=/(\d+)(h|m|s)/g,Koe=/^\d+$/;function $I(e,t){if(e instanceof Array)return;const r=e.match(t);if(r){const n=r[1];if(n.match(lb))return Xoe(n);if(Koe.test(n))return parseInt(n)}}function Xoe(e){let t=0,r=lb.exec(e);for(;r!==null;){const[,n,a]=r;a==="h"&&(t+=parseInt(n,10)*60*60),a==="m"&&(t+=parseInt(n,10)*60),a==="s"&&(t+=parseInt(n,10)),r=lb.exec(e)}return t}function Zoe(e){return $I(e,Voe)}function Joe(e){return $I(e,Yoe)}function Qoe(){return Math.random().toString(36).substr(2,5)}function ese(e){return Object.keys(e).map(t=>`${t}=${e[t]}`).join("&")}function qh(e){return window[e]?window[e]:window.exports&&window.exports[e]?window.exports[e]:window.module&&window.module.exports&&window.module.exports[e]?window.module.exports[e]:null}const Sa={},tse=function(t,r,n=null,a=()=>!0,i=qoe.default){const o=qh(r);return o&&a(o)?Promise.resolve(o):new Promise((s,l)=>{if(Sa[t]){Sa[t].push({resolve:s,reject:l});return}Sa[t]=[{resolve:s,reject:l}];const c=d=>{Sa[t].forEach(p=>p.resolve(d))};if(n){const d=window[n];window[n]=function(){d&&d(),c(qh(r))}}i(t,d=>{d?(Sa[t].forEach(p=>p.reject(d)),Sa[t]=null):n||c(qh(r))})})};function rse(e,t){return(0,Hoe.default)(t.config,e.config)}function nse(e,...t){const r=[].concat(...t),n={},a=Object.keys(e);for(const i of a)r.indexOf(i)===-1&&(n[i]=e[i]);return n}function ase(e,...t){if(!this.player||!this.player[e]){let r=`ReactPlayer: ${this.constructor.displayName} player could not call %c${e}%c – `;return this.player?this.player[e]||(r+="The method was not available"):r+="The player was not available",console.warn(r,"font-weight: bold",""),null}return this.player[e](...t)}function ise(e){return typeof window<"u"&&typeof window.MediaStream<"u"&&e instanceof window.MediaStream}function ose(e){return/^blob:/.test(e)}function sse(e=document.createElement("video")){const t=/iPhone|iPod/.test(navigator.userAgent)===!1;return e.webkitSupportsPresentationMode&&typeof e.webkitSetPresentationMode=="function"&&t}var Wy=Object.defineProperty,lse=Object.getOwnPropertyDescriptor,use=Object.getOwnPropertyNames,cse=Object.prototype.hasOwnProperty,dse=(e,t)=>{for(var r in t)Wy(e,r,{get:t[r],enumerable:!0})},pse=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of use(t))!cse.call(e,a)&&a!==r&&Wy(e,a,{get:()=>t[a],enumerable:!(n=lse(t,a))||n.enumerable});return e},fse=e=>pse(Wy({},"__esModule",{value:!0}),e),jI={};dse(jI,{AUDIO_EXTENSIONS:()=>Vy,DASH_EXTENSIONS:()=>ZI,FLV_EXTENSIONS:()=>JI,HLS_EXTENSIONS:()=>Ky,MATCH_URL_DAILYMOTION:()=>VI,MATCH_URL_FACEBOOK:()=>UI,MATCH_URL_FACEBOOK_WATCH:()=>GI,MATCH_URL_KALTURA:()=>XI,MATCH_URL_MIXCLOUD:()=>YI,MATCH_URL_SOUNDCLOUD:()=>FI,MATCH_URL_STREAMABLE:()=>zI,MATCH_URL_TWITCH_CHANNEL:()=>WI,MATCH_URL_TWITCH_VIDEO:()=>HI,MATCH_URL_VIDYARD:()=>KI,MATCH_URL_VIMEO:()=>BI,MATCH_URL_WISTIA:()=>qI,MATCH_URL_YOUTUBE:()=>ub,VIDEO_EXTENSIONS:()=>Yy,canPlay:()=>hse});var gse=fse(jI),jO=$u;const ub=/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//,FI=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/,BI=/vimeo\.com\/(?!progressive_redirect).+/,UI=/^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/,GI=/^https?:\/\/fb\.watch\/.+$/,zI=/streamable\.com\/([a-z0-9]+)$/,qI=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/,HI=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,WI=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/,VI=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/,YI=/mixcloud\.com\/([^/]+\/[^/]+)/,KI=/vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/,XI=/^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_].*)$/,Vy=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,Yy=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,Ky=/\.(m3u8)($|\?)/i,ZI=/\.(mpd)($|\?)/i,JI=/\.(flv)($|\?)/i,cb=e=>{if(e instanceof Array){for(const t of e)if(typeof t=="string"&&cb(t)||cb(t.src))return!0;return!1}return(0,jO.isMediaStream)(e)||(0,jO.isBlobUrl)(e)?!0:Vy.test(e)||Yy.test(e)||Ky.test(e)||ZI.test(e)||JI.test(e)},hse={youtube:e=>e instanceof Array?e.every(t=>ub.test(t)):ub.test(e),soundcloud:e=>FI.test(e)&&!Vy.test(e),vimeo:e=>BI.test(e)&&!Yy.test(e)&&!Ky.test(e),facebook:e=>UI.test(e)||GI.test(e),streamable:e=>zI.test(e),wistia:e=>qI.test(e),twitch:e=>HI.test(e)||WI.test(e),dailymotion:e=>VI.test(e),mixcloud:e=>YI.test(e),vidyard:e=>KI.test(e),kaltura:e=>XI.test(e),file:cb};var Xy=Object.defineProperty,mse=Object.getOwnPropertyDescriptor,bse=Object.getOwnPropertyNames,yse=Object.prototype.hasOwnProperty,vse=(e,t)=>{for(var r in t)Xy(e,r,{get:t[r],enumerable:!0})},Sse=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of bse(t))!yse.call(e,a)&&a!==r&&Xy(e,a,{get:()=>t[a],enumerable:!(n=mse(t,a))||n.enumerable});return e},Ese=e=>Sse(Xy({},"__esModule",{value:!0}),e),QI={};vse(QI,{default:()=>wse});var xse=Ese(QI),ar=$u,Zt=gse,wse=[{key:"youtube",name:"YouTube",canPlay:Zt.canPlay.youtube,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./YouTube-4922b2e3.js").then(e=>e.Y),["assets/YouTube-4922b2e3.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css"]))},{key:"soundcloud",name:"SoundCloud",canPlay:Zt.canPlay.soundcloud,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./SoundCloud-8d2be6f4.js").then(e=>e.S),["assets/SoundCloud-8d2be6f4.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css"]))},{key:"vimeo",name:"Vimeo",canPlay:Zt.canPlay.vimeo,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Vimeo-dc0a0e41.js").then(e=>e.V),["assets/Vimeo-dc0a0e41.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css"]))},{key:"facebook",name:"Facebook",canPlay:Zt.canPlay.facebook,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Facebook-7ca1b704.js").then(e=>e.F),["assets/Facebook-7ca1b704.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css"]))},{key:"streamable",name:"Streamable",canPlay:Zt.canPlay.streamable,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Streamable-8a8c4cd3.js").then(e=>e.S),["assets/Streamable-8a8c4cd3.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css"]))},{key:"wistia",name:"Wistia",canPlay:Zt.canPlay.wistia,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Wistia-798cf390.js").then(e=>e.W),["assets/Wistia-798cf390.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css"]))},{key:"twitch",name:"Twitch",canPlay:Zt.canPlay.twitch,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Twitch-45ac7eb0.js").then(e=>e.T),["assets/Twitch-45ac7eb0.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css"]))},{key:"dailymotion",name:"DailyMotion",canPlay:Zt.canPlay.dailymotion,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./DailyMotion-4413fcec.js").then(e=>e.D),["assets/DailyMotion-4413fcec.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css"]))},{key:"mixcloud",name:"Mixcloud",canPlay:Zt.canPlay.mixcloud,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Mixcloud-63b86ddc.js").then(e=>e.M),["assets/Mixcloud-63b86ddc.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css"]))},{key:"vidyard",name:"Vidyard",canPlay:Zt.canPlay.vidyard,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Vidyard-6eb1a22b.js").then(e=>e.V),["assets/Vidyard-6eb1a22b.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css"]))},{key:"kaltura",name:"Kaltura",canPlay:Zt.canPlay.kaltura,lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./Kaltura-8042c8ed.js").then(e=>e.K),["assets/Kaltura-8042c8ed.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css"]))},{key:"file",name:"FilePlayer",canPlay:Zt.canPlay.file,canEnablePIP:e=>Zt.canPlay.file(e)&&(document.pictureInPictureEnabled||(0,ar.supportsWebKitPresentationMode)())&&!Zt.AUDIO_EXTENSIONS.test(e),lazyPlayer:(0,ar.lazy)(()=>ir(()=>import("./FilePlayer-e0068219.js").then(e=>e.F),["assets/FilePlayer-e0068219.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css"]))}],FO=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function _se(e,t){return!!(e===t||FO(e)&&FO(t))}function Tse(e,t){if(e.length!==t.length)return!1;for(var r=0;r{for(var r in t)ju(e,r,{get:t[r],enumerable:!0})},tN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Mse(t))!$se.call(e,a)&&a!==r&&ju(e,a,{get:()=>t[a],enumerable:!(n=Lse(t,a))||n.enumerable});return e},Fse=(e,t,r)=>(r=e!=null?Dse(Pse(e)):{},tN(t||!e||!e.__esModule?ju(r,"default",{value:e,enumerable:!0}):r,e)),Bse=e=>tN(ju({},"__esModule",{value:!0}),e),rN={};jse(rN,{defaultProps:()=>zse,propTypes:()=>Gse});var nN=Bse(rN),Use=Fse(aP);const{string:qt,bool:Ht,number:Ea,array:Hh,oneOfType:Ii,shape:gr,object:Wt,func:vt,node:BO}=Use.default,Gse={url:Ii([qt,Hh,Wt]),playing:Ht,loop:Ht,controls:Ht,volume:Ea,muted:Ht,playbackRate:Ea,width:Ii([qt,Ea]),height:Ii([qt,Ea]),style:Wt,progressInterval:Ea,playsinline:Ht,pip:Ht,stopOnUnmount:Ht,light:Ii([Ht,qt,Wt]),playIcon:BO,previewTabIndex:Ea,fallback:BO,oEmbedUrl:qt,wrapper:Ii([qt,vt,gr({render:vt.isRequired})]),config:gr({soundcloud:gr({options:Wt}),youtube:gr({playerVars:Wt,embedOptions:Wt,onUnstarted:vt}),facebook:gr({appId:qt,version:qt,playerId:qt,attributes:Wt}),dailymotion:gr({params:Wt}),vimeo:gr({playerOptions:Wt,title:qt}),file:gr({attributes:Wt,tracks:Hh,forceVideo:Ht,forceAudio:Ht,forceHLS:Ht,forceSafariHLS:Ht,forceDisableHls:Ht,forceDASH:Ht,forceFLV:Ht,hlsOptions:Wt,hlsVersion:qt,dashVersion:qt,flvVersion:qt}),wistia:gr({options:Wt,playerId:qt,customControls:Hh}),mixcloud:gr({options:Wt}),twitch:gr({options:Wt,playerId:qt}),vidyard:gr({options:Wt})}),onReady:vt,onStart:vt,onPlay:vt,onPause:vt,onBuffer:vt,onBufferEnd:vt,onEnded:vt,onError:vt,onDuration:vt,onSeek:vt,onPlaybackRateChange:vt,onPlaybackQualityChange:vt,onProgress:vt,onClickPreview:vt,onEnablePIP:vt,onDisablePIP:vt},Rt=()=>{},zse={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,oEmbedUrl:"https://noembed.com/embed?url={url}",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:Rt},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},title:null},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"1.1.4",dashVersion:"3.1.3",flvVersion:"1.5.0",forceDisableHls:!1},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:Rt,onStart:Rt,onPlay:Rt,onPause:Rt,onBuffer:Rt,onBufferEnd:Rt,onEnded:Rt,onError:Rt,onDuration:Rt,onSeek:Rt,onPlaybackRateChange:Rt,onPlaybackQualityChange:Rt,onProgress:Rt,onClickPreview:Rt,onEnablePIP:Rt,onDisablePIP:Rt};var qse=Object.create,Jo=Object.defineProperty,Hse=Object.getOwnPropertyDescriptor,Wse=Object.getOwnPropertyNames,Vse=Object.getPrototypeOf,Yse=Object.prototype.hasOwnProperty,Kse=(e,t,r)=>t in e?Jo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xse=(e,t)=>{for(var r in t)Jo(e,r,{get:t[r],enumerable:!0})},aN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Wse(t))!Yse.call(e,a)&&a!==r&&Jo(e,a,{get:()=>t[a],enumerable:!(n=Hse(t,a))||n.enumerable});return e},iN=(e,t,r)=>(r=e!=null?qse(Vse(e)):{},aN(t||!e||!e.__esModule?Jo(r,"default",{value:e,enumerable:!0}):r,e)),Zse=e=>aN(Jo({},"__esModule",{value:!0}),e),ht=(e,t,r)=>(Kse(e,typeof t!="symbol"?t+"":t,r),r),oN={};Xse(oN,{default:()=>Fu});var Jse=Zse(oN),UO=iN(P),Qse=iN(eN),sN=nN,ele=$u;const tle=5e3;class Fu extends UO.Component{constructor(){super(...arguments),ht(this,"mounted",!1),ht(this,"isReady",!1),ht(this,"isPlaying",!1),ht(this,"isLoading",!0),ht(this,"loadOnReady",null),ht(this,"startOnPlay",!0),ht(this,"seekOnPlay",null),ht(this,"onDurationCalled",!1),ht(this,"handlePlayerMount",t=>{if(this.player){this.progress();return}this.player=t,this.player.load(this.props.url),this.progress()}),ht(this,"getInternalPlayer",t=>this.player?this.player[t]:null),ht(this,"progress",()=>{if(this.props.url&&this.player&&this.isReady){const t=this.getCurrentTime()||0,r=this.getSecondsLoaded(),n=this.getDuration();if(n){const a={playedSeconds:t,played:t/n};r!==null&&(a.loadedSeconds=r,a.loaded=r/n),(a.playedSeconds!==this.prevPlayed||a.loadedSeconds!==this.prevLoaded)&&this.props.onProgress(a),this.prevPlayed=a.playedSeconds,this.prevLoaded=a.loadedSeconds}}this.progressTimeout=setTimeout(this.progress,this.props.progressFrequency||this.props.progressInterval)}),ht(this,"handleReady",()=>{if(!this.mounted)return;this.isReady=!0,this.isLoading=!1;const{onReady:t,playing:r,volume:n,muted:a}=this.props;t(),!a&&n!==null&&this.player.setVolume(n),this.loadOnReady?(this.player.load(this.loadOnReady,!0),this.loadOnReady=null):r&&this.player.play(),this.handleDurationCheck()}),ht(this,"handlePlay",()=>{this.isPlaying=!0,this.isLoading=!1;const{onStart:t,onPlay:r,playbackRate:n}=this.props;this.startOnPlay&&(this.player.setPlaybackRate&&n!==1&&this.player.setPlaybackRate(n),t(),this.startOnPlay=!1),r(),this.seekOnPlay&&(this.seekTo(this.seekOnPlay),this.seekOnPlay=null),this.handleDurationCheck()}),ht(this,"handlePause",t=>{this.isPlaying=!1,this.isLoading||this.props.onPause(t)}),ht(this,"handleEnded",()=>{const{activePlayer:t,loop:r,onEnded:n}=this.props;t.loopOnEnded&&r&&this.seekTo(0),r||(this.isPlaying=!1,n())}),ht(this,"handleError",(...t)=>{this.isLoading=!1,this.props.onError(...t)}),ht(this,"handleDurationCheck",()=>{clearTimeout(this.durationCheckTimeout);const t=this.getDuration();t?this.onDurationCalled||(this.props.onDuration(t),this.onDurationCalled=!0):this.durationCheckTimeout=setTimeout(this.handleDurationCheck,100)}),ht(this,"handleLoaded",()=>{this.isLoading=!1})}componentDidMount(){this.mounted=!0}componentWillUnmount(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.props.stopOnUnmount&&(this.player.stop(),this.player.disablePIP&&this.player.disablePIP()),this.mounted=!1}componentDidUpdate(t){if(!this.player)return;const{url:r,playing:n,volume:a,muted:i,playbackRate:o,pip:s,loop:l,activePlayer:c,disableDeferredLoading:d}=this.props;if(!(0,Qse.default)(t.url,r)){if(this.isLoading&&!c.forceLoad&&!d&&!(0,ele.isMediaStream)(r)){console.warn(`ReactPlayer: the attempt to load ${r} is being deferred until the player has loaded`),this.loadOnReady=r;return}this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(r,this.isReady)}!t.playing&&n&&!this.isPlaying&&this.player.play(),t.playing&&!n&&this.isPlaying&&this.player.pause(),!t.pip&&s&&this.player.enablePIP&&this.player.enablePIP(),t.pip&&!s&&this.player.disablePIP&&this.player.disablePIP(),t.volume!==a&&a!==null&&this.player.setVolume(a),t.muted!==i&&(i?this.player.mute():(this.player.unmute(),a!==null&&setTimeout(()=>this.player.setVolume(a)))),t.playbackRate!==o&&this.player.setPlaybackRate&&this.player.setPlaybackRate(o),t.loop!==l&&this.player.setLoop&&this.player.setLoop(l)}getDuration(){return this.isReady?this.player.getDuration():null}getCurrentTime(){return this.isReady?this.player.getCurrentTime():null}getSecondsLoaded(){return this.isReady?this.player.getSecondsLoaded():null}seekTo(t,r,n){if(!this.isReady){t!==0&&(this.seekOnPlay=t,setTimeout(()=>{this.seekOnPlay=null},tle));return}if(r?r==="fraction":t>0&&t<1){const i=this.player.getDuration();if(!i){console.warn("ReactPlayer: could not seek using fraction – duration not yet available");return}this.player.seekTo(i*t,n);return}this.player.seekTo(t,n)}render(){const t=this.props.activePlayer;return t?UO.default.createElement(t,{...this.props,onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError}):null}}ht(Fu,"displayName","Player");ht(Fu,"propTypes",sN.propTypes);ht(Fu,"defaultProps",sN.defaultProps);var rle=Object.create,Qo=Object.defineProperty,nle=Object.getOwnPropertyDescriptor,ale=Object.getOwnPropertyNames,ile=Object.getPrototypeOf,ole=Object.prototype.hasOwnProperty,sle=(e,t,r)=>t in e?Qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lle=(e,t)=>{for(var r in t)Qo(e,r,{get:t[r],enumerable:!0})},lN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ale(t))!ole.call(e,a)&&a!==r&&Qo(e,a,{get:()=>t[a],enumerable:!(n=nle(t,a))||n.enumerable});return e},es=(e,t,r)=>(r=e!=null?rle(ile(e)):{},lN(t||!e||!e.__esModule?Qo(r,"default",{value:e,enumerable:!0}):r,e)),ule=e=>lN(Qo({},"__esModule",{value:!0}),e),gt=(e,t,r)=>(sle(e,typeof t!="symbol"?t+"":t,r),r),uN={};lle(uN,{createReactPlayer:()=>yle});var cle=ule(uN),_a=es(P),dle=es(LI),Wh=es(kse),GO=es(eN),$i=nN,cN=$u,ple=es(Jse);const fle=(0,cN.lazy)(()=>ir(()=>import("./Preview-90673f14.js").then(e=>e.P),["assets/Preview-90673f14.js","assets/index-787c3ef8.js","assets/index-b4d03b7b.css"])),gle=typeof window<"u"&&window.document,hle=typeof Tt<"u"&&Tt.window&&Tt.window.document,mle=Object.keys($i.propTypes),ble=gle||hle?_a.Suspense:()=>null,Ni=[],yle=(e,t)=>{var r;return r=class extends _a.Component{constructor(){super(...arguments),gt(this,"state",{showPreview:!!this.props.light}),gt(this,"references",{wrapper:n=>{this.wrapper=n},player:n=>{this.player=n}}),gt(this,"handleClickPreview",n=>{this.setState({showPreview:!1}),this.props.onClickPreview(n)}),gt(this,"showPreview",()=>{this.setState({showPreview:!0})}),gt(this,"getDuration",()=>this.player?this.player.getDuration():null),gt(this,"getCurrentTime",()=>this.player?this.player.getCurrentTime():null),gt(this,"getSecondsLoaded",()=>this.player?this.player.getSecondsLoaded():null),gt(this,"getInternalPlayer",(n="player")=>this.player?this.player.getInternalPlayer(n):null),gt(this,"seekTo",(n,a,i)=>{if(!this.player)return null;this.player.seekTo(n,a,i)}),gt(this,"handleReady",()=>{this.props.onReady(this)}),gt(this,"getActivePlayer",(0,Wh.default)(n=>{for(const a of[...Ni,...e])if(a.canPlay(n))return a;return t||null})),gt(this,"getConfig",(0,Wh.default)((n,a)=>{const{config:i}=this.props;return dle.default.all([$i.defaultProps.config,$i.defaultProps.config[a]||{},i,i[a]||{}])})),gt(this,"getAttributes",(0,Wh.default)(n=>(0,cN.omit)(this.props,mle))),gt(this,"renderActivePlayer",n=>{if(!n)return null;const a=this.getActivePlayer(n);if(!a)return null;const i=this.getConfig(n,a.key);return _a.default.createElement(ple.default,{...this.props,key:a.key,ref:this.references.player,config:i,activePlayer:a.lazyPlayer||a,onReady:this.handleReady})})}shouldComponentUpdate(n,a){return!(0,GO.default)(this.props,n)||!(0,GO.default)(this.state,a)}componentDidUpdate(n){const{light:a}=this.props;!n.light&&a&&this.setState({showPreview:!0}),n.light&&!a&&this.setState({showPreview:!1})}renderPreview(n){if(!n)return null;const{light:a,playIcon:i,previewTabIndex:o,oEmbedUrl:s}=this.props;return _a.default.createElement(fle,{url:n,light:a,playIcon:i,previewTabIndex:o,oEmbedUrl:s,onClick:this.handleClickPreview})}render(){const{url:n,style:a,width:i,height:o,fallback:s,wrapper:l}=this.props,{showPreview:c}=this.state,d=this.getAttributes(n),p=typeof l=="string"?this.references.wrapper:void 0;return _a.default.createElement(l,{ref:p,style:{...a,width:i,height:o},...d},_a.default.createElement(ble,{fallback:s},c?this.renderPreview(n):this.renderActivePlayer(n)))}},gt(r,"displayName","ReactPlayer"),gt(r,"propTypes",$i.propTypes),gt(r,"defaultProps",$i.defaultProps),gt(r,"addCustomPlayer",n=>{Ni.push(n)}),gt(r,"removeCustomPlayers",()=>{Ni.length=0}),gt(r,"canPlay",n=>{for(const a of[...Ni,...e])if(a.canPlay(n))return!0;return!1}),gt(r,"canEnablePIP",n=>{for(const a of[...Ni,...e])if(a.canEnablePIP&&a.canEnablePIP(n))return!0;return!1}),r};var vle=Object.create,Bu=Object.defineProperty,Sle=Object.getOwnPropertyDescriptor,Ele=Object.getOwnPropertyNames,xle=Object.getPrototypeOf,wle=Object.prototype.hasOwnProperty,_le=(e,t)=>{for(var r in t)Bu(e,r,{get:t[r],enumerable:!0})},dN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ele(t))!wle.call(e,a)&&a!==r&&Bu(e,a,{get:()=>t[a],enumerable:!(n=Sle(t,a))||n.enumerable});return e},Tle=(e,t,r)=>(r=e!=null?vle(xle(e)):{},dN(t||!e||!e.__esModule?Bu(r,"default",{value:e,enumerable:!0}):r,e)),Ale=e=>dN(Bu({},"__esModule",{value:!0}),e),pN={};_le(pN,{default:()=>Ile});var Ole=Ale(pN),db=Tle(xse),kle=cle;const Rle=db.default[db.default.length-1];var Ile=(0,kle.createReactPlayer)(db.default,Rle);const Nle=pt(Ole),zO=e=>{const t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=Math.floor(e%60),a=t>0?`${t}:`:"",i=t>0?r.toString().padStart(2,"0"):r.toString(),o=n.toString().padStart(2,"0");return`${a}${i}:${o}`},Cle=({isPlaying:e,isFullScreen:t,setIsPlaying:r,playingTime:n,duration:a,handleProgressChange:i,handleVolumeChange:o,onFullScreenClick:s,showToolbar:l})=>{const[c,d]=P.useState(.5),[p,g]=P.useState(!1),[m,b]=P.useState(.5),v=(O,_)=>{const w=Array.isArray(_)?_[0]:_;d(w),o(O,w),p&&g(!1)},S=()=>{p?(d(m),o(new Event("input"),m)):(b(c),d(0),o(new Event("input"),0)),g(!p)};return h.jsxs(F,{children:[(!l||t)&&h.jsx(Fle,{"aria-label":"Small","data-testid":"progress-bar",isFullScreen:t,max:a,onChange:i,size:"small",value:n}),h.jsxs(Dle,{align:"center",direction:"row",showToolbar:l||t,children:[h.jsx(Ple,{onClick:r,size:"small",children:e?h.jsx(Sb,{}):h.jsx(Eb,{})}),h.jsxs(Ble,{direction:"row",children:[h.jsx("span",{children:zO(n)}),h.jsx("span",{className:"separator",children:"/"}),h.jsx("span",{className:"duration",children:zO(a)})]}),h.jsxs($le,{direction:"row",px:9,children:[h.jsx(Wl,{className:"volume-slider",max:1,min:0,onChange:v,size:"small",step:.1,value:c}),h.jsx(Lle,{onClick:S,children:p?h.jsx(Mle,{children:h.jsx(PM,{})}):h.jsx($M,{})})]}),h.jsx(jle,{"data-testid":"fullscreen-button",onClick:s,children:t?h.jsx(FM,{}):h.jsx(jM,{})})]})]})},Dle=B(F)` height: 60px; padding: 12px 16px; ${e=>e.showToolbar&&` diff --git a/build/assets/index-98d70581.js b/build/assets/index-e48d517d.js similarity index 98% rename from build/assets/index-98d70581.js rename to build/assets/index-e48d517d.js index 85fcb57c4..78eb3c705 100644 --- a/build/assets/index-98d70581.js +++ b/build/assets/index-e48d517d.js @@ -1,4 +1,4 @@ -import{r as h,L as Q,M as X,O as F,x as I,S as K,H as Z,j as e,U as J,V as ee,Y as D,ak as gt,P as ne,al as ft,s as c,a as x,T as N,B as W,F as g,e as E,bf as mt,an as se,J as re,u as le,bg as bt,bh as jt,ag as yt,bi as wt,bj as Ve,A as ae,bk as qe,i as we,aZ as _e,a_ as Ne,a$ as ze,bl as Ct,bm as vt,ad as Tt,bn as $t,b as Qe,C as te,bo as St,bd as Xe,bp as Ke,t as Ce,aY as ce,v as ve,bq as kt,aV as _t,aW as Nt,br as de,bs as zt,k as Lt,q as It,a7 as Bt}from"./index-17ed06be.js";import{av as Rt,h as Et,P as Te,aw as je,f as q,ax as Mt,D as At,z as Ft,$ as Ze,ay as Je,az as et,aA as tt,ad as st,aB as Ot,aC as Wt,aD as Ht,aE as Le,aF as Ie,v as Be,aG as ge,aH as Pt,w as Dt}from"./index-2f22123e.js";import{T as Re,s as U,a as ot,S as nt,A as $e,E as Ut,D as Gt,b as rt,Q as at,V as it,c as Yt}from"./constants-fa18afce.js";import{C as z}from"./ClipLoader-96bb9f4d.js";import{I as Vt,A as Se,T as lt}from"./index-9261e06d.js";import{u as B}from"./index-48b3b053.js";import{T as Ee}from"./Typography-5718a5a5.js";import{T as qt,a as Qt}from"./Tabs-fd2a0376.js";import"./Stack-a8b59155.js";import"./createSvgIcon-6ef3ed46.js";import"./TextareaAutosize-f571cf36.js";const Xt=h.createContext(),ct=Xt;function Kt(t){return Q("MuiTable",t)}X("MuiTable",["root","stickyHeader"]);const Zt=["className","component","padding","size","stickyHeader"],Jt=t=>{const{classes:s,stickyHeader:n}=t;return ee({root:["root",n&&"stickyHeader"]},Kt,s)},es=F("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,n.stickyHeader&&s.stickyHeader]}})(({theme:t,ownerState:s})=>I({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":I({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},s.stickyHeader&&{borderCollapse:"separate"})),Me="table",ts=h.forwardRef(function(s,n){const r=K({props:s,name:"MuiTable"}),{className:l,component:i=Me,padding:a="normal",size:o="medium",stickyHeader:d=!1}=r,u=Z(r,Zt),m=I({},r,{component:i,padding:a,size:o,stickyHeader:d}),p=Jt(m),b=h.useMemo(()=>({padding:a,size:o,stickyHeader:d}),[a,o,d]);return e.jsx(ct.Provider,{value:b,children:e.jsx(es,I({as:i,role:i===Me?null:"table",ref:n,className:J(p.root,l),ownerState:m},u))})}),pe=ts,ss=h.createContext(),xe=ss;function os(t){return Q("MuiTableBody",t)}X("MuiTableBody",["root"]);const ns=["className","component"],rs=t=>{const{classes:s}=t;return ee({root:["root"]},os,s)},as=F("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,s)=>s.root})({display:"table-row-group"}),is={variant:"body"},Ae="tbody",ls=h.forwardRef(function(s,n){const r=K({props:s,name:"MuiTableBody"}),{className:l,component:i=Ae}=r,a=Z(r,ns),o=I({},r,{component:i}),d=rs(o);return e.jsx(xe.Provider,{value:is,children:e.jsx(as,I({className:J(d.root,l),as:i,ref:n,role:i===Ae?null:"rowgroup",ownerState:o},a))})}),cs=ls;function ds(t){return Q("MuiTableCell",t)}const ps=X("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),xs=ps,hs=["align","className","component","padding","scope","size","sortDirection","variant"],us=t=>{const{classes:s,variant:n,align:r,padding:l,size:i,stickyHeader:a}=t,o={root:["root",n,a&&"stickyHeader",r!=="inherit"&&`align${D(r)}`,l!=="normal"&&`padding${D(l)}`,`size${D(i)}`]};return ee(o,ds,s)},gs=F("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,s[n.variant],s[`size${D(n.size)}`],n.padding!=="normal"&&s[`padding${D(n.padding)}`],n.align!=="inherit"&&s[`align${D(n.align)}`],n.stickyHeader&&s.stickyHeader]}})(({theme:t,ownerState:s})=>I({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid +import{r as h,L as Q,M as X,O as F,x as I,S as K,H as Z,j as e,U as J,V as ee,Y as D,ak as gt,P as ne,al as ft,s as c,a as x,T as N,B as W,F as g,e as E,bf as mt,an as se,J as re,u as le,bg as bt,bh as jt,ag as yt,bi as wt,bj as Ve,A as ae,bk as qe,i as we,aZ as _e,a_ as Ne,a$ as ze,bl as Ct,bm as vt,ad as Tt,bn as $t,b as Qe,C as te,bo as St,bd as Xe,bp as Ke,t as Ce,aY as ce,v as ve,bq as kt,aV as _t,aW as Nt,br as de,bs as zt,k as Lt,q as It,a7 as Bt}from"./index-787c3ef8.js";import{av as Rt,h as Et,P as Te,aw as je,f as q,ax as Mt,D as At,z as Ft,$ as Ze,ay as Je,az as et,aA as tt,ad as st,aB as Ot,aC as Wt,aD as Ht,aE as Le,aF as Ie,v as Be,aG as ge,aH as Pt,w as Dt}from"./index-77dce891.js";import{T as Re,s as U,a as ot,S as nt,A as $e,E as Ut,D as Gt,b as rt,Q as at,V as it,c as Yt}from"./constants-380035da.js";import{C as z}from"./ClipLoader-0106d300.js";import{I as Vt,A as Se,T as lt}from"./index-efed0068.js";import{u as B}from"./index-798db353.js";import{T as Ee}from"./Typography-02db806b.js";import{T as qt,a as Qt}from"./Tabs-33c59ae4.js";import"./Stack-b3992130.js";import"./createSvgIcon-fa140fa5.js";import"./TextareaAutosize-e216d6db.js";const Xt=h.createContext(),ct=Xt;function Kt(t){return Q("MuiTable",t)}X("MuiTable",["root","stickyHeader"]);const Zt=["className","component","padding","size","stickyHeader"],Jt=t=>{const{classes:s,stickyHeader:n}=t;return ee({root:["root",n&&"stickyHeader"]},Kt,s)},es=F("table",{name:"MuiTable",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,n.stickyHeader&&s.stickyHeader]}})(({theme:t,ownerState:s})=>I({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":I({},t.typography.body2,{padding:t.spacing(2),color:(t.vars||t).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},s.stickyHeader&&{borderCollapse:"separate"})),Me="table",ts=h.forwardRef(function(s,n){const r=K({props:s,name:"MuiTable"}),{className:l,component:i=Me,padding:a="normal",size:o="medium",stickyHeader:d=!1}=r,u=Z(r,Zt),m=I({},r,{component:i,padding:a,size:o,stickyHeader:d}),p=Jt(m),b=h.useMemo(()=>({padding:a,size:o,stickyHeader:d}),[a,o,d]);return e.jsx(ct.Provider,{value:b,children:e.jsx(es,I({as:i,role:i===Me?null:"table",ref:n,className:J(p.root,l),ownerState:m},u))})}),pe=ts,ss=h.createContext(),xe=ss;function os(t){return Q("MuiTableBody",t)}X("MuiTableBody",["root"]);const ns=["className","component"],rs=t=>{const{classes:s}=t;return ee({root:["root"]},os,s)},as=F("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(t,s)=>s.root})({display:"table-row-group"}),is={variant:"body"},Ae="tbody",ls=h.forwardRef(function(s,n){const r=K({props:s,name:"MuiTableBody"}),{className:l,component:i=Ae}=r,a=Z(r,ns),o=I({},r,{component:i}),d=rs(o);return e.jsx(xe.Provider,{value:is,children:e.jsx(as,I({className:J(d.root,l),as:i,ref:n,role:i===Ae?null:"rowgroup",ownerState:o},a))})}),cs=ls;function ds(t){return Q("MuiTableCell",t)}const ps=X("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),xs=ps,hs=["align","className","component","padding","scope","size","sortDirection","variant"],us=t=>{const{classes:s,variant:n,align:r,padding:l,size:i,stickyHeader:a}=t,o={root:["root",n,a&&"stickyHeader",r!=="inherit"&&`align${D(r)}`,l!=="normal"&&`padding${D(l)}`,`size${D(i)}`]};return ee(o,ds,s)},gs=F("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,s[n.variant],s[`size${D(n.size)}`],n.padding!=="normal"&&s[`padding${D(n.padding)}`],n.align!=="inherit"&&s[`align${D(n.align)}`],n.stickyHeader&&s.stickyHeader]}})(({theme:t,ownerState:s})=>I({},t.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:t.vars?`1px solid ${t.vars.palette.TableCell.border}`:`1px solid ${t.palette.mode==="light"?gt(ne(t.palette.divider,1),.88):ft(ne(t.palette.divider,1),.68)}`,textAlign:"left",padding:16},s.variant==="head"&&{color:(t.vars||t).palette.text.primary,lineHeight:t.typography.pxToRem(24),fontWeight:t.typography.fontWeightMedium},s.variant==="body"&&{color:(t.vars||t).palette.text.primary},s.variant==="footer"&&{color:(t.vars||t).palette.text.secondary,lineHeight:t.typography.pxToRem(21),fontSize:t.typography.pxToRem(12)},s.size==="small"&&{padding:"6px 16px",[`&.${xs.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},s.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},s.padding==="none"&&{padding:0},s.align==="left"&&{textAlign:"left"},s.align==="center"&&{textAlign:"center"},s.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},s.align==="justify"&&{textAlign:"justify"},s.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(t.vars||t).palette.background.default})),fs=h.forwardRef(function(s,n){const r=K({props:s,name:"MuiTableCell"}),{align:l="inherit",className:i,component:a,padding:o,scope:d,size:u,sortDirection:m,variant:p}=r,b=Z(r,hs),j=h.useContext(ct),y=h.useContext(xe),C=y&&y.variant==="head";let w;a?w=a:w=C?"th":"td";let $=d;w==="td"?$=void 0:!$&&C&&($="col");const S=p||y&&y.variant,A=I({},r,{align:l,component:w,padding:o||(j&&j.padding?j.padding:"normal"),size:u||(j&&j.size?j.size:"medium"),sortDirection:m,stickyHeader:S==="head"&&j&&j.stickyHeader,variant:S}),O=us(A);let L=null;return m&&(L=m==="asc"?"ascending":"descending"),e.jsx(gs,I({as:w,ref:n,className:J(O.root,i),"aria-sort":L,scope:$,ownerState:A},b))}),ms=fs;function bs(t){return Q("MuiTableHead",t)}X("MuiTableHead",["root"]);const js=["className","component"],ys=t=>{const{classes:s}=t;return ee({root:["root"]},bs,s)},ws=F("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(t,s)=>s.root})({display:"table-header-group"}),Cs={variant:"head"},Fe="thead",vs=h.forwardRef(function(s,n){const r=K({props:s,name:"MuiTableHead"}),{className:l,component:i=Fe}=r,a=Z(r,js),o=I({},r,{component:i}),d=ys(o);return e.jsx(xe.Provider,{value:Cs,children:e.jsx(ws,I({as:i,className:J(d.root,l),ref:n,role:i===Fe?null:"rowgroup",ownerState:o},a))})}),dt=vs;function Ts(t){return Q("MuiTableRow",t)}const $s=X("MuiTableRow",["root","selected","hover","head","footer"]),Oe=$s,Ss=["className","component","hover","selected"],ks=t=>{const{classes:s,selected:n,hover:r,head:l,footer:i}=t;return ee({root:["root",n&&"selected",r&&"hover",l&&"head",i&&"footer"]},Ts,s)},_s=F("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(t,s)=>{const{ownerState:n}=t;return[s.root,n.head&&s.head,n.footer&&s.footer]}})(({theme:t})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${Oe.hover}:hover`]:{backgroundColor:(t.vars||t).palette.action.hover},[`&.${Oe.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:ne(t.palette.primary.main,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:ne(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity)}}})),We="tr",Ns=h.forwardRef(function(s,n){const r=K({props:s,name:"MuiTableRow"}),{className:l,component:i=We,hover:a=!1,selected:o=!1}=r,d=Z(r,Ss),u=h.useContext(xe),m=I({},r,{component:i,hover:a,selected:o,head:u&&u.variant==="head",footer:u&&u.variant==="footer"}),p=ks(m);return e.jsx(_s,I({as:i,ref:n,className:J(p.root,l),role:i===We?null:"row",ownerState:m},d))}),G=Ns;function ye(t){const s=new Date(Number(t)*1e3),n=s.getFullYear(),r=(1+s.getMonth()).toString().padStart(2,"0");return`${s.getDate().toString().padStart(2,"0")}/${r}/${n}`}const f=c(ms)` && { color: ${x.white}; diff --git a/build/assets/index-0796c92a.js b/build/assets/index-ee5b3a5b.js similarity index 98% rename from build/assets/index-0796c92a.js rename to build/assets/index-ee5b3a5b.js index 7a6389984..b9355107d 100644 --- a/build/assets/index-0796c92a.js +++ b/build/assets/index-ee5b3a5b.js @@ -1,4 +1,4 @@ -import{aZ as j,a_ as E,a$ as b,b0 as R,b1 as T,b2 as U,b3 as D,b4 as O,s as p,a as u,b as Z,r as f,j as e,F as r,B as C,aX as J,T as z,b5 as K,aV as X,aW as Q,e as ee,u as te,t as se,aU as ne,N as m,aY as oe,v as re,b6 as ae,ag as ie,b7 as ce,b8 as le,z as de,w as ue,b9 as pe}from"./index-17ed06be.js";import{ad as xe}from"./index-2f22123e.js";import{f as he}from"./index-10fd1675.js";import{C as fe}from"./ClipLoader-96bb9f4d.js";const A=/\b(?:twitter\.com|x\.com)\/(?:@)?([\w_]+)(?:$|\?[^/]*$)/,we=/(https?:\/\/)?(www\.)?youtube\.com\/watch\?v=([A-Za-z0-9_-]+)/,ge=/(https?:\/\/)?(www\.)?youtube\.com\/live\/([A-Za-z0-9_-]+)/,me=/(https?:\/\/)?(www\.)?youtu\.be\/([A-Za-z0-9_-]+)/,ye=/https:\/\/twitter\.com\/i\/spaces\/([A-Za-z0-9_-]+)/,be=/https:\/\/(twitter\.com|x\.com)\/[^/]+\/status\/(\d+)/,je=/(https?:\/\/)?([A-Za-z0-9_-]+)\.mp3/,Se=/(https?:\/\/)?(.*\.)?.+\/(feed|rss|rss\.xml|.*\?(feed|format)=rss)(\/.*)?$/,ve=/https?:\/\/(www\.)?youtube\.com\/(user\/)?(@)?([\w-]+)/,_e=/^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/,Ee=/https:\/\/twitter\.com\/i\/broadcasts\/([A-Za-z0-9_-]+)/,Re=/https:\/\/github\.com\/[\w-]+\/[\w-]+/;async function Ce(t){try{const n=(await fetch(t,{method:"HEAD"})).headers.get("Content-Type");return(n==null?void 0:n.includes("application/rss+xml"))??!1}catch{return!1}}async function ze(t){return[ge,Ee,we,me,ye,je].some(n=>n.test(t))?T:ve.test(t)?E:A.test(t)?j:be.test(t)?U:Se.test(t)?b:Re.test(t)?R:_e.test(t)?await Ce(t)?b:D:O}const $e=(t,s="")=>{const o=(s===j?A:/@(\w+)/).exec(t);return o?o[1]:null},_=t=>!!t&&[j,E,b,R].includes(t),Be=({onClick:t,loading:s,type:n,error:o})=>{const y=Z(i=>i.budget),[a,x]=f.useState(10),d=_(n)?"radar":"add_node";return f.useEffect(()=>{(async()=>{try{const c=await K(d);x(c.data.price)}catch(c){console.error("cannot fetch",c)}})()},[d]),e.jsxs(r,{children:[e.jsx(r,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(r,{align:"center",direction:"row",children:e.jsx(ke,{children:"Approve Cost"})})}),e.jsxs(r,{align:"center",direction:"row",justify:"space-between",mb:20,children:[e.jsxs(Te,{children:[e.jsx("div",{className:"title",children:"COST"}),e.jsxs("div",{className:"value","data-testid":"check-price",children:[a," sats"]})]}),e.jsxs(Ae,{children:[e.jsx("div",{className:"title",children:"BUDGET"}),e.jsxs("div",{className:"value",children:[he(y)," sats"]})]})]}),e.jsx(r,{children:e.jsx(C,{color:"secondary","data-testid":"check-icon",disabled:s||!!o,onClick:t,size:"large",startIcon:s?e.jsx(L,{children:e.jsx(fe,{color:u.lightGray,size:12})}):e.jsxs(L,{children:[" ",e.jsx(xe,{})]}),type:"submit",variant:"contained",children:"Approve"})}),o?e.jsx(Pe,{children:e.jsxs(Ne,{children:[e.jsx(J,{className:"errorIcon"}),e.jsx("span",{children:o})]})}):null]})},Te=p(r).attrs({direction:"column",align:"space-between",justify:"flex-start"})` +import{aZ as j,a_ as E,a$ as b,b0 as R,b1 as T,b2 as U,b3 as D,b4 as O,s as p,a as u,b as Z,r as f,j as e,F as r,B as C,aX as J,T as z,b5 as K,aV as X,aW as Q,e as ee,u as te,t as se,aU as ne,N as m,aY as oe,v as re,b6 as ae,ag as ie,b7 as ce,b8 as le,z as de,w as ue,b9 as pe}from"./index-787c3ef8.js";import{ad as xe}from"./index-77dce891.js";import{f as he}from"./index-cefe14af.js";import{C as fe}from"./ClipLoader-0106d300.js";const A=/\b(?:twitter\.com|x\.com)\/(?:@)?([\w_]+)(?:$|\?[^/]*$)/,we=/(https?:\/\/)?(www\.)?youtube\.com\/watch\?v=([A-Za-z0-9_-]+)/,ge=/(https?:\/\/)?(www\.)?youtube\.com\/live\/([A-Za-z0-9_-]+)/,me=/(https?:\/\/)?(www\.)?youtu\.be\/([A-Za-z0-9_-]+)/,ye=/https:\/\/twitter\.com\/i\/spaces\/([A-Za-z0-9_-]+)/,be=/https:\/\/(twitter\.com|x\.com)\/[^/]+\/status\/(\d+)/,je=/(https?:\/\/)?([A-Za-z0-9_-]+)\.mp3/,Se=/(https?:\/\/)?(.*\.)?.+\/(feed|rss|rss\.xml|.*\?(feed|format)=rss)(\/.*)?$/,ve=/https?:\/\/(www\.)?youtube\.com\/(user\/)?(@)?([\w-]+)/,_e=/^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/,Ee=/https:\/\/twitter\.com\/i\/broadcasts\/([A-Za-z0-9_-]+)/,Re=/https:\/\/github\.com\/[\w-]+\/[\w-]+/;async function Ce(t){try{const n=(await fetch(t,{method:"HEAD"})).headers.get("Content-Type");return(n==null?void 0:n.includes("application/rss+xml"))??!1}catch{return!1}}async function ze(t){return[ge,Ee,we,me,ye,je].some(n=>n.test(t))?T:ve.test(t)?E:A.test(t)?j:be.test(t)?U:Se.test(t)?b:Re.test(t)?R:_e.test(t)?await Ce(t)?b:D:O}const $e=(t,s="")=>{const o=(s===j?A:/@(\w+)/).exec(t);return o?o[1]:null},_=t=>!!t&&[j,E,b,R].includes(t),Be=({onClick:t,loading:s,type:n,error:o})=>{const y=Z(i=>i.budget),[a,x]=f.useState(10),d=_(n)?"radar":"add_node";return f.useEffect(()=>{(async()=>{try{const c=await K(d);x(c.data.price)}catch(c){console.error("cannot fetch",c)}})()},[d]),e.jsxs(r,{children:[e.jsx(r,{align:"center",direction:"row",justify:"space-between",mb:20,children:e.jsx(r,{align:"center",direction:"row",children:e.jsx(ke,{children:"Approve Cost"})})}),e.jsxs(r,{align:"center",direction:"row",justify:"space-between",mb:20,children:[e.jsxs(Te,{children:[e.jsx("div",{className:"title",children:"COST"}),e.jsxs("div",{className:"value","data-testid":"check-price",children:[a," sats"]})]}),e.jsxs(Ae,{children:[e.jsx("div",{className:"title",children:"BUDGET"}),e.jsxs("div",{className:"value",children:[he(y)," sats"]})]})]}),e.jsx(r,{children:e.jsx(C,{color:"secondary","data-testid":"check-icon",disabled:s||!!o,onClick:t,size:"large",startIcon:s?e.jsx(L,{children:e.jsx(fe,{color:u.lightGray,size:12})}):e.jsxs(L,{children:[" ",e.jsx(xe,{})]}),type:"submit",variant:"contained",children:"Approve"})}),o?e.jsx(Pe,{children:e.jsxs(Ne,{children:[e.jsx(J,{className:"errorIcon"}),e.jsx("span",{children:o})]})}):null]})},Te=p(r).attrs({direction:"column",align:"space-between",justify:"flex-start"})` width: 141px; height: 61px; border: 1px solid ${u.GRAY7}; diff --git a/build/assets/index-9261e06d.js b/build/assets/index-efed0068.js similarity index 99% rename from build/assets/index-9261e06d.js rename to build/assets/index-efed0068.js index 592a87af9..f4869004f 100644 --- a/build/assets/index-9261e06d.js +++ b/build/assets/index-efed0068.js @@ -1,4 +1,4 @@ -import{r as u,j as f,bY as kt,bZ as Rt,a2 as xo,a0 as Ot,x as a,L as ye,M as $e,O as w,Y as L,S as Pe,H as ae,U as ne,V as Ie,P as Re,Z as lo,X as Uo,b_ as Lt,b$ as wt,$ as st,c0 as it,bv as ct,bw as dt,aj as Xe,c1 as To,a3 as Mt,am as Ft,s as Tt,a as je,F as At}from"./index-17ed06be.js";import{X as Ho,f as ut,ax as pt,aP as Nt,J as Fo,P as zt,aQ as Dt,Y as Vo,g as Et}from"./index-2f22123e.js";import{a as Ao,u as fo,b as so,f as io,i as ft,c as Bt,P as No,F as jt,S as Wt}from"./Stack-a8b59155.js";import{c as zo}from"./createSvgIcon-6ef3ed46.js";import{T as _t}from"./TextareaAutosize-f571cf36.js";const Ut=e=>{const o=u.useRef({});return u.useEffect(()=>{o.current=e}),o.current},Ht=Ut;function Vt(e){return e==null||Object.keys(e).length===0}function Kt(e){const{styles:o,defaultTheme:t={}}=e,r=typeof o=="function"?s=>o(Vt(s)?t:s):o;return f.jsx(kt,{styles:r})}function qt({styles:e,themeId:o,defaultTheme:t={}}){const r=Rt(t),s=typeof e=="function"?e(o&&r[o]||r):e;return f.jsx(Kt,{styles:s})}const Gt=zo(f.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");function Ko(e){return typeof e.normalize<"u"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function Xt(e={}){const{ignoreAccents:o=!0,ignoreCase:t=!0,limit:r,matchFrom:s="any",stringify:c,trim:d=!1}=e;return(i,{inputValue:b,getOptionLabel:p})=>{let m=d?b.trim():b;t&&(m=m.toLowerCase()),o&&(m=Ko(m));const h=m?i.filter($=>{let v=(c||p)($);return t&&(v=v.toLowerCase()),o&&(v=Ko(v)),s==="start"?v.indexOf(m)===0:v.indexOf(m)>-1}):i;return typeof r=="number"?h.slice(0,r):h}}function wo(e,o){for(let t=0;t{var o;return e.current!==null&&((o=e.current.parentElement)==null?void 0:o.contains(document.activeElement))};function Jt(e){const{unstable_isActiveElementInListbox:o=Zt,unstable_classNamePrefix:t="Mui",autoComplete:r=!1,autoHighlight:s=!1,autoSelect:c=!1,blurOnSelect:d=!1,clearOnBlur:i=!e.freeSolo,clearOnEscape:b=!1,componentName:p="useAutocomplete",defaultValue:m=e.multiple?[]:null,disableClearable:h=!1,disableCloseOnSelect:$=!1,disabled:v,disabledItemsFocusable:R=!1,disableListWrap:M=!1,filterOptions:P=Yt,filterSelectedOptions:O=!1,freeSolo:k=!1,getOptionDisabled:C,getOptionKey:I,getOptionLabel:E=l=>{var n;return(n=l.label)!=null?n:l},groupBy:N,handleHomeEndKeys:F=!e.freeSolo,id:q,includeInputInList:le=!1,inputValue:de,isOptionEqualToValue:oe=(l,n)=>l===n,multiple:T=!1,onChange:J,onClose:G,onHighlightChange:se,onInputChange:Q,onOpen:re,open:U,openOnFocus:A=!1,options:ie,readOnly:Se=!1,selectOnFocus:we=!e.freeSolo,value:ue}=e,W=Ao(q);let ee=E;ee=l=>{const n=E(l);return typeof n!="string"?String(n):n};const fe=u.useRef(!1),We=u.useRef(!0),Z=u.useRef(null),be=u.useRef(null),[Me,Y]=u.useState(null),[H,ze]=u.useState(-1),_e=s?0:-1,te=u.useRef(_e),[S,to]=fo({controlled:ue,default:m,name:p}),[_,xe]=fo({controlled:de,default:"",name:p,state:"inputValue"}),[Fe,ce]=u.useState(!1),Te=u.useCallback((l,n)=>{if(!(T?S.length!(O&&(T?S:[S]).some(n=>n!==null&&oe(l,n)))),{inputValue:Ee&&Ye?"":_,getOptionLabel:ee}):[],he=Ht({filteredOptions:j,value:S,inputValue:_});u.useEffect(()=>{const l=S!==he.value;Fe&&!l||k&&!l||Te(null,S)},[S,Te,Fe,he.value,k]);const Ke=me&&j.length>0&&!Se,qe=xo(l=>{l===-1?Z.current.focus():Me.querySelector(`[data-tag-index="${l}"]`).focus()});u.useEffect(()=>{T&&H>S.length-1&&(ze(-1),qe(-1))},[S,T,H,qe]);function y(l,n){if(!be.current||l<0||l>=j.length)return-1;let g=l;for(;;){const x=be.current.querySelector(`[data-option-index="${g}"]`),K=R?!1:!x||x.disabled||x.getAttribute("aria-disabled")==="true";if(x&&x.hasAttribute("tabindex")&&!K)return g;if(n==="next"?g=(g+1)%j.length:g=(g-1+j.length)%j.length,g===l)return-1}}const B=xo(({event:l,index:n,reason:g="auto"})=>{if(te.current=n,n===-1?Z.current.removeAttribute("aria-activedescendant"):Z.current.setAttribute("aria-activedescendant",`${W}-option-${n}`),se&&se(l,n===-1?null:j[n],g),!be.current)return;const x=be.current.querySelector(`[role="option"].${t}-focused`);x&&(x.classList.remove(`${t}-focused`),x.classList.remove(`${t}-focusVisible`));let K=be.current;if(be.current.getAttribute("role")!=="listbox"&&(K=be.current.parentElement.querySelector('[role="listbox"]')),!K)return;if(n===-1){K.scrollTop=0;return}const pe=be.current.querySelector(`[data-option-index="${n}"]`);if(pe&&(pe.classList.add(`${t}-focused`),g==="keyboard"&&pe.classList.add(`${t}-focusVisible`),K.scrollHeight>K.clientHeight&&g!=="mouse"&&g!=="touch")){const ge=pe,He=K.clientHeight+K.scrollTop,_o=ge.offsetTop+ge.offsetHeight;_o>He?K.scrollTop=_o-K.clientHeight:ge.offsetTop-ge.offsetHeight*(N?1.3:0){if(!z)return;const pe=y((()=>{const ge=j.length-1;if(n==="reset")return _e;if(n==="start")return 0;if(n==="end")return ge;const He=te.current+n;return He<0?He===-1&&le?-1:M&&te.current!==-1||Math.abs(n)>1?0:ge:He>ge?He===ge+1&&le?-1:M||Math.abs(n)>1?ge:0:He})(),g);if(B({index:pe,reason:x,event:l}),r&&n!=="reset")if(pe===-1)Z.current.value=_;else{const ge=ee(j[pe]);Z.current.value=ge,ge.toLowerCase().indexOf(_.toLowerCase())===0&&_.length>0&&Z.current.setSelectionRange(_.length,ge.length)}}),ke=()=>{const l=(n,g)=>{const x=n?ee(n):"",K=g?ee(g):"";return x===K};if(te.current!==-1&&he.filteredOptions&&he.filteredOptions.length!==j.length&&he.inputValue===_&&(T?S.length===he.value.length&&he.value.every((n,g)=>ee(S[g])===ee(n)):l(he.value,S))){const n=he.filteredOptions[te.current];if(n&&j.some(x=>ee(x)===ee(n)))return!0}return!1},Ze=u.useCallback(()=>{if(!z||ke())return;const l=T?S[0]:S;if(j.length===0||l==null){X({diff:"reset"});return}if(be.current){if(l!=null){const n=j[te.current];if(T&&n&&wo(S,x=>oe(n,x))!==-1)return;const g=wo(j,x=>oe(x,l));g===-1?X({diff:"reset"}):B({index:g});return}if(te.current>=j.length-1){B({index:j.length-1});return}B({index:te.current})}},[j.length,T?!1:S,O,X,B,z,_,T]),Po=xo(l=>{Ot(be,l),l&&Ze()});u.useEffect(()=>{Ze()},[Ze]);const Ne=l=>{me||(Ae(!0),De(!0),re&&re(l))},Ge=(l,n)=>{me&&(Ae(!1),G&&G(l,n))},Ue=(l,n,g,x)=>{if(T){if(S.length===n.length&&S.every((K,pe)=>K===n[pe]))return}else if(S===n)return;J&&J(l,n,g,x),to(n)},no=u.useRef(!1),eo=(l,n,g="selectOption",x="options")=>{let K=g,pe=n;if(T){pe=Array.isArray(S)?S.slice():[];const ge=wo(pe,He=>oe(n,He));ge===-1?pe.push(n):x!=="freeSolo"&&(pe.splice(ge,1),K="removeOption")}Te(l,pe),Ue(l,pe,K,{option:n}),!$&&(!l||!l.ctrlKey&&!l.metaKey)&&Ge(l,K),(d===!0||d==="touch"&&no.current||d==="mouse"&&!no.current)&&Z.current.blur()};function go(l,n){if(l===-1)return-1;let g=l;for(;;){if(n==="next"&&g===S.length||n==="previous"&&g===-1)return-1;const x=Me.querySelector(`[data-tag-index="${g}"]`);if(!x||!x.hasAttribute("tabindex")||x.disabled||x.getAttribute("aria-disabled")==="true")g+=n==="next"?1:-1;else return g}}const mo=(l,n)=>{if(!T)return;_===""&&Ge(l,"toggleInput");let g=H;H===-1?_===""&&n==="previous"&&(g=S.length-1):(g+=n==="next"?1:-1,g<0&&(g=0),g===S.length&&(g=-1)),g=go(g,n),ze(g),qe(g)},ho=l=>{fe.current=!0,xe(""),Q&&Q(l,"","clear"),Ue(l,T?[]:null,"clear")},ko=l=>n=>{if(l.onKeyDown&&l.onKeyDown(n),!n.defaultMuiPrevented&&(H!==-1&&["ArrowLeft","ArrowRight"].indexOf(n.key)===-1&&(ze(-1),qe(-1)),n.which!==229))switch(n.key){case"Home":z&&F&&(n.preventDefault(),X({diff:"start",direction:"next",reason:"keyboard",event:n}));break;case"End":z&&F&&(n.preventDefault(),X({diff:"end",direction:"previous",reason:"keyboard",event:n}));break;case"PageUp":n.preventDefault(),X({diff:-qo,direction:"previous",reason:"keyboard",event:n}),Ne(n);break;case"PageDown":n.preventDefault(),X({diff:qo,direction:"next",reason:"keyboard",event:n}),Ne(n);break;case"ArrowDown":n.preventDefault(),X({diff:1,direction:"next",reason:"keyboard",event:n}),Ne(n);break;case"ArrowUp":n.preventDefault(),X({diff:-1,direction:"previous",reason:"keyboard",event:n}),Ne(n);break;case"ArrowLeft":mo(n,"previous");break;case"ArrowRight":mo(n,"next");break;case"Enter":if(te.current!==-1&&z){const g=j[te.current],x=C?C(g):!1;if(n.preventDefault(),x)return;eo(n,g,"selectOption"),r&&Z.current.setSelectionRange(Z.current.value.length,Z.current.value.length)}else k&&_!==""&&Ee===!1&&(T&&n.preventDefault(),eo(n,_,"createOption","freeSolo"));break;case"Escape":z?(n.preventDefault(),n.stopPropagation(),Ge(n,"escape")):b&&(_!==""||T&&S.length>0)&&(n.preventDefault(),n.stopPropagation(),ho(n));break;case"Backspace":if(T&&!Se&&_===""&&S.length>0){const g=H===-1?S.length-1:H,x=S.slice();x.splice(g,1),Ue(n,x,"removeOption",{option:S[g]})}break;case"Delete":if(T&&!Se&&_===""&&S.length>0&&H!==-1){const g=H,x=S.slice();x.splice(g,1),Ue(n,x,"removeOption",{option:S[g]})}break}},jo=l=>{ce(!0),A&&!fe.current&&Ne(l)},ro=l=>{if(o(be)){Z.current.focus();return}ce(!1),We.current=!0,fe.current=!1,c&&te.current!==-1&&z?eo(l,j[te.current],"blur"):c&&k&&_!==""?eo(l,_,"blur","freeSolo"):i&&Te(l,S),Ge(l,"blur")},Ce=l=>{const n=l.target.value;_!==n&&(xe(n),De(!1),Q&&Q(l,n,"input")),n===""?!h&&!T&&Ue(l,null,"clear"):Ne(l)},ve=l=>{const n=Number(l.currentTarget.getAttribute("data-option-index"));te.current!==n&&B({event:l,index:n,reason:"mouse"})},Be=l=>{B({event:l,index:Number(l.currentTarget.getAttribute("data-option-index")),reason:"touch"}),no.current=!0},Wo=l=>{const n=Number(l.currentTarget.getAttribute("data-option-index"));eo(l,j[n],"selectOption"),no.current=!1},Ro=l=>n=>{const g=S.slice();g.splice(l,1),Ue(n,g,"removeOption",{option:S[l]})},Oo=l=>{me?Ge(l,"toggleInput"):Ne(l)},Lo=l=>{l.currentTarget.contains(l.target)&&l.target.getAttribute("id")!==W&&l.preventDefault()},vo=l=>{l.currentTarget.contains(l.target)&&(Z.current.focus(),we&&We.current&&Z.current.selectionEnd-Z.current.selectionStart===0&&Z.current.select(),We.current=!1)},co=l=>{!v&&(_===""||!me)&&Oo(l)};let oo=k&&_.length>0;oo=oo||(T?S.length>0:S!==null);let ao=j;return N&&(ao=j.reduce((l,n,g)=>{const x=N(n);return l.length>0&&l[l.length-1].group===x?l[l.length-1].options.push(n):l.push({key:g,index:g,group:x,options:[n]}),l},[])),v&&Fe&&ro(),{getRootProps:(l={})=>a({"aria-owns":Ke?`${W}-listbox`:null},l,{onKeyDown:ko(l),onMouseDown:Lo,onClick:vo}),getInputLabelProps:()=>({id:`${W}-label`,htmlFor:W}),getInputProps:()=>({id:W,value:_,onBlur:ro,onFocus:jo,onChange:Ce,onMouseDown:co,"aria-activedescendant":z?"":null,"aria-autocomplete":r?"both":"list","aria-controls":Ke?`${W}-listbox`:void 0,"aria-expanded":Ke,autoComplete:"off",ref:Z,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:v}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:ho}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Oo}),getTagProps:({index:l})=>a({key:l,"data-tag-index":l,tabIndex:-1},!Se&&{onDelete:Ro(l)}),getListboxProps:()=>({role:"listbox",id:`${W}-listbox`,"aria-labelledby":`${W}-label`,ref:Po,onMouseDown:l=>{l.preventDefault()}}),getOptionProps:({index:l,option:n})=>{var g;const x=(T?S:[S]).some(pe=>pe!=null&&oe(n,pe)),K=C?C(n):!1;return{key:(g=I==null?void 0:I(n))!=null?g:ee(n),tabIndex:-1,role:"option",id:`${W}-option-${l}`,onMouseMove:ve,onClick:Wo,onTouchStart:Be,"data-option-index":l,"aria-disabled":K,"aria-selected":x}},id:W,inputValue:_,value:S,dirty:oo,expanded:z&&Me,popupOpen:z,focused:Fe||H!==-1,anchorEl:Me,setAnchorEl:Y,focusedTag:H,groupedOptions:ao}}function Qt(e){return ye("MuiListSubheader",e)}$e("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const en=["className","color","component","disableGutters","disableSticky","inset"],on=e=>{const{classes:o,color:t,disableGutters:r,inset:s,disableSticky:c}=e,d={root:["root",t!=="default"&&`color${L(t)}`,!r&&"gutters",s&&"inset",!c&&"sticky"]};return Ie(d,Qt,o)},tn=w("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.color!=="default"&&o[`color${L(t.color)}`],!t.disableGutters&&o.gutters,t.inset&&o.inset,!t.disableSticky&&o.sticky]}})(({theme:e,ownerState:o})=>a({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},o.color==="primary"&&{color:(e.vars||e).palette.primary.main},o.color==="inherit"&&{color:"inherit"},!o.disableGutters&&{paddingLeft:16,paddingRight:16},o.inset&&{paddingLeft:72},!o.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),bt=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiListSubheader"}),{className:s,color:c="default",component:d="li",disableGutters:i=!1,disableSticky:b=!1,inset:p=!1}=r,m=ae(r,en),h=a({},r,{color:c,component:d,disableGutters:i,disableSticky:b,inset:p}),$=on(h);return f.jsx(tn,a({as:d,className:ne($.root,s),ref:t,ownerState:h},m))});bt.muiSkipListHighlight=!0;const nn=bt,rn=zo(f.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function an(e){return ye("MuiChip",e)}const ln=$e("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),V=ln,sn=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],cn=e=>{const{classes:o,disabled:t,size:r,color:s,iconColor:c,onDelete:d,clickable:i,variant:b}=e,p={root:["root",b,t&&"disabled",`size${L(r)}`,`color${L(s)}`,i&&"clickable",i&&`clickableColor${L(s)}`,d&&"deletable",d&&`deletableColor${L(s)}`,`${b}${L(s)}`],label:["label",`label${L(r)}`],avatar:["avatar",`avatar${L(r)}`,`avatarColor${L(s)}`],icon:["icon",`icon${L(r)}`,`iconColor${L(c)}`],deleteIcon:["deleteIcon",`deleteIcon${L(r)}`,`deleteIconColor${L(s)}`,`deleteIcon${L(b)}Color${L(s)}`]};return Ie(p,an,o)},dn=w("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e,{color:r,iconColor:s,clickable:c,onDelete:d,size:i,variant:b}=t;return[{[`& .${V.avatar}`]:o.avatar},{[`& .${V.avatar}`]:o[`avatar${L(i)}`]},{[`& .${V.avatar}`]:o[`avatarColor${L(r)}`]},{[`& .${V.icon}`]:o.icon},{[`& .${V.icon}`]:o[`icon${L(i)}`]},{[`& .${V.icon}`]:o[`iconColor${L(s)}`]},{[`& .${V.deleteIcon}`]:o.deleteIcon},{[`& .${V.deleteIcon}`]:o[`deleteIcon${L(i)}`]},{[`& .${V.deleteIcon}`]:o[`deleteIconColor${L(r)}`]},{[`& .${V.deleteIcon}`]:o[`deleteIcon${L(b)}Color${L(r)}`]},o.root,o[`size${L(i)}`],o[`color${L(r)}`],c&&o.clickable,c&&r!=="default"&&o[`clickableColor${L(r)})`],d&&o.deletable,d&&r!=="default"&&o[`deletableColor${L(r)}`],o[b],o[`${b}${L(r)}`]]}})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return a({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${V.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${V.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${V.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${V.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${V.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${V.icon}`]:a({marginLeft:5,marginRight:-6},o.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},o.iconColor===o.color&&a({color:e.vars?e.vars.palette.Chip.defaultIconColor:t},o.color!=="default"&&{color:"inherit"})),[`& .${V.deleteIcon}`]:a({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:Re(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:Re(e.palette.text.primary,.4)}},o.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},o.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[o.color].contrastTextChannel} / 0.7)`:Re(e.palette[o.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[o.color].contrastText}})},o.size==="small"&&{height:24},o.color!=="default"&&{backgroundColor:(e.vars||e).palette[o.color].main,color:(e.vars||e).palette[o.color].contrastText},o.onDelete&&{[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},o.onDelete&&o.color!=="default"&&{[`&.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette[o.color].dark}})},({theme:e,ownerState:o})=>a({},o.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},o.clickable&&o.color!=="default"&&{[`&:hover, &.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette[o.color].dark}}),({theme:e,ownerState:o})=>a({},o.variant==="outlined"&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${V.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${V.avatar}`]:{marginLeft:4},[`& .${V.avatarSmall}`]:{marginLeft:2},[`& .${V.icon}`]:{marginLeft:4},[`& .${V.iconSmall}`]:{marginLeft:2},[`& .${V.deleteIcon}`]:{marginRight:5},[`& .${V.deleteIconSmall}`]:{marginRight:3}},o.variant==="outlined"&&o.color!=="default"&&{color:(e.vars||e).palette[o.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / 0.7)`:Re(e.palette[o.color].main,.7)}`,[`&.${V.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Re(e.palette[o.color].main,e.palette.action.hoverOpacity)},[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Re(e.palette[o.color].main,e.palette.action.focusOpacity)},[`& .${V.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / 0.7)`:Re(e.palette[o.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[o.color].main}}})),un=w("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,o)=>{const{ownerState:t}=e,{size:r}=t;return[o.label,o[`label${L(r)}`]]}})(({ownerState:e})=>a({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.variant==="outlined"&&{paddingLeft:11,paddingRight:11},e.size==="small"&&{paddingLeft:8,paddingRight:8},e.size==="small"&&e.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function Go(e){return e.key==="Backspace"||e.key==="Delete"}const pn=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiChip"}),{avatar:s,className:c,clickable:d,color:i="default",component:b,deleteIcon:p,disabled:m=!1,icon:h,label:$,onClick:v,onDelete:R,onKeyDown:M,onKeyUp:P,size:O="medium",variant:k="filled",tabIndex:C,skipFocusWhenDisabled:I=!1}=r,E=ae(r,sn),N=u.useRef(null),F=lo(N,t),q=A=>{A.stopPropagation(),R&&R(A)},le=A=>{A.currentTarget===A.target&&Go(A)&&A.preventDefault(),M&&M(A)},de=A=>{A.currentTarget===A.target&&(R&&Go(A)?R(A):A.key==="Escape"&&N.current&&N.current.blur()),P&&P(A)},oe=d!==!1&&v?!0:d,T=oe||R?Uo:b||"div",J=a({},r,{component:T,disabled:m,size:O,color:i,iconColor:u.isValidElement(h)&&h.props.color||i,onDelete:!!R,clickable:oe,variant:k}),G=cn(J),se=T===Uo?a({component:b||"div",focusVisibleClassName:G.focusVisible},R&&{disableRipple:!0}):{};let Q=null;R&&(Q=p&&u.isValidElement(p)?u.cloneElement(p,{className:ne(p.props.className,G.deleteIcon),onClick:q}):f.jsx(rn,{className:ne(G.deleteIcon),onClick:q}));let re=null;s&&u.isValidElement(s)&&(re=u.cloneElement(s,{className:ne(G.avatar,s.props.className)}));let U=null;return h&&u.isValidElement(h)&&(U=u.cloneElement(h,{className:ne(G.icon,h.props.className)})),f.jsxs(dn,a({as:T,className:ne(G.root,c),disabled:oe&&m?!0:void 0,onClick:v,onKeyDown:le,onKeyUp:de,ref:F,tabIndex:I&&m?-1:C,ownerState:J},se,E,{children:[re||U,f.jsx(un,{className:ne(G.label),ownerState:J,children:$}),Q]}))}),fn=pn;function bn(e){return f.jsx(qt,a({},e,{defaultTheme:Lt,themeId:wt}))}function gn(e){return ye("MuiInputBase",e)}const mn=$e("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Oe=mn,hn=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Co=(e,o)=>{const{ownerState:t}=e;return[o.root,t.formControl&&o.formControl,t.startAdornment&&o.adornedStart,t.endAdornment&&o.adornedEnd,t.error&&o.error,t.size==="small"&&o.sizeSmall,t.multiline&&o.multiline,t.color&&o[`color${L(t.color)}`],t.fullWidth&&o.fullWidth,t.hiddenLabel&&o.hiddenLabel]},yo=(e,o)=>{const{ownerState:t}=e;return[o.input,t.size==="small"&&o.inputSizeSmall,t.multiline&&o.inputMultiline,t.type==="search"&&o.inputTypeSearch,t.startAdornment&&o.inputAdornedStart,t.endAdornment&&o.inputAdornedEnd,t.hiddenLabel&&o.inputHiddenLabel]},vn=e=>{const{classes:o,color:t,disabled:r,error:s,endAdornment:c,focused:d,formControl:i,fullWidth:b,hiddenLabel:p,multiline:m,readOnly:h,size:$,startAdornment:v,type:R}=e,M={root:["root",`color${L(t)}`,r&&"disabled",s&&"error",b&&"fullWidth",d&&"focused",i&&"formControl",$&&$!=="medium"&&`size${L($)}`,m&&"multiline",v&&"adornedStart",c&&"adornedEnd",p&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",R==="search"&&"inputTypeSearch",m&&"inputMultiline",$==="small"&&"inputSizeSmall",p&&"inputHiddenLabel",v&&"inputAdornedStart",c&&"inputAdornedEnd",h&&"readOnly"]};return Ie(M,gn,o)},$o=w("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Co})(({theme:e,ownerState:o})=>a({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Oe.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},o.multiline&&a({padding:"4px 0 5px"},o.size==="small"&&{paddingTop:1}),o.fullWidth&&{width:"100%"})),Io=w("input",{name:"MuiInputBase",slot:"Input",overridesResolver:yo})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light",r=a({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),s={opacity:"0 !important"},c=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return a({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Oe.formControl} &`]:{"&::-webkit-input-placeholder":s,"&::-moz-placeholder":s,"&:-ms-input-placeholder":s,"&::-ms-input-placeholder":s,"&:focus::-webkit-input-placeholder":c,"&:focus::-moz-placeholder":c,"&:focus:-ms-input-placeholder":c,"&:focus::-ms-input-placeholder":c},[`&.${Oe.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},o.size==="small"&&{paddingTop:1},o.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},o.type==="search"&&{MozAppearance:"textfield"})}),xn=f.jsx(bn,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Cn=u.forwardRef(function(o,t){var r;const s=Pe({props:o,name:"MuiInputBase"}),{"aria-describedby":c,autoComplete:d,autoFocus:i,className:b,components:p={},componentsProps:m={},defaultValue:h,disabled:$,disableInjectingGlobalStyles:v,endAdornment:R,fullWidth:M=!1,id:P,inputComponent:O="input",inputProps:k={},inputRef:C,maxRows:I,minRows:E,multiline:N=!1,name:F,onBlur:q,onChange:le,onClick:de,onFocus:oe,onKeyDown:T,onKeyUp:J,placeholder:G,readOnly:se,renderSuffix:Q,rows:re,slotProps:U={},slots:A={},startAdornment:ie,type:Se="text",value:we}=s,ue=ae(s,hn),W=k.value!=null?k.value:we,{current:ee}=u.useRef(W!=null),fe=u.useRef(),We=u.useCallback(z=>{},[]),Z=lo(fe,C,k.ref,We),[be,Me]=u.useState(!1),Y=so(),H=io({props:s,muiFormControl:Y,states:["color","disabled","error","hiddenLabel","size","required","filled"]});H.focused=Y?Y.focused:be,u.useEffect(()=>{!Y&&$&&be&&(Me(!1),q&&q())},[Y,$,be,q]);const ze=Y&&Y.onFilled,_e=Y&&Y.onEmpty,te=u.useCallback(z=>{ft(z)?ze&&ze():_e&&_e()},[ze,_e]);st(()=>{ee&&te({value:W})},[W,te,ee]);const S=z=>{if(H.disabled){z.stopPropagation();return}oe&&oe(z),k.onFocus&&k.onFocus(z),Y&&Y.onFocus?Y.onFocus(z):Me(!0)},to=z=>{q&&q(z),k.onBlur&&k.onBlur(z),Y&&Y.onBlur?Y.onBlur(z):Me(!1)},_=(z,...j)=>{if(!ee){const he=z.target||fe.current;if(he==null)throw new Error(it(1));te({value:he.value})}k.onChange&&k.onChange(z,...j),le&&le(z,...j)};u.useEffect(()=>{te(fe.current)},[]);const xe=z=>{fe.current&&z.currentTarget===z.target&&fe.current.focus(),de&&de(z)};let Fe=O,ce=k;N&&Fe==="input"&&(re?ce=a({type:void 0,minRows:re,maxRows:re},ce):ce=a({type:void 0,maxRows:I,minRows:E},ce),Fe=_t);const Te=z=>{te(z.animationName==="mui-auto-fill-cancel"?fe.current:{value:"x"})};u.useEffect(()=>{Y&&Y.setAdornedStart(!!ie)},[Y,ie]);const me=a({},s,{color:H.color||"primary",disabled:H.disabled,endAdornment:R,error:H.error,focused:H.focused,formControl:Y,fullWidth:M,hiddenLabel:H.hiddenLabel,multiline:N,size:H.size,startAdornment:ie,type:Se}),Ae=vn(me),Ye=A.root||p.Root||$o,De=U.root||m.root||{},Ee=A.input||p.Input||Io;return ce=a({},ce,(r=U.input)!=null?r:m.input),f.jsxs(u.Fragment,{children:[!v&&xn,f.jsxs(Ye,a({},De,!Ho(Ye)&&{ownerState:a({},me,De.ownerState)},{ref:t,onClick:xe},ue,{className:ne(Ae.root,De.className,b,se&&"MuiInputBase-readOnly"),children:[ie,f.jsx(Bt.Provider,{value:null,children:f.jsx(Ee,a({ownerState:me,"aria-invalid":H.error,"aria-describedby":c,autoComplete:d,autoFocus:i,defaultValue:h,disabled:H.disabled,id:P,onAnimationStart:Te,name:F,placeholder:G,readOnly:se,required:H.required,rows:re,value:W,onKeyDown:T,onKeyUp:J,type:Se},ce,!Ho(Ee)&&{as:Fe,ownerState:a({},me,ce.ownerState)},{ref:Z,className:ne(Ae.input,ce.className,se&&"MuiInputBase-readOnly"),onBlur:to,onChange:_,onFocus:S}))}),R,Q?Q(a({},H,{startAdornment:ie})):null]}))]})}),Do=Cn;function yn(e){return ye("MuiInput",e)}const $n=a({},Oe,$e("MuiInput",["root","underline","input"])),Qe=$n;function In(e){return ye("MuiOutlinedInput",e)}const Sn=a({},Oe,$e("MuiOutlinedInput",["root","notchedOutline","input"])),Ve=Sn;function Pn(e){return ye("MuiFilledInput",e)}const kn=a({},Oe,$e("MuiFilledInput",["root","underline","input"])),Le=kn,gt=zo(f.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Rn(e){return ye("MuiAutocomplete",e)}const On=$e("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]),D=On;var Xo,Yo;const Ln=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],wn=["ref"],Mn=["key"],Fn=e=>{const{classes:o,disablePortal:t,expanded:r,focused:s,fullWidth:c,hasClearIcon:d,hasPopupIcon:i,inputFocused:b,popupOpen:p,size:m}=e,h={root:["root",r&&"expanded",s&&"focused",c&&"fullWidth",d&&"hasClearIcon",i&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",b&&"inputFocused"],tag:["tag",`tagSize${L(m)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",p&&"popupIndicatorOpen"],popper:["popper",t&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Ie(h,Rn,o)},Tn=w("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e,{fullWidth:r,hasClearIcon:s,hasPopupIcon:c,inputFocused:d,size:i}=t;return[{[`& .${D.tag}`]:o.tag},{[`& .${D.tag}`]:o[`tagSize${L(i)}`]},{[`& .${D.inputRoot}`]:o.inputRoot},{[`& .${D.input}`]:o.input},{[`& .${D.input}`]:d&&o.inputFocused},o.root,r&&o.fullWidth,c&&o.hasPopupIcon,s&&o.hasClearIcon]}})(({ownerState:e})=>a({[`&.${D.focused} .${D.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${D.clearIndicator}`]:{visibility:"visible"}}},e.fullWidth&&{width:"100%"},{[`& .${D.tag}`]:a({margin:3,maxWidth:"calc(100% - 6px)"},e.size==="small"&&{margin:2,maxWidth:"calc(100% - 4px)"}),[`& .${D.inputRoot}`]:{flexWrap:"wrap",[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4},[`& .${D.input}`]:{width:0,minWidth:30}},[`& .${Qe.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Qe.root}.${Oe.sizeSmall}`]:{[`& .${Qe.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Ve.root}`]:{padding:9,[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${D.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${D.endAdornment}`]:{right:9}},[`& .${Ve.root}.${Oe.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${D.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Le.root}`]:{paddingTop:19,paddingLeft:8,[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${Le.input}`]:{padding:"7px 4px"},[`& .${D.endAdornment}`]:{right:9}},[`& .${Le.root}.${Oe.sizeSmall}`]:{paddingBottom:1,[`& .${Le.input}`]:{padding:"2.5px 4px"}},[`& .${Oe.hiddenLabel}`]:{paddingTop:8},[`& .${Le.root}.${Oe.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${D.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Le.root}.${Oe.hiddenLabel}.${Oe.sizeSmall}`]:{[`& .${D.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${D.input}`]:a({flexGrow:1,textOverflow:"ellipsis",opacity:0},e.inputFocused&&{opacity:1})})),An=w("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,o)=>o.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),Nn=w(ut,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,o)=>o.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),zn=w(ut,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},o)=>a({},o.popupIndicator,e.popupOpen&&o.popupIndicatorOpen)})(({ownerState:e})=>a({padding:2,marginRight:-2},e.popupOpen&&{transform:"rotate(180deg)"})),Dn=w(No,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[{[`& .${D.option}`]:o.option},o.popper,t.disablePortal&&o.popperDisablePortal]}})(({theme:e,ownerState:o})=>a({zIndex:(e.vars||e).zIndex.modal},o.disablePortal&&{position:"absolute"})),En=w(pt,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,o)=>o.paper})(({theme:e})=>a({},e.typography.body1,{overflow:"auto"})),Bn=w("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,o)=>o.loading})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),jn=w("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,o)=>o.noOptions})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),Wn=w("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,o)=>o.listbox})(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${D.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${D.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${D.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Re(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${D.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Re(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${D.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}})),_n=w(nn,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,o)=>o.groupLabel})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})),Un=w("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,o)=>o.groupUl})({padding:0,[`& .${D.option}`]:{paddingLeft:24}}),Hn=u.forwardRef(function(o,t){var r,s,c,d;const i=Pe({props:o,name:"MuiAutocomplete"}),{autoComplete:b=!1,autoHighlight:p=!1,autoSelect:m=!1,blurOnSelect:h=!1,ChipProps:$,className:v,clearIcon:R=Xo||(Xo=f.jsx(Gt,{fontSize:"small"})),clearOnBlur:M=!i.freeSolo,clearOnEscape:P=!1,clearText:O="Clear",closeText:k="Close",componentsProps:C={},defaultValue:I=i.multiple?[]:null,disableClearable:E=!1,disableCloseOnSelect:N=!1,disabled:F=!1,disabledItemsFocusable:q=!1,disableListWrap:le=!1,disablePortal:de=!1,filterSelectedOptions:oe=!1,forcePopupIcon:T="auto",freeSolo:J=!1,fullWidth:G=!1,getLimitTagsText:se=n=>`+${n}`,getOptionLabel:Q,groupBy:re,handleHomeEndKeys:U=!i.freeSolo,includeInputInList:A=!1,limitTags:ie=-1,ListboxComponent:Se="ul",ListboxProps:we,loading:ue=!1,loadingText:W="Loading…",multiple:ee=!1,noOptionsText:fe="No options",openOnFocus:We=!1,openText:Z="Open",PaperComponent:be=pt,PopperComponent:Me=No,popupIcon:Y=Yo||(Yo=f.jsx(gt,{})),readOnly:H=!1,renderGroup:ze,renderInput:_e,renderOption:te,renderTags:S,selectOnFocus:to=!i.freeSolo,size:_="medium",slotProps:xe={}}=i,Fe=ae(i,Ln),{getRootProps:ce,getInputProps:Te,getInputLabelProps:me,getPopupIndicatorProps:Ae,getClearProps:Ye,getTagProps:De,getListboxProps:Ee,getOptionProps:z,value:j,dirty:he,expanded:Ke,id:qe,popupOpen:y,focused:B,focusedTag:X,anchorEl:ke,setAnchorEl:Ze,inputValue:Po,groupedOptions:Ne}=Jt(a({},i,{componentName:"Autocomplete"})),Ge=!E&&!F&&he&&!H,Ue=(!J||T===!0)&&T!==!1,{onMouseDown:no}=Te(),{ref:eo}=we??{},go=Ee(),{ref:mo}=go,ho=ae(go,wn),ko=lo(mo,eo),ro=Q||(n=>{var g;return(g=n.label)!=null?g:n}),Ce=a({},i,{disablePortal:de,expanded:Ke,focused:B,fullWidth:G,getOptionLabel:ro,hasClearIcon:Ge,hasPopupIcon:Ue,inputFocused:X===-1,popupOpen:y,size:_}),ve=Fn(Ce);let Be;if(ee&&j.length>0){const n=g=>a({className:ve.tag,disabled:F},De(g));S?Be=S(j,n,Ce):Be=j.map((g,x)=>f.jsx(fn,a({label:ro(g),size:_},n({index:x}),$)))}if(ie>-1&&Array.isArray(Be)){const n=Be.length-ie;!B&&n>0&&(Be=Be.splice(0,ie),Be.push(f.jsx("span",{className:ve.tag,children:se(n)},Be.length)))}const Ro=ze||(n=>f.jsxs("li",{children:[f.jsx(_n,{className:ve.groupLabel,ownerState:Ce,component:"div",children:n.group}),f.jsx(Un,{className:ve.groupUl,ownerState:Ce,children:n.children})]},n.key)),Lo=te||((n,g)=>{const{key:x}=n,K=ae(n,Mn);return f.jsx("li",a({},K,{children:ro(g)}),x)}),vo=(n,g)=>{const x=z({option:n,index:g});return Lo(a({},x,{className:ve.option}),n,{selected:x["aria-selected"],index:g,inputValue:Po},Ce)},co=(r=xe.clearIndicator)!=null?r:C.clearIndicator,oo=(s=xe.paper)!=null?s:C.paper,ao=(c=xe.popper)!=null?c:C.popper,l=(d=xe.popupIndicator)!=null?d:C.popupIndicator;return f.jsxs(u.Fragment,{children:[f.jsx(Tn,a({ref:t,className:ne(ve.root,v),ownerState:Ce},ce(Fe),{children:_e({id:qe,disabled:F,fullWidth:!0,size:_==="small"?"small":void 0,InputLabelProps:me(),InputProps:a({ref:Ze,className:ve.inputRoot,startAdornment:Be,onClick:n=>{n.target===n.currentTarget&&no(n)}},(Ge||Ue)&&{endAdornment:f.jsxs(An,{className:ve.endAdornment,ownerState:Ce,children:[Ge?f.jsx(Nn,a({},Ye(),{"aria-label":O,title:O,ownerState:Ce},co,{className:ne(ve.clearIndicator,co==null?void 0:co.className),children:R})):null,Ue?f.jsx(zn,a({},Ae(),{disabled:F,"aria-label":y?k:Z,title:y?k:Z,ownerState:Ce},l,{className:ne(ve.popupIndicator,l==null?void 0:l.className),children:Y})):null]})}),inputProps:a({className:ve.input,disabled:F,readOnly:H},Te())})})),ke?f.jsx(Dn,a({as:Me,disablePortal:de,style:{width:ke?ke.clientWidth:null},ownerState:Ce,role:"presentation",anchorEl:ke,open:y},ao,{className:ne(ve.popper,ao==null?void 0:ao.className),children:f.jsxs(En,a({ownerState:Ce,as:be},oo,{className:ne(ve.paper,oo==null?void 0:oo.className),children:[ue&&Ne.length===0?f.jsx(Bn,{className:ve.loading,ownerState:Ce,children:W}):null,Ne.length===0&&!J&&!ue?f.jsx(jn,{className:ve.noOptions,ownerState:Ce,role:"presentation",onMouseDown:n=>{n.preventDefault()},children:fe}):null,Ne.length>0?f.jsx(Wn,a({as:Se,className:ve.listbox,ownerState:Ce},ho,we,{ref:ko,children:Ne.map((n,g)=>re?Ro({key:n.key,group:n.group,children:n.options.map((x,K)=>vo(x,n.index+K))}):vo(n,g))})):null]}))})):null]})}),Vn=Hn;function Kn(e){return ye("MuiCircularProgress",e)}$e("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const qn=["className","color","disableShrink","size","style","thickness","value","variant"];let So=e=>e,Zo,Jo,Qo,et;const Je=44,Gn=ct(Zo||(Zo=So` +import{r as u,j as f,bY as kt,bZ as Rt,a2 as xo,a0 as Ot,x as a,L as ye,M as $e,O as w,Y as L,S as Pe,H as ae,U as ne,V as Ie,P as Re,Z as lo,X as Uo,b_ as Lt,b$ as wt,$ as st,c0 as it,bv as ct,bw as dt,aj as Xe,c1 as To,a3 as Mt,am as Ft,s as Tt,a as je,F as At}from"./index-787c3ef8.js";import{X as Ho,f as ut,ax as pt,aP as Nt,J as Fo,P as zt,aQ as Dt,Y as Vo,g as Et}from"./index-77dce891.js";import{a as Ao,u as fo,b as so,f as io,i as ft,c as Bt,P as No,F as jt,S as Wt}from"./Stack-b3992130.js";import{c as zo}from"./createSvgIcon-fa140fa5.js";import{T as _t}from"./TextareaAutosize-e216d6db.js";const Ut=e=>{const o=u.useRef({});return u.useEffect(()=>{o.current=e}),o.current},Ht=Ut;function Vt(e){return e==null||Object.keys(e).length===0}function Kt(e){const{styles:o,defaultTheme:t={}}=e,r=typeof o=="function"?s=>o(Vt(s)?t:s):o;return f.jsx(kt,{styles:r})}function qt({styles:e,themeId:o,defaultTheme:t={}}){const r=Rt(t),s=typeof e=="function"?e(o&&r[o]||r):e;return f.jsx(Kt,{styles:s})}const Gt=zo(f.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");function Ko(e){return typeof e.normalize<"u"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function Xt(e={}){const{ignoreAccents:o=!0,ignoreCase:t=!0,limit:r,matchFrom:s="any",stringify:c,trim:d=!1}=e;return(i,{inputValue:b,getOptionLabel:p})=>{let m=d?b.trim():b;t&&(m=m.toLowerCase()),o&&(m=Ko(m));const h=m?i.filter($=>{let v=(c||p)($);return t&&(v=v.toLowerCase()),o&&(v=Ko(v)),s==="start"?v.indexOf(m)===0:v.indexOf(m)>-1}):i;return typeof r=="number"?h.slice(0,r):h}}function wo(e,o){for(let t=0;t{var o;return e.current!==null&&((o=e.current.parentElement)==null?void 0:o.contains(document.activeElement))};function Jt(e){const{unstable_isActiveElementInListbox:o=Zt,unstable_classNamePrefix:t="Mui",autoComplete:r=!1,autoHighlight:s=!1,autoSelect:c=!1,blurOnSelect:d=!1,clearOnBlur:i=!e.freeSolo,clearOnEscape:b=!1,componentName:p="useAutocomplete",defaultValue:m=e.multiple?[]:null,disableClearable:h=!1,disableCloseOnSelect:$=!1,disabled:v,disabledItemsFocusable:R=!1,disableListWrap:M=!1,filterOptions:P=Yt,filterSelectedOptions:O=!1,freeSolo:k=!1,getOptionDisabled:C,getOptionKey:I,getOptionLabel:E=l=>{var n;return(n=l.label)!=null?n:l},groupBy:N,handleHomeEndKeys:F=!e.freeSolo,id:q,includeInputInList:le=!1,inputValue:de,isOptionEqualToValue:oe=(l,n)=>l===n,multiple:T=!1,onChange:J,onClose:G,onHighlightChange:se,onInputChange:Q,onOpen:re,open:U,openOnFocus:A=!1,options:ie,readOnly:Se=!1,selectOnFocus:we=!e.freeSolo,value:ue}=e,W=Ao(q);let ee=E;ee=l=>{const n=E(l);return typeof n!="string"?String(n):n};const fe=u.useRef(!1),We=u.useRef(!0),Z=u.useRef(null),be=u.useRef(null),[Me,Y]=u.useState(null),[H,ze]=u.useState(-1),_e=s?0:-1,te=u.useRef(_e),[S,to]=fo({controlled:ue,default:m,name:p}),[_,xe]=fo({controlled:de,default:"",name:p,state:"inputValue"}),[Fe,ce]=u.useState(!1),Te=u.useCallback((l,n)=>{if(!(T?S.length!(O&&(T?S:[S]).some(n=>n!==null&&oe(l,n)))),{inputValue:Ee&&Ye?"":_,getOptionLabel:ee}):[],he=Ht({filteredOptions:j,value:S,inputValue:_});u.useEffect(()=>{const l=S!==he.value;Fe&&!l||k&&!l||Te(null,S)},[S,Te,Fe,he.value,k]);const Ke=me&&j.length>0&&!Se,qe=xo(l=>{l===-1?Z.current.focus():Me.querySelector(`[data-tag-index="${l}"]`).focus()});u.useEffect(()=>{T&&H>S.length-1&&(ze(-1),qe(-1))},[S,T,H,qe]);function y(l,n){if(!be.current||l<0||l>=j.length)return-1;let g=l;for(;;){const x=be.current.querySelector(`[data-option-index="${g}"]`),K=R?!1:!x||x.disabled||x.getAttribute("aria-disabled")==="true";if(x&&x.hasAttribute("tabindex")&&!K)return g;if(n==="next"?g=(g+1)%j.length:g=(g-1+j.length)%j.length,g===l)return-1}}const B=xo(({event:l,index:n,reason:g="auto"})=>{if(te.current=n,n===-1?Z.current.removeAttribute("aria-activedescendant"):Z.current.setAttribute("aria-activedescendant",`${W}-option-${n}`),se&&se(l,n===-1?null:j[n],g),!be.current)return;const x=be.current.querySelector(`[role="option"].${t}-focused`);x&&(x.classList.remove(`${t}-focused`),x.classList.remove(`${t}-focusVisible`));let K=be.current;if(be.current.getAttribute("role")!=="listbox"&&(K=be.current.parentElement.querySelector('[role="listbox"]')),!K)return;if(n===-1){K.scrollTop=0;return}const pe=be.current.querySelector(`[data-option-index="${n}"]`);if(pe&&(pe.classList.add(`${t}-focused`),g==="keyboard"&&pe.classList.add(`${t}-focusVisible`),K.scrollHeight>K.clientHeight&&g!=="mouse"&&g!=="touch")){const ge=pe,He=K.clientHeight+K.scrollTop,_o=ge.offsetTop+ge.offsetHeight;_o>He?K.scrollTop=_o-K.clientHeight:ge.offsetTop-ge.offsetHeight*(N?1.3:0){if(!z)return;const pe=y((()=>{const ge=j.length-1;if(n==="reset")return _e;if(n==="start")return 0;if(n==="end")return ge;const He=te.current+n;return He<0?He===-1&&le?-1:M&&te.current!==-1||Math.abs(n)>1?0:ge:He>ge?He===ge+1&&le?-1:M||Math.abs(n)>1?ge:0:He})(),g);if(B({index:pe,reason:x,event:l}),r&&n!=="reset")if(pe===-1)Z.current.value=_;else{const ge=ee(j[pe]);Z.current.value=ge,ge.toLowerCase().indexOf(_.toLowerCase())===0&&_.length>0&&Z.current.setSelectionRange(_.length,ge.length)}}),ke=()=>{const l=(n,g)=>{const x=n?ee(n):"",K=g?ee(g):"";return x===K};if(te.current!==-1&&he.filteredOptions&&he.filteredOptions.length!==j.length&&he.inputValue===_&&(T?S.length===he.value.length&&he.value.every((n,g)=>ee(S[g])===ee(n)):l(he.value,S))){const n=he.filteredOptions[te.current];if(n&&j.some(x=>ee(x)===ee(n)))return!0}return!1},Ze=u.useCallback(()=>{if(!z||ke())return;const l=T?S[0]:S;if(j.length===0||l==null){X({diff:"reset"});return}if(be.current){if(l!=null){const n=j[te.current];if(T&&n&&wo(S,x=>oe(n,x))!==-1)return;const g=wo(j,x=>oe(x,l));g===-1?X({diff:"reset"}):B({index:g});return}if(te.current>=j.length-1){B({index:j.length-1});return}B({index:te.current})}},[j.length,T?!1:S,O,X,B,z,_,T]),Po=xo(l=>{Ot(be,l),l&&Ze()});u.useEffect(()=>{Ze()},[Ze]);const Ne=l=>{me||(Ae(!0),De(!0),re&&re(l))},Ge=(l,n)=>{me&&(Ae(!1),G&&G(l,n))},Ue=(l,n,g,x)=>{if(T){if(S.length===n.length&&S.every((K,pe)=>K===n[pe]))return}else if(S===n)return;J&&J(l,n,g,x),to(n)},no=u.useRef(!1),eo=(l,n,g="selectOption",x="options")=>{let K=g,pe=n;if(T){pe=Array.isArray(S)?S.slice():[];const ge=wo(pe,He=>oe(n,He));ge===-1?pe.push(n):x!=="freeSolo"&&(pe.splice(ge,1),K="removeOption")}Te(l,pe),Ue(l,pe,K,{option:n}),!$&&(!l||!l.ctrlKey&&!l.metaKey)&&Ge(l,K),(d===!0||d==="touch"&&no.current||d==="mouse"&&!no.current)&&Z.current.blur()};function go(l,n){if(l===-1)return-1;let g=l;for(;;){if(n==="next"&&g===S.length||n==="previous"&&g===-1)return-1;const x=Me.querySelector(`[data-tag-index="${g}"]`);if(!x||!x.hasAttribute("tabindex")||x.disabled||x.getAttribute("aria-disabled")==="true")g+=n==="next"?1:-1;else return g}}const mo=(l,n)=>{if(!T)return;_===""&&Ge(l,"toggleInput");let g=H;H===-1?_===""&&n==="previous"&&(g=S.length-1):(g+=n==="next"?1:-1,g<0&&(g=0),g===S.length&&(g=-1)),g=go(g,n),ze(g),qe(g)},ho=l=>{fe.current=!0,xe(""),Q&&Q(l,"","clear"),Ue(l,T?[]:null,"clear")},ko=l=>n=>{if(l.onKeyDown&&l.onKeyDown(n),!n.defaultMuiPrevented&&(H!==-1&&["ArrowLeft","ArrowRight"].indexOf(n.key)===-1&&(ze(-1),qe(-1)),n.which!==229))switch(n.key){case"Home":z&&F&&(n.preventDefault(),X({diff:"start",direction:"next",reason:"keyboard",event:n}));break;case"End":z&&F&&(n.preventDefault(),X({diff:"end",direction:"previous",reason:"keyboard",event:n}));break;case"PageUp":n.preventDefault(),X({diff:-qo,direction:"previous",reason:"keyboard",event:n}),Ne(n);break;case"PageDown":n.preventDefault(),X({diff:qo,direction:"next",reason:"keyboard",event:n}),Ne(n);break;case"ArrowDown":n.preventDefault(),X({diff:1,direction:"next",reason:"keyboard",event:n}),Ne(n);break;case"ArrowUp":n.preventDefault(),X({diff:-1,direction:"previous",reason:"keyboard",event:n}),Ne(n);break;case"ArrowLeft":mo(n,"previous");break;case"ArrowRight":mo(n,"next");break;case"Enter":if(te.current!==-1&&z){const g=j[te.current],x=C?C(g):!1;if(n.preventDefault(),x)return;eo(n,g,"selectOption"),r&&Z.current.setSelectionRange(Z.current.value.length,Z.current.value.length)}else k&&_!==""&&Ee===!1&&(T&&n.preventDefault(),eo(n,_,"createOption","freeSolo"));break;case"Escape":z?(n.preventDefault(),n.stopPropagation(),Ge(n,"escape")):b&&(_!==""||T&&S.length>0)&&(n.preventDefault(),n.stopPropagation(),ho(n));break;case"Backspace":if(T&&!Se&&_===""&&S.length>0){const g=H===-1?S.length-1:H,x=S.slice();x.splice(g,1),Ue(n,x,"removeOption",{option:S[g]})}break;case"Delete":if(T&&!Se&&_===""&&S.length>0&&H!==-1){const g=H,x=S.slice();x.splice(g,1),Ue(n,x,"removeOption",{option:S[g]})}break}},jo=l=>{ce(!0),A&&!fe.current&&Ne(l)},ro=l=>{if(o(be)){Z.current.focus();return}ce(!1),We.current=!0,fe.current=!1,c&&te.current!==-1&&z?eo(l,j[te.current],"blur"):c&&k&&_!==""?eo(l,_,"blur","freeSolo"):i&&Te(l,S),Ge(l,"blur")},Ce=l=>{const n=l.target.value;_!==n&&(xe(n),De(!1),Q&&Q(l,n,"input")),n===""?!h&&!T&&Ue(l,null,"clear"):Ne(l)},ve=l=>{const n=Number(l.currentTarget.getAttribute("data-option-index"));te.current!==n&&B({event:l,index:n,reason:"mouse"})},Be=l=>{B({event:l,index:Number(l.currentTarget.getAttribute("data-option-index")),reason:"touch"}),no.current=!0},Wo=l=>{const n=Number(l.currentTarget.getAttribute("data-option-index"));eo(l,j[n],"selectOption"),no.current=!1},Ro=l=>n=>{const g=S.slice();g.splice(l,1),Ue(n,g,"removeOption",{option:S[l]})},Oo=l=>{me?Ge(l,"toggleInput"):Ne(l)},Lo=l=>{l.currentTarget.contains(l.target)&&l.target.getAttribute("id")!==W&&l.preventDefault()},vo=l=>{l.currentTarget.contains(l.target)&&(Z.current.focus(),we&&We.current&&Z.current.selectionEnd-Z.current.selectionStart===0&&Z.current.select(),We.current=!1)},co=l=>{!v&&(_===""||!me)&&Oo(l)};let oo=k&&_.length>0;oo=oo||(T?S.length>0:S!==null);let ao=j;return N&&(ao=j.reduce((l,n,g)=>{const x=N(n);return l.length>0&&l[l.length-1].group===x?l[l.length-1].options.push(n):l.push({key:g,index:g,group:x,options:[n]}),l},[])),v&&Fe&&ro(),{getRootProps:(l={})=>a({"aria-owns":Ke?`${W}-listbox`:null},l,{onKeyDown:ko(l),onMouseDown:Lo,onClick:vo}),getInputLabelProps:()=>({id:`${W}-label`,htmlFor:W}),getInputProps:()=>({id:W,value:_,onBlur:ro,onFocus:jo,onChange:Ce,onMouseDown:co,"aria-activedescendant":z?"":null,"aria-autocomplete":r?"both":"list","aria-controls":Ke?`${W}-listbox`:void 0,"aria-expanded":Ke,autoComplete:"off",ref:Z,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:v}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:ho}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:Oo}),getTagProps:({index:l})=>a({key:l,"data-tag-index":l,tabIndex:-1},!Se&&{onDelete:Ro(l)}),getListboxProps:()=>({role:"listbox",id:`${W}-listbox`,"aria-labelledby":`${W}-label`,ref:Po,onMouseDown:l=>{l.preventDefault()}}),getOptionProps:({index:l,option:n})=>{var g;const x=(T?S:[S]).some(pe=>pe!=null&&oe(n,pe)),K=C?C(n):!1;return{key:(g=I==null?void 0:I(n))!=null?g:ee(n),tabIndex:-1,role:"option",id:`${W}-option-${l}`,onMouseMove:ve,onClick:Wo,onTouchStart:Be,"data-option-index":l,"aria-disabled":K,"aria-selected":x}},id:W,inputValue:_,value:S,dirty:oo,expanded:z&&Me,popupOpen:z,focused:Fe||H!==-1,anchorEl:Me,setAnchorEl:Y,focusedTag:H,groupedOptions:ao}}function Qt(e){return ye("MuiListSubheader",e)}$e("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const en=["className","color","component","disableGutters","disableSticky","inset"],on=e=>{const{classes:o,color:t,disableGutters:r,inset:s,disableSticky:c}=e,d={root:["root",t!=="default"&&`color${L(t)}`,!r&&"gutters",s&&"inset",!c&&"sticky"]};return Ie(d,Qt,o)},tn=w("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.color!=="default"&&o[`color${L(t.color)}`],!t.disableGutters&&o.gutters,t.inset&&o.inset,!t.disableSticky&&o.sticky]}})(({theme:e,ownerState:o})=>a({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},o.color==="primary"&&{color:(e.vars||e).palette.primary.main},o.color==="inherit"&&{color:"inherit"},!o.disableGutters&&{paddingLeft:16,paddingRight:16},o.inset&&{paddingLeft:72},!o.disableSticky&&{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper})),bt=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiListSubheader"}),{className:s,color:c="default",component:d="li",disableGutters:i=!1,disableSticky:b=!1,inset:p=!1}=r,m=ae(r,en),h=a({},r,{color:c,component:d,disableGutters:i,disableSticky:b,inset:p}),$=on(h);return f.jsx(tn,a({as:d,className:ne($.root,s),ref:t,ownerState:h},m))});bt.muiSkipListHighlight=!0;const nn=bt,rn=zo(f.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function an(e){return ye("MuiChip",e)}const ln=$e("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),V=ln,sn=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],cn=e=>{const{classes:o,disabled:t,size:r,color:s,iconColor:c,onDelete:d,clickable:i,variant:b}=e,p={root:["root",b,t&&"disabled",`size${L(r)}`,`color${L(s)}`,i&&"clickable",i&&`clickableColor${L(s)}`,d&&"deletable",d&&`deletableColor${L(s)}`,`${b}${L(s)}`],label:["label",`label${L(r)}`],avatar:["avatar",`avatar${L(r)}`,`avatarColor${L(s)}`],icon:["icon",`icon${L(r)}`,`iconColor${L(c)}`],deleteIcon:["deleteIcon",`deleteIcon${L(r)}`,`deleteIconColor${L(s)}`,`deleteIcon${L(b)}Color${L(s)}`]};return Ie(p,an,o)},dn=w("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e,{color:r,iconColor:s,clickable:c,onDelete:d,size:i,variant:b}=t;return[{[`& .${V.avatar}`]:o.avatar},{[`& .${V.avatar}`]:o[`avatar${L(i)}`]},{[`& .${V.avatar}`]:o[`avatarColor${L(r)}`]},{[`& .${V.icon}`]:o.icon},{[`& .${V.icon}`]:o[`icon${L(i)}`]},{[`& .${V.icon}`]:o[`iconColor${L(s)}`]},{[`& .${V.deleteIcon}`]:o.deleteIcon},{[`& .${V.deleteIcon}`]:o[`deleteIcon${L(i)}`]},{[`& .${V.deleteIcon}`]:o[`deleteIconColor${L(r)}`]},{[`& .${V.deleteIcon}`]:o[`deleteIcon${L(b)}Color${L(r)}`]},o.root,o[`size${L(i)}`],o[`color${L(r)}`],c&&o.clickable,c&&r!=="default"&&o[`clickableColor${L(r)})`],d&&o.deletable,d&&r!=="default"&&o[`deletableColor${L(r)}`],o[b],o[`${b}${L(r)}`]]}})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return a({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${V.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${V.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${V.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${V.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${V.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${V.icon}`]:a({marginLeft:5,marginRight:-6},o.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},o.iconColor===o.color&&a({color:e.vars?e.vars.palette.Chip.defaultIconColor:t},o.color!=="default"&&{color:"inherit"})),[`& .${V.deleteIcon}`]:a({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:Re(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:Re(e.palette.text.primary,.4)}},o.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},o.color!=="default"&&{color:e.vars?`rgba(${e.vars.palette[o.color].contrastTextChannel} / 0.7)`:Re(e.palette[o.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[o.color].contrastText}})},o.size==="small"&&{height:24},o.color!=="default"&&{backgroundColor:(e.vars||e).palette[o.color].main,color:(e.vars||e).palette[o.color].contrastText},o.onDelete&&{[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},o.onDelete&&o.color!=="default"&&{[`&.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette[o.color].dark}})},({theme:e,ownerState:o})=>a({},o.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},o.clickable&&o.color!=="default"&&{[`&:hover, &.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette[o.color].dark}}),({theme:e,ownerState:o})=>a({},o.variant==="outlined"&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${V.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${V.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${V.avatar}`]:{marginLeft:4},[`& .${V.avatarSmall}`]:{marginLeft:2},[`& .${V.icon}`]:{marginLeft:4},[`& .${V.iconSmall}`]:{marginLeft:2},[`& .${V.deleteIcon}`]:{marginRight:5},[`& .${V.deleteIconSmall}`]:{marginRight:3}},o.variant==="outlined"&&o.color!=="default"&&{color:(e.vars||e).palette[o.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / 0.7)`:Re(e.palette[o.color].main,.7)}`,[`&.${V.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Re(e.palette[o.color].main,e.palette.action.hoverOpacity)},[`&.${V.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:Re(e.palette[o.color].main,e.palette.action.focusOpacity)},[`& .${V.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[o.color].mainChannel} / 0.7)`:Re(e.palette[o.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[o.color].main}}})),un=w("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,o)=>{const{ownerState:t}=e,{size:r}=t;return[o.label,o[`label${L(r)}`]]}})(({ownerState:e})=>a({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},e.variant==="outlined"&&{paddingLeft:11,paddingRight:11},e.size==="small"&&{paddingLeft:8,paddingRight:8},e.size==="small"&&e.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function Go(e){return e.key==="Backspace"||e.key==="Delete"}const pn=u.forwardRef(function(o,t){const r=Pe({props:o,name:"MuiChip"}),{avatar:s,className:c,clickable:d,color:i="default",component:b,deleteIcon:p,disabled:m=!1,icon:h,label:$,onClick:v,onDelete:R,onKeyDown:M,onKeyUp:P,size:O="medium",variant:k="filled",tabIndex:C,skipFocusWhenDisabled:I=!1}=r,E=ae(r,sn),N=u.useRef(null),F=lo(N,t),q=A=>{A.stopPropagation(),R&&R(A)},le=A=>{A.currentTarget===A.target&&Go(A)&&A.preventDefault(),M&&M(A)},de=A=>{A.currentTarget===A.target&&(R&&Go(A)?R(A):A.key==="Escape"&&N.current&&N.current.blur()),P&&P(A)},oe=d!==!1&&v?!0:d,T=oe||R?Uo:b||"div",J=a({},r,{component:T,disabled:m,size:O,color:i,iconColor:u.isValidElement(h)&&h.props.color||i,onDelete:!!R,clickable:oe,variant:k}),G=cn(J),se=T===Uo?a({component:b||"div",focusVisibleClassName:G.focusVisible},R&&{disableRipple:!0}):{};let Q=null;R&&(Q=p&&u.isValidElement(p)?u.cloneElement(p,{className:ne(p.props.className,G.deleteIcon),onClick:q}):f.jsx(rn,{className:ne(G.deleteIcon),onClick:q}));let re=null;s&&u.isValidElement(s)&&(re=u.cloneElement(s,{className:ne(G.avatar,s.props.className)}));let U=null;return h&&u.isValidElement(h)&&(U=u.cloneElement(h,{className:ne(G.icon,h.props.className)})),f.jsxs(dn,a({as:T,className:ne(G.root,c),disabled:oe&&m?!0:void 0,onClick:v,onKeyDown:le,onKeyUp:de,ref:F,tabIndex:I&&m?-1:C,ownerState:J},se,E,{children:[re||U,f.jsx(un,{className:ne(G.label),ownerState:J,children:$}),Q]}))}),fn=pn;function bn(e){return f.jsx(qt,a({},e,{defaultTheme:Lt,themeId:wt}))}function gn(e){return ye("MuiInputBase",e)}const mn=$e("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Oe=mn,hn=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Co=(e,o)=>{const{ownerState:t}=e;return[o.root,t.formControl&&o.formControl,t.startAdornment&&o.adornedStart,t.endAdornment&&o.adornedEnd,t.error&&o.error,t.size==="small"&&o.sizeSmall,t.multiline&&o.multiline,t.color&&o[`color${L(t.color)}`],t.fullWidth&&o.fullWidth,t.hiddenLabel&&o.hiddenLabel]},yo=(e,o)=>{const{ownerState:t}=e;return[o.input,t.size==="small"&&o.inputSizeSmall,t.multiline&&o.inputMultiline,t.type==="search"&&o.inputTypeSearch,t.startAdornment&&o.inputAdornedStart,t.endAdornment&&o.inputAdornedEnd,t.hiddenLabel&&o.inputHiddenLabel]},vn=e=>{const{classes:o,color:t,disabled:r,error:s,endAdornment:c,focused:d,formControl:i,fullWidth:b,hiddenLabel:p,multiline:m,readOnly:h,size:$,startAdornment:v,type:R}=e,M={root:["root",`color${L(t)}`,r&&"disabled",s&&"error",b&&"fullWidth",d&&"focused",i&&"formControl",$&&$!=="medium"&&`size${L($)}`,m&&"multiline",v&&"adornedStart",c&&"adornedEnd",p&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled",R==="search"&&"inputTypeSearch",m&&"inputMultiline",$==="small"&&"inputSizeSmall",p&&"inputHiddenLabel",v&&"inputAdornedStart",c&&"inputAdornedEnd",h&&"readOnly"]};return Ie(M,gn,o)},$o=w("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Co})(({theme:e,ownerState:o})=>a({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Oe.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},o.multiline&&a({padding:"4px 0 5px"},o.size==="small"&&{paddingTop:1}),o.fullWidth&&{width:"100%"})),Io=w("input",{name:"MuiInputBase",slot:"Input",overridesResolver:yo})(({theme:e,ownerState:o})=>{const t=e.palette.mode==="light",r=a({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),s={opacity:"0 !important"},c=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return a({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Oe.formControl} &`]:{"&::-webkit-input-placeholder":s,"&::-moz-placeholder":s,"&:-ms-input-placeholder":s,"&::-ms-input-placeholder":s,"&:focus::-webkit-input-placeholder":c,"&:focus::-moz-placeholder":c,"&:focus:-ms-input-placeholder":c,"&:focus::-ms-input-placeholder":c},[`&.${Oe.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},o.size==="small"&&{paddingTop:1},o.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},o.type==="search"&&{MozAppearance:"textfield"})}),xn=f.jsx(bn,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Cn=u.forwardRef(function(o,t){var r;const s=Pe({props:o,name:"MuiInputBase"}),{"aria-describedby":c,autoComplete:d,autoFocus:i,className:b,components:p={},componentsProps:m={},defaultValue:h,disabled:$,disableInjectingGlobalStyles:v,endAdornment:R,fullWidth:M=!1,id:P,inputComponent:O="input",inputProps:k={},inputRef:C,maxRows:I,minRows:E,multiline:N=!1,name:F,onBlur:q,onChange:le,onClick:de,onFocus:oe,onKeyDown:T,onKeyUp:J,placeholder:G,readOnly:se,renderSuffix:Q,rows:re,slotProps:U={},slots:A={},startAdornment:ie,type:Se="text",value:we}=s,ue=ae(s,hn),W=k.value!=null?k.value:we,{current:ee}=u.useRef(W!=null),fe=u.useRef(),We=u.useCallback(z=>{},[]),Z=lo(fe,C,k.ref,We),[be,Me]=u.useState(!1),Y=so(),H=io({props:s,muiFormControl:Y,states:["color","disabled","error","hiddenLabel","size","required","filled"]});H.focused=Y?Y.focused:be,u.useEffect(()=>{!Y&&$&&be&&(Me(!1),q&&q())},[Y,$,be,q]);const ze=Y&&Y.onFilled,_e=Y&&Y.onEmpty,te=u.useCallback(z=>{ft(z)?ze&&ze():_e&&_e()},[ze,_e]);st(()=>{ee&&te({value:W})},[W,te,ee]);const S=z=>{if(H.disabled){z.stopPropagation();return}oe&&oe(z),k.onFocus&&k.onFocus(z),Y&&Y.onFocus?Y.onFocus(z):Me(!0)},to=z=>{q&&q(z),k.onBlur&&k.onBlur(z),Y&&Y.onBlur?Y.onBlur(z):Me(!1)},_=(z,...j)=>{if(!ee){const he=z.target||fe.current;if(he==null)throw new Error(it(1));te({value:he.value})}k.onChange&&k.onChange(z,...j),le&&le(z,...j)};u.useEffect(()=>{te(fe.current)},[]);const xe=z=>{fe.current&&z.currentTarget===z.target&&fe.current.focus(),de&&de(z)};let Fe=O,ce=k;N&&Fe==="input"&&(re?ce=a({type:void 0,minRows:re,maxRows:re},ce):ce=a({type:void 0,maxRows:I,minRows:E},ce),Fe=_t);const Te=z=>{te(z.animationName==="mui-auto-fill-cancel"?fe.current:{value:"x"})};u.useEffect(()=>{Y&&Y.setAdornedStart(!!ie)},[Y,ie]);const me=a({},s,{color:H.color||"primary",disabled:H.disabled,endAdornment:R,error:H.error,focused:H.focused,formControl:Y,fullWidth:M,hiddenLabel:H.hiddenLabel,multiline:N,size:H.size,startAdornment:ie,type:Se}),Ae=vn(me),Ye=A.root||p.Root||$o,De=U.root||m.root||{},Ee=A.input||p.Input||Io;return ce=a({},ce,(r=U.input)!=null?r:m.input),f.jsxs(u.Fragment,{children:[!v&&xn,f.jsxs(Ye,a({},De,!Ho(Ye)&&{ownerState:a({},me,De.ownerState)},{ref:t,onClick:xe},ue,{className:ne(Ae.root,De.className,b,se&&"MuiInputBase-readOnly"),children:[ie,f.jsx(Bt.Provider,{value:null,children:f.jsx(Ee,a({ownerState:me,"aria-invalid":H.error,"aria-describedby":c,autoComplete:d,autoFocus:i,defaultValue:h,disabled:H.disabled,id:P,onAnimationStart:Te,name:F,placeholder:G,readOnly:se,required:H.required,rows:re,value:W,onKeyDown:T,onKeyUp:J,type:Se},ce,!Ho(Ee)&&{as:Fe,ownerState:a({},me,ce.ownerState)},{ref:Z,className:ne(Ae.input,ce.className,se&&"MuiInputBase-readOnly"),onBlur:to,onChange:_,onFocus:S}))}),R,Q?Q(a({},H,{startAdornment:ie})):null]}))]})}),Do=Cn;function yn(e){return ye("MuiInput",e)}const $n=a({},Oe,$e("MuiInput",["root","underline","input"])),Qe=$n;function In(e){return ye("MuiOutlinedInput",e)}const Sn=a({},Oe,$e("MuiOutlinedInput",["root","notchedOutline","input"])),Ve=Sn;function Pn(e){return ye("MuiFilledInput",e)}const kn=a({},Oe,$e("MuiFilledInput",["root","underline","input"])),Le=kn,gt=zo(f.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Rn(e){return ye("MuiAutocomplete",e)}const On=$e("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]),D=On;var Xo,Yo;const Ln=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionKey","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],wn=["ref"],Mn=["key"],Fn=e=>{const{classes:o,disablePortal:t,expanded:r,focused:s,fullWidth:c,hasClearIcon:d,hasPopupIcon:i,inputFocused:b,popupOpen:p,size:m}=e,h={root:["root",r&&"expanded",s&&"focused",c&&"fullWidth",d&&"hasClearIcon",i&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",b&&"inputFocused"],tag:["tag",`tagSize${L(m)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",p&&"popupIndicatorOpen"],popper:["popper",t&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Ie(h,Rn,o)},Tn=w("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e,{fullWidth:r,hasClearIcon:s,hasPopupIcon:c,inputFocused:d,size:i}=t;return[{[`& .${D.tag}`]:o.tag},{[`& .${D.tag}`]:o[`tagSize${L(i)}`]},{[`& .${D.inputRoot}`]:o.inputRoot},{[`& .${D.input}`]:o.input},{[`& .${D.input}`]:d&&o.inputFocused},o.root,r&&o.fullWidth,c&&o.hasPopupIcon,s&&o.hasClearIcon]}})(({ownerState:e})=>a({[`&.${D.focused} .${D.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${D.clearIndicator}`]:{visibility:"visible"}}},e.fullWidth&&{width:"100%"},{[`& .${D.tag}`]:a({margin:3,maxWidth:"calc(100% - 6px)"},e.size==="small"&&{margin:2,maxWidth:"calc(100% - 4px)"}),[`& .${D.inputRoot}`]:{flexWrap:"wrap",[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4},[`& .${D.input}`]:{width:0,minWidth:30}},[`& .${Qe.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Qe.root}.${Oe.sizeSmall}`]:{[`& .${Qe.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Ve.root}`]:{padding:9,[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${D.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${D.endAdornment}`]:{right:9}},[`& .${Ve.root}.${Oe.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${D.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Le.root}`]:{paddingTop:19,paddingLeft:8,[`.${D.hasPopupIcon}&, .${D.hasClearIcon}&`]:{paddingRight:26+4+9},[`.${D.hasPopupIcon}.${D.hasClearIcon}&`]:{paddingRight:52+4+9},[`& .${Le.input}`]:{padding:"7px 4px"},[`& .${D.endAdornment}`]:{right:9}},[`& .${Le.root}.${Oe.sizeSmall}`]:{paddingBottom:1,[`& .${Le.input}`]:{padding:"2.5px 4px"}},[`& .${Oe.hiddenLabel}`]:{paddingTop:8},[`& .${Le.root}.${Oe.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${D.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Le.root}.${Oe.hiddenLabel}.${Oe.sizeSmall}`]:{[`& .${D.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${D.input}`]:a({flexGrow:1,textOverflow:"ellipsis",opacity:0},e.inputFocused&&{opacity:1})})),An=w("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,o)=>o.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),Nn=w(ut,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,o)=>o.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),zn=w(ut,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},o)=>a({},o.popupIndicator,e.popupOpen&&o.popupIndicatorOpen)})(({ownerState:e})=>a({padding:2,marginRight:-2},e.popupOpen&&{transform:"rotate(180deg)"})),Dn=w(No,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[{[`& .${D.option}`]:o.option},o.popper,t.disablePortal&&o.popperDisablePortal]}})(({theme:e,ownerState:o})=>a({zIndex:(e.vars||e).zIndex.modal},o.disablePortal&&{position:"absolute"})),En=w(pt,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,o)=>o.paper})(({theme:e})=>a({},e.typography.body1,{overflow:"auto"})),Bn=w("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,o)=>o.loading})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),jn=w("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,o)=>o.noOptions})(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"})),Wn=w("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,o)=>o.listbox})(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${D.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${D.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${D.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Re(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${D.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Re(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${D.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Re(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}})),_n=w(nn,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,o)=>o.groupLabel})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8})),Un=w("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,o)=>o.groupUl})({padding:0,[`& .${D.option}`]:{paddingLeft:24}}),Hn=u.forwardRef(function(o,t){var r,s,c,d;const i=Pe({props:o,name:"MuiAutocomplete"}),{autoComplete:b=!1,autoHighlight:p=!1,autoSelect:m=!1,blurOnSelect:h=!1,ChipProps:$,className:v,clearIcon:R=Xo||(Xo=f.jsx(Gt,{fontSize:"small"})),clearOnBlur:M=!i.freeSolo,clearOnEscape:P=!1,clearText:O="Clear",closeText:k="Close",componentsProps:C={},defaultValue:I=i.multiple?[]:null,disableClearable:E=!1,disableCloseOnSelect:N=!1,disabled:F=!1,disabledItemsFocusable:q=!1,disableListWrap:le=!1,disablePortal:de=!1,filterSelectedOptions:oe=!1,forcePopupIcon:T="auto",freeSolo:J=!1,fullWidth:G=!1,getLimitTagsText:se=n=>`+${n}`,getOptionLabel:Q,groupBy:re,handleHomeEndKeys:U=!i.freeSolo,includeInputInList:A=!1,limitTags:ie=-1,ListboxComponent:Se="ul",ListboxProps:we,loading:ue=!1,loadingText:W="Loading…",multiple:ee=!1,noOptionsText:fe="No options",openOnFocus:We=!1,openText:Z="Open",PaperComponent:be=pt,PopperComponent:Me=No,popupIcon:Y=Yo||(Yo=f.jsx(gt,{})),readOnly:H=!1,renderGroup:ze,renderInput:_e,renderOption:te,renderTags:S,selectOnFocus:to=!i.freeSolo,size:_="medium",slotProps:xe={}}=i,Fe=ae(i,Ln),{getRootProps:ce,getInputProps:Te,getInputLabelProps:me,getPopupIndicatorProps:Ae,getClearProps:Ye,getTagProps:De,getListboxProps:Ee,getOptionProps:z,value:j,dirty:he,expanded:Ke,id:qe,popupOpen:y,focused:B,focusedTag:X,anchorEl:ke,setAnchorEl:Ze,inputValue:Po,groupedOptions:Ne}=Jt(a({},i,{componentName:"Autocomplete"})),Ge=!E&&!F&&he&&!H,Ue=(!J||T===!0)&&T!==!1,{onMouseDown:no}=Te(),{ref:eo}=we??{},go=Ee(),{ref:mo}=go,ho=ae(go,wn),ko=lo(mo,eo),ro=Q||(n=>{var g;return(g=n.label)!=null?g:n}),Ce=a({},i,{disablePortal:de,expanded:Ke,focused:B,fullWidth:G,getOptionLabel:ro,hasClearIcon:Ge,hasPopupIcon:Ue,inputFocused:X===-1,popupOpen:y,size:_}),ve=Fn(Ce);let Be;if(ee&&j.length>0){const n=g=>a({className:ve.tag,disabled:F},De(g));S?Be=S(j,n,Ce):Be=j.map((g,x)=>f.jsx(fn,a({label:ro(g),size:_},n({index:x}),$)))}if(ie>-1&&Array.isArray(Be)){const n=Be.length-ie;!B&&n>0&&(Be=Be.splice(0,ie),Be.push(f.jsx("span",{className:ve.tag,children:se(n)},Be.length)))}const Ro=ze||(n=>f.jsxs("li",{children:[f.jsx(_n,{className:ve.groupLabel,ownerState:Ce,component:"div",children:n.group}),f.jsx(Un,{className:ve.groupUl,ownerState:Ce,children:n.children})]},n.key)),Lo=te||((n,g)=>{const{key:x}=n,K=ae(n,Mn);return f.jsx("li",a({},K,{children:ro(g)}),x)}),vo=(n,g)=>{const x=z({option:n,index:g});return Lo(a({},x,{className:ve.option}),n,{selected:x["aria-selected"],index:g,inputValue:Po},Ce)},co=(r=xe.clearIndicator)!=null?r:C.clearIndicator,oo=(s=xe.paper)!=null?s:C.paper,ao=(c=xe.popper)!=null?c:C.popper,l=(d=xe.popupIndicator)!=null?d:C.popupIndicator;return f.jsxs(u.Fragment,{children:[f.jsx(Tn,a({ref:t,className:ne(ve.root,v),ownerState:Ce},ce(Fe),{children:_e({id:qe,disabled:F,fullWidth:!0,size:_==="small"?"small":void 0,InputLabelProps:me(),InputProps:a({ref:Ze,className:ve.inputRoot,startAdornment:Be,onClick:n=>{n.target===n.currentTarget&&no(n)}},(Ge||Ue)&&{endAdornment:f.jsxs(An,{className:ve.endAdornment,ownerState:Ce,children:[Ge?f.jsx(Nn,a({},Ye(),{"aria-label":O,title:O,ownerState:Ce},co,{className:ne(ve.clearIndicator,co==null?void 0:co.className),children:R})):null,Ue?f.jsx(zn,a({},Ae(),{disabled:F,"aria-label":y?k:Z,title:y?k:Z,ownerState:Ce},l,{className:ne(ve.popupIndicator,l==null?void 0:l.className),children:Y})):null]})}),inputProps:a({className:ve.input,disabled:F,readOnly:H},Te())})})),ke?f.jsx(Dn,a({as:Me,disablePortal:de,style:{width:ke?ke.clientWidth:null},ownerState:Ce,role:"presentation",anchorEl:ke,open:y},ao,{className:ne(ve.popper,ao==null?void 0:ao.className),children:f.jsxs(En,a({ownerState:Ce,as:be},oo,{className:ne(ve.paper,oo==null?void 0:oo.className),children:[ue&&Ne.length===0?f.jsx(Bn,{className:ve.loading,ownerState:Ce,children:W}):null,Ne.length===0&&!J&&!ue?f.jsx(jn,{className:ve.noOptions,ownerState:Ce,role:"presentation",onMouseDown:n=>{n.preventDefault()},children:fe}):null,Ne.length>0?f.jsx(Wn,a({as:Se,className:ve.listbox,ownerState:Ce},ho,we,{ref:ko,children:Ne.map((n,g)=>re?Ro({key:n.key,group:n.group,children:n.options.map((x,K)=>vo(x,n.index+K))}):vo(n,g))})):null]}))})):null]})}),Vn=Hn;function Kn(e){return ye("MuiCircularProgress",e)}$e("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const qn=["className","color","disableShrink","size","style","thickness","value","variant"];let So=e=>e,Zo,Jo,Qo,et;const Je=44,Gn=ct(Zo||(Zo=So` 0% { transform: rotate(0deg); } diff --git a/build/assets/index-7a1dc0fc.js b/build/assets/index-f3f8c0bc.js similarity index 93% rename from build/assets/index-7a1dc0fc.js rename to build/assets/index-f3f8c0bc.js index a4decd37f..d3f928190 100644 --- a/build/assets/index-7a1dc0fc.js +++ b/build/assets/index-f3f8c0bc.js @@ -1,4 +1,4 @@ -import{r,j as e,bo as B,i as k,F as h,C as F,bd as O,bp as _,s as l,T as z,e as E,t as N,v as D,a as C,B as M,bq as Y,aY as P}from"./index-17ed06be.js";import{ay as X,az as G,aA as H,n as R}from"./index-2f22123e.js";import{A as I,T as q}from"./index-9261e06d.js";import{S as V,A as W}from"./constants-fa18afce.js";import{C as T}from"./ClipLoader-96bb9f4d.js";import"./Stack-a8b59155.js";import"./createSvgIcon-6ef3ed46.js";import"./TextareaAutosize-f571cf36.js";const $=({selectedType:t,setSelectedType:c})=>{const[p,d]=r.useState([]);r.useEffect(()=>{(async()=>{try{const{data:x}=await B();d(x.edge_types)}catch(x){console.warn(x)}})()},[d]);const n=o=>({label:o,value:o}),f=o=>{c((o==null?void 0:o.value)||"")};return e.jsx(I,{onSelect:f,options:p.map(n),selectedValue:t?n(t):null})},J=({onSelect:t,selectedValue:c,topicId:p})=>{const[d,n]=r.useState([]),[f,o]=r.useState(!1),x=r.useMemo(()=>{const s=async u=>{const i={is_muted:"False",sort_by:W,search:u,skip:"0",limit:"1000"};o(!0);try{const w=(await _(i.search)).data.filter(b=>(b==null?void 0:b.ref_id)!==p);n(w)}catch{n([])}finally{o(!1)}};return k.debounce(s,300)},[p]),m=s=>{const u=s.trim();if(!u){n([]);return}u.length>2&&x(s)},j=s=>{const u=s?d.find(i=>i.ref_id===s.value):null;t(u||null)},a=s=>({label:s.search_value,value:s.ref_id,type:s.node_type}),v=s=>s.map(a);return c?e.jsxs(h,{align:"center",basis:"100%",direction:"row",grow:1,shrink:1,children:[e.jsx("span",{children:c.search_value}),e.jsx(V,{onClick:()=>t(null),size:"medium",children:e.jsx(F,{})})]}):e.jsx(I,{handleInputChange:m,isLoading:f,onSelect:j,options:v(d)||O,selectedValue:c?a(c):null})},K=({from:t,onSelect:c,selectedType:p,setSelectedType:d,selectedToNode:n,setIsSwapped:f,isSwapped:o})=>{const x=()=>{f()},m=t&&("search_value"in t?t.search_value:t.name);return e.jsxs(h,{mb:20,children:[e.jsx(h,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(h,{align:"center",direction:"row",children:e.jsx(U,{children:"Add Edge"})})}),e.jsxs(Z,{swap:o,children:[e.jsx(h,{children:e.jsx(ee,{disabled:!0,label:o?"To":"From",swap:o,value:m})}),e.jsxs(h,{my:16,children:[e.jsx(oe,{children:"Type"}),e.jsx($,{selectedType:p,setSelectedType:d})]}),e.jsx(h,{children:e.jsxs(te,{children:[e.jsx(se,{children:o?"From":"To"}),e.jsx(J,{onSelect:c,selectedValue:n,topicId:t==null?void 0:t.ref_id})]})}),e.jsxs(Q,{children:[e.jsx(ne,{children:e.jsx(X,{})}),e.jsx(ae,{onClick:x,children:e.jsx(G,{})}),e.jsx(ie,{children:e.jsx(H,{})})]})]})]})},Q=l.div` +import{r,j as e,bo as B,i as k,F as h,C as F,bd as O,bp as _,s as l,T as z,e as E,t as N,v as D,a as C,B as M,bq as Y,aY as P}from"./index-787c3ef8.js";import{ay as X,az as G,aA as H,n as R}from"./index-77dce891.js";import{A as I,T as q}from"./index-efed0068.js";import{S as V,A as W}from"./constants-380035da.js";import{C as T}from"./ClipLoader-0106d300.js";import"./Stack-b3992130.js";import"./createSvgIcon-fa140fa5.js";import"./TextareaAutosize-e216d6db.js";const $=({selectedType:t,setSelectedType:c})=>{const[p,d]=r.useState([]);r.useEffect(()=>{(async()=>{try{const{data:x}=await B();d(x.edge_types)}catch(x){console.warn(x)}})()},[d]);const n=o=>({label:o,value:o}),f=o=>{c((o==null?void 0:o.value)||"")};return e.jsx(I,{onSelect:f,options:p.map(n),selectedValue:t?n(t):null})},J=({onSelect:t,selectedValue:c,topicId:p})=>{const[d,n]=r.useState([]),[f,o]=r.useState(!1),x=r.useMemo(()=>{const s=async u=>{const i={is_muted:"False",sort_by:W,search:u,skip:"0",limit:"1000"};o(!0);try{const w=(await _(i.search)).data.filter(b=>(b==null?void 0:b.ref_id)!==p);n(w)}catch{n([])}finally{o(!1)}};return k.debounce(s,300)},[p]),m=s=>{const u=s.trim();if(!u){n([]);return}u.length>2&&x(s)},j=s=>{const u=s?d.find(i=>i.ref_id===s.value):null;t(u||null)},a=s=>({label:s.search_value,value:s.ref_id,type:s.node_type}),v=s=>s.map(a);return c?e.jsxs(h,{align:"center",basis:"100%",direction:"row",grow:1,shrink:1,children:[e.jsx("span",{children:c.search_value}),e.jsx(V,{onClick:()=>t(null),size:"medium",children:e.jsx(F,{})})]}):e.jsx(I,{handleInputChange:m,isLoading:f,onSelect:j,options:v(d)||O,selectedValue:c?a(c):null})},K=({from:t,onSelect:c,selectedType:p,setSelectedType:d,selectedToNode:n,setIsSwapped:f,isSwapped:o})=>{const x=()=>{f()},m=t&&("search_value"in t?t.search_value:t.name);return e.jsxs(h,{mb:20,children:[e.jsx(h,{align:"center",direction:"row",justify:"space-between",mb:18,children:e.jsx(h,{align:"center",direction:"row",children:e.jsx(U,{children:"Add Edge"})})}),e.jsxs(Z,{swap:o,children:[e.jsx(h,{children:e.jsx(ee,{disabled:!0,label:o?"To":"From",swap:o,value:m})}),e.jsxs(h,{my:16,children:[e.jsx(oe,{children:"Type"}),e.jsx($,{selectedType:p,setSelectedType:d})]}),e.jsx(h,{children:e.jsxs(te,{children:[e.jsx(se,{children:o?"From":"To"}),e.jsx(J,{onSelect:c,selectedValue:n,topicId:t==null?void 0:t.ref_id})]})}),e.jsxs(Q,{children:[e.jsx(ne,{children:e.jsx(X,{})}),e.jsx(ae,{onClick:x,children:e.jsx(G,{})}),e.jsx(ie,{children:e.jsx(H,{})})]})]})]})},Q=l.div` position: absolute; top: 26px; bottom: 26px; diff --git a/build/assets/index-6c946cd6.js b/build/assets/index-fe0be4c5.js similarity index 93% rename from build/assets/index-6c946cd6.js rename to build/assets/index-fe0be4c5.js index 78b607f59..473cf2e73 100644 --- a/build/assets/index-6c946cd6.js +++ b/build/assets/index-fe0be4c5.js @@ -1,4 +1,4 @@ -import{z as V,bV as C,bW as m,bX as F,s as B,T as k,F as d,ao as z,r as x,b as M,j as n,aV as $,aW as R,B as S,e as E,t as U,v as W,aU as A,aY as G}from"./index-17ed06be.js";import{n as I}from"./index-2f22123e.js";import{A as K}from"./index-9261e06d.js";import"./Stack-a8b59155.js";import"./createSvgIcon-6ef3ed46.js";import"./TextareaAutosize-f571cf36.js";const _="https://community.sphinx.chat",N=async e=>await V.post("/bounty",JSON.stringify(e)),O=async e=>await C(`${_}/person/${e}`,{headers:{"Content-Type":"application/json"},method:"GET"}),P=async e=>await C(`${_}/workspaces/user/${e}`,{headers:{"Content-Type":"application/json"},method:"GET"});async function q(){try{const e=Math.floor(Date.now()/1e3),t=m.Buffer.from(e.toString(16),"hex"),r=m.Buffer.from(t).toString("base64"),s=await F.signMessage(r),a=v(s.signature),l=m.Buffer.concat([t,a],a.length+t.length);return L(l)}catch(e){return console.log("error from signing more message: ",e),""}}function v(e){const t=e.replace(/_/g,"/").replace(/-/g,"+"),r=t.padEnd(t.length+(4-t.length%4)%4,"=");return m.Buffer.from(r,"base64")}function L(e){let t="";const r=e.byteLength;for(let a=0;a{const t=e.trim();return!!(t&&D.test(t))},J=({errMessage:e,handleClose:t})=>{const{setValue:r,watch:s}=z(),[a,l]=x.useState([]),{pubKey:c}=M();x.useEffect(()=>{async function o(){try{const i=await O(c);if(!i.id){l([{label:"SecondBrain",value:"SecondBrain"}]);return}const p=await P(i.id);if(p.length>0){const w=[];for(let b=0;b{const i=(o==null?void 0:o.label)||"SecondBrain",p=(o==null?void 0:o.value)||"ck9drb84nncjnaefo090";r("nodeType",i,{shouldValidate:!0}),r("workspaceUuid",p)},y=H(u)&&!!g,h=o=>{o.key===" "&&o.preventDefault()};return n.jsxs(d,{children:[n.jsx(d,{align:"center",direction:"row",justify:"space-between",mb:18,children:n.jsx(X,{children:"Create Bounty"})}),n.jsxs(d,{mb:20,children:[n.jsx(T,{children:"Select Workspace"}),n.jsx(K,{autoFocus:!0,onSelect:f,options:a})]}),n.jsxs(d,{mb:20,children:[n.jsx(T,{children:"Set Budget"}),n.jsx($,{id:"budget",name:"budget",onKeyDown:h,placeholder:"Enter budget",rules:{...R,pattern:{value:D,message:"Please enter a valid number"}},value:u})]}),n.jsxs(d,{direction:"row",children:[n.jsx(d,{grow:1,children:n.jsx(S,{color:"secondary",onClick:()=>t(),size:"large",variant:"contained",children:"Cancel"})}),n.jsx(d,{grow:1,ml:20,children:n.jsx(S,{color:"secondary",disabled:!y,size:"large",type:"submit",variant:"contained",children:"Confirm"})})]}),e&&n.jsx(Y,{children:e})]})},T=B(k)` +import{z as V,bV as C,bW as m,bX as F,s as B,T as k,F as d,ao as z,r as x,b as M,j as n,aV as $,aW as R,B as S,e as E,t as U,v as W,aU as A,aY as G}from"./index-787c3ef8.js";import{n as I}from"./index-77dce891.js";import{A as K}from"./index-efed0068.js";import"./Stack-b3992130.js";import"./createSvgIcon-fa140fa5.js";import"./TextareaAutosize-e216d6db.js";const _="https://community.sphinx.chat",N=async e=>await V.post("/bounty",JSON.stringify(e)),O=async e=>await C(`${_}/person/${e}`,{headers:{"Content-Type":"application/json"},method:"GET"}),P=async e=>await C(`${_}/workspaces/user/${e}`,{headers:{"Content-Type":"application/json"},method:"GET"});async function q(){try{const e=Math.floor(Date.now()/1e3),t=m.Buffer.from(e.toString(16),"hex"),r=m.Buffer.from(t).toString("base64"),s=await F.signMessage(r),a=v(s.signature),l=m.Buffer.concat([t,a],a.length+t.length);return L(l)}catch(e){return console.log("error from signing more message: ",e),""}}function v(e){const t=e.replace(/_/g,"/").replace(/-/g,"+"),r=t.padEnd(t.length+(4-t.length%4)%4,"=");return m.Buffer.from(r,"base64")}function L(e){let t="";const r=e.byteLength;for(let a=0;a{const t=e.trim();return!!(t&&D.test(t))},J=({errMessage:e,handleClose:t})=>{const{setValue:r,watch:s}=z(),[a,l]=x.useState([]),{pubKey:c}=M();x.useEffect(()=>{async function o(){try{const i=await O(c);if(!i.id){l([{label:"SecondBrain",value:"SecondBrain"}]);return}const p=await P(i.id);if(p.length>0){const w=[];for(let b=0;b{const i=(o==null?void 0:o.label)||"SecondBrain",p=(o==null?void 0:o.value)||"ck9drb84nncjnaefo090";r("nodeType",i,{shouldValidate:!0}),r("workspaceUuid",p)},y=H(u)&&!!g,h=o=>{o.key===" "&&o.preventDefault()};return n.jsxs(d,{children:[n.jsx(d,{align:"center",direction:"row",justify:"space-between",mb:18,children:n.jsx(X,{children:"Create Bounty"})}),n.jsxs(d,{mb:20,children:[n.jsx(T,{children:"Select Workspace"}),n.jsx(K,{autoFocus:!0,onSelect:f,options:a})]}),n.jsxs(d,{mb:20,children:[n.jsx(T,{children:"Set Budget"}),n.jsx($,{id:"budget",name:"budget",onKeyDown:h,placeholder:"Enter budget",rules:{...R,pattern:{value:D,message:"Please enter a valid number"}},value:u})]}),n.jsxs(d,{direction:"row",children:[n.jsx(d,{grow:1,children:n.jsx(S,{color:"secondary",onClick:()=>t(),size:"large",variant:"contained",children:"Cancel"})}),n.jsx(d,{grow:1,ml:20,children:n.jsx(S,{color:"secondary",disabled:!y,size:"large",type:"submit",variant:"contained",children:"Confirm"})})]}),e&&n.jsx(Y,{children:e})]})},T=B(k)` font-size: 14px; font-weight: 600; font-family: 'Barlow'; diff --git a/build/assets/isPlainObject-9d6a7051.js b/build/assets/isPlainObject-528c68e4.js similarity index 98% rename from build/assets/isPlainObject-9d6a7051.js rename to build/assets/isPlainObject-528c68e4.js index ee8365c9b..4a269d379 100644 --- a/build/assets/isPlainObject-9d6a7051.js +++ b/build/assets/isPlainObject-528c68e4.js @@ -1 +1 @@ -import{L as de,M as pe,O as M,X as Ne,x as S,aj as Ge,r as U,H as ge,j as E,U as H,Y as K,V as be,S as Ue,av as z,aw as B,aC as T,bM as he,aA as ve,a9 as X,bN as He,aG as Ke,bO as ze,bP as ye,bQ as Xe,bR as Ye,bS as Ze,aJ as ke,aM as _e,aB as Je,aI as Qe,bT as We,aH as me,bU as je}from"./index-17ed06be.js";import{u as Ve,b as $e,f as er,S as rr}from"./Stack-a8b59155.js";import{T as W}from"./Typography-5718a5a5.js";function ar(e){return de("PrivateSwitchBase",e)}pe("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const nr=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],tr=e=>{const{classes:r,checked:a,disabled:n,edge:s}=e,t={root:["root",a&&"checked",n&&"disabled",s&&`edge${K(s)}`],input:["input"]};return be(t,ar,r)},sr=M(Ne)(({ownerState:e})=>S({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),ir=M("input",{shouldForwardProp:Ge})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),or=U.forwardRef(function(r,a){const{autoFocus:n,checked:s,checkedIcon:t,className:i,defaultChecked:o,disabled:l,disableFocusRipple:c=!1,edge:d=!1,icon:f,id:u,inputProps:h,inputRef:p,name:g,onBlur:b,onChange:y,onFocus:v,readOnly:O,required:$=!1,tabIndex:_,type:P,value:L}=r,A=ge(r,nr),[w,xe]=Ve({controlled:s,default:!!o,name:"SwitchBase",state:"checked"}),C=$e(),Me=m=>{v&&v(m),C&&C.onFocus&&C.onFocus(m)},Be=m=>{b&&b(m),C&&C.onBlur&&C.onBlur(m)},qe=m=>{if(m.nativeEvent.defaultPrevented)return;const Q=m.target.checked;xe(Q),y&&y(m,Q)};let I=l;C&&typeof I>"u"&&(I=C.disabled);const De=P==="checkbox"||P==="radio",D=S({},r,{checked:w,disabled:I,disableFocusRipple:c,edge:d}),J=tr(D);return E.jsxs(sr,S({component:"span",className:H(J.root,i),centerRipple:!0,focusRipple:!c,disabled:I,tabIndex:null,role:void 0,onFocus:Me,onBlur:Be,ownerState:D,ref:a},A,{children:[E.jsx(ir,S({autoFocus:n,checked:s,defaultChecked:o,className:J.input,disabled:I,id:De?u:void 0,name:g,onChange:qe,readOnly:O,ref:p,required:$,ownerState:D,tabIndex:_,type:P},P==="checkbox"&&L===void 0?{}:{value:L},h)),w?t:f]}))}),ss=or;function lr(e){return de("MuiFormControlLabel",e)}const ur=pe("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),F=ur,cr=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],fr=e=>{const{classes:r,disabled:a,labelPlacement:n,error:s,required:t}=e,i={root:["root",a&&"disabled",`labelPlacement${K(n)}`,s&&"error",t&&"required"],label:["label",a&&"disabled"],asterisk:["asterisk",s&&"error"]};return be(i,lr,r)},dr=M("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:a}=e;return[{[`& .${F.label}`]:r.label},r.root,r[`labelPlacement${K(a.labelPlacement)}`]]}})(({theme:e,ownerState:r})=>S({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${F.disabled}`]:{cursor:"default"}},r.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},r.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},r.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${F.label}`]:{[`&.${F.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),pr=M("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,r)=>r.asterisk})(({theme:e})=>({[`&.${F.error}`]:{color:(e.vars||e).palette.error.main}})),gr=U.forwardRef(function(r,a){var n,s;const t=Ue({props:r,name:"MuiFormControlLabel"}),{className:i,componentsProps:o={},control:l,disabled:c,disableTypography:d,label:f,labelPlacement:u="end",required:h,slotProps:p={}}=t,g=ge(t,cr),b=$e(),y=(n=c??l.props.disabled)!=null?n:b==null?void 0:b.disabled,v=h??l.props.required,O={disabled:y,required:v};["checked","name","onChange","value","inputRef"].forEach(w=>{typeof l.props[w]>"u"&&typeof t[w]<"u"&&(O[w]=t[w])});const $=er({props:t,muiFormControl:b,states:["error"]}),_=S({},t,{disabled:y,labelPlacement:u,required:v,error:$.error}),P=fr(_),L=(s=p.typography)!=null?s:o.typography;let A=f;return A!=null&&A.type!==W&&!d&&(A=E.jsx(W,S({component:"span"},L,{className:H(P.label,L==null?void 0:L.className),children:A}))),E.jsxs(dr,S({className:H(P.root,i),ownerState:_,ref:a},g,{children:[U.cloneElement(l,O),v?E.jsxs(rr,{display:"block",children:[A,E.jsxs(pr,{ownerState:_,"aria-hidden":!0,className:P.asterisk,children:[" ","*"]})]}):A]}))}),is=gr;var br=z,hr=B,vr="[object Symbol]";function yr(e){return typeof e=="symbol"||hr(e)&&br(e)==vr}var Y=yr,_r=T,mr=Y,$r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pr=/^\w*$/;function Ar(e,r){if(_r(e))return!1;var a=typeof e;return a=="number"||a=="symbol"||a=="boolean"||e==null||mr(e)?!0:Pr.test(e)||!$r.test(e)||r!=null&&e in Object(r)}var Z=Ar,Pe=he,Cr="Expected a function";function k(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(Cr);var a=function(){var n=arguments,s=r?r.apply(this,n):n[0],t=a.cache;if(t.has(s))return t.get(s);var i=e.apply(this,n);return a.cache=t.set(s,i)||t,i};return a.cache=new(k.Cache||Pe),a}k.Cache=Pe;var Sr=k,Tr=Sr,Or=500;function wr(e){var r=Tr(e,function(n){return a.size===Or&&a.clear(),n}),a=r.cache;return r}var Lr=wr,Er=Lr,Ir=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fr=/\\(\\)?/g,Rr=Er(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(Ir,function(a,n,s,t){r.push(s?t.replace(Fr,"$1"):n||a)}),r}),xr=Rr;function Mr(e,r){for(var a=-1,n=e==null?0:e.length,s=Array(n);++ao))return!1;var c=t.get(e),d=t.get(r);if(c&&d)return c==r&&d==e;var f=-1,u=!0,h=a&Ta?new Pa:void 0;for(t.set(e,r),t.set(r,e);++f{const{classes:r,checked:a,disabled:n,edge:s}=e,t={root:["root",a&&"checked",n&&"disabled",s&&`edge${K(s)}`],input:["input"]};return be(t,ar,r)},sr=M(Ne)(({ownerState:e})=>S({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),ir=M("input",{shouldForwardProp:Ge})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),or=U.forwardRef(function(r,a){const{autoFocus:n,checked:s,checkedIcon:t,className:i,defaultChecked:o,disabled:l,disableFocusRipple:c=!1,edge:d=!1,icon:f,id:u,inputProps:h,inputRef:p,name:g,onBlur:b,onChange:y,onFocus:v,readOnly:O,required:$=!1,tabIndex:_,type:P,value:L}=r,A=ge(r,nr),[w,xe]=Ve({controlled:s,default:!!o,name:"SwitchBase",state:"checked"}),C=$e(),Me=m=>{v&&v(m),C&&C.onFocus&&C.onFocus(m)},Be=m=>{b&&b(m),C&&C.onBlur&&C.onBlur(m)},qe=m=>{if(m.nativeEvent.defaultPrevented)return;const Q=m.target.checked;xe(Q),y&&y(m,Q)};let I=l;C&&typeof I>"u"&&(I=C.disabled);const De=P==="checkbox"||P==="radio",D=S({},r,{checked:w,disabled:I,disableFocusRipple:c,edge:d}),J=tr(D);return E.jsxs(sr,S({component:"span",className:H(J.root,i),centerRipple:!0,focusRipple:!c,disabled:I,tabIndex:null,role:void 0,onFocus:Me,onBlur:Be,ownerState:D,ref:a},A,{children:[E.jsx(ir,S({autoFocus:n,checked:s,defaultChecked:o,className:J.input,disabled:I,id:De?u:void 0,name:g,onChange:qe,readOnly:O,ref:p,required:$,ownerState:D,tabIndex:_,type:P},P==="checkbox"&&L===void 0?{}:{value:L},h)),w?t:f]}))}),ss=or;function lr(e){return de("MuiFormControlLabel",e)}const ur=pe("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),F=ur,cr=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],fr=e=>{const{classes:r,disabled:a,labelPlacement:n,error:s,required:t}=e,i={root:["root",a&&"disabled",`labelPlacement${K(n)}`,s&&"error",t&&"required"],label:["label",a&&"disabled"],asterisk:["asterisk",s&&"error"]};return be(i,lr,r)},dr=M("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:a}=e;return[{[`& .${F.label}`]:r.label},r.root,r[`labelPlacement${K(a.labelPlacement)}`]]}})(({theme:e,ownerState:r})=>S({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${F.disabled}`]:{cursor:"default"}},r.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},r.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},r.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${F.label}`]:{[`&.${F.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),pr=M("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,r)=>r.asterisk})(({theme:e})=>({[`&.${F.error}`]:{color:(e.vars||e).palette.error.main}})),gr=U.forwardRef(function(r,a){var n,s;const t=Ue({props:r,name:"MuiFormControlLabel"}),{className:i,componentsProps:o={},control:l,disabled:c,disableTypography:d,label:f,labelPlacement:u="end",required:h,slotProps:p={}}=t,g=ge(t,cr),b=$e(),y=(n=c??l.props.disabled)!=null?n:b==null?void 0:b.disabled,v=h??l.props.required,O={disabled:y,required:v};["checked","name","onChange","value","inputRef"].forEach(w=>{typeof l.props[w]>"u"&&typeof t[w]<"u"&&(O[w]=t[w])});const $=er({props:t,muiFormControl:b,states:["error"]}),_=S({},t,{disabled:y,labelPlacement:u,required:v,error:$.error}),P=fr(_),L=(s=p.typography)!=null?s:o.typography;let A=f;return A!=null&&A.type!==W&&!d&&(A=E.jsx(W,S({component:"span"},L,{className:H(P.label,L==null?void 0:L.className),children:A}))),E.jsxs(dr,S({className:H(P.root,i),ownerState:_,ref:a},g,{children:[U.cloneElement(l,O),v?E.jsxs(rr,{display:"block",children:[A,E.jsxs(pr,{ownerState:_,"aria-hidden":!0,className:P.asterisk,children:[" ","*"]})]}):A]}))}),is=gr;var br=z,hr=B,vr="[object Symbol]";function yr(e){return typeof e=="symbol"||hr(e)&&br(e)==vr}var Y=yr,_r=T,mr=Y,$r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pr=/^\w*$/;function Ar(e,r){if(_r(e))return!1;var a=typeof e;return a=="number"||a=="symbol"||a=="boolean"||e==null||mr(e)?!0:Pr.test(e)||!$r.test(e)||r!=null&&e in Object(r)}var Z=Ar,Pe=he,Cr="Expected a function";function k(e,r){if(typeof e!="function"||r!=null&&typeof r!="function")throw new TypeError(Cr);var a=function(){var n=arguments,s=r?r.apply(this,n):n[0],t=a.cache;if(t.has(s))return t.get(s);var i=e.apply(this,n);return a.cache=t.set(s,i)||t,i};return a.cache=new(k.Cache||Pe),a}k.Cache=Pe;var Sr=k,Tr=Sr,Or=500;function wr(e){var r=Tr(e,function(n){return a.size===Or&&a.clear(),n}),a=r.cache;return r}var Lr=wr,Er=Lr,Ir=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fr=/\\(\\)?/g,Rr=Er(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(""),e.replace(Ir,function(a,n,s,t){r.push(s?t.replace(Fr,"$1"):n||a)}),r}),xr=Rr;function Mr(e,r){for(var a=-1,n=e==null?0:e.length,s=Array(n);++ao))return!1;var c=t.get(e),d=t.get(r);if(c&&d)return c==r&&d==e;var f=-1,u=!0,h=a&Ta?new Pa:void 0;for(t.set(e,r),t.set(r,e);++f Second Brain - +