diff --git a/build/assets/index-99802227.js b/build/assets/index-59a13997.js similarity index 99% rename from build/assets/index-99802227.js rename to build/assets/index-59a13997.js index f9a03564e..7f87db9a7 100644 --- a/build/assets/index-99802227.js +++ b/build/assets/index-59a13997.js @@ -1,4 +1,4 @@ -var r4=Object.defineProperty;var i4=(tt,et,nt)=>et in tt?r4(tt,et,{enumerable:!0,configurable:!0,writable:!0,value:nt}):tt[et]=nt;var o4=(tt,et)=>()=>(et||tt((et={exports:{}}).exports,et),et.exports);var mw=(tt,et,nt)=>(i4(tt,typeof et!="symbol"?et+"":et,nt),nt);var s4=o4((exports,module)=>{function _mergeNamespaces(tt,et){for(var nt=0;ntrt[it]})}}}return Object.freeze(Object.defineProperty(tt,Symbol.toStringTag,{value:"Module"}))}(function(){const et=document.createElement("link").relList;if(et&&et.supports&&et.supports("modulepreload"))return;for(const it of document.querySelectorAll('link[rel="modulepreload"]'))rt(it);new MutationObserver(it=>{for(const ot of it)if(ot.type==="childList")for(const at of ot.addedNodes)at.tagName==="LINK"&&at.rel==="modulepreload"&&rt(at)}).observe(document,{childList:!0,subtree:!0});function nt(it){const ot={};return it.integrity&&(ot.integrity=it.integrity),it.referrerPolicy&&(ot.referrerPolicy=it.referrerPolicy),it.crossOrigin==="use-credentials"?ot.credentials="include":it.crossOrigin==="anonymous"?ot.credentials="omit":ot.credentials="same-origin",ot}function rt(it){if(it.ep)return;it.ep=!0;const ot=nt(it);fetch(it.href,ot)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(tt){return tt&&tt.__esModule&&Object.prototype.hasOwnProperty.call(tt,"default")?tt.default:tt}function getAugmentedNamespace(tt){if(tt.__esModule)return tt;var et=tt.default;if(typeof et=="function"){var nt=function rt(){return this instanceof rt?Reflect.construct(et,arguments,this.constructor):et.apply(this,arguments)};nt.prototype=et.prototype}else nt={};return Object.defineProperty(nt,"__esModule",{value:!0}),Object.keys(tt).forEach(function(rt){var it=Object.getOwnPropertyDescriptor(tt,rt);Object.defineProperty(nt,rt,it.get?it:{enumerable:!0,get:function(){return tt[rt]}})}),nt}var buffer$2={},base64Js={};base64Js.byteLength=byteLength$1;base64Js.toByteArray=toByteArray;base64Js.fromByteArray=fromByteArray;var lookup$2=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i$8=0,len=code.length;i$80)throw new Error("Invalid string. Length must be a multiple of 4");var nt=tt.indexOf("=");nt===-1&&(nt=et);var rt=nt===et?0:4-nt%4;return[nt,rt]}function byteLength$1(tt){var et=getLens(tt),nt=et[0],rt=et[1];return(nt+rt)*3/4-rt}function _byteLength(tt,et,nt){return(et+nt)*3/4-nt}function toByteArray(tt){var et,nt=getLens(tt),rt=nt[0],it=nt[1],ot=new Arr(_byteLength(tt,rt,it)),at=0,st=it>0?rt-4:rt,lt;for(lt=0;lt>16&255,ot[at++]=et>>8&255,ot[at++]=et&255;return it===2&&(et=revLookup[tt.charCodeAt(lt)]<<2|revLookup[tt.charCodeAt(lt+1)]>>4,ot[at++]=et&255),it===1&&(et=revLookup[tt.charCodeAt(lt)]<<10|revLookup[tt.charCodeAt(lt+1)]<<4|revLookup[tt.charCodeAt(lt+2)]>>2,ot[at++]=et>>8&255,ot[at++]=et&255),ot}function tripletToBase64(tt){return lookup$2[tt>>18&63]+lookup$2[tt>>12&63]+lookup$2[tt>>6&63]+lookup$2[tt&63]}function encodeChunk(tt,et,nt){for(var rt,it=[],ot=et;otst?st:at+ot));return rt===1?(et=tt[nt-1],it.push(lookup$2[et>>2]+lookup$2[et<<4&63]+"==")):rt===2&&(et=(tt[nt-2]<<8)+tt[nt-1],it.push(lookup$2[et>>10]+lookup$2[et>>4&63]+lookup$2[et<<2&63]+"=")),it.join("")}var ieee754={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ieee754.read=function(tt,et,nt,rt,it){var ot,at,st=it*8-rt-1,lt=(1<>1,ut=-7,ht=nt?it-1:0,dt=nt?-1:1,pt=tt[et+ht];for(ht+=dt,ot=pt&(1<<-ut)-1,pt>>=-ut,ut+=st;ut>0;ot=ot*256+tt[et+ht],ht+=dt,ut-=8);for(at=ot&(1<<-ut)-1,ot>>=-ut,ut+=rt;ut>0;at=at*256+tt[et+ht],ht+=dt,ut-=8);if(ot===0)ot=1-ct;else{if(ot===lt)return at?NaN:(pt?-1:1)*(1/0);at=at+Math.pow(2,rt),ot=ot-ct}return(pt?-1:1)*at*Math.pow(2,ot-rt)};ieee754.write=function(tt,et,nt,rt,it,ot){var at,st,lt,ct=ot*8-it-1,ut=(1<>1,dt=it===23?Math.pow(2,-24)-Math.pow(2,-77):0,pt=rt?0:ot-1,mt=rt?1:-1,gt=et<0||et===0&&1/et<0?1:0;for(et=Math.abs(et),isNaN(et)||et===1/0?(st=isNaN(et)?1:0,at=ut):(at=Math.floor(Math.log(et)/Math.LN2),et*(lt=Math.pow(2,-at))<1&&(at--,lt*=2),at+ht>=1?et+=dt/lt:et+=dt*Math.pow(2,1-ht),et*lt>=2&&(at++,lt/=2),at+ht>=ut?(st=0,at=ut):at+ht>=1?(st=(et*lt-1)*Math.pow(2,it),at=at+ht):(st=et*Math.pow(2,ht-1)*Math.pow(2,it),at=0));it>=8;tt[nt+pt]=st&255,pt+=mt,st/=256,it-=8);for(at=at<0;tt[nt+pt]=at&255,pt+=mt,at/=256,ct-=8);tt[nt+pt-mt]|=gt*128};/*! +var i4=Object.defineProperty;var o4=(tt,et,nt)=>et in tt?i4(tt,et,{enumerable:!0,configurable:!0,writable:!0,value:nt}):tt[et]=nt;var s4=(tt,et)=>()=>(et||tt((et={exports:{}}).exports,et),et.exports);var gw=(tt,et,nt)=>(o4(tt,typeof et!="symbol"?et+"":et,nt),nt);var l4=s4((exports,module)=>{function _mergeNamespaces(tt,et){for(var nt=0;ntrt[it]})}}}return Object.freeze(Object.defineProperty(tt,Symbol.toStringTag,{value:"Module"}))}(function(){const et=document.createElement("link").relList;if(et&&et.supports&&et.supports("modulepreload"))return;for(const it of document.querySelectorAll('link[rel="modulepreload"]'))rt(it);new MutationObserver(it=>{for(const ot of it)if(ot.type==="childList")for(const at of ot.addedNodes)at.tagName==="LINK"&&at.rel==="modulepreload"&&rt(at)}).observe(document,{childList:!0,subtree:!0});function nt(it){const ot={};return it.integrity&&(ot.integrity=it.integrity),it.referrerPolicy&&(ot.referrerPolicy=it.referrerPolicy),it.crossOrigin==="use-credentials"?ot.credentials="include":it.crossOrigin==="anonymous"?ot.credentials="omit":ot.credentials="same-origin",ot}function rt(it){if(it.ep)return;it.ep=!0;const ot=nt(it);fetch(it.href,ot)}})();var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(tt){return tt&&tt.__esModule&&Object.prototype.hasOwnProperty.call(tt,"default")?tt.default:tt}function getAugmentedNamespace(tt){if(tt.__esModule)return tt;var et=tt.default;if(typeof et=="function"){var nt=function rt(){return this instanceof rt?Reflect.construct(et,arguments,this.constructor):et.apply(this,arguments)};nt.prototype=et.prototype}else nt={};return Object.defineProperty(nt,"__esModule",{value:!0}),Object.keys(tt).forEach(function(rt){var it=Object.getOwnPropertyDescriptor(tt,rt);Object.defineProperty(nt,rt,it.get?it:{enumerable:!0,get:function(){return tt[rt]}})}),nt}var buffer$2={},base64Js={};base64Js.byteLength=byteLength$1;base64Js.toByteArray=toByteArray;base64Js.fromByteArray=fromByteArray;var lookup$2=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i$8=0,len=code.length;i$80)throw new Error("Invalid string. Length must be a multiple of 4");var nt=tt.indexOf("=");nt===-1&&(nt=et);var rt=nt===et?0:4-nt%4;return[nt,rt]}function byteLength$1(tt){var et=getLens(tt),nt=et[0],rt=et[1];return(nt+rt)*3/4-rt}function _byteLength(tt,et,nt){return(et+nt)*3/4-nt}function toByteArray(tt){var et,nt=getLens(tt),rt=nt[0],it=nt[1],ot=new Arr(_byteLength(tt,rt,it)),at=0,st=it>0?rt-4:rt,lt;for(lt=0;lt>16&255,ot[at++]=et>>8&255,ot[at++]=et&255;return it===2&&(et=revLookup[tt.charCodeAt(lt)]<<2|revLookup[tt.charCodeAt(lt+1)]>>4,ot[at++]=et&255),it===1&&(et=revLookup[tt.charCodeAt(lt)]<<10|revLookup[tt.charCodeAt(lt+1)]<<4|revLookup[tt.charCodeAt(lt+2)]>>2,ot[at++]=et>>8&255,ot[at++]=et&255),ot}function tripletToBase64(tt){return lookup$2[tt>>18&63]+lookup$2[tt>>12&63]+lookup$2[tt>>6&63]+lookup$2[tt&63]}function encodeChunk(tt,et,nt){for(var rt,it=[],ot=et;otst?st:at+ot));return rt===1?(et=tt[nt-1],it.push(lookup$2[et>>2]+lookup$2[et<<4&63]+"==")):rt===2&&(et=(tt[nt-2]<<8)+tt[nt-1],it.push(lookup$2[et>>10]+lookup$2[et>>4&63]+lookup$2[et<<2&63]+"=")),it.join("")}var ieee754={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ieee754.read=function(tt,et,nt,rt,it){var ot,at,st=it*8-rt-1,lt=(1<>1,ut=-7,ht=nt?it-1:0,dt=nt?-1:1,pt=tt[et+ht];for(ht+=dt,ot=pt&(1<<-ut)-1,pt>>=-ut,ut+=st;ut>0;ot=ot*256+tt[et+ht],ht+=dt,ut-=8);for(at=ot&(1<<-ut)-1,ot>>=-ut,ut+=rt;ut>0;at=at*256+tt[et+ht],ht+=dt,ut-=8);if(ot===0)ot=1-ct;else{if(ot===lt)return at?NaN:(pt?-1:1)*(1/0);at=at+Math.pow(2,rt),ot=ot-ct}return(pt?-1:1)*at*Math.pow(2,ot-rt)};ieee754.write=function(tt,et,nt,rt,it,ot){var at,st,lt,ct=ot*8-it-1,ut=(1<>1,dt=it===23?Math.pow(2,-24)-Math.pow(2,-77):0,pt=rt?0:ot-1,mt=rt?1:-1,gt=et<0||et===0&&1/et<0?1:0;for(et=Math.abs(et),isNaN(et)||et===1/0?(st=isNaN(et)?1:0,at=ut):(at=Math.floor(Math.log(et)/Math.LN2),et*(lt=Math.pow(2,-at))<1&&(at--,lt*=2),at+ht>=1?et+=dt/lt:et+=dt*Math.pow(2,1-ht),et*lt>=2&&(at++,lt/=2),at+ht>=ut?(st=0,at=ut):at+ht>=1?(st=(et*lt-1)*Math.pow(2,it),at=at+ht):(st=et*Math.pow(2,ht-1)*Math.pow(2,it),at=0));it>=8;tt[nt+pt]=st&255,pt+=mt,st/=256,it-=8);for(at=at<0;tt[nt+pt]=at&255,pt+=mt,at/=256,ct-=8);tt[nt+pt-mt]|=gt*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh @@ -193,7 +193,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho animation-delay: 200ms; } `),touchRippleClasses$1.rippleVisible,enterKeyframe,DURATION,({theme:tt})=>tt.transitions.easing.easeInOut,touchRippleClasses$1.ripplePulsate,({theme:tt})=>tt.transitions.duration.shorter,touchRippleClasses$1.child,touchRippleClasses$1.childLeaving,exitKeyframe,DURATION,({theme:tt})=>tt.transitions.easing.easeInOut,touchRippleClasses$1.childPulsate,pulsateKeyframe,({theme:tt})=>tt.transitions.easing.easeInOut),TouchRipple=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiTouchRipple"}),{center:it=!1,classes:ot={},className:at}=rt,st=_objectWithoutPropertiesLoose$m(rt,_excluded$1v),[lt,ct]=reactExports.useState([]),ut=reactExports.useRef(0),ht=reactExports.useRef(null);reactExports.useEffect(()=>{ht.current&&(ht.current(),ht.current=null)},[lt]);const dt=reactExports.useRef(!1),pt=reactExports.useRef(0),mt=reactExports.useRef(null),gt=reactExports.useRef(null);reactExports.useEffect(()=>()=>{pt.current&&clearTimeout(pt.current)},[]);const yt=reactExports.useCallback(kt=>{const{pulsate:St,rippleX:Tt,rippleY:At,rippleSize:Et,cb:$t}=kt;ct(Dt=>[...Dt,jsxRuntimeExports.jsx(TouchRippleRipple,{classes:{ripple:clsx$3(ot.ripple,touchRippleClasses$1.ripple),rippleVisible:clsx$3(ot.rippleVisible,touchRippleClasses$1.rippleVisible),ripplePulsate:clsx$3(ot.ripplePulsate,touchRippleClasses$1.ripplePulsate),child:clsx$3(ot.child,touchRippleClasses$1.child),childLeaving:clsx$3(ot.childLeaving,touchRippleClasses$1.childLeaving),childPulsate:clsx$3(ot.childPulsate,touchRippleClasses$1.childPulsate)},timeout:DURATION,pulsate:St,rippleX:Tt,rippleY:At,rippleSize:Et},ut.current)]),ut.current+=1,ht.current=$t},[ot]),bt=reactExports.useCallback((kt={},St={},Tt=()=>{})=>{const{pulsate:At=!1,center:Et=it||St.pulsate,fakeElement:$t=!1}=St;if((kt==null?void 0:kt.type)==="mousedown"&&dt.current){dt.current=!1;return}(kt==null?void 0:kt.type)==="touchstart"&&(dt.current=!0);const Dt=$t?null:gt.current,jt=Dt?Dt.getBoundingClientRect():{width:0,height:0,left:0,top:0};let Pt,Ct,wt;if(Et||kt===void 0||kt.clientX===0&&kt.clientY===0||!kt.clientX&&!kt.touches)Pt=Math.round(jt.width/2),Ct=Math.round(jt.height/2);else{const{clientX:It,clientY:Ot}=kt.touches&&kt.touches.length>0?kt.touches[0]:kt;Pt=Math.round(It-jt.left),Ct=Math.round(Ot-jt.top)}if(Et)wt=Math.sqrt((2*jt.width**2+jt.height**2)/3),wt%2===0&&(wt+=1);else{const It=Math.max(Math.abs((Dt?Dt.clientWidth:0)-Pt),Pt)*2+2,Ot=Math.max(Math.abs((Dt?Dt.clientHeight:0)-Ct),Ct)*2+2;wt=Math.sqrt(It**2+Ot**2)}kt!=null&&kt.touches?mt.current===null&&(mt.current=()=>{yt({pulsate:At,rippleX:Pt,rippleY:Ct,rippleSize:wt,cb:Tt})},pt.current=setTimeout(()=>{mt.current&&(mt.current(),mt.current=null)},DELAY_RIPPLE)):yt({pulsate:At,rippleX:Pt,rippleY:Ct,rippleSize:wt,cb:Tt})},[it,yt]),vt=reactExports.useCallback(()=>{bt({},{pulsate:!0})},[bt]),xt=reactExports.useCallback((kt,St)=>{if(clearTimeout(pt.current),(kt==null?void 0:kt.type)==="touchend"&&mt.current){mt.current(),mt.current=null,pt.current=setTimeout(()=>{xt(kt,St)});return}mt.current=null,ct(Tt=>Tt.length>0?Tt.slice(1):Tt),ht.current=St},[]);return reactExports.useImperativeHandle(nt,()=>({pulsate:vt,start:bt,stop:xt}),[vt,bt,xt]),jsxRuntimeExports.jsx(TouchRippleRoot,_extends$u({className:clsx$3(touchRippleClasses$1.root,ot.root,at),ref:gt},st,{children:jsxRuntimeExports.jsx(TransitionGroup$1,{component:null,exit:!0,children:lt})}))}),TouchRipple$1=TouchRipple;function getButtonBaseUtilityClass(tt){return generateUtilityClass("MuiButtonBase",tt)}const buttonBaseClasses=generateUtilityClasses("MuiButtonBase",["root","disabled","focusVisible"]),buttonBaseClasses$1=buttonBaseClasses,_excluded$1u=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],useUtilityClasses$U=tt=>{const{disabled:et,focusVisible:nt,focusVisibleClassName:rt,classes:it}=tt,at=composeClasses({root:["root",et&&"disabled",nt&&"focusVisible"]},getButtonBaseUtilityClass,it);return nt&&rt&&(at.root+=` ${rt}`),at},ButtonBaseRoot=styled$1("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${buttonBaseClasses$1.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ButtonBase=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiButtonBase"}),{action:it,centerRipple:ot=!1,children:at,className:st,component:lt="button",disabled:ct=!1,disableRipple:ut=!1,disableTouchRipple:ht=!1,focusRipple:dt=!1,LinkComponent:pt="a",onBlur:mt,onClick:gt,onContextMenu:yt,onDragLeave:bt,onFocus:vt,onFocusVisible:xt,onKeyDown:kt,onKeyUp:St,onMouseDown:Tt,onMouseLeave:At,onMouseUp:Et,onTouchEnd:$t,onTouchMove:Dt,onTouchStart:jt,tabIndex:Pt=0,TouchRippleProps:Ct,touchRippleRef:wt,type:It}=rt,Ot=_objectWithoutPropertiesLoose$m(rt,_excluded$1u),Wt=reactExports.useRef(null),zt=reactExports.useRef(null),Ft=useForkRef(zt,wt),{isFocusVisibleRef:Nt,onFocus:Ut,onBlur:Mt,ref:Ht}=useIsFocusVisible(),[en,sn]=reactExports.useState(!1);ct&&en&&sn(!1),reactExports.useImperativeHandle(it,()=>({focusVisible:()=>{sn(!0),Wt.current.focus()}}),[]);const[Kt,rn]=reactExports.useState(!1);reactExports.useEffect(()=>{rn(!0)},[]);const nn=Kt&&!ut&&!ct;reactExports.useEffect(()=>{en&&dt&&!ut&&Kt&&zt.current.pulsate()},[ut,dt,en,Kt]);function hn(Xt,Sn,Rn=ht){return useEventCallback(jn=>(Sn&&Sn(jn),!Rn&&zt.current&&zt.current[Xt](jn),!0))}const vn=hn("start",Tt),an=hn("stop",yt),Qt=hn("stop",bt),_n=hn("stop",Et),Pn=hn("stop",Xt=>{en&&Xt.preventDefault(),At&&At(Xt)}),$n=hn("start",jt),Nn=hn("stop",$t),Tn=hn("stop",Dt),cn=hn("stop",Xt=>{Mt(Xt),Nt.current===!1&&sn(!1),mt&&mt(Xt)},!1),mn=useEventCallback(Xt=>{Wt.current||(Wt.current=Xt.currentTarget),Ut(Xt),Nt.current===!0&&(sn(!0),xt&&xt(Xt)),vt&&vt(Xt)}),In=()=>{const Xt=Wt.current;return lt&<!=="button"&&!(Xt.tagName==="A"&&Xt.href)},An=reactExports.useRef(!1),wn=useEventCallback(Xt=>{dt&&!An.current&&en&&zt.current&&Xt.key===" "&&(An.current=!0,zt.current.stop(Xt,()=>{zt.current.start(Xt)})),Xt.target===Xt.currentTarget&&In()&&Xt.key===" "&&Xt.preventDefault(),kt&&kt(Xt),Xt.target===Xt.currentTarget&&In()&&Xt.key==="Enter"&&!ct&&(Xt.preventDefault(),gt&>(Xt))}),fn=useEventCallback(Xt=>{dt&&Xt.key===" "&&zt.current&&en&&!Xt.defaultPrevented&&(An.current=!1,zt.current.stop(Xt,()=>{zt.current.pulsate(Xt)})),St&&St(Xt),gt&&Xt.target===Xt.currentTarget&&In()&&Xt.key===" "&&!Xt.defaultPrevented&>(Xt)});let pn=lt;pn==="button"&&(Ot.href||Ot.to)&&(pn=pt);const kn={};pn==="button"?(kn.type=It===void 0?"button":It,kn.disabled=ct):(!Ot.href&&!Ot.to&&(kn.role="button"),ct&&(kn["aria-disabled"]=ct));const Dn=useForkRef(nt,Ht,Wt),un=_extends$u({},rt,{centerRipple:ot,component:lt,disabled:ct,disableRipple:ut,disableTouchRipple:ht,focusRipple:dt,tabIndex:Pt,focusVisible:en}),Zt=useUtilityClasses$U(un);return jsxRuntimeExports.jsxs(ButtonBaseRoot,_extends$u({as:pn,className:clsx$3(Zt.root,st),ownerState:un,onBlur:cn,onClick:gt,onContextMenu:an,onFocus:mn,onKeyDown:wn,onKeyUp:fn,onMouseDown:vn,onMouseLeave:Pn,onMouseUp:_n,onDragLeave:Qt,onTouchEnd:Nn,onTouchMove:Tn,onTouchStart:$n,ref:Dn,tabIndex:ct?-1:Pt,type:It},kn,Ot,{children:[at,nn?jsxRuntimeExports.jsx(TouchRipple$1,_extends$u({ref:Ft,center:ot},Ct)):null]}))}),ButtonBase$1=ButtonBase;function getIconButtonUtilityClass(tt){return generateUtilityClass("MuiIconButton",tt)}const iconButtonClasses=generateUtilityClasses("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),iconButtonClasses$1=iconButtonClasses,_excluded$1t=["edge","children","className","color","disabled","disableFocusRipple","size"],useUtilityClasses$T=tt=>{const{classes:et,disabled:nt,color:rt,edge:it,size:ot}=tt,at={root:["root",nt&&"disabled",rt!=="default"&&`color${capitalize(rt)}`,it&&`edge${capitalize(it)}`,`size${capitalize(ot)}`]};return composeClasses(at,getIconButtonUtilityClass,et)},IconButtonRoot=styled$1(ButtonBase$1,{name:"MuiIconButton",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.color!=="default"&&et[`color${capitalize(nt.color)}`],nt.edge&&et[`edge${capitalize(nt.edge)}`],et[`size${capitalize(nt.size)}`]]}})(({theme:tt,ownerState:et})=>_extends$u({textAlign:"center",flex:"0 0 auto",fontSize:tt.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(tt.vars||tt).palette.action.active,transition:tt.transitions.create("background-color",{duration:tt.transitions.duration.shortest})},!et.disableRipple&&{"&:hover":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette.action.active,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},et.edge==="start"&&{marginLeft:et.size==="small"?-3:-12},et.edge==="end"&&{marginRight:et.size==="small"?-3:-12}),({theme:tt,ownerState:et})=>{var nt;const rt=(nt=(tt.vars||tt).palette)==null?void 0:nt[et.color];return _extends$u({},et.color==="inherit"&&{color:"inherit"},et.color!=="inherit"&&et.color!=="default"&&_extends$u({color:rt==null?void 0:rt.main},!et.disableRipple&&{"&:hover":_extends$u({},rt&&{backgroundColor:tt.vars?`rgba(${rt.mainChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(rt.main,tt.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),et.size==="small"&&{padding:5,fontSize:tt.typography.pxToRem(18)},et.size==="large"&&{padding:12,fontSize:tt.typography.pxToRem(28)},{[`&.${iconButtonClasses$1.disabled}`]:{backgroundColor:"transparent",color:(tt.vars||tt).palette.action.disabled}})}),IconButton$1=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiIconButton"}),{edge:it=!1,children:ot,className:at,color:st="default",disabled:lt=!1,disableFocusRipple:ct=!1,size:ut="medium"}=rt,ht=_objectWithoutPropertiesLoose$m(rt,_excluded$1t),dt=_extends$u({},rt,{edge:it,color:st,disabled:lt,disableFocusRipple:ct,size:ut}),pt=useUtilityClasses$T(dt);return jsxRuntimeExports.jsx(IconButtonRoot,_extends$u({className:clsx$3(pt.root,at),centerRipple:!0,focusRipple:!ct,disabled:lt,ref:nt,ownerState:dt},ht,{children:ot}))}),IconButton$2=IconButton$1;function getTypographyUtilityClass(tt){return generateUtilityClass("MuiTypography",tt)}generateUtilityClasses("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const _excluded$1s=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],useUtilityClasses$S=tt=>{const{align:et,gutterBottom:nt,noWrap:rt,paragraph:it,variant:ot,classes:at}=tt,st={root:["root",ot,tt.align!=="inherit"&&`align${capitalize(et)}`,nt&&"gutterBottom",rt&&"noWrap",it&&"paragraph"]};return composeClasses(st,getTypographyUtilityClass,at)},TypographyRoot=styled$1("span",{name:"MuiTypography",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.variant&&et[nt.variant],nt.align!=="inherit"&&et[`align${capitalize(nt.align)}`],nt.noWrap&&et.noWrap,nt.gutterBottom&&et.gutterBottom,nt.paragraph&&et.paragraph]}})(({theme:tt,ownerState:et})=>_extends$u({margin:0},et.variant==="inherit"&&{font:"inherit"},et.variant!=="inherit"&&tt.typography[et.variant],et.align!=="inherit"&&{textAlign:et.align},et.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},et.gutterBottom&&{marginBottom:"0.35em"},et.paragraph&&{marginBottom:16})),defaultVariantMapping={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},colorTransformations={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},transformDeprecatedColors=tt=>colorTransformations[tt]||tt,Typography=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiTypography"}),it=transformDeprecatedColors(rt.color),ot=extendSxProp(_extends$u({},rt,{color:it})),{align:at="inherit",className:st,component:lt,gutterBottom:ct=!1,noWrap:ut=!1,paragraph:ht=!1,variant:dt="body1",variantMapping:pt=defaultVariantMapping}=ot,mt=_objectWithoutPropertiesLoose$m(ot,_excluded$1s),gt=_extends$u({},ot,{align:at,color:it,className:st,component:lt,gutterBottom:ct,noWrap:ut,paragraph:ht,variant:dt,variantMapping:pt}),yt=lt||(ht?"p":pt[dt]||defaultVariantMapping[dt])||"span",bt=useUtilityClasses$S(gt);return jsxRuntimeExports.jsx(TypographyRoot,_extends$u({as:yt,ref:nt,ownerState:gt,className:clsx$3(bt.root,st)},mt))}),Typography$1=Typography;function isHostComponent(tt){return typeof tt=="string"}function appendOwnerState(tt,et,nt){return tt===void 0||isHostComponent(tt)?et:_extends$u({},et,{ownerState:_extends$u({},et.ownerState,nt)})}function areArraysEqual$1(tt,et,nt=(rt,it)=>rt===it){return tt.length===et.length&&tt.every((rt,it)=>nt(rt,et[it]))}const defaultContextValue={disableDefaultClasses:!1},ClassNameConfiguratorContext=reactExports.createContext(defaultContextValue);function useClassNamesOverride(tt){const{disableDefaultClasses:et}=reactExports.useContext(ClassNameConfiguratorContext);return nt=>et?"":tt(nt)}function extractEventHandlers(tt,et=[]){if(tt===void 0)return{};const nt={};return Object.keys(tt).filter(rt=>rt.match(/^on[A-Z]/)&&typeof tt[rt]=="function"&&!et.includes(rt)).forEach(rt=>{nt[rt]=tt[rt]}),nt}function resolveComponentProps(tt,et,nt){return typeof tt=="function"?tt(et,nt):tt}function r$7(tt){var et,nt,rt="";if(typeof tt=="string"||typeof tt=="number")rt+=tt;else if(typeof tt=="object")if(Array.isArray(tt))for(et=0;et!(nt.match(/^on[A-Z]/)&&typeof tt[nt]=="function")).forEach(nt=>{et[nt]=tt[nt]}),et}function mergeSlotProps(tt){const{getSlotProps:et,additionalProps:nt,externalSlotProps:rt,externalForwardedProps:it,className:ot}=tt;if(!et){const pt=clsx$2(it==null?void 0:it.className,rt==null?void 0:rt.className,ot,nt==null?void 0:nt.className),mt=_extends$u({},nt==null?void 0:nt.style,it==null?void 0:it.style,rt==null?void 0:rt.style),gt=_extends$u({},nt,it,rt);return pt.length>0&&(gt.className=pt),Object.keys(mt).length>0&&(gt.style=mt),{props:gt,internalRef:void 0}}const at=extractEventHandlers(_extends$u({},it,rt)),st=omitEventHandlers(rt),lt=omitEventHandlers(it),ct=et(at),ut=clsx$2(ct==null?void 0:ct.className,nt==null?void 0:nt.className,ot,it==null?void 0:it.className,rt==null?void 0:rt.className),ht=_extends$u({},ct==null?void 0:ct.style,nt==null?void 0:nt.style,it==null?void 0:it.style,rt==null?void 0:rt.style),dt=_extends$u({},ct,nt,lt,st);return ut.length>0&&(dt.className=ut),Object.keys(ht).length>0&&(dt.style=ht),{props:dt,internalRef:ct.ref}}const _excluded$1r=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function useSlotProps(tt){var et;const{elementType:nt,externalSlotProps:rt,ownerState:it,skipResolvingSlotProps:ot=!1}=tt,at=_objectWithoutPropertiesLoose$m(tt,_excluded$1r),st=ot?{}:resolveComponentProps(rt,it),{props:lt,internalRef:ct}=mergeSlotProps(_extends$u({},at,{externalSlotProps:st})),ut=useForkRef(ct,st==null?void 0:st.ref,(et=tt.additionalProps)==null?void 0:et.ref);return appendOwnerState(nt,_extends$u({},lt,{ref:ut}),it)}const candidatesSelector=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function getTabIndex(tt){const et=parseInt(tt.getAttribute("tabindex")||"",10);return Number.isNaN(et)?tt.contentEditable==="true"||(tt.nodeName==="AUDIO"||tt.nodeName==="VIDEO"||tt.nodeName==="DETAILS")&&tt.getAttribute("tabindex")===null?0:tt.tabIndex:et}function isNonTabbableRadio(tt){if(tt.tagName!=="INPUT"||tt.type!=="radio"||!tt.name)return!1;const et=rt=>tt.ownerDocument.querySelector(`input[type="radio"]${rt}`);let nt=et(`[name="${tt.name}"]:checked`);return nt||(nt=et(`[name="${tt.name}"]`)),nt!==tt}function isNodeMatchingSelectorFocusable(tt){return!(tt.disabled||tt.tagName==="INPUT"&&tt.type==="hidden"||isNonTabbableRadio(tt))}function defaultGetTabbable(tt){const et=[],nt=[];return Array.from(tt.querySelectorAll(candidatesSelector)).forEach((rt,it)=>{const ot=getTabIndex(rt);ot===-1||!isNodeMatchingSelectorFocusable(rt)||(ot===0?et.push(rt):nt.push({documentOrder:it,tabIndex:ot,node:rt}))}),nt.sort((rt,it)=>rt.tabIndex===it.tabIndex?rt.documentOrder-it.documentOrder:rt.tabIndex-it.tabIndex).map(rt=>rt.node).concat(et)}function defaultIsEnabled(){return!0}function FocusTrap(tt){const{children:et,disableAutoFocus:nt=!1,disableEnforceFocus:rt=!1,disableRestoreFocus:it=!1,getTabbable:ot=defaultGetTabbable,isEnabled:at=defaultIsEnabled,open:st}=tt,lt=reactExports.useRef(!1),ct=reactExports.useRef(null),ut=reactExports.useRef(null),ht=reactExports.useRef(null),dt=reactExports.useRef(null),pt=reactExports.useRef(!1),mt=reactExports.useRef(null),gt=useForkRef(et.ref,mt),yt=reactExports.useRef(null);reactExports.useEffect(()=>{!st||!mt.current||(pt.current=!nt)},[nt,st]),reactExports.useEffect(()=>{if(!st||!mt.current)return;const xt=ownerDocument(mt.current);return mt.current.contains(xt.activeElement)||(mt.current.hasAttribute("tabIndex")||mt.current.setAttribute("tabIndex","-1"),pt.current&&mt.current.focus()),()=>{it||(ht.current&&ht.current.focus&&(lt.current=!0,ht.current.focus()),ht.current=null)}},[st]),reactExports.useEffect(()=>{if(!st||!mt.current)return;const xt=ownerDocument(mt.current),kt=At=>{yt.current=At,!(rt||!at()||At.key!=="Tab")&&xt.activeElement===mt.current&&At.shiftKey&&(lt.current=!0,ut.current&&ut.current.focus())},St=()=>{const At=mt.current;if(At===null)return;if(!xt.hasFocus()||!at()||lt.current){lt.current=!1;return}if(At.contains(xt.activeElement)||rt&&xt.activeElement!==ct.current&&xt.activeElement!==ut.current)return;if(xt.activeElement!==dt.current)dt.current=null;else if(dt.current!==null)return;if(!pt.current)return;let Et=[];if((xt.activeElement===ct.current||xt.activeElement===ut.current)&&(Et=ot(mt.current)),Et.length>0){var $t,Dt;const jt=!!(($t=yt.current)!=null&&$t.shiftKey&&((Dt=yt.current)==null?void 0:Dt.key)==="Tab"),Pt=Et[0],Ct=Et[Et.length-1];typeof Pt!="string"&&typeof Ct!="string"&&(jt?Ct.focus():Pt.focus())}else At.focus()};xt.addEventListener("focusin",St),xt.addEventListener("keydown",kt,!0);const Tt=setInterval(()=>{xt.activeElement&&xt.activeElement.tagName==="BODY"&&St()},50);return()=>{clearInterval(Tt),xt.removeEventListener("focusin",St),xt.removeEventListener("keydown",kt,!0)}},[nt,rt,it,at,st,ot]);const bt=xt=>{ht.current===null&&(ht.current=xt.relatedTarget),pt.current=!0,dt.current=xt.target;const kt=et.props.onFocus;kt&&kt(xt)},vt=xt=>{ht.current===null&&(ht.current=xt.relatedTarget),pt.current=!0};return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{tabIndex:st?0:-1,onFocus:vt,ref:ct,"data-testid":"sentinelStart"}),reactExports.cloneElement(et,{ref:gt,onFocus:bt}),jsxRuntimeExports.jsx("div",{tabIndex:st?0:-1,onFocus:vt,ref:ut,"data-testid":"sentinelEnd"})]})}var top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start$2="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(tt,et){return tt.concat([et+"-"+start$2,et+"-"+end])},[]),placements=[].concat(basePlacements,[auto]).reduce(function(tt,et){return tt.concat([et,et+"-"+start$2,et+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main$1="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main$1,afterMain,beforeWrite,write,afterWrite];function getNodeName(tt){return tt?(tt.nodeName||"").toLowerCase():null}function getWindow(tt){if(tt==null)return window;if(tt.toString()!=="[object Window]"){var et=tt.ownerDocument;return et&&et.defaultView||window}return tt}function isElement(tt){var et=getWindow(tt).Element;return tt instanceof et||tt instanceof Element}function isHTMLElement$1(tt){var et=getWindow(tt).HTMLElement;return tt instanceof et||tt instanceof HTMLElement}function isShadowRoot(tt){if(typeof ShadowRoot>"u")return!1;var et=getWindow(tt).ShadowRoot;return tt instanceof et||tt instanceof ShadowRoot}function applyStyles(tt){var et=tt.state;Object.keys(et.elements).forEach(function(nt){var rt=et.styles[nt]||{},it=et.attributes[nt]||{},ot=et.elements[nt];!isHTMLElement$1(ot)||!getNodeName(ot)||(Object.assign(ot.style,rt),Object.keys(it).forEach(function(at){var st=it[at];st===!1?ot.removeAttribute(at):ot.setAttribute(at,st===!0?"":st)}))})}function effect$2(tt){var et=tt.state,nt={popper:{position:et.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(et.elements.popper.style,nt.popper),et.styles=nt,et.elements.arrow&&Object.assign(et.elements.arrow.style,nt.arrow),function(){Object.keys(et.elements).forEach(function(rt){var it=et.elements[rt],ot=et.attributes[rt]||{},at=Object.keys(et.styles.hasOwnProperty(rt)?et.styles[rt]:nt[rt]),st=at.reduce(function(lt,ct){return lt[ct]="",lt},{});!isHTMLElement$1(it)||!getNodeName(it)||(Object.assign(it.style,st),Object.keys(ot).forEach(function(lt){it.removeAttribute(lt)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(tt){return tt.split("-")[0]}var max$4=Math.max,min$3=Math.min,round$2=Math.round;function getUAString(){var tt=navigator.userAgentData;return tt!=null&&tt.brands&&Array.isArray(tt.brands)?tt.brands.map(function(et){return et.brand+"/"+et.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(tt,et,nt){et===void 0&&(et=!1),nt===void 0&&(nt=!1);var rt=tt.getBoundingClientRect(),it=1,ot=1;et&&isHTMLElement$1(tt)&&(it=tt.offsetWidth>0&&round$2(rt.width)/tt.offsetWidth||1,ot=tt.offsetHeight>0&&round$2(rt.height)/tt.offsetHeight||1);var at=isElement(tt)?getWindow(tt):window,st=at.visualViewport,lt=!isLayoutViewport()&&nt,ct=(rt.left+(lt&&st?st.offsetLeft:0))/it,ut=(rt.top+(lt&&st?st.offsetTop:0))/ot,ht=rt.width/it,dt=rt.height/ot;return{width:ht,height:dt,top:ut,right:ct+ht,bottom:ut+dt,left:ct,x:ct,y:ut}}function getLayoutRect(tt){var et=getBoundingClientRect(tt),nt=tt.offsetWidth,rt=tt.offsetHeight;return Math.abs(et.width-nt)<=1&&(nt=et.width),Math.abs(et.height-rt)<=1&&(rt=et.height),{x:tt.offsetLeft,y:tt.offsetTop,width:nt,height:rt}}function contains(tt,et){var nt=et.getRootNode&&et.getRootNode();if(tt.contains(et))return!0;if(nt&&isShadowRoot(nt)){var rt=et;do{if(rt&&tt.isSameNode(rt))return!0;rt=rt.parentNode||rt.host}while(rt)}return!1}function getComputedStyle$1(tt){return getWindow(tt).getComputedStyle(tt)}function isTableElement(tt){return["table","td","th"].indexOf(getNodeName(tt))>=0}function getDocumentElement(tt){return((isElement(tt)?tt.ownerDocument:tt.document)||window.document).documentElement}function getParentNode(tt){return getNodeName(tt)==="html"?tt:tt.assignedSlot||tt.parentNode||(isShadowRoot(tt)?tt.host:null)||getDocumentElement(tt)}function getTrueOffsetParent(tt){return!isHTMLElement$1(tt)||getComputedStyle$1(tt).position==="fixed"?null:tt.offsetParent}function getContainingBlock(tt){var et=/firefox/i.test(getUAString()),nt=/Trident/i.test(getUAString());if(nt&&isHTMLElement$1(tt)){var rt=getComputedStyle$1(tt);if(rt.position==="fixed")return null}var it=getParentNode(tt);for(isShadowRoot(it)&&(it=it.host);isHTMLElement$1(it)&&["html","body"].indexOf(getNodeName(it))<0;){var ot=getComputedStyle$1(it);if(ot.transform!=="none"||ot.perspective!=="none"||ot.contain==="paint"||["transform","perspective"].indexOf(ot.willChange)!==-1||et&&ot.willChange==="filter"||et&&ot.filter&&ot.filter!=="none")return it;it=it.parentNode}return null}function getOffsetParent(tt){for(var et=getWindow(tt),nt=getTrueOffsetParent(tt);nt&&isTableElement(nt)&&getComputedStyle$1(nt).position==="static";)nt=getTrueOffsetParent(nt);return nt&&(getNodeName(nt)==="html"||getNodeName(nt)==="body"&&getComputedStyle$1(nt).position==="static")?et:nt||getContainingBlock(tt)||et}function getMainAxisFromPlacement(tt){return["top","bottom"].indexOf(tt)>=0?"x":"y"}function within(tt,et,nt){return max$4(tt,min$3(et,nt))}function withinMaxClamp(tt,et,nt){var rt=within(tt,et,nt);return rt>nt?nt:rt}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(tt){return Object.assign({},getFreshSideObject(),tt)}function expandToHashMap(tt,et){return et.reduce(function(nt,rt){return nt[rt]=tt,nt},{})}var toPaddingObject=function(et,nt){return et=typeof et=="function"?et(Object.assign({},nt.rects,{placement:nt.placement})):et,mergePaddingObject(typeof et!="number"?et:expandToHashMap(et,basePlacements))};function arrow(tt){var et,nt=tt.state,rt=tt.name,it=tt.options,ot=nt.elements.arrow,at=nt.modifiersData.popperOffsets,st=getBasePlacement(nt.placement),lt=getMainAxisFromPlacement(st),ct=[left,right].indexOf(st)>=0,ut=ct?"height":"width";if(!(!ot||!at)){var ht=toPaddingObject(it.padding,nt),dt=getLayoutRect(ot),pt=lt==="y"?top:left,mt=lt==="y"?bottom:right,gt=nt.rects.reference[ut]+nt.rects.reference[lt]-at[lt]-nt.rects.popper[ut],yt=at[lt]-nt.rects.reference[lt],bt=getOffsetParent(ot),vt=bt?lt==="y"?bt.clientHeight||0:bt.clientWidth||0:0,xt=gt/2-yt/2,kt=ht[pt],St=vt-dt[ut]-ht[mt],Tt=vt/2-dt[ut]/2+xt,At=within(kt,Tt,St),Et=lt;nt.modifiersData[rt]=(et={},et[Et]=At,et.centerOffset=At-Tt,et)}}function effect$1(tt){var et=tt.state,nt=tt.options,rt=nt.element,it=rt===void 0?"[data-popper-arrow]":rt;it!=null&&(typeof it=="string"&&(it=et.elements.popper.querySelector(it),!it)||contains(et.elements.popper,it)&&(et.elements.arrow=it))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(tt){return tt.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(tt,et){var nt=tt.x,rt=tt.y,it=et.devicePixelRatio||1;return{x:round$2(nt*it)/it||0,y:round$2(rt*it)/it||0}}function mapToStyles(tt){var et,nt=tt.popper,rt=tt.popperRect,it=tt.placement,ot=tt.variation,at=tt.offsets,st=tt.position,lt=tt.gpuAcceleration,ct=tt.adaptive,ut=tt.roundOffsets,ht=tt.isFixed,dt=at.x,pt=dt===void 0?0:dt,mt=at.y,gt=mt===void 0?0:mt,yt=typeof ut=="function"?ut({x:pt,y:gt}):{x:pt,y:gt};pt=yt.x,gt=yt.y;var bt=at.hasOwnProperty("x"),vt=at.hasOwnProperty("y"),xt=left,kt=top,St=window;if(ct){var Tt=getOffsetParent(nt),At="clientHeight",Et="clientWidth";if(Tt===getWindow(nt)&&(Tt=getDocumentElement(nt),getComputedStyle$1(Tt).position!=="static"&&st==="absolute"&&(At="scrollHeight",Et="scrollWidth")),Tt=Tt,it===top||(it===left||it===right)&&ot===end){kt=bottom;var $t=ht&&Tt===St&&St.visualViewport?St.visualViewport.height:Tt[At];gt-=$t-rt.height,gt*=lt?1:-1}if(it===left||(it===top||it===bottom)&&ot===end){xt=right;var Dt=ht&&Tt===St&&St.visualViewport?St.visualViewport.width:Tt[Et];pt-=Dt-rt.width,pt*=lt?1:-1}}var jt=Object.assign({position:st},ct&&unsetSides),Pt=ut===!0?roundOffsetsByDPR({x:pt,y:gt},getWindow(nt)):{x:pt,y:gt};if(pt=Pt.x,gt=Pt.y,lt){var Ct;return Object.assign({},jt,(Ct={},Ct[kt]=vt?"0":"",Ct[xt]=bt?"0":"",Ct.transform=(St.devicePixelRatio||1)<=1?"translate("+pt+"px, "+gt+"px)":"translate3d("+pt+"px, "+gt+"px, 0)",Ct))}return Object.assign({},jt,(et={},et[kt]=vt?gt+"px":"",et[xt]=bt?pt+"px":"",et.transform="",et))}function computeStyles(tt){var et=tt.state,nt=tt.options,rt=nt.gpuAcceleration,it=rt===void 0?!0:rt,ot=nt.adaptive,at=ot===void 0?!0:ot,st=nt.roundOffsets,lt=st===void 0?!0:st,ct={placement:getBasePlacement(et.placement),variation:getVariation(et.placement),popper:et.elements.popper,popperRect:et.rects.popper,gpuAcceleration:it,isFixed:et.options.strategy==="fixed"};et.modifiersData.popperOffsets!=null&&(et.styles.popper=Object.assign({},et.styles.popper,mapToStyles(Object.assign({},ct,{offsets:et.modifiersData.popperOffsets,position:et.options.strategy,adaptive:at,roundOffsets:lt})))),et.modifiersData.arrow!=null&&(et.styles.arrow=Object.assign({},et.styles.arrow,mapToStyles(Object.assign({},ct,{offsets:et.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:lt})))),et.attributes.popper=Object.assign({},et.attributes.popper,{"data-popper-placement":et.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(tt){var et=tt.state,nt=tt.instance,rt=tt.options,it=rt.scroll,ot=it===void 0?!0:it,at=rt.resize,st=at===void 0?!0:at,lt=getWindow(et.elements.popper),ct=[].concat(et.scrollParents.reference,et.scrollParents.popper);return ot&&ct.forEach(function(ut){ut.addEventListener("scroll",nt.update,passive)}),st&<.addEventListener("resize",nt.update,passive),function(){ot&&ct.forEach(function(ut){ut.removeEventListener("scroll",nt.update,passive)}),st&<.removeEventListener("resize",nt.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect,data:{}};var hash$6={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(tt){return tt.replace(/left|right|bottom|top/g,function(et){return hash$6[et]})}var hash$5={start:"end",end:"start"};function getOppositeVariationPlacement(tt){return tt.replace(/start|end/g,function(et){return hash$5[et]})}function getWindowScroll(tt){var et=getWindow(tt),nt=et.pageXOffset,rt=et.pageYOffset;return{scrollLeft:nt,scrollTop:rt}}function getWindowScrollBarX(tt){return getBoundingClientRect(getDocumentElement(tt)).left+getWindowScroll(tt).scrollLeft}function getViewportRect(tt,et){var nt=getWindow(tt),rt=getDocumentElement(tt),it=nt.visualViewport,ot=rt.clientWidth,at=rt.clientHeight,st=0,lt=0;if(it){ot=it.width,at=it.height;var ct=isLayoutViewport();(ct||!ct&&et==="fixed")&&(st=it.offsetLeft,lt=it.offsetTop)}return{width:ot,height:at,x:st+getWindowScrollBarX(tt),y:lt}}function getDocumentRect(tt){var et,nt=getDocumentElement(tt),rt=getWindowScroll(tt),it=(et=tt.ownerDocument)==null?void 0:et.body,ot=max$4(nt.scrollWidth,nt.clientWidth,it?it.scrollWidth:0,it?it.clientWidth:0),at=max$4(nt.scrollHeight,nt.clientHeight,it?it.scrollHeight:0,it?it.clientHeight:0),st=-rt.scrollLeft+getWindowScrollBarX(tt),lt=-rt.scrollTop;return getComputedStyle$1(it||nt).direction==="rtl"&&(st+=max$4(nt.clientWidth,it?it.clientWidth:0)-ot),{width:ot,height:at,x:st,y:lt}}function isScrollParent(tt){var et=getComputedStyle$1(tt),nt=et.overflow,rt=et.overflowX,it=et.overflowY;return/auto|scroll|overlay|hidden/.test(nt+it+rt)}function getScrollParent(tt){return["html","body","#document"].indexOf(getNodeName(tt))>=0?tt.ownerDocument.body:isHTMLElement$1(tt)&&isScrollParent(tt)?tt:getScrollParent(getParentNode(tt))}function listScrollParents(tt,et){var nt;et===void 0&&(et=[]);var rt=getScrollParent(tt),it=rt===((nt=tt.ownerDocument)==null?void 0:nt.body),ot=getWindow(rt),at=it?[ot].concat(ot.visualViewport||[],isScrollParent(rt)?rt:[]):rt,st=et.concat(at);return it?st:st.concat(listScrollParents(getParentNode(at)))}function rectToClientRect(tt){return Object.assign({},tt,{left:tt.x,top:tt.y,right:tt.x+tt.width,bottom:tt.y+tt.height})}function getInnerBoundingClientRect(tt,et){var nt=getBoundingClientRect(tt,!1,et==="fixed");return nt.top=nt.top+tt.clientTop,nt.left=nt.left+tt.clientLeft,nt.bottom=nt.top+tt.clientHeight,nt.right=nt.left+tt.clientWidth,nt.width=tt.clientWidth,nt.height=tt.clientHeight,nt.x=nt.left,nt.y=nt.top,nt}function getClientRectFromMixedType(tt,et,nt){return et===viewport?rectToClientRect(getViewportRect(tt,nt)):isElement(et)?getInnerBoundingClientRect(et,nt):rectToClientRect(getDocumentRect(getDocumentElement(tt)))}function getClippingParents(tt){var et=listScrollParents(getParentNode(tt)),nt=["absolute","fixed"].indexOf(getComputedStyle$1(tt).position)>=0,rt=nt&&isHTMLElement$1(tt)?getOffsetParent(tt):tt;return isElement(rt)?et.filter(function(it){return isElement(it)&&contains(it,rt)&&getNodeName(it)!=="body"}):[]}function getClippingRect(tt,et,nt,rt){var it=et==="clippingParents"?getClippingParents(tt):[].concat(et),ot=[].concat(it,[nt]),at=ot[0],st=ot.reduce(function(lt,ct){var ut=getClientRectFromMixedType(tt,ct,rt);return lt.top=max$4(ut.top,lt.top),lt.right=min$3(ut.right,lt.right),lt.bottom=min$3(ut.bottom,lt.bottom),lt.left=max$4(ut.left,lt.left),lt},getClientRectFromMixedType(tt,at,rt));return st.width=st.right-st.left,st.height=st.bottom-st.top,st.x=st.left,st.y=st.top,st}function computeOffsets(tt){var et=tt.reference,nt=tt.element,rt=tt.placement,it=rt?getBasePlacement(rt):null,ot=rt?getVariation(rt):null,at=et.x+et.width/2-nt.width/2,st=et.y+et.height/2-nt.height/2,lt;switch(it){case top:lt={x:at,y:et.y-nt.height};break;case bottom:lt={x:at,y:et.y+et.height};break;case right:lt={x:et.x+et.width,y:st};break;case left:lt={x:et.x-nt.width,y:st};break;default:lt={x:et.x,y:et.y}}var ct=it?getMainAxisFromPlacement(it):null;if(ct!=null){var ut=ct==="y"?"height":"width";switch(ot){case start$2:lt[ct]=lt[ct]-(et[ut]/2-nt[ut]/2);break;case end:lt[ct]=lt[ct]+(et[ut]/2-nt[ut]/2);break}}return lt}function detectOverflow(tt,et){et===void 0&&(et={});var nt=et,rt=nt.placement,it=rt===void 0?tt.placement:rt,ot=nt.strategy,at=ot===void 0?tt.strategy:ot,st=nt.boundary,lt=st===void 0?clippingParents:st,ct=nt.rootBoundary,ut=ct===void 0?viewport:ct,ht=nt.elementContext,dt=ht===void 0?popper:ht,pt=nt.altBoundary,mt=pt===void 0?!1:pt,gt=nt.padding,yt=gt===void 0?0:gt,bt=mergePaddingObject(typeof yt!="number"?yt:expandToHashMap(yt,basePlacements)),vt=dt===popper?reference:popper,xt=tt.rects.popper,kt=tt.elements[mt?vt:dt],St=getClippingRect(isElement(kt)?kt:kt.contextElement||getDocumentElement(tt.elements.popper),lt,ut,at),Tt=getBoundingClientRect(tt.elements.reference),At=computeOffsets({reference:Tt,element:xt,strategy:"absolute",placement:it}),Et=rectToClientRect(Object.assign({},xt,At)),$t=dt===popper?Et:Tt,Dt={top:St.top-$t.top+bt.top,bottom:$t.bottom-St.bottom+bt.bottom,left:St.left-$t.left+bt.left,right:$t.right-St.right+bt.right},jt=tt.modifiersData.offset;if(dt===popper&&jt){var Pt=jt[it];Object.keys(Dt).forEach(function(Ct){var wt=[right,bottom].indexOf(Ct)>=0?1:-1,It=[top,bottom].indexOf(Ct)>=0?"y":"x";Dt[Ct]+=Pt[It]*wt})}return Dt}function computeAutoPlacement(tt,et){et===void 0&&(et={});var nt=et,rt=nt.placement,it=nt.boundary,ot=nt.rootBoundary,at=nt.padding,st=nt.flipVariations,lt=nt.allowedAutoPlacements,ct=lt===void 0?placements:lt,ut=getVariation(rt),ht=ut?st?variationPlacements:variationPlacements.filter(function(mt){return getVariation(mt)===ut}):basePlacements,dt=ht.filter(function(mt){return ct.indexOf(mt)>=0});dt.length===0&&(dt=ht);var pt=dt.reduce(function(mt,gt){return mt[gt]=detectOverflow(tt,{placement:gt,boundary:it,rootBoundary:ot,padding:at})[getBasePlacement(gt)],mt},{});return Object.keys(pt).sort(function(mt,gt){return pt[mt]-pt[gt]})}function getExpandedFallbackPlacements(tt){if(getBasePlacement(tt)===auto)return[];var et=getOppositePlacement(tt);return[getOppositeVariationPlacement(tt),et,getOppositeVariationPlacement(et)]}function flip(tt){var et=tt.state,nt=tt.options,rt=tt.name;if(!et.modifiersData[rt]._skip){for(var it=nt.mainAxis,ot=it===void 0?!0:it,at=nt.altAxis,st=at===void 0?!0:at,lt=nt.fallbackPlacements,ct=nt.padding,ut=nt.boundary,ht=nt.rootBoundary,dt=nt.altBoundary,pt=nt.flipVariations,mt=pt===void 0?!0:pt,gt=nt.allowedAutoPlacements,yt=et.options.placement,bt=getBasePlacement(yt),vt=bt===yt,xt=lt||(vt||!mt?[getOppositePlacement(yt)]:getExpandedFallbackPlacements(yt)),kt=[yt].concat(xt).reduce(function(en,sn){return en.concat(getBasePlacement(sn)===auto?computeAutoPlacement(et,{placement:sn,boundary:ut,rootBoundary:ht,padding:ct,flipVariations:mt,allowedAutoPlacements:gt}):sn)},[]),St=et.rects.reference,Tt=et.rects.popper,At=new Map,Et=!0,$t=kt[0],Dt=0;Dt=0,It=wt?"width":"height",Ot=detectOverflow(et,{placement:jt,boundary:ut,rootBoundary:ht,altBoundary:dt,padding:ct}),Wt=wt?Ct?right:left:Ct?bottom:top;St[It]>Tt[It]&&(Wt=getOppositePlacement(Wt));var zt=getOppositePlacement(Wt),Ft=[];if(ot&&Ft.push(Ot[Pt]<=0),st&&Ft.push(Ot[Wt]<=0,Ot[zt]<=0),Ft.every(function(en){return en})){$t=jt,Et=!1;break}At.set(jt,Ft)}if(Et)for(var Nt=mt?3:1,Ut=function(sn){var Kt=kt.find(function(rn){var nn=At.get(rn);if(nn)return nn.slice(0,sn).every(function(hn){return hn})});if(Kt)return $t=Kt,"break"},Mt=Nt;Mt>0;Mt--){var Ht=Ut(Mt);if(Ht==="break")break}et.placement!==$t&&(et.modifiersData[rt]._skip=!0,et.placement=$t,et.reset=!0)}}const flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(tt,et,nt){return nt===void 0&&(nt={x:0,y:0}),{top:tt.top-et.height-nt.y,right:tt.right-et.width+nt.x,bottom:tt.bottom-et.height+nt.y,left:tt.left-et.width-nt.x}}function isAnySideFullyClipped(tt){return[top,right,bottom,left].some(function(et){return tt[et]>=0})}function hide(tt){var et=tt.state,nt=tt.name,rt=et.rects.reference,it=et.rects.popper,ot=et.modifiersData.preventOverflow,at=detectOverflow(et,{elementContext:"reference"}),st=detectOverflow(et,{altBoundary:!0}),lt=getSideOffsets(at,rt),ct=getSideOffsets(st,it,ot),ut=isAnySideFullyClipped(lt),ht=isAnySideFullyClipped(ct);et.modifiersData[nt]={referenceClippingOffsets:lt,popperEscapeOffsets:ct,isReferenceHidden:ut,hasPopperEscaped:ht},et.attributes.popper=Object.assign({},et.attributes.popper,{"data-popper-reference-hidden":ut,"data-popper-escaped":ht})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(tt,et,nt){var rt=getBasePlacement(tt),it=[left,top].indexOf(rt)>=0?-1:1,ot=typeof nt=="function"?nt(Object.assign({},et,{placement:tt})):nt,at=ot[0],st=ot[1];return at=at||0,st=(st||0)*it,[left,right].indexOf(rt)>=0?{x:st,y:at}:{x:at,y:st}}function offset$1(tt){var et=tt.state,nt=tt.options,rt=tt.name,it=nt.offset,ot=it===void 0?[0,0]:it,at=placements.reduce(function(ut,ht){return ut[ht]=distanceAndSkiddingToXY(ht,et.rects,ot),ut},{}),st=at[et.placement],lt=st.x,ct=st.y;et.modifiersData.popperOffsets!=null&&(et.modifiersData.popperOffsets.x+=lt,et.modifiersData.popperOffsets.y+=ct),et.modifiersData[rt]=at}const offset$2={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset$1};function popperOffsets(tt){var et=tt.state,nt=tt.name;et.modifiersData[nt]=computeOffsets({reference:et.rects.reference,element:et.rects.popper,strategy:"absolute",placement:et.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(tt){return tt==="x"?"y":"x"}function preventOverflow(tt){var et=tt.state,nt=tt.options,rt=tt.name,it=nt.mainAxis,ot=it===void 0?!0:it,at=nt.altAxis,st=at===void 0?!1:at,lt=nt.boundary,ct=nt.rootBoundary,ut=nt.altBoundary,ht=nt.padding,dt=nt.tether,pt=dt===void 0?!0:dt,mt=nt.tetherOffset,gt=mt===void 0?0:mt,yt=detectOverflow(et,{boundary:lt,rootBoundary:ct,padding:ht,altBoundary:ut}),bt=getBasePlacement(et.placement),vt=getVariation(et.placement),xt=!vt,kt=getMainAxisFromPlacement(bt),St=getAltAxis(kt),Tt=et.modifiersData.popperOffsets,At=et.rects.reference,Et=et.rects.popper,$t=typeof gt=="function"?gt(Object.assign({},et.rects,{placement:et.placement})):gt,Dt=typeof $t=="number"?{mainAxis:$t,altAxis:$t}:Object.assign({mainAxis:0,altAxis:0},$t),jt=et.modifiersData.offset?et.modifiersData.offset[et.placement]:null,Pt={x:0,y:0};if(Tt){if(ot){var Ct,wt=kt==="y"?top:left,It=kt==="y"?bottom:right,Ot=kt==="y"?"height":"width",Wt=Tt[kt],zt=Wt+yt[wt],Ft=Wt-yt[It],Nt=pt?-Et[Ot]/2:0,Ut=vt===start$2?At[Ot]:Et[Ot],Mt=vt===start$2?-Et[Ot]:-At[Ot],Ht=et.elements.arrow,en=pt&&Ht?getLayoutRect(Ht):{width:0,height:0},sn=et.modifiersData["arrow#persistent"]?et.modifiersData["arrow#persistent"].padding:getFreshSideObject(),Kt=sn[wt],rn=sn[It],nn=within(0,At[Ot],en[Ot]),hn=xt?At[Ot]/2-Nt-nn-Kt-Dt.mainAxis:Ut-nn-Kt-Dt.mainAxis,vn=xt?-At[Ot]/2+Nt+nn+rn+Dt.mainAxis:Mt+nn+rn+Dt.mainAxis,an=et.elements.arrow&&getOffsetParent(et.elements.arrow),Qt=an?kt==="y"?an.clientTop||0:an.clientLeft||0:0,_n=(Ct=jt==null?void 0:jt[kt])!=null?Ct:0,Pn=Wt+hn-_n-Qt,$n=Wt+vn-_n,Nn=within(pt?min$3(zt,Pn):zt,Wt,pt?max$4(Ft,$n):Ft);Tt[kt]=Nn,Pt[kt]=Nn-Wt}if(st){var Tn,cn=kt==="x"?top:left,mn=kt==="x"?bottom:right,In=Tt[St],An=St==="y"?"height":"width",wn=In+yt[cn],fn=In-yt[mn],pn=[top,left].indexOf(bt)!==-1,kn=(Tn=jt==null?void 0:jt[St])!=null?Tn:0,Dn=pn?wn:In-At[An]-Et[An]-kn+Dt.altAxis,un=pn?In+At[An]+Et[An]-kn-Dt.altAxis:fn,Zt=pt&&pn?withinMaxClamp(Dn,In,un):within(pt?Dn:wn,In,pt?un:fn);Tt[St]=Zt,Pt[St]=Zt-In}et.modifiersData[rt]=Pt}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(tt){return{scrollLeft:tt.scrollLeft,scrollTop:tt.scrollTop}}function getNodeScroll(tt){return tt===getWindow(tt)||!isHTMLElement$1(tt)?getWindowScroll(tt):getHTMLElementScroll(tt)}function isElementScaled(tt){var et=tt.getBoundingClientRect(),nt=round$2(et.width)/tt.offsetWidth||1,rt=round$2(et.height)/tt.offsetHeight||1;return nt!==1||rt!==1}function getCompositeRect(tt,et,nt){nt===void 0&&(nt=!1);var rt=isHTMLElement$1(et),it=isHTMLElement$1(et)&&isElementScaled(et),ot=getDocumentElement(et),at=getBoundingClientRect(tt,it,nt),st={scrollLeft:0,scrollTop:0},lt={x:0,y:0};return(rt||!rt&&!nt)&&((getNodeName(et)!=="body"||isScrollParent(ot))&&(st=getNodeScroll(et)),isHTMLElement$1(et)?(lt=getBoundingClientRect(et,!0),lt.x+=et.clientLeft,lt.y+=et.clientTop):ot&&(lt.x=getWindowScrollBarX(ot))),{x:at.left+st.scrollLeft-lt.x,y:at.top+st.scrollTop-lt.y,width:at.width,height:at.height}}function order(tt){var et=new Map,nt=new Set,rt=[];tt.forEach(function(ot){et.set(ot.name,ot)});function it(ot){nt.add(ot.name);var at=[].concat(ot.requires||[],ot.requiresIfExists||[]);at.forEach(function(st){if(!nt.has(st)){var lt=et.get(st);lt&&it(lt)}}),rt.push(ot)}return tt.forEach(function(ot){nt.has(ot.name)||it(ot)}),rt}function orderModifiers(tt){var et=order(tt);return modifierPhases.reduce(function(nt,rt){return nt.concat(et.filter(function(it){return it.phase===rt}))},[])}function debounce$4(tt){var et;return function(){return et||(et=new Promise(function(nt){Promise.resolve().then(function(){et=void 0,nt(tt())})})),et}}function mergeByName(tt){var et=tt.reduce(function(nt,rt){var it=nt[rt.name];return nt[rt.name]=it?Object.assign({},it,rt,{options:Object.assign({},it.options,rt.options),data:Object.assign({},it.data,rt.data)}):rt,nt},{});return Object.keys(et).map(function(nt){return et[nt]})}var DEFAULT_OPTIONS$k={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var tt=arguments.length,et=new Array(tt),nt=0;nt{ot||st(getContainer$1(it)||document.body)},[it,ot]),useEnhancedEffect$1(()=>{if(at&&!ot)return setRef(nt,at),()=>{setRef(nt,null)}},[nt,at,ot]),ot){if(reactExports.isValidElement(rt)){const ct={ref:lt};return reactExports.cloneElement(rt,ct)}return jsxRuntimeExports.jsx(reactExports.Fragment,{children:rt})}return jsxRuntimeExports.jsx(reactExports.Fragment,{children:at&&reactDomExports.createPortal(rt,at)})});function getPopperUtilityClass(tt){return generateUtilityClass("MuiPopper",tt)}generateUtilityClasses("MuiPopper",["root"]);const _excluded$1q=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],_excluded2$g=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function flipPlacement(tt,et){if(et==="ltr")return tt;switch(tt){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return tt}}function resolveAnchorEl$1(tt){return typeof tt=="function"?tt():tt}function isHTMLElement(tt){return tt.nodeType!==void 0}const useUtilityClasses$R=()=>composeClasses({root:["root"]},useClassNamesOverride(getPopperUtilityClass)),defaultPopperOptions={},PopperTooltip=reactExports.forwardRef(function(et,nt){var rt;const{anchorEl:it,children:ot,direction:at,disablePortal:st,modifiers:lt,open:ct,placement:ut,popperOptions:ht,popperRef:dt,slotProps:pt={},slots:mt={},TransitionProps:gt}=et,yt=_objectWithoutPropertiesLoose$m(et,_excluded$1q),bt=reactExports.useRef(null),vt=useForkRef(bt,nt),xt=reactExports.useRef(null),kt=useForkRef(xt,dt),St=reactExports.useRef(kt);useEnhancedEffect$1(()=>{St.current=kt},[kt]),reactExports.useImperativeHandle(dt,()=>xt.current,[]);const Tt=flipPlacement(ut,at),[At,Et]=reactExports.useState(Tt),[$t,Dt]=reactExports.useState(resolveAnchorEl$1(it));reactExports.useEffect(()=>{xt.current&&xt.current.forceUpdate()}),reactExports.useEffect(()=>{it&&Dt(resolveAnchorEl$1(it))},[it]),useEnhancedEffect$1(()=>{if(!$t||!ct)return;const It=zt=>{Et(zt.placement)};let Ot=[{name:"preventOverflow",options:{altBoundary:st}},{name:"flip",options:{altBoundary:st}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:zt})=>{It(zt)}}];lt!=null&&(Ot=Ot.concat(lt)),ht&&ht.modifiers!=null&&(Ot=Ot.concat(ht.modifiers));const Wt=createPopper($t,bt.current,_extends$u({placement:Tt},ht,{modifiers:Ot}));return St.current(Wt),()=>{Wt.destroy(),St.current(null)}},[$t,st,lt,ct,ht,Tt]);const jt={placement:At};gt!==null&&(jt.TransitionProps=gt);const Pt=useUtilityClasses$R(),Ct=(rt=mt.root)!=null?rt:"div",wt=useSlotProps({elementType:Ct,externalSlotProps:pt.root,externalForwardedProps:yt,additionalProps:{role:"tooltip",ref:vt},ownerState:et,className:Pt.root});return jsxRuntimeExports.jsx(Ct,_extends$u({},wt,{children:typeof ot=="function"?ot(jt):ot}))}),Popper$1=reactExports.forwardRef(function(et,nt){const{anchorEl:rt,children:it,container:ot,direction:at="ltr",disablePortal:st=!1,keepMounted:lt=!1,modifiers:ct,open:ut,placement:ht="bottom",popperOptions:dt=defaultPopperOptions,popperRef:pt,style:mt,transition:gt=!1,slotProps:yt={},slots:bt={}}=et,vt=_objectWithoutPropertiesLoose$m(et,_excluded2$g),[xt,kt]=reactExports.useState(!0),St=()=>{kt(!1)},Tt=()=>{kt(!0)};if(!lt&&!ut&&(!gt||xt))return null;let At;if(ot)At=ot;else if(rt){const Dt=resolveAnchorEl$1(rt);At=Dt&&isHTMLElement(Dt)?ownerDocument(Dt).body:ownerDocument(null).body}const Et=!ut&<&&(!gt||xt)?"none":void 0,$t=gt?{in:ut,onEnter:St,onExited:Tt}:void 0;return jsxRuntimeExports.jsx(Portal$1,{disablePortal:st,container:At,children:jsxRuntimeExports.jsx(PopperTooltip,_extends$u({anchorEl:rt,direction:at,disablePortal:st,modifiers:ct,ref:nt,open:gt?!xt:ut,placement:ht,popperOptions:dt,popperRef:pt,slotProps:yt,slots:bt},vt,{style:_extends$u({position:"fixed",top:0,left:0,display:Et},mt),TransitionProps:$t,children:it}))})});function isOverflowing(tt){const et=ownerDocument(tt);return et.body===tt?ownerWindow(tt).innerWidth>et.documentElement.clientWidth:tt.scrollHeight>tt.clientHeight}function ariaHidden(tt,et){et?tt.setAttribute("aria-hidden","true"):tt.removeAttribute("aria-hidden")}function getPaddingRight(tt){return parseInt(ownerWindow(tt).getComputedStyle(tt).paddingRight,10)||0}function isAriaHiddenForbiddenOnElement(tt){const nt=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(tt.tagName)!==-1,rt=tt.tagName==="INPUT"&&tt.getAttribute("type")==="hidden";return nt||rt}function ariaHiddenSiblings(tt,et,nt,rt,it){const ot=[et,nt,...rt];[].forEach.call(tt.children,at=>{const st=ot.indexOf(at)===-1,lt=!isAriaHiddenForbiddenOnElement(at);st&<&&ariaHidden(at,it)})}function findIndexOf(tt,et){let nt=-1;return tt.some((rt,it)=>et(rt)?(nt=it,!0):!1),nt}function handleContainer(tt,et){const nt=[],rt=tt.container;if(!et.disableScrollLock){if(isOverflowing(rt)){const at=getScrollbarSize(ownerDocument(rt));nt.push({value:rt.style.paddingRight,property:"padding-right",el:rt}),rt.style.paddingRight=`${getPaddingRight(rt)+at}px`;const st=ownerDocument(rt).querySelectorAll(".mui-fixed");[].forEach.call(st,lt=>{nt.push({value:lt.style.paddingRight,property:"padding-right",el:lt}),lt.style.paddingRight=`${getPaddingRight(lt)+at}px`})}let ot;if(rt.parentNode instanceof DocumentFragment)ot=ownerDocument(rt).body;else{const at=rt.parentElement,st=ownerWindow(rt);ot=(at==null?void 0:at.nodeName)==="HTML"&&st.getComputedStyle(at).overflowY==="scroll"?at:rt}nt.push({value:ot.style.overflow,property:"overflow",el:ot},{value:ot.style.overflowX,property:"overflow-x",el:ot},{value:ot.style.overflowY,property:"overflow-y",el:ot}),ot.style.overflow="hidden"}return()=>{nt.forEach(({value:ot,el:at,property:st})=>{ot?at.style.setProperty(st,ot):at.style.removeProperty(st)})}}function getHiddenSiblings(tt){const et=[];return[].forEach.call(tt.children,nt=>{nt.getAttribute("aria-hidden")==="true"&&et.push(nt)}),et}class ModalManager{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(et,nt){let rt=this.modals.indexOf(et);if(rt!==-1)return rt;rt=this.modals.length,this.modals.push(et),et.modalRef&&ariaHidden(et.modalRef,!1);const it=getHiddenSiblings(nt);ariaHiddenSiblings(nt,et.mount,et.modalRef,it,!0);const ot=findIndexOf(this.containers,at=>at.container===nt);return ot!==-1?(this.containers[ot].modals.push(et),rt):(this.containers.push({modals:[et],container:nt,restore:null,hiddenSiblings:it}),rt)}mount(et,nt){const rt=findIndexOf(this.containers,ot=>ot.modals.indexOf(et)!==-1),it=this.containers[rt];it.restore||(it.restore=handleContainer(it,nt))}remove(et,nt=!0){const rt=this.modals.indexOf(et);if(rt===-1)return rt;const it=findIndexOf(this.containers,at=>at.modals.indexOf(et)!==-1),ot=this.containers[it];if(ot.modals.splice(ot.modals.indexOf(et),1),this.modals.splice(rt,1),ot.modals.length===0)ot.restore&&ot.restore(),et.modalRef&&ariaHidden(et.modalRef,nt),ariaHiddenSiblings(ot.container,et.mount,et.modalRef,ot.hiddenSiblings,!1),this.containers.splice(it,1);else{const at=ot.modals[ot.modals.length-1];at.modalRef&&ariaHidden(at.modalRef,!1)}return rt}isTopModal(et){return this.modals.length>0&&this.modals[this.modals.length-1]===et}}function getContainer(tt){return typeof tt=="function"?tt():tt}function getHasTransition(tt){return tt?tt.props.hasOwnProperty("in"):!1}const defaultManager=new ModalManager;function useModal$1(tt){const{container:et,disableEscapeKeyDown:nt=!1,disableScrollLock:rt=!1,manager:it=defaultManager,closeAfterTransition:ot=!1,onTransitionEnter:at,onTransitionExited:st,children:lt,onClose:ct,open:ut,rootRef:ht}=tt,dt=reactExports.useRef({}),pt=reactExports.useRef(null),mt=reactExports.useRef(null),gt=useForkRef(mt,ht),[yt,bt]=reactExports.useState(!ut),vt=getHasTransition(lt);let xt=!0;(tt["aria-hidden"]==="false"||tt["aria-hidden"]===!1)&&(xt=!1);const kt=()=>ownerDocument(pt.current),St=()=>(dt.current.modalRef=mt.current,dt.current.mount=pt.current,dt.current),Tt=()=>{it.mount(St(),{disableScrollLock:rt}),mt.current&&(mt.current.scrollTop=0)},At=useEventCallback(()=>{const Ot=getContainer(et)||kt().body;it.add(St(),Ot),mt.current&&Tt()}),Et=reactExports.useCallback(()=>it.isTopModal(St()),[it]),$t=useEventCallback(Ot=>{pt.current=Ot,Ot&&(ut&&Et()?Tt():mt.current&&ariaHidden(mt.current,xt))}),Dt=reactExports.useCallback(()=>{it.remove(St(),xt)},[xt,it]);reactExports.useEffect(()=>()=>{Dt()},[Dt]),reactExports.useEffect(()=>{ut?At():(!vt||!ot)&&Dt()},[ut,Dt,vt,ot,At]);const jt=Ot=>Wt=>{var zt;(zt=Ot.onKeyDown)==null||zt.call(Ot,Wt),!(Wt.key!=="Escape"||!Et())&&(nt||(Wt.stopPropagation(),ct&&ct(Wt,"escapeKeyDown")))},Pt=Ot=>Wt=>{var zt;(zt=Ot.onClick)==null||zt.call(Ot,Wt),Wt.target===Wt.currentTarget&&ct&&ct(Wt,"backdropClick")};return{getRootProps:(Ot={})=>{const Wt=extractEventHandlers(tt);delete Wt.onTransitionEnter,delete Wt.onTransitionExited;const zt=_extends$u({},Wt,Ot);return _extends$u({role:"presentation"},zt,{onKeyDown:jt(zt),ref:gt})},getBackdropProps:(Ot={})=>{const Wt=Ot;return _extends$u({"aria-hidden":!0},Wt,{onClick:Pt(Wt),open:ut})},getTransitionProps:()=>{const Ot=()=>{bt(!1),at&&at()},Wt=()=>{bt(!0),st&&st(),ot&&Dt()};return{onEnter:createChainedFunction(Ot,lt==null?void 0:lt.props.onEnter),onExited:createChainedFunction(Wt,lt==null?void 0:lt.props.onExited)}},rootRef:gt,portalRef:$t,isTopModal:Et,exited:yt,hasTransition:vt}}const INTENTIONAL_DRAG_COUNT_THRESHOLD=2;function asc(tt,et){return tt-et}function clamp$6(tt,et,nt){return tt==null?et:Math.min(Math.max(et,tt),nt)}function findClosest(tt,et){var nt;const{index:rt}=(nt=tt.reduce((it,ot,at)=>{const st=Math.abs(et-ot);return it===null||st({left:`${tt}%`}),leap:tt=>({width:`${tt}%`})},"horizontal-reverse":{offset:tt=>({right:`${tt}%`}),leap:tt=>({width:`${tt}%`})},vertical:{offset:tt=>({bottom:`${tt}%`}),leap:tt=>({height:`${tt}%`})}},Identity$1=tt=>tt;let cachedSupportsTouchActionNone;function doesSupportTouchActionNone(){return cachedSupportsTouchActionNone===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?cachedSupportsTouchActionNone=CSS.supports("touch-action","none"):cachedSupportsTouchActionNone=!0),cachedSupportsTouchActionNone}function useSlider(tt){const{"aria-labelledby":et,defaultValue:nt,disabled:rt=!1,disableSwap:it=!1,isRtl:ot=!1,marks:at=!1,max:st=100,min:lt=0,name:ct,onChange:ut,onChangeCommitted:ht,orientation:dt="horizontal",rootRef:pt,scale:mt=Identity$1,step:gt=1,tabIndex:yt,value:bt}=tt,vt=reactExports.useRef(),[xt,kt]=reactExports.useState(-1),[St,Tt]=reactExports.useState(-1),[At,Et]=reactExports.useState(!1),$t=reactExports.useRef(0),[Dt,jt]=useControlled({controlled:bt,default:nt??lt,name:"Slider"}),Pt=ut&&((kn,Dn,un)=>{const Zt=kn.nativeEvent||kn,Xt=new Zt.constructor(Zt.type,Zt);Object.defineProperty(Xt,"target",{writable:!0,value:{value:Dn,name:ct}}),ut(Xt,Dn,un)}),Ct=Array.isArray(Dt);let wt=Ct?Dt.slice().sort(asc):[Dt];wt=wt.map(kn=>clamp$6(kn,lt,st));const It=at===!0&>!==null?[...Array(Math.floor((st-lt)/gt)+1)].map((kn,Dn)=>({value:lt+gt*Dn})):at||[],Ot=It.map(kn=>kn.value),{isFocusVisibleRef:Wt,onBlur:zt,onFocus:Ft,ref:Nt}=useIsFocusVisible(),[Ut,Mt]=reactExports.useState(-1),Ht=reactExports.useRef(),en=useForkRef(Nt,Ht),sn=useForkRef(pt,en),Kt=kn=>Dn=>{var un;const Zt=Number(Dn.currentTarget.getAttribute("data-index"));Ft(Dn),Wt.current===!0&&Mt(Zt),Tt(Zt),kn==null||(un=kn.onFocus)==null||un.call(kn,Dn)},rn=kn=>Dn=>{var un;zt(Dn),Wt.current===!1&&Mt(-1),Tt(-1),kn==null||(un=kn.onBlur)==null||un.call(kn,Dn)};useEnhancedEffect$1(()=>{if(rt&&Ht.current.contains(document.activeElement)){var kn;(kn=document.activeElement)==null||kn.blur()}},[rt]),rt&&xt!==-1&&kt(-1),rt&&Ut!==-1&&Mt(-1);const nn=kn=>Dn=>{var un;(un=kn.onChange)==null||un.call(kn,Dn);const Zt=Number(Dn.currentTarget.getAttribute("data-index")),Xt=wt[Zt],Sn=Ot.indexOf(Xt);let Rn=Dn.target.valueAsNumber;if(It&>==null){const jn=Ot[Ot.length-1];Rn>jn?Rn=jn:Rn{const{current:un}=Ht,{width:Zt,height:Xt,bottom:Sn,left:Rn}=un.getBoundingClientRect();let jn;vn.indexOf("vertical")===0?jn=(Sn-kn.y)/Xt:jn=(kn.x-Rn)/Zt,vn.indexOf("-reverse")!==-1&&(jn=1-jn);let On;if(On=percentToValue(jn,lt,st),gt)On=roundValueToStep(On,gt,lt);else{const Vn=findClosest(Ot,On);On=Ot[Vn]}On=clamp$6(On,lt,st);let Zn=0;if(Ct){Dn?Zn=hn.current:Zn=findClosest(wt,On),it&&(On=clamp$6(On,wt[Zn-1]||-1/0,wt[Zn+1]||1/0));const Vn=On;On=setValueIndex({values:wt,newValue:On,index:Zn}),it&&Dn||(Zn=On.indexOf(Vn),hn.current=Zn)}return{newValue:On,activeIndex:Zn}},Qt=useEventCallback(kn=>{const Dn=trackFinger(kn,vt);if(!Dn)return;if($t.current+=1,kn.type==="mousemove"&&kn.buttons===0){_n(kn);return}const{newValue:un,activeIndex:Zt}=an({finger:Dn,move:!0});focusThumb({sliderRef:Ht,activeIndex:Zt,setActive:kt}),jt(un),!At&&$t.current>INTENTIONAL_DRAG_COUNT_THRESHOLD&&Et(!0),Pt&&!areValuesEqual(un,Dt)&&Pt(kn,un,Zt)}),_n=useEventCallback(kn=>{const Dn=trackFinger(kn,vt);if(Et(!1),!Dn)return;const{newValue:un}=an({finger:Dn,move:!0});kt(-1),kn.type==="touchend"&&Tt(-1),ht&&ht(kn,un),vt.current=void 0,$n()}),Pn=useEventCallback(kn=>{if(rt)return;doesSupportTouchActionNone()||kn.preventDefault();const Dn=kn.changedTouches[0];Dn!=null&&(vt.current=Dn.identifier);const un=trackFinger(kn,vt);if(un!==!1){const{newValue:Xt,activeIndex:Sn}=an({finger:un});focusThumb({sliderRef:Ht,activeIndex:Sn,setActive:kt}),jt(Xt),Pt&&!areValuesEqual(Xt,Dt)&&Pt(kn,Xt,Sn)}$t.current=0;const Zt=ownerDocument(Ht.current);Zt.addEventListener("touchmove",Qt),Zt.addEventListener("touchend",_n)}),$n=reactExports.useCallback(()=>{const kn=ownerDocument(Ht.current);kn.removeEventListener("mousemove",Qt),kn.removeEventListener("mouseup",_n),kn.removeEventListener("touchmove",Qt),kn.removeEventListener("touchend",_n)},[_n,Qt]);reactExports.useEffect(()=>{const{current:kn}=Ht;return kn.addEventListener("touchstart",Pn,{passive:doesSupportTouchActionNone()}),()=>{kn.removeEventListener("touchstart",Pn,{passive:doesSupportTouchActionNone()}),$n()}},[$n,Pn]),reactExports.useEffect(()=>{rt&&$n()},[rt,$n]);const Nn=kn=>Dn=>{var un;if((un=kn.onMouseDown)==null||un.call(kn,Dn),rt||Dn.defaultPrevented||Dn.button!==0)return;Dn.preventDefault();const Zt=trackFinger(Dn,vt);if(Zt!==!1){const{newValue:Sn,activeIndex:Rn}=an({finger:Zt});focusThumb({sliderRef:Ht,activeIndex:Rn,setActive:kt}),jt(Sn),Pt&&!areValuesEqual(Sn,Dt)&&Pt(Dn,Sn,Rn)}$t.current=0;const Xt=ownerDocument(Ht.current);Xt.addEventListener("mousemove",Qt),Xt.addEventListener("mouseup",_n)},Tn=valueToPercent(Ct?wt[0]:lt,lt,st),cn=valueToPercent(wt[wt.length-1],lt,st)-Tn,mn=(kn={})=>{const Dn=extractEventHandlers(kn),un={onMouseDown:Nn(Dn||{})},Zt=_extends$u({},Dn,un);return _extends$u({},kn,{ref:sn},Zt)},In=kn=>Dn=>{var un;(un=kn.onMouseOver)==null||un.call(kn,Dn);const Zt=Number(Dn.currentTarget.getAttribute("data-index"));Tt(Zt)},An=kn=>Dn=>{var un;(un=kn.onMouseLeave)==null||un.call(kn,Dn),Tt(-1)};return{active:xt,axis:vn,axisProps,dragging:At,focusedThumbIndex:Ut,getHiddenInputProps:(kn={})=>{var Dn;const un=extractEventHandlers(kn),Zt={onChange:nn(un||{}),onFocus:Kt(un||{}),onBlur:rn(un||{})},Xt=_extends$u({},un,Zt);return _extends$u({tabIndex:yt,"aria-labelledby":et,"aria-orientation":dt,"aria-valuemax":mt(st),"aria-valuemin":mt(lt),name:ct,type:"range",min:tt.min,max:tt.max,step:tt.step===null&&tt.marks?"any":(Dn=tt.step)!=null?Dn:void 0,disabled:rt},kn,Xt,{style:_extends$u({},visuallyHidden$1,{direction:ot?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:mn,getThumbProps:(kn={})=>{const Dn=extractEventHandlers(kn),un={onMouseOver:In(Dn||{}),onMouseLeave:An(Dn||{})};return _extends$u({},kn,Dn,un)},marks:It,open:St,range:Ct,rootRef:sn,trackLeap:cn,trackOffset:Tn,values:wt,getThumbStyle:kn=>({pointerEvents:xt!==-1&&xt!==kn?"none":void 0})}}const _excluded$1p=["onChange","maxRows","minRows","style","value"];function getStyleValue(tt){return parseInt(tt,10)||0}const styles$5={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function isEmpty$1(tt){return tt==null||Object.keys(tt).length===0||tt.outerHeightStyle===0&&!tt.overflow}const TextareaAutosize=reactExports.forwardRef(function(et,nt){const{onChange:rt,maxRows:it,minRows:ot=1,style:at,value:st}=et,lt=_objectWithoutPropertiesLoose$m(et,_excluded$1p),{current:ct}=reactExports.useRef(st!=null),ut=reactExports.useRef(null),ht=useForkRef(nt,ut),dt=reactExports.useRef(null),pt=reactExports.useRef(0),[mt,gt]=reactExports.useState({outerHeightStyle:0}),yt=reactExports.useCallback(()=>{const kt=ut.current,Tt=ownerWindow(kt).getComputedStyle(kt);if(Tt.width==="0px")return{outerHeightStyle:0};const At=dt.current;At.style.width=Tt.width,At.value=kt.value||et.placeholder||"x",At.value.slice(-1)===` -`&&(At.value+=" ");const Et=Tt.boxSizing,$t=getStyleValue(Tt.paddingBottom)+getStyleValue(Tt.paddingTop),Dt=getStyleValue(Tt.borderBottomWidth)+getStyleValue(Tt.borderTopWidth),jt=At.scrollHeight;At.value="x";const Pt=At.scrollHeight;let Ct=jt;ot&&(Ct=Math.max(Number(ot)*Pt,Ct)),it&&(Ct=Math.min(Number(it)*Pt,Ct)),Ct=Math.max(Ct,Pt);const wt=Ct+(Et==="border-box"?$t+Dt:0),It=Math.abs(Ct-jt)<=1;return{outerHeightStyle:wt,overflow:It}},[it,ot,et.placeholder]),bt=(kt,St)=>{const{outerHeightStyle:Tt,overflow:At}=St;return pt.current<20&&(Tt>0&&Math.abs((kt.outerHeightStyle||0)-Tt)>1||kt.overflow!==At)?(pt.current+=1,{overflow:At,outerHeightStyle:Tt}):kt},vt=reactExports.useCallback(()=>{const kt=yt();isEmpty$1(kt)||gt(St=>bt(St,kt))},[yt]);useEnhancedEffect$1(()=>{const kt=()=>{const jt=yt();isEmpty$1(jt)||reactDomExports.flushSync(()=>{gt(Pt=>bt(Pt,jt))})},St=()=>{pt.current=0,kt()};let Tt;const At=debounce$5(St),Et=ut.current,$t=ownerWindow(Et);$t.addEventListener("resize",At);let Dt;return typeof ResizeObserver<"u"&&(Dt=new ResizeObserver(St),Dt.observe(Et)),()=>{At.clear(),cancelAnimationFrame(Tt),$t.removeEventListener("resize",At),Dt&&Dt.disconnect()}},[yt]),useEnhancedEffect$1(()=>{vt()}),reactExports.useEffect(()=>{pt.current=0},[st]);const xt=kt=>{pt.current=0,ct||vt(),rt&&rt(kt)};return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("textarea",_extends$u({value:st,onChange:xt,ref:ht,rows:ot,style:_extends$u({height:mt.outerHeightStyle,overflow:mt.overflow?"hidden":void 0},at)},lt)),jsxRuntimeExports.jsx("textarea",{"aria-hidden":!0,className:et.className,readOnly:!0,ref:dt,tabIndex:-1,style:_extends$u({},styles$5.shadow,at,{paddingTop:0,paddingBottom:0})})]})}),_excluded$1o=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],PopperRoot=styled$1(Popper$1,{name:"MuiPopper",slot:"Root",overridesResolver:(tt,et)=>et.root})({}),Popper=reactExports.forwardRef(function(et,nt){var rt;const it=useTheme$3(),ot=useThemeProps({props:et,name:"MuiPopper"}),{anchorEl:at,component:st,components:lt,componentsProps:ct,container:ut,disablePortal:ht,keepMounted:dt,modifiers:pt,open:mt,placement:gt,popperOptions:yt,popperRef:bt,transition:vt,slots:xt,slotProps:kt}=ot,St=_objectWithoutPropertiesLoose$m(ot,_excluded$1o),Tt=(rt=xt==null?void 0:xt.root)!=null?rt:lt==null?void 0:lt.Root,At=_extends$u({anchorEl:at,container:ut,disablePortal:ht,keepMounted:dt,modifiers:pt,open:mt,placement:gt,popperOptions:yt,popperRef:bt,transition:vt},St);return jsxRuntimeExports.jsx(PopperRoot,_extends$u({as:st,direction:it==null?void 0:it.direction,slots:{root:Tt},slotProps:kt??ct},At,{ref:nt}))}),MuiPopper=Popper,CancelIcon=createSvgIcon(jsxRuntimeExports.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 getChipUtilityClass(tt){return generateUtilityClass("MuiChip",tt)}const chipClasses=generateUtilityClasses("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"]),chipClasses$1=chipClasses,_excluded$1n=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],useUtilityClasses$Q=tt=>{const{classes:et,disabled:nt,size:rt,color:it,iconColor:ot,onDelete:at,clickable:st,variant:lt}=tt,ct={root:["root",lt,nt&&"disabled",`size${capitalize(rt)}`,`color${capitalize(it)}`,st&&"clickable",st&&`clickableColor${capitalize(it)}`,at&&"deletable",at&&`deletableColor${capitalize(it)}`,`${lt}${capitalize(it)}`],label:["label",`label${capitalize(rt)}`],avatar:["avatar",`avatar${capitalize(rt)}`,`avatarColor${capitalize(it)}`],icon:["icon",`icon${capitalize(rt)}`,`iconColor${capitalize(ot)}`],deleteIcon:["deleteIcon",`deleteIcon${capitalize(rt)}`,`deleteIconColor${capitalize(it)}`,`deleteIcon${capitalize(lt)}Color${capitalize(it)}`]};return composeClasses(ct,getChipUtilityClass,et)},ChipRoot=styled$1("div",{name:"MuiChip",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt,{color:rt,iconColor:it,clickable:ot,onDelete:at,size:st,variant:lt}=nt;return[{[`& .${chipClasses$1.avatar}`]:et.avatar},{[`& .${chipClasses$1.avatar}`]:et[`avatar${capitalize(st)}`]},{[`& .${chipClasses$1.avatar}`]:et[`avatarColor${capitalize(rt)}`]},{[`& .${chipClasses$1.icon}`]:et.icon},{[`& .${chipClasses$1.icon}`]:et[`icon${capitalize(st)}`]},{[`& .${chipClasses$1.icon}`]:et[`iconColor${capitalize(it)}`]},{[`& .${chipClasses$1.deleteIcon}`]:et.deleteIcon},{[`& .${chipClasses$1.deleteIcon}`]:et[`deleteIcon${capitalize(st)}`]},{[`& .${chipClasses$1.deleteIcon}`]:et[`deleteIconColor${capitalize(rt)}`]},{[`& .${chipClasses$1.deleteIcon}`]:et[`deleteIcon${capitalize(lt)}Color${capitalize(rt)}`]},et.root,et[`size${capitalize(st)}`],et[`color${capitalize(rt)}`],ot&&et.clickable,ot&&rt!=="default"&&et[`clickableColor${capitalize(rt)})`],at&&et.deletable,at&&rt!=="default"&&et[`deletableColor${capitalize(rt)}`],et[lt],et[`${lt}${capitalize(rt)}`]]}})(({theme:tt,ownerState:et})=>{const nt=tt.palette.mode==="light"?tt.palette.grey[700]:tt.palette.grey[300];return _extends$u({maxWidth:"100%",fontFamily:tt.typography.fontFamily,fontSize:tt.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(tt.vars||tt).palette.text.primary,backgroundColor:(tt.vars||tt).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:tt.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${chipClasses$1.disabled}`]:{opacity:(tt.vars||tt).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${chipClasses$1.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:tt.vars?tt.vars.palette.Chip.defaultAvatarColor:nt,fontSize:tt.typography.pxToRem(12)},[`& .${chipClasses$1.avatarColorPrimary}`]:{color:(tt.vars||tt).palette.primary.contrastText,backgroundColor:(tt.vars||tt).palette.primary.dark},[`& .${chipClasses$1.avatarColorSecondary}`]:{color:(tt.vars||tt).palette.secondary.contrastText,backgroundColor:(tt.vars||tt).palette.secondary.dark},[`& .${chipClasses$1.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:tt.typography.pxToRem(10)},[`& .${chipClasses$1.icon}`]:_extends$u({marginLeft:5,marginRight:-6},et.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},et.iconColor===et.color&&_extends$u({color:tt.vars?tt.vars.palette.Chip.defaultIconColor:nt},et.color!=="default"&&{color:"inherit"})),[`& .${chipClasses$1.deleteIcon}`]:_extends$u({WebkitTapHighlightColor:"transparent",color:tt.vars?`rgba(${tt.vars.palette.text.primaryChannel} / 0.26)`:alpha$1(tt.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:tt.vars?`rgba(${tt.vars.palette.text.primaryChannel} / 0.4)`:alpha$1(tt.palette.text.primary,.4)}},et.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},et.color!=="default"&&{color:tt.vars?`rgba(${tt.vars.palette[et.color].contrastTextChannel} / 0.7)`:alpha$1(tt.palette[et.color].contrastText,.7),"&:hover, &:active":{color:(tt.vars||tt).palette[et.color].contrastText}})},et.size==="small"&&{height:24},et.color!=="default"&&{backgroundColor:(tt.vars||tt).palette[et.color].main,color:(tt.vars||tt).palette[et.color].contrastText},et.onDelete&&{[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.selectedChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.focusOpacity}))`:alpha$1(tt.palette.action.selected,tt.palette.action.selectedOpacity+tt.palette.action.focusOpacity)}},et.onDelete&&et.color!=="default"&&{[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:(tt.vars||tt).palette[et.color].dark}})},({theme:tt,ownerState:et})=>_extends$u({},et.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.selectedChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.hoverOpacity}))`:alpha$1(tt.palette.action.selected,tt.palette.action.selectedOpacity+tt.palette.action.hoverOpacity)},[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.selectedChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.focusOpacity}))`:alpha$1(tt.palette.action.selected,tt.palette.action.selectedOpacity+tt.palette.action.focusOpacity)},"&:active":{boxShadow:(tt.vars||tt).shadows[1]}},et.clickable&&et.color!=="default"&&{[`&:hover, &.${chipClasses$1.focusVisible}`]:{backgroundColor:(tt.vars||tt).palette[et.color].dark}}),({theme:tt,ownerState:et})=>_extends$u({},et.variant==="outlined"&&{backgroundColor:"transparent",border:tt.vars?`1px solid ${tt.vars.palette.Chip.defaultBorder}`:`1px solid ${tt.palette.mode==="light"?tt.palette.grey[400]:tt.palette.grey[700]}`,[`&.${chipClasses$1.clickable}:hover`]:{backgroundColor:(tt.vars||tt).palette.action.hover},[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:(tt.vars||tt).palette.action.focus},[`& .${chipClasses$1.avatar}`]:{marginLeft:4},[`& .${chipClasses$1.avatarSmall}`]:{marginLeft:2},[`& .${chipClasses$1.icon}`]:{marginLeft:4},[`& .${chipClasses$1.iconSmall}`]:{marginLeft:2},[`& .${chipClasses$1.deleteIcon}`]:{marginRight:5},[`& .${chipClasses$1.deleteIconSmall}`]:{marginRight:3}},et.variant==="outlined"&&et.color!=="default"&&{color:(tt.vars||tt).palette[et.color].main,border:`1px solid ${tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / 0.7)`:alpha$1(tt.palette[et.color].main,.7)}`,[`&.${chipClasses$1.clickable}:hover`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette[et.color].main,tt.palette.action.hoverOpacity)},[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / ${tt.vars.palette.action.focusOpacity})`:alpha$1(tt.palette[et.color].main,tt.palette.action.focusOpacity)},[`& .${chipClasses$1.deleteIcon}`]:{color:tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / 0.7)`:alpha$1(tt.palette[et.color].main,.7),"&:hover, &:active":{color:(tt.vars||tt).palette[et.color].main}}})),ChipLabel=styled$1("span",{name:"MuiChip",slot:"Label",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt,{size:rt}=nt;return[et.label,et[`label${capitalize(rt)}`]]}})(({ownerState:tt})=>_extends$u({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},tt.variant==="outlined"&&{paddingLeft:11,paddingRight:11},tt.size==="small"&&{paddingLeft:8,paddingRight:8},tt.size==="small"&&tt.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function isDeleteKeyboardEvent(tt){return tt.key==="Backspace"||tt.key==="Delete"}const Chip=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiChip"}),{avatar:it,className:ot,clickable:at,color:st="default",component:lt,deleteIcon:ct,disabled:ut=!1,icon:ht,label:dt,onClick:pt,onDelete:mt,onKeyDown:gt,onKeyUp:yt,size:bt="medium",variant:vt="filled",tabIndex:xt,skipFocusWhenDisabled:kt=!1}=rt,St=_objectWithoutPropertiesLoose$m(rt,_excluded$1n),Tt=reactExports.useRef(null),At=useForkRef(Tt,nt),Et=Ft=>{Ft.stopPropagation(),mt&&mt(Ft)},$t=Ft=>{Ft.currentTarget===Ft.target&&isDeleteKeyboardEvent(Ft)&&Ft.preventDefault(),gt&>(Ft)},Dt=Ft=>{Ft.currentTarget===Ft.target&&(mt&&isDeleteKeyboardEvent(Ft)?mt(Ft):Ft.key==="Escape"&&Tt.current&&Tt.current.blur()),yt&&yt(Ft)},jt=at!==!1&&pt?!0:at,Pt=jt||mt?ButtonBase$1:lt||"div",Ct=_extends$u({},rt,{component:Pt,disabled:ut,size:bt,color:st,iconColor:reactExports.isValidElement(ht)&&ht.props.color||st,onDelete:!!mt,clickable:jt,variant:vt}),wt=useUtilityClasses$Q(Ct),It=Pt===ButtonBase$1?_extends$u({component:lt||"div",focusVisibleClassName:wt.focusVisible},mt&&{disableRipple:!0}):{};let Ot=null;mt&&(Ot=ct&&reactExports.isValidElement(ct)?reactExports.cloneElement(ct,{className:clsx$3(ct.props.className,wt.deleteIcon),onClick:Et}):jsxRuntimeExports.jsx(CancelIcon,{className:clsx$3(wt.deleteIcon),onClick:Et}));let Wt=null;it&&reactExports.isValidElement(it)&&(Wt=reactExports.cloneElement(it,{className:clsx$3(wt.avatar,it.props.className)}));let zt=null;return ht&&reactExports.isValidElement(ht)&&(zt=reactExports.cloneElement(ht,{className:clsx$3(wt.icon,ht.props.className)})),jsxRuntimeExports.jsxs(ChipRoot,_extends$u({as:Pt,className:clsx$3(wt.root,ot),disabled:jt&&ut?!0:void 0,onClick:pt,onKeyDown:$t,onKeyUp:Dt,ref:At,tabIndex:kt&&ut?-1:xt,ownerState:Ct},It,St,{children:[Wt||zt,jsxRuntimeExports.jsx(ChipLabel,{className:clsx$3(wt.label),ownerState:Ct,children:dt}),Ot]}))}),Chip$1=Chip;function formControlState({props:tt,states:et,muiFormControl:nt}){return et.reduce((rt,it)=>(rt[it]=tt[it],nt&&typeof tt[it]>"u"&&(rt[it]=nt[it]),rt),{})}const FormControlContext=reactExports.createContext(void 0),FormControlContext$1=FormControlContext;function useFormControl(){return reactExports.useContext(FormControlContext$1)}function GlobalStyles(tt){return jsxRuntimeExports.jsx(GlobalStyles$1,_extends$u({},tt,{defaultTheme:defaultTheme$1,themeId:THEME_ID}))}function hasValue(tt){return tt!=null&&!(Array.isArray(tt)&&tt.length===0)}function isFilled(tt,et=!1){return tt&&(hasValue(tt.value)&&tt.value!==""||et&&hasValue(tt.defaultValue)&&tt.defaultValue!=="")}function isAdornedStart(tt){return tt.startAdornment}function getInputBaseUtilityClass(tt){return generateUtilityClass("MuiInputBase",tt)}const inputBaseClasses=generateUtilityClasses("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),inputBaseClasses$1=inputBaseClasses,_excluded$1m=["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"],rootOverridesResolver=(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.formControl&&et.formControl,nt.startAdornment&&et.adornedStart,nt.endAdornment&&et.adornedEnd,nt.error&&et.error,nt.size==="small"&&et.sizeSmall,nt.multiline&&et.multiline,nt.color&&et[`color${capitalize(nt.color)}`],nt.fullWidth&&et.fullWidth,nt.hiddenLabel&&et.hiddenLabel]},inputOverridesResolver=(tt,et)=>{const{ownerState:nt}=tt;return[et.input,nt.size==="small"&&et.inputSizeSmall,nt.multiline&&et.inputMultiline,nt.type==="search"&&et.inputTypeSearch,nt.startAdornment&&et.inputAdornedStart,nt.endAdornment&&et.inputAdornedEnd,nt.hiddenLabel&&et.inputHiddenLabel]},useUtilityClasses$P=tt=>{const{classes:et,color:nt,disabled:rt,error:it,endAdornment:ot,focused:at,formControl:st,fullWidth:lt,hiddenLabel:ct,multiline:ut,readOnly:ht,size:dt,startAdornment:pt,type:mt}=tt,gt={root:["root",`color${capitalize(nt)}`,rt&&"disabled",it&&"error",lt&&"fullWidth",at&&"focused",st&&"formControl",dt&&dt!=="medium"&&`size${capitalize(dt)}`,ut&&"multiline",pt&&"adornedStart",ot&&"adornedEnd",ct&&"hiddenLabel",ht&&"readOnly"],input:["input",rt&&"disabled",mt==="search"&&"inputTypeSearch",ut&&"inputMultiline",dt==="small"&&"inputSizeSmall",ct&&"inputHiddenLabel",pt&&"inputAdornedStart",ot&&"inputAdornedEnd",ht&&"readOnly"]};return composeClasses(gt,getInputBaseUtilityClass,et)},InputBaseRoot=styled$1("div",{name:"MuiInputBase",slot:"Root",overridesResolver:rootOverridesResolver})(({theme:tt,ownerState:et})=>_extends$u({},tt.typography.body1,{color:(tt.vars||tt).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${inputBaseClasses$1.disabled}`]:{color:(tt.vars||tt).palette.text.disabled,cursor:"default"}},et.multiline&&_extends$u({padding:"4px 0 5px"},et.size==="small"&&{paddingTop:1}),et.fullWidth&&{width:"100%"})),InputBaseComponent=styled$1("input",{name:"MuiInputBase",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:tt,ownerState:et})=>{const nt=tt.palette.mode==="light",rt=_extends$u({color:"currentColor"},tt.vars?{opacity:tt.vars.opacity.inputPlaceholder}:{opacity:nt?.42:.5},{transition:tt.transitions.create("opacity",{duration:tt.transitions.duration.shorter})}),it={opacity:"0 !important"},ot=tt.vars?{opacity:tt.vars.opacity.inputPlaceholder}:{opacity:nt?.42:.5};return _extends$u({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":rt,"&::-moz-placeholder":rt,"&:-ms-input-placeholder":rt,"&::-ms-input-placeholder":rt,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${inputBaseClasses$1.formControl} &`]:{"&::-webkit-input-placeholder":it,"&::-moz-placeholder":it,"&:-ms-input-placeholder":it,"&::-ms-input-placeholder":it,"&:focus::-webkit-input-placeholder":ot,"&:focus::-moz-placeholder":ot,"&:focus:-ms-input-placeholder":ot,"&:focus::-ms-input-placeholder":ot},[`&.${inputBaseClasses$1.disabled}`]:{opacity:1,WebkitTextFillColor:(tt.vars||tt).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},et.size==="small"&&{paddingTop:1},et.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},et.type==="search"&&{MozAppearance:"textfield"})}),inputGlobalStyles=jsxRuntimeExports.jsx(GlobalStyles,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),InputBase=reactExports.forwardRef(function(et,nt){var rt;const it=useThemeProps({props:et,name:"MuiInputBase"}),{"aria-describedby":ot,autoComplete:at,autoFocus:st,className:lt,components:ct={},componentsProps:ut={},defaultValue:ht,disabled:dt,disableInjectingGlobalStyles:pt,endAdornment:mt,fullWidth:gt=!1,id:yt,inputComponent:bt="input",inputProps:vt={},inputRef:xt,maxRows:kt,minRows:St,multiline:Tt=!1,name:At,onBlur:Et,onChange:$t,onClick:Dt,onFocus:jt,onKeyDown:Pt,onKeyUp:Ct,placeholder:wt,readOnly:It,renderSuffix:Ot,rows:Wt,slotProps:zt={},slots:Ft={},startAdornment:Nt,type:Ut="text",value:Mt}=it,Ht=_objectWithoutPropertiesLoose$m(it,_excluded$1m),en=vt.value!=null?vt.value:Mt,{current:sn}=reactExports.useRef(en!=null),Kt=reactExports.useRef(),rn=reactExports.useCallback(Zt=>{},[]),nn=useForkRef(Kt,xt,vt.ref,rn),[hn,vn]=reactExports.useState(!1),an=useFormControl(),Qt=formControlState({props:it,muiFormControl:an,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Qt.focused=an?an.focused:hn,reactExports.useEffect(()=>{!an&&dt&&hn&&(vn(!1),Et&&Et())},[an,dt,hn,Et]);const _n=an&&an.onFilled,Pn=an&&an.onEmpty,$n=reactExports.useCallback(Zt=>{isFilled(Zt)?_n&&_n():Pn&&Pn()},[_n,Pn]);useEnhancedEffect$1(()=>{sn&&$n({value:en})},[en,$n,sn]);const Nn=Zt=>{if(Qt.disabled){Zt.stopPropagation();return}jt&&jt(Zt),vt.onFocus&&vt.onFocus(Zt),an&&an.onFocus?an.onFocus(Zt):vn(!0)},Tn=Zt=>{Et&&Et(Zt),vt.onBlur&&vt.onBlur(Zt),an&&an.onBlur?an.onBlur(Zt):vn(!1)},cn=(Zt,...Xt)=>{if(!sn){const Sn=Zt.target||Kt.current;if(Sn==null)throw new Error(formatMuiErrorMessage(1));$n({value:Sn.value})}vt.onChange&&vt.onChange(Zt,...Xt),$t&&$t(Zt,...Xt)};reactExports.useEffect(()=>{$n(Kt.current)},[]);const mn=Zt=>{Kt.current&&Zt.currentTarget===Zt.target&&Kt.current.focus(),Dt&&Dt(Zt)};let In=bt,An=vt;Tt&&In==="input"&&(Wt?An=_extends$u({type:void 0,minRows:Wt,maxRows:Wt},An):An=_extends$u({type:void 0,maxRows:kt,minRows:St},An),In=TextareaAutosize);const wn=Zt=>{$n(Zt.animationName==="mui-auto-fill-cancel"?Kt.current:{value:"x"})};reactExports.useEffect(()=>{an&&an.setAdornedStart(!!Nt)},[an,Nt]);const fn=_extends$u({},it,{color:Qt.color||"primary",disabled:Qt.disabled,endAdornment:mt,error:Qt.error,focused:Qt.focused,formControl:an,fullWidth:gt,hiddenLabel:Qt.hiddenLabel,multiline:Tt,size:Qt.size,startAdornment:Nt,type:Ut}),pn=useUtilityClasses$P(fn),kn=Ft.root||ct.Root||InputBaseRoot,Dn=zt.root||ut.root||{},un=Ft.input||ct.Input||InputBaseComponent;return An=_extends$u({},An,(rt=zt.input)!=null?rt:ut.input),jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[!pt&&inputGlobalStyles,jsxRuntimeExports.jsxs(kn,_extends$u({},Dn,!isHostComponent(kn)&&{ownerState:_extends$u({},fn,Dn.ownerState)},{ref:nt,onClick:mn},Ht,{className:clsx$3(pn.root,Dn.className,lt,It&&"MuiInputBase-readOnly"),children:[Nt,jsxRuntimeExports.jsx(FormControlContext$1.Provider,{value:null,children:jsxRuntimeExports.jsx(un,_extends$u({ownerState:fn,"aria-invalid":Qt.error,"aria-describedby":ot,autoComplete:at,autoFocus:st,defaultValue:ht,disabled:Qt.disabled,id:yt,onAnimationStart:wn,name:At,placeholder:wt,readOnly:It,required:Qt.required,rows:Wt,value:en,onKeyDown:Pt,onKeyUp:Ct,type:Ut},An,!isHostComponent(un)&&{as:In,ownerState:_extends$u({},fn,An.ownerState)},{ref:nn,className:clsx$3(pn.input,An.className,It&&"MuiInputBase-readOnly"),onBlur:Tn,onChange:cn,onFocus:Nn}))}),mt,Ot?Ot(_extends$u({},Qt,{startAdornment:Nt})):null]}))]})}),InputBase$1=InputBase;function getInputUtilityClass(tt){return generateUtilityClass("MuiInput",tt)}const inputClasses=_extends$u({},inputBaseClasses$1,generateUtilityClasses("MuiInput",["root","underline","input"])),inputClasses$1=inputClasses;function getOutlinedInputUtilityClass(tt){return generateUtilityClass("MuiOutlinedInput",tt)}const outlinedInputClasses=_extends$u({},inputBaseClasses$1,generateUtilityClasses("MuiOutlinedInput",["root","notchedOutline","input"])),outlinedInputClasses$1=outlinedInputClasses;function getFilledInputUtilityClass(tt){return generateUtilityClass("MuiFilledInput",tt)}const filledInputClasses=_extends$u({},inputBaseClasses$1,generateUtilityClasses("MuiFilledInput",["root","underline","input"])),filledInputClasses$1=filledInputClasses,ArrowDropDownIcon$1=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),_excluded$1l=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],styles$4={entering:{opacity:1},entered:{opacity:1}},Fade=reactExports.forwardRef(function(et,nt){const rt=useTheme(),it={enter:rt.transitions.duration.enteringScreen,exit:rt.transitions.duration.leavingScreen},{addEndListener:ot,appear:at=!0,children:st,easing:lt,in:ct,onEnter:ut,onEntered:ht,onEntering:dt,onExit:pt,onExited:mt,onExiting:gt,style:yt,timeout:bt=it,TransitionComponent:vt=Transition$2}=et,xt=_objectWithoutPropertiesLoose$m(et,_excluded$1l),kt=reactExports.useRef(null),St=useForkRef(kt,st.ref,nt),Tt=wt=>It=>{if(wt){const Ot=kt.current;It===void 0?wt(Ot):wt(Ot,It)}},At=Tt(dt),Et=Tt((wt,It)=>{reflow(wt);const Ot=getTransitionProps({style:yt,timeout:bt,easing:lt},{mode:"enter"});wt.style.webkitTransition=rt.transitions.create("opacity",Ot),wt.style.transition=rt.transitions.create("opacity",Ot),ut&&ut(wt,It)}),$t=Tt(ht),Dt=Tt(gt),jt=Tt(wt=>{const It=getTransitionProps({style:yt,timeout:bt,easing:lt},{mode:"exit"});wt.style.webkitTransition=rt.transitions.create("opacity",It),wt.style.transition=rt.transitions.create("opacity",It),pt&&pt(wt)}),Pt=Tt(mt),Ct=wt=>{ot&&ot(kt.current,wt)};return jsxRuntimeExports.jsx(vt,_extends$u({appear:at,in:ct,nodeRef:kt,onEnter:Et,onEntered:$t,onEntering:At,onExit:jt,onExited:Pt,onExiting:Dt,addEndListener:Ct,timeout:bt},xt,{children:(wt,It)=>reactExports.cloneElement(st,_extends$u({style:_extends$u({opacity:0,visibility:wt==="exited"&&!ct?"hidden":void 0},styles$4[wt],yt,st.props.style),ref:St},It))}))}),Fade$1=Fade;function getBackdropUtilityClass(tt){return generateUtilityClass("MuiBackdrop",tt)}generateUtilityClasses("MuiBackdrop",["root","invisible"]);const _excluded$1k=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],useUtilityClasses$O=tt=>{const{classes:et,invisible:nt}=tt;return composeClasses({root:["root",nt&&"invisible"]},getBackdropUtilityClass,et)},BackdropRoot=styled$1("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.invisible&&et.invisible]}})(({ownerState:tt})=>_extends$u({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"},tt.invisible&&{backgroundColor:"transparent"})),Backdrop=reactExports.forwardRef(function(et,nt){var rt,it,ot;const at=useThemeProps({props:et,name:"MuiBackdrop"}),{children:st,className:lt,component:ct="div",components:ut={},componentsProps:ht={},invisible:dt=!1,open:pt,slotProps:mt={},slots:gt={},TransitionComponent:yt=Fade$1,transitionDuration:bt}=at,vt=_objectWithoutPropertiesLoose$m(at,_excluded$1k),xt=_extends$u({},at,{component:ct,invisible:dt}),kt=useUtilityClasses$O(xt),St=(rt=mt.root)!=null?rt:ht.root;return jsxRuntimeExports.jsx(yt,_extends$u({in:pt,timeout:bt},vt,{children:jsxRuntimeExports.jsx(BackdropRoot,_extends$u({"aria-hidden":!0},St,{as:(it=(ot=gt.root)!=null?ot:ut.Root)!=null?it:ct,className:clsx$3(kt.root,lt,St==null?void 0:St.className),ownerState:_extends$u({},xt,St==null?void 0:St.ownerState),classes:kt,ref:nt,children:st}))}))}),Backdrop$1=Backdrop;function getButtonUtilityClass(tt){return generateUtilityClass("MuiButton",tt)}const buttonClasses=generateUtilityClasses("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),buttonClasses$1=buttonClasses,ButtonGroupContext=reactExports.createContext({}),ButtonGroupContext$1=ButtonGroupContext,ButtonGroupButtonContext=reactExports.createContext(void 0),ButtonGroupButtonContext$1=ButtonGroupButtonContext,_excluded$1j=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],useUtilityClasses$N=tt=>{const{color:et,disableElevation:nt,fullWidth:rt,size:it,variant:ot,classes:at}=tt,st={root:["root",ot,`${ot}${capitalize(et)}`,`size${capitalize(it)}`,`${ot}Size${capitalize(it)}`,et==="inherit"&&"colorInherit",nt&&"disableElevation",rt&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${capitalize(it)}`],endIcon:["endIcon",`iconSize${capitalize(it)}`]},lt=composeClasses(st,getButtonUtilityClass,at);return _extends$u({},at,lt)},commonIconStyles=tt=>_extends$u({},tt.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},tt.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},tt.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),ButtonRoot=styled$1(ButtonBase$1,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiButton",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,et[nt.variant],et[`${nt.variant}${capitalize(nt.color)}`],et[`size${capitalize(nt.size)}`],et[`${nt.variant}Size${capitalize(nt.size)}`],nt.color==="inherit"&&et.colorInherit,nt.disableElevation&&et.disableElevation,nt.fullWidth&&et.fullWidth]}})(({theme:tt,ownerState:et})=>{var nt,rt;const it=tt.palette.mode==="light"?tt.palette.grey[300]:tt.palette.grey[800],ot=tt.palette.mode==="light"?tt.palette.grey.A100:tt.palette.grey[700];return _extends$u({},tt.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(tt.vars||tt).shape.borderRadius,transition:tt.transitions.create(["background-color","box-shadow","border-color","color"],{duration:tt.transitions.duration.short}),"&:hover":_extends$u({textDecoration:"none",backgroundColor:tt.vars?`rgba(${tt.vars.palette.text.primaryChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette.text.primary,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},et.variant==="text"&&et.color!=="inherit"&&{backgroundColor:tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette[et.color].main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},et.variant==="outlined"&&et.color!=="inherit"&&{border:`1px solid ${(tt.vars||tt).palette[et.color].main}`,backgroundColor:tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette[et.color].main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},et.variant==="contained"&&{backgroundColor:tt.vars?tt.vars.palette.Button.inheritContainedHoverBg:ot,boxShadow:(tt.vars||tt).shadows[4],"@media (hover: none)":{boxShadow:(tt.vars||tt).shadows[2],backgroundColor:(tt.vars||tt).palette.grey[300]}},et.variant==="contained"&&et.color!=="inherit"&&{backgroundColor:(tt.vars||tt).palette[et.color].dark,"@media (hover: none)":{backgroundColor:(tt.vars||tt).palette[et.color].main}}),"&:active":_extends$u({},et.variant==="contained"&&{boxShadow:(tt.vars||tt).shadows[8]}),[`&.${buttonClasses$1.focusVisible}`]:_extends$u({},et.variant==="contained"&&{boxShadow:(tt.vars||tt).shadows[6]}),[`&.${buttonClasses$1.disabled}`]:_extends$u({color:(tt.vars||tt).palette.action.disabled},et.variant==="outlined"&&{border:`1px solid ${(tt.vars||tt).palette.action.disabledBackground}`},et.variant==="contained"&&{color:(tt.vars||tt).palette.action.disabled,boxShadow:(tt.vars||tt).shadows[0],backgroundColor:(tt.vars||tt).palette.action.disabledBackground})},et.variant==="text"&&{padding:"6px 8px"},et.variant==="text"&&et.color!=="inherit"&&{color:(tt.vars||tt).palette[et.color].main},et.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},et.variant==="outlined"&&et.color!=="inherit"&&{color:(tt.vars||tt).palette[et.color].main,border:tt.vars?`1px solid rgba(${tt.vars.palette[et.color].mainChannel} / 0.5)`:`1px solid ${alpha$1(tt.palette[et.color].main,.5)}`},et.variant==="contained"&&{color:tt.vars?tt.vars.palette.text.primary:(nt=(rt=tt.palette).getContrastText)==null?void 0:nt.call(rt,tt.palette.grey[300]),backgroundColor:tt.vars?tt.vars.palette.Button.inheritContainedBg:it,boxShadow:(tt.vars||tt).shadows[2]},et.variant==="contained"&&et.color!=="inherit"&&{color:(tt.vars||tt).palette[et.color].contrastText,backgroundColor:(tt.vars||tt).palette[et.color].main},et.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},et.size==="small"&&et.variant==="text"&&{padding:"4px 5px",fontSize:tt.typography.pxToRem(13)},et.size==="large"&&et.variant==="text"&&{padding:"8px 11px",fontSize:tt.typography.pxToRem(15)},et.size==="small"&&et.variant==="outlined"&&{padding:"3px 9px",fontSize:tt.typography.pxToRem(13)},et.size==="large"&&et.variant==="outlined"&&{padding:"7px 21px",fontSize:tt.typography.pxToRem(15)},et.size==="small"&&et.variant==="contained"&&{padding:"4px 10px",fontSize:tt.typography.pxToRem(13)},et.size==="large"&&et.variant==="contained"&&{padding:"8px 22px",fontSize:tt.typography.pxToRem(15)},et.fullWidth&&{width:"100%"})},({ownerState:tt})=>tt.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${buttonClasses$1.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${buttonClasses$1.disabled}`]:{boxShadow:"none"}}),ButtonStartIcon=styled$1("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.startIcon,et[`iconSize${capitalize(nt.size)}`]]}})(({ownerState:tt})=>_extends$u({display:"inherit",marginRight:8,marginLeft:-4},tt.size==="small"&&{marginLeft:-2},commonIconStyles(tt))),ButtonEndIcon=styled$1("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.endIcon,et[`iconSize${capitalize(nt.size)}`]]}})(({ownerState:tt})=>_extends$u({display:"inherit",marginRight:-4,marginLeft:8},tt.size==="small"&&{marginRight:-2},commonIconStyles(tt))),Button$1=reactExports.forwardRef(function(et,nt){const rt=reactExports.useContext(ButtonGroupContext$1),it=reactExports.useContext(ButtonGroupButtonContext$1),ot=resolveProps(rt,et),at=useThemeProps({props:ot,name:"MuiButton"}),{children:st,color:lt="primary",component:ct="button",className:ut,disabled:ht=!1,disableElevation:dt=!1,disableFocusRipple:pt=!1,endIcon:mt,focusVisibleClassName:gt,fullWidth:yt=!1,size:bt="medium",startIcon:vt,type:xt,variant:kt="text"}=at,St=_objectWithoutPropertiesLoose$m(at,_excluded$1j),Tt=_extends$u({},at,{color:lt,component:ct,disabled:ht,disableElevation:dt,disableFocusRipple:pt,fullWidth:yt,size:bt,type:xt,variant:kt}),At=useUtilityClasses$N(Tt),Et=vt&&jsxRuntimeExports.jsx(ButtonStartIcon,{className:At.startIcon,ownerState:Tt,children:vt}),$t=mt&&jsxRuntimeExports.jsx(ButtonEndIcon,{className:At.endIcon,ownerState:Tt,children:mt}),Dt=it||"";return jsxRuntimeExports.jsxs(ButtonRoot,_extends$u({ownerState:Tt,className:clsx$3(rt.className,At.root,ut,Dt),component:ct,disabled:ht,focusRipple:!pt,focusVisibleClassName:clsx$3(At.focusVisible,gt),ref:nt,type:xt},St,{classes:At,children:[Et,st,$t]}))}),Button$2=Button$1;function getModalUtilityClass(tt){return generateUtilityClass("MuiModal",tt)}generateUtilityClasses("MuiModal",["root","hidden","backdrop"]);const _excluded$1i=["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"],useUtilityClasses$M=tt=>{const{open:et,exited:nt,classes:rt}=tt;return composeClasses({root:["root",!et&&nt&&"hidden"],backdrop:["backdrop"]},getModalUtilityClass,rt)},ModalRoot=styled$1("div",{name:"MuiModal",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,!nt.open&&nt.exited&&et.hidden]}})(({theme:tt,ownerState:et})=>_extends$u({position:"fixed",zIndex:(tt.vars||tt).zIndex.modal,right:0,bottom:0,top:0,left:0},!et.open&&et.exited&&{visibility:"hidden"})),ModalBackdrop=styled$1(Backdrop$1,{name:"MuiModal",slot:"Backdrop",overridesResolver:(tt,et)=>et.backdrop})({zIndex:-1}),Modal=reactExports.forwardRef(function(et,nt){var rt,it,ot,at,st,lt;const ct=useThemeProps({name:"MuiModal",props:et}),{BackdropComponent:ut=ModalBackdrop,BackdropProps:ht,className:dt,closeAfterTransition:pt=!1,children:mt,container:gt,component:yt,components:bt={},componentsProps:vt={},disableAutoFocus:xt=!1,disableEnforceFocus:kt=!1,disableEscapeKeyDown:St=!1,disablePortal:Tt=!1,disableRestoreFocus:At=!1,disableScrollLock:Et=!1,hideBackdrop:$t=!1,keepMounted:Dt=!1,onBackdropClick:jt,open:Pt,slotProps:Ct,slots:wt}=ct,It=_objectWithoutPropertiesLoose$m(ct,_excluded$1i),Ot=_extends$u({},ct,{closeAfterTransition:pt,disableAutoFocus:xt,disableEnforceFocus:kt,disableEscapeKeyDown:St,disablePortal:Tt,disableRestoreFocus:At,disableScrollLock:Et,hideBackdrop:$t,keepMounted:Dt}),{getRootProps:Wt,getBackdropProps:zt,getTransitionProps:Ft,portalRef:Nt,isTopModal:Ut,exited:Mt,hasTransition:Ht}=useModal$1(_extends$u({},Ot,{rootRef:nt})),en=_extends$u({},Ot,{exited:Mt}),sn=useUtilityClasses$M(en),Kt={};if(mt.props.tabIndex===void 0&&(Kt.tabIndex="-1"),Ht){const{onEnter:_n,onExited:Pn}=Ft();Kt.onEnter=_n,Kt.onExited=Pn}const rn=(rt=(it=wt==null?void 0:wt.root)!=null?it:bt.Root)!=null?rt:ModalRoot,nn=(ot=(at=wt==null?void 0:wt.backdrop)!=null?at:bt.Backdrop)!=null?ot:ut,hn=(st=Ct==null?void 0:Ct.root)!=null?st:vt.root,vn=(lt=Ct==null?void 0:Ct.backdrop)!=null?lt:vt.backdrop,an=useSlotProps({elementType:rn,externalSlotProps:hn,externalForwardedProps:It,getSlotProps:Wt,additionalProps:{ref:nt,as:yt},ownerState:en,className:clsx$3(dt,hn==null?void 0:hn.className,sn==null?void 0:sn.root,!en.open&&en.exited&&(sn==null?void 0:sn.hidden))}),Qt=useSlotProps({elementType:nn,externalSlotProps:vn,additionalProps:ht,getSlotProps:_n=>zt(_extends$u({},_n,{onClick:Pn=>{jt&&jt(Pn),_n!=null&&_n.onClick&&_n.onClick(Pn)}})),className:clsx$3(vn==null?void 0:vn.className,ht==null?void 0:ht.className,sn==null?void 0:sn.backdrop),ownerState:en});return!Dt&&!Pt&&(!Ht||Mt)?null:jsxRuntimeExports.jsx(Portal$1,{ref:Nt,container:gt,disablePortal:Tt,children:jsxRuntimeExports.jsxs(rn,_extends$u({},an,{children:[!$t&&ut?jsxRuntimeExports.jsx(nn,_extends$u({},Qt)):null,jsxRuntimeExports.jsx(FocusTrap,{disableEnforceFocus:kt,disableAutoFocus:xt,disableRestoreFocus:At,isEnabled:Ut,open:Pt,children:reactExports.cloneElement(mt,Kt)})]}))})}),Modal$1=Modal;function getDialogUtilityClass(tt){return generateUtilityClass("MuiDialog",tt)}const dialogClasses=generateUtilityClasses("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),dialogClasses$1=dialogClasses,DialogContext=reactExports.createContext({}),DialogContext$1=DialogContext,_excluded$1h=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],DialogBackdrop=styled$1(Backdrop$1,{name:"MuiDialog",slot:"Backdrop",overrides:(tt,et)=>et.backdrop})({zIndex:-1}),useUtilityClasses$L=tt=>{const{classes:et,scroll:nt,maxWidth:rt,fullWidth:it,fullScreen:ot}=tt,at={root:["root"],container:["container",`scroll${capitalize(nt)}`],paper:["paper",`paperScroll${capitalize(nt)}`,`paperWidth${capitalize(String(rt))}`,it&&"paperFullWidth",ot&&"paperFullScreen"]};return composeClasses(at,getDialogUtilityClass,et)},DialogRoot=styled$1(Modal$1,{name:"MuiDialog",slot:"Root",overridesResolver:(tt,et)=>et.root})({"@media print":{position:"absolute !important"}}),DialogContainer=styled$1("div",{name:"MuiDialog",slot:"Container",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.container,et[`scroll${capitalize(nt.scroll)}`]]}})(({ownerState:tt})=>_extends$u({height:"100%","@media print":{height:"auto"},outline:0},tt.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},tt.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),DialogPaper=styled$1(Paper$1,{name:"MuiDialog",slot:"Paper",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.paper,et[`scrollPaper${capitalize(nt.scroll)}`],et[`paperWidth${capitalize(String(nt.maxWidth))}`],nt.fullWidth&&et.paperFullWidth,nt.fullScreen&&et.paperFullScreen]}})(({theme:tt,ownerState:et})=>_extends$u({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},et.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},et.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!et.maxWidth&&{maxWidth:"calc(100% - 64px)"},et.maxWidth==="xs"&&{maxWidth:tt.breakpoints.unit==="px"?Math.max(tt.breakpoints.values.xs,444):`max(${tt.breakpoints.values.xs}${tt.breakpoints.unit}, 444px)`,[`&.${dialogClasses$1.paperScrollBody}`]:{[tt.breakpoints.down(Math.max(tt.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},et.maxWidth&&et.maxWidth!=="xs"&&{maxWidth:`${tt.breakpoints.values[et.maxWidth]}${tt.breakpoints.unit}`,[`&.${dialogClasses$1.paperScrollBody}`]:{[tt.breakpoints.down(tt.breakpoints.values[et.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},et.fullWidth&&{width:"calc(100% - 64px)"},et.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${dialogClasses$1.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),Dialog=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDialog"}),it=useTheme(),ot={enter:it.transitions.duration.enteringScreen,exit:it.transitions.duration.leavingScreen},{"aria-describedby":at,"aria-labelledby":st,BackdropComponent:lt,BackdropProps:ct,children:ut,className:ht,disableEscapeKeyDown:dt=!1,fullScreen:pt=!1,fullWidth:mt=!1,maxWidth:gt="sm",onBackdropClick:yt,onClose:bt,open:vt,PaperComponent:xt=Paper$1,PaperProps:kt={},scroll:St="paper",TransitionComponent:Tt=Fade$1,transitionDuration:At=ot,TransitionProps:Et}=rt,$t=_objectWithoutPropertiesLoose$m(rt,_excluded$1h),Dt=_extends$u({},rt,{disableEscapeKeyDown:dt,fullScreen:pt,fullWidth:mt,maxWidth:gt,scroll:St}),jt=useUtilityClasses$L(Dt),Pt=reactExports.useRef(),Ct=Wt=>{Pt.current=Wt.target===Wt.currentTarget},wt=Wt=>{Pt.current&&(Pt.current=null,yt&&yt(Wt),bt&&bt(Wt,"backdropClick"))},It=useId(st),Ot=reactExports.useMemo(()=>({titleId:It}),[It]);return jsxRuntimeExports.jsx(DialogRoot,_extends$u({className:clsx$3(jt.root,ht),closeAfterTransition:!0,components:{Backdrop:DialogBackdrop},componentsProps:{backdrop:_extends$u({transitionDuration:At,as:lt},ct)},disableEscapeKeyDown:dt,onClose:bt,open:vt,ref:nt,onClick:wt,ownerState:Dt},$t,{children:jsxRuntimeExports.jsx(Tt,_extends$u({appear:!0,in:vt,timeout:At,role:"presentation"},Et,{children:jsxRuntimeExports.jsx(DialogContainer,{className:clsx$3(jt.container),onMouseDown:Ct,ownerState:Dt,children:jsxRuntimeExports.jsx(DialogPaper,_extends$u({as:xt,elevation:24,role:"dialog","aria-describedby":at,"aria-labelledby":It},kt,{className:clsx$3(jt.paper,kt.className),ownerState:Dt,children:jsxRuntimeExports.jsx(DialogContext$1.Provider,{value:Ot,children:ut})}))})}))}))}),MuiDialog=Dialog;function getDialogActionsUtilityClass(tt){return generateUtilityClass("MuiDialogActions",tt)}generateUtilityClasses("MuiDialogActions",["root","spacing"]);const _excluded$1g=["className","disableSpacing"],useUtilityClasses$K=tt=>{const{classes:et,disableSpacing:nt}=tt;return composeClasses({root:["root",!nt&&"spacing"]},getDialogActionsUtilityClass,et)},DialogActionsRoot=styled$1("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,!nt.disableSpacing&&et.spacing]}})(({ownerState:tt})=>_extends$u({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!tt.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),DialogActions=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDialogActions"}),{className:it,disableSpacing:ot=!1}=rt,at=_objectWithoutPropertiesLoose$m(rt,_excluded$1g),st=_extends$u({},rt,{disableSpacing:ot}),lt=useUtilityClasses$K(st);return jsxRuntimeExports.jsx(DialogActionsRoot,_extends$u({className:clsx$3(lt.root,it),ownerState:st,ref:nt},at))}),DialogActions$1=DialogActions;function getDialogContentUtilityClass(tt){return generateUtilityClass("MuiDialogContent",tt)}generateUtilityClasses("MuiDialogContent",["root","dividers"]);const dialogTitleClasses=generateUtilityClasses("MuiDialogTitle",["root"]),dialogTitleClasses$1=dialogTitleClasses,_excluded$1f=["className","dividers"],useUtilityClasses$J=tt=>{const{classes:et,dividers:nt}=tt;return composeClasses({root:["root",nt&&"dividers"]},getDialogContentUtilityClass,et)},DialogContentRoot=styled$1("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.dividers&&et.dividers]}})(({theme:tt,ownerState:et})=>_extends$u({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},et.dividers?{padding:"16px 24px",borderTop:`1px solid ${(tt.vars||tt).palette.divider}`,borderBottom:`1px solid ${(tt.vars||tt).palette.divider}`}:{[`.${dialogTitleClasses$1.root} + &`]:{paddingTop:0}})),DialogContent=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDialogContent"}),{className:it,dividers:ot=!1}=rt,at=_objectWithoutPropertiesLoose$m(rt,_excluded$1f),st=_extends$u({},rt,{dividers:ot}),lt=useUtilityClasses$J(st);return jsxRuntimeExports.jsx(DialogContentRoot,_extends$u({className:clsx$3(lt.root,it),ownerState:st,ref:nt},at))}),DialogContent$1=DialogContent;function getDividerUtilityClass(tt){return generateUtilityClass("MuiDivider",tt)}const dividerClasses=generateUtilityClasses("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),_excluded$1e=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],useUtilityClasses$I=tt=>{const{absolute:et,children:nt,classes:rt,flexItem:it,light:ot,orientation:at,textAlign:st,variant:lt}=tt;return composeClasses({root:["root",et&&"absolute",lt,ot&&"light",at==="vertical"&&"vertical",it&&"flexItem",nt&&"withChildren",nt&&at==="vertical"&&"withChildrenVertical",st==="right"&&at!=="vertical"&&"textAlignRight",st==="left"&&at!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",at==="vertical"&&"wrapperVertical"]},getDividerUtilityClass,rt)},DividerRoot=styled$1("div",{name:"MuiDivider",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.absolute&&et.absolute,et[nt.variant],nt.light&&et.light,nt.orientation==="vertical"&&et.vertical,nt.flexItem&&et.flexItem,nt.children&&et.withChildren,nt.children&&nt.orientation==="vertical"&&et.withChildrenVertical,nt.textAlign==="right"&&nt.orientation!=="vertical"&&et.textAlignRight,nt.textAlign==="left"&&nt.orientation!=="vertical"&&et.textAlignLeft]}})(({theme:tt,ownerState:et})=>_extends$u({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(tt.vars||tt).palette.divider,borderBottomWidth:"thin"},et.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},et.light&&{borderColor:tt.vars?`rgba(${tt.vars.palette.dividerChannel} / 0.08)`:alpha$1(tt.palette.divider,.08)},et.variant==="inset"&&{marginLeft:72},et.variant==="middle"&&et.orientation==="horizontal"&&{marginLeft:tt.spacing(2),marginRight:tt.spacing(2)},et.variant==="middle"&&et.orientation==="vertical"&&{marginTop:tt.spacing(1),marginBottom:tt.spacing(1)},et.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},et.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:tt})=>_extends$u({},tt.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:tt,ownerState:et})=>_extends$u({},et.children&&et.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(tt.vars||tt).palette.divider}`}}),({theme:tt,ownerState:et})=>_extends$u({},et.children&&et.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(tt.vars||tt).palette.divider}`}}),({ownerState:tt})=>_extends$u({},tt.textAlign==="right"&&tt.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},tt.textAlign==="left"&&tt.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),DividerWrapper=styled$1("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.wrapper,nt.orientation==="vertical"&&et.wrapperVertical]}})(({theme:tt,ownerState:et})=>_extends$u({display:"inline-block",paddingLeft:`calc(${tt.spacing(1)} * 1.2)`,paddingRight:`calc(${tt.spacing(1)} * 1.2)`},et.orientation==="vertical"&&{paddingTop:`calc(${tt.spacing(1)} * 1.2)`,paddingBottom:`calc(${tt.spacing(1)} * 1.2)`})),Divider$2=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDivider"}),{absolute:it=!1,children:ot,className:at,component:st=ot?"div":"hr",flexItem:lt=!1,light:ct=!1,orientation:ut="horizontal",role:ht=st!=="hr"?"separator":void 0,textAlign:dt="center",variant:pt="fullWidth"}=rt,mt=_objectWithoutPropertiesLoose$m(rt,_excluded$1e),gt=_extends$u({},rt,{absolute:it,component:st,flexItem:lt,light:ct,orientation:ut,role:ht,textAlign:dt,variant:pt}),yt=useUtilityClasses$I(gt);return jsxRuntimeExports.jsx(DividerRoot,_extends$u({as:st,className:clsx$3(yt.root,at),role:ht,ref:nt,ownerState:gt},mt,{children:ot?jsxRuntimeExports.jsx(DividerWrapper,{className:yt.wrapper,ownerState:gt,children:ot}):null}))});Divider$2.muiSkipListHighlight=!0;const Divider$3=Divider$2,_excluded$1d=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function getTranslateValue(tt,et,nt){const rt=et.getBoundingClientRect(),it=nt&&nt.getBoundingClientRect(),ot=ownerWindow(et);let at;if(et.fakeTransform)at=et.fakeTransform;else{const ct=ot.getComputedStyle(et);at=ct.getPropertyValue("-webkit-transform")||ct.getPropertyValue("transform")}let st=0,lt=0;if(at&&at!=="none"&&typeof at=="string"){const ct=at.split("(")[1].split(")")[0].split(",");st=parseInt(ct[4],10),lt=parseInt(ct[5],10)}return tt==="left"?it?`translateX(${it.right+st-rt.left}px)`:`translateX(${ot.innerWidth+st-rt.left}px)`:tt==="right"?it?`translateX(-${rt.right-it.left-st}px)`:`translateX(-${rt.left+rt.width-st}px)`:tt==="up"?it?`translateY(${it.bottom+lt-rt.top}px)`:`translateY(${ot.innerHeight+lt-rt.top}px)`:it?`translateY(-${rt.top-it.top+rt.height-lt}px)`:`translateY(-${rt.top+rt.height-lt}px)`}function resolveContainer(tt){return typeof tt=="function"?tt():tt}function setTranslateValue(tt,et,nt){const rt=resolveContainer(nt),it=getTranslateValue(tt,et,rt);it&&(et.style.webkitTransform=it,et.style.transform=it)}const Slide=reactExports.forwardRef(function(et,nt){const rt=useTheme(),it={enter:rt.transitions.easing.easeOut,exit:rt.transitions.easing.sharp},ot={enter:rt.transitions.duration.enteringScreen,exit:rt.transitions.duration.leavingScreen},{addEndListener:at,appear:st=!0,children:lt,container:ct,direction:ut="down",easing:ht=it,in:dt,onEnter:pt,onEntered:mt,onEntering:gt,onExit:yt,onExited:bt,onExiting:vt,style:xt,timeout:kt=ot,TransitionComponent:St=Transition$2}=et,Tt=_objectWithoutPropertiesLoose$m(et,_excluded$1d),At=reactExports.useRef(null),Et=useForkRef(lt.ref,At,nt),$t=zt=>Ft=>{zt&&(Ft===void 0?zt(At.current):zt(At.current,Ft))},Dt=$t((zt,Ft)=>{setTranslateValue(ut,zt,ct),reflow(zt),pt&&pt(zt,Ft)}),jt=$t((zt,Ft)=>{const Nt=getTransitionProps({timeout:kt,style:xt,easing:ht},{mode:"enter"});zt.style.webkitTransition=rt.transitions.create("-webkit-transform",_extends$u({},Nt)),zt.style.transition=rt.transitions.create("transform",_extends$u({},Nt)),zt.style.webkitTransform="none",zt.style.transform="none",gt&>(zt,Ft)}),Pt=$t(mt),Ct=$t(vt),wt=$t(zt=>{const Ft=getTransitionProps({timeout:kt,style:xt,easing:ht},{mode:"exit"});zt.style.webkitTransition=rt.transitions.create("-webkit-transform",Ft),zt.style.transition=rt.transitions.create("transform",Ft),setTranslateValue(ut,zt,ct),yt&&yt(zt)}),It=$t(zt=>{zt.style.webkitTransition="",zt.style.transition="",bt&&bt(zt)}),Ot=zt=>{at&&at(At.current,zt)},Wt=reactExports.useCallback(()=>{At.current&&setTranslateValue(ut,At.current,ct)},[ut,ct]);return reactExports.useEffect(()=>{if(dt||ut==="down"||ut==="right")return;const zt=debounce$5(()=>{At.current&&setTranslateValue(ut,At.current,ct)}),Ft=ownerWindow(At.current);return Ft.addEventListener("resize",zt),()=>{zt.clear(),Ft.removeEventListener("resize",zt)}},[ut,dt,ct]),reactExports.useEffect(()=>{dt||Wt()},[dt,Wt]),jsxRuntimeExports.jsx(St,_extends$u({nodeRef:At,onEnter:Dt,onEntered:Pt,onEntering:jt,onExit:wt,onExited:It,onExiting:Ct,addEndListener:Ot,appear:st,in:dt,timeout:kt},Tt,{children:(zt,Ft)=>reactExports.cloneElement(lt,_extends$u({ref:Et,style:_extends$u({visibility:zt==="exited"&&!dt?"hidden":void 0},xt,lt.props.style)},Ft))}))}),Slide$1=Slide,_excluded$1c=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],useUtilityClasses$H=tt=>{const{classes:et,disableUnderline:nt}=tt,it=composeClasses({root:["root",!nt&&"underline"],input:["input"]},getFilledInputUtilityClass,et);return _extends$u({},et,it)},FilledInputRoot=styled$1(InputBaseRoot,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[...rootOverridesResolver(tt,et),!nt.disableUnderline&&et.underline]}})(({theme:tt,ownerState:et})=>{var nt;const rt=tt.palette.mode==="light",it=rt?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",ot=rt?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",at=rt?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",st=rt?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return _extends$u({position:"relative",backgroundColor:tt.vars?tt.vars.palette.FilledInput.bg:ot,borderTopLeftRadius:(tt.vars||tt).shape.borderRadius,borderTopRightRadius:(tt.vars||tt).shape.borderRadius,transition:tt.transitions.create("background-color",{duration:tt.transitions.duration.shorter,easing:tt.transitions.easing.easeOut}),"&:hover":{backgroundColor:tt.vars?tt.vars.palette.FilledInput.hoverBg:at,"@media (hover: none)":{backgroundColor:tt.vars?tt.vars.palette.FilledInput.bg:ot}},[`&.${filledInputClasses$1.focused}`]:{backgroundColor:tt.vars?tt.vars.palette.FilledInput.bg:ot},[`&.${filledInputClasses$1.disabled}`]:{backgroundColor:tt.vars?tt.vars.palette.FilledInput.disabledBg:st}},!et.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(nt=(tt.vars||tt).palette[et.color||"primary"])==null?void 0:nt.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:tt.transitions.create("transform",{duration:tt.transitions.duration.shorter,easing:tt.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${filledInputClasses$1.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${filledInputClasses$1.error}`]:{"&:before, &:after":{borderBottomColor:(tt.vars||tt).palette.error.main}},"&:before":{borderBottom:`1px solid ${tt.vars?`rgba(${tt.vars.palette.common.onBackgroundChannel} / ${tt.vars.opacity.inputUnderline})`:it}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:tt.transitions.create("border-bottom-color",{duration:tt.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${filledInputClasses$1.disabled}, .${filledInputClasses$1.error}):before`]:{borderBottom:`1px solid ${(tt.vars||tt).palette.text.primary}`},[`&.${filledInputClasses$1.disabled}:before`]:{borderBottomStyle:"dotted"}},et.startAdornment&&{paddingLeft:12},et.endAdornment&&{paddingRight:12},et.multiline&&_extends$u({padding:"25px 12px 8px"},et.size==="small"&&{paddingTop:21,paddingBottom:4},et.hiddenLabel&&{paddingTop:16,paddingBottom:17}))}),FilledInputInput=styled$1(InputBaseComponent,{name:"MuiFilledInput",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:tt,ownerState:et})=>_extends$u({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!tt.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:tt.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:tt.palette.mode==="light"?null:"#fff",caretColor:tt.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},tt.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[tt.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},et.size==="small"&&{paddingTop:21,paddingBottom:4},et.hiddenLabel&&{paddingTop:16,paddingBottom:17},et.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},et.startAdornment&&{paddingLeft:0},et.endAdornment&&{paddingRight:0},et.hiddenLabel&&et.size==="small"&&{paddingTop:8,paddingBottom:9})),FilledInput=reactExports.forwardRef(function(et,nt){var rt,it,ot,at;const st=useThemeProps({props:et,name:"MuiFilledInput"}),{components:lt={},componentsProps:ct,fullWidth:ut=!1,inputComponent:ht="input",multiline:dt=!1,slotProps:pt,slots:mt={},type:gt="text"}=st,yt=_objectWithoutPropertiesLoose$m(st,_excluded$1c),bt=_extends$u({},st,{fullWidth:ut,inputComponent:ht,multiline:dt,type:gt}),vt=useUtilityClasses$H(st),xt={root:{ownerState:bt},input:{ownerState:bt}},kt=pt??ct?deepmerge$1(pt??ct,xt):xt,St=(rt=(it=mt.root)!=null?it:lt.Root)!=null?rt:FilledInputRoot,Tt=(ot=(at=mt.input)!=null?at:lt.Input)!=null?ot:FilledInputInput;return jsxRuntimeExports.jsx(InputBase$1,_extends$u({slots:{root:St,input:Tt},componentsProps:kt,fullWidth:ut,inputComponent:ht,multiline:dt,ref:nt,type:gt},yt,{classes:vt}))});FilledInput.muiName="Input";const FilledInput$1=FilledInput;function getFormControlUtilityClasses(tt){return generateUtilityClass("MuiFormControl",tt)}generateUtilityClasses("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const _excluded$1b=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],useUtilityClasses$G=tt=>{const{classes:et,margin:nt,fullWidth:rt}=tt,it={root:["root",nt!=="none"&&`margin${capitalize(nt)}`,rt&&"fullWidth"]};return composeClasses(it,getFormControlUtilityClasses,et)},FormControlRoot=styled$1("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:tt},et)=>_extends$u({},et.root,et[`margin${capitalize(tt.margin)}`],tt.fullWidth&&et.fullWidth)})(({ownerState:tt})=>_extends$u({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},tt.margin==="normal"&&{marginTop:16,marginBottom:8},tt.margin==="dense"&&{marginTop:8,marginBottom:4},tt.fullWidth&&{width:"100%"})),FormControl=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiFormControl"}),{children:it,className:ot,color:at="primary",component:st="div",disabled:lt=!1,error:ct=!1,focused:ut,fullWidth:ht=!1,hiddenLabel:dt=!1,margin:pt="none",required:mt=!1,size:gt="medium",variant:yt="outlined"}=rt,bt=_objectWithoutPropertiesLoose$m(rt,_excluded$1b),vt=_extends$u({},rt,{color:at,component:st,disabled:lt,error:ct,fullWidth:ht,hiddenLabel:dt,margin:pt,required:mt,size:gt,variant:yt}),xt=useUtilityClasses$G(vt),[kt,St]=reactExports.useState(()=>{let Ct=!1;return it&&reactExports.Children.forEach(it,wt=>{if(!isMuiElement(wt,["Input","Select"]))return;const It=isMuiElement(wt,["Select"])?wt.props.input:wt;It&&isAdornedStart(It.props)&&(Ct=!0)}),Ct}),[Tt,At]=reactExports.useState(()=>{let Ct=!1;return it&&reactExports.Children.forEach(it,wt=>{isMuiElement(wt,["Input","Select"])&&(isFilled(wt.props,!0)||isFilled(wt.props.inputProps,!0))&&(Ct=!0)}),Ct}),[Et,$t]=reactExports.useState(!1);lt&&Et&&$t(!1);const Dt=ut!==void 0&&!lt?ut:Et;let jt;const Pt=reactExports.useMemo(()=>({adornedStart:kt,setAdornedStart:St,color:at,disabled:lt,error:ct,filled:Tt,focused:Dt,fullWidth:ht,hiddenLabel:dt,size:gt,onBlur:()=>{$t(!1)},onEmpty:()=>{At(!1)},onFilled:()=>{At(!0)},onFocus:()=>{$t(!0)},registerEffect:jt,required:mt,variant:yt}),[kt,at,lt,ct,Tt,Dt,ht,dt,jt,mt,gt,yt]);return jsxRuntimeExports.jsx(FormControlContext$1.Provider,{value:Pt,children:jsxRuntimeExports.jsx(FormControlRoot,_extends$u({as:st,ownerState:vt,className:clsx$3(xt.root,ot),ref:nt},bt,{children:it}))})}),FormControl$1=FormControl,Stack$4=createStack({createStyledComponent:styled$1("div",{name:"MuiStack",slot:"Root",overridesResolver:(tt,et)=>et.root}),useThemeProps:tt=>useThemeProps({props:tt,name:"MuiStack"})}),Stack$5=Stack$4;function getFormHelperTextUtilityClasses(tt){return generateUtilityClass("MuiFormHelperText",tt)}const formHelperTextClasses=generateUtilityClasses("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),formHelperTextClasses$1=formHelperTextClasses;var _span$3;const _excluded$1a=["children","className","component","disabled","error","filled","focused","margin","required","variant"],useUtilityClasses$F=tt=>{const{classes:et,contained:nt,size:rt,disabled:it,error:ot,filled:at,focused:st,required:lt}=tt,ct={root:["root",it&&"disabled",ot&&"error",rt&&`size${capitalize(rt)}`,nt&&"contained",st&&"focused",at&&"filled",lt&&"required"]};return composeClasses(ct,getFormHelperTextUtilityClasses,et)},FormHelperTextRoot=styled$1("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.size&&et[`size${capitalize(nt.size)}`],nt.contained&&et.contained,nt.filled&&et.filled]}})(({theme:tt,ownerState:et})=>_extends$u({color:(tt.vars||tt).palette.text.secondary},tt.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${formHelperTextClasses$1.disabled}`]:{color:(tt.vars||tt).palette.text.disabled},[`&.${formHelperTextClasses$1.error}`]:{color:(tt.vars||tt).palette.error.main}},et.size==="small"&&{marginTop:4},et.contained&&{marginLeft:14,marginRight:14})),FormHelperText=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiFormHelperText"}),{children:it,className:ot,component:at="p"}=rt,st=_objectWithoutPropertiesLoose$m(rt,_excluded$1a),lt=useFormControl(),ct=formControlState({props:rt,muiFormControl:lt,states:["variant","size","disabled","error","filled","focused","required"]}),ut=_extends$u({},rt,{component:at,contained:ct.variant==="filled"||ct.variant==="outlined",variant:ct.variant,size:ct.size,disabled:ct.disabled,error:ct.error,filled:ct.filled,focused:ct.focused,required:ct.required}),ht=useUtilityClasses$F(ut);return jsxRuntimeExports.jsx(FormHelperTextRoot,_extends$u({as:at,ownerState:ut,className:clsx$3(ht.root,ot),ref:nt},st,{children:it===" "?_span$3||(_span$3=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"​"})):it}))}),FormHelperText$1=FormHelperText;function getFormLabelUtilityClasses(tt){return generateUtilityClass("MuiFormLabel",tt)}const formLabelClasses=generateUtilityClasses("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),formLabelClasses$1=formLabelClasses,_excluded$19=["children","className","color","component","disabled","error","filled","focused","required"],useUtilityClasses$E=tt=>{const{classes:et,color:nt,focused:rt,disabled:it,error:ot,filled:at,required:st}=tt,lt={root:["root",`color${capitalize(nt)}`,it&&"disabled",ot&&"error",at&&"filled",rt&&"focused",st&&"required"],asterisk:["asterisk",ot&&"error"]};return composeClasses(lt,getFormLabelUtilityClasses,et)},FormLabelRoot=styled$1("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:tt},et)=>_extends$u({},et.root,tt.color==="secondary"&&et.colorSecondary,tt.filled&&et.filled)})(({theme:tt,ownerState:et})=>_extends$u({color:(tt.vars||tt).palette.text.secondary},tt.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${formLabelClasses$1.focused}`]:{color:(tt.vars||tt).palette[et.color].main},[`&.${formLabelClasses$1.disabled}`]:{color:(tt.vars||tt).palette.text.disabled},[`&.${formLabelClasses$1.error}`]:{color:(tt.vars||tt).palette.error.main}})),AsteriskComponent=styled$1("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(tt,et)=>et.asterisk})(({theme:tt})=>({[`&.${formLabelClasses$1.error}`]:{color:(tt.vars||tt).palette.error.main}})),FormLabel=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiFormLabel"}),{children:it,className:ot,component:at="label"}=rt,st=_objectWithoutPropertiesLoose$m(rt,_excluded$19),lt=useFormControl(),ct=formControlState({props:rt,muiFormControl:lt,states:["color","required","focused","disabled","error","filled"]}),ut=_extends$u({},rt,{color:ct.color||"primary",component:at,disabled:ct.disabled,error:ct.error,filled:ct.filled,focused:ct.focused,required:ct.required}),ht=useUtilityClasses$E(ut);return jsxRuntimeExports.jsxs(FormLabelRoot,_extends$u({as:at,ownerState:ut,className:clsx$3(ht.root,ot),ref:nt},st,{children:[it,ct.required&&jsxRuntimeExports.jsxs(AsteriskComponent,{ownerState:ut,"aria-hidden":!0,className:ht.asterisk,children:[" ","*"]})]}))}),FormLabel$1=FormLabel,_excluded$18=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function getScale(tt){return`scale(${tt}, ${tt**2})`}const styles$3={entering:{opacity:1,transform:getScale(1)},entered:{opacity:1,transform:"none"}},isWebKit154=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Grow=reactExports.forwardRef(function(et,nt){const{addEndListener:rt,appear:it=!0,children:ot,easing:at,in:st,onEnter:lt,onEntered:ct,onEntering:ut,onExit:ht,onExited:dt,onExiting:pt,style:mt,timeout:gt="auto",TransitionComponent:yt=Transition$2}=et,bt=_objectWithoutPropertiesLoose$m(et,_excluded$18),vt=reactExports.useRef(),xt=reactExports.useRef(),kt=useTheme(),St=reactExports.useRef(null),Tt=useForkRef(St,ot.ref,nt),At=It=>Ot=>{if(It){const Wt=St.current;Ot===void 0?It(Wt):It(Wt,Ot)}},Et=At(ut),$t=At((It,Ot)=>{reflow(It);const{duration:Wt,delay:zt,easing:Ft}=getTransitionProps({style:mt,timeout:gt,easing:at},{mode:"enter"});let Nt;gt==="auto"?(Nt=kt.transitions.getAutoHeightDuration(It.clientHeight),xt.current=Nt):Nt=Wt,It.style.transition=[kt.transitions.create("opacity",{duration:Nt,delay:zt}),kt.transitions.create("transform",{duration:isWebKit154?Nt:Nt*.666,delay:zt,easing:Ft})].join(","),lt&<(It,Ot)}),Dt=At(ct),jt=At(pt),Pt=At(It=>{const{duration:Ot,delay:Wt,easing:zt}=getTransitionProps({style:mt,timeout:gt,easing:at},{mode:"exit"});let Ft;gt==="auto"?(Ft=kt.transitions.getAutoHeightDuration(It.clientHeight),xt.current=Ft):Ft=Ot,It.style.transition=[kt.transitions.create("opacity",{duration:Ft,delay:Wt}),kt.transitions.create("transform",{duration:isWebKit154?Ft:Ft*.666,delay:isWebKit154?Wt:Wt||Ft*.333,easing:zt})].join(","),It.style.opacity=0,It.style.transform=getScale(.75),ht&&ht(It)}),Ct=At(dt),wt=It=>{gt==="auto"&&(vt.current=setTimeout(It,xt.current||0)),rt&&rt(St.current,It)};return reactExports.useEffect(()=>()=>{clearTimeout(vt.current)},[]),jsxRuntimeExports.jsx(yt,_extends$u({appear:it,in:st,nodeRef:St,onEnter:$t,onEntered:Dt,onEntering:Et,onExit:Pt,onExited:Ct,onExiting:jt,addEndListener:wt,timeout:gt==="auto"?null:gt},bt,{children:(It,Ot)=>reactExports.cloneElement(ot,_extends$u({style:_extends$u({opacity:0,transform:getScale(.75),visibility:It==="exited"&&!st?"hidden":void 0},styles$3[It],mt,ot.props.style),ref:Tt},Ot))}))});Grow.muiSupportAuto=!0;const Grow$1=Grow;function useMediaQueryOld(tt,et,nt,rt,it){const[ot,at]=reactExports.useState(()=>it&&nt?nt(tt).matches:rt?rt(tt).matches:et);return useEnhancedEffect$1(()=>{let st=!0;if(!nt)return;const lt=nt(tt),ct=()=>{st&&at(lt.matches)};return ct(),lt.addListener(ct),()=>{st=!1,lt.removeListener(ct)}},[tt,nt]),ot}const maybeReactUseSyncExternalStore=React$2["useSyncExternalStore"];function useMediaQueryNew(tt,et,nt,rt,it){const ot=reactExports.useCallback(()=>et,[et]),at=reactExports.useMemo(()=>{if(it&&nt)return()=>nt(tt).matches;if(rt!==null){const{matches:ut}=rt(tt);return()=>ut}return ot},[ot,tt,rt,it,nt]),[st,lt]=reactExports.useMemo(()=>{if(nt===null)return[ot,()=>()=>{}];const ut=nt(tt);return[()=>ut.matches,ht=>(ut.addListener(ht),()=>{ut.removeListener(ht)})]},[ot,nt,tt]);return maybeReactUseSyncExternalStore(lt,st,at)}function useMediaQuery(tt,et={}){const nt=useTheme$3(),rt=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:it=!1,matchMedia:ot=rt?window.matchMedia:null,ssrMatchMedia:at=null,noSsr:st=!1}=getThemeProps({name:"MuiUseMediaQuery",props:et,theme:nt});let lt=typeof tt=="function"?tt(nt):tt;return lt=lt.replace(/^@media( ?)/m,""),(maybeReactUseSyncExternalStore!==void 0?useMediaQueryNew:useMediaQueryOld)(lt,it,ot,at,st)}const _excluded$17=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],useUtilityClasses$D=tt=>{const{classes:et,disableUnderline:nt}=tt,it=composeClasses({root:["root",!nt&&"underline"],input:["input"]},getInputUtilityClass,et);return _extends$u({},et,it)},InputRoot=styled$1(InputBaseRoot,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiInput",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[...rootOverridesResolver(tt,et),!nt.disableUnderline&&et.underline]}})(({theme:tt,ownerState:et})=>{let rt=tt.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return tt.vars&&(rt=`rgba(${tt.vars.palette.common.onBackgroundChannel} / ${tt.vars.opacity.inputUnderline})`),_extends$u({position:"relative"},et.formControl&&{"label + &":{marginTop:16}},!et.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(tt.vars||tt).palette[et.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:tt.transitions.create("transform",{duration:tt.transitions.duration.shorter,easing:tt.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${inputClasses$1.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${inputClasses$1.error}`]:{"&:before, &:after":{borderBottomColor:(tt.vars||tt).palette.error.main}},"&:before":{borderBottom:`1px solid ${rt}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:tt.transitions.create("border-bottom-color",{duration:tt.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${inputClasses$1.disabled}, .${inputClasses$1.error}):before`]:{borderBottom:`2px solid ${(tt.vars||tt).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${rt}`}},[`&.${inputClasses$1.disabled}:before`]:{borderBottomStyle:"dotted"}})}),InputInput=styled$1(InputBaseComponent,{name:"MuiInput",slot:"Input",overridesResolver:inputOverridesResolver})({}),Input$2=reactExports.forwardRef(function(et,nt){var rt,it,ot,at;const st=useThemeProps({props:et,name:"MuiInput"}),{disableUnderline:lt,components:ct={},componentsProps:ut,fullWidth:ht=!1,inputComponent:dt="input",multiline:pt=!1,slotProps:mt,slots:gt={},type:yt="text"}=st,bt=_objectWithoutPropertiesLoose$m(st,_excluded$17),vt=useUtilityClasses$D(st),kt={root:{ownerState:{disableUnderline:lt}}},St=mt??ut?deepmerge$1(mt??ut,kt):kt,Tt=(rt=(it=gt.root)!=null?it:ct.Root)!=null?rt:InputRoot,At=(ot=(at=gt.input)!=null?at:ct.Input)!=null?ot:InputInput;return jsxRuntimeExports.jsx(InputBase$1,_extends$u({slots:{root:Tt,input:At},slotProps:St,fullWidth:ht,inputComponent:dt,multiline:pt,ref:nt,type:yt},bt,{classes:vt}))});Input$2.muiName="Input";const Input$3=Input$2;function getInputAdornmentUtilityClass(tt){return generateUtilityClass("MuiInputAdornment",tt)}const inputAdornmentClasses=generateUtilityClasses("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),inputAdornmentClasses$1=inputAdornmentClasses;var _span$2;const _excluded$16=["children","className","component","disablePointerEvents","disableTypography","position","variant"],overridesResolver$3=(tt,et)=>{const{ownerState:nt}=tt;return[et.root,et[`position${capitalize(nt.position)}`],nt.disablePointerEvents===!0&&et.disablePointerEvents,et[nt.variant]]},useUtilityClasses$C=tt=>{const{classes:et,disablePointerEvents:nt,hiddenLabel:rt,position:it,size:ot,variant:at}=tt,st={root:["root",nt&&"disablePointerEvents",it&&`position${capitalize(it)}`,at,rt&&"hiddenLabel",ot&&`size${capitalize(ot)}`]};return composeClasses(st,getInputAdornmentUtilityClass,et)},InputAdornmentRoot=styled$1("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:overridesResolver$3})(({theme:tt,ownerState:et})=>_extends$u({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(tt.vars||tt).palette.action.active},et.variant==="filled"&&{[`&.${inputAdornmentClasses$1.positionStart}&:not(.${inputAdornmentClasses$1.hiddenLabel})`]:{marginTop:16}},et.position==="start"&&{marginRight:8},et.position==="end"&&{marginLeft:8},et.disablePointerEvents===!0&&{pointerEvents:"none"})),InputAdornment=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiInputAdornment"}),{children:it,className:ot,component:at="div",disablePointerEvents:st=!1,disableTypography:lt=!1,position:ct,variant:ut}=rt,ht=_objectWithoutPropertiesLoose$m(rt,_excluded$16),dt=useFormControl()||{};let pt=ut;ut&&dt.variant,dt&&!pt&&(pt=dt.variant);const mt=_extends$u({},rt,{hiddenLabel:dt.hiddenLabel,size:dt.size,disablePointerEvents:st,position:ct,variant:pt}),gt=useUtilityClasses$C(mt);return jsxRuntimeExports.jsx(FormControlContext$1.Provider,{value:null,children:jsxRuntimeExports.jsx(InputAdornmentRoot,_extends$u({as:at,ownerState:mt,className:clsx$3(gt.root,ot),ref:nt},ht,{children:typeof it=="string"&&!lt?jsxRuntimeExports.jsx(Typography$1,{color:"text.secondary",children:it}):jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[ct==="start"?_span$2||(_span$2=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"​"})):null,it]})}))})}),MuiInputAdornment=InputAdornment;function getInputLabelUtilityClasses(tt){return generateUtilityClass("MuiInputLabel",tt)}generateUtilityClasses("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const _excluded$15=["disableAnimation","margin","shrink","variant","className"],useUtilityClasses$B=tt=>{const{classes:et,formControl:nt,size:rt,shrink:it,disableAnimation:ot,variant:at,required:st}=tt,lt={root:["root",nt&&"formControl",!ot&&"animated",it&&"shrink",rt&&rt!=="normal"&&`size${capitalize(rt)}`,at],asterisk:[st&&"asterisk"]},ct=composeClasses(lt,getInputLabelUtilityClasses,et);return _extends$u({},et,ct)},InputLabelRoot=styled$1(FormLabel$1,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[{[`& .${formLabelClasses$1.asterisk}`]:et.asterisk},et.root,nt.formControl&&et.formControl,nt.size==="small"&&et.sizeSmall,nt.shrink&&et.shrink,!nt.disableAnimation&&et.animated,et[nt.variant]]}})(({theme:tt,ownerState:et})=>_extends$u({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},et.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},et.size==="small"&&{transform:"translate(0, 17px) scale(1)"},et.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!et.disableAnimation&&{transition:tt.transitions.create(["color","transform","max-width"],{duration:tt.transitions.duration.shorter,easing:tt.transitions.easing.easeOut})},et.variant==="filled"&&_extends$u({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},et.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},et.shrink&&_extends$u({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},et.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),et.variant==="outlined"&&_extends$u({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},et.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},et.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),InputLabel=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({name:"MuiInputLabel",props:et}),{disableAnimation:it=!1,shrink:ot,className:at}=rt,st=_objectWithoutPropertiesLoose$m(rt,_excluded$15),lt=useFormControl();let ct=ot;typeof ct>"u"&<&&(ct=lt.filled||lt.focused||lt.adornedStart);const ut=formControlState({props:rt,muiFormControl:lt,states:["size","variant","required"]}),ht=_extends$u({},rt,{disableAnimation:it,formControl:lt,shrink:ct,size:ut.size,variant:ut.variant,required:ut.required}),dt=useUtilityClasses$B(ht);return jsxRuntimeExports.jsx(InputLabelRoot,_extends$u({"data-shrink":ct,ownerState:ht,ref:nt,className:clsx$3(dt.root,at)},st,{classes:dt}))}),InputLabel$1=InputLabel,ListContext=reactExports.createContext({}),ListContext$1=ListContext;function getListUtilityClass(tt){return generateUtilityClass("MuiList",tt)}generateUtilityClasses("MuiList",["root","padding","dense","subheader"]);const _excluded$14=["children","className","component","dense","disablePadding","subheader"],useUtilityClasses$A=tt=>{const{classes:et,disablePadding:nt,dense:rt,subheader:it}=tt;return composeClasses({root:["root",!nt&&"padding",rt&&"dense",it&&"subheader"]},getListUtilityClass,et)},ListRoot=styled$1("ul",{name:"MuiList",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,!nt.disablePadding&&et.padding,nt.dense&&et.dense,nt.subheader&&et.subheader]}})(({ownerState:tt})=>_extends$u({listStyle:"none",margin:0,padding:0,position:"relative"},!tt.disablePadding&&{paddingTop:8,paddingBottom:8},tt.subheader&&{paddingTop:0})),List=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiList"}),{children:it,className:ot,component:at="ul",dense:st=!1,disablePadding:lt=!1,subheader:ct}=rt,ut=_objectWithoutPropertiesLoose$m(rt,_excluded$14),ht=reactExports.useMemo(()=>({dense:st}),[st]),dt=_extends$u({},rt,{component:at,dense:st,disablePadding:lt}),pt=useUtilityClasses$A(dt);return jsxRuntimeExports.jsx(ListContext$1.Provider,{value:ht,children:jsxRuntimeExports.jsxs(ListRoot,_extends$u({as:at,className:clsx$3(pt.root,ot),ref:nt,ownerState:dt},ut,{children:[ct,it]}))})}),List$1=List;function getListItemUtilityClass(tt){return generateUtilityClass("MuiListItem",tt)}const listItemClasses=generateUtilityClasses("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),listItemClasses$1=listItemClasses,listItemButtonClasses=generateUtilityClasses("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),listItemButtonClasses$1=listItemButtonClasses;function getListItemSecondaryActionClassesUtilityClass(tt){return generateUtilityClass("MuiListItemSecondaryAction",tt)}generateUtilityClasses("MuiListItemSecondaryAction",["root","disableGutters"]);const _excluded$13=["className"],useUtilityClasses$z=tt=>{const{disableGutters:et,classes:nt}=tt;return composeClasses({root:["root",et&&"disableGutters"]},getListItemSecondaryActionClassesUtilityClass,nt)},ListItemSecondaryActionRoot=styled$1("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.disableGutters&&et.disableGutters]}})(({ownerState:tt})=>_extends$u({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},tt.disableGutters&&{right:0})),ListItemSecondaryAction=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiListItemSecondaryAction"}),{className:it}=rt,ot=_objectWithoutPropertiesLoose$m(rt,_excluded$13),at=reactExports.useContext(ListContext$1),st=_extends$u({},rt,{disableGutters:at.disableGutters}),lt=useUtilityClasses$z(st);return jsxRuntimeExports.jsx(ListItemSecondaryActionRoot,_extends$u({className:clsx$3(lt.root,it),ownerState:st,ref:nt},ot))});ListItemSecondaryAction.muiName="ListItemSecondaryAction";const ListItemSecondaryAction$1=ListItemSecondaryAction,_excluded$12=["className"],_excluded2$f=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],overridesResolver$2=(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.dense&&et.dense,nt.alignItems==="flex-start"&&et.alignItemsFlexStart,nt.divider&&et.divider,!nt.disableGutters&&et.gutters,!nt.disablePadding&&et.padding,nt.button&&et.button,nt.hasSecondaryAction&&et.secondaryAction]},useUtilityClasses$y=tt=>{const{alignItems:et,button:nt,classes:rt,dense:it,disabled:ot,disableGutters:at,disablePadding:st,divider:lt,hasSecondaryAction:ct,selected:ut}=tt;return composeClasses({root:["root",it&&"dense",!at&&"gutters",!st&&"padding",lt&&"divider",ot&&"disabled",nt&&"button",et==="flex-start"&&"alignItemsFlexStart",ct&&"secondaryAction",ut&&"selected"],container:["container"]},getListItemUtilityClass,rt)},ListItemRoot=styled$1("div",{name:"MuiListItem",slot:"Root",overridesResolver:overridesResolver$2})(({theme:tt,ownerState:et})=>_extends$u({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!et.disablePadding&&_extends$u({paddingTop:8,paddingBottom:8},et.dense&&{paddingTop:4,paddingBottom:4},!et.disableGutters&&{paddingLeft:16,paddingRight:16},!!et.secondaryAction&&{paddingRight:48}),!!et.secondaryAction&&{[`& > .${listItemButtonClasses$1.root}`]:{paddingRight:48}},{[`&.${listItemClasses$1.focusVisible}`]:{backgroundColor:(tt.vars||tt).palette.action.focus},[`&.${listItemClasses$1.selected}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity),[`&.${listItemClasses$1.focusVisible}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.focusOpacity}))`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity+tt.palette.action.focusOpacity)}},[`&.${listItemClasses$1.disabled}`]:{opacity:(tt.vars||tt).palette.action.disabledOpacity}},et.alignItems==="flex-start"&&{alignItems:"flex-start"},et.divider&&{borderBottom:`1px solid ${(tt.vars||tt).palette.divider}`,backgroundClip:"padding-box"},et.button&&{transition:tt.transitions.create("background-color",{duration:tt.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(tt.vars||tt).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${listItemClasses$1.selected}:hover`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.hoverOpacity}))`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity+tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity)}}},et.hasSecondaryAction&&{paddingRight:48})),ListItemContainer=styled$1("li",{name:"MuiListItem",slot:"Container",overridesResolver:(tt,et)=>et.container})({position:"relative"}),ListItem=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiListItem"}),{alignItems:it="center",autoFocus:ot=!1,button:at=!1,children:st,className:lt,component:ct,components:ut={},componentsProps:ht={},ContainerComponent:dt="li",ContainerProps:{className:pt}={},dense:mt=!1,disabled:gt=!1,disableGutters:yt=!1,disablePadding:bt=!1,divider:vt=!1,focusVisibleClassName:xt,secondaryAction:kt,selected:St=!1,slotProps:Tt={},slots:At={}}=rt,Et=_objectWithoutPropertiesLoose$m(rt.ContainerProps,_excluded$12),$t=_objectWithoutPropertiesLoose$m(rt,_excluded2$f),Dt=reactExports.useContext(ListContext$1),jt=reactExports.useMemo(()=>({dense:mt||Dt.dense||!1,alignItems:it,disableGutters:yt}),[it,Dt.dense,mt,yt]),Pt=reactExports.useRef(null);useEnhancedEffect$1(()=>{ot&&Pt.current&&Pt.current.focus()},[ot]);const Ct=reactExports.Children.toArray(st),wt=Ct.length&&isMuiElement(Ct[Ct.length-1],["ListItemSecondaryAction"]),It=_extends$u({},rt,{alignItems:it,autoFocus:ot,button:at,dense:jt.dense,disabled:gt,disableGutters:yt,disablePadding:bt,divider:vt,hasSecondaryAction:wt,selected:St}),Ot=useUtilityClasses$y(It),Wt=useForkRef(Pt,nt),zt=At.root||ut.Root||ListItemRoot,Ft=Tt.root||ht.root||{},Nt=_extends$u({className:clsx$3(Ot.root,Ft.className,lt),disabled:gt},$t);let Ut=ct||"li";return at&&(Nt.component=ct||"div",Nt.focusVisibleClassName=clsx$3(listItemClasses$1.focusVisible,xt),Ut=ButtonBase$1),wt?(Ut=!Nt.component&&!ct?"div":Ut,dt==="li"&&(Ut==="li"?Ut="div":Nt.component==="li"&&(Nt.component="div")),jsxRuntimeExports.jsx(ListContext$1.Provider,{value:jt,children:jsxRuntimeExports.jsxs(ListItemContainer,_extends$u({as:dt,className:clsx$3(Ot.container,pt),ref:Wt,ownerState:It},Et,{children:[jsxRuntimeExports.jsx(zt,_extends$u({},Ft,!isHostComponent(zt)&&{as:Ut,ownerState:_extends$u({},It,Ft.ownerState)},Nt,{children:Ct})),Ct.pop()]}))})):jsxRuntimeExports.jsx(ListContext$1.Provider,{value:jt,children:jsxRuntimeExports.jsxs(zt,_extends$u({},Ft,{as:Ut,ref:Wt},!isHostComponent(zt)&&{ownerState:_extends$u({},It,Ft.ownerState)},Nt,{children:[Ct,kt&&jsxRuntimeExports.jsx(ListItemSecondaryAction$1,{children:kt})]}))})}),ListItem$1=ListItem,listItemIconClasses=generateUtilityClasses("MuiListItemIcon",["root","alignItemsFlexStart"]),listItemIconClasses$1=listItemIconClasses,listItemTextClasses=generateUtilityClasses("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),listItemTextClasses$1=listItemTextClasses,_excluded$11=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function nextItem$1(tt,et,nt){return tt===et?tt.firstChild:et&&et.nextElementSibling?et.nextElementSibling:nt?null:tt.firstChild}function previousItem$1(tt,et,nt){return tt===et?nt?tt.firstChild:tt.lastChild:et&&et.previousElementSibling?et.previousElementSibling:nt?null:tt.lastChild}function textCriteriaMatches(tt,et){if(et===void 0)return!0;let nt=tt.innerText;return nt===void 0&&(nt=tt.textContent),nt=nt.trim().toLowerCase(),nt.length===0?!1:et.repeating?nt[0]===et.keys[0]:nt.indexOf(et.keys.join(""))===0}function moveFocus$1(tt,et,nt,rt,it,ot){let at=!1,st=it(tt,et,et?nt:!1);for(;st;){if(st===tt.firstChild){if(at)return!1;at=!0}const lt=rt?!1:st.disabled||st.getAttribute("aria-disabled")==="true";if(!st.hasAttribute("tabindex")||!textCriteriaMatches(st,ot)||lt)st=it(tt,st,nt);else return st.focus(),!0}return!1}const MenuList=reactExports.forwardRef(function(et,nt){const{actions:rt,autoFocus:it=!1,autoFocusItem:ot=!1,children:at,className:st,disabledItemsFocusable:lt=!1,disableListWrap:ct=!1,onKeyDown:ut,variant:ht="selectedMenu"}=et,dt=_objectWithoutPropertiesLoose$m(et,_excluded$11),pt=reactExports.useRef(null),mt=reactExports.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});useEnhancedEffect$1(()=>{it&&pt.current.focus()},[it]),reactExports.useImperativeHandle(rt,()=>({adjustStyleForScrollbar:(xt,kt)=>{const St=!pt.current.style.width;if(xt.clientHeight{const kt=pt.current,St=xt.key,Tt=ownerDocument(kt).activeElement;if(St==="ArrowDown")xt.preventDefault(),moveFocus$1(kt,Tt,ct,lt,nextItem$1);else if(St==="ArrowUp")xt.preventDefault(),moveFocus$1(kt,Tt,ct,lt,previousItem$1);else if(St==="Home")xt.preventDefault(),moveFocus$1(kt,null,ct,lt,nextItem$1);else if(St==="End")xt.preventDefault(),moveFocus$1(kt,null,ct,lt,previousItem$1);else if(St.length===1){const At=mt.current,Et=St.toLowerCase(),$t=performance.now();At.keys.length>0&&($t-At.lastTime>500?(At.keys=[],At.repeating=!0,At.previousKeyMatched=!0):At.repeating&&Et!==At.keys[0]&&(At.repeating=!1)),At.lastTime=$t,At.keys.push(Et);const Dt=Tt&&!At.repeating&&textCriteriaMatches(Tt,At);At.previousKeyMatched&&(Dt||moveFocus$1(kt,Tt,!1,lt,nextItem$1,At))?xt.preventDefault():At.previousKeyMatched=!1}ut&&ut(xt)},yt=useForkRef(pt,nt);let bt=-1;reactExports.Children.forEach(at,(xt,kt)=>{if(!reactExports.isValidElement(xt)){bt===kt&&(bt+=1,bt>=at.length&&(bt=-1));return}xt.props.disabled||(ht==="selectedMenu"&&xt.props.selected||bt===-1)&&(bt=kt),bt===kt&&(xt.props.disabled||xt.props.muiSkipListHighlight||xt.type.muiSkipListHighlight)&&(bt+=1,bt>=at.length&&(bt=-1))});const vt=reactExports.Children.map(at,(xt,kt)=>{if(kt===bt){const St={};return ot&&(St.autoFocus=!0),xt.props.tabIndex===void 0&&ht==="selectedMenu"&&(St.tabIndex=0),reactExports.cloneElement(xt,St)}return xt});return jsxRuntimeExports.jsx(List$1,_extends$u({role:"menu",ref:yt,className:st,onKeyDown:gt,tabIndex:it?0:-1},dt,{children:vt}))}),MenuList$1=MenuList;function getPopoverUtilityClass(tt){return generateUtilityClass("MuiPopover",tt)}generateUtilityClasses("MuiPopover",["root","paper"]);const _excluded$10=["onEntering"],_excluded2$e=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],_excluded3$4=["slotProps"];function getOffsetTop(tt,et){let nt=0;return typeof et=="number"?nt=et:et==="center"?nt=tt.height/2:et==="bottom"&&(nt=tt.height),nt}function getOffsetLeft(tt,et){let nt=0;return typeof et=="number"?nt=et:et==="center"?nt=tt.width/2:et==="right"&&(nt=tt.width),nt}function getTransformOriginValue(tt){return[tt.horizontal,tt.vertical].map(et=>typeof et=="number"?`${et}px`:et).join(" ")}function resolveAnchorEl(tt){return typeof tt=="function"?tt():tt}const useUtilityClasses$x=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],paper:["paper"]},getPopoverUtilityClass,et)},PopoverRoot=styled$1(Modal$1,{name:"MuiPopover",slot:"Root",overridesResolver:(tt,et)=>et.root})({}),PopoverPaper=styled$1(Paper$1,{name:"MuiPopover",slot:"Paper",overridesResolver:(tt,et)=>et.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Popover=reactExports.forwardRef(function(et,nt){var rt,it,ot;const at=useThemeProps({props:et,name:"MuiPopover"}),{action:st,anchorEl:lt,anchorOrigin:ct={vertical:"top",horizontal:"left"},anchorPosition:ut,anchorReference:ht="anchorEl",children:dt,className:pt,container:mt,elevation:gt=8,marginThreshold:yt=16,open:bt,PaperProps:vt={},slots:xt,slotProps:kt,transformOrigin:St={vertical:"top",horizontal:"left"},TransitionComponent:Tt=Grow$1,transitionDuration:At="auto",TransitionProps:{onEntering:Et}={},disableScrollLock:$t=!1}=at,Dt=_objectWithoutPropertiesLoose$m(at.TransitionProps,_excluded$10),jt=_objectWithoutPropertiesLoose$m(at,_excluded2$e),Pt=(rt=kt==null?void 0:kt.paper)!=null?rt:vt,Ct=reactExports.useRef(),wt=useForkRef(Ct,Pt.ref),It=_extends$u({},at,{anchorOrigin:ct,anchorReference:ht,elevation:gt,marginThreshold:yt,externalPaperSlotProps:Pt,transformOrigin:St,TransitionComponent:Tt,transitionDuration:At,TransitionProps:Dt}),Ot=useUtilityClasses$x(It),Wt=reactExports.useCallback(()=>{if(ht==="anchorPosition")return ut;const _n=resolveAnchorEl(lt),$n=(_n&&_n.nodeType===1?_n:ownerDocument(Ct.current).body).getBoundingClientRect();return{top:$n.top+getOffsetTop($n,ct.vertical),left:$n.left+getOffsetLeft($n,ct.horizontal)}},[lt,ct.horizontal,ct.vertical,ut,ht]),zt=reactExports.useCallback(_n=>({vertical:getOffsetTop(_n,St.vertical),horizontal:getOffsetLeft(_n,St.horizontal)}),[St.horizontal,St.vertical]),Ft=reactExports.useCallback(_n=>{const Pn={width:_n.offsetWidth,height:_n.offsetHeight},$n=zt(Pn);if(ht==="none")return{top:null,left:null,transformOrigin:getTransformOriginValue($n)};const Nn=Wt();let Tn=Nn.top-$n.vertical,cn=Nn.left-$n.horizontal;const mn=Tn+Pn.height,In=cn+Pn.width,An=ownerWindow(resolveAnchorEl(lt)),wn=An.innerHeight-yt,fn=An.innerWidth-yt;if(yt!==null&&Tnwn){const pn=mn-wn;Tn-=pn,$n.vertical+=pn}if(yt!==null&&cnfn){const pn=In-fn;cn-=pn,$n.horizontal+=pn}return{top:`${Math.round(Tn)}px`,left:`${Math.round(cn)}px`,transformOrigin:getTransformOriginValue($n)}},[lt,ht,Wt,zt,yt]),[Nt,Ut]=reactExports.useState(bt),Mt=reactExports.useCallback(()=>{const _n=Ct.current;if(!_n)return;const Pn=Ft(_n);Pn.top!==null&&(_n.style.top=Pn.top),Pn.left!==null&&(_n.style.left=Pn.left),_n.style.transformOrigin=Pn.transformOrigin,Ut(!0)},[Ft]);reactExports.useEffect(()=>($t&&window.addEventListener("scroll",Mt),()=>window.removeEventListener("scroll",Mt)),[lt,$t,Mt]);const Ht=(_n,Pn)=>{Et&&Et(_n,Pn),Mt()},en=()=>{Ut(!1)};reactExports.useEffect(()=>{bt&&Mt()}),reactExports.useImperativeHandle(st,()=>bt?{updatePosition:()=>{Mt()}}:null,[bt,Mt]),reactExports.useEffect(()=>{if(!bt)return;const _n=debounce$5(()=>{Mt()}),Pn=ownerWindow(lt);return Pn.addEventListener("resize",_n),()=>{_n.clear(),Pn.removeEventListener("resize",_n)}},[lt,bt,Mt]);let sn=At;At==="auto"&&!Tt.muiSupportAuto&&(sn=void 0);const Kt=mt||(lt?ownerDocument(resolveAnchorEl(lt)).body:void 0),rn=(it=xt==null?void 0:xt.root)!=null?it:PopoverRoot,nn=(ot=xt==null?void 0:xt.paper)!=null?ot:PopoverPaper,hn=useSlotProps({elementType:nn,externalSlotProps:_extends$u({},Pt,{style:Nt?Pt.style:_extends$u({},Pt.style,{opacity:0})}),additionalProps:{elevation:gt,ref:wt},ownerState:It,className:clsx$3(Ot.paper,Pt==null?void 0:Pt.className)}),vn=useSlotProps({elementType:rn,externalSlotProps:(kt==null?void 0:kt.root)||{},externalForwardedProps:jt,additionalProps:{ref:nt,slotProps:{backdrop:{invisible:!0}},container:Kt,open:bt},ownerState:It,className:clsx$3(Ot.root,pt)}),{slotProps:an}=vn,Qt=_objectWithoutPropertiesLoose$m(vn,_excluded3$4);return jsxRuntimeExports.jsx(rn,_extends$u({},Qt,!isHostComponent(rn)&&{slotProps:an,disableScrollLock:$t},{children:jsxRuntimeExports.jsx(Tt,_extends$u({appear:!0,in:bt,onEntering:Ht,onExited:en,timeout:sn},Dt,{children:jsxRuntimeExports.jsx(nn,_extends$u({},hn,{children:dt}))}))}))}),Popover$1=Popover;function getMenuUtilityClass(tt){return generateUtilityClass("MuiMenu",tt)}generateUtilityClasses("MuiMenu",["root","paper","list"]);const _excluded$$=["onEntering"],_excluded2$d=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],RTL_ORIGIN={vertical:"top",horizontal:"right"},LTR_ORIGIN={vertical:"top",horizontal:"left"},useUtilityClasses$w=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],paper:["paper"],list:["list"]},getMenuUtilityClass,et)},MenuRoot=styled$1(Popover$1,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(tt,et)=>et.root})({}),MenuPaper=styled$1(PopoverPaper,{name:"MuiMenu",slot:"Paper",overridesResolver:(tt,et)=>et.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),MenuMenuList=styled$1(MenuList$1,{name:"MuiMenu",slot:"List",overridesResolver:(tt,et)=>et.list})({outline:0}),Menu=reactExports.forwardRef(function(et,nt){var rt,it;const ot=useThemeProps({props:et,name:"MuiMenu"}),{autoFocus:at=!0,children:st,className:lt,disableAutoFocusItem:ct=!1,MenuListProps:ut={},onClose:ht,open:dt,PaperProps:pt={},PopoverClasses:mt,transitionDuration:gt="auto",TransitionProps:{onEntering:yt}={},variant:bt="selectedMenu",slots:vt={},slotProps:xt={}}=ot,kt=_objectWithoutPropertiesLoose$m(ot.TransitionProps,_excluded$$),St=_objectWithoutPropertiesLoose$m(ot,_excluded2$d),Tt=useTheme(),At=Tt.direction==="rtl",Et=_extends$u({},ot,{autoFocus:at,disableAutoFocusItem:ct,MenuListProps:ut,onEntering:yt,PaperProps:pt,transitionDuration:gt,TransitionProps:kt,variant:bt}),$t=useUtilityClasses$w(Et),Dt=at&&!ct&&dt,jt=reactExports.useRef(null),Pt=(Ft,Nt)=>{jt.current&&jt.current.adjustStyleForScrollbar(Ft,Tt),yt&&yt(Ft,Nt)},Ct=Ft=>{Ft.key==="Tab"&&(Ft.preventDefault(),ht&&ht(Ft,"tabKeyDown"))};let wt=-1;reactExports.Children.map(st,(Ft,Nt)=>{reactExports.isValidElement(Ft)&&(Ft.props.disabled||(bt==="selectedMenu"&&Ft.props.selected||wt===-1)&&(wt=Nt))});const It=(rt=vt.paper)!=null?rt:MenuPaper,Ot=(it=xt.paper)!=null?it:pt,Wt=useSlotProps({elementType:vt.root,externalSlotProps:xt.root,ownerState:Et,className:[$t.root,lt]}),zt=useSlotProps({elementType:It,externalSlotProps:Ot,ownerState:Et,className:$t.paper});return jsxRuntimeExports.jsx(MenuRoot,_extends$u({onClose:ht,anchorOrigin:{vertical:"bottom",horizontal:At?"right":"left"},transformOrigin:At?RTL_ORIGIN:LTR_ORIGIN,slots:{paper:It,root:vt.root},slotProps:{root:Wt,paper:zt},open:dt,ref:nt,transitionDuration:gt,TransitionProps:_extends$u({onEntering:Pt},kt),ownerState:Et},St,{classes:mt,children:jsxRuntimeExports.jsx(MenuMenuList,_extends$u({onKeyDown:Ct,actions:jt,autoFocus:at&&(wt===-1||ct),autoFocusItem:Dt,variant:bt},ut,{className:clsx$3($t.list,ut.className),children:st}))}))}),Menu$1=Menu;function getMenuItemUtilityClass(tt){return generateUtilityClass("MuiMenuItem",tt)}const menuItemClasses=generateUtilityClasses("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),menuItemClasses$1=menuItemClasses,_excluded$_=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],overridesResolver$1=(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.dense&&et.dense,nt.divider&&et.divider,!nt.disableGutters&&et.gutters]},useUtilityClasses$v=tt=>{const{disabled:et,dense:nt,divider:rt,disableGutters:it,selected:ot,classes:at}=tt,lt=composeClasses({root:["root",nt&&"dense",et&&"disabled",!it&&"gutters",rt&&"divider",ot&&"selected"]},getMenuItemUtilityClass,at);return _extends$u({},at,lt)},MenuItemRoot=styled$1(ButtonBase$1,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:overridesResolver$1})(({theme:tt,ownerState:et})=>_extends$u({},tt.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!et.disableGutters&&{paddingLeft:16,paddingRight:16},et.divider&&{borderBottom:`1px solid ${(tt.vars||tt).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(tt.vars||tt).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${menuItemClasses$1.selected}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity),[`&.${menuItemClasses$1.focusVisible}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.focusOpacity}))`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity+tt.palette.action.focusOpacity)}},[`&.${menuItemClasses$1.selected}:hover`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.hoverOpacity}))`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity+tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity)}},[`&.${menuItemClasses$1.focusVisible}`]:{backgroundColor:(tt.vars||tt).palette.action.focus},[`&.${menuItemClasses$1.disabled}`]:{opacity:(tt.vars||tt).palette.action.disabledOpacity},[`& + .${dividerClasses.root}`]:{marginTop:tt.spacing(1),marginBottom:tt.spacing(1)},[`& + .${dividerClasses.inset}`]:{marginLeft:52},[`& .${listItemTextClasses$1.root}`]:{marginTop:0,marginBottom:0},[`& .${listItemTextClasses$1.inset}`]:{paddingLeft:36},[`& .${listItemIconClasses$1.root}`]:{minWidth:36}},!et.dense&&{[tt.breakpoints.up("sm")]:{minHeight:"auto"}},et.dense&&_extends$u({minHeight:32,paddingTop:4,paddingBottom:4},tt.typography.body2,{[`& .${listItemIconClasses$1.root} svg`]:{fontSize:"1.25rem"}}))),MenuItem$1=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiMenuItem"}),{autoFocus:it=!1,component:ot="li",dense:at=!1,divider:st=!1,disableGutters:lt=!1,focusVisibleClassName:ct,role:ut="menuitem",tabIndex:ht,className:dt}=rt,pt=_objectWithoutPropertiesLoose$m(rt,_excluded$_),mt=reactExports.useContext(ListContext$1),gt=reactExports.useMemo(()=>({dense:at||mt.dense||!1,disableGutters:lt}),[mt.dense,at,lt]),yt=reactExports.useRef(null);useEnhancedEffect$1(()=>{it&&yt.current&&yt.current.focus()},[it]);const bt=_extends$u({},rt,{dense:gt.dense,divider:st,disableGutters:lt}),vt=useUtilityClasses$v(rt),xt=useForkRef(yt,nt);let kt;return rt.disabled||(kt=ht!==void 0?ht:-1),jsxRuntimeExports.jsx(ListContext$1.Provider,{value:gt,children:jsxRuntimeExports.jsx(MenuItemRoot,_extends$u({ref:xt,role:ut,tabIndex:kt,component:ot,focusVisibleClassName:clsx$3(vt.focusVisible,ct),className:clsx$3(vt.root,dt)},pt,{ownerState:bt,classes:vt}))})}),MenuItem$2=MenuItem$1;function getNativeSelectUtilityClasses(tt){return generateUtilityClass("MuiNativeSelect",tt)}const nativeSelectClasses=generateUtilityClasses("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),nativeSelectClasses$1=nativeSelectClasses,_excluded$Z=["className","disabled","error","IconComponent","inputRef","variant"],useUtilityClasses$u=tt=>{const{classes:et,variant:nt,disabled:rt,multiple:it,open:ot,error:at}=tt,st={select:["select",nt,rt&&"disabled",it&&"multiple",at&&"error"],icon:["icon",`icon${capitalize(nt)}`,ot&&"iconOpen",rt&&"disabled"]};return composeClasses(st,getNativeSelectUtilityClasses,et)},nativeSelectSelectStyles=({ownerState:tt,theme:et})=>_extends$u({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":_extends$u({},et.vars?{backgroundColor:`rgba(${et.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:et.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${nativeSelectClasses$1.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(et.vars||et).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},tt.variant==="filled"&&{"&&&":{paddingRight:32}},tt.variant==="outlined"&&{borderRadius:(et.vars||et).shape.borderRadius,"&:focus":{borderRadius:(et.vars||et).shape.borderRadius},"&&&":{paddingRight:32}}),NativeSelectSelect=styled$1("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:rootShouldForwardProp,overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.select,et[nt.variant],nt.error&&et.error,{[`&.${nativeSelectClasses$1.multiple}`]:et.multiple}]}})(nativeSelectSelectStyles),nativeSelectIconStyles=({ownerState:tt,theme:et})=>_extends$u({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(et.vars||et).palette.action.active,[`&.${nativeSelectClasses$1.disabled}`]:{color:(et.vars||et).palette.action.disabled}},tt.open&&{transform:"rotate(180deg)"},tt.variant==="filled"&&{right:7},tt.variant==="outlined"&&{right:7}),NativeSelectIcon=styled$1("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.icon,nt.variant&&et[`icon${capitalize(nt.variant)}`],nt.open&&et.iconOpen]}})(nativeSelectIconStyles),NativeSelectInput=reactExports.forwardRef(function(et,nt){const{className:rt,disabled:it,error:ot,IconComponent:at,inputRef:st,variant:lt="standard"}=et,ct=_objectWithoutPropertiesLoose$m(et,_excluded$Z),ut=_extends$u({},et,{disabled:it,variant:lt,error:ot}),ht=useUtilityClasses$u(ut);return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(NativeSelectSelect,_extends$u({ownerState:ut,className:clsx$3(ht.select,rt),disabled:it,ref:st||nt},ct)),et.multiple?null:jsxRuntimeExports.jsx(NativeSelectIcon,{as:at,ownerState:ut,className:ht.icon})]})}),NativeSelectInput$1=NativeSelectInput;var _span$1;const _excluded$Y=["children","classes","className","label","notched"],NotchedOutlineRoot$1=styled$1("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),NotchedOutlineLegend=styled$1("legend")(({ownerState:tt,theme:et})=>_extends$u({float:"unset",width:"auto",overflow:"hidden"},!tt.withLabel&&{padding:0,lineHeight:"11px",transition:et.transitions.create("width",{duration:150,easing:et.transitions.easing.easeOut})},tt.withLabel&&_extends$u({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:et.transitions.create("max-width",{duration:50,easing:et.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},tt.notched&&{maxWidth:"100%",transition:et.transitions.create("max-width",{duration:100,easing:et.transitions.easing.easeOut,delay:50})})));function NotchedOutline(tt){const{className:et,label:nt,notched:rt}=tt,it=_objectWithoutPropertiesLoose$m(tt,_excluded$Y),ot=nt!=null&&nt!=="",at=_extends$u({},tt,{notched:rt,withLabel:ot});return jsxRuntimeExports.jsx(NotchedOutlineRoot$1,_extends$u({"aria-hidden":!0,className:et,ownerState:at},it,{children:jsxRuntimeExports.jsx(NotchedOutlineLegend,{ownerState:at,children:ot?jsxRuntimeExports.jsx("span",{children:nt}):_span$1||(_span$1=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"​"}))})}))}const _excluded$X=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],useUtilityClasses$t=tt=>{const{classes:et}=tt,rt=composeClasses({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},getOutlinedInputUtilityClass,et);return _extends$u({},et,rt)},OutlinedInputRoot=styled$1(InputBaseRoot,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:rootOverridesResolver})(({theme:tt,ownerState:et})=>{const nt=tt.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return _extends$u({position:"relative",borderRadius:(tt.vars||tt).shape.borderRadius,[`&:hover .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(tt.vars||tt).palette.text.primary},"@media (hover: none)":{[`&:hover .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:tt.vars?`rgba(${tt.vars.palette.common.onBackgroundChannel} / 0.23)`:nt}},[`&.${outlinedInputClasses$1.focused} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(tt.vars||tt).palette[et.color].main,borderWidth:2},[`&.${outlinedInputClasses$1.error} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(tt.vars||tt).palette.error.main},[`&.${outlinedInputClasses$1.disabled} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(tt.vars||tt).palette.action.disabled}},et.startAdornment&&{paddingLeft:14},et.endAdornment&&{paddingRight:14},et.multiline&&_extends$u({padding:"16.5px 14px"},et.size==="small"&&{padding:"8.5px 14px"}))}),NotchedOutlineRoot=styled$1(NotchedOutline,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(tt,et)=>et.notchedOutline})(({theme:tt})=>{const et=tt.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:tt.vars?`rgba(${tt.vars.palette.common.onBackgroundChannel} / 0.23)`:et}}),OutlinedInputInput=styled$1(InputBaseComponent,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:tt,ownerState:et})=>_extends$u({padding:"16.5px 14px"},!tt.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:tt.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:tt.palette.mode==="light"?null:"#fff",caretColor:tt.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},tt.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[tt.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},et.size==="small"&&{padding:"8.5px 14px"},et.multiline&&{padding:0},et.startAdornment&&{paddingLeft:0},et.endAdornment&&{paddingRight:0})),OutlinedInput=reactExports.forwardRef(function(et,nt){var rt,it,ot,at,st;const lt=useThemeProps({props:et,name:"MuiOutlinedInput"}),{components:ct={},fullWidth:ut=!1,inputComponent:ht="input",label:dt,multiline:pt=!1,notched:mt,slots:gt={},type:yt="text"}=lt,bt=_objectWithoutPropertiesLoose$m(lt,_excluded$X),vt=useUtilityClasses$t(lt),xt=useFormControl(),kt=formControlState({props:lt,muiFormControl:xt,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),St=_extends$u({},lt,{color:kt.color||"primary",disabled:kt.disabled,error:kt.error,focused:kt.focused,formControl:xt,fullWidth:ut,hiddenLabel:kt.hiddenLabel,multiline:pt,size:kt.size,type:yt}),Tt=(rt=(it=gt.root)!=null?it:ct.Root)!=null?rt:OutlinedInputRoot,At=(ot=(at=gt.input)!=null?at:ct.Input)!=null?ot:OutlinedInputInput;return jsxRuntimeExports.jsx(InputBase$1,_extends$u({slots:{root:Tt,input:At},renderSuffix:Et=>jsxRuntimeExports.jsx(NotchedOutlineRoot,{ownerState:St,className:vt.notchedOutline,label:dt!=null&&dt!==""&&kt.required?st||(st=jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[dt," ","*"]})):dt,notched:typeof mt<"u"?mt:!!(Et.startAdornment||Et.filled||Et.focused)}),fullWidth:ut,inputComponent:ht,multiline:pt,ref:nt,type:yt},bt,{classes:_extends$u({},vt,{notchedOutline:null})}))});OutlinedInput.muiName="Input";const OutlinedInput$1=OutlinedInput;function getSelectUtilityClasses(tt){return generateUtilityClass("MuiSelect",tt)}const selectClasses=generateUtilityClasses("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),selectClasses$1=selectClasses;var _span;const _excluded$W=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],SelectSelect=styled$1("div",{name:"MuiSelect",slot:"Select",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[{[`&.${selectClasses$1.select}`]:et.select},{[`&.${selectClasses$1.select}`]:et[nt.variant]},{[`&.${selectClasses$1.error}`]:et.error},{[`&.${selectClasses$1.multiple}`]:et.multiple}]}})(nativeSelectSelectStyles,{[`&.${selectClasses$1.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),SelectIcon=styled$1("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.icon,nt.variant&&et[`icon${capitalize(nt.variant)}`],nt.open&&et.iconOpen]}})(nativeSelectIconStyles),SelectNativeInput=styled$1("input",{shouldForwardProp:tt=>slotShouldForwardProp(tt)&&tt!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(tt,et)=>et.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function areEqualValues(tt,et){return typeof et=="object"&&et!==null?tt===et:String(tt)===String(et)}function isEmpty(tt){return tt==null||typeof tt=="string"&&!tt.trim()}const useUtilityClasses$s=tt=>{const{classes:et,variant:nt,disabled:rt,multiple:it,open:ot,error:at}=tt,st={select:["select",nt,rt&&"disabled",it&&"multiple",at&&"error"],icon:["icon",`icon${capitalize(nt)}`,ot&&"iconOpen",rt&&"disabled"],nativeInput:["nativeInput"]};return composeClasses(st,getSelectUtilityClasses,et)},SelectInput=reactExports.forwardRef(function(et,nt){var rt;const{"aria-describedby":it,"aria-label":ot,autoFocus:at,autoWidth:st,children:lt,className:ct,defaultOpen:ut,defaultValue:ht,disabled:dt,displayEmpty:pt,error:mt=!1,IconComponent:gt,inputRef:yt,labelId:bt,MenuProps:vt={},multiple:xt,name:kt,onBlur:St,onChange:Tt,onClose:At,onFocus:Et,onOpen:$t,open:Dt,readOnly:jt,renderValue:Pt,SelectDisplayProps:Ct={},tabIndex:wt,value:It,variant:Ot="standard"}=et,Wt=_objectWithoutPropertiesLoose$m(et,_excluded$W),[zt,Ft]=useControlled({controlled:It,default:ht,name:"Select"}),[Nt,Ut]=useControlled({controlled:Dt,default:ut,name:"Select"}),Mt=reactExports.useRef(null),Ht=reactExports.useRef(null),[en,sn]=reactExports.useState(null),{current:Kt}=reactExports.useRef(Dt!=null),[rn,nn]=reactExports.useState(),hn=useForkRef(nt,yt),vn=reactExports.useCallback(On=>{Ht.current=On,On&&sn(On)},[]),an=en==null?void 0:en.parentNode;reactExports.useImperativeHandle(hn,()=>({focus:()=>{Ht.current.focus()},node:Mt.current,value:zt}),[zt]),reactExports.useEffect(()=>{ut&&Nt&&en&&!Kt&&(nn(st?null:an.clientWidth),Ht.current.focus())},[en,st]),reactExports.useEffect(()=>{at&&Ht.current.focus()},[at]),reactExports.useEffect(()=>{if(!bt)return;const On=ownerDocument(Ht.current).getElementById(bt);if(On){const Zn=()=>{getSelection().isCollapsed&&Ht.current.focus()};return On.addEventListener("click",Zn),()=>{On.removeEventListener("click",Zn)}}},[bt]);const Qt=(On,Zn)=>{On?$t&&$t(Zn):At&&At(Zn),Kt||(nn(st?null:an.clientWidth),Ut(On))},_n=On=>{On.button===0&&(On.preventDefault(),Ht.current.focus(),Qt(!0,On))},Pn=On=>{Qt(!1,On)},$n=reactExports.Children.toArray(lt),Nn=On=>{const Zn=$n.find(Vn=>Vn.props.value===On.target.value);Zn!==void 0&&(Ft(Zn.props.value),Tt&&Tt(On,Zn))},Tn=On=>Zn=>{let Vn;if(Zn.currentTarget.hasAttribute("tabindex")){if(xt){Vn=Array.isArray(zt)?zt.slice():[];const qn=zt.indexOf(On.props.value);qn===-1?Vn.push(On.props.value):Vn.splice(qn,1)}else Vn=On.props.value;if(On.props.onClick&&On.props.onClick(Zn),zt!==Vn&&(Ft(Vn),Tt)){const qn=Zn.nativeEvent||Zn,zn=new qn.constructor(qn.type,qn);Object.defineProperty(zn,"target",{writable:!0,value:{value:Vn,name:kt}}),Tt(zn,On)}xt||Qt(!1,Zn)}},cn=On=>{jt||[" ","ArrowUp","ArrowDown","Enter"].indexOf(On.key)!==-1&&(On.preventDefault(),Qt(!0,On))},mn=en!==null&&Nt,In=On=>{!mn&&St&&(Object.defineProperty(On,"target",{writable:!0,value:{value:zt,name:kt}}),St(On))};delete Wt["aria-invalid"];let An,wn;const fn=[];let pn=!1;(isFilled({value:zt})||pt)&&(Pt?An=Pt(zt):pn=!0);const kn=$n.map(On=>{if(!reactExports.isValidElement(On))return null;let Zn;if(xt){if(!Array.isArray(zt))throw new Error(formatMuiErrorMessage(2));Zn=zt.some(Vn=>areEqualValues(Vn,On.props.value)),Zn&&pn&&fn.push(On.props.children)}else Zn=areEqualValues(zt,On.props.value),Zn&&pn&&(wn=On.props.children);return reactExports.cloneElement(On,{"aria-selected":Zn?"true":"false",onClick:Tn(On),onKeyUp:Vn=>{Vn.key===" "&&Vn.preventDefault(),On.props.onKeyUp&&On.props.onKeyUp(Vn)},role:"option",selected:Zn,value:void 0,"data-value":On.props.value})});pn&&(xt?fn.length===0?An=null:An=fn.reduce((On,Zn,Vn)=>(On.push(Zn),Vn{const{classes:et}=tt;return et},styledRootConfig={name:"MuiSelect",overridesResolver:(tt,et)=>et.root,shouldForwardProp:tt=>rootShouldForwardProp(tt)&&tt!=="variant",slot:"Root"},StyledInput$1=styled$1(Input$3,styledRootConfig)(""),StyledOutlinedInput=styled$1(OutlinedInput$1,styledRootConfig)(""),StyledFilledInput=styled$1(FilledInput$1,styledRootConfig)(""),Select$3=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({name:"MuiSelect",props:et}),{autoWidth:it=!1,children:ot,classes:at={},className:st,defaultOpen:lt=!1,displayEmpty:ct=!1,IconComponent:ut=ArrowDropDownIcon$1,id:ht,input:dt,inputProps:pt,label:mt,labelId:gt,MenuProps:yt,multiple:bt=!1,native:vt=!1,onClose:xt,onOpen:kt,open:St,renderValue:Tt,SelectDisplayProps:At,variant:Et="outlined"}=rt,$t=_objectWithoutPropertiesLoose$m(rt,_excluded$V),Dt=vt?NativeSelectInput$1:SelectInput$1,jt=useFormControl(),Pt=formControlState({props:rt,muiFormControl:jt,states:["variant","error"]}),Ct=Pt.variant||Et,wt=_extends$u({},rt,{variant:Ct,classes:at}),It=useUtilityClasses$r(wt),Ot=_objectWithoutPropertiesLoose$m(It,_excluded2$c),Wt=dt||{standard:jsxRuntimeExports.jsx(StyledInput$1,{ownerState:wt}),outlined:jsxRuntimeExports.jsx(StyledOutlinedInput,{label:mt,ownerState:wt}),filled:jsxRuntimeExports.jsx(StyledFilledInput,{ownerState:wt})}[Ct],zt=useForkRef(nt,Wt.ref);return jsxRuntimeExports.jsx(reactExports.Fragment,{children:reactExports.cloneElement(Wt,_extends$u({inputComponent:Dt,inputProps:_extends$u({children:ot,error:Pt.error,IconComponent:ut,variant:Ct,type:void 0,multiple:bt},vt?{id:ht}:{autoWidth:it,defaultOpen:lt,displayEmpty:ct,labelId:gt,MenuProps:yt,onClose:xt,onOpen:kt,open:St,renderValue:Tt,SelectDisplayProps:_extends$u({id:ht},At)},pt,{classes:pt?deepmerge$1(Ot,pt.classes):Ot},dt?dt.props.inputProps:{})},bt&&vt&&Ct==="outlined"?{notched:!0}:{},{ref:zt,className:clsx$3(Wt.props.className,st,It.root)},!dt&&{variant:Ct},$t))})});Select$3.muiName="Select";const Select$4=Select$3;function getSkeletonUtilityClass(tt){return generateUtilityClass("MuiSkeleton",tt)}generateUtilityClasses("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const _excluded$U=["animation","className","component","height","style","variant","width"];let _=tt=>tt,_t,_t2,_t3,_t4;const useUtilityClasses$q=tt=>{const{classes:et,variant:nt,animation:rt,hasChildren:it,width:ot,height:at}=tt;return composeClasses({root:["root",nt,rt,it&&"withChildren",it&&!ot&&"fitContent",it&&!at&&"heightAuto"]},getSkeletonUtilityClass,et)},pulseKeyframe=keyframes(_t||(_t=_` +`&&(At.value+=" ");const Et=Tt.boxSizing,$t=getStyleValue(Tt.paddingBottom)+getStyleValue(Tt.paddingTop),Dt=getStyleValue(Tt.borderBottomWidth)+getStyleValue(Tt.borderTopWidth),jt=At.scrollHeight;At.value="x";const Pt=At.scrollHeight;let Ct=jt;ot&&(Ct=Math.max(Number(ot)*Pt,Ct)),it&&(Ct=Math.min(Number(it)*Pt,Ct)),Ct=Math.max(Ct,Pt);const wt=Ct+(Et==="border-box"?$t+Dt:0),It=Math.abs(Ct-jt)<=1;return{outerHeightStyle:wt,overflow:It}},[it,ot,et.placeholder]),bt=(kt,St)=>{const{outerHeightStyle:Tt,overflow:At}=St;return pt.current<20&&(Tt>0&&Math.abs((kt.outerHeightStyle||0)-Tt)>1||kt.overflow!==At)?(pt.current+=1,{overflow:At,outerHeightStyle:Tt}):kt},vt=reactExports.useCallback(()=>{const kt=yt();isEmpty$1(kt)||gt(St=>bt(St,kt))},[yt]);useEnhancedEffect$1(()=>{const kt=()=>{const jt=yt();isEmpty$1(jt)||reactDomExports.flushSync(()=>{gt(Pt=>bt(Pt,jt))})},St=()=>{pt.current=0,kt()};let Tt;const At=debounce$5(St),Et=ut.current,$t=ownerWindow(Et);$t.addEventListener("resize",At);let Dt;return typeof ResizeObserver<"u"&&(Dt=new ResizeObserver(St),Dt.observe(Et)),()=>{At.clear(),cancelAnimationFrame(Tt),$t.removeEventListener("resize",At),Dt&&Dt.disconnect()}},[yt]),useEnhancedEffect$1(()=>{vt()}),reactExports.useEffect(()=>{pt.current=0},[st]);const xt=kt=>{pt.current=0,ct||vt(),rt&&rt(kt)};return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("textarea",_extends$u({value:st,onChange:xt,ref:ht,rows:ot,style:_extends$u({height:mt.outerHeightStyle,overflow:mt.overflow?"hidden":void 0},at)},lt)),jsxRuntimeExports.jsx("textarea",{"aria-hidden":!0,className:et.className,readOnly:!0,ref:dt,tabIndex:-1,style:_extends$u({},styles$5.shadow,at,{paddingTop:0,paddingBottom:0})})]})}),_excluded$1o=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],PopperRoot=styled$1(Popper$1,{name:"MuiPopper",slot:"Root",overridesResolver:(tt,et)=>et.root})({}),Popper=reactExports.forwardRef(function(et,nt){var rt;const it=useTheme$3(),ot=useThemeProps({props:et,name:"MuiPopper"}),{anchorEl:at,component:st,components:lt,componentsProps:ct,container:ut,disablePortal:ht,keepMounted:dt,modifiers:pt,open:mt,placement:gt,popperOptions:yt,popperRef:bt,transition:vt,slots:xt,slotProps:kt}=ot,St=_objectWithoutPropertiesLoose$m(ot,_excluded$1o),Tt=(rt=xt==null?void 0:xt.root)!=null?rt:lt==null?void 0:lt.Root,At=_extends$u({anchorEl:at,container:ut,disablePortal:ht,keepMounted:dt,modifiers:pt,open:mt,placement:gt,popperOptions:yt,popperRef:bt,transition:vt},St);return jsxRuntimeExports.jsx(PopperRoot,_extends$u({as:st,direction:it==null?void 0:it.direction,slots:{root:Tt},slotProps:kt??ct},At,{ref:nt}))}),MuiPopper=Popper,CancelIcon=createSvgIcon(jsxRuntimeExports.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 getChipUtilityClass(tt){return generateUtilityClass("MuiChip",tt)}const chipClasses=generateUtilityClasses("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"]),chipClasses$1=chipClasses,_excluded$1n=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],useUtilityClasses$Q=tt=>{const{classes:et,disabled:nt,size:rt,color:it,iconColor:ot,onDelete:at,clickable:st,variant:lt}=tt,ct={root:["root",lt,nt&&"disabled",`size${capitalize(rt)}`,`color${capitalize(it)}`,st&&"clickable",st&&`clickableColor${capitalize(it)}`,at&&"deletable",at&&`deletableColor${capitalize(it)}`,`${lt}${capitalize(it)}`],label:["label",`label${capitalize(rt)}`],avatar:["avatar",`avatar${capitalize(rt)}`,`avatarColor${capitalize(it)}`],icon:["icon",`icon${capitalize(rt)}`,`iconColor${capitalize(ot)}`],deleteIcon:["deleteIcon",`deleteIcon${capitalize(rt)}`,`deleteIconColor${capitalize(it)}`,`deleteIcon${capitalize(lt)}Color${capitalize(it)}`]};return composeClasses(ct,getChipUtilityClass,et)},ChipRoot=styled$1("div",{name:"MuiChip",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt,{color:rt,iconColor:it,clickable:ot,onDelete:at,size:st,variant:lt}=nt;return[{[`& .${chipClasses$1.avatar}`]:et.avatar},{[`& .${chipClasses$1.avatar}`]:et[`avatar${capitalize(st)}`]},{[`& .${chipClasses$1.avatar}`]:et[`avatarColor${capitalize(rt)}`]},{[`& .${chipClasses$1.icon}`]:et.icon},{[`& .${chipClasses$1.icon}`]:et[`icon${capitalize(st)}`]},{[`& .${chipClasses$1.icon}`]:et[`iconColor${capitalize(it)}`]},{[`& .${chipClasses$1.deleteIcon}`]:et.deleteIcon},{[`& .${chipClasses$1.deleteIcon}`]:et[`deleteIcon${capitalize(st)}`]},{[`& .${chipClasses$1.deleteIcon}`]:et[`deleteIconColor${capitalize(rt)}`]},{[`& .${chipClasses$1.deleteIcon}`]:et[`deleteIcon${capitalize(lt)}Color${capitalize(rt)}`]},et.root,et[`size${capitalize(st)}`],et[`color${capitalize(rt)}`],ot&&et.clickable,ot&&rt!=="default"&&et[`clickableColor${capitalize(rt)})`],at&&et.deletable,at&&rt!=="default"&&et[`deletableColor${capitalize(rt)}`],et[lt],et[`${lt}${capitalize(rt)}`]]}})(({theme:tt,ownerState:et})=>{const nt=tt.palette.mode==="light"?tt.palette.grey[700]:tt.palette.grey[300];return _extends$u({maxWidth:"100%",fontFamily:tt.typography.fontFamily,fontSize:tt.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(tt.vars||tt).palette.text.primary,backgroundColor:(tt.vars||tt).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:tt.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${chipClasses$1.disabled}`]:{opacity:(tt.vars||tt).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${chipClasses$1.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:tt.vars?tt.vars.palette.Chip.defaultAvatarColor:nt,fontSize:tt.typography.pxToRem(12)},[`& .${chipClasses$1.avatarColorPrimary}`]:{color:(tt.vars||tt).palette.primary.contrastText,backgroundColor:(tt.vars||tt).palette.primary.dark},[`& .${chipClasses$1.avatarColorSecondary}`]:{color:(tt.vars||tt).palette.secondary.contrastText,backgroundColor:(tt.vars||tt).palette.secondary.dark},[`& .${chipClasses$1.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:tt.typography.pxToRem(10)},[`& .${chipClasses$1.icon}`]:_extends$u({marginLeft:5,marginRight:-6},et.size==="small"&&{fontSize:18,marginLeft:4,marginRight:-4},et.iconColor===et.color&&_extends$u({color:tt.vars?tt.vars.palette.Chip.defaultIconColor:nt},et.color!=="default"&&{color:"inherit"})),[`& .${chipClasses$1.deleteIcon}`]:_extends$u({WebkitTapHighlightColor:"transparent",color:tt.vars?`rgba(${tt.vars.palette.text.primaryChannel} / 0.26)`:alpha$1(tt.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:tt.vars?`rgba(${tt.vars.palette.text.primaryChannel} / 0.4)`:alpha$1(tt.palette.text.primary,.4)}},et.size==="small"&&{fontSize:16,marginRight:4,marginLeft:-4},et.color!=="default"&&{color:tt.vars?`rgba(${tt.vars.palette[et.color].contrastTextChannel} / 0.7)`:alpha$1(tt.palette[et.color].contrastText,.7),"&:hover, &:active":{color:(tt.vars||tt).palette[et.color].contrastText}})},et.size==="small"&&{height:24},et.color!=="default"&&{backgroundColor:(tt.vars||tt).palette[et.color].main,color:(tt.vars||tt).palette[et.color].contrastText},et.onDelete&&{[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.selectedChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.focusOpacity}))`:alpha$1(tt.palette.action.selected,tt.palette.action.selectedOpacity+tt.palette.action.focusOpacity)}},et.onDelete&&et.color!=="default"&&{[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:(tt.vars||tt).palette[et.color].dark}})},({theme:tt,ownerState:et})=>_extends$u({},et.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.selectedChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.hoverOpacity}))`:alpha$1(tt.palette.action.selected,tt.palette.action.selectedOpacity+tt.palette.action.hoverOpacity)},[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.selectedChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.focusOpacity}))`:alpha$1(tt.palette.action.selected,tt.palette.action.selectedOpacity+tt.palette.action.focusOpacity)},"&:active":{boxShadow:(tt.vars||tt).shadows[1]}},et.clickable&&et.color!=="default"&&{[`&:hover, &.${chipClasses$1.focusVisible}`]:{backgroundColor:(tt.vars||tt).palette[et.color].dark}}),({theme:tt,ownerState:et})=>_extends$u({},et.variant==="outlined"&&{backgroundColor:"transparent",border:tt.vars?`1px solid ${tt.vars.palette.Chip.defaultBorder}`:`1px solid ${tt.palette.mode==="light"?tt.palette.grey[400]:tt.palette.grey[700]}`,[`&.${chipClasses$1.clickable}:hover`]:{backgroundColor:(tt.vars||tt).palette.action.hover},[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:(tt.vars||tt).palette.action.focus},[`& .${chipClasses$1.avatar}`]:{marginLeft:4},[`& .${chipClasses$1.avatarSmall}`]:{marginLeft:2},[`& .${chipClasses$1.icon}`]:{marginLeft:4},[`& .${chipClasses$1.iconSmall}`]:{marginLeft:2},[`& .${chipClasses$1.deleteIcon}`]:{marginRight:5},[`& .${chipClasses$1.deleteIconSmall}`]:{marginRight:3}},et.variant==="outlined"&&et.color!=="default"&&{color:(tt.vars||tt).palette[et.color].main,border:`1px solid ${tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / 0.7)`:alpha$1(tt.palette[et.color].main,.7)}`,[`&.${chipClasses$1.clickable}:hover`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette[et.color].main,tt.palette.action.hoverOpacity)},[`&.${chipClasses$1.focusVisible}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / ${tt.vars.palette.action.focusOpacity})`:alpha$1(tt.palette[et.color].main,tt.palette.action.focusOpacity)},[`& .${chipClasses$1.deleteIcon}`]:{color:tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / 0.7)`:alpha$1(tt.palette[et.color].main,.7),"&:hover, &:active":{color:(tt.vars||tt).palette[et.color].main}}})),ChipLabel=styled$1("span",{name:"MuiChip",slot:"Label",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt,{size:rt}=nt;return[et.label,et[`label${capitalize(rt)}`]]}})(({ownerState:tt})=>_extends$u({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},tt.variant==="outlined"&&{paddingLeft:11,paddingRight:11},tt.size==="small"&&{paddingLeft:8,paddingRight:8},tt.size==="small"&&tt.variant==="outlined"&&{paddingLeft:7,paddingRight:7}));function isDeleteKeyboardEvent(tt){return tt.key==="Backspace"||tt.key==="Delete"}const Chip=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiChip"}),{avatar:it,className:ot,clickable:at,color:st="default",component:lt,deleteIcon:ct,disabled:ut=!1,icon:ht,label:dt,onClick:pt,onDelete:mt,onKeyDown:gt,onKeyUp:yt,size:bt="medium",variant:vt="filled",tabIndex:xt,skipFocusWhenDisabled:kt=!1}=rt,St=_objectWithoutPropertiesLoose$m(rt,_excluded$1n),Tt=reactExports.useRef(null),At=useForkRef(Tt,nt),Et=Ft=>{Ft.stopPropagation(),mt&&mt(Ft)},$t=Ft=>{Ft.currentTarget===Ft.target&&isDeleteKeyboardEvent(Ft)&&Ft.preventDefault(),gt&>(Ft)},Dt=Ft=>{Ft.currentTarget===Ft.target&&(mt&&isDeleteKeyboardEvent(Ft)?mt(Ft):Ft.key==="Escape"&&Tt.current&&Tt.current.blur()),yt&&yt(Ft)},jt=at!==!1&&pt?!0:at,Pt=jt||mt?ButtonBase$1:lt||"div",Ct=_extends$u({},rt,{component:Pt,disabled:ut,size:bt,color:st,iconColor:reactExports.isValidElement(ht)&&ht.props.color||st,onDelete:!!mt,clickable:jt,variant:vt}),wt=useUtilityClasses$Q(Ct),It=Pt===ButtonBase$1?_extends$u({component:lt||"div",focusVisibleClassName:wt.focusVisible},mt&&{disableRipple:!0}):{};let Ot=null;mt&&(Ot=ct&&reactExports.isValidElement(ct)?reactExports.cloneElement(ct,{className:clsx$3(ct.props.className,wt.deleteIcon),onClick:Et}):jsxRuntimeExports.jsx(CancelIcon,{className:clsx$3(wt.deleteIcon),onClick:Et}));let Wt=null;it&&reactExports.isValidElement(it)&&(Wt=reactExports.cloneElement(it,{className:clsx$3(wt.avatar,it.props.className)}));let zt=null;return ht&&reactExports.isValidElement(ht)&&(zt=reactExports.cloneElement(ht,{className:clsx$3(wt.icon,ht.props.className)})),jsxRuntimeExports.jsxs(ChipRoot,_extends$u({as:Pt,className:clsx$3(wt.root,ot),disabled:jt&&ut?!0:void 0,onClick:pt,onKeyDown:$t,onKeyUp:Dt,ref:At,tabIndex:kt&&ut?-1:xt,ownerState:Ct},It,St,{children:[Wt||zt,jsxRuntimeExports.jsx(ChipLabel,{className:clsx$3(wt.label),ownerState:Ct,children:dt}),Ot]}))}),Chip$1=Chip;function formControlState({props:tt,states:et,muiFormControl:nt}){return et.reduce((rt,it)=>(rt[it]=tt[it],nt&&typeof tt[it]>"u"&&(rt[it]=nt[it]),rt),{})}const FormControlContext=reactExports.createContext(void 0),FormControlContext$1=FormControlContext;function useFormControl(){return reactExports.useContext(FormControlContext$1)}function GlobalStyles(tt){return jsxRuntimeExports.jsx(GlobalStyles$1,_extends$u({},tt,{defaultTheme:defaultTheme$1,themeId:THEME_ID}))}function hasValue(tt){return tt!=null&&!(Array.isArray(tt)&&tt.length===0)}function isFilled(tt,et=!1){return tt&&(hasValue(tt.value)&&tt.value!==""||et&&hasValue(tt.defaultValue)&&tt.defaultValue!=="")}function isAdornedStart(tt){return tt.startAdornment}function getInputBaseUtilityClass(tt){return generateUtilityClass("MuiInputBase",tt)}const inputBaseClasses=generateUtilityClasses("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),inputBaseClasses$1=inputBaseClasses,_excluded$1m=["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"],rootOverridesResolver=(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.formControl&&et.formControl,nt.startAdornment&&et.adornedStart,nt.endAdornment&&et.adornedEnd,nt.error&&et.error,nt.size==="small"&&et.sizeSmall,nt.multiline&&et.multiline,nt.color&&et[`color${capitalize(nt.color)}`],nt.fullWidth&&et.fullWidth,nt.hiddenLabel&&et.hiddenLabel]},inputOverridesResolver=(tt,et)=>{const{ownerState:nt}=tt;return[et.input,nt.size==="small"&&et.inputSizeSmall,nt.multiline&&et.inputMultiline,nt.type==="search"&&et.inputTypeSearch,nt.startAdornment&&et.inputAdornedStart,nt.endAdornment&&et.inputAdornedEnd,nt.hiddenLabel&&et.inputHiddenLabel]},useUtilityClasses$P=tt=>{const{classes:et,color:nt,disabled:rt,error:it,endAdornment:ot,focused:at,formControl:st,fullWidth:lt,hiddenLabel:ct,multiline:ut,readOnly:ht,size:dt,startAdornment:pt,type:mt}=tt,gt={root:["root",`color${capitalize(nt)}`,rt&&"disabled",it&&"error",lt&&"fullWidth",at&&"focused",st&&"formControl",dt&&dt!=="medium"&&`size${capitalize(dt)}`,ut&&"multiline",pt&&"adornedStart",ot&&"adornedEnd",ct&&"hiddenLabel",ht&&"readOnly"],input:["input",rt&&"disabled",mt==="search"&&"inputTypeSearch",ut&&"inputMultiline",dt==="small"&&"inputSizeSmall",ct&&"inputHiddenLabel",pt&&"inputAdornedStart",ot&&"inputAdornedEnd",ht&&"readOnly"]};return composeClasses(gt,getInputBaseUtilityClass,et)},InputBaseRoot=styled$1("div",{name:"MuiInputBase",slot:"Root",overridesResolver:rootOverridesResolver})(({theme:tt,ownerState:et})=>_extends$u({},tt.typography.body1,{color:(tt.vars||tt).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${inputBaseClasses$1.disabled}`]:{color:(tt.vars||tt).palette.text.disabled,cursor:"default"}},et.multiline&&_extends$u({padding:"4px 0 5px"},et.size==="small"&&{paddingTop:1}),et.fullWidth&&{width:"100%"})),InputBaseComponent=styled$1("input",{name:"MuiInputBase",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:tt,ownerState:et})=>{const nt=tt.palette.mode==="light",rt=_extends$u({color:"currentColor"},tt.vars?{opacity:tt.vars.opacity.inputPlaceholder}:{opacity:nt?.42:.5},{transition:tt.transitions.create("opacity",{duration:tt.transitions.duration.shorter})}),it={opacity:"0 !important"},ot=tt.vars?{opacity:tt.vars.opacity.inputPlaceholder}:{opacity:nt?.42:.5};return _extends$u({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":rt,"&::-moz-placeholder":rt,"&:-ms-input-placeholder":rt,"&::-ms-input-placeholder":rt,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${inputBaseClasses$1.formControl} &`]:{"&::-webkit-input-placeholder":it,"&::-moz-placeholder":it,"&:-ms-input-placeholder":it,"&::-ms-input-placeholder":it,"&:focus::-webkit-input-placeholder":ot,"&:focus::-moz-placeholder":ot,"&:focus:-ms-input-placeholder":ot,"&:focus::-ms-input-placeholder":ot},[`&.${inputBaseClasses$1.disabled}`]:{opacity:1,WebkitTextFillColor:(tt.vars||tt).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},et.size==="small"&&{paddingTop:1},et.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},et.type==="search"&&{MozAppearance:"textfield"})}),inputGlobalStyles=jsxRuntimeExports.jsx(GlobalStyles,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),InputBase=reactExports.forwardRef(function(et,nt){var rt;const it=useThemeProps({props:et,name:"MuiInputBase"}),{"aria-describedby":ot,autoComplete:at,autoFocus:st,className:lt,components:ct={},componentsProps:ut={},defaultValue:ht,disabled:dt,disableInjectingGlobalStyles:pt,endAdornment:mt,fullWidth:gt=!1,id:yt,inputComponent:bt="input",inputProps:vt={},inputRef:xt,maxRows:kt,minRows:St,multiline:Tt=!1,name:At,onBlur:Et,onChange:$t,onClick:Dt,onFocus:jt,onKeyDown:Pt,onKeyUp:Ct,placeholder:wt,readOnly:It,renderSuffix:Ot,rows:Wt,slotProps:zt={},slots:Ft={},startAdornment:Nt,type:Ut="text",value:Mt}=it,Ht=_objectWithoutPropertiesLoose$m(it,_excluded$1m),en=vt.value!=null?vt.value:Mt,{current:sn}=reactExports.useRef(en!=null),Kt=reactExports.useRef(),rn=reactExports.useCallback(Zt=>{},[]),nn=useForkRef(Kt,xt,vt.ref,rn),[hn,vn]=reactExports.useState(!1),an=useFormControl(),Qt=formControlState({props:it,muiFormControl:an,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Qt.focused=an?an.focused:hn,reactExports.useEffect(()=>{!an&&dt&&hn&&(vn(!1),Et&&Et())},[an,dt,hn,Et]);const _n=an&&an.onFilled,Pn=an&&an.onEmpty,$n=reactExports.useCallback(Zt=>{isFilled(Zt)?_n&&_n():Pn&&Pn()},[_n,Pn]);useEnhancedEffect$1(()=>{sn&&$n({value:en})},[en,$n,sn]);const Nn=Zt=>{if(Qt.disabled){Zt.stopPropagation();return}jt&&jt(Zt),vt.onFocus&&vt.onFocus(Zt),an&&an.onFocus?an.onFocus(Zt):vn(!0)},Tn=Zt=>{Et&&Et(Zt),vt.onBlur&&vt.onBlur(Zt),an&&an.onBlur?an.onBlur(Zt):vn(!1)},cn=(Zt,...Xt)=>{if(!sn){const Sn=Zt.target||Kt.current;if(Sn==null)throw new Error(formatMuiErrorMessage(1));$n({value:Sn.value})}vt.onChange&&vt.onChange(Zt,...Xt),$t&&$t(Zt,...Xt)};reactExports.useEffect(()=>{$n(Kt.current)},[]);const mn=Zt=>{Kt.current&&Zt.currentTarget===Zt.target&&Kt.current.focus(),Dt&&Dt(Zt)};let In=bt,An=vt;Tt&&In==="input"&&(Wt?An=_extends$u({type:void 0,minRows:Wt,maxRows:Wt},An):An=_extends$u({type:void 0,maxRows:kt,minRows:St},An),In=TextareaAutosize);const wn=Zt=>{$n(Zt.animationName==="mui-auto-fill-cancel"?Kt.current:{value:"x"})};reactExports.useEffect(()=>{an&&an.setAdornedStart(!!Nt)},[an,Nt]);const fn=_extends$u({},it,{color:Qt.color||"primary",disabled:Qt.disabled,endAdornment:mt,error:Qt.error,focused:Qt.focused,formControl:an,fullWidth:gt,hiddenLabel:Qt.hiddenLabel,multiline:Tt,size:Qt.size,startAdornment:Nt,type:Ut}),pn=useUtilityClasses$P(fn),kn=Ft.root||ct.Root||InputBaseRoot,Dn=zt.root||ut.root||{},un=Ft.input||ct.Input||InputBaseComponent;return An=_extends$u({},An,(rt=zt.input)!=null?rt:ut.input),jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[!pt&&inputGlobalStyles,jsxRuntimeExports.jsxs(kn,_extends$u({},Dn,!isHostComponent(kn)&&{ownerState:_extends$u({},fn,Dn.ownerState)},{ref:nt,onClick:mn},Ht,{className:clsx$3(pn.root,Dn.className,lt,It&&"MuiInputBase-readOnly"),children:[Nt,jsxRuntimeExports.jsx(FormControlContext$1.Provider,{value:null,children:jsxRuntimeExports.jsx(un,_extends$u({ownerState:fn,"aria-invalid":Qt.error,"aria-describedby":ot,autoComplete:at,autoFocus:st,defaultValue:ht,disabled:Qt.disabled,id:yt,onAnimationStart:wn,name:At,placeholder:wt,readOnly:It,required:Qt.required,rows:Wt,value:en,onKeyDown:Pt,onKeyUp:Ct,type:Ut},An,!isHostComponent(un)&&{as:In,ownerState:_extends$u({},fn,An.ownerState)},{ref:nn,className:clsx$3(pn.input,An.className,It&&"MuiInputBase-readOnly"),onBlur:Tn,onChange:cn,onFocus:Nn}))}),mt,Ot?Ot(_extends$u({},Qt,{startAdornment:Nt})):null]}))]})}),InputBase$1=InputBase;function getInputUtilityClass(tt){return generateUtilityClass("MuiInput",tt)}const inputClasses=_extends$u({},inputBaseClasses$1,generateUtilityClasses("MuiInput",["root","underline","input"])),inputClasses$1=inputClasses;function getOutlinedInputUtilityClass(tt){return generateUtilityClass("MuiOutlinedInput",tt)}const outlinedInputClasses=_extends$u({},inputBaseClasses$1,generateUtilityClasses("MuiOutlinedInput",["root","notchedOutline","input"])),outlinedInputClasses$1=outlinedInputClasses;function getFilledInputUtilityClass(tt){return generateUtilityClass("MuiFilledInput",tt)}const filledInputClasses=_extends$u({},inputBaseClasses$1,generateUtilityClasses("MuiFilledInput",["root","underline","input"])),filledInputClasses$1=filledInputClasses,ArrowDropDownIcon$1=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),_excluded$1l=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],styles$4={entering:{opacity:1},entered:{opacity:1}},Fade=reactExports.forwardRef(function(et,nt){const rt=useTheme(),it={enter:rt.transitions.duration.enteringScreen,exit:rt.transitions.duration.leavingScreen},{addEndListener:ot,appear:at=!0,children:st,easing:lt,in:ct,onEnter:ut,onEntered:ht,onEntering:dt,onExit:pt,onExited:mt,onExiting:gt,style:yt,timeout:bt=it,TransitionComponent:vt=Transition$2}=et,xt=_objectWithoutPropertiesLoose$m(et,_excluded$1l),kt=reactExports.useRef(null),St=useForkRef(kt,st.ref,nt),Tt=wt=>It=>{if(wt){const Ot=kt.current;It===void 0?wt(Ot):wt(Ot,It)}},At=Tt(dt),Et=Tt((wt,It)=>{reflow(wt);const Ot=getTransitionProps({style:yt,timeout:bt,easing:lt},{mode:"enter"});wt.style.webkitTransition=rt.transitions.create("opacity",Ot),wt.style.transition=rt.transitions.create("opacity",Ot),ut&&ut(wt,It)}),$t=Tt(ht),Dt=Tt(gt),jt=Tt(wt=>{const It=getTransitionProps({style:yt,timeout:bt,easing:lt},{mode:"exit"});wt.style.webkitTransition=rt.transitions.create("opacity",It),wt.style.transition=rt.transitions.create("opacity",It),pt&&pt(wt)}),Pt=Tt(mt),Ct=wt=>{ot&&ot(kt.current,wt)};return jsxRuntimeExports.jsx(vt,_extends$u({appear:at,in:ct,nodeRef:kt,onEnter:Et,onEntered:$t,onEntering:At,onExit:jt,onExited:Pt,onExiting:Dt,addEndListener:Ct,timeout:bt},xt,{children:(wt,It)=>reactExports.cloneElement(st,_extends$u({style:_extends$u({opacity:0,visibility:wt==="exited"&&!ct?"hidden":void 0},styles$4[wt],yt,st.props.style),ref:St},It))}))}),Fade$1=Fade;function getBackdropUtilityClass(tt){return generateUtilityClass("MuiBackdrop",tt)}generateUtilityClasses("MuiBackdrop",["root","invisible"]);const _excluded$1k=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],useUtilityClasses$O=tt=>{const{classes:et,invisible:nt}=tt;return composeClasses({root:["root",nt&&"invisible"]},getBackdropUtilityClass,et)},BackdropRoot=styled$1("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.invisible&&et.invisible]}})(({ownerState:tt})=>_extends$u({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"},tt.invisible&&{backgroundColor:"transparent"})),Backdrop=reactExports.forwardRef(function(et,nt){var rt,it,ot;const at=useThemeProps({props:et,name:"MuiBackdrop"}),{children:st,className:lt,component:ct="div",components:ut={},componentsProps:ht={},invisible:dt=!1,open:pt,slotProps:mt={},slots:gt={},TransitionComponent:yt=Fade$1,transitionDuration:bt}=at,vt=_objectWithoutPropertiesLoose$m(at,_excluded$1k),xt=_extends$u({},at,{component:ct,invisible:dt}),kt=useUtilityClasses$O(xt),St=(rt=mt.root)!=null?rt:ht.root;return jsxRuntimeExports.jsx(yt,_extends$u({in:pt,timeout:bt},vt,{children:jsxRuntimeExports.jsx(BackdropRoot,_extends$u({"aria-hidden":!0},St,{as:(it=(ot=gt.root)!=null?ot:ut.Root)!=null?it:ct,className:clsx$3(kt.root,lt,St==null?void 0:St.className),ownerState:_extends$u({},xt,St==null?void 0:St.ownerState),classes:kt,ref:nt,children:st}))}))}),Backdrop$1=Backdrop;function getButtonUtilityClass(tt){return generateUtilityClass("MuiButton",tt)}const buttonClasses=generateUtilityClasses("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),buttonClasses$1=buttonClasses,ButtonGroupContext=reactExports.createContext({}),ButtonGroupContext$1=ButtonGroupContext,ButtonGroupButtonContext=reactExports.createContext(void 0),ButtonGroupButtonContext$1=ButtonGroupButtonContext,_excluded$1j=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],useUtilityClasses$N=tt=>{const{color:et,disableElevation:nt,fullWidth:rt,size:it,variant:ot,classes:at}=tt,st={root:["root",ot,`${ot}${capitalize(et)}`,`size${capitalize(it)}`,`${ot}Size${capitalize(it)}`,et==="inherit"&&"colorInherit",nt&&"disableElevation",rt&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${capitalize(it)}`],endIcon:["endIcon",`iconSize${capitalize(it)}`]},lt=composeClasses(st,getButtonUtilityClass,at);return _extends$u({},at,lt)},commonIconStyles=tt=>_extends$u({},tt.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},tt.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},tt.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),ButtonRoot=styled$1(ButtonBase$1,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiButton",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,et[nt.variant],et[`${nt.variant}${capitalize(nt.color)}`],et[`size${capitalize(nt.size)}`],et[`${nt.variant}Size${capitalize(nt.size)}`],nt.color==="inherit"&&et.colorInherit,nt.disableElevation&&et.disableElevation,nt.fullWidth&&et.fullWidth]}})(({theme:tt,ownerState:et})=>{var nt,rt;const it=tt.palette.mode==="light"?tt.palette.grey[300]:tt.palette.grey[800],ot=tt.palette.mode==="light"?tt.palette.grey.A100:tt.palette.grey[700];return _extends$u({},tt.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(tt.vars||tt).shape.borderRadius,transition:tt.transitions.create(["background-color","box-shadow","border-color","color"],{duration:tt.transitions.duration.short}),"&:hover":_extends$u({textDecoration:"none",backgroundColor:tt.vars?`rgba(${tt.vars.palette.text.primaryChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette.text.primary,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},et.variant==="text"&&et.color!=="inherit"&&{backgroundColor:tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette[et.color].main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},et.variant==="outlined"&&et.color!=="inherit"&&{border:`1px solid ${(tt.vars||tt).palette[et.color].main}`,backgroundColor:tt.vars?`rgba(${tt.vars.palette[et.color].mainChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette[et.color].main,tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},et.variant==="contained"&&{backgroundColor:tt.vars?tt.vars.palette.Button.inheritContainedHoverBg:ot,boxShadow:(tt.vars||tt).shadows[4],"@media (hover: none)":{boxShadow:(tt.vars||tt).shadows[2],backgroundColor:(tt.vars||tt).palette.grey[300]}},et.variant==="contained"&&et.color!=="inherit"&&{backgroundColor:(tt.vars||tt).palette[et.color].dark,"@media (hover: none)":{backgroundColor:(tt.vars||tt).palette[et.color].main}}),"&:active":_extends$u({},et.variant==="contained"&&{boxShadow:(tt.vars||tt).shadows[8]}),[`&.${buttonClasses$1.focusVisible}`]:_extends$u({},et.variant==="contained"&&{boxShadow:(tt.vars||tt).shadows[6]}),[`&.${buttonClasses$1.disabled}`]:_extends$u({color:(tt.vars||tt).palette.action.disabled},et.variant==="outlined"&&{border:`1px solid ${(tt.vars||tt).palette.action.disabledBackground}`},et.variant==="contained"&&{color:(tt.vars||tt).palette.action.disabled,boxShadow:(tt.vars||tt).shadows[0],backgroundColor:(tt.vars||tt).palette.action.disabledBackground})},et.variant==="text"&&{padding:"6px 8px"},et.variant==="text"&&et.color!=="inherit"&&{color:(tt.vars||tt).palette[et.color].main},et.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},et.variant==="outlined"&&et.color!=="inherit"&&{color:(tt.vars||tt).palette[et.color].main,border:tt.vars?`1px solid rgba(${tt.vars.palette[et.color].mainChannel} / 0.5)`:`1px solid ${alpha$1(tt.palette[et.color].main,.5)}`},et.variant==="contained"&&{color:tt.vars?tt.vars.palette.text.primary:(nt=(rt=tt.palette).getContrastText)==null?void 0:nt.call(rt,tt.palette.grey[300]),backgroundColor:tt.vars?tt.vars.palette.Button.inheritContainedBg:it,boxShadow:(tt.vars||tt).shadows[2]},et.variant==="contained"&&et.color!=="inherit"&&{color:(tt.vars||tt).palette[et.color].contrastText,backgroundColor:(tt.vars||tt).palette[et.color].main},et.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},et.size==="small"&&et.variant==="text"&&{padding:"4px 5px",fontSize:tt.typography.pxToRem(13)},et.size==="large"&&et.variant==="text"&&{padding:"8px 11px",fontSize:tt.typography.pxToRem(15)},et.size==="small"&&et.variant==="outlined"&&{padding:"3px 9px",fontSize:tt.typography.pxToRem(13)},et.size==="large"&&et.variant==="outlined"&&{padding:"7px 21px",fontSize:tt.typography.pxToRem(15)},et.size==="small"&&et.variant==="contained"&&{padding:"4px 10px",fontSize:tt.typography.pxToRem(13)},et.size==="large"&&et.variant==="contained"&&{padding:"8px 22px",fontSize:tt.typography.pxToRem(15)},et.fullWidth&&{width:"100%"})},({ownerState:tt})=>tt.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${buttonClasses$1.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${buttonClasses$1.disabled}`]:{boxShadow:"none"}}),ButtonStartIcon=styled$1("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.startIcon,et[`iconSize${capitalize(nt.size)}`]]}})(({ownerState:tt})=>_extends$u({display:"inherit",marginRight:8,marginLeft:-4},tt.size==="small"&&{marginLeft:-2},commonIconStyles(tt))),ButtonEndIcon=styled$1("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.endIcon,et[`iconSize${capitalize(nt.size)}`]]}})(({ownerState:tt})=>_extends$u({display:"inherit",marginRight:-4,marginLeft:8},tt.size==="small"&&{marginRight:-2},commonIconStyles(tt))),Button$1=reactExports.forwardRef(function(et,nt){const rt=reactExports.useContext(ButtonGroupContext$1),it=reactExports.useContext(ButtonGroupButtonContext$1),ot=resolveProps(rt,et),at=useThemeProps({props:ot,name:"MuiButton"}),{children:st,color:lt="primary",component:ct="button",className:ut,disabled:ht=!1,disableElevation:dt=!1,disableFocusRipple:pt=!1,endIcon:mt,focusVisibleClassName:gt,fullWidth:yt=!1,size:bt="medium",startIcon:vt,type:xt,variant:kt="text"}=at,St=_objectWithoutPropertiesLoose$m(at,_excluded$1j),Tt=_extends$u({},at,{color:lt,component:ct,disabled:ht,disableElevation:dt,disableFocusRipple:pt,fullWidth:yt,size:bt,type:xt,variant:kt}),At=useUtilityClasses$N(Tt),Et=vt&&jsxRuntimeExports.jsx(ButtonStartIcon,{className:At.startIcon,ownerState:Tt,children:vt}),$t=mt&&jsxRuntimeExports.jsx(ButtonEndIcon,{className:At.endIcon,ownerState:Tt,children:mt}),Dt=it||"";return jsxRuntimeExports.jsxs(ButtonRoot,_extends$u({ownerState:Tt,className:clsx$3(rt.className,At.root,ut,Dt),component:ct,disabled:ht,focusRipple:!pt,focusVisibleClassName:clsx$3(At.focusVisible,gt),ref:nt,type:xt},St,{classes:At,children:[Et,st,$t]}))}),Button$2=Button$1;function getModalUtilityClass(tt){return generateUtilityClass("MuiModal",tt)}generateUtilityClasses("MuiModal",["root","hidden","backdrop"]);const _excluded$1i=["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"],useUtilityClasses$M=tt=>{const{open:et,exited:nt,classes:rt}=tt;return composeClasses({root:["root",!et&&nt&&"hidden"],backdrop:["backdrop"]},getModalUtilityClass,rt)},ModalRoot=styled$1("div",{name:"MuiModal",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,!nt.open&&nt.exited&&et.hidden]}})(({theme:tt,ownerState:et})=>_extends$u({position:"fixed",zIndex:(tt.vars||tt).zIndex.modal,right:0,bottom:0,top:0,left:0},!et.open&&et.exited&&{visibility:"hidden"})),ModalBackdrop=styled$1(Backdrop$1,{name:"MuiModal",slot:"Backdrop",overridesResolver:(tt,et)=>et.backdrop})({zIndex:-1}),Modal=reactExports.forwardRef(function(et,nt){var rt,it,ot,at,st,lt;const ct=useThemeProps({name:"MuiModal",props:et}),{BackdropComponent:ut=ModalBackdrop,BackdropProps:ht,className:dt,closeAfterTransition:pt=!1,children:mt,container:gt,component:yt,components:bt={},componentsProps:vt={},disableAutoFocus:xt=!1,disableEnforceFocus:kt=!1,disableEscapeKeyDown:St=!1,disablePortal:Tt=!1,disableRestoreFocus:At=!1,disableScrollLock:Et=!1,hideBackdrop:$t=!1,keepMounted:Dt=!1,onBackdropClick:jt,open:Pt,slotProps:Ct,slots:wt}=ct,It=_objectWithoutPropertiesLoose$m(ct,_excluded$1i),Ot=_extends$u({},ct,{closeAfterTransition:pt,disableAutoFocus:xt,disableEnforceFocus:kt,disableEscapeKeyDown:St,disablePortal:Tt,disableRestoreFocus:At,disableScrollLock:Et,hideBackdrop:$t,keepMounted:Dt}),{getRootProps:Wt,getBackdropProps:zt,getTransitionProps:Ft,portalRef:Nt,isTopModal:Ut,exited:Mt,hasTransition:Ht}=useModal$1(_extends$u({},Ot,{rootRef:nt})),en=_extends$u({},Ot,{exited:Mt}),sn=useUtilityClasses$M(en),Kt={};if(mt.props.tabIndex===void 0&&(Kt.tabIndex="-1"),Ht){const{onEnter:_n,onExited:Pn}=Ft();Kt.onEnter=_n,Kt.onExited=Pn}const rn=(rt=(it=wt==null?void 0:wt.root)!=null?it:bt.Root)!=null?rt:ModalRoot,nn=(ot=(at=wt==null?void 0:wt.backdrop)!=null?at:bt.Backdrop)!=null?ot:ut,hn=(st=Ct==null?void 0:Ct.root)!=null?st:vt.root,vn=(lt=Ct==null?void 0:Ct.backdrop)!=null?lt:vt.backdrop,an=useSlotProps({elementType:rn,externalSlotProps:hn,externalForwardedProps:It,getSlotProps:Wt,additionalProps:{ref:nt,as:yt},ownerState:en,className:clsx$3(dt,hn==null?void 0:hn.className,sn==null?void 0:sn.root,!en.open&&en.exited&&(sn==null?void 0:sn.hidden))}),Qt=useSlotProps({elementType:nn,externalSlotProps:vn,additionalProps:ht,getSlotProps:_n=>zt(_extends$u({},_n,{onClick:Pn=>{jt&&jt(Pn),_n!=null&&_n.onClick&&_n.onClick(Pn)}})),className:clsx$3(vn==null?void 0:vn.className,ht==null?void 0:ht.className,sn==null?void 0:sn.backdrop),ownerState:en});return!Dt&&!Pt&&(!Ht||Mt)?null:jsxRuntimeExports.jsx(Portal$1,{ref:Nt,container:gt,disablePortal:Tt,children:jsxRuntimeExports.jsxs(rn,_extends$u({},an,{children:[!$t&&ut?jsxRuntimeExports.jsx(nn,_extends$u({},Qt)):null,jsxRuntimeExports.jsx(FocusTrap,{disableEnforceFocus:kt,disableAutoFocus:xt,disableRestoreFocus:At,isEnabled:Ut,open:Pt,children:reactExports.cloneElement(mt,Kt)})]}))})}),Modal$1=Modal;function getDialogUtilityClass(tt){return generateUtilityClass("MuiDialog",tt)}const dialogClasses=generateUtilityClasses("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),dialogClasses$1=dialogClasses,DialogContext=reactExports.createContext({}),DialogContext$1=DialogContext,_excluded$1h=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],DialogBackdrop=styled$1(Backdrop$1,{name:"MuiDialog",slot:"Backdrop",overrides:(tt,et)=>et.backdrop})({zIndex:-1}),useUtilityClasses$L=tt=>{const{classes:et,scroll:nt,maxWidth:rt,fullWidth:it,fullScreen:ot}=tt,at={root:["root"],container:["container",`scroll${capitalize(nt)}`],paper:["paper",`paperScroll${capitalize(nt)}`,`paperWidth${capitalize(String(rt))}`,it&&"paperFullWidth",ot&&"paperFullScreen"]};return composeClasses(at,getDialogUtilityClass,et)},DialogRoot=styled$1(Modal$1,{name:"MuiDialog",slot:"Root",overridesResolver:(tt,et)=>et.root})({"@media print":{position:"absolute !important"}}),DialogContainer=styled$1("div",{name:"MuiDialog",slot:"Container",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.container,et[`scroll${capitalize(nt.scroll)}`]]}})(({ownerState:tt})=>_extends$u({height:"100%","@media print":{height:"auto"},outline:0},tt.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},tt.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),DialogPaper=styled$1(Paper$1,{name:"MuiDialog",slot:"Paper",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.paper,et[`scrollPaper${capitalize(nt.scroll)}`],et[`paperWidth${capitalize(String(nt.maxWidth))}`],nt.fullWidth&&et.paperFullWidth,nt.fullScreen&&et.paperFullScreen]}})(({theme:tt,ownerState:et})=>_extends$u({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},et.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},et.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!et.maxWidth&&{maxWidth:"calc(100% - 64px)"},et.maxWidth==="xs"&&{maxWidth:tt.breakpoints.unit==="px"?Math.max(tt.breakpoints.values.xs,444):`max(${tt.breakpoints.values.xs}${tt.breakpoints.unit}, 444px)`,[`&.${dialogClasses$1.paperScrollBody}`]:{[tt.breakpoints.down(Math.max(tt.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},et.maxWidth&&et.maxWidth!=="xs"&&{maxWidth:`${tt.breakpoints.values[et.maxWidth]}${tt.breakpoints.unit}`,[`&.${dialogClasses$1.paperScrollBody}`]:{[tt.breakpoints.down(tt.breakpoints.values[et.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},et.fullWidth&&{width:"calc(100% - 64px)"},et.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${dialogClasses$1.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),Dialog=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDialog"}),it=useTheme(),ot={enter:it.transitions.duration.enteringScreen,exit:it.transitions.duration.leavingScreen},{"aria-describedby":at,"aria-labelledby":st,BackdropComponent:lt,BackdropProps:ct,children:ut,className:ht,disableEscapeKeyDown:dt=!1,fullScreen:pt=!1,fullWidth:mt=!1,maxWidth:gt="sm",onBackdropClick:yt,onClose:bt,open:vt,PaperComponent:xt=Paper$1,PaperProps:kt={},scroll:St="paper",TransitionComponent:Tt=Fade$1,transitionDuration:At=ot,TransitionProps:Et}=rt,$t=_objectWithoutPropertiesLoose$m(rt,_excluded$1h),Dt=_extends$u({},rt,{disableEscapeKeyDown:dt,fullScreen:pt,fullWidth:mt,maxWidth:gt,scroll:St}),jt=useUtilityClasses$L(Dt),Pt=reactExports.useRef(),Ct=Wt=>{Pt.current=Wt.target===Wt.currentTarget},wt=Wt=>{Pt.current&&(Pt.current=null,yt&&yt(Wt),bt&&bt(Wt,"backdropClick"))},It=useId(st),Ot=reactExports.useMemo(()=>({titleId:It}),[It]);return jsxRuntimeExports.jsx(DialogRoot,_extends$u({className:clsx$3(jt.root,ht),closeAfterTransition:!0,components:{Backdrop:DialogBackdrop},componentsProps:{backdrop:_extends$u({transitionDuration:At,as:lt},ct)},disableEscapeKeyDown:dt,onClose:bt,open:vt,ref:nt,onClick:wt,ownerState:Dt},$t,{children:jsxRuntimeExports.jsx(Tt,_extends$u({appear:!0,in:vt,timeout:At,role:"presentation"},Et,{children:jsxRuntimeExports.jsx(DialogContainer,{className:clsx$3(jt.container),onMouseDown:Ct,ownerState:Dt,children:jsxRuntimeExports.jsx(DialogPaper,_extends$u({as:xt,elevation:24,role:"dialog","aria-describedby":at,"aria-labelledby":It},kt,{className:clsx$3(jt.paper,kt.className),ownerState:Dt,children:jsxRuntimeExports.jsx(DialogContext$1.Provider,{value:Ot,children:ut})}))})}))}))}),MuiDialog=Dialog;function getDialogActionsUtilityClass(tt){return generateUtilityClass("MuiDialogActions",tt)}generateUtilityClasses("MuiDialogActions",["root","spacing"]);const _excluded$1g=["className","disableSpacing"],useUtilityClasses$K=tt=>{const{classes:et,disableSpacing:nt}=tt;return composeClasses({root:["root",!nt&&"spacing"]},getDialogActionsUtilityClass,et)},DialogActionsRoot=styled$1("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,!nt.disableSpacing&&et.spacing]}})(({ownerState:tt})=>_extends$u({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!tt.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),DialogActions=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDialogActions"}),{className:it,disableSpacing:ot=!1}=rt,at=_objectWithoutPropertiesLoose$m(rt,_excluded$1g),st=_extends$u({},rt,{disableSpacing:ot}),lt=useUtilityClasses$K(st);return jsxRuntimeExports.jsx(DialogActionsRoot,_extends$u({className:clsx$3(lt.root,it),ownerState:st,ref:nt},at))}),DialogActions$1=DialogActions;function getDialogContentUtilityClass(tt){return generateUtilityClass("MuiDialogContent",tt)}generateUtilityClasses("MuiDialogContent",["root","dividers"]);const dialogTitleClasses=generateUtilityClasses("MuiDialogTitle",["root"]),dialogTitleClasses$1=dialogTitleClasses,_excluded$1f=["className","dividers"],useUtilityClasses$J=tt=>{const{classes:et,dividers:nt}=tt;return composeClasses({root:["root",nt&&"dividers"]},getDialogContentUtilityClass,et)},DialogContentRoot=styled$1("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.dividers&&et.dividers]}})(({theme:tt,ownerState:et})=>_extends$u({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},et.dividers?{padding:"16px 24px",borderTop:`1px solid ${(tt.vars||tt).palette.divider}`,borderBottom:`1px solid ${(tt.vars||tt).palette.divider}`}:{[`.${dialogTitleClasses$1.root} + &`]:{paddingTop:0}})),DialogContent=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDialogContent"}),{className:it,dividers:ot=!1}=rt,at=_objectWithoutPropertiesLoose$m(rt,_excluded$1f),st=_extends$u({},rt,{dividers:ot}),lt=useUtilityClasses$J(st);return jsxRuntimeExports.jsx(DialogContentRoot,_extends$u({className:clsx$3(lt.root,it),ownerState:st,ref:nt},at))}),DialogContent$1=DialogContent;function getDividerUtilityClass(tt){return generateUtilityClass("MuiDivider",tt)}const dividerClasses=generateUtilityClasses("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),_excluded$1e=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],useUtilityClasses$I=tt=>{const{absolute:et,children:nt,classes:rt,flexItem:it,light:ot,orientation:at,textAlign:st,variant:lt}=tt;return composeClasses({root:["root",et&&"absolute",lt,ot&&"light",at==="vertical"&&"vertical",it&&"flexItem",nt&&"withChildren",nt&&at==="vertical"&&"withChildrenVertical",st==="right"&&at!=="vertical"&&"textAlignRight",st==="left"&&at!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",at==="vertical"&&"wrapperVertical"]},getDividerUtilityClass,rt)},DividerRoot=styled$1("div",{name:"MuiDivider",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.absolute&&et.absolute,et[nt.variant],nt.light&&et.light,nt.orientation==="vertical"&&et.vertical,nt.flexItem&&et.flexItem,nt.children&&et.withChildren,nt.children&&nt.orientation==="vertical"&&et.withChildrenVertical,nt.textAlign==="right"&&nt.orientation!=="vertical"&&et.textAlignRight,nt.textAlign==="left"&&nt.orientation!=="vertical"&&et.textAlignLeft]}})(({theme:tt,ownerState:et})=>_extends$u({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(tt.vars||tt).palette.divider,borderBottomWidth:"thin"},et.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},et.light&&{borderColor:tt.vars?`rgba(${tt.vars.palette.dividerChannel} / 0.08)`:alpha$1(tt.palette.divider,.08)},et.variant==="inset"&&{marginLeft:72},et.variant==="middle"&&et.orientation==="horizontal"&&{marginLeft:tt.spacing(2),marginRight:tt.spacing(2)},et.variant==="middle"&&et.orientation==="vertical"&&{marginTop:tt.spacing(1),marginBottom:tt.spacing(1)},et.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},et.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:tt})=>_extends$u({},tt.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:tt,ownerState:et})=>_extends$u({},et.children&&et.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(tt.vars||tt).palette.divider}`}}),({theme:tt,ownerState:et})=>_extends$u({},et.children&&et.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(tt.vars||tt).palette.divider}`}}),({ownerState:tt})=>_extends$u({},tt.textAlign==="right"&&tt.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},tt.textAlign==="left"&&tt.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),DividerWrapper=styled$1("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.wrapper,nt.orientation==="vertical"&&et.wrapperVertical]}})(({theme:tt,ownerState:et})=>_extends$u({display:"inline-block",paddingLeft:`calc(${tt.spacing(1)} * 1.2)`,paddingRight:`calc(${tt.spacing(1)} * 1.2)`},et.orientation==="vertical"&&{paddingTop:`calc(${tt.spacing(1)} * 1.2)`,paddingBottom:`calc(${tt.spacing(1)} * 1.2)`})),Divider$2=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDivider"}),{absolute:it=!1,children:ot,className:at,component:st=ot?"div":"hr",flexItem:lt=!1,light:ct=!1,orientation:ut="horizontal",role:ht=st!=="hr"?"separator":void 0,textAlign:dt="center",variant:pt="fullWidth"}=rt,mt=_objectWithoutPropertiesLoose$m(rt,_excluded$1e),gt=_extends$u({},rt,{absolute:it,component:st,flexItem:lt,light:ct,orientation:ut,role:ht,textAlign:dt,variant:pt}),yt=useUtilityClasses$I(gt);return jsxRuntimeExports.jsx(DividerRoot,_extends$u({as:st,className:clsx$3(yt.root,at),role:ht,ref:nt,ownerState:gt},mt,{children:ot?jsxRuntimeExports.jsx(DividerWrapper,{className:yt.wrapper,ownerState:gt,children:ot}):null}))});Divider$2.muiSkipListHighlight=!0;const Divider$3=Divider$2,_excluded$1d=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function getTranslateValue(tt,et,nt){const rt=et.getBoundingClientRect(),it=nt&&nt.getBoundingClientRect(),ot=ownerWindow(et);let at;if(et.fakeTransform)at=et.fakeTransform;else{const ct=ot.getComputedStyle(et);at=ct.getPropertyValue("-webkit-transform")||ct.getPropertyValue("transform")}let st=0,lt=0;if(at&&at!=="none"&&typeof at=="string"){const ct=at.split("(")[1].split(")")[0].split(",");st=parseInt(ct[4],10),lt=parseInt(ct[5],10)}return tt==="left"?it?`translateX(${it.right+st-rt.left}px)`:`translateX(${ot.innerWidth+st-rt.left}px)`:tt==="right"?it?`translateX(-${rt.right-it.left-st}px)`:`translateX(-${rt.left+rt.width-st}px)`:tt==="up"?it?`translateY(${it.bottom+lt-rt.top}px)`:`translateY(${ot.innerHeight+lt-rt.top}px)`:it?`translateY(-${rt.top-it.top+rt.height-lt}px)`:`translateY(-${rt.top+rt.height-lt}px)`}function resolveContainer(tt){return typeof tt=="function"?tt():tt}function setTranslateValue(tt,et,nt){const rt=resolveContainer(nt),it=getTranslateValue(tt,et,rt);it&&(et.style.webkitTransform=it,et.style.transform=it)}const Slide=reactExports.forwardRef(function(et,nt){const rt=useTheme(),it={enter:rt.transitions.easing.easeOut,exit:rt.transitions.easing.sharp},ot={enter:rt.transitions.duration.enteringScreen,exit:rt.transitions.duration.leavingScreen},{addEndListener:at,appear:st=!0,children:lt,container:ct,direction:ut="down",easing:ht=it,in:dt,onEnter:pt,onEntered:mt,onEntering:gt,onExit:yt,onExited:bt,onExiting:vt,style:xt,timeout:kt=ot,TransitionComponent:St=Transition$2}=et,Tt=_objectWithoutPropertiesLoose$m(et,_excluded$1d),At=reactExports.useRef(null),Et=useForkRef(lt.ref,At,nt),$t=zt=>Ft=>{zt&&(Ft===void 0?zt(At.current):zt(At.current,Ft))},Dt=$t((zt,Ft)=>{setTranslateValue(ut,zt,ct),reflow(zt),pt&&pt(zt,Ft)}),jt=$t((zt,Ft)=>{const Nt=getTransitionProps({timeout:kt,style:xt,easing:ht},{mode:"enter"});zt.style.webkitTransition=rt.transitions.create("-webkit-transform",_extends$u({},Nt)),zt.style.transition=rt.transitions.create("transform",_extends$u({},Nt)),zt.style.webkitTransform="none",zt.style.transform="none",gt&>(zt,Ft)}),Pt=$t(mt),Ct=$t(vt),wt=$t(zt=>{const Ft=getTransitionProps({timeout:kt,style:xt,easing:ht},{mode:"exit"});zt.style.webkitTransition=rt.transitions.create("-webkit-transform",Ft),zt.style.transition=rt.transitions.create("transform",Ft),setTranslateValue(ut,zt,ct),yt&&yt(zt)}),It=$t(zt=>{zt.style.webkitTransition="",zt.style.transition="",bt&&bt(zt)}),Ot=zt=>{at&&at(At.current,zt)},Wt=reactExports.useCallback(()=>{At.current&&setTranslateValue(ut,At.current,ct)},[ut,ct]);return reactExports.useEffect(()=>{if(dt||ut==="down"||ut==="right")return;const zt=debounce$5(()=>{At.current&&setTranslateValue(ut,At.current,ct)}),Ft=ownerWindow(At.current);return Ft.addEventListener("resize",zt),()=>{zt.clear(),Ft.removeEventListener("resize",zt)}},[ut,dt,ct]),reactExports.useEffect(()=>{dt||Wt()},[dt,Wt]),jsxRuntimeExports.jsx(St,_extends$u({nodeRef:At,onEnter:Dt,onEntered:Pt,onEntering:jt,onExit:wt,onExited:It,onExiting:Ct,addEndListener:Ot,appear:st,in:dt,timeout:kt},Tt,{children:(zt,Ft)=>reactExports.cloneElement(lt,_extends$u({ref:Et,style:_extends$u({visibility:zt==="exited"&&!dt?"hidden":void 0},xt,lt.props.style)},Ft))}))}),Slide$1=Slide,_excluded$1c=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],useUtilityClasses$H=tt=>{const{classes:et,disableUnderline:nt}=tt,it=composeClasses({root:["root",!nt&&"underline"],input:["input"]},getFilledInputUtilityClass,et);return _extends$u({},et,it)},FilledInputRoot=styled$1(InputBaseRoot,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[...rootOverridesResolver(tt,et),!nt.disableUnderline&&et.underline]}})(({theme:tt,ownerState:et})=>{var nt;const rt=tt.palette.mode==="light",it=rt?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",ot=rt?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",at=rt?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",st=rt?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return _extends$u({position:"relative",backgroundColor:tt.vars?tt.vars.palette.FilledInput.bg:ot,borderTopLeftRadius:(tt.vars||tt).shape.borderRadius,borderTopRightRadius:(tt.vars||tt).shape.borderRadius,transition:tt.transitions.create("background-color",{duration:tt.transitions.duration.shorter,easing:tt.transitions.easing.easeOut}),"&:hover":{backgroundColor:tt.vars?tt.vars.palette.FilledInput.hoverBg:at,"@media (hover: none)":{backgroundColor:tt.vars?tt.vars.palette.FilledInput.bg:ot}},[`&.${filledInputClasses$1.focused}`]:{backgroundColor:tt.vars?tt.vars.palette.FilledInput.bg:ot},[`&.${filledInputClasses$1.disabled}`]:{backgroundColor:tt.vars?tt.vars.palette.FilledInput.disabledBg:st}},!et.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(nt=(tt.vars||tt).palette[et.color||"primary"])==null?void 0:nt.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:tt.transitions.create("transform",{duration:tt.transitions.duration.shorter,easing:tt.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${filledInputClasses$1.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${filledInputClasses$1.error}`]:{"&:before, &:after":{borderBottomColor:(tt.vars||tt).palette.error.main}},"&:before":{borderBottom:`1px solid ${tt.vars?`rgba(${tt.vars.palette.common.onBackgroundChannel} / ${tt.vars.opacity.inputUnderline})`:it}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:tt.transitions.create("border-bottom-color",{duration:tt.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${filledInputClasses$1.disabled}, .${filledInputClasses$1.error}):before`]:{borderBottom:`1px solid ${(tt.vars||tt).palette.text.primary}`},[`&.${filledInputClasses$1.disabled}:before`]:{borderBottomStyle:"dotted"}},et.startAdornment&&{paddingLeft:12},et.endAdornment&&{paddingRight:12},et.multiline&&_extends$u({padding:"25px 12px 8px"},et.size==="small"&&{paddingTop:21,paddingBottom:4},et.hiddenLabel&&{paddingTop:16,paddingBottom:17}))}),FilledInputInput=styled$1(InputBaseComponent,{name:"MuiFilledInput",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:tt,ownerState:et})=>_extends$u({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!tt.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:tt.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:tt.palette.mode==="light"?null:"#fff",caretColor:tt.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},tt.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[tt.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},et.size==="small"&&{paddingTop:21,paddingBottom:4},et.hiddenLabel&&{paddingTop:16,paddingBottom:17},et.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0},et.startAdornment&&{paddingLeft:0},et.endAdornment&&{paddingRight:0},et.hiddenLabel&&et.size==="small"&&{paddingTop:8,paddingBottom:9})),FilledInput=reactExports.forwardRef(function(et,nt){var rt,it,ot,at;const st=useThemeProps({props:et,name:"MuiFilledInput"}),{components:lt={},componentsProps:ct,fullWidth:ut=!1,inputComponent:ht="input",multiline:dt=!1,slotProps:pt,slots:mt={},type:gt="text"}=st,yt=_objectWithoutPropertiesLoose$m(st,_excluded$1c),bt=_extends$u({},st,{fullWidth:ut,inputComponent:ht,multiline:dt,type:gt}),vt=useUtilityClasses$H(st),xt={root:{ownerState:bt},input:{ownerState:bt}},kt=pt??ct?deepmerge$1(pt??ct,xt):xt,St=(rt=(it=mt.root)!=null?it:lt.Root)!=null?rt:FilledInputRoot,Tt=(ot=(at=mt.input)!=null?at:lt.Input)!=null?ot:FilledInputInput;return jsxRuntimeExports.jsx(InputBase$1,_extends$u({slots:{root:St,input:Tt},componentsProps:kt,fullWidth:ut,inputComponent:ht,multiline:dt,ref:nt,type:gt},yt,{classes:vt}))});FilledInput.muiName="Input";const FilledInput$1=FilledInput;function getFormControlUtilityClasses(tt){return generateUtilityClass("MuiFormControl",tt)}generateUtilityClasses("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const _excluded$1b=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],useUtilityClasses$G=tt=>{const{classes:et,margin:nt,fullWidth:rt}=tt,it={root:["root",nt!=="none"&&`margin${capitalize(nt)}`,rt&&"fullWidth"]};return composeClasses(it,getFormControlUtilityClasses,et)},FormControlRoot=styled$1("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:tt},et)=>_extends$u({},et.root,et[`margin${capitalize(tt.margin)}`],tt.fullWidth&&et.fullWidth)})(({ownerState:tt})=>_extends$u({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},tt.margin==="normal"&&{marginTop:16,marginBottom:8},tt.margin==="dense"&&{marginTop:8,marginBottom:4},tt.fullWidth&&{width:"100%"})),FormControl=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiFormControl"}),{children:it,className:ot,color:at="primary",component:st="div",disabled:lt=!1,error:ct=!1,focused:ut,fullWidth:ht=!1,hiddenLabel:dt=!1,margin:pt="none",required:mt=!1,size:gt="medium",variant:yt="outlined"}=rt,bt=_objectWithoutPropertiesLoose$m(rt,_excluded$1b),vt=_extends$u({},rt,{color:at,component:st,disabled:lt,error:ct,fullWidth:ht,hiddenLabel:dt,margin:pt,required:mt,size:gt,variant:yt}),xt=useUtilityClasses$G(vt),[kt,St]=reactExports.useState(()=>{let Ct=!1;return it&&reactExports.Children.forEach(it,wt=>{if(!isMuiElement(wt,["Input","Select"]))return;const It=isMuiElement(wt,["Select"])?wt.props.input:wt;It&&isAdornedStart(It.props)&&(Ct=!0)}),Ct}),[Tt,At]=reactExports.useState(()=>{let Ct=!1;return it&&reactExports.Children.forEach(it,wt=>{isMuiElement(wt,["Input","Select"])&&(isFilled(wt.props,!0)||isFilled(wt.props.inputProps,!0))&&(Ct=!0)}),Ct}),[Et,$t]=reactExports.useState(!1);lt&&Et&&$t(!1);const Dt=ut!==void 0&&!lt?ut:Et;let jt;const Pt=reactExports.useMemo(()=>({adornedStart:kt,setAdornedStart:St,color:at,disabled:lt,error:ct,filled:Tt,focused:Dt,fullWidth:ht,hiddenLabel:dt,size:gt,onBlur:()=>{$t(!1)},onEmpty:()=>{At(!1)},onFilled:()=>{At(!0)},onFocus:()=>{$t(!0)},registerEffect:jt,required:mt,variant:yt}),[kt,at,lt,ct,Tt,Dt,ht,dt,jt,mt,gt,yt]);return jsxRuntimeExports.jsx(FormControlContext$1.Provider,{value:Pt,children:jsxRuntimeExports.jsx(FormControlRoot,_extends$u({as:st,ownerState:vt,className:clsx$3(xt.root,ot),ref:nt},bt,{children:it}))})}),FormControl$1=FormControl,Stack$4=createStack({createStyledComponent:styled$1("div",{name:"MuiStack",slot:"Root",overridesResolver:(tt,et)=>et.root}),useThemeProps:tt=>useThemeProps({props:tt,name:"MuiStack"})}),Stack$5=Stack$4;function getFormHelperTextUtilityClasses(tt){return generateUtilityClass("MuiFormHelperText",tt)}const formHelperTextClasses=generateUtilityClasses("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),formHelperTextClasses$1=formHelperTextClasses;var _span$3;const _excluded$1a=["children","className","component","disabled","error","filled","focused","margin","required","variant"],useUtilityClasses$F=tt=>{const{classes:et,contained:nt,size:rt,disabled:it,error:ot,filled:at,focused:st,required:lt}=tt,ct={root:["root",it&&"disabled",ot&&"error",rt&&`size${capitalize(rt)}`,nt&&"contained",st&&"focused",at&&"filled",lt&&"required"]};return composeClasses(ct,getFormHelperTextUtilityClasses,et)},FormHelperTextRoot=styled$1("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.size&&et[`size${capitalize(nt.size)}`],nt.contained&&et.contained,nt.filled&&et.filled]}})(({theme:tt,ownerState:et})=>_extends$u({color:(tt.vars||tt).palette.text.secondary},tt.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${formHelperTextClasses$1.disabled}`]:{color:(tt.vars||tt).palette.text.disabled},[`&.${formHelperTextClasses$1.error}`]:{color:(tt.vars||tt).palette.error.main}},et.size==="small"&&{marginTop:4},et.contained&&{marginLeft:14,marginRight:14})),FormHelperText=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiFormHelperText"}),{children:it,className:ot,component:at="p"}=rt,st=_objectWithoutPropertiesLoose$m(rt,_excluded$1a),lt=useFormControl(),ct=formControlState({props:rt,muiFormControl:lt,states:["variant","size","disabled","error","filled","focused","required"]}),ut=_extends$u({},rt,{component:at,contained:ct.variant==="filled"||ct.variant==="outlined",variant:ct.variant,size:ct.size,disabled:ct.disabled,error:ct.error,filled:ct.filled,focused:ct.focused,required:ct.required}),ht=useUtilityClasses$F(ut);return jsxRuntimeExports.jsx(FormHelperTextRoot,_extends$u({as:at,ownerState:ut,className:clsx$3(ht.root,ot),ref:nt},st,{children:it===" "?_span$3||(_span$3=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"​"})):it}))}),FormHelperText$1=FormHelperText;function getFormLabelUtilityClasses(tt){return generateUtilityClass("MuiFormLabel",tt)}const formLabelClasses=generateUtilityClasses("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),formLabelClasses$1=formLabelClasses,_excluded$19=["children","className","color","component","disabled","error","filled","focused","required"],useUtilityClasses$E=tt=>{const{classes:et,color:nt,focused:rt,disabled:it,error:ot,filled:at,required:st}=tt,lt={root:["root",`color${capitalize(nt)}`,it&&"disabled",ot&&"error",at&&"filled",rt&&"focused",st&&"required"],asterisk:["asterisk",ot&&"error"]};return composeClasses(lt,getFormLabelUtilityClasses,et)},FormLabelRoot=styled$1("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:tt},et)=>_extends$u({},et.root,tt.color==="secondary"&&et.colorSecondary,tt.filled&&et.filled)})(({theme:tt,ownerState:et})=>_extends$u({color:(tt.vars||tt).palette.text.secondary},tt.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${formLabelClasses$1.focused}`]:{color:(tt.vars||tt).palette[et.color].main},[`&.${formLabelClasses$1.disabled}`]:{color:(tt.vars||tt).palette.text.disabled},[`&.${formLabelClasses$1.error}`]:{color:(tt.vars||tt).palette.error.main}})),AsteriskComponent=styled$1("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(tt,et)=>et.asterisk})(({theme:tt})=>({[`&.${formLabelClasses$1.error}`]:{color:(tt.vars||tt).palette.error.main}})),FormLabel=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiFormLabel"}),{children:it,className:ot,component:at="label"}=rt,st=_objectWithoutPropertiesLoose$m(rt,_excluded$19),lt=useFormControl(),ct=formControlState({props:rt,muiFormControl:lt,states:["color","required","focused","disabled","error","filled"]}),ut=_extends$u({},rt,{color:ct.color||"primary",component:at,disabled:ct.disabled,error:ct.error,filled:ct.filled,focused:ct.focused,required:ct.required}),ht=useUtilityClasses$E(ut);return jsxRuntimeExports.jsxs(FormLabelRoot,_extends$u({as:at,ownerState:ut,className:clsx$3(ht.root,ot),ref:nt},st,{children:[it,ct.required&&jsxRuntimeExports.jsxs(AsteriskComponent,{ownerState:ut,"aria-hidden":!0,className:ht.asterisk,children:[" ","*"]})]}))}),FormLabel$1=FormLabel,_excluded$18=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function getScale(tt){return`scale(${tt}, ${tt**2})`}const styles$3={entering:{opacity:1,transform:getScale(1)},entered:{opacity:1,transform:"none"}},isWebKit154=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Grow=reactExports.forwardRef(function(et,nt){const{addEndListener:rt,appear:it=!0,children:ot,easing:at,in:st,onEnter:lt,onEntered:ct,onEntering:ut,onExit:ht,onExited:dt,onExiting:pt,style:mt,timeout:gt="auto",TransitionComponent:yt=Transition$2}=et,bt=_objectWithoutPropertiesLoose$m(et,_excluded$18),vt=reactExports.useRef(),xt=reactExports.useRef(),kt=useTheme(),St=reactExports.useRef(null),Tt=useForkRef(St,ot.ref,nt),At=It=>Ot=>{if(It){const Wt=St.current;Ot===void 0?It(Wt):It(Wt,Ot)}},Et=At(ut),$t=At((It,Ot)=>{reflow(It);const{duration:Wt,delay:zt,easing:Ft}=getTransitionProps({style:mt,timeout:gt,easing:at},{mode:"enter"});let Nt;gt==="auto"?(Nt=kt.transitions.getAutoHeightDuration(It.clientHeight),xt.current=Nt):Nt=Wt,It.style.transition=[kt.transitions.create("opacity",{duration:Nt,delay:zt}),kt.transitions.create("transform",{duration:isWebKit154?Nt:Nt*.666,delay:zt,easing:Ft})].join(","),lt&<(It,Ot)}),Dt=At(ct),jt=At(pt),Pt=At(It=>{const{duration:Ot,delay:Wt,easing:zt}=getTransitionProps({style:mt,timeout:gt,easing:at},{mode:"exit"});let Ft;gt==="auto"?(Ft=kt.transitions.getAutoHeightDuration(It.clientHeight),xt.current=Ft):Ft=Ot,It.style.transition=[kt.transitions.create("opacity",{duration:Ft,delay:Wt}),kt.transitions.create("transform",{duration:isWebKit154?Ft:Ft*.666,delay:isWebKit154?Wt:Wt||Ft*.333,easing:zt})].join(","),It.style.opacity=0,It.style.transform=getScale(.75),ht&&ht(It)}),Ct=At(dt),wt=It=>{gt==="auto"&&(vt.current=setTimeout(It,xt.current||0)),rt&&rt(St.current,It)};return reactExports.useEffect(()=>()=>{clearTimeout(vt.current)},[]),jsxRuntimeExports.jsx(yt,_extends$u({appear:it,in:st,nodeRef:St,onEnter:$t,onEntered:Dt,onEntering:Et,onExit:Pt,onExited:Ct,onExiting:jt,addEndListener:wt,timeout:gt==="auto"?null:gt},bt,{children:(It,Ot)=>reactExports.cloneElement(ot,_extends$u({style:_extends$u({opacity:0,transform:getScale(.75),visibility:It==="exited"&&!st?"hidden":void 0},styles$3[It],mt,ot.props.style),ref:Tt},Ot))}))});Grow.muiSupportAuto=!0;const Grow$1=Grow;function useMediaQueryOld(tt,et,nt,rt,it){const[ot,at]=reactExports.useState(()=>it&&nt?nt(tt).matches:rt?rt(tt).matches:et);return useEnhancedEffect$1(()=>{let st=!0;if(!nt)return;const lt=nt(tt),ct=()=>{st&&at(lt.matches)};return ct(),lt.addListener(ct),()=>{st=!1,lt.removeListener(ct)}},[tt,nt]),ot}const maybeReactUseSyncExternalStore=React$2["useSyncExternalStore"];function useMediaQueryNew(tt,et,nt,rt,it){const ot=reactExports.useCallback(()=>et,[et]),at=reactExports.useMemo(()=>{if(it&&nt)return()=>nt(tt).matches;if(rt!==null){const{matches:ut}=rt(tt);return()=>ut}return ot},[ot,tt,rt,it,nt]),[st,lt]=reactExports.useMemo(()=>{if(nt===null)return[ot,()=>()=>{}];const ut=nt(tt);return[()=>ut.matches,ht=>(ut.addListener(ht),()=>{ut.removeListener(ht)})]},[ot,nt,tt]);return maybeReactUseSyncExternalStore(lt,st,at)}function useMediaQuery(tt,et={}){const nt=useTheme$3(),rt=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:it=!1,matchMedia:ot=rt?window.matchMedia:null,ssrMatchMedia:at=null,noSsr:st=!1}=getThemeProps({name:"MuiUseMediaQuery",props:et,theme:nt});let lt=typeof tt=="function"?tt(nt):tt;return lt=lt.replace(/^@media( ?)/m,""),(maybeReactUseSyncExternalStore!==void 0?useMediaQueryNew:useMediaQueryOld)(lt,it,ot,at,st)}const _excluded$17=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],useUtilityClasses$D=tt=>{const{classes:et,disableUnderline:nt}=tt,it=composeClasses({root:["root",!nt&&"underline"],input:["input"]},getInputUtilityClass,et);return _extends$u({},et,it)},InputRoot=styled$1(InputBaseRoot,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiInput",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[...rootOverridesResolver(tt,et),!nt.disableUnderline&&et.underline]}})(({theme:tt,ownerState:et})=>{let rt=tt.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return tt.vars&&(rt=`rgba(${tt.vars.palette.common.onBackgroundChannel} / ${tt.vars.opacity.inputUnderline})`),_extends$u({position:"relative"},et.formControl&&{"label + &":{marginTop:16}},!et.disableUnderline&&{"&:after":{borderBottom:`2px solid ${(tt.vars||tt).palette[et.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:tt.transitions.create("transform",{duration:tt.transitions.duration.shorter,easing:tt.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${inputClasses$1.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${inputClasses$1.error}`]:{"&:before, &:after":{borderBottomColor:(tt.vars||tt).palette.error.main}},"&:before":{borderBottom:`1px solid ${rt}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:tt.transitions.create("border-bottom-color",{duration:tt.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${inputClasses$1.disabled}, .${inputClasses$1.error}):before`]:{borderBottom:`2px solid ${(tt.vars||tt).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${rt}`}},[`&.${inputClasses$1.disabled}:before`]:{borderBottomStyle:"dotted"}})}),InputInput=styled$1(InputBaseComponent,{name:"MuiInput",slot:"Input",overridesResolver:inputOverridesResolver})({}),Input$2=reactExports.forwardRef(function(et,nt){var rt,it,ot,at;const st=useThemeProps({props:et,name:"MuiInput"}),{disableUnderline:lt,components:ct={},componentsProps:ut,fullWidth:ht=!1,inputComponent:dt="input",multiline:pt=!1,slotProps:mt,slots:gt={},type:yt="text"}=st,bt=_objectWithoutPropertiesLoose$m(st,_excluded$17),vt=useUtilityClasses$D(st),kt={root:{ownerState:{disableUnderline:lt}}},St=mt??ut?deepmerge$1(mt??ut,kt):kt,Tt=(rt=(it=gt.root)!=null?it:ct.Root)!=null?rt:InputRoot,At=(ot=(at=gt.input)!=null?at:ct.Input)!=null?ot:InputInput;return jsxRuntimeExports.jsx(InputBase$1,_extends$u({slots:{root:Tt,input:At},slotProps:St,fullWidth:ht,inputComponent:dt,multiline:pt,ref:nt,type:yt},bt,{classes:vt}))});Input$2.muiName="Input";const Input$3=Input$2;function getInputAdornmentUtilityClass(tt){return generateUtilityClass("MuiInputAdornment",tt)}const inputAdornmentClasses=generateUtilityClasses("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),inputAdornmentClasses$1=inputAdornmentClasses;var _span$2;const _excluded$16=["children","className","component","disablePointerEvents","disableTypography","position","variant"],overridesResolver$3=(tt,et)=>{const{ownerState:nt}=tt;return[et.root,et[`position${capitalize(nt.position)}`],nt.disablePointerEvents===!0&&et.disablePointerEvents,et[nt.variant]]},useUtilityClasses$C=tt=>{const{classes:et,disablePointerEvents:nt,hiddenLabel:rt,position:it,size:ot,variant:at}=tt,st={root:["root",nt&&"disablePointerEvents",it&&`position${capitalize(it)}`,at,rt&&"hiddenLabel",ot&&`size${capitalize(ot)}`]};return composeClasses(st,getInputAdornmentUtilityClass,et)},InputAdornmentRoot=styled$1("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:overridesResolver$3})(({theme:tt,ownerState:et})=>_extends$u({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(tt.vars||tt).palette.action.active},et.variant==="filled"&&{[`&.${inputAdornmentClasses$1.positionStart}&:not(.${inputAdornmentClasses$1.hiddenLabel})`]:{marginTop:16}},et.position==="start"&&{marginRight:8},et.position==="end"&&{marginLeft:8},et.disablePointerEvents===!0&&{pointerEvents:"none"})),InputAdornment=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiInputAdornment"}),{children:it,className:ot,component:at="div",disablePointerEvents:st=!1,disableTypography:lt=!1,position:ct,variant:ut}=rt,ht=_objectWithoutPropertiesLoose$m(rt,_excluded$16),dt=useFormControl()||{};let pt=ut;ut&&dt.variant,dt&&!pt&&(pt=dt.variant);const mt=_extends$u({},rt,{hiddenLabel:dt.hiddenLabel,size:dt.size,disablePointerEvents:st,position:ct,variant:pt}),gt=useUtilityClasses$C(mt);return jsxRuntimeExports.jsx(FormControlContext$1.Provider,{value:null,children:jsxRuntimeExports.jsx(InputAdornmentRoot,_extends$u({as:at,ownerState:mt,className:clsx$3(gt.root,ot),ref:nt},ht,{children:typeof it=="string"&&!lt?jsxRuntimeExports.jsx(Typography$1,{color:"text.secondary",children:it}):jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[ct==="start"?_span$2||(_span$2=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"​"})):null,it]})}))})}),MuiInputAdornment=InputAdornment;function getInputLabelUtilityClasses(tt){return generateUtilityClass("MuiInputLabel",tt)}generateUtilityClasses("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const _excluded$15=["disableAnimation","margin","shrink","variant","className"],useUtilityClasses$B=tt=>{const{classes:et,formControl:nt,size:rt,shrink:it,disableAnimation:ot,variant:at,required:st}=tt,lt={root:["root",nt&&"formControl",!ot&&"animated",it&&"shrink",rt&&rt!=="normal"&&`size${capitalize(rt)}`,at],asterisk:[st&&"asterisk"]},ct=composeClasses(lt,getInputLabelUtilityClasses,et);return _extends$u({},et,ct)},InputLabelRoot=styled$1(FormLabel$1,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[{[`& .${formLabelClasses$1.asterisk}`]:et.asterisk},et.root,nt.formControl&&et.formControl,nt.size==="small"&&et.sizeSmall,nt.shrink&&et.shrink,!nt.disableAnimation&&et.animated,et[nt.variant]]}})(({theme:tt,ownerState:et})=>_extends$u({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},et.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},et.size==="small"&&{transform:"translate(0, 17px) scale(1)"},et.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!et.disableAnimation&&{transition:tt.transitions.create(["color","transform","max-width"],{duration:tt.transitions.duration.shorter,easing:tt.transitions.easing.easeOut})},et.variant==="filled"&&_extends$u({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},et.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},et.shrink&&_extends$u({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},et.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),et.variant==="outlined"&&_extends$u({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},et.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},et.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),InputLabel=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({name:"MuiInputLabel",props:et}),{disableAnimation:it=!1,shrink:ot,className:at}=rt,st=_objectWithoutPropertiesLoose$m(rt,_excluded$15),lt=useFormControl();let ct=ot;typeof ct>"u"&<&&(ct=lt.filled||lt.focused||lt.adornedStart);const ut=formControlState({props:rt,muiFormControl:lt,states:["size","variant","required"]}),ht=_extends$u({},rt,{disableAnimation:it,formControl:lt,shrink:ct,size:ut.size,variant:ut.variant,required:ut.required}),dt=useUtilityClasses$B(ht);return jsxRuntimeExports.jsx(InputLabelRoot,_extends$u({"data-shrink":ct,ownerState:ht,ref:nt,className:clsx$3(dt.root,at)},st,{classes:dt}))}),InputLabel$1=InputLabel,ListContext=reactExports.createContext({}),ListContext$1=ListContext;function getListUtilityClass(tt){return generateUtilityClass("MuiList",tt)}generateUtilityClasses("MuiList",["root","padding","dense","subheader"]);const _excluded$14=["children","className","component","dense","disablePadding","subheader"],useUtilityClasses$A=tt=>{const{classes:et,disablePadding:nt,dense:rt,subheader:it}=tt;return composeClasses({root:["root",!nt&&"padding",rt&&"dense",it&&"subheader"]},getListUtilityClass,et)},ListRoot=styled$1("ul",{name:"MuiList",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,!nt.disablePadding&&et.padding,nt.dense&&et.dense,nt.subheader&&et.subheader]}})(({ownerState:tt})=>_extends$u({listStyle:"none",margin:0,padding:0,position:"relative"},!tt.disablePadding&&{paddingTop:8,paddingBottom:8},tt.subheader&&{paddingTop:0})),List=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiList"}),{children:it,className:ot,component:at="ul",dense:st=!1,disablePadding:lt=!1,subheader:ct}=rt,ut=_objectWithoutPropertiesLoose$m(rt,_excluded$14),ht=reactExports.useMemo(()=>({dense:st}),[st]),dt=_extends$u({},rt,{component:at,dense:st,disablePadding:lt}),pt=useUtilityClasses$A(dt);return jsxRuntimeExports.jsx(ListContext$1.Provider,{value:ht,children:jsxRuntimeExports.jsxs(ListRoot,_extends$u({as:at,className:clsx$3(pt.root,ot),ref:nt,ownerState:dt},ut,{children:[ct,it]}))})}),List$1=List;function getListItemUtilityClass(tt){return generateUtilityClass("MuiListItem",tt)}const listItemClasses=generateUtilityClasses("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),listItemClasses$1=listItemClasses,listItemButtonClasses=generateUtilityClasses("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),listItemButtonClasses$1=listItemButtonClasses;function getListItemSecondaryActionClassesUtilityClass(tt){return generateUtilityClass("MuiListItemSecondaryAction",tt)}generateUtilityClasses("MuiListItemSecondaryAction",["root","disableGutters"]);const _excluded$13=["className"],useUtilityClasses$z=tt=>{const{disableGutters:et,classes:nt}=tt;return composeClasses({root:["root",et&&"disableGutters"]},getListItemSecondaryActionClassesUtilityClass,nt)},ListItemSecondaryActionRoot=styled$1("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.disableGutters&&et.disableGutters]}})(({ownerState:tt})=>_extends$u({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},tt.disableGutters&&{right:0})),ListItemSecondaryAction=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiListItemSecondaryAction"}),{className:it}=rt,ot=_objectWithoutPropertiesLoose$m(rt,_excluded$13),at=reactExports.useContext(ListContext$1),st=_extends$u({},rt,{disableGutters:at.disableGutters}),lt=useUtilityClasses$z(st);return jsxRuntimeExports.jsx(ListItemSecondaryActionRoot,_extends$u({className:clsx$3(lt.root,it),ownerState:st,ref:nt},ot))});ListItemSecondaryAction.muiName="ListItemSecondaryAction";const ListItemSecondaryAction$1=ListItemSecondaryAction,_excluded$12=["className"],_excluded2$f=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],overridesResolver$2=(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.dense&&et.dense,nt.alignItems==="flex-start"&&et.alignItemsFlexStart,nt.divider&&et.divider,!nt.disableGutters&&et.gutters,!nt.disablePadding&&et.padding,nt.button&&et.button,nt.hasSecondaryAction&&et.secondaryAction]},useUtilityClasses$y=tt=>{const{alignItems:et,button:nt,classes:rt,dense:it,disabled:ot,disableGutters:at,disablePadding:st,divider:lt,hasSecondaryAction:ct,selected:ut}=tt;return composeClasses({root:["root",it&&"dense",!at&&"gutters",!st&&"padding",lt&&"divider",ot&&"disabled",nt&&"button",et==="flex-start"&&"alignItemsFlexStart",ct&&"secondaryAction",ut&&"selected"],container:["container"]},getListItemUtilityClass,rt)},ListItemRoot=styled$1("div",{name:"MuiListItem",slot:"Root",overridesResolver:overridesResolver$2})(({theme:tt,ownerState:et})=>_extends$u({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!et.disablePadding&&_extends$u({paddingTop:8,paddingBottom:8},et.dense&&{paddingTop:4,paddingBottom:4},!et.disableGutters&&{paddingLeft:16,paddingRight:16},!!et.secondaryAction&&{paddingRight:48}),!!et.secondaryAction&&{[`& > .${listItemButtonClasses$1.root}`]:{paddingRight:48}},{[`&.${listItemClasses$1.focusVisible}`]:{backgroundColor:(tt.vars||tt).palette.action.focus},[`&.${listItemClasses$1.selected}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity),[`&.${listItemClasses$1.focusVisible}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.focusOpacity}))`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity+tt.palette.action.focusOpacity)}},[`&.${listItemClasses$1.disabled}`]:{opacity:(tt.vars||tt).palette.action.disabledOpacity}},et.alignItems==="flex-start"&&{alignItems:"flex-start"},et.divider&&{borderBottom:`1px solid ${(tt.vars||tt).palette.divider}`,backgroundClip:"padding-box"},et.button&&{transition:tt.transitions.create("background-color",{duration:tt.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(tt.vars||tt).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${listItemClasses$1.selected}:hover`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.hoverOpacity}))`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity+tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity)}}},et.hasSecondaryAction&&{paddingRight:48})),ListItemContainer=styled$1("li",{name:"MuiListItem",slot:"Container",overridesResolver:(tt,et)=>et.container})({position:"relative"}),ListItem=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiListItem"}),{alignItems:it="center",autoFocus:ot=!1,button:at=!1,children:st,className:lt,component:ct,components:ut={},componentsProps:ht={},ContainerComponent:dt="li",ContainerProps:{className:pt}={},dense:mt=!1,disabled:gt=!1,disableGutters:yt=!1,disablePadding:bt=!1,divider:vt=!1,focusVisibleClassName:xt,secondaryAction:kt,selected:St=!1,slotProps:Tt={},slots:At={}}=rt,Et=_objectWithoutPropertiesLoose$m(rt.ContainerProps,_excluded$12),$t=_objectWithoutPropertiesLoose$m(rt,_excluded2$f),Dt=reactExports.useContext(ListContext$1),jt=reactExports.useMemo(()=>({dense:mt||Dt.dense||!1,alignItems:it,disableGutters:yt}),[it,Dt.dense,mt,yt]),Pt=reactExports.useRef(null);useEnhancedEffect$1(()=>{ot&&Pt.current&&Pt.current.focus()},[ot]);const Ct=reactExports.Children.toArray(st),wt=Ct.length&&isMuiElement(Ct[Ct.length-1],["ListItemSecondaryAction"]),It=_extends$u({},rt,{alignItems:it,autoFocus:ot,button:at,dense:jt.dense,disabled:gt,disableGutters:yt,disablePadding:bt,divider:vt,hasSecondaryAction:wt,selected:St}),Ot=useUtilityClasses$y(It),Wt=useForkRef(Pt,nt),zt=At.root||ut.Root||ListItemRoot,Ft=Tt.root||ht.root||{},Nt=_extends$u({className:clsx$3(Ot.root,Ft.className,lt),disabled:gt},$t);let Ut=ct||"li";return at&&(Nt.component=ct||"div",Nt.focusVisibleClassName=clsx$3(listItemClasses$1.focusVisible,xt),Ut=ButtonBase$1),wt?(Ut=!Nt.component&&!ct?"div":Ut,dt==="li"&&(Ut==="li"?Ut="div":Nt.component==="li"&&(Nt.component="div")),jsxRuntimeExports.jsx(ListContext$1.Provider,{value:jt,children:jsxRuntimeExports.jsxs(ListItemContainer,_extends$u({as:dt,className:clsx$3(Ot.container,pt),ref:Wt,ownerState:It},Et,{children:[jsxRuntimeExports.jsx(zt,_extends$u({},Ft,!isHostComponent(zt)&&{as:Ut,ownerState:_extends$u({},It,Ft.ownerState)},Nt,{children:Ct})),Ct.pop()]}))})):jsxRuntimeExports.jsx(ListContext$1.Provider,{value:jt,children:jsxRuntimeExports.jsxs(zt,_extends$u({},Ft,{as:Ut,ref:Wt},!isHostComponent(zt)&&{ownerState:_extends$u({},It,Ft.ownerState)},Nt,{children:[Ct,kt&&jsxRuntimeExports.jsx(ListItemSecondaryAction$1,{children:kt})]}))})}),ListItem$1=ListItem,listItemIconClasses=generateUtilityClasses("MuiListItemIcon",["root","alignItemsFlexStart"]),listItemIconClasses$1=listItemIconClasses,listItemTextClasses=generateUtilityClasses("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),listItemTextClasses$1=listItemTextClasses,_excluded$11=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function nextItem$1(tt,et,nt){return tt===et?tt.firstChild:et&&et.nextElementSibling?et.nextElementSibling:nt?null:tt.firstChild}function previousItem$1(tt,et,nt){return tt===et?nt?tt.firstChild:tt.lastChild:et&&et.previousElementSibling?et.previousElementSibling:nt?null:tt.lastChild}function textCriteriaMatches(tt,et){if(et===void 0)return!0;let nt=tt.innerText;return nt===void 0&&(nt=tt.textContent),nt=nt.trim().toLowerCase(),nt.length===0?!1:et.repeating?nt[0]===et.keys[0]:nt.indexOf(et.keys.join(""))===0}function moveFocus$1(tt,et,nt,rt,it,ot){let at=!1,st=it(tt,et,et?nt:!1);for(;st;){if(st===tt.firstChild){if(at)return!1;at=!0}const lt=rt?!1:st.disabled||st.getAttribute("aria-disabled")==="true";if(!st.hasAttribute("tabindex")||!textCriteriaMatches(st,ot)||lt)st=it(tt,st,nt);else return st.focus(),!0}return!1}const MenuList=reactExports.forwardRef(function(et,nt){const{actions:rt,autoFocus:it=!1,autoFocusItem:ot=!1,children:at,className:st,disabledItemsFocusable:lt=!1,disableListWrap:ct=!1,onKeyDown:ut,variant:ht="selectedMenu"}=et,dt=_objectWithoutPropertiesLoose$m(et,_excluded$11),pt=reactExports.useRef(null),mt=reactExports.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});useEnhancedEffect$1(()=>{it&&pt.current.focus()},[it]),reactExports.useImperativeHandle(rt,()=>({adjustStyleForScrollbar:(xt,kt)=>{const St=!pt.current.style.width;if(xt.clientHeight{const kt=pt.current,St=xt.key,Tt=ownerDocument(kt).activeElement;if(St==="ArrowDown")xt.preventDefault(),moveFocus$1(kt,Tt,ct,lt,nextItem$1);else if(St==="ArrowUp")xt.preventDefault(),moveFocus$1(kt,Tt,ct,lt,previousItem$1);else if(St==="Home")xt.preventDefault(),moveFocus$1(kt,null,ct,lt,nextItem$1);else if(St==="End")xt.preventDefault(),moveFocus$1(kt,null,ct,lt,previousItem$1);else if(St.length===1){const At=mt.current,Et=St.toLowerCase(),$t=performance.now();At.keys.length>0&&($t-At.lastTime>500?(At.keys=[],At.repeating=!0,At.previousKeyMatched=!0):At.repeating&&Et!==At.keys[0]&&(At.repeating=!1)),At.lastTime=$t,At.keys.push(Et);const Dt=Tt&&!At.repeating&&textCriteriaMatches(Tt,At);At.previousKeyMatched&&(Dt||moveFocus$1(kt,Tt,!1,lt,nextItem$1,At))?xt.preventDefault():At.previousKeyMatched=!1}ut&&ut(xt)},yt=useForkRef(pt,nt);let bt=-1;reactExports.Children.forEach(at,(xt,kt)=>{if(!reactExports.isValidElement(xt)){bt===kt&&(bt+=1,bt>=at.length&&(bt=-1));return}xt.props.disabled||(ht==="selectedMenu"&&xt.props.selected||bt===-1)&&(bt=kt),bt===kt&&(xt.props.disabled||xt.props.muiSkipListHighlight||xt.type.muiSkipListHighlight)&&(bt+=1,bt>=at.length&&(bt=-1))});const vt=reactExports.Children.map(at,(xt,kt)=>{if(kt===bt){const St={};return ot&&(St.autoFocus=!0),xt.props.tabIndex===void 0&&ht==="selectedMenu"&&(St.tabIndex=0),reactExports.cloneElement(xt,St)}return xt});return jsxRuntimeExports.jsx(List$1,_extends$u({role:"menu",ref:yt,className:st,onKeyDown:gt,tabIndex:it?0:-1},dt,{children:vt}))}),MenuList$1=MenuList;function getPopoverUtilityClass(tt){return generateUtilityClass("MuiPopover",tt)}generateUtilityClasses("MuiPopover",["root","paper"]);const _excluded$10=["onEntering"],_excluded2$e=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],_excluded3$4=["slotProps"];function getOffsetTop(tt,et){let nt=0;return typeof et=="number"?nt=et:et==="center"?nt=tt.height/2:et==="bottom"&&(nt=tt.height),nt}function getOffsetLeft(tt,et){let nt=0;return typeof et=="number"?nt=et:et==="center"?nt=tt.width/2:et==="right"&&(nt=tt.width),nt}function getTransformOriginValue(tt){return[tt.horizontal,tt.vertical].map(et=>typeof et=="number"?`${et}px`:et).join(" ")}function resolveAnchorEl(tt){return typeof tt=="function"?tt():tt}const useUtilityClasses$x=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],paper:["paper"]},getPopoverUtilityClass,et)},PopoverRoot=styled$1(Modal$1,{name:"MuiPopover",slot:"Root",overridesResolver:(tt,et)=>et.root})({}),PopoverPaper=styled$1(Paper$1,{name:"MuiPopover",slot:"Paper",overridesResolver:(tt,et)=>et.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Popover=reactExports.forwardRef(function(et,nt){var rt,it,ot;const at=useThemeProps({props:et,name:"MuiPopover"}),{action:st,anchorEl:lt,anchorOrigin:ct={vertical:"top",horizontal:"left"},anchorPosition:ut,anchorReference:ht="anchorEl",children:dt,className:pt,container:mt,elevation:gt=8,marginThreshold:yt=16,open:bt,PaperProps:vt={},slots:xt,slotProps:kt,transformOrigin:St={vertical:"top",horizontal:"left"},TransitionComponent:Tt=Grow$1,transitionDuration:At="auto",TransitionProps:{onEntering:Et}={},disableScrollLock:$t=!1}=at,Dt=_objectWithoutPropertiesLoose$m(at.TransitionProps,_excluded$10),jt=_objectWithoutPropertiesLoose$m(at,_excluded2$e),Pt=(rt=kt==null?void 0:kt.paper)!=null?rt:vt,Ct=reactExports.useRef(),wt=useForkRef(Ct,Pt.ref),It=_extends$u({},at,{anchorOrigin:ct,anchorReference:ht,elevation:gt,marginThreshold:yt,externalPaperSlotProps:Pt,transformOrigin:St,TransitionComponent:Tt,transitionDuration:At,TransitionProps:Dt}),Ot=useUtilityClasses$x(It),Wt=reactExports.useCallback(()=>{if(ht==="anchorPosition")return ut;const _n=resolveAnchorEl(lt),$n=(_n&&_n.nodeType===1?_n:ownerDocument(Ct.current).body).getBoundingClientRect();return{top:$n.top+getOffsetTop($n,ct.vertical),left:$n.left+getOffsetLeft($n,ct.horizontal)}},[lt,ct.horizontal,ct.vertical,ut,ht]),zt=reactExports.useCallback(_n=>({vertical:getOffsetTop(_n,St.vertical),horizontal:getOffsetLeft(_n,St.horizontal)}),[St.horizontal,St.vertical]),Ft=reactExports.useCallback(_n=>{const Pn={width:_n.offsetWidth,height:_n.offsetHeight},$n=zt(Pn);if(ht==="none")return{top:null,left:null,transformOrigin:getTransformOriginValue($n)};const Nn=Wt();let Tn=Nn.top-$n.vertical,cn=Nn.left-$n.horizontal;const mn=Tn+Pn.height,In=cn+Pn.width,An=ownerWindow(resolveAnchorEl(lt)),wn=An.innerHeight-yt,fn=An.innerWidth-yt;if(yt!==null&&Tnwn){const pn=mn-wn;Tn-=pn,$n.vertical+=pn}if(yt!==null&&cnfn){const pn=In-fn;cn-=pn,$n.horizontal+=pn}return{top:`${Math.round(Tn)}px`,left:`${Math.round(cn)}px`,transformOrigin:getTransformOriginValue($n)}},[lt,ht,Wt,zt,yt]),[Nt,Ut]=reactExports.useState(bt),Mt=reactExports.useCallback(()=>{const _n=Ct.current;if(!_n)return;const Pn=Ft(_n);Pn.top!==null&&(_n.style.top=Pn.top),Pn.left!==null&&(_n.style.left=Pn.left),_n.style.transformOrigin=Pn.transformOrigin,Ut(!0)},[Ft]);reactExports.useEffect(()=>($t&&window.addEventListener("scroll",Mt),()=>window.removeEventListener("scroll",Mt)),[lt,$t,Mt]);const Ht=(_n,Pn)=>{Et&&Et(_n,Pn),Mt()},en=()=>{Ut(!1)};reactExports.useEffect(()=>{bt&&Mt()}),reactExports.useImperativeHandle(st,()=>bt?{updatePosition:()=>{Mt()}}:null,[bt,Mt]),reactExports.useEffect(()=>{if(!bt)return;const _n=debounce$5(()=>{Mt()}),Pn=ownerWindow(lt);return Pn.addEventListener("resize",_n),()=>{_n.clear(),Pn.removeEventListener("resize",_n)}},[lt,bt,Mt]);let sn=At;At==="auto"&&!Tt.muiSupportAuto&&(sn=void 0);const Kt=mt||(lt?ownerDocument(resolveAnchorEl(lt)).body:void 0),rn=(it=xt==null?void 0:xt.root)!=null?it:PopoverRoot,nn=(ot=xt==null?void 0:xt.paper)!=null?ot:PopoverPaper,hn=useSlotProps({elementType:nn,externalSlotProps:_extends$u({},Pt,{style:Nt?Pt.style:_extends$u({},Pt.style,{opacity:0})}),additionalProps:{elevation:gt,ref:wt},ownerState:It,className:clsx$3(Ot.paper,Pt==null?void 0:Pt.className)}),vn=useSlotProps({elementType:rn,externalSlotProps:(kt==null?void 0:kt.root)||{},externalForwardedProps:jt,additionalProps:{ref:nt,slotProps:{backdrop:{invisible:!0}},container:Kt,open:bt},ownerState:It,className:clsx$3(Ot.root,pt)}),{slotProps:an}=vn,Qt=_objectWithoutPropertiesLoose$m(vn,_excluded3$4);return jsxRuntimeExports.jsx(rn,_extends$u({},Qt,!isHostComponent(rn)&&{slotProps:an,disableScrollLock:$t},{children:jsxRuntimeExports.jsx(Tt,_extends$u({appear:!0,in:bt,onEntering:Ht,onExited:en,timeout:sn},Dt,{children:jsxRuntimeExports.jsx(nn,_extends$u({},hn,{children:dt}))}))}))}),Popover$1=Popover;function getMenuUtilityClass(tt){return generateUtilityClass("MuiMenu",tt)}generateUtilityClasses("MuiMenu",["root","paper","list"]);const _excluded$$=["onEntering"],_excluded2$d=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],RTL_ORIGIN={vertical:"top",horizontal:"right"},LTR_ORIGIN={vertical:"top",horizontal:"left"},useUtilityClasses$w=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],paper:["paper"],list:["list"]},getMenuUtilityClass,et)},MenuRoot=styled$1(Popover$1,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(tt,et)=>et.root})({}),MenuPaper=styled$1(PopoverPaper,{name:"MuiMenu",slot:"Paper",overridesResolver:(tt,et)=>et.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),MenuMenuList=styled$1(MenuList$1,{name:"MuiMenu",slot:"List",overridesResolver:(tt,et)=>et.list})({outline:0}),Menu=reactExports.forwardRef(function(et,nt){var rt,it;const ot=useThemeProps({props:et,name:"MuiMenu"}),{autoFocus:at=!0,children:st,className:lt,disableAutoFocusItem:ct=!1,MenuListProps:ut={},onClose:ht,open:dt,PaperProps:pt={},PopoverClasses:mt,transitionDuration:gt="auto",TransitionProps:{onEntering:yt}={},variant:bt="selectedMenu",slots:vt={},slotProps:xt={}}=ot,kt=_objectWithoutPropertiesLoose$m(ot.TransitionProps,_excluded$$),St=_objectWithoutPropertiesLoose$m(ot,_excluded2$d),Tt=useTheme(),At=Tt.direction==="rtl",Et=_extends$u({},ot,{autoFocus:at,disableAutoFocusItem:ct,MenuListProps:ut,onEntering:yt,PaperProps:pt,transitionDuration:gt,TransitionProps:kt,variant:bt}),$t=useUtilityClasses$w(Et),Dt=at&&!ct&&dt,jt=reactExports.useRef(null),Pt=(Ft,Nt)=>{jt.current&&jt.current.adjustStyleForScrollbar(Ft,Tt),yt&&yt(Ft,Nt)},Ct=Ft=>{Ft.key==="Tab"&&(Ft.preventDefault(),ht&&ht(Ft,"tabKeyDown"))};let wt=-1;reactExports.Children.map(st,(Ft,Nt)=>{reactExports.isValidElement(Ft)&&(Ft.props.disabled||(bt==="selectedMenu"&&Ft.props.selected||wt===-1)&&(wt=Nt))});const It=(rt=vt.paper)!=null?rt:MenuPaper,Ot=(it=xt.paper)!=null?it:pt,Wt=useSlotProps({elementType:vt.root,externalSlotProps:xt.root,ownerState:Et,className:[$t.root,lt]}),zt=useSlotProps({elementType:It,externalSlotProps:Ot,ownerState:Et,className:$t.paper});return jsxRuntimeExports.jsx(MenuRoot,_extends$u({onClose:ht,anchorOrigin:{vertical:"bottom",horizontal:At?"right":"left"},transformOrigin:At?RTL_ORIGIN:LTR_ORIGIN,slots:{paper:It,root:vt.root},slotProps:{root:Wt,paper:zt},open:dt,ref:nt,transitionDuration:gt,TransitionProps:_extends$u({onEntering:Pt},kt),ownerState:Et},St,{classes:mt,children:jsxRuntimeExports.jsx(MenuMenuList,_extends$u({onKeyDown:Ct,actions:jt,autoFocus:at&&(wt===-1||ct),autoFocusItem:Dt,variant:bt},ut,{className:clsx$3($t.list,ut.className),children:st}))}))}),Menu$1=Menu;function getMenuItemUtilityClass(tt){return generateUtilityClass("MuiMenuItem",tt)}const menuItemClasses=generateUtilityClasses("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),menuItemClasses$1=menuItemClasses,_excluded$_=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],overridesResolver$1=(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.dense&&et.dense,nt.divider&&et.divider,!nt.disableGutters&&et.gutters]},useUtilityClasses$v=tt=>{const{disabled:et,dense:nt,divider:rt,disableGutters:it,selected:ot,classes:at}=tt,lt=composeClasses({root:["root",nt&&"dense",et&&"disabled",!it&&"gutters",rt&&"divider",ot&&"selected"]},getMenuItemUtilityClass,at);return _extends$u({},at,lt)},MenuItemRoot=styled$1(ButtonBase$1,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:overridesResolver$1})(({theme:tt,ownerState:et})=>_extends$u({},tt.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!et.disableGutters&&{paddingLeft:16,paddingRight:16},et.divider&&{borderBottom:`1px solid ${(tt.vars||tt).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(tt.vars||tt).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${menuItemClasses$1.selected}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity),[`&.${menuItemClasses$1.focusVisible}`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.focusOpacity}))`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity+tt.palette.action.focusOpacity)}},[`&.${menuItemClasses$1.selected}:hover`]:{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / calc(${tt.vars.palette.action.selectedOpacity} + ${tt.vars.palette.action.hoverOpacity}))`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity+tt.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.selectedOpacity})`:alpha$1(tt.palette.primary.main,tt.palette.action.selectedOpacity)}},[`&.${menuItemClasses$1.focusVisible}`]:{backgroundColor:(tt.vars||tt).palette.action.focus},[`&.${menuItemClasses$1.disabled}`]:{opacity:(tt.vars||tt).palette.action.disabledOpacity},[`& + .${dividerClasses.root}`]:{marginTop:tt.spacing(1),marginBottom:tt.spacing(1)},[`& + .${dividerClasses.inset}`]:{marginLeft:52},[`& .${listItemTextClasses$1.root}`]:{marginTop:0,marginBottom:0},[`& .${listItemTextClasses$1.inset}`]:{paddingLeft:36},[`& .${listItemIconClasses$1.root}`]:{minWidth:36}},!et.dense&&{[tt.breakpoints.up("sm")]:{minHeight:"auto"}},et.dense&&_extends$u({minHeight:32,paddingTop:4,paddingBottom:4},tt.typography.body2,{[`& .${listItemIconClasses$1.root} svg`]:{fontSize:"1.25rem"}}))),MenuItem$2=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiMenuItem"}),{autoFocus:it=!1,component:ot="li",dense:at=!1,divider:st=!1,disableGutters:lt=!1,focusVisibleClassName:ct,role:ut="menuitem",tabIndex:ht,className:dt}=rt,pt=_objectWithoutPropertiesLoose$m(rt,_excluded$_),mt=reactExports.useContext(ListContext$1),gt=reactExports.useMemo(()=>({dense:at||mt.dense||!1,disableGutters:lt}),[mt.dense,at,lt]),yt=reactExports.useRef(null);useEnhancedEffect$1(()=>{it&&yt.current&&yt.current.focus()},[it]);const bt=_extends$u({},rt,{dense:gt.dense,divider:st,disableGutters:lt}),vt=useUtilityClasses$v(rt),xt=useForkRef(yt,nt);let kt;return rt.disabled||(kt=ht!==void 0?ht:-1),jsxRuntimeExports.jsx(ListContext$1.Provider,{value:gt,children:jsxRuntimeExports.jsx(MenuItemRoot,_extends$u({ref:xt,role:ut,tabIndex:kt,component:ot,focusVisibleClassName:clsx$3(vt.focusVisible,ct),className:clsx$3(vt.root,dt)},pt,{ownerState:bt,classes:vt}))})}),MenuItem$3=MenuItem$2;function getNativeSelectUtilityClasses(tt){return generateUtilityClass("MuiNativeSelect",tt)}const nativeSelectClasses=generateUtilityClasses("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),nativeSelectClasses$1=nativeSelectClasses,_excluded$Z=["className","disabled","error","IconComponent","inputRef","variant"],useUtilityClasses$u=tt=>{const{classes:et,variant:nt,disabled:rt,multiple:it,open:ot,error:at}=tt,st={select:["select",nt,rt&&"disabled",it&&"multiple",at&&"error"],icon:["icon",`icon${capitalize(nt)}`,ot&&"iconOpen",rt&&"disabled"]};return composeClasses(st,getNativeSelectUtilityClasses,et)},nativeSelectSelectStyles=({ownerState:tt,theme:et})=>_extends$u({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":_extends$u({},et.vars?{backgroundColor:`rgba(${et.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:et.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${nativeSelectClasses$1.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(et.vars||et).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},tt.variant==="filled"&&{"&&&":{paddingRight:32}},tt.variant==="outlined"&&{borderRadius:(et.vars||et).shape.borderRadius,"&:focus":{borderRadius:(et.vars||et).shape.borderRadius},"&&&":{paddingRight:32}}),NativeSelectSelect=styled$1("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:rootShouldForwardProp,overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.select,et[nt.variant],nt.error&&et.error,{[`&.${nativeSelectClasses$1.multiple}`]:et.multiple}]}})(nativeSelectSelectStyles),nativeSelectIconStyles=({ownerState:tt,theme:et})=>_extends$u({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(et.vars||et).palette.action.active,[`&.${nativeSelectClasses$1.disabled}`]:{color:(et.vars||et).palette.action.disabled}},tt.open&&{transform:"rotate(180deg)"},tt.variant==="filled"&&{right:7},tt.variant==="outlined"&&{right:7}),NativeSelectIcon=styled$1("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.icon,nt.variant&&et[`icon${capitalize(nt.variant)}`],nt.open&&et.iconOpen]}})(nativeSelectIconStyles),NativeSelectInput=reactExports.forwardRef(function(et,nt){const{className:rt,disabled:it,error:ot,IconComponent:at,inputRef:st,variant:lt="standard"}=et,ct=_objectWithoutPropertiesLoose$m(et,_excluded$Z),ut=_extends$u({},et,{disabled:it,variant:lt,error:ot}),ht=useUtilityClasses$u(ut);return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(NativeSelectSelect,_extends$u({ownerState:ut,className:clsx$3(ht.select,rt),disabled:it,ref:st||nt},ct)),et.multiple?null:jsxRuntimeExports.jsx(NativeSelectIcon,{as:at,ownerState:ut,className:ht.icon})]})}),NativeSelectInput$1=NativeSelectInput;var _span$1;const _excluded$Y=["children","classes","className","label","notched"],NotchedOutlineRoot$1=styled$1("fieldset")({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),NotchedOutlineLegend=styled$1("legend")(({ownerState:tt,theme:et})=>_extends$u({float:"unset",width:"auto",overflow:"hidden"},!tt.withLabel&&{padding:0,lineHeight:"11px",transition:et.transitions.create("width",{duration:150,easing:et.transitions.easing.easeOut})},tt.withLabel&&_extends$u({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:et.transitions.create("max-width",{duration:50,easing:et.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},tt.notched&&{maxWidth:"100%",transition:et.transitions.create("max-width",{duration:100,easing:et.transitions.easing.easeOut,delay:50})})));function NotchedOutline(tt){const{className:et,label:nt,notched:rt}=tt,it=_objectWithoutPropertiesLoose$m(tt,_excluded$Y),ot=nt!=null&&nt!=="",at=_extends$u({},tt,{notched:rt,withLabel:ot});return jsxRuntimeExports.jsx(NotchedOutlineRoot$1,_extends$u({"aria-hidden":!0,className:et,ownerState:at},it,{children:jsxRuntimeExports.jsx(NotchedOutlineLegend,{ownerState:at,children:ot?jsxRuntimeExports.jsx("span",{children:nt}):_span$1||(_span$1=jsxRuntimeExports.jsx("span",{className:"notranslate",children:"​"}))})}))}const _excluded$X=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],useUtilityClasses$t=tt=>{const{classes:et}=tt,rt=composeClasses({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},getOutlinedInputUtilityClass,et);return _extends$u({},et,rt)},OutlinedInputRoot=styled$1(InputBaseRoot,{shouldForwardProp:tt=>rootShouldForwardProp(tt)||tt==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:rootOverridesResolver})(({theme:tt,ownerState:et})=>{const nt=tt.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return _extends$u({position:"relative",borderRadius:(tt.vars||tt).shape.borderRadius,[`&:hover .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(tt.vars||tt).palette.text.primary},"@media (hover: none)":{[`&:hover .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:tt.vars?`rgba(${tt.vars.palette.common.onBackgroundChannel} / 0.23)`:nt}},[`&.${outlinedInputClasses$1.focused} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(tt.vars||tt).palette[et.color].main,borderWidth:2},[`&.${outlinedInputClasses$1.error} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(tt.vars||tt).palette.error.main},[`&.${outlinedInputClasses$1.disabled} .${outlinedInputClasses$1.notchedOutline}`]:{borderColor:(tt.vars||tt).palette.action.disabled}},et.startAdornment&&{paddingLeft:14},et.endAdornment&&{paddingRight:14},et.multiline&&_extends$u({padding:"16.5px 14px"},et.size==="small"&&{padding:"8.5px 14px"}))}),NotchedOutlineRoot=styled$1(NotchedOutline,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(tt,et)=>et.notchedOutline})(({theme:tt})=>{const et=tt.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:tt.vars?`rgba(${tt.vars.palette.common.onBackgroundChannel} / 0.23)`:et}}),OutlinedInputInput=styled$1(InputBaseComponent,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:inputOverridesResolver})(({theme:tt,ownerState:et})=>_extends$u({padding:"16.5px 14px"},!tt.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:tt.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:tt.palette.mode==="light"?null:"#fff",caretColor:tt.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},tt.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[tt.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},et.size==="small"&&{padding:"8.5px 14px"},et.multiline&&{padding:0},et.startAdornment&&{paddingLeft:0},et.endAdornment&&{paddingRight:0})),OutlinedInput=reactExports.forwardRef(function(et,nt){var rt,it,ot,at,st;const lt=useThemeProps({props:et,name:"MuiOutlinedInput"}),{components:ct={},fullWidth:ut=!1,inputComponent:ht="input",label:dt,multiline:pt=!1,notched:mt,slots:gt={},type:yt="text"}=lt,bt=_objectWithoutPropertiesLoose$m(lt,_excluded$X),vt=useUtilityClasses$t(lt),xt=useFormControl(),kt=formControlState({props:lt,muiFormControl:xt,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),St=_extends$u({},lt,{color:kt.color||"primary",disabled:kt.disabled,error:kt.error,focused:kt.focused,formControl:xt,fullWidth:ut,hiddenLabel:kt.hiddenLabel,multiline:pt,size:kt.size,type:yt}),Tt=(rt=(it=gt.root)!=null?it:ct.Root)!=null?rt:OutlinedInputRoot,At=(ot=(at=gt.input)!=null?at:ct.Input)!=null?ot:OutlinedInputInput;return jsxRuntimeExports.jsx(InputBase$1,_extends$u({slots:{root:Tt,input:At},renderSuffix:Et=>jsxRuntimeExports.jsx(NotchedOutlineRoot,{ownerState:St,className:vt.notchedOutline,label:dt!=null&&dt!==""&&kt.required?st||(st=jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[dt," ","*"]})):dt,notched:typeof mt<"u"?mt:!!(Et.startAdornment||Et.filled||Et.focused)}),fullWidth:ut,inputComponent:ht,multiline:pt,ref:nt,type:yt},bt,{classes:_extends$u({},vt,{notchedOutline:null})}))});OutlinedInput.muiName="Input";const OutlinedInput$1=OutlinedInput;function getSelectUtilityClasses(tt){return generateUtilityClass("MuiSelect",tt)}const selectClasses=generateUtilityClasses("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),selectClasses$1=selectClasses;var _span;const _excluded$W=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],SelectSelect=styled$1("div",{name:"MuiSelect",slot:"Select",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[{[`&.${selectClasses$1.select}`]:et.select},{[`&.${selectClasses$1.select}`]:et[nt.variant]},{[`&.${selectClasses$1.error}`]:et.error},{[`&.${selectClasses$1.multiple}`]:et.multiple}]}})(nativeSelectSelectStyles,{[`&.${selectClasses$1.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),SelectIcon=styled$1("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.icon,nt.variant&&et[`icon${capitalize(nt.variant)}`],nt.open&&et.iconOpen]}})(nativeSelectIconStyles),SelectNativeInput=styled$1("input",{shouldForwardProp:tt=>slotShouldForwardProp(tt)&&tt!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(tt,et)=>et.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function areEqualValues(tt,et){return typeof et=="object"&&et!==null?tt===et:String(tt)===String(et)}function isEmpty(tt){return tt==null||typeof tt=="string"&&!tt.trim()}const useUtilityClasses$s=tt=>{const{classes:et,variant:nt,disabled:rt,multiple:it,open:ot,error:at}=tt,st={select:["select",nt,rt&&"disabled",it&&"multiple",at&&"error"],icon:["icon",`icon${capitalize(nt)}`,ot&&"iconOpen",rt&&"disabled"],nativeInput:["nativeInput"]};return composeClasses(st,getSelectUtilityClasses,et)},SelectInput=reactExports.forwardRef(function(et,nt){var rt;const{"aria-describedby":it,"aria-label":ot,autoFocus:at,autoWidth:st,children:lt,className:ct,defaultOpen:ut,defaultValue:ht,disabled:dt,displayEmpty:pt,error:mt=!1,IconComponent:gt,inputRef:yt,labelId:bt,MenuProps:vt={},multiple:xt,name:kt,onBlur:St,onChange:Tt,onClose:At,onFocus:Et,onOpen:$t,open:Dt,readOnly:jt,renderValue:Pt,SelectDisplayProps:Ct={},tabIndex:wt,value:It,variant:Ot="standard"}=et,Wt=_objectWithoutPropertiesLoose$m(et,_excluded$W),[zt,Ft]=useControlled({controlled:It,default:ht,name:"Select"}),[Nt,Ut]=useControlled({controlled:Dt,default:ut,name:"Select"}),Mt=reactExports.useRef(null),Ht=reactExports.useRef(null),[en,sn]=reactExports.useState(null),{current:Kt}=reactExports.useRef(Dt!=null),[rn,nn]=reactExports.useState(),hn=useForkRef(nt,yt),vn=reactExports.useCallback(On=>{Ht.current=On,On&&sn(On)},[]),an=en==null?void 0:en.parentNode;reactExports.useImperativeHandle(hn,()=>({focus:()=>{Ht.current.focus()},node:Mt.current,value:zt}),[zt]),reactExports.useEffect(()=>{ut&&Nt&&en&&!Kt&&(nn(st?null:an.clientWidth),Ht.current.focus())},[en,st]),reactExports.useEffect(()=>{at&&Ht.current.focus()},[at]),reactExports.useEffect(()=>{if(!bt)return;const On=ownerDocument(Ht.current).getElementById(bt);if(On){const Zn=()=>{getSelection().isCollapsed&&Ht.current.focus()};return On.addEventListener("click",Zn),()=>{On.removeEventListener("click",Zn)}}},[bt]);const Qt=(On,Zn)=>{On?$t&&$t(Zn):At&&At(Zn),Kt||(nn(st?null:an.clientWidth),Ut(On))},_n=On=>{On.button===0&&(On.preventDefault(),Ht.current.focus(),Qt(!0,On))},Pn=On=>{Qt(!1,On)},$n=reactExports.Children.toArray(lt),Nn=On=>{const Zn=$n.find(Vn=>Vn.props.value===On.target.value);Zn!==void 0&&(Ft(Zn.props.value),Tt&&Tt(On,Zn))},Tn=On=>Zn=>{let Vn;if(Zn.currentTarget.hasAttribute("tabindex")){if(xt){Vn=Array.isArray(zt)?zt.slice():[];const qn=zt.indexOf(On.props.value);qn===-1?Vn.push(On.props.value):Vn.splice(qn,1)}else Vn=On.props.value;if(On.props.onClick&&On.props.onClick(Zn),zt!==Vn&&(Ft(Vn),Tt)){const qn=Zn.nativeEvent||Zn,zn=new qn.constructor(qn.type,qn);Object.defineProperty(zn,"target",{writable:!0,value:{value:Vn,name:kt}}),Tt(zn,On)}xt||Qt(!1,Zn)}},cn=On=>{jt||[" ","ArrowUp","ArrowDown","Enter"].indexOf(On.key)!==-1&&(On.preventDefault(),Qt(!0,On))},mn=en!==null&&Nt,In=On=>{!mn&&St&&(Object.defineProperty(On,"target",{writable:!0,value:{value:zt,name:kt}}),St(On))};delete Wt["aria-invalid"];let An,wn;const fn=[];let pn=!1;(isFilled({value:zt})||pt)&&(Pt?An=Pt(zt):pn=!0);const kn=$n.map(On=>{if(!reactExports.isValidElement(On))return null;let Zn;if(xt){if(!Array.isArray(zt))throw new Error(formatMuiErrorMessage(2));Zn=zt.some(Vn=>areEqualValues(Vn,On.props.value)),Zn&&pn&&fn.push(On.props.children)}else Zn=areEqualValues(zt,On.props.value),Zn&&pn&&(wn=On.props.children);return reactExports.cloneElement(On,{"aria-selected":Zn?"true":"false",onClick:Tn(On),onKeyUp:Vn=>{Vn.key===" "&&Vn.preventDefault(),On.props.onKeyUp&&On.props.onKeyUp(Vn)},role:"option",selected:Zn,value:void 0,"data-value":On.props.value})});pn&&(xt?fn.length===0?An=null:An=fn.reduce((On,Zn,Vn)=>(On.push(Zn),Vn{const{classes:et}=tt;return et},styledRootConfig={name:"MuiSelect",overridesResolver:(tt,et)=>et.root,shouldForwardProp:tt=>rootShouldForwardProp(tt)&&tt!=="variant",slot:"Root"},StyledInput$1=styled$1(Input$3,styledRootConfig)(""),StyledOutlinedInput=styled$1(OutlinedInput$1,styledRootConfig)(""),StyledFilledInput=styled$1(FilledInput$1,styledRootConfig)(""),Select$3=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({name:"MuiSelect",props:et}),{autoWidth:it=!1,children:ot,classes:at={},className:st,defaultOpen:lt=!1,displayEmpty:ct=!1,IconComponent:ut=ArrowDropDownIcon$1,id:ht,input:dt,inputProps:pt,label:mt,labelId:gt,MenuProps:yt,multiple:bt=!1,native:vt=!1,onClose:xt,onOpen:kt,open:St,renderValue:Tt,SelectDisplayProps:At,variant:Et="outlined"}=rt,$t=_objectWithoutPropertiesLoose$m(rt,_excluded$V),Dt=vt?NativeSelectInput$1:SelectInput$1,jt=useFormControl(),Pt=formControlState({props:rt,muiFormControl:jt,states:["variant","error"]}),Ct=Pt.variant||Et,wt=_extends$u({},rt,{variant:Ct,classes:at}),It=useUtilityClasses$r(wt),Ot=_objectWithoutPropertiesLoose$m(It,_excluded2$c),Wt=dt||{standard:jsxRuntimeExports.jsx(StyledInput$1,{ownerState:wt}),outlined:jsxRuntimeExports.jsx(StyledOutlinedInput,{label:mt,ownerState:wt}),filled:jsxRuntimeExports.jsx(StyledFilledInput,{ownerState:wt})}[Ct],zt=useForkRef(nt,Wt.ref);return jsxRuntimeExports.jsx(reactExports.Fragment,{children:reactExports.cloneElement(Wt,_extends$u({inputComponent:Dt,inputProps:_extends$u({children:ot,error:Pt.error,IconComponent:ut,variant:Ct,type:void 0,multiple:bt},vt?{id:ht}:{autoWidth:it,defaultOpen:lt,displayEmpty:ct,labelId:gt,MenuProps:yt,onClose:xt,onOpen:kt,open:St,renderValue:Tt,SelectDisplayProps:_extends$u({id:ht},At)},pt,{classes:pt?deepmerge$1(Ot,pt.classes):Ot},dt?dt.props.inputProps:{})},bt&&vt&&Ct==="outlined"?{notched:!0}:{},{ref:zt,className:clsx$3(Wt.props.className,st,It.root)},!dt&&{variant:Ct},$t))})});Select$3.muiName="Select";const Select$4=Select$3;function getSkeletonUtilityClass(tt){return generateUtilityClass("MuiSkeleton",tt)}generateUtilityClasses("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const _excluded$U=["animation","className","component","height","style","variant","width"];let _=tt=>tt,_t,_t2,_t3,_t4;const useUtilityClasses$q=tt=>{const{classes:et,variant:nt,animation:rt,hasChildren:it,width:ot,height:at}=tt;return composeClasses({root:["root",nt,rt,it&&"withChildren",it&&!ot&&"fitContent",it&&!at&&"heightAuto"]},getSkeletonUtilityClass,et)},pulseKeyframe=keyframes(_t||(_t=_` 0% { opacity: 1; } @@ -323,7 +323,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * Copyright (c) 2014-2015, Fedor Indutny (MIT License) * Copyright (c) 2014-2017, Christopher Jeffrey (MIT License). * https://github.com/bcoin-org/bcoin - */let EncodingError$5=class gw extends Error{constructor(et,nt,rt){super(),this.type="EncodingError",this.name="EncodingError",this.code="ERR_ENCODING",this.message=`${nt} (offset=${et}).`,Error.captureStackTrace&&Error.captureStackTrace(this,rt||gw)}};var error=EncodingError$5;/*! + */let EncodingError$5=class yw extends Error{constructor(et,nt,rt){super(),this.type="EncodingError",this.name="EncodingError",this.code="ERR_ENCODING",this.message=`${nt} (offset=${et}).`,Error.captureStackTrace&&Error.captureStackTrace(this,rt||yw)}};var error=EncodingError$5;/*! * encoding.js - encoding utils for bcoin * Copyright (c) 2014-2015, Fedor Indutny (MIT License) * Copyright (c) 2014-2017, Christopher Jeffrey (MIT License). @@ -333,7 +333,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * Copyright (c) 2014-2015, Fedor Indutny (MIT License) * Copyright (c) 2014-2017, Christopher Jeffrey (MIT License). * https://github.com/bcoin-org/bcoin - */const enforce$5=enforce_1,encoding$3=encoding$4,EncodingError$3=error,EMPTY$1=Buffer.alloc(0);let BufferReader$3=class{constructor(et,nt=!1){mw(this,"data");enforce$5(Buffer.isBuffer(et),"data","buffer"),enforce$5(typeof nt=="boolean","zeroCopy","boolean"),this.data=et,this.offset=0,this.zeroCopy=nt,this.stack=[]}check(et){if(this.offset+et>this.data.length)throw new EncodingError$3(this.offset,"Out of bounds read",this.check)}getSize(){return this.data.length}left(){return this.check(0),this.data.length-this.offset}seek(et){if(enforce$5(Number.isSafeInteger(et),"off","integer"),this.offset+et<0)throw new EncodingError$3(this.offset,"Out of bounds read");return this.check(et),this.offset+=et,this}start(){return this.stack.push(this.offset),this.offset}end(){if(this.stack.length===0)throw new Error("Cannot end without a stack item.");const et=this.stack.pop();return this.offset-et}endData(et=!1){if(enforce$5(typeof et=="boolean","zeroCopy","boolean"),this.stack.length===0)throw new Error("Cannot end without a stack item.");const nt=this.stack.pop(),rt=this.offset,it=rt-nt,ot=this.data;if(it===ot.length)return ot;if(this.zeroCopy||et)return ot.slice(nt,rt);const at=Buffer.allocUnsafeSlow(it);return ot.copy(at,0,nt,rt),at}destroy(){return this.data=EMPTY$1,this.offset=0,this.stack.length=0,this}readU8(){this.check(1);const et=this.data[this.offset];return this.offset+=1,et}readU16(){this.check(2);const et=encoding$3.readU16(this.data,this.offset);return this.offset+=2,et}readU16BE(){this.check(2);const et=encoding$3.readU16BE(this.data,this.offset);return this.offset+=2,et}readU24(){this.check(3);const et=encoding$3.readU24(this.data,this.offset);return this.offset+=3,et}readU24BE(){this.check(3);const et=encoding$3.readU24BE(this.data,this.offset);return this.offset+=3,et}readU32(){this.check(4);const et=encoding$3.readU32(this.data,this.offset);return this.offset+=4,et}readU32BE(){this.check(4);const et=encoding$3.readU32BE(this.data,this.offset);return this.offset+=4,et}readU40(){this.check(5);const et=encoding$3.readU40(this.data,this.offset);return this.offset+=5,et}readU40BE(){this.check(5);const et=encoding$3.readU40BE(this.data,this.offset);return this.offset+=5,et}readU48(){this.check(6);const et=encoding$3.readU48(this.data,this.offset);return this.offset+=6,et}readU48BE(){this.check(6);const et=encoding$3.readU48BE(this.data,this.offset);return this.offset+=6,et}readU56(){this.check(7);const et=encoding$3.readU56(this.data,this.offset);return this.offset+=7,et}readU56BE(){this.check(7);const et=encoding$3.readU56BE(this.data,this.offset);return this.offset+=7,et}readBigU56(){this.check(7);const et=encoding$3.readBigU56(this.data,this.offset);return this.offset+=7,et}readBigU56BE(){this.check(7);const et=encoding$3.readBigU56BE(this.data,this.offset);return this.offset+=7,et}readU64(){this.check(8);const et=encoding$3.readU64(this.data,this.offset);return this.offset+=8,et}readU64BE(){this.check(8);const et=encoding$3.readU64BE(this.data,this.offset);return this.offset+=8,et}readBigU64(){this.check(8);const et=encoding$3.readBigU64(this.data,this.offset);return this.offset+=8,et}readBigU64BE(){this.check(8);const et=encoding$3.readBigU64BE(this.data,this.offset);return this.offset+=8,et}readBigU128(){this.check(16);const et=encoding$3.readBigU128(this.data,this.offset);return this.offset+=16,et}readBigU128BE(){this.check(16);const et=encoding$3.readBigU128BE(this.data,this.offset);return this.offset+=16,et}readBigU256(){this.check(32);const et=encoding$3.readBigU256(this.data,this.offset);return this.offset+=32,et}readBigU256BE(){this.check(32);const et=encoding$3.readBigU256BE(this.data,this.offset);return this.offset+=32,et}readI8(){this.check(1);const et=encoding$3.readI8(this.data,this.offset);return this.offset+=1,et}readI16(){this.check(2);const et=encoding$3.readI16(this.data,this.offset);return this.offset+=2,et}readI16BE(){this.check(2);const et=encoding$3.readI16BE(this.data,this.offset);return this.offset+=2,et}readI24(){this.check(3);const et=encoding$3.readI24(this.data,this.offset);return this.offset+=3,et}readI24BE(){this.check(3);const et=encoding$3.readI24BE(this.data,this.offset);return this.offset+=3,et}readI32(){this.check(4);const et=encoding$3.readI32(this.data,this.offset);return this.offset+=4,et}readI32BE(){this.check(4);const et=encoding$3.readI32BE(this.data,this.offset);return this.offset+=4,et}readI40(){this.check(5);const et=encoding$3.readI40(this.data,this.offset);return this.offset+=5,et}readI40BE(){this.check(5);const et=encoding$3.readI40BE(this.data,this.offset);return this.offset+=5,et}readI48(){this.check(6);const et=encoding$3.readI48(this.data,this.offset);return this.offset+=6,et}readI48BE(){this.check(6);const et=encoding$3.readI48BE(this.data,this.offset);return this.offset+=6,et}readI56(){this.check(7);const et=encoding$3.readI56(this.data,this.offset);return this.offset+=7,et}readI56BE(){this.check(7);const et=encoding$3.readI56BE(this.data,this.offset);return this.offset+=7,et}readBigI56(){this.check(7);const et=encoding$3.readBigI56(this.data,this.offset);return this.offset+=7,et}readBigI56BE(){this.check(7);const et=encoding$3.readBigI56BE(this.data,this.offset);return this.offset+=7,et}readI64(){this.check(8);const et=encoding$3.readI64(this.data,this.offset);return this.offset+=8,et}readI64BE(){this.check(8);const et=encoding$3.readI64BE(this.data,this.offset);return this.offset+=8,et}readBigI64(){this.check(8);const et=encoding$3.readBigI64(this.data,this.offset);return this.offset+=8,et}readBigI64BE(){this.check(8);const et=encoding$3.readBigI64BE(this.data,this.offset);return this.offset+=8,et}readFloat(){this.check(4);const et=encoding$3.readFloat(this.data,this.offset);return this.offset+=4,et}readFloatBE(){this.check(4);const et=encoding$3.readFloatBE(this.data,this.offset);return this.offset+=4,et}readDouble(){this.check(8);const et=encoding$3.readDouble(this.data,this.offset);return this.offset+=8,et}readDoubleBE(){this.check(8);const et=encoding$3.readDoubleBE(this.data,this.offset);return this.offset+=8,et}readVarint(){const{size:et,value:nt}=encoding$3.readVarint(this.data,this.offset);return this.offset+=et,nt}readVarint2(){const{size:et,value:nt}=encoding$3.readVarint2(this.data,this.offset);return this.offset+=et,nt}readBytes(et,nt=!1){enforce$5(et>>>0===et,"size","integer"),enforce$5(typeof nt=="boolean","zeroCopy","boolean"),this.check(et);let rt;return this.zeroCopy||nt?rt=this.data.slice(this.offset,this.offset+et):(rt=Buffer.allocUnsafeSlow(et),this.data.copy(rt,0,this.offset,this.offset+et)),this.offset+=et,rt}readVarBytes(et=!1){return this.readBytes(this.readVarint(),et)}readChild(et){enforce$5(et>>>0===et,"size","integer"),this.check(et);const nt=this.data.slice(0,this.offset+et),rt=new this.constructor(nt);return rt.offset=this.offset,this.offset+=et,rt}readString(et,nt){nt==null&&(nt="binary"),enforce$5(et>>>0===et,"size","integer"),enforce$5(typeof nt=="string","enc","string"),this.check(et);const rt=this.data.toString(nt,this.offset,this.offset+et);return this.offset+=et,rt}readHash(et){return et?this.readString(32,et):this.readBytes(32)}readVarString(et,nt=0){et==null&&(et="binary"),enforce$5(typeof et=="string","enc","string"),enforce$5(nt>>>0===nt,"limit","integer");const rt=this.readVarint();if(nt!==0&&rt>nt)throw new EncodingError$3(this.offset,"String exceeds limit");return this.readString(rt,et)}readNullString(et){et==null&&(et="binary"),enforce$5(typeof et=="string","enc","string");let nt=this.offset;for(;nt0&&(nt=this.stack[this.stack.length-1]);const rt=this.data.slice(nt,this.offset),it=et.digest?et.digest(rt):et(rt);return encoding$3.readU32(it,0)}verifyChecksum(et){const nt=this.createChecksum(et),rt=this.readU32();if(nt!==rt)throw new EncodingError$3(this.offset,"Checksum mismatch");return nt}};var reader=BufferReader$3;/*! + */const enforce$5=enforce_1,encoding$3=encoding$4,EncodingError$3=error,EMPTY$1=Buffer.alloc(0);let BufferReader$3=class{constructor(et,nt=!1){gw(this,"data");enforce$5(Buffer.isBuffer(et),"data","buffer"),enforce$5(typeof nt=="boolean","zeroCopy","boolean"),this.data=et,this.offset=0,this.zeroCopy=nt,this.stack=[]}check(et){if(this.offset+et>this.data.length)throw new EncodingError$3(this.offset,"Out of bounds read",this.check)}getSize(){return this.data.length}left(){return this.check(0),this.data.length-this.offset}seek(et){if(enforce$5(Number.isSafeInteger(et),"off","integer"),this.offset+et<0)throw new EncodingError$3(this.offset,"Out of bounds read");return this.check(et),this.offset+=et,this}start(){return this.stack.push(this.offset),this.offset}end(){if(this.stack.length===0)throw new Error("Cannot end without a stack item.");const et=this.stack.pop();return this.offset-et}endData(et=!1){if(enforce$5(typeof et=="boolean","zeroCopy","boolean"),this.stack.length===0)throw new Error("Cannot end without a stack item.");const nt=this.stack.pop(),rt=this.offset,it=rt-nt,ot=this.data;if(it===ot.length)return ot;if(this.zeroCopy||et)return ot.slice(nt,rt);const at=Buffer.allocUnsafeSlow(it);return ot.copy(at,0,nt,rt),at}destroy(){return this.data=EMPTY$1,this.offset=0,this.stack.length=0,this}readU8(){this.check(1);const et=this.data[this.offset];return this.offset+=1,et}readU16(){this.check(2);const et=encoding$3.readU16(this.data,this.offset);return this.offset+=2,et}readU16BE(){this.check(2);const et=encoding$3.readU16BE(this.data,this.offset);return this.offset+=2,et}readU24(){this.check(3);const et=encoding$3.readU24(this.data,this.offset);return this.offset+=3,et}readU24BE(){this.check(3);const et=encoding$3.readU24BE(this.data,this.offset);return this.offset+=3,et}readU32(){this.check(4);const et=encoding$3.readU32(this.data,this.offset);return this.offset+=4,et}readU32BE(){this.check(4);const et=encoding$3.readU32BE(this.data,this.offset);return this.offset+=4,et}readU40(){this.check(5);const et=encoding$3.readU40(this.data,this.offset);return this.offset+=5,et}readU40BE(){this.check(5);const et=encoding$3.readU40BE(this.data,this.offset);return this.offset+=5,et}readU48(){this.check(6);const et=encoding$3.readU48(this.data,this.offset);return this.offset+=6,et}readU48BE(){this.check(6);const et=encoding$3.readU48BE(this.data,this.offset);return this.offset+=6,et}readU56(){this.check(7);const et=encoding$3.readU56(this.data,this.offset);return this.offset+=7,et}readU56BE(){this.check(7);const et=encoding$3.readU56BE(this.data,this.offset);return this.offset+=7,et}readBigU56(){this.check(7);const et=encoding$3.readBigU56(this.data,this.offset);return this.offset+=7,et}readBigU56BE(){this.check(7);const et=encoding$3.readBigU56BE(this.data,this.offset);return this.offset+=7,et}readU64(){this.check(8);const et=encoding$3.readU64(this.data,this.offset);return this.offset+=8,et}readU64BE(){this.check(8);const et=encoding$3.readU64BE(this.data,this.offset);return this.offset+=8,et}readBigU64(){this.check(8);const et=encoding$3.readBigU64(this.data,this.offset);return this.offset+=8,et}readBigU64BE(){this.check(8);const et=encoding$3.readBigU64BE(this.data,this.offset);return this.offset+=8,et}readBigU128(){this.check(16);const et=encoding$3.readBigU128(this.data,this.offset);return this.offset+=16,et}readBigU128BE(){this.check(16);const et=encoding$3.readBigU128BE(this.data,this.offset);return this.offset+=16,et}readBigU256(){this.check(32);const et=encoding$3.readBigU256(this.data,this.offset);return this.offset+=32,et}readBigU256BE(){this.check(32);const et=encoding$3.readBigU256BE(this.data,this.offset);return this.offset+=32,et}readI8(){this.check(1);const et=encoding$3.readI8(this.data,this.offset);return this.offset+=1,et}readI16(){this.check(2);const et=encoding$3.readI16(this.data,this.offset);return this.offset+=2,et}readI16BE(){this.check(2);const et=encoding$3.readI16BE(this.data,this.offset);return this.offset+=2,et}readI24(){this.check(3);const et=encoding$3.readI24(this.data,this.offset);return this.offset+=3,et}readI24BE(){this.check(3);const et=encoding$3.readI24BE(this.data,this.offset);return this.offset+=3,et}readI32(){this.check(4);const et=encoding$3.readI32(this.data,this.offset);return this.offset+=4,et}readI32BE(){this.check(4);const et=encoding$3.readI32BE(this.data,this.offset);return this.offset+=4,et}readI40(){this.check(5);const et=encoding$3.readI40(this.data,this.offset);return this.offset+=5,et}readI40BE(){this.check(5);const et=encoding$3.readI40BE(this.data,this.offset);return this.offset+=5,et}readI48(){this.check(6);const et=encoding$3.readI48(this.data,this.offset);return this.offset+=6,et}readI48BE(){this.check(6);const et=encoding$3.readI48BE(this.data,this.offset);return this.offset+=6,et}readI56(){this.check(7);const et=encoding$3.readI56(this.data,this.offset);return this.offset+=7,et}readI56BE(){this.check(7);const et=encoding$3.readI56BE(this.data,this.offset);return this.offset+=7,et}readBigI56(){this.check(7);const et=encoding$3.readBigI56(this.data,this.offset);return this.offset+=7,et}readBigI56BE(){this.check(7);const et=encoding$3.readBigI56BE(this.data,this.offset);return this.offset+=7,et}readI64(){this.check(8);const et=encoding$3.readI64(this.data,this.offset);return this.offset+=8,et}readI64BE(){this.check(8);const et=encoding$3.readI64BE(this.data,this.offset);return this.offset+=8,et}readBigI64(){this.check(8);const et=encoding$3.readBigI64(this.data,this.offset);return this.offset+=8,et}readBigI64BE(){this.check(8);const et=encoding$3.readBigI64BE(this.data,this.offset);return this.offset+=8,et}readFloat(){this.check(4);const et=encoding$3.readFloat(this.data,this.offset);return this.offset+=4,et}readFloatBE(){this.check(4);const et=encoding$3.readFloatBE(this.data,this.offset);return this.offset+=4,et}readDouble(){this.check(8);const et=encoding$3.readDouble(this.data,this.offset);return this.offset+=8,et}readDoubleBE(){this.check(8);const et=encoding$3.readDoubleBE(this.data,this.offset);return this.offset+=8,et}readVarint(){const{size:et,value:nt}=encoding$3.readVarint(this.data,this.offset);return this.offset+=et,nt}readVarint2(){const{size:et,value:nt}=encoding$3.readVarint2(this.data,this.offset);return this.offset+=et,nt}readBytes(et,nt=!1){enforce$5(et>>>0===et,"size","integer"),enforce$5(typeof nt=="boolean","zeroCopy","boolean"),this.check(et);let rt;return this.zeroCopy||nt?rt=this.data.slice(this.offset,this.offset+et):(rt=Buffer.allocUnsafeSlow(et),this.data.copy(rt,0,this.offset,this.offset+et)),this.offset+=et,rt}readVarBytes(et=!1){return this.readBytes(this.readVarint(),et)}readChild(et){enforce$5(et>>>0===et,"size","integer"),this.check(et);const nt=this.data.slice(0,this.offset+et),rt=new this.constructor(nt);return rt.offset=this.offset,this.offset+=et,rt}readString(et,nt){nt==null&&(nt="binary"),enforce$5(et>>>0===et,"size","integer"),enforce$5(typeof nt=="string","enc","string"),this.check(et);const rt=this.data.toString(nt,this.offset,this.offset+et);return this.offset+=et,rt}readHash(et){return et?this.readString(32,et):this.readBytes(32)}readVarString(et,nt=0){et==null&&(et="binary"),enforce$5(typeof et=="string","enc","string"),enforce$5(nt>>>0===nt,"limit","integer");const rt=this.readVarint();if(nt!==0&&rt>nt)throw new EncodingError$3(this.offset,"String exceeds limit");return this.readString(rt,et)}readNullString(et){et==null&&(et="binary"),enforce$5(typeof et=="string","enc","string");let nt=this.offset;for(;nt0&&(nt=this.stack[this.stack.length-1]);const rt=this.data.slice(nt,this.offset),it=et.digest?et.digest(rt):et(rt);return encoding$3.readU32(it,0)}verifyChecksum(et){const nt=this.createChecksum(et),rt=this.readU32();if(nt!==rt)throw new EncodingError$3(this.offset,"Checksum mismatch");return nt}};var reader=BufferReader$3;/*! * writer.js - buffer writer for bcoin * Copyright (c) 2014-2015, Fedor Indutny (MIT License) * Copyright (c) 2014-2017, Christopher Jeffrey (MIT License). @@ -546,7 +546,7 @@ PROCEED WITH CAUTION! color: ${colors.GRAY6}; cursor: pointer; z-index: 1; -`,BaseModal=({background:tt="modalBg",children:et,id:nt,hideBg:rt,kind:it,preventOutsideClose:ot,noWrap:at=!1,onClose:st})=>{const{visible:lt,close:ct}=useModal(nt);return lt?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Bg,{align:"center",hideBg:rt,justify:"center",onClick:ut=>{ot||(ut.stopPropagation(),ct())},children:jsxRuntimeExports.jsxs(ModalContainer,{background:tt,borderRadius:9,id:nt,kind:it,onClick:ut=>{ut.stopPropagation()},px:at?0:20,py:at?0:20,children:[st&&jsxRuntimeExports.jsx(CloseButton$7,{onClick:st,children:jsxRuntimeExports.jsx(ClearIcon$1,{})}),et]})})}):null},{origin:origin$1,host}=window.location,isDevelopment=origin$1==="http://localhost:3000"||origin$1==="http://localhost:3001"||origin$1==="https://sphinx-jarvis-david.sphinx1.repl.co",getUrlFormEnv=()=>({}).VITE_APP_API_URL,API_URL=getUrlFormEnv()||apiUrlFromSwarmHost()||"https://knowledge-graph.sphinx.chat";console.log("🚀 ~ file: index.ts:12 ~ API_URL:",API_URL);console.log("🚀 ~ file: index.ts:12 ~ getUrlFormEnv:",getUrlFormEnv());const isChileGraph=API_URL.includes("boltwall");function apiUrlFromSwarmHost(){if(host.includes("swarm")&&host.startsWith("nav")){const tt=host.split(".");tt[0]="boltwall";const nt=`https://${tt.join(".")}`;return console.log("API URL:",nt),nt}}const AWS_IMAGE_BUCKET_URL="https://stakwork-uploads.s3.amazonaws.com/",CLOUDFRONT_IMAGE_BUCKET_URL="https://d1gd7b7slyku8k.cloudfront.net/",GRAPH_FOG_COLOR="blue",GRAPH_GROUND_COLOR=13421772,GRAPH_LIGHT_INTENSITY=.8,BOOST_SUCCESS="Boosted successfully",BOOST_ERROR_BUDGET="Boost failed, insufficient budget",NODE_ADD_SUCCESS="Submitted!",NODE_ADD_ERROR="Submission failed, please try again.",NODE_RELATIVE_HIGHLIGHT_COLORS={children:{nodeColor:"green",segmentColor:4063109},guests:{nodeColor:"purple",segmentColor:14504191},topics:{nodeColor:"purple",segmentColor:5273842},pathway:{nodeColor:"#ffffff",segmentColor:16777215}},LINK="link",TWITTER_HANDLE="twitter_handle",GITHUB_REPOSITORY="github_repository",YOUTUBE_CHANNEL="youtube_channel",WEB_PAGE="web_page",RSS="rss",TWITTER_SOURCE="tweet",TOPIC="topic",DOCUMENT="document",isE2E=!!{}.VITE_APP_IS_E2E,request=async(tt,et)=>{const nt=await fetch(tt,et);if(!nt.ok)throw nt;return nt.json()},api={delete:(tt,et)=>request(`${API_URL}${tt}`,{headers:{...et,"Content-Type":"application/json"},method:"DELETE"}),get:(tt,et)=>request(`${API_URL}${tt}`,et?{headers:et}:void 0),post:(tt,et,nt)=>request(`${API_URL}${tt}`,{body:et,headers:{...nt,"Content-Type":"application/json"},method:"POST"}),put:(tt,et,nt)=>request(`${API_URL}${tt}`,{body:et,headers:{...nt,"Content-Type":"application/json"},method:"PUT"})},defaultParams={skip:"0",limit:"500"},getRadarData=async(tt=defaultParams)=>await api.get(`/radar?${new URLSearchParams({...defaultParams,...tt}).toString()}`),getTopicsData=async(tt=defaultParams)=>await api.get(`/topics?${new URLSearchParams({...defaultParams,...tt}).toString()}`),getAboutData=async()=>await api.get("/about"),postAboutData=async tt=>await api.post("/about",JSON.stringify(tt)),triggerRadarJob=async()=>api.get("/radar/trigger-job"),putRadarData=async(tt,et)=>await api.put(`/radar/${tt}`,JSON.stringify(et)),putNodeData=async tt=>await api.put("/node",JSON.stringify(tt)),approveRadarData=async(tt,et)=>await api.put(`/radar/${tt}/approve`,JSON.stringify({approve:"True",pubkey:et})),deleteRadarData=async tt=>await api.delete(`/radar/${tt}`),defaultData$9={isAdmin:!1,pubKey:"",budget:0},useUserStore=react(tt=>({...defaultData$9,setIsAdmin:et=>tt({isAdmin:et}),setPubKey:et=>tt({pubKey:et}),setBudget:et=>tt({budget:et})})),getLSat=async()=>{try{const tt=localStorage.getItem("lsat");if(tt){const nt=JSON.parse(tt);return lsatToken(nt.macaroon,nt.preimage)}if(await distExports$1.enable()){const nt=await distExports$1.getLsat();return nt.macaroon?(localStorage.setItem("lsat",JSON.stringify({macaroon:nt.macaroon,identifier:nt.identifier,preimage:nt.preimage})),lsatToken(nt.macaroon,nt.preimage)):""}return""}catch(tt){return console.warn(tt),""}};function lsatToken(tt,et){return`LSAT ${tt}:${et}`}var lib$2={},client={},errors={},__extends$1=commonjsGlobal&&commonjsGlobal.__extends||function(){var tt=function(et,nt){return tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(rt,it){rt.__proto__=it}||function(rt,it){for(var ot in it)Object.prototype.hasOwnProperty.call(it,ot)&&(rt[ot]=it[ot])},tt(et,nt)};return function(et,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Class extends value "+String(nt)+" is not a constructor or null");tt(et,nt);function rt(){this.constructor=et}et.prototype=nt===null?Object.create(nt):(rt.prototype=nt.prototype,new rt)}}();Object.defineProperty(errors,"__esModule",{value:!0});errors.InternalError=errors.InvalidDataError=errors.RoutingError=errors.UnsupportedMethodError=errors.ConnectionError=errors.RejectionError=errors.MissingProviderError=void 0;function fixError(tt,et,nt){if(Object.setPrototypeOf(tt,nt.prototype),et===nt)if(tt.name=et.name,Error.captureStackTrace)Error.captureStackTrace(tt,nt);else{var rt=new Error(tt.message).stack;rt&&(tt.stack=fixStack(rt,"new ".concat(et.name)))}}function fixStack(tt,et){if(!tt||!et)return tt;var nt=new RegExp("\\s+at\\s".concat(et,"\\s")),rt=tt.split(` +`,BaseModal=({background:tt="modalBg",children:et,id:nt,hideBg:rt,kind:it,preventOutsideClose:ot,noWrap:at=!1,onClose:st})=>{const{visible:lt,close:ct}=useModal(nt);return lt?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Bg,{align:"center",hideBg:rt,justify:"center",onClick:ut=>{ot||(ut.stopPropagation(),ct())},children:jsxRuntimeExports.jsxs(ModalContainer,{background:tt,borderRadius:9,id:nt,kind:it,onClick:ut=>{ut.stopPropagation()},px:at?0:20,py:at?0:20,children:[st&&jsxRuntimeExports.jsx(CloseButton$7,{onClick:st,children:jsxRuntimeExports.jsx(ClearIcon$1,{})}),et]})})}):null},{origin:origin$1,host}=window.location,isDevelopment=origin$1==="http://localhost:3000"||origin$1==="http://localhost:3001"||origin$1==="https://sphinx-jarvis-david.sphinx1.repl.co",getUrlFormEnv=()=>({}).VITE_APP_API_URL,API_URL=getUrlFormEnv()||apiUrlFromSwarmHost()||"https://knowledge-graph.sphinx.chat";console.log("🚀 ~ file: index.ts:12 ~ API_URL:",API_URL);console.log("🚀 ~ file: index.ts:12 ~ getUrlFormEnv:",getUrlFormEnv());const isChileGraph=API_URL.includes("boltwall");function apiUrlFromSwarmHost(){if(host.includes("swarm")&&host.startsWith("nav")){const tt=host.split(".");tt[0]="boltwall";const nt=`https://${tt.join(".")}`;return console.log("API URL:",nt),nt}}const AWS_IMAGE_BUCKET_URL="https://stakwork-uploads.s3.amazonaws.com/",CLOUDFRONT_IMAGE_BUCKET_URL="https://d1gd7b7slyku8k.cloudfront.net/",GRAPH_FOG_COLOR="blue",GRAPH_GROUND_COLOR=13421772,GRAPH_LIGHT_INTENSITY=.8,BOOST_SUCCESS="Boosted successfully",BOOST_ERROR_BUDGET="Boost failed, insufficient budget",NODE_ADD_SUCCESS="Submitted!",NODE_ADD_ERROR="Submission failed, please try again.",DEFAULT$1="default",DATE$1="date",EDGES="edges",NODE_RELATIVE_HIGHLIGHT_COLORS={children:{nodeColor:"green",segmentColor:4063109},guests:{nodeColor:"purple",segmentColor:14504191},topics:{nodeColor:"purple",segmentColor:5273842},pathway:{nodeColor:"#ffffff",segmentColor:16777215}},LINK="link",TWITTER_HANDLE="twitter_handle",GITHUB_REPOSITORY="github_repository",YOUTUBE_CHANNEL="youtube_channel",WEB_PAGE="web_page",RSS="rss",TWITTER_SOURCE="tweet",TOPIC="topic",DOCUMENT="document",isE2E=!!{}.VITE_APP_IS_E2E,request=async(tt,et)=>{const nt=await fetch(tt,et);if(!nt.ok)throw nt;return nt.json()},api={delete:(tt,et)=>request(`${API_URL}${tt}`,{headers:{...et,"Content-Type":"application/json"},method:"DELETE"}),get:(tt,et)=>request(`${API_URL}${tt}`,et?{headers:et}:void 0),post:(tt,et,nt)=>request(`${API_URL}${tt}`,{body:et,headers:{...nt,"Content-Type":"application/json"},method:"POST"}),put:(tt,et,nt)=>request(`${API_URL}${tt}`,{body:et,headers:{...nt,"Content-Type":"application/json"},method:"PUT"})},defaultParams={skip:"0",limit:"500"},getRadarData=async(tt=defaultParams)=>await api.get(`/radar?${new URLSearchParams({...defaultParams,...tt}).toString()}`),getTopicsData=async(tt=defaultParams)=>await api.get(`/topics?${new URLSearchParams({...defaultParams,...tt}).toString()}`),getAboutData=async()=>await api.get("/about"),postAboutData=async tt=>await api.post("/about",JSON.stringify(tt)),triggerRadarJob=async()=>api.get("/radar/trigger-job"),putRadarData=async(tt,et)=>await api.put(`/radar/${tt}`,JSON.stringify(et)),putNodeData=async tt=>await api.put("/node",JSON.stringify(tt)),approveRadarData=async(tt,et)=>await api.put(`/radar/${tt}/approve`,JSON.stringify({approve:"True",pubkey:et})),deleteRadarData=async tt=>await api.delete(`/radar/${tt}`),defaultData$9={isAdmin:!1,pubKey:"",budget:0},useUserStore=react(tt=>({...defaultData$9,setIsAdmin:et=>tt({isAdmin:et}),setPubKey:et=>tt({pubKey:et}),setBudget:et=>tt({budget:et})})),getLSat=async()=>{try{const tt=localStorage.getItem("lsat");if(tt){const nt=JSON.parse(tt);return lsatToken(nt.macaroon,nt.preimage)}if(await distExports$1.enable()){const nt=await distExports$1.getLsat();return nt.macaroon?(localStorage.setItem("lsat",JSON.stringify({macaroon:nt.macaroon,identifier:nt.identifier,preimage:nt.preimage})),lsatToken(nt.macaroon,nt.preimage)):""}return""}catch(tt){return console.warn(tt),""}};function lsatToken(tt,et){return`LSAT ${tt}:${et}`}var lib$2={},client={},errors={},__extends$1=commonjsGlobal&&commonjsGlobal.__extends||function(){var tt=function(et,nt){return tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(rt,it){rt.__proto__=it}||function(rt,it){for(var ot in it)Object.prototype.hasOwnProperty.call(it,ot)&&(rt[ot]=it[ot])},tt(et,nt)};return function(et,nt){if(typeof nt!="function"&&nt!==null)throw new TypeError("Class extends value "+String(nt)+" is not a constructor or null");tt(et,nt);function rt(){this.constructor=et}et.prototype=nt===null?Object.create(nt):(rt.prototype=nt.prototype,new rt)}}();Object.defineProperty(errors,"__esModule",{value:!0});errors.InternalError=errors.InvalidDataError=errors.RoutingError=errors.UnsupportedMethodError=errors.ConnectionError=errors.RejectionError=errors.MissingProviderError=void 0;function fixError(tt,et,nt){if(Object.setPrototypeOf(tt,nt.prototype),et===nt)if(tt.name=et.name,Error.captureStackTrace)Error.captureStackTrace(tt,nt);else{var rt=new Error(tt.message).stack;rt&&(tt.stack=fixStack(rt,"new ".concat(et.name)))}}function fixStack(tt,et){if(!tt||!et)return tt;var nt=new RegExp("\\s+at\\s".concat(et,"\\s")),rt=tt.split(` `),it=rt.filter(function(ot){return!ot.match(nt)});return it.join(` `)}var MissingProviderError=function(tt){__extends$1(et,tt);function et(nt){var rt=this.constructor,it=tt.call(this,nt)||this;return fixError(it,rt,et),it}return et}(Error);errors.MissingProviderError=MissingProviderError;var RejectionError=function(tt){__extends$1(et,tt);function et(nt){var rt=this.constructor,it=tt.call(this,nt)||this;return fixError(it,rt,et),it}return et}(Error);errors.RejectionError=RejectionError;var ConnectionError=function(tt){__extends$1(et,tt);function et(nt){var rt=this.constructor,it=tt.call(this,nt)||this;return fixError(it,rt,et),it}return et}(Error);errors.ConnectionError=ConnectionError;var UnsupportedMethodError=function(tt){__extends$1(et,tt);function et(nt){var rt=this.constructor,it=tt.call(this,nt)||this;return fixError(it,rt,et),it}return et}(Error);errors.UnsupportedMethodError=UnsupportedMethodError;var RoutingError=function(tt){__extends$1(et,tt);function et(nt){var rt=this.constructor,it=tt.call(this,nt)||this;return fixError(it,rt,et),it}return et}(Error);errors.RoutingError=RoutingError;var InvalidDataError=function(tt){__extends$1(et,tt);function et(nt){var rt=this.constructor,it=tt.call(this,nt)||this;return fixError(it,rt,et),it}return et}(Error);errors.InvalidDataError=InvalidDataError;var InternalError=function(tt){__extends$1(et,tt);function et(nt){var rt=this.constructor,it=tt.call(this,nt)||this;return fixError(it,rt,et),it}return et}(Error);errors.InternalError=InternalError;Object.defineProperty(client,"__esModule",{value:!0});client.requestProvider=void 0;var errors_1=errors;function requestProvider(tt){return new Promise(function(et,nt){if(typeof window>"u")return nt(new Error("Must be called in a browser context"));var rt=window.webln;if(!rt)return nt(new errors_1.MissingProviderError("Your browser has no WebLN provider"));rt.enable().then(function(){return et(rt)}).catch(function(it){return nt(it)})})}client.requestProvider=requestProvider;var provider={};Object.defineProperty(provider,"__esModule",{value:!0});(function(tt){var et=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(rt,it,ot,at){at===void 0&&(at=ot);var st=Object.getOwnPropertyDescriptor(it,ot);(!st||("get"in st?!it.__esModule:st.writable||st.configurable))&&(st={enumerable:!0,get:function(){return it[ot]}}),Object.defineProperty(rt,at,st)}:function(rt,it,ot,at){at===void 0&&(at=ot),rt[at]=it[ot]}),nt=commonjsGlobal&&commonjsGlobal.__exportStar||function(rt,it){for(var ot in rt)ot!=="default"&&!Object.prototype.hasOwnProperty.call(it,ot)&&et(it,rt,ot)};Object.defineProperty(tt,"__esModule",{value:!0}),nt(client,tt),nt(provider,tt),nt(errors,tt)})(lib$2);async function payLsat(tt){if(await distExports$1.enable()){const it=localStorage.getItem("lsat");if(it){localStorage.removeItem("lsat");const at=JSON.parse(it);await distExports$1.updateLsat(at.identifier,"expired")}const ot=await distExports$1.saveLsat(tt.invoice,tt.baseMacaroon,window.location.host);ot.success===!1&&await distExports$1.topup(),localStorage.setItem("lsat",JSON.stringify({macaroon:tt.baseMacaroon,identifier:tt.id,preimage:ot.lsat.split(":")[1]}));return}localStorage.removeItem("lsat");const rt=await(await lib$2.requestProvider()).sendPayment(tt.invoice);localStorage.setItem("lsat",JSON.stringify({macaroon:tt.baseMacaroon,identifier:tt.id,preimage:rt.preimage}))}async function updateBudget(tt){const et=await distExports$1.getBudget();(et==null?void 0:et.msg)==="Invalid Action"?tt(null):et!=null&&et.budget&&tt(et.budget)}const executeIfTetsRunning=tt=>{isE2E&&tt()};function executeIfProd(tt){return isDevelopment||isE2E?null:tt()}function addToGlobalForE2e(tt,et){executeIfTetsRunning(()=>{window.e2e||(window.e2e={}),window.e2e[et]=tt})}const E2E=()=>{const tt=useUserStore();return reactExports.useEffect(()=>{isE2E&&(console.log({isE2E}),addToGlobalForE2e(tt,"userStore"))},[tt]),jsxRuntimeExports.jsx("div",{id:"e2e-check"})},E2ETests=reactExports.memo(()=>isE2E?jsxRuntimeExports.jsx(E2E,{}):null);function timeToMilliseconds(tt){const[et,nt,rt]=tt.split(":").map(Number);return Number((et*60*60*1e3+nt*60*1e3+rt*1e3).toFixed(6))}/** * @license @@ -5204,7 +5204,7 @@ uniform lowp sampler2D inputBuffer;uniform lowp sampler2D supportBuffer; #endif uniform float radius;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vec4 c=vec4(0.0);c+=texture2D(inputBuffer,vUv0)*0.0625;c+=texture2D(inputBuffer,vUv1)*0.125;c+=texture2D(inputBuffer,vUv2)*0.0625;c+=texture2D(inputBuffer,vUv3)*0.125;c+=texture2D(inputBuffer,vUv)*0.25;c+=texture2D(inputBuffer,vUv4)*0.125;c+=texture2D(inputBuffer,vUv5)*0.0625;c+=texture2D(inputBuffer,vUv6)*0.125;c+=texture2D(inputBuffer,vUv7)*0.0625;vec4 baseColor=texture2D(supportBuffer,vUv);gl_FragColor=mix(baseColor,c,radius); #include -}`,convolution_upsampling_default2="uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}",UpsamplingMaterial=class extends ShaderMaterial{constructor(){super({name:"UpsamplingMaterial",uniforms:{inputBuffer:new Uniform(null),supportBuffer:new Uniform(null),texelSize:new Uniform(new Vector2),radius:new Uniform(.85)},blending:NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:convolution_upsampling_default,vertexShader:convolution_upsampling_default2}),this.fragmentShader=updateFragmentShader(this.fragmentShader)}set inputBuffer(tt){this.uniforms.inputBuffer.value=tt}set supportBuffer(tt){this.uniforms.supportBuffer.value=tt}get radius(){return this.uniforms.radius.value}set radius(tt){this.uniforms.radius.value=tt}setSize(tt,et){this.uniforms.texelSize.value.set(1/tt,1/et)}},dummyCamera=new Camera,geometry=null;function getFullscreenTriangle(){if(geometry===null){const tt=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),et=new Float32Array([0,0,2,0,0,2]);geometry=new BufferGeometry,geometry.setAttribute!==void 0?(geometry.setAttribute("position",new BufferAttribute(tt,3)),geometry.setAttribute("uv",new BufferAttribute(et,2))):(geometry.addAttribute("position",new BufferAttribute(tt,3)),geometry.addAttribute("uv",new BufferAttribute(et,2)))}return geometry}var Pass=class yw{constructor(et="Pass",nt=new Scene,rt=dummyCamera){this.name=et,this.renderer=null,this.scene=nt,this.camera=rt,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthTexture=!1,this.enabled=!0}get renderToScreen(){return!this.rtt}set renderToScreen(et){if(this.rtt===et){const nt=this.fullscreenMaterial;nt!==null&&(nt.needsUpdate=!0),this.rtt=!et}}set mainScene(et){}set mainCamera(et){}setRenderer(et){this.renderer=et}isEnabled(){return this.enabled}setEnabled(et){this.enabled=et}get fullscreenMaterial(){return this.screen!==null?this.screen.material:null}set fullscreenMaterial(et){let nt=this.screen;nt!==null?nt.material=et:(nt=new Mesh(getFullscreenTriangle(),et),nt.frustumCulled=!1,this.scene===null&&(this.scene=new Scene),this.scene.add(nt),this.screen=nt)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(et){this.fullscreenMaterial=et}getDepthTexture(){return null}setDepthTexture(et,nt=BasicDepthPacking){}render(et,nt,rt,it,ot){throw new Error("Render method not implemented!")}setSize(et,nt){}initialize(et,nt,rt){}dispose(){for(const et of Object.keys(this)){const nt=this[et];(nt instanceof WebGLRenderTarget||nt instanceof Material||nt instanceof Texture||nt instanceof yw)&&this[et].dispose()}}},CopyPass=class extends Pass{constructor(tt,et=!0){super("CopyPass"),this.fullscreenMaterial=new CopyMaterial,this.needsSwap=!1,this.renderTarget=tt,tt===void 0&&(this.renderTarget=new WebGLRenderTarget(1,1,{minFilter:LinearFilter,magFilter:LinearFilter,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="CopyPass.Target"),this.autoResize=et}get resize(){return this.autoResize}set resize(tt){this.autoResize=tt}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(tt){this.autoResize=tt}render(tt,et,nt,rt,it){this.fullscreenMaterial.inputBuffer=et.texture,tt.setRenderTarget(this.renderToScreen?null:this.renderTarget),tt.render(this.scene,this.camera)}setSize(tt,et){this.autoResize&&this.renderTarget.setSize(tt,et)}initialize(tt,et,nt){nt!==void 0&&(this.renderTarget.texture.type=nt,nt!==UnsignedByteType?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":getOutputColorSpace(tt)===SRGBColorSpace&&setTextureColorSpace(this.renderTarget.texture,SRGBColorSpace))}},ClearMaskPass=class extends Pass{constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}render(tt,et,nt,rt,it){const ot=tt.state.buffers.stencil;ot.setLocked(!1),ot.setTest(!1)}},color$1=new Color$1,ClearPass=class extends Pass{constructor(tt=!0,et=!0,nt=!1){super("ClearPass",null,null),this.needsSwap=!1,this.color=tt,this.depth=et,this.stencil=nt,this.overrideClearColor=null,this.overrideClearAlpha=-1}setClearFlags(tt,et,nt){this.color=tt,this.depth=et,this.stencil=nt}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(tt){this.overrideClearColor=tt}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(tt){this.overrideClearAlpha=tt}render(tt,et,nt,rt,it){const ot=this.overrideClearColor,at=this.overrideClearAlpha,st=tt.getClearAlpha(),lt=ot!==null,ct=at>=0;lt?(tt.getClearColor(color$1),tt.setClearColor(ot,ct?at:st)):ct&&tt.setClearAlpha(at),tt.setRenderTarget(this.renderToScreen?null:et),tt.clear(this.color,this.depth,this.stencil),lt?tt.setClearColor(color$1,st):ct&&tt.setClearAlpha(st)}},RenderPass=class extends Pass{constructor(tt,et,nt=null){super("RenderPass",tt,et),this.needsSwap=!1,this.clearPass=new ClearPass,this.overrideMaterialManager=nt===null?null:new OverrideMaterialManager(nt),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}set mainScene(tt){this.scene=tt}set mainCamera(tt){this.camera=tt}get renderToScreen(){return super.renderToScreen}set renderToScreen(tt){super.renderToScreen=tt,this.clearPass.renderToScreen=tt}get overrideMaterial(){const tt=this.overrideMaterialManager;return tt!==null?tt.material:null}set overrideMaterial(tt){const et=this.overrideMaterialManager;tt!==null?et!==null?et.setMaterial(tt):this.overrideMaterialManager=new OverrideMaterialManager(tt):et!==null&&(et.dispose(),this.overrideMaterialManager=null)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(tt){this.overrideMaterial=tt}get clear(){return this.clearPass.enabled}set clear(tt){this.clearPass.enabled=tt}getSelection(){return this.selection}setSelection(tt){this.selection=tt}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(tt){this.ignoreBackground=tt}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(tt){this.skipShadowMapUpdate=tt}getClearPass(){return this.clearPass}render(tt,et,nt,rt,it){const ot=this.scene,at=this.camera,st=this.selection,lt=at.layers.mask,ct=ot.background,ut=tt.shadowMap.autoUpdate,ht=this.renderToScreen?null:et;st!==null&&at.layers.set(st.getLayer()),this.skipShadowMapUpdate&&(tt.shadowMap.autoUpdate=!1),(this.ignoreBackground||this.clearPass.overrideClearColor!==null)&&(ot.background=null),this.clearPass.enabled&&this.clearPass.render(tt,et),tt.setRenderTarget(ht),this.overrideMaterialManager!==null?this.overrideMaterialManager.render(tt,ot,at):tt.render(ot,at),at.layers.mask=lt,ot.background=ct,tt.shadowMap.autoUpdate=ut}},DepthPass=class extends Pass{constructor(tt,et,{renderTarget:nt,resolutionScale:rt=1,width:it=Resolution.AUTO_SIZE,height:ot=Resolution.AUTO_SIZE,resolutionX:at=it,resolutionY:st=ot}={}){super("DepthPass"),this.needsSwap=!1,this.renderPass=new RenderPass(tt,et,new MeshDepthMaterial({depthPacking:RGBADepthPacking}));const lt=this.renderPass;lt.skipShadowMapUpdate=!0,lt.ignoreBackground=!0;const ct=lt.clearPass;ct.overrideClearColor=new Color$1(16777215),ct.overrideClearAlpha=1,this.renderTarget=nt,this.renderTarget===void 0&&(this.renderTarget=new WebGLRenderTarget(1,1,{minFilter:NearestFilter,magFilter:NearestFilter}),this.renderTarget.texture.name="DepthPass.Target");const ut=this.resolution=new Resolution(this,at,st,rt);ut.addEventListener("change",ht=>this.setSize(ut.baseWidth,ut.baseHeight))}set mainScene(tt){this.renderPass.mainScene=tt}set mainCamera(tt){this.renderPass.mainCamera=tt}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(tt){this.resolution.scale=tt}render(tt,et,nt,rt,it){const ot=this.renderToScreen?null:this.renderTarget;this.renderPass.render(tt,ot)}setSize(tt,et){const nt=this.resolution;nt.setBaseSize(tt,et),this.renderTarget.setSize(nt.width,nt.height)}},DepthDownsamplingPass=class extends Pass{constructor({normalBuffer:tt=null,resolutionScale:et=.5,width:nt=Resolution.AUTO_SIZE,height:rt=Resolution.AUTO_SIZE,resolutionX:it=nt,resolutionY:ot=rt}={}){super("DepthDownsamplingPass");const at=new DepthDownsamplingMaterial;at.normalBuffer=tt,this.fullscreenMaterial=at,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new WebGLRenderTarget(1,1,{minFilter:NearestFilter,magFilter:NearestFilter,depthBuffer:!1,type:FloatType}),this.renderTarget.texture.name="DepthDownsamplingPass.Target",this.renderTarget.texture.generateMipmaps=!1;const st=this.resolution=new Resolution(this,it,ot,et);st.addEventListener("change",lt=>this.setSize(st.baseWidth,st.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}setDepthTexture(tt,et=BasicDepthPacking){this.fullscreenMaterial.depthBuffer=tt,this.fullscreenMaterial.depthPacking=et}render(tt,et,nt,rt,it){tt.setRenderTarget(this.renderToScreen?null:this.renderTarget),tt.render(this.scene,this.camera)}setSize(tt,et){const nt=this.resolution;nt.setBaseSize(tt,et),this.renderTarget.setSize(nt.width,nt.height),this.fullscreenMaterial.setSize(tt,et)}initialize(tt,et,nt){const rt=tt.getContext();if(!(rt.getExtension("EXT_color_buffer_float")||rt.getExtension("EXT_color_buffer_half_float")))throw new Error("Rendering to float texture is not supported.")}},DepthCopyPass=class extends Pass{constructor({depthPacking:tt=RGBADepthPacking}={}){super("DepthCopyPass");const et=new DepthCopyMaterial;et.outputDepthPacking=tt,this.fullscreenMaterial=et,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new WebGLRenderTarget(1,1,{type:tt===RGBADepthPacking?UnsignedByteType:FloatType,minFilter:NearestFilter,magFilter:NearestFilter,depthBuffer:!1}),this.renderTarget.texture.name="DepthCopyPass.Target"}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}get depthPacking(){return this.fullscreenMaterial.outputDepthPacking}getDepthPacking(){return this.fullscreenMaterial.outputDepthPacking}setDepthTexture(tt,et=BasicDepthPacking){this.fullscreenMaterial.depthBuffer=tt,this.fullscreenMaterial.inputDepthPacking=et}render(tt,et,nt,rt,it){tt.setRenderTarget(this.renderToScreen?null:this.renderTarget),tt.render(this.scene,this.camera)}setSize(tt,et){this.renderTarget.setSize(tt,et)}},unpackFactors=new Float32Array([255/256/256**3,255/256/256**2,255/256/256,255/256]);function unpackRGBAToDepth(tt){return(tt[0]*unpackFactors[0]+tt[1]*unpackFactors[1]+tt[2]*unpackFactors[2]+tt[3]*unpackFactors[3])/255}var DepthPickingPass=class extends DepthCopyPass{constructor({depthPacking:tt=RGBADepthPacking,mode:et=DepthCopyMode.SINGLE}={}){super({depthPacking:tt}),this.name="DepthPickingPass",this.fullscreenMaterial.mode=et,this.pixelBuffer=tt===RGBADepthPacking?new Uint8Array(4):new Float32Array(4),this.callback=null}readDepth(tt){return this.fullscreenMaterial.texelPosition.set(tt.x*.5+.5,tt.y*.5+.5),new Promise(et=>{this.callback=et})}render(tt,et,nt,rt,it){const ot=this.fullscreenMaterial,at=ot.mode;if(at===DepthCopyMode.FULL&&super.render(tt),this.callback!==null){const st=this.renderTarget,lt=this.pixelBuffer,ct=st.texture.type!==FloatType;let ut=0,ht=0;if(at===DepthCopyMode.SINGLE)super.render(tt);else{const dt=ot.texelPosition;ut=Math.round(dt.x*st.width),ht=Math.round(dt.y*st.height)}tt.readRenderTargetPixels(st,ut,ht,1,1,lt),this.callback(ct?unpackRGBAToDepth(lt):lt[0]),this.callback=null}}setSize(tt,et){this.fullscreenMaterial.mode===DepthCopyMode.FULL&&super.setSize(tt,et)}};function prefixSubstrings(tt,et,nt){for(const rt of et){const it="$1"+tt+rt.charAt(0).toUpperCase()+rt.slice(1),ot=new RegExp("([^\\.])(\\b"+rt+"\\b)","g");for(const at of nt.entries())at[1]!==null&&nt.set(at[0],at[1].replace(ot,it))}}function integrateEffect(tt,et,nt){let rt=et.getFragmentShader(),it=et.getVertexShader();const ot=rt!==void 0&&/mainImage/.test(rt),at=rt!==void 0&&/mainUv/.test(rt);if(nt.attributes|=et.getAttributes(),rt===void 0)throw new Error(`Missing fragment shader (${et.name})`);if(at&&nt.attributes&EffectAttribute.CONVOLUTION)throw new Error(`Effects that transform UVs are incompatible with convolution effects (${et.name})`);if(!ot&&!at)throw new Error(`Could not find mainImage or mainUv function (${et.name})`);{const st=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,lt=nt.shaderParts;let ct=lt.get(EffectShaderSection.FRAGMENT_HEAD)||"",ut=lt.get(EffectShaderSection.FRAGMENT_MAIN_UV)||"",ht=lt.get(EffectShaderSection.FRAGMENT_MAIN_IMAGE)||"",dt=lt.get(EffectShaderSection.VERTEX_HEAD)||"",pt=lt.get(EffectShaderSection.VERTEX_MAIN_SUPPORT)||"";const mt=new Set,gt=new Set;if(at&&(ut+=` ${tt}MainUv(UV); +}`,convolution_upsampling_default2="uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}",UpsamplingMaterial=class extends ShaderMaterial{constructor(){super({name:"UpsamplingMaterial",uniforms:{inputBuffer:new Uniform(null),supportBuffer:new Uniform(null),texelSize:new Uniform(new Vector2),radius:new Uniform(.85)},blending:NoBlending,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:convolution_upsampling_default,vertexShader:convolution_upsampling_default2}),this.fragmentShader=updateFragmentShader(this.fragmentShader)}set inputBuffer(tt){this.uniforms.inputBuffer.value=tt}set supportBuffer(tt){this.uniforms.supportBuffer.value=tt}get radius(){return this.uniforms.radius.value}set radius(tt){this.uniforms.radius.value=tt}setSize(tt,et){this.uniforms.texelSize.value.set(1/tt,1/et)}},dummyCamera=new Camera,geometry=null;function getFullscreenTriangle(){if(geometry===null){const tt=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),et=new Float32Array([0,0,2,0,0,2]);geometry=new BufferGeometry,geometry.setAttribute!==void 0?(geometry.setAttribute("position",new BufferAttribute(tt,3)),geometry.setAttribute("uv",new BufferAttribute(et,2))):(geometry.addAttribute("position",new BufferAttribute(tt,3)),geometry.addAttribute("uv",new BufferAttribute(et,2)))}return geometry}var Pass=class bw{constructor(et="Pass",nt=new Scene,rt=dummyCamera){this.name=et,this.renderer=null,this.scene=nt,this.camera=rt,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthTexture=!1,this.enabled=!0}get renderToScreen(){return!this.rtt}set renderToScreen(et){if(this.rtt===et){const nt=this.fullscreenMaterial;nt!==null&&(nt.needsUpdate=!0),this.rtt=!et}}set mainScene(et){}set mainCamera(et){}setRenderer(et){this.renderer=et}isEnabled(){return this.enabled}setEnabled(et){this.enabled=et}get fullscreenMaterial(){return this.screen!==null?this.screen.material:null}set fullscreenMaterial(et){let nt=this.screen;nt!==null?nt.material=et:(nt=new Mesh(getFullscreenTriangle(),et),nt.frustumCulled=!1,this.scene===null&&(this.scene=new Scene),this.scene.add(nt),this.screen=nt)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(et){this.fullscreenMaterial=et}getDepthTexture(){return null}setDepthTexture(et,nt=BasicDepthPacking){}render(et,nt,rt,it,ot){throw new Error("Render method not implemented!")}setSize(et,nt){}initialize(et,nt,rt){}dispose(){for(const et of Object.keys(this)){const nt=this[et];(nt instanceof WebGLRenderTarget||nt instanceof Material||nt instanceof Texture||nt instanceof bw)&&this[et].dispose()}}},CopyPass=class extends Pass{constructor(tt,et=!0){super("CopyPass"),this.fullscreenMaterial=new CopyMaterial,this.needsSwap=!1,this.renderTarget=tt,tt===void 0&&(this.renderTarget=new WebGLRenderTarget(1,1,{minFilter:LinearFilter,magFilter:LinearFilter,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="CopyPass.Target"),this.autoResize=et}get resize(){return this.autoResize}set resize(tt){this.autoResize=tt}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(tt){this.autoResize=tt}render(tt,et,nt,rt,it){this.fullscreenMaterial.inputBuffer=et.texture,tt.setRenderTarget(this.renderToScreen?null:this.renderTarget),tt.render(this.scene,this.camera)}setSize(tt,et){this.autoResize&&this.renderTarget.setSize(tt,et)}initialize(tt,et,nt){nt!==void 0&&(this.renderTarget.texture.type=nt,nt!==UnsignedByteType?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":getOutputColorSpace(tt)===SRGBColorSpace&&setTextureColorSpace(this.renderTarget.texture,SRGBColorSpace))}},ClearMaskPass=class extends Pass{constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}render(tt,et,nt,rt,it){const ot=tt.state.buffers.stencil;ot.setLocked(!1),ot.setTest(!1)}},color$1=new Color$1,ClearPass=class extends Pass{constructor(tt=!0,et=!0,nt=!1){super("ClearPass",null,null),this.needsSwap=!1,this.color=tt,this.depth=et,this.stencil=nt,this.overrideClearColor=null,this.overrideClearAlpha=-1}setClearFlags(tt,et,nt){this.color=tt,this.depth=et,this.stencil=nt}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(tt){this.overrideClearColor=tt}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(tt){this.overrideClearAlpha=tt}render(tt,et,nt,rt,it){const ot=this.overrideClearColor,at=this.overrideClearAlpha,st=tt.getClearAlpha(),lt=ot!==null,ct=at>=0;lt?(tt.getClearColor(color$1),tt.setClearColor(ot,ct?at:st)):ct&&tt.setClearAlpha(at),tt.setRenderTarget(this.renderToScreen?null:et),tt.clear(this.color,this.depth,this.stencil),lt?tt.setClearColor(color$1,st):ct&&tt.setClearAlpha(st)}},RenderPass=class extends Pass{constructor(tt,et,nt=null){super("RenderPass",tt,et),this.needsSwap=!1,this.clearPass=new ClearPass,this.overrideMaterialManager=nt===null?null:new OverrideMaterialManager(nt),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}set mainScene(tt){this.scene=tt}set mainCamera(tt){this.camera=tt}get renderToScreen(){return super.renderToScreen}set renderToScreen(tt){super.renderToScreen=tt,this.clearPass.renderToScreen=tt}get overrideMaterial(){const tt=this.overrideMaterialManager;return tt!==null?tt.material:null}set overrideMaterial(tt){const et=this.overrideMaterialManager;tt!==null?et!==null?et.setMaterial(tt):this.overrideMaterialManager=new OverrideMaterialManager(tt):et!==null&&(et.dispose(),this.overrideMaterialManager=null)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(tt){this.overrideMaterial=tt}get clear(){return this.clearPass.enabled}set clear(tt){this.clearPass.enabled=tt}getSelection(){return this.selection}setSelection(tt){this.selection=tt}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(tt){this.ignoreBackground=tt}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(tt){this.skipShadowMapUpdate=tt}getClearPass(){return this.clearPass}render(tt,et,nt,rt,it){const ot=this.scene,at=this.camera,st=this.selection,lt=at.layers.mask,ct=ot.background,ut=tt.shadowMap.autoUpdate,ht=this.renderToScreen?null:et;st!==null&&at.layers.set(st.getLayer()),this.skipShadowMapUpdate&&(tt.shadowMap.autoUpdate=!1),(this.ignoreBackground||this.clearPass.overrideClearColor!==null)&&(ot.background=null),this.clearPass.enabled&&this.clearPass.render(tt,et),tt.setRenderTarget(ht),this.overrideMaterialManager!==null?this.overrideMaterialManager.render(tt,ot,at):tt.render(ot,at),at.layers.mask=lt,ot.background=ct,tt.shadowMap.autoUpdate=ut}},DepthPass=class extends Pass{constructor(tt,et,{renderTarget:nt,resolutionScale:rt=1,width:it=Resolution.AUTO_SIZE,height:ot=Resolution.AUTO_SIZE,resolutionX:at=it,resolutionY:st=ot}={}){super("DepthPass"),this.needsSwap=!1,this.renderPass=new RenderPass(tt,et,new MeshDepthMaterial({depthPacking:RGBADepthPacking}));const lt=this.renderPass;lt.skipShadowMapUpdate=!0,lt.ignoreBackground=!0;const ct=lt.clearPass;ct.overrideClearColor=new Color$1(16777215),ct.overrideClearAlpha=1,this.renderTarget=nt,this.renderTarget===void 0&&(this.renderTarget=new WebGLRenderTarget(1,1,{minFilter:NearestFilter,magFilter:NearestFilter}),this.renderTarget.texture.name="DepthPass.Target");const ut=this.resolution=new Resolution(this,at,st,rt);ut.addEventListener("change",ht=>this.setSize(ut.baseWidth,ut.baseHeight))}set mainScene(tt){this.renderPass.mainScene=tt}set mainCamera(tt){this.renderPass.mainCamera=tt}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(tt){this.resolution.scale=tt}render(tt,et,nt,rt,it){const ot=this.renderToScreen?null:this.renderTarget;this.renderPass.render(tt,ot)}setSize(tt,et){const nt=this.resolution;nt.setBaseSize(tt,et),this.renderTarget.setSize(nt.width,nt.height)}},DepthDownsamplingPass=class extends Pass{constructor({normalBuffer:tt=null,resolutionScale:et=.5,width:nt=Resolution.AUTO_SIZE,height:rt=Resolution.AUTO_SIZE,resolutionX:it=nt,resolutionY:ot=rt}={}){super("DepthDownsamplingPass");const at=new DepthDownsamplingMaterial;at.normalBuffer=tt,this.fullscreenMaterial=at,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new WebGLRenderTarget(1,1,{minFilter:NearestFilter,magFilter:NearestFilter,depthBuffer:!1,type:FloatType}),this.renderTarget.texture.name="DepthDownsamplingPass.Target",this.renderTarget.texture.generateMipmaps=!1;const st=this.resolution=new Resolution(this,it,ot,et);st.addEventListener("change",lt=>this.setSize(st.baseWidth,st.baseHeight))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}setDepthTexture(tt,et=BasicDepthPacking){this.fullscreenMaterial.depthBuffer=tt,this.fullscreenMaterial.depthPacking=et}render(tt,et,nt,rt,it){tt.setRenderTarget(this.renderToScreen?null:this.renderTarget),tt.render(this.scene,this.camera)}setSize(tt,et){const nt=this.resolution;nt.setBaseSize(tt,et),this.renderTarget.setSize(nt.width,nt.height),this.fullscreenMaterial.setSize(tt,et)}initialize(tt,et,nt){const rt=tt.getContext();if(!(rt.getExtension("EXT_color_buffer_float")||rt.getExtension("EXT_color_buffer_half_float")))throw new Error("Rendering to float texture is not supported.")}},DepthCopyPass=class extends Pass{constructor({depthPacking:tt=RGBADepthPacking}={}){super("DepthCopyPass");const et=new DepthCopyMaterial;et.outputDepthPacking=tt,this.fullscreenMaterial=et,this.needsDepthTexture=!0,this.needsSwap=!1,this.renderTarget=new WebGLRenderTarget(1,1,{type:tt===RGBADepthPacking?UnsignedByteType:FloatType,minFilter:NearestFilter,magFilter:NearestFilter,depthBuffer:!1}),this.renderTarget.texture.name="DepthCopyPass.Target"}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}get depthPacking(){return this.fullscreenMaterial.outputDepthPacking}getDepthPacking(){return this.fullscreenMaterial.outputDepthPacking}setDepthTexture(tt,et=BasicDepthPacking){this.fullscreenMaterial.depthBuffer=tt,this.fullscreenMaterial.inputDepthPacking=et}render(tt,et,nt,rt,it){tt.setRenderTarget(this.renderToScreen?null:this.renderTarget),tt.render(this.scene,this.camera)}setSize(tt,et){this.renderTarget.setSize(tt,et)}},unpackFactors=new Float32Array([255/256/256**3,255/256/256**2,255/256/256,255/256]);function unpackRGBAToDepth(tt){return(tt[0]*unpackFactors[0]+tt[1]*unpackFactors[1]+tt[2]*unpackFactors[2]+tt[3]*unpackFactors[3])/255}var DepthPickingPass=class extends DepthCopyPass{constructor({depthPacking:tt=RGBADepthPacking,mode:et=DepthCopyMode.SINGLE}={}){super({depthPacking:tt}),this.name="DepthPickingPass",this.fullscreenMaterial.mode=et,this.pixelBuffer=tt===RGBADepthPacking?new Uint8Array(4):new Float32Array(4),this.callback=null}readDepth(tt){return this.fullscreenMaterial.texelPosition.set(tt.x*.5+.5,tt.y*.5+.5),new Promise(et=>{this.callback=et})}render(tt,et,nt,rt,it){const ot=this.fullscreenMaterial,at=ot.mode;if(at===DepthCopyMode.FULL&&super.render(tt),this.callback!==null){const st=this.renderTarget,lt=this.pixelBuffer,ct=st.texture.type!==FloatType;let ut=0,ht=0;if(at===DepthCopyMode.SINGLE)super.render(tt);else{const dt=ot.texelPosition;ut=Math.round(dt.x*st.width),ht=Math.round(dt.y*st.height)}tt.readRenderTargetPixels(st,ut,ht,1,1,lt),this.callback(ct?unpackRGBAToDepth(lt):lt[0]),this.callback=null}}setSize(tt,et){this.fullscreenMaterial.mode===DepthCopyMode.FULL&&super.setSize(tt,et)}};function prefixSubstrings(tt,et,nt){for(const rt of et){const it="$1"+tt+rt.charAt(0).toUpperCase()+rt.slice(1),ot=new RegExp("([^\\.])(\\b"+rt+"\\b)","g");for(const at of nt.entries())at[1]!==null&&nt.set(at[0],at[1].replace(ot,it))}}function integrateEffect(tt,et,nt){let rt=et.getFragmentShader(),it=et.getVertexShader();const ot=rt!==void 0&&/mainImage/.test(rt),at=rt!==void 0&&/mainUv/.test(rt);if(nt.attributes|=et.getAttributes(),rt===void 0)throw new Error(`Missing fragment shader (${et.name})`);if(at&&nt.attributes&EffectAttribute.CONVOLUTION)throw new Error(`Effects that transform UVs are incompatible with convolution effects (${et.name})`);if(!ot&&!at)throw new Error(`Could not find mainImage or mainUv function (${et.name})`);{const st=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,lt=nt.shaderParts;let ct=lt.get(EffectShaderSection.FRAGMENT_HEAD)||"",ut=lt.get(EffectShaderSection.FRAGMENT_MAIN_UV)||"",ht=lt.get(EffectShaderSection.FRAGMENT_MAIN_IMAGE)||"",dt=lt.get(EffectShaderSection.VERTEX_HEAD)||"",pt=lt.get(EffectShaderSection.VERTEX_MAIN_SUPPORT)||"";const mt=new Set,gt=new Set;if(at&&(ut+=` ${tt}MainUv(UV); `,nt.uvTransformation=!0),it!==null&&/mainSupport/.test(it)){const vt=/mainSupport *\([\w\s]*?uv\s*?\)/.test(it);pt+=` ${tt}MainSupport(`,pt+=vt?`vUv); `:`); `;for(const xt of it.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g))for(const kt of xt[1].split(/\s*,\s*/))nt.varyings.add(kt),mt.add(kt),gt.add(kt);for(const xt of it.matchAll(st))gt.add(xt[1])}for(const vt of rt.matchAll(st))gt.add(vt[1]);for(const vt of et.defines.keys())gt.add(vt.replace(/\([\w\s,]*\)/g,""));for(const vt of et.uniforms.keys())gt.add(vt);gt.delete("while"),gt.delete("for"),gt.delete("if"),et.uniforms.forEach((vt,xt)=>nt.uniforms.set(tt+xt.charAt(0).toUpperCase()+xt.slice(1),vt)),et.defines.forEach((vt,xt)=>nt.defines.set(tt+xt.charAt(0).toUpperCase()+xt.slice(1),vt));const yt=new Map([["fragment",rt],["vertex",it]]);prefixSubstrings(tt,gt,nt.defines),prefixSubstrings(tt,gt,yt),rt=yt.get("fragment"),it=yt.get("vertex");const bt=et.blendMode;if(nt.blendModes.set(bt.blendFunction,bt),ot){et.inputColorSpace!==null&&et.inputColorSpace!==nt.colorSpace&&(ht+=et.inputColorSpace===SRGBColorSpace?`color0 = LinearTosRGB(color0); @@ -5238,7 +5238,7 @@ vec2 cocNearFar=vec2(texture2D(nearCoCBuffer,uv).r,colorFar.a);cocNearFar.x=min( #else vec2 cocNearFar=vec2(texture2D(nearCoCBuffer,uv).r,texture2D(farCoCBuffer,uv).g);cocNearFar=min(cocNearFar*scale,1.0); #endif -vec4 result=inputColor*(1.0-cocNearFar.y)+colorFar;result=mix(result,colorNear,cocNearFar.x);outputColor=result;}`,DepthOfFieldEffect=class extends Effect$1{constructor(tt,{blendFunction:et,worldFocusDistance:nt,worldFocusRange:rt,focusDistance:it=0,focalLength:ot=.1,focusRange:at=ot,bokehScale:st=1,resolutionScale:lt=1,width:ct=Resolution.AUTO_SIZE,height:ut=Resolution.AUTO_SIZE,resolutionX:ht=ct,resolutionY:dt=ut}={}){super("DepthOfFieldEffect",depth_of_field_default,{blendFunction:et,attributes:EffectAttribute.DEPTH,uniforms:new Map([["nearColorBuffer",new Uniform(null)],["farColorBuffer",new Uniform(null)],["nearCoCBuffer",new Uniform(null)],["farCoCBuffer",new Uniform(null)],["scale",new Uniform(1)]])}),this.camera=tt,this.renderTarget=new WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="DoF.Intermediate",this.renderTargetMasked=this.renderTarget.clone(),this.renderTargetMasked.texture.name="DoF.Masked.Far",this.renderTargetNear=this.renderTarget.clone(),this.renderTargetNear.texture.name="DoF.Bokeh.Near",this.uniforms.get("nearColorBuffer").value=this.renderTargetNear.texture,this.renderTargetFar=this.renderTarget.clone(),this.renderTargetFar.texture.name="DoF.Bokeh.Far",this.uniforms.get("farColorBuffer").value=this.renderTargetFar.texture,this.renderTargetCoC=this.renderTarget.clone(),this.renderTargetCoC.texture.name="DoF.CoC",this.uniforms.get("farCoCBuffer").value=this.renderTargetCoC.texture,this.renderTargetCoCBlurred=this.renderTargetCoC.clone(),this.renderTargetCoCBlurred.texture.name="DoF.CoC.Blurred",this.uniforms.get("nearCoCBuffer").value=this.renderTargetCoCBlurred.texture,this.cocPass=new ShaderPass(new CircleOfConfusionMaterial(tt));const pt=this.cocMaterial;pt.focusDistance=it,pt.focusRange=at,nt!==void 0&&(pt.worldFocusDistance=nt),rt!==void 0&&(pt.worldFocusRange=rt),this.blurPass=new KawaseBlurPass({resolutionScale:lt,resolutionX:ht,resolutionY:dt,kernelSize:KernelSize.MEDIUM}),this.maskPass=new ShaderPass(new MaskMaterial(this.renderTargetCoC.texture));const mt=this.maskPass.fullscreenMaterial;mt.colorChannel=ColorChannel.GREEN,this.maskFunction=MaskFunction.MULTIPLY_RGB,this.bokehNearBasePass=new ShaderPass(new BokehMaterial(!1,!0)),this.bokehNearBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehNearFillPass=new ShaderPass(new BokehMaterial(!0,!0)),this.bokehNearFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehFarBasePass=new ShaderPass(new BokehMaterial(!1,!1)),this.bokehFarBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.bokehFarFillPass=new ShaderPass(new BokehMaterial(!0,!1)),this.bokehFarFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.target=null;const gt=this.resolution=new Resolution(this,ht,dt,lt);gt.addEventListener("change",yt=>this.setSize(gt.baseWidth,gt.baseHeight)),this.bokehScale=st}set mainCamera(tt){this.camera=tt,this.cocMaterial.copyCameraSettings(tt)}get cocTexture(){return this.renderTargetCoC.texture}get maskFunction(){return this.maskPass.fullscreenMaterial.maskFunction}set maskFunction(tt){this.maskFunction!==tt&&(this.defines.set("MASK_FUNCTION",tt.toFixed(0)),this.maskPass.fullscreenMaterial.maskFunction=tt,this.setChanged())}get cocMaterial(){return this.cocPass.fullscreenMaterial}get circleOfConfusionMaterial(){return this.cocMaterial}getCircleOfConfusionMaterial(){return this.cocMaterial}getBlurPass(){return this.blurPass}getResolution(){return this.resolution}get bokehScale(){return this.uniforms.get("scale").value}set bokehScale(tt){this.bokehNearBasePass.fullscreenMaterial.scale=tt,this.bokehNearFillPass.fullscreenMaterial.scale=tt,this.bokehFarBasePass.fullscreenMaterial.scale=tt,this.bokehFarFillPass.fullscreenMaterial.scale=tt,this.maskPass.fullscreenMaterial.strength=tt,this.uniforms.get("scale").value=tt}getBokehScale(){return this.bokehScale}setBokehScale(tt){this.bokehScale=tt}getTarget(){return this.target}setTarget(tt){this.target=tt}calculateFocusDistance(tt){const et=this.camera,nt=et.position.distanceTo(tt);return viewZToOrthographicDepth(-nt,et.near,et.far)}setDepthTexture(tt,et=BasicDepthPacking){this.cocMaterial.depthBuffer=tt,this.cocMaterial.depthPacking=et}update(tt,et,nt){const rt=this.renderTarget,it=this.renderTargetCoC,ot=this.renderTargetCoCBlurred,at=this.renderTargetMasked;if(this.target!==null){const st=this.calculateFocusDistance(this.target);this.cocMaterial.focusDistance=st}this.cocPass.render(tt,null,it),this.blurPass.render(tt,it,ot),this.maskPass.render(tt,et,at),this.bokehFarBasePass.render(tt,at,rt),this.bokehFarFillPass.render(tt,rt,this.renderTargetFar),this.bokehNearBasePass.render(tt,et,rt),this.bokehNearFillPass.render(tt,rt,this.renderTargetNear)}setSize(tt,et){const nt=this.resolution;nt.setBaseSize(tt,et);const rt=nt.width,it=nt.height;this.cocPass.setSize(tt,et),this.blurPass.setSize(tt,et),this.maskPass.setSize(tt,et),this.renderTargetFar.setSize(tt,et),this.renderTargetCoC.setSize(tt,et),this.renderTargetMasked.setSize(tt,et),this.renderTarget.setSize(rt,it),this.renderTargetNear.setSize(rt,it),this.renderTargetCoCBlurred.setSize(rt,it),this.bokehNearBasePass.fullscreenMaterial.setSize(tt,et),this.bokehNearFillPass.fullscreenMaterial.setSize(tt,et),this.bokehFarBasePass.fullscreenMaterial.setSize(tt,et),this.bokehFarFillPass.fullscreenMaterial.setSize(tt,et)}initialize(tt,et,nt){this.cocPass.initialize(tt,et,nt),this.maskPass.initialize(tt,et,nt),this.bokehNearBasePass.initialize(tt,et,nt),this.bokehNearFillPass.initialize(tt,et,nt),this.bokehFarBasePass.initialize(tt,et,nt),this.bokehFarFillPass.initialize(tt,et,nt),this.blurPass.initialize(tt,et,UnsignedByteType),tt.capabilities.logarithmicDepthBuffer&&(this.cocPass.fullscreenMaterial.defines.LOG_DEPTH="1"),nt!==void 0&&(this.renderTarget.texture.type=nt,this.renderTargetNear.texture.type=nt,this.renderTargetFar.texture.type=nt,this.renderTargetMasked.texture.type=nt,getOutputColorSpace(tt)===SRGBColorSpace&&(setTextureColorSpace(this.renderTarget.texture,SRGBColorSpace),setTextureColorSpace(this.renderTargetNear.texture,SRGBColorSpace),setTextureColorSpace(this.renderTargetFar.texture,SRGBColorSpace),setTextureColorSpace(this.renderTargetMasked.texture,SRGBColorSpace)))}};function createCanvas(tt,et,nt){const rt=document.createElement("canvas"),it=rt.getContext("2d");if(rt.width=tt,rt.height=et,nt instanceof Image)it.drawImage(nt,0,0);else{const ot=it.createImageData(tt,et);ot.data.set(nt),it.putImageData(ot,0,0)}return rt}var RawImageData=class bw{constructor(et=0,nt=0,rt=null){this.width=et,this.height=nt,this.data=rt}toCanvas(){return typeof document>"u"?null:createCanvas(this.width,this.height,this.data)}static from(et){const{width:nt,height:rt}=et;let it;if(et instanceof Image){const ot=createCanvas(nt,rt,et);ot!==null&&(it=ot.getContext("2d").getImageData(0,0,nt,rt).data)}else it=et.data;return new bw(nt,rt,it)}},worker_default=`"use strict";(()=>{var O={SCALE_UP:"lut.scaleup"};var _=[new Float32Array(3),new Float32Array(3)],n=[new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3)],Z=[[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1])]];function d(a,t,r,m){let i=r[0]-t[0],e=r[1]-t[1],y=r[2]-t[2],h=a[0]-t[0],A=a[1]-t[1],w=a[2]-t[2],c=e*w-y*A,l=y*h-i*w,x=i*A-e*h,u=Math.sqrt(c*c+l*l+x*x),b=u*.5,s=c/u,F=l/u,f=x/u,p=-(a[0]*s+a[1]*F+a[2]*f),M=m[0]*s+m[1]*F+m[2]*f;return Math.abs(M+p)*b/3}function V(a,t,r,m,i,e){let y=(r+m*t+i*t*t)*4;e[0]=a[y+0],e[1]=a[y+1],e[2]=a[y+2]}function k(a,t,r,m,i,e){let y=r*(t-1),h=m*(t-1),A=i*(t-1),w=Math.floor(y),c=Math.floor(h),l=Math.floor(A),x=Math.ceil(y),u=Math.ceil(h),b=Math.ceil(A),s=y-w,F=h-c,f=A-l;if(w===y&&c===h&&l===A)V(a,t,y,h,A,e);else{let p;s>=F&&F>=f?p=Z[0]:s>=f&&f>=F?p=Z[1]:f>=s&&s>=F?p=Z[2]:F>=s&&s>=f?p=Z[3]:F>=f&&f>=s?p=Z[4]:f>=F&&F>=s&&(p=Z[5]);let[M,g,X,Y]=p,P=_[0];P[0]=s,P[1]=F,P[2]=f;let o=_[1],L=x-w,S=u-c,U=b-l;o[0]=L*M[0]+w,o[1]=S*M[1]+c,o[2]=U*M[2]+l,V(a,t,o[0],o[1],o[2],n[0]),o[0]=L*g[0]+w,o[1]=S*g[1]+c,o[2]=U*g[2]+l,V(a,t,o[0],o[1],o[2],n[1]),o[0]=L*X[0]+w,o[1]=S*X[1]+c,o[2]=U*X[2]+l,V(a,t,o[0],o[1],o[2],n[2]),o[0]=L*Y[0]+w,o[1]=S*Y[1]+c,o[2]=U*Y[2]+l,V(a,t,o[0],o[1],o[2],n[3]);let T=d(g,X,Y,P)*6,q=d(M,X,Y,P)*6,C=d(M,g,Y,P)*6,E=d(M,g,X,P)*6;n[0][0]*=T,n[0][1]*=T,n[0][2]*=T,n[1][0]*=q,n[1][1]*=q,n[1][2]*=q,n[2][0]*=C,n[2][1]*=C,n[2][2]*=C,n[3][0]*=E,n[3][1]*=E,n[3][2]*=E,e[0]=n[0][0]+n[1][0]+n[2][0]+n[3][0],e[1]=n[0][1]+n[1][1]+n[2][1]+n[3][1],e[2]=n[0][2]+n[1][2]+n[2][2]+n[3][2]}}var v=class{static expand(t,r){let m=Math.cbrt(t.length/4),i=new Float32Array(3),e=new t.constructor(r**3*4),y=t instanceof Uint8Array?255:1,h=r**2,A=1/(r-1);for(let w=0;w{let t=a.data,r=t.data;switch(t.operation){case O.SCALE_UP:r=v.expand(r,t.size);break}postMessage(r,[r.buffer]),close()});})(); +vec4 result=inputColor*(1.0-cocNearFar.y)+colorFar;result=mix(result,colorNear,cocNearFar.x);outputColor=result;}`,DepthOfFieldEffect=class extends Effect$1{constructor(tt,{blendFunction:et,worldFocusDistance:nt,worldFocusRange:rt,focusDistance:it=0,focalLength:ot=.1,focusRange:at=ot,bokehScale:st=1,resolutionScale:lt=1,width:ct=Resolution.AUTO_SIZE,height:ut=Resolution.AUTO_SIZE,resolutionX:ht=ct,resolutionY:dt=ut}={}){super("DepthOfFieldEffect",depth_of_field_default,{blendFunction:et,attributes:EffectAttribute.DEPTH,uniforms:new Map([["nearColorBuffer",new Uniform(null)],["farColorBuffer",new Uniform(null)],["nearCoCBuffer",new Uniform(null)],["farCoCBuffer",new Uniform(null)],["scale",new Uniform(1)]])}),this.camera=tt,this.renderTarget=new WebGLRenderTarget(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="DoF.Intermediate",this.renderTargetMasked=this.renderTarget.clone(),this.renderTargetMasked.texture.name="DoF.Masked.Far",this.renderTargetNear=this.renderTarget.clone(),this.renderTargetNear.texture.name="DoF.Bokeh.Near",this.uniforms.get("nearColorBuffer").value=this.renderTargetNear.texture,this.renderTargetFar=this.renderTarget.clone(),this.renderTargetFar.texture.name="DoF.Bokeh.Far",this.uniforms.get("farColorBuffer").value=this.renderTargetFar.texture,this.renderTargetCoC=this.renderTarget.clone(),this.renderTargetCoC.texture.name="DoF.CoC",this.uniforms.get("farCoCBuffer").value=this.renderTargetCoC.texture,this.renderTargetCoCBlurred=this.renderTargetCoC.clone(),this.renderTargetCoCBlurred.texture.name="DoF.CoC.Blurred",this.uniforms.get("nearCoCBuffer").value=this.renderTargetCoCBlurred.texture,this.cocPass=new ShaderPass(new CircleOfConfusionMaterial(tt));const pt=this.cocMaterial;pt.focusDistance=it,pt.focusRange=at,nt!==void 0&&(pt.worldFocusDistance=nt),rt!==void 0&&(pt.worldFocusRange=rt),this.blurPass=new KawaseBlurPass({resolutionScale:lt,resolutionX:ht,resolutionY:dt,kernelSize:KernelSize.MEDIUM}),this.maskPass=new ShaderPass(new MaskMaterial(this.renderTargetCoC.texture));const mt=this.maskPass.fullscreenMaterial;mt.colorChannel=ColorChannel.GREEN,this.maskFunction=MaskFunction.MULTIPLY_RGB,this.bokehNearBasePass=new ShaderPass(new BokehMaterial(!1,!0)),this.bokehNearBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehNearFillPass=new ShaderPass(new BokehMaterial(!0,!0)),this.bokehNearFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoCBlurred.texture,this.bokehFarBasePass=new ShaderPass(new BokehMaterial(!1,!1)),this.bokehFarBasePass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.bokehFarFillPass=new ShaderPass(new BokehMaterial(!0,!1)),this.bokehFarFillPass.fullscreenMaterial.cocBuffer=this.renderTargetCoC.texture,this.target=null;const gt=this.resolution=new Resolution(this,ht,dt,lt);gt.addEventListener("change",yt=>this.setSize(gt.baseWidth,gt.baseHeight)),this.bokehScale=st}set mainCamera(tt){this.camera=tt,this.cocMaterial.copyCameraSettings(tt)}get cocTexture(){return this.renderTargetCoC.texture}get maskFunction(){return this.maskPass.fullscreenMaterial.maskFunction}set maskFunction(tt){this.maskFunction!==tt&&(this.defines.set("MASK_FUNCTION",tt.toFixed(0)),this.maskPass.fullscreenMaterial.maskFunction=tt,this.setChanged())}get cocMaterial(){return this.cocPass.fullscreenMaterial}get circleOfConfusionMaterial(){return this.cocMaterial}getCircleOfConfusionMaterial(){return this.cocMaterial}getBlurPass(){return this.blurPass}getResolution(){return this.resolution}get bokehScale(){return this.uniforms.get("scale").value}set bokehScale(tt){this.bokehNearBasePass.fullscreenMaterial.scale=tt,this.bokehNearFillPass.fullscreenMaterial.scale=tt,this.bokehFarBasePass.fullscreenMaterial.scale=tt,this.bokehFarFillPass.fullscreenMaterial.scale=tt,this.maskPass.fullscreenMaterial.strength=tt,this.uniforms.get("scale").value=tt}getBokehScale(){return this.bokehScale}setBokehScale(tt){this.bokehScale=tt}getTarget(){return this.target}setTarget(tt){this.target=tt}calculateFocusDistance(tt){const et=this.camera,nt=et.position.distanceTo(tt);return viewZToOrthographicDepth(-nt,et.near,et.far)}setDepthTexture(tt,et=BasicDepthPacking){this.cocMaterial.depthBuffer=tt,this.cocMaterial.depthPacking=et}update(tt,et,nt){const rt=this.renderTarget,it=this.renderTargetCoC,ot=this.renderTargetCoCBlurred,at=this.renderTargetMasked;if(this.target!==null){const st=this.calculateFocusDistance(this.target);this.cocMaterial.focusDistance=st}this.cocPass.render(tt,null,it),this.blurPass.render(tt,it,ot),this.maskPass.render(tt,et,at),this.bokehFarBasePass.render(tt,at,rt),this.bokehFarFillPass.render(tt,rt,this.renderTargetFar),this.bokehNearBasePass.render(tt,et,rt),this.bokehNearFillPass.render(tt,rt,this.renderTargetNear)}setSize(tt,et){const nt=this.resolution;nt.setBaseSize(tt,et);const rt=nt.width,it=nt.height;this.cocPass.setSize(tt,et),this.blurPass.setSize(tt,et),this.maskPass.setSize(tt,et),this.renderTargetFar.setSize(tt,et),this.renderTargetCoC.setSize(tt,et),this.renderTargetMasked.setSize(tt,et),this.renderTarget.setSize(rt,it),this.renderTargetNear.setSize(rt,it),this.renderTargetCoCBlurred.setSize(rt,it),this.bokehNearBasePass.fullscreenMaterial.setSize(tt,et),this.bokehNearFillPass.fullscreenMaterial.setSize(tt,et),this.bokehFarBasePass.fullscreenMaterial.setSize(tt,et),this.bokehFarFillPass.fullscreenMaterial.setSize(tt,et)}initialize(tt,et,nt){this.cocPass.initialize(tt,et,nt),this.maskPass.initialize(tt,et,nt),this.bokehNearBasePass.initialize(tt,et,nt),this.bokehNearFillPass.initialize(tt,et,nt),this.bokehFarBasePass.initialize(tt,et,nt),this.bokehFarFillPass.initialize(tt,et,nt),this.blurPass.initialize(tt,et,UnsignedByteType),tt.capabilities.logarithmicDepthBuffer&&(this.cocPass.fullscreenMaterial.defines.LOG_DEPTH="1"),nt!==void 0&&(this.renderTarget.texture.type=nt,this.renderTargetNear.texture.type=nt,this.renderTargetFar.texture.type=nt,this.renderTargetMasked.texture.type=nt,getOutputColorSpace(tt)===SRGBColorSpace&&(setTextureColorSpace(this.renderTarget.texture,SRGBColorSpace),setTextureColorSpace(this.renderTargetNear.texture,SRGBColorSpace),setTextureColorSpace(this.renderTargetFar.texture,SRGBColorSpace),setTextureColorSpace(this.renderTargetMasked.texture,SRGBColorSpace)))}};function createCanvas(tt,et,nt){const rt=document.createElement("canvas"),it=rt.getContext("2d");if(rt.width=tt,rt.height=et,nt instanceof Image)it.drawImage(nt,0,0);else{const ot=it.createImageData(tt,et);ot.data.set(nt),it.putImageData(ot,0,0)}return rt}var RawImageData=class ww{constructor(et=0,nt=0,rt=null){this.width=et,this.height=nt,this.data=rt}toCanvas(){return typeof document>"u"?null:createCanvas(this.width,this.height,this.data)}static from(et){const{width:nt,height:rt}=et;let it;if(et instanceof Image){const ot=createCanvas(nt,rt,et);ot!==null&&(it=ot.getContext("2d").getImageData(0,0,nt,rt).data)}else it=et.data;return new ww(nt,rt,it)}},worker_default=`"use strict";(()=>{var O={SCALE_UP:"lut.scaleup"};var _=[new Float32Array(3),new Float32Array(3)],n=[new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3)],Z=[[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1])],[new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1])]];function d(a,t,r,m){let i=r[0]-t[0],e=r[1]-t[1],y=r[2]-t[2],h=a[0]-t[0],A=a[1]-t[1],w=a[2]-t[2],c=e*w-y*A,l=y*h-i*w,x=i*A-e*h,u=Math.sqrt(c*c+l*l+x*x),b=u*.5,s=c/u,F=l/u,f=x/u,p=-(a[0]*s+a[1]*F+a[2]*f),M=m[0]*s+m[1]*F+m[2]*f;return Math.abs(M+p)*b/3}function V(a,t,r,m,i,e){let y=(r+m*t+i*t*t)*4;e[0]=a[y+0],e[1]=a[y+1],e[2]=a[y+2]}function k(a,t,r,m,i,e){let y=r*(t-1),h=m*(t-1),A=i*(t-1),w=Math.floor(y),c=Math.floor(h),l=Math.floor(A),x=Math.ceil(y),u=Math.ceil(h),b=Math.ceil(A),s=y-w,F=h-c,f=A-l;if(w===y&&c===h&&l===A)V(a,t,y,h,A,e);else{let p;s>=F&&F>=f?p=Z[0]:s>=f&&f>=F?p=Z[1]:f>=s&&s>=F?p=Z[2]:F>=s&&s>=f?p=Z[3]:F>=f&&f>=s?p=Z[4]:f>=F&&F>=s&&(p=Z[5]);let[M,g,X,Y]=p,P=_[0];P[0]=s,P[1]=F,P[2]=f;let o=_[1],L=x-w,S=u-c,U=b-l;o[0]=L*M[0]+w,o[1]=S*M[1]+c,o[2]=U*M[2]+l,V(a,t,o[0],o[1],o[2],n[0]),o[0]=L*g[0]+w,o[1]=S*g[1]+c,o[2]=U*g[2]+l,V(a,t,o[0],o[1],o[2],n[1]),o[0]=L*X[0]+w,o[1]=S*X[1]+c,o[2]=U*X[2]+l,V(a,t,o[0],o[1],o[2],n[2]),o[0]=L*Y[0]+w,o[1]=S*Y[1]+c,o[2]=U*Y[2]+l,V(a,t,o[0],o[1],o[2],n[3]);let T=d(g,X,Y,P)*6,q=d(M,X,Y,P)*6,C=d(M,g,Y,P)*6,E=d(M,g,X,P)*6;n[0][0]*=T,n[0][1]*=T,n[0][2]*=T,n[1][0]*=q,n[1][1]*=q,n[1][2]*=q,n[2][0]*=C,n[2][1]*=C,n[2][2]*=C,n[3][0]*=E,n[3][1]*=E,n[3][2]*=E,e[0]=n[0][0]+n[1][0]+n[2][0]+n[3][0],e[1]=n[0][1]+n[1][1]+n[2][1]+n[3][1],e[2]=n[0][2]+n[1][2]+n[2][2]+n[3][2]}}var v=class{static expand(t,r){let m=Math.cbrt(t.length/4),i=new Float32Array(3),e=new t.constructor(r**3*4),y=t instanceof Uint8Array?255:1,h=r**2,A=1/(r-1);for(let w=0;w{let t=a.data,r=t.data;switch(t.operation){case O.SCALE_UP:r=v.expand(r,t.size);break}postMessage(r,[r.buffer]),close()});})(); `,c$2=new Color$1,LookupTexture=class j0 extends Data3DTexture{constructor(et,nt){super(et,nt,nt,nt),this.type=FloatType,this.format=RGBAFormat,this.minFilter=LinearFilter,this.magFilter=LinearFilter,this.wrapS=ClampToEdgeWrapping,this.wrapT=ClampToEdgeWrapping,this.wrapR=ClampToEdgeWrapping,this.unpackAlignment=1,this.needsUpdate=!0,setTextureColorSpace(this,LinearSRGBColorSpace),this.domainMin=new Vector3(0,0,0),this.domainMax=new Vector3(1,1,1)}get isLookupTexture3D(){return!0}scaleUp(et,nt=!0){const rt=this.image;let it;return et<=rt.width?it=Promise.reject(new Error("The target size must be greater than the current size")):it=new Promise((ot,at)=>{const st=URL.createObjectURL(new Blob([worker_default],{type:"text/javascript"})),lt=new Worker(st);lt.addEventListener("error",ut=>at(ut.error)),lt.addEventListener("message",ut=>{const ht=new j0(ut.data,et);copyTextureColorSpace(this,ht),ht.type=this.type,ht.name=this.name,URL.revokeObjectURL(st),ot(ht)});const ct=nt?[rt.data.buffer]:[];lt.postMessage({operation:LUTOperation.SCALE_UP,data:rt.data,size:et},ct)}),it}applyLUT(et){const nt=this.image,rt=et.image,it=Math.min(nt.width,nt.height,nt.depth),ot=Math.min(rt.width,rt.height,rt.depth);if(it!==ot)console.error("Size mismatch");else if(et.type!==FloatType||this.type!==FloatType)console.error("Both LUTs must be FloatType textures");else if(et.format!==RGBAFormat||this.format!==RGBAFormat)console.error("Both LUTs must be RGBA textures");else{const at=nt.data,st=rt.data,lt=it,ct=lt**2,ut=lt-1;for(let ht=0,dt=lt**3;htit){at=new Uint8Array(ct.length);for(let ut=0;utdistortion.x-columns*random){float sx=clamp(ceil(seeds.x),0.0,1.0);uv.y=sx*(1.0-(uv.y+distortion.y))+(1.0-sx)*distortion.y;}if(uv.xdistortion.y-columns*random){float sy=clamp(ceil(seeds.y),0.0,1.0);uv.x=sy*distortion.x+(1.0-sy)*(1.0-(uv.x+distortion.x));}vec2 normal=texture2D(perturbationMap,uv*random*random).rg;uv+=normal*seeds*(random*0.2);}}",textureTag="Glitch.Generated";function randomFloat(tt,et){return tt+Math.random()*(et-tt)}var GlitchEffect=class extends Effect$1{constructor({chromaticAberrationOffset:tt=null,delay:et=new Vector2(1.5,3.5),duration:nt=new Vector2(.6,1),strength:rt=new Vector2(.3,1),columns:it=.05,ratio:ot=.85,perturbationMap:at=null,dtSize:st=64}={}){if(super("GlitchEffect",glitch_default,{uniforms:new Map([["perturbationMap",new Uniform(null)],["columns",new Uniform(it)],["active",new Uniform(!1)],["random",new Uniform(1)],["seeds",new Uniform(new Vector2)],["distortion",new Uniform(new Vector2)]])}),at===null){const lt=new NoiseTexture(st,st,RGBAFormat);lt.name=textureTag,this.perturbationMap=lt}else this.perturbationMap=at;this.time=0,this.distortion=this.uniforms.get("distortion").value,this.delay=et,this.duration=nt,this.breakPoint=new Vector2(randomFloat(this.delay.x,this.delay.y),randomFloat(this.duration.x,this.duration.y)),this.strength=rt,this.mode=GlitchMode.SPORADIC,this.ratio=ot,this.chromaticAberrationOffset=tt}get seeds(){return this.uniforms.get("seeds").value}get active(){return this.uniforms.get("active").value}isActive(){return this.active}get minDelay(){return this.delay.x}set minDelay(tt){this.delay.x=tt}getMinDelay(){return this.delay.x}setMinDelay(tt){this.delay.x=tt}get maxDelay(){return this.delay.y}set maxDelay(tt){this.delay.y=tt}getMaxDelay(){return this.delay.y}setMaxDelay(tt){this.delay.y=tt}get minDuration(){return this.duration.x}set minDuration(tt){this.duration.x=tt}getMinDuration(){return this.duration.x}setMinDuration(tt){this.duration.x=tt}get maxDuration(){return this.duration.y}set maxDuration(tt){this.duration.y=tt}getMaxDuration(){return this.duration.y}setMaxDuration(tt){this.duration.y=tt}get minStrength(){return this.strength.x}set minStrength(tt){this.strength.x=tt}getMinStrength(){return this.strength.x}setMinStrength(tt){this.strength.x=tt}get maxStrength(){return this.strength.y}set maxStrength(tt){this.strength.y=tt}getMaxStrength(){return this.strength.y}setMaxStrength(tt){this.strength.y=tt}getMode(){return this.mode}setMode(tt){this.mode=tt}getGlitchRatio(){return 1-this.ratio}setGlitchRatio(tt){this.ratio=Math.min(Math.max(1-tt,0),1)}get columns(){return this.uniforms.get("columns").value}set columns(tt){this.uniforms.get("columns").value=tt}getGlitchColumns(){return this.columns}setGlitchColumns(tt){this.columns=tt}getChromaticAberrationOffset(){return this.chromaticAberrationOffset}setChromaticAberrationOffset(tt){this.chromaticAberrationOffset=tt}get perturbationMap(){return this.uniforms.get("perturbationMap").value}set perturbationMap(tt){const et=this.perturbationMap;et!==null&&et.name===textureTag&&et.dispose(),tt.minFilter=tt.magFilter=NearestFilter,tt.wrapS=tt.wrapT=RepeatWrapping,tt.generateMipmaps=!1,this.uniforms.get("perturbationMap").value=tt}getPerturbationMap(){return this.perturbationMap}setPerturbationMap(tt){this.perturbationMap=tt}generatePerturbationMap(tt=64){const et=new NoiseTexture(tt,tt,RGBAFormat);return et.name=textureTag,et}update(tt,et,nt){const rt=this.mode,it=this.breakPoint,ot=this.chromaticAberrationOffset,at=this.strength;let st=this.time,lt=!1,ct=0,ut=0,ht;rt!==GlitchMode.DISABLED&&(rt===GlitchMode.SPORADIC&&(st+=nt,ht=st>it.x,st>=it.x+it.y&&(it.set(randomFloat(this.delay.x,this.delay.y),randomFloat(this.duration.x,this.duration.y)),st=0)),ct=Math.random(),this.uniforms.get("random").value=ct,ht&&ct>this.ratio||rt===GlitchMode.CONSTANT_WILD?(lt=!0,ct*=at.y*.03,ut=randomFloat(-Math.PI,Math.PI),this.seeds.set(randomFloat(-at.y,at.y),randomFloat(-at.y,at.y)),this.distortion.set(randomFloat(0,1),randomFloat(0,1))):(ht||rt===GlitchMode.CONSTANT_MILD)&&(lt=!0,ct*=at.x*.03,ut=randomFloat(-Math.PI,Math.PI),this.seeds.set(randomFloat(-at.x,at.x),randomFloat(-at.x,at.x)),this.distortion.set(randomFloat(0,1),randomFloat(0,1))),this.time=st),ot!==null&&(lt?ot.set(Math.cos(ut),Math.sin(ut)).multiplyScalar(ct):ot.set(0,0)),this.uniforms.get("active").value=lt}dispose(){const tt=this.perturbationMap;tt!==null&&tt.name===textureTag&&tt.dispose()}},god_rays_default=`#ifdef FRAMEBUFFER_PRECISION_HIGH uniform mediump sampler2D map; #else @@ -6478,7 +6478,7 @@ void main() { * @author: Jack Doyle, jack@greensock.com */var _win,_doc,_docElement,_pluginInitted,_tempDiv,_recentSetterPlugin,_reverting,_windowExists=function(){return typeof window<"u"},_transformProps={},_RAD2DEG=180/Math.PI,_DEG2RAD=Math.PI/180,_atan2=Math.atan2,_bigNum=1e8,_capsExp=/([A-Z])/g,_horizontalExp=/(left|right|width|margin|padding|x)/i,_complexExp=/[\s,\(]\S/,_propertyAliases={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_renderCSSProp=function(et,nt){return nt.set(nt.t,nt.p,Math.round((nt.s+nt.c*et)*1e4)/1e4+nt.u,nt)},_renderPropWithEnd=function(et,nt){return nt.set(nt.t,nt.p,et===1?nt.e:Math.round((nt.s+nt.c*et)*1e4)/1e4+nt.u,nt)},_renderCSSPropWithBeginning=function(et,nt){return nt.set(nt.t,nt.p,et?Math.round((nt.s+nt.c*et)*1e4)/1e4+nt.u:nt.b,nt)},_renderRoundedCSSProp=function(et,nt){var rt=nt.s+nt.c*et;nt.set(nt.t,nt.p,~~(rt+(rt<0?-.5:.5))+nt.u,nt)},_renderNonTweeningValue=function(et,nt){return nt.set(nt.t,nt.p,et?nt.e:nt.b,nt)},_renderNonTweeningValueOnlyAtEnd=function(et,nt){return nt.set(nt.t,nt.p,et!==1?nt.b:nt.e,nt)},_setterCSSStyle=function(et,nt,rt){return et.style[nt]=rt},_setterCSSProp=function(et,nt,rt){return et.style.setProperty(nt,rt)},_setterTransform=function(et,nt,rt){return et._gsap[nt]=rt},_setterScale=function(et,nt,rt){return et._gsap.scaleX=et._gsap.scaleY=rt},_setterScaleWithRender=function(et,nt,rt,it,ot){var at=et._gsap;at.scaleX=at.scaleY=rt,at.renderTransform(ot,at)},_setterTransformWithRender=function(et,nt,rt,it,ot){var at=et._gsap;at[nt]=rt,at.renderTransform(ot,at)},_transformProp="transform",_transformOriginProp=_transformProp+"Origin",_saveStyle=function tt(et,nt){var rt=this,it=this.target,ot=it.style;if(et in _transformProps&&ot){if(this.tfm=this.tfm||{},et!=="transform")et=_propertyAliases[et]||et,~et.indexOf(",")?et.split(",").forEach(function(at){return rt.tfm[at]=_get$1(it,at)}):this.tfm[et]=it._gsap.x?it._gsap[et]:_get$1(it,et);else return _propertyAliases.transform.split(",").forEach(function(at){return tt.call(rt,at,nt)});if(this.props.indexOf(_transformProp)>=0)return;it._gsap.svg&&(this.svgo=it.getAttribute("data-svg-origin"),this.props.push(_transformOriginProp,nt,"")),et=_transformProp}(ot||nt)&&this.props.push(et,nt,ot[et])},_removeIndependentTransforms=function(et){et.translate&&(et.removeProperty("translate"),et.removeProperty("scale"),et.removeProperty("rotate"))},_revertStyle=function(){var et=this.props,nt=this.target,rt=nt.style,it=nt._gsap,ot,at;for(ot=0;ot=0?_prefixes[at]:"")+et},_initCore=function(){_windowExists()&&window.document&&(_win=window,_doc=_win.document,_docElement=_doc.documentElement,_tempDiv=_createElement("div")||{style:{}},_createElement("div"),_transformProp=_checkPropPrefix(_transformProp),_transformOriginProp=_transformProp+"Origin",_tempDiv.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",_supports3D=!!_checkPropPrefix("perspective"),_reverting=gsap.core.reverting,_pluginInitted=1)},_getBBoxHack=function tt(et){var nt=_createElement("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),rt=this.parentNode,it=this.nextSibling,ot=this.style.cssText,at;if(_docElement.appendChild(nt),nt.appendChild(this),this.style.display="block",et)try{at=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=tt}catch{}else this._gsapBBox&&(at=this._gsapBBox());return rt&&(it?rt.insertBefore(this,it):rt.appendChild(this)),_docElement.removeChild(nt),this.style.cssText=ot,at},_getAttributeFallbacks=function(et,nt){for(var rt=nt.length;rt--;)if(et.hasAttribute(nt[rt]))return et.getAttribute(nt[rt])},_getBBox=function(et){var nt;try{nt=et.getBBox()}catch{nt=_getBBoxHack.call(et,!0)}return nt&&(nt.width||nt.height)||et.getBBox===_getBBoxHack||(nt=_getBBoxHack.call(et,!0)),nt&&!nt.width&&!nt.x&&!nt.y?{x:+_getAttributeFallbacks(et,["x","cx","x1"])||0,y:+_getAttributeFallbacks(et,["y","cy","y1"])||0,width:0,height:0}:nt},_isSVG=function(et){return!!(et.getCTM&&(!et.parentNode||et.ownerSVGElement)&&_getBBox(et))},_removeProperty=function(et,nt){if(nt){var rt=et.style;nt in _transformProps&&nt!==_transformOriginProp&&(nt=_transformProp),rt.removeProperty?((nt.substr(0,2)==="ms"||nt.substr(0,6)==="webkit")&&(nt="-"+nt),rt.removeProperty(nt.replace(_capsExp,"-$1").toLowerCase())):rt.removeAttribute(nt)}},_addNonTweeningPT=function(et,nt,rt,it,ot,at){var st=new PropTween(et._pt,nt,rt,0,1,at?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue);return et._pt=st,st.b=it,st.e=ot,et._props.push(rt),st},_nonConvertibleUnits={deg:1,rad:1,turn:1},_nonStandardLayouts={grid:1,flex:1},_convertToUnit=function tt(et,nt,rt,it){var ot=parseFloat(rt)||0,at=(rt+"").trim().substr((ot+"").length)||"px",st=_tempDiv.style,lt=_horizontalExp.test(nt),ct=et.tagName.toLowerCase()==="svg",ut=(ct?"client":"offset")+(lt?"Width":"Height"),ht=100,dt=it==="px",pt=it==="%",mt,gt,yt,bt;return it===at||!ot||_nonConvertibleUnits[it]||_nonConvertibleUnits[at]?ot:(at!=="px"&&!dt&&(ot=tt(et,nt,rt,"px")),bt=et.getCTM&&_isSVG(et),(pt||at==="%")&&(_transformProps[nt]||~nt.indexOf("adius"))?(mt=bt?et.getBBox()[lt?"width":"height"]:et[ut],_round(pt?ot/mt*ht:ot/100*mt)):(st[lt?"width":"height"]=ht+(dt?at:it),gt=~nt.indexOf("adius")||it==="em"&&et.appendChild&&!ct?et:et.parentNode,bt&&(gt=(et.ownerSVGElement||{}).parentNode),(!gt||gt===_doc||!gt.appendChild)&&(gt=_doc.body),yt=gt._gsap,yt&&pt&&yt.width&<&&yt.time===_ticker.time&&!yt.uncache?_round(ot/yt.width*ht):((pt||at==="%")&&!_nonStandardLayouts[_getComputedProperty(gt,"display")]&&(st.position=_getComputedProperty(et,"position")),gt===et&&(st.position="static"),gt.appendChild(_tempDiv),mt=_tempDiv[ut],gt.removeChild(_tempDiv),st.position="absolute",lt&&pt&&(yt=_getCache(gt),yt.time=_ticker.time,yt.width=gt[ut]),_round(dt?mt*ot/ht:mt&&ot?ht/mt*ot:0))))},_get$1=function(et,nt,rt,it){var ot;return _pluginInitted||_initCore(),nt in _propertyAliases&&nt!=="transform"&&(nt=_propertyAliases[nt],~nt.indexOf(",")&&(nt=nt.split(",")[0])),_transformProps[nt]&&nt!=="transform"?(ot=_parseTransform(et,it),ot=nt!=="transformOrigin"?ot[nt]:ot.svg?ot.origin:_firstTwoOnly(_getComputedProperty(et,_transformOriginProp))+" "+ot.zOrigin+"px"):(ot=et.style[nt],(!ot||ot==="auto"||it||~(ot+"").indexOf("calc("))&&(ot=_specialProps[nt]&&_specialProps[nt](et,nt,rt)||_getComputedProperty(et,nt)||_getProperty(et,nt)||(nt==="opacity"?1:0))),rt&&!~(ot+"").trim().indexOf(" ")?_convertToUnit(et,nt,ot,rt)+rt:ot},_tweenComplexCSSString=function(et,nt,rt,it){if(!rt||rt==="none"){var ot=_checkPropPrefix(nt,et,1),at=ot&&_getComputedProperty(et,ot,1);at&&at!==rt?(nt=ot,rt=at):nt==="borderColor"&&(rt=_getComputedProperty(et,"borderTopColor"))}var st=new PropTween(this._pt,et.style,nt,0,1,_renderComplexString),lt=0,ct=0,ut,ht,dt,pt,mt,gt,yt,bt,vt,xt,kt,St;if(st.b=rt,st.e=it,rt+="",it+="",it==="auto"&&(et.style[nt]=it,it=_getComputedProperty(et,nt)||it,et.style[nt]=rt),ut=[rt,it],_colorStringFilter(ut),rt=ut[0],it=ut[1],dt=rt.match(_numWithUnitExp)||[],St=it.match(_numWithUnitExp)||[],St.length){for(;ht=_numWithUnitExp.exec(it);)yt=ht[0],vt=it.substring(lt,ht.index),mt?mt=(mt+1)%5:(vt.substr(-5)==="rgba("||vt.substr(-5)==="hsla(")&&(mt=1),yt!==(gt=dt[ct++]||"")&&(pt=parseFloat(gt)||0,kt=gt.substr((pt+"").length),yt.charAt(1)==="="&&(yt=_parseRelative(pt,yt)+kt),bt=parseFloat(yt),xt=yt.substr((bt+"").length),lt=_numWithUnitExp.lastIndex-xt.length,xt||(xt=xt||_config.units[nt]||kt,lt===it.length&&(it+=xt,st.e+=xt)),kt!==xt&&(pt=_convertToUnit(et,nt,gt,xt)||0),st._pt={_next:st._pt,p:vt||ct===1?vt:",",s:pt,c:bt-pt,m:mt&&mt<4||nt==="zIndex"?Math.round:0});st.c=lt-1;)st=ot[ct],_transformProps[st]&&(lt=1,st=st==="transformOrigin"?_transformOriginProp:_transformProp),_removeProperty(rt,st);lt&&(_removeProperty(rt,_transformProp),at&&(at.svg&&rt.removeAttribute("transform"),_parseTransform(rt,1),at.uncache=1,_removeIndependentTransforms(it)))}},_specialProps={clearProps:function(et,nt,rt,it,ot){if(ot.data!=="isFromStart"){var at=et._pt=new PropTween(et._pt,nt,rt,0,0,_renderClearProps);return at.u=it,at.pr=-10,at.tween=ot,et._props.push(rt),1}}},_identity2DMatrix=[1,0,0,1,0,0],_rotationalProperties={},_isNullTransform=function(et){return et==="matrix(1, 0, 0, 1, 0, 0)"||et==="none"||!et},_getComputedTransformMatrixAsArray=function(et){var nt=_getComputedProperty(et,_transformProp);return _isNullTransform(nt)?_identity2DMatrix:nt.substr(7).match(_numExp).map(_round)},_getMatrix=function(et,nt){var rt=et._gsap||_getCache(et),it=et.style,ot=_getComputedTransformMatrixAsArray(et),at,st,lt,ct;return rt.svg&&et.getAttribute("transform")?(lt=et.transform.baseVal.consolidate().matrix,ot=[lt.a,lt.b,lt.c,lt.d,lt.e,lt.f],ot.join(",")==="1,0,0,1,0,0"?_identity2DMatrix:ot):(ot===_identity2DMatrix&&!et.offsetParent&&et!==_docElement&&!rt.svg&&(lt=it.display,it.display="block",at=et.parentNode,(!at||!et.offsetParent)&&(ct=1,st=et.nextElementSibling,_docElement.appendChild(et)),ot=_getComputedTransformMatrixAsArray(et),lt?it.display=lt:_removeProperty(et,"display"),ct&&(st?at.insertBefore(et,st):at?at.appendChild(et):_docElement.removeChild(et))),nt&&ot.length>6?[ot[0],ot[1],ot[4],ot[5],ot[12],ot[13]]:ot)},_applySVGOrigin=function(et,nt,rt,it,ot,at){var st=et._gsap,lt=ot||_getMatrix(et,!0),ct=st.xOrigin||0,ut=st.yOrigin||0,ht=st.xOffset||0,dt=st.yOffset||0,pt=lt[0],mt=lt[1],gt=lt[2],yt=lt[3],bt=lt[4],vt=lt[5],xt=nt.split(" "),kt=parseFloat(xt[0])||0,St=parseFloat(xt[1])||0,Tt,At,Et,$t;rt?lt!==_identity2DMatrix&&(At=pt*yt-mt*gt)&&(Et=kt*(yt/At)+St*(-gt/At)+(gt*vt-yt*bt)/At,$t=kt*(-mt/At)+St*(pt/At)-(pt*vt-mt*bt)/At,kt=Et,St=$t):(Tt=_getBBox(et),kt=Tt.x+(~xt[0].indexOf("%")?kt/100*Tt.width:kt),St=Tt.y+(~(xt[1]||xt[0]).indexOf("%")?St/100*Tt.height:St)),it||it!==!1&&st.smooth?(bt=kt-ct,vt=St-ut,st.xOffset=ht+(bt*pt+vt*gt)-bt,st.yOffset=dt+(bt*mt+vt*yt)-vt):st.xOffset=st.yOffset=0,st.xOrigin=kt,st.yOrigin=St,st.smooth=!!it,st.origin=nt,st.originIsAbsolute=!!rt,et.style[_transformOriginProp]="0px 0px",at&&(_addNonTweeningPT(at,st,"xOrigin",ct,kt),_addNonTweeningPT(at,st,"yOrigin",ut,St),_addNonTweeningPT(at,st,"xOffset",ht,st.xOffset),_addNonTweeningPT(at,st,"yOffset",dt,st.yOffset)),et.setAttribute("data-svg-origin",kt+" "+St)},_parseTransform=function(et,nt){var rt=et._gsap||new GSCache(et);if("x"in rt&&!nt&&!rt.uncache)return rt;var it=et.style,ot=rt.scaleX<0,at="px",st="deg",lt=getComputedStyle(et),ct=_getComputedProperty(et,_transformOriginProp)||"0",ut,ht,dt,pt,mt,gt,yt,bt,vt,xt,kt,St,Tt,At,Et,$t,Dt,jt,Pt,Ct,wt,It,Ot,Wt,zt,Ft,Nt,Ut,Mt,Ht,en,sn;return ut=ht=dt=gt=yt=bt=vt=xt=kt=0,pt=mt=1,rt.svg=!!(et.getCTM&&_isSVG(et)),lt.translate&&((lt.translate!=="none"||lt.scale!=="none"||lt.rotate!=="none")&&(it[_transformProp]=(lt.translate!=="none"?"translate3d("+(lt.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(lt.rotate!=="none"?"rotate("+lt.rotate+") ":"")+(lt.scale!=="none"?"scale("+lt.scale.split(" ").join(",")+") ":"")+(lt[_transformProp]!=="none"?lt[_transformProp]:"")),it.scale=it.rotate=it.translate="none"),At=_getMatrix(et,rt.svg),rt.svg&&(rt.uncache?(zt=et.getBBox(),ct=rt.xOrigin-zt.x+"px "+(rt.yOrigin-zt.y)+"px",Wt=""):Wt=!nt&&et.getAttribute("data-svg-origin"),_applySVGOrigin(et,Wt||ct,!!Wt||rt.originIsAbsolute,rt.smooth!==!1,At)),St=rt.xOrigin||0,Tt=rt.yOrigin||0,At!==_identity2DMatrix&&(jt=At[0],Pt=At[1],Ct=At[2],wt=At[3],ut=It=At[4],ht=Ot=At[5],At.length===6?(pt=Math.sqrt(jt*jt+Pt*Pt),mt=Math.sqrt(wt*wt+Ct*Ct),gt=jt||Pt?_atan2(Pt,jt)*_RAD2DEG:0,vt=Ct||wt?_atan2(Ct,wt)*_RAD2DEG+gt:0,vt&&(mt*=Math.abs(Math.cos(vt*_DEG2RAD))),rt.svg&&(ut-=St-(St*jt+Tt*Ct),ht-=Tt-(St*Pt+Tt*wt))):(sn=At[6],Ht=At[7],Nt=At[8],Ut=At[9],Mt=At[10],en=At[11],ut=At[12],ht=At[13],dt=At[14],Et=_atan2(sn,Mt),yt=Et*_RAD2DEG,Et&&($t=Math.cos(-Et),Dt=Math.sin(-Et),Wt=It*$t+Nt*Dt,zt=Ot*$t+Ut*Dt,Ft=sn*$t+Mt*Dt,Nt=It*-Dt+Nt*$t,Ut=Ot*-Dt+Ut*$t,Mt=sn*-Dt+Mt*$t,en=Ht*-Dt+en*$t,It=Wt,Ot=zt,sn=Ft),Et=_atan2(-Ct,Mt),bt=Et*_RAD2DEG,Et&&($t=Math.cos(-Et),Dt=Math.sin(-Et),Wt=jt*$t-Nt*Dt,zt=Pt*$t-Ut*Dt,Ft=Ct*$t-Mt*Dt,en=wt*Dt+en*$t,jt=Wt,Pt=zt,Ct=Ft),Et=_atan2(Pt,jt),gt=Et*_RAD2DEG,Et&&($t=Math.cos(Et),Dt=Math.sin(Et),Wt=jt*$t+Pt*Dt,zt=It*$t+Ot*Dt,Pt=Pt*$t-jt*Dt,Ot=Ot*$t-It*Dt,jt=Wt,It=zt),yt&&Math.abs(yt)+Math.abs(gt)>359.9&&(yt=gt=0,bt=180-bt),pt=_round(Math.sqrt(jt*jt+Pt*Pt+Ct*Ct)),mt=_round(Math.sqrt(Ot*Ot+sn*sn)),Et=_atan2(It,Ot),vt=Math.abs(Et)>2e-4?Et*_RAD2DEG:0,kt=en?1/(en<0?-en:en):0),rt.svg&&(Wt=et.getAttribute("transform"),rt.forceCSS=et.setAttribute("transform","")||!_isNullTransform(_getComputedProperty(et,_transformProp)),Wt&&et.setAttribute("transform",Wt))),Math.abs(vt)>90&&Math.abs(vt)<270&&(ot?(pt*=-1,vt+=gt<=0?180:-180,gt+=gt<=0?180:-180):(mt*=-1,vt+=vt<=0?180:-180)),nt=nt||rt.uncache,rt.x=ut-((rt.xPercent=ut&&(!nt&&rt.xPercent||(Math.round(et.offsetWidth/2)===Math.round(-ut)?-50:0)))?et.offsetWidth*rt.xPercent/100:0)+at,rt.y=ht-((rt.yPercent=ht&&(!nt&&rt.yPercent||(Math.round(et.offsetHeight/2)===Math.round(-ht)?-50:0)))?et.offsetHeight*rt.yPercent/100:0)+at,rt.z=dt+at,rt.scaleX=_round(pt),rt.scaleY=_round(mt),rt.rotation=_round(gt)+st,rt.rotationX=_round(yt)+st,rt.rotationY=_round(bt)+st,rt.skewX=vt+st,rt.skewY=xt+st,rt.transformPerspective=kt+at,(rt.zOrigin=parseFloat(ct.split(" ")[2])||0)&&(it[_transformOriginProp]=_firstTwoOnly(ct)),rt.xOffset=rt.yOffset=0,rt.force3D=_config.force3D,rt.renderTransform=rt.svg?_renderSVGTransforms:_supports3D?_renderCSSTransforms:_renderNon3DTransforms,rt.uncache=0,rt},_firstTwoOnly=function(et){return(et=et.split(" "))[0]+" "+et[1]},_addPxTranslate=function(et,nt,rt){var it=getUnit(nt);return _round(parseFloat(nt)+parseFloat(_convertToUnit(et,"x",rt+"px",it)))+it},_renderNon3DTransforms=function(et,nt){nt.z="0px",nt.rotationY=nt.rotationX="0deg",nt.force3D=0,_renderCSSTransforms(et,nt)},_zeroDeg="0deg",_zeroPx="0px",_endParenthesis=") ",_renderCSSTransforms=function(et,nt){var rt=nt||this,it=rt.xPercent,ot=rt.yPercent,at=rt.x,st=rt.y,lt=rt.z,ct=rt.rotation,ut=rt.rotationY,ht=rt.rotationX,dt=rt.skewX,pt=rt.skewY,mt=rt.scaleX,gt=rt.scaleY,yt=rt.transformPerspective,bt=rt.force3D,vt=rt.target,xt=rt.zOrigin,kt="",St=bt==="auto"&&et&&et!==1||bt===!0;if(xt&&(ht!==_zeroDeg||ut!==_zeroDeg)){var Tt=parseFloat(ut)*_DEG2RAD,At=Math.sin(Tt),Et=Math.cos(Tt),$t;Tt=parseFloat(ht)*_DEG2RAD,$t=Math.cos(Tt),at=_addPxTranslate(vt,at,At*$t*-xt),st=_addPxTranslate(vt,st,-Math.sin(Tt)*-xt),lt=_addPxTranslate(vt,lt,Et*$t*-xt+xt)}yt!==_zeroPx&&(kt+="perspective("+yt+_endParenthesis),(it||ot)&&(kt+="translate("+it+"%, "+ot+"%) "),(St||at!==_zeroPx||st!==_zeroPx||lt!==_zeroPx)&&(kt+=lt!==_zeroPx||St?"translate3d("+at+", "+st+", "+lt+") ":"translate("+at+", "+st+_endParenthesis),ct!==_zeroDeg&&(kt+="rotate("+ct+_endParenthesis),ut!==_zeroDeg&&(kt+="rotateY("+ut+_endParenthesis),ht!==_zeroDeg&&(kt+="rotateX("+ht+_endParenthesis),(dt!==_zeroDeg||pt!==_zeroDeg)&&(kt+="skew("+dt+", "+pt+_endParenthesis),(mt!==1||gt!==1)&&(kt+="scale("+mt+", "+gt+_endParenthesis),vt.style[_transformProp]=kt||"translate(0, 0)"},_renderSVGTransforms=function(et,nt){var rt=nt||this,it=rt.xPercent,ot=rt.yPercent,at=rt.x,st=rt.y,lt=rt.rotation,ct=rt.skewX,ut=rt.skewY,ht=rt.scaleX,dt=rt.scaleY,pt=rt.target,mt=rt.xOrigin,gt=rt.yOrigin,yt=rt.xOffset,bt=rt.yOffset,vt=rt.forceCSS,xt=parseFloat(at),kt=parseFloat(st),St,Tt,At,Et,$t;lt=parseFloat(lt),ct=parseFloat(ct),ut=parseFloat(ut),ut&&(ut=parseFloat(ut),ct+=ut,lt+=ut),lt||ct?(lt*=_DEG2RAD,ct*=_DEG2RAD,St=Math.cos(lt)*ht,Tt=Math.sin(lt)*ht,At=Math.sin(lt-ct)*-dt,Et=Math.cos(lt-ct)*dt,ct&&(ut*=_DEG2RAD,$t=Math.tan(ct-ut),$t=Math.sqrt(1+$t*$t),At*=$t,Et*=$t,ut&&($t=Math.tan(ut),$t=Math.sqrt(1+$t*$t),St*=$t,Tt*=$t)),St=_round(St),Tt=_round(Tt),At=_round(At),Et=_round(Et)):(St=ht,Et=dt,Tt=At=0),(xt&&!~(at+"").indexOf("px")||kt&&!~(st+"").indexOf("px"))&&(xt=_convertToUnit(pt,"x",at,"px"),kt=_convertToUnit(pt,"y",st,"px")),(mt||gt||yt||bt)&&(xt=_round(xt+mt-(mt*St+gt*At)+yt),kt=_round(kt+gt-(mt*Tt+gt*Et)+bt)),(it||ot)&&($t=pt.getBBox(),xt=_round(xt+it/100*$t.width),kt=_round(kt+ot/100*$t.height)),$t="matrix("+St+","+Tt+","+At+","+Et+","+xt+","+kt+")",pt.setAttribute("transform",$t),vt&&(pt.style[_transformProp]=$t)},_addRotationalPropTween=function(et,nt,rt,it,ot){var at=360,st=_isString$1(ot),lt=parseFloat(ot)*(st&&~ot.indexOf("rad")?_RAD2DEG:1),ct=lt-it,ut=it+ct+"deg",ht,dt;return st&&(ht=ot.split("_")[1],ht==="short"&&(ct%=at,ct!==ct%(at/2)&&(ct+=ct<0?at:-at)),ht==="cw"&&ct<0?ct=(ct+at*_bigNum)%at-~~(ct/at)*at:ht==="ccw"&&ct>0&&(ct=(ct-at*_bigNum)%at-~~(ct/at)*at)),et._pt=dt=new PropTween(et._pt,nt,rt,it,ct,_renderPropWithEnd),dt.e=ut,dt.u="deg",et._props.push(rt),dt},_assign=function(et,nt){for(var rt in nt)et[rt]=nt[rt];return et},_addRawTransformPTs=function(et,nt,rt){var it=_assign({},rt._gsap),ot="perspective,force3D,transformOrigin,svgOrigin",at=rt.style,st,lt,ct,ut,ht,dt,pt,mt;it.svg?(ct=rt.getAttribute("transform"),rt.setAttribute("transform",""),at[_transformProp]=nt,st=_parseTransform(rt,1),_removeProperty(rt,_transformProp),rt.setAttribute("transform",ct)):(ct=getComputedStyle(rt)[_transformProp],at[_transformProp]=nt,st=_parseTransform(rt,1),at[_transformProp]=ct);for(lt in _transformProps)ct=it[lt],ut=st[lt],ct!==ut&&ot.indexOf(lt)<0&&(pt=getUnit(ct),mt=getUnit(ut),ht=pt!==mt?_convertToUnit(rt,lt,ct,mt):parseFloat(ct),dt=parseFloat(ut),et._pt=new PropTween(et._pt,st,lt,ht,dt-ht,_renderCSSProp),et._pt.u=mt||0,et._props.push(lt));_assign(st,it)};_forEachName("padding,margin,Width,Radius",function(tt,et){var nt="Top",rt="Right",it="Bottom",ot="Left",at=(et<3?[nt,rt,it,ot]:[nt+ot,nt+rt,it+rt,it+ot]).map(function(st){return et<2?tt+st:"border"+st+tt});_specialProps[et>1?"border"+tt:tt]=function(st,lt,ct,ut,ht){var dt,pt;if(arguments.length<4)return dt=at.map(function(mt){return _get$1(st,mt,ct)}),pt=dt.join(" "),pt.split(dt[0]).length===5?dt[0]:pt;dt=(ut+"").split(" "),pt={},at.forEach(function(mt,gt){return pt[mt]=dt[gt]=dt[gt]||dt[(gt-1)/2|0]}),st.init(lt,pt,ht)}});var CSSPlugin={name:"css",register:_initCore,targetTest:function(et){return et.style&&et.nodeType},init:function(et,nt,rt,it,ot){var at=this._props,st=et.style,lt=rt.vars.startAt,ct,ut,ht,dt,pt,mt,gt,yt,bt,vt,xt,kt,St,Tt,At,Et;_pluginInitted||_initCore(),this.styles=this.styles||_getStyleSaver(et),Et=this.styles.props,this.tween=rt;for(gt in nt)if(gt!=="autoRound"&&(ut=nt[gt],!(_plugins[gt]&&_checkPlugin(gt,nt,rt,it,et,ot)))){if(pt=typeof ut,mt=_specialProps[gt],pt==="function"&&(ut=ut.call(rt,it,et,ot),pt=typeof ut),pt==="string"&&~ut.indexOf("random(")&&(ut=_replaceRandom(ut)),mt)mt(this,et,gt,ut,rt)&&(At=1);else if(gt.substr(0,2)==="--")ct=(getComputedStyle(et).getPropertyValue(gt)+"").trim(),ut+="",_colorExp.lastIndex=0,_colorExp.test(ct)||(yt=getUnit(ct),bt=getUnit(ut)),bt?yt!==bt&&(ct=_convertToUnit(et,gt,ct,bt)+bt):yt&&(ut+=yt),this.add(st,"setProperty",ct,ut,it,ot,0,0,gt),at.push(gt),Et.push(gt,0,st[gt]);else if(pt!=="undefined"){if(lt&> in lt?(ct=typeof lt[gt]=="function"?lt[gt].call(rt,it,et,ot):lt[gt],_isString$1(ct)&&~ct.indexOf("random(")&&(ct=_replaceRandom(ct)),getUnit(ct+"")||(ct+=_config.units[gt]||getUnit(_get$1(et,gt))||""),(ct+"").charAt(1)==="="&&(ct=_get$1(et,gt))):ct=_get$1(et,gt),dt=parseFloat(ct),vt=pt==="string"&&ut.charAt(1)==="="&&ut.substr(0,2),vt&&(ut=ut.substr(2)),ht=parseFloat(ut),gt in _propertyAliases&&(gt==="autoAlpha"&&(dt===1&&_get$1(et,"visibility")==="hidden"&&ht&&(dt=0),Et.push("visibility",0,st.visibility),_addNonTweeningPT(this,st,"visibility",dt?"inherit":"hidden",ht?"inherit":"hidden",!ht)),gt!=="scale"&>!=="transform"&&(gt=_propertyAliases[gt],~gt.indexOf(",")&&(gt=gt.split(",")[0]))),xt=gt in _transformProps,xt){if(this.styles.save(gt),kt||(St=et._gsap,St.renderTransform&&!nt.parseTransform||_parseTransform(et,nt.parseTransform),Tt=nt.smoothOrigin!==!1&&St.smooth,kt=this._pt=new PropTween(this._pt,st,_transformProp,0,1,St.renderTransform,St,0,-1),kt.dep=1),gt==="scale")this._pt=new PropTween(this._pt,St,"scaleY",St.scaleY,(vt?_parseRelative(St.scaleY,vt+ht):ht)-St.scaleY||0,_renderCSSProp),this._pt.u=0,at.push("scaleY",gt),gt+="X";else if(gt==="transformOrigin"){Et.push(_transformOriginProp,0,st[_transformOriginProp]),ut=_convertKeywordsToPercentages(ut),St.svg?_applySVGOrigin(et,ut,0,Tt,0,this):(bt=parseFloat(ut.split(" ")[2])||0,bt!==St.zOrigin&&_addNonTweeningPT(this,St,"zOrigin",St.zOrigin,bt),_addNonTweeningPT(this,st,gt,_firstTwoOnly(ct),_firstTwoOnly(ut)));continue}else if(gt==="svgOrigin"){_applySVGOrigin(et,ut,1,Tt,0,this);continue}else if(gt in _rotationalProperties){_addRotationalPropTween(this,St,gt,dt,vt?_parseRelative(dt,vt+ut):ut);continue}else if(gt==="smoothOrigin"){_addNonTweeningPT(this,St,"smooth",St.smooth,ut);continue}else if(gt==="force3D"){St[gt]=ut;continue}else if(gt==="transform"){_addRawTransformPTs(this,ut,et);continue}}else gt in st||(gt=_checkPropPrefix(gt)||gt);if(xt||(ht||ht===0)&&(dt||dt===0)&&!_complexExp.test(ut)&> in st)yt=(ct+"").substr((dt+"").length),ht||(ht=0),bt=getUnit(ut)||(gt in _config.units?_config.units[gt]:yt),yt!==bt&&(dt=_convertToUnit(et,gt,ct,bt)),this._pt=new PropTween(this._pt,xt?St:st,gt,dt,(vt?_parseRelative(dt,vt+ht):ht)-dt,!xt&&(bt==="px"||gt==="zIndex")&&nt.autoRound!==!1?_renderRoundedCSSProp:_renderCSSProp),this._pt.u=bt||0,yt!==bt&&bt!=="%"&&(this._pt.b=ct,this._pt.r=_renderCSSPropWithBeginning);else if(gt in st)_tweenComplexCSSString.call(this,et,gt,ct,vt?vt+ut:ut);else if(gt in et)this.add(et,gt,ct||et[gt],vt?vt+ut:ut,it,ot);else if(gt!=="parseTransform"){_missingPlugin(gt,ut);continue}xt||(gt in st?Et.push(gt,0,st[gt]):Et.push(gt,1,ct||et[gt])),at.push(gt)}}At&&_sortPropTweensByPriority(this)},render:function(et,nt){if(nt.tween._time||!_reverting())for(var rt=nt._pt;rt;)rt.r(et,rt.d),rt=rt._next;else nt.styles.revert()},get:_get$1,aliases:_propertyAliases,getSetter:function(et,nt,rt){var it=_propertyAliases[nt];return it&&it.indexOf(",")<0&&(nt=it),nt in _transformProps&&nt!==_transformOriginProp&&(et._gsap.x||_get$1(et,"x"))?rt&&_recentSetterPlugin===rt?nt==="scale"?_setterScale:_setterTransform:(_recentSetterPlugin=rt||{})&&(nt==="scale"?_setterScaleWithRender:_setterTransformWithRender):et.style&&!_isUndefined(et.style[nt])?_setterCSSStyle:~nt.indexOf("-")?_setterCSSProp:_getSetter(et,nt)},core:{_removeProperty,_getMatrix}};gsap.utils.checkPrefix=_checkPropPrefix;gsap.core.getStyleSaver=_getStyleSaver;(function(tt,et,nt,rt){var it=_forEachName(tt+","+et+","+nt,function(ot){_transformProps[ot]=1});_forEachName(et,function(ot){_config.units[ot]="deg",_rotationalProperties[ot]=1}),_propertyAliases[it[13]]=tt+","+et,_forEachName(rt,function(ot){var at=ot.split(":");_propertyAliases[at[1]]=it[at[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");_forEachName("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(tt){_config.units[tt]="px"});gsap.registerPlugin(CSSPlugin);var gsapWithCSS=gsap.registerPlugin(CSSPlugin)||gsap;gsapWithCSS.core.Tween;const createRoundedBoxGeometry=(tt,et,nt,rt,it)=>{const ot=new Shape$1,at=1e-5;ot.absarc(at,at,at,-Math.PI/2,-Math.PI,!0),ot.absarc(at,et-rt*2,at,Math.PI,Math.PI/2,!0),ot.absarc(tt-rt*2,et-rt*2,at,Math.PI/2,0,!0),ot.absarc(tt-rt*2,at,at,0,-Math.PI/2,!0);const st=new ExtrudeGeometry(ot,{depth:nt-rt*2,bevelEnabled:!0,bevelSegments:it,steps:2,bevelSize:rt,bevelThickness:rt,curveSegments:it});st.center();const lt=[],ct=st.getAttribute("normal"),ut=st.getAttribute("position");for(let ht=0;ht.9?(mt=pt.x/tt+.5,gt=1-(pt.z/nt+.5)):Math.abs(dt.x)>.9?(mt=-pt.z/nt+.5,gt=1-(-pt.y/et+.5)):Math.abs(dt.z)>.9&&(mt=pt.x/tt+.5,gt=1-(-pt.y/et+.5)),lt.push(mt,gt)}return st.setAttribute("uv",new Float32BufferAttribute(lt,2)),st};createRoundedBoxGeometry(10,10,10,2,10);const boxGeometry=new BoxGeometry(10,10,10),isMainTopic=tt=>tt.node_type==="topic"&&(tt.scale||1)>5,meshRenderLimit=500,meshRenderRadius=800;let nearbyNodeTimeout=null;const nearbyNodeTimeoutCycle=500,getNearbyNodeIds=(tt,et)=>{if(nearbyNodeTimeout)return null;nearbyNodeTimeout=setTimeout(()=>{nearbyNodeTimeout&&(clearTimeout(nearbyNodeTimeout),nearbyNodeTimeout=null)},nearbyNodeTimeoutCycle);const nt=[];return tt.forEach(it=>{const ot=et.position.distanceTo(variableVector3$1.set(it.x,it.y,it.z));otit.distance-ot.distance).slice(0,meshRenderLimit).map(it=>it.id)},initialCameraPosition=new Vector3(5e3,600,1600),arriveDistance=100,topicArriveDistance=600,selectionGraphDistance=2e3,selectionGraphCameraPosition={x:172.7392402058252,y:-239.04675366094037,z:-2e3},version$1="14.8.49",createExtendedExponentialRampToValueAutomationEvent=(tt,et,nt)=>({endTime:et,insertTime:nt,type:"exponentialRampToValue",value:tt}),createExtendedLinearRampToValueAutomationEvent=(tt,et,nt)=>({endTime:et,insertTime:nt,type:"linearRampToValue",value:tt}),createSetValueAutomationEvent=(tt,et)=>({startTime:et,type:"setValue",value:tt}),createSetValueCurveAutomationEvent=(tt,et,nt)=>({duration:nt,startTime:et,type:"setValueCurve",values:tt}),getTargetValueAtTime=(tt,et,{startTime:nt,target:rt,timeConstant:it})=>rt+(et-rt)*Math.exp((nt-tt)/it),isExponentialRampToValueAutomationEvent=tt=>tt.type==="exponentialRampToValue",isLinearRampToValueAutomationEvent=tt=>tt.type==="linearRampToValue",isAnyRampToValueAutomationEvent=tt=>isExponentialRampToValueAutomationEvent(tt)||isLinearRampToValueAutomationEvent(tt),isSetValueAutomationEvent=tt=>tt.type==="setValue",isSetValueCurveAutomationEvent=tt=>tt.type==="setValueCurve",getValueOfAutomationEventAtIndexAtTime=(tt,et,nt,rt)=>{const it=tt[et];return it===void 0?rt:isAnyRampToValueAutomationEvent(it)||isSetValueAutomationEvent(it)?it.value:isSetValueCurveAutomationEvent(it)?it.values[it.values.length-1]:getTargetValueAtTime(nt,getValueOfAutomationEventAtIndexAtTime(tt,et-1,it.startTime,rt),it)},getEndTimeAndValueOfPreviousAutomationEvent=(tt,et,nt,rt,it)=>nt===void 0?[rt.insertTime,it]:isAnyRampToValueAutomationEvent(nt)?[nt.endTime,nt.value]:isSetValueAutomationEvent(nt)?[nt.startTime,nt.value]:isSetValueCurveAutomationEvent(nt)?[nt.startTime+nt.duration,nt.values[nt.values.length-1]]:[nt.startTime,getValueOfAutomationEventAtIndexAtTime(tt,et-1,nt.startTime,it)],isCancelAndHoldAutomationEvent=tt=>tt.type==="cancelAndHold",isCancelScheduledValuesAutomationEvent=tt=>tt.type==="cancelScheduledValues",getEventTime=tt=>isCancelAndHoldAutomationEvent(tt)||isCancelScheduledValuesAutomationEvent(tt)?tt.cancelTime:isExponentialRampToValueAutomationEvent(tt)||isLinearRampToValueAutomationEvent(tt)?tt.endTime:tt.startTime,getExponentialRampValueAtTime=(tt,et,nt,{endTime:rt,value:it})=>nt===it?it:0nt+(tt-et)/(rt-et)*(it-nt),interpolateValue=(tt,et)=>{const nt=Math.floor(et),rt=Math.ceil(et);return nt===rt?tt[nt]:(1-(et-nt))*tt[nt]+(1-(rt-et))*tt[rt]},getValueCurveValueAtTime=(tt,{duration:et,startTime:nt,values:rt})=>{const it=(tt-nt)/et*(rt.length-1);return interpolateValue(rt,it)},isSetTargetAutomationEvent=tt=>tt.type==="setTarget";class AutomationEventList{constructor(et){this._automationEvents=[],this._currenTime=0,this._defaultValue=et}[Symbol.iterator](){return this._automationEvents[Symbol.iterator]()}add(et){const nt=getEventTime(et);if(isCancelAndHoldAutomationEvent(et)||isCancelScheduledValuesAutomationEvent(et)){const rt=this._automationEvents.findIndex(ot=>isCancelScheduledValuesAutomationEvent(et)&&isSetValueCurveAutomationEvent(ot)?ot.startTime+ot.duration>=nt:getEventTime(ot)>=nt),it=this._automationEvents[rt];if(rt!==-1&&(this._automationEvents=this._automationEvents.slice(0,rt)),isCancelAndHoldAutomationEvent(et)){const ot=this._automationEvents[this._automationEvents.length-1];if(it!==void 0&&isAnyRampToValueAutomationEvent(it)){if(ot!==void 0&&isSetTargetAutomationEvent(ot))throw new Error("The internal list is malformed.");const at=ot===void 0?it.insertTime:isSetValueCurveAutomationEvent(ot)?ot.startTime+ot.duration:getEventTime(ot),st=ot===void 0?this._defaultValue:isSetValueCurveAutomationEvent(ot)?ot.values[ot.values.length-1]:ot.value,lt=isExponentialRampToValueAutomationEvent(it)?getExponentialRampValueAtTime(nt,at,st,it):getLinearRampValueAtTime(nt,at,st,it),ct=isExponentialRampToValueAutomationEvent(it)?createExtendedExponentialRampToValueAutomationEvent(lt,nt,this._currenTime):createExtendedLinearRampToValueAutomationEvent(lt,nt,this._currenTime);this._automationEvents.push(ct)}if(ot!==void 0&&isSetTargetAutomationEvent(ot)&&this._automationEvents.push(createSetValueAutomationEvent(this.getValue(nt),nt)),ot!==void 0&&isSetValueCurveAutomationEvent(ot)&&ot.startTime+ot.duration>nt){const at=nt-ot.startTime,st=(ot.values.length-1)/ot.duration,lt=Math.max(2,1+Math.ceil(at*st)),ct=at/(lt-1)*st,ut=ot.values.slice(0,lt);if(ct<1)for(let ht=1;htgetEventTime(at)>nt),it=rt===-1?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[rt-1];if(it!==void 0&&isSetValueCurveAutomationEvent(it)&&getEventTime(it)+it.duration>nt)return!1;const ot=isExponentialRampToValueAutomationEvent(et)?createExtendedExponentialRampToValueAutomationEvent(et.value,et.endTime,this._currenTime):isLinearRampToValueAutomationEvent(et)?createExtendedLinearRampToValueAutomationEvent(et.value,nt,this._currenTime):et;if(rt===-1)this._automationEvents.push(ot);else{if(isSetValueCurveAutomationEvent(et)&&nt+et.duration>getEventTime(this._automationEvents[rt]))return!1;this._automationEvents.splice(rt,0,ot)}}return!0}flush(et){const nt=this._automationEvents.findIndex(rt=>getEventTime(rt)>et);if(nt>1){const rt=this._automationEvents.slice(nt-1),it=rt[0];isSetTargetAutomationEvent(it)&&rt.unshift(createSetValueAutomationEvent(getValueOfAutomationEventAtIndexAtTime(this._automationEvents,nt-2,it.startTime,this._defaultValue),it.startTime)),this._automationEvents=rt}}getValue(et){if(this._automationEvents.length===0)return this._defaultValue;const nt=this._automationEvents.findIndex(at=>getEventTime(at)>et),rt=this._automationEvents[nt],it=(nt===-1?this._automationEvents.length:nt)-1,ot=this._automationEvents[it];if(ot!==void 0&&isSetTargetAutomationEvent(ot)&&(rt===void 0||!isAnyRampToValueAutomationEvent(rt)||rt.insertTime>et))return getTargetValueAtTime(et,getValueOfAutomationEventAtIndexAtTime(this._automationEvents,it-1,ot.startTime,this._defaultValue),ot);if(ot!==void 0&&isSetValueAutomationEvent(ot)&&(rt===void 0||!isAnyRampToValueAutomationEvent(rt)))return ot.value;if(ot!==void 0&&isSetValueCurveAutomationEvent(ot)&&(rt===void 0||!isAnyRampToValueAutomationEvent(rt)||ot.startTime+ot.duration>et))return et({cancelTime:tt,type:"cancelAndHold"}),createCancelScheduledValuesAutomationEvent=tt=>({cancelTime:tt,type:"cancelScheduledValues"}),createExponentialRampToValueAutomationEvent=(tt,et)=>({endTime:et,type:"exponentialRampToValue",value:tt}),createLinearRampToValueAutomationEvent=(tt,et)=>({endTime:et,type:"linearRampToValue",value:tt}),createSetTargetAutomationEvent=(tt,et,nt)=>({startTime:et,target:tt,timeConstant:nt,type:"setTarget"}),createAbortError=()=>new DOMException("","AbortError"),createAddActiveInputConnectionToAudioNode=tt=>(et,nt,[rt,it,ot],at)=>{tt(et[it],[nt,rt,ot],st=>st[0]===nt&&st[1]===rt,at)},createAddAudioNodeConnections=tt=>(et,nt,rt)=>{const it=[];for(let ot=0;ot(et,nt)=>{tt.set(et,{activeInputs:new Set,passiveInputs:new WeakMap,renderer:nt})},ACTIVE_AUDIO_NODE_STORE=new WeakSet,AUDIO_NODE_CONNECTIONS_STORE=new WeakMap,AUDIO_NODE_STORE=new WeakMap,AUDIO_PARAM_CONNECTIONS_STORE=new WeakMap,AUDIO_PARAM_STORE=new WeakMap,CONTEXT_STORE=new WeakMap,EVENT_LISTENERS=new WeakMap,CYCLE_COUNTERS=new WeakMap,NODE_NAME_TO_PROCESSOR_CONSTRUCTOR_MAPS=new WeakMap,NODE_TO_PROCESSOR_MAPS=new WeakMap,handler={construct(){return handler}},isConstructible=tt=>{try{const et=new Proxy(tt,handler);new et}catch{return!1}return!0},IMPORT_STATEMENT_REGEX=/^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]*);?/,splitImportStatements=(tt,et)=>{const nt=[];let rt=tt.replace(/^[\s]+/,""),it=rt.match(IMPORT_STATEMENT_REGEX);for(;it!==null;){const ot=it[1].slice(1,-1),at=it[0].replace(/([\s]+)?;?$/,"").replace(ot,new URL(ot,et).toString());nt.push(at),rt=rt.slice(it[0].length).replace(/^[\s]+/,""),it=rt.match(IMPORT_STATEMENT_REGEX)}return[nt.join(";"),rt]},verifyParameterDescriptors=tt=>{if(tt!==void 0&&!Array.isArray(tt))throw new TypeError("The parameterDescriptors property of given value for processorCtor is not an array.")},verifyProcessorCtor=tt=>{if(!isConstructible(tt))throw new TypeError("The given value for processorCtor should be a constructor.");if(tt.prototype===null||typeof tt.prototype!="object")throw new TypeError("The given value for processorCtor should have a prototype.")},createAddAudioWorkletModule=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt)=>{let pt=0;return(mt,gt,yt={credentials:"omit"})=>{const bt=ut.get(mt);if(bt!==void 0&&bt.has(gt))return Promise.resolve();const vt=ct.get(mt);if(vt!==void 0){const St=vt.get(gt);if(St!==void 0)return St}const xt=ot(mt),kt=xt.audioWorklet===void 0?it(gt).then(([St,Tt])=>{const[At,Et]=splitImportStatements(St,Tt),$t=`${At};((a,b)=>{(a[b]=a[b]||[]).push((AudioWorkletProcessor,global,registerProcessor,sampleRate,self,window)=>{${Et} })})(window,'_AWGS')`;return nt($t)}).then(()=>{const St=dt._AWGS.pop();if(St===void 0)throw new SyntaxError;rt(xt.currentTime,xt.sampleRate,()=>St(class{},void 0,(Tt,At)=>{if(Tt.trim()==="")throw et();const Et=NODE_NAME_TO_PROCESSOR_CONSTRUCTOR_MAPS.get(xt);if(Et!==void 0){if(Et.has(Tt))throw et();verifyProcessorCtor(At),verifyParameterDescriptors(At.parameterDescriptors),Et.set(Tt,At)}else verifyProcessorCtor(At),verifyParameterDescriptors(At.parameterDescriptors),NODE_NAME_TO_PROCESSOR_CONSTRUCTOR_MAPS.set(xt,new Map([[Tt,At]]))},xt.sampleRate,void 0,void 0))}):Promise.all([it(gt),Promise.resolve(tt(ht,ht))]).then(([[St,Tt],At])=>{const Et=pt+1;pt=Et;const[$t,Dt]=splitImportStatements(St,Tt),wt=`${$t};((AudioWorkletProcessor,registerProcessor)=>{${Dt} -})(${At?"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{${At?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${At?"":"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${Et}',class extends AudioWorkletProcessor{process(){return !1}})`,It=new Blob([wt],{type:"application/javascript; charset=utf-8"}),Ot=URL.createObjectURL(It);return xt.audioWorklet.addModule(Ot,yt).then(()=>{if(st(xt))return xt;const Wt=at(xt);return Wt.audioWorklet.addModule(Ot,yt).then(()=>Wt)}).then(Wt=>{if(lt===null)throw new SyntaxError;try{new lt(Wt,`__sac${Et}`)}catch{throw new SyntaxError}}).finally(()=>URL.revokeObjectURL(Ot))});return vt===void 0?ct.set(mt,new Map([[gt,kt]])):vt.set(gt,kt),kt.then(()=>{const St=ut.get(mt);St===void 0?ut.set(mt,new Set([gt])):St.add(gt)}).finally(()=>{const St=ct.get(mt);St!==void 0&&St.delete(gt)}),kt}},getValueForKey=(tt,et)=>{const nt=tt.get(et);if(nt===void 0)throw new Error("A value with the given key could not be found.");return nt},pickElementFromSet=(tt,et)=>{const nt=Array.from(tt).filter(et);if(nt.length>1)throw Error("More than one element was found.");if(nt.length===0)throw Error("No element was found.");const[rt]=nt;return tt.delete(rt),rt},deletePassiveInputConnectionToAudioNode=(tt,et,nt,rt)=>{const it=getValueForKey(tt,et),ot=pickElementFromSet(it,at=>at[0]===nt&&at[1]===rt);return it.size===0&&tt.delete(et),ot},getEventListenersOfAudioNode=tt=>getValueForKey(EVENT_LISTENERS,tt),setInternalStateToActive=tt=>{if(ACTIVE_AUDIO_NODE_STORE.has(tt))throw new Error("The AudioNode is already stored.");ACTIVE_AUDIO_NODE_STORE.add(tt),getEventListenersOfAudioNode(tt).forEach(et=>et(!0))},isAudioWorkletNode=tt=>"port"in tt,setInternalStateToPassive=tt=>{if(!ACTIVE_AUDIO_NODE_STORE.has(tt))throw new Error("The AudioNode is not stored.");ACTIVE_AUDIO_NODE_STORE.delete(tt),getEventListenersOfAudioNode(tt).forEach(et=>et(!1))},setInternalStateToPassiveWhenNecessary=(tt,et)=>{!isAudioWorkletNode(tt)&&et.every(nt=>nt.size===0)&&setInternalStateToPassive(tt)},createAddConnectionToAudioNode=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt)=>{const pt=new WeakMap;return(mt,gt,yt,bt,vt)=>{const{activeInputs:xt,passiveInputs:kt}=ot(gt),{outputs:St}=ot(mt),Tt=st(mt),At=Et=>{const $t=lt(gt),Dt=lt(mt);if(Et){const jt=deletePassiveInputConnectionToAudioNode(kt,mt,yt,bt);tt(xt,mt,jt,!1),!vt&&!ht(mt)&&nt(Dt,$t,yt,bt),dt(gt)&&setInternalStateToActive(gt)}else{const jt=rt(xt,mt,yt,bt);et(kt,bt,jt,!1),!vt&&!ht(mt)&&it(Dt,$t,yt,bt);const Pt=at(gt);if(Pt===0)ut(gt)&&setInternalStateToPassiveWhenNecessary(gt,xt);else{const Ct=pt.get(gt);Ct!==void 0&&clearTimeout(Ct),pt.set(gt,setTimeout(()=>{ut(gt)&&setInternalStateToPassiveWhenNecessary(gt,xt)},Pt*1e3))}}};return ct(St,[gt,yt,bt],Et=>Et[0]===gt&&Et[1]===yt&&Et[2]===bt,!0)?(Tt.add(At),ut(mt)?tt(xt,mt,[yt,bt,At],!0):et(kt,bt,[mt,yt,At],!0),!0):!1}},createAddPassiveInputConnectionToAudioNode=tt=>(et,nt,[rt,it,ot],at)=>{const st=et.get(rt);st===void 0?et.set(rt,new Set([[it,nt,ot]])):tt(st,[it,nt,ot],lt=>lt[0]===it&<[1]===nt,at)},createAddSilentConnection=tt=>(et,nt)=>{const rt=tt(et,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});nt.connect(rt).connect(et.destination);const it=()=>{nt.removeEventListener("ended",it),nt.disconnect(rt),rt.disconnect()};nt.addEventListener("ended",it)},createAddUnrenderedAudioWorkletNode=tt=>(et,nt)=>{tt(et).add(nt)},DEFAULT_OPTIONS$j={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},createAnalyserNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=it(st),ut={...DEFAULT_OPTIONS$j,...lt},ht=rt(ct,ut),dt=ot(ct)?et():null;super(st,!1,ht,dt),this._nativeAnalyserNode=ht}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(st){this._nativeAnalyserNode.fftSize=st}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(st){const lt=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=st,!(st>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=lt,nt()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(st){const lt=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=st,!(this._nativeAnalyserNode.maxDecibels>st))throw this._nativeAnalyserNode.minDecibels=lt,nt()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(st){this._nativeAnalyserNode.smoothingTimeConstant=st}getByteFrequencyData(st){this._nativeAnalyserNode.getByteFrequencyData(st)}getByteTimeDomainData(st){this._nativeAnalyserNode.getByteTimeDomainData(st)}getFloatFrequencyData(st){this._nativeAnalyserNode.getFloatFrequencyData(st)}getFloatTimeDomainData(st){this._nativeAnalyserNode.getFloatTimeDomainData(st)}},isOwnedByContext=(tt,et)=>tt.context===et,createAnalyserNodeRendererFactory=(tt,et,nt)=>()=>{const rt=new WeakMap,it=async(ot,at)=>{let st=et(ot);if(!isOwnedByContext(st,at)){const ct={channelCount:st.channelCount,channelCountMode:st.channelCountMode,channelInterpretation:st.channelInterpretation,fftSize:st.fftSize,maxDecibels:st.maxDecibels,minDecibels:st.minDecibels,smoothingTimeConstant:st.smoothingTimeConstant};st=tt(at,ct)}return rt.set(at,st),await nt(ot,at,st),st};return{render(ot,at){const st=rt.get(at);return st!==void 0?Promise.resolve(st):it(ot,at)}}},testAudioBufferCopyChannelMethodsOutOfBoundsSupport=tt=>{try{tt.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},createIndexSizeError=()=>new DOMException("","IndexSizeError"),wrapAudioBufferGetChannelDataMethod=tt=>{tt.getChannelData=(et=>nt=>{try{return et.call(tt,nt)}catch(rt){throw rt.code===12?createIndexSizeError():rt}})(tt.getChannelData)},DEFAULT_OPTIONS$i={numberOfChannels:1},createAudioBufferConstructor=(tt,et,nt,rt,it,ot,at,st)=>{let lt=null;return class ww{constructor(ut){if(it===null)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:ht,numberOfChannels:dt,sampleRate:pt}={...DEFAULT_OPTIONS$i,...ut};lt===null&&(lt=new it(1,1,44100));const mt=rt!==null&&et(ot,ot)?new rt({length:ht,numberOfChannels:dt,sampleRate:pt}):lt.createBuffer(dt,ht,pt);if(mt.numberOfChannels===0)throw nt();return typeof mt.copyFromChannel!="function"?(at(mt),wrapAudioBufferGetChannelDataMethod(mt)):et(testAudioBufferCopyChannelMethodsOutOfBoundsSupport,()=>testAudioBufferCopyChannelMethodsOutOfBoundsSupport(mt))||st(mt),tt.add(mt),mt}static[Symbol.hasInstance](ut){return ut!==null&&typeof ut=="object"&&Object.getPrototypeOf(ut)===ww.prototype||tt.has(ut)}}},MOST_NEGATIVE_SINGLE_FLOAT=-34028234663852886e22,MOST_POSITIVE_SINGLE_FLOAT=-MOST_NEGATIVE_SINGLE_FLOAT,isActiveAudioNode=tt=>ACTIVE_AUDIO_NODE_STORE.has(tt),DEFAULT_OPTIONS$h={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},createAudioBufferSourceNodeConstructor=(tt,et,nt,rt,it,ot,at,st)=>class extends tt{constructor(ct,ut){const ht=ot(ct),dt={...DEFAULT_OPTIONS$h,...ut},pt=it(ht,dt),mt=at(ht),gt=mt?et():null;super(ct,!1,pt,gt),this._audioBufferSourceNodeRenderer=gt,this._isBufferNullified=!1,this._isBufferSet=dt.buffer!==null,this._nativeAudioBufferSourceNode=pt,this._onended=null,this._playbackRate=nt(this,mt,pt.playbackRate,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(ct){if(this._nativeAudioBufferSourceNode.buffer=ct,ct!==null){if(this._isBufferSet)throw rt();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(ct){this._nativeAudioBufferSourceNode.loop=ct}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(ct){this._nativeAudioBufferSourceNode.loopEnd=ct}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(ct){this._nativeAudioBufferSourceNode.loopStart=ct}get onended(){return this._onended}set onended(ct){const ut=typeof ct=="function"?st(this,ct):null;this._nativeAudioBufferSourceNode.onended=ut;const ht=this._nativeAudioBufferSourceNode.onended;this._onended=ht!==null&&ht===ut?ct:ht}get playbackRate(){return this._playbackRate}start(ct=0,ut=0,ht){if(this._nativeAudioBufferSourceNode.start(ct,ut,ht),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.start=ht===void 0?[ct,ut]:[ct,ut,ht]),this.context.state!=="closed"){setInternalStateToActive(this);const dt=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",dt),isActiveAudioNode(this)&&setInternalStateToPassive(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",dt)}}stop(ct=0){this._nativeAudioBufferSourceNode.stop(ct),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.stop=ct)}},createAudioBufferSourceNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap;let at=null,st=null;const lt=async(ct,ut)=>{let ht=nt(ct);const dt=isOwnedByContext(ht,ut);if(!dt){const pt={buffer:ht.buffer,channelCount:ht.channelCount,channelCountMode:ht.channelCountMode,channelInterpretation:ht.channelInterpretation,loop:ht.loop,loopEnd:ht.loopEnd,loopStart:ht.loopStart,playbackRate:ht.playbackRate.value};ht=et(ut,pt),at!==null&&ht.start(...at),st!==null&&ht.stop(st)}return ot.set(ut,ht),dt?await tt(ut,ct.playbackRate,ht.playbackRate):await rt(ut,ct.playbackRate,ht.playbackRate),await it(ct,ut,ht),ht};return{set start(ct){at=ct},set stop(ct){st=ct},render(ct,ut){const ht=ot.get(ut);return ht!==void 0?Promise.resolve(ht):lt(ct,ut)}}},isAudioBufferSourceNode=tt=>"playbackRate"in tt,isBiquadFilterNode=tt=>"frequency"in tt&&"gain"in tt,isConstantSourceNode=tt=>"offset"in tt,isGainNode=tt=>!("frequency"in tt)&&"gain"in tt,isOscillatorNode=tt=>"detune"in tt&&"frequency"in tt,isStereoPannerNode=tt=>"pan"in tt,getAudioNodeConnections=tt=>getValueForKey(AUDIO_NODE_CONNECTIONS_STORE,tt),getAudioParamConnections=tt=>getValueForKey(AUDIO_PARAM_CONNECTIONS_STORE,tt),deactivateActiveAudioNodeInputConnections=(tt,et)=>{const{activeInputs:nt}=getAudioNodeConnections(tt);nt.forEach(it=>it.forEach(([ot])=>{et.includes(tt)||deactivateActiveAudioNodeInputConnections(ot,[...et,tt])}));const rt=isAudioBufferSourceNode(tt)?[tt.playbackRate]:isAudioWorkletNode(tt)?Array.from(tt.parameters.values()):isBiquadFilterNode(tt)?[tt.Q,tt.detune,tt.frequency,tt.gain]:isConstantSourceNode(tt)?[tt.offset]:isGainNode(tt)?[tt.gain]:isOscillatorNode(tt)?[tt.detune,tt.frequency]:isStereoPannerNode(tt)?[tt.pan]:[];for(const it of rt){const ot=getAudioParamConnections(it);ot!==void 0&&ot.activeInputs.forEach(([at])=>deactivateActiveAudioNodeInputConnections(at,et))}isActiveAudioNode(tt)&&setInternalStateToPassive(tt)},deactivateAudioGraph=tt=>{deactivateActiveAudioNodeInputConnections(tt.destination,[])},isValidLatencyHint=tt=>tt===void 0||typeof tt=="number"||typeof tt=="string"&&(tt==="balanced"||tt==="interactive"||tt==="playback"),createAudioContextConstructor=(tt,et,nt,rt,it,ot,at,st,lt)=>class extends tt{constructor(ut={}){if(lt===null)throw new Error("Missing the native AudioContext constructor.");let ht;try{ht=new lt(ut)}catch(mt){throw mt.code===12&&mt.message==="sampleRate is not in range"?nt():mt}if(ht===null)throw rt();if(!isValidLatencyHint(ut.latencyHint))throw new TypeError(`The provided value '${ut.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(ut.sampleRate!==void 0&&ht.sampleRate!==ut.sampleRate)throw nt();super(ht,2);const{latencyHint:dt}=ut,{sampleRate:pt}=ht;if(this._baseLatency=typeof ht.baseLatency=="number"?ht.baseLatency:dt==="balanced"?512/pt:dt==="interactive"||dt===void 0?256/pt:dt==="playback"?1024/pt:Math.max(2,Math.min(128,Math.round(dt*pt/128)))*128/pt,this._nativeAudioContext=ht,lt.name==="webkitAudioContext"?(this._nativeGainNode=ht.createGain(),this._nativeOscillatorNode=ht.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(ht.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,ht.state==="running"){this._state="suspended";const mt=()=>{this._state==="suspended"&&(this._state=null),ht.removeEventListener("statechange",mt)};ht.addEventListener("statechange",mt)}}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 et()}):(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()),deactivateAudioGraph(this)}))}createMediaElementSource(ut){return new it(this,{mediaElement:ut})}createMediaStreamDestination(){return new ot(this)}createMediaStreamSource(ut){return new at(this,{mediaStream:ut})}createMediaStreamTrackSource(ut){return new st(this,{mediaStreamTrack:ut})}resume(){return this._state==="suspended"?new Promise((ut,ht)=>{const dt=()=>{this._nativeAudioContext.removeEventListener("statechange",dt),this._nativeAudioContext.state==="running"?ut():this.resume().then(ut,ht)};this._nativeAudioContext.addEventListener("statechange",dt)}):this._nativeAudioContext.resume().catch(ut=>{throw ut===void 0||ut.code===15?et():ut})}suspend(){return this._nativeAudioContext.suspend().catch(ut=>{throw ut===void 0?et():ut})}},createAudioDestinationNodeConstructor=(tt,et,nt,rt,it,ot,at,st)=>class extends tt{constructor(ct,ut){const ht=ot(ct),dt=at(ht),pt=it(ht,ut,dt),mt=dt?et(st):null;super(ct,!1,pt,mt),this._isNodeOfNativeOfflineAudioContext=dt,this._nativeAudioDestinationNode=pt}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(ct){if(this._isNodeOfNativeOfflineAudioContext)throw rt();if(ct>this._nativeAudioDestinationNode.maxChannelCount)throw nt();this._nativeAudioDestinationNode.channelCount=ct}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(ct){if(this._isNodeOfNativeOfflineAudioContext)throw rt();this._nativeAudioDestinationNode.channelCountMode=ct}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}},createAudioDestinationNodeRenderer=tt=>{const et=new WeakMap,nt=async(rt,it)=>{const ot=it.destination;return et.set(it,ot),await tt(rt,it,ot),ot};return{render(rt,it){const ot=et.get(it);return ot!==void 0?Promise.resolve(ot):nt(rt,it)}}},createAudioListenerFactory=(tt,et,nt,rt,it,ot,at,st)=>(lt,ct)=>{const ut=ct.listener,ht=()=>{const St=new Float32Array(1),Tt=et(ct,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),At=at(ct);let Et=!1,$t=[0,0,-1,0,1,0],Dt=[0,0,0];const jt=()=>{if(Et)return;Et=!0;const It=rt(ct,256,9,0);It.onaudioprocess=({inputBuffer:Ot})=>{const Wt=[ot(Ot,St,0),ot(Ot,St,1),ot(Ot,St,2),ot(Ot,St,3),ot(Ot,St,4),ot(Ot,St,5)];Wt.some((Ft,Nt)=>Ft!==$t[Nt])&&(ut.setOrientation(...Wt),$t=Wt);const zt=[ot(Ot,St,6),ot(Ot,St,7),ot(Ot,St,8)];zt.some((Ft,Nt)=>Ft!==Dt[Nt])&&(ut.setPosition(...zt),Dt=zt)},Tt.connect(It)},Pt=It=>Ot=>{Ot!==$t[It]&&($t[It]=Ot,ut.setOrientation(...$t))},Ct=It=>Ot=>{Ot!==Dt[It]&&(Dt[It]=Ot,ut.setPosition(...Dt))},wt=(It,Ot,Wt)=>{const zt=nt(ct,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:Ot});zt.connect(Tt,0,It),zt.start(),Object.defineProperty(zt.offset,"defaultValue",{get(){return Ot}});const Ft=tt({context:lt},At,zt.offset,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT);return st(Ft,"value",Nt=>()=>Nt.call(Ft),Nt=>Ut=>{try{Nt.call(Ft,Ut)}catch(Mt){if(Mt.code!==9)throw Mt}jt(),At&&Wt(Ut)}),Ft.cancelAndHoldAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.cancelAndHoldAtTime),Ft.cancelScheduledValues=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.cancelScheduledValues),Ft.exponentialRampToValueAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.exponentialRampToValueAtTime),Ft.linearRampToValueAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.linearRampToValueAtTime),Ft.setTargetAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.setTargetAtTime),Ft.setValueAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.setValueAtTime),Ft.setValueCurveAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.setValueCurveAtTime),Ft};return{forwardX:wt(0,0,Pt(0)),forwardY:wt(1,0,Pt(1)),forwardZ:wt(2,-1,Pt(2)),positionX:wt(6,0,Ct(0)),positionY:wt(7,0,Ct(1)),positionZ:wt(8,0,Ct(2)),upX:wt(3,0,Pt(3)),upY:wt(4,1,Pt(4)),upZ:wt(5,0,Pt(5))}},{forwardX:dt,forwardY:pt,forwardZ:mt,positionX:gt,positionY:yt,positionZ:bt,upX:vt,upY:xt,upZ:kt}=ut.forwardX===void 0?ht():ut;return{get forwardX(){return dt},get forwardY(){return pt},get forwardZ(){return mt},get positionX(){return gt},get positionY(){return yt},get positionZ(){return bt},get upX(){return vt},get upY(){return xt},get upZ(){return kt}}},isAudioNode$1=tt=>"context"in tt,isAudioNodeOutputConnection=tt=>isAudioNode$1(tt[0]),insertElementInSet=(tt,et,nt,rt)=>{for(const it of tt)if(nt(it)){if(rt)return!1;throw Error("The set contains at least one similar element.")}return tt.add(et),!0},addActiveInputConnectionToAudioParam=(tt,et,[nt,rt],it)=>{insertElementInSet(tt,[et,nt,rt],ot=>ot[0]===et&&ot[1]===nt,it)},addPassiveInputConnectionToAudioParam=(tt,[et,nt,rt],it)=>{const ot=tt.get(et);ot===void 0?tt.set(et,new Set([[nt,rt]])):insertElementInSet(ot,[nt,rt],at=>at[0]===nt,it)},isNativeAudioNodeFaker=tt=>"inputs"in tt,connectNativeAudioNodeToNativeAudioNode=(tt,et,nt,rt)=>{if(isNativeAudioNodeFaker(et)){const it=et.inputs[rt];return tt.connect(it,nt,0),[it,nt,0]}return tt.connect(et,nt,rt),[et,nt,rt]},deleteActiveInputConnection=(tt,et,nt)=>{for(const rt of tt)if(rt[0]===et&&rt[1]===nt)return tt.delete(rt),rt;return null},deleteActiveInputConnectionToAudioParam=(tt,et,nt)=>pickElementFromSet(tt,rt=>rt[0]===et&&rt[1]===nt),deleteEventListenerOfAudioNode=(tt,et)=>{if(!getEventListenersOfAudioNode(tt).delete(et))throw new Error("Missing the expected event listener.")},deletePassiveInputConnectionToAudioParam=(tt,et,nt)=>{const rt=getValueForKey(tt,et),it=pickElementFromSet(rt,ot=>ot[0]===nt);return rt.size===0&&tt.delete(et),it},disconnectNativeAudioNodeFromNativeAudioNode=(tt,et,nt,rt)=>{isNativeAudioNodeFaker(et)?tt.disconnect(et.inputs[rt],nt,0):tt.disconnect(et,nt,rt)},getNativeAudioNode=tt=>getValueForKey(AUDIO_NODE_STORE,tt),getNativeAudioParam=tt=>getValueForKey(AUDIO_PARAM_STORE,tt),isPartOfACycle=tt=>CYCLE_COUNTERS.has(tt),isPassiveAudioNode=tt=>!ACTIVE_AUDIO_NODE_STORE.has(tt),testAudioNodeDisconnectMethodSupport=(tt,et)=>new Promise(nt=>{if(et!==null)nt(!0);else{const rt=tt.createScriptProcessor(256,1,1),it=tt.createGain(),ot=tt.createBuffer(1,2,44100),at=ot.getChannelData(0);at[0]=1,at[1]=1;const st=tt.createBufferSource();st.buffer=ot,st.loop=!0,st.connect(rt).connect(tt.destination),st.connect(it),st.disconnect(it),rt.onaudioprocess=lt=>{const ct=lt.inputBuffer.getChannelData(0);Array.prototype.some.call(ct,ut=>ut===1)?nt(!0):nt(!1),st.stop(),rt.onaudioprocess=null,st.disconnect(rt),rt.disconnect(tt.destination)},st.start()}}),visitEachAudioNodeOnce=(tt,et)=>{const nt=new Map;for(const rt of tt)for(const it of rt){const ot=nt.get(it);nt.set(it,ot===void 0?1:ot+1)}nt.forEach((rt,it)=>et(it,rt))},isNativeAudioNode$1=tt=>"context"in tt,wrapAudioNodeDisconnectMethod=tt=>{const et=new Map;tt.connect=(nt=>(rt,it=0,ot=0)=>{const at=isNativeAudioNode$1(rt)?nt(rt,it,ot):nt(rt,it),st=et.get(rt);return st===void 0?et.set(rt,[{input:ot,output:it}]):st.every(lt=>lt.input!==ot||lt.output!==it)&&st.push({input:ot,output:it}),at})(tt.connect.bind(tt)),tt.disconnect=(nt=>(rt,it,ot)=>{if(nt.apply(tt),rt===void 0)et.clear();else if(typeof rt=="number")for(const[at,st]of et){const lt=st.filter(ct=>ct.output!==rt);lt.length===0?et.delete(at):et.set(at,lt)}else if(et.has(rt))if(it===void 0)et.delete(rt);else{const at=et.get(rt);if(at!==void 0){const st=at.filter(lt=>lt.output!==it&&(lt.input!==ot||ot===void 0));st.length===0?et.delete(rt):et.set(rt,st)}}for(const[at,st]of et)st.forEach(lt=>{isNativeAudioNode$1(at)?tt.connect(at,lt.output,lt.input):tt.connect(at,lt.output)})})(tt.disconnect)},addConnectionToAudioParamOfAudioContext=(tt,et,nt,rt)=>{const{activeInputs:it,passiveInputs:ot}=getAudioParamConnections(et),{outputs:at}=getAudioNodeConnections(tt),st=getEventListenersOfAudioNode(tt),lt=ct=>{const ut=getNativeAudioNode(tt),ht=getNativeAudioParam(et);if(ct){const dt=deletePassiveInputConnectionToAudioParam(ot,tt,nt);addActiveInputConnectionToAudioParam(it,tt,dt,!1),!rt&&!isPartOfACycle(tt)&&ut.connect(ht,nt)}else{const dt=deleteActiveInputConnectionToAudioParam(it,tt,nt);addPassiveInputConnectionToAudioParam(ot,dt,!1),!rt&&!isPartOfACycle(tt)&&ut.disconnect(ht,nt)}};return insertElementInSet(at,[et,nt],ct=>ct[0]===et&&ct[1]===nt,!0)?(st.add(lt),isActiveAudioNode(tt)?addActiveInputConnectionToAudioParam(it,tt,[nt,lt],!0):addPassiveInputConnectionToAudioParam(ot,[tt,nt,lt],!0),!0):!1},deleteInputConnectionOfAudioNode=(tt,et,nt,rt)=>{const{activeInputs:it,passiveInputs:ot}=getAudioNodeConnections(et),at=deleteActiveInputConnection(it[rt],tt,nt);return at===null?[deletePassiveInputConnectionToAudioNode(ot,tt,nt,rt)[2],!1]:[at[2],!0]},deleteInputConnectionOfAudioParam=(tt,et,nt)=>{const{activeInputs:rt,passiveInputs:it}=getAudioParamConnections(et),ot=deleteActiveInputConnection(rt,tt,nt);return ot===null?[deletePassiveInputConnectionToAudioParam(it,tt,nt)[1],!1]:[ot[2],!0]},deleteInputsOfAudioNode=(tt,et,nt,rt,it)=>{const[ot,at]=deleteInputConnectionOfAudioNode(tt,nt,rt,it);if(ot!==null&&(deleteEventListenerOfAudioNode(tt,ot),at&&!et&&!isPartOfACycle(tt)&&disconnectNativeAudioNodeFromNativeAudioNode(getNativeAudioNode(tt),getNativeAudioNode(nt),rt,it)),isActiveAudioNode(nt)){const{activeInputs:st}=getAudioNodeConnections(nt);setInternalStateToPassiveWhenNecessary(nt,st)}},deleteInputsOfAudioParam=(tt,et,nt,rt)=>{const[it,ot]=deleteInputConnectionOfAudioParam(tt,nt,rt);it!==null&&(deleteEventListenerOfAudioNode(tt,it),ot&&!et&&!isPartOfACycle(tt)&&getNativeAudioNode(tt).disconnect(getNativeAudioParam(nt),rt))},deleteAnyConnection=(tt,et)=>{const nt=getAudioNodeConnections(tt),rt=[];for(const it of nt.outputs)isAudioNodeOutputConnection(it)?deleteInputsOfAudioNode(tt,et,...it):deleteInputsOfAudioParam(tt,et,...it),rt.push(it[0]);return nt.outputs.clear(),rt},deleteConnectionAtOutput=(tt,et,nt)=>{const rt=getAudioNodeConnections(tt),it=[];for(const ot of rt.outputs)ot[1]===nt&&(isAudioNodeOutputConnection(ot)?deleteInputsOfAudioNode(tt,et,...ot):deleteInputsOfAudioParam(tt,et,...ot),it.push(ot[0]),rt.outputs.delete(ot));return it},deleteConnectionToDestination=(tt,et,nt,rt,it)=>{const ot=getAudioNodeConnections(tt);return Array.from(ot.outputs).filter(at=>at[0]===nt&&(rt===void 0||at[1]===rt)&&(it===void 0||at[2]===it)).map(at=>(isAudioNodeOutputConnection(at)?deleteInputsOfAudioNode(tt,et,...at):deleteInputsOfAudioParam(tt,et,...at),ot.outputs.delete(at),at[0]))},createAudioNodeConstructor=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt,pt,mt,gt)=>class extends ct{constructor(bt,vt,xt,kt){super(xt),this._context=bt,this._nativeAudioNode=xt;const St=ut(bt);ht(St)&&nt(testAudioNodeDisconnectMethodSupport,()=>testAudioNodeDisconnectMethodSupport(St,gt))!==!0&&wrapAudioNodeDisconnectMethod(xt),AUDIO_NODE_STORE.set(this,xt),EVENT_LISTENERS.set(this,new Set),bt.state!=="closed"&&vt&&setInternalStateToActive(this),tt(this,kt,xt)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(bt){this._nativeAudioNode.channelCount=bt}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(bt){this._nativeAudioNode.channelCountMode=bt}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(bt){this._nativeAudioNode.channelInterpretation=bt}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(bt,vt=0,xt=0){if(vt<0||vt>=this._nativeAudioNode.numberOfOutputs)throw it();const kt=ut(this._context),St=mt(kt);if(dt(bt)||pt(bt))throw ot();if(isAudioNode$1(bt)){const Et=getNativeAudioNode(bt);try{const Dt=connectNativeAudioNodeToNativeAudioNode(this._nativeAudioNode,Et,vt,xt),jt=isPassiveAudioNode(this);(St||jt)&&this._nativeAudioNode.disconnect(...Dt),this.context.state!=="closed"&&!jt&&isPassiveAudioNode(bt)&&setInternalStateToActive(bt)}catch(Dt){throw Dt.code===12?ot():Dt}if(et(this,bt,vt,xt,St)){const Dt=lt([this],bt);visitEachAudioNodeOnce(Dt,rt(St))}return bt}const Tt=getNativeAudioParam(bt);if(Tt.name==="playbackRate"&&Tt.maxValue===1024)throw at();try{this._nativeAudioNode.connect(Tt,vt),(St||isPassiveAudioNode(this))&&this._nativeAudioNode.disconnect(Tt,vt)}catch(Et){throw Et.code===12?ot():Et}if(addConnectionToAudioParamOfAudioContext(this,bt,vt,St)){const Et=lt([this],bt);visitEachAudioNodeOnce(Et,rt(St))}}disconnect(bt,vt,xt){let kt;const St=ut(this._context),Tt=mt(St);if(bt===void 0)kt=deleteAnyConnection(this,Tt);else if(typeof bt=="number"){if(bt<0||bt>=this.numberOfOutputs)throw it();kt=deleteConnectionAtOutput(this,Tt,bt)}else{if(vt!==void 0&&(vt<0||vt>=this.numberOfOutputs)||isAudioNode$1(bt)&&xt!==void 0&&(xt<0||xt>=bt.numberOfInputs))throw it();if(kt=deleteConnectionToDestination(this,Tt,bt,vt,xt),kt.length===0)throw ot()}for(const At of kt){const Et=lt([this],At);visitEachAudioNodeOnce(Et,st)}}},createAudioParamFactory=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt)=>(pt,mt,gt,yt=null,bt=null)=>{const vt=gt.value,xt=new AutomationEventList(vt),kt=mt?rt(xt):null,St={get defaultValue(){return vt},get maxValue(){return yt===null?gt.maxValue:yt},get minValue(){return bt===null?gt.minValue:bt},get value(){return gt.value},set value(Tt){gt.value=Tt,St.setValueAtTime(Tt,pt.context.currentTime)},cancelAndHoldAtTime(Tt){if(typeof gt.cancelAndHoldAtTime=="function")kt===null&&xt.flush(pt.context.currentTime),xt.add(it(Tt)),gt.cancelAndHoldAtTime(Tt);else{const At=Array.from(xt).pop();kt===null&&xt.flush(pt.context.currentTime),xt.add(it(Tt));const Et=Array.from(xt).pop();gt.cancelScheduledValues(Tt),At!==Et&&Et!==void 0&&(Et.type==="exponentialRampToValue"?gt.exponentialRampToValueAtTime(Et.value,Et.endTime):Et.type==="linearRampToValue"?gt.linearRampToValueAtTime(Et.value,Et.endTime):Et.type==="setValue"?gt.setValueAtTime(Et.value,Et.startTime):Et.type==="setValueCurve"&>.setValueCurveAtTime(Et.values,Et.startTime,Et.duration))}return St},cancelScheduledValues(Tt){return kt===null&&xt.flush(pt.context.currentTime),xt.add(ot(Tt)),gt.cancelScheduledValues(Tt),St},exponentialRampToValueAtTime(Tt,At){if(Tt===0)throw new RangeError;if(!Number.isFinite(At)||At<0)throw new RangeError;const Et=pt.context.currentTime;return kt===null&&xt.flush(Et),Array.from(xt).length===0&&(xt.add(ct(vt,Et)),gt.setValueAtTime(vt,Et)),xt.add(at(Tt,At)),gt.exponentialRampToValueAtTime(Tt,At),St},linearRampToValueAtTime(Tt,At){const Et=pt.context.currentTime;return kt===null&&xt.flush(Et),Array.from(xt).length===0&&(xt.add(ct(vt,Et)),gt.setValueAtTime(vt,Et)),xt.add(st(Tt,At)),gt.linearRampToValueAtTime(Tt,At),St},setTargetAtTime(Tt,At,Et){return kt===null&&xt.flush(pt.context.currentTime),xt.add(lt(Tt,At,Et)),gt.setTargetAtTime(Tt,At,Et),St},setValueAtTime(Tt,At){return kt===null&&xt.flush(pt.context.currentTime),xt.add(ct(Tt,At)),gt.setValueAtTime(Tt,At),St},setValueCurveAtTime(Tt,At,Et){const $t=Tt instanceof Float32Array?Tt:new Float32Array(Tt);if(ht!==null&&ht.name==="webkitAudioContext"){const Dt=At+Et,jt=pt.context.sampleRate,Pt=Math.ceil(At*jt),Ct=Math.floor(Dt*jt),wt=Ct-Pt,It=new Float32Array(wt);for(let Wt=0;Wt({replay(et){for(const nt of tt)if(nt.type==="exponentialRampToValue"){const{endTime:rt,value:it}=nt;et.exponentialRampToValueAtTime(it,rt)}else if(nt.type==="linearRampToValue"){const{endTime:rt,value:it}=nt;et.linearRampToValueAtTime(it,rt)}else if(nt.type==="setTarget"){const{startTime:rt,target:it,timeConstant:ot}=nt;et.setTargetAtTime(it,rt,ot)}else if(nt.type==="setValue"){const{startTime:rt,value:it}=nt;et.setValueAtTime(it,rt)}else if(nt.type==="setValueCurve"){const{duration:rt,startTime:it,values:ot}=nt;et.setValueCurveAtTime(ot,it,rt)}else throw new Error("Can't apply an unknown automation.")}});class ReadOnlyMap{constructor(et){this._map=new Map(et)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(et,nt=null){return this._map.forEach((rt,it)=>et.call(nt,rt,it,this))}get(et){return this._map.get(et)}has(et){return this._map.has(et)}keys(){return this._map.keys()}values(){return this._map.values()}}const DEFAULT_OPTIONS$g={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}},createAudioWorkletNodeConstructor=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt,pt)=>class extends et{constructor(gt,yt,bt){var vt;const xt=st(gt),kt=lt(xt),St=ut({...DEFAULT_OPTIONS$g,...bt});dt(St);const Tt=NODE_NAME_TO_PROCESSOR_CONSTRUCTOR_MAPS.get(xt),At=Tt==null?void 0:Tt.get(yt),Et=kt||xt.state!=="closed"?xt:(vt=at(xt))!==null&&vt!==void 0?vt:xt,$t=it(Et,kt?null:gt.baseLatency,ct,yt,At,St),Dt=kt?rt(yt,St,At):null;super(gt,!0,$t,Dt);const jt=[];$t.parameters.forEach((Ct,wt)=>{const It=nt(this,kt,Ct);jt.push([wt,It])}),this._nativeAudioWorkletNode=$t,this._onprocessorerror=null,this._parameters=new ReadOnlyMap(jt),kt&&tt(xt,this);const{activeInputs:Pt}=ot(this);ht($t,Pt)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(gt){const yt=typeof gt=="function"?pt(this,gt):null;this._nativeAudioWorkletNode.onprocessorerror=yt;const bt=this._nativeAudioWorkletNode.onprocessorerror;this._onprocessorerror=bt!==null&&bt===yt?gt:bt}get parameters(){return this._parameters===null?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}};function copyFromChannel(tt,et,nt,rt,it){if(typeof tt.copyFromChannel=="function")et[nt].byteLength===0&&(et[nt]=new Float32Array(128)),tt.copyFromChannel(et[nt],rt,it);else{const ot=tt.getChannelData(rt);if(et[nt].byteLength===0)et[nt]=ot.slice(it,it+128);else{const at=new Float32Array(ot.buffer,it*Float32Array.BYTES_PER_ELEMENT,128);et[nt].set(at)}}}const copyToChannel=(tt,et,nt,rt,it)=>{typeof tt.copyToChannel=="function"?et[nt].byteLength!==0&&tt.copyToChannel(et[nt],rt,it):et[nt].byteLength!==0&&tt.getChannelData(rt).set(et[nt],it)},createNestedArrays=(tt,et)=>{const nt=[];for(let rt=0;rt{const nt=getValueForKey(NODE_TO_PROCESSOR_MAPS,tt),rt=getNativeAudioNode(et);return getValueForKey(nt,rt)},processBuffer=async(tt,et,nt,rt,it,ot,at)=>{const st=et===null?Math.ceil(tt.context.length/128)*128:et.length,lt=rt.channelCount*rt.numberOfInputs,ct=it.reduce((yt,bt)=>yt+bt,0),ut=ct===0?null:nt.createBuffer(ct,st,nt.sampleRate);if(ot===void 0)throw new Error("Missing the processor constructor.");const ht=getAudioNodeConnections(tt),dt=await getAudioWorkletProcessor(nt,tt),pt=createNestedArrays(rt.numberOfInputs,rt.channelCount),mt=createNestedArrays(rt.numberOfOutputs,it),gt=Array.from(tt.parameters.keys()).reduce((yt,bt)=>({...yt,[bt]:new Float32Array(128)}),{});for(let yt=0;yt0&&et!==null)for(let bt=0;bt{copyFromChannel(et,gt,bt,lt+vt,yt)});for(let bt=0;btht.activeInputs[kt].size===0?[]:xt),vt=at(yt/nt.sampleRate,nt.sampleRate,()=>dt.process(bt,mt,gt));if(ut!==null)for(let xt=0,kt=0;xt(yt,bt,vt)=>{const xt=new WeakMap;let kt=null;const St=async(Tt,At)=>{let Et=ut(Tt),$t=null;const Dt=isOwnedByContext(Et,At),jt=Array.isArray(bt.outputChannelCount)?bt.outputChannelCount:Array.from(bt.outputChannelCount);if(ht===null){const Pt=jt.reduce((Ot,Wt)=>Ot+Wt,0),Ct=it(At,{channelCount:Math.max(1,Pt),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,Pt)}),wt=[];for(let Ot=0;Ot{const Ut=new dt(Ft,Math.ceil(Tt.context.length/128)*128,At.sampleRate),Mt=[],Ht=[];for(let Kt=0;Kt{const rn=ot(Ut,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:Kt.value});return await pt(Ut,Kt,rn.offset),rn})),sn=rt(Ut,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,Wt+zt)});for(let Kt=0;Ktmt(Tt,Ut,Kt))),gt(Ut)})(),At,bt,jt,vt,ct)}const Pt=await kt,Ct=nt(At,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[wt,It,Ot]=$t;Pt!==null&&(Ct.buffer=Pt,Ct.start(0)),Ct.connect(wt);for(let Wt=0,zt=0;Wtclass extends mt{constructor(St,Tt){super(St,Tt),this._nativeContext=St,this._audioWorklet=tt===void 0?void 0:{addModule:(At,Et)=>tt(this,At,Et)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new et(this)}createBiquadFilter(){return new it(this)}createBuffer(St,Tt,At){return new nt({length:Tt,numberOfChannels:St,sampleRate:At})}createBufferSource(){return new rt(this)}createChannelMerger(St=6){return new ot(this,{numberOfInputs:St})}createChannelSplitter(St=6){return new at(this,{numberOfOutputs:St})}createConstantSource(){return new st(this)}createConvolver(){return new lt(this)}createDelay(St=1){return new ut(this,{maxDelayTime:St})}createDynamicsCompressor(){return new ht(this)}createGain(){return new dt(this)}createIIRFilter(St,Tt){return new pt(this,{feedback:Tt,feedforward:St})}createOscillator(){return new gt(this)}createPanner(){return new yt(this)}createPeriodicWave(St,Tt,At={disableNormalization:!1}){return new bt(this,{...At,imag:Tt,real:St})}createStereoPanner(){return new vt(this)}createWaveShaper(){return new xt(this)}decodeAudioData(St,Tt,At){return ct(this._nativeContext,St).then(Et=>(typeof Tt=="function"&&Tt(Et),Et),Et=>{throw typeof At=="function"&&At(Et),Et})}},DEFAULT_OPTIONS$f={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},createBiquadFilterNodeConstructor=(tt,et,nt,rt,it,ot,at,st)=>class extends tt{constructor(ct,ut){const ht=ot(ct),dt={...DEFAULT_OPTIONS$f,...ut},pt=it(ht,dt),mt=at(ht),gt=mt?nt():null;super(ct,!1,pt,gt),this._Q=et(this,mt,pt.Q,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._detune=et(this,mt,pt.detune,1200*Math.log2(MOST_POSITIVE_SINGLE_FLOAT),-1200*Math.log2(MOST_POSITIVE_SINGLE_FLOAT)),this._frequency=et(this,mt,pt.frequency,ct.sampleRate/2,0),this._gain=et(this,mt,pt.gain,40*Math.log10(MOST_POSITIVE_SINGLE_FLOAT),MOST_NEGATIVE_SINGLE_FLOAT),this._nativeBiquadFilterNode=pt,st(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(ct){this._nativeBiquadFilterNode.type=ct}getFrequencyResponse(ct,ut,ht){try{this._nativeBiquadFilterNode.getFrequencyResponse(ct,ut,ht)}catch(dt){throw dt.code===11?rt():dt}if(ct.length!==ut.length||ut.length!==ht.length)throw rt()}},createBiquadFilterNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap,at=async(st,lt)=>{let ct=nt(st);const ut=isOwnedByContext(ct,lt);if(!ut){const ht={Q:ct.Q.value,channelCount:ct.channelCount,channelCountMode:ct.channelCountMode,channelInterpretation:ct.channelInterpretation,detune:ct.detune.value,frequency:ct.frequency.value,gain:ct.gain.value,type:ct.type};ct=et(lt,ht)}return ot.set(lt,ct),ut?(await tt(lt,st.Q,ct.Q),await tt(lt,st.detune,ct.detune),await tt(lt,st.frequency,ct.frequency),await tt(lt,st.gain,ct.gain)):(await rt(lt,st.Q,ct.Q),await rt(lt,st.detune,ct.detune),await rt(lt,st.frequency,ct.frequency),await rt(lt,st.gain,ct.gain)),await it(st,lt,ct),ct};return{render(st,lt){const ct=ot.get(lt);return ct!==void 0?Promise.resolve(ct):at(st,lt)}}},createCacheTestResult=(tt,et)=>(nt,rt)=>{const it=et.get(nt);if(it!==void 0)return it;const ot=tt.get(nt);if(ot!==void 0)return ot;try{const at=rt();return at instanceof Promise?(tt.set(nt,at),at.catch(()=>!1).then(st=>(tt.delete(nt),et.set(nt,st),st))):(et.set(nt,at),at)}catch{return et.set(nt,!1),!1}},DEFAULT_OPTIONS$e={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},createChannelMergerNodeConstructor=(tt,et,nt,rt,it)=>class extends tt{constructor(at,st){const lt=rt(at),ct={...DEFAULT_OPTIONS$e,...st},ut=nt(lt,ct),ht=it(lt)?et():null;super(at,!1,ut,ht)}},createChannelMergerNodeRendererFactory=(tt,et,nt)=>()=>{const rt=new WeakMap,it=async(ot,at)=>{let st=et(ot);if(!isOwnedByContext(st,at)){const ct={channelCount:st.channelCount,channelCountMode:st.channelCountMode,channelInterpretation:st.channelInterpretation,numberOfInputs:st.numberOfInputs};st=tt(at,ct)}return rt.set(at,st),await nt(ot,at,st),st};return{render(ot,at){const st=rt.get(at);return st!==void 0?Promise.resolve(st):it(ot,at)}}},DEFAULT_OPTIONS$d={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},createChannelSplitterNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=rt(st),ut=ot({...DEFAULT_OPTIONS$d,...lt}),ht=nt(ct,ut),dt=it(ct)?et():null;super(st,!1,ht,dt)}},createChannelSplitterNodeRendererFactory=(tt,et,nt)=>()=>{const rt=new WeakMap,it=async(ot,at)=>{let st=et(ot);if(!isOwnedByContext(st,at)){const ct={channelCount:st.channelCount,channelCountMode:st.channelCountMode,channelInterpretation:st.channelInterpretation,numberOfOutputs:st.numberOfOutputs};st=tt(at,ct)}return rt.set(at,st),await nt(ot,at,st),st};return{render(ot,at){const st=rt.get(at);return st!==void 0?Promise.resolve(st):it(ot,at)}}},createConnectAudioParam=tt=>(et,nt,rt)=>tt(nt,et,rt),createConnectMultipleOutputs=tt=>(et,nt,rt=0,it=0)=>{const ot=et[rt];if(ot===void 0)throw tt();return isNativeAudioNode$1(nt)?ot.connect(nt,0,it):ot.connect(nt,0)},createConnectedNativeAudioBufferSourceNodeFactory=tt=>(et,nt)=>{const rt=tt(et,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),it=et.createBuffer(1,2,44100);return rt.buffer=it,rt.loop=!0,rt.connect(nt),rt.start(),()=>{rt.stop(),rt.disconnect(nt)}},DEFAULT_OPTIONS$c={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},createConstantSourceNodeConstructor=(tt,et,nt,rt,it,ot,at)=>class extends tt{constructor(lt,ct){const ut=it(lt),ht={...DEFAULT_OPTIONS$c,...ct},dt=rt(ut,ht),pt=ot(ut),mt=pt?nt():null;super(lt,!1,dt,mt),this._constantSourceNodeRenderer=mt,this._nativeConstantSourceNode=dt,this._offset=et(this,pt,dt.offset,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(lt){const ct=typeof lt=="function"?at(this,lt):null;this._nativeConstantSourceNode.onended=ct;const ut=this._nativeConstantSourceNode.onended;this._onended=ut!==null&&ut===ct?lt:ut}start(lt=0){if(this._nativeConstantSourceNode.start(lt),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.start=lt),this.context.state!=="closed"){setInternalStateToActive(this);const ct=()=>{this._nativeConstantSourceNode.removeEventListener("ended",ct),isActiveAudioNode(this)&&setInternalStateToPassive(this)};this._nativeConstantSourceNode.addEventListener("ended",ct)}}stop(lt=0){this._nativeConstantSourceNode.stop(lt),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.stop=lt)}},createConstantSourceNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap;let at=null,st=null;const lt=async(ct,ut)=>{let ht=nt(ct);const dt=isOwnedByContext(ht,ut);if(!dt){const pt={channelCount:ht.channelCount,channelCountMode:ht.channelCountMode,channelInterpretation:ht.channelInterpretation,offset:ht.offset.value};ht=et(ut,pt),at!==null&&ht.start(at),st!==null&&ht.stop(st)}return ot.set(ut,ht),dt?await tt(ut,ct.offset,ht.offset):await rt(ut,ct.offset,ht.offset),await it(ct,ut,ht),ht};return{set start(ct){at=ct},set stop(ct){st=ct},render(ct,ut){const ht=ot.get(ut);return ht!==void 0?Promise.resolve(ht):lt(ct,ut)}}},createConvertNumberToUnsignedLong=tt=>et=>(tt[0]=et,tt[0]),DEFAULT_OPTIONS$b={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},createConvolverNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=rt(st),ut={...DEFAULT_OPTIONS$b,...lt},ht=nt(ct,ut),pt=it(ct)?et():null;super(st,!1,ht,pt),this._isBufferNullified=!1,this._nativeConvolverNode=ht,ut.buffer!==null&&ot(this,ut.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(st){if(this._nativeConvolverNode.buffer=st,st===null&&this._nativeConvolverNode.buffer!==null){const lt=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=lt.createBuffer(1,1,lt.sampleRate),this._isBufferNullified=!0,ot(this,0)}else this._isBufferNullified=!1,ot(this,this._nativeConvolverNode.buffer===null?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(st){this._nativeConvolverNode.normalize=st}},createConvolverNodeRendererFactory=(tt,et,nt)=>()=>{const rt=new WeakMap,it=async(ot,at)=>{let st=et(ot);if(!isOwnedByContext(st,at)){const ct={buffer:st.buffer,channelCount:st.channelCount,channelCountMode:st.channelCountMode,channelInterpretation:st.channelInterpretation,disableNormalization:!st.normalize};st=tt(at,ct)}return rt.set(at,st),isNativeAudioNodeFaker(st)?await nt(ot,at,st.inputs[0]):await nt(ot,at,st),st};return{render(ot,at){const st=rt.get(at);return st!==void 0?Promise.resolve(st):it(ot,at)}}},createCreateNativeOfflineAudioContext=(tt,et)=>(nt,rt,it)=>{if(et===null)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new et(nt,rt,it)}catch(ot){throw ot.name==="SyntaxError"?tt():ot}},createDataCloneError=()=>new DOMException("","DataCloneError"),detachArrayBuffer=tt=>{const{port1:et,port2:nt}=new MessageChannel;return new Promise(rt=>{const it=()=>{nt.onmessage=null,et.close(),nt.close(),rt()};nt.onmessage=()=>it();try{et.postMessage(tt,[tt])}catch{}finally{it()}})},createDecodeAudioData=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut)=>(ht,dt)=>{const pt=at(ht)?ht:ot(ht);if(it.has(dt)){const mt=nt();return Promise.reject(mt)}try{it.add(dt)}catch{}return et(lt,()=>lt(pt))?pt.decodeAudioData(dt).then(mt=>(detachArrayBuffer(dt).catch(()=>{}),et(st,()=>st(mt))||ut(mt),tt.add(mt),mt)):new Promise((mt,gt)=>{const yt=async()=>{try{await detachArrayBuffer(dt)}catch{}},bt=vt=>{gt(vt),yt()};try{pt.decodeAudioData(dt,vt=>{typeof vt.copyFromChannel!="function"&&(ct(vt),wrapAudioBufferGetChannelDataMethod(vt)),tt.add(vt),yt().then(()=>mt(vt))},vt=>{bt(vt===null?rt():vt)})}catch(vt){bt(vt)}})},createDecrementCycleCounter=(tt,et,nt,rt,it,ot,at,st)=>(lt,ct)=>{const ut=et.get(lt);if(ut===void 0)throw new Error("Missing the expected cycle count.");const ht=ot(lt.context),dt=st(ht);if(ut===ct){if(et.delete(lt),!dt&&at(lt)){const pt=rt(lt),{outputs:mt}=nt(lt);for(const gt of mt)if(isAudioNodeOutputConnection(gt)){const yt=rt(gt[0]);tt(pt,yt,gt[1],gt[2])}else{const yt=it(gt[0]);pt.connect(yt,gt[1])}}}else et.set(lt,ut-ct)},DEFAULT_OPTIONS$a={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},createDelayNodeConstructor=(tt,et,nt,rt,it,ot,at)=>class extends tt{constructor(lt,ct){const ut=it(lt),ht={...DEFAULT_OPTIONS$a,...ct},dt=rt(ut,ht),pt=ot(ut),mt=pt?nt(ht.maxDelayTime):null;super(lt,!1,dt,mt),this._delayTime=et(this,pt,dt.delayTime),at(this,ht.maxDelayTime)}get delayTime(){return this._delayTime}},createDelayNodeRendererFactory=(tt,et,nt,rt,it)=>ot=>{const at=new WeakMap,st=async(lt,ct)=>{let ut=nt(lt);const ht=isOwnedByContext(ut,ct);if(!ht){const dt={channelCount:ut.channelCount,channelCountMode:ut.channelCountMode,channelInterpretation:ut.channelInterpretation,delayTime:ut.delayTime.value,maxDelayTime:ot};ut=et(ct,dt)}return at.set(ct,ut),ht?await tt(ct,lt.delayTime,ut.delayTime):await rt(ct,lt.delayTime,ut.delayTime),await it(lt,ct,ut),ut};return{render(lt,ct){const ut=at.get(ct);return ut!==void 0?Promise.resolve(ut):st(lt,ct)}}},createDeleteActiveInputConnectionToAudioNode=tt=>(et,nt,rt,it)=>tt(et[it],ot=>ot[0]===nt&&ot[1]===rt),createDeleteUnrenderedAudioWorkletNode=tt=>(et,nt)=>{tt(et).delete(nt)},isDelayNode=tt=>"delayTime"in tt,createDetectCycles=(tt,et,nt)=>function rt(it,ot){const at=isAudioNode$1(ot)?ot:nt(tt,ot);if(isDelayNode(at))return[];if(it[0]===at)return[it];if(it.includes(at))return[];const{outputs:st}=et(at);return Array.from(st).map(lt=>rt([...it,at],lt[0])).reduce((lt,ct)=>lt.concat(ct),[])},getOutputAudioNodeAtIndex=(tt,et,nt)=>{const rt=et[nt];if(rt===void 0)throw tt();return rt},createDisconnectMultipleOutputs=tt=>(et,nt=void 0,rt=void 0,it=0)=>nt===void 0?et.forEach(ot=>ot.disconnect()):typeof nt=="number"?getOutputAudioNodeAtIndex(tt,et,nt).disconnect():isNativeAudioNode$1(nt)?rt===void 0?et.forEach(ot=>ot.disconnect(nt)):it===void 0?getOutputAudioNodeAtIndex(tt,et,rt).disconnect(nt,0):getOutputAudioNodeAtIndex(tt,et,rt).disconnect(nt,0,it):rt===void 0?et.forEach(ot=>ot.disconnect(nt)):getOutputAudioNodeAtIndex(tt,et,rt).disconnect(nt,0),DEFAULT_OPTIONS$9={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},createDynamicsCompressorNodeConstructor=(tt,et,nt,rt,it,ot,at,st)=>class extends tt{constructor(ct,ut){const ht=ot(ct),dt={...DEFAULT_OPTIONS$9,...ut},pt=rt(ht,dt),mt=at(ht),gt=mt?nt():null;super(ct,!1,pt,gt),this._attack=et(this,mt,pt.attack),this._knee=et(this,mt,pt.knee),this._nativeDynamicsCompressorNode=pt,this._ratio=et(this,mt,pt.ratio),this._release=et(this,mt,pt.release),this._threshold=et(this,mt,pt.threshold),st(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(ct){const ut=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=ct,ct>2)throw this._nativeDynamicsCompressorNode.channelCount=ut,it()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(ct){const ut=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=ct,ct==="max")throw this._nativeDynamicsCompressorNode.channelCountMode=ut,it()}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}},createDynamicsCompressorNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap,at=async(st,lt)=>{let ct=nt(st);const ut=isOwnedByContext(ct,lt);if(!ut){const ht={attack:ct.attack.value,channelCount:ct.channelCount,channelCountMode:ct.channelCountMode,channelInterpretation:ct.channelInterpretation,knee:ct.knee.value,ratio:ct.ratio.value,release:ct.release.value,threshold:ct.threshold.value};ct=et(lt,ht)}return ot.set(lt,ct),ut?(await tt(lt,st.attack,ct.attack),await tt(lt,st.knee,ct.knee),await tt(lt,st.ratio,ct.ratio),await tt(lt,st.release,ct.release),await tt(lt,st.threshold,ct.threshold)):(await rt(lt,st.attack,ct.attack),await rt(lt,st.knee,ct.knee),await rt(lt,st.ratio,ct.ratio),await rt(lt,st.release,ct.release),await rt(lt,st.threshold,ct.threshold)),await it(st,lt,ct),ct};return{render(st,lt){const ct=ot.get(lt);return ct!==void 0?Promise.resolve(ct):at(st,lt)}}},createEncodingError=()=>new DOMException("","EncodingError"),createEvaluateSource=tt=>et=>new Promise((nt,rt)=>{if(tt===null){rt(new SyntaxError);return}const it=tt.document.head;if(it===null)rt(new SyntaxError);else{const ot=tt.document.createElement("script"),at=new Blob([et],{type:"application/javascript"}),st=URL.createObjectURL(at),lt=tt.onerror,ct=()=>{tt.onerror=lt,URL.revokeObjectURL(st)};tt.onerror=(ut,ht,dt,pt,mt)=>{if(ht===st||ht===tt.location.href&&dt===1&&pt===1)return ct(),rt(mt),!1;if(lt!==null)return lt(ut,ht,dt,pt,mt)},ot.onerror=()=>{ct(),rt(new SyntaxError)},ot.onload=()=>{ct(),nt()},ot.src=st,ot.type="module",it.appendChild(ot)}}),createEventTargetConstructor=tt=>class{constructor(nt){this._nativeEventTarget=nt,this._listeners=new WeakMap}addEventListener(nt,rt,it){if(rt!==null){let ot=this._listeners.get(rt);ot===void 0&&(ot=tt(this,rt),typeof rt=="function"&&this._listeners.set(rt,ot)),this._nativeEventTarget.addEventListener(nt,ot,it)}}dispatchEvent(nt){return this._nativeEventTarget.dispatchEvent(nt)}removeEventListener(nt,rt,it){const ot=rt===null?void 0:this._listeners.get(rt);this._nativeEventTarget.removeEventListener(nt,ot===void 0?null:ot,it)}},createExposeCurrentFrameAndCurrentTime=tt=>(et,nt,rt)=>{Object.defineProperties(tt,{currentFrame:{configurable:!0,get(){return Math.round(et*nt)}},currentTime:{configurable:!0,get(){return et}}});try{return rt()}finally{tt!==null&&(delete tt.currentFrame,delete tt.currentTime)}},createFetchSource=tt=>async et=>{try{const nt=await fetch(et);if(nt.ok)return[await nt.text(),nt.url]}catch{}throw tt()},DEFAULT_OPTIONS$8={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},createGainNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=it(st),ut={...DEFAULT_OPTIONS$8,...lt},ht=rt(ct,ut),dt=ot(ct),pt=dt?nt():null;super(st,!1,ht,pt),this._gain=et(this,dt,ht.gain,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT)}get gain(){return this._gain}},createGainNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap,at=async(st,lt)=>{let ct=nt(st);const ut=isOwnedByContext(ct,lt);if(!ut){const ht={channelCount:ct.channelCount,channelCountMode:ct.channelCountMode,channelInterpretation:ct.channelInterpretation,gain:ct.gain.value};ct=et(lt,ht)}return ot.set(lt,ct),ut?await tt(lt,st.gain,ct.gain):await rt(lt,st.gain,ct.gain),await it(st,lt,ct),ct};return{render(st,lt){const ct=ot.get(lt);return ct!==void 0?Promise.resolve(ct):at(st,lt)}}},createGetActiveAudioWorkletNodeInputs=(tt,et)=>nt=>et(tt,nt),createGetAudioNodeRenderer=tt=>et=>{const nt=tt(et);if(nt.renderer===null)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return nt.renderer},createGetAudioNodeTailTime=tt=>et=>{var nt;return(nt=tt.get(et))!==null&&nt!==void 0?nt:0},createGetAudioParamRenderer=tt=>et=>{const nt=tt(et);if(nt.renderer===null)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return nt.renderer},createGetBackupOfflineAudioContext=tt=>et=>tt.get(et),createInvalidStateError=()=>new DOMException("","InvalidStateError"),createGetNativeContext=tt=>et=>{const nt=tt.get(et);if(nt===void 0)throw createInvalidStateError();return nt},createGetOrCreateBackupOfflineAudioContext=(tt,et)=>nt=>{let rt=tt.get(nt);if(rt!==void 0)return rt;if(et===null)throw new Error("Missing the native OfflineAudioContext constructor.");return rt=new et(1,1,44100),tt.set(nt,rt),rt},createGetUnrenderedAudioWorkletNodes=tt=>et=>{const nt=tt.get(et);if(nt===void 0)throw new Error("The context has no set of AudioWorkletNodes.");return nt},createInvalidAccessError=()=>new DOMException("","InvalidAccessError"),wrapIIRFilterNodeGetFrequencyResponseMethod=tt=>{tt.getFrequencyResponse=(et=>(nt,rt,it)=>{if(nt.length!==rt.length||rt.length!==it.length)throw createInvalidAccessError();return et.call(tt,nt,rt,it)})(tt.getFrequencyResponse)},DEFAULT_OPTIONS$7={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},createIIRFilterNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=rt(st),ut=it(ct),ht={...DEFAULT_OPTIONS$7,...lt},dt=et(ct,ut?null:st.baseLatency,ht),pt=ut?nt(ht.feedback,ht.feedforward):null;super(st,!1,dt,pt),wrapIIRFilterNodeGetFrequencyResponseMethod(dt),this._nativeIIRFilterNode=dt,ot(this,1)}getFrequencyResponse(st,lt,ct){return this._nativeIIRFilterNode.getFrequencyResponse(st,lt,ct)}},filterBuffer=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut)=>{const ht=ct.length;let dt=st;for(let pt=0;pt{const it=nt instanceof Float64Array?nt:new Float64Array(nt),ot=rt instanceof Float64Array?rt:new Float64Array(rt),at=it.length,st=ot.length,lt=Math.min(at,st);if(it[0]!==1){for(let mt=0;mt(ot,at)=>{const st=new WeakMap;let lt=null;const ct=async(ut,ht)=>{let dt=null,pt=et(ut);const mt=isOwnedByContext(pt,ht);if(ht.createIIRFilter===void 0?dt=tt(ht,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):mt||(pt=ht.createIIRFilter(at,ot)),st.set(ht,dt===null?pt:dt),dt!==null){if(lt===null){if(nt===null)throw new Error("Missing the native OfflineAudioContext constructor.");const yt=new nt(ut.context.destination.channelCount,ut.context.length,ht.sampleRate);lt=(async()=>{await rt(ut,yt,yt.destination);const bt=await it(yt);return filterFullBuffer(bt,ht,ot,at)})()}const gt=await lt;return dt.buffer=gt,dt.start(0),dt}return await rt(ut,ht,pt),pt};return{render(ut,ht){const dt=st.get(ht);return dt!==void 0?Promise.resolve(dt):ct(ut,ht)}}},createIncrementCycleCounterFactory=(tt,et,nt,rt,it,ot)=>at=>(st,lt)=>{const ct=tt.get(st);if(ct===void 0){if(!at&&ot(st)){const ut=rt(st),{outputs:ht}=nt(st);for(const dt of ht)if(isAudioNodeOutputConnection(dt)){const pt=rt(dt[0]);et(ut,pt,dt[1],dt[2])}else{const pt=it(dt[0]);ut.disconnect(pt,dt[1])}}tt.set(st,lt)}else tt.set(st,ct+lt)},createIsAnyAudioContext=(tt,et)=>nt=>{const rt=tt.get(nt);return et(rt)||et(nt)},createIsAnyAudioNode=(tt,et)=>nt=>tt.has(nt)||et(nt),createIsAnyAudioParam=(tt,et)=>nt=>tt.has(nt)||et(nt),createIsAnyOfflineAudioContext=(tt,et)=>nt=>{const rt=tt.get(nt);return et(rt)||et(nt)},createIsNativeAudioContext=tt=>et=>tt!==null&&et instanceof tt,createIsNativeAudioNode=tt=>et=>tt!==null&&typeof tt.AudioNode=="function"&&et instanceof tt.AudioNode,createIsNativeAudioParam=tt=>et=>tt!==null&&typeof tt.AudioParam=="function"&&et instanceof tt.AudioParam,createIsNativeContext=(tt,et)=>nt=>tt(nt)||et(nt),createIsNativeOfflineAudioContext=tt=>et=>tt!==null&&et instanceof tt,createIsSecureContext=tt=>tt!==null&&tt.isSecureContext,createMediaElementAudioSourceNodeConstructor=(tt,et,nt,rt)=>class extends tt{constructor(ot,at){const st=nt(ot),lt=et(st,at);if(rt(st))throw TypeError();super(ot,!0,lt,null),this._nativeMediaElementAudioSourceNode=lt}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}},DEFAULT_OPTIONS$6={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},createMediaStreamAudioDestinationNodeConstructor=(tt,et,nt,rt)=>class extends tt{constructor(ot,at){const st=nt(ot);if(rt(st))throw new TypeError;const lt={...DEFAULT_OPTIONS$6,...at},ct=et(st,lt);super(ot,!1,ct,null),this._nativeMediaStreamAudioDestinationNode=ct}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}},createMediaStreamAudioSourceNodeConstructor=(tt,et,nt,rt)=>class extends tt{constructor(ot,at){const st=nt(ot),lt=et(st,at);if(rt(st))throw new TypeError;super(ot,!0,lt,null),this._nativeMediaStreamAudioSourceNode=lt}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}},createMediaStreamTrackAudioSourceNodeConstructor=(tt,et,nt)=>class extends tt{constructor(it,ot){const at=nt(it),st=et(at,ot);super(it,!0,st,null)}},createMinimalBaseAudioContextConstructor=(tt,et,nt,rt,it,ot)=>class extends nt{constructor(st,lt){super(st),this._nativeContext=st,CONTEXT_STORE.set(this,st),rt(st)&&it.set(st,new Set),this._destination=new tt(this,lt),this._listener=et(this,st),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(st){const lt=typeof st=="function"?ot(this,st):null;this._nativeContext.onstatechange=lt;const ct=this._nativeContext.onstatechange;this._onstatechange=ct!==null&&ct===lt?st:ct}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}},testPromiseSupport=tt=>{const et=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const nt=tt.decodeAudioData(et.buffer,()=>{});return nt===void 0?!1:(nt.catch(()=>{}),!0)}catch{}return!1},createMonitorConnections=(tt,et)=>(nt,rt,it)=>{const ot=new Set;return nt.connect=(at=>(st,lt=0,ct=0)=>{const ut=ot.size===0;if(et(st))return at.call(nt,st,lt,ct),tt(ot,[st,lt,ct],ht=>ht[0]===st&&ht[1]===lt&&ht[2]===ct,!0),ut&&rt(),st;at.call(nt,st,lt),tt(ot,[st,lt],ht=>ht[0]===st&&ht[1]===lt,!0),ut&&rt()})(nt.connect),nt.disconnect=(at=>(st,lt,ct)=>{const ut=ot.size>0;if(st===void 0)at.apply(nt),ot.clear();else if(typeof st=="number"){at.call(nt,st);for(const dt of ot)dt[1]===st&&ot.delete(dt)}else{et(st)?at.call(nt,st,lt,ct):at.call(nt,st,lt);for(const dt of ot)dt[0]===st&&(lt===void 0||dt[1]===lt)&&(ct===void 0||dt[2]===ct)&&ot.delete(dt)}const ht=ot.size===0;ut&&ht&&it()})(nt.disconnect),nt},assignNativeAudioNodeOption=(tt,et,nt)=>{const rt=et[nt];rt!==void 0&&rt!==tt[nt]&&(tt[nt]=rt)},assignNativeAudioNodeOptions=(tt,et)=>{assignNativeAudioNodeOption(tt,et,"channelCount"),assignNativeAudioNodeOption(tt,et,"channelCountMode"),assignNativeAudioNodeOption(tt,et,"channelInterpretation")},testAnalyserNodeGetFloatTimeDomainDataMethodSupport=tt=>typeof tt.getFloatTimeDomainData=="function",wrapAnalyserNodeGetFloatTimeDomainDataMethod=tt=>{tt.getFloatTimeDomainData=et=>{const nt=new Uint8Array(et.length);tt.getByteTimeDomainData(nt);const rt=Math.max(nt.length,tt.fftSize);for(let it=0;it(nt,rt)=>{const it=nt.createAnalyser();if(assignNativeAudioNodeOptions(it,rt),!(rt.maxDecibels>rt.minDecibels))throw et();return assignNativeAudioNodeOption(it,rt,"fftSize"),assignNativeAudioNodeOption(it,rt,"maxDecibels"),assignNativeAudioNodeOption(it,rt,"minDecibels"),assignNativeAudioNodeOption(it,rt,"smoothingTimeConstant"),tt(testAnalyserNodeGetFloatTimeDomainDataMethodSupport,()=>testAnalyserNodeGetFloatTimeDomainDataMethodSupport(it))||wrapAnalyserNodeGetFloatTimeDomainDataMethod(it),it},createNativeAudioBufferConstructor=tt=>tt===null?null:tt.hasOwnProperty("AudioBuffer")?tt.AudioBuffer:null,assignNativeAudioNodeAudioParamValue=(tt,et,nt)=>{const rt=et[nt];rt!==void 0&&rt!==tt[nt].value&&(tt[nt].value=rt)},wrapAudioBufferSourceNodeStartMethodConsecutiveCalls=tt=>{tt.start=(et=>{let nt=!1;return(rt=0,it=0,ot)=>{if(nt)throw createInvalidStateError();et.call(tt,rt,it,ot),nt=!0}})(tt.start)},wrapAudioScheduledSourceNodeStartMethodNegativeParameters=tt=>{tt.start=(et=>(nt=0,rt=0,it)=>{if(typeof it=="number"&&it<0||rt<0||nt<0)throw new RangeError("The parameters can't be negative.");et.call(tt,nt,rt,it)})(tt.start)},wrapAudioScheduledSourceNodeStopMethodNegativeParameters=tt=>{tt.stop=(et=>(nt=0)=>{if(nt<0)throw new RangeError("The parameter can't be negative.");et.call(tt,nt)})(tt.stop)},createNativeAudioBufferSourceNodeFactory=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut)=>(ht,dt)=>{const pt=ht.createBufferSource();return assignNativeAudioNodeOptions(pt,dt),assignNativeAudioNodeAudioParamValue(pt,dt,"playbackRate"),assignNativeAudioNodeOption(pt,dt,"buffer"),assignNativeAudioNodeOption(pt,dt,"loop"),assignNativeAudioNodeOption(pt,dt,"loopEnd"),assignNativeAudioNodeOption(pt,dt,"loopStart"),et(nt,()=>nt(ht))||wrapAudioBufferSourceNodeStartMethodConsecutiveCalls(pt),et(rt,()=>rt(ht))||lt(pt),et(it,()=>it(ht))||ct(pt,ht),et(ot,()=>ot(ht))||wrapAudioScheduledSourceNodeStartMethodNegativeParameters(pt),et(at,()=>at(ht))||ut(pt,ht),et(st,()=>st(ht))||wrapAudioScheduledSourceNodeStopMethodNegativeParameters(pt),tt(ht,pt),pt},createNativeAudioContextConstructor=tt=>tt===null?null:tt.hasOwnProperty("AudioContext")?tt.AudioContext:tt.hasOwnProperty("webkitAudioContext")?tt.webkitAudioContext:null,createNativeAudioDestinationNodeFactory=(tt,et)=>(nt,rt,it)=>{const ot=nt.destination;if(ot.channelCount!==rt)try{ot.channelCount=rt}catch{}it&&ot.channelCountMode!=="explicit"&&(ot.channelCountMode="explicit"),ot.maxChannelCount===0&&Object.defineProperty(ot,"maxChannelCount",{value:rt});const at=tt(nt,{channelCount:rt,channelCountMode:ot.channelCountMode,channelInterpretation:ot.channelInterpretation,gain:1});return et(at,"channelCount",st=>()=>st.call(at),st=>lt=>{st.call(at,lt);try{ot.channelCount=lt}catch(ct){if(lt>ot.maxChannelCount)throw ct}}),et(at,"channelCountMode",st=>()=>st.call(at),st=>lt=>{st.call(at,lt),ot.channelCountMode=lt}),et(at,"channelInterpretation",st=>()=>st.call(at),st=>lt=>{st.call(at,lt),ot.channelInterpretation=lt}),Object.defineProperty(at,"maxChannelCount",{get:()=>ot.maxChannelCount}),at.connect(ot),at},createNativeAudioWorkletNodeConstructor=tt=>tt===null?null:tt.hasOwnProperty("AudioWorkletNode")?tt.AudioWorkletNode:null,testClonabilityOfAudioWorkletNodeOptions=tt=>{const{port1:et}=new MessageChannel;try{et.postMessage(tt)}finally{et.close()}},createNativeAudioWorkletNodeFactory=(tt,et,nt,rt,it)=>(ot,at,st,lt,ct,ut)=>{if(st!==null)try{const ht=new st(ot,lt,ut),dt=new Map;let pt=null;if(Object.defineProperties(ht,{channelCount:{get:()=>ut.channelCount,set:()=>{throw tt()}},channelCountMode:{get:()=>"explicit",set:()=>{throw tt()}},onprocessorerror:{get:()=>pt,set:mt=>{typeof pt=="function"&&ht.removeEventListener("processorerror",pt),pt=typeof mt=="function"?mt:null,typeof pt=="function"&&ht.addEventListener("processorerror",pt)}}}),ht.addEventListener=(mt=>(...gt)=>{if(gt[0]==="processorerror"){const yt=typeof gt[1]=="function"?gt[1]:typeof gt[1]=="object"&>[1]!==null&&typeof gt[1].handleEvent=="function"?gt[1].handleEvent:null;if(yt!==null){const bt=dt.get(gt[1]);bt!==void 0?gt[1]=bt:(gt[1]=vt=>{vt.type==="error"?(Object.defineProperties(vt,{type:{value:"processorerror"}}),yt(vt)):yt(new ErrorEvent(gt[0],{...vt}))},dt.set(yt,gt[1]))}}return mt.call(ht,"error",gt[1],gt[2]),mt.call(ht,...gt)})(ht.addEventListener),ht.removeEventListener=(mt=>(...gt)=>{if(gt[0]==="processorerror"){const yt=dt.get(gt[1]);yt!==void 0&&(dt.delete(gt[1]),gt[1]=yt)}return mt.call(ht,"error",gt[1],gt[2]),mt.call(ht,gt[0],gt[1],gt[2])})(ht.removeEventListener),ut.numberOfOutputs!==0){const mt=nt(ot,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return ht.connect(mt).connect(ot.destination),it(ht,()=>mt.disconnect(),()=>mt.connect(ot.destination))}return ht}catch(ht){throw ht.code===11?rt():ht}if(ct===void 0)throw rt();return testClonabilityOfAudioWorkletNodeOptions(ut),et(ot,at,ct,ut)},computeBufferSize=(tt,et)=>tt===null?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(tt*et))))),cloneAudioWorkletNodeOptions=tt=>new Promise((et,nt)=>{const{port1:rt,port2:it}=new MessageChannel;rt.onmessage=({data:ot})=>{rt.close(),it.close(),et(ot)},rt.onmessageerror=({data:ot})=>{rt.close(),it.close(),nt(ot)},it.postMessage(tt)}),createAudioWorkletProcessorPromise=async(tt,et)=>{const nt=await cloneAudioWorkletNodeOptions(et);return new tt(nt)},createAudioWorkletProcessor=(tt,et,nt,rt)=>{let it=NODE_TO_PROCESSOR_MAPS.get(tt);it===void 0&&(it=new WeakMap,NODE_TO_PROCESSOR_MAPS.set(tt,it));const ot=createAudioWorkletProcessorPromise(nt,rt);return it.set(et,ot),ot},createNativeAudioWorkletNodeFakerFactory=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt)=>(pt,mt,gt,yt)=>{if(yt.numberOfInputs===0&&yt.numberOfOutputs===0)throw lt();const bt=Array.isArray(yt.outputChannelCount)?yt.outputChannelCount:Array.from(yt.outputChannelCount);if(bt.some($n=>$n<1))throw lt();if(bt.length!==yt.numberOfOutputs)throw et();if(yt.channelCountMode!=="explicit")throw lt();const vt=yt.channelCount*yt.numberOfInputs,xt=bt.reduce(($n,Nn)=>$n+Nn,0),kt=gt.parameterDescriptors===void 0?0:gt.parameterDescriptors.length;if(vt+kt>6||xt>6)throw lt();const St=new MessageChannel,Tt=[],At=[];for(let $n=0;$n$n===void 0?0:$n},maxValue:{get:()=>Nn===void 0?MOST_POSITIVE_SINGLE_FLOAT:Nn},minValue:{get:()=>Tn===void 0?MOST_NEGATIVE_SINGLE_FLOAT:Tn}}),Et.push(mn)}const $t=rt(pt,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,vt+kt)}),Dt=computeBufferSize(mt,pt.sampleRate),jt=st(pt,Dt,vt+kt,Math.max(1,xt)),Pt=it(pt,{channelCount:Math.max(1,xt),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,xt)}),Ct=[];for(let $n=0;$n{const Tn=Et[Nn];return Tn.connect($t,0,vt+Nn),Tn.start(0),[$n,Tn.offset]}));$t.connect(jt);let It=yt.channelInterpretation,Ot=null;const Wt=yt.numberOfOutputs===0?[jt]:Ct,zt={get bufferSize(){return Dt},get channelCount(){return yt.channelCount},set channelCount($n){throw nt()},get channelCountMode(){return yt.channelCountMode},set channelCountMode($n){throw nt()},get channelInterpretation(){return It},set channelInterpretation($n){for(const Nn of Tt)Nn.channelInterpretation=$n;It=$n},get context(){return jt.context},get inputs(){return Tt},get numberOfInputs(){return yt.numberOfInputs},get numberOfOutputs(){return yt.numberOfOutputs},get onprocessorerror(){return Ot},set onprocessorerror($n){typeof Ot=="function"&&zt.removeEventListener("processorerror",Ot),Ot=typeof $n=="function"?$n:null,typeof Ot=="function"&&zt.addEventListener("processorerror",Ot)},get parameters(){return wt},get port(){return St.port2},addEventListener(...$n){return jt.addEventListener($n[0],$n[1],$n[2])},connect:tt.bind(null,Wt),disconnect:ct.bind(null,Wt),dispatchEvent(...$n){return jt.dispatchEvent($n[0])},removeEventListener(...$n){return jt.removeEventListener($n[0],$n[1],$n[2])}},Ft=new Map;St.port1.addEventListener=($n=>(...Nn)=>{if(Nn[0]==="message"){const Tn=typeof Nn[1]=="function"?Nn[1]:typeof Nn[1]=="object"&&Nn[1]!==null&&typeof Nn[1].handleEvent=="function"?Nn[1].handleEvent:null;if(Tn!==null){const cn=Ft.get(Nn[1]);cn!==void 0?Nn[1]=cn:(Nn[1]=mn=>{ut(pt.currentTime,pt.sampleRate,()=>Tn(mn))},Ft.set(Tn,Nn[1]))}}return $n.call(St.port1,Nn[0],Nn[1],Nn[2])})(St.port1.addEventListener),St.port1.removeEventListener=($n=>(...Nn)=>{if(Nn[0]==="message"){const Tn=Ft.get(Nn[1]);Tn!==void 0&&(Ft.delete(Nn[1]),Nn[1]=Tn)}return $n.call(St.port1,Nn[0],Nn[1],Nn[2])})(St.port1.removeEventListener);let Nt=null;Object.defineProperty(St.port1,"onmessage",{get:()=>Nt,set:$n=>{typeof Nt=="function"&&St.port1.removeEventListener("message",Nt),Nt=typeof $n=="function"?$n:null,typeof Nt=="function"&&(St.port1.addEventListener("message",Nt),St.port1.start())}}),gt.prototype.port=St.port1;let Ut=null;createAudioWorkletProcessor(pt,zt,gt,yt).then($n=>Ut=$n);const Ht=createNestedArrays(yt.numberOfInputs,yt.channelCount),en=createNestedArrays(yt.numberOfOutputs,bt),sn=gt.parameterDescriptors===void 0?[]:gt.parameterDescriptors.reduce(($n,{name:Nn})=>({...$n,[Nn]:new Float32Array(128)}),{});let Kt=!0;const rn=()=>{yt.numberOfOutputs>0&&jt.disconnect(Pt);for(let $n=0,Nn=0;$n{if(Ut!==null){const Tn=ht(zt);for(let cn=0;cn{copyFromChannel($n,sn,mn,vt+In,cn)});for(let mn=0;mn{if(Tn[wn].size>0)return nn.set(wn,Dt/128),An;const pn=nn.get(wn);return pn===void 0?[]:(An.every(kn=>kn.every(Dn=>Dn===0))&&(pn===1?nn.delete(wn):nn.set(wn,pn-1)),An)});Kt=ut(pt.currentTime+cn/pt.sampleRate,pt.sampleRate,()=>Ut.process(mn,en,sn));for(let An=0,wn=0;Anjt.connect(vn).connect(pt.destination),Qt=()=>{jt.disconnect(vn),vn.disconnect()},_n=()=>{if(Kt){Qt(),yt.numberOfOutputs>0&&jt.connect(Pt);for(let $n=0,Nn=0;$n{Kt&&(an(),rn()),hn=!1};return an(),dt(zt,_n,Pn)},createNativeBiquadFilterNode=(tt,et)=>{const nt=tt.createBiquadFilter();return assignNativeAudioNodeOptions(nt,et),assignNativeAudioNodeAudioParamValue(nt,et,"Q"),assignNativeAudioNodeAudioParamValue(nt,et,"detune"),assignNativeAudioNodeAudioParamValue(nt,et,"frequency"),assignNativeAudioNodeAudioParamValue(nt,et,"gain"),assignNativeAudioNodeOption(nt,et,"type"),nt},createNativeChannelMergerNodeFactory=(tt,et)=>(nt,rt)=>{const it=nt.createChannelMerger(rt.numberOfInputs);return tt!==null&&tt.name==="webkitAudioContext"&&et(nt,it),assignNativeAudioNodeOptions(it,rt),it},wrapChannelSplitterNode=tt=>{const et=tt.numberOfOutputs;Object.defineProperty(tt,"channelCount",{get:()=>et,set:nt=>{if(nt!==et)throw createInvalidStateError()}}),Object.defineProperty(tt,"channelCountMode",{get:()=>"explicit",set:nt=>{if(nt!=="explicit")throw createInvalidStateError()}}),Object.defineProperty(tt,"channelInterpretation",{get:()=>"discrete",set:nt=>{if(nt!=="discrete")throw createInvalidStateError()}})},createNativeChannelSplitterNode=(tt,et)=>{const nt=tt.createChannelSplitter(et.numberOfOutputs);return assignNativeAudioNodeOptions(nt,et),wrapChannelSplitterNode(nt),nt},createNativeConstantSourceNodeFactory=(tt,et,nt,rt,it)=>(ot,at)=>{if(ot.createConstantSource===void 0)return nt(ot,at);const st=ot.createConstantSource();return assignNativeAudioNodeOptions(st,at),assignNativeAudioNodeAudioParamValue(st,at,"offset"),et(rt,()=>rt(ot))||wrapAudioScheduledSourceNodeStartMethodNegativeParameters(st),et(it,()=>it(ot))||wrapAudioScheduledSourceNodeStopMethodNegativeParameters(st),tt(ot,st),st},interceptConnections=(tt,et)=>(tt.connect=et.connect.bind(et),tt.disconnect=et.disconnect.bind(et),tt),createNativeConstantSourceNodeFakerFactory=(tt,et,nt,rt)=>(it,{offset:ot,...at})=>{const st=it.createBuffer(1,2,44100),lt=et(it,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),ct=nt(it,{...at,gain:ot}),ut=st.getChannelData(0);ut[0]=1,ut[1]=1,lt.buffer=st,lt.loop=!0;const ht={get bufferSize(){},get channelCount(){return ct.channelCount},set channelCount(mt){ct.channelCount=mt},get channelCountMode(){return ct.channelCountMode},set channelCountMode(mt){ct.channelCountMode=mt},get channelInterpretation(){return ct.channelInterpretation},set channelInterpretation(mt){ct.channelInterpretation=mt},get context(){return ct.context},get inputs(){return[]},get numberOfInputs(){return lt.numberOfInputs},get numberOfOutputs(){return ct.numberOfOutputs},get offset(){return ct.gain},get onended(){return lt.onended},set onended(mt){lt.onended=mt},addEventListener(...mt){return lt.addEventListener(mt[0],mt[1],mt[2])},dispatchEvent(...mt){return lt.dispatchEvent(mt[0])},removeEventListener(...mt){return lt.removeEventListener(mt[0],mt[1],mt[2])},start(mt=0){lt.start.call(lt,mt)},stop(mt=0){lt.stop.call(lt,mt)}},dt=()=>lt.connect(ct),pt=()=>lt.disconnect(ct);return tt(it,lt),rt(interceptConnections(ht,ct),dt,pt)},createNativeConvolverNodeFactory=(tt,et)=>(nt,rt)=>{const it=nt.createConvolver();if(assignNativeAudioNodeOptions(it,rt),rt.disableNormalization===it.normalize&&(it.normalize=!rt.disableNormalization),assignNativeAudioNodeOption(it,rt,"buffer"),rt.channelCount>2||(et(it,"channelCount",ot=>()=>ot.call(it),ot=>at=>{if(at>2)throw tt();return ot.call(it,at)}),rt.channelCountMode==="max"))throw tt();return et(it,"channelCountMode",ot=>()=>ot.call(it),ot=>at=>{if(at==="max")throw tt();return ot.call(it,at)}),it},createNativeDelayNode=(tt,et)=>{const nt=tt.createDelay(et.maxDelayTime);return assignNativeAudioNodeOptions(nt,et),assignNativeAudioNodeAudioParamValue(nt,et,"delayTime"),nt},createNativeDynamicsCompressorNodeFactory=tt=>(et,nt)=>{const rt=et.createDynamicsCompressor();if(assignNativeAudioNodeOptions(rt,nt),nt.channelCount>2||nt.channelCountMode==="max")throw tt();return assignNativeAudioNodeAudioParamValue(rt,nt,"attack"),assignNativeAudioNodeAudioParamValue(rt,nt,"knee"),assignNativeAudioNodeAudioParamValue(rt,nt,"ratio"),assignNativeAudioNodeAudioParamValue(rt,nt,"release"),assignNativeAudioNodeAudioParamValue(rt,nt,"threshold"),rt},createNativeGainNode=(tt,et)=>{const nt=tt.createGain();return assignNativeAudioNodeOptions(nt,et),assignNativeAudioNodeAudioParamValue(nt,et,"gain"),nt},createNativeIIRFilterNodeFactory=tt=>(et,nt,rt)=>{if(et.createIIRFilter===void 0)return tt(et,nt,rt);const it=et.createIIRFilter(rt.feedforward,rt.feedback);return assignNativeAudioNodeOptions(it,rt),it};function divide$1(tt,et){const nt=et[0]*et[0]+et[1]*et[1];return[(tt[0]*et[0]+tt[1]*et[1])/nt,(tt[1]*et[0]-tt[0]*et[1])/nt]}function multiply(tt,et){return[tt[0]*et[0]-tt[1]*et[1],tt[0]*et[1]+tt[1]*et[0]]}function evaluatePolynomial(tt,et){let nt=[0,0];for(let rt=tt.length-1;rt>=0;rt-=1)nt=multiply(nt,et),nt[0]+=tt[rt];return nt}const createNativeIIRFilterNodeFakerFactory=(tt,et,nt,rt)=>(it,ot,{channelCount:at,channelCountMode:st,channelInterpretation:lt,feedback:ct,feedforward:ut})=>{const ht=computeBufferSize(ot,it.sampleRate),dt=ct instanceof Float64Array?ct:new Float64Array(ct),pt=ut instanceof Float64Array?ut:new Float64Array(ut),mt=dt.length,gt=pt.length,yt=Math.min(mt,gt);if(mt===0||mt>20)throw rt();if(dt[0]===0)throw et();if(gt===0||gt>20)throw rt();if(pt[0]===0)throw et();if(dt[0]!==1){for(let Et=0;Et{const $t=Et.inputBuffer,Dt=Et.outputBuffer,jt=$t.numberOfChannels;for(let Pt=0;Pttt.createMediaElementSource(et.mediaElement),createNativeMediaStreamAudioDestinationNode=(tt,et)=>{const nt=tt.createMediaStreamDestination();return assignNativeAudioNodeOptions(nt,et),nt.numberOfOutputs===1&&Object.defineProperty(nt,"numberOfOutputs",{get:()=>0}),nt},createNativeMediaStreamAudioSourceNode=(tt,{mediaStream:et})=>{const nt=et.getAudioTracks();nt.sort((ot,at)=>ot.idat.id?1:0);const rt=nt.slice(0,1),it=tt.createMediaStreamSource(new MediaStream(rt));return Object.defineProperty(it,"mediaStream",{value:et}),it},createNativeMediaStreamTrackAudioSourceNodeFactory=(tt,et)=>(nt,{mediaStreamTrack:rt})=>{if(typeof nt.createMediaStreamTrackSource=="function")return nt.createMediaStreamTrackSource(rt);const it=new MediaStream([rt]),ot=nt.createMediaStreamSource(it);if(rt.kind!=="audio")throw tt();if(et(nt))throw new TypeError;return ot},createNativeOfflineAudioContextConstructor=tt=>tt===null?null:tt.hasOwnProperty("OfflineAudioContext")?tt.OfflineAudioContext:tt.hasOwnProperty("webkitOfflineAudioContext")?tt.webkitOfflineAudioContext:null,createNativeOscillatorNodeFactory=(tt,et,nt,rt,it,ot)=>(at,st)=>{const lt=at.createOscillator();return assignNativeAudioNodeOptions(lt,st),assignNativeAudioNodeAudioParamValue(lt,st,"detune"),assignNativeAudioNodeAudioParamValue(lt,st,"frequency"),st.periodicWave!==void 0?lt.setPeriodicWave(st.periodicWave):assignNativeAudioNodeOption(lt,st,"type"),et(nt,()=>nt(at))||wrapAudioScheduledSourceNodeStartMethodNegativeParameters(lt),et(rt,()=>rt(at))||ot(lt,at),et(it,()=>it(at))||wrapAudioScheduledSourceNodeStopMethodNegativeParameters(lt),tt(at,lt),lt},createNativePannerNodeFactory=tt=>(et,nt)=>{const rt=et.createPanner();return rt.orientationX===void 0?tt(et,nt):(assignNativeAudioNodeOptions(rt,nt),assignNativeAudioNodeAudioParamValue(rt,nt,"orientationX"),assignNativeAudioNodeAudioParamValue(rt,nt,"orientationY"),assignNativeAudioNodeAudioParamValue(rt,nt,"orientationZ"),assignNativeAudioNodeAudioParamValue(rt,nt,"positionX"),assignNativeAudioNodeAudioParamValue(rt,nt,"positionY"),assignNativeAudioNodeAudioParamValue(rt,nt,"positionZ"),assignNativeAudioNodeOption(rt,nt,"coneInnerAngle"),assignNativeAudioNodeOption(rt,nt,"coneOuterAngle"),assignNativeAudioNodeOption(rt,nt,"coneOuterGain"),assignNativeAudioNodeOption(rt,nt,"distanceModel"),assignNativeAudioNodeOption(rt,nt,"maxDistance"),assignNativeAudioNodeOption(rt,nt,"panningModel"),assignNativeAudioNodeOption(rt,nt,"refDistance"),assignNativeAudioNodeOption(rt,nt,"rolloffFactor"),rt)},createNativePannerNodeFakerFactory=(tt,et,nt,rt,it,ot,at,st,lt,ct)=>(ut,{coneInnerAngle:ht,coneOuterAngle:dt,coneOuterGain:pt,distanceModel:mt,maxDistance:gt,orientationX:yt,orientationY:bt,orientationZ:vt,panningModel:xt,positionX:kt,positionY:St,positionZ:Tt,refDistance:At,rolloffFactor:Et,...$t})=>{const Dt=ut.createPanner();if($t.channelCount>2||$t.channelCountMode==="max")throw at();assignNativeAudioNodeOptions(Dt,$t);const jt={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},Pt=nt(ut,{...jt,channelInterpretation:"speakers",numberOfInputs:6}),Ct=rt(ut,{...$t,gain:1}),wt=rt(ut,{...jt,gain:1}),It=rt(ut,{...jt,gain:0}),Ot=rt(ut,{...jt,gain:0}),Wt=rt(ut,{...jt,gain:0}),zt=rt(ut,{...jt,gain:0}),Ft=rt(ut,{...jt,gain:0}),Nt=it(ut,256,6,1),Ut=ot(ut,{...jt,curve:new Float32Array([1,1]),oversample:"none"});let Mt=[yt,bt,vt],Ht=[kt,St,Tt];const en=new Float32Array(1);Nt.onaudioprocess=({inputBuffer:nn})=>{const hn=[lt(nn,en,0),lt(nn,en,1),lt(nn,en,2)];hn.some((an,Qt)=>an!==Mt[Qt])&&(Dt.setOrientation(...hn),Mt=hn);const vn=[lt(nn,en,3),lt(nn,en,4),lt(nn,en,5)];vn.some((an,Qt)=>an!==Ht[Qt])&&(Dt.setPosition(...vn),Ht=vn)},Object.defineProperty(It.gain,"defaultValue",{get:()=>0}),Object.defineProperty(Ot.gain,"defaultValue",{get:()=>0}),Object.defineProperty(Wt.gain,"defaultValue",{get:()=>0}),Object.defineProperty(zt.gain,"defaultValue",{get:()=>0}),Object.defineProperty(Ft.gain,"defaultValue",{get:()=>0});const sn={get bufferSize(){},get channelCount(){return Dt.channelCount},set channelCount(nn){if(nn>2)throw at();Ct.channelCount=nn,Dt.channelCount=nn},get channelCountMode(){return Dt.channelCountMode},set channelCountMode(nn){if(nn==="max")throw at();Ct.channelCountMode=nn,Dt.channelCountMode=nn},get channelInterpretation(){return Dt.channelInterpretation},set channelInterpretation(nn){Ct.channelInterpretation=nn,Dt.channelInterpretation=nn},get coneInnerAngle(){return Dt.coneInnerAngle},set coneInnerAngle(nn){Dt.coneInnerAngle=nn},get coneOuterAngle(){return Dt.coneOuterAngle},set coneOuterAngle(nn){Dt.coneOuterAngle=nn},get coneOuterGain(){return Dt.coneOuterGain},set coneOuterGain(nn){if(nn<0||nn>1)throw et();Dt.coneOuterGain=nn},get context(){return Dt.context},get distanceModel(){return Dt.distanceModel},set distanceModel(nn){Dt.distanceModel=nn},get inputs(){return[Ct]},get maxDistance(){return Dt.maxDistance},set maxDistance(nn){if(nn<0)throw new RangeError;Dt.maxDistance=nn},get numberOfInputs(){return Dt.numberOfInputs},get numberOfOutputs(){return Dt.numberOfOutputs},get orientationX(){return wt.gain},get orientationY(){return It.gain},get orientationZ(){return Ot.gain},get panningModel(){return Dt.panningModel},set panningModel(nn){Dt.panningModel=nn},get positionX(){return Wt.gain},get positionY(){return zt.gain},get positionZ(){return Ft.gain},get refDistance(){return Dt.refDistance},set refDistance(nn){if(nn<0)throw new RangeError;Dt.refDistance=nn},get rolloffFactor(){return Dt.rolloffFactor},set rolloffFactor(nn){if(nn<0)throw new RangeError;Dt.rolloffFactor=nn},addEventListener(...nn){return Ct.addEventListener(nn[0],nn[1],nn[2])},dispatchEvent(...nn){return Ct.dispatchEvent(nn[0])},removeEventListener(...nn){return Ct.removeEventListener(nn[0],nn[1],nn[2])}};ht!==sn.coneInnerAngle&&(sn.coneInnerAngle=ht),dt!==sn.coneOuterAngle&&(sn.coneOuterAngle=dt),pt!==sn.coneOuterGain&&(sn.coneOuterGain=pt),mt!==sn.distanceModel&&(sn.distanceModel=mt),gt!==sn.maxDistance&&(sn.maxDistance=gt),yt!==sn.orientationX.value&&(sn.orientationX.value=yt),bt!==sn.orientationY.value&&(sn.orientationY.value=bt),vt!==sn.orientationZ.value&&(sn.orientationZ.value=vt),xt!==sn.panningModel&&(sn.panningModel=xt),kt!==sn.positionX.value&&(sn.positionX.value=kt),St!==sn.positionY.value&&(sn.positionY.value=St),Tt!==sn.positionZ.value&&(sn.positionZ.value=Tt),At!==sn.refDistance&&(sn.refDistance=At),Et!==sn.rolloffFactor&&(sn.rolloffFactor=Et),(Mt[0]!==1||Mt[1]!==0||Mt[2]!==0)&&Dt.setOrientation(...Mt),(Ht[0]!==0||Ht[1]!==0||Ht[2]!==0)&&Dt.setPosition(...Ht);const Kt=()=>{Ct.connect(Dt),tt(Ct,Ut,0,0),Ut.connect(wt).connect(Pt,0,0),Ut.connect(It).connect(Pt,0,1),Ut.connect(Ot).connect(Pt,0,2),Ut.connect(Wt).connect(Pt,0,3),Ut.connect(zt).connect(Pt,0,4),Ut.connect(Ft).connect(Pt,0,5),Pt.connect(Nt).connect(ut.destination)},rn=()=>{Ct.disconnect(Dt),st(Ct,Ut,0,0),Ut.disconnect(wt),wt.disconnect(Pt),Ut.disconnect(It),It.disconnect(Pt),Ut.disconnect(Ot),Ot.disconnect(Pt),Ut.disconnect(Wt),Wt.disconnect(Pt),Ut.disconnect(zt),zt.disconnect(Pt),Ut.disconnect(Ft),Ft.disconnect(Pt),Pt.disconnect(Nt),Nt.disconnect(ut.destination)};return ct(interceptConnections(sn,Dt),Kt,rn)},createNativePeriodicWaveFactory=tt=>(et,{disableNormalization:nt,imag:rt,real:it})=>{const ot=rt instanceof Float32Array?rt:new Float32Array(rt),at=it instanceof Float32Array?it:new Float32Array(it),st=et.createPeriodicWave(at,ot,{disableNormalization:nt});if(Array.from(rt).length<2)throw tt();return st},createNativeScriptProcessorNode=(tt,et,nt,rt)=>tt.createScriptProcessor(et,nt,rt),createNativeStereoPannerNodeFactory=(tt,et)=>(nt,rt)=>{const it=rt.channelCountMode;if(it==="clamped-max")throw et();if(nt.createStereoPanner===void 0)return tt(nt,rt);const ot=nt.createStereoPanner();return assignNativeAudioNodeOptions(ot,rt),assignNativeAudioNodeAudioParamValue(ot,rt,"pan"),Object.defineProperty(ot,"channelCountMode",{get:()=>it,set:at=>{if(at!==it)throw et()}}),ot},createNativeStereoPannerNodeFakerFactory=(tt,et,nt,rt,it,ot)=>{const st=new Float32Array([1,1]),lt=Math.PI/2,ct={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},ut={...ct,oversample:"none"},ht=(mt,gt,yt,bt)=>{const vt=new Float32Array(16385),xt=new Float32Array(16385);for(let $t=0;$t<16385;$t+=1){const Dt=$t/16384*lt;vt[$t]=Math.cos(Dt),xt[$t]=Math.sin(Dt)}const kt=nt(mt,{...ct,gain:0}),St=rt(mt,{...ut,curve:vt}),Tt=rt(mt,{...ut,curve:st}),At=nt(mt,{...ct,gain:0}),Et=rt(mt,{...ut,curve:xt});return{connectGraph(){gt.connect(kt),gt.connect(Tt.inputs===void 0?Tt:Tt.inputs[0]),gt.connect(At),Tt.connect(yt),yt.connect(St.inputs===void 0?St:St.inputs[0]),yt.connect(Et.inputs===void 0?Et:Et.inputs[0]),St.connect(kt.gain),Et.connect(At.gain),kt.connect(bt,0,0),At.connect(bt,0,1)},disconnectGraph(){gt.disconnect(kt),gt.disconnect(Tt.inputs===void 0?Tt:Tt.inputs[0]),gt.disconnect(At),Tt.disconnect(yt),yt.disconnect(St.inputs===void 0?St:St.inputs[0]),yt.disconnect(Et.inputs===void 0?Et:Et.inputs[0]),St.disconnect(kt.gain),Et.disconnect(At.gain),kt.disconnect(bt,0,0),At.disconnect(bt,0,1)}}},dt=(mt,gt,yt,bt)=>{const vt=new Float32Array(16385),xt=new Float32Array(16385),kt=new Float32Array(16385),St=new Float32Array(16385),Tt=Math.floor(16385/2);for(let Wt=0;Wt<16385;Wt+=1)if(Wt>Tt){const zt=(Wt-Tt)/(16384-Tt)*lt;vt[Wt]=Math.cos(zt),xt[Wt]=Math.sin(zt),kt[Wt]=0,St[Wt]=1}else{const zt=Wt/(16384-Tt)*lt;vt[Wt]=1,xt[Wt]=0,kt[Wt]=Math.cos(zt),St[Wt]=Math.sin(zt)}const At=et(mt,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),Et=nt(mt,{...ct,gain:0}),$t=rt(mt,{...ut,curve:vt}),Dt=nt(mt,{...ct,gain:0}),jt=rt(mt,{...ut,curve:xt}),Pt=rt(mt,{...ut,curve:st}),Ct=nt(mt,{...ct,gain:0}),wt=rt(mt,{...ut,curve:kt}),It=nt(mt,{...ct,gain:0}),Ot=rt(mt,{...ut,curve:St});return{connectGraph(){gt.connect(At),gt.connect(Pt.inputs===void 0?Pt:Pt.inputs[0]),At.connect(Et,0),At.connect(Dt,0),At.connect(Ct,1),At.connect(It,1),Pt.connect(yt),yt.connect($t.inputs===void 0?$t:$t.inputs[0]),yt.connect(jt.inputs===void 0?jt:jt.inputs[0]),yt.connect(wt.inputs===void 0?wt:wt.inputs[0]),yt.connect(Ot.inputs===void 0?Ot:Ot.inputs[0]),$t.connect(Et.gain),jt.connect(Dt.gain),wt.connect(Ct.gain),Ot.connect(It.gain),Et.connect(bt,0,0),Ct.connect(bt,0,0),Dt.connect(bt,0,1),It.connect(bt,0,1)},disconnectGraph(){gt.disconnect(At),gt.disconnect(Pt.inputs===void 0?Pt:Pt.inputs[0]),At.disconnect(Et,0),At.disconnect(Dt,0),At.disconnect(Ct,1),At.disconnect(It,1),Pt.disconnect(yt),yt.disconnect($t.inputs===void 0?$t:$t.inputs[0]),yt.disconnect(jt.inputs===void 0?jt:jt.inputs[0]),yt.disconnect(wt.inputs===void 0?wt:wt.inputs[0]),yt.disconnect(Ot.inputs===void 0?Ot:Ot.inputs[0]),$t.disconnect(Et.gain),jt.disconnect(Dt.gain),wt.disconnect(Ct.gain),Ot.disconnect(It.gain),Et.disconnect(bt,0,0),Ct.disconnect(bt,0,0),Dt.disconnect(bt,0,1),It.disconnect(bt,0,1)}}},pt=(mt,gt,yt,bt,vt)=>{if(gt===1)return ht(mt,yt,bt,vt);if(gt===2)return dt(mt,yt,bt,vt);throw it()};return(mt,{channelCount:gt,channelCountMode:yt,pan:bt,...vt})=>{if(yt==="max")throw it();const xt=tt(mt,{...vt,channelCount:1,channelCountMode:yt,numberOfInputs:2}),kt=nt(mt,{...vt,channelCount:gt,channelCountMode:yt,gain:1}),St=nt(mt,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:bt});let{connectGraph:Tt,disconnectGraph:At}=pt(mt,gt,kt,St,xt);Object.defineProperty(St.gain,"defaultValue",{get:()=>0}),Object.defineProperty(St.gain,"maxValue",{get:()=>1}),Object.defineProperty(St.gain,"minValue",{get:()=>-1});const Et={get bufferSize(){},get channelCount(){return kt.channelCount},set channelCount(Pt){kt.channelCount!==Pt&&($t&&At(),{connectGraph:Tt,disconnectGraph:At}=pt(mt,Pt,kt,St,xt),$t&&Tt()),kt.channelCount=Pt},get channelCountMode(){return kt.channelCountMode},set channelCountMode(Pt){if(Pt==="clamped-max"||Pt==="max")throw it();kt.channelCountMode=Pt},get channelInterpretation(){return kt.channelInterpretation},set channelInterpretation(Pt){kt.channelInterpretation=Pt},get context(){return kt.context},get inputs(){return[kt]},get numberOfInputs(){return kt.numberOfInputs},get numberOfOutputs(){return kt.numberOfOutputs},get pan(){return St.gain},addEventListener(...Pt){return kt.addEventListener(Pt[0],Pt[1],Pt[2])},dispatchEvent(...Pt){return kt.dispatchEvent(Pt[0])},removeEventListener(...Pt){return kt.removeEventListener(Pt[0],Pt[1],Pt[2])}};let $t=!1;const Dt=()=>{Tt(),$t=!0},jt=()=>{At(),$t=!1};return ot(interceptConnections(Et,xt),Dt,jt)}},createNativeWaveShaperNodeFactory=(tt,et,nt,rt,it,ot,at)=>(st,lt)=>{const ct=st.createWaveShaper();if(ot!==null&&ot.name==="webkitAudioContext"&&st.createGain().gain.automationRate===void 0)return nt(st,lt);assignNativeAudioNodeOptions(ct,lt);const ut=lt.curve===null||lt.curve instanceof Float32Array?lt.curve:new Float32Array(lt.curve);if(ut!==null&&ut.length<2)throw et();assignNativeAudioNodeOption(ct,{curve:ut},"curve"),assignNativeAudioNodeOption(ct,lt,"oversample");let ht=null,dt=!1;return at(ct,"curve",gt=>()=>gt.call(ct),gt=>yt=>(gt.call(ct,yt),dt&&(rt(yt)&&ht===null?ht=tt(st,ct):!rt(yt)&&ht!==null&&(ht(),ht=null)),yt)),it(ct,()=>{dt=!0,rt(ct.curve)&&(ht=tt(st,ct))},()=>{dt=!1,ht!==null&&(ht(),ht=null)})},createNativeWaveShaperNodeFakerFactory=(tt,et,nt,rt,it)=>(ot,{curve:at,oversample:st,...lt})=>{const ct=ot.createWaveShaper(),ut=ot.createWaveShaper();assignNativeAudioNodeOptions(ct,lt),assignNativeAudioNodeOptions(ut,lt);const ht=nt(ot,{...lt,gain:1}),dt=nt(ot,{...lt,gain:-1}),pt=nt(ot,{...lt,gain:1}),mt=nt(ot,{...lt,gain:-1});let gt=null,yt=!1,bt=null;const vt={get bufferSize(){},get channelCount(){return ct.channelCount},set channelCount(St){ht.channelCount=St,dt.channelCount=St,ct.channelCount=St,pt.channelCount=St,ut.channelCount=St,mt.channelCount=St},get channelCountMode(){return ct.channelCountMode},set channelCountMode(St){ht.channelCountMode=St,dt.channelCountMode=St,ct.channelCountMode=St,pt.channelCountMode=St,ut.channelCountMode=St,mt.channelCountMode=St},get channelInterpretation(){return ct.channelInterpretation},set channelInterpretation(St){ht.channelInterpretation=St,dt.channelInterpretation=St,ct.channelInterpretation=St,pt.channelInterpretation=St,ut.channelInterpretation=St,mt.channelInterpretation=St},get context(){return ct.context},get curve(){return bt},set curve(St){if(St!==null&&St.length<2)throw et();if(St===null)ct.curve=St,ut.curve=St;else{const Tt=St.length,At=new Float32Array(Tt+2-Tt%2),Et=new Float32Array(Tt+2-Tt%2);At[0]=St[0],Et[0]=-St[Tt-1];const $t=Math.ceil((Tt+1)/2),Dt=(Tt+1)/2-1;for(let jt=1;jt<$t;jt+=1){const Pt=jt/$t*Dt,Ct=Math.floor(Pt),wt=Math.ceil(Pt);At[jt]=Ct===wt?St[Ct]:(1-(Pt-Ct))*St[Ct]+(1-(wt-Pt))*St[wt],Et[jt]=Ct===wt?-St[Tt-1-Ct]:-((1-(Pt-Ct))*St[Tt-1-Ct])-(1-(wt-Pt))*St[Tt-1-wt]}At[$t]=Tt%2===1?St[$t-1]:(St[$t-2]+St[$t-1])/2,ct.curve=At,ut.curve=Et}bt=St,yt&&(rt(bt)&>===null?gt=tt(ot,ht):gt!==null&&(gt(),gt=null))},get inputs(){return[ht]},get numberOfInputs(){return ct.numberOfInputs},get numberOfOutputs(){return ct.numberOfOutputs},get oversample(){return ct.oversample},set oversample(St){ct.oversample=St,ut.oversample=St},addEventListener(...St){return ht.addEventListener(St[0],St[1],St[2])},dispatchEvent(...St){return ht.dispatchEvent(St[0])},removeEventListener(...St){return ht.removeEventListener(St[0],St[1],St[2])}};at!==null&&(vt.curve=at instanceof Float32Array?at:new Float32Array(at)),st!==vt.oversample&&(vt.oversample=st);const xt=()=>{ht.connect(ct).connect(pt),ht.connect(dt).connect(ut).connect(mt).connect(pt),yt=!0,rt(bt)&&(gt=tt(ot,ht))},kt=()=>{ht.disconnect(ct),ct.disconnect(pt),ht.disconnect(dt),dt.disconnect(ut),ut.disconnect(mt),mt.disconnect(pt),yt=!1,gt!==null&&(gt(),gt=null)};return it(interceptConnections(vt,pt),xt,kt)},createNotSupportedError=()=>new DOMException("","NotSupportedError"),DEFAULT_OPTIONS$5={numberOfChannels:1},createOfflineAudioContextConstructor=(tt,et,nt,rt,it)=>class extends tt{constructor(at,st,lt){let ct;if(typeof at=="number"&&st!==void 0&<!==void 0)ct={length:st,numberOfChannels:at,sampleRate:lt};else if(typeof at=="object")ct=at;else throw new Error("The given parameters are not valid.");const{length:ut,numberOfChannels:ht,sampleRate:dt}={...DEFAULT_OPTIONS$5,...ct},pt=rt(ht,ut,dt);et(testPromiseSupport,()=>testPromiseSupport(pt))||pt.addEventListener("statechange",(()=>{let mt=0;const gt=yt=>{this._state==="running"&&(mt>0?(pt.removeEventListener("statechange",gt),yt.stopImmediatePropagation(),this._waitForThePromiseToSettle(yt)):mt+=1)};return gt})()),super(pt,ht),this._length=ut,this._nativeOfflineAudioContext=pt,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(nt()):(this._state="running",it(this.destination,this._nativeOfflineAudioContext).finally(()=>{this._state=null,deactivateAudioGraph(this)}))}_waitForThePromiseToSettle(at){this._state===null?this._nativeOfflineAudioContext.dispatchEvent(at):setTimeout(()=>this._waitForThePromiseToSettle(at))}},DEFAULT_OPTIONS$4={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},createOscillatorNodeConstructor=(tt,et,nt,rt,it,ot,at)=>class extends tt{constructor(lt,ct){const ut=it(lt),ht={...DEFAULT_OPTIONS$4,...ct},dt=nt(ut,ht),pt=ot(ut),mt=pt?rt():null,gt=lt.sampleRate/2;super(lt,!1,dt,mt),this._detune=et(this,pt,dt.detune,153600,-153600),this._frequency=et(this,pt,dt.frequency,gt,-gt),this._nativeOscillatorNode=dt,this._onended=null,this._oscillatorNodeRenderer=mt,this._oscillatorNodeRenderer!==null&&ht.periodicWave!==void 0&&(this._oscillatorNodeRenderer.periodicWave=ht.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(lt){const ct=typeof lt=="function"?at(this,lt):null;this._nativeOscillatorNode.onended=ct;const ut=this._nativeOscillatorNode.onended;this._onended=ut!==null&&ut===ct?lt:ut}get type(){return this._nativeOscillatorNode.type}set type(lt){this._nativeOscillatorNode.type=lt,this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(lt){this._nativeOscillatorNode.setPeriodicWave(lt),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=lt)}start(lt=0){if(this._nativeOscillatorNode.start(lt),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.start=lt),this.context.state!=="closed"){setInternalStateToActive(this);const ct=()=>{this._nativeOscillatorNode.removeEventListener("ended",ct),isActiveAudioNode(this)&&setInternalStateToPassive(this)};this._nativeOscillatorNode.addEventListener("ended",ct)}}stop(lt=0){this._nativeOscillatorNode.stop(lt),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.stop=lt)}},createOscillatorNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap;let at=null,st=null,lt=null;const ct=async(ut,ht)=>{let dt=nt(ut);const pt=isOwnedByContext(dt,ht);if(!pt){const mt={channelCount:dt.channelCount,channelCountMode:dt.channelCountMode,channelInterpretation:dt.channelInterpretation,detune:dt.detune.value,frequency:dt.frequency.value,periodicWave:at===null?void 0:at,type:dt.type};dt=et(ht,mt),st!==null&&dt.start(st),lt!==null&&dt.stop(lt)}return ot.set(ht,dt),pt?(await tt(ht,ut.detune,dt.detune),await tt(ht,ut.frequency,dt.frequency)):(await rt(ht,ut.detune,dt.detune),await rt(ht,ut.frequency,dt.frequency)),await it(ut,ht,dt),dt};return{set periodicWave(ut){at=ut},set start(ut){st=ut},set stop(ut){lt=ut},render(ut,ht){const dt=ot.get(ht);return dt!==void 0?Promise.resolve(dt):ct(ut,ht)}}},DEFAULT_OPTIONS$3={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},createPannerNodeConstructor=(tt,et,nt,rt,it,ot,at)=>class extends tt{constructor(lt,ct){const ut=it(lt),ht={...DEFAULT_OPTIONS$3,...ct},dt=nt(ut,ht),pt=ot(ut),mt=pt?rt():null;super(lt,!1,dt,mt),this._nativePannerNode=dt,this._orientationX=et(this,pt,dt.orientationX,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._orientationY=et(this,pt,dt.orientationY,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._orientationZ=et(this,pt,dt.orientationZ,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._positionX=et(this,pt,dt.positionX,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._positionY=et(this,pt,dt.positionY,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._positionZ=et(this,pt,dt.positionZ,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),at(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(lt){this._nativePannerNode.coneInnerAngle=lt}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(lt){this._nativePannerNode.coneOuterAngle=lt}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(lt){this._nativePannerNode.coneOuterGain=lt}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(lt){this._nativePannerNode.distanceModel=lt}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(lt){this._nativePannerNode.maxDistance=lt}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(lt){this._nativePannerNode.panningModel=lt}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(lt){this._nativePannerNode.refDistance=lt}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(lt){this._nativePannerNode.rolloffFactor=lt}},createPannerNodeRendererFactory=(tt,et,nt,rt,it,ot,at,st,lt,ct)=>()=>{const ut=new WeakMap;let ht=null;const dt=async(pt,mt)=>{let gt=null,yt=ot(pt);const bt={channelCount:yt.channelCount,channelCountMode:yt.channelCountMode,channelInterpretation:yt.channelInterpretation},vt={...bt,coneInnerAngle:yt.coneInnerAngle,coneOuterAngle:yt.coneOuterAngle,coneOuterGain:yt.coneOuterGain,distanceModel:yt.distanceModel,maxDistance:yt.maxDistance,panningModel:yt.panningModel,refDistance:yt.refDistance,rolloffFactor:yt.rolloffFactor},xt=isOwnedByContext(yt,mt);if("bufferSize"in yt)gt=rt(mt,{...bt,gain:1});else if(!xt){const kt={...vt,orientationX:yt.orientationX.value,orientationY:yt.orientationY.value,orientationZ:yt.orientationZ.value,positionX:yt.positionX.value,positionY:yt.positionY.value,positionZ:yt.positionZ.value};yt=it(mt,kt)}if(ut.set(mt,gt===null?yt:gt),gt!==null){if(ht===null){if(at===null)throw new Error("Missing the native OfflineAudioContext constructor.");const jt=new at(6,pt.context.length,mt.sampleRate),Pt=et(jt,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});Pt.connect(jt.destination),ht=(async()=>{const Ct=await Promise.all([pt.orientationX,pt.orientationY,pt.orientationZ,pt.positionX,pt.positionY,pt.positionZ].map(async(wt,It)=>{const Ot=nt(jt,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:It===0?1:0});return await st(jt,wt,Ot.offset),Ot}));for(let wt=0;wt<6;wt+=1)Ct[wt].connect(Pt,0,wt),Ct[wt].start(0);return ct(jt)})()}const kt=await ht,St=rt(mt,{...bt,gain:1});await lt(pt,mt,St);const Tt=[];for(let jt=0;jtwt!==At[It])||Ct.some((wt,It)=>wt!==Et[It])){At=Pt,Et=Ct;const wt=jt/mt.sampleRate;$t.gain.setValueAtTime(0,wt),$t=rt(mt,{...bt,gain:0}),Dt=it(mt,{...vt,orientationX:At[0],orientationY:At[1],orientationZ:At[2],positionX:Et[0],positionY:Et[1],positionZ:Et[2]}),$t.gain.setValueAtTime(1,wt),St.connect($t).connect(Dt.inputs[0]),Dt.connect(gt)}}return gt}return xt?(await tt(mt,pt.orientationX,yt.orientationX),await tt(mt,pt.orientationY,yt.orientationY),await tt(mt,pt.orientationZ,yt.orientationZ),await tt(mt,pt.positionX,yt.positionX),await tt(mt,pt.positionY,yt.positionY),await tt(mt,pt.positionZ,yt.positionZ)):(await st(mt,pt.orientationX,yt.orientationX),await st(mt,pt.orientationY,yt.orientationY),await st(mt,pt.orientationZ,yt.orientationZ),await st(mt,pt.positionX,yt.positionX),await st(mt,pt.positionY,yt.positionY),await st(mt,pt.positionZ,yt.positionZ)),isNativeAudioNodeFaker(yt)?await lt(pt,mt,yt.inputs[0]):await lt(pt,mt,yt),yt};return{render(pt,mt){const gt=ut.get(mt);return gt!==void 0?Promise.resolve(gt):dt(pt,mt)}}},DEFAULT_OPTIONS$2={disableNormalization:!1},createPeriodicWaveConstructor=(tt,et,nt,rt)=>class vw{constructor(ot,at){const st=et(ot),lt=rt({...DEFAULT_OPTIONS$2,...at}),ct=tt(st,lt);return nt.add(ct),ct}static[Symbol.hasInstance](ot){return ot!==null&&typeof ot=="object"&&Object.getPrototypeOf(ot)===vw.prototype||nt.has(ot)}},createRenderAutomation=(tt,et)=>(nt,rt,it)=>(tt(rt).replay(it),et(rt,nt,it)),createRenderInputsOfAudioNode=(tt,et,nt)=>async(rt,it,ot)=>{const at=tt(rt);await Promise.all(at.activeInputs.map((st,lt)=>Array.from(st).map(async([ct,ut])=>{const dt=await et(ct).render(ct,it),pt=rt.context.destination;!nt(ct)&&(rt!==pt||!nt(rt))&&dt.connect(ot,ut,lt)})).reduce((st,lt)=>[...st,...lt],[]))},createRenderInputsOfAudioParam=(tt,et,nt)=>async(rt,it,ot)=>{const at=et(rt);await Promise.all(Array.from(at.activeInputs).map(async([st,lt])=>{const ut=await tt(st).render(st,it);nt(st)||ut.connect(ot,lt)}))},createRenderNativeOfflineAudioContext=(tt,et,nt,rt)=>it=>tt(testPromiseSupport,()=>testPromiseSupport(it))?Promise.resolve(tt(rt,rt)).then(ot=>{if(!ot){const at=nt(it,512,0,1);it.oncomplete=()=>{at.onaudioprocess=null,at.disconnect()},at.onaudioprocess=()=>it.currentTime,at.connect(it.destination)}return it.startRendering()}):new Promise(ot=>{const at=et(it,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});it.oncomplete=st=>{at.disconnect(),ot(st.renderedBuffer)},at.connect(it.destination),it.startRendering()}),createSetActiveAudioWorkletNodeInputs=tt=>(et,nt)=>{tt.set(et,nt)},createSetAudioNodeTailTime=tt=>(et,nt)=>tt.set(et,nt),createStartRendering=(tt,et,nt,rt,it,ot,at,st)=>(lt,ct)=>nt(lt).render(lt,ct).then(()=>Promise.all(Array.from(rt(ct)).map(ut=>nt(ut).render(ut,ct)))).then(()=>it(ct)).then(ut=>(typeof ut.copyFromChannel!="function"?(at(ut),wrapAudioBufferGetChannelDataMethod(ut)):et(ot,()=>ot(ut))||st(ut),tt.add(ut),ut)),DEFAULT_OPTIONS$1={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},createStereoPannerNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=it(st),ut={...DEFAULT_OPTIONS$1,...lt},ht=nt(ct,ut),dt=ot(ct),pt=dt?rt():null;super(st,!1,ht,pt),this._pan=et(this,dt,ht.pan)}get pan(){return this._pan}},createStereoPannerNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap,at=async(st,lt)=>{let ct=nt(st);const ut=isOwnedByContext(ct,lt);if(!ut){const ht={channelCount:ct.channelCount,channelCountMode:ct.channelCountMode,channelInterpretation:ct.channelInterpretation,pan:ct.pan.value};ct=et(lt,ht)}return ot.set(lt,ct),ut?await tt(lt,st.pan,ct.pan):await rt(lt,st.pan,ct.pan),isNativeAudioNodeFaker(ct)?await it(st,lt,ct.inputs[0]):await it(st,lt,ct),ct};return{render(st,lt){const ct=ot.get(lt);return ct!==void 0?Promise.resolve(ct):at(st,lt)}}},createTestAudioBufferConstructorSupport=tt=>()=>{if(tt===null)return!1;try{new tt({length:1,sampleRate:44100})}catch{return!1}return!0},createTestAudioWorkletProcessorPostMessageSupport=(tt,et)=>async()=>{if(tt===null)return!0;if(et===null)return!1;const nt=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"}),rt=new et(1,128,44100),it=URL.createObjectURL(nt);let ot=!1,at=!1;try{await rt.audioWorklet.addModule(it);const st=new tt(rt,"a",{numberOfOutputs:0}),lt=rt.createOscillator();st.port.onmessage=()=>ot=!0,st.onprocessorerror=()=>at=!0,lt.connect(st),lt.start(0),await rt.startRendering(),await new Promise(ct=>setTimeout(ct))}catch{}finally{URL.revokeObjectURL(it)}return ot&&!at},createTestOfflineAudioContextCurrentTimeSupport=(tt,et)=>()=>{if(et===null)return Promise.resolve(!1);const nt=new et(1,1,44100),rt=tt(nt,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise(it=>{nt.oncomplete=()=>{rt.disconnect(),it(nt.currentTime!==0)},nt.startRendering()})},createUnknownError=()=>new DOMException("","UnknownError"),DEFAULT_OPTIONS={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},createWaveShaperNodeConstructor=(tt,et,nt,rt,it,ot,at)=>class extends tt{constructor(lt,ct){const ut=it(lt),ht={...DEFAULT_OPTIONS,...ct},dt=nt(ut,ht),mt=ot(ut)?rt():null;super(lt,!0,dt,mt),this._isCurveNullified=!1,this._nativeWaveShaperNode=dt,at(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(lt){if(lt===null)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(lt.length<2)throw et();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=lt}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(lt){this._nativeWaveShaperNode.oversample=lt}},createWaveShaperNodeRendererFactory=(tt,et,nt)=>()=>{const rt=new WeakMap,it=async(ot,at)=>{let st=et(ot);if(!isOwnedByContext(st,at)){const ct={channelCount:st.channelCount,channelCountMode:st.channelCountMode,channelInterpretation:st.channelInterpretation,curve:st.curve,oversample:st.oversample};st=tt(at,ct)}return rt.set(at,st),isNativeAudioNodeFaker(st)?await nt(ot,at,st.inputs[0]):await nt(ot,at,st),st};return{render(ot,at){const st=rt.get(at);return st!==void 0?Promise.resolve(st):it(ot,at)}}},createWindow=()=>typeof window>"u"?null:window,createWrapAudioBufferCopyChannelMethods=(tt,et)=>nt=>{nt.copyFromChannel=(rt,it,ot=0)=>{const at=tt(ot),st=tt(it);if(st>=nt.numberOfChannels)throw et();const lt=nt.length,ct=nt.getChannelData(st),ut=rt.length;for(let ht=at<0?-at:0;ht+at{const at=tt(ot),st=tt(it);if(st>=nt.numberOfChannels)throw et();const lt=nt.length,ct=nt.getChannelData(st),ut=rt.length;for(let ht=at<0?-at:0;ht+atet=>{et.copyFromChannel=(nt=>(rt,it,ot=0)=>{const at=tt(ot),st=tt(it);if(at(rt,it,ot=0)=>{const at=tt(ot),st=tt(it);if(at(et,nt)=>{const rt=nt.createBuffer(1,1,44100);et.buffer===null&&(et.buffer=rt),tt(et,"buffer",it=>()=>{const ot=it.call(et);return ot===rt?null:ot},it=>ot=>it.call(et,ot===null?rt:ot))},createWrapChannelMergerNode=(tt,et)=>(nt,rt)=>{rt.channelCount=1,rt.channelCountMode="explicit",Object.defineProperty(rt,"channelCount",{get:()=>1,set:()=>{throw tt()}}),Object.defineProperty(rt,"channelCountMode",{get:()=>"explicit",set:()=>{throw tt()}});const it=nt.createBufferSource();et(rt,()=>{const st=rt.numberOfInputs;for(let lt=0;ltit.disconnect(rt))},getFirstSample=(tt,et,nt)=>tt.copyFromChannel===void 0?tt.getChannelData(nt)[0]:(tt.copyFromChannel(et,nt),et[0]),isDCCurve=tt=>{if(tt===null)return!1;const et=tt.length;return et%2!==0?tt[Math.floor(et/2)]!==0:tt[et/2-1]+tt[et/2]!==0},overwriteAccessors=(tt,et,nt,rt)=>{let it=tt;for(;!it.hasOwnProperty(et);)it=Object.getPrototypeOf(it);const{get:ot,set:at}=Object.getOwnPropertyDescriptor(it,et);Object.defineProperty(tt,et,{get:nt(ot),set:rt(at)})},sanitizeAudioWorkletNodeOptions=tt=>({...tt,outputChannelCount:tt.outputChannelCount!==void 0?tt.outputChannelCount:tt.numberOfInputs===1&&tt.numberOfOutputs===1?[tt.channelCount]:Array.from({length:tt.numberOfOutputs},()=>1)}),sanitizeChannelSplitterOptions=tt=>({...tt,channelCount:tt.numberOfOutputs}),sanitizePeriodicWaveOptions=tt=>{const{imag:et,real:nt}=tt;return et===void 0?nt===void 0?{...tt,imag:[0,0],real:[0,0]}:{...tt,imag:Array.from(nt,()=>0),real:nt}:nt===void 0?{...tt,imag:et,real:Array.from(et,()=>0)}:{...tt,imag:et,real:nt}},setValueAtTimeUntilPossible=(tt,et,nt)=>{try{tt.setValueAtTime(et,nt)}catch(rt){if(rt.code!==9)throw rt;setValueAtTimeUntilPossible(tt,et,nt+1e-7)}},testAudioBufferSourceNodeStartMethodConsecutiveCallsSupport=tt=>{const et=tt.createBufferSource();et.start();try{et.start()}catch{return!0}return!1},testAudioBufferSourceNodeStartMethodOffsetClampingSupport=tt=>{const et=tt.createBufferSource(),nt=tt.createBuffer(1,1,44100);et.buffer=nt;try{et.start(0,1)}catch{return!1}return!0},testAudioBufferSourceNodeStopMethodNullifiedBufferSupport=tt=>{const et=tt.createBufferSource();et.start();try{et.stop()}catch{return!1}return!0},testAudioScheduledSourceNodeStartMethodNegativeParametersSupport=tt=>{const et=tt.createOscillator();try{et.start(-1)}catch(nt){return nt instanceof RangeError}return!1},testAudioScheduledSourceNodeStopMethodConsecutiveCallsSupport=tt=>{const et=tt.createBuffer(1,1,44100),nt=tt.createBufferSource();nt.buffer=et,nt.start(),nt.stop();try{return nt.stop(),!0}catch{return!1}},testAudioScheduledSourceNodeStopMethodNegativeParametersSupport=tt=>{const et=tt.createOscillator();try{et.stop(-1)}catch(nt){return nt instanceof RangeError}return!1},testAudioWorkletNodeOptionsClonability=tt=>{const{port1:et,port2:nt}=new MessageChannel;try{et.postMessage(tt)}finally{et.close(),nt.close()}},wrapAudioBufferSourceNodeStartMethodOffsetClamping=tt=>{tt.start=(et=>(nt=0,rt=0,it)=>{const ot=tt.buffer,at=ot===null?rt:Math.min(ot.duration,rt);ot!==null&&at>ot.duration-.5/tt.context.sampleRate?et.call(tt,nt,0,0):et.call(tt,nt,at,it)})(tt.start)},wrapAudioScheduledSourceNodeStopMethodConsecutiveCalls=(tt,et)=>{const nt=et.createGain();tt.connect(nt);const rt=(it=>()=>{it.call(tt,nt),tt.removeEventListener("ended",rt)})(tt.disconnect);tt.addEventListener("ended",rt),interceptConnections(tt,nt),tt.stop=(it=>{let ot=!1;return(at=0)=>{if(ot)try{it.call(tt,at)}catch{nt.gain.setValueAtTime(0,at)}else it.call(tt,at),ot=!0}})(tt.stop)},wrapEventListener=(tt,et)=>nt=>{const rt={value:tt};return Object.defineProperties(nt,{currentTarget:rt,target:rt}),typeof et=="function"?et.call(tt,nt):et.handleEvent.call(tt,nt)},addActiveInputConnectionToAudioNode=createAddActiveInputConnectionToAudioNode(insertElementInSet),addPassiveInputConnectionToAudioNode=createAddPassiveInputConnectionToAudioNode(insertElementInSet),deleteActiveInputConnectionToAudioNode=createDeleteActiveInputConnectionToAudioNode(pickElementFromSet),audioNodeTailTimeStore=new WeakMap,getAudioNodeTailTime=createGetAudioNodeTailTime(audioNodeTailTimeStore),cacheTestResult=createCacheTestResult(new Map,new WeakMap),window$1=createWindow(),createNativeAnalyserNode=createNativeAnalyserNodeFactory(cacheTestResult,createIndexSizeError),getAudioNodeRenderer=createGetAudioNodeRenderer(getAudioNodeConnections),renderInputsOfAudioNode=createRenderInputsOfAudioNode(getAudioNodeConnections,getAudioNodeRenderer,isPartOfACycle),createAnalyserNodeRenderer=createAnalyserNodeRendererFactory(createNativeAnalyserNode,getNativeAudioNode,renderInputsOfAudioNode),getNativeContext=createGetNativeContext(CONTEXT_STORE),nativeOfflineAudioContextConstructor=createNativeOfflineAudioContextConstructor(window$1),isNativeOfflineAudioContext=createIsNativeOfflineAudioContext(nativeOfflineAudioContextConstructor),audioParamAudioNodeStore=new WeakMap,eventTargetConstructor=createEventTargetConstructor(wrapEventListener),nativeAudioContextConstructor=createNativeAudioContextConstructor(window$1),isNativeAudioContext=createIsNativeAudioContext(nativeAudioContextConstructor),isNativeAudioNode=createIsNativeAudioNode(window$1),isNativeAudioParam=createIsNativeAudioParam(window$1),nativeAudioWorkletNodeConstructor=createNativeAudioWorkletNodeConstructor(window$1),audioNodeConstructor=createAudioNodeConstructor(createAddAudioNodeConnections(AUDIO_NODE_CONNECTIONS_STORE),createAddConnectionToAudioNode(addActiveInputConnectionToAudioNode,addPassiveInputConnectionToAudioNode,connectNativeAudioNodeToNativeAudioNode,deleteActiveInputConnectionToAudioNode,disconnectNativeAudioNodeFromNativeAudioNode,getAudioNodeConnections,getAudioNodeTailTime,getEventListenersOfAudioNode,getNativeAudioNode,insertElementInSet,isActiveAudioNode,isPartOfACycle,isPassiveAudioNode),cacheTestResult,createIncrementCycleCounterFactory(CYCLE_COUNTERS,disconnectNativeAudioNodeFromNativeAudioNode,getAudioNodeConnections,getNativeAudioNode,getNativeAudioParam,isActiveAudioNode),createIndexSizeError,createInvalidAccessError,createNotSupportedError,createDecrementCycleCounter(connectNativeAudioNodeToNativeAudioNode,CYCLE_COUNTERS,getAudioNodeConnections,getNativeAudioNode,getNativeAudioParam,getNativeContext,isActiveAudioNode,isNativeOfflineAudioContext),createDetectCycles(audioParamAudioNodeStore,getAudioNodeConnections,getValueForKey),eventTargetConstructor,getNativeContext,isNativeAudioContext,isNativeAudioNode,isNativeAudioParam,isNativeOfflineAudioContext,nativeAudioWorkletNodeConstructor),analyserNodeConstructor=createAnalyserNodeConstructor(audioNodeConstructor,createAnalyserNodeRenderer,createIndexSizeError,createNativeAnalyserNode,getNativeContext,isNativeOfflineAudioContext),audioBufferStore=new WeakSet,nativeAudioBufferConstructor=createNativeAudioBufferConstructor(window$1),convertNumberToUnsignedLong=createConvertNumberToUnsignedLong(new Uint32Array(1)),wrapAudioBufferCopyChannelMethods=createWrapAudioBufferCopyChannelMethods(convertNumberToUnsignedLong,createIndexSizeError),wrapAudioBufferCopyChannelMethodsOutOfBounds=createWrapAudioBufferCopyChannelMethodsOutOfBounds(convertNumberToUnsignedLong),audioBufferConstructor=createAudioBufferConstructor(audioBufferStore,cacheTestResult,createNotSupportedError,nativeAudioBufferConstructor,nativeOfflineAudioContextConstructor,createTestAudioBufferConstructorSupport(nativeAudioBufferConstructor),wrapAudioBufferCopyChannelMethods,wrapAudioBufferCopyChannelMethodsOutOfBounds),addSilentConnection=createAddSilentConnection(createNativeGainNode),renderInputsOfAudioParam=createRenderInputsOfAudioParam(getAudioNodeRenderer,getAudioParamConnections,isPartOfACycle),connectAudioParam=createConnectAudioParam(renderInputsOfAudioParam),createNativeAudioBufferSourceNode=createNativeAudioBufferSourceNodeFactory(addSilentConnection,cacheTestResult,testAudioBufferSourceNodeStartMethodConsecutiveCallsSupport,testAudioBufferSourceNodeStartMethodOffsetClampingSupport,testAudioBufferSourceNodeStopMethodNullifiedBufferSupport,testAudioScheduledSourceNodeStartMethodNegativeParametersSupport,testAudioScheduledSourceNodeStopMethodConsecutiveCallsSupport,testAudioScheduledSourceNodeStopMethodNegativeParametersSupport,wrapAudioBufferSourceNodeStartMethodOffsetClamping,createWrapAudioBufferSourceNodeStopMethodNullifiedBuffer(overwriteAccessors),wrapAudioScheduledSourceNodeStopMethodConsecutiveCalls),renderAutomation=createRenderAutomation(createGetAudioParamRenderer(getAudioParamConnections),renderInputsOfAudioParam),createAudioBufferSourceNodeRenderer=createAudioBufferSourceNodeRendererFactory(connectAudioParam,createNativeAudioBufferSourceNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),createAudioParam=createAudioParamFactory(createAddAudioParamConnections(AUDIO_PARAM_CONNECTIONS_STORE),audioParamAudioNodeStore,AUDIO_PARAM_STORE,createAudioParamRenderer,createCancelAndHoldAutomationEvent,createCancelScheduledValuesAutomationEvent,createExponentialRampToValueAutomationEvent,createLinearRampToValueAutomationEvent,createSetTargetAutomationEvent,createSetValueAutomationEvent,createSetValueCurveAutomationEvent,nativeAudioContextConstructor,setValueAtTimeUntilPossible),audioBufferSourceNodeConstructor=createAudioBufferSourceNodeConstructor(audioNodeConstructor,createAudioBufferSourceNodeRenderer,createAudioParam,createInvalidStateError,createNativeAudioBufferSourceNode,getNativeContext,isNativeOfflineAudioContext,wrapEventListener),audioDestinationNodeConstructor=createAudioDestinationNodeConstructor(audioNodeConstructor,createAudioDestinationNodeRenderer,createIndexSizeError,createInvalidStateError,createNativeAudioDestinationNodeFactory(createNativeGainNode,overwriteAccessors),getNativeContext,isNativeOfflineAudioContext,renderInputsOfAudioNode),createBiquadFilterNodeRenderer=createBiquadFilterNodeRendererFactory(connectAudioParam,createNativeBiquadFilterNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),setAudioNodeTailTime=createSetAudioNodeTailTime(audioNodeTailTimeStore),biquadFilterNodeConstructor=createBiquadFilterNodeConstructor(audioNodeConstructor,createAudioParam,createBiquadFilterNodeRenderer,createInvalidAccessError,createNativeBiquadFilterNode,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),monitorConnections=createMonitorConnections(insertElementInSet,isNativeAudioNode),wrapChannelMergerNode=createWrapChannelMergerNode(createInvalidStateError,monitorConnections),createNativeChannelMergerNode=createNativeChannelMergerNodeFactory(nativeAudioContextConstructor,wrapChannelMergerNode),createChannelMergerNodeRenderer=createChannelMergerNodeRendererFactory(createNativeChannelMergerNode,getNativeAudioNode,renderInputsOfAudioNode),channelMergerNodeConstructor=createChannelMergerNodeConstructor(audioNodeConstructor,createChannelMergerNodeRenderer,createNativeChannelMergerNode,getNativeContext,isNativeOfflineAudioContext),createChannelSplitterNodeRenderer=createChannelSplitterNodeRendererFactory(createNativeChannelSplitterNode,getNativeAudioNode,renderInputsOfAudioNode),channelSplitterNodeConstructor=createChannelSplitterNodeConstructor(audioNodeConstructor,createChannelSplitterNodeRenderer,createNativeChannelSplitterNode,getNativeContext,isNativeOfflineAudioContext,sanitizeChannelSplitterOptions),createNativeConstantSourceNodeFaker=createNativeConstantSourceNodeFakerFactory(addSilentConnection,createNativeAudioBufferSourceNode,createNativeGainNode,monitorConnections),createNativeConstantSourceNode=createNativeConstantSourceNodeFactory(addSilentConnection,cacheTestResult,createNativeConstantSourceNodeFaker,testAudioScheduledSourceNodeStartMethodNegativeParametersSupport,testAudioScheduledSourceNodeStopMethodNegativeParametersSupport),createConstantSourceNodeRenderer=createConstantSourceNodeRendererFactory(connectAudioParam,createNativeConstantSourceNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),constantSourceNodeConstructor=createConstantSourceNodeConstructor(audioNodeConstructor,createAudioParam,createConstantSourceNodeRenderer,createNativeConstantSourceNode,getNativeContext,isNativeOfflineAudioContext,wrapEventListener),createNativeConvolverNode=createNativeConvolverNodeFactory(createNotSupportedError,overwriteAccessors),createConvolverNodeRenderer=createConvolverNodeRendererFactory(createNativeConvolverNode,getNativeAudioNode,renderInputsOfAudioNode),convolverNodeConstructor=createConvolverNodeConstructor(audioNodeConstructor,createConvolverNodeRenderer,createNativeConvolverNode,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createDelayNodeRenderer=createDelayNodeRendererFactory(connectAudioParam,createNativeDelayNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),delayNodeConstructor=createDelayNodeConstructor(audioNodeConstructor,createAudioParam,createDelayNodeRenderer,createNativeDelayNode,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createNativeDynamicsCompressorNode=createNativeDynamicsCompressorNodeFactory(createNotSupportedError),createDynamicsCompressorNodeRenderer=createDynamicsCompressorNodeRendererFactory(connectAudioParam,createNativeDynamicsCompressorNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),dynamicsCompressorNodeConstructor=createDynamicsCompressorNodeConstructor(audioNodeConstructor,createAudioParam,createDynamicsCompressorNodeRenderer,createNativeDynamicsCompressorNode,createNotSupportedError,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createGainNodeRenderer=createGainNodeRendererFactory(connectAudioParam,createNativeGainNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),gainNodeConstructor=createGainNodeConstructor(audioNodeConstructor,createAudioParam,createGainNodeRenderer,createNativeGainNode,getNativeContext,isNativeOfflineAudioContext),createNativeIIRFilterNodeFaker=createNativeIIRFilterNodeFakerFactory(createInvalidAccessError,createInvalidStateError,createNativeScriptProcessorNode,createNotSupportedError),renderNativeOfflineAudioContext=createRenderNativeOfflineAudioContext(cacheTestResult,createNativeGainNode,createNativeScriptProcessorNode,createTestOfflineAudioContextCurrentTimeSupport(createNativeGainNode,nativeOfflineAudioContextConstructor)),createIIRFilterNodeRenderer=createIIRFilterNodeRendererFactory(createNativeAudioBufferSourceNode,getNativeAudioNode,nativeOfflineAudioContextConstructor,renderInputsOfAudioNode,renderNativeOfflineAudioContext),createNativeIIRFilterNode=createNativeIIRFilterNodeFactory(createNativeIIRFilterNodeFaker),iIRFilterNodeConstructor=createIIRFilterNodeConstructor(audioNodeConstructor,createNativeIIRFilterNode,createIIRFilterNodeRenderer,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createAudioListener=createAudioListenerFactory(createAudioParam,createNativeChannelMergerNode,createNativeConstantSourceNode,createNativeScriptProcessorNode,createNotSupportedError,getFirstSample,isNativeOfflineAudioContext,overwriteAccessors),unrenderedAudioWorkletNodeStore=new WeakMap,minimalBaseAudioContextConstructor=createMinimalBaseAudioContextConstructor(audioDestinationNodeConstructor,createAudioListener,eventTargetConstructor,isNativeOfflineAudioContext,unrenderedAudioWorkletNodeStore,wrapEventListener),createNativeOscillatorNode=createNativeOscillatorNodeFactory(addSilentConnection,cacheTestResult,testAudioScheduledSourceNodeStartMethodNegativeParametersSupport,testAudioScheduledSourceNodeStopMethodConsecutiveCallsSupport,testAudioScheduledSourceNodeStopMethodNegativeParametersSupport,wrapAudioScheduledSourceNodeStopMethodConsecutiveCalls),createOscillatorNodeRenderer=createOscillatorNodeRendererFactory(connectAudioParam,createNativeOscillatorNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),oscillatorNodeConstructor=createOscillatorNodeConstructor(audioNodeConstructor,createAudioParam,createNativeOscillatorNode,createOscillatorNodeRenderer,getNativeContext,isNativeOfflineAudioContext,wrapEventListener),createConnectedNativeAudioBufferSourceNode=createConnectedNativeAudioBufferSourceNodeFactory(createNativeAudioBufferSourceNode),createNativeWaveShaperNodeFaker=createNativeWaveShaperNodeFakerFactory(createConnectedNativeAudioBufferSourceNode,createInvalidStateError,createNativeGainNode,isDCCurve,monitorConnections),createNativeWaveShaperNode=createNativeWaveShaperNodeFactory(createConnectedNativeAudioBufferSourceNode,createInvalidStateError,createNativeWaveShaperNodeFaker,isDCCurve,monitorConnections,nativeAudioContextConstructor,overwriteAccessors),createNativePannerNodeFaker=createNativePannerNodeFakerFactory(connectNativeAudioNodeToNativeAudioNode,createInvalidStateError,createNativeChannelMergerNode,createNativeGainNode,createNativeScriptProcessorNode,createNativeWaveShaperNode,createNotSupportedError,disconnectNativeAudioNodeFromNativeAudioNode,getFirstSample,monitorConnections),createNativePannerNode=createNativePannerNodeFactory(createNativePannerNodeFaker),createPannerNodeRenderer=createPannerNodeRendererFactory(connectAudioParam,createNativeChannelMergerNode,createNativeConstantSourceNode,createNativeGainNode,createNativePannerNode,getNativeAudioNode,nativeOfflineAudioContextConstructor,renderAutomation,renderInputsOfAudioNode,renderNativeOfflineAudioContext),pannerNodeConstructor=createPannerNodeConstructor(audioNodeConstructor,createAudioParam,createNativePannerNode,createPannerNodeRenderer,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createNativePeriodicWave=createNativePeriodicWaveFactory(createIndexSizeError),periodicWaveConstructor=createPeriodicWaveConstructor(createNativePeriodicWave,getNativeContext,new WeakSet,sanitizePeriodicWaveOptions),nativeStereoPannerNodeFakerFactory=createNativeStereoPannerNodeFakerFactory(createNativeChannelMergerNode,createNativeChannelSplitterNode,createNativeGainNode,createNativeWaveShaperNode,createNotSupportedError,monitorConnections),createNativeStereoPannerNode=createNativeStereoPannerNodeFactory(nativeStereoPannerNodeFakerFactory,createNotSupportedError),createStereoPannerNodeRenderer=createStereoPannerNodeRendererFactory(connectAudioParam,createNativeStereoPannerNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),stereoPannerNodeConstructor=createStereoPannerNodeConstructor(audioNodeConstructor,createAudioParam,createNativeStereoPannerNode,createStereoPannerNodeRenderer,getNativeContext,isNativeOfflineAudioContext),createWaveShaperNodeRenderer=createWaveShaperNodeRendererFactory(createNativeWaveShaperNode,getNativeAudioNode,renderInputsOfAudioNode),waveShaperNodeConstructor=createWaveShaperNodeConstructor(audioNodeConstructor,createInvalidStateError,createNativeWaveShaperNode,createWaveShaperNodeRenderer,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),isSecureContext=createIsSecureContext(window$1),exposeCurrentFrameAndCurrentTime=createExposeCurrentFrameAndCurrentTime(window$1),backupOfflineAudioContextStore=new WeakMap,getOrCreateBackupOfflineAudioContext=createGetOrCreateBackupOfflineAudioContext(backupOfflineAudioContextStore,nativeOfflineAudioContextConstructor),addAudioWorkletModule=isSecureContext?createAddAudioWorkletModule(cacheTestResult,createNotSupportedError,createEvaluateSource(window$1),exposeCurrentFrameAndCurrentTime,createFetchSource(createAbortError),getNativeContext,getOrCreateBackupOfflineAudioContext,isNativeOfflineAudioContext,nativeAudioWorkletNodeConstructor,new WeakMap,new WeakMap,createTestAudioWorkletProcessorPostMessageSupport(nativeAudioWorkletNodeConstructor,nativeOfflineAudioContextConstructor),window$1):void 0,isNativeContext=createIsNativeContext(isNativeAudioContext,isNativeOfflineAudioContext),decodeAudioData=createDecodeAudioData(audioBufferStore,cacheTestResult,createDataCloneError,createEncodingError,new WeakSet,getNativeContext,isNativeContext,testAudioBufferCopyChannelMethodsOutOfBoundsSupport,testPromiseSupport,wrapAudioBufferCopyChannelMethods,wrapAudioBufferCopyChannelMethodsOutOfBounds),baseAudioContextConstructor=createBaseAudioContextConstructor(addAudioWorkletModule,analyserNodeConstructor,audioBufferConstructor,audioBufferSourceNodeConstructor,biquadFilterNodeConstructor,channelMergerNodeConstructor,channelSplitterNodeConstructor,constantSourceNodeConstructor,convolverNodeConstructor,decodeAudioData,delayNodeConstructor,dynamicsCompressorNodeConstructor,gainNodeConstructor,iIRFilterNodeConstructor,minimalBaseAudioContextConstructor,oscillatorNodeConstructor,pannerNodeConstructor,periodicWaveConstructor,stereoPannerNodeConstructor,waveShaperNodeConstructor),mediaElementAudioSourceNodeConstructor=createMediaElementAudioSourceNodeConstructor(audioNodeConstructor,createNativeMediaElementAudioSourceNode,getNativeContext,isNativeOfflineAudioContext),mediaStreamAudioDestinationNodeConstructor=createMediaStreamAudioDestinationNodeConstructor(audioNodeConstructor,createNativeMediaStreamAudioDestinationNode,getNativeContext,isNativeOfflineAudioContext),mediaStreamAudioSourceNodeConstructor=createMediaStreamAudioSourceNodeConstructor(audioNodeConstructor,createNativeMediaStreamAudioSourceNode,getNativeContext,isNativeOfflineAudioContext),createNativeMediaStreamTrackAudioSourceNode=createNativeMediaStreamTrackAudioSourceNodeFactory(createInvalidStateError,isNativeOfflineAudioContext),mediaStreamTrackAudioSourceNodeConstructor=createMediaStreamTrackAudioSourceNodeConstructor(audioNodeConstructor,createNativeMediaStreamTrackAudioSourceNode,getNativeContext),audioContextConstructor=createAudioContextConstructor(baseAudioContextConstructor,createInvalidStateError,createNotSupportedError,createUnknownError,mediaElementAudioSourceNodeConstructor,mediaStreamAudioDestinationNodeConstructor,mediaStreamAudioSourceNodeConstructor,mediaStreamTrackAudioSourceNodeConstructor,nativeAudioContextConstructor),getUnrenderedAudioWorkletNodes=createGetUnrenderedAudioWorkletNodes(unrenderedAudioWorkletNodeStore),addUnrenderedAudioWorkletNode=createAddUnrenderedAudioWorkletNode(getUnrenderedAudioWorkletNodes),connectMultipleOutputs=createConnectMultipleOutputs(createIndexSizeError),deleteUnrenderedAudioWorkletNode=createDeleteUnrenderedAudioWorkletNode(getUnrenderedAudioWorkletNodes),disconnectMultipleOutputs=createDisconnectMultipleOutputs(createIndexSizeError),activeAudioWorkletNodeInputsStore=new WeakMap,getActiveAudioWorkletNodeInputs=createGetActiveAudioWorkletNodeInputs(activeAudioWorkletNodeInputsStore,getValueForKey),createNativeAudioWorkletNodeFaker=createNativeAudioWorkletNodeFakerFactory(connectMultipleOutputs,createIndexSizeError,createInvalidStateError,createNativeChannelMergerNode,createNativeChannelSplitterNode,createNativeConstantSourceNode,createNativeGainNode,createNativeScriptProcessorNode,createNotSupportedError,disconnectMultipleOutputs,exposeCurrentFrameAndCurrentTime,getActiveAudioWorkletNodeInputs,monitorConnections),createNativeAudioWorkletNode=createNativeAudioWorkletNodeFactory(createInvalidStateError,createNativeAudioWorkletNodeFaker,createNativeGainNode,createNotSupportedError,monitorConnections),createAudioWorkletNodeRenderer=createAudioWorkletNodeRendererFactory(connectAudioParam,connectMultipleOutputs,createNativeAudioBufferSourceNode,createNativeChannelMergerNode,createNativeChannelSplitterNode,createNativeConstantSourceNode,createNativeGainNode,deleteUnrenderedAudioWorkletNode,disconnectMultipleOutputs,exposeCurrentFrameAndCurrentTime,getNativeAudioNode,nativeAudioWorkletNodeConstructor,nativeOfflineAudioContextConstructor,renderAutomation,renderInputsOfAudioNode,renderNativeOfflineAudioContext),getBackupOfflineAudioContext=createGetBackupOfflineAudioContext(backupOfflineAudioContextStore),setActiveAudioWorkletNodeInputs=createSetActiveAudioWorkletNodeInputs(activeAudioWorkletNodeInputsStore),audioWorkletNodeConstructor=isSecureContext?createAudioWorkletNodeConstructor(addUnrenderedAudioWorkletNode,audioNodeConstructor,createAudioParam,createAudioWorkletNodeRenderer,createNativeAudioWorkletNode,getAudioNodeConnections,getBackupOfflineAudioContext,getNativeContext,isNativeOfflineAudioContext,nativeAudioWorkletNodeConstructor,sanitizeAudioWorkletNodeOptions,setActiveAudioWorkletNodeInputs,testAudioWorkletNodeOptionsClonability,wrapEventListener):void 0,createNativeOfflineAudioContext=createCreateNativeOfflineAudioContext(createNotSupportedError,nativeOfflineAudioContextConstructor),startRendering=createStartRendering(audioBufferStore,cacheTestResult,getAudioNodeRenderer,getUnrenderedAudioWorkletNodes,renderNativeOfflineAudioContext,testAudioBufferCopyChannelMethodsOutOfBoundsSupport,wrapAudioBufferCopyChannelMethods,wrapAudioBufferCopyChannelMethodsOutOfBounds),offlineAudioContextConstructor=createOfflineAudioContextConstructor(baseAudioContextConstructor,cacheTestResult,createInvalidStateError,createNativeOfflineAudioContext,startRendering),isAnyAudioContext=createIsAnyAudioContext(CONTEXT_STORE,isNativeAudioContext),isAnyAudioNode=createIsAnyAudioNode(AUDIO_NODE_STORE,isNativeAudioNode),isAnyAudioParam=createIsAnyAudioParam(AUDIO_PARAM_STORE,isNativeAudioParam),isAnyOfflineAudioContext=createIsAnyOfflineAudioContext(CONTEXT_STORE,isNativeOfflineAudioContext);function isUndef(tt){return typeof tt>"u"}function isDefined(tt){return!isUndef(tt)}function isFunction$2(tt){return typeof tt=="function"}function isNumber$4(tt){return typeof tt=="number"}function isObject$7(tt){return Object.prototype.toString.call(tt)==="[object Object]"&&tt.constructor===Object}function isBoolean$1(tt){return typeof tt=="boolean"}function isArray$e(tt){return Array.isArray(tt)}function isString$2(tt){return typeof tt=="string"}function isNote(tt){return isString$2(tt)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(tt)}function assert(tt,et){if(!tt)throw new Error(et)}function assertRange(tt,et,nt=1/0){if(!(et<=tt&&tt<=nt))throw new RangeError(`Value must be within [${et}, ${nt}], got: ${tt}`)}function assertContextRunning(tt){!tt.isOffline&&tt.state!=="running"&&warn$2('The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.')}let isInsideScheduledCallback=!1,printedScheduledWarning=!1;function enterScheduledCallback(tt){isInsideScheduledCallback=tt}function assertUsedScheduleTime(tt){isUndef(tt)&&isInsideScheduledCallback&&!printedScheduledWarning&&(printedScheduledWarning=!0,warn$2("Events scheduled inside of scheduled callbacks should use the passed in scheduling time. See https://github.com/Tonejs/Tone.js/wiki/Accurate-Timing"))}let defaultLogger=console;function log$1(...tt){defaultLogger.log(...tt)}function warn$2(...tt){defaultLogger.warn(...tt)}function createAudioContext(tt){return new audioContextConstructor(tt)}function createOfflineAudioContext(tt,et,nt){return new offlineAudioContextConstructor(tt,et,nt)}const theWindow=typeof self=="object"?self:null,hasAudioContext=theWindow&&(theWindow.hasOwnProperty("AudioContext")||theWindow.hasOwnProperty("webkitAudioContext"));function createAudioWorkletNode(tt,et,nt){return assert(isDefined(audioWorkletNodeConstructor),"This node only works in a secure context (https or localhost)"),new audioWorkletNodeConstructor(tt,et,nt)}class Ticker{constructor(et,nt,rt,it){this._callback=et,this._type=nt,this._minimumUpdateInterval=Math.max(128/(it||44100),.001),this.updateInterval=rt,this._createClock()}_createWorker(){const et=new Blob([` +})(${At?"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{${At?"":"__c = (a) => a.forEach(e=>this.__b.add(e.buffer));"}process(i,o,p){${At?"":"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${Et}',class extends AudioWorkletProcessor{process(){return !1}})`,It=new Blob([wt],{type:"application/javascript; charset=utf-8"}),Ot=URL.createObjectURL(It);return xt.audioWorklet.addModule(Ot,yt).then(()=>{if(st(xt))return xt;const Wt=at(xt);return Wt.audioWorklet.addModule(Ot,yt).then(()=>Wt)}).then(Wt=>{if(lt===null)throw new SyntaxError;try{new lt(Wt,`__sac${Et}`)}catch{throw new SyntaxError}}).finally(()=>URL.revokeObjectURL(Ot))});return vt===void 0?ct.set(mt,new Map([[gt,kt]])):vt.set(gt,kt),kt.then(()=>{const St=ut.get(mt);St===void 0?ut.set(mt,new Set([gt])):St.add(gt)}).finally(()=>{const St=ct.get(mt);St!==void 0&&St.delete(gt)}),kt}},getValueForKey=(tt,et)=>{const nt=tt.get(et);if(nt===void 0)throw new Error("A value with the given key could not be found.");return nt},pickElementFromSet=(tt,et)=>{const nt=Array.from(tt).filter(et);if(nt.length>1)throw Error("More than one element was found.");if(nt.length===0)throw Error("No element was found.");const[rt]=nt;return tt.delete(rt),rt},deletePassiveInputConnectionToAudioNode=(tt,et,nt,rt)=>{const it=getValueForKey(tt,et),ot=pickElementFromSet(it,at=>at[0]===nt&&at[1]===rt);return it.size===0&&tt.delete(et),ot},getEventListenersOfAudioNode=tt=>getValueForKey(EVENT_LISTENERS,tt),setInternalStateToActive=tt=>{if(ACTIVE_AUDIO_NODE_STORE.has(tt))throw new Error("The AudioNode is already stored.");ACTIVE_AUDIO_NODE_STORE.add(tt),getEventListenersOfAudioNode(tt).forEach(et=>et(!0))},isAudioWorkletNode=tt=>"port"in tt,setInternalStateToPassive=tt=>{if(!ACTIVE_AUDIO_NODE_STORE.has(tt))throw new Error("The AudioNode is not stored.");ACTIVE_AUDIO_NODE_STORE.delete(tt),getEventListenersOfAudioNode(tt).forEach(et=>et(!1))},setInternalStateToPassiveWhenNecessary=(tt,et)=>{!isAudioWorkletNode(tt)&&et.every(nt=>nt.size===0)&&setInternalStateToPassive(tt)},createAddConnectionToAudioNode=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt)=>{const pt=new WeakMap;return(mt,gt,yt,bt,vt)=>{const{activeInputs:xt,passiveInputs:kt}=ot(gt),{outputs:St}=ot(mt),Tt=st(mt),At=Et=>{const $t=lt(gt),Dt=lt(mt);if(Et){const jt=deletePassiveInputConnectionToAudioNode(kt,mt,yt,bt);tt(xt,mt,jt,!1),!vt&&!ht(mt)&&nt(Dt,$t,yt,bt),dt(gt)&&setInternalStateToActive(gt)}else{const jt=rt(xt,mt,yt,bt);et(kt,bt,jt,!1),!vt&&!ht(mt)&&it(Dt,$t,yt,bt);const Pt=at(gt);if(Pt===0)ut(gt)&&setInternalStateToPassiveWhenNecessary(gt,xt);else{const Ct=pt.get(gt);Ct!==void 0&&clearTimeout(Ct),pt.set(gt,setTimeout(()=>{ut(gt)&&setInternalStateToPassiveWhenNecessary(gt,xt)},Pt*1e3))}}};return ct(St,[gt,yt,bt],Et=>Et[0]===gt&&Et[1]===yt&&Et[2]===bt,!0)?(Tt.add(At),ut(mt)?tt(xt,mt,[yt,bt,At],!0):et(kt,bt,[mt,yt,At],!0),!0):!1}},createAddPassiveInputConnectionToAudioNode=tt=>(et,nt,[rt,it,ot],at)=>{const st=et.get(rt);st===void 0?et.set(rt,new Set([[it,nt,ot]])):tt(st,[it,nt,ot],lt=>lt[0]===it&<[1]===nt,at)},createAddSilentConnection=tt=>(et,nt)=>{const rt=tt(et,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});nt.connect(rt).connect(et.destination);const it=()=>{nt.removeEventListener("ended",it),nt.disconnect(rt),rt.disconnect()};nt.addEventListener("ended",it)},createAddUnrenderedAudioWorkletNode=tt=>(et,nt)=>{tt(et).add(nt)},DEFAULT_OPTIONS$j={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",fftSize:2048,maxDecibels:-30,minDecibels:-100,smoothingTimeConstant:.8},createAnalyserNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=it(st),ut={...DEFAULT_OPTIONS$j,...lt},ht=rt(ct,ut),dt=ot(ct)?et():null;super(st,!1,ht,dt),this._nativeAnalyserNode=ht}get fftSize(){return this._nativeAnalyserNode.fftSize}set fftSize(st){this._nativeAnalyserNode.fftSize=st}get frequencyBinCount(){return this._nativeAnalyserNode.frequencyBinCount}get maxDecibels(){return this._nativeAnalyserNode.maxDecibels}set maxDecibels(st){const lt=this._nativeAnalyserNode.maxDecibels;if(this._nativeAnalyserNode.maxDecibels=st,!(st>this._nativeAnalyserNode.minDecibels))throw this._nativeAnalyserNode.maxDecibels=lt,nt()}get minDecibels(){return this._nativeAnalyserNode.minDecibels}set minDecibels(st){const lt=this._nativeAnalyserNode.minDecibels;if(this._nativeAnalyserNode.minDecibels=st,!(this._nativeAnalyserNode.maxDecibels>st))throw this._nativeAnalyserNode.minDecibels=lt,nt()}get smoothingTimeConstant(){return this._nativeAnalyserNode.smoothingTimeConstant}set smoothingTimeConstant(st){this._nativeAnalyserNode.smoothingTimeConstant=st}getByteFrequencyData(st){this._nativeAnalyserNode.getByteFrequencyData(st)}getByteTimeDomainData(st){this._nativeAnalyserNode.getByteTimeDomainData(st)}getFloatFrequencyData(st){this._nativeAnalyserNode.getFloatFrequencyData(st)}getFloatTimeDomainData(st){this._nativeAnalyserNode.getFloatTimeDomainData(st)}},isOwnedByContext=(tt,et)=>tt.context===et,createAnalyserNodeRendererFactory=(tt,et,nt)=>()=>{const rt=new WeakMap,it=async(ot,at)=>{let st=et(ot);if(!isOwnedByContext(st,at)){const ct={channelCount:st.channelCount,channelCountMode:st.channelCountMode,channelInterpretation:st.channelInterpretation,fftSize:st.fftSize,maxDecibels:st.maxDecibels,minDecibels:st.minDecibels,smoothingTimeConstant:st.smoothingTimeConstant};st=tt(at,ct)}return rt.set(at,st),await nt(ot,at,st),st};return{render(ot,at){const st=rt.get(at);return st!==void 0?Promise.resolve(st):it(ot,at)}}},testAudioBufferCopyChannelMethodsOutOfBoundsSupport=tt=>{try{tt.copyToChannel(new Float32Array(1),0,-1)}catch{return!1}return!0},createIndexSizeError=()=>new DOMException("","IndexSizeError"),wrapAudioBufferGetChannelDataMethod=tt=>{tt.getChannelData=(et=>nt=>{try{return et.call(tt,nt)}catch(rt){throw rt.code===12?createIndexSizeError():rt}})(tt.getChannelData)},DEFAULT_OPTIONS$i={numberOfChannels:1},createAudioBufferConstructor=(tt,et,nt,rt,it,ot,at,st)=>{let lt=null;return class vw{constructor(ut){if(it===null)throw new Error("Missing the native OfflineAudioContext constructor.");const{length:ht,numberOfChannels:dt,sampleRate:pt}={...DEFAULT_OPTIONS$i,...ut};lt===null&&(lt=new it(1,1,44100));const mt=rt!==null&&et(ot,ot)?new rt({length:ht,numberOfChannels:dt,sampleRate:pt}):lt.createBuffer(dt,ht,pt);if(mt.numberOfChannels===0)throw nt();return typeof mt.copyFromChannel!="function"?(at(mt),wrapAudioBufferGetChannelDataMethod(mt)):et(testAudioBufferCopyChannelMethodsOutOfBoundsSupport,()=>testAudioBufferCopyChannelMethodsOutOfBoundsSupport(mt))||st(mt),tt.add(mt),mt}static[Symbol.hasInstance](ut){return ut!==null&&typeof ut=="object"&&Object.getPrototypeOf(ut)===vw.prototype||tt.has(ut)}}},MOST_NEGATIVE_SINGLE_FLOAT=-34028234663852886e22,MOST_POSITIVE_SINGLE_FLOAT=-MOST_NEGATIVE_SINGLE_FLOAT,isActiveAudioNode=tt=>ACTIVE_AUDIO_NODE_STORE.has(tt),DEFAULT_OPTIONS$h={buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1},createAudioBufferSourceNodeConstructor=(tt,et,nt,rt,it,ot,at,st)=>class extends tt{constructor(ct,ut){const ht=ot(ct),dt={...DEFAULT_OPTIONS$h,...ut},pt=it(ht,dt),mt=at(ht),gt=mt?et():null;super(ct,!1,pt,gt),this._audioBufferSourceNodeRenderer=gt,this._isBufferNullified=!1,this._isBufferSet=dt.buffer!==null,this._nativeAudioBufferSourceNode=pt,this._onended=null,this._playbackRate=nt(this,mt,pt.playbackRate,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT)}get buffer(){return this._isBufferNullified?null:this._nativeAudioBufferSourceNode.buffer}set buffer(ct){if(this._nativeAudioBufferSourceNode.buffer=ct,ct!==null){if(this._isBufferSet)throw rt();this._isBufferSet=!0}}get loop(){return this._nativeAudioBufferSourceNode.loop}set loop(ct){this._nativeAudioBufferSourceNode.loop=ct}get loopEnd(){return this._nativeAudioBufferSourceNode.loopEnd}set loopEnd(ct){this._nativeAudioBufferSourceNode.loopEnd=ct}get loopStart(){return this._nativeAudioBufferSourceNode.loopStart}set loopStart(ct){this._nativeAudioBufferSourceNode.loopStart=ct}get onended(){return this._onended}set onended(ct){const ut=typeof ct=="function"?st(this,ct):null;this._nativeAudioBufferSourceNode.onended=ut;const ht=this._nativeAudioBufferSourceNode.onended;this._onended=ht!==null&&ht===ut?ct:ht}get playbackRate(){return this._playbackRate}start(ct=0,ut=0,ht){if(this._nativeAudioBufferSourceNode.start(ct,ut,ht),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.start=ht===void 0?[ct,ut]:[ct,ut,ht]),this.context.state!=="closed"){setInternalStateToActive(this);const dt=()=>{this._nativeAudioBufferSourceNode.removeEventListener("ended",dt),isActiveAudioNode(this)&&setInternalStateToPassive(this)};this._nativeAudioBufferSourceNode.addEventListener("ended",dt)}}stop(ct=0){this._nativeAudioBufferSourceNode.stop(ct),this._audioBufferSourceNodeRenderer!==null&&(this._audioBufferSourceNodeRenderer.stop=ct)}},createAudioBufferSourceNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap;let at=null,st=null;const lt=async(ct,ut)=>{let ht=nt(ct);const dt=isOwnedByContext(ht,ut);if(!dt){const pt={buffer:ht.buffer,channelCount:ht.channelCount,channelCountMode:ht.channelCountMode,channelInterpretation:ht.channelInterpretation,loop:ht.loop,loopEnd:ht.loopEnd,loopStart:ht.loopStart,playbackRate:ht.playbackRate.value};ht=et(ut,pt),at!==null&&ht.start(...at),st!==null&&ht.stop(st)}return ot.set(ut,ht),dt?await tt(ut,ct.playbackRate,ht.playbackRate):await rt(ut,ct.playbackRate,ht.playbackRate),await it(ct,ut,ht),ht};return{set start(ct){at=ct},set stop(ct){st=ct},render(ct,ut){const ht=ot.get(ut);return ht!==void 0?Promise.resolve(ht):lt(ct,ut)}}},isAudioBufferSourceNode=tt=>"playbackRate"in tt,isBiquadFilterNode=tt=>"frequency"in tt&&"gain"in tt,isConstantSourceNode=tt=>"offset"in tt,isGainNode=tt=>!("frequency"in tt)&&"gain"in tt,isOscillatorNode=tt=>"detune"in tt&&"frequency"in tt,isStereoPannerNode=tt=>"pan"in tt,getAudioNodeConnections=tt=>getValueForKey(AUDIO_NODE_CONNECTIONS_STORE,tt),getAudioParamConnections=tt=>getValueForKey(AUDIO_PARAM_CONNECTIONS_STORE,tt),deactivateActiveAudioNodeInputConnections=(tt,et)=>{const{activeInputs:nt}=getAudioNodeConnections(tt);nt.forEach(it=>it.forEach(([ot])=>{et.includes(tt)||deactivateActiveAudioNodeInputConnections(ot,[...et,tt])}));const rt=isAudioBufferSourceNode(tt)?[tt.playbackRate]:isAudioWorkletNode(tt)?Array.from(tt.parameters.values()):isBiquadFilterNode(tt)?[tt.Q,tt.detune,tt.frequency,tt.gain]:isConstantSourceNode(tt)?[tt.offset]:isGainNode(tt)?[tt.gain]:isOscillatorNode(tt)?[tt.detune,tt.frequency]:isStereoPannerNode(tt)?[tt.pan]:[];for(const it of rt){const ot=getAudioParamConnections(it);ot!==void 0&&ot.activeInputs.forEach(([at])=>deactivateActiveAudioNodeInputConnections(at,et))}isActiveAudioNode(tt)&&setInternalStateToPassive(tt)},deactivateAudioGraph=tt=>{deactivateActiveAudioNodeInputConnections(tt.destination,[])},isValidLatencyHint=tt=>tt===void 0||typeof tt=="number"||typeof tt=="string"&&(tt==="balanced"||tt==="interactive"||tt==="playback"),createAudioContextConstructor=(tt,et,nt,rt,it,ot,at,st,lt)=>class extends tt{constructor(ut={}){if(lt===null)throw new Error("Missing the native AudioContext constructor.");let ht;try{ht=new lt(ut)}catch(mt){throw mt.code===12&&mt.message==="sampleRate is not in range"?nt():mt}if(ht===null)throw rt();if(!isValidLatencyHint(ut.latencyHint))throw new TypeError(`The provided value '${ut.latencyHint}' is not a valid enum value of type AudioContextLatencyCategory.`);if(ut.sampleRate!==void 0&&ht.sampleRate!==ut.sampleRate)throw nt();super(ht,2);const{latencyHint:dt}=ut,{sampleRate:pt}=ht;if(this._baseLatency=typeof ht.baseLatency=="number"?ht.baseLatency:dt==="balanced"?512/pt:dt==="interactive"||dt===void 0?256/pt:dt==="playback"?1024/pt:Math.max(2,Math.min(128,Math.round(dt*pt/128)))*128/pt,this._nativeAudioContext=ht,lt.name==="webkitAudioContext"?(this._nativeGainNode=ht.createGain(),this._nativeOscillatorNode=ht.createOscillator(),this._nativeGainNode.gain.value=1e-37,this._nativeOscillatorNode.connect(this._nativeGainNode).connect(ht.destination),this._nativeOscillatorNode.start()):(this._nativeGainNode=null,this._nativeOscillatorNode=null),this._state=null,ht.state==="running"){this._state="suspended";const mt=()=>{this._state==="suspended"&&(this._state=null),ht.removeEventListener("statechange",mt)};ht.addEventListener("statechange",mt)}}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 et()}):(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()),deactivateAudioGraph(this)}))}createMediaElementSource(ut){return new it(this,{mediaElement:ut})}createMediaStreamDestination(){return new ot(this)}createMediaStreamSource(ut){return new at(this,{mediaStream:ut})}createMediaStreamTrackSource(ut){return new st(this,{mediaStreamTrack:ut})}resume(){return this._state==="suspended"?new Promise((ut,ht)=>{const dt=()=>{this._nativeAudioContext.removeEventListener("statechange",dt),this._nativeAudioContext.state==="running"?ut():this.resume().then(ut,ht)};this._nativeAudioContext.addEventListener("statechange",dt)}):this._nativeAudioContext.resume().catch(ut=>{throw ut===void 0||ut.code===15?et():ut})}suspend(){return this._nativeAudioContext.suspend().catch(ut=>{throw ut===void 0?et():ut})}},createAudioDestinationNodeConstructor=(tt,et,nt,rt,it,ot,at,st)=>class extends tt{constructor(ct,ut){const ht=ot(ct),dt=at(ht),pt=it(ht,ut,dt),mt=dt?et(st):null;super(ct,!1,pt,mt),this._isNodeOfNativeOfflineAudioContext=dt,this._nativeAudioDestinationNode=pt}get channelCount(){return this._nativeAudioDestinationNode.channelCount}set channelCount(ct){if(this._isNodeOfNativeOfflineAudioContext)throw rt();if(ct>this._nativeAudioDestinationNode.maxChannelCount)throw nt();this._nativeAudioDestinationNode.channelCount=ct}get channelCountMode(){return this._nativeAudioDestinationNode.channelCountMode}set channelCountMode(ct){if(this._isNodeOfNativeOfflineAudioContext)throw rt();this._nativeAudioDestinationNode.channelCountMode=ct}get maxChannelCount(){return this._nativeAudioDestinationNode.maxChannelCount}},createAudioDestinationNodeRenderer=tt=>{const et=new WeakMap,nt=async(rt,it)=>{const ot=it.destination;return et.set(it,ot),await tt(rt,it,ot),ot};return{render(rt,it){const ot=et.get(it);return ot!==void 0?Promise.resolve(ot):nt(rt,it)}}},createAudioListenerFactory=(tt,et,nt,rt,it,ot,at,st)=>(lt,ct)=>{const ut=ct.listener,ht=()=>{const St=new Float32Array(1),Tt=et(ct,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:9}),At=at(ct);let Et=!1,$t=[0,0,-1,0,1,0],Dt=[0,0,0];const jt=()=>{if(Et)return;Et=!0;const It=rt(ct,256,9,0);It.onaudioprocess=({inputBuffer:Ot})=>{const Wt=[ot(Ot,St,0),ot(Ot,St,1),ot(Ot,St,2),ot(Ot,St,3),ot(Ot,St,4),ot(Ot,St,5)];Wt.some((Ft,Nt)=>Ft!==$t[Nt])&&(ut.setOrientation(...Wt),$t=Wt);const zt=[ot(Ot,St,6),ot(Ot,St,7),ot(Ot,St,8)];zt.some((Ft,Nt)=>Ft!==Dt[Nt])&&(ut.setPosition(...zt),Dt=zt)},Tt.connect(It)},Pt=It=>Ot=>{Ot!==$t[It]&&($t[It]=Ot,ut.setOrientation(...$t))},Ct=It=>Ot=>{Ot!==Dt[It]&&(Dt[It]=Ot,ut.setPosition(...Dt))},wt=(It,Ot,Wt)=>{const zt=nt(ct,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:Ot});zt.connect(Tt,0,It),zt.start(),Object.defineProperty(zt.offset,"defaultValue",{get(){return Ot}});const Ft=tt({context:lt},At,zt.offset,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT);return st(Ft,"value",Nt=>()=>Nt.call(Ft),Nt=>Ut=>{try{Nt.call(Ft,Ut)}catch(Mt){if(Mt.code!==9)throw Mt}jt(),At&&Wt(Ut)}),Ft.cancelAndHoldAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.cancelAndHoldAtTime),Ft.cancelScheduledValues=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.cancelScheduledValues),Ft.exponentialRampToValueAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.exponentialRampToValueAtTime),Ft.linearRampToValueAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.linearRampToValueAtTime),Ft.setTargetAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.setTargetAtTime),Ft.setValueAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.setValueAtTime),Ft.setValueCurveAtTime=(Nt=>At?()=>{throw it()}:(...Ut)=>{const Mt=Nt.apply(Ft,Ut);return jt(),Mt})(Ft.setValueCurveAtTime),Ft};return{forwardX:wt(0,0,Pt(0)),forwardY:wt(1,0,Pt(1)),forwardZ:wt(2,-1,Pt(2)),positionX:wt(6,0,Ct(0)),positionY:wt(7,0,Ct(1)),positionZ:wt(8,0,Ct(2)),upX:wt(3,0,Pt(3)),upY:wt(4,1,Pt(4)),upZ:wt(5,0,Pt(5))}},{forwardX:dt,forwardY:pt,forwardZ:mt,positionX:gt,positionY:yt,positionZ:bt,upX:vt,upY:xt,upZ:kt}=ut.forwardX===void 0?ht():ut;return{get forwardX(){return dt},get forwardY(){return pt},get forwardZ(){return mt},get positionX(){return gt},get positionY(){return yt},get positionZ(){return bt},get upX(){return vt},get upY(){return xt},get upZ(){return kt}}},isAudioNode$1=tt=>"context"in tt,isAudioNodeOutputConnection=tt=>isAudioNode$1(tt[0]),insertElementInSet=(tt,et,nt,rt)=>{for(const it of tt)if(nt(it)){if(rt)return!1;throw Error("The set contains at least one similar element.")}return tt.add(et),!0},addActiveInputConnectionToAudioParam=(tt,et,[nt,rt],it)=>{insertElementInSet(tt,[et,nt,rt],ot=>ot[0]===et&&ot[1]===nt,it)},addPassiveInputConnectionToAudioParam=(tt,[et,nt,rt],it)=>{const ot=tt.get(et);ot===void 0?tt.set(et,new Set([[nt,rt]])):insertElementInSet(ot,[nt,rt],at=>at[0]===nt,it)},isNativeAudioNodeFaker=tt=>"inputs"in tt,connectNativeAudioNodeToNativeAudioNode=(tt,et,nt,rt)=>{if(isNativeAudioNodeFaker(et)){const it=et.inputs[rt];return tt.connect(it,nt,0),[it,nt,0]}return tt.connect(et,nt,rt),[et,nt,rt]},deleteActiveInputConnection=(tt,et,nt)=>{for(const rt of tt)if(rt[0]===et&&rt[1]===nt)return tt.delete(rt),rt;return null},deleteActiveInputConnectionToAudioParam=(tt,et,nt)=>pickElementFromSet(tt,rt=>rt[0]===et&&rt[1]===nt),deleteEventListenerOfAudioNode=(tt,et)=>{if(!getEventListenersOfAudioNode(tt).delete(et))throw new Error("Missing the expected event listener.")},deletePassiveInputConnectionToAudioParam=(tt,et,nt)=>{const rt=getValueForKey(tt,et),it=pickElementFromSet(rt,ot=>ot[0]===nt);return rt.size===0&&tt.delete(et),it},disconnectNativeAudioNodeFromNativeAudioNode=(tt,et,nt,rt)=>{isNativeAudioNodeFaker(et)?tt.disconnect(et.inputs[rt],nt,0):tt.disconnect(et,nt,rt)},getNativeAudioNode=tt=>getValueForKey(AUDIO_NODE_STORE,tt),getNativeAudioParam=tt=>getValueForKey(AUDIO_PARAM_STORE,tt),isPartOfACycle=tt=>CYCLE_COUNTERS.has(tt),isPassiveAudioNode=tt=>!ACTIVE_AUDIO_NODE_STORE.has(tt),testAudioNodeDisconnectMethodSupport=(tt,et)=>new Promise(nt=>{if(et!==null)nt(!0);else{const rt=tt.createScriptProcessor(256,1,1),it=tt.createGain(),ot=tt.createBuffer(1,2,44100),at=ot.getChannelData(0);at[0]=1,at[1]=1;const st=tt.createBufferSource();st.buffer=ot,st.loop=!0,st.connect(rt).connect(tt.destination),st.connect(it),st.disconnect(it),rt.onaudioprocess=lt=>{const ct=lt.inputBuffer.getChannelData(0);Array.prototype.some.call(ct,ut=>ut===1)?nt(!0):nt(!1),st.stop(),rt.onaudioprocess=null,st.disconnect(rt),rt.disconnect(tt.destination)},st.start()}}),visitEachAudioNodeOnce=(tt,et)=>{const nt=new Map;for(const rt of tt)for(const it of rt){const ot=nt.get(it);nt.set(it,ot===void 0?1:ot+1)}nt.forEach((rt,it)=>et(it,rt))},isNativeAudioNode$1=tt=>"context"in tt,wrapAudioNodeDisconnectMethod=tt=>{const et=new Map;tt.connect=(nt=>(rt,it=0,ot=0)=>{const at=isNativeAudioNode$1(rt)?nt(rt,it,ot):nt(rt,it),st=et.get(rt);return st===void 0?et.set(rt,[{input:ot,output:it}]):st.every(lt=>lt.input!==ot||lt.output!==it)&&st.push({input:ot,output:it}),at})(tt.connect.bind(tt)),tt.disconnect=(nt=>(rt,it,ot)=>{if(nt.apply(tt),rt===void 0)et.clear();else if(typeof rt=="number")for(const[at,st]of et){const lt=st.filter(ct=>ct.output!==rt);lt.length===0?et.delete(at):et.set(at,lt)}else if(et.has(rt))if(it===void 0)et.delete(rt);else{const at=et.get(rt);if(at!==void 0){const st=at.filter(lt=>lt.output!==it&&(lt.input!==ot||ot===void 0));st.length===0?et.delete(rt):et.set(rt,st)}}for(const[at,st]of et)st.forEach(lt=>{isNativeAudioNode$1(at)?tt.connect(at,lt.output,lt.input):tt.connect(at,lt.output)})})(tt.disconnect)},addConnectionToAudioParamOfAudioContext=(tt,et,nt,rt)=>{const{activeInputs:it,passiveInputs:ot}=getAudioParamConnections(et),{outputs:at}=getAudioNodeConnections(tt),st=getEventListenersOfAudioNode(tt),lt=ct=>{const ut=getNativeAudioNode(tt),ht=getNativeAudioParam(et);if(ct){const dt=deletePassiveInputConnectionToAudioParam(ot,tt,nt);addActiveInputConnectionToAudioParam(it,tt,dt,!1),!rt&&!isPartOfACycle(tt)&&ut.connect(ht,nt)}else{const dt=deleteActiveInputConnectionToAudioParam(it,tt,nt);addPassiveInputConnectionToAudioParam(ot,dt,!1),!rt&&!isPartOfACycle(tt)&&ut.disconnect(ht,nt)}};return insertElementInSet(at,[et,nt],ct=>ct[0]===et&&ct[1]===nt,!0)?(st.add(lt),isActiveAudioNode(tt)?addActiveInputConnectionToAudioParam(it,tt,[nt,lt],!0):addPassiveInputConnectionToAudioParam(ot,[tt,nt,lt],!0),!0):!1},deleteInputConnectionOfAudioNode=(tt,et,nt,rt)=>{const{activeInputs:it,passiveInputs:ot}=getAudioNodeConnections(et),at=deleteActiveInputConnection(it[rt],tt,nt);return at===null?[deletePassiveInputConnectionToAudioNode(ot,tt,nt,rt)[2],!1]:[at[2],!0]},deleteInputConnectionOfAudioParam=(tt,et,nt)=>{const{activeInputs:rt,passiveInputs:it}=getAudioParamConnections(et),ot=deleteActiveInputConnection(rt,tt,nt);return ot===null?[deletePassiveInputConnectionToAudioParam(it,tt,nt)[1],!1]:[ot[2],!0]},deleteInputsOfAudioNode=(tt,et,nt,rt,it)=>{const[ot,at]=deleteInputConnectionOfAudioNode(tt,nt,rt,it);if(ot!==null&&(deleteEventListenerOfAudioNode(tt,ot),at&&!et&&!isPartOfACycle(tt)&&disconnectNativeAudioNodeFromNativeAudioNode(getNativeAudioNode(tt),getNativeAudioNode(nt),rt,it)),isActiveAudioNode(nt)){const{activeInputs:st}=getAudioNodeConnections(nt);setInternalStateToPassiveWhenNecessary(nt,st)}},deleteInputsOfAudioParam=(tt,et,nt,rt)=>{const[it,ot]=deleteInputConnectionOfAudioParam(tt,nt,rt);it!==null&&(deleteEventListenerOfAudioNode(tt,it),ot&&!et&&!isPartOfACycle(tt)&&getNativeAudioNode(tt).disconnect(getNativeAudioParam(nt),rt))},deleteAnyConnection=(tt,et)=>{const nt=getAudioNodeConnections(tt),rt=[];for(const it of nt.outputs)isAudioNodeOutputConnection(it)?deleteInputsOfAudioNode(tt,et,...it):deleteInputsOfAudioParam(tt,et,...it),rt.push(it[0]);return nt.outputs.clear(),rt},deleteConnectionAtOutput=(tt,et,nt)=>{const rt=getAudioNodeConnections(tt),it=[];for(const ot of rt.outputs)ot[1]===nt&&(isAudioNodeOutputConnection(ot)?deleteInputsOfAudioNode(tt,et,...ot):deleteInputsOfAudioParam(tt,et,...ot),it.push(ot[0]),rt.outputs.delete(ot));return it},deleteConnectionToDestination=(tt,et,nt,rt,it)=>{const ot=getAudioNodeConnections(tt);return Array.from(ot.outputs).filter(at=>at[0]===nt&&(rt===void 0||at[1]===rt)&&(it===void 0||at[2]===it)).map(at=>(isAudioNodeOutputConnection(at)?deleteInputsOfAudioNode(tt,et,...at):deleteInputsOfAudioParam(tt,et,...at),ot.outputs.delete(at),at[0]))},createAudioNodeConstructor=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt,pt,mt,gt)=>class extends ct{constructor(bt,vt,xt,kt){super(xt),this._context=bt,this._nativeAudioNode=xt;const St=ut(bt);ht(St)&&nt(testAudioNodeDisconnectMethodSupport,()=>testAudioNodeDisconnectMethodSupport(St,gt))!==!0&&wrapAudioNodeDisconnectMethod(xt),AUDIO_NODE_STORE.set(this,xt),EVENT_LISTENERS.set(this,new Set),bt.state!=="closed"&&vt&&setInternalStateToActive(this),tt(this,kt,xt)}get channelCount(){return this._nativeAudioNode.channelCount}set channelCount(bt){this._nativeAudioNode.channelCount=bt}get channelCountMode(){return this._nativeAudioNode.channelCountMode}set channelCountMode(bt){this._nativeAudioNode.channelCountMode=bt}get channelInterpretation(){return this._nativeAudioNode.channelInterpretation}set channelInterpretation(bt){this._nativeAudioNode.channelInterpretation=bt}get context(){return this._context}get numberOfInputs(){return this._nativeAudioNode.numberOfInputs}get numberOfOutputs(){return this._nativeAudioNode.numberOfOutputs}connect(bt,vt=0,xt=0){if(vt<0||vt>=this._nativeAudioNode.numberOfOutputs)throw it();const kt=ut(this._context),St=mt(kt);if(dt(bt)||pt(bt))throw ot();if(isAudioNode$1(bt)){const Et=getNativeAudioNode(bt);try{const Dt=connectNativeAudioNodeToNativeAudioNode(this._nativeAudioNode,Et,vt,xt),jt=isPassiveAudioNode(this);(St||jt)&&this._nativeAudioNode.disconnect(...Dt),this.context.state!=="closed"&&!jt&&isPassiveAudioNode(bt)&&setInternalStateToActive(bt)}catch(Dt){throw Dt.code===12?ot():Dt}if(et(this,bt,vt,xt,St)){const Dt=lt([this],bt);visitEachAudioNodeOnce(Dt,rt(St))}return bt}const Tt=getNativeAudioParam(bt);if(Tt.name==="playbackRate"&&Tt.maxValue===1024)throw at();try{this._nativeAudioNode.connect(Tt,vt),(St||isPassiveAudioNode(this))&&this._nativeAudioNode.disconnect(Tt,vt)}catch(Et){throw Et.code===12?ot():Et}if(addConnectionToAudioParamOfAudioContext(this,bt,vt,St)){const Et=lt([this],bt);visitEachAudioNodeOnce(Et,rt(St))}}disconnect(bt,vt,xt){let kt;const St=ut(this._context),Tt=mt(St);if(bt===void 0)kt=deleteAnyConnection(this,Tt);else if(typeof bt=="number"){if(bt<0||bt>=this.numberOfOutputs)throw it();kt=deleteConnectionAtOutput(this,Tt,bt)}else{if(vt!==void 0&&(vt<0||vt>=this.numberOfOutputs)||isAudioNode$1(bt)&&xt!==void 0&&(xt<0||xt>=bt.numberOfInputs))throw it();if(kt=deleteConnectionToDestination(this,Tt,bt,vt,xt),kt.length===0)throw ot()}for(const At of kt){const Et=lt([this],At);visitEachAudioNodeOnce(Et,st)}}},createAudioParamFactory=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt)=>(pt,mt,gt,yt=null,bt=null)=>{const vt=gt.value,xt=new AutomationEventList(vt),kt=mt?rt(xt):null,St={get defaultValue(){return vt},get maxValue(){return yt===null?gt.maxValue:yt},get minValue(){return bt===null?gt.minValue:bt},get value(){return gt.value},set value(Tt){gt.value=Tt,St.setValueAtTime(Tt,pt.context.currentTime)},cancelAndHoldAtTime(Tt){if(typeof gt.cancelAndHoldAtTime=="function")kt===null&&xt.flush(pt.context.currentTime),xt.add(it(Tt)),gt.cancelAndHoldAtTime(Tt);else{const At=Array.from(xt).pop();kt===null&&xt.flush(pt.context.currentTime),xt.add(it(Tt));const Et=Array.from(xt).pop();gt.cancelScheduledValues(Tt),At!==Et&&Et!==void 0&&(Et.type==="exponentialRampToValue"?gt.exponentialRampToValueAtTime(Et.value,Et.endTime):Et.type==="linearRampToValue"?gt.linearRampToValueAtTime(Et.value,Et.endTime):Et.type==="setValue"?gt.setValueAtTime(Et.value,Et.startTime):Et.type==="setValueCurve"&>.setValueCurveAtTime(Et.values,Et.startTime,Et.duration))}return St},cancelScheduledValues(Tt){return kt===null&&xt.flush(pt.context.currentTime),xt.add(ot(Tt)),gt.cancelScheduledValues(Tt),St},exponentialRampToValueAtTime(Tt,At){if(Tt===0)throw new RangeError;if(!Number.isFinite(At)||At<0)throw new RangeError;const Et=pt.context.currentTime;return kt===null&&xt.flush(Et),Array.from(xt).length===0&&(xt.add(ct(vt,Et)),gt.setValueAtTime(vt,Et)),xt.add(at(Tt,At)),gt.exponentialRampToValueAtTime(Tt,At),St},linearRampToValueAtTime(Tt,At){const Et=pt.context.currentTime;return kt===null&&xt.flush(Et),Array.from(xt).length===0&&(xt.add(ct(vt,Et)),gt.setValueAtTime(vt,Et)),xt.add(st(Tt,At)),gt.linearRampToValueAtTime(Tt,At),St},setTargetAtTime(Tt,At,Et){return kt===null&&xt.flush(pt.context.currentTime),xt.add(lt(Tt,At,Et)),gt.setTargetAtTime(Tt,At,Et),St},setValueAtTime(Tt,At){return kt===null&&xt.flush(pt.context.currentTime),xt.add(ct(Tt,At)),gt.setValueAtTime(Tt,At),St},setValueCurveAtTime(Tt,At,Et){const $t=Tt instanceof Float32Array?Tt:new Float32Array(Tt);if(ht!==null&&ht.name==="webkitAudioContext"){const Dt=At+Et,jt=pt.context.sampleRate,Pt=Math.ceil(At*jt),Ct=Math.floor(Dt*jt),wt=Ct-Pt,It=new Float32Array(wt);for(let Wt=0;Wt({replay(et){for(const nt of tt)if(nt.type==="exponentialRampToValue"){const{endTime:rt,value:it}=nt;et.exponentialRampToValueAtTime(it,rt)}else if(nt.type==="linearRampToValue"){const{endTime:rt,value:it}=nt;et.linearRampToValueAtTime(it,rt)}else if(nt.type==="setTarget"){const{startTime:rt,target:it,timeConstant:ot}=nt;et.setTargetAtTime(it,rt,ot)}else if(nt.type==="setValue"){const{startTime:rt,value:it}=nt;et.setValueAtTime(it,rt)}else if(nt.type==="setValueCurve"){const{duration:rt,startTime:it,values:ot}=nt;et.setValueCurveAtTime(ot,it,rt)}else throw new Error("Can't apply an unknown automation.")}});class ReadOnlyMap{constructor(et){this._map=new Map(et)}get size(){return this._map.size}entries(){return this._map.entries()}forEach(et,nt=null){return this._map.forEach((rt,it)=>et.call(nt,rt,it,this))}get(et){return this._map.get(et)}has(et){return this._map.has(et)}keys(){return this._map.keys()}values(){return this._map.values()}}const DEFAULT_OPTIONS$g={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,parameterData:{},processorOptions:{}},createAudioWorkletNodeConstructor=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt,pt)=>class extends et{constructor(gt,yt,bt){var vt;const xt=st(gt),kt=lt(xt),St=ut({...DEFAULT_OPTIONS$g,...bt});dt(St);const Tt=NODE_NAME_TO_PROCESSOR_CONSTRUCTOR_MAPS.get(xt),At=Tt==null?void 0:Tt.get(yt),Et=kt||xt.state!=="closed"?xt:(vt=at(xt))!==null&&vt!==void 0?vt:xt,$t=it(Et,kt?null:gt.baseLatency,ct,yt,At,St),Dt=kt?rt(yt,St,At):null;super(gt,!0,$t,Dt);const jt=[];$t.parameters.forEach((Ct,wt)=>{const It=nt(this,kt,Ct);jt.push([wt,It])}),this._nativeAudioWorkletNode=$t,this._onprocessorerror=null,this._parameters=new ReadOnlyMap(jt),kt&&tt(xt,this);const{activeInputs:Pt}=ot(this);ht($t,Pt)}get onprocessorerror(){return this._onprocessorerror}set onprocessorerror(gt){const yt=typeof gt=="function"?pt(this,gt):null;this._nativeAudioWorkletNode.onprocessorerror=yt;const bt=this._nativeAudioWorkletNode.onprocessorerror;this._onprocessorerror=bt!==null&&bt===yt?gt:bt}get parameters(){return this._parameters===null?this._nativeAudioWorkletNode.parameters:this._parameters}get port(){return this._nativeAudioWorkletNode.port}};function copyFromChannel(tt,et,nt,rt,it){if(typeof tt.copyFromChannel=="function")et[nt].byteLength===0&&(et[nt]=new Float32Array(128)),tt.copyFromChannel(et[nt],rt,it);else{const ot=tt.getChannelData(rt);if(et[nt].byteLength===0)et[nt]=ot.slice(it,it+128);else{const at=new Float32Array(ot.buffer,it*Float32Array.BYTES_PER_ELEMENT,128);et[nt].set(at)}}}const copyToChannel=(tt,et,nt,rt,it)=>{typeof tt.copyToChannel=="function"?et[nt].byteLength!==0&&tt.copyToChannel(et[nt],rt,it):et[nt].byteLength!==0&&tt.getChannelData(rt).set(et[nt],it)},createNestedArrays=(tt,et)=>{const nt=[];for(let rt=0;rt{const nt=getValueForKey(NODE_TO_PROCESSOR_MAPS,tt),rt=getNativeAudioNode(et);return getValueForKey(nt,rt)},processBuffer=async(tt,et,nt,rt,it,ot,at)=>{const st=et===null?Math.ceil(tt.context.length/128)*128:et.length,lt=rt.channelCount*rt.numberOfInputs,ct=it.reduce((yt,bt)=>yt+bt,0),ut=ct===0?null:nt.createBuffer(ct,st,nt.sampleRate);if(ot===void 0)throw new Error("Missing the processor constructor.");const ht=getAudioNodeConnections(tt),dt=await getAudioWorkletProcessor(nt,tt),pt=createNestedArrays(rt.numberOfInputs,rt.channelCount),mt=createNestedArrays(rt.numberOfOutputs,it),gt=Array.from(tt.parameters.keys()).reduce((yt,bt)=>({...yt,[bt]:new Float32Array(128)}),{});for(let yt=0;yt0&&et!==null)for(let bt=0;bt{copyFromChannel(et,gt,bt,lt+vt,yt)});for(let bt=0;btht.activeInputs[kt].size===0?[]:xt),vt=at(yt/nt.sampleRate,nt.sampleRate,()=>dt.process(bt,mt,gt));if(ut!==null)for(let xt=0,kt=0;xt(yt,bt,vt)=>{const xt=new WeakMap;let kt=null;const St=async(Tt,At)=>{let Et=ut(Tt),$t=null;const Dt=isOwnedByContext(Et,At),jt=Array.isArray(bt.outputChannelCount)?bt.outputChannelCount:Array.from(bt.outputChannelCount);if(ht===null){const Pt=jt.reduce((Ot,Wt)=>Ot+Wt,0),Ct=it(At,{channelCount:Math.max(1,Pt),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,Pt)}),wt=[];for(let Ot=0;Ot{const Ut=new dt(Ft,Math.ceil(Tt.context.length/128)*128,At.sampleRate),Mt=[],Ht=[];for(let Kt=0;Kt{const rn=ot(Ut,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:Kt.value});return await pt(Ut,Kt,rn.offset),rn})),sn=rt(Ut,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,Wt+zt)});for(let Kt=0;Ktmt(Tt,Ut,Kt))),gt(Ut)})(),At,bt,jt,vt,ct)}const Pt=await kt,Ct=nt(At,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),[wt,It,Ot]=$t;Pt!==null&&(Ct.buffer=Pt,Ct.start(0)),Ct.connect(wt);for(let Wt=0,zt=0;Wtclass extends mt{constructor(St,Tt){super(St,Tt),this._nativeContext=St,this._audioWorklet=tt===void 0?void 0:{addModule:(At,Et)=>tt(this,At,Et)}}get audioWorklet(){return this._audioWorklet}createAnalyser(){return new et(this)}createBiquadFilter(){return new it(this)}createBuffer(St,Tt,At){return new nt({length:Tt,numberOfChannels:St,sampleRate:At})}createBufferSource(){return new rt(this)}createChannelMerger(St=6){return new ot(this,{numberOfInputs:St})}createChannelSplitter(St=6){return new at(this,{numberOfOutputs:St})}createConstantSource(){return new st(this)}createConvolver(){return new lt(this)}createDelay(St=1){return new ut(this,{maxDelayTime:St})}createDynamicsCompressor(){return new ht(this)}createGain(){return new dt(this)}createIIRFilter(St,Tt){return new pt(this,{feedback:Tt,feedforward:St})}createOscillator(){return new gt(this)}createPanner(){return new yt(this)}createPeriodicWave(St,Tt,At={disableNormalization:!1}){return new bt(this,{...At,imag:Tt,real:St})}createStereoPanner(){return new vt(this)}createWaveShaper(){return new xt(this)}decodeAudioData(St,Tt,At){return ct(this._nativeContext,St).then(Et=>(typeof Tt=="function"&&Tt(Et),Et),Et=>{throw typeof At=="function"&&At(Et),Et})}},DEFAULT_OPTIONS$f={Q:1,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:350,gain:0,type:"lowpass"},createBiquadFilterNodeConstructor=(tt,et,nt,rt,it,ot,at,st)=>class extends tt{constructor(ct,ut){const ht=ot(ct),dt={...DEFAULT_OPTIONS$f,...ut},pt=it(ht,dt),mt=at(ht),gt=mt?nt():null;super(ct,!1,pt,gt),this._Q=et(this,mt,pt.Q,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._detune=et(this,mt,pt.detune,1200*Math.log2(MOST_POSITIVE_SINGLE_FLOAT),-1200*Math.log2(MOST_POSITIVE_SINGLE_FLOAT)),this._frequency=et(this,mt,pt.frequency,ct.sampleRate/2,0),this._gain=et(this,mt,pt.gain,40*Math.log10(MOST_POSITIVE_SINGLE_FLOAT),MOST_NEGATIVE_SINGLE_FLOAT),this._nativeBiquadFilterNode=pt,st(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(ct){this._nativeBiquadFilterNode.type=ct}getFrequencyResponse(ct,ut,ht){try{this._nativeBiquadFilterNode.getFrequencyResponse(ct,ut,ht)}catch(dt){throw dt.code===11?rt():dt}if(ct.length!==ut.length||ut.length!==ht.length)throw rt()}},createBiquadFilterNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap,at=async(st,lt)=>{let ct=nt(st);const ut=isOwnedByContext(ct,lt);if(!ut){const ht={Q:ct.Q.value,channelCount:ct.channelCount,channelCountMode:ct.channelCountMode,channelInterpretation:ct.channelInterpretation,detune:ct.detune.value,frequency:ct.frequency.value,gain:ct.gain.value,type:ct.type};ct=et(lt,ht)}return ot.set(lt,ct),ut?(await tt(lt,st.Q,ct.Q),await tt(lt,st.detune,ct.detune),await tt(lt,st.frequency,ct.frequency),await tt(lt,st.gain,ct.gain)):(await rt(lt,st.Q,ct.Q),await rt(lt,st.detune,ct.detune),await rt(lt,st.frequency,ct.frequency),await rt(lt,st.gain,ct.gain)),await it(st,lt,ct),ct};return{render(st,lt){const ct=ot.get(lt);return ct!==void 0?Promise.resolve(ct):at(st,lt)}}},createCacheTestResult=(tt,et)=>(nt,rt)=>{const it=et.get(nt);if(it!==void 0)return it;const ot=tt.get(nt);if(ot!==void 0)return ot;try{const at=rt();return at instanceof Promise?(tt.set(nt,at),at.catch(()=>!1).then(st=>(tt.delete(nt),et.set(nt,st),st))):(et.set(nt,at),at)}catch{return et.set(nt,!1),!1}},DEFAULT_OPTIONS$e={channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6},createChannelMergerNodeConstructor=(tt,et,nt,rt,it)=>class extends tt{constructor(at,st){const lt=rt(at),ct={...DEFAULT_OPTIONS$e,...st},ut=nt(lt,ct),ht=it(lt)?et():null;super(at,!1,ut,ht)}},createChannelMergerNodeRendererFactory=(tt,et,nt)=>()=>{const rt=new WeakMap,it=async(ot,at)=>{let st=et(ot);if(!isOwnedByContext(st,at)){const ct={channelCount:st.channelCount,channelCountMode:st.channelCountMode,channelInterpretation:st.channelInterpretation,numberOfInputs:st.numberOfInputs};st=tt(at,ct)}return rt.set(at,st),await nt(ot,at,st),st};return{render(ot,at){const st=rt.get(at);return st!==void 0?Promise.resolve(st):it(ot,at)}}},DEFAULT_OPTIONS$d={channelCount:6,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:6},createChannelSplitterNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=rt(st),ut=ot({...DEFAULT_OPTIONS$d,...lt}),ht=nt(ct,ut),dt=it(ct)?et():null;super(st,!1,ht,dt)}},createChannelSplitterNodeRendererFactory=(tt,et,nt)=>()=>{const rt=new WeakMap,it=async(ot,at)=>{let st=et(ot);if(!isOwnedByContext(st,at)){const ct={channelCount:st.channelCount,channelCountMode:st.channelCountMode,channelInterpretation:st.channelInterpretation,numberOfOutputs:st.numberOfOutputs};st=tt(at,ct)}return rt.set(at,st),await nt(ot,at,st),st};return{render(ot,at){const st=rt.get(at);return st!==void 0?Promise.resolve(st):it(ot,at)}}},createConnectAudioParam=tt=>(et,nt,rt)=>tt(nt,et,rt),createConnectMultipleOutputs=tt=>(et,nt,rt=0,it=0)=>{const ot=et[rt];if(ot===void 0)throw tt();return isNativeAudioNode$1(nt)?ot.connect(nt,0,it):ot.connect(nt,0)},createConnectedNativeAudioBufferSourceNodeFactory=tt=>(et,nt)=>{const rt=tt(et,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),it=et.createBuffer(1,2,44100);return rt.buffer=it,rt.loop=!0,rt.connect(nt),rt.start(),()=>{rt.stop(),rt.disconnect(nt)}},DEFAULT_OPTIONS$c={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",offset:1},createConstantSourceNodeConstructor=(tt,et,nt,rt,it,ot,at)=>class extends tt{constructor(lt,ct){const ut=it(lt),ht={...DEFAULT_OPTIONS$c,...ct},dt=rt(ut,ht),pt=ot(ut),mt=pt?nt():null;super(lt,!1,dt,mt),this._constantSourceNodeRenderer=mt,this._nativeConstantSourceNode=dt,this._offset=et(this,pt,dt.offset,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._onended=null}get offset(){return this._offset}get onended(){return this._onended}set onended(lt){const ct=typeof lt=="function"?at(this,lt):null;this._nativeConstantSourceNode.onended=ct;const ut=this._nativeConstantSourceNode.onended;this._onended=ut!==null&&ut===ct?lt:ut}start(lt=0){if(this._nativeConstantSourceNode.start(lt),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.start=lt),this.context.state!=="closed"){setInternalStateToActive(this);const ct=()=>{this._nativeConstantSourceNode.removeEventListener("ended",ct),isActiveAudioNode(this)&&setInternalStateToPassive(this)};this._nativeConstantSourceNode.addEventListener("ended",ct)}}stop(lt=0){this._nativeConstantSourceNode.stop(lt),this._constantSourceNodeRenderer!==null&&(this._constantSourceNodeRenderer.stop=lt)}},createConstantSourceNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap;let at=null,st=null;const lt=async(ct,ut)=>{let ht=nt(ct);const dt=isOwnedByContext(ht,ut);if(!dt){const pt={channelCount:ht.channelCount,channelCountMode:ht.channelCountMode,channelInterpretation:ht.channelInterpretation,offset:ht.offset.value};ht=et(ut,pt),at!==null&&ht.start(at),st!==null&&ht.stop(st)}return ot.set(ut,ht),dt?await tt(ut,ct.offset,ht.offset):await rt(ut,ct.offset,ht.offset),await it(ct,ut,ht),ht};return{set start(ct){at=ct},set stop(ct){st=ct},render(ct,ut){const ht=ot.get(ut);return ht!==void 0?Promise.resolve(ht):lt(ct,ut)}}},createConvertNumberToUnsignedLong=tt=>et=>(tt[0]=et,tt[0]),DEFAULT_OPTIONS$b={buffer:null,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",disableNormalization:!1},createConvolverNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=rt(st),ut={...DEFAULT_OPTIONS$b,...lt},ht=nt(ct,ut),pt=it(ct)?et():null;super(st,!1,ht,pt),this._isBufferNullified=!1,this._nativeConvolverNode=ht,ut.buffer!==null&&ot(this,ut.buffer.duration)}get buffer(){return this._isBufferNullified?null:this._nativeConvolverNode.buffer}set buffer(st){if(this._nativeConvolverNode.buffer=st,st===null&&this._nativeConvolverNode.buffer!==null){const lt=this._nativeConvolverNode.context;this._nativeConvolverNode.buffer=lt.createBuffer(1,1,lt.sampleRate),this._isBufferNullified=!0,ot(this,0)}else this._isBufferNullified=!1,ot(this,this._nativeConvolverNode.buffer===null?0:this._nativeConvolverNode.buffer.duration)}get normalize(){return this._nativeConvolverNode.normalize}set normalize(st){this._nativeConvolverNode.normalize=st}},createConvolverNodeRendererFactory=(tt,et,nt)=>()=>{const rt=new WeakMap,it=async(ot,at)=>{let st=et(ot);if(!isOwnedByContext(st,at)){const ct={buffer:st.buffer,channelCount:st.channelCount,channelCountMode:st.channelCountMode,channelInterpretation:st.channelInterpretation,disableNormalization:!st.normalize};st=tt(at,ct)}return rt.set(at,st),isNativeAudioNodeFaker(st)?await nt(ot,at,st.inputs[0]):await nt(ot,at,st),st};return{render(ot,at){const st=rt.get(at);return st!==void 0?Promise.resolve(st):it(ot,at)}}},createCreateNativeOfflineAudioContext=(tt,et)=>(nt,rt,it)=>{if(et===null)throw new Error("Missing the native OfflineAudioContext constructor.");try{return new et(nt,rt,it)}catch(ot){throw ot.name==="SyntaxError"?tt():ot}},createDataCloneError=()=>new DOMException("","DataCloneError"),detachArrayBuffer=tt=>{const{port1:et,port2:nt}=new MessageChannel;return new Promise(rt=>{const it=()=>{nt.onmessage=null,et.close(),nt.close(),rt()};nt.onmessage=()=>it();try{et.postMessage(tt,[tt])}catch{}finally{it()}})},createDecodeAudioData=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut)=>(ht,dt)=>{const pt=at(ht)?ht:ot(ht);if(it.has(dt)){const mt=nt();return Promise.reject(mt)}try{it.add(dt)}catch{}return et(lt,()=>lt(pt))?pt.decodeAudioData(dt).then(mt=>(detachArrayBuffer(dt).catch(()=>{}),et(st,()=>st(mt))||ut(mt),tt.add(mt),mt)):new Promise((mt,gt)=>{const yt=async()=>{try{await detachArrayBuffer(dt)}catch{}},bt=vt=>{gt(vt),yt()};try{pt.decodeAudioData(dt,vt=>{typeof vt.copyFromChannel!="function"&&(ct(vt),wrapAudioBufferGetChannelDataMethod(vt)),tt.add(vt),yt().then(()=>mt(vt))},vt=>{bt(vt===null?rt():vt)})}catch(vt){bt(vt)}})},createDecrementCycleCounter=(tt,et,nt,rt,it,ot,at,st)=>(lt,ct)=>{const ut=et.get(lt);if(ut===void 0)throw new Error("Missing the expected cycle count.");const ht=ot(lt.context),dt=st(ht);if(ut===ct){if(et.delete(lt),!dt&&at(lt)){const pt=rt(lt),{outputs:mt}=nt(lt);for(const gt of mt)if(isAudioNodeOutputConnection(gt)){const yt=rt(gt[0]);tt(pt,yt,gt[1],gt[2])}else{const yt=it(gt[0]);pt.connect(yt,gt[1])}}}else et.set(lt,ut-ct)},DEFAULT_OPTIONS$a={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",delayTime:0,maxDelayTime:1},createDelayNodeConstructor=(tt,et,nt,rt,it,ot,at)=>class extends tt{constructor(lt,ct){const ut=it(lt),ht={...DEFAULT_OPTIONS$a,...ct},dt=rt(ut,ht),pt=ot(ut),mt=pt?nt(ht.maxDelayTime):null;super(lt,!1,dt,mt),this._delayTime=et(this,pt,dt.delayTime),at(this,ht.maxDelayTime)}get delayTime(){return this._delayTime}},createDelayNodeRendererFactory=(tt,et,nt,rt,it)=>ot=>{const at=new WeakMap,st=async(lt,ct)=>{let ut=nt(lt);const ht=isOwnedByContext(ut,ct);if(!ht){const dt={channelCount:ut.channelCount,channelCountMode:ut.channelCountMode,channelInterpretation:ut.channelInterpretation,delayTime:ut.delayTime.value,maxDelayTime:ot};ut=et(ct,dt)}return at.set(ct,ut),ht?await tt(ct,lt.delayTime,ut.delayTime):await rt(ct,lt.delayTime,ut.delayTime),await it(lt,ct,ut),ut};return{render(lt,ct){const ut=at.get(ct);return ut!==void 0?Promise.resolve(ut):st(lt,ct)}}},createDeleteActiveInputConnectionToAudioNode=tt=>(et,nt,rt,it)=>tt(et[it],ot=>ot[0]===nt&&ot[1]===rt),createDeleteUnrenderedAudioWorkletNode=tt=>(et,nt)=>{tt(et).delete(nt)},isDelayNode=tt=>"delayTime"in tt,createDetectCycles=(tt,et,nt)=>function rt(it,ot){const at=isAudioNode$1(ot)?ot:nt(tt,ot);if(isDelayNode(at))return[];if(it[0]===at)return[it];if(it.includes(at))return[];const{outputs:st}=et(at);return Array.from(st).map(lt=>rt([...it,at],lt[0])).reduce((lt,ct)=>lt.concat(ct),[])},getOutputAudioNodeAtIndex=(tt,et,nt)=>{const rt=et[nt];if(rt===void 0)throw tt();return rt},createDisconnectMultipleOutputs=tt=>(et,nt=void 0,rt=void 0,it=0)=>nt===void 0?et.forEach(ot=>ot.disconnect()):typeof nt=="number"?getOutputAudioNodeAtIndex(tt,et,nt).disconnect():isNativeAudioNode$1(nt)?rt===void 0?et.forEach(ot=>ot.disconnect(nt)):it===void 0?getOutputAudioNodeAtIndex(tt,et,rt).disconnect(nt,0):getOutputAudioNodeAtIndex(tt,et,rt).disconnect(nt,0,it):rt===void 0?et.forEach(ot=>ot.disconnect(nt)):getOutputAudioNodeAtIndex(tt,et,rt).disconnect(nt,0),DEFAULT_OPTIONS$9={attack:.003,channelCount:2,channelCountMode:"clamped-max",channelInterpretation:"speakers",knee:30,ratio:12,release:.25,threshold:-24},createDynamicsCompressorNodeConstructor=(tt,et,nt,rt,it,ot,at,st)=>class extends tt{constructor(ct,ut){const ht=ot(ct),dt={...DEFAULT_OPTIONS$9,...ut},pt=rt(ht,dt),mt=at(ht),gt=mt?nt():null;super(ct,!1,pt,gt),this._attack=et(this,mt,pt.attack),this._knee=et(this,mt,pt.knee),this._nativeDynamicsCompressorNode=pt,this._ratio=et(this,mt,pt.ratio),this._release=et(this,mt,pt.release),this._threshold=et(this,mt,pt.threshold),st(this,.006)}get attack(){return this._attack}get channelCount(){return this._nativeDynamicsCompressorNode.channelCount}set channelCount(ct){const ut=this._nativeDynamicsCompressorNode.channelCount;if(this._nativeDynamicsCompressorNode.channelCount=ct,ct>2)throw this._nativeDynamicsCompressorNode.channelCount=ut,it()}get channelCountMode(){return this._nativeDynamicsCompressorNode.channelCountMode}set channelCountMode(ct){const ut=this._nativeDynamicsCompressorNode.channelCountMode;if(this._nativeDynamicsCompressorNode.channelCountMode=ct,ct==="max")throw this._nativeDynamicsCompressorNode.channelCountMode=ut,it()}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}},createDynamicsCompressorNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap,at=async(st,lt)=>{let ct=nt(st);const ut=isOwnedByContext(ct,lt);if(!ut){const ht={attack:ct.attack.value,channelCount:ct.channelCount,channelCountMode:ct.channelCountMode,channelInterpretation:ct.channelInterpretation,knee:ct.knee.value,ratio:ct.ratio.value,release:ct.release.value,threshold:ct.threshold.value};ct=et(lt,ht)}return ot.set(lt,ct),ut?(await tt(lt,st.attack,ct.attack),await tt(lt,st.knee,ct.knee),await tt(lt,st.ratio,ct.ratio),await tt(lt,st.release,ct.release),await tt(lt,st.threshold,ct.threshold)):(await rt(lt,st.attack,ct.attack),await rt(lt,st.knee,ct.knee),await rt(lt,st.ratio,ct.ratio),await rt(lt,st.release,ct.release),await rt(lt,st.threshold,ct.threshold)),await it(st,lt,ct),ct};return{render(st,lt){const ct=ot.get(lt);return ct!==void 0?Promise.resolve(ct):at(st,lt)}}},createEncodingError=()=>new DOMException("","EncodingError"),createEvaluateSource=tt=>et=>new Promise((nt,rt)=>{if(tt===null){rt(new SyntaxError);return}const it=tt.document.head;if(it===null)rt(new SyntaxError);else{const ot=tt.document.createElement("script"),at=new Blob([et],{type:"application/javascript"}),st=URL.createObjectURL(at),lt=tt.onerror,ct=()=>{tt.onerror=lt,URL.revokeObjectURL(st)};tt.onerror=(ut,ht,dt,pt,mt)=>{if(ht===st||ht===tt.location.href&&dt===1&&pt===1)return ct(),rt(mt),!1;if(lt!==null)return lt(ut,ht,dt,pt,mt)},ot.onerror=()=>{ct(),rt(new SyntaxError)},ot.onload=()=>{ct(),nt()},ot.src=st,ot.type="module",it.appendChild(ot)}}),createEventTargetConstructor=tt=>class{constructor(nt){this._nativeEventTarget=nt,this._listeners=new WeakMap}addEventListener(nt,rt,it){if(rt!==null){let ot=this._listeners.get(rt);ot===void 0&&(ot=tt(this,rt),typeof rt=="function"&&this._listeners.set(rt,ot)),this._nativeEventTarget.addEventListener(nt,ot,it)}}dispatchEvent(nt){return this._nativeEventTarget.dispatchEvent(nt)}removeEventListener(nt,rt,it){const ot=rt===null?void 0:this._listeners.get(rt);this._nativeEventTarget.removeEventListener(nt,ot===void 0?null:ot,it)}},createExposeCurrentFrameAndCurrentTime=tt=>(et,nt,rt)=>{Object.defineProperties(tt,{currentFrame:{configurable:!0,get(){return Math.round(et*nt)}},currentTime:{configurable:!0,get(){return et}}});try{return rt()}finally{tt!==null&&(delete tt.currentFrame,delete tt.currentTime)}},createFetchSource=tt=>async et=>{try{const nt=await fetch(et);if(nt.ok)return[await nt.text(),nt.url]}catch{}throw tt()},DEFAULT_OPTIONS$8={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",gain:1},createGainNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=it(st),ut={...DEFAULT_OPTIONS$8,...lt},ht=rt(ct,ut),dt=ot(ct),pt=dt?nt():null;super(st,!1,ht,pt),this._gain=et(this,dt,ht.gain,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT)}get gain(){return this._gain}},createGainNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap,at=async(st,lt)=>{let ct=nt(st);const ut=isOwnedByContext(ct,lt);if(!ut){const ht={channelCount:ct.channelCount,channelCountMode:ct.channelCountMode,channelInterpretation:ct.channelInterpretation,gain:ct.gain.value};ct=et(lt,ht)}return ot.set(lt,ct),ut?await tt(lt,st.gain,ct.gain):await rt(lt,st.gain,ct.gain),await it(st,lt,ct),ct};return{render(st,lt){const ct=ot.get(lt);return ct!==void 0?Promise.resolve(ct):at(st,lt)}}},createGetActiveAudioWorkletNodeInputs=(tt,et)=>nt=>et(tt,nt),createGetAudioNodeRenderer=tt=>et=>{const nt=tt(et);if(nt.renderer===null)throw new Error("Missing the renderer of the given AudioNode in the audio graph.");return nt.renderer},createGetAudioNodeTailTime=tt=>et=>{var nt;return(nt=tt.get(et))!==null&&nt!==void 0?nt:0},createGetAudioParamRenderer=tt=>et=>{const nt=tt(et);if(nt.renderer===null)throw new Error("Missing the renderer of the given AudioParam in the audio graph.");return nt.renderer},createGetBackupOfflineAudioContext=tt=>et=>tt.get(et),createInvalidStateError=()=>new DOMException("","InvalidStateError"),createGetNativeContext=tt=>et=>{const nt=tt.get(et);if(nt===void 0)throw createInvalidStateError();return nt},createGetOrCreateBackupOfflineAudioContext=(tt,et)=>nt=>{let rt=tt.get(nt);if(rt!==void 0)return rt;if(et===null)throw new Error("Missing the native OfflineAudioContext constructor.");return rt=new et(1,1,44100),tt.set(nt,rt),rt},createGetUnrenderedAudioWorkletNodes=tt=>et=>{const nt=tt.get(et);if(nt===void 0)throw new Error("The context has no set of AudioWorkletNodes.");return nt},createInvalidAccessError=()=>new DOMException("","InvalidAccessError"),wrapIIRFilterNodeGetFrequencyResponseMethod=tt=>{tt.getFrequencyResponse=(et=>(nt,rt,it)=>{if(nt.length!==rt.length||rt.length!==it.length)throw createInvalidAccessError();return et.call(tt,nt,rt,it)})(tt.getFrequencyResponse)},DEFAULT_OPTIONS$7={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers"},createIIRFilterNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=rt(st),ut=it(ct),ht={...DEFAULT_OPTIONS$7,...lt},dt=et(ct,ut?null:st.baseLatency,ht),pt=ut?nt(ht.feedback,ht.feedforward):null;super(st,!1,dt,pt),wrapIIRFilterNodeGetFrequencyResponseMethod(dt),this._nativeIIRFilterNode=dt,ot(this,1)}getFrequencyResponse(st,lt,ct){return this._nativeIIRFilterNode.getFrequencyResponse(st,lt,ct)}},filterBuffer=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut)=>{const ht=ct.length;let dt=st;for(let pt=0;pt{const it=nt instanceof Float64Array?nt:new Float64Array(nt),ot=rt instanceof Float64Array?rt:new Float64Array(rt),at=it.length,st=ot.length,lt=Math.min(at,st);if(it[0]!==1){for(let mt=0;mt(ot,at)=>{const st=new WeakMap;let lt=null;const ct=async(ut,ht)=>{let dt=null,pt=et(ut);const mt=isOwnedByContext(pt,ht);if(ht.createIIRFilter===void 0?dt=tt(ht,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}):mt||(pt=ht.createIIRFilter(at,ot)),st.set(ht,dt===null?pt:dt),dt!==null){if(lt===null){if(nt===null)throw new Error("Missing the native OfflineAudioContext constructor.");const yt=new nt(ut.context.destination.channelCount,ut.context.length,ht.sampleRate);lt=(async()=>{await rt(ut,yt,yt.destination);const bt=await it(yt);return filterFullBuffer(bt,ht,ot,at)})()}const gt=await lt;return dt.buffer=gt,dt.start(0),dt}return await rt(ut,ht,pt),pt};return{render(ut,ht){const dt=st.get(ht);return dt!==void 0?Promise.resolve(dt):ct(ut,ht)}}},createIncrementCycleCounterFactory=(tt,et,nt,rt,it,ot)=>at=>(st,lt)=>{const ct=tt.get(st);if(ct===void 0){if(!at&&ot(st)){const ut=rt(st),{outputs:ht}=nt(st);for(const dt of ht)if(isAudioNodeOutputConnection(dt)){const pt=rt(dt[0]);et(ut,pt,dt[1],dt[2])}else{const pt=it(dt[0]);ut.disconnect(pt,dt[1])}}tt.set(st,lt)}else tt.set(st,ct+lt)},createIsAnyAudioContext=(tt,et)=>nt=>{const rt=tt.get(nt);return et(rt)||et(nt)},createIsAnyAudioNode=(tt,et)=>nt=>tt.has(nt)||et(nt),createIsAnyAudioParam=(tt,et)=>nt=>tt.has(nt)||et(nt),createIsAnyOfflineAudioContext=(tt,et)=>nt=>{const rt=tt.get(nt);return et(rt)||et(nt)},createIsNativeAudioContext=tt=>et=>tt!==null&&et instanceof tt,createIsNativeAudioNode=tt=>et=>tt!==null&&typeof tt.AudioNode=="function"&&et instanceof tt.AudioNode,createIsNativeAudioParam=tt=>et=>tt!==null&&typeof tt.AudioParam=="function"&&et instanceof tt.AudioParam,createIsNativeContext=(tt,et)=>nt=>tt(nt)||et(nt),createIsNativeOfflineAudioContext=tt=>et=>tt!==null&&et instanceof tt,createIsSecureContext=tt=>tt!==null&&tt.isSecureContext,createMediaElementAudioSourceNodeConstructor=(tt,et,nt,rt)=>class extends tt{constructor(ot,at){const st=nt(ot),lt=et(st,at);if(rt(st))throw TypeError();super(ot,!0,lt,null),this._nativeMediaElementAudioSourceNode=lt}get mediaElement(){return this._nativeMediaElementAudioSourceNode.mediaElement}},DEFAULT_OPTIONS$6={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers"},createMediaStreamAudioDestinationNodeConstructor=(tt,et,nt,rt)=>class extends tt{constructor(ot,at){const st=nt(ot);if(rt(st))throw new TypeError;const lt={...DEFAULT_OPTIONS$6,...at},ct=et(st,lt);super(ot,!1,ct,null),this._nativeMediaStreamAudioDestinationNode=ct}get stream(){return this._nativeMediaStreamAudioDestinationNode.stream}},createMediaStreamAudioSourceNodeConstructor=(tt,et,nt,rt)=>class extends tt{constructor(ot,at){const st=nt(ot),lt=et(st,at);if(rt(st))throw new TypeError;super(ot,!0,lt,null),this._nativeMediaStreamAudioSourceNode=lt}get mediaStream(){return this._nativeMediaStreamAudioSourceNode.mediaStream}},createMediaStreamTrackAudioSourceNodeConstructor=(tt,et,nt)=>class extends tt{constructor(it,ot){const at=nt(it),st=et(at,ot);super(it,!0,st,null)}},createMinimalBaseAudioContextConstructor=(tt,et,nt,rt,it,ot)=>class extends nt{constructor(st,lt){super(st),this._nativeContext=st,CONTEXT_STORE.set(this,st),rt(st)&&it.set(st,new Set),this._destination=new tt(this,lt),this._listener=et(this,st),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(st){const lt=typeof st=="function"?ot(this,st):null;this._nativeContext.onstatechange=lt;const ct=this._nativeContext.onstatechange;this._onstatechange=ct!==null&&ct===lt?st:ct}get sampleRate(){return this._nativeContext.sampleRate}get state(){return this._nativeContext.state}},testPromiseSupport=tt=>{const et=new Uint32Array([1179011410,40,1163280727,544501094,16,131073,44100,176400,1048580,1635017060,4,0]);try{const nt=tt.decodeAudioData(et.buffer,()=>{});return nt===void 0?!1:(nt.catch(()=>{}),!0)}catch{}return!1},createMonitorConnections=(tt,et)=>(nt,rt,it)=>{const ot=new Set;return nt.connect=(at=>(st,lt=0,ct=0)=>{const ut=ot.size===0;if(et(st))return at.call(nt,st,lt,ct),tt(ot,[st,lt,ct],ht=>ht[0]===st&&ht[1]===lt&&ht[2]===ct,!0),ut&&rt(),st;at.call(nt,st,lt),tt(ot,[st,lt],ht=>ht[0]===st&&ht[1]===lt,!0),ut&&rt()})(nt.connect),nt.disconnect=(at=>(st,lt,ct)=>{const ut=ot.size>0;if(st===void 0)at.apply(nt),ot.clear();else if(typeof st=="number"){at.call(nt,st);for(const dt of ot)dt[1]===st&&ot.delete(dt)}else{et(st)?at.call(nt,st,lt,ct):at.call(nt,st,lt);for(const dt of ot)dt[0]===st&&(lt===void 0||dt[1]===lt)&&(ct===void 0||dt[2]===ct)&&ot.delete(dt)}const ht=ot.size===0;ut&&ht&&it()})(nt.disconnect),nt},assignNativeAudioNodeOption=(tt,et,nt)=>{const rt=et[nt];rt!==void 0&&rt!==tt[nt]&&(tt[nt]=rt)},assignNativeAudioNodeOptions=(tt,et)=>{assignNativeAudioNodeOption(tt,et,"channelCount"),assignNativeAudioNodeOption(tt,et,"channelCountMode"),assignNativeAudioNodeOption(tt,et,"channelInterpretation")},testAnalyserNodeGetFloatTimeDomainDataMethodSupport=tt=>typeof tt.getFloatTimeDomainData=="function",wrapAnalyserNodeGetFloatTimeDomainDataMethod=tt=>{tt.getFloatTimeDomainData=et=>{const nt=new Uint8Array(et.length);tt.getByteTimeDomainData(nt);const rt=Math.max(nt.length,tt.fftSize);for(let it=0;it(nt,rt)=>{const it=nt.createAnalyser();if(assignNativeAudioNodeOptions(it,rt),!(rt.maxDecibels>rt.minDecibels))throw et();return assignNativeAudioNodeOption(it,rt,"fftSize"),assignNativeAudioNodeOption(it,rt,"maxDecibels"),assignNativeAudioNodeOption(it,rt,"minDecibels"),assignNativeAudioNodeOption(it,rt,"smoothingTimeConstant"),tt(testAnalyserNodeGetFloatTimeDomainDataMethodSupport,()=>testAnalyserNodeGetFloatTimeDomainDataMethodSupport(it))||wrapAnalyserNodeGetFloatTimeDomainDataMethod(it),it},createNativeAudioBufferConstructor=tt=>tt===null?null:tt.hasOwnProperty("AudioBuffer")?tt.AudioBuffer:null,assignNativeAudioNodeAudioParamValue=(tt,et,nt)=>{const rt=et[nt];rt!==void 0&&rt!==tt[nt].value&&(tt[nt].value=rt)},wrapAudioBufferSourceNodeStartMethodConsecutiveCalls=tt=>{tt.start=(et=>{let nt=!1;return(rt=0,it=0,ot)=>{if(nt)throw createInvalidStateError();et.call(tt,rt,it,ot),nt=!0}})(tt.start)},wrapAudioScheduledSourceNodeStartMethodNegativeParameters=tt=>{tt.start=(et=>(nt=0,rt=0,it)=>{if(typeof it=="number"&&it<0||rt<0||nt<0)throw new RangeError("The parameters can't be negative.");et.call(tt,nt,rt,it)})(tt.start)},wrapAudioScheduledSourceNodeStopMethodNegativeParameters=tt=>{tt.stop=(et=>(nt=0)=>{if(nt<0)throw new RangeError("The parameter can't be negative.");et.call(tt,nt)})(tt.stop)},createNativeAudioBufferSourceNodeFactory=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut)=>(ht,dt)=>{const pt=ht.createBufferSource();return assignNativeAudioNodeOptions(pt,dt),assignNativeAudioNodeAudioParamValue(pt,dt,"playbackRate"),assignNativeAudioNodeOption(pt,dt,"buffer"),assignNativeAudioNodeOption(pt,dt,"loop"),assignNativeAudioNodeOption(pt,dt,"loopEnd"),assignNativeAudioNodeOption(pt,dt,"loopStart"),et(nt,()=>nt(ht))||wrapAudioBufferSourceNodeStartMethodConsecutiveCalls(pt),et(rt,()=>rt(ht))||lt(pt),et(it,()=>it(ht))||ct(pt,ht),et(ot,()=>ot(ht))||wrapAudioScheduledSourceNodeStartMethodNegativeParameters(pt),et(at,()=>at(ht))||ut(pt,ht),et(st,()=>st(ht))||wrapAudioScheduledSourceNodeStopMethodNegativeParameters(pt),tt(ht,pt),pt},createNativeAudioContextConstructor=tt=>tt===null?null:tt.hasOwnProperty("AudioContext")?tt.AudioContext:tt.hasOwnProperty("webkitAudioContext")?tt.webkitAudioContext:null,createNativeAudioDestinationNodeFactory=(tt,et)=>(nt,rt,it)=>{const ot=nt.destination;if(ot.channelCount!==rt)try{ot.channelCount=rt}catch{}it&&ot.channelCountMode!=="explicit"&&(ot.channelCountMode="explicit"),ot.maxChannelCount===0&&Object.defineProperty(ot,"maxChannelCount",{value:rt});const at=tt(nt,{channelCount:rt,channelCountMode:ot.channelCountMode,channelInterpretation:ot.channelInterpretation,gain:1});return et(at,"channelCount",st=>()=>st.call(at),st=>lt=>{st.call(at,lt);try{ot.channelCount=lt}catch(ct){if(lt>ot.maxChannelCount)throw ct}}),et(at,"channelCountMode",st=>()=>st.call(at),st=>lt=>{st.call(at,lt),ot.channelCountMode=lt}),et(at,"channelInterpretation",st=>()=>st.call(at),st=>lt=>{st.call(at,lt),ot.channelInterpretation=lt}),Object.defineProperty(at,"maxChannelCount",{get:()=>ot.maxChannelCount}),at.connect(ot),at},createNativeAudioWorkletNodeConstructor=tt=>tt===null?null:tt.hasOwnProperty("AudioWorkletNode")?tt.AudioWorkletNode:null,testClonabilityOfAudioWorkletNodeOptions=tt=>{const{port1:et}=new MessageChannel;try{et.postMessage(tt)}finally{et.close()}},createNativeAudioWorkletNodeFactory=(tt,et,nt,rt,it)=>(ot,at,st,lt,ct,ut)=>{if(st!==null)try{const ht=new st(ot,lt,ut),dt=new Map;let pt=null;if(Object.defineProperties(ht,{channelCount:{get:()=>ut.channelCount,set:()=>{throw tt()}},channelCountMode:{get:()=>"explicit",set:()=>{throw tt()}},onprocessorerror:{get:()=>pt,set:mt=>{typeof pt=="function"&&ht.removeEventListener("processorerror",pt),pt=typeof mt=="function"?mt:null,typeof pt=="function"&&ht.addEventListener("processorerror",pt)}}}),ht.addEventListener=(mt=>(...gt)=>{if(gt[0]==="processorerror"){const yt=typeof gt[1]=="function"?gt[1]:typeof gt[1]=="object"&>[1]!==null&&typeof gt[1].handleEvent=="function"?gt[1].handleEvent:null;if(yt!==null){const bt=dt.get(gt[1]);bt!==void 0?gt[1]=bt:(gt[1]=vt=>{vt.type==="error"?(Object.defineProperties(vt,{type:{value:"processorerror"}}),yt(vt)):yt(new ErrorEvent(gt[0],{...vt}))},dt.set(yt,gt[1]))}}return mt.call(ht,"error",gt[1],gt[2]),mt.call(ht,...gt)})(ht.addEventListener),ht.removeEventListener=(mt=>(...gt)=>{if(gt[0]==="processorerror"){const yt=dt.get(gt[1]);yt!==void 0&&(dt.delete(gt[1]),gt[1]=yt)}return mt.call(ht,"error",gt[1],gt[2]),mt.call(ht,gt[0],gt[1],gt[2])})(ht.removeEventListener),ut.numberOfOutputs!==0){const mt=nt(ot,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return ht.connect(mt).connect(ot.destination),it(ht,()=>mt.disconnect(),()=>mt.connect(ot.destination))}return ht}catch(ht){throw ht.code===11?rt():ht}if(ct===void 0)throw rt();return testClonabilityOfAudioWorkletNodeOptions(ut),et(ot,at,ct,ut)},computeBufferSize=(tt,et)=>tt===null?512:Math.max(512,Math.min(16384,Math.pow(2,Math.round(Math.log2(tt*et))))),cloneAudioWorkletNodeOptions=tt=>new Promise((et,nt)=>{const{port1:rt,port2:it}=new MessageChannel;rt.onmessage=({data:ot})=>{rt.close(),it.close(),et(ot)},rt.onmessageerror=({data:ot})=>{rt.close(),it.close(),nt(ot)},it.postMessage(tt)}),createAudioWorkletProcessorPromise=async(tt,et)=>{const nt=await cloneAudioWorkletNodeOptions(et);return new tt(nt)},createAudioWorkletProcessor=(tt,et,nt,rt)=>{let it=NODE_TO_PROCESSOR_MAPS.get(tt);it===void 0&&(it=new WeakMap,NODE_TO_PROCESSOR_MAPS.set(tt,it));const ot=createAudioWorkletProcessorPromise(nt,rt);return it.set(et,ot),ot},createNativeAudioWorkletNodeFakerFactory=(tt,et,nt,rt,it,ot,at,st,lt,ct,ut,ht,dt)=>(pt,mt,gt,yt)=>{if(yt.numberOfInputs===0&&yt.numberOfOutputs===0)throw lt();const bt=Array.isArray(yt.outputChannelCount)?yt.outputChannelCount:Array.from(yt.outputChannelCount);if(bt.some($n=>$n<1))throw lt();if(bt.length!==yt.numberOfOutputs)throw et();if(yt.channelCountMode!=="explicit")throw lt();const vt=yt.channelCount*yt.numberOfInputs,xt=bt.reduce(($n,Nn)=>$n+Nn,0),kt=gt.parameterDescriptors===void 0?0:gt.parameterDescriptors.length;if(vt+kt>6||xt>6)throw lt();const St=new MessageChannel,Tt=[],At=[];for(let $n=0;$n$n===void 0?0:$n},maxValue:{get:()=>Nn===void 0?MOST_POSITIVE_SINGLE_FLOAT:Nn},minValue:{get:()=>Tn===void 0?MOST_NEGATIVE_SINGLE_FLOAT:Tn}}),Et.push(mn)}const $t=rt(pt,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:Math.max(1,vt+kt)}),Dt=computeBufferSize(mt,pt.sampleRate),jt=st(pt,Dt,vt+kt,Math.max(1,xt)),Pt=it(pt,{channelCount:Math.max(1,xt),channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:Math.max(1,xt)}),Ct=[];for(let $n=0;$n{const Tn=Et[Nn];return Tn.connect($t,0,vt+Nn),Tn.start(0),[$n,Tn.offset]}));$t.connect(jt);let It=yt.channelInterpretation,Ot=null;const Wt=yt.numberOfOutputs===0?[jt]:Ct,zt={get bufferSize(){return Dt},get channelCount(){return yt.channelCount},set channelCount($n){throw nt()},get channelCountMode(){return yt.channelCountMode},set channelCountMode($n){throw nt()},get channelInterpretation(){return It},set channelInterpretation($n){for(const Nn of Tt)Nn.channelInterpretation=$n;It=$n},get context(){return jt.context},get inputs(){return Tt},get numberOfInputs(){return yt.numberOfInputs},get numberOfOutputs(){return yt.numberOfOutputs},get onprocessorerror(){return Ot},set onprocessorerror($n){typeof Ot=="function"&&zt.removeEventListener("processorerror",Ot),Ot=typeof $n=="function"?$n:null,typeof Ot=="function"&&zt.addEventListener("processorerror",Ot)},get parameters(){return wt},get port(){return St.port2},addEventListener(...$n){return jt.addEventListener($n[0],$n[1],$n[2])},connect:tt.bind(null,Wt),disconnect:ct.bind(null,Wt),dispatchEvent(...$n){return jt.dispatchEvent($n[0])},removeEventListener(...$n){return jt.removeEventListener($n[0],$n[1],$n[2])}},Ft=new Map;St.port1.addEventListener=($n=>(...Nn)=>{if(Nn[0]==="message"){const Tn=typeof Nn[1]=="function"?Nn[1]:typeof Nn[1]=="object"&&Nn[1]!==null&&typeof Nn[1].handleEvent=="function"?Nn[1].handleEvent:null;if(Tn!==null){const cn=Ft.get(Nn[1]);cn!==void 0?Nn[1]=cn:(Nn[1]=mn=>{ut(pt.currentTime,pt.sampleRate,()=>Tn(mn))},Ft.set(Tn,Nn[1]))}}return $n.call(St.port1,Nn[0],Nn[1],Nn[2])})(St.port1.addEventListener),St.port1.removeEventListener=($n=>(...Nn)=>{if(Nn[0]==="message"){const Tn=Ft.get(Nn[1]);Tn!==void 0&&(Ft.delete(Nn[1]),Nn[1]=Tn)}return $n.call(St.port1,Nn[0],Nn[1],Nn[2])})(St.port1.removeEventListener);let Nt=null;Object.defineProperty(St.port1,"onmessage",{get:()=>Nt,set:$n=>{typeof Nt=="function"&&St.port1.removeEventListener("message",Nt),Nt=typeof $n=="function"?$n:null,typeof Nt=="function"&&(St.port1.addEventListener("message",Nt),St.port1.start())}}),gt.prototype.port=St.port1;let Ut=null;createAudioWorkletProcessor(pt,zt,gt,yt).then($n=>Ut=$n);const Ht=createNestedArrays(yt.numberOfInputs,yt.channelCount),en=createNestedArrays(yt.numberOfOutputs,bt),sn=gt.parameterDescriptors===void 0?[]:gt.parameterDescriptors.reduce(($n,{name:Nn})=>({...$n,[Nn]:new Float32Array(128)}),{});let Kt=!0;const rn=()=>{yt.numberOfOutputs>0&&jt.disconnect(Pt);for(let $n=0,Nn=0;$n{if(Ut!==null){const Tn=ht(zt);for(let cn=0;cn{copyFromChannel($n,sn,mn,vt+In,cn)});for(let mn=0;mn{if(Tn[wn].size>0)return nn.set(wn,Dt/128),An;const pn=nn.get(wn);return pn===void 0?[]:(An.every(kn=>kn.every(Dn=>Dn===0))&&(pn===1?nn.delete(wn):nn.set(wn,pn-1)),An)});Kt=ut(pt.currentTime+cn/pt.sampleRate,pt.sampleRate,()=>Ut.process(mn,en,sn));for(let An=0,wn=0;Anjt.connect(vn).connect(pt.destination),Qt=()=>{jt.disconnect(vn),vn.disconnect()},_n=()=>{if(Kt){Qt(),yt.numberOfOutputs>0&&jt.connect(Pt);for(let $n=0,Nn=0;$n{Kt&&(an(),rn()),hn=!1};return an(),dt(zt,_n,Pn)},createNativeBiquadFilterNode=(tt,et)=>{const nt=tt.createBiquadFilter();return assignNativeAudioNodeOptions(nt,et),assignNativeAudioNodeAudioParamValue(nt,et,"Q"),assignNativeAudioNodeAudioParamValue(nt,et,"detune"),assignNativeAudioNodeAudioParamValue(nt,et,"frequency"),assignNativeAudioNodeAudioParamValue(nt,et,"gain"),assignNativeAudioNodeOption(nt,et,"type"),nt},createNativeChannelMergerNodeFactory=(tt,et)=>(nt,rt)=>{const it=nt.createChannelMerger(rt.numberOfInputs);return tt!==null&&tt.name==="webkitAudioContext"&&et(nt,it),assignNativeAudioNodeOptions(it,rt),it},wrapChannelSplitterNode=tt=>{const et=tt.numberOfOutputs;Object.defineProperty(tt,"channelCount",{get:()=>et,set:nt=>{if(nt!==et)throw createInvalidStateError()}}),Object.defineProperty(tt,"channelCountMode",{get:()=>"explicit",set:nt=>{if(nt!=="explicit")throw createInvalidStateError()}}),Object.defineProperty(tt,"channelInterpretation",{get:()=>"discrete",set:nt=>{if(nt!=="discrete")throw createInvalidStateError()}})},createNativeChannelSplitterNode=(tt,et)=>{const nt=tt.createChannelSplitter(et.numberOfOutputs);return assignNativeAudioNodeOptions(nt,et),wrapChannelSplitterNode(nt),nt},createNativeConstantSourceNodeFactory=(tt,et,nt,rt,it)=>(ot,at)=>{if(ot.createConstantSource===void 0)return nt(ot,at);const st=ot.createConstantSource();return assignNativeAudioNodeOptions(st,at),assignNativeAudioNodeAudioParamValue(st,at,"offset"),et(rt,()=>rt(ot))||wrapAudioScheduledSourceNodeStartMethodNegativeParameters(st),et(it,()=>it(ot))||wrapAudioScheduledSourceNodeStopMethodNegativeParameters(st),tt(ot,st),st},interceptConnections=(tt,et)=>(tt.connect=et.connect.bind(et),tt.disconnect=et.disconnect.bind(et),tt),createNativeConstantSourceNodeFakerFactory=(tt,et,nt,rt)=>(it,{offset:ot,...at})=>{const st=it.createBuffer(1,2,44100),lt=et(it,{buffer:null,channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",loop:!1,loopEnd:0,loopStart:0,playbackRate:1}),ct=nt(it,{...at,gain:ot}),ut=st.getChannelData(0);ut[0]=1,ut[1]=1,lt.buffer=st,lt.loop=!0;const ht={get bufferSize(){},get channelCount(){return ct.channelCount},set channelCount(mt){ct.channelCount=mt},get channelCountMode(){return ct.channelCountMode},set channelCountMode(mt){ct.channelCountMode=mt},get channelInterpretation(){return ct.channelInterpretation},set channelInterpretation(mt){ct.channelInterpretation=mt},get context(){return ct.context},get inputs(){return[]},get numberOfInputs(){return lt.numberOfInputs},get numberOfOutputs(){return ct.numberOfOutputs},get offset(){return ct.gain},get onended(){return lt.onended},set onended(mt){lt.onended=mt},addEventListener(...mt){return lt.addEventListener(mt[0],mt[1],mt[2])},dispatchEvent(...mt){return lt.dispatchEvent(mt[0])},removeEventListener(...mt){return lt.removeEventListener(mt[0],mt[1],mt[2])},start(mt=0){lt.start.call(lt,mt)},stop(mt=0){lt.stop.call(lt,mt)}},dt=()=>lt.connect(ct),pt=()=>lt.disconnect(ct);return tt(it,lt),rt(interceptConnections(ht,ct),dt,pt)},createNativeConvolverNodeFactory=(tt,et)=>(nt,rt)=>{const it=nt.createConvolver();if(assignNativeAudioNodeOptions(it,rt),rt.disableNormalization===it.normalize&&(it.normalize=!rt.disableNormalization),assignNativeAudioNodeOption(it,rt,"buffer"),rt.channelCount>2||(et(it,"channelCount",ot=>()=>ot.call(it),ot=>at=>{if(at>2)throw tt();return ot.call(it,at)}),rt.channelCountMode==="max"))throw tt();return et(it,"channelCountMode",ot=>()=>ot.call(it),ot=>at=>{if(at==="max")throw tt();return ot.call(it,at)}),it},createNativeDelayNode=(tt,et)=>{const nt=tt.createDelay(et.maxDelayTime);return assignNativeAudioNodeOptions(nt,et),assignNativeAudioNodeAudioParamValue(nt,et,"delayTime"),nt},createNativeDynamicsCompressorNodeFactory=tt=>(et,nt)=>{const rt=et.createDynamicsCompressor();if(assignNativeAudioNodeOptions(rt,nt),nt.channelCount>2||nt.channelCountMode==="max")throw tt();return assignNativeAudioNodeAudioParamValue(rt,nt,"attack"),assignNativeAudioNodeAudioParamValue(rt,nt,"knee"),assignNativeAudioNodeAudioParamValue(rt,nt,"ratio"),assignNativeAudioNodeAudioParamValue(rt,nt,"release"),assignNativeAudioNodeAudioParamValue(rt,nt,"threshold"),rt},createNativeGainNode=(tt,et)=>{const nt=tt.createGain();return assignNativeAudioNodeOptions(nt,et),assignNativeAudioNodeAudioParamValue(nt,et,"gain"),nt},createNativeIIRFilterNodeFactory=tt=>(et,nt,rt)=>{if(et.createIIRFilter===void 0)return tt(et,nt,rt);const it=et.createIIRFilter(rt.feedforward,rt.feedback);return assignNativeAudioNodeOptions(it,rt),it};function divide$1(tt,et){const nt=et[0]*et[0]+et[1]*et[1];return[(tt[0]*et[0]+tt[1]*et[1])/nt,(tt[1]*et[0]-tt[0]*et[1])/nt]}function multiply(tt,et){return[tt[0]*et[0]-tt[1]*et[1],tt[0]*et[1]+tt[1]*et[0]]}function evaluatePolynomial(tt,et){let nt=[0,0];for(let rt=tt.length-1;rt>=0;rt-=1)nt=multiply(nt,et),nt[0]+=tt[rt];return nt}const createNativeIIRFilterNodeFakerFactory=(tt,et,nt,rt)=>(it,ot,{channelCount:at,channelCountMode:st,channelInterpretation:lt,feedback:ct,feedforward:ut})=>{const ht=computeBufferSize(ot,it.sampleRate),dt=ct instanceof Float64Array?ct:new Float64Array(ct),pt=ut instanceof Float64Array?ut:new Float64Array(ut),mt=dt.length,gt=pt.length,yt=Math.min(mt,gt);if(mt===0||mt>20)throw rt();if(dt[0]===0)throw et();if(gt===0||gt>20)throw rt();if(pt[0]===0)throw et();if(dt[0]!==1){for(let Et=0;Et{const $t=Et.inputBuffer,Dt=Et.outputBuffer,jt=$t.numberOfChannels;for(let Pt=0;Pttt.createMediaElementSource(et.mediaElement),createNativeMediaStreamAudioDestinationNode=(tt,et)=>{const nt=tt.createMediaStreamDestination();return assignNativeAudioNodeOptions(nt,et),nt.numberOfOutputs===1&&Object.defineProperty(nt,"numberOfOutputs",{get:()=>0}),nt},createNativeMediaStreamAudioSourceNode=(tt,{mediaStream:et})=>{const nt=et.getAudioTracks();nt.sort((ot,at)=>ot.idat.id?1:0);const rt=nt.slice(0,1),it=tt.createMediaStreamSource(new MediaStream(rt));return Object.defineProperty(it,"mediaStream",{value:et}),it},createNativeMediaStreamTrackAudioSourceNodeFactory=(tt,et)=>(nt,{mediaStreamTrack:rt})=>{if(typeof nt.createMediaStreamTrackSource=="function")return nt.createMediaStreamTrackSource(rt);const it=new MediaStream([rt]),ot=nt.createMediaStreamSource(it);if(rt.kind!=="audio")throw tt();if(et(nt))throw new TypeError;return ot},createNativeOfflineAudioContextConstructor=tt=>tt===null?null:tt.hasOwnProperty("OfflineAudioContext")?tt.OfflineAudioContext:tt.hasOwnProperty("webkitOfflineAudioContext")?tt.webkitOfflineAudioContext:null,createNativeOscillatorNodeFactory=(tt,et,nt,rt,it,ot)=>(at,st)=>{const lt=at.createOscillator();return assignNativeAudioNodeOptions(lt,st),assignNativeAudioNodeAudioParamValue(lt,st,"detune"),assignNativeAudioNodeAudioParamValue(lt,st,"frequency"),st.periodicWave!==void 0?lt.setPeriodicWave(st.periodicWave):assignNativeAudioNodeOption(lt,st,"type"),et(nt,()=>nt(at))||wrapAudioScheduledSourceNodeStartMethodNegativeParameters(lt),et(rt,()=>rt(at))||ot(lt,at),et(it,()=>it(at))||wrapAudioScheduledSourceNodeStopMethodNegativeParameters(lt),tt(at,lt),lt},createNativePannerNodeFactory=tt=>(et,nt)=>{const rt=et.createPanner();return rt.orientationX===void 0?tt(et,nt):(assignNativeAudioNodeOptions(rt,nt),assignNativeAudioNodeAudioParamValue(rt,nt,"orientationX"),assignNativeAudioNodeAudioParamValue(rt,nt,"orientationY"),assignNativeAudioNodeAudioParamValue(rt,nt,"orientationZ"),assignNativeAudioNodeAudioParamValue(rt,nt,"positionX"),assignNativeAudioNodeAudioParamValue(rt,nt,"positionY"),assignNativeAudioNodeAudioParamValue(rt,nt,"positionZ"),assignNativeAudioNodeOption(rt,nt,"coneInnerAngle"),assignNativeAudioNodeOption(rt,nt,"coneOuterAngle"),assignNativeAudioNodeOption(rt,nt,"coneOuterGain"),assignNativeAudioNodeOption(rt,nt,"distanceModel"),assignNativeAudioNodeOption(rt,nt,"maxDistance"),assignNativeAudioNodeOption(rt,nt,"panningModel"),assignNativeAudioNodeOption(rt,nt,"refDistance"),assignNativeAudioNodeOption(rt,nt,"rolloffFactor"),rt)},createNativePannerNodeFakerFactory=(tt,et,nt,rt,it,ot,at,st,lt,ct)=>(ut,{coneInnerAngle:ht,coneOuterAngle:dt,coneOuterGain:pt,distanceModel:mt,maxDistance:gt,orientationX:yt,orientationY:bt,orientationZ:vt,panningModel:xt,positionX:kt,positionY:St,positionZ:Tt,refDistance:At,rolloffFactor:Et,...$t})=>{const Dt=ut.createPanner();if($t.channelCount>2||$t.channelCountMode==="max")throw at();assignNativeAudioNodeOptions(Dt,$t);const jt={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},Pt=nt(ut,{...jt,channelInterpretation:"speakers",numberOfInputs:6}),Ct=rt(ut,{...$t,gain:1}),wt=rt(ut,{...jt,gain:1}),It=rt(ut,{...jt,gain:0}),Ot=rt(ut,{...jt,gain:0}),Wt=rt(ut,{...jt,gain:0}),zt=rt(ut,{...jt,gain:0}),Ft=rt(ut,{...jt,gain:0}),Nt=it(ut,256,6,1),Ut=ot(ut,{...jt,curve:new Float32Array([1,1]),oversample:"none"});let Mt=[yt,bt,vt],Ht=[kt,St,Tt];const en=new Float32Array(1);Nt.onaudioprocess=({inputBuffer:nn})=>{const hn=[lt(nn,en,0),lt(nn,en,1),lt(nn,en,2)];hn.some((an,Qt)=>an!==Mt[Qt])&&(Dt.setOrientation(...hn),Mt=hn);const vn=[lt(nn,en,3),lt(nn,en,4),lt(nn,en,5)];vn.some((an,Qt)=>an!==Ht[Qt])&&(Dt.setPosition(...vn),Ht=vn)},Object.defineProperty(It.gain,"defaultValue",{get:()=>0}),Object.defineProperty(Ot.gain,"defaultValue",{get:()=>0}),Object.defineProperty(Wt.gain,"defaultValue",{get:()=>0}),Object.defineProperty(zt.gain,"defaultValue",{get:()=>0}),Object.defineProperty(Ft.gain,"defaultValue",{get:()=>0});const sn={get bufferSize(){},get channelCount(){return Dt.channelCount},set channelCount(nn){if(nn>2)throw at();Ct.channelCount=nn,Dt.channelCount=nn},get channelCountMode(){return Dt.channelCountMode},set channelCountMode(nn){if(nn==="max")throw at();Ct.channelCountMode=nn,Dt.channelCountMode=nn},get channelInterpretation(){return Dt.channelInterpretation},set channelInterpretation(nn){Ct.channelInterpretation=nn,Dt.channelInterpretation=nn},get coneInnerAngle(){return Dt.coneInnerAngle},set coneInnerAngle(nn){Dt.coneInnerAngle=nn},get coneOuterAngle(){return Dt.coneOuterAngle},set coneOuterAngle(nn){Dt.coneOuterAngle=nn},get coneOuterGain(){return Dt.coneOuterGain},set coneOuterGain(nn){if(nn<0||nn>1)throw et();Dt.coneOuterGain=nn},get context(){return Dt.context},get distanceModel(){return Dt.distanceModel},set distanceModel(nn){Dt.distanceModel=nn},get inputs(){return[Ct]},get maxDistance(){return Dt.maxDistance},set maxDistance(nn){if(nn<0)throw new RangeError;Dt.maxDistance=nn},get numberOfInputs(){return Dt.numberOfInputs},get numberOfOutputs(){return Dt.numberOfOutputs},get orientationX(){return wt.gain},get orientationY(){return It.gain},get orientationZ(){return Ot.gain},get panningModel(){return Dt.panningModel},set panningModel(nn){Dt.panningModel=nn},get positionX(){return Wt.gain},get positionY(){return zt.gain},get positionZ(){return Ft.gain},get refDistance(){return Dt.refDistance},set refDistance(nn){if(nn<0)throw new RangeError;Dt.refDistance=nn},get rolloffFactor(){return Dt.rolloffFactor},set rolloffFactor(nn){if(nn<0)throw new RangeError;Dt.rolloffFactor=nn},addEventListener(...nn){return Ct.addEventListener(nn[0],nn[1],nn[2])},dispatchEvent(...nn){return Ct.dispatchEvent(nn[0])},removeEventListener(...nn){return Ct.removeEventListener(nn[0],nn[1],nn[2])}};ht!==sn.coneInnerAngle&&(sn.coneInnerAngle=ht),dt!==sn.coneOuterAngle&&(sn.coneOuterAngle=dt),pt!==sn.coneOuterGain&&(sn.coneOuterGain=pt),mt!==sn.distanceModel&&(sn.distanceModel=mt),gt!==sn.maxDistance&&(sn.maxDistance=gt),yt!==sn.orientationX.value&&(sn.orientationX.value=yt),bt!==sn.orientationY.value&&(sn.orientationY.value=bt),vt!==sn.orientationZ.value&&(sn.orientationZ.value=vt),xt!==sn.panningModel&&(sn.panningModel=xt),kt!==sn.positionX.value&&(sn.positionX.value=kt),St!==sn.positionY.value&&(sn.positionY.value=St),Tt!==sn.positionZ.value&&(sn.positionZ.value=Tt),At!==sn.refDistance&&(sn.refDistance=At),Et!==sn.rolloffFactor&&(sn.rolloffFactor=Et),(Mt[0]!==1||Mt[1]!==0||Mt[2]!==0)&&Dt.setOrientation(...Mt),(Ht[0]!==0||Ht[1]!==0||Ht[2]!==0)&&Dt.setPosition(...Ht);const Kt=()=>{Ct.connect(Dt),tt(Ct,Ut,0,0),Ut.connect(wt).connect(Pt,0,0),Ut.connect(It).connect(Pt,0,1),Ut.connect(Ot).connect(Pt,0,2),Ut.connect(Wt).connect(Pt,0,3),Ut.connect(zt).connect(Pt,0,4),Ut.connect(Ft).connect(Pt,0,5),Pt.connect(Nt).connect(ut.destination)},rn=()=>{Ct.disconnect(Dt),st(Ct,Ut,0,0),Ut.disconnect(wt),wt.disconnect(Pt),Ut.disconnect(It),It.disconnect(Pt),Ut.disconnect(Ot),Ot.disconnect(Pt),Ut.disconnect(Wt),Wt.disconnect(Pt),Ut.disconnect(zt),zt.disconnect(Pt),Ut.disconnect(Ft),Ft.disconnect(Pt),Pt.disconnect(Nt),Nt.disconnect(ut.destination)};return ct(interceptConnections(sn,Dt),Kt,rn)},createNativePeriodicWaveFactory=tt=>(et,{disableNormalization:nt,imag:rt,real:it})=>{const ot=rt instanceof Float32Array?rt:new Float32Array(rt),at=it instanceof Float32Array?it:new Float32Array(it),st=et.createPeriodicWave(at,ot,{disableNormalization:nt});if(Array.from(rt).length<2)throw tt();return st},createNativeScriptProcessorNode=(tt,et,nt,rt)=>tt.createScriptProcessor(et,nt,rt),createNativeStereoPannerNodeFactory=(tt,et)=>(nt,rt)=>{const it=rt.channelCountMode;if(it==="clamped-max")throw et();if(nt.createStereoPanner===void 0)return tt(nt,rt);const ot=nt.createStereoPanner();return assignNativeAudioNodeOptions(ot,rt),assignNativeAudioNodeAudioParamValue(ot,rt,"pan"),Object.defineProperty(ot,"channelCountMode",{get:()=>it,set:at=>{if(at!==it)throw et()}}),ot},createNativeStereoPannerNodeFakerFactory=(tt,et,nt,rt,it,ot)=>{const st=new Float32Array([1,1]),lt=Math.PI/2,ct={channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete"},ut={...ct,oversample:"none"},ht=(mt,gt,yt,bt)=>{const vt=new Float32Array(16385),xt=new Float32Array(16385);for(let $t=0;$t<16385;$t+=1){const Dt=$t/16384*lt;vt[$t]=Math.cos(Dt),xt[$t]=Math.sin(Dt)}const kt=nt(mt,{...ct,gain:0}),St=rt(mt,{...ut,curve:vt}),Tt=rt(mt,{...ut,curve:st}),At=nt(mt,{...ct,gain:0}),Et=rt(mt,{...ut,curve:xt});return{connectGraph(){gt.connect(kt),gt.connect(Tt.inputs===void 0?Tt:Tt.inputs[0]),gt.connect(At),Tt.connect(yt),yt.connect(St.inputs===void 0?St:St.inputs[0]),yt.connect(Et.inputs===void 0?Et:Et.inputs[0]),St.connect(kt.gain),Et.connect(At.gain),kt.connect(bt,0,0),At.connect(bt,0,1)},disconnectGraph(){gt.disconnect(kt),gt.disconnect(Tt.inputs===void 0?Tt:Tt.inputs[0]),gt.disconnect(At),Tt.disconnect(yt),yt.disconnect(St.inputs===void 0?St:St.inputs[0]),yt.disconnect(Et.inputs===void 0?Et:Et.inputs[0]),St.disconnect(kt.gain),Et.disconnect(At.gain),kt.disconnect(bt,0,0),At.disconnect(bt,0,1)}}},dt=(mt,gt,yt,bt)=>{const vt=new Float32Array(16385),xt=new Float32Array(16385),kt=new Float32Array(16385),St=new Float32Array(16385),Tt=Math.floor(16385/2);for(let Wt=0;Wt<16385;Wt+=1)if(Wt>Tt){const zt=(Wt-Tt)/(16384-Tt)*lt;vt[Wt]=Math.cos(zt),xt[Wt]=Math.sin(zt),kt[Wt]=0,St[Wt]=1}else{const zt=Wt/(16384-Tt)*lt;vt[Wt]=1,xt[Wt]=0,kt[Wt]=Math.cos(zt),St[Wt]=Math.sin(zt)}const At=et(mt,{channelCount:2,channelCountMode:"explicit",channelInterpretation:"discrete",numberOfOutputs:2}),Et=nt(mt,{...ct,gain:0}),$t=rt(mt,{...ut,curve:vt}),Dt=nt(mt,{...ct,gain:0}),jt=rt(mt,{...ut,curve:xt}),Pt=rt(mt,{...ut,curve:st}),Ct=nt(mt,{...ct,gain:0}),wt=rt(mt,{...ut,curve:kt}),It=nt(mt,{...ct,gain:0}),Ot=rt(mt,{...ut,curve:St});return{connectGraph(){gt.connect(At),gt.connect(Pt.inputs===void 0?Pt:Pt.inputs[0]),At.connect(Et,0),At.connect(Dt,0),At.connect(Ct,1),At.connect(It,1),Pt.connect(yt),yt.connect($t.inputs===void 0?$t:$t.inputs[0]),yt.connect(jt.inputs===void 0?jt:jt.inputs[0]),yt.connect(wt.inputs===void 0?wt:wt.inputs[0]),yt.connect(Ot.inputs===void 0?Ot:Ot.inputs[0]),$t.connect(Et.gain),jt.connect(Dt.gain),wt.connect(Ct.gain),Ot.connect(It.gain),Et.connect(bt,0,0),Ct.connect(bt,0,0),Dt.connect(bt,0,1),It.connect(bt,0,1)},disconnectGraph(){gt.disconnect(At),gt.disconnect(Pt.inputs===void 0?Pt:Pt.inputs[0]),At.disconnect(Et,0),At.disconnect(Dt,0),At.disconnect(Ct,1),At.disconnect(It,1),Pt.disconnect(yt),yt.disconnect($t.inputs===void 0?$t:$t.inputs[0]),yt.disconnect(jt.inputs===void 0?jt:jt.inputs[0]),yt.disconnect(wt.inputs===void 0?wt:wt.inputs[0]),yt.disconnect(Ot.inputs===void 0?Ot:Ot.inputs[0]),$t.disconnect(Et.gain),jt.disconnect(Dt.gain),wt.disconnect(Ct.gain),Ot.disconnect(It.gain),Et.disconnect(bt,0,0),Ct.disconnect(bt,0,0),Dt.disconnect(bt,0,1),It.disconnect(bt,0,1)}}},pt=(mt,gt,yt,bt,vt)=>{if(gt===1)return ht(mt,yt,bt,vt);if(gt===2)return dt(mt,yt,bt,vt);throw it()};return(mt,{channelCount:gt,channelCountMode:yt,pan:bt,...vt})=>{if(yt==="max")throw it();const xt=tt(mt,{...vt,channelCount:1,channelCountMode:yt,numberOfInputs:2}),kt=nt(mt,{...vt,channelCount:gt,channelCountMode:yt,gain:1}),St=nt(mt,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:bt});let{connectGraph:Tt,disconnectGraph:At}=pt(mt,gt,kt,St,xt);Object.defineProperty(St.gain,"defaultValue",{get:()=>0}),Object.defineProperty(St.gain,"maxValue",{get:()=>1}),Object.defineProperty(St.gain,"minValue",{get:()=>-1});const Et={get bufferSize(){},get channelCount(){return kt.channelCount},set channelCount(Pt){kt.channelCount!==Pt&&($t&&At(),{connectGraph:Tt,disconnectGraph:At}=pt(mt,Pt,kt,St,xt),$t&&Tt()),kt.channelCount=Pt},get channelCountMode(){return kt.channelCountMode},set channelCountMode(Pt){if(Pt==="clamped-max"||Pt==="max")throw it();kt.channelCountMode=Pt},get channelInterpretation(){return kt.channelInterpretation},set channelInterpretation(Pt){kt.channelInterpretation=Pt},get context(){return kt.context},get inputs(){return[kt]},get numberOfInputs(){return kt.numberOfInputs},get numberOfOutputs(){return kt.numberOfOutputs},get pan(){return St.gain},addEventListener(...Pt){return kt.addEventListener(Pt[0],Pt[1],Pt[2])},dispatchEvent(...Pt){return kt.dispatchEvent(Pt[0])},removeEventListener(...Pt){return kt.removeEventListener(Pt[0],Pt[1],Pt[2])}};let $t=!1;const Dt=()=>{Tt(),$t=!0},jt=()=>{At(),$t=!1};return ot(interceptConnections(Et,xt),Dt,jt)}},createNativeWaveShaperNodeFactory=(tt,et,nt,rt,it,ot,at)=>(st,lt)=>{const ct=st.createWaveShaper();if(ot!==null&&ot.name==="webkitAudioContext"&&st.createGain().gain.automationRate===void 0)return nt(st,lt);assignNativeAudioNodeOptions(ct,lt);const ut=lt.curve===null||lt.curve instanceof Float32Array?lt.curve:new Float32Array(lt.curve);if(ut!==null&&ut.length<2)throw et();assignNativeAudioNodeOption(ct,{curve:ut},"curve"),assignNativeAudioNodeOption(ct,lt,"oversample");let ht=null,dt=!1;return at(ct,"curve",gt=>()=>gt.call(ct),gt=>yt=>(gt.call(ct,yt),dt&&(rt(yt)&&ht===null?ht=tt(st,ct):!rt(yt)&&ht!==null&&(ht(),ht=null)),yt)),it(ct,()=>{dt=!0,rt(ct.curve)&&(ht=tt(st,ct))},()=>{dt=!1,ht!==null&&(ht(),ht=null)})},createNativeWaveShaperNodeFakerFactory=(tt,et,nt,rt,it)=>(ot,{curve:at,oversample:st,...lt})=>{const ct=ot.createWaveShaper(),ut=ot.createWaveShaper();assignNativeAudioNodeOptions(ct,lt),assignNativeAudioNodeOptions(ut,lt);const ht=nt(ot,{...lt,gain:1}),dt=nt(ot,{...lt,gain:-1}),pt=nt(ot,{...lt,gain:1}),mt=nt(ot,{...lt,gain:-1});let gt=null,yt=!1,bt=null;const vt={get bufferSize(){},get channelCount(){return ct.channelCount},set channelCount(St){ht.channelCount=St,dt.channelCount=St,ct.channelCount=St,pt.channelCount=St,ut.channelCount=St,mt.channelCount=St},get channelCountMode(){return ct.channelCountMode},set channelCountMode(St){ht.channelCountMode=St,dt.channelCountMode=St,ct.channelCountMode=St,pt.channelCountMode=St,ut.channelCountMode=St,mt.channelCountMode=St},get channelInterpretation(){return ct.channelInterpretation},set channelInterpretation(St){ht.channelInterpretation=St,dt.channelInterpretation=St,ct.channelInterpretation=St,pt.channelInterpretation=St,ut.channelInterpretation=St,mt.channelInterpretation=St},get context(){return ct.context},get curve(){return bt},set curve(St){if(St!==null&&St.length<2)throw et();if(St===null)ct.curve=St,ut.curve=St;else{const Tt=St.length,At=new Float32Array(Tt+2-Tt%2),Et=new Float32Array(Tt+2-Tt%2);At[0]=St[0],Et[0]=-St[Tt-1];const $t=Math.ceil((Tt+1)/2),Dt=(Tt+1)/2-1;for(let jt=1;jt<$t;jt+=1){const Pt=jt/$t*Dt,Ct=Math.floor(Pt),wt=Math.ceil(Pt);At[jt]=Ct===wt?St[Ct]:(1-(Pt-Ct))*St[Ct]+(1-(wt-Pt))*St[wt],Et[jt]=Ct===wt?-St[Tt-1-Ct]:-((1-(Pt-Ct))*St[Tt-1-Ct])-(1-(wt-Pt))*St[Tt-1-wt]}At[$t]=Tt%2===1?St[$t-1]:(St[$t-2]+St[$t-1])/2,ct.curve=At,ut.curve=Et}bt=St,yt&&(rt(bt)&>===null?gt=tt(ot,ht):gt!==null&&(gt(),gt=null))},get inputs(){return[ht]},get numberOfInputs(){return ct.numberOfInputs},get numberOfOutputs(){return ct.numberOfOutputs},get oversample(){return ct.oversample},set oversample(St){ct.oversample=St,ut.oversample=St},addEventListener(...St){return ht.addEventListener(St[0],St[1],St[2])},dispatchEvent(...St){return ht.dispatchEvent(St[0])},removeEventListener(...St){return ht.removeEventListener(St[0],St[1],St[2])}};at!==null&&(vt.curve=at instanceof Float32Array?at:new Float32Array(at)),st!==vt.oversample&&(vt.oversample=st);const xt=()=>{ht.connect(ct).connect(pt),ht.connect(dt).connect(ut).connect(mt).connect(pt),yt=!0,rt(bt)&&(gt=tt(ot,ht))},kt=()=>{ht.disconnect(ct),ct.disconnect(pt),ht.disconnect(dt),dt.disconnect(ut),ut.disconnect(mt),mt.disconnect(pt),yt=!1,gt!==null&&(gt(),gt=null)};return it(interceptConnections(vt,pt),xt,kt)},createNotSupportedError=()=>new DOMException("","NotSupportedError"),DEFAULT_OPTIONS$5={numberOfChannels:1},createOfflineAudioContextConstructor=(tt,et,nt,rt,it)=>class extends tt{constructor(at,st,lt){let ct;if(typeof at=="number"&&st!==void 0&<!==void 0)ct={length:st,numberOfChannels:at,sampleRate:lt};else if(typeof at=="object")ct=at;else throw new Error("The given parameters are not valid.");const{length:ut,numberOfChannels:ht,sampleRate:dt}={...DEFAULT_OPTIONS$5,...ct},pt=rt(ht,ut,dt);et(testPromiseSupport,()=>testPromiseSupport(pt))||pt.addEventListener("statechange",(()=>{let mt=0;const gt=yt=>{this._state==="running"&&(mt>0?(pt.removeEventListener("statechange",gt),yt.stopImmediatePropagation(),this._waitForThePromiseToSettle(yt)):mt+=1)};return gt})()),super(pt,ht),this._length=ut,this._nativeOfflineAudioContext=pt,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(nt()):(this._state="running",it(this.destination,this._nativeOfflineAudioContext).finally(()=>{this._state=null,deactivateAudioGraph(this)}))}_waitForThePromiseToSettle(at){this._state===null?this._nativeOfflineAudioContext.dispatchEvent(at):setTimeout(()=>this._waitForThePromiseToSettle(at))}},DEFAULT_OPTIONS$4={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",detune:0,frequency:440,periodicWave:void 0,type:"sine"},createOscillatorNodeConstructor=(tt,et,nt,rt,it,ot,at)=>class extends tt{constructor(lt,ct){const ut=it(lt),ht={...DEFAULT_OPTIONS$4,...ct},dt=nt(ut,ht),pt=ot(ut),mt=pt?rt():null,gt=lt.sampleRate/2;super(lt,!1,dt,mt),this._detune=et(this,pt,dt.detune,153600,-153600),this._frequency=et(this,pt,dt.frequency,gt,-gt),this._nativeOscillatorNode=dt,this._onended=null,this._oscillatorNodeRenderer=mt,this._oscillatorNodeRenderer!==null&&ht.periodicWave!==void 0&&(this._oscillatorNodeRenderer.periodicWave=ht.periodicWave)}get detune(){return this._detune}get frequency(){return this._frequency}get onended(){return this._onended}set onended(lt){const ct=typeof lt=="function"?at(this,lt):null;this._nativeOscillatorNode.onended=ct;const ut=this._nativeOscillatorNode.onended;this._onended=ut!==null&&ut===ct?lt:ut}get type(){return this._nativeOscillatorNode.type}set type(lt){this._nativeOscillatorNode.type=lt,this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=null)}setPeriodicWave(lt){this._nativeOscillatorNode.setPeriodicWave(lt),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.periodicWave=lt)}start(lt=0){if(this._nativeOscillatorNode.start(lt),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.start=lt),this.context.state!=="closed"){setInternalStateToActive(this);const ct=()=>{this._nativeOscillatorNode.removeEventListener("ended",ct),isActiveAudioNode(this)&&setInternalStateToPassive(this)};this._nativeOscillatorNode.addEventListener("ended",ct)}}stop(lt=0){this._nativeOscillatorNode.stop(lt),this._oscillatorNodeRenderer!==null&&(this._oscillatorNodeRenderer.stop=lt)}},createOscillatorNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap;let at=null,st=null,lt=null;const ct=async(ut,ht)=>{let dt=nt(ut);const pt=isOwnedByContext(dt,ht);if(!pt){const mt={channelCount:dt.channelCount,channelCountMode:dt.channelCountMode,channelInterpretation:dt.channelInterpretation,detune:dt.detune.value,frequency:dt.frequency.value,periodicWave:at===null?void 0:at,type:dt.type};dt=et(ht,mt),st!==null&&dt.start(st),lt!==null&&dt.stop(lt)}return ot.set(ht,dt),pt?(await tt(ht,ut.detune,dt.detune),await tt(ht,ut.frequency,dt.frequency)):(await rt(ht,ut.detune,dt.detune),await rt(ht,ut.frequency,dt.frequency)),await it(ut,ht,dt),dt};return{set periodicWave(ut){at=ut},set start(ut){st=ut},set stop(ut){lt=ut},render(ut,ht){const dt=ot.get(ht);return dt!==void 0?Promise.resolve(dt):ct(ut,ht)}}},DEFAULT_OPTIONS$3={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},createPannerNodeConstructor=(tt,et,nt,rt,it,ot,at)=>class extends tt{constructor(lt,ct){const ut=it(lt),ht={...DEFAULT_OPTIONS$3,...ct},dt=nt(ut,ht),pt=ot(ut),mt=pt?rt():null;super(lt,!1,dt,mt),this._nativePannerNode=dt,this._orientationX=et(this,pt,dt.orientationX,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._orientationY=et(this,pt,dt.orientationY,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._orientationZ=et(this,pt,dt.orientationZ,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._positionX=et(this,pt,dt.positionX,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._positionY=et(this,pt,dt.positionY,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),this._positionZ=et(this,pt,dt.positionZ,MOST_POSITIVE_SINGLE_FLOAT,MOST_NEGATIVE_SINGLE_FLOAT),at(this,1)}get coneInnerAngle(){return this._nativePannerNode.coneInnerAngle}set coneInnerAngle(lt){this._nativePannerNode.coneInnerAngle=lt}get coneOuterAngle(){return this._nativePannerNode.coneOuterAngle}set coneOuterAngle(lt){this._nativePannerNode.coneOuterAngle=lt}get coneOuterGain(){return this._nativePannerNode.coneOuterGain}set coneOuterGain(lt){this._nativePannerNode.coneOuterGain=lt}get distanceModel(){return this._nativePannerNode.distanceModel}set distanceModel(lt){this._nativePannerNode.distanceModel=lt}get maxDistance(){return this._nativePannerNode.maxDistance}set maxDistance(lt){this._nativePannerNode.maxDistance=lt}get orientationX(){return this._orientationX}get orientationY(){return this._orientationY}get orientationZ(){return this._orientationZ}get panningModel(){return this._nativePannerNode.panningModel}set panningModel(lt){this._nativePannerNode.panningModel=lt}get positionX(){return this._positionX}get positionY(){return this._positionY}get positionZ(){return this._positionZ}get refDistance(){return this._nativePannerNode.refDistance}set refDistance(lt){this._nativePannerNode.refDistance=lt}get rolloffFactor(){return this._nativePannerNode.rolloffFactor}set rolloffFactor(lt){this._nativePannerNode.rolloffFactor=lt}},createPannerNodeRendererFactory=(tt,et,nt,rt,it,ot,at,st,lt,ct)=>()=>{const ut=new WeakMap;let ht=null;const dt=async(pt,mt)=>{let gt=null,yt=ot(pt);const bt={channelCount:yt.channelCount,channelCountMode:yt.channelCountMode,channelInterpretation:yt.channelInterpretation},vt={...bt,coneInnerAngle:yt.coneInnerAngle,coneOuterAngle:yt.coneOuterAngle,coneOuterGain:yt.coneOuterGain,distanceModel:yt.distanceModel,maxDistance:yt.maxDistance,panningModel:yt.panningModel,refDistance:yt.refDistance,rolloffFactor:yt.rolloffFactor},xt=isOwnedByContext(yt,mt);if("bufferSize"in yt)gt=rt(mt,{...bt,gain:1});else if(!xt){const kt={...vt,orientationX:yt.orientationX.value,orientationY:yt.orientationY.value,orientationZ:yt.orientationZ.value,positionX:yt.positionX.value,positionY:yt.positionY.value,positionZ:yt.positionZ.value};yt=it(mt,kt)}if(ut.set(mt,gt===null?yt:gt),gt!==null){if(ht===null){if(at===null)throw new Error("Missing the native OfflineAudioContext constructor.");const jt=new at(6,pt.context.length,mt.sampleRate),Pt=et(jt,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"speakers",numberOfInputs:6});Pt.connect(jt.destination),ht=(async()=>{const Ct=await Promise.all([pt.orientationX,pt.orientationY,pt.orientationZ,pt.positionX,pt.positionY,pt.positionZ].map(async(wt,It)=>{const Ot=nt(jt,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",offset:It===0?1:0});return await st(jt,wt,Ot.offset),Ot}));for(let wt=0;wt<6;wt+=1)Ct[wt].connect(Pt,0,wt),Ct[wt].start(0);return ct(jt)})()}const kt=await ht,St=rt(mt,{...bt,gain:1});await lt(pt,mt,St);const Tt=[];for(let jt=0;jtwt!==At[It])||Ct.some((wt,It)=>wt!==Et[It])){At=Pt,Et=Ct;const wt=jt/mt.sampleRate;$t.gain.setValueAtTime(0,wt),$t=rt(mt,{...bt,gain:0}),Dt=it(mt,{...vt,orientationX:At[0],orientationY:At[1],orientationZ:At[2],positionX:Et[0],positionY:Et[1],positionZ:Et[2]}),$t.gain.setValueAtTime(1,wt),St.connect($t).connect(Dt.inputs[0]),Dt.connect(gt)}}return gt}return xt?(await tt(mt,pt.orientationX,yt.orientationX),await tt(mt,pt.orientationY,yt.orientationY),await tt(mt,pt.orientationZ,yt.orientationZ),await tt(mt,pt.positionX,yt.positionX),await tt(mt,pt.positionY,yt.positionY),await tt(mt,pt.positionZ,yt.positionZ)):(await st(mt,pt.orientationX,yt.orientationX),await st(mt,pt.orientationY,yt.orientationY),await st(mt,pt.orientationZ,yt.orientationZ),await st(mt,pt.positionX,yt.positionX),await st(mt,pt.positionY,yt.positionY),await st(mt,pt.positionZ,yt.positionZ)),isNativeAudioNodeFaker(yt)?await lt(pt,mt,yt.inputs[0]):await lt(pt,mt,yt),yt};return{render(pt,mt){const gt=ut.get(mt);return gt!==void 0?Promise.resolve(gt):dt(pt,mt)}}},DEFAULT_OPTIONS$2={disableNormalization:!1},createPeriodicWaveConstructor=(tt,et,nt,rt)=>class _w{constructor(ot,at){const st=et(ot),lt=rt({...DEFAULT_OPTIONS$2,...at}),ct=tt(st,lt);return nt.add(ct),ct}static[Symbol.hasInstance](ot){return ot!==null&&typeof ot=="object"&&Object.getPrototypeOf(ot)===_w.prototype||nt.has(ot)}},createRenderAutomation=(tt,et)=>(nt,rt,it)=>(tt(rt).replay(it),et(rt,nt,it)),createRenderInputsOfAudioNode=(tt,et,nt)=>async(rt,it,ot)=>{const at=tt(rt);await Promise.all(at.activeInputs.map((st,lt)=>Array.from(st).map(async([ct,ut])=>{const dt=await et(ct).render(ct,it),pt=rt.context.destination;!nt(ct)&&(rt!==pt||!nt(rt))&&dt.connect(ot,ut,lt)})).reduce((st,lt)=>[...st,...lt],[]))},createRenderInputsOfAudioParam=(tt,et,nt)=>async(rt,it,ot)=>{const at=et(rt);await Promise.all(Array.from(at.activeInputs).map(async([st,lt])=>{const ut=await tt(st).render(st,it);nt(st)||ut.connect(ot,lt)}))},createRenderNativeOfflineAudioContext=(tt,et,nt,rt)=>it=>tt(testPromiseSupport,()=>testPromiseSupport(it))?Promise.resolve(tt(rt,rt)).then(ot=>{if(!ot){const at=nt(it,512,0,1);it.oncomplete=()=>{at.onaudioprocess=null,at.disconnect()},at.onaudioprocess=()=>it.currentTime,at.connect(it.destination)}return it.startRendering()}):new Promise(ot=>{const at=et(it,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});it.oncomplete=st=>{at.disconnect(),ot(st.renderedBuffer)},at.connect(it.destination),it.startRendering()}),createSetActiveAudioWorkletNodeInputs=tt=>(et,nt)=>{tt.set(et,nt)},createSetAudioNodeTailTime=tt=>(et,nt)=>tt.set(et,nt),createStartRendering=(tt,et,nt,rt,it,ot,at,st)=>(lt,ct)=>nt(lt).render(lt,ct).then(()=>Promise.all(Array.from(rt(ct)).map(ut=>nt(ut).render(ut,ct)))).then(()=>it(ct)).then(ut=>(typeof ut.copyFromChannel!="function"?(at(ut),wrapAudioBufferGetChannelDataMethod(ut)):et(ot,()=>ot(ut))||st(ut),tt.add(ut),ut)),DEFAULT_OPTIONS$1={channelCount:2,channelCountMode:"explicit",channelInterpretation:"speakers",pan:0},createStereoPannerNodeConstructor=(tt,et,nt,rt,it,ot)=>class extends tt{constructor(st,lt){const ct=it(st),ut={...DEFAULT_OPTIONS$1,...lt},ht=nt(ct,ut),dt=ot(ct),pt=dt?rt():null;super(st,!1,ht,pt),this._pan=et(this,dt,ht.pan)}get pan(){return this._pan}},createStereoPannerNodeRendererFactory=(tt,et,nt,rt,it)=>()=>{const ot=new WeakMap,at=async(st,lt)=>{let ct=nt(st);const ut=isOwnedByContext(ct,lt);if(!ut){const ht={channelCount:ct.channelCount,channelCountMode:ct.channelCountMode,channelInterpretation:ct.channelInterpretation,pan:ct.pan.value};ct=et(lt,ht)}return ot.set(lt,ct),ut?await tt(lt,st.pan,ct.pan):await rt(lt,st.pan,ct.pan),isNativeAudioNodeFaker(ct)?await it(st,lt,ct.inputs[0]):await it(st,lt,ct),ct};return{render(st,lt){const ct=ot.get(lt);return ct!==void 0?Promise.resolve(ct):at(st,lt)}}},createTestAudioBufferConstructorSupport=tt=>()=>{if(tt===null)return!1;try{new tt({length:1,sampleRate:44100})}catch{return!1}return!0},createTestAudioWorkletProcessorPostMessageSupport=(tt,et)=>async()=>{if(tt===null)return!0;if(et===null)return!1;const nt=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"}),rt=new et(1,128,44100),it=URL.createObjectURL(nt);let ot=!1,at=!1;try{await rt.audioWorklet.addModule(it);const st=new tt(rt,"a",{numberOfOutputs:0}),lt=rt.createOscillator();st.port.onmessage=()=>ot=!0,st.onprocessorerror=()=>at=!0,lt.connect(st),lt.start(0),await rt.startRendering(),await new Promise(ct=>setTimeout(ct))}catch{}finally{URL.revokeObjectURL(it)}return ot&&!at},createTestOfflineAudioContextCurrentTimeSupport=(tt,et)=>()=>{if(et===null)return Promise.resolve(!1);const nt=new et(1,1,44100),rt=tt(nt,{channelCount:1,channelCountMode:"explicit",channelInterpretation:"discrete",gain:0});return new Promise(it=>{nt.oncomplete=()=>{rt.disconnect(),it(nt.currentTime!==0)},nt.startRendering()})},createUnknownError=()=>new DOMException("","UnknownError"),DEFAULT_OPTIONS={channelCount:2,channelCountMode:"max",channelInterpretation:"speakers",curve:null,oversample:"none"},createWaveShaperNodeConstructor=(tt,et,nt,rt,it,ot,at)=>class extends tt{constructor(lt,ct){const ut=it(lt),ht={...DEFAULT_OPTIONS,...ct},dt=nt(ut,ht),mt=ot(ut)?rt():null;super(lt,!0,dt,mt),this._isCurveNullified=!1,this._nativeWaveShaperNode=dt,at(this,1)}get curve(){return this._isCurveNullified?null:this._nativeWaveShaperNode.curve}set curve(lt){if(lt===null)this._isCurveNullified=!0,this._nativeWaveShaperNode.curve=new Float32Array([0,0]);else{if(lt.length<2)throw et();this._isCurveNullified=!1,this._nativeWaveShaperNode.curve=lt}}get oversample(){return this._nativeWaveShaperNode.oversample}set oversample(lt){this._nativeWaveShaperNode.oversample=lt}},createWaveShaperNodeRendererFactory=(tt,et,nt)=>()=>{const rt=new WeakMap,it=async(ot,at)=>{let st=et(ot);if(!isOwnedByContext(st,at)){const ct={channelCount:st.channelCount,channelCountMode:st.channelCountMode,channelInterpretation:st.channelInterpretation,curve:st.curve,oversample:st.oversample};st=tt(at,ct)}return rt.set(at,st),isNativeAudioNodeFaker(st)?await nt(ot,at,st.inputs[0]):await nt(ot,at,st),st};return{render(ot,at){const st=rt.get(at);return st!==void 0?Promise.resolve(st):it(ot,at)}}},createWindow=()=>typeof window>"u"?null:window,createWrapAudioBufferCopyChannelMethods=(tt,et)=>nt=>{nt.copyFromChannel=(rt,it,ot=0)=>{const at=tt(ot),st=tt(it);if(st>=nt.numberOfChannels)throw et();const lt=nt.length,ct=nt.getChannelData(st),ut=rt.length;for(let ht=at<0?-at:0;ht+at{const at=tt(ot),st=tt(it);if(st>=nt.numberOfChannels)throw et();const lt=nt.length,ct=nt.getChannelData(st),ut=rt.length;for(let ht=at<0?-at:0;ht+atet=>{et.copyFromChannel=(nt=>(rt,it,ot=0)=>{const at=tt(ot),st=tt(it);if(at(rt,it,ot=0)=>{const at=tt(ot),st=tt(it);if(at(et,nt)=>{const rt=nt.createBuffer(1,1,44100);et.buffer===null&&(et.buffer=rt),tt(et,"buffer",it=>()=>{const ot=it.call(et);return ot===rt?null:ot},it=>ot=>it.call(et,ot===null?rt:ot))},createWrapChannelMergerNode=(tt,et)=>(nt,rt)=>{rt.channelCount=1,rt.channelCountMode="explicit",Object.defineProperty(rt,"channelCount",{get:()=>1,set:()=>{throw tt()}}),Object.defineProperty(rt,"channelCountMode",{get:()=>"explicit",set:()=>{throw tt()}});const it=nt.createBufferSource();et(rt,()=>{const st=rt.numberOfInputs;for(let lt=0;ltit.disconnect(rt))},getFirstSample=(tt,et,nt)=>tt.copyFromChannel===void 0?tt.getChannelData(nt)[0]:(tt.copyFromChannel(et,nt),et[0]),isDCCurve=tt=>{if(tt===null)return!1;const et=tt.length;return et%2!==0?tt[Math.floor(et/2)]!==0:tt[et/2-1]+tt[et/2]!==0},overwriteAccessors=(tt,et,nt,rt)=>{let it=tt;for(;!it.hasOwnProperty(et);)it=Object.getPrototypeOf(it);const{get:ot,set:at}=Object.getOwnPropertyDescriptor(it,et);Object.defineProperty(tt,et,{get:nt(ot),set:rt(at)})},sanitizeAudioWorkletNodeOptions=tt=>({...tt,outputChannelCount:tt.outputChannelCount!==void 0?tt.outputChannelCount:tt.numberOfInputs===1&&tt.numberOfOutputs===1?[tt.channelCount]:Array.from({length:tt.numberOfOutputs},()=>1)}),sanitizeChannelSplitterOptions=tt=>({...tt,channelCount:tt.numberOfOutputs}),sanitizePeriodicWaveOptions=tt=>{const{imag:et,real:nt}=tt;return et===void 0?nt===void 0?{...tt,imag:[0,0],real:[0,0]}:{...tt,imag:Array.from(nt,()=>0),real:nt}:nt===void 0?{...tt,imag:et,real:Array.from(et,()=>0)}:{...tt,imag:et,real:nt}},setValueAtTimeUntilPossible=(tt,et,nt)=>{try{tt.setValueAtTime(et,nt)}catch(rt){if(rt.code!==9)throw rt;setValueAtTimeUntilPossible(tt,et,nt+1e-7)}},testAudioBufferSourceNodeStartMethodConsecutiveCallsSupport=tt=>{const et=tt.createBufferSource();et.start();try{et.start()}catch{return!0}return!1},testAudioBufferSourceNodeStartMethodOffsetClampingSupport=tt=>{const et=tt.createBufferSource(),nt=tt.createBuffer(1,1,44100);et.buffer=nt;try{et.start(0,1)}catch{return!1}return!0},testAudioBufferSourceNodeStopMethodNullifiedBufferSupport=tt=>{const et=tt.createBufferSource();et.start();try{et.stop()}catch{return!1}return!0},testAudioScheduledSourceNodeStartMethodNegativeParametersSupport=tt=>{const et=tt.createOscillator();try{et.start(-1)}catch(nt){return nt instanceof RangeError}return!1},testAudioScheduledSourceNodeStopMethodConsecutiveCallsSupport=tt=>{const et=tt.createBuffer(1,1,44100),nt=tt.createBufferSource();nt.buffer=et,nt.start(),nt.stop();try{return nt.stop(),!0}catch{return!1}},testAudioScheduledSourceNodeStopMethodNegativeParametersSupport=tt=>{const et=tt.createOscillator();try{et.stop(-1)}catch(nt){return nt instanceof RangeError}return!1},testAudioWorkletNodeOptionsClonability=tt=>{const{port1:et,port2:nt}=new MessageChannel;try{et.postMessage(tt)}finally{et.close(),nt.close()}},wrapAudioBufferSourceNodeStartMethodOffsetClamping=tt=>{tt.start=(et=>(nt=0,rt=0,it)=>{const ot=tt.buffer,at=ot===null?rt:Math.min(ot.duration,rt);ot!==null&&at>ot.duration-.5/tt.context.sampleRate?et.call(tt,nt,0,0):et.call(tt,nt,at,it)})(tt.start)},wrapAudioScheduledSourceNodeStopMethodConsecutiveCalls=(tt,et)=>{const nt=et.createGain();tt.connect(nt);const rt=(it=>()=>{it.call(tt,nt),tt.removeEventListener("ended",rt)})(tt.disconnect);tt.addEventListener("ended",rt),interceptConnections(tt,nt),tt.stop=(it=>{let ot=!1;return(at=0)=>{if(ot)try{it.call(tt,at)}catch{nt.gain.setValueAtTime(0,at)}else it.call(tt,at),ot=!0}})(tt.stop)},wrapEventListener=(tt,et)=>nt=>{const rt={value:tt};return Object.defineProperties(nt,{currentTarget:rt,target:rt}),typeof et=="function"?et.call(tt,nt):et.handleEvent.call(tt,nt)},addActiveInputConnectionToAudioNode=createAddActiveInputConnectionToAudioNode(insertElementInSet),addPassiveInputConnectionToAudioNode=createAddPassiveInputConnectionToAudioNode(insertElementInSet),deleteActiveInputConnectionToAudioNode=createDeleteActiveInputConnectionToAudioNode(pickElementFromSet),audioNodeTailTimeStore=new WeakMap,getAudioNodeTailTime=createGetAudioNodeTailTime(audioNodeTailTimeStore),cacheTestResult=createCacheTestResult(new Map,new WeakMap),window$1=createWindow(),createNativeAnalyserNode=createNativeAnalyserNodeFactory(cacheTestResult,createIndexSizeError),getAudioNodeRenderer=createGetAudioNodeRenderer(getAudioNodeConnections),renderInputsOfAudioNode=createRenderInputsOfAudioNode(getAudioNodeConnections,getAudioNodeRenderer,isPartOfACycle),createAnalyserNodeRenderer=createAnalyserNodeRendererFactory(createNativeAnalyserNode,getNativeAudioNode,renderInputsOfAudioNode),getNativeContext=createGetNativeContext(CONTEXT_STORE),nativeOfflineAudioContextConstructor=createNativeOfflineAudioContextConstructor(window$1),isNativeOfflineAudioContext=createIsNativeOfflineAudioContext(nativeOfflineAudioContextConstructor),audioParamAudioNodeStore=new WeakMap,eventTargetConstructor=createEventTargetConstructor(wrapEventListener),nativeAudioContextConstructor=createNativeAudioContextConstructor(window$1),isNativeAudioContext=createIsNativeAudioContext(nativeAudioContextConstructor),isNativeAudioNode=createIsNativeAudioNode(window$1),isNativeAudioParam=createIsNativeAudioParam(window$1),nativeAudioWorkletNodeConstructor=createNativeAudioWorkletNodeConstructor(window$1),audioNodeConstructor=createAudioNodeConstructor(createAddAudioNodeConnections(AUDIO_NODE_CONNECTIONS_STORE),createAddConnectionToAudioNode(addActiveInputConnectionToAudioNode,addPassiveInputConnectionToAudioNode,connectNativeAudioNodeToNativeAudioNode,deleteActiveInputConnectionToAudioNode,disconnectNativeAudioNodeFromNativeAudioNode,getAudioNodeConnections,getAudioNodeTailTime,getEventListenersOfAudioNode,getNativeAudioNode,insertElementInSet,isActiveAudioNode,isPartOfACycle,isPassiveAudioNode),cacheTestResult,createIncrementCycleCounterFactory(CYCLE_COUNTERS,disconnectNativeAudioNodeFromNativeAudioNode,getAudioNodeConnections,getNativeAudioNode,getNativeAudioParam,isActiveAudioNode),createIndexSizeError,createInvalidAccessError,createNotSupportedError,createDecrementCycleCounter(connectNativeAudioNodeToNativeAudioNode,CYCLE_COUNTERS,getAudioNodeConnections,getNativeAudioNode,getNativeAudioParam,getNativeContext,isActiveAudioNode,isNativeOfflineAudioContext),createDetectCycles(audioParamAudioNodeStore,getAudioNodeConnections,getValueForKey),eventTargetConstructor,getNativeContext,isNativeAudioContext,isNativeAudioNode,isNativeAudioParam,isNativeOfflineAudioContext,nativeAudioWorkletNodeConstructor),analyserNodeConstructor=createAnalyserNodeConstructor(audioNodeConstructor,createAnalyserNodeRenderer,createIndexSizeError,createNativeAnalyserNode,getNativeContext,isNativeOfflineAudioContext),audioBufferStore=new WeakSet,nativeAudioBufferConstructor=createNativeAudioBufferConstructor(window$1),convertNumberToUnsignedLong=createConvertNumberToUnsignedLong(new Uint32Array(1)),wrapAudioBufferCopyChannelMethods=createWrapAudioBufferCopyChannelMethods(convertNumberToUnsignedLong,createIndexSizeError),wrapAudioBufferCopyChannelMethodsOutOfBounds=createWrapAudioBufferCopyChannelMethodsOutOfBounds(convertNumberToUnsignedLong),audioBufferConstructor=createAudioBufferConstructor(audioBufferStore,cacheTestResult,createNotSupportedError,nativeAudioBufferConstructor,nativeOfflineAudioContextConstructor,createTestAudioBufferConstructorSupport(nativeAudioBufferConstructor),wrapAudioBufferCopyChannelMethods,wrapAudioBufferCopyChannelMethodsOutOfBounds),addSilentConnection=createAddSilentConnection(createNativeGainNode),renderInputsOfAudioParam=createRenderInputsOfAudioParam(getAudioNodeRenderer,getAudioParamConnections,isPartOfACycle),connectAudioParam=createConnectAudioParam(renderInputsOfAudioParam),createNativeAudioBufferSourceNode=createNativeAudioBufferSourceNodeFactory(addSilentConnection,cacheTestResult,testAudioBufferSourceNodeStartMethodConsecutiveCallsSupport,testAudioBufferSourceNodeStartMethodOffsetClampingSupport,testAudioBufferSourceNodeStopMethodNullifiedBufferSupport,testAudioScheduledSourceNodeStartMethodNegativeParametersSupport,testAudioScheduledSourceNodeStopMethodConsecutiveCallsSupport,testAudioScheduledSourceNodeStopMethodNegativeParametersSupport,wrapAudioBufferSourceNodeStartMethodOffsetClamping,createWrapAudioBufferSourceNodeStopMethodNullifiedBuffer(overwriteAccessors),wrapAudioScheduledSourceNodeStopMethodConsecutiveCalls),renderAutomation=createRenderAutomation(createGetAudioParamRenderer(getAudioParamConnections),renderInputsOfAudioParam),createAudioBufferSourceNodeRenderer=createAudioBufferSourceNodeRendererFactory(connectAudioParam,createNativeAudioBufferSourceNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),createAudioParam=createAudioParamFactory(createAddAudioParamConnections(AUDIO_PARAM_CONNECTIONS_STORE),audioParamAudioNodeStore,AUDIO_PARAM_STORE,createAudioParamRenderer,createCancelAndHoldAutomationEvent,createCancelScheduledValuesAutomationEvent,createExponentialRampToValueAutomationEvent,createLinearRampToValueAutomationEvent,createSetTargetAutomationEvent,createSetValueAutomationEvent,createSetValueCurveAutomationEvent,nativeAudioContextConstructor,setValueAtTimeUntilPossible),audioBufferSourceNodeConstructor=createAudioBufferSourceNodeConstructor(audioNodeConstructor,createAudioBufferSourceNodeRenderer,createAudioParam,createInvalidStateError,createNativeAudioBufferSourceNode,getNativeContext,isNativeOfflineAudioContext,wrapEventListener),audioDestinationNodeConstructor=createAudioDestinationNodeConstructor(audioNodeConstructor,createAudioDestinationNodeRenderer,createIndexSizeError,createInvalidStateError,createNativeAudioDestinationNodeFactory(createNativeGainNode,overwriteAccessors),getNativeContext,isNativeOfflineAudioContext,renderInputsOfAudioNode),createBiquadFilterNodeRenderer=createBiquadFilterNodeRendererFactory(connectAudioParam,createNativeBiquadFilterNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),setAudioNodeTailTime=createSetAudioNodeTailTime(audioNodeTailTimeStore),biquadFilterNodeConstructor=createBiquadFilterNodeConstructor(audioNodeConstructor,createAudioParam,createBiquadFilterNodeRenderer,createInvalidAccessError,createNativeBiquadFilterNode,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),monitorConnections=createMonitorConnections(insertElementInSet,isNativeAudioNode),wrapChannelMergerNode=createWrapChannelMergerNode(createInvalidStateError,monitorConnections),createNativeChannelMergerNode=createNativeChannelMergerNodeFactory(nativeAudioContextConstructor,wrapChannelMergerNode),createChannelMergerNodeRenderer=createChannelMergerNodeRendererFactory(createNativeChannelMergerNode,getNativeAudioNode,renderInputsOfAudioNode),channelMergerNodeConstructor=createChannelMergerNodeConstructor(audioNodeConstructor,createChannelMergerNodeRenderer,createNativeChannelMergerNode,getNativeContext,isNativeOfflineAudioContext),createChannelSplitterNodeRenderer=createChannelSplitterNodeRendererFactory(createNativeChannelSplitterNode,getNativeAudioNode,renderInputsOfAudioNode),channelSplitterNodeConstructor=createChannelSplitterNodeConstructor(audioNodeConstructor,createChannelSplitterNodeRenderer,createNativeChannelSplitterNode,getNativeContext,isNativeOfflineAudioContext,sanitizeChannelSplitterOptions),createNativeConstantSourceNodeFaker=createNativeConstantSourceNodeFakerFactory(addSilentConnection,createNativeAudioBufferSourceNode,createNativeGainNode,monitorConnections),createNativeConstantSourceNode=createNativeConstantSourceNodeFactory(addSilentConnection,cacheTestResult,createNativeConstantSourceNodeFaker,testAudioScheduledSourceNodeStartMethodNegativeParametersSupport,testAudioScheduledSourceNodeStopMethodNegativeParametersSupport),createConstantSourceNodeRenderer=createConstantSourceNodeRendererFactory(connectAudioParam,createNativeConstantSourceNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),constantSourceNodeConstructor=createConstantSourceNodeConstructor(audioNodeConstructor,createAudioParam,createConstantSourceNodeRenderer,createNativeConstantSourceNode,getNativeContext,isNativeOfflineAudioContext,wrapEventListener),createNativeConvolverNode=createNativeConvolverNodeFactory(createNotSupportedError,overwriteAccessors),createConvolverNodeRenderer=createConvolverNodeRendererFactory(createNativeConvolverNode,getNativeAudioNode,renderInputsOfAudioNode),convolverNodeConstructor=createConvolverNodeConstructor(audioNodeConstructor,createConvolverNodeRenderer,createNativeConvolverNode,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createDelayNodeRenderer=createDelayNodeRendererFactory(connectAudioParam,createNativeDelayNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),delayNodeConstructor=createDelayNodeConstructor(audioNodeConstructor,createAudioParam,createDelayNodeRenderer,createNativeDelayNode,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createNativeDynamicsCompressorNode=createNativeDynamicsCompressorNodeFactory(createNotSupportedError),createDynamicsCompressorNodeRenderer=createDynamicsCompressorNodeRendererFactory(connectAudioParam,createNativeDynamicsCompressorNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),dynamicsCompressorNodeConstructor=createDynamicsCompressorNodeConstructor(audioNodeConstructor,createAudioParam,createDynamicsCompressorNodeRenderer,createNativeDynamicsCompressorNode,createNotSupportedError,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createGainNodeRenderer=createGainNodeRendererFactory(connectAudioParam,createNativeGainNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),gainNodeConstructor=createGainNodeConstructor(audioNodeConstructor,createAudioParam,createGainNodeRenderer,createNativeGainNode,getNativeContext,isNativeOfflineAudioContext),createNativeIIRFilterNodeFaker=createNativeIIRFilterNodeFakerFactory(createInvalidAccessError,createInvalidStateError,createNativeScriptProcessorNode,createNotSupportedError),renderNativeOfflineAudioContext=createRenderNativeOfflineAudioContext(cacheTestResult,createNativeGainNode,createNativeScriptProcessorNode,createTestOfflineAudioContextCurrentTimeSupport(createNativeGainNode,nativeOfflineAudioContextConstructor)),createIIRFilterNodeRenderer=createIIRFilterNodeRendererFactory(createNativeAudioBufferSourceNode,getNativeAudioNode,nativeOfflineAudioContextConstructor,renderInputsOfAudioNode,renderNativeOfflineAudioContext),createNativeIIRFilterNode=createNativeIIRFilterNodeFactory(createNativeIIRFilterNodeFaker),iIRFilterNodeConstructor=createIIRFilterNodeConstructor(audioNodeConstructor,createNativeIIRFilterNode,createIIRFilterNodeRenderer,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createAudioListener=createAudioListenerFactory(createAudioParam,createNativeChannelMergerNode,createNativeConstantSourceNode,createNativeScriptProcessorNode,createNotSupportedError,getFirstSample,isNativeOfflineAudioContext,overwriteAccessors),unrenderedAudioWorkletNodeStore=new WeakMap,minimalBaseAudioContextConstructor=createMinimalBaseAudioContextConstructor(audioDestinationNodeConstructor,createAudioListener,eventTargetConstructor,isNativeOfflineAudioContext,unrenderedAudioWorkletNodeStore,wrapEventListener),createNativeOscillatorNode=createNativeOscillatorNodeFactory(addSilentConnection,cacheTestResult,testAudioScheduledSourceNodeStartMethodNegativeParametersSupport,testAudioScheduledSourceNodeStopMethodConsecutiveCallsSupport,testAudioScheduledSourceNodeStopMethodNegativeParametersSupport,wrapAudioScheduledSourceNodeStopMethodConsecutiveCalls),createOscillatorNodeRenderer=createOscillatorNodeRendererFactory(connectAudioParam,createNativeOscillatorNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),oscillatorNodeConstructor=createOscillatorNodeConstructor(audioNodeConstructor,createAudioParam,createNativeOscillatorNode,createOscillatorNodeRenderer,getNativeContext,isNativeOfflineAudioContext,wrapEventListener),createConnectedNativeAudioBufferSourceNode=createConnectedNativeAudioBufferSourceNodeFactory(createNativeAudioBufferSourceNode),createNativeWaveShaperNodeFaker=createNativeWaveShaperNodeFakerFactory(createConnectedNativeAudioBufferSourceNode,createInvalidStateError,createNativeGainNode,isDCCurve,monitorConnections),createNativeWaveShaperNode=createNativeWaveShaperNodeFactory(createConnectedNativeAudioBufferSourceNode,createInvalidStateError,createNativeWaveShaperNodeFaker,isDCCurve,monitorConnections,nativeAudioContextConstructor,overwriteAccessors),createNativePannerNodeFaker=createNativePannerNodeFakerFactory(connectNativeAudioNodeToNativeAudioNode,createInvalidStateError,createNativeChannelMergerNode,createNativeGainNode,createNativeScriptProcessorNode,createNativeWaveShaperNode,createNotSupportedError,disconnectNativeAudioNodeFromNativeAudioNode,getFirstSample,monitorConnections),createNativePannerNode=createNativePannerNodeFactory(createNativePannerNodeFaker),createPannerNodeRenderer=createPannerNodeRendererFactory(connectAudioParam,createNativeChannelMergerNode,createNativeConstantSourceNode,createNativeGainNode,createNativePannerNode,getNativeAudioNode,nativeOfflineAudioContextConstructor,renderAutomation,renderInputsOfAudioNode,renderNativeOfflineAudioContext),pannerNodeConstructor=createPannerNodeConstructor(audioNodeConstructor,createAudioParam,createNativePannerNode,createPannerNodeRenderer,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),createNativePeriodicWave=createNativePeriodicWaveFactory(createIndexSizeError),periodicWaveConstructor=createPeriodicWaveConstructor(createNativePeriodicWave,getNativeContext,new WeakSet,sanitizePeriodicWaveOptions),nativeStereoPannerNodeFakerFactory=createNativeStereoPannerNodeFakerFactory(createNativeChannelMergerNode,createNativeChannelSplitterNode,createNativeGainNode,createNativeWaveShaperNode,createNotSupportedError,monitorConnections),createNativeStereoPannerNode=createNativeStereoPannerNodeFactory(nativeStereoPannerNodeFakerFactory,createNotSupportedError),createStereoPannerNodeRenderer=createStereoPannerNodeRendererFactory(connectAudioParam,createNativeStereoPannerNode,getNativeAudioNode,renderAutomation,renderInputsOfAudioNode),stereoPannerNodeConstructor=createStereoPannerNodeConstructor(audioNodeConstructor,createAudioParam,createNativeStereoPannerNode,createStereoPannerNodeRenderer,getNativeContext,isNativeOfflineAudioContext),createWaveShaperNodeRenderer=createWaveShaperNodeRendererFactory(createNativeWaveShaperNode,getNativeAudioNode,renderInputsOfAudioNode),waveShaperNodeConstructor=createWaveShaperNodeConstructor(audioNodeConstructor,createInvalidStateError,createNativeWaveShaperNode,createWaveShaperNodeRenderer,getNativeContext,isNativeOfflineAudioContext,setAudioNodeTailTime),isSecureContext=createIsSecureContext(window$1),exposeCurrentFrameAndCurrentTime=createExposeCurrentFrameAndCurrentTime(window$1),backupOfflineAudioContextStore=new WeakMap,getOrCreateBackupOfflineAudioContext=createGetOrCreateBackupOfflineAudioContext(backupOfflineAudioContextStore,nativeOfflineAudioContextConstructor),addAudioWorkletModule=isSecureContext?createAddAudioWorkletModule(cacheTestResult,createNotSupportedError,createEvaluateSource(window$1),exposeCurrentFrameAndCurrentTime,createFetchSource(createAbortError),getNativeContext,getOrCreateBackupOfflineAudioContext,isNativeOfflineAudioContext,nativeAudioWorkletNodeConstructor,new WeakMap,new WeakMap,createTestAudioWorkletProcessorPostMessageSupport(nativeAudioWorkletNodeConstructor,nativeOfflineAudioContextConstructor),window$1):void 0,isNativeContext=createIsNativeContext(isNativeAudioContext,isNativeOfflineAudioContext),decodeAudioData=createDecodeAudioData(audioBufferStore,cacheTestResult,createDataCloneError,createEncodingError,new WeakSet,getNativeContext,isNativeContext,testAudioBufferCopyChannelMethodsOutOfBoundsSupport,testPromiseSupport,wrapAudioBufferCopyChannelMethods,wrapAudioBufferCopyChannelMethodsOutOfBounds),baseAudioContextConstructor=createBaseAudioContextConstructor(addAudioWorkletModule,analyserNodeConstructor,audioBufferConstructor,audioBufferSourceNodeConstructor,biquadFilterNodeConstructor,channelMergerNodeConstructor,channelSplitterNodeConstructor,constantSourceNodeConstructor,convolverNodeConstructor,decodeAudioData,delayNodeConstructor,dynamicsCompressorNodeConstructor,gainNodeConstructor,iIRFilterNodeConstructor,minimalBaseAudioContextConstructor,oscillatorNodeConstructor,pannerNodeConstructor,periodicWaveConstructor,stereoPannerNodeConstructor,waveShaperNodeConstructor),mediaElementAudioSourceNodeConstructor=createMediaElementAudioSourceNodeConstructor(audioNodeConstructor,createNativeMediaElementAudioSourceNode,getNativeContext,isNativeOfflineAudioContext),mediaStreamAudioDestinationNodeConstructor=createMediaStreamAudioDestinationNodeConstructor(audioNodeConstructor,createNativeMediaStreamAudioDestinationNode,getNativeContext,isNativeOfflineAudioContext),mediaStreamAudioSourceNodeConstructor=createMediaStreamAudioSourceNodeConstructor(audioNodeConstructor,createNativeMediaStreamAudioSourceNode,getNativeContext,isNativeOfflineAudioContext),createNativeMediaStreamTrackAudioSourceNode=createNativeMediaStreamTrackAudioSourceNodeFactory(createInvalidStateError,isNativeOfflineAudioContext),mediaStreamTrackAudioSourceNodeConstructor=createMediaStreamTrackAudioSourceNodeConstructor(audioNodeConstructor,createNativeMediaStreamTrackAudioSourceNode,getNativeContext),audioContextConstructor=createAudioContextConstructor(baseAudioContextConstructor,createInvalidStateError,createNotSupportedError,createUnknownError,mediaElementAudioSourceNodeConstructor,mediaStreamAudioDestinationNodeConstructor,mediaStreamAudioSourceNodeConstructor,mediaStreamTrackAudioSourceNodeConstructor,nativeAudioContextConstructor),getUnrenderedAudioWorkletNodes=createGetUnrenderedAudioWorkletNodes(unrenderedAudioWorkletNodeStore),addUnrenderedAudioWorkletNode=createAddUnrenderedAudioWorkletNode(getUnrenderedAudioWorkletNodes),connectMultipleOutputs=createConnectMultipleOutputs(createIndexSizeError),deleteUnrenderedAudioWorkletNode=createDeleteUnrenderedAudioWorkletNode(getUnrenderedAudioWorkletNodes),disconnectMultipleOutputs=createDisconnectMultipleOutputs(createIndexSizeError),activeAudioWorkletNodeInputsStore=new WeakMap,getActiveAudioWorkletNodeInputs=createGetActiveAudioWorkletNodeInputs(activeAudioWorkletNodeInputsStore,getValueForKey),createNativeAudioWorkletNodeFaker=createNativeAudioWorkletNodeFakerFactory(connectMultipleOutputs,createIndexSizeError,createInvalidStateError,createNativeChannelMergerNode,createNativeChannelSplitterNode,createNativeConstantSourceNode,createNativeGainNode,createNativeScriptProcessorNode,createNotSupportedError,disconnectMultipleOutputs,exposeCurrentFrameAndCurrentTime,getActiveAudioWorkletNodeInputs,monitorConnections),createNativeAudioWorkletNode=createNativeAudioWorkletNodeFactory(createInvalidStateError,createNativeAudioWorkletNodeFaker,createNativeGainNode,createNotSupportedError,monitorConnections),createAudioWorkletNodeRenderer=createAudioWorkletNodeRendererFactory(connectAudioParam,connectMultipleOutputs,createNativeAudioBufferSourceNode,createNativeChannelMergerNode,createNativeChannelSplitterNode,createNativeConstantSourceNode,createNativeGainNode,deleteUnrenderedAudioWorkletNode,disconnectMultipleOutputs,exposeCurrentFrameAndCurrentTime,getNativeAudioNode,nativeAudioWorkletNodeConstructor,nativeOfflineAudioContextConstructor,renderAutomation,renderInputsOfAudioNode,renderNativeOfflineAudioContext),getBackupOfflineAudioContext=createGetBackupOfflineAudioContext(backupOfflineAudioContextStore),setActiveAudioWorkletNodeInputs=createSetActiveAudioWorkletNodeInputs(activeAudioWorkletNodeInputsStore),audioWorkletNodeConstructor=isSecureContext?createAudioWorkletNodeConstructor(addUnrenderedAudioWorkletNode,audioNodeConstructor,createAudioParam,createAudioWorkletNodeRenderer,createNativeAudioWorkletNode,getAudioNodeConnections,getBackupOfflineAudioContext,getNativeContext,isNativeOfflineAudioContext,nativeAudioWorkletNodeConstructor,sanitizeAudioWorkletNodeOptions,setActiveAudioWorkletNodeInputs,testAudioWorkletNodeOptionsClonability,wrapEventListener):void 0,createNativeOfflineAudioContext=createCreateNativeOfflineAudioContext(createNotSupportedError,nativeOfflineAudioContextConstructor),startRendering=createStartRendering(audioBufferStore,cacheTestResult,getAudioNodeRenderer,getUnrenderedAudioWorkletNodes,renderNativeOfflineAudioContext,testAudioBufferCopyChannelMethodsOutOfBoundsSupport,wrapAudioBufferCopyChannelMethods,wrapAudioBufferCopyChannelMethodsOutOfBounds),offlineAudioContextConstructor=createOfflineAudioContextConstructor(baseAudioContextConstructor,cacheTestResult,createInvalidStateError,createNativeOfflineAudioContext,startRendering),isAnyAudioContext=createIsAnyAudioContext(CONTEXT_STORE,isNativeAudioContext),isAnyAudioNode=createIsAnyAudioNode(AUDIO_NODE_STORE,isNativeAudioNode),isAnyAudioParam=createIsAnyAudioParam(AUDIO_PARAM_STORE,isNativeAudioParam),isAnyOfflineAudioContext=createIsAnyOfflineAudioContext(CONTEXT_STORE,isNativeOfflineAudioContext);function isUndef(tt){return typeof tt>"u"}function isDefined(tt){return!isUndef(tt)}function isFunction$2(tt){return typeof tt=="function"}function isNumber$4(tt){return typeof tt=="number"}function isObject$7(tt){return Object.prototype.toString.call(tt)==="[object Object]"&&tt.constructor===Object}function isBoolean$1(tt){return typeof tt=="boolean"}function isArray$e(tt){return Array.isArray(tt)}function isString$2(tt){return typeof tt=="string"}function isNote(tt){return isString$2(tt)&&/^([a-g]{1}(?:b|#|x|bb)?)(-?[0-9]+)/i.test(tt)}function assert(tt,et){if(!tt)throw new Error(et)}function assertRange(tt,et,nt=1/0){if(!(et<=tt&&tt<=nt))throw new RangeError(`Value must be within [${et}, ${nt}], got: ${tt}`)}function assertContextRunning(tt){!tt.isOffline&&tt.state!=="running"&&warn$2('The AudioContext is "suspended". Invoke Tone.start() from a user action to start the audio.')}let isInsideScheduledCallback=!1,printedScheduledWarning=!1;function enterScheduledCallback(tt){isInsideScheduledCallback=tt}function assertUsedScheduleTime(tt){isUndef(tt)&&isInsideScheduledCallback&&!printedScheduledWarning&&(printedScheduledWarning=!0,warn$2("Events scheduled inside of scheduled callbacks should use the passed in scheduling time. See https://github.com/Tonejs/Tone.js/wiki/Accurate-Timing"))}let defaultLogger=console;function log$1(...tt){defaultLogger.log(...tt)}function warn$2(...tt){defaultLogger.warn(...tt)}function createAudioContext(tt){return new audioContextConstructor(tt)}function createOfflineAudioContext(tt,et,nt){return new offlineAudioContextConstructor(tt,et,nt)}const theWindow=typeof self=="object"?self:null,hasAudioContext=theWindow&&(theWindow.hasOwnProperty("AudioContext")||theWindow.hasOwnProperty("webkitAudioContext"));function createAudioWorkletNode(tt,et,nt){return assert(isDefined(audioWorkletNodeConstructor),"This node only works in a secure context (https or localhost)"),new audioWorkletNodeConstructor(tt,et,nt)}class Ticker{constructor(et,nt,rt,it){this._callback=et,this._type=nt,this._minimumUpdateInterval=Math.max(128/(it||44100),.001),this.updateInterval=rt,this._createClock()}_createWorker(){const et=new Blob([` // the initial timeout time let timeoutTime = ${(this._updateInterval*1e3).toFixed(1)}; // onmessage callback @@ -6498,7 +6498,7 @@ void main() { * @author Yotam Mann * @license http://opensource.org/licenses/MIT MIT License * @copyright 2014-2019 Yotam Mann - */class Tone{constructor(){this.debug=!1,this._wasDisposed=!1}static getDefaults(){return{}}log(...et){(this.debug||theWindow&&this.toString()===theWindow.TONE_DEBUG_CLASS)&&log$1(this,...et)}dispose(){return this._wasDisposed=!0,this}get disposed(){return this._wasDisposed}toString(){return this.name}}Tone.version=version$1;const EPSILON=1e-6;function GT(tt,et){return tt>et+EPSILON}function GTE(tt,et){return GT(tt,et)||EQ(tt,et)}function LT(tt,et){return tt+EPSILONthis.memory){const nt=this.length-this.memory;this._timeline.splice(0,nt)}return this}remove(et){const nt=this._timeline.indexOf(et);return nt!==-1&&this._timeline.splice(nt,1),this}get(et,nt="time"){const rt=this._search(et,nt);return rt!==-1?this._timeline[rt]:null}peek(){return this._timeline[0]}shift(){return this._timeline.shift()}getAfter(et,nt="time"){const rt=this._search(et,nt);return rt+10&&this._timeline[nt-1].time=0?this._timeline[rt-1]:null}cancel(et){if(this._timeline.length>1){let nt=this._search(et);if(nt>=0)if(EQ(this._timeline[nt].time,et)){for(let rt=nt;rt>=0&&EQ(this._timeline[rt].time,et);rt--)nt=rt;this._timeline=this._timeline.slice(0,nt)}else this._timeline=this._timeline.slice(0,nt+1);else this._timeline=[]}else this._timeline.length===1&>E(this._timeline[0].time,et)&&(this._timeline=[]);return this}cancelBefore(et){const nt=this._search(et);return nt>=0&&(this._timeline=this._timeline.slice(nt+1)),this}previousEvent(et){const nt=this._timeline.indexOf(et);return nt>0?this._timeline[nt-1]:null}_search(et,nt="time"){if(this._timeline.length===0)return-1;let rt=0;const it=this._timeline.length;let ot=it;if(it>0&&this._timeline[it-1][nt]<=et)return it-1;for(;rt=0&&this._timeline[rt].time>=et;)rt--;return this._iterate(nt,rt+1),this}forEachAtTime(et,nt){const rt=this._search(et);if(rt!==-1&&EQ(this._timeline[rt].time,et)){let it=rt;for(let ot=rt;ot>=0&&EQ(this._timeline[ot].time,et);ot--)it=ot;this._iterate(ot=>{nt(ot)},it,rt)}return this}dispose(){return super.dispose(),this._timeline=[],this}}const notifyNewContext=[];function onContextInit(tt){notifyNewContext.push(tt)}function initializeContext(tt){notifyNewContext.forEach(et=>et(tt))}const notifyCloseContext=[];function onContextClose(tt){notifyCloseContext.push(tt)}function closeContext(tt){notifyCloseContext.forEach(et=>et(tt))}let Emitter$1=class _w extends Tone{constructor(){super(...arguments),this.name="Emitter"}on(et,nt){return et.split(/\W+/).forEach(it=>{isUndef(this._events)&&(this._events={}),this._events.hasOwnProperty(it)||(this._events[it]=[]),this._events[it].push(nt)}),this}once(et,nt){const rt=(...it)=>{nt(...it),this.off(et,rt)};return this.on(et,rt),this}off(et,nt){return et.split(/\W+/).forEach(it=>{if(isUndef(this._events)&&(this._events={}),this._events.hasOwnProperty(it))if(isUndef(nt))this._events[it]=[];else{const ot=this._events[it];for(let at=ot.length-1;at>=0;at--)ot[at]===nt&&ot.splice(at,1)}}),this}emit(et,...nt){if(this._events&&this._events.hasOwnProperty(et)){const rt=this._events[et].slice(0);for(let it=0,ot=rt.length;it{const rt=Object.getOwnPropertyDescriptor(_w.prototype,nt);Object.defineProperty(et.prototype,nt,rt)})}dispose(){return super.dispose(),this._events=void 0,this}};class BaseContext extends Emitter$1{constructor(){super(...arguments),this.isOffline=!1}toJSON(){return{}}}class Context extends BaseContext{constructor(){var et,nt;super(),this.name="Context",this._constants=new Map,this._timeouts=new Timeline,this._timeoutIds=0,this._initialized=!1,this._closeStarted=!1,this.isOffline=!1,this._workletPromise=null;const rt=optionsFromArguments(Context.getDefaults(),arguments,["context"]);rt.context?(this._context=rt.context,this._latencyHint=((et=arguments[0])===null||et===void 0?void 0:et.latencyHint)||""):(this._context=createAudioContext({latencyHint:rt.latencyHint}),this._latencyHint=rt.latencyHint),this._ticker=new Ticker(this.emit.bind(this,"tick"),rt.clockSource,rt.updateInterval,this._context.sampleRate),this.on("tick",this._timeoutLoop.bind(this)),this._context.onstatechange=()=>{this.emit("statechange",this.state)},this[!((nt=arguments[0])===null||nt===void 0)&&nt.hasOwnProperty("updateInterval")?"_lookAhead":"lookAhead"]=rt.lookAhead}static getDefaults(){return{clockSource:"worker",latencyHint:"interactive",lookAhead:.1,updateInterval:.05}}initialize(){return this._initialized||(initializeContext(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(et,nt,rt){return this._context.createBuffer(et,nt,rt)}createChannelMerger(et){return this._context.createChannelMerger(et)}createChannelSplitter(et){return this._context.createChannelSplitter(et)}createConstantSource(){return this._context.createConstantSource()}createConvolver(){return this._context.createConvolver()}createDelay(et){return this._context.createDelay(et)}createDynamicsCompressor(){return this._context.createDynamicsCompressor()}createGain(){return this._context.createGain()}createIIRFilter(et,nt){return this._context.createIIRFilter(et,nt)}createPanner(){return this._context.createPanner()}createPeriodicWave(et,nt,rt){return this._context.createPeriodicWave(et,nt,rt)}createStereoPanner(){return this._context.createStereoPanner()}createWaveShaper(){return this._context.createWaveShaper()}createMediaStreamSource(et){return assert(isAudioContext(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamSource(et)}createMediaElementSource(et){return assert(isAudioContext(this._context),"Not available if OfflineAudioContext"),this._context.createMediaElementSource(et)}createMediaStreamDestination(){return assert(isAudioContext(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamDestination()}decodeAudioData(et){return this._context.decodeAudioData(et)}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(et){assert(!this._initialized,"The listener cannot be set after initialization."),this._listener=et}get transport(){return this.initialize(),this._transport}set transport(et){assert(!this._initialized,"The transport cannot be set after initialization."),this._transport=et}get draw(){return this.initialize(),this._draw}set draw(et){assert(!this._initialized,"Draw cannot be set after initialization."),this._draw=et}get destination(){return this.initialize(),this._destination}set destination(et){assert(!this._initialized,"The destination cannot be set after initialization."),this._destination=et}createAudioWorkletNode(et,nt){return createAudioWorkletNode(this.rawContext,et,nt)}addAudioWorkletModule(et){return __awaiter(this,void 0,void 0,function*(){assert(isDefined(this.rawContext.audioWorklet),"AudioWorkletNode is only available in a secure context (https or localhost)"),this._workletPromise||(this._workletPromise=this.rawContext.audioWorklet.addModule(et)),yield this._workletPromise})}workletsAreReady(){return __awaiter(this,void 0,void 0,function*(){(yield this._workletPromise)?this._workletPromise:Promise.resolve()})}get updateInterval(){return this._ticker.updateInterval}set updateInterval(et){this._ticker.updateInterval=et}get clockSource(){return this._ticker.type}set clockSource(et){this._ticker.type=et}get lookAhead(){return this._lookAhead}set lookAhead(et){this._lookAhead=et,this.updateInterval=et?et/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 isAudioContext(this._context)?this._context.resume():Promise.resolve()}close(){return __awaiter(this,void 0,void 0,function*(){isAudioContext(this._context)&&this.state!=="closed"&&!this._closeStarted&&(this._closeStarted=!0,yield this._context.close()),this._initialized&&closeContext(this)})}getConstant(et){if(this._constants.has(et))return this._constants.get(et);{const nt=this._context.createBuffer(1,128,this._context.sampleRate),rt=nt.getChannelData(0);for(let ot=0;otthis._constants[et].disconnect()),this.close(),this}_timeoutLoop(){const et=this.now();let nt=this._timeouts.peek();for(;this._timeouts.length&&nt&&nt.time<=et;)nt.callback(),this._timeouts.shift(),nt=this._timeouts.peek()}setTimeout(et,nt){this._timeoutIds++;const rt=this.now();return this._timeouts.add({callback:et,id:this._timeoutIds,time:rt+nt}),this._timeoutIds}clearTimeout(et){return this._timeouts.forEach(nt=>{nt.id===et&&this._timeouts.remove(nt)}),this}clearInterval(et){return this.clearTimeout(et)}setInterval(et,nt){const rt=++this._timeoutIds,it=()=>{const ot=this.now();this._timeouts.add({callback:()=>{et(),it()},id:rt,time:ot+nt})};return it(),rt}}class DummyContext extends BaseContext{constructor(){super(...arguments),this.lookAhead=0,this.latencyHint=0,this.isOffline=!1}createAnalyser(){return{}}createOscillator(){return{}}createBufferSource(){return{}}createBiquadFilter(){return{}}createBuffer(et,nt,rt){return{}}createChannelMerger(et){return{}}createChannelSplitter(et){return{}}createConstantSource(){return{}}createConvolver(){return{}}createDelay(et){return{}}createDynamicsCompressor(){return{}}createGain(){return{}}createIIRFilter(et,nt){return{}}createPanner(){return{}}createPeriodicWave(et,nt,rt){return{}}createStereoPanner(){return{}}createWaveShaper(){return{}}createMediaStreamSource(et){return{}}createMediaElementSource(et){return{}}createMediaStreamDestination(){return{}}decodeAudioData(et){return Promise.resolve({})}createAudioWorkletNode(et,nt){return{}}get rawContext(){return{}}addAudioWorkletModule(et){return __awaiter(this,void 0,void 0,function*(){return Promise.resolve()})}resume(){return Promise.resolve()}setTimeout(et,nt){return 0}clearTimeout(et){return this}setInterval(et,nt){return 0}clearInterval(et){return this}getConstant(et){return{}}get currentTime(){return 0}get state(){return{}}get sampleRate(){return 0}get listener(){return{}}get transport(){return{}}get draw(){return{}}set draw(et){}get destination(){return{}}set destination(et){}now(){return 0}immediate(){return 0}}function readOnly(tt,et){isArray$e(et)?et.forEach(nt=>readOnly(tt,nt)):Object.defineProperty(tt,et,{enumerable:!0,writable:!1})}function writable(tt,et){isArray$e(et)?et.forEach(nt=>writable(tt,nt)):Object.defineProperty(tt,et,{writable:!0})}const noOp=()=>{};class ToneAudioBuffer extends Tone{constructor(){super(),this.name="ToneAudioBuffer",this.onload=noOp;const et=optionsFromArguments(ToneAudioBuffer.getDefaults(),arguments,["url","onload","onerror"]);this.reverse=et.reverse,this.onload=et.onload,isString$2(et.url)?this.load(et.url).catch(et.onerror):et.url&&this.set(et.url)}static getDefaults(){return{onerror:noOp,onload:noOp,reverse:!1}}get sampleRate(){return this._buffer?this._buffer.sampleRate:getContext().sampleRate}set(et){return et instanceof ToneAudioBuffer?et.loaded?this._buffer=et.get():et.onload=()=>{this.set(et),this.onload(this)}:this._buffer=et,this._reversed&&this._reverse(),this}get(){return this._buffer}load(et){return __awaiter(this,void 0,void 0,function*(){const nt=ToneAudioBuffer.load(et).then(rt=>{this.set(rt),this.onload(this)});ToneAudioBuffer.downloads.push(nt);try{yield nt}finally{const rt=ToneAudioBuffer.downloads.indexOf(nt);ToneAudioBuffer.downloads.splice(rt,1)}return this})}dispose(){return super.dispose(),this._buffer=void 0,this}fromArray(et){const nt=isArray$e(et)&&et[0].length>0,rt=nt?et.length:1,it=nt?et[0].length:et.length,ot=getContext(),at=ot.createBuffer(rt,it,ot.sampleRate),st=!nt&&rt===1?[et]:et;for(let lt=0;ltit/rt),this.fromArray(nt)}return this}toArray(et){if(isNumber$4(et))return this.getChannelData(et);if(this.numberOfChannels===1)return this.toArray(0);{const nt=[];for(let rt=0;rt0}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(et){this._reversed!==et&&(this._reversed=et,this._reverse())}static fromArray(et){return new ToneAudioBuffer().fromArray(et)}static fromUrl(et){return __awaiter(this,void 0,void 0,function*(){return yield new ToneAudioBuffer().load(et)})}static load(et){return __awaiter(this,void 0,void 0,function*(){const nt=et.match(/\[([^\]\[]+\|.+)\]$/);if(nt){const lt=nt[1].split("|");let ct=lt[0];for(const ut of lt)if(ToneAudioBuffer.supportsType(ut)){ct=ut;break}et=et.replace(nt[0],ct)}const rt=ToneAudioBuffer.baseUrl===""||ToneAudioBuffer.baseUrl.endsWith("/")?ToneAudioBuffer.baseUrl:ToneAudioBuffer.baseUrl+"/",it=document.createElement("a");it.href=rt+et,it.pathname=(it.pathname+it.hash).split("/").map(encodeURIComponent).join("/");const ot=yield fetch(it.href);if(!ot.ok)throw new Error(`could not load url: ${et}`);const at=yield ot.arrayBuffer();return yield getContext().decodeAudioData(at)})}static supportsType(et){const nt=et.split("."),rt=nt[nt.length-1];return document.createElement("audio").canPlayType("audio/"+rt)!==""}static loaded(){return __awaiter(this,void 0,void 0,function*(){for(yield Promise.resolve();ToneAudioBuffer.downloads.length;)yield ToneAudioBuffer.downloads[0]})}}ToneAudioBuffer.baseUrl="";ToneAudioBuffer.downloads=[];class OfflineContext extends Context{constructor(){super({clockSource:"offline",context:isOfflineAudioContext(arguments[0])?arguments[0]:createOfflineAudioContext(arguments[0],arguments[1]*arguments[2],arguments[2]),lookAhead:0,updateInterval:isOfflineAudioContext(arguments[0])?128/arguments[0].sampleRate:128/arguments[2]}),this.name="OfflineContext",this._currentTime=0,this.isOffline=!0,this._duration=isOfflineAudioContext(arguments[0])?arguments[0].length/arguments[0].sampleRate:arguments[1]}now(){return this._currentTime}get currentTime(){return this._currentTime}_renderClock(et){return __awaiter(this,void 0,void 0,function*(){let nt=0;for(;this._duration-this._currentTime>=0;){this.emit("tick"),this._currentTime+=128/this.sampleRate,nt++;const rt=Math.floor(this.sampleRate/128);et&&nt%rt===0&&(yield new Promise(it=>setTimeout(it,1)))}})}render(et=!0){return __awaiter(this,void 0,void 0,function*(){yield this.workletsAreReady(),yield this._renderClock(et);const nt=yield this._context.startRendering();return new ToneAudioBuffer(nt)})}close(){return Promise.resolve()}}const dummyContext=new DummyContext;let globalContext=dummyContext;function getContext(){return globalContext===dummyContext&&hasAudioContext&&setContext(new Context),globalContext}function setContext(tt,et=!1){et&&globalContext.dispose(),isAudioContext(tt)?globalContext=new Context(tt):isOfflineAudioContext(tt)?globalContext=new OfflineContext(tt):globalContext=tt}function start$1(){return globalContext.resume()}if(theWindow&&!theWindow.TONE_SILENCE_LOGGING){const et=` * Tone.js v${version$1} * `;console.log(`%c${et}`,"background: #000; color: #fff")}function dbToGain(tt){return Math.pow(10,tt/20)}function gainToDb(tt){return 20*(Math.log(tt)/Math.LN10)}function intervalToFrequencyRatio(tt){return Math.pow(2,tt/12)}let A4=440;function getA4(){return A4}function setA4(tt){A4=tt}function ftom(tt){return Math.round(ftomf(tt))}function ftomf(tt){return 69+12*Math.log2(tt/A4)}function mtof(tt){return A4*Math.pow(2,(tt-69)/12)}class TimeBaseClass extends Tone{constructor(et,nt,rt){super(),this.defaultUnits="s",this._val=nt,this._units=rt,this.context=et,this._expressions=this._getExpressions()}_getExpressions(){return{hz:{method:et=>this._frequencyToUnits(parseFloat(et)),regexp:/^(\d+(?:\.\d+)?)hz$/i},i:{method:et=>this._ticksToUnits(parseInt(et,10)),regexp:/^(\d+)i$/i},m:{method:et=>this._beatsToUnits(parseInt(et,10)*this._getTimeSignature()),regexp:/^(\d+)m$/i},n:{method:(et,nt)=>{const rt=parseInt(et,10),it=nt==="."?1.5:1;return rt===1?this._beatsToUnits(this._getTimeSignature())*it:this._beatsToUnits(4/rt)*it},regexp:/^(\d+)n(\.?)$/i},number:{method:et=>this._expressions[this.defaultUnits].method.call(this,et),regexp:/^(\d+(?:\.\d+)?)$/},s:{method:et=>this._secondsToUnits(parseFloat(et)),regexp:/^(\d+(?:\.\d+)?)s$/},samples:{method:et=>parseInt(et,10)/this.context.sampleRate,regexp:/^(\d+)samples$/},t:{method:et=>{const nt=parseInt(et,10);return this._beatsToUnits(8/(Math.floor(nt)*3))},regexp:/^(\d+)t$/i},tr:{method:(et,nt,rt)=>{let it=0;return et&&et!=="0"&&(it+=this._beatsToUnits(this._getTimeSignature()*parseFloat(et))),nt&&nt!=="0"&&(it+=this._beatsToUnits(parseFloat(nt))),rt&&rt!=="0"&&(it+=this._beatsToUnits(parseFloat(rt)/4)),it},regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/}}}valueOf(){if(this._val instanceof TimeBaseClass&&this.fromType(this._val),isUndef(this._val))return this._noArg();if(isString$2(this._val)&&isUndef(this._units)){for(const et in this._expressions)if(this._expressions[et].regexp.test(this._val.trim())){this._units=et;break}}else if(isObject$7(this._val)){let et=0;for(const nt in this._val)if(isDefined(this._val[nt])){const rt=this._val[nt],it=new this.constructor(this.context,nt).valueOf()*rt;et+=it}return et}if(isDefined(this._units)){const et=this._expressions[this._units],nt=this._val.toString().trim().match(et.regexp);return nt?et.method.apply(this,nt.slice(1)):et.method.call(this,this._val)}else return isString$2(this._val)?parseFloat(this._val):this._val}_frequencyToUnits(et){return 1/et}_beatsToUnits(et){return 60/this._getBpm()*et}_secondsToUnits(et){return et}_ticksToUnits(et){return et*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(et){switch(this._units=void 0,this.defaultUnits){case"s":this._val=et.toSeconds();break;case"i":this._val=et.toTicks();break;case"hz":this._val=et.toFrequency();break;case"midi":this._val=et.toMidi();break}return this}toFrequency(){return 1/this.toSeconds()}toSamples(){return this.toSeconds()*this.context.sampleRate}toMilliseconds(){return this.toSeconds()*1e3}}class TimeClass extends TimeBaseClass{constructor(){super(...arguments),this.name="TimeClass"}_getExpressions(){return Object.assign(super._getExpressions(),{now:{method:et=>this._now()+new this.constructor(this.context,et).valueOf(),regexp:/^\+(.+)/},quantize:{method:et=>{const nt=new TimeClass(this.context,et).valueOf();return this._secondsToUnits(this.context.transport.nextSubdivision(nt))},regexp:/^@(.+)/}})}quantize(et,nt=1){const rt=new this.constructor(this.context,et).valueOf(),it=this.valueOf(),st=Math.round(it/rt)*rt-it;return it+st*nt}toNotation(){const et=this.toSeconds(),nt=["1m"];for(let ot=1;ot<9;ot++){const at=Math.pow(2,ot);nt.push(at+"n."),nt.push(at+"n"),nt.push(at+"t")}nt.push("0");let rt=nt[0],it=new TimeClass(this.context,nt[0]).toSeconds();return nt.forEach(ot=>{const at=new TimeClass(this.context,ot).toSeconds();Math.abs(at-et)3&&(it=parseFloat(parseFloat(ot).toFixed(3))),[rt,nt,it].join(":")}toTicks(){const et=this._beatsToUnits(1);return this.valueOf()/et*this._getPPQ()}toSeconds(){return this.valueOf()}toMidi(){return ftom(this.toFrequency())}_now(){return this.context.now()}}class FrequencyClass extends TimeClass{constructor(){super(...arguments),this.name="Frequency",this.defaultUnits="hz"}static get A4(){return getA4()}static set A4(et){setA4(et)}_getExpressions(){return Object.assign({},super._getExpressions(),{midi:{regexp:/^(\d+(?:\.\d+)?midi)/,method(et){return this.defaultUnits==="midi"?et:FrequencyClass.mtof(et)}},note:{regexp:/^([a-g]{1}(?:b|#|##|x|bb|###|#x|x#|bbb)?)(-?[0-9]+)/i,method(et,nt){const it=noteToScaleIndex[et.toLowerCase()]+(parseInt(nt,10)+1)*12;return this.defaultUnits==="midi"?it:FrequencyClass.mtof(it)}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method(et,nt,rt){let it=1;return et&&et!=="0"&&(it*=this._beatsToUnits(this._getTimeSignature()*parseFloat(et))),nt&&nt!=="0"&&(it*=this._beatsToUnits(parseFloat(nt))),rt&&rt!=="0"&&(it*=this._beatsToUnits(parseFloat(rt)/4)),it}}})}transpose(et){return new FrequencyClass(this.context,this.valueOf()*intervalToFrequencyRatio(et))}harmonize(et){return et.map(nt=>this.transpose(nt))}toMidi(){return ftom(this.valueOf())}toNote(){const et=this.toFrequency(),nt=Math.log2(et/FrequencyClass.A4);let rt=Math.round(12*nt)+57;const it=Math.floor(rt/12);return it<0&&(rt+=-12*it),scaleIndexToNote[rt%12]+it.toString()}toSeconds(){return 1/super.toSeconds()}toTicks(){const et=this._beatsToUnits(1),nt=this.valueOf()/et;return Math.floor(nt*this._getPPQ())}_noArg(){return 0}_frequencyToUnits(et){return et}_ticksToUnits(et){return 1/(et*60/(this._getBpm()*this._getPPQ()))}_beatsToUnits(et){return 1/super._beatsToUnits(et)}_secondsToUnits(et){return 1/et}static mtof(et){return mtof(et)}static ftom(et){return ftom(et)}}const noteToScaleIndex={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},scaleIndexToNote=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"];class TransportTimeClass extends TimeClass{constructor(){super(...arguments),this.name="TransportTime"}_now(){return this.context.transport.seconds}}class ToneWithContext extends Tone{constructor(){super();const et=optionsFromArguments(ToneWithContext.getDefaults(),arguments,["context"]);this.defaultContext?this.context=this.defaultContext:this.context=et.context}static getDefaults(){return{context:getContext()}}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(et){return assertUsedScheduleTime(et),new TimeClass(this.context,et).toSeconds()}toFrequency(et){return new FrequencyClass(this.context,et).toFrequency()}toTicks(et){return new TransportTimeClass(this.context,et).toTicks()}_getPartialProperties(et){const nt=this.get();return Object.keys(nt).forEach(rt=>{isUndef(et[rt])&&delete nt[rt]}),nt}get(){const et=getDefaultsFromInstance(this);return Object.keys(et).forEach(nt=>{if(Reflect.has(this,nt)){const rt=this[nt];isDefined(rt)&&isDefined(rt.value)&&isDefined(rt.setValueAtTime)?et[nt]=rt.value:rt instanceof ToneWithContext?et[nt]=rt._getPartialProperties(et[nt]):isArray$e(rt)||isNumber$4(rt)||isString$2(rt)||isBoolean$1(rt)?et[nt]=rt:delete et[nt]}}),et}set(et){return Object.keys(et).forEach(nt=>{Reflect.has(this,nt)&&isDefined(this[nt])&&(this[nt]&&isDefined(this[nt].value)&&isDefined(this[nt].setValueAtTime)?this[nt].value!==et[nt]&&(this[nt].value=et[nt]):this[nt]instanceof ToneWithContext?this[nt].set(et[nt]):this[nt]=et[nt])}),this}}class StateTimeline extends Timeline{constructor(et="stopped"){super(),this.name="StateTimeline",this._initial=et,this.setStateAtTime(this._initial,0)}getValueAtTime(et){const nt=this.get(et);return nt!==null?nt.state:this._initial}setStateAtTime(et,nt,rt){return assertRange(nt,0),this.add(Object.assign({},rt,{state:et,time:nt})),this}getLastState(et,nt){const rt=this._search(nt);for(let it=rt;it>=0;it--){const ot=this._timeline[it];if(ot.state===et)return ot}}getNextState(et,nt){const rt=this._search(nt);if(rt!==-1)for(let it=rt;it0,"timeConstant must be a number greater than 0");const ot=this.toSeconds(nt);return this._assertRange(it),assert(isFinite(it)&&isFinite(ot),`Invalid argument(s) to setTargetAtTime: ${JSON.stringify(et)}, ${JSON.stringify(nt)}`),this._events.add({constant:rt,time:ot,type:"setTargetAtTime",value:it}),this.log(this.units,"setTargetAtTime",et,ot,rt),this._param.setTargetAtTime(it,ot,rt),this}setValueCurveAtTime(et,nt,rt,it=1){rt=this.toSeconds(rt),nt=this.toSeconds(nt);const ot=this._fromType(et[0])*it;this.setValueAtTime(this._toType(ot),nt);const at=rt/(et.length-1);for(let st=1;st{it.type==="cancelScheduledValues"?et.cancelScheduledValues(it.time):it.type==="setTargetAtTime"?et.setTargetAtTime(it.value,it.time,it.constant):et[it.type](it.value,it.time)}),this}setParam(et){assert(this._swappable,"The Param must be assigned as 'swappable' in the constructor");const nt=this.input;return nt.disconnect(this._param),this.apply(et),this._param=et,nt.connect(this._param),this}dispose(){return super.dispose(),this._events.dispose(),this}get defaultValue(){return this._toType(this._param.defaultValue)}_exponentialApproach(et,nt,rt,it,ot){return rt+(nt-rt)*Math.exp(-(ot-et)/it)}_linearInterpolate(et,nt,rt,it,ot){return nt+(it-nt)*((ot-et)/(rt-et))}_exponentialInterpolate(et,nt,rt,it,ot){return nt*Math.pow(it/nt,(ot-et)/(rt-et))}}class ToneAudioNode extends ToneWithContext{constructor(){super(...arguments),this._internalChannels=[]}get numberOfInputs(){return isDefined(this.input)?isAudioParam(this.input)||this.input instanceof Param?1:this.input.numberOfInputs:0}get numberOfOutputs(){return isDefined(this.output)?this.output.numberOfOutputs:0}_isAudioNode(et){return isDefined(et)&&(et instanceof ToneAudioNode||isAudioNode(et))}_getInternalNodes(){const et=this._internalChannels.slice(0);return this._isAudioNode(this.input)&&et.push(this.input),this._isAudioNode(this.output)&&this.input!==this.output&&et.push(this.output),et}_setChannelProperties(et){this._getInternalNodes().forEach(rt=>{rt.channelCount=et.channelCount,rt.channelCountMode=et.channelCountMode,rt.channelInterpretation=et.channelInterpretation})}_getChannelProperties(){const et=this._getInternalNodes();assert(et.length>0,"ToneAudioNode does not have any internal nodes");const nt=et[0];return{channelCount:nt.channelCount,channelCountMode:nt.channelCountMode,channelInterpretation:nt.channelInterpretation}}get channelCount(){return this._getChannelProperties().channelCount}set channelCount(et){const nt=this._getChannelProperties();this._setChannelProperties(Object.assign(nt,{channelCount:et}))}get channelCountMode(){return this._getChannelProperties().channelCountMode}set channelCountMode(et){const nt=this._getChannelProperties();this._setChannelProperties(Object.assign(nt,{channelCountMode:et}))}get channelInterpretation(){return this._getChannelProperties().channelInterpretation}set channelInterpretation(et){const nt=this._getChannelProperties();this._setChannelProperties(Object.assign(nt,{channelInterpretation:et}))}connect(et,nt=0,rt=0){return connect(this,et,nt,rt),this}toDestination(){return this.connect(this.context.destination),this}toMaster(){return warn$2("toMaster() has been renamed toDestination()"),this.toDestination()}disconnect(et,nt=0,rt=0){return disconnect(this,et,nt,rt),this}chain(...et){return connectSeries(this,...et),this}fan(...et){return et.forEach(nt=>this.connect(nt)),this}dispose(){return super.dispose(),isDefined(this.input)&&(this.input instanceof ToneAudioNode?this.input.dispose():isAudioNode(this.input)&&this.input.disconnect()),isDefined(this.output)&&(this.output instanceof ToneAudioNode?this.output.dispose():isAudioNode(this.output)&&this.output.disconnect()),this._internalChannels=[],this}}function connectSeries(...tt){const et=tt.shift();tt.reduce((nt,rt)=>(nt instanceof ToneAudioNode?nt.connect(rt):isAudioNode(nt)&&connect(nt,rt),rt),et)}function connect(tt,et,nt=0,rt=0){for(assert(isDefined(tt),"Cannot connect from undefined node"),assert(isDefined(et),"Cannot connect to undefined node"),(et instanceof ToneAudioNode||isAudioNode(et))&&assert(et.numberOfInputs>0,"Cannot connect to node with no inputs"),assert(tt.numberOfOutputs>0,"Cannot connect from node with no outputs");et instanceof ToneAudioNode||et instanceof Param;)isDefined(et.input)&&(et=et.input);for(;tt instanceof ToneAudioNode;)isDefined(tt.output)&&(tt=tt.output);isAudioParam(et)?tt.connect(et,nt):tt.connect(et,nt,rt)}function disconnect(tt,et,nt=0,rt=0){if(isDefined(et))for(;et instanceof ToneAudioNode;)et=et.input;for(;!isAudioNode(tt);)isDefined(tt.output)&&(tt=tt.output);isAudioParam(et)?tt.disconnect(et,nt):isAudioNode(et)?tt.disconnect(et,nt,rt):tt.disconnect()}class Gain extends ToneAudioNode{constructor(){super(optionsFromArguments(Gain.getDefaults(),arguments,["gain","units"])),this.name="Gain",this._gainNode=this.context.createGain(),this.input=this._gainNode,this.output=this._gainNode;const et=optionsFromArguments(Gain.getDefaults(),arguments,["gain","units"]);this.gain=new Param({context:this.context,convert:et.convert,param:this._gainNode.gain,units:et.units,value:et.gain,minValue:et.minValue,maxValue:et.maxValue}),readOnly(this,"gain")}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{convert:!0,gain:1,units:"gain"})}dispose(){return super.dispose(),this._gainNode.disconnect(),this.gain.dispose(),this}}class OneShotSource extends ToneAudioNode{constructor(et){super(et),this.onended=noOp,this._startTime=-1,this._stopTime=-1,this._timeout=-1,this.output=new Gain({context:this.context,gain:0}),this._gainNode=this.output,this.getStateAtTime=function(nt){const rt=this.toSeconds(nt);return this._startTime!==-1&&rt>=this._startTime&&(this._stopTime===-1||rt<=this._stopTime)?"started":"stopped"},this._fadeIn=et.fadeIn,this._fadeOut=et.fadeOut,this._curve=et.curve,this.onended=et.onended}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{curve:"linear",fadeIn:0,fadeOut:0,onended:noOp})}_startGain(et,nt=1){assert(this._startTime===-1,"Source cannot be started more than once");const rt=this.toSeconds(this._fadeIn);return this._startTime=et+rt,this._startTime=Math.max(this._startTime,this.context.currentTime),rt>0?(this._gainNode.gain.setValueAtTime(0,et),this._curve==="linear"?this._gainNode.gain.linearRampToValueAtTime(nt,et+rt):this._gainNode.gain.exponentialApproachValueAtTime(nt,et,rt)):this._gainNode.gain.setValueAtTime(nt,et),this}stop(et){return this.log("stop",et),this._stopGain(this.toSeconds(et)),this}_stopGain(et){assert(this._startTime!==-1,"'start' must be called before 'stop'"),this.cancelStop();const nt=this.toSeconds(this._fadeOut);return this._stopTime=this.toSeconds(et)+nt,this._stopTime=Math.max(this._stopTime,this.now()),nt>0?this._curve==="linear"?this._gainNode.gain.linearRampTo(0,nt,et):this._gainNode.gain.targetRampTo(0,nt,et):(this._gainNode.gain.cancelAndHoldAtTime(et),this._gainNode.gain.setValueAtTime(0,et)),this.context.clearTimeout(this._timeout),this._timeout=this.context.setTimeout(()=>{const rt=this._curve==="exponential"?nt*2:0;this._stopSource(this.now()+rt),this._onended()},this._stopTime-this.context.currentTime),this}_onended(){if(this.onended!==noOp&&(this.onended(this),this.onended=noOp,!this.context.isOffline)){const et=()=>this.dispose();typeof window.requestIdleCallback<"u"?window.requestIdleCallback(et):setTimeout(et,1e3)}}get state(){return this.getStateAtTime(this.now())}cancelStop(){return this.log("cancelStop"),assert(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=noOp,this}}class ToneConstantSource extends OneShotSource{constructor(){super(optionsFromArguments(ToneConstantSource.getDefaults(),arguments,["offset"])),this.name="ToneConstantSource",this._source=this.context.createConstantSource();const et=optionsFromArguments(ToneConstantSource.getDefaults(),arguments,["offset"]);connect(this._source,this._gainNode),this.offset=new Param({context:this.context,convert:et.convert,param:this._source.offset,units:et.units,value:et.offset,minValue:et.minValue,maxValue:et.maxValue})}static getDefaults(){return Object.assign(OneShotSource.getDefaults(),{convert:!0,offset:1,units:"number"})}start(et){const nt=this.toSeconds(et);return this.log("start",nt),this._startGain(nt),this._source.start(nt),this}_stopSource(et){this._source.stop(et)}dispose(){return super.dispose(),this.state==="started"&&this.stop(),this._source.disconnect(),this.offset.dispose(),this}}class Signal extends ToneAudioNode{constructor(){super(optionsFromArguments(Signal.getDefaults(),arguments,["value","units"])),this.name="Signal",this.override=!0;const et=optionsFromArguments(Signal.getDefaults(),arguments,["value","units"]);this.output=this._constantSource=new ToneConstantSource({context:this.context,convert:et.convert,offset:et.value,units:et.units,minValue:et.minValue,maxValue:et.maxValue}),this._constantSource.start(0),this.input=this._param=this._constantSource.offset}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{convert:!0,units:"number",value:0})}connect(et,nt=0,rt=0){return connectSignal(this,et,nt,rt),this}dispose(){return super.dispose(),this._param.dispose(),this._constantSource.dispose(),this}setValueAtTime(et,nt){return this._param.setValueAtTime(et,nt),this}getValueAtTime(et){return this._param.getValueAtTime(et)}setRampPoint(et){return this._param.setRampPoint(et),this}linearRampToValueAtTime(et,nt){return this._param.linearRampToValueAtTime(et,nt),this}exponentialRampToValueAtTime(et,nt){return this._param.exponentialRampToValueAtTime(et,nt),this}exponentialRampTo(et,nt,rt){return this._param.exponentialRampTo(et,nt,rt),this}linearRampTo(et,nt,rt){return this._param.linearRampTo(et,nt,rt),this}targetRampTo(et,nt,rt){return this._param.targetRampTo(et,nt,rt),this}exponentialApproachValueAtTime(et,nt,rt){return this._param.exponentialApproachValueAtTime(et,nt,rt),this}setTargetAtTime(et,nt,rt){return this._param.setTargetAtTime(et,nt,rt),this}setValueCurveAtTime(et,nt,rt,it){return this._param.setValueCurveAtTime(et,nt,rt,it),this}cancelScheduledValues(et){return this._param.cancelScheduledValues(et),this}cancelAndHoldAtTime(et){return this._param.cancelAndHoldAtTime(et),this}rampTo(et,nt,rt){return this._param.rampTo(et,nt,rt),this}get value(){return this._param.value}set value(et){this._param.value=et}get convert(){return this._param.convert}set convert(et){this._param.convert=et}get units(){return this._param.units}get overridden(){return this._param.overridden}set overridden(et){this._param.overridden=et}get maxValue(){return this._param.maxValue}get minValue(){return this._param.minValue}apply(et){return this._param.apply(et),this}}function connectSignal(tt,et,nt,rt){(et instanceof Param||isAudioParam(et)||et instanceof Signal&&et.override)&&(et.cancelScheduledValues(0),et.setValueAtTime(0,0),et instanceof Signal&&(et.overridden=!0)),connect(tt,et,nt,rt)}class TickParam extends Param{constructor(){super(optionsFromArguments(TickParam.getDefaults(),arguments,["value"])),this.name="TickParam",this._events=new Timeline(1/0),this._multiplier=1;const et=optionsFromArguments(TickParam.getDefaults(),arguments,["value"]);this._multiplier=et.multiplier,this._events.cancel(0),this._events.add({ticks:0,time:0,type:"setValueAtTime",value:this._fromType(et.value)}),this.setValueAtTime(et.value,0)}static getDefaults(){return Object.assign(Param.getDefaults(),{multiplier:1,units:"hertz",value:1})}setTargetAtTime(et,nt,rt){nt=this.toSeconds(nt),this.setRampPoint(nt);const it=this._fromType(et),ot=this._events.get(nt),at=Math.round(Math.max(1/rt,1));for(let st=0;st<=at;st++){const lt=rt*st+nt,ct=this._exponentialApproach(ot.time,ot.value,it,rt,lt);this.linearRampToValueAtTime(this._toType(ct),lt)}return this}setValueAtTime(et,nt){const rt=this.toSeconds(nt);super.setValueAtTime(et,nt);const it=this._events.get(rt),ot=this._events.previousEvent(it),at=this._getTicksUntilEvent(ot,rt);return it.ticks=Math.max(at,0),this}linearRampToValueAtTime(et,nt){const rt=this.toSeconds(nt);super.linearRampToValueAtTime(et,nt);const it=this._events.get(rt),ot=this._events.previousEvent(it),at=this._getTicksUntilEvent(ot,rt);return it.ticks=Math.max(at,0),this}exponentialRampToValueAtTime(et,nt){nt=this.toSeconds(nt);const rt=this._fromType(et),it=this._events.get(nt),ot=Math.round(Math.max((nt-it.time)*10,1)),at=(nt-it.time)/ot;for(let st=0;st<=ot;st++){const lt=at*st+it.time,ct=this._exponentialInterpolate(it.time,it.value,nt,rt,lt);this.linearRampToValueAtTime(this._toType(ct),lt)}return this}_getTicksUntilEvent(et,nt){if(et===null)et={ticks:0,time:0,type:"setValueAtTime",value:0};else if(isUndef(et.ticks)){const at=this._events.previousEvent(et);et.ticks=this._getTicksUntilEvent(at,et.time)}const rt=this._fromType(this.getValueAtTime(et.time));let it=this._fromType(this.getValueAtTime(nt));const ot=this._events.get(nt);return ot&&ot.time===nt&&ot.type==="setValueAtTime"&&(it=this._fromType(this.getValueAtTime(nt-this.sampleTime))),.5*(nt-et.time)*(rt+it)+et.ticks}getTicksAtTime(et){const nt=this.toSeconds(et),rt=this._events.get(nt);return Math.max(this._getTicksUntilEvent(rt,nt),0)}getDurationOfTicks(et,nt){const rt=this.toSeconds(nt),it=this.getTicksAtTime(nt);return this.getTimeOfTick(it+et)-rt}getTimeOfTick(et){const nt=this._events.get(et,"ticks"),rt=this._events.getAfter(et,"ticks");if(nt&&nt.ticks===et)return nt.time;if(nt&&rt&&rt.type==="linearRampToValueAtTime"&&nt.value!==rt.value){const it=this._fromType(this.getValueAtTime(nt.time)),at=(this._fromType(this.getValueAtTime(rt.time))-it)/(rt.time-nt.time),st=Math.sqrt(Math.pow(it,2)-2*at*(nt.ticks-et)),lt=(-it+st)/at,ct=(-it-st)/at;return(lt>0?lt:ct)+nt.time}else return nt?nt.value===0?1/0:nt.time+(et-nt.ticks)/nt.value:et/this._initialValue}ticksToTime(et,nt){return this.getDurationOfTicks(et,nt)}timeToTicks(et,nt){const rt=this.toSeconds(nt),it=this.toSeconds(et),ot=this.getTicksAtTime(rt);return this.getTicksAtTime(rt+it)-ot}_fromType(et){return this.units==="bpm"&&this.multiplier?1/(60/et/this.multiplier):super._fromType(et)}_toType(et){return this.units==="bpm"&&this.multiplier?et/this.multiplier*60:super._toType(et)}get multiplier(){return this._multiplier}set multiplier(et){const nt=this.value;this._multiplier=et,this.cancelScheduledValues(0),this.setValueAtTime(nt,0)}}class TickSignal extends Signal{constructor(){super(optionsFromArguments(TickSignal.getDefaults(),arguments,["value"])),this.name="TickSignal";const et=optionsFromArguments(TickSignal.getDefaults(),arguments,["value"]);this.input=this._param=new TickParam({context:this.context,convert:et.convert,multiplier:et.multiplier,param:this._constantSource.offset,units:et.units,value:et.value})}static getDefaults(){return Object.assign(Signal.getDefaults(),{multiplier:1,units:"hertz",value:1})}ticksToTime(et,nt){return this._param.ticksToTime(et,nt)}timeToTicks(et,nt){return this._param.timeToTicks(et,nt)}getTimeOfTick(et){return this._param.getTimeOfTick(et)}getDurationOfTicks(et,nt){return this._param.getDurationOfTicks(et,nt)}getTicksAtTime(et){return this._param.getTicksAtTime(et)}get multiplier(){return this._param.multiplier}set multiplier(et){this._param.multiplier=et}dispose(){return super.dispose(),this._param.dispose(),this}}class TickSource extends ToneWithContext{constructor(){super(optionsFromArguments(TickSource.getDefaults(),arguments,["frequency"])),this.name="TickSource",this._state=new StateTimeline,this._tickOffset=new Timeline,this._ticksAtTime=new Timeline,this._secondsAtTime=new Timeline;const et=optionsFromArguments(TickSource.getDefaults(),arguments,["frequency"]);this.frequency=new TickSignal({context:this.context,units:et.units,value:et.frequency}),readOnly(this,"frequency"),this._state.setStateAtTime("stopped",0),this.setTicksAtTime(0,0)}static getDefaults(){return Object.assign({frequency:1,units:"hertz"},ToneWithContext.getDefaults())}get state(){return this.getStateAtTime(this.now())}start(et,nt){const rt=this.toSeconds(et);return this._state.getValueAtTime(rt)!=="started"&&(this._state.setStateAtTime("started",rt),isDefined(nt)&&this.setTicksAtTime(nt,rt),this._ticksAtTime.cancel(rt),this._secondsAtTime.cancel(rt)),this}stop(et){const nt=this.toSeconds(et);if(this._state.getValueAtTime(nt)==="stopped"){const rt=this._state.get(nt);rt&&rt.time>0&&(this._tickOffset.cancel(rt.time),this._state.cancel(rt.time))}return this._state.cancel(nt),this._state.setStateAtTime("stopped",nt),this.setTicksAtTime(0,nt),this._ticksAtTime.cancel(nt),this._secondsAtTime.cancel(nt),this}pause(et){const nt=this.toSeconds(et);return this._state.getValueAtTime(nt)==="started"&&(this._state.setStateAtTime("paused",nt),this._ticksAtTime.cancel(nt),this._secondsAtTime.cancel(nt)),this}cancel(et){return et=this.toSeconds(et),this._state.cancel(et),this._tickOffset.cancel(et),this._ticksAtTime.cancel(et),this._secondsAtTime.cancel(et),this}getTicksAtTime(et){const nt=this.toSeconds(et),rt=this._state.getLastState("stopped",nt),it=this._ticksAtTime.get(nt),ot={state:"paused",time:nt};this._state.add(ot);let at=it||rt,st=it?it.ticks:0,lt=null;return this._state.forEachBetween(at.time,nt+this.sampleTime,ct=>{let ut=at.time;const ht=this._tickOffset.get(ct.time);ht&&ht.time>=at.time&&(st=ht.ticks,ut=ht.time),at.state==="started"&&ct.state!=="started"&&(st+=this.frequency.getTicksAtTime(ct.time)-this.frequency.getTicksAtTime(ut),ct.time!=ot.time&&(lt={state:ct.state,time:ct.time,ticks:st})),at=ct}),this._state.remove(ot),lt&&this._ticksAtTime.add(lt),st}get ticks(){return this.getTicksAtTime(this.now())}set ticks(et){this.setTicksAtTime(et,this.now())}get seconds(){return this.getSecondsAtTime(this.now())}set seconds(et){const nt=this.now(),rt=this.frequency.timeToTicks(et,nt);this.setTicksAtTime(rt,nt)}getSecondsAtTime(et){et=this.toSeconds(et);const nt=this._state.getLastState("stopped",et),rt={state:"paused",time:et};this._state.add(rt);const it=this._secondsAtTime.get(et);let ot=it||nt,at=it?it.seconds:0,st=null;return this._state.forEachBetween(ot.time,et+this.sampleTime,lt=>{let ct=ot.time;const ut=this._tickOffset.get(lt.time);ut&&ut.time>=ot.time&&(at=ut.seconds,ct=ut.time),ot.state==="started"&<.state!=="started"&&(at+=lt.time-ct,lt.time!=rt.time&&(st={state:lt.state,time:lt.time,seconds:at})),ot=lt}),this._state.remove(rt),st&&this._secondsAtTime.add(st),at}setTicksAtTime(et,nt){return nt=this.toSeconds(nt),this._tickOffset.cancel(nt),this._tickOffset.add({seconds:this.frequency.getDurationOfTicks(et,nt),ticks:et,time:nt}),this._ticksAtTime.cancel(nt),this._secondsAtTime.cancel(nt),this}getStateAtTime(et){return et=this.toSeconds(et),this._state.getValueAtTime(et)}getTimeOfTick(et,nt=this.now()){const rt=this._tickOffset.get(nt),it=this._state.get(nt),ot=Math.max(rt.time,it.time),at=this.frequency.getTicksAtTime(ot)+et-rt.ticks;return this.frequency.getTimeOfTick(at)}forEachTickBetween(et,nt,rt){let it=this._state.get(et);this._state.forEachBetween(et,nt,at=>{it&&it.state==="started"&&at.state!=="started"&&this.forEachTickBetween(Math.max(it.time,et),at.time-this.sampleTime,rt),it=at});let ot=null;if(it&&it.state==="started"){const at=Math.max(it.time,et),st=this.frequency.getTicksAtTime(at),lt=this.frequency.getTicksAtTime(it.time),ct=st-lt;let ut=Math.ceil(ct)-ct;ut=EQ(ut,1)?0:ut;let ht=this.frequency.getTimeOfTick(st+ut);for(;ht{switch(rt.state){case"started":const it=this._tickSource.getTicksAtTime(rt.time);this.emit("start",rt.time,it);break;case"stopped":rt.time!==0&&this.emit("stop",rt.time);break;case"paused":this.emit("pause",rt.time);break}}),this._tickSource.forEachTickBetween(et,nt,(rt,it)=>{this.callback(rt,it)}))}getStateAtTime(et){const nt=this.toSeconds(et);return this._state.getValueAtTime(nt)}dispose(){return super.dispose(),this.context.off("tick",this._boundLoop),this._tickSource.dispose(),this._state.dispose(),this}}Emitter$1.mixin(Clock);class ToneAudioBuffers extends Tone{constructor(){super(),this.name="ToneAudioBuffers",this._buffers=new Map,this._loadingCount=0;const et=optionsFromArguments(ToneAudioBuffers.getDefaults(),arguments,["urls","onload","baseUrl"],"urls");this.baseUrl=et.baseUrl,Object.keys(et.urls).forEach(nt=>{this._loadingCount++;const rt=et.urls[nt];this.add(nt,rt,this._bufferLoaded.bind(this,et.onload),et.onerror)})}static getDefaults(){return{baseUrl:"",onerror:noOp,onload:noOp,urls:{}}}has(et){return this._buffers.has(et.toString())}get(et){return assert(this.has(et),`ToneAudioBuffers has no buffer named: ${et}`),this._buffers.get(et.toString())}_bufferLoaded(et){this._loadingCount--,this._loadingCount===0&&et&&et()}get loaded(){return Array.from(this._buffers).every(([et,nt])=>nt.loaded)}add(et,nt,rt=noOp,it=noOp){return isString$2(nt)?(this.baseUrl&&nt.trim().substring(0,11).toLowerCase()==="data:audio/"&&(this.baseUrl=""),this._buffers.set(et.toString(),new ToneAudioBuffer(this.baseUrl+nt,rt,it))):this._buffers.set(et.toString(),new ToneAudioBuffer(nt,rt,it)),this}dispose(){return super.dispose(),this._buffers.forEach(et=>et.dispose()),this._buffers.clear(),this}}class TicksClass extends TransportTimeClass{constructor(){super(...arguments),this.name="Ticks",this.defaultUnits="i"}_now(){return this.context.transport.ticks}_beatsToUnits(et){return this._getPPQ()*et}_secondsToUnits(et){return Math.floor(et/(60/this._getBpm())*this._getPPQ())}_ticksToUnits(et){return et}toTicks(){return this.valueOf()}toSeconds(){return this.valueOf()/this._getPPQ()*(60/this._getBpm())}}class Draw extends ToneWithContext{constructor(){super(...arguments),this.name="Draw",this.expiration=.25,this.anticipation=.008,this._events=new Timeline,this._boundDrawLoop=this._drawLoop.bind(this),this._animationFrame=-1}schedule(et,nt){return this._events.add({callback:et,time:this.toSeconds(nt)}),this._events.length===1&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop)),this}cancel(et){return this._events.cancel(this.toSeconds(et)),this}_drawLoop(){const et=this.context.currentTime;for(;this._events.length&&this._events.peek().time-this.anticipation<=et;){const nt=this._events.shift();nt&&et-nt.time<=this.expiration&&nt.callback()}this._events.length>0&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop))}dispose(){return super.dispose(),this._events.dispose(),cancelAnimationFrame(this._animationFrame),this}}onContextInit(tt=>{tt.draw=new Draw({context:tt})});onContextClose(tt=>{tt.draw.dispose()});class IntervalTimeline extends Tone{constructor(){super(...arguments),this.name="IntervalTimeline",this._root=null,this._length=0}add(et){assert(isDefined(et.time),"Events must have a time property"),assert(isDefined(et.duration),"Events must have a duration parameter"),et.time=et.time.valueOf();let nt=new IntervalNode(et.time,et.time+et.duration,et);for(this._root===null?this._root=nt:this._root.insert(nt),this._length++;nt!==null;)nt.updateHeight(),nt.updateMax(),this._rebalance(nt),nt=nt.parent;return this}remove(et){if(this._root!==null){const nt=[];this._root.search(et.time,nt);for(const rt of nt)if(rt.event===et){this._removeNode(rt),this._length--;break}}return this}get length(){return this._length}cancel(et){return this.forEachFrom(et,nt=>this.remove(nt)),this}_setRoot(et){this._root=et,this._root!==null&&(this._root.parent=null)}_replaceNodeInParent(et,nt){et.parent!==null?(et.isLeftChild()?et.parent.left=nt:et.parent.right=nt,this._rebalance(et.parent)):this._setRoot(nt)}_removeNode(et){if(et.left===null&&et.right===null)this._replaceNodeInParent(et,null);else if(et.right===null)this._replaceNodeInParent(et,et.left);else if(et.left===null)this._replaceNodeInParent(et,et.right);else{const nt=et.getBalance();let rt,it=null;if(nt>0)if(et.left.right===null)rt=et.left,rt.right=et.right,it=rt;else{for(rt=et.left.right;rt.right!==null;)rt=rt.right;rt.parent&&(rt.parent.right=rt.left,it=rt.parent,rt.left=et.left,rt.right=et.right)}else if(et.right.left===null)rt=et.right,rt.left=et.left,it=rt;else{for(rt=et.right.left;rt.left!==null;)rt=rt.left;rt.parent&&(rt.parent.left=rt.right,it=rt.parent,rt.left=et.left,rt.right=et.right)}et.parent!==null?et.isLeftChild()?et.parent.left=rt:et.parent.right=rt:this._setRoot(rt),it&&this._rebalance(it)}et.dispose()}_rotateLeft(et){const nt=et.parent,rt=et.isLeftChild(),it=et.right;it&&(et.right=it.left,it.left=et),nt!==null?rt?nt.left=it:nt.right=it:this._setRoot(it)}_rotateRight(et){const nt=et.parent,rt=et.isLeftChild(),it=et.left;it&&(et.left=it.right,it.right=et),nt!==null?rt?nt.left=it:nt.right=it:this._setRoot(it)}_rebalance(et){const nt=et.getBalance();nt>1&&et.left?et.left.getBalance()<0?this._rotateLeft(et.left):this._rotateRight(et):nt<-1&&et.right&&(et.right.getBalance()>0?this._rotateRight(et.right):this._rotateLeft(et))}get(et){if(this._root!==null){const nt=[];if(this._root.search(et,nt),nt.length>0){let rt=nt[0];for(let it=1;itrt.low&&(rt=nt[it]);return rt.event}}return null}forEach(et){if(this._root!==null){const nt=[];this._root.traverse(rt=>nt.push(rt)),nt.forEach(rt=>{rt.event&&et(rt.event)})}return this}forEachAtTime(et,nt){if(this._root!==null){const rt=[];this._root.search(et,rt),rt.forEach(it=>{it.event&&nt(it.event)})}return this}forEachFrom(et,nt){if(this._root!==null){const rt=[];this._root.searchAfter(et,rt),rt.forEach(it=>{it.event&&nt(it.event)})}return this}dispose(){return super.dispose(),this._root!==null&&this._root.traverse(et=>et.dispose()),this._root=null,this}}class IntervalNode{constructor(et,nt,rt){this._left=null,this._right=null,this.parent=null,this.height=0,this.event=rt,this.low=et,this.high=nt,this.max=this.high}insert(et){et.low<=this.low?this.left===null?this.left=et:this.left.insert(et):this.right===null?this.right=et:this.right.insert(et)}search(et,nt){et>this.max||(this.left!==null&&this.left.search(et,nt),this.low<=et&&this.high>et&&nt.push(this),!(this.low>et)&&this.right!==null&&this.right.search(et,nt))}searchAfter(et,nt){this.low>=et&&(nt.push(this),this.left!==null&&this.left.searchAfter(et,nt)),this.right!==null&&this.right.searchAfter(et,nt)}traverse(et){et(this),this.left!==null&&this.left.traverse(et),this.right!==null&&this.right.traverse(et)}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 et=0;return this.left!==null&&this.right!==null?et=this.left.height-this.right.height:this.left!==null?et=this.left.height+1:this.right!==null&&(et=-(this.right.height+1)),et}isLeftChild(){return this.parent!==null&&this.parent.left===this}get left(){return this._left}set left(et){this._left=et,et!==null&&(et.parent=this),this.updateHeight(),this.updateMax()}get right(){return this._right}set right(et){this._right=et,et!==null&&(et.parent=this),this.updateHeight(),this.updateMax()}dispose(){this.parent=null,this._left=null,this._right=null,this.event=null}}class Volume extends ToneAudioNode{constructor(){super(optionsFromArguments(Volume.getDefaults(),arguments,["volume"])),this.name="Volume";const et=optionsFromArguments(Volume.getDefaults(),arguments,["volume"]);this.input=this.output=new Gain({context:this.context,gain:et.volume,units:"decibels"}),this.volume=this.output.gain,readOnly(this,"volume"),this._unmutedVolume=et.volume,this.mute=et.mute}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{mute:!1,volume:0})}get mute(){return this.volume.value===-1/0}set mute(et){!this.mute&&et?(this._unmutedVolume=this.volume.value,this.volume.value=-1/0):this.mute&&!et&&(this.volume.value=this._unmutedVolume)}dispose(){return super.dispose(),this.input.dispose(),this.volume.dispose(),this}}let Destination$1=class b1 extends ToneAudioNode{constructor(){super(optionsFromArguments(b1.getDefaults(),arguments)),this.name="Destination",this.input=new Volume({context:this.context}),this.output=new Gain({context:this.context}),this.volume=this.input.volume;const et=optionsFromArguments(b1.getDefaults(),arguments);connectSeries(this.input,this.output,this.context.rawContext.destination),this.mute=et.mute,this._internalChannels=[this.input,this.context.rawContext.destination,this.output]}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{mute:!1,volume:0})}get mute(){return this.input.mute}set mute(et){this.input.mute=et}chain(...et){return this.input.disconnect(),et.unshift(this.input),et.push(this.output),connectSeries(...et),this}get maxChannelCount(){return this.context.rawContext.destination.maxChannelCount}dispose(){return super.dispose(),this.volume.dispose(),this}};onContextInit(tt=>{tt.destination=new Destination$1({context:tt})});onContextClose(tt=>{tt.destination.dispose()});class TimelineValue extends Tone{constructor(et){super(),this.name="TimelineValue",this._timeline=new Timeline({memory:10}),this._initialValue=et}set(et,nt){return this._timeline.add({value:et,time:nt}),this}get(et){const nt=this._timeline.get(et);return nt?nt.value:this._initialValue}}class SignalOperator extends ToneAudioNode{constructor(){super(Object.assign(optionsFromArguments(SignalOperator.getDefaults(),arguments,["context"])))}connect(et,nt=0,rt=0){return connectSignal(this,et,nt,rt),this}}class WaveShaper extends SignalOperator{constructor(){super(Object.assign(optionsFromArguments(WaveShaper.getDefaults(),arguments,["mapping","length"]))),this.name="WaveShaper",this._shaper=this.context.createWaveShaper(),this.input=this._shaper,this.output=this._shaper;const et=optionsFromArguments(WaveShaper.getDefaults(),arguments,["mapping","length"]);isArray$e(et.mapping)||et.mapping instanceof Float32Array?this.curve=Float32Array.from(et.mapping):isFunction$2(et.mapping)&&this.setMap(et.mapping,et.length)}static getDefaults(){return Object.assign(Signal.getDefaults(),{length:1024})}setMap(et,nt=1024){const rt=new Float32Array(nt);for(let it=0,ot=nt;itrt.includes(et));assert(nt,"oversampling must be either 'none', '2x', or '4x'"),this._shaper.oversample=et}dispose(){return super.dispose(),this._shaper.disconnect(),this}}class Pow extends SignalOperator{constructor(){super(Object.assign(optionsFromArguments(Pow.getDefaults(),arguments,["value"]))),this.name="Pow";const et=optionsFromArguments(Pow.getDefaults(),arguments,["value"]);this._exponentScaler=this.input=this.output=new WaveShaper({context:this.context,mapping:this._expFunc(et.value),length:8192}),this._exponent=et.value}static getDefaults(){return Object.assign(SignalOperator.getDefaults(),{value:1})}_expFunc(et){return nt=>Math.pow(Math.abs(nt),et)}get value(){return this._exponent}set value(et){this._exponent=et,this._exponentScaler.setMap(this._expFunc(this._exponent))}dispose(){return super.dispose(),this._exponentScaler.dispose(),this}}class TransportEvent{constructor(et,nt){this.id=TransportEvent._eventId++,this._remainderTime=0;const rt=Object.assign(TransportEvent.getDefaults(),nt);this.transport=et,this.callback=rt.callback,this._once=rt.once,this.time=Math.floor(rt.time),this._remainderTime=rt.time-this.time}static getDefaults(){return{callback:noOp,once:!1,time:0}}get floatTime(){return this.time+this._remainderTime}invoke(et){if(this.callback){const nt=this.transport.bpm.getDurationOfTicks(1,et);this.callback(et+this._remainderTime*nt),this._once&&this.transport.clear(this.id)}}dispose(){return this.callback=void 0,this}}TransportEvent._eventId=0;class TransportRepeatEvent extends TransportEvent{constructor(et,nt){super(et,nt),this._currentId=-1,this._nextId=-1,this._nextTick=this.time,this._boundRestart=this._restart.bind(this);const rt=Object.assign(TransportRepeatEvent.getDefaults(),nt);this.duration=rt.duration,this._interval=rt.interval,this._nextTick=rt.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({},TransportEvent.getDefaults(),{duration:1/0,interval:1,once:!1})}invoke(et){this._createEvents(et),super.invoke(et)}_createEvent(){return LT(this._nextTick,this.floatTime+this.duration)?this.transport.scheduleOnce(this.invoke.bind(this),new TicksClass(this.context,this._nextTick).toSeconds()):-1}_createEvents(et){LT(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 TicksClass(this.context,this._nextTick).toSeconds()))}_restart(et){this.transport.clear(this._currentId),this.transport.clear(this._nextId),this._nextTick=this.floatTime;const nt=this.transport.getTicksAtTime(et);GT(nt,this.time)&&(this._nextTick=this.floatTime+Math.ceil((nt-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}}let Transport$1=class w1 extends ToneWithContext{constructor(){super(optionsFromArguments(w1.getDefaults(),arguments)),this.name="Transport",this._loop=new TimelineValue(!1),this._loopStart=0,this._loopEnd=0,this._scheduledEvents={},this._timeline=new Timeline,this._repeatedEvents=new IntervalTimeline,this._syncedSignals=[],this._swingAmount=0;const et=optionsFromArguments(w1.getDefaults(),arguments);this._ppq=et.ppq,this._clock=new Clock({callback:this._processTick.bind(this),context:this.context,frequency:0,units:"bpm"}),this._bindClockEvents(),this.bpm=this._clock.frequency,this._clock.frequency.multiplier=et.ppq,this.bpm.setValueAtTime(et.bpm,0),readOnly(this,"bpm"),this._timeSignature=et.timeSignature,this._swingTicks=et.ppq/2}static getDefaults(){return Object.assign(ToneWithContext.getDefaults(),{bpm:120,loopEnd:"4m",loopStart:0,ppq:192,swing:0,swingSubdivision:"8n",timeSignature:4})}_processTick(et,nt){if(this._loop.get(et)&&nt>=this._loopEnd&&(this.emit("loopEnd",et),this._clock.setTicksAtTime(this._loopStart,et),nt=this._loopStart,this.emit("loopStart",et,this._clock.getSecondsAtTime(et)),this.emit("loop",et)),this._swingAmount>0&&nt%this._ppq!==0&&nt%(this._swingTicks*2)!==0){const rt=nt%(this._swingTicks*2)/(this._swingTicks*2),it=Math.sin(rt*Math.PI)*this._swingAmount;et+=new TicksClass(this.context,this._swingTicks*2/3).toSeconds()*it}enterScheduledCallback(!0),this._timeline.forEachAtTime(nt,rt=>rt.invoke(et)),enterScheduledCallback(!1)}schedule(et,nt){const rt=new TransportEvent(this,{callback:et,time:new TransportTimeClass(this.context,nt).toTicks()});return this._addEvent(rt,this._timeline)}scheduleRepeat(et,nt,rt,it=1/0){const ot=new TransportRepeatEvent(this,{callback:et,duration:new TimeClass(this.context,it).toTicks(),interval:new TimeClass(this.context,nt).toTicks(),time:new TransportTimeClass(this.context,rt).toTicks()});return this._addEvent(ot,this._repeatedEvents)}scheduleOnce(et,nt){const rt=new TransportEvent(this,{callback:et,once:!0,time:new TransportTimeClass(this.context,nt).toTicks()});return this._addEvent(rt,this._timeline)}clear(et){if(this._scheduledEvents.hasOwnProperty(et)){const nt=this._scheduledEvents[et.toString()];nt.timeline.remove(nt.event),nt.event.dispose(),delete this._scheduledEvents[et.toString()]}return this}_addEvent(et,nt){return this._scheduledEvents[et.id.toString()]={event:et,timeline:nt},nt.add(et),et.id}cancel(et=0){const nt=this.toTicks(et);return this._timeline.forEachFrom(nt,rt=>this.clear(rt.id)),this._repeatedEvents.forEachFrom(nt,rt=>this.clear(rt.id)),this}_bindClockEvents(){this._clock.on("start",(et,nt)=>{nt=new TicksClass(this.context,nt).toSeconds(),this.emit("start",et,nt)}),this._clock.on("stop",et=>{this.emit("stop",et)}),this._clock.on("pause",et=>{this.emit("pause",et)})}get state(){return this._clock.getStateAtTime(this.now())}start(et,nt){this.context.resume();let rt;return isDefined(nt)&&(rt=this.toTicks(nt)),this._clock.start(et,rt),this}stop(et){return this._clock.stop(et),this}pause(et){return this._clock.pause(et),this}toggle(et){return et=this.toSeconds(et),this._clock.getStateAtTime(et)!=="started"?this.start(et):this.stop(et),this}get timeSignature(){return this._timeSignature}set timeSignature(et){isArray$e(et)&&(et=et[0]/et[1]*4),this._timeSignature=et}get loopStart(){return new TimeClass(this.context,this._loopStart,"i").toSeconds()}set loopStart(et){this._loopStart=this.toTicks(et)}get loopEnd(){return new TimeClass(this.context,this._loopEnd,"i").toSeconds()}set loopEnd(et){this._loopEnd=this.toTicks(et)}get loop(){return this._loop.get(this.now())}set loop(et){this._loop.set(et,this.now())}setLoopPoints(et,nt){return this.loopStart=et,this.loopEnd=nt,this}get swing(){return this._swingAmount}set swing(et){this._swingAmount=et}get swingSubdivision(){return new TicksClass(this.context,this._swingTicks).toNotation()}set swingSubdivision(et){this._swingTicks=this.toTicks(et)}get position(){const et=this.now(),nt=this._clock.getTicksAtTime(et);return new TicksClass(this.context,nt).toBarsBeatsSixteenths()}set position(et){const nt=this.toTicks(et);this.ticks=nt}get seconds(){return this._clock.seconds}set seconds(et){const nt=this.now(),rt=this._clock.frequency.timeToTicks(et,nt);this.ticks=rt}get progress(){if(this.loop){const et=this.now();return(this._clock.getTicksAtTime(et)-this._loopStart)/(this._loopEnd-this._loopStart)}else return 0}get ticks(){return this._clock.ticks}set ticks(et){if(this._clock.ticks!==et){const nt=this.now();if(this.state==="started"){const rt=this._clock.getTicksAtTime(nt),it=this._clock.frequency.getDurationOfTicks(Math.ceil(rt)-rt,nt),ot=nt+it;this.emit("stop",ot),this._clock.setTicksAtTime(et,ot),this.emit("start",ot,this._clock.getSecondsAtTime(ot))}else this.emit("ticks",nt),this._clock.setTicksAtTime(et,nt)}}getTicksAtTime(et){return this._clock.getTicksAtTime(et)}getSecondsAtTime(et){return this._clock.getSecondsAtTime(et)}get PPQ(){return this._clock.frequency.multiplier}set PPQ(et){this._clock.frequency.multiplier=et}nextSubdivision(et){if(et=this.toTicks(et),this.state!=="started")return 0;{const nt=this.now(),rt=this.getTicksAtTime(nt),it=et-rt%et;return this._clock.nextTickTime(it,nt)}}syncSignal(et,nt){const rt=this.now();let it=this.bpm,ot=1/(60/it.getValueAtTime(rt)/this.PPQ),at=[];if(et.units==="time"){const lt=.015625/ot,ct=new Gain(lt),ut=new Pow(-1),ht=new Gain(lt);it.chain(ct,ut,ht),it=ht,ot=1/ot,at=[ct,ut,ht]}nt||(et.getValueAtTime(rt)!==0?nt=et.getValueAtTime(rt)/ot:nt=0);const st=new Gain(nt);return it.connect(st),st.connect(et._param),at.push(st),this._syncedSignals.push({initial:et.value,nodes:at,signal:et}),et.value=0,this}unsyncSignal(et){for(let nt=this._syncedSignals.length-1;nt>=0;nt--){const rt=this._syncedSignals[nt];rt.signal===et&&(rt.nodes.forEach(it=>it.dispose()),rt.signal.value=rt.initial,this._syncedSignals.splice(nt,1))}return this}dispose(){return super.dispose(),this._clock.dispose(),writable(this,"bpm"),this._timeline.dispose(),this._repeatedEvents.dispose(),this}};Emitter$1.mixin(Transport$1);onContextInit(tt=>{tt.transport=new Transport$1({context:tt})});onContextClose(tt=>{tt.transport.dispose()});class Source extends ToneAudioNode{constructor(et){super(et),this.input=void 0,this._state=new StateTimeline("stopped"),this._synced=!1,this._scheduled=[],this._syncedStart=noOp,this._syncedStop=noOp,this._state.memory=100,this._state.increasing=!0,this._volume=this.output=new Volume({context:this.context,mute:et.mute,volume:et.volume}),this.volume=this._volume.volume,readOnly(this,"volume"),this.onstop=et.onstop}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{mute:!1,onstop:noOp,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(et){this._volume.mute=et}_clampToCurrentTime(et){return this._synced?et:Math.max(et,this.context.currentTime)}start(et,nt,rt){let it=isUndef(et)&&this._synced?this.context.transport.seconds:this.toSeconds(et);if(it=this._clampToCurrentTime(it),!this._synced&&this._state.getValueAtTime(it)==="started")assert(GT(it,this._state.get(it).time),"Start time must be strictly greater than previous start time"),this._state.cancel(it),this._state.setStateAtTime("started",it),this.log("restart",it),this.restart(it,nt,rt);else if(this.log("start",it),this._state.setStateAtTime("started",it),this._synced){const ot=this._state.get(it);ot&&(ot.offset=this.toSeconds(defaultArg(nt,0)),ot.duration=rt?this.toSeconds(rt):void 0);const at=this.context.transport.schedule(st=>{this._start(st,nt,rt)},it);this._scheduled.push(at),this.context.transport.state==="started"&&this.context.transport.getSecondsAtTime(this.immediate())>it&&this._syncedStart(this.now(),this.context.transport.seconds)}else assertContextRunning(this.context),this._start(it,nt,rt);return this}stop(et){let nt=isUndef(et)&&this._synced?this.context.transport.seconds:this.toSeconds(et);if(nt=this._clampToCurrentTime(nt),this._state.getValueAtTime(nt)==="started"||isDefined(this._state.getNextState("started",nt))){if(this.log("stop",nt),!this._synced)this._stop(nt);else{const rt=this.context.transport.schedule(this._stop.bind(this),nt);this._scheduled.push(rt)}this._state.cancel(nt),this._state.setStateAtTime("stopped",nt)}return this}restart(et,nt,rt){return et=this.toSeconds(et),this._state.getValueAtTime(et)==="started"&&(this._state.cancel(et),this._restart(et,nt,rt)),this}sync(){return this._synced||(this._synced=!0,this._syncedStart=(et,nt)=>{if(GT(nt,0)){const rt=this._state.get(nt);if(rt&&rt.state==="started"&&rt.time!==nt){const it=nt-this.toSeconds(rt.time);let ot;rt.duration&&(ot=this.toSeconds(rt.duration)-it),this._start(et,this.toSeconds(rt.offset)+it,ot)}}},this._syncedStop=et=>{const nt=this.context.transport.getSecondsAtTime(Math.max(et-this.sampleTime,0));this._state.getValueAtTime(nt)==="started"&&this._stop(et)},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(et=>this.context.transport.clear(et)),this._scheduled=[],this._state.cancel(0),this._stop(0),this}dispose(){return super.dispose(),this.onstop=noOp,this.unsync(),this._volume.dispose(),this._state.dispose(),this}}class ToneBufferSource extends OneShotSource{constructor(){super(optionsFromArguments(ToneBufferSource.getDefaults(),arguments,["url","onload"])),this.name="ToneBufferSource",this._source=this.context.createBufferSource(),this._internalChannels=[this._source],this._sourceStarted=!1,this._sourceStopped=!1;const et=optionsFromArguments(ToneBufferSource.getDefaults(),arguments,["url","onload"]);connect(this._source,this._gainNode),this._source.onended=()=>this._stopSource(),this.playbackRate=new Param({context:this.context,param:this._source.playbackRate,units:"positive",value:et.playbackRate}),this.loop=et.loop,this.loopStart=et.loopStart,this.loopEnd=et.loopEnd,this._buffer=new ToneAudioBuffer(et.url,et.onload,et.onerror),this._internalChannels.push(this._source)}static getDefaults(){return Object.assign(OneShotSource.getDefaults(),{url:new ToneAudioBuffer,loop:!1,loopEnd:0,loopStart:0,onload:noOp,onerror:noOp,playbackRate:1})}get fadeIn(){return this._fadeIn}set fadeIn(et){this._fadeIn=et}get fadeOut(){return this._fadeOut}set fadeOut(et){this._fadeOut=et}get curve(){return this._curve}set curve(et){this._curve=et}start(et,nt,rt,it=1){assert(this.buffer.loaded,"buffer is either not set or not loaded");const ot=this.toSeconds(et);this._startGain(ot,it),this.loop?nt=defaultArg(nt,this.loopStart):nt=defaultArg(nt,0);let at=Math.max(this.toSeconds(nt),0);if(this.loop){const st=this.toSeconds(this.loopEnd)||this.buffer.duration,lt=this.toSeconds(this.loopStart),ct=st-lt;GTE(at,st)&&(at=(at-lt)%ct+lt),EQ(at,this.buffer.duration)&&(at=0)}if(this._source.buffer=this.buffer.get(),this._source.loopEnd=this.toSeconds(this.loopEnd)||this.buffer.duration,LT(at,this.buffer.duration)&&(this._sourceStarted=!0,this._source.start(ot,at)),isDefined(rt)){let st=this.toSeconds(rt);st=Math.max(st,0),this.stop(ot+st)}return this}_stopSource(et){!this._sourceStopped&&this._sourceStarted&&(this._sourceStopped=!0,this._source.stop(this.toSeconds(et)),this._onended())}get loopStart(){return this._source.loopStart}set loopStart(et){this._source.loopStart=this.toSeconds(et)}get loopEnd(){return this._source.loopEnd}set loopEnd(et){this._source.loopEnd=this.toSeconds(et)}get buffer(){return this._buffer}set buffer(et){this._buffer.set(et)}get loop(){return this._source.loop}set loop(et){this._source.loop=et,this._sourceStarted&&this.cancelStop()}dispose(){return super.dispose(),this._source.onended=null,this._source.disconnect(),this._buffer.dispose(),this.playbackRate.dispose(),this}}class Noise extends Source{constructor(){super(optionsFromArguments(Noise.getDefaults(),arguments,["type"])),this.name="Noise",this._source=null;const et=optionsFromArguments(Noise.getDefaults(),arguments,["type"]);this._playbackRate=et.playbackRate,this.type=et.type,this._fadeIn=et.fadeIn,this._fadeOut=et.fadeOut}static getDefaults(){return Object.assign(Source.getDefaults(),{fadeIn:0,fadeOut:0,playbackRate:1,type:"white"})}get type(){return this._type}set type(et){if(assert(et in _noiseBuffers,"Noise: invalid type: "+et),this._type!==et&&(this._type=et,this.state==="started")){const nt=this.now();this._stop(nt),this._start(nt)}}get playbackRate(){return this._playbackRate}set playbackRate(et){this._playbackRate=et,this._source&&(this._source.playbackRate.value=et)}_start(et){const nt=_noiseBuffers[this._type];this._source=new ToneBufferSource({url:nt,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(et),Math.random()*(nt.duration-.001))}_stop(et){this._source&&(this._source.stop(this.toSeconds(et)),this._source=null)}get fadeIn(){return this._fadeIn}set fadeIn(et){this._fadeIn=et,this._source&&(this._source.fadeIn=this._fadeIn)}get fadeOut(){return this._fadeOut}set fadeOut(et){this._fadeOut=et,this._source&&(this._source.fadeOut=this._fadeOut)}_restart(et){this._stop(et),this._start(et)}dispose(){return super.dispose(),this._source&&this._source.disconnect(),this}}const BUFFER_LENGTH=44100*5,NUM_CHANNELS=2,_noiseCache={brown:null,pink:null,white:null},_noiseBuffers={get brown(){if(!_noiseCache.brown){const tt=[];for(let et=0;etthis.onstop(this)});this._oscillator=rt,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(nt)}_stop(et){const nt=this.toSeconds(et);this._oscillator&&this._oscillator.stop(nt)}_restart(et){const nt=this.toSeconds(et);return this.log("restart",nt),this._oscillator&&this._oscillator.cancelStop(),this._state.cancel(nt),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 Oscillator._periodicWaveCache.find(nt=>nt.phase===this._phase&&deepEquals(nt.partials,this._partials));{const et=Oscillator._periodicWaveCache.find(nt=>nt.type===this._type&&nt.phase===this._phase);return this._partialCount=et?et.partialCount:this._partialCount,et}}get type(){return this._type}set type(et){this._type=et;const nt=["sine","square","sawtooth","triangle"].indexOf(et)!==-1;if(this._phase===0&&nt)this._wave=void 0,this._partialCount=0,this._oscillator!==null&&(this._oscillator.type=et);else{const rt=this._getCachedPeriodicWave();if(isDefined(rt)){const{partials:it,wave:ot}=rt;this._wave=ot,this._partials=it,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave)}else{const[it,ot]=this._getRealImaginary(et,this._phase),at=this.context.createPeriodicWave(it,ot);this._wave=at,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave),Oscillator._periodicWaveCache.push({imag:ot,partialCount:this._partialCount,partials:this._partials,phase:this._phase,real:it,type:this._type,wave:this._wave}),Oscillator._periodicWaveCache.length>100&&Oscillator._periodicWaveCache.shift()}}}get baseType(){return this._type.replace(this.partialCount.toString(),"")}set baseType(et){this.partialCount&&this._type!=="custom"&&et!=="custom"?this.type=et+this.partialCount:this.type=et}get partialCount(){return this._partialCount}set partialCount(et){assertRange(et,0);let nt=this._type;const rt=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(this._type);if(rt&&(nt=rt[1]),this._type!=="custom")et===0?this.type=nt:this.type=nt+et.toString();else{const it=new Float32Array(et);this._partials.forEach((ot,at)=>it[at]=ot),this._partials=Array.from(it),this.type=this._type}}_getRealImaginary(et,nt){let it=2048;const ot=new Float32Array(it),at=new Float32Array(it);let st=1;if(et==="custom"){if(st=this._partials.length+1,this._partialCount=this._partials.length,it=st,this._partials.length===0)return[ot,at]}else{const lt=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(et);lt?(st=parseInt(lt[2],10)+1,this._partialCount=parseInt(lt[2],10),et=lt[1],st=Math.max(st,2),it=st):this._partialCount=0,this._partials=[]}for(let lt=1;lt>1&1?-1:1):ut=0,this._partials[lt-1]=ut;break;case"custom":ut=this._partials[lt-1];break;default:throw new TypeError("Oscillator: invalid type: "+et)}ut!==0?(ot[lt]=-ut*Math.sin(nt*lt),at[lt]=ut*Math.cos(nt*lt)):(ot[lt]=0,at[lt]=0)}return[ot,at]}_inverseFFT(et,nt,rt){let it=0;const ot=et.length;for(let at=0;at(et+1)/2}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Multiply extends Signal{constructor(){super(Object.assign(optionsFromArguments(Multiply.getDefaults(),arguments,["value"]))),this.name="Multiply",this.override=!1;const et=optionsFromArguments(Multiply.getDefaults(),arguments,["value"]);this._mult=this.input=this.output=new Gain({context:this.context,minValue:et.minValue,maxValue:et.maxValue}),this.factor=this._param=this._mult.gain,this.factor.setValueAtTime(et.value,0)}static getDefaults(){return Object.assign(Signal.getDefaults(),{value:0})}dispose(){return super.dispose(),this._mult.dispose(),this}}class AMOscillator extends Source{constructor(){super(optionsFromArguments(AMOscillator.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="AMOscillator",this._modulationScale=new AudioToGain({context:this.context}),this._modulationNode=new Gain({context:this.context});const et=optionsFromArguments(AMOscillator.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new Oscillator({context:this.context,detune:et.detune,frequency:et.frequency,onstop:()=>this.onstop(this),phase:et.phase,type:et.type}),this.frequency=this._carrier.frequency,this.detune=this._carrier.detune,this._modulator=new Oscillator({context:this.context,phase:et.phase,type:et.modulationType}),this.harmonicity=new Multiply({context:this.context,units:"positive",value:et.harmonicity}),this.frequency.chain(this.harmonicity,this._modulator.frequency),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),readOnly(this,["frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(Oscillator.getDefaults(),{harmonicity:1,modulationType:"square"})}_start(et){this._modulator.start(et),this._carrier.start(et)}_stop(et){this._modulator.stop(et),this._carrier.stop(et)}_restart(et){this._modulator.restart(et),this._carrier.restart(et)}get type(){return this._carrier.type}set type(et){this._carrier.type=et}get baseType(){return this._carrier.baseType}set baseType(et){this._carrier.baseType=et}get partialCount(){return this._carrier.partialCount}set partialCount(et){this._carrier.partialCount=et}get modulationType(){return this._modulator.type}set modulationType(et){this._modulator.type=et}get phase(){return this._carrier.phase}set phase(et){this._carrier.phase=et,this._modulator.phase=et}get partials(){return this._carrier.partials}set partials(et){this._carrier.partials=et}asArray(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}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 FMOscillator extends Source{constructor(){super(optionsFromArguments(FMOscillator.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="FMOscillator",this._modulationNode=new Gain({context:this.context,gain:0});const et=optionsFromArguments(FMOscillator.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new Oscillator({context:this.context,detune:et.detune,frequency:0,onstop:()=>this.onstop(this),phase:et.phase,type:et.type}),this.detune=this._carrier.detune,this.frequency=new Signal({context:this.context,units:"frequency",value:et.frequency}),this._modulator=new Oscillator({context:this.context,phase:et.phase,type:et.modulationType}),this.harmonicity=new Multiply({context:this.context,units:"positive",value:et.harmonicity}),this.modulationIndex=new Multiply({context:this.context,units:"positive",value:et.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),readOnly(this,["modulationIndex","frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(Oscillator.getDefaults(),{harmonicity:1,modulationIndex:2,modulationType:"square"})}_start(et){this._modulator.start(et),this._carrier.start(et)}_stop(et){this._modulator.stop(et),this._carrier.stop(et)}_restart(et){return this._modulator.restart(et),this._carrier.restart(et),this}get type(){return this._carrier.type}set type(et){this._carrier.type=et}get baseType(){return this._carrier.baseType}set baseType(et){this._carrier.baseType=et}get partialCount(){return this._carrier.partialCount}set partialCount(et){this._carrier.partialCount=et}get modulationType(){return this._modulator.type}set modulationType(et){this._modulator.type=et}get phase(){return this._carrier.phase}set phase(et){this._carrier.phase=et,this._modulator.phase=et}get partials(){return this._carrier.partials}set partials(et){this._carrier.partials=et}asArray(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}dispose(){return super.dispose(),this.frequency.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this.modulationIndex.dispose(),this}}class PulseOscillator extends Source{constructor(){super(optionsFromArguments(PulseOscillator.getDefaults(),arguments,["frequency","width"])),this.name="PulseOscillator",this._widthGate=new Gain({context:this.context,gain:0}),this._thresh=new WaveShaper({context:this.context,mapping:nt=>nt<=0?-1:1});const et=optionsFromArguments(PulseOscillator.getDefaults(),arguments,["frequency","width"]);this.width=new Signal({context:this.context,units:"audioRange",value:et.width}),this._triangle=new Oscillator({context:this.context,detune:et.detune,frequency:et.frequency,onstop:()=>this.onstop(this),phase:et.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),readOnly(this,["width","frequency","detune"])}static getDefaults(){return Object.assign(Source.getDefaults(),{detune:0,frequency:440,phase:0,type:"pulse",width:.2})}_start(et){et=this.toSeconds(et),this._triangle.start(et),this._widthGate.gain.setValueAtTime(1,et)}_stop(et){et=this.toSeconds(et),this._triangle.stop(et),this._widthGate.gain.cancelScheduledValues(et),this._widthGate.gain.setValueAtTime(0,et)}_restart(et){this._triangle.restart(et),this._widthGate.gain.cancelScheduledValues(et),this._widthGate.gain.setValueAtTime(1,et)}get phase(){return this._triangle.phase}set phase(et){this._triangle.phase=et}get type(){return"pulse"}get baseType(){return"pulse"}get partials(){return[]}get partialCount(){return 0}set carrierType(et){this._triangle.type=et}asArray(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}dispose(){return super.dispose(),this._triangle.dispose(),this.width.dispose(),this._widthGate.dispose(),this._thresh.dispose(),this}}class FatOscillator extends Source{constructor(){super(optionsFromArguments(FatOscillator.getDefaults(),arguments,["frequency","type","spread"])),this.name="FatOscillator",this._oscillators=[];const et=optionsFromArguments(FatOscillator.getDefaults(),arguments,["frequency","type","spread"]);this.frequency=new Signal({context:this.context,units:"frequency",value:et.frequency}),this.detune=new Signal({context:this.context,units:"cents",value:et.detune}),this._spread=et.spread,this._type=et.type,this._phase=et.phase,this._partials=et.partials,this._partialCount=et.partialCount,this.count=et.count,readOnly(this,["frequency","detune"])}static getDefaults(){return Object.assign(Oscillator.getDefaults(),{count:3,spread:20,type:"sawtooth"})}_start(et){et=this.toSeconds(et),this._forEach(nt=>nt.start(et))}_stop(et){et=this.toSeconds(et),this._forEach(nt=>nt.stop(et))}_restart(et){this._forEach(nt=>nt.restart(et))}_forEach(et){for(let nt=0;ntnt.type=et)}get spread(){return this._spread}set spread(et){if(this._spread=et,this._oscillators.length>1){const nt=-et/2,rt=et/(this._oscillators.length-1);this._forEach((it,ot)=>it.detune.value=nt+rt*ot)}}get count(){return this._oscillators.length}set count(et){if(assertRange(et,1),this._oscillators.length!==et){this._forEach(nt=>nt.dispose()),this._oscillators=[];for(let nt=0;ntthis.onstop(this):noOp});this.type==="custom"&&(rt.partials=this._partials),this.frequency.connect(rt.frequency),this.detune.connect(rt.detune),rt.detune.overridden=!1,rt.connect(this.output),this._oscillators[nt]=rt}this.spread=this._spread,this.state==="started"&&this._forEach(nt=>nt.start())}}get phase(){return this._phase}set phase(et){this._phase=et,this._forEach((nt,rt)=>nt.phase=this._phase+rt/this.count*360)}get baseType(){return this._oscillators[0].baseType}set baseType(et){this._forEach(nt=>nt.baseType=et),this._type=this._oscillators[0].type}get partials(){return this._oscillators[0].partials}set partials(et){this._partials=et,this._partialCount=this._partials.length,et.length&&(this._type="custom",this._forEach(nt=>nt.partials=et))}get partialCount(){return this._oscillators[0].partialCount}set partialCount(et){this._partialCount=et,this._forEach(nt=>nt.partialCount=et),this._type=this._oscillators[0].type}asArray(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this._forEach(et=>et.dispose()),this}}class PWMOscillator extends Source{constructor(){super(optionsFromArguments(PWMOscillator.getDefaults(),arguments,["frequency","modulationFrequency"])),this.name="PWMOscillator",this.sourceType="pwm",this._scale=new Multiply({context:this.context,value:2});const et=optionsFromArguments(PWMOscillator.getDefaults(),arguments,["frequency","modulationFrequency"]);this._pulse=new PulseOscillator({context:this.context,frequency:et.modulationFrequency}),this._pulse.carrierType="sine",this.modulationFrequency=this._pulse.frequency,this._modulator=new Oscillator({context:this.context,detune:et.detune,frequency:et.frequency,onstop:()=>this.onstop(this),phase:et.phase}),this.frequency=this._modulator.frequency,this.detune=this._modulator.detune,this._modulator.chain(this._scale,this._pulse.width),this._pulse.connect(this.output),readOnly(this,["modulationFrequency","frequency","detune"])}static getDefaults(){return Object.assign(Source.getDefaults(),{detune:0,frequency:440,modulationFrequency:.4,phase:0,type:"pwm"})}_start(et){et=this.toSeconds(et),this._modulator.start(et),this._pulse.start(et)}_stop(et){et=this.toSeconds(et),this._modulator.stop(et),this._pulse.stop(et)}_restart(et){this._modulator.restart(et),this._pulse.restart(et)}get type(){return"pwm"}get baseType(){return"pwm"}get partials(){return[]}get partialCount(){return 0}get phase(){return this._modulator.phase}set phase(et){this._modulator.phase=et}asArray(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}dispose(){return super.dispose(),this._pulse.dispose(),this._scale.dispose(),this._modulator.dispose(),this}}const OmniOscillatorSourceMap={am:AMOscillator,fat:FatOscillator,fm:FMOscillator,oscillator:Oscillator,pulse:PulseOscillator,pwm:PWMOscillator};class OmniOscillator extends Source{constructor(){super(optionsFromArguments(OmniOscillator.getDefaults(),arguments,["frequency","type"])),this.name="OmniOscillator";const et=optionsFromArguments(OmniOscillator.getDefaults(),arguments,["frequency","type"]);this.frequency=new Signal({context:this.context,units:"frequency",value:et.frequency}),this.detune=new Signal({context:this.context,units:"cents",value:et.detune}),readOnly(this,["frequency","detune"]),this.set(et)}static getDefaults(){return Object.assign(Oscillator.getDefaults(),FMOscillator.getDefaults(),AMOscillator.getDefaults(),FatOscillator.getDefaults(),PulseOscillator.getDefaults(),PWMOscillator.getDefaults())}_start(et){this._oscillator.start(et)}_stop(et){this._oscillator.stop(et)}_restart(et){return this._oscillator.restart(et),this}get type(){let et="";return["am","fm","fat"].some(nt=>this._sourceType===nt)&&(et=this._sourceType),et+this._oscillator.type}set type(et){et.substr(0,2)==="fm"?(this._createNewOscillator("fm"),this._oscillator=this._oscillator,this._oscillator.type=et.substr(2)):et.substr(0,2)==="am"?(this._createNewOscillator("am"),this._oscillator=this._oscillator,this._oscillator.type=et.substr(2)):et.substr(0,3)==="fat"?(this._createNewOscillator("fat"),this._oscillator=this._oscillator,this._oscillator.type=et.substr(3)):et==="pwm"?(this._createNewOscillator("pwm"),this._oscillator=this._oscillator):et==="pulse"?this._createNewOscillator("pulse"):(this._createNewOscillator("oscillator"),this._oscillator=this._oscillator,this._oscillator.type=et)}get partials(){return this._oscillator.partials}set partials(et){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partials=et)}get partialCount(){return this._oscillator.partialCount}set partialCount(et){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partialCount=et)}set(et){return Reflect.has(et,"type")&&et.type&&(this.type=et.type),super.set(et),this}_createNewOscillator(et){if(et!==this._sourceType){this._sourceType=et;const nt=OmniOscillatorSourceMap[et],rt=this.now();if(this._oscillator){const it=this._oscillator;it.stop(rt),this.context.setTimeout(()=>it.dispose(),this.blockTime)}this._oscillator=new nt({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(rt)}}get phase(){return this._oscillator.phase}set phase(et){this._oscillator.phase=et}get sourceType(){return this._sourceType}set sourceType(et){let nt="sine";this._oscillator.type!=="pwm"&&this._oscillator.type!=="pulse"&&(nt=this._oscillator.type),et==="fm"?this.type="fm"+nt:et==="am"?this.type="am"+nt:et==="fat"?this.type="fat"+nt:et==="oscillator"?this.type=nt:et==="pulse"?this.type="pulse":et==="pwm"&&(this.type="pwm")}_getOscType(et,nt){return et instanceof OmniOscillatorSourceMap[nt]}get baseType(){return this._oscillator.baseType}set baseType(et){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&et!=="pulse"&&et!=="pwm"&&(this._oscillator.baseType=et)}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(et){this._getOscType(this._oscillator,"fat")&&isNumber$4(et)&&(this._oscillator.count=et)}get spread(){if(this._getOscType(this._oscillator,"fat"))return this._oscillator.spread}set spread(et){this._getOscType(this._oscillator,"fat")&&isNumber$4(et)&&(this._oscillator.spread=et)}get modulationType(){if(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))return this._oscillator.modulationType}set modulationType(et){(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))&&isString$2(et)&&(this._oscillator.modulationType=et)}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(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}dispose(){return super.dispose(),this.detune.dispose(),this.frequency.dispose(),this._oscillator.dispose(),this}}class Add extends Signal{constructor(){super(Object.assign(optionsFromArguments(Add.getDefaults(),arguments,["value"]))),this.override=!1,this.name="Add",this._sum=new Gain({context:this.context}),this.input=this._sum,this.output=this._sum,this.addend=this._param,connectSeries(this._constantSource,this._sum)}static getDefaults(){return Object.assign(Signal.getDefaults(),{value:0})}dispose(){return super.dispose(),this._sum.dispose(),this}}class Scale extends SignalOperator{constructor(){super(Object.assign(optionsFromArguments(Scale.getDefaults(),arguments,["min","max"]))),this.name="Scale";const et=optionsFromArguments(Scale.getDefaults(),arguments,["min","max"]);this._mult=this.input=new Multiply({context:this.context,value:et.max-et.min}),this._add=this.output=new Add({context:this.context,value:et.min}),this._min=et.min,this._max=et.max,this.input.connect(this.output)}static getDefaults(){return Object.assign(SignalOperator.getDefaults(),{max:1,min:0})}get min(){return this._min}set min(et){this._min=et,this._setRange()}get max(){return this._max}set max(et){this._max=et,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 range$3(tt,et=1/0){const nt=new WeakMap;return function(rt,it){Reflect.defineProperty(rt,it,{configurable:!0,enumerable:!0,get:function(){return nt.get(this)},set:function(ot){assertRange(ot,tt,et),nt.set(this,ot)}})}}function timeRange(tt,et=1/0){const nt=new WeakMap;return function(rt,it){Reflect.defineProperty(rt,it,{configurable:!0,enumerable:!0,get:function(){return nt.get(this)},set:function(ot){assertRange(this.toSeconds(ot),tt,et),nt.set(this,ot)}})}}let Player$1=class x1 extends Source{constructor(){super(optionsFromArguments(x1.getDefaults(),arguments,["url","onload"])),this.name="Player",this._activeSources=new Set;const et=optionsFromArguments(x1.getDefaults(),arguments,["url","onload"]);this._buffer=new ToneAudioBuffer({onload:this._onload.bind(this,et.onload),onerror:et.onerror,reverse:et.reverse,url:et.url}),this.autostart=et.autostart,this._loop=et.loop,this._loopStart=et.loopStart,this._loopEnd=et.loopEnd,this._playbackRate=et.playbackRate,this.fadeIn=et.fadeIn,this.fadeOut=et.fadeOut}static getDefaults(){return Object.assign(Source.getDefaults(),{autostart:!1,fadeIn:0,fadeOut:0,loop:!1,loopEnd:0,loopStart:0,onload:noOp,onerror:noOp,playbackRate:1,reverse:!1})}load(et){return __awaiter(this,void 0,void 0,function*(){return yield this._buffer.load(et),this._onload(),this})}_onload(et=noOp){et(),this.autostart&&this.start()}_onSourceEnd(et){this.onstop(this),this._activeSources.delete(et),this._activeSources.size===0&&!this._synced&&this._state.getValueAtTime(this.now())==="started"&&(this._state.cancel(this.now()),this._state.setStateAtTime("stopped",this.now()))}start(et,nt,rt){return super.start(et,nt,rt),this}_start(et,nt,rt){this._loop?nt=defaultArg(nt,this._loopStart):nt=defaultArg(nt,0);const it=this.toSeconds(nt),ot=rt;rt=defaultArg(rt,Math.max(this._buffer.duration-it,0));let at=this.toSeconds(rt);at=at/this._playbackRate,et=this.toSeconds(et);const st=new ToneBufferSource({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(et+at),this._state.setStateAtTime("stopped",et+at,{implicitEnd:!0})),this._activeSources.add(st),this._loop&&isUndef(ot)?st.start(et,it):st.start(et,it,at-this.toSeconds(this.fadeOut))}_stop(et){const nt=this.toSeconds(et);this._activeSources.forEach(rt=>rt.stop(nt))}restart(et,nt,rt){return super.restart(et,nt,rt),this}_restart(et,nt,rt){var it;(it=[...this._activeSources].pop())===null||it===void 0||it.stop(et),this._start(et,nt,rt)}seek(et,nt){const rt=this.toSeconds(nt);if(this._state.getValueAtTime(rt)==="started"){const it=this.toSeconds(et);this._stop(rt),this._start(rt,it)}return this}setLoopPoints(et,nt){return this.loopStart=et,this.loopEnd=nt,this}get loopStart(){return this._loopStart}set loopStart(et){this._loopStart=et,this.buffer.loaded&&assertRange(this.toSeconds(et),0,this.buffer.duration),this._activeSources.forEach(nt=>{nt.loopStart=et})}get loopEnd(){return this._loopEnd}set loopEnd(et){this._loopEnd=et,this.buffer.loaded&&assertRange(this.toSeconds(et),0,this.buffer.duration),this._activeSources.forEach(nt=>{nt.loopEnd=et})}get buffer(){return this._buffer}set buffer(et){this._buffer.set(et)}get loop(){return this._loop}set loop(et){if(this._loop!==et&&(this._loop=et,this._activeSources.forEach(nt=>{nt.loop=et}),et)){const nt=this._state.getNextState("stopped",this.now());nt&&this._state.cancel(nt.time)}}get playbackRate(){return this._playbackRate}set playbackRate(et){this._playbackRate=et;const nt=this.now(),rt=this._state.getNextState("stopped",nt);rt&&rt.implicitEnd&&(this._state.cancel(rt.time),this._activeSources.forEach(it=>it.cancelStop())),this._activeSources.forEach(it=>{it.playbackRate.setValueAtTime(et,nt)})}get reverse(){return this._buffer.reverse}set reverse(et){this._buffer.reverse=et}get loaded(){return this._buffer.loaded}dispose(){return super.dispose(),this._activeSources.forEach(et=>et.dispose()),this._activeSources.clear(),this._buffer.dispose(),this}};__decorate([timeRange(0)],Player$1.prototype,"fadeIn",void 0);__decorate([timeRange(0)],Player$1.prototype,"fadeOut",void 0);class GainToAudio extends SignalOperator{constructor(){super(...arguments),this.name="GainToAudio",this._norm=new WaveShaper({context:this.context,mapping:et=>Math.abs(et)*2-1}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Envelope extends ToneAudioNode{constructor(){super(optionsFromArguments(Envelope.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="Envelope",this._sig=new Signal({context:this.context,value:0}),this.output=this._sig,this.input=void 0;const et=optionsFromArguments(Envelope.getDefaults(),arguments,["attack","decay","sustain","release"]);this.attack=et.attack,this.decay=et.decay,this.sustain=et.sustain,this.release=et.release,this.attackCurve=et.attackCurve,this.releaseCurve=et.releaseCurve,this.decayCurve=et.decayCurve}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{attack:.01,attackCurve:"linear",decay:.1,decayCurve:"exponential",release:1,releaseCurve:"exponential",sustain:.5})}get value(){return this.getValueAtTime(this.now())}_getCurve(et,nt){if(isString$2(et))return et;{let rt;for(rt in EnvelopeCurves)if(EnvelopeCurves[rt][nt]===et)return rt;return et}}_setCurve(et,nt,rt){if(isString$2(rt)&&Reflect.has(EnvelopeCurves,rt)){const it=EnvelopeCurves[rt];isObject$7(it)?et!=="_decayCurve"&&(this[et]=it[nt]):this[et]=it}else if(isArray$e(rt)&&et!=="_decayCurve")this[et]=rt;else throw new Error("Envelope: invalid curve: "+rt)}get attackCurve(){return this._getCurve(this._attackCurve,"In")}set attackCurve(et){this._setCurve("_attackCurve","In",et)}get releaseCurve(){return this._getCurve(this._releaseCurve,"Out")}set releaseCurve(et){this._setCurve("_releaseCurve","Out",et)}get decayCurve(){return this._getCurve(this._decayCurve,"Out")}set decayCurve(et){this._setCurve("_decayCurve","Out",et)}triggerAttack(et,nt=1){this.log("triggerAttack",et,nt),et=this.toSeconds(et);let it=this.toSeconds(this.attack);const ot=this.toSeconds(this.decay),at=this.getValueAtTime(et);if(at>0){const st=1/it;it=(1-at)/st}if(it0){const rt=this.toSeconds(this.release);rt{let et,nt;const rt=[];for(et=0;et<128;et++)rt[et]=Math.sin(et/(128-1)*(Math.PI/2));const it=[],ot=6.4;for(et=0;et<128-1;et++){nt=et/(128-1);const dt=Math.sin(nt*(Math.PI*2)*ot-Math.PI/2)+1;it[et]=dt/10+nt*.83}it[128-1]=1;const at=[],st=5;for(et=0;et<128;et++)at[et]=Math.ceil(et/(128-1)*st)/st;const lt=[];for(et=0;et<128;et++)nt=et/(128-1),lt[et]=.5*(1-Math.cos(Math.PI*nt));const ct=[];for(et=0;et<128;et++){nt=et/(128-1);const dt=Math.pow(nt,3)*4+.2,pt=Math.cos(dt*Math.PI*2*nt);ct[et]=Math.abs(pt*(1-nt))}function ut(dt){const pt=new Array(dt.length);for(let mt=0;mtthis._original_triggerRelease(nt);const et=optionsFromArguments(Instrument.getDefaults(),arguments);this._volume=this.output=new Volume({context:this.context,volume:et.volume}),this.volume=this._volume.volume,readOnly(this,"volume")}static getDefaults(){return Object.assign(ToneAudioNode.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 et=!1;return this._synced||(this._synced=!0,et=!0),et}_syncMethod(et,nt){const rt=this["_original_"+et]=this[et];this[et]=(...it)=>{const ot=it[nt],at=this.context.transport.schedule(st=>{it[nt]=st,rt.apply(this,it)},ot);this._scheduledEvents.push(at)}}unsync(){return this._scheduledEvents.forEach(et=>this.context.transport.clear(et)),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(et,nt,rt,it){const ot=this.toSeconds(rt),at=this.toSeconds(nt);return this.triggerAttack(et,ot,it),this.triggerRelease(ot+at),this}dispose(){return super.dispose(),this._volume.dispose(),this.unsync(),this._scheduledEvents=[],this}}class Monophonic extends Instrument{constructor(){super(optionsFromArguments(Monophonic.getDefaults(),arguments));const et=optionsFromArguments(Monophonic.getDefaults(),arguments);this.portamento=et.portamento,this.onsilence=et.onsilence}static getDefaults(){return Object.assign(Instrument.getDefaults(),{detune:0,onsilence:noOp,portamento:0})}triggerAttack(et,nt,rt=1){this.log("triggerAttack",et,nt,rt);const it=this.toSeconds(nt);return this._triggerEnvelopeAttack(it,rt),this.setNote(et,it),this}triggerRelease(et){this.log("triggerRelease",et);const nt=this.toSeconds(et);return this._triggerEnvelopeRelease(nt),this}setNote(et,nt){const rt=this.toSeconds(nt),it=et instanceof FrequencyClass?et.toFrequency():et;if(this.portamento>0&&this.getLevelAtTime(rt)>.05){const ot=this.toSeconds(this.portamento);this.frequency.exponentialRampTo(it,ot,rt)}else this.frequency.setValueAtTime(it,rt);return this}}__decorate([timeRange(0)],Monophonic.prototype,"portamento",void 0);class AmplitudeEnvelope extends Envelope{constructor(){super(optionsFromArguments(AmplitudeEnvelope.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="AmplitudeEnvelope",this._gainNode=new Gain({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 Synth extends Monophonic{constructor(){super(optionsFromArguments(Synth.getDefaults(),arguments)),this.name="Synth";const et=optionsFromArguments(Synth.getDefaults(),arguments);this.oscillator=new OmniOscillator(Object.assign({context:this.context,detune:et.detune,onstop:()=>this.onsilence(this)},et.oscillator)),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.envelope=new AmplitudeEnvelope(Object.assign({context:this.context},et.envelope)),this.oscillator.chain(this.envelope,this.output),readOnly(this,["oscillator","frequency","detune","envelope"])}static getDefaults(){return Object.assign(Monophonic.getDefaults(),{envelope:Object.assign(omitFromObject(Envelope.getDefaults(),Object.keys(ToneAudioNode.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.3}),oscillator:Object.assign(omitFromObject(OmniOscillator.getDefaults(),[...Object.keys(Source.getDefaults()),"frequency","detune"]),{type:"triangle"})})}_triggerEnvelopeAttack(et,nt){if(this.envelope.triggerAttack(et,nt),this.oscillator.start(et),this.envelope.sustain===0){const rt=this.toSeconds(this.envelope.attack),it=this.toSeconds(this.envelope.decay);this.oscillator.stop(et+rt+it)}}_triggerEnvelopeRelease(et){this.envelope.triggerRelease(et),this.oscillator.stop(et+this.toSeconds(this.envelope.release))}getLevelAtTime(et){return et=this.toSeconds(et),this.envelope.getValueAtTime(et)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this}}class BiquadFilter extends ToneAudioNode{constructor(){super(optionsFromArguments(BiquadFilter.getDefaults(),arguments,["frequency","type"])),this.name="BiquadFilter";const et=optionsFromArguments(BiquadFilter.getDefaults(),arguments,["frequency","type"]);this._filter=this.context.createBiquadFilter(),this.input=this.output=this._filter,this.Q=new Param({context:this.context,units:"number",value:et.Q,param:this._filter.Q}),this.frequency=new Param({context:this.context,units:"frequency",value:et.frequency,param:this._filter.frequency}),this.detune=new Param({context:this.context,units:"cents",value:et.detune,param:this._filter.detune}),this.gain=new Param({context:this.context,units:"decibels",convert:!1,value:et.gain,param:this._filter.gain}),this.type=et.type}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{Q:1,type:"lowpass",frequency:350,detune:0,gain:0})}get type(){return this._filter.type}set type(et){assert(["lowpass","highpass","bandpass","lowshelf","highshelf","notch","allpass","peaking"].indexOf(et)!==-1,`Invalid filter type: ${et}`),this._filter.type=et}getFrequencyResponse(et=128){const nt=new Float32Array(et);for(let at=0;atrt.type=et)}get rolloff(){return this._rolloff}set rolloff(et){const nt=isNumber$4(et)?et:parseInt(et,10),rt=[-12,-24,-48,-96];let it=rt.indexOf(nt);assert(it!==-1,`rolloff can only be ${rt.join(", ")}`),it+=1,this._rolloff=nt,this.input.disconnect(),this._filters.forEach(ot=>ot.disconnect()),this._filters=new Array(it);for(let ot=0;ot1);return this._filters.forEach(()=>{nt.getFrequencyResponse(et).forEach((ot,at)=>rt[at]*=ot)}),nt.dispose(),rt}dispose(){return super.dispose(),this._filters.forEach(et=>{et.dispose()}),writable(this,["detune","frequency","gain","Q"]),this.frequency.dispose(),this.Q.dispose(),this.detune.dispose(),this.gain.dispose(),this}}class FrequencyEnvelope extends Envelope{constructor(){super(optionsFromArguments(FrequencyEnvelope.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="FrequencyEnvelope";const et=optionsFromArguments(FrequencyEnvelope.getDefaults(),arguments,["attack","decay","sustain","release"]);this._octaves=et.octaves,this._baseFrequency=this.toFrequency(et.baseFrequency),this._exponent=this.input=new Pow({context:this.context,value:et.exponent}),this._scale=this.output=new Scale({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(Envelope.getDefaults(),{baseFrequency:200,exponent:1,octaves:4})}get baseFrequency(){return this._baseFrequency}set baseFrequency(et){const nt=this.toFrequency(et);assertRange(nt,0),this._baseFrequency=nt,this._scale.min=this._baseFrequency,this.octaves=this._octaves}get octaves(){return this._octaves}set octaves(et){this._octaves=et,this._scale.max=this._baseFrequency*Math.pow(2,et)}get exponent(){return this._exponent.value}set exponent(et){this._exponent.value=et}dispose(){return super.dispose(),this._exponent.dispose(),this._scale.dispose(),this}}class MonoSynth extends Monophonic{constructor(){super(optionsFromArguments(MonoSynth.getDefaults(),arguments)),this.name="MonoSynth";const et=optionsFromArguments(MonoSynth.getDefaults(),arguments);this.oscillator=new OmniOscillator(Object.assign(et.oscillator,{context:this.context,detune:et.detune,onstop:()=>this.onsilence(this)})),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.filter=new Filter(Object.assign(et.filter,{context:this.context})),this.filterEnvelope=new FrequencyEnvelope(Object.assign(et.filterEnvelope,{context:this.context})),this.envelope=new AmplitudeEnvelope(Object.assign(et.envelope,{context:this.context})),this.oscillator.chain(this.filter,this.envelope,this.output),this.filterEnvelope.connect(this.filter.frequency),readOnly(this,["oscillator","frequency","detune","filter","filterEnvelope","envelope"])}static getDefaults(){return Object.assign(Monophonic.getDefaults(),{envelope:Object.assign(omitFromObject(Envelope.getDefaults(),Object.keys(ToneAudioNode.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.9}),filter:Object.assign(omitFromObject(Filter.getDefaults(),Object.keys(ToneAudioNode.getDefaults())),{Q:1,rolloff:-12,type:"lowpass"}),filterEnvelope:Object.assign(omitFromObject(FrequencyEnvelope.getDefaults(),Object.keys(ToneAudioNode.getDefaults())),{attack:.6,baseFrequency:200,decay:.2,exponent:2,octaves:3,release:2,sustain:.5}),oscillator:Object.assign(omitFromObject(OmniOscillator.getDefaults(),Object.keys(Source.getDefaults())),{type:"sawtooth"})})}_triggerEnvelopeAttack(et,nt=1){if(this.envelope.triggerAttack(et,nt),this.filterEnvelope.triggerAttack(et),this.oscillator.start(et),this.envelope.sustain===0){const rt=this.toSeconds(this.envelope.attack),it=this.toSeconds(this.envelope.decay);this.oscillator.stop(et+rt+it)}}_triggerEnvelopeRelease(et){this.envelope.triggerRelease(et),this.filterEnvelope.triggerRelease(et),this.oscillator.stop(et+this.toSeconds(this.envelope.release))}getLevelAtTime(et){return et=this.toSeconds(et),this.envelope.getValueAtTime(et)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this.filterEnvelope.dispose(),this.filter.dispose(),this}}class MembraneSynth extends Synth{constructor(){super(optionsFromArguments(MembraneSynth.getDefaults(),arguments)),this.name="MembraneSynth",this.portamento=0;const et=optionsFromArguments(MembraneSynth.getDefaults(),arguments);this.pitchDecay=et.pitchDecay,this.octaves=et.octaves,readOnly(this,["oscillator","envelope"])}static getDefaults(){return deepMerge(Monophonic.getDefaults(),Synth.getDefaults(),{envelope:{attack:.001,attackCurve:"exponential",decay:.4,release:1.4,sustain:.01},octaves:10,oscillator:{type:"sine"},pitchDecay:.05})}setNote(et,nt){const rt=this.toSeconds(nt),it=this.toFrequency(et instanceof FrequencyClass?et.toFrequency():et),ot=it*this.octaves;return this.oscillator.frequency.setValueAtTime(ot,rt),this.oscillator.frequency.exponentialRampToValueAtTime(it,rt+this.toSeconds(this.pitchDecay)),this}dispose(){return super.dispose(),this}}__decorate([range$3(0)],MembraneSynth.prototype,"octaves",void 0);__decorate([timeRange(0)],MembraneSynth.prototype,"pitchDecay",void 0);const workletContext=new Set;function addToWorklet(tt){workletContext.add(tt)}function registerProcessor(tt,et){const nt=`registerProcessor("${tt}", ${et})`;workletContext.add(nt)}const toneAudioWorkletProcessor=` + */class Tone{constructor(){this.debug=!1,this._wasDisposed=!1}static getDefaults(){return{}}log(...et){(this.debug||theWindow&&this.toString()===theWindow.TONE_DEBUG_CLASS)&&log$1(this,...et)}dispose(){return this._wasDisposed=!0,this}get disposed(){return this._wasDisposed}toString(){return this.name}}Tone.version=version$1;const EPSILON=1e-6;function GT(tt,et){return tt>et+EPSILON}function GTE(tt,et){return GT(tt,et)||EQ(tt,et)}function LT(tt,et){return tt+EPSILONthis.memory){const nt=this.length-this.memory;this._timeline.splice(0,nt)}return this}remove(et){const nt=this._timeline.indexOf(et);return nt!==-1&&this._timeline.splice(nt,1),this}get(et,nt="time"){const rt=this._search(et,nt);return rt!==-1?this._timeline[rt]:null}peek(){return this._timeline[0]}shift(){return this._timeline.shift()}getAfter(et,nt="time"){const rt=this._search(et,nt);return rt+10&&this._timeline[nt-1].time=0?this._timeline[rt-1]:null}cancel(et){if(this._timeline.length>1){let nt=this._search(et);if(nt>=0)if(EQ(this._timeline[nt].time,et)){for(let rt=nt;rt>=0&&EQ(this._timeline[rt].time,et);rt--)nt=rt;this._timeline=this._timeline.slice(0,nt)}else this._timeline=this._timeline.slice(0,nt+1);else this._timeline=[]}else this._timeline.length===1&>E(this._timeline[0].time,et)&&(this._timeline=[]);return this}cancelBefore(et){const nt=this._search(et);return nt>=0&&(this._timeline=this._timeline.slice(nt+1)),this}previousEvent(et){const nt=this._timeline.indexOf(et);return nt>0?this._timeline[nt-1]:null}_search(et,nt="time"){if(this._timeline.length===0)return-1;let rt=0;const it=this._timeline.length;let ot=it;if(it>0&&this._timeline[it-1][nt]<=et)return it-1;for(;rt=0&&this._timeline[rt].time>=et;)rt--;return this._iterate(nt,rt+1),this}forEachAtTime(et,nt){const rt=this._search(et);if(rt!==-1&&EQ(this._timeline[rt].time,et)){let it=rt;for(let ot=rt;ot>=0&&EQ(this._timeline[ot].time,et);ot--)it=ot;this._iterate(ot=>{nt(ot)},it,rt)}return this}dispose(){return super.dispose(),this._timeline=[],this}}const notifyNewContext=[];function onContextInit(tt){notifyNewContext.push(tt)}function initializeContext(tt){notifyNewContext.forEach(et=>et(tt))}const notifyCloseContext=[];function onContextClose(tt){notifyCloseContext.push(tt)}function closeContext(tt){notifyCloseContext.forEach(et=>et(tt))}let Emitter$1=class xw extends Tone{constructor(){super(...arguments),this.name="Emitter"}on(et,nt){return et.split(/\W+/).forEach(it=>{isUndef(this._events)&&(this._events={}),this._events.hasOwnProperty(it)||(this._events[it]=[]),this._events[it].push(nt)}),this}once(et,nt){const rt=(...it)=>{nt(...it),this.off(et,rt)};return this.on(et,rt),this}off(et,nt){return et.split(/\W+/).forEach(it=>{if(isUndef(this._events)&&(this._events={}),this._events.hasOwnProperty(it))if(isUndef(nt))this._events[it]=[];else{const ot=this._events[it];for(let at=ot.length-1;at>=0;at--)ot[at]===nt&&ot.splice(at,1)}}),this}emit(et,...nt){if(this._events&&this._events.hasOwnProperty(et)){const rt=this._events[et].slice(0);for(let it=0,ot=rt.length;it{const rt=Object.getOwnPropertyDescriptor(xw.prototype,nt);Object.defineProperty(et.prototype,nt,rt)})}dispose(){return super.dispose(),this._events=void 0,this}};class BaseContext extends Emitter$1{constructor(){super(...arguments),this.isOffline=!1}toJSON(){return{}}}class Context extends BaseContext{constructor(){var et,nt;super(),this.name="Context",this._constants=new Map,this._timeouts=new Timeline,this._timeoutIds=0,this._initialized=!1,this._closeStarted=!1,this.isOffline=!1,this._workletPromise=null;const rt=optionsFromArguments(Context.getDefaults(),arguments,["context"]);rt.context?(this._context=rt.context,this._latencyHint=((et=arguments[0])===null||et===void 0?void 0:et.latencyHint)||""):(this._context=createAudioContext({latencyHint:rt.latencyHint}),this._latencyHint=rt.latencyHint),this._ticker=new Ticker(this.emit.bind(this,"tick"),rt.clockSource,rt.updateInterval,this._context.sampleRate),this.on("tick",this._timeoutLoop.bind(this)),this._context.onstatechange=()=>{this.emit("statechange",this.state)},this[!((nt=arguments[0])===null||nt===void 0)&&nt.hasOwnProperty("updateInterval")?"_lookAhead":"lookAhead"]=rt.lookAhead}static getDefaults(){return{clockSource:"worker",latencyHint:"interactive",lookAhead:.1,updateInterval:.05}}initialize(){return this._initialized||(initializeContext(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(et,nt,rt){return this._context.createBuffer(et,nt,rt)}createChannelMerger(et){return this._context.createChannelMerger(et)}createChannelSplitter(et){return this._context.createChannelSplitter(et)}createConstantSource(){return this._context.createConstantSource()}createConvolver(){return this._context.createConvolver()}createDelay(et){return this._context.createDelay(et)}createDynamicsCompressor(){return this._context.createDynamicsCompressor()}createGain(){return this._context.createGain()}createIIRFilter(et,nt){return this._context.createIIRFilter(et,nt)}createPanner(){return this._context.createPanner()}createPeriodicWave(et,nt,rt){return this._context.createPeriodicWave(et,nt,rt)}createStereoPanner(){return this._context.createStereoPanner()}createWaveShaper(){return this._context.createWaveShaper()}createMediaStreamSource(et){return assert(isAudioContext(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamSource(et)}createMediaElementSource(et){return assert(isAudioContext(this._context),"Not available if OfflineAudioContext"),this._context.createMediaElementSource(et)}createMediaStreamDestination(){return assert(isAudioContext(this._context),"Not available if OfflineAudioContext"),this._context.createMediaStreamDestination()}decodeAudioData(et){return this._context.decodeAudioData(et)}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(et){assert(!this._initialized,"The listener cannot be set after initialization."),this._listener=et}get transport(){return this.initialize(),this._transport}set transport(et){assert(!this._initialized,"The transport cannot be set after initialization."),this._transport=et}get draw(){return this.initialize(),this._draw}set draw(et){assert(!this._initialized,"Draw cannot be set after initialization."),this._draw=et}get destination(){return this.initialize(),this._destination}set destination(et){assert(!this._initialized,"The destination cannot be set after initialization."),this._destination=et}createAudioWorkletNode(et,nt){return createAudioWorkletNode(this.rawContext,et,nt)}addAudioWorkletModule(et){return __awaiter(this,void 0,void 0,function*(){assert(isDefined(this.rawContext.audioWorklet),"AudioWorkletNode is only available in a secure context (https or localhost)"),this._workletPromise||(this._workletPromise=this.rawContext.audioWorklet.addModule(et)),yield this._workletPromise})}workletsAreReady(){return __awaiter(this,void 0,void 0,function*(){(yield this._workletPromise)?this._workletPromise:Promise.resolve()})}get updateInterval(){return this._ticker.updateInterval}set updateInterval(et){this._ticker.updateInterval=et}get clockSource(){return this._ticker.type}set clockSource(et){this._ticker.type=et}get lookAhead(){return this._lookAhead}set lookAhead(et){this._lookAhead=et,this.updateInterval=et?et/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 isAudioContext(this._context)?this._context.resume():Promise.resolve()}close(){return __awaiter(this,void 0,void 0,function*(){isAudioContext(this._context)&&this.state!=="closed"&&!this._closeStarted&&(this._closeStarted=!0,yield this._context.close()),this._initialized&&closeContext(this)})}getConstant(et){if(this._constants.has(et))return this._constants.get(et);{const nt=this._context.createBuffer(1,128,this._context.sampleRate),rt=nt.getChannelData(0);for(let ot=0;otthis._constants[et].disconnect()),this.close(),this}_timeoutLoop(){const et=this.now();let nt=this._timeouts.peek();for(;this._timeouts.length&&nt&&nt.time<=et;)nt.callback(),this._timeouts.shift(),nt=this._timeouts.peek()}setTimeout(et,nt){this._timeoutIds++;const rt=this.now();return this._timeouts.add({callback:et,id:this._timeoutIds,time:rt+nt}),this._timeoutIds}clearTimeout(et){return this._timeouts.forEach(nt=>{nt.id===et&&this._timeouts.remove(nt)}),this}clearInterval(et){return this.clearTimeout(et)}setInterval(et,nt){const rt=++this._timeoutIds,it=()=>{const ot=this.now();this._timeouts.add({callback:()=>{et(),it()},id:rt,time:ot+nt})};return it(),rt}}class DummyContext extends BaseContext{constructor(){super(...arguments),this.lookAhead=0,this.latencyHint=0,this.isOffline=!1}createAnalyser(){return{}}createOscillator(){return{}}createBufferSource(){return{}}createBiquadFilter(){return{}}createBuffer(et,nt,rt){return{}}createChannelMerger(et){return{}}createChannelSplitter(et){return{}}createConstantSource(){return{}}createConvolver(){return{}}createDelay(et){return{}}createDynamicsCompressor(){return{}}createGain(){return{}}createIIRFilter(et,nt){return{}}createPanner(){return{}}createPeriodicWave(et,nt,rt){return{}}createStereoPanner(){return{}}createWaveShaper(){return{}}createMediaStreamSource(et){return{}}createMediaElementSource(et){return{}}createMediaStreamDestination(){return{}}decodeAudioData(et){return Promise.resolve({})}createAudioWorkletNode(et,nt){return{}}get rawContext(){return{}}addAudioWorkletModule(et){return __awaiter(this,void 0,void 0,function*(){return Promise.resolve()})}resume(){return Promise.resolve()}setTimeout(et,nt){return 0}clearTimeout(et){return this}setInterval(et,nt){return 0}clearInterval(et){return this}getConstant(et){return{}}get currentTime(){return 0}get state(){return{}}get sampleRate(){return 0}get listener(){return{}}get transport(){return{}}get draw(){return{}}set draw(et){}get destination(){return{}}set destination(et){}now(){return 0}immediate(){return 0}}function readOnly(tt,et){isArray$e(et)?et.forEach(nt=>readOnly(tt,nt)):Object.defineProperty(tt,et,{enumerable:!0,writable:!1})}function writable(tt,et){isArray$e(et)?et.forEach(nt=>writable(tt,nt)):Object.defineProperty(tt,et,{writable:!0})}const noOp=()=>{};class ToneAudioBuffer extends Tone{constructor(){super(),this.name="ToneAudioBuffer",this.onload=noOp;const et=optionsFromArguments(ToneAudioBuffer.getDefaults(),arguments,["url","onload","onerror"]);this.reverse=et.reverse,this.onload=et.onload,isString$2(et.url)?this.load(et.url).catch(et.onerror):et.url&&this.set(et.url)}static getDefaults(){return{onerror:noOp,onload:noOp,reverse:!1}}get sampleRate(){return this._buffer?this._buffer.sampleRate:getContext().sampleRate}set(et){return et instanceof ToneAudioBuffer?et.loaded?this._buffer=et.get():et.onload=()=>{this.set(et),this.onload(this)}:this._buffer=et,this._reversed&&this._reverse(),this}get(){return this._buffer}load(et){return __awaiter(this,void 0,void 0,function*(){const nt=ToneAudioBuffer.load(et).then(rt=>{this.set(rt),this.onload(this)});ToneAudioBuffer.downloads.push(nt);try{yield nt}finally{const rt=ToneAudioBuffer.downloads.indexOf(nt);ToneAudioBuffer.downloads.splice(rt,1)}return this})}dispose(){return super.dispose(),this._buffer=void 0,this}fromArray(et){const nt=isArray$e(et)&&et[0].length>0,rt=nt?et.length:1,it=nt?et[0].length:et.length,ot=getContext(),at=ot.createBuffer(rt,it,ot.sampleRate),st=!nt&&rt===1?[et]:et;for(let lt=0;ltit/rt),this.fromArray(nt)}return this}toArray(et){if(isNumber$4(et))return this.getChannelData(et);if(this.numberOfChannels===1)return this.toArray(0);{const nt=[];for(let rt=0;rt0}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(et){this._reversed!==et&&(this._reversed=et,this._reverse())}static fromArray(et){return new ToneAudioBuffer().fromArray(et)}static fromUrl(et){return __awaiter(this,void 0,void 0,function*(){return yield new ToneAudioBuffer().load(et)})}static load(et){return __awaiter(this,void 0,void 0,function*(){const nt=et.match(/\[([^\]\[]+\|.+)\]$/);if(nt){const lt=nt[1].split("|");let ct=lt[0];for(const ut of lt)if(ToneAudioBuffer.supportsType(ut)){ct=ut;break}et=et.replace(nt[0],ct)}const rt=ToneAudioBuffer.baseUrl===""||ToneAudioBuffer.baseUrl.endsWith("/")?ToneAudioBuffer.baseUrl:ToneAudioBuffer.baseUrl+"/",it=document.createElement("a");it.href=rt+et,it.pathname=(it.pathname+it.hash).split("/").map(encodeURIComponent).join("/");const ot=yield fetch(it.href);if(!ot.ok)throw new Error(`could not load url: ${et}`);const at=yield ot.arrayBuffer();return yield getContext().decodeAudioData(at)})}static supportsType(et){const nt=et.split("."),rt=nt[nt.length-1];return document.createElement("audio").canPlayType("audio/"+rt)!==""}static loaded(){return __awaiter(this,void 0,void 0,function*(){for(yield Promise.resolve();ToneAudioBuffer.downloads.length;)yield ToneAudioBuffer.downloads[0]})}}ToneAudioBuffer.baseUrl="";ToneAudioBuffer.downloads=[];class OfflineContext extends Context{constructor(){super({clockSource:"offline",context:isOfflineAudioContext(arguments[0])?arguments[0]:createOfflineAudioContext(arguments[0],arguments[1]*arguments[2],arguments[2]),lookAhead:0,updateInterval:isOfflineAudioContext(arguments[0])?128/arguments[0].sampleRate:128/arguments[2]}),this.name="OfflineContext",this._currentTime=0,this.isOffline=!0,this._duration=isOfflineAudioContext(arguments[0])?arguments[0].length/arguments[0].sampleRate:arguments[1]}now(){return this._currentTime}get currentTime(){return this._currentTime}_renderClock(et){return __awaiter(this,void 0,void 0,function*(){let nt=0;for(;this._duration-this._currentTime>=0;){this.emit("tick"),this._currentTime+=128/this.sampleRate,nt++;const rt=Math.floor(this.sampleRate/128);et&&nt%rt===0&&(yield new Promise(it=>setTimeout(it,1)))}})}render(et=!0){return __awaiter(this,void 0,void 0,function*(){yield this.workletsAreReady(),yield this._renderClock(et);const nt=yield this._context.startRendering();return new ToneAudioBuffer(nt)})}close(){return Promise.resolve()}}const dummyContext=new DummyContext;let globalContext=dummyContext;function getContext(){return globalContext===dummyContext&&hasAudioContext&&setContext(new Context),globalContext}function setContext(tt,et=!1){et&&globalContext.dispose(),isAudioContext(tt)?globalContext=new Context(tt):isOfflineAudioContext(tt)?globalContext=new OfflineContext(tt):globalContext=tt}function start$1(){return globalContext.resume()}if(theWindow&&!theWindow.TONE_SILENCE_LOGGING){const et=` * Tone.js v${version$1} * `;console.log(`%c${et}`,"background: #000; color: #fff")}function dbToGain(tt){return Math.pow(10,tt/20)}function gainToDb(tt){return 20*(Math.log(tt)/Math.LN10)}function intervalToFrequencyRatio(tt){return Math.pow(2,tt/12)}let A4=440;function getA4(){return A4}function setA4(tt){A4=tt}function ftom(tt){return Math.round(ftomf(tt))}function ftomf(tt){return 69+12*Math.log2(tt/A4)}function mtof(tt){return A4*Math.pow(2,(tt-69)/12)}class TimeBaseClass extends Tone{constructor(et,nt,rt){super(),this.defaultUnits="s",this._val=nt,this._units=rt,this.context=et,this._expressions=this._getExpressions()}_getExpressions(){return{hz:{method:et=>this._frequencyToUnits(parseFloat(et)),regexp:/^(\d+(?:\.\d+)?)hz$/i},i:{method:et=>this._ticksToUnits(parseInt(et,10)),regexp:/^(\d+)i$/i},m:{method:et=>this._beatsToUnits(parseInt(et,10)*this._getTimeSignature()),regexp:/^(\d+)m$/i},n:{method:(et,nt)=>{const rt=parseInt(et,10),it=nt==="."?1.5:1;return rt===1?this._beatsToUnits(this._getTimeSignature())*it:this._beatsToUnits(4/rt)*it},regexp:/^(\d+)n(\.?)$/i},number:{method:et=>this._expressions[this.defaultUnits].method.call(this,et),regexp:/^(\d+(?:\.\d+)?)$/},s:{method:et=>this._secondsToUnits(parseFloat(et)),regexp:/^(\d+(?:\.\d+)?)s$/},samples:{method:et=>parseInt(et,10)/this.context.sampleRate,regexp:/^(\d+)samples$/},t:{method:et=>{const nt=parseInt(et,10);return this._beatsToUnits(8/(Math.floor(nt)*3))},regexp:/^(\d+)t$/i},tr:{method:(et,nt,rt)=>{let it=0;return et&&et!=="0"&&(it+=this._beatsToUnits(this._getTimeSignature()*parseFloat(et))),nt&&nt!=="0"&&(it+=this._beatsToUnits(parseFloat(nt))),rt&&rt!=="0"&&(it+=this._beatsToUnits(parseFloat(rt)/4)),it},regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?$/}}}valueOf(){if(this._val instanceof TimeBaseClass&&this.fromType(this._val),isUndef(this._val))return this._noArg();if(isString$2(this._val)&&isUndef(this._units)){for(const et in this._expressions)if(this._expressions[et].regexp.test(this._val.trim())){this._units=et;break}}else if(isObject$7(this._val)){let et=0;for(const nt in this._val)if(isDefined(this._val[nt])){const rt=this._val[nt],it=new this.constructor(this.context,nt).valueOf()*rt;et+=it}return et}if(isDefined(this._units)){const et=this._expressions[this._units],nt=this._val.toString().trim().match(et.regexp);return nt?et.method.apply(this,nt.slice(1)):et.method.call(this,this._val)}else return isString$2(this._val)?parseFloat(this._val):this._val}_frequencyToUnits(et){return 1/et}_beatsToUnits(et){return 60/this._getBpm()*et}_secondsToUnits(et){return et}_ticksToUnits(et){return et*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(et){switch(this._units=void 0,this.defaultUnits){case"s":this._val=et.toSeconds();break;case"i":this._val=et.toTicks();break;case"hz":this._val=et.toFrequency();break;case"midi":this._val=et.toMidi();break}return this}toFrequency(){return 1/this.toSeconds()}toSamples(){return this.toSeconds()*this.context.sampleRate}toMilliseconds(){return this.toSeconds()*1e3}}class TimeClass extends TimeBaseClass{constructor(){super(...arguments),this.name="TimeClass"}_getExpressions(){return Object.assign(super._getExpressions(),{now:{method:et=>this._now()+new this.constructor(this.context,et).valueOf(),regexp:/^\+(.+)/},quantize:{method:et=>{const nt=new TimeClass(this.context,et).valueOf();return this._secondsToUnits(this.context.transport.nextSubdivision(nt))},regexp:/^@(.+)/}})}quantize(et,nt=1){const rt=new this.constructor(this.context,et).valueOf(),it=this.valueOf(),st=Math.round(it/rt)*rt-it;return it+st*nt}toNotation(){const et=this.toSeconds(),nt=["1m"];for(let ot=1;ot<9;ot++){const at=Math.pow(2,ot);nt.push(at+"n."),nt.push(at+"n"),nt.push(at+"t")}nt.push("0");let rt=nt[0],it=new TimeClass(this.context,nt[0]).toSeconds();return nt.forEach(ot=>{const at=new TimeClass(this.context,ot).toSeconds();Math.abs(at-et)3&&(it=parseFloat(parseFloat(ot).toFixed(3))),[rt,nt,it].join(":")}toTicks(){const et=this._beatsToUnits(1);return this.valueOf()/et*this._getPPQ()}toSeconds(){return this.valueOf()}toMidi(){return ftom(this.toFrequency())}_now(){return this.context.now()}}class FrequencyClass extends TimeClass{constructor(){super(...arguments),this.name="Frequency",this.defaultUnits="hz"}static get A4(){return getA4()}static set A4(et){setA4(et)}_getExpressions(){return Object.assign({},super._getExpressions(),{midi:{regexp:/^(\d+(?:\.\d+)?midi)/,method(et){return this.defaultUnits==="midi"?et:FrequencyClass.mtof(et)}},note:{regexp:/^([a-g]{1}(?:b|#|##|x|bb|###|#x|x#|bbb)?)(-?[0-9]+)/i,method(et,nt){const it=noteToScaleIndex[et.toLowerCase()]+(parseInt(nt,10)+1)*12;return this.defaultUnits==="midi"?it:FrequencyClass.mtof(it)}},tr:{regexp:/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?):?(\d+(?:\.\d+)?)?/,method(et,nt,rt){let it=1;return et&&et!=="0"&&(it*=this._beatsToUnits(this._getTimeSignature()*parseFloat(et))),nt&&nt!=="0"&&(it*=this._beatsToUnits(parseFloat(nt))),rt&&rt!=="0"&&(it*=this._beatsToUnits(parseFloat(rt)/4)),it}}})}transpose(et){return new FrequencyClass(this.context,this.valueOf()*intervalToFrequencyRatio(et))}harmonize(et){return et.map(nt=>this.transpose(nt))}toMidi(){return ftom(this.valueOf())}toNote(){const et=this.toFrequency(),nt=Math.log2(et/FrequencyClass.A4);let rt=Math.round(12*nt)+57;const it=Math.floor(rt/12);return it<0&&(rt+=-12*it),scaleIndexToNote[rt%12]+it.toString()}toSeconds(){return 1/super.toSeconds()}toTicks(){const et=this._beatsToUnits(1),nt=this.valueOf()/et;return Math.floor(nt*this._getPPQ())}_noArg(){return 0}_frequencyToUnits(et){return et}_ticksToUnits(et){return 1/(et*60/(this._getBpm()*this._getPPQ()))}_beatsToUnits(et){return 1/super._beatsToUnits(et)}_secondsToUnits(et){return 1/et}static mtof(et){return mtof(et)}static ftom(et){return ftom(et)}}const noteToScaleIndex={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},scaleIndexToNote=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"];class TransportTimeClass extends TimeClass{constructor(){super(...arguments),this.name="TransportTime"}_now(){return this.context.transport.seconds}}class ToneWithContext extends Tone{constructor(){super();const et=optionsFromArguments(ToneWithContext.getDefaults(),arguments,["context"]);this.defaultContext?this.context=this.defaultContext:this.context=et.context}static getDefaults(){return{context:getContext()}}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(et){return assertUsedScheduleTime(et),new TimeClass(this.context,et).toSeconds()}toFrequency(et){return new FrequencyClass(this.context,et).toFrequency()}toTicks(et){return new TransportTimeClass(this.context,et).toTicks()}_getPartialProperties(et){const nt=this.get();return Object.keys(nt).forEach(rt=>{isUndef(et[rt])&&delete nt[rt]}),nt}get(){const et=getDefaultsFromInstance(this);return Object.keys(et).forEach(nt=>{if(Reflect.has(this,nt)){const rt=this[nt];isDefined(rt)&&isDefined(rt.value)&&isDefined(rt.setValueAtTime)?et[nt]=rt.value:rt instanceof ToneWithContext?et[nt]=rt._getPartialProperties(et[nt]):isArray$e(rt)||isNumber$4(rt)||isString$2(rt)||isBoolean$1(rt)?et[nt]=rt:delete et[nt]}}),et}set(et){return Object.keys(et).forEach(nt=>{Reflect.has(this,nt)&&isDefined(this[nt])&&(this[nt]&&isDefined(this[nt].value)&&isDefined(this[nt].setValueAtTime)?this[nt].value!==et[nt]&&(this[nt].value=et[nt]):this[nt]instanceof ToneWithContext?this[nt].set(et[nt]):this[nt]=et[nt])}),this}}class StateTimeline extends Timeline{constructor(et="stopped"){super(),this.name="StateTimeline",this._initial=et,this.setStateAtTime(this._initial,0)}getValueAtTime(et){const nt=this.get(et);return nt!==null?nt.state:this._initial}setStateAtTime(et,nt,rt){return assertRange(nt,0),this.add(Object.assign({},rt,{state:et,time:nt})),this}getLastState(et,nt){const rt=this._search(nt);for(let it=rt;it>=0;it--){const ot=this._timeline[it];if(ot.state===et)return ot}}getNextState(et,nt){const rt=this._search(nt);if(rt!==-1)for(let it=rt;it0,"timeConstant must be a number greater than 0");const ot=this.toSeconds(nt);return this._assertRange(it),assert(isFinite(it)&&isFinite(ot),`Invalid argument(s) to setTargetAtTime: ${JSON.stringify(et)}, ${JSON.stringify(nt)}`),this._events.add({constant:rt,time:ot,type:"setTargetAtTime",value:it}),this.log(this.units,"setTargetAtTime",et,ot,rt),this._param.setTargetAtTime(it,ot,rt),this}setValueCurveAtTime(et,nt,rt,it=1){rt=this.toSeconds(rt),nt=this.toSeconds(nt);const ot=this._fromType(et[0])*it;this.setValueAtTime(this._toType(ot),nt);const at=rt/(et.length-1);for(let st=1;st{it.type==="cancelScheduledValues"?et.cancelScheduledValues(it.time):it.type==="setTargetAtTime"?et.setTargetAtTime(it.value,it.time,it.constant):et[it.type](it.value,it.time)}),this}setParam(et){assert(this._swappable,"The Param must be assigned as 'swappable' in the constructor");const nt=this.input;return nt.disconnect(this._param),this.apply(et),this._param=et,nt.connect(this._param),this}dispose(){return super.dispose(),this._events.dispose(),this}get defaultValue(){return this._toType(this._param.defaultValue)}_exponentialApproach(et,nt,rt,it,ot){return rt+(nt-rt)*Math.exp(-(ot-et)/it)}_linearInterpolate(et,nt,rt,it,ot){return nt+(it-nt)*((ot-et)/(rt-et))}_exponentialInterpolate(et,nt,rt,it,ot){return nt*Math.pow(it/nt,(ot-et)/(rt-et))}}class ToneAudioNode extends ToneWithContext{constructor(){super(...arguments),this._internalChannels=[]}get numberOfInputs(){return isDefined(this.input)?isAudioParam(this.input)||this.input instanceof Param?1:this.input.numberOfInputs:0}get numberOfOutputs(){return isDefined(this.output)?this.output.numberOfOutputs:0}_isAudioNode(et){return isDefined(et)&&(et instanceof ToneAudioNode||isAudioNode(et))}_getInternalNodes(){const et=this._internalChannels.slice(0);return this._isAudioNode(this.input)&&et.push(this.input),this._isAudioNode(this.output)&&this.input!==this.output&&et.push(this.output),et}_setChannelProperties(et){this._getInternalNodes().forEach(rt=>{rt.channelCount=et.channelCount,rt.channelCountMode=et.channelCountMode,rt.channelInterpretation=et.channelInterpretation})}_getChannelProperties(){const et=this._getInternalNodes();assert(et.length>0,"ToneAudioNode does not have any internal nodes");const nt=et[0];return{channelCount:nt.channelCount,channelCountMode:nt.channelCountMode,channelInterpretation:nt.channelInterpretation}}get channelCount(){return this._getChannelProperties().channelCount}set channelCount(et){const nt=this._getChannelProperties();this._setChannelProperties(Object.assign(nt,{channelCount:et}))}get channelCountMode(){return this._getChannelProperties().channelCountMode}set channelCountMode(et){const nt=this._getChannelProperties();this._setChannelProperties(Object.assign(nt,{channelCountMode:et}))}get channelInterpretation(){return this._getChannelProperties().channelInterpretation}set channelInterpretation(et){const nt=this._getChannelProperties();this._setChannelProperties(Object.assign(nt,{channelInterpretation:et}))}connect(et,nt=0,rt=0){return connect(this,et,nt,rt),this}toDestination(){return this.connect(this.context.destination),this}toMaster(){return warn$2("toMaster() has been renamed toDestination()"),this.toDestination()}disconnect(et,nt=0,rt=0){return disconnect(this,et,nt,rt),this}chain(...et){return connectSeries(this,...et),this}fan(...et){return et.forEach(nt=>this.connect(nt)),this}dispose(){return super.dispose(),isDefined(this.input)&&(this.input instanceof ToneAudioNode?this.input.dispose():isAudioNode(this.input)&&this.input.disconnect()),isDefined(this.output)&&(this.output instanceof ToneAudioNode?this.output.dispose():isAudioNode(this.output)&&this.output.disconnect()),this._internalChannels=[],this}}function connectSeries(...tt){const et=tt.shift();tt.reduce((nt,rt)=>(nt instanceof ToneAudioNode?nt.connect(rt):isAudioNode(nt)&&connect(nt,rt),rt),et)}function connect(tt,et,nt=0,rt=0){for(assert(isDefined(tt),"Cannot connect from undefined node"),assert(isDefined(et),"Cannot connect to undefined node"),(et instanceof ToneAudioNode||isAudioNode(et))&&assert(et.numberOfInputs>0,"Cannot connect to node with no inputs"),assert(tt.numberOfOutputs>0,"Cannot connect from node with no outputs");et instanceof ToneAudioNode||et instanceof Param;)isDefined(et.input)&&(et=et.input);for(;tt instanceof ToneAudioNode;)isDefined(tt.output)&&(tt=tt.output);isAudioParam(et)?tt.connect(et,nt):tt.connect(et,nt,rt)}function disconnect(tt,et,nt=0,rt=0){if(isDefined(et))for(;et instanceof ToneAudioNode;)et=et.input;for(;!isAudioNode(tt);)isDefined(tt.output)&&(tt=tt.output);isAudioParam(et)?tt.disconnect(et,nt):isAudioNode(et)?tt.disconnect(et,nt,rt):tt.disconnect()}class Gain extends ToneAudioNode{constructor(){super(optionsFromArguments(Gain.getDefaults(),arguments,["gain","units"])),this.name="Gain",this._gainNode=this.context.createGain(),this.input=this._gainNode,this.output=this._gainNode;const et=optionsFromArguments(Gain.getDefaults(),arguments,["gain","units"]);this.gain=new Param({context:this.context,convert:et.convert,param:this._gainNode.gain,units:et.units,value:et.gain,minValue:et.minValue,maxValue:et.maxValue}),readOnly(this,"gain")}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{convert:!0,gain:1,units:"gain"})}dispose(){return super.dispose(),this._gainNode.disconnect(),this.gain.dispose(),this}}class OneShotSource extends ToneAudioNode{constructor(et){super(et),this.onended=noOp,this._startTime=-1,this._stopTime=-1,this._timeout=-1,this.output=new Gain({context:this.context,gain:0}),this._gainNode=this.output,this.getStateAtTime=function(nt){const rt=this.toSeconds(nt);return this._startTime!==-1&&rt>=this._startTime&&(this._stopTime===-1||rt<=this._stopTime)?"started":"stopped"},this._fadeIn=et.fadeIn,this._fadeOut=et.fadeOut,this._curve=et.curve,this.onended=et.onended}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{curve:"linear",fadeIn:0,fadeOut:0,onended:noOp})}_startGain(et,nt=1){assert(this._startTime===-1,"Source cannot be started more than once");const rt=this.toSeconds(this._fadeIn);return this._startTime=et+rt,this._startTime=Math.max(this._startTime,this.context.currentTime),rt>0?(this._gainNode.gain.setValueAtTime(0,et),this._curve==="linear"?this._gainNode.gain.linearRampToValueAtTime(nt,et+rt):this._gainNode.gain.exponentialApproachValueAtTime(nt,et,rt)):this._gainNode.gain.setValueAtTime(nt,et),this}stop(et){return this.log("stop",et),this._stopGain(this.toSeconds(et)),this}_stopGain(et){assert(this._startTime!==-1,"'start' must be called before 'stop'"),this.cancelStop();const nt=this.toSeconds(this._fadeOut);return this._stopTime=this.toSeconds(et)+nt,this._stopTime=Math.max(this._stopTime,this.now()),nt>0?this._curve==="linear"?this._gainNode.gain.linearRampTo(0,nt,et):this._gainNode.gain.targetRampTo(0,nt,et):(this._gainNode.gain.cancelAndHoldAtTime(et),this._gainNode.gain.setValueAtTime(0,et)),this.context.clearTimeout(this._timeout),this._timeout=this.context.setTimeout(()=>{const rt=this._curve==="exponential"?nt*2:0;this._stopSource(this.now()+rt),this._onended()},this._stopTime-this.context.currentTime),this}_onended(){if(this.onended!==noOp&&(this.onended(this),this.onended=noOp,!this.context.isOffline)){const et=()=>this.dispose();typeof window.requestIdleCallback<"u"?window.requestIdleCallback(et):setTimeout(et,1e3)}}get state(){return this.getStateAtTime(this.now())}cancelStop(){return this.log("cancelStop"),assert(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=noOp,this}}class ToneConstantSource extends OneShotSource{constructor(){super(optionsFromArguments(ToneConstantSource.getDefaults(),arguments,["offset"])),this.name="ToneConstantSource",this._source=this.context.createConstantSource();const et=optionsFromArguments(ToneConstantSource.getDefaults(),arguments,["offset"]);connect(this._source,this._gainNode),this.offset=new Param({context:this.context,convert:et.convert,param:this._source.offset,units:et.units,value:et.offset,minValue:et.minValue,maxValue:et.maxValue})}static getDefaults(){return Object.assign(OneShotSource.getDefaults(),{convert:!0,offset:1,units:"number"})}start(et){const nt=this.toSeconds(et);return this.log("start",nt),this._startGain(nt),this._source.start(nt),this}_stopSource(et){this._source.stop(et)}dispose(){return super.dispose(),this.state==="started"&&this.stop(),this._source.disconnect(),this.offset.dispose(),this}}class Signal extends ToneAudioNode{constructor(){super(optionsFromArguments(Signal.getDefaults(),arguments,["value","units"])),this.name="Signal",this.override=!0;const et=optionsFromArguments(Signal.getDefaults(),arguments,["value","units"]);this.output=this._constantSource=new ToneConstantSource({context:this.context,convert:et.convert,offset:et.value,units:et.units,minValue:et.minValue,maxValue:et.maxValue}),this._constantSource.start(0),this.input=this._param=this._constantSource.offset}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{convert:!0,units:"number",value:0})}connect(et,nt=0,rt=0){return connectSignal(this,et,nt,rt),this}dispose(){return super.dispose(),this._param.dispose(),this._constantSource.dispose(),this}setValueAtTime(et,nt){return this._param.setValueAtTime(et,nt),this}getValueAtTime(et){return this._param.getValueAtTime(et)}setRampPoint(et){return this._param.setRampPoint(et),this}linearRampToValueAtTime(et,nt){return this._param.linearRampToValueAtTime(et,nt),this}exponentialRampToValueAtTime(et,nt){return this._param.exponentialRampToValueAtTime(et,nt),this}exponentialRampTo(et,nt,rt){return this._param.exponentialRampTo(et,nt,rt),this}linearRampTo(et,nt,rt){return this._param.linearRampTo(et,nt,rt),this}targetRampTo(et,nt,rt){return this._param.targetRampTo(et,nt,rt),this}exponentialApproachValueAtTime(et,nt,rt){return this._param.exponentialApproachValueAtTime(et,nt,rt),this}setTargetAtTime(et,nt,rt){return this._param.setTargetAtTime(et,nt,rt),this}setValueCurveAtTime(et,nt,rt,it){return this._param.setValueCurveAtTime(et,nt,rt,it),this}cancelScheduledValues(et){return this._param.cancelScheduledValues(et),this}cancelAndHoldAtTime(et){return this._param.cancelAndHoldAtTime(et),this}rampTo(et,nt,rt){return this._param.rampTo(et,nt,rt),this}get value(){return this._param.value}set value(et){this._param.value=et}get convert(){return this._param.convert}set convert(et){this._param.convert=et}get units(){return this._param.units}get overridden(){return this._param.overridden}set overridden(et){this._param.overridden=et}get maxValue(){return this._param.maxValue}get minValue(){return this._param.minValue}apply(et){return this._param.apply(et),this}}function connectSignal(tt,et,nt,rt){(et instanceof Param||isAudioParam(et)||et instanceof Signal&&et.override)&&(et.cancelScheduledValues(0),et.setValueAtTime(0,0),et instanceof Signal&&(et.overridden=!0)),connect(tt,et,nt,rt)}class TickParam extends Param{constructor(){super(optionsFromArguments(TickParam.getDefaults(),arguments,["value"])),this.name="TickParam",this._events=new Timeline(1/0),this._multiplier=1;const et=optionsFromArguments(TickParam.getDefaults(),arguments,["value"]);this._multiplier=et.multiplier,this._events.cancel(0),this._events.add({ticks:0,time:0,type:"setValueAtTime",value:this._fromType(et.value)}),this.setValueAtTime(et.value,0)}static getDefaults(){return Object.assign(Param.getDefaults(),{multiplier:1,units:"hertz",value:1})}setTargetAtTime(et,nt,rt){nt=this.toSeconds(nt),this.setRampPoint(nt);const it=this._fromType(et),ot=this._events.get(nt),at=Math.round(Math.max(1/rt,1));for(let st=0;st<=at;st++){const lt=rt*st+nt,ct=this._exponentialApproach(ot.time,ot.value,it,rt,lt);this.linearRampToValueAtTime(this._toType(ct),lt)}return this}setValueAtTime(et,nt){const rt=this.toSeconds(nt);super.setValueAtTime(et,nt);const it=this._events.get(rt),ot=this._events.previousEvent(it),at=this._getTicksUntilEvent(ot,rt);return it.ticks=Math.max(at,0),this}linearRampToValueAtTime(et,nt){const rt=this.toSeconds(nt);super.linearRampToValueAtTime(et,nt);const it=this._events.get(rt),ot=this._events.previousEvent(it),at=this._getTicksUntilEvent(ot,rt);return it.ticks=Math.max(at,0),this}exponentialRampToValueAtTime(et,nt){nt=this.toSeconds(nt);const rt=this._fromType(et),it=this._events.get(nt),ot=Math.round(Math.max((nt-it.time)*10,1)),at=(nt-it.time)/ot;for(let st=0;st<=ot;st++){const lt=at*st+it.time,ct=this._exponentialInterpolate(it.time,it.value,nt,rt,lt);this.linearRampToValueAtTime(this._toType(ct),lt)}return this}_getTicksUntilEvent(et,nt){if(et===null)et={ticks:0,time:0,type:"setValueAtTime",value:0};else if(isUndef(et.ticks)){const at=this._events.previousEvent(et);et.ticks=this._getTicksUntilEvent(at,et.time)}const rt=this._fromType(this.getValueAtTime(et.time));let it=this._fromType(this.getValueAtTime(nt));const ot=this._events.get(nt);return ot&&ot.time===nt&&ot.type==="setValueAtTime"&&(it=this._fromType(this.getValueAtTime(nt-this.sampleTime))),.5*(nt-et.time)*(rt+it)+et.ticks}getTicksAtTime(et){const nt=this.toSeconds(et),rt=this._events.get(nt);return Math.max(this._getTicksUntilEvent(rt,nt),0)}getDurationOfTicks(et,nt){const rt=this.toSeconds(nt),it=this.getTicksAtTime(nt);return this.getTimeOfTick(it+et)-rt}getTimeOfTick(et){const nt=this._events.get(et,"ticks"),rt=this._events.getAfter(et,"ticks");if(nt&&nt.ticks===et)return nt.time;if(nt&&rt&&rt.type==="linearRampToValueAtTime"&&nt.value!==rt.value){const it=this._fromType(this.getValueAtTime(nt.time)),at=(this._fromType(this.getValueAtTime(rt.time))-it)/(rt.time-nt.time),st=Math.sqrt(Math.pow(it,2)-2*at*(nt.ticks-et)),lt=(-it+st)/at,ct=(-it-st)/at;return(lt>0?lt:ct)+nt.time}else return nt?nt.value===0?1/0:nt.time+(et-nt.ticks)/nt.value:et/this._initialValue}ticksToTime(et,nt){return this.getDurationOfTicks(et,nt)}timeToTicks(et,nt){const rt=this.toSeconds(nt),it=this.toSeconds(et),ot=this.getTicksAtTime(rt);return this.getTicksAtTime(rt+it)-ot}_fromType(et){return this.units==="bpm"&&this.multiplier?1/(60/et/this.multiplier):super._fromType(et)}_toType(et){return this.units==="bpm"&&this.multiplier?et/this.multiplier*60:super._toType(et)}get multiplier(){return this._multiplier}set multiplier(et){const nt=this.value;this._multiplier=et,this.cancelScheduledValues(0),this.setValueAtTime(nt,0)}}class TickSignal extends Signal{constructor(){super(optionsFromArguments(TickSignal.getDefaults(),arguments,["value"])),this.name="TickSignal";const et=optionsFromArguments(TickSignal.getDefaults(),arguments,["value"]);this.input=this._param=new TickParam({context:this.context,convert:et.convert,multiplier:et.multiplier,param:this._constantSource.offset,units:et.units,value:et.value})}static getDefaults(){return Object.assign(Signal.getDefaults(),{multiplier:1,units:"hertz",value:1})}ticksToTime(et,nt){return this._param.ticksToTime(et,nt)}timeToTicks(et,nt){return this._param.timeToTicks(et,nt)}getTimeOfTick(et){return this._param.getTimeOfTick(et)}getDurationOfTicks(et,nt){return this._param.getDurationOfTicks(et,nt)}getTicksAtTime(et){return this._param.getTicksAtTime(et)}get multiplier(){return this._param.multiplier}set multiplier(et){this._param.multiplier=et}dispose(){return super.dispose(),this._param.dispose(),this}}class TickSource extends ToneWithContext{constructor(){super(optionsFromArguments(TickSource.getDefaults(),arguments,["frequency"])),this.name="TickSource",this._state=new StateTimeline,this._tickOffset=new Timeline,this._ticksAtTime=new Timeline,this._secondsAtTime=new Timeline;const et=optionsFromArguments(TickSource.getDefaults(),arguments,["frequency"]);this.frequency=new TickSignal({context:this.context,units:et.units,value:et.frequency}),readOnly(this,"frequency"),this._state.setStateAtTime("stopped",0),this.setTicksAtTime(0,0)}static getDefaults(){return Object.assign({frequency:1,units:"hertz"},ToneWithContext.getDefaults())}get state(){return this.getStateAtTime(this.now())}start(et,nt){const rt=this.toSeconds(et);return this._state.getValueAtTime(rt)!=="started"&&(this._state.setStateAtTime("started",rt),isDefined(nt)&&this.setTicksAtTime(nt,rt),this._ticksAtTime.cancel(rt),this._secondsAtTime.cancel(rt)),this}stop(et){const nt=this.toSeconds(et);if(this._state.getValueAtTime(nt)==="stopped"){const rt=this._state.get(nt);rt&&rt.time>0&&(this._tickOffset.cancel(rt.time),this._state.cancel(rt.time))}return this._state.cancel(nt),this._state.setStateAtTime("stopped",nt),this.setTicksAtTime(0,nt),this._ticksAtTime.cancel(nt),this._secondsAtTime.cancel(nt),this}pause(et){const nt=this.toSeconds(et);return this._state.getValueAtTime(nt)==="started"&&(this._state.setStateAtTime("paused",nt),this._ticksAtTime.cancel(nt),this._secondsAtTime.cancel(nt)),this}cancel(et){return et=this.toSeconds(et),this._state.cancel(et),this._tickOffset.cancel(et),this._ticksAtTime.cancel(et),this._secondsAtTime.cancel(et),this}getTicksAtTime(et){const nt=this.toSeconds(et),rt=this._state.getLastState("stopped",nt),it=this._ticksAtTime.get(nt),ot={state:"paused",time:nt};this._state.add(ot);let at=it||rt,st=it?it.ticks:0,lt=null;return this._state.forEachBetween(at.time,nt+this.sampleTime,ct=>{let ut=at.time;const ht=this._tickOffset.get(ct.time);ht&&ht.time>=at.time&&(st=ht.ticks,ut=ht.time),at.state==="started"&&ct.state!=="started"&&(st+=this.frequency.getTicksAtTime(ct.time)-this.frequency.getTicksAtTime(ut),ct.time!=ot.time&&(lt={state:ct.state,time:ct.time,ticks:st})),at=ct}),this._state.remove(ot),lt&&this._ticksAtTime.add(lt),st}get ticks(){return this.getTicksAtTime(this.now())}set ticks(et){this.setTicksAtTime(et,this.now())}get seconds(){return this.getSecondsAtTime(this.now())}set seconds(et){const nt=this.now(),rt=this.frequency.timeToTicks(et,nt);this.setTicksAtTime(rt,nt)}getSecondsAtTime(et){et=this.toSeconds(et);const nt=this._state.getLastState("stopped",et),rt={state:"paused",time:et};this._state.add(rt);const it=this._secondsAtTime.get(et);let ot=it||nt,at=it?it.seconds:0,st=null;return this._state.forEachBetween(ot.time,et+this.sampleTime,lt=>{let ct=ot.time;const ut=this._tickOffset.get(lt.time);ut&&ut.time>=ot.time&&(at=ut.seconds,ct=ut.time),ot.state==="started"&<.state!=="started"&&(at+=lt.time-ct,lt.time!=rt.time&&(st={state:lt.state,time:lt.time,seconds:at})),ot=lt}),this._state.remove(rt),st&&this._secondsAtTime.add(st),at}setTicksAtTime(et,nt){return nt=this.toSeconds(nt),this._tickOffset.cancel(nt),this._tickOffset.add({seconds:this.frequency.getDurationOfTicks(et,nt),ticks:et,time:nt}),this._ticksAtTime.cancel(nt),this._secondsAtTime.cancel(nt),this}getStateAtTime(et){return et=this.toSeconds(et),this._state.getValueAtTime(et)}getTimeOfTick(et,nt=this.now()){const rt=this._tickOffset.get(nt),it=this._state.get(nt),ot=Math.max(rt.time,it.time),at=this.frequency.getTicksAtTime(ot)+et-rt.ticks;return this.frequency.getTimeOfTick(at)}forEachTickBetween(et,nt,rt){let it=this._state.get(et);this._state.forEachBetween(et,nt,at=>{it&&it.state==="started"&&at.state!=="started"&&this.forEachTickBetween(Math.max(it.time,et),at.time-this.sampleTime,rt),it=at});let ot=null;if(it&&it.state==="started"){const at=Math.max(it.time,et),st=this.frequency.getTicksAtTime(at),lt=this.frequency.getTicksAtTime(it.time),ct=st-lt;let ut=Math.ceil(ct)-ct;ut=EQ(ut,1)?0:ut;let ht=this.frequency.getTimeOfTick(st+ut);for(;ht{switch(rt.state){case"started":const it=this._tickSource.getTicksAtTime(rt.time);this.emit("start",rt.time,it);break;case"stopped":rt.time!==0&&this.emit("stop",rt.time);break;case"paused":this.emit("pause",rt.time);break}}),this._tickSource.forEachTickBetween(et,nt,(rt,it)=>{this.callback(rt,it)}))}getStateAtTime(et){const nt=this.toSeconds(et);return this._state.getValueAtTime(nt)}dispose(){return super.dispose(),this.context.off("tick",this._boundLoop),this._tickSource.dispose(),this._state.dispose(),this}}Emitter$1.mixin(Clock);class ToneAudioBuffers extends Tone{constructor(){super(),this.name="ToneAudioBuffers",this._buffers=new Map,this._loadingCount=0;const et=optionsFromArguments(ToneAudioBuffers.getDefaults(),arguments,["urls","onload","baseUrl"],"urls");this.baseUrl=et.baseUrl,Object.keys(et.urls).forEach(nt=>{this._loadingCount++;const rt=et.urls[nt];this.add(nt,rt,this._bufferLoaded.bind(this,et.onload),et.onerror)})}static getDefaults(){return{baseUrl:"",onerror:noOp,onload:noOp,urls:{}}}has(et){return this._buffers.has(et.toString())}get(et){return assert(this.has(et),`ToneAudioBuffers has no buffer named: ${et}`),this._buffers.get(et.toString())}_bufferLoaded(et){this._loadingCount--,this._loadingCount===0&&et&&et()}get loaded(){return Array.from(this._buffers).every(([et,nt])=>nt.loaded)}add(et,nt,rt=noOp,it=noOp){return isString$2(nt)?(this.baseUrl&&nt.trim().substring(0,11).toLowerCase()==="data:audio/"&&(this.baseUrl=""),this._buffers.set(et.toString(),new ToneAudioBuffer(this.baseUrl+nt,rt,it))):this._buffers.set(et.toString(),new ToneAudioBuffer(nt,rt,it)),this}dispose(){return super.dispose(),this._buffers.forEach(et=>et.dispose()),this._buffers.clear(),this}}class TicksClass extends TransportTimeClass{constructor(){super(...arguments),this.name="Ticks",this.defaultUnits="i"}_now(){return this.context.transport.ticks}_beatsToUnits(et){return this._getPPQ()*et}_secondsToUnits(et){return Math.floor(et/(60/this._getBpm())*this._getPPQ())}_ticksToUnits(et){return et}toTicks(){return this.valueOf()}toSeconds(){return this.valueOf()/this._getPPQ()*(60/this._getBpm())}}class Draw extends ToneWithContext{constructor(){super(...arguments),this.name="Draw",this.expiration=.25,this.anticipation=.008,this._events=new Timeline,this._boundDrawLoop=this._drawLoop.bind(this),this._animationFrame=-1}schedule(et,nt){return this._events.add({callback:et,time:this.toSeconds(nt)}),this._events.length===1&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop)),this}cancel(et){return this._events.cancel(this.toSeconds(et)),this}_drawLoop(){const et=this.context.currentTime;for(;this._events.length&&this._events.peek().time-this.anticipation<=et;){const nt=this._events.shift();nt&&et-nt.time<=this.expiration&&nt.callback()}this._events.length>0&&(this._animationFrame=requestAnimationFrame(this._boundDrawLoop))}dispose(){return super.dispose(),this._events.dispose(),cancelAnimationFrame(this._animationFrame),this}}onContextInit(tt=>{tt.draw=new Draw({context:tt})});onContextClose(tt=>{tt.draw.dispose()});class IntervalTimeline extends Tone{constructor(){super(...arguments),this.name="IntervalTimeline",this._root=null,this._length=0}add(et){assert(isDefined(et.time),"Events must have a time property"),assert(isDefined(et.duration),"Events must have a duration parameter"),et.time=et.time.valueOf();let nt=new IntervalNode(et.time,et.time+et.duration,et);for(this._root===null?this._root=nt:this._root.insert(nt),this._length++;nt!==null;)nt.updateHeight(),nt.updateMax(),this._rebalance(nt),nt=nt.parent;return this}remove(et){if(this._root!==null){const nt=[];this._root.search(et.time,nt);for(const rt of nt)if(rt.event===et){this._removeNode(rt),this._length--;break}}return this}get length(){return this._length}cancel(et){return this.forEachFrom(et,nt=>this.remove(nt)),this}_setRoot(et){this._root=et,this._root!==null&&(this._root.parent=null)}_replaceNodeInParent(et,nt){et.parent!==null?(et.isLeftChild()?et.parent.left=nt:et.parent.right=nt,this._rebalance(et.parent)):this._setRoot(nt)}_removeNode(et){if(et.left===null&&et.right===null)this._replaceNodeInParent(et,null);else if(et.right===null)this._replaceNodeInParent(et,et.left);else if(et.left===null)this._replaceNodeInParent(et,et.right);else{const nt=et.getBalance();let rt,it=null;if(nt>0)if(et.left.right===null)rt=et.left,rt.right=et.right,it=rt;else{for(rt=et.left.right;rt.right!==null;)rt=rt.right;rt.parent&&(rt.parent.right=rt.left,it=rt.parent,rt.left=et.left,rt.right=et.right)}else if(et.right.left===null)rt=et.right,rt.left=et.left,it=rt;else{for(rt=et.right.left;rt.left!==null;)rt=rt.left;rt.parent&&(rt.parent.left=rt.right,it=rt.parent,rt.left=et.left,rt.right=et.right)}et.parent!==null?et.isLeftChild()?et.parent.left=rt:et.parent.right=rt:this._setRoot(rt),it&&this._rebalance(it)}et.dispose()}_rotateLeft(et){const nt=et.parent,rt=et.isLeftChild(),it=et.right;it&&(et.right=it.left,it.left=et),nt!==null?rt?nt.left=it:nt.right=it:this._setRoot(it)}_rotateRight(et){const nt=et.parent,rt=et.isLeftChild(),it=et.left;it&&(et.left=it.right,it.right=et),nt!==null?rt?nt.left=it:nt.right=it:this._setRoot(it)}_rebalance(et){const nt=et.getBalance();nt>1&&et.left?et.left.getBalance()<0?this._rotateLeft(et.left):this._rotateRight(et):nt<-1&&et.right&&(et.right.getBalance()>0?this._rotateRight(et.right):this._rotateLeft(et))}get(et){if(this._root!==null){const nt=[];if(this._root.search(et,nt),nt.length>0){let rt=nt[0];for(let it=1;itrt.low&&(rt=nt[it]);return rt.event}}return null}forEach(et){if(this._root!==null){const nt=[];this._root.traverse(rt=>nt.push(rt)),nt.forEach(rt=>{rt.event&&et(rt.event)})}return this}forEachAtTime(et,nt){if(this._root!==null){const rt=[];this._root.search(et,rt),rt.forEach(it=>{it.event&&nt(it.event)})}return this}forEachFrom(et,nt){if(this._root!==null){const rt=[];this._root.searchAfter(et,rt),rt.forEach(it=>{it.event&&nt(it.event)})}return this}dispose(){return super.dispose(),this._root!==null&&this._root.traverse(et=>et.dispose()),this._root=null,this}}class IntervalNode{constructor(et,nt,rt){this._left=null,this._right=null,this.parent=null,this.height=0,this.event=rt,this.low=et,this.high=nt,this.max=this.high}insert(et){et.low<=this.low?this.left===null?this.left=et:this.left.insert(et):this.right===null?this.right=et:this.right.insert(et)}search(et,nt){et>this.max||(this.left!==null&&this.left.search(et,nt),this.low<=et&&this.high>et&&nt.push(this),!(this.low>et)&&this.right!==null&&this.right.search(et,nt))}searchAfter(et,nt){this.low>=et&&(nt.push(this),this.left!==null&&this.left.searchAfter(et,nt)),this.right!==null&&this.right.searchAfter(et,nt)}traverse(et){et(this),this.left!==null&&this.left.traverse(et),this.right!==null&&this.right.traverse(et)}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 et=0;return this.left!==null&&this.right!==null?et=this.left.height-this.right.height:this.left!==null?et=this.left.height+1:this.right!==null&&(et=-(this.right.height+1)),et}isLeftChild(){return this.parent!==null&&this.parent.left===this}get left(){return this._left}set left(et){this._left=et,et!==null&&(et.parent=this),this.updateHeight(),this.updateMax()}get right(){return this._right}set right(et){this._right=et,et!==null&&(et.parent=this),this.updateHeight(),this.updateMax()}dispose(){this.parent=null,this._left=null,this._right=null,this.event=null}}class Volume extends ToneAudioNode{constructor(){super(optionsFromArguments(Volume.getDefaults(),arguments,["volume"])),this.name="Volume";const et=optionsFromArguments(Volume.getDefaults(),arguments,["volume"]);this.input=this.output=new Gain({context:this.context,gain:et.volume,units:"decibels"}),this.volume=this.output.gain,readOnly(this,"volume"),this._unmutedVolume=et.volume,this.mute=et.mute}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{mute:!1,volume:0})}get mute(){return this.volume.value===-1/0}set mute(et){!this.mute&&et?(this._unmutedVolume=this.volume.value,this.volume.value=-1/0):this.mute&&!et&&(this.volume.value=this._unmutedVolume)}dispose(){return super.dispose(),this.input.dispose(),this.volume.dispose(),this}}let Destination$1=class b1 extends ToneAudioNode{constructor(){super(optionsFromArguments(b1.getDefaults(),arguments)),this.name="Destination",this.input=new Volume({context:this.context}),this.output=new Gain({context:this.context}),this.volume=this.input.volume;const et=optionsFromArguments(b1.getDefaults(),arguments);connectSeries(this.input,this.output,this.context.rawContext.destination),this.mute=et.mute,this._internalChannels=[this.input,this.context.rawContext.destination,this.output]}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{mute:!1,volume:0})}get mute(){return this.input.mute}set mute(et){this.input.mute=et}chain(...et){return this.input.disconnect(),et.unshift(this.input),et.push(this.output),connectSeries(...et),this}get maxChannelCount(){return this.context.rawContext.destination.maxChannelCount}dispose(){return super.dispose(),this.volume.dispose(),this}};onContextInit(tt=>{tt.destination=new Destination$1({context:tt})});onContextClose(tt=>{tt.destination.dispose()});class TimelineValue extends Tone{constructor(et){super(),this.name="TimelineValue",this._timeline=new Timeline({memory:10}),this._initialValue=et}set(et,nt){return this._timeline.add({value:et,time:nt}),this}get(et){const nt=this._timeline.get(et);return nt?nt.value:this._initialValue}}class SignalOperator extends ToneAudioNode{constructor(){super(Object.assign(optionsFromArguments(SignalOperator.getDefaults(),arguments,["context"])))}connect(et,nt=0,rt=0){return connectSignal(this,et,nt,rt),this}}class WaveShaper extends SignalOperator{constructor(){super(Object.assign(optionsFromArguments(WaveShaper.getDefaults(),arguments,["mapping","length"]))),this.name="WaveShaper",this._shaper=this.context.createWaveShaper(),this.input=this._shaper,this.output=this._shaper;const et=optionsFromArguments(WaveShaper.getDefaults(),arguments,["mapping","length"]);isArray$e(et.mapping)||et.mapping instanceof Float32Array?this.curve=Float32Array.from(et.mapping):isFunction$2(et.mapping)&&this.setMap(et.mapping,et.length)}static getDefaults(){return Object.assign(Signal.getDefaults(),{length:1024})}setMap(et,nt=1024){const rt=new Float32Array(nt);for(let it=0,ot=nt;itrt.includes(et));assert(nt,"oversampling must be either 'none', '2x', or '4x'"),this._shaper.oversample=et}dispose(){return super.dispose(),this._shaper.disconnect(),this}}class Pow extends SignalOperator{constructor(){super(Object.assign(optionsFromArguments(Pow.getDefaults(),arguments,["value"]))),this.name="Pow";const et=optionsFromArguments(Pow.getDefaults(),arguments,["value"]);this._exponentScaler=this.input=this.output=new WaveShaper({context:this.context,mapping:this._expFunc(et.value),length:8192}),this._exponent=et.value}static getDefaults(){return Object.assign(SignalOperator.getDefaults(),{value:1})}_expFunc(et){return nt=>Math.pow(Math.abs(nt),et)}get value(){return this._exponent}set value(et){this._exponent=et,this._exponentScaler.setMap(this._expFunc(this._exponent))}dispose(){return super.dispose(),this._exponentScaler.dispose(),this}}class TransportEvent{constructor(et,nt){this.id=TransportEvent._eventId++,this._remainderTime=0;const rt=Object.assign(TransportEvent.getDefaults(),nt);this.transport=et,this.callback=rt.callback,this._once=rt.once,this.time=Math.floor(rt.time),this._remainderTime=rt.time-this.time}static getDefaults(){return{callback:noOp,once:!1,time:0}}get floatTime(){return this.time+this._remainderTime}invoke(et){if(this.callback){const nt=this.transport.bpm.getDurationOfTicks(1,et);this.callback(et+this._remainderTime*nt),this._once&&this.transport.clear(this.id)}}dispose(){return this.callback=void 0,this}}TransportEvent._eventId=0;class TransportRepeatEvent extends TransportEvent{constructor(et,nt){super(et,nt),this._currentId=-1,this._nextId=-1,this._nextTick=this.time,this._boundRestart=this._restart.bind(this);const rt=Object.assign(TransportRepeatEvent.getDefaults(),nt);this.duration=rt.duration,this._interval=rt.interval,this._nextTick=rt.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({},TransportEvent.getDefaults(),{duration:1/0,interval:1,once:!1})}invoke(et){this._createEvents(et),super.invoke(et)}_createEvent(){return LT(this._nextTick,this.floatTime+this.duration)?this.transport.scheduleOnce(this.invoke.bind(this),new TicksClass(this.context,this._nextTick).toSeconds()):-1}_createEvents(et){LT(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 TicksClass(this.context,this._nextTick).toSeconds()))}_restart(et){this.transport.clear(this._currentId),this.transport.clear(this._nextId),this._nextTick=this.floatTime;const nt=this.transport.getTicksAtTime(et);GT(nt,this.time)&&(this._nextTick=this.floatTime+Math.ceil((nt-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}}let Transport$1=class w1 extends ToneWithContext{constructor(){super(optionsFromArguments(w1.getDefaults(),arguments)),this.name="Transport",this._loop=new TimelineValue(!1),this._loopStart=0,this._loopEnd=0,this._scheduledEvents={},this._timeline=new Timeline,this._repeatedEvents=new IntervalTimeline,this._syncedSignals=[],this._swingAmount=0;const et=optionsFromArguments(w1.getDefaults(),arguments);this._ppq=et.ppq,this._clock=new Clock({callback:this._processTick.bind(this),context:this.context,frequency:0,units:"bpm"}),this._bindClockEvents(),this.bpm=this._clock.frequency,this._clock.frequency.multiplier=et.ppq,this.bpm.setValueAtTime(et.bpm,0),readOnly(this,"bpm"),this._timeSignature=et.timeSignature,this._swingTicks=et.ppq/2}static getDefaults(){return Object.assign(ToneWithContext.getDefaults(),{bpm:120,loopEnd:"4m",loopStart:0,ppq:192,swing:0,swingSubdivision:"8n",timeSignature:4})}_processTick(et,nt){if(this._loop.get(et)&&nt>=this._loopEnd&&(this.emit("loopEnd",et),this._clock.setTicksAtTime(this._loopStart,et),nt=this._loopStart,this.emit("loopStart",et,this._clock.getSecondsAtTime(et)),this.emit("loop",et)),this._swingAmount>0&&nt%this._ppq!==0&&nt%(this._swingTicks*2)!==0){const rt=nt%(this._swingTicks*2)/(this._swingTicks*2),it=Math.sin(rt*Math.PI)*this._swingAmount;et+=new TicksClass(this.context,this._swingTicks*2/3).toSeconds()*it}enterScheduledCallback(!0),this._timeline.forEachAtTime(nt,rt=>rt.invoke(et)),enterScheduledCallback(!1)}schedule(et,nt){const rt=new TransportEvent(this,{callback:et,time:new TransportTimeClass(this.context,nt).toTicks()});return this._addEvent(rt,this._timeline)}scheduleRepeat(et,nt,rt,it=1/0){const ot=new TransportRepeatEvent(this,{callback:et,duration:new TimeClass(this.context,it).toTicks(),interval:new TimeClass(this.context,nt).toTicks(),time:new TransportTimeClass(this.context,rt).toTicks()});return this._addEvent(ot,this._repeatedEvents)}scheduleOnce(et,nt){const rt=new TransportEvent(this,{callback:et,once:!0,time:new TransportTimeClass(this.context,nt).toTicks()});return this._addEvent(rt,this._timeline)}clear(et){if(this._scheduledEvents.hasOwnProperty(et)){const nt=this._scheduledEvents[et.toString()];nt.timeline.remove(nt.event),nt.event.dispose(),delete this._scheduledEvents[et.toString()]}return this}_addEvent(et,nt){return this._scheduledEvents[et.id.toString()]={event:et,timeline:nt},nt.add(et),et.id}cancel(et=0){const nt=this.toTicks(et);return this._timeline.forEachFrom(nt,rt=>this.clear(rt.id)),this._repeatedEvents.forEachFrom(nt,rt=>this.clear(rt.id)),this}_bindClockEvents(){this._clock.on("start",(et,nt)=>{nt=new TicksClass(this.context,nt).toSeconds(),this.emit("start",et,nt)}),this._clock.on("stop",et=>{this.emit("stop",et)}),this._clock.on("pause",et=>{this.emit("pause",et)})}get state(){return this._clock.getStateAtTime(this.now())}start(et,nt){this.context.resume();let rt;return isDefined(nt)&&(rt=this.toTicks(nt)),this._clock.start(et,rt),this}stop(et){return this._clock.stop(et),this}pause(et){return this._clock.pause(et),this}toggle(et){return et=this.toSeconds(et),this._clock.getStateAtTime(et)!=="started"?this.start(et):this.stop(et),this}get timeSignature(){return this._timeSignature}set timeSignature(et){isArray$e(et)&&(et=et[0]/et[1]*4),this._timeSignature=et}get loopStart(){return new TimeClass(this.context,this._loopStart,"i").toSeconds()}set loopStart(et){this._loopStart=this.toTicks(et)}get loopEnd(){return new TimeClass(this.context,this._loopEnd,"i").toSeconds()}set loopEnd(et){this._loopEnd=this.toTicks(et)}get loop(){return this._loop.get(this.now())}set loop(et){this._loop.set(et,this.now())}setLoopPoints(et,nt){return this.loopStart=et,this.loopEnd=nt,this}get swing(){return this._swingAmount}set swing(et){this._swingAmount=et}get swingSubdivision(){return new TicksClass(this.context,this._swingTicks).toNotation()}set swingSubdivision(et){this._swingTicks=this.toTicks(et)}get position(){const et=this.now(),nt=this._clock.getTicksAtTime(et);return new TicksClass(this.context,nt).toBarsBeatsSixteenths()}set position(et){const nt=this.toTicks(et);this.ticks=nt}get seconds(){return this._clock.seconds}set seconds(et){const nt=this.now(),rt=this._clock.frequency.timeToTicks(et,nt);this.ticks=rt}get progress(){if(this.loop){const et=this.now();return(this._clock.getTicksAtTime(et)-this._loopStart)/(this._loopEnd-this._loopStart)}else return 0}get ticks(){return this._clock.ticks}set ticks(et){if(this._clock.ticks!==et){const nt=this.now();if(this.state==="started"){const rt=this._clock.getTicksAtTime(nt),it=this._clock.frequency.getDurationOfTicks(Math.ceil(rt)-rt,nt),ot=nt+it;this.emit("stop",ot),this._clock.setTicksAtTime(et,ot),this.emit("start",ot,this._clock.getSecondsAtTime(ot))}else this.emit("ticks",nt),this._clock.setTicksAtTime(et,nt)}}getTicksAtTime(et){return this._clock.getTicksAtTime(et)}getSecondsAtTime(et){return this._clock.getSecondsAtTime(et)}get PPQ(){return this._clock.frequency.multiplier}set PPQ(et){this._clock.frequency.multiplier=et}nextSubdivision(et){if(et=this.toTicks(et),this.state!=="started")return 0;{const nt=this.now(),rt=this.getTicksAtTime(nt),it=et-rt%et;return this._clock.nextTickTime(it,nt)}}syncSignal(et,nt){const rt=this.now();let it=this.bpm,ot=1/(60/it.getValueAtTime(rt)/this.PPQ),at=[];if(et.units==="time"){const lt=.015625/ot,ct=new Gain(lt),ut=new Pow(-1),ht=new Gain(lt);it.chain(ct,ut,ht),it=ht,ot=1/ot,at=[ct,ut,ht]}nt||(et.getValueAtTime(rt)!==0?nt=et.getValueAtTime(rt)/ot:nt=0);const st=new Gain(nt);return it.connect(st),st.connect(et._param),at.push(st),this._syncedSignals.push({initial:et.value,nodes:at,signal:et}),et.value=0,this}unsyncSignal(et){for(let nt=this._syncedSignals.length-1;nt>=0;nt--){const rt=this._syncedSignals[nt];rt.signal===et&&(rt.nodes.forEach(it=>it.dispose()),rt.signal.value=rt.initial,this._syncedSignals.splice(nt,1))}return this}dispose(){return super.dispose(),this._clock.dispose(),writable(this,"bpm"),this._timeline.dispose(),this._repeatedEvents.dispose(),this}};Emitter$1.mixin(Transport$1);onContextInit(tt=>{tt.transport=new Transport$1({context:tt})});onContextClose(tt=>{tt.transport.dispose()});class Source extends ToneAudioNode{constructor(et){super(et),this.input=void 0,this._state=new StateTimeline("stopped"),this._synced=!1,this._scheduled=[],this._syncedStart=noOp,this._syncedStop=noOp,this._state.memory=100,this._state.increasing=!0,this._volume=this.output=new Volume({context:this.context,mute:et.mute,volume:et.volume}),this.volume=this._volume.volume,readOnly(this,"volume"),this.onstop=et.onstop}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{mute:!1,onstop:noOp,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(et){this._volume.mute=et}_clampToCurrentTime(et){return this._synced?et:Math.max(et,this.context.currentTime)}start(et,nt,rt){let it=isUndef(et)&&this._synced?this.context.transport.seconds:this.toSeconds(et);if(it=this._clampToCurrentTime(it),!this._synced&&this._state.getValueAtTime(it)==="started")assert(GT(it,this._state.get(it).time),"Start time must be strictly greater than previous start time"),this._state.cancel(it),this._state.setStateAtTime("started",it),this.log("restart",it),this.restart(it,nt,rt);else if(this.log("start",it),this._state.setStateAtTime("started",it),this._synced){const ot=this._state.get(it);ot&&(ot.offset=this.toSeconds(defaultArg(nt,0)),ot.duration=rt?this.toSeconds(rt):void 0);const at=this.context.transport.schedule(st=>{this._start(st,nt,rt)},it);this._scheduled.push(at),this.context.transport.state==="started"&&this.context.transport.getSecondsAtTime(this.immediate())>it&&this._syncedStart(this.now(),this.context.transport.seconds)}else assertContextRunning(this.context),this._start(it,nt,rt);return this}stop(et){let nt=isUndef(et)&&this._synced?this.context.transport.seconds:this.toSeconds(et);if(nt=this._clampToCurrentTime(nt),this._state.getValueAtTime(nt)==="started"||isDefined(this._state.getNextState("started",nt))){if(this.log("stop",nt),!this._synced)this._stop(nt);else{const rt=this.context.transport.schedule(this._stop.bind(this),nt);this._scheduled.push(rt)}this._state.cancel(nt),this._state.setStateAtTime("stopped",nt)}return this}restart(et,nt,rt){return et=this.toSeconds(et),this._state.getValueAtTime(et)==="started"&&(this._state.cancel(et),this._restart(et,nt,rt)),this}sync(){return this._synced||(this._synced=!0,this._syncedStart=(et,nt)=>{if(GT(nt,0)){const rt=this._state.get(nt);if(rt&&rt.state==="started"&&rt.time!==nt){const it=nt-this.toSeconds(rt.time);let ot;rt.duration&&(ot=this.toSeconds(rt.duration)-it),this._start(et,this.toSeconds(rt.offset)+it,ot)}}},this._syncedStop=et=>{const nt=this.context.transport.getSecondsAtTime(Math.max(et-this.sampleTime,0));this._state.getValueAtTime(nt)==="started"&&this._stop(et)},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(et=>this.context.transport.clear(et)),this._scheduled=[],this._state.cancel(0),this._stop(0),this}dispose(){return super.dispose(),this.onstop=noOp,this.unsync(),this._volume.dispose(),this._state.dispose(),this}}class ToneBufferSource extends OneShotSource{constructor(){super(optionsFromArguments(ToneBufferSource.getDefaults(),arguments,["url","onload"])),this.name="ToneBufferSource",this._source=this.context.createBufferSource(),this._internalChannels=[this._source],this._sourceStarted=!1,this._sourceStopped=!1;const et=optionsFromArguments(ToneBufferSource.getDefaults(),arguments,["url","onload"]);connect(this._source,this._gainNode),this._source.onended=()=>this._stopSource(),this.playbackRate=new Param({context:this.context,param:this._source.playbackRate,units:"positive",value:et.playbackRate}),this.loop=et.loop,this.loopStart=et.loopStart,this.loopEnd=et.loopEnd,this._buffer=new ToneAudioBuffer(et.url,et.onload,et.onerror),this._internalChannels.push(this._source)}static getDefaults(){return Object.assign(OneShotSource.getDefaults(),{url:new ToneAudioBuffer,loop:!1,loopEnd:0,loopStart:0,onload:noOp,onerror:noOp,playbackRate:1})}get fadeIn(){return this._fadeIn}set fadeIn(et){this._fadeIn=et}get fadeOut(){return this._fadeOut}set fadeOut(et){this._fadeOut=et}get curve(){return this._curve}set curve(et){this._curve=et}start(et,nt,rt,it=1){assert(this.buffer.loaded,"buffer is either not set or not loaded");const ot=this.toSeconds(et);this._startGain(ot,it),this.loop?nt=defaultArg(nt,this.loopStart):nt=defaultArg(nt,0);let at=Math.max(this.toSeconds(nt),0);if(this.loop){const st=this.toSeconds(this.loopEnd)||this.buffer.duration,lt=this.toSeconds(this.loopStart),ct=st-lt;GTE(at,st)&&(at=(at-lt)%ct+lt),EQ(at,this.buffer.duration)&&(at=0)}if(this._source.buffer=this.buffer.get(),this._source.loopEnd=this.toSeconds(this.loopEnd)||this.buffer.duration,LT(at,this.buffer.duration)&&(this._sourceStarted=!0,this._source.start(ot,at)),isDefined(rt)){let st=this.toSeconds(rt);st=Math.max(st,0),this.stop(ot+st)}return this}_stopSource(et){!this._sourceStopped&&this._sourceStarted&&(this._sourceStopped=!0,this._source.stop(this.toSeconds(et)),this._onended())}get loopStart(){return this._source.loopStart}set loopStart(et){this._source.loopStart=this.toSeconds(et)}get loopEnd(){return this._source.loopEnd}set loopEnd(et){this._source.loopEnd=this.toSeconds(et)}get buffer(){return this._buffer}set buffer(et){this._buffer.set(et)}get loop(){return this._source.loop}set loop(et){this._source.loop=et,this._sourceStarted&&this.cancelStop()}dispose(){return super.dispose(),this._source.onended=null,this._source.disconnect(),this._buffer.dispose(),this.playbackRate.dispose(),this}}class Noise extends Source{constructor(){super(optionsFromArguments(Noise.getDefaults(),arguments,["type"])),this.name="Noise",this._source=null;const et=optionsFromArguments(Noise.getDefaults(),arguments,["type"]);this._playbackRate=et.playbackRate,this.type=et.type,this._fadeIn=et.fadeIn,this._fadeOut=et.fadeOut}static getDefaults(){return Object.assign(Source.getDefaults(),{fadeIn:0,fadeOut:0,playbackRate:1,type:"white"})}get type(){return this._type}set type(et){if(assert(et in _noiseBuffers,"Noise: invalid type: "+et),this._type!==et&&(this._type=et,this.state==="started")){const nt=this.now();this._stop(nt),this._start(nt)}}get playbackRate(){return this._playbackRate}set playbackRate(et){this._playbackRate=et,this._source&&(this._source.playbackRate.value=et)}_start(et){const nt=_noiseBuffers[this._type];this._source=new ToneBufferSource({url:nt,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(et),Math.random()*(nt.duration-.001))}_stop(et){this._source&&(this._source.stop(this.toSeconds(et)),this._source=null)}get fadeIn(){return this._fadeIn}set fadeIn(et){this._fadeIn=et,this._source&&(this._source.fadeIn=this._fadeIn)}get fadeOut(){return this._fadeOut}set fadeOut(et){this._fadeOut=et,this._source&&(this._source.fadeOut=this._fadeOut)}_restart(et){this._stop(et),this._start(et)}dispose(){return super.dispose(),this._source&&this._source.disconnect(),this}}const BUFFER_LENGTH=44100*5,NUM_CHANNELS=2,_noiseCache={brown:null,pink:null,white:null},_noiseBuffers={get brown(){if(!_noiseCache.brown){const tt=[];for(let et=0;etthis.onstop(this)});this._oscillator=rt,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(nt)}_stop(et){const nt=this.toSeconds(et);this._oscillator&&this._oscillator.stop(nt)}_restart(et){const nt=this.toSeconds(et);return this.log("restart",nt),this._oscillator&&this._oscillator.cancelStop(),this._state.cancel(nt),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 Oscillator._periodicWaveCache.find(nt=>nt.phase===this._phase&&deepEquals(nt.partials,this._partials));{const et=Oscillator._periodicWaveCache.find(nt=>nt.type===this._type&&nt.phase===this._phase);return this._partialCount=et?et.partialCount:this._partialCount,et}}get type(){return this._type}set type(et){this._type=et;const nt=["sine","square","sawtooth","triangle"].indexOf(et)!==-1;if(this._phase===0&&nt)this._wave=void 0,this._partialCount=0,this._oscillator!==null&&(this._oscillator.type=et);else{const rt=this._getCachedPeriodicWave();if(isDefined(rt)){const{partials:it,wave:ot}=rt;this._wave=ot,this._partials=it,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave)}else{const[it,ot]=this._getRealImaginary(et,this._phase),at=this.context.createPeriodicWave(it,ot);this._wave=at,this._oscillator!==null&&this._oscillator.setPeriodicWave(this._wave),Oscillator._periodicWaveCache.push({imag:ot,partialCount:this._partialCount,partials:this._partials,phase:this._phase,real:it,type:this._type,wave:this._wave}),Oscillator._periodicWaveCache.length>100&&Oscillator._periodicWaveCache.shift()}}}get baseType(){return this._type.replace(this.partialCount.toString(),"")}set baseType(et){this.partialCount&&this._type!=="custom"&&et!=="custom"?this.type=et+this.partialCount:this.type=et}get partialCount(){return this._partialCount}set partialCount(et){assertRange(et,0);let nt=this._type;const rt=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(this._type);if(rt&&(nt=rt[1]),this._type!=="custom")et===0?this.type=nt:this.type=nt+et.toString();else{const it=new Float32Array(et);this._partials.forEach((ot,at)=>it[at]=ot),this._partials=Array.from(it),this.type=this._type}}_getRealImaginary(et,nt){let it=2048;const ot=new Float32Array(it),at=new Float32Array(it);let st=1;if(et==="custom"){if(st=this._partials.length+1,this._partialCount=this._partials.length,it=st,this._partials.length===0)return[ot,at]}else{const lt=/^(sine|triangle|square|sawtooth)(\d+)$/.exec(et);lt?(st=parseInt(lt[2],10)+1,this._partialCount=parseInt(lt[2],10),et=lt[1],st=Math.max(st,2),it=st):this._partialCount=0,this._partials=[]}for(let lt=1;lt>1&1?-1:1):ut=0,this._partials[lt-1]=ut;break;case"custom":ut=this._partials[lt-1];break;default:throw new TypeError("Oscillator: invalid type: "+et)}ut!==0?(ot[lt]=-ut*Math.sin(nt*lt),at[lt]=ut*Math.cos(nt*lt)):(ot[lt]=0,at[lt]=0)}return[ot,at]}_inverseFFT(et,nt,rt){let it=0;const ot=et.length;for(let at=0;at(et+1)/2}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Multiply extends Signal{constructor(){super(Object.assign(optionsFromArguments(Multiply.getDefaults(),arguments,["value"]))),this.name="Multiply",this.override=!1;const et=optionsFromArguments(Multiply.getDefaults(),arguments,["value"]);this._mult=this.input=this.output=new Gain({context:this.context,minValue:et.minValue,maxValue:et.maxValue}),this.factor=this._param=this._mult.gain,this.factor.setValueAtTime(et.value,0)}static getDefaults(){return Object.assign(Signal.getDefaults(),{value:0})}dispose(){return super.dispose(),this._mult.dispose(),this}}class AMOscillator extends Source{constructor(){super(optionsFromArguments(AMOscillator.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="AMOscillator",this._modulationScale=new AudioToGain({context:this.context}),this._modulationNode=new Gain({context:this.context});const et=optionsFromArguments(AMOscillator.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new Oscillator({context:this.context,detune:et.detune,frequency:et.frequency,onstop:()=>this.onstop(this),phase:et.phase,type:et.type}),this.frequency=this._carrier.frequency,this.detune=this._carrier.detune,this._modulator=new Oscillator({context:this.context,phase:et.phase,type:et.modulationType}),this.harmonicity=new Multiply({context:this.context,units:"positive",value:et.harmonicity}),this.frequency.chain(this.harmonicity,this._modulator.frequency),this._modulator.chain(this._modulationScale,this._modulationNode.gain),this._carrier.chain(this._modulationNode,this.output),readOnly(this,["frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(Oscillator.getDefaults(),{harmonicity:1,modulationType:"square"})}_start(et){this._modulator.start(et),this._carrier.start(et)}_stop(et){this._modulator.stop(et),this._carrier.stop(et)}_restart(et){this._modulator.restart(et),this._carrier.restart(et)}get type(){return this._carrier.type}set type(et){this._carrier.type=et}get baseType(){return this._carrier.baseType}set baseType(et){this._carrier.baseType=et}get partialCount(){return this._carrier.partialCount}set partialCount(et){this._carrier.partialCount=et}get modulationType(){return this._modulator.type}set modulationType(et){this._modulator.type=et}get phase(){return this._carrier.phase}set phase(et){this._carrier.phase=et,this._modulator.phase=et}get partials(){return this._carrier.partials}set partials(et){this._carrier.partials=et}asArray(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}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 FMOscillator extends Source{constructor(){super(optionsFromArguments(FMOscillator.getDefaults(),arguments,["frequency","type","modulationType"])),this.name="FMOscillator",this._modulationNode=new Gain({context:this.context,gain:0});const et=optionsFromArguments(FMOscillator.getDefaults(),arguments,["frequency","type","modulationType"]);this._carrier=new Oscillator({context:this.context,detune:et.detune,frequency:0,onstop:()=>this.onstop(this),phase:et.phase,type:et.type}),this.detune=this._carrier.detune,this.frequency=new Signal({context:this.context,units:"frequency",value:et.frequency}),this._modulator=new Oscillator({context:this.context,phase:et.phase,type:et.modulationType}),this.harmonicity=new Multiply({context:this.context,units:"positive",value:et.harmonicity}),this.modulationIndex=new Multiply({context:this.context,units:"positive",value:et.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),readOnly(this,["modulationIndex","frequency","detune","harmonicity"])}static getDefaults(){return Object.assign(Oscillator.getDefaults(),{harmonicity:1,modulationIndex:2,modulationType:"square"})}_start(et){this._modulator.start(et),this._carrier.start(et)}_stop(et){this._modulator.stop(et),this._carrier.stop(et)}_restart(et){return this._modulator.restart(et),this._carrier.restart(et),this}get type(){return this._carrier.type}set type(et){this._carrier.type=et}get baseType(){return this._carrier.baseType}set baseType(et){this._carrier.baseType=et}get partialCount(){return this._carrier.partialCount}set partialCount(et){this._carrier.partialCount=et}get modulationType(){return this._modulator.type}set modulationType(et){this._modulator.type=et}get phase(){return this._carrier.phase}set phase(et){this._carrier.phase=et,this._modulator.phase=et}get partials(){return this._carrier.partials}set partials(et){this._carrier.partials=et}asArray(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}dispose(){return super.dispose(),this.frequency.dispose(),this.harmonicity.dispose(),this._carrier.dispose(),this._modulator.dispose(),this._modulationNode.dispose(),this.modulationIndex.dispose(),this}}class PulseOscillator extends Source{constructor(){super(optionsFromArguments(PulseOscillator.getDefaults(),arguments,["frequency","width"])),this.name="PulseOscillator",this._widthGate=new Gain({context:this.context,gain:0}),this._thresh=new WaveShaper({context:this.context,mapping:nt=>nt<=0?-1:1});const et=optionsFromArguments(PulseOscillator.getDefaults(),arguments,["frequency","width"]);this.width=new Signal({context:this.context,units:"audioRange",value:et.width}),this._triangle=new Oscillator({context:this.context,detune:et.detune,frequency:et.frequency,onstop:()=>this.onstop(this),phase:et.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),readOnly(this,["width","frequency","detune"])}static getDefaults(){return Object.assign(Source.getDefaults(),{detune:0,frequency:440,phase:0,type:"pulse",width:.2})}_start(et){et=this.toSeconds(et),this._triangle.start(et),this._widthGate.gain.setValueAtTime(1,et)}_stop(et){et=this.toSeconds(et),this._triangle.stop(et),this._widthGate.gain.cancelScheduledValues(et),this._widthGate.gain.setValueAtTime(0,et)}_restart(et){this._triangle.restart(et),this._widthGate.gain.cancelScheduledValues(et),this._widthGate.gain.setValueAtTime(1,et)}get phase(){return this._triangle.phase}set phase(et){this._triangle.phase=et}get type(){return"pulse"}get baseType(){return"pulse"}get partials(){return[]}get partialCount(){return 0}set carrierType(et){this._triangle.type=et}asArray(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}dispose(){return super.dispose(),this._triangle.dispose(),this.width.dispose(),this._widthGate.dispose(),this._thresh.dispose(),this}}class FatOscillator extends Source{constructor(){super(optionsFromArguments(FatOscillator.getDefaults(),arguments,["frequency","type","spread"])),this.name="FatOscillator",this._oscillators=[];const et=optionsFromArguments(FatOscillator.getDefaults(),arguments,["frequency","type","spread"]);this.frequency=new Signal({context:this.context,units:"frequency",value:et.frequency}),this.detune=new Signal({context:this.context,units:"cents",value:et.detune}),this._spread=et.spread,this._type=et.type,this._phase=et.phase,this._partials=et.partials,this._partialCount=et.partialCount,this.count=et.count,readOnly(this,["frequency","detune"])}static getDefaults(){return Object.assign(Oscillator.getDefaults(),{count:3,spread:20,type:"sawtooth"})}_start(et){et=this.toSeconds(et),this._forEach(nt=>nt.start(et))}_stop(et){et=this.toSeconds(et),this._forEach(nt=>nt.stop(et))}_restart(et){this._forEach(nt=>nt.restart(et))}_forEach(et){for(let nt=0;ntnt.type=et)}get spread(){return this._spread}set spread(et){if(this._spread=et,this._oscillators.length>1){const nt=-et/2,rt=et/(this._oscillators.length-1);this._forEach((it,ot)=>it.detune.value=nt+rt*ot)}}get count(){return this._oscillators.length}set count(et){if(assertRange(et,1),this._oscillators.length!==et){this._forEach(nt=>nt.dispose()),this._oscillators=[];for(let nt=0;ntthis.onstop(this):noOp});this.type==="custom"&&(rt.partials=this._partials),this.frequency.connect(rt.frequency),this.detune.connect(rt.detune),rt.detune.overridden=!1,rt.connect(this.output),this._oscillators[nt]=rt}this.spread=this._spread,this.state==="started"&&this._forEach(nt=>nt.start())}}get phase(){return this._phase}set phase(et){this._phase=et,this._forEach((nt,rt)=>nt.phase=this._phase+rt/this.count*360)}get baseType(){return this._oscillators[0].baseType}set baseType(et){this._forEach(nt=>nt.baseType=et),this._type=this._oscillators[0].type}get partials(){return this._oscillators[0].partials}set partials(et){this._partials=et,this._partialCount=this._partials.length,et.length&&(this._type="custom",this._forEach(nt=>nt.partials=et))}get partialCount(){return this._oscillators[0].partialCount}set partialCount(et){this._partialCount=et,this._forEach(nt=>nt.partialCount=et),this._type=this._oscillators[0].type}asArray(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}dispose(){return super.dispose(),this.frequency.dispose(),this.detune.dispose(),this._forEach(et=>et.dispose()),this}}class PWMOscillator extends Source{constructor(){super(optionsFromArguments(PWMOscillator.getDefaults(),arguments,["frequency","modulationFrequency"])),this.name="PWMOscillator",this.sourceType="pwm",this._scale=new Multiply({context:this.context,value:2});const et=optionsFromArguments(PWMOscillator.getDefaults(),arguments,["frequency","modulationFrequency"]);this._pulse=new PulseOscillator({context:this.context,frequency:et.modulationFrequency}),this._pulse.carrierType="sine",this.modulationFrequency=this._pulse.frequency,this._modulator=new Oscillator({context:this.context,detune:et.detune,frequency:et.frequency,onstop:()=>this.onstop(this),phase:et.phase}),this.frequency=this._modulator.frequency,this.detune=this._modulator.detune,this._modulator.chain(this._scale,this._pulse.width),this._pulse.connect(this.output),readOnly(this,["modulationFrequency","frequency","detune"])}static getDefaults(){return Object.assign(Source.getDefaults(),{detune:0,frequency:440,modulationFrequency:.4,phase:0,type:"pwm"})}_start(et){et=this.toSeconds(et),this._modulator.start(et),this._pulse.start(et)}_stop(et){et=this.toSeconds(et),this._modulator.stop(et),this._pulse.stop(et)}_restart(et){this._modulator.restart(et),this._pulse.restart(et)}get type(){return"pwm"}get baseType(){return"pwm"}get partials(){return[]}get partialCount(){return 0}get phase(){return this._modulator.phase}set phase(et){this._modulator.phase=et}asArray(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}dispose(){return super.dispose(),this._pulse.dispose(),this._scale.dispose(),this._modulator.dispose(),this}}const OmniOscillatorSourceMap={am:AMOscillator,fat:FatOscillator,fm:FMOscillator,oscillator:Oscillator,pulse:PulseOscillator,pwm:PWMOscillator};class OmniOscillator extends Source{constructor(){super(optionsFromArguments(OmniOscillator.getDefaults(),arguments,["frequency","type"])),this.name="OmniOscillator";const et=optionsFromArguments(OmniOscillator.getDefaults(),arguments,["frequency","type"]);this.frequency=new Signal({context:this.context,units:"frequency",value:et.frequency}),this.detune=new Signal({context:this.context,units:"cents",value:et.detune}),readOnly(this,["frequency","detune"]),this.set(et)}static getDefaults(){return Object.assign(Oscillator.getDefaults(),FMOscillator.getDefaults(),AMOscillator.getDefaults(),FatOscillator.getDefaults(),PulseOscillator.getDefaults(),PWMOscillator.getDefaults())}_start(et){this._oscillator.start(et)}_stop(et){this._oscillator.stop(et)}_restart(et){return this._oscillator.restart(et),this}get type(){let et="";return["am","fm","fat"].some(nt=>this._sourceType===nt)&&(et=this._sourceType),et+this._oscillator.type}set type(et){et.substr(0,2)==="fm"?(this._createNewOscillator("fm"),this._oscillator=this._oscillator,this._oscillator.type=et.substr(2)):et.substr(0,2)==="am"?(this._createNewOscillator("am"),this._oscillator=this._oscillator,this._oscillator.type=et.substr(2)):et.substr(0,3)==="fat"?(this._createNewOscillator("fat"),this._oscillator=this._oscillator,this._oscillator.type=et.substr(3)):et==="pwm"?(this._createNewOscillator("pwm"),this._oscillator=this._oscillator):et==="pulse"?this._createNewOscillator("pulse"):(this._createNewOscillator("oscillator"),this._oscillator=this._oscillator,this._oscillator.type=et)}get partials(){return this._oscillator.partials}set partials(et){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partials=et)}get partialCount(){return this._oscillator.partialCount}set partialCount(et){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&(this._oscillator.partialCount=et)}set(et){return Reflect.has(et,"type")&&et.type&&(this.type=et.type),super.set(et),this}_createNewOscillator(et){if(et!==this._sourceType){this._sourceType=et;const nt=OmniOscillatorSourceMap[et],rt=this.now();if(this._oscillator){const it=this._oscillator;it.stop(rt),this.context.setTimeout(()=>it.dispose(),this.blockTime)}this._oscillator=new nt({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(rt)}}get phase(){return this._oscillator.phase}set phase(et){this._oscillator.phase=et}get sourceType(){return this._sourceType}set sourceType(et){let nt="sine";this._oscillator.type!=="pwm"&&this._oscillator.type!=="pulse"&&(nt=this._oscillator.type),et==="fm"?this.type="fm"+nt:et==="am"?this.type="am"+nt:et==="fat"?this.type="fat"+nt:et==="oscillator"?this.type=nt:et==="pulse"?this.type="pulse":et==="pwm"&&(this.type="pwm")}_getOscType(et,nt){return et instanceof OmniOscillatorSourceMap[nt]}get baseType(){return this._oscillator.baseType}set baseType(et){!this._getOscType(this._oscillator,"pulse")&&!this._getOscType(this._oscillator,"pwm")&&et!=="pulse"&&et!=="pwm"&&(this._oscillator.baseType=et)}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(et){this._getOscType(this._oscillator,"fat")&&isNumber$4(et)&&(this._oscillator.count=et)}get spread(){if(this._getOscType(this._oscillator,"fat"))return this._oscillator.spread}set spread(et){this._getOscType(this._oscillator,"fat")&&isNumber$4(et)&&(this._oscillator.spread=et)}get modulationType(){if(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))return this._oscillator.modulationType}set modulationType(et){(this._getOscType(this._oscillator,"fm")||this._getOscType(this._oscillator,"am"))&&isString$2(et)&&(this._oscillator.modulationType=et)}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(et=1024){return __awaiter(this,void 0,void 0,function*(){return generateWaveform(this,et)})}dispose(){return super.dispose(),this.detune.dispose(),this.frequency.dispose(),this._oscillator.dispose(),this}}class Add extends Signal{constructor(){super(Object.assign(optionsFromArguments(Add.getDefaults(),arguments,["value"]))),this.override=!1,this.name="Add",this._sum=new Gain({context:this.context}),this.input=this._sum,this.output=this._sum,this.addend=this._param,connectSeries(this._constantSource,this._sum)}static getDefaults(){return Object.assign(Signal.getDefaults(),{value:0})}dispose(){return super.dispose(),this._sum.dispose(),this}}class Scale extends SignalOperator{constructor(){super(Object.assign(optionsFromArguments(Scale.getDefaults(),arguments,["min","max"]))),this.name="Scale";const et=optionsFromArguments(Scale.getDefaults(),arguments,["min","max"]);this._mult=this.input=new Multiply({context:this.context,value:et.max-et.min}),this._add=this.output=new Add({context:this.context,value:et.min}),this._min=et.min,this._max=et.max,this.input.connect(this.output)}static getDefaults(){return Object.assign(SignalOperator.getDefaults(),{max:1,min:0})}get min(){return this._min}set min(et){this._min=et,this._setRange()}get max(){return this._max}set max(et){this._max=et,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 range$3(tt,et=1/0){const nt=new WeakMap;return function(rt,it){Reflect.defineProperty(rt,it,{configurable:!0,enumerable:!0,get:function(){return nt.get(this)},set:function(ot){assertRange(ot,tt,et),nt.set(this,ot)}})}}function timeRange(tt,et=1/0){const nt=new WeakMap;return function(rt,it){Reflect.defineProperty(rt,it,{configurable:!0,enumerable:!0,get:function(){return nt.get(this)},set:function(ot){assertRange(this.toSeconds(ot),tt,et),nt.set(this,ot)}})}}let Player$1=class x1 extends Source{constructor(){super(optionsFromArguments(x1.getDefaults(),arguments,["url","onload"])),this.name="Player",this._activeSources=new Set;const et=optionsFromArguments(x1.getDefaults(),arguments,["url","onload"]);this._buffer=new ToneAudioBuffer({onload:this._onload.bind(this,et.onload),onerror:et.onerror,reverse:et.reverse,url:et.url}),this.autostart=et.autostart,this._loop=et.loop,this._loopStart=et.loopStart,this._loopEnd=et.loopEnd,this._playbackRate=et.playbackRate,this.fadeIn=et.fadeIn,this.fadeOut=et.fadeOut}static getDefaults(){return Object.assign(Source.getDefaults(),{autostart:!1,fadeIn:0,fadeOut:0,loop:!1,loopEnd:0,loopStart:0,onload:noOp,onerror:noOp,playbackRate:1,reverse:!1})}load(et){return __awaiter(this,void 0,void 0,function*(){return yield this._buffer.load(et),this._onload(),this})}_onload(et=noOp){et(),this.autostart&&this.start()}_onSourceEnd(et){this.onstop(this),this._activeSources.delete(et),this._activeSources.size===0&&!this._synced&&this._state.getValueAtTime(this.now())==="started"&&(this._state.cancel(this.now()),this._state.setStateAtTime("stopped",this.now()))}start(et,nt,rt){return super.start(et,nt,rt),this}_start(et,nt,rt){this._loop?nt=defaultArg(nt,this._loopStart):nt=defaultArg(nt,0);const it=this.toSeconds(nt),ot=rt;rt=defaultArg(rt,Math.max(this._buffer.duration-it,0));let at=this.toSeconds(rt);at=at/this._playbackRate,et=this.toSeconds(et);const st=new ToneBufferSource({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(et+at),this._state.setStateAtTime("stopped",et+at,{implicitEnd:!0})),this._activeSources.add(st),this._loop&&isUndef(ot)?st.start(et,it):st.start(et,it,at-this.toSeconds(this.fadeOut))}_stop(et){const nt=this.toSeconds(et);this._activeSources.forEach(rt=>rt.stop(nt))}restart(et,nt,rt){return super.restart(et,nt,rt),this}_restart(et,nt,rt){var it;(it=[...this._activeSources].pop())===null||it===void 0||it.stop(et),this._start(et,nt,rt)}seek(et,nt){const rt=this.toSeconds(nt);if(this._state.getValueAtTime(rt)==="started"){const it=this.toSeconds(et);this._stop(rt),this._start(rt,it)}return this}setLoopPoints(et,nt){return this.loopStart=et,this.loopEnd=nt,this}get loopStart(){return this._loopStart}set loopStart(et){this._loopStart=et,this.buffer.loaded&&assertRange(this.toSeconds(et),0,this.buffer.duration),this._activeSources.forEach(nt=>{nt.loopStart=et})}get loopEnd(){return this._loopEnd}set loopEnd(et){this._loopEnd=et,this.buffer.loaded&&assertRange(this.toSeconds(et),0,this.buffer.duration),this._activeSources.forEach(nt=>{nt.loopEnd=et})}get buffer(){return this._buffer}set buffer(et){this._buffer.set(et)}get loop(){return this._loop}set loop(et){if(this._loop!==et&&(this._loop=et,this._activeSources.forEach(nt=>{nt.loop=et}),et)){const nt=this._state.getNextState("stopped",this.now());nt&&this._state.cancel(nt.time)}}get playbackRate(){return this._playbackRate}set playbackRate(et){this._playbackRate=et;const nt=this.now(),rt=this._state.getNextState("stopped",nt);rt&&rt.implicitEnd&&(this._state.cancel(rt.time),this._activeSources.forEach(it=>it.cancelStop())),this._activeSources.forEach(it=>{it.playbackRate.setValueAtTime(et,nt)})}get reverse(){return this._buffer.reverse}set reverse(et){this._buffer.reverse=et}get loaded(){return this._buffer.loaded}dispose(){return super.dispose(),this._activeSources.forEach(et=>et.dispose()),this._activeSources.clear(),this._buffer.dispose(),this}};__decorate([timeRange(0)],Player$1.prototype,"fadeIn",void 0);__decorate([timeRange(0)],Player$1.prototype,"fadeOut",void 0);class GainToAudio extends SignalOperator{constructor(){super(...arguments),this.name="GainToAudio",this._norm=new WaveShaper({context:this.context,mapping:et=>Math.abs(et)*2-1}),this.input=this._norm,this.output=this._norm}dispose(){return super.dispose(),this._norm.dispose(),this}}class Envelope extends ToneAudioNode{constructor(){super(optionsFromArguments(Envelope.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="Envelope",this._sig=new Signal({context:this.context,value:0}),this.output=this._sig,this.input=void 0;const et=optionsFromArguments(Envelope.getDefaults(),arguments,["attack","decay","sustain","release"]);this.attack=et.attack,this.decay=et.decay,this.sustain=et.sustain,this.release=et.release,this.attackCurve=et.attackCurve,this.releaseCurve=et.releaseCurve,this.decayCurve=et.decayCurve}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{attack:.01,attackCurve:"linear",decay:.1,decayCurve:"exponential",release:1,releaseCurve:"exponential",sustain:.5})}get value(){return this.getValueAtTime(this.now())}_getCurve(et,nt){if(isString$2(et))return et;{let rt;for(rt in EnvelopeCurves)if(EnvelopeCurves[rt][nt]===et)return rt;return et}}_setCurve(et,nt,rt){if(isString$2(rt)&&Reflect.has(EnvelopeCurves,rt)){const it=EnvelopeCurves[rt];isObject$7(it)?et!=="_decayCurve"&&(this[et]=it[nt]):this[et]=it}else if(isArray$e(rt)&&et!=="_decayCurve")this[et]=rt;else throw new Error("Envelope: invalid curve: "+rt)}get attackCurve(){return this._getCurve(this._attackCurve,"In")}set attackCurve(et){this._setCurve("_attackCurve","In",et)}get releaseCurve(){return this._getCurve(this._releaseCurve,"Out")}set releaseCurve(et){this._setCurve("_releaseCurve","Out",et)}get decayCurve(){return this._getCurve(this._decayCurve,"Out")}set decayCurve(et){this._setCurve("_decayCurve","Out",et)}triggerAttack(et,nt=1){this.log("triggerAttack",et,nt),et=this.toSeconds(et);let it=this.toSeconds(this.attack);const ot=this.toSeconds(this.decay),at=this.getValueAtTime(et);if(at>0){const st=1/it;it=(1-at)/st}if(it0){const rt=this.toSeconds(this.release);rt{let et,nt;const rt=[];for(et=0;et<128;et++)rt[et]=Math.sin(et/(128-1)*(Math.PI/2));const it=[],ot=6.4;for(et=0;et<128-1;et++){nt=et/(128-1);const dt=Math.sin(nt*(Math.PI*2)*ot-Math.PI/2)+1;it[et]=dt/10+nt*.83}it[128-1]=1;const at=[],st=5;for(et=0;et<128;et++)at[et]=Math.ceil(et/(128-1)*st)/st;const lt=[];for(et=0;et<128;et++)nt=et/(128-1),lt[et]=.5*(1-Math.cos(Math.PI*nt));const ct=[];for(et=0;et<128;et++){nt=et/(128-1);const dt=Math.pow(nt,3)*4+.2,pt=Math.cos(dt*Math.PI*2*nt);ct[et]=Math.abs(pt*(1-nt))}function ut(dt){const pt=new Array(dt.length);for(let mt=0;mtthis._original_triggerRelease(nt);const et=optionsFromArguments(Instrument.getDefaults(),arguments);this._volume=this.output=new Volume({context:this.context,volume:et.volume}),this.volume=this._volume.volume,readOnly(this,"volume")}static getDefaults(){return Object.assign(ToneAudioNode.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 et=!1;return this._synced||(this._synced=!0,et=!0),et}_syncMethod(et,nt){const rt=this["_original_"+et]=this[et];this[et]=(...it)=>{const ot=it[nt],at=this.context.transport.schedule(st=>{it[nt]=st,rt.apply(this,it)},ot);this._scheduledEvents.push(at)}}unsync(){return this._scheduledEvents.forEach(et=>this.context.transport.clear(et)),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(et,nt,rt,it){const ot=this.toSeconds(rt),at=this.toSeconds(nt);return this.triggerAttack(et,ot,it),this.triggerRelease(ot+at),this}dispose(){return super.dispose(),this._volume.dispose(),this.unsync(),this._scheduledEvents=[],this}}class Monophonic extends Instrument{constructor(){super(optionsFromArguments(Monophonic.getDefaults(),arguments));const et=optionsFromArguments(Monophonic.getDefaults(),arguments);this.portamento=et.portamento,this.onsilence=et.onsilence}static getDefaults(){return Object.assign(Instrument.getDefaults(),{detune:0,onsilence:noOp,portamento:0})}triggerAttack(et,nt,rt=1){this.log("triggerAttack",et,nt,rt);const it=this.toSeconds(nt);return this._triggerEnvelopeAttack(it,rt),this.setNote(et,it),this}triggerRelease(et){this.log("triggerRelease",et);const nt=this.toSeconds(et);return this._triggerEnvelopeRelease(nt),this}setNote(et,nt){const rt=this.toSeconds(nt),it=et instanceof FrequencyClass?et.toFrequency():et;if(this.portamento>0&&this.getLevelAtTime(rt)>.05){const ot=this.toSeconds(this.portamento);this.frequency.exponentialRampTo(it,ot,rt)}else this.frequency.setValueAtTime(it,rt);return this}}__decorate([timeRange(0)],Monophonic.prototype,"portamento",void 0);class AmplitudeEnvelope extends Envelope{constructor(){super(optionsFromArguments(AmplitudeEnvelope.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="AmplitudeEnvelope",this._gainNode=new Gain({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 Synth extends Monophonic{constructor(){super(optionsFromArguments(Synth.getDefaults(),arguments)),this.name="Synth";const et=optionsFromArguments(Synth.getDefaults(),arguments);this.oscillator=new OmniOscillator(Object.assign({context:this.context,detune:et.detune,onstop:()=>this.onsilence(this)},et.oscillator)),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.envelope=new AmplitudeEnvelope(Object.assign({context:this.context},et.envelope)),this.oscillator.chain(this.envelope,this.output),readOnly(this,["oscillator","frequency","detune","envelope"])}static getDefaults(){return Object.assign(Monophonic.getDefaults(),{envelope:Object.assign(omitFromObject(Envelope.getDefaults(),Object.keys(ToneAudioNode.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.3}),oscillator:Object.assign(omitFromObject(OmniOscillator.getDefaults(),[...Object.keys(Source.getDefaults()),"frequency","detune"]),{type:"triangle"})})}_triggerEnvelopeAttack(et,nt){if(this.envelope.triggerAttack(et,nt),this.oscillator.start(et),this.envelope.sustain===0){const rt=this.toSeconds(this.envelope.attack),it=this.toSeconds(this.envelope.decay);this.oscillator.stop(et+rt+it)}}_triggerEnvelopeRelease(et){this.envelope.triggerRelease(et),this.oscillator.stop(et+this.toSeconds(this.envelope.release))}getLevelAtTime(et){return et=this.toSeconds(et),this.envelope.getValueAtTime(et)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this}}class BiquadFilter extends ToneAudioNode{constructor(){super(optionsFromArguments(BiquadFilter.getDefaults(),arguments,["frequency","type"])),this.name="BiquadFilter";const et=optionsFromArguments(BiquadFilter.getDefaults(),arguments,["frequency","type"]);this._filter=this.context.createBiquadFilter(),this.input=this.output=this._filter,this.Q=new Param({context:this.context,units:"number",value:et.Q,param:this._filter.Q}),this.frequency=new Param({context:this.context,units:"frequency",value:et.frequency,param:this._filter.frequency}),this.detune=new Param({context:this.context,units:"cents",value:et.detune,param:this._filter.detune}),this.gain=new Param({context:this.context,units:"decibels",convert:!1,value:et.gain,param:this._filter.gain}),this.type=et.type}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{Q:1,type:"lowpass",frequency:350,detune:0,gain:0})}get type(){return this._filter.type}set type(et){assert(["lowpass","highpass","bandpass","lowshelf","highshelf","notch","allpass","peaking"].indexOf(et)!==-1,`Invalid filter type: ${et}`),this._filter.type=et}getFrequencyResponse(et=128){const nt=new Float32Array(et);for(let at=0;atrt.type=et)}get rolloff(){return this._rolloff}set rolloff(et){const nt=isNumber$4(et)?et:parseInt(et,10),rt=[-12,-24,-48,-96];let it=rt.indexOf(nt);assert(it!==-1,`rolloff can only be ${rt.join(", ")}`),it+=1,this._rolloff=nt,this.input.disconnect(),this._filters.forEach(ot=>ot.disconnect()),this._filters=new Array(it);for(let ot=0;ot1);return this._filters.forEach(()=>{nt.getFrequencyResponse(et).forEach((ot,at)=>rt[at]*=ot)}),nt.dispose(),rt}dispose(){return super.dispose(),this._filters.forEach(et=>{et.dispose()}),writable(this,["detune","frequency","gain","Q"]),this.frequency.dispose(),this.Q.dispose(),this.detune.dispose(),this.gain.dispose(),this}};class FrequencyEnvelope extends Envelope{constructor(){super(optionsFromArguments(FrequencyEnvelope.getDefaults(),arguments,["attack","decay","sustain","release"])),this.name="FrequencyEnvelope";const et=optionsFromArguments(FrequencyEnvelope.getDefaults(),arguments,["attack","decay","sustain","release"]);this._octaves=et.octaves,this._baseFrequency=this.toFrequency(et.baseFrequency),this._exponent=this.input=new Pow({context:this.context,value:et.exponent}),this._scale=this.output=new Scale({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(Envelope.getDefaults(),{baseFrequency:200,exponent:1,octaves:4})}get baseFrequency(){return this._baseFrequency}set baseFrequency(et){const nt=this.toFrequency(et);assertRange(nt,0),this._baseFrequency=nt,this._scale.min=this._baseFrequency,this.octaves=this._octaves}get octaves(){return this._octaves}set octaves(et){this._octaves=et,this._scale.max=this._baseFrequency*Math.pow(2,et)}get exponent(){return this._exponent.value}set exponent(et){this._exponent.value=et}dispose(){return super.dispose(),this._exponent.dispose(),this._scale.dispose(),this}}class MonoSynth extends Monophonic{constructor(){super(optionsFromArguments(MonoSynth.getDefaults(),arguments)),this.name="MonoSynth";const et=optionsFromArguments(MonoSynth.getDefaults(),arguments);this.oscillator=new OmniOscillator(Object.assign(et.oscillator,{context:this.context,detune:et.detune,onstop:()=>this.onsilence(this)})),this.frequency=this.oscillator.frequency,this.detune=this.oscillator.detune,this.filter=new Filter$1(Object.assign(et.filter,{context:this.context})),this.filterEnvelope=new FrequencyEnvelope(Object.assign(et.filterEnvelope,{context:this.context})),this.envelope=new AmplitudeEnvelope(Object.assign(et.envelope,{context:this.context})),this.oscillator.chain(this.filter,this.envelope,this.output),this.filterEnvelope.connect(this.filter.frequency),readOnly(this,["oscillator","frequency","detune","filter","filterEnvelope","envelope"])}static getDefaults(){return Object.assign(Monophonic.getDefaults(),{envelope:Object.assign(omitFromObject(Envelope.getDefaults(),Object.keys(ToneAudioNode.getDefaults())),{attack:.005,decay:.1,release:1,sustain:.9}),filter:Object.assign(omitFromObject(Filter$1.getDefaults(),Object.keys(ToneAudioNode.getDefaults())),{Q:1,rolloff:-12,type:"lowpass"}),filterEnvelope:Object.assign(omitFromObject(FrequencyEnvelope.getDefaults(),Object.keys(ToneAudioNode.getDefaults())),{attack:.6,baseFrequency:200,decay:.2,exponent:2,octaves:3,release:2,sustain:.5}),oscillator:Object.assign(omitFromObject(OmniOscillator.getDefaults(),Object.keys(Source.getDefaults())),{type:"sawtooth"})})}_triggerEnvelopeAttack(et,nt=1){if(this.envelope.triggerAttack(et,nt),this.filterEnvelope.triggerAttack(et),this.oscillator.start(et),this.envelope.sustain===0){const rt=this.toSeconds(this.envelope.attack),it=this.toSeconds(this.envelope.decay);this.oscillator.stop(et+rt+it)}}_triggerEnvelopeRelease(et){this.envelope.triggerRelease(et),this.filterEnvelope.triggerRelease(et),this.oscillator.stop(et+this.toSeconds(this.envelope.release))}getLevelAtTime(et){return et=this.toSeconds(et),this.envelope.getValueAtTime(et)}dispose(){return super.dispose(),this.oscillator.dispose(),this.envelope.dispose(),this.filterEnvelope.dispose(),this.filter.dispose(),this}}class MembraneSynth extends Synth{constructor(){super(optionsFromArguments(MembraneSynth.getDefaults(),arguments)),this.name="MembraneSynth",this.portamento=0;const et=optionsFromArguments(MembraneSynth.getDefaults(),arguments);this.pitchDecay=et.pitchDecay,this.octaves=et.octaves,readOnly(this,["oscillator","envelope"])}static getDefaults(){return deepMerge(Monophonic.getDefaults(),Synth.getDefaults(),{envelope:{attack:.001,attackCurve:"exponential",decay:.4,release:1.4,sustain:.01},octaves:10,oscillator:{type:"sine"},pitchDecay:.05})}setNote(et,nt){const rt=this.toSeconds(nt),it=this.toFrequency(et instanceof FrequencyClass?et.toFrequency():et),ot=it*this.octaves;return this.oscillator.frequency.setValueAtTime(ot,rt),this.oscillator.frequency.exponentialRampToValueAtTime(it,rt+this.toSeconds(this.pitchDecay)),this}dispose(){return super.dispose(),this}}__decorate([range$3(0)],MembraneSynth.prototype,"octaves",void 0);__decorate([timeRange(0)],MembraneSynth.prototype,"pitchDecay",void 0);const workletContext=new Set;function addToWorklet(tt){workletContext.add(tt)}function registerProcessor(tt,et){const nt=`registerProcessor("${tt}", ${et})`;workletContext.add(nt)}const toneAudioWorkletProcessor=` /** * The base AudioWorkletProcessor for use in Tone.js. Works with the [[ToneAudioWorklet]]. */ @@ -6688,7 +6688,7 @@ void main() { return val; } } -`;registerProcessor(workletName,bitCrusherWorklet);class Merge extends ToneAudioNode{constructor(){super(optionsFromArguments(Merge.getDefaults(),arguments,["channels"])),this.name="Merge";const et=optionsFromArguments(Merge.getDefaults(),arguments,["channels"]);this._merger=this.output=this.input=this.context.createChannelMerger(et.channels)}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{channels:2})}dispose(){return super.dispose(),this._merger.disconnect(),this}}class Reverb extends Effect{constructor(){super(optionsFromArguments(Reverb.getDefaults(),arguments,["decay"])),this.name="Reverb",this._convolver=this.context.createConvolver(),this.ready=Promise.resolve();const et=optionsFromArguments(Reverb.getDefaults(),arguments,["decay"]);this._decay=et.decay,this._preDelay=et.preDelay,this.generate(),this.connectEffect(this._convolver)}static getDefaults(){return Object.assign(Effect.getDefaults(),{decay:1.5,preDelay:.01})}get decay(){return this._decay}set decay(et){et=this.toSeconds(et),assertRange(et,.001),this._decay=et,this.generate()}get preDelay(){return this._preDelay}set preDelay(et){et=this.toSeconds(et),assertRange(et,0),this._preDelay=et,this.generate()}generate(){return __awaiter(this,void 0,void 0,function*(){const et=this.ready,nt=new OfflineContext(2,this._decay+this._preDelay,this.context.sampleRate),rt=new Noise({context:nt}),it=new Noise({context:nt}),ot=new Merge({context:nt});rt.connect(ot,0,0),it.connect(ot,0,1);const at=new Gain({context:nt}).toDestination();ot.connect(at),rt.start(0),it.start(0),at.gain.setValueAtTime(0,0),at.gain.setValueAtTime(1,this._preDelay),at.gain.exponentialApproachValueAtTime(0,this._preDelay,this.decay);const st=nt.render();return this.ready=st.then(noOp),yield et,this._convolver.buffer=(yield st).get(),this})}dispose(){return super.dispose(),this._convolver.disconnect(),this}}class Solo extends ToneAudioNode{constructor(){super(optionsFromArguments(Solo.getDefaults(),arguments,["solo"])),this.name="Solo";const et=optionsFromArguments(Solo.getDefaults(),arguments,["solo"]);this.input=this.output=new Gain({context:this.context}),Solo._allSolos.has(this.context)||Solo._allSolos.set(this.context,new Set),Solo._allSolos.get(this.context).add(this),this.solo=et.solo}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{solo:!1})}get solo(){return this._isSoloed()}set solo(et){et?this._addSolo():this._removeSolo(),Solo._allSolos.get(this.context).forEach(nt=>nt._updateSolo())}get muted(){return this.input.gain.value===0}_addSolo(){Solo._soloed.has(this.context)||Solo._soloed.set(this.context,new Set),Solo._soloed.get(this.context).add(this)}_removeSolo(){Solo._soloed.has(this.context)&&Solo._soloed.get(this.context).delete(this)}_isSoloed(){return Solo._soloed.has(this.context)&&Solo._soloed.get(this.context).has(this)}_noSolos(){return!Solo._soloed.has(this.context)||Solo._soloed.has(this.context)&&Solo._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(),Solo._allSolos.get(this.context).delete(this),this._removeSolo(),this}}Solo._allSolos=new Map;Solo._soloed=new Map;class PanVol extends ToneAudioNode{constructor(){super(optionsFromArguments(PanVol.getDefaults(),arguments,["pan","volume"])),this.name="PanVol";const et=optionsFromArguments(PanVol.getDefaults(),arguments,["pan","volume"]);this._panner=this.input=new Panner({context:this.context,pan:et.pan,channelCount:et.channelCount}),this.pan=this._panner.pan,this._volume=this.output=new Volume({context:this.context,volume:et.volume}),this.volume=this._volume.volume,this._panner.connect(this._volume),this.mute=et.mute,readOnly(this,["pan","volume"])}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{mute:!1,pan:0,volume:0,channelCount:1})}get mute(){return this._volume.mute}set mute(et){this._volume.mute=et}dispose(){return super.dispose(),this._panner.dispose(),this.pan.dispose(),this._volume.dispose(),this.volume.dispose(),this}}class Channel extends ToneAudioNode{constructor(){super(optionsFromArguments(Channel.getDefaults(),arguments,["volume","pan"])),this.name="Channel";const et=optionsFromArguments(Channel.getDefaults(),arguments,["volume","pan"]);this._solo=this.input=new Solo({solo:et.solo,context:this.context}),this._panVol=this.output=new PanVol({context:this.context,pan:et.pan,volume:et.volume,mute:et.mute,channelCount:et.channelCount}),this.pan=this._panVol.pan,this.volume=this._panVol.volume,this._solo.connect(this._panVol),readOnly(this,["pan","volume"])}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{pan:0,volume:0,mute:!1,solo:!1,channelCount:1})}get solo(){return this._solo.solo}set solo(et){this._solo.solo=et}get muted(){return this._solo.muted||this.mute}get mute(){return this._panVol.mute}set mute(et){this._panVol.mute=et}_getBus(et){return Channel.buses.has(et)||Channel.buses.set(et,new Gain({context:this.context})),Channel.buses.get(et)}send(et,nt=0){const rt=this._getBus(et),it=new Gain({context:this.context,units:"decibels",gain:nt});return this.connect(it),it.connect(rt),it}receive(et){return this._getBus(et).connect(this),this}dispose(){return super.dispose(),this._panVol.dispose(),this.pan.dispose(),this.volume.dispose(),this._solo.dispose(),this}}Channel.buses=new Map;class Listener extends ToneAudioNode{constructor(){super(...arguments),this.name="Listener",this.positionX=new Param({context:this.context,param:this.context.rawContext.listener.positionX}),this.positionY=new Param({context:this.context,param:this.context.rawContext.listener.positionY}),this.positionZ=new Param({context:this.context,param:this.context.rawContext.listener.positionZ}),this.forwardX=new Param({context:this.context,param:this.context.rawContext.listener.forwardX}),this.forwardY=new Param({context:this.context,param:this.context.rawContext.listener.forwardY}),this.forwardZ=new Param({context:this.context,param:this.context.rawContext.listener.forwardZ}),this.upX=new Param({context:this.context,param:this.context.rawContext.listener.upX}),this.upY=new Param({context:this.context,param:this.context.rawContext.listener.upY}),this.upZ=new Param({context:this.context,param:this.context.rawContext.listener.upZ})}static getDefaults(){return Object.assign(ToneAudioNode.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}}onContextInit(tt=>{tt.listener=new Listener({context:tt})});onContextClose(tt=>{tt.listener.dispose()});getContext().transport;const Destination=getContext().destination;getContext().destination;getContext().listener;getContext().draw;getContext();const highPassFilter=new Filter(900,"highpass"),effectsBus=new Volume(-6);effectsBus.chain(highPassFilter,Destination);const reverb=new Reverb(3).connect(effectsBus),monoSynth=new MonoSynth({envelope:{attack:0,decay:.9,sustain:.2,release:.1}});monoSynth.oscillator.type="triangle2";monoSynth.volume.value=-6;monoSynth.chain(highPassFilter,Destination);const monoSynth2=new MonoSynth({envelope:{attack:.4,decay:.9,sustain:.7,release:.6}}).connect(reverb);monoSynth2.oscillator.type="triangle";monoSynth2.volume.value=-6;monoSynth2.chain(highPassFilter,Destination);function addOrganicVariant(){return Math.floor((Math.random()-.5)*20)}let toneStarted=!1;const playInspectSound=async(tt=0)=>{toneStarted||(await start$1(),toneStarted=!0);try{if(tt>2e3)monoSynth2.triggerAttackRelease(60,.3);else if(tt>1e3){let et=310;et+=addOrganicVariant(),monoSynth.triggerAttackRelease(et,.001)}}catch(et){console.warn(et)}};let lookAtAnimationTimer,departAnimationTimer;const departAnimationTimerLength=4e3,lookAtAnimationTimerLength=2e3,useAutoNavigate=tt=>{const et=useSelectedNode(),nt=useDataStore(At=>At.cameraFocusTrigger),rt=useControlStore(At=>At.isUserDragging),it=useControlStore(At=>At.isUserScrolling),ot=useControlStore(At=>At.setUserMovedCamera),at=useDataStore(At=>At.setNearbyNodeIds),st=useDataStore(At=>At.showSelectionGraph),lt=useDataStore(At=>At.data),ct=useDataStore(At=>At.graphStyle),{camera:ut}=useThree(),[ht,dt]=reactExports.useState(!1),[pt,mt]=reactExports.useState(!1),[gt,yt]=reactExports.useState(arriveDistance),bt=reactExports.useMemo(()=>{if(st)return new Vector3(0,0,0);const At=lt==null?void 0:lt.nodes.find($t=>$t.ref_id===(et==null?void 0:et.ref_id));let Et=new Vector3(0,0,0);if(At&<){const $t=lt==null?void 0:lt.nodes.filter(wt=>{var It;return(It=At.children)==null?void 0:It.find(Ot=>Ot===wt.id)}),Dt=new Vector3(At.x,At.y,At.z);let jt=new Vector3(0,0,0);$t.map(wt=>(jt=jt.add(new Vector3(wt.x,wt.y,wt.z).normalize()),wt));const Pt=At.scale?1-1/(At.scale+10):1,Ct=Dt.sub(jt).multiplyScalar(.8*Pt);Et=Dt.add(Ct)}return Et},[st,et,lt]),vt=reactExports.useMemo(()=>{if(st)return new Vector3(0,0,0);const At=lt==null?void 0:lt.nodes.find(Et=>Et.ref_id===(et==null?void 0:et.ref_id));return new Vector3((At==null?void 0:At.x)||0,(At==null?void 0:At.y)||0,(At==null?void 0:At.z)||0)},[st,et,lt]);reactExports.useEffect(()=>{var At;st&&((At=tt.current)==null||At.setLookAt(selectionGraphCameraPosition.x,selectionGraphCameraPosition.y,selectionGraphCameraPosition.z,0,0,0,!1)),xt()},[st]),reactExports.useEffect(()=>{st?yt(selectionGraphDistance):(et==null?void 0:et.node_type)==="topic"?yt(topicArriveDistance):yt(arriveDistance)},[et,yt,st]),reactExports.useEffect(()=>{kt()},[nt]),reactExports.useEffect(()=>{(rt||it)&&(dt(!0),mt(!0))},[rt,it,dt,mt]),reactExports.useEffect(()=>{if(et)if(!st&&ct==="earth"&&(tt!=null&&tt.current)){const At=tt.current.camera.position.distanceTo(new Vector3),Et=getPointAbove(vt,-At/2);tt.current.setLookAt(Et.x,Et.y,Et.z,0,0,0,!0)}else lookAtAnimationTimer&&clearTimeout(lookAtAnimationTimer),lookAtAnimationTimer=setTimeout(()=>{mt(!0),clearTimeout(lookAtAnimationTimer)},lookAtAnimationTimerLength),xt();return()=>{lookAtAnimationTimer&&clearTimeout(lookAtAnimationTimer),departAnimationTimer&&clearTimeout(departAnimationTimer)}},[et]),useFrame(At=>{tt.current&&et&&(ht||St(bt,At.camera),pt||Tt(vt,At.camera))});const xt=()=>{if(et){const At=ut.position.distanceTo(bt);playInspectSound(At)}kt()},kt=()=>{dt(!1),mt(!1),ot(!1),departAnimationTimer&&clearTimeout(departAnimationTimer),departAnimationTimer=setTimeout(()=>{dt(!0),mt(!0)},departAnimationTimerLength)},St=(At,Et)=>{if(Et.position.distanceTo(At){var $t;($t=tt==null?void 0:tt.current)==null||$t.setLookAt(Et.position.x,Et.position.y,Et.position.z,At.x,At.y,At.z,!0)};return null},autoRotateSpeed=1;let cameraAnimation=null;const useCameraAnimations=(tt,{enabled:et})=>{const nt=useSelectedNode();useAutoNavigate(tt);const rt=useControlStore(ct=>ct.isUserDragging),it=useDataStore(ct=>ct.disableCameraRotation),ot=useDataStore(ct=>ct.data),at=useDataStore(ct=>ct.graphRadius),st=useDataStore(ct=>ct.setNearbyNodeIds);reactExports.useEffect(()=>{et||(cameraAnimation==null||cameraAnimation.kill(),cameraAnimation=null)},[et]);const lt=reactExports.useCallback(()=>{cameraAnimation==null||cameraAnimation.kill();const ct={value:-244},ut=gsapWithCSS.to(ct,{duration:5,keyframes:{"0%":{value:10},"100%":{delay:2,ease:"Power4.easeIn",value:-200}},onComplete:()=>{cameraAnimation=null},onInterrupt(){ut.kill()},onUpdate:()=>{var dt;const{value:ht}=ct;if(tt.current){const pt=getNearbyNodeIds((ot==null?void 0:ot.nodes)||[],tt.current.camera);pt&&st(pt),(dt=tt.current)==null||dt.dolly(ht,!1)}}});ut.play(),cameraAnimation=ut},[]);return reactExports.useEffect(()=>{tt.current&&at&&(tt.current.maxDistance=tt.current.getDistanceToFitSphere(at+200)),et&<()},[at]),reactExports.useEffect(()=>{!nt&&tt.current&&tt.current.setLookAt(initialCameraPosition.x,initialCameraPosition.y,initialCameraPosition.z,0,0,0,!0)},[nt]),useFrame((ct,ut)=>{tt.current&&(!it&&!rt&&(tt.current.azimuthAngle+=autoRotateSpeed*ut*MathUtils.DEG2RAD),tt.current.update(ut))}),null},Controls=({disableAnimations:tt})=>{const et=reactExports.useRef(null),nt=useDataStore(dt=>dt.graphStyle),rt=useDataStore(dt=>dt.data),it=useDataStore(dt=>dt.setNearbyNodeIds),ot=useDataStore(dt=>dt.setDisableCameraRotation),[at]=reactExports.useState(.8),{camera:st}=useThree(),[lt,ct,ut,ht]=useControlStore(dt=>[dt.isUserDragging,dt.setIsUserDragging,dt.isUserScrolling,dt.isUserScrollingOnHtmlPanel]);return useCameraAnimations(et,{enabled:!tt&&!ut&&!lt}),reactExports.useEffect(()=>{et.current&&et.current.setLookAt(initialCameraPosition.x,initialCameraPosition.y,initialCameraPosition.z,0,0,0,!0)},[nt]),reactExports.useEffect(()=>{if(!lt){const dt=getNearbyNodeIds((rt==null?void 0:rt.nodes)||[],st);dt&&it(dt)}},[st,st.position,st.position.x,st.position.y,st.position.z,rt==null?void 0:rt.nodes,it,lt]),reactExports.useEffect(()=>{lt&&ot(!0)},[lt,ot]),jsxRuntimeExports.jsx(CameraControls,{ref:et,boundaryEnclosesCamera:!0,enabled:!ht,makeDefault:!0,maxDistance:12e3,minDistance:100,onEnd:()=>ct(!1),onStart:()=>ct(!0),smoothTime:at})},smoothness={metalness:.9,roughness:0},materialOptions={...smoothness},blurryMaterial=new MeshStandardMaterial(materialOptions),BlurryInstances=({hide:tt})=>{const et=useGraphData(),nt=useDataStore(it=>it.graphStyle),rt=reactExports.useMemo(()=>et.nodes.map((it,ot)=>{if(it.node_type==="topic")return!1;const at=!isMainTopic(it),st=getNodeColorByType(it.node_type||"",!0);return jsxRuntimeExports.jsx(Instance,{color:st,name:it.id,position:[it.x,it.y,it.z],scale:at?(it.scale||1)*.9:0,userData:it},`${it.ref_id||it.id}-instanced-node-${ot}-${nt}`)}),[nt,et]);return jsxRuntimeExports.jsx(Instances,{geometry:boxGeometry,material:blurryMaterial,visible:!tt,children:rt})},loader=new TextureLoader,noImageTexture=loader.load("noimage.jpeg"),noImageMaterial=new MeshStandardMaterial({...smoothness,map:noImageTexture}),transparentValue=.4,noImageTransparentMaterial=new MeshStandardMaterial({...smoothness,map:noImageTexture,transparent:!0,opacity:transparentValue}),cachedMaterials={},useMaterial=(tt,et)=>{const[nt,rt]=reactExports.useState(noImageTexture),[it,ot]=reactExports.useState(noImageMaterial);return reactExports.useEffect(()=>{const at=`${tt}${et&&"-transparent"}`;if(cachedMaterials[at]){rt(cachedMaterials[at].texture),ot(cachedMaterials[at].material);return}loader.load(tt,st=>{const lt=new MeshStandardMaterial({map:st,transparent:et,opacity:et?transparentValue:1,...smoothness});cachedMaterials[at]={texture:st,material:lt},rt(st),ot(lt)},void 0,()=>{rt(noImageTexture),ot(et?noImageTransparentMaterial:noImageMaterial)})},[tt,et]),reactExports.useEffect(()=>function(){nt.dispose(),it.dispose()},[nt,it]),it},Cube=reactExports.memo(({node:tt,hide:et,animated:nt})=>{const rt=reactExports.useRef(null),[it]=reactExports.useState(boxGeometry),ot=useSelectedNode(),at=useDataStore(ut=>ut.showSelectionGraph),st=!!ot&&tt.ref_id===ot.ref_id,lt=useMaterial(tt.image_url||"noimage.jpeg",!1);useFrame((ut,ht)=>{nt&&rt.current&&(rt.current.position.set(tt.x,tt.y,tt.z),st&&(rt.current.rotation.y+=ht*1,rt.current.rotation.x-=ht*.6))}),reactExports.useEffect(()=>function(){it.dispose()},[it]);const ct=reactExports.useMemo(()=>at&&st?20:st?(tt.scale||1)*1.2:tt.scale,[tt,st,at]);return jsxRuntimeExports.jsx(Select,{enabled:!!st,children:jsxRuntimeExports.jsx("mesh",{ref:rt,geometry:boxGeometry,material:lt,name:tt.id,position:[tt.x,tt.y,tt.z],scale:ct,userData:tt,visible:!et})})});Cube.displayName="Cube";const TypesMapper={youtube:"video",podcast:"audio",episode:"audio",clip:"audio",tweet:"twitter",person:"person",guest:"person",twitter_space:"audio"},Avatar$1=styled$4.div` +`;registerProcessor(workletName,bitCrusherWorklet);class Merge extends ToneAudioNode{constructor(){super(optionsFromArguments(Merge.getDefaults(),arguments,["channels"])),this.name="Merge";const et=optionsFromArguments(Merge.getDefaults(),arguments,["channels"]);this._merger=this.output=this.input=this.context.createChannelMerger(et.channels)}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{channels:2})}dispose(){return super.dispose(),this._merger.disconnect(),this}}class Reverb extends Effect{constructor(){super(optionsFromArguments(Reverb.getDefaults(),arguments,["decay"])),this.name="Reverb",this._convolver=this.context.createConvolver(),this.ready=Promise.resolve();const et=optionsFromArguments(Reverb.getDefaults(),arguments,["decay"]);this._decay=et.decay,this._preDelay=et.preDelay,this.generate(),this.connectEffect(this._convolver)}static getDefaults(){return Object.assign(Effect.getDefaults(),{decay:1.5,preDelay:.01})}get decay(){return this._decay}set decay(et){et=this.toSeconds(et),assertRange(et,.001),this._decay=et,this.generate()}get preDelay(){return this._preDelay}set preDelay(et){et=this.toSeconds(et),assertRange(et,0),this._preDelay=et,this.generate()}generate(){return __awaiter(this,void 0,void 0,function*(){const et=this.ready,nt=new OfflineContext(2,this._decay+this._preDelay,this.context.sampleRate),rt=new Noise({context:nt}),it=new Noise({context:nt}),ot=new Merge({context:nt});rt.connect(ot,0,0),it.connect(ot,0,1);const at=new Gain({context:nt}).toDestination();ot.connect(at),rt.start(0),it.start(0),at.gain.setValueAtTime(0,0),at.gain.setValueAtTime(1,this._preDelay),at.gain.exponentialApproachValueAtTime(0,this._preDelay,this.decay);const st=nt.render();return this.ready=st.then(noOp),yield et,this._convolver.buffer=(yield st).get(),this})}dispose(){return super.dispose(),this._convolver.disconnect(),this}}class Solo extends ToneAudioNode{constructor(){super(optionsFromArguments(Solo.getDefaults(),arguments,["solo"])),this.name="Solo";const et=optionsFromArguments(Solo.getDefaults(),arguments,["solo"]);this.input=this.output=new Gain({context:this.context}),Solo._allSolos.has(this.context)||Solo._allSolos.set(this.context,new Set),Solo._allSolos.get(this.context).add(this),this.solo=et.solo}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{solo:!1})}get solo(){return this._isSoloed()}set solo(et){et?this._addSolo():this._removeSolo(),Solo._allSolos.get(this.context).forEach(nt=>nt._updateSolo())}get muted(){return this.input.gain.value===0}_addSolo(){Solo._soloed.has(this.context)||Solo._soloed.set(this.context,new Set),Solo._soloed.get(this.context).add(this)}_removeSolo(){Solo._soloed.has(this.context)&&Solo._soloed.get(this.context).delete(this)}_isSoloed(){return Solo._soloed.has(this.context)&&Solo._soloed.get(this.context).has(this)}_noSolos(){return!Solo._soloed.has(this.context)||Solo._soloed.has(this.context)&&Solo._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(),Solo._allSolos.get(this.context).delete(this),this._removeSolo(),this}}Solo._allSolos=new Map;Solo._soloed=new Map;class PanVol extends ToneAudioNode{constructor(){super(optionsFromArguments(PanVol.getDefaults(),arguments,["pan","volume"])),this.name="PanVol";const et=optionsFromArguments(PanVol.getDefaults(),arguments,["pan","volume"]);this._panner=this.input=new Panner({context:this.context,pan:et.pan,channelCount:et.channelCount}),this.pan=this._panner.pan,this._volume=this.output=new Volume({context:this.context,volume:et.volume}),this.volume=this._volume.volume,this._panner.connect(this._volume),this.mute=et.mute,readOnly(this,["pan","volume"])}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{mute:!1,pan:0,volume:0,channelCount:1})}get mute(){return this._volume.mute}set mute(et){this._volume.mute=et}dispose(){return super.dispose(),this._panner.dispose(),this.pan.dispose(),this._volume.dispose(),this.volume.dispose(),this}}class Channel extends ToneAudioNode{constructor(){super(optionsFromArguments(Channel.getDefaults(),arguments,["volume","pan"])),this.name="Channel";const et=optionsFromArguments(Channel.getDefaults(),arguments,["volume","pan"]);this._solo=this.input=new Solo({solo:et.solo,context:this.context}),this._panVol=this.output=new PanVol({context:this.context,pan:et.pan,volume:et.volume,mute:et.mute,channelCount:et.channelCount}),this.pan=this._panVol.pan,this.volume=this._panVol.volume,this._solo.connect(this._panVol),readOnly(this,["pan","volume"])}static getDefaults(){return Object.assign(ToneAudioNode.getDefaults(),{pan:0,volume:0,mute:!1,solo:!1,channelCount:1})}get solo(){return this._solo.solo}set solo(et){this._solo.solo=et}get muted(){return this._solo.muted||this.mute}get mute(){return this._panVol.mute}set mute(et){this._panVol.mute=et}_getBus(et){return Channel.buses.has(et)||Channel.buses.set(et,new Gain({context:this.context})),Channel.buses.get(et)}send(et,nt=0){const rt=this._getBus(et),it=new Gain({context:this.context,units:"decibels",gain:nt});return this.connect(it),it.connect(rt),it}receive(et){return this._getBus(et).connect(this),this}dispose(){return super.dispose(),this._panVol.dispose(),this.pan.dispose(),this.volume.dispose(),this._solo.dispose(),this}}Channel.buses=new Map;class Listener extends ToneAudioNode{constructor(){super(...arguments),this.name="Listener",this.positionX=new Param({context:this.context,param:this.context.rawContext.listener.positionX}),this.positionY=new Param({context:this.context,param:this.context.rawContext.listener.positionY}),this.positionZ=new Param({context:this.context,param:this.context.rawContext.listener.positionZ}),this.forwardX=new Param({context:this.context,param:this.context.rawContext.listener.forwardX}),this.forwardY=new Param({context:this.context,param:this.context.rawContext.listener.forwardY}),this.forwardZ=new Param({context:this.context,param:this.context.rawContext.listener.forwardZ}),this.upX=new Param({context:this.context,param:this.context.rawContext.listener.upX}),this.upY=new Param({context:this.context,param:this.context.rawContext.listener.upY}),this.upZ=new Param({context:this.context,param:this.context.rawContext.listener.upZ})}static getDefaults(){return Object.assign(ToneAudioNode.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}}onContextInit(tt=>{tt.listener=new Listener({context:tt})});onContextClose(tt=>{tt.listener.dispose()});getContext().transport;const Destination=getContext().destination;getContext().destination;getContext().listener;getContext().draw;getContext();const highPassFilter=new Filter$1(900,"highpass"),effectsBus=new Volume(-6);effectsBus.chain(highPassFilter,Destination);const reverb=new Reverb(3).connect(effectsBus),monoSynth=new MonoSynth({envelope:{attack:0,decay:.9,sustain:.2,release:.1}});monoSynth.oscillator.type="triangle2";monoSynth.volume.value=-6;monoSynth.chain(highPassFilter,Destination);const monoSynth2=new MonoSynth({envelope:{attack:.4,decay:.9,sustain:.7,release:.6}}).connect(reverb);monoSynth2.oscillator.type="triangle";monoSynth2.volume.value=-6;monoSynth2.chain(highPassFilter,Destination);function addOrganicVariant(){return Math.floor((Math.random()-.5)*20)}let toneStarted=!1;const playInspectSound=async(tt=0)=>{toneStarted||(await start$1(),toneStarted=!0);try{if(tt>2e3)monoSynth2.triggerAttackRelease(60,.3);else if(tt>1e3){let et=310;et+=addOrganicVariant(),monoSynth.triggerAttackRelease(et,.001)}}catch(et){console.warn(et)}};let lookAtAnimationTimer,departAnimationTimer;const departAnimationTimerLength=4e3,lookAtAnimationTimerLength=2e3,useAutoNavigate=tt=>{const et=useSelectedNode(),nt=useDataStore(At=>At.cameraFocusTrigger),rt=useControlStore(At=>At.isUserDragging),it=useControlStore(At=>At.isUserScrolling),ot=useControlStore(At=>At.setUserMovedCamera),at=useDataStore(At=>At.setNearbyNodeIds),st=useDataStore(At=>At.showSelectionGraph),lt=useDataStore(At=>At.data),ct=useDataStore(At=>At.graphStyle),{camera:ut}=useThree(),[ht,dt]=reactExports.useState(!1),[pt,mt]=reactExports.useState(!1),[gt,yt]=reactExports.useState(arriveDistance),bt=reactExports.useMemo(()=>{if(st)return new Vector3(0,0,0);const At=lt==null?void 0:lt.nodes.find($t=>$t.ref_id===(et==null?void 0:et.ref_id));let Et=new Vector3(0,0,0);if(At&<){const $t=lt==null?void 0:lt.nodes.filter(wt=>{var It;return(It=At.children)==null?void 0:It.find(Ot=>Ot===wt.id)}),Dt=new Vector3(At.x,At.y,At.z);let jt=new Vector3(0,0,0);$t.map(wt=>(jt=jt.add(new Vector3(wt.x,wt.y,wt.z).normalize()),wt));const Pt=At.scale?1-1/(At.scale+10):1,Ct=Dt.sub(jt).multiplyScalar(.8*Pt);Et=Dt.add(Ct)}return Et},[st,et,lt]),vt=reactExports.useMemo(()=>{if(st)return new Vector3(0,0,0);const At=lt==null?void 0:lt.nodes.find(Et=>Et.ref_id===(et==null?void 0:et.ref_id));return new Vector3((At==null?void 0:At.x)||0,(At==null?void 0:At.y)||0,(At==null?void 0:At.z)||0)},[st,et,lt]);reactExports.useEffect(()=>{var At;st&&((At=tt.current)==null||At.setLookAt(selectionGraphCameraPosition.x,selectionGraphCameraPosition.y,selectionGraphCameraPosition.z,0,0,0,!1)),xt()},[st]),reactExports.useEffect(()=>{st?yt(selectionGraphDistance):(et==null?void 0:et.node_type)==="topic"?yt(topicArriveDistance):yt(arriveDistance)},[et,yt,st]),reactExports.useEffect(()=>{kt()},[nt]),reactExports.useEffect(()=>{(rt||it)&&(dt(!0),mt(!0))},[rt,it,dt,mt]),reactExports.useEffect(()=>{if(et)if(!st&&ct==="earth"&&(tt!=null&&tt.current)){const At=tt.current.camera.position.distanceTo(new Vector3),Et=getPointAbove(vt,-At/2);tt.current.setLookAt(Et.x,Et.y,Et.z,0,0,0,!0)}else lookAtAnimationTimer&&clearTimeout(lookAtAnimationTimer),lookAtAnimationTimer=setTimeout(()=>{mt(!0),clearTimeout(lookAtAnimationTimer)},lookAtAnimationTimerLength),xt();return()=>{lookAtAnimationTimer&&clearTimeout(lookAtAnimationTimer),departAnimationTimer&&clearTimeout(departAnimationTimer)}},[et]),useFrame(At=>{tt.current&&et&&(ht||St(bt,At.camera),pt||Tt(vt,At.camera))});const xt=()=>{if(et){const At=ut.position.distanceTo(bt);playInspectSound(At)}kt()},kt=()=>{dt(!1),mt(!1),ot(!1),departAnimationTimer&&clearTimeout(departAnimationTimer),departAnimationTimer=setTimeout(()=>{dt(!0),mt(!0)},departAnimationTimerLength)},St=(At,Et)=>{if(Et.position.distanceTo(At){var $t;($t=tt==null?void 0:tt.current)==null||$t.setLookAt(Et.position.x,Et.position.y,Et.position.z,At.x,At.y,At.z,!0)};return null},autoRotateSpeed=1;let cameraAnimation=null;const useCameraAnimations=(tt,{enabled:et})=>{const nt=useSelectedNode();useAutoNavigate(tt);const rt=useControlStore(ct=>ct.isUserDragging),it=useDataStore(ct=>ct.disableCameraRotation),ot=useDataStore(ct=>ct.data),at=useDataStore(ct=>ct.graphRadius),st=useDataStore(ct=>ct.setNearbyNodeIds);reactExports.useEffect(()=>{et||(cameraAnimation==null||cameraAnimation.kill(),cameraAnimation=null)},[et]);const lt=reactExports.useCallback(()=>{cameraAnimation==null||cameraAnimation.kill();const ct={value:-244},ut=gsapWithCSS.to(ct,{duration:5,keyframes:{"0%":{value:10},"100%":{delay:2,ease:"Power4.easeIn",value:-200}},onComplete:()=>{cameraAnimation=null},onInterrupt(){ut.kill()},onUpdate:()=>{var dt;const{value:ht}=ct;if(tt.current){const pt=getNearbyNodeIds((ot==null?void 0:ot.nodes)||[],tt.current.camera);pt&&st(pt),(dt=tt.current)==null||dt.dolly(ht,!1)}}});ut.play(),cameraAnimation=ut},[]);return reactExports.useEffect(()=>{tt.current&&at&&(tt.current.maxDistance=tt.current.getDistanceToFitSphere(at+200)),et&<()},[at]),reactExports.useEffect(()=>{!nt&&tt.current&&tt.current.setLookAt(initialCameraPosition.x,initialCameraPosition.y,initialCameraPosition.z,0,0,0,!0)},[nt]),useFrame((ct,ut)=>{tt.current&&(!it&&!rt&&(tt.current.azimuthAngle+=autoRotateSpeed*ut*MathUtils.DEG2RAD),tt.current.update(ut))}),null},Controls=({disableAnimations:tt})=>{const et=reactExports.useRef(null),nt=useDataStore(dt=>dt.graphStyle),rt=useDataStore(dt=>dt.data),it=useDataStore(dt=>dt.setNearbyNodeIds),ot=useDataStore(dt=>dt.setDisableCameraRotation),[at]=reactExports.useState(.8),{camera:st}=useThree(),[lt,ct,ut,ht]=useControlStore(dt=>[dt.isUserDragging,dt.setIsUserDragging,dt.isUserScrolling,dt.isUserScrollingOnHtmlPanel]);return useCameraAnimations(et,{enabled:!tt&&!ut&&!lt}),reactExports.useEffect(()=>{et.current&&et.current.setLookAt(initialCameraPosition.x,initialCameraPosition.y,initialCameraPosition.z,0,0,0,!0)},[nt]),reactExports.useEffect(()=>{if(!lt){const dt=getNearbyNodeIds((rt==null?void 0:rt.nodes)||[],st);dt&&it(dt)}},[st,st.position,st.position.x,st.position.y,st.position.z,rt==null?void 0:rt.nodes,it,lt]),reactExports.useEffect(()=>{lt&&ot(!0)},[lt,ot]),jsxRuntimeExports.jsx(CameraControls,{ref:et,boundaryEnclosesCamera:!0,enabled:!ht,makeDefault:!0,maxDistance:12e3,minDistance:100,onEnd:()=>ct(!1),onStart:()=>ct(!0),smoothTime:at})},smoothness={metalness:.9,roughness:0},materialOptions={...smoothness},blurryMaterial=new MeshStandardMaterial(materialOptions),BlurryInstances=({hide:tt})=>{const et=useGraphData(),nt=useDataStore(it=>it.graphStyle),rt=reactExports.useMemo(()=>et.nodes.map((it,ot)=>{if(it.node_type==="topic")return!1;const at=!isMainTopic(it),st=getNodeColorByType(it.node_type||"",!0);return jsxRuntimeExports.jsx(Instance,{color:st,name:it.id,position:[it.x,it.y,it.z],scale:at?(it.scale||1)*.9:0,userData:it},`${it.ref_id||it.id}-instanced-node-${ot}-${nt}`)}),[nt,et]);return jsxRuntimeExports.jsx(Instances,{geometry:boxGeometry,material:blurryMaterial,visible:!tt,children:rt})},loader=new TextureLoader,noImageTexture=loader.load("noimage.jpeg"),noImageMaterial=new MeshStandardMaterial({...smoothness,map:noImageTexture}),transparentValue=.4,noImageTransparentMaterial=new MeshStandardMaterial({...smoothness,map:noImageTexture,transparent:!0,opacity:transparentValue}),cachedMaterials={},useMaterial=(tt,et)=>{const[nt,rt]=reactExports.useState(noImageTexture),[it,ot]=reactExports.useState(noImageMaterial);return reactExports.useEffect(()=>{const at=`${tt}${et&&"-transparent"}`;if(cachedMaterials[at]){rt(cachedMaterials[at].texture),ot(cachedMaterials[at].material);return}loader.load(tt,st=>{const lt=new MeshStandardMaterial({map:st,transparent:et,opacity:et?transparentValue:1,...smoothness});cachedMaterials[at]={texture:st,material:lt},rt(st),ot(lt)},void 0,()=>{rt(noImageTexture),ot(et?noImageTransparentMaterial:noImageMaterial)})},[tt,et]),reactExports.useEffect(()=>function(){nt.dispose(),it.dispose()},[nt,it]),it},Cube=reactExports.memo(({node:tt,hide:et,animated:nt})=>{const rt=reactExports.useRef(null),[it]=reactExports.useState(boxGeometry),ot=useSelectedNode(),at=useDataStore(ut=>ut.showSelectionGraph),st=!!ot&&tt.ref_id===ot.ref_id,lt=useMaterial(tt.image_url||"noimage.jpeg",!1);useFrame((ut,ht)=>{nt&&rt.current&&(rt.current.position.set(tt.x,tt.y,tt.z),st&&(rt.current.rotation.y+=ht*1,rt.current.rotation.x-=ht*.6))}),reactExports.useEffect(()=>function(){it.dispose()},[it]);const ct=reactExports.useMemo(()=>at&&st?20:st?(tt.scale||1)*1.2:tt.scale,[tt,st,at]);return jsxRuntimeExports.jsx(Select,{enabled:!!st,children:jsxRuntimeExports.jsx("mesh",{ref:rt,geometry:boxGeometry,material:lt,name:tt.id,position:[tt.x,tt.y,tt.z],scale:ct,userData:tt,visible:!et})})});Cube.displayName="Cube";const TypesMapper={youtube:"video",podcast:"audio",episode:"audio",clip:"audio",tweet:"twitter",person:"person",guest:"person",twitter_space:"audio"},Avatar$1=styled$4.div` background-image: ${({src:tt,type:et="audio"})=>`url(${tt}), url('/${TypesMapper[et]}_placeholder_img.png')`}; background-size: contain; background-repeat: no-repeat; @@ -6847,7 +6847,7 @@ void main() { `,Fallback=()=>jsxRuntimeExports.jsx(Html$1,{children:jsxRuntimeExports.jsx(Loader$1,{})}),Content$1=()=>{const{universeColor:tt}=useControls("universe",{universeColor:colors.black}),et=useSelectedNode(),nt=reactExports.useMemo(()=>et!=null&&et.node_type?getNodeColorByType(et.node_type):outlineEffectColor,[et]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("color",{args:[tt],attach:"background"}),jsxRuntimeExports.jsx(Lights,{}),jsxRuntimeExports.jsx(Controls,{}),jsxRuntimeExports.jsxs(Selection$2,{children:[jsxRuntimeExports.jsxs(EffectComposer,{autoClear:!1,multisampling:8,children:[jsxRuntimeExports.jsx(Vignette,{darkness:.7,eskil:!1,offset:.05}),jsxRuntimeExports.jsx(Bloom,{luminanceThreshold:1,mipmapBlur:!0,resolutionX:Resolution.AUTO_SIZE,resolutionY:Resolution.AUTO_SIZE}),jsxRuntimeExports.jsx(Outline,{blendFunction:BlendFunction.SCREEN,blur:!0,edgeStrength:4,hiddenEdgeColor:nt,visibleEdgeColor:nt})]}),jsxRuntimeExports.jsx(Graph,{})]})]})};let wheelEventTimeout=null;const cameraProps={aspect:window.innerWidth/window.innerHeight,far:3e4,near:1,position:[initialCameraPosition.x,initialCameraPosition.y,initialCameraPosition.z]},_Universe=()=>{const[tt,et,nt]=[useControlStore(at=>at.setIsUserScrollingOnHtmlPanel),useControlStore(at=>at.setIsUserScrolling),useControlStore(at=>at.setUserMovedCamera)],rt=useDataStore(at=>at.isFetching),it=reactExports.useCallback(at=>{var ct;const{target:st}=at,{offsetParent:lt}=st;wheelEventTimeout&&clearTimeout(wheelEventTimeout),(ct=lt==null?void 0:lt.classList)!=null&&ct.contains("html-panel")&<.clientHeight{et(!1),tt(!1)},200)},[et,tt,nt]),ot=reactExports.useCallback(at=>addToGlobalForE2e(at,"threeState"),[]);return jsxRuntimeExports.jsxs(Wrapper$m,{children:[jsxRuntimeExports.jsx(Overlay,{}),jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:null,children:jsxRuntimeExports.jsxs(Canvas$1,{camera:cameraProps,id:"universe-canvas",onCreated:ot,onWheel:it,children:[isDevelopment&&jsxRuntimeExports.jsx(Perf,{position:"top-right"}),jsxRuntimeExports.jsxs(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx(Fallback,{}),children:[jsxRuntimeExports.jsx(Preload,{}),jsxRuntimeExports.jsx(AdaptiveDpr,{}),jsxRuntimeExports.jsx(AdaptiveEvents,{}),jsxRuntimeExports.jsx(Content$1,{})]})]})}),rt&&jsxRuntimeExports.jsx(Preloader,{fullSize:!1})]})},Wrapper$m=styled$4(Flex)` flex: 1 1 100%; position: relative; -`,Universe=reactExports.memo(_Universe),defaultData$3={askedQuestions:null,askedQuestionsAnswers:null,hasQuestionInProgress:!1,hasTeachingInProgress:!1,hasInstagraphInProgress:!1,teachMeAnswer:null,instgraphAnswser:null},useTeachStore=react(tt=>({...defaultData$3,setAskedQuestion:et=>tt(nt=>({askedQuestions:[...nt.askedQuestions||[],et],hasQuestionInProgress:!0})),setAskedQuestionAnswer:et=>tt(nt=>({askedQuestionsAnswers:[...nt.askedQuestionsAnswers||[],et],hasQuestionInProgress:!1})),setHasQuestionInProgress:et=>tt({hasQuestionInProgress:et}),setHasTeachingInProgress:et=>tt({hasTeachingInProgress:et}),setHasInstagraphInProgress:et=>tt({hasInstagraphInProgress:et}),setTeachMeAnswer:et=>tt({hasTeachingInProgress:!1,teachMeAnswer:et}),setInstagraphAnswer:et=>{var nt,rt,it,ot;(nt=et==null?void 0:et.instagraph)!=null&&nt.edges&&((rt=et==null?void 0:et.instagraph)!=null&&rt.nodes)&&tt({hasInstagraphInProgress:!1,instgraphAnswser:{edges:(it=et==null?void 0:et.instagraph)==null?void 0:it.edges,nodes:(ot=et==null?void 0:et.instagraph)==null?void 0:ot.nodes}})}})),version="0.1.89",StyledTableCell=styled$4(TableCell$1)` +`,Universe=reactExports.memo(_Universe),defaultData$3={askedQuestions:null,askedQuestionsAnswers:null,hasQuestionInProgress:!1,hasTeachingInProgress:!1,hasInstagraphInProgress:!1,teachMeAnswer:null,instgraphAnswser:null},useTeachStore=react(tt=>({...defaultData$3,setAskedQuestion:et=>tt(nt=>({askedQuestions:[...nt.askedQuestions||[],et],hasQuestionInProgress:!0})),setAskedQuestionAnswer:et=>tt(nt=>({askedQuestionsAnswers:[...nt.askedQuestionsAnswers||[],et],hasQuestionInProgress:!1})),setHasQuestionInProgress:et=>tt({hasQuestionInProgress:et}),setHasTeachingInProgress:et=>tt({hasTeachingInProgress:et}),setHasInstagraphInProgress:et=>tt({hasInstagraphInProgress:et}),setTeachMeAnswer:et=>tt({hasTeachingInProgress:!1,teachMeAnswer:et}),setInstagraphAnswer:et=>{var nt,rt,it,ot;(nt=et==null?void 0:et.instagraph)!=null&&nt.edges&&((rt=et==null?void 0:et.instagraph)!=null&&rt.nodes)&&tt({hasInstagraphInProgress:!1,instgraphAnswser:{edges:(it=et==null?void 0:et.instagraph)==null?void 0:it.edges,nodes:(ot=et==null?void 0:et.instagraph)==null?void 0:ot.nodes}})}})),version="0.1.90",StyledTableCell=styled$4(TableCell$1)` && { color: ${colors.white}; border: none; @@ -6898,7 +6898,7 @@ void main() { margin-left: 16px; } `,Heading$4=styled$4(Flex)` - margin-bottom: 26px; + margin-bottom: 16px; padding: 0 36px; ${Text$3} { margin-bottom: 0; @@ -7038,32 +7038,66 @@ void main() { margin-left: 8px; `,EditButton$1=styled$4(Button$2)` margin-left: auto; -`,Pill=styled$4(Flex).attrs({align:"center",direction:"row",grow:0,justify:"center",shrink:0})` - border-radius: 20px; - color: ${colors.primaryText1}; - border: 2px solid ${colors.white}; +`,CheckIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 10 7",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M3.08467 5.34482L8.02842 0.401074C8.14508 0.284408 8.28363 0.226074 8.44404 0.226074C8.60446 0.226074 8.743 0.284408 8.85967 0.401074C8.97633 0.517741 9.03467 0.656283 9.03467 0.816699C9.03467 0.977116 8.97633 1.11566 8.85967 1.23232L3.493 6.59899C3.37633 6.71566 3.24022 6.77399 3.08467 6.77399C2.92911 6.77399 2.793 6.71566 2.67633 6.59899L0.168 4.09066C0.0513333 3.97399 -0.00456944 3.83545 0.000291667 3.67503C0.00515278 3.51462 0.0659167 3.37607 0.182583 3.25941C0.29925 3.14274 0.437792 3.08441 0.598208 3.08441C0.758625 3.08441 0.897167 3.14274 1.01383 3.25941L3.08467 5.34482Z",fill:"currentColor"})}),ChevronDownIcon=tt=>jsxRuntimeExports.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2337_2483",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"14",height:"14",children:jsxRuntimeExports.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_2337_2483)",children:jsxRuntimeExports.jsx("path",{d:"M7.00001 8.72074C6.92223 8.72074 6.84931 8.70858 6.78126 8.68428C6.7132 8.65997 6.65001 8.61865 6.59167 8.56032L3.90834 5.87699C3.8014 5.77004 3.74792 5.63393 3.74792 5.46865C3.74792 5.30337 3.8014 5.16726 3.90834 5.06032C4.01529 4.95337 4.1514 4.8999 4.31667 4.8999C4.48195 4.8999 4.61806 4.95337 4.72501 5.06032L7.00001 7.33532L9.27501 5.06032C9.38195 4.95337 9.51806 4.8999 9.68334 4.8999C9.84862 4.8999 9.98473 4.95337 10.0917 5.06032C10.1986 5.16726 10.2521 5.30337 10.2521 5.46865C10.2521 5.63393 10.1986 5.77004 10.0917 5.87699L7.40834 8.56032C7.35001 8.61865 7.28681 8.65997 7.21876 8.68428C7.1507 8.70858 7.07779 8.72074 7.00001 8.72074Z",fill:"currentColor"})})]}),ChevronUpIcon=tt=>jsxRuntimeExports.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2337_2442",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"14",height:"14",children:jsxRuntimeExports.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_2337_2442)",children:jsxRuntimeExports.jsx("path",{d:"M7.00001 6.28532L4.72501 8.56032C4.61806 8.66726 4.48195 8.72074 4.31667 8.72074C4.1514 8.72074 4.01529 8.66726 3.90834 8.56032C3.8014 8.45337 3.74792 8.31726 3.74792 8.15199C3.74792 7.98671 3.8014 7.8506 3.90834 7.74365L6.59167 5.06032C6.65001 5.00199 6.7132 4.96067 6.78126 4.93636C6.84931 4.91206 6.92223 4.8999 7.00001 4.8999C7.07779 4.8999 7.1507 4.91206 7.21876 4.93636C7.28681 4.96067 7.35001 5.00199 7.40834 5.06032L10.0917 7.74365C10.1986 7.8506 10.2521 7.98671 10.2521 8.15199C10.2521 8.31726 10.1986 8.45337 10.0917 8.56032C9.98473 8.66726 9.84862 8.72074 9.68334 8.72074C9.51806 8.72074 9.38195 8.66726 9.27501 8.56032L7.00001 6.28532Z",fill:"currentColor"})})]}),options$1={[DEFAULT$1]:"Default",[DATE$1]:"Date",[EDGES]:"Edges Count"},Filter=({onChangeFilter:tt,currentFilter:et})=>{const[nt,rt]=reactExports.useState(null),it=st=>{rt(st.currentTarget)},ot=()=>{rt(null)},at=st=>{tt(st),ot()};return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(Action$1,{onClick:it,children:[jsxRuntimeExports.jsx("div",{className:"text",children:"Sort By"}),jsxRuntimeExports.jsx("div",{className:"value",children:options$1[et]}),jsxRuntimeExports.jsx("div",{className:"icon",children:nt?jsxRuntimeExports.jsx(ChevronUpIcon,{}):jsxRuntimeExports.jsx(ChevronDownIcon,{})})]}),jsxRuntimeExports.jsx(StyledPopover$1,{anchorEl:nt,anchorOrigin:{vertical:"bottom",horizontal:"left"},anchorPosition:{top:62,left:0},onClose:ot,open:!!nt,transformOrigin:{vertical:"top",horizontal:"left"},children:jsxRuntimeExports.jsx(FormControl$1,{children:Object.keys(options$1).map(st=>jsxRuntimeExports.jsxs(MenuItem$1,{className:clsx$1({active:st===et}),onClick:()=>at(st),children:[jsxRuntimeExports.jsx("span",{className:"icon",children:st===et?jsxRuntimeExports.jsx(CheckIcon,{}):null}),jsxRuntimeExports.jsx("span",{children:options$1[st]})]},st))})})]})},Action$1=styled$4(Flex).attrs({direction:"row",align:"center"})` cursor: pointer; - font-size: 12px; + flex-grow: 1; + color: ${colors.GRAY6}; + font-family: Barlow; + font-size: 13px; + font-style: normal; font-weight: 500; - line-height: 14px; - margin-right: 10px; - - opacity: ${({disabled:tt})=>tt?"0.7":"1"}; - - padding: 10px 20px; + padding: 0 8px; + .value, + .icon { + color: ${colors.white}; + } -${({disabled:tt})=>tt&&Ae` - cursor: none; - opacity: 0.5; - `} + .value { + margin: 0 8px 0 4px; + } +`,MenuItem$1=styled$4(Flex).attrs({direction:"row",align:"center"})` + font-family: Barlow; + font-size: 13px; + font-style: normal; + font-weight: 500; + color: ${colors.GRAY3}; + height: 27px; + cursor: pointer; + &.active { + color: ${colors.white}; + } + &:hover { + color: ${colors.white}; + } + .icon { + margin-right: 8px; + width: 9px; + font-size: 10px; + } +`,StyledPopover$1=styled$4(Popover$1)` + && { + z-index: 99999; } - &:hover { - background: ${({selected:tt})=>tt?colors.gray300:colors.gray200}; + .MuiPaper-root { + background: ${colors.BUTTON1}; + min-width: 149px; + padding: 16px; + color: ${colors.GRAY3}; + box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.2); + border-radius: 6px; } -} -`,Table=({data:tt,showMuted:et})=>{const nt=async(rt,it)=>{if(tt!=null&&tt.length)try{await putNodeData({ref_id:rt,node_name:"muted_topic",node_value:it})}catch(ot){console.warn(ot)}};return tt!=null&&tt.length?jsxRuntimeExports.jsxs(MaterialTable,{component:"table",children:[jsxRuntimeExports.jsx(StyledTableHead,{children:jsxRuntimeExports.jsxs(TableRow$1,{component:"tr",children:[jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"}),jsxRuntimeExports.jsx(StyledTableCell,{children:"Type"}),jsxRuntimeExports.jsx(StyledTableCell,{children:et?"Unmute":"Mute"})]})}),(tt==null?void 0:tt.length)&&jsxRuntimeExports.jsx("tbody",{children:tt==null?void 0:tt.map(rt=>jsxRuntimeExports.jsxs(StyledTableRow,{children:[jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"}),jsxRuntimeExports.jsx(StyledTableCell,{children:rt.topic}),jsxRuntimeExports.jsx(StyledTableCell,{className:"cell-center",children:jsxRuntimeExports.jsx(Flex,{direction:"row",justify:"space-between",children:jsxRuntimeExports.jsx("div",{className:"approve-wrapper",children:rt.muted_topic?jsxRuntimeExports.jsx(IconWrapper$2,{className:"centered",onClick:()=>nt(rt.ref_id,!1),children:jsxRuntimeExports.jsx(MdCheckCircle,{color:colors.primaryGreen,fontSize:24})}):jsxRuntimeExports.jsx(IconWrapper$2,{className:"centered",onClick:()=>nt(rt.ref_id,!0),children:jsxRuntimeExports.jsx(MdCancel,{color:colors.primaryRed,fontSize:24})})})})}),jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"})]},rt.topic))})]}):jsxRuntimeExports.jsxs(Flex,{children:[jsxRuntimeExports.jsx(Text$3,{children:"There is not any results for selected filters"}),jsxRuntimeExports.jsx(FilterOffIcon,{})]})},IconWrapper$2=styled$4(Flex)` +`;//! moment.js +//! version : 2.29.4 +//! authors : Tim Wood, Iskren Chernev, Moment.js contributors +//! license : MIT +//! momentjs.com +var hookCallback;function hooks(){return hookCallback.apply(null,arguments)}function setHookCallback(tt){hookCallback=tt}function isArray$d(tt){return tt instanceof Array||Object.prototype.toString.call(tt)==="[object Array]"}function isObject$6(tt){return tt!=null&&Object.prototype.toString.call(tt)==="[object Object]"}function hasOwnProp(tt,et){return Object.prototype.hasOwnProperty.call(tt,et)}function isObjectEmpty(tt){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(tt).length===0;var et;for(et in tt)if(hasOwnProp(tt,et))return!1;return!0}function isUndefined(tt){return tt===void 0}function isNumber$3(tt){return typeof tt=="number"||Object.prototype.toString.call(tt)==="[object Number]"}function isDate(tt){return tt instanceof Date||Object.prototype.toString.call(tt)==="[object Date]"}function map$5(tt,et){var nt=[],rt,it=tt.length;for(rt=0;rt>>0,rt;for(rt=0;rt0)for(nt=0;nt=0;return(ot?nt?"+":"":"-")+Math.pow(10,Math.max(0,it)).toString().substr(1)+rt}var formattingTokens=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,localFormattingTokens=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,formatFunctions={},formatTokenFunctions={};function addFormatToken(tt,et,nt,rt){var it=rt;typeof rt=="string"&&(it=function(){return this[rt]()}),tt&&(formatTokenFunctions[tt]=it),et&&(formatTokenFunctions[et[0]]=function(){return zeroFill(it.apply(this,arguments),et[1],et[2])}),nt&&(formatTokenFunctions[nt]=function(){return this.localeData().ordinal(it.apply(this,arguments),tt)})}function removeFormattingTokens(tt){return tt.match(/\[[\s\S]/)?tt.replace(/^\[|\]$/g,""):tt.replace(/\\/g,"")}function makeFormatFunction(tt){var et=tt.match(formattingTokens),nt,rt;for(nt=0,rt=et.length;nt=0&&localFormattingTokens.test(tt);)tt=tt.replace(localFormattingTokens,rt),localFormattingTokens.lastIndex=0,nt-=1;return tt}var defaultLongDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function longDateFormat(tt){var et=this._longDateFormat[tt],nt=this._longDateFormat[tt.toUpperCase()];return et||!nt?et:(this._longDateFormat[tt]=nt.match(formattingTokens).map(function(rt){return rt==="MMMM"||rt==="MM"||rt==="DD"||rt==="dddd"?rt.slice(1):rt}).join(""),this._longDateFormat[tt])}var defaultInvalidDate="Invalid date";function invalidDate(){return this._invalidDate}var defaultOrdinal="%d",defaultDayOfMonthOrdinalParse=/\d{1,2}/;function ordinal$1(tt){return this._ordinal.replace("%d",tt)}var defaultRelativeTime={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function relativeTime(tt,et,nt,rt){var it=this._relativeTime[nt];return isFunction$1(it)?it(tt,et,nt,rt):it.replace(/%d/i,tt)}function pastFuture(tt,et){var nt=this._relativeTime[tt>0?"future":"past"];return isFunction$1(nt)?nt(et):nt.replace(/%s/i,et)}var aliases={};function addUnitAlias(tt,et){var nt=tt.toLowerCase();aliases[nt]=aliases[nt+"s"]=aliases[et]=tt}function normalizeUnits(tt){return typeof tt=="string"?aliases[tt]||aliases[tt.toLowerCase()]:void 0}function normalizeObjectUnits(tt){var et={},nt,rt;for(rt in tt)hasOwnProp(tt,rt)&&(nt=normalizeUnits(rt),nt&&(et[nt]=tt[rt]));return et}var priorities={};function addUnitPriority(tt,et){priorities[tt]=et}function getPrioritizedUnits(tt){var et=[],nt;for(nt in tt)hasOwnProp(tt,nt)&&et.push({unit:nt,priority:priorities[nt]});return et.sort(function(rt,it){return rt.priority-it.priority}),et}function isLeapYear(tt){return tt%4===0&&tt%100!==0||tt%400===0}function absFloor(tt){return tt<0?Math.ceil(tt)||0:Math.floor(tt)}function toInt(tt){var et=+tt,nt=0;return et!==0&&isFinite(et)&&(nt=absFloor(et)),nt}function makeGetSet(tt,et){return function(nt){return nt!=null?(set$1$1(this,tt,nt),hooks.updateOffset(this,et),this):get$3(this,tt)}}function get$3(tt,et){return tt.isValid()?tt._d["get"+(tt._isUTC?"UTC":"")+et]():NaN}function set$1$1(tt,et,nt){tt.isValid()&&!isNaN(nt)&&(et==="FullYear"&&isLeapYear(tt.year())&&tt.month()===1&&tt.date()===29?(nt=toInt(nt),tt._d["set"+(tt._isUTC?"UTC":"")+et](nt,tt.month(),daysInMonth(nt,tt.month()))):tt._d["set"+(tt._isUTC?"UTC":"")+et](nt))}function stringGet(tt){return tt=normalizeUnits(tt),isFunction$1(this[tt])?this[tt]():this}function stringSet(tt,et){if(typeof tt=="object"){tt=normalizeObjectUnits(tt);var nt=getPrioritizedUnits(tt),rt,it=nt.length;for(rt=0;rt68?1900:2e3)};var getSetYear=makeGetSet("FullYear",!0);function getIsLeapYear(){return isLeapYear(this.year())}function createDate(tt,et,nt,rt,it,ot,at){var st;return tt<100&&tt>=0?(st=new Date(tt+400,et,nt,rt,it,ot,at),isFinite(st.getFullYear())&&st.setFullYear(tt)):st=new Date(tt,et,nt,rt,it,ot,at),st}function createUTCDate(tt){var et,nt;return tt<100&&tt>=0?(nt=Array.prototype.slice.call(arguments),nt[0]=tt+400,et=new Date(Date.UTC.apply(null,nt)),isFinite(et.getUTCFullYear())&&et.setUTCFullYear(tt)):et=new Date(Date.UTC.apply(null,arguments)),et}function firstWeekOffset(tt,et,nt){var rt=7+et-nt,it=(7+createUTCDate(tt,0,rt).getUTCDay()-et)%7;return-it+rt-1}function dayOfYearFromWeeks(tt,et,nt,rt,it){var ot=(7+nt-rt)%7,at=firstWeekOffset(tt,rt,it),st=1+7*(et-1)+ot+at,lt,ct;return st<=0?(lt=tt-1,ct=daysInYear(lt)+st):st>daysInYear(tt)?(lt=tt+1,ct=st-daysInYear(tt)):(lt=tt,ct=st),{year:lt,dayOfYear:ct}}function weekOfYear(tt,et,nt){var rt=firstWeekOffset(tt.year(),et,nt),it=Math.floor((tt.dayOfYear()-rt-1)/7)+1,ot,at;return it<1?(at=tt.year()-1,ot=it+weeksInYear(at,et,nt)):it>weeksInYear(tt.year(),et,nt)?(ot=it-weeksInYear(tt.year(),et,nt),at=tt.year()+1):(at=tt.year(),ot=it),{week:ot,year:at}}function weeksInYear(tt,et,nt){var rt=firstWeekOffset(tt,et,nt),it=firstWeekOffset(tt+1,et,nt);return(daysInYear(tt)-rt+it)/7}addFormatToken("w",["ww",2],"wo","week");addFormatToken("W",["WW",2],"Wo","isoWeek");addUnitAlias("week","w");addUnitAlias("isoWeek","W");addUnitPriority("week",5);addUnitPriority("isoWeek",5);addRegexToken("w",match1to2);addRegexToken("ww",match1to2,match2);addRegexToken("W",match1to2);addRegexToken("WW",match1to2,match2);addWeekParseToken(["w","ww","W","WW"],function(tt,et,nt,rt){et[rt.substr(0,1)]=toInt(tt)});function localeWeek(tt){return weekOfYear(tt,this._week.dow,this._week.doy).week}var defaultLocaleWeek={dow:0,doy:6};function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(tt){var et=this.localeData().week(this);return tt==null?et:this.add((tt-et)*7,"d")}function getSetISOWeek(tt){var et=weekOfYear(this,1,4).week;return tt==null?et:this.add((tt-et)*7,"d")}addFormatToken("d",0,"do","day");addFormatToken("dd",0,0,function(tt){return this.localeData().weekdaysMin(this,tt)});addFormatToken("ddd",0,0,function(tt){return this.localeData().weekdaysShort(this,tt)});addFormatToken("dddd",0,0,function(tt){return this.localeData().weekdays(this,tt)});addFormatToken("e",0,0,"weekday");addFormatToken("E",0,0,"isoWeekday");addUnitAlias("day","d");addUnitAlias("weekday","e");addUnitAlias("isoWeekday","E");addUnitPriority("day",11);addUnitPriority("weekday",11);addUnitPriority("isoWeekday",11);addRegexToken("d",match1to2);addRegexToken("e",match1to2);addRegexToken("E",match1to2);addRegexToken("dd",function(tt,et){return et.weekdaysMinRegex(tt)});addRegexToken("ddd",function(tt,et){return et.weekdaysShortRegex(tt)});addRegexToken("dddd",function(tt,et){return et.weekdaysRegex(tt)});addWeekParseToken(["dd","ddd","dddd"],function(tt,et,nt,rt){var it=nt._locale.weekdaysParse(tt,rt,nt._strict);it!=null?et.d=it:getParsingFlags(nt).invalidWeekday=tt});addWeekParseToken(["d","e","E"],function(tt,et,nt,rt){et[rt]=toInt(tt)});function parseWeekday(tt,et){return typeof tt!="string"?tt:isNaN(tt)?(tt=et.weekdaysParse(tt),typeof tt=="number"?tt:null):parseInt(tt,10)}function parseIsoWeekday(tt,et){return typeof tt=="string"?et.weekdaysParse(tt)%7||7:isNaN(tt)?null:tt}function shiftWeekdays(tt,et){return tt.slice(et,7).concat(tt.slice(0,et))}var defaultLocaleWeekdays="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),defaultLocaleWeekdaysShort="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),defaultLocaleWeekdaysMin="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),defaultWeekdaysRegex=matchWord,defaultWeekdaysShortRegex=matchWord,defaultWeekdaysMinRegex=matchWord;function localeWeekdays(tt,et){var nt=isArray$d(this._weekdays)?this._weekdays:this._weekdays[tt&&tt!==!0&&this._weekdays.isFormat.test(et)?"format":"standalone"];return tt===!0?shiftWeekdays(nt,this._week.dow):tt?nt[tt.day()]:nt}function localeWeekdaysShort(tt){return tt===!0?shiftWeekdays(this._weekdaysShort,this._week.dow):tt?this._weekdaysShort[tt.day()]:this._weekdaysShort}function localeWeekdaysMin(tt){return tt===!0?shiftWeekdays(this._weekdaysMin,this._week.dow):tt?this._weekdaysMin[tt.day()]:this._weekdaysMin}function handleStrictParse$1(tt,et,nt){var rt,it,ot,at=tt.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],rt=0;rt<7;++rt)ot=createUTC([2e3,1]).day(rt),this._minWeekdaysParse[rt]=this.weekdaysMin(ot,"").toLocaleLowerCase(),this._shortWeekdaysParse[rt]=this.weekdaysShort(ot,"").toLocaleLowerCase(),this._weekdaysParse[rt]=this.weekdays(ot,"").toLocaleLowerCase();return nt?et==="dddd"?(it=indexOf.call(this._weekdaysParse,at),it!==-1?it:null):et==="ddd"?(it=indexOf.call(this._shortWeekdaysParse,at),it!==-1?it:null):(it=indexOf.call(this._minWeekdaysParse,at),it!==-1?it:null):et==="dddd"?(it=indexOf.call(this._weekdaysParse,at),it!==-1||(it=indexOf.call(this._shortWeekdaysParse,at),it!==-1)?it:(it=indexOf.call(this._minWeekdaysParse,at),it!==-1?it:null)):et==="ddd"?(it=indexOf.call(this._shortWeekdaysParse,at),it!==-1||(it=indexOf.call(this._weekdaysParse,at),it!==-1)?it:(it=indexOf.call(this._minWeekdaysParse,at),it!==-1?it:null)):(it=indexOf.call(this._minWeekdaysParse,at),it!==-1||(it=indexOf.call(this._weekdaysParse,at),it!==-1)?it:(it=indexOf.call(this._shortWeekdaysParse,at),it!==-1?it:null))}function localeWeekdaysParse(tt,et,nt){var rt,it,ot;if(this._weekdaysParseExact)return handleStrictParse$1.call(this,tt,et,nt);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),rt=0;rt<7;rt++){if(it=createUTC([2e3,1]).day(rt),nt&&!this._fullWeekdaysParse[rt]&&(this._fullWeekdaysParse[rt]=new RegExp("^"+this.weekdays(it,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[rt]=new RegExp("^"+this.weekdaysShort(it,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[rt]=new RegExp("^"+this.weekdaysMin(it,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[rt]||(ot="^"+this.weekdays(it,"")+"|^"+this.weekdaysShort(it,"")+"|^"+this.weekdaysMin(it,""),this._weekdaysParse[rt]=new RegExp(ot.replace(".",""),"i")),nt&&et==="dddd"&&this._fullWeekdaysParse[rt].test(tt))return rt;if(nt&&et==="ddd"&&this._shortWeekdaysParse[rt].test(tt))return rt;if(nt&&et==="dd"&&this._minWeekdaysParse[rt].test(tt))return rt;if(!nt&&this._weekdaysParse[rt].test(tt))return rt}}function getSetDayOfWeek(tt){if(!this.isValid())return tt!=null?this:NaN;var et=this._isUTC?this._d.getUTCDay():this._d.getDay();return tt!=null?(tt=parseWeekday(tt,this.localeData()),this.add(tt-et,"d")):et}function getSetLocaleDayOfWeek(tt){if(!this.isValid())return tt!=null?this:NaN;var et=(this.day()+7-this.localeData()._week.dow)%7;return tt==null?et:this.add(tt-et,"d")}function getSetISODayOfWeek(tt){if(!this.isValid())return tt!=null?this:NaN;if(tt!=null){var et=parseIsoWeekday(tt,this.localeData());return this.day(this.day()%7?et:et-7)}else return this.day()||7}function weekdaysRegex(tt){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),tt?this._weekdaysStrictRegex:this._weekdaysRegex):(hasOwnProp(this,"_weekdaysRegex")||(this._weekdaysRegex=defaultWeekdaysRegex),this._weekdaysStrictRegex&&tt?this._weekdaysStrictRegex:this._weekdaysRegex)}function weekdaysShortRegex(tt){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),tt?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(hasOwnProp(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=defaultWeekdaysShortRegex),this._weekdaysShortStrictRegex&&tt?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function weekdaysMinRegex(tt){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),tt?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(hasOwnProp(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=defaultWeekdaysMinRegex),this._weekdaysMinStrictRegex&&tt?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function computeWeekdaysParse(){function tt(ut,ht){return ht.length-ut.length}var et=[],nt=[],rt=[],it=[],ot,at,st,lt,ct;for(ot=0;ot<7;ot++)at=createUTC([2e3,1]).day(ot),st=regexEscape(this.weekdaysMin(at,"")),lt=regexEscape(this.weekdaysShort(at,"")),ct=regexEscape(this.weekdays(at,"")),et.push(st),nt.push(lt),rt.push(ct),it.push(st),it.push(lt),it.push(ct);et.sort(tt),nt.sort(tt),rt.sort(tt),it.sort(tt),this._weekdaysRegex=new RegExp("^("+it.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+rt.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+nt.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+et.join("|")+")","i")}function hFormat(){return this.hours()%12||12}function kFormat(){return this.hours()||24}addFormatToken("H",["HH",2],0,"hour");addFormatToken("h",["hh",2],0,hFormat);addFormatToken("k",["kk",2],0,kFormat);addFormatToken("hmm",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)});addFormatToken("hmmss",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});addFormatToken("Hmm",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)});addFormatToken("Hmmss",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});function meridiem(tt,et){addFormatToken(tt,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),et)})}meridiem("a",!0);meridiem("A",!1);addUnitAlias("hour","h");addUnitPriority("hour",13);function matchMeridiem(tt,et){return et._meridiemParse}addRegexToken("a",matchMeridiem);addRegexToken("A",matchMeridiem);addRegexToken("H",match1to2);addRegexToken("h",match1to2);addRegexToken("k",match1to2);addRegexToken("HH",match1to2,match2);addRegexToken("hh",match1to2,match2);addRegexToken("kk",match1to2,match2);addRegexToken("hmm",match3to4);addRegexToken("hmmss",match5to6);addRegexToken("Hmm",match3to4);addRegexToken("Hmmss",match5to6);addParseToken(["H","HH"],HOUR);addParseToken(["k","kk"],function(tt,et,nt){var rt=toInt(tt);et[HOUR]=rt===24?0:rt});addParseToken(["a","A"],function(tt,et,nt){nt._isPm=nt._locale.isPM(tt),nt._meridiem=tt});addParseToken(["h","hh"],function(tt,et,nt){et[HOUR]=toInt(tt),getParsingFlags(nt).bigHour=!0});addParseToken("hmm",function(tt,et,nt){var rt=tt.length-2;et[HOUR]=toInt(tt.substr(0,rt)),et[MINUTE]=toInt(tt.substr(rt)),getParsingFlags(nt).bigHour=!0});addParseToken("hmmss",function(tt,et,nt){var rt=tt.length-4,it=tt.length-2;et[HOUR]=toInt(tt.substr(0,rt)),et[MINUTE]=toInt(tt.substr(rt,2)),et[SECOND]=toInt(tt.substr(it)),getParsingFlags(nt).bigHour=!0});addParseToken("Hmm",function(tt,et,nt){var rt=tt.length-2;et[HOUR]=toInt(tt.substr(0,rt)),et[MINUTE]=toInt(tt.substr(rt))});addParseToken("Hmmss",function(tt,et,nt){var rt=tt.length-4,it=tt.length-2;et[HOUR]=toInt(tt.substr(0,rt)),et[MINUTE]=toInt(tt.substr(rt,2)),et[SECOND]=toInt(tt.substr(it))});function localeIsPM(tt){return(tt+"").toLowerCase().charAt(0)==="p"}var defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i,getSetHour=makeGetSet("Hours",!0);function localeMeridiem(tt,et,nt){return tt>11?nt?"pm":"PM":nt?"am":"AM"}var baseConfig={calendar:defaultCalendar,longDateFormat:defaultLongDateFormat,invalidDate:defaultInvalidDate,ordinal:defaultOrdinal,dayOfMonthOrdinalParse:defaultDayOfMonthOrdinalParse,relativeTime:defaultRelativeTime,months:defaultLocaleMonths,monthsShort:defaultLocaleMonthsShort,week:defaultLocaleWeek,weekdays:defaultLocaleWeekdays,weekdaysMin:defaultLocaleWeekdaysMin,weekdaysShort:defaultLocaleWeekdaysShort,meridiemParse:defaultLocaleMeridiemParse},locales={},localeFamilies={},globalLocale;function commonPrefix(tt,et){var nt,rt=Math.min(tt.length,et.length);for(nt=0;nt0;){if(it=loadLocale(ot.slice(0,nt).join("-")),it)return it;if(rt&&rt.length>=nt&&commonPrefix(ot,rt)>=nt-1)break;nt--}et++}return globalLocale}function isLocaleNameSane(tt){return tt.match("^[^/\\\\]*$")!=null}function loadLocale(tt){var et=null,nt;if(locales[tt]===void 0&&typeof module<"u"&&module&&module.exports&&isLocaleNameSane(tt))try{et=globalLocale._abbr,nt=require,nt("./locale/"+tt),getSetGlobalLocale(et)}catch{locales[tt]=null}return locales[tt]}function getSetGlobalLocale(tt,et){var nt;return tt&&(isUndefined(et)?nt=getLocale(tt):nt=defineLocale(tt,et),nt?globalLocale=nt:typeof console<"u"&&console.warn&&console.warn("Locale "+tt+" not found. Did you forget to load it?")),globalLocale._abbr}function defineLocale(tt,et){if(et!==null){var nt,rt=baseConfig;if(et.abbr=tt,locales[tt]!=null)deprecateSimple("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),rt=locales[tt]._config;else if(et.parentLocale!=null)if(locales[et.parentLocale]!=null)rt=locales[et.parentLocale]._config;else if(nt=loadLocale(et.parentLocale),nt!=null)rt=nt._config;else return localeFamilies[et.parentLocale]||(localeFamilies[et.parentLocale]=[]),localeFamilies[et.parentLocale].push({name:tt,config:et}),null;return locales[tt]=new Locale(mergeConfigs(rt,et)),localeFamilies[tt]&&localeFamilies[tt].forEach(function(it){defineLocale(it.name,it.config)}),getSetGlobalLocale(tt),locales[tt]}else return delete locales[tt],null}function updateLocale(tt,et){if(et!=null){var nt,rt,it=baseConfig;locales[tt]!=null&&locales[tt].parentLocale!=null?locales[tt].set(mergeConfigs(locales[tt]._config,et)):(rt=loadLocale(tt),rt!=null&&(it=rt._config),et=mergeConfigs(it,et),rt==null&&(et.abbr=tt),nt=new Locale(et),nt.parentLocale=locales[tt],locales[tt]=nt),getSetGlobalLocale(tt)}else locales[tt]!=null&&(locales[tt].parentLocale!=null?(locales[tt]=locales[tt].parentLocale,tt===getSetGlobalLocale()&&getSetGlobalLocale(tt)):locales[tt]!=null&&delete locales[tt]);return locales[tt]}function getLocale(tt){var et;if(tt&&tt._locale&&tt._locale._abbr&&(tt=tt._locale._abbr),!tt)return globalLocale;if(!isArray$d(tt)){if(et=loadLocale(tt),et)return et;tt=[tt]}return chooseLocale(tt)}function listLocales(){return keys$4(locales)}function checkOverflow(tt){var et,nt=tt._a;return nt&&getParsingFlags(tt).overflow===-2&&(et=nt[MONTH]<0||nt[MONTH]>11?MONTH:nt[DATE]<1||nt[DATE]>daysInMonth(nt[YEAR],nt[MONTH])?DATE:nt[HOUR]<0||nt[HOUR]>24||nt[HOUR]===24&&(nt[MINUTE]!==0||nt[SECOND]!==0||nt[MILLISECOND]!==0)?HOUR:nt[MINUTE]<0||nt[MINUTE]>59?MINUTE:nt[SECOND]<0||nt[SECOND]>59?SECOND:nt[MILLISECOND]<0||nt[MILLISECOND]>999?MILLISECOND:-1,getParsingFlags(tt)._overflowDayOfYear&&(etDATE)&&(et=DATE),getParsingFlags(tt)._overflowWeeks&&et===-1&&(et=WEEK),getParsingFlags(tt)._overflowWeekday&&et===-1&&(et=WEEKDAY),getParsingFlags(tt).overflow=et),tt}var extendedIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,basicIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,tzRegex=/Z|[+-]\d\d(?::?\d\d)?/,isoDates=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],isoTimes=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],aspNetJsonRegex=/^\/?Date\((-?\d+)/i,rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,obsOffsets={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function configFromISO(tt){var et,nt,rt=tt._i,it=extendedIsoRegex.exec(rt)||basicIsoRegex.exec(rt),ot,at,st,lt,ct=isoDates.length,ut=isoTimes.length;if(it){for(getParsingFlags(tt).iso=!0,et=0,nt=ct;etdaysInYear(at)||tt._dayOfYear===0)&&(getParsingFlags(tt)._overflowDayOfYear=!0),nt=createUTCDate(at,0,tt._dayOfYear),tt._a[MONTH]=nt.getUTCMonth(),tt._a[DATE]=nt.getUTCDate()),et=0;et<3&&tt._a[et]==null;++et)tt._a[et]=rt[et]=it[et];for(;et<7;et++)tt._a[et]=rt[et]=tt._a[et]==null?et===2?1:0:tt._a[et];tt._a[HOUR]===24&&tt._a[MINUTE]===0&&tt._a[SECOND]===0&&tt._a[MILLISECOND]===0&&(tt._nextDay=!0,tt._a[HOUR]=0),tt._d=(tt._useUTC?createUTCDate:createDate).apply(null,rt),ot=tt._useUTC?tt._d.getUTCDay():tt._d.getDay(),tt._tzm!=null&&tt._d.setUTCMinutes(tt._d.getUTCMinutes()-tt._tzm),tt._nextDay&&(tt._a[HOUR]=24),tt._w&&typeof tt._w.d<"u"&&tt._w.d!==ot&&(getParsingFlags(tt).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo(tt){var et,nt,rt,it,ot,at,st,lt,ct;et=tt._w,et.GG!=null||et.W!=null||et.E!=null?(ot=1,at=4,nt=defaults$1(et.GG,tt._a[YEAR],weekOfYear(createLocal(),1,4).year),rt=defaults$1(et.W,1),it=defaults$1(et.E,1),(it<1||it>7)&&(lt=!0)):(ot=tt._locale._week.dow,at=tt._locale._week.doy,ct=weekOfYear(createLocal(),ot,at),nt=defaults$1(et.gg,tt._a[YEAR],ct.year),rt=defaults$1(et.w,ct.week),et.d!=null?(it=et.d,(it<0||it>6)&&(lt=!0)):et.e!=null?(it=et.e+ot,(et.e<0||et.e>6)&&(lt=!0)):it=ot),rt<1||rt>weeksInYear(nt,ot,at)?getParsingFlags(tt)._overflowWeeks=!0:lt!=null?getParsingFlags(tt)._overflowWeekday=!0:(st=dayOfYearFromWeeks(nt,rt,it,ot,at),tt._a[YEAR]=st.year,tt._dayOfYear=st.dayOfYear)}hooks.ISO_8601=function(){};hooks.RFC_2822=function(){};function configFromStringAndFormat(tt){if(tt._f===hooks.ISO_8601){configFromISO(tt);return}if(tt._f===hooks.RFC_2822){configFromRFC2822(tt);return}tt._a=[],getParsingFlags(tt).empty=!0;var et=""+tt._i,nt,rt,it,ot,at,st=et.length,lt=0,ct,ut;for(it=expandFormat(tt._f,tt._locale).match(formattingTokens)||[],ut=it.length,nt=0;nt0&&getParsingFlags(tt).unusedInput.push(at),et=et.slice(et.indexOf(rt)+rt.length),lt+=rt.length),formatTokenFunctions[ot]?(rt?getParsingFlags(tt).empty=!1:getParsingFlags(tt).unusedTokens.push(ot),addTimeToArrayFromToken(ot,rt,tt)):tt._strict&&!rt&&getParsingFlags(tt).unusedTokens.push(ot);getParsingFlags(tt).charsLeftOver=st-lt,et.length>0&&getParsingFlags(tt).unusedInput.push(et),tt._a[HOUR]<=12&&getParsingFlags(tt).bigHour===!0&&tt._a[HOUR]>0&&(getParsingFlags(tt).bigHour=void 0),getParsingFlags(tt).parsedDateParts=tt._a.slice(0),getParsingFlags(tt).meridiem=tt._meridiem,tt._a[HOUR]=meridiemFixWrap(tt._locale,tt._a[HOUR],tt._meridiem),ct=getParsingFlags(tt).era,ct!==null&&(tt._a[YEAR]=tt._locale.erasConvertYear(ct,tt._a[YEAR])),configFromArray(tt),checkOverflow(tt)}function meridiemFixWrap(tt,et,nt){var rt;return nt==null?et:tt.meridiemHour!=null?tt.meridiemHour(et,nt):(tt.isPM!=null&&(rt=tt.isPM(nt),rt&&et<12&&(et+=12),!rt&&et===12&&(et=0)),et)}function configFromStringAndArray(tt){var et,nt,rt,it,ot,at,st=!1,lt=tt._f.length;if(lt===0){getParsingFlags(tt).invalidFormat=!0,tt._d=new Date(NaN);return}for(it=0;itthis?this:tt:createInvalid()});function pickBy(tt,et){var nt,rt;if(et.length===1&&isArray$d(et[0])&&(et=et[0]),!et.length)return createLocal();for(nt=et[0],rt=1;rtthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted))return this._isDSTShifted;var tt={},et;return copyConfig(tt,this),tt=prepareConfig(tt),tt._a?(et=tt._isUTC?createUTC(tt._a):createLocal(tt._a),this._isDSTShifted=this.isValid()&&compareArrays(tt._a,et.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function isLocal(){return this.isValid()?!this._isUTC:!1}function isUtcOffset(){return this.isValid()?this._isUTC:!1}function isUtc(){return this.isValid()?this._isUTC&&this._offset===0:!1}var aspNetRegex=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,isoRegex=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function createDuration(tt,et){var nt=tt,rt=null,it,ot,at;return isDuration(tt)?nt={ms:tt._milliseconds,d:tt._days,M:tt._months}:isNumber$3(tt)||!isNaN(+tt)?(nt={},et?nt[et]=+tt:nt.milliseconds=+tt):(rt=aspNetRegex.exec(tt))?(it=rt[1]==="-"?-1:1,nt={y:0,d:toInt(rt[DATE])*it,h:toInt(rt[HOUR])*it,m:toInt(rt[MINUTE])*it,s:toInt(rt[SECOND])*it,ms:toInt(absRound(rt[MILLISECOND]*1e3))*it}):(rt=isoRegex.exec(tt))?(it=rt[1]==="-"?-1:1,nt={y:parseIso(rt[2],it),M:parseIso(rt[3],it),w:parseIso(rt[4],it),d:parseIso(rt[5],it),h:parseIso(rt[6],it),m:parseIso(rt[7],it),s:parseIso(rt[8],it)}):nt==null?nt={}:typeof nt=="object"&&("from"in nt||"to"in nt)&&(at=momentsDifference(createLocal(nt.from),createLocal(nt.to)),nt={},nt.ms=at.milliseconds,nt.M=at.months),ot=new Duration(nt),isDuration(tt)&&hasOwnProp(tt,"_locale")&&(ot._locale=tt._locale),isDuration(tt)&&hasOwnProp(tt,"_isValid")&&(ot._isValid=tt._isValid),ot}createDuration.fn=Duration.prototype;createDuration.invalid=createInvalid$1;function parseIso(tt,et){var nt=tt&&parseFloat(tt.replace(",","."));return(isNaN(nt)?0:nt)*et}function positiveMomentsDifference(tt,et){var nt={};return nt.months=et.month()-tt.month()+(et.year()-tt.year())*12,tt.clone().add(nt.months,"M").isAfter(et)&&--nt.months,nt.milliseconds=+et-+tt.clone().add(nt.months,"M"),nt}function momentsDifference(tt,et){var nt;return tt.isValid()&&et.isValid()?(et=cloneWithOffset(et,tt),tt.isBefore(et)?nt=positiveMomentsDifference(tt,et):(nt=positiveMomentsDifference(et,tt),nt.milliseconds=-nt.milliseconds,nt.months=-nt.months),nt):{milliseconds:0,months:0}}function createAdder(tt,et){return function(nt,rt){var it,ot;return rt!==null&&!isNaN(+rt)&&(deprecateSimple(et,"moment()."+et+"(period, number) is deprecated. Please use moment()."+et+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),ot=nt,nt=rt,rt=ot),it=createDuration(nt,rt),addSubtract(this,it,tt),this}}function addSubtract(tt,et,nt,rt){var it=et._milliseconds,ot=absRound(et._days),at=absRound(et._months);tt.isValid()&&(rt=rt??!0,at&&setMonth(tt,get$3(tt,"Month")+at*nt),ot&&set$1$1(tt,"Date",get$3(tt,"Date")+ot*nt),it&&tt._d.setTime(tt._d.valueOf()+it*nt),rt&&hooks.updateOffset(tt,ot||at))}var add$1=createAdder(1,"add"),subtract$1=createAdder(-1,"subtract");function isString$1(tt){return typeof tt=="string"||tt instanceof String}function isMomentInput(tt){return isMoment(tt)||isDate(tt)||isString$1(tt)||isNumber$3(tt)||isNumberOrStringArray(tt)||isMomentInputObject(tt)||tt===null||tt===void 0}function isMomentInputObject(tt){var et=isObject$6(tt)&&!isObjectEmpty(tt),nt=!1,rt=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],it,ot,at=rt.length;for(it=0;itnt.valueOf():nt.valueOf()9999?formatMoment(nt,et?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):isFunction$1(Date.prototype.toISOString)?et?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",formatMoment(nt,"Z")):formatMoment(nt,et?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var tt="moment",et="",nt,rt,it,ot;return this.isLocal()||(tt=this.utcOffset()===0?"moment.utc":"moment.parseZone",et="Z"),nt="["+tt+'("]',rt=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",it="-MM-DD[T]HH:mm:ss.SSS",ot=et+'[")]',this.format(nt+rt+it+ot)}function format$1(tt){tt||(tt=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat);var et=formatMoment(this,tt);return this.localeData().postformat(et)}function from(tt,et){return this.isValid()&&(isMoment(tt)&&tt.isValid()||createLocal(tt).isValid())?createDuration({to:this,from:tt}).locale(this.locale()).humanize(!et):this.localeData().invalidDate()}function fromNow(tt){return this.from(createLocal(),tt)}function to(tt,et){return this.isValid()&&(isMoment(tt)&&tt.isValid()||createLocal(tt).isValid())?createDuration({from:this,to:tt}).locale(this.locale()).humanize(!et):this.localeData().invalidDate()}function toNow(tt){return this.to(createLocal(),tt)}function locale$2(tt){var et;return tt===void 0?this._locale._abbr:(et=getLocale(tt),et!=null&&(this._locale=et),this)}var lang=deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(tt){return tt===void 0?this.localeData():this.locale(tt)});function localeData(){return this._locale}var MS_PER_SECOND=1e3,MS_PER_MINUTE=60*MS_PER_SECOND,MS_PER_HOUR=60*MS_PER_MINUTE,MS_PER_400_YEARS=(365*400+97)*24*MS_PER_HOUR;function mod$1(tt,et){return(tt%et+et)%et}function localStartOfDate(tt,et,nt){return tt<100&&tt>=0?new Date(tt+400,et,nt)-MS_PER_400_YEARS:new Date(tt,et,nt).valueOf()}function utcStartOfDate(tt,et,nt){return tt<100&&tt>=0?Date.UTC(tt+400,et,nt)-MS_PER_400_YEARS:Date.UTC(tt,et,nt)}function startOf(tt){var et,nt;if(tt=normalizeUnits(tt),tt===void 0||tt==="millisecond"||!this.isValid())return this;switch(nt=this._isUTC?utcStartOfDate:localStartOfDate,tt){case"year":et=nt(this.year(),0,1);break;case"quarter":et=nt(this.year(),this.month()-this.month()%3,1);break;case"month":et=nt(this.year(),this.month(),1);break;case"week":et=nt(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":et=nt(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":et=nt(this.year(),this.month(),this.date());break;case"hour":et=this._d.valueOf(),et-=mod$1(et+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR);break;case"minute":et=this._d.valueOf(),et-=mod$1(et,MS_PER_MINUTE);break;case"second":et=this._d.valueOf(),et-=mod$1(et,MS_PER_SECOND);break}return this._d.setTime(et),hooks.updateOffset(this,!0),this}function endOf(tt){var et,nt;if(tt=normalizeUnits(tt),tt===void 0||tt==="millisecond"||!this.isValid())return this;switch(nt=this._isUTC?utcStartOfDate:localStartOfDate,tt){case"year":et=nt(this.year()+1,0,1)-1;break;case"quarter":et=nt(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":et=nt(this.year(),this.month()+1,1)-1;break;case"week":et=nt(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":et=nt(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":et=nt(this.year(),this.month(),this.date()+1)-1;break;case"hour":et=this._d.valueOf(),et+=MS_PER_HOUR-mod$1(et+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR)-1;break;case"minute":et=this._d.valueOf(),et+=MS_PER_MINUTE-mod$1(et,MS_PER_MINUTE)-1;break;case"second":et=this._d.valueOf(),et+=MS_PER_SECOND-mod$1(et,MS_PER_SECOND)-1;break}return this._d.setTime(et),hooks.updateOffset(this,!0),this}function valueOf(){return this._d.valueOf()-(this._offset||0)*6e4}function unix(){return Math.floor(this.valueOf()/1e3)}function toDate(){return new Date(this.valueOf())}function toArray$2(){var tt=this;return[tt.year(),tt.month(),tt.date(),tt.hour(),tt.minute(),tt.second(),tt.millisecond()]}function toObject(){var tt=this;return{years:tt.year(),months:tt.month(),date:tt.date(),hours:tt.hours(),minutes:tt.minutes(),seconds:tt.seconds(),milliseconds:tt.milliseconds()}}function toJSON(){return this.isValid()?this.toISOString():null}function isValid$2(){return isValid(this)}function parsingFlags(){return extend$1({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}addFormatToken("N",0,0,"eraAbbr");addFormatToken("NN",0,0,"eraAbbr");addFormatToken("NNN",0,0,"eraAbbr");addFormatToken("NNNN",0,0,"eraName");addFormatToken("NNNNN",0,0,"eraNarrow");addFormatToken("y",["y",1],"yo","eraYear");addFormatToken("y",["yy",2],0,"eraYear");addFormatToken("y",["yyy",3],0,"eraYear");addFormatToken("y",["yyyy",4],0,"eraYear");addRegexToken("N",matchEraAbbr);addRegexToken("NN",matchEraAbbr);addRegexToken("NNN",matchEraAbbr);addRegexToken("NNNN",matchEraName);addRegexToken("NNNNN",matchEraNarrow);addParseToken(["N","NN","NNN","NNNN","NNNNN"],function(tt,et,nt,rt){var it=nt._locale.erasParse(tt,rt,nt._strict);it?getParsingFlags(nt).era=it:getParsingFlags(nt).invalidEra=tt});addRegexToken("y",matchUnsigned);addRegexToken("yy",matchUnsigned);addRegexToken("yyy",matchUnsigned);addRegexToken("yyyy",matchUnsigned);addRegexToken("yo",matchEraYearOrdinal);addParseToken(["y","yy","yyy","yyyy"],YEAR);addParseToken(["yo"],function(tt,et,nt,rt){var it;nt._locale._eraYearOrdinalRegex&&(it=tt.match(nt._locale._eraYearOrdinalRegex)),nt._locale.eraYearOrdinalParse?et[YEAR]=nt._locale.eraYearOrdinalParse(tt,it):et[YEAR]=parseInt(tt,10)});function localeEras(tt,et){var nt,rt,it,ot=this._eras||getLocale("en")._eras;for(nt=0,rt=ot.length;nt=0)return ot[rt]}function localeErasConvertYear(tt,et){var nt=tt.since<=tt.until?1:-1;return et===void 0?hooks(tt.since).year():hooks(tt.since).year()+(et-tt.offset)*nt}function getEraName(){var tt,et,nt,rt=this.localeData().eras();for(tt=0,et=rt.length;ttot&&(et=ot),setWeekAll.call(this,tt,et,nt,rt,it))}function setWeekAll(tt,et,nt,rt,it){var ot=dayOfYearFromWeeks(tt,et,nt,rt,it),at=createUTCDate(ot.year,0,ot.dayOfYear);return this.year(at.getUTCFullYear()),this.month(at.getUTCMonth()),this.date(at.getUTCDate()),this}addFormatToken("Q",0,"Qo","quarter");addUnitAlias("quarter","Q");addUnitPriority("quarter",7);addRegexToken("Q",match1);addParseToken("Q",function(tt,et){et[MONTH]=(toInt(tt)-1)*3});function getSetQuarter(tt){return tt==null?Math.ceil((this.month()+1)/3):this.month((tt-1)*3+this.month()%3)}addFormatToken("D",["DD",2],"Do","date");addUnitAlias("date","D");addUnitPriority("date",9);addRegexToken("D",match1to2);addRegexToken("DD",match1to2,match2);addRegexToken("Do",function(tt,et){return tt?et._dayOfMonthOrdinalParse||et._ordinalParse:et._dayOfMonthOrdinalParseLenient});addParseToken(["D","DD"],DATE);addParseToken("Do",function(tt,et){et[DATE]=toInt(tt.match(match1to2)[0])});var getSetDayOfMonth=makeGetSet("Date",!0);addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear");addUnitAlias("dayOfYear","DDD");addUnitPriority("dayOfYear",4);addRegexToken("DDD",match1to3);addRegexToken("DDDD",match3);addParseToken(["DDD","DDDD"],function(tt,et,nt){nt._dayOfYear=toInt(tt)});function getSetDayOfYear(tt){var et=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return tt==null?et:this.add(tt-et,"d")}addFormatToken("m",["mm",2],0,"minute");addUnitAlias("minute","m");addUnitPriority("minute",14);addRegexToken("m",match1to2);addRegexToken("mm",match1to2,match2);addParseToken(["m","mm"],MINUTE);var getSetMinute=makeGetSet("Minutes",!1);addFormatToken("s",["ss",2],0,"second");addUnitAlias("second","s");addUnitPriority("second",15);addRegexToken("s",match1to2);addRegexToken("ss",match1to2,match2);addParseToken(["s","ss"],SECOND);var getSetSecond=makeGetSet("Seconds",!1);addFormatToken("S",0,0,function(){return~~(this.millisecond()/100)});addFormatToken(0,["SS",2],0,function(){return~~(this.millisecond()/10)});addFormatToken(0,["SSS",3],0,"millisecond");addFormatToken(0,["SSSS",4],0,function(){return this.millisecond()*10});addFormatToken(0,["SSSSS",5],0,function(){return this.millisecond()*100});addFormatToken(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});addFormatToken(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});addFormatToken(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});addFormatToken(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});addUnitAlias("millisecond","ms");addUnitPriority("millisecond",16);addRegexToken("S",match1to3,match1);addRegexToken("SS",match1to3,match2);addRegexToken("SSS",match1to3,match3);var token,getSetMillisecond;for(token="SSSS";token.length<=9;token+="S")addRegexToken(token,matchUnsigned);function parseMs(tt,et){et[MILLISECOND]=toInt(("0."+tt)*1e3)}for(token="S";token.length<=9;token+="S")addParseToken(token,parseMs);getSetMillisecond=makeGetSet("Milliseconds",!1);addFormatToken("z",0,0,"zoneAbbr");addFormatToken("zz",0,0,"zoneName");function getZoneAbbr(){return this._isUTC?"UTC":""}function getZoneName(){return this._isUTC?"Coordinated Universal Time":""}var proto=Moment.prototype;proto.add=add$1;proto.calendar=calendar$1$1;proto.clone=clone$1;proto.diff=diff;proto.endOf=endOf;proto.format=format$1;proto.from=from;proto.fromNow=fromNow;proto.to=to;proto.toNow=toNow;proto.get=stringGet;proto.invalidAt=invalidAt;proto.isAfter=isAfter;proto.isBefore=isBefore;proto.isBetween=isBetween;proto.isSame=isSame;proto.isSameOrAfter=isSameOrAfter;proto.isSameOrBefore=isSameOrBefore;proto.isValid=isValid$2;proto.lang=lang;proto.locale=locale$2;proto.localeData=localeData;proto.max=prototypeMax;proto.min=prototypeMin;proto.parsingFlags=parsingFlags;proto.set=stringSet;proto.startOf=startOf;proto.subtract=subtract$1;proto.toArray=toArray$2;proto.toObject=toObject;proto.toDate=toDate;proto.toISOString=toISOString;proto.inspect=inspect;typeof Symbol<"u"&&Symbol.for!=null&&(proto[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});proto.toJSON=toJSON;proto.toString=toString$5;proto.unix=unix;proto.valueOf=valueOf;proto.creationData=creationData;proto.eraName=getEraName;proto.eraNarrow=getEraNarrow;proto.eraAbbr=getEraAbbr;proto.eraYear=getEraYear;proto.year=getSetYear;proto.isLeapYear=getIsLeapYear;proto.weekYear=getSetWeekYear;proto.isoWeekYear=getSetISOWeekYear;proto.quarter=proto.quarters=getSetQuarter;proto.month=getSetMonth;proto.daysInMonth=getDaysInMonth;proto.week=proto.weeks=getSetWeek;proto.isoWeek=proto.isoWeeks=getSetISOWeek;proto.weeksInYear=getWeeksInYear;proto.weeksInWeekYear=getWeeksInWeekYear;proto.isoWeeksInYear=getISOWeeksInYear;proto.isoWeeksInISOWeekYear=getISOWeeksInISOWeekYear;proto.date=getSetDayOfMonth;proto.day=proto.days=getSetDayOfWeek;proto.weekday=getSetLocaleDayOfWeek;proto.isoWeekday=getSetISODayOfWeek;proto.dayOfYear=getSetDayOfYear;proto.hour=proto.hours=getSetHour;proto.minute=proto.minutes=getSetMinute;proto.second=proto.seconds=getSetSecond;proto.millisecond=proto.milliseconds=getSetMillisecond;proto.utcOffset=getSetOffset;proto.utc=setOffsetToUTC;proto.local=setOffsetToLocal;proto.parseZone=setOffsetToParsedOffset;proto.hasAlignedHourOffset=hasAlignedHourOffset;proto.isDST=isDaylightSavingTime;proto.isLocal=isLocal;proto.isUtcOffset=isUtcOffset;proto.isUtc=isUtc;proto.isUTC=isUtc;proto.zoneAbbr=getZoneAbbr;proto.zoneName=getZoneName;proto.dates=deprecate("dates accessor is deprecated. Use date instead.",getSetDayOfMonth);proto.months=deprecate("months accessor is deprecated. Use month instead",getSetMonth);proto.years=deprecate("years accessor is deprecated. Use year instead",getSetYear);proto.zone=deprecate("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",getSetZone);proto.isDSTShifted=deprecate("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",isDaylightSavingTimeShifted);function createUnix(tt){return createLocal(tt*1e3)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(tt){return tt}var proto$1=Locale.prototype;proto$1.calendar=calendar$1;proto$1.longDateFormat=longDateFormat;proto$1.invalidDate=invalidDate;proto$1.ordinal=ordinal$1;proto$1.preparse=preParsePostFormat;proto$1.postformat=preParsePostFormat;proto$1.relativeTime=relativeTime;proto$1.pastFuture=pastFuture;proto$1.set=set$1;proto$1.eras=localeEras;proto$1.erasParse=localeErasParse;proto$1.erasConvertYear=localeErasConvertYear;proto$1.erasAbbrRegex=erasAbbrRegex;proto$1.erasNameRegex=erasNameRegex;proto$1.erasNarrowRegex=erasNarrowRegex;proto$1.months=localeMonths;proto$1.monthsShort=localeMonthsShort;proto$1.monthsParse=localeMonthsParse;proto$1.monthsRegex=monthsRegex;proto$1.monthsShortRegex=monthsShortRegex;proto$1.week=localeWeek;proto$1.firstDayOfYear=localeFirstDayOfYear;proto$1.firstDayOfWeek=localeFirstDayOfWeek;proto$1.weekdays=localeWeekdays;proto$1.weekdaysMin=localeWeekdaysMin;proto$1.weekdaysShort=localeWeekdaysShort;proto$1.weekdaysParse=localeWeekdaysParse;proto$1.weekdaysRegex=weekdaysRegex;proto$1.weekdaysShortRegex=weekdaysShortRegex;proto$1.weekdaysMinRegex=weekdaysMinRegex;proto$1.isPM=localeIsPM;proto$1.meridiem=localeMeridiem;function get$1$1(tt,et,nt,rt){var it=getLocale(),ot=createUTC().set(rt,et);return it[nt](ot,tt)}function listMonthsImpl(tt,et,nt){if(isNumber$3(tt)&&(et=tt,tt=void 0),tt=tt||"",et!=null)return get$1$1(tt,et,nt,"month");var rt,it=[];for(rt=0;rt<12;rt++)it[rt]=get$1$1(tt,rt,nt,"month");return it}function listWeekdaysImpl(tt,et,nt,rt){typeof tt=="boolean"?(isNumber$3(et)&&(nt=et,et=void 0),et=et||""):(et=tt,nt=et,tt=!1,isNumber$3(et)&&(nt=et,et=void 0),et=et||"");var it=getLocale(),ot=tt?it._week.dow:0,at,st=[];if(nt!=null)return get$1$1(et,(nt+ot)%7,rt,"day");for(at=0;at<7;at++)st[at]=get$1$1(et,(at+ot)%7,rt,"day");return st}function listMonths(tt,et){return listMonthsImpl(tt,et,"months")}function listMonthsShort(tt,et){return listMonthsImpl(tt,et,"monthsShort")}function listWeekdays(tt,et,nt){return listWeekdaysImpl(tt,et,nt,"weekdays")}function listWeekdaysShort(tt,et,nt){return listWeekdaysImpl(tt,et,nt,"weekdaysShort")}function listWeekdaysMin(tt,et,nt){return listWeekdaysImpl(tt,et,nt,"weekdaysMin")}getSetGlobalLocale("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(tt){var et=tt%10,nt=toInt(tt%100/10)===1?"th":et===1?"st":et===2?"nd":et===3?"rd":"th";return tt+nt}});hooks.lang=deprecate("moment.lang is deprecated. Use moment.locale instead.",getSetGlobalLocale);hooks.langData=deprecate("moment.langData is deprecated. Use moment.localeData instead.",getLocale);var mathAbs=Math.abs;function abs(){var tt=this._data;return this._milliseconds=mathAbs(this._milliseconds),this._days=mathAbs(this._days),this._months=mathAbs(this._months),tt.milliseconds=mathAbs(tt.milliseconds),tt.seconds=mathAbs(tt.seconds),tt.minutes=mathAbs(tt.minutes),tt.hours=mathAbs(tt.hours),tt.months=mathAbs(tt.months),tt.years=mathAbs(tt.years),this}function addSubtract$1(tt,et,nt,rt){var it=createDuration(et,nt);return tt._milliseconds+=rt*it._milliseconds,tt._days+=rt*it._days,tt._months+=rt*it._months,tt._bubble()}function add$1$1(tt,et){return addSubtract$1(this,tt,et,1)}function subtract$1$1(tt,et){return addSubtract$1(this,tt,et,-1)}function absCeil(tt){return tt<0?Math.floor(tt):Math.ceil(tt)}function bubble(){var tt=this._milliseconds,et=this._days,nt=this._months,rt=this._data,it,ot,at,st,lt;return tt>=0&&et>=0&&nt>=0||tt<=0&&et<=0&&nt<=0||(tt+=absCeil(monthsToDays(nt)+et)*864e5,et=0,nt=0),rt.milliseconds=tt%1e3,it=absFloor(tt/1e3),rt.seconds=it%60,ot=absFloor(it/60),rt.minutes=ot%60,at=absFloor(ot/60),rt.hours=at%24,et+=absFloor(at/24),lt=absFloor(daysToMonths(et)),nt+=lt,et-=absCeil(monthsToDays(lt)),st=absFloor(nt/12),nt%=12,rt.days=et,rt.months=nt,rt.years=st,this}function daysToMonths(tt){return tt*4800/146097}function monthsToDays(tt){return tt*146097/4800}function as(tt){if(!this.isValid())return NaN;var et,nt,rt=this._milliseconds;if(tt=normalizeUnits(tt),tt==="month"||tt==="quarter"||tt==="year")switch(et=this._days+rt/864e5,nt=this._months+daysToMonths(et),tt){case"month":return nt;case"quarter":return nt/3;case"year":return nt/12}else switch(et=this._days+Math.round(monthsToDays(this._months)),tt){case"week":return et/7+rt/6048e5;case"day":return et+rt/864e5;case"hour":return et*24+rt/36e5;case"minute":return et*1440+rt/6e4;case"second":return et*86400+rt/1e3;case"millisecond":return Math.floor(et*864e5)+rt;default:throw new Error("Unknown unit "+tt)}}function valueOf$1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+toInt(this._months/12)*31536e6:NaN}function makeAs(tt){return function(){return this.as(tt)}}var asMilliseconds=makeAs("ms"),asSeconds=makeAs("s"),asMinutes=makeAs("m"),asHours=makeAs("h"),asDays=makeAs("d"),asWeeks=makeAs("w"),asMonths=makeAs("M"),asQuarters=makeAs("Q"),asYears=makeAs("y");function clone$1$1(){return createDuration(this)}function get$2$1(tt){return tt=normalizeUnits(tt),this.isValid()?this[tt+"s"]():NaN}function makeGetter(tt){return function(){return this.isValid()?this._data[tt]:NaN}}var milliseconds=makeGetter("milliseconds"),seconds=makeGetter("seconds"),minutes=makeGetter("minutes"),hours=makeGetter("hours"),days=makeGetter("days"),months=makeGetter("months"),years=makeGetter("years");function weeks(){return absFloor(this.days()/7)}var round$1=Math.round,thresholds={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function substituteTimeAgo(tt,et,nt,rt,it){return it.relativeTime(et||1,!!nt,tt,rt)}function relativeTime$1(tt,et,nt,rt){var it=createDuration(tt).abs(),ot=round$1(it.as("s")),at=round$1(it.as("m")),st=round$1(it.as("h")),lt=round$1(it.as("d")),ct=round$1(it.as("M")),ut=round$1(it.as("w")),ht=round$1(it.as("y")),dt=ot<=nt.ss&&["s",ot]||ot0,dt[4]=rt,substituteTimeAgo.apply(null,dt)}function getSetRelativeTimeRounding(tt){return tt===void 0?round$1:typeof tt=="function"?(round$1=tt,!0):!1}function getSetRelativeTimeThreshold(tt,et){return thresholds[tt]===void 0?!1:et===void 0?thresholds[tt]:(thresholds[tt]=et,tt==="s"&&(thresholds.ss=et-1),!0)}function humanize(tt,et){if(!this.isValid())return this.localeData().invalidDate();var nt=!1,rt=thresholds,it,ot;return typeof tt=="object"&&(et=tt,tt=!1),typeof tt=="boolean"&&(nt=tt),typeof et=="object"&&(rt=Object.assign({},thresholds,et),et.s!=null&&et.ss==null&&(rt.ss=et.s-1)),it=this.localeData(),ot=relativeTime$1(this,!nt,rt,it),nt&&(ot=it.pastFuture(+this,ot)),it.postformat(ot)}var abs$1=Math.abs;function sign$1(tt){return(tt>0)-(tt<0)||+tt}function toISOString$1(){if(!this.isValid())return this.localeData().invalidDate();var tt=abs$1(this._milliseconds)/1e3,et=abs$1(this._days),nt=abs$1(this._months),rt,it,ot,at,st=this.asSeconds(),lt,ct,ut,ht;return st?(rt=absFloor(tt/60),it=absFloor(rt/60),tt%=60,rt%=60,ot=absFloor(nt/12),nt%=12,at=tt?tt.toFixed(3).replace(/\.?0+$/,""):"",lt=st<0?"-":"",ct=sign$1(this._months)!==sign$1(st)?"-":"",ut=sign$1(this._days)!==sign$1(st)?"-":"",ht=sign$1(this._milliseconds)!==sign$1(st)?"-":"",lt+"P"+(ot?ct+ot+"Y":"")+(nt?ct+nt+"M":"")+(et?ut+et+"D":"")+(it||rt||tt?"T":"")+(it?ht+it+"H":"")+(rt?ht+rt+"M":"")+(tt?ht+at+"S":"")):"P0D"}var proto$2=Duration.prototype;proto$2.isValid=isValid$1;proto$2.abs=abs;proto$2.add=add$1$1;proto$2.subtract=subtract$1$1;proto$2.as=as;proto$2.asMilliseconds=asMilliseconds;proto$2.asSeconds=asSeconds;proto$2.asMinutes=asMinutes;proto$2.asHours=asHours;proto$2.asDays=asDays;proto$2.asWeeks=asWeeks;proto$2.asMonths=asMonths;proto$2.asQuarters=asQuarters;proto$2.asYears=asYears;proto$2.valueOf=valueOf$1;proto$2._bubble=bubble;proto$2.clone=clone$1$1;proto$2.get=get$2$1;proto$2.milliseconds=milliseconds;proto$2.seconds=seconds;proto$2.minutes=minutes;proto$2.hours=hours;proto$2.days=days;proto$2.weeks=weeks;proto$2.months=months;proto$2.years=years;proto$2.humanize=humanize;proto$2.toISOString=toISOString$1;proto$2.toString=toISOString$1;proto$2.toJSON=toISOString$1;proto$2.locale=locale$2;proto$2.localeData=localeData;proto$2.toIsoString=deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",toISOString$1);proto$2.lang=lang;addFormatToken("X",0,0,"unix");addFormatToken("x",0,0,"valueOf");addRegexToken("x",matchSigned);addRegexToken("X",matchTimestamp);addParseToken("X",function(tt,et,nt){nt._d=new Date(parseFloat(tt)*1e3)});addParseToken("x",function(tt,et,nt){nt._d=new Date(toInt(tt))});//! moment.js +hooks.version="2.29.4";setHookCallback(createLocal);hooks.fn=proto;hooks.min=min$2;hooks.max=max$2;hooks.now=now$2;hooks.utc=createUTC;hooks.unix=createUnix;hooks.months=listMonths;hooks.isDate=isDate;hooks.locale=getSetGlobalLocale;hooks.invalid=createInvalid;hooks.duration=createDuration;hooks.isMoment=isMoment;hooks.weekdays=listWeekdays;hooks.parseZone=createInZone;hooks.localeData=getLocale;hooks.isDuration=isDuration;hooks.monthsShort=listMonthsShort;hooks.weekdaysMin=listWeekdaysMin;hooks.defineLocale=defineLocale;hooks.updateLocale=updateLocale;hooks.locales=listLocales;hooks.weekdaysShort=listWeekdaysShort;hooks.normalizeUnits=normalizeUnits;hooks.relativeTimeRounding=getSetRelativeTimeRounding;hooks.relativeTimeThreshold=getSetRelativeTimeThreshold;hooks.calendarFormat=getCalendarFormat;hooks.prototype=proto;hooks.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const Table=({data:tt,showMuted:et})=>{const[nt]=useDataStore(at=>[at.setTopics]),[rt,it]=reactExports.useState(""),ot=async(at,st)=>{if(tt!=null&&tt.length){it(at);try{await putNodeData({ref_id:at,node_name:"muted_topic",node_value:st}),nt(tt.filter(lt=>lt.ref_id!==at))}catch(lt){console.warn(lt)}}};return tt!=null&&tt.length?jsxRuntimeExports.jsxs(MaterialTable,{component:"table",children:[jsxRuntimeExports.jsx(StyledTableHead,{children:jsxRuntimeExports.jsxs(TableRow$1,{component:"tr",children:[jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"}),jsxRuntimeExports.jsx(StyledTableCell,{children:"Type"}),jsxRuntimeExports.jsx(StyledTableCell,{children:"Edge Count"}),jsxRuntimeExports.jsx(StyledTableCell,{children:"Edge list"}),jsxRuntimeExports.jsx(StyledTableCell,{children:"Date"}),jsxRuntimeExports.jsx(StyledTableCell,{children:et?"Unmute":"Mute"})]})}),(tt==null?void 0:tt.length)&&jsxRuntimeExports.jsx("tbody",{children:tt==null?void 0:tt.map(at=>jsxRuntimeExports.jsxs(StyledTableRow,{children:[jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"}),jsxRuntimeExports.jsx(StyledTableCell,{children:at.topic}),jsxRuntimeExports.jsx(StyledTableCell,{children:at.edgeCount}),jsxRuntimeExports.jsx(StyledTableCell,{children:at.edgeList.map(st=>jsxRuntimeExports.jsx("span",{children:st},st))}),jsxRuntimeExports.jsx(StyledTableCell,{children:at.date_added_to_graph?jsxRuntimeExports.jsx("span",{children:hooks(at.date_added_to_graph).format("MM.DD.YYYY")}):null}),jsxRuntimeExports.jsx(StyledTableCell,{className:"cell-center",children:jsxRuntimeExports.jsx(Flex,{direction:"row",justify:"space-between",children:jsxRuntimeExports.jsx("div",{className:"approve-wrapper",children:rt===at.ref_id?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white,size:16}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:at.muted_topic?jsxRuntimeExports.jsx(IconWrapper$2,{className:"centered",onClick:()=>ot(at.ref_id,!1),children:jsxRuntimeExports.jsx(MdCheckCircle,{color:colors.primaryGreen,fontSize:24})}):jsxRuntimeExports.jsx(IconWrapper$2,{className:"centered",onClick:()=>ot(at.ref_id,!0),children:jsxRuntimeExports.jsx(MdCancel,{color:colors.primaryRed,fontSize:24})})})})})}),jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"})]},at.topic))})]}):jsxRuntimeExports.jsxs(Flex,{children:[jsxRuntimeExports.jsx(Text$3,{children:"There is not any results for selected filters"}),jsxRuntimeExports.jsx(FilterOffIcon,{})]})},IconWrapper$2=styled$4(Flex)` width: 20px; height: 20px; border-radius: 50%; @@ -7077,11 +7111,10 @@ ${({disabled:tt})=>tt&&Ae` & + & { margin-left: 4px; } -`,TopicSources=()=>{const[tt,et]=reactExports.useState(!0),[nt,rt]=reactExports.useState(!1),[it,ot]=useDataStore(at=>[at.topics,at.setTopics]);return reactExports.useEffect(()=>{(async()=>{et(!0);try{const lt=await getTopicsData({muted:nt?"True":"False"});ot(lt.data)}catch(st){console.warn(st)}finally{et(!1)}})()},[ot,nt]),jsxRuntimeExports.jsxs(Wrapper$i,{align:"stretch",direction:"column",justify:"flex-end",children:[jsxRuntimeExports.jsx(Heading$4,{align:"flex-start",justify:"space-between",children:jsxRuntimeExports.jsx(Text$3,{className:"title",children:"Topics"})}),jsxRuntimeExports.jsx(Pill,{className:"booster__pill",onClick:()=>rt(!nt),style:{marginLeft:"30px",marginBottom:"10px",padding:"5px 10px 5px 10px",width:"fit-content"},children:tt?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white}):jsxRuntimeExports.jsx(Flex,{align:"center",direction:"row",justify:"center",children:jsxRuntimeExports.jsxs("div",{style:{fontSize:10},children:["Show ",nt?"Unmuted":"Muted"]})})}),jsxRuntimeExports.jsx(TableWrapper,{align:"center",justify:tt?"center":"flex-start",children:tt?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white}):jsxRuntimeExports.jsx(Table,{data:it,showMuted:nt})})]})},Wrapper$i=styled$4(Flex)` +`,TopicSources=()=>{const[tt,et]=reactExports.useState(!0),[nt,rt]=reactExports.useState(!1),[it,ot]=useDataStore(ct=>[ct.topics,ct.setTopics]),[at,st]=reactExports.useState(DEFAULT$1);reactExports.useEffect(()=>{(async()=>{et(!0);try{const ht=await getTopicsData({muted:nt?"True":"False"});ot(ht.data)}catch(ut){console.warn(ut)}finally{et(!1)}})()},[ot,nt]);const lt=reactExports.useMemo(()=>it?at===DEFAULT$1?it:at===DATE$1?[...it].sort((ct,ut)=>ct.date_added_to_graph&&ut.date_added_to_graph?ct.date_added_to_graph-ut.date_added_to_graph:1):at===EDGES?[...it].sort((ct,ut)=>ct.edgeCount-ut.edgeCount):null:[],[at,it]);return jsxRuntimeExports.jsxs(Wrapper$i,{direction:"column",justify:"flex-end",children:[jsxRuntimeExports.jsx(Heading$4,{align:"flex-start",justify:"space-between",children:jsxRuntimeExports.jsx(Text$3,{className:"title",children:"Topics"})}),jsxRuntimeExports.jsxs(ActionsWrapper,{children:[jsxRuntimeExports.jsxs(Button$2,{onClick:()=>rt(!nt),size:"medium",children:[nt?"Show Unmuted":"Show Muted",tt&&jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.BLUE_PRESS_STATE,size:10})]}),jsxRuntimeExports.jsx(Filter,{currentFilter:at,onChangeFilter:st})]}),jsxRuntimeExports.jsx(TableWrapper,{align:"center",justify:tt?"center":"flex-start",children:tt?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white}):jsxRuntimeExports.jsx(Table,{data:lt||[],showMuted:nt})})]})},Wrapper$i=styled$4(Flex)` flex: 1; .title { - margin-bottom: 32px; font-size: 20px; color: ${colors.white}; font-family: Barlow; @@ -7108,6 +7141,9 @@ ${({disabled:tt})=>tt&&Ae` overflow: auto; flex: 1; width: 100%; +`,ActionsWrapper=styled$4(Flex).attrs({direction:"row",align:"center",justify:"space-between"})` + padding: 0 36px; + margin-bottom: 32px; `,TabPanel=tt=>{const{children:et,value:nt,index:rt,...it}=tt;return nt===rt?jsxRuntimeExports.jsx(TabPanelWrapper,{"aria-labelledby":`simple-tab-${rt}`,hidden:nt!==rt,id:`simple-tabpanel-${rt}`,role:"tabpanel",...it,children:et}):null};function a11yProps(tt){return{id:`simple-tab-${tt}`,"aria-controls":`simple-tabpanel-${tt}`}}const SourcesView=()=>{const[tt,et]=reactExports.useState(0),nt=(rt,it)=>{et(it)};return jsxRuntimeExports.jsxs(Wrapper$h,{direction:"column",children:[jsxRuntimeExports.jsxs(StyledTabs,{"aria-label":"basic tabs example",onChange:nt,value:tt,children:[jsxRuntimeExports.jsx(StyledTab,{disableRipple:!0,label:"Sources table",...a11yProps(0)}),jsxRuntimeExports.jsx(StyledTab,{color:colors.white,disableRipple:!0,label:"Queued sources",...a11yProps(1)}),jsxRuntimeExports.jsx(StyledTab,{color:colors.white,disableRipple:!0,label:"Topics",...a11yProps(1)})]}),jsxRuntimeExports.jsx(TabPanel,{index:0,value:tt,children:jsxRuntimeExports.jsx(Sources,{})}),jsxRuntimeExports.jsx(TabPanel,{index:1,value:tt,children:jsxRuntimeExports.jsx(QueuedSources,{})}),jsxRuntimeExports.jsx(TabPanel,{index:2,value:tt,children:jsxRuntimeExports.jsx(TopicSources,{})})]})},StyledTabs=styled$4(Tabs$1)` && { background: rgba(0, 0, 0, 0.2); @@ -7175,9 +7211,9 @@ ${({disabled:tt})=>tt&&Ae` * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */lodash.exports;(function(tt,et){(function(){var nt,rt="4.17.21",it=200,ot="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",at="Expected a function",st="Invalid `variable` option passed into `_.template`",lt="__lodash_hash_undefined__",ct=500,ut="__lodash_placeholder__",ht=1,dt=2,pt=4,mt=1,gt=2,yt=1,bt=2,vt=4,xt=8,kt=16,St=32,Tt=64,At=128,Et=256,$t=512,Dt=30,jt="...",Pt=800,Ct=16,wt=1,It=2,Ot=3,Wt=1/0,zt=9007199254740991,Ft=17976931348623157e292,Nt=0/0,Ut=4294967295,Mt=Ut-1,Ht=Ut>>>1,en=[["ary",At],["bind",yt],["bindKey",bt],["curry",xt],["curryRight",kt],["flip",$t],["partial",St],["partialRight",Tt],["rearg",Et]],sn="[object Arguments]",Kt="[object Array]",rn="[object AsyncFunction]",nn="[object Boolean]",hn="[object Date]",vn="[object DOMException]",an="[object Error]",Qt="[object Function]",_n="[object GeneratorFunction]",Pn="[object Map]",$n="[object Number]",Nn="[object Null]",Tn="[object Object]",cn="[object Promise]",mn="[object Proxy]",In="[object RegExp]",An="[object Set]",wn="[object String]",fn="[object Symbol]",pn="[object Undefined]",kn="[object WeakMap]",Dn="[object WeakSet]",un="[object ArrayBuffer]",Zt="[object DataView]",Xt="[object Float32Array]",Sn="[object Float64Array]",Rn="[object Int8Array]",jn="[object Int16Array]",On="[object Int32Array]",Zn="[object Uint8Array]",Vn="[object Uint8ClampedArray]",qn="[object Uint16Array]",zn="[object Uint32Array]",Jn=/\b__p \+= '';/g,Hn=/\b(__p \+=) '' \+/g,pr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,fr=/&(?:amp|lt|gt|quot|#39);/g,xr=/[&<>"']/g,io=RegExp(fr.source),Tr=RegExp(xr.source),Ar=/<%-([\s\S]+?)%>/g,qr=/<%([\s\S]+?)%>/g,jr=/<%=([\s\S]+?)%>/g,Fr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ao=/^\w*$/,Yr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dr=/[\\^$.*+?()[\]{}|]/g,go=RegExp(Dr.source),xn=/^\s+/,Mn=/\s/,dn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Jt=/\{\n\/\* \[wrapped with (.+)\] \*/,En=/,? & /,Ln=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Un=/[()=,{}\[\]\/\s]/,Kn=/\\(\\)?/g,nr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lr=/\w*$/,cr=/^[-+]0x[0-9a-f]+$/i,Hr=/^0b[01]+$/i,vr=/^\[object .+?Constructor\]$/,Nr=/^0o[0-7]+$/i,Gr=/^(?:0|[1-9]\d*)$/,eo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Zr=/($^)/,Jr=/['\n\r\u2028\u2029\\]/g,wr="\\ud800-\\udfff",Mr="\\u0300-\\u036f",Ur="\\ufe20-\\ufe2f",Rr="\\u20d0-\\u20ff",Pr=Mr+Ur+Rr,Lr="\\u2700-\\u27bf",Wr="a-z\\xdf-\\xf6\\xf8-\\xff",Br="\\xac\\xb1\\xd7\\xf7",tr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ir="\\u2000-\\u206f",Sr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",dr="A-Z\\xc0-\\xd6\\xd8-\\xde",br="\\ufe0e\\ufe0f",$r=Br+tr+ir+Sr,no="['’]",so="["+wr+"]",fo="["+$r+"]",po="["+Pr+"]",Yn="\\d+",vo="["+Lr+"]",_o="["+Wr+"]",xo="[^"+wr+$r+Yn+Lr+Wr+dr+"]",bo="\\ud83c[\\udffb-\\udfff]",Co="(?:"+po+"|"+bo+")",Ro="[^"+wr+"]",Wo="(?:\\ud83c[\\udde6-\\uddff]){2}",Po="[\\ud800-\\udbff][\\udc00-\\udfff]",Fo="["+dr+"]",Go="\\u200d",Xo="(?:"+_o+"|"+xo+")",ga="(?:"+Fo+"|"+xo+")",na="(?:"+no+"(?:d|ll|m|re|s|t|ve))?",$a="(?:"+no+"(?:D|LL|M|RE|S|T|VE))?",Zo=Co+"?",pu="["+br+"]?",eu="(?:"+Go+"(?:"+[Ro,Wo,Po].join("|")+")"+pu+Zo+")*",No="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Mp="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",tu=pu+Zo+eu,op="(?:"+[vo,Wo,Po].join("|")+")"+tu,Rp="(?:"+[Ro+po+"?",po,Wo,Po,so].join("|")+")",mm=RegExp(no,"g"),ts=RegExp(po,"g"),mu=RegExp(bo+"(?="+bo+")|"+Rp+tu,"g"),gm=RegExp([Fo+"?"+_o+"+"+na+"(?="+[fo,Fo,"$"].join("|")+")",ga+"+"+$a+"(?="+[fo,Fo+Xo,"$"].join("|")+")",Fo+"?"+Xo+"+"+na,Fo+"+"+$a,Mp,No,Yn,op].join("|"),"g"),Us=RegExp("["+Go+wr+Pr+br+"]"),Bp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Vu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Xs=-1,Yo={};Yo[Xt]=Yo[Sn]=Yo[Rn]=Yo[jn]=Yo[On]=Yo[Zn]=Yo[Vn]=Yo[qn]=Yo[zn]=!0,Yo[sn]=Yo[Kt]=Yo[un]=Yo[nn]=Yo[Zt]=Yo[hn]=Yo[an]=Yo[Qt]=Yo[Pn]=Yo[$n]=Yo[Tn]=Yo[In]=Yo[An]=Yo[wn]=Yo[kn]=!1;var Ko={};Ko[sn]=Ko[Kt]=Ko[un]=Ko[Zt]=Ko[nn]=Ko[hn]=Ko[Xt]=Ko[Sn]=Ko[Rn]=Ko[jn]=Ko[On]=Ko[Pn]=Ko[$n]=Ko[Tn]=Ko[In]=Ko[An]=Ko[wn]=Ko[fn]=Ko[Zn]=Ko[Vn]=Ko[qn]=Ko[zn]=!0,Ko[an]=Ko[Qt]=Ko[kn]=!1;var Zs={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},zs={"&":"&","<":"<",">":">",'"':""","'":"'"},nu={"&":"&","<":"<",">":">",""":'"',"'":"'"},Cl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Op=parseFloat,jp=parseInt,Ws=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,Hu=typeof self=="object"&&self&&self.Object===Object&&self,ns=Ws||Hu||Function("return this")(),gu=et&&!et.nodeType&&et,ls=gu&&!0&&tt&&!tt.nodeType&&tt,ys=ls&&ls.exports===gu,Iu=ys&&Ws.process,rs=function(){try{var er=ls&&ls.require&&ls.require("util").types;return er||Iu&&Iu.binding&&Iu.binding("util")}catch{}}(),yu=rs&&rs.isArrayBuffer,Gu=rs&&rs.isDate,Dp=rs&&rs.isMap,bs=rs&&rs.isRegExp,$s=rs&&rs.isSet,os=rs&&rs.isTypedArray;function Vo(er,Er,gr){switch(gr.length){case 0:return er.call(Er);case 1:return er.call(Er,gr[0]);case 2:return er.call(Er,gr[0],gr[1]);case 3:return er.call(Er,gr[0],gr[1],gr[2])}return er.apply(Er,gr)}function Js(er,Er,gr,ro){for(var To=-1,$o=er==null?0:er.length;++To<$o;){var es=er[To];Er(ro,es,gr(es),er)}return ro}function ws(er,Er){for(var gr=-1,ro=er==null?0:er.length;++gr-1}function ap(er,Er,gr){for(var ro=-1,To=er==null?0:er.length;++ro-1;);return gr}function cp(er,Er){for(var gr=er.length;gr--&&Fl(Er,er[gr],0)>-1;);return gr}function Wl(er,Er){for(var gr=er.length,ro=0;gr--;)er[gr]===Er&&++ro;return ro}var Ny=Ys(Zs),Ly=Ys(zs);function Xm(er){return"\\"+Cl[er]}function Zm(er,Er){return er==null?nt:er[Er]}function qu(er){return Us.test(er)}function Up(er){return Bp.test(er)}function up(er){for(var Er,gr=[];!(Er=er.next()).done;)gr.push(Er.value);return gr}function zp(er){var Er=-1,gr=Array(er.size);return er.forEach(function(ro,To){gr[++Er]=[To,ro]}),gr}function hp(er,Er){return function(gr){return er(Er(gr))}}function Vl(er,Er){for(var gr=-1,ro=er.length,To=0,$o=[];++gr-1}function Sm(Rt,Vt){var Yt=this.__data__,yn=Bu(Yt,Rt);return yn<0?(++this.size,Yt.push([Rt,Vt])):Yt[yn][1]=Vt,this}Hl.prototype.clear=a0,Hl.prototype.delete=oy,Hl.prototype.get=s0,Hl.prototype.has=l0,Hl.prototype.set=Sm;function $l(Rt){var Vt=-1,Yt=Rt==null?0:Rt.length;for(this.clear();++Vt=Vt?Rt:Vt)),Rt}function _l(Rt,Vt,Yt,yn,Bn,Wn){var Xn,Qn=Vt&ht,ar=Vt&dt,Ir=Vt&pt;if(Yt&&(Xn=Bn?Yt(Rt,yn,Bn,Wn):Yt(Rt)),Xn!==nt)return Xn;if(!ds(Rt))return Rt;var Cr=Mo(Rt);if(Cr){if(Xn=Ew(Rt),!Qn)return Ns(Rt,Xn)}else{var Or=Ks(Rt),Qr=Or==Qt||Or==_n;if(Pp(Rt))return Ay(Rt,Qn);if(Or==Tn||Or==sn||Qr&&!Bn){if(Xn=ar||Qr?{}:E1(Rt),!Qn)return ar?S0(Rt,p0(Xn,Rt)):q0(Rt,hy(Xn,Rt))}else{if(!Ko[Or])return Bn?Rt:{};Xn=Tw(Rt,Or,Qn)}}Wn||(Wn=new xs);var uo=Wn.get(Rt);if(uo)return uo;Wn.set(Rt,Xn),ew(Rt)?Rt.forEach(function(Eo){Xn.add(_l(Eo,Vt,Yt,Eo,Rt,Wn))}):J1(Rt)&&Rt.forEach(function(Eo,Uo){Xn.set(Uo,_l(Eo,Vt,Yt,Uo,Rt,Wn))});var So=Ir?ar?zo:ms:ar?Ol:Fs,Lo=Cr?nt:So(Rt);return ws(Lo||Rt,function(Eo,Uo){Lo&&(Uo=Eo,Eo=Rt[Uo]),Gl(Xn,Uo,_l(Eo,Vt,Yt,Uo,Rt,Wn))}),Xn}function dy(Rt){var Vt=Fs(Rt);return function(Yt){return Am(Yt,Rt,Vt)}}function Am(Rt,Vt,Yt){var yn=Yt.length;if(Rt==null)return!yn;for(Rt=ko(Rt);yn--;){var Bn=Yt[yn],Wn=Vt[Bn],Xn=Rt[Bn];if(Xn===nt&&!(Bn in Rt)||!Wn(Xn))return!1}return!0}function fy(Rt,Vt,Yt){if(typeof Rt!="function")throw new Gs(at);return My(function(){Rt.apply(nt,Yt)},Vt)}function Qu(Rt,Vt,Yt,yn){var Bn=-1,Wn=Nl,Xn=!0,Qn=Rt.length,ar=[],Ir=Vt.length;if(!Qn)return ar;Yt&&(Vt=ba(Vt,Vs(Yt))),yn?(Wn=ap,Xn=!1):Vt.length>=it&&(Wn=As,Xn=!1,Vt=new Ru(Vt));e:for(;++BnBn?0:Bn+Yt),yn=yn===nt||yn>Bn?Bn:Do(yn),yn<0&&(yn+=Bn),yn=Yt>yn?0:nw(yn);Yt0&&Yt(Qn)?Vt>1?Is(Qn,Vt-1,Yt,yn,Bn):Ll(Bn,Qn):yn||(Bn[Bn.length]=Qn)}return Bn}var xp=Fm(),rm=Fm(!0);function xl(Rt,Vt){return Rt&&xp(Rt,Vt,Fs)}function kp(Rt,Vt){return Rt&&rm(Rt,Vt,Fs)}function _h(Rt,Vt){return Ps(Vt,function(Yt){return np(Rt[Yt])})}function Xl(Rt,Vt){Vt=Fu(Vt,Rt);for(var Yt=0,yn=Vt.length;Rt!=null&&YtVt}function y0(Rt,Vt){return Rt!=null&&qo.call(Rt,Vt)}function gy(Rt,Vt){return Rt!=null&&Vt in ko(Rt)}function H0(Rt,Vt,Yt){return Rt>=Ms(Vt,Yt)&&Rt<_s(Vt,Yt)}function Sp(Rt,Vt,Yt){for(var yn=Yt?ap:Nl,Bn=Rt[0].length,Wn=Rt.length,Xn=Wn,Qn=gr(Wn),ar=1/0,Ir=[];Xn--;){var Cr=Rt[Xn];Xn&&Vt&&(Cr=ba(Cr,Vs(Vt))),ar=Ms(Cr.length,ar),Qn[Xn]=!Yt&&(Vt||Bn>=120&&Cr.length>=120)?new Ru(Xn&&Cr):nt}Cr=Rt[0];var Or=-1,Qr=Qn[0];e:for(;++Or-1;)Qn!==Rt&&Pu.call(Qn,ar,1),Pu.call(Rt,ar,1);return Rt}function Os(Rt,Vt){for(var Yt=Rt?Vt.length:0,yn=Yt-1;Yt--;){var Bn=Vt[Yt];if(Yt==yn||Bn!==Wn){var Wn=Bn;tp(Bn)?Pu.call(Rt,Bn,1):Ey(Rt,Bn)}}return Rt}function cu(Rt,Vt){return Rt+Xp(ry()*(Vt-Rt+1))}function Pl(Rt,Vt,Yt,yn){for(var Bn=-1,Wn=_s(Kp((Vt-Rt)/(Yt||1)),0),Xn=gr(Wn);Wn--;)Xn[yn?Wn:++Bn]=Rt,Rt+=Yt;return Xn}function $p(Rt,Vt){var Yt="";if(!Rt||Vt<1||Vt>zt)return Yt;do Vt%2&&(Yt+=Rt),Vt=Xp(Vt/2),Vt&&(Rt+=Rt);while(Vt);return Yt}function mo(Rt,Vt){return _b(A1(Rt,Vt,Dl),Rt+"")}function b0(Rt){return tm(Vm(Rt))}function vy(Rt,Vt){var Yt=Vm(Rt);return I0(Yt,Ou(Vt,0,Yt.length))}function _f(Rt,Vt,Yt,yn){if(!ds(Rt))return Rt;Vt=Fu(Vt,Rt);for(var Bn=-1,Wn=Vt.length,Xn=Wn-1,Qn=Rt;Qn!=null&&++BnBn?0:Bn+Vt),Yt=Yt>Bn?Bn:Yt,Yt<0&&(Yt+=Bn),Bn=Vt>Yt?0:Yt-Vt>>>0,Vt>>>=0;for(var Wn=gr(Bn);++yn>>1,Xn=Rt[Wn];Xn!==null&&!Jl(Xn)&&(Yt?Xn<=Vt:Xn=it){var Ir=Vt?null:Ls(Rt);if(Ir)return Wp(Ir);Xn=!1,Bn=As,ar=new Ru}else ar=Vt?[]:Qn;e:for(;++yn=yn?Rt:El(Rt,Vt,Yt)}var x0=Yp||function(Rt){return ns.clearTimeout(Rt)};function Ay(Rt,Vt){if(Vt)return Rt.slice();var Yt=Rt.length,yn=_g?_g(Yt):new Rt.constructor(Yt);return Rt.copy(yn),yn}function Nm(Rt){var Vt=new Rt.constructor(Rt.byteLength);return new Gp(Vt).set(new Gp(Rt)),Vt}function G0(Rt,Vt){var Yt=Vt?Nm(Rt.buffer):Rt.buffer;return new Rt.constructor(Yt,Rt.byteOffset,Rt.byteLength)}function Ml(Rt){var Vt=new Rt.constructor(Rt.source,lr.exec(Rt));return Vt.lastIndex=Rt.lastIndex,Vt}function Cy(Rt){return _u?ko(_u.call(Rt)):{}}function k0(Rt,Vt){var Yt=Vt?Nm(Rt.buffer):Rt.buffer;return new Rt.constructor(Yt,Rt.byteOffset,Rt.length)}function Su(Rt,Vt){if(Rt!==Vt){var Yt=Rt!==nt,yn=Rt===null,Bn=Rt===Rt,Wn=Jl(Rt),Xn=Vt!==nt,Qn=Vt===null,ar=Vt===Vt,Ir=Jl(Vt);if(!Qn&&!Ir&&!Wn&&Rt>Vt||Wn&&Xn&&ar&&!Qn&&!Ir||yn&&Xn&&ar||!Yt&&ar||!Bn)return 1;if(!yn&&!Wn&&!Ir&&Rt=Qn)return ar;var Ir=Yt[yn];return ar*(Ir=="desc"?-1:1)}}return Rt.index-Vt.index}function zu(Rt,Vt,Yt,yn){for(var Bn=-1,Wn=Rt.length,Xn=Yt.length,Qn=-1,ar=Vt.length,Ir=_s(Wn-Xn,0),Cr=gr(ar+Ir),Or=!yn;++Qn1?Yt[Bn-1]:nt,Xn=Bn>2?Yt[2]:nt;for(Wn=Rt.length>3&&typeof Wn=="function"?(Bn--,Wn):nt,Xn&&Il(Yt[0],Yt[1],Xn)&&(Wn=Bn<3?nt:Wn,Bn=1),Vt=ko(Vt);++yn-1?Bn[Wn?Vt[Xn]:Xn]:nt}}function gn(Rt){return jo(function(Vt){var Yt=Vt.length,yn=Yt,Bn=Rs.prototype.thru;for(Rt&&Vt.reverse();yn--;){var Wn=Vt[yn];if(typeof Wn!="function")throw new Gs(at);if(Bn&&!Xn&&Um(Wn)=="wrapper")var Xn=new Rs([],!0)}for(yn=Xn?yn:Yt;++yn1&&Ho.reverse(),Cr&&arQn))return!1;var Ir=Wn.get(Rt),Cr=Wn.get(Vt);if(Ir&&Cr)return Ir==Vt&&Cr==Rt;var Or=-1,Qr=!0,uo=Yt>?new Ru:nt;for(Wn.set(Rt,Vt),Wn.set(Vt,Rt);++Or1?"& ":"")+Vt[yn],Vt=Vt.join(Yt>2?", ":" "),Rt.replace(dn,`{ + */lodash.exports;(function(tt,et){(function(){var nt,rt="4.17.21",it=200,ot="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",at="Expected a function",st="Invalid `variable` option passed into `_.template`",lt="__lodash_hash_undefined__",ct=500,ut="__lodash_placeholder__",ht=1,dt=2,pt=4,mt=1,gt=2,yt=1,bt=2,vt=4,xt=8,kt=16,St=32,Tt=64,At=128,Et=256,$t=512,Dt=30,jt="...",Pt=800,Ct=16,wt=1,It=2,Ot=3,Wt=1/0,zt=9007199254740991,Ft=17976931348623157e292,Nt=0/0,Ut=4294967295,Mt=Ut-1,Ht=Ut>>>1,en=[["ary",At],["bind",yt],["bindKey",bt],["curry",xt],["curryRight",kt],["flip",$t],["partial",St],["partialRight",Tt],["rearg",Et]],sn="[object Arguments]",Kt="[object Array]",rn="[object AsyncFunction]",nn="[object Boolean]",hn="[object Date]",vn="[object DOMException]",an="[object Error]",Qt="[object Function]",_n="[object GeneratorFunction]",Pn="[object Map]",$n="[object Number]",Nn="[object Null]",Tn="[object Object]",cn="[object Promise]",mn="[object Proxy]",In="[object RegExp]",An="[object Set]",wn="[object String]",fn="[object Symbol]",pn="[object Undefined]",kn="[object WeakMap]",Dn="[object WeakSet]",un="[object ArrayBuffer]",Zt="[object DataView]",Xt="[object Float32Array]",Sn="[object Float64Array]",Rn="[object Int8Array]",jn="[object Int16Array]",On="[object Int32Array]",Zn="[object Uint8Array]",Vn="[object Uint8ClampedArray]",qn="[object Uint16Array]",zn="[object Uint32Array]",Jn=/\b__p \+= '';/g,Hn=/\b(__p \+=) '' \+/g,pr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,fr=/&(?:amp|lt|gt|quot|#39);/g,xr=/[&<>"']/g,io=RegExp(fr.source),Tr=RegExp(xr.source),Ar=/<%-([\s\S]+?)%>/g,qr=/<%([\s\S]+?)%>/g,jr=/<%=([\s\S]+?)%>/g,Fr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ao=/^\w*$/,Yr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dr=/[\\^$.*+?()[\]{}|]/g,go=RegExp(Dr.source),xn=/^\s+/,Mn=/\s/,dn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Jt=/\{\n\/\* \[wrapped with (.+)\] \*/,En=/,? & /,Ln=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Un=/[()=,{}\[\]\/\s]/,Kn=/\\(\\)?/g,nr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lr=/\w*$/,cr=/^[-+]0x[0-9a-f]+$/i,Hr=/^0b[01]+$/i,vr=/^\[object .+?Constructor\]$/,Nr=/^0o[0-7]+$/i,Gr=/^(?:0|[1-9]\d*)$/,eo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Zr=/($^)/,Jr=/['\n\r\u2028\u2029\\]/g,wr="\\ud800-\\udfff",Mr="\\u0300-\\u036f",Ur="\\ufe20-\\ufe2f",Rr="\\u20d0-\\u20ff",Pr=Mr+Ur+Rr,Lr="\\u2700-\\u27bf",Wr="a-z\\xdf-\\xf6\\xf8-\\xff",Br="\\xac\\xb1\\xd7\\xf7",tr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ir="\\u2000-\\u206f",Sr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",dr="A-Z\\xc0-\\xd6\\xd8-\\xde",br="\\ufe0e\\ufe0f",$r=Br+tr+ir+Sr,no="['’]",so="["+wr+"]",fo="["+$r+"]",po="["+Pr+"]",Yn="\\d+",vo="["+Lr+"]",_o="["+Wr+"]",xo="[^"+wr+$r+Yn+Lr+Wr+dr+"]",bo="\\ud83c[\\udffb-\\udfff]",Co="(?:"+po+"|"+bo+")",Ro="[^"+wr+"]",Wo="(?:\\ud83c[\\udde6-\\uddff]){2}",Po="[\\ud800-\\udbff][\\udc00-\\udfff]",Fo="["+dr+"]",Go="\\u200d",Xo="(?:"+_o+"|"+xo+")",ga="(?:"+Fo+"|"+xo+")",na="(?:"+no+"(?:d|ll|m|re|s|t|ve))?",$a="(?:"+no+"(?:D|LL|M|RE|S|T|VE))?",Zo=Co+"?",pu="["+br+"]?",eu="(?:"+Go+"(?:"+[Ro,Wo,Po].join("|")+")"+pu+Zo+")*",No="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Mp="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",tu=pu+Zo+eu,op="(?:"+[vo,Wo,Po].join("|")+")"+tu,Rp="(?:"+[Ro+po+"?",po,Wo,Po,so].join("|")+")",mm=RegExp(no,"g"),ts=RegExp(po,"g"),mu=RegExp(bo+"(?="+bo+")|"+Rp+tu,"g"),gm=RegExp([Fo+"?"+_o+"+"+na+"(?="+[fo,Fo,"$"].join("|")+")",ga+"+"+$a+"(?="+[fo,Fo+Xo,"$"].join("|")+")",Fo+"?"+Xo+"+"+na,Fo+"+"+$a,Mp,No,Yn,op].join("|"),"g"),Us=RegExp("["+Go+wr+Pr+br+"]"),Bp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Vu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Xs=-1,Yo={};Yo[Xt]=Yo[Sn]=Yo[Rn]=Yo[jn]=Yo[On]=Yo[Zn]=Yo[Vn]=Yo[qn]=Yo[zn]=!0,Yo[sn]=Yo[Kt]=Yo[un]=Yo[nn]=Yo[Zt]=Yo[hn]=Yo[an]=Yo[Qt]=Yo[Pn]=Yo[$n]=Yo[Tn]=Yo[In]=Yo[An]=Yo[wn]=Yo[kn]=!1;var Ko={};Ko[sn]=Ko[Kt]=Ko[un]=Ko[Zt]=Ko[nn]=Ko[hn]=Ko[Xt]=Ko[Sn]=Ko[Rn]=Ko[jn]=Ko[On]=Ko[Pn]=Ko[$n]=Ko[Tn]=Ko[In]=Ko[An]=Ko[wn]=Ko[fn]=Ko[Zn]=Ko[Vn]=Ko[qn]=Ko[zn]=!0,Ko[an]=Ko[Qt]=Ko[kn]=!1;var Zs={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},zs={"&":"&","<":"<",">":">",'"':""","'":"'"},nu={"&":"&","<":"<",">":">",""":'"',"'":"'"},Cl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Op=parseFloat,jp=parseInt,Ws=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,Hu=typeof self=="object"&&self&&self.Object===Object&&self,ns=Ws||Hu||Function("return this")(),gu=et&&!et.nodeType&&et,ls=gu&&!0&&tt&&!tt.nodeType&&tt,ys=ls&&ls.exports===gu,Iu=ys&&Ws.process,rs=function(){try{var er=ls&&ls.require&&ls.require("util").types;return er||Iu&&Iu.binding&&Iu.binding("util")}catch{}}(),yu=rs&&rs.isArrayBuffer,Gu=rs&&rs.isDate,Dp=rs&&rs.isMap,bs=rs&&rs.isRegExp,$s=rs&&rs.isSet,os=rs&&rs.isTypedArray;function Vo(er,Er,gr){switch(gr.length){case 0:return er.call(Er);case 1:return er.call(Er,gr[0]);case 2:return er.call(Er,gr[0],gr[1]);case 3:return er.call(Er,gr[0],gr[1],gr[2])}return er.apply(Er,gr)}function Js(er,Er,gr,ro){for(var To=-1,$o=er==null?0:er.length;++To<$o;){var es=er[To];Er(ro,es,gr(es),er)}return ro}function ws(er,Er){for(var gr=-1,ro=er==null?0:er.length;++gr-1}function ap(er,Er,gr){for(var ro=-1,To=er==null?0:er.length;++ro-1;);return gr}function cp(er,Er){for(var gr=er.length;gr--&&Fl(Er,er[gr],0)>-1;);return gr}function Wl(er,Er){for(var gr=er.length,ro=0;gr--;)er[gr]===Er&&++ro;return ro}var Ny=Ys(Zs),Ly=Ys(zs);function Xm(er){return"\\"+Cl[er]}function Zm(er,Er){return er==null?nt:er[Er]}function qu(er){return Us.test(er)}function Up(er){return Bp.test(er)}function up(er){for(var Er,gr=[];!(Er=er.next()).done;)gr.push(Er.value);return gr}function zp(er){var Er=-1,gr=Array(er.size);return er.forEach(function(ro,To){gr[++Er]=[To,ro]}),gr}function hp(er,Er){return function(gr){return er(Er(gr))}}function Vl(er,Er){for(var gr=-1,ro=er.length,To=0,$o=[];++gr-1}function Sm(Rt,Vt){var Yt=this.__data__,yn=Bu(Yt,Rt);return yn<0?(++this.size,Yt.push([Rt,Vt])):Yt[yn][1]=Vt,this}Hl.prototype.clear=a0,Hl.prototype.delete=oy,Hl.prototype.get=s0,Hl.prototype.has=l0,Hl.prototype.set=Sm;function $l(Rt){var Vt=-1,Yt=Rt==null?0:Rt.length;for(this.clear();++Vt=Vt?Rt:Vt)),Rt}function _l(Rt,Vt,Yt,yn,Bn,Wn){var Xn,Qn=Vt&ht,ar=Vt&dt,Ir=Vt&pt;if(Yt&&(Xn=Bn?Yt(Rt,yn,Bn,Wn):Yt(Rt)),Xn!==nt)return Xn;if(!ds(Rt))return Rt;var Cr=Mo(Rt);if(Cr){if(Xn=Tw(Rt),!Qn)return Ns(Rt,Xn)}else{var Or=Ks(Rt),Qr=Or==Qt||Or==_n;if(Pp(Rt))return Ay(Rt,Qn);if(Or==Tn||Or==sn||Qr&&!Bn){if(Xn=ar||Qr?{}:T1(Rt),!Qn)return ar?S0(Rt,p0(Xn,Rt)):q0(Rt,hy(Xn,Rt))}else{if(!Ko[Or])return Bn?Rt:{};Xn=Iw(Rt,Or,Qn)}}Wn||(Wn=new xs);var uo=Wn.get(Rt);if(uo)return uo;Wn.set(Rt,Xn),tw(Rt)?Rt.forEach(function(Eo){Xn.add(_l(Eo,Vt,Yt,Eo,Rt,Wn))}):Q1(Rt)&&Rt.forEach(function(Eo,Uo){Xn.set(Uo,_l(Eo,Vt,Yt,Uo,Rt,Wn))});var So=Ir?ar?zo:ms:ar?Ol:Fs,Lo=Cr?nt:So(Rt);return ws(Lo||Rt,function(Eo,Uo){Lo&&(Uo=Eo,Eo=Rt[Uo]),Gl(Xn,Uo,_l(Eo,Vt,Yt,Uo,Rt,Wn))}),Xn}function dy(Rt){var Vt=Fs(Rt);return function(Yt){return Am(Yt,Rt,Vt)}}function Am(Rt,Vt,Yt){var yn=Yt.length;if(Rt==null)return!yn;for(Rt=ko(Rt);yn--;){var Bn=Yt[yn],Wn=Vt[Bn],Xn=Rt[Bn];if(Xn===nt&&!(Bn in Rt)||!Wn(Xn))return!1}return!0}function fy(Rt,Vt,Yt){if(typeof Rt!="function")throw new Gs(at);return My(function(){Rt.apply(nt,Yt)},Vt)}function Qu(Rt,Vt,Yt,yn){var Bn=-1,Wn=Nl,Xn=!0,Qn=Rt.length,ar=[],Ir=Vt.length;if(!Qn)return ar;Yt&&(Vt=ba(Vt,Vs(Yt))),yn?(Wn=ap,Xn=!1):Vt.length>=it&&(Wn=As,Xn=!1,Vt=new Ru(Vt));e:for(;++BnBn?0:Bn+Yt),yn=yn===nt||yn>Bn?Bn:Do(yn),yn<0&&(yn+=Bn),yn=Yt>yn?0:rw(yn);Yt0&&Yt(Qn)?Vt>1?Is(Qn,Vt-1,Yt,yn,Bn):Ll(Bn,Qn):yn||(Bn[Bn.length]=Qn)}return Bn}var xp=Fm(),rm=Fm(!0);function xl(Rt,Vt){return Rt&&xp(Rt,Vt,Fs)}function kp(Rt,Vt){return Rt&&rm(Rt,Vt,Fs)}function _h(Rt,Vt){return Ps(Vt,function(Yt){return np(Rt[Yt])})}function Xl(Rt,Vt){Vt=Fu(Vt,Rt);for(var Yt=0,yn=Vt.length;Rt!=null&&YtVt}function y0(Rt,Vt){return Rt!=null&&qo.call(Rt,Vt)}function gy(Rt,Vt){return Rt!=null&&Vt in ko(Rt)}function H0(Rt,Vt,Yt){return Rt>=Ms(Vt,Yt)&&Rt<_s(Vt,Yt)}function Sp(Rt,Vt,Yt){for(var yn=Yt?ap:Nl,Bn=Rt[0].length,Wn=Rt.length,Xn=Wn,Qn=gr(Wn),ar=1/0,Ir=[];Xn--;){var Cr=Rt[Xn];Xn&&Vt&&(Cr=ba(Cr,Vs(Vt))),ar=Ms(Cr.length,ar),Qn[Xn]=!Yt&&(Vt||Bn>=120&&Cr.length>=120)?new Ru(Xn&&Cr):nt}Cr=Rt[0];var Or=-1,Qr=Qn[0];e:for(;++Or-1;)Qn!==Rt&&Pu.call(Qn,ar,1),Pu.call(Rt,ar,1);return Rt}function Os(Rt,Vt){for(var Yt=Rt?Vt.length:0,yn=Yt-1;Yt--;){var Bn=Vt[Yt];if(Yt==yn||Bn!==Wn){var Wn=Bn;tp(Bn)?Pu.call(Rt,Bn,1):Ey(Rt,Bn)}}return Rt}function cu(Rt,Vt){return Rt+Xp(ry()*(Vt-Rt+1))}function Pl(Rt,Vt,Yt,yn){for(var Bn=-1,Wn=_s(Kp((Vt-Rt)/(Yt||1)),0),Xn=gr(Wn);Wn--;)Xn[yn?Wn:++Bn]=Rt,Rt+=Yt;return Xn}function $p(Rt,Vt){var Yt="";if(!Rt||Vt<1||Vt>zt)return Yt;do Vt%2&&(Yt+=Rt),Vt=Xp(Vt/2),Vt&&(Rt+=Rt);while(Vt);return Yt}function mo(Rt,Vt){return _b(C1(Rt,Vt,Dl),Rt+"")}function b0(Rt){return tm(Vm(Rt))}function vy(Rt,Vt){var Yt=Vm(Rt);return I0(Yt,Ou(Vt,0,Yt.length))}function _f(Rt,Vt,Yt,yn){if(!ds(Rt))return Rt;Vt=Fu(Vt,Rt);for(var Bn=-1,Wn=Vt.length,Xn=Wn-1,Qn=Rt;Qn!=null&&++BnBn?0:Bn+Vt),Yt=Yt>Bn?Bn:Yt,Yt<0&&(Yt+=Bn),Bn=Vt>Yt?0:Yt-Vt>>>0,Vt>>>=0;for(var Wn=gr(Bn);++yn>>1,Xn=Rt[Wn];Xn!==null&&!Jl(Xn)&&(Yt?Xn<=Vt:Xn=it){var Ir=Vt?null:Ls(Rt);if(Ir)return Wp(Ir);Xn=!1,Bn=As,ar=new Ru}else ar=Vt?[]:Qn;e:for(;++yn=yn?Rt:El(Rt,Vt,Yt)}var x0=Yp||function(Rt){return ns.clearTimeout(Rt)};function Ay(Rt,Vt){if(Vt)return Rt.slice();var Yt=Rt.length,yn=_g?_g(Yt):new Rt.constructor(Yt);return Rt.copy(yn),yn}function Nm(Rt){var Vt=new Rt.constructor(Rt.byteLength);return new Gp(Vt).set(new Gp(Rt)),Vt}function G0(Rt,Vt){var Yt=Vt?Nm(Rt.buffer):Rt.buffer;return new Rt.constructor(Yt,Rt.byteOffset,Rt.byteLength)}function Ml(Rt){var Vt=new Rt.constructor(Rt.source,lr.exec(Rt));return Vt.lastIndex=Rt.lastIndex,Vt}function Cy(Rt){return _u?ko(_u.call(Rt)):{}}function k0(Rt,Vt){var Yt=Vt?Nm(Rt.buffer):Rt.buffer;return new Rt.constructor(Yt,Rt.byteOffset,Rt.length)}function Su(Rt,Vt){if(Rt!==Vt){var Yt=Rt!==nt,yn=Rt===null,Bn=Rt===Rt,Wn=Jl(Rt),Xn=Vt!==nt,Qn=Vt===null,ar=Vt===Vt,Ir=Jl(Vt);if(!Qn&&!Ir&&!Wn&&Rt>Vt||Wn&&Xn&&ar&&!Qn&&!Ir||yn&&Xn&&ar||!Yt&&ar||!Bn)return 1;if(!yn&&!Wn&&!Ir&&Rt=Qn)return ar;var Ir=Yt[yn];return ar*(Ir=="desc"?-1:1)}}return Rt.index-Vt.index}function zu(Rt,Vt,Yt,yn){for(var Bn=-1,Wn=Rt.length,Xn=Yt.length,Qn=-1,ar=Vt.length,Ir=_s(Wn-Xn,0),Cr=gr(ar+Ir),Or=!yn;++Qn1?Yt[Bn-1]:nt,Xn=Bn>2?Yt[2]:nt;for(Wn=Rt.length>3&&typeof Wn=="function"?(Bn--,Wn):nt,Xn&&Il(Yt[0],Yt[1],Xn)&&(Wn=Bn<3?nt:Wn,Bn=1),Vt=ko(Vt);++yn-1?Bn[Wn?Vt[Xn]:Xn]:nt}}function gn(Rt){return jo(function(Vt){var Yt=Vt.length,yn=Yt,Bn=Rs.prototype.thru;for(Rt&&Vt.reverse();yn--;){var Wn=Vt[yn];if(typeof Wn!="function")throw new Gs(at);if(Bn&&!Xn&&Um(Wn)=="wrapper")var Xn=new Rs([],!0)}for(yn=Xn?yn:Yt;++yn1&&Ho.reverse(),Cr&&arQn))return!1;var Ir=Wn.get(Rt),Cr=Wn.get(Vt);if(Ir&&Cr)return Ir==Vt&&Cr==Rt;var Or=-1,Qr=!0,uo=Yt>?new Ru:nt;for(Wn.set(Rt,Vt),Wn.set(Vt,Rt);++Or1?"& ":"")+Vt[yn],Vt=Vt.join(Yt>2?", ":" "),Rt.replace(dn,`{ /* [wrapped with `+Vt+`] */ -`)}function Aw(Rt){return Mo(Rt)||pm(Rt)||!!(ty&&Rt&&Rt[ty])}function tp(Rt,Vt){var Yt=typeof Rt;return Vt=Vt??zt,!!Vt&&(Yt=="number"||Yt!="symbol"&&Gr.test(Rt))&&Rt>-1&&Rt%1==0&&Rt0){if(++Vt>=Pt)return arguments[0]}else Vt=0;return Rt.apply(nt,arguments)}}function I0(Rt,Vt){var Yt=-1,yn=Rt.length,Bn=yn-1;for(Vt=Vt===nt?yn:Vt;++Yt1?Rt[Vt-1]:nt;return Yt=typeof Yt=="function"?(Rt.pop(),Yt):nt,F1(Rt,Yt)});function U1(Rt){var Vt=Fn(Rt);return Vt.__chain__=!0,Vt}function Lv(Rt,Vt){return Vt(Rt),Rt}function A0(Rt,Vt){return Vt(Rt)}var Fv=jo(function(Rt){var Vt=Rt.length,Yt=Vt?Rt[0]:0,yn=this.__wrapped__,Bn=function(Wn){return Im(Wn,Rt)};return Vt>1||this.__actions__.length||!(yn instanceof yo)||!tp(Yt)?this.thru(Bn):(yn=yn.slice(Yt,+Yt+(Vt?1:0)),yn.__actions__.push({func:A0,args:[Bn],thisArg:nt}),new Rs(yn,this.__chain__).thru(function(Wn){return Vt&&!Wn.length&&Wn.push(nt),Wn}))});function Uv(){return U1(this)}function zv(){return new Rs(this.value(),this.__chain__)}function Wv(){this.__values__===nt&&(this.__values__=tw(this.value()));var Rt=this.__index__>=this.__values__.length,Vt=Rt?nt:this.__values__[this.__index__++];return{done:Rt,value:Vt}}function Vv(){return this}function Hv(Rt){for(var Vt,Yt=this;Yt instanceof em;){var yn=B1(Yt);yn.__index__=0,yn.__values__=nt,Vt?Bn.__wrapped__=yn:Vt=yn;var Bn=yn;Yt=Yt.__wrapped__}return Bn.__wrapped__=Rt,Vt}function Gv(){var Rt=this.__wrapped__;if(Rt instanceof yo){var Vt=Rt;return this.__actions__.length&&(Vt=new yo(this)),Vt=Vt.reverse(),Vt.__actions__.push({func:A0,args:[e1],thisArg:nt}),new Rs(Vt,this.__chain__)}return this.thru(e1)}function qv(){return Nu(this.__wrapped__,this.__actions__)}var Yv=hm(function(Rt,Vt,Yt){qo.call(Rt,Yt)?++Rt[Yt]:lu(Rt,Yt,1)});function Kv(Rt,Vt,Yt){var yn=Mo(Rt)?Ym:V0;return Yt&&Il(Rt,Vt,Yt)&&(Vt=nt),yn(Rt,wo(Vt,3))}function Xv(Rt,Vt){var Yt=Mo(Rt)?Ps:my;return Yt(Rt,wo(Vt,3))}var Zv=tn(O1),Jv=tn(j1);function Qv(Rt,Vt){return Is(C0(Rt,Vt),1)}function e_(Rt,Vt){return Is(C0(Rt,Vt),Wt)}function t_(Rt,Vt,Yt){return Yt=Yt===nt?1:Do(Yt),Is(C0(Rt,Vt),Yt)}function z1(Rt,Vt){var Yt=Mo(Rt)?ws:Yl;return Yt(Rt,wo(Vt,3))}function W1(Rt,Vt){var Yt=Mo(Rt)?qm:m0;return Yt(Rt,wo(Vt,3))}var n_=hm(function(Rt,Vt,Yt){qo.call(Rt,Yt)?Rt[Yt].push(Vt):lu(Rt,Yt,[Vt])});function r_(Rt,Vt,Yt,yn){Rt=Bl(Rt)?Rt:Vm(Rt),Yt=Yt&&!yn?Do(Yt):0;var Bn=Rt.length;return Yt<0&&(Yt=_s(Bn+Yt,0)),B0(Rt)?Yt<=Bn&&Rt.indexOf(Vt,Yt)>-1:!!Bn&&Fl(Rt,Vt,Yt)>-1}var i_=mo(function(Rt,Vt,Yt){var yn=-1,Bn=typeof Vt=="function",Wn=Bl(Rt)?gr(Rt.length):[];return Yl(Rt,function(Xn){Wn[++yn]=Bn?Vo(Vt,Xn,Yt):xa(Xn,Vt,Yt)}),Wn}),o_=hm(function(Rt,Vt,Yt){lu(Rt,Yt,Vt)});function C0(Rt,Vt){var Yt=Mo(Rt)?ba:_d;return Yt(Rt,wo(Vt,3))}function a_(Rt,Vt,Yt,yn){return Rt==null?[]:(Mo(Vt)||(Vt=Vt==null?[]:[Vt]),Yt=yn?nt:Yt,Mo(Yt)||(Yt=Yt==null?[]:[Yt]),sm(Rt,Vt,Yt))}var s_=hm(function(Rt,Vt,Yt){Rt[Yt?0:1].push(Vt)},function(){return[[],[]]});function l_(Rt,Vt,Yt){var yn=Mo(Rt)?ym:Au,Bn=arguments.length<3;return yn(Rt,wo(Vt,4),Yt,Bn,Yl)}function c_(Rt,Vt,Yt){var yn=Mo(Rt)?By:Au,Bn=arguments.length<3;return yn(Rt,wo(Vt,4),Yt,Bn,m0)}function u_(Rt,Vt){var Yt=Mo(Rt)?Ps:my;return Yt(Rt,M0(wo(Vt,3)))}function h_(Rt){var Vt=Mo(Rt)?tm:b0;return Vt(Rt)}function d_(Rt,Vt,Yt){(Yt?Il(Rt,Vt,Yt):Vt===nt)?Vt=1:Vt=Do(Vt);var yn=Mo(Rt)?ly:vy;return yn(Rt,Vt)}function f_(Rt){var Vt=Mo(Rt)?f0:v0;return Vt(Rt)}function p_(Rt){if(Rt==null)return 0;if(Bl(Rt))return B0(Rt)?ru(Rt):Rt.length;var Vt=Ks(Rt);return Vt==Pn||Vt==An?Rt.size:Bs(Rt).length}function m_(Rt,Vt,Yt){var yn=Mo(Rt)?Np:xy;return Yt&&Il(Rt,Vt,Yt)&&(Vt=nt),yn(Rt,wo(Vt,3))}var g_=mo(function(Rt,Vt){if(Rt==null)return[];var Yt=Vt.length;return Yt>1&&Il(Rt,Vt[0],Vt[1])?Vt=[]:Yt>2&&Il(Vt[0],Vt[1],Vt[2])&&(Vt=[Vt[0]]),sm(Rt,Is(Vt,1),[])}),$0=Wy||function(){return ns.Date.now()};function y_(Rt,Vt){if(typeof Vt!="function")throw new Gs(at);return Rt=Do(Rt),function(){if(--Rt<1)return Vt.apply(this,arguments)}}function V1(Rt,Vt,Yt){return Vt=Yt?nt:Vt,Vt=Rt&&Vt==null?Rt.length:Vt,ur(Rt,At,nt,nt,nt,nt,Vt)}function H1(Rt,Vt){var Yt;if(typeof Vt!="function")throw new Gs(at);return Rt=Do(Rt),function(){return--Rt>0&&(Yt=Vt.apply(this,arguments)),Rt<=1&&(Vt=nt),Yt}}var r1=mo(function(Rt,Vt,Yt){var yn=yt;if(Yt.length){var Bn=Vl(Yt,zm(r1));yn|=St}return ur(Rt,yn,Vt,Yt,Bn)}),G1=mo(function(Rt,Vt,Yt){var yn=yt|bt;if(Yt.length){var Bn=Vl(Yt,zm(G1));yn|=St}return ur(Vt,yn,Rt,Yt,Bn)});function q1(Rt,Vt,Yt){Vt=Yt?nt:Vt;var yn=ur(Rt,xt,nt,nt,nt,nt,nt,Vt);return yn.placeholder=q1.placeholder,yn}function Y1(Rt,Vt,Yt){Vt=Yt?nt:Vt;var yn=ur(Rt,kt,nt,nt,nt,nt,nt,Vt);return yn.placeholder=Y1.placeholder,yn}function K1(Rt,Vt,Yt){var yn,Bn,Wn,Xn,Qn,ar,Ir=0,Cr=!1,Or=!1,Qr=!0;if(typeof Rt!="function")throw new Gs(at);Vt=fu(Vt)||0,ds(Yt)&&(Cr=!!Yt.leading,Or="maxWait"in Yt,Wn=Or?_s(fu(Yt.maxWait)||0,Vt):Wn,Qr="trailing"in Yt?!!Yt.trailing:Qr);function uo(Ss){var Tu=yn,ip=Bn;return yn=Bn=nt,Ir=Ss,Xn=Rt.apply(ip,Tu),Xn}function So(Ss){return Ir=Ss,Qn=My(Uo,Vt),Cr?uo(Ss):Xn}function Lo(Ss){var Tu=Ss-ar,ip=Ss-Ir,pw=Vt-Tu;return Or?Ms(pw,Wn-ip):pw}function Eo(Ss){var Tu=Ss-ar,ip=Ss-Ir;return ar===nt||Tu>=Vt||Tu<0||Or&&ip>=Wn}function Uo(){var Ss=$0();if(Eo(Ss))return Ho(Ss);Qn=My(Uo,Lo(Ss))}function Ho(Ss){return Qn=nt,Qr&&yn?uo(Ss):(yn=Bn=nt,Xn)}function Ql(){Qn!==nt&&x0(Qn),Ir=0,yn=ar=Bn=Qn=nt}function Al(){return Qn===nt?Xn:Ho($0())}function _c(){var Ss=$0(),Tu=Eo(Ss);if(yn=arguments,Bn=this,ar=Ss,Tu){if(Qn===nt)return So(ar);if(Or)return x0(Qn),Qn=My(Uo,Vt),uo(ar)}return Qn===nt&&(Qn=My(Uo,Vt)),Xn}return _c.cancel=Ql,_c.flush=Al,_c}var b_=mo(function(Rt,Vt){return fy(Rt,1,Vt)}),w_=mo(function(Rt,Vt,Yt){return fy(Rt,fu(Vt)||0,Yt)});function v_(Rt){return ur(Rt,$t)}function P0(Rt,Vt){if(typeof Rt!="function"||Vt!=null&&typeof Vt!="function")throw new Gs(at);var Yt=function(){var yn=arguments,Bn=Vt?Vt.apply(this,yn):yn[0],Wn=Yt.cache;if(Wn.has(Bn))return Wn.get(Bn);var Xn=Rt.apply(this,yn);return Yt.cache=Wn.set(Bn,Xn)||Wn,Xn};return Yt.cache=new(P0.Cache||$l),Yt}P0.Cache=$l;function M0(Rt){if(typeof Rt!="function")throw new Gs(at);return function(){var Vt=arguments;switch(Vt.length){case 0:return!Rt.call(this);case 1:return!Rt.call(this,Vt[0]);case 2:return!Rt.call(this,Vt[0],Vt[1]);case 3:return!Rt.call(this,Vt[0],Vt[1],Vt[2])}return!Rt.apply(this,Vt)}}function __(Rt){return H1(2,Rt)}var x_=_0(function(Rt,Vt){Vt=Vt.length==1&&Mo(Vt[0])?ba(Vt[0],Vs(wo())):ba(Is(Vt,1),Vs(wo()));var Yt=Vt.length;return mo(function(yn){for(var Bn=-1,Wn=Ms(yn.length,Yt);++Bn=Vt}),pm=Bo(function(){return arguments}())?Bo:function(Rt){return gs(Rt)&&qo.call(Rt,"callee")&&!xm.call(Rt,"callee")},Mo=gr.isArray,D_=yu?Vs(yu):fs;function Bl(Rt){return Rt!=null&&R0(Rt.length)&&!np(Rt)}function ks(Rt){return gs(Rt)&&Bl(Rt)}function N_(Rt){return Rt===!0||Rt===!1||gs(Rt)&&Cs(Rt)==nn}var Pp=Hy||m1,L_=Gu?Vs(Gu):ps;function F_(Rt){return gs(Rt)&&Rt.nodeType===1&&!Ry(Rt)}function U_(Rt){if(Rt==null)return!0;if(Bl(Rt)&&(Mo(Rt)||typeof Rt=="string"||typeof Rt.splice=="function"||Pp(Rt)||Wm(Rt)||pm(Rt)))return!Rt.length;var Vt=Ks(Rt);if(Vt==Pn||Vt==An)return!Rt.size;if(Py(Rt))return!Bs(Rt).length;for(var Yt in Rt)if(qo.call(Rt,Yt))return!1;return!0}function z_(Rt,Vt){return us(Rt,Vt)}function W_(Rt,Vt,Yt){Yt=typeof Yt=="function"?Yt:nt;var yn=Yt?Yt(Rt,Vt):nt;return yn===nt?us(Rt,Vt,nt,Yt):!!yn}function o1(Rt){if(!gs(Rt))return!1;var Vt=Cs(Rt);return Vt==an||Vt==vn||typeof Rt.message=="string"&&typeof Rt.name=="string"&&!Ry(Rt)}function V_(Rt){return typeof Rt=="number"&&ny(Rt)}function np(Rt){if(!ds(Rt))return!1;var Vt=Cs(Rt);return Vt==Qt||Vt==_n||Vt==rn||Vt==mn}function Z1(Rt){return typeof Rt=="number"&&Rt==Do(Rt)}function R0(Rt){return typeof Rt=="number"&&Rt>-1&&Rt%1==0&&Rt<=zt}function ds(Rt){var Vt=typeof Rt;return Rt!=null&&(Vt=="object"||Vt=="function")}function gs(Rt){return Rt!=null&&typeof Rt=="object"}var J1=Dp?Vs(Dp):Ep;function H_(Rt,Vt){return Rt===Vt||hs(Rt,Vt,K0(Vt))}function G_(Rt,Vt,Yt){return Yt=typeof Yt=="function"?Yt:nt,hs(Rt,Vt,K0(Vt),Yt)}function q_(Rt){return Q1(Rt)&&Rt!=+Rt}function Y_(Rt){if(Pw(Rt))throw new To(ot);return Tp(Rt)}function K_(Rt){return Rt===null}function X_(Rt){return Rt==null}function Q1(Rt){return typeof Rt=="number"||gs(Rt)&&Cs(Rt)==$n}function Ry(Rt){if(!gs(Rt)||Cs(Rt)!=Tn)return!1;var Vt=qp(Rt);if(Vt===null)return!0;var Yt=qo.call(Vt,"constructor")&&Vt.constructor;return typeof Yt=="function"&&Yt instanceof Yt&&yp.call(Yt)==Yu}var a1=bs?Vs(bs):Ip;function Z_(Rt){return Z1(Rt)&&Rt>=-zt&&Rt<=zt}var ew=$s?Vs($s):$m;function B0(Rt){return typeof Rt=="string"||!Mo(Rt)&&gs(Rt)&&Cs(Rt)==wn}function Jl(Rt){return typeof Rt=="symbol"||gs(Rt)&&Cs(Rt)==fn}var Wm=os?Vs(os):by;function J_(Rt){return Rt===nt}function Q_(Rt){return gs(Rt)&&Ks(Rt)==kn}function t2(Rt){return gs(Rt)&&Cs(Rt)==Dn}var n2=ho(om),r2=ho(function(Rt,Vt){return Rt<=Vt});function tw(Rt){if(!Rt)return[];if(Bl(Rt))return B0(Rt)?ss(Rt):Ns(Rt);if(Mu&&Rt[Mu])return up(Rt[Mu]());var Vt=Ks(Rt),Yt=Vt==Pn?zp:Vt==An?Wp:Vm;return Yt(Rt)}function rp(Rt){if(!Rt)return Rt===0?Rt:0;if(Rt=fu(Rt),Rt===Wt||Rt===-Wt){var Vt=Rt<0?-1:1;return Vt*Ft}return Rt===Rt?Rt:0}function Do(Rt){var Vt=rp(Rt),Yt=Vt%1;return Vt===Vt?Yt?Vt-Yt:Vt:0}function nw(Rt){return Rt?Ou(Do(Rt),0,Ut):0}function fu(Rt){if(typeof Rt=="number")return Rt;if(Jl(Rt))return Nt;if(ds(Rt)){var Vt=typeof Rt.valueOf=="function"?Rt.valueOf():Rt;Rt=ds(Vt)?Vt+"":Vt}if(typeof Rt!="string")return Rt===0?Rt:+Rt;Rt=wm(Rt);var Yt=Hr.test(Rt);return Yt||Nr.test(Rt)?jp(Rt.slice(2),Yt?2:8):cr.test(Rt)?Nt:+Rt}function rw(Rt){return Rl(Rt,Ol(Rt))}function i2(Rt){return Rt?Ou(Do(Rt),-zt,zt):Rt===0?Rt:0}function Qo(Rt){return Rt==null?"":js(Rt)}var o2=ep(function(Rt,Vt){if(Py(Vt)||Bl(Vt)){Rl(Vt,Fs(Vt),Rt);return}for(var Yt in Vt)qo.call(Vt,Yt)&&Gl(Rt,Yt,Vt[Yt])}),iw=ep(function(Rt,Vt){Rl(Vt,Ol(Vt),Rt)}),O0=ep(function(Rt,Vt,Yt,yn){Rl(Vt,Ol(Vt),Rt,yn)}),s2=ep(function(Rt,Vt,Yt,yn){Rl(Vt,Fs(Vt),Rt,yn)}),l2=jo(Im);function c2(Rt,Vt){var Yt=xu(Rt);return Vt==null?Yt:hy(Yt,Vt)}var u2=mo(function(Rt,Vt){Rt=ko(Rt);var Yt=-1,yn=Vt.length,Bn=yn>2?Vt[2]:nt;for(Bn&&Il(Vt[0],Vt[1],Bn)&&(yn=1);++Yt1),Wn}),Rl(Rt,zo(Rt),Yt),yn&&(Yt=_l(Yt,ht|dt|pt,_i));for(var Bn=Vt.length;Bn--;)Ey(Yt,Vt[Bn]);return Yt});function $2(Rt,Vt){return aw(Rt,M0(wo(Vt)))}var P2=jo(function(Rt,Vt){return Rt==null?{}:lm(Rt,Vt)});function aw(Rt,Vt){if(Rt==null)return{};var Yt=ba(zo(Rt),function(yn){return[yn]});return Vt=wo(Vt),Rm(Rt,Yt,function(yn,Bn){return Vt(yn,Bn[0])})}function M2(Rt,Vt,Yt){Vt=Fu(Vt,Rt);var yn=-1,Bn=Vt.length;for(Bn||(Bn=1,Rt=nt);++ynVt){var yn=Rt;Rt=Vt,Vt=yn}if(Yt||Rt%1||Vt%1){var Bn=ry();return Ms(Rt+Bn*(Vt-Rt+Op("1e-"+((Bn+"").length-1))),Vt)}return cu(Rt,Vt)}var W2=Bt(function(Rt,Vt,Yt){return Vt=Vt.toLowerCase(),Rt+(Yt?cw(Vt):Vt)});function cw(Rt){return c1(Qo(Rt).toLowerCase())}function uw(Rt){return Rt=Qo(Rt),Rt&&Rt.replace(eo,Ny).replace(ts,"")}function V2(Rt,Vt,Yt){Rt=Qo(Rt),Vt=js(Vt);var yn=Rt.length;Yt=Yt===nt?yn:Ou(Do(Yt),0,yn);var Bn=Yt;return Yt-=Vt.length,Yt>=0&&Rt.slice(Yt,Bn)==Vt}function H2(Rt){return Rt=Qo(Rt),Rt&&Tr.test(Rt)?Rt.replace(xr,Ly):Rt}function G2(Rt){return Rt=Qo(Rt),Rt&&go.test(Rt)?Rt.replace(Dr,"\\$&"):Rt}var q2=Bt(function(Rt,Vt,Yt){return Rt+(Yt?"-":"")+Vt.toLowerCase()}),Y2=Bt(function(Rt,Vt,Yt){return Rt+(Yt?" ":"")+Vt.toLowerCase()}),K2=E0("toLowerCase");function X2(Rt,Vt,Yt){Rt=Qo(Rt),Vt=Do(Vt);var yn=Vt?ru(Rt):0;if(!Vt||yn>=Vt)return Rt;var Bn=(Vt-yn)/2;return Vr(Xp(Bn),Yt)+Rt+Vr(Kp(Bn),Yt)}function Z2(Rt,Vt,Yt){Rt=Qo(Rt),Vt=Do(Vt);var yn=Vt?ru(Rt):0;return Vt&&yn>>0,Yt?(Rt=Qo(Rt),Rt&&(typeof Vt=="string"||Vt!=null&&!a1(Vt))&&(Vt=js(Vt),!Vt&&qu(Rt))?Uu(ss(Rt),0,Yt):Rt.split(Vt,Yt)):[]}var ix=Bt(function(Rt,Vt,Yt){return Rt+(Yt?" ":"")+c1(Vt)});function ox(Rt,Vt,Yt){return Rt=Qo(Rt),Yt=Yt==null?0:Ou(Do(Yt),0,Rt.length),Vt=js(Vt),Rt.slice(Yt,Yt+Vt.length)==Vt}function ax(Rt,Vt,Yt){var yn=Fn.templateSettings;Yt&&Il(Rt,Vt,Yt)&&(Vt=nt),Rt=Qo(Rt),Vt=O0({},Vt,yn,or);var Bn=O0({},Vt.imports,yn.imports,or),Wn=Fs(Bn),Xn=Hs(Bn,Wn),Qn,ar,Ir=0,Cr=Vt.interpolate||Zr,Or="__p += '",Qr=Es((Vt.escape||Zr).source+"|"+Cr.source+"|"+(Cr===jr?nr:Zr).source+"|"+(Vt.evaluate||Zr).source+"|$","g"),uo="//# sourceURL="+(qo.call(Vt,"sourceURL")?(Vt.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Xs+"]")+` +`)}function Cw(Rt){return Mo(Rt)||pm(Rt)||!!(ty&&Rt&&Rt[ty])}function tp(Rt,Vt){var Yt=typeof Rt;return Vt=Vt??zt,!!Vt&&(Yt=="number"||Yt!="symbol"&&Gr.test(Rt))&&Rt>-1&&Rt%1==0&&Rt0){if(++Vt>=Pt)return arguments[0]}else Vt=0;return Rt.apply(nt,arguments)}}function I0(Rt,Vt){var Yt=-1,yn=Rt.length,Bn=yn-1;for(Vt=Vt===nt?yn:Vt;++Yt1?Rt[Vt-1]:nt;return Yt=typeof Yt=="function"?(Rt.pop(),Yt):nt,U1(Rt,Yt)});function z1(Rt){var Vt=Fn(Rt);return Vt.__chain__=!0,Vt}function Fv(Rt,Vt){return Vt(Rt),Rt}function A0(Rt,Vt){return Vt(Rt)}var Uv=jo(function(Rt){var Vt=Rt.length,Yt=Vt?Rt[0]:0,yn=this.__wrapped__,Bn=function(Wn){return Im(Wn,Rt)};return Vt>1||this.__actions__.length||!(yn instanceof yo)||!tp(Yt)?this.thru(Bn):(yn=yn.slice(Yt,+Yt+(Vt?1:0)),yn.__actions__.push({func:A0,args:[Bn],thisArg:nt}),new Rs(yn,this.__chain__).thru(function(Wn){return Vt&&!Wn.length&&Wn.push(nt),Wn}))});function zv(){return z1(this)}function Wv(){return new Rs(this.value(),this.__chain__)}function Vv(){this.__values__===nt&&(this.__values__=nw(this.value()));var Rt=this.__index__>=this.__values__.length,Vt=Rt?nt:this.__values__[this.__index__++];return{done:Rt,value:Vt}}function Hv(){return this}function Gv(Rt){for(var Vt,Yt=this;Yt instanceof em;){var yn=O1(Yt);yn.__index__=0,yn.__values__=nt,Vt?Bn.__wrapped__=yn:Vt=yn;var Bn=yn;Yt=Yt.__wrapped__}return Bn.__wrapped__=Rt,Vt}function qv(){var Rt=this.__wrapped__;if(Rt instanceof yo){var Vt=Rt;return this.__actions__.length&&(Vt=new yo(this)),Vt=Vt.reverse(),Vt.__actions__.push({func:A0,args:[e1],thisArg:nt}),new Rs(Vt,this.__chain__)}return this.thru(e1)}function Yv(){return Nu(this.__wrapped__,this.__actions__)}var Kv=hm(function(Rt,Vt,Yt){qo.call(Rt,Yt)?++Rt[Yt]:lu(Rt,Yt,1)});function Xv(Rt,Vt,Yt){var yn=Mo(Rt)?Ym:V0;return Yt&&Il(Rt,Vt,Yt)&&(Vt=nt),yn(Rt,wo(Vt,3))}function Zv(Rt,Vt){var Yt=Mo(Rt)?Ps:my;return Yt(Rt,wo(Vt,3))}var Jv=tn(j1),Qv=tn(D1);function e_(Rt,Vt){return Is(C0(Rt,Vt),1)}function t_(Rt,Vt){return Is(C0(Rt,Vt),Wt)}function n_(Rt,Vt,Yt){return Yt=Yt===nt?1:Do(Yt),Is(C0(Rt,Vt),Yt)}function W1(Rt,Vt){var Yt=Mo(Rt)?ws:Yl;return Yt(Rt,wo(Vt,3))}function V1(Rt,Vt){var Yt=Mo(Rt)?qm:m0;return Yt(Rt,wo(Vt,3))}var r_=hm(function(Rt,Vt,Yt){qo.call(Rt,Yt)?Rt[Yt].push(Vt):lu(Rt,Yt,[Vt])});function i_(Rt,Vt,Yt,yn){Rt=Bl(Rt)?Rt:Vm(Rt),Yt=Yt&&!yn?Do(Yt):0;var Bn=Rt.length;return Yt<0&&(Yt=_s(Bn+Yt,0)),B0(Rt)?Yt<=Bn&&Rt.indexOf(Vt,Yt)>-1:!!Bn&&Fl(Rt,Vt,Yt)>-1}var o_=mo(function(Rt,Vt,Yt){var yn=-1,Bn=typeof Vt=="function",Wn=Bl(Rt)?gr(Rt.length):[];return Yl(Rt,function(Xn){Wn[++yn]=Bn?Vo(Vt,Xn,Yt):xa(Xn,Vt,Yt)}),Wn}),a_=hm(function(Rt,Vt,Yt){lu(Rt,Yt,Vt)});function C0(Rt,Vt){var Yt=Mo(Rt)?ba:_d;return Yt(Rt,wo(Vt,3))}function s_(Rt,Vt,Yt,yn){return Rt==null?[]:(Mo(Vt)||(Vt=Vt==null?[]:[Vt]),Yt=yn?nt:Yt,Mo(Yt)||(Yt=Yt==null?[]:[Yt]),sm(Rt,Vt,Yt))}var l_=hm(function(Rt,Vt,Yt){Rt[Yt?0:1].push(Vt)},function(){return[[],[]]});function c_(Rt,Vt,Yt){var yn=Mo(Rt)?ym:Au,Bn=arguments.length<3;return yn(Rt,wo(Vt,4),Yt,Bn,Yl)}function u_(Rt,Vt,Yt){var yn=Mo(Rt)?By:Au,Bn=arguments.length<3;return yn(Rt,wo(Vt,4),Yt,Bn,m0)}function h_(Rt,Vt){var Yt=Mo(Rt)?Ps:my;return Yt(Rt,M0(wo(Vt,3)))}function d_(Rt){var Vt=Mo(Rt)?tm:b0;return Vt(Rt)}function f_(Rt,Vt,Yt){(Yt?Il(Rt,Vt,Yt):Vt===nt)?Vt=1:Vt=Do(Vt);var yn=Mo(Rt)?ly:vy;return yn(Rt,Vt)}function p_(Rt){var Vt=Mo(Rt)?f0:v0;return Vt(Rt)}function m_(Rt){if(Rt==null)return 0;if(Bl(Rt))return B0(Rt)?ru(Rt):Rt.length;var Vt=Ks(Rt);return Vt==Pn||Vt==An?Rt.size:Bs(Rt).length}function g_(Rt,Vt,Yt){var yn=Mo(Rt)?Np:xy;return Yt&&Il(Rt,Vt,Yt)&&(Vt=nt),yn(Rt,wo(Vt,3))}var y_=mo(function(Rt,Vt){if(Rt==null)return[];var Yt=Vt.length;return Yt>1&&Il(Rt,Vt[0],Vt[1])?Vt=[]:Yt>2&&Il(Vt[0],Vt[1],Vt[2])&&(Vt=[Vt[0]]),sm(Rt,Is(Vt,1),[])}),$0=Wy||function(){return ns.Date.now()};function b_(Rt,Vt){if(typeof Vt!="function")throw new Gs(at);return Rt=Do(Rt),function(){if(--Rt<1)return Vt.apply(this,arguments)}}function H1(Rt,Vt,Yt){return Vt=Yt?nt:Vt,Vt=Rt&&Vt==null?Rt.length:Vt,ur(Rt,At,nt,nt,nt,nt,Vt)}function G1(Rt,Vt){var Yt;if(typeof Vt!="function")throw new Gs(at);return Rt=Do(Rt),function(){return--Rt>0&&(Yt=Vt.apply(this,arguments)),Rt<=1&&(Vt=nt),Yt}}var r1=mo(function(Rt,Vt,Yt){var yn=yt;if(Yt.length){var Bn=Vl(Yt,zm(r1));yn|=St}return ur(Rt,yn,Vt,Yt,Bn)}),q1=mo(function(Rt,Vt,Yt){var yn=yt|bt;if(Yt.length){var Bn=Vl(Yt,zm(q1));yn|=St}return ur(Vt,yn,Rt,Yt,Bn)});function Y1(Rt,Vt,Yt){Vt=Yt?nt:Vt;var yn=ur(Rt,xt,nt,nt,nt,nt,nt,Vt);return yn.placeholder=Y1.placeholder,yn}function K1(Rt,Vt,Yt){Vt=Yt?nt:Vt;var yn=ur(Rt,kt,nt,nt,nt,nt,nt,Vt);return yn.placeholder=K1.placeholder,yn}function X1(Rt,Vt,Yt){var yn,Bn,Wn,Xn,Qn,ar,Ir=0,Cr=!1,Or=!1,Qr=!0;if(typeof Rt!="function")throw new Gs(at);Vt=fu(Vt)||0,ds(Yt)&&(Cr=!!Yt.leading,Or="maxWait"in Yt,Wn=Or?_s(fu(Yt.maxWait)||0,Vt):Wn,Qr="trailing"in Yt?!!Yt.trailing:Qr);function uo(Ss){var Tu=yn,ip=Bn;return yn=Bn=nt,Ir=Ss,Xn=Rt.apply(ip,Tu),Xn}function So(Ss){return Ir=Ss,Qn=My(Uo,Vt),Cr?uo(Ss):Xn}function Lo(Ss){var Tu=Ss-ar,ip=Ss-Ir,mw=Vt-Tu;return Or?Ms(mw,Wn-ip):mw}function Eo(Ss){var Tu=Ss-ar,ip=Ss-Ir;return ar===nt||Tu>=Vt||Tu<0||Or&&ip>=Wn}function Uo(){var Ss=$0();if(Eo(Ss))return Ho(Ss);Qn=My(Uo,Lo(Ss))}function Ho(Ss){return Qn=nt,Qr&&yn?uo(Ss):(yn=Bn=nt,Xn)}function Ql(){Qn!==nt&&x0(Qn),Ir=0,yn=ar=Bn=Qn=nt}function Al(){return Qn===nt?Xn:Ho($0())}function _c(){var Ss=$0(),Tu=Eo(Ss);if(yn=arguments,Bn=this,ar=Ss,Tu){if(Qn===nt)return So(ar);if(Or)return x0(Qn),Qn=My(Uo,Vt),uo(ar)}return Qn===nt&&(Qn=My(Uo,Vt)),Xn}return _c.cancel=Ql,_c.flush=Al,_c}var w_=mo(function(Rt,Vt){return fy(Rt,1,Vt)}),v_=mo(function(Rt,Vt,Yt){return fy(Rt,fu(Vt)||0,Yt)});function __(Rt){return ur(Rt,$t)}function P0(Rt,Vt){if(typeof Rt!="function"||Vt!=null&&typeof Vt!="function")throw new Gs(at);var Yt=function(){var yn=arguments,Bn=Vt?Vt.apply(this,yn):yn[0],Wn=Yt.cache;if(Wn.has(Bn))return Wn.get(Bn);var Xn=Rt.apply(this,yn);return Yt.cache=Wn.set(Bn,Xn)||Wn,Xn};return Yt.cache=new(P0.Cache||$l),Yt}P0.Cache=$l;function M0(Rt){if(typeof Rt!="function")throw new Gs(at);return function(){var Vt=arguments;switch(Vt.length){case 0:return!Rt.call(this);case 1:return!Rt.call(this,Vt[0]);case 2:return!Rt.call(this,Vt[0],Vt[1]);case 3:return!Rt.call(this,Vt[0],Vt[1],Vt[2])}return!Rt.apply(this,Vt)}}function x_(Rt){return G1(2,Rt)}var k_=_0(function(Rt,Vt){Vt=Vt.length==1&&Mo(Vt[0])?ba(Vt[0],Vs(wo())):ba(Is(Vt,1),Vs(wo()));var Yt=Vt.length;return mo(function(yn){for(var Bn=-1,Wn=Ms(yn.length,Yt);++Bn=Vt}),pm=Bo(function(){return arguments}())?Bo:function(Rt){return gs(Rt)&&qo.call(Rt,"callee")&&!xm.call(Rt,"callee")},Mo=gr.isArray,N_=yu?Vs(yu):fs;function Bl(Rt){return Rt!=null&&R0(Rt.length)&&!np(Rt)}function ks(Rt){return gs(Rt)&&Bl(Rt)}function L_(Rt){return Rt===!0||Rt===!1||gs(Rt)&&Cs(Rt)==nn}var Pp=Hy||m1,F_=Gu?Vs(Gu):ps;function U_(Rt){return gs(Rt)&&Rt.nodeType===1&&!Ry(Rt)}function z_(Rt){if(Rt==null)return!0;if(Bl(Rt)&&(Mo(Rt)||typeof Rt=="string"||typeof Rt.splice=="function"||Pp(Rt)||Wm(Rt)||pm(Rt)))return!Rt.length;var Vt=Ks(Rt);if(Vt==Pn||Vt==An)return!Rt.size;if(Py(Rt))return!Bs(Rt).length;for(var Yt in Rt)if(qo.call(Rt,Yt))return!1;return!0}function W_(Rt,Vt){return us(Rt,Vt)}function V_(Rt,Vt,Yt){Yt=typeof Yt=="function"?Yt:nt;var yn=Yt?Yt(Rt,Vt):nt;return yn===nt?us(Rt,Vt,nt,Yt):!!yn}function o1(Rt){if(!gs(Rt))return!1;var Vt=Cs(Rt);return Vt==an||Vt==vn||typeof Rt.message=="string"&&typeof Rt.name=="string"&&!Ry(Rt)}function H_(Rt){return typeof Rt=="number"&&ny(Rt)}function np(Rt){if(!ds(Rt))return!1;var Vt=Cs(Rt);return Vt==Qt||Vt==_n||Vt==rn||Vt==mn}function J1(Rt){return typeof Rt=="number"&&Rt==Do(Rt)}function R0(Rt){return typeof Rt=="number"&&Rt>-1&&Rt%1==0&&Rt<=zt}function ds(Rt){var Vt=typeof Rt;return Rt!=null&&(Vt=="object"||Vt=="function")}function gs(Rt){return Rt!=null&&typeof Rt=="object"}var Q1=Dp?Vs(Dp):Ep;function G_(Rt,Vt){return Rt===Vt||hs(Rt,Vt,K0(Vt))}function q_(Rt,Vt,Yt){return Yt=typeof Yt=="function"?Yt:nt,hs(Rt,Vt,K0(Vt),Yt)}function Y_(Rt){return ew(Rt)&&Rt!=+Rt}function K_(Rt){if(Mw(Rt))throw new To(ot);return Tp(Rt)}function X_(Rt){return Rt===null}function Z_(Rt){return Rt==null}function ew(Rt){return typeof Rt=="number"||gs(Rt)&&Cs(Rt)==$n}function Ry(Rt){if(!gs(Rt)||Cs(Rt)!=Tn)return!1;var Vt=qp(Rt);if(Vt===null)return!0;var Yt=qo.call(Vt,"constructor")&&Vt.constructor;return typeof Yt=="function"&&Yt instanceof Yt&&yp.call(Yt)==Yu}var a1=bs?Vs(bs):Ip;function J_(Rt){return J1(Rt)&&Rt>=-zt&&Rt<=zt}var tw=$s?Vs($s):$m;function B0(Rt){return typeof Rt=="string"||!Mo(Rt)&&gs(Rt)&&Cs(Rt)==wn}function Jl(Rt){return typeof Rt=="symbol"||gs(Rt)&&Cs(Rt)==fn}var Wm=os?Vs(os):by;function Q_(Rt){return Rt===nt}function t2(Rt){return gs(Rt)&&Ks(Rt)==kn}function n2(Rt){return gs(Rt)&&Cs(Rt)==Dn}var r2=ho(om),i2=ho(function(Rt,Vt){return Rt<=Vt});function nw(Rt){if(!Rt)return[];if(Bl(Rt))return B0(Rt)?ss(Rt):Ns(Rt);if(Mu&&Rt[Mu])return up(Rt[Mu]());var Vt=Ks(Rt),Yt=Vt==Pn?zp:Vt==An?Wp:Vm;return Yt(Rt)}function rp(Rt){if(!Rt)return Rt===0?Rt:0;if(Rt=fu(Rt),Rt===Wt||Rt===-Wt){var Vt=Rt<0?-1:1;return Vt*Ft}return Rt===Rt?Rt:0}function Do(Rt){var Vt=rp(Rt),Yt=Vt%1;return Vt===Vt?Yt?Vt-Yt:Vt:0}function rw(Rt){return Rt?Ou(Do(Rt),0,Ut):0}function fu(Rt){if(typeof Rt=="number")return Rt;if(Jl(Rt))return Nt;if(ds(Rt)){var Vt=typeof Rt.valueOf=="function"?Rt.valueOf():Rt;Rt=ds(Vt)?Vt+"":Vt}if(typeof Rt!="string")return Rt===0?Rt:+Rt;Rt=wm(Rt);var Yt=Hr.test(Rt);return Yt||Nr.test(Rt)?jp(Rt.slice(2),Yt?2:8):cr.test(Rt)?Nt:+Rt}function iw(Rt){return Rl(Rt,Ol(Rt))}function o2(Rt){return Rt?Ou(Do(Rt),-zt,zt):Rt===0?Rt:0}function Qo(Rt){return Rt==null?"":js(Rt)}var s2=ep(function(Rt,Vt){if(Py(Vt)||Bl(Vt)){Rl(Vt,Fs(Vt),Rt);return}for(var Yt in Vt)qo.call(Vt,Yt)&&Gl(Rt,Yt,Vt[Yt])}),ow=ep(function(Rt,Vt){Rl(Vt,Ol(Vt),Rt)}),O0=ep(function(Rt,Vt,Yt,yn){Rl(Vt,Ol(Vt),Rt,yn)}),l2=ep(function(Rt,Vt,Yt,yn){Rl(Vt,Fs(Vt),Rt,yn)}),c2=jo(Im);function u2(Rt,Vt){var Yt=xu(Rt);return Vt==null?Yt:hy(Yt,Vt)}var h2=mo(function(Rt,Vt){Rt=ko(Rt);var Yt=-1,yn=Vt.length,Bn=yn>2?Vt[2]:nt;for(Bn&&Il(Vt[0],Vt[1],Bn)&&(yn=1);++Yt1),Wn}),Rl(Rt,zo(Rt),Yt),yn&&(Yt=_l(Yt,ht|dt|pt,_i));for(var Bn=Vt.length;Bn--;)Ey(Yt,Vt[Bn]);return Yt});function P2(Rt,Vt){return sw(Rt,M0(wo(Vt)))}var M2=jo(function(Rt,Vt){return Rt==null?{}:lm(Rt,Vt)});function sw(Rt,Vt){if(Rt==null)return{};var Yt=ba(zo(Rt),function(yn){return[yn]});return Vt=wo(Vt),Rm(Rt,Yt,function(yn,Bn){return Vt(yn,Bn[0])})}function R2(Rt,Vt,Yt){Vt=Fu(Vt,Rt);var yn=-1,Bn=Vt.length;for(Bn||(Bn=1,Rt=nt);++ynVt){var yn=Rt;Rt=Vt,Vt=yn}if(Yt||Rt%1||Vt%1){var Bn=ry();return Ms(Rt+Bn*(Vt-Rt+Op("1e-"+((Bn+"").length-1))),Vt)}return cu(Rt,Vt)}var V2=Bt(function(Rt,Vt,Yt){return Vt=Vt.toLowerCase(),Rt+(Yt?uw(Vt):Vt)});function uw(Rt){return c1(Qo(Rt).toLowerCase())}function hw(Rt){return Rt=Qo(Rt),Rt&&Rt.replace(eo,Ny).replace(ts,"")}function H2(Rt,Vt,Yt){Rt=Qo(Rt),Vt=js(Vt);var yn=Rt.length;Yt=Yt===nt?yn:Ou(Do(Yt),0,yn);var Bn=Yt;return Yt-=Vt.length,Yt>=0&&Rt.slice(Yt,Bn)==Vt}function G2(Rt){return Rt=Qo(Rt),Rt&&Tr.test(Rt)?Rt.replace(xr,Ly):Rt}function q2(Rt){return Rt=Qo(Rt),Rt&&go.test(Rt)?Rt.replace(Dr,"\\$&"):Rt}var Y2=Bt(function(Rt,Vt,Yt){return Rt+(Yt?"-":"")+Vt.toLowerCase()}),K2=Bt(function(Rt,Vt,Yt){return Rt+(Yt?" ":"")+Vt.toLowerCase()}),X2=E0("toLowerCase");function Z2(Rt,Vt,Yt){Rt=Qo(Rt),Vt=Do(Vt);var yn=Vt?ru(Rt):0;if(!Vt||yn>=Vt)return Rt;var Bn=(Vt-yn)/2;return Vr(Xp(Bn),Yt)+Rt+Vr(Kp(Bn),Yt)}function J2(Rt,Vt,Yt){Rt=Qo(Rt),Vt=Do(Vt);var yn=Vt?ru(Rt):0;return Vt&&yn>>0,Yt?(Rt=Qo(Rt),Rt&&(typeof Vt=="string"||Vt!=null&&!a1(Vt))&&(Vt=js(Vt),!Vt&&qu(Rt))?Uu(ss(Rt),0,Yt):Rt.split(Vt,Yt)):[]}var ox=Bt(function(Rt,Vt,Yt){return Rt+(Yt?" ":"")+c1(Vt)});function ax(Rt,Vt,Yt){return Rt=Qo(Rt),Yt=Yt==null?0:Ou(Do(Yt),0,Rt.length),Vt=js(Vt),Rt.slice(Yt,Yt+Vt.length)==Vt}function sx(Rt,Vt,Yt){var yn=Fn.templateSettings;Yt&&Il(Rt,Vt,Yt)&&(Vt=nt),Rt=Qo(Rt),Vt=O0({},Vt,yn,or);var Bn=O0({},Vt.imports,yn.imports,or),Wn=Fs(Bn),Xn=Hs(Bn,Wn),Qn,ar,Ir=0,Cr=Vt.interpolate||Zr,Or="__p += '",Qr=Es((Vt.escape||Zr).source+"|"+Cr.source+"|"+(Cr===jr?nr:Zr).source+"|"+(Vt.evaluate||Zr).source+"|$","g"),uo="//# sourceURL="+(qo.call(Vt,"sourceURL")?(Vt.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Xs+"]")+` `;Rt.replace(Qr,function(Eo,Uo,Ho,Ql,Al,_c){return Ho||(Ho=Ql),Or+=Rt.slice(Ir,_c).replace(Jr,Xm),Uo&&(Qn=!0,Or+=`' + __e(`+Uo+`) + '`),Al&&(ar=!0,Or+=`'; @@ -7194,7 +7230,7 @@ __p += '`),Ho&&(Or+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Or+`return __p -}`;var Lo=dw(function(){return $o(Wn,uo+"return "+Or).apply(nt,Xn)});if(Lo.source=Or,o1(Lo))throw Lo;return Lo}function sx(Rt){return Qo(Rt).toLowerCase()}function lx(Rt){return Qo(Rt).toUpperCase()}function cx(Rt,Vt,Yt){if(Rt=Qo(Rt),Rt&&(Yt||Vt===nt))return wm(Rt);if(!Rt||!(Vt=js(Vt)))return Rt;var yn=ss(Rt),Bn=ss(Vt),Wn=_a(yn,Bn),Xn=cp(yn,Bn)+1;return Uu(yn,Wn,Xn).join("")}function ux(Rt,Vt,Yt){if(Rt=Qo(Rt),Rt&&(Yt||Vt===nt))return Rt.slice(0,fp(Rt)+1);if(!Rt||!(Vt=js(Vt)))return Rt;var yn=ss(Rt),Bn=cp(yn,ss(Vt))+1;return Uu(yn,0,Bn).join("")}function hx(Rt,Vt,Yt){if(Rt=Qo(Rt),Rt&&(Yt||Vt===nt))return Rt.replace(xn,"");if(!Rt||!(Vt=js(Vt)))return Rt;var yn=ss(Rt),Bn=_a(yn,ss(Vt));return Uu(yn,Bn).join("")}function dx(Rt,Vt){var Yt=Dt,yn=jt;if(ds(Vt)){var Bn="separator"in Vt?Vt.separator:Bn;Yt="length"in Vt?Do(Vt.length):Yt,yn="omission"in Vt?js(Vt.omission):yn}Rt=Qo(Rt);var Wn=Rt.length;if(qu(Rt)){var Xn=ss(Rt);Wn=Xn.length}if(Yt>=Wn)return Rt;var Qn=Yt-ru(yn);if(Qn<1)return yn;var ar=Xn?Uu(Xn,0,Qn).join(""):Rt.slice(0,Qn);if(Bn===nt)return ar+yn;if(Xn&&(Qn+=ar.length-Qn),a1(Bn)){if(Rt.slice(Qn).search(Bn)){var Ir,Cr=ar;for(Bn.global||(Bn=Es(Bn.source,Qo(lr.exec(Bn))+"g")),Bn.lastIndex=0;Ir=Bn.exec(Cr);)var Or=Ir.index;ar=ar.slice(0,Or===nt?Qn:Or)}}else if(Rt.indexOf(js(Bn),Qn)!=Qn){var Qr=ar.lastIndexOf(Bn);Qr>-1&&(ar=ar.slice(0,Qr))}return ar+yn}function fx(Rt){return Rt=Qo(Rt),Rt&&io.test(Rt)?Rt.replace(fr,pp):Rt}var mx=Bt(function(Rt,Vt,Yt){return Rt+(Yt?" ":"")+Vt.toUpperCase()}),c1=E0("toUpperCase");function hw(Rt,Vt,Yt){return Rt=Qo(Rt),Vt=Yt?nt:Vt,Vt===nt?Up(Rt)?mp(Rt):jy(Rt):Rt.match(Vt)||[]}var dw=mo(function(Rt,Vt){try{return Vo(Rt,nt,Vt)}catch(Yt){return o1(Yt)?Yt:new To(Yt)}}),gx=jo(function(Rt,Vt){return ws(Vt,function(Yt){Yt=Wu(Yt),lu(Rt,Yt,r1(Rt[Yt],Rt))}),Rt});function yx(Rt){var Vt=Rt==null?0:Rt.length,Yt=wo();return Rt=Vt?ba(Rt,function(yn){if(typeof yn[1]!="function")throw new Gs(at);return[Yt(yn[0]),yn[1]]}):[],mo(function(yn){for(var Bn=-1;++Bnzt)return[];var Yt=Ut,yn=Ms(Rt,Ut);Vt=wo(Vt),Rt-=Ut;for(var Bn=wu(yn,Vt);++Yt0||Vt<0)?new yo(Yt):(Rt<0?Yt=Yt.takeRight(-Rt):Rt&&(Yt=Yt.drop(Rt)),Vt!==nt&&(Vt=Do(Vt),Yt=Vt<0?Yt.dropRight(-Vt):Yt.take(Vt-Rt)),Yt)},yo.prototype.takeRightWhile=function(Rt){return this.reverse().takeWhile(Rt).reverse()},yo.prototype.toArray=function(){return this.take(Ut)},xl(yo.prototype,function(Rt,Vt){var Yt=/^(?:filter|find|map|reject)|While$/.test(Vt),yn=/^(?:head|last)$/.test(Vt),Bn=Fn[yn?"take"+(Vt=="last"?"Right":""):Vt],Wn=yn||/^find/.test(Vt);Bn&&(Fn.prototype[Vt]=function(){var Xn=this.__wrapped__,Qn=yn?[1]:arguments,ar=Xn instanceof yo,Ir=Qn[0],Cr=ar||Mo(Xn),Or=function(Uo){var Ho=Bn.apply(Fn,Ll([Uo],Qn));return yn&&Qr?Ho[0]:Ho};Cr&&Yt&&typeof Ir=="function"&&Ir.length!=1&&(ar=Cr=!1);var Qr=this.__chain__,uo=!!this.__actions__.length,So=Wn&&!Qr,Lo=ar&&!uo;if(!Wn&&Cr){Xn=Lo?Xn:new yo(this);var Eo=Rt.apply(Xn,Qn);return Eo.__actions__.push({func:A0,args:[Or],thisArg:nt}),new Rs(Eo,Qr)}return So&&Lo?Rt.apply(this,Qn):(Eo=this.thru(Or),So?yn?Eo.value()[0]:Eo.value():Eo)})}),ws(["pop","push","shift","sort","splice","unshift"],function(Rt){var Vt=$u[Rt],Yt=/^(?:push|sort|unshift)$/.test(Rt)?"tap":"thru",yn=/^(?:pop|shift)$/.test(Rt);Fn.prototype[Rt]=function(){var Bn=arguments;if(yn&&!this.__chain__){var Wn=this.value();return Vt.apply(Mo(Wn)?Wn:[],Bn)}return this[Yt](function(Xn){return Vt.apply(Mo(Xn)?Xn:[],Bn)})}}),xl(yo.prototype,function(Rt,Vt){var Yt=Fn[Vt];if(Yt){var yn=Yt.name+"";qo.call(Zu,yn)||(Zu[yn]=[]),Zu[yn].push({name:Vt,func:Yt})}}),Zu[Cn(nt,bt).name]=[{name:"wrapper",func:nt}],yo.prototype.clone=L0,yo.prototype.reverse=F0,yo.prototype.value=yl,Fn.prototype.at=Fv,Fn.prototype.chain=Uv,Fn.prototype.commit=zv,Fn.prototype.next=Wv,Fn.prototype.plant=Hv,Fn.prototype.reverse=Gv,Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=qv,Fn.prototype.first=Fn.prototype.head,Mu&&(Fn.prototype[Mu]=Vv),Fn},Cu=zy();ls?((ls.exports=Cu)._=Cu,gu._=Cu):ns._=Cu}).call(commonjsGlobal)})(lodash,lodash.exports);var lodashExports=lodash.exports;const AudioIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"Audio",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1506_147",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1506_147)",children:jsxRuntimeExports.jsx("path",{id:"headphones",d:"M4.48719 13.6667H3.53851C3.20175 13.6667 2.91671 13.55 2.68337 13.3167C2.45004 13.0833 2.33337 12.7983 2.33337 12.4615V8.00002C2.33337 7.21337 2.4821 6.47654 2.77954 5.78952C3.07697 5.10251 3.48124 4.50345 3.99234 3.99234C4.50345 3.48124 5.10247 3.07697 5.78941 2.77954C6.47634 2.4821 7.21309 2.33337 7.99966 2.33337C8.78622 2.33337 9.5231 2.4821 10.2103 2.77954C10.8975 3.07697 11.4966 3.48124 12.0077 3.99234C12.5188 4.50345 12.9231 5.10251 13.2205 5.78952C13.518 6.47654 13.6667 7.21337 13.6667 8.00002V12.4615C13.6667 12.7983 13.55 13.0833 13.3167 13.3167C13.0833 13.55 12.7983 13.6667 12.4615 13.6667H11.5129C11.1814 13.6667 10.8977 13.5487 10.6617 13.3127C10.4257 13.0767 10.3077 12.793 10.3077 12.4615V10.1539C10.3077 9.82247 10.4257 9.53878 10.6617 9.30278C10.8977 9.06676 11.1814 8.94876 11.5129 8.94876H12.6667V8.00002C12.6667 6.70002 12.2139 5.59725 11.3084 4.69169C10.4028 3.78614 9.30002 3.33336 8.00002 3.33336C6.70002 3.33336 5.59725 3.78614 4.69169 4.69169C3.78614 5.59725 3.33336 6.70002 3.33336 8.00002V8.94876H4.48719C4.8186 8.94876 5.10231 9.06676 5.33831 9.30278C5.57431 9.53878 5.69231 9.82247 5.69231 10.1539V12.4615C5.69231 12.793 5.57431 13.0767 5.33831 13.3127C5.10231 13.5487 4.8186 13.6667 4.48719 13.6667Z",fill:"currentColor"})})]})}),BudgetIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 22 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14 16C11.7667 16 9.875 15.225 8.325 13.675C6.775 12.125 6 10.2333 6 8C6 5.76667 6.775 3.875 8.325 2.325C9.875 0.775 11.7667 0 14 0C16.2333 0 18.125 0.775 19.675 2.325C21.225 3.875 22 5.76667 22 8C22 10.2333 21.225 12.125 19.675 13.675C18.125 15.225 16.2333 16 14 16ZM4.625 15.25C3.225 14.6 2.10433 13.625 1.263 12.325C0.421 11.025 0 9.58333 0 8C0 6.41667 0.421 4.975 1.263 3.675C2.10433 2.375 3.225 1.4 4.625 0.75C4.975 0.583333 5.29167 0.595667 5.575 0.787C5.85833 0.979 6 1.29167 6 1.725C6 1.89167 5.946 2.054 5.838 2.212C5.72933 2.37067 5.59167 2.49167 5.425 2.575C4.375 3.05833 3.54167 3.78733 2.925 4.762C2.30833 5.73733 2 6.81667 2 8C2 9.18333 2.30833 10.2623 2.925 11.237C3.54167 12.2123 4.375 12.9417 5.425 13.425C5.59167 13.5083 5.72933 13.625 5.838 13.775C5.946 13.925 6 14.0917 6 14.275C6 14.6917 5.85833 15 5.575 15.2C5.29167 15.4 4.975 15.4167 4.625 15.25ZM14 14C15.6667 14 17.0833 13.4167 18.25 12.25C19.4167 11.0833 20 9.66667 20 8C20 6.33333 19.4167 4.91667 18.25 3.75C17.0833 2.58333 15.6667 2 14 2C12.3333 2 10.9167 2.58333 9.75 3.75C8.58333 4.91667 8 6.33333 8 8C8 9.66667 8.58333 11.0833 9.75 12.25C10.9167 13.4167 12.3333 14 14 14Z",fill:"currentColor"})}),NodesIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"Nodes",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1506_141",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1506_141)",children:jsxRuntimeExports.jsx("path",{id:"hub",d:"M4.00071 15.1667C3.49166 15.1667 3.05873 14.9886 2.70189 14.6322C2.34506 14.2759 2.16664 13.8432 2.16664 13.3341C2.16664 12.8251 2.3449 12.3922 2.70141 12.0353C3.05793 11.6785 3.49084 11.5001 4.00014 11.5001C4.14275 11.5001 4.28286 11.5178 4.42048 11.5533C4.55808 11.5887 4.68799 11.6364 4.81021 11.6962L6.13204 10.0513C5.85512 9.74962 5.66409 9.41201 5.55896 9.03851C5.45384 8.66501 5.43247 8.28938 5.49486 7.91161L3.57431 7.2757C3.40679 7.54493 3.18652 7.76074 2.91351 7.92313C2.6405 8.08552 2.33598 8.16671 1.99996 8.16671C1.4907 8.16671 1.05784 7.98855 0.701359 7.63221C0.344882 7.27588 0.166637 6.84319 0.166626 6.33415C0.166626 5.8251 0.344793 5.39217 0.701126 5.03533C1.05746 4.6785 1.49015 4.50008 1.99919 4.50008C2.50824 4.50008 2.94118 4.67832 3.29801 5.0348C3.65484 5.39128 3.83326 5.82414 3.83328 6.3334C3.83328 6.37272 3.83221 6.40563 3.83008 6.43211C3.82794 6.45861 3.82688 6.48511 3.82688 6.51161L5.74101 7.177C5.92476 6.83683 6.17711 6.54496 6.49806 6.30138C6.81899 6.05779 7.18715 5.90138 7.60253 5.83215V3.78595C7.17347 3.68509 6.82689 3.46821 6.56279 3.13531C6.29869 2.80241 6.16664 2.42312 6.16664 1.99742C6.16664 1.49064 6.34481 1.05883 6.70114 0.701999C7.05748 0.345166 7.49016 0.166748 7.99921 0.166748C8.50825 0.166748 8.94119 0.344987 9.29803 0.701465C9.65486 1.05794 9.83328 1.49081 9.83328 2.00007C9.83328 2.424 9.69951 2.80241 9.43199 3.13531C9.16448 3.46821 8.81961 3.68509 8.39739 3.78595V5.83215C8.81277 5.90138 9.17986 6.05779 9.49866 6.30138C9.81746 6.54496 10.0709 6.83683 10.2589 7.177L12.173 6.51161C12.1688 6.48084 12.1666 6.45327 12.1666 6.42892V6.3334C12.1666 5.82414 12.3448 5.39128 12.7011 5.0348C13.0575 4.67832 13.4902 4.50008 13.9992 4.50008C14.5083 4.50008 14.9412 4.67825 15.298 5.03458C15.6549 5.39091 15.8333 5.8236 15.8333 6.33265C15.8333 6.84169 15.655 7.27463 15.2986 7.63146C14.9421 7.9883 14.5092 8.16671 14 8.16671C13.6653 8.16671 13.3594 8.08552 13.0823 7.92313C12.8052 7.76074 12.5863 7.54493 12.4256 7.2757L10.5051 7.91161C10.5674 8.28938 10.5461 8.6633 10.441 9.03338C10.3358 9.40347 10.1448 9.74065 9.86788 10.0449L11.1897 11.6796C11.3119 11.624 11.4418 11.5802 11.5794 11.5481C11.7171 11.5161 11.8572 11.5001 11.9998 11.5001C12.5091 11.5001 12.942 11.6782 13.2985 12.0346C13.655 12.3909 13.8333 12.8236 13.8333 13.3326C13.8333 13.8417 13.6551 14.2746 13.2988 14.6315C12.9424 14.9883 12.5098 15.1667 12.0007 15.1667C11.4917 15.1667 11.0587 14.9885 10.7019 14.632C10.3451 14.2755 10.1666 13.8427 10.1666 13.3334C10.1666 13.1232 10.2006 12.9208 10.2686 12.7264C10.3365 12.5319 10.438 12.3535 10.573 12.1911L9.25123 10.5334C8.8726 10.759 8.45488 10.8718 7.99804 10.8718C7.54121 10.8718 7.12134 10.759 6.73844 10.5334L5.42688 12.1911C5.55764 12.3535 5.65807 12.5319 5.72816 12.7264C5.79824 12.9208 5.83328 13.1232 5.83328 13.3334C5.83328 13.8427 5.65511 14.2755 5.29878 14.632C4.94244 14.9885 4.50975 15.1667 4.00071 15.1667Z",fill:"currentColor"})})]})}),TwitterIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"Twitter",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1506_167",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1506_167)",children:jsxRuntimeExports.jsx("g",{id:"X",children:jsxRuntimeExports.jsx("path",{id:"path1009",d:"M2.0317 2L7.05085 8.71109L2 14.1675H3.13674L7.55875 9.39033L11.1316 14.1675H15L9.69845 7.07891L14.3997 2H13.263L9.19054 6.39967L5.90008 2H2.0317ZM3.70336 2.83733H5.48051L13.3281 13.33H11.5509L3.70336 2.83733Z",fill:"currentColor"})})})]})}),VideoIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"Video",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1506_153",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1506_153)",children:jsxRuntimeExports.jsx("path",{id:"Subtract","fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.3782 3.03719C15.0725 3.22309 15.6201 3.76987 15.8053 4.46427C16.1429 5.72367 16.1429 8.35001 16.1429 8.35001C16.1429 8.35001 16.1429 10.9773 15.8053 12.2358C15.6201 12.9302 15.0725 13.4769 14.3782 13.6628C13.1197 14 8.07143 14 8.07143 14C8.07143 14 3.02403 14 1.76471 13.6628C1.07038 13.4769 0.522808 12.9302 0.337533 12.2358C0 10.9764 0 8.35001 0 8.35001C0 8.35001 0 5.72367 0.337533 4.46427C0.522808 3.76987 1.07038 3.22309 1.76471 3.03719C3.02312 2.70001 8.07143 2.70001 8.07143 2.70001C8.07143 2.70001 13.1197 2.70001 14.3782 3.03719ZM10.4931 8.35003L6.45735 5.9286V10.7715L10.4931 8.35003Z",fill:"currentColor"})})]})}),EpisodeIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"Episode",children:[jsxRuntimeExports.jsx("rect",{id:"Rectangle 4456",x:"0.5",y:"5.625",width:"1em",height:"1em",rx:"0.5",stroke:"white"}),jsxRuntimeExports.jsx("path",{id:"Rectangle 4457",d:"M2.0625 3.0625H12.0625C12.6148 3.0625 13.0625 3.51022 13.0625 4.0625V9.9375",stroke:"white"}),jsxRuntimeExports.jsx("path",{id:"Rectangle 4458",d:"M4.125 1H14.125C14.6773 1 15.125 1.44772 15.125 2V7.875",stroke:"white"})]})}),Stats=()=>{const[tt,et]=reactExports.useState(null),[nt]=useUserStore(it=>[it.budget]);function rt(it){return it===null?"?":it.toLocaleString().split(",").join(" ")}return reactExports.useEffect(()=>{(async()=>{try{const ot=await api.get("/stats");ot&&et({numAudio:ot.num_audio,numContributors:ot.num_contributors,numDaily:ot.num_daily,numEpisodes:ot.num_episodes,numNodes:ot.num_nodes,numTwitterSpace:ot.num_twitter_space,numVideo:ot.num_video})}catch{lodashExports.noop()}})()},[]),tt?jsxRuntimeExports.jsxs(StatisticsContainer,{children:[jsxRuntimeExports.jsxs(StatisticsWrapper,{children:[jsxRuntimeExports.jsxs(Stat,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(NodesIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:tt.numNodes})]}),jsxRuntimeExports.jsxs(Stat,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(EpisodeIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:tt.numEpisodes})]}),jsxRuntimeExports.jsxs(Stat,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(AudioIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:tt.numAudio})]}),jsxRuntimeExports.jsxs(Stat,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(VideoIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:tt.numVideo})]}),jsxRuntimeExports.jsxs(Stat,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(TwitterIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:tt.numTwitterSpace})]})]}),jsxRuntimeExports.jsx(StatisticsBudget,{children:jsxRuntimeExports.jsxs(Budget,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(BudgetIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:jsxRuntimeExports.jsxs("p",{children:[`${rt(nt)} `," ",jsxRuntimeExports.jsx("span",{className:"budgetUnit",children:"SAT"})]})})]})})]}):null},StatisticsWrapper=styled$4(Flex).attrs({align:"center",direction:"row",grow:1,justify:"flex-start"})``,StatisticsBudget=styled$4(Flex).attrs({align:"center",direction:"row",grow:1,justify:"flex-end"})``,StatisticsContainer=styled$4(Flex).attrs({align:"center",direction:"row",grow:1})` +}`;var Lo=fw(function(){return $o(Wn,uo+"return "+Or).apply(nt,Xn)});if(Lo.source=Or,o1(Lo))throw Lo;return Lo}function lx(Rt){return Qo(Rt).toLowerCase()}function cx(Rt){return Qo(Rt).toUpperCase()}function ux(Rt,Vt,Yt){if(Rt=Qo(Rt),Rt&&(Yt||Vt===nt))return wm(Rt);if(!Rt||!(Vt=js(Vt)))return Rt;var yn=ss(Rt),Bn=ss(Vt),Wn=_a(yn,Bn),Xn=cp(yn,Bn)+1;return Uu(yn,Wn,Xn).join("")}function hx(Rt,Vt,Yt){if(Rt=Qo(Rt),Rt&&(Yt||Vt===nt))return Rt.slice(0,fp(Rt)+1);if(!Rt||!(Vt=js(Vt)))return Rt;var yn=ss(Rt),Bn=cp(yn,ss(Vt))+1;return Uu(yn,0,Bn).join("")}function dx(Rt,Vt,Yt){if(Rt=Qo(Rt),Rt&&(Yt||Vt===nt))return Rt.replace(xn,"");if(!Rt||!(Vt=js(Vt)))return Rt;var yn=ss(Rt),Bn=_a(yn,ss(Vt));return Uu(yn,Bn).join("")}function fx(Rt,Vt){var Yt=Dt,yn=jt;if(ds(Vt)){var Bn="separator"in Vt?Vt.separator:Bn;Yt="length"in Vt?Do(Vt.length):Yt,yn="omission"in Vt?js(Vt.omission):yn}Rt=Qo(Rt);var Wn=Rt.length;if(qu(Rt)){var Xn=ss(Rt);Wn=Xn.length}if(Yt>=Wn)return Rt;var Qn=Yt-ru(yn);if(Qn<1)return yn;var ar=Xn?Uu(Xn,0,Qn).join(""):Rt.slice(0,Qn);if(Bn===nt)return ar+yn;if(Xn&&(Qn+=ar.length-Qn),a1(Bn)){if(Rt.slice(Qn).search(Bn)){var Ir,Cr=ar;for(Bn.global||(Bn=Es(Bn.source,Qo(lr.exec(Bn))+"g")),Bn.lastIndex=0;Ir=Bn.exec(Cr);)var Or=Ir.index;ar=ar.slice(0,Or===nt?Qn:Or)}}else if(Rt.indexOf(js(Bn),Qn)!=Qn){var Qr=ar.lastIndexOf(Bn);Qr>-1&&(ar=ar.slice(0,Qr))}return ar+yn}function mx(Rt){return Rt=Qo(Rt),Rt&&io.test(Rt)?Rt.replace(fr,pp):Rt}var gx=Bt(function(Rt,Vt,Yt){return Rt+(Yt?" ":"")+Vt.toUpperCase()}),c1=E0("toUpperCase");function dw(Rt,Vt,Yt){return Rt=Qo(Rt),Vt=Yt?nt:Vt,Vt===nt?Up(Rt)?mp(Rt):jy(Rt):Rt.match(Vt)||[]}var fw=mo(function(Rt,Vt){try{return Vo(Rt,nt,Vt)}catch(Yt){return o1(Yt)?Yt:new To(Yt)}}),yx=jo(function(Rt,Vt){return ws(Vt,function(Yt){Yt=Wu(Yt),lu(Rt,Yt,r1(Rt[Yt],Rt))}),Rt});function bx(Rt){var Vt=Rt==null?0:Rt.length,Yt=wo();return Rt=Vt?ba(Rt,function(yn){if(typeof yn[1]!="function")throw new Gs(at);return[Yt(yn[0]),yn[1]]}):[],mo(function(yn){for(var Bn=-1;++Bnzt)return[];var Yt=Ut,yn=Ms(Rt,Ut);Vt=wo(Vt),Rt-=Ut;for(var Bn=wu(yn,Vt);++Yt0||Vt<0)?new yo(Yt):(Rt<0?Yt=Yt.takeRight(-Rt):Rt&&(Yt=Yt.drop(Rt)),Vt!==nt&&(Vt=Do(Vt),Yt=Vt<0?Yt.dropRight(-Vt):Yt.take(Vt-Rt)),Yt)},yo.prototype.takeRightWhile=function(Rt){return this.reverse().takeWhile(Rt).reverse()},yo.prototype.toArray=function(){return this.take(Ut)},xl(yo.prototype,function(Rt,Vt){var Yt=/^(?:filter|find|map|reject)|While$/.test(Vt),yn=/^(?:head|last)$/.test(Vt),Bn=Fn[yn?"take"+(Vt=="last"?"Right":""):Vt],Wn=yn||/^find/.test(Vt);Bn&&(Fn.prototype[Vt]=function(){var Xn=this.__wrapped__,Qn=yn?[1]:arguments,ar=Xn instanceof yo,Ir=Qn[0],Cr=ar||Mo(Xn),Or=function(Uo){var Ho=Bn.apply(Fn,Ll([Uo],Qn));return yn&&Qr?Ho[0]:Ho};Cr&&Yt&&typeof Ir=="function"&&Ir.length!=1&&(ar=Cr=!1);var Qr=this.__chain__,uo=!!this.__actions__.length,So=Wn&&!Qr,Lo=ar&&!uo;if(!Wn&&Cr){Xn=Lo?Xn:new yo(this);var Eo=Rt.apply(Xn,Qn);return Eo.__actions__.push({func:A0,args:[Or],thisArg:nt}),new Rs(Eo,Qr)}return So&&Lo?Rt.apply(this,Qn):(Eo=this.thru(Or),So?yn?Eo.value()[0]:Eo.value():Eo)})}),ws(["pop","push","shift","sort","splice","unshift"],function(Rt){var Vt=$u[Rt],Yt=/^(?:push|sort|unshift)$/.test(Rt)?"tap":"thru",yn=/^(?:pop|shift)$/.test(Rt);Fn.prototype[Rt]=function(){var Bn=arguments;if(yn&&!this.__chain__){var Wn=this.value();return Vt.apply(Mo(Wn)?Wn:[],Bn)}return this[Yt](function(Xn){return Vt.apply(Mo(Xn)?Xn:[],Bn)})}}),xl(yo.prototype,function(Rt,Vt){var Yt=Fn[Vt];if(Yt){var yn=Yt.name+"";qo.call(Zu,yn)||(Zu[yn]=[]),Zu[yn].push({name:Vt,func:Yt})}}),Zu[Cn(nt,bt).name]=[{name:"wrapper",func:nt}],yo.prototype.clone=L0,yo.prototype.reverse=F0,yo.prototype.value=yl,Fn.prototype.at=Uv,Fn.prototype.chain=zv,Fn.prototype.commit=Wv,Fn.prototype.next=Vv,Fn.prototype.plant=Gv,Fn.prototype.reverse=qv,Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=Yv,Fn.prototype.first=Fn.prototype.head,Mu&&(Fn.prototype[Mu]=Hv),Fn},Cu=zy();ls?((ls.exports=Cu)._=Cu,gu._=Cu):ns._=Cu}).call(commonjsGlobal)})(lodash,lodash.exports);var lodashExports=lodash.exports;const AudioIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"Audio",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1506_147",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1506_147)",children:jsxRuntimeExports.jsx("path",{id:"headphones",d:"M4.48719 13.6667H3.53851C3.20175 13.6667 2.91671 13.55 2.68337 13.3167C2.45004 13.0833 2.33337 12.7983 2.33337 12.4615V8.00002C2.33337 7.21337 2.4821 6.47654 2.77954 5.78952C3.07697 5.10251 3.48124 4.50345 3.99234 3.99234C4.50345 3.48124 5.10247 3.07697 5.78941 2.77954C6.47634 2.4821 7.21309 2.33337 7.99966 2.33337C8.78622 2.33337 9.5231 2.4821 10.2103 2.77954C10.8975 3.07697 11.4966 3.48124 12.0077 3.99234C12.5188 4.50345 12.9231 5.10251 13.2205 5.78952C13.518 6.47654 13.6667 7.21337 13.6667 8.00002V12.4615C13.6667 12.7983 13.55 13.0833 13.3167 13.3167C13.0833 13.55 12.7983 13.6667 12.4615 13.6667H11.5129C11.1814 13.6667 10.8977 13.5487 10.6617 13.3127C10.4257 13.0767 10.3077 12.793 10.3077 12.4615V10.1539C10.3077 9.82247 10.4257 9.53878 10.6617 9.30278C10.8977 9.06676 11.1814 8.94876 11.5129 8.94876H12.6667V8.00002C12.6667 6.70002 12.2139 5.59725 11.3084 4.69169C10.4028 3.78614 9.30002 3.33336 8.00002 3.33336C6.70002 3.33336 5.59725 3.78614 4.69169 4.69169C3.78614 5.59725 3.33336 6.70002 3.33336 8.00002V8.94876H4.48719C4.8186 8.94876 5.10231 9.06676 5.33831 9.30278C5.57431 9.53878 5.69231 9.82247 5.69231 10.1539V12.4615C5.69231 12.793 5.57431 13.0767 5.33831 13.3127C5.10231 13.5487 4.8186 13.6667 4.48719 13.6667Z",fill:"currentColor"})})]})}),BudgetIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 22 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M14 16C11.7667 16 9.875 15.225 8.325 13.675C6.775 12.125 6 10.2333 6 8C6 5.76667 6.775 3.875 8.325 2.325C9.875 0.775 11.7667 0 14 0C16.2333 0 18.125 0.775 19.675 2.325C21.225 3.875 22 5.76667 22 8C22 10.2333 21.225 12.125 19.675 13.675C18.125 15.225 16.2333 16 14 16ZM4.625 15.25C3.225 14.6 2.10433 13.625 1.263 12.325C0.421 11.025 0 9.58333 0 8C0 6.41667 0.421 4.975 1.263 3.675C2.10433 2.375 3.225 1.4 4.625 0.75C4.975 0.583333 5.29167 0.595667 5.575 0.787C5.85833 0.979 6 1.29167 6 1.725C6 1.89167 5.946 2.054 5.838 2.212C5.72933 2.37067 5.59167 2.49167 5.425 2.575C4.375 3.05833 3.54167 3.78733 2.925 4.762C2.30833 5.73733 2 6.81667 2 8C2 9.18333 2.30833 10.2623 2.925 11.237C3.54167 12.2123 4.375 12.9417 5.425 13.425C5.59167 13.5083 5.72933 13.625 5.838 13.775C5.946 13.925 6 14.0917 6 14.275C6 14.6917 5.85833 15 5.575 15.2C5.29167 15.4 4.975 15.4167 4.625 15.25ZM14 14C15.6667 14 17.0833 13.4167 18.25 12.25C19.4167 11.0833 20 9.66667 20 8C20 6.33333 19.4167 4.91667 18.25 3.75C17.0833 2.58333 15.6667 2 14 2C12.3333 2 10.9167 2.58333 9.75 3.75C8.58333 4.91667 8 6.33333 8 8C8 9.66667 8.58333 11.0833 9.75 12.25C10.9167 13.4167 12.3333 14 14 14Z",fill:"currentColor"})}),NodesIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"Nodes",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1506_141",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1506_141)",children:jsxRuntimeExports.jsx("path",{id:"hub",d:"M4.00071 15.1667C3.49166 15.1667 3.05873 14.9886 2.70189 14.6322C2.34506 14.2759 2.16664 13.8432 2.16664 13.3341C2.16664 12.8251 2.3449 12.3922 2.70141 12.0353C3.05793 11.6785 3.49084 11.5001 4.00014 11.5001C4.14275 11.5001 4.28286 11.5178 4.42048 11.5533C4.55808 11.5887 4.68799 11.6364 4.81021 11.6962L6.13204 10.0513C5.85512 9.74962 5.66409 9.41201 5.55896 9.03851C5.45384 8.66501 5.43247 8.28938 5.49486 7.91161L3.57431 7.2757C3.40679 7.54493 3.18652 7.76074 2.91351 7.92313C2.6405 8.08552 2.33598 8.16671 1.99996 8.16671C1.4907 8.16671 1.05784 7.98855 0.701359 7.63221C0.344882 7.27588 0.166637 6.84319 0.166626 6.33415C0.166626 5.8251 0.344793 5.39217 0.701126 5.03533C1.05746 4.6785 1.49015 4.50008 1.99919 4.50008C2.50824 4.50008 2.94118 4.67832 3.29801 5.0348C3.65484 5.39128 3.83326 5.82414 3.83328 6.3334C3.83328 6.37272 3.83221 6.40563 3.83008 6.43211C3.82794 6.45861 3.82688 6.48511 3.82688 6.51161L5.74101 7.177C5.92476 6.83683 6.17711 6.54496 6.49806 6.30138C6.81899 6.05779 7.18715 5.90138 7.60253 5.83215V3.78595C7.17347 3.68509 6.82689 3.46821 6.56279 3.13531C6.29869 2.80241 6.16664 2.42312 6.16664 1.99742C6.16664 1.49064 6.34481 1.05883 6.70114 0.701999C7.05748 0.345166 7.49016 0.166748 7.99921 0.166748C8.50825 0.166748 8.94119 0.344987 9.29803 0.701465C9.65486 1.05794 9.83328 1.49081 9.83328 2.00007C9.83328 2.424 9.69951 2.80241 9.43199 3.13531C9.16448 3.46821 8.81961 3.68509 8.39739 3.78595V5.83215C8.81277 5.90138 9.17986 6.05779 9.49866 6.30138C9.81746 6.54496 10.0709 6.83683 10.2589 7.177L12.173 6.51161C12.1688 6.48084 12.1666 6.45327 12.1666 6.42892V6.3334C12.1666 5.82414 12.3448 5.39128 12.7011 5.0348C13.0575 4.67832 13.4902 4.50008 13.9992 4.50008C14.5083 4.50008 14.9412 4.67825 15.298 5.03458C15.6549 5.39091 15.8333 5.8236 15.8333 6.33265C15.8333 6.84169 15.655 7.27463 15.2986 7.63146C14.9421 7.9883 14.5092 8.16671 14 8.16671C13.6653 8.16671 13.3594 8.08552 13.0823 7.92313C12.8052 7.76074 12.5863 7.54493 12.4256 7.2757L10.5051 7.91161C10.5674 8.28938 10.5461 8.6633 10.441 9.03338C10.3358 9.40347 10.1448 9.74065 9.86788 10.0449L11.1897 11.6796C11.3119 11.624 11.4418 11.5802 11.5794 11.5481C11.7171 11.5161 11.8572 11.5001 11.9998 11.5001C12.5091 11.5001 12.942 11.6782 13.2985 12.0346C13.655 12.3909 13.8333 12.8236 13.8333 13.3326C13.8333 13.8417 13.6551 14.2746 13.2988 14.6315C12.9424 14.9883 12.5098 15.1667 12.0007 15.1667C11.4917 15.1667 11.0587 14.9885 10.7019 14.632C10.3451 14.2755 10.1666 13.8427 10.1666 13.3334C10.1666 13.1232 10.2006 12.9208 10.2686 12.7264C10.3365 12.5319 10.438 12.3535 10.573 12.1911L9.25123 10.5334C8.8726 10.759 8.45488 10.8718 7.99804 10.8718C7.54121 10.8718 7.12134 10.759 6.73844 10.5334L5.42688 12.1911C5.55764 12.3535 5.65807 12.5319 5.72816 12.7264C5.79824 12.9208 5.83328 13.1232 5.83328 13.3334C5.83328 13.8427 5.65511 14.2755 5.29878 14.632C4.94244 14.9885 4.50975 15.1667 4.00071 15.1667Z",fill:"currentColor"})})]})}),TwitterIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"Twitter",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1506_167",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1506_167)",children:jsxRuntimeExports.jsx("g",{id:"X",children:jsxRuntimeExports.jsx("path",{id:"path1009",d:"M2.0317 2L7.05085 8.71109L2 14.1675H3.13674L7.55875 9.39033L11.1316 14.1675H15L9.69845 7.07891L14.3997 2H13.263L9.19054 6.39967L5.90008 2H2.0317ZM3.70336 2.83733H5.48051L13.3281 13.33H11.5509L3.70336 2.83733Z",fill:"currentColor"})})})]})}),VideoIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"Video",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1506_153",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1506_153)",children:jsxRuntimeExports.jsx("path",{id:"Subtract","fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.3782 3.03719C15.0725 3.22309 15.6201 3.76987 15.8053 4.46427C16.1429 5.72367 16.1429 8.35001 16.1429 8.35001C16.1429 8.35001 16.1429 10.9773 15.8053 12.2358C15.6201 12.9302 15.0725 13.4769 14.3782 13.6628C13.1197 14 8.07143 14 8.07143 14C8.07143 14 3.02403 14 1.76471 13.6628C1.07038 13.4769 0.522808 12.9302 0.337533 12.2358C0 10.9764 0 8.35001 0 8.35001C0 8.35001 0 5.72367 0.337533 4.46427C0.522808 3.76987 1.07038 3.22309 1.76471 3.03719C3.02312 2.70001 8.07143 2.70001 8.07143 2.70001C8.07143 2.70001 13.1197 2.70001 14.3782 3.03719ZM10.4931 8.35003L6.45735 5.9286V10.7715L10.4931 8.35003Z",fill:"currentColor"})})]})}),EpisodeIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 12",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"Episode",children:[jsxRuntimeExports.jsx("rect",{id:"Rectangle 4456",x:"0.5",y:"5.625",width:"1em",height:"1em",rx:"0.5",stroke:"white"}),jsxRuntimeExports.jsx("path",{id:"Rectangle 4457",d:"M2.0625 3.0625H12.0625C12.6148 3.0625 13.0625 3.51022 13.0625 4.0625V9.9375",stroke:"white"}),jsxRuntimeExports.jsx("path",{id:"Rectangle 4458",d:"M4.125 1H14.125C14.6773 1 15.125 1.44772 15.125 2V7.875",stroke:"white"})]})}),Stats=()=>{const[tt,et]=reactExports.useState(null),[nt]=useUserStore(it=>[it.budget]);function rt(it){return it===null?"?":it.toLocaleString().split(",").join(" ")}return reactExports.useEffect(()=>{(async()=>{try{const ot=await api.get("/stats");ot&&et({numAudio:ot.num_audio,numContributors:ot.num_contributors,numDaily:ot.num_daily,numEpisodes:ot.num_episodes,numNodes:ot.num_nodes,numTwitterSpace:ot.num_twitter_space,numVideo:ot.num_video})}catch{lodashExports.noop()}})()},[]),tt?jsxRuntimeExports.jsxs(StatisticsContainer,{children:[jsxRuntimeExports.jsxs(StatisticsWrapper,{children:[jsxRuntimeExports.jsxs(Stat,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(NodesIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:tt.numNodes})]}),jsxRuntimeExports.jsxs(Stat,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(EpisodeIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:tt.numEpisodes})]}),jsxRuntimeExports.jsxs(Stat,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(AudioIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:tt.numAudio})]}),jsxRuntimeExports.jsxs(Stat,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(VideoIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:tt.numVideo})]}),jsxRuntimeExports.jsxs(Stat,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(TwitterIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:tt.numTwitterSpace})]})]}),jsxRuntimeExports.jsx(StatisticsBudget,{children:jsxRuntimeExports.jsxs(Budget,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(BudgetIcon,{})}),jsxRuntimeExports.jsx("div",{className:"text",children:jsxRuntimeExports.jsxs("p",{children:[`${rt(nt)} `," ",jsxRuntimeExports.jsx("span",{className:"budgetUnit",children:"SAT"})]})})]})})]}):null},StatisticsWrapper=styled$4(Flex).attrs({align:"center",direction:"row",grow:1,justify:"flex-start"})``,StatisticsBudget=styled$4(Flex).attrs({align:"center",direction:"row",grow:1,justify:"flex-end"})``,StatisticsContainer=styled$4(Flex).attrs({align:"center",direction:"row",grow:1})` justify-content: between; `,Stat=styled$4(Flex).attrs({align:"center",direction:"row",justify:"flex-start"})` color: ${colors.white}; @@ -7303,16 +7339,7 @@ function print() { __p += __j.call(arguments, '') } `));if(tt.utils===null)throw new Error(["MUI: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(` `));const et=reactExports.useMemo(()=>_extends$u({},DEFAULT_LOCALE,tt.localeText),[tt.localeText]);return reactExports.useMemo(()=>_extends$u({},tt,{localeText:et}),[tt,et])},useUtils=()=>useLocalizationContext().utils,useDefaultDates=()=>useLocalizationContext().defaultDates,useLocaleText=()=>useLocalizationContext().localeText,useNow=tt=>{const et=useUtils(),nt=reactExports.useRef();return nt.current===void 0&&(nt.current=et.dateWithTimezone(void 0,tt)),nt.current},ArrowDropDownIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),ArrowLeftIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),ArrowRightIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),CalendarIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar");createSvgIcon(jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),jsxRuntimeExports.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange");createSvgIcon(jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),jsxRuntimeExports.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");const ClearIcon=createSvgIcon(jsxRuntimeExports.jsx("path",{d:"M19 6.41 17.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"}),"Clear");function getPickersArrowSwitcherUtilityClass(tt){return generateUtilityClass("MuiPickersArrowSwitcher",tt)}generateUtilityClasses("MuiPickersArrowSwitcher",["root","spacer","button"]);const _excluded$E=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel"],_excluded2$b=["ownerState"],_excluded3$3=["ownerState"],PickersArrowSwitcherRoot=styled$1("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"flex"}),PickersArrowSwitcherSpacer=styled$1("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(tt,et)=>et.spacer})(({theme:tt})=>({width:tt.spacing(3)})),PickersArrowSwitcherButton=styled$1(IconButton$2,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(tt,et)=>et.button})(({ownerState:tt})=>_extends$u({},tt.hidden&&{visibility:"hidden"})),useUtilityClasses$f=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],spacer:["spacer"],button:["button"]},getPickersArrowSwitcherUtilityClass,et)},PickersArrowSwitcher=reactExports.forwardRef(function(et,nt){var rt,it,ot,at;const lt=useTheme().direction==="rtl",ct=useThemeProps({props:et,name:"MuiPickersArrowSwitcher"}),{children:ut,className:ht,slots:dt,slotProps:pt,isNextDisabled:mt,isNextHidden:gt,onGoToNext:yt,nextLabel:bt,isPreviousDisabled:vt,isPreviousHidden:xt,onGoToPrevious:kt,previousLabel:St}=ct,Tt=_objectWithoutPropertiesLoose$m(ct,_excluded$E),At=ct,Et=useUtilityClasses$f(At),$t={isDisabled:mt,isHidden:gt,goTo:yt,label:bt},Dt={isDisabled:vt,isHidden:xt,goTo:kt,label:St},jt=(rt=dt==null?void 0:dt.previousIconButton)!=null?rt:PickersArrowSwitcherButton,Pt=useSlotProps({elementType:jt,externalSlotProps:pt==null?void 0:pt.previousIconButton,additionalProps:{size:"medium",title:Dt.label,"aria-label":Dt.label,disabled:Dt.isDisabled,edge:"end",onClick:Dt.goTo},ownerState:_extends$u({},At,{hidden:Dt.isHidden}),className:Et.button}),Ct=(it=dt==null?void 0:dt.nextIconButton)!=null?it:PickersArrowSwitcherButton,wt=useSlotProps({elementType:Ct,externalSlotProps:pt==null?void 0:pt.nextIconButton,additionalProps:{size:"medium",title:$t.label,"aria-label":$t.label,disabled:$t.isDisabled,edge:"start",onClick:$t.goTo},ownerState:_extends$u({},At,{hidden:$t.isHidden}),className:Et.button}),It=(ot=dt==null?void 0:dt.leftArrowIcon)!=null?ot:ArrowLeftIcon,Ot=useSlotProps({elementType:It,externalSlotProps:pt==null?void 0:pt.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),Wt=_objectWithoutPropertiesLoose$m(Ot,_excluded2$b),zt=(at=dt==null?void 0:dt.rightArrowIcon)!=null?at:ArrowRightIcon,Ft=useSlotProps({elementType:zt,externalSlotProps:pt==null?void 0:pt.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),Nt=_objectWithoutPropertiesLoose$m(Ft,_excluded3$3);return jsxRuntimeExports.jsxs(PickersArrowSwitcherRoot,_extends$u({ref:nt,className:clsx(Et.root,ht),ownerState:At},Tt,{children:[jsxRuntimeExports.jsx(jt,_extends$u({},Pt,{children:lt?jsxRuntimeExports.jsx(zt,_extends$u({},Nt)):jsxRuntimeExports.jsx(It,_extends$u({},Wt))})),ut?jsxRuntimeExports.jsx(Typography$1,{variant:"subtitle1",component:"span",children:ut}):jsxRuntimeExports.jsx(PickersArrowSwitcherSpacer,{className:Et.spacer,ownerState:At}),jsxRuntimeExports.jsx(Ct,_extends$u({},wt,{children:lt?jsxRuntimeExports.jsx(It,_extends$u({},Wt)):jsxRuntimeExports.jsx(zt,_extends$u({},Nt))}))]}))}),areViewsEqual=(tt,et)=>tt.length!==et.length?!1:et.every(nt=>tt.includes(nt)),applyDefaultViewProps=({openTo:tt,defaultOpenTo:et,views:nt,defaultViews:rt})=>{const it=nt??rt;let ot;if(tt!=null)ot=tt;else if(it.includes(et))ot=et;else if(it.length>0)ot=it[0];else throw new Error("MUI: The `views` prop must contain at least one view");return{views:it,openTo:ot}},timeViews=["hours","minutes","seconds"],isTimeView=tt=>timeViews.includes(tt),getSecondsInDay=(tt,et)=>et.getHours(tt)*3600+et.getMinutes(tt)*60+et.getSeconds(tt),createIsAfterIgnoreDatePart=(tt,et)=>(nt,rt)=>tt?et.isAfter(nt,rt):getSecondsInDay(nt,et)>getSecondsInDay(rt,et);function useViews({onChange:tt,onViewChange:et,openTo:nt,view:rt,views:it,autoFocus:ot,focusedView:at,onFocusedViewChange:st}){var lt,ct;const ut=reactExports.useRef(nt),ht=reactExports.useRef(it),dt=reactExports.useRef(it.includes(nt)?nt:it[0]),[pt,mt]=useControlled({name:"useViews",state:"view",controlled:rt,default:dt.current}),gt=reactExports.useRef(ot?pt:null),[yt,bt]=useControlled({name:"useViews",state:"focusedView",controlled:at,default:gt.current});reactExports.useEffect(()=>{(ut.current&&ut.current!==nt||ht.current&&ht.current.some(Dt=>!it.includes(Dt)))&&(mt(it.includes(nt)?nt:it[0]),ht.current=it,ut.current=nt)},[nt,mt,pt,it]);const vt=it.indexOf(pt),xt=(lt=it[vt-1])!=null?lt:null,kt=(ct=it[vt+1])!=null?ct:null,St=useEventCallback((Dt,jt)=>{bt(jt?Dt:Pt=>Dt===Pt?null:Pt),st==null||st(Dt,jt)}),Tt=useEventCallback(Dt=>{Dt!==pt&&(mt(Dt),St(Dt,!0),et&&et(Dt))}),At=useEventCallback(()=>{kt&&Tt(kt),St(kt,!0)}),Et=useEventCallback((Dt,jt,Pt)=>{const Ct=jt==="finish",wt=Pt?it.indexOf(Pt){tt(Dt,jt?"partial":"finish",Pt),jt&&(Tt(jt),St(jt,!0))});return{view:pt,setView:Tt,focusedView:yt,setFocusedView:St,nextView:kt,previousView:xt,defaultView:dt.current,goToNextView:At,setValueAndGoToNextView:Et,setValueAndGoToView:$t}}function useNextMonthDisabled(tt,{disableFuture:et,maxDate:nt,timezone:rt}){const it=useUtils();return reactExports.useMemo(()=>{const ot=it.dateWithTimezone(void 0,rt),at=it.startOfMonth(et&&it.isBefore(ot,nt)?ot:nt);return!it.isAfter(at,tt)},[et,nt,tt,it,rt])}function usePreviousMonthDisabled(tt,{disablePast:et,minDate:nt,timezone:rt}){const it=useUtils();return reactExports.useMemo(()=>{const ot=it.dateWithTimezone(void 0,rt),at=it.startOfMonth(et&&it.isAfter(ot,nt)?ot:nt);return!it.isBefore(at,tt)},[et,nt,tt,it,rt])}const DAY_SIZE=36,DAY_MARGIN=2,DIALOG_WIDTH=320,MAX_CALENDAR_HEIGHT=280,VIEW_HEIGHT=334,PickerViewRoot=styled$1("div")({overflow:"hidden",width:DIALOG_WIDTH,maxHeight:VIEW_HEIGHT,display:"flex",flexDirection:"column",margin:"0 auto"}),findClosestEnabledDate=({date:tt,disableFuture:et,disablePast:nt,maxDate:rt,minDate:it,isDateDisabled:ot,utils:at,timezone:st})=>{const lt=at.startOfDay(at.dateWithTimezone(void 0,st));nt&&at.isBefore(it,lt)&&(it=lt),et&&at.isAfter(rt,lt)&&(rt=lt);let ct=tt,ut=tt;for(at.isBefore(tt,it)&&(ct=it,ut=null),at.isAfter(tt,rt)&&(ut&&(ut=rt),ct=null);ct||ut;){if(ct&&at.isAfter(ct,rt)&&(ct=null),ut&&at.isBefore(ut,it)&&(ut=null),ct){if(!ot(ct))return ct;ct=at.addDays(ct,1)}if(ut){if(!ot(ut))return ut;ut=at.addDays(ut,-1)}}return null},replaceInvalidDateByNull=(tt,et)=>et==null||!tt.isValid(et)?null:et,applyDefaultDate=(tt,et,nt)=>et==null||!tt.isValid(et)?nt:et,areDatesEqual$1=(tt,et,nt)=>!tt.isValid(et)&&et!=null&&!tt.isValid(nt)&&nt!=null?!0:tt.isEqual(et,nt),getMonthsInYear=(tt,et)=>{const rt=[tt.startOfYear(et)];for(;rt.length<12;){const it=rt[rt.length-1];rt.push(tt.addMonths(it,1))}return rt},mergeDateAndTime=(tt,et,nt)=>{let rt=et;return rt=tt.setHours(rt,tt.getHours(nt)),rt=tt.setMinutes(rt,tt.getMinutes(nt)),rt=tt.setSeconds(rt,tt.getSeconds(nt)),rt},getTodayDate=(tt,et,nt)=>nt==="date"?tt.startOfDay(tt.dateWithTimezone(void 0,et)):tt.dateWithTimezone(void 0,et),dateViews=["year","month","day"],isDatePickerView=tt=>dateViews.includes(tt),resolveDateFormat=(tt,{format:et,views:nt},rt)=>{if(et!=null)return et;const it=tt.formats;return areViewsEqual(nt,["year"])?it.year:areViewsEqual(nt,["month"])?it.month:areViewsEqual(nt,["day"])?it.dayOfMonth:areViewsEqual(nt,["month","year"])?`${it.month} ${it.year}`:areViewsEqual(nt,["day","month"])?`${it.month} ${it.dayOfMonth}`:rt?/en/.test(tt.getCurrentLocaleCode())?it.normalDateWithWeekday:it.normalDate:it.keyboardDate},getWeekdays=(tt,et)=>{const nt=tt.startOfWeek(et);return[0,1,2,3,4,5,6].map(rt=>tt.addDays(nt,rt))},useValueWithTimezone=({timezone:tt,value:et,defaultValue:nt,onChange:rt,valueManager:it})=>{var ot,at;const st=useUtils(),lt=reactExports.useRef(nt),ct=(ot=et??lt.current)!=null?ot:it.emptyValue,ut=reactExports.useMemo(()=>it.getTimezone(st,ct),[st,it,ct]),ht=useEventCallback(gt=>ut==null?gt:it.setTimezone(st,ut,gt)),dt=(at=tt??ut)!=null?at:"default",pt=reactExports.useMemo(()=>it.setTimezone(st,dt,ct),[it,st,dt,ct]),mt=useEventCallback((gt,...yt)=>{const bt=ht(gt);rt==null||rt(bt,...yt)});return{value:pt,handleValueChange:mt,timezone:dt}},useControlledValueWithTimezone=({name:tt,timezone:et,value:nt,defaultValue:rt,onChange:it,valueManager:ot})=>{const[at,st]=useControlled({name:tt,state:"value",controlled:nt,default:rt??ot.emptyValue}),lt=useEventCallback((ct,...ut)=>{st(ct),it==null||it(ct,...ut)});return useValueWithTimezone({timezone:et,value:at,defaultValue:void 0,onChange:lt,valueManager:ot})},SECTION_TYPE_GRANULARITY={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},getSectionTypeGranularity=tt=>Math.max(...tt.map(et=>{var nt;return(nt=SECTION_TYPE_GRANULARITY[et.type])!=null?nt:1})),roundDate=(tt,et,nt)=>{if(et===SECTION_TYPE_GRANULARITY.year)return tt.startOfYear(nt);if(et===SECTION_TYPE_GRANULARITY.month)return tt.startOfMonth(nt);if(et===SECTION_TYPE_GRANULARITY.day)return tt.startOfDay(nt);let rt=nt;return et{var ot;let at=it?it():roundDate(et,nt,getTodayDate(et,rt));tt.minDate!=null&&et.isAfterDay(tt.minDate,at)&&(at=roundDate(et,nt,tt.minDate)),tt.maxDate!=null&&et.isBeforeDay(tt.maxDate,at)&&(at=roundDate(et,nt,tt.maxDate));const st=createIsAfterIgnoreDatePart((ot=tt.disableIgnoringDatePartForTimeValidation)!=null?ot:!1,et);return tt.minTime!=null&&st(tt.minTime,at)&&(at=roundDate(et,nt,tt.disableIgnoringDatePartForTimeValidation?tt.minTime:mergeDateAndTime(et,at,tt.minTime))),tt.maxTime!=null&&st(at,tt.maxTime)&&(at=roundDate(et,nt,tt.disableIgnoringDatePartForTimeValidation?tt.maxTime:mergeDateAndTime(et,at,tt.maxTime))),at},getDateSectionConfigFromFormatToken=(tt,et)=>{const nt=tt.formatTokenMap[et];if(nt==null)throw new Error([`MUI: The token "${et}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(` `));return typeof nt=="string"?{type:nt,contentType:nt==="meridiem"?"letter":"digit",maxLength:void 0}:{type:nt.sectionType,contentType:nt.contentType,maxLength:nt.maxLength}},getDeltaFromKeyCode=tt=>{switch(tt){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},getDaysInWeekStr=(tt,et,nt)=>{const rt=[],it=tt.dateWithTimezone(void 0,et),ot=tt.startOfWeek(it),at=tt.endOfWeek(it);let st=ot;for(;tt.isBefore(st,at);)rt.push(st),st=tt.addDays(st,1);return rt.map(lt=>tt.formatByString(lt,nt))},getLetterEditingOptions=(tt,et,nt,rt)=>{switch(nt){case"month":return getMonthsInYear(tt,tt.dateWithTimezone(void 0,et)).map(it=>tt.formatByString(it,rt));case"weekDay":return getDaysInWeekStr(tt,et,rt);case"meridiem":{const it=tt.dateWithTimezone(void 0,et);return[tt.startOfDay(it),tt.endOfDay(it)].map(ot=>tt.formatByString(ot,rt))}default:return[]}},cleanLeadingZeros=(tt,et,nt)=>{let rt=et;for(rt=Number(rt).toString();rt.length{if(it.type==="day"&&it.contentType==="digit-with-letter"){const at=tt.setDate(rt.longestMonth,nt);return tt.formatByString(at,it.format)}const ot=nt.toString();return it.hasLeadingZerosInInput?cleanLeadingZeros(tt,ot,it.maxLength):ot},adjustSectionValue=(tt,et,nt,rt,it,ot,at)=>{const st=getDeltaFromKeyCode(rt),lt=rt==="Home",ct=rt==="End",ut=nt.value===""||lt||ct,ht=()=>{const pt=it[nt.type]({currentDate:ot,format:nt.format,contentType:nt.contentType}),mt=vt=>cleanDigitSectionValue(tt,et,vt,pt,nt),gt=nt.type==="minutes"&&at!=null&&at.minutesStep?at.minutesStep:1;let bt=parseInt(nt.value,10)+st*gt;if(ut){if(nt.type==="year"&&!ct&&!lt)return tt.formatByString(tt.dateWithTimezone(void 0,et),nt.format);st>0||lt?bt=pt.minimum:bt=pt.maximum}return bt%gt!==0&&((st<0||lt)&&(bt+=gt-(gt+bt)%gt),(st>0||ct)&&(bt-=bt%gt)),bt>pt.maximum?mt(pt.minimum+(bt-pt.maximum-1)%(pt.maximum-pt.minimum+1)):bt{const pt=getLetterEditingOptions(tt,et,nt.type,nt.format);if(pt.length===0)return nt.value;if(ut)return st>0||lt?pt[0]:pt[pt.length-1];const gt=(pt.indexOf(nt.value)+pt.length+st)%pt.length;return pt[gt]};return nt.contentType==="digit"||nt.contentType==="digit-with-letter"?ht():dt()},getSectionVisibleValue=(tt,et)=>{let nt=tt.value||tt.placeholder;const rt=et==="non-input"?tt.hasLeadingZerosInFormat:tt.hasLeadingZerosInInput;return et==="non-input"&&tt.hasLeadingZerosInInput&&!tt.hasLeadingZerosInFormat&&(nt=Number(nt).toString()),["input-rtl","input-ltr"].includes(et)&&tt.contentType==="digit"&&!rt&&nt.length===1&&(nt=`${nt}‎`),et==="input-rtl"&&(nt=`⁨${nt}⁩`),nt},cleanString=tt=>tt.replace(/[\u2066\u2067\u2068\u2069]/g,""),addPositionPropertiesToSections=(tt,et)=>{let nt=0,rt=et?1:0;const it=[];for(let ot=0;ot{switch(rt.type){case"year":return nt.fieldYearPlaceholder({digitAmount:tt.formatByString(tt.dateWithTimezone(void 0,et),it).length});case"month":return nt.fieldMonthPlaceholder({contentType:rt.contentType});case"day":return nt.fieldDayPlaceholder();case"weekDay":return nt.fieldWeekDayPlaceholder({contentType:rt.contentType});case"hours":return nt.fieldHoursPlaceholder();case"minutes":return nt.fieldMinutesPlaceholder();case"seconds":return nt.fieldSecondsPlaceholder();case"meridiem":return nt.fieldMeridiemPlaceholder();default:return it}},changeSectionValueFormat=(tt,et,nt,rt)=>tt.formatByString(tt.parse(et,nt),rt),isFourDigitYearFormat=(tt,et,nt)=>tt.formatByString(tt.dateWithTimezone(void 0,et),nt).length===4,doesSectionFormatHaveLeadingZeros=(tt,et,nt,rt,it)=>{if(nt!=="digit")return!1;const ot=tt.dateWithTimezone(void 0,et);switch(rt){case"year":return isFourDigitYearFormat(tt,et,it)?tt.formatByString(tt.setYear(ot,1),it)==="0001":tt.formatByString(tt.setYear(ot,2001),it)==="01";case"month":return tt.formatByString(tt.startOfYear(ot),it).length>1;case"day":return tt.formatByString(tt.startOfMonth(ot),it).length>1;case"weekDay":return tt.formatByString(tt.startOfWeek(ot),it).length>1;case"hours":return tt.formatByString(tt.setHours(ot,1),it).length>1;case"minutes":return tt.formatByString(tt.setMinutes(ot,1),it).length>1;case"seconds":return tt.formatByString(tt.setMinutes(ot,1),it).length>1;default:throw new Error("Invalid section type")}},getEscapedPartsFromFormat=(tt,et)=>{const nt=[],{start:rt,end:it}=tt.escapedCharacters,ot=new RegExp(`(\\${rt}[^\\${it}]*\\${it})+`,"g");let at=null;for(;at=ot.exec(et);)nt.push({start:at.index,end:ot.lastIndex-1});return nt},splitFormatIntoSections=(tt,et,nt,rt,it,ot,at,st)=>{let lt="";const ct=[],ut=tt.date(),ht=xt=>{if(xt==="")return null;const kt=getDateSectionConfigFromFormatToken(tt,xt),St=doesSectionFormatHaveLeadingZeros(tt,et,kt.contentType,kt.type,xt),Tt=at?St:kt.contentType==="digit",At=it!=null&&tt.isValid(it);let Et=At?tt.formatByString(it,xt):"",$t=null;if(Tt)if(St)$t=Et===""?tt.formatByString(ut,xt).length:Et.length;else{if(kt.maxLength==null)throw new Error(`MUI: The token ${xt} should have a 'maxDigitNumber' property on it's adapter`);$t=kt.maxLength,At&&(Et=cleanLeadingZeros(tt,Et,$t))}return ct.push(_extends$u({},kt,{format:xt,maxLength:$t,value:Et,placeholder:getSectionPlaceholder(tt,et,nt,kt,xt),hasLeadingZeros:St,hasLeadingZerosInFormat:St,hasLeadingZerosInInput:Tt,startSeparator:ct.length===0?lt:"",endSeparator:"",modified:!1})),null};let dt=10,pt=rt,mt=tt.expandFormat(rt);for(;mt!==pt;)if(pt=mt,mt=tt.expandFormat(pt),dt-=1,dt<0)throw new Error("MUI: The format expansion seems to be enter in an infinite loop. Please open an issue with the format passed to the picker component");const gt=mt,yt=getEscapedPartsFromFormat(tt,gt),bt=new RegExp(`^(${Object.keys(tt.formatTokenMap).sort((xt,kt)=>kt.length-xt.length).join("|")})`,"g");let vt="";for(let xt=0;xt$t.start<=xt&&$t.end>=xt),St=gt[xt],Tt=kt!=null,At=`${vt}${gt.slice(xt)}`,Et=bt.test(At);!Tt&&St.match(/([A-Za-z]+)/)&&Et?(vt=At.slice(0,bt.lastIndex),xt+=bt.lastIndex-1):Tt&&(kt==null?void 0:kt.start)===xt||(kt==null?void 0:kt.end)===xt||(ht(vt),vt="",ct.length===0?lt+=St:ct[ct.length-1].endSeparator+=St)}return ht(vt),ct.map(xt=>{const kt=St=>{let Tt=St;return st&&Tt!==null&&Tt.includes(" ")&&(Tt=`⁩${Tt}⁦`),ot==="spacious"&&["/",".","-"].includes(Tt)&&(Tt=` ${Tt} `),Tt};return xt.startSeparator=kt(xt.startSeparator),xt.endSeparator=kt(xt.endSeparator),xt})},getDateFromDateSections=(tt,et)=>{const nt=et.some(st=>st.type==="day"),rt=[],it=[];for(let st=0;st{const rt=tt.map(it=>{const ot=getSectionVisibleValue(it,et?"input-rtl":"input-ltr");return`${it.startSeparator}${ot}${it.endSeparator}`}).join("");return et?`⁦${rt}⁩`:rt},getSectionsBoundaries=(tt,et)=>{const nt=tt.dateWithTimezone(void 0,et),rt=tt.endOfYear(nt),it=tt.endOfDay(nt),{maxDaysInMonth:ot,longestMonth:at}=getMonthsInYear(tt,nt).reduce((st,lt)=>{const ct=tt.getDaysInMonth(lt);return ct>st.maxDaysInMonth?{maxDaysInMonth:ct,longestMonth:lt}:st},{maxDaysInMonth:0,longestMonth:null});return{year:({format:st})=>({minimum:0,maximum:isFourDigitYearFormat(tt,et,st)?9999:99}),month:()=>({minimum:1,maximum:tt.getMonth(rt)+1}),day:({currentDate:st})=>({minimum:1,maximum:st!=null&&tt.isValid(st)?tt.getDaysInMonth(st):ot,longestMonth:at}),weekDay:({format:st,contentType:lt})=>{if(lt==="digit"){const ct=getDaysInWeekStr(tt,et,st).map(Number);return{minimum:Math.min(...ct),maximum:Math.max(...ct)}}return{minimum:1,maximum:7}},hours:({format:st})=>{const lt=tt.getHours(it);return tt.formatByString(tt.endOfDay(nt),st)!==lt.toString()?{minimum:1,maximum:Number(tt.formatByString(tt.startOfDay(nt),st))}:{minimum:0,maximum:lt}},minutes:()=>({minimum:0,maximum:tt.getMinutes(it)}),seconds:()=>({minimum:0,maximum:tt.getSeconds(it)}),meridiem:()=>({minimum:0,maximum:0})}},transferDateSectionValue=(tt,et,nt,rt,it)=>{switch(nt.type){case"year":return tt.setYear(it,tt.getYear(rt));case"month":return tt.setMonth(it,tt.getMonth(rt));case"weekDay":{const ot=getDaysInWeekStr(tt,et,nt.format),at=tt.formatByString(rt,nt.format),st=ot.indexOf(at),ct=ot.indexOf(nt.value)-st;return tt.addDays(rt,ct)}case"day":return tt.setDate(it,tt.getDate(rt));case"meridiem":{const ot=tt.getHours(rt)<12,at=tt.getHours(it);return ot&&at>=12?tt.addHours(it,-12):!ot&&at<12?tt.addHours(it,12):it}case"hours":return tt.setHours(it,tt.getHours(rt));case"minutes":return tt.setMinutes(it,tt.getMinutes(rt));case"seconds":return tt.setSeconds(it,tt.getSeconds(rt));default:return it}},reliableSectionModificationOrder={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8},mergeDateIntoReferenceDate=(tt,et,nt,rt,it,ot)=>[...rt].sort((at,st)=>reliableSectionModificationOrder[at.type]-reliableSectionModificationOrder[st.type]).reduce((at,st)=>!ot||st.modified?transferDateSectionValue(tt,et,st,nt,at):at,it),isAndroid=()=>navigator.userAgent.toLowerCase().indexOf("android")>-1,getSectionOrder=(tt,et)=>{const nt={};if(!et)return tt.forEach((lt,ct)=>{const ut=ct===0?null:ct-1,ht=ct===tt.length-1?null:ct+1;nt[ct]={leftIndex:ut,rightIndex:ht}}),{neighbors:nt,startIndex:0,endIndex:tt.length-1};const rt={},it={};let ot=0,at=0,st=tt.length-1;for(;st>=0;){at=tt.findIndex((lt,ct)=>{var ut;return ct>=ot&&((ut=lt.endSeparator)==null?void 0:ut.includes(" "))&<.endSeparator!==" / "}),at===-1&&(at=tt.length-1);for(let lt=at;lt>=ot;lt-=1)it[lt]=st,rt[st]=lt,st-=1;ot=at+1}return tt.forEach((lt,ct)=>{const ut=it[ct],ht=ut===0?null:rt[ut-1],dt=ut===tt.length-1?null:rt[ut+1];nt[ct]={leftIndex:ht,rightIndex:dt}}),{neighbors:nt,startIndex:rt[0],endIndex:rt[tt.length-1]}},_excluded$D=["value","referenceDate"],singleItemValueManager={emptyValue:null,getTodayValue:getTodayDate,getInitialReferenceValue:tt=>{let{value:et,referenceDate:nt}=tt,rt=_objectWithoutPropertiesLoose$m(tt,_excluded$D);return et!=null&&rt.utils.isValid(et)?et:nt??getDefaultReferenceDate(rt)},cleanValue:replaceInvalidDateByNull,areValuesEqual:areDatesEqual$1,isSameError:(tt,et)=>tt===et,hasError:tt=>tt!=null,defaultErrorState:null,getTimezone:(tt,et)=>et==null||!tt.isValid(et)?null:tt.getTimezone(et),setTimezone:(tt,et,nt)=>nt==null?null:tt.setTimezone(nt,et)},singleItemFieldValueManager={updateReferenceValue:(tt,et,nt)=>et==null||!tt.isValid(et)?nt:et,getSectionsFromValue:(tt,et,nt,rt,it)=>!tt.isValid(et)&&!!nt?nt:addPositionPropertiesToSections(it(et),rt),getValueStrFromSections:createDateStrForInputFromSections,getActiveDateManager:(tt,et)=>({date:et.value,referenceDate:et.referenceValue,getSections:nt=>nt,getNewValuesFromNewActiveDate:nt=>({value:nt,referenceValue:nt==null||!tt.isValid(nt)?et.referenceValue:nt})}),parseValueStr:(tt,et,nt)=>nt(tt.trim(),et)},uncapitalizeObjectKeys=tt=>{if(tt!==void 0)return Object.keys(tt).reduce((et,nt)=>_extends$u({},et,{[`${nt.slice(0,1).toLowerCase()}${nt.slice(1)}`]:tt[nt]}),{})};function getPickersDayUtilityClass(tt){return generateUtilityClass("MuiPickersDay",tt)}const pickersDayClasses=generateUtilityClasses("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),_excluded$C=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],useUtilityClasses$e=tt=>{const{selected:et,disableMargin:nt,disableHighlightToday:rt,today:it,disabled:ot,outsideCurrentMonth:at,showDaysOutsideCurrentMonth:st,classes:lt}=tt,ct=at&&!st;return composeClasses({root:["root",et&&!ct&&"selected",ot&&"disabled",!nt&&"dayWithMargin",!rt&&it&&"today",at&&st&&"dayOutsideMonth",ct&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},getPickersDayUtilityClass,lt)},styleArg=({theme:tt,ownerState:et})=>_extends$u({},tt.typography.caption,{width:DAY_SIZE,height:DAY_SIZE,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:tt.transitions.create("background-color",{duration:tt.transitions.duration.short}),color:(tt.vars||tt).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette.primary.main,tt.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.primary.mainChannel} / ${tt.vars.palette.action.focusOpacity})`:alpha$1(tt.palette.primary.main,tt.palette.action.focusOpacity),[`&.${pickersDayClasses.selected}`]:{willChange:"background-color",backgroundColor:(tt.vars||tt).palette.primary.dark}},[`&.${pickersDayClasses.selected}`]:{color:(tt.vars||tt).palette.primary.contrastText,backgroundColor:(tt.vars||tt).palette.primary.main,fontWeight:tt.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(tt.vars||tt).palette.primary.dark}},[`&.${pickersDayClasses.disabled}:not(.${pickersDayClasses.selected})`]:{color:(tt.vars||tt).palette.text.disabled},[`&.${pickersDayClasses.disabled}&.${pickersDayClasses.selected}`]:{opacity:.6}},!et.disableMargin&&{margin:`0 ${DAY_MARGIN}px`},et.outsideCurrentMonth&&et.showDaysOutsideCurrentMonth&&{color:(tt.vars||tt).palette.text.secondary},!et.disableHighlightToday&&et.today&&{[`&:not(.${pickersDayClasses.selected})`]:{border:`1px solid ${(tt.vars||tt).palette.text.secondary}`}}),overridesResolver=(tt,et)=>{const{ownerState:nt}=tt;return[et.root,!nt.disableMargin&&et.dayWithMargin,!nt.disableHighlightToday&&nt.today&&et.today,!nt.outsideCurrentMonth&&nt.showDaysOutsideCurrentMonth&&et.dayOutsideMonth,nt.outsideCurrentMonth&&!nt.showDaysOutsideCurrentMonth&&et.hiddenDaySpacingFiller]},PickersDayRoot=styled$1(ButtonBase$1,{name:"MuiPickersDay",slot:"Root",overridesResolver})(styleArg),PickersDayFiller=styled$1("div",{name:"MuiPickersDay",slot:"Root",overridesResolver})(({theme:tt,ownerState:et})=>_extends$u({},styleArg({theme:tt,ownerState:et}),{opacity:0,pointerEvents:"none"})),noop$5=()=>{},PickersDayRaw=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiPickersDay"}),{autoFocus:it=!1,className:ot,day:at,disabled:st=!1,disableHighlightToday:lt=!1,disableMargin:ct=!1,isAnimating:ut,onClick:ht,onDaySelect:dt,onFocus:pt=noop$5,onBlur:mt=noop$5,onKeyDown:gt=noop$5,onMouseDown:yt=noop$5,onMouseEnter:bt=noop$5,outsideCurrentMonth:vt,selected:xt=!1,showDaysOutsideCurrentMonth:kt=!1,children:St,today:Tt=!1}=rt,At=_objectWithoutPropertiesLoose$m(rt,_excluded$C),Et=_extends$u({},rt,{autoFocus:it,disabled:st,disableHighlightToday:lt,disableMargin:ct,selected:xt,showDaysOutsideCurrentMonth:kt,today:Tt}),$t=useUtilityClasses$e(Et),Dt=useUtils(),jt=reactExports.useRef(null),Pt=useForkRef(jt,nt);useEnhancedEffect$1(()=>{it&&!st&&!ut&&!vt&&jt.current.focus()},[it,st,ut,vt]);const Ct=It=>{yt(It),vt&&It.preventDefault()},wt=It=>{st||dt(at),vt&&It.currentTarget.focus(),ht&&ht(It)};return vt&&!kt?jsxRuntimeExports.jsx(PickersDayFiller,{className:clsx($t.root,$t.hiddenDaySpacingFiller,ot),ownerState:Et,role:At.role}):jsxRuntimeExports.jsx(PickersDayRoot,_extends$u({className:clsx($t.root,ot),ref:Pt,centerRipple:!0,disabled:st,tabIndex:xt?0:-1,onKeyDown:It=>gt(It,at),onFocus:It=>pt(It,at),onBlur:It=>mt(It,at),onMouseEnter:It=>bt(It,at),onClick:wt,onMouseDown:Ct},At,{ownerState:Et,children:St||Dt.format(at,"dayOfMonth")}))}),PickersDay=reactExports.memo(PickersDayRaw);function useValidation(tt,et,nt,rt){const{value:it,onError:ot}=tt,at=useLocalizationContext(),st=reactExports.useRef(rt),lt=et({adapter:at,value:it,props:tt});return reactExports.useEffect(()=>{ot&&!nt(lt,st.current)&&ot(lt,it),st.current=lt},[nt,ot,st,lt,it]),lt}const useFieldState=tt=>{const et=useUtils(),nt=useLocaleText(),rt=useLocalizationContext(),ot=useTheme().direction==="rtl",{valueManager:at,fieldValueManager:st,valueType:lt,validator:ct,internalProps:ut,internalProps:{value:ht,defaultValue:dt,referenceDate:pt,onChange:mt,format:gt,formatDensity:yt="dense",selectedSections:bt,onSelectedSectionsChange:vt,shouldRespectLeadingZeros:xt=!1,timezone:kt}}=tt,{timezone:St,value:Tt,handleValueChange:At}=useValueWithTimezone({timezone:kt,value:ht,defaultValue:dt,onChange:mt,valueManager:at}),Et=reactExports.useMemo(()=>getSectionsBoundaries(et,St),[et,St]),$t=reactExports.useCallback((en,sn=null)=>st.getSectionsFromValue(et,en,sn,ot,Kt=>splitFormatIntoSections(et,St,nt,gt,Kt,yt,xt,ot)),[st,gt,nt,ot,xt,et,yt,St]),Dt=reactExports.useMemo(()=>st.getValueStrFromSections($t(at.emptyValue),ot),[st,$t,at.emptyValue,ot]),[jt,Pt]=reactExports.useState(()=>{const en=$t(Tt),sn={sections:en,value:Tt,referenceValue:at.emptyValue,tempValueStrAndroid:null},Kt=getSectionTypeGranularity(en),rn=at.getInitialReferenceValue({referenceDate:pt,value:Tt,utils:et,props:ut,granularity:Kt,timezone:St});return _extends$u({},sn,{referenceValue:rn})}),[Ct,wt]=useControlled({controlled:bt,default:null,name:"useField",state:"selectedSectionIndexes"}),It=en=>{wt(en),vt==null||vt(en),Pt(sn=>_extends$u({},sn,{selectedSectionQuery:null}))},Ot=reactExports.useMemo(()=>{if(Ct==null)return null;if(Ct==="all")return{startIndex:0,endIndex:jt.sections.length-1,shouldSelectBoundarySelectors:!0};if(typeof Ct=="number")return{startIndex:Ct,endIndex:Ct};if(typeof Ct=="string"){const en=jt.sections.findIndex(sn=>sn.type===Ct);return{startIndex:en,endIndex:en}}return Ct},[Ct,jt.sections]),Wt=({value:en,referenceValue:sn,sections:Kt})=>{Pt(nn=>_extends$u({},nn,{sections:Kt,value:en,referenceValue:sn,tempValueStrAndroid:null}));const rn={validationError:ct({adapter:rt,value:en,props:_extends$u({},ut,{value:en,timezone:St})})};At(en,rn)},zt=(en,sn)=>{const Kt=[...jt.sections];return Kt[en]=_extends$u({},Kt[en],{value:sn,modified:!0}),addPositionPropertiesToSections(Kt,ot)},Ft=()=>{at.areValuesEqual(et,jt.value,at.emptyValue)||Wt({value:at.emptyValue,referenceValue:jt.referenceValue,sections:$t(at.emptyValue)})},Nt=()=>{if(Ot==null)return;const en=jt.sections[Ot.startIndex];if(en.value==="")return;const sn=st.getActiveDateManager(et,jt,en),rn=sn.getSections(jt.sections).filter(an=>an.value!=="").length===1,nn=zt(Ot.startIndex,""),hn=rn?null:et.date(new Date("")),vn=sn.getNewValuesFromNewActiveDate(hn);(hn!=null&&!et.isValid(hn))!=(sn.date!=null&&!et.isValid(sn.date))?Wt(_extends$u({},vn,{sections:nn})):Pt(an=>_extends$u({},an,vn,{sections:nn,tempValueStrAndroid:null}))},Ut=en=>{const sn=(nn,hn)=>{const vn=et.parse(nn,gt);if(vn==null||!et.isValid(vn))return null;const an=splitFormatIntoSections(et,St,nt,gt,vn,yt,xt,ot);return mergeDateIntoReferenceDate(et,St,vn,an,hn,!1)},Kt=st.parseValueStr(en,jt.referenceValue,sn),rn=st.updateReferenceValue(et,Kt,jt.referenceValue);Wt({value:Kt,referenceValue:rn,sections:$t(Kt,jt.sections)})},Mt=({activeSection:en,newSectionValue:sn,shouldGoToNextSection:Kt})=>{Kt&&Ot&&Ot.startIndex_extends$u({},_n,an,{sections:nn,tempValueStrAndroid:null}))},Ht=en=>Pt(sn=>_extends$u({},sn,{tempValueStrAndroid:en}));return reactExports.useEffect(()=>{const en=$t(jt.value);Pt(sn=>_extends$u({},sn,{sections:en}))},[gt,et.locale]),reactExports.useEffect(()=>{let en=!1;at.areValuesEqual(et,jt.value,Tt)?en=at.getTimezone(et,jt.value)!==at.getTimezone(et,Tt):en=!0,en&&Pt(sn=>_extends$u({},sn,{value:Tt,referenceValue:st.updateReferenceValue(et,Tt,sn.referenceValue),sections:$t(Tt)}))},[Tt]),{state:jt,selectedSectionIndexes:Ot,setSelectedSections:It,clearValue:Ft,clearActiveSection:Nt,updateSectionValue:Mt,updateValueFromValueStr:Ut,setTempAndroidValueStr:Ht,sectionsValueBoundaries:Et,placeholder:Dt,timezone:St}},QUERY_LIFE_DURATION_MS=5e3,isQueryResponseWithoutValue=tt=>tt.saveQuery!=null,useFieldCharacterEditing=({sections:tt,updateSectionValue:et,sectionsValueBoundaries:nt,setTempAndroidValueStr:rt,timezone:it})=>{const ot=useUtils(),[at,st]=reactExports.useState(null),lt=useEventCallback(()=>st(null));reactExports.useEffect(()=>{var pt;at!=null&&((pt=tt[at.sectionIndex])==null?void 0:pt.type)!==at.sectionType&<()},[tt,at,lt]),reactExports.useEffect(()=>{if(at!=null){const pt=setTimeout(()=>lt(),QUERY_LIFE_DURATION_MS);return()=>{window.clearTimeout(pt)}}return()=>{}},[at,lt]);const ct=({keyPressed:pt,sectionIndex:mt},gt,yt)=>{const bt=pt.toLowerCase(),vt=tt[mt];if(at!=null&&(!yt||yt(at.value))&&at.sectionIndex===mt){const kt=`${at.value}${bt}`,St=gt(kt,vt);if(!isQueryResponseWithoutValue(St))return st({sectionIndex:mt,value:kt,sectionType:vt.type}),St}const xt=gt(bt,vt);return isQueryResponseWithoutValue(xt)&&!xt.saveQuery?(lt(),null):(st({sectionIndex:mt,value:bt,sectionType:vt.type}),isQueryResponseWithoutValue(xt)?null:xt)},ut=pt=>{const mt=(bt,vt,xt)=>{const kt=vt.filter(St=>St.toLowerCase().startsWith(xt));return kt.length===0?{saveQuery:!1}:{sectionValue:kt[0],shouldGoToNextSection:kt.length===1}},gt=(bt,vt,xt,kt)=>{const St=Tt=>getLetterEditingOptions(ot,it,vt.type,Tt);if(vt.contentType==="letter")return mt(vt.format,St(vt.format),bt);if(xt&&kt!=null&&getDateSectionConfigFromFormatToken(ot,xt).contentType==="letter"){const Tt=St(xt),At=mt(xt,Tt,bt);return isQueryResponseWithoutValue(At)?{saveQuery:!1}:_extends$u({},At,{sectionValue:kt(At.sectionValue,Tt)})}return{saveQuery:!1}};return ct(pt,(bt,vt)=>{switch(vt.type){case"month":{const xt=kt=>changeSectionValueFormat(ot,kt,ot.formats.month,vt.format);return gt(bt,vt,ot.formats.month,xt)}case"weekDay":{const xt=(kt,St)=>St.indexOf(kt).toString();return gt(bt,vt,ot.formats.weekday,xt)}case"meridiem":return gt(bt,vt);default:return{saveQuery:!1}}})},ht=pt=>{const mt=(yt,bt)=>{const vt=+`${yt}`,xt=nt[bt.type]({currentDate:null,format:bt.format,contentType:bt.contentType});if(vt>xt.maximum)return{saveQuery:!1};if(vtxt.maximum||yt.length===xt.maximum.toString().length;return{sectionValue:cleanDigitSectionValue(ot,it,vt,xt,bt),shouldGoToNextSection:kt}};return ct(pt,(yt,bt)=>{if(bt.contentType==="digit"||bt.contentType==="digit-with-letter")return mt(yt,bt);if(bt.type==="month"){const vt=doesSectionFormatHaveLeadingZeros(ot,it,"digit","month","MM"),xt=mt(yt,{type:bt.type,format:"MM",hasLeadingZerosInFormat:vt,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(isQueryResponseWithoutValue(xt))return xt;const kt=changeSectionValueFormat(ot,xt.sectionValue,"MM",bt.format);return _extends$u({},xt,{sectionValue:kt})}if(bt.type==="weekDay"){const vt=mt(yt,bt);if(isQueryResponseWithoutValue(vt))return vt;const xt=getDaysInWeekStr(ot,it,bt.format)[Number(vt.sectionValue)-1];return _extends$u({},vt,{sectionValue:xt})}return{saveQuery:!1}},yt=>!Number.isNaN(Number(yt)))};return{applyCharacterEditing:useEventCallback(pt=>{const mt=tt[pt.sectionIndex],yt=!Number.isNaN(Number(pt.keyPressed))?ht(pt):ut(pt);yt==null?rt(null):et({activeSection:mt,newSectionValue:yt.sectionValue,shouldGoToNextSection:yt.shouldGoToNextSection})}),resetCharacterQuery:lt}};function arrayIncludes$2(tt,et){return Array.isArray(et)?et.every(nt=>tt.indexOf(nt)!==-1):tt.indexOf(et)!==-1}const onSpaceOrEnter=(tt,et)=>nt=>{(nt.key==="Enter"||nt.key===" ")&&(tt(nt),nt.preventDefault(),nt.stopPropagation()),et&&et(nt)},getActiveElement=(tt=document)=>{const et=tt.activeElement;return et?et.shadowRoot?getActiveElement(et.shadowRoot):et:null},DEFAULT_DESKTOP_MODE_MEDIA_QUERY="@media (pointer: fine)",_excluded$B=["onClick","onKeyDown","onFocus","onBlur","onMouseUp","onPaste","error","clearable","onClear","disabled"],useField=tt=>{const et=useUtils(),{state:nt,selectedSectionIndexes:rt,setSelectedSections:it,clearValue:ot,clearActiveSection:at,updateSectionValue:st,updateValueFromValueStr:lt,setTempAndroidValueStr:ct,sectionsValueBoundaries:ut,placeholder:ht,timezone:dt}=useFieldState(tt),{inputRef:pt,internalProps:mt,internalProps:{readOnly:gt=!1,unstableFieldRef:yt,minutesStep:bt},forwardedProps:{onClick:vt,onKeyDown:xt,onFocus:kt,onBlur:St,onMouseUp:Tt,onPaste:At,error:Et,clearable:$t,onClear:Dt,disabled:jt},fieldValueManager:Pt,valueManager:Ct,validator:wt}=tt,It=_objectWithoutPropertiesLoose$m(tt.forwardedProps,_excluded$B),{applyCharacterEditing:Ot,resetCharacterQuery:Wt}=useFieldCharacterEditing({sections:nt.sections,updateSectionValue:st,sectionsValueBoundaries:ut,setTempAndroidValueStr:ct,timezone:dt}),zt=reactExports.useRef(null),Ft=useForkRef(pt,zt),Nt=reactExports.useRef(void 0),Mt=useTheme().direction==="rtl",Ht=reactExports.useMemo(()=>getSectionOrder(nt.sections,Mt),[nt.sections,Mt]),en=()=>{var In;if(gt){it(null);return}const An=(In=zt.current.selectionStart)!=null?In:0;let wn;An<=nt.sections[0].startInInput||An>=nt.sections[nt.sections.length-1].endInInput?wn=1:wn=nt.sections.findIndex(pn=>pn.startInInput-pn.startSeparator.length>An);const fn=wn===-1?nt.sections.length-1:wn-1;it(fn)},sn=useEventCallback((In,...An)=>{In.isDefaultPrevented()||(vt==null||vt(In,...An),en())}),Kt=useEventCallback(In=>{Tt==null||Tt(In),In.preventDefault()}),rn=useEventCallback((...In)=>{kt==null||kt(...In);const An=zt.current;window.clearTimeout(Nt.current),Nt.current=setTimeout(()=>{!An||An!==zt.current||rt!=null||gt||(An.value.length&&Number(An.selectionEnd)-Number(An.selectionStart)===An.value.length?it("all"):en())})}),nn=useEventCallback((...In)=>{St==null||St(...In),it(null)}),hn=useEventCallback(In=>{if(At==null||At(In),gt){In.preventDefault();return}const An=In.clipboardData.getData("text");if(rt&&rt.startIndex===rt.endIndex){const wn=nt.sections[rt.startIndex],fn=/^[a-zA-Z]+$/.test(An),pn=/^[0-9]+$/.test(An),kn=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(An);if(wn.contentType==="letter"&&fn||wn.contentType==="digit"&&pn||wn.contentType==="digit-with-letter"&&kn)return;if(fn||pn){In.preventDefault();return}}In.preventDefault(),Wt(),lt(An)}),vn=useEventCallback(In=>{if(gt)return;const An=In.target.value,wn=In.nativeEvent.data,fn=wn&&wn.length>1,pn=fn?wn:An,kn=cleanString(pn);if(rt==null||fn){lt(fn?wn:kn);return}let Dn;if(rt.startIndex===0&&rt.endIndex===nt.sections.length-1&&kn.length===1)Dn=kn;else{const un=cleanString(Pt.getValueStrFromSections(nt.sections,Mt));let Zt=-1,Xt=-1;for(let On=0;OnSn.end)return;const jn=kn.length-un.length+Sn.end-cleanString(Sn.endSeparator||"").length;Dn=kn.slice(Sn.start+cleanString(Sn.startSeparator||"").length,jn)}if(isAndroid()&&Dn.length===0){ct(pn);return}Ot({keyPressed:Dn,sectionIndex:rt.startIndex})}),an=useEventCallback(In=>{switch(xt==null||xt(In),!0){case(In.key==="a"&&(In.ctrlKey||In.metaKey)):{In.preventDefault(),it("all");break}case In.key==="ArrowRight":{if(In.preventDefault(),rt==null)it(Ht.startIndex);else if(rt.startIndex!==rt.endIndex)it(rt.endIndex);else{const An=Ht.neighbors[rt.startIndex].rightIndex;An!==null&&it(An)}break}case In.key==="ArrowLeft":{if(In.preventDefault(),rt==null)it(Ht.endIndex);else if(rt.startIndex!==rt.endIndex)it(rt.startIndex);else{const An=Ht.neighbors[rt.startIndex].leftIndex;An!==null&&it(An)}break}case["Backspace","Delete"].includes(In.key):{if(In.preventDefault(),gt)break;rt==null||rt.startIndex===0&&rt.endIndex===nt.sections.length-1?ot():at(),Wt();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(In.key):{if(In.preventDefault(),gt||rt==null)break;const An=nt.sections[rt.startIndex],wn=Pt.getActiveDateManager(et,nt,An),fn=adjustSectionValue(et,dt,An,In.key,ut,wn.date,{minutesStep:bt});st({activeSection:An,newSectionValue:fn,shouldGoToNextSection:!1});break}}});useEnhancedEffect$1(()=>{if(!zt.current)return;if(rt==null){zt.current.scrollLeft&&(zt.current.scrollLeft=0);return}const In=nt.sections[rt.startIndex],An=nt.sections[rt.endIndex];let wn=In.startInInput,fn=An.endInInput;if(rt.shouldSelectBoundarySelectors&&(wn-=In.startSeparator.length,fn+=An.endSeparator.length),wn!==zt.current.selectionStart||fn!==zt.current.selectionEnd){const pn=zt.current.scrollTop;zt.current===getActiveElement(document)&&zt.current.setSelectionRange(wn,fn),zt.current.scrollTop=pn}});const Qt=useValidation(_extends$u({},mt,{value:nt.value,timezone:dt}),wt,Ct.isSameError,Ct.defaultErrorState),_n=reactExports.useMemo(()=>Et!==void 0?Et:Ct.hasError(Qt),[Ct,Qt,Et]);reactExports.useEffect(()=>{!_n&&!rt&&Wt()},[nt.referenceValue,rt,_n]),reactExports.useEffect(()=>(zt.current&&zt.current===document.activeElement&&it("all"),()=>window.clearTimeout(Nt.current)),[]),reactExports.useEffect(()=>{nt.tempValueStrAndroid!=null&&rt!=null&&(Wt(),at())},[nt.tempValueStrAndroid]);const Pn=reactExports.useMemo(()=>{var In;return(In=nt.tempValueStrAndroid)!=null?In:Pt.getValueStrFromSections(nt.sections,Mt)},[nt.sections,Pt,nt.tempValueStrAndroid,Mt]),$n=reactExports.useMemo(()=>rt==null||nt.sections[rt.startIndex].contentType==="letter"?"text":"numeric",[rt,nt.sections]),Nn=zt.current&&zt.current===getActiveElement(document),Tn=Ct.areValuesEqual(et,nt.value,Ct.emptyValue),cn=!Nn&&Tn;reactExports.useImperativeHandle(yt,()=>({getSections:()=>nt.sections,getActiveSectionIndex:()=>{var In,An;const wn=(In=zt.current.selectionStart)!=null?In:0,fn=(An=zt.current.selectionEnd)!=null?An:0;if(wn===0&&fn===0)return null;const pn=wn<=nt.sections[0].startInInput?1:nt.sections.findIndex(kn=>kn.startInInput-kn.startSeparator.length>wn);return pn===-1?nt.sections.length-1:pn-1},setSelectedSections:In=>it(In)}));const mn=useEventCallback((In,...An)=>{var wn;In.preventDefault(),Dt==null||Dt(In,...An),ot(),zt==null||(wn=zt.current)==null||wn.focus(),it(0)});return _extends$u({placeholder:ht,autoComplete:"off",disabled:!!jt},It,{value:cn?"":Pn,inputMode:$n,readOnly:gt,onClick:sn,onFocus:rn,onBlur:nn,onPaste:hn,onChange:vn,onKeyDown:an,onMouseUp:Kt,onClear:mn,error:_n,ref:Ft,clearable:!!($t&&!Tn&&!gt&&!jt)})},validateDate=({props:tt,value:et,adapter:nt})=>{if(et===null)return null;const{shouldDisableDate:rt,shouldDisableMonth:it,shouldDisableYear:ot,disablePast:at,disableFuture:st,timezone:lt}=tt,ct=nt.utils.dateWithTimezone(void 0,lt),ut=applyDefaultDate(nt.utils,tt.minDate,nt.defaultDates.minDate),ht=applyDefaultDate(nt.utils,tt.maxDate,nt.defaultDates.maxDate);switch(!0){case!nt.utils.isValid(et):return"invalidDate";case!!(rt&&rt(et)):return"shouldDisableDate";case!!(it&&it(et)):return"shouldDisableMonth";case!!(ot&&ot(et)):return"shouldDisableYear";case!!(st&&nt.utils.isAfterDay(et,ct)):return"disableFuture";case!!(at&&nt.utils.isBeforeDay(et,ct)):return"disablePast";case!!(ut&&nt.utils.isBeforeDay(et,ut)):return"minDate";case!!(ht&&nt.utils.isAfterDay(et,ht)):return"maxDate";default:return null}},DATE_VALIDATION_PROP_NAMES=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],TIME_VALIDATION_PROP_NAMES=["disablePast","disableFuture","minTime","maxTime","shouldDisableClock","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],DATE_TIME_VALIDATION_PROP_NAMES=["minDateTime","maxDateTime"],VALIDATION_PROP_NAMES=[...DATE_VALIDATION_PROP_NAMES,...TIME_VALIDATION_PROP_NAMES,...DATE_TIME_VALIDATION_PROP_NAMES],extractValidationProps=tt=>VALIDATION_PROP_NAMES.reduce((et,nt)=>(tt.hasOwnProperty(nt)&&(et[nt]=tt[nt]),et),{}),SHARED_FIELD_INTERNAL_PROP_NAMES=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","readOnly","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef"],splitFieldInternalAndForwardedProps=(tt,et)=>{const nt=_extends$u({},tt),rt={},it=ot=>{nt.hasOwnProperty(ot)&&(rt[ot]=nt[ot],delete nt[ot])};return SHARED_FIELD_INTERNAL_PROP_NAMES.forEach(it),et==="date"?DATE_VALIDATION_PROP_NAMES.forEach(it):et==="time"?TIME_VALIDATION_PROP_NAMES.forEach(it):et==="date-time"&&(DATE_VALIDATION_PROP_NAMES.forEach(it),TIME_VALIDATION_PROP_NAMES.forEach(it),DATE_TIME_VALIDATION_PROP_NAMES.forEach(it)),{forwardedProps:nt,internalProps:rt}},useDefaultizedDateField=tt=>{var et,nt,rt;const it=useUtils(),ot=useDefaultDates();return _extends$u({},tt,{disablePast:(et=tt.disablePast)!=null?et:!1,disableFuture:(nt=tt.disableFuture)!=null?nt:!1,format:(rt=tt.format)!=null?rt:it.formats.keyboardDate,minDate:applyDefaultDate(it,tt.minDate,ot.minDate),maxDate:applyDefaultDate(it,tt.maxDate,ot.maxDate)})},useDateField=({props:tt,inputRef:et})=>{const nt=useDefaultizedDateField(tt),{forwardedProps:rt,internalProps:it}=splitFieldInternalAndForwardedProps(nt,"date");return useField({inputRef:et,forwardedProps:rt,internalProps:it,valueManager:singleItemValueManager,fieldValueManager:singleItemFieldValueManager,validator:validateDate,valueType:"date"})},PickersModalDialogRoot=styled$1(MuiDialog)({[`& .${dialogClasses$1.container}`]:{outline:0},[`& .${dialogClasses$1.paper}`]:{outline:0,minWidth:DIALOG_WIDTH}}),PickersModalDialogContent=styled$1(DialogContent$1)({"&:first-of-type":{padding:0}});function PickersModalDialog(tt){var et,nt;const{children:rt,onDismiss:it,open:ot,slots:at,slotProps:st}=tt,lt=(et=at==null?void 0:at.dialog)!=null?et:PickersModalDialogRoot,ct=(nt=at==null?void 0:at.mobileTransition)!=null?nt:Fade$1;return jsxRuntimeExports.jsx(lt,_extends$u({open:ot,onClose:it},st==null?void 0:st.dialog,{TransitionComponent:ct,TransitionProps:st==null?void 0:st.mobileTransition,PaperComponent:at==null?void 0:at.mobilePaper,PaperProps:st==null?void 0:st.mobilePaper,children:jsxRuntimeExports.jsx(PickersModalDialogContent,{children:rt})}))}function getPickersPopperUtilityClass(tt){return generateUtilityClass("MuiPickersPopper",tt)}generateUtilityClasses("MuiPickersPopper",["root","paper"]);const PREFERS_REDUCED_MOTION="@media (prefers-reduced-motion: reduce)",mobileVersionMatches=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),androidVersion=mobileVersionMatches&&mobileVersionMatches[1]?parseInt(mobileVersionMatches[1],10):null,iOSVersion=mobileVersionMatches&&mobileVersionMatches[2]?parseInt(mobileVersionMatches[2],10):null,slowAnimationDevices=androidVersion&&androidVersion<10||iOSVersion&&iOSVersion<13||!1,useDefaultReduceAnimations=()=>useMediaQuery(PREFERS_REDUCED_MOTION,{defaultMatches:!1})||slowAnimationDevices,_excluded$A=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],useUtilityClasses$d=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],paper:["paper"]},getPickersPopperUtilityClass,et)},PickersPopperRoot=styled$1(MuiPopper,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(tt,et)=>et.root})(({theme:tt})=>({zIndex:tt.zIndex.modal})),PickersPopperPaper=styled$1(Paper$1,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(tt,et)=>et.paper})(({ownerState:tt})=>_extends$u({outline:0,transformOrigin:"top center"},tt.placement.includes("top")&&{transformOrigin:"bottom center"}));function clickedRootScrollbar(tt,et){return et.documentElement.clientWidth{if(!tt)return;function lt(){ot.current=!0}return document.addEventListener("mousedown",lt,!0),document.addEventListener("touchstart",lt,!0),()=>{document.removeEventListener("mousedown",lt,!0),document.removeEventListener("touchstart",lt,!0),ot.current=!1}},[tt]);const at=useEventCallback(lt=>{if(!ot.current)return;const ct=rt.current;rt.current=!1;const ut=ownerDocument(it.current);if(!it.current||"clientX"in lt&&clickedRootScrollbar(lt,ut))return;if(nt.current){nt.current=!1;return}let ht;lt.composedPath?ht=lt.composedPath().indexOf(it.current)>-1:ht=!ut.documentElement.contains(lt.target)||it.current.contains(lt.target),!ht&&!ct&&et(lt)}),st=()=>{rt.current=!0};return reactExports.useEffect(()=>{if(tt){const lt=ownerDocument(it.current),ct=()=>{nt.current=!0};return lt.addEventListener("touchstart",at),lt.addEventListener("touchmove",ct),()=>{lt.removeEventListener("touchstart",at),lt.removeEventListener("touchmove",ct)}}},[tt,at]),reactExports.useEffect(()=>{if(tt){const lt=ownerDocument(it.current);return lt.addEventListener("click",at),()=>{lt.removeEventListener("click",at),rt.current=!1}}},[tt,at]),[it,st,st]}const PickersPopperPaperWrapper=reactExports.forwardRef((tt,et)=>{const{PaperComponent:nt,popperPlacement:rt,ownerState:it,children:ot,paperSlotProps:at,paperClasses:st,onPaperClick:lt,onPaperTouchStart:ct}=tt,ut=_objectWithoutPropertiesLoose$m(tt,_excluded$A),ht=_extends$u({},it,{placement:rt}),dt=useSlotProps({elementType:nt,externalSlotProps:at,additionalProps:{tabIndex:-1,elevation:8,ref:et},className:st,ownerState:ht});return jsxRuntimeExports.jsx(nt,_extends$u({},ut,dt,{onClick:pt=>{var mt;lt(pt),(mt=dt.onClick)==null||mt.call(dt,pt)},onTouchStart:pt=>{var mt;ct(pt),(mt=dt.onTouchStart)==null||mt.call(dt,pt)},ownerState:ht,children:ot}))});function PickersPopper(tt){var et,nt,rt,it;const ot=useThemeProps({props:tt,name:"MuiPickersPopper"}),{anchorEl:at,children:st,containerRef:lt=null,shouldRestoreFocus:ct,onBlur:ut,onDismiss:ht,open:dt,role:pt,placement:mt,slots:gt,slotProps:yt,reduceAnimations:bt}=ot;reactExports.useEffect(()=>{function Ft(Nt){dt&&(Nt.key==="Escape"||Nt.key==="Esc")&&ht()}return document.addEventListener("keydown",Ft),()=>{document.removeEventListener("keydown",Ft)}},[ht,dt]);const vt=reactExports.useRef(null);reactExports.useEffect(()=>{pt==="tooltip"||ct&&!ct()||(dt?vt.current=getActiveElement(document):vt.current&&vt.current instanceof HTMLElement&&setTimeout(()=>{vt.current instanceof HTMLElement&&vt.current.focus()}))},[dt,pt,ct]);const[xt,kt,St]=useClickAwayListener(dt,ut??ht),Tt=reactExports.useRef(null),At=useForkRef(Tt,lt),Et=useForkRef(At,xt),$t=ot,Dt=useUtilityClasses$d($t),jt=useDefaultReduceAnimations(),Pt=bt??jt,Ct=Ft=>{Ft.key==="Escape"&&(Ft.stopPropagation(),ht())},wt=((et=gt==null?void 0:gt.desktopTransition)!=null?et:Pt)?Fade$1:Grow$1,It=(nt=gt==null?void 0:gt.desktopTrapFocus)!=null?nt:FocusTrap,Ot=(rt=gt==null?void 0:gt.desktopPaper)!=null?rt:PickersPopperPaper,Wt=(it=gt==null?void 0:gt.popper)!=null?it:PickersPopperRoot,zt=useSlotProps({elementType:Wt,externalSlotProps:yt==null?void 0:yt.popper,additionalProps:{transition:!0,role:pt,open:dt,anchorEl:at,placement:mt,onKeyDown:Ct},className:Dt.root,ownerState:ot});return jsxRuntimeExports.jsx(Wt,_extends$u({},zt,{children:({TransitionProps:Ft,placement:Nt})=>jsxRuntimeExports.jsx(It,_extends$u({open:dt,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:pt==="tooltip",isEnabled:()=>!0},yt==null?void 0:yt.desktopTrapFocus,{children:jsxRuntimeExports.jsx(wt,_extends$u({},Ft,yt==null?void 0:yt.desktopTransition,{children:jsxRuntimeExports.jsx(PickersPopperPaperWrapper,{PaperComponent:Ot,ownerState:$t,popperPlacement:Nt,ref:Et,onPaperClick:kt,onPaperTouchStart:St,paperClasses:Dt.paper,paperSlotProps:yt==null?void 0:yt.desktopPaper,children:st})}))}))}))}function getPickersToolbarUtilityClass(tt){return generateUtilityClass("MuiPickersToolbar",tt)}generateUtilityClasses("MuiPickersToolbar",["root","content"]);const useUtilityClasses$c=tt=>{const{classes:et,isLandscape:nt}=tt;return composeClasses({root:["root"],content:["content"],penIconButton:["penIconButton",nt&&"penIconButtonLandscape"]},getPickersToolbarUtilityClass,et)},PickersToolbarRoot=styled$1("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(tt,et)=>et.root})(({theme:tt,ownerState:et})=>_extends$u({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:tt.spacing(2,3)},et.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"})),PickersToolbarContent=styled$1("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(tt,et)=>et.content})(({ownerState:tt})=>{var et;return{display:"flex",flexWrap:"wrap",width:"100%",justifyContent:tt.isLandscape?"flex-start":"space-between",flexDirection:tt.isLandscape?(et=tt.landscapeDirection)!=null?et:"column":"row",flex:1,alignItems:tt.isLandscape?"flex-start":"center"}}),PickersToolbar=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiPickersToolbar"}),{children:it,className:ot,toolbarTitle:at,hidden:st,titleId:lt}=rt,ct=rt,ut=useUtilityClasses$c(ct);return st?null:jsxRuntimeExports.jsxs(PickersToolbarRoot,{ref:nt,className:clsx(ut.root,ot),ownerState:ct,children:[jsxRuntimeExports.jsx(Typography$1,{color:"text.secondary",variant:"overline",id:lt,children:at}),jsxRuntimeExports.jsx(PickersToolbarContent,{className:ut.content,ownerState:ct,children:it})]})}),useOpenState=({open:tt,onOpen:et,onClose:nt})=>{const rt=reactExports.useRef(typeof tt=="boolean").current,[it,ot]=reactExports.useState(!1);reactExports.useEffect(()=>{if(rt){if(typeof tt!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");ot(tt)}},[rt,tt]);const at=reactExports.useCallback(st=>{rt||ot(st),st&&et&&et(),!st&&nt&&nt()},[rt,et,nt]);return{isOpen:it,setIsOpen:at}},shouldPublishValue=tt=>{const{action:et,hasChanged:nt,dateState:rt,isControlled:it}=tt,ot=!it&&!rt.hasBeenModifiedSinceMount;return et.name==="setValueFromField"?!0:et.name==="setValueFromAction"?ot&&["accept","today","clear"].includes(et.pickerAction)?!0:nt(rt.lastPublishedValue):et.name==="setValueFromView"&&et.selectionState!=="shallow"||et.name==="setValueFromShortcut"?ot?!0:nt(rt.lastPublishedValue):!1},shouldCommitValue=tt=>{const{action:et,hasChanged:nt,dateState:rt,isControlled:it,closeOnSelect:ot}=tt,at=!it&&!rt.hasBeenModifiedSinceMount;return et.name==="setValueFromAction"?at&&["accept","today","clear"].includes(et.pickerAction)?!0:nt(rt.lastCommittedValue):et.name==="setValueFromView"&&et.selectionState==="finish"&&ot?at?!0:nt(rt.lastCommittedValue):et.name==="setValueFromShortcut"?et.changeImportance==="accept"&&nt(rt.lastCommittedValue):!1},shouldClosePicker=tt=>{const{action:et,closeOnSelect:nt}=tt;return et.name==="setValueFromAction"?!0:et.name==="setValueFromView"?et.selectionState==="finish"&&nt:et.name==="setValueFromShortcut"?et.changeImportance==="accept":!1},usePickerValue=({props:tt,valueManager:et,valueType:nt,wrapperVariant:rt,validator:it})=>{const{onAccept:ot,onChange:at,value:st,defaultValue:lt,closeOnSelect:ct=rt==="desktop",selectedSections:ut,onSelectedSectionsChange:ht,timezone:dt}=tt,{current:pt}=reactExports.useRef(lt),{current:mt}=reactExports.useRef(st!==void 0),gt=useUtils(),yt=useLocalizationContext(),[bt,vt]=useControlled({controlled:ut,default:null,name:"usePickerValue",state:"selectedSections"}),{isOpen:xt,setIsOpen:kt}=useOpenState(tt),[St,Tt]=reactExports.useState(()=>{let rn;return st!==void 0?rn=st:pt!==void 0?rn=pt:rn=et.emptyValue,{draft:rn,lastPublishedValue:rn,lastCommittedValue:rn,lastControlledValue:st,hasBeenModifiedSinceMount:!1}}),{timezone:At,handleValueChange:Et}=useValueWithTimezone({timezone:dt,value:st,defaultValue:pt,onChange:at,valueManager:et});useValidation(_extends$u({},tt,{value:St.draft,timezone:At}),it,et.isSameError,et.defaultErrorState);const $t=useEventCallback(rn=>{const nn={action:rn,dateState:St,hasChanged:Qt=>!et.areValuesEqual(gt,rn.value,Qt),isControlled:mt,closeOnSelect:ct},hn=shouldPublishValue(nn),vn=shouldCommitValue(nn),an=shouldClosePicker(nn);if(Tt(Qt=>_extends$u({},Qt,{draft:rn.value,lastPublishedValue:hn?rn.value:Qt.lastPublishedValue,lastCommittedValue:vn?rn.value:Qt.lastCommittedValue,hasBeenModifiedSinceMount:!0})),hn){const _n={validationError:rn.name==="setValueFromField"?rn.context.validationError:it({adapter:yt,value:rn.value,props:_extends$u({},tt,{value:rn.value,timezone:At})})};rn.name==="setValueFromShortcut"&&rn.shortcut!=null&&(_n.shortcut=rn.shortcut),Et(rn.value,_n)}vn&&ot&&ot(rn.value),an&&kt(!1)});if(st!==void 0&&(St.lastControlledValue===void 0||!et.areValuesEqual(gt,St.lastControlledValue,st))){const rn=et.areValuesEqual(gt,St.draft,st);Tt(nn=>_extends$u({},nn,{lastControlledValue:st},rn?{}:{lastCommittedValue:st,lastPublishedValue:st,draft:st,hasBeenModifiedSinceMount:!0}))}const Dt=useEventCallback(()=>{$t({value:et.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),jt=useEventCallback(()=>{$t({value:St.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),Pt=useEventCallback(()=>{$t({value:St.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),Ct=useEventCallback(()=>{$t({value:St.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),wt=useEventCallback(()=>{$t({value:et.getTodayValue(gt,At,nt),name:"setValueFromAction",pickerAction:"today"})}),It=useEventCallback(()=>kt(!0)),Ot=useEventCallback(()=>kt(!1)),Wt=useEventCallback((rn,nn="partial")=>$t({name:"setValueFromView",value:rn,selectionState:nn})),zt=useEventCallback((rn,nn,hn)=>$t({name:"setValueFromShortcut",value:rn,changeImportance:nn??"accept",shortcut:hn})),Ft=useEventCallback((rn,nn)=>$t({name:"setValueFromField",value:rn,context:nn})),Nt=useEventCallback(rn=>{vt(rn),ht==null||ht(rn)}),Ut={onClear:Dt,onAccept:jt,onDismiss:Pt,onCancel:Ct,onSetToday:wt,onOpen:It,onClose:Ot},Mt={value:St.draft,onChange:Ft,selectedSections:bt,onSelectedSectionsChange:Nt},Ht=reactExports.useMemo(()=>et.cleanValue(gt,St.draft),[gt,et,St.draft]),en={value:Ht,onChange:Wt,onClose:Ot,open:xt,onSelectedSectionsChange:Nt},Kt=_extends$u({},Ut,{value:Ht,onChange:Wt,onSelectShortcut:zt,isValid:rn=>{const nn=it({adapter:yt,value:rn,props:_extends$u({},tt,{value:rn,timezone:At})});return!et.hasError(nn)}});return{open:xt,fieldProps:Mt,viewProps:en,layoutProps:Kt,actions:Ut}},_excluded$z=["className","sx"],usePickerViews=({props:tt,propsFromPickerValue:et,additionalViewProps:nt,inputRef:rt,autoFocusView:it})=>{const{onChange:ot,open:at,onSelectedSectionsChange:st,onClose:lt}=et,{views:ct,openTo:ut,onViewChange:ht,disableOpenPicker:dt,viewRenderers:pt,timezone:mt}=tt,gt=_objectWithoutPropertiesLoose$m(tt,_excluded$z),{view:yt,setView:bt,defaultView:vt,focusedView:xt,setFocusedView:kt,setValueAndGoToNextView:St}=useViews({view:void 0,views:ct,openTo:ut,onChange:ot,onViewChange:ht,autoFocus:it}),{hasUIView:Tt,viewModeLookup:At}=reactExports.useMemo(()=>ct.reduce((wt,It)=>{let Ot;return dt?Ot="field":pt[It]!=null?Ot="UI":Ot="field",wt.viewModeLookup[It]=Ot,Ot==="UI"&&(wt.hasUIView=!0),wt},{hasUIView:!1,viewModeLookup:{}}),[dt,pt,ct]),Et=reactExports.useMemo(()=>ct.reduce((wt,It)=>pt[It]!=null&&isTimeView(It)?wt+1:wt,0),[pt,ct]),$t=At[yt],Dt=useEventCallback(()=>$t==="UI"),[jt,Pt]=reactExports.useState($t==="UI"?yt:null);return jt!==yt&&At[yt]==="UI"&&Pt(yt),useEnhancedEffect$1(()=>{$t==="field"&&at&&(lt(),setTimeout(()=>{rt==null||rt.current.focus(),st(yt)}))},[yt]),useEnhancedEffect$1(()=>{if(!at)return;let wt=yt;$t==="field"&&jt!=null&&(wt=jt),wt!==vt&&At[wt]==="UI"&&At[vt]==="UI"&&(wt=vt),wt!==yt&&bt(wt),kt(wt,!0)},[at]),{hasUIView:Tt,shouldRestoreFocus:Dt,layoutProps:{views:ct,view:jt,onViewChange:bt},renderCurrentView:()=>{if(jt==null)return null;const wt=pt[jt];return wt==null?null:wt(_extends$u({},gt,nt,et,{views:ct,timezone:mt,onChange:St,view:jt,onViewChange:bt,focusedView:xt,onFocusedViewChange:kt,showViewSwitcher:Et>1,timeViewsCount:Et}))}}};function getOrientation(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const useIsLandscape=(tt,et)=>{const[nt,rt]=reactExports.useState(getOrientation);return useEnhancedEffect$1(()=>{const ot=()=>{rt(getOrientation())};return window.addEventListener("orientationchange",ot),()=>{window.removeEventListener("orientationchange",ot)}},[]),arrayIncludes$2(tt,["hours","minutes","seconds"])?!1:(et||nt)==="landscape"},usePickerLayoutProps=({props:tt,propsFromPickerValue:et,propsFromPickerViews:nt,wrapperVariant:rt})=>{const{orientation:it}=tt,ot=useIsLandscape(nt.views,it);return{layoutProps:_extends$u({},nt,et,{isLandscape:ot,wrapperVariant:rt,disabled:tt.disabled,readOnly:tt.readOnly})}},buildWarning=(tt,et="warning")=>{let nt=!1;const rt=Array.isArray(tt)?tt.join(` -`):tt;return()=>{nt||(nt=!0,et==="error"?console.error(rt):console.warn(rt))}};buildWarning(["The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.","You can replace it with the `textField` component slot in most cases.","For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5)."]);const usePicker=({props:tt,valueManager:et,valueType:nt,wrapperVariant:rt,inputRef:it,additionalViewProps:ot,validator:at,autoFocusView:st})=>{const lt=usePickerValue({props:tt,valueManager:et,valueType:nt,wrapperVariant:rt,validator:at}),ct=usePickerViews({props:tt,inputRef:it,additionalViewProps:ot,autoFocusView:st,propsFromPickerValue:lt.viewProps}),ut=usePickerLayoutProps({props:tt,wrapperVariant:rt,propsFromPickerValue:lt.layoutProps,propsFromPickerViews:ct.layoutProps});return{open:lt.open,actions:lt.actions,fieldProps:lt.fieldProps,renderCurrentView:ct.renderCurrentView,hasUIView:ct.hasUIView,shouldRestoreFocus:ct.shouldRestoreFocus,layoutProps:ut.layoutProps}};function getPickersLayoutUtilityClass(tt){return generateUtilityClass("MuiPickersLayout",tt)}const pickersLayoutClasses=generateUtilityClasses("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","shortcuts"]),_excluded$y=["onAccept","onClear","onCancel","onSetToday","actions"];function PickersActionBar(tt){const{onAccept:et,onClear:nt,onCancel:rt,onSetToday:it,actions:ot}=tt,at=_objectWithoutPropertiesLoose$m(tt,_excluded$y),st=useLocaleText();if(ot==null||ot.length===0)return null;const lt=ot==null?void 0:ot.map(ct=>{switch(ct){case"clear":return jsxRuntimeExports.jsx(Button$2,{onClick:nt,children:st.clearButtonLabel},ct);case"cancel":return jsxRuntimeExports.jsx(Button$2,{onClick:rt,children:st.cancelButtonLabel},ct);case"accept":return jsxRuntimeExports.jsx(Button$2,{onClick:et,children:st.okButtonLabel},ct);case"today":return jsxRuntimeExports.jsx(Button$2,{onClick:it,children:st.todayButtonLabel},ct);default:return null}});return jsxRuntimeExports.jsx(DialogActions$1,_extends$u({},at,{children:lt}))}const _excluded$x=["items","changeImportance","isLandscape","onChange","isValid"],_excluded2$a=["getValue"];function PickersShortcuts(tt){const{items:et,changeImportance:nt,onChange:rt,isValid:it}=tt,ot=_objectWithoutPropertiesLoose$m(tt,_excluded$x);if(et==null||et.length===0)return null;const at=et.map(st=>{let{getValue:lt}=st,ct=_objectWithoutPropertiesLoose$m(st,_excluded2$a);const ut=lt({isValid:it});return{label:ct.label,onClick:()=>{rt(ut,nt,ct)},disabled:!it(ut)}});return jsxRuntimeExports.jsx(List$1,_extends$u({dense:!0,sx:[{maxHeight:VIEW_HEIGHT,maxWidth:200,overflow:"auto"},...Array.isArray(ot.sx)?ot.sx:[ot.sx]]},ot,{children:at.map(st=>jsxRuntimeExports.jsx(ListItem$1,{children:jsxRuntimeExports.jsx(Chip$1,_extends$u({},st))},st.label))}))}function toolbarHasView(tt){return tt.view!==null}const useUtilityClasses$b=tt=>{const{classes:et,isLandscape:nt}=tt;return composeClasses({root:["root",nt&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},getPickersLayoutUtilityClass,et)},usePickerLayout=tt=>{var et,nt;const{wrapperVariant:rt,onAccept:it,onClear:ot,onCancel:at,onSetToday:st,view:lt,views:ct,onViewChange:ut,value:ht,onChange:dt,onSelectShortcut:pt,isValid:mt,isLandscape:gt,disabled:yt,readOnly:bt,children:vt,components:xt,componentsProps:kt,slots:St,slotProps:Tt}=tt,At=St??uncapitalizeObjectKeys(xt),Et=Tt??kt,$t=useUtilityClasses$b(tt),Dt=(et=At==null?void 0:At.actionBar)!=null?et:PickersActionBar,jt=useSlotProps({elementType:Dt,externalSlotProps:Et==null?void 0:Et.actionBar,additionalProps:{onAccept:it,onClear:ot,onCancel:at,onSetToday:st,actions:rt==="desktop"?[]:["cancel","accept"],className:$t.actionBar},ownerState:_extends$u({},tt,{wrapperVariant:rt})}),Pt=jsxRuntimeExports.jsx(Dt,_extends$u({},jt)),Ct=At==null?void 0:At.toolbar,wt=useSlotProps({elementType:Ct,externalSlotProps:Et==null?void 0:Et.toolbar,additionalProps:{isLandscape:gt,onChange:dt,value:ht,view:lt,onViewChange:ut,views:ct,disabled:yt,readOnly:bt,className:$t.toolbar},ownerState:_extends$u({},tt,{wrapperVariant:rt})}),It=toolbarHasView(wt)&&Ct?jsxRuntimeExports.jsx(Ct,_extends$u({},wt)):null,Ot=vt,Wt=At==null?void 0:At.tabs,zt=lt&&Wt?jsxRuntimeExports.jsx(Wt,_extends$u({view:lt,onViewChange:ut},Et==null?void 0:Et.tabs)):null,Ft=(nt=At==null?void 0:At.shortcuts)!=null?nt:PickersShortcuts,Nt=useSlotProps({elementType:Ft,externalSlotProps:Et==null?void 0:Et.shortcuts,additionalProps:{isValid:mt,isLandscape:gt,onChange:pt,className:$t.shortcuts},ownerState:{isValid:mt,isLandscape:gt,onChange:pt,className:$t.shortcuts,wrapperVariant:rt}}),Ut=lt&&Ft?jsxRuntimeExports.jsx(Ft,_extends$u({},Nt)):null;return{toolbar:It,content:Ot,tabs:zt,actionBar:Pt,shortcuts:Ut}},usePickerLayout$1=usePickerLayout,useUtilityClasses$a=tt=>{const{isLandscape:et,classes:nt}=tt;return composeClasses({root:["root",et&&"landscape"],contentWrapper:["contentWrapper"]},getPickersLayoutUtilityClass,nt)},PickersLayoutRoot=styled$1("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(tt,et)=>et.root})(({theme:tt,ownerState:et})=>({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${pickersLayoutClasses.toolbar}`]:et.isLandscape?{gridColumn:tt.direction==="rtl"?3:1,gridRow:"2 / 3"}:{gridColumn:"2 / 4",gridRow:1},[`.${pickersLayoutClasses.shortcuts}`]:et.isLandscape?{gridColumn:"2 / 4",gridRow:1}:{gridColumn:tt.direction==="rtl"?3:1,gridRow:"2 / 3"},[`& .${pickersLayoutClasses.actionBar}`]:{gridColumn:"1 / 4",gridRow:3}}));PickersLayoutRoot.propTypes={as:PropTypes.elementType,ownerState:PropTypes.shape({isLandscape:PropTypes.bool.isRequired}).isRequired,sx:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func,PropTypes.object,PropTypes.bool])),PropTypes.func,PropTypes.object])};const PickersLayoutContentWrapper=styled$1("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(tt,et)=>et.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),PickersLayout=function(et){const nt=useThemeProps({props:et,name:"MuiPickersLayout"}),{toolbar:rt,content:it,tabs:ot,actionBar:at,shortcuts:st}=usePickerLayout$1(nt),{sx:lt,className:ct,isLandscape:ut,ref:ht,wrapperVariant:dt}=nt,pt=nt,mt=useUtilityClasses$a(pt);return jsxRuntimeExports.jsxs(PickersLayoutRoot,{ref:ht,sx:lt,className:clsx(ct,mt.root),ownerState:pt,children:[ut?st:rt,ut?rt:st,jsxRuntimeExports.jsx(PickersLayoutContentWrapper,{className:mt.contentWrapper,children:dt==="desktop"?jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[it,ot]}):jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[ot,it]})}),at]})},getPickersSlideTransitionUtilityClass=tt=>generateUtilityClass("MuiPickersSlideTransition",tt),pickersSlideTransitionClasses=generateUtilityClasses("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),_excluded$w=["children","className","reduceAnimations","slideDirection","transKey","classes"],useUtilityClasses$9=tt=>{const{classes:et,slideDirection:nt}=tt,rt={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${nt}`],exitActive:[`slideExitActiveLeft-${nt}`]};return composeClasses(rt,getPickersSlideTransitionUtilityClass,et)},PickersSlideTransitionRoot=styled$1(TransitionGroup$1,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(tt,et)=>[et.root,{[`.${pickersSlideTransitionClasses["slideEnter-left"]}`]:et["slideEnter-left"]},{[`.${pickersSlideTransitionClasses["slideEnter-right"]}`]:et["slideEnter-right"]},{[`.${pickersSlideTransitionClasses.slideEnterActive}`]:et.slideEnterActive},{[`.${pickersSlideTransitionClasses.slideExit}`]:et.slideExit},{[`.${pickersSlideTransitionClasses["slideExitActiveLeft-left"]}`]:et["slideExitActiveLeft-left"]},{[`.${pickersSlideTransitionClasses["slideExitActiveLeft-right"]}`]:et["slideExitActiveLeft-right"]}]})(({theme:tt})=>{const et=tt.transitions.create("transform",{duration:tt.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${pickersSlideTransitionClasses["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${pickersSlideTransitionClasses["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${pickersSlideTransitionClasses.slideEnterActive}`]:{transform:"translate(0%)",transition:et},[`& .${pickersSlideTransitionClasses.slideExit}`]:{transform:"translate(0%)"},[`& .${pickersSlideTransitionClasses["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:et,zIndex:0},[`& .${pickersSlideTransitionClasses["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:et,zIndex:0}}});function PickersSlideTransition(tt){const et=useThemeProps({props:tt,name:"MuiPickersSlideTransition"}),{children:nt,className:rt,reduceAnimations:it,transKey:ot}=et,at=_objectWithoutPropertiesLoose$m(et,_excluded$w),st=useUtilityClasses$9(et),lt=useTheme();if(it)return jsxRuntimeExports.jsx("div",{className:clsx(st.root,rt),children:nt});const ct={exit:st.exit,enterActive:st.enterActive,enter:st.enter,exitActive:st.exitActive};return jsxRuntimeExports.jsx(PickersSlideTransitionRoot,{className:clsx(st.root,rt),childFactory:ut=>reactExports.cloneElement(ut,{classNames:ct}),role:"presentation",children:jsxRuntimeExports.jsx(CSSTransition$1,_extends$u({mountOnEnter:!0,unmountOnExit:!0,timeout:lt.transitions.duration.complex,classNames:ct},at,{children:nt}),ot)})}const useIsDateDisabled=({shouldDisableDate:tt,shouldDisableMonth:et,shouldDisableYear:nt,minDate:rt,maxDate:it,disableFuture:ot,disablePast:at,timezone:st})=>{const lt=useLocalizationContext();return reactExports.useCallback(ct=>validateDate({adapter:lt,value:ct,props:{shouldDisableDate:tt,shouldDisableMonth:et,shouldDisableYear:nt,minDate:rt,maxDate:it,disableFuture:ot,disablePast:at,timezone:st}})!==null,[lt,tt,et,nt,rt,it,ot,at,st])},getDayCalendarUtilityClass=tt=>generateUtilityClass("MuiDayCalendar",tt);generateUtilityClasses("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const _excluded$v=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],_excluded2$9=["ownerState"],useUtilityClasses$8=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},getDayCalendarUtilityClass,et)},weeksContainerHeight=(DAY_SIZE+DAY_MARGIN*2)*6,PickersCalendarDayRoot=styled$1("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(tt,et)=>et.root})({}),PickersCalendarDayHeader=styled$1("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(tt,et)=>et.header})({display:"flex",justifyContent:"center",alignItems:"center"}),PickersCalendarWeekDayLabel=styled$1(Typography$1,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(tt,et)=>et.weekDayLabel})(({theme:tt})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(tt.vars||tt).palette.text.secondary})),PickersCalendarWeekNumberLabel=styled$1(Typography$1,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(tt,et)=>et.weekNumberLabel})(({theme:tt})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:tt.palette.text.disabled})),PickersCalendarWeekNumber=styled$1(Typography$1,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(tt,et)=>et.weekNumber})(({theme:tt})=>_extends$u({},tt.typography.caption,{width:DAY_SIZE,height:DAY_SIZE,padding:0,margin:`0 ${DAY_MARGIN}px`,color:tt.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),PickersCalendarLoadingContainer=styled$1("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(tt,et)=>et.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:weeksContainerHeight}),PickersCalendarSlideTransition=styled$1(PickersSlideTransition,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(tt,et)=>et.slideTransition})({minHeight:weeksContainerHeight}),PickersCalendarWeekContainer=styled$1("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(tt,et)=>et.monthContainer})({overflow:"hidden"}),PickersCalendarWeek=styled$1("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(tt,et)=>et.weekContainer})({margin:`${DAY_MARGIN}px 0`,display:"flex",justifyContent:"center"});function WrappedDay(tt){var et,nt,rt;let{parentProps:it,day:ot,focusableDay:at,selectedDays:st,isDateDisabled:lt,currentMonthNumber:ct,isViewFocused:ut}=tt,ht=_objectWithoutPropertiesLoose$m(tt,_excluded$v);const{disabled:dt,disableHighlightToday:pt,isMonthSwitchingAnimating:mt,showDaysOutsideCurrentMonth:gt,components:yt,componentsProps:bt,slots:vt,slotProps:xt,timezone:kt}=it,St=useUtils(),Tt=useNow(kt),At=at!==null&&St.isSameDay(ot,at),Et=st.some(Wt=>St.isSameDay(Wt,ot)),$t=St.isSameDay(ot,Tt),Dt=(et=(nt=vt==null?void 0:vt.day)!=null?nt:yt==null?void 0:yt.Day)!=null?et:PickersDay,jt=useSlotProps({elementType:Dt,externalSlotProps:(rt=xt==null?void 0:xt.day)!=null?rt:bt==null?void 0:bt.day,additionalProps:_extends$u({disableHighlightToday:pt,showDaysOutsideCurrentMonth:gt,role:"gridcell",isAnimating:mt,"data-timestamp":St.toJsDate(ot).valueOf()},ht),ownerState:_extends$u({},it,{day:ot,selected:Et})}),Pt=_objectWithoutPropertiesLoose$m(jt,_excluded2$9),Ct=reactExports.useMemo(()=>dt||lt(ot),[dt,lt,ot]),wt=reactExports.useMemo(()=>St.getMonth(ot)!==ct,[St,ot,ct]),It=reactExports.useMemo(()=>{const Wt=St.startOfMonth(St.setMonth(ot,ct));return gt?St.isSameDay(ot,St.startOfWeek(Wt)):St.isSameDay(ot,Wt)},[ct,ot,gt,St]),Ot=reactExports.useMemo(()=>{const Wt=St.endOfMonth(St.setMonth(ot,ct));return gt?St.isSameDay(ot,St.endOfWeek(Wt)):St.isSameDay(ot,Wt)},[ct,ot,gt,St]);return jsxRuntimeExports.jsx(Dt,_extends$u({},Pt,{day:ot,disabled:Ct,autoFocus:ut&&At,today:$t,outsideCurrentMonth:wt,isFirstVisibleCell:It,isLastVisibleCell:Ot,selected:Et,tabIndex:At?0:-1,"aria-selected":Et,"aria-current":$t?"date":void 0}))}function DayCalendar(tt){const et=useThemeProps({props:tt,name:"MuiDayCalendar"}),{onFocusedDayChange:nt,className:rt,currentMonth:it,selectedDays:ot,focusedDay:at,loading:st,onSelectedDaysChange:lt,onMonthSwitchingAnimationEnd:ct,readOnly:ut,reduceAnimations:ht,renderLoading:dt=()=>jsxRuntimeExports.jsx("span",{children:"..."}),slideDirection:pt,TransitionProps:mt,disablePast:gt,disableFuture:yt,minDate:bt,maxDate:vt,shouldDisableDate:xt,shouldDisableMonth:kt,shouldDisableYear:St,dayOfWeekFormatter:Tt,hasFocus:At,onFocusedViewChange:Et,gridLabelId:$t,displayWeekNumber:Dt,fixedWeekNumber:jt,autoFocus:Pt,timezone:Ct}=et,wt=useNow(Ct),It=useUtils(),Ot=useUtilityClasses$8(et),zt=useTheme().direction==="rtl",Ft=Tt||((cn,mn)=>It.format(mn,"weekdayShort").charAt(0).toUpperCase()),Nt=useIsDateDisabled({shouldDisableDate:xt,shouldDisableMonth:kt,shouldDisableYear:St,minDate:bt,maxDate:vt,disablePast:gt,disableFuture:yt,timezone:Ct}),Ut=useLocaleText(),[Mt,Ht]=useControlled({name:"DayCalendar",state:"hasFocus",controlled:At,default:Pt??!1}),[en,sn]=reactExports.useState(()=>at||wt),Kt=useEventCallback(cn=>{ut||lt(cn)}),rn=cn=>{Nt(cn)||(nt(cn),sn(cn),Et==null||Et(!0),Ht(!0))},nn=useEventCallback((cn,mn)=>{switch(cn.key){case"ArrowUp":rn(It.addDays(mn,-7)),cn.preventDefault();break;case"ArrowDown":rn(It.addDays(mn,7)),cn.preventDefault();break;case"ArrowLeft":{const In=It.addDays(mn,zt?1:-1),An=It.addMonths(mn,zt?1:-1),wn=findClosestEnabledDate({utils:It,date:In,minDate:zt?In:It.startOfMonth(An),maxDate:zt?It.endOfMonth(An):In,isDateDisabled:Nt,timezone:Ct});rn(wn||In),cn.preventDefault();break}case"ArrowRight":{const In=It.addDays(mn,zt?-1:1),An=It.addMonths(mn,zt?-1:1),wn=findClosestEnabledDate({utils:It,date:In,minDate:zt?It.startOfMonth(An):In,maxDate:zt?In:It.endOfMonth(An),isDateDisabled:Nt,timezone:Ct});rn(wn||In),cn.preventDefault();break}case"Home":rn(It.startOfWeek(mn)),cn.preventDefault();break;case"End":rn(It.endOfWeek(mn)),cn.preventDefault();break;case"PageUp":rn(It.addMonths(mn,1)),cn.preventDefault();break;case"PageDown":rn(It.addMonths(mn,-1)),cn.preventDefault();break}}),hn=useEventCallback((cn,mn)=>rn(mn)),vn=useEventCallback((cn,mn)=>{Mt&&It.isSameDay(en,mn)&&(Et==null||Et(!1))}),an=It.getMonth(it),Qt=reactExports.useMemo(()=>ot.filter(cn=>!!cn).map(cn=>It.startOfDay(cn)),[It,ot]),_n=an,Pn=reactExports.useMemo(()=>reactExports.createRef(),[_n]),$n=It.startOfWeek(wt),Nn=reactExports.useMemo(()=>{const cn=It.startOfMonth(it),mn=It.endOfMonth(it);return Nt(en)||It.isAfterDay(en,mn)||It.isBeforeDay(en,cn)?findClosestEnabledDate({utils:It,date:en,minDate:cn,maxDate:mn,disablePast:gt,disableFuture:yt,isDateDisabled:Nt,timezone:Ct}):en},[it,yt,gt,en,Nt,It,Ct]),Tn=reactExports.useMemo(()=>{const cn=It.setTimezone(it,Ct),mn=It.getWeekArray(cn);let In=It.addMonths(cn,1);for(;jt&&mn.length{mn.length{var In;const An=It.format(cn,"weekdayShort").slice(0,2);return jsxRuntimeExports.jsx(PickersCalendarWeekDayLabel,{variant:"caption",role:"columnheader","aria-label":It.format(It.addDays($n,mn),"weekday"),className:Ot.weekDayLabel,children:(In=Ft==null?void 0:Ft(An,cn))!=null?In:An},An+mn.toString())})]}),st?jsxRuntimeExports.jsx(PickersCalendarLoadingContainer,{className:Ot.loadingContainer,children:dt()}):jsxRuntimeExports.jsx(PickersCalendarSlideTransition,_extends$u({transKey:_n,onExited:ct,reduceAnimations:ht,slideDirection:pt,className:clsx(rt,Ot.slideTransition)},mt,{nodeRef:Pn,children:jsxRuntimeExports.jsx(PickersCalendarWeekContainer,{ref:Pn,role:"rowgroup",className:Ot.monthContainer,children:Tn.map((cn,mn)=>jsxRuntimeExports.jsxs(PickersCalendarWeek,{role:"row",className:Ot.weekContainer,"aria-rowindex":mn+1,children:[Dt&&jsxRuntimeExports.jsx(PickersCalendarWeekNumber,{className:Ot.weekNumber,role:"rowheader","aria-label":Ut.calendarWeekNumberAriaLabelText(It.getWeekNumber(cn[0])),children:Ut.calendarWeekNumberText(It.getWeekNumber(cn[0]))}),cn.map((In,An)=>jsxRuntimeExports.jsx(WrappedDay,{parentProps:et,day:In,selectedDays:Qt,focusableDay:Nn,onKeyDown:nn,onFocus:hn,onBlur:vn,onDaySelect:Kt,isDateDisabled:Nt,currentMonthNumber:an,isViewFocused:Mt,"aria-colindex":An+1},In.toString()))]},`week-${cn[0]}`))})}))]})}const createCalendarStateReducer=(tt,et,nt)=>(rt,it)=>{switch(it.type){case"changeMonth":return _extends$u({},rt,{slideDirection:it.direction,currentMonth:it.newMonth,isMonthSwitchingAnimating:!tt});case"finishMonthSwitchingAnimation":return _extends$u({},rt,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(rt.focusedDay!=null&&it.focusedDay!=null&&nt.isSameDay(it.focusedDay,rt.focusedDay))return rt;const ot=it.focusedDay!=null&&!et&&!nt.isSameMonth(rt.currentMonth,it.focusedDay);return _extends$u({},rt,{focusedDay:it.focusedDay,isMonthSwitchingAnimating:ot&&!tt&&!it.withoutMonthSwitchingAnimation,currentMonth:ot?nt.startOfMonth(it.focusedDay):rt.currentMonth,slideDirection:it.focusedDay!=null&&nt.isAfterDay(it.focusedDay,rt.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},useCalendarState=tt=>{const{value:et,referenceDate:nt,defaultCalendarMonth:rt,disableFuture:it,disablePast:ot,disableSwitchToMonthOnDayFocus:at=!1,maxDate:st,minDate:lt,onMonthChange:ct,reduceAnimations:ut,shouldDisableDate:ht,timezone:dt}=tt,pt=useNow(dt),mt=useUtils(),gt=reactExports.useRef(createCalendarStateReducer(!!ut,at,mt)).current,yt=reactExports.useMemo(()=>{let Et=null;return nt?Et=nt:rt&&(Et=mt.startOfMonth(rt)),singleItemValueManager.getInitialReferenceValue({value:et,utils:mt,timezone:dt,props:tt,referenceDate:Et,granularity:SECTION_TYPE_GRANULARITY.day})},[]),[bt,vt]=reactExports.useReducer(gt,{isMonthSwitchingAnimating:!1,focusedDay:et||pt,currentMonth:mt.startOfMonth(yt),slideDirection:"left"}),xt=reactExports.useCallback(Et=>{vt(_extends$u({type:"changeMonth"},Et)),ct&&ct(Et.newMonth)},[ct]),kt=reactExports.useCallback(Et=>{const $t=Et;mt.isSameMonth($t,bt.currentMonth)||xt({newMonth:mt.startOfMonth($t),direction:mt.isAfterDay($t,bt.currentMonth)?"left":"right"})},[bt.currentMonth,xt,mt]),St=useIsDateDisabled({shouldDisableDate:ht,minDate:lt,maxDate:st,disableFuture:it,disablePast:ot,timezone:dt}),Tt=reactExports.useCallback(()=>{vt({type:"finishMonthSwitchingAnimation"})},[]),At=useEventCallback((Et,$t)=>{St(Et)||vt({type:"changeFocusedDay",focusedDay:Et,withoutMonthSwitchingAnimation:$t})});return{referenceDate:yt,calendarState:bt,changeMonth:kt,changeFocusedDay:At,isDateDisabled:St,onMonthSwitchingAnimationEnd:Tt,handleChangeMonth:xt}},_excluded$u=["ownerState"],useClearableField=({clearable:tt,fieldProps:et,InputProps:nt,onClear:rt,slots:it,slotProps:ot,components:at,componentsProps:st})=>{var lt,ct,ut,ht,dt,pt;const mt=useLocaleText(),gt=(lt=(ct=it==null?void 0:it.clearButton)!=null?ct:at==null?void 0:at.ClearButton)!=null?lt:IconButton$2,yt=useSlotProps({elementType:gt,externalSlotProps:(ut=ot==null?void 0:ot.clearButton)!=null?ut:st==null?void 0:st.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:mt.fieldClearLabel}}),bt=_objectWithoutPropertiesLoose$m(yt,_excluded$u),vt=(ht=(dt=it==null?void 0:it.clearIcon)!=null?dt:at==null?void 0:at.ClearIcon)!=null?ht:ClearIcon,xt=useSlotProps({elementType:vt,externalSlotProps:(pt=ot==null?void 0:ot.clearIcon)!=null?pt:st==null?void 0:st.clearIcon,ownerState:{}}),kt=_extends$u({},nt,{endAdornment:tt?jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(MuiInputAdornment,{position:"end",sx:{marginRight:nt!=null&&nt.endAdornment?-1:-1.5},children:jsxRuntimeExports.jsx(gt,_extends$u({},bt,{onClick:rt,children:jsxRuntimeExports.jsx(vt,_extends$u({fontSize:"small"},xt))}))}),nt==null?void 0:nt.endAdornment]}):nt==null?void 0:nt.endAdornment}),St=_extends$u({},et,{sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(et.sx)?et.sx:[et.sx]]});return{InputProps:kt,fieldProps:St}},_excluded$t=["components","componentsProps","slots","slotProps","InputProps","inputProps"],_excluded2$8=["inputRef"],_excluded3$2=["ref","onPaste","onKeyDown","inputMode","readOnly","clearable","onClear"],DateField=reactExports.forwardRef(function(et,nt){var rt,it,ot;const at=useThemeProps({props:et,name:"MuiDateField"}),{components:st,componentsProps:lt,slots:ct,slotProps:ut,InputProps:ht,inputProps:dt}=at,pt=_objectWithoutPropertiesLoose$m(at,_excluded$t),mt=at,gt=(rt=(it=ct==null?void 0:ct.textField)!=null?it:st==null?void 0:st.TextField)!=null?rt:MuiTextField,yt=useSlotProps({elementType:gt,externalSlotProps:(ot=ut==null?void 0:ut.textField)!=null?ot:lt==null?void 0:lt.textField,externalForwardedProps:pt,ownerState:mt}),{inputRef:bt}=yt,vt=_objectWithoutPropertiesLoose$m(yt,_excluded2$8);vt.inputProps=_extends$u({},dt,vt.inputProps),vt.InputProps=_extends$u({},ht,vt.InputProps);const xt=useDateField({props:vt,inputRef:bt}),{ref:kt,onPaste:St,onKeyDown:Tt,inputMode:At,readOnly:Et,clearable:$t,onClear:Dt}=xt,jt=_objectWithoutPropertiesLoose$m(xt,_excluded3$2),{InputProps:Pt,fieldProps:Ct}=useClearableField({onClear:Dt,clearable:$t,fieldProps:jt,InputProps:jt.InputProps,slots:ct,slotProps:ut,components:st,componentsProps:lt});return jsxRuntimeExports.jsx(gt,_extends$u({ref:nt},Ct,{InputProps:_extends$u({},Pt,{readOnly:Et}),inputProps:_extends$u({},jt.inputProps,{inputMode:At,onPaste:St,onKeyDown:Tt,ref:kt})}))}),getPickersFadeTransitionGroupUtilityClass=tt=>generateUtilityClass("MuiPickersFadeTransitionGroup",tt);generateUtilityClasses("MuiPickersFadeTransitionGroup",["root"]);const useUtilityClasses$7=tt=>{const{classes:et}=tt;return composeClasses({root:["root"]},getPickersFadeTransitionGroupUtilityClass,et)},PickersFadeTransitionGroupRoot=styled$1(TransitionGroup$1,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"block",position:"relative"});function PickersFadeTransitionGroup(tt){const et=useThemeProps({props:tt,name:"MuiPickersFadeTransitionGroup"}),{children:nt,className:rt,reduceAnimations:it,transKey:ot}=et,at=useUtilityClasses$7(et),st=useTheme();return it?nt:jsxRuntimeExports.jsx(PickersFadeTransitionGroupRoot,{className:clsx(at.root,rt),children:jsxRuntimeExports.jsx(Fade$1,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:st.transitions.duration.enteringScreen,enter:st.transitions.duration.enteringScreen,exit:0},children:nt},ot)})}function getPickersMonthUtilityClass(tt){return generateUtilityClass("MuiPickersMonth",tt)}const pickersMonthClasses=generateUtilityClasses("MuiPickersMonth",["root","monthButton","disabled","selected"]),_excluded$s=["autoFocus","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow"],useUtilityClasses$6=tt=>{const{disabled:et,selected:nt,classes:rt}=tt;return composeClasses({root:["root"],monthButton:["monthButton",et&&"disabled",nt&&"selected"]},getPickersMonthUtilityClass,rt)},PickersMonthRoot=styled$1("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(tt,et)=>[et.root]})(({ownerState:tt})=>({flexBasis:tt.monthsPerRow===3?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"})),PickersMonthButton=styled$1("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(tt,et)=>[et.monthButton,{[`&.${pickersMonthClasses.disabled}`]:et.disabled},{[`&.${pickersMonthClasses.selected}`]:et.selected}]})(({theme:tt})=>_extends$u({color:"unset",backgroundColor:"transparent",border:0,outline:0},tt.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette.action.active,tt.palette.action.hoverOpacity)},"&:hover":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette.action.active,tt.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${pickersMonthClasses.disabled}`]:{color:(tt.vars||tt).palette.text.secondary},[`&.${pickersMonthClasses.selected}`]:{color:(tt.vars||tt).palette.primary.contrastText,backgroundColor:(tt.vars||tt).palette.primary.main,"&:focus, &:hover":{backgroundColor:(tt.vars||tt).palette.primary.dark}}})),PickersMonth=reactExports.memo(function(et){const nt=useThemeProps({props:et,name:"MuiPickersMonth"}),{autoFocus:rt,children:it,disabled:ot,selected:at,value:st,tabIndex:lt,onClick:ct,onKeyDown:ut,onFocus:ht,onBlur:dt,"aria-current":pt,"aria-label":mt}=nt,gt=_objectWithoutPropertiesLoose$m(nt,_excluded$s),yt=reactExports.useRef(null),bt=useUtilityClasses$6(nt);return useEnhancedEffect$1(()=>{if(rt){var vt;(vt=yt.current)==null||vt.focus()}},[rt]),jsxRuntimeExports.jsx(PickersMonthRoot,_extends$u({className:bt.root,ownerState:nt},gt,{children:jsxRuntimeExports.jsx(PickersMonthButton,{ref:yt,disabled:ot,type:"button",role:"radio",tabIndex:ot?-1:lt,"aria-current":pt,"aria-checked":at,"aria-label":mt,onClick:vt=>ct(vt,st),onKeyDown:vt=>ut(vt,st),onFocus:vt=>ht(vt,st),onBlur:vt=>dt(vt,st),className:bt.monthButton,ownerState:nt,children:it})}))});function getMonthCalendarUtilityClass(tt){return generateUtilityClass("MuiMonthCalendar",tt)}generateUtilityClasses("MuiMonthCalendar",["root"]);const _excluded$r=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId"],useUtilityClasses$5=tt=>{const{classes:et}=tt;return composeClasses({root:["root"]},getMonthCalendarUtilityClass,et)};function useMonthCalendarDefaultizedProps(tt,et){const nt=useUtils(),rt=useDefaultDates(),it=useThemeProps({props:tt,name:et});return _extends$u({disableFuture:!1,disablePast:!1},it,{minDate:applyDefaultDate(nt,it.minDate,rt.minDate),maxDate:applyDefaultDate(nt,it.maxDate,rt.maxDate)})}const MonthCalendarRoot=styled$1("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:DIALOG_WIDTH,boxSizing:"border-box"}),MonthCalendar=reactExports.forwardRef(function(et,nt){const rt=useMonthCalendarDefaultizedProps(et,"MuiMonthCalendar"),{className:it,value:ot,defaultValue:at,referenceDate:st,disabled:lt,disableFuture:ct,disablePast:ut,maxDate:ht,minDate:dt,onChange:pt,shouldDisableMonth:mt,readOnly:gt,disableHighlightToday:yt,autoFocus:bt=!1,onMonthFocus:vt,hasFocus:xt,onFocusedViewChange:kt,monthsPerRow:St=3,timezone:Tt,gridLabelId:At}=rt,Et=_objectWithoutPropertiesLoose$m(rt,_excluded$r),{value:$t,handleValueChange:Dt,timezone:jt}=useControlledValueWithTimezone({name:"MonthCalendar",timezone:Tt,value:ot,defaultValue:at,onChange:pt,valueManager:singleItemValueManager}),Pt=useNow(jt),Ct=useTheme$2(),wt=useUtils(),It=reactExports.useMemo(()=>singleItemValueManager.getInitialReferenceValue({value:$t,utils:wt,props:rt,timezone:jt,referenceDate:st,granularity:SECTION_TYPE_GRANULARITY.month}),[]),Ot=rt,Wt=useUtilityClasses$5(Ot),zt=reactExports.useMemo(()=>wt.getMonth(Pt),[wt,Pt]),Ft=reactExports.useMemo(()=>$t!=null?wt.getMonth($t):yt?null:wt.getMonth(It),[$t,wt,yt,It]),[Nt,Ut]=reactExports.useState(()=>Ft||zt),[Mt,Ht]=useControlled({name:"MonthCalendar",state:"hasFocus",controlled:xt,default:bt??!1}),en=useEventCallback(an=>{Ht(an),kt&&kt(an)}),sn=reactExports.useCallback(an=>{const Qt=wt.startOfMonth(ut&&wt.isAfter(Pt,dt)?Pt:dt),_n=wt.startOfMonth(ct&&wt.isBefore(Pt,ht)?Pt:ht),Pn=wt.startOfMonth(an);return wt.isBefore(Pn,Qt)||wt.isAfter(Pn,_n)?!0:mt?mt(Pn):!1},[ct,ut,ht,dt,Pt,mt,wt]),Kt=useEventCallback((an,Qt)=>{if(gt)return;const _n=wt.setMonth($t??It,Qt);Dt(_n)}),rn=useEventCallback(an=>{sn(wt.setMonth($t??It,an))||(Ut(an),en(!0),vt&&vt(an))});reactExports.useEffect(()=>{Ut(an=>Ft!==null&&an!==Ft?Ft:an)},[Ft]);const nn=useEventCallback((an,Qt)=>{switch(an.key){case"ArrowUp":rn((12+Qt-3)%12),an.preventDefault();break;case"ArrowDown":rn((12+Qt+3)%12),an.preventDefault();break;case"ArrowLeft":rn((12+Qt+(Ct.direction==="ltr"?-1:1))%12),an.preventDefault();break;case"ArrowRight":rn((12+Qt+(Ct.direction==="ltr"?1:-1))%12),an.preventDefault();break}}),hn=useEventCallback((an,Qt)=>{rn(Qt)}),vn=useEventCallback((an,Qt)=>{Nt===Qt&&en(!1)});return jsxRuntimeExports.jsx(MonthCalendarRoot,_extends$u({ref:nt,className:clsx(Wt.root,it),ownerState:Ot,role:"radiogroup","aria-labelledby":At},Et,{children:getMonthsInYear(wt,$t??It).map(an=>{const Qt=wt.getMonth(an),_n=wt.format(an,"monthShort"),Pn=wt.format(an,"month"),$n=Qt===Ft,Nn=lt||sn(an);return jsxRuntimeExports.jsx(PickersMonth,{selected:$n,value:Qt,onClick:Kt,onKeyDown:nn,autoFocus:Mt&&Qt===Nt,disabled:Nn,tabIndex:Qt===Nt?0:-1,onFocus:hn,onBlur:vn,"aria-current":zt===Qt?"date":void 0,"aria-label":Pn,monthsPerRow:St,children:_n},_n)})}))});function getPickersYearUtilityClass(tt){return generateUtilityClass("MuiPickersYear",tt)}const pickersYearClasses=generateUtilityClasses("MuiPickersYear",["root","yearButton","selected","disabled"]),_excluded$q=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow"],useUtilityClasses$4=tt=>{const{disabled:et,selected:nt,classes:rt}=tt;return composeClasses({root:["root"],yearButton:["yearButton",et&&"disabled",nt&&"selected"]},getPickersYearUtilityClass,rt)},PickersYearRoot=styled$1("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(tt,et)=>[et.root]})(({ownerState:tt})=>({flexBasis:tt.yearsPerRow===3?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"})),PickersYearButton=styled$1("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(tt,et)=>[et.yearButton,{[`&.${pickersYearClasses.disabled}`]:et.disabled},{[`&.${pickersYearClasses.selected}`]:et.selected}]})(({theme:tt})=>_extends$u({color:"unset",backgroundColor:"transparent",border:0,outline:0},tt.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.focusOpacity})`:alpha$1(tt.palette.action.active,tt.palette.action.focusOpacity)},"&:hover":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette.action.active,tt.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${pickersYearClasses.disabled}`]:{color:(tt.vars||tt).palette.text.secondary},[`&.${pickersYearClasses.selected}`]:{color:(tt.vars||tt).palette.primary.contrastText,backgroundColor:(tt.vars||tt).palette.primary.main,"&:focus, &:hover":{backgroundColor:(tt.vars||tt).palette.primary.dark}}})),PickersYear=reactExports.memo(function(et){const nt=useThemeProps({props:et,name:"MuiPickersYear"}),{autoFocus:rt,className:it,children:ot,disabled:at,selected:st,value:lt,tabIndex:ct,onClick:ut,onKeyDown:ht,onFocus:dt,onBlur:pt,"aria-current":mt}=nt,gt=_objectWithoutPropertiesLoose$m(nt,_excluded$q),yt=reactExports.useRef(null),bt=useUtilityClasses$4(nt);return reactExports.useEffect(()=>{rt&&yt.current.focus()},[rt]),jsxRuntimeExports.jsx(PickersYearRoot,_extends$u({className:clsx(bt.root,it),ownerState:nt},gt,{children:jsxRuntimeExports.jsx(PickersYearButton,{ref:yt,disabled:at,type:"button",role:"radio",tabIndex:at?-1:ct,"aria-current":mt,"aria-checked":st,onClick:vt=>ut(vt,lt),onKeyDown:vt=>ht(vt,lt),onFocus:vt=>dt(vt,lt),onBlur:vt=>pt(vt,lt),className:bt.yearButton,ownerState:nt,children:ot})}))});function getYearCalendarUtilityClass(tt){return generateUtilityClass("MuiYearCalendar",tt)}generateUtilityClasses("MuiYearCalendar",["root"]);const _excluded$p=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsPerRow","timezone","gridLabelId"],useUtilityClasses$3=tt=>{const{classes:et}=tt;return composeClasses({root:["root"]},getYearCalendarUtilityClass,et)};function useYearCalendarDefaultizedProps(tt,et){var nt;const rt=useUtils(),it=useDefaultDates(),ot=useThemeProps({props:tt,name:et});return _extends$u({disablePast:!1,disableFuture:!1},ot,{yearsPerRow:(nt=ot.yearsPerRow)!=null?nt:3,minDate:applyDefaultDate(rt,ot.minDate,it.minDate),maxDate:applyDefaultDate(rt,ot.maxDate,it.maxDate)})}const YearCalendarRoot=styled$1("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:DIALOG_WIDTH,maxHeight:MAX_CALENDAR_HEIGHT,boxSizing:"border-box",position:"relative"}),YearCalendar=reactExports.forwardRef(function(et,nt){const rt=useYearCalendarDefaultizedProps(et,"MuiYearCalendar"),{autoFocus:it,className:ot,value:at,defaultValue:st,referenceDate:lt,disabled:ct,disableFuture:ut,disablePast:ht,maxDate:dt,minDate:pt,onChange:mt,readOnly:gt,shouldDisableYear:yt,disableHighlightToday:bt,onYearFocus:vt,hasFocus:xt,onFocusedViewChange:kt,yearsPerRow:St,timezone:Tt,gridLabelId:At}=rt,Et=_objectWithoutPropertiesLoose$m(rt,_excluded$p),{value:$t,handleValueChange:Dt,timezone:jt}=useControlledValueWithTimezone({name:"YearCalendar",timezone:Tt,value:at,defaultValue:st,onChange:mt,valueManager:singleItemValueManager}),Pt=useNow(jt),Ct=useTheme$2(),wt=useUtils(),It=reactExports.useMemo(()=>singleItemValueManager.getInitialReferenceValue({value:$t,utils:wt,props:rt,timezone:jt,referenceDate:lt,granularity:SECTION_TYPE_GRANULARITY.year}),[]),Ot=rt,Wt=useUtilityClasses$3(Ot),zt=reactExports.useMemo(()=>wt.getYear(Pt),[wt,Pt]),Ft=reactExports.useMemo(()=>$t!=null?wt.getYear($t):bt?null:wt.getYear(It),[$t,wt,bt,It]),[Nt,Ut]=reactExports.useState(()=>Ft||zt),[Mt,Ht]=useControlled({name:"YearCalendar",state:"hasFocus",controlled:xt,default:it??!1}),en=useEventCallback(_n=>{Ht(_n),kt&&kt(_n)}),sn=reactExports.useCallback(_n=>{if(ht&&wt.isBeforeYear(_n,Pt)||ut&&wt.isAfterYear(_n,Pt)||pt&&wt.isBeforeYear(_n,pt)||dt&&wt.isAfterYear(_n,dt))return!0;if(!yt)return!1;const Pn=wt.startOfYear(_n);return yt(Pn)},[ut,ht,dt,pt,Pt,yt,wt]),Kt=useEventCallback((_n,Pn)=>{if(gt)return;const $n=wt.setYear($t??It,Pn);Dt($n)}),rn=useEventCallback(_n=>{sn(wt.setYear($t??It,_n))||(Ut(_n),en(!0),vt==null||vt(_n))});reactExports.useEffect(()=>{Ut(_n=>Ft!==null&&_n!==Ft?Ft:_n)},[Ft]);const nn=useEventCallback((_n,Pn)=>{switch(_n.key){case"ArrowUp":rn(Pn-St),_n.preventDefault();break;case"ArrowDown":rn(Pn+St),_n.preventDefault();break;case"ArrowLeft":rn(Pn+(Ct.direction==="ltr"?-1:1)),_n.preventDefault();break;case"ArrowRight":rn(Pn+(Ct.direction==="ltr"?1:-1)),_n.preventDefault();break}}),hn=useEventCallback((_n,Pn)=>{rn(Pn)}),vn=useEventCallback((_n,Pn)=>{Nt===Pn&&en(!1)}),an=reactExports.useRef(null),Qt=useForkRef(nt,an);return reactExports.useEffect(()=>{if(it||an.current===null)return;const _n=an.current.querySelector('[tabindex="0"]');if(!_n)return;const Pn=_n.offsetHeight,$n=_n.offsetTop,Nn=an.current.clientHeight,Tn=an.current.scrollTop,cn=$n+Pn;Pn>Nn||$n{const Pn=wt.getYear(_n),$n=Pn===Ft,Nn=ct||sn(_n);return jsxRuntimeExports.jsx(PickersYear,{selected:$n,value:Pn,onClick:Kt,onKeyDown:nn,autoFocus:Mt&&Pn===Nt,disabled:Nn,tabIndex:Pn===Nt?0:-1,onFocus:hn,onBlur:vn,"aria-current":zt===Pn?"date":void 0,yearsPerRow:St,children:wt.format(_n,"year")},wt.format(_n,"year"))})}))}),getPickersCalendarHeaderUtilityClass=tt=>generateUtilityClass("MuiPickersCalendarHeader",tt),pickersCalendarHeaderClasses=generateUtilityClasses("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),_excluded$o=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone"],_excluded2$7=["ownerState"],useUtilityClasses$2=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},getPickersCalendarHeaderUtilityClass,et)},PickersCalendarHeaderRoot=styled$1("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30}),PickersCalendarHeaderLabelContainer=styled$1("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(tt,et)=>et.labelContainer})(({theme:tt})=>_extends$u({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},tt.typography.body1,{fontWeight:tt.typography.fontWeightMedium})),PickersCalendarHeaderLabel=styled$1("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(tt,et)=>et.label})({marginRight:6}),PickersCalendarHeaderSwitchViewButton=styled$1(IconButton$2,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(tt,et)=>et.switchViewButton})(({ownerState:tt})=>_extends$u({marginRight:"auto"},tt.view==="year"&&{[`.${pickersCalendarHeaderClasses.switchViewIcon}`]:{transform:"rotate(180deg)"}})),PickersCalendarHeaderSwitchViewIcon=styled$1(ArrowDropDownIcon,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(tt,et)=>et.switchViewIcon})(({theme:tt})=>({willChange:"transform",transition:tt.transitions.create("transform"),transform:"rotate(0deg)"})),PickersCalendarHeader=reactExports.forwardRef(function(et,nt){var rt,it;const ot=useLocaleText(),at=useUtils(),st=useThemeProps({props:et,name:"MuiPickersCalendarHeader"}),{slots:lt,slotProps:ct,currentMonth:ut,disabled:ht,disableFuture:dt,disablePast:pt,maxDate:mt,minDate:gt,onMonthChange:yt,onViewChange:bt,view:vt,reduceAnimations:xt,views:kt,labelId:St,className:Tt,timezone:At}=st,Et=_objectWithoutPropertiesLoose$m(st,_excluded$o),$t=st,Dt=useUtilityClasses$2(st),jt=(rt=lt==null?void 0:lt.switchViewButton)!=null?rt:PickersCalendarHeaderSwitchViewButton,Pt=useSlotProps({elementType:jt,externalSlotProps:ct==null?void 0:ct.switchViewButton,additionalProps:{size:"small","aria-label":ot.calendarViewSwitchingButtonAriaLabel(vt)},ownerState:$t,className:Dt.switchViewButton}),Ct=(it=lt==null?void 0:lt.switchViewIcon)!=null?it:PickersCalendarHeaderSwitchViewIcon,wt=useSlotProps({elementType:Ct,externalSlotProps:ct==null?void 0:ct.switchViewIcon,ownerState:void 0,className:Dt.switchViewIcon}),It=_objectWithoutPropertiesLoose$m(wt,_excluded2$7),Ot=()=>yt(at.addMonths(ut,1),"left"),Wt=()=>yt(at.addMonths(ut,-1),"right"),zt=useNextMonthDisabled(ut,{disableFuture:dt,maxDate:mt,timezone:At}),Ft=usePreviousMonthDisabled(ut,{disablePast:pt,minDate:gt,timezone:At}),Nt=()=>{if(!(kt.length===1||!bt||ht))if(kt.length===2)bt(kt.find(Ut=>Ut!==vt)||kt[0]);else{const Ut=kt.indexOf(vt)!==0?0:1;bt(kt[Ut])}};return kt.length===1&&kt[0]==="year"?null:jsxRuntimeExports.jsxs(PickersCalendarHeaderRoot,_extends$u({},Et,{ownerState:$t,className:clsx(Tt,Dt.root),ref:nt,children:[jsxRuntimeExports.jsxs(PickersCalendarHeaderLabelContainer,{role:"presentation",onClick:Nt,ownerState:$t,"aria-live":"polite",className:Dt.labelContainer,children:[jsxRuntimeExports.jsx(PickersFadeTransitionGroup,{reduceAnimations:xt,transKey:at.format(ut,"monthAndYear"),children:jsxRuntimeExports.jsx(PickersCalendarHeaderLabel,{id:St,ownerState:$t,className:Dt.label,children:at.format(ut,"monthAndYear")})}),kt.length>1&&!ht&&jsxRuntimeExports.jsx(jt,_extends$u({},Pt,{children:jsxRuntimeExports.jsx(Ct,_extends$u({},It))}))]}),jsxRuntimeExports.jsx(Fade$1,{in:vt==="day",children:jsxRuntimeExports.jsx(PickersArrowSwitcher,{slots:lt,slotProps:ct,onGoToPrevious:Wt,isPreviousDisabled:Ft,previousLabel:ot.previousMonth,onGoToNext:Ot,isNextDisabled:zt,nextLabel:ot.nextMonth})})]}))}),getDateCalendarUtilityClass=tt=>generateUtilityClass("MuiDateCalendar",tt);generateUtilityClasses("MuiDateCalendar",["root","viewTransitionContainer"]);const _excluded$n=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","defaultCalendarMonth","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","components","componentsProps","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsPerRow","monthsPerRow","timezone"],useUtilityClasses$1=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},getDateCalendarUtilityClass,et)};function useDateCalendarDefaultizedProps(tt,et){var nt,rt,it,ot,at,st,lt;const ct=useUtils(),ut=useDefaultDates(),ht=useDefaultReduceAnimations(),dt=useThemeProps({props:tt,name:et});return _extends$u({},dt,{loading:(nt=dt.loading)!=null?nt:!1,disablePast:(rt=dt.disablePast)!=null?rt:!1,disableFuture:(it=dt.disableFuture)!=null?it:!1,openTo:(ot=dt.openTo)!=null?ot:"day",views:(at=dt.views)!=null?at:["year","day"],reduceAnimations:(st=dt.reduceAnimations)!=null?st:ht,renderLoading:(lt=dt.renderLoading)!=null?lt:()=>jsxRuntimeExports.jsx("span",{children:"..."}),minDate:applyDefaultDate(ct,dt.minDate,ut.minDate),maxDate:applyDefaultDate(ct,dt.maxDate,ut.maxDate)})}const DateCalendarRoot=styled$1(PickerViewRoot,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"flex",flexDirection:"column",height:VIEW_HEIGHT}),DateCalendarViewTransitionContainer=styled$1(PickersFadeTransitionGroup,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(tt,et)=>et.viewTransitionContainer})({}),DateCalendar=reactExports.forwardRef(function(et,nt){var rt,it,ot;const at=useUtils(),st=useId(),lt=useDateCalendarDefaultizedProps(et,"MuiDateCalendar"),{autoFocus:ct,onViewChange:ut,value:ht,defaultValue:dt,referenceDate:pt,disableFuture:mt,disablePast:gt,defaultCalendarMonth:yt,onChange:bt,onYearChange:vt,onMonthChange:xt,reduceAnimations:kt,shouldDisableDate:St,shouldDisableMonth:Tt,shouldDisableYear:At,view:Et,views:$t,openTo:Dt,className:jt,disabled:Pt,readOnly:Ct,minDate:wt,maxDate:It,disableHighlightToday:Ot,focusedView:Wt,onFocusedViewChange:zt,showDaysOutsideCurrentMonth:Ft,fixedWeekNumber:Nt,dayOfWeekFormatter:Ut,components:Mt,componentsProps:Ht,slots:en,slotProps:sn,loading:Kt,renderLoading:rn,displayWeekNumber:nn,yearsPerRow:hn,monthsPerRow:vn,timezone:an}=lt,Qt=_objectWithoutPropertiesLoose$m(lt,_excluded$n),{value:_n,handleValueChange:Pn,timezone:$n}=useControlledValueWithTimezone({name:"DateCalendar",timezone:an,value:ht,defaultValue:dt,onChange:bt,valueManager:singleItemValueManager}),{view:Nn,setView:Tn,focusedView:cn,setFocusedView:mn,goToNextView:In,setValueAndGoToNextView:An}=useViews({view:Et,views:$t,openTo:Dt,onChange:Pn,onViewChange:ut,autoFocus:ct,focusedView:Wt,onFocusedViewChange:zt}),{referenceDate:wn,calendarState:fn,changeFocusedDay:pn,changeMonth:kn,handleChangeMonth:Dn,isDateDisabled:un,onMonthSwitchingAnimationEnd:Zt}=useCalendarState({value:_n,defaultCalendarMonth:yt,referenceDate:pt,reduceAnimations:kt,onMonthChange:xt,minDate:wt,maxDate:It,shouldDisableDate:St,disablePast:gt,disableFuture:mt,timezone:$n}),Xt=Pt&&_n||wt,Sn=Pt&&_n||It,Rn=`${st}-grid-label`,jn=cn!==null,On=(rt=(it=en==null?void 0:en.calendarHeader)!=null?it:Mt==null?void 0:Mt.CalendarHeader)!=null?rt:PickersCalendarHeader,Zn=useSlotProps({elementType:On,externalSlotProps:(ot=sn==null?void 0:sn.calendarHeader)!=null?ot:Ht==null?void 0:Ht.calendarHeader,additionalProps:{views:$t,view:Nn,currentMonth:fn.currentMonth,onViewChange:Tn,onMonthChange:(Tr,Ar)=>Dn({newMonth:Tr,direction:Ar}),minDate:Xt,maxDate:Sn,disabled:Pt,disablePast:gt,disableFuture:mt,reduceAnimations:kt,timezone:$n,labelId:Rn,slots:en,slotProps:sn},ownerState:lt}),Vn=useEventCallback(Tr=>{const Ar=at.startOfMonth(Tr),qr=at.endOfMonth(Tr),jr=un(Tr)?findClosestEnabledDate({utils:at,date:Tr,minDate:at.isBefore(wt,Ar)?Ar:wt,maxDate:at.isAfter(It,qr)?qr:It,disablePast:gt,disableFuture:mt,isDateDisabled:un,timezone:$n}):Tr;jr?(An(jr,"finish"),xt==null||xt(Ar)):(In(),kn(Ar)),pn(jr,!0)}),qn=useEventCallback(Tr=>{const Ar=at.startOfYear(Tr),qr=at.endOfYear(Tr),jr=un(Tr)?findClosestEnabledDate({utils:at,date:Tr,minDate:at.isBefore(wt,Ar)?Ar:wt,maxDate:at.isAfter(It,qr)?qr:It,disablePast:gt,disableFuture:mt,isDateDisabled:un,timezone:$n}):Tr;jr?(An(jr,"finish"),vt==null||vt(jr)):(In(),kn(Ar)),pn(jr,!0)}),zn=useEventCallback(Tr=>Pn(Tr&&mergeDateAndTime(at,Tr,_n??wn),"finish"));reactExports.useEffect(()=>{_n!=null&&at.isValid(_n)&&kn(_n)},[_n]);const Jn=lt,Hn=useUtilityClasses$1(Jn),pr={disablePast:gt,disableFuture:mt,maxDate:It,minDate:wt},fr={disableHighlightToday:Ot,readOnly:Ct,disabled:Pt,timezone:$n,gridLabelId:Rn},xr=reactExports.useRef(Nn);reactExports.useEffect(()=>{xr.current!==Nn&&(cn===xr.current&&mn(Nn,!0),xr.current=Nn)},[cn,mn,Nn]);const io=reactExports.useMemo(()=>[_n],[_n]);return jsxRuntimeExports.jsxs(DateCalendarRoot,_extends$u({ref:nt,className:clsx(Hn.root,jt),ownerState:Jn},Qt,{children:[jsxRuntimeExports.jsx(On,_extends$u({},Zn)),jsxRuntimeExports.jsx(DateCalendarViewTransitionContainer,{reduceAnimations:kt,className:Hn.viewTransitionContainer,transKey:Nn,ownerState:Jn,children:jsxRuntimeExports.jsxs("div",{children:[Nn==="year"&&jsxRuntimeExports.jsx(YearCalendar,_extends$u({},pr,fr,{value:_n,onChange:qn,shouldDisableYear:At,hasFocus:jn,onFocusedViewChange:Tr=>mn("year",Tr),yearsPerRow:hn,referenceDate:wn})),Nn==="month"&&jsxRuntimeExports.jsx(MonthCalendar,_extends$u({},pr,fr,{hasFocus:jn,className:jt,value:_n,onChange:Vn,shouldDisableMonth:Tt,onFocusedViewChange:Tr=>mn("month",Tr),monthsPerRow:vn,referenceDate:wn})),Nn==="day"&&jsxRuntimeExports.jsx(DayCalendar,_extends$u({},fn,pr,fr,{onMonthSwitchingAnimationEnd:Zt,onFocusedDayChange:pn,reduceAnimations:kt,selectedDays:io,onSelectedDaysChange:zn,shouldDisableDate:St,shouldDisableMonth:Tt,shouldDisableYear:At,hasFocus:jn,onFocusedViewChange:Tr=>mn("day",Tr),showDaysOutsideCurrentMonth:Ft,fixedWeekNumber:Nt,dayOfWeekFormatter:Ut,displayWeekNumber:nn,components:Mt,componentsProps:Ht,slots:en,slotProps:sn,loading:Kt,renderLoading:rn}))]})})]}))});function getDatePickerToolbarUtilityClass(tt){return generateUtilityClass("MuiDatePickerToolbar",tt)}generateUtilityClasses("MuiDatePickerToolbar",["root","title"]);const _excluded$m=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views"],useUtilityClasses=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],title:["title"]},getDatePickerToolbarUtilityClass,et)},DatePickerToolbarRoot=styled$1(PickersToolbar,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(tt,et)=>et.root})({}),DatePickerToolbarTitle=styled$1(Typography$1,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(tt,et)=>et.title})(({ownerState:tt})=>_extends$u({},tt.isLandscape&&{margin:"auto 16px auto auto"})),DatePickerToolbar=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDatePickerToolbar"}),{value:it,isLandscape:ot,toolbarFormat:at,toolbarPlaceholder:st="––",views:lt}=rt,ct=_objectWithoutPropertiesLoose$m(rt,_excluded$m),ut=useUtils(),ht=useLocaleText(),dt=useUtilityClasses(rt),pt=reactExports.useMemo(()=>{if(!it)return st;const gt=resolveDateFormat(ut,{format:at,views:lt},!0);return ut.formatByString(it,gt)},[it,at,st,ut,lt]),mt=rt;return jsxRuntimeExports.jsx(DatePickerToolbarRoot,_extends$u({ref:nt,toolbarTitle:ht.datePickerToolbarTitle,isLandscape:ot,className:dt.root},ct,{children:jsxRuntimeExports.jsx(DatePickerToolbarTitle,{variant:"h4",align:ot?"left":"center",ownerState:mt,className:dt.title,children:pt})}))});function useDatePickerDefaultizedProps(tt,et){var nt,rt,it,ot;const at=useUtils(),st=useDefaultDates(),lt=useThemeProps({props:tt,name:et}),ct=reactExports.useMemo(()=>{var ht;return((ht=lt.localeText)==null?void 0:ht.toolbarTitle)==null?lt.localeText:_extends$u({},lt.localeText,{datePickerToolbarTitle:lt.localeText.toolbarTitle})},[lt.localeText]),ut=(nt=lt.slots)!=null?nt:uncapitalizeObjectKeys(lt.components);return _extends$u({},lt,{localeText:ct},applyDefaultViewProps({views:lt.views,openTo:lt.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:(rt=lt.disableFuture)!=null?rt:!1,disablePast:(it=lt.disablePast)!=null?it:!1,minDate:applyDefaultDate(at,lt.minDate,st.minDate),maxDate:applyDefaultDate(at,lt.maxDate,st.maxDate),slots:_extends$u({toolbar:DatePickerToolbar},ut),slotProps:(ot=lt.slotProps)!=null?ot:lt.componentsProps})}const _excluded$l=["props","getOpenDialogAriaText"],_excluded2$6=["ownerState"],_excluded3$1=["ownerState"],useDesktopPicker=tt=>{var et,nt,rt,it,ot;let{props:at,getOpenDialogAriaText:st}=tt,lt=_objectWithoutPropertiesLoose$m(tt,_excluded$l);const{slots:ct,slotProps:ut,className:ht,sx:dt,format:pt,formatDensity:mt,timezone:gt,label:yt,inputRef:bt,readOnly:vt,disabled:xt,autoFocus:kt,localeText:St,reduceAnimations:Tt}=at,At=useUtils(),Et=reactExports.useRef(null),$t=reactExports.useRef(null),Dt=useId(),jt=(et=ut==null||(nt=ut.toolbar)==null?void 0:nt.hidden)!=null?et:!1,{open:Pt,actions:Ct,hasUIView:wt,layoutProps:It,renderCurrentView:Ot,shouldRestoreFocus:Wt,fieldProps:zt}=usePicker(_extends$u({},lt,{props:at,inputRef:Et,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),Ft=(rt=ct.inputAdornment)!=null?rt:MuiInputAdornment,Nt=useSlotProps({elementType:Ft,externalSlotProps:ut==null?void 0:ut.inputAdornment,additionalProps:{position:"end"},ownerState:at}),Ut=_objectWithoutPropertiesLoose$m(Nt,_excluded2$6),Mt=(it=ct.openPickerButton)!=null?it:IconButton$2,Ht=useSlotProps({elementType:Mt,externalSlotProps:ut==null?void 0:ut.openPickerButton,additionalProps:{disabled:xt||vt,onClick:Pt?Ct.onClose:Ct.onOpen,"aria-label":st(zt.value,At),edge:Ut.position},ownerState:at}),en=_objectWithoutPropertiesLoose$m(Ht,_excluded3$1),sn=ct.openPickerIcon,Kt=ct.field,rn=useSlotProps({elementType:Kt,externalSlotProps:ut==null?void 0:ut.field,additionalProps:_extends$u({},zt,jt&&{id:Dt},{readOnly:vt,disabled:xt,className:ht,sx:dt,format:pt,formatDensity:mt,timezone:gt,label:yt,autoFocus:kt&&!at.open,focused:Pt?!0:void 0}),ownerState:at});wt&&(rn.InputProps=_extends$u({},rn.InputProps,{ref:$t,[`${Ut.position}Adornment`]:jsxRuntimeExports.jsx(Ft,_extends$u({},Ut,{children:jsxRuntimeExports.jsx(Mt,_extends$u({},en,{children:jsxRuntimeExports.jsx(sn,_extends$u({},ut==null?void 0:ut.openPickerIcon))}))}))}));const nn=_extends$u({textField:ct.textField,clearIcon:ct.clearIcon,clearButton:ct.clearButton},rn.slots),hn=(ot=ct.layout)!=null?ot:PickersLayout,vn=useForkRef(Et,rn.inputRef,bt);let an=Dt;jt&&(yt?an=`${Dt}-label`:an=void 0);const Qt=_extends$u({},ut,{toolbar:_extends$u({},ut==null?void 0:ut.toolbar,{titleId:Dt}),popper:_extends$u({"aria-labelledby":an},ut==null?void 0:ut.popper)});return{renderPicker:()=>jsxRuntimeExports.jsxs(LocalizationProvider,{localeText:St,children:[jsxRuntimeExports.jsx(Kt,_extends$u({},rn,{slots:nn,slotProps:Qt,inputRef:vn})),jsxRuntimeExports.jsx(PickersPopper,_extends$u({role:"dialog",placement:"bottom-start",anchorEl:$t.current},Ct,{open:Pt,slots:ct,slotProps:Qt,shouldRestoreFocus:Wt,reduceAnimations:Tt,children:jsxRuntimeExports.jsx(hn,_extends$u({},It,Qt==null?void 0:Qt.layout,{slots:ct,slotProps:Qt,children:Ot()}))}))]})}},renderDateViewCalendar=({view:tt,onViewChange:et,views:nt,focusedView:rt,onFocusedViewChange:it,value:ot,defaultValue:at,referenceDate:st,onChange:lt,className:ct,classes:ut,disableFuture:ht,disablePast:dt,minDate:pt,maxDate:mt,shouldDisableDate:gt,shouldDisableMonth:yt,shouldDisableYear:bt,reduceAnimations:vt,onMonthChange:xt,monthsPerRow:kt,onYearChange:St,yearsPerRow:Tt,defaultCalendarMonth:At,components:Et,componentsProps:$t,slots:Dt,slotProps:jt,loading:Pt,renderLoading:Ct,disableHighlightToday:wt,readOnly:It,disabled:Ot,showDaysOutsideCurrentMonth:Wt,dayOfWeekFormatter:zt,sx:Ft,autoFocus:Nt,fixedWeekNumber:Ut,displayWeekNumber:Mt,timezone:Ht})=>jsxRuntimeExports.jsx(DateCalendar,{view:tt,onViewChange:et,views:nt.filter(isDatePickerView),focusedView:rt&&isDatePickerView(rt)?rt:null,onFocusedViewChange:it,value:ot,defaultValue:at,referenceDate:st,onChange:lt,className:ct,classes:ut,disableFuture:ht,disablePast:dt,minDate:pt,maxDate:mt,shouldDisableDate:gt,shouldDisableMonth:yt,shouldDisableYear:bt,reduceAnimations:vt,onMonthChange:xt,monthsPerRow:kt,onYearChange:St,yearsPerRow:Tt,defaultCalendarMonth:At,components:Et,componentsProps:$t,slots:Dt,slotProps:jt,loading:Pt,renderLoading:Ct,disableHighlightToday:wt,readOnly:It,disabled:Ot,showDaysOutsideCurrentMonth:Wt,dayOfWeekFormatter:zt,sx:Ft,autoFocus:Nt,fixedWeekNumber:Ut,displayWeekNumber:Mt,timezone:Ht}),DesktopDatePicker=reactExports.forwardRef(function(et,nt){var rt,it,ot,at;const st=useLocaleText(),lt=useUtils(),ct=useDatePickerDefaultizedProps(et,"MuiDesktopDatePicker"),ut=_extends$u({day:renderDateViewCalendar,month:renderDateViewCalendar,year:renderDateViewCalendar},ct.viewRenderers),ht=_extends$u({},ct,{viewRenderers:ut,format:resolveDateFormat(lt,ct,!1),yearsPerRow:(rt=ct.yearsPerRow)!=null?rt:4,slots:_extends$u({openPickerIcon:CalendarIcon,field:DateField},ct.slots),slotProps:_extends$u({},ct.slotProps,{field:pt=>{var mt;return _extends$u({},resolveComponentProps((mt=ct.slotProps)==null?void 0:mt.field,pt),extractValidationProps(ct),{ref:nt})},toolbar:_extends$u({hidden:!0},(it=ct.slotProps)==null?void 0:it.toolbar)})}),{renderPicker:dt}=useDesktopPicker({props:ht,valueManager:singleItemValueManager,valueType:"date",getOpenDialogAriaText:(ot=(at=ht.localeText)==null?void 0:at.openDatePickerDialogue)!=null?ot:st.openDatePickerDialogue,validator:validateDate});return dt()});DesktopDatePicker.propTypes={autoFocus:PropTypes.bool,className:PropTypes.string,closeOnSelect:PropTypes.bool,components:PropTypes.object,componentsProps:PropTypes.object,dayOfWeekFormatter:PropTypes.func,defaultCalendarMonth:PropTypes.any,defaultValue:PropTypes.any,disabled:PropTypes.bool,disableFuture:PropTypes.bool,disableHighlightToday:PropTypes.bool,disableOpenPicker:PropTypes.bool,disablePast:PropTypes.bool,displayWeekNumber:PropTypes.bool,fixedWeekNumber:PropTypes.number,format:PropTypes.string,formatDensity:PropTypes.oneOf(["dense","spacious"]),inputRef:refType$1,label:PropTypes.node,loading:PropTypes.bool,localeText:PropTypes.object,maxDate:PropTypes.any,minDate:PropTypes.any,monthsPerRow:PropTypes.oneOf([3,4]),onAccept:PropTypes.func,onChange:PropTypes.func,onClose:PropTypes.func,onError:PropTypes.func,onMonthChange:PropTypes.func,onOpen:PropTypes.func,onSelectedSectionsChange:PropTypes.func,onViewChange:PropTypes.func,onYearChange:PropTypes.func,open:PropTypes.bool,openTo:PropTypes.oneOf(["day","month","year"]),orientation:PropTypes.oneOf(["landscape","portrait"]),readOnly:PropTypes.bool,reduceAnimations:PropTypes.bool,referenceDate:PropTypes.any,renderLoading:PropTypes.func,selectedSections:PropTypes.oneOfType([PropTypes.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),PropTypes.number,PropTypes.shape({endIndex:PropTypes.number.isRequired,startIndex:PropTypes.number.isRequired})]),shouldDisableDate:PropTypes.func,shouldDisableMonth:PropTypes.func,shouldDisableYear:PropTypes.func,showDaysOutsideCurrentMonth:PropTypes.bool,slotProps:PropTypes.object,slots:PropTypes.object,sx:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func,PropTypes.object,PropTypes.bool])),PropTypes.func,PropTypes.object]),timezone:PropTypes.string,value:PropTypes.any,view:PropTypes.oneOf(["day","month","year"]),viewRenderers:PropTypes.shape({day:PropTypes.func,month:PropTypes.func,year:PropTypes.func}),views:PropTypes.arrayOf(PropTypes.oneOf(["day","month","year"]).isRequired),yearsPerRow:PropTypes.oneOf([3,4])};const _excluded$k=["props","getOpenDialogAriaText"],useMobilePicker=tt=>{var et,nt,rt;let{props:it,getOpenDialogAriaText:ot}=tt,at=_objectWithoutPropertiesLoose$m(tt,_excluded$k);const{slots:st,slotProps:lt,className:ct,sx:ut,format:ht,formatDensity:dt,timezone:pt,label:mt,inputRef:gt,readOnly:yt,disabled:bt,localeText:vt}=it,xt=useUtils(),kt=reactExports.useRef(null),St=useId(),Tt=(et=lt==null||(nt=lt.toolbar)==null?void 0:nt.hidden)!=null?et:!1,{open:At,actions:Et,layoutProps:$t,renderCurrentView:Dt,fieldProps:jt}=usePicker(_extends$u({},at,{props:it,inputRef:kt,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),Pt=st.field,Ct=useSlotProps({elementType:Pt,externalSlotProps:lt==null?void 0:lt.field,additionalProps:_extends$u({},jt,Tt&&{id:St},!(bt||yt)&&{onClick:Et.onOpen,onKeyDown:onSpaceOrEnter(Et.onOpen)},{readOnly:yt??!0,disabled:bt,className:ct,sx:ut,format:ht,formatDensity:dt,timezone:pt,label:mt}),ownerState:it});Ct.inputProps=_extends$u({},Ct.inputProps,{"aria-label":ot(jt.value,xt)});const wt=_extends$u({textField:st.textField},Ct.slots),It=(rt=st.layout)!=null?rt:PickersLayout,Ot=useForkRef(kt,Ct.inputRef,gt);let Wt=St;Tt&&(mt?Wt=`${St}-label`:Wt=void 0);const zt=_extends$u({},lt,{toolbar:_extends$u({},lt==null?void 0:lt.toolbar,{titleId:St}),mobilePaper:_extends$u({"aria-labelledby":Wt},lt==null?void 0:lt.mobilePaper)});return{renderPicker:()=>jsxRuntimeExports.jsxs(LocalizationProvider,{localeText:vt,children:[jsxRuntimeExports.jsx(Pt,_extends$u({},Ct,{slots:wt,slotProps:zt,inputRef:Ot})),jsxRuntimeExports.jsx(PickersModalDialog,_extends$u({},Et,{open:At,slots:st,slotProps:zt,children:jsxRuntimeExports.jsx(It,_extends$u({},$t,zt==null?void 0:zt.layout,{slots:st,slotProps:zt,children:Dt()}))}))]})}},MobileDatePicker=reactExports.forwardRef(function(et,nt){var rt,it,ot;const at=useLocaleText(),st=useUtils(),lt=useDatePickerDefaultizedProps(et,"MuiMobileDatePicker"),ct=_extends$u({day:renderDateViewCalendar,month:renderDateViewCalendar,year:renderDateViewCalendar},lt.viewRenderers),ut=_extends$u({},lt,{viewRenderers:ct,format:resolveDateFormat(st,lt,!1),slots:_extends$u({field:DateField},lt.slots),slotProps:_extends$u({},lt.slotProps,{field:dt=>{var pt;return _extends$u({},resolveComponentProps((pt=lt.slotProps)==null?void 0:pt.field,dt),extractValidationProps(lt),{ref:nt})},toolbar:_extends$u({hidden:!1},(rt=lt.slotProps)==null?void 0:rt.toolbar)})}),{renderPicker:ht}=useMobilePicker({props:ut,valueManager:singleItemValueManager,valueType:"date",getOpenDialogAriaText:(it=(ot=ut.localeText)==null?void 0:ot.openDatePickerDialogue)!=null?it:at.openDatePickerDialogue,validator:validateDate});return ht()});MobileDatePicker.propTypes={autoFocus:PropTypes.bool,className:PropTypes.string,closeOnSelect:PropTypes.bool,components:PropTypes.object,componentsProps:PropTypes.object,dayOfWeekFormatter:PropTypes.func,defaultCalendarMonth:PropTypes.any,defaultValue:PropTypes.any,disabled:PropTypes.bool,disableFuture:PropTypes.bool,disableHighlightToday:PropTypes.bool,disableOpenPicker:PropTypes.bool,disablePast:PropTypes.bool,displayWeekNumber:PropTypes.bool,fixedWeekNumber:PropTypes.number,format:PropTypes.string,formatDensity:PropTypes.oneOf(["dense","spacious"]),inputRef:refType$1,label:PropTypes.node,loading:PropTypes.bool,localeText:PropTypes.object,maxDate:PropTypes.any,minDate:PropTypes.any,monthsPerRow:PropTypes.oneOf([3,4]),onAccept:PropTypes.func,onChange:PropTypes.func,onClose:PropTypes.func,onError:PropTypes.func,onMonthChange:PropTypes.func,onOpen:PropTypes.func,onSelectedSectionsChange:PropTypes.func,onViewChange:PropTypes.func,onYearChange:PropTypes.func,open:PropTypes.bool,openTo:PropTypes.oneOf(["day","month","year"]),orientation:PropTypes.oneOf(["landscape","portrait"]),readOnly:PropTypes.bool,reduceAnimations:PropTypes.bool,referenceDate:PropTypes.any,renderLoading:PropTypes.func,selectedSections:PropTypes.oneOfType([PropTypes.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),PropTypes.number,PropTypes.shape({endIndex:PropTypes.number.isRequired,startIndex:PropTypes.number.isRequired})]),shouldDisableDate:PropTypes.func,shouldDisableMonth:PropTypes.func,shouldDisableYear:PropTypes.func,showDaysOutsideCurrentMonth:PropTypes.bool,slotProps:PropTypes.object,slots:PropTypes.object,sx:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func,PropTypes.object,PropTypes.bool])),PropTypes.func,PropTypes.object]),timezone:PropTypes.string,value:PropTypes.any,view:PropTypes.oneOf(["day","month","year"]),viewRenderers:PropTypes.shape({day:PropTypes.func,month:PropTypes.func,year:PropTypes.func}),views:PropTypes.arrayOf(PropTypes.oneOf(["day","month","year"]).isRequired),yearsPerRow:PropTypes.oneOf([3,4])};const _excluded$j=["desktopModeMediaQuery"],DatePicker=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDatePicker"}),{desktopModeMediaQuery:it=DEFAULT_DESKTOP_MODE_MEDIA_QUERY}=rt,ot=_objectWithoutPropertiesLoose$m(rt,_excluded$j);return useMediaQuery(it,{defaultMatches:!0})?jsxRuntimeExports.jsx(DesktopDatePicker,_extends$u({ref:nt},ot)):jsxRuntimeExports.jsx(MobileDatePicker,_extends$u({ref:nt},ot))});//! moment.js -//! version : 2.29.4 -//! authors : Tim Wood, Iskren Chernev, Moment.js contributors -//! license : MIT -//! momentjs.com -var hookCallback;function hooks(){return hookCallback.apply(null,arguments)}function setHookCallback(tt){hookCallback=tt}function isArray$d(tt){return tt instanceof Array||Object.prototype.toString.call(tt)==="[object Array]"}function isObject$6(tt){return tt!=null&&Object.prototype.toString.call(tt)==="[object Object]"}function hasOwnProp(tt,et){return Object.prototype.hasOwnProperty.call(tt,et)}function isObjectEmpty(tt){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(tt).length===0;var et;for(et in tt)if(hasOwnProp(tt,et))return!1;return!0}function isUndefined(tt){return tt===void 0}function isNumber$3(tt){return typeof tt=="number"||Object.prototype.toString.call(tt)==="[object Number]"}function isDate(tt){return tt instanceof Date||Object.prototype.toString.call(tt)==="[object Date]"}function map$5(tt,et){var nt=[],rt,it=tt.length;for(rt=0;rt>>0,rt;for(rt=0;rt0)for(nt=0;nt=0;return(ot?nt?"+":"":"-")+Math.pow(10,Math.max(0,it)).toString().substr(1)+rt}var formattingTokens=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,localFormattingTokens=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,formatFunctions={},formatTokenFunctions={};function addFormatToken(tt,et,nt,rt){var it=rt;typeof rt=="string"&&(it=function(){return this[rt]()}),tt&&(formatTokenFunctions[tt]=it),et&&(formatTokenFunctions[et[0]]=function(){return zeroFill(it.apply(this,arguments),et[1],et[2])}),nt&&(formatTokenFunctions[nt]=function(){return this.localeData().ordinal(it.apply(this,arguments),tt)})}function removeFormattingTokens(tt){return tt.match(/\[[\s\S]/)?tt.replace(/^\[|\]$/g,""):tt.replace(/\\/g,"")}function makeFormatFunction(tt){var et=tt.match(formattingTokens),nt,rt;for(nt=0,rt=et.length;nt=0&&localFormattingTokens.test(tt);)tt=tt.replace(localFormattingTokens,rt),localFormattingTokens.lastIndex=0,nt-=1;return tt}var defaultLongDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function longDateFormat(tt){var et=this._longDateFormat[tt],nt=this._longDateFormat[tt.toUpperCase()];return et||!nt?et:(this._longDateFormat[tt]=nt.match(formattingTokens).map(function(rt){return rt==="MMMM"||rt==="MM"||rt==="DD"||rt==="dddd"?rt.slice(1):rt}).join(""),this._longDateFormat[tt])}var defaultInvalidDate="Invalid date";function invalidDate(){return this._invalidDate}var defaultOrdinal="%d",defaultDayOfMonthOrdinalParse=/\d{1,2}/;function ordinal$1(tt){return this._ordinal.replace("%d",tt)}var defaultRelativeTime={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function relativeTime(tt,et,nt,rt){var it=this._relativeTime[nt];return isFunction$1(it)?it(tt,et,nt,rt):it.replace(/%d/i,tt)}function pastFuture(tt,et){var nt=this._relativeTime[tt>0?"future":"past"];return isFunction$1(nt)?nt(et):nt.replace(/%s/i,et)}var aliases={};function addUnitAlias(tt,et){var nt=tt.toLowerCase();aliases[nt]=aliases[nt+"s"]=aliases[et]=tt}function normalizeUnits(tt){return typeof tt=="string"?aliases[tt]||aliases[tt.toLowerCase()]:void 0}function normalizeObjectUnits(tt){var et={},nt,rt;for(rt in tt)hasOwnProp(tt,rt)&&(nt=normalizeUnits(rt),nt&&(et[nt]=tt[rt]));return et}var priorities={};function addUnitPriority(tt,et){priorities[tt]=et}function getPrioritizedUnits(tt){var et=[],nt;for(nt in tt)hasOwnProp(tt,nt)&&et.push({unit:nt,priority:priorities[nt]});return et.sort(function(rt,it){return rt.priority-it.priority}),et}function isLeapYear(tt){return tt%4===0&&tt%100!==0||tt%400===0}function absFloor(tt){return tt<0?Math.ceil(tt)||0:Math.floor(tt)}function toInt(tt){var et=+tt,nt=0;return et!==0&&isFinite(et)&&(nt=absFloor(et)),nt}function makeGetSet(tt,et){return function(nt){return nt!=null?(set$1$1(this,tt,nt),hooks.updateOffset(this,et),this):get$3(this,tt)}}function get$3(tt,et){return tt.isValid()?tt._d["get"+(tt._isUTC?"UTC":"")+et]():NaN}function set$1$1(tt,et,nt){tt.isValid()&&!isNaN(nt)&&(et==="FullYear"&&isLeapYear(tt.year())&&tt.month()===1&&tt.date()===29?(nt=toInt(nt),tt._d["set"+(tt._isUTC?"UTC":"")+et](nt,tt.month(),daysInMonth(nt,tt.month()))):tt._d["set"+(tt._isUTC?"UTC":"")+et](nt))}function stringGet(tt){return tt=normalizeUnits(tt),isFunction$1(this[tt])?this[tt]():this}function stringSet(tt,et){if(typeof tt=="object"){tt=normalizeObjectUnits(tt);var nt=getPrioritizedUnits(tt),rt,it=nt.length;for(rt=0;rt68?1900:2e3)};var getSetYear=makeGetSet("FullYear",!0);function getIsLeapYear(){return isLeapYear(this.year())}function createDate(tt,et,nt,rt,it,ot,at){var st;return tt<100&&tt>=0?(st=new Date(tt+400,et,nt,rt,it,ot,at),isFinite(st.getFullYear())&&st.setFullYear(tt)):st=new Date(tt,et,nt,rt,it,ot,at),st}function createUTCDate(tt){var et,nt;return tt<100&&tt>=0?(nt=Array.prototype.slice.call(arguments),nt[0]=tt+400,et=new Date(Date.UTC.apply(null,nt)),isFinite(et.getUTCFullYear())&&et.setUTCFullYear(tt)):et=new Date(Date.UTC.apply(null,arguments)),et}function firstWeekOffset(tt,et,nt){var rt=7+et-nt,it=(7+createUTCDate(tt,0,rt).getUTCDay()-et)%7;return-it+rt-1}function dayOfYearFromWeeks(tt,et,nt,rt,it){var ot=(7+nt-rt)%7,at=firstWeekOffset(tt,rt,it),st=1+7*(et-1)+ot+at,lt,ct;return st<=0?(lt=tt-1,ct=daysInYear(lt)+st):st>daysInYear(tt)?(lt=tt+1,ct=st-daysInYear(tt)):(lt=tt,ct=st),{year:lt,dayOfYear:ct}}function weekOfYear(tt,et,nt){var rt=firstWeekOffset(tt.year(),et,nt),it=Math.floor((tt.dayOfYear()-rt-1)/7)+1,ot,at;return it<1?(at=tt.year()-1,ot=it+weeksInYear(at,et,nt)):it>weeksInYear(tt.year(),et,nt)?(ot=it-weeksInYear(tt.year(),et,nt),at=tt.year()+1):(at=tt.year(),ot=it),{week:ot,year:at}}function weeksInYear(tt,et,nt){var rt=firstWeekOffset(tt,et,nt),it=firstWeekOffset(tt+1,et,nt);return(daysInYear(tt)-rt+it)/7}addFormatToken("w",["ww",2],"wo","week");addFormatToken("W",["WW",2],"Wo","isoWeek");addUnitAlias("week","w");addUnitAlias("isoWeek","W");addUnitPriority("week",5);addUnitPriority("isoWeek",5);addRegexToken("w",match1to2);addRegexToken("ww",match1to2,match2);addRegexToken("W",match1to2);addRegexToken("WW",match1to2,match2);addWeekParseToken(["w","ww","W","WW"],function(tt,et,nt,rt){et[rt.substr(0,1)]=toInt(tt)});function localeWeek(tt){return weekOfYear(tt,this._week.dow,this._week.doy).week}var defaultLocaleWeek={dow:0,doy:6};function localeFirstDayOfWeek(){return this._week.dow}function localeFirstDayOfYear(){return this._week.doy}function getSetWeek(tt){var et=this.localeData().week(this);return tt==null?et:this.add((tt-et)*7,"d")}function getSetISOWeek(tt){var et=weekOfYear(this,1,4).week;return tt==null?et:this.add((tt-et)*7,"d")}addFormatToken("d",0,"do","day");addFormatToken("dd",0,0,function(tt){return this.localeData().weekdaysMin(this,tt)});addFormatToken("ddd",0,0,function(tt){return this.localeData().weekdaysShort(this,tt)});addFormatToken("dddd",0,0,function(tt){return this.localeData().weekdays(this,tt)});addFormatToken("e",0,0,"weekday");addFormatToken("E",0,0,"isoWeekday");addUnitAlias("day","d");addUnitAlias("weekday","e");addUnitAlias("isoWeekday","E");addUnitPriority("day",11);addUnitPriority("weekday",11);addUnitPriority("isoWeekday",11);addRegexToken("d",match1to2);addRegexToken("e",match1to2);addRegexToken("E",match1to2);addRegexToken("dd",function(tt,et){return et.weekdaysMinRegex(tt)});addRegexToken("ddd",function(tt,et){return et.weekdaysShortRegex(tt)});addRegexToken("dddd",function(tt,et){return et.weekdaysRegex(tt)});addWeekParseToken(["dd","ddd","dddd"],function(tt,et,nt,rt){var it=nt._locale.weekdaysParse(tt,rt,nt._strict);it!=null?et.d=it:getParsingFlags(nt).invalidWeekday=tt});addWeekParseToken(["d","e","E"],function(tt,et,nt,rt){et[rt]=toInt(tt)});function parseWeekday(tt,et){return typeof tt!="string"?tt:isNaN(tt)?(tt=et.weekdaysParse(tt),typeof tt=="number"?tt:null):parseInt(tt,10)}function parseIsoWeekday(tt,et){return typeof tt=="string"?et.weekdaysParse(tt)%7||7:isNaN(tt)?null:tt}function shiftWeekdays(tt,et){return tt.slice(et,7).concat(tt.slice(0,et))}var defaultLocaleWeekdays="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),defaultLocaleWeekdaysShort="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),defaultLocaleWeekdaysMin="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),defaultWeekdaysRegex=matchWord,defaultWeekdaysShortRegex=matchWord,defaultWeekdaysMinRegex=matchWord;function localeWeekdays(tt,et){var nt=isArray$d(this._weekdays)?this._weekdays:this._weekdays[tt&&tt!==!0&&this._weekdays.isFormat.test(et)?"format":"standalone"];return tt===!0?shiftWeekdays(nt,this._week.dow):tt?nt[tt.day()]:nt}function localeWeekdaysShort(tt){return tt===!0?shiftWeekdays(this._weekdaysShort,this._week.dow):tt?this._weekdaysShort[tt.day()]:this._weekdaysShort}function localeWeekdaysMin(tt){return tt===!0?shiftWeekdays(this._weekdaysMin,this._week.dow):tt?this._weekdaysMin[tt.day()]:this._weekdaysMin}function handleStrictParse$1(tt,et,nt){var rt,it,ot,at=tt.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],rt=0;rt<7;++rt)ot=createUTC([2e3,1]).day(rt),this._minWeekdaysParse[rt]=this.weekdaysMin(ot,"").toLocaleLowerCase(),this._shortWeekdaysParse[rt]=this.weekdaysShort(ot,"").toLocaleLowerCase(),this._weekdaysParse[rt]=this.weekdays(ot,"").toLocaleLowerCase();return nt?et==="dddd"?(it=indexOf.call(this._weekdaysParse,at),it!==-1?it:null):et==="ddd"?(it=indexOf.call(this._shortWeekdaysParse,at),it!==-1?it:null):(it=indexOf.call(this._minWeekdaysParse,at),it!==-1?it:null):et==="dddd"?(it=indexOf.call(this._weekdaysParse,at),it!==-1||(it=indexOf.call(this._shortWeekdaysParse,at),it!==-1)?it:(it=indexOf.call(this._minWeekdaysParse,at),it!==-1?it:null)):et==="ddd"?(it=indexOf.call(this._shortWeekdaysParse,at),it!==-1||(it=indexOf.call(this._weekdaysParse,at),it!==-1)?it:(it=indexOf.call(this._minWeekdaysParse,at),it!==-1?it:null)):(it=indexOf.call(this._minWeekdaysParse,at),it!==-1||(it=indexOf.call(this._weekdaysParse,at),it!==-1)?it:(it=indexOf.call(this._shortWeekdaysParse,at),it!==-1?it:null))}function localeWeekdaysParse(tt,et,nt){var rt,it,ot;if(this._weekdaysParseExact)return handleStrictParse$1.call(this,tt,et,nt);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),rt=0;rt<7;rt++){if(it=createUTC([2e3,1]).day(rt),nt&&!this._fullWeekdaysParse[rt]&&(this._fullWeekdaysParse[rt]=new RegExp("^"+this.weekdays(it,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[rt]=new RegExp("^"+this.weekdaysShort(it,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[rt]=new RegExp("^"+this.weekdaysMin(it,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[rt]||(ot="^"+this.weekdays(it,"")+"|^"+this.weekdaysShort(it,"")+"|^"+this.weekdaysMin(it,""),this._weekdaysParse[rt]=new RegExp(ot.replace(".",""),"i")),nt&&et==="dddd"&&this._fullWeekdaysParse[rt].test(tt))return rt;if(nt&&et==="ddd"&&this._shortWeekdaysParse[rt].test(tt))return rt;if(nt&&et==="dd"&&this._minWeekdaysParse[rt].test(tt))return rt;if(!nt&&this._weekdaysParse[rt].test(tt))return rt}}function getSetDayOfWeek(tt){if(!this.isValid())return tt!=null?this:NaN;var et=this._isUTC?this._d.getUTCDay():this._d.getDay();return tt!=null?(tt=parseWeekday(tt,this.localeData()),this.add(tt-et,"d")):et}function getSetLocaleDayOfWeek(tt){if(!this.isValid())return tt!=null?this:NaN;var et=(this.day()+7-this.localeData()._week.dow)%7;return tt==null?et:this.add(tt-et,"d")}function getSetISODayOfWeek(tt){if(!this.isValid())return tt!=null?this:NaN;if(tt!=null){var et=parseIsoWeekday(tt,this.localeData());return this.day(this.day()%7?et:et-7)}else return this.day()||7}function weekdaysRegex(tt){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),tt?this._weekdaysStrictRegex:this._weekdaysRegex):(hasOwnProp(this,"_weekdaysRegex")||(this._weekdaysRegex=defaultWeekdaysRegex),this._weekdaysStrictRegex&&tt?this._weekdaysStrictRegex:this._weekdaysRegex)}function weekdaysShortRegex(tt){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),tt?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(hasOwnProp(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=defaultWeekdaysShortRegex),this._weekdaysShortStrictRegex&&tt?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function weekdaysMinRegex(tt){return this._weekdaysParseExact?(hasOwnProp(this,"_weekdaysRegex")||computeWeekdaysParse.call(this),tt?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(hasOwnProp(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=defaultWeekdaysMinRegex),this._weekdaysMinStrictRegex&&tt?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function computeWeekdaysParse(){function tt(ut,ht){return ht.length-ut.length}var et=[],nt=[],rt=[],it=[],ot,at,st,lt,ct;for(ot=0;ot<7;ot++)at=createUTC([2e3,1]).day(ot),st=regexEscape(this.weekdaysMin(at,"")),lt=regexEscape(this.weekdaysShort(at,"")),ct=regexEscape(this.weekdays(at,"")),et.push(st),nt.push(lt),rt.push(ct),it.push(st),it.push(lt),it.push(ct);et.sort(tt),nt.sort(tt),rt.sort(tt),it.sort(tt),this._weekdaysRegex=new RegExp("^("+it.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+rt.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+nt.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+et.join("|")+")","i")}function hFormat(){return this.hours()%12||12}function kFormat(){return this.hours()||24}addFormatToken("H",["HH",2],0,"hour");addFormatToken("h",["hh",2],0,hFormat);addFormatToken("k",["kk",2],0,kFormat);addFormatToken("hmm",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)});addFormatToken("hmmss",0,0,function(){return""+hFormat.apply(this)+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});addFormatToken("Hmm",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)});addFormatToken("Hmmss",0,0,function(){return""+this.hours()+zeroFill(this.minutes(),2)+zeroFill(this.seconds(),2)});function meridiem(tt,et){addFormatToken(tt,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),et)})}meridiem("a",!0);meridiem("A",!1);addUnitAlias("hour","h");addUnitPriority("hour",13);function matchMeridiem(tt,et){return et._meridiemParse}addRegexToken("a",matchMeridiem);addRegexToken("A",matchMeridiem);addRegexToken("H",match1to2);addRegexToken("h",match1to2);addRegexToken("k",match1to2);addRegexToken("HH",match1to2,match2);addRegexToken("hh",match1to2,match2);addRegexToken("kk",match1to2,match2);addRegexToken("hmm",match3to4);addRegexToken("hmmss",match5to6);addRegexToken("Hmm",match3to4);addRegexToken("Hmmss",match5to6);addParseToken(["H","HH"],HOUR);addParseToken(["k","kk"],function(tt,et,nt){var rt=toInt(tt);et[HOUR]=rt===24?0:rt});addParseToken(["a","A"],function(tt,et,nt){nt._isPm=nt._locale.isPM(tt),nt._meridiem=tt});addParseToken(["h","hh"],function(tt,et,nt){et[HOUR]=toInt(tt),getParsingFlags(nt).bigHour=!0});addParseToken("hmm",function(tt,et,nt){var rt=tt.length-2;et[HOUR]=toInt(tt.substr(0,rt)),et[MINUTE]=toInt(tt.substr(rt)),getParsingFlags(nt).bigHour=!0});addParseToken("hmmss",function(tt,et,nt){var rt=tt.length-4,it=tt.length-2;et[HOUR]=toInt(tt.substr(0,rt)),et[MINUTE]=toInt(tt.substr(rt,2)),et[SECOND]=toInt(tt.substr(it)),getParsingFlags(nt).bigHour=!0});addParseToken("Hmm",function(tt,et,nt){var rt=tt.length-2;et[HOUR]=toInt(tt.substr(0,rt)),et[MINUTE]=toInt(tt.substr(rt))});addParseToken("Hmmss",function(tt,et,nt){var rt=tt.length-4,it=tt.length-2;et[HOUR]=toInt(tt.substr(0,rt)),et[MINUTE]=toInt(tt.substr(rt,2)),et[SECOND]=toInt(tt.substr(it))});function localeIsPM(tt){return(tt+"").toLowerCase().charAt(0)==="p"}var defaultLocaleMeridiemParse=/[ap]\.?m?\.?/i,getSetHour=makeGetSet("Hours",!0);function localeMeridiem(tt,et,nt){return tt>11?nt?"pm":"PM":nt?"am":"AM"}var baseConfig={calendar:defaultCalendar,longDateFormat:defaultLongDateFormat,invalidDate:defaultInvalidDate,ordinal:defaultOrdinal,dayOfMonthOrdinalParse:defaultDayOfMonthOrdinalParse,relativeTime:defaultRelativeTime,months:defaultLocaleMonths,monthsShort:defaultLocaleMonthsShort,week:defaultLocaleWeek,weekdays:defaultLocaleWeekdays,weekdaysMin:defaultLocaleWeekdaysMin,weekdaysShort:defaultLocaleWeekdaysShort,meridiemParse:defaultLocaleMeridiemParse},locales={},localeFamilies={},globalLocale;function commonPrefix(tt,et){var nt,rt=Math.min(tt.length,et.length);for(nt=0;nt0;){if(it=loadLocale(ot.slice(0,nt).join("-")),it)return it;if(rt&&rt.length>=nt&&commonPrefix(ot,rt)>=nt-1)break;nt--}et++}return globalLocale}function isLocaleNameSane(tt){return tt.match("^[^/\\\\]*$")!=null}function loadLocale(tt){var et=null,nt;if(locales[tt]===void 0&&typeof module<"u"&&module&&module.exports&&isLocaleNameSane(tt))try{et=globalLocale._abbr,nt=require,nt("./locale/"+tt),getSetGlobalLocale(et)}catch{locales[tt]=null}return locales[tt]}function getSetGlobalLocale(tt,et){var nt;return tt&&(isUndefined(et)?nt=getLocale(tt):nt=defineLocale(tt,et),nt?globalLocale=nt:typeof console<"u"&&console.warn&&console.warn("Locale "+tt+" not found. Did you forget to load it?")),globalLocale._abbr}function defineLocale(tt,et){if(et!==null){var nt,rt=baseConfig;if(et.abbr=tt,locales[tt]!=null)deprecateSimple("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),rt=locales[tt]._config;else if(et.parentLocale!=null)if(locales[et.parentLocale]!=null)rt=locales[et.parentLocale]._config;else if(nt=loadLocale(et.parentLocale),nt!=null)rt=nt._config;else return localeFamilies[et.parentLocale]||(localeFamilies[et.parentLocale]=[]),localeFamilies[et.parentLocale].push({name:tt,config:et}),null;return locales[tt]=new Locale(mergeConfigs(rt,et)),localeFamilies[tt]&&localeFamilies[tt].forEach(function(it){defineLocale(it.name,it.config)}),getSetGlobalLocale(tt),locales[tt]}else return delete locales[tt],null}function updateLocale(tt,et){if(et!=null){var nt,rt,it=baseConfig;locales[tt]!=null&&locales[tt].parentLocale!=null?locales[tt].set(mergeConfigs(locales[tt]._config,et)):(rt=loadLocale(tt),rt!=null&&(it=rt._config),et=mergeConfigs(it,et),rt==null&&(et.abbr=tt),nt=new Locale(et),nt.parentLocale=locales[tt],locales[tt]=nt),getSetGlobalLocale(tt)}else locales[tt]!=null&&(locales[tt].parentLocale!=null?(locales[tt]=locales[tt].parentLocale,tt===getSetGlobalLocale()&&getSetGlobalLocale(tt)):locales[tt]!=null&&delete locales[tt]);return locales[tt]}function getLocale(tt){var et;if(tt&&tt._locale&&tt._locale._abbr&&(tt=tt._locale._abbr),!tt)return globalLocale;if(!isArray$d(tt)){if(et=loadLocale(tt),et)return et;tt=[tt]}return chooseLocale(tt)}function listLocales(){return keys$4(locales)}function checkOverflow(tt){var et,nt=tt._a;return nt&&getParsingFlags(tt).overflow===-2&&(et=nt[MONTH]<0||nt[MONTH]>11?MONTH:nt[DATE]<1||nt[DATE]>daysInMonth(nt[YEAR],nt[MONTH])?DATE:nt[HOUR]<0||nt[HOUR]>24||nt[HOUR]===24&&(nt[MINUTE]!==0||nt[SECOND]!==0||nt[MILLISECOND]!==0)?HOUR:nt[MINUTE]<0||nt[MINUTE]>59?MINUTE:nt[SECOND]<0||nt[SECOND]>59?SECOND:nt[MILLISECOND]<0||nt[MILLISECOND]>999?MILLISECOND:-1,getParsingFlags(tt)._overflowDayOfYear&&(etDATE)&&(et=DATE),getParsingFlags(tt)._overflowWeeks&&et===-1&&(et=WEEK),getParsingFlags(tt)._overflowWeekday&&et===-1&&(et=WEEKDAY),getParsingFlags(tt).overflow=et),tt}var extendedIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,basicIsoRegex=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,tzRegex=/Z|[+-]\d\d(?::?\d\d)?/,isoDates=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],isoTimes=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],aspNetJsonRegex=/^\/?Date\((-?\d+)/i,rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,obsOffsets={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function configFromISO(tt){var et,nt,rt=tt._i,it=extendedIsoRegex.exec(rt)||basicIsoRegex.exec(rt),ot,at,st,lt,ct=isoDates.length,ut=isoTimes.length;if(it){for(getParsingFlags(tt).iso=!0,et=0,nt=ct;etdaysInYear(at)||tt._dayOfYear===0)&&(getParsingFlags(tt)._overflowDayOfYear=!0),nt=createUTCDate(at,0,tt._dayOfYear),tt._a[MONTH]=nt.getUTCMonth(),tt._a[DATE]=nt.getUTCDate()),et=0;et<3&&tt._a[et]==null;++et)tt._a[et]=rt[et]=it[et];for(;et<7;et++)tt._a[et]=rt[et]=tt._a[et]==null?et===2?1:0:tt._a[et];tt._a[HOUR]===24&&tt._a[MINUTE]===0&&tt._a[SECOND]===0&&tt._a[MILLISECOND]===0&&(tt._nextDay=!0,tt._a[HOUR]=0),tt._d=(tt._useUTC?createUTCDate:createDate).apply(null,rt),ot=tt._useUTC?tt._d.getUTCDay():tt._d.getDay(),tt._tzm!=null&&tt._d.setUTCMinutes(tt._d.getUTCMinutes()-tt._tzm),tt._nextDay&&(tt._a[HOUR]=24),tt._w&&typeof tt._w.d<"u"&&tt._w.d!==ot&&(getParsingFlags(tt).weekdayMismatch=!0)}}function dayOfYearFromWeekInfo(tt){var et,nt,rt,it,ot,at,st,lt,ct;et=tt._w,et.GG!=null||et.W!=null||et.E!=null?(ot=1,at=4,nt=defaults$1(et.GG,tt._a[YEAR],weekOfYear(createLocal(),1,4).year),rt=defaults$1(et.W,1),it=defaults$1(et.E,1),(it<1||it>7)&&(lt=!0)):(ot=tt._locale._week.dow,at=tt._locale._week.doy,ct=weekOfYear(createLocal(),ot,at),nt=defaults$1(et.gg,tt._a[YEAR],ct.year),rt=defaults$1(et.w,ct.week),et.d!=null?(it=et.d,(it<0||it>6)&&(lt=!0)):et.e!=null?(it=et.e+ot,(et.e<0||et.e>6)&&(lt=!0)):it=ot),rt<1||rt>weeksInYear(nt,ot,at)?getParsingFlags(tt)._overflowWeeks=!0:lt!=null?getParsingFlags(tt)._overflowWeekday=!0:(st=dayOfYearFromWeeks(nt,rt,it,ot,at),tt._a[YEAR]=st.year,tt._dayOfYear=st.dayOfYear)}hooks.ISO_8601=function(){};hooks.RFC_2822=function(){};function configFromStringAndFormat(tt){if(tt._f===hooks.ISO_8601){configFromISO(tt);return}if(tt._f===hooks.RFC_2822){configFromRFC2822(tt);return}tt._a=[],getParsingFlags(tt).empty=!0;var et=""+tt._i,nt,rt,it,ot,at,st=et.length,lt=0,ct,ut;for(it=expandFormat(tt._f,tt._locale).match(formattingTokens)||[],ut=it.length,nt=0;nt0&&getParsingFlags(tt).unusedInput.push(at),et=et.slice(et.indexOf(rt)+rt.length),lt+=rt.length),formatTokenFunctions[ot]?(rt?getParsingFlags(tt).empty=!1:getParsingFlags(tt).unusedTokens.push(ot),addTimeToArrayFromToken(ot,rt,tt)):tt._strict&&!rt&&getParsingFlags(tt).unusedTokens.push(ot);getParsingFlags(tt).charsLeftOver=st-lt,et.length>0&&getParsingFlags(tt).unusedInput.push(et),tt._a[HOUR]<=12&&getParsingFlags(tt).bigHour===!0&&tt._a[HOUR]>0&&(getParsingFlags(tt).bigHour=void 0),getParsingFlags(tt).parsedDateParts=tt._a.slice(0),getParsingFlags(tt).meridiem=tt._meridiem,tt._a[HOUR]=meridiemFixWrap(tt._locale,tt._a[HOUR],tt._meridiem),ct=getParsingFlags(tt).era,ct!==null&&(tt._a[YEAR]=tt._locale.erasConvertYear(ct,tt._a[YEAR])),configFromArray(tt),checkOverflow(tt)}function meridiemFixWrap(tt,et,nt){var rt;return nt==null?et:tt.meridiemHour!=null?tt.meridiemHour(et,nt):(tt.isPM!=null&&(rt=tt.isPM(nt),rt&&et<12&&(et+=12),!rt&&et===12&&(et=0)),et)}function configFromStringAndArray(tt){var et,nt,rt,it,ot,at,st=!1,lt=tt._f.length;if(lt===0){getParsingFlags(tt).invalidFormat=!0,tt._d=new Date(NaN);return}for(it=0;itthis?this:tt:createInvalid()});function pickBy(tt,et){var nt,rt;if(et.length===1&&isArray$d(et[0])&&(et=et[0]),!et.length)return createLocal();for(nt=et[0],rt=1;rtthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function isDaylightSavingTimeShifted(){if(!isUndefined(this._isDSTShifted))return this._isDSTShifted;var tt={},et;return copyConfig(tt,this),tt=prepareConfig(tt),tt._a?(et=tt._isUTC?createUTC(tt._a):createLocal(tt._a),this._isDSTShifted=this.isValid()&&compareArrays(tt._a,et.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function isLocal(){return this.isValid()?!this._isUTC:!1}function isUtcOffset(){return this.isValid()?this._isUTC:!1}function isUtc(){return this.isValid()?this._isUTC&&this._offset===0:!1}var aspNetRegex=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,isoRegex=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function createDuration(tt,et){var nt=tt,rt=null,it,ot,at;return isDuration(tt)?nt={ms:tt._milliseconds,d:tt._days,M:tt._months}:isNumber$3(tt)||!isNaN(+tt)?(nt={},et?nt[et]=+tt:nt.milliseconds=+tt):(rt=aspNetRegex.exec(tt))?(it=rt[1]==="-"?-1:1,nt={y:0,d:toInt(rt[DATE])*it,h:toInt(rt[HOUR])*it,m:toInt(rt[MINUTE])*it,s:toInt(rt[SECOND])*it,ms:toInt(absRound(rt[MILLISECOND]*1e3))*it}):(rt=isoRegex.exec(tt))?(it=rt[1]==="-"?-1:1,nt={y:parseIso(rt[2],it),M:parseIso(rt[3],it),w:parseIso(rt[4],it),d:parseIso(rt[5],it),h:parseIso(rt[6],it),m:parseIso(rt[7],it),s:parseIso(rt[8],it)}):nt==null?nt={}:typeof nt=="object"&&("from"in nt||"to"in nt)&&(at=momentsDifference(createLocal(nt.from),createLocal(nt.to)),nt={},nt.ms=at.milliseconds,nt.M=at.months),ot=new Duration(nt),isDuration(tt)&&hasOwnProp(tt,"_locale")&&(ot._locale=tt._locale),isDuration(tt)&&hasOwnProp(tt,"_isValid")&&(ot._isValid=tt._isValid),ot}createDuration.fn=Duration.prototype;createDuration.invalid=createInvalid$1;function parseIso(tt,et){var nt=tt&&parseFloat(tt.replace(",","."));return(isNaN(nt)?0:nt)*et}function positiveMomentsDifference(tt,et){var nt={};return nt.months=et.month()-tt.month()+(et.year()-tt.year())*12,tt.clone().add(nt.months,"M").isAfter(et)&&--nt.months,nt.milliseconds=+et-+tt.clone().add(nt.months,"M"),nt}function momentsDifference(tt,et){var nt;return tt.isValid()&&et.isValid()?(et=cloneWithOffset(et,tt),tt.isBefore(et)?nt=positiveMomentsDifference(tt,et):(nt=positiveMomentsDifference(et,tt),nt.milliseconds=-nt.milliseconds,nt.months=-nt.months),nt):{milliseconds:0,months:0}}function createAdder(tt,et){return function(nt,rt){var it,ot;return rt!==null&&!isNaN(+rt)&&(deprecateSimple(et,"moment()."+et+"(period, number) is deprecated. Please use moment()."+et+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),ot=nt,nt=rt,rt=ot),it=createDuration(nt,rt),addSubtract(this,it,tt),this}}function addSubtract(tt,et,nt,rt){var it=et._milliseconds,ot=absRound(et._days),at=absRound(et._months);tt.isValid()&&(rt=rt??!0,at&&setMonth(tt,get$3(tt,"Month")+at*nt),ot&&set$1$1(tt,"Date",get$3(tt,"Date")+ot*nt),it&&tt._d.setTime(tt._d.valueOf()+it*nt),rt&&hooks.updateOffset(tt,ot||at))}var add$1=createAdder(1,"add"),subtract$1=createAdder(-1,"subtract");function isString$1(tt){return typeof tt=="string"||tt instanceof String}function isMomentInput(tt){return isMoment(tt)||isDate(tt)||isString$1(tt)||isNumber$3(tt)||isNumberOrStringArray(tt)||isMomentInputObject(tt)||tt===null||tt===void 0}function isMomentInputObject(tt){var et=isObject$6(tt)&&!isObjectEmpty(tt),nt=!1,rt=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],it,ot,at=rt.length;for(it=0;itnt.valueOf():nt.valueOf()9999?formatMoment(nt,et?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):isFunction$1(Date.prototype.toISOString)?et?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",formatMoment(nt,"Z")):formatMoment(nt,et?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function inspect(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var tt="moment",et="",nt,rt,it,ot;return this.isLocal()||(tt=this.utcOffset()===0?"moment.utc":"moment.parseZone",et="Z"),nt="["+tt+'("]',rt=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",it="-MM-DD[T]HH:mm:ss.SSS",ot=et+'[")]',this.format(nt+rt+it+ot)}function format$1(tt){tt||(tt=this.isUtc()?hooks.defaultFormatUtc:hooks.defaultFormat);var et=formatMoment(this,tt);return this.localeData().postformat(et)}function from(tt,et){return this.isValid()&&(isMoment(tt)&&tt.isValid()||createLocal(tt).isValid())?createDuration({to:this,from:tt}).locale(this.locale()).humanize(!et):this.localeData().invalidDate()}function fromNow(tt){return this.from(createLocal(),tt)}function to(tt,et){return this.isValid()&&(isMoment(tt)&&tt.isValid()||createLocal(tt).isValid())?createDuration({from:this,to:tt}).locale(this.locale()).humanize(!et):this.localeData().invalidDate()}function toNow(tt){return this.to(createLocal(),tt)}function locale$2(tt){var et;return tt===void 0?this._locale._abbr:(et=getLocale(tt),et!=null&&(this._locale=et),this)}var lang=deprecate("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(tt){return tt===void 0?this.localeData():this.locale(tt)});function localeData(){return this._locale}var MS_PER_SECOND=1e3,MS_PER_MINUTE=60*MS_PER_SECOND,MS_PER_HOUR=60*MS_PER_MINUTE,MS_PER_400_YEARS=(365*400+97)*24*MS_PER_HOUR;function mod$1(tt,et){return(tt%et+et)%et}function localStartOfDate(tt,et,nt){return tt<100&&tt>=0?new Date(tt+400,et,nt)-MS_PER_400_YEARS:new Date(tt,et,nt).valueOf()}function utcStartOfDate(tt,et,nt){return tt<100&&tt>=0?Date.UTC(tt+400,et,nt)-MS_PER_400_YEARS:Date.UTC(tt,et,nt)}function startOf(tt){var et,nt;if(tt=normalizeUnits(tt),tt===void 0||tt==="millisecond"||!this.isValid())return this;switch(nt=this._isUTC?utcStartOfDate:localStartOfDate,tt){case"year":et=nt(this.year(),0,1);break;case"quarter":et=nt(this.year(),this.month()-this.month()%3,1);break;case"month":et=nt(this.year(),this.month(),1);break;case"week":et=nt(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":et=nt(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":et=nt(this.year(),this.month(),this.date());break;case"hour":et=this._d.valueOf(),et-=mod$1(et+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR);break;case"minute":et=this._d.valueOf(),et-=mod$1(et,MS_PER_MINUTE);break;case"second":et=this._d.valueOf(),et-=mod$1(et,MS_PER_SECOND);break}return this._d.setTime(et),hooks.updateOffset(this,!0),this}function endOf(tt){var et,nt;if(tt=normalizeUnits(tt),tt===void 0||tt==="millisecond"||!this.isValid())return this;switch(nt=this._isUTC?utcStartOfDate:localStartOfDate,tt){case"year":et=nt(this.year()+1,0,1)-1;break;case"quarter":et=nt(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":et=nt(this.year(),this.month()+1,1)-1;break;case"week":et=nt(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":et=nt(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":et=nt(this.year(),this.month(),this.date()+1)-1;break;case"hour":et=this._d.valueOf(),et+=MS_PER_HOUR-mod$1(et+(this._isUTC?0:this.utcOffset()*MS_PER_MINUTE),MS_PER_HOUR)-1;break;case"minute":et=this._d.valueOf(),et+=MS_PER_MINUTE-mod$1(et,MS_PER_MINUTE)-1;break;case"second":et=this._d.valueOf(),et+=MS_PER_SECOND-mod$1(et,MS_PER_SECOND)-1;break}return this._d.setTime(et),hooks.updateOffset(this,!0),this}function valueOf(){return this._d.valueOf()-(this._offset||0)*6e4}function unix(){return Math.floor(this.valueOf()/1e3)}function toDate(){return new Date(this.valueOf())}function toArray$2(){var tt=this;return[tt.year(),tt.month(),tt.date(),tt.hour(),tt.minute(),tt.second(),tt.millisecond()]}function toObject(){var tt=this;return{years:tt.year(),months:tt.month(),date:tt.date(),hours:tt.hours(),minutes:tt.minutes(),seconds:tt.seconds(),milliseconds:tt.milliseconds()}}function toJSON(){return this.isValid()?this.toISOString():null}function isValid$2(){return isValid(this)}function parsingFlags(){return extend$1({},getParsingFlags(this))}function invalidAt(){return getParsingFlags(this).overflow}function creationData(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}addFormatToken("N",0,0,"eraAbbr");addFormatToken("NN",0,0,"eraAbbr");addFormatToken("NNN",0,0,"eraAbbr");addFormatToken("NNNN",0,0,"eraName");addFormatToken("NNNNN",0,0,"eraNarrow");addFormatToken("y",["y",1],"yo","eraYear");addFormatToken("y",["yy",2],0,"eraYear");addFormatToken("y",["yyy",3],0,"eraYear");addFormatToken("y",["yyyy",4],0,"eraYear");addRegexToken("N",matchEraAbbr);addRegexToken("NN",matchEraAbbr);addRegexToken("NNN",matchEraAbbr);addRegexToken("NNNN",matchEraName);addRegexToken("NNNNN",matchEraNarrow);addParseToken(["N","NN","NNN","NNNN","NNNNN"],function(tt,et,nt,rt){var it=nt._locale.erasParse(tt,rt,nt._strict);it?getParsingFlags(nt).era=it:getParsingFlags(nt).invalidEra=tt});addRegexToken("y",matchUnsigned);addRegexToken("yy",matchUnsigned);addRegexToken("yyy",matchUnsigned);addRegexToken("yyyy",matchUnsigned);addRegexToken("yo",matchEraYearOrdinal);addParseToken(["y","yy","yyy","yyyy"],YEAR);addParseToken(["yo"],function(tt,et,nt,rt){var it;nt._locale._eraYearOrdinalRegex&&(it=tt.match(nt._locale._eraYearOrdinalRegex)),nt._locale.eraYearOrdinalParse?et[YEAR]=nt._locale.eraYearOrdinalParse(tt,it):et[YEAR]=parseInt(tt,10)});function localeEras(tt,et){var nt,rt,it,ot=this._eras||getLocale("en")._eras;for(nt=0,rt=ot.length;nt=0)return ot[rt]}function localeErasConvertYear(tt,et){var nt=tt.since<=tt.until?1:-1;return et===void 0?hooks(tt.since).year():hooks(tt.since).year()+(et-tt.offset)*nt}function getEraName(){var tt,et,nt,rt=this.localeData().eras();for(tt=0,et=rt.length;ttot&&(et=ot),setWeekAll.call(this,tt,et,nt,rt,it))}function setWeekAll(tt,et,nt,rt,it){var ot=dayOfYearFromWeeks(tt,et,nt,rt,it),at=createUTCDate(ot.year,0,ot.dayOfYear);return this.year(at.getUTCFullYear()),this.month(at.getUTCMonth()),this.date(at.getUTCDate()),this}addFormatToken("Q",0,"Qo","quarter");addUnitAlias("quarter","Q");addUnitPriority("quarter",7);addRegexToken("Q",match1);addParseToken("Q",function(tt,et){et[MONTH]=(toInt(tt)-1)*3});function getSetQuarter(tt){return tt==null?Math.ceil((this.month()+1)/3):this.month((tt-1)*3+this.month()%3)}addFormatToken("D",["DD",2],"Do","date");addUnitAlias("date","D");addUnitPriority("date",9);addRegexToken("D",match1to2);addRegexToken("DD",match1to2,match2);addRegexToken("Do",function(tt,et){return tt?et._dayOfMonthOrdinalParse||et._ordinalParse:et._dayOfMonthOrdinalParseLenient});addParseToken(["D","DD"],DATE);addParseToken("Do",function(tt,et){et[DATE]=toInt(tt.match(match1to2)[0])});var getSetDayOfMonth=makeGetSet("Date",!0);addFormatToken("DDD",["DDDD",3],"DDDo","dayOfYear");addUnitAlias("dayOfYear","DDD");addUnitPriority("dayOfYear",4);addRegexToken("DDD",match1to3);addRegexToken("DDDD",match3);addParseToken(["DDD","DDDD"],function(tt,et,nt){nt._dayOfYear=toInt(tt)});function getSetDayOfYear(tt){var et=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return tt==null?et:this.add(tt-et,"d")}addFormatToken("m",["mm",2],0,"minute");addUnitAlias("minute","m");addUnitPriority("minute",14);addRegexToken("m",match1to2);addRegexToken("mm",match1to2,match2);addParseToken(["m","mm"],MINUTE);var getSetMinute=makeGetSet("Minutes",!1);addFormatToken("s",["ss",2],0,"second");addUnitAlias("second","s");addUnitPriority("second",15);addRegexToken("s",match1to2);addRegexToken("ss",match1to2,match2);addParseToken(["s","ss"],SECOND);var getSetSecond=makeGetSet("Seconds",!1);addFormatToken("S",0,0,function(){return~~(this.millisecond()/100)});addFormatToken(0,["SS",2],0,function(){return~~(this.millisecond()/10)});addFormatToken(0,["SSS",3],0,"millisecond");addFormatToken(0,["SSSS",4],0,function(){return this.millisecond()*10});addFormatToken(0,["SSSSS",5],0,function(){return this.millisecond()*100});addFormatToken(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});addFormatToken(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});addFormatToken(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});addFormatToken(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});addUnitAlias("millisecond","ms");addUnitPriority("millisecond",16);addRegexToken("S",match1to3,match1);addRegexToken("SS",match1to3,match2);addRegexToken("SSS",match1to3,match3);var token,getSetMillisecond;for(token="SSSS";token.length<=9;token+="S")addRegexToken(token,matchUnsigned);function parseMs(tt,et){et[MILLISECOND]=toInt(("0."+tt)*1e3)}for(token="S";token.length<=9;token+="S")addParseToken(token,parseMs);getSetMillisecond=makeGetSet("Milliseconds",!1);addFormatToken("z",0,0,"zoneAbbr");addFormatToken("zz",0,0,"zoneName");function getZoneAbbr(){return this._isUTC?"UTC":""}function getZoneName(){return this._isUTC?"Coordinated Universal Time":""}var proto=Moment.prototype;proto.add=add$1;proto.calendar=calendar$1$1;proto.clone=clone$1;proto.diff=diff;proto.endOf=endOf;proto.format=format$1;proto.from=from;proto.fromNow=fromNow;proto.to=to;proto.toNow=toNow;proto.get=stringGet;proto.invalidAt=invalidAt;proto.isAfter=isAfter;proto.isBefore=isBefore;proto.isBetween=isBetween;proto.isSame=isSame;proto.isSameOrAfter=isSameOrAfter;proto.isSameOrBefore=isSameOrBefore;proto.isValid=isValid$2;proto.lang=lang;proto.locale=locale$2;proto.localeData=localeData;proto.max=prototypeMax;proto.min=prototypeMin;proto.parsingFlags=parsingFlags;proto.set=stringSet;proto.startOf=startOf;proto.subtract=subtract$1;proto.toArray=toArray$2;proto.toObject=toObject;proto.toDate=toDate;proto.toISOString=toISOString;proto.inspect=inspect;typeof Symbol<"u"&&Symbol.for!=null&&(proto[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});proto.toJSON=toJSON;proto.toString=toString$5;proto.unix=unix;proto.valueOf=valueOf;proto.creationData=creationData;proto.eraName=getEraName;proto.eraNarrow=getEraNarrow;proto.eraAbbr=getEraAbbr;proto.eraYear=getEraYear;proto.year=getSetYear;proto.isLeapYear=getIsLeapYear;proto.weekYear=getSetWeekYear;proto.isoWeekYear=getSetISOWeekYear;proto.quarter=proto.quarters=getSetQuarter;proto.month=getSetMonth;proto.daysInMonth=getDaysInMonth;proto.week=proto.weeks=getSetWeek;proto.isoWeek=proto.isoWeeks=getSetISOWeek;proto.weeksInYear=getWeeksInYear;proto.weeksInWeekYear=getWeeksInWeekYear;proto.isoWeeksInYear=getISOWeeksInYear;proto.isoWeeksInISOWeekYear=getISOWeeksInISOWeekYear;proto.date=getSetDayOfMonth;proto.day=proto.days=getSetDayOfWeek;proto.weekday=getSetLocaleDayOfWeek;proto.isoWeekday=getSetISODayOfWeek;proto.dayOfYear=getSetDayOfYear;proto.hour=proto.hours=getSetHour;proto.minute=proto.minutes=getSetMinute;proto.second=proto.seconds=getSetSecond;proto.millisecond=proto.milliseconds=getSetMillisecond;proto.utcOffset=getSetOffset;proto.utc=setOffsetToUTC;proto.local=setOffsetToLocal;proto.parseZone=setOffsetToParsedOffset;proto.hasAlignedHourOffset=hasAlignedHourOffset;proto.isDST=isDaylightSavingTime;proto.isLocal=isLocal;proto.isUtcOffset=isUtcOffset;proto.isUtc=isUtc;proto.isUTC=isUtc;proto.zoneAbbr=getZoneAbbr;proto.zoneName=getZoneName;proto.dates=deprecate("dates accessor is deprecated. Use date instead.",getSetDayOfMonth);proto.months=deprecate("months accessor is deprecated. Use month instead",getSetMonth);proto.years=deprecate("years accessor is deprecated. Use year instead",getSetYear);proto.zone=deprecate("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",getSetZone);proto.isDSTShifted=deprecate("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",isDaylightSavingTimeShifted);function createUnix(tt){return createLocal(tt*1e3)}function createInZone(){return createLocal.apply(null,arguments).parseZone()}function preParsePostFormat(tt){return tt}var proto$1=Locale.prototype;proto$1.calendar=calendar$1;proto$1.longDateFormat=longDateFormat;proto$1.invalidDate=invalidDate;proto$1.ordinal=ordinal$1;proto$1.preparse=preParsePostFormat;proto$1.postformat=preParsePostFormat;proto$1.relativeTime=relativeTime;proto$1.pastFuture=pastFuture;proto$1.set=set$1;proto$1.eras=localeEras;proto$1.erasParse=localeErasParse;proto$1.erasConvertYear=localeErasConvertYear;proto$1.erasAbbrRegex=erasAbbrRegex;proto$1.erasNameRegex=erasNameRegex;proto$1.erasNarrowRegex=erasNarrowRegex;proto$1.months=localeMonths;proto$1.monthsShort=localeMonthsShort;proto$1.monthsParse=localeMonthsParse;proto$1.monthsRegex=monthsRegex;proto$1.monthsShortRegex=monthsShortRegex;proto$1.week=localeWeek;proto$1.firstDayOfYear=localeFirstDayOfYear;proto$1.firstDayOfWeek=localeFirstDayOfWeek;proto$1.weekdays=localeWeekdays;proto$1.weekdaysMin=localeWeekdaysMin;proto$1.weekdaysShort=localeWeekdaysShort;proto$1.weekdaysParse=localeWeekdaysParse;proto$1.weekdaysRegex=weekdaysRegex;proto$1.weekdaysShortRegex=weekdaysShortRegex;proto$1.weekdaysMinRegex=weekdaysMinRegex;proto$1.isPM=localeIsPM;proto$1.meridiem=localeMeridiem;function get$1$1(tt,et,nt,rt){var it=getLocale(),ot=createUTC().set(rt,et);return it[nt](ot,tt)}function listMonthsImpl(tt,et,nt){if(isNumber$3(tt)&&(et=tt,tt=void 0),tt=tt||"",et!=null)return get$1$1(tt,et,nt,"month");var rt,it=[];for(rt=0;rt<12;rt++)it[rt]=get$1$1(tt,rt,nt,"month");return it}function listWeekdaysImpl(tt,et,nt,rt){typeof tt=="boolean"?(isNumber$3(et)&&(nt=et,et=void 0),et=et||""):(et=tt,nt=et,tt=!1,isNumber$3(et)&&(nt=et,et=void 0),et=et||"");var it=getLocale(),ot=tt?it._week.dow:0,at,st=[];if(nt!=null)return get$1$1(et,(nt+ot)%7,rt,"day");for(at=0;at<7;at++)st[at]=get$1$1(et,(at+ot)%7,rt,"day");return st}function listMonths(tt,et){return listMonthsImpl(tt,et,"months")}function listMonthsShort(tt,et){return listMonthsImpl(tt,et,"monthsShort")}function listWeekdays(tt,et,nt){return listWeekdaysImpl(tt,et,nt,"weekdays")}function listWeekdaysShort(tt,et,nt){return listWeekdaysImpl(tt,et,nt,"weekdaysShort")}function listWeekdaysMin(tt,et,nt){return listWeekdaysImpl(tt,et,nt,"weekdaysMin")}getSetGlobalLocale("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(tt){var et=tt%10,nt=toInt(tt%100/10)===1?"th":et===1?"st":et===2?"nd":et===3?"rd":"th";return tt+nt}});hooks.lang=deprecate("moment.lang is deprecated. Use moment.locale instead.",getSetGlobalLocale);hooks.langData=deprecate("moment.langData is deprecated. Use moment.localeData instead.",getLocale);var mathAbs=Math.abs;function abs(){var tt=this._data;return this._milliseconds=mathAbs(this._milliseconds),this._days=mathAbs(this._days),this._months=mathAbs(this._months),tt.milliseconds=mathAbs(tt.milliseconds),tt.seconds=mathAbs(tt.seconds),tt.minutes=mathAbs(tt.minutes),tt.hours=mathAbs(tt.hours),tt.months=mathAbs(tt.months),tt.years=mathAbs(tt.years),this}function addSubtract$1(tt,et,nt,rt){var it=createDuration(et,nt);return tt._milliseconds+=rt*it._milliseconds,tt._days+=rt*it._days,tt._months+=rt*it._months,tt._bubble()}function add$1$1(tt,et){return addSubtract$1(this,tt,et,1)}function subtract$1$1(tt,et){return addSubtract$1(this,tt,et,-1)}function absCeil(tt){return tt<0?Math.floor(tt):Math.ceil(tt)}function bubble(){var tt=this._milliseconds,et=this._days,nt=this._months,rt=this._data,it,ot,at,st,lt;return tt>=0&&et>=0&&nt>=0||tt<=0&&et<=0&&nt<=0||(tt+=absCeil(monthsToDays(nt)+et)*864e5,et=0,nt=0),rt.milliseconds=tt%1e3,it=absFloor(tt/1e3),rt.seconds=it%60,ot=absFloor(it/60),rt.minutes=ot%60,at=absFloor(ot/60),rt.hours=at%24,et+=absFloor(at/24),lt=absFloor(daysToMonths(et)),nt+=lt,et-=absCeil(monthsToDays(lt)),st=absFloor(nt/12),nt%=12,rt.days=et,rt.months=nt,rt.years=st,this}function daysToMonths(tt){return tt*4800/146097}function monthsToDays(tt){return tt*146097/4800}function as(tt){if(!this.isValid())return NaN;var et,nt,rt=this._milliseconds;if(tt=normalizeUnits(tt),tt==="month"||tt==="quarter"||tt==="year")switch(et=this._days+rt/864e5,nt=this._months+daysToMonths(et),tt){case"month":return nt;case"quarter":return nt/3;case"year":return nt/12}else switch(et=this._days+Math.round(monthsToDays(this._months)),tt){case"week":return et/7+rt/6048e5;case"day":return et+rt/864e5;case"hour":return et*24+rt/36e5;case"minute":return et*1440+rt/6e4;case"second":return et*86400+rt/1e3;case"millisecond":return Math.floor(et*864e5)+rt;default:throw new Error("Unknown unit "+tt)}}function valueOf$1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+toInt(this._months/12)*31536e6:NaN}function makeAs(tt){return function(){return this.as(tt)}}var asMilliseconds=makeAs("ms"),asSeconds=makeAs("s"),asMinutes=makeAs("m"),asHours=makeAs("h"),asDays=makeAs("d"),asWeeks=makeAs("w"),asMonths=makeAs("M"),asQuarters=makeAs("Q"),asYears=makeAs("y");function clone$1$1(){return createDuration(this)}function get$2$1(tt){return tt=normalizeUnits(tt),this.isValid()?this[tt+"s"]():NaN}function makeGetter(tt){return function(){return this.isValid()?this._data[tt]:NaN}}var milliseconds=makeGetter("milliseconds"),seconds=makeGetter("seconds"),minutes=makeGetter("minutes"),hours=makeGetter("hours"),days=makeGetter("days"),months=makeGetter("months"),years=makeGetter("years");function weeks(){return absFloor(this.days()/7)}var round$1=Math.round,thresholds={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function substituteTimeAgo(tt,et,nt,rt,it){return it.relativeTime(et||1,!!nt,tt,rt)}function relativeTime$1(tt,et,nt,rt){var it=createDuration(tt).abs(),ot=round$1(it.as("s")),at=round$1(it.as("m")),st=round$1(it.as("h")),lt=round$1(it.as("d")),ct=round$1(it.as("M")),ut=round$1(it.as("w")),ht=round$1(it.as("y")),dt=ot<=nt.ss&&["s",ot]||ot0,dt[4]=rt,substituteTimeAgo.apply(null,dt)}function getSetRelativeTimeRounding(tt){return tt===void 0?round$1:typeof tt=="function"?(round$1=tt,!0):!1}function getSetRelativeTimeThreshold(tt,et){return thresholds[tt]===void 0?!1:et===void 0?thresholds[tt]:(thresholds[tt]=et,tt==="s"&&(thresholds.ss=et-1),!0)}function humanize(tt,et){if(!this.isValid())return this.localeData().invalidDate();var nt=!1,rt=thresholds,it,ot;return typeof tt=="object"&&(et=tt,tt=!1),typeof tt=="boolean"&&(nt=tt),typeof et=="object"&&(rt=Object.assign({},thresholds,et),et.s!=null&&et.ss==null&&(rt.ss=et.s-1)),it=this.localeData(),ot=relativeTime$1(this,!nt,rt,it),nt&&(ot=it.pastFuture(+this,ot)),it.postformat(ot)}var abs$1=Math.abs;function sign$1(tt){return(tt>0)-(tt<0)||+tt}function toISOString$1(){if(!this.isValid())return this.localeData().invalidDate();var tt=abs$1(this._milliseconds)/1e3,et=abs$1(this._days),nt=abs$1(this._months),rt,it,ot,at,st=this.asSeconds(),lt,ct,ut,ht;return st?(rt=absFloor(tt/60),it=absFloor(rt/60),tt%=60,rt%=60,ot=absFloor(nt/12),nt%=12,at=tt?tt.toFixed(3).replace(/\.?0+$/,""):"",lt=st<0?"-":"",ct=sign$1(this._months)!==sign$1(st)?"-":"",ut=sign$1(this._days)!==sign$1(st)?"-":"",ht=sign$1(this._milliseconds)!==sign$1(st)?"-":"",lt+"P"+(ot?ct+ot+"Y":"")+(nt?ct+nt+"M":"")+(et?ut+et+"D":"")+(it||rt||tt?"T":"")+(it?ht+it+"H":"")+(rt?ht+rt+"M":"")+(tt?ht+at+"S":"")):"P0D"}var proto$2=Duration.prototype;proto$2.isValid=isValid$1;proto$2.abs=abs;proto$2.add=add$1$1;proto$2.subtract=subtract$1$1;proto$2.as=as;proto$2.asMilliseconds=asMilliseconds;proto$2.asSeconds=asSeconds;proto$2.asMinutes=asMinutes;proto$2.asHours=asHours;proto$2.asDays=asDays;proto$2.asWeeks=asWeeks;proto$2.asMonths=asMonths;proto$2.asQuarters=asQuarters;proto$2.asYears=asYears;proto$2.valueOf=valueOf$1;proto$2._bubble=bubble;proto$2.clone=clone$1$1;proto$2.get=get$2$1;proto$2.milliseconds=milliseconds;proto$2.seconds=seconds;proto$2.minutes=minutes;proto$2.hours=hours;proto$2.days=days;proto$2.weeks=weeks;proto$2.months=months;proto$2.years=years;proto$2.humanize=humanize;proto$2.toISOString=toISOString$1;proto$2.toString=toISOString$1;proto$2.toJSON=toISOString$1;proto$2.locale=locale$2;proto$2.localeData=localeData;proto$2.toIsoString=deprecate("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",toISOString$1);proto$2.lang=lang;addFormatToken("X",0,0,"unix");addFormatToken("x",0,0,"valueOf");addRegexToken("x",matchSigned);addRegexToken("X",matchTimestamp);addParseToken("X",function(tt,et,nt){nt._d=new Date(parseFloat(tt)*1e3)});addParseToken("x",function(tt,et,nt){nt._d=new Date(toInt(tt))});//! moment.js -hooks.version="2.29.4";setHookCallback(createLocal);hooks.fn=proto;hooks.min=min$2;hooks.max=max$2;hooks.now=now$2;hooks.utc=createUTC;hooks.unix=createUnix;hooks.months=listMonths;hooks.isDate=isDate;hooks.locale=getSetGlobalLocale;hooks.invalid=createInvalid;hooks.duration=createDuration;hooks.isMoment=isMoment;hooks.weekdays=listWeekdays;hooks.parseZone=createInZone;hooks.localeData=getLocale;hooks.isDuration=isDuration;hooks.monthsShort=listMonthsShort;hooks.weekdaysMin=listWeekdaysMin;hooks.defineLocale=defineLocale;hooks.updateLocale=updateLocale;hooks.locales=listLocales;hooks.weekdaysShort=listWeekdaysShort;hooks.normalizeUnits=normalizeUnits;hooks.relativeTimeRounding=getSetRelativeTimeRounding;hooks.relativeTimeThreshold=getSetRelativeTimeThreshold;hooks.calendarFormat=getCalendarFormat;hooks.prototype=proto;hooks.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var classnames={exports:{}};/*! +`):tt;return()=>{nt||(nt=!0,et==="error"?console.error(rt):console.warn(rt))}};buildWarning(["The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.","You can replace it with the `textField` component slot in most cases.","For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5)."]);const usePicker=({props:tt,valueManager:et,valueType:nt,wrapperVariant:rt,inputRef:it,additionalViewProps:ot,validator:at,autoFocusView:st})=>{const lt=usePickerValue({props:tt,valueManager:et,valueType:nt,wrapperVariant:rt,validator:at}),ct=usePickerViews({props:tt,inputRef:it,additionalViewProps:ot,autoFocusView:st,propsFromPickerValue:lt.viewProps}),ut=usePickerLayoutProps({props:tt,wrapperVariant:rt,propsFromPickerValue:lt.layoutProps,propsFromPickerViews:ct.layoutProps});return{open:lt.open,actions:lt.actions,fieldProps:lt.fieldProps,renderCurrentView:ct.renderCurrentView,hasUIView:ct.hasUIView,shouldRestoreFocus:ct.shouldRestoreFocus,layoutProps:ut.layoutProps}};function getPickersLayoutUtilityClass(tt){return generateUtilityClass("MuiPickersLayout",tt)}const pickersLayoutClasses=generateUtilityClasses("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","shortcuts"]),_excluded$y=["onAccept","onClear","onCancel","onSetToday","actions"];function PickersActionBar(tt){const{onAccept:et,onClear:nt,onCancel:rt,onSetToday:it,actions:ot}=tt,at=_objectWithoutPropertiesLoose$m(tt,_excluded$y),st=useLocaleText();if(ot==null||ot.length===0)return null;const lt=ot==null?void 0:ot.map(ct=>{switch(ct){case"clear":return jsxRuntimeExports.jsx(Button$2,{onClick:nt,children:st.clearButtonLabel},ct);case"cancel":return jsxRuntimeExports.jsx(Button$2,{onClick:rt,children:st.cancelButtonLabel},ct);case"accept":return jsxRuntimeExports.jsx(Button$2,{onClick:et,children:st.okButtonLabel},ct);case"today":return jsxRuntimeExports.jsx(Button$2,{onClick:it,children:st.todayButtonLabel},ct);default:return null}});return jsxRuntimeExports.jsx(DialogActions$1,_extends$u({},at,{children:lt}))}const _excluded$x=["items","changeImportance","isLandscape","onChange","isValid"],_excluded2$a=["getValue"];function PickersShortcuts(tt){const{items:et,changeImportance:nt,onChange:rt,isValid:it}=tt,ot=_objectWithoutPropertiesLoose$m(tt,_excluded$x);if(et==null||et.length===0)return null;const at=et.map(st=>{let{getValue:lt}=st,ct=_objectWithoutPropertiesLoose$m(st,_excluded2$a);const ut=lt({isValid:it});return{label:ct.label,onClick:()=>{rt(ut,nt,ct)},disabled:!it(ut)}});return jsxRuntimeExports.jsx(List$1,_extends$u({dense:!0,sx:[{maxHeight:VIEW_HEIGHT,maxWidth:200,overflow:"auto"},...Array.isArray(ot.sx)?ot.sx:[ot.sx]]},ot,{children:at.map(st=>jsxRuntimeExports.jsx(ListItem$1,{children:jsxRuntimeExports.jsx(Chip$1,_extends$u({},st))},st.label))}))}function toolbarHasView(tt){return tt.view!==null}const useUtilityClasses$b=tt=>{const{classes:et,isLandscape:nt}=tt;return composeClasses({root:["root",nt&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},getPickersLayoutUtilityClass,et)},usePickerLayout=tt=>{var et,nt;const{wrapperVariant:rt,onAccept:it,onClear:ot,onCancel:at,onSetToday:st,view:lt,views:ct,onViewChange:ut,value:ht,onChange:dt,onSelectShortcut:pt,isValid:mt,isLandscape:gt,disabled:yt,readOnly:bt,children:vt,components:xt,componentsProps:kt,slots:St,slotProps:Tt}=tt,At=St??uncapitalizeObjectKeys(xt),Et=Tt??kt,$t=useUtilityClasses$b(tt),Dt=(et=At==null?void 0:At.actionBar)!=null?et:PickersActionBar,jt=useSlotProps({elementType:Dt,externalSlotProps:Et==null?void 0:Et.actionBar,additionalProps:{onAccept:it,onClear:ot,onCancel:at,onSetToday:st,actions:rt==="desktop"?[]:["cancel","accept"],className:$t.actionBar},ownerState:_extends$u({},tt,{wrapperVariant:rt})}),Pt=jsxRuntimeExports.jsx(Dt,_extends$u({},jt)),Ct=At==null?void 0:At.toolbar,wt=useSlotProps({elementType:Ct,externalSlotProps:Et==null?void 0:Et.toolbar,additionalProps:{isLandscape:gt,onChange:dt,value:ht,view:lt,onViewChange:ut,views:ct,disabled:yt,readOnly:bt,className:$t.toolbar},ownerState:_extends$u({},tt,{wrapperVariant:rt})}),It=toolbarHasView(wt)&&Ct?jsxRuntimeExports.jsx(Ct,_extends$u({},wt)):null,Ot=vt,Wt=At==null?void 0:At.tabs,zt=lt&&Wt?jsxRuntimeExports.jsx(Wt,_extends$u({view:lt,onViewChange:ut},Et==null?void 0:Et.tabs)):null,Ft=(nt=At==null?void 0:At.shortcuts)!=null?nt:PickersShortcuts,Nt=useSlotProps({elementType:Ft,externalSlotProps:Et==null?void 0:Et.shortcuts,additionalProps:{isValid:mt,isLandscape:gt,onChange:pt,className:$t.shortcuts},ownerState:{isValid:mt,isLandscape:gt,onChange:pt,className:$t.shortcuts,wrapperVariant:rt}}),Ut=lt&&Ft?jsxRuntimeExports.jsx(Ft,_extends$u({},Nt)):null;return{toolbar:It,content:Ot,tabs:zt,actionBar:Pt,shortcuts:Ut}},usePickerLayout$1=usePickerLayout,useUtilityClasses$a=tt=>{const{isLandscape:et,classes:nt}=tt;return composeClasses({root:["root",et&&"landscape"],contentWrapper:["contentWrapper"]},getPickersLayoutUtilityClass,nt)},PickersLayoutRoot=styled$1("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(tt,et)=>et.root})(({theme:tt,ownerState:et})=>({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${pickersLayoutClasses.toolbar}`]:et.isLandscape?{gridColumn:tt.direction==="rtl"?3:1,gridRow:"2 / 3"}:{gridColumn:"2 / 4",gridRow:1},[`.${pickersLayoutClasses.shortcuts}`]:et.isLandscape?{gridColumn:"2 / 4",gridRow:1}:{gridColumn:tt.direction==="rtl"?3:1,gridRow:"2 / 3"},[`& .${pickersLayoutClasses.actionBar}`]:{gridColumn:"1 / 4",gridRow:3}}));PickersLayoutRoot.propTypes={as:PropTypes.elementType,ownerState:PropTypes.shape({isLandscape:PropTypes.bool.isRequired}).isRequired,sx:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func,PropTypes.object,PropTypes.bool])),PropTypes.func,PropTypes.object])};const PickersLayoutContentWrapper=styled$1("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(tt,et)=>et.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),PickersLayout=function(et){const nt=useThemeProps({props:et,name:"MuiPickersLayout"}),{toolbar:rt,content:it,tabs:ot,actionBar:at,shortcuts:st}=usePickerLayout$1(nt),{sx:lt,className:ct,isLandscape:ut,ref:ht,wrapperVariant:dt}=nt,pt=nt,mt=useUtilityClasses$a(pt);return jsxRuntimeExports.jsxs(PickersLayoutRoot,{ref:ht,sx:lt,className:clsx(ct,mt.root),ownerState:pt,children:[ut?st:rt,ut?rt:st,jsxRuntimeExports.jsx(PickersLayoutContentWrapper,{className:mt.contentWrapper,children:dt==="desktop"?jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[it,ot]}):jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[ot,it]})}),at]})},getPickersSlideTransitionUtilityClass=tt=>generateUtilityClass("MuiPickersSlideTransition",tt),pickersSlideTransitionClasses=generateUtilityClasses("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),_excluded$w=["children","className","reduceAnimations","slideDirection","transKey","classes"],useUtilityClasses$9=tt=>{const{classes:et,slideDirection:nt}=tt,rt={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${nt}`],exitActive:[`slideExitActiveLeft-${nt}`]};return composeClasses(rt,getPickersSlideTransitionUtilityClass,et)},PickersSlideTransitionRoot=styled$1(TransitionGroup$1,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(tt,et)=>[et.root,{[`.${pickersSlideTransitionClasses["slideEnter-left"]}`]:et["slideEnter-left"]},{[`.${pickersSlideTransitionClasses["slideEnter-right"]}`]:et["slideEnter-right"]},{[`.${pickersSlideTransitionClasses.slideEnterActive}`]:et.slideEnterActive},{[`.${pickersSlideTransitionClasses.slideExit}`]:et.slideExit},{[`.${pickersSlideTransitionClasses["slideExitActiveLeft-left"]}`]:et["slideExitActiveLeft-left"]},{[`.${pickersSlideTransitionClasses["slideExitActiveLeft-right"]}`]:et["slideExitActiveLeft-right"]}]})(({theme:tt})=>{const et=tt.transitions.create("transform",{duration:tt.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${pickersSlideTransitionClasses["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${pickersSlideTransitionClasses["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${pickersSlideTransitionClasses.slideEnterActive}`]:{transform:"translate(0%)",transition:et},[`& .${pickersSlideTransitionClasses.slideExit}`]:{transform:"translate(0%)"},[`& .${pickersSlideTransitionClasses["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:et,zIndex:0},[`& .${pickersSlideTransitionClasses["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:et,zIndex:0}}});function PickersSlideTransition(tt){const et=useThemeProps({props:tt,name:"MuiPickersSlideTransition"}),{children:nt,className:rt,reduceAnimations:it,transKey:ot}=et,at=_objectWithoutPropertiesLoose$m(et,_excluded$w),st=useUtilityClasses$9(et),lt=useTheme();if(it)return jsxRuntimeExports.jsx("div",{className:clsx(st.root,rt),children:nt});const ct={exit:st.exit,enterActive:st.enterActive,enter:st.enter,exitActive:st.exitActive};return jsxRuntimeExports.jsx(PickersSlideTransitionRoot,{className:clsx(st.root,rt),childFactory:ut=>reactExports.cloneElement(ut,{classNames:ct}),role:"presentation",children:jsxRuntimeExports.jsx(CSSTransition$1,_extends$u({mountOnEnter:!0,unmountOnExit:!0,timeout:lt.transitions.duration.complex,classNames:ct},at,{children:nt}),ot)})}const useIsDateDisabled=({shouldDisableDate:tt,shouldDisableMonth:et,shouldDisableYear:nt,minDate:rt,maxDate:it,disableFuture:ot,disablePast:at,timezone:st})=>{const lt=useLocalizationContext();return reactExports.useCallback(ct=>validateDate({adapter:lt,value:ct,props:{shouldDisableDate:tt,shouldDisableMonth:et,shouldDisableYear:nt,minDate:rt,maxDate:it,disableFuture:ot,disablePast:at,timezone:st}})!==null,[lt,tt,et,nt,rt,it,ot,at,st])},getDayCalendarUtilityClass=tt=>generateUtilityClass("MuiDayCalendar",tt);generateUtilityClasses("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const _excluded$v=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],_excluded2$9=["ownerState"],useUtilityClasses$8=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},getDayCalendarUtilityClass,et)},weeksContainerHeight=(DAY_SIZE+DAY_MARGIN*2)*6,PickersCalendarDayRoot=styled$1("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(tt,et)=>et.root})({}),PickersCalendarDayHeader=styled$1("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(tt,et)=>et.header})({display:"flex",justifyContent:"center",alignItems:"center"}),PickersCalendarWeekDayLabel=styled$1(Typography$1,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(tt,et)=>et.weekDayLabel})(({theme:tt})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(tt.vars||tt).palette.text.secondary})),PickersCalendarWeekNumberLabel=styled$1(Typography$1,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(tt,et)=>et.weekNumberLabel})(({theme:tt})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:tt.palette.text.disabled})),PickersCalendarWeekNumber=styled$1(Typography$1,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(tt,et)=>et.weekNumber})(({theme:tt})=>_extends$u({},tt.typography.caption,{width:DAY_SIZE,height:DAY_SIZE,padding:0,margin:`0 ${DAY_MARGIN}px`,color:tt.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),PickersCalendarLoadingContainer=styled$1("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(tt,et)=>et.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:weeksContainerHeight}),PickersCalendarSlideTransition=styled$1(PickersSlideTransition,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(tt,et)=>et.slideTransition})({minHeight:weeksContainerHeight}),PickersCalendarWeekContainer=styled$1("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(tt,et)=>et.monthContainer})({overflow:"hidden"}),PickersCalendarWeek=styled$1("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(tt,et)=>et.weekContainer})({margin:`${DAY_MARGIN}px 0`,display:"flex",justifyContent:"center"});function WrappedDay(tt){var et,nt,rt;let{parentProps:it,day:ot,focusableDay:at,selectedDays:st,isDateDisabled:lt,currentMonthNumber:ct,isViewFocused:ut}=tt,ht=_objectWithoutPropertiesLoose$m(tt,_excluded$v);const{disabled:dt,disableHighlightToday:pt,isMonthSwitchingAnimating:mt,showDaysOutsideCurrentMonth:gt,components:yt,componentsProps:bt,slots:vt,slotProps:xt,timezone:kt}=it,St=useUtils(),Tt=useNow(kt),At=at!==null&&St.isSameDay(ot,at),Et=st.some(Wt=>St.isSameDay(Wt,ot)),$t=St.isSameDay(ot,Tt),Dt=(et=(nt=vt==null?void 0:vt.day)!=null?nt:yt==null?void 0:yt.Day)!=null?et:PickersDay,jt=useSlotProps({elementType:Dt,externalSlotProps:(rt=xt==null?void 0:xt.day)!=null?rt:bt==null?void 0:bt.day,additionalProps:_extends$u({disableHighlightToday:pt,showDaysOutsideCurrentMonth:gt,role:"gridcell",isAnimating:mt,"data-timestamp":St.toJsDate(ot).valueOf()},ht),ownerState:_extends$u({},it,{day:ot,selected:Et})}),Pt=_objectWithoutPropertiesLoose$m(jt,_excluded2$9),Ct=reactExports.useMemo(()=>dt||lt(ot),[dt,lt,ot]),wt=reactExports.useMemo(()=>St.getMonth(ot)!==ct,[St,ot,ct]),It=reactExports.useMemo(()=>{const Wt=St.startOfMonth(St.setMonth(ot,ct));return gt?St.isSameDay(ot,St.startOfWeek(Wt)):St.isSameDay(ot,Wt)},[ct,ot,gt,St]),Ot=reactExports.useMemo(()=>{const Wt=St.endOfMonth(St.setMonth(ot,ct));return gt?St.isSameDay(ot,St.endOfWeek(Wt)):St.isSameDay(ot,Wt)},[ct,ot,gt,St]);return jsxRuntimeExports.jsx(Dt,_extends$u({},Pt,{day:ot,disabled:Ct,autoFocus:ut&&At,today:$t,outsideCurrentMonth:wt,isFirstVisibleCell:It,isLastVisibleCell:Ot,selected:Et,tabIndex:At?0:-1,"aria-selected":Et,"aria-current":$t?"date":void 0}))}function DayCalendar(tt){const et=useThemeProps({props:tt,name:"MuiDayCalendar"}),{onFocusedDayChange:nt,className:rt,currentMonth:it,selectedDays:ot,focusedDay:at,loading:st,onSelectedDaysChange:lt,onMonthSwitchingAnimationEnd:ct,readOnly:ut,reduceAnimations:ht,renderLoading:dt=()=>jsxRuntimeExports.jsx("span",{children:"..."}),slideDirection:pt,TransitionProps:mt,disablePast:gt,disableFuture:yt,minDate:bt,maxDate:vt,shouldDisableDate:xt,shouldDisableMonth:kt,shouldDisableYear:St,dayOfWeekFormatter:Tt,hasFocus:At,onFocusedViewChange:Et,gridLabelId:$t,displayWeekNumber:Dt,fixedWeekNumber:jt,autoFocus:Pt,timezone:Ct}=et,wt=useNow(Ct),It=useUtils(),Ot=useUtilityClasses$8(et),zt=useTheme().direction==="rtl",Ft=Tt||((cn,mn)=>It.format(mn,"weekdayShort").charAt(0).toUpperCase()),Nt=useIsDateDisabled({shouldDisableDate:xt,shouldDisableMonth:kt,shouldDisableYear:St,minDate:bt,maxDate:vt,disablePast:gt,disableFuture:yt,timezone:Ct}),Ut=useLocaleText(),[Mt,Ht]=useControlled({name:"DayCalendar",state:"hasFocus",controlled:At,default:Pt??!1}),[en,sn]=reactExports.useState(()=>at||wt),Kt=useEventCallback(cn=>{ut||lt(cn)}),rn=cn=>{Nt(cn)||(nt(cn),sn(cn),Et==null||Et(!0),Ht(!0))},nn=useEventCallback((cn,mn)=>{switch(cn.key){case"ArrowUp":rn(It.addDays(mn,-7)),cn.preventDefault();break;case"ArrowDown":rn(It.addDays(mn,7)),cn.preventDefault();break;case"ArrowLeft":{const In=It.addDays(mn,zt?1:-1),An=It.addMonths(mn,zt?1:-1),wn=findClosestEnabledDate({utils:It,date:In,minDate:zt?In:It.startOfMonth(An),maxDate:zt?It.endOfMonth(An):In,isDateDisabled:Nt,timezone:Ct});rn(wn||In),cn.preventDefault();break}case"ArrowRight":{const In=It.addDays(mn,zt?-1:1),An=It.addMonths(mn,zt?-1:1),wn=findClosestEnabledDate({utils:It,date:In,minDate:zt?It.startOfMonth(An):In,maxDate:zt?In:It.endOfMonth(An),isDateDisabled:Nt,timezone:Ct});rn(wn||In),cn.preventDefault();break}case"Home":rn(It.startOfWeek(mn)),cn.preventDefault();break;case"End":rn(It.endOfWeek(mn)),cn.preventDefault();break;case"PageUp":rn(It.addMonths(mn,1)),cn.preventDefault();break;case"PageDown":rn(It.addMonths(mn,-1)),cn.preventDefault();break}}),hn=useEventCallback((cn,mn)=>rn(mn)),vn=useEventCallback((cn,mn)=>{Mt&&It.isSameDay(en,mn)&&(Et==null||Et(!1))}),an=It.getMonth(it),Qt=reactExports.useMemo(()=>ot.filter(cn=>!!cn).map(cn=>It.startOfDay(cn)),[It,ot]),_n=an,Pn=reactExports.useMemo(()=>reactExports.createRef(),[_n]),$n=It.startOfWeek(wt),Nn=reactExports.useMemo(()=>{const cn=It.startOfMonth(it),mn=It.endOfMonth(it);return Nt(en)||It.isAfterDay(en,mn)||It.isBeforeDay(en,cn)?findClosestEnabledDate({utils:It,date:en,minDate:cn,maxDate:mn,disablePast:gt,disableFuture:yt,isDateDisabled:Nt,timezone:Ct}):en},[it,yt,gt,en,Nt,It,Ct]),Tn=reactExports.useMemo(()=>{const cn=It.setTimezone(it,Ct),mn=It.getWeekArray(cn);let In=It.addMonths(cn,1);for(;jt&&mn.length{mn.length{var In;const An=It.format(cn,"weekdayShort").slice(0,2);return jsxRuntimeExports.jsx(PickersCalendarWeekDayLabel,{variant:"caption",role:"columnheader","aria-label":It.format(It.addDays($n,mn),"weekday"),className:Ot.weekDayLabel,children:(In=Ft==null?void 0:Ft(An,cn))!=null?In:An},An+mn.toString())})]}),st?jsxRuntimeExports.jsx(PickersCalendarLoadingContainer,{className:Ot.loadingContainer,children:dt()}):jsxRuntimeExports.jsx(PickersCalendarSlideTransition,_extends$u({transKey:_n,onExited:ct,reduceAnimations:ht,slideDirection:pt,className:clsx(rt,Ot.slideTransition)},mt,{nodeRef:Pn,children:jsxRuntimeExports.jsx(PickersCalendarWeekContainer,{ref:Pn,role:"rowgroup",className:Ot.monthContainer,children:Tn.map((cn,mn)=>jsxRuntimeExports.jsxs(PickersCalendarWeek,{role:"row",className:Ot.weekContainer,"aria-rowindex":mn+1,children:[Dt&&jsxRuntimeExports.jsx(PickersCalendarWeekNumber,{className:Ot.weekNumber,role:"rowheader","aria-label":Ut.calendarWeekNumberAriaLabelText(It.getWeekNumber(cn[0])),children:Ut.calendarWeekNumberText(It.getWeekNumber(cn[0]))}),cn.map((In,An)=>jsxRuntimeExports.jsx(WrappedDay,{parentProps:et,day:In,selectedDays:Qt,focusableDay:Nn,onKeyDown:nn,onFocus:hn,onBlur:vn,onDaySelect:Kt,isDateDisabled:Nt,currentMonthNumber:an,isViewFocused:Mt,"aria-colindex":An+1},In.toString()))]},`week-${cn[0]}`))})}))]})}const createCalendarStateReducer=(tt,et,nt)=>(rt,it)=>{switch(it.type){case"changeMonth":return _extends$u({},rt,{slideDirection:it.direction,currentMonth:it.newMonth,isMonthSwitchingAnimating:!tt});case"finishMonthSwitchingAnimation":return _extends$u({},rt,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(rt.focusedDay!=null&&it.focusedDay!=null&&nt.isSameDay(it.focusedDay,rt.focusedDay))return rt;const ot=it.focusedDay!=null&&!et&&!nt.isSameMonth(rt.currentMonth,it.focusedDay);return _extends$u({},rt,{focusedDay:it.focusedDay,isMonthSwitchingAnimating:ot&&!tt&&!it.withoutMonthSwitchingAnimation,currentMonth:ot?nt.startOfMonth(it.focusedDay):rt.currentMonth,slideDirection:it.focusedDay!=null&&nt.isAfterDay(it.focusedDay,rt.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},useCalendarState=tt=>{const{value:et,referenceDate:nt,defaultCalendarMonth:rt,disableFuture:it,disablePast:ot,disableSwitchToMonthOnDayFocus:at=!1,maxDate:st,minDate:lt,onMonthChange:ct,reduceAnimations:ut,shouldDisableDate:ht,timezone:dt}=tt,pt=useNow(dt),mt=useUtils(),gt=reactExports.useRef(createCalendarStateReducer(!!ut,at,mt)).current,yt=reactExports.useMemo(()=>{let Et=null;return nt?Et=nt:rt&&(Et=mt.startOfMonth(rt)),singleItemValueManager.getInitialReferenceValue({value:et,utils:mt,timezone:dt,props:tt,referenceDate:Et,granularity:SECTION_TYPE_GRANULARITY.day})},[]),[bt,vt]=reactExports.useReducer(gt,{isMonthSwitchingAnimating:!1,focusedDay:et||pt,currentMonth:mt.startOfMonth(yt),slideDirection:"left"}),xt=reactExports.useCallback(Et=>{vt(_extends$u({type:"changeMonth"},Et)),ct&&ct(Et.newMonth)},[ct]),kt=reactExports.useCallback(Et=>{const $t=Et;mt.isSameMonth($t,bt.currentMonth)||xt({newMonth:mt.startOfMonth($t),direction:mt.isAfterDay($t,bt.currentMonth)?"left":"right"})},[bt.currentMonth,xt,mt]),St=useIsDateDisabled({shouldDisableDate:ht,minDate:lt,maxDate:st,disableFuture:it,disablePast:ot,timezone:dt}),Tt=reactExports.useCallback(()=>{vt({type:"finishMonthSwitchingAnimation"})},[]),At=useEventCallback((Et,$t)=>{St(Et)||vt({type:"changeFocusedDay",focusedDay:Et,withoutMonthSwitchingAnimation:$t})});return{referenceDate:yt,calendarState:bt,changeMonth:kt,changeFocusedDay:At,isDateDisabled:St,onMonthSwitchingAnimationEnd:Tt,handleChangeMonth:xt}},_excluded$u=["ownerState"],useClearableField=({clearable:tt,fieldProps:et,InputProps:nt,onClear:rt,slots:it,slotProps:ot,components:at,componentsProps:st})=>{var lt,ct,ut,ht,dt,pt;const mt=useLocaleText(),gt=(lt=(ct=it==null?void 0:it.clearButton)!=null?ct:at==null?void 0:at.ClearButton)!=null?lt:IconButton$2,yt=useSlotProps({elementType:gt,externalSlotProps:(ut=ot==null?void 0:ot.clearButton)!=null?ut:st==null?void 0:st.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:mt.fieldClearLabel}}),bt=_objectWithoutPropertiesLoose$m(yt,_excluded$u),vt=(ht=(dt=it==null?void 0:it.clearIcon)!=null?dt:at==null?void 0:at.ClearIcon)!=null?ht:ClearIcon,xt=useSlotProps({elementType:vt,externalSlotProps:(pt=ot==null?void 0:ot.clearIcon)!=null?pt:st==null?void 0:st.clearIcon,ownerState:{}}),kt=_extends$u({},nt,{endAdornment:tt?jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[jsxRuntimeExports.jsx(MuiInputAdornment,{position:"end",sx:{marginRight:nt!=null&&nt.endAdornment?-1:-1.5},children:jsxRuntimeExports.jsx(gt,_extends$u({},bt,{onClick:rt,children:jsxRuntimeExports.jsx(vt,_extends$u({fontSize:"small"},xt))}))}),nt==null?void 0:nt.endAdornment]}):nt==null?void 0:nt.endAdornment}),St=_extends$u({},et,{sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(et.sx)?et.sx:[et.sx]]});return{InputProps:kt,fieldProps:St}},_excluded$t=["components","componentsProps","slots","slotProps","InputProps","inputProps"],_excluded2$8=["inputRef"],_excluded3$2=["ref","onPaste","onKeyDown","inputMode","readOnly","clearable","onClear"],DateField=reactExports.forwardRef(function(et,nt){var rt,it,ot;const at=useThemeProps({props:et,name:"MuiDateField"}),{components:st,componentsProps:lt,slots:ct,slotProps:ut,InputProps:ht,inputProps:dt}=at,pt=_objectWithoutPropertiesLoose$m(at,_excluded$t),mt=at,gt=(rt=(it=ct==null?void 0:ct.textField)!=null?it:st==null?void 0:st.TextField)!=null?rt:MuiTextField,yt=useSlotProps({elementType:gt,externalSlotProps:(ot=ut==null?void 0:ut.textField)!=null?ot:lt==null?void 0:lt.textField,externalForwardedProps:pt,ownerState:mt}),{inputRef:bt}=yt,vt=_objectWithoutPropertiesLoose$m(yt,_excluded2$8);vt.inputProps=_extends$u({},dt,vt.inputProps),vt.InputProps=_extends$u({},ht,vt.InputProps);const xt=useDateField({props:vt,inputRef:bt}),{ref:kt,onPaste:St,onKeyDown:Tt,inputMode:At,readOnly:Et,clearable:$t,onClear:Dt}=xt,jt=_objectWithoutPropertiesLoose$m(xt,_excluded3$2),{InputProps:Pt,fieldProps:Ct}=useClearableField({onClear:Dt,clearable:$t,fieldProps:jt,InputProps:jt.InputProps,slots:ct,slotProps:ut,components:st,componentsProps:lt});return jsxRuntimeExports.jsx(gt,_extends$u({ref:nt},Ct,{InputProps:_extends$u({},Pt,{readOnly:Et}),inputProps:_extends$u({},jt.inputProps,{inputMode:At,onPaste:St,onKeyDown:Tt,ref:kt})}))}),getPickersFadeTransitionGroupUtilityClass=tt=>generateUtilityClass("MuiPickersFadeTransitionGroup",tt);generateUtilityClasses("MuiPickersFadeTransitionGroup",["root"]);const useUtilityClasses$7=tt=>{const{classes:et}=tt;return composeClasses({root:["root"]},getPickersFadeTransitionGroupUtilityClass,et)},PickersFadeTransitionGroupRoot=styled$1(TransitionGroup$1,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"block",position:"relative"});function PickersFadeTransitionGroup(tt){const et=useThemeProps({props:tt,name:"MuiPickersFadeTransitionGroup"}),{children:nt,className:rt,reduceAnimations:it,transKey:ot}=et,at=useUtilityClasses$7(et),st=useTheme();return it?nt:jsxRuntimeExports.jsx(PickersFadeTransitionGroupRoot,{className:clsx(at.root,rt),children:jsxRuntimeExports.jsx(Fade$1,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:st.transitions.duration.enteringScreen,enter:st.transitions.duration.enteringScreen,exit:0},children:nt},ot)})}function getPickersMonthUtilityClass(tt){return generateUtilityClass("MuiPickersMonth",tt)}const pickersMonthClasses=generateUtilityClasses("MuiPickersMonth",["root","monthButton","disabled","selected"]),_excluded$s=["autoFocus","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow"],useUtilityClasses$6=tt=>{const{disabled:et,selected:nt,classes:rt}=tt;return composeClasses({root:["root"],monthButton:["monthButton",et&&"disabled",nt&&"selected"]},getPickersMonthUtilityClass,rt)},PickersMonthRoot=styled$1("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(tt,et)=>[et.root]})(({ownerState:tt})=>({flexBasis:tt.monthsPerRow===3?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"})),PickersMonthButton=styled$1("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(tt,et)=>[et.monthButton,{[`&.${pickersMonthClasses.disabled}`]:et.disabled},{[`&.${pickersMonthClasses.selected}`]:et.selected}]})(({theme:tt})=>_extends$u({color:"unset",backgroundColor:"transparent",border:0,outline:0},tt.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette.action.active,tt.palette.action.hoverOpacity)},"&:hover":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette.action.active,tt.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${pickersMonthClasses.disabled}`]:{color:(tt.vars||tt).palette.text.secondary},[`&.${pickersMonthClasses.selected}`]:{color:(tt.vars||tt).palette.primary.contrastText,backgroundColor:(tt.vars||tt).palette.primary.main,"&:focus, &:hover":{backgroundColor:(tt.vars||tt).palette.primary.dark}}})),PickersMonth=reactExports.memo(function(et){const nt=useThemeProps({props:et,name:"MuiPickersMonth"}),{autoFocus:rt,children:it,disabled:ot,selected:at,value:st,tabIndex:lt,onClick:ct,onKeyDown:ut,onFocus:ht,onBlur:dt,"aria-current":pt,"aria-label":mt}=nt,gt=_objectWithoutPropertiesLoose$m(nt,_excluded$s),yt=reactExports.useRef(null),bt=useUtilityClasses$6(nt);return useEnhancedEffect$1(()=>{if(rt){var vt;(vt=yt.current)==null||vt.focus()}},[rt]),jsxRuntimeExports.jsx(PickersMonthRoot,_extends$u({className:bt.root,ownerState:nt},gt,{children:jsxRuntimeExports.jsx(PickersMonthButton,{ref:yt,disabled:ot,type:"button",role:"radio",tabIndex:ot?-1:lt,"aria-current":pt,"aria-checked":at,"aria-label":mt,onClick:vt=>ct(vt,st),onKeyDown:vt=>ut(vt,st),onFocus:vt=>ht(vt,st),onBlur:vt=>dt(vt,st),className:bt.monthButton,ownerState:nt,children:it})}))});function getMonthCalendarUtilityClass(tt){return generateUtilityClass("MuiMonthCalendar",tt)}generateUtilityClasses("MuiMonthCalendar",["root"]);const _excluded$r=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId"],useUtilityClasses$5=tt=>{const{classes:et}=tt;return composeClasses({root:["root"]},getMonthCalendarUtilityClass,et)};function useMonthCalendarDefaultizedProps(tt,et){const nt=useUtils(),rt=useDefaultDates(),it=useThemeProps({props:tt,name:et});return _extends$u({disableFuture:!1,disablePast:!1},it,{minDate:applyDefaultDate(nt,it.minDate,rt.minDate),maxDate:applyDefaultDate(nt,it.maxDate,rt.maxDate)})}const MonthCalendarRoot=styled$1("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:DIALOG_WIDTH,boxSizing:"border-box"}),MonthCalendar=reactExports.forwardRef(function(et,nt){const rt=useMonthCalendarDefaultizedProps(et,"MuiMonthCalendar"),{className:it,value:ot,defaultValue:at,referenceDate:st,disabled:lt,disableFuture:ct,disablePast:ut,maxDate:ht,minDate:dt,onChange:pt,shouldDisableMonth:mt,readOnly:gt,disableHighlightToday:yt,autoFocus:bt=!1,onMonthFocus:vt,hasFocus:xt,onFocusedViewChange:kt,monthsPerRow:St=3,timezone:Tt,gridLabelId:At}=rt,Et=_objectWithoutPropertiesLoose$m(rt,_excluded$r),{value:$t,handleValueChange:Dt,timezone:jt}=useControlledValueWithTimezone({name:"MonthCalendar",timezone:Tt,value:ot,defaultValue:at,onChange:pt,valueManager:singleItemValueManager}),Pt=useNow(jt),Ct=useTheme$2(),wt=useUtils(),It=reactExports.useMemo(()=>singleItemValueManager.getInitialReferenceValue({value:$t,utils:wt,props:rt,timezone:jt,referenceDate:st,granularity:SECTION_TYPE_GRANULARITY.month}),[]),Ot=rt,Wt=useUtilityClasses$5(Ot),zt=reactExports.useMemo(()=>wt.getMonth(Pt),[wt,Pt]),Ft=reactExports.useMemo(()=>$t!=null?wt.getMonth($t):yt?null:wt.getMonth(It),[$t,wt,yt,It]),[Nt,Ut]=reactExports.useState(()=>Ft||zt),[Mt,Ht]=useControlled({name:"MonthCalendar",state:"hasFocus",controlled:xt,default:bt??!1}),en=useEventCallback(an=>{Ht(an),kt&&kt(an)}),sn=reactExports.useCallback(an=>{const Qt=wt.startOfMonth(ut&&wt.isAfter(Pt,dt)?Pt:dt),_n=wt.startOfMonth(ct&&wt.isBefore(Pt,ht)?Pt:ht),Pn=wt.startOfMonth(an);return wt.isBefore(Pn,Qt)||wt.isAfter(Pn,_n)?!0:mt?mt(Pn):!1},[ct,ut,ht,dt,Pt,mt,wt]),Kt=useEventCallback((an,Qt)=>{if(gt)return;const _n=wt.setMonth($t??It,Qt);Dt(_n)}),rn=useEventCallback(an=>{sn(wt.setMonth($t??It,an))||(Ut(an),en(!0),vt&&vt(an))});reactExports.useEffect(()=>{Ut(an=>Ft!==null&&an!==Ft?Ft:an)},[Ft]);const nn=useEventCallback((an,Qt)=>{switch(an.key){case"ArrowUp":rn((12+Qt-3)%12),an.preventDefault();break;case"ArrowDown":rn((12+Qt+3)%12),an.preventDefault();break;case"ArrowLeft":rn((12+Qt+(Ct.direction==="ltr"?-1:1))%12),an.preventDefault();break;case"ArrowRight":rn((12+Qt+(Ct.direction==="ltr"?1:-1))%12),an.preventDefault();break}}),hn=useEventCallback((an,Qt)=>{rn(Qt)}),vn=useEventCallback((an,Qt)=>{Nt===Qt&&en(!1)});return jsxRuntimeExports.jsx(MonthCalendarRoot,_extends$u({ref:nt,className:clsx(Wt.root,it),ownerState:Ot,role:"radiogroup","aria-labelledby":At},Et,{children:getMonthsInYear(wt,$t??It).map(an=>{const Qt=wt.getMonth(an),_n=wt.format(an,"monthShort"),Pn=wt.format(an,"month"),$n=Qt===Ft,Nn=lt||sn(an);return jsxRuntimeExports.jsx(PickersMonth,{selected:$n,value:Qt,onClick:Kt,onKeyDown:nn,autoFocus:Mt&&Qt===Nt,disabled:Nn,tabIndex:Qt===Nt?0:-1,onFocus:hn,onBlur:vn,"aria-current":zt===Qt?"date":void 0,"aria-label":Pn,monthsPerRow:St,children:_n},_n)})}))});function getPickersYearUtilityClass(tt){return generateUtilityClass("MuiPickersYear",tt)}const pickersYearClasses=generateUtilityClasses("MuiPickersYear",["root","yearButton","selected","disabled"]),_excluded$q=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow"],useUtilityClasses$4=tt=>{const{disabled:et,selected:nt,classes:rt}=tt;return composeClasses({root:["root"],yearButton:["yearButton",et&&"disabled",nt&&"selected"]},getPickersYearUtilityClass,rt)},PickersYearRoot=styled$1("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(tt,et)=>[et.root]})(({ownerState:tt})=>({flexBasis:tt.yearsPerRow===3?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"})),PickersYearButton=styled$1("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(tt,et)=>[et.yearButton,{[`&.${pickersYearClasses.disabled}`]:et.disabled},{[`&.${pickersYearClasses.selected}`]:et.selected}]})(({theme:tt})=>_extends$u({color:"unset",backgroundColor:"transparent",border:0,outline:0},tt.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.focusOpacity})`:alpha$1(tt.palette.action.active,tt.palette.action.focusOpacity)},"&:hover":{backgroundColor:tt.vars?`rgba(${tt.vars.palette.action.activeChannel} / ${tt.vars.palette.action.hoverOpacity})`:alpha$1(tt.palette.action.active,tt.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${pickersYearClasses.disabled}`]:{color:(tt.vars||tt).palette.text.secondary},[`&.${pickersYearClasses.selected}`]:{color:(tt.vars||tt).palette.primary.contrastText,backgroundColor:(tt.vars||tt).palette.primary.main,"&:focus, &:hover":{backgroundColor:(tt.vars||tt).palette.primary.dark}}})),PickersYear=reactExports.memo(function(et){const nt=useThemeProps({props:et,name:"MuiPickersYear"}),{autoFocus:rt,className:it,children:ot,disabled:at,selected:st,value:lt,tabIndex:ct,onClick:ut,onKeyDown:ht,onFocus:dt,onBlur:pt,"aria-current":mt}=nt,gt=_objectWithoutPropertiesLoose$m(nt,_excluded$q),yt=reactExports.useRef(null),bt=useUtilityClasses$4(nt);return reactExports.useEffect(()=>{rt&&yt.current.focus()},[rt]),jsxRuntimeExports.jsx(PickersYearRoot,_extends$u({className:clsx(bt.root,it),ownerState:nt},gt,{children:jsxRuntimeExports.jsx(PickersYearButton,{ref:yt,disabled:at,type:"button",role:"radio",tabIndex:at?-1:ct,"aria-current":mt,"aria-checked":st,onClick:vt=>ut(vt,lt),onKeyDown:vt=>ht(vt,lt),onFocus:vt=>dt(vt,lt),onBlur:vt=>pt(vt,lt),className:bt.yearButton,ownerState:nt,children:ot})}))});function getYearCalendarUtilityClass(tt){return generateUtilityClass("MuiYearCalendar",tt)}generateUtilityClasses("MuiYearCalendar",["root"]);const _excluded$p=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsPerRow","timezone","gridLabelId"],useUtilityClasses$3=tt=>{const{classes:et}=tt;return composeClasses({root:["root"]},getYearCalendarUtilityClass,et)};function useYearCalendarDefaultizedProps(tt,et){var nt;const rt=useUtils(),it=useDefaultDates(),ot=useThemeProps({props:tt,name:et});return _extends$u({disablePast:!1,disableFuture:!1},ot,{yearsPerRow:(nt=ot.yearsPerRow)!=null?nt:3,minDate:applyDefaultDate(rt,ot.minDate,it.minDate),maxDate:applyDefaultDate(rt,ot.maxDate,it.maxDate)})}const YearCalendarRoot=styled$1("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:DIALOG_WIDTH,maxHeight:MAX_CALENDAR_HEIGHT,boxSizing:"border-box",position:"relative"}),YearCalendar=reactExports.forwardRef(function(et,nt){const rt=useYearCalendarDefaultizedProps(et,"MuiYearCalendar"),{autoFocus:it,className:ot,value:at,defaultValue:st,referenceDate:lt,disabled:ct,disableFuture:ut,disablePast:ht,maxDate:dt,minDate:pt,onChange:mt,readOnly:gt,shouldDisableYear:yt,disableHighlightToday:bt,onYearFocus:vt,hasFocus:xt,onFocusedViewChange:kt,yearsPerRow:St,timezone:Tt,gridLabelId:At}=rt,Et=_objectWithoutPropertiesLoose$m(rt,_excluded$p),{value:$t,handleValueChange:Dt,timezone:jt}=useControlledValueWithTimezone({name:"YearCalendar",timezone:Tt,value:at,defaultValue:st,onChange:mt,valueManager:singleItemValueManager}),Pt=useNow(jt),Ct=useTheme$2(),wt=useUtils(),It=reactExports.useMemo(()=>singleItemValueManager.getInitialReferenceValue({value:$t,utils:wt,props:rt,timezone:jt,referenceDate:lt,granularity:SECTION_TYPE_GRANULARITY.year}),[]),Ot=rt,Wt=useUtilityClasses$3(Ot),zt=reactExports.useMemo(()=>wt.getYear(Pt),[wt,Pt]),Ft=reactExports.useMemo(()=>$t!=null?wt.getYear($t):bt?null:wt.getYear(It),[$t,wt,bt,It]),[Nt,Ut]=reactExports.useState(()=>Ft||zt),[Mt,Ht]=useControlled({name:"YearCalendar",state:"hasFocus",controlled:xt,default:it??!1}),en=useEventCallback(_n=>{Ht(_n),kt&&kt(_n)}),sn=reactExports.useCallback(_n=>{if(ht&&wt.isBeforeYear(_n,Pt)||ut&&wt.isAfterYear(_n,Pt)||pt&&wt.isBeforeYear(_n,pt)||dt&&wt.isAfterYear(_n,dt))return!0;if(!yt)return!1;const Pn=wt.startOfYear(_n);return yt(Pn)},[ut,ht,dt,pt,Pt,yt,wt]),Kt=useEventCallback((_n,Pn)=>{if(gt)return;const $n=wt.setYear($t??It,Pn);Dt($n)}),rn=useEventCallback(_n=>{sn(wt.setYear($t??It,_n))||(Ut(_n),en(!0),vt==null||vt(_n))});reactExports.useEffect(()=>{Ut(_n=>Ft!==null&&_n!==Ft?Ft:_n)},[Ft]);const nn=useEventCallback((_n,Pn)=>{switch(_n.key){case"ArrowUp":rn(Pn-St),_n.preventDefault();break;case"ArrowDown":rn(Pn+St),_n.preventDefault();break;case"ArrowLeft":rn(Pn+(Ct.direction==="ltr"?-1:1)),_n.preventDefault();break;case"ArrowRight":rn(Pn+(Ct.direction==="ltr"?1:-1)),_n.preventDefault();break}}),hn=useEventCallback((_n,Pn)=>{rn(Pn)}),vn=useEventCallback((_n,Pn)=>{Nt===Pn&&en(!1)}),an=reactExports.useRef(null),Qt=useForkRef(nt,an);return reactExports.useEffect(()=>{if(it||an.current===null)return;const _n=an.current.querySelector('[tabindex="0"]');if(!_n)return;const Pn=_n.offsetHeight,$n=_n.offsetTop,Nn=an.current.clientHeight,Tn=an.current.scrollTop,cn=$n+Pn;Pn>Nn||$n{const Pn=wt.getYear(_n),$n=Pn===Ft,Nn=ct||sn(_n);return jsxRuntimeExports.jsx(PickersYear,{selected:$n,value:Pn,onClick:Kt,onKeyDown:nn,autoFocus:Mt&&Pn===Nt,disabled:Nn,tabIndex:Pn===Nt?0:-1,onFocus:hn,onBlur:vn,"aria-current":zt===Pn?"date":void 0,yearsPerRow:St,children:wt.format(_n,"year")},wt.format(_n,"year"))})}))}),getPickersCalendarHeaderUtilityClass=tt=>generateUtilityClass("MuiPickersCalendarHeader",tt),pickersCalendarHeaderClasses=generateUtilityClasses("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),_excluded$o=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone"],_excluded2$7=["ownerState"],useUtilityClasses$2=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},getPickersCalendarHeaderUtilityClass,et)},PickersCalendarHeaderRoot=styled$1("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30}),PickersCalendarHeaderLabelContainer=styled$1("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(tt,et)=>et.labelContainer})(({theme:tt})=>_extends$u({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},tt.typography.body1,{fontWeight:tt.typography.fontWeightMedium})),PickersCalendarHeaderLabel=styled$1("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(tt,et)=>et.label})({marginRight:6}),PickersCalendarHeaderSwitchViewButton=styled$1(IconButton$2,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(tt,et)=>et.switchViewButton})(({ownerState:tt})=>_extends$u({marginRight:"auto"},tt.view==="year"&&{[`.${pickersCalendarHeaderClasses.switchViewIcon}`]:{transform:"rotate(180deg)"}})),PickersCalendarHeaderSwitchViewIcon=styled$1(ArrowDropDownIcon,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(tt,et)=>et.switchViewIcon})(({theme:tt})=>({willChange:"transform",transition:tt.transitions.create("transform"),transform:"rotate(0deg)"})),PickersCalendarHeader=reactExports.forwardRef(function(et,nt){var rt,it;const ot=useLocaleText(),at=useUtils(),st=useThemeProps({props:et,name:"MuiPickersCalendarHeader"}),{slots:lt,slotProps:ct,currentMonth:ut,disabled:ht,disableFuture:dt,disablePast:pt,maxDate:mt,minDate:gt,onMonthChange:yt,onViewChange:bt,view:vt,reduceAnimations:xt,views:kt,labelId:St,className:Tt,timezone:At}=st,Et=_objectWithoutPropertiesLoose$m(st,_excluded$o),$t=st,Dt=useUtilityClasses$2(st),jt=(rt=lt==null?void 0:lt.switchViewButton)!=null?rt:PickersCalendarHeaderSwitchViewButton,Pt=useSlotProps({elementType:jt,externalSlotProps:ct==null?void 0:ct.switchViewButton,additionalProps:{size:"small","aria-label":ot.calendarViewSwitchingButtonAriaLabel(vt)},ownerState:$t,className:Dt.switchViewButton}),Ct=(it=lt==null?void 0:lt.switchViewIcon)!=null?it:PickersCalendarHeaderSwitchViewIcon,wt=useSlotProps({elementType:Ct,externalSlotProps:ct==null?void 0:ct.switchViewIcon,ownerState:void 0,className:Dt.switchViewIcon}),It=_objectWithoutPropertiesLoose$m(wt,_excluded2$7),Ot=()=>yt(at.addMonths(ut,1),"left"),Wt=()=>yt(at.addMonths(ut,-1),"right"),zt=useNextMonthDisabled(ut,{disableFuture:dt,maxDate:mt,timezone:At}),Ft=usePreviousMonthDisabled(ut,{disablePast:pt,minDate:gt,timezone:At}),Nt=()=>{if(!(kt.length===1||!bt||ht))if(kt.length===2)bt(kt.find(Ut=>Ut!==vt)||kt[0]);else{const Ut=kt.indexOf(vt)!==0?0:1;bt(kt[Ut])}};return kt.length===1&&kt[0]==="year"?null:jsxRuntimeExports.jsxs(PickersCalendarHeaderRoot,_extends$u({},Et,{ownerState:$t,className:clsx(Tt,Dt.root),ref:nt,children:[jsxRuntimeExports.jsxs(PickersCalendarHeaderLabelContainer,{role:"presentation",onClick:Nt,ownerState:$t,"aria-live":"polite",className:Dt.labelContainer,children:[jsxRuntimeExports.jsx(PickersFadeTransitionGroup,{reduceAnimations:xt,transKey:at.format(ut,"monthAndYear"),children:jsxRuntimeExports.jsx(PickersCalendarHeaderLabel,{id:St,ownerState:$t,className:Dt.label,children:at.format(ut,"monthAndYear")})}),kt.length>1&&!ht&&jsxRuntimeExports.jsx(jt,_extends$u({},Pt,{children:jsxRuntimeExports.jsx(Ct,_extends$u({},It))}))]}),jsxRuntimeExports.jsx(Fade$1,{in:vt==="day",children:jsxRuntimeExports.jsx(PickersArrowSwitcher,{slots:lt,slotProps:ct,onGoToPrevious:Wt,isPreviousDisabled:Ft,previousLabel:ot.previousMonth,onGoToNext:Ot,isNextDisabled:zt,nextLabel:ot.nextMonth})})]}))}),getDateCalendarUtilityClass=tt=>generateUtilityClass("MuiDateCalendar",tt);generateUtilityClasses("MuiDateCalendar",["root","viewTransitionContainer"]);const _excluded$n=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","defaultCalendarMonth","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","components","componentsProps","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsPerRow","monthsPerRow","timezone"],useUtilityClasses$1=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},getDateCalendarUtilityClass,et)};function useDateCalendarDefaultizedProps(tt,et){var nt,rt,it,ot,at,st,lt;const ct=useUtils(),ut=useDefaultDates(),ht=useDefaultReduceAnimations(),dt=useThemeProps({props:tt,name:et});return _extends$u({},dt,{loading:(nt=dt.loading)!=null?nt:!1,disablePast:(rt=dt.disablePast)!=null?rt:!1,disableFuture:(it=dt.disableFuture)!=null?it:!1,openTo:(ot=dt.openTo)!=null?ot:"day",views:(at=dt.views)!=null?at:["year","day"],reduceAnimations:(st=dt.reduceAnimations)!=null?st:ht,renderLoading:(lt=dt.renderLoading)!=null?lt:()=>jsxRuntimeExports.jsx("span",{children:"..."}),minDate:applyDefaultDate(ct,dt.minDate,ut.minDate),maxDate:applyDefaultDate(ct,dt.maxDate,ut.maxDate)})}const DateCalendarRoot=styled$1(PickerViewRoot,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(tt,et)=>et.root})({display:"flex",flexDirection:"column",height:VIEW_HEIGHT}),DateCalendarViewTransitionContainer=styled$1(PickersFadeTransitionGroup,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(tt,et)=>et.viewTransitionContainer})({}),DateCalendar=reactExports.forwardRef(function(et,nt){var rt,it,ot;const at=useUtils(),st=useId(),lt=useDateCalendarDefaultizedProps(et,"MuiDateCalendar"),{autoFocus:ct,onViewChange:ut,value:ht,defaultValue:dt,referenceDate:pt,disableFuture:mt,disablePast:gt,defaultCalendarMonth:yt,onChange:bt,onYearChange:vt,onMonthChange:xt,reduceAnimations:kt,shouldDisableDate:St,shouldDisableMonth:Tt,shouldDisableYear:At,view:Et,views:$t,openTo:Dt,className:jt,disabled:Pt,readOnly:Ct,minDate:wt,maxDate:It,disableHighlightToday:Ot,focusedView:Wt,onFocusedViewChange:zt,showDaysOutsideCurrentMonth:Ft,fixedWeekNumber:Nt,dayOfWeekFormatter:Ut,components:Mt,componentsProps:Ht,slots:en,slotProps:sn,loading:Kt,renderLoading:rn,displayWeekNumber:nn,yearsPerRow:hn,monthsPerRow:vn,timezone:an}=lt,Qt=_objectWithoutPropertiesLoose$m(lt,_excluded$n),{value:_n,handleValueChange:Pn,timezone:$n}=useControlledValueWithTimezone({name:"DateCalendar",timezone:an,value:ht,defaultValue:dt,onChange:bt,valueManager:singleItemValueManager}),{view:Nn,setView:Tn,focusedView:cn,setFocusedView:mn,goToNextView:In,setValueAndGoToNextView:An}=useViews({view:Et,views:$t,openTo:Dt,onChange:Pn,onViewChange:ut,autoFocus:ct,focusedView:Wt,onFocusedViewChange:zt}),{referenceDate:wn,calendarState:fn,changeFocusedDay:pn,changeMonth:kn,handleChangeMonth:Dn,isDateDisabled:un,onMonthSwitchingAnimationEnd:Zt}=useCalendarState({value:_n,defaultCalendarMonth:yt,referenceDate:pt,reduceAnimations:kt,onMonthChange:xt,minDate:wt,maxDate:It,shouldDisableDate:St,disablePast:gt,disableFuture:mt,timezone:$n}),Xt=Pt&&_n||wt,Sn=Pt&&_n||It,Rn=`${st}-grid-label`,jn=cn!==null,On=(rt=(it=en==null?void 0:en.calendarHeader)!=null?it:Mt==null?void 0:Mt.CalendarHeader)!=null?rt:PickersCalendarHeader,Zn=useSlotProps({elementType:On,externalSlotProps:(ot=sn==null?void 0:sn.calendarHeader)!=null?ot:Ht==null?void 0:Ht.calendarHeader,additionalProps:{views:$t,view:Nn,currentMonth:fn.currentMonth,onViewChange:Tn,onMonthChange:(Tr,Ar)=>Dn({newMonth:Tr,direction:Ar}),minDate:Xt,maxDate:Sn,disabled:Pt,disablePast:gt,disableFuture:mt,reduceAnimations:kt,timezone:$n,labelId:Rn,slots:en,slotProps:sn},ownerState:lt}),Vn=useEventCallback(Tr=>{const Ar=at.startOfMonth(Tr),qr=at.endOfMonth(Tr),jr=un(Tr)?findClosestEnabledDate({utils:at,date:Tr,minDate:at.isBefore(wt,Ar)?Ar:wt,maxDate:at.isAfter(It,qr)?qr:It,disablePast:gt,disableFuture:mt,isDateDisabled:un,timezone:$n}):Tr;jr?(An(jr,"finish"),xt==null||xt(Ar)):(In(),kn(Ar)),pn(jr,!0)}),qn=useEventCallback(Tr=>{const Ar=at.startOfYear(Tr),qr=at.endOfYear(Tr),jr=un(Tr)?findClosestEnabledDate({utils:at,date:Tr,minDate:at.isBefore(wt,Ar)?Ar:wt,maxDate:at.isAfter(It,qr)?qr:It,disablePast:gt,disableFuture:mt,isDateDisabled:un,timezone:$n}):Tr;jr?(An(jr,"finish"),vt==null||vt(jr)):(In(),kn(Ar)),pn(jr,!0)}),zn=useEventCallback(Tr=>Pn(Tr&&mergeDateAndTime(at,Tr,_n??wn),"finish"));reactExports.useEffect(()=>{_n!=null&&at.isValid(_n)&&kn(_n)},[_n]);const Jn=lt,Hn=useUtilityClasses$1(Jn),pr={disablePast:gt,disableFuture:mt,maxDate:It,minDate:wt},fr={disableHighlightToday:Ot,readOnly:Ct,disabled:Pt,timezone:$n,gridLabelId:Rn},xr=reactExports.useRef(Nn);reactExports.useEffect(()=>{xr.current!==Nn&&(cn===xr.current&&mn(Nn,!0),xr.current=Nn)},[cn,mn,Nn]);const io=reactExports.useMemo(()=>[_n],[_n]);return jsxRuntimeExports.jsxs(DateCalendarRoot,_extends$u({ref:nt,className:clsx(Hn.root,jt),ownerState:Jn},Qt,{children:[jsxRuntimeExports.jsx(On,_extends$u({},Zn)),jsxRuntimeExports.jsx(DateCalendarViewTransitionContainer,{reduceAnimations:kt,className:Hn.viewTransitionContainer,transKey:Nn,ownerState:Jn,children:jsxRuntimeExports.jsxs("div",{children:[Nn==="year"&&jsxRuntimeExports.jsx(YearCalendar,_extends$u({},pr,fr,{value:_n,onChange:qn,shouldDisableYear:At,hasFocus:jn,onFocusedViewChange:Tr=>mn("year",Tr),yearsPerRow:hn,referenceDate:wn})),Nn==="month"&&jsxRuntimeExports.jsx(MonthCalendar,_extends$u({},pr,fr,{hasFocus:jn,className:jt,value:_n,onChange:Vn,shouldDisableMonth:Tt,onFocusedViewChange:Tr=>mn("month",Tr),monthsPerRow:vn,referenceDate:wn})),Nn==="day"&&jsxRuntimeExports.jsx(DayCalendar,_extends$u({},fn,pr,fr,{onMonthSwitchingAnimationEnd:Zt,onFocusedDayChange:pn,reduceAnimations:kt,selectedDays:io,onSelectedDaysChange:zn,shouldDisableDate:St,shouldDisableMonth:Tt,shouldDisableYear:At,hasFocus:jn,onFocusedViewChange:Tr=>mn("day",Tr),showDaysOutsideCurrentMonth:Ft,fixedWeekNumber:Nt,dayOfWeekFormatter:Ut,displayWeekNumber:nn,components:Mt,componentsProps:Ht,slots:en,slotProps:sn,loading:Kt,renderLoading:rn}))]})})]}))});function getDatePickerToolbarUtilityClass(tt){return generateUtilityClass("MuiDatePickerToolbar",tt)}generateUtilityClasses("MuiDatePickerToolbar",["root","title"]);const _excluded$m=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views"],useUtilityClasses=tt=>{const{classes:et}=tt;return composeClasses({root:["root"],title:["title"]},getDatePickerToolbarUtilityClass,et)},DatePickerToolbarRoot=styled$1(PickersToolbar,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(tt,et)=>et.root})({}),DatePickerToolbarTitle=styled$1(Typography$1,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(tt,et)=>et.title})(({ownerState:tt})=>_extends$u({},tt.isLandscape&&{margin:"auto 16px auto auto"})),DatePickerToolbar=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDatePickerToolbar"}),{value:it,isLandscape:ot,toolbarFormat:at,toolbarPlaceholder:st="––",views:lt}=rt,ct=_objectWithoutPropertiesLoose$m(rt,_excluded$m),ut=useUtils(),ht=useLocaleText(),dt=useUtilityClasses(rt),pt=reactExports.useMemo(()=>{if(!it)return st;const gt=resolveDateFormat(ut,{format:at,views:lt},!0);return ut.formatByString(it,gt)},[it,at,st,ut,lt]),mt=rt;return jsxRuntimeExports.jsx(DatePickerToolbarRoot,_extends$u({ref:nt,toolbarTitle:ht.datePickerToolbarTitle,isLandscape:ot,className:dt.root},ct,{children:jsxRuntimeExports.jsx(DatePickerToolbarTitle,{variant:"h4",align:ot?"left":"center",ownerState:mt,className:dt.title,children:pt})}))});function useDatePickerDefaultizedProps(tt,et){var nt,rt,it,ot;const at=useUtils(),st=useDefaultDates(),lt=useThemeProps({props:tt,name:et}),ct=reactExports.useMemo(()=>{var ht;return((ht=lt.localeText)==null?void 0:ht.toolbarTitle)==null?lt.localeText:_extends$u({},lt.localeText,{datePickerToolbarTitle:lt.localeText.toolbarTitle})},[lt.localeText]),ut=(nt=lt.slots)!=null?nt:uncapitalizeObjectKeys(lt.components);return _extends$u({},lt,{localeText:ct},applyDefaultViewProps({views:lt.views,openTo:lt.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:(rt=lt.disableFuture)!=null?rt:!1,disablePast:(it=lt.disablePast)!=null?it:!1,minDate:applyDefaultDate(at,lt.minDate,st.minDate),maxDate:applyDefaultDate(at,lt.maxDate,st.maxDate),slots:_extends$u({toolbar:DatePickerToolbar},ut),slotProps:(ot=lt.slotProps)!=null?ot:lt.componentsProps})}const _excluded$l=["props","getOpenDialogAriaText"],_excluded2$6=["ownerState"],_excluded3$1=["ownerState"],useDesktopPicker=tt=>{var et,nt,rt,it,ot;let{props:at,getOpenDialogAriaText:st}=tt,lt=_objectWithoutPropertiesLoose$m(tt,_excluded$l);const{slots:ct,slotProps:ut,className:ht,sx:dt,format:pt,formatDensity:mt,timezone:gt,label:yt,inputRef:bt,readOnly:vt,disabled:xt,autoFocus:kt,localeText:St,reduceAnimations:Tt}=at,At=useUtils(),Et=reactExports.useRef(null),$t=reactExports.useRef(null),Dt=useId(),jt=(et=ut==null||(nt=ut.toolbar)==null?void 0:nt.hidden)!=null?et:!1,{open:Pt,actions:Ct,hasUIView:wt,layoutProps:It,renderCurrentView:Ot,shouldRestoreFocus:Wt,fieldProps:zt}=usePicker(_extends$u({},lt,{props:at,inputRef:Et,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),Ft=(rt=ct.inputAdornment)!=null?rt:MuiInputAdornment,Nt=useSlotProps({elementType:Ft,externalSlotProps:ut==null?void 0:ut.inputAdornment,additionalProps:{position:"end"},ownerState:at}),Ut=_objectWithoutPropertiesLoose$m(Nt,_excluded2$6),Mt=(it=ct.openPickerButton)!=null?it:IconButton$2,Ht=useSlotProps({elementType:Mt,externalSlotProps:ut==null?void 0:ut.openPickerButton,additionalProps:{disabled:xt||vt,onClick:Pt?Ct.onClose:Ct.onOpen,"aria-label":st(zt.value,At),edge:Ut.position},ownerState:at}),en=_objectWithoutPropertiesLoose$m(Ht,_excluded3$1),sn=ct.openPickerIcon,Kt=ct.field,rn=useSlotProps({elementType:Kt,externalSlotProps:ut==null?void 0:ut.field,additionalProps:_extends$u({},zt,jt&&{id:Dt},{readOnly:vt,disabled:xt,className:ht,sx:dt,format:pt,formatDensity:mt,timezone:gt,label:yt,autoFocus:kt&&!at.open,focused:Pt?!0:void 0}),ownerState:at});wt&&(rn.InputProps=_extends$u({},rn.InputProps,{ref:$t,[`${Ut.position}Adornment`]:jsxRuntimeExports.jsx(Ft,_extends$u({},Ut,{children:jsxRuntimeExports.jsx(Mt,_extends$u({},en,{children:jsxRuntimeExports.jsx(sn,_extends$u({},ut==null?void 0:ut.openPickerIcon))}))}))}));const nn=_extends$u({textField:ct.textField,clearIcon:ct.clearIcon,clearButton:ct.clearButton},rn.slots),hn=(ot=ct.layout)!=null?ot:PickersLayout,vn=useForkRef(Et,rn.inputRef,bt);let an=Dt;jt&&(yt?an=`${Dt}-label`:an=void 0);const Qt=_extends$u({},ut,{toolbar:_extends$u({},ut==null?void 0:ut.toolbar,{titleId:Dt}),popper:_extends$u({"aria-labelledby":an},ut==null?void 0:ut.popper)});return{renderPicker:()=>jsxRuntimeExports.jsxs(LocalizationProvider,{localeText:St,children:[jsxRuntimeExports.jsx(Kt,_extends$u({},rn,{slots:nn,slotProps:Qt,inputRef:vn})),jsxRuntimeExports.jsx(PickersPopper,_extends$u({role:"dialog",placement:"bottom-start",anchorEl:$t.current},Ct,{open:Pt,slots:ct,slotProps:Qt,shouldRestoreFocus:Wt,reduceAnimations:Tt,children:jsxRuntimeExports.jsx(hn,_extends$u({},It,Qt==null?void 0:Qt.layout,{slots:ct,slotProps:Qt,children:Ot()}))}))]})}},renderDateViewCalendar=({view:tt,onViewChange:et,views:nt,focusedView:rt,onFocusedViewChange:it,value:ot,defaultValue:at,referenceDate:st,onChange:lt,className:ct,classes:ut,disableFuture:ht,disablePast:dt,minDate:pt,maxDate:mt,shouldDisableDate:gt,shouldDisableMonth:yt,shouldDisableYear:bt,reduceAnimations:vt,onMonthChange:xt,monthsPerRow:kt,onYearChange:St,yearsPerRow:Tt,defaultCalendarMonth:At,components:Et,componentsProps:$t,slots:Dt,slotProps:jt,loading:Pt,renderLoading:Ct,disableHighlightToday:wt,readOnly:It,disabled:Ot,showDaysOutsideCurrentMonth:Wt,dayOfWeekFormatter:zt,sx:Ft,autoFocus:Nt,fixedWeekNumber:Ut,displayWeekNumber:Mt,timezone:Ht})=>jsxRuntimeExports.jsx(DateCalendar,{view:tt,onViewChange:et,views:nt.filter(isDatePickerView),focusedView:rt&&isDatePickerView(rt)?rt:null,onFocusedViewChange:it,value:ot,defaultValue:at,referenceDate:st,onChange:lt,className:ct,classes:ut,disableFuture:ht,disablePast:dt,minDate:pt,maxDate:mt,shouldDisableDate:gt,shouldDisableMonth:yt,shouldDisableYear:bt,reduceAnimations:vt,onMonthChange:xt,monthsPerRow:kt,onYearChange:St,yearsPerRow:Tt,defaultCalendarMonth:At,components:Et,componentsProps:$t,slots:Dt,slotProps:jt,loading:Pt,renderLoading:Ct,disableHighlightToday:wt,readOnly:It,disabled:Ot,showDaysOutsideCurrentMonth:Wt,dayOfWeekFormatter:zt,sx:Ft,autoFocus:Nt,fixedWeekNumber:Ut,displayWeekNumber:Mt,timezone:Ht}),DesktopDatePicker=reactExports.forwardRef(function(et,nt){var rt,it,ot,at;const st=useLocaleText(),lt=useUtils(),ct=useDatePickerDefaultizedProps(et,"MuiDesktopDatePicker"),ut=_extends$u({day:renderDateViewCalendar,month:renderDateViewCalendar,year:renderDateViewCalendar},ct.viewRenderers),ht=_extends$u({},ct,{viewRenderers:ut,format:resolveDateFormat(lt,ct,!1),yearsPerRow:(rt=ct.yearsPerRow)!=null?rt:4,slots:_extends$u({openPickerIcon:CalendarIcon,field:DateField},ct.slots),slotProps:_extends$u({},ct.slotProps,{field:pt=>{var mt;return _extends$u({},resolveComponentProps((mt=ct.slotProps)==null?void 0:mt.field,pt),extractValidationProps(ct),{ref:nt})},toolbar:_extends$u({hidden:!0},(it=ct.slotProps)==null?void 0:it.toolbar)})}),{renderPicker:dt}=useDesktopPicker({props:ht,valueManager:singleItemValueManager,valueType:"date",getOpenDialogAriaText:(ot=(at=ht.localeText)==null?void 0:at.openDatePickerDialogue)!=null?ot:st.openDatePickerDialogue,validator:validateDate});return dt()});DesktopDatePicker.propTypes={autoFocus:PropTypes.bool,className:PropTypes.string,closeOnSelect:PropTypes.bool,components:PropTypes.object,componentsProps:PropTypes.object,dayOfWeekFormatter:PropTypes.func,defaultCalendarMonth:PropTypes.any,defaultValue:PropTypes.any,disabled:PropTypes.bool,disableFuture:PropTypes.bool,disableHighlightToday:PropTypes.bool,disableOpenPicker:PropTypes.bool,disablePast:PropTypes.bool,displayWeekNumber:PropTypes.bool,fixedWeekNumber:PropTypes.number,format:PropTypes.string,formatDensity:PropTypes.oneOf(["dense","spacious"]),inputRef:refType$1,label:PropTypes.node,loading:PropTypes.bool,localeText:PropTypes.object,maxDate:PropTypes.any,minDate:PropTypes.any,monthsPerRow:PropTypes.oneOf([3,4]),onAccept:PropTypes.func,onChange:PropTypes.func,onClose:PropTypes.func,onError:PropTypes.func,onMonthChange:PropTypes.func,onOpen:PropTypes.func,onSelectedSectionsChange:PropTypes.func,onViewChange:PropTypes.func,onYearChange:PropTypes.func,open:PropTypes.bool,openTo:PropTypes.oneOf(["day","month","year"]),orientation:PropTypes.oneOf(["landscape","portrait"]),readOnly:PropTypes.bool,reduceAnimations:PropTypes.bool,referenceDate:PropTypes.any,renderLoading:PropTypes.func,selectedSections:PropTypes.oneOfType([PropTypes.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),PropTypes.number,PropTypes.shape({endIndex:PropTypes.number.isRequired,startIndex:PropTypes.number.isRequired})]),shouldDisableDate:PropTypes.func,shouldDisableMonth:PropTypes.func,shouldDisableYear:PropTypes.func,showDaysOutsideCurrentMonth:PropTypes.bool,slotProps:PropTypes.object,slots:PropTypes.object,sx:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func,PropTypes.object,PropTypes.bool])),PropTypes.func,PropTypes.object]),timezone:PropTypes.string,value:PropTypes.any,view:PropTypes.oneOf(["day","month","year"]),viewRenderers:PropTypes.shape({day:PropTypes.func,month:PropTypes.func,year:PropTypes.func}),views:PropTypes.arrayOf(PropTypes.oneOf(["day","month","year"]).isRequired),yearsPerRow:PropTypes.oneOf([3,4])};const _excluded$k=["props","getOpenDialogAriaText"],useMobilePicker=tt=>{var et,nt,rt;let{props:it,getOpenDialogAriaText:ot}=tt,at=_objectWithoutPropertiesLoose$m(tt,_excluded$k);const{slots:st,slotProps:lt,className:ct,sx:ut,format:ht,formatDensity:dt,timezone:pt,label:mt,inputRef:gt,readOnly:yt,disabled:bt,localeText:vt}=it,xt=useUtils(),kt=reactExports.useRef(null),St=useId(),Tt=(et=lt==null||(nt=lt.toolbar)==null?void 0:nt.hidden)!=null?et:!1,{open:At,actions:Et,layoutProps:$t,renderCurrentView:Dt,fieldProps:jt}=usePicker(_extends$u({},at,{props:it,inputRef:kt,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),Pt=st.field,Ct=useSlotProps({elementType:Pt,externalSlotProps:lt==null?void 0:lt.field,additionalProps:_extends$u({},jt,Tt&&{id:St},!(bt||yt)&&{onClick:Et.onOpen,onKeyDown:onSpaceOrEnter(Et.onOpen)},{readOnly:yt??!0,disabled:bt,className:ct,sx:ut,format:ht,formatDensity:dt,timezone:pt,label:mt}),ownerState:it});Ct.inputProps=_extends$u({},Ct.inputProps,{"aria-label":ot(jt.value,xt)});const wt=_extends$u({textField:st.textField},Ct.slots),It=(rt=st.layout)!=null?rt:PickersLayout,Ot=useForkRef(kt,Ct.inputRef,gt);let Wt=St;Tt&&(mt?Wt=`${St}-label`:Wt=void 0);const zt=_extends$u({},lt,{toolbar:_extends$u({},lt==null?void 0:lt.toolbar,{titleId:St}),mobilePaper:_extends$u({"aria-labelledby":Wt},lt==null?void 0:lt.mobilePaper)});return{renderPicker:()=>jsxRuntimeExports.jsxs(LocalizationProvider,{localeText:vt,children:[jsxRuntimeExports.jsx(Pt,_extends$u({},Ct,{slots:wt,slotProps:zt,inputRef:Ot})),jsxRuntimeExports.jsx(PickersModalDialog,_extends$u({},Et,{open:At,slots:st,slotProps:zt,children:jsxRuntimeExports.jsx(It,_extends$u({},$t,zt==null?void 0:zt.layout,{slots:st,slotProps:zt,children:Dt()}))}))]})}},MobileDatePicker=reactExports.forwardRef(function(et,nt){var rt,it,ot;const at=useLocaleText(),st=useUtils(),lt=useDatePickerDefaultizedProps(et,"MuiMobileDatePicker"),ct=_extends$u({day:renderDateViewCalendar,month:renderDateViewCalendar,year:renderDateViewCalendar},lt.viewRenderers),ut=_extends$u({},lt,{viewRenderers:ct,format:resolveDateFormat(st,lt,!1),slots:_extends$u({field:DateField},lt.slots),slotProps:_extends$u({},lt.slotProps,{field:dt=>{var pt;return _extends$u({},resolveComponentProps((pt=lt.slotProps)==null?void 0:pt.field,dt),extractValidationProps(lt),{ref:nt})},toolbar:_extends$u({hidden:!1},(rt=lt.slotProps)==null?void 0:rt.toolbar)})}),{renderPicker:ht}=useMobilePicker({props:ut,valueManager:singleItemValueManager,valueType:"date",getOpenDialogAriaText:(it=(ot=ut.localeText)==null?void 0:ot.openDatePickerDialogue)!=null?it:at.openDatePickerDialogue,validator:validateDate});return ht()});MobileDatePicker.propTypes={autoFocus:PropTypes.bool,className:PropTypes.string,closeOnSelect:PropTypes.bool,components:PropTypes.object,componentsProps:PropTypes.object,dayOfWeekFormatter:PropTypes.func,defaultCalendarMonth:PropTypes.any,defaultValue:PropTypes.any,disabled:PropTypes.bool,disableFuture:PropTypes.bool,disableHighlightToday:PropTypes.bool,disableOpenPicker:PropTypes.bool,disablePast:PropTypes.bool,displayWeekNumber:PropTypes.bool,fixedWeekNumber:PropTypes.number,format:PropTypes.string,formatDensity:PropTypes.oneOf(["dense","spacious"]),inputRef:refType$1,label:PropTypes.node,loading:PropTypes.bool,localeText:PropTypes.object,maxDate:PropTypes.any,minDate:PropTypes.any,monthsPerRow:PropTypes.oneOf([3,4]),onAccept:PropTypes.func,onChange:PropTypes.func,onClose:PropTypes.func,onError:PropTypes.func,onMonthChange:PropTypes.func,onOpen:PropTypes.func,onSelectedSectionsChange:PropTypes.func,onViewChange:PropTypes.func,onYearChange:PropTypes.func,open:PropTypes.bool,openTo:PropTypes.oneOf(["day","month","year"]),orientation:PropTypes.oneOf(["landscape","portrait"]),readOnly:PropTypes.bool,reduceAnimations:PropTypes.bool,referenceDate:PropTypes.any,renderLoading:PropTypes.func,selectedSections:PropTypes.oneOfType([PropTypes.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),PropTypes.number,PropTypes.shape({endIndex:PropTypes.number.isRequired,startIndex:PropTypes.number.isRequired})]),shouldDisableDate:PropTypes.func,shouldDisableMonth:PropTypes.func,shouldDisableYear:PropTypes.func,showDaysOutsideCurrentMonth:PropTypes.bool,slotProps:PropTypes.object,slots:PropTypes.object,sx:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func,PropTypes.object,PropTypes.bool])),PropTypes.func,PropTypes.object]),timezone:PropTypes.string,value:PropTypes.any,view:PropTypes.oneOf(["day","month","year"]),viewRenderers:PropTypes.shape({day:PropTypes.func,month:PropTypes.func,year:PropTypes.func}),views:PropTypes.arrayOf(PropTypes.oneOf(["day","month","year"]).isRequired),yearsPerRow:PropTypes.oneOf([3,4])};const _excluded$j=["desktopModeMediaQuery"],DatePicker=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiDatePicker"}),{desktopModeMediaQuery:it=DEFAULT_DESKTOP_MODE_MEDIA_QUERY}=rt,ot=_objectWithoutPropertiesLoose$m(rt,_excluded$j);return useMediaQuery(it,{defaultMatches:!0})?jsxRuntimeExports.jsx(DesktopDatePicker,_extends$u({ref:nt},ot)):jsxRuntimeExports.jsx(MobileDatePicker,_extends$u({ref:nt},ot))});var classnames={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames @@ -7389,7 +7416,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho width: 100%; `,StyledButton$1=styled$4(Button)` height: 48px; -`,TABS=[{label:"Teach me",value:"teachMe"},{label:"Ask question",value:"askQuestion"},{label:"Sentiment Analysis",value:"sentiment"}],ActionsMenu=({onChange:tt,active:et})=>{const nt=(rt,it)=>{tt(TABS[it].value)};return et?jsxRuntimeExports.jsx(MenuWrapper,{direction:"row",id:"cy-helper-menu",maxWidth:"100%",mb:3,overflow:"auto",spacing:1,children:TABS.map((rt,it)=>jsxRuntimeExports.jsx(Chip$1,{color:rt.value===et?"primary":"default",component:"div",id:rt.value,label:rt.label,onClick:ot=>nt(ot,it)},rt.value))}):jsxRuntimeExports.jsx(Stack$5,{component:"div",flexGrow:1,id:"cy-helper-menu",justifyContent:"flex-end",mb:1,spacing:1,children:TABS.map((rt,it)=>jsxRuntimeExports.jsx(Chip$1,{component:"div",id:rt.value,label:rt.label,onClick:ot=>nt(ot,it)},rt.value))})},MenuWrapper=styled$1(Stack$5)(()=>({"&::-webkit-scrollbar":{width:"1px",height:"4px"},"&::-webkit-scrollbar-thumb":{width:"1px",height:"4px"}})),PACKET_TYPES=Object.create(null);PACKET_TYPES.open="0";PACKET_TYPES.close="1";PACKET_TYPES.ping="2";PACKET_TYPES.pong="3";PACKET_TYPES.message="4";PACKET_TYPES.upgrade="5";PACKET_TYPES.noop="6";const PACKET_TYPES_REVERSE=Object.create(null);Object.keys(PACKET_TYPES).forEach(tt=>{PACKET_TYPES_REVERSE[PACKET_TYPES[tt]]=tt});const ERROR_PACKET={type:"error",data:"parser error"},withNativeBlob$1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",withNativeArrayBuffer$2=typeof ArrayBuffer=="function",isView$1=tt=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(tt):tt&&tt.buffer instanceof ArrayBuffer,encodePacket=({type:tt,data:et},nt,rt)=>withNativeBlob$1&&et instanceof Blob?nt?rt(et):encodeBlobAsBase64(et,rt):withNativeArrayBuffer$2&&(et instanceof ArrayBuffer||isView$1(et))?nt?rt(et):encodeBlobAsBase64(new Blob([et]),rt):rt(PACKET_TYPES[tt]+(et||"")),encodeBlobAsBase64=(tt,et)=>{const nt=new FileReader;return nt.onload=function(){const rt=nt.result.split(",")[1];et("b"+(rt||""))},nt.readAsDataURL(tt)};function toArray(tt){return tt instanceof Uint8Array?tt:tt instanceof ArrayBuffer?new Uint8Array(tt):new Uint8Array(tt.buffer,tt.byteOffset,tt.byteLength)}let TEXT_ENCODER;function encodePacketToBinary(tt,et){if(withNativeBlob$1&&tt.data instanceof Blob)return tt.data.arrayBuffer().then(toArray).then(et);if(withNativeArrayBuffer$2&&(tt.data instanceof ArrayBuffer||isView$1(tt.data)))return et(toArray(tt.data));encodePacket(tt,!1,nt=>{TEXT_ENCODER||(TEXT_ENCODER=new TextEncoder),et(TEXT_ENCODER.encode(nt))})}const chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lookup$1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let tt=0;tt{let et=tt.length*.75,nt=tt.length,rt,it=0,ot,at,st,lt;tt[tt.length-1]==="="&&(et--,tt[tt.length-2]==="="&&et--);const ct=new ArrayBuffer(et),ut=new Uint8Array(ct);for(rt=0;rt>4,ut[it++]=(at&15)<<4|st>>2,ut[it++]=(st&3)<<6|lt&63;return ct},withNativeArrayBuffer$1=typeof ArrayBuffer=="function",decodePacket=(tt,et)=>{if(typeof tt!="string")return{type:"message",data:mapBinary(tt,et)};const nt=tt.charAt(0);return nt==="b"?{type:"message",data:decodeBase64Packet(tt.substring(1),et)}:PACKET_TYPES_REVERSE[nt]?tt.length>1?{type:PACKET_TYPES_REVERSE[nt],data:tt.substring(1)}:{type:PACKET_TYPES_REVERSE[nt]}:ERROR_PACKET},decodeBase64Packet=(tt,et)=>{if(withNativeArrayBuffer$1){const nt=decode$1(tt);return mapBinary(nt,et)}else return{base64:!0,data:tt}},mapBinary=(tt,et)=>{switch(et){case"blob":return tt instanceof Blob?tt:new Blob([tt]);case"arraybuffer":default:return tt instanceof ArrayBuffer?tt:tt.buffer}},SEPARATOR=String.fromCharCode(30),encodePayload=(tt,et)=>{const nt=tt.length,rt=new Array(nt);let it=0;tt.forEach((ot,at)=>{encodePacket(ot,!1,st=>{rt[at]=st,++it===nt&&et(rt.join(SEPARATOR))})})},decodePayload=(tt,et)=>{const nt=tt.split(SEPARATOR),rt=[];for(let it=0;it{const rt=nt.length;let it;if(rt<126)it=new Uint8Array(1),new DataView(it.buffer).setUint8(0,rt);else if(rt<65536){it=new Uint8Array(3);const ot=new DataView(it.buffer);ot.setUint8(0,126),ot.setUint16(1,rt)}else{it=new Uint8Array(9);const ot=new DataView(it.buffer);ot.setUint8(0,127),ot.setBigUint64(1,BigInt(rt))}tt.data&&typeof tt.data!="string"&&(it[0]|=128),et.enqueue(it),et.enqueue(nt)})}})}let TEXT_DECODER;function totalLength(tt){return tt.reduce((et,nt)=>et+nt.length,0)}function concatChunks(tt,et){if(tt[0].length===et)return tt.shift();const nt=new Uint8Array(et);let rt=0;for(let it=0;itMath.pow(2,53-32)-1){st.enqueue(ERROR_PACKET);break}it=ut*Math.pow(2,32)+ct.getUint32(4),rt=3}else{if(totalLength(nt)tt){st.enqueue(ERROR_PACKET);break}}}})}const protocol$1=4;function Emitter(tt){if(tt)return mixin(tt)}function mixin(tt){for(var et in Emitter.prototype)tt[et]=Emitter.prototype[et];return tt}Emitter.prototype.on=Emitter.prototype.addEventListener=function(tt,et){return this._callbacks=this._callbacks||{},(this._callbacks["$"+tt]=this._callbacks["$"+tt]||[]).push(et),this};Emitter.prototype.once=function(tt,et){function nt(){this.off(tt,nt),et.apply(this,arguments)}return nt.fn=et,this.on(tt,nt),this};Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(tt,et){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var nt=this._callbacks["$"+tt];if(!nt)return this;if(arguments.length==1)return delete this._callbacks["$"+tt],this;for(var rt,it=0;ittypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function pick(tt,...et){return et.reduce((nt,rt)=>(tt.hasOwnProperty(rt)&&(nt[rt]=tt[rt]),nt),{})}const NATIVE_SET_TIMEOUT=globalThisShim.setTimeout,NATIVE_CLEAR_TIMEOUT=globalThisShim.clearTimeout;function installTimerFunctions(tt,et){et.useNativeTimers?(tt.setTimeoutFn=NATIVE_SET_TIMEOUT.bind(globalThisShim),tt.clearTimeoutFn=NATIVE_CLEAR_TIMEOUT.bind(globalThisShim)):(tt.setTimeoutFn=globalThisShim.setTimeout.bind(globalThisShim),tt.clearTimeoutFn=globalThisShim.clearTimeout.bind(globalThisShim))}const BASE64_OVERHEAD=1.33;function byteLength(tt){return typeof tt=="string"?utf8Length(tt):Math.ceil((tt.byteLength||tt.size)*BASE64_OVERHEAD)}function utf8Length(tt){let et=0,nt=0;for(let rt=0,it=tt.length;rt=57344?nt+=3:(rt++,nt+=4);return nt}function encode$1(tt){let et="";for(let nt in tt)tt.hasOwnProperty(nt)&&(et.length&&(et+="&"),et+=encodeURIComponent(nt)+"="+encodeURIComponent(tt[nt]));return et}function decode(tt){let et={},nt=tt.split("&");for(let rt=0,it=nt.length;rt0);return et}function yeast(){const tt=encode(+new Date);return tt!==prev?(seed=0,prev=tt):tt+"."+encode(seed++)}for(;i{this.readyState="paused",et()};if(this.polling||!this.writable){let rt=0;this.polling&&(rt++,this.once("pollComplete",function(){--rt||nt()})),this.writable||(rt++,this.once("drain",function(){--rt||nt()}))}else nt()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(et){const nt=rt=>{if(this.readyState==="opening"&&rt.type==="open"&&this.onOpen(),rt.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(rt)};decodePayload(et,this.socket.binaryType).forEach(nt),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const et=()=>{this.write([{type:"close"}])};this.readyState==="open"?et():this.once("open",et)}write(et){this.writable=!1,encodePayload(et,nt=>{this.doWrite(nt,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const et=this.opts.secure?"https":"http",nt=this.query||{};return this.opts.timestampRequests!==!1&&(nt[this.opts.timestampParam]=yeast()),!this.supportsBinary&&!nt.sid&&(nt.b64=1),this.createUri(et,nt)}request(et={}){return Object.assign(et,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Request$1(this.uri(),et)}doWrite(et,nt){const rt=this.request({method:"POST",data:et});rt.on("success",nt),rt.on("error",(it,ot)=>{this.onError("xhr post error",it,ot)})}doPoll(){const et=this.request();et.on("data",this.onData.bind(this)),et.on("error",(nt,rt)=>{this.onError("xhr poll error",nt,rt)}),this.pollXhr=et}}let Request$1=class D0 extends Emitter{constructor(et,nt){super(),installTimerFunctions(this,nt),this.opts=nt,this.method=nt.method||"GET",this.uri=et,this.data=nt.data!==void 0?nt.data:null,this.create()}create(){var et;const nt=pick(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");nt.xdomain=!!this.opts.xd;const rt=this.xhr=new XHR(nt);try{rt.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){rt.setDisableHeaderCheck&&rt.setDisableHeaderCheck(!0);for(let it in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(it)&&rt.setRequestHeader(it,this.opts.extraHeaders[it])}}catch{}if(this.method==="POST")try{rt.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{rt.setRequestHeader("Accept","*/*")}catch{}(et=this.opts.cookieJar)===null||et===void 0||et.addCookies(rt),"withCredentials"in rt&&(rt.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(rt.timeout=this.opts.requestTimeout),rt.onreadystatechange=()=>{var it;rt.readyState===3&&((it=this.opts.cookieJar)===null||it===void 0||it.parseCookies(rt)),rt.readyState===4&&(rt.status===200||rt.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof rt.status=="number"?rt.status:0)},0))},rt.send(this.data)}catch(it){this.setTimeoutFn(()=>{this.onError(it)},0);return}typeof document<"u"&&(this.index=D0.requestsCount++,D0.requests[this.index]=this)}onError(et){this.emitReserved("error",et,this.xhr),this.cleanup(!0)}cleanup(et){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=empty$1,et)try{this.xhr.abort()}catch{}typeof document<"u"&&delete D0.requests[this.index],this.xhr=null}}onLoad(){const et=this.xhr.responseText;et!==null&&(this.emitReserved("data",et),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};Request$1.requestsCount=0;Request$1.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",unloadHandler);else if(typeof addEventListener=="function"){const tt="onpagehide"in globalThisShim?"pagehide":"unload";addEventListener(tt,unloadHandler,!1)}}function unloadHandler(){for(let tt in Request$1.requests)Request$1.requests.hasOwnProperty(tt)&&Request$1.requests[tt].abort()}const nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?et=>Promise.resolve().then(et):(et,nt)=>nt(et,0))(),WebSocket=globalThisShim.WebSocket||globalThisShim.MozWebSocket,usingBrowserWebSocket=!0,defaultBinaryType="arraybuffer",isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class WS extends Transport{constructor(et){super(et),this.supportsBinary=!et.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const et=this.uri(),nt=this.opts.protocols,rt=isReactNative?{}:pick(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(rt.headers=this.opts.extraHeaders);try{this.ws=usingBrowserWebSocket&&!isReactNative?nt?new WebSocket(et,nt):new WebSocket(et):new WebSocket(et,nt,rt)}catch(it){return this.emitReserved("error",it)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=et=>this.onClose({description:"websocket connection closed",context:et}),this.ws.onmessage=et=>this.onData(et.data),this.ws.onerror=et=>this.onError("websocket error",et)}write(et){this.writable=!1;for(let nt=0;nt{const at={};try{usingBrowserWebSocket&&this.ws.send(ot)}catch{}it&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const et=this.opts.secure?"wss":"ws",nt=this.query||{};return this.opts.timestampRequests&&(nt[this.opts.timestampParam]=yeast()),this.supportsBinary||(nt.b64=1),this.createUri(et,nt)}check(){return!!WebSocket}}class WT extends Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(et=>{this.onError("webtransport error",et)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(et=>{const nt=createPacketDecoderStream(Number.MAX_SAFE_INTEGER,this.socket.binaryType),rt=et.readable.pipeThrough(nt).getReader(),it=createPacketEncoderStream();it.readable.pipeTo(et.writable),this.writer=it.writable.getWriter();const ot=()=>{rt.read().then(({done:st,value:lt})=>{st||(this.onPacket(lt),ot())}).catch(st=>{})};ot();const at={type:"open"};this.query.sid&&(at.data=`{"sid":"${this.query.sid}"}`),this.writer.write(at).then(()=>this.onOpen())})}))}write(et){this.writable=!1;for(let nt=0;nt{it&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var et;(et=this.transport)===null||et===void 0||et.close()}}const transports={websocket:WS,webtransport:WT,polling:Polling},re=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,parts=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function parse(tt){const et=tt,nt=tt.indexOf("["),rt=tt.indexOf("]");nt!=-1&&rt!=-1&&(tt=tt.substring(0,nt)+tt.substring(nt,rt).replace(/:/g,";")+tt.substring(rt,tt.length));let it=re.exec(tt||""),ot={},at=14;for(;at--;)ot[parts[at]]=it[at]||"";return nt!=-1&&rt!=-1&&(ot.source=et,ot.host=ot.host.substring(1,ot.host.length-1).replace(/;/g,":"),ot.authority=ot.authority.replace("[","").replace("]","").replace(/;/g,":"),ot.ipv6uri=!0),ot.pathNames=pathNames(ot,ot.path),ot.queryKey=queryKey(ot,ot.query),ot}function pathNames(tt,et){const nt=/\/{2,9}/g,rt=et.replace(nt,"/").split("/");return(et.slice(0,1)=="/"||et.length===0)&&rt.splice(0,1),et.slice(-1)=="/"&&rt.splice(rt.length-1,1),rt}function queryKey(tt,et){const nt={};return et.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(rt,it,ot){it&&(nt[it]=ot)}),nt}let Socket$1=class Gm extends Emitter{constructor(et,nt={}){super(),this.binaryType=defaultBinaryType,this.writeBuffer=[],et&&typeof et=="object"&&(nt=et,et=null),et?(et=parse(et),nt.hostname=et.host,nt.secure=et.protocol==="https"||et.protocol==="wss",nt.port=et.port,et.query&&(nt.query=et.query)):nt.host&&(nt.hostname=parse(nt.host).host),installTimerFunctions(this,nt),this.secure=nt.secure!=null?nt.secure:typeof location<"u"&&location.protocol==="https:",nt.hostname&&!nt.port&&(nt.port=this.secure?"443":"80"),this.hostname=nt.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=nt.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=nt.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},nt),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=decode(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(et){const nt=Object.assign({},this.opts.query);nt.EIO=protocol$1,nt.transport=et,this.id&&(nt.sid=this.id);const rt=Object.assign({},this.opts,{query:nt,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[et]);return new transports[et](rt)}open(){let et;if(this.opts.rememberUpgrade&&Gm.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)et="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else et=this.transports[0];this.readyState="opening";try{et=this.createTransport(et)}catch{this.transports.shift(),this.open();return}et.open(),this.setTransport(et)}setTransport(et){this.transport&&this.transport.removeAllListeners(),this.transport=et,et.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",nt=>this.onClose("transport close",nt))}probe(et){let nt=this.createTransport(et),rt=!1;Gm.priorWebsocketSuccess=!1;const it=()=>{rt||(nt.send([{type:"ping",data:"probe"}]),nt.once("packet",ht=>{if(!rt)if(ht.type==="pong"&&ht.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",nt),!nt)return;Gm.priorWebsocketSuccess=nt.name==="websocket",this.transport.pause(()=>{rt||this.readyState!=="closed"&&(ut(),this.setTransport(nt),nt.send([{type:"upgrade"}]),this.emitReserved("upgrade",nt),nt=null,this.upgrading=!1,this.flush())})}else{const dt=new Error("probe error");dt.transport=nt.name,this.emitReserved("upgradeError",dt)}}))};function ot(){rt||(rt=!0,ut(),nt.close(),nt=null)}const at=ht=>{const dt=new Error("probe error: "+ht);dt.transport=nt.name,ot(),this.emitReserved("upgradeError",dt)};function st(){at("transport closed")}function lt(){at("socket closed")}function ct(ht){nt&&ht.name!==nt.name&&ot()}const ut=()=>{nt.removeListener("open",it),nt.removeListener("error",at),nt.removeListener("close",st),this.off("close",lt),this.off("upgrading",ct)};nt.once("open",it),nt.once("error",at),nt.once("close",st),this.once("close",lt),this.once("upgrading",ct),this.upgrades.indexOf("webtransport")!==-1&&et!=="webtransport"?this.setTimeoutFn(()=>{rt||nt.open()},200):nt.open()}onOpen(){if(this.readyState="open",Gm.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let et=0;const nt=this.upgrades.length;for(;et{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const et=this.getWritablePackets();this.transport.send(et),this.prevBufferLen=et.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let nt=1;for(let rt=0;rt0&&nt>this.maxPayload)return this.writeBuffer.slice(0,rt);nt+=2}return this.writeBuffer}write(et,nt,rt){return this.sendPacket("message",et,nt,rt),this}send(et,nt,rt){return this.sendPacket("message",et,nt,rt),this}sendPacket(et,nt,rt,it){if(typeof nt=="function"&&(it=nt,nt=void 0),typeof rt=="function"&&(it=rt,rt=null),this.readyState==="closing"||this.readyState==="closed")return;rt=rt||{},rt.compress=rt.compress!==!1;const ot={type:et,data:nt,options:rt};this.emitReserved("packetCreate",ot),this.writeBuffer.push(ot),it&&this.once("flush",it),this.flush()}close(){const et=()=>{this.onClose("forced close"),this.transport.close()},nt=()=>{this.off("upgrade",nt),this.off("upgradeError",nt),et()},rt=()=>{this.once("upgrade",nt),this.once("upgradeError",nt)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?rt():et()}):this.upgrading?rt():et()),this}onError(et){Gm.priorWebsocketSuccess=!1,this.emitReserved("error",et),this.onClose("transport error",et)}onClose(et,nt){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",et,nt),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(et){const nt=[];let rt=0;const it=et.length;for(;rttypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(tt):tt.buffer instanceof ArrayBuffer,toString=Object.prototype.toString,withNativeBlob=typeof Blob=="function"||typeof Blob<"u"&&toString.call(Blob)==="[object BlobConstructor]",withNativeFile=typeof File=="function"||typeof File<"u"&&toString.call(File)==="[object FileConstructor]";function isBinary(tt){return withNativeArrayBuffer&&(tt instanceof ArrayBuffer||isView(tt))||withNativeBlob&&tt instanceof Blob||withNativeFile&&tt instanceof File}function hasBinary(tt,et){if(!tt||typeof tt!="object")return!1;if(Array.isArray(tt)){for(let nt=0,rt=tt.length;nt=0&&tt.num{delete this.acks[et];for(let at=0;at{this.io.clearTimeoutFn(ot),nt.apply(this,[null,...at])}}emitWithAck(et,...nt){const rt=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((it,ot)=>{nt.push((at,st)=>rt?at?ot(at):it(st):it(at)),this.emit(et,...nt)})}_addToQueue(et){let nt;typeof et[et.length-1]=="function"&&(nt=et.pop());const rt={id:this._queueSeq++,tryCount:0,pending:!1,args:et,flags:Object.assign({fromQueue:!0},this.flags)};et.push((it,...ot)=>rt!==this._queue[0]?void 0:(it!==null?rt.tryCount>this._opts.retries&&(this._queue.shift(),nt&&nt(it)):(this._queue.shift(),nt&&nt(null,...ot)),rt.pending=!1,this._drainQueue())),this._queue.push(rt),this._drainQueue()}_drainQueue(et=!1){if(!this.connected||this._queue.length===0)return;const nt=this._queue[0];nt.pending&&!et||(nt.pending=!0,nt.tryCount++,this.flags=nt.flags,this.emit.apply(this,nt.args))}packet(et){et.nsp=this.nsp,this.io._packet(et)}onopen(){typeof this.auth=="function"?this.auth(et=>{this._sendConnectPacket(et)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(et){this.packet({type:PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},et):et})}onerror(et){this.connected||this.emitReserved("connect_error",et)}onclose(et,nt){this.connected=!1,delete this.id,this.emitReserved("disconnect",et,nt)}onpacket(et){if(et.nsp===this.nsp)switch(et.type){case PacketType.CONNECT:et.data&&et.data.sid?this.onconnect(et.data.sid,et.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case PacketType.EVENT:case PacketType.BINARY_EVENT:this.onevent(et);break;case PacketType.ACK:case PacketType.BINARY_ACK:this.onack(et);break;case PacketType.DISCONNECT:this.ondisconnect();break;case PacketType.CONNECT_ERROR:this.destroy();const rt=new Error(et.data.message);rt.data=et.data.data,this.emitReserved("connect_error",rt);break}}onevent(et){const nt=et.data||[];et.id!=null&&nt.push(this.ack(et.id)),this.connected?this.emitEvent(nt):this.receiveBuffer.push(Object.freeze(nt))}emitEvent(et){if(this._anyListeners&&this._anyListeners.length){const nt=this._anyListeners.slice();for(const rt of nt)rt.apply(this,et)}super.emit.apply(this,et),this._pid&&et.length&&typeof et[et.length-1]=="string"&&(this._lastOffset=et[et.length-1])}ack(et){const nt=this;let rt=!1;return function(...it){rt||(rt=!0,nt.packet({type:PacketType.ACK,id:et,data:it}))}}onack(et){const nt=this.acks[et.id];typeof nt=="function"&&(nt.apply(this,et.data),delete this.acks[et.id])}onconnect(et,nt){this.id=et,this.recovered=nt&&this._pid===nt,this._pid=nt,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(et=>this.emitEvent(et)),this.receiveBuffer=[],this.sendBuffer.forEach(et=>{this.notifyOutgoingListeners(et),this.packet(et)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(et=>et()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:PacketType.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(et){return this.flags.compress=et,this}get volatile(){return this.flags.volatile=!0,this}timeout(et){return this.flags.timeout=et,this}onAny(et){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(et),this}prependAny(et){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(et),this}offAny(et){if(!this._anyListeners)return this;if(et){const nt=this._anyListeners;for(let rt=0;rt0&&tt.jitter<=1?tt.jitter:0,this.attempts=0}Backoff.prototype.duration=function(){var tt=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var et=Math.random(),nt=Math.floor(et*this.jitter*tt);tt=Math.floor(et*10)&1?tt+nt:tt-nt}return Math.min(tt,this.max)|0};Backoff.prototype.reset=function(){this.attempts=0};Backoff.prototype.setMin=function(tt){this.ms=tt};Backoff.prototype.setMax=function(tt){this.max=tt};Backoff.prototype.setJitter=function(tt){this.jitter=tt};class Manager extends Emitter{constructor(et,nt){var rt;super(),this.nsps={},this.subs=[],et&&typeof et=="object"&&(nt=et,et=void 0),nt=nt||{},nt.path=nt.path||"/socket.io",this.opts=nt,installTimerFunctions(this,nt),this.reconnection(nt.reconnection!==!1),this.reconnectionAttempts(nt.reconnectionAttempts||1/0),this.reconnectionDelay(nt.reconnectionDelay||1e3),this.reconnectionDelayMax(nt.reconnectionDelayMax||5e3),this.randomizationFactor((rt=nt.randomizationFactor)!==null&&rt!==void 0?rt:.5),this.backoff=new Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(nt.timeout==null?2e4:nt.timeout),this._readyState="closed",this.uri=et;const it=nt.parser||parser;this.encoder=new it.Encoder,this.decoder=new it.Decoder,this._autoConnect=nt.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(et){return arguments.length?(this._reconnection=!!et,this):this._reconnection}reconnectionAttempts(et){return et===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=et,this)}reconnectionDelay(et){var nt;return et===void 0?this._reconnectionDelay:(this._reconnectionDelay=et,(nt=this.backoff)===null||nt===void 0||nt.setMin(et),this)}randomizationFactor(et){var nt;return et===void 0?this._randomizationFactor:(this._randomizationFactor=et,(nt=this.backoff)===null||nt===void 0||nt.setJitter(et),this)}reconnectionDelayMax(et){var nt;return et===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=et,(nt=this.backoff)===null||nt===void 0||nt.setMax(et),this)}timeout(et){return arguments.length?(this._timeout=et,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(et){if(~this._readyState.indexOf("open"))return this;this.engine=new Socket$1(this.uri,this.opts);const nt=this.engine,rt=this;this._readyState="opening",this.skipReconnect=!1;const it=on(nt,"open",function(){rt.onopen(),et&&et()}),ot=st=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",st),et?et(st):this.maybeReconnectOnOpen()},at=on(nt,"error",ot);if(this._timeout!==!1){const st=this._timeout,lt=this.setTimeoutFn(()=>{it(),ot(new Error("timeout")),nt.close()},st);this.opts.autoUnref&<.unref(),this.subs.push(()=>{this.clearTimeoutFn(lt)})}return this.subs.push(it),this.subs.push(at),this}connect(et){return this.open(et)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const et=this.engine;this.subs.push(on(et,"ping",this.onping.bind(this)),on(et,"data",this.ondata.bind(this)),on(et,"error",this.onerror.bind(this)),on(et,"close",this.onclose.bind(this)),on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(et){try{this.decoder.add(et)}catch(nt){this.onclose("parse error",nt)}}ondecoded(et){nextTick(()=>{this.emitReserved("packet",et)},this.setTimeoutFn)}onerror(et){this.emitReserved("error",et)}socket(et,nt){let rt=this.nsps[et];return rt?this._autoConnect&&!rt.active&&rt.connect():(rt=new Socket(this,et,nt),this.nsps[et]=rt),rt}_destroy(et){const nt=Object.keys(this.nsps);for(const rt of nt)if(this.nsps[rt].active)return;this._close()}_packet(et){const nt=this.encoder.encode(et);for(let rt=0;rtet()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(et,nt){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",et,nt),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const et=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const nt=this.backoff.duration();this._reconnecting=!0;const rt=this.setTimeoutFn(()=>{et.skipReconnect||(this.emitReserved("reconnect_attempt",et.backoff.attempts),!et.skipReconnect&&et.open(it=>{it?(et._reconnecting=!1,et.reconnect(),this.emitReserved("reconnect_error",it)):et.onreconnect()}))},nt);this.opts.autoUnref&&rt.unref(),this.subs.push(()=>{this.clearTimeoutFn(rt)})}}onreconnect(){const et=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",et)}}const cache={};function lookup(tt,et){typeof tt=="object"&&(et=tt,tt=void 0),et=et||{};const nt=url(tt,et.path||"/socket.io"),rt=nt.source,it=nt.id,ot=nt.path,at=cache[it]&&ot in cache[it].nsps,st=et.forceNew||et["force new connection"]||et.multiplex===!1||at;let lt;return st?lt=new Manager(rt,et):(cache[it]||(cache[it]=new Manager(rt,et)),lt=cache[it]),nt.query&&!et.query&&(et.query=nt.queryKey),lt.socket(nt.path,et)}Object.assign(lookup,{Manager,Socket,io:lookup,connect:lookup});const useSocket=()=>{const[tt,et]=reactExports.useState(null);return reactExports.useEffect(()=>{const nt=lookup(API_URL);return et(nt),()=>{nt.disconnect()}},[]),tt},ITEM_HEIGHT=48,ITEM_PADDING_TOP=8,MenuProps={PaperProps:{style:{maxHeight:ITEM_HEIGHT*4.5+ITEM_PADDING_TOP,width:250}}},names=["Beginner","Intermediate","Advanced","Expert"],AskQuestion=()=>{const tt=useDataStore(xt=>xt.data),[et,nt]=reactExports.useState(""),[rt,it]=reactExports.useState("Beginner"),ot=useAppStore(xt=>xt.currentSearch),at=reactExports.useRef(!1),st=useSocket(),[lt]=useUserStore(xt=>[xt.setBudget]),[ct,ut,ht,dt,pt]=useTeachStore(xt=>[xt.askedQuestions,xt.askedQuestionsAnswers,xt.setAskedQuestion,xt.setAskedQuestionAnswer,xt.hasQuestionInProgress]),mt=reactExports.useCallback(xt=>{dt(xt.answer),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"Response is ready"}),{position:toast.POSITION.BOTTOM_CENTER,type:"success"})},[dt]);reactExports.useEffect(()=>{at.current||mt&&st&&(st.on("askquestionhook",mt),at.current=!0)},[mt,st]);const gt=async()=>{et&&(ht(et),nt(""));try{const xt=tt==null?void 0:tt.nodes.filter(Tt=>Tt.text),kt=xt==null?void 0:xt.slice(0,5),St=(kt!=null&&kt.length?kt.map(Tt=>Tt.text).join(" "):"").substring(0,2500).replace(/[?&=+/#]/g,Tt=>`\\${Tt}`);ot&&(await distExports$1.enable(),await postAskQuestion({expertise_level:rt,question_text:et,search_term:ot,transcripts:St}),await updateBudget(lt),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"We started preparing response for you"}),{type:"success"}))}catch(xt){console.error(xt)}},yt=rt&&et.trim()&&!pt,bt=xt=>{it(xt.target.value)},vt=async xt=>{if(pt){xt.preventDefault();return}xt.keyCode===13&&xt.shiftKey===!1&&yt&&(xt.preventDefault(),gt())};return jsxRuntimeExports.jsxs(AskQuestionContainer,{children:[jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsxs(FormControl$1,{component:"div",children:[jsxRuntimeExports.jsx(StyledInput,{id:"select-label",size:"small",children:"Expertise level"}),jsxRuntimeExports.jsx(StyledSelect,{id:"demo-multiple-name",input:jsxRuntimeExports.jsx(OutlinedInput$1,{label:"Expertise level"}),labelId:"select-label",MenuProps,onChange:bt,size:"small",value:rt,children:names.map(xt=>jsxRuntimeExports.jsx(MenuItem$2,{component:"li",value:xt,children:xt},xt))})]})})}),jsxRuntimeExports.jsx(ResponsesWrapper,{children:ct==null?void 0:ct.map((xt,kt)=>jsxRuntimeExports.jsxs(Flex,{className:"response",py:12,children:[jsxRuntimeExports.jsx(Text$3,{kind:"medium",children:xt}),jsxRuntimeExports.jsx(Flex,{py:12,children:(ut==null?void 0:ut[kt])!==void 0?jsxRuntimeExports.jsx(Text$3,{color:"unreadMsgText",children:ut[kt]}):jsxRuntimeExports.jsxs(Flex,{align:"center",py:12,children:[jsxRuntimeExports.jsx(Flex,{align:"center",py:12,children:jsxRuntimeExports.jsx(PropagateLoader,{color:colors.white})}),jsxRuntimeExports.jsx(Flex,{align:"center",py:12,children:jsxRuntimeExports.jsx(Text$3,{children:"Generating response"})})]})})]},xt))}),jsxRuntimeExports.jsxs(TextAreaWrapper,{onKeyDown:vt,py:12,tabIndex:-1,children:[jsxRuntimeExports.jsx(StyledTextarea,{disabled:pt,onChange:xt=>nt(xt.target.value),placeholder:"Enter your question",value:et}),jsxRuntimeExports.jsx(IconWrapper$1,{children:jsxRuntimeExports.jsx(MdSend,{color:yt?colors.white:colors.gray300,size:"18"})})]})]})},AskQuestionContainer=styled$4.div` +`,TABS=[{label:"Teach me",value:"teachMe"},{label:"Ask question",value:"askQuestion"},{label:"Sentiment Analysis",value:"sentiment"}],ActionsMenu=({onChange:tt,active:et})=>{const nt=(rt,it)=>{tt(TABS[it].value)};return et?jsxRuntimeExports.jsx(MenuWrapper,{direction:"row",id:"cy-helper-menu",maxWidth:"100%",mb:3,overflow:"auto",spacing:1,children:TABS.map((rt,it)=>jsxRuntimeExports.jsx(Chip$1,{color:rt.value===et?"primary":"default",component:"div",id:rt.value,label:rt.label,onClick:ot=>nt(ot,it)},rt.value))}):jsxRuntimeExports.jsx(Stack$5,{component:"div",flexGrow:1,id:"cy-helper-menu",justifyContent:"flex-end",mb:1,spacing:1,children:TABS.map((rt,it)=>jsxRuntimeExports.jsx(Chip$1,{component:"div",id:rt.value,label:rt.label,onClick:ot=>nt(ot,it)},rt.value))})},MenuWrapper=styled$1(Stack$5)(()=>({"&::-webkit-scrollbar":{width:"1px",height:"4px"},"&::-webkit-scrollbar-thumb":{width:"1px",height:"4px"}})),PACKET_TYPES=Object.create(null);PACKET_TYPES.open="0";PACKET_TYPES.close="1";PACKET_TYPES.ping="2";PACKET_TYPES.pong="3";PACKET_TYPES.message="4";PACKET_TYPES.upgrade="5";PACKET_TYPES.noop="6";const PACKET_TYPES_REVERSE=Object.create(null);Object.keys(PACKET_TYPES).forEach(tt=>{PACKET_TYPES_REVERSE[PACKET_TYPES[tt]]=tt});const ERROR_PACKET={type:"error",data:"parser error"},withNativeBlob$1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",withNativeArrayBuffer$2=typeof ArrayBuffer=="function",isView$1=tt=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(tt):tt&&tt.buffer instanceof ArrayBuffer,encodePacket=({type:tt,data:et},nt,rt)=>withNativeBlob$1&&et instanceof Blob?nt?rt(et):encodeBlobAsBase64(et,rt):withNativeArrayBuffer$2&&(et instanceof ArrayBuffer||isView$1(et))?nt?rt(et):encodeBlobAsBase64(new Blob([et]),rt):rt(PACKET_TYPES[tt]+(et||"")),encodeBlobAsBase64=(tt,et)=>{const nt=new FileReader;return nt.onload=function(){const rt=nt.result.split(",")[1];et("b"+(rt||""))},nt.readAsDataURL(tt)};function toArray(tt){return tt instanceof Uint8Array?tt:tt instanceof ArrayBuffer?new Uint8Array(tt):new Uint8Array(tt.buffer,tt.byteOffset,tt.byteLength)}let TEXT_ENCODER;function encodePacketToBinary(tt,et){if(withNativeBlob$1&&tt.data instanceof Blob)return tt.data.arrayBuffer().then(toArray).then(et);if(withNativeArrayBuffer$2&&(tt.data instanceof ArrayBuffer||isView$1(tt.data)))return et(toArray(tt.data));encodePacket(tt,!1,nt=>{TEXT_ENCODER||(TEXT_ENCODER=new TextEncoder),et(TEXT_ENCODER.encode(nt))})}const chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lookup$1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let tt=0;tt{let et=tt.length*.75,nt=tt.length,rt,it=0,ot,at,st,lt;tt[tt.length-1]==="="&&(et--,tt[tt.length-2]==="="&&et--);const ct=new ArrayBuffer(et),ut=new Uint8Array(ct);for(rt=0;rt>4,ut[it++]=(at&15)<<4|st>>2,ut[it++]=(st&3)<<6|lt&63;return ct},withNativeArrayBuffer$1=typeof ArrayBuffer=="function",decodePacket=(tt,et)=>{if(typeof tt!="string")return{type:"message",data:mapBinary(tt,et)};const nt=tt.charAt(0);return nt==="b"?{type:"message",data:decodeBase64Packet(tt.substring(1),et)}:PACKET_TYPES_REVERSE[nt]?tt.length>1?{type:PACKET_TYPES_REVERSE[nt],data:tt.substring(1)}:{type:PACKET_TYPES_REVERSE[nt]}:ERROR_PACKET},decodeBase64Packet=(tt,et)=>{if(withNativeArrayBuffer$1){const nt=decode$1(tt);return mapBinary(nt,et)}else return{base64:!0,data:tt}},mapBinary=(tt,et)=>{switch(et){case"blob":return tt instanceof Blob?tt:new Blob([tt]);case"arraybuffer":default:return tt instanceof ArrayBuffer?tt:tt.buffer}},SEPARATOR=String.fromCharCode(30),encodePayload=(tt,et)=>{const nt=tt.length,rt=new Array(nt);let it=0;tt.forEach((ot,at)=>{encodePacket(ot,!1,st=>{rt[at]=st,++it===nt&&et(rt.join(SEPARATOR))})})},decodePayload=(tt,et)=>{const nt=tt.split(SEPARATOR),rt=[];for(let it=0;it{const rt=nt.length;let it;if(rt<126)it=new Uint8Array(1),new DataView(it.buffer).setUint8(0,rt);else if(rt<65536){it=new Uint8Array(3);const ot=new DataView(it.buffer);ot.setUint8(0,126),ot.setUint16(1,rt)}else{it=new Uint8Array(9);const ot=new DataView(it.buffer);ot.setUint8(0,127),ot.setBigUint64(1,BigInt(rt))}tt.data&&typeof tt.data!="string"&&(it[0]|=128),et.enqueue(it),et.enqueue(nt)})}})}let TEXT_DECODER;function totalLength(tt){return tt.reduce((et,nt)=>et+nt.length,0)}function concatChunks(tt,et){if(tt[0].length===et)return tt.shift();const nt=new Uint8Array(et);let rt=0;for(let it=0;itMath.pow(2,53-32)-1){st.enqueue(ERROR_PACKET);break}it=ut*Math.pow(2,32)+ct.getUint32(4),rt=3}else{if(totalLength(nt)tt){st.enqueue(ERROR_PACKET);break}}}})}const protocol$1=4;function Emitter(tt){if(tt)return mixin(tt)}function mixin(tt){for(var et in Emitter.prototype)tt[et]=Emitter.prototype[et];return tt}Emitter.prototype.on=Emitter.prototype.addEventListener=function(tt,et){return this._callbacks=this._callbacks||{},(this._callbacks["$"+tt]=this._callbacks["$"+tt]||[]).push(et),this};Emitter.prototype.once=function(tt,et){function nt(){this.off(tt,nt),et.apply(this,arguments)}return nt.fn=et,this.on(tt,nt),this};Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(tt,et){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var nt=this._callbacks["$"+tt];if(!nt)return this;if(arguments.length==1)return delete this._callbacks["$"+tt],this;for(var rt,it=0;ittypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function pick(tt,...et){return et.reduce((nt,rt)=>(tt.hasOwnProperty(rt)&&(nt[rt]=tt[rt]),nt),{})}const NATIVE_SET_TIMEOUT=globalThisShim.setTimeout,NATIVE_CLEAR_TIMEOUT=globalThisShim.clearTimeout;function installTimerFunctions(tt,et){et.useNativeTimers?(tt.setTimeoutFn=NATIVE_SET_TIMEOUT.bind(globalThisShim),tt.clearTimeoutFn=NATIVE_CLEAR_TIMEOUT.bind(globalThisShim)):(tt.setTimeoutFn=globalThisShim.setTimeout.bind(globalThisShim),tt.clearTimeoutFn=globalThisShim.clearTimeout.bind(globalThisShim))}const BASE64_OVERHEAD=1.33;function byteLength(tt){return typeof tt=="string"?utf8Length(tt):Math.ceil((tt.byteLength||tt.size)*BASE64_OVERHEAD)}function utf8Length(tt){let et=0,nt=0;for(let rt=0,it=tt.length;rt=57344?nt+=3:(rt++,nt+=4);return nt}function encode$1(tt){let et="";for(let nt in tt)tt.hasOwnProperty(nt)&&(et.length&&(et+="&"),et+=encodeURIComponent(nt)+"="+encodeURIComponent(tt[nt]));return et}function decode(tt){let et={},nt=tt.split("&");for(let rt=0,it=nt.length;rt0);return et}function yeast(){const tt=encode(+new Date);return tt!==prev?(seed=0,prev=tt):tt+"."+encode(seed++)}for(;i{this.readyState="paused",et()};if(this.polling||!this.writable){let rt=0;this.polling&&(rt++,this.once("pollComplete",function(){--rt||nt()})),this.writable||(rt++,this.once("drain",function(){--rt||nt()}))}else nt()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(et){const nt=rt=>{if(this.readyState==="opening"&&rt.type==="open"&&this.onOpen(),rt.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(rt)};decodePayload(et,this.socket.binaryType).forEach(nt),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const et=()=>{this.write([{type:"close"}])};this.readyState==="open"?et():this.once("open",et)}write(et){this.writable=!1,encodePayload(et,nt=>{this.doWrite(nt,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const et=this.opts.secure?"https":"http",nt=this.query||{};return this.opts.timestampRequests!==!1&&(nt[this.opts.timestampParam]=yeast()),!this.supportsBinary&&!nt.sid&&(nt.b64=1),this.createUri(et,nt)}request(et={}){return Object.assign(et,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Request$1(this.uri(),et)}doWrite(et,nt){const rt=this.request({method:"POST",data:et});rt.on("success",nt),rt.on("error",(it,ot)=>{this.onError("xhr post error",it,ot)})}doPoll(){const et=this.request();et.on("data",this.onData.bind(this)),et.on("error",(nt,rt)=>{this.onError("xhr poll error",nt,rt)}),this.pollXhr=et}}let Request$1=class D0 extends Emitter{constructor(et,nt){super(),installTimerFunctions(this,nt),this.opts=nt,this.method=nt.method||"GET",this.uri=et,this.data=nt.data!==void 0?nt.data:null,this.create()}create(){var et;const nt=pick(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");nt.xdomain=!!this.opts.xd;const rt=this.xhr=new XHR(nt);try{rt.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){rt.setDisableHeaderCheck&&rt.setDisableHeaderCheck(!0);for(let it in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(it)&&rt.setRequestHeader(it,this.opts.extraHeaders[it])}}catch{}if(this.method==="POST")try{rt.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{rt.setRequestHeader("Accept","*/*")}catch{}(et=this.opts.cookieJar)===null||et===void 0||et.addCookies(rt),"withCredentials"in rt&&(rt.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(rt.timeout=this.opts.requestTimeout),rt.onreadystatechange=()=>{var it;rt.readyState===3&&((it=this.opts.cookieJar)===null||it===void 0||it.parseCookies(rt)),rt.readyState===4&&(rt.status===200||rt.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof rt.status=="number"?rt.status:0)},0))},rt.send(this.data)}catch(it){this.setTimeoutFn(()=>{this.onError(it)},0);return}typeof document<"u"&&(this.index=D0.requestsCount++,D0.requests[this.index]=this)}onError(et){this.emitReserved("error",et,this.xhr),this.cleanup(!0)}cleanup(et){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=empty$1,et)try{this.xhr.abort()}catch{}typeof document<"u"&&delete D0.requests[this.index],this.xhr=null}}onLoad(){const et=this.xhr.responseText;et!==null&&(this.emitReserved("data",et),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};Request$1.requestsCount=0;Request$1.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",unloadHandler);else if(typeof addEventListener=="function"){const tt="onpagehide"in globalThisShim?"pagehide":"unload";addEventListener(tt,unloadHandler,!1)}}function unloadHandler(){for(let tt in Request$1.requests)Request$1.requests.hasOwnProperty(tt)&&Request$1.requests[tt].abort()}const nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?et=>Promise.resolve().then(et):(et,nt)=>nt(et,0))(),WebSocket=globalThisShim.WebSocket||globalThisShim.MozWebSocket,usingBrowserWebSocket=!0,defaultBinaryType="arraybuffer",isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class WS extends Transport{constructor(et){super(et),this.supportsBinary=!et.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const et=this.uri(),nt=this.opts.protocols,rt=isReactNative?{}:pick(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(rt.headers=this.opts.extraHeaders);try{this.ws=usingBrowserWebSocket&&!isReactNative?nt?new WebSocket(et,nt):new WebSocket(et):new WebSocket(et,nt,rt)}catch(it){return this.emitReserved("error",it)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=et=>this.onClose({description:"websocket connection closed",context:et}),this.ws.onmessage=et=>this.onData(et.data),this.ws.onerror=et=>this.onError("websocket error",et)}write(et){this.writable=!1;for(let nt=0;nt{const at={};try{usingBrowserWebSocket&&this.ws.send(ot)}catch{}it&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const et=this.opts.secure?"wss":"ws",nt=this.query||{};return this.opts.timestampRequests&&(nt[this.opts.timestampParam]=yeast()),this.supportsBinary||(nt.b64=1),this.createUri(et,nt)}check(){return!!WebSocket}}class WT extends Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(et=>{this.onError("webtransport error",et)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(et=>{const nt=createPacketDecoderStream(Number.MAX_SAFE_INTEGER,this.socket.binaryType),rt=et.readable.pipeThrough(nt).getReader(),it=createPacketEncoderStream();it.readable.pipeTo(et.writable),this.writer=it.writable.getWriter();const ot=()=>{rt.read().then(({done:st,value:lt})=>{st||(this.onPacket(lt),ot())}).catch(st=>{})};ot();const at={type:"open"};this.query.sid&&(at.data=`{"sid":"${this.query.sid}"}`),this.writer.write(at).then(()=>this.onOpen())})}))}write(et){this.writable=!1;for(let nt=0;nt{it&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var et;(et=this.transport)===null||et===void 0||et.close()}}const transports={websocket:WS,webtransport:WT,polling:Polling},re=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,parts=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function parse(tt){const et=tt,nt=tt.indexOf("["),rt=tt.indexOf("]");nt!=-1&&rt!=-1&&(tt=tt.substring(0,nt)+tt.substring(nt,rt).replace(/:/g,";")+tt.substring(rt,tt.length));let it=re.exec(tt||""),ot={},at=14;for(;at--;)ot[parts[at]]=it[at]||"";return nt!=-1&&rt!=-1&&(ot.source=et,ot.host=ot.host.substring(1,ot.host.length-1).replace(/;/g,":"),ot.authority=ot.authority.replace("[","").replace("]","").replace(/;/g,":"),ot.ipv6uri=!0),ot.pathNames=pathNames(ot,ot.path),ot.queryKey=queryKey(ot,ot.query),ot}function pathNames(tt,et){const nt=/\/{2,9}/g,rt=et.replace(nt,"/").split("/");return(et.slice(0,1)=="/"||et.length===0)&&rt.splice(0,1),et.slice(-1)=="/"&&rt.splice(rt.length-1,1),rt}function queryKey(tt,et){const nt={};return et.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(rt,it,ot){it&&(nt[it]=ot)}),nt}let Socket$1=class Gm extends Emitter{constructor(et,nt={}){super(),this.binaryType=defaultBinaryType,this.writeBuffer=[],et&&typeof et=="object"&&(nt=et,et=null),et?(et=parse(et),nt.hostname=et.host,nt.secure=et.protocol==="https"||et.protocol==="wss",nt.port=et.port,et.query&&(nt.query=et.query)):nt.host&&(nt.hostname=parse(nt.host).host),installTimerFunctions(this,nt),this.secure=nt.secure!=null?nt.secure:typeof location<"u"&&location.protocol==="https:",nt.hostname&&!nt.port&&(nt.port=this.secure?"443":"80"),this.hostname=nt.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=nt.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=nt.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},nt),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=decode(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(et){const nt=Object.assign({},this.opts.query);nt.EIO=protocol$1,nt.transport=et,this.id&&(nt.sid=this.id);const rt=Object.assign({},this.opts,{query:nt,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[et]);return new transports[et](rt)}open(){let et;if(this.opts.rememberUpgrade&&Gm.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)et="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else et=this.transports[0];this.readyState="opening";try{et=this.createTransport(et)}catch{this.transports.shift(),this.open();return}et.open(),this.setTransport(et)}setTransport(et){this.transport&&this.transport.removeAllListeners(),this.transport=et,et.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",nt=>this.onClose("transport close",nt))}probe(et){let nt=this.createTransport(et),rt=!1;Gm.priorWebsocketSuccess=!1;const it=()=>{rt||(nt.send([{type:"ping",data:"probe"}]),nt.once("packet",ht=>{if(!rt)if(ht.type==="pong"&&ht.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",nt),!nt)return;Gm.priorWebsocketSuccess=nt.name==="websocket",this.transport.pause(()=>{rt||this.readyState!=="closed"&&(ut(),this.setTransport(nt),nt.send([{type:"upgrade"}]),this.emitReserved("upgrade",nt),nt=null,this.upgrading=!1,this.flush())})}else{const dt=new Error("probe error");dt.transport=nt.name,this.emitReserved("upgradeError",dt)}}))};function ot(){rt||(rt=!0,ut(),nt.close(),nt=null)}const at=ht=>{const dt=new Error("probe error: "+ht);dt.transport=nt.name,ot(),this.emitReserved("upgradeError",dt)};function st(){at("transport closed")}function lt(){at("socket closed")}function ct(ht){nt&&ht.name!==nt.name&&ot()}const ut=()=>{nt.removeListener("open",it),nt.removeListener("error",at),nt.removeListener("close",st),this.off("close",lt),this.off("upgrading",ct)};nt.once("open",it),nt.once("error",at),nt.once("close",st),this.once("close",lt),this.once("upgrading",ct),this.upgrades.indexOf("webtransport")!==-1&&et!=="webtransport"?this.setTimeoutFn(()=>{rt||nt.open()},200):nt.open()}onOpen(){if(this.readyState="open",Gm.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let et=0;const nt=this.upgrades.length;for(;et{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const et=this.getWritablePackets();this.transport.send(et),this.prevBufferLen=et.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let nt=1;for(let rt=0;rt0&&nt>this.maxPayload)return this.writeBuffer.slice(0,rt);nt+=2}return this.writeBuffer}write(et,nt,rt){return this.sendPacket("message",et,nt,rt),this}send(et,nt,rt){return this.sendPacket("message",et,nt,rt),this}sendPacket(et,nt,rt,it){if(typeof nt=="function"&&(it=nt,nt=void 0),typeof rt=="function"&&(it=rt,rt=null),this.readyState==="closing"||this.readyState==="closed")return;rt=rt||{},rt.compress=rt.compress!==!1;const ot={type:et,data:nt,options:rt};this.emitReserved("packetCreate",ot),this.writeBuffer.push(ot),it&&this.once("flush",it),this.flush()}close(){const et=()=>{this.onClose("forced close"),this.transport.close()},nt=()=>{this.off("upgrade",nt),this.off("upgradeError",nt),et()},rt=()=>{this.once("upgrade",nt),this.once("upgradeError",nt)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?rt():et()}):this.upgrading?rt():et()),this}onError(et){Gm.priorWebsocketSuccess=!1,this.emitReserved("error",et),this.onClose("transport error",et)}onClose(et,nt){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",et,nt),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(et){const nt=[];let rt=0;const it=et.length;for(;rttypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(tt):tt.buffer instanceof ArrayBuffer,toString=Object.prototype.toString,withNativeBlob=typeof Blob=="function"||typeof Blob<"u"&&toString.call(Blob)==="[object BlobConstructor]",withNativeFile=typeof File=="function"||typeof File<"u"&&toString.call(File)==="[object FileConstructor]";function isBinary(tt){return withNativeArrayBuffer&&(tt instanceof ArrayBuffer||isView(tt))||withNativeBlob&&tt instanceof Blob||withNativeFile&&tt instanceof File}function hasBinary(tt,et){if(!tt||typeof tt!="object")return!1;if(Array.isArray(tt)){for(let nt=0,rt=tt.length;nt=0&&tt.num{delete this.acks[et];for(let at=0;at{this.io.clearTimeoutFn(ot),nt.apply(this,[null,...at])}}emitWithAck(et,...nt){const rt=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((it,ot)=>{nt.push((at,st)=>rt?at?ot(at):it(st):it(at)),this.emit(et,...nt)})}_addToQueue(et){let nt;typeof et[et.length-1]=="function"&&(nt=et.pop());const rt={id:this._queueSeq++,tryCount:0,pending:!1,args:et,flags:Object.assign({fromQueue:!0},this.flags)};et.push((it,...ot)=>rt!==this._queue[0]?void 0:(it!==null?rt.tryCount>this._opts.retries&&(this._queue.shift(),nt&&nt(it)):(this._queue.shift(),nt&&nt(null,...ot)),rt.pending=!1,this._drainQueue())),this._queue.push(rt),this._drainQueue()}_drainQueue(et=!1){if(!this.connected||this._queue.length===0)return;const nt=this._queue[0];nt.pending&&!et||(nt.pending=!0,nt.tryCount++,this.flags=nt.flags,this.emit.apply(this,nt.args))}packet(et){et.nsp=this.nsp,this.io._packet(et)}onopen(){typeof this.auth=="function"?this.auth(et=>{this._sendConnectPacket(et)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(et){this.packet({type:PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},et):et})}onerror(et){this.connected||this.emitReserved("connect_error",et)}onclose(et,nt){this.connected=!1,delete this.id,this.emitReserved("disconnect",et,nt)}onpacket(et){if(et.nsp===this.nsp)switch(et.type){case PacketType.CONNECT:et.data&&et.data.sid?this.onconnect(et.data.sid,et.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case PacketType.EVENT:case PacketType.BINARY_EVENT:this.onevent(et);break;case PacketType.ACK:case PacketType.BINARY_ACK:this.onack(et);break;case PacketType.DISCONNECT:this.ondisconnect();break;case PacketType.CONNECT_ERROR:this.destroy();const rt=new Error(et.data.message);rt.data=et.data.data,this.emitReserved("connect_error",rt);break}}onevent(et){const nt=et.data||[];et.id!=null&&nt.push(this.ack(et.id)),this.connected?this.emitEvent(nt):this.receiveBuffer.push(Object.freeze(nt))}emitEvent(et){if(this._anyListeners&&this._anyListeners.length){const nt=this._anyListeners.slice();for(const rt of nt)rt.apply(this,et)}super.emit.apply(this,et),this._pid&&et.length&&typeof et[et.length-1]=="string"&&(this._lastOffset=et[et.length-1])}ack(et){const nt=this;let rt=!1;return function(...it){rt||(rt=!0,nt.packet({type:PacketType.ACK,id:et,data:it}))}}onack(et){const nt=this.acks[et.id];typeof nt=="function"&&(nt.apply(this,et.data),delete this.acks[et.id])}onconnect(et,nt){this.id=et,this.recovered=nt&&this._pid===nt,this._pid=nt,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(et=>this.emitEvent(et)),this.receiveBuffer=[],this.sendBuffer.forEach(et=>{this.notifyOutgoingListeners(et),this.packet(et)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(et=>et()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:PacketType.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(et){return this.flags.compress=et,this}get volatile(){return this.flags.volatile=!0,this}timeout(et){return this.flags.timeout=et,this}onAny(et){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(et),this}prependAny(et){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(et),this}offAny(et){if(!this._anyListeners)return this;if(et){const nt=this._anyListeners;for(let rt=0;rt0&&tt.jitter<=1?tt.jitter:0,this.attempts=0}Backoff.prototype.duration=function(){var tt=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var et=Math.random(),nt=Math.floor(et*this.jitter*tt);tt=Math.floor(et*10)&1?tt+nt:tt-nt}return Math.min(tt,this.max)|0};Backoff.prototype.reset=function(){this.attempts=0};Backoff.prototype.setMin=function(tt){this.ms=tt};Backoff.prototype.setMax=function(tt){this.max=tt};Backoff.prototype.setJitter=function(tt){this.jitter=tt};class Manager extends Emitter{constructor(et,nt){var rt;super(),this.nsps={},this.subs=[],et&&typeof et=="object"&&(nt=et,et=void 0),nt=nt||{},nt.path=nt.path||"/socket.io",this.opts=nt,installTimerFunctions(this,nt),this.reconnection(nt.reconnection!==!1),this.reconnectionAttempts(nt.reconnectionAttempts||1/0),this.reconnectionDelay(nt.reconnectionDelay||1e3),this.reconnectionDelayMax(nt.reconnectionDelayMax||5e3),this.randomizationFactor((rt=nt.randomizationFactor)!==null&&rt!==void 0?rt:.5),this.backoff=new Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(nt.timeout==null?2e4:nt.timeout),this._readyState="closed",this.uri=et;const it=nt.parser||parser;this.encoder=new it.Encoder,this.decoder=new it.Decoder,this._autoConnect=nt.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(et){return arguments.length?(this._reconnection=!!et,this):this._reconnection}reconnectionAttempts(et){return et===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=et,this)}reconnectionDelay(et){var nt;return et===void 0?this._reconnectionDelay:(this._reconnectionDelay=et,(nt=this.backoff)===null||nt===void 0||nt.setMin(et),this)}randomizationFactor(et){var nt;return et===void 0?this._randomizationFactor:(this._randomizationFactor=et,(nt=this.backoff)===null||nt===void 0||nt.setJitter(et),this)}reconnectionDelayMax(et){var nt;return et===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=et,(nt=this.backoff)===null||nt===void 0||nt.setMax(et),this)}timeout(et){return arguments.length?(this._timeout=et,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(et){if(~this._readyState.indexOf("open"))return this;this.engine=new Socket$1(this.uri,this.opts);const nt=this.engine,rt=this;this._readyState="opening",this.skipReconnect=!1;const it=on(nt,"open",function(){rt.onopen(),et&&et()}),ot=st=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",st),et?et(st):this.maybeReconnectOnOpen()},at=on(nt,"error",ot);if(this._timeout!==!1){const st=this._timeout,lt=this.setTimeoutFn(()=>{it(),ot(new Error("timeout")),nt.close()},st);this.opts.autoUnref&<.unref(),this.subs.push(()=>{this.clearTimeoutFn(lt)})}return this.subs.push(it),this.subs.push(at),this}connect(et){return this.open(et)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const et=this.engine;this.subs.push(on(et,"ping",this.onping.bind(this)),on(et,"data",this.ondata.bind(this)),on(et,"error",this.onerror.bind(this)),on(et,"close",this.onclose.bind(this)),on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(et){try{this.decoder.add(et)}catch(nt){this.onclose("parse error",nt)}}ondecoded(et){nextTick(()=>{this.emitReserved("packet",et)},this.setTimeoutFn)}onerror(et){this.emitReserved("error",et)}socket(et,nt){let rt=this.nsps[et];return rt?this._autoConnect&&!rt.active&&rt.connect():(rt=new Socket(this,et,nt),this.nsps[et]=rt),rt}_destroy(et){const nt=Object.keys(this.nsps);for(const rt of nt)if(this.nsps[rt].active)return;this._close()}_packet(et){const nt=this.encoder.encode(et);for(let rt=0;rtet()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(et,nt){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",et,nt),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const et=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const nt=this.backoff.duration();this._reconnecting=!0;const rt=this.setTimeoutFn(()=>{et.skipReconnect||(this.emitReserved("reconnect_attempt",et.backoff.attempts),!et.skipReconnect&&et.open(it=>{it?(et._reconnecting=!1,et.reconnect(),this.emitReserved("reconnect_error",it)):et.onreconnect()}))},nt);this.opts.autoUnref&&rt.unref(),this.subs.push(()=>{this.clearTimeoutFn(rt)})}}onreconnect(){const et=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",et)}}const cache={};function lookup(tt,et){typeof tt=="object"&&(et=tt,tt=void 0),et=et||{};const nt=url(tt,et.path||"/socket.io"),rt=nt.source,it=nt.id,ot=nt.path,at=cache[it]&&ot in cache[it].nsps,st=et.forceNew||et["force new connection"]||et.multiplex===!1||at;let lt;return st?lt=new Manager(rt,et):(cache[it]||(cache[it]=new Manager(rt,et)),lt=cache[it]),nt.query&&!et.query&&(et.query=nt.queryKey),lt.socket(nt.path,et)}Object.assign(lookup,{Manager,Socket,io:lookup,connect:lookup});const useSocket=()=>{const[tt,et]=reactExports.useState(null);return reactExports.useEffect(()=>{const nt=lookup(API_URL);return et(nt),()=>{nt.disconnect()}},[]),tt},ITEM_HEIGHT=48,ITEM_PADDING_TOP=8,MenuProps={PaperProps:{style:{maxHeight:ITEM_HEIGHT*4.5+ITEM_PADDING_TOP,width:250}}},names=["Beginner","Intermediate","Advanced","Expert"],AskQuestion=()=>{const tt=useDataStore(xt=>xt.data),[et,nt]=reactExports.useState(""),[rt,it]=reactExports.useState("Beginner"),ot=useAppStore(xt=>xt.currentSearch),at=reactExports.useRef(!1),st=useSocket(),[lt]=useUserStore(xt=>[xt.setBudget]),[ct,ut,ht,dt,pt]=useTeachStore(xt=>[xt.askedQuestions,xt.askedQuestionsAnswers,xt.setAskedQuestion,xt.setAskedQuestionAnswer,xt.hasQuestionInProgress]),mt=reactExports.useCallback(xt=>{dt(xt.answer),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"Response is ready"}),{position:toast.POSITION.BOTTOM_CENTER,type:"success"})},[dt]);reactExports.useEffect(()=>{at.current||mt&&st&&(st.on("askquestionhook",mt),at.current=!0)},[mt,st]);const gt=async()=>{et&&(ht(et),nt(""));try{const xt=tt==null?void 0:tt.nodes.filter(Tt=>Tt.text),kt=xt==null?void 0:xt.slice(0,5),St=(kt!=null&&kt.length?kt.map(Tt=>Tt.text).join(" "):"").substring(0,2500).replace(/[?&=+/#]/g,Tt=>`\\${Tt}`);ot&&(await distExports$1.enable(),await postAskQuestion({expertise_level:rt,question_text:et,search_term:ot,transcripts:St}),await updateBudget(lt),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"We started preparing response for you"}),{type:"success"}))}catch(xt){console.error(xt)}},yt=rt&&et.trim()&&!pt,bt=xt=>{it(xt.target.value)},vt=async xt=>{if(pt){xt.preventDefault();return}xt.keyCode===13&&xt.shiftKey===!1&&yt&&(xt.preventDefault(),gt())};return jsxRuntimeExports.jsxs(AskQuestionContainer,{children:[jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsxs(FormControl$1,{component:"div",children:[jsxRuntimeExports.jsx(StyledInput,{id:"select-label",size:"small",children:"Expertise level"}),jsxRuntimeExports.jsx(StyledSelect,{id:"demo-multiple-name",input:jsxRuntimeExports.jsx(OutlinedInput$1,{label:"Expertise level"}),labelId:"select-label",MenuProps,onChange:bt,size:"small",value:rt,children:names.map(xt=>jsxRuntimeExports.jsx(MenuItem$3,{component:"li",value:xt,children:xt},xt))})]})})}),jsxRuntimeExports.jsx(ResponsesWrapper,{children:ct==null?void 0:ct.map((xt,kt)=>jsxRuntimeExports.jsxs(Flex,{className:"response",py:12,children:[jsxRuntimeExports.jsx(Text$3,{kind:"medium",children:xt}),jsxRuntimeExports.jsx(Flex,{py:12,children:(ut==null?void 0:ut[kt])!==void 0?jsxRuntimeExports.jsx(Text$3,{color:"unreadMsgText",children:ut[kt]}):jsxRuntimeExports.jsxs(Flex,{align:"center",py:12,children:[jsxRuntimeExports.jsx(Flex,{align:"center",py:12,children:jsxRuntimeExports.jsx(PropagateLoader,{color:colors.white})}),jsxRuntimeExports.jsx(Flex,{align:"center",py:12,children:jsxRuntimeExports.jsx(Text$3,{children:"Generating response"})})]})})]},xt))}),jsxRuntimeExports.jsxs(TextAreaWrapper,{onKeyDown:vt,py:12,tabIndex:-1,children:[jsxRuntimeExports.jsx(StyledTextarea,{disabled:pt,onChange:xt=>nt(xt.target.value),placeholder:"Enter your question",value:et}),jsxRuntimeExports.jsx(IconWrapper$1,{children:jsxRuntimeExports.jsx(MdSend,{color:yt?colors.white:colors.gray300,size:"18"})})]})]})},AskQuestionContainer=styled$4.div` margin-top: 20px; `,StyledTextarea=styled$4(TextareaAutosize)` background: ${colors.inputBg1}; @@ -7581,7 +7608,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho &:hover { background-color: ${colors.gray200}; } -`,CheckIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 10 7",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{d:"M3.08467 5.34482L8.02842 0.401074C8.14508 0.284408 8.28363 0.226074 8.44404 0.226074C8.60446 0.226074 8.743 0.284408 8.85967 0.401074C8.97633 0.517741 9.03467 0.656283 9.03467 0.816699C9.03467 0.977116 8.97633 1.11566 8.85967 1.23232L3.493 6.59899C3.37633 6.71566 3.24022 6.77399 3.08467 6.77399C2.92911 6.77399 2.793 6.71566 2.67633 6.59899L0.168 4.09066C0.0513333 3.97399 -0.00456944 3.83545 0.000291667 3.67503C0.00515278 3.51462 0.0659167 3.37607 0.182583 3.25941C0.29925 3.14274 0.437792 3.08441 0.598208 3.08441C0.758625 3.08441 0.897167 3.14274 1.01383 3.25941L3.08467 5.34482Z",fill:"currentColor"})}),ChevronDownIcon=tt=>jsxRuntimeExports.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2337_2483",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"14",height:"14",children:jsxRuntimeExports.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_2337_2483)",children:jsxRuntimeExports.jsx("path",{d:"M7.00001 8.72074C6.92223 8.72074 6.84931 8.70858 6.78126 8.68428C6.7132 8.65997 6.65001 8.61865 6.59167 8.56032L3.90834 5.87699C3.8014 5.77004 3.74792 5.63393 3.74792 5.46865C3.74792 5.30337 3.8014 5.16726 3.90834 5.06032C4.01529 4.95337 4.1514 4.8999 4.31667 4.8999C4.48195 4.8999 4.61806 4.95337 4.72501 5.06032L7.00001 7.33532L9.27501 5.06032C9.38195 4.95337 9.51806 4.8999 9.68334 4.8999C9.84862 4.8999 9.98473 4.95337 10.0917 5.06032C10.1986 5.16726 10.2521 5.30337 10.2521 5.46865C10.2521 5.63393 10.1986 5.77004 10.0917 5.87699L7.40834 8.56032C7.35001 8.61865 7.28681 8.65997 7.21876 8.68428C7.1507 8.70858 7.07779 8.72074 7.00001 8.72074Z",fill:"currentColor"})})]}),ChevronUpIcon=tt=>jsxRuntimeExports.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_2337_2442",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"14",height:"14",children:jsxRuntimeExports.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_2337_2442)",children:jsxRuntimeExports.jsx("path",{d:"M7.00001 6.28532L4.72501 8.56032C4.61806 8.66726 4.48195 8.72074 4.31667 8.72074C4.1514 8.72074 4.01529 8.66726 3.90834 8.56032C3.8014 8.45337 3.74792 8.31726 3.74792 8.15199C3.74792 7.98671 3.8014 7.8506 3.90834 7.74365L6.59167 5.06032C6.65001 5.00199 6.7132 4.96067 6.78126 4.93636C6.84931 4.91206 6.92223 4.8999 7.00001 4.8999C7.07779 4.8999 7.1507 4.91206 7.21876 4.93636C7.28681 4.96067 7.35001 5.00199 7.40834 5.06032L10.0917 7.74365C10.1986 7.8506 10.2521 7.98671 10.2521 8.15199C10.2521 8.31726 10.1986 8.45337 10.0917 8.56032C9.98473 8.66726 9.84862 8.72074 9.68334 8.72074C9.51806 8.72074 9.38195 8.66726 9.27501 8.56032L7.00001 6.28532Z",fill:"currentColor"})})]}),options={all:"All",show:"Show",episode:"Episode",twitter_space:"Twitter Space",tweet:"Tweet",youtube:"Video (Youtube)",person:"People (Person)",document:"Document",podcast:"Podcast"},SelectWithPopover=()=>{const[tt,et]=reactExports.useState(null),[nt,rt]=useDataStore(st=>[st.sidebarFilter,st.setSidebarFilter]),it=st=>{et(st.currentTarget)},ot=()=>{et(null)},at=st=>{rt(st),ot()};return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(Action,{onClick:it,children:[jsxRuntimeExports.jsx("div",{className:"text",children:"Show"}),jsxRuntimeExports.jsx("div",{className:"value",children:options[nt]}),jsxRuntimeExports.jsx("div",{className:"icon",children:tt?jsxRuntimeExports.jsx(ChevronUpIcon,{}):jsxRuntimeExports.jsx(ChevronDownIcon,{})})]}),jsxRuntimeExports.jsx(StyledPopover,{anchorEl:tt,anchorOrigin:{vertical:"bottom",horizontal:"left"},anchorPosition:{top:62,left:0},onClose:ot,open:!!tt,transformOrigin:{vertical:"top",horizontal:"left"},children:jsxRuntimeExports.jsx(FormControl$1,{children:Object.keys(options).map(st=>jsxRuntimeExports.jsxs(MenuItem,{className:clsx$1({active:st===nt}),onClick:()=>at(st),children:[jsxRuntimeExports.jsx("span",{className:"icon",children:st===nt?jsxRuntimeExports.jsx(CheckIcon,{}):null}),jsxRuntimeExports.jsx("span",{children:options[st]})]},st))})})]})},Action=styled$4(Flex).attrs({direction:"row",align:"center"})` +`,options={all:"All",show:"Show",episode:"Episode",twitter_space:"Twitter Space",tweet:"Tweet",youtube:"Video (Youtube)",person:"People (Person)",document:"Document",podcast:"Podcast"},SelectWithPopover=()=>{const[tt,et]=reactExports.useState(null),[nt,rt]=useDataStore(st=>[st.sidebarFilter,st.setSidebarFilter]),it=st=>{et(st.currentTarget)},ot=()=>{et(null)},at=st=>{rt(st),ot()};return jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs(Action,{onClick:it,children:[jsxRuntimeExports.jsx("div",{className:"text",children:"Show"}),jsxRuntimeExports.jsx("div",{className:"value",children:options[nt]}),jsxRuntimeExports.jsx("div",{className:"icon",children:tt?jsxRuntimeExports.jsx(ChevronUpIcon,{}):jsxRuntimeExports.jsx(ChevronDownIcon,{})})]}),jsxRuntimeExports.jsx(StyledPopover,{anchorEl:tt,anchorOrigin:{vertical:"bottom",horizontal:"left"},anchorPosition:{top:62,left:0},onClose:ot,open:!!tt,transformOrigin:{vertical:"top",horizontal:"left"},children:jsxRuntimeExports.jsx(FormControl$1,{children:Object.keys(options).map(st=>jsxRuntimeExports.jsxs(MenuItem,{className:clsx$1({active:st===nt}),onClick:()=>at(st),children:[jsxRuntimeExports.jsx("span",{className:"icon",children:st===nt?jsxRuntimeExports.jsx(CheckIcon,{}):null}),jsxRuntimeExports.jsx("span",{children:options[st]})]},st))})})]})},Action=styled$4(Flex).attrs({direction:"row",align:"center"})` cursor: pointer; flex-grow: 1; color: ${colors.GRAY6}; @@ -7934,7 +7961,32 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho @keyframes `.concat(rt,` { `).concat(et,` } - `);return ot&&ot.insertRule(at,0),rt};animation.createAnimation=createAnimation;var __assign=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign=Object.assign||function(tt){for(var et,nt=1,rt=arguments.length;nt{let et=await distExports$1.enable(!0);if(et||console.warn("Sphinx enable failed, means no pubkey and no budget (including budget of 0)"),et=await distExports$1.keysend(sphinxPubkey,tt),!(et!=null&&et.success)){if(et=await distExports$1.topup(),!(et!=null&&et.budget)||(et==null?void 0:et.budget){const nt=await boostAgainstBudget(et),rt={amount:et,refid:tt};return await api.post("/boost",JSON.stringify(rt)),nt},notify=tt=>{toast(jsxRuntimeExports.jsx(ToastMessage,{message:tt}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:tt===BOOST_SUCCESS?"success":"error"})},Booster=({count:tt=0,updateCount:et,content:nt,readOnly:rt,refId:it})=>{const[ot,at]=reactExports.useState(!1),[st,lt]=reactExports.useState(!1),[ct]=useUserStore(pt=>[pt.setBudget]);reactExports.useEffect(()=>{lt(!1),at(!1)},[it]);let{image_url:ut}=nt||{};ut&&(ut=ut.replace(".jpg","_l.jpg"));const ht=5;async function dt(){if(!(ot||!it)){at(!0);try{const pt=await boost(it,ht);lt(!0),notify(BOOST_SUCCESS),et&&et(tt+ht),pt.budget&&ct(pt.budget)}catch{notify(BOOST_ERROR_BUDGET)}at(!1)}}return rt?tt?jsxRuntimeExports.jsx(Pill,{className:"booster__pill",style:{padding:"1px 8px 1px 3px",width:"fit-content"},children:jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",justify:"center",children:[jsxRuntimeExports.jsx(MdBolt,{fontSize:12}),jsxRuntimeExports.jsx("div",{style:{fontSize:10},children:tt||0})]})}):null:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Pill,{disabled:ot,onClick:async()=>{st||ot||await dt()},style:{padding:"4px 8px",borderWidth:0,backgroundColor:"#303342",height:"25px",width:"fit-content"},children:ot?jsxRuntimeExports.jsx(_default,{color:"#fff",loading:!0,size:10}):jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",justify:"space-around",children:[jsxRuntimeExports.jsx(BoostIcon,{style:{color:colors.white}}),jsxRuntimeExports.jsx("div",{style:{marginLeft:8,marginRight:8},children:"Boost"})]})})})},defaultData={isPlaying:!1},usePlayerStore=react(tt=>({...defaultData,setIsPlaying:et=>tt({isPlaying:et})})),NotesIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"notes",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1473_73722",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1473_73722)",children:jsxRuntimeExports.jsx("path",{id:"notes_2",d:"M2.83337 11.7564C2.69171 11.7564 2.57296 11.7085 2.47712 11.6126C2.38129 11.5167 2.33337 11.3979 2.33337 11.2562C2.33337 11.1144 2.38129 10.9957 2.47712 10.9C2.57296 10.8043 2.69171 10.7564 2.83337 10.7564H9.16668C9.30834 10.7564 9.42709 10.8043 9.52293 10.9002C9.61876 10.9961 9.66668 11.1149 9.66668 11.2566C9.66668 11.3983 9.61876 11.5171 9.52293 11.6128C9.42709 11.7085 9.30834 11.7564 9.16668 11.7564H2.83337ZM2.83337 8.49997C2.69171 8.49997 2.57296 8.45204 2.47712 8.35617C2.38129 8.2603 2.33337 8.1415 2.33337 7.99977C2.33337 7.85804 2.38129 7.73931 2.47712 7.64359C2.57296 7.54787 2.69171 7.50001 2.83337 7.50001H13.1667C13.3083 7.50001 13.4271 7.54794 13.5229 7.64381C13.6188 7.73969 13.6667 7.85849 13.6667 8.00021C13.6667 8.14194 13.6188 8.26067 13.5229 8.35639C13.4271 8.45211 13.3083 8.49997 13.1667 8.49997H2.83337ZM2.83337 5.24357C2.69171 5.24357 2.57296 5.19564 2.47712 5.09976C2.38129 5.00389 2.33337 4.88509 2.33337 4.74336C2.33337 4.60164 2.38129 4.48291 2.47712 4.38719C2.57296 4.29146 2.69171 4.24359 2.83337 4.24359H13.1667C13.3083 4.24359 13.4271 4.29153 13.5229 4.38741C13.6188 4.48329 13.6667 4.60209 13.6667 4.74381C13.6667 4.88554 13.6188 5.00427 13.5229 5.09999C13.4271 5.19571 13.3083 5.24357 13.1667 5.24357H2.83337Z",fill:"currentColor"})})]})}),Description=({stateless:tt,node:et})=>jsxRuntimeExports.jsxs(Flex,{grow:1,shrink:1,children:[jsxRuntimeExports.jsx(Header$1,{children:tt&&jsxRuntimeExports.jsxs(Heading$2,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(NotesIcon,{})}),jsxRuntimeExports.jsx("div",{className:"title",children:"Description"})]})}),jsxRuntimeExports.jsx(Box$1,{children:et!=null&&et.description?`"${et==null?void 0:et.description}"`:"..."})]}),Heading$2=styled$4(Flex).attrs({direction:"row",align:"center"})` + `);return ot&&ot.insertRule(at,0),rt};animation.createAnimation=createAnimation;var __assign=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign=Object.assign||function(tt){for(var et,nt=1,rt=arguments.length;nttt?"0.7":"1"}; + + padding: 10px 20px; + +${({disabled:tt})=>tt&&Ae` + cursor: none; + opacity: 0.5; + `} + + } + + &:hover { + background: ${({selected:tt})=>tt?colors.gray300:colors.gray200}; + } +} +`,sphinxPubkey="023d8eb306f0027b902fbdc81d33b49b6558b3434d374626f8c324979c92d47c21",boostAgainstBudget=async tt=>{let et=await distExports$1.enable(!0);if(et||console.warn("Sphinx enable failed, means no pubkey and no budget (including budget of 0)"),et=await distExports$1.keysend(sphinxPubkey,tt),!(et!=null&&et.success)){if(et=await distExports$1.topup(),!(et!=null&&et.budget)||(et==null?void 0:et.budget){const nt=await boostAgainstBudget(et),rt={amount:et,refid:tt};return await api.post("/boost",JSON.stringify(rt)),nt},notify=tt=>{toast(jsxRuntimeExports.jsx(ToastMessage,{message:tt}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:tt===BOOST_SUCCESS?"success":"error"})},Booster=({count:tt=0,updateCount:et,content:nt,readOnly:rt,refId:it})=>{const[ot,at]=reactExports.useState(!1),[st,lt]=reactExports.useState(!1),[ct]=useUserStore(pt=>[pt.setBudget]);reactExports.useEffect(()=>{lt(!1),at(!1)},[it]);let{image_url:ut}=nt||{};ut&&(ut=ut.replace(".jpg","_l.jpg"));const ht=5;async function dt(){if(!(ot||!it)){at(!0);try{const pt=await boost(it,ht);lt(!0),notify(BOOST_SUCCESS),et&&et(tt+ht),pt.budget&&ct(pt.budget)}catch{notify(BOOST_ERROR_BUDGET)}at(!1)}}return rt?tt?jsxRuntimeExports.jsx(Pill,{className:"booster__pill",style:{padding:"1px 8px 1px 3px",width:"fit-content"},children:jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",justify:"center",children:[jsxRuntimeExports.jsx(MdBolt,{fontSize:12}),jsxRuntimeExports.jsx("div",{style:{fontSize:10},children:tt||0})]})}):null:jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(Pill,{disabled:ot,onClick:async()=>{st||ot||await dt()},style:{padding:"4px 8px",borderWidth:0,backgroundColor:"#303342",height:"25px",width:"fit-content"},children:ot?jsxRuntimeExports.jsx(_default,{color:"#fff",loading:!0,size:10}):jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",justify:"space-around",children:[jsxRuntimeExports.jsx(BoostIcon,{style:{color:colors.white}}),jsxRuntimeExports.jsx("div",{style:{marginLeft:8,marginRight:8},children:"Boost"})]})})})},defaultData={isPlaying:!1},usePlayerStore=react(tt=>({...defaultData,setIsPlaying:et=>tt({isPlaying:et})})),NotesIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"notes",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1473_73722",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1473_73722)",children:jsxRuntimeExports.jsx("path",{id:"notes_2",d:"M2.83337 11.7564C2.69171 11.7564 2.57296 11.7085 2.47712 11.6126C2.38129 11.5167 2.33337 11.3979 2.33337 11.2562C2.33337 11.1144 2.38129 10.9957 2.47712 10.9C2.57296 10.8043 2.69171 10.7564 2.83337 10.7564H9.16668C9.30834 10.7564 9.42709 10.8043 9.52293 10.9002C9.61876 10.9961 9.66668 11.1149 9.66668 11.2566C9.66668 11.3983 9.61876 11.5171 9.52293 11.6128C9.42709 11.7085 9.30834 11.7564 9.16668 11.7564H2.83337ZM2.83337 8.49997C2.69171 8.49997 2.57296 8.45204 2.47712 8.35617C2.38129 8.2603 2.33337 8.1415 2.33337 7.99977C2.33337 7.85804 2.38129 7.73931 2.47712 7.64359C2.57296 7.54787 2.69171 7.50001 2.83337 7.50001H13.1667C13.3083 7.50001 13.4271 7.54794 13.5229 7.64381C13.6188 7.73969 13.6667 7.85849 13.6667 8.00021C13.6667 8.14194 13.6188 8.26067 13.5229 8.35639C13.4271 8.45211 13.3083 8.49997 13.1667 8.49997H2.83337ZM2.83337 5.24357C2.69171 5.24357 2.57296 5.19564 2.47712 5.09976C2.38129 5.00389 2.33337 4.88509 2.33337 4.74336C2.33337 4.60164 2.38129 4.48291 2.47712 4.38719C2.57296 4.29146 2.69171 4.24359 2.83337 4.24359H13.1667C13.3083 4.24359 13.4271 4.29153 13.5229 4.38741C13.6188 4.48329 13.6667 4.60209 13.6667 4.74381C13.6667 4.88554 13.6188 5.00427 13.5229 5.09999C13.4271 5.19571 13.3083 5.24357 13.1667 5.24357H2.83337Z",fill:"currentColor"})})]})}),Description=({stateless:tt,node:et})=>jsxRuntimeExports.jsxs(Flex,{grow:1,shrink:1,children:[jsxRuntimeExports.jsx(Header$1,{children:tt&&jsxRuntimeExports.jsxs(Heading$2,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(NotesIcon,{})}),jsxRuntimeExports.jsx("div",{className:"title",children:"Description"})]})}),jsxRuntimeExports.jsx(Box$1,{children:et!=null&&et.description?`"${et==null?void 0:et.description}"`:"..."})]}),Heading$2=styled$4(Flex).attrs({direction:"row",align:"center"})` .icon { font-size: 16px; color: ${colors.GRAY3}; @@ -8320,4 +8372,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho color: ${colors.white}; font-size: 12px; opacity: 0.5; -`,App=()=>{const{open:tt}=useModal("budgetExplanation"),[et]=useUserStore(kt=>[kt.setBudget]),[nt,rt,it,ot,at,st]=[useAppStore(kt=>kt.setSidebarOpen),useAppStore(kt=>kt.currentSearch),useAppStore(kt=>kt.setCurrentSearch),useAppStore(kt=>kt.setRelevanceSelected),useAppStore(kt=>kt.setTranscriptOpen),useAppStore(kt=>kt.hasBudgetExplanationModalBeSeen)],lt=useTeachStore(kt=>kt.setTeachMeAnswer),[ct,ut,ht,dt,pt,mt,gt]=[useDataStore(kt=>kt.data),useDataStore(kt=>kt.setData),useDataStore(kt=>kt.fetchData),useDataStore(kt=>kt.graphStyle),useDataStore(kt=>kt.setSphinxModalOpen),useDataStore(kt=>kt.setSelectedNode),useDataStore(kt=>kt.setCategoryFilter)],yt=useForm({mode:"onChange"}),bt=yt.handleSubmit(({search:kt})=>{at(!1),mt(null),ot(!1),it(kt),lt(""),gt(null)}),vt=reactExports.useCallback(async()=>{rt&&(pt(!0),isE2E||(await distExports$1.enable(),await updateBudget(et)),pt(!1)),await ht(rt),nt(!0),await updateBudget(et)},[ht,rt,pt,nt,et]);reactExports.useEffect(()=>{if(rt&&!st){tt();return}vt()},[rt,vt,st]);const xt=()=>{if(ct){const kt=getGraphDataPositions(dt,ct.nodes);ut(kt)}};return reactExports.useEffect(()=>{xt()},[dt]),jsxRuntimeExports.jsxs(AppProviders,{children:[jsxRuntimeExports.jsx(GlobalStyle,{}),jsxRuntimeExports.jsx(Leva,{hidden:!isDevelopment}),jsxRuntimeExports.jsxs(Wrapper,{direction:"row",children:[jsxRuntimeExports.jsx(DataRetriever,{loader:jsxRuntimeExports.jsx(Preloader,{}),children:jsxRuntimeExports.jsxs(FormProvider,{...yt,children:[jsxRuntimeExports.jsx(MainToolbar,{}),jsxRuntimeExports.jsx(SideBar,{onSubmit:bt}),jsxRuntimeExports.jsx(Universe,{}),jsxRuntimeExports.jsx(SecondarySideBar,{}),jsxRuntimeExports.jsx(AppBar,{}),jsxRuntimeExports.jsxs(Version,{children:["v",version]}),jsxRuntimeExports.jsx(ActionsToolbar,{})]})}),jsxRuntimeExports.jsx(AddNodeModal,{}),jsxRuntimeExports.jsx(Toasts,{}),jsxRuntimeExports.jsx(BudgetExplanationModal,{}),jsxRuntimeExports.jsx(SourcesTableModal,{}),jsxRuntimeExports.jsx(Helper,{})]}),jsxRuntimeExports.jsx(E2ETests,{})]})},scriptRel="modulepreload",assetsURL=function(tt){return"/"+tt},seen={},__vitePreload=function tt(et,nt,rt){if(!nt||nt.length===0)return et();const it=document.getElementsByTagName("link");return Promise.all(nt.map(ot=>{if(ot=assetsURL(ot),ot in seen)return;seen[ot]=!0;const at=ot.endsWith(".css"),st=at?'[rel="stylesheet"]':"";if(!!rt)for(let ut=it.length-1;ut>=0;ut--){const ht=it[ut];if(ht.href===ot&&(!at||ht.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${ot}"]${st}`))return;const ct=document.createElement("link");if(ct.rel=at?"stylesheet":scriptRel,at||(ct.as="script",ct.crossOrigin=""),ct.href=ot,document.head.appendChild(ct),at)return new Promise((ut,ht)=>{ct.addEventListener("load",ut),ct.addEventListener("error",()=>ht(new Error(`Unable to preload CSS for ${ot}`)))})})).then(()=>et()).catch(ot=>{const at=new Event("vite:preloadError",{cancelable:!0});if(at.payload=ot,window.dispatchEvent(at),!at.defaultPrevented)throw ot})},reportWebVitals=tt=>{tt&&tt instanceof Function&&__vitePreload(()=>import("./web-vitals-60d3425a.js"),[]).then(({getCLS:et,getFID:nt,getFCP:rt,getLCP:it,getTTFB:ot})=>{et(tt),nt(tt),rt(tt),it(tt),ot(tt)})},index="",styles="",getElementsMemoized=()=>{const tt={};return()=>{if(tt.inner&&tt.body)return tt;const et=document.querySelector("body"),nt=document.createElement("div"),rt=document.createElement("div"),it=document.createElement("div"),ot=document.createElement("div"),at=()=>{nt.classList.toggle("hide")};return it.addEventListener("click",at),ot.addEventListener("click",at),nt.classList.add("loggerWrapper"),nt.classList.add("hide"),rt.classList.add("loggerInner"),it.classList.add("close"),ot.classList.add("open"),it.textContent="X",ot.textContent="OPEN LOG",et==null||et.appendChild(nt),et==null||et.appendChild(ot),nt.appendChild(it),nt.appendChild(rt),tt.body=et,tt.inner=rt,{body:et,inner:rt}}},getElements=getElementsMemoized(),variants=["log","info","warn","error"],logMessage=(tt,et)=>{const{inner:nt}=getElements(),rt=document.createElement("span");rt.textContent=tt,rt.classList.add("message"),rt.classList.add(et),nt.appendChild(rt)},overrideConsole=()=>{if(!window.location.hostname.includes("local"))return;const tt=function(et){const nt=variants.reduce((rt,it)=>({...rt,[it](...ot){et[it](...ot),logMessage(JSON.stringify(ot,null," "),it)}}),{});return{...et,...nt}}(window.console);window.console=tt},root=client$1.createRoot(document.getElementById("root"));root.render(isE2E?jsxRuntimeExports.jsx(App,{}):jsxRuntimeExports.jsx(React$1.StrictMode,{children:jsxRuntimeExports.jsx(App,{})}));reportWebVitals();overrideConsole()});export default s4(); +`,App=()=>{const{open:tt}=useModal("budgetExplanation"),[et]=useUserStore(kt=>[kt.setBudget]),[nt,rt,it,ot,at,st]=[useAppStore(kt=>kt.setSidebarOpen),useAppStore(kt=>kt.currentSearch),useAppStore(kt=>kt.setCurrentSearch),useAppStore(kt=>kt.setRelevanceSelected),useAppStore(kt=>kt.setTranscriptOpen),useAppStore(kt=>kt.hasBudgetExplanationModalBeSeen)],lt=useTeachStore(kt=>kt.setTeachMeAnswer),[ct,ut,ht,dt,pt,mt,gt]=[useDataStore(kt=>kt.data),useDataStore(kt=>kt.setData),useDataStore(kt=>kt.fetchData),useDataStore(kt=>kt.graphStyle),useDataStore(kt=>kt.setSphinxModalOpen),useDataStore(kt=>kt.setSelectedNode),useDataStore(kt=>kt.setCategoryFilter)],yt=useForm({mode:"onChange"}),bt=yt.handleSubmit(({search:kt})=>{at(!1),mt(null),ot(!1),it(kt),lt(""),gt(null)}),vt=reactExports.useCallback(async()=>{rt&&(pt(!0),isE2E||(await distExports$1.enable(),await updateBudget(et)),pt(!1)),await ht(rt),nt(!0),await updateBudget(et)},[ht,rt,pt,nt,et]);reactExports.useEffect(()=>{if(rt&&!st){tt();return}vt()},[rt,vt,st]);const xt=()=>{if(ct){const kt=getGraphDataPositions(dt,ct.nodes);ut(kt)}};return reactExports.useEffect(()=>{xt()},[dt]),jsxRuntimeExports.jsxs(AppProviders,{children:[jsxRuntimeExports.jsx(GlobalStyle,{}),jsxRuntimeExports.jsx(Leva,{hidden:!isDevelopment}),jsxRuntimeExports.jsxs(Wrapper,{direction:"row",children:[jsxRuntimeExports.jsx(DataRetriever,{loader:jsxRuntimeExports.jsx(Preloader,{}),children:jsxRuntimeExports.jsxs(FormProvider,{...yt,children:[jsxRuntimeExports.jsx(MainToolbar,{}),jsxRuntimeExports.jsx(SideBar,{onSubmit:bt}),jsxRuntimeExports.jsx(Universe,{}),jsxRuntimeExports.jsx(SecondarySideBar,{}),jsxRuntimeExports.jsx(AppBar,{}),jsxRuntimeExports.jsxs(Version,{children:["v",version]}),jsxRuntimeExports.jsx(ActionsToolbar,{})]})}),jsxRuntimeExports.jsx(AddNodeModal,{}),jsxRuntimeExports.jsx(Toasts,{}),jsxRuntimeExports.jsx(BudgetExplanationModal,{}),jsxRuntimeExports.jsx(SourcesTableModal,{}),jsxRuntimeExports.jsx(Helper,{})]}),jsxRuntimeExports.jsx(E2ETests,{})]})},scriptRel="modulepreload",assetsURL=function(tt){return"/"+tt},seen={},__vitePreload=function tt(et,nt,rt){if(!nt||nt.length===0)return et();const it=document.getElementsByTagName("link");return Promise.all(nt.map(ot=>{if(ot=assetsURL(ot),ot in seen)return;seen[ot]=!0;const at=ot.endsWith(".css"),st=at?'[rel="stylesheet"]':"";if(!!rt)for(let ut=it.length-1;ut>=0;ut--){const ht=it[ut];if(ht.href===ot&&(!at||ht.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${ot}"]${st}`))return;const ct=document.createElement("link");if(ct.rel=at?"stylesheet":scriptRel,at||(ct.as="script",ct.crossOrigin=""),ct.href=ot,document.head.appendChild(ct),at)return new Promise((ut,ht)=>{ct.addEventListener("load",ut),ct.addEventListener("error",()=>ht(new Error(`Unable to preload CSS for ${ot}`)))})})).then(()=>et()).catch(ot=>{const at=new Event("vite:preloadError",{cancelable:!0});if(at.payload=ot,window.dispatchEvent(at),!at.defaultPrevented)throw ot})},reportWebVitals=tt=>{tt&&tt instanceof Function&&__vitePreload(()=>import("./web-vitals-60d3425a.js"),[]).then(({getCLS:et,getFID:nt,getFCP:rt,getLCP:it,getTTFB:ot})=>{et(tt),nt(tt),rt(tt),it(tt),ot(tt)})},index="",styles="",getElementsMemoized=()=>{const tt={};return()=>{if(tt.inner&&tt.body)return tt;const et=document.querySelector("body"),nt=document.createElement("div"),rt=document.createElement("div"),it=document.createElement("div"),ot=document.createElement("div"),at=()=>{nt.classList.toggle("hide")};return it.addEventListener("click",at),ot.addEventListener("click",at),nt.classList.add("loggerWrapper"),nt.classList.add("hide"),rt.classList.add("loggerInner"),it.classList.add("close"),ot.classList.add("open"),it.textContent="X",ot.textContent="OPEN LOG",et==null||et.appendChild(nt),et==null||et.appendChild(ot),nt.appendChild(it),nt.appendChild(rt),tt.body=et,tt.inner=rt,{body:et,inner:rt}}},getElements=getElementsMemoized(),variants=["log","info","warn","error"],logMessage=(tt,et)=>{const{inner:nt}=getElements(),rt=document.createElement("span");rt.textContent=tt,rt.classList.add("message"),rt.classList.add(et),nt.appendChild(rt)},overrideConsole=()=>{if(!window.location.hostname.includes("local"))return;const tt=function(et){const nt=variants.reduce((rt,it)=>({...rt,[it](...ot){et[it](...ot),logMessage(JSON.stringify(ot,null," "),it)}}),{});return{...et,...nt}}(window.console);window.console=tt},root=client$1.createRoot(document.getElementById("root"));root.render(isE2E?jsxRuntimeExports.jsx(App,{}):jsxRuntimeExports.jsx(React$1.StrictMode,{children:jsxRuntimeExports.jsx(App,{})}));reportWebVitals();overrideConsole()});export default l4(); diff --git a/build/index.html b/build/index.html index e3044839a..4364e520a 100644 --- a/build/index.html +++ b/build/index.html @@ -22,7 +22,7 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Second Brain - +