diff --git a/build/assets/index-e8118d7f.js b/build/assets/index-337682da.js similarity index 98% rename from build/assets/index-e8118d7f.js rename to build/assets/index-337682da.js index 0831c390f..cc3c693c4 100644 --- a/build/assets/index-e8118d7f.js +++ b/build/assets/index-337682da.js @@ -42,10 +42,10 @@ var r4=Object.defineProperty;var i4=(tt,et,nt)=>et in tt?r4(tt,et,{enumerable:!0 `+it[at].replace(" at new "," at ");return tt.displayName&<.includes("")&&(lt=lt.replace("",tt.displayName)),lt}while(1<=at&&0<=st);break}}}finally{Na=!1,Error.prepareStackTrace=nt}return(tt=tt?tt.displayName||tt.name:"")?Ma(tt):""}function Pa(tt){switch(tt.tag){case 5:return Ma(tt.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return tt=Oa(tt.type,!1),tt;case 11:return tt=Oa(tt.type.render,!1),tt;case 1:return tt=Oa(tt.type,!0),tt;default:return""}}function Qa(tt){if(tt==null)return null;if(typeof tt=="function")return tt.displayName||tt.name||null;if(typeof tt=="string")return tt;switch(tt){case ya:return"Fragment";case wa:return"Portal";case Aa:return"Profiler";case za:return"StrictMode";case Ea:return"Suspense";case Fa:return"SuspenseList"}if(typeof tt=="object")switch(tt.$$typeof){case Ca:return(tt.displayName||"Context")+".Consumer";case Ba:return(tt._context.displayName||"Context")+".Provider";case Da:var et=tt.render;return tt=tt.displayName,tt||(tt=et.displayName||et.name||"",tt=tt!==""?"ForwardRef("+tt+")":"ForwardRef"),tt;case Ga:return et=tt.displayName||null,et!==null?et:Qa(tt.type)||"Memo";case Ha:et=tt._payload,tt=tt._init;try{return Qa(tt(et))}catch{}}return null}function Ra(tt){var et=tt.type;switch(tt.tag){case 24:return"Cache";case 9:return(et.displayName||"Context")+".Consumer";case 10:return(et._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return tt=et.render,tt=tt.displayName||tt.name||"",et.displayName||(tt!==""?"ForwardRef("+tt+")":"ForwardRef");case 7:return"Fragment";case 5:return et;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Qa(et);case 8:return et===za?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof et=="function")return et.displayName||et.name||null;if(typeof et=="string")return et}return null}function Sa(tt){switch(typeof tt){case"boolean":case"number":case"string":case"undefined":return tt;case"object":return tt;default:return""}}function Ta(tt){var et=tt.type;return(tt=tt.nodeName)&&tt.toLowerCase()==="input"&&(et==="checkbox"||et==="radio")}function Ua(tt){var et=Ta(tt)?"checked":"value",nt=Object.getOwnPropertyDescriptor(tt.constructor.prototype,et),rt=""+tt[et];if(!tt.hasOwnProperty(et)&&typeof nt<"u"&&typeof nt.get=="function"&&typeof nt.set=="function"){var it=nt.get,ot=nt.set;return Object.defineProperty(tt,et,{configurable:!0,get:function(){return it.call(this)},set:function(at){rt=""+at,ot.call(this,at)}}),Object.defineProperty(tt,et,{enumerable:nt.enumerable}),{getValue:function(){return rt},setValue:function(at){rt=""+at},stopTracking:function(){tt._valueTracker=null,delete tt[et]}}}}function Va(tt){tt._valueTracker||(tt._valueTracker=Ua(tt))}function Wa(tt){if(!tt)return!1;var et=tt._valueTracker;if(!et)return!0;var nt=et.getValue(),rt="";return tt&&(rt=Ta(tt)?tt.checked?"true":"false":tt.value),tt=rt,tt!==nt?(et.setValue(tt),!0):!1}function Xa(tt){if(tt=tt||(typeof document<"u"?document:void 0),typeof tt>"u")return null;try{return tt.activeElement||tt.body}catch{return tt.body}}function Ya(tt,et){var nt=et.checked;return A$3({},et,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:nt??tt._wrapperState.initialChecked})}function Za(tt,et){var nt=et.defaultValue==null?"":et.defaultValue,rt=et.checked!=null?et.checked:et.defaultChecked;nt=Sa(et.value!=null?et.value:nt),tt._wrapperState={initialChecked:rt,initialValue:nt,controlled:et.type==="checkbox"||et.type==="radio"?et.checked!=null:et.value!=null}}function ab(tt,et){et=et.checked,et!=null&&ta(tt,"checked",et,!1)}function bb(tt,et){ab(tt,et);var nt=Sa(et.value),rt=et.type;if(nt!=null)rt==="number"?(nt===0&&tt.value===""||tt.value!=nt)&&(tt.value=""+nt):tt.value!==""+nt&&(tt.value=""+nt);else if(rt==="submit"||rt==="reset"){tt.removeAttribute("value");return}et.hasOwnProperty("value")?cb(tt,et.type,nt):et.hasOwnProperty("defaultValue")&&cb(tt,et.type,Sa(et.defaultValue)),et.checked==null&&et.defaultChecked!=null&&(tt.defaultChecked=!!et.defaultChecked)}function db(tt,et,nt){if(et.hasOwnProperty("value")||et.hasOwnProperty("defaultValue")){var rt=et.type;if(!(rt!=="submit"&&rt!=="reset"||et.value!==void 0&&et.value!==null))return;et=""+tt._wrapperState.initialValue,nt||et===tt.value||(tt.value=et),tt.defaultValue=et}nt=tt.name,nt!==""&&(tt.name=""),tt.defaultChecked=!!tt._wrapperState.initialChecked,nt!==""&&(tt.name=nt)}function cb(tt,et,nt){(et!=="number"||Xa(tt.ownerDocument)!==tt)&&(nt==null?tt.defaultValue=""+tt._wrapperState.initialValue:tt.defaultValue!==""+nt&&(tt.defaultValue=""+nt))}var eb=Array.isArray;function fb(tt,et,nt,rt){if(tt=tt.options,et){et={};for(var it=0;it"+et.valueOf().toString()+"",et=mb.firstChild;tt.firstChild;)tt.removeChild(tt.firstChild);for(;et.firstChild;)tt.appendChild(et.firstChild)}});function ob(tt,et){if(et){var nt=tt.firstChild;if(nt&&nt===tt.lastChild&&nt.nodeType===3){nt.nodeValue=et;return}}tt.textContent=et}var pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=["Webkit","ms","Moz","O"];Object.keys(pb).forEach(function(tt){qb.forEach(function(et){et=et+tt.charAt(0).toUpperCase()+tt.substring(1),pb[et]=pb[tt]})});function rb(tt,et,nt){return et==null||typeof et=="boolean"||et===""?"":nt||typeof et!="number"||et===0||pb.hasOwnProperty(tt)&&pb[tt]?(""+et).trim():et+"px"}function sb(tt,et){tt=tt.style;for(var nt in et)if(et.hasOwnProperty(nt)){var rt=nt.indexOf("--")===0,it=rb(nt,et[nt],rt);nt==="float"&&(nt="cssFloat"),rt?tt.setProperty(nt,it):tt[nt]=it}}var tb=A$3({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ub(tt,et){if(et){if(tb[tt]&&(et.children!=null||et.dangerouslySetInnerHTML!=null))throw Error(p$a(137,tt));if(et.dangerouslySetInnerHTML!=null){if(et.children!=null)throw Error(p$a(60));if(typeof et.dangerouslySetInnerHTML!="object"||!("__html"in et.dangerouslySetInnerHTML))throw Error(p$a(61))}if(et.style!=null&&typeof et.style!="object")throw Error(p$a(62))}}function vb(tt,et){if(tt.indexOf("-")===-1)return typeof et.is=="string";switch(tt){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wb=null;function xb(tt){return tt=tt.target||tt.srcElement||window,tt.correspondingUseElement&&(tt=tt.correspondingUseElement),tt.nodeType===3?tt.parentNode:tt}var yb=null,zb=null,Ab=null;function Bb(tt){if(tt=Cb(tt)){if(typeof yb!="function")throw Error(p$a(280));var et=tt.stateNode;et&&(et=Db(et),yb(tt.stateNode,tt.type,et))}}function Eb(tt){zb?Ab?Ab.push(tt):Ab=[tt]:zb=tt}function Fb(){if(zb){var tt=zb,et=Ab;if(Ab=zb=null,Bb(tt),et)for(tt=0;tt>>=0,tt===0?32:31-(pc(tt)/qc|0)|0}var rc=64,sc=4194304;function tc(tt){switch(tt&-tt){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return tt&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return tt&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return tt}}function uc(tt,et){var nt=tt.pendingLanes;if(nt===0)return 0;var rt=0,it=tt.suspendedLanes,ot=tt.pingedLanes,at=nt&268435455;if(at!==0){var st=at&~it;st!==0?rt=tc(st):(ot&=at,ot!==0&&(rt=tc(ot)))}else at=nt&~it,at!==0?rt=tc(at):ot!==0&&(rt=tc(ot));if(rt===0)return 0;if(et!==0&&et!==rt&&!(et&it)&&(it=rt&-rt,ot=et&-et,it>=ot||it===16&&(ot&4194240)!==0))return et;if(rt&4&&(rt|=nt&16),et=tt.entangledLanes,et!==0)for(tt=tt.entanglements,et&=rt;0nt;nt++)et.push(tt);return et}function Ac(tt,et,nt){tt.pendingLanes|=et,et!==536870912&&(tt.suspendedLanes=0,tt.pingedLanes=0),tt=tt.eventTimes,et=31-oc(et),tt[et]=nt}function Bc(tt,et){var nt=tt.pendingLanes&~et;tt.pendingLanes=et,tt.suspendedLanes=0,tt.pingedLanes=0,tt.expiredLanes&=et,tt.mutableReadLanes&=et,tt.entangledLanes&=et,et=tt.entanglements;var rt=tt.eventTimes;for(tt=tt.expirationTimes;0=be$1),ee$2=String.fromCharCode(32),fe$1=!1;function ge$1(tt,et){switch(tt){case"keyup":return $d.indexOf(et.keyCode)!==-1;case"keydown":return et.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function he$1(tt){return tt=tt.detail,typeof tt=="object"&&"data"in tt?tt.data:null}var ie$1=!1;function je$1(tt,et){switch(tt){case"compositionend":return he$1(et);case"keypress":return et.which!==32?null:(fe$1=!0,ee$2);case"textInput":return tt=et.data,tt===ee$2&&fe$1?null:tt;default:return null}}function ke$1(tt,et){if(ie$1)return tt==="compositionend"||!ae$1&&ge$1(tt,et)?(tt=nd(),md=ld=kd=null,ie$1=!1,tt):null;switch(tt){case"paste":return null;case"keypress":if(!(et.ctrlKey||et.altKey||et.metaKey)||et.ctrlKey&&et.altKey){if(et.char&&1=et)return{node:nt,offset:et-tt};tt=rt}e:{for(;nt;){if(nt.nextSibling){nt=nt.nextSibling;break e}nt=nt.parentNode}nt=void 0}nt=Je(nt)}}function Le$1(tt,et){return tt&&et?tt===et?!0:tt&&tt.nodeType===3?!1:et&&et.nodeType===3?Le$1(tt,et.parentNode):"contains"in tt?tt.contains(et):tt.compareDocumentPosition?!!(tt.compareDocumentPosition(et)&16):!1:!1}function Me$2(){for(var tt=window,et=Xa();et instanceof tt.HTMLIFrameElement;){try{var nt=typeof et.contentWindow.location.href=="string"}catch{nt=!1}if(nt)tt=et.contentWindow;else break;et=Xa(tt.document)}return et}function Ne$2(tt){var et=tt&&tt.nodeName&&tt.nodeName.toLowerCase();return et&&(et==="input"&&(tt.type==="text"||tt.type==="search"||tt.type==="tel"||tt.type==="url"||tt.type==="password")||et==="textarea"||tt.contentEditable==="true")}function Oe$1(tt){var et=Me$2(),nt=tt.focusedElem,rt=tt.selectionRange;if(et!==nt&&nt&&nt.ownerDocument&&Le$1(nt.ownerDocument.documentElement,nt)){if(rt!==null&&Ne$2(nt)){if(et=rt.start,tt=rt.end,tt===void 0&&(tt=et),"selectionStart"in nt)nt.selectionStart=et,nt.selectionEnd=Math.min(tt,nt.value.length);else if(tt=(et=nt.ownerDocument||document)&&et.defaultView||window,tt.getSelection){tt=tt.getSelection();var it=nt.textContent.length,ot=Math.min(rt.start,it);rt=rt.end===void 0?ot:Math.min(rt.end,it),!tt.extend&&ot>rt&&(it=rt,rt=ot,ot=it),it=Ke(nt,ot);var at=Ke(nt,rt);it&&at&&(tt.rangeCount!==1||tt.anchorNode!==it.node||tt.anchorOffset!==it.offset||tt.focusNode!==at.node||tt.focusOffset!==at.offset)&&(et=et.createRange(),et.setStart(it.node,it.offset),tt.removeAllRanges(),ot>rt?(tt.addRange(et),tt.extend(at.node,at.offset)):(et.setEnd(at.node,at.offset),tt.addRange(et)))}}for(et=[],tt=nt;tt=tt.parentNode;)tt.nodeType===1&&et.push({element:tt,left:tt.scrollLeft,top:tt.scrollTop});for(typeof nt.focus=="function"&&nt.focus(),nt=0;nt=document.documentMode,Qe=null,Re$1=null,Se$1=null,Te$1=!1;function Ue(tt,et,nt){var rt=nt.window===nt?nt.document:nt.nodeType===9?nt:nt.ownerDocument;Te$1||Qe==null||Qe!==Xa(rt)||(rt=Qe,"selectionStart"in rt&&Ne$2(rt)?rt={start:rt.selectionStart,end:rt.selectionEnd}:(rt=(rt.ownerDocument&&rt.ownerDocument.defaultView||window).getSelection(),rt={anchorNode:rt.anchorNode,anchorOffset:rt.anchorOffset,focusNode:rt.focusNode,focusOffset:rt.focusOffset}),Se$1&&Ie(Se$1,rt)||(Se$1=rt,rt=oe$1(Re$1,"onSelect"),0Tf||(tt.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G$3(tt,et){Tf++,Sf[Tf]=tt.current,tt.current=et}var Vf={},H$3=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(tt,et){var nt=tt.type.contextTypes;if(!nt)return Vf;var rt=tt.stateNode;if(rt&&rt.__reactInternalMemoizedUnmaskedChildContext===et)return rt.__reactInternalMemoizedMaskedChildContext;var it={},ot;for(ot in nt)it[ot]=et[ot];return rt&&(tt=tt.stateNode,tt.__reactInternalMemoizedUnmaskedChildContext=et,tt.__reactInternalMemoizedMaskedChildContext=it),it}function Zf(tt){return tt=tt.childContextTypes,tt!=null}function $f(){E$2(Wf),E$2(H$3)}function ag(tt,et,nt){if(H$3.current!==Vf)throw Error(p$a(168));G$3(H$3,et),G$3(Wf,nt)}function bg(tt,et,nt){var rt=tt.stateNode;if(et=et.childContextTypes,typeof rt.getChildContext!="function")return nt;rt=rt.getChildContext();for(var it in rt)if(!(it in et))throw Error(p$a(108,Ra(tt)||"Unknown",it));return A$3({},nt,rt)}function cg(tt){return tt=(tt=tt.stateNode)&&tt.__reactInternalMemoizedMergedChildContext||Vf,Xf=H$3.current,G$3(H$3,tt),G$3(Wf,Wf.current),!0}function dg(tt,et,nt){var rt=tt.stateNode;if(!rt)throw Error(p$a(169));nt?(tt=bg(tt,et,Xf),rt.__reactInternalMemoizedMergedChildContext=tt,E$2(Wf),E$2(H$3),G$3(H$3,tt)):E$2(Wf),G$3(Wf,nt)}var eg=null,fg=!1,gg=!1;function hg(tt){eg===null?eg=[tt]:eg.push(tt)}function ig(tt){fg=!0,hg(tt)}function jg(){if(!gg&&eg!==null){gg=!0;var tt=0,et=C$2;try{var nt=eg;for(C$2=1;tt>=at,it-=at,rg=1<<32-oc(et)+it|nt<Et?($t=At,At=null):$t=At.sibling;var Dt=dt(bt,At,xt[Et],kt);if(Dt===null){At===null&&(At=$t);break}tt&&At&&Dt.alternate===null&&et(bt,At),vt=ot(Dt,vt,Et),Tt===null?St=Dt:Tt.sibling=Dt,Tt=Dt,At=$t}if(Et===xt.length)return nt(bt,At),I$4&&tg(bt,Et),St;if(At===null){for(;EtEt?($t=At,At=null):$t=At.sibling;var jt=dt(bt,At,Dt.value,kt);if(jt===null){At===null&&(At=$t);break}tt&&At&&jt.alternate===null&&et(bt,At),vt=ot(jt,vt,Et),Tt===null?St=jt:Tt.sibling=jt,Tt=jt,At=$t}if(Dt.done)return nt(bt,At),I$4&&tg(bt,Et),St;if(At===null){for(;!Dt.done;Et++,Dt=xt.next())Dt=ht(bt,Dt.value,kt),Dt!==null&&(vt=ot(Dt,vt,Et),Tt===null?St=Dt:Tt.sibling=Dt,Tt=Dt);return I$4&&tg(bt,Et),St}for(At=rt(bt,At);!Dt.done;Et++,Dt=xt.next())Dt=pt(At,bt,Et,Dt.value,kt),Dt!==null&&(tt&&Dt.alternate!==null&&At.delete(Dt.key===null?Et:Dt.key),vt=ot(Dt,vt,Et),Tt===null?St=Dt:Tt.sibling=Dt,Tt=Dt);return tt&&At.forEach(function(Pt){return et(bt,Pt)}),I$4&&tg(bt,Et),St}function yt(bt,vt,xt,kt){if(typeof xt=="object"&&xt!==null&&xt.type===ya&&xt.key===null&&(xt=xt.props.children),typeof xt=="object"&&xt!==null){switch(xt.$$typeof){case va:e:{for(var St=xt.key,Tt=vt;Tt!==null;){if(Tt.key===St){if(St=xt.type,St===ya){if(Tt.tag===7){nt(bt,Tt.sibling),vt=it(Tt,xt.props.children),vt.return=bt,bt=vt;break e}}else if(Tt.elementType===St||typeof St=="object"&&St!==null&&St.$$typeof===Ha&&uh(St)===Tt.type){nt(bt,Tt.sibling),vt=it(Tt,xt.props),vt.ref=sh$1(bt,Tt,xt),vt.return=bt,bt=vt;break e}nt(bt,Tt);break}else et(bt,Tt);Tt=Tt.sibling}xt.type===ya?(vt=Ah(xt.props.children,bt.mode,kt,xt.key),vt.return=bt,bt=vt):(kt=yh(xt.type,xt.key,xt.props,null,bt.mode,kt),kt.ref=sh$1(bt,vt,xt),kt.return=bt,bt=kt)}return at(bt);case wa:e:{for(Tt=xt.key;vt!==null;){if(vt.key===Tt)if(vt.tag===4&&vt.stateNode.containerInfo===xt.containerInfo&&vt.stateNode.implementation===xt.implementation){nt(bt,vt.sibling),vt=it(vt,xt.children||[]),vt.return=bt,bt=vt;break e}else{nt(bt,vt);break}else et(bt,vt);vt=vt.sibling}vt=zh(xt,bt.mode,kt),vt.return=bt,bt=vt}return at(bt);case Ha:return Tt=xt._init,yt(bt,vt,Tt(xt._payload),kt)}if(eb(xt))return mt(bt,vt,xt,kt);if(Ka(xt))return gt(bt,vt,xt,kt);th(bt,xt)}return typeof xt=="string"&&xt!==""||typeof xt=="number"?(xt=""+xt,vt!==null&&vt.tag===6?(nt(bt,vt.sibling),vt=it(vt,xt),vt.return=bt,bt=vt):(nt(bt,vt),vt=xh(xt,bt.mode,kt),vt.return=bt,bt=vt),at(bt)):nt(bt,vt)}return yt}var Bh=vh(!0),Ch$1=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(tt){if(tt===Dh)throw Error(p$a(174));return tt}function Ih(tt,et){switch(G$3(Gh,et),G$3(Fh,tt),G$3(Eh,Dh),tt=et.nodeType,tt){case 9:case 11:et=(et=et.documentElement)?et.namespaceURI:lb(null,"");break;default:tt=tt===8?et.parentNode:et,et=tt.namespaceURI||null,tt=tt.tagName,et=lb(et,tt)}E$2(Eh),G$3(Eh,et)}function Jh(){E$2(Eh),E$2(Fh),E$2(Gh)}function Kh$1(tt){Hh(Gh.current);var et=Hh(Eh.current),nt=lb(et,tt.type);et!==nt&&(G$3(Fh,tt),G$3(Eh,nt))}function Lh(tt){Fh.current===tt&&(E$2(Eh),E$2(Fh))}var M$3=Uf(0);function Mh(tt){for(var et=tt;et!==null;){if(et.tag===13){var nt=et.memoizedState;if(nt!==null&&(nt=nt.dehydrated,nt===null||nt.data==="$?"||nt.data==="$!"))return et}else if(et.tag===19&&et.memoizedProps.revealOrder!==void 0){if(et.flags&128)return et}else if(et.child!==null){et.child.return=et,et=et.child;continue}if(et===tt)break;for(;et.sibling===null;){if(et.return===null||et.return===tt)return null;et=et.return}et.sibling.return=et.return,et=et.sibling}return null}var Nh=[];function Oh(){for(var tt=0;ttnt?nt:4,tt(!0);var rt=Qh.transition;Qh.transition={};try{tt(!1),et()}finally{C$2=nt,Qh.transition=rt}}function Fi(){return di().memoizedState}function Gi(tt,et,nt){var rt=lh(tt);if(nt={lane:rt,action:nt,hasEagerState:!1,eagerState:null,next:null},Hi(tt))Ii(et,nt);else if(nt=Yg(tt,et,nt,rt),nt!==null){var it=L$3();mh(nt,tt,rt,it),Ji(nt,et,rt)}}function ri(tt,et,nt){var rt=lh(tt),it={lane:rt,action:nt,hasEagerState:!1,eagerState:null,next:null};if(Hi(tt))Ii(et,it);else{var ot=tt.alternate;if(tt.lanes===0&&(ot===null||ot.lanes===0)&&(ot=et.lastRenderedReducer,ot!==null))try{var at=et.lastRenderedState,st=ot(at,nt);if(it.hasEagerState=!0,it.eagerState=st,He$1(st,at)){var lt=et.interleaved;lt===null?(it.next=it,Xg(et)):(it.next=lt.next,lt.next=it),et.interleaved=it;return}}catch{}finally{}nt=Yg(tt,et,it,rt),nt!==null&&(it=L$3(),mh(nt,tt,rt,it),Ji(nt,et,rt))}}function Hi(tt){var et=tt.alternate;return tt===N$3||et!==null&&et===N$3}function Ii(tt,et){Th=Sh=!0;var nt=tt.pending;nt===null?et.next=et:(et.next=nt.next,nt.next=et),tt.pending=et}function Ji(tt,et,nt){if(nt&4194240){var rt=et.lanes;rt&=tt.pendingLanes,nt|=rt,et.lanes=nt,Cc(tt,nt)}}var ai={readContext:Vg,useCallback:Q$2,useContext:Q$2,useEffect:Q$2,useImperativeHandle:Q$2,useInsertionEffect:Q$2,useLayoutEffect:Q$2,useMemo:Q$2,useReducer:Q$2,useRef:Q$2,useState:Q$2,useDebugValue:Q$2,useDeferredValue:Q$2,useTransition:Q$2,useMutableSource:Q$2,useSyncExternalStore:Q$2,useId:Q$2,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(tt,et){return ci().memoizedState=[tt,et===void 0?null:et],tt},useContext:Vg,useEffect:vi,useImperativeHandle:function(tt,et,nt){return nt=nt!=null?nt.concat([tt]):null,ti(4194308,4,yi.bind(null,et,tt),nt)},useLayoutEffect:function(tt,et){return ti(4194308,4,tt,et)},useInsertionEffect:function(tt,et){return ti(4,2,tt,et)},useMemo:function(tt,et){var nt=ci();return et=et===void 0?null:et,tt=tt(),nt.memoizedState=[tt,et],tt},useReducer:function(tt,et,nt){var rt=ci();return et=nt!==void 0?nt(et):et,rt.memoizedState=rt.baseState=et,tt={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:tt,lastRenderedState:et},rt.queue=tt,tt=tt.dispatch=Gi.bind(null,N$3,tt),[rt.memoizedState,tt]},useRef:function(tt){var et=ci();return tt={current:tt},et.memoizedState=tt},useState:qi,useDebugValue:Ai,useDeferredValue:function(tt){return ci().memoizedState=tt},useTransition:function(){var tt=qi(!1),et=tt[0];return tt=Ei.bind(null,tt[1]),ci().memoizedState=tt,[et,tt]},useMutableSource:function(){},useSyncExternalStore:function(tt,et,nt){var rt=N$3,it=ci();if(I$4){if(nt===void 0)throw Error(p$a(407));nt=nt()}else{if(nt=et(),R$2===null)throw Error(p$a(349));Rh&30||ni(rt,et,nt)}it.memoizedState=nt;var ot={value:nt,getSnapshot:et};return it.queue=ot,vi(ki.bind(null,rt,ot,tt),[tt]),rt.flags|=2048,li(9,mi.bind(null,rt,ot,nt,et),void 0,null),nt},useId:function(){var tt=ci(),et=R$2.identifierPrefix;if(I$4){var nt=sg,rt=rg;nt=(rt&~(1<<32-oc(rt)-1)).toString(32)+nt,et=":"+et+"R"+nt,nt=Uh++,0<\/script>",tt=tt.removeChild(tt.firstChild)):typeof rt.is=="string"?tt=at.createElement(nt,{is:rt.is}):(tt=at.createElement(nt),nt==="select"&&(at=tt,rt.multiple?at.multiple=!0:rt.size&&(at.size=rt.size))):tt=at.createElementNS(tt,nt),tt[Of]=et,tt[Pf]=rt,Aj(tt,et,!1,!1),et.stateNode=tt;e:{switch(at=vb(nt,rt),nt){case"dialog":D$2("cancel",tt),D$2("close",tt),it=rt;break;case"iframe":case"object":case"embed":D$2("load",tt),it=rt;break;case"video":case"audio":for(it=0;itHj&&(et.flags|=128,rt=!0,Ej(ot,!1),et.lanes=4194304)}else{if(!rt)if(tt=Mh(at),tt!==null){if(et.flags|=128,rt=!0,nt=tt.updateQueue,nt!==null&&(et.updateQueue=nt,et.flags|=4),Ej(ot,!0),ot.tail===null&&ot.tailMode==="hidden"&&!at.alternate&&!I$4)return S$4(et),null}else 2*B$2()-ot.renderingStartTime>Hj&&nt!==1073741824&&(et.flags|=128,rt=!0,Ej(ot,!1),et.lanes=4194304);ot.isBackwards?(at.sibling=et.child,et.child=at):(nt=ot.last,nt!==null?nt.sibling=at:et.child=at,ot.last=at)}return ot.tail!==null?(et=ot.tail,ot.rendering=et,ot.tail=et.sibling,ot.renderingStartTime=B$2(),et.sibling=null,nt=M$3.current,G$3(M$3,rt?nt&1|2:nt&1),et):(S$4(et),null);case 22:case 23:return Ij(),rt=et.memoizedState!==null,tt!==null&&tt.memoizedState!==null!==rt&&(et.flags|=8192),rt&&et.mode&1?gj&1073741824&&(S$4(et),et.subtreeFlags&6&&(et.flags|=8192)):S$4(et),null;case 24:return null;case 25:return null}throw Error(p$a(156,et.tag))}function Jj(tt,et){switch(wg(et),et.tag){case 1:return Zf(et.type)&&$f(),tt=et.flags,tt&65536?(et.flags=tt&-65537|128,et):null;case 3:return Jh(),E$2(Wf),E$2(H$3),Oh(),tt=et.flags,tt&65536&&!(tt&128)?(et.flags=tt&-65537|128,et):null;case 5:return Lh(et),null;case 13:if(E$2(M$3),tt=et.memoizedState,tt!==null&&tt.dehydrated!==null){if(et.alternate===null)throw Error(p$a(340));Ig()}return tt=et.flags,tt&65536?(et.flags=tt&-65537|128,et):null;case 19:return E$2(M$3),null;case 4:return Jh(),null;case 10:return Rg(et.type._context),null;case 22:case 23:return Ij(),null;case 24:return null;default:return null}}var Kj=!1,U$3=!1,Lj=typeof WeakSet=="function"?WeakSet:Set,V$4=null;function Mj(tt,et){var nt=tt.ref;if(nt!==null)if(typeof nt=="function")try{nt(null)}catch(rt){W$8(tt,et,rt)}else nt.current=null}function Nj(tt,et,nt){try{nt()}catch(rt){W$8(tt,et,rt)}}var Oj=!1;function Pj(tt,et){if(Cf=dd,tt=Me$2(),Ne$2(tt)){if("selectionStart"in tt)var nt={start:tt.selectionStart,end:tt.selectionEnd};else e:{nt=(nt=tt.ownerDocument)&&nt.defaultView||window;var rt=nt.getSelection&&nt.getSelection();if(rt&&rt.rangeCount!==0){nt=rt.anchorNode;var it=rt.anchorOffset,ot=rt.focusNode;rt=rt.focusOffset;try{nt.nodeType,ot.nodeType}catch{nt=null;break e}var at=0,st=-1,lt=-1,ct=0,ut=0,ht=tt,dt=null;t:for(;;){for(var pt;ht!==nt||it!==0&&ht.nodeType!==3||(st=at+it),ht!==ot||rt!==0&&ht.nodeType!==3||(lt=at+rt),ht.nodeType===3&&(at+=ht.nodeValue.length),(pt=ht.firstChild)!==null;)dt=ht,ht=pt;for(;;){if(ht===tt)break t;if(dt===nt&&++ct===it&&(st=at),dt===ot&&++ut===rt&&(lt=at),(pt=ht.nextSibling)!==null)break;ht=dt,dt=ht.parentNode}ht=pt}nt=st===-1||lt===-1?null:{start:st,end:lt}}else nt=null}nt=nt||{start:0,end:0}}else nt=null;for(Df={focusedElem:tt,selectionRange:nt},dd=!1,V$4=et;V$4!==null;)if(et=V$4,tt=et.child,(et.subtreeFlags&1028)!==0&&tt!==null)tt.return=et,V$4=tt;else for(;V$4!==null;){et=V$4;try{var mt=et.alternate;if(et.flags&1024)switch(et.tag){case 0:case 11:case 15:break;case 1:if(mt!==null){var gt=mt.memoizedProps,yt=mt.memoizedState,bt=et.stateNode,vt=bt.getSnapshotBeforeUpdate(et.elementType===et.type?gt:Lg(et.type,gt),yt);bt.__reactInternalSnapshotBeforeUpdate=vt}break;case 3:var xt=et.stateNode.containerInfo;xt.nodeType===1?xt.textContent="":xt.nodeType===9&&xt.documentElement&&xt.removeChild(xt.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p$a(163))}}catch(kt){W$8(et,et.return,kt)}if(tt=et.sibling,tt!==null){tt.return=et.return,V$4=tt;break}V$4=et.return}return mt=Oj,Oj=!1,mt}function Qj(tt,et,nt){var rt=et.updateQueue;if(rt=rt!==null?rt.lastEffect:null,rt!==null){var it=rt=rt.next;do{if((it.tag&tt)===tt){var ot=it.destroy;it.destroy=void 0,ot!==void 0&&Nj(et,nt,ot)}it=it.next}while(it!==rt)}}function Rj(tt,et){if(et=et.updateQueue,et=et!==null?et.lastEffect:null,et!==null){var nt=et=et.next;do{if((nt.tag&tt)===tt){var rt=nt.create;nt.destroy=rt()}nt=nt.next}while(nt!==et)}}function Sj(tt){var et=tt.ref;if(et!==null){var nt=tt.stateNode;switch(tt.tag){case 5:tt=nt;break;default:tt=nt}typeof et=="function"?et(tt):et.current=tt}}function Tj(tt){var et=tt.alternate;et!==null&&(tt.alternate=null,Tj(et)),tt.child=null,tt.deletions=null,tt.sibling=null,tt.tag===5&&(et=tt.stateNode,et!==null&&(delete et[Of],delete et[Pf],delete et[of],delete et[Qf],delete et[Rf])),tt.stateNode=null,tt.return=null,tt.dependencies=null,tt.memoizedProps=null,tt.memoizedState=null,tt.pendingProps=null,tt.stateNode=null,tt.updateQueue=null}function Uj(tt){return tt.tag===5||tt.tag===3||tt.tag===4}function Vj(tt){e:for(;;){for(;tt.sibling===null;){if(tt.return===null||Uj(tt.return))return null;tt=tt.return}for(tt.sibling.return=tt.return,tt=tt.sibling;tt.tag!==5&&tt.tag!==6&&tt.tag!==18;){if(tt.flags&2||tt.child===null||tt.tag===4)continue e;tt.child.return=tt,tt=tt.child}if(!(tt.flags&2))return tt.stateNode}}function Wj(tt,et,nt){var rt=tt.tag;if(rt===5||rt===6)tt=tt.stateNode,et?nt.nodeType===8?nt.parentNode.insertBefore(tt,et):nt.insertBefore(tt,et):(nt.nodeType===8?(et=nt.parentNode,et.insertBefore(tt,nt)):(et=nt,et.appendChild(tt)),nt=nt._reactRootContainer,nt!=null||et.onclick!==null||(et.onclick=Bf));else if(rt!==4&&(tt=tt.child,tt!==null))for(Wj(tt,et,nt),tt=tt.sibling;tt!==null;)Wj(tt,et,nt),tt=tt.sibling}function Xj(tt,et,nt){var rt=tt.tag;if(rt===5||rt===6)tt=tt.stateNode,et?nt.insertBefore(tt,et):nt.appendChild(tt);else if(rt!==4&&(tt=tt.child,tt!==null))for(Xj(tt,et,nt),tt=tt.sibling;tt!==null;)Xj(tt,et,nt),tt=tt.sibling}var X$2=null,Yj=!1;function Zj(tt,et,nt){for(nt=nt.child;nt!==null;)ak(tt,et,nt),nt=nt.sibling}function ak(tt,et,nt){if(lc&&typeof lc.onCommitFiberUnmount=="function")try{lc.onCommitFiberUnmount(kc,nt)}catch{}switch(nt.tag){case 5:U$3||Mj(nt,et);case 6:var rt=X$2,it=Yj;X$2=null,Zj(tt,et,nt),X$2=rt,Yj=it,X$2!==null&&(Yj?(tt=X$2,nt=nt.stateNode,tt.nodeType===8?tt.parentNode.removeChild(nt):tt.removeChild(nt)):X$2.removeChild(nt.stateNode));break;case 18:X$2!==null&&(Yj?(tt=X$2,nt=nt.stateNode,tt.nodeType===8?Kf(tt.parentNode,nt):tt.nodeType===1&&Kf(tt,nt),bd(tt)):Kf(X$2,nt.stateNode));break;case 4:rt=X$2,it=Yj,X$2=nt.stateNode.containerInfo,Yj=!0,Zj(tt,et,nt),X$2=rt,Yj=it;break;case 0:case 11:case 14:case 15:if(!U$3&&(rt=nt.updateQueue,rt!==null&&(rt=rt.lastEffect,rt!==null))){it=rt=rt.next;do{var ot=it,at=ot.destroy;ot=ot.tag,at!==void 0&&(ot&2||ot&4)&&Nj(nt,et,at),it=it.next}while(it!==rt)}Zj(tt,et,nt);break;case 1:if(!U$3&&(Mj(nt,et),rt=nt.stateNode,typeof rt.componentWillUnmount=="function"))try{rt.props=nt.memoizedProps,rt.state=nt.memoizedState,rt.componentWillUnmount()}catch(st){W$8(nt,et,st)}Zj(tt,et,nt);break;case 21:Zj(tt,et,nt);break;case 22:nt.mode&1?(U$3=(rt=U$3)||nt.memoizedState!==null,Zj(tt,et,nt),U$3=rt):Zj(tt,et,nt);break;default:Zj(tt,et,nt)}}function bk(tt){var et=tt.updateQueue;if(et!==null){tt.updateQueue=null;var nt=tt.stateNode;nt===null&&(nt=tt.stateNode=new Lj),et.forEach(function(rt){var it=ck.bind(null,tt,rt);nt.has(rt)||(nt.add(rt),rt.then(it,it))})}}function dk(tt,et){var nt=et.deletions;if(nt!==null)for(var rt=0;rtit&&(it=at),rt&=~ot}if(rt=it,rt=B$2()-rt,rt=(120>rt?120:480>rt?480:1080>rt?1080:1920>rt?1920:3e3>rt?3e3:4320>rt?4320:1960*mk(rt/1960))-rt,10tt?16:tt,xk===null)var rt=!1;else{if(tt=xk,xk=null,yk=0,K$7&6)throw Error(p$a(331));var it=K$7;for(K$7|=4,V$4=tt.current;V$4!==null;){var ot=V$4,at=ot.child;if(V$4.flags&16){var st=ot.deletions;if(st!==null){for(var lt=0;ltB$2()-gk?Lk(tt,0):sk|=nt),Ek(tt,et)}function Zk(tt,et){et===0&&(tt.mode&1?(et=sc,sc<<=1,!(sc&130023424)&&(sc=4194304)):et=1);var nt=L$3();tt=Zg(tt,et),tt!==null&&(Ac(tt,et,nt),Ek(tt,nt))}function vj(tt){var et=tt.memoizedState,nt=0;et!==null&&(nt=et.retryLane),Zk(tt,nt)}function ck(tt,et){var nt=0;switch(tt.tag){case 13:var rt=tt.stateNode,it=tt.memoizedState;it!==null&&(nt=it.retryLane);break;case 19:rt=tt.stateNode;break;default:throw Error(p$a(314))}rt!==null&&rt.delete(et),Zk(tt,nt)}var Wk;Wk=function(tt,et,nt){if(tt!==null)if(tt.memoizedProps!==et.pendingProps||Wf.current)Ug=!0;else{if(!(tt.lanes&nt)&&!(et.flags&128))return Ug=!1,zj(tt,et,nt);Ug=!!(tt.flags&131072)}else Ug=!1,I$4&&et.flags&1048576&&ug(et,ng,et.index);switch(et.lanes=0,et.tag){case 2:var rt=et.type;jj(tt,et),tt=et.pendingProps;var it=Yf(et,H$3.current);Tg(et,nt),it=Xh(null,et,rt,tt,it,nt);var ot=bi();return et.flags|=1,typeof it=="object"&&it!==null&&typeof it.render=="function"&&it.$$typeof===void 0?(et.tag=1,et.memoizedState=null,et.updateQueue=null,Zf(rt)?(ot=!0,cg(et)):ot=!1,et.memoizedState=it.state!==null&&it.state!==void 0?it.state:null,ah(et),it.updater=nh,et.stateNode=it,it._reactInternals=et,rh$1(et,rt,tt,nt),et=kj(null,et,rt,!0,ot,nt)):(et.tag=0,I$4&&ot&&vg(et),Yi(null,et,it,nt),et=et.child),et;case 16:rt=et.elementType;e:{switch(jj(tt,et),tt=et.pendingProps,it=rt._init,rt=it(rt._payload),et.type=rt,it=et.tag=$k(rt),tt=Lg(rt,tt),it){case 0:et=dj(null,et,rt,tt,nt);break e;case 1:et=ij(null,et,rt,tt,nt);break e;case 11:et=Zi(null,et,rt,tt,nt);break e;case 14:et=aj(null,et,rt,Lg(rt.type,tt),nt);break e}throw Error(p$a(306,rt,""))}return et;case 0:return rt=et.type,it=et.pendingProps,it=et.elementType===rt?it:Lg(rt,it),dj(tt,et,rt,it,nt);case 1:return rt=et.type,it=et.pendingProps,it=et.elementType===rt?it:Lg(rt,it),ij(tt,et,rt,it,nt);case 3:e:{if(lj(et),tt===null)throw Error(p$a(387));rt=et.pendingProps,ot=et.memoizedState,it=ot.element,bh(tt,et),gh(et,rt,null,nt);var at=et.memoizedState;if(rt=at.element,ot.isDehydrated)if(ot={element:rt,isDehydrated:!1,cache:at.cache,pendingSuspenseBoundaries:at.pendingSuspenseBoundaries,transitions:at.transitions},et.updateQueue.baseState=ot,et.memoizedState=ot,et.flags&256){it=Ki(Error(p$a(423)),et),et=mj(tt,et,rt,nt,it);break e}else if(rt!==it){it=Ki(Error(p$a(424)),et),et=mj(tt,et,rt,nt,it);break e}else for(yg=Lf(et.stateNode.containerInfo.firstChild),xg=et,I$4=!0,zg=null,nt=Ch$1(et,null,rt,nt),et.child=nt;nt;)nt.flags=nt.flags&-3|4096,nt=nt.sibling;else{if(Ig(),rt===it){et=$i(tt,et,nt);break e}Yi(tt,et,rt,nt)}et=et.child}return et;case 5:return Kh$1(et),tt===null&&Eg(et),rt=et.type,it=et.pendingProps,ot=tt!==null?tt.memoizedProps:null,at=it.children,Ef(rt,it)?at=null:ot!==null&&Ef(rt,ot)&&(et.flags|=32),hj(tt,et),Yi(tt,et,at,nt),et.child;case 6:return tt===null&&Eg(et),null;case 13:return pj(tt,et,nt);case 4:return Ih(et,et.stateNode.containerInfo),rt=et.pendingProps,tt===null?et.child=Bh(et,null,rt,nt):Yi(tt,et,rt,nt),et.child;case 11:return rt=et.type,it=et.pendingProps,it=et.elementType===rt?it:Lg(rt,it),Zi(tt,et,rt,it,nt);case 7:return Yi(tt,et,et.pendingProps,nt),et.child;case 8:return Yi(tt,et,et.pendingProps.children,nt),et.child;case 12:return Yi(tt,et,et.pendingProps.children,nt),et.child;case 10:e:{if(rt=et.type._context,it=et.pendingProps,ot=et.memoizedProps,at=it.value,G$3(Mg,rt._currentValue),rt._currentValue=at,ot!==null)if(He$1(ot.value,at)){if(ot.children===it.children&&!Wf.current){et=$i(tt,et,nt);break e}}else for(ot=et.child,ot!==null&&(ot.return=et);ot!==null;){var st=ot.dependencies;if(st!==null){at=ot.child;for(var lt=st.firstContext;lt!==null;){if(lt.context===rt){if(ot.tag===1){lt=ch$1(-1,nt&-nt),lt.tag=2;var ct=ot.updateQueue;if(ct!==null){ct=ct.shared;var ut=ct.pending;ut===null?lt.next=lt:(lt.next=ut.next,ut.next=lt),ct.pending=lt}}ot.lanes|=nt,lt=ot.alternate,lt!==null&&(lt.lanes|=nt),Sg(ot.return,nt,et),st.lanes|=nt;break}lt=lt.next}}else if(ot.tag===10)at=ot.type===et.type?null:ot.child;else if(ot.tag===18){if(at=ot.return,at===null)throw Error(p$a(341));at.lanes|=nt,st=at.alternate,st!==null&&(st.lanes|=nt),Sg(at,nt,et),at=ot.sibling}else at=ot.child;if(at!==null)at.return=ot;else for(at=ot;at!==null;){if(at===et){at=null;break}if(ot=at.sibling,ot!==null){ot.return=at.return,at=ot;break}at=at.return}ot=at}Yi(tt,et,it.children,nt),et=et.child}return et;case 9:return it=et.type,rt=et.pendingProps.children,Tg(et,nt),it=Vg(it),rt=rt(it),et.flags|=1,Yi(tt,et,rt,nt),et.child;case 14:return rt=et.type,it=Lg(rt,et.pendingProps),it=Lg(rt.type,it),aj(tt,et,rt,it,nt);case 15:return cj(tt,et,et.type,et.pendingProps,nt);case 17:return rt=et.type,it=et.pendingProps,it=et.elementType===rt?it:Lg(rt,it),jj(tt,et),et.tag=1,Zf(rt)?(tt=!0,cg(et)):tt=!1,Tg(et,nt),ph(et,rt,it),rh$1(et,rt,it,nt),kj(null,et,rt,!0,tt,nt);case 19:return yj(tt,et,nt);case 22:return ej(tt,et,nt)}throw Error(p$a(156,et.tag))};function Gk(tt,et){return ac(tt,et)}function al(tt,et,nt,rt){this.tag=tt,this.key=nt,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=et,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=rt,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg$1(tt,et,nt,rt){return new al(tt,et,nt,rt)}function bj(tt){return tt=tt.prototype,!(!tt||!tt.isReactComponent)}function $k(tt){if(typeof tt=="function")return bj(tt)?1:0;if(tt!=null){if(tt=tt.$$typeof,tt===Da)return 11;if(tt===Ga)return 14}return 2}function wh(tt,et){var nt=tt.alternate;return nt===null?(nt=Bg$1(tt.tag,et,tt.key,tt.mode),nt.elementType=tt.elementType,nt.type=tt.type,nt.stateNode=tt.stateNode,nt.alternate=tt,tt.alternate=nt):(nt.pendingProps=et,nt.type=tt.type,nt.flags=0,nt.subtreeFlags=0,nt.deletions=null),nt.flags=tt.flags&14680064,nt.childLanes=tt.childLanes,nt.lanes=tt.lanes,nt.child=tt.child,nt.memoizedProps=tt.memoizedProps,nt.memoizedState=tt.memoizedState,nt.updateQueue=tt.updateQueue,et=tt.dependencies,nt.dependencies=et===null?null:{lanes:et.lanes,firstContext:et.firstContext},nt.sibling=tt.sibling,nt.index=tt.index,nt.ref=tt.ref,nt}function yh(tt,et,nt,rt,it,ot){var at=2;if(rt=tt,typeof tt=="function")bj(tt)&&(at=1);else if(typeof tt=="string")at=5;else e:switch(tt){case ya:return Ah(nt.children,it,ot,et);case za:at=8,it|=8;break;case Aa:return tt=Bg$1(12,nt,et,it|2),tt.elementType=Aa,tt.lanes=ot,tt;case Ea:return tt=Bg$1(13,nt,et,it),tt.elementType=Ea,tt.lanes=ot,tt;case Fa:return tt=Bg$1(19,nt,et,it),tt.elementType=Fa,tt.lanes=ot,tt;case Ia:return qj(nt,it,ot,et);default:if(typeof tt=="object"&&tt!==null)switch(tt.$$typeof){case Ba:at=10;break e;case Ca:at=9;break e;case Da:at=11;break e;case Ga:at=14;break e;case Ha:at=16,rt=null;break e}throw Error(p$a(130,tt==null?tt:typeof tt,""))}return et=Bg$1(at,nt,et,it),et.elementType=tt,et.type=rt,et.lanes=ot,et}function Ah(tt,et,nt,rt){return tt=Bg$1(7,tt,rt,et),tt.lanes=nt,tt}function qj(tt,et,nt,rt){return tt=Bg$1(22,tt,rt,et),tt.elementType=Ia,tt.lanes=nt,tt.stateNode={isHidden:!1},tt}function xh(tt,et,nt){return tt=Bg$1(6,tt,null,et),tt.lanes=nt,tt}function zh(tt,et,nt){return et=Bg$1(4,tt.children!==null?tt.children:[],tt.key,et),et.lanes=nt,et.stateNode={containerInfo:tt.containerInfo,pendingChildren:null,implementation:tt.implementation},et}function bl(tt,et,nt,rt,it){this.tag=et,this.containerInfo=tt,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc(0),this.expirationTimes=zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc(0),this.identifierPrefix=rt,this.onRecoverableError=it,this.mutableSourceEagerHydrationData=null}function cl(tt,et,nt,rt,it,ot,at,st,lt){return tt=new bl(tt,et,nt,st,lt),et===1?(et=1,ot===!0&&(et|=8)):et=0,ot=Bg$1(3,null,null,et),tt.current=ot,ot.stateNode=tt,ot.memoizedState={element:rt,isDehydrated:nt,cache:null,transitions:null,pendingSuspenseBoundaries:null},ah(ot),tt}function dl(tt,et,nt){var rt=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(tt){console.error(tt)}}checkDCE(),reactDom.exports=reactDom_production_min;var reactDomExports=reactDom.exports;const ReactDOM=getDefaultExportFromCjs(reactDomExports);var createRoot$1,m$a=reactDomExports;createRoot$1=client$1.createRoot=m$a.createRoot,client$1.hydrateRoot=m$a.hydrateRoot;function _extends$u(){return _extends$u=Object.assign?Object.assign.bind():function(tt){for(var et=1;ettt.forEach(nt=>$6ed0406888f73fc4$var$setRef(nt,et))}function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...tt){return reactExports.useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...tt),tt)}const $5e63c961fc1ce211$export$8c6ed5c666ac1360=reactExports.forwardRef((tt,et)=>{const{children:nt,...rt}=tt,it=reactExports.Children.toArray(nt),ot=it.find($5e63c961fc1ce211$var$isSlottable);if(ot){const at=ot.props.children,st=it.map(lt=>lt===ot?reactExports.Children.count(at)>1?reactExports.Children.only(null):reactExports.isValidElement(at)?at.props.children:null:lt);return reactExports.createElement($5e63c961fc1ce211$var$SlotClone,_extends$u({},rt,{ref:et}),reactExports.isValidElement(at)?reactExports.cloneElement(at,void 0,st):null)}return reactExports.createElement($5e63c961fc1ce211$var$SlotClone,_extends$u({},rt,{ref:et}),nt)});$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName="Slot";const $5e63c961fc1ce211$var$SlotClone=reactExports.forwardRef((tt,et)=>{const{children:nt,...rt}=tt;return reactExports.isValidElement(nt)?reactExports.cloneElement(nt,{...$5e63c961fc1ce211$var$mergeProps(rt,nt.props),ref:et?$6ed0406888f73fc4$export$43e446d32b3d21af(et,nt.ref):nt.ref}):reactExports.Children.count(nt)>1?reactExports.Children.only(null):null});$5e63c961fc1ce211$var$SlotClone.displayName="SlotClone";const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45=({children:tt})=>reactExports.createElement(reactExports.Fragment,null,tt);function $5e63c961fc1ce211$var$isSlottable(tt){return reactExports.isValidElement(tt)&&tt.type===$5e63c961fc1ce211$export$d9f1ccf0bdb05d45}function $5e63c961fc1ce211$var$mergeProps(tt,et){const nt={...et};for(const rt in et){const it=tt[rt],ot=et[rt];/^on[A-Z]/.test(rt)?it&&ot?nt[rt]=(...st)=>{ot(...st),it(...st)}:it&&(nt[rt]=it):rt==="style"?nt[rt]={...it,...ot}:rt==="className"&&(nt[rt]=[it,ot].filter(Boolean).join(" "))}return{...tt,...nt}}const $8927f6f2acc4f386$var$NODES=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$8927f6f2acc4f386$export$250ffa63cdc0d034=$8927f6f2acc4f386$var$NODES.reduce((tt,et)=>{const nt=reactExports.forwardRef((rt,it)=>{const{asChild:ot,...at}=rt,st=ot?$5e63c961fc1ce211$export$8c6ed5c666ac1360:et;return reactExports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),reactExports.createElement(st,_extends$u({},at,{ref:it}))});return nt.displayName=`Primitive.${et}`,{...tt,[et]:nt}},{});function $8927f6f2acc4f386$export$6d1a0317bde7de7f(tt,et){tt&&reactDomExports.flushSync(()=>tt.dispatchEvent(et))}const $f1701beae083dbae$export$602eac185826482c=reactExports.forwardRef((tt,et)=>{var nt;const{container:rt=globalThis==null||(nt=globalThis.document)===null||nt===void 0?void 0:nt.body,...it}=tt;return rt?ReactDOM.createPortal(reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,_extends$u({},it,{ref:et})),rt):null}),$f1701beae083dbae$export$be92b6f5f03c0fe9=$f1701beae083dbae$export$602eac185826482c;var has=Object.prototype.hasOwnProperty;function dequal(tt,et){var nt,rt;if(tt===et)return!0;if(tt&&et&&(nt=tt.constructor)===et.constructor){if(nt===Date)return tt.getTime()===et.getTime();if(nt===RegExp)return tt.toString()===et.toString();if(nt===Array){if((rt=tt.length)===et.length)for(;rt--&&dequal(tt[rt],et[rt]););return rt===-1}if(!nt||typeof tt=="object"){rt=0;for(nt in tt)if(has.call(tt,nt)&&++rt&&!has.call(et,nt)||!(nt in et)||!dequal(tt[nt],et[nt]))return!1;return Object.keys(et).length===rt}}return tt!==tt&&et!==et}function shallow$2(tt,et){if(Object.is(tt,et))return!0;if(typeof tt!="object"||tt===null||typeof et!="object"||et===null)return!1;const nt=Object.keys(tt);if(nt.length!==Object.keys(et).length)return!1;for(let rt=0;rt0;)at[st]=arguments[st+4];tt.call(this,at),tt.captureStackTrace&&tt.captureStackTrace(this,et),this.rule=nt,this.value=rt,this.cause=it,this.target=ot}return tt&&(et.__proto__=tt),et.prototype=Object.create(tt&&tt.prototype),et.prototype.constructor=et,et}(Error),Context$2=function(et,nt){et===void 0&&(et=[]),nt===void 0&&(nt=[]),this.chain=et,this.nextRuleModifiers=nt};Context$2.prototype._applyRule=function(et,nt){var rt=this;return function(){for(var it=[],ot=arguments.length;ot--;)it[ot]=arguments[ot];return rt.chain.push(new Rule(nt,et.apply(rt,it),it,rt.nextRuleModifiers)),rt.nextRuleModifiers=[],rt}};Context$2.prototype._applyModifier=function(et,nt){return this.nextRuleModifiers.push(new Modifier(nt,et.simple,et.async)),this};Context$2.prototype._clone=function(){return new Context$2(this.chain.slice(),this.nextRuleModifiers.slice())};Context$2.prototype.test=function(et){return this.chain.every(function(nt){return nt._test(et)})};Context$2.prototype.testAll=function(et){var nt=[];return this.chain.forEach(function(rt){try{rt._check(et)}catch(it){nt.push(new ValidationError(rt,et,it))}}),nt};Context$2.prototype.check=function(et){this.chain.forEach(function(nt){try{nt._check(et)}catch(rt){throw new ValidationError(nt,et,rt)}})};Context$2.prototype.testAsync=function(et){var nt=this;return new Promise(function(rt,it){executeAsyncRules(et,nt.chain.slice(),rt,it)})};function executeAsyncRules(tt,et,nt,rt){if(et.length){var it=et.shift();it._testAsync(tt).then(function(){executeAsyncRules(tt,et,nt,rt)},function(ot){rt(new ValidationError(it,tt,ot))})}else nt(tt)}var consideredEmpty=function(tt,et){return et&&typeof tt=="string"&&tt.trim().length===0?!0:tt==null};function optional(tt,et){return et===void 0&&(et=!1),{simple:function(nt){return consideredEmpty(nt,et)||tt.check(nt)===void 0},async:function(nt){return consideredEmpty(nt,et)||tt.testAsync(nt)}}}function v8n(){return typeof Proxy<"u"?proxyContext(new Context$2):proxylessContext(new Context$2)}var customRules={};v8n.extend=function(tt){Object.assign(customRules,tt)};v8n.clearCustomRules=function(){customRules={}};function proxyContext(tt){return new Proxy(tt,{get:function(nt,rt){if(rt in nt)return nt[rt];var it=proxyContext(tt._clone());if(rt in availableModifiers)return it._applyModifier(availableModifiers[rt],rt);if(rt in customRules)return it._applyRule(customRules[rt],rt);if(rt in availableRules)return it._applyRule(availableRules[rt],rt)}})}function proxylessContext(tt){var et=function(it,ot){return Object.keys(it).forEach(function(at){ot[at]=function(){for(var st=[],lt=arguments.length;lt--;)st[lt]=arguments[lt];var ct=proxylessContext(ot._clone()),ut=ct._applyRule(it[at],at).apply(void 0,st);return ut}}),ot},nt=et(availableRules,tt),rt=et(customRules,nt);return Object.keys(availableModifiers).forEach(function(it){Object.defineProperty(rt,it,{get:function(){var ot=proxylessContext(rt._clone());return ot._applyModifier(availableModifiers[it],it)}})}),rt}var availableModifiers={not:{simple:function(tt){return function(et){return!tt(et)}},async:function(tt){return function(et){return Promise.resolve(tt(et)).then(function(nt){return!nt}).catch(function(){return!0})}}},some:{simple:function(tt){return function(et){return split$1(et).some(function(nt){try{return tt(nt)}catch{return!1}})}},async:function(tt){return function(et){return Promise.all(split$1(et).map(function(nt){try{return tt(nt).catch(function(){return!1})}catch{return!1}})).then(function(nt){return nt.some(Boolean)})}}},every:{simple:function(tt){return function(et){return et!==!1&&split$1(et).every(tt)}},async:function(tt){return function(et){return Promise.all(split$1(et).map(tt)).then(function(nt){return nt.every(Boolean)})}}},strict:{simple:function(tt,et){return function(nt){return isSchemaRule(et)&&nt&&typeof nt=="object"?Object.keys(et.args[0]).length===Object.keys(nt).length&&tt(nt):tt(nt)}},async:function(tt,et){return function(nt){return Promise.resolve(tt(nt)).then(function(rt){return isSchemaRule(et)&&nt&&typeof nt=="object"?Object.keys(et.args[0]).length===Object.keys(nt).length&&rt:rt}).catch(function(){return!1})}}}};function isSchemaRule(tt){return tt&&tt.name==="schema"&&tt.args.length>0&&typeof tt.args[0]=="object"}function split$1(tt){return typeof tt=="string"?tt.split(""):tt}var availableRules={equal:function(tt){return function(et){return et==tt}},exact:function(tt){return function(et){return et===tt}},number:function(tt){return tt===void 0&&(tt=!0),function(et){return typeof et=="number"&&(tt||isFinite(et))}},integer:function(){return function(tt){var et=Number.isInteger||isIntegerPolyfill;return et(tt)}},numeric:function(){return function(tt){return!isNaN(parseFloat(tt))&&isFinite(tt)}},string:function(){return testType("string")},boolean:function(){return testType("boolean")},undefined:function(){return testType("undefined")},null:function(){return testType("null")},array:function(){return testType("array")},object:function(){return testType("object")},instanceOf:function(tt){return function(et){return et instanceof tt}},pattern:function(tt){return function(et){return tt.test(et)}},lowercase:function(){return function(tt){return typeof tt=="boolean"||tt===tt.toLowerCase()&&tt.trim()!==""}},uppercase:function(){return function(tt){return tt===tt.toUpperCase()&&tt.trim()!==""}},vowel:function(){return function(tt){return/^[aeiou]+$/i.test(tt)}},consonant:function(){return function(tt){return/^(?=[^aeiou])([a-z]+)$/i.test(tt)}},first:function(tt){return function(et){return et[0]==tt}},last:function(tt){return function(et){return et[et.length-1]==tt}},empty:function(){return function(tt){return tt.length===0}},length:function(tt,et){return function(nt){return nt.length>=tt&&nt.length<=(et||tt)}},minLength:function(tt){return function(et){return et.length>=tt}},maxLength:function(tt){return function(et){return et.length<=tt}},negative:function(){return function(tt){return tt<0}},positive:function(){return function(tt){return tt>=0}},between:function(tt,et){return function(nt){return nt>=tt&&nt<=et}},range:function(tt,et){return function(nt){return nt>=tt&&nt<=et}},lessThan:function(tt){return function(et){return ettt}},greaterThanOrEqual:function(tt){return function(et){return et>=tt}},even:function(){return function(tt){return tt%2===0}},odd:function(){return function(tt){return tt%2!==0}},includes:function(tt){return function(et){return~et.indexOf(tt)}},schema:function(tt){return testSchema(tt)},passesAnyOf:function(){for(var tt=[],et=arguments.length;et--;)tt[et]=arguments[et];return function(nt){return tt.some(function(rt){return rt.test(nt)})}},optional};function testType(tt){return function(et){return Array.isArray(et)&&tt==="array"||et===null&&tt==="null"||typeof et===tt}}function isIntegerPolyfill(tt){return typeof tt=="number"&&isFinite(tt)&&Math.floor(tt)===tt}function testSchema(tt){return{simple:function(et){var nt=[];if(Object.keys(tt).forEach(function(rt){var it=tt[rt];try{it.check((et||{})[rt])}catch(ot){ot.target=rt,nt.push(ot)}}),nt.length>0)throw nt;return!0},async:function(et){var nt=[],rt=Object.keys(tt).map(function(it){var ot=tt[it];return ot.testAsync((et||{})[it]).catch(function(at){at.target=it,nt.push(at)})});return Promise.all(rt).then(function(){if(nt.length>0)throw nt;return!0})}}}var e$6="colors",t$7="sizes",r$c="space",n$7={gap:r$c,gridGap:r$c,columnGap:r$c,gridColumnGap:r$c,rowGap:r$c,gridRowGap:r$c,inset:r$c,insetBlock:r$c,insetBlockEnd:r$c,insetBlockStart:r$c,insetInline:r$c,insetInlineEnd:r$c,insetInlineStart:r$c,margin:r$c,marginTop:r$c,marginRight:r$c,marginBottom:r$c,marginLeft:r$c,marginBlock:r$c,marginBlockEnd:r$c,marginBlockStart:r$c,marginInline:r$c,marginInlineEnd:r$c,marginInlineStart:r$c,padding:r$c,paddingTop:r$c,paddingRight:r$c,paddingBottom:r$c,paddingLeft:r$c,paddingBlock:r$c,paddingBlockEnd:r$c,paddingBlockStart:r$c,paddingInline:r$c,paddingInlineEnd:r$c,paddingInlineStart:r$c,top:r$c,right:r$c,bottom:r$c,left:r$c,scrollMargin:r$c,scrollMarginTop:r$c,scrollMarginRight:r$c,scrollMarginBottom:r$c,scrollMarginLeft:r$c,scrollMarginX:r$c,scrollMarginY:r$c,scrollMarginBlock:r$c,scrollMarginBlockEnd:r$c,scrollMarginBlockStart:r$c,scrollMarginInline:r$c,scrollMarginInlineEnd:r$c,scrollMarginInlineStart:r$c,scrollPadding:r$c,scrollPaddingTop:r$c,scrollPaddingRight:r$c,scrollPaddingBottom:r$c,scrollPaddingLeft:r$c,scrollPaddingX:r$c,scrollPaddingY:r$c,scrollPaddingBlock:r$c,scrollPaddingBlockEnd:r$c,scrollPaddingBlockStart:r$c,scrollPaddingInline:r$c,scrollPaddingInlineEnd:r$c,scrollPaddingInlineStart:r$c,fontSize:"fontSizes",background:e$6,backgroundColor:e$6,backgroundImage:e$6,borderImage:e$6,border:e$6,borderBlock:e$6,borderBlockEnd:e$6,borderBlockStart:e$6,borderBottom:e$6,borderBottomColor:e$6,borderColor:e$6,borderInline:e$6,borderInlineEnd:e$6,borderInlineStart:e$6,borderLeft:e$6,borderLeftColor:e$6,borderRight:e$6,borderRightColor:e$6,borderTop:e$6,borderTopColor:e$6,caretColor:e$6,color:e$6,columnRuleColor:e$6,fill:e$6,outline:e$6,outlineColor:e$6,stroke:e$6,textDecorationColor:e$6,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:t$7,minBlockSize:t$7,maxBlockSize:t$7,inlineSize:t$7,minInlineSize:t$7,maxInlineSize:t$7,width:t$7,minWidth:t$7,maxWidth:t$7,height:t$7,minHeight:t$7,maxHeight:t$7,flexBasis:t$7,gridTemplateColumns:t$7,gridTemplateRows:t$7,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},i$7=(tt,et)=>typeof et=="function"?{"()":Function.prototype.toString.call(et)}:et,o$2=()=>{const tt=Object.create(null);return(et,nt,...rt)=>{const it=(ot=>JSON.stringify(ot,i$7))(et);return it in tt?tt[it]:tt[it]=nt(et,...rt)}},l$6=Symbol.for("sxs.internal"),s$5=(tt,et)=>Object.defineProperties(tt,Object.getOwnPropertyDescriptors(et)),a$4=tt=>{for(const et in tt)return!0;return!1},{hasOwnProperty:c$9}=Object.prototype,d$6=tt=>tt.includes("-")?tt:tt.replace(/[A-Z]/g,et=>"-"+et.toLowerCase()),g$9=/\s+(?![^()]*\))/,p$9=tt=>et=>tt(...typeof et=="string"?String(et).split(g$9):[et]),u$6={appearance:tt=>({WebkitAppearance:tt,appearance:tt}),backfaceVisibility:tt=>({WebkitBackfaceVisibility:tt,backfaceVisibility:tt}),backdropFilter:tt=>({WebkitBackdropFilter:tt,backdropFilter:tt}),backgroundClip:tt=>({WebkitBackgroundClip:tt,backgroundClip:tt}),boxDecorationBreak:tt=>({WebkitBoxDecorationBreak:tt,boxDecorationBreak:tt}),clipPath:tt=>({WebkitClipPath:tt,clipPath:tt}),content:tt=>({content:tt.includes('"')||tt.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(tt)?tt:`"${tt}"`}),hyphens:tt=>({WebkitHyphens:tt,hyphens:tt}),maskImage:tt=>({WebkitMaskImage:tt,maskImage:tt}),maskSize:tt=>({WebkitMaskSize:tt,maskSize:tt}),tabSize:tt=>({MozTabSize:tt,tabSize:tt}),textSizeAdjust:tt=>({WebkitTextSizeAdjust:tt,textSizeAdjust:tt}),userSelect:tt=>({WebkitUserSelect:tt,userSelect:tt}),marginBlock:p$9((tt,et)=>({marginBlockStart:tt,marginBlockEnd:et||tt})),marginInline:p$9((tt,et)=>({marginInlineStart:tt,marginInlineEnd:et||tt})),maxSize:p$9((tt,et)=>({maxBlockSize:tt,maxInlineSize:et||tt})),minSize:p$9((tt,et)=>({minBlockSize:tt,minInlineSize:et||tt})),paddingBlock:p$9((tt,et)=>({paddingBlockStart:tt,paddingBlockEnd:et||tt})),paddingInline:p$9((tt,et)=>({paddingInlineStart:tt,paddingInlineEnd:et||tt}))},h$a=/([\d.]+)([^]*)/,f$8=(tt,et)=>tt.length?tt.reduce((nt,rt)=>(nt.push(...et.map(it=>it.includes("&")?it.replace(/&/g,/[ +>|~]/.test(rt)&&/&.*&/.test(it)?`:is(${rt})`:rt):rt+" "+it)),nt),[]):et,m$9=(tt,et)=>tt in b$7&&typeof et=="string"?et.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(nt,rt,it,ot)=>rt+(it==="stretch"?`-moz-available${ot};${d$6(tt)}:${rt}-webkit-fill-available`:`-moz-fit-content${ot};${d$6(tt)}:${rt}fit-content`)+ot):String(et),b$7={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},S$3=tt=>tt?tt+"-":"",k$9=(tt,et,nt)=>tt.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,(rt,it,ot,at,st)=>at=="$"==!!ot?rt:(it||at=="--"?"calc(":"")+"var(--"+(at==="$"?S$3(et)+(st.includes("$")?"":S$3(nt))+st.replace(/\$/g,"-"):st)+")"+(it||at=="--"?"*"+(it||"")+(ot||"1")+")":"")),y$8=/\s*,\s*(?![^()]*\))/,B$1=Object.prototype.toString,$$3=(tt,et,nt,rt,it)=>{let ot,at,st;const lt=(ct,ut,ht)=>{let dt,pt;const mt=gt=>{for(dt in gt){const vt=dt.charCodeAt(0)===64,xt=vt&&Array.isArray(gt[dt])?gt[dt]:[gt[dt]];for(pt of xt){const kt=/[A-Z]/.test(bt=dt)?bt:bt.replace(/-[^]/g,Tt=>Tt[1].toUpperCase()),St=typeof pt=="object"&&pt&&pt.toString===B$1&&(!rt.utils[kt]||!ut.length);if(kt in rt.utils&&!St){const Tt=rt.utils[kt];if(Tt!==at){at=Tt,mt(Tt(pt)),at=null;continue}}else if(kt in u$6){const Tt=u$6[kt];if(Tt!==st){st=Tt,mt(Tt(pt)),st=null;continue}}if(vt&&(yt=dt.slice(1)in rt.media?"@media "+rt.media[dt.slice(1)]:dt,dt=yt.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(Tt,At,Et,$t,Dt,jt)=>{const Pt=h$a.test(At),Ct=.0625*(Pt?-1:1),[wt,It]=Pt?[$t,At]:[At,$t];return"("+(Et[0]==="="?"":Et[0]===">"===Pt?"max-":"min-")+wt+":"+(Et[0]!=="="&&Et.length===1?It.replace(h$a,(Ot,Wt,zt)=>Number(Wt)+Ct*(Et===">"?1:-1)+zt):It)+(Dt?") and ("+(Dt[0]===">"?"min-":"max-")+wt+":"+(Dt.length===1?jt.replace(h$a,(Ot,Wt,zt)=>Number(Wt)+Ct*(Dt===">"?-1:1)+zt):jt):"")+")"})),St){const Tt=vt?ht.concat(dt):[...ht],At=vt?[...ut]:f$8(ut,dt.split(y$8));ot!==void 0&&it(x$8(...ot)),ot=void 0,lt(pt,At,Tt)}else ot===void 0&&(ot=[[],ut,ht]),dt=vt||dt.charCodeAt(0)!==36?dt:`--${S$3(rt.prefix)}${dt.slice(1).replace(/\$/g,"-")}`,pt=St?pt:typeof pt=="number"?pt&&kt in I$3?String(pt)+"px":String(pt):k$9(m$9(kt,pt??""),rt.prefix,rt.themeMap[kt]),ot[0].push(`${vt?`${dt} `:`${d$6(dt)}:`}${pt}`)}}var yt,bt};mt(ct),ot!==void 0&&it(x$8(...ot)),ot=void 0};lt(tt,et,nt)},x$8=(tt,et,nt)=>`${nt.map(rt=>`${rt}{`).join("")}${et.length?`${et.join(",")}{`:""}${tt.join(";")}${et.length?"}":""}${Array(nt.length?nt.length+1:0).join("}")}`,I$3={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},R$1=tt=>String.fromCharCode(tt+(tt>25?39:97)),z$6=tt=>(et=>{let nt,rt="";for(nt=Math.abs(et);nt>52;nt=nt/52|0)rt=R$1(nt%52)+rt;return R$1(nt%52)+rt})(((et,nt)=>{let rt=nt.length;for(;rt;)et=33*et^nt.charCodeAt(--rt);return et})(5381,JSON.stringify(tt))>>>0),W$7=["themed","global","styled","onevar","resonevar","allvar","inline"],j$2=tt=>{if(tt.href&&!tt.href.startsWith(location.origin))return!1;try{return!!tt.cssRules}catch{return!1}},E$1=tt=>{let et;const nt=()=>{const{cssRules:it}=et.sheet;return[].map.call(it,(ot,at)=>{const{cssText:st}=ot;let lt="";if(st.startsWith("--sxs"))return"";if(it[at-1]&&(lt=it[at-1].cssText).startsWith("--sxs")){if(!ot.cssRules.length)return"";for(const ct in et.rules)if(et.rules[ct].group===ot)return`--sxs{--sxs:${[...et.rules[ct].cache].join(" ")}}${st}`;return ot.cssRules.length?`${lt}${st}`:""}return st}).join("")},rt=()=>{if(et){const{rules:st,sheet:lt}=et;if(!lt.deleteRule){for(;Object(Object(lt.cssRules)[0]).type===3;)lt.cssRules.splice(0,1);lt.cssRules=[]}for(const ct in st)delete st[ct]}const it=Object(tt).styleSheets||[];for(const st of it)if(j$2(st)){for(let lt=0,ct=st.cssRules;ct[lt];++lt){const ut=Object(ct[lt]);if(ut.type!==1)continue;const ht=Object(ct[lt+1]);if(ht.type!==4)continue;++lt;const{cssText:dt}=ut;if(!dt.startsWith("--sxs"))continue;const pt=dt.slice(14,-3).trim().split(/\s+/),mt=W$7[pt[0]];mt&&(et||(et={sheet:st,reset:rt,rules:{},toString:nt}),et.rules[mt]={group:ht,index:lt,cache:new Set(pt)})}if(et)break}if(!et){const st=(lt,ct)=>({type:ct,cssRules:[],insertRule(ut,ht){this.cssRules.splice(ht,0,st(ut,{import:3,undefined:1}[(ut.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return lt==="@media{}"?`@media{${[].map.call(this.cssRules,ut=>ut.cssText).join("")}}`:lt}});et={sheet:tt?(tt.head||tt).appendChild(document.createElement("style")).sheet:st("","text/css"),rules:{},reset:rt,toString:nt}}const{sheet:ot,rules:at}=et;for(let st=W$7.length-1;st>=0;--st){const lt=W$7[st];if(!at[lt]){const ct=W$7[st+1],ut=at[ct]?at[ct].index:ot.cssRules.length;ot.insertRule("@media{}",ut),ot.insertRule(`--sxs{--sxs:${st}}`,ut),at[lt]={group:ot.cssRules[ut+1],index:ut,cache:new Set([st])}}v$9(at[lt])}};return rt(),et},v$9=tt=>{const et=tt.group;let nt=et.cssRules.length;tt.apply=rt=>{try{et.insertRule(rt,nt),++nt}catch{}}},T$2=Symbol(),w$6=o$2(),M$2=(tt,et)=>w$6(tt,()=>(...nt)=>{let rt={type:null,composers:new Set};for(const it of nt)if(it!=null)if(it[l$6]){rt.type==null&&(rt.type=it[l$6].type);for(const ot of it[l$6].composers)rt.composers.add(ot)}else it.constructor!==Object||it.$$typeof?rt.type==null&&(rt.type=it):rt.composers.add(C$1(it,tt));return rt.type==null&&(rt.type="span"),rt.composers.size||rt.composers.add(["PJLV",{},[],[],{},[]]),P$3(tt,rt,et)}),C$1=({variants:tt,compoundVariants:et,defaultVariants:nt,...rt},it)=>{const ot=`${S$3(it.prefix)}c-${z$6(rt)}`,at=[],st=[],lt=Object.create(null),ct=[];for(const dt in nt)lt[dt]=String(nt[dt]);if(typeof tt=="object"&&tt)for(const dt in tt){ut=lt,ht=dt,c$9.call(ut,ht)||(lt[dt]="undefined");const pt=tt[dt];for(const mt in pt){const gt={[dt]:String(mt)};String(mt)==="undefined"&&ct.push(dt);const yt=pt[mt],bt=[gt,yt,!a$4(yt)];at.push(bt)}}var ut,ht;if(typeof et=="object"&&et)for(const dt of et){let{css:pt,...mt}=dt;pt=typeof pt=="object"&&pt||{};for(const yt in mt)mt[yt]=String(mt[yt]);const gt=[mt,pt,!a$4(pt)];st.push(gt)}return[ot,rt,at,st,lt,ct]},P$3=(tt,et,nt)=>{const[rt,it,ot,at]=L$2(et.composers),st=typeof et.type=="function"||et.type.$$typeof?(ht=>{function dt(){for(let pt=0;ptdt.rules[pt]={apply:mt=>dt[T$2].push([pt,mt])}),dt})(nt):null,lt=(st||nt).rules,ct=`.${rt}${it.length>1?`:where(.${it.slice(1).join(".")})`:""}`,ut=ht=>{ht=typeof ht=="object"&&ht||A$2;const{css:dt,...pt}=ht,mt={};for(const bt in ot)if(delete pt[bt],bt in ht){let vt=ht[bt];typeof vt=="object"&&vt?mt[bt]={"@initial":ot[bt],...vt}:(vt=String(vt),mt[bt]=vt!=="undefined"||at.has(bt)?vt:ot[bt])}else mt[bt]=ot[bt];const gt=new Set([...it]);for(const[bt,vt,xt,kt]of et.composers){nt.rules.styled.cache.has(bt)||(nt.rules.styled.cache.add(bt),$$3(vt,[`.${bt}`],[],tt,At=>{lt.styled.apply(At)}));const St=O(xt,mt,tt.media),Tt=O(kt,mt,tt.media,!0);for(const At of St)if(At!==void 0)for(const[Et,$t,Dt]of At){const jt=`${bt}-${z$6($t)}-${Et}`;gt.add(jt);const Pt=(Dt?nt.rules.resonevar:nt.rules.onevar).cache,Ct=Dt?lt.resonevar:lt.onevar;Pt.has(jt)||(Pt.add(jt),$$3($t,[`.${jt}`],[],tt,wt=>{Ct.apply(wt)}))}for(const At of Tt)if(At!==void 0)for(const[Et,$t]of At){const Dt=`${bt}-${z$6($t)}-${Et}`;gt.add(Dt),nt.rules.allvar.cache.has(Dt)||(nt.rules.allvar.cache.add(Dt),$$3($t,[`.${Dt}`],[],tt,jt=>{lt.allvar.apply(jt)}))}}if(typeof dt=="object"&&dt){const bt=`${rt}-i${z$6(dt)}-css`;gt.add(bt),nt.rules.inline.cache.has(bt)||(nt.rules.inline.cache.add(bt),$$3(dt,[`.${bt}`],[],tt,vt=>{lt.inline.apply(vt)}))}for(const bt of String(ht.className||"").trim().split(/\s+/))bt&>.add(bt);const yt=pt.className=[...gt].join(" ");return{type:et.type,className:yt,selector:ct,props:pt,toString:()=>yt,deferredInjector:st}};return s$5(ut,{className:rt,selector:ct,[l$6]:et,toString:()=>(nt.rules.styled.cache.has(rt)||ut(),rt)})},L$2=tt=>{let et="";const nt=[],rt={},it=[];for(const[ot,,,,at,st]of tt){et===""&&(et=ot),nt.push(ot),it.push(...st);for(const lt in at){const ct=at[lt];(rt[lt]===void 0||ct!=="undefined"||st.includes(ct))&&(rt[lt]=ct)}}return[et,nt,rt,new Set(it)]},O=(tt,et,nt,rt)=>{const it=[];e:for(let[ot,at,st]of tt){if(st)continue;let lt,ct=0,ut=!1;for(lt in ot){const ht=ot[lt];let dt=et[lt];if(dt!==ht){if(typeof dt!="object"||!dt)continue e;{let pt,mt,gt=0;for(const yt in dt){if(ht===String(dt[yt])){if(yt!=="@initial"){const bt=yt.slice(1);(mt=mt||[]).push(bt in nt?nt[bt]:yt.replace(/^@media ?/,"")),ut=!0}ct+=gt,pt=!0}++gt}if(mt&&mt.length&&(at={["@media "+mt.join(", ")]:at}),!pt)continue e}}}(it[ct]=it[ct]||[]).push([rt?"cv":`${lt}-${ot[lt]}`,at,ut])}return it},A$2={},N$2=o$2(),D$1=(tt,et)=>N$2(tt,()=>(...nt)=>{const rt=()=>{for(let it of nt){it=typeof it=="object"&&it||{};let ot=z$6(it);if(!et.rules.global.cache.has(ot)){if(et.rules.global.cache.add(ot),"@import"in it){let at=[].indexOf.call(et.sheet.cssRules,et.rules.themed.group)-1;for(let st of[].concat(it["@import"]))st=st.includes('"')||st.includes("'")?st:`"${st}"`,et.sheet.insertRule(`@import ${st};`,at++);delete it["@import"]}$$3(it,[],[],tt,at=>{et.rules.global.apply(at)})}}return""};return s$5(rt,{toString:rt})}),H$2=o$2(),V$3=(tt,et)=>H$2(tt,()=>nt=>{const rt=`${S$3(tt.prefix)}k-${z$6(nt)}`,it=()=>{if(!et.rules.global.cache.has(rt)){et.rules.global.cache.add(rt);const ot=[];$$3(nt,[],[],tt,st=>ot.push(st));const at=`@keyframes ${rt}{${ot.join("")}}`;et.rules.global.apply(at)}return rt};return s$5(it,{get name(){return it()},toString:it})}),G$2=class{constructor(et,nt,rt,it){this.token=et==null?"":String(et),this.value=nt==null?"":String(nt),this.scale=rt==null?"":String(rt),this.prefix=it==null?"":String(it)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+S$3(this.prefix)+S$3(this.scale)+this.token}toString(){return this.computedValue}},F$2=o$2(),J$2=(tt,et)=>F$2(tt,()=>(nt,rt)=>{rt=typeof nt=="object"&&nt||Object(rt);const it=`.${nt=(nt=typeof nt=="string"?nt:"")||`${S$3(tt.prefix)}t-${z$6(rt)}`}`,ot={},at=[];for(const lt in rt){ot[lt]={};for(const ct in rt[lt]){const ut=`--${S$3(tt.prefix)}${lt}-${ct}`,ht=k$9(String(rt[lt][ct]),tt.prefix,lt);ot[lt][ct]=new G$2(ct,ht,lt,tt.prefix),at.push(`${ut}:${ht}`)}}const st=()=>{if(at.length&&!et.rules.themed.cache.has(nt)){et.rules.themed.cache.add(nt);const lt=`${rt===tt.theme?":root,":""}.${nt}{${at.join(";")}}`;et.rules.themed.apply(lt)}return nt};return{...ot,get className(){return st()},selector:it,toString:st}}),U$2=o$2(),X$1,Y$2=o$2(),q$7=tt=>{const et=(nt=>{let rt=!1;const it=U$2(nt,ot=>{rt=!0;const at="prefix"in(ot=typeof ot=="object"&&ot||{})?String(ot.prefix):"",st=typeof ot.media=="object"&&ot.media||{},lt=typeof ot.root=="object"?ot.root||null:globalThis.document||null,ct=typeof ot.theme=="object"&&ot.theme||{},ut={prefix:at,media:st,theme:ct,themeMap:typeof ot.themeMap=="object"&&ot.themeMap||{...n$7},utils:typeof ot.utils=="object"&&ot.utils||{}},ht=E$1(lt),dt={css:M$2(ut,ht),globalCss:D$1(ut,ht),keyframes:V$3(ut,ht),createTheme:J$2(ut,ht),reset(){ht.reset(),dt.theme.toString()},theme:{},sheet:ht,config:ut,prefix:at,getCssText:ht.toString,toString:ht.toString};return String(dt.theme=dt.createTheme(ct)),dt});return rt||it.reset(),it})(tt);return et.styled=(({config:nt,sheet:rt})=>Y$2(nt,()=>{const it=M$2(nt,rt);return(...ot)=>{const at=it(...ot),st=at[l$6].type,lt=React$1.forwardRef((ct,ut)=>{const ht=ct&&ct.as||st,{props:dt,deferredInjector:pt}=at(ct);return delete dt.as,dt.ref=ut,pt?React$1.createElement(React$1.Fragment,null,React$1.createElement(ht,dt),React$1.createElement(pt,null)):React$1.createElement(ht,dt)});return lt.className=at.className,lt.displayName=`Styled.${st.displayName||st.name||st}`,lt.selector=at.selector,lt.toString=()=>at.selector,lt[l$6]=at[l$6],lt}}))(et),et},K$6=()=>X$1||(X$1=q$7()),re$4=(...tt)=>K$6().styled(...tt);function clamp$a(tt,et,nt){return Math.max(et,Math.min(tt,nt))}const V$2={toVector(tt,et){return tt===void 0&&(tt=et),Array.isArray(tt)?tt:[tt,tt]},add(tt,et){return[tt[0]+et[0],tt[1]+et[1]]},sub(tt,et){return[tt[0]-et[0],tt[1]-et[1]]},addTo(tt,et){tt[0]+=et[0],tt[1]+=et[1]},subTo(tt,et){tt[0]-=et[0],tt[1]-=et[1]}};function rubberband(tt,et,nt){return et===0||Math.abs(et)===1/0?Math.pow(tt,nt*5):tt*et*nt/(et+nt*tt)}function rubberbandIfOutOfBounds(tt,et,nt,rt=.15){return rt===0?clamp$a(tt,et,nt):ttnt?+rubberband(tt-nt,nt-et,rt)+nt:tt}function computeRubberband(tt,[et,nt],[rt,it]){const[[ot,at],[st,lt]]=tt;return[rubberbandIfOutOfBounds(et,ot,at,rt),rubberbandIfOutOfBounds(nt,st,lt,it)]}function _toPrimitive$C(tt,et){if(typeof tt!="object"||tt===null)return tt;var nt=tt[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(tt,et||"default");if(typeof rt!="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(tt)}function _toPropertyKey$C(tt){var et=_toPrimitive$C(tt,"string");return typeof et=="symbol"?et:String(et)}function _defineProperty$H(tt,et,nt){return et=_toPropertyKey$C(et),et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function ownKeys$F(tt,et){var nt=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);et&&(rt=rt.filter(function(it){return Object.getOwnPropertyDescriptor(tt,it).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread2$2(tt){for(var et=1;et{var nt,rt;return et.target===tt.currentTarget||((nt=tt.currentTarget)===null||nt===void 0||(rt=nt.contains)===null||rt===void 0?void 0:rt.call(nt,et.target))})}function getTouchList(tt){return tt.type==="touchend"||tt.type==="touchcancel"?tt.changedTouches:tt.targetTouches}function getValueEvent(tt){return isTouch$1(tt)?getTouchList(tt)[0]:tt}function touchIds(tt){return getCurrentTargetTouchList(tt).map(et=>et.identifier)}function pointerId(tt){const et=getValueEvent(tt);return isTouch$1(tt)?et.identifier:et.pointerId}function pointerValues(tt){const et=getValueEvent(tt);return[et.clientX,et.clientY]}function getEventDetails(tt){const et={};if("buttons"in tt&&(et.buttons=tt.buttons),"shiftKey"in tt){const{shiftKey:nt,altKey:rt,metaKey:it,ctrlKey:ot}=tt;Object.assign(et,{shiftKey:nt,altKey:rt,metaKey:it,ctrlKey:ot})}return et}function call$2(tt,...et){return typeof tt=="function"?tt(...et):tt}function noop$b(){}function chain(...tt){return tt.length===0?noop$b:tt.length===1?tt[0]:function(){let et;for(const nt of tt)et=nt.apply(this,arguments)||et;return et}}function assignDefault(tt,et){return Object.assign({},et,tt||{})}const BEFORE_LAST_KINEMATICS_DELAY=32;class Engine{constructor(et,nt,rt){this.ctrl=et,this.args=nt,this.key=rt,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(et){this.ctrl.state[this.key]=et}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:et,shared:nt,ingKey:rt,args:it}=this;nt[rt]=et._active=et.active=et._blocked=et._force=!1,et._step=[!1,!1],et.intentional=!1,et._movement=[0,0],et._distance=[0,0],et._direction=[0,0],et._delta=[0,0],et._bounds=[[-1/0,1/0],[-1/0,1/0]],et.args=it,et.axis=void 0,et.memo=void 0,et.elapsedTime=et.timeDelta=0,et.direction=[0,0],et.distance=[0,0],et.overflow=[0,0],et._movementBound=[!1,!1],et.velocity=[0,0],et.movement=[0,0],et.delta=[0,0],et.timeStamp=0}start(et){const nt=this.state,rt=this.config;nt._active||(this.reset(),this.computeInitial(),nt._active=!0,nt.target=et.target,nt.currentTarget=et.currentTarget,nt.lastOffset=rt.from?call$2(rt.from,nt):nt.offset,nt.offset=nt.lastOffset,nt.startTime=nt.timeStamp=et.timeStamp)}computeValues(et){const nt=this.state;nt._values=et,nt.values=this.config.transform(et)}computeInitial(){const et=this.state;et._initial=et._values,et.initial=et.values}compute(et){const{state:nt,config:rt,shared:it}=this;nt.args=this.args;let ot=0;if(et&&(nt.event=et,rt.preventDefault&&et.cancelable&&nt.event.preventDefault(),nt.type=et.type,it.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,it.locked=!!document.pointerLockElement,Object.assign(it,getEventDetails(et)),it.down=it.pressed=it.buttons%2===1||it.touches>0,ot=et.timeStamp-nt.timeStamp,nt.timeStamp=et.timeStamp,nt.elapsedTime=nt.timeStamp-nt.startTime),nt._active){const Tt=nt._delta.map(Math.abs);V$2.addTo(nt._distance,Tt)}this.axisIntent&&this.axisIntent(et);const[at,st]=nt._movement,[lt,ct]=rt.threshold,{_step:ut,values:ht}=nt;if(rt.hasCustomTransform?(ut[0]===!1&&(ut[0]=Math.abs(at)>=lt&&ht[0]),ut[1]===!1&&(ut[1]=Math.abs(st)>=ct&&ht[1])):(ut[0]===!1&&(ut[0]=Math.abs(at)>=lt&&Math.sign(at)*lt),ut[1]===!1&&(ut[1]=Math.abs(st)>=ct&&Math.sign(st)*ct)),nt.intentional=ut[0]!==!1||ut[1]!==!1,!nt.intentional)return;const dt=[0,0];if(rt.hasCustomTransform){const[Tt,At]=ht;dt[0]=ut[0]!==!1?Tt-ut[0]:0,dt[1]=ut[1]!==!1?At-ut[1]:0}else dt[0]=ut[0]!==!1?at-ut[0]:0,dt[1]=ut[1]!==!1?st-ut[1]:0;this.restrictToAxis&&!nt._blocked&&this.restrictToAxis(dt);const pt=nt.offset,mt=nt._active&&!nt._blocked||nt.active;mt&&(nt.first=nt._active&&!nt.active,nt.last=!nt._active&&nt.active,nt.active=it[this.ingKey]=nt._active,et&&(nt.first&&("bounds"in rt&&(nt._bounds=call$2(rt.bounds,nt)),this.setup&&this.setup()),nt.movement=dt,this.computeOffset()));const[gt,yt]=nt.offset,[[bt,vt],[xt,kt]]=nt._bounds;nt.overflow=[gtvt?1:0,ytkt?1:0],nt._movementBound[0]=nt.overflow[0]?nt._movementBound[0]===!1?nt._movement[0]:nt._movementBound[0]:!1,nt._movementBound[1]=nt.overflow[1]?nt._movementBound[1]===!1?nt._movement[1]:nt._movementBound[1]:!1;const St=nt._active?rt.rubberband||[0,0]:[0,0];if(nt.offset=computeRubberband(nt._bounds,nt.offset,St),nt.delta=V$2.sub(nt.offset,pt),this.computeMovement(),mt&&(!nt.last||ot>BEFORE_LAST_KINEMATICS_DELAY)){nt.delta=V$2.sub(nt.offset,pt);const Tt=nt.delta.map(Math.abs);V$2.addTo(nt.distance,Tt),nt.direction=nt.delta.map(Math.sign),nt._direction=nt._delta.map(Math.sign),!nt.first&&ot>0&&(nt.velocity=[Tt[0]/ot,Tt[1]/ot],nt.timeDelta=ot)}}emit(){const et=this.state,nt=this.shared,rt=this.config;if(et._active||this.clean(),(et._blocked||!et.intentional)&&!et._force&&!rt.triggerAllEvents)return;const it=this.handler(_objectSpread2$2(_objectSpread2$2(_objectSpread2$2({},nt),et),{},{[this.aliasKey]:et.values}));it!==void 0&&(et.memo=it)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function selectAxis([tt,et],nt){const rt=Math.abs(tt),it=Math.abs(et);if(rt>it&&rt>nt)return"x";if(it>rt&&it>nt)return"y"}class CoordinatesEngine extends Engine{constructor(...et){super(...et),_defineProperty$H(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=V$2.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=V$2.sub(this.state.offset,this.state.lastOffset)}axisIntent(et){const nt=this.state,rt=this.config;if(!nt.axis&&et){const it=typeof rt.axisThreshold=="object"?rt.axisThreshold[getPointerType(et)]:rt.axisThreshold;nt.axis=selectAxis(nt._movement,it)}nt._blocked=(rt.lockDirection||!!rt.axis)&&!nt.axis||!!rt.axis&&rt.axis!==nt.axis}restrictToAxis(et){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":et[1]=0;break;case"y":et[0]=0;break}}}const identity$e=tt=>tt,DEFAULT_RUBBERBAND=.15,commonConfigResolver={enabled(tt=!0){return tt},eventOptions(tt,et,nt){return _objectSpread2$2(_objectSpread2$2({},nt.shared.eventOptions),tt)},preventDefault(tt=!1){return tt},triggerAllEvents(tt=!1){return tt},rubberband(tt=0){switch(tt){case!0:return[DEFAULT_RUBBERBAND,DEFAULT_RUBBERBAND];case!1:return[0,0];default:return V$2.toVector(tt)}},from(tt){if(typeof tt=="function")return tt;if(tt!=null)return V$2.toVector(tt)},transform(tt,et,nt){const rt=tt||nt.shared.transform;return this.hasCustomTransform=!!rt,rt||identity$e},threshold(tt){return V$2.toVector(tt,0)}},DEFAULT_AXIS_THRESHOLD=0,coordinatesConfigResolver=_objectSpread2$2(_objectSpread2$2({},commonConfigResolver),{},{axis(tt,et,{axis:nt}){if(this.lockDirection=nt==="lock",!this.lockDirection)return nt},axisThreshold(tt=DEFAULT_AXIS_THRESHOLD){return tt},bounds(tt={}){if(typeof tt=="function")return ot=>coordinatesConfigResolver.bounds(tt(ot));if("current"in tt)return()=>tt.current;if(typeof HTMLElement=="function"&&tt instanceof HTMLElement)return tt;const{left:et=-1/0,right:nt=1/0,top:rt=-1/0,bottom:it=1/0}=tt;return[[et,nt],[rt,it]]}}),KEYS_DELTA_MAP={ArrowRight:(tt,et=1)=>[tt*et,0],ArrowLeft:(tt,et=1)=>[-1*tt*et,0],ArrowUp:(tt,et=1)=>[0,-1*tt*et],ArrowDown:(tt,et=1)=>[0,tt*et]};class DragEngine extends CoordinatesEngine{constructor(...et){super(...et),_defineProperty$H(this,"ingKey","dragging")}reset(){super.reset();const et=this.state;et._pointerId=void 0,et._pointerActive=!1,et._keyboardActive=!1,et._preventScroll=!1,et._delayed=!1,et.swipe=[0,0],et.tap=!1,et.canceled=!1,et.cancel=this.cancel.bind(this)}setup(){const et=this.state;if(et._bounds instanceof HTMLElement){const nt=et._bounds.getBoundingClientRect(),rt=et.currentTarget.getBoundingClientRect(),it={left:nt.left-rt.left+et.offset[0],right:nt.right-rt.right+et.offset[0],top:nt.top-rt.top+et.offset[1],bottom:nt.bottom-rt.bottom+et.offset[1]};et._bounds=coordinatesConfigResolver.bounds(it)}}cancel(){const et=this.state;et.canceled||(et.canceled=!0,et._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(et){const nt=this.config,rt=this.state;if(et.buttons!=null&&(Array.isArray(nt.pointerButtons)?!nt.pointerButtons.includes(et.buttons):nt.pointerButtons!==-1&&nt.pointerButtons!==et.buttons))return;const it=this.ctrl.setEventIds(et);nt.pointerCapture&&et.target.setPointerCapture(et.pointerId),!(it&&it.size>1&&rt._pointerActive)&&(this.start(et),this.setupPointer(et),rt._pointerId=pointerId(et),rt._pointerActive=!0,this.computeValues(pointerValues(et)),this.computeInitial(),nt.preventScrollAxis&&getPointerType(et)!=="mouse"?(rt._active=!1,this.setupScrollPrevention(et)):nt.delay>0?(this.setupDelayTrigger(et),nt.triggerAllEvents&&(this.compute(et),this.emit())):this.startPointerDrag(et))}startPointerDrag(et){const nt=this.state;nt._active=!0,nt._preventScroll=!0,nt._delayed=!1,this.compute(et),this.emit()}pointerMove(et){const nt=this.state,rt=this.config;if(!nt._pointerActive)return;const it=pointerId(et);if(nt._pointerId!==void 0&&it!==nt._pointerId)return;const ot=pointerValues(et);if(document.pointerLockElement===et.target?nt._delta=[et.movementX,et.movementY]:(nt._delta=V$2.sub(ot,nt._values),this.computeValues(ot)),V$2.addTo(nt._movement,nt._delta),this.compute(et),nt._delayed&&nt.intentional){this.timeoutStore.remove("dragDelay"),nt.active=!1,this.startPointerDrag(et);return}if(rt.preventScrollAxis&&!nt._preventScroll)if(nt.axis)if(nt.axis===rt.preventScrollAxis||rt.preventScrollAxis==="xy"){nt._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(et);return}else return;this.emit()}pointerUp(et){this.ctrl.setEventIds(et);try{this.config.pointerCapture&&et.target.hasPointerCapture(et.pointerId)&&et.target.releasePointerCapture(et.pointerId)}catch{}const nt=this.state,rt=this.config;if(!nt._active||!nt._pointerActive)return;const it=pointerId(et);if(nt._pointerId!==void 0&&it!==nt._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(et);const[ot,at]=nt._distance;if(nt.tap=ot<=rt.tapsThreshold&&at<=rt.tapsThreshold,nt.tap&&rt.filterTaps)nt._force=!0;else{const[st,lt]=nt._delta,[ct,ut]=nt._movement,[ht,dt]=rt.swipe.velocity,[pt,mt]=rt.swipe.distance,gt=rt.swipe.duration;if(nt.elapsedTimeht&&Math.abs(ct)>pt&&(nt.swipe[0]=Math.sign(st)),bt>dt&&Math.abs(ut)>mt&&(nt.swipe[1]=Math.sign(lt))}}this.emit()}pointerClick(et){!this.state.tap&&et.detail>0&&(et.preventDefault(),et.stopPropagation())}setupPointer(et){const nt=this.config,rt=nt.device;nt.pointerLock&&et.currentTarget.requestPointerLock(),nt.pointerCapture||(this.eventStore.add(this.sharedConfig.window,rt,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,rt,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,rt,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(et){this.state._preventScroll&&et.cancelable&&et.preventDefault()}setupScrollPrevention(et){this.state._preventScroll=!1,persistEvent(et);const nt=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",nt),this.eventStore.add(this.sharedConfig.window,"touch","cancel",nt),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,et)}setupDelayTrigger(et){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(et)},this.config.delay)}keyDown(et){const nt=KEYS_DELTA_MAP[et.key];if(nt){const rt=this.state,it=et.shiftKey?10:et.altKey?.1:1;this.start(et),rt._delta=nt(this.config.keyboardDisplacement,it),rt._keyboardActive=!0,V$2.addTo(rt._movement,rt._delta),this.compute(et),this.emit()}}keyUp(et){et.key in KEYS_DELTA_MAP&&(this.state._keyboardActive=!1,this.setActive(),this.compute(et),this.emit())}bind(et){const nt=this.config.device;et(nt,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(et(nt,"change",this.pointerMove.bind(this)),et(nt,"end",this.pointerUp.bind(this)),et(nt,"cancel",this.pointerUp.bind(this)),et("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(et("key","down",this.keyDown.bind(this)),et("key","up",this.keyUp.bind(this))),this.config.filterTaps&&et("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function persistEvent(tt){"persist"in tt&&typeof tt.persist=="function"&&tt.persist()}const isBrowser$2=typeof window<"u"&&window.document&&window.document.createElement;function supportsTouchEvents(){return isBrowser$2&&"ontouchstart"in window}function isTouchScreen(){return supportsTouchEvents()||isBrowser$2&&window.navigator.maxTouchPoints>1}function supportsPointerEvents(){return isBrowser$2&&"onpointerdown"in window}function supportsPointerLock(){return isBrowser$2&&"exitPointerLock"in window.document}function supportsGestureEvents(){try{return"constructor"in GestureEvent}catch{return!1}}const SUPPORT={isBrowser:isBrowser$2,gesture:supportsGestureEvents(),touch:supportsTouchEvents(),touchscreen:isTouchScreen(),pointer:supportsPointerEvents(),pointerLock:supportsPointerLock()},DEFAULT_PREVENT_SCROLL_DELAY=250,DEFAULT_DRAG_DELAY=180,DEFAULT_SWIPE_VELOCITY=.5,DEFAULT_SWIPE_DISTANCE=50,DEFAULT_SWIPE_DURATION=250,DEFAULT_KEYBOARD_DISPLACEMENT=10,DEFAULT_DRAG_AXIS_THRESHOLD={mouse:0,touch:0,pen:8},dragConfigResolver=_objectSpread2$2(_objectSpread2$2({},coordinatesConfigResolver),{},{device(tt,et,{pointer:{touch:nt=!1,lock:rt=!1,mouse:it=!1}={}}){return this.pointerLock=rt&&SUPPORT.pointerLock,SUPPORT.touch&&nt?"touch":this.pointerLock?"mouse":SUPPORT.pointer&&!it?"pointer":SUPPORT.touch?"touch":"mouse"},preventScrollAxis(tt,et,{preventScroll:nt}){if(this.preventScrollDelay=typeof nt=="number"?nt:nt||nt===void 0&&tt?DEFAULT_PREVENT_SCROLL_DELAY:void 0,!(!SUPPORT.touchscreen||nt===!1))return tt||(nt!==void 0?"y":void 0)},pointerCapture(tt,et,{pointer:{capture:nt=!0,buttons:rt=1,keys:it=!0}={}}){return this.pointerButtons=rt,this.keys=it,!this.pointerLock&&this.device==="pointer"&&nt},threshold(tt,et,{filterTaps:nt=!1,tapsThreshold:rt=3,axis:it=void 0}){const ot=V$2.toVector(tt,nt?rt:it?1:0);return this.filterTaps=nt,this.tapsThreshold=rt,ot},swipe({velocity:tt=DEFAULT_SWIPE_VELOCITY,distance:et=DEFAULT_SWIPE_DISTANCE,duration:nt=DEFAULT_SWIPE_DURATION}={}){return{velocity:this.transform(V$2.toVector(tt)),distance:this.transform(V$2.toVector(et)),duration:nt}},delay(tt=0){switch(tt){case!0:return DEFAULT_DRAG_DELAY;case!1:return 0;default:return tt}},axisThreshold(tt){return tt?_objectSpread2$2(_objectSpread2$2({},DEFAULT_DRAG_AXIS_THRESHOLD),tt):DEFAULT_DRAG_AXIS_THRESHOLD},keyboardDisplacement(tt=DEFAULT_KEYBOARD_DISPLACEMENT){return tt}});_objectSpread2$2(_objectSpread2$2({},commonConfigResolver),{},{device(tt,et,{shared:nt,pointer:{touch:rt=!1}={}}){if(nt.target&&!SUPPORT.touch&&SUPPORT.gesture)return"gesture";if(SUPPORT.touch&&rt)return"touch";if(SUPPORT.touchscreen){if(SUPPORT.pointer)return"pointer";if(SUPPORT.touch)return"touch"}},bounds(tt,et,{scaleBounds:nt={},angleBounds:rt={}}){const it=at=>{const st=assignDefault(call$2(nt,at),{min:-1/0,max:1/0});return[st.min,st.max]},ot=at=>{const st=assignDefault(call$2(rt,at),{min:-1/0,max:1/0});return[st.min,st.max]};return typeof nt!="function"&&typeof rt!="function"?[it(),ot()]:at=>[it(at),ot(at)]},threshold(tt,et,nt){return this.lockDirection=nt.axis==="lock",V$2.toVector(tt,this.lockDirection?[.1,3]:0)},modifierKey(tt){return tt===void 0?"ctrlKey":tt},pinchOnWheel(tt=!0){return tt}});_objectSpread2$2(_objectSpread2$2({},coordinatesConfigResolver),{},{mouseOnly:(tt=!0)=>tt});_objectSpread2$2(_objectSpread2$2({},coordinatesConfigResolver),{},{mouseOnly:(tt=!0)=>tt});const EngineMap=new Map,ConfigResolverMap=new Map;function registerAction(tt){EngineMap.set(tt.key,tt.engine),ConfigResolverMap.set(tt.key,tt.resolver)}const dragAction={key:"drag",engine:DragEngine,resolver:dragConfigResolver};function _objectWithoutPropertiesLoose$p(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function _objectWithoutProperties$m(tt,et){if(tt==null)return{};var nt=_objectWithoutPropertiesLoose$p(tt,et),rt,it;if(Object.getOwnPropertySymbols){var ot=Object.getOwnPropertySymbols(tt);for(it=0;it=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}const sharedConfigResolver={target(tt){if(tt)return()=>"current"in tt?tt.current:tt},enabled(tt=!0){return tt},window(tt=SUPPORT.isBrowser?window:void 0){return tt},eventOptions({passive:tt=!0,capture:et=!1}={}){return{passive:tt,capture:et}},transform(tt){return tt}},_excluded$1M=["target","eventOptions","window","enabled","transform"];function resolveWith(tt={},et){const nt={};for(const[rt,it]of Object.entries(et))switch(typeof it){case"function":nt[rt]=it.call(nt,tt[rt],rt,tt);break;case"object":nt[rt]=resolveWith(tt[rt],it);break;case"boolean":it&&(nt[rt]=tt[rt]);break}return nt}function parse$3(tt,et,nt={}){const rt=tt,{target:it,eventOptions:ot,window:at,enabled:st,transform:lt}=rt,ct=_objectWithoutProperties$m(rt,_excluded$1M);if(nt.shared=resolveWith({target:it,eventOptions:ot,window:at,enabled:st,transform:lt},sharedConfigResolver),et){const ut=ConfigResolverMap.get(et);nt[et]=resolveWith(_objectSpread2$2({shared:nt.shared},ct),ut)}else for(const ut in ct){const ht=ConfigResolverMap.get(ut);ht&&(nt[ut]=resolveWith(_objectSpread2$2({shared:nt.shared},ct[ut]),ht))}return nt}class EventStore{constructor(et,nt){_defineProperty$H(this,"_listeners",new Set),this._ctrl=et,this._gestureKey=nt}add(et,nt,rt,it,ot){const at=this._listeners,st=toDomEventType(nt,rt),lt=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},ct=_objectSpread2$2(_objectSpread2$2({},lt),ot);et.addEventListener(st,it,ct);const ut=()=>{et.removeEventListener(st,it,ct),at.delete(ut)};return at.add(ut),ut}clean(){this._listeners.forEach(et=>et()),this._listeners.clear()}}class TimeoutStore{constructor(){_defineProperty$H(this,"_timeouts",new Map)}add(et,nt,rt=140,...it){this.remove(et),this._timeouts.set(et,window.setTimeout(nt,rt,...it))}remove(et){const nt=this._timeouts.get(et);nt&&window.clearTimeout(nt)}clean(){this._timeouts.forEach(et=>void window.clearTimeout(et)),this._timeouts.clear()}}let Controller$1=class{constructor(et){_defineProperty$H(this,"gestures",new Set),_defineProperty$H(this,"_targetEventStore",new EventStore(this)),_defineProperty$H(this,"gestureEventStores",{}),_defineProperty$H(this,"gestureTimeoutStores",{}),_defineProperty$H(this,"handlers",{}),_defineProperty$H(this,"config",{}),_defineProperty$H(this,"pointerIds",new Set),_defineProperty$H(this,"touchIds",new Set),_defineProperty$H(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),resolveGestures(this,et)}setEventIds(et){if(isTouch$1(et))return this.touchIds=new Set(touchIds(et)),this.touchIds;if("pointerId"in et)return et.type==="pointerup"||et.type==="pointercancel"?this.pointerIds.delete(et.pointerId):et.type==="pointerdown"&&this.pointerIds.add(et.pointerId),this.pointerIds}applyHandlers(et,nt){this.handlers=et,this.nativeHandlers=nt}applyConfig(et,nt){this.config=parse$3(et,nt,this.config)}clean(){this._targetEventStore.clean();for(const et of this.gestures)this.gestureEventStores[et].clean(),this.gestureTimeoutStores[et].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...et){const nt=this.config.shared,rt={};let it;if(!(nt.target&&(it=nt.target(),!it))){if(nt.enabled){for(const at of this.gestures){const st=this.config[at],lt=bindToProps(rt,st.eventOptions,!!it);if(st.enabled){const ct=EngineMap.get(at);new ct(this,et,at).bind(lt)}}const ot=bindToProps(rt,nt.eventOptions,!!it);for(const at in this.nativeHandlers)ot(at,"",st=>this.nativeHandlers[at](_objectSpread2$2(_objectSpread2$2({},this.state.shared),{},{event:st,args:et})),void 0,!0)}for(const ot in rt)rt[ot]=chain(...rt[ot]);if(!it)return rt;for(const ot in rt){const{device:at,capture:st,passive:lt}=parseProp(ot);this._targetEventStore.add(it,at,"",rt[ot],{capture:st,passive:lt})}}}};function setupGesture(tt,et){tt.gestures.add(et),tt.gestureEventStores[et]=new EventStore(tt,et),tt.gestureTimeoutStores[et]=new TimeoutStore}function resolveGestures(tt,et){et.drag&&setupGesture(tt,"drag"),et.wheel&&setupGesture(tt,"wheel"),et.scroll&&setupGesture(tt,"scroll"),et.move&&setupGesture(tt,"move"),et.pinch&&setupGesture(tt,"pinch"),et.hover&&setupGesture(tt,"hover")}const bindToProps=(tt,et,nt)=>(rt,it,ot,at={},st=!1)=>{var lt,ct;const ut=(lt=at.capture)!==null&<!==void 0?lt:et.capture,ht=(ct=at.passive)!==null&&ct!==void 0?ct:et.passive;let dt=st?rt:toHandlerProp(rt,it,ut);nt&&ht&&(dt+="Passive"),tt[dt]=tt[dt]||[],tt[dt].push(ot)};function useRecognizers(tt,et={},nt,rt){const it=React$1.useMemo(()=>new Controller$1(tt),[]);if(it.applyHandlers(tt,rt),it.applyConfig(et,nt),React$1.useEffect(it.effect.bind(it)),React$1.useEffect(()=>it.clean.bind(it),[]),et.target===void 0)return it.bind.bind(it)}function useDrag$2(tt,et){return registerAction(dragAction),useRecognizers({drag:tt},et||{},"drag")}function $e42e1063c40fb3ef$export$b9ecd428b558ff10(tt,et,{checkForDefaultPrevented:nt=!0}={}){return function(it){if(tt==null||tt(it),nt===!1||!it.defaultPrevented)return et==null?void 0:et(it)}}function $c512c27ab02ef895$export$50c7b4e9d9f19c1(tt,et=[]){let nt=[];function rt(ot,at){const st=reactExports.createContext(at),lt=nt.length;nt=[...nt,at];function ct(ht){const{scope:dt,children:pt,...mt}=ht,gt=(dt==null?void 0:dt[tt][lt])||st,yt=reactExports.useMemo(()=>mt,Object.values(mt));return reactExports.createElement(gt.Provider,{value:yt},pt)}function ut(ht,dt){const pt=(dt==null?void 0:dt[tt][lt])||st,mt=reactExports.useContext(pt);if(mt)return mt;if(at!==void 0)return at;throw new Error(`\`${ht}\` must be used within \`${ot}\``)}return ct.displayName=ot+"Provider",[ct,ut]}const it=()=>{const ot=nt.map(at=>reactExports.createContext(at));return function(st){const lt=(st==null?void 0:st[tt])||ot;return reactExports.useMemo(()=>({[`__scope${tt}`]:{...st,[tt]:lt}}),[st,lt])}};return it.scopeName=tt,[rt,$c512c27ab02ef895$var$composeContextScopes(it,...et)]}function $c512c27ab02ef895$var$composeContextScopes(...tt){const et=tt[0];if(tt.length===1)return et;const nt=()=>{const rt=tt.map(it=>({useScope:it(),scopeName:it.scopeName}));return function(ot){const at=rt.reduce((st,{useScope:lt,scopeName:ct})=>{const ht=lt(ot)[`__scope${ct}`];return{...st,...ht}},{});return reactExports.useMemo(()=>({[`__scope${et.scopeName}`]:at}),[at])}};return nt.scopeName=et.scopeName,nt}function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(tt){const et=reactExports.useRef(tt);return reactExports.useEffect(()=>{et.current=tt}),reactExports.useMemo(()=>(...nt)=>{var rt;return(rt=et.current)===null||rt===void 0?void 0:rt.call(et,...nt)},[])}function $addc16e1bbe58fd0$export$3a72a57244d6e765(tt,et=globalThis==null?void 0:globalThis.document){const nt=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(tt);reactExports.useEffect(()=>{const rt=it=>{it.key==="Escape"&&nt(it)};return et.addEventListener("keydown",rt),()=>et.removeEventListener("keydown",rt)},[nt,et])}const $5cb92bef7577960e$var$CONTEXT_UPDATE="dismissableLayer.update",$5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE="dismissableLayer.pointerDownOutside",$5cb92bef7577960e$var$FOCUS_OUTSIDE="dismissableLayer.focusOutside";let $5cb92bef7577960e$var$originalBodyPointerEvents;const $5cb92bef7577960e$var$DismissableLayerContext=reactExports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$5cb92bef7577960e$export$177fb62ff3ec1f22=reactExports.forwardRef((tt,et)=>{var nt;const{disableOutsidePointerEvents:rt=!1,onEscapeKeyDown:it,onPointerDownOutside:ot,onFocusOutside:at,onInteractOutside:st,onDismiss:lt,...ct}=tt,ut=reactExports.useContext($5cb92bef7577960e$var$DismissableLayerContext),[ht,dt]=reactExports.useState(null),pt=(nt=ht==null?void 0:ht.ownerDocument)!==null&&nt!==void 0?nt:globalThis==null?void 0:globalThis.document,[,mt]=reactExports.useState({}),gt=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(et,Et=>dt(Et)),yt=Array.from(ut.layers),[bt]=[...ut.layersWithOutsidePointerEventsDisabled].slice(-1),vt=yt.indexOf(bt),xt=ht?yt.indexOf(ht):-1,kt=ut.layersWithOutsidePointerEventsDisabled.size>0,St=xt>=vt,Tt=$5cb92bef7577960e$var$usePointerDownOutside(Et=>{const $t=Et.target,Dt=[...ut.branches].some(jt=>jt.contains($t));!St||Dt||(ot==null||ot(Et),st==null||st(Et),Et.defaultPrevented||lt==null||lt())},pt),At=$5cb92bef7577960e$var$useFocusOutside(Et=>{const $t=Et.target;[...ut.branches].some(jt=>jt.contains($t))||(at==null||at(Et),st==null||st(Et),Et.defaultPrevented||lt==null||lt())},pt);return $addc16e1bbe58fd0$export$3a72a57244d6e765(Et=>{xt===ut.layers.size-1&&(it==null||it(Et),!Et.defaultPrevented&<&&(Et.preventDefault(),lt()))},pt),reactExports.useEffect(()=>{if(ht)return rt&&(ut.layersWithOutsidePointerEventsDisabled.size===0&&($5cb92bef7577960e$var$originalBodyPointerEvents=pt.body.style.pointerEvents,pt.body.style.pointerEvents="none"),ut.layersWithOutsidePointerEventsDisabled.add(ht)),ut.layers.add(ht),$5cb92bef7577960e$var$dispatchUpdate(),()=>{rt&&ut.layersWithOutsidePointerEventsDisabled.size===1&&(pt.body.style.pointerEvents=$5cb92bef7577960e$var$originalBodyPointerEvents)}},[ht,pt,rt,ut]),reactExports.useEffect(()=>()=>{ht&&(ut.layers.delete(ht),ut.layersWithOutsidePointerEventsDisabled.delete(ht),$5cb92bef7577960e$var$dispatchUpdate())},[ht,ut]),reactExports.useEffect(()=>{const Et=()=>mt({});return document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE,Et),()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE,Et)},[]),reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,_extends$u({},ct,{ref:gt,style:{pointerEvents:kt?St?"auto":"none":void 0,...tt.style},onFocusCapture:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onFocusCapture,At.onFocusCapture),onBlurCapture:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onBlurCapture,At.onBlurCapture),onPointerDownCapture:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onPointerDownCapture,Tt.onPointerDownCapture)}))});function $5cb92bef7577960e$var$usePointerDownOutside(tt,et=globalThis==null?void 0:globalThis.document){const nt=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(tt),rt=reactExports.useRef(!1),it=reactExports.useRef(()=>{});return reactExports.useEffect(()=>{const ot=st=>{if(st.target&&!rt.current){let ut=function(){$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE,nt,ct,{discrete:!0})};var lt=ut;const ct={originalEvent:st};st.pointerType==="touch"?(et.removeEventListener("click",it.current),it.current=ut,et.addEventListener("click",it.current,{once:!0})):ut()}else et.removeEventListener("click",it.current);rt.current=!1},at=window.setTimeout(()=>{et.addEventListener("pointerdown",ot)},0);return()=>{window.clearTimeout(at),et.removeEventListener("pointerdown",ot),et.removeEventListener("click",it.current)}},[et,nt]),{onPointerDownCapture:()=>rt.current=!0}}function $5cb92bef7577960e$var$useFocusOutside(tt,et=globalThis==null?void 0:globalThis.document){const nt=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(tt),rt=reactExports.useRef(!1);return reactExports.useEffect(()=>{const it=ot=>{ot.target&&!rt.current&&$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE,nt,{originalEvent:ot},{discrete:!1})};return et.addEventListener("focusin",it),()=>et.removeEventListener("focusin",it)},[et,nt]),{onFocusCapture:()=>rt.current=!0,onBlurCapture:()=>rt.current=!1}}function $5cb92bef7577960e$var$dispatchUpdate(){const tt=new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);document.dispatchEvent(tt)}function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(tt,et,nt,{discrete:rt}){const it=nt.originalEvent.target,ot=new CustomEvent(tt,{bubbles:!1,cancelable:!0,detail:nt});et&&it.addEventListener(tt,et,{once:!0}),rt?$8927f6f2acc4f386$export$6d1a0317bde7de7f(it,ot):it.dispatchEvent(ot)}const $9f79659886946c16$export$e5c5a5f917a5871c=globalThis!=null&&globalThis.document?reactExports.useLayoutEffect:()=>{},$1746a345f3d73bb7$var$useReactId=React$2["useId".toString()]||(()=>{});let $1746a345f3d73bb7$var$count=0;function $1746a345f3d73bb7$export$f680877a34711e37(tt){const[et,nt]=reactExports.useState($1746a345f3d73bb7$var$useReactId());return $9f79659886946c16$export$e5c5a5f917a5871c(()=>{tt||nt(rt=>rt??String($1746a345f3d73bb7$var$count++))},[tt]),tt||(et?`radix-${et}`:"")}const sides=["top","right","bottom","left"],min$4=Math.min,max$5=Math.max,round$4=Math.round,floor=Math.floor,createCoords=tt=>({x:tt,y:tt}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$9(tt,et,nt){return max$5(tt,min$4(et,nt))}function evaluate$1(tt,et){return typeof tt=="function"?tt(et):tt}function getSide(tt){return tt.split("-")[0]}function getAlignment(tt){return tt.split("-")[1]}function getOppositeAxis(tt){return tt==="x"?"y":"x"}function getAxisLength(tt){return tt==="y"?"height":"width"}function getSideAxis(tt){return["top","bottom"].includes(getSide(tt))?"y":"x"}function getAlignmentAxis(tt){return getOppositeAxis(getSideAxis(tt))}function getAlignmentSides(tt,et,nt){nt===void 0&&(nt=!1);const rt=getAlignment(tt),it=getAlignmentAxis(tt),ot=getAxisLength(it);let at=it==="x"?rt===(nt?"end":"start")?"right":"left":rt==="start"?"bottom":"top";return et.reference[ot]>et.floating[ot]&&(at=getOppositePlacement$1(at)),[at,getOppositePlacement$1(at)]}function getExpandedPlacements(tt){const et=getOppositePlacement$1(tt);return[getOppositeAlignmentPlacement(tt),et,getOppositeAlignmentPlacement(et)]}function getOppositeAlignmentPlacement(tt){return tt.replace(/start|end/g,et=>oppositeAlignmentMap[et])}function getSideList(tt,et,nt){const rt=["left","right"],it=["right","left"],ot=["top","bottom"],at=["bottom","top"];switch(tt){case"top":case"bottom":return nt?et?it:rt:et?rt:it;case"left":case"right":return et?ot:at;default:return[]}}function getOppositeAxisPlacements(tt,et,nt,rt){const it=getAlignment(tt);let ot=getSideList(getSide(tt),nt==="start",rt);return it&&(ot=ot.map(at=>at+"-"+it),et&&(ot=ot.concat(ot.map(getOppositeAlignmentPlacement)))),ot}function getOppositePlacement$1(tt){return tt.replace(/left|right|bottom|top/g,et=>oppositeSideMap[et])}function expandPaddingObject(tt){return{top:0,right:0,bottom:0,left:0,...tt}}function getPaddingObject(tt){return typeof tt!="number"?expandPaddingObject(tt):{top:tt,right:tt,bottom:tt,left:tt}}function rectToClientRect$1(tt){return{...tt,top:tt.y,left:tt.x,right:tt.x+tt.width,bottom:tt.y+tt.height}}function computeCoordsFromPlacement(tt,et,nt){let{reference:rt,floating:it}=tt;const ot=getSideAxis(et),at=getAlignmentAxis(et),st=getAxisLength(at),lt=getSide(et),ct=ot==="y",ut=rt.x+rt.width/2-it.width/2,ht=rt.y+rt.height/2-it.height/2,dt=rt[st]/2-it[st]/2;let pt;switch(lt){case"top":pt={x:ut,y:rt.y-it.height};break;case"bottom":pt={x:ut,y:rt.y+rt.height};break;case"right":pt={x:rt.x+rt.width,y:ht};break;case"left":pt={x:rt.x-it.width,y:ht};break;default:pt={x:rt.x,y:rt.y}}switch(getAlignment(et)){case"start":pt[at]-=dt*(nt&&ct?-1:1);break;case"end":pt[at]+=dt*(nt&&ct?-1:1);break}return pt}const computePosition$1=async(tt,et,nt)=>{const{placement:rt="bottom",strategy:it="absolute",middleware:ot=[],platform:at}=nt,st=ot.filter(Boolean),lt=await(at.isRTL==null?void 0:at.isRTL(et));let ct=await at.getElementRects({reference:tt,floating:et,strategy:it}),{x:ut,y:ht}=computeCoordsFromPlacement(ct,rt,lt),dt=rt,pt={},mt=0;for(let gt=0;gt({name:"arrow",options:tt,async fn(et){const{x:nt,y:rt,placement:it,rects:ot,platform:at,elements:st,middlewareData:lt}=et,{element:ct,padding:ut=0}=evaluate$1(tt,et)||{};if(ct==null)return{};const ht=getPaddingObject(ut),dt={x:nt,y:rt},pt=getAlignmentAxis(it),mt=getAxisLength(pt),gt=await at.getDimensions(ct),yt=pt==="y",bt=yt?"top":"left",vt=yt?"bottom":"right",xt=yt?"clientHeight":"clientWidth",kt=ot.reference[mt]+ot.reference[pt]-dt[pt]-ot.floating[mt],St=dt[pt]-ot.reference[pt],Tt=await(at.getOffsetParent==null?void 0:at.getOffsetParent(ct));let At=Tt?Tt[xt]:0;(!At||!await(at.isElement==null?void 0:at.isElement(Tt)))&&(At=st.floating[xt]||ot.floating[mt]);const Et=kt/2-St/2,$t=At/2-gt[mt]/2-1,Dt=min$4(ht[bt],$t),jt=min$4(ht[vt],$t),Pt=Dt,Ct=At-gt[mt]-jt,wt=At/2-gt[mt]/2+Et,It=clamp$9(Pt,wt,Ct),Ot=!lt.arrow&&getAlignment(it)!=null&&wt!=It&&ot.reference[mt]/2-(wtPt<=0)){var $t,Dt;const Pt=((($t=ot.flip)==null?void 0:$t.index)||0)+1,Ct=St[Pt];if(Ct)return{data:{index:Pt,overflows:Et},reset:{placement:Ct}};let wt=(Dt=Et.filter(It=>It.overflows[0]<=0).sort((It,Ot)=>It.overflows[1]-Ot.overflows[1])[0])==null?void 0:Dt.placement;if(!wt)switch(pt){case"bestFit":{var jt;const It=(jt=Et.map(Ot=>[Ot.placement,Ot.overflows.filter(Wt=>Wt>0).reduce((Wt,zt)=>Wt+zt,0)]).sort((Ot,Wt)=>Ot[1]-Wt[1])[0])==null?void 0:jt[0];It&&(wt=It);break}case"initialPlacement":wt=st;break}if(it!==wt)return{reset:{placement:wt}}}return{}}}};function getSideOffsets$1(tt,et){return{top:tt.top-et.height,right:tt.right-et.width,bottom:tt.bottom-et.height,left:tt.left-et.width}}function isAnySideFullyClipped$1(tt){return sides.some(et=>tt[et]>=0)}const hide$2=function(tt){return tt===void 0&&(tt={}),{name:"hide",options:tt,async fn(et){const{rects:nt}=et,{strategy:rt="referenceHidden",...it}=evaluate$1(tt,et);switch(rt){case"referenceHidden":{const ot=await detectOverflow$1(et,{...it,elementContext:"reference"}),at=getSideOffsets$1(ot,nt.reference);return{data:{referenceHiddenOffsets:at,referenceHidden:isAnySideFullyClipped$1(at)}}}case"escaped":{const ot=await detectOverflow$1(et,{...it,altBoundary:!0}),at=getSideOffsets$1(ot,nt.floating);return{data:{escapedOffsets:at,escaped:isAnySideFullyClipped$1(at)}}}default:return{}}}}};async function convertValueToCoords(tt,et){const{placement:nt,platform:rt,elements:it}=tt,ot=await(rt.isRTL==null?void 0:rt.isRTL(it.floating)),at=getSide(nt),st=getAlignment(nt),lt=getSideAxis(nt)==="y",ct=["left","top"].includes(at)?-1:1,ut=ot&<?-1:1,ht=evaluate$1(et,tt);let{mainAxis:dt,crossAxis:pt,alignmentAxis:mt}=typeof ht=="number"?{mainAxis:ht,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...ht};return st&&typeof mt=="number"&&(pt=st==="end"?mt*-1:mt),lt?{x:pt*ut,y:dt*ct}:{x:dt*ct,y:pt*ut}}const offset$3=function(tt){return tt===void 0&&(tt=0),{name:"offset",options:tt,async fn(et){const{x:nt,y:rt}=et,it=await convertValueToCoords(et,tt);return{x:nt+it.x,y:rt+it.y,data:it}}}},shift=function(tt){return tt===void 0&&(tt={}),{name:"shift",options:tt,async fn(et){const{x:nt,y:rt,placement:it}=et,{mainAxis:ot=!0,crossAxis:at=!1,limiter:st={fn:yt=>{let{x:bt,y:vt}=yt;return{x:bt,y:vt}}},...lt}=evaluate$1(tt,et),ct={x:nt,y:rt},ut=await detectOverflow$1(et,lt),ht=getSideAxis(getSide(it)),dt=getOppositeAxis(ht);let pt=ct[dt],mt=ct[ht];if(ot){const yt=dt==="y"?"top":"left",bt=dt==="y"?"bottom":"right",vt=pt+ut[yt],xt=pt-ut[bt];pt=clamp$9(vt,pt,xt)}if(at){const yt=ht==="y"?"top":"left",bt=ht==="y"?"bottom":"right",vt=mt+ut[yt],xt=mt-ut[bt];mt=clamp$9(vt,mt,xt)}const gt=st.fn({...et,[dt]:pt,[ht]:mt});return{...gt,data:{x:gt.x-nt,y:gt.y-rt}}}}},limitShift=function(tt){return tt===void 0&&(tt={}),{options:tt,fn(et){const{x:nt,y:rt,placement:it,rects:ot,middlewareData:at}=et,{offset:st=0,mainAxis:lt=!0,crossAxis:ct=!0}=evaluate$1(tt,et),ut={x:nt,y:rt},ht=getSideAxis(it),dt=getOppositeAxis(ht);let pt=ut[dt],mt=ut[ht];const gt=evaluate$1(st,et),yt=typeof gt=="number"?{mainAxis:gt,crossAxis:0}:{mainAxis:0,crossAxis:0,...gt};if(lt){const xt=dt==="y"?"height":"width",kt=ot.reference[dt]-ot.floating[xt]+yt.mainAxis,St=ot.reference[dt]+ot.reference[xt]-yt.mainAxis;ptSt&&(pt=St)}if(ct){var bt,vt;const xt=dt==="y"?"width":"height",kt=["top","left"].includes(getSide(it)),St=ot.reference[ht]-ot.floating[xt]+(kt&&((bt=at.offset)==null?void 0:bt[ht])||0)+(kt?0:yt.crossAxis),Tt=ot.reference[ht]+ot.reference[xt]+(kt?0:((vt=at.offset)==null?void 0:vt[ht])||0)-(kt?yt.crossAxis:0);mtTt&&(mt=Tt)}return{[dt]:pt,[ht]:mt}}}},size=function(tt){return tt===void 0&&(tt={}),{name:"size",options:tt,async fn(et){const{placement:nt,rects:rt,platform:it,elements:ot}=et,{apply:at=()=>{},...st}=evaluate$1(tt,et),lt=await detectOverflow$1(et,st),ct=getSide(nt),ut=getAlignment(nt),ht=getSideAxis(nt)==="y",{width:dt,height:pt}=rt.floating;let mt,gt;ct==="top"||ct==="bottom"?(mt=ct,gt=ut===(await(it.isRTL==null?void 0:it.isRTL(ot.floating))?"start":"end")?"left":"right"):(gt=ct,mt=ut==="end"?"top":"bottom");const yt=pt-lt[mt],bt=dt-lt[gt],vt=!et.middlewareData.shift;let xt=yt,kt=bt;if(ht){const Tt=dt-lt.left-lt.right;kt=ut||vt?min$4(bt,Tt):Tt}else{const Tt=pt-lt.top-lt.bottom;xt=ut||vt?min$4(yt,Tt):Tt}if(vt&&!ut){const Tt=max$5(lt.left,0),At=max$5(lt.right,0),Et=max$5(lt.top,0),$t=max$5(lt.bottom,0);ht?kt=dt-2*(Tt!==0||At!==0?Tt+At:max$5(lt.left,lt.right)):xt=pt-2*(Et!==0||$t!==0?Et+$t:max$5(lt.top,lt.bottom))}await at({...et,availableWidth:kt,availableHeight:xt});const St=await it.getDimensions(ot.floating);return dt!==St.width||pt!==St.height?{reset:{rects:!0}}:{}}}};function getNodeName$1(tt){return isNode(tt)?(tt.nodeName||"").toLowerCase():"#document"}function getWindow$1(tt){var et;return(tt==null||(et=tt.ownerDocument)==null?void 0:et.defaultView)||window}function getDocumentElement$1(tt){var et;return(et=(isNode(tt)?tt.ownerDocument:tt.document)||window.document)==null?void 0:et.documentElement}function isNode(tt){return tt instanceof Node||tt instanceof getWindow$1(tt).Node}function isElement$1(tt){return tt instanceof Element||tt instanceof getWindow$1(tt).Element}function isHTMLElement$3(tt){return tt instanceof HTMLElement||tt instanceof getWindow$1(tt).HTMLElement}function isShadowRoot$1(tt){return typeof ShadowRoot>"u"?!1:tt instanceof ShadowRoot||tt instanceof getWindow$1(tt).ShadowRoot}function isOverflowElement(tt){const{overflow:et,overflowX:nt,overflowY:rt,display:it}=getComputedStyle$2(tt);return/auto|scroll|overlay|hidden|clip/.test(et+rt+nt)&&!["inline","contents"].includes(it)}function isTableElement$1(tt){return["table","td","th"].includes(getNodeName$1(tt))}function isContainingBlock(tt){const et=isWebKit(),nt=getComputedStyle$2(tt);return nt.transform!=="none"||nt.perspective!=="none"||(nt.containerType?nt.containerType!=="normal":!1)||!et&&(nt.backdropFilter?nt.backdropFilter!=="none":!1)||!et&&(nt.filter?nt.filter!=="none":!1)||["transform","perspective","filter"].some(rt=>(nt.willChange||"").includes(rt))||["paint","layout","strict","content"].some(rt=>(nt.contain||"").includes(rt))}function getContainingBlock$1(tt){let et=getParentNode$1(tt);for(;isHTMLElement$3(et)&&!isLastTraversableNode(et);){if(isContainingBlock(et))return et;et=getParentNode$1(et)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(tt){return["html","body","#document"].includes(getNodeName$1(tt))}function getComputedStyle$2(tt){return getWindow$1(tt).getComputedStyle(tt)}function getNodeScroll$1(tt){return isElement$1(tt)?{scrollLeft:tt.scrollLeft,scrollTop:tt.scrollTop}:{scrollLeft:tt.pageXOffset,scrollTop:tt.pageYOffset}}function getParentNode$1(tt){if(getNodeName$1(tt)==="html")return tt;const et=tt.assignedSlot||tt.parentNode||isShadowRoot$1(tt)&&tt.host||getDocumentElement$1(tt);return isShadowRoot$1(et)?et.host:et}function getNearestOverflowAncestor(tt){const et=getParentNode$1(tt);return isLastTraversableNode(et)?tt.ownerDocument?tt.ownerDocument.body:tt.body:isHTMLElement$3(et)&&isOverflowElement(et)?et:getNearestOverflowAncestor(et)}function getOverflowAncestors(tt,et,nt){var rt;et===void 0&&(et=[]),nt===void 0&&(nt=!0);const it=getNearestOverflowAncestor(tt),ot=it===((rt=tt.ownerDocument)==null?void 0:rt.body),at=getWindow$1(it);return ot?et.concat(at,at.visualViewport||[],isOverflowElement(it)?it:[],at.frameElement&&nt?getOverflowAncestors(at.frameElement):[]):et.concat(it,getOverflowAncestors(it,[],nt))}function getCssDimensions(tt){const et=getComputedStyle$2(tt);let nt=parseFloat(et.width)||0,rt=parseFloat(et.height)||0;const it=isHTMLElement$3(tt),ot=it?tt.offsetWidth:nt,at=it?tt.offsetHeight:rt,st=round$4(nt)!==ot||round$4(rt)!==at;return st&&(nt=ot,rt=at),{width:nt,height:rt,$:st}}function unwrapElement(tt){return isElement$1(tt)?tt:tt.contextElement}function getScale$1(tt){const et=unwrapElement(tt);if(!isHTMLElement$3(et))return createCoords(1);const nt=et.getBoundingClientRect(),{width:rt,height:it,$:ot}=getCssDimensions(et);let at=(ot?round$4(nt.width):nt.width)/rt,st=(ot?round$4(nt.height):nt.height)/it;return(!at||!Number.isFinite(at))&&(at=1),(!st||!Number.isFinite(st))&&(st=1),{x:at,y:st}}const noOffsets=createCoords(0);function getVisualOffsets(tt){const et=getWindow$1(tt);return!isWebKit()||!et.visualViewport?noOffsets:{x:et.visualViewport.offsetLeft,y:et.visualViewport.offsetTop}}function shouldAddVisualOffsets(tt,et,nt){return et===void 0&&(et=!1),!nt||et&&nt!==getWindow$1(tt)?!1:et}function getBoundingClientRect$1(tt,et,nt,rt){et===void 0&&(et=!1),nt===void 0&&(nt=!1);const it=tt.getBoundingClientRect(),ot=unwrapElement(tt);let at=createCoords(1);et&&(rt?isElement$1(rt)&&(at=getScale$1(rt)):at=getScale$1(tt));const st=shouldAddVisualOffsets(ot,nt,rt)?getVisualOffsets(ot):createCoords(0);let lt=(it.left+st.x)/at.x,ct=(it.top+st.y)/at.y,ut=it.width/at.x,ht=it.height/at.y;if(ot){const dt=getWindow$1(ot),pt=rt&&isElement$1(rt)?getWindow$1(rt):rt;let mt=dt.frameElement;for(;mt&&rt&&pt!==dt;){const gt=getScale$1(mt),yt=mt.getBoundingClientRect(),bt=getComputedStyle$2(mt),vt=yt.left+(mt.clientLeft+parseFloat(bt.paddingLeft))*gt.x,xt=yt.top+(mt.clientTop+parseFloat(bt.paddingTop))*gt.y;lt*=gt.x,ct*=gt.y,ut*=gt.x,ht*=gt.y,lt+=vt,ct+=xt,mt=getWindow$1(mt).frameElement}}return rectToClientRect$1({width:ut,height:ht,x:lt,y:ct})}function convertOffsetParentRelativeRectToViewportRelativeRect(tt){let{rect:et,offsetParent:nt,strategy:rt}=tt;const it=isHTMLElement$3(nt),ot=getDocumentElement$1(nt);if(nt===ot)return et;let at={scrollLeft:0,scrollTop:0},st=createCoords(1);const lt=createCoords(0);if((it||!it&&rt!=="fixed")&&((getNodeName$1(nt)!=="body"||isOverflowElement(ot))&&(at=getNodeScroll$1(nt)),isHTMLElement$3(nt))){const ct=getBoundingClientRect$1(nt);st=getScale$1(nt),lt.x=ct.x+nt.clientLeft,lt.y=ct.y+nt.clientTop}return{width:et.width*st.x,height:et.height*st.y,x:et.x*st.x-at.scrollLeft*st.x+lt.x,y:et.y*st.y-at.scrollTop*st.y+lt.y}}function getClientRects(tt){return Array.from(tt.getClientRects())}function getWindowScrollBarX$1(tt){return getBoundingClientRect$1(getDocumentElement$1(tt)).left+getNodeScroll$1(tt).scrollLeft}function getDocumentRect$1(tt){const et=getDocumentElement$1(tt),nt=getNodeScroll$1(tt),rt=tt.ownerDocument.body,it=max$5(et.scrollWidth,et.clientWidth,rt.scrollWidth,rt.clientWidth),ot=max$5(et.scrollHeight,et.clientHeight,rt.scrollHeight,rt.clientHeight);let at=-nt.scrollLeft+getWindowScrollBarX$1(tt);const st=-nt.scrollTop;return getComputedStyle$2(rt).direction==="rtl"&&(at+=max$5(et.clientWidth,rt.clientWidth)-it),{width:it,height:ot,x:at,y:st}}function getViewportRect$1(tt,et){const nt=getWindow$1(tt),rt=getDocumentElement$1(tt),it=nt.visualViewport;let ot=rt.clientWidth,at=rt.clientHeight,st=0,lt=0;if(it){ot=it.width,at=it.height;const ct=isWebKit();(!ct||ct&&et==="fixed")&&(st=it.offsetLeft,lt=it.offsetTop)}return{width:ot,height:at,x:st,y:lt}}function getInnerBoundingClientRect$1(tt,et){const nt=getBoundingClientRect$1(tt,!0,et==="fixed"),rt=nt.top+tt.clientTop,it=nt.left+tt.clientLeft,ot=isHTMLElement$3(tt)?getScale$1(tt):createCoords(1),at=tt.clientWidth*ot.x,st=tt.clientHeight*ot.y,lt=it*ot.x,ct=rt*ot.y;return{width:at,height:st,x:lt,y:ct}}function getClientRectFromClippingAncestor(tt,et,nt){let rt;if(et==="viewport")rt=getViewportRect$1(tt,nt);else if(et==="document")rt=getDocumentRect$1(getDocumentElement$1(tt));else if(isElement$1(et))rt=getInnerBoundingClientRect$1(et,nt);else{const it=getVisualOffsets(tt);rt={...et,x:et.x-it.x,y:et.y-it.y}}return rectToClientRect$1(rt)}function hasFixedPositionAncestor(tt,et){const nt=getParentNode$1(tt);return nt===et||!isElement$1(nt)||isLastTraversableNode(nt)?!1:getComputedStyle$2(nt).position==="fixed"||hasFixedPositionAncestor(nt,et)}function getClippingElementAncestors(tt,et){const nt=et.get(tt);if(nt)return nt;let rt=getOverflowAncestors(tt,[],!1).filter(st=>isElement$1(st)&&getNodeName$1(st)!=="body"),it=null;const ot=getComputedStyle$2(tt).position==="fixed";let at=ot?getParentNode$1(tt):tt;for(;isElement$1(at)&&!isLastTraversableNode(at);){const st=getComputedStyle$2(at),lt=isContainingBlock(at);!lt&&st.position==="fixed"&&(it=null),(ot?!lt&&!it:!lt&&st.position==="static"&&!!it&&["absolute","fixed"].includes(it.position)||isOverflowElement(at)&&!lt&&hasFixedPositionAncestor(tt,at))?rt=rt.filter(ut=>ut!==at):it=st,at=getParentNode$1(at)}return et.set(tt,rt),rt}function getClippingRect$1(tt){let{element:et,boundary:nt,rootBoundary:rt,strategy:it}=tt;const at=[...nt==="clippingAncestors"?getClippingElementAncestors(et,this._c):[].concat(nt),rt],st=at[0],lt=at.reduce((ct,ut)=>{const ht=getClientRectFromClippingAncestor(et,ut,it);return ct.top=max$5(ht.top,ct.top),ct.right=min$4(ht.right,ct.right),ct.bottom=min$4(ht.bottom,ct.bottom),ct.left=max$5(ht.left,ct.left),ct},getClientRectFromClippingAncestor(et,st,it));return{width:lt.right-lt.left,height:lt.bottom-lt.top,x:lt.left,y:lt.top}}function getDimensions$1(tt){return getCssDimensions(tt)}function getRectRelativeToOffsetParent(tt,et,nt){const rt=isHTMLElement$3(et),it=getDocumentElement$1(et),ot=nt==="fixed",at=getBoundingClientRect$1(tt,!0,ot,et);let st={scrollLeft:0,scrollTop:0};const lt=createCoords(0);if(rt||!rt&&!ot)if((getNodeName$1(et)!=="body"||isOverflowElement(it))&&(st=getNodeScroll$1(et)),rt){const ct=getBoundingClientRect$1(et,!0,ot,et);lt.x=ct.x+et.clientLeft,lt.y=ct.y+et.clientTop}else it&&(lt.x=getWindowScrollBarX$1(it));return{x:at.left+st.scrollLeft-lt.x,y:at.top+st.scrollTop-lt.y,width:at.width,height:at.height}}function getTrueOffsetParent$1(tt,et){return!isHTMLElement$3(tt)||getComputedStyle$2(tt).position==="fixed"?null:et?et(tt):tt.offsetParent}function getOffsetParent$1(tt,et){const nt=getWindow$1(tt);if(!isHTMLElement$3(tt))return nt;let rt=getTrueOffsetParent$1(tt,et);for(;rt&&isTableElement$1(rt)&&getComputedStyle$2(rt).position==="static";)rt=getTrueOffsetParent$1(rt,et);return rt&&(getNodeName$1(rt)==="html"||getNodeName$1(rt)==="body"&&getComputedStyle$2(rt).position==="static"&&!isContainingBlock(rt))?nt:rt||getContainingBlock$1(tt)||nt}const getElementRects=async function(tt){let{reference:et,floating:nt,strategy:rt}=tt;const it=this.getOffsetParent||getOffsetParent$1,ot=this.getDimensions;return{reference:getRectRelativeToOffsetParent(et,await it(nt),rt),floating:{x:0,y:0,...await ot(nt)}}};function isRTL(tt){return getComputedStyle$2(tt).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement:getDocumentElement$1,getClippingRect:getClippingRect$1,getOffsetParent:getOffsetParent$1,getElementRects,getClientRects,getDimensions:getDimensions$1,getScale:getScale$1,isElement:isElement$1,isRTL};function observeMove(tt,et){let nt=null,rt;const it=getDocumentElement$1(tt);function ot(){clearTimeout(rt),nt&&nt.disconnect(),nt=null}function at(st,lt){st===void 0&&(st=!1),lt===void 0&&(lt=1),ot();const{left:ct,top:ut,width:ht,height:dt}=tt.getBoundingClientRect();if(st||et(),!ht||!dt)return;const pt=floor(ut),mt=floor(it.clientWidth-(ct+ht)),gt=floor(it.clientHeight-(ut+dt)),yt=floor(ct),vt={rootMargin:-pt+"px "+-mt+"px "+-gt+"px "+-yt+"px",threshold:max$5(0,min$4(1,lt))||1};let xt=!0;function kt(St){const Tt=St[0].intersectionRatio;if(Tt!==lt){if(!xt)return at();Tt?at(!1,Tt):rt=setTimeout(()=>{at(!1,1e-7)},100)}xt=!1}try{nt=new IntersectionObserver(kt,{...vt,root:it.ownerDocument})}catch{nt=new IntersectionObserver(kt,vt)}nt.observe(tt)}return at(!0),ot}function autoUpdate(tt,et,nt,rt){rt===void 0&&(rt={});const{ancestorScroll:it=!0,ancestorResize:ot=!0,elementResize:at=typeof ResizeObserver=="function",layoutShift:st=typeof IntersectionObserver=="function",animationFrame:lt=!1}=rt,ct=unwrapElement(tt),ut=it||ot?[...ct?getOverflowAncestors(ct):[],...getOverflowAncestors(et)]:[];ut.forEach(bt=>{it&&bt.addEventListener("scroll",nt,{passive:!0}),ot&&bt.addEventListener("resize",nt)});const ht=ct&&st?observeMove(ct,nt):null;let dt=-1,pt=null;at&&(pt=new ResizeObserver(bt=>{let[vt]=bt;vt&&vt.target===ct&&pt&&(pt.unobserve(et),cancelAnimationFrame(dt),dt=requestAnimationFrame(()=>{pt&&pt.observe(et)})),nt()}),ct&&!lt&&pt.observe(ct),pt.observe(et));let mt,gt=lt?getBoundingClientRect$1(tt):null;lt&&yt();function yt(){const bt=getBoundingClientRect$1(tt);gt&&(bt.x!==gt.x||bt.y!==gt.y||bt.width!==gt.width||bt.height!==gt.height)&&nt(),gt=bt,mt=requestAnimationFrame(yt)}return nt(),()=>{ut.forEach(bt=>{it&&bt.removeEventListener("scroll",nt),ot&&bt.removeEventListener("resize",nt)}),ht&&ht(),pt&&pt.disconnect(),pt=null,lt&&cancelAnimationFrame(mt)}}const computePosition=(tt,et,nt)=>{const rt=new Map,it={platform,...nt},ot={...it.platform,_c:rt};return computePosition$1(tt,et,{...it,platform:ot})},arrow$2=tt=>{function et(nt){return{}.hasOwnProperty.call(nt,"current")}return{name:"arrow",options:tt,fn(nt){const{element:rt,padding:it}=typeof tt=="function"?tt(nt):tt;return rt&&et(rt)?rt.current!=null?arrow$3({element:rt.current,padding:it}).fn(nt):{}:rt?arrow$3({element:rt,padding:it}).fn(nt):{}}}};var index$2=typeof document<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function deepEqual$3(tt,et){if(tt===et)return!0;if(typeof tt!=typeof et)return!1;if(typeof tt=="function"&&tt.toString()===et.toString())return!0;let nt,rt,it;if(tt&&et&&typeof tt=="object"){if(Array.isArray(tt)){if(nt=tt.length,nt!=et.length)return!1;for(rt=nt;rt--!==0;)if(!deepEqual$3(tt[rt],et[rt]))return!1;return!0}if(it=Object.keys(tt),nt=it.length,nt!==Object.keys(et).length)return!1;for(rt=nt;rt--!==0;)if(!{}.hasOwnProperty.call(et,it[rt]))return!1;for(rt=nt;rt--!==0;){const ot=it[rt];if(!(ot==="_owner"&&tt.$$typeof)&&!deepEqual$3(tt[ot],et[ot]))return!1}return!0}return tt!==tt&&et!==et}function getDPR(tt){return typeof window>"u"?1:(tt.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(tt,et){const nt=getDPR(tt);return Math.round(et*nt)/nt}function useLatestRef(tt){const et=reactExports.useRef(tt);return index$2(()=>{et.current=tt}),et}function useFloating(tt){tt===void 0&&(tt={});const{placement:et="bottom",strategy:nt="absolute",middleware:rt=[],platform:it,elements:{reference:ot,floating:at}={},transform:st=!0,whileElementsMounted:lt,open:ct}=tt,[ut,ht]=reactExports.useState({x:0,y:0,strategy:nt,placement:et,middlewareData:{},isPositioned:!1}),[dt,pt]=reactExports.useState(rt);deepEqual$3(dt,rt)||pt(rt);const[mt,gt]=reactExports.useState(null),[yt,bt]=reactExports.useState(null),vt=reactExports.useCallback(Ot=>{Ot!=Tt.current&&(Tt.current=Ot,gt(Ot))},[gt]),xt=reactExports.useCallback(Ot=>{Ot!==At.current&&(At.current=Ot,bt(Ot))},[bt]),kt=ot||mt,St=at||yt,Tt=reactExports.useRef(null),At=reactExports.useRef(null),Et=reactExports.useRef(ut),$t=useLatestRef(lt),Dt=useLatestRef(it),jt=reactExports.useCallback(()=>{if(!Tt.current||!At.current)return;const Ot={placement:et,strategy:nt,middleware:dt};Dt.current&&(Ot.platform=Dt.current),computePosition(Tt.current,At.current,Ot).then(Wt=>{const zt={...Wt,isPositioned:!0};Pt.current&&!deepEqual$3(Et.current,zt)&&(Et.current=zt,reactDomExports.flushSync(()=>{ht(zt)}))})},[dt,et,nt,Dt]);index$2(()=>{ct===!1&&Et.current.isPositioned&&(Et.current.isPositioned=!1,ht(Ot=>({...Ot,isPositioned:!1})))},[ct]);const Pt=reactExports.useRef(!1);index$2(()=>(Pt.current=!0,()=>{Pt.current=!1}),[]),index$2(()=>{if(kt&&(Tt.current=kt),St&&(At.current=St),kt&&St){if($t.current)return $t.current(kt,St,jt);jt()}},[kt,St,jt,$t]);const Ct=reactExports.useMemo(()=>({reference:Tt,floating:At,setReference:vt,setFloating:xt}),[vt,xt]),wt=reactExports.useMemo(()=>({reference:kt,floating:St}),[kt,St]),It=reactExports.useMemo(()=>{const Ot={position:nt,left:0,top:0};if(!wt.floating)return Ot;const Wt=roundByDPR(wt.floating,ut.x),zt=roundByDPR(wt.floating,ut.y);return st?{...Ot,transform:"translate("+Wt+"px, "+zt+"px)",...getDPR(wt.floating)>=1.5&&{willChange:"transform"}}:{position:nt,left:Wt,top:zt}},[nt,st,wt.floating,ut.x,ut.y]);return reactExports.useMemo(()=>({...ut,update:jt,refs:Ct,elements:wt,floatingStyles:It}),[ut,jt,Ct,wt,It])}const $7e8f5cd07187803e$export$21b07c8f274aebd5=reactExports.forwardRef((tt,et)=>{const{children:nt,width:rt=10,height:it=5,...ot}=tt;return reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.svg,_extends$u({},ot,{ref:et,width:rt,height:it,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),tt.asChild?nt:reactExports.createElement("polygon",{points:"0,0 30,0 15,10"}))}),$7e8f5cd07187803e$export$be92b6f5f03c0fe9=$7e8f5cd07187803e$export$21b07c8f274aebd5;function $db6c3485150b8e66$export$1ab7ae714698c4b8(tt){const[et,nt]=reactExports.useState(void 0);return $9f79659886946c16$export$e5c5a5f917a5871c(()=>{if(tt){nt({width:tt.offsetWidth,height:tt.offsetHeight});const rt=new ResizeObserver(it=>{if(!Array.isArray(it)||!it.length)return;const ot=it[0];let at,st;if("borderBoxSize"in ot){const lt=ot.borderBoxSize,ct=Array.isArray(lt)?lt[0]:lt;at=ct.inlineSize,st=ct.blockSize}else at=tt.offsetWidth,st=tt.offsetHeight;nt({width:at,height:st})});return rt.observe(tt,{box:"border-box"}),()=>rt.unobserve(tt)}else nt(void 0)},[tt]),et}const $cf1ac5d9fe0e8206$var$POPPER_NAME="Popper",[$cf1ac5d9fe0e8206$var$createPopperContext,$cf1ac5d9fe0e8206$export$722aac194ae923]=$c512c27ab02ef895$export$50c7b4e9d9f19c1($cf1ac5d9fe0e8206$var$POPPER_NAME),[$cf1ac5d9fe0e8206$var$PopperProvider,$cf1ac5d9fe0e8206$var$usePopperContext]=$cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$POPPER_NAME),$cf1ac5d9fe0e8206$export$badac9ada3a0bdf9=tt=>{const{__scopePopper:et,children:nt}=tt,[rt,it]=reactExports.useState(null);return reactExports.createElement($cf1ac5d9fe0e8206$var$PopperProvider,{scope:et,anchor:rt,onAnchorChange:it},nt)},$cf1ac5d9fe0e8206$var$ANCHOR_NAME="PopperAnchor",$cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d=reactExports.forwardRef((tt,et)=>{const{__scopePopper:nt,virtualRef:rt,...it}=tt,ot=$cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$ANCHOR_NAME,nt),at=reactExports.useRef(null),st=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(et,at);return reactExports.useEffect(()=>{ot.onAnchorChange((rt==null?void 0:rt.current)||at.current)}),rt?null:reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,_extends$u({},it,{ref:st}))}),$cf1ac5d9fe0e8206$var$CONTENT_NAME="PopperContent",[$cf1ac5d9fe0e8206$var$PopperContentProvider,$cf1ac5d9fe0e8206$var$useContentContext]=$cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME),$cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc=reactExports.forwardRef((tt,et)=>{var nt,rt,it,ot,at,st,lt,ct;const{__scopePopper:ut,side:ht="bottom",sideOffset:dt=0,align:pt="center",alignOffset:mt=0,arrowPadding:gt=0,avoidCollisions:yt=!0,collisionBoundary:bt=[],collisionPadding:vt=0,sticky:xt="partial",hideWhenDetached:kt=!1,updatePositionStrategy:St="optimized",onPlaced:Tt,...At}=tt,Et=$cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME,ut),[$t,Dt]=reactExports.useState(null),jt=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(et,$n=>Dt($n)),[Pt,Ct]=reactExports.useState(null),wt=$db6c3485150b8e66$export$1ab7ae714698c4b8(Pt),It=(nt=wt==null?void 0:wt.width)!==null&&nt!==void 0?nt:0,Ot=(rt=wt==null?void 0:wt.height)!==null&&rt!==void 0?rt:0,Wt=ht+(pt!=="center"?"-"+pt:""),zt=typeof vt=="number"?vt:{top:0,right:0,bottom:0,left:0,...vt},Ft=Array.isArray(bt)?bt:[bt],Nt=Ft.length>0,Ut={padding:zt,boundary:Ft.filter($cf1ac5d9fe0e8206$var$isNotNull),altBoundary:Nt},{refs:Mt,floatingStyles:Ht,placement:en,isPositioned:sn,middlewareData:Kt}=useFloating({strategy:"fixed",placement:Wt,whileElementsMounted:(...$n)=>autoUpdate(...$n,{animationFrame:St==="always"}),elements:{reference:Et.anchor},middleware:[offset$3({mainAxis:dt+Ot,alignmentAxis:mt}),yt&&shift({mainAxis:!0,crossAxis:!1,limiter:xt==="partial"?limitShift():void 0,...Ut}),yt&&flip$2({...Ut}),size({...Ut,apply:({elements:$n,rects:Nn,availableWidth:Tn,availableHeight:cn})=>{const{width:mn,height:In}=Nn.reference,An=$n.floating.style;An.setProperty("--radix-popper-available-width",`${Tn}px`),An.setProperty("--radix-popper-available-height",`${cn}px`),An.setProperty("--radix-popper-anchor-width",`${mn}px`),An.setProperty("--radix-popper-anchor-height",`${In}px`)}}),Pt&&arrow$2({element:Pt,padding:gt}),$cf1ac5d9fe0e8206$var$transformOrigin({arrowWidth:It,arrowHeight:Ot}),kt&&hide$2({strategy:"referenceHidden",...Ut})]}),[rn,nn]=$cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(en),hn=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(Tt);$9f79659886946c16$export$e5c5a5f917a5871c(()=>{sn&&(hn==null||hn())},[sn,hn]);const vn=(it=Kt.arrow)===null||it===void 0?void 0:it.x,an=(ot=Kt.arrow)===null||ot===void 0?void 0:ot.y,Qt=((at=Kt.arrow)===null||at===void 0?void 0:at.centerOffset)!==0,[_n,Pn]=reactExports.useState();return $9f79659886946c16$export$e5c5a5f917a5871c(()=>{$t&&Pn(window.getComputedStyle($t).zIndex)},[$t]),reactExports.createElement("div",{ref:Mt.setFloating,"data-radix-popper-content-wrapper":"",style:{...Ht,transform:sn?Ht.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_n,"--radix-popper-transform-origin":[(st=Kt.transformOrigin)===null||st===void 0?void 0:st.x,(lt=Kt.transformOrigin)===null||lt===void 0?void 0:lt.y].join(" ")},dir:tt.dir},reactExports.createElement($cf1ac5d9fe0e8206$var$PopperContentProvider,{scope:ut,placedSide:rn,onArrowChange:Ct,arrowX:vn,arrowY:an,shouldHideArrow:Qt},reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,_extends$u({"data-side":rn,"data-align":nn},At,{ref:jt,style:{...At.style,animation:sn?void 0:"none",opacity:(ct=Kt.hide)!==null&&ct!==void 0&&ct.referenceHidden?0:void 0}}))))}),$cf1ac5d9fe0e8206$var$ARROW_NAME="PopperArrow",$cf1ac5d9fe0e8206$var$OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},$cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0=reactExports.forwardRef(function(et,nt){const{__scopePopper:rt,...it}=et,ot=$cf1ac5d9fe0e8206$var$useContentContext($cf1ac5d9fe0e8206$var$ARROW_NAME,rt),at=$cf1ac5d9fe0e8206$var$OPPOSITE_SIDE[ot.placedSide];return reactExports.createElement("span",{ref:ot.onArrowChange,style:{position:"absolute",left:ot.arrowX,top:ot.arrowY,[at]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[ot.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[ot.placedSide],visibility:ot.shouldHideArrow?"hidden":void 0}},reactExports.createElement($7e8f5cd07187803e$export$be92b6f5f03c0fe9,_extends$u({},it,{ref:nt,style:{...it.style,display:"block"}})))});function $cf1ac5d9fe0e8206$var$isNotNull(tt){return tt!==null}const $cf1ac5d9fe0e8206$var$transformOrigin=tt=>({name:"transformOrigin",options:tt,fn(et){var nt,rt,it,ot,at;const{placement:st,rects:lt,middlewareData:ct}=et,ht=((nt=ct.arrow)===null||nt===void 0?void 0:nt.centerOffset)!==0,dt=ht?0:tt.arrowWidth,pt=ht?0:tt.arrowHeight,[mt,gt]=$cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(st),yt={start:"0%",center:"50%",end:"100%"}[gt],bt=((rt=(it=ct.arrow)===null||it===void 0?void 0:it.x)!==null&&rt!==void 0?rt:0)+dt/2,vt=((ot=(at=ct.arrow)===null||at===void 0?void 0:at.y)!==null&&ot!==void 0?ot:0)+pt/2;let xt="",kt="";return mt==="bottom"?(xt=ht?yt:`${bt}px`,kt=`${-pt}px`):mt==="top"?(xt=ht?yt:`${bt}px`,kt=`${lt.floating.height+pt}px`):mt==="right"?(xt=`${-pt}px`,kt=ht?yt:`${vt}px`):mt==="left"&&(xt=`${lt.floating.width+pt}px`,kt=ht?yt:`${vt}px`),{data:{x:xt,y:kt}}}});function $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(tt){const[et,nt="center"]=tt.split("-");return[et,nt]}const $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9=$cf1ac5d9fe0e8206$export$badac9ada3a0bdf9,$cf1ac5d9fe0e8206$export$b688253958b8dfe7=$cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d,$cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2=$cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc,$cf1ac5d9fe0e8206$export$21b07c8f274aebd5=$cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0;function $fe963b355347cc68$export$3e6543de14f8614f(tt,et){return reactExports.useReducer((nt,rt)=>{const it=et[nt][rt];return it??nt},tt)}const $921a889cee6df7e8$export$99c2b779aa4e8b8b=tt=>{const{present:et,children:nt}=tt,rt=$921a889cee6df7e8$var$usePresence(et),it=typeof nt=="function"?nt({present:rt.isPresent}):reactExports.Children.only(nt),ot=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(rt.ref,it.ref);return typeof nt=="function"||rt.isPresent?reactExports.cloneElement(it,{ref:ot}):null};$921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName="Presence";function $921a889cee6df7e8$var$usePresence(tt){const[et,nt]=reactExports.useState(),rt=reactExports.useRef({}),it=reactExports.useRef(tt),ot=reactExports.useRef("none"),at=tt?"mounted":"unmounted",[st,lt]=$fe963b355347cc68$export$3e6543de14f8614f(at,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return reactExports.useEffect(()=>{const ct=$921a889cee6df7e8$var$getAnimationName(rt.current);ot.current=st==="mounted"?ct:"none"},[st]),$9f79659886946c16$export$e5c5a5f917a5871c(()=>{const ct=rt.current,ut=it.current;if(ut!==tt){const dt=ot.current,pt=$921a889cee6df7e8$var$getAnimationName(ct);tt?lt("MOUNT"):pt==="none"||(ct==null?void 0:ct.display)==="none"?lt("UNMOUNT"):lt(ut&&dt!==pt?"ANIMATION_OUT":"UNMOUNT"),it.current=tt}},[tt,lt]),$9f79659886946c16$export$e5c5a5f917a5871c(()=>{if(et){const ct=ht=>{const pt=$921a889cee6df7e8$var$getAnimationName(rt.current).includes(ht.animationName);ht.target===et&&pt&&reactDomExports.flushSync(()=>lt("ANIMATION_END"))},ut=ht=>{ht.target===et&&(ot.current=$921a889cee6df7e8$var$getAnimationName(rt.current))};return et.addEventListener("animationstart",ut),et.addEventListener("animationcancel",ct),et.addEventListener("animationend",ct),()=>{et.removeEventListener("animationstart",ut),et.removeEventListener("animationcancel",ct),et.removeEventListener("animationend",ct)}}else lt("ANIMATION_END")},[et,lt]),{isPresent:["mounted","unmountSuspended"].includes(st),ref:reactExports.useCallback(ct=>{ct&&(rt.current=getComputedStyle(ct)),nt(ct)},[])}}function $921a889cee6df7e8$var$getAnimationName(tt){return(tt==null?void 0:tt.animationName)||"none"}function $71cd76cc60e0454e$export$6f32135080cb4c3({prop:tt,defaultProp:et,onChange:nt=()=>{}}){const[rt,it]=$71cd76cc60e0454e$var$useUncontrolledState({defaultProp:et,onChange:nt}),ot=tt!==void 0,at=ot?tt:rt,st=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(nt),lt=reactExports.useCallback(ct=>{if(ot){const ht=typeof ct=="function"?ct(tt):ct;ht!==tt&&st(ht)}else it(ct)},[ot,tt,it,st]);return[at,lt]}function $71cd76cc60e0454e$var$useUncontrolledState({defaultProp:tt,onChange:et}){const nt=reactExports.useState(tt),[rt]=nt,it=reactExports.useRef(rt),ot=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(et);return reactExports.useEffect(()=>{it.current!==rt&&(ot(rt),it.current=rt)},[rt,it,ot]),nt}const $ea1ef594cf570d83$export$439d29a4e110a164=reactExports.forwardRef((tt,et)=>reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span,_extends$u({},tt,{ref:et,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...tt.style}}))),$ea1ef594cf570d83$export$be92b6f5f03c0fe9=$ea1ef594cf570d83$export$439d29a4e110a164,[$a093c7e1ec25a057$var$createTooltipContext,$a093c7e1ec25a057$export$1c540a2224f0d865]=$c512c27ab02ef895$export$50c7b4e9d9f19c1("Tooltip",[$cf1ac5d9fe0e8206$export$722aac194ae923]),$a093c7e1ec25a057$var$usePopperScope=$cf1ac5d9fe0e8206$export$722aac194ae923(),$a093c7e1ec25a057$var$PROVIDER_NAME="TooltipProvider",$a093c7e1ec25a057$var$TOOLTIP_OPEN="tooltip.open",[$a093c7e1ec25a057$var$TooltipProviderContextProvider,$a093c7e1ec25a057$var$useTooltipProviderContext]=$a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$PROVIDER_NAME),$a093c7e1ec25a057$var$TOOLTIP_NAME="Tooltip",[$a093c7e1ec25a057$var$TooltipContextProvider,$a093c7e1ec25a057$var$useTooltipContext]=$a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$TOOLTIP_NAME),$a093c7e1ec25a057$export$28c660c63b792dea=tt=>{const{__scopeTooltip:et,children:nt,open:rt,defaultOpen:it=!1,onOpenChange:ot,disableHoverableContent:at,delayDuration:st}=tt,lt=$a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$TOOLTIP_NAME,tt.__scopeTooltip),ct=$a093c7e1ec25a057$var$usePopperScope(et),[ut,ht]=reactExports.useState(null),dt=$1746a345f3d73bb7$export$f680877a34711e37(),pt=reactExports.useRef(0),mt=at??lt.disableHoverableContent,gt=st??lt.delayDuration,yt=reactExports.useRef(!1),[bt=!1,vt]=$71cd76cc60e0454e$export$6f32135080cb4c3({prop:rt,defaultProp:it,onChange:At=>{At?(lt.onOpen(),document.dispatchEvent(new CustomEvent($a093c7e1ec25a057$var$TOOLTIP_OPEN))):lt.onClose(),ot==null||ot(At)}}),xt=reactExports.useMemo(()=>bt?yt.current?"delayed-open":"instant-open":"closed",[bt]),kt=reactExports.useCallback(()=>{window.clearTimeout(pt.current),yt.current=!1,vt(!0)},[vt]),St=reactExports.useCallback(()=>{window.clearTimeout(pt.current),vt(!1)},[vt]),Tt=reactExports.useCallback(()=>{window.clearTimeout(pt.current),pt.current=window.setTimeout(()=>{yt.current=!0,vt(!0)},gt)},[gt,vt]);return reactExports.useEffect(()=>()=>window.clearTimeout(pt.current),[]),reactExports.createElement($cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9,ct,reactExports.createElement($a093c7e1ec25a057$var$TooltipContextProvider,{scope:et,contentId:dt,open:bt,stateAttribute:xt,trigger:ut,onTriggerChange:ht,onTriggerEnter:reactExports.useCallback(()=>{lt.isOpenDelayed?Tt():kt()},[lt.isOpenDelayed,Tt,kt]),onTriggerLeave:reactExports.useCallback(()=>{mt?St():window.clearTimeout(pt.current)},[St,mt]),onOpen:kt,onClose:St,disableHoverableContent:mt},nt))},$a093c7e1ec25a057$var$TRIGGER_NAME="TooltipTrigger",$a093c7e1ec25a057$export$8c610744efcf8a1d=reactExports.forwardRef((tt,et)=>{const{__scopeTooltip:nt,...rt}=tt,it=$a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$TRIGGER_NAME,nt),ot=$a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$TRIGGER_NAME,nt),at=$a093c7e1ec25a057$var$usePopperScope(nt),st=reactExports.useRef(null),lt=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(et,st,it.onTriggerChange),ct=reactExports.useRef(!1),ut=reactExports.useRef(!1),ht=reactExports.useCallback(()=>ct.current=!1,[]);return reactExports.useEffect(()=>()=>document.removeEventListener("pointerup",ht),[ht]),reactExports.createElement($cf1ac5d9fe0e8206$export$b688253958b8dfe7,_extends$u({asChild:!0},at),reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button,_extends$u({"aria-describedby":it.open?it.contentId:void 0,"data-state":it.stateAttribute},rt,{ref:lt,onPointerMove:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onPointerMove,dt=>{dt.pointerType!=="touch"&&!ut.current&&!ot.isPointerInTransitRef.current&&(it.onTriggerEnter(),ut.current=!0)}),onPointerLeave:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onPointerLeave,()=>{it.onTriggerLeave(),ut.current=!1}),onPointerDown:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onPointerDown,()=>{ct.current=!0,document.addEventListener("pointerup",ht,{once:!0})}),onFocus:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onFocus,()=>{ct.current||it.onOpen()}),onBlur:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onBlur,it.onClose),onClick:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onClick,it.onClose)})))}),$a093c7e1ec25a057$var$PORTAL_NAME="TooltipPortal",[$a093c7e1ec25a057$var$PortalProvider,$a093c7e1ec25a057$var$usePortalContext]=$a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$PORTAL_NAME,{forceMount:void 0}),$a093c7e1ec25a057$var$CONTENT_NAME="TooltipContent",$a093c7e1ec25a057$export$e9003e2be37ec060=reactExports.forwardRef((tt,et)=>{const nt=$a093c7e1ec25a057$var$usePortalContext($a093c7e1ec25a057$var$CONTENT_NAME,tt.__scopeTooltip),{forceMount:rt=nt.forceMount,side:it="top",...ot}=tt,at=$a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME,tt.__scopeTooltip);return reactExports.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b,{present:rt||at.open},at.disableHoverableContent?reactExports.createElement($a093c7e1ec25a057$var$TooltipContentImpl,_extends$u({side:it},ot,{ref:et})):reactExports.createElement($a093c7e1ec25a057$var$TooltipContentHoverable,_extends$u({side:it},ot,{ref:et})))}),$a093c7e1ec25a057$var$TooltipContentHoverable=reactExports.forwardRef((tt,et)=>{const nt=$a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME,tt.__scopeTooltip),rt=$a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$CONTENT_NAME,tt.__scopeTooltip),it=reactExports.useRef(null),ot=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(et,it),[at,st]=reactExports.useState(null),{trigger:lt,onClose:ct}=nt,ut=it.current,{onPointerInTransitChange:ht}=rt,dt=reactExports.useCallback(()=>{st(null),ht(!1)},[ht]),pt=reactExports.useCallback((mt,gt)=>{const yt=mt.currentTarget,bt={x:mt.clientX,y:mt.clientY},vt=$a093c7e1ec25a057$var$getExitSideFromRect(bt,yt.getBoundingClientRect()),xt=$a093c7e1ec25a057$var$getPaddedExitPoints(bt,vt),kt=$a093c7e1ec25a057$var$getPointsFromRect(gt.getBoundingClientRect()),St=$a093c7e1ec25a057$var$getHull([...xt,...kt]);st(St),ht(!0)},[ht]);return reactExports.useEffect(()=>()=>dt(),[dt]),reactExports.useEffect(()=>{if(lt&&ut){const mt=yt=>pt(yt,ut),gt=yt=>pt(yt,lt);return lt.addEventListener("pointerleave",mt),ut.addEventListener("pointerleave",gt),()=>{lt.removeEventListener("pointerleave",mt),ut.removeEventListener("pointerleave",gt)}}},[lt,ut,pt,dt]),reactExports.useEffect(()=>{if(at){const mt=gt=>{const yt=gt.target,bt={x:gt.clientX,y:gt.clientY},vt=(lt==null?void 0:lt.contains(yt))||(ut==null?void 0:ut.contains(yt)),xt=!$a093c7e1ec25a057$var$isPointInPolygon(bt,at);vt?dt():xt&&(dt(),ct())};return document.addEventListener("pointermove",mt),()=>document.removeEventListener("pointermove",mt)}},[lt,ut,at,ct,dt]),reactExports.createElement($a093c7e1ec25a057$var$TooltipContentImpl,_extends$u({},tt,{ref:ot}))}),[$a093c7e1ec25a057$var$VisuallyHiddenContentContextProvider,$a093c7e1ec25a057$var$useVisuallyHiddenContentContext]=$a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$TOOLTIP_NAME,{isInside:!1}),$a093c7e1ec25a057$var$TooltipContentImpl=reactExports.forwardRef((tt,et)=>{const{__scopeTooltip:nt,children:rt,"aria-label":it,onEscapeKeyDown:ot,onPointerDownOutside:at,...st}=tt,lt=$a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME,nt),ct=$a093c7e1ec25a057$var$usePopperScope(nt),{onClose:ut}=lt;return reactExports.useEffect(()=>(document.addEventListener($a093c7e1ec25a057$var$TOOLTIP_OPEN,ut),()=>document.removeEventListener($a093c7e1ec25a057$var$TOOLTIP_OPEN,ut)),[ut]),reactExports.useEffect(()=>{if(lt.trigger){const ht=dt=>{const pt=dt.target;pt!=null&&pt.contains(lt.trigger)&&ut()};return window.addEventListener("scroll",ht,{capture:!0}),()=>window.removeEventListener("scroll",ht,{capture:!0})}},[lt.trigger,ut]),reactExports.createElement($5cb92bef7577960e$export$177fb62ff3ec1f22,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:ot,onPointerDownOutside:at,onFocusOutside:ht=>ht.preventDefault(),onDismiss:ut},reactExports.createElement($cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2,_extends$u({"data-state":lt.stateAttribute},ct,st,{ref:et,style:{...st.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),reactExports.createElement($5e63c961fc1ce211$export$d9f1ccf0bdb05d45,null,rt),reactExports.createElement($a093c7e1ec25a057$var$VisuallyHiddenContentContextProvider,{scope:nt,isInside:!0},reactExports.createElement($ea1ef594cf570d83$export$be92b6f5f03c0fe9,{id:lt.contentId,role:"tooltip"},it||rt))))}),$a093c7e1ec25a057$var$ARROW_NAME="TooltipArrow",$a093c7e1ec25a057$export$c27ee0ad710f7559=reactExports.forwardRef((tt,et)=>{const{__scopeTooltip:nt,...rt}=tt,it=$a093c7e1ec25a057$var$usePopperScope(nt);return $a093c7e1ec25a057$var$useVisuallyHiddenContentContext($a093c7e1ec25a057$var$ARROW_NAME,nt).isInside?null:reactExports.createElement($cf1ac5d9fe0e8206$export$21b07c8f274aebd5,_extends$u({},it,rt,{ref:et}))});function $a093c7e1ec25a057$var$getExitSideFromRect(tt,et){const nt=Math.abs(et.top-tt.y),rt=Math.abs(et.bottom-tt.y),it=Math.abs(et.right-tt.x),ot=Math.abs(et.left-tt.x);switch(Math.min(nt,rt,it,ot)){case ot:return"left";case it:return"right";case nt:return"top";case rt:return"bottom";default:throw new Error("unreachable")}}function $a093c7e1ec25a057$var$getPaddedExitPoints(tt,et,nt=5){const rt=[];switch(et){case"top":rt.push({x:tt.x-nt,y:tt.y+nt},{x:tt.x+nt,y:tt.y+nt});break;case"bottom":rt.push({x:tt.x-nt,y:tt.y-nt},{x:tt.x+nt,y:tt.y-nt});break;case"left":rt.push({x:tt.x+nt,y:tt.y-nt},{x:tt.x+nt,y:tt.y+nt});break;case"right":rt.push({x:tt.x-nt,y:tt.y-nt},{x:tt.x-nt,y:tt.y+nt});break}return rt}function $a093c7e1ec25a057$var$getPointsFromRect(tt){const{top:et,right:nt,bottom:rt,left:it}=tt;return[{x:it,y:et},{x:nt,y:et},{x:nt,y:rt},{x:it,y:rt}]}function $a093c7e1ec25a057$var$isPointInPolygon(tt,et){const{x:nt,y:rt}=tt;let it=!1;for(let ot=0,at=et.length-1;otrt!=ut>rt&&nt<(ct-st)*(rt-lt)/(ut-lt)+st&&(it=!it)}return it}function $a093c7e1ec25a057$var$getHull(tt){const et=tt.slice();return et.sort((nt,rt)=>nt.xrt.x?1:nt.yrt.y?1:0),$a093c7e1ec25a057$var$getHullPresorted(et)}function $a093c7e1ec25a057$var$getHullPresorted(tt){if(tt.length<=1)return tt.slice();const et=[];for(let rt=0;rt=2;){const ot=et[et.length-1],at=et[et.length-2];if((ot.x-at.x)*(it.y-at.y)>=(ot.y-at.y)*(it.x-at.x))et.pop();else break}et.push(it)}et.pop();const nt=[];for(let rt=tt.length-1;rt>=0;rt--){const it=tt[rt];for(;nt.length>=2;){const ot=nt[nt.length-1],at=nt[nt.length-2];if((ot.x-at.x)*(it.y-at.y)>=(ot.y-at.y)*(it.x-at.x))nt.pop();else break}nt.push(it)}return nt.pop(),et.length===1&&nt.length===1&&et[0].x===nt[0].x&&et[0].y===nt[0].y?et:et.concat(nt)}const $a093c7e1ec25a057$export$be92b6f5f03c0fe9=$a093c7e1ec25a057$export$28c660c63b792dea,$a093c7e1ec25a057$export$41fb9f06171c75f4=$a093c7e1ec25a057$export$8c610744efcf8a1d,$a093c7e1ec25a057$export$7c6e2c02157bb7d2=$a093c7e1ec25a057$export$e9003e2be37ec060,$a093c7e1ec25a057$export$21b07c8f274aebd5=$a093c7e1ec25a057$export$c27ee0ad710f7559;function _objectWithoutPropertiesLoose$o(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function _objectWithoutProperties$l(tt,et){if(tt==null)return{};var nt=_objectWithoutPropertiesLoose$o(tt,et),rt,it;if(Object.getOwnPropertySymbols){var ot=Object.getOwnPropertySymbols(tt);for(it=0;it=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}let LevaErrors;(function(tt){tt[tt.UNSUPPORTED_INPUT=0]="UNSUPPORTED_INPUT",tt[tt.NO_COMPONENT_FOR_TYPE=1]="NO_COMPONENT_FOR_TYPE",tt[tt.UNKNOWN_INPUT=2]="UNKNOWN_INPUT",tt[tt.DUPLICATE_KEYS=3]="DUPLICATE_KEYS",tt[tt.ALREADY_REGISTERED_TYPE=4]="ALREADY_REGISTERED_TYPE",tt[tt.CLIPBOARD_ERROR=5]="CLIPBOARD_ERROR",tt[tt.THEME_ERROR=6]="THEME_ERROR",tt[tt.PATH_DOESNT_EXIST=7]="PATH_DOESNT_EXIST",tt[tt.INPUT_TYPE_OVERRIDE=8]="INPUT_TYPE_OVERRIDE",tt[tt.EMPTY_KEY=9]="EMPTY_KEY"})(LevaErrors||(LevaErrors={}));const ErrorList={[LevaErrors.UNSUPPORTED_INPUT]:(tt,et)=>[`An input with type \`${tt}\` input was found at path \`${et}\` but it's not supported yet.`],[LevaErrors.NO_COMPONENT_FOR_TYPE]:(tt,et)=>[`Type \`${tt}\` found at path \`${et}\` can't be displayed in panel because no component supports it yet.`],[LevaErrors.UNKNOWN_INPUT]:(tt,et)=>[`input at path \`${tt}\` is not recognized.`,et],[LevaErrors.DUPLICATE_KEYS]:(tt,et,nt)=>[`Key \`${tt}\` of path \`${et}\` already exists at path \`${nt}\`. Even nested keys need to be unique. Rename one of the keys.`],[LevaErrors.ALREADY_REGISTERED_TYPE]:tt=>[`Type ${tt} has already been registered. You can't register a component with the same type.`],[LevaErrors.CLIPBOARD_ERROR]:tt=>["Error copying the value",tt],[LevaErrors.THEME_ERROR]:(tt,et)=>[`Error accessing the theme \`${tt}.${et}\` value.`],[LevaErrors.PATH_DOESNT_EXIST]:tt=>[`Error getting the value at path \`${tt}\`. There is probably an error in your \`render\` function.`],[LevaErrors.PATH_DOESNT_EXIST]:tt=>[`Error accessing the value at path \`${tt}\``],[LevaErrors.INPUT_TYPE_OVERRIDE]:(tt,et,nt)=>[`Input at path \`${tt}\` already exists with type: \`${et}\`. Its type cannot be overridden with type \`${nt}\`.`],[LevaErrors.EMPTY_KEY]:()=>["Keys can not be empty, if you want to hide a label use whitespace."]};function _log(tt,et,...nt){const[rt,...it]=ErrorList[et](...nt);console[tt]("LEVA: "+rt,...it)}const warn$3=_log.bind(null,"warn"),log$2=_log.bind(null,"log"),_excluded$a$1=["value"],_excluded2$4$1=["schema"],_excluded3$1$1=["value"],Schemas=[],Plugins={};function getValueType(tt){let{value:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$a$1);for(let rt of Schemas){const it=rt(et,nt);if(it)return it}}function register(tt,et){let{schema:nt}=et,rt=_objectWithoutProperties$l(et,_excluded2$4$1);if(tt in Plugins){warn$3(LevaErrors.ALREADY_REGISTERED_TYPE,tt);return}Schemas.push((it,ot)=>nt(it,ot)&&tt),Plugins[tt]=rt}function createInternalPlugin(tt){return tt}function normalize$3$1(tt,et,nt,rt){const{normalize:it}=Plugins[tt];if(it)return it(et,nt,rt);if(typeof et!="object"||!("value"in et))return{value:et};const{value:ot}=et,at=_objectWithoutProperties$l(et,_excluded3$1$1);return{value:ot,settings:at}}function sanitize$4(tt,et,nt,rt,it,ot){const{sanitize:at}=Plugins[tt];return at?at(et,nt,rt,it,ot):et}function format$2$1(tt,et,nt){const{format:rt}=Plugins[tt];return rt?rt(et,nt):et}function _defineProperty$G(tt,et,nt){return et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function ownKeys$E(tt,et){var nt=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);et&&(rt=rt.filter(function(it){return Object.getOwnPropertyDescriptor(tt,it).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread2$1(tt){for(var et=1;ettt>nt?nt:tt{if(tt===""||typeof tt=="number")return tt;try{const et=evaluate(tt);if(!isNaN(et))return et}catch{}return parseFloat(tt)},log10=Math.log(10);function getStep(tt){let et=Math.abs(+String(tt).replace(".",""));if(et===0)return .01;for(;et!==0&&et%10===0;)et/=10;const nt=Math.floor(Math.log(et)/log10)+1,rt=Math.floor(Math.log10(Math.abs(tt))),it=Math.pow(10,rt-nt);return Math.max(it,.001)}const range$8=(tt,et,nt)=>nt===et?0:(clamp$8(tt,et,nt)-et)/(nt-et),invertedRange=(tt,et,nt)=>tt*(nt-et)+et,getUid=()=>"_"+Math.random().toString(36).substr(2,9),parens=/\(([0-9+\-*/^ .]+)\)/,exp$2=/(\d+(?:\.\d+)?) ?\^ ?(\d+(?:\.\d+)?)/,mul=/(\d+(?:\.\d+)?) ?\* ?(\d+(?:\.\d+)?)/,div=/(\d+(?:\.\d+)?) ?\/ ?(\d+(?:\.\d+)?)/,add$5=/(\d+(?:\.\d+)?) ?\+ ?(\d+(?:\.\d+)?)/,sub=/(\d+(?:\.\d+)?) ?- ?(\d+(?:\.\d+)?)/;function evaluate(tt){if(isNaN(Number(tt)))if(parens.test(tt)){const et=tt.replace(parens,(nt,rt)=>String(evaluate(rt)));return evaluate(et)}else if(exp$2.test(tt)){const et=tt.replace(exp$2,(nt,rt,it)=>String(Math.pow(Number(rt),Number(it))));return evaluate(et)}else if(mul.test(tt)){const et=tt.replace(mul,(nt,rt,it)=>String(Number(rt)*Number(it)));return evaluate(et)}else if(div.test(tt)){const et=tt.replace(div,(nt,rt,it)=>{if(it!=0)return String(Number(rt)/Number(it));throw new Error("Division by zero")});return evaluate(et)}else if(add$5.test(tt)){const et=tt.replace(add$5,(nt,rt,it)=>String(Number(rt)+Number(it)));return evaluate(et)}else if(sub.test(tt)){const et=tt.replace(sub,(nt,rt,it)=>String(Number(rt)-Number(it)));return evaluate(et)}else return Number(tt);return Number(tt)}function pick$1(tt,et){return et.reduce((nt,rt)=>(tt&&tt.hasOwnProperty(rt)&&(nt[rt]=tt[rt]),nt),{})}function omit$1(tt,et){const nt=_objectSpread2$1({},tt);return et.forEach(rt=>rt in tt&&delete nt[rt]),nt}function mapArrayToKeys(tt,et){return tt.reduce((nt,rt,it)=>Object.assign(nt,{[et[it]]:rt}),{})}function isObject$o(tt){return Object.prototype.toString.call(tt)==="[object Object]"}const isEmptyObject$1=tt=>isObject$o(tt)&&Object.keys(tt).length===0;let SpecialInputs;(function(tt){tt.BUTTON="BUTTON",tt.BUTTON_GROUP="BUTTON_GROUP",tt.MONITOR="MONITOR",tt.FOLDER="FOLDER"})(SpecialInputs||(SpecialInputs={}));let LevaInputs;(function(tt){tt.SELECT="SELECT",tt.IMAGE="IMAGE",tt.NUMBER="NUMBER",tt.COLOR="COLOR",tt.STRING="STRING",tt.BOOLEAN="BOOLEAN",tt.INTERVAL="INTERVAL",tt.VECTOR3D="VECTOR3D",tt.VECTOR2D="VECTOR2D"})(LevaInputs||(LevaInputs={}));const _excluded$9$1=["type","__customInput"],_excluded2$3$1=["render","label","optional","order","disabled","hint","onChange","onEditStart","onEditEnd","transient"],_excluded3$6=["type"];function parseOptions(tt,et,nt={},rt){var it,ot;if(typeof tt!="object"||Array.isArray(tt))return{type:rt,input:tt,options:_objectSpread2$1({key:et,label:et,optional:!1,disabled:!1,order:0},nt)};if("__customInput"in tt){const{type:St,__customInput:Tt}=tt,At=_objectWithoutProperties$l(tt,_excluded$9$1);return parseOptions(Tt,et,At,St)}const{render:at,label:st,optional:lt,order:ct=0,disabled:ut,hint:ht,onChange:dt,onEditStart:pt,onEditEnd:mt,transient:gt}=tt,yt=_objectWithoutProperties$l(tt,_excluded2$3$1),bt=_objectSpread2$1({render:at,key:et,label:st??et,hint:ht,transient:gt??!!dt,onEditStart:pt,onEditEnd:mt,disabled:ut,optional:lt,order:ct},nt);let{type:vt}=yt,xt=_objectWithoutProperties$l(yt,_excluded3$6);if(vt=rt??vt,vt in SpecialInputs)return{type:vt,input:xt,options:bt};let kt;return rt&&isObject$o(xt)&&"value"in xt?kt=xt.value:kt=isEmptyObject$1(xt)?void 0:xt,{type:vt,input:kt,options:_objectSpread2$1(_objectSpread2$1({},bt),{},{onChange:dt,optional:(it=bt.optional)!==null&&it!==void 0?it:!1,disabled:(ot=bt.disabled)!==null&&ot!==void 0?ot:!1})}}function normalizeInput(tt,et,nt,rt){const it=parseOptions(tt,et),{type:ot,input:at,options:st}=it;if(ot)return ot in SpecialInputs?it:{type:ot,input:normalize$3$1(ot,at,nt,rt),options:st};let lt=getValueType(at);return lt?{type:lt,input:normalize$3$1(lt,at,nt,rt),options:st}:(lt=getValueType({value:at}),lt?{type:lt,input:normalize$3$1(lt,{value:at},nt,rt),options:st}:!1)}function updateInput(tt,et,nt,rt,it){const{value:ot,type:at,settings:st}=tt;tt.value=sanitizeValue({type:at,value:ot,settings:st},et,nt,rt),tt.fromPanel=it}const ValueError=function(et,nt,rt){this.type="LEVA_ERROR",this.message="LEVA: "+et,this.previousValue=nt,this.error=rt};function sanitizeValue({type:tt,value:et,settings:nt},rt,it,ot){const at=tt!=="SELECT"&&typeof rt=="function"?rt(et):rt;let st;try{st=sanitize$4(tt,at,nt,et,it,ot)}catch(lt){throw new ValueError(`The value \`${rt}\` did not result in a correct value.`,et,lt)}return dequal(st,et)?et:st}const debounce$6=(tt,et,nt=!1)=>{let rt=0;return function(){const it=arguments,ot=nt&&!rt,at=()=>tt.apply(this,it);window.clearTimeout(rt),rt=window.setTimeout(at,et),ot&&at()}},multiplyStep=tt=>tt.shiftKey?5:tt.altKey?1/5:1;function render(tt,et){const nt=console.error;console.error=()=>{},ReactDOM.render(tt,et),console.error=nt}const _excluded$8$1=["value"],_excluded2$2$1=["min","max"],schema$3=tt=>{if(typeof tt=="number")return!0;if(typeof tt=="string"){const et=parseFloat(tt);return isNaN(et)?!1:tt.substring((""+et).length).trim().length<4}return!1},sanitize$3=(tt,{min:et=-1/0,max:nt=1/0,suffix:rt})=>{const it=parseFloat(tt);if(tt===""||isNaN(it))throw Error("Invalid number");const ot=clamp$8(it,et,nt);return rt?ot+rt:ot},format$1$2=(tt,{pad:et=0,suffix:nt})=>{const rt=parseFloat(tt).toFixed(et);return nt?rt+nt:rt},normalize$2$2=tt=>{let{value:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$8$1);const{min:rt=-1/0,max:it=1/0}=nt,ot=_objectWithoutProperties$l(nt,_excluded2$2$1);let at=parseFloat(et);const st=typeof et=="string"?et.substring((""+at).length):void 0;at=clamp$8(at,rt,it);let lt=nt.step;lt||(Number.isFinite(rt)?Number.isFinite(it)?lt=+(Math.abs(it-rt)/100).toPrecision(1):lt=+(Math.abs(at-rt)/100).toPrecision(1):Number.isFinite(it)&&(lt=+(Math.abs(it-at)/100).toPrecision(1)));const ct=lt?getStep(lt)*10:getStep(at);lt=lt||ct/10;const ut=Math.round(clamp$8(Math.log10(1/ct),0,2));return{value:st?at+st:at,settings:_objectSpread2$1({initialValue:at,step:lt,pad:ut,min:rt,max:it,suffix:st},ot)}},sanitizeStep$1=(tt,{step:et,initialValue:nt})=>{const rt=Math.round((tt-nt)/et);return nt+rt*et};var props$3$1=Object.freeze({__proto__:null,schema:schema$3,sanitize:sanitize$3,format:format$1$2,normalize:normalize$2$2,sanitizeStep:sanitizeStep$1});function _extends$t(){return _extends$t=Object.assign?Object.assign.bind():function(tt){for(var et=1;et({colors:{elevation1:"#292d39",elevation2:"#181c20",elevation3:"#373c4b",accent1:"#0066dc",accent2:"#007bff",accent3:"#3c93ff",highlight1:"#535760",highlight2:"#8c92a4",highlight3:"#fefefe",vivid1:"#ffcc00",folderWidgetColor:"$highlight2",folderTextColor:"$highlight3",toolTipBackground:"$highlight3",toolTipText:"$elevation2"},radii:{xs:"2px",sm:"3px",lg:"10px"},space:{xs:"3px",sm:"6px",md:"10px",rowGap:"7px",colGap:"7px"},fonts:{mono:"ui-monospace, SFMono-Regular, Menlo, 'Roboto Mono', monospace",sans:"system-ui, sans-serif"},fontSizes:{root:"11px",toolTip:"$root"},sizes:{rootWidth:"280px",controlWidth:"160px",numberInputMinWidth:"38px",scrubberWidth:"8px",scrubberHeight:"16px",rowHeight:"24px",folderTitleHeight:"20px",checkboxSize:"16px",joystickWidth:"100px",joystickHeight:"100px",colorPickerWidth:"$controlWidth",colorPickerHeight:"100px",imagePreviewWidth:"$controlWidth",imagePreviewHeight:"100px",monitorHeight:"60px",titleBarHeight:"39px"},shadows:{level1:"0 0 9px 0 #00000088",level2:"0 4px 14px #00000033"},borderWidths:{root:"0px",input:"1px",focus:"1px",hover:"1px",active:"1px",folder:"1px"},fontWeights:{label:"normal",folder:"normal",button:"normal"}});function createStateClass(tt,et){const[nt,rt]=tt.split(" "),it={};return nt!=="none"&&(it.boxShadow=`${et.inset?"inset ":""}0 0 0 $borderWidths${[et.key]} $colors${nt!=="default"&&nt||et.borderColor}`),rt&&(it.backgroundColor=rt),it}const utils$r={$inputStyle:()=>tt=>createStateClass(tt,{key:"$input",borderColor:"$highlight1",inset:!0}),$focusStyle:()=>tt=>createStateClass(tt,{key:"$focus",borderColor:"$accent2"}),$hoverStyle:()=>tt=>createStateClass(tt,{key:"$hover",borderColor:"$accent1",inset:!0}),$activeStyle:()=>tt=>createStateClass(tt,{key:"$active",borderColor:"$accent1",inset:!0})},{styled:styled$5,css:css$1,createTheme:createTheme$2,globalCss,keyframes:keyframes$1}=q$7({prefix:"leva",theme:getDefaultTheme(),utils:_objectSpread2$1(_objectSpread2$1({},utils$r),{},{$flex:()=>({display:"flex",alignItems:"center"}),$flexCenter:()=>({display:"flex",alignItems:"center",justifyContent:"center"}),$reset:()=>({outline:"none",fontSize:"inherit",fontWeight:"inherit",color:"inherit",fontFamily:"inherit",border:"none",backgroundColor:"transparent",appearance:"none"}),$draggable:()=>({touchAction:"none",WebkitUserDrag:"none",userSelect:"none"}),$focus:tt=>({"&:focus":utils$r.$focusStyle()(tt)}),$focusWithin:tt=>({"&:focus-within":utils$r.$focusStyle()(tt)}),$hover:tt=>({"&:hover":utils$r.$hoverStyle()(tt)}),$active:tt=>({"&:active":utils$r.$activeStyle()(tt)})})}),globalStyles=globalCss({".leva__panel__dragged":{WebkitUserDrag:"none",userSelect:"none",input:{userSelect:"none"},"*":{cursor:"ew-resize !important"}}});function mergeTheme(tt){const et=getDefaultTheme();if(!tt)return{theme:et,className:""};Object.keys(tt).forEach(rt=>{Object.assign(et[rt],tt[rt])});const nt=createTheme$2(et);return{theme:et,className:nt.className}}function useTh(tt,et){const{theme:nt}=reactExports.useContext(ThemeContext$3);if(!(tt in nt)||!(et in nt[tt]))return warn$3(LevaErrors.THEME_ERROR,tt,et),"";let rt=et;for(;;){let it=nt[tt][rt];if(typeof it=="string"&&it.charAt(0)==="$")rt=it.substr(1);else return it}}const StyledInput$2=styled$5("input",{$reset:"",padding:"0 $sm",width:0,minWidth:0,flex:1,height:"100%",variants:{levaType:{number:{textAlign:"right"}},as:{textarea:{padding:"$sm"}}}}),InnerLabel=styled$5("div",{$draggable:"",height:"100%",$flexCenter:"",position:"relative",padding:"0 $xs",fontSize:"0.8em",opacity:.8,cursor:"default",touchAction:"none",[`& + ${StyledInput$2}`]:{paddingLeft:0}}),InnerNumberLabel=styled$5(InnerLabel,{cursor:"ew-resize",marginRight:"-$xs",textTransform:"uppercase",opacity:.3,"&:hover":{opacity:1},variants:{dragging:{true:{backgroundColor:"$accent2",opacity:1}}}}),InputContainer=styled$5("div",{$flex:"",position:"relative",borderRadius:"$sm",overflow:"hidden",color:"inherit",height:"$rowHeight",backgroundColor:"$elevation3",$inputStyle:"$elevation1",$hover:"",$focusWithin:"",variants:{textArea:{true:{height:"auto"}}}}),_excluded$7$2=["innerLabel","value","onUpdate","onChange","onKeyDown","type","id","inputType","rows"],_excluded2$1$2=["onUpdate"];function ValueInput(tt){let{innerLabel:et,value:nt,onUpdate:rt,onChange:it,onKeyDown:ot,type:at,id:st,inputType:lt="text",rows:ct=0}=tt,ut=_objectWithoutProperties$l(tt,_excluded$7$2);const{id:ht,emitOnEditStart:dt,emitOnEditEnd:pt,disabled:mt}=useInputContext(),gt=st||ht,yt=reactExports.useRef(null),bt=ct>0,vt=bt?"textarea":"input",xt=reactExports.useCallback(Tt=>At=>{const Et=At.currentTarget.value;Tt(Et)},[]);React$1.useEffect(()=>{const Tt=yt.current,At=xt(Et=>{rt(Et),pt()});return Tt==null||Tt.addEventListener("blur",At),()=>Tt==null?void 0:Tt.removeEventListener("blur",At)},[xt,rt,pt]);const kt=reactExports.useCallback(Tt=>{Tt.key==="Enter"&&xt(rt)(Tt)},[xt,rt]),St=Object.assign({as:vt},bt?{rows:ct}:{},ut);return React$1.createElement(InputContainer,{textArea:bt},et&&typeof et=="string"?React$1.createElement(InnerLabel,null,et):et,React$1.createElement(StyledInput$2,_extends$t({levaType:at,ref:yt,id:gt,type:lt,autoComplete:"off",spellCheck:"false",value:nt,onChange:xt(it),onFocus:()=>dt(),onKeyPress:kt,onKeyDown:ot,disabled:mt},St)))}function NumberInput(tt){let{onUpdate:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded2$1$2);const rt=reactExports.useCallback(ot=>et(parseNumber(ot)),[et]),it=reactExports.useCallback(ot=>{const at=ot.key==="ArrowUp"?1:ot.key==="ArrowDown"?-1:0;if(at){ot.preventDefault();const st=ot.altKey?.1:ot.shiftKey?10:1;et(lt=>parseFloat(lt)+at*st)}},[et]);return React$1.createElement(ValueInput,_extends$t({},nt,{onUpdate:rt,onKeyDown:it,type:"number"}))}const StyledFolder=styled$5("div",{}),StyledWrapper=styled$5("div",{position:"relative",background:"$elevation2",transition:"height 300ms ease",variants:{fill:{true:{},false:{}},flat:{false:{},true:{}},isRoot:{true:{},false:{paddingLeft:"$md","&::after":{content:'""',position:"absolute",left:0,top:0,width:"$borderWidths$folder",height:"100%",backgroundColor:"$folderWidgetColor",opacity:.4,transform:"translateX(-50%)"}}}},compoundVariants:[{isRoot:!0,fill:!1,css:{overflowY:"auto",maxHeight:"calc(100vh - 20px - $$titleBarHeight)"}},{isRoot:!0,flat:!1,css:{borderRadius:"$lg"}}]}),StyledTitle=styled$5("div",{$flex:"",color:"$folderTextColor",userSelect:"none",cursor:"pointer",height:"$folderTitleHeight",fontWeight:"$folder","> svg":{marginLeft:-4,marginRight:4,cursor:"pointer",fill:"$folderWidgetColor",opacity:.6},"&:hover > svg":{fill:"$folderWidgetColor"},[`&:hover + ${StyledWrapper}::after`]:{opacity:.6},[`${StyledFolder}:hover > & + ${StyledWrapper}::after`]:{opacity:.6},[`${StyledFolder}:hover > & > svg`]:{opacity:1}}),StyledContent=styled$5("div",{position:"relative",display:"grid",gridTemplateColumns:"100%",rowGap:"$rowGap",transition:"opacity 250ms ease",variants:{toggled:{true:{opacity:1,transitionDelay:"250ms"},false:{opacity:0,transitionDelay:"0ms",pointerEvents:"none"}},isRoot:{true:{"& > div":{paddingLeft:"$md",paddingRight:"$md"},"& > div:first-of-type":{paddingTop:"$sm"},"& > div:last-of-type":{paddingBottom:"$sm"},[`> ${StyledFolder}:not(:first-of-type)`]:{paddingTop:"$sm",marginTop:"$md",borderTop:"$borderWidths$folder solid $colors$elevation1"}}}}}),StyledRow=styled$5("div",{position:"relative",zIndex:100,display:"grid",rowGap:"$rowGap",gridTemplateRows:"minmax($sizes$rowHeight, max-content)",alignItems:"center",color:"$highlight2",[`${StyledContent} > &`]:{"&:first-of-type":{marginTop:"$rowGap"},"&:last-of-type":{marginBottom:"$rowGap"}},variants:{disabled:{true:{pointerEvents:"none"},false:{"&:hover,&:focus-within":{color:"$highlight3"}}}}}),StyledInputRow=styled$5(StyledRow,{gridTemplateColumns:"auto $sizes$controlWidth",columnGap:"$colGap"}),CopyLabelContainer=styled$5("div",{$flex:"",height:"100%",position:"relative",overflow:"hidden","& > div":{marginLeft:"$colGap",padding:"0 $xs",opacity:.4},"& > div:hover":{opacity:.8},"& > div > svg":{display:"none",cursor:"pointer",width:13,minWidth:13,height:13,backgroundColor:"$elevation2"},"&:hover > div > svg":{display:"block"},variants:{align:{top:{height:"100%",alignItems:"flex-start",paddingTop:"$sm"}}}}),StyledOptionalToggle=styled$5("input",{$reset:"",height:0,width:0,opacity:0,margin:0,"& + label":{position:"relative",$flexCenter:"",height:"100%",userSelect:"none",cursor:"pointer",paddingLeft:2,paddingRight:"$sm",pointerEvents:"auto"},"& + label:after":{content:'""',width:6,height:6,backgroundColor:"$elevation3",borderRadius:"50%",$activeStyle:""},"&:focus + label:after":{$focusStyle:""},"& + label:active:after":{backgroundColor:"$accent1",$focusStyle:""},"&:checked + label:after":{backgroundColor:"$accent1"}}),StyledLabel=styled$5("label",{fontWeight:"$label",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > svg":{display:"block"}}),StyledInputWrapper$1=styled$5("div",{opacity:1,variants:{disabled:{true:{opacity:.6,pointerEvents:"none",[`& ${StyledLabel}`]:{pointerEvents:"auto"}}}}}),Overlay$1=styled$5("div",{position:"fixed",top:0,bottom:0,right:0,left:0,zIndex:1e3,userSelect:"none"}),StyledToolTipContent=styled$5("div",{background:"$toolTipBackground",fontFamily:"$sans",fontSize:"$toolTip",padding:"$xs $sm",color:"$toolTipText",borderRadius:"$xs",boxShadow:"$level2",maxWidth:260}),ToolTipArrow=styled$5($a093c7e1ec25a057$export$21b07c8f274aebd5,{fill:"$toolTipBackground"});function Portal$2({children:tt}){const{className:et}=reactExports.useContext(ThemeContext$3);return React$1.createElement($f1701beae083dbae$export$be92b6f5f03c0fe9,{className:et},tt)}const _excluded$6$2=["align"];function OptionalToggle(){const{id:tt,disable:et,disabled:nt}=useInputContext();return React$1.createElement(React$1.Fragment,null,React$1.createElement(StyledOptionalToggle,{id:tt+"__disable",type:"checkbox",checked:!nt,onChange:()=>et(!nt)}),React$1.createElement("label",{htmlFor:tt+"__disable"}))}function RawLabel(tt){const{id:et,optional:nt,hint:rt}=useInputContext(),it=tt.htmlFor||(et?{htmlFor:et}:null),ot=!rt&&typeof tt.children=="string"?{title:tt.children}:null;return React$1.createElement(React$1.Fragment,null,nt&&React$1.createElement(OptionalToggle,null),rt!==void 0?React$1.createElement($a093c7e1ec25a057$export$be92b6f5f03c0fe9,null,React$1.createElement($a093c7e1ec25a057$export$41fb9f06171c75f4,{asChild:!0},React$1.createElement(StyledLabel,_extends$t({},it,tt))),React$1.createElement($a093c7e1ec25a057$export$7c6e2c02157bb7d2,{side:"top",sideOffset:2},React$1.createElement(StyledToolTipContent,null,rt,React$1.createElement(ToolTipArrow,null)))):React$1.createElement(StyledLabel,_extends$t({},it,ot,tt)))}function Label$4(tt){let{align:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$6$2);const{value:rt,label:it,key:ot,disabled:at}=useInputContext(),{hideCopyButton:st}=usePanelSettingsContext(),lt=!st&&ot!==void 0,[ct,ut]=reactExports.useState(!1),ht=async()=>{try{await navigator.clipboard.writeText(JSON.stringify({[ot]:rt??""})),ut(!0)}catch{warn$3(LevaErrors.CLIPBOARD_ERROR,{[ot]:rt})}};return React$1.createElement(CopyLabelContainer,{align:et,onPointerLeave:()=>ut(!1)},React$1.createElement(RawLabel,nt),lt&&!at&&React$1.createElement("div",{title:`Click to copy ${typeof it=="string"?it:ot} value`},ct?React$1.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},React$1.createElement("path",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),React$1.createElement("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm9.707 5.707a1 1 0 00-1.414-1.414L9 12.586l-1.293-1.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})):React$1.createElement("svg",{onClick:ht,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},React$1.createElement("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),React$1.createElement("path",{d:"M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z"}))))}const _excluded$5$2=["toggled"],Svg$1=styled$5("svg",{fill:"currentColor",transition:"transform 350ms ease, fill 250ms ease"});function Chevron(tt){let{toggled:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$5$2);return React$1.createElement(Svg$1,_extends$t({width:"9",height:"5",viewBox:"0 0 9 5",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${et?0:-90}deg)`}},nt),React$1.createElement("path",{d:"M3.8 4.4c.4.3 1 .3 1.4 0L8 1.7A1 1 0 007.4 0H1.6a1 1 0 00-.7 1.7l3 2.7z"}))}const _excluded$4$2=["input"];function Row(tt){let{input:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$4$2);return et?React$1.createElement(StyledInputRow,nt):React$1.createElement(StyledRow,nt)}function useInputSetters({value:tt,type:et,settings:nt,setValue:rt}){const[it,ot]=reactExports.useState(format$2$1(et,tt,nt)),at=reactExports.useRef(tt),st=reactExports.useRef(nt);st.current=nt;const lt=reactExports.useCallback(ut=>ot(format$2$1(et,ut,st.current)),[et]),ct=reactExports.useCallback(ut=>{try{rt(ut)}catch(ht){const{type:dt,previousValue:pt}=ht;if(dt!=="LEVA_ERROR")throw ht;lt(pt)}},[lt,rt]);return reactExports.useEffect(()=>{dequal(tt,at.current)||lt(tt),at.current=tt},[tt,lt]),{displayValue:it,onChange:ot,onUpdate:ct}}function useDrag$1(tt,et){const{emitOnEditStart:nt,emitOnEditEnd:rt}=useInputContext();return useDrag$2(it=>{it.first&&(document.body.classList.add("leva__panel__dragged"),nt==null||nt());const ot=tt(it);return it.last&&(document.body.classList.remove("leva__panel__dragged"),rt==null||rt()),ot},et)}function useCanvas2d(tt){const et=reactExports.useRef(null),nt=reactExports.useRef(null),rt=reactExports.useRef(!1);return reactExports.useEffect(()=>{const it=debounce$6(()=>{et.current.width=et.current.offsetWidth*window.devicePixelRatio,et.current.height=et.current.offsetHeight*window.devicePixelRatio,tt(et.current,nt.current)},250);return window.addEventListener("resize",it),rt.current||(it(),rt.current=!0),()=>window.removeEventListener("resize",it)},[tt]),reactExports.useEffect(()=>{nt.current=et.current.getContext("2d")},[]),[et,nt]}function useTransform(){const tt=reactExports.useRef(null),et=reactExports.useRef({x:0,y:0}),nt=reactExports.useCallback(rt=>{Object.assign(et.current,rt),tt.current&&(tt.current.style.transform=`translate3d(${et.current.x}px, ${et.current.y}px, 0)`)},[]);return[tt,nt]}const _excluded$3$2=["__refCount"],getInputAtPath=(tt,et)=>{if(!tt[et])return null;const nt=tt[et];return _objectWithoutProperties$l(nt,_excluded$3$2)};function useInput(tt){const et=useStoreContext(),[nt,rt]=reactExports.useState(getInputAtPath(et.getData(),tt)),it=reactExports.useCallback(ct=>et.setValueAtPath(tt,ct,!0),[tt,et]),ot=reactExports.useCallback(ct=>et.setSettingsAtPath(tt,ct),[tt,et]),at=reactExports.useCallback(ct=>et.disableInputAtPath(tt,ct),[tt,et]),st=reactExports.useCallback(()=>et.emitOnEditStart(tt),[tt,et]),lt=reactExports.useCallback(()=>et.emitOnEditEnd(tt),[tt,et]);return reactExports.useEffect(()=>{rt(getInputAtPath(et.getData(),tt));const ct=et.useStore.subscribe(ut=>getInputAtPath(ut.data,tt),rt,{equalityFn:shallow$2});return()=>ct()},[et,tt]),[nt,{set:it,setSettings:ot,disable:at,storeId:et.storeId,emitOnEditStart:st,emitOnEditEnd:lt}]}const RangeGrid=styled$5("div",{variants:{hasRange:{true:{position:"relative",display:"grid",gridTemplateColumns:"auto $sizes$numberInputMinWidth",columnGap:"$colGap",alignItems:"center"}}}}),Range=styled$5("div",{position:"relative",width:"100%",height:2,borderRadius:"$xs",backgroundColor:"$elevation1"}),Scrubber=styled$5("div",{position:"absolute",width:"$scrubberWidth",height:"$scrubberHeight",borderRadius:"$xs",boxShadow:"0 0 0 2px $colors$elevation2",backgroundColor:"$accent2",cursor:"pointer",$active:"none $accent1",$hover:"none $accent3",variants:{position:{left:{borderTopRightRadius:0,borderBottomRightRadius:0,transform:"translateX(calc(-0.5 * ($sizes$scrubberWidth + 4px)))"},right:{borderTopLeftRadius:0,borderBottomLeftRadius:0,transform:"translateX(calc(0.5 * ($sizes$scrubberWidth + 4px)))"}}}}),RangeWrapper=styled$5("div",{position:"relative",$flex:"",height:"100%",cursor:"pointer",touchAction:"none"}),Indicator=styled$5("div",{position:"absolute",height:"100%",backgroundColor:"$accent2"});function RangeSlider({value:tt,min:et,max:nt,onDrag:rt,step:it,initialValue:ot}){const at=reactExports.useRef(null),st=reactExports.useRef(null),lt=reactExports.useRef(0),ct=useTh("sizes","scrubberWidth"),ut=useDrag$1(({event:dt,first:pt,xy:[mt],movement:[gt],memo:yt})=>{if(pt){const{width:vt,left:xt}=at.current.getBoundingClientRect();lt.current=vt-parseFloat(ct),yt=(dt==null?void 0:dt.target)===st.current?tt:invertedRange((mt-xt)/vt,et,nt)}const bt=yt+invertedRange(gt/lt.current,0,nt-et);return rt(sanitizeStep$1(bt,{step:it,initialValue:ot})),yt}),ht=range$8(tt,et,nt);return React$1.createElement(RangeWrapper,_extends$t({ref:at},ut()),React$1.createElement(Range,null,React$1.createElement(Indicator,{style:{left:0,right:`${(1-ht)*100}%`}})),React$1.createElement(Scrubber,{ref:st,style:{left:`calc(${ht} * (100% - ${ct}))`}}))}const DraggableLabel=React$1.memo(({label:tt,onUpdate:et,step:nt,innerLabelTrim:rt})=>{const[it,ot]=reactExports.useState(!1),at=useDrag$1(({active:st,delta:[lt],event:ct,memo:ut=0})=>(ot(st),ut+=lt/2,Math.abs(ut)>=1&&(et(ht=>parseFloat(ht)+Math.floor(ut)*nt*multiplyStep(ct)),ut=0),ut));return React$1.createElement(InnerNumberLabel,_extends$t({dragging:it,title:tt.length>1?tt:""},at()),tt.slice(0,rt))});function Number$1({label:tt,id:et,displayValue:nt,onUpdate:rt,onChange:it,settings:ot,innerLabelTrim:at=1}){const st=at>0&&React$1.createElement(DraggableLabel,{label:tt,step:ot.step,onUpdate:rt,innerLabelTrim:at});return React$1.createElement(NumberInput,{id:et,value:String(nt),onUpdate:rt,onChange:it,innerLabel:st})}function NumberComponent(){const tt=useInputContext(),{label:et,value:nt,onUpdate:rt,settings:it,id:ot}=tt,{min:at,max:st}=it,lt=st!==1/0&&at!==-1/0;return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,et),React$1.createElement(RangeGrid,{hasRange:lt},lt&&React$1.createElement(RangeSlider,_extends$t({value:parseFloat(nt),onDrag:rt},it)),React$1.createElement(Number$1,_extends$t({},tt,{id:ot,label:"value",innerLabelTrim:lt?0:1}))))}const{sanitizeStep}=props$3$1,rest=_objectWithoutProperties$l(props$3$1,["sanitizeStep"]);var number$6=_objectSpread2$1({component:NumberComponent},rest);const schema$2$1=(tt,et)=>v8n().schema({options:v8n().passesAnyOf(v8n().object(),v8n().array())}).test(et),sanitize$2$1=(tt,{values:et})=>{if(et.indexOf(tt)<0)throw Error("Selected value doesn't match Select options");return tt},format$3=(tt,{values:et})=>et.indexOf(tt),normalize$1$2=tt=>{let{value:et,options:nt}=tt,rt,it;return Array.isArray(nt)?(it=nt,rt=nt.map(ot=>String(ot))):(it=Object.values(nt),rt=Object.keys(nt)),"value"in tt?it.includes(et)||(rt.unshift(String(et)),it.unshift(et)):et=it[0],Object.values(nt).includes(et)||(nt[String(et)]=et),{value:et,settings:{keys:rt,values:it}}};var props$2$1=Object.freeze({__proto__:null,schema:schema$2$1,sanitize:sanitize$2$1,format:format$3,normalize:normalize$1$2});const SelectContainer=styled$5("div",{$flexCenter:"",position:"relative","> svg":{pointerEvents:"none",position:"absolute",right:"$md"}}),NativeSelect=styled$5("select",{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0}),PresentationalSelect=styled$5("div",{display:"flex",alignItems:"center",width:"100%",height:"$rowHeight",backgroundColor:"$elevation3",borderRadius:"$sm",padding:"0 $sm",cursor:"pointer",[`${NativeSelect}:focus + &`]:{$focusStyle:""},[`${NativeSelect}:hover + &`]:{$hoverStyle:""}});function Select$5({displayValue:tt,value:et,onUpdate:nt,id:rt,settings:it,disabled:ot}){const{keys:at,values:st}=it,lt=reactExports.useRef();return et===st[tt]&&(lt.current=at[tt]),React$1.createElement(SelectContainer,null,React$1.createElement(NativeSelect,{id:rt,value:tt,onChange:ct=>nt(st[Number(ct.currentTarget.value)]),disabled:ot},at.map((ct,ut)=>React$1.createElement("option",{key:ct,value:ut},ct))),React$1.createElement(PresentationalSelect,null,lt.current),React$1.createElement(Chevron,{toggled:!0}))}function SelectComponent(){const{label:tt,value:et,displayValue:nt,onUpdate:rt,id:it,disabled:ot,settings:at}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(Select$5,{id:it,value:et,displayValue:nt,onUpdate:rt,settings:at,disabled:ot}))}var select$1=_objectSpread2$1({component:SelectComponent},props$2$1);const schema$1$1=tt=>v8n().string().test(tt),sanitize$1$1=tt=>{if(typeof tt!="string")throw Error("Invalid string");return tt},normalize$5=({value:tt,editable:et=!0,rows:nt=!1})=>({value:tt,settings:{editable:et,rows:typeof nt=="number"?nt:nt?5:0}});var props$1$1=Object.freeze({__proto__:null,schema:schema$1$1,sanitize:sanitize$1$1,normalize:normalize$5});const _excluded$2$2=["displayValue","onUpdate","onChange","editable"],NonEditableString=styled$5("div",{whiteSpace:"pre-wrap"});function String$1(tt){let{displayValue:et,onUpdate:nt,onChange:rt,editable:it=!0}=tt,ot=_objectWithoutProperties$l(tt,_excluded$2$2);return it?React$1.createElement(ValueInput,_extends$t({value:et,onUpdate:nt,onChange:rt},ot)):React$1.createElement(NonEditableString,null,et)}function StringComponent(){const{label:tt,settings:et,displayValue:nt,onUpdate:rt,onChange:it}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(String$1,_extends$t({displayValue:nt,onUpdate:rt,onChange:it},et)))}var string$1=_objectSpread2$1({component:StringComponent},props$1$1);const schema$4=tt=>v8n().boolean().test(tt),sanitize$5=tt=>{if(typeof tt!="boolean")throw Error("Invalid boolean");return tt};var props$4=Object.freeze({__proto__:null,schema:schema$4,sanitize:sanitize$5});const StyledInputWrapper=styled$5("div",{position:"relative",$flex:"",height:"$rowHeight",input:{$reset:"",height:0,width:0,opacity:0,margin:0},label:{position:"relative",$flexCenter:"",userSelect:"none",cursor:"pointer",height:"$checkboxSize",width:"$checkboxSize",backgroundColor:"$elevation3",borderRadius:"$sm",$hover:""},"input:focus + label":{$focusStyle:""},"input:focus:checked + label, input:checked + label:hover":{$hoverStyle:"$accent3"},"input + label:active":{backgroundColor:"$accent1"},"input:checked + label:active":{backgroundColor:"$accent1"},"label > svg":{display:"none",width:"90%",height:"90%",stroke:"$highlight3"},"input:checked + label":{backgroundColor:"$accent2"},"input:checked + label > svg":{display:"block"}});function Boolean$1({value:tt,onUpdate:et,id:nt,disabled:rt}){return React$1.createElement(StyledInputWrapper,null,React$1.createElement("input",{id:nt,type:"checkbox",checked:tt,onChange:it=>et(it.currentTarget.checked),disabled:rt}),React$1.createElement("label",{htmlFor:nt},React$1.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},React$1.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}))))}function BooleanComponent(){const{label:tt,value:et,onUpdate:nt,disabled:rt,id:it}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(Boolean$1,{value:et,onUpdate:nt,id:it,disabled:rt}))}var boolean=_objectSpread2$1({component:BooleanComponent},props$4);const _excluded$1$4=["locked"];function Coordinate({value:tt,id:et,valueKey:nt,settings:rt,onUpdate:it,innerLabelTrim:ot}){const at=reactExports.useRef(tt[nt]);at.current=tt[nt];const st=reactExports.useCallback(ct=>it({[nt]:sanitizeValue({type:"NUMBER",value:at.current,settings:rt},ct)}),[it,rt,nt]),lt=useInputSetters({type:"NUMBER",value:tt[nt],settings:rt,setValue:st});return React$1.createElement(Number$1,{id:et,label:nt,value:tt[nt],displayValue:lt.displayValue,onUpdate:lt.onUpdate,onChange:lt.onChange,settings:rt,innerLabelTrim:ot})}const Container$2=styled$5("div",{display:"grid",columnGap:"$colGap",gridAutoFlow:"column dense",alignItems:"center",variants:{withLock:{true:{gridTemplateColumns:"10px auto","> svg":{cursor:"pointer"}}}}});function Lock(tt){let{locked:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$1$4);return React$1.createElement("svg",_extends$t({width:"10",height:"10",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},nt),et?React$1.createElement("path",{d:"M5 4.63601C5 3.76031 5.24219 3.1054 5.64323 2.67357C6.03934 2.24705 6.64582 1.9783 7.5014 1.9783C8.35745 1.9783 8.96306 2.24652 9.35823 2.67208C9.75838 3.10299 10 3.75708 10 4.63325V5.99999H5V4.63601ZM4 5.99999V4.63601C4 3.58148 4.29339 2.65754 4.91049 1.99307C5.53252 1.32329 6.42675 0.978302 7.5014 0.978302C8.57583 0.978302 9.46952 1.32233 10.091 1.99162C10.7076 2.65557 11 3.57896 11 4.63325V5.99999H12C12.5523 5.99999 13 6.44771 13 6.99999V13C13 13.5523 12.5523 14 12 14H3C2.44772 14 2 13.5523 2 13V6.99999C2 6.44771 2.44772 5.99999 3 5.99999H4ZM3 6.99999H12V13H3V6.99999Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}):React$1.createElement("path",{d:"M9 3.63601C9 2.76044 9.24207 2.11211 9.64154 1.68623C10.0366 1.26502 10.6432 1 11.5014 1C12.4485 1 13.0839 1.30552 13.4722 1.80636C13.8031 2.23312 14 2.84313 14 3.63325H15C15 2.68242 14.7626 1.83856 14.2625 1.19361C13.6389 0.38943 12.6743 0 11.5014 0C10.4294 0 9.53523 0.337871 8.91218 1.0021C8.29351 1.66167 8 2.58135 8 3.63601V6H1C0.447715 6 0 6.44772 0 7V13C0 13.5523 0.447715 14 1 14H10C10.5523 14 11 13.5523 11 13V7C11 6.44772 10.5523 6 10 6H9V3.63601ZM1 7H10V13H1V7Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function Vector({value:tt,onUpdate:et,settings:nt,innerLabelTrim:rt}){const{id:it,setSettings:ot}=useInputContext(),{lock:at,locked:st}=nt;return React$1.createElement(Container$2,{withLock:at},at&&React$1.createElement(Lock,{locked:st,onClick:()=>ot({locked:!st})}),Object.keys(tt).map((lt,ct)=>React$1.createElement(Coordinate,{id:ct===0?it:`${it}.${lt}`,key:lt,valueKey:lt,value:tt,settings:nt[lt],onUpdate:et,innerLabelTrim:rt})))}const normalizeKeyedNumberSettings=(tt,et)=>{const nt={};let rt=0,it=1/0;Object.entries(tt).forEach(([ot,at])=>{nt[ot]=normalize$2$2(_objectSpread2$1({value:at},et[ot])).settings,rt=Math.max(rt,nt[ot].step),it=Math.min(it,nt[ot].pad)});for(let ot in nt){const{step:at,min:st,max:lt}=et[ot]||{};!isFinite(at)&&(!isFinite(st)||!isFinite(lt))&&(nt[ot].step=rt,nt[ot].pad=it)}return nt},_excluded$1L=["lock"],_excluded2$j=["value"];function getVectorSchema(tt){const et=v8n().array().length(tt).every.number(),nt=rt=>{if(!rt||typeof rt!="object")return!1;const it=Object.values(rt);return it.length===tt&&it.every(ot=>isFinite(ot))};return rt=>et.test(rt)||nt(rt)}function getVectorType(tt){return Array.isArray(tt)?"array":"object"}function convert$6(tt,et,nt){return getVectorType(tt)===et?tt:et==="array"?Object.values(tt):mapArrayToKeys(tt,nt)}const sanitizeVector=(tt,et,nt)=>{const rt=convert$6(tt,"object",et.keys);for(let at in rt)rt[at]=sanitize$3(rt[at],et[at]);const it=Object.keys(rt);let ot={};if(it.length===et.keys.length)ot=rt;else{const at=convert$6(nt,"object",et.keys);if(it.length===1&&et.locked){const st=it[0],lt=rt[st],ct=at[st],ut=ct!==0?lt/ct:1;for(let ht in at)ht===st?ot[st]=lt:ot[ht]=at[ht]*ut}else ot=_objectSpread2$1(_objectSpread2$1({},at),rt)}return convert$6(ot,et.format,et.keys)},formatVector=(tt,et)=>convert$6(tt,"object",et.keys),isNumberSettings=tt=>!!tt&&("step"in tt||"min"in tt||"max"in tt);function normalizeVector(tt,et,nt=[]){const{lock:rt=!1}=et,it=_objectWithoutProperties$l(et,_excluded$1L),ot=Array.isArray(tt)?"array":"object",at=ot==="object"?Object.keys(tt):nt,st=convert$6(tt,"object",at),lt=isNumberSettings(it)?at.reduce((ut,ht)=>Object.assign(ut,{[ht]:it}),{}):it,ct=normalizeKeyedNumberSettings(st,lt);return{value:ot==="array"?tt:st,settings:_objectSpread2$1(_objectSpread2$1({},ct),{},{format:ot,keys:at,lock:rt,locked:!1})}}function getVectorPlugin(tt){return{schema:getVectorSchema(tt.length),normalize:et=>{let{value:nt}=et,rt=_objectWithoutProperties$l(et,_excluded2$j);return normalizeVector(nt,rt,tt)},format:(et,nt)=>formatVector(et,nt),sanitize:(et,nt,rt)=>sanitizeVector(et,nt,rt)}}var r$b={grad:.9,turn:360,rad:360/(2*Math.PI)},t$6=function(tt){return typeof tt=="string"?tt.length>0:typeof tt=="number"},n$6=function(tt,et,nt){return et===void 0&&(et=0),nt===void 0&&(nt=Math.pow(10,et)),Math.round(nt*tt)/nt+0},e$5=function(tt,et,nt){return et===void 0&&(et=0),nt===void 0&&(nt=1),tt>nt?nt:tt>et?tt:et},u$5=function(tt){return(tt=isFinite(tt)?tt%360:0)>0?tt:tt+360},a$3=function(tt){return{r:e$5(tt.r,0,255),g:e$5(tt.g,0,255),b:e$5(tt.b,0,255),a:e$5(tt.a)}},o$1=function(tt){return{r:n$6(tt.r),g:n$6(tt.g),b:n$6(tt.b),a:n$6(tt.a,3)}},i$6=/^#([0-9a-f]{3,8})$/i,s$4=function(tt){var et=tt.toString(16);return et.length<2?"0"+et:et},h$9=function(tt){var et=tt.r,nt=tt.g,rt=tt.b,it=tt.a,ot=Math.max(et,nt,rt),at=ot-Math.min(et,nt,rt),st=at?ot===et?(nt-rt)/at:ot===nt?2+(rt-et)/at:4+(et-nt)/at:0;return{h:60*(st<0?st+6:st),s:ot?at/ot*100:0,v:ot/255*100,a:it}},b$6=function(tt){var et=tt.h,nt=tt.s,rt=tt.v,it=tt.a;et=et/360*6,nt/=100,rt/=100;var ot=Math.floor(et),at=rt*(1-nt),st=rt*(1-(et-ot)*nt),lt=rt*(1-(1-et+ot)*nt),ct=ot%6;return{r:255*[rt,st,at,at,lt,rt][ct],g:255*[lt,rt,rt,st,at,at][ct],b:255*[at,at,lt,rt,rt,st][ct],a:it}},g$8=function(tt){return{h:u$5(tt.h),s:e$5(tt.s,0,100),l:e$5(tt.l,0,100),a:e$5(tt.a)}},d$5=function(tt){return{h:n$6(tt.h),s:n$6(tt.s),l:n$6(tt.l),a:n$6(tt.a,3)}},f$7=function(tt){return b$6((nt=(et=tt).s,{h:et.h,s:(nt*=((rt=et.l)<50?rt:100-rt)/100)>0?2*nt/(rt+nt)*100:0,v:rt+nt,a:et.a}));var et,nt,rt},c$8=function(tt){return{h:(et=h$9(tt)).h,s:(it=(200-(nt=et.s))*(rt=et.v)/100)>0&&it<200?nt*rt/100/(it<=100?it:200-it)*100:0,l:it/2,a:et.a};var et,nt,rt,it},l$5=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p$8=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v$8=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m$8=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y$7={string:[[function(tt){var et=i$6.exec(tt);return et?(tt=et[1]).length<=4?{r:parseInt(tt[0]+tt[0],16),g:parseInt(tt[1]+tt[1],16),b:parseInt(tt[2]+tt[2],16),a:tt.length===4?n$6(parseInt(tt[3]+tt[3],16)/255,2):1}:tt.length===6||tt.length===8?{r:parseInt(tt.substr(0,2),16),g:parseInt(tt.substr(2,2),16),b:parseInt(tt.substr(4,2),16),a:tt.length===8?n$6(parseInt(tt.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(tt){var et=v$8.exec(tt)||m$8.exec(tt);return et?et[2]!==et[4]||et[4]!==et[6]?null:a$3({r:Number(et[1])/(et[2]?100/255:1),g:Number(et[3])/(et[4]?100/255:1),b:Number(et[5])/(et[6]?100/255:1),a:et[7]===void 0?1:Number(et[7])/(et[8]?100:1)}):null},"rgb"],[function(tt){var et=l$5.exec(tt)||p$8.exec(tt);if(!et)return null;var nt,rt,it=g$8({h:(nt=et[1],rt=et[2],rt===void 0&&(rt="deg"),Number(nt)*(r$b[rt]||1)),s:Number(et[3]),l:Number(et[4]),a:et[5]===void 0?1:Number(et[5])/(et[6]?100:1)});return f$7(it)},"hsl"]],object:[[function(tt){var et=tt.r,nt=tt.g,rt=tt.b,it=tt.a,ot=it===void 0?1:it;return t$6(et)&&t$6(nt)&&t$6(rt)?a$3({r:Number(et),g:Number(nt),b:Number(rt),a:Number(ot)}):null},"rgb"],[function(tt){var et=tt.h,nt=tt.s,rt=tt.l,it=tt.a,ot=it===void 0?1:it;if(!t$6(et)||!t$6(nt)||!t$6(rt))return null;var at=g$8({h:Number(et),s:Number(nt),l:Number(rt),a:Number(ot)});return f$7(at)},"hsl"],[function(tt){var et=tt.h,nt=tt.s,rt=tt.v,it=tt.a,ot=it===void 0?1:it;if(!t$6(et)||!t$6(nt)||!t$6(rt))return null;var at=function(st){return{h:u$5(st.h),s:e$5(st.s,0,100),v:e$5(st.v,0,100),a:e$5(st.a)}}({h:Number(et),s:Number(nt),v:Number(rt),a:Number(ot)});return b$6(at)},"hsv"]]},N$1=function(tt,et){for(var nt=0;nt=.5},tt.prototype.toHex=function(){return et=o$1(this.rgba),nt=et.r,rt=et.g,it=et.b,at=(ot=et.a)<1?s$4(n$6(255*ot)):"","#"+s$4(nt)+s$4(rt)+s$4(it)+at;var et,nt,rt,it,ot,at},tt.prototype.toRgb=function(){return o$1(this.rgba)},tt.prototype.toRgbString=function(){return et=o$1(this.rgba),nt=et.r,rt=et.g,it=et.b,(ot=et.a)<1?"rgba("+nt+", "+rt+", "+it+", "+ot+")":"rgb("+nt+", "+rt+", "+it+")";var et,nt,rt,it,ot},tt.prototype.toHsl=function(){return d$5(c$8(this.rgba))},tt.prototype.toHslString=function(){return et=d$5(c$8(this.rgba)),nt=et.h,rt=et.s,it=et.l,(ot=et.a)<1?"hsla("+nt+", "+rt+"%, "+it+"%, "+ot+")":"hsl("+nt+", "+rt+"%, "+it+"%)";var et,nt,rt,it,ot},tt.prototype.toHsv=function(){return et=h$9(this.rgba),{h:n$6(et.h),s:n$6(et.s),v:n$6(et.v),a:n$6(et.a,3)};var et},tt.prototype.invert=function(){return w$5({r:255-(et=this.rgba).r,g:255-et.g,b:255-et.b,a:et.a});var et},tt.prototype.saturate=function(et){return et===void 0&&(et=.1),w$5(M$1(this.rgba,et))},tt.prototype.desaturate=function(et){return et===void 0&&(et=.1),w$5(M$1(this.rgba,-et))},tt.prototype.grayscale=function(){return w$5(M$1(this.rgba,-1))},tt.prototype.lighten=function(et){return et===void 0&&(et=.1),w$5($$2(this.rgba,et))},tt.prototype.darken=function(et){return et===void 0&&(et=.1),w$5($$2(this.rgba,-et))},tt.prototype.rotate=function(et){return et===void 0&&(et=15),this.hue(this.hue()+et)},tt.prototype.alpha=function(et){return typeof et=="number"?w$5({r:(nt=this.rgba).r,g:nt.g,b:nt.b,a:et}):n$6(this.rgba.a,3);var nt},tt.prototype.hue=function(et){var nt=c$8(this.rgba);return typeof et=="number"?w$5({h:et,s:nt.s,l:nt.l,a:nt.a}):n$6(nt.h)},tt.prototype.isEqual=function(et){return this.toHex()===w$5(et).toHex()},tt}(),w$5=function(tt){return tt instanceof j$1?tt:new j$1(tt)},S$2=[],k$8=function(tt){tt.forEach(function(et){S$2.indexOf(et)<0&&(et(j$1,y$7),S$2.push(et))})};function namesPlugin(tt,et){var nt={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},rt={};for(var it in nt)rt[nt[it]]=it;var ot={};tt.prototype.toName=function(at){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var st,lt,ct=rt[this.toHex()];if(ct)return ct;if(at!=null&&at.closest){var ut=this.toRgb(),ht=1/0,dt="black";if(!ot.length)for(var pt in nt)ot[pt]=new tt(nt[pt]).toRgb();for(var mt in nt){var gt=(st=ut,lt=ot[mt],Math.pow(st.r-lt.r,2)+Math.pow(st.g-lt.g,2)+Math.pow(st.b-lt.b,2));gt=0||(it[nt]=tt[nt]);return it}function i$5(tt){var et=reactExports.useRef(tt),nt=reactExports.useRef(function(rt){et.current&&et.current(rt)});return et.current=tt,nt.current}var s$3=function(tt,et,nt){return et===void 0&&(et=0),nt===void 0&&(nt=1),tt>nt?nt:tt0:yt.buttons>0)&&it.current?ot(d$4(it.current,yt,st.current)):gt(!1)},mt=function(){return gt(!1)};function gt(yt){var bt=lt.current,vt=v$7(it.current),xt=yt?vt.addEventListener:vt.removeEventListener;xt(bt?"touchmove":"mousemove",pt),xt(bt?"touchend":"mouseup",mt)}return[function(yt){var bt=yt.nativeEvent,vt=it.current;if(vt&&(h$8(bt),!function(kt,St){return St&&!f$6(kt)}(bt,lt.current)&&vt)){if(f$6(bt)){lt.current=!0;var xt=bt.changedTouches||[];xt.length&&(st.current=xt[0].identifier)}vt.focus(),ot(d$4(vt,bt,st.current)),gt(!0)}},function(yt){var bt=yt.which||yt.keyCode;bt<37||bt>40||(yt.preventDefault(),at({left:bt===39?.05:bt===37?-.05:0,top:bt===40?.05:bt===38?-.05:0}))},gt]},[at,ot]),ut=ct[0],ht=ct[1],dt=ct[2];return reactExports.useEffect(function(){return dt},[dt]),React$1.createElement("div",u$4({},rt,{onTouchStart:ut,onMouseDown:ut,className:"react-colorful__interactive",ref:it,onKeyDown:ht,tabIndex:0,role:"slider"}))}),g$7=function(tt){return tt.filter(Boolean).join(" ")},p$7=function(tt){var et=tt.color,nt=tt.left,rt=tt.top,it=rt===void 0?.5:rt,ot=g$7(["react-colorful__pointer",tt.className]);return React$1.createElement("div",{className:ot,style:{top:100*it+"%",left:100*nt+"%"}},React$1.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:et}}))},b$5=function(tt,et,nt){return et===void 0&&(et=0),nt===void 0&&(nt=Math.pow(10,et)),Math.round(nt*tt)/nt},y$6=function(tt){var et=tt.s,nt=tt.v,rt=tt.a,it=(200-et)*nt/100;return{h:b$5(tt.h),s:b$5(it>0&&it<200?et*nt/100/(it<=100?it:200-it)*100:0),l:b$5(it/2),a:b$5(rt,2)}},q$6=function(tt){var et=y$6(tt);return"hsl("+et.h+", "+et.s+"%, "+et.l+"%)"},k$7=function(tt){var et=y$6(tt);return"hsla("+et.h+", "+et.s+"%, "+et.l+"%, "+et.a+")"},I$1=function(tt){var et=tt.h,nt=tt.s,rt=tt.v,it=tt.a;et=et/360*6,nt/=100,rt/=100;var ot=Math.floor(et),at=rt*(1-nt),st=rt*(1-(et-ot)*nt),lt=rt*(1-(1-et+ot)*nt),ct=ot%6;return{r:b$5(255*[rt,st,at,at,lt,rt][ct]),g:b$5(255*[lt,rt,rt,st,at,at][ct]),b:b$5(255*[at,at,lt,rt,rt,st][ct]),a:b$5(it,2)}},L$1=function(tt){var et=tt.r,nt=tt.g,rt=tt.b,it=tt.a,ot=Math.max(et,nt,rt),at=ot-Math.min(et,nt,rt),st=at?ot===et?(nt-rt)/at:ot===nt?2+(rt-et)/at:4+(et-nt)/at:0;return{h:b$5(60*(st<0?st+6:st)),s:b$5(ot?at/ot*100:0),v:b$5(ot/255*100),a:it}},S$1=React$1.memo(function(tt){var et=tt.hue,nt=tt.onChange,rt=g$7(["react-colorful__hue",tt.className]);return React$1.createElement("div",{className:rt},React$1.createElement(m$7,{onMove:function(it){nt({h:360*it.left})},onKey:function(it){nt({h:s$3(et+360*it.left,0,360)})},"aria-label":"Hue","aria-valuenow":b$5(et),"aria-valuemax":"360","aria-valuemin":"0"},React$1.createElement(p$7,{className:"react-colorful__hue-pointer",left:et/360,color:q$6({h:et,s:100,v:100,a:1})})))}),T$1=React$1.memo(function(tt){var et=tt.hsva,nt=tt.onChange,rt={backgroundColor:q$6({h:et.h,s:100,v:100,a:1})};return React$1.createElement("div",{className:"react-colorful__saturation",style:rt},React$1.createElement(m$7,{onMove:function(it){nt({s:100*it.left,v:100-100*it.top})},onKey:function(it){nt({s:s$3(et.s+100*it.left,0,100),v:s$3(et.v-100*it.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+b$5(et.s)+"%, Brightness "+b$5(et.v)+"%"},React$1.createElement(p$7,{className:"react-colorful__saturation-pointer",top:1-et.v/100,left:et.s/100,color:q$6(et)})))}),F$1=function(tt,et){if(tt===et)return!0;for(var nt in tt)if(tt[nt]!==et[nt])return!1;return!0};function Y$1(tt,et,nt){var rt=i$5(nt),it=reactExports.useState(function(){return tt.toHsva(et)}),ot=it[0],at=it[1],st=reactExports.useRef({color:et,hsva:ot});reactExports.useEffect(function(){if(!tt.equal(et,st.current.color)){var ct=tt.toHsva(et);st.current={hsva:ct,color:et},at(ct)}},[et,tt]),reactExports.useEffect(function(){var ct;F$1(ot,st.current.hsva)||tt.equal(ct=tt.fromHsva(ot),st.current.color)||(st.current={hsva:ot,color:ct},rt(ct))},[ot,tt,rt]);var lt=reactExports.useCallback(function(ct){at(function(ut){return Object.assign({},ut,ct)})},[]);return[ot,lt]}var V$1=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,$$1=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},J$1=new Map,Q$1=function(tt){V$1(function(){var et=tt.current?tt.current.ownerDocument:document;if(et!==void 0&&!J$1.has(et)){var nt=et.createElement("style");nt.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,J$1.set(et,nt);var rt=$$1();rt&&nt.setAttribute("nonce",rt),et.head.appendChild(nt)}},[])},U$1=function(tt){var et=tt.className,nt=tt.colorModel,rt=tt.color,it=rt===void 0?nt.defaultColor:rt,ot=tt.onChange,at=c$7(tt,["className","colorModel","color","onChange"]),st=reactExports.useRef(null);Q$1(st);var lt=Y$1(nt,it,ot),ct=lt[0],ut=lt[1],ht=g$7(["react-colorful",et]);return React$1.createElement("div",u$4({},at,{ref:st,className:ht}),React$1.createElement(T$1,{hsva:ct,onChange:ut}),React$1.createElement(S$1,{hue:ct.h,onChange:ut,className:"react-colorful__last-control"}))},ee$1=function(tt){var et=tt.className,nt=tt.hsva,rt=tt.onChange,it={backgroundImage:"linear-gradient(90deg, "+k$7(Object.assign({},nt,{a:0}))+", "+k$7(Object.assign({},nt,{a:1}))+")"},ot=g$7(["react-colorful__alpha",et]),at=b$5(100*nt.a);return React$1.createElement("div",{className:ot},React$1.createElement("div",{className:"react-colorful__alpha-gradient",style:it}),React$1.createElement(m$7,{onMove:function(st){rt({a:st.left})},onKey:function(st){rt({a:s$3(nt.a+st.left)})},"aria-label":"Alpha","aria-valuetext":at+"%","aria-valuenow":at,"aria-valuemin":"0","aria-valuemax":"100"},React$1.createElement(p$7,{className:"react-colorful__alpha-pointer",left:nt.a,color:k$7(nt)})))},re$3=function(tt){var et=tt.className,nt=tt.colorModel,rt=tt.color,it=rt===void 0?nt.defaultColor:rt,ot=tt.onChange,at=c$7(tt,["className","colorModel","color","onChange"]),st=reactExports.useRef(null);Q$1(st);var lt=Y$1(nt,it,ot),ct=lt[0],ut=lt[1],ht=g$7(["react-colorful",et]);return React$1.createElement("div",u$4({},at,{ref:st,className:ht}),React$1.createElement(T$1,{hsva:ct,onChange:ut}),React$1.createElement(S$1,{hue:ct.h,onChange:ut}),React$1.createElement(ee$1,{hsva:ct,onChange:ut,className:"react-colorful__last-control"}))},xe$1={defaultColor:{r:0,g:0,b:0,a:1},toHsva:L$1,fromHsva:I$1,equal:F$1},Ce=function(tt){return React$1.createElement(re$3,u$4({},tt,{colorModel:xe$1}))},Me$1={defaultColor:{r:0,g:0,b:0},toHsva:function(tt){return L$1({r:tt.r,g:tt.g,b:tt.b,a:1})},fromHsva:function(tt){return{r:(et=I$1(tt)).r,g:et.g,b:et.b};var et},equal:F$1},Ne$1=function(tt){return React$1.createElement(U$1,u$4({},tt,{colorModel:Me$1}))},propTypes$1={exports:{}},ReactPropTypesSecret$1="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ReactPropTypesSecret_1=ReactPropTypesSecret$1,ReactPropTypesSecret=ReactPropTypesSecret_1;function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction;var factoryWithThrowingShims=function(){function tt(rt,it,ot,at,st,lt){if(lt!==ReactPropTypesSecret){var ct=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw ct.name="Invariant Violation",ct}}tt.isRequired=tt;function et(){return tt}var nt={array:tt,bigint:tt,bool:tt,func:tt,number:tt,object:tt,string:tt,symbol:tt,any:tt,arrayOf:et,element:tt,elementType:tt,instanceOf:et,node:tt,objectOf:et,oneOf:et,oneOfType:et,shape:et,exact:et,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return nt.PropTypes=nt,nt};propTypes$1.exports=factoryWithThrowingShims();var propTypesExports=propTypes$1.exports;const PropTypes=getDefaultExportFromCjs(propTypesExports);function __decorate(tt,et,nt,rt){var it=arguments.length,ot=it<3?et:rt===null?rt=Object.getOwnPropertyDescriptor(et,nt):rt,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ot=Reflect.decorate(tt,et,nt,rt);else for(var st=tt.length-1;st>=0;st--)(at=tt[st])&&(ot=(it<3?at(ot):it>3?at(et,nt,ot):at(et,nt))||ot);return it>3&&ot&&Object.defineProperty(et,nt,ot),ot}function __awaiter(tt,et,nt,rt){function it(ot){return ot instanceof nt?ot:new nt(function(at){at(ot)})}return new(nt||(nt=Promise))(function(ot,at){function st(ut){try{ct(rt.next(ut))}catch(ht){at(ht)}}function lt(ut){try{ct(rt.throw(ut))}catch(ht){at(ht)}}function ct(ut){ut.done?ot(ut.value):it(ut.value).then(st,lt)}ct((rt=rt.apply(tt,et||[])).next())})}function __generator(tt,et){var nt={label:0,sent:function(){if(ot[0]&1)throw ot[1];return ot[1]},trys:[],ops:[]},rt,it,ot,at;return at={next:st(0),throw:st(1),return:st(2)},typeof Symbol=="function"&&(at[Symbol.iterator]=function(){return this}),at;function st(ct){return function(ut){return lt([ct,ut])}}function lt(ct){if(rt)throw new TypeError("Generator is already executing.");for(;at&&(at=0,ct[0]&&(nt=0)),nt;)try{if(rt=1,it&&(ot=ct[0]&2?it.return:ct[0]?it.throw||((ot=it.return)&&ot.call(it),0):it.next)&&!(ot=ot.call(it,ct[1])).done)return ot;switch(it=0,ot&&(ct=[ct[0]&2,ot.value]),ct[0]){case 0:case 1:ot=ct;break;case 4:return nt.label++,{value:ct[1],done:!1};case 5:nt.label++,it=ct[1],ct=[0];continue;case 7:ct=nt.ops.pop(),nt.trys.pop();continue;default:if(ot=nt.trys,!(ot=ot.length>0&&ot[ot.length-1])&&(ct[0]===6||ct[0]===2)){nt=0;continue}if(ct[0]===3&&(!ot||ct[1]>ot[0]&&ct[1]0)&&!(it=rt.next()).done;)ot.push(it.value)}catch(st){at={error:st}}finally{try{it&&!it.done&&(nt=rt.return)&&nt.call(rt)}finally{if(at)throw at.error}}return ot}function __spread(){for(var tt=[],et=0;et0?rt:tt.name,writable:!1,configurable:!1,enumerable:!0})}return nt}function withMimeType(tt){var et=tt.name,nt=et&&et.lastIndexOf(".")!==-1;if(nt&&!tt.type){var rt=et.split(".").pop().toLowerCase(),it=COMMON_MIME_TYPES.get(rt);it&&Object.defineProperty(tt,"type",{value:it,writable:!1,configurable:!1,enumerable:!0})}return tt}var FILES_TO_IGNORE=[".DS_Store","Thumbs.db"];function fromEvent(tt){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(et){return isObject$n(tt)&&isDataTransfer(tt)?[2,getDataTransferFiles(tt.dataTransfer,tt.type)]:isChangeEvt(tt)?[2,getInputFiles(tt)]:Array.isArray(tt)&&tt.every(function(nt){return"getFile"in nt&&typeof nt.getFile=="function"})?[2,getFsHandleFiles(tt)]:[2,[]]})})}function isDataTransfer(tt){return isObject$n(tt.dataTransfer)}function isChangeEvt(tt){return isObject$n(tt)&&isObject$n(tt.target)}function isObject$n(tt){return typeof tt=="object"&&tt!==null}function getInputFiles(tt){return fromList(tt.target.files).map(function(et){return toFileWithPath(et)})}function getFsHandleFiles(tt){return __awaiter(this,void 0,void 0,function(){var et;return __generator(this,function(nt){switch(nt.label){case 0:return[4,Promise.all(tt.map(function(rt){return rt.getFile()}))];case 1:return et=nt.sent(),[2,et.map(function(rt){return toFileWithPath(rt)})]}})})}function getDataTransferFiles(tt,et){return __awaiter(this,void 0,void 0,function(){var nt,rt;return __generator(this,function(it){switch(it.label){case 0:return tt===null?[2,[]]:tt.items?(nt=fromList(tt.items).filter(function(ot){return ot.kind==="file"}),et!=="drop"?[2,nt]:[4,Promise.all(nt.map(toFilePromises))]):[3,2];case 1:return rt=it.sent(),[2,noIgnoredFiles(flatten$1(rt))];case 2:return[2,noIgnoredFiles(fromList(tt.files).map(function(ot){return toFileWithPath(ot)}))]}})})}function noIgnoredFiles(tt){return tt.filter(function(et){return FILES_TO_IGNORE.indexOf(et.name)===-1})}function fromList(tt){if(tt===null)return[];for(var et=[],nt=0;nttt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);ntnt)return[!1,getTooLargeRejectionErr(nt)];if(tt.sizent)return[!1,getTooLargeRejectionErr(nt)]}return[!0,null]}function isDefined$1(tt){return tt!=null}function allFilesAccepted(tt){var et=tt.files,nt=tt.accept,rt=tt.minSize,it=tt.maxSize,ot=tt.multiple,at=tt.maxFiles;return!ot&&et.length>1||ot&&at>=1&&et.length>at?!1:et.every(function(st){var lt=fileAccepted(st,nt),ct=_slicedToArray$e(lt,1),ut=ct[0],ht=fileMatchSize(st,rt,it),dt=_slicedToArray$e(ht,1),pt=dt[0];return ut&&pt})}function isPropagationStopped(tt){return typeof tt.isPropagationStopped=="function"?tt.isPropagationStopped():typeof tt.cancelBubble<"u"?tt.cancelBubble:!1}function isEvtWithFiles(tt){return tt.dataTransfer?Array.prototype.some.call(tt.dataTransfer.types,function(et){return et==="Files"||et==="application/x-moz-file"}):!!tt.target&&!!tt.target.files}function onDocumentDragOver(tt){tt.preventDefault()}function isIe(tt){return tt.indexOf("MSIE")!==-1||tt.indexOf("Trident/")!==-1}function isEdge$1(tt){return tt.indexOf("Edge/")!==-1}function isIeOrEdge(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return isIe(tt)||isEdge$1(tt)}function composeEventHandlers(){for(var tt=arguments.length,et=new Array(tt),nt=0;nt1?it-1:0),at=1;at<\/script>",tt=tt.removeChild(tt.firstChild)):typeof rt.is=="string"?tt=at.createElement(nt,{is:rt.is}):(tt=at.createElement(nt),nt==="select"&&(at=tt,rt.multiple?at.multiple=!0:rt.size&&(at.size=rt.size))):tt=at.createElementNS(tt,nt),tt[Of]=et,tt[Pf]=rt,Aj(tt,et,!1,!1),et.stateNode=tt;e:{switch(at=vb(nt,rt),nt){case"dialog":D$2("cancel",tt),D$2("close",tt),it=rt;break;case"iframe":case"object":case"embed":D$2("load",tt),it=rt;break;case"video":case"audio":for(it=0;itHj&&(et.flags|=128,rt=!0,Ej(ot,!1),et.lanes=4194304)}else{if(!rt)if(tt=Mh(at),tt!==null){if(et.flags|=128,rt=!0,nt=tt.updateQueue,nt!==null&&(et.updateQueue=nt,et.flags|=4),Ej(ot,!0),ot.tail===null&&ot.tailMode==="hidden"&&!at.alternate&&!I$4)return S$4(et),null}else 2*B$2()-ot.renderingStartTime>Hj&&nt!==1073741824&&(et.flags|=128,rt=!0,Ej(ot,!1),et.lanes=4194304);ot.isBackwards?(at.sibling=et.child,et.child=at):(nt=ot.last,nt!==null?nt.sibling=at:et.child=at,ot.last=at)}return ot.tail!==null?(et=ot.tail,ot.rendering=et,ot.tail=et.sibling,ot.renderingStartTime=B$2(),et.sibling=null,nt=M$3.current,G$3(M$3,rt?nt&1|2:nt&1),et):(S$4(et),null);case 22:case 23:return Ij(),rt=et.memoizedState!==null,tt!==null&&tt.memoizedState!==null!==rt&&(et.flags|=8192),rt&&et.mode&1?gj&1073741824&&(S$4(et),et.subtreeFlags&6&&(et.flags|=8192)):S$4(et),null;case 24:return null;case 25:return null}throw Error(p$a(156,et.tag))}function Jj(tt,et){switch(wg(et),et.tag){case 1:return Zf(et.type)&&$f(),tt=et.flags,tt&65536?(et.flags=tt&-65537|128,et):null;case 3:return Jh(),E$2(Wf),E$2(H$3),Oh(),tt=et.flags,tt&65536&&!(tt&128)?(et.flags=tt&-65537|128,et):null;case 5:return Lh(et),null;case 13:if(E$2(M$3),tt=et.memoizedState,tt!==null&&tt.dehydrated!==null){if(et.alternate===null)throw Error(p$a(340));Ig()}return tt=et.flags,tt&65536?(et.flags=tt&-65537|128,et):null;case 19:return E$2(M$3),null;case 4:return Jh(),null;case 10:return Rg(et.type._context),null;case 22:case 23:return Ij(),null;case 24:return null;default:return null}}var Kj=!1,U$3=!1,Lj=typeof WeakSet=="function"?WeakSet:Set,V$4=null;function Mj(tt,et){var nt=tt.ref;if(nt!==null)if(typeof nt=="function")try{nt(null)}catch(rt){W$8(tt,et,rt)}else nt.current=null}function Nj(tt,et,nt){try{nt()}catch(rt){W$8(tt,et,rt)}}var Oj=!1;function Pj(tt,et){if(Cf=dd,tt=Me$2(),Ne$2(tt)){if("selectionStart"in tt)var nt={start:tt.selectionStart,end:tt.selectionEnd};else e:{nt=(nt=tt.ownerDocument)&&nt.defaultView||window;var rt=nt.getSelection&&nt.getSelection();if(rt&&rt.rangeCount!==0){nt=rt.anchorNode;var it=rt.anchorOffset,ot=rt.focusNode;rt=rt.focusOffset;try{nt.nodeType,ot.nodeType}catch{nt=null;break e}var at=0,st=-1,lt=-1,ct=0,ut=0,ht=tt,dt=null;t:for(;;){for(var pt;ht!==nt||it!==0&&ht.nodeType!==3||(st=at+it),ht!==ot||rt!==0&&ht.nodeType!==3||(lt=at+rt),ht.nodeType===3&&(at+=ht.nodeValue.length),(pt=ht.firstChild)!==null;)dt=ht,ht=pt;for(;;){if(ht===tt)break t;if(dt===nt&&++ct===it&&(st=at),dt===ot&&++ut===rt&&(lt=at),(pt=ht.nextSibling)!==null)break;ht=dt,dt=ht.parentNode}ht=pt}nt=st===-1||lt===-1?null:{start:st,end:lt}}else nt=null}nt=nt||{start:0,end:0}}else nt=null;for(Df={focusedElem:tt,selectionRange:nt},dd=!1,V$4=et;V$4!==null;)if(et=V$4,tt=et.child,(et.subtreeFlags&1028)!==0&&tt!==null)tt.return=et,V$4=tt;else for(;V$4!==null;){et=V$4;try{var mt=et.alternate;if(et.flags&1024)switch(et.tag){case 0:case 11:case 15:break;case 1:if(mt!==null){var gt=mt.memoizedProps,yt=mt.memoizedState,bt=et.stateNode,vt=bt.getSnapshotBeforeUpdate(et.elementType===et.type?gt:Lg(et.type,gt),yt);bt.__reactInternalSnapshotBeforeUpdate=vt}break;case 3:var xt=et.stateNode.containerInfo;xt.nodeType===1?xt.textContent="":xt.nodeType===9&&xt.documentElement&&xt.removeChild(xt.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p$a(163))}}catch(kt){W$8(et,et.return,kt)}if(tt=et.sibling,tt!==null){tt.return=et.return,V$4=tt;break}V$4=et.return}return mt=Oj,Oj=!1,mt}function Qj(tt,et,nt){var rt=et.updateQueue;if(rt=rt!==null?rt.lastEffect:null,rt!==null){var it=rt=rt.next;do{if((it.tag&tt)===tt){var ot=it.destroy;it.destroy=void 0,ot!==void 0&&Nj(et,nt,ot)}it=it.next}while(it!==rt)}}function Rj(tt,et){if(et=et.updateQueue,et=et!==null?et.lastEffect:null,et!==null){var nt=et=et.next;do{if((nt.tag&tt)===tt){var rt=nt.create;nt.destroy=rt()}nt=nt.next}while(nt!==et)}}function Sj(tt){var et=tt.ref;if(et!==null){var nt=tt.stateNode;switch(tt.tag){case 5:tt=nt;break;default:tt=nt}typeof et=="function"?et(tt):et.current=tt}}function Tj(tt){var et=tt.alternate;et!==null&&(tt.alternate=null,Tj(et)),tt.child=null,tt.deletions=null,tt.sibling=null,tt.tag===5&&(et=tt.stateNode,et!==null&&(delete et[Of],delete et[Pf],delete et[of],delete et[Qf],delete et[Rf])),tt.stateNode=null,tt.return=null,tt.dependencies=null,tt.memoizedProps=null,tt.memoizedState=null,tt.pendingProps=null,tt.stateNode=null,tt.updateQueue=null}function Uj(tt){return tt.tag===5||tt.tag===3||tt.tag===4}function Vj(tt){e:for(;;){for(;tt.sibling===null;){if(tt.return===null||Uj(tt.return))return null;tt=tt.return}for(tt.sibling.return=tt.return,tt=tt.sibling;tt.tag!==5&&tt.tag!==6&&tt.tag!==18;){if(tt.flags&2||tt.child===null||tt.tag===4)continue e;tt.child.return=tt,tt=tt.child}if(!(tt.flags&2))return tt.stateNode}}function Wj(tt,et,nt){var rt=tt.tag;if(rt===5||rt===6)tt=tt.stateNode,et?nt.nodeType===8?nt.parentNode.insertBefore(tt,et):nt.insertBefore(tt,et):(nt.nodeType===8?(et=nt.parentNode,et.insertBefore(tt,nt)):(et=nt,et.appendChild(tt)),nt=nt._reactRootContainer,nt!=null||et.onclick!==null||(et.onclick=Bf));else if(rt!==4&&(tt=tt.child,tt!==null))for(Wj(tt,et,nt),tt=tt.sibling;tt!==null;)Wj(tt,et,nt),tt=tt.sibling}function Xj(tt,et,nt){var rt=tt.tag;if(rt===5||rt===6)tt=tt.stateNode,et?nt.insertBefore(tt,et):nt.appendChild(tt);else if(rt!==4&&(tt=tt.child,tt!==null))for(Xj(tt,et,nt),tt=tt.sibling;tt!==null;)Xj(tt,et,nt),tt=tt.sibling}var X$2=null,Yj=!1;function Zj(tt,et,nt){for(nt=nt.child;nt!==null;)ak(tt,et,nt),nt=nt.sibling}function ak(tt,et,nt){if(lc&&typeof lc.onCommitFiberUnmount=="function")try{lc.onCommitFiberUnmount(kc,nt)}catch{}switch(nt.tag){case 5:U$3||Mj(nt,et);case 6:var rt=X$2,it=Yj;X$2=null,Zj(tt,et,nt),X$2=rt,Yj=it,X$2!==null&&(Yj?(tt=X$2,nt=nt.stateNode,tt.nodeType===8?tt.parentNode.removeChild(nt):tt.removeChild(nt)):X$2.removeChild(nt.stateNode));break;case 18:X$2!==null&&(Yj?(tt=X$2,nt=nt.stateNode,tt.nodeType===8?Kf(tt.parentNode,nt):tt.nodeType===1&&Kf(tt,nt),bd(tt)):Kf(X$2,nt.stateNode));break;case 4:rt=X$2,it=Yj,X$2=nt.stateNode.containerInfo,Yj=!0,Zj(tt,et,nt),X$2=rt,Yj=it;break;case 0:case 11:case 14:case 15:if(!U$3&&(rt=nt.updateQueue,rt!==null&&(rt=rt.lastEffect,rt!==null))){it=rt=rt.next;do{var ot=it,at=ot.destroy;ot=ot.tag,at!==void 0&&(ot&2||ot&4)&&Nj(nt,et,at),it=it.next}while(it!==rt)}Zj(tt,et,nt);break;case 1:if(!U$3&&(Mj(nt,et),rt=nt.stateNode,typeof rt.componentWillUnmount=="function"))try{rt.props=nt.memoizedProps,rt.state=nt.memoizedState,rt.componentWillUnmount()}catch(st){W$8(nt,et,st)}Zj(tt,et,nt);break;case 21:Zj(tt,et,nt);break;case 22:nt.mode&1?(U$3=(rt=U$3)||nt.memoizedState!==null,Zj(tt,et,nt),U$3=rt):Zj(tt,et,nt);break;default:Zj(tt,et,nt)}}function bk(tt){var et=tt.updateQueue;if(et!==null){tt.updateQueue=null;var nt=tt.stateNode;nt===null&&(nt=tt.stateNode=new Lj),et.forEach(function(rt){var it=ck.bind(null,tt,rt);nt.has(rt)||(nt.add(rt),rt.then(it,it))})}}function dk(tt,et){var nt=et.deletions;if(nt!==null)for(var rt=0;rtit&&(it=at),rt&=~ot}if(rt=it,rt=B$2()-rt,rt=(120>rt?120:480>rt?480:1080>rt?1080:1920>rt?1920:3e3>rt?3e3:4320>rt?4320:1960*mk(rt/1960))-rt,10tt?16:tt,xk===null)var rt=!1;else{if(tt=xk,xk=null,yk=0,K$7&6)throw Error(p$a(331));var it=K$7;for(K$7|=4,V$4=tt.current;V$4!==null;){var ot=V$4,at=ot.child;if(V$4.flags&16){var st=ot.deletions;if(st!==null){for(var lt=0;ltB$2()-gk?Lk(tt,0):sk|=nt),Ek(tt,et)}function Zk(tt,et){et===0&&(tt.mode&1?(et=sc,sc<<=1,!(sc&130023424)&&(sc=4194304)):et=1);var nt=L$3();tt=Zg(tt,et),tt!==null&&(Ac(tt,et,nt),Ek(tt,nt))}function vj(tt){var et=tt.memoizedState,nt=0;et!==null&&(nt=et.retryLane),Zk(tt,nt)}function ck(tt,et){var nt=0;switch(tt.tag){case 13:var rt=tt.stateNode,it=tt.memoizedState;it!==null&&(nt=it.retryLane);break;case 19:rt=tt.stateNode;break;default:throw Error(p$a(314))}rt!==null&&rt.delete(et),Zk(tt,nt)}var Wk;Wk=function(tt,et,nt){if(tt!==null)if(tt.memoizedProps!==et.pendingProps||Wf.current)Ug=!0;else{if(!(tt.lanes&nt)&&!(et.flags&128))return Ug=!1,zj(tt,et,nt);Ug=!!(tt.flags&131072)}else Ug=!1,I$4&&et.flags&1048576&&ug(et,ng,et.index);switch(et.lanes=0,et.tag){case 2:var rt=et.type;jj(tt,et),tt=et.pendingProps;var it=Yf(et,H$3.current);Tg(et,nt),it=Xh(null,et,rt,tt,it,nt);var ot=bi();return et.flags|=1,typeof it=="object"&&it!==null&&typeof it.render=="function"&&it.$$typeof===void 0?(et.tag=1,et.memoizedState=null,et.updateQueue=null,Zf(rt)?(ot=!0,cg(et)):ot=!1,et.memoizedState=it.state!==null&&it.state!==void 0?it.state:null,ah(et),it.updater=nh,et.stateNode=it,it._reactInternals=et,rh$1(et,rt,tt,nt),et=kj(null,et,rt,!0,ot,nt)):(et.tag=0,I$4&&ot&&vg(et),Yi(null,et,it,nt),et=et.child),et;case 16:rt=et.elementType;e:{switch(jj(tt,et),tt=et.pendingProps,it=rt._init,rt=it(rt._payload),et.type=rt,it=et.tag=$k(rt),tt=Lg(rt,tt),it){case 0:et=dj(null,et,rt,tt,nt);break e;case 1:et=ij(null,et,rt,tt,nt);break e;case 11:et=Zi(null,et,rt,tt,nt);break e;case 14:et=aj(null,et,rt,Lg(rt.type,tt),nt);break e}throw Error(p$a(306,rt,""))}return et;case 0:return rt=et.type,it=et.pendingProps,it=et.elementType===rt?it:Lg(rt,it),dj(tt,et,rt,it,nt);case 1:return rt=et.type,it=et.pendingProps,it=et.elementType===rt?it:Lg(rt,it),ij(tt,et,rt,it,nt);case 3:e:{if(lj(et),tt===null)throw Error(p$a(387));rt=et.pendingProps,ot=et.memoizedState,it=ot.element,bh(tt,et),gh(et,rt,null,nt);var at=et.memoizedState;if(rt=at.element,ot.isDehydrated)if(ot={element:rt,isDehydrated:!1,cache:at.cache,pendingSuspenseBoundaries:at.pendingSuspenseBoundaries,transitions:at.transitions},et.updateQueue.baseState=ot,et.memoizedState=ot,et.flags&256){it=Ki(Error(p$a(423)),et),et=mj(tt,et,rt,nt,it);break e}else if(rt!==it){it=Ki(Error(p$a(424)),et),et=mj(tt,et,rt,nt,it);break e}else for(yg=Lf(et.stateNode.containerInfo.firstChild),xg=et,I$4=!0,zg=null,nt=Ch$1(et,null,rt,nt),et.child=nt;nt;)nt.flags=nt.flags&-3|4096,nt=nt.sibling;else{if(Ig(),rt===it){et=$i(tt,et,nt);break e}Yi(tt,et,rt,nt)}et=et.child}return et;case 5:return Kh$1(et),tt===null&&Eg(et),rt=et.type,it=et.pendingProps,ot=tt!==null?tt.memoizedProps:null,at=it.children,Ef(rt,it)?at=null:ot!==null&&Ef(rt,ot)&&(et.flags|=32),hj(tt,et),Yi(tt,et,at,nt),et.child;case 6:return tt===null&&Eg(et),null;case 13:return pj(tt,et,nt);case 4:return Ih(et,et.stateNode.containerInfo),rt=et.pendingProps,tt===null?et.child=Bh(et,null,rt,nt):Yi(tt,et,rt,nt),et.child;case 11:return rt=et.type,it=et.pendingProps,it=et.elementType===rt?it:Lg(rt,it),Zi(tt,et,rt,it,nt);case 7:return Yi(tt,et,et.pendingProps,nt),et.child;case 8:return Yi(tt,et,et.pendingProps.children,nt),et.child;case 12:return Yi(tt,et,et.pendingProps.children,nt),et.child;case 10:e:{if(rt=et.type._context,it=et.pendingProps,ot=et.memoizedProps,at=it.value,G$3(Mg,rt._currentValue),rt._currentValue=at,ot!==null)if(He$1(ot.value,at)){if(ot.children===it.children&&!Wf.current){et=$i(tt,et,nt);break e}}else for(ot=et.child,ot!==null&&(ot.return=et);ot!==null;){var st=ot.dependencies;if(st!==null){at=ot.child;for(var lt=st.firstContext;lt!==null;){if(lt.context===rt){if(ot.tag===1){lt=ch$1(-1,nt&-nt),lt.tag=2;var ct=ot.updateQueue;if(ct!==null){ct=ct.shared;var ut=ct.pending;ut===null?lt.next=lt:(lt.next=ut.next,ut.next=lt),ct.pending=lt}}ot.lanes|=nt,lt=ot.alternate,lt!==null&&(lt.lanes|=nt),Sg(ot.return,nt,et),st.lanes|=nt;break}lt=lt.next}}else if(ot.tag===10)at=ot.type===et.type?null:ot.child;else if(ot.tag===18){if(at=ot.return,at===null)throw Error(p$a(341));at.lanes|=nt,st=at.alternate,st!==null&&(st.lanes|=nt),Sg(at,nt,et),at=ot.sibling}else at=ot.child;if(at!==null)at.return=ot;else for(at=ot;at!==null;){if(at===et){at=null;break}if(ot=at.sibling,ot!==null){ot.return=at.return,at=ot;break}at=at.return}ot=at}Yi(tt,et,it.children,nt),et=et.child}return et;case 9:return it=et.type,rt=et.pendingProps.children,Tg(et,nt),it=Vg(it),rt=rt(it),et.flags|=1,Yi(tt,et,rt,nt),et.child;case 14:return rt=et.type,it=Lg(rt,et.pendingProps),it=Lg(rt.type,it),aj(tt,et,rt,it,nt);case 15:return cj(tt,et,et.type,et.pendingProps,nt);case 17:return rt=et.type,it=et.pendingProps,it=et.elementType===rt?it:Lg(rt,it),jj(tt,et),et.tag=1,Zf(rt)?(tt=!0,cg(et)):tt=!1,Tg(et,nt),ph(et,rt,it),rh$1(et,rt,it,nt),kj(null,et,rt,!0,tt,nt);case 19:return yj(tt,et,nt);case 22:return ej(tt,et,nt)}throw Error(p$a(156,et.tag))};function Gk(tt,et){return ac(tt,et)}function al(tt,et,nt,rt){this.tag=tt,this.key=nt,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=et,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=rt,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg$1(tt,et,nt,rt){return new al(tt,et,nt,rt)}function bj(tt){return tt=tt.prototype,!(!tt||!tt.isReactComponent)}function $k(tt){if(typeof tt=="function")return bj(tt)?1:0;if(tt!=null){if(tt=tt.$$typeof,tt===Da)return 11;if(tt===Ga)return 14}return 2}function wh(tt,et){var nt=tt.alternate;return nt===null?(nt=Bg$1(tt.tag,et,tt.key,tt.mode),nt.elementType=tt.elementType,nt.type=tt.type,nt.stateNode=tt.stateNode,nt.alternate=tt,tt.alternate=nt):(nt.pendingProps=et,nt.type=tt.type,nt.flags=0,nt.subtreeFlags=0,nt.deletions=null),nt.flags=tt.flags&14680064,nt.childLanes=tt.childLanes,nt.lanes=tt.lanes,nt.child=tt.child,nt.memoizedProps=tt.memoizedProps,nt.memoizedState=tt.memoizedState,nt.updateQueue=tt.updateQueue,et=tt.dependencies,nt.dependencies=et===null?null:{lanes:et.lanes,firstContext:et.firstContext},nt.sibling=tt.sibling,nt.index=tt.index,nt.ref=tt.ref,nt}function yh(tt,et,nt,rt,it,ot){var at=2;if(rt=tt,typeof tt=="function")bj(tt)&&(at=1);else if(typeof tt=="string")at=5;else e:switch(tt){case ya:return Ah(nt.children,it,ot,et);case za:at=8,it|=8;break;case Aa:return tt=Bg$1(12,nt,et,it|2),tt.elementType=Aa,tt.lanes=ot,tt;case Ea:return tt=Bg$1(13,nt,et,it),tt.elementType=Ea,tt.lanes=ot,tt;case Fa:return tt=Bg$1(19,nt,et,it),tt.elementType=Fa,tt.lanes=ot,tt;case Ia:return qj(nt,it,ot,et);default:if(typeof tt=="object"&&tt!==null)switch(tt.$$typeof){case Ba:at=10;break e;case Ca:at=9;break e;case Da:at=11;break e;case Ga:at=14;break e;case Ha:at=16,rt=null;break e}throw Error(p$a(130,tt==null?tt:typeof tt,""))}return et=Bg$1(at,nt,et,it),et.elementType=tt,et.type=rt,et.lanes=ot,et}function Ah(tt,et,nt,rt){return tt=Bg$1(7,tt,rt,et),tt.lanes=nt,tt}function qj(tt,et,nt,rt){return tt=Bg$1(22,tt,rt,et),tt.elementType=Ia,tt.lanes=nt,tt.stateNode={isHidden:!1},tt}function xh(tt,et,nt){return tt=Bg$1(6,tt,null,et),tt.lanes=nt,tt}function zh(tt,et,nt){return et=Bg$1(4,tt.children!==null?tt.children:[],tt.key,et),et.lanes=nt,et.stateNode={containerInfo:tt.containerInfo,pendingChildren:null,implementation:tt.implementation},et}function bl(tt,et,nt,rt,it){this.tag=et,this.containerInfo=tt,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc(0),this.expirationTimes=zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc(0),this.identifierPrefix=rt,this.onRecoverableError=it,this.mutableSourceEagerHydrationData=null}function cl(tt,et,nt,rt,it,ot,at,st,lt){return tt=new bl(tt,et,nt,st,lt),et===1?(et=1,ot===!0&&(et|=8)):et=0,ot=Bg$1(3,null,null,et),tt.current=ot,ot.stateNode=tt,ot.memoizedState={element:rt,isDehydrated:nt,cache:null,transitions:null,pendingSuspenseBoundaries:null},ah(ot),tt}function dl(tt,et,nt){var rt=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(tt){console.error(tt)}}checkDCE(),reactDom.exports=reactDom_production_min;var reactDomExports=reactDom.exports;const ReactDOM=getDefaultExportFromCjs(reactDomExports);var createRoot$1,m$a=reactDomExports;createRoot$1=client$1.createRoot=m$a.createRoot,client$1.hydrateRoot=m$a.hydrateRoot;function _extends$u(){return _extends$u=Object.assign?Object.assign.bind():function(tt){for(var et=1;ettt.forEach(nt=>$6ed0406888f73fc4$var$setRef(nt,et))}function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...tt){return reactExports.useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...tt),tt)}const $5e63c961fc1ce211$export$8c6ed5c666ac1360=reactExports.forwardRef((tt,et)=>{const{children:nt,...rt}=tt,it=reactExports.Children.toArray(nt),ot=it.find($5e63c961fc1ce211$var$isSlottable);if(ot){const at=ot.props.children,st=it.map(lt=>lt===ot?reactExports.Children.count(at)>1?reactExports.Children.only(null):reactExports.isValidElement(at)?at.props.children:null:lt);return reactExports.createElement($5e63c961fc1ce211$var$SlotClone,_extends$u({},rt,{ref:et}),reactExports.isValidElement(at)?reactExports.cloneElement(at,void 0,st):null)}return reactExports.createElement($5e63c961fc1ce211$var$SlotClone,_extends$u({},rt,{ref:et}),nt)});$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName="Slot";const $5e63c961fc1ce211$var$SlotClone=reactExports.forwardRef((tt,et)=>{const{children:nt,...rt}=tt;return reactExports.isValidElement(nt)?reactExports.cloneElement(nt,{...$5e63c961fc1ce211$var$mergeProps(rt,nt.props),ref:et?$6ed0406888f73fc4$export$43e446d32b3d21af(et,nt.ref):nt.ref}):reactExports.Children.count(nt)>1?reactExports.Children.only(null):null});$5e63c961fc1ce211$var$SlotClone.displayName="SlotClone";const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45=({children:tt})=>reactExports.createElement(reactExports.Fragment,null,tt);function $5e63c961fc1ce211$var$isSlottable(tt){return reactExports.isValidElement(tt)&&tt.type===$5e63c961fc1ce211$export$d9f1ccf0bdb05d45}function $5e63c961fc1ce211$var$mergeProps(tt,et){const nt={...et};for(const rt in et){const it=tt[rt],ot=et[rt];/^on[A-Z]/.test(rt)?it&&ot?nt[rt]=(...st)=>{ot(...st),it(...st)}:it&&(nt[rt]=it):rt==="style"?nt[rt]={...it,...ot}:rt==="className"&&(nt[rt]=[it,ot].filter(Boolean).join(" "))}return{...tt,...nt}}const $8927f6f2acc4f386$var$NODES=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$8927f6f2acc4f386$export$250ffa63cdc0d034=$8927f6f2acc4f386$var$NODES.reduce((tt,et)=>{const nt=reactExports.forwardRef((rt,it)=>{const{asChild:ot,...at}=rt,st=ot?$5e63c961fc1ce211$export$8c6ed5c666ac1360:et;return reactExports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),reactExports.createElement(st,_extends$u({},at,{ref:it}))});return nt.displayName=`Primitive.${et}`,{...tt,[et]:nt}},{});function $8927f6f2acc4f386$export$6d1a0317bde7de7f(tt,et){tt&&reactDomExports.flushSync(()=>tt.dispatchEvent(et))}const $f1701beae083dbae$export$602eac185826482c=reactExports.forwardRef((tt,et)=>{var nt;const{container:rt=globalThis==null||(nt=globalThis.document)===null||nt===void 0?void 0:nt.body,...it}=tt;return rt?ReactDOM.createPortal(reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,_extends$u({},it,{ref:et})),rt):null}),$f1701beae083dbae$export$be92b6f5f03c0fe9=$f1701beae083dbae$export$602eac185826482c;var has=Object.prototype.hasOwnProperty;function dequal(tt,et){var nt,rt;if(tt===et)return!0;if(tt&&et&&(nt=tt.constructor)===et.constructor){if(nt===Date)return tt.getTime()===et.getTime();if(nt===RegExp)return tt.toString()===et.toString();if(nt===Array){if((rt=tt.length)===et.length)for(;rt--&&dequal(tt[rt],et[rt]););return rt===-1}if(!nt||typeof tt=="object"){rt=0;for(nt in tt)if(has.call(tt,nt)&&++rt&&!has.call(et,nt)||!(nt in et)||!dequal(tt[nt],et[nt]))return!1;return Object.keys(et).length===rt}}return tt!==tt&&et!==et}function shallow$2(tt,et){if(Object.is(tt,et))return!0;if(typeof tt!="object"||tt===null||typeof et!="object"||et===null)return!1;const nt=Object.keys(tt);if(nt.length!==Object.keys(et).length)return!1;for(let rt=0;rt0;)at[st]=arguments[st+4];tt.call(this,at),tt.captureStackTrace&&tt.captureStackTrace(this,et),this.rule=nt,this.value=rt,this.cause=it,this.target=ot}return tt&&(et.__proto__=tt),et.prototype=Object.create(tt&&tt.prototype),et.prototype.constructor=et,et}(Error),Context$2=function(et,nt){et===void 0&&(et=[]),nt===void 0&&(nt=[]),this.chain=et,this.nextRuleModifiers=nt};Context$2.prototype._applyRule=function(et,nt){var rt=this;return function(){for(var it=[],ot=arguments.length;ot--;)it[ot]=arguments[ot];return rt.chain.push(new Rule(nt,et.apply(rt,it),it,rt.nextRuleModifiers)),rt.nextRuleModifiers=[],rt}};Context$2.prototype._applyModifier=function(et,nt){return this.nextRuleModifiers.push(new Modifier(nt,et.simple,et.async)),this};Context$2.prototype._clone=function(){return new Context$2(this.chain.slice(),this.nextRuleModifiers.slice())};Context$2.prototype.test=function(et){return this.chain.every(function(nt){return nt._test(et)})};Context$2.prototype.testAll=function(et){var nt=[];return this.chain.forEach(function(rt){try{rt._check(et)}catch(it){nt.push(new ValidationError(rt,et,it))}}),nt};Context$2.prototype.check=function(et){this.chain.forEach(function(nt){try{nt._check(et)}catch(rt){throw new ValidationError(nt,et,rt)}})};Context$2.prototype.testAsync=function(et){var nt=this;return new Promise(function(rt,it){executeAsyncRules(et,nt.chain.slice(),rt,it)})};function executeAsyncRules(tt,et,nt,rt){if(et.length){var it=et.shift();it._testAsync(tt).then(function(){executeAsyncRules(tt,et,nt,rt)},function(ot){rt(new ValidationError(it,tt,ot))})}else nt(tt)}var consideredEmpty=function(tt,et){return et&&typeof tt=="string"&&tt.trim().length===0?!0:tt==null};function optional(tt,et){return et===void 0&&(et=!1),{simple:function(nt){return consideredEmpty(nt,et)||tt.check(nt)===void 0},async:function(nt){return consideredEmpty(nt,et)||tt.testAsync(nt)}}}function v8n(){return typeof Proxy<"u"?proxyContext(new Context$2):proxylessContext(new Context$2)}var customRules={};v8n.extend=function(tt){Object.assign(customRules,tt)};v8n.clearCustomRules=function(){customRules={}};function proxyContext(tt){return new Proxy(tt,{get:function(nt,rt){if(rt in nt)return nt[rt];var it=proxyContext(tt._clone());if(rt in availableModifiers)return it._applyModifier(availableModifiers[rt],rt);if(rt in customRules)return it._applyRule(customRules[rt],rt);if(rt in availableRules)return it._applyRule(availableRules[rt],rt)}})}function proxylessContext(tt){var et=function(it,ot){return Object.keys(it).forEach(function(at){ot[at]=function(){for(var st=[],lt=arguments.length;lt--;)st[lt]=arguments[lt];var ct=proxylessContext(ot._clone()),ut=ct._applyRule(it[at],at).apply(void 0,st);return ut}}),ot},nt=et(availableRules,tt),rt=et(customRules,nt);return Object.keys(availableModifiers).forEach(function(it){Object.defineProperty(rt,it,{get:function(){var ot=proxylessContext(rt._clone());return ot._applyModifier(availableModifiers[it],it)}})}),rt}var availableModifiers={not:{simple:function(tt){return function(et){return!tt(et)}},async:function(tt){return function(et){return Promise.resolve(tt(et)).then(function(nt){return!nt}).catch(function(){return!0})}}},some:{simple:function(tt){return function(et){return split$1(et).some(function(nt){try{return tt(nt)}catch{return!1}})}},async:function(tt){return function(et){return Promise.all(split$1(et).map(function(nt){try{return tt(nt).catch(function(){return!1})}catch{return!1}})).then(function(nt){return nt.some(Boolean)})}}},every:{simple:function(tt){return function(et){return et!==!1&&split$1(et).every(tt)}},async:function(tt){return function(et){return Promise.all(split$1(et).map(tt)).then(function(nt){return nt.every(Boolean)})}}},strict:{simple:function(tt,et){return function(nt){return isSchemaRule(et)&&nt&&typeof nt=="object"?Object.keys(et.args[0]).length===Object.keys(nt).length&&tt(nt):tt(nt)}},async:function(tt,et){return function(nt){return Promise.resolve(tt(nt)).then(function(rt){return isSchemaRule(et)&&nt&&typeof nt=="object"?Object.keys(et.args[0]).length===Object.keys(nt).length&&rt:rt}).catch(function(){return!1})}}}};function isSchemaRule(tt){return tt&&tt.name==="schema"&&tt.args.length>0&&typeof tt.args[0]=="object"}function split$1(tt){return typeof tt=="string"?tt.split(""):tt}var availableRules={equal:function(tt){return function(et){return et==tt}},exact:function(tt){return function(et){return et===tt}},number:function(tt){return tt===void 0&&(tt=!0),function(et){return typeof et=="number"&&(tt||isFinite(et))}},integer:function(){return function(tt){var et=Number.isInteger||isIntegerPolyfill;return et(tt)}},numeric:function(){return function(tt){return!isNaN(parseFloat(tt))&&isFinite(tt)}},string:function(){return testType("string")},boolean:function(){return testType("boolean")},undefined:function(){return testType("undefined")},null:function(){return testType("null")},array:function(){return testType("array")},object:function(){return testType("object")},instanceOf:function(tt){return function(et){return et instanceof tt}},pattern:function(tt){return function(et){return tt.test(et)}},lowercase:function(){return function(tt){return typeof tt=="boolean"||tt===tt.toLowerCase()&&tt.trim()!==""}},uppercase:function(){return function(tt){return tt===tt.toUpperCase()&&tt.trim()!==""}},vowel:function(){return function(tt){return/^[aeiou]+$/i.test(tt)}},consonant:function(){return function(tt){return/^(?=[^aeiou])([a-z]+)$/i.test(tt)}},first:function(tt){return function(et){return et[0]==tt}},last:function(tt){return function(et){return et[et.length-1]==tt}},empty:function(){return function(tt){return tt.length===0}},length:function(tt,et){return function(nt){return nt.length>=tt&&nt.length<=(et||tt)}},minLength:function(tt){return function(et){return et.length>=tt}},maxLength:function(tt){return function(et){return et.length<=tt}},negative:function(){return function(tt){return tt<0}},positive:function(){return function(tt){return tt>=0}},between:function(tt,et){return function(nt){return nt>=tt&&nt<=et}},range:function(tt,et){return function(nt){return nt>=tt&&nt<=et}},lessThan:function(tt){return function(et){return ettt}},greaterThanOrEqual:function(tt){return function(et){return et>=tt}},even:function(){return function(tt){return tt%2===0}},odd:function(){return function(tt){return tt%2!==0}},includes:function(tt){return function(et){return~et.indexOf(tt)}},schema:function(tt){return testSchema(tt)},passesAnyOf:function(){for(var tt=[],et=arguments.length;et--;)tt[et]=arguments[et];return function(nt){return tt.some(function(rt){return rt.test(nt)})}},optional};function testType(tt){return function(et){return Array.isArray(et)&&tt==="array"||et===null&&tt==="null"||typeof et===tt}}function isIntegerPolyfill(tt){return typeof tt=="number"&&isFinite(tt)&&Math.floor(tt)===tt}function testSchema(tt){return{simple:function(et){var nt=[];if(Object.keys(tt).forEach(function(rt){var it=tt[rt];try{it.check((et||{})[rt])}catch(ot){ot.target=rt,nt.push(ot)}}),nt.length>0)throw nt;return!0},async:function(et){var nt=[],rt=Object.keys(tt).map(function(it){var ot=tt[it];return ot.testAsync((et||{})[it]).catch(function(at){at.target=it,nt.push(at)})});return Promise.all(rt).then(function(){if(nt.length>0)throw nt;return!0})}}}var e$6="colors",t$7="sizes",r$c="space",n$7={gap:r$c,gridGap:r$c,columnGap:r$c,gridColumnGap:r$c,rowGap:r$c,gridRowGap:r$c,inset:r$c,insetBlock:r$c,insetBlockEnd:r$c,insetBlockStart:r$c,insetInline:r$c,insetInlineEnd:r$c,insetInlineStart:r$c,margin:r$c,marginTop:r$c,marginRight:r$c,marginBottom:r$c,marginLeft:r$c,marginBlock:r$c,marginBlockEnd:r$c,marginBlockStart:r$c,marginInline:r$c,marginInlineEnd:r$c,marginInlineStart:r$c,padding:r$c,paddingTop:r$c,paddingRight:r$c,paddingBottom:r$c,paddingLeft:r$c,paddingBlock:r$c,paddingBlockEnd:r$c,paddingBlockStart:r$c,paddingInline:r$c,paddingInlineEnd:r$c,paddingInlineStart:r$c,top:r$c,right:r$c,bottom:r$c,left:r$c,scrollMargin:r$c,scrollMarginTop:r$c,scrollMarginRight:r$c,scrollMarginBottom:r$c,scrollMarginLeft:r$c,scrollMarginX:r$c,scrollMarginY:r$c,scrollMarginBlock:r$c,scrollMarginBlockEnd:r$c,scrollMarginBlockStart:r$c,scrollMarginInline:r$c,scrollMarginInlineEnd:r$c,scrollMarginInlineStart:r$c,scrollPadding:r$c,scrollPaddingTop:r$c,scrollPaddingRight:r$c,scrollPaddingBottom:r$c,scrollPaddingLeft:r$c,scrollPaddingX:r$c,scrollPaddingY:r$c,scrollPaddingBlock:r$c,scrollPaddingBlockEnd:r$c,scrollPaddingBlockStart:r$c,scrollPaddingInline:r$c,scrollPaddingInlineEnd:r$c,scrollPaddingInlineStart:r$c,fontSize:"fontSizes",background:e$6,backgroundColor:e$6,backgroundImage:e$6,borderImage:e$6,border:e$6,borderBlock:e$6,borderBlockEnd:e$6,borderBlockStart:e$6,borderBottom:e$6,borderBottomColor:e$6,borderColor:e$6,borderInline:e$6,borderInlineEnd:e$6,borderInlineStart:e$6,borderLeft:e$6,borderLeftColor:e$6,borderRight:e$6,borderRightColor:e$6,borderTop:e$6,borderTopColor:e$6,caretColor:e$6,color:e$6,columnRuleColor:e$6,fill:e$6,outline:e$6,outlineColor:e$6,stroke:e$6,textDecorationColor:e$6,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:t$7,minBlockSize:t$7,maxBlockSize:t$7,inlineSize:t$7,minInlineSize:t$7,maxInlineSize:t$7,width:t$7,minWidth:t$7,maxWidth:t$7,height:t$7,minHeight:t$7,maxHeight:t$7,flexBasis:t$7,gridTemplateColumns:t$7,gridTemplateRows:t$7,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},i$7=(tt,et)=>typeof et=="function"?{"()":Function.prototype.toString.call(et)}:et,o$2=()=>{const tt=Object.create(null);return(et,nt,...rt)=>{const it=(ot=>JSON.stringify(ot,i$7))(et);return it in tt?tt[it]:tt[it]=nt(et,...rt)}},l$6=Symbol.for("sxs.internal"),s$5=(tt,et)=>Object.defineProperties(tt,Object.getOwnPropertyDescriptors(et)),a$4=tt=>{for(const et in tt)return!0;return!1},{hasOwnProperty:c$9}=Object.prototype,d$6=tt=>tt.includes("-")?tt:tt.replace(/[A-Z]/g,et=>"-"+et.toLowerCase()),g$9=/\s+(?![^()]*\))/,p$9=tt=>et=>tt(...typeof et=="string"?String(et).split(g$9):[et]),u$6={appearance:tt=>({WebkitAppearance:tt,appearance:tt}),backfaceVisibility:tt=>({WebkitBackfaceVisibility:tt,backfaceVisibility:tt}),backdropFilter:tt=>({WebkitBackdropFilter:tt,backdropFilter:tt}),backgroundClip:tt=>({WebkitBackgroundClip:tt,backgroundClip:tt}),boxDecorationBreak:tt=>({WebkitBoxDecorationBreak:tt,boxDecorationBreak:tt}),clipPath:tt=>({WebkitClipPath:tt,clipPath:tt}),content:tt=>({content:tt.includes('"')||tt.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(tt)?tt:`"${tt}"`}),hyphens:tt=>({WebkitHyphens:tt,hyphens:tt}),maskImage:tt=>({WebkitMaskImage:tt,maskImage:tt}),maskSize:tt=>({WebkitMaskSize:tt,maskSize:tt}),tabSize:tt=>({MozTabSize:tt,tabSize:tt}),textSizeAdjust:tt=>({WebkitTextSizeAdjust:tt,textSizeAdjust:tt}),userSelect:tt=>({WebkitUserSelect:tt,userSelect:tt}),marginBlock:p$9((tt,et)=>({marginBlockStart:tt,marginBlockEnd:et||tt})),marginInline:p$9((tt,et)=>({marginInlineStart:tt,marginInlineEnd:et||tt})),maxSize:p$9((tt,et)=>({maxBlockSize:tt,maxInlineSize:et||tt})),minSize:p$9((tt,et)=>({minBlockSize:tt,minInlineSize:et||tt})),paddingBlock:p$9((tt,et)=>({paddingBlockStart:tt,paddingBlockEnd:et||tt})),paddingInline:p$9((tt,et)=>({paddingInlineStart:tt,paddingInlineEnd:et||tt}))},h$a=/([\d.]+)([^]*)/,f$8=(tt,et)=>tt.length?tt.reduce((nt,rt)=>(nt.push(...et.map(it=>it.includes("&")?it.replace(/&/g,/[ +>|~]/.test(rt)&&/&.*&/.test(it)?`:is(${rt})`:rt):rt+" "+it)),nt),[]):et,m$9=(tt,et)=>tt in b$7&&typeof et=="string"?et.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(nt,rt,it,ot)=>rt+(it==="stretch"?`-moz-available${ot};${d$6(tt)}:${rt}-webkit-fill-available`:`-moz-fit-content${ot};${d$6(tt)}:${rt}fit-content`)+ot):String(et),b$7={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},S$3=tt=>tt?tt+"-":"",k$9=(tt,et,nt)=>tt.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,(rt,it,ot,at,st)=>at=="$"==!!ot?rt:(it||at=="--"?"calc(":"")+"var(--"+(at==="$"?S$3(et)+(st.includes("$")?"":S$3(nt))+st.replace(/\$/g,"-"):st)+")"+(it||at=="--"?"*"+(it||"")+(ot||"1")+")":"")),y$8=/\s*,\s*(?![^()]*\))/,B$1=Object.prototype.toString,$$3=(tt,et,nt,rt,it)=>{let ot,at,st;const lt=(ct,ut,ht)=>{let dt,pt;const mt=gt=>{for(dt in gt){const vt=dt.charCodeAt(0)===64,xt=vt&&Array.isArray(gt[dt])?gt[dt]:[gt[dt]];for(pt of xt){const kt=/[A-Z]/.test(bt=dt)?bt:bt.replace(/-[^]/g,Tt=>Tt[1].toUpperCase()),St=typeof pt=="object"&&pt&&pt.toString===B$1&&(!rt.utils[kt]||!ut.length);if(kt in rt.utils&&!St){const Tt=rt.utils[kt];if(Tt!==at){at=Tt,mt(Tt(pt)),at=null;continue}}else if(kt in u$6){const Tt=u$6[kt];if(Tt!==st){st=Tt,mt(Tt(pt)),st=null;continue}}if(vt&&(yt=dt.slice(1)in rt.media?"@media "+rt.media[dt.slice(1)]:dt,dt=yt.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(Tt,At,Et,$t,Dt,jt)=>{const Pt=h$a.test(At),Ct=.0625*(Pt?-1:1),[wt,It]=Pt?[$t,At]:[At,$t];return"("+(Et[0]==="="?"":Et[0]===">"===Pt?"max-":"min-")+wt+":"+(Et[0]!=="="&&Et.length===1?It.replace(h$a,(Ot,Wt,zt)=>Number(Wt)+Ct*(Et===">"?1:-1)+zt):It)+(Dt?") and ("+(Dt[0]===">"?"min-":"max-")+wt+":"+(Dt.length===1?jt.replace(h$a,(Ot,Wt,zt)=>Number(Wt)+Ct*(Dt===">"?-1:1)+zt):jt):"")+")"})),St){const Tt=vt?ht.concat(dt):[...ht],At=vt?[...ut]:f$8(ut,dt.split(y$8));ot!==void 0&&it(x$8(...ot)),ot=void 0,lt(pt,At,Tt)}else ot===void 0&&(ot=[[],ut,ht]),dt=vt||dt.charCodeAt(0)!==36?dt:`--${S$3(rt.prefix)}${dt.slice(1).replace(/\$/g,"-")}`,pt=St?pt:typeof pt=="number"?pt&&kt in I$3?String(pt)+"px":String(pt):k$9(m$9(kt,pt??""),rt.prefix,rt.themeMap[kt]),ot[0].push(`${vt?`${dt} `:`${d$6(dt)}:`}${pt}`)}}var yt,bt};mt(ct),ot!==void 0&&it(x$8(...ot)),ot=void 0};lt(tt,et,nt)},x$8=(tt,et,nt)=>`${nt.map(rt=>`${rt}{`).join("")}${et.length?`${et.join(",")}{`:""}${tt.join(";")}${et.length?"}":""}${Array(nt.length?nt.length+1:0).join("}")}`,I$3={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},R$1=tt=>String.fromCharCode(tt+(tt>25?39:97)),z$6=tt=>(et=>{let nt,rt="";for(nt=Math.abs(et);nt>52;nt=nt/52|0)rt=R$1(nt%52)+rt;return R$1(nt%52)+rt})(((et,nt)=>{let rt=nt.length;for(;rt;)et=33*et^nt.charCodeAt(--rt);return et})(5381,JSON.stringify(tt))>>>0),W$7=["themed","global","styled","onevar","resonevar","allvar","inline"],j$2=tt=>{if(tt.href&&!tt.href.startsWith(location.origin))return!1;try{return!!tt.cssRules}catch{return!1}},E$1=tt=>{let et;const nt=()=>{const{cssRules:it}=et.sheet;return[].map.call(it,(ot,at)=>{const{cssText:st}=ot;let lt="";if(st.startsWith("--sxs"))return"";if(it[at-1]&&(lt=it[at-1].cssText).startsWith("--sxs")){if(!ot.cssRules.length)return"";for(const ct in et.rules)if(et.rules[ct].group===ot)return`--sxs{--sxs:${[...et.rules[ct].cache].join(" ")}}${st}`;return ot.cssRules.length?`${lt}${st}`:""}return st}).join("")},rt=()=>{if(et){const{rules:st,sheet:lt}=et;if(!lt.deleteRule){for(;Object(Object(lt.cssRules)[0]).type===3;)lt.cssRules.splice(0,1);lt.cssRules=[]}for(const ct in st)delete st[ct]}const it=Object(tt).styleSheets||[];for(const st of it)if(j$2(st)){for(let lt=0,ct=st.cssRules;ct[lt];++lt){const ut=Object(ct[lt]);if(ut.type!==1)continue;const ht=Object(ct[lt+1]);if(ht.type!==4)continue;++lt;const{cssText:dt}=ut;if(!dt.startsWith("--sxs"))continue;const pt=dt.slice(14,-3).trim().split(/\s+/),mt=W$7[pt[0]];mt&&(et||(et={sheet:st,reset:rt,rules:{},toString:nt}),et.rules[mt]={group:ht,index:lt,cache:new Set(pt)})}if(et)break}if(!et){const st=(lt,ct)=>({type:ct,cssRules:[],insertRule(ut,ht){this.cssRules.splice(ht,0,st(ut,{import:3,undefined:1}[(ut.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return lt==="@media{}"?`@media{${[].map.call(this.cssRules,ut=>ut.cssText).join("")}}`:lt}});et={sheet:tt?(tt.head||tt).appendChild(document.createElement("style")).sheet:st("","text/css"),rules:{},reset:rt,toString:nt}}const{sheet:ot,rules:at}=et;for(let st=W$7.length-1;st>=0;--st){const lt=W$7[st];if(!at[lt]){const ct=W$7[st+1],ut=at[ct]?at[ct].index:ot.cssRules.length;ot.insertRule("@media{}",ut),ot.insertRule(`--sxs{--sxs:${st}}`,ut),at[lt]={group:ot.cssRules[ut+1],index:ut,cache:new Set([st])}}v$9(at[lt])}};return rt(),et},v$9=tt=>{const et=tt.group;let nt=et.cssRules.length;tt.apply=rt=>{try{et.insertRule(rt,nt),++nt}catch{}}},T$2=Symbol(),w$6=o$2(),M$2=(tt,et)=>w$6(tt,()=>(...nt)=>{let rt={type:null,composers:new Set};for(const it of nt)if(it!=null)if(it[l$6]){rt.type==null&&(rt.type=it[l$6].type);for(const ot of it[l$6].composers)rt.composers.add(ot)}else it.constructor!==Object||it.$$typeof?rt.type==null&&(rt.type=it):rt.composers.add(C$1(it,tt));return rt.type==null&&(rt.type="span"),rt.composers.size||rt.composers.add(["PJLV",{},[],[],{},[]]),P$3(tt,rt,et)}),C$1=({variants:tt,compoundVariants:et,defaultVariants:nt,...rt},it)=>{const ot=`${S$3(it.prefix)}c-${z$6(rt)}`,at=[],st=[],lt=Object.create(null),ct=[];for(const dt in nt)lt[dt]=String(nt[dt]);if(typeof tt=="object"&&tt)for(const dt in tt){ut=lt,ht=dt,c$9.call(ut,ht)||(lt[dt]="undefined");const pt=tt[dt];for(const mt in pt){const gt={[dt]:String(mt)};String(mt)==="undefined"&&ct.push(dt);const yt=pt[mt],bt=[gt,yt,!a$4(yt)];at.push(bt)}}var ut,ht;if(typeof et=="object"&&et)for(const dt of et){let{css:pt,...mt}=dt;pt=typeof pt=="object"&&pt||{};for(const yt in mt)mt[yt]=String(mt[yt]);const gt=[mt,pt,!a$4(pt)];st.push(gt)}return[ot,rt,at,st,lt,ct]},P$3=(tt,et,nt)=>{const[rt,it,ot,at]=L$2(et.composers),st=typeof et.type=="function"||et.type.$$typeof?(ht=>{function dt(){for(let pt=0;ptdt.rules[pt]={apply:mt=>dt[T$2].push([pt,mt])}),dt})(nt):null,lt=(st||nt).rules,ct=`.${rt}${it.length>1?`:where(.${it.slice(1).join(".")})`:""}`,ut=ht=>{ht=typeof ht=="object"&&ht||A$2;const{css:dt,...pt}=ht,mt={};for(const bt in ot)if(delete pt[bt],bt in ht){let vt=ht[bt];typeof vt=="object"&&vt?mt[bt]={"@initial":ot[bt],...vt}:(vt=String(vt),mt[bt]=vt!=="undefined"||at.has(bt)?vt:ot[bt])}else mt[bt]=ot[bt];const gt=new Set([...it]);for(const[bt,vt,xt,kt]of et.composers){nt.rules.styled.cache.has(bt)||(nt.rules.styled.cache.add(bt),$$3(vt,[`.${bt}`],[],tt,At=>{lt.styled.apply(At)}));const St=O(xt,mt,tt.media),Tt=O(kt,mt,tt.media,!0);for(const At of St)if(At!==void 0)for(const[Et,$t,Dt]of At){const jt=`${bt}-${z$6($t)}-${Et}`;gt.add(jt);const Pt=(Dt?nt.rules.resonevar:nt.rules.onevar).cache,Ct=Dt?lt.resonevar:lt.onevar;Pt.has(jt)||(Pt.add(jt),$$3($t,[`.${jt}`],[],tt,wt=>{Ct.apply(wt)}))}for(const At of Tt)if(At!==void 0)for(const[Et,$t]of At){const Dt=`${bt}-${z$6($t)}-${Et}`;gt.add(Dt),nt.rules.allvar.cache.has(Dt)||(nt.rules.allvar.cache.add(Dt),$$3($t,[`.${Dt}`],[],tt,jt=>{lt.allvar.apply(jt)}))}}if(typeof dt=="object"&&dt){const bt=`${rt}-i${z$6(dt)}-css`;gt.add(bt),nt.rules.inline.cache.has(bt)||(nt.rules.inline.cache.add(bt),$$3(dt,[`.${bt}`],[],tt,vt=>{lt.inline.apply(vt)}))}for(const bt of String(ht.className||"").trim().split(/\s+/))bt&>.add(bt);const yt=pt.className=[...gt].join(" ");return{type:et.type,className:yt,selector:ct,props:pt,toString:()=>yt,deferredInjector:st}};return s$5(ut,{className:rt,selector:ct,[l$6]:et,toString:()=>(nt.rules.styled.cache.has(rt)||ut(),rt)})},L$2=tt=>{let et="";const nt=[],rt={},it=[];for(const[ot,,,,at,st]of tt){et===""&&(et=ot),nt.push(ot),it.push(...st);for(const lt in at){const ct=at[lt];(rt[lt]===void 0||ct!=="undefined"||st.includes(ct))&&(rt[lt]=ct)}}return[et,nt,rt,new Set(it)]},O=(tt,et,nt,rt)=>{const it=[];e:for(let[ot,at,st]of tt){if(st)continue;let lt,ct=0,ut=!1;for(lt in ot){const ht=ot[lt];let dt=et[lt];if(dt!==ht){if(typeof dt!="object"||!dt)continue e;{let pt,mt,gt=0;for(const yt in dt){if(ht===String(dt[yt])){if(yt!=="@initial"){const bt=yt.slice(1);(mt=mt||[]).push(bt in nt?nt[bt]:yt.replace(/^@media ?/,"")),ut=!0}ct+=gt,pt=!0}++gt}if(mt&&mt.length&&(at={["@media "+mt.join(", ")]:at}),!pt)continue e}}}(it[ct]=it[ct]||[]).push([rt?"cv":`${lt}-${ot[lt]}`,at,ut])}return it},A$2={},N$2=o$2(),D$1=(tt,et)=>N$2(tt,()=>(...nt)=>{const rt=()=>{for(let it of nt){it=typeof it=="object"&&it||{};let ot=z$6(it);if(!et.rules.global.cache.has(ot)){if(et.rules.global.cache.add(ot),"@import"in it){let at=[].indexOf.call(et.sheet.cssRules,et.rules.themed.group)-1;for(let st of[].concat(it["@import"]))st=st.includes('"')||st.includes("'")?st:`"${st}"`,et.sheet.insertRule(`@import ${st};`,at++);delete it["@import"]}$$3(it,[],[],tt,at=>{et.rules.global.apply(at)})}}return""};return s$5(rt,{toString:rt})}),H$2=o$2(),V$3=(tt,et)=>H$2(tt,()=>nt=>{const rt=`${S$3(tt.prefix)}k-${z$6(nt)}`,it=()=>{if(!et.rules.global.cache.has(rt)){et.rules.global.cache.add(rt);const ot=[];$$3(nt,[],[],tt,st=>ot.push(st));const at=`@keyframes ${rt}{${ot.join("")}}`;et.rules.global.apply(at)}return rt};return s$5(it,{get name(){return it()},toString:it})}),G$2=class{constructor(et,nt,rt,it){this.token=et==null?"":String(et),this.value=nt==null?"":String(nt),this.scale=rt==null?"":String(rt),this.prefix=it==null?"":String(it)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+S$3(this.prefix)+S$3(this.scale)+this.token}toString(){return this.computedValue}},F$2=o$2(),J$2=(tt,et)=>F$2(tt,()=>(nt,rt)=>{rt=typeof nt=="object"&&nt||Object(rt);const it=`.${nt=(nt=typeof nt=="string"?nt:"")||`${S$3(tt.prefix)}t-${z$6(rt)}`}`,ot={},at=[];for(const lt in rt){ot[lt]={};for(const ct in rt[lt]){const ut=`--${S$3(tt.prefix)}${lt}-${ct}`,ht=k$9(String(rt[lt][ct]),tt.prefix,lt);ot[lt][ct]=new G$2(ct,ht,lt,tt.prefix),at.push(`${ut}:${ht}`)}}const st=()=>{if(at.length&&!et.rules.themed.cache.has(nt)){et.rules.themed.cache.add(nt);const lt=`${rt===tt.theme?":root,":""}.${nt}{${at.join(";")}}`;et.rules.themed.apply(lt)}return nt};return{...ot,get className(){return st()},selector:it,toString:st}}),U$2=o$2(),X$1,Y$2=o$2(),q$7=tt=>{const et=(nt=>{let rt=!1;const it=U$2(nt,ot=>{rt=!0;const at="prefix"in(ot=typeof ot=="object"&&ot||{})?String(ot.prefix):"",st=typeof ot.media=="object"&&ot.media||{},lt=typeof ot.root=="object"?ot.root||null:globalThis.document||null,ct=typeof ot.theme=="object"&&ot.theme||{},ut={prefix:at,media:st,theme:ct,themeMap:typeof ot.themeMap=="object"&&ot.themeMap||{...n$7},utils:typeof ot.utils=="object"&&ot.utils||{}},ht=E$1(lt),dt={css:M$2(ut,ht),globalCss:D$1(ut,ht),keyframes:V$3(ut,ht),createTheme:J$2(ut,ht),reset(){ht.reset(),dt.theme.toString()},theme:{},sheet:ht,config:ut,prefix:at,getCssText:ht.toString,toString:ht.toString};return String(dt.theme=dt.createTheme(ct)),dt});return rt||it.reset(),it})(tt);return et.styled=(({config:nt,sheet:rt})=>Y$2(nt,()=>{const it=M$2(nt,rt);return(...ot)=>{const at=it(...ot),st=at[l$6].type,lt=React$1.forwardRef((ct,ut)=>{const ht=ct&&ct.as||st,{props:dt,deferredInjector:pt}=at(ct);return delete dt.as,dt.ref=ut,pt?React$1.createElement(React$1.Fragment,null,React$1.createElement(ht,dt),React$1.createElement(pt,null)):React$1.createElement(ht,dt)});return lt.className=at.className,lt.displayName=`Styled.${st.displayName||st.name||st}`,lt.selector=at.selector,lt.toString=()=>at.selector,lt[l$6]=at[l$6],lt}}))(et),et},K$6=()=>X$1||(X$1=q$7()),re$4=(...tt)=>K$6().styled(...tt);function clamp$a(tt,et,nt){return Math.max(et,Math.min(tt,nt))}const V$2={toVector(tt,et){return tt===void 0&&(tt=et),Array.isArray(tt)?tt:[tt,tt]},add(tt,et){return[tt[0]+et[0],tt[1]+et[1]]},sub(tt,et){return[tt[0]-et[0],tt[1]-et[1]]},addTo(tt,et){tt[0]+=et[0],tt[1]+=et[1]},subTo(tt,et){tt[0]-=et[0],tt[1]-=et[1]}};function rubberband(tt,et,nt){return et===0||Math.abs(et)===1/0?Math.pow(tt,nt*5):tt*et*nt/(et+nt*tt)}function rubberbandIfOutOfBounds(tt,et,nt,rt=.15){return rt===0?clamp$a(tt,et,nt):ttnt?+rubberband(tt-nt,nt-et,rt)+nt:tt}function computeRubberband(tt,[et,nt],[rt,it]){const[[ot,at],[st,lt]]=tt;return[rubberbandIfOutOfBounds(et,ot,at,rt),rubberbandIfOutOfBounds(nt,st,lt,it)]}function _toPrimitive$C(tt,et){if(typeof tt!="object"||tt===null)return tt;var nt=tt[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(tt,et||"default");if(typeof rt!="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(tt)}function _toPropertyKey$C(tt){var et=_toPrimitive$C(tt,"string");return typeof et=="symbol"?et:String(et)}function _defineProperty$H(tt,et,nt){return et=_toPropertyKey$C(et),et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function ownKeys$F(tt,et){var nt=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);et&&(rt=rt.filter(function(it){return Object.getOwnPropertyDescriptor(tt,it).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread2$2(tt){for(var et=1;et{var nt,rt;return et.target===tt.currentTarget||((nt=tt.currentTarget)===null||nt===void 0||(rt=nt.contains)===null||rt===void 0?void 0:rt.call(nt,et.target))})}function getTouchList(tt){return tt.type==="touchend"||tt.type==="touchcancel"?tt.changedTouches:tt.targetTouches}function getValueEvent(tt){return isTouch$1(tt)?getTouchList(tt)[0]:tt}function touchIds(tt){return getCurrentTargetTouchList(tt).map(et=>et.identifier)}function pointerId(tt){const et=getValueEvent(tt);return isTouch$1(tt)?et.identifier:et.pointerId}function pointerValues(tt){const et=getValueEvent(tt);return[et.clientX,et.clientY]}function getEventDetails(tt){const et={};if("buttons"in tt&&(et.buttons=tt.buttons),"shiftKey"in tt){const{shiftKey:nt,altKey:rt,metaKey:it,ctrlKey:ot}=tt;Object.assign(et,{shiftKey:nt,altKey:rt,metaKey:it,ctrlKey:ot})}return et}function call$2(tt,...et){return typeof tt=="function"?tt(...et):tt}function noop$b(){}function chain(...tt){return tt.length===0?noop$b:tt.length===1?tt[0]:function(){let et;for(const nt of tt)et=nt.apply(this,arguments)||et;return et}}function assignDefault(tt,et){return Object.assign({},et,tt||{})}const BEFORE_LAST_KINEMATICS_DELAY=32;class Engine{constructor(et,nt,rt){this.ctrl=et,this.args=nt,this.key=rt,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(et){this.ctrl.state[this.key]=et}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:et,shared:nt,ingKey:rt,args:it}=this;nt[rt]=et._active=et.active=et._blocked=et._force=!1,et._step=[!1,!1],et.intentional=!1,et._movement=[0,0],et._distance=[0,0],et._direction=[0,0],et._delta=[0,0],et._bounds=[[-1/0,1/0],[-1/0,1/0]],et.args=it,et.axis=void 0,et.memo=void 0,et.elapsedTime=et.timeDelta=0,et.direction=[0,0],et.distance=[0,0],et.overflow=[0,0],et._movementBound=[!1,!1],et.velocity=[0,0],et.movement=[0,0],et.delta=[0,0],et.timeStamp=0}start(et){const nt=this.state,rt=this.config;nt._active||(this.reset(),this.computeInitial(),nt._active=!0,nt.target=et.target,nt.currentTarget=et.currentTarget,nt.lastOffset=rt.from?call$2(rt.from,nt):nt.offset,nt.offset=nt.lastOffset,nt.startTime=nt.timeStamp=et.timeStamp)}computeValues(et){const nt=this.state;nt._values=et,nt.values=this.config.transform(et)}computeInitial(){const et=this.state;et._initial=et._values,et.initial=et.values}compute(et){const{state:nt,config:rt,shared:it}=this;nt.args=this.args;let ot=0;if(et&&(nt.event=et,rt.preventDefault&&et.cancelable&&nt.event.preventDefault(),nt.type=et.type,it.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,it.locked=!!document.pointerLockElement,Object.assign(it,getEventDetails(et)),it.down=it.pressed=it.buttons%2===1||it.touches>0,ot=et.timeStamp-nt.timeStamp,nt.timeStamp=et.timeStamp,nt.elapsedTime=nt.timeStamp-nt.startTime),nt._active){const Tt=nt._delta.map(Math.abs);V$2.addTo(nt._distance,Tt)}this.axisIntent&&this.axisIntent(et);const[at,st]=nt._movement,[lt,ct]=rt.threshold,{_step:ut,values:ht}=nt;if(rt.hasCustomTransform?(ut[0]===!1&&(ut[0]=Math.abs(at)>=lt&&ht[0]),ut[1]===!1&&(ut[1]=Math.abs(st)>=ct&&ht[1])):(ut[0]===!1&&(ut[0]=Math.abs(at)>=lt&&Math.sign(at)*lt),ut[1]===!1&&(ut[1]=Math.abs(st)>=ct&&Math.sign(st)*ct)),nt.intentional=ut[0]!==!1||ut[1]!==!1,!nt.intentional)return;const dt=[0,0];if(rt.hasCustomTransform){const[Tt,At]=ht;dt[0]=ut[0]!==!1?Tt-ut[0]:0,dt[1]=ut[1]!==!1?At-ut[1]:0}else dt[0]=ut[0]!==!1?at-ut[0]:0,dt[1]=ut[1]!==!1?st-ut[1]:0;this.restrictToAxis&&!nt._blocked&&this.restrictToAxis(dt);const pt=nt.offset,mt=nt._active&&!nt._blocked||nt.active;mt&&(nt.first=nt._active&&!nt.active,nt.last=!nt._active&&nt.active,nt.active=it[this.ingKey]=nt._active,et&&(nt.first&&("bounds"in rt&&(nt._bounds=call$2(rt.bounds,nt)),this.setup&&this.setup()),nt.movement=dt,this.computeOffset()));const[gt,yt]=nt.offset,[[bt,vt],[xt,kt]]=nt._bounds;nt.overflow=[gtvt?1:0,ytkt?1:0],nt._movementBound[0]=nt.overflow[0]?nt._movementBound[0]===!1?nt._movement[0]:nt._movementBound[0]:!1,nt._movementBound[1]=nt.overflow[1]?nt._movementBound[1]===!1?nt._movement[1]:nt._movementBound[1]:!1;const St=nt._active?rt.rubberband||[0,0]:[0,0];if(nt.offset=computeRubberband(nt._bounds,nt.offset,St),nt.delta=V$2.sub(nt.offset,pt),this.computeMovement(),mt&&(!nt.last||ot>BEFORE_LAST_KINEMATICS_DELAY)){nt.delta=V$2.sub(nt.offset,pt);const Tt=nt.delta.map(Math.abs);V$2.addTo(nt.distance,Tt),nt.direction=nt.delta.map(Math.sign),nt._direction=nt._delta.map(Math.sign),!nt.first&&ot>0&&(nt.velocity=[Tt[0]/ot,Tt[1]/ot],nt.timeDelta=ot)}}emit(){const et=this.state,nt=this.shared,rt=this.config;if(et._active||this.clean(),(et._blocked||!et.intentional)&&!et._force&&!rt.triggerAllEvents)return;const it=this.handler(_objectSpread2$2(_objectSpread2$2(_objectSpread2$2({},nt),et),{},{[this.aliasKey]:et.values}));it!==void 0&&(et.memo=it)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function selectAxis([tt,et],nt){const rt=Math.abs(tt),it=Math.abs(et);if(rt>it&&rt>nt)return"x";if(it>rt&&it>nt)return"y"}class CoordinatesEngine extends Engine{constructor(...et){super(...et),_defineProperty$H(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=V$2.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=V$2.sub(this.state.offset,this.state.lastOffset)}axisIntent(et){const nt=this.state,rt=this.config;if(!nt.axis&&et){const it=typeof rt.axisThreshold=="object"?rt.axisThreshold[getPointerType(et)]:rt.axisThreshold;nt.axis=selectAxis(nt._movement,it)}nt._blocked=(rt.lockDirection||!!rt.axis)&&!nt.axis||!!rt.axis&&rt.axis!==nt.axis}restrictToAxis(et){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":et[1]=0;break;case"y":et[0]=0;break}}}const identity$e=tt=>tt,DEFAULT_RUBBERBAND=.15,commonConfigResolver={enabled(tt=!0){return tt},eventOptions(tt,et,nt){return _objectSpread2$2(_objectSpread2$2({},nt.shared.eventOptions),tt)},preventDefault(tt=!1){return tt},triggerAllEvents(tt=!1){return tt},rubberband(tt=0){switch(tt){case!0:return[DEFAULT_RUBBERBAND,DEFAULT_RUBBERBAND];case!1:return[0,0];default:return V$2.toVector(tt)}},from(tt){if(typeof tt=="function")return tt;if(tt!=null)return V$2.toVector(tt)},transform(tt,et,nt){const rt=tt||nt.shared.transform;return this.hasCustomTransform=!!rt,rt||identity$e},threshold(tt){return V$2.toVector(tt,0)}},DEFAULT_AXIS_THRESHOLD=0,coordinatesConfigResolver=_objectSpread2$2(_objectSpread2$2({},commonConfigResolver),{},{axis(tt,et,{axis:nt}){if(this.lockDirection=nt==="lock",!this.lockDirection)return nt},axisThreshold(tt=DEFAULT_AXIS_THRESHOLD){return tt},bounds(tt={}){if(typeof tt=="function")return ot=>coordinatesConfigResolver.bounds(tt(ot));if("current"in tt)return()=>tt.current;if(typeof HTMLElement=="function"&&tt instanceof HTMLElement)return tt;const{left:et=-1/0,right:nt=1/0,top:rt=-1/0,bottom:it=1/0}=tt;return[[et,nt],[rt,it]]}}),KEYS_DELTA_MAP={ArrowRight:(tt,et=1)=>[tt*et,0],ArrowLeft:(tt,et=1)=>[-1*tt*et,0],ArrowUp:(tt,et=1)=>[0,-1*tt*et],ArrowDown:(tt,et=1)=>[0,tt*et]};class DragEngine extends CoordinatesEngine{constructor(...et){super(...et),_defineProperty$H(this,"ingKey","dragging")}reset(){super.reset();const et=this.state;et._pointerId=void 0,et._pointerActive=!1,et._keyboardActive=!1,et._preventScroll=!1,et._delayed=!1,et.swipe=[0,0],et.tap=!1,et.canceled=!1,et.cancel=this.cancel.bind(this)}setup(){const et=this.state;if(et._bounds instanceof HTMLElement){const nt=et._bounds.getBoundingClientRect(),rt=et.currentTarget.getBoundingClientRect(),it={left:nt.left-rt.left+et.offset[0],right:nt.right-rt.right+et.offset[0],top:nt.top-rt.top+et.offset[1],bottom:nt.bottom-rt.bottom+et.offset[1]};et._bounds=coordinatesConfigResolver.bounds(it)}}cancel(){const et=this.state;et.canceled||(et.canceled=!0,et._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(et){const nt=this.config,rt=this.state;if(et.buttons!=null&&(Array.isArray(nt.pointerButtons)?!nt.pointerButtons.includes(et.buttons):nt.pointerButtons!==-1&&nt.pointerButtons!==et.buttons))return;const it=this.ctrl.setEventIds(et);nt.pointerCapture&&et.target.setPointerCapture(et.pointerId),!(it&&it.size>1&&rt._pointerActive)&&(this.start(et),this.setupPointer(et),rt._pointerId=pointerId(et),rt._pointerActive=!0,this.computeValues(pointerValues(et)),this.computeInitial(),nt.preventScrollAxis&&getPointerType(et)!=="mouse"?(rt._active=!1,this.setupScrollPrevention(et)):nt.delay>0?(this.setupDelayTrigger(et),nt.triggerAllEvents&&(this.compute(et),this.emit())):this.startPointerDrag(et))}startPointerDrag(et){const nt=this.state;nt._active=!0,nt._preventScroll=!0,nt._delayed=!1,this.compute(et),this.emit()}pointerMove(et){const nt=this.state,rt=this.config;if(!nt._pointerActive)return;const it=pointerId(et);if(nt._pointerId!==void 0&&it!==nt._pointerId)return;const ot=pointerValues(et);if(document.pointerLockElement===et.target?nt._delta=[et.movementX,et.movementY]:(nt._delta=V$2.sub(ot,nt._values),this.computeValues(ot)),V$2.addTo(nt._movement,nt._delta),this.compute(et),nt._delayed&&nt.intentional){this.timeoutStore.remove("dragDelay"),nt.active=!1,this.startPointerDrag(et);return}if(rt.preventScrollAxis&&!nt._preventScroll)if(nt.axis)if(nt.axis===rt.preventScrollAxis||rt.preventScrollAxis==="xy"){nt._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(et);return}else return;this.emit()}pointerUp(et){this.ctrl.setEventIds(et);try{this.config.pointerCapture&&et.target.hasPointerCapture(et.pointerId)&&et.target.releasePointerCapture(et.pointerId)}catch{}const nt=this.state,rt=this.config;if(!nt._active||!nt._pointerActive)return;const it=pointerId(et);if(nt._pointerId!==void 0&&it!==nt._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(et);const[ot,at]=nt._distance;if(nt.tap=ot<=rt.tapsThreshold&&at<=rt.tapsThreshold,nt.tap&&rt.filterTaps)nt._force=!0;else{const[st,lt]=nt._delta,[ct,ut]=nt._movement,[ht,dt]=rt.swipe.velocity,[pt,mt]=rt.swipe.distance,gt=rt.swipe.duration;if(nt.elapsedTimeht&&Math.abs(ct)>pt&&(nt.swipe[0]=Math.sign(st)),bt>dt&&Math.abs(ut)>mt&&(nt.swipe[1]=Math.sign(lt))}}this.emit()}pointerClick(et){!this.state.tap&&et.detail>0&&(et.preventDefault(),et.stopPropagation())}setupPointer(et){const nt=this.config,rt=nt.device;nt.pointerLock&&et.currentTarget.requestPointerLock(),nt.pointerCapture||(this.eventStore.add(this.sharedConfig.window,rt,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,rt,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,rt,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(et){this.state._preventScroll&&et.cancelable&&et.preventDefault()}setupScrollPrevention(et){this.state._preventScroll=!1,persistEvent(et);const nt=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",nt),this.eventStore.add(this.sharedConfig.window,"touch","cancel",nt),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,et)}setupDelayTrigger(et){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(et)},this.config.delay)}keyDown(et){const nt=KEYS_DELTA_MAP[et.key];if(nt){const rt=this.state,it=et.shiftKey?10:et.altKey?.1:1;this.start(et),rt._delta=nt(this.config.keyboardDisplacement,it),rt._keyboardActive=!0,V$2.addTo(rt._movement,rt._delta),this.compute(et),this.emit()}}keyUp(et){et.key in KEYS_DELTA_MAP&&(this.state._keyboardActive=!1,this.setActive(),this.compute(et),this.emit())}bind(et){const nt=this.config.device;et(nt,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(et(nt,"change",this.pointerMove.bind(this)),et(nt,"end",this.pointerUp.bind(this)),et(nt,"cancel",this.pointerUp.bind(this)),et("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(et("key","down",this.keyDown.bind(this)),et("key","up",this.keyUp.bind(this))),this.config.filterTaps&&et("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function persistEvent(tt){"persist"in tt&&typeof tt.persist=="function"&&tt.persist()}const isBrowser$2=typeof window<"u"&&window.document&&window.document.createElement;function supportsTouchEvents(){return isBrowser$2&&"ontouchstart"in window}function isTouchScreen(){return supportsTouchEvents()||isBrowser$2&&window.navigator.maxTouchPoints>1}function supportsPointerEvents(){return isBrowser$2&&"onpointerdown"in window}function supportsPointerLock(){return isBrowser$2&&"exitPointerLock"in window.document}function supportsGestureEvents(){try{return"constructor"in GestureEvent}catch{return!1}}const SUPPORT={isBrowser:isBrowser$2,gesture:supportsGestureEvents(),touch:supportsTouchEvents(),touchscreen:isTouchScreen(),pointer:supportsPointerEvents(),pointerLock:supportsPointerLock()},DEFAULT_PREVENT_SCROLL_DELAY=250,DEFAULT_DRAG_DELAY=180,DEFAULT_SWIPE_VELOCITY=.5,DEFAULT_SWIPE_DISTANCE=50,DEFAULT_SWIPE_DURATION=250,DEFAULT_KEYBOARD_DISPLACEMENT=10,DEFAULT_DRAG_AXIS_THRESHOLD={mouse:0,touch:0,pen:8},dragConfigResolver=_objectSpread2$2(_objectSpread2$2({},coordinatesConfigResolver),{},{device(tt,et,{pointer:{touch:nt=!1,lock:rt=!1,mouse:it=!1}={}}){return this.pointerLock=rt&&SUPPORT.pointerLock,SUPPORT.touch&&nt?"touch":this.pointerLock?"mouse":SUPPORT.pointer&&!it?"pointer":SUPPORT.touch?"touch":"mouse"},preventScrollAxis(tt,et,{preventScroll:nt}){if(this.preventScrollDelay=typeof nt=="number"?nt:nt||nt===void 0&&tt?DEFAULT_PREVENT_SCROLL_DELAY:void 0,!(!SUPPORT.touchscreen||nt===!1))return tt||(nt!==void 0?"y":void 0)},pointerCapture(tt,et,{pointer:{capture:nt=!0,buttons:rt=1,keys:it=!0}={}}){return this.pointerButtons=rt,this.keys=it,!this.pointerLock&&this.device==="pointer"&&nt},threshold(tt,et,{filterTaps:nt=!1,tapsThreshold:rt=3,axis:it=void 0}){const ot=V$2.toVector(tt,nt?rt:it?1:0);return this.filterTaps=nt,this.tapsThreshold=rt,ot},swipe({velocity:tt=DEFAULT_SWIPE_VELOCITY,distance:et=DEFAULT_SWIPE_DISTANCE,duration:nt=DEFAULT_SWIPE_DURATION}={}){return{velocity:this.transform(V$2.toVector(tt)),distance:this.transform(V$2.toVector(et)),duration:nt}},delay(tt=0){switch(tt){case!0:return DEFAULT_DRAG_DELAY;case!1:return 0;default:return tt}},axisThreshold(tt){return tt?_objectSpread2$2(_objectSpread2$2({},DEFAULT_DRAG_AXIS_THRESHOLD),tt):DEFAULT_DRAG_AXIS_THRESHOLD},keyboardDisplacement(tt=DEFAULT_KEYBOARD_DISPLACEMENT){return tt}});_objectSpread2$2(_objectSpread2$2({},commonConfigResolver),{},{device(tt,et,{shared:nt,pointer:{touch:rt=!1}={}}){if(nt.target&&!SUPPORT.touch&&SUPPORT.gesture)return"gesture";if(SUPPORT.touch&&rt)return"touch";if(SUPPORT.touchscreen){if(SUPPORT.pointer)return"pointer";if(SUPPORT.touch)return"touch"}},bounds(tt,et,{scaleBounds:nt={},angleBounds:rt={}}){const it=at=>{const st=assignDefault(call$2(nt,at),{min:-1/0,max:1/0});return[st.min,st.max]},ot=at=>{const st=assignDefault(call$2(rt,at),{min:-1/0,max:1/0});return[st.min,st.max]};return typeof nt!="function"&&typeof rt!="function"?[it(),ot()]:at=>[it(at),ot(at)]},threshold(tt,et,nt){return this.lockDirection=nt.axis==="lock",V$2.toVector(tt,this.lockDirection?[.1,3]:0)},modifierKey(tt){return tt===void 0?"ctrlKey":tt},pinchOnWheel(tt=!0){return tt}});_objectSpread2$2(_objectSpread2$2({},coordinatesConfigResolver),{},{mouseOnly:(tt=!0)=>tt});_objectSpread2$2(_objectSpread2$2({},coordinatesConfigResolver),{},{mouseOnly:(tt=!0)=>tt});const EngineMap=new Map,ConfigResolverMap=new Map;function registerAction(tt){EngineMap.set(tt.key,tt.engine),ConfigResolverMap.set(tt.key,tt.resolver)}const dragAction={key:"drag",engine:DragEngine,resolver:dragConfigResolver};function _objectWithoutPropertiesLoose$p(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function _objectWithoutProperties$m(tt,et){if(tt==null)return{};var nt=_objectWithoutPropertiesLoose$p(tt,et),rt,it;if(Object.getOwnPropertySymbols){var ot=Object.getOwnPropertySymbols(tt);for(it=0;it=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}const sharedConfigResolver={target(tt){if(tt)return()=>"current"in tt?tt.current:tt},enabled(tt=!0){return tt},window(tt=SUPPORT.isBrowser?window:void 0){return tt},eventOptions({passive:tt=!0,capture:et=!1}={}){return{passive:tt,capture:et}},transform(tt){return tt}},_excluded$1N=["target","eventOptions","window","enabled","transform"];function resolveWith(tt={},et){const nt={};for(const[rt,it]of Object.entries(et))switch(typeof it){case"function":nt[rt]=it.call(nt,tt[rt],rt,tt);break;case"object":nt[rt]=resolveWith(tt[rt],it);break;case"boolean":it&&(nt[rt]=tt[rt]);break}return nt}function parse$3(tt,et,nt={}){const rt=tt,{target:it,eventOptions:ot,window:at,enabled:st,transform:lt}=rt,ct=_objectWithoutProperties$m(rt,_excluded$1N);if(nt.shared=resolveWith({target:it,eventOptions:ot,window:at,enabled:st,transform:lt},sharedConfigResolver),et){const ut=ConfigResolverMap.get(et);nt[et]=resolveWith(_objectSpread2$2({shared:nt.shared},ct),ut)}else for(const ut in ct){const ht=ConfigResolverMap.get(ut);ht&&(nt[ut]=resolveWith(_objectSpread2$2({shared:nt.shared},ct[ut]),ht))}return nt}class EventStore{constructor(et,nt){_defineProperty$H(this,"_listeners",new Set),this._ctrl=et,this._gestureKey=nt}add(et,nt,rt,it,ot){const at=this._listeners,st=toDomEventType(nt,rt),lt=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},ct=_objectSpread2$2(_objectSpread2$2({},lt),ot);et.addEventListener(st,it,ct);const ut=()=>{et.removeEventListener(st,it,ct),at.delete(ut)};return at.add(ut),ut}clean(){this._listeners.forEach(et=>et()),this._listeners.clear()}}class TimeoutStore{constructor(){_defineProperty$H(this,"_timeouts",new Map)}add(et,nt,rt=140,...it){this.remove(et),this._timeouts.set(et,window.setTimeout(nt,rt,...it))}remove(et){const nt=this._timeouts.get(et);nt&&window.clearTimeout(nt)}clean(){this._timeouts.forEach(et=>void window.clearTimeout(et)),this._timeouts.clear()}}let Controller$1=class{constructor(et){_defineProperty$H(this,"gestures",new Set),_defineProperty$H(this,"_targetEventStore",new EventStore(this)),_defineProperty$H(this,"gestureEventStores",{}),_defineProperty$H(this,"gestureTimeoutStores",{}),_defineProperty$H(this,"handlers",{}),_defineProperty$H(this,"config",{}),_defineProperty$H(this,"pointerIds",new Set),_defineProperty$H(this,"touchIds",new Set),_defineProperty$H(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),resolveGestures(this,et)}setEventIds(et){if(isTouch$1(et))return this.touchIds=new Set(touchIds(et)),this.touchIds;if("pointerId"in et)return et.type==="pointerup"||et.type==="pointercancel"?this.pointerIds.delete(et.pointerId):et.type==="pointerdown"&&this.pointerIds.add(et.pointerId),this.pointerIds}applyHandlers(et,nt){this.handlers=et,this.nativeHandlers=nt}applyConfig(et,nt){this.config=parse$3(et,nt,this.config)}clean(){this._targetEventStore.clean();for(const et of this.gestures)this.gestureEventStores[et].clean(),this.gestureTimeoutStores[et].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...et){const nt=this.config.shared,rt={};let it;if(!(nt.target&&(it=nt.target(),!it))){if(nt.enabled){for(const at of this.gestures){const st=this.config[at],lt=bindToProps(rt,st.eventOptions,!!it);if(st.enabled){const ct=EngineMap.get(at);new ct(this,et,at).bind(lt)}}const ot=bindToProps(rt,nt.eventOptions,!!it);for(const at in this.nativeHandlers)ot(at,"",st=>this.nativeHandlers[at](_objectSpread2$2(_objectSpread2$2({},this.state.shared),{},{event:st,args:et})),void 0,!0)}for(const ot in rt)rt[ot]=chain(...rt[ot]);if(!it)return rt;for(const ot in rt){const{device:at,capture:st,passive:lt}=parseProp(ot);this._targetEventStore.add(it,at,"",rt[ot],{capture:st,passive:lt})}}}};function setupGesture(tt,et){tt.gestures.add(et),tt.gestureEventStores[et]=new EventStore(tt,et),tt.gestureTimeoutStores[et]=new TimeoutStore}function resolveGestures(tt,et){et.drag&&setupGesture(tt,"drag"),et.wheel&&setupGesture(tt,"wheel"),et.scroll&&setupGesture(tt,"scroll"),et.move&&setupGesture(tt,"move"),et.pinch&&setupGesture(tt,"pinch"),et.hover&&setupGesture(tt,"hover")}const bindToProps=(tt,et,nt)=>(rt,it,ot,at={},st=!1)=>{var lt,ct;const ut=(lt=at.capture)!==null&<!==void 0?lt:et.capture,ht=(ct=at.passive)!==null&&ct!==void 0?ct:et.passive;let dt=st?rt:toHandlerProp(rt,it,ut);nt&&ht&&(dt+="Passive"),tt[dt]=tt[dt]||[],tt[dt].push(ot)};function useRecognizers(tt,et={},nt,rt){const it=React$1.useMemo(()=>new Controller$1(tt),[]);if(it.applyHandlers(tt,rt),it.applyConfig(et,nt),React$1.useEffect(it.effect.bind(it)),React$1.useEffect(()=>it.clean.bind(it),[]),et.target===void 0)return it.bind.bind(it)}function useDrag$2(tt,et){return registerAction(dragAction),useRecognizers({drag:tt},et||{},"drag")}function $e42e1063c40fb3ef$export$b9ecd428b558ff10(tt,et,{checkForDefaultPrevented:nt=!0}={}){return function(it){if(tt==null||tt(it),nt===!1||!it.defaultPrevented)return et==null?void 0:et(it)}}function $c512c27ab02ef895$export$50c7b4e9d9f19c1(tt,et=[]){let nt=[];function rt(ot,at){const st=reactExports.createContext(at),lt=nt.length;nt=[...nt,at];function ct(ht){const{scope:dt,children:pt,...mt}=ht,gt=(dt==null?void 0:dt[tt][lt])||st,yt=reactExports.useMemo(()=>mt,Object.values(mt));return reactExports.createElement(gt.Provider,{value:yt},pt)}function ut(ht,dt){const pt=(dt==null?void 0:dt[tt][lt])||st,mt=reactExports.useContext(pt);if(mt)return mt;if(at!==void 0)return at;throw new Error(`\`${ht}\` must be used within \`${ot}\``)}return ct.displayName=ot+"Provider",[ct,ut]}const it=()=>{const ot=nt.map(at=>reactExports.createContext(at));return function(st){const lt=(st==null?void 0:st[tt])||ot;return reactExports.useMemo(()=>({[`__scope${tt}`]:{...st,[tt]:lt}}),[st,lt])}};return it.scopeName=tt,[rt,$c512c27ab02ef895$var$composeContextScopes(it,...et)]}function $c512c27ab02ef895$var$composeContextScopes(...tt){const et=tt[0];if(tt.length===1)return et;const nt=()=>{const rt=tt.map(it=>({useScope:it(),scopeName:it.scopeName}));return function(ot){const at=rt.reduce((st,{useScope:lt,scopeName:ct})=>{const ht=lt(ot)[`__scope${ct}`];return{...st,...ht}},{});return reactExports.useMemo(()=>({[`__scope${et.scopeName}`]:at}),[at])}};return nt.scopeName=et.scopeName,nt}function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(tt){const et=reactExports.useRef(tt);return reactExports.useEffect(()=>{et.current=tt}),reactExports.useMemo(()=>(...nt)=>{var rt;return(rt=et.current)===null||rt===void 0?void 0:rt.call(et,...nt)},[])}function $addc16e1bbe58fd0$export$3a72a57244d6e765(tt,et=globalThis==null?void 0:globalThis.document){const nt=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(tt);reactExports.useEffect(()=>{const rt=it=>{it.key==="Escape"&&nt(it)};return et.addEventListener("keydown",rt),()=>et.removeEventListener("keydown",rt)},[nt,et])}const $5cb92bef7577960e$var$CONTEXT_UPDATE="dismissableLayer.update",$5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE="dismissableLayer.pointerDownOutside",$5cb92bef7577960e$var$FOCUS_OUTSIDE="dismissableLayer.focusOutside";let $5cb92bef7577960e$var$originalBodyPointerEvents;const $5cb92bef7577960e$var$DismissableLayerContext=reactExports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$5cb92bef7577960e$export$177fb62ff3ec1f22=reactExports.forwardRef((tt,et)=>{var nt;const{disableOutsidePointerEvents:rt=!1,onEscapeKeyDown:it,onPointerDownOutside:ot,onFocusOutside:at,onInteractOutside:st,onDismiss:lt,...ct}=tt,ut=reactExports.useContext($5cb92bef7577960e$var$DismissableLayerContext),[ht,dt]=reactExports.useState(null),pt=(nt=ht==null?void 0:ht.ownerDocument)!==null&&nt!==void 0?nt:globalThis==null?void 0:globalThis.document,[,mt]=reactExports.useState({}),gt=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(et,Et=>dt(Et)),yt=Array.from(ut.layers),[bt]=[...ut.layersWithOutsidePointerEventsDisabled].slice(-1),vt=yt.indexOf(bt),xt=ht?yt.indexOf(ht):-1,kt=ut.layersWithOutsidePointerEventsDisabled.size>0,St=xt>=vt,Tt=$5cb92bef7577960e$var$usePointerDownOutside(Et=>{const $t=Et.target,Dt=[...ut.branches].some(jt=>jt.contains($t));!St||Dt||(ot==null||ot(Et),st==null||st(Et),Et.defaultPrevented||lt==null||lt())},pt),At=$5cb92bef7577960e$var$useFocusOutside(Et=>{const $t=Et.target;[...ut.branches].some(jt=>jt.contains($t))||(at==null||at(Et),st==null||st(Et),Et.defaultPrevented||lt==null||lt())},pt);return $addc16e1bbe58fd0$export$3a72a57244d6e765(Et=>{xt===ut.layers.size-1&&(it==null||it(Et),!Et.defaultPrevented&<&&(Et.preventDefault(),lt()))},pt),reactExports.useEffect(()=>{if(ht)return rt&&(ut.layersWithOutsidePointerEventsDisabled.size===0&&($5cb92bef7577960e$var$originalBodyPointerEvents=pt.body.style.pointerEvents,pt.body.style.pointerEvents="none"),ut.layersWithOutsidePointerEventsDisabled.add(ht)),ut.layers.add(ht),$5cb92bef7577960e$var$dispatchUpdate(),()=>{rt&&ut.layersWithOutsidePointerEventsDisabled.size===1&&(pt.body.style.pointerEvents=$5cb92bef7577960e$var$originalBodyPointerEvents)}},[ht,pt,rt,ut]),reactExports.useEffect(()=>()=>{ht&&(ut.layers.delete(ht),ut.layersWithOutsidePointerEventsDisabled.delete(ht),$5cb92bef7577960e$var$dispatchUpdate())},[ht,ut]),reactExports.useEffect(()=>{const Et=()=>mt({});return document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE,Et),()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE,Et)},[]),reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,_extends$u({},ct,{ref:gt,style:{pointerEvents:kt?St?"auto":"none":void 0,...tt.style},onFocusCapture:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onFocusCapture,At.onFocusCapture),onBlurCapture:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onBlurCapture,At.onBlurCapture),onPointerDownCapture:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onPointerDownCapture,Tt.onPointerDownCapture)}))});function $5cb92bef7577960e$var$usePointerDownOutside(tt,et=globalThis==null?void 0:globalThis.document){const nt=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(tt),rt=reactExports.useRef(!1),it=reactExports.useRef(()=>{});return reactExports.useEffect(()=>{const ot=st=>{if(st.target&&!rt.current){let ut=function(){$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE,nt,ct,{discrete:!0})};var lt=ut;const ct={originalEvent:st};st.pointerType==="touch"?(et.removeEventListener("click",it.current),it.current=ut,et.addEventListener("click",it.current,{once:!0})):ut()}else et.removeEventListener("click",it.current);rt.current=!1},at=window.setTimeout(()=>{et.addEventListener("pointerdown",ot)},0);return()=>{window.clearTimeout(at),et.removeEventListener("pointerdown",ot),et.removeEventListener("click",it.current)}},[et,nt]),{onPointerDownCapture:()=>rt.current=!0}}function $5cb92bef7577960e$var$useFocusOutside(tt,et=globalThis==null?void 0:globalThis.document){const nt=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(tt),rt=reactExports.useRef(!1);return reactExports.useEffect(()=>{const it=ot=>{ot.target&&!rt.current&&$5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE,nt,{originalEvent:ot},{discrete:!1})};return et.addEventListener("focusin",it),()=>et.removeEventListener("focusin",it)},[et,nt]),{onFocusCapture:()=>rt.current=!0,onBlurCapture:()=>rt.current=!1}}function $5cb92bef7577960e$var$dispatchUpdate(){const tt=new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);document.dispatchEvent(tt)}function $5cb92bef7577960e$var$handleAndDispatchCustomEvent(tt,et,nt,{discrete:rt}){const it=nt.originalEvent.target,ot=new CustomEvent(tt,{bubbles:!1,cancelable:!0,detail:nt});et&&it.addEventListener(tt,et,{once:!0}),rt?$8927f6f2acc4f386$export$6d1a0317bde7de7f(it,ot):it.dispatchEvent(ot)}const $9f79659886946c16$export$e5c5a5f917a5871c=globalThis!=null&&globalThis.document?reactExports.useLayoutEffect:()=>{},$1746a345f3d73bb7$var$useReactId=React$2["useId".toString()]||(()=>{});let $1746a345f3d73bb7$var$count=0;function $1746a345f3d73bb7$export$f680877a34711e37(tt){const[et,nt]=reactExports.useState($1746a345f3d73bb7$var$useReactId());return $9f79659886946c16$export$e5c5a5f917a5871c(()=>{tt||nt(rt=>rt??String($1746a345f3d73bb7$var$count++))},[tt]),tt||(et?`radix-${et}`:"")}const sides=["top","right","bottom","left"],min$4=Math.min,max$5=Math.max,round$4=Math.round,floor=Math.floor,createCoords=tt=>({x:tt,y:tt}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$9(tt,et,nt){return max$5(tt,min$4(et,nt))}function evaluate$1(tt,et){return typeof tt=="function"?tt(et):tt}function getSide(tt){return tt.split("-")[0]}function getAlignment(tt){return tt.split("-")[1]}function getOppositeAxis(tt){return tt==="x"?"y":"x"}function getAxisLength(tt){return tt==="y"?"height":"width"}function getSideAxis(tt){return["top","bottom"].includes(getSide(tt))?"y":"x"}function getAlignmentAxis(tt){return getOppositeAxis(getSideAxis(tt))}function getAlignmentSides(tt,et,nt){nt===void 0&&(nt=!1);const rt=getAlignment(tt),it=getAlignmentAxis(tt),ot=getAxisLength(it);let at=it==="x"?rt===(nt?"end":"start")?"right":"left":rt==="start"?"bottom":"top";return et.reference[ot]>et.floating[ot]&&(at=getOppositePlacement$1(at)),[at,getOppositePlacement$1(at)]}function getExpandedPlacements(tt){const et=getOppositePlacement$1(tt);return[getOppositeAlignmentPlacement(tt),et,getOppositeAlignmentPlacement(et)]}function getOppositeAlignmentPlacement(tt){return tt.replace(/start|end/g,et=>oppositeAlignmentMap[et])}function getSideList(tt,et,nt){const rt=["left","right"],it=["right","left"],ot=["top","bottom"],at=["bottom","top"];switch(tt){case"top":case"bottom":return nt?et?it:rt:et?rt:it;case"left":case"right":return et?ot:at;default:return[]}}function getOppositeAxisPlacements(tt,et,nt,rt){const it=getAlignment(tt);let ot=getSideList(getSide(tt),nt==="start",rt);return it&&(ot=ot.map(at=>at+"-"+it),et&&(ot=ot.concat(ot.map(getOppositeAlignmentPlacement)))),ot}function getOppositePlacement$1(tt){return tt.replace(/left|right|bottom|top/g,et=>oppositeSideMap[et])}function expandPaddingObject(tt){return{top:0,right:0,bottom:0,left:0,...tt}}function getPaddingObject(tt){return typeof tt!="number"?expandPaddingObject(tt):{top:tt,right:tt,bottom:tt,left:tt}}function rectToClientRect$1(tt){return{...tt,top:tt.y,left:tt.x,right:tt.x+tt.width,bottom:tt.y+tt.height}}function computeCoordsFromPlacement(tt,et,nt){let{reference:rt,floating:it}=tt;const ot=getSideAxis(et),at=getAlignmentAxis(et),st=getAxisLength(at),lt=getSide(et),ct=ot==="y",ut=rt.x+rt.width/2-it.width/2,ht=rt.y+rt.height/2-it.height/2,dt=rt[st]/2-it[st]/2;let pt;switch(lt){case"top":pt={x:ut,y:rt.y-it.height};break;case"bottom":pt={x:ut,y:rt.y+rt.height};break;case"right":pt={x:rt.x+rt.width,y:ht};break;case"left":pt={x:rt.x-it.width,y:ht};break;default:pt={x:rt.x,y:rt.y}}switch(getAlignment(et)){case"start":pt[at]-=dt*(nt&&ct?-1:1);break;case"end":pt[at]+=dt*(nt&&ct?-1:1);break}return pt}const computePosition$1=async(tt,et,nt)=>{const{placement:rt="bottom",strategy:it="absolute",middleware:ot=[],platform:at}=nt,st=ot.filter(Boolean),lt=await(at.isRTL==null?void 0:at.isRTL(et));let ct=await at.getElementRects({reference:tt,floating:et,strategy:it}),{x:ut,y:ht}=computeCoordsFromPlacement(ct,rt,lt),dt=rt,pt={},mt=0;for(let gt=0;gt({name:"arrow",options:tt,async fn(et){const{x:nt,y:rt,placement:it,rects:ot,platform:at,elements:st,middlewareData:lt}=et,{element:ct,padding:ut=0}=evaluate$1(tt,et)||{};if(ct==null)return{};const ht=getPaddingObject(ut),dt={x:nt,y:rt},pt=getAlignmentAxis(it),mt=getAxisLength(pt),gt=await at.getDimensions(ct),yt=pt==="y",bt=yt?"top":"left",vt=yt?"bottom":"right",xt=yt?"clientHeight":"clientWidth",kt=ot.reference[mt]+ot.reference[pt]-dt[pt]-ot.floating[mt],St=dt[pt]-ot.reference[pt],Tt=await(at.getOffsetParent==null?void 0:at.getOffsetParent(ct));let At=Tt?Tt[xt]:0;(!At||!await(at.isElement==null?void 0:at.isElement(Tt)))&&(At=st.floating[xt]||ot.floating[mt]);const Et=kt/2-St/2,$t=At/2-gt[mt]/2-1,Dt=min$4(ht[bt],$t),jt=min$4(ht[vt],$t),Pt=Dt,Ct=At-gt[mt]-jt,wt=At/2-gt[mt]/2+Et,It=clamp$9(Pt,wt,Ct),Ot=!lt.arrow&&getAlignment(it)!=null&&wt!=It&&ot.reference[mt]/2-(wtPt<=0)){var $t,Dt;const Pt=((($t=ot.flip)==null?void 0:$t.index)||0)+1,Ct=St[Pt];if(Ct)return{data:{index:Pt,overflows:Et},reset:{placement:Ct}};let wt=(Dt=Et.filter(It=>It.overflows[0]<=0).sort((It,Ot)=>It.overflows[1]-Ot.overflows[1])[0])==null?void 0:Dt.placement;if(!wt)switch(pt){case"bestFit":{var jt;const It=(jt=Et.map(Ot=>[Ot.placement,Ot.overflows.filter(Wt=>Wt>0).reduce((Wt,zt)=>Wt+zt,0)]).sort((Ot,Wt)=>Ot[1]-Wt[1])[0])==null?void 0:jt[0];It&&(wt=It);break}case"initialPlacement":wt=st;break}if(it!==wt)return{reset:{placement:wt}}}return{}}}};function getSideOffsets$1(tt,et){return{top:tt.top-et.height,right:tt.right-et.width,bottom:tt.bottom-et.height,left:tt.left-et.width}}function isAnySideFullyClipped$1(tt){return sides.some(et=>tt[et]>=0)}const hide$2=function(tt){return tt===void 0&&(tt={}),{name:"hide",options:tt,async fn(et){const{rects:nt}=et,{strategy:rt="referenceHidden",...it}=evaluate$1(tt,et);switch(rt){case"referenceHidden":{const ot=await detectOverflow$1(et,{...it,elementContext:"reference"}),at=getSideOffsets$1(ot,nt.reference);return{data:{referenceHiddenOffsets:at,referenceHidden:isAnySideFullyClipped$1(at)}}}case"escaped":{const ot=await detectOverflow$1(et,{...it,altBoundary:!0}),at=getSideOffsets$1(ot,nt.floating);return{data:{escapedOffsets:at,escaped:isAnySideFullyClipped$1(at)}}}default:return{}}}}};async function convertValueToCoords(tt,et){const{placement:nt,platform:rt,elements:it}=tt,ot=await(rt.isRTL==null?void 0:rt.isRTL(it.floating)),at=getSide(nt),st=getAlignment(nt),lt=getSideAxis(nt)==="y",ct=["left","top"].includes(at)?-1:1,ut=ot&<?-1:1,ht=evaluate$1(et,tt);let{mainAxis:dt,crossAxis:pt,alignmentAxis:mt}=typeof ht=="number"?{mainAxis:ht,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...ht};return st&&typeof mt=="number"&&(pt=st==="end"?mt*-1:mt),lt?{x:pt*ut,y:dt*ct}:{x:dt*ct,y:pt*ut}}const offset$3=function(tt){return tt===void 0&&(tt=0),{name:"offset",options:tt,async fn(et){const{x:nt,y:rt}=et,it=await convertValueToCoords(et,tt);return{x:nt+it.x,y:rt+it.y,data:it}}}},shift=function(tt){return tt===void 0&&(tt={}),{name:"shift",options:tt,async fn(et){const{x:nt,y:rt,placement:it}=et,{mainAxis:ot=!0,crossAxis:at=!1,limiter:st={fn:yt=>{let{x:bt,y:vt}=yt;return{x:bt,y:vt}}},...lt}=evaluate$1(tt,et),ct={x:nt,y:rt},ut=await detectOverflow$1(et,lt),ht=getSideAxis(getSide(it)),dt=getOppositeAxis(ht);let pt=ct[dt],mt=ct[ht];if(ot){const yt=dt==="y"?"top":"left",bt=dt==="y"?"bottom":"right",vt=pt+ut[yt],xt=pt-ut[bt];pt=clamp$9(vt,pt,xt)}if(at){const yt=ht==="y"?"top":"left",bt=ht==="y"?"bottom":"right",vt=mt+ut[yt],xt=mt-ut[bt];mt=clamp$9(vt,mt,xt)}const gt=st.fn({...et,[dt]:pt,[ht]:mt});return{...gt,data:{x:gt.x-nt,y:gt.y-rt}}}}},limitShift=function(tt){return tt===void 0&&(tt={}),{options:tt,fn(et){const{x:nt,y:rt,placement:it,rects:ot,middlewareData:at}=et,{offset:st=0,mainAxis:lt=!0,crossAxis:ct=!0}=evaluate$1(tt,et),ut={x:nt,y:rt},ht=getSideAxis(it),dt=getOppositeAxis(ht);let pt=ut[dt],mt=ut[ht];const gt=evaluate$1(st,et),yt=typeof gt=="number"?{mainAxis:gt,crossAxis:0}:{mainAxis:0,crossAxis:0,...gt};if(lt){const xt=dt==="y"?"height":"width",kt=ot.reference[dt]-ot.floating[xt]+yt.mainAxis,St=ot.reference[dt]+ot.reference[xt]-yt.mainAxis;ptSt&&(pt=St)}if(ct){var bt,vt;const xt=dt==="y"?"width":"height",kt=["top","left"].includes(getSide(it)),St=ot.reference[ht]-ot.floating[xt]+(kt&&((bt=at.offset)==null?void 0:bt[ht])||0)+(kt?0:yt.crossAxis),Tt=ot.reference[ht]+ot.reference[xt]+(kt?0:((vt=at.offset)==null?void 0:vt[ht])||0)-(kt?yt.crossAxis:0);mtTt&&(mt=Tt)}return{[dt]:pt,[ht]:mt}}}},size=function(tt){return tt===void 0&&(tt={}),{name:"size",options:tt,async fn(et){const{placement:nt,rects:rt,platform:it,elements:ot}=et,{apply:at=()=>{},...st}=evaluate$1(tt,et),lt=await detectOverflow$1(et,st),ct=getSide(nt),ut=getAlignment(nt),ht=getSideAxis(nt)==="y",{width:dt,height:pt}=rt.floating;let mt,gt;ct==="top"||ct==="bottom"?(mt=ct,gt=ut===(await(it.isRTL==null?void 0:it.isRTL(ot.floating))?"start":"end")?"left":"right"):(gt=ct,mt=ut==="end"?"top":"bottom");const yt=pt-lt[mt],bt=dt-lt[gt],vt=!et.middlewareData.shift;let xt=yt,kt=bt;if(ht){const Tt=dt-lt.left-lt.right;kt=ut||vt?min$4(bt,Tt):Tt}else{const Tt=pt-lt.top-lt.bottom;xt=ut||vt?min$4(yt,Tt):Tt}if(vt&&!ut){const Tt=max$5(lt.left,0),At=max$5(lt.right,0),Et=max$5(lt.top,0),$t=max$5(lt.bottom,0);ht?kt=dt-2*(Tt!==0||At!==0?Tt+At:max$5(lt.left,lt.right)):xt=pt-2*(Et!==0||$t!==0?Et+$t:max$5(lt.top,lt.bottom))}await at({...et,availableWidth:kt,availableHeight:xt});const St=await it.getDimensions(ot.floating);return dt!==St.width||pt!==St.height?{reset:{rects:!0}}:{}}}};function getNodeName$1(tt){return isNode(tt)?(tt.nodeName||"").toLowerCase():"#document"}function getWindow$1(tt){var et;return(tt==null||(et=tt.ownerDocument)==null?void 0:et.defaultView)||window}function getDocumentElement$1(tt){var et;return(et=(isNode(tt)?tt.ownerDocument:tt.document)||window.document)==null?void 0:et.documentElement}function isNode(tt){return tt instanceof Node||tt instanceof getWindow$1(tt).Node}function isElement$1(tt){return tt instanceof Element||tt instanceof getWindow$1(tt).Element}function isHTMLElement$3(tt){return tt instanceof HTMLElement||tt instanceof getWindow$1(tt).HTMLElement}function isShadowRoot$1(tt){return typeof ShadowRoot>"u"?!1:tt instanceof ShadowRoot||tt instanceof getWindow$1(tt).ShadowRoot}function isOverflowElement(tt){const{overflow:et,overflowX:nt,overflowY:rt,display:it}=getComputedStyle$2(tt);return/auto|scroll|overlay|hidden|clip/.test(et+rt+nt)&&!["inline","contents"].includes(it)}function isTableElement$1(tt){return["table","td","th"].includes(getNodeName$1(tt))}function isContainingBlock(tt){const et=isWebKit(),nt=getComputedStyle$2(tt);return nt.transform!=="none"||nt.perspective!=="none"||(nt.containerType?nt.containerType!=="normal":!1)||!et&&(nt.backdropFilter?nt.backdropFilter!=="none":!1)||!et&&(nt.filter?nt.filter!=="none":!1)||["transform","perspective","filter"].some(rt=>(nt.willChange||"").includes(rt))||["paint","layout","strict","content"].some(rt=>(nt.contain||"").includes(rt))}function getContainingBlock$1(tt){let et=getParentNode$1(tt);for(;isHTMLElement$3(et)&&!isLastTraversableNode(et);){if(isContainingBlock(et))return et;et=getParentNode$1(et)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(tt){return["html","body","#document"].includes(getNodeName$1(tt))}function getComputedStyle$2(tt){return getWindow$1(tt).getComputedStyle(tt)}function getNodeScroll$1(tt){return isElement$1(tt)?{scrollLeft:tt.scrollLeft,scrollTop:tt.scrollTop}:{scrollLeft:tt.pageXOffset,scrollTop:tt.pageYOffset}}function getParentNode$1(tt){if(getNodeName$1(tt)==="html")return tt;const et=tt.assignedSlot||tt.parentNode||isShadowRoot$1(tt)&&tt.host||getDocumentElement$1(tt);return isShadowRoot$1(et)?et.host:et}function getNearestOverflowAncestor(tt){const et=getParentNode$1(tt);return isLastTraversableNode(et)?tt.ownerDocument?tt.ownerDocument.body:tt.body:isHTMLElement$3(et)&&isOverflowElement(et)?et:getNearestOverflowAncestor(et)}function getOverflowAncestors(tt,et,nt){var rt;et===void 0&&(et=[]),nt===void 0&&(nt=!0);const it=getNearestOverflowAncestor(tt),ot=it===((rt=tt.ownerDocument)==null?void 0:rt.body),at=getWindow$1(it);return ot?et.concat(at,at.visualViewport||[],isOverflowElement(it)?it:[],at.frameElement&&nt?getOverflowAncestors(at.frameElement):[]):et.concat(it,getOverflowAncestors(it,[],nt))}function getCssDimensions(tt){const et=getComputedStyle$2(tt);let nt=parseFloat(et.width)||0,rt=parseFloat(et.height)||0;const it=isHTMLElement$3(tt),ot=it?tt.offsetWidth:nt,at=it?tt.offsetHeight:rt,st=round$4(nt)!==ot||round$4(rt)!==at;return st&&(nt=ot,rt=at),{width:nt,height:rt,$:st}}function unwrapElement(tt){return isElement$1(tt)?tt:tt.contextElement}function getScale$1(tt){const et=unwrapElement(tt);if(!isHTMLElement$3(et))return createCoords(1);const nt=et.getBoundingClientRect(),{width:rt,height:it,$:ot}=getCssDimensions(et);let at=(ot?round$4(nt.width):nt.width)/rt,st=(ot?round$4(nt.height):nt.height)/it;return(!at||!Number.isFinite(at))&&(at=1),(!st||!Number.isFinite(st))&&(st=1),{x:at,y:st}}const noOffsets=createCoords(0);function getVisualOffsets(tt){const et=getWindow$1(tt);return!isWebKit()||!et.visualViewport?noOffsets:{x:et.visualViewport.offsetLeft,y:et.visualViewport.offsetTop}}function shouldAddVisualOffsets(tt,et,nt){return et===void 0&&(et=!1),!nt||et&&nt!==getWindow$1(tt)?!1:et}function getBoundingClientRect$1(tt,et,nt,rt){et===void 0&&(et=!1),nt===void 0&&(nt=!1);const it=tt.getBoundingClientRect(),ot=unwrapElement(tt);let at=createCoords(1);et&&(rt?isElement$1(rt)&&(at=getScale$1(rt)):at=getScale$1(tt));const st=shouldAddVisualOffsets(ot,nt,rt)?getVisualOffsets(ot):createCoords(0);let lt=(it.left+st.x)/at.x,ct=(it.top+st.y)/at.y,ut=it.width/at.x,ht=it.height/at.y;if(ot){const dt=getWindow$1(ot),pt=rt&&isElement$1(rt)?getWindow$1(rt):rt;let mt=dt.frameElement;for(;mt&&rt&&pt!==dt;){const gt=getScale$1(mt),yt=mt.getBoundingClientRect(),bt=getComputedStyle$2(mt),vt=yt.left+(mt.clientLeft+parseFloat(bt.paddingLeft))*gt.x,xt=yt.top+(mt.clientTop+parseFloat(bt.paddingTop))*gt.y;lt*=gt.x,ct*=gt.y,ut*=gt.x,ht*=gt.y,lt+=vt,ct+=xt,mt=getWindow$1(mt).frameElement}}return rectToClientRect$1({width:ut,height:ht,x:lt,y:ct})}function convertOffsetParentRelativeRectToViewportRelativeRect(tt){let{rect:et,offsetParent:nt,strategy:rt}=tt;const it=isHTMLElement$3(nt),ot=getDocumentElement$1(nt);if(nt===ot)return et;let at={scrollLeft:0,scrollTop:0},st=createCoords(1);const lt=createCoords(0);if((it||!it&&rt!=="fixed")&&((getNodeName$1(nt)!=="body"||isOverflowElement(ot))&&(at=getNodeScroll$1(nt)),isHTMLElement$3(nt))){const ct=getBoundingClientRect$1(nt);st=getScale$1(nt),lt.x=ct.x+nt.clientLeft,lt.y=ct.y+nt.clientTop}return{width:et.width*st.x,height:et.height*st.y,x:et.x*st.x-at.scrollLeft*st.x+lt.x,y:et.y*st.y-at.scrollTop*st.y+lt.y}}function getClientRects(tt){return Array.from(tt.getClientRects())}function getWindowScrollBarX$1(tt){return getBoundingClientRect$1(getDocumentElement$1(tt)).left+getNodeScroll$1(tt).scrollLeft}function getDocumentRect$1(tt){const et=getDocumentElement$1(tt),nt=getNodeScroll$1(tt),rt=tt.ownerDocument.body,it=max$5(et.scrollWidth,et.clientWidth,rt.scrollWidth,rt.clientWidth),ot=max$5(et.scrollHeight,et.clientHeight,rt.scrollHeight,rt.clientHeight);let at=-nt.scrollLeft+getWindowScrollBarX$1(tt);const st=-nt.scrollTop;return getComputedStyle$2(rt).direction==="rtl"&&(at+=max$5(et.clientWidth,rt.clientWidth)-it),{width:it,height:ot,x:at,y:st}}function getViewportRect$1(tt,et){const nt=getWindow$1(tt),rt=getDocumentElement$1(tt),it=nt.visualViewport;let ot=rt.clientWidth,at=rt.clientHeight,st=0,lt=0;if(it){ot=it.width,at=it.height;const ct=isWebKit();(!ct||ct&&et==="fixed")&&(st=it.offsetLeft,lt=it.offsetTop)}return{width:ot,height:at,x:st,y:lt}}function getInnerBoundingClientRect$1(tt,et){const nt=getBoundingClientRect$1(tt,!0,et==="fixed"),rt=nt.top+tt.clientTop,it=nt.left+tt.clientLeft,ot=isHTMLElement$3(tt)?getScale$1(tt):createCoords(1),at=tt.clientWidth*ot.x,st=tt.clientHeight*ot.y,lt=it*ot.x,ct=rt*ot.y;return{width:at,height:st,x:lt,y:ct}}function getClientRectFromClippingAncestor(tt,et,nt){let rt;if(et==="viewport")rt=getViewportRect$1(tt,nt);else if(et==="document")rt=getDocumentRect$1(getDocumentElement$1(tt));else if(isElement$1(et))rt=getInnerBoundingClientRect$1(et,nt);else{const it=getVisualOffsets(tt);rt={...et,x:et.x-it.x,y:et.y-it.y}}return rectToClientRect$1(rt)}function hasFixedPositionAncestor(tt,et){const nt=getParentNode$1(tt);return nt===et||!isElement$1(nt)||isLastTraversableNode(nt)?!1:getComputedStyle$2(nt).position==="fixed"||hasFixedPositionAncestor(nt,et)}function getClippingElementAncestors(tt,et){const nt=et.get(tt);if(nt)return nt;let rt=getOverflowAncestors(tt,[],!1).filter(st=>isElement$1(st)&&getNodeName$1(st)!=="body"),it=null;const ot=getComputedStyle$2(tt).position==="fixed";let at=ot?getParentNode$1(tt):tt;for(;isElement$1(at)&&!isLastTraversableNode(at);){const st=getComputedStyle$2(at),lt=isContainingBlock(at);!lt&&st.position==="fixed"&&(it=null),(ot?!lt&&!it:!lt&&st.position==="static"&&!!it&&["absolute","fixed"].includes(it.position)||isOverflowElement(at)&&!lt&&hasFixedPositionAncestor(tt,at))?rt=rt.filter(ut=>ut!==at):it=st,at=getParentNode$1(at)}return et.set(tt,rt),rt}function getClippingRect$1(tt){let{element:et,boundary:nt,rootBoundary:rt,strategy:it}=tt;const at=[...nt==="clippingAncestors"?getClippingElementAncestors(et,this._c):[].concat(nt),rt],st=at[0],lt=at.reduce((ct,ut)=>{const ht=getClientRectFromClippingAncestor(et,ut,it);return ct.top=max$5(ht.top,ct.top),ct.right=min$4(ht.right,ct.right),ct.bottom=min$4(ht.bottom,ct.bottom),ct.left=max$5(ht.left,ct.left),ct},getClientRectFromClippingAncestor(et,st,it));return{width:lt.right-lt.left,height:lt.bottom-lt.top,x:lt.left,y:lt.top}}function getDimensions$1(tt){return getCssDimensions(tt)}function getRectRelativeToOffsetParent(tt,et,nt){const rt=isHTMLElement$3(et),it=getDocumentElement$1(et),ot=nt==="fixed",at=getBoundingClientRect$1(tt,!0,ot,et);let st={scrollLeft:0,scrollTop:0};const lt=createCoords(0);if(rt||!rt&&!ot)if((getNodeName$1(et)!=="body"||isOverflowElement(it))&&(st=getNodeScroll$1(et)),rt){const ct=getBoundingClientRect$1(et,!0,ot,et);lt.x=ct.x+et.clientLeft,lt.y=ct.y+et.clientTop}else it&&(lt.x=getWindowScrollBarX$1(it));return{x:at.left+st.scrollLeft-lt.x,y:at.top+st.scrollTop-lt.y,width:at.width,height:at.height}}function getTrueOffsetParent$1(tt,et){return!isHTMLElement$3(tt)||getComputedStyle$2(tt).position==="fixed"?null:et?et(tt):tt.offsetParent}function getOffsetParent$1(tt,et){const nt=getWindow$1(tt);if(!isHTMLElement$3(tt))return nt;let rt=getTrueOffsetParent$1(tt,et);for(;rt&&isTableElement$1(rt)&&getComputedStyle$2(rt).position==="static";)rt=getTrueOffsetParent$1(rt,et);return rt&&(getNodeName$1(rt)==="html"||getNodeName$1(rt)==="body"&&getComputedStyle$2(rt).position==="static"&&!isContainingBlock(rt))?nt:rt||getContainingBlock$1(tt)||nt}const getElementRects=async function(tt){let{reference:et,floating:nt,strategy:rt}=tt;const it=this.getOffsetParent||getOffsetParent$1,ot=this.getDimensions;return{reference:getRectRelativeToOffsetParent(et,await it(nt),rt),floating:{x:0,y:0,...await ot(nt)}}};function isRTL(tt){return getComputedStyle$2(tt).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement:getDocumentElement$1,getClippingRect:getClippingRect$1,getOffsetParent:getOffsetParent$1,getElementRects,getClientRects,getDimensions:getDimensions$1,getScale:getScale$1,isElement:isElement$1,isRTL};function observeMove(tt,et){let nt=null,rt;const it=getDocumentElement$1(tt);function ot(){clearTimeout(rt),nt&&nt.disconnect(),nt=null}function at(st,lt){st===void 0&&(st=!1),lt===void 0&&(lt=1),ot();const{left:ct,top:ut,width:ht,height:dt}=tt.getBoundingClientRect();if(st||et(),!ht||!dt)return;const pt=floor(ut),mt=floor(it.clientWidth-(ct+ht)),gt=floor(it.clientHeight-(ut+dt)),yt=floor(ct),vt={rootMargin:-pt+"px "+-mt+"px "+-gt+"px "+-yt+"px",threshold:max$5(0,min$4(1,lt))||1};let xt=!0;function kt(St){const Tt=St[0].intersectionRatio;if(Tt!==lt){if(!xt)return at();Tt?at(!1,Tt):rt=setTimeout(()=>{at(!1,1e-7)},100)}xt=!1}try{nt=new IntersectionObserver(kt,{...vt,root:it.ownerDocument})}catch{nt=new IntersectionObserver(kt,vt)}nt.observe(tt)}return at(!0),ot}function autoUpdate(tt,et,nt,rt){rt===void 0&&(rt={});const{ancestorScroll:it=!0,ancestorResize:ot=!0,elementResize:at=typeof ResizeObserver=="function",layoutShift:st=typeof IntersectionObserver=="function",animationFrame:lt=!1}=rt,ct=unwrapElement(tt),ut=it||ot?[...ct?getOverflowAncestors(ct):[],...getOverflowAncestors(et)]:[];ut.forEach(bt=>{it&&bt.addEventListener("scroll",nt,{passive:!0}),ot&&bt.addEventListener("resize",nt)});const ht=ct&&st?observeMove(ct,nt):null;let dt=-1,pt=null;at&&(pt=new ResizeObserver(bt=>{let[vt]=bt;vt&&vt.target===ct&&pt&&(pt.unobserve(et),cancelAnimationFrame(dt),dt=requestAnimationFrame(()=>{pt&&pt.observe(et)})),nt()}),ct&&!lt&&pt.observe(ct),pt.observe(et));let mt,gt=lt?getBoundingClientRect$1(tt):null;lt&&yt();function yt(){const bt=getBoundingClientRect$1(tt);gt&&(bt.x!==gt.x||bt.y!==gt.y||bt.width!==gt.width||bt.height!==gt.height)&&nt(),gt=bt,mt=requestAnimationFrame(yt)}return nt(),()=>{ut.forEach(bt=>{it&&bt.removeEventListener("scroll",nt),ot&&bt.removeEventListener("resize",nt)}),ht&&ht(),pt&&pt.disconnect(),pt=null,lt&&cancelAnimationFrame(mt)}}const computePosition=(tt,et,nt)=>{const rt=new Map,it={platform,...nt},ot={...it.platform,_c:rt};return computePosition$1(tt,et,{...it,platform:ot})},arrow$2=tt=>{function et(nt){return{}.hasOwnProperty.call(nt,"current")}return{name:"arrow",options:tt,fn(nt){const{element:rt,padding:it}=typeof tt=="function"?tt(nt):tt;return rt&&et(rt)?rt.current!=null?arrow$3({element:rt.current,padding:it}).fn(nt):{}:rt?arrow$3({element:rt,padding:it}).fn(nt):{}}}};var index$2=typeof document<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function deepEqual$3(tt,et){if(tt===et)return!0;if(typeof tt!=typeof et)return!1;if(typeof tt=="function"&&tt.toString()===et.toString())return!0;let nt,rt,it;if(tt&&et&&typeof tt=="object"){if(Array.isArray(tt)){if(nt=tt.length,nt!=et.length)return!1;for(rt=nt;rt--!==0;)if(!deepEqual$3(tt[rt],et[rt]))return!1;return!0}if(it=Object.keys(tt),nt=it.length,nt!==Object.keys(et).length)return!1;for(rt=nt;rt--!==0;)if(!{}.hasOwnProperty.call(et,it[rt]))return!1;for(rt=nt;rt--!==0;){const ot=it[rt];if(!(ot==="_owner"&&tt.$$typeof)&&!deepEqual$3(tt[ot],et[ot]))return!1}return!0}return tt!==tt&&et!==et}function getDPR(tt){return typeof window>"u"?1:(tt.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(tt,et){const nt=getDPR(tt);return Math.round(et*nt)/nt}function useLatestRef(tt){const et=reactExports.useRef(tt);return index$2(()=>{et.current=tt}),et}function useFloating(tt){tt===void 0&&(tt={});const{placement:et="bottom",strategy:nt="absolute",middleware:rt=[],platform:it,elements:{reference:ot,floating:at}={},transform:st=!0,whileElementsMounted:lt,open:ct}=tt,[ut,ht]=reactExports.useState({x:0,y:0,strategy:nt,placement:et,middlewareData:{},isPositioned:!1}),[dt,pt]=reactExports.useState(rt);deepEqual$3(dt,rt)||pt(rt);const[mt,gt]=reactExports.useState(null),[yt,bt]=reactExports.useState(null),vt=reactExports.useCallback(Ot=>{Ot!=Tt.current&&(Tt.current=Ot,gt(Ot))},[gt]),xt=reactExports.useCallback(Ot=>{Ot!==At.current&&(At.current=Ot,bt(Ot))},[bt]),kt=ot||mt,St=at||yt,Tt=reactExports.useRef(null),At=reactExports.useRef(null),Et=reactExports.useRef(ut),$t=useLatestRef(lt),Dt=useLatestRef(it),jt=reactExports.useCallback(()=>{if(!Tt.current||!At.current)return;const Ot={placement:et,strategy:nt,middleware:dt};Dt.current&&(Ot.platform=Dt.current),computePosition(Tt.current,At.current,Ot).then(Wt=>{const zt={...Wt,isPositioned:!0};Pt.current&&!deepEqual$3(Et.current,zt)&&(Et.current=zt,reactDomExports.flushSync(()=>{ht(zt)}))})},[dt,et,nt,Dt]);index$2(()=>{ct===!1&&Et.current.isPositioned&&(Et.current.isPositioned=!1,ht(Ot=>({...Ot,isPositioned:!1})))},[ct]);const Pt=reactExports.useRef(!1);index$2(()=>(Pt.current=!0,()=>{Pt.current=!1}),[]),index$2(()=>{if(kt&&(Tt.current=kt),St&&(At.current=St),kt&&St){if($t.current)return $t.current(kt,St,jt);jt()}},[kt,St,jt,$t]);const Ct=reactExports.useMemo(()=>({reference:Tt,floating:At,setReference:vt,setFloating:xt}),[vt,xt]),wt=reactExports.useMemo(()=>({reference:kt,floating:St}),[kt,St]),It=reactExports.useMemo(()=>{const Ot={position:nt,left:0,top:0};if(!wt.floating)return Ot;const Wt=roundByDPR(wt.floating,ut.x),zt=roundByDPR(wt.floating,ut.y);return st?{...Ot,transform:"translate("+Wt+"px, "+zt+"px)",...getDPR(wt.floating)>=1.5&&{willChange:"transform"}}:{position:nt,left:Wt,top:zt}},[nt,st,wt.floating,ut.x,ut.y]);return reactExports.useMemo(()=>({...ut,update:jt,refs:Ct,elements:wt,floatingStyles:It}),[ut,jt,Ct,wt,It])}const $7e8f5cd07187803e$export$21b07c8f274aebd5=reactExports.forwardRef((tt,et)=>{const{children:nt,width:rt=10,height:it=5,...ot}=tt;return reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.svg,_extends$u({},ot,{ref:et,width:rt,height:it,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),tt.asChild?nt:reactExports.createElement("polygon",{points:"0,0 30,0 15,10"}))}),$7e8f5cd07187803e$export$be92b6f5f03c0fe9=$7e8f5cd07187803e$export$21b07c8f274aebd5;function $db6c3485150b8e66$export$1ab7ae714698c4b8(tt){const[et,nt]=reactExports.useState(void 0);return $9f79659886946c16$export$e5c5a5f917a5871c(()=>{if(tt){nt({width:tt.offsetWidth,height:tt.offsetHeight});const rt=new ResizeObserver(it=>{if(!Array.isArray(it)||!it.length)return;const ot=it[0];let at,st;if("borderBoxSize"in ot){const lt=ot.borderBoxSize,ct=Array.isArray(lt)?lt[0]:lt;at=ct.inlineSize,st=ct.blockSize}else at=tt.offsetWidth,st=tt.offsetHeight;nt({width:at,height:st})});return rt.observe(tt,{box:"border-box"}),()=>rt.unobserve(tt)}else nt(void 0)},[tt]),et}const $cf1ac5d9fe0e8206$var$POPPER_NAME="Popper",[$cf1ac5d9fe0e8206$var$createPopperContext,$cf1ac5d9fe0e8206$export$722aac194ae923]=$c512c27ab02ef895$export$50c7b4e9d9f19c1($cf1ac5d9fe0e8206$var$POPPER_NAME),[$cf1ac5d9fe0e8206$var$PopperProvider,$cf1ac5d9fe0e8206$var$usePopperContext]=$cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$POPPER_NAME),$cf1ac5d9fe0e8206$export$badac9ada3a0bdf9=tt=>{const{__scopePopper:et,children:nt}=tt,[rt,it]=reactExports.useState(null);return reactExports.createElement($cf1ac5d9fe0e8206$var$PopperProvider,{scope:et,anchor:rt,onAnchorChange:it},nt)},$cf1ac5d9fe0e8206$var$ANCHOR_NAME="PopperAnchor",$cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d=reactExports.forwardRef((tt,et)=>{const{__scopePopper:nt,virtualRef:rt,...it}=tt,ot=$cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$ANCHOR_NAME,nt),at=reactExports.useRef(null),st=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(et,at);return reactExports.useEffect(()=>{ot.onAnchorChange((rt==null?void 0:rt.current)||at.current)}),rt?null:reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,_extends$u({},it,{ref:st}))}),$cf1ac5d9fe0e8206$var$CONTENT_NAME="PopperContent",[$cf1ac5d9fe0e8206$var$PopperContentProvider,$cf1ac5d9fe0e8206$var$useContentContext]=$cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME),$cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc=reactExports.forwardRef((tt,et)=>{var nt,rt,it,ot,at,st,lt,ct;const{__scopePopper:ut,side:ht="bottom",sideOffset:dt=0,align:pt="center",alignOffset:mt=0,arrowPadding:gt=0,avoidCollisions:yt=!0,collisionBoundary:bt=[],collisionPadding:vt=0,sticky:xt="partial",hideWhenDetached:kt=!1,updatePositionStrategy:St="optimized",onPlaced:Tt,...At}=tt,Et=$cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME,ut),[$t,Dt]=reactExports.useState(null),jt=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(et,$n=>Dt($n)),[Pt,Ct]=reactExports.useState(null),wt=$db6c3485150b8e66$export$1ab7ae714698c4b8(Pt),It=(nt=wt==null?void 0:wt.width)!==null&&nt!==void 0?nt:0,Ot=(rt=wt==null?void 0:wt.height)!==null&&rt!==void 0?rt:0,Wt=ht+(pt!=="center"?"-"+pt:""),zt=typeof vt=="number"?vt:{top:0,right:0,bottom:0,left:0,...vt},Ft=Array.isArray(bt)?bt:[bt],Nt=Ft.length>0,Ut={padding:zt,boundary:Ft.filter($cf1ac5d9fe0e8206$var$isNotNull),altBoundary:Nt},{refs:Mt,floatingStyles:Ht,placement:en,isPositioned:sn,middlewareData:Kt}=useFloating({strategy:"fixed",placement:Wt,whileElementsMounted:(...$n)=>autoUpdate(...$n,{animationFrame:St==="always"}),elements:{reference:Et.anchor},middleware:[offset$3({mainAxis:dt+Ot,alignmentAxis:mt}),yt&&shift({mainAxis:!0,crossAxis:!1,limiter:xt==="partial"?limitShift():void 0,...Ut}),yt&&flip$2({...Ut}),size({...Ut,apply:({elements:$n,rects:Nn,availableWidth:Tn,availableHeight:cn})=>{const{width:mn,height:In}=Nn.reference,An=$n.floating.style;An.setProperty("--radix-popper-available-width",`${Tn}px`),An.setProperty("--radix-popper-available-height",`${cn}px`),An.setProperty("--radix-popper-anchor-width",`${mn}px`),An.setProperty("--radix-popper-anchor-height",`${In}px`)}}),Pt&&arrow$2({element:Pt,padding:gt}),$cf1ac5d9fe0e8206$var$transformOrigin({arrowWidth:It,arrowHeight:Ot}),kt&&hide$2({strategy:"referenceHidden",...Ut})]}),[rn,nn]=$cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(en),hn=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(Tt);$9f79659886946c16$export$e5c5a5f917a5871c(()=>{sn&&(hn==null||hn())},[sn,hn]);const vn=(it=Kt.arrow)===null||it===void 0?void 0:it.x,an=(ot=Kt.arrow)===null||ot===void 0?void 0:ot.y,Qt=((at=Kt.arrow)===null||at===void 0?void 0:at.centerOffset)!==0,[_n,Pn]=reactExports.useState();return $9f79659886946c16$export$e5c5a5f917a5871c(()=>{$t&&Pn(window.getComputedStyle($t).zIndex)},[$t]),reactExports.createElement("div",{ref:Mt.setFloating,"data-radix-popper-content-wrapper":"",style:{...Ht,transform:sn?Ht.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_n,"--radix-popper-transform-origin":[(st=Kt.transformOrigin)===null||st===void 0?void 0:st.x,(lt=Kt.transformOrigin)===null||lt===void 0?void 0:lt.y].join(" ")},dir:tt.dir},reactExports.createElement($cf1ac5d9fe0e8206$var$PopperContentProvider,{scope:ut,placedSide:rn,onArrowChange:Ct,arrowX:vn,arrowY:an,shouldHideArrow:Qt},reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div,_extends$u({"data-side":rn,"data-align":nn},At,{ref:jt,style:{...At.style,animation:sn?void 0:"none",opacity:(ct=Kt.hide)!==null&&ct!==void 0&&ct.referenceHidden?0:void 0}}))))}),$cf1ac5d9fe0e8206$var$ARROW_NAME="PopperArrow",$cf1ac5d9fe0e8206$var$OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},$cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0=reactExports.forwardRef(function(et,nt){const{__scopePopper:rt,...it}=et,ot=$cf1ac5d9fe0e8206$var$useContentContext($cf1ac5d9fe0e8206$var$ARROW_NAME,rt),at=$cf1ac5d9fe0e8206$var$OPPOSITE_SIDE[ot.placedSide];return reactExports.createElement("span",{ref:ot.onArrowChange,style:{position:"absolute",left:ot.arrowX,top:ot.arrowY,[at]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[ot.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[ot.placedSide],visibility:ot.shouldHideArrow?"hidden":void 0}},reactExports.createElement($7e8f5cd07187803e$export$be92b6f5f03c0fe9,_extends$u({},it,{ref:nt,style:{...it.style,display:"block"}})))});function $cf1ac5d9fe0e8206$var$isNotNull(tt){return tt!==null}const $cf1ac5d9fe0e8206$var$transformOrigin=tt=>({name:"transformOrigin",options:tt,fn(et){var nt,rt,it,ot,at;const{placement:st,rects:lt,middlewareData:ct}=et,ht=((nt=ct.arrow)===null||nt===void 0?void 0:nt.centerOffset)!==0,dt=ht?0:tt.arrowWidth,pt=ht?0:tt.arrowHeight,[mt,gt]=$cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(st),yt={start:"0%",center:"50%",end:"100%"}[gt],bt=((rt=(it=ct.arrow)===null||it===void 0?void 0:it.x)!==null&&rt!==void 0?rt:0)+dt/2,vt=((ot=(at=ct.arrow)===null||at===void 0?void 0:at.y)!==null&&ot!==void 0?ot:0)+pt/2;let xt="",kt="";return mt==="bottom"?(xt=ht?yt:`${bt}px`,kt=`${-pt}px`):mt==="top"?(xt=ht?yt:`${bt}px`,kt=`${lt.floating.height+pt}px`):mt==="right"?(xt=`${-pt}px`,kt=ht?yt:`${vt}px`):mt==="left"&&(xt=`${lt.floating.width+pt}px`,kt=ht?yt:`${vt}px`),{data:{x:xt,y:kt}}}});function $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(tt){const[et,nt="center"]=tt.split("-");return[et,nt]}const $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9=$cf1ac5d9fe0e8206$export$badac9ada3a0bdf9,$cf1ac5d9fe0e8206$export$b688253958b8dfe7=$cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d,$cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2=$cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc,$cf1ac5d9fe0e8206$export$21b07c8f274aebd5=$cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0;function $fe963b355347cc68$export$3e6543de14f8614f(tt,et){return reactExports.useReducer((nt,rt)=>{const it=et[nt][rt];return it??nt},tt)}const $921a889cee6df7e8$export$99c2b779aa4e8b8b=tt=>{const{present:et,children:nt}=tt,rt=$921a889cee6df7e8$var$usePresence(et),it=typeof nt=="function"?nt({present:rt.isPresent}):reactExports.Children.only(nt),ot=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(rt.ref,it.ref);return typeof nt=="function"||rt.isPresent?reactExports.cloneElement(it,{ref:ot}):null};$921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName="Presence";function $921a889cee6df7e8$var$usePresence(tt){const[et,nt]=reactExports.useState(),rt=reactExports.useRef({}),it=reactExports.useRef(tt),ot=reactExports.useRef("none"),at=tt?"mounted":"unmounted",[st,lt]=$fe963b355347cc68$export$3e6543de14f8614f(at,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return reactExports.useEffect(()=>{const ct=$921a889cee6df7e8$var$getAnimationName(rt.current);ot.current=st==="mounted"?ct:"none"},[st]),$9f79659886946c16$export$e5c5a5f917a5871c(()=>{const ct=rt.current,ut=it.current;if(ut!==tt){const dt=ot.current,pt=$921a889cee6df7e8$var$getAnimationName(ct);tt?lt("MOUNT"):pt==="none"||(ct==null?void 0:ct.display)==="none"?lt("UNMOUNT"):lt(ut&&dt!==pt?"ANIMATION_OUT":"UNMOUNT"),it.current=tt}},[tt,lt]),$9f79659886946c16$export$e5c5a5f917a5871c(()=>{if(et){const ct=ht=>{const pt=$921a889cee6df7e8$var$getAnimationName(rt.current).includes(ht.animationName);ht.target===et&&pt&&reactDomExports.flushSync(()=>lt("ANIMATION_END"))},ut=ht=>{ht.target===et&&(ot.current=$921a889cee6df7e8$var$getAnimationName(rt.current))};return et.addEventListener("animationstart",ut),et.addEventListener("animationcancel",ct),et.addEventListener("animationend",ct),()=>{et.removeEventListener("animationstart",ut),et.removeEventListener("animationcancel",ct),et.removeEventListener("animationend",ct)}}else lt("ANIMATION_END")},[et,lt]),{isPresent:["mounted","unmountSuspended"].includes(st),ref:reactExports.useCallback(ct=>{ct&&(rt.current=getComputedStyle(ct)),nt(ct)},[])}}function $921a889cee6df7e8$var$getAnimationName(tt){return(tt==null?void 0:tt.animationName)||"none"}function $71cd76cc60e0454e$export$6f32135080cb4c3({prop:tt,defaultProp:et,onChange:nt=()=>{}}){const[rt,it]=$71cd76cc60e0454e$var$useUncontrolledState({defaultProp:et,onChange:nt}),ot=tt!==void 0,at=ot?tt:rt,st=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(nt),lt=reactExports.useCallback(ct=>{if(ot){const ht=typeof ct=="function"?ct(tt):ct;ht!==tt&&st(ht)}else it(ct)},[ot,tt,it,st]);return[at,lt]}function $71cd76cc60e0454e$var$useUncontrolledState({defaultProp:tt,onChange:et}){const nt=reactExports.useState(tt),[rt]=nt,it=reactExports.useRef(rt),ot=$b1b2314f5f9a1d84$export$25bec8c6f54ee79a(et);return reactExports.useEffect(()=>{it.current!==rt&&(ot(rt),it.current=rt)},[rt,it,ot]),nt}const $ea1ef594cf570d83$export$439d29a4e110a164=reactExports.forwardRef((tt,et)=>reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span,_extends$u({},tt,{ref:et,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...tt.style}}))),$ea1ef594cf570d83$export$be92b6f5f03c0fe9=$ea1ef594cf570d83$export$439d29a4e110a164,[$a093c7e1ec25a057$var$createTooltipContext,$a093c7e1ec25a057$export$1c540a2224f0d865]=$c512c27ab02ef895$export$50c7b4e9d9f19c1("Tooltip",[$cf1ac5d9fe0e8206$export$722aac194ae923]),$a093c7e1ec25a057$var$usePopperScope=$cf1ac5d9fe0e8206$export$722aac194ae923(),$a093c7e1ec25a057$var$PROVIDER_NAME="TooltipProvider",$a093c7e1ec25a057$var$TOOLTIP_OPEN="tooltip.open",[$a093c7e1ec25a057$var$TooltipProviderContextProvider,$a093c7e1ec25a057$var$useTooltipProviderContext]=$a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$PROVIDER_NAME),$a093c7e1ec25a057$var$TOOLTIP_NAME="Tooltip",[$a093c7e1ec25a057$var$TooltipContextProvider,$a093c7e1ec25a057$var$useTooltipContext]=$a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$TOOLTIP_NAME),$a093c7e1ec25a057$export$28c660c63b792dea=tt=>{const{__scopeTooltip:et,children:nt,open:rt,defaultOpen:it=!1,onOpenChange:ot,disableHoverableContent:at,delayDuration:st}=tt,lt=$a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$TOOLTIP_NAME,tt.__scopeTooltip),ct=$a093c7e1ec25a057$var$usePopperScope(et),[ut,ht]=reactExports.useState(null),dt=$1746a345f3d73bb7$export$f680877a34711e37(),pt=reactExports.useRef(0),mt=at??lt.disableHoverableContent,gt=st??lt.delayDuration,yt=reactExports.useRef(!1),[bt=!1,vt]=$71cd76cc60e0454e$export$6f32135080cb4c3({prop:rt,defaultProp:it,onChange:At=>{At?(lt.onOpen(),document.dispatchEvent(new CustomEvent($a093c7e1ec25a057$var$TOOLTIP_OPEN))):lt.onClose(),ot==null||ot(At)}}),xt=reactExports.useMemo(()=>bt?yt.current?"delayed-open":"instant-open":"closed",[bt]),kt=reactExports.useCallback(()=>{window.clearTimeout(pt.current),yt.current=!1,vt(!0)},[vt]),St=reactExports.useCallback(()=>{window.clearTimeout(pt.current),vt(!1)},[vt]),Tt=reactExports.useCallback(()=>{window.clearTimeout(pt.current),pt.current=window.setTimeout(()=>{yt.current=!0,vt(!0)},gt)},[gt,vt]);return reactExports.useEffect(()=>()=>window.clearTimeout(pt.current),[]),reactExports.createElement($cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9,ct,reactExports.createElement($a093c7e1ec25a057$var$TooltipContextProvider,{scope:et,contentId:dt,open:bt,stateAttribute:xt,trigger:ut,onTriggerChange:ht,onTriggerEnter:reactExports.useCallback(()=>{lt.isOpenDelayed?Tt():kt()},[lt.isOpenDelayed,Tt,kt]),onTriggerLeave:reactExports.useCallback(()=>{mt?St():window.clearTimeout(pt.current)},[St,mt]),onOpen:kt,onClose:St,disableHoverableContent:mt},nt))},$a093c7e1ec25a057$var$TRIGGER_NAME="TooltipTrigger",$a093c7e1ec25a057$export$8c610744efcf8a1d=reactExports.forwardRef((tt,et)=>{const{__scopeTooltip:nt,...rt}=tt,it=$a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$TRIGGER_NAME,nt),ot=$a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$TRIGGER_NAME,nt),at=$a093c7e1ec25a057$var$usePopperScope(nt),st=reactExports.useRef(null),lt=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(et,st,it.onTriggerChange),ct=reactExports.useRef(!1),ut=reactExports.useRef(!1),ht=reactExports.useCallback(()=>ct.current=!1,[]);return reactExports.useEffect(()=>()=>document.removeEventListener("pointerup",ht),[ht]),reactExports.createElement($cf1ac5d9fe0e8206$export$b688253958b8dfe7,_extends$u({asChild:!0},at),reactExports.createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button,_extends$u({"aria-describedby":it.open?it.contentId:void 0,"data-state":it.stateAttribute},rt,{ref:lt,onPointerMove:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onPointerMove,dt=>{dt.pointerType!=="touch"&&!ut.current&&!ot.isPointerInTransitRef.current&&(it.onTriggerEnter(),ut.current=!0)}),onPointerLeave:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onPointerLeave,()=>{it.onTriggerLeave(),ut.current=!1}),onPointerDown:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onPointerDown,()=>{ct.current=!0,document.addEventListener("pointerup",ht,{once:!0})}),onFocus:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onFocus,()=>{ct.current||it.onOpen()}),onBlur:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onBlur,it.onClose),onClick:$e42e1063c40fb3ef$export$b9ecd428b558ff10(tt.onClick,it.onClose)})))}),$a093c7e1ec25a057$var$PORTAL_NAME="TooltipPortal",[$a093c7e1ec25a057$var$PortalProvider,$a093c7e1ec25a057$var$usePortalContext]=$a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$PORTAL_NAME,{forceMount:void 0}),$a093c7e1ec25a057$var$CONTENT_NAME="TooltipContent",$a093c7e1ec25a057$export$e9003e2be37ec060=reactExports.forwardRef((tt,et)=>{const nt=$a093c7e1ec25a057$var$usePortalContext($a093c7e1ec25a057$var$CONTENT_NAME,tt.__scopeTooltip),{forceMount:rt=nt.forceMount,side:it="top",...ot}=tt,at=$a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME,tt.__scopeTooltip);return reactExports.createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b,{present:rt||at.open},at.disableHoverableContent?reactExports.createElement($a093c7e1ec25a057$var$TooltipContentImpl,_extends$u({side:it},ot,{ref:et})):reactExports.createElement($a093c7e1ec25a057$var$TooltipContentHoverable,_extends$u({side:it},ot,{ref:et})))}),$a093c7e1ec25a057$var$TooltipContentHoverable=reactExports.forwardRef((tt,et)=>{const nt=$a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME,tt.__scopeTooltip),rt=$a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$CONTENT_NAME,tt.__scopeTooltip),it=reactExports.useRef(null),ot=$6ed0406888f73fc4$export$c7b2cbe3552a0d05(et,it),[at,st]=reactExports.useState(null),{trigger:lt,onClose:ct}=nt,ut=it.current,{onPointerInTransitChange:ht}=rt,dt=reactExports.useCallback(()=>{st(null),ht(!1)},[ht]),pt=reactExports.useCallback((mt,gt)=>{const yt=mt.currentTarget,bt={x:mt.clientX,y:mt.clientY},vt=$a093c7e1ec25a057$var$getExitSideFromRect(bt,yt.getBoundingClientRect()),xt=$a093c7e1ec25a057$var$getPaddedExitPoints(bt,vt),kt=$a093c7e1ec25a057$var$getPointsFromRect(gt.getBoundingClientRect()),St=$a093c7e1ec25a057$var$getHull([...xt,...kt]);st(St),ht(!0)},[ht]);return reactExports.useEffect(()=>()=>dt(),[dt]),reactExports.useEffect(()=>{if(lt&&ut){const mt=yt=>pt(yt,ut),gt=yt=>pt(yt,lt);return lt.addEventListener("pointerleave",mt),ut.addEventListener("pointerleave",gt),()=>{lt.removeEventListener("pointerleave",mt),ut.removeEventListener("pointerleave",gt)}}},[lt,ut,pt,dt]),reactExports.useEffect(()=>{if(at){const mt=gt=>{const yt=gt.target,bt={x:gt.clientX,y:gt.clientY},vt=(lt==null?void 0:lt.contains(yt))||(ut==null?void 0:ut.contains(yt)),xt=!$a093c7e1ec25a057$var$isPointInPolygon(bt,at);vt?dt():xt&&(dt(),ct())};return document.addEventListener("pointermove",mt),()=>document.removeEventListener("pointermove",mt)}},[lt,ut,at,ct,dt]),reactExports.createElement($a093c7e1ec25a057$var$TooltipContentImpl,_extends$u({},tt,{ref:ot}))}),[$a093c7e1ec25a057$var$VisuallyHiddenContentContextProvider,$a093c7e1ec25a057$var$useVisuallyHiddenContentContext]=$a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$TOOLTIP_NAME,{isInside:!1}),$a093c7e1ec25a057$var$TooltipContentImpl=reactExports.forwardRef((tt,et)=>{const{__scopeTooltip:nt,children:rt,"aria-label":it,onEscapeKeyDown:ot,onPointerDownOutside:at,...st}=tt,lt=$a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME,nt),ct=$a093c7e1ec25a057$var$usePopperScope(nt),{onClose:ut}=lt;return reactExports.useEffect(()=>(document.addEventListener($a093c7e1ec25a057$var$TOOLTIP_OPEN,ut),()=>document.removeEventListener($a093c7e1ec25a057$var$TOOLTIP_OPEN,ut)),[ut]),reactExports.useEffect(()=>{if(lt.trigger){const ht=dt=>{const pt=dt.target;pt!=null&&pt.contains(lt.trigger)&&ut()};return window.addEventListener("scroll",ht,{capture:!0}),()=>window.removeEventListener("scroll",ht,{capture:!0})}},[lt.trigger,ut]),reactExports.createElement($5cb92bef7577960e$export$177fb62ff3ec1f22,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:ot,onPointerDownOutside:at,onFocusOutside:ht=>ht.preventDefault(),onDismiss:ut},reactExports.createElement($cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2,_extends$u({"data-state":lt.stateAttribute},ct,st,{ref:et,style:{...st.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),reactExports.createElement($5e63c961fc1ce211$export$d9f1ccf0bdb05d45,null,rt),reactExports.createElement($a093c7e1ec25a057$var$VisuallyHiddenContentContextProvider,{scope:nt,isInside:!0},reactExports.createElement($ea1ef594cf570d83$export$be92b6f5f03c0fe9,{id:lt.contentId,role:"tooltip"},it||rt))))}),$a093c7e1ec25a057$var$ARROW_NAME="TooltipArrow",$a093c7e1ec25a057$export$c27ee0ad710f7559=reactExports.forwardRef((tt,et)=>{const{__scopeTooltip:nt,...rt}=tt,it=$a093c7e1ec25a057$var$usePopperScope(nt);return $a093c7e1ec25a057$var$useVisuallyHiddenContentContext($a093c7e1ec25a057$var$ARROW_NAME,nt).isInside?null:reactExports.createElement($cf1ac5d9fe0e8206$export$21b07c8f274aebd5,_extends$u({},it,rt,{ref:et}))});function $a093c7e1ec25a057$var$getExitSideFromRect(tt,et){const nt=Math.abs(et.top-tt.y),rt=Math.abs(et.bottom-tt.y),it=Math.abs(et.right-tt.x),ot=Math.abs(et.left-tt.x);switch(Math.min(nt,rt,it,ot)){case ot:return"left";case it:return"right";case nt:return"top";case rt:return"bottom";default:throw new Error("unreachable")}}function $a093c7e1ec25a057$var$getPaddedExitPoints(tt,et,nt=5){const rt=[];switch(et){case"top":rt.push({x:tt.x-nt,y:tt.y+nt},{x:tt.x+nt,y:tt.y+nt});break;case"bottom":rt.push({x:tt.x-nt,y:tt.y-nt},{x:tt.x+nt,y:tt.y-nt});break;case"left":rt.push({x:tt.x+nt,y:tt.y-nt},{x:tt.x+nt,y:tt.y+nt});break;case"right":rt.push({x:tt.x-nt,y:tt.y-nt},{x:tt.x-nt,y:tt.y+nt});break}return rt}function $a093c7e1ec25a057$var$getPointsFromRect(tt){const{top:et,right:nt,bottom:rt,left:it}=tt;return[{x:it,y:et},{x:nt,y:et},{x:nt,y:rt},{x:it,y:rt}]}function $a093c7e1ec25a057$var$isPointInPolygon(tt,et){const{x:nt,y:rt}=tt;let it=!1;for(let ot=0,at=et.length-1;otrt!=ut>rt&&nt<(ct-st)*(rt-lt)/(ut-lt)+st&&(it=!it)}return it}function $a093c7e1ec25a057$var$getHull(tt){const et=tt.slice();return et.sort((nt,rt)=>nt.xrt.x?1:nt.yrt.y?1:0),$a093c7e1ec25a057$var$getHullPresorted(et)}function $a093c7e1ec25a057$var$getHullPresorted(tt){if(tt.length<=1)return tt.slice();const et=[];for(let rt=0;rt=2;){const ot=et[et.length-1],at=et[et.length-2];if((ot.x-at.x)*(it.y-at.y)>=(ot.y-at.y)*(it.x-at.x))et.pop();else break}et.push(it)}et.pop();const nt=[];for(let rt=tt.length-1;rt>=0;rt--){const it=tt[rt];for(;nt.length>=2;){const ot=nt[nt.length-1],at=nt[nt.length-2];if((ot.x-at.x)*(it.y-at.y)>=(ot.y-at.y)*(it.x-at.x))nt.pop();else break}nt.push(it)}return nt.pop(),et.length===1&&nt.length===1&&et[0].x===nt[0].x&&et[0].y===nt[0].y?et:et.concat(nt)}const $a093c7e1ec25a057$export$be92b6f5f03c0fe9=$a093c7e1ec25a057$export$28c660c63b792dea,$a093c7e1ec25a057$export$41fb9f06171c75f4=$a093c7e1ec25a057$export$8c610744efcf8a1d,$a093c7e1ec25a057$export$7c6e2c02157bb7d2=$a093c7e1ec25a057$export$e9003e2be37ec060,$a093c7e1ec25a057$export$21b07c8f274aebd5=$a093c7e1ec25a057$export$c27ee0ad710f7559;function _objectWithoutPropertiesLoose$o(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function _objectWithoutProperties$l(tt,et){if(tt==null)return{};var nt=_objectWithoutPropertiesLoose$o(tt,et),rt,it;if(Object.getOwnPropertySymbols){var ot=Object.getOwnPropertySymbols(tt);for(it=0;it=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}let LevaErrors;(function(tt){tt[tt.UNSUPPORTED_INPUT=0]="UNSUPPORTED_INPUT",tt[tt.NO_COMPONENT_FOR_TYPE=1]="NO_COMPONENT_FOR_TYPE",tt[tt.UNKNOWN_INPUT=2]="UNKNOWN_INPUT",tt[tt.DUPLICATE_KEYS=3]="DUPLICATE_KEYS",tt[tt.ALREADY_REGISTERED_TYPE=4]="ALREADY_REGISTERED_TYPE",tt[tt.CLIPBOARD_ERROR=5]="CLIPBOARD_ERROR",tt[tt.THEME_ERROR=6]="THEME_ERROR",tt[tt.PATH_DOESNT_EXIST=7]="PATH_DOESNT_EXIST",tt[tt.INPUT_TYPE_OVERRIDE=8]="INPUT_TYPE_OVERRIDE",tt[tt.EMPTY_KEY=9]="EMPTY_KEY"})(LevaErrors||(LevaErrors={}));const ErrorList={[LevaErrors.UNSUPPORTED_INPUT]:(tt,et)=>[`An input with type \`${tt}\` input was found at path \`${et}\` but it's not supported yet.`],[LevaErrors.NO_COMPONENT_FOR_TYPE]:(tt,et)=>[`Type \`${tt}\` found at path \`${et}\` can't be displayed in panel because no component supports it yet.`],[LevaErrors.UNKNOWN_INPUT]:(tt,et)=>[`input at path \`${tt}\` is not recognized.`,et],[LevaErrors.DUPLICATE_KEYS]:(tt,et,nt)=>[`Key \`${tt}\` of path \`${et}\` already exists at path \`${nt}\`. Even nested keys need to be unique. Rename one of the keys.`],[LevaErrors.ALREADY_REGISTERED_TYPE]:tt=>[`Type ${tt} has already been registered. You can't register a component with the same type.`],[LevaErrors.CLIPBOARD_ERROR]:tt=>["Error copying the value",tt],[LevaErrors.THEME_ERROR]:(tt,et)=>[`Error accessing the theme \`${tt}.${et}\` value.`],[LevaErrors.PATH_DOESNT_EXIST]:tt=>[`Error getting the value at path \`${tt}\`. There is probably an error in your \`render\` function.`],[LevaErrors.PATH_DOESNT_EXIST]:tt=>[`Error accessing the value at path \`${tt}\``],[LevaErrors.INPUT_TYPE_OVERRIDE]:(tt,et,nt)=>[`Input at path \`${tt}\` already exists with type: \`${et}\`. Its type cannot be overridden with type \`${nt}\`.`],[LevaErrors.EMPTY_KEY]:()=>["Keys can not be empty, if you want to hide a label use whitespace."]};function _log(tt,et,...nt){const[rt,...it]=ErrorList[et](...nt);console[tt]("LEVA: "+rt,...it)}const warn$3=_log.bind(null,"warn"),log$2=_log.bind(null,"log"),_excluded$a$1=["value"],_excluded2$4$1=["schema"],_excluded3$1$1=["value"],Schemas=[],Plugins={};function getValueType(tt){let{value:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$a$1);for(let rt of Schemas){const it=rt(et,nt);if(it)return it}}function register(tt,et){let{schema:nt}=et,rt=_objectWithoutProperties$l(et,_excluded2$4$1);if(tt in Plugins){warn$3(LevaErrors.ALREADY_REGISTERED_TYPE,tt);return}Schemas.push((it,ot)=>nt(it,ot)&&tt),Plugins[tt]=rt}function createInternalPlugin(tt){return tt}function normalize$3$1(tt,et,nt,rt){const{normalize:it}=Plugins[tt];if(it)return it(et,nt,rt);if(typeof et!="object"||!("value"in et))return{value:et};const{value:ot}=et,at=_objectWithoutProperties$l(et,_excluded3$1$1);return{value:ot,settings:at}}function sanitize$4(tt,et,nt,rt,it,ot){const{sanitize:at}=Plugins[tt];return at?at(et,nt,rt,it,ot):et}function format$2$1(tt,et,nt){const{format:rt}=Plugins[tt];return rt?rt(et,nt):et}function _defineProperty$G(tt,et,nt){return et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function ownKeys$E(tt,et){var nt=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);et&&(rt=rt.filter(function(it){return Object.getOwnPropertyDescriptor(tt,it).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread2$1(tt){for(var et=1;ettt>nt?nt:tt{if(tt===""||typeof tt=="number")return tt;try{const et=evaluate(tt);if(!isNaN(et))return et}catch{}return parseFloat(tt)},log10=Math.log(10);function getStep(tt){let et=Math.abs(+String(tt).replace(".",""));if(et===0)return .01;for(;et!==0&&et%10===0;)et/=10;const nt=Math.floor(Math.log(et)/log10)+1,rt=Math.floor(Math.log10(Math.abs(tt))),it=Math.pow(10,rt-nt);return Math.max(it,.001)}const range$8=(tt,et,nt)=>nt===et?0:(clamp$8(tt,et,nt)-et)/(nt-et),invertedRange=(tt,et,nt)=>tt*(nt-et)+et,getUid=()=>"_"+Math.random().toString(36).substr(2,9),parens=/\(([0-9+\-*/^ .]+)\)/,exp$2=/(\d+(?:\.\d+)?) ?\^ ?(\d+(?:\.\d+)?)/,mul=/(\d+(?:\.\d+)?) ?\* ?(\d+(?:\.\d+)?)/,div=/(\d+(?:\.\d+)?) ?\/ ?(\d+(?:\.\d+)?)/,add$5=/(\d+(?:\.\d+)?) ?\+ ?(\d+(?:\.\d+)?)/,sub=/(\d+(?:\.\d+)?) ?- ?(\d+(?:\.\d+)?)/;function evaluate(tt){if(isNaN(Number(tt)))if(parens.test(tt)){const et=tt.replace(parens,(nt,rt)=>String(evaluate(rt)));return evaluate(et)}else if(exp$2.test(tt)){const et=tt.replace(exp$2,(nt,rt,it)=>String(Math.pow(Number(rt),Number(it))));return evaluate(et)}else if(mul.test(tt)){const et=tt.replace(mul,(nt,rt,it)=>String(Number(rt)*Number(it)));return evaluate(et)}else if(div.test(tt)){const et=tt.replace(div,(nt,rt,it)=>{if(it!=0)return String(Number(rt)/Number(it));throw new Error("Division by zero")});return evaluate(et)}else if(add$5.test(tt)){const et=tt.replace(add$5,(nt,rt,it)=>String(Number(rt)+Number(it)));return evaluate(et)}else if(sub.test(tt)){const et=tt.replace(sub,(nt,rt,it)=>String(Number(rt)-Number(it)));return evaluate(et)}else return Number(tt);return Number(tt)}function pick$1(tt,et){return et.reduce((nt,rt)=>(tt&&tt.hasOwnProperty(rt)&&(nt[rt]=tt[rt]),nt),{})}function omit$1(tt,et){const nt=_objectSpread2$1({},tt);return et.forEach(rt=>rt in tt&&delete nt[rt]),nt}function mapArrayToKeys(tt,et){return tt.reduce((nt,rt,it)=>Object.assign(nt,{[et[it]]:rt}),{})}function isObject$o(tt){return Object.prototype.toString.call(tt)==="[object Object]"}const isEmptyObject$1=tt=>isObject$o(tt)&&Object.keys(tt).length===0;let SpecialInputs;(function(tt){tt.BUTTON="BUTTON",tt.BUTTON_GROUP="BUTTON_GROUP",tt.MONITOR="MONITOR",tt.FOLDER="FOLDER"})(SpecialInputs||(SpecialInputs={}));let LevaInputs;(function(tt){tt.SELECT="SELECT",tt.IMAGE="IMAGE",tt.NUMBER="NUMBER",tt.COLOR="COLOR",tt.STRING="STRING",tt.BOOLEAN="BOOLEAN",tt.INTERVAL="INTERVAL",tt.VECTOR3D="VECTOR3D",tt.VECTOR2D="VECTOR2D"})(LevaInputs||(LevaInputs={}));const _excluded$9$1=["type","__customInput"],_excluded2$3$1=["render","label","optional","order","disabled","hint","onChange","onEditStart","onEditEnd","transient"],_excluded3$6=["type"];function parseOptions(tt,et,nt={},rt){var it,ot;if(typeof tt!="object"||Array.isArray(tt))return{type:rt,input:tt,options:_objectSpread2$1({key:et,label:et,optional:!1,disabled:!1,order:0},nt)};if("__customInput"in tt){const{type:St,__customInput:Tt}=tt,At=_objectWithoutProperties$l(tt,_excluded$9$1);return parseOptions(Tt,et,At,St)}const{render:at,label:st,optional:lt,order:ct=0,disabled:ut,hint:ht,onChange:dt,onEditStart:pt,onEditEnd:mt,transient:gt}=tt,yt=_objectWithoutProperties$l(tt,_excluded2$3$1),bt=_objectSpread2$1({render:at,key:et,label:st??et,hint:ht,transient:gt??!!dt,onEditStart:pt,onEditEnd:mt,disabled:ut,optional:lt,order:ct},nt);let{type:vt}=yt,xt=_objectWithoutProperties$l(yt,_excluded3$6);if(vt=rt??vt,vt in SpecialInputs)return{type:vt,input:xt,options:bt};let kt;return rt&&isObject$o(xt)&&"value"in xt?kt=xt.value:kt=isEmptyObject$1(xt)?void 0:xt,{type:vt,input:kt,options:_objectSpread2$1(_objectSpread2$1({},bt),{},{onChange:dt,optional:(it=bt.optional)!==null&&it!==void 0?it:!1,disabled:(ot=bt.disabled)!==null&&ot!==void 0?ot:!1})}}function normalizeInput(tt,et,nt,rt){const it=parseOptions(tt,et),{type:ot,input:at,options:st}=it;if(ot)return ot in SpecialInputs?it:{type:ot,input:normalize$3$1(ot,at,nt,rt),options:st};let lt=getValueType(at);return lt?{type:lt,input:normalize$3$1(lt,at,nt,rt),options:st}:(lt=getValueType({value:at}),lt?{type:lt,input:normalize$3$1(lt,{value:at},nt,rt),options:st}:!1)}function updateInput(tt,et,nt,rt,it){const{value:ot,type:at,settings:st}=tt;tt.value=sanitizeValue({type:at,value:ot,settings:st},et,nt,rt),tt.fromPanel=it}const ValueError=function(et,nt,rt){this.type="LEVA_ERROR",this.message="LEVA: "+et,this.previousValue=nt,this.error=rt};function sanitizeValue({type:tt,value:et,settings:nt},rt,it,ot){const at=tt!=="SELECT"&&typeof rt=="function"?rt(et):rt;let st;try{st=sanitize$4(tt,at,nt,et,it,ot)}catch(lt){throw new ValueError(`The value \`${rt}\` did not result in a correct value.`,et,lt)}return dequal(st,et)?et:st}const debounce$6=(tt,et,nt=!1)=>{let rt=0;return function(){const it=arguments,ot=nt&&!rt,at=()=>tt.apply(this,it);window.clearTimeout(rt),rt=window.setTimeout(at,et),ot&&at()}},multiplyStep=tt=>tt.shiftKey?5:tt.altKey?1/5:1;function render(tt,et){const nt=console.error;console.error=()=>{},ReactDOM.render(tt,et),console.error=nt}const _excluded$8$1=["value"],_excluded2$2$1=["min","max"],schema$3=tt=>{if(typeof tt=="number")return!0;if(typeof tt=="string"){const et=parseFloat(tt);return isNaN(et)?!1:tt.substring((""+et).length).trim().length<4}return!1},sanitize$3=(tt,{min:et=-1/0,max:nt=1/0,suffix:rt})=>{const it=parseFloat(tt);if(tt===""||isNaN(it))throw Error("Invalid number");const ot=clamp$8(it,et,nt);return rt?ot+rt:ot},format$1$2=(tt,{pad:et=0,suffix:nt})=>{const rt=parseFloat(tt).toFixed(et);return nt?rt+nt:rt},normalize$2$2=tt=>{let{value:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$8$1);const{min:rt=-1/0,max:it=1/0}=nt,ot=_objectWithoutProperties$l(nt,_excluded2$2$1);let at=parseFloat(et);const st=typeof et=="string"?et.substring((""+at).length):void 0;at=clamp$8(at,rt,it);let lt=nt.step;lt||(Number.isFinite(rt)?Number.isFinite(it)?lt=+(Math.abs(it-rt)/100).toPrecision(1):lt=+(Math.abs(at-rt)/100).toPrecision(1):Number.isFinite(it)&&(lt=+(Math.abs(it-at)/100).toPrecision(1)));const ct=lt?getStep(lt)*10:getStep(at);lt=lt||ct/10;const ut=Math.round(clamp$8(Math.log10(1/ct),0,2));return{value:st?at+st:at,settings:_objectSpread2$1({initialValue:at,step:lt,pad:ut,min:rt,max:it,suffix:st},ot)}},sanitizeStep$1=(tt,{step:et,initialValue:nt})=>{const rt=Math.round((tt-nt)/et);return nt+rt*et};var props$3$1=Object.freeze({__proto__:null,schema:schema$3,sanitize:sanitize$3,format:format$1$2,normalize:normalize$2$2,sanitizeStep:sanitizeStep$1});function _extends$t(){return _extends$t=Object.assign?Object.assign.bind():function(tt){for(var et=1;et({colors:{elevation1:"#292d39",elevation2:"#181c20",elevation3:"#373c4b",accent1:"#0066dc",accent2:"#007bff",accent3:"#3c93ff",highlight1:"#535760",highlight2:"#8c92a4",highlight3:"#fefefe",vivid1:"#ffcc00",folderWidgetColor:"$highlight2",folderTextColor:"$highlight3",toolTipBackground:"$highlight3",toolTipText:"$elevation2"},radii:{xs:"2px",sm:"3px",lg:"10px"},space:{xs:"3px",sm:"6px",md:"10px",rowGap:"7px",colGap:"7px"},fonts:{mono:"ui-monospace, SFMono-Regular, Menlo, 'Roboto Mono', monospace",sans:"system-ui, sans-serif"},fontSizes:{root:"11px",toolTip:"$root"},sizes:{rootWidth:"280px",controlWidth:"160px",numberInputMinWidth:"38px",scrubberWidth:"8px",scrubberHeight:"16px",rowHeight:"24px",folderTitleHeight:"20px",checkboxSize:"16px",joystickWidth:"100px",joystickHeight:"100px",colorPickerWidth:"$controlWidth",colorPickerHeight:"100px",imagePreviewWidth:"$controlWidth",imagePreviewHeight:"100px",monitorHeight:"60px",titleBarHeight:"39px"},shadows:{level1:"0 0 9px 0 #00000088",level2:"0 4px 14px #00000033"},borderWidths:{root:"0px",input:"1px",focus:"1px",hover:"1px",active:"1px",folder:"1px"},fontWeights:{label:"normal",folder:"normal",button:"normal"}});function createStateClass(tt,et){const[nt,rt]=tt.split(" "),it={};return nt!=="none"&&(it.boxShadow=`${et.inset?"inset ":""}0 0 0 $borderWidths${[et.key]} $colors${nt!=="default"&&nt||et.borderColor}`),rt&&(it.backgroundColor=rt),it}const utils$r={$inputStyle:()=>tt=>createStateClass(tt,{key:"$input",borderColor:"$highlight1",inset:!0}),$focusStyle:()=>tt=>createStateClass(tt,{key:"$focus",borderColor:"$accent2"}),$hoverStyle:()=>tt=>createStateClass(tt,{key:"$hover",borderColor:"$accent1",inset:!0}),$activeStyle:()=>tt=>createStateClass(tt,{key:"$active",borderColor:"$accent1",inset:!0})},{styled:styled$5,css:css$1,createTheme:createTheme$2,globalCss,keyframes:keyframes$1}=q$7({prefix:"leva",theme:getDefaultTheme(),utils:_objectSpread2$1(_objectSpread2$1({},utils$r),{},{$flex:()=>({display:"flex",alignItems:"center"}),$flexCenter:()=>({display:"flex",alignItems:"center",justifyContent:"center"}),$reset:()=>({outline:"none",fontSize:"inherit",fontWeight:"inherit",color:"inherit",fontFamily:"inherit",border:"none",backgroundColor:"transparent",appearance:"none"}),$draggable:()=>({touchAction:"none",WebkitUserDrag:"none",userSelect:"none"}),$focus:tt=>({"&:focus":utils$r.$focusStyle()(tt)}),$focusWithin:tt=>({"&:focus-within":utils$r.$focusStyle()(tt)}),$hover:tt=>({"&:hover":utils$r.$hoverStyle()(tt)}),$active:tt=>({"&:active":utils$r.$activeStyle()(tt)})})}),globalStyles=globalCss({".leva__panel__dragged":{WebkitUserDrag:"none",userSelect:"none",input:{userSelect:"none"},"*":{cursor:"ew-resize !important"}}});function mergeTheme(tt){const et=getDefaultTheme();if(!tt)return{theme:et,className:""};Object.keys(tt).forEach(rt=>{Object.assign(et[rt],tt[rt])});const nt=createTheme$2(et);return{theme:et,className:nt.className}}function useTh(tt,et){const{theme:nt}=reactExports.useContext(ThemeContext$3);if(!(tt in nt)||!(et in nt[tt]))return warn$3(LevaErrors.THEME_ERROR,tt,et),"";let rt=et;for(;;){let it=nt[tt][rt];if(typeof it=="string"&&it.charAt(0)==="$")rt=it.substr(1);else return it}}const StyledInput$2=styled$5("input",{$reset:"",padding:"0 $sm",width:0,minWidth:0,flex:1,height:"100%",variants:{levaType:{number:{textAlign:"right"}},as:{textarea:{padding:"$sm"}}}}),InnerLabel=styled$5("div",{$draggable:"",height:"100%",$flexCenter:"",position:"relative",padding:"0 $xs",fontSize:"0.8em",opacity:.8,cursor:"default",touchAction:"none",[`& + ${StyledInput$2}`]:{paddingLeft:0}}),InnerNumberLabel=styled$5(InnerLabel,{cursor:"ew-resize",marginRight:"-$xs",textTransform:"uppercase",opacity:.3,"&:hover":{opacity:1},variants:{dragging:{true:{backgroundColor:"$accent2",opacity:1}}}}),InputContainer=styled$5("div",{$flex:"",position:"relative",borderRadius:"$sm",overflow:"hidden",color:"inherit",height:"$rowHeight",backgroundColor:"$elevation3",$inputStyle:"$elevation1",$hover:"",$focusWithin:"",variants:{textArea:{true:{height:"auto"}}}}),_excluded$7$2=["innerLabel","value","onUpdate","onChange","onKeyDown","type","id","inputType","rows"],_excluded2$1$2=["onUpdate"];function ValueInput(tt){let{innerLabel:et,value:nt,onUpdate:rt,onChange:it,onKeyDown:ot,type:at,id:st,inputType:lt="text",rows:ct=0}=tt,ut=_objectWithoutProperties$l(tt,_excluded$7$2);const{id:ht,emitOnEditStart:dt,emitOnEditEnd:pt,disabled:mt}=useInputContext(),gt=st||ht,yt=reactExports.useRef(null),bt=ct>0,vt=bt?"textarea":"input",xt=reactExports.useCallback(Tt=>At=>{const Et=At.currentTarget.value;Tt(Et)},[]);React$1.useEffect(()=>{const Tt=yt.current,At=xt(Et=>{rt(Et),pt()});return Tt==null||Tt.addEventListener("blur",At),()=>Tt==null?void 0:Tt.removeEventListener("blur",At)},[xt,rt,pt]);const kt=reactExports.useCallback(Tt=>{Tt.key==="Enter"&&xt(rt)(Tt)},[xt,rt]),St=Object.assign({as:vt},bt?{rows:ct}:{},ut);return React$1.createElement(InputContainer,{textArea:bt},et&&typeof et=="string"?React$1.createElement(InnerLabel,null,et):et,React$1.createElement(StyledInput$2,_extends$t({levaType:at,ref:yt,id:gt,type:lt,autoComplete:"off",spellCheck:"false",value:nt,onChange:xt(it),onFocus:()=>dt(),onKeyPress:kt,onKeyDown:ot,disabled:mt},St)))}function NumberInput(tt){let{onUpdate:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded2$1$2);const rt=reactExports.useCallback(ot=>et(parseNumber(ot)),[et]),it=reactExports.useCallback(ot=>{const at=ot.key==="ArrowUp"?1:ot.key==="ArrowDown"?-1:0;if(at){ot.preventDefault();const st=ot.altKey?.1:ot.shiftKey?10:1;et(lt=>parseFloat(lt)+at*st)}},[et]);return React$1.createElement(ValueInput,_extends$t({},nt,{onUpdate:rt,onKeyDown:it,type:"number"}))}const StyledFolder=styled$5("div",{}),StyledWrapper=styled$5("div",{position:"relative",background:"$elevation2",transition:"height 300ms ease",variants:{fill:{true:{},false:{}},flat:{false:{},true:{}},isRoot:{true:{},false:{paddingLeft:"$md","&::after":{content:'""',position:"absolute",left:0,top:0,width:"$borderWidths$folder",height:"100%",backgroundColor:"$folderWidgetColor",opacity:.4,transform:"translateX(-50%)"}}}},compoundVariants:[{isRoot:!0,fill:!1,css:{overflowY:"auto",maxHeight:"calc(100vh - 20px - $$titleBarHeight)"}},{isRoot:!0,flat:!1,css:{borderRadius:"$lg"}}]}),StyledTitle=styled$5("div",{$flex:"",color:"$folderTextColor",userSelect:"none",cursor:"pointer",height:"$folderTitleHeight",fontWeight:"$folder","> svg":{marginLeft:-4,marginRight:4,cursor:"pointer",fill:"$folderWidgetColor",opacity:.6},"&:hover > svg":{fill:"$folderWidgetColor"},[`&:hover + ${StyledWrapper}::after`]:{opacity:.6},[`${StyledFolder}:hover > & + ${StyledWrapper}::after`]:{opacity:.6},[`${StyledFolder}:hover > & > svg`]:{opacity:1}}),StyledContent=styled$5("div",{position:"relative",display:"grid",gridTemplateColumns:"100%",rowGap:"$rowGap",transition:"opacity 250ms ease",variants:{toggled:{true:{opacity:1,transitionDelay:"250ms"},false:{opacity:0,transitionDelay:"0ms",pointerEvents:"none"}},isRoot:{true:{"& > div":{paddingLeft:"$md",paddingRight:"$md"},"& > div:first-of-type":{paddingTop:"$sm"},"& > div:last-of-type":{paddingBottom:"$sm"},[`> ${StyledFolder}:not(:first-of-type)`]:{paddingTop:"$sm",marginTop:"$md",borderTop:"$borderWidths$folder solid $colors$elevation1"}}}}}),StyledRow=styled$5("div",{position:"relative",zIndex:100,display:"grid",rowGap:"$rowGap",gridTemplateRows:"minmax($sizes$rowHeight, max-content)",alignItems:"center",color:"$highlight2",[`${StyledContent} > &`]:{"&:first-of-type":{marginTop:"$rowGap"},"&:last-of-type":{marginBottom:"$rowGap"}},variants:{disabled:{true:{pointerEvents:"none"},false:{"&:hover,&:focus-within":{color:"$highlight3"}}}}}),StyledInputRow=styled$5(StyledRow,{gridTemplateColumns:"auto $sizes$controlWidth",columnGap:"$colGap"}),CopyLabelContainer=styled$5("div",{$flex:"",height:"100%",position:"relative",overflow:"hidden","& > div":{marginLeft:"$colGap",padding:"0 $xs",opacity:.4},"& > div:hover":{opacity:.8},"& > div > svg":{display:"none",cursor:"pointer",width:13,minWidth:13,height:13,backgroundColor:"$elevation2"},"&:hover > div > svg":{display:"block"},variants:{align:{top:{height:"100%",alignItems:"flex-start",paddingTop:"$sm"}}}}),StyledOptionalToggle=styled$5("input",{$reset:"",height:0,width:0,opacity:0,margin:0,"& + label":{position:"relative",$flexCenter:"",height:"100%",userSelect:"none",cursor:"pointer",paddingLeft:2,paddingRight:"$sm",pointerEvents:"auto"},"& + label:after":{content:'""',width:6,height:6,backgroundColor:"$elevation3",borderRadius:"50%",$activeStyle:""},"&:focus + label:after":{$focusStyle:""},"& + label:active:after":{backgroundColor:"$accent1",$focusStyle:""},"&:checked + label:after":{backgroundColor:"$accent1"}}),StyledLabel=styled$5("label",{fontWeight:"$label",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > svg":{display:"block"}}),StyledInputWrapper$1=styled$5("div",{opacity:1,variants:{disabled:{true:{opacity:.6,pointerEvents:"none",[`& ${StyledLabel}`]:{pointerEvents:"auto"}}}}}),Overlay$1=styled$5("div",{position:"fixed",top:0,bottom:0,right:0,left:0,zIndex:1e3,userSelect:"none"}),StyledToolTipContent=styled$5("div",{background:"$toolTipBackground",fontFamily:"$sans",fontSize:"$toolTip",padding:"$xs $sm",color:"$toolTipText",borderRadius:"$xs",boxShadow:"$level2",maxWidth:260}),ToolTipArrow=styled$5($a093c7e1ec25a057$export$21b07c8f274aebd5,{fill:"$toolTipBackground"});function Portal$2({children:tt}){const{className:et}=reactExports.useContext(ThemeContext$3);return React$1.createElement($f1701beae083dbae$export$be92b6f5f03c0fe9,{className:et},tt)}const _excluded$6$2=["align"];function OptionalToggle(){const{id:tt,disable:et,disabled:nt}=useInputContext();return React$1.createElement(React$1.Fragment,null,React$1.createElement(StyledOptionalToggle,{id:tt+"__disable",type:"checkbox",checked:!nt,onChange:()=>et(!nt)}),React$1.createElement("label",{htmlFor:tt+"__disable"}))}function RawLabel(tt){const{id:et,optional:nt,hint:rt}=useInputContext(),it=tt.htmlFor||(et?{htmlFor:et}:null),ot=!rt&&typeof tt.children=="string"?{title:tt.children}:null;return React$1.createElement(React$1.Fragment,null,nt&&React$1.createElement(OptionalToggle,null),rt!==void 0?React$1.createElement($a093c7e1ec25a057$export$be92b6f5f03c0fe9,null,React$1.createElement($a093c7e1ec25a057$export$41fb9f06171c75f4,{asChild:!0},React$1.createElement(StyledLabel,_extends$t({},it,tt))),React$1.createElement($a093c7e1ec25a057$export$7c6e2c02157bb7d2,{side:"top",sideOffset:2},React$1.createElement(StyledToolTipContent,null,rt,React$1.createElement(ToolTipArrow,null)))):React$1.createElement(StyledLabel,_extends$t({},it,ot,tt)))}function Label$4(tt){let{align:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$6$2);const{value:rt,label:it,key:ot,disabled:at}=useInputContext(),{hideCopyButton:st}=usePanelSettingsContext(),lt=!st&&ot!==void 0,[ct,ut]=reactExports.useState(!1),ht=async()=>{try{await navigator.clipboard.writeText(JSON.stringify({[ot]:rt??""})),ut(!0)}catch{warn$3(LevaErrors.CLIPBOARD_ERROR,{[ot]:rt})}};return React$1.createElement(CopyLabelContainer,{align:et,onPointerLeave:()=>ut(!1)},React$1.createElement(RawLabel,nt),lt&&!at&&React$1.createElement("div",{title:`Click to copy ${typeof it=="string"?it:ot} value`},ct?React$1.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},React$1.createElement("path",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),React$1.createElement("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm9.707 5.707a1 1 0 00-1.414-1.414L9 12.586l-1.293-1.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})):React$1.createElement("svg",{onClick:ht,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},React$1.createElement("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),React$1.createElement("path",{d:"M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z"}))))}const _excluded$5$2=["toggled"],Svg$1=styled$5("svg",{fill:"currentColor",transition:"transform 350ms ease, fill 250ms ease"});function Chevron(tt){let{toggled:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$5$2);return React$1.createElement(Svg$1,_extends$t({width:"9",height:"5",viewBox:"0 0 9 5",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${et?0:-90}deg)`}},nt),React$1.createElement("path",{d:"M3.8 4.4c.4.3 1 .3 1.4 0L8 1.7A1 1 0 007.4 0H1.6a1 1 0 00-.7 1.7l3 2.7z"}))}const _excluded$4$2=["input"];function Row(tt){let{input:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$4$2);return et?React$1.createElement(StyledInputRow,nt):React$1.createElement(StyledRow,nt)}function useInputSetters({value:tt,type:et,settings:nt,setValue:rt}){const[it,ot]=reactExports.useState(format$2$1(et,tt,nt)),at=reactExports.useRef(tt),st=reactExports.useRef(nt);st.current=nt;const lt=reactExports.useCallback(ut=>ot(format$2$1(et,ut,st.current)),[et]),ct=reactExports.useCallback(ut=>{try{rt(ut)}catch(ht){const{type:dt,previousValue:pt}=ht;if(dt!=="LEVA_ERROR")throw ht;lt(pt)}},[lt,rt]);return reactExports.useEffect(()=>{dequal(tt,at.current)||lt(tt),at.current=tt},[tt,lt]),{displayValue:it,onChange:ot,onUpdate:ct}}function useDrag$1(tt,et){const{emitOnEditStart:nt,emitOnEditEnd:rt}=useInputContext();return useDrag$2(it=>{it.first&&(document.body.classList.add("leva__panel__dragged"),nt==null||nt());const ot=tt(it);return it.last&&(document.body.classList.remove("leva__panel__dragged"),rt==null||rt()),ot},et)}function useCanvas2d(tt){const et=reactExports.useRef(null),nt=reactExports.useRef(null),rt=reactExports.useRef(!1);return reactExports.useEffect(()=>{const it=debounce$6(()=>{et.current.width=et.current.offsetWidth*window.devicePixelRatio,et.current.height=et.current.offsetHeight*window.devicePixelRatio,tt(et.current,nt.current)},250);return window.addEventListener("resize",it),rt.current||(it(),rt.current=!0),()=>window.removeEventListener("resize",it)},[tt]),reactExports.useEffect(()=>{nt.current=et.current.getContext("2d")},[]),[et,nt]}function useTransform(){const tt=reactExports.useRef(null),et=reactExports.useRef({x:0,y:0}),nt=reactExports.useCallback(rt=>{Object.assign(et.current,rt),tt.current&&(tt.current.style.transform=`translate3d(${et.current.x}px, ${et.current.y}px, 0)`)},[]);return[tt,nt]}const _excluded$3$2=["__refCount"],getInputAtPath=(tt,et)=>{if(!tt[et])return null;const nt=tt[et];return _objectWithoutProperties$l(nt,_excluded$3$2)};function useInput(tt){const et=useStoreContext(),[nt,rt]=reactExports.useState(getInputAtPath(et.getData(),tt)),it=reactExports.useCallback(ct=>et.setValueAtPath(tt,ct,!0),[tt,et]),ot=reactExports.useCallback(ct=>et.setSettingsAtPath(tt,ct),[tt,et]),at=reactExports.useCallback(ct=>et.disableInputAtPath(tt,ct),[tt,et]),st=reactExports.useCallback(()=>et.emitOnEditStart(tt),[tt,et]),lt=reactExports.useCallback(()=>et.emitOnEditEnd(tt),[tt,et]);return reactExports.useEffect(()=>{rt(getInputAtPath(et.getData(),tt));const ct=et.useStore.subscribe(ut=>getInputAtPath(ut.data,tt),rt,{equalityFn:shallow$2});return()=>ct()},[et,tt]),[nt,{set:it,setSettings:ot,disable:at,storeId:et.storeId,emitOnEditStart:st,emitOnEditEnd:lt}]}const RangeGrid=styled$5("div",{variants:{hasRange:{true:{position:"relative",display:"grid",gridTemplateColumns:"auto $sizes$numberInputMinWidth",columnGap:"$colGap",alignItems:"center"}}}}),Range=styled$5("div",{position:"relative",width:"100%",height:2,borderRadius:"$xs",backgroundColor:"$elevation1"}),Scrubber=styled$5("div",{position:"absolute",width:"$scrubberWidth",height:"$scrubberHeight",borderRadius:"$xs",boxShadow:"0 0 0 2px $colors$elevation2",backgroundColor:"$accent2",cursor:"pointer",$active:"none $accent1",$hover:"none $accent3",variants:{position:{left:{borderTopRightRadius:0,borderBottomRightRadius:0,transform:"translateX(calc(-0.5 * ($sizes$scrubberWidth + 4px)))"},right:{borderTopLeftRadius:0,borderBottomLeftRadius:0,transform:"translateX(calc(0.5 * ($sizes$scrubberWidth + 4px)))"}}}}),RangeWrapper=styled$5("div",{position:"relative",$flex:"",height:"100%",cursor:"pointer",touchAction:"none"}),Indicator=styled$5("div",{position:"absolute",height:"100%",backgroundColor:"$accent2"});function RangeSlider({value:tt,min:et,max:nt,onDrag:rt,step:it,initialValue:ot}){const at=reactExports.useRef(null),st=reactExports.useRef(null),lt=reactExports.useRef(0),ct=useTh("sizes","scrubberWidth"),ut=useDrag$1(({event:dt,first:pt,xy:[mt],movement:[gt],memo:yt})=>{if(pt){const{width:vt,left:xt}=at.current.getBoundingClientRect();lt.current=vt-parseFloat(ct),yt=(dt==null?void 0:dt.target)===st.current?tt:invertedRange((mt-xt)/vt,et,nt)}const bt=yt+invertedRange(gt/lt.current,0,nt-et);return rt(sanitizeStep$1(bt,{step:it,initialValue:ot})),yt}),ht=range$8(tt,et,nt);return React$1.createElement(RangeWrapper,_extends$t({ref:at},ut()),React$1.createElement(Range,null,React$1.createElement(Indicator,{style:{left:0,right:`${(1-ht)*100}%`}})),React$1.createElement(Scrubber,{ref:st,style:{left:`calc(${ht} * (100% - ${ct}))`}}))}const DraggableLabel=React$1.memo(({label:tt,onUpdate:et,step:nt,innerLabelTrim:rt})=>{const[it,ot]=reactExports.useState(!1),at=useDrag$1(({active:st,delta:[lt],event:ct,memo:ut=0})=>(ot(st),ut+=lt/2,Math.abs(ut)>=1&&(et(ht=>parseFloat(ht)+Math.floor(ut)*nt*multiplyStep(ct)),ut=0),ut));return React$1.createElement(InnerNumberLabel,_extends$t({dragging:it,title:tt.length>1?tt:""},at()),tt.slice(0,rt))});function Number$1({label:tt,id:et,displayValue:nt,onUpdate:rt,onChange:it,settings:ot,innerLabelTrim:at=1}){const st=at>0&&React$1.createElement(DraggableLabel,{label:tt,step:ot.step,onUpdate:rt,innerLabelTrim:at});return React$1.createElement(NumberInput,{id:et,value:String(nt),onUpdate:rt,onChange:it,innerLabel:st})}function NumberComponent(){const tt=useInputContext(),{label:et,value:nt,onUpdate:rt,settings:it,id:ot}=tt,{min:at,max:st}=it,lt=st!==1/0&&at!==-1/0;return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,et),React$1.createElement(RangeGrid,{hasRange:lt},lt&&React$1.createElement(RangeSlider,_extends$t({value:parseFloat(nt),onDrag:rt},it)),React$1.createElement(Number$1,_extends$t({},tt,{id:ot,label:"value",innerLabelTrim:lt?0:1}))))}const{sanitizeStep}=props$3$1,rest=_objectWithoutProperties$l(props$3$1,["sanitizeStep"]);var number$6=_objectSpread2$1({component:NumberComponent},rest);const schema$2$1=(tt,et)=>v8n().schema({options:v8n().passesAnyOf(v8n().object(),v8n().array())}).test(et),sanitize$2$1=(tt,{values:et})=>{if(et.indexOf(tt)<0)throw Error("Selected value doesn't match Select options");return tt},format$3=(tt,{values:et})=>et.indexOf(tt),normalize$1$2=tt=>{let{value:et,options:nt}=tt,rt,it;return Array.isArray(nt)?(it=nt,rt=nt.map(ot=>String(ot))):(it=Object.values(nt),rt=Object.keys(nt)),"value"in tt?it.includes(et)||(rt.unshift(String(et)),it.unshift(et)):et=it[0],Object.values(nt).includes(et)||(nt[String(et)]=et),{value:et,settings:{keys:rt,values:it}}};var props$2$1=Object.freeze({__proto__:null,schema:schema$2$1,sanitize:sanitize$2$1,format:format$3,normalize:normalize$1$2});const SelectContainer=styled$5("div",{$flexCenter:"",position:"relative","> svg":{pointerEvents:"none",position:"absolute",right:"$md"}}),NativeSelect=styled$5("select",{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0}),PresentationalSelect=styled$5("div",{display:"flex",alignItems:"center",width:"100%",height:"$rowHeight",backgroundColor:"$elevation3",borderRadius:"$sm",padding:"0 $sm",cursor:"pointer",[`${NativeSelect}:focus + &`]:{$focusStyle:""},[`${NativeSelect}:hover + &`]:{$hoverStyle:""}});function Select$5({displayValue:tt,value:et,onUpdate:nt,id:rt,settings:it,disabled:ot}){const{keys:at,values:st}=it,lt=reactExports.useRef();return et===st[tt]&&(lt.current=at[tt]),React$1.createElement(SelectContainer,null,React$1.createElement(NativeSelect,{id:rt,value:tt,onChange:ct=>nt(st[Number(ct.currentTarget.value)]),disabled:ot},at.map((ct,ut)=>React$1.createElement("option",{key:ct,value:ut},ct))),React$1.createElement(PresentationalSelect,null,lt.current),React$1.createElement(Chevron,{toggled:!0}))}function SelectComponent(){const{label:tt,value:et,displayValue:nt,onUpdate:rt,id:it,disabled:ot,settings:at}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(Select$5,{id:it,value:et,displayValue:nt,onUpdate:rt,settings:at,disabled:ot}))}var select$1=_objectSpread2$1({component:SelectComponent},props$2$1);const schema$1$1=tt=>v8n().string().test(tt),sanitize$1$1=tt=>{if(typeof tt!="string")throw Error("Invalid string");return tt},normalize$5=({value:tt,editable:et=!0,rows:nt=!1})=>({value:tt,settings:{editable:et,rows:typeof nt=="number"?nt:nt?5:0}});var props$1$1=Object.freeze({__proto__:null,schema:schema$1$1,sanitize:sanitize$1$1,normalize:normalize$5});const _excluded$2$2=["displayValue","onUpdate","onChange","editable"],NonEditableString=styled$5("div",{whiteSpace:"pre-wrap"});function String$1(tt){let{displayValue:et,onUpdate:nt,onChange:rt,editable:it=!0}=tt,ot=_objectWithoutProperties$l(tt,_excluded$2$2);return it?React$1.createElement(ValueInput,_extends$t({value:et,onUpdate:nt,onChange:rt},ot)):React$1.createElement(NonEditableString,null,et)}function StringComponent(){const{label:tt,settings:et,displayValue:nt,onUpdate:rt,onChange:it}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(String$1,_extends$t({displayValue:nt,onUpdate:rt,onChange:it},et)))}var string$1=_objectSpread2$1({component:StringComponent},props$1$1);const schema$4=tt=>v8n().boolean().test(tt),sanitize$5=tt=>{if(typeof tt!="boolean")throw Error("Invalid boolean");return tt};var props$4=Object.freeze({__proto__:null,schema:schema$4,sanitize:sanitize$5});const StyledInputWrapper=styled$5("div",{position:"relative",$flex:"",height:"$rowHeight",input:{$reset:"",height:0,width:0,opacity:0,margin:0},label:{position:"relative",$flexCenter:"",userSelect:"none",cursor:"pointer",height:"$checkboxSize",width:"$checkboxSize",backgroundColor:"$elevation3",borderRadius:"$sm",$hover:""},"input:focus + label":{$focusStyle:""},"input:focus:checked + label, input:checked + label:hover":{$hoverStyle:"$accent3"},"input + label:active":{backgroundColor:"$accent1"},"input:checked + label:active":{backgroundColor:"$accent1"},"label > svg":{display:"none",width:"90%",height:"90%",stroke:"$highlight3"},"input:checked + label":{backgroundColor:"$accent2"},"input:checked + label > svg":{display:"block"}});function Boolean$1({value:tt,onUpdate:et,id:nt,disabled:rt}){return React$1.createElement(StyledInputWrapper,null,React$1.createElement("input",{id:nt,type:"checkbox",checked:tt,onChange:it=>et(it.currentTarget.checked),disabled:rt}),React$1.createElement("label",{htmlFor:nt},React$1.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},React$1.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}))))}function BooleanComponent(){const{label:tt,value:et,onUpdate:nt,disabled:rt,id:it}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(Boolean$1,{value:et,onUpdate:nt,id:it,disabled:rt}))}var boolean=_objectSpread2$1({component:BooleanComponent},props$4);const _excluded$1$4=["locked"];function Coordinate({value:tt,id:et,valueKey:nt,settings:rt,onUpdate:it,innerLabelTrim:ot}){const at=reactExports.useRef(tt[nt]);at.current=tt[nt];const st=reactExports.useCallback(ct=>it({[nt]:sanitizeValue({type:"NUMBER",value:at.current,settings:rt},ct)}),[it,rt,nt]),lt=useInputSetters({type:"NUMBER",value:tt[nt],settings:rt,setValue:st});return React$1.createElement(Number$1,{id:et,label:nt,value:tt[nt],displayValue:lt.displayValue,onUpdate:lt.onUpdate,onChange:lt.onChange,settings:rt,innerLabelTrim:ot})}const Container$2=styled$5("div",{display:"grid",columnGap:"$colGap",gridAutoFlow:"column dense",alignItems:"center",variants:{withLock:{true:{gridTemplateColumns:"10px auto","> svg":{cursor:"pointer"}}}}});function Lock(tt){let{locked:et}=tt,nt=_objectWithoutProperties$l(tt,_excluded$1$4);return React$1.createElement("svg",_extends$t({width:"10",height:"10",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},nt),et?React$1.createElement("path",{d:"M5 4.63601C5 3.76031 5.24219 3.1054 5.64323 2.67357C6.03934 2.24705 6.64582 1.9783 7.5014 1.9783C8.35745 1.9783 8.96306 2.24652 9.35823 2.67208C9.75838 3.10299 10 3.75708 10 4.63325V5.99999H5V4.63601ZM4 5.99999V4.63601C4 3.58148 4.29339 2.65754 4.91049 1.99307C5.53252 1.32329 6.42675 0.978302 7.5014 0.978302C8.57583 0.978302 9.46952 1.32233 10.091 1.99162C10.7076 2.65557 11 3.57896 11 4.63325V5.99999H12C12.5523 5.99999 13 6.44771 13 6.99999V13C13 13.5523 12.5523 14 12 14H3C2.44772 14 2 13.5523 2 13V6.99999C2 6.44771 2.44772 5.99999 3 5.99999H4ZM3 6.99999H12V13H3V6.99999Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}):React$1.createElement("path",{d:"M9 3.63601C9 2.76044 9.24207 2.11211 9.64154 1.68623C10.0366 1.26502 10.6432 1 11.5014 1C12.4485 1 13.0839 1.30552 13.4722 1.80636C13.8031 2.23312 14 2.84313 14 3.63325H15C15 2.68242 14.7626 1.83856 14.2625 1.19361C13.6389 0.38943 12.6743 0 11.5014 0C10.4294 0 9.53523 0.337871 8.91218 1.0021C8.29351 1.66167 8 2.58135 8 3.63601V6H1C0.447715 6 0 6.44772 0 7V13C0 13.5523 0.447715 14 1 14H10C10.5523 14 11 13.5523 11 13V7C11 6.44772 10.5523 6 10 6H9V3.63601ZM1 7H10V13H1V7Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function Vector({value:tt,onUpdate:et,settings:nt,innerLabelTrim:rt}){const{id:it,setSettings:ot}=useInputContext(),{lock:at,locked:st}=nt;return React$1.createElement(Container$2,{withLock:at},at&&React$1.createElement(Lock,{locked:st,onClick:()=>ot({locked:!st})}),Object.keys(tt).map((lt,ct)=>React$1.createElement(Coordinate,{id:ct===0?it:`${it}.${lt}`,key:lt,valueKey:lt,value:tt,settings:nt[lt],onUpdate:et,innerLabelTrim:rt})))}const normalizeKeyedNumberSettings=(tt,et)=>{const nt={};let rt=0,it=1/0;Object.entries(tt).forEach(([ot,at])=>{nt[ot]=normalize$2$2(_objectSpread2$1({value:at},et[ot])).settings,rt=Math.max(rt,nt[ot].step),it=Math.min(it,nt[ot].pad)});for(let ot in nt){const{step:at,min:st,max:lt}=et[ot]||{};!isFinite(at)&&(!isFinite(st)||!isFinite(lt))&&(nt[ot].step=rt,nt[ot].pad=it)}return nt},_excluded$1M=["lock"],_excluded2$j=["value"];function getVectorSchema(tt){const et=v8n().array().length(tt).every.number(),nt=rt=>{if(!rt||typeof rt!="object")return!1;const it=Object.values(rt);return it.length===tt&&it.every(ot=>isFinite(ot))};return rt=>et.test(rt)||nt(rt)}function getVectorType(tt){return Array.isArray(tt)?"array":"object"}function convert$6(tt,et,nt){return getVectorType(tt)===et?tt:et==="array"?Object.values(tt):mapArrayToKeys(tt,nt)}const sanitizeVector=(tt,et,nt)=>{const rt=convert$6(tt,"object",et.keys);for(let at in rt)rt[at]=sanitize$3(rt[at],et[at]);const it=Object.keys(rt);let ot={};if(it.length===et.keys.length)ot=rt;else{const at=convert$6(nt,"object",et.keys);if(it.length===1&&et.locked){const st=it[0],lt=rt[st],ct=at[st],ut=ct!==0?lt/ct:1;for(let ht in at)ht===st?ot[st]=lt:ot[ht]=at[ht]*ut}else ot=_objectSpread2$1(_objectSpread2$1({},at),rt)}return convert$6(ot,et.format,et.keys)},formatVector=(tt,et)=>convert$6(tt,"object",et.keys),isNumberSettings=tt=>!!tt&&("step"in tt||"min"in tt||"max"in tt);function normalizeVector(tt,et,nt=[]){const{lock:rt=!1}=et,it=_objectWithoutProperties$l(et,_excluded$1M),ot=Array.isArray(tt)?"array":"object",at=ot==="object"?Object.keys(tt):nt,st=convert$6(tt,"object",at),lt=isNumberSettings(it)?at.reduce((ut,ht)=>Object.assign(ut,{[ht]:it}),{}):it,ct=normalizeKeyedNumberSettings(st,lt);return{value:ot==="array"?tt:st,settings:_objectSpread2$1(_objectSpread2$1({},ct),{},{format:ot,keys:at,lock:rt,locked:!1})}}function getVectorPlugin(tt){return{schema:getVectorSchema(tt.length),normalize:et=>{let{value:nt}=et,rt=_objectWithoutProperties$l(et,_excluded2$j);return normalizeVector(nt,rt,tt)},format:(et,nt)=>formatVector(et,nt),sanitize:(et,nt,rt)=>sanitizeVector(et,nt,rt)}}var r$b={grad:.9,turn:360,rad:360/(2*Math.PI)},t$6=function(tt){return typeof tt=="string"?tt.length>0:typeof tt=="number"},n$6=function(tt,et,nt){return et===void 0&&(et=0),nt===void 0&&(nt=Math.pow(10,et)),Math.round(nt*tt)/nt+0},e$5=function(tt,et,nt){return et===void 0&&(et=0),nt===void 0&&(nt=1),tt>nt?nt:tt>et?tt:et},u$5=function(tt){return(tt=isFinite(tt)?tt%360:0)>0?tt:tt+360},a$3=function(tt){return{r:e$5(tt.r,0,255),g:e$5(tt.g,0,255),b:e$5(tt.b,0,255),a:e$5(tt.a)}},o$1=function(tt){return{r:n$6(tt.r),g:n$6(tt.g),b:n$6(tt.b),a:n$6(tt.a,3)}},i$6=/^#([0-9a-f]{3,8})$/i,s$4=function(tt){var et=tt.toString(16);return et.length<2?"0"+et:et},h$9=function(tt){var et=tt.r,nt=tt.g,rt=tt.b,it=tt.a,ot=Math.max(et,nt,rt),at=ot-Math.min(et,nt,rt),st=at?ot===et?(nt-rt)/at:ot===nt?2+(rt-et)/at:4+(et-nt)/at:0;return{h:60*(st<0?st+6:st),s:ot?at/ot*100:0,v:ot/255*100,a:it}},b$6=function(tt){var et=tt.h,nt=tt.s,rt=tt.v,it=tt.a;et=et/360*6,nt/=100,rt/=100;var ot=Math.floor(et),at=rt*(1-nt),st=rt*(1-(et-ot)*nt),lt=rt*(1-(1-et+ot)*nt),ct=ot%6;return{r:255*[rt,st,at,at,lt,rt][ct],g:255*[lt,rt,rt,st,at,at][ct],b:255*[at,at,lt,rt,rt,st][ct],a:it}},g$8=function(tt){return{h:u$5(tt.h),s:e$5(tt.s,0,100),l:e$5(tt.l,0,100),a:e$5(tt.a)}},d$5=function(tt){return{h:n$6(tt.h),s:n$6(tt.s),l:n$6(tt.l),a:n$6(tt.a,3)}},f$7=function(tt){return b$6((nt=(et=tt).s,{h:et.h,s:(nt*=((rt=et.l)<50?rt:100-rt)/100)>0?2*nt/(rt+nt)*100:0,v:rt+nt,a:et.a}));var et,nt,rt},c$8=function(tt){return{h:(et=h$9(tt)).h,s:(it=(200-(nt=et.s))*(rt=et.v)/100)>0&&it<200?nt*rt/100/(it<=100?it:200-it)*100:0,l:it/2,a:et.a};var et,nt,rt,it},l$5=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p$8=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v$8=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m$8=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y$7={string:[[function(tt){var et=i$6.exec(tt);return et?(tt=et[1]).length<=4?{r:parseInt(tt[0]+tt[0],16),g:parseInt(tt[1]+tt[1],16),b:parseInt(tt[2]+tt[2],16),a:tt.length===4?n$6(parseInt(tt[3]+tt[3],16)/255,2):1}:tt.length===6||tt.length===8?{r:parseInt(tt.substr(0,2),16),g:parseInt(tt.substr(2,2),16),b:parseInt(tt.substr(4,2),16),a:tt.length===8?n$6(parseInt(tt.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(tt){var et=v$8.exec(tt)||m$8.exec(tt);return et?et[2]!==et[4]||et[4]!==et[6]?null:a$3({r:Number(et[1])/(et[2]?100/255:1),g:Number(et[3])/(et[4]?100/255:1),b:Number(et[5])/(et[6]?100/255:1),a:et[7]===void 0?1:Number(et[7])/(et[8]?100:1)}):null},"rgb"],[function(tt){var et=l$5.exec(tt)||p$8.exec(tt);if(!et)return null;var nt,rt,it=g$8({h:(nt=et[1],rt=et[2],rt===void 0&&(rt="deg"),Number(nt)*(r$b[rt]||1)),s:Number(et[3]),l:Number(et[4]),a:et[5]===void 0?1:Number(et[5])/(et[6]?100:1)});return f$7(it)},"hsl"]],object:[[function(tt){var et=tt.r,nt=tt.g,rt=tt.b,it=tt.a,ot=it===void 0?1:it;return t$6(et)&&t$6(nt)&&t$6(rt)?a$3({r:Number(et),g:Number(nt),b:Number(rt),a:Number(ot)}):null},"rgb"],[function(tt){var et=tt.h,nt=tt.s,rt=tt.l,it=tt.a,ot=it===void 0?1:it;if(!t$6(et)||!t$6(nt)||!t$6(rt))return null;var at=g$8({h:Number(et),s:Number(nt),l:Number(rt),a:Number(ot)});return f$7(at)},"hsl"],[function(tt){var et=tt.h,nt=tt.s,rt=tt.v,it=tt.a,ot=it===void 0?1:it;if(!t$6(et)||!t$6(nt)||!t$6(rt))return null;var at=function(st){return{h:u$5(st.h),s:e$5(st.s,0,100),v:e$5(st.v,0,100),a:e$5(st.a)}}({h:Number(et),s:Number(nt),v:Number(rt),a:Number(ot)});return b$6(at)},"hsv"]]},N$1=function(tt,et){for(var nt=0;nt=.5},tt.prototype.toHex=function(){return et=o$1(this.rgba),nt=et.r,rt=et.g,it=et.b,at=(ot=et.a)<1?s$4(n$6(255*ot)):"","#"+s$4(nt)+s$4(rt)+s$4(it)+at;var et,nt,rt,it,ot,at},tt.prototype.toRgb=function(){return o$1(this.rgba)},tt.prototype.toRgbString=function(){return et=o$1(this.rgba),nt=et.r,rt=et.g,it=et.b,(ot=et.a)<1?"rgba("+nt+", "+rt+", "+it+", "+ot+")":"rgb("+nt+", "+rt+", "+it+")";var et,nt,rt,it,ot},tt.prototype.toHsl=function(){return d$5(c$8(this.rgba))},tt.prototype.toHslString=function(){return et=d$5(c$8(this.rgba)),nt=et.h,rt=et.s,it=et.l,(ot=et.a)<1?"hsla("+nt+", "+rt+"%, "+it+"%, "+ot+")":"hsl("+nt+", "+rt+"%, "+it+"%)";var et,nt,rt,it,ot},tt.prototype.toHsv=function(){return et=h$9(this.rgba),{h:n$6(et.h),s:n$6(et.s),v:n$6(et.v),a:n$6(et.a,3)};var et},tt.prototype.invert=function(){return w$5({r:255-(et=this.rgba).r,g:255-et.g,b:255-et.b,a:et.a});var et},tt.prototype.saturate=function(et){return et===void 0&&(et=.1),w$5(M$1(this.rgba,et))},tt.prototype.desaturate=function(et){return et===void 0&&(et=.1),w$5(M$1(this.rgba,-et))},tt.prototype.grayscale=function(){return w$5(M$1(this.rgba,-1))},tt.prototype.lighten=function(et){return et===void 0&&(et=.1),w$5($$2(this.rgba,et))},tt.prototype.darken=function(et){return et===void 0&&(et=.1),w$5($$2(this.rgba,-et))},tt.prototype.rotate=function(et){return et===void 0&&(et=15),this.hue(this.hue()+et)},tt.prototype.alpha=function(et){return typeof et=="number"?w$5({r:(nt=this.rgba).r,g:nt.g,b:nt.b,a:et}):n$6(this.rgba.a,3);var nt},tt.prototype.hue=function(et){var nt=c$8(this.rgba);return typeof et=="number"?w$5({h:et,s:nt.s,l:nt.l,a:nt.a}):n$6(nt.h)},tt.prototype.isEqual=function(et){return this.toHex()===w$5(et).toHex()},tt}(),w$5=function(tt){return tt instanceof j$1?tt:new j$1(tt)},S$2=[],k$8=function(tt){tt.forEach(function(et){S$2.indexOf(et)<0&&(et(j$1,y$7),S$2.push(et))})};function namesPlugin(tt,et){var nt={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},rt={};for(var it in nt)rt[nt[it]]=it;var ot={};tt.prototype.toName=function(at){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var st,lt,ct=rt[this.toHex()];if(ct)return ct;if(at!=null&&at.closest){var ut=this.toRgb(),ht=1/0,dt="black";if(!ot.length)for(var pt in nt)ot[pt]=new tt(nt[pt]).toRgb();for(var mt in nt){var gt=(st=ut,lt=ot[mt],Math.pow(st.r-lt.r,2)+Math.pow(st.g-lt.g,2)+Math.pow(st.b-lt.b,2));gt=0||(it[nt]=tt[nt]);return it}function i$5(tt){var et=reactExports.useRef(tt),nt=reactExports.useRef(function(rt){et.current&&et.current(rt)});return et.current=tt,nt.current}var s$3=function(tt,et,nt){return et===void 0&&(et=0),nt===void 0&&(nt=1),tt>nt?nt:tt0:yt.buttons>0)&&it.current?ot(d$4(it.current,yt,st.current)):gt(!1)},mt=function(){return gt(!1)};function gt(yt){var bt=lt.current,vt=v$7(it.current),xt=yt?vt.addEventListener:vt.removeEventListener;xt(bt?"touchmove":"mousemove",pt),xt(bt?"touchend":"mouseup",mt)}return[function(yt){var bt=yt.nativeEvent,vt=it.current;if(vt&&(h$8(bt),!function(kt,St){return St&&!f$6(kt)}(bt,lt.current)&&vt)){if(f$6(bt)){lt.current=!0;var xt=bt.changedTouches||[];xt.length&&(st.current=xt[0].identifier)}vt.focus(),ot(d$4(vt,bt,st.current)),gt(!0)}},function(yt){var bt=yt.which||yt.keyCode;bt<37||bt>40||(yt.preventDefault(),at({left:bt===39?.05:bt===37?-.05:0,top:bt===40?.05:bt===38?-.05:0}))},gt]},[at,ot]),ut=ct[0],ht=ct[1],dt=ct[2];return reactExports.useEffect(function(){return dt},[dt]),React$1.createElement("div",u$4({},rt,{onTouchStart:ut,onMouseDown:ut,className:"react-colorful__interactive",ref:it,onKeyDown:ht,tabIndex:0,role:"slider"}))}),g$7=function(tt){return tt.filter(Boolean).join(" ")},p$7=function(tt){var et=tt.color,nt=tt.left,rt=tt.top,it=rt===void 0?.5:rt,ot=g$7(["react-colorful__pointer",tt.className]);return React$1.createElement("div",{className:ot,style:{top:100*it+"%",left:100*nt+"%"}},React$1.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:et}}))},b$5=function(tt,et,nt){return et===void 0&&(et=0),nt===void 0&&(nt=Math.pow(10,et)),Math.round(nt*tt)/nt},y$6=function(tt){var et=tt.s,nt=tt.v,rt=tt.a,it=(200-et)*nt/100;return{h:b$5(tt.h),s:b$5(it>0&&it<200?et*nt/100/(it<=100?it:200-it)*100:0),l:b$5(it/2),a:b$5(rt,2)}},q$6=function(tt){var et=y$6(tt);return"hsl("+et.h+", "+et.s+"%, "+et.l+"%)"},k$7=function(tt){var et=y$6(tt);return"hsla("+et.h+", "+et.s+"%, "+et.l+"%, "+et.a+")"},I$1=function(tt){var et=tt.h,nt=tt.s,rt=tt.v,it=tt.a;et=et/360*6,nt/=100,rt/=100;var ot=Math.floor(et),at=rt*(1-nt),st=rt*(1-(et-ot)*nt),lt=rt*(1-(1-et+ot)*nt),ct=ot%6;return{r:b$5(255*[rt,st,at,at,lt,rt][ct]),g:b$5(255*[lt,rt,rt,st,at,at][ct]),b:b$5(255*[at,at,lt,rt,rt,st][ct]),a:b$5(it,2)}},L$1=function(tt){var et=tt.r,nt=tt.g,rt=tt.b,it=tt.a,ot=Math.max(et,nt,rt),at=ot-Math.min(et,nt,rt),st=at?ot===et?(nt-rt)/at:ot===nt?2+(rt-et)/at:4+(et-nt)/at:0;return{h:b$5(60*(st<0?st+6:st)),s:b$5(ot?at/ot*100:0),v:b$5(ot/255*100),a:it}},S$1=React$1.memo(function(tt){var et=tt.hue,nt=tt.onChange,rt=g$7(["react-colorful__hue",tt.className]);return React$1.createElement("div",{className:rt},React$1.createElement(m$7,{onMove:function(it){nt({h:360*it.left})},onKey:function(it){nt({h:s$3(et+360*it.left,0,360)})},"aria-label":"Hue","aria-valuenow":b$5(et),"aria-valuemax":"360","aria-valuemin":"0"},React$1.createElement(p$7,{className:"react-colorful__hue-pointer",left:et/360,color:q$6({h:et,s:100,v:100,a:1})})))}),T$1=React$1.memo(function(tt){var et=tt.hsva,nt=tt.onChange,rt={backgroundColor:q$6({h:et.h,s:100,v:100,a:1})};return React$1.createElement("div",{className:"react-colorful__saturation",style:rt},React$1.createElement(m$7,{onMove:function(it){nt({s:100*it.left,v:100-100*it.top})},onKey:function(it){nt({s:s$3(et.s+100*it.left,0,100),v:s$3(et.v-100*it.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+b$5(et.s)+"%, Brightness "+b$5(et.v)+"%"},React$1.createElement(p$7,{className:"react-colorful__saturation-pointer",top:1-et.v/100,left:et.s/100,color:q$6(et)})))}),F$1=function(tt,et){if(tt===et)return!0;for(var nt in tt)if(tt[nt]!==et[nt])return!1;return!0};function Y$1(tt,et,nt){var rt=i$5(nt),it=reactExports.useState(function(){return tt.toHsva(et)}),ot=it[0],at=it[1],st=reactExports.useRef({color:et,hsva:ot});reactExports.useEffect(function(){if(!tt.equal(et,st.current.color)){var ct=tt.toHsva(et);st.current={hsva:ct,color:et},at(ct)}},[et,tt]),reactExports.useEffect(function(){var ct;F$1(ot,st.current.hsva)||tt.equal(ct=tt.fromHsva(ot),st.current.color)||(st.current={hsva:ot,color:ct},rt(ct))},[ot,tt,rt]);var lt=reactExports.useCallback(function(ct){at(function(ut){return Object.assign({},ut,ct)})},[]);return[ot,lt]}var V$1=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,$$1=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},J$1=new Map,Q$1=function(tt){V$1(function(){var et=tt.current?tt.current.ownerDocument:document;if(et!==void 0&&!J$1.has(et)){var nt=et.createElement("style");nt.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,J$1.set(et,nt);var rt=$$1();rt&&nt.setAttribute("nonce",rt),et.head.appendChild(nt)}},[])},U$1=function(tt){var et=tt.className,nt=tt.colorModel,rt=tt.color,it=rt===void 0?nt.defaultColor:rt,ot=tt.onChange,at=c$7(tt,["className","colorModel","color","onChange"]),st=reactExports.useRef(null);Q$1(st);var lt=Y$1(nt,it,ot),ct=lt[0],ut=lt[1],ht=g$7(["react-colorful",et]);return React$1.createElement("div",u$4({},at,{ref:st,className:ht}),React$1.createElement(T$1,{hsva:ct,onChange:ut}),React$1.createElement(S$1,{hue:ct.h,onChange:ut,className:"react-colorful__last-control"}))},ee$1=function(tt){var et=tt.className,nt=tt.hsva,rt=tt.onChange,it={backgroundImage:"linear-gradient(90deg, "+k$7(Object.assign({},nt,{a:0}))+", "+k$7(Object.assign({},nt,{a:1}))+")"},ot=g$7(["react-colorful__alpha",et]),at=b$5(100*nt.a);return React$1.createElement("div",{className:ot},React$1.createElement("div",{className:"react-colorful__alpha-gradient",style:it}),React$1.createElement(m$7,{onMove:function(st){rt({a:st.left})},onKey:function(st){rt({a:s$3(nt.a+st.left)})},"aria-label":"Alpha","aria-valuetext":at+"%","aria-valuenow":at,"aria-valuemin":"0","aria-valuemax":"100"},React$1.createElement(p$7,{className:"react-colorful__alpha-pointer",left:nt.a,color:k$7(nt)})))},re$3=function(tt){var et=tt.className,nt=tt.colorModel,rt=tt.color,it=rt===void 0?nt.defaultColor:rt,ot=tt.onChange,at=c$7(tt,["className","colorModel","color","onChange"]),st=reactExports.useRef(null);Q$1(st);var lt=Y$1(nt,it,ot),ct=lt[0],ut=lt[1],ht=g$7(["react-colorful",et]);return React$1.createElement("div",u$4({},at,{ref:st,className:ht}),React$1.createElement(T$1,{hsva:ct,onChange:ut}),React$1.createElement(S$1,{hue:ct.h,onChange:ut}),React$1.createElement(ee$1,{hsva:ct,onChange:ut,className:"react-colorful__last-control"}))},xe$1={defaultColor:{r:0,g:0,b:0,a:1},toHsva:L$1,fromHsva:I$1,equal:F$1},Ce=function(tt){return React$1.createElement(re$3,u$4({},tt,{colorModel:xe$1}))},Me$1={defaultColor:{r:0,g:0,b:0},toHsva:function(tt){return L$1({r:tt.r,g:tt.g,b:tt.b,a:1})},fromHsva:function(tt){return{r:(et=I$1(tt)).r,g:et.g,b:et.b};var et},equal:F$1},Ne$1=function(tt){return React$1.createElement(U$1,u$4({},tt,{colorModel:Me$1}))},propTypes$1={exports:{}},ReactPropTypesSecret$1="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ReactPropTypesSecret_1=ReactPropTypesSecret$1,ReactPropTypesSecret=ReactPropTypesSecret_1;function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction;var factoryWithThrowingShims=function(){function tt(rt,it,ot,at,st,lt){if(lt!==ReactPropTypesSecret){var ct=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw ct.name="Invariant Violation",ct}}tt.isRequired=tt;function et(){return tt}var nt={array:tt,bigint:tt,bool:tt,func:tt,number:tt,object:tt,string:tt,symbol:tt,any:tt,arrayOf:et,element:tt,elementType:tt,instanceOf:et,node:tt,objectOf:et,oneOf:et,oneOfType:et,shape:et,exact:et,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return nt.PropTypes=nt,nt};propTypes$1.exports=factoryWithThrowingShims();var propTypesExports=propTypes$1.exports;const PropTypes=getDefaultExportFromCjs(propTypesExports);function __decorate(tt,et,nt,rt){var it=arguments.length,ot=it<3?et:rt===null?rt=Object.getOwnPropertyDescriptor(et,nt):rt,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ot=Reflect.decorate(tt,et,nt,rt);else for(var st=tt.length-1;st>=0;st--)(at=tt[st])&&(ot=(it<3?at(ot):it>3?at(et,nt,ot):at(et,nt))||ot);return it>3&&ot&&Object.defineProperty(et,nt,ot),ot}function __awaiter(tt,et,nt,rt){function it(ot){return ot instanceof nt?ot:new nt(function(at){at(ot)})}return new(nt||(nt=Promise))(function(ot,at){function st(ut){try{ct(rt.next(ut))}catch(ht){at(ht)}}function lt(ut){try{ct(rt.throw(ut))}catch(ht){at(ht)}}function ct(ut){ut.done?ot(ut.value):it(ut.value).then(st,lt)}ct((rt=rt.apply(tt,et||[])).next())})}function __generator(tt,et){var nt={label:0,sent:function(){if(ot[0]&1)throw ot[1];return ot[1]},trys:[],ops:[]},rt,it,ot,at;return at={next:st(0),throw:st(1),return:st(2)},typeof Symbol=="function"&&(at[Symbol.iterator]=function(){return this}),at;function st(ct){return function(ut){return lt([ct,ut])}}function lt(ct){if(rt)throw new TypeError("Generator is already executing.");for(;at&&(at=0,ct[0]&&(nt=0)),nt;)try{if(rt=1,it&&(ot=ct[0]&2?it.return:ct[0]?it.throw||((ot=it.return)&&ot.call(it),0):it.next)&&!(ot=ot.call(it,ct[1])).done)return ot;switch(it=0,ot&&(ct=[ct[0]&2,ot.value]),ct[0]){case 0:case 1:ot=ct;break;case 4:return nt.label++,{value:ct[1],done:!1};case 5:nt.label++,it=ct[1],ct=[0];continue;case 7:ct=nt.ops.pop(),nt.trys.pop();continue;default:if(ot=nt.trys,!(ot=ot.length>0&&ot[ot.length-1])&&(ct[0]===6||ct[0]===2)){nt=0;continue}if(ct[0]===3&&(!ot||ct[1]>ot[0]&&ct[1]0)&&!(it=rt.next()).done;)ot.push(it.value)}catch(st){at={error:st}}finally{try{it&&!it.done&&(nt=rt.return)&&nt.call(rt)}finally{if(at)throw at.error}}return ot}function __spread(){for(var tt=[],et=0;et0?rt:tt.name,writable:!1,configurable:!1,enumerable:!0})}return nt}function withMimeType(tt){var et=tt.name,nt=et&&et.lastIndexOf(".")!==-1;if(nt&&!tt.type){var rt=et.split(".").pop().toLowerCase(),it=COMMON_MIME_TYPES.get(rt);it&&Object.defineProperty(tt,"type",{value:it,writable:!1,configurable:!1,enumerable:!0})}return tt}var FILES_TO_IGNORE=[".DS_Store","Thumbs.db"];function fromEvent(tt){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(et){return isObject$n(tt)&&isDataTransfer(tt)?[2,getDataTransferFiles(tt.dataTransfer,tt.type)]:isChangeEvt(tt)?[2,getInputFiles(tt)]:Array.isArray(tt)&&tt.every(function(nt){return"getFile"in nt&&typeof nt.getFile=="function"})?[2,getFsHandleFiles(tt)]:[2,[]]})})}function isDataTransfer(tt){return isObject$n(tt.dataTransfer)}function isChangeEvt(tt){return isObject$n(tt)&&isObject$n(tt.target)}function isObject$n(tt){return typeof tt=="object"&&tt!==null}function getInputFiles(tt){return fromList(tt.target.files).map(function(et){return toFileWithPath(et)})}function getFsHandleFiles(tt){return __awaiter(this,void 0,void 0,function(){var et;return __generator(this,function(nt){switch(nt.label){case 0:return[4,Promise.all(tt.map(function(rt){return rt.getFile()}))];case 1:return et=nt.sent(),[2,et.map(function(rt){return toFileWithPath(rt)})]}})})}function getDataTransferFiles(tt,et){return __awaiter(this,void 0,void 0,function(){var nt,rt;return __generator(this,function(it){switch(it.label){case 0:return tt===null?[2,[]]:tt.items?(nt=fromList(tt.items).filter(function(ot){return ot.kind==="file"}),et!=="drop"?[2,nt]:[4,Promise.all(nt.map(toFilePromises))]):[3,2];case 1:return rt=it.sent(),[2,noIgnoredFiles(flatten$1(rt))];case 2:return[2,noIgnoredFiles(fromList(tt.files).map(function(ot){return toFileWithPath(ot)}))]}})})}function noIgnoredFiles(tt){return tt.filter(function(et){return FILES_TO_IGNORE.indexOf(et.name)===-1})}function fromList(tt){if(tt===null)return[];for(var et=[],nt=0;nttt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);ntnt)return[!1,getTooLargeRejectionErr(nt)];if(tt.sizent)return[!1,getTooLargeRejectionErr(nt)]}return[!0,null]}function isDefined$1(tt){return tt!=null}function allFilesAccepted(tt){var et=tt.files,nt=tt.accept,rt=tt.minSize,it=tt.maxSize,ot=tt.multiple,at=tt.maxFiles;return!ot&&et.length>1||ot&&at>=1&&et.length>at?!1:et.every(function(st){var lt=fileAccepted(st,nt),ct=_slicedToArray$e(lt,1),ut=ct[0],ht=fileMatchSize(st,rt,it),dt=_slicedToArray$e(ht,1),pt=dt[0];return ut&&pt})}function isPropagationStopped(tt){return typeof tt.isPropagationStopped=="function"?tt.isPropagationStopped():typeof tt.cancelBubble<"u"?tt.cancelBubble:!1}function isEvtWithFiles(tt){return tt.dataTransfer?Array.prototype.some.call(tt.dataTransfer.types,function(et){return et==="Files"||et==="application/x-moz-file"}):!!tt.target&&!!tt.target.files}function onDocumentDragOver(tt){tt.preventDefault()}function isIe(tt){return tt.indexOf("MSIE")!==-1||tt.indexOf("Trident/")!==-1}function isEdge$1(tt){return tt.indexOf("Edge/")!==-1}function isIeOrEdge(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return isIe(tt)||isEdge$1(tt)}function composeEventHandlers(){for(var tt=arguments.length,et=new Array(tt),nt=0;nt1?it-1:0),at=1;attt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$n(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}var Dropzone=reactExports.forwardRef(function(tt,et){var nt=tt.children,rt=_objectWithoutProperties$k(tt,_excluded$1K),it=useDropzone(rt),ot=it.open,at=_objectWithoutProperties$k(it,_excluded2$i);return reactExports.useImperativeHandle(et,function(){return{open:ot}},[ot]),React$1.createElement(reactExports.Fragment,null,nt(_objectSpread$A(_objectSpread$A({},at),{},{open:ot})))});Dropzone.displayName="Dropzone";var defaultProps$8={disabled:!1,getFilesFromEvent:fromEvent,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};Dropzone.defaultProps=defaultProps$8;Dropzone.propTypes={children:PropTypes.func,accept:PropTypes.oneOfType([PropTypes.string,PropTypes.arrayOf(PropTypes.string)]),multiple:PropTypes.bool,preventDropOnDocument:PropTypes.bool,noClick:PropTypes.bool,noKeyboard:PropTypes.bool,noDrag:PropTypes.bool,noDragEventsBubbling:PropTypes.bool,minSize:PropTypes.number,maxSize:PropTypes.number,maxFiles:PropTypes.number,disabled:PropTypes.bool,getFilesFromEvent:PropTypes.func,onFileDialogCancel:PropTypes.func,onFileDialogOpen:PropTypes.func,useFsAccessApi:PropTypes.bool,onDragEnter:PropTypes.func,onDragLeave:PropTypes.func,onDragOver:PropTypes.func,onDrop:PropTypes.func,onDropAccepted:PropTypes.func,onDropRejected:PropTypes.func,validator:PropTypes.func};var initialState$1={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function useDropzone(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=_objectSpread$A(_objectSpread$A({},defaultProps$8),tt),nt=et.accept,rt=et.disabled,it=et.getFilesFromEvent,ot=et.maxSize,at=et.minSize,st=et.multiple,lt=et.maxFiles,ct=et.onDragEnter,ut=et.onDragLeave,ht=et.onDragOver,dt=et.onDrop,pt=et.onDropAccepted,mt=et.onDropRejected,gt=et.onFileDialogCancel,yt=et.onFileDialogOpen,bt=et.useFsAccessApi,vt=et.preventDropOnDocument,xt=et.noClick,kt=et.noKeyboard,St=et.noDrag,Tt=et.noDragEventsBubbling,At=et.validator,Et=reactExports.useMemo(function(){return typeof yt=="function"?yt:noop$a},[yt]),$t=reactExports.useMemo(function(){return typeof gt=="function"?gt:noop$a},[gt]),Dt=reactExports.useRef(null),jt=reactExports.useRef(null),Pt=reactExports.useReducer(reducer,initialState$1),Ct=_slicedToArray$d(Pt,2),wt=Ct[0],It=Ct[1],Ot=wt.isFocused,Wt=wt.isFileDialogActive,zt=wt.draggedFiles,Ft=reactExports.useRef(typeof window<"u"&&window.isSecureContext&&bt&&canUseFileSystemAccessAPI()),Nt=function(){!Ft.current&&Wt&&setTimeout(function(){if(jt.current){var pn=jt.current.files;pn.length||(It({type:"closeDialog"}),$t())}},300)};reactExports.useEffect(function(){return window.addEventListener("focus",Nt,!1),function(){window.removeEventListener("focus",Nt,!1)}},[jt,Wt,$t,Ft]);var Ut=reactExports.useRef([]),Mt=function(pn){Dt.current&&Dt.current.contains(pn.target)||(pn.preventDefault(),Ut.current=[])};reactExports.useEffect(function(){return vt&&(document.addEventListener("dragover",onDocumentDragOver,!1),document.addEventListener("drop",Mt,!1)),function(){vt&&(document.removeEventListener("dragover",onDocumentDragOver),document.removeEventListener("drop",Mt))}},[Dt,vt]);var Ht=reactExports.useCallback(function(fn){fn.preventDefault(),fn.persist(),Nn(fn),Ut.current=[].concat(_toConsumableArray$e(Ut.current),[fn.target]),isEvtWithFiles(fn)&&Promise.resolve(it(fn)).then(function(pn){isPropagationStopped(fn)&&!Tt||(It({draggedFiles:pn,isDragActive:!0,type:"setDraggedFiles"}),ct&&ct(fn))})},[it,ct,Tt]),en=reactExports.useCallback(function(fn){fn.preventDefault(),fn.persist(),Nn(fn);var pn=isEvtWithFiles(fn);if(pn&&fn.dataTransfer)try{fn.dataTransfer.dropEffect="copy"}catch{}return pn&&ht&&ht(fn),!1},[ht,Tt]),sn=reactExports.useCallback(function(fn){fn.preventDefault(),fn.persist(),Nn(fn);var pn=Ut.current.filter(function(Dn){return Dt.current&&Dt.current.contains(Dn)}),kn=pn.indexOf(fn.target);kn!==-1&&pn.splice(kn,1),Ut.current=pn,!(pn.length>0)&&(It({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),isEvtWithFiles(fn)&&ut&&ut(fn))},[Dt,ut,Tt]),Kt=reactExports.useCallback(function(fn,pn){var kn=[],Dn=[];fn.forEach(function(un){var Zt=fileAccepted(un,nt),Xt=_slicedToArray$d(Zt,2),Sn=Xt[0],Rn=Xt[1],jn=fileMatchSize(un,at,ot),On=_slicedToArray$d(jn,2),Zn=On[0],Vn=On[1],qn=At?At(un):null;if(Sn&&Zn&&!qn)kn.push(un);else{var zn=[Rn,Vn];qn&&(zn=zn.concat(qn)),Dn.push({file:un,errors:zn.filter(function(Jn){return Jn})})}}),(!st&&kn.length>1||st&<>=1&&kn.length>lt)&&(kn.forEach(function(un){Dn.push({file:un,errors:[TOO_MANY_FILES_REJECTION]})}),kn.splice(0)),It({acceptedFiles:kn,fileRejections:Dn,type:"setFiles"}),dt&&dt(kn,Dn,pn),Dn.length>0&&mt&&mt(Dn,pn),kn.length>0&&pt&&pt(kn,pn)},[It,st,nt,at,ot,lt,dt,pt,mt,At]),rn=reactExports.useCallback(function(fn){fn.preventDefault(),fn.persist(),Nn(fn),Ut.current=[],isEvtWithFiles(fn)&&Promise.resolve(it(fn)).then(function(pn){isPropagationStopped(fn)&&!Tt||Kt(pn,fn)}),It({type:"reset"})},[it,Kt,Tt]),nn=reactExports.useCallback(function(){if(Ft.current){It({type:"openDialog"}),Et();var fn={multiple:st,types:filePickerOptionsTypes(nt)};window.showOpenFilePicker(fn).then(function(pn){return it(pn)}).then(function(pn){Kt(pn,null),It({type:"closeDialog"})}).catch(function(pn){isAbort(pn)?($t(pn),It({type:"closeDialog"})):isSecurityError(pn)&&(Ft.current=!1,jt.current&&(jt.current.value=null,jt.current.click()))});return}jt.current&&(It({type:"openDialog"}),Et(),jt.current.value=null,jt.current.click())},[It,Et,$t,bt,Kt,nt,st]),hn=reactExports.useCallback(function(fn){!Dt.current||!Dt.current.isEqualNode(fn.target)||(fn.key===" "||fn.key==="Enter"||fn.keyCode===32||fn.keyCode===13)&&(fn.preventDefault(),nn())},[Dt,nn]),vn=reactExports.useCallback(function(){It({type:"focus"})},[]),an=reactExports.useCallback(function(){It({type:"blur"})},[]),Qt=reactExports.useCallback(function(){xt||(isIeOrEdge()?setTimeout(nn,0):nn())},[xt,nn]),_n=function(pn){return rt?null:pn},Pn=function(pn){return kt?null:_n(pn)},$n=function(pn){return St?null:_n(pn)},Nn=function(pn){Tt&&pn.stopPropagation()},Tn=reactExports.useMemo(function(){return function(){var fn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},pn=fn.refKey,kn=pn===void 0?"ref":pn,Dn=fn.role,un=fn.onKeyDown,Zt=fn.onFocus,Xt=fn.onBlur,Sn=fn.onClick,Rn=fn.onDragEnter,jn=fn.onDragOver,On=fn.onDragLeave,Zn=fn.onDrop,Vn=_objectWithoutProperties$k(fn,_excluded3$5);return _objectSpread$A(_objectSpread$A(_defineProperty$E({onKeyDown:Pn(composeEventHandlers(un,hn)),onFocus:Pn(composeEventHandlers(Zt,vn)),onBlur:Pn(composeEventHandlers(Xt,an)),onClick:_n(composeEventHandlers(Sn,Qt)),onDragEnter:$n(composeEventHandlers(Rn,Ht)),onDragOver:$n(composeEventHandlers(jn,en)),onDragLeave:$n(composeEventHandlers(On,sn)),onDrop:$n(composeEventHandlers(Zn,rn)),role:typeof Dn=="string"&&Dn!==""?Dn:"button"},kn,Dt),!rt&&!kt?{tabIndex:0}:{}),Vn)}},[Dt,hn,vn,an,Qt,Ht,en,sn,rn,kt,St,rt]),cn=reactExports.useCallback(function(fn){fn.stopPropagation()},[]),mn=reactExports.useMemo(function(){return function(){var fn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},pn=fn.refKey,kn=pn===void 0?"ref":pn,Dn=fn.onChange,un=fn.onClick,Zt=_objectWithoutProperties$k(fn,_excluded4),Xt=_defineProperty$E({accept:nt,multiple:st,type:"file",style:{display:"none"},onChange:_n(composeEventHandlers(Dn,rn)),onClick:_n(composeEventHandlers(un,cn)),tabIndex:-1},kn,jt);return _objectSpread$A(_objectSpread$A({},Xt),Zt)}},[jt,nt,st,rn,rt]),In=zt.length,An=In>0&&allFilesAccepted({files:zt,accept:nt,minSize:at,maxSize:ot,multiple:st,maxFiles:lt}),wn=In>0&&!An;return _objectSpread$A(_objectSpread$A({},wt),{},{isDragAccept:An,isDragReject:wn,isFocused:Ot&&!rt,getRootProps:Tn,getInputProps:mn,rootRef:Dt,inputRef:jt,open:_n(nn)})}function reducer(tt,et){switch(et.type){case"focus":return _objectSpread$A(_objectSpread$A({},tt),{},{isFocused:!0});case"blur":return _objectSpread$A(_objectSpread$A({},tt),{},{isFocused:!1});case"openDialog":return _objectSpread$A(_objectSpread$A({},initialState$1),{},{isFileDialogActive:!0});case"closeDialog":return _objectSpread$A(_objectSpread$A({},tt),{},{isFileDialogActive:!1});case"setDraggedFiles":var nt=et.isDragActive,rt=et.draggedFiles;return _objectSpread$A(_objectSpread$A({},tt),{},{draggedFiles:rt,isDragActive:nt});case"setFiles":return _objectSpread$A(_objectSpread$A({},tt),{},{acceptedFiles:et.acceptedFiles,fileRejections:et.fileRejections});case"reset":return _objectSpread$A({},initialState$1);default:return tt}}function noop$a(){}function createStore$4(tt){let et;const nt=new Set,rt=(ct,ut)=>{const ht=typeof ct=="function"?ct(et):ct;if(ht!==et){const dt=et;et=ut?ht:Object.assign({},et,ht),nt.forEach(pt=>pt(et,dt))}},it=()=>et,ot=(ct,ut=it,ht=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let dt=ut(et);function pt(){const mt=ut(et);if(!ht(dt,mt)){const gt=dt;ct(dt=mt,gt)}}return nt.add(pt),()=>nt.delete(pt)},lt={setState:rt,getState:it,subscribe:(ct,ut,ht)=>ut||ht?ot(ct,ut,ht):(nt.add(ct),()=>nt.delete(ct)),destroy:()=>nt.clear()};return et=tt(rt,it,lt),lt}const isSSR$3=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),useIsomorphicLayoutEffect$3=isSSR$3?reactExports.useEffect:reactExports.useLayoutEffect;function create$4(tt){const et=typeof tt=="function"?createStore$4(tt):tt,nt=(rt=et.getState,it=Object.is)=>{const[,ot]=reactExports.useReducer(yt=>yt+1,0),at=et.getState(),st=reactExports.useRef(at),lt=reactExports.useRef(rt),ct=reactExports.useRef(it),ut=reactExports.useRef(!1),ht=reactExports.useRef();ht.current===void 0&&(ht.current=rt(at));let dt,pt=!1;(st.current!==at||lt.current!==rt||ct.current!==it||ut.current)&&(dt=rt(at),pt=!it(ht.current,dt)),useIsomorphicLayoutEffect$3(()=>{pt&&(ht.current=dt),st.current=at,lt.current=rt,ct.current=it,ut.current=!1});const mt=reactExports.useRef(at);useIsomorphicLayoutEffect$3(()=>{const yt=()=>{try{const vt=et.getState(),xt=lt.current(vt);ct.current(ht.current,xt)||(st.current=vt,ht.current=xt,ot())}catch{ut.current=!0,ot()}},bt=et.subscribe(yt);return et.getState()!==mt.current&&yt(),bt},[]);const gt=pt?dt:ht.current;return reactExports.useDebugValue(gt),gt};return Object.assign(nt,et),nt[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const rt=[nt,et];return{next(){const it=rt.length<=0;return{value:rt.shift(),done:it}}}},nt}const subscribeWithSelector=tt=>(et,nt,rt)=>{const it=rt.subscribe;return rt.subscribe=(at,st,lt)=>{let ct=at;if(st){const ut=(lt==null?void 0:lt.equalityFn)||Object.is;let ht=at(rt.getState());ct=dt=>{const pt=at(dt);if(!ut(ht,pt)){const mt=ht;st(ht=pt,mt)}},lt!=null&<.fireImmediately&&st(ht,ht)}return it(ct)},tt(et,nt,rt)};/*! +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$p(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$p(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$p(tt,et)}}function _arrayLikeToArray$p(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$n(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}var Dropzone=reactExports.forwardRef(function(tt,et){var nt=tt.children,rt=_objectWithoutProperties$k(tt,_excluded$1L),it=useDropzone(rt),ot=it.open,at=_objectWithoutProperties$k(it,_excluded2$i);return reactExports.useImperativeHandle(et,function(){return{open:ot}},[ot]),React$1.createElement(reactExports.Fragment,null,nt(_objectSpread$A(_objectSpread$A({},at),{},{open:ot})))});Dropzone.displayName="Dropzone";var defaultProps$8={disabled:!1,getFilesFromEvent:fromEvent,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};Dropzone.defaultProps=defaultProps$8;Dropzone.propTypes={children:PropTypes.func,accept:PropTypes.oneOfType([PropTypes.string,PropTypes.arrayOf(PropTypes.string)]),multiple:PropTypes.bool,preventDropOnDocument:PropTypes.bool,noClick:PropTypes.bool,noKeyboard:PropTypes.bool,noDrag:PropTypes.bool,noDragEventsBubbling:PropTypes.bool,minSize:PropTypes.number,maxSize:PropTypes.number,maxFiles:PropTypes.number,disabled:PropTypes.bool,getFilesFromEvent:PropTypes.func,onFileDialogCancel:PropTypes.func,onFileDialogOpen:PropTypes.func,useFsAccessApi:PropTypes.bool,onDragEnter:PropTypes.func,onDragLeave:PropTypes.func,onDragOver:PropTypes.func,onDrop:PropTypes.func,onDropAccepted:PropTypes.func,onDropRejected:PropTypes.func,validator:PropTypes.func};var initialState$1={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function useDropzone(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},et=_objectSpread$A(_objectSpread$A({},defaultProps$8),tt),nt=et.accept,rt=et.disabled,it=et.getFilesFromEvent,ot=et.maxSize,at=et.minSize,st=et.multiple,lt=et.maxFiles,ct=et.onDragEnter,ut=et.onDragLeave,ht=et.onDragOver,dt=et.onDrop,pt=et.onDropAccepted,mt=et.onDropRejected,gt=et.onFileDialogCancel,yt=et.onFileDialogOpen,bt=et.useFsAccessApi,vt=et.preventDropOnDocument,xt=et.noClick,kt=et.noKeyboard,St=et.noDrag,Tt=et.noDragEventsBubbling,At=et.validator,Et=reactExports.useMemo(function(){return typeof yt=="function"?yt:noop$a},[yt]),$t=reactExports.useMemo(function(){return typeof gt=="function"?gt:noop$a},[gt]),Dt=reactExports.useRef(null),jt=reactExports.useRef(null),Pt=reactExports.useReducer(reducer,initialState$1),Ct=_slicedToArray$d(Pt,2),wt=Ct[0],It=Ct[1],Ot=wt.isFocused,Wt=wt.isFileDialogActive,zt=wt.draggedFiles,Ft=reactExports.useRef(typeof window<"u"&&window.isSecureContext&&bt&&canUseFileSystemAccessAPI()),Nt=function(){!Ft.current&&Wt&&setTimeout(function(){if(jt.current){var pn=jt.current.files;pn.length||(It({type:"closeDialog"}),$t())}},300)};reactExports.useEffect(function(){return window.addEventListener("focus",Nt,!1),function(){window.removeEventListener("focus",Nt,!1)}},[jt,Wt,$t,Ft]);var Ut=reactExports.useRef([]),Mt=function(pn){Dt.current&&Dt.current.contains(pn.target)||(pn.preventDefault(),Ut.current=[])};reactExports.useEffect(function(){return vt&&(document.addEventListener("dragover",onDocumentDragOver,!1),document.addEventListener("drop",Mt,!1)),function(){vt&&(document.removeEventListener("dragover",onDocumentDragOver),document.removeEventListener("drop",Mt))}},[Dt,vt]);var Ht=reactExports.useCallback(function(fn){fn.preventDefault(),fn.persist(),Nn(fn),Ut.current=[].concat(_toConsumableArray$e(Ut.current),[fn.target]),isEvtWithFiles(fn)&&Promise.resolve(it(fn)).then(function(pn){isPropagationStopped(fn)&&!Tt||(It({draggedFiles:pn,isDragActive:!0,type:"setDraggedFiles"}),ct&&ct(fn))})},[it,ct,Tt]),en=reactExports.useCallback(function(fn){fn.preventDefault(),fn.persist(),Nn(fn);var pn=isEvtWithFiles(fn);if(pn&&fn.dataTransfer)try{fn.dataTransfer.dropEffect="copy"}catch{}return pn&&ht&&ht(fn),!1},[ht,Tt]),sn=reactExports.useCallback(function(fn){fn.preventDefault(),fn.persist(),Nn(fn);var pn=Ut.current.filter(function(Dn){return Dt.current&&Dt.current.contains(Dn)}),kn=pn.indexOf(fn.target);kn!==-1&&pn.splice(kn,1),Ut.current=pn,!(pn.length>0)&&(It({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),isEvtWithFiles(fn)&&ut&&ut(fn))},[Dt,ut,Tt]),Kt=reactExports.useCallback(function(fn,pn){var kn=[],Dn=[];fn.forEach(function(un){var Zt=fileAccepted(un,nt),Xt=_slicedToArray$d(Zt,2),Sn=Xt[0],Rn=Xt[1],jn=fileMatchSize(un,at,ot),On=_slicedToArray$d(jn,2),Zn=On[0],Vn=On[1],qn=At?At(un):null;if(Sn&&Zn&&!qn)kn.push(un);else{var zn=[Rn,Vn];qn&&(zn=zn.concat(qn)),Dn.push({file:un,errors:zn.filter(function(Jn){return Jn})})}}),(!st&&kn.length>1||st&<>=1&&kn.length>lt)&&(kn.forEach(function(un){Dn.push({file:un,errors:[TOO_MANY_FILES_REJECTION]})}),kn.splice(0)),It({acceptedFiles:kn,fileRejections:Dn,type:"setFiles"}),dt&&dt(kn,Dn,pn),Dn.length>0&&mt&&mt(Dn,pn),kn.length>0&&pt&&pt(kn,pn)},[It,st,nt,at,ot,lt,dt,pt,mt,At]),rn=reactExports.useCallback(function(fn){fn.preventDefault(),fn.persist(),Nn(fn),Ut.current=[],isEvtWithFiles(fn)&&Promise.resolve(it(fn)).then(function(pn){isPropagationStopped(fn)&&!Tt||Kt(pn,fn)}),It({type:"reset"})},[it,Kt,Tt]),nn=reactExports.useCallback(function(){if(Ft.current){It({type:"openDialog"}),Et();var fn={multiple:st,types:filePickerOptionsTypes(nt)};window.showOpenFilePicker(fn).then(function(pn){return it(pn)}).then(function(pn){Kt(pn,null),It({type:"closeDialog"})}).catch(function(pn){isAbort(pn)?($t(pn),It({type:"closeDialog"})):isSecurityError(pn)&&(Ft.current=!1,jt.current&&(jt.current.value=null,jt.current.click()))});return}jt.current&&(It({type:"openDialog"}),Et(),jt.current.value=null,jt.current.click())},[It,Et,$t,bt,Kt,nt,st]),hn=reactExports.useCallback(function(fn){!Dt.current||!Dt.current.isEqualNode(fn.target)||(fn.key===" "||fn.key==="Enter"||fn.keyCode===32||fn.keyCode===13)&&(fn.preventDefault(),nn())},[Dt,nn]),vn=reactExports.useCallback(function(){It({type:"focus"})},[]),an=reactExports.useCallback(function(){It({type:"blur"})},[]),Qt=reactExports.useCallback(function(){xt||(isIeOrEdge()?setTimeout(nn,0):nn())},[xt,nn]),_n=function(pn){return rt?null:pn},Pn=function(pn){return kt?null:_n(pn)},$n=function(pn){return St?null:_n(pn)},Nn=function(pn){Tt&&pn.stopPropagation()},Tn=reactExports.useMemo(function(){return function(){var fn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},pn=fn.refKey,kn=pn===void 0?"ref":pn,Dn=fn.role,un=fn.onKeyDown,Zt=fn.onFocus,Xt=fn.onBlur,Sn=fn.onClick,Rn=fn.onDragEnter,jn=fn.onDragOver,On=fn.onDragLeave,Zn=fn.onDrop,Vn=_objectWithoutProperties$k(fn,_excluded3$5);return _objectSpread$A(_objectSpread$A(_defineProperty$E({onKeyDown:Pn(composeEventHandlers(un,hn)),onFocus:Pn(composeEventHandlers(Zt,vn)),onBlur:Pn(composeEventHandlers(Xt,an)),onClick:_n(composeEventHandlers(Sn,Qt)),onDragEnter:$n(composeEventHandlers(Rn,Ht)),onDragOver:$n(composeEventHandlers(jn,en)),onDragLeave:$n(composeEventHandlers(On,sn)),onDrop:$n(composeEventHandlers(Zn,rn)),role:typeof Dn=="string"&&Dn!==""?Dn:"button"},kn,Dt),!rt&&!kt?{tabIndex:0}:{}),Vn)}},[Dt,hn,vn,an,Qt,Ht,en,sn,rn,kt,St,rt]),cn=reactExports.useCallback(function(fn){fn.stopPropagation()},[]),mn=reactExports.useMemo(function(){return function(){var fn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},pn=fn.refKey,kn=pn===void 0?"ref":pn,Dn=fn.onChange,un=fn.onClick,Zt=_objectWithoutProperties$k(fn,_excluded4),Xt=_defineProperty$E({accept:nt,multiple:st,type:"file",style:{display:"none"},onChange:_n(composeEventHandlers(Dn,rn)),onClick:_n(composeEventHandlers(un,cn)),tabIndex:-1},kn,jt);return _objectSpread$A(_objectSpread$A({},Xt),Zt)}},[jt,nt,st,rn,rt]),In=zt.length,An=In>0&&allFilesAccepted({files:zt,accept:nt,minSize:at,maxSize:ot,multiple:st,maxFiles:lt}),wn=In>0&&!An;return _objectSpread$A(_objectSpread$A({},wt),{},{isDragAccept:An,isDragReject:wn,isFocused:Ot&&!rt,getRootProps:Tn,getInputProps:mn,rootRef:Dt,inputRef:jt,open:_n(nn)})}function reducer(tt,et){switch(et.type){case"focus":return _objectSpread$A(_objectSpread$A({},tt),{},{isFocused:!0});case"blur":return _objectSpread$A(_objectSpread$A({},tt),{},{isFocused:!1});case"openDialog":return _objectSpread$A(_objectSpread$A({},initialState$1),{},{isFileDialogActive:!0});case"closeDialog":return _objectSpread$A(_objectSpread$A({},tt),{},{isFileDialogActive:!1});case"setDraggedFiles":var nt=et.isDragActive,rt=et.draggedFiles;return _objectSpread$A(_objectSpread$A({},tt),{},{draggedFiles:rt,isDragActive:nt});case"setFiles":return _objectSpread$A(_objectSpread$A({},tt),{},{acceptedFiles:et.acceptedFiles,fileRejections:et.fileRejections});case"reset":return _objectSpread$A({},initialState$1);default:return tt}}function noop$a(){}function createStore$4(tt){let et;const nt=new Set,rt=(ct,ut)=>{const ht=typeof ct=="function"?ct(et):ct;if(ht!==et){const dt=et;et=ut?ht:Object.assign({},et,ht),nt.forEach(pt=>pt(et,dt))}},it=()=>et,ot=(ct,ut=it,ht=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let dt=ut(et);function pt(){const mt=ut(et);if(!ht(dt,mt)){const gt=dt;ct(dt=mt,gt)}}return nt.add(pt),()=>nt.delete(pt)},lt={setState:rt,getState:it,subscribe:(ct,ut,ht)=>ut||ht?ot(ct,ut,ht):(nt.add(ct),()=>nt.delete(ct)),destroy:()=>nt.clear()};return et=tt(rt,it,lt),lt}const isSSR$3=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),useIsomorphicLayoutEffect$3=isSSR$3?reactExports.useEffect:reactExports.useLayoutEffect;function create$4(tt){const et=typeof tt=="function"?createStore$4(tt):tt,nt=(rt=et.getState,it=Object.is)=>{const[,ot]=reactExports.useReducer(yt=>yt+1,0),at=et.getState(),st=reactExports.useRef(at),lt=reactExports.useRef(rt),ct=reactExports.useRef(it),ut=reactExports.useRef(!1),ht=reactExports.useRef();ht.current===void 0&&(ht.current=rt(at));let dt,pt=!1;(st.current!==at||lt.current!==rt||ct.current!==it||ut.current)&&(dt=rt(at),pt=!it(ht.current,dt)),useIsomorphicLayoutEffect$3(()=>{pt&&(ht.current=dt),st.current=at,lt.current=rt,ct.current=it,ut.current=!1});const mt=reactExports.useRef(at);useIsomorphicLayoutEffect$3(()=>{const yt=()=>{try{const vt=et.getState(),xt=lt.current(vt);ct.current(ht.current,xt)||(st.current=vt,ht.current=xt,ot())}catch{ut.current=!0,ot()}},bt=et.subscribe(yt);return et.getState()!==mt.current&&yt(),bt},[]);const gt=pt?dt:ht.current;return reactExports.useDebugValue(gt),gt};return Object.assign(nt,et),nt[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const rt=[nt,et];return{next(){const it=rt.length<=0;return{value:rt.shift(),done:it}}}},nt}const subscribeWithSelector=tt=>(et,nt,rt)=>{const it=rt.subscribe;return rt.subscribe=(at,st,lt)=>{let ct=at;if(st){const ut=(lt==null?void 0:lt.equalityFn)||Object.is;let ht=at(rt.getState());ct=dt=>{const pt=at(dt);if(!ut(ht,pt)){const mt=ht;st(ht=pt,mt)}},lt!=null&<.fireImmediately&&st(ht,ht)}return it(ct)},tt(et,nt,rt)};/*! * isobject * * Copyright (c) 2014-2017, Jon Schlinkert. @@ -95,7 +95,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * * Copyright (c) 2014-2015, 2017, Jon Schlinkert. * Released under the MIT License. - */var split=splitString,extend$3=extendShallow,isPlainObject$3=isPlainObject$5,isObject$h=isExtendable,setValue=function(tt,et,nt){if(!isObject$h(tt)||(Array.isArray(et)&&(et=[].concat.apply([],et).join(".")),typeof et!="string"))return tt;for(var rt=split(et,{sep:".",brackets:!0}).filter(isValidKey),it=rt.length,ot=-1,at=tt;++ottt.filter(Boolean).join(".");function getKeyPath(tt){const et=tt.split(".");return[et.pop(),et.join(".")||void 0]}function getValuesForPaths(tt,et){return Object.entries(pick$1(tt,et)).reduce((nt,[,{value:rt,disabled:it,key:ot}])=>(nt[ot]=it?void 0:rt,nt),{})}function useCompareMemoize(tt,et){const nt=reactExports.useRef();return(et?dequal:shallow$2)(tt,nt.current)||(nt.current=tt),nt.current}function useDeepMemo(tt,et){return reactExports.useMemo(tt,useCompareMemoize(et,!0))}function useToggle(tt){const et=reactExports.useRef(null),nt=reactExports.useRef(null),rt=reactExports.useRef(!0);return reactExports.useLayoutEffect(()=>{tt||(et.current.style.height="0px",et.current.style.overflow="hidden")},[]),reactExports.useEffect(()=>{if(rt.current){rt.current=!1;return}let it;const ot=et.current,at=()=>{tt&&(ot.style.removeProperty("height"),ot.style.removeProperty("overflow"),nt.current.scrollIntoView({behavior:"smooth",block:"nearest"}))};ot.addEventListener("transitionend",at,{once:!0});const{height:st}=nt.current.getBoundingClientRect();return ot.style.height=st+"px",tt||(ot.style.overflow="hidden",it=window.setTimeout(()=>ot.style.height="0px",50)),()=>{ot.removeEventListener("transitionend",at),clearTimeout(it)}},[tt]),{wrapperRef:et,contentRef:nt}}const useVisiblePaths=tt=>{const[et,nt]=reactExports.useState(tt.getVisiblePaths());return reactExports.useEffect(()=>{nt(tt.getVisiblePaths());const rt=tt.useStore.subscribe(tt.getVisiblePaths,nt,{equalityFn:shallow$2});return()=>rt()},[tt]),et};function useValuesForPath(tt,et,nt){return tt.useStore(it=>{const ot=_objectSpread2$1(_objectSpread2$1({},nt),it.data);return getValuesForPaths(ot,et)},shallow$2)}function usePopin(tt=3){const et=reactExports.useRef(null),nt=reactExports.useRef(null),[rt,it]=reactExports.useState(!1),ot=reactExports.useCallback(()=>it(!0),[]),at=reactExports.useCallback(()=>it(!1),[]);return reactExports.useLayoutEffect(()=>{if(rt){const{bottom:st,top:lt,left:ct}=et.current.getBoundingClientRect(),{height:ut}=nt.current.getBoundingClientRect(),ht=st+ut>window.innerHeight-40?"up":"down";nt.current.style.position="fixed",nt.current.style.zIndex="10000",nt.current.style.left=ct+"px",ht==="down"?nt.current.style.top=st+tt+"px":nt.current.style.bottom=window.innerHeight-lt+tt+"px"}},[tt,rt]),{popinRef:et,wrapperRef:nt,shown:rt,show:ot,hide:at}}k$8([namesPlugin]);const convertMap={rgb:"toRgb",hsl:"toHsl",hsv:"toHsv",hex:"toHex"};v8n.extend({color:()=>tt=>w$5(tt).isValid()});const schema$2=tt=>v8n().color().test(tt);function convert$5(tt,{format:et,hasAlpha:nt,isString:rt}){const it=convertMap[et]+(rt&&et!=="hex"?"String":""),ot=tt[it]();return typeof ot=="object"&&!nt?omit$1(ot,["a"]):ot}const sanitize$2=(tt,et)=>{const nt=w$5(tt);if(!nt.isValid())throw Error("Invalid color");return convert$5(nt,et)},format$1$1=(tt,et)=>convert$5(w$5(tt),_objectSpread2$1(_objectSpread2$1({},et),{},{isString:!0,format:"hex"})),normalize$3=({value:tt})=>{const et=I$2(tt),nt=et==="name"?"hex":et,rt=typeof tt=="object"?"a"in tt:et==="hex"&&tt.length===8||/^(rgba)|(hsla)|(hsva)/.test(tt),it={format:nt,hasAlpha:rt,isString:typeof tt=="string"};return{value:sanitize$2(tt,it),settings:it}};var props$2=Object.freeze({__proto__:null,schema:schema$2,sanitize:sanitize$2,format:format$1$1,normalize:normalize$3});const ColorPreview=styled$5("div",{position:"relative",boxSizing:"border-box",borderRadius:"$sm",overflow:"hidden",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",backgroundColor:"#fff",backgroundImage:`url('data:image/svg+xml;charset=utf-8,')`,$inputStyle:"",$hover:"",zIndex:1,variants:{active:{true:{$inputStyle:"$accent1"}}},"&::before":{content:'""',position:"absolute",top:0,bottom:0,right:0,left:0,backgroundColor:"currentColor",zIndex:1}}),PickerContainer=styled$5("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto",columnGap:"$colGap",alignItems:"center"}),PickerWrapper=styled$5("div",{width:"$colorPickerWidth",height:"$colorPickerHeight",".react-colorful":{width:"100%",height:"100%",boxShadow:"$level2",cursor:"crosshair"},".react-colorful__saturation":{borderRadius:"$sm $sm 0 0"},".react-colorful__alpha, .react-colorful__hue":{height:10},".react-colorful__last-control":{borderRadius:"0 0 $sm $sm"},".react-colorful__pointer":{height:12,width:12}});function convertToRgb(tt,et){return et!=="rgb"?w$5(tt).toRgb():tt}function Color$2({value:tt,displayValue:et,settings:nt,onUpdate:rt}){const{emitOnEditStart:it,emitOnEditEnd:ot}=useInputContext(),{format:at,hasAlpha:st}=nt,{popinRef:lt,wrapperRef:ct,shown:ut,show:ht,hide:dt}=usePopin(),pt=reactExports.useRef(0),[mt,gt]=reactExports.useState(()=>convertToRgb(tt,at)),yt=st?Ce:Ne$1,bt=()=>{gt(convertToRgb(tt,at)),ht(),it()},vt=()=>{dt(),ot(),window.clearTimeout(pt.current)},xt=()=>{pt.current=window.setTimeout(vt,500)};return reactExports.useEffect(()=>()=>window.clearTimeout(pt.current),[]),React$1.createElement(React$1.Fragment,null,React$1.createElement(ColorPreview,{ref:lt,active:ut,onClick:()=>bt(),style:{color:et}}),ut&&React$1.createElement(Portal$2,null,React$1.createElement(Overlay$1,{onPointerUp:vt}),React$1.createElement(PickerWrapper,{ref:ct,onMouseEnter:()=>window.clearTimeout(pt.current),onMouseLeave:kt=>kt.buttons===0&&xt()},React$1.createElement(yt,{color:mt,onChange:rt}))))}function ColorComponent(){const{value:tt,displayValue:et,label:nt,onChange:rt,onUpdate:it,settings:ot}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,nt),React$1.createElement(PickerContainer,null,React$1.createElement(Color$2,{value:tt,displayValue:et,onChange:rt,onUpdate:it,settings:ot}),React$1.createElement(ValueInput,{value:et,onChange:rt,onUpdate:it})))}var color$3=_objectSpread2$1({component:ColorComponent},props$2);function Vector3dComponent(){const{label:tt,displayValue:et,onUpdate:nt,settings:rt}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(Vector,{value:et,settings:rt,onUpdate:nt}))}var vector3d=_objectSpread2$1({component:Vector3dComponent},getVectorPlugin(["x","y","z"]));const JoystickTrigger=styled$5("div",{$flexCenter:"",position:"relative",backgroundColor:"$elevation3",borderRadius:"$sm",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",touchAction:"none",$draggable:"",$hover:"","&:active":{cursor:"none"},"&::after":{content:'""',backgroundColor:"$accent2",height:4,width:4,borderRadius:2}}),JoystickPlayground=styled$5("div",{$flexCenter:"",width:"$joystickWidth",height:"$joystickHeight",borderRadius:"$sm",boxShadow:"$level2",position:"fixed",zIndex:1e4,overflow:"hidden",$draggable:"",transform:"translate(-50%, -50%)",variants:{isOutOfBounds:{true:{backgroundColor:"$elevation1"},false:{backgroundColor:"$elevation3"}}},"> div":{position:"absolute",$flexCenter:"",borderStyle:"solid",borderWidth:1,borderColor:"$highlight1",backgroundColor:"$elevation3",width:"80%",height:"80%","&::after,&::before":{content:'""',position:"absolute",zindex:10,backgroundColor:"$highlight1"},"&::before":{width:"100%",height:1},"&::after":{height:"100%",width:1}},"> span":{position:"relative",zindex:100,width:10,height:10,backgroundColor:"$accent2",borderRadius:"50%"}});function Joystick({value:tt,settings:et,onUpdate:nt}){const rt=reactExports.useRef(),it=reactExports.useRef(0),ot=reactExports.useRef(0),at=reactExports.useRef(1),[st,lt]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!1),[ht,dt]=useTransform(),pt=reactExports.useRef(null),mt=reactExports.useRef(null);reactExports.useLayoutEffect(()=>{if(st){const{top:Pt,left:Ct,width:wt,height:It}=pt.current.getBoundingClientRect();mt.current.style.left=Ct+wt/2+"px",mt.current.style.top=Pt+It/2+"px"}},[st]);const{keys:[gt,yt],joystick:bt}=et,vt=bt==="invertY"?1:-1,{[gt]:{step:xt},[yt]:{step:kt}}=et,St=useTh("sizes","joystickWidth"),Tt=useTh("sizes","joystickHeight"),At=parseFloat(St)*.8/2,Et=parseFloat(Tt)*.8/2,$t=reactExports.useCallback(()=>{rt.current||(ut(!0),it.current&&dt({x:it.current*At}),ot.current&&dt({y:ot.current*-Et}),rt.current=window.setInterval(()=>{nt(Pt=>{const Ct=xt*it.current*at.current,wt=vt*kt*ot.current*at.current;return Array.isArray(Pt)?{[gt]:Pt[0]+Ct,[yt]:Pt[1]+wt}:{[gt]:Pt[gt]+Ct,[yt]:Pt[yt]+wt}})},16))},[At,Et,nt,dt,xt,kt,gt,yt,vt]),Dt=reactExports.useCallback(()=>{window.clearTimeout(rt.current),rt.current=void 0,ut(!1)},[]);reactExports.useEffect(()=>{function Pt(Ct){at.current=multiplyStep(Ct)}return window.addEventListener("keydown",Pt),window.addEventListener("keyup",Pt),()=>{window.clearTimeout(rt.current),window.removeEventListener("keydown",Pt),window.removeEventListener("keyup",Pt)}},[]);const jt=useDrag$1(({first:Pt,active:Ct,delta:[wt,It],movement:[Ot,Wt]})=>{Pt&<(!0);const zt=clamp$8(Ot,-At,At),Ft=clamp$8(Wt,-Et,Et);it.current=Math.abs(Ot)>Math.abs(zt)?Math.sign(Ot-zt):0,ot.current=Math.abs(Wt)>Math.abs(Ft)?Math.sign(Ft-Wt):0;let Nt=tt[gt],Ut=tt[yt];Ct?(it.current||(Nt+=wt*xt*at.current,dt({x:zt})),ot.current||(Ut-=vt*It*kt*at.current,dt({y:Ft})),it.current||ot.current?$t():Dt(),nt({[gt]:Nt,[yt]:Ut})):(lt(!1),it.current=0,ot.current=0,dt({x:0,y:0}),Dt())});return React$1.createElement(JoystickTrigger,_extends$t({ref:pt},jt()),st&&React$1.createElement(Portal$2,null,React$1.createElement(JoystickPlayground,{ref:mt,isOutOfBounds:ct},React$1.createElement("div",null),React$1.createElement("span",{ref:ht}))))}const Container$1=styled$5("div",{display:"grid",columnGap:"$colGap",variants:{withJoystick:{true:{gridTemplateColumns:"$sizes$rowHeight auto"},false:{gridTemplateColumns:"auto"}}}});function Vector2dComponent(){const{label:tt,displayValue:et,onUpdate:nt,settings:rt}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(Container$1,{withJoystick:!!rt.joystick},rt.joystick&&React$1.createElement(Joystick,{value:et,settings:rt,onUpdate:nt}),React$1.createElement(Vector,{value:et,settings:rt,onUpdate:nt})))}const _excluded$7$1=["joystick"],plugin=getVectorPlugin(["x","y"]),normalize$2$1=tt=>{let{joystick:et=!0}=tt,nt=_objectWithoutProperties$l(tt,_excluded$7$1);const{value:rt,settings:it}=plugin.normalize(nt);return{value:rt,settings:_objectSpread2$1(_objectSpread2$1({},it),{},{joystick:et})}};var vector2d=_objectSpread2$1(_objectSpread2$1({component:Vector2dComponent},plugin),{},{normalize:normalize$2$1});const sanitize$1=tt=>{if(tt!==void 0){if(tt instanceof File)try{return URL.createObjectURL(tt)}catch{return}if(typeof tt=="string"&&tt.indexOf("blob:")===0)return tt;throw Error("Invalid image format [undefined | blob | File].")}},schema$1=(tt,et)=>typeof et=="object"&&"image"in et,normalize$1$1=({image:tt})=>({value:tt});var props$1=Object.freeze({__proto__:null,sanitize:sanitize$1,schema:schema$1,normalize:normalize$1$1});const ImageContainer=styled$5("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto 20px",columnGap:"$colGap",alignItems:"center"}),DropZone=styled$5("div",{$flexCenter:"",overflow:"hidden",height:"$rowHeight",background:"$elevation3",textAlign:"center",color:"inherit",borderRadius:"$sm",outline:"none",userSelect:"none",cursor:"pointer",$inputStyle:"",$hover:"",$focusWithin:"",$active:"$accent1 $elevation1",variants:{isDragAccept:{true:{$inputStyle:"$accent1",backgroundColor:"$elevation1"}}}}),ImagePreview=styled$5("div",{boxSizing:"border-box",borderRadius:"$sm",height:"$rowHeight",width:"$rowHeight",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center",variants:{hasImage:{true:{cursor:"pointer",$hover:"",$active:""}}}}),ImageLargePreview=styled$5("div",{$flexCenter:"",width:"$imagePreviewWidth",height:"$imagePreviewHeight",borderRadius:"$sm",boxShadow:"$level2",pointerEvents:"none",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center"}),Instructions=styled$5("div",{fontSize:"0.8em",height:"100%",padding:"$rowGap $md"}),Remove=styled$5("div",{$flexCenter:"",top:"0",right:"0",marginRight:"$sm",height:"100%",cursor:"pointer",variants:{disabled:{true:{color:"$elevation3",cursor:"default"}}},"&::after,&::before":{content:'""',position:"absolute",height:2,width:10,borderRadius:1,backgroundColor:"currentColor"},"&::after":{transform:"rotate(45deg)"},"&::before":{transform:"rotate(-45deg)"}});function ImageComponent(){const{label:tt,value:et,onUpdate:nt,disabled:rt}=useInputContext(),{popinRef:it,wrapperRef:ot,shown:at,show:st,hide:lt}=usePopin(),ct=reactExports.useCallback(mt=>{mt.length&&nt(mt[0])},[nt]),ut=reactExports.useCallback(mt=>{mt.stopPropagation(),nt(void 0)},[nt]),{getRootProps:ht,getInputProps:dt,isDragAccept:pt}=useDropzone({maxFiles:1,accept:"image/*",onDrop:ct,disabled:rt});return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(ImageContainer,null,React$1.createElement(ImagePreview,{ref:it,hasImage:!!et,onPointerDown:()=>!!et&&st(),onPointerUp:lt,style:{backgroundImage:et?`url(${et})`:"none"}}),at&&!!et&&React$1.createElement(Portal$2,null,React$1.createElement(Overlay$1,{onPointerUp:lt,style:{cursor:"pointer"}}),React$1.createElement(ImageLargePreview,{ref:ot,style:{backgroundImage:`url(${et})`}})),React$1.createElement(DropZone,ht({isDragAccept:pt}),React$1.createElement("input",dt()),React$1.createElement(Instructions,null,pt?"drop image":"click or drop")),React$1.createElement(Remove,{onClick:ut,disabled:!et})))}var image=_objectSpread2$1({component:ImageComponent},props$1);const number$5=v8n().number(),schema=(tt,et)=>v8n().array().length(2).every.number().test(tt)&&v8n().schema({min:number$5,max:number$5}).test(et),format$2=tt=>({min:tt[0],max:tt[1]}),sanitize=(tt,{bounds:[et,nt]},rt)=>{const it=Array.isArray(tt)?format$2(tt):tt,ot={min:rt[0],max:rt[1]},{min:at,max:st}=_objectSpread2$1(_objectSpread2$1({},ot),it);return[clamp$8(Number(at),et,Math.max(et,st)),clamp$8(Number(st),Math.min(nt,at),nt)]},normalize$4=({value:tt,min:et,max:nt})=>{const rt={min:et,max:nt},it=normalizeKeyedNumberSettings(format$2(tt),{min:rt,max:rt}),ot=[et,nt],at=_objectSpread2$1(_objectSpread2$1({},it),{},{bounds:ot});return{value:sanitize(format$2(tt),at,tt),settings:at}};var props$3=Object.freeze({__proto__:null,schema,format:format$2,sanitize,normalize:normalize$4});const _excluded$6$1=["value","bounds","onDrag"],_excluded2$1$1=["bounds"],Container=styled$5("div",{display:"grid",columnGap:"$colGap",gridTemplateColumns:"auto calc($sizes$numberInputMinWidth * 2 + $space$rowGap)"});function IntervalSlider(tt){let{value:et,bounds:[nt,rt],onDrag:it}=tt,ot=_objectWithoutProperties$l(tt,_excluded$6$1);const at=reactExports.useRef(null),st=reactExports.useRef(null),lt=reactExports.useRef(null),ct=reactExports.useRef(0),ut=useTh("sizes","scrubberWidth"),ht=useDrag$1(({event:mt,first:gt,xy:[yt],movement:[bt],memo:vt={}})=>{if(gt){const{width:kt,left:St}=at.current.getBoundingClientRect();ct.current=kt-parseFloat(ut);const Tt=(mt==null?void 0:mt.target)===st.current||(mt==null?void 0:mt.target)===lt.current;vt.pos=invertedRange((yt-St)/kt,nt,rt);const At=Math.abs(vt.pos-et.min)-Math.abs(vt.pos-et.max);vt.key=At<0||At===0&&vt.pos<=et.min?"min":"max",Tt&&(vt.pos=et[vt.key])}const xt=vt.pos+invertedRange(bt/ct.current,0,rt-nt);return it({[vt.key]:sanitizeStep(xt,ot[vt.key])}),vt}),dt=`calc(${range$8(et.min,nt,rt)} * (100% - ${ut} - 8px) + 4px)`,pt=`calc(${1-range$8(et.max,nt,rt)} * (100% - ${ut} - 8px) + 4px)`;return React$1.createElement(RangeWrapper,_extends$t({ref:at},ht()),React$1.createElement(Range,null,React$1.createElement(Indicator,{style:{left:dt,right:pt}})),React$1.createElement(Scrubber,{position:"left",ref:st,style:{left:dt}}),React$1.createElement(Scrubber,{position:"right",ref:lt,style:{right:pt}}))}function IntervalComponent(){const{label:tt,displayValue:et,onUpdate:nt,settings:rt}=useInputContext(),it=_objectWithoutProperties$l(rt,_excluded2$1$1);return React$1.createElement(React$1.Fragment,null,React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(Container,null,React$1.createElement(IntervalSlider,_extends$t({value:et},rt,{onDrag:nt})),React$1.createElement(Vector,{value:et,settings:it,onUpdate:nt,innerLabelTrim:0}))))}var interval$1=_objectSpread2$1({component:IntervalComponent},props$3);const createEventEmitter=()=>{const tt=new Map;return{on:(et,nt)=>{let rt=tt.get(et);rt===void 0&&(rt=new Set,tt.set(et,rt)),rt.add(nt)},off:(et,nt)=>{const rt=tt.get(et);rt!==void 0&&(rt.delete(nt),rt.size===0&&tt.delete(et))},emit:(et,...nt)=>{const rt=tt.get(et);if(rt!==void 0)for(const it of rt)it(...nt)}}},_excluded$5$1=["type","value"],_excluded2$h=["onChange","transient","onEditStart","onEditEnd"],Store=function(){const et=create$4(subscribeWithSelector(()=>({data:{}}))),nt=createEventEmitter();this.storeId=getUid(),this.useStore=et;const rt={},it=new Set;this.getVisiblePaths=()=>{const at=this.getData(),st=Object.keys(at),lt=[];Object.entries(rt).forEach(([ut,ht])=>{ht.render&&st.some(dt=>dt.indexOf(ut)===0)&&!ht.render(this.get)&<.push(ut+".")});const ct=[];return it.forEach(ut=>{ut in at&&at[ut].__refCount>0&<.every(ht=>ut.indexOf(ht)===-1)&&(!at[ut].render||at[ut].render(this.get))&&ct.push(ut)}),ct},this.setOrderedPaths=at=>{at.forEach(st=>it.add(st))},this.orderPaths=at=>(this.setOrderedPaths(at),at),this.disposePaths=at=>{et.setState(st=>{const lt=st.data;return at.forEach(ct=>{if(ct in lt){const ut=lt[ct];ut.__refCount--,ut.__refCount===0&&ut.type in SpecialInputs&&delete lt[ct]}}),{data:lt}})},this.dispose=()=>{et.setState(()=>({data:{}}))},this.getFolderSettings=at=>rt[at]||{},this.getData=()=>et.getState().data,this.addData=(at,st)=>{et.setState(lt=>{const ct=lt.data;return Object.entries(at).forEach(([ut,ht])=>{let dt=ct[ut];if(dt){const{type:pt,value:mt}=ht,gt=_objectWithoutProperties$l(ht,_excluded$5$1);pt!==dt.type?warn$3(LevaErrors.INPUT_TYPE_OVERRIDE,pt):((dt.__refCount===0||st)&&Object.assign(dt,gt),dt.__refCount++)}else ct[ut]=_objectSpread2$1(_objectSpread2$1({},ht),{},{__refCount:1})}),{data:ct}})},this.setValueAtPath=(at,st,lt)=>{et.setState(ct=>{const ut=ct.data;return updateInput(ut[at],st,at,this,lt),{data:ut}})},this.setSettingsAtPath=(at,st)=>{et.setState(lt=>{const ct=lt.data;return ct[at].settings=_objectSpread2$1(_objectSpread2$1({},ct[at].settings),st),{data:ct}})},this.disableInputAtPath=(at,st)=>{et.setState(lt=>{const ct=lt.data;return ct[at].disabled=st,{data:ct}})},this.set=(at,st)=>{et.setState(lt=>{const ct=lt.data;return Object.entries(at).forEach(([ut,ht])=>{try{updateInput(ct[ut],ht,void 0,void 0,st)}catch{}}),{data:ct}})},this.getInput=at=>{try{return this.getData()[at]}catch{warn$3(LevaErrors.PATH_DOESNT_EXIST,at)}},this.get=at=>{var st;return(st=this.getInput(at))===null||st===void 0?void 0:st.value},this.emitOnEditStart=at=>{nt.emit(`onEditStart:${at}`,this.get(at),at,_objectSpread2$1(_objectSpread2$1({},this.getInput(at)),{},{get:this.get}))},this.emitOnEditEnd=at=>{nt.emit(`onEditEnd:${at}`,this.get(at),at,_objectSpread2$1(_objectSpread2$1({},this.getInput(at)),{},{get:this.get}))},this.subscribeToEditStart=(at,st)=>{const lt=`onEditStart:${at}`;return nt.on(lt,st),()=>nt.off(lt,st)},this.subscribeToEditEnd=(at,st)=>{const lt=`onEditEnd:${at}`;return nt.on(lt,st),()=>nt.off(lt,st)};const ot=(at,st,lt)=>{const ct={};return Object.entries(at).forEach(([ut,ht])=>{if(ut==="")return warn$3(LevaErrors.EMPTY_KEY);let dt=join(st,ut);if(ht.type===SpecialInputs.FOLDER){const pt=ot(ht.schema,dt,lt);Object.assign(ct,pt),dt in rt||(rt[dt]=ht.settings)}else if(ut in lt)warn$3(LevaErrors.DUPLICATE_KEYS,ut,dt,lt[ut].path);else{const pt=normalizeInput(ht,ut,dt,ct);if(pt){const{type:mt,options:gt,input:yt}=pt,{onChange:bt,transient:vt,onEditStart:xt,onEditEnd:kt}=gt,St=_objectWithoutProperties$l(gt,_excluded2$h);ct[dt]=_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({type:mt},St),yt),{},{fromPanel:!0}),lt[ut]={path:dt,onChange:bt,transient:vt,onEditStart:xt,onEditEnd:kt}}else warn$3(LevaErrors.UNKNOWN_INPUT,dt,ht)}}),ct};this.getDataFromSchema=at=>{const st={};return[ot(at,"",st),st]}},levaStore=new Store,defaultSettings$2={collapsed:!1};function folder(tt,et){return{type:SpecialInputs.FOLDER,schema:tt,settings:_objectSpread2$1(_objectSpread2$1({},defaultSettings$2),et)}}const isInput=tt=>"__levaInput"in tt,buildTree=(tt,et)=>{const nt={},rt=et?et.toLowerCase():null;return tt.forEach(it=>{const[ot,at]=getKeyPath(it);(!rt||ot.toLowerCase().indexOf(rt)>-1)&&merge$2(nt,at,{[ot]:{__levaInput:!0,path:it}})}),nt},_excluded$4$1=["type","label","path","valueKey","value","settings","setValue","disabled"];function ControlInput(tt){let{type:et,label:nt,path:rt,valueKey:it,value:ot,settings:at,setValue:st,disabled:lt}=tt,ct=_objectWithoutProperties$l(tt,_excluded$4$1);const{displayValue:ut,onChange:ht,onUpdate:dt}=useInputSetters({type:et,value:ot,settings:at,setValue:st}),pt=Plugins[et].component;return pt?React$1.createElement(InputContext.Provider,{value:_objectSpread2$1({key:it,path:rt,id:""+rt,label:nt,displayValue:ut,value:ot,onChange:ht,onUpdate:dt,settings:at,setValue:st,disabled:lt},ct)},React$1.createElement(StyledInputWrapper$1,{disabled:lt},React$1.createElement(pt,null))):(warn$3(LevaErrors.NO_COMPONENT_FOR_TYPE,et,rt),null)}const StyledButton$2=styled$5("button",{display:"block",$reset:"",fontWeight:"$button",height:"$rowHeight",borderStyle:"none",borderRadius:"$sm",backgroundColor:"$elevation1",color:"$highlight1","&:not(:disabled)":{color:"$highlight3",backgroundColor:"$accent2",cursor:"pointer",$hover:"$accent3",$active:"$accent3 $accent1",$focus:""}});function Button$3({onClick:tt,settings:et,label:nt}){const rt=useStoreContext();return React$1.createElement(Row,null,React$1.createElement(StyledButton$2,{disabled:et.disabled,onClick:()=>tt(rt.get)},nt))}const StyledButtonGroup=styled$5("div",{$flex:"",justifyContent:"flex-end",gap:"$colGap"}),StyledButtonGroupButton=styled$5("button",{$reset:"",cursor:"pointer",borderRadius:"$xs","&:hover":{backgroundColor:"$elevation3"}}),getOpts=({label:tt,opts:et})=>{let nt=typeof tt=="string"&&tt.trim()===""?null:tt,rt=et;return typeof et.opts=="object"&&(rt.label!==void 0&&(nt=et.label),rt=et.opts),{label:nt,opts:rt}};function ButtonGroup(tt){const{label:et,opts:nt}=getOpts(tt),rt=useStoreContext();return React$1.createElement(Row,{input:!!et},et&&React$1.createElement(Label$4,null,et),React$1.createElement(StyledButtonGroup,null,Object.entries(nt).map(([it,ot])=>React$1.createElement(StyledButtonGroupButton,{key:it,onClick:()=>ot(rt.get)},it))))}const Canvas$2=styled$5("canvas",{height:"$monitorHeight",width:"100%",display:"block",borderRadius:"$sm"}),POINTS=100;function push(tt,et){tt.push(et),tt.length>POINTS&&tt.shift()}const MonitorCanvas=reactExports.forwardRef(function({initialValue:tt},et){const nt=useTh("colors","highlight3"),rt=useTh("colors","elevation2"),it=useTh("colors","highlight1"),[ot,at]=reactExports.useMemo(()=>[w$5(it).alpha(.4).toRgbString(),w$5(it).alpha(.1).toRgbString()],[it]),st=reactExports.useRef([tt]),lt=reactExports.useRef(tt),ct=reactExports.useRef(tt),ut=reactExports.useRef(),ht=reactExports.useCallback((mt,gt)=>{if(!mt)return;const{width:yt,height:bt}=mt,vt=new Path2D,xt=yt/POINTS,kt=bt*.05;for(let At=0;At({frame:mt=>{(lt.current===void 0||mtct.current)&&(ct.current=mt),push(st.current,mt),ut.current=requestAnimationFrame(()=>ht(dt.current,pt.current))}}),[dt,pt,ht]),reactExports.useEffect(()=>()=>cancelAnimationFrame(ut.current),[]),React$1.createElement(Canvas$2,{ref:dt})}),parse$2=tt=>Number.isFinite(tt)?tt.toPrecision(2):tt.toString(),MonitorLog=reactExports.forwardRef(function({initialValue:tt},et){const[nt,rt]=reactExports.useState(parse$2(tt));return reactExports.useImperativeHandle(et,()=>({frame:it=>rt(parse$2(it))}),[]),React$1.createElement("div",null,nt)});function getValue$4(tt){return typeof tt=="function"?tt():tt.current}function Monitor({label:tt,objectOrFn:et,settings:nt}){const rt=reactExports.useRef(),it=reactExports.useRef(getValue$4(et));return reactExports.useEffect(()=>{const ot=window.setInterval(()=>{var at;document.hidden||(at=rt.current)===null||at===void 0||at.frame(getValue$4(et))},nt.interval);return()=>window.clearInterval(ot)},[et,nt.interval]),React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,{align:"top"},tt),nt.graph?React$1.createElement(MonitorCanvas,{ref:rt,initialValue:it.current}):React$1.createElement(MonitorLog,{ref:rt,initialValue:it.current}))}const _excluded$3$1=["type","label","key"],specialComponents={[SpecialInputs.BUTTON]:Button$3,[SpecialInputs.BUTTON_GROUP]:ButtonGroup,[SpecialInputs.MONITOR]:Monitor},Control=React$1.memo(({path:tt})=>{const[et,{set:nt,setSettings:rt,disable:it,storeId:ot,emitOnEditStart:at,emitOnEditEnd:st}]=useInput(tt);if(!et)return null;const{type:lt,label:ct,key:ut}=et,ht=_objectWithoutProperties$l(et,_excluded$3$1);if(lt in SpecialInputs){const dt=specialComponents[lt];return React$1.createElement(dt,_extends$t({label:ct,path:tt},ht))}return lt in Plugins?React$1.createElement(ControlInput,_extends$t({key:ot+tt,type:lt,label:ct,storeId:ot,path:tt,valueKey:ut,setValue:nt,setSettings:rt,disable:it,emitOnEditStart:at,emitOnEditEnd:st},ht)):(log$2(LevaErrors.UNSUPPORTED_INPUT,lt,tt),null)});function FolderTitle({toggle:tt,toggled:et,name:nt}){return React$1.createElement(StyledTitle,{onClick:()=>tt()},React$1.createElement(Chevron,{toggled:et}),React$1.createElement("div",null,nt))}const Folder=({name:tt,path:et,tree:nt})=>{const rt=useStoreContext(),it=join(et,tt),{collapsed:ot,color:at}=rt.getFolderSettings(it),[st,lt]=reactExports.useState(!ot),ct=reactExports.useRef(null),ut=useTh("colors","folderWidgetColor"),ht=useTh("colors","folderTextColor");return reactExports.useLayoutEffect(()=>{ct.current.style.setProperty("--leva-colors-folderWidgetColor",at||ut),ct.current.style.setProperty("--leva-colors-folderTextColor",at||ht)},[at,ut,ht]),React$1.createElement(StyledFolder,{ref:ct},React$1.createElement(FolderTitle,{name:tt,toggled:st,toggle:()=>lt(dt=>!dt)}),React$1.createElement(TreeWrapper,{parent:it,tree:nt,toggled:st}))},TreeWrapper=React$1.memo(({isRoot:tt=!1,fill:et=!1,flat:nt=!1,parent:rt,tree:it,toggled:ot})=>{const{wrapperRef:at,contentRef:st}=useToggle(ot),lt=useStoreContext(),ct=([ht,dt])=>{var pt;return(isInput(dt)?(pt=lt.getInput(dt.path))===null||pt===void 0?void 0:pt.order:lt.getFolderSettings(join(rt,ht)).order)||0},ut=Object.entries(it).sort((ht,dt)=>ct(ht)-ct(dt));return React$1.createElement(StyledWrapper,{ref:at,isRoot:tt,fill:et,flat:nt},React$1.createElement(StyledContent,{ref:st,isRoot:tt,toggled:ot},ut.map(([ht,dt])=>isInput(dt)?React$1.createElement(Control,{key:dt.path,valueKey:dt.valueKey,path:dt.path}):React$1.createElement(Folder,{key:ht,name:ht,path:rt,tree:dt}))))}),StyledRoot=styled$5("div",{position:"relative",fontFamily:"$mono",fontSize:"$root",color:"$rootText",backgroundColor:"$elevation1",variants:{fill:{false:{position:"fixed",top:"10px",right:"10px",zIndex:1e3,width:"$rootWidth"},true:{position:"relative",width:"100%"}},flat:{false:{borderRadius:"$lg",boxShadow:"$level1"}},oneLineLabels:{true:{[`${StyledInputRow}`]:{gridTemplateColumns:"auto",gridAutoColumns:"minmax(max-content, 1fr)",gridAutoRows:"minmax($sizes$rowHeight), auto)",rowGap:0,columnGap:0,marginTop:"$rowGap"}}},hideTitleBar:{true:{$$titleBarHeight:"0px"},false:{$$titleBarHeight:"$sizes$titleBarHeight"}}},"&,*,*:after,*:before":{boxSizing:"border-box"},"*::selection":{backgroundColor:"$accent2"}}),iconWidth=40,Icon=styled$5("i",{$flexCenter:"",width:iconWidth,userSelect:"none",cursor:"pointer","> svg":{fill:"$highlight1",transition:"transform 350ms ease, fill 250ms ease"},"&:hover > svg":{fill:"$highlight3"},variants:{active:{true:{"> svg":{fill:"$highlight2"}}}}}),StyledTitleWithFilter=styled$5("div",{display:"flex",alignItems:"stretch",justifyContent:"space-between",height:"$titleBarHeight",variants:{mode:{drag:{cursor:"grab"}}}}),FilterWrapper=styled$5("div",{$flex:"",position:"relative",width:"100%",overflow:"hidden",transition:"height 250ms ease",color:"$highlight3",paddingLeft:"$md",[`> ${Icon}`]:{height:30},variants:{toggled:{true:{height:30},false:{height:0}}}}),StyledFilterInput=styled$5("input",{$reset:"",flex:1,position:"relative",height:30,width:"100%",backgroundColor:"transparent",fontSize:"10px",borderRadius:"$root","&:focus":{},"&::placeholder":{color:"$highlight2"}}),TitleContainer=styled$5("div",{touchAction:"none",$flexCenter:"",flex:1,"> svg":{fill:"$highlight1"},color:"$highlight1",variants:{drag:{true:{$draggable:"","> svg":{transition:"fill 250ms ease"},"&:hover":{color:"$highlight3"},"&:hover > svg":{fill:"$highlight3"}}},filterEnabled:{false:{paddingRight:iconWidth}}}}),FilterInput=React$1.forwardRef(({setFilter:tt,toggle:et},nt)=>{const[rt,it]=reactExports.useState(""),ot=reactExports.useMemo(()=>debounce$6(tt,250),[tt]),at=()=>{tt(""),it("")},st=lt=>{const ct=lt.currentTarget.value;et(!0),it(ct)};return reactExports.useEffect(()=>{ot(rt)},[rt,ot]),React$1.createElement(React$1.Fragment,null,React$1.createElement(StyledFilterInput,{ref:nt,value:rt,placeholder:"[Open filter with CMD+SHIFT+L]",onPointerDown:lt=>lt.stopPropagation(),onChange:st}),React$1.createElement(Icon,{onClick:()=>at(),style:{visibility:rt?"visible":"hidden"}},React$1.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"14",width:"14",viewBox:"0 0 20 20",fill:"currentColor"},React$1.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))))});function TitleWithFilter({setFilter:tt,onDrag:et,onDragStart:nt,onDragEnd:rt,toggle:it,toggled:ot,title:at,drag:st,filterEnabled:lt,from:ct}){const[ut,ht]=reactExports.useState(!1),dt=reactExports.useRef(null);reactExports.useEffect(()=>{var mt,gt;ut?(mt=dt.current)===null||mt===void 0||mt.focus():(gt=dt.current)===null||gt===void 0||gt.blur()},[ut]);const pt=useDrag$1(({offset:[mt,gt],first:yt,last:bt})=>{et({x:mt,y:gt}),yt&&nt({x:mt,y:gt}),bt&&rt({x:mt,y:gt})},{filterTaps:!0,from:({offset:[mt,gt]})=>[(ct==null?void 0:ct.x)||mt,(ct==null?void 0:ct.y)||gt]});return reactExports.useEffect(()=>{const mt=gt=>{gt.key==="L"&>.shiftKey&>.metaKey&&ht(yt=>!yt)};return window.addEventListener("keydown",mt),()=>window.removeEventListener("keydown",mt)},[]),React$1.createElement(React$1.Fragment,null,React$1.createElement(StyledTitleWithFilter,{mode:st?"drag":void 0},React$1.createElement(Icon,{active:!ot,onClick:()=>it()},React$1.createElement(Chevron,{toggled:ot,width:12,height:8})),React$1.createElement(TitleContainer,_extends$t({},st?pt():{},{drag:st,filterEnabled:lt}),at===void 0&&st?React$1.createElement("svg",{width:"20",height:"10",viewBox:"0 0 28 14",xmlns:"http://www.w3.org/2000/svg"},React$1.createElement("circle",{cx:"2",cy:"2",r:"2"}),React$1.createElement("circle",{cx:"14",cy:"2",r:"2"}),React$1.createElement("circle",{cx:"26",cy:"2",r:"2"}),React$1.createElement("circle",{cx:"2",cy:"12",r:"2"}),React$1.createElement("circle",{cx:"14",cy:"12",r:"2"}),React$1.createElement("circle",{cx:"26",cy:"12",r:"2"})):at),lt&&React$1.createElement(Icon,{active:ut,onClick:()=>ht(mt=>!mt)},React$1.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",viewBox:"0 0 20 20"},React$1.createElement("path",{d:"M9 9a2 2 0 114 0 2 2 0 01-4 0z"}),React$1.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-13a4 4 0 00-3.446 6.032l-2.261 2.26a1 1 0 101.414 1.415l2.261-2.261A4 4 0 1011 5z",clipRule:"evenodd"})))),React$1.createElement(FilterWrapper,{toggled:ut},React$1.createElement(FilterInput,{ref:dt,setFilter:tt,toggle:it})))}const _excluded$2$1=["store","hidden","theme","collapsed"];function LevaRoot(tt){let{store:et,hidden:nt=!1,theme:rt,collapsed:it=!1}=tt,ot=_objectWithoutProperties$l(tt,_excluded$2$1);const at=useDeepMemo(()=>mergeTheme(rt),[rt]),[st,lt]=reactExports.useState(!it),ct=typeof it=="object"?!it.collapsed:st,ut=reactExports.useMemo(()=>typeof it=="object"?ht=>{typeof ht=="function"?it.onChange(!ht(!it.collapsed)):it.onChange(!ht)}:lt,[it]);return!et||nt?null:React$1.createElement(ThemeContext$3.Provider,{value:at},React$1.createElement(LevaCore,_extends$t({store:et},ot,{toggled:ct,setToggle:ut,rootClass:at.className})))}const LevaCore=React$1.memo(({store:tt,rootClass:et,fill:nt=!1,flat:rt=!1,neverHide:it=!1,oneLineLabels:ot=!1,titleBar:at={title:void 0,drag:!0,filter:!0,position:void 0,onDrag:void 0,onDragStart:void 0,onDragEnd:void 0},hideCopyButton:st=!1,toggled:lt,setToggle:ct})=>{var ut,ht;const dt=useVisiblePaths(tt),[pt,mt]=reactExports.useState(""),gt=reactExports.useMemo(()=>buildTree(dt,pt),[dt,pt]),[yt,bt]=useTransform(),vt=it||dt.length>0,xt=typeof at=="object"&&at.title||void 0,kt=typeof at=="object"&&(ut=at.drag)!==null&&ut!==void 0?ut:!0,St=typeof at=="object"&&(ht=at.filter)!==null&&ht!==void 0?ht:!0,Tt=typeof at=="object"&&at.position||void 0,At=typeof at=="object"&&at.onDrag||void 0,Et=typeof at=="object"&&at.onDragStart||void 0,$t=typeof at=="object"&&at.onDragEnd||void 0;return React$1.useEffect(()=>{bt({x:Tt==null?void 0:Tt.x,y:Tt==null?void 0:Tt.y})},[Tt,bt]),globalStyles(),React$1.createElement(PanelSettingsContext.Provider,{value:{hideCopyButton:st}},React$1.createElement(StyledRoot,{ref:yt,className:et,fill:nt,flat:rt,oneLineLabels:ot,hideTitleBar:!at,style:{display:vt?"block":"none"}},at&&React$1.createElement(TitleWithFilter,{onDrag:Dt=>{bt(Dt),At==null||At(Dt)},onDragStart:Dt=>Et==null?void 0:Et(Dt),onDragEnd:Dt=>$t==null?void 0:$t(Dt),setFilter:mt,toggle:Dt=>ct(jt=>Dt??!jt),toggled:lt,title:xt,drag:kt,filterEnabled:St,from:Tt}),vt&&React$1.createElement(StoreContext$1.Provider,{value:tt},React$1.createElement(TreeWrapper,{isRoot:!0,fill:nt,flat:rt,tree:gt,toggled:lt}))))}),_excluded$1$3=["isRoot"];let rootInitialized=!1,rootEl=null;function Leva(tt){let{isRoot:et=!1}=tt,nt=_objectWithoutProperties$l(tt,_excluded$1$3);return reactExports.useEffect(()=>(rootInitialized=!0,!et&&rootEl&&(rootEl.remove(),rootEl=null),()=>{et||(rootInitialized=!1)}),[et]),React$1.createElement(LevaRoot,_extends$t({store:levaStore},nt))}function useRenderRoot(tt){reactExports.useEffect(()=>{tt&&!rootInitialized&&(rootEl||(rootEl=document.getElementById("leva__root")||Object.assign(document.createElement("div"),{id:"leva__root"}),document.body&&(document.body.appendChild(rootEl),render(React$1.createElement(Leva,{isRoot:!0}),rootEl))),rootInitialized=!0)},[tt])}function parseArgs(tt,et,nt,rt,it){let ot,at,st,lt,ct;return typeof tt=="string"?(at=tt,ot=et,Array.isArray(nt)?ct=nt:nt&&("store"in nt?(lt=nt,ct=rt):(st=nt,Array.isArray(rt)?ct=rt:(lt=rt,ct=it)))):(ot=tt,Array.isArray(et)?ct=et:(lt=et,ct=nt)),{schema:ot,folderName:at,folderSettings:st,hookSettings:lt,deps:ct||[]}}function useControls(tt,et,nt,rt,it){const{folderName:ot,schema:at,folderSettings:st,hookSettings:lt,deps:ct}=parseArgs(tt,et,nt,rt,it),ut=typeof at=="function",ht=reactExports.useRef(!1),dt=reactExports.useRef(!0),pt=useDeepMemo(()=>{ht.current=!0;const jt=typeof at=="function"?at():at;return ot?{[ot]:folder(jt,st)}:jt},ct),mt=!(lt!=null&<.store);useRenderRoot(mt);const[gt]=reactExports.useState(()=>(lt==null?void 0:lt.store)||levaStore),[yt,bt]=reactExports.useMemo(()=>gt.getDataFromSchema(pt),[gt,pt]),[vt,xt,kt,St,Tt]=reactExports.useMemo(()=>{const jt=[],Pt=[],Ct={},wt={},It={};return Object.values(bt).forEach(({path:Ot,onChange:Wt,onEditStart:zt,onEditEnd:Ft,transient:Nt})=>{jt.push(Ot),Wt?(Ct[Ot]=Wt,Nt||Pt.push(Ot)):Pt.push(Ot),zt&&(wt[Ot]=zt),Ft&&(It[Ot]=Ft)}),[jt,Pt,Ct,wt,It]},[bt]),At=reactExports.useMemo(()=>gt.orderPaths(vt),[vt,gt]),Et=useValuesForPath(gt,xt,yt),$t=reactExports.useCallback(jt=>{const Pt=Object.entries(jt).reduce((Ct,[wt,It])=>Object.assign(Ct,{[bt[wt].path]:It}),{});gt.set(Pt,!1)},[gt,bt]),Dt=reactExports.useCallback(jt=>gt.get(bt[jt].path),[gt,bt]);return reactExports.useEffect(()=>{const jt=!dt.current&&ht.current;return gt.addData(yt,jt),dt.current=!1,ht.current=!1,()=>gt.disposePaths(At)},[gt,At,yt]),reactExports.useEffect(()=>{const jt=[];return Object.entries(kt).forEach(([Pt,Ct])=>{Ct(gt.get(Pt),Pt,_objectSpread2$1({initial:!0,get:gt.get},gt.getInput(Pt)));const wt=gt.useStore.subscribe(It=>{const Ot=It.data[Pt];return[Ot.disabled?void 0:Ot.value,Ot]},([It,Ot])=>Ct(It,Pt,_objectSpread2$1({initial:!1,get:gt.get},Ot)),{equalityFn:shallow$2});jt.push(wt)}),()=>jt.forEach(Pt=>Pt())},[gt,kt]),reactExports.useEffect(()=>{const jt=[];return Object.entries(St).forEach(([Pt,Ct])=>jt.push(gt.subscribeToEditStart(Pt,Ct))),Object.entries(Tt).forEach(([Pt,Ct])=>jt.push(gt.subscribeToEditEnd(Pt,Ct))),()=>jt.forEach(Pt=>Pt())},[St,Tt,gt]),ut?[Et,$t,Dt]:Et}register(LevaInputs.SELECT,select$1);register(LevaInputs.IMAGE,image);register(LevaInputs.NUMBER,number$6);register(LevaInputs.COLOR,color$3);register(LevaInputs.STRING,string$1);register(LevaInputs.BOOLEAN,boolean);register(LevaInputs.INTERVAL,interval$1);register(LevaInputs.VECTOR3D,vector3d);register(LevaInputs.VECTOR2D,vector2d);var isCheckBoxInput=tt=>tt.type==="checkbox",isDateObject=tt=>tt instanceof Date,isNullOrUndefined=tt=>tt==null;const isObjectType=tt=>typeof tt=="object";var isObject$f=tt=>!isNullOrUndefined(tt)&&!Array.isArray(tt)&&isObjectType(tt)&&!isDateObject(tt),getEventValue=tt=>isObject$f(tt)&&tt.target?isCheckBoxInput(tt.target)?tt.target.checked:tt.target.value:tt,getNodeParentName=tt=>tt.substring(0,tt.search(/\.\d+(\.|$)/))||tt,isNameInFieldArray=(tt,et)=>tt.has(getNodeParentName(et)),isPlainObject$2=tt=>{const et=tt.constructor&&tt.constructor.prototype;return isObject$f(et)&&et.hasOwnProperty("isPrototypeOf")},isWeb=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function cloneObject(tt){let et;const nt=Array.isArray(tt);if(tt instanceof Date)et=new Date(tt);else if(tt instanceof Set)et=new Set(tt);else if(!(isWeb&&(tt instanceof Blob||tt instanceof FileList))&&(nt||isObject$f(tt)))if(et=nt?[]:{},!nt&&!isPlainObject$2(tt))et=tt;else for(const rt in tt)tt.hasOwnProperty(rt)&&(et[rt]=cloneObject(tt[rt]));else return tt;return et}var compact=tt=>Array.isArray(tt)?tt.filter(Boolean):[],isUndefined$1=tt=>tt===void 0,get$5=(tt,et,nt)=>{if(!et||!isObject$f(tt))return nt;const rt=compact(et.split(/[,[\].]+?/)).reduce((it,ot)=>isNullOrUndefined(it)?it:it[ot],tt);return isUndefined$1(rt)||rt===tt?isUndefined$1(tt[et])?nt:tt[et]:rt},isBoolean$2=tt=>typeof tt=="boolean";const EVENTS={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},VALIDATION_MODE={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},INPUT_VALIDATION_RULES={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},HookFormContext=React$1.createContext(null),useFormContext=()=>React$1.useContext(HookFormContext),FormProvider=tt=>{const{children:et,...nt}=tt;return React$1.createElement(HookFormContext.Provider,{value:nt},et)};var getProxyFormState=(tt,et,nt,rt=!0)=>{const it={defaultValues:et._defaultValues};for(const ot in tt)Object.defineProperty(it,ot,{get:()=>{const at=ot;return et._proxyFormState[at]!==VALIDATION_MODE.all&&(et._proxyFormState[at]=!rt||VALIDATION_MODE.all),nt&&(nt[at]=!0),tt[at]}});return it},isEmptyObject=tt=>isObject$f(tt)&&!Object.keys(tt).length,shouldRenderFormState=(tt,et,nt,rt)=>{nt(tt);const{name:it,...ot}=tt;return isEmptyObject(ot)||Object.keys(ot).length>=Object.keys(et).length||Object.keys(ot).find(at=>et[at]===(!rt||VALIDATION_MODE.all))},convertToArrayPayload=tt=>Array.isArray(tt)?tt:[tt],shouldSubscribeByName=(tt,et,nt)=>!tt||!et||tt===et||convertToArrayPayload(tt).some(rt=>rt&&(nt?rt===et:rt.startsWith(et)||et.startsWith(rt)));function useSubscribe(tt){const et=React$1.useRef(tt);et.current=tt,React$1.useEffect(()=>{const nt=!tt.disabled&&et.current.subject&&et.current.subject.subscribe({next:et.current.next});return()=>{nt&&nt.unsubscribe()}},[tt.disabled])}function useFormState(tt){const et=useFormContext(),{control:nt=et.control,disabled:rt,name:it,exact:ot}=tt||{},[at,st]=React$1.useState(nt._formState),lt=React$1.useRef(!0),ct=React$1.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),ut=React$1.useRef(it);return ut.current=it,useSubscribe({disabled:rt,next:ht=>lt.current&&shouldSubscribeByName(ut.current,ht.name,ot)&&shouldRenderFormState(ht,ct.current,nt._updateFormState)&&st({...nt._formState,...ht}),subject:nt._subjects.state}),React$1.useEffect(()=>(lt.current=!0,ct.current.isValid&&nt._updateValid(!0),()=>{lt.current=!1}),[nt]),getProxyFormState(at,nt,ct.current,!1)}var isString$3=tt=>typeof tt=="string",generateWatchOutput=(tt,et,nt,rt,it)=>isString$3(tt)?(rt&&et.watch.add(tt),get$5(nt,tt,it)):Array.isArray(tt)?tt.map(ot=>(rt&&et.watch.add(ot),get$5(nt,ot))):(rt&&(et.watchAll=!0),nt);function useWatch(tt){const et=useFormContext(),{control:nt=et.control,name:rt,defaultValue:it,disabled:ot,exact:at}=tt||{},st=React$1.useRef(rt);st.current=rt,useSubscribe({disabled:ot,subject:nt._subjects.values,next:ut=>{shouldSubscribeByName(st.current,ut.name,at)&&ct(cloneObject(generateWatchOutput(st.current,nt._names,ut.values||nt._formValues,!1,it)))}});const[lt,ct]=React$1.useState(nt._getWatch(rt,it));return React$1.useEffect(()=>nt._removeUnmounted()),lt}var isKey$4=tt=>/^\w*$/.test(tt),stringToPath$3=tt=>compact(tt.replace(/["|']|\]/g,"").split(/\.|\[/));function set$3(tt,et,nt){let rt=-1;const it=isKey$4(et)?[et]:stringToPath$3(et),ot=it.length,at=ot-1;for(;++rt{const ut=it._options.shouldUnregister||ot,ht=(dt,pt)=>{const mt=get$5(it._fields,dt);mt&&(mt._f.mount=pt)};if(ht(nt,!0),ut){const dt=cloneObject(get$5(it._options.defaultValues,nt));set$3(it._defaultValues,nt,dt),isUndefined$1(get$5(it._formValues,nt))&&set$3(it._formValues,nt,dt)}return()=>{(at?ut&&!it._state.action:ut)?it.unregister(nt):ht(nt,!1)}},[nt,it,at,ot]),React$1.useEffect(()=>{get$5(it._fields,nt)&&it._updateDisabledField({disabled:rt,fields:it._fields,name:nt})},[rt,nt,it]),{field:{name:nt,value:st,...isBoolean$2(rt)?{disabled:rt}:{},onChange:React$1.useCallback(ut=>ct.current.onChange({target:{value:getEventValue(ut),name:nt},type:EVENTS.CHANGE}),[nt]),onBlur:React$1.useCallback(()=>ct.current.onBlur({target:{value:get$5(it._formValues,nt),name:nt},type:EVENTS.BLUR}),[nt,it]),ref:ut=>{const ht=get$5(it._fields,nt);ht&&ut&&(ht._f.ref={focus:()=>ut.focus(),select:()=>ut.select(),setCustomValidity:dt=>ut.setCustomValidity(dt),reportValidity:()=>ut.reportValidity()})}},formState:lt,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!get$5(lt.errors,nt)},isDirty:{enumerable:!0,get:()=>!!get$5(lt.dirtyFields,nt)},isTouched:{enumerable:!0,get:()=>!!get$5(lt.touchedFields,nt)},error:{enumerable:!0,get:()=>get$5(lt.errors,nt)}})}}const Controller=tt=>tt.render(useController(tt));var appendErrors=(tt,et,nt,rt,it)=>et?{...nt[tt],types:{...nt[tt]&&nt[tt].types?nt[tt].types:{},[rt]:it||!0}}:{};const focusFieldBy=(tt,et,nt)=>{for(const rt of nt||Object.keys(tt)){const it=get$5(tt,rt);if(it){const{_f:ot,...at}=it;if(ot&&et(ot.name)){if(ot.ref.focus){ot.ref.focus();break}else if(ot.refs&&ot.refs[0].focus){ot.refs[0].focus();break}}else isObject$f(at)&&focusFieldBy(at,et)}}};var getValidationModes=tt=>({isOnSubmit:!tt||tt===VALIDATION_MODE.onSubmit,isOnBlur:tt===VALIDATION_MODE.onBlur,isOnChange:tt===VALIDATION_MODE.onChange,isOnAll:tt===VALIDATION_MODE.all,isOnTouch:tt===VALIDATION_MODE.onTouched}),isWatched=(tt,et,nt)=>!nt&&(et.watchAll||et.watch.has(tt)||[...et.watch].some(rt=>tt.startsWith(rt)&&/^\.\w+/.test(tt.slice(rt.length)))),updateFieldArrayRootError=(tt,et,nt)=>{const rt=compact(get$5(tt,nt));return set$3(rt,"root",et[nt]),set$3(tt,nt,rt),tt},isFileInput=tt=>tt.type==="file",isFunction$6=tt=>typeof tt=="function",isHTMLElement$2=tt=>{if(!isWeb)return!1;const et=tt?tt.ownerDocument:0;return tt instanceof(et&&et.defaultView?et.defaultView.HTMLElement:HTMLElement)},isMessage=tt=>isString$3(tt),isRadioInput=tt=>tt.type==="radio",isRegex=tt=>tt instanceof RegExp;const defaultResult$1={value:!1,isValid:!1},validResult={value:!0,isValid:!0};var getCheckboxValue=tt=>{if(Array.isArray(tt)){if(tt.length>1){const et=tt.filter(nt=>nt&&nt.checked&&!nt.disabled).map(nt=>nt.value);return{value:et,isValid:!!et.length}}return tt[0].checked&&!tt[0].disabled?tt[0].attributes&&!isUndefined$1(tt[0].attributes.value)?isUndefined$1(tt[0].value)||tt[0].value===""?validResult:{value:tt[0].value,isValid:!0}:validResult:defaultResult$1}return defaultResult$1};const defaultReturn={isValid:!1,value:null};var getRadioValue=tt=>Array.isArray(tt)?tt.reduce((et,nt)=>nt&&nt.checked&&!nt.disabled?{isValid:!0,value:nt.value}:et,defaultReturn):defaultReturn;function getValidateError(tt,et,nt="validate"){if(isMessage(tt)||Array.isArray(tt)&&tt.every(isMessage)||isBoolean$2(tt)&&!tt)return{type:nt,message:isMessage(tt)?tt:"",ref:et}}var getValueAndMessage=tt=>isObject$f(tt)&&!isRegex(tt)?tt:{value:tt,message:""},validateField=async(tt,et,nt,rt,it)=>{const{ref:ot,refs:at,required:st,maxLength:lt,minLength:ct,min:ut,max:ht,pattern:dt,validate:pt,name:mt,valueAsNumber:gt,mount:yt,disabled:bt}=tt._f,vt=get$5(et,mt);if(!yt||bt)return{};const xt=at?at[0]:ot,kt=Pt=>{rt&&xt.reportValidity&&(xt.setCustomValidity(isBoolean$2(Pt)?"":Pt||""),xt.reportValidity())},St={},Tt=isRadioInput(ot),At=isCheckBoxInput(ot),Et=Tt||At,$t=(gt||isFileInput(ot))&&isUndefined$1(ot.value)&&isUndefined$1(vt)||isHTMLElement$2(ot)&&ot.value===""||vt===""||Array.isArray(vt)&&!vt.length,Dt=appendErrors.bind(null,mt,nt,St),jt=(Pt,Ct,wt,It=INPUT_VALIDATION_RULES.maxLength,Ot=INPUT_VALIDATION_RULES.minLength)=>{const Wt=Pt?Ct:wt;St[mt]={type:Pt?It:Ot,message:Wt,ref:ot,...Dt(Pt?It:Ot,Wt)}};if(it?!Array.isArray(vt)||!vt.length:st&&(!Et&&($t||isNullOrUndefined(vt))||isBoolean$2(vt)&&!vt||At&&!getCheckboxValue(at).isValid||Tt&&!getRadioValue(at).isValid)){const{value:Pt,message:Ct}=isMessage(st)?{value:!!st,message:st}:getValueAndMessage(st);if(Pt&&(St[mt]={type:INPUT_VALIDATION_RULES.required,message:Ct,ref:xt,...Dt(INPUT_VALIDATION_RULES.required,Ct)},!nt))return kt(Ct),St}if(!$t&&(!isNullOrUndefined(ut)||!isNullOrUndefined(ht))){let Pt,Ct;const wt=getValueAndMessage(ht),It=getValueAndMessage(ut);if(!isNullOrUndefined(vt)&&!isNaN(vt)){const Ot=ot.valueAsNumber||vt&&+vt;isNullOrUndefined(wt.value)||(Pt=Ot>wt.value),isNullOrUndefined(It.value)||(Ct=Otnew Date(new Date().toDateString()+" "+Nt),zt=ot.type=="time",Ft=ot.type=="week";isString$3(wt.value)&&vt&&(Pt=zt?Wt(vt)>Wt(wt.value):Ft?vt>wt.value:Ot>new Date(wt.value)),isString$3(It.value)&&vt&&(Ct=zt?Wt(vt)+Pt.value,It=!isNullOrUndefined(Ct.value)&&vt.length<+Ct.value;if((wt||It)&&(jt(wt,Pt.message,Ct.message),!nt))return kt(St[mt].message),St}if(dt&&!$t&&isString$3(vt)){const{value:Pt,message:Ct}=getValueAndMessage(dt);if(isRegex(Pt)&&!vt.match(Pt)&&(St[mt]={type:INPUT_VALIDATION_RULES.pattern,message:Ct,ref:ot,...Dt(INPUT_VALIDATION_RULES.pattern,Ct)},!nt))return kt(Ct),St}if(pt){if(isFunction$6(pt)){const Pt=await pt(vt,et),Ct=getValidateError(Pt,xt);if(Ct&&(St[mt]={...Ct,...Dt(INPUT_VALIDATION_RULES.validate,Ct.message)},!nt))return kt(Ct.message),St}else if(isObject$f(pt)){let Pt={};for(const Ct in pt){if(!isEmptyObject(Pt)&&!nt)break;const wt=getValidateError(await pt[Ct](vt,et),xt,Ct);wt&&(Pt={...wt,...Dt(Ct,wt.message)},kt(wt.message),nt&&(St[mt]=Pt))}if(!isEmptyObject(Pt)&&(St[mt]={ref:xt,...Pt},!nt))return St}}return kt(!0),St};function baseGet$4(tt,et){const nt=et.slice(0,-1).length;let rt=0;for(;rt{for(const ot of tt)ot.next&&ot.next(it)},subscribe:it=>(tt.push(it),{unsubscribe:()=>{tt=tt.filter(ot=>ot!==it)}}),unsubscribe:()=>{tt=[]}}}var isPrimitive=tt=>isNullOrUndefined(tt)||!isObjectType(tt);function deepEqual$2(tt,et){if(isPrimitive(tt)||isPrimitive(et))return tt===et;if(isDateObject(tt)&&isDateObject(et))return tt.getTime()===et.getTime();const nt=Object.keys(tt),rt=Object.keys(et);if(nt.length!==rt.length)return!1;for(const it of nt){const ot=tt[it];if(!rt.includes(it))return!1;if(it!=="ref"){const at=et[it];if(isDateObject(ot)&&isDateObject(at)||isObject$f(ot)&&isObject$f(at)||Array.isArray(ot)&&Array.isArray(at)?!deepEqual$2(ot,at):ot!==at)return!1}}return!0}var isMultipleSelect=tt=>tt.type==="select-multiple",isRadioOrCheckbox=tt=>isRadioInput(tt)||isCheckBoxInput(tt),live=tt=>isHTMLElement$2(tt)&&tt.isConnected,objectHasFunction=tt=>{for(const et in tt)if(isFunction$6(tt[et]))return!0;return!1};function markFieldsDirty(tt,et={}){const nt=Array.isArray(tt);if(isObject$f(tt)||nt)for(const rt in tt)Array.isArray(tt[rt])||isObject$f(tt[rt])&&!objectHasFunction(tt[rt])?(et[rt]=Array.isArray(tt[rt])?[]:{},markFieldsDirty(tt[rt],et[rt])):isNullOrUndefined(tt[rt])||(et[rt]=!0);return et}function getDirtyFieldsFromDefaultValues(tt,et,nt){const rt=Array.isArray(tt);if(isObject$f(tt)||rt)for(const it in tt)Array.isArray(tt[it])||isObject$f(tt[it])&&!objectHasFunction(tt[it])?isUndefined$1(et)||isPrimitive(nt[it])?nt[it]=Array.isArray(tt[it])?markFieldsDirty(tt[it],[]):{...markFieldsDirty(tt[it])}:getDirtyFieldsFromDefaultValues(tt[it],isNullOrUndefined(et)?{}:et[it],nt[it]):nt[it]=!deepEqual$2(tt[it],et[it]);return nt}var getDirtyFields=(tt,et)=>getDirtyFieldsFromDefaultValues(tt,et,markFieldsDirty(et)),getFieldValueAs=(tt,{valueAsNumber:et,valueAsDate:nt,setValueAs:rt})=>isUndefined$1(tt)?tt:et?tt===""?NaN:tt&&+tt:nt&&isString$3(tt)?new Date(tt):rt?rt(tt):tt;function getFieldValue(tt){const et=tt.ref;if(!(tt.refs?tt.refs.every(nt=>nt.disabled):et.disabled))return isFileInput(et)?et.files:isRadioInput(et)?getRadioValue(tt.refs).value:isMultipleSelect(et)?[...et.selectedOptions].map(({value:nt})=>nt):isCheckBoxInput(et)?getCheckboxValue(tt.refs).value:getFieldValueAs(isUndefined$1(et.value)?tt.ref.value:et.value,tt)}var getResolverOptions=(tt,et,nt,rt)=>{const it={};for(const ot of tt){const at=get$5(et,ot);at&&set$3(it,ot,at._f)}return{criteriaMode:nt,names:[...tt],fields:it,shouldUseNativeValidation:rt}},getRuleValue=tt=>isUndefined$1(tt)?tt:isRegex(tt)?tt.source:isObject$f(tt)?isRegex(tt.value)?tt.value.source:tt.value:tt,hasValidation=tt=>tt.mount&&(tt.required||tt.min||tt.max||tt.maxLength||tt.minLength||tt.pattern||tt.validate);function schemaErrorLookup(tt,et,nt){const rt=get$5(tt,nt);if(rt||isKey$4(nt))return{error:rt,name:nt};const it=nt.split(".");for(;it.length;){const ot=it.join("."),at=get$5(et,ot),st=get$5(tt,ot);if(at&&!Array.isArray(at)&&nt!==ot)return{name:nt};if(st&&st.type)return{name:ot,error:st};it.pop()}return{name:nt}}var skipValidation=(tt,et,nt,rt,it)=>it.isOnAll?!1:!nt&&it.isOnTouch?!(et||tt):(nt?rt.isOnBlur:it.isOnBlur)?!tt:(nt?rt.isOnChange:it.isOnChange)?tt:!0,unsetEmptyArray=(tt,et)=>!compact(get$5(tt,et)).length&&unset(tt,et);const defaultOptions={mode:VALIDATION_MODE.onSubmit,reValidateMode:VALIDATION_MODE.onChange,shouldFocusError:!0};function createFormControl(tt={},et){let nt={...defaultOptions,...tt},rt={submitCount:0,isDirty:!1,isLoading:isFunction$6(nt.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},it={},ot=isObject$f(nt.defaultValues)||isObject$f(nt.values)?cloneObject(nt.defaultValues||nt.values)||{}:{},at=nt.shouldUnregister?{}:cloneObject(ot),st={action:!1,mount:!1,watch:!1},lt={mount:new Set,unMount:new Set,array:new Set,watch:new Set},ct,ut=0;const ht={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},dt={values:createSubject(),array:createSubject(),state:createSubject()},pt=tt.resetOptions&&tt.resetOptions.keepDirtyValues,mt=getValidationModes(nt.mode),gt=getValidationModes(nt.reValidateMode),yt=nt.criteriaMode===VALIDATION_MODE.all,bt=Tn=>cn=>{clearTimeout(ut),ut=setTimeout(Tn,cn)},vt=async Tn=>{if(ht.isValid||Tn){const cn=nt.resolver?isEmptyObject((await $t()).errors):await jt(it,!0);cn!==rt.isValid&&dt.state.next({isValid:cn})}},xt=Tn=>ht.isValidating&&dt.state.next({isValidating:Tn}),kt=(Tn,cn=[],mn,In,An=!0,wn=!0)=>{if(In&&mn){if(st.action=!0,wn&&Array.isArray(get$5(it,Tn))){const fn=mn(get$5(it,Tn),In.argA,In.argB);An&&set$3(it,Tn,fn)}if(wn&&Array.isArray(get$5(rt.errors,Tn))){const fn=mn(get$5(rt.errors,Tn),In.argA,In.argB);An&&set$3(rt.errors,Tn,fn),unsetEmptyArray(rt.errors,Tn)}if(ht.touchedFields&&wn&&Array.isArray(get$5(rt.touchedFields,Tn))){const fn=mn(get$5(rt.touchedFields,Tn),In.argA,In.argB);An&&set$3(rt.touchedFields,Tn,fn)}ht.dirtyFields&&(rt.dirtyFields=getDirtyFields(ot,at)),dt.state.next({name:Tn,isDirty:Ct(Tn,cn),dirtyFields:rt.dirtyFields,errors:rt.errors,isValid:rt.isValid})}else set$3(at,Tn,cn)},St=(Tn,cn)=>{set$3(rt.errors,Tn,cn),dt.state.next({errors:rt.errors})},Tt=(Tn,cn,mn,In)=>{const An=get$5(it,Tn);if(An){const wn=get$5(at,Tn,isUndefined$1(mn)?get$5(ot,Tn):mn);isUndefined$1(wn)||In&&In.defaultChecked||cn?set$3(at,Tn,cn?wn:getFieldValue(An._f)):Ot(Tn,wn),st.mount&&vt()}},At=(Tn,cn,mn,In,An)=>{let wn=!1,fn=!1;const pn={name:Tn};if(!mn||In){ht.isDirty&&(fn=rt.isDirty,rt.isDirty=pn.isDirty=Ct(),wn=fn!==pn.isDirty);const kn=deepEqual$2(get$5(ot,Tn),cn);fn=get$5(rt.dirtyFields,Tn),kn?unset(rt.dirtyFields,Tn):set$3(rt.dirtyFields,Tn,!0),pn.dirtyFields=rt.dirtyFields,wn=wn||ht.dirtyFields&&fn!==!kn}if(mn){const kn=get$5(rt.touchedFields,Tn);kn||(set$3(rt.touchedFields,Tn,mn),pn.touchedFields=rt.touchedFields,wn=wn||ht.touchedFields&&kn!==mn)}return wn&&An&&dt.state.next(pn),wn?pn:{}},Et=(Tn,cn,mn,In)=>{const An=get$5(rt.errors,Tn),wn=ht.isValid&&isBoolean$2(cn)&&rt.isValid!==cn;if(tt.delayError&&mn?(ct=bt(()=>St(Tn,mn)),ct(tt.delayError)):(clearTimeout(ut),ct=null,mn?set$3(rt.errors,Tn,mn):unset(rt.errors,Tn)),(mn?!deepEqual$2(An,mn):An)||!isEmptyObject(In)||wn){const fn={...In,...wn&&isBoolean$2(cn)?{isValid:cn}:{},errors:rt.errors,name:Tn};rt={...rt,...fn},dt.state.next(fn)}xt(!1)},$t=async Tn=>nt.resolver(at,nt.context,getResolverOptions(Tn||lt.mount,it,nt.criteriaMode,nt.shouldUseNativeValidation)),Dt=async Tn=>{const{errors:cn}=await $t(Tn);if(Tn)for(const mn of Tn){const In=get$5(cn,mn);In?set$3(rt.errors,mn,In):unset(rt.errors,mn)}else rt.errors=cn;return cn},jt=async(Tn,cn,mn={valid:!0})=>{for(const In in Tn){const An=Tn[In];if(An){const{_f:wn,...fn}=An;if(wn){const pn=lt.array.has(wn.name),kn=await validateField(An,at,yt,nt.shouldUseNativeValidation&&!cn,pn);if(kn[wn.name]&&(mn.valid=!1,cn))break;!cn&&(get$5(kn,wn.name)?pn?updateFieldArrayRootError(rt.errors,kn,wn.name):set$3(rt.errors,wn.name,kn[wn.name]):unset(rt.errors,wn.name))}fn&&await jt(fn,cn,mn)}}return mn.valid},Pt=()=>{for(const Tn of lt.unMount){const cn=get$5(it,Tn);cn&&(cn._f.refs?cn._f.refs.every(mn=>!live(mn)):!live(cn._f.ref))&&Kt(Tn)}lt.unMount=new Set},Ct=(Tn,cn)=>(Tn&&cn&&set$3(at,Tn,cn),!deepEqual$2(Ut(),ot)),wt=(Tn,cn,mn)=>generateWatchOutput(Tn,lt,{...st.mount?at:isUndefined$1(cn)?ot:isString$3(Tn)?{[Tn]:cn}:cn},mn,cn),It=Tn=>compact(get$5(st.mount?at:ot,Tn,tt.shouldUnregister?get$5(ot,Tn,[]):[])),Ot=(Tn,cn,mn={})=>{const In=get$5(it,Tn);let An=cn;if(In){const wn=In._f;wn&&(!wn.disabled&&set$3(at,Tn,getFieldValueAs(cn,wn)),An=isHTMLElement$2(wn.ref)&&isNullOrUndefined(cn)?"":cn,isMultipleSelect(wn.ref)?[...wn.ref.options].forEach(fn=>fn.selected=An.includes(fn.value)):wn.refs?isCheckBoxInput(wn.ref)?wn.refs.length>1?wn.refs.forEach(fn=>(!fn.defaultChecked||!fn.disabled)&&(fn.checked=Array.isArray(An)?!!An.find(pn=>pn===fn.value):An===fn.value)):wn.refs[0]&&(wn.refs[0].checked=!!An):wn.refs.forEach(fn=>fn.checked=fn.value===An):isFileInput(wn.ref)?wn.ref.value="":(wn.ref.value=An,wn.ref.type||dt.values.next({name:Tn,values:{...at}})))}(mn.shouldDirty||mn.shouldTouch)&&At(Tn,An,mn.shouldTouch,mn.shouldDirty,!0),mn.shouldValidate&&Nt(Tn)},Wt=(Tn,cn,mn)=>{for(const In in cn){const An=cn[In],wn=`${Tn}.${In}`,fn=get$5(it,wn);(lt.array.has(Tn)||!isPrimitive(An)||fn&&!fn._f)&&!isDateObject(An)?Wt(wn,An,mn):Ot(wn,An,mn)}},zt=(Tn,cn,mn={})=>{const In=get$5(it,Tn),An=lt.array.has(Tn),wn=cloneObject(cn);set$3(at,Tn,wn),An?(dt.array.next({name:Tn,values:{...at}}),(ht.isDirty||ht.dirtyFields)&&mn.shouldDirty&&dt.state.next({name:Tn,dirtyFields:getDirtyFields(ot,at),isDirty:Ct(Tn,wn)})):In&&!In._f&&!isNullOrUndefined(wn)?Wt(Tn,wn,mn):Ot(Tn,wn,mn),isWatched(Tn,lt)&&dt.state.next({...rt}),dt.values.next({name:Tn,values:{...at}}),!st.mount&&et()},Ft=async Tn=>{const cn=Tn.target;let mn=cn.name,In=!0;const An=get$5(it,mn),wn=()=>cn.type?getFieldValue(An._f):getEventValue(Tn);if(An){let fn,pn;const kn=wn(),Dn=Tn.type===EVENTS.BLUR||Tn.type===EVENTS.FOCUS_OUT,un=!hasValidation(An._f)&&!nt.resolver&&!get$5(rt.errors,mn)&&!An._f.deps||skipValidation(Dn,get$5(rt.touchedFields,mn),rt.isSubmitted,gt,mt),Zt=isWatched(mn,lt,Dn);set$3(at,mn,kn),Dn?(An._f.onBlur&&An._f.onBlur(Tn),ct&&ct(0)):An._f.onChange&&An._f.onChange(Tn);const Xt=At(mn,kn,Dn,!1),Sn=!isEmptyObject(Xt)||Zt;if(!Dn&&dt.values.next({name:mn,type:Tn.type,values:{...at}}),un)return ht.isValid&&vt(),Sn&&dt.state.next({name:mn,...Zt?{}:Xt});if(!Dn&&Zt&&dt.state.next({...rt}),xt(!0),nt.resolver){const{errors:Rn}=await $t([mn]),jn=schemaErrorLookup(rt.errors,it,mn),On=schemaErrorLookup(Rn,it,jn.name||mn);fn=On.error,mn=On.name,pn=isEmptyObject(Rn)}else fn=(await validateField(An,at,yt,nt.shouldUseNativeValidation))[mn],In=Number.isNaN(kn)||kn===get$5(at,mn,kn),In&&(fn?pn=!1:ht.isValid&&(pn=await jt(it,!0)));In&&(An._f.deps&&Nt(An._f.deps),Et(mn,pn,fn,Xt))}},Nt=async(Tn,cn={})=>{let mn,In;const An=convertToArrayPayload(Tn);if(xt(!0),nt.resolver){const wn=await Dt(isUndefined$1(Tn)?Tn:An);mn=isEmptyObject(wn),In=Tn?!An.some(fn=>get$5(wn,fn)):mn}else Tn?(In=(await Promise.all(An.map(async wn=>{const fn=get$5(it,wn);return await jt(fn&&fn._f?{[wn]:fn}:fn)}))).every(Boolean),!(!In&&!rt.isValid)&&vt()):In=mn=await jt(it);return dt.state.next({...!isString$3(Tn)||ht.isValid&&mn!==rt.isValid?{}:{name:Tn},...nt.resolver||!Tn?{isValid:mn}:{},errors:rt.errors,isValidating:!1}),cn.shouldFocus&&!In&&focusFieldBy(it,wn=>wn&&get$5(rt.errors,wn),Tn?An:lt.mount),In},Ut=Tn=>{const cn={...ot,...st.mount?at:{}};return isUndefined$1(Tn)?cn:isString$3(Tn)?get$5(cn,Tn):Tn.map(mn=>get$5(cn,mn))},Mt=(Tn,cn)=>({invalid:!!get$5((cn||rt).errors,Tn),isDirty:!!get$5((cn||rt).dirtyFields,Tn),isTouched:!!get$5((cn||rt).touchedFields,Tn),error:get$5((cn||rt).errors,Tn)}),Ht=Tn=>{Tn&&convertToArrayPayload(Tn).forEach(cn=>unset(rt.errors,cn)),dt.state.next({errors:Tn?rt.errors:{}})},en=(Tn,cn,mn)=>{const In=(get$5(it,Tn,{_f:{}})._f||{}).ref;set$3(rt.errors,Tn,{...cn,ref:In}),dt.state.next({name:Tn,errors:rt.errors,isValid:!1}),mn&&mn.shouldFocus&&In&&In.focus&&In.focus()},sn=(Tn,cn)=>isFunction$6(Tn)?dt.values.subscribe({next:mn=>Tn(wt(void 0,cn),mn)}):wt(Tn,cn,!0),Kt=(Tn,cn={})=>{for(const mn of Tn?convertToArrayPayload(Tn):lt.mount)lt.mount.delete(mn),lt.array.delete(mn),cn.keepValue||(unset(it,mn),unset(at,mn)),!cn.keepError&&unset(rt.errors,mn),!cn.keepDirty&&unset(rt.dirtyFields,mn),!cn.keepTouched&&unset(rt.touchedFields,mn),!nt.shouldUnregister&&!cn.keepDefaultValue&&unset(ot,mn);dt.values.next({values:{...at}}),dt.state.next({...rt,...cn.keepDirty?{isDirty:Ct()}:{}}),!cn.keepIsValid&&vt()},rn=({disabled:Tn,name:cn,field:mn,fields:In})=>{if(isBoolean$2(Tn)){const An=Tn?void 0:get$5(at,cn,getFieldValue(mn?mn._f:get$5(In,cn)._f));set$3(at,cn,An),At(cn,An,!1,!1,!0)}},nn=(Tn,cn={})=>{let mn=get$5(it,Tn);const In=isBoolean$2(cn.disabled);return set$3(it,Tn,{...mn||{},_f:{...mn&&mn._f?mn._f:{ref:{name:Tn}},name:Tn,mount:!0,...cn}}),lt.mount.add(Tn),mn?rn({field:mn,disabled:cn.disabled,name:Tn}):Tt(Tn,!0,cn.value),{...In?{disabled:cn.disabled}:{},...nt.progressive?{required:!!cn.required,min:getRuleValue(cn.min),max:getRuleValue(cn.max),minLength:getRuleValue(cn.minLength),maxLength:getRuleValue(cn.maxLength),pattern:getRuleValue(cn.pattern)}:{},name:Tn,onChange:Ft,onBlur:Ft,ref:An=>{if(An){nn(Tn,cn),mn=get$5(it,Tn);const wn=isUndefined$1(An.value)&&An.querySelectorAll&&An.querySelectorAll("input,select,textarea")[0]||An,fn=isRadioOrCheckbox(wn),pn=mn._f.refs||[];if(fn?pn.find(kn=>kn===wn):wn===mn._f.ref)return;set$3(it,Tn,{_f:{...mn._f,...fn?{refs:[...pn.filter(live),wn,...Array.isArray(get$5(ot,Tn))?[{}]:[]],ref:{type:wn.type,name:Tn}}:{ref:wn}}}),Tt(Tn,!1,void 0,wn)}else mn=get$5(it,Tn,{}),mn._f&&(mn._f.mount=!1),(nt.shouldUnregister||cn.shouldUnregister)&&!(isNameInFieldArray(lt.array,Tn)&&st.action)&<.unMount.add(Tn)}}},hn=()=>nt.shouldFocusError&&focusFieldBy(it,Tn=>Tn&&get$5(rt.errors,Tn),lt.mount),vn=(Tn,cn)=>async mn=>{mn&&(mn.preventDefault&&mn.preventDefault(),mn.persist&&mn.persist());let In=cloneObject(at);if(dt.state.next({isSubmitting:!0}),nt.resolver){const{errors:An,values:wn}=await $t();rt.errors=An,In=wn}else await jt(it);unset(rt.errors,"root"),isEmptyObject(rt.errors)?(dt.state.next({errors:{}}),await Tn(In,mn)):(cn&&await cn({...rt.errors},mn),hn(),setTimeout(hn)),dt.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:isEmptyObject(rt.errors),submitCount:rt.submitCount+1,errors:rt.errors})},an=(Tn,cn={})=>{get$5(it,Tn)&&(isUndefined$1(cn.defaultValue)?zt(Tn,get$5(ot,Tn)):(zt(Tn,cn.defaultValue),set$3(ot,Tn,cn.defaultValue)),cn.keepTouched||unset(rt.touchedFields,Tn),cn.keepDirty||(unset(rt.dirtyFields,Tn),rt.isDirty=cn.defaultValue?Ct(Tn,get$5(ot,Tn)):Ct()),cn.keepError||(unset(rt.errors,Tn),ht.isValid&&vt()),dt.state.next({...rt}))},Qt=(Tn,cn={})=>{const mn=Tn?cloneObject(Tn):ot,In=cloneObject(mn),An=Tn&&!isEmptyObject(Tn)?In:ot;if(cn.keepDefaultValues||(ot=mn),!cn.keepValues){if(cn.keepDirtyValues||pt)for(const wn of lt.mount)get$5(rt.dirtyFields,wn)?set$3(An,wn,get$5(at,wn)):zt(wn,get$5(An,wn));else{if(isWeb&&isUndefined$1(Tn))for(const wn of lt.mount){const fn=get$5(it,wn);if(fn&&fn._f){const pn=Array.isArray(fn._f.refs)?fn._f.refs[0]:fn._f.ref;if(isHTMLElement$2(pn)){const kn=pn.closest("form");if(kn){kn.reset();break}}}}it={}}at=tt.shouldUnregister?cn.keepDefaultValues?cloneObject(ot):{}:cloneObject(An),dt.array.next({values:{...An}}),dt.values.next({values:{...An}})}lt={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!st.mount&&et(),st.mount=!ht.isValid||!!cn.keepIsValid,st.watch=!!tt.shouldUnregister,dt.state.next({submitCount:cn.keepSubmitCount?rt.submitCount:0,isDirty:cn.keepDirty?rt.isDirty:!!(cn.keepDefaultValues&&!deepEqual$2(Tn,ot)),isSubmitted:cn.keepIsSubmitted?rt.isSubmitted:!1,dirtyFields:cn.keepDirtyValues?rt.dirtyFields:cn.keepDefaultValues&&Tn?getDirtyFields(ot,Tn):{},touchedFields:cn.keepTouched?rt.touchedFields:{},errors:cn.keepErrors?rt.errors:{},isSubmitSuccessful:cn.keepIsSubmitSuccessful?rt.isSubmitSuccessful:!1,isSubmitting:!1})},_n=(Tn,cn)=>Qt(isFunction$6(Tn)?Tn(at):Tn,cn);return{control:{register:nn,unregister:Kt,getFieldState:Mt,handleSubmit:vn,setError:en,_executeSchema:$t,_getWatch:wt,_getDirty:Ct,_updateValid:vt,_removeUnmounted:Pt,_updateFieldArray:kt,_updateDisabledField:rn,_getFieldArray:It,_reset:Qt,_resetDefaultValues:()=>isFunction$6(nt.defaultValues)&&nt.defaultValues().then(Tn=>{_n(Tn,nt.resetOptions),dt.state.next({isLoading:!1})}),_updateFormState:Tn=>{rt={...rt,...Tn}},_subjects:dt,_proxyFormState:ht,get _fields(){return it},get _formValues(){return at},get _state(){return st},set _state(Tn){st=Tn},get _defaultValues(){return ot},get _names(){return lt},set _names(Tn){lt=Tn},get _formState(){return rt},set _formState(Tn){rt=Tn},get _options(){return nt},set _options(Tn){nt={...nt,...Tn}}},trigger:Nt,register:nn,handleSubmit:vn,watch:sn,setValue:zt,getValues:Ut,reset:_n,resetField:an,clearErrors:Ht,unregister:Kt,setError:en,setFocus:(Tn,cn={})=>{const mn=get$5(it,Tn),In=mn&&mn._f;if(In){const An=In.refs?In.refs[0]:In.ref;An.focus&&(An.focus(),cn.shouldSelect&&An.select())}},getFieldState:Mt}}function useForm(tt={}){const et=React$1.useRef(),nt=React$1.useRef(),[rt,it]=React$1.useState({isDirty:!1,isValidating:!1,isLoading:isFunction$6(tt.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:isFunction$6(tt.defaultValues)?void 0:tt.defaultValues});et.current||(et.current={...createFormControl(tt,()=>it(at=>({...at}))),formState:rt});const ot=et.current.control;return ot._options=tt,useSubscribe({subject:ot._subjects.state,next:at=>{shouldRenderFormState(at,ot._proxyFormState,ot._updateFormState,!0)&&it({...ot._formState})}}),React$1.useEffect(()=>{tt.values&&!deepEqual$2(tt.values,nt.current)?(ot._reset(tt.values,ot._options.resetOptions),nt.current=tt.values):ot._resetDefaultValues()},[tt.values,ot]),React$1.useEffect(()=>{ot._state.mount||(ot._updateValid(),ot._state.mount=!0),ot._state.watch&&(ot._state.watch=!1,ot._subjects.state.next({...ot._formState})),ot._removeUnmounted()}),et.current.formState=getProxyFormState(rt,ot),et.current}const ReactToastify="";var dist$3={exports:{}},lib$4={},postMessage$2={};Object.defineProperty(postMessage$2,"__esModule",{value:!0});postMessage$2.removeEventer=postMessage$2.addEventer=postMessage$2.postMessage=void 0;function postMessage$1(tt){var et=window;if(et.sendToElectron)return et.sendToElectron("sphinx-bridge",tt);et.ReactNativeWebView&&et.ReactNativeWebView.postMessage?et.ReactNativeWebView.postMessage(JSON.stringify(tt)):et.webkit&&et.webkit.messageHandlers&&et.webkit.messageHandlers.sphinx&&et.webkit.messageHandlers.sphinx?et.webkit.messageHandlers.sphinx.postMessage(tt):et.Android?et.Android.receiveMessage(JSON.stringify(tt)):et.parent.postMessage(tt,"*")}postMessage$2.postMessage=postMessage$1;function addEventer(tt){var et=window;if(et.sendToElectron){et.EE&&et.EE.once("sphinx-bridge",tt);return}else et.ReactNativeWebView&&et.ReactNativeWebView.postMessage?document.addEventListener("message",function(nt){var rt={};try{rt=JSON.parse(nt.data)}catch{}tt({data:rt})}):et.webkit&&et.webkit.messageHandlers&&et.webkit.messageHandlers.sphinx&&et.webkit.messageHandlers.sphinx?et.sphinxMessage=function(nt){var rt={};try{rt=JSON.parse(nt)}catch{}tt({data:rt})}:et.Android?et.sphinxMessage=function(nt){var rt={};try{rt=JSON.parse(nt)}catch{}tt({data:rt})}:et.addEventListener("message",tt)}postMessage$2.addEventer=addEventer;function removeEventer(tt){var et=window;et.sendToElectron||(et.ReactNativeWebView&&et.ReactNativeWebView.postMessage?document.removeEventListener("message",tt):et.webkit&&et.webkit.messageHandlers&&et.webkit.messageHandlers.sphinx&&et.webkit.messageHandlers.sphinx||et.Android?et.sphinxMessage=null:et.removeEventListener("message",tt))}postMessage$2.removeEventer=removeEventer;(function(tt){var et=commonjsGlobal&&commonjsGlobal.__assign||function(){return et=Object.assign||function(lt){for(var ct,ut=1,ht=arguments.length;ut0&&pt[pt.length-1])&&(bt[0]===6||bt[0]===2)){ut=0;continue}if(bt[0]===3&&(!pt||bt[1]>pt[0]&&bt[1] ENABLE!"),this.isEnabled)return[2,{budget:this.budget,pubkey:this.pubkey,application:at}];pt.label=1;case 1:return pt.trys.push([1,3,,4]),[4,this.postMsg(ot.AUTHORIZE)];case 2:return ut=pt.sent(),ht=ut.budget||ut.budget===0,ht&&ut.pubkey?(this.isEnabled=!0,this.budget=ut.budget,this.pubkey=ut.pubkey,[2,ut]):[3,4];case 3:return dt=pt.sent(),this.logging&&console.log(dt),[3,4];case 4:return[2,null]}})})},lt.prototype.authorize=function(ct,ut,ht){return nt(this,void 0,void 0,function(){var dt,pt,mt,gt;return rt(this,function(yt){switch(yt.label){case 0:ht&&(this.logging=!0),this.logging&&console.log("=> AUTHORIZE!"),yt.label=1;case 1:return yt.trys.push([1,3,,4]),dt=ut||!1,[4,this.postMsg(ot.AUTHORIZE,{challenge:ct,noBudget:dt})];case 2:return pt=yt.sent(),mt=pt.budget||pt.budget===0,(dt||mt)&&pt.pubkey?(this.isEnabled=!0,this.budget=pt.budget||0,this.pubkey=pt.pubkey,[2,pt]):[3,4];case 3:return gt=yt.sent(),this.logging&&console.log(gt),[3,4];case 4:return[2,null]}})})},lt.prototype.topup=function(){return nt(this,void 0,void 0,function(){var ct,ut,ht;return rt(this,function(dt){switch(dt.label){case 0:this.logging&&console.log("=> TOP UP"),dt.label=1;case 1:return dt.trys.push([1,3,,4]),[4,this.postMsg(ot.AUTHORIZE)];case 2:return ct=dt.sent(),ut=ct.budget||ct.budget===0,ut&&ct.pubkey?(this.budget=ct.budget,this.pubkey=ct.pubkey,[2,ct]):[3,4];case 3:return ht=dt.sent(),this.logging&&console.log(ht),[3,4];case 4:return[2,null]}})})},lt.prototype.keysend=function(ct,ut){return nt(this,void 0,void 0,function(){var ht,dt,pt;return rt(this,function(mt){switch(mt.label){case 0:if(this.logging&&console.log("=> KEYSEND"),!this.isEnabled)return[2,null];if(!ct||!ut)return[2,null];if(ct.length!==66)return[2,null];if(ut<1)return[2,null];if(ut>this.budget)return[2,null];mt.label=1;case 1:return mt.trys.push([1,3,,4]),ht={dest:ct,amt:ut},[4,this.postMsg(ot.KEYSEND,ht)];case 2:return dt=mt.sent(),dt&&dt.success&&(this.budget=this.budget-ut,dt.budget=this.budget),[2,dt];case 3:return pt=mt.sent(),this.logging&&console.log(pt),[2,null];case 4:return[2]}})})},lt.prototype.updated=function(){return nt(this,void 0,void 0,function(){var ct,ut;return rt(this,function(ht){switch(ht.label){case 0:if(this.logging&&console.log("=> UDPATED"),!this.isEnabled)return[2,null];ht.label=1;case 1:return ht.trys.push([1,3,,4]),[4,this.postMsg(ot.UPDATED)];case 2:return ct=ht.sent(),[2,ct];case 3:return ut=ht.sent(),this.logging&&console.log(ut),[2,null];case 4:return[2]}})})},lt.prototype.sendPayment=function(ct){return nt(this,void 0,void 0,function(){var ut,ht;return rt(this,function(dt){switch(dt.label){case 0:if(this.logging&&console.log("=> SEND PAYMENT"),!this.isEnabled)return[2,null];dt.label=1;case 1:return dt.trys.push([1,3,,4]),[4,this.postMsg(ot.PAYMENT,{paymentRequest:ct})];case 2:return ut=dt.sent(),[2,ut];case 3:return ht=dt.sent(),this.logging&&console.log(ht),[2,null];case 4:return[2]}})})},lt.prototype.saveLsat=function(ct,ut,ht){return nt(this,void 0,void 0,function(){var dt,pt;return rt(this,function(mt){switch(mt.label){case 0:this.logging&&console.log("=> SAVE LSAT"),mt.label=1;case 1:return mt.trys.push([1,3,,4]),[4,this.postMsg(ot.LSAT,{paymentRequest:ct,macaroon:ut,issuer:ht})];case 2:return dt=mt.sent(),[2,dt];case 3:return pt=mt.sent(),this.logging&&console.log(pt),[2,pt];case 4:return[2]}})})},lt.prototype.getLsat=function(){return nt(this,void 0,void 0,function(){var ct,ut;return rt(this,function(ht){switch(ht.label){case 0:if(this.logging&&console.log("=> GET LSAT"),!this.isEnabled)return[2,null];ht.label=1;case 1:return ht.trys.push([1,3,,4]),[4,this.postMsg(ot.GETLSAT)];case 2:return ct=ht.sent(),[2,ct];case 3:return ut=ht.sent(),this.logging&&console.log(ut),[2,ut];case 4:return[2]}})})},lt.prototype.updateLsat=function(ct,ut){return nt(this,void 0,void 0,function(){var ht,dt;return rt(this,function(pt){switch(pt.label){case 0:if(this.logging&&console.log("=> UPDATE LSAT"),!this.isEnabled)return[2,null];pt.label=1;case 1:return pt.trys.push([1,3,,4]),[4,this.postMsg(ot.UPDATELSAT,{identifier:ct,status:ut})];case 2:return ht=pt.sent(),[2,ht];case 3:return dt=pt.sent(),this.logging&&console.log(dt),[2,dt];case 4:return[2]}})})},lt.prototype.makeInvoice=function(ct,ut){return nt(this,void 0,void 0,function(){var ht,dt;return rt(this,function(pt){switch(pt.label){case 0:if(this.logging&&console.log("=> MAKE INVOICE"),!this.isEnabled)return[2,null];pt.label=1;case 1:return pt.trys.push([1,3,,4]),[4,this.postMsg(ot.INVOICE,{amt:ct,memo:ut})];case 2:return ht=pt.sent(),[2,ht];case 3:return dt=pt.sent(),this.logging&&console.log(dt),[2,null];case 4:return[2]}})})},lt.prototype.signMessage=function(ct){return nt(this,void 0,void 0,function(){var ut,ht;return rt(this,function(dt){switch(dt.label){case 0:if(this.logging&&console.log("=> SIGN MESSAGE"),!this.isEnabled)return[2,null];dt.label=1;case 1:return dt.trys.push([1,3,,4]),[4,this.postMsg(ot.SIGN,{message:ct})];case 2:return ut=dt.sent(),[2,ut];case 3:return ht=dt.sent(),this.logging&&console.log(ht),[2,null];case 4:return[2]}})})},lt.prototype.verifyMessage=function(ct,ut){return nt(this,void 0,void 0,function(){var ht,dt;return rt(this,function(pt){switch(pt.label){case 0:if(this.logging&&console.log("=> VERIFY MESSAGE"),!this.isEnabled)return[2,null];pt.label=1;case 1:return pt.trys.push([1,3,,4]),[4,this.postMsg(ot.SIGN,{signature:ct,message:ut})];case 2:return ht=pt.sent(),[2,ht];case 3:return dt=pt.sent(),this.logging&&console.log(dt),[2,null];case 4:return[2]}})})},lt.prototype.reload=function(ct){return nt(this,void 0,void 0,function(){var ut,ht,dt;return rt(this,function(pt){switch(pt.label){case 0:this.logging&&console.log("=> RELOAD"),pt.label=1;case 1:return pt.trys.push([1,3,,4]),[4,this.postMsg(ot.RELOAD,{password:ct})];case 2:return ut=pt.sent(),ht=ut.budget||ut.budget===0,ht&&ut.pubkey?(this.isEnabled=!0,this.budget=ut.budget,this.pubkey=ut.pubkey,[2,ut]):[3,4];case 3:return dt=pt.sent(),this.logging&&console.log(dt),[3,4];case 4:return[2,null]}})})},lt.prototype.saveGraphData=function(ct){return nt(this,void 0,void 0,function(){var ut,ht;return rt(this,function(dt){switch(dt.label){case 0:if(this.logging&&console.log("=> SAVEDATA"),!this.isEnabled)return[2,null];dt.label=1;case 1:return dt.trys.push([1,3,,4]),[4,this.postMsg(ot.SAVEDATA,{data:{type:ct.type,metaData:ct.metaData}})];case 2:return ut=dt.sent(),[2,ut];case 3:return ht=dt.sent(),this.logging&&console.log(ht),[2,null];case 4:return[2]}})})},lt.prototype.getPersonData=function(){return nt(this,void 0,void 0,function(){var ct,ut;return rt(this,function(ht){switch(ht.label){case 0:if(this.logging&&console.log("=> GETPERSONDATA"),!this.isEnabled)return[2,null];ht.label=1;case 1:return ht.trys.push([1,3,,4]),[4,this.postMsg(ot.GETPERSONDATA)];case 2:return ct=ht.sent(),[2,ct];case 3:return ut=ht.sent(),this.logging&&console.log(ut),[2,null];case 4:return[2]}})})},lt.prototype.postMsg=function(ct,ut){var ht=this;return ht.active&&Promise.reject(new Error("User is busy")),ht.active=ct,new Promise(function(dt,pt){it.postMessage(et({application:at,type:ct},ut||{}));function mt(gt){!gt.data||gt.data.application!==at||(gt.data.error?(ht.active=null,pt(gt.data.error)):(ht.active=null,dt(gt.data)),it.removeEventer(mt))}it.addEventer(mt)})},lt}();tt.default=st})(lib$4);var dist$2=dist$3.exports;Object.defineProperty(dist$2,"__esModule",{value:!0});var lib_1=lib$4,sphinx=new lib_1.default;dist$3.exports=sphinx;var distExports$1=dist$3.exports,reactIs$3={exports:{}},reactIs_production_min$2={};/** + */var split=splitString,extend$3=extendShallow,isPlainObject$3=isPlainObject$5,isObject$h=isExtendable,setValue=function(tt,et,nt){if(!isObject$h(tt)||(Array.isArray(et)&&(et=[].concat.apply([],et).join(".")),typeof et!="string"))return tt;for(var rt=split(et,{sep:".",brackets:!0}).filter(isValidKey),it=rt.length,ot=-1,at=tt;++ottt.filter(Boolean).join(".");function getKeyPath(tt){const et=tt.split(".");return[et.pop(),et.join(".")||void 0]}function getValuesForPaths(tt,et){return Object.entries(pick$1(tt,et)).reduce((nt,[,{value:rt,disabled:it,key:ot}])=>(nt[ot]=it?void 0:rt,nt),{})}function useCompareMemoize(tt,et){const nt=reactExports.useRef();return(et?dequal:shallow$2)(tt,nt.current)||(nt.current=tt),nt.current}function useDeepMemo(tt,et){return reactExports.useMemo(tt,useCompareMemoize(et,!0))}function useToggle(tt){const et=reactExports.useRef(null),nt=reactExports.useRef(null),rt=reactExports.useRef(!0);return reactExports.useLayoutEffect(()=>{tt||(et.current.style.height="0px",et.current.style.overflow="hidden")},[]),reactExports.useEffect(()=>{if(rt.current){rt.current=!1;return}let it;const ot=et.current,at=()=>{tt&&(ot.style.removeProperty("height"),ot.style.removeProperty("overflow"),nt.current.scrollIntoView({behavior:"smooth",block:"nearest"}))};ot.addEventListener("transitionend",at,{once:!0});const{height:st}=nt.current.getBoundingClientRect();return ot.style.height=st+"px",tt||(ot.style.overflow="hidden",it=window.setTimeout(()=>ot.style.height="0px",50)),()=>{ot.removeEventListener("transitionend",at),clearTimeout(it)}},[tt]),{wrapperRef:et,contentRef:nt}}const useVisiblePaths=tt=>{const[et,nt]=reactExports.useState(tt.getVisiblePaths());return reactExports.useEffect(()=>{nt(tt.getVisiblePaths());const rt=tt.useStore.subscribe(tt.getVisiblePaths,nt,{equalityFn:shallow$2});return()=>rt()},[tt]),et};function useValuesForPath(tt,et,nt){return tt.useStore(it=>{const ot=_objectSpread2$1(_objectSpread2$1({},nt),it.data);return getValuesForPaths(ot,et)},shallow$2)}function usePopin(tt=3){const et=reactExports.useRef(null),nt=reactExports.useRef(null),[rt,it]=reactExports.useState(!1),ot=reactExports.useCallback(()=>it(!0),[]),at=reactExports.useCallback(()=>it(!1),[]);return reactExports.useLayoutEffect(()=>{if(rt){const{bottom:st,top:lt,left:ct}=et.current.getBoundingClientRect(),{height:ut}=nt.current.getBoundingClientRect(),ht=st+ut>window.innerHeight-40?"up":"down";nt.current.style.position="fixed",nt.current.style.zIndex="10000",nt.current.style.left=ct+"px",ht==="down"?nt.current.style.top=st+tt+"px":nt.current.style.bottom=window.innerHeight-lt+tt+"px"}},[tt,rt]),{popinRef:et,wrapperRef:nt,shown:rt,show:ot,hide:at}}k$8([namesPlugin]);const convertMap={rgb:"toRgb",hsl:"toHsl",hsv:"toHsv",hex:"toHex"};v8n.extend({color:()=>tt=>w$5(tt).isValid()});const schema$2=tt=>v8n().color().test(tt);function convert$5(tt,{format:et,hasAlpha:nt,isString:rt}){const it=convertMap[et]+(rt&&et!=="hex"?"String":""),ot=tt[it]();return typeof ot=="object"&&!nt?omit$1(ot,["a"]):ot}const sanitize$2=(tt,et)=>{const nt=w$5(tt);if(!nt.isValid())throw Error("Invalid color");return convert$5(nt,et)},format$1$1=(tt,et)=>convert$5(w$5(tt),_objectSpread2$1(_objectSpread2$1({},et),{},{isString:!0,format:"hex"})),normalize$3=({value:tt})=>{const et=I$2(tt),nt=et==="name"?"hex":et,rt=typeof tt=="object"?"a"in tt:et==="hex"&&tt.length===8||/^(rgba)|(hsla)|(hsva)/.test(tt),it={format:nt,hasAlpha:rt,isString:typeof tt=="string"};return{value:sanitize$2(tt,it),settings:it}};var props$2=Object.freeze({__proto__:null,schema:schema$2,sanitize:sanitize$2,format:format$1$1,normalize:normalize$3});const ColorPreview=styled$5("div",{position:"relative",boxSizing:"border-box",borderRadius:"$sm",overflow:"hidden",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",backgroundColor:"#fff",backgroundImage:`url('data:image/svg+xml;charset=utf-8,')`,$inputStyle:"",$hover:"",zIndex:1,variants:{active:{true:{$inputStyle:"$accent1"}}},"&::before":{content:'""',position:"absolute",top:0,bottom:0,right:0,left:0,backgroundColor:"currentColor",zIndex:1}}),PickerContainer=styled$5("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto",columnGap:"$colGap",alignItems:"center"}),PickerWrapper=styled$5("div",{width:"$colorPickerWidth",height:"$colorPickerHeight",".react-colorful":{width:"100%",height:"100%",boxShadow:"$level2",cursor:"crosshair"},".react-colorful__saturation":{borderRadius:"$sm $sm 0 0"},".react-colorful__alpha, .react-colorful__hue":{height:10},".react-colorful__last-control":{borderRadius:"0 0 $sm $sm"},".react-colorful__pointer":{height:12,width:12}});function convertToRgb(tt,et){return et!=="rgb"?w$5(tt).toRgb():tt}function Color$2({value:tt,displayValue:et,settings:nt,onUpdate:rt}){const{emitOnEditStart:it,emitOnEditEnd:ot}=useInputContext(),{format:at,hasAlpha:st}=nt,{popinRef:lt,wrapperRef:ct,shown:ut,show:ht,hide:dt}=usePopin(),pt=reactExports.useRef(0),[mt,gt]=reactExports.useState(()=>convertToRgb(tt,at)),yt=st?Ce:Ne$1,bt=()=>{gt(convertToRgb(tt,at)),ht(),it()},vt=()=>{dt(),ot(),window.clearTimeout(pt.current)},xt=()=>{pt.current=window.setTimeout(vt,500)};return reactExports.useEffect(()=>()=>window.clearTimeout(pt.current),[]),React$1.createElement(React$1.Fragment,null,React$1.createElement(ColorPreview,{ref:lt,active:ut,onClick:()=>bt(),style:{color:et}}),ut&&React$1.createElement(Portal$2,null,React$1.createElement(Overlay$1,{onPointerUp:vt}),React$1.createElement(PickerWrapper,{ref:ct,onMouseEnter:()=>window.clearTimeout(pt.current),onMouseLeave:kt=>kt.buttons===0&&xt()},React$1.createElement(yt,{color:mt,onChange:rt}))))}function ColorComponent(){const{value:tt,displayValue:et,label:nt,onChange:rt,onUpdate:it,settings:ot}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,nt),React$1.createElement(PickerContainer,null,React$1.createElement(Color$2,{value:tt,displayValue:et,onChange:rt,onUpdate:it,settings:ot}),React$1.createElement(ValueInput,{value:et,onChange:rt,onUpdate:it})))}var color$3=_objectSpread2$1({component:ColorComponent},props$2);function Vector3dComponent(){const{label:tt,displayValue:et,onUpdate:nt,settings:rt}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(Vector,{value:et,settings:rt,onUpdate:nt}))}var vector3d=_objectSpread2$1({component:Vector3dComponent},getVectorPlugin(["x","y","z"]));const JoystickTrigger=styled$5("div",{$flexCenter:"",position:"relative",backgroundColor:"$elevation3",borderRadius:"$sm",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",touchAction:"none",$draggable:"",$hover:"","&:active":{cursor:"none"},"&::after":{content:'""',backgroundColor:"$accent2",height:4,width:4,borderRadius:2}}),JoystickPlayground=styled$5("div",{$flexCenter:"",width:"$joystickWidth",height:"$joystickHeight",borderRadius:"$sm",boxShadow:"$level2",position:"fixed",zIndex:1e4,overflow:"hidden",$draggable:"",transform:"translate(-50%, -50%)",variants:{isOutOfBounds:{true:{backgroundColor:"$elevation1"},false:{backgroundColor:"$elevation3"}}},"> div":{position:"absolute",$flexCenter:"",borderStyle:"solid",borderWidth:1,borderColor:"$highlight1",backgroundColor:"$elevation3",width:"80%",height:"80%","&::after,&::before":{content:'""',position:"absolute",zindex:10,backgroundColor:"$highlight1"},"&::before":{width:"100%",height:1},"&::after":{height:"100%",width:1}},"> span":{position:"relative",zindex:100,width:10,height:10,backgroundColor:"$accent2",borderRadius:"50%"}});function Joystick({value:tt,settings:et,onUpdate:nt}){const rt=reactExports.useRef(),it=reactExports.useRef(0),ot=reactExports.useRef(0),at=reactExports.useRef(1),[st,lt]=reactExports.useState(!1),[ct,ut]=reactExports.useState(!1),[ht,dt]=useTransform(),pt=reactExports.useRef(null),mt=reactExports.useRef(null);reactExports.useLayoutEffect(()=>{if(st){const{top:Pt,left:Ct,width:wt,height:It}=pt.current.getBoundingClientRect();mt.current.style.left=Ct+wt/2+"px",mt.current.style.top=Pt+It/2+"px"}},[st]);const{keys:[gt,yt],joystick:bt}=et,vt=bt==="invertY"?1:-1,{[gt]:{step:xt},[yt]:{step:kt}}=et,St=useTh("sizes","joystickWidth"),Tt=useTh("sizes","joystickHeight"),At=parseFloat(St)*.8/2,Et=parseFloat(Tt)*.8/2,$t=reactExports.useCallback(()=>{rt.current||(ut(!0),it.current&&dt({x:it.current*At}),ot.current&&dt({y:ot.current*-Et}),rt.current=window.setInterval(()=>{nt(Pt=>{const Ct=xt*it.current*at.current,wt=vt*kt*ot.current*at.current;return Array.isArray(Pt)?{[gt]:Pt[0]+Ct,[yt]:Pt[1]+wt}:{[gt]:Pt[gt]+Ct,[yt]:Pt[yt]+wt}})},16))},[At,Et,nt,dt,xt,kt,gt,yt,vt]),Dt=reactExports.useCallback(()=>{window.clearTimeout(rt.current),rt.current=void 0,ut(!1)},[]);reactExports.useEffect(()=>{function Pt(Ct){at.current=multiplyStep(Ct)}return window.addEventListener("keydown",Pt),window.addEventListener("keyup",Pt),()=>{window.clearTimeout(rt.current),window.removeEventListener("keydown",Pt),window.removeEventListener("keyup",Pt)}},[]);const jt=useDrag$1(({first:Pt,active:Ct,delta:[wt,It],movement:[Ot,Wt]})=>{Pt&<(!0);const zt=clamp$8(Ot,-At,At),Ft=clamp$8(Wt,-Et,Et);it.current=Math.abs(Ot)>Math.abs(zt)?Math.sign(Ot-zt):0,ot.current=Math.abs(Wt)>Math.abs(Ft)?Math.sign(Ft-Wt):0;let Nt=tt[gt],Ut=tt[yt];Ct?(it.current||(Nt+=wt*xt*at.current,dt({x:zt})),ot.current||(Ut-=vt*It*kt*at.current,dt({y:Ft})),it.current||ot.current?$t():Dt(),nt({[gt]:Nt,[yt]:Ut})):(lt(!1),it.current=0,ot.current=0,dt({x:0,y:0}),Dt())});return React$1.createElement(JoystickTrigger,_extends$t({ref:pt},jt()),st&&React$1.createElement(Portal$2,null,React$1.createElement(JoystickPlayground,{ref:mt,isOutOfBounds:ct},React$1.createElement("div",null),React$1.createElement("span",{ref:ht}))))}const Container$1=styled$5("div",{display:"grid",columnGap:"$colGap",variants:{withJoystick:{true:{gridTemplateColumns:"$sizes$rowHeight auto"},false:{gridTemplateColumns:"auto"}}}});function Vector2dComponent(){const{label:tt,displayValue:et,onUpdate:nt,settings:rt}=useInputContext();return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(Container$1,{withJoystick:!!rt.joystick},rt.joystick&&React$1.createElement(Joystick,{value:et,settings:rt,onUpdate:nt}),React$1.createElement(Vector,{value:et,settings:rt,onUpdate:nt})))}const _excluded$7$1=["joystick"],plugin=getVectorPlugin(["x","y"]),normalize$2$1=tt=>{let{joystick:et=!0}=tt,nt=_objectWithoutProperties$l(tt,_excluded$7$1);const{value:rt,settings:it}=plugin.normalize(nt);return{value:rt,settings:_objectSpread2$1(_objectSpread2$1({},it),{},{joystick:et})}};var vector2d=_objectSpread2$1(_objectSpread2$1({component:Vector2dComponent},plugin),{},{normalize:normalize$2$1});const sanitize$1=tt=>{if(tt!==void 0){if(tt instanceof File)try{return URL.createObjectURL(tt)}catch{return}if(typeof tt=="string"&&tt.indexOf("blob:")===0)return tt;throw Error("Invalid image format [undefined | blob | File].")}},schema$1=(tt,et)=>typeof et=="object"&&"image"in et,normalize$1$1=({image:tt})=>({value:tt});var props$1=Object.freeze({__proto__:null,sanitize:sanitize$1,schema:schema$1,normalize:normalize$1$1});const ImageContainer=styled$5("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto 20px",columnGap:"$colGap",alignItems:"center"}),DropZone=styled$5("div",{$flexCenter:"",overflow:"hidden",height:"$rowHeight",background:"$elevation3",textAlign:"center",color:"inherit",borderRadius:"$sm",outline:"none",userSelect:"none",cursor:"pointer",$inputStyle:"",$hover:"",$focusWithin:"",$active:"$accent1 $elevation1",variants:{isDragAccept:{true:{$inputStyle:"$accent1",backgroundColor:"$elevation1"}}}}),ImagePreview=styled$5("div",{boxSizing:"border-box",borderRadius:"$sm",height:"$rowHeight",width:"$rowHeight",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center",variants:{hasImage:{true:{cursor:"pointer",$hover:"",$active:""}}}}),ImageLargePreview=styled$5("div",{$flexCenter:"",width:"$imagePreviewWidth",height:"$imagePreviewHeight",borderRadius:"$sm",boxShadow:"$level2",pointerEvents:"none",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center"}),Instructions=styled$5("div",{fontSize:"0.8em",height:"100%",padding:"$rowGap $md"}),Remove=styled$5("div",{$flexCenter:"",top:"0",right:"0",marginRight:"$sm",height:"100%",cursor:"pointer",variants:{disabled:{true:{color:"$elevation3",cursor:"default"}}},"&::after,&::before":{content:'""',position:"absolute",height:2,width:10,borderRadius:1,backgroundColor:"currentColor"},"&::after":{transform:"rotate(45deg)"},"&::before":{transform:"rotate(-45deg)"}});function ImageComponent(){const{label:tt,value:et,onUpdate:nt,disabled:rt}=useInputContext(),{popinRef:it,wrapperRef:ot,shown:at,show:st,hide:lt}=usePopin(),ct=reactExports.useCallback(mt=>{mt.length&&nt(mt[0])},[nt]),ut=reactExports.useCallback(mt=>{mt.stopPropagation(),nt(void 0)},[nt]),{getRootProps:ht,getInputProps:dt,isDragAccept:pt}=useDropzone({maxFiles:1,accept:"image/*",onDrop:ct,disabled:rt});return React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(ImageContainer,null,React$1.createElement(ImagePreview,{ref:it,hasImage:!!et,onPointerDown:()=>!!et&&st(),onPointerUp:lt,style:{backgroundImage:et?`url(${et})`:"none"}}),at&&!!et&&React$1.createElement(Portal$2,null,React$1.createElement(Overlay$1,{onPointerUp:lt,style:{cursor:"pointer"}}),React$1.createElement(ImageLargePreview,{ref:ot,style:{backgroundImage:`url(${et})`}})),React$1.createElement(DropZone,ht({isDragAccept:pt}),React$1.createElement("input",dt()),React$1.createElement(Instructions,null,pt?"drop image":"click or drop")),React$1.createElement(Remove,{onClick:ut,disabled:!et})))}var image=_objectSpread2$1({component:ImageComponent},props$1);const number$5=v8n().number(),schema=(tt,et)=>v8n().array().length(2).every.number().test(tt)&&v8n().schema({min:number$5,max:number$5}).test(et),format$2=tt=>({min:tt[0],max:tt[1]}),sanitize=(tt,{bounds:[et,nt]},rt)=>{const it=Array.isArray(tt)?format$2(tt):tt,ot={min:rt[0],max:rt[1]},{min:at,max:st}=_objectSpread2$1(_objectSpread2$1({},ot),it);return[clamp$8(Number(at),et,Math.max(et,st)),clamp$8(Number(st),Math.min(nt,at),nt)]},normalize$4=({value:tt,min:et,max:nt})=>{const rt={min:et,max:nt},it=normalizeKeyedNumberSettings(format$2(tt),{min:rt,max:rt}),ot=[et,nt],at=_objectSpread2$1(_objectSpread2$1({},it),{},{bounds:ot});return{value:sanitize(format$2(tt),at,tt),settings:at}};var props$3=Object.freeze({__proto__:null,schema,format:format$2,sanitize,normalize:normalize$4});const _excluded$6$1=["value","bounds","onDrag"],_excluded2$1$1=["bounds"],Container=styled$5("div",{display:"grid",columnGap:"$colGap",gridTemplateColumns:"auto calc($sizes$numberInputMinWidth * 2 + $space$rowGap)"});function IntervalSlider(tt){let{value:et,bounds:[nt,rt],onDrag:it}=tt,ot=_objectWithoutProperties$l(tt,_excluded$6$1);const at=reactExports.useRef(null),st=reactExports.useRef(null),lt=reactExports.useRef(null),ct=reactExports.useRef(0),ut=useTh("sizes","scrubberWidth"),ht=useDrag$1(({event:mt,first:gt,xy:[yt],movement:[bt],memo:vt={}})=>{if(gt){const{width:kt,left:St}=at.current.getBoundingClientRect();ct.current=kt-parseFloat(ut);const Tt=(mt==null?void 0:mt.target)===st.current||(mt==null?void 0:mt.target)===lt.current;vt.pos=invertedRange((yt-St)/kt,nt,rt);const At=Math.abs(vt.pos-et.min)-Math.abs(vt.pos-et.max);vt.key=At<0||At===0&&vt.pos<=et.min?"min":"max",Tt&&(vt.pos=et[vt.key])}const xt=vt.pos+invertedRange(bt/ct.current,0,rt-nt);return it({[vt.key]:sanitizeStep(xt,ot[vt.key])}),vt}),dt=`calc(${range$8(et.min,nt,rt)} * (100% - ${ut} - 8px) + 4px)`,pt=`calc(${1-range$8(et.max,nt,rt)} * (100% - ${ut} - 8px) + 4px)`;return React$1.createElement(RangeWrapper,_extends$t({ref:at},ht()),React$1.createElement(Range,null,React$1.createElement(Indicator,{style:{left:dt,right:pt}})),React$1.createElement(Scrubber,{position:"left",ref:st,style:{left:dt}}),React$1.createElement(Scrubber,{position:"right",ref:lt,style:{right:pt}}))}function IntervalComponent(){const{label:tt,displayValue:et,onUpdate:nt,settings:rt}=useInputContext(),it=_objectWithoutProperties$l(rt,_excluded2$1$1);return React$1.createElement(React$1.Fragment,null,React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,null,tt),React$1.createElement(Container,null,React$1.createElement(IntervalSlider,_extends$t({value:et},rt,{onDrag:nt})),React$1.createElement(Vector,{value:et,settings:it,onUpdate:nt,innerLabelTrim:0}))))}var interval$1=_objectSpread2$1({component:IntervalComponent},props$3);const createEventEmitter=()=>{const tt=new Map;return{on:(et,nt)=>{let rt=tt.get(et);rt===void 0&&(rt=new Set,tt.set(et,rt)),rt.add(nt)},off:(et,nt)=>{const rt=tt.get(et);rt!==void 0&&(rt.delete(nt),rt.size===0&&tt.delete(et))},emit:(et,...nt)=>{const rt=tt.get(et);if(rt!==void 0)for(const it of rt)it(...nt)}}},_excluded$5$1=["type","value"],_excluded2$h=["onChange","transient","onEditStart","onEditEnd"],Store=function(){const et=create$4(subscribeWithSelector(()=>({data:{}}))),nt=createEventEmitter();this.storeId=getUid(),this.useStore=et;const rt={},it=new Set;this.getVisiblePaths=()=>{const at=this.getData(),st=Object.keys(at),lt=[];Object.entries(rt).forEach(([ut,ht])=>{ht.render&&st.some(dt=>dt.indexOf(ut)===0)&&!ht.render(this.get)&<.push(ut+".")});const ct=[];return it.forEach(ut=>{ut in at&&at[ut].__refCount>0&<.every(ht=>ut.indexOf(ht)===-1)&&(!at[ut].render||at[ut].render(this.get))&&ct.push(ut)}),ct},this.setOrderedPaths=at=>{at.forEach(st=>it.add(st))},this.orderPaths=at=>(this.setOrderedPaths(at),at),this.disposePaths=at=>{et.setState(st=>{const lt=st.data;return at.forEach(ct=>{if(ct in lt){const ut=lt[ct];ut.__refCount--,ut.__refCount===0&&ut.type in SpecialInputs&&delete lt[ct]}}),{data:lt}})},this.dispose=()=>{et.setState(()=>({data:{}}))},this.getFolderSettings=at=>rt[at]||{},this.getData=()=>et.getState().data,this.addData=(at,st)=>{et.setState(lt=>{const ct=lt.data;return Object.entries(at).forEach(([ut,ht])=>{let dt=ct[ut];if(dt){const{type:pt,value:mt}=ht,gt=_objectWithoutProperties$l(ht,_excluded$5$1);pt!==dt.type?warn$3(LevaErrors.INPUT_TYPE_OVERRIDE,pt):((dt.__refCount===0||st)&&Object.assign(dt,gt),dt.__refCount++)}else ct[ut]=_objectSpread2$1(_objectSpread2$1({},ht),{},{__refCount:1})}),{data:ct}})},this.setValueAtPath=(at,st,lt)=>{et.setState(ct=>{const ut=ct.data;return updateInput(ut[at],st,at,this,lt),{data:ut}})},this.setSettingsAtPath=(at,st)=>{et.setState(lt=>{const ct=lt.data;return ct[at].settings=_objectSpread2$1(_objectSpread2$1({},ct[at].settings),st),{data:ct}})},this.disableInputAtPath=(at,st)=>{et.setState(lt=>{const ct=lt.data;return ct[at].disabled=st,{data:ct}})},this.set=(at,st)=>{et.setState(lt=>{const ct=lt.data;return Object.entries(at).forEach(([ut,ht])=>{try{updateInput(ct[ut],ht,void 0,void 0,st)}catch{}}),{data:ct}})},this.getInput=at=>{try{return this.getData()[at]}catch{warn$3(LevaErrors.PATH_DOESNT_EXIST,at)}},this.get=at=>{var st;return(st=this.getInput(at))===null||st===void 0?void 0:st.value},this.emitOnEditStart=at=>{nt.emit(`onEditStart:${at}`,this.get(at),at,_objectSpread2$1(_objectSpread2$1({},this.getInput(at)),{},{get:this.get}))},this.emitOnEditEnd=at=>{nt.emit(`onEditEnd:${at}`,this.get(at),at,_objectSpread2$1(_objectSpread2$1({},this.getInput(at)),{},{get:this.get}))},this.subscribeToEditStart=(at,st)=>{const lt=`onEditStart:${at}`;return nt.on(lt,st),()=>nt.off(lt,st)},this.subscribeToEditEnd=(at,st)=>{const lt=`onEditEnd:${at}`;return nt.on(lt,st),()=>nt.off(lt,st)};const ot=(at,st,lt)=>{const ct={};return Object.entries(at).forEach(([ut,ht])=>{if(ut==="")return warn$3(LevaErrors.EMPTY_KEY);let dt=join(st,ut);if(ht.type===SpecialInputs.FOLDER){const pt=ot(ht.schema,dt,lt);Object.assign(ct,pt),dt in rt||(rt[dt]=ht.settings)}else if(ut in lt)warn$3(LevaErrors.DUPLICATE_KEYS,ut,dt,lt[ut].path);else{const pt=normalizeInput(ht,ut,dt,ct);if(pt){const{type:mt,options:gt,input:yt}=pt,{onChange:bt,transient:vt,onEditStart:xt,onEditEnd:kt}=gt,St=_objectWithoutProperties$l(gt,_excluded2$h);ct[dt]=_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({type:mt},St),yt),{},{fromPanel:!0}),lt[ut]={path:dt,onChange:bt,transient:vt,onEditStart:xt,onEditEnd:kt}}else warn$3(LevaErrors.UNKNOWN_INPUT,dt,ht)}}),ct};this.getDataFromSchema=at=>{const st={};return[ot(at,"",st),st]}},levaStore=new Store,defaultSettings$2={collapsed:!1};function folder(tt,et){return{type:SpecialInputs.FOLDER,schema:tt,settings:_objectSpread2$1(_objectSpread2$1({},defaultSettings$2),et)}}const isInput=tt=>"__levaInput"in tt,buildTree=(tt,et)=>{const nt={},rt=et?et.toLowerCase():null;return tt.forEach(it=>{const[ot,at]=getKeyPath(it);(!rt||ot.toLowerCase().indexOf(rt)>-1)&&merge$2(nt,at,{[ot]:{__levaInput:!0,path:it}})}),nt},_excluded$4$1=["type","label","path","valueKey","value","settings","setValue","disabled"];function ControlInput(tt){let{type:et,label:nt,path:rt,valueKey:it,value:ot,settings:at,setValue:st,disabled:lt}=tt,ct=_objectWithoutProperties$l(tt,_excluded$4$1);const{displayValue:ut,onChange:ht,onUpdate:dt}=useInputSetters({type:et,value:ot,settings:at,setValue:st}),pt=Plugins[et].component;return pt?React$1.createElement(InputContext.Provider,{value:_objectSpread2$1({key:it,path:rt,id:""+rt,label:nt,displayValue:ut,value:ot,onChange:ht,onUpdate:dt,settings:at,setValue:st,disabled:lt},ct)},React$1.createElement(StyledInputWrapper$1,{disabled:lt},React$1.createElement(pt,null))):(warn$3(LevaErrors.NO_COMPONENT_FOR_TYPE,et,rt),null)}const StyledButton$2=styled$5("button",{display:"block",$reset:"",fontWeight:"$button",height:"$rowHeight",borderStyle:"none",borderRadius:"$sm",backgroundColor:"$elevation1",color:"$highlight1","&:not(:disabled)":{color:"$highlight3",backgroundColor:"$accent2",cursor:"pointer",$hover:"$accent3",$active:"$accent3 $accent1",$focus:""}});function Button$3({onClick:tt,settings:et,label:nt}){const rt=useStoreContext();return React$1.createElement(Row,null,React$1.createElement(StyledButton$2,{disabled:et.disabled,onClick:()=>tt(rt.get)},nt))}const StyledButtonGroup=styled$5("div",{$flex:"",justifyContent:"flex-end",gap:"$colGap"}),StyledButtonGroupButton=styled$5("button",{$reset:"",cursor:"pointer",borderRadius:"$xs","&:hover":{backgroundColor:"$elevation3"}}),getOpts=({label:tt,opts:et})=>{let nt=typeof tt=="string"&&tt.trim()===""?null:tt,rt=et;return typeof et.opts=="object"&&(rt.label!==void 0&&(nt=et.label),rt=et.opts),{label:nt,opts:rt}};function ButtonGroup(tt){const{label:et,opts:nt}=getOpts(tt),rt=useStoreContext();return React$1.createElement(Row,{input:!!et},et&&React$1.createElement(Label$4,null,et),React$1.createElement(StyledButtonGroup,null,Object.entries(nt).map(([it,ot])=>React$1.createElement(StyledButtonGroupButton,{key:it,onClick:()=>ot(rt.get)},it))))}const Canvas$2=styled$5("canvas",{height:"$monitorHeight",width:"100%",display:"block",borderRadius:"$sm"}),POINTS=100;function push(tt,et){tt.push(et),tt.length>POINTS&&tt.shift()}const MonitorCanvas=reactExports.forwardRef(function({initialValue:tt},et){const nt=useTh("colors","highlight3"),rt=useTh("colors","elevation2"),it=useTh("colors","highlight1"),[ot,at]=reactExports.useMemo(()=>[w$5(it).alpha(.4).toRgbString(),w$5(it).alpha(.1).toRgbString()],[it]),st=reactExports.useRef([tt]),lt=reactExports.useRef(tt),ct=reactExports.useRef(tt),ut=reactExports.useRef(),ht=reactExports.useCallback((mt,gt)=>{if(!mt)return;const{width:yt,height:bt}=mt,vt=new Path2D,xt=yt/POINTS,kt=bt*.05;for(let At=0;At({frame:mt=>{(lt.current===void 0||mtct.current)&&(ct.current=mt),push(st.current,mt),ut.current=requestAnimationFrame(()=>ht(dt.current,pt.current))}}),[dt,pt,ht]),reactExports.useEffect(()=>()=>cancelAnimationFrame(ut.current),[]),React$1.createElement(Canvas$2,{ref:dt})}),parse$2=tt=>Number.isFinite(tt)?tt.toPrecision(2):tt.toString(),MonitorLog=reactExports.forwardRef(function({initialValue:tt},et){const[nt,rt]=reactExports.useState(parse$2(tt));return reactExports.useImperativeHandle(et,()=>({frame:it=>rt(parse$2(it))}),[]),React$1.createElement("div",null,nt)});function getValue$4(tt){return typeof tt=="function"?tt():tt.current}function Monitor({label:tt,objectOrFn:et,settings:nt}){const rt=reactExports.useRef(),it=reactExports.useRef(getValue$4(et));return reactExports.useEffect(()=>{const ot=window.setInterval(()=>{var at;document.hidden||(at=rt.current)===null||at===void 0||at.frame(getValue$4(et))},nt.interval);return()=>window.clearInterval(ot)},[et,nt.interval]),React$1.createElement(Row,{input:!0},React$1.createElement(Label$4,{align:"top"},tt),nt.graph?React$1.createElement(MonitorCanvas,{ref:rt,initialValue:it.current}):React$1.createElement(MonitorLog,{ref:rt,initialValue:it.current}))}const _excluded$3$1=["type","label","key"],specialComponents={[SpecialInputs.BUTTON]:Button$3,[SpecialInputs.BUTTON_GROUP]:ButtonGroup,[SpecialInputs.MONITOR]:Monitor},Control=React$1.memo(({path:tt})=>{const[et,{set:nt,setSettings:rt,disable:it,storeId:ot,emitOnEditStart:at,emitOnEditEnd:st}]=useInput(tt);if(!et)return null;const{type:lt,label:ct,key:ut}=et,ht=_objectWithoutProperties$l(et,_excluded$3$1);if(lt in SpecialInputs){const dt=specialComponents[lt];return React$1.createElement(dt,_extends$t({label:ct,path:tt},ht))}return lt in Plugins?React$1.createElement(ControlInput,_extends$t({key:ot+tt,type:lt,label:ct,storeId:ot,path:tt,valueKey:ut,setValue:nt,setSettings:rt,disable:it,emitOnEditStart:at,emitOnEditEnd:st},ht)):(log$2(LevaErrors.UNSUPPORTED_INPUT,lt,tt),null)});function FolderTitle({toggle:tt,toggled:et,name:nt}){return React$1.createElement(StyledTitle,{onClick:()=>tt()},React$1.createElement(Chevron,{toggled:et}),React$1.createElement("div",null,nt))}const Folder=({name:tt,path:et,tree:nt})=>{const rt=useStoreContext(),it=join(et,tt),{collapsed:ot,color:at}=rt.getFolderSettings(it),[st,lt]=reactExports.useState(!ot),ct=reactExports.useRef(null),ut=useTh("colors","folderWidgetColor"),ht=useTh("colors","folderTextColor");return reactExports.useLayoutEffect(()=>{ct.current.style.setProperty("--leva-colors-folderWidgetColor",at||ut),ct.current.style.setProperty("--leva-colors-folderTextColor",at||ht)},[at,ut,ht]),React$1.createElement(StyledFolder,{ref:ct},React$1.createElement(FolderTitle,{name:tt,toggled:st,toggle:()=>lt(dt=>!dt)}),React$1.createElement(TreeWrapper,{parent:it,tree:nt,toggled:st}))},TreeWrapper=React$1.memo(({isRoot:tt=!1,fill:et=!1,flat:nt=!1,parent:rt,tree:it,toggled:ot})=>{const{wrapperRef:at,contentRef:st}=useToggle(ot),lt=useStoreContext(),ct=([ht,dt])=>{var pt;return(isInput(dt)?(pt=lt.getInput(dt.path))===null||pt===void 0?void 0:pt.order:lt.getFolderSettings(join(rt,ht)).order)||0},ut=Object.entries(it).sort((ht,dt)=>ct(ht)-ct(dt));return React$1.createElement(StyledWrapper,{ref:at,isRoot:tt,fill:et,flat:nt},React$1.createElement(StyledContent,{ref:st,isRoot:tt,toggled:ot},ut.map(([ht,dt])=>isInput(dt)?React$1.createElement(Control,{key:dt.path,valueKey:dt.valueKey,path:dt.path}):React$1.createElement(Folder,{key:ht,name:ht,path:rt,tree:dt}))))}),StyledRoot=styled$5("div",{position:"relative",fontFamily:"$mono",fontSize:"$root",color:"$rootText",backgroundColor:"$elevation1",variants:{fill:{false:{position:"fixed",top:"10px",right:"10px",zIndex:1e3,width:"$rootWidth"},true:{position:"relative",width:"100%"}},flat:{false:{borderRadius:"$lg",boxShadow:"$level1"}},oneLineLabels:{true:{[`${StyledInputRow}`]:{gridTemplateColumns:"auto",gridAutoColumns:"minmax(max-content, 1fr)",gridAutoRows:"minmax($sizes$rowHeight), auto)",rowGap:0,columnGap:0,marginTop:"$rowGap"}}},hideTitleBar:{true:{$$titleBarHeight:"0px"},false:{$$titleBarHeight:"$sizes$titleBarHeight"}}},"&,*,*:after,*:before":{boxSizing:"border-box"},"*::selection":{backgroundColor:"$accent2"}}),iconWidth=40,Icon=styled$5("i",{$flexCenter:"",width:iconWidth,userSelect:"none",cursor:"pointer","> svg":{fill:"$highlight1",transition:"transform 350ms ease, fill 250ms ease"},"&:hover > svg":{fill:"$highlight3"},variants:{active:{true:{"> svg":{fill:"$highlight2"}}}}}),StyledTitleWithFilter=styled$5("div",{display:"flex",alignItems:"stretch",justifyContent:"space-between",height:"$titleBarHeight",variants:{mode:{drag:{cursor:"grab"}}}}),FilterWrapper=styled$5("div",{$flex:"",position:"relative",width:"100%",overflow:"hidden",transition:"height 250ms ease",color:"$highlight3",paddingLeft:"$md",[`> ${Icon}`]:{height:30},variants:{toggled:{true:{height:30},false:{height:0}}}}),StyledFilterInput=styled$5("input",{$reset:"",flex:1,position:"relative",height:30,width:"100%",backgroundColor:"transparent",fontSize:"10px",borderRadius:"$root","&:focus":{},"&::placeholder":{color:"$highlight2"}}),TitleContainer=styled$5("div",{touchAction:"none",$flexCenter:"",flex:1,"> svg":{fill:"$highlight1"},color:"$highlight1",variants:{drag:{true:{$draggable:"","> svg":{transition:"fill 250ms ease"},"&:hover":{color:"$highlight3"},"&:hover > svg":{fill:"$highlight3"}}},filterEnabled:{false:{paddingRight:iconWidth}}}}),FilterInput=React$1.forwardRef(({setFilter:tt,toggle:et},nt)=>{const[rt,it]=reactExports.useState(""),ot=reactExports.useMemo(()=>debounce$6(tt,250),[tt]),at=()=>{tt(""),it("")},st=lt=>{const ct=lt.currentTarget.value;et(!0),it(ct)};return reactExports.useEffect(()=>{ot(rt)},[rt,ot]),React$1.createElement(React$1.Fragment,null,React$1.createElement(StyledFilterInput,{ref:nt,value:rt,placeholder:"[Open filter with CMD+SHIFT+L]",onPointerDown:lt=>lt.stopPropagation(),onChange:st}),React$1.createElement(Icon,{onClick:()=>at(),style:{visibility:rt?"visible":"hidden"}},React$1.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"14",width:"14",viewBox:"0 0 20 20",fill:"currentColor"},React$1.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))))});function TitleWithFilter({setFilter:tt,onDrag:et,onDragStart:nt,onDragEnd:rt,toggle:it,toggled:ot,title:at,drag:st,filterEnabled:lt,from:ct}){const[ut,ht]=reactExports.useState(!1),dt=reactExports.useRef(null);reactExports.useEffect(()=>{var mt,gt;ut?(mt=dt.current)===null||mt===void 0||mt.focus():(gt=dt.current)===null||gt===void 0||gt.blur()},[ut]);const pt=useDrag$1(({offset:[mt,gt],first:yt,last:bt})=>{et({x:mt,y:gt}),yt&&nt({x:mt,y:gt}),bt&&rt({x:mt,y:gt})},{filterTaps:!0,from:({offset:[mt,gt]})=>[(ct==null?void 0:ct.x)||mt,(ct==null?void 0:ct.y)||gt]});return reactExports.useEffect(()=>{const mt=gt=>{gt.key==="L"&>.shiftKey&>.metaKey&&ht(yt=>!yt)};return window.addEventListener("keydown",mt),()=>window.removeEventListener("keydown",mt)},[]),React$1.createElement(React$1.Fragment,null,React$1.createElement(StyledTitleWithFilter,{mode:st?"drag":void 0},React$1.createElement(Icon,{active:!ot,onClick:()=>it()},React$1.createElement(Chevron,{toggled:ot,width:12,height:8})),React$1.createElement(TitleContainer,_extends$t({},st?pt():{},{drag:st,filterEnabled:lt}),at===void 0&&st?React$1.createElement("svg",{width:"20",height:"10",viewBox:"0 0 28 14",xmlns:"http://www.w3.org/2000/svg"},React$1.createElement("circle",{cx:"2",cy:"2",r:"2"}),React$1.createElement("circle",{cx:"14",cy:"2",r:"2"}),React$1.createElement("circle",{cx:"26",cy:"2",r:"2"}),React$1.createElement("circle",{cx:"2",cy:"12",r:"2"}),React$1.createElement("circle",{cx:"14",cy:"12",r:"2"}),React$1.createElement("circle",{cx:"26",cy:"12",r:"2"})):at),lt&&React$1.createElement(Icon,{active:ut,onClick:()=>ht(mt=>!mt)},React$1.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",viewBox:"0 0 20 20"},React$1.createElement("path",{d:"M9 9a2 2 0 114 0 2 2 0 01-4 0z"}),React$1.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-13a4 4 0 00-3.446 6.032l-2.261 2.26a1 1 0 101.414 1.415l2.261-2.261A4 4 0 1011 5z",clipRule:"evenodd"})))),React$1.createElement(FilterWrapper,{toggled:ut},React$1.createElement(FilterInput,{ref:dt,setFilter:tt,toggle:it})))}const _excluded$2$1=["store","hidden","theme","collapsed"];function LevaRoot(tt){let{store:et,hidden:nt=!1,theme:rt,collapsed:it=!1}=tt,ot=_objectWithoutProperties$l(tt,_excluded$2$1);const at=useDeepMemo(()=>mergeTheme(rt),[rt]),[st,lt]=reactExports.useState(!it),ct=typeof it=="object"?!it.collapsed:st,ut=reactExports.useMemo(()=>typeof it=="object"?ht=>{typeof ht=="function"?it.onChange(!ht(!it.collapsed)):it.onChange(!ht)}:lt,[it]);return!et||nt?null:React$1.createElement(ThemeContext$3.Provider,{value:at},React$1.createElement(LevaCore,_extends$t({store:et},ot,{toggled:ct,setToggle:ut,rootClass:at.className})))}const LevaCore=React$1.memo(({store:tt,rootClass:et,fill:nt=!1,flat:rt=!1,neverHide:it=!1,oneLineLabels:ot=!1,titleBar:at={title:void 0,drag:!0,filter:!0,position:void 0,onDrag:void 0,onDragStart:void 0,onDragEnd:void 0},hideCopyButton:st=!1,toggled:lt,setToggle:ct})=>{var ut,ht;const dt=useVisiblePaths(tt),[pt,mt]=reactExports.useState(""),gt=reactExports.useMemo(()=>buildTree(dt,pt),[dt,pt]),[yt,bt]=useTransform(),vt=it||dt.length>0,xt=typeof at=="object"&&at.title||void 0,kt=typeof at=="object"&&(ut=at.drag)!==null&&ut!==void 0?ut:!0,St=typeof at=="object"&&(ht=at.filter)!==null&&ht!==void 0?ht:!0,Tt=typeof at=="object"&&at.position||void 0,At=typeof at=="object"&&at.onDrag||void 0,Et=typeof at=="object"&&at.onDragStart||void 0,$t=typeof at=="object"&&at.onDragEnd||void 0;return React$1.useEffect(()=>{bt({x:Tt==null?void 0:Tt.x,y:Tt==null?void 0:Tt.y})},[Tt,bt]),globalStyles(),React$1.createElement(PanelSettingsContext.Provider,{value:{hideCopyButton:st}},React$1.createElement(StyledRoot,{ref:yt,className:et,fill:nt,flat:rt,oneLineLabels:ot,hideTitleBar:!at,style:{display:vt?"block":"none"}},at&&React$1.createElement(TitleWithFilter,{onDrag:Dt=>{bt(Dt),At==null||At(Dt)},onDragStart:Dt=>Et==null?void 0:Et(Dt),onDragEnd:Dt=>$t==null?void 0:$t(Dt),setFilter:mt,toggle:Dt=>ct(jt=>Dt??!jt),toggled:lt,title:xt,drag:kt,filterEnabled:St,from:Tt}),vt&&React$1.createElement(StoreContext$1.Provider,{value:tt},React$1.createElement(TreeWrapper,{isRoot:!0,fill:nt,flat:rt,tree:gt,toggled:lt}))))}),_excluded$1$3=["isRoot"];let rootInitialized=!1,rootEl=null;function Leva(tt){let{isRoot:et=!1}=tt,nt=_objectWithoutProperties$l(tt,_excluded$1$3);return reactExports.useEffect(()=>(rootInitialized=!0,!et&&rootEl&&(rootEl.remove(),rootEl=null),()=>{et||(rootInitialized=!1)}),[et]),React$1.createElement(LevaRoot,_extends$t({store:levaStore},nt))}function useRenderRoot(tt){reactExports.useEffect(()=>{tt&&!rootInitialized&&(rootEl||(rootEl=document.getElementById("leva__root")||Object.assign(document.createElement("div"),{id:"leva__root"}),document.body&&(document.body.appendChild(rootEl),render(React$1.createElement(Leva,{isRoot:!0}),rootEl))),rootInitialized=!0)},[tt])}function parseArgs(tt,et,nt,rt,it){let ot,at,st,lt,ct;return typeof tt=="string"?(at=tt,ot=et,Array.isArray(nt)?ct=nt:nt&&("store"in nt?(lt=nt,ct=rt):(st=nt,Array.isArray(rt)?ct=rt:(lt=rt,ct=it)))):(ot=tt,Array.isArray(et)?ct=et:(lt=et,ct=nt)),{schema:ot,folderName:at,folderSettings:st,hookSettings:lt,deps:ct||[]}}function useControls(tt,et,nt,rt,it){const{folderName:ot,schema:at,folderSettings:st,hookSettings:lt,deps:ct}=parseArgs(tt,et,nt,rt,it),ut=typeof at=="function",ht=reactExports.useRef(!1),dt=reactExports.useRef(!0),pt=useDeepMemo(()=>{ht.current=!0;const jt=typeof at=="function"?at():at;return ot?{[ot]:folder(jt,st)}:jt},ct),mt=!(lt!=null&<.store);useRenderRoot(mt);const[gt]=reactExports.useState(()=>(lt==null?void 0:lt.store)||levaStore),[yt,bt]=reactExports.useMemo(()=>gt.getDataFromSchema(pt),[gt,pt]),[vt,xt,kt,St,Tt]=reactExports.useMemo(()=>{const jt=[],Pt=[],Ct={},wt={},It={};return Object.values(bt).forEach(({path:Ot,onChange:Wt,onEditStart:zt,onEditEnd:Ft,transient:Nt})=>{jt.push(Ot),Wt?(Ct[Ot]=Wt,Nt||Pt.push(Ot)):Pt.push(Ot),zt&&(wt[Ot]=zt),Ft&&(It[Ot]=Ft)}),[jt,Pt,Ct,wt,It]},[bt]),At=reactExports.useMemo(()=>gt.orderPaths(vt),[vt,gt]),Et=useValuesForPath(gt,xt,yt),$t=reactExports.useCallback(jt=>{const Pt=Object.entries(jt).reduce((Ct,[wt,It])=>Object.assign(Ct,{[bt[wt].path]:It}),{});gt.set(Pt,!1)},[gt,bt]),Dt=reactExports.useCallback(jt=>gt.get(bt[jt].path),[gt,bt]);return reactExports.useEffect(()=>{const jt=!dt.current&&ht.current;return gt.addData(yt,jt),dt.current=!1,ht.current=!1,()=>gt.disposePaths(At)},[gt,At,yt]),reactExports.useEffect(()=>{const jt=[];return Object.entries(kt).forEach(([Pt,Ct])=>{Ct(gt.get(Pt),Pt,_objectSpread2$1({initial:!0,get:gt.get},gt.getInput(Pt)));const wt=gt.useStore.subscribe(It=>{const Ot=It.data[Pt];return[Ot.disabled?void 0:Ot.value,Ot]},([It,Ot])=>Ct(It,Pt,_objectSpread2$1({initial:!1,get:gt.get},Ot)),{equalityFn:shallow$2});jt.push(wt)}),()=>jt.forEach(Pt=>Pt())},[gt,kt]),reactExports.useEffect(()=>{const jt=[];return Object.entries(St).forEach(([Pt,Ct])=>jt.push(gt.subscribeToEditStart(Pt,Ct))),Object.entries(Tt).forEach(([Pt,Ct])=>jt.push(gt.subscribeToEditEnd(Pt,Ct))),()=>jt.forEach(Pt=>Pt())},[St,Tt,gt]),ut?[Et,$t,Dt]:Et}register(LevaInputs.SELECT,select$1);register(LevaInputs.IMAGE,image);register(LevaInputs.NUMBER,number$6);register(LevaInputs.COLOR,color$3);register(LevaInputs.STRING,string$1);register(LevaInputs.BOOLEAN,boolean);register(LevaInputs.INTERVAL,interval$1);register(LevaInputs.VECTOR3D,vector3d);register(LevaInputs.VECTOR2D,vector2d);var isCheckBoxInput=tt=>tt.type==="checkbox",isDateObject=tt=>tt instanceof Date,isNullOrUndefined=tt=>tt==null;const isObjectType=tt=>typeof tt=="object";var isObject$f=tt=>!isNullOrUndefined(tt)&&!Array.isArray(tt)&&isObjectType(tt)&&!isDateObject(tt),getEventValue=tt=>isObject$f(tt)&&tt.target?isCheckBoxInput(tt.target)?tt.target.checked:tt.target.value:tt,getNodeParentName=tt=>tt.substring(0,tt.search(/\.\d+(\.|$)/))||tt,isNameInFieldArray=(tt,et)=>tt.has(getNodeParentName(et)),isPlainObject$2=tt=>{const et=tt.constructor&&tt.constructor.prototype;return isObject$f(et)&&et.hasOwnProperty("isPrototypeOf")},isWeb=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function cloneObject(tt){let et;const nt=Array.isArray(tt);if(tt instanceof Date)et=new Date(tt);else if(tt instanceof Set)et=new Set(tt);else if(!(isWeb&&(tt instanceof Blob||tt instanceof FileList))&&(nt||isObject$f(tt)))if(et=nt?[]:{},!nt&&!isPlainObject$2(tt))et=tt;else for(const rt in tt)tt.hasOwnProperty(rt)&&(et[rt]=cloneObject(tt[rt]));else return tt;return et}var compact=tt=>Array.isArray(tt)?tt.filter(Boolean):[],isUndefined$1=tt=>tt===void 0,get$5=(tt,et,nt)=>{if(!et||!isObject$f(tt))return nt;const rt=compact(et.split(/[,[\].]+?/)).reduce((it,ot)=>isNullOrUndefined(it)?it:it[ot],tt);return isUndefined$1(rt)||rt===tt?isUndefined$1(tt[et])?nt:tt[et]:rt},isBoolean$2=tt=>typeof tt=="boolean";const EVENTS={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},VALIDATION_MODE={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},INPUT_VALIDATION_RULES={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},HookFormContext=React$1.createContext(null),useFormContext=()=>React$1.useContext(HookFormContext),FormProvider=tt=>{const{children:et,...nt}=tt;return React$1.createElement(HookFormContext.Provider,{value:nt},et)};var getProxyFormState=(tt,et,nt,rt=!0)=>{const it={defaultValues:et._defaultValues};for(const ot in tt)Object.defineProperty(it,ot,{get:()=>{const at=ot;return et._proxyFormState[at]!==VALIDATION_MODE.all&&(et._proxyFormState[at]=!rt||VALIDATION_MODE.all),nt&&(nt[at]=!0),tt[at]}});return it},isEmptyObject=tt=>isObject$f(tt)&&!Object.keys(tt).length,shouldRenderFormState=(tt,et,nt,rt)=>{nt(tt);const{name:it,...ot}=tt;return isEmptyObject(ot)||Object.keys(ot).length>=Object.keys(et).length||Object.keys(ot).find(at=>et[at]===(!rt||VALIDATION_MODE.all))},convertToArrayPayload=tt=>Array.isArray(tt)?tt:[tt],shouldSubscribeByName=(tt,et,nt)=>!tt||!et||tt===et||convertToArrayPayload(tt).some(rt=>rt&&(nt?rt===et:rt.startsWith(et)||et.startsWith(rt)));function useSubscribe(tt){const et=React$1.useRef(tt);et.current=tt,React$1.useEffect(()=>{const nt=!tt.disabled&&et.current.subject&&et.current.subject.subscribe({next:et.current.next});return()=>{nt&&nt.unsubscribe()}},[tt.disabled])}function useFormState(tt){const et=useFormContext(),{control:nt=et.control,disabled:rt,name:it,exact:ot}=tt||{},[at,st]=React$1.useState(nt._formState),lt=React$1.useRef(!0),ct=React$1.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),ut=React$1.useRef(it);return ut.current=it,useSubscribe({disabled:rt,next:ht=>lt.current&&shouldSubscribeByName(ut.current,ht.name,ot)&&shouldRenderFormState(ht,ct.current,nt._updateFormState)&&st({...nt._formState,...ht}),subject:nt._subjects.state}),React$1.useEffect(()=>(lt.current=!0,ct.current.isValid&&nt._updateValid(!0),()=>{lt.current=!1}),[nt]),getProxyFormState(at,nt,ct.current,!1)}var isString$3=tt=>typeof tt=="string",generateWatchOutput=(tt,et,nt,rt,it)=>isString$3(tt)?(rt&&et.watch.add(tt),get$5(nt,tt,it)):Array.isArray(tt)?tt.map(ot=>(rt&&et.watch.add(ot),get$5(nt,ot))):(rt&&(et.watchAll=!0),nt);function useWatch(tt){const et=useFormContext(),{control:nt=et.control,name:rt,defaultValue:it,disabled:ot,exact:at}=tt||{},st=React$1.useRef(rt);st.current=rt,useSubscribe({disabled:ot,subject:nt._subjects.values,next:ut=>{shouldSubscribeByName(st.current,ut.name,at)&&ct(cloneObject(generateWatchOutput(st.current,nt._names,ut.values||nt._formValues,!1,it)))}});const[lt,ct]=React$1.useState(nt._getWatch(rt,it));return React$1.useEffect(()=>nt._removeUnmounted()),lt}var isKey$4=tt=>/^\w*$/.test(tt),stringToPath$3=tt=>compact(tt.replace(/["|']|\]/g,"").split(/\.|\[/));function set$3(tt,et,nt){let rt=-1;const it=isKey$4(et)?[et]:stringToPath$3(et),ot=it.length,at=ot-1;for(;++rt{const ut=it._options.shouldUnregister||ot,ht=(dt,pt)=>{const mt=get$5(it._fields,dt);mt&&(mt._f.mount=pt)};if(ht(nt,!0),ut){const dt=cloneObject(get$5(it._options.defaultValues,nt));set$3(it._defaultValues,nt,dt),isUndefined$1(get$5(it._formValues,nt))&&set$3(it._formValues,nt,dt)}return()=>{(at?ut&&!it._state.action:ut)?it.unregister(nt):ht(nt,!1)}},[nt,it,at,ot]),React$1.useEffect(()=>{get$5(it._fields,nt)&&it._updateDisabledField({disabled:rt,fields:it._fields,name:nt})},[rt,nt,it]),{field:{name:nt,value:st,...isBoolean$2(rt)?{disabled:rt}:{},onChange:React$1.useCallback(ut=>ct.current.onChange({target:{value:getEventValue(ut),name:nt},type:EVENTS.CHANGE}),[nt]),onBlur:React$1.useCallback(()=>ct.current.onBlur({target:{value:get$5(it._formValues,nt),name:nt},type:EVENTS.BLUR}),[nt,it]),ref:ut=>{const ht=get$5(it._fields,nt);ht&&ut&&(ht._f.ref={focus:()=>ut.focus(),select:()=>ut.select(),setCustomValidity:dt=>ut.setCustomValidity(dt),reportValidity:()=>ut.reportValidity()})}},formState:lt,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!get$5(lt.errors,nt)},isDirty:{enumerable:!0,get:()=>!!get$5(lt.dirtyFields,nt)},isTouched:{enumerable:!0,get:()=>!!get$5(lt.touchedFields,nt)},error:{enumerable:!0,get:()=>get$5(lt.errors,nt)}})}}const Controller=tt=>tt.render(useController(tt));var appendErrors=(tt,et,nt,rt,it)=>et?{...nt[tt],types:{...nt[tt]&&nt[tt].types?nt[tt].types:{},[rt]:it||!0}}:{};const focusFieldBy=(tt,et,nt)=>{for(const rt of nt||Object.keys(tt)){const it=get$5(tt,rt);if(it){const{_f:ot,...at}=it;if(ot&&et(ot.name)){if(ot.ref.focus){ot.ref.focus();break}else if(ot.refs&&ot.refs[0].focus){ot.refs[0].focus();break}}else isObject$f(at)&&focusFieldBy(at,et)}}};var getValidationModes=tt=>({isOnSubmit:!tt||tt===VALIDATION_MODE.onSubmit,isOnBlur:tt===VALIDATION_MODE.onBlur,isOnChange:tt===VALIDATION_MODE.onChange,isOnAll:tt===VALIDATION_MODE.all,isOnTouch:tt===VALIDATION_MODE.onTouched}),isWatched=(tt,et,nt)=>!nt&&(et.watchAll||et.watch.has(tt)||[...et.watch].some(rt=>tt.startsWith(rt)&&/^\.\w+/.test(tt.slice(rt.length)))),updateFieldArrayRootError=(tt,et,nt)=>{const rt=compact(get$5(tt,nt));return set$3(rt,"root",et[nt]),set$3(tt,nt,rt),tt},isFileInput=tt=>tt.type==="file",isFunction$6=tt=>typeof tt=="function",isHTMLElement$2=tt=>{if(!isWeb)return!1;const et=tt?tt.ownerDocument:0;return tt instanceof(et&&et.defaultView?et.defaultView.HTMLElement:HTMLElement)},isMessage=tt=>isString$3(tt),isRadioInput=tt=>tt.type==="radio",isRegex=tt=>tt instanceof RegExp;const defaultResult$1={value:!1,isValid:!1},validResult={value:!0,isValid:!0};var getCheckboxValue=tt=>{if(Array.isArray(tt)){if(tt.length>1){const et=tt.filter(nt=>nt&&nt.checked&&!nt.disabled).map(nt=>nt.value);return{value:et,isValid:!!et.length}}return tt[0].checked&&!tt[0].disabled?tt[0].attributes&&!isUndefined$1(tt[0].attributes.value)?isUndefined$1(tt[0].value)||tt[0].value===""?validResult:{value:tt[0].value,isValid:!0}:validResult:defaultResult$1}return defaultResult$1};const defaultReturn={isValid:!1,value:null};var getRadioValue=tt=>Array.isArray(tt)?tt.reduce((et,nt)=>nt&&nt.checked&&!nt.disabled?{isValid:!0,value:nt.value}:et,defaultReturn):defaultReturn;function getValidateError(tt,et,nt="validate"){if(isMessage(tt)||Array.isArray(tt)&&tt.every(isMessage)||isBoolean$2(tt)&&!tt)return{type:nt,message:isMessage(tt)?tt:"",ref:et}}var getValueAndMessage=tt=>isObject$f(tt)&&!isRegex(tt)?tt:{value:tt,message:""},validateField=async(tt,et,nt,rt,it)=>{const{ref:ot,refs:at,required:st,maxLength:lt,minLength:ct,min:ut,max:ht,pattern:dt,validate:pt,name:mt,valueAsNumber:gt,mount:yt,disabled:bt}=tt._f,vt=get$5(et,mt);if(!yt||bt)return{};const xt=at?at[0]:ot,kt=Pt=>{rt&&xt.reportValidity&&(xt.setCustomValidity(isBoolean$2(Pt)?"":Pt||""),xt.reportValidity())},St={},Tt=isRadioInput(ot),At=isCheckBoxInput(ot),Et=Tt||At,$t=(gt||isFileInput(ot))&&isUndefined$1(ot.value)&&isUndefined$1(vt)||isHTMLElement$2(ot)&&ot.value===""||vt===""||Array.isArray(vt)&&!vt.length,Dt=appendErrors.bind(null,mt,nt,St),jt=(Pt,Ct,wt,It=INPUT_VALIDATION_RULES.maxLength,Ot=INPUT_VALIDATION_RULES.minLength)=>{const Wt=Pt?Ct:wt;St[mt]={type:Pt?It:Ot,message:Wt,ref:ot,...Dt(Pt?It:Ot,Wt)}};if(it?!Array.isArray(vt)||!vt.length:st&&(!Et&&($t||isNullOrUndefined(vt))||isBoolean$2(vt)&&!vt||At&&!getCheckboxValue(at).isValid||Tt&&!getRadioValue(at).isValid)){const{value:Pt,message:Ct}=isMessage(st)?{value:!!st,message:st}:getValueAndMessage(st);if(Pt&&(St[mt]={type:INPUT_VALIDATION_RULES.required,message:Ct,ref:xt,...Dt(INPUT_VALIDATION_RULES.required,Ct)},!nt))return kt(Ct),St}if(!$t&&(!isNullOrUndefined(ut)||!isNullOrUndefined(ht))){let Pt,Ct;const wt=getValueAndMessage(ht),It=getValueAndMessage(ut);if(!isNullOrUndefined(vt)&&!isNaN(vt)){const Ot=ot.valueAsNumber||vt&&+vt;isNullOrUndefined(wt.value)||(Pt=Ot>wt.value),isNullOrUndefined(It.value)||(Ct=Otnew Date(new Date().toDateString()+" "+Nt),zt=ot.type=="time",Ft=ot.type=="week";isString$3(wt.value)&&vt&&(Pt=zt?Wt(vt)>Wt(wt.value):Ft?vt>wt.value:Ot>new Date(wt.value)),isString$3(It.value)&&vt&&(Ct=zt?Wt(vt)+Pt.value,It=!isNullOrUndefined(Ct.value)&&vt.length<+Ct.value;if((wt||It)&&(jt(wt,Pt.message,Ct.message),!nt))return kt(St[mt].message),St}if(dt&&!$t&&isString$3(vt)){const{value:Pt,message:Ct}=getValueAndMessage(dt);if(isRegex(Pt)&&!vt.match(Pt)&&(St[mt]={type:INPUT_VALIDATION_RULES.pattern,message:Ct,ref:ot,...Dt(INPUT_VALIDATION_RULES.pattern,Ct)},!nt))return kt(Ct),St}if(pt){if(isFunction$6(pt)){const Pt=await pt(vt,et),Ct=getValidateError(Pt,xt);if(Ct&&(St[mt]={...Ct,...Dt(INPUT_VALIDATION_RULES.validate,Ct.message)},!nt))return kt(Ct.message),St}else if(isObject$f(pt)){let Pt={};for(const Ct in pt){if(!isEmptyObject(Pt)&&!nt)break;const wt=getValidateError(await pt[Ct](vt,et),xt,Ct);wt&&(Pt={...wt,...Dt(Ct,wt.message)},kt(wt.message),nt&&(St[mt]=Pt))}if(!isEmptyObject(Pt)&&(St[mt]={ref:xt,...Pt},!nt))return St}}return kt(!0),St};function baseGet$4(tt,et){const nt=et.slice(0,-1).length;let rt=0;for(;rt{for(const ot of tt)ot.next&&ot.next(it)},subscribe:it=>(tt.push(it),{unsubscribe:()=>{tt=tt.filter(ot=>ot!==it)}}),unsubscribe:()=>{tt=[]}}}var isPrimitive=tt=>isNullOrUndefined(tt)||!isObjectType(tt);function deepEqual$2(tt,et){if(isPrimitive(tt)||isPrimitive(et))return tt===et;if(isDateObject(tt)&&isDateObject(et))return tt.getTime()===et.getTime();const nt=Object.keys(tt),rt=Object.keys(et);if(nt.length!==rt.length)return!1;for(const it of nt){const ot=tt[it];if(!rt.includes(it))return!1;if(it!=="ref"){const at=et[it];if(isDateObject(ot)&&isDateObject(at)||isObject$f(ot)&&isObject$f(at)||Array.isArray(ot)&&Array.isArray(at)?!deepEqual$2(ot,at):ot!==at)return!1}}return!0}var isMultipleSelect=tt=>tt.type==="select-multiple",isRadioOrCheckbox=tt=>isRadioInput(tt)||isCheckBoxInput(tt),live=tt=>isHTMLElement$2(tt)&&tt.isConnected,objectHasFunction=tt=>{for(const et in tt)if(isFunction$6(tt[et]))return!0;return!1};function markFieldsDirty(tt,et={}){const nt=Array.isArray(tt);if(isObject$f(tt)||nt)for(const rt in tt)Array.isArray(tt[rt])||isObject$f(tt[rt])&&!objectHasFunction(tt[rt])?(et[rt]=Array.isArray(tt[rt])?[]:{},markFieldsDirty(tt[rt],et[rt])):isNullOrUndefined(tt[rt])||(et[rt]=!0);return et}function getDirtyFieldsFromDefaultValues(tt,et,nt){const rt=Array.isArray(tt);if(isObject$f(tt)||rt)for(const it in tt)Array.isArray(tt[it])||isObject$f(tt[it])&&!objectHasFunction(tt[it])?isUndefined$1(et)||isPrimitive(nt[it])?nt[it]=Array.isArray(tt[it])?markFieldsDirty(tt[it],[]):{...markFieldsDirty(tt[it])}:getDirtyFieldsFromDefaultValues(tt[it],isNullOrUndefined(et)?{}:et[it],nt[it]):nt[it]=!deepEqual$2(tt[it],et[it]);return nt}var getDirtyFields=(tt,et)=>getDirtyFieldsFromDefaultValues(tt,et,markFieldsDirty(et)),getFieldValueAs=(tt,{valueAsNumber:et,valueAsDate:nt,setValueAs:rt})=>isUndefined$1(tt)?tt:et?tt===""?NaN:tt&&+tt:nt&&isString$3(tt)?new Date(tt):rt?rt(tt):tt;function getFieldValue(tt){const et=tt.ref;if(!(tt.refs?tt.refs.every(nt=>nt.disabled):et.disabled))return isFileInput(et)?et.files:isRadioInput(et)?getRadioValue(tt.refs).value:isMultipleSelect(et)?[...et.selectedOptions].map(({value:nt})=>nt):isCheckBoxInput(et)?getCheckboxValue(tt.refs).value:getFieldValueAs(isUndefined$1(et.value)?tt.ref.value:et.value,tt)}var getResolverOptions=(tt,et,nt,rt)=>{const it={};for(const ot of tt){const at=get$5(et,ot);at&&set$3(it,ot,at._f)}return{criteriaMode:nt,names:[...tt],fields:it,shouldUseNativeValidation:rt}},getRuleValue=tt=>isUndefined$1(tt)?tt:isRegex(tt)?tt.source:isObject$f(tt)?isRegex(tt.value)?tt.value.source:tt.value:tt,hasValidation=tt=>tt.mount&&(tt.required||tt.min||tt.max||tt.maxLength||tt.minLength||tt.pattern||tt.validate);function schemaErrorLookup(tt,et,nt){const rt=get$5(tt,nt);if(rt||isKey$4(nt))return{error:rt,name:nt};const it=nt.split(".");for(;it.length;){const ot=it.join("."),at=get$5(et,ot),st=get$5(tt,ot);if(at&&!Array.isArray(at)&&nt!==ot)return{name:nt};if(st&&st.type)return{name:ot,error:st};it.pop()}return{name:nt}}var skipValidation=(tt,et,nt,rt,it)=>it.isOnAll?!1:!nt&&it.isOnTouch?!(et||tt):(nt?rt.isOnBlur:it.isOnBlur)?!tt:(nt?rt.isOnChange:it.isOnChange)?tt:!0,unsetEmptyArray=(tt,et)=>!compact(get$5(tt,et)).length&&unset(tt,et);const defaultOptions={mode:VALIDATION_MODE.onSubmit,reValidateMode:VALIDATION_MODE.onChange,shouldFocusError:!0};function createFormControl(tt={},et){let nt={...defaultOptions,...tt},rt={submitCount:0,isDirty:!1,isLoading:isFunction$6(nt.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},it={},ot=isObject$f(nt.defaultValues)||isObject$f(nt.values)?cloneObject(nt.defaultValues||nt.values)||{}:{},at=nt.shouldUnregister?{}:cloneObject(ot),st={action:!1,mount:!1,watch:!1},lt={mount:new Set,unMount:new Set,array:new Set,watch:new Set},ct,ut=0;const ht={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},dt={values:createSubject(),array:createSubject(),state:createSubject()},pt=tt.resetOptions&&tt.resetOptions.keepDirtyValues,mt=getValidationModes(nt.mode),gt=getValidationModes(nt.reValidateMode),yt=nt.criteriaMode===VALIDATION_MODE.all,bt=Tn=>cn=>{clearTimeout(ut),ut=setTimeout(Tn,cn)},vt=async Tn=>{if(ht.isValid||Tn){const cn=nt.resolver?isEmptyObject((await $t()).errors):await jt(it,!0);cn!==rt.isValid&&dt.state.next({isValid:cn})}},xt=Tn=>ht.isValidating&&dt.state.next({isValidating:Tn}),kt=(Tn,cn=[],mn,In,An=!0,wn=!0)=>{if(In&&mn){if(st.action=!0,wn&&Array.isArray(get$5(it,Tn))){const fn=mn(get$5(it,Tn),In.argA,In.argB);An&&set$3(it,Tn,fn)}if(wn&&Array.isArray(get$5(rt.errors,Tn))){const fn=mn(get$5(rt.errors,Tn),In.argA,In.argB);An&&set$3(rt.errors,Tn,fn),unsetEmptyArray(rt.errors,Tn)}if(ht.touchedFields&&wn&&Array.isArray(get$5(rt.touchedFields,Tn))){const fn=mn(get$5(rt.touchedFields,Tn),In.argA,In.argB);An&&set$3(rt.touchedFields,Tn,fn)}ht.dirtyFields&&(rt.dirtyFields=getDirtyFields(ot,at)),dt.state.next({name:Tn,isDirty:Ct(Tn,cn),dirtyFields:rt.dirtyFields,errors:rt.errors,isValid:rt.isValid})}else set$3(at,Tn,cn)},St=(Tn,cn)=>{set$3(rt.errors,Tn,cn),dt.state.next({errors:rt.errors})},Tt=(Tn,cn,mn,In)=>{const An=get$5(it,Tn);if(An){const wn=get$5(at,Tn,isUndefined$1(mn)?get$5(ot,Tn):mn);isUndefined$1(wn)||In&&In.defaultChecked||cn?set$3(at,Tn,cn?wn:getFieldValue(An._f)):Ot(Tn,wn),st.mount&&vt()}},At=(Tn,cn,mn,In,An)=>{let wn=!1,fn=!1;const pn={name:Tn};if(!mn||In){ht.isDirty&&(fn=rt.isDirty,rt.isDirty=pn.isDirty=Ct(),wn=fn!==pn.isDirty);const kn=deepEqual$2(get$5(ot,Tn),cn);fn=get$5(rt.dirtyFields,Tn),kn?unset(rt.dirtyFields,Tn):set$3(rt.dirtyFields,Tn,!0),pn.dirtyFields=rt.dirtyFields,wn=wn||ht.dirtyFields&&fn!==!kn}if(mn){const kn=get$5(rt.touchedFields,Tn);kn||(set$3(rt.touchedFields,Tn,mn),pn.touchedFields=rt.touchedFields,wn=wn||ht.touchedFields&&kn!==mn)}return wn&&An&&dt.state.next(pn),wn?pn:{}},Et=(Tn,cn,mn,In)=>{const An=get$5(rt.errors,Tn),wn=ht.isValid&&isBoolean$2(cn)&&rt.isValid!==cn;if(tt.delayError&&mn?(ct=bt(()=>St(Tn,mn)),ct(tt.delayError)):(clearTimeout(ut),ct=null,mn?set$3(rt.errors,Tn,mn):unset(rt.errors,Tn)),(mn?!deepEqual$2(An,mn):An)||!isEmptyObject(In)||wn){const fn={...In,...wn&&isBoolean$2(cn)?{isValid:cn}:{},errors:rt.errors,name:Tn};rt={...rt,...fn},dt.state.next(fn)}xt(!1)},$t=async Tn=>nt.resolver(at,nt.context,getResolverOptions(Tn||lt.mount,it,nt.criteriaMode,nt.shouldUseNativeValidation)),Dt=async Tn=>{const{errors:cn}=await $t(Tn);if(Tn)for(const mn of Tn){const In=get$5(cn,mn);In?set$3(rt.errors,mn,In):unset(rt.errors,mn)}else rt.errors=cn;return cn},jt=async(Tn,cn,mn={valid:!0})=>{for(const In in Tn){const An=Tn[In];if(An){const{_f:wn,...fn}=An;if(wn){const pn=lt.array.has(wn.name),kn=await validateField(An,at,yt,nt.shouldUseNativeValidation&&!cn,pn);if(kn[wn.name]&&(mn.valid=!1,cn))break;!cn&&(get$5(kn,wn.name)?pn?updateFieldArrayRootError(rt.errors,kn,wn.name):set$3(rt.errors,wn.name,kn[wn.name]):unset(rt.errors,wn.name))}fn&&await jt(fn,cn,mn)}}return mn.valid},Pt=()=>{for(const Tn of lt.unMount){const cn=get$5(it,Tn);cn&&(cn._f.refs?cn._f.refs.every(mn=>!live(mn)):!live(cn._f.ref))&&Kt(Tn)}lt.unMount=new Set},Ct=(Tn,cn)=>(Tn&&cn&&set$3(at,Tn,cn),!deepEqual$2(Ut(),ot)),wt=(Tn,cn,mn)=>generateWatchOutput(Tn,lt,{...st.mount?at:isUndefined$1(cn)?ot:isString$3(Tn)?{[Tn]:cn}:cn},mn,cn),It=Tn=>compact(get$5(st.mount?at:ot,Tn,tt.shouldUnregister?get$5(ot,Tn,[]):[])),Ot=(Tn,cn,mn={})=>{const In=get$5(it,Tn);let An=cn;if(In){const wn=In._f;wn&&(!wn.disabled&&set$3(at,Tn,getFieldValueAs(cn,wn)),An=isHTMLElement$2(wn.ref)&&isNullOrUndefined(cn)?"":cn,isMultipleSelect(wn.ref)?[...wn.ref.options].forEach(fn=>fn.selected=An.includes(fn.value)):wn.refs?isCheckBoxInput(wn.ref)?wn.refs.length>1?wn.refs.forEach(fn=>(!fn.defaultChecked||!fn.disabled)&&(fn.checked=Array.isArray(An)?!!An.find(pn=>pn===fn.value):An===fn.value)):wn.refs[0]&&(wn.refs[0].checked=!!An):wn.refs.forEach(fn=>fn.checked=fn.value===An):isFileInput(wn.ref)?wn.ref.value="":(wn.ref.value=An,wn.ref.type||dt.values.next({name:Tn,values:{...at}})))}(mn.shouldDirty||mn.shouldTouch)&&At(Tn,An,mn.shouldTouch,mn.shouldDirty,!0),mn.shouldValidate&&Nt(Tn)},Wt=(Tn,cn,mn)=>{for(const In in cn){const An=cn[In],wn=`${Tn}.${In}`,fn=get$5(it,wn);(lt.array.has(Tn)||!isPrimitive(An)||fn&&!fn._f)&&!isDateObject(An)?Wt(wn,An,mn):Ot(wn,An,mn)}},zt=(Tn,cn,mn={})=>{const In=get$5(it,Tn),An=lt.array.has(Tn),wn=cloneObject(cn);set$3(at,Tn,wn),An?(dt.array.next({name:Tn,values:{...at}}),(ht.isDirty||ht.dirtyFields)&&mn.shouldDirty&&dt.state.next({name:Tn,dirtyFields:getDirtyFields(ot,at),isDirty:Ct(Tn,wn)})):In&&!In._f&&!isNullOrUndefined(wn)?Wt(Tn,wn,mn):Ot(Tn,wn,mn),isWatched(Tn,lt)&&dt.state.next({...rt}),dt.values.next({name:Tn,values:{...at}}),!st.mount&&et()},Ft=async Tn=>{const cn=Tn.target;let mn=cn.name,In=!0;const An=get$5(it,mn),wn=()=>cn.type?getFieldValue(An._f):getEventValue(Tn);if(An){let fn,pn;const kn=wn(),Dn=Tn.type===EVENTS.BLUR||Tn.type===EVENTS.FOCUS_OUT,un=!hasValidation(An._f)&&!nt.resolver&&!get$5(rt.errors,mn)&&!An._f.deps||skipValidation(Dn,get$5(rt.touchedFields,mn),rt.isSubmitted,gt,mt),Zt=isWatched(mn,lt,Dn);set$3(at,mn,kn),Dn?(An._f.onBlur&&An._f.onBlur(Tn),ct&&ct(0)):An._f.onChange&&An._f.onChange(Tn);const Xt=At(mn,kn,Dn,!1),Sn=!isEmptyObject(Xt)||Zt;if(!Dn&&dt.values.next({name:mn,type:Tn.type,values:{...at}}),un)return ht.isValid&&vt(),Sn&&dt.state.next({name:mn,...Zt?{}:Xt});if(!Dn&&Zt&&dt.state.next({...rt}),xt(!0),nt.resolver){const{errors:Rn}=await $t([mn]),jn=schemaErrorLookup(rt.errors,it,mn),On=schemaErrorLookup(Rn,it,jn.name||mn);fn=On.error,mn=On.name,pn=isEmptyObject(Rn)}else fn=(await validateField(An,at,yt,nt.shouldUseNativeValidation))[mn],In=Number.isNaN(kn)||kn===get$5(at,mn,kn),In&&(fn?pn=!1:ht.isValid&&(pn=await jt(it,!0)));In&&(An._f.deps&&Nt(An._f.deps),Et(mn,pn,fn,Xt))}},Nt=async(Tn,cn={})=>{let mn,In;const An=convertToArrayPayload(Tn);if(xt(!0),nt.resolver){const wn=await Dt(isUndefined$1(Tn)?Tn:An);mn=isEmptyObject(wn),In=Tn?!An.some(fn=>get$5(wn,fn)):mn}else Tn?(In=(await Promise.all(An.map(async wn=>{const fn=get$5(it,wn);return await jt(fn&&fn._f?{[wn]:fn}:fn)}))).every(Boolean),!(!In&&!rt.isValid)&&vt()):In=mn=await jt(it);return dt.state.next({...!isString$3(Tn)||ht.isValid&&mn!==rt.isValid?{}:{name:Tn},...nt.resolver||!Tn?{isValid:mn}:{},errors:rt.errors,isValidating:!1}),cn.shouldFocus&&!In&&focusFieldBy(it,wn=>wn&&get$5(rt.errors,wn),Tn?An:lt.mount),In},Ut=Tn=>{const cn={...ot,...st.mount?at:{}};return isUndefined$1(Tn)?cn:isString$3(Tn)?get$5(cn,Tn):Tn.map(mn=>get$5(cn,mn))},Mt=(Tn,cn)=>({invalid:!!get$5((cn||rt).errors,Tn),isDirty:!!get$5((cn||rt).dirtyFields,Tn),isTouched:!!get$5((cn||rt).touchedFields,Tn),error:get$5((cn||rt).errors,Tn)}),Ht=Tn=>{Tn&&convertToArrayPayload(Tn).forEach(cn=>unset(rt.errors,cn)),dt.state.next({errors:Tn?rt.errors:{}})},en=(Tn,cn,mn)=>{const In=(get$5(it,Tn,{_f:{}})._f||{}).ref;set$3(rt.errors,Tn,{...cn,ref:In}),dt.state.next({name:Tn,errors:rt.errors,isValid:!1}),mn&&mn.shouldFocus&&In&&In.focus&&In.focus()},sn=(Tn,cn)=>isFunction$6(Tn)?dt.values.subscribe({next:mn=>Tn(wt(void 0,cn),mn)}):wt(Tn,cn,!0),Kt=(Tn,cn={})=>{for(const mn of Tn?convertToArrayPayload(Tn):lt.mount)lt.mount.delete(mn),lt.array.delete(mn),cn.keepValue||(unset(it,mn),unset(at,mn)),!cn.keepError&&unset(rt.errors,mn),!cn.keepDirty&&unset(rt.dirtyFields,mn),!cn.keepTouched&&unset(rt.touchedFields,mn),!nt.shouldUnregister&&!cn.keepDefaultValue&&unset(ot,mn);dt.values.next({values:{...at}}),dt.state.next({...rt,...cn.keepDirty?{isDirty:Ct()}:{}}),!cn.keepIsValid&&vt()},rn=({disabled:Tn,name:cn,field:mn,fields:In})=>{if(isBoolean$2(Tn)){const An=Tn?void 0:get$5(at,cn,getFieldValue(mn?mn._f:get$5(In,cn)._f));set$3(at,cn,An),At(cn,An,!1,!1,!0)}},nn=(Tn,cn={})=>{let mn=get$5(it,Tn);const In=isBoolean$2(cn.disabled);return set$3(it,Tn,{...mn||{},_f:{...mn&&mn._f?mn._f:{ref:{name:Tn}},name:Tn,mount:!0,...cn}}),lt.mount.add(Tn),mn?rn({field:mn,disabled:cn.disabled,name:Tn}):Tt(Tn,!0,cn.value),{...In?{disabled:cn.disabled}:{},...nt.progressive?{required:!!cn.required,min:getRuleValue(cn.min),max:getRuleValue(cn.max),minLength:getRuleValue(cn.minLength),maxLength:getRuleValue(cn.maxLength),pattern:getRuleValue(cn.pattern)}:{},name:Tn,onChange:Ft,onBlur:Ft,ref:An=>{if(An){nn(Tn,cn),mn=get$5(it,Tn);const wn=isUndefined$1(An.value)&&An.querySelectorAll&&An.querySelectorAll("input,select,textarea")[0]||An,fn=isRadioOrCheckbox(wn),pn=mn._f.refs||[];if(fn?pn.find(kn=>kn===wn):wn===mn._f.ref)return;set$3(it,Tn,{_f:{...mn._f,...fn?{refs:[...pn.filter(live),wn,...Array.isArray(get$5(ot,Tn))?[{}]:[]],ref:{type:wn.type,name:Tn}}:{ref:wn}}}),Tt(Tn,!1,void 0,wn)}else mn=get$5(it,Tn,{}),mn._f&&(mn._f.mount=!1),(nt.shouldUnregister||cn.shouldUnregister)&&!(isNameInFieldArray(lt.array,Tn)&&st.action)&<.unMount.add(Tn)}}},hn=()=>nt.shouldFocusError&&focusFieldBy(it,Tn=>Tn&&get$5(rt.errors,Tn),lt.mount),vn=(Tn,cn)=>async mn=>{mn&&(mn.preventDefault&&mn.preventDefault(),mn.persist&&mn.persist());let In=cloneObject(at);if(dt.state.next({isSubmitting:!0}),nt.resolver){const{errors:An,values:wn}=await $t();rt.errors=An,In=wn}else await jt(it);unset(rt.errors,"root"),isEmptyObject(rt.errors)?(dt.state.next({errors:{}}),await Tn(In,mn)):(cn&&await cn({...rt.errors},mn),hn(),setTimeout(hn)),dt.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:isEmptyObject(rt.errors),submitCount:rt.submitCount+1,errors:rt.errors})},an=(Tn,cn={})=>{get$5(it,Tn)&&(isUndefined$1(cn.defaultValue)?zt(Tn,get$5(ot,Tn)):(zt(Tn,cn.defaultValue),set$3(ot,Tn,cn.defaultValue)),cn.keepTouched||unset(rt.touchedFields,Tn),cn.keepDirty||(unset(rt.dirtyFields,Tn),rt.isDirty=cn.defaultValue?Ct(Tn,get$5(ot,Tn)):Ct()),cn.keepError||(unset(rt.errors,Tn),ht.isValid&&vt()),dt.state.next({...rt}))},Qt=(Tn,cn={})=>{const mn=Tn?cloneObject(Tn):ot,In=cloneObject(mn),An=Tn&&!isEmptyObject(Tn)?In:ot;if(cn.keepDefaultValues||(ot=mn),!cn.keepValues){if(cn.keepDirtyValues||pt)for(const wn of lt.mount)get$5(rt.dirtyFields,wn)?set$3(An,wn,get$5(at,wn)):zt(wn,get$5(An,wn));else{if(isWeb&&isUndefined$1(Tn))for(const wn of lt.mount){const fn=get$5(it,wn);if(fn&&fn._f){const pn=Array.isArray(fn._f.refs)?fn._f.refs[0]:fn._f.ref;if(isHTMLElement$2(pn)){const kn=pn.closest("form");if(kn){kn.reset();break}}}}it={}}at=tt.shouldUnregister?cn.keepDefaultValues?cloneObject(ot):{}:cloneObject(An),dt.array.next({values:{...An}}),dt.values.next({values:{...An}})}lt={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!st.mount&&et(),st.mount=!ht.isValid||!!cn.keepIsValid,st.watch=!!tt.shouldUnregister,dt.state.next({submitCount:cn.keepSubmitCount?rt.submitCount:0,isDirty:cn.keepDirty?rt.isDirty:!!(cn.keepDefaultValues&&!deepEqual$2(Tn,ot)),isSubmitted:cn.keepIsSubmitted?rt.isSubmitted:!1,dirtyFields:cn.keepDirtyValues?rt.dirtyFields:cn.keepDefaultValues&&Tn?getDirtyFields(ot,Tn):{},touchedFields:cn.keepTouched?rt.touchedFields:{},errors:cn.keepErrors?rt.errors:{},isSubmitSuccessful:cn.keepIsSubmitSuccessful?rt.isSubmitSuccessful:!1,isSubmitting:!1})},_n=(Tn,cn)=>Qt(isFunction$6(Tn)?Tn(at):Tn,cn);return{control:{register:nn,unregister:Kt,getFieldState:Mt,handleSubmit:vn,setError:en,_executeSchema:$t,_getWatch:wt,_getDirty:Ct,_updateValid:vt,_removeUnmounted:Pt,_updateFieldArray:kt,_updateDisabledField:rn,_getFieldArray:It,_reset:Qt,_resetDefaultValues:()=>isFunction$6(nt.defaultValues)&&nt.defaultValues().then(Tn=>{_n(Tn,nt.resetOptions),dt.state.next({isLoading:!1})}),_updateFormState:Tn=>{rt={...rt,...Tn}},_subjects:dt,_proxyFormState:ht,get _fields(){return it},get _formValues(){return at},get _state(){return st},set _state(Tn){st=Tn},get _defaultValues(){return ot},get _names(){return lt},set _names(Tn){lt=Tn},get _formState(){return rt},set _formState(Tn){rt=Tn},get _options(){return nt},set _options(Tn){nt={...nt,...Tn}}},trigger:Nt,register:nn,handleSubmit:vn,watch:sn,setValue:zt,getValues:Ut,reset:_n,resetField:an,clearErrors:Ht,unregister:Kt,setError:en,setFocus:(Tn,cn={})=>{const mn=get$5(it,Tn),In=mn&&mn._f;if(In){const An=In.refs?In.refs[0]:In.ref;An.focus&&(An.focus(),cn.shouldSelect&&An.select())}},getFieldState:Mt}}function useForm(tt={}){const et=React$1.useRef(),nt=React$1.useRef(),[rt,it]=React$1.useState({isDirty:!1,isValidating:!1,isLoading:isFunction$6(tt.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:isFunction$6(tt.defaultValues)?void 0:tt.defaultValues});et.current||(et.current={...createFormControl(tt,()=>it(at=>({...at}))),formState:rt});const ot=et.current.control;return ot._options=tt,useSubscribe({subject:ot._subjects.state,next:at=>{shouldRenderFormState(at,ot._proxyFormState,ot._updateFormState,!0)&&it({...ot._formState})}}),React$1.useEffect(()=>{tt.values&&!deepEqual$2(tt.values,nt.current)?(ot._reset(tt.values,ot._options.resetOptions),nt.current=tt.values):ot._resetDefaultValues()},[tt.values,ot]),React$1.useEffect(()=>{ot._state.mount||(ot._updateValid(),ot._state.mount=!0),ot._state.watch&&(ot._state.watch=!1,ot._subjects.state.next({...ot._formState})),ot._removeUnmounted()}),et.current.formState=getProxyFormState(rt,ot),et.current}const ReactToastify="";var dist$3={exports:{}},lib$4={},postMessage$2={};Object.defineProperty(postMessage$2,"__esModule",{value:!0});postMessage$2.removeEventer=postMessage$2.addEventer=postMessage$2.postMessage=void 0;function postMessage$1(tt){var et=window;if(et.sendToElectron)return et.sendToElectron("sphinx-bridge",tt);et.ReactNativeWebView&&et.ReactNativeWebView.postMessage?et.ReactNativeWebView.postMessage(JSON.stringify(tt)):et.webkit&&et.webkit.messageHandlers&&et.webkit.messageHandlers.sphinx&&et.webkit.messageHandlers.sphinx?et.webkit.messageHandlers.sphinx.postMessage(tt):et.Android?et.Android.receiveMessage(JSON.stringify(tt)):et.parent.postMessage(tt,"*")}postMessage$2.postMessage=postMessage$1;function addEventer(tt){var et=window;if(et.sendToElectron){et.EE&&et.EE.once("sphinx-bridge",tt);return}else et.ReactNativeWebView&&et.ReactNativeWebView.postMessage?document.addEventListener("message",function(nt){var rt={};try{rt=JSON.parse(nt.data)}catch{}tt({data:rt})}):et.webkit&&et.webkit.messageHandlers&&et.webkit.messageHandlers.sphinx&&et.webkit.messageHandlers.sphinx?et.sphinxMessage=function(nt){var rt={};try{rt=JSON.parse(nt)}catch{}tt({data:rt})}:et.Android?et.sphinxMessage=function(nt){var rt={};try{rt=JSON.parse(nt)}catch{}tt({data:rt})}:et.addEventListener("message",tt)}postMessage$2.addEventer=addEventer;function removeEventer(tt){var et=window;et.sendToElectron||(et.ReactNativeWebView&&et.ReactNativeWebView.postMessage?document.removeEventListener("message",tt):et.webkit&&et.webkit.messageHandlers&&et.webkit.messageHandlers.sphinx&&et.webkit.messageHandlers.sphinx||et.Android?et.sphinxMessage=null:et.removeEventListener("message",tt))}postMessage$2.removeEventer=removeEventer;(function(tt){var et=commonjsGlobal&&commonjsGlobal.__assign||function(){return et=Object.assign||function(lt){for(var ct,ut=1,ht=arguments.length;ut0&&pt[pt.length-1])&&(bt[0]===6||bt[0]===2)){ut=0;continue}if(bt[0]===3&&(!pt||bt[1]>pt[0]&&bt[1] ENABLE!"),this.isEnabled)return[2,{budget:this.budget,pubkey:this.pubkey,application:at}];pt.label=1;case 1:return pt.trys.push([1,3,,4]),[4,this.postMsg(ot.AUTHORIZE)];case 2:return ut=pt.sent(),ht=ut.budget||ut.budget===0,ht&&ut.pubkey?(this.isEnabled=!0,this.budget=ut.budget,this.pubkey=ut.pubkey,[2,ut]):[3,4];case 3:return dt=pt.sent(),this.logging&&console.log(dt),[3,4];case 4:return[2,null]}})})},lt.prototype.authorize=function(ct,ut,ht){return nt(this,void 0,void 0,function(){var dt,pt,mt,gt;return rt(this,function(yt){switch(yt.label){case 0:ht&&(this.logging=!0),this.logging&&console.log("=> AUTHORIZE!"),yt.label=1;case 1:return yt.trys.push([1,3,,4]),dt=ut||!1,[4,this.postMsg(ot.AUTHORIZE,{challenge:ct,noBudget:dt})];case 2:return pt=yt.sent(),mt=pt.budget||pt.budget===0,(dt||mt)&&pt.pubkey?(this.isEnabled=!0,this.budget=pt.budget||0,this.pubkey=pt.pubkey,[2,pt]):[3,4];case 3:return gt=yt.sent(),this.logging&&console.log(gt),[3,4];case 4:return[2,null]}})})},lt.prototype.topup=function(){return nt(this,void 0,void 0,function(){var ct,ut,ht;return rt(this,function(dt){switch(dt.label){case 0:this.logging&&console.log("=> TOP UP"),dt.label=1;case 1:return dt.trys.push([1,3,,4]),[4,this.postMsg(ot.AUTHORIZE)];case 2:return ct=dt.sent(),ut=ct.budget||ct.budget===0,ut&&ct.pubkey?(this.budget=ct.budget,this.pubkey=ct.pubkey,[2,ct]):[3,4];case 3:return ht=dt.sent(),this.logging&&console.log(ht),[3,4];case 4:return[2,null]}})})},lt.prototype.keysend=function(ct,ut){return nt(this,void 0,void 0,function(){var ht,dt,pt;return rt(this,function(mt){switch(mt.label){case 0:if(this.logging&&console.log("=> KEYSEND"),!this.isEnabled)return[2,null];if(!ct||!ut)return[2,null];if(ct.length!==66)return[2,null];if(ut<1)return[2,null];if(ut>this.budget)return[2,null];mt.label=1;case 1:return mt.trys.push([1,3,,4]),ht={dest:ct,amt:ut},[4,this.postMsg(ot.KEYSEND,ht)];case 2:return dt=mt.sent(),dt&&dt.success&&(this.budget=this.budget-ut,dt.budget=this.budget),[2,dt];case 3:return pt=mt.sent(),this.logging&&console.log(pt),[2,null];case 4:return[2]}})})},lt.prototype.updated=function(){return nt(this,void 0,void 0,function(){var ct,ut;return rt(this,function(ht){switch(ht.label){case 0:if(this.logging&&console.log("=> UDPATED"),!this.isEnabled)return[2,null];ht.label=1;case 1:return ht.trys.push([1,3,,4]),[4,this.postMsg(ot.UPDATED)];case 2:return ct=ht.sent(),[2,ct];case 3:return ut=ht.sent(),this.logging&&console.log(ut),[2,null];case 4:return[2]}})})},lt.prototype.sendPayment=function(ct){return nt(this,void 0,void 0,function(){var ut,ht;return rt(this,function(dt){switch(dt.label){case 0:if(this.logging&&console.log("=> SEND PAYMENT"),!this.isEnabled)return[2,null];dt.label=1;case 1:return dt.trys.push([1,3,,4]),[4,this.postMsg(ot.PAYMENT,{paymentRequest:ct})];case 2:return ut=dt.sent(),[2,ut];case 3:return ht=dt.sent(),this.logging&&console.log(ht),[2,null];case 4:return[2]}})})},lt.prototype.saveLsat=function(ct,ut,ht){return nt(this,void 0,void 0,function(){var dt,pt;return rt(this,function(mt){switch(mt.label){case 0:this.logging&&console.log("=> SAVE LSAT"),mt.label=1;case 1:return mt.trys.push([1,3,,4]),[4,this.postMsg(ot.LSAT,{paymentRequest:ct,macaroon:ut,issuer:ht})];case 2:return dt=mt.sent(),[2,dt];case 3:return pt=mt.sent(),this.logging&&console.log(pt),[2,pt];case 4:return[2]}})})},lt.prototype.getLsat=function(ct){return nt(this,void 0,void 0,function(){var ut,ht;return rt(this,function(dt){switch(dt.label){case 0:if(this.logging&&console.log("=> GET LSAT"),!this.isEnabled)return[2,null];dt.label=1;case 1:return dt.trys.push([1,3,,4]),[4,this.postMsg(ot.GETLSAT,{issuer:ct})];case 2:return ut=dt.sent(),[2,ut];case 3:return ht=dt.sent(),this.logging&&console.log(ht),[2,ht];case 4:return[2]}})})},lt.prototype.updateLsat=function(ct,ut){return nt(this,void 0,void 0,function(){var ht,dt;return rt(this,function(pt){switch(pt.label){case 0:if(this.logging&&console.log("=> UPDATE LSAT"),!this.isEnabled)return[2,null];pt.label=1;case 1:return pt.trys.push([1,3,,4]),[4,this.postMsg(ot.UPDATELSAT,{identifier:ct,status:ut})];case 2:return ht=pt.sent(),[2,ht];case 3:return dt=pt.sent(),this.logging&&console.log(dt),[2,dt];case 4:return[2]}})})},lt.prototype.makeInvoice=function(ct,ut){return nt(this,void 0,void 0,function(){var ht,dt;return rt(this,function(pt){switch(pt.label){case 0:if(this.logging&&console.log("=> MAKE INVOICE"),!this.isEnabled)return[2,null];pt.label=1;case 1:return pt.trys.push([1,3,,4]),[4,this.postMsg(ot.INVOICE,{amt:ct,memo:ut})];case 2:return ht=pt.sent(),[2,ht];case 3:return dt=pt.sent(),this.logging&&console.log(dt),[2,null];case 4:return[2]}})})},lt.prototype.signMessage=function(ct){return nt(this,void 0,void 0,function(){var ut,ht;return rt(this,function(dt){switch(dt.label){case 0:if(this.logging&&console.log("=> SIGN MESSAGE"),!this.isEnabled)return[2,null];dt.label=1;case 1:return dt.trys.push([1,3,,4]),[4,this.postMsg(ot.SIGN,{message:ct})];case 2:return ut=dt.sent(),[2,ut];case 3:return ht=dt.sent(),this.logging&&console.log(ht),[2,null];case 4:return[2]}})})},lt.prototype.verifyMessage=function(ct,ut){return nt(this,void 0,void 0,function(){var ht,dt;return rt(this,function(pt){switch(pt.label){case 0:if(this.logging&&console.log("=> VERIFY MESSAGE"),!this.isEnabled)return[2,null];pt.label=1;case 1:return pt.trys.push([1,3,,4]),[4,this.postMsg(ot.SIGN,{signature:ct,message:ut})];case 2:return ht=pt.sent(),[2,ht];case 3:return dt=pt.sent(),this.logging&&console.log(dt),[2,null];case 4:return[2]}})})},lt.prototype.reload=function(ct){return nt(this,void 0,void 0,function(){var ut,ht,dt;return rt(this,function(pt){switch(pt.label){case 0:this.logging&&console.log("=> RELOAD"),pt.label=1;case 1:return pt.trys.push([1,3,,4]),[4,this.postMsg(ot.RELOAD,{password:ct})];case 2:return ut=pt.sent(),ht=ut.budget||ut.budget===0,ht&&ut.pubkey?(this.isEnabled=!0,this.budget=ut.budget,this.pubkey=ut.pubkey,[2,ut]):[3,4];case 3:return dt=pt.sent(),this.logging&&console.log(dt),[3,4];case 4:return[2,null]}})})},lt.prototype.saveGraphData=function(ct){return nt(this,void 0,void 0,function(){var ut,ht;return rt(this,function(dt){switch(dt.label){case 0:if(this.logging&&console.log("=> SAVEDATA"),!this.isEnabled)return[2,null];dt.label=1;case 1:return dt.trys.push([1,3,,4]),[4,this.postMsg(ot.SAVEDATA,{data:{type:ct.type,metaData:ct.metaData}})];case 2:return ut=dt.sent(),[2,ut];case 3:return ht=dt.sent(),this.logging&&console.log(ht),[2,null];case 4:return[2]}})})},lt.prototype.getPersonData=function(){return nt(this,void 0,void 0,function(){var ct,ut;return rt(this,function(ht){switch(ht.label){case 0:if(this.logging&&console.log("=> GETPERSONDATA"),!this.isEnabled)return[2,null];ht.label=1;case 1:return ht.trys.push([1,3,,4]),[4,this.postMsg(ot.GETPERSONDATA)];case 2:return ct=ht.sent(),[2,ct];case 3:return ut=ht.sent(),this.logging&&console.log(ut),[2,null];case 4:return[2]}})})},lt.prototype.getBudget=function(){return nt(this,void 0,void 0,function(){var ct,ut;return rt(this,function(ht){switch(ht.label){case 0:if(this.logging&&console.log("=> GETBUDGET"),!this.isEnabled)return[2,null];ht.label=1;case 1:return ht.trys.push([1,3,,4]),[4,this.postMsg(ot.GETBUDGET)];case 2:return ct=ht.sent(),[2,ct];case 3:return ut=ht.sent(),this.logging&&console.log(ut),[2,null];case 4:return[2]}})})},lt.prototype.postMsg=function(ct,ut){var ht=this;return ht.active&&Promise.reject(new Error("User is busy")),ht.active=ct,new Promise(function(dt,pt){it.postMessage(et({application:at,type:ct},ut||{}));function mt(gt){!gt.data||gt.data.application!==at||(gt.data.error?(ht.active=null,pt(gt.data.error)):(ht.active=null,dt(gt.data)),it.removeEventer(mt))}it.addEventer(mt)})},lt}();tt.default=st})(lib$4);var dist$2=dist$3.exports;Object.defineProperty(dist$2,"__esModule",{value:!0});var lib_1=lib$4,sphinx=new lib_1.default;dist$3.exports=sphinx;var distExports$1=dist$3.exports,reactIs$3={exports:{}},reactIs_production_min$2={};/** * @license React * react-is.production.min.js * @@ -119,7 +119,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * @license MIT * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */function styled$3(tt,et){return newStyled(tt,et)}const internal_processStyles=(tt,et)=>{Array.isArray(tt.__emotion_styles)&&(tt.__emotion_styles=et(tt.__emotion_styles))},_excluded$1J=["values","unit","step"],sortBreakpointsValues=tt=>{const et=Object.keys(tt).map(nt=>({key:nt,val:tt[nt]}))||[];return et.sort((nt,rt)=>nt.val-rt.val),et.reduce((nt,rt)=>_extends$u({},nt,{[rt.key]:rt.val}),{})};function createBreakpoints(tt){const{values:et={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:nt="px",step:rt=5}=tt,it=_objectWithoutPropertiesLoose$m(tt,_excluded$1J),ot=sortBreakpointsValues(et),at=Object.keys(ot);function st(dt){return`@media (min-width:${typeof et[dt]=="number"?et[dt]:dt}${nt})`}function lt(dt){return`@media (max-width:${(typeof et[dt]=="number"?et[dt]:dt)-rt/100}${nt})`}function ct(dt,pt){const mt=at.indexOf(pt);return`@media (min-width:${typeof et[dt]=="number"?et[dt]:dt}${nt}) and (max-width:${(mt!==-1&&typeof et[at[mt]]=="number"?et[at[mt]]:pt)-rt/100}${nt})`}function ut(dt){return at.indexOf(dt)+1`@media (min-width:${values$1[tt]}px)`};function handleBreakpoints(tt,et,nt){const rt=tt.theme||{};if(Array.isArray(et)){const ot=rt.breakpoints||defaultBreakpoints;return et.reduce((at,st,lt)=>(at[ot.up(ot.keys[lt])]=nt(et[lt]),at),{})}if(typeof et=="object"){const ot=rt.breakpoints||defaultBreakpoints;return Object.keys(et).reduce((at,st)=>{if(Object.keys(ot.values||values$1).indexOf(st)!==-1){const lt=ot.up(st);at[lt]=nt(et[st],st)}else{const lt=st;at[lt]=et[lt]}return at},{})}return nt(et)}function createEmptyBreakpointObject(tt={}){var et;return((et=tt.keys)==null?void 0:et.reduce((rt,it)=>{const ot=tt.up(it);return rt[ot]={},rt},{}))||{}}function removeUnusedBreakpoints(tt,et){return tt.reduce((nt,rt)=>{const it=nt[rt];return(!it||Object.keys(it).length===0)&&delete nt[rt],nt},et)}function mergeBreakpointsInOrder(tt,...et){const nt=createEmptyBreakpointObject(tt),rt=[nt,...et].reduce((it,ot)=>deepmerge$1(it,ot),{});return removeUnusedBreakpoints(Object.keys(nt),rt)}function computeBreakpointsBase(tt,et){if(typeof tt!="object")return{};const nt={},rt=Object.keys(et);return Array.isArray(tt)?rt.forEach((it,ot)=>{ot{tt[it]!=null&&(nt[it]=!0)}),nt}function resolveBreakpointValues({values:tt,breakpoints:et,base:nt}){const rt=nt||computeBreakpointsBase(tt,et),it=Object.keys(rt);if(it.length===0)return tt;let ot;return it.reduce((at,st,lt)=>(Array.isArray(tt)?(at[st]=tt[lt]!=null?tt[lt]:tt[ot],ot=lt):typeof tt=="object"?(at[st]=tt[st]!=null?tt[st]:tt[ot],ot=st):at[st]=tt,at),{})}function getPath$2(tt,et,nt=!0){if(!et||typeof et!="string")return null;if(tt&&tt.vars&&nt){const rt=`vars.${et}`.split(".").reduce((it,ot)=>it&&it[ot]?it[ot]:null,tt);if(rt!=null)return rt}return et.split(".").reduce((rt,it)=>rt&&rt[it]!=null?rt[it]:null,tt)}function getStyleValue$1(tt,et,nt,rt=nt){let it;return typeof tt=="function"?it=tt(nt):Array.isArray(tt)?it=tt[nt]||rt:it=getPath$2(tt,nt)||rt,et&&(it=et(it,rt,tt)),it}function style$5(tt){const{prop:et,cssProperty:nt=tt.prop,themeKey:rt,transform:it}=tt,ot=at=>{if(at[et]==null)return null;const st=at[et],lt=at.theme,ct=getPath$2(lt,rt)||{};return handleBreakpoints(at,st,ht=>{let dt=getStyleValue$1(ct,it,ht);return ht===dt&&typeof ht=="string"&&(dt=getStyleValue$1(ct,it,`${et}${ht==="default"?"":capitalize(ht)}`,ht)),nt===!1?dt:{[nt]:dt}})};return ot.propTypes={},ot.filterProps=[et],ot}function memoize$3(tt){const et={};return nt=>(et[nt]===void 0&&(et[nt]=tt(nt)),et[nt])}const properties={m:"margin",p:"padding"},directions={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},aliases$1={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},getCssProperties=memoize$3(tt=>{if(tt.length>2)if(aliases$1[tt])tt=aliases$1[tt];else return[tt];const[et,nt]=tt.split(""),rt=properties[et],it=directions[nt]||"";return Array.isArray(it)?it.map(ot=>rt+ot):[rt+it]}),marginKeys=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],paddingKeys=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...marginKeys,...paddingKeys];function createUnaryUnit(tt,et,nt,rt){var it;const ot=(it=getPath$2(tt,et,!1))!=null?it:nt;return typeof ot=="number"?at=>typeof at=="string"?at:ot*at:Array.isArray(ot)?at=>typeof at=="string"?at:ot[at]:typeof ot=="function"?ot:()=>{}}function createUnarySpacing(tt){return createUnaryUnit(tt,"spacing",8)}function getValue$3(tt,et){if(typeof et=="string"||et==null)return et;const nt=Math.abs(et),rt=tt(nt);return et>=0?rt:typeof rt=="number"?-rt:`-${rt}`}function getStyleFromPropValue(tt,et){return nt=>tt.reduce((rt,it)=>(rt[it]=getValue$3(et,nt),rt),{})}function resolveCssProperty(tt,et,nt,rt){if(et.indexOf(nt)===-1)return null;const it=getCssProperties(nt),ot=getStyleFromPropValue(it,rt),at=tt[nt];return handleBreakpoints(tt,at,ot)}function style$4(tt,et){const nt=createUnarySpacing(tt.theme);return Object.keys(tt).map(rt=>resolveCssProperty(tt,et,rt,nt)).reduce(merge,{})}function margin(tt){return style$4(tt,marginKeys)}margin.propTypes={};margin.filterProps=marginKeys;function padding$2(tt){return style$4(tt,paddingKeys)}padding$2.propTypes={};padding$2.filterProps=paddingKeys;function createSpacing(tt=8){if(tt.mui)return tt;const et=createUnarySpacing({spacing:tt}),nt=(...rt)=>(rt.length===0?[1]:rt).map(ot=>{const at=et(ot);return typeof at=="number"?`${at}px`:at}).join(" ");return nt.mui=!0,nt}function compose$1(...tt){const et=tt.reduce((rt,it)=>(it.filterProps.forEach(ot=>{rt[ot]=it}),rt),{}),nt=rt=>Object.keys(rt).reduce((it,ot)=>et[ot]?merge(it,et[ot](rt)):it,{});return nt.propTypes={},nt.filterProps=tt.reduce((rt,it)=>rt.concat(it.filterProps),[]),nt}function borderTransform(tt){return typeof tt!="number"?tt:`${tt}px solid`}const border$1=style$5({prop:"border",themeKey:"borders",transform:borderTransform}),borderTop=style$5({prop:"borderTop",themeKey:"borders",transform:borderTransform}),borderRight=style$5({prop:"borderRight",themeKey:"borders",transform:borderTransform}),borderBottom=style$5({prop:"borderBottom",themeKey:"borders",transform:borderTransform}),borderLeft=style$5({prop:"borderLeft",themeKey:"borders",transform:borderTransform}),borderColor=style$5({prop:"borderColor",themeKey:"palette"}),borderTopColor=style$5({prop:"borderTopColor",themeKey:"palette"}),borderRightColor=style$5({prop:"borderRightColor",themeKey:"palette"}),borderBottomColor=style$5({prop:"borderBottomColor",themeKey:"palette"}),borderLeftColor=style$5({prop:"borderLeftColor",themeKey:"palette"}),borderRadius=tt=>{if(tt.borderRadius!==void 0&&tt.borderRadius!==null){const et=createUnaryUnit(tt.theme,"shape.borderRadius",4),nt=rt=>({borderRadius:getValue$3(et,rt)});return handleBreakpoints(tt,tt.borderRadius,nt)}return null};borderRadius.propTypes={};borderRadius.filterProps=["borderRadius"];compose$1(border$1,borderTop,borderRight,borderBottom,borderLeft,borderColor,borderTopColor,borderRightColor,borderBottomColor,borderLeftColor,borderRadius);const gap=tt=>{if(tt.gap!==void 0&&tt.gap!==null){const et=createUnaryUnit(tt.theme,"spacing",8),nt=rt=>({gap:getValue$3(et,rt)});return handleBreakpoints(tt,tt.gap,nt)}return null};gap.propTypes={};gap.filterProps=["gap"];const columnGap=tt=>{if(tt.columnGap!==void 0&&tt.columnGap!==null){const et=createUnaryUnit(tt.theme,"spacing",8),nt=rt=>({columnGap:getValue$3(et,rt)});return handleBreakpoints(tt,tt.columnGap,nt)}return null};columnGap.propTypes={};columnGap.filterProps=["columnGap"];const rowGap=tt=>{if(tt.rowGap!==void 0&&tt.rowGap!==null){const et=createUnaryUnit(tt.theme,"spacing",8),nt=rt=>({rowGap:getValue$3(et,rt)});return handleBreakpoints(tt,tt.rowGap,nt)}return null};rowGap.propTypes={};rowGap.filterProps=["rowGap"];const gridColumn=style$5({prop:"gridColumn"}),gridRow=style$5({prop:"gridRow"}),gridAutoFlow=style$5({prop:"gridAutoFlow"}),gridAutoColumns=style$5({prop:"gridAutoColumns"}),gridAutoRows=style$5({prop:"gridAutoRows"}),gridTemplateColumns=style$5({prop:"gridTemplateColumns"}),gridTemplateRows=style$5({prop:"gridTemplateRows"}),gridTemplateAreas=style$5({prop:"gridTemplateAreas"}),gridArea=style$5({prop:"gridArea"});compose$1(gap,columnGap,rowGap,gridColumn,gridRow,gridAutoFlow,gridAutoColumns,gridAutoRows,gridTemplateColumns,gridTemplateRows,gridTemplateAreas,gridArea);function paletteTransform(tt,et){return et==="grey"?et:tt}const color$2=style$5({prop:"color",themeKey:"palette",transform:paletteTransform}),bgcolor=style$5({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:paletteTransform}),backgroundColor$1=style$5({prop:"backgroundColor",themeKey:"palette",transform:paletteTransform});compose$1(color$2,bgcolor,backgroundColor$1);function sizingTransform(tt){return tt<=1&&tt!==0?`${tt*100}%`:tt}const width=style$5({prop:"width",transform:sizingTransform}),maxWidth=tt=>{if(tt.maxWidth!==void 0&&tt.maxWidth!==null){const et=nt=>{var rt,it;const ot=((rt=tt.theme)==null||(rt=rt.breakpoints)==null||(rt=rt.values)==null?void 0:rt[nt])||values$1[nt];return ot?((it=tt.theme)==null||(it=it.breakpoints)==null?void 0:it.unit)!=="px"?{maxWidth:`${ot}${tt.theme.breakpoints.unit}`}:{maxWidth:ot}:{maxWidth:sizingTransform(nt)}};return handleBreakpoints(tt,tt.maxWidth,et)}return null};maxWidth.filterProps=["maxWidth"];const minWidth=style$5({prop:"minWidth",transform:sizingTransform}),height=style$5({prop:"height",transform:sizingTransform}),maxHeight=style$5({prop:"maxHeight",transform:sizingTransform}),minHeight=style$5({prop:"minHeight",transform:sizingTransform});style$5({prop:"size",cssProperty:"width",transform:sizingTransform});style$5({prop:"size",cssProperty:"height",transform:sizingTransform});const boxSizing=style$5({prop:"boxSizing"});compose$1(width,maxWidth,minWidth,height,maxHeight,minHeight,boxSizing);const defaultSxConfig={border:{themeKey:"borders",transform:borderTransform},borderTop:{themeKey:"borders",transform:borderTransform},borderRight:{themeKey:"borders",transform:borderTransform},borderBottom:{themeKey:"borders",transform:borderTransform},borderLeft:{themeKey:"borders",transform:borderTransform},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:borderRadius},color:{themeKey:"palette",transform:paletteTransform},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:paletteTransform},backgroundColor:{themeKey:"palette",transform:paletteTransform},p:{style:padding$2},pt:{style:padding$2},pr:{style:padding$2},pb:{style:padding$2},pl:{style:padding$2},px:{style:padding$2},py:{style:padding$2},padding:{style:padding$2},paddingTop:{style:padding$2},paddingRight:{style:padding$2},paddingBottom:{style:padding$2},paddingLeft:{style:padding$2},paddingX:{style:padding$2},paddingY:{style:padding$2},paddingInline:{style:padding$2},paddingInlineStart:{style:padding$2},paddingInlineEnd:{style:padding$2},paddingBlock:{style:padding$2},paddingBlockStart:{style:padding$2},paddingBlockEnd:{style:padding$2},m:{style:margin},mt:{style:margin},mr:{style:margin},mb:{style:margin},ml:{style:margin},mx:{style:margin},my:{style:margin},margin:{style:margin},marginTop:{style:margin},marginRight:{style:margin},marginBottom:{style:margin},marginLeft:{style:margin},marginX:{style:margin},marginY:{style:margin},marginInline:{style:margin},marginInlineStart:{style:margin},marginInlineEnd:{style:margin},marginBlock:{style:margin},marginBlockStart:{style:margin},marginBlockEnd:{style:margin},displayPrint:{cssProperty:!1,transform:tt=>({"@media print":{display:tt}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:gap},rowGap:{style:rowGap},columnGap:{style:columnGap},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:sizingTransform},maxWidth:{style:maxWidth},minWidth:{transform:sizingTransform},height:{transform:sizingTransform},maxHeight:{transform:sizingTransform},minHeight:{transform:sizingTransform},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},defaultSxConfig$1=defaultSxConfig;function objectsHaveSameKeys(...tt){const et=tt.reduce((rt,it)=>rt.concat(Object.keys(it)),[]),nt=new Set(et);return tt.every(rt=>nt.size===Object.keys(rt).length)}function callIfFn(tt,et){return typeof tt=="function"?tt(et):tt}function unstable_createStyleFunctionSx(){function tt(nt,rt,it,ot){const at={[nt]:rt,theme:it},st=ot[nt];if(!st)return{[nt]:rt};const{cssProperty:lt=nt,themeKey:ct,transform:ut,style:ht}=st;if(rt==null)return null;if(ct==="typography"&&rt==="inherit")return{[nt]:rt};const dt=getPath$2(it,ct)||{};return ht?ht(at):handleBreakpoints(at,rt,mt=>{let gt=getStyleValue$1(dt,ut,mt);return mt===gt&&typeof mt=="string"&&(gt=getStyleValue$1(dt,ut,`${nt}${mt==="default"?"":capitalize(mt)}`,mt)),lt===!1?gt:{[lt]:gt}})}function et(nt){var rt;const{sx:it,theme:ot={}}=nt||{};if(!it)return null;const at=(rt=ot.unstable_sxConfig)!=null?rt:defaultSxConfig$1;function st(lt){let ct=lt;if(typeof lt=="function")ct=lt(ot);else if(typeof lt!="object")return lt;if(!ct)return null;const ut=createEmptyBreakpointObject(ot.breakpoints),ht=Object.keys(ut);let dt=ut;return Object.keys(ct).forEach(pt=>{const mt=callIfFn(ct[pt],ot);if(mt!=null)if(typeof mt=="object")if(at[pt])dt=merge(dt,tt(pt,mt,ot,at));else{const gt=handleBreakpoints({theme:ot},mt,yt=>({[pt]:yt}));objectsHaveSameKeys(gt,mt)?dt[pt]=et({sx:mt,theme:ot}):dt=merge(dt,gt)}else dt=merge(dt,tt(pt,mt,ot,at))}),removeUnusedBreakpoints(ht,dt)}return Array.isArray(it)?it.map(st):st(it)}return et}const styleFunctionSx=unstable_createStyleFunctionSx();styleFunctionSx.filterProps=["sx"];const styleFunctionSx$1=styleFunctionSx,_excluded$1I=["breakpoints","palette","spacing","shape"];function createTheme$1(tt={},...et){const{breakpoints:nt={},palette:rt={},spacing:it,shape:ot={}}=tt,at=_objectWithoutPropertiesLoose$m(tt,_excluded$1I),st=createBreakpoints(nt),lt=createSpacing(it);let ct=deepmerge$1({breakpoints:st,direction:"ltr",components:{},palette:_extends$u({mode:"light"},rt),spacing:lt,shape:_extends$u({},shape$2,ot)},at);return ct=et.reduce((ut,ht)=>deepmerge$1(ut,ht),ct),ct.unstable_sxConfig=_extends$u({},defaultSxConfig$1,at==null?void 0:at.unstable_sxConfig),ct.unstable_sx=function(ht){return styleFunctionSx$1({sx:ht,theme:this})},ct}function isObjectEmpty$1(tt){return Object.keys(tt).length===0}function useTheme$3(tt=null){const et=reactExports.useContext(ThemeContext$2);return!et||isObjectEmpty$1(et)?tt:et}const systemDefaultTheme$1=createTheme$1();function useTheme$2(tt=systemDefaultTheme$1){return useTheme$3(tt)}function GlobalStyles$1({styles:tt,themeId:et,defaultTheme:nt={}}){const rt=useTheme$2(nt),it=typeof tt=="function"?tt(et&&rt[et]||rt):tt;return jsxRuntimeExports.jsx(GlobalStyles$2,{styles:it})}const _excluded$1G=["sx"],splitProps=tt=>{var et,nt;const rt={systemProps:{},otherProps:{}},it=(et=tt==null||(nt=tt.theme)==null?void 0:nt.unstable_sxConfig)!=null?et:defaultSxConfig$1;return Object.keys(tt).forEach(ot=>{it[ot]?rt.systemProps[ot]=tt[ot]:rt.otherProps[ot]=tt[ot]}),rt};function extendSxProp(tt){const{sx:et}=tt,nt=_objectWithoutPropertiesLoose$m(tt,_excluded$1G),{systemProps:rt,otherProps:it}=splitProps(nt);let ot;return Array.isArray(et)?ot=[rt,...et]:typeof et=="function"?ot=(...at)=>{const st=et(...at);return isPlainObject$1(st)?_extends$u({},rt,st):rt}:ot=_extends$u({},rt,et),_extends$u({},it,{sx:ot})}function r$9(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{it==="color"?rt+=isEmpty$3(rt)?tt[it]:capitalize(tt[it]):rt+=`${isEmpty$3(rt)?it:capitalize(it)}${capitalize(tt[it].toString())}`}),rt}const _excluded$1E=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function isEmpty$2(tt){return Object.keys(tt).length===0}function isStringTag(tt){return typeof tt=="string"&&tt.charCodeAt(0)>96}const getStyleOverrides=(tt,et)=>et.components&&et.components[tt]&&et.components[tt].styleOverrides?et.components[tt].styleOverrides:null,transformVariants=tt=>{const et={};return tt&&tt.forEach(nt=>{const rt=propsToClassKey(nt.props);et[rt]=nt.style}),et},getVariantStyles=(tt,et)=>{let nt=[];return et&&et.components&&et.components[tt]&&et.components[tt].variants&&(nt=et.components[tt].variants),transformVariants(nt)},variantsResolver=(tt,et,nt)=>{const{ownerState:rt={}}=tt,it=[];return nt&&nt.forEach(ot=>{let at=!0;Object.keys(ot.props).forEach(st=>{rt[st]!==ot.props[st]&&tt[st]!==ot.props[st]&&(at=!1)}),at&&it.push(et[propsToClassKey(ot.props)])}),it},themeVariantsResolver=(tt,et,nt,rt)=>{var it;const ot=nt==null||(it=nt.components)==null||(it=it[rt])==null?void 0:it.variants;return variantsResolver(tt,et,ot)};function shouldForwardProp(tt){return tt!=="ownerState"&&tt!=="theme"&&tt!=="sx"&&tt!=="as"}const systemDefaultTheme=createTheme$1(),lowercaseFirstLetter=tt=>tt&&tt.charAt(0).toLowerCase()+tt.slice(1);function resolveTheme({defaultTheme:tt,theme:et,themeId:nt}){return isEmpty$2(et)?tt:et[nt]||et}function defaultOverridesResolver(tt){return tt?(et,nt)=>nt[tt]:null}const muiStyledFunctionResolver=({styledArg:tt,props:et,defaultTheme:nt,themeId:rt})=>{const it=tt(_extends$u({},et,{theme:resolveTheme(_extends$u({},et,{defaultTheme:nt,themeId:rt}))}));let ot;if(it&&it.variants&&(ot=it.variants,delete it.variants),ot){const at=variantsResolver(et,transformVariants(ot),ot);return[it,...at]}return it};function createStyled(tt={}){const{themeId:et,defaultTheme:nt=systemDefaultTheme,rootShouldForwardProp:rt=shouldForwardProp,slotShouldForwardProp:it=shouldForwardProp}=tt,ot=at=>styleFunctionSx$1(_extends$u({},at,{theme:resolveTheme(_extends$u({},at,{defaultTheme:nt,themeId:et}))}));return ot.__mui_systemSx=!0,(at,st={})=>{internal_processStyles(at,kt=>kt.filter(St=>!(St!=null&&St.__mui_systemSx)));const{name:lt,slot:ct,skipVariantsResolver:ut,skipSx:ht,overridesResolver:dt=defaultOverridesResolver(lowercaseFirstLetter(ct))}=st,pt=_objectWithoutPropertiesLoose$m(st,_excluded$1E),mt=ut!==void 0?ut:ct&&ct!=="Root"&&ct!=="root"||!1,gt=ht||!1;let yt,bt=shouldForwardProp;ct==="Root"||ct==="root"?bt=rt:ct?bt=it:isStringTag(at)&&(bt=void 0);const vt=styled$3(at,_extends$u({shouldForwardProp:bt,label:yt},pt)),xt=(kt,...St)=>{const Tt=St?St.map(Dt=>{if(typeof Dt=="function"&&Dt.__emotion_real!==Dt)return jt=>muiStyledFunctionResolver({styledArg:Dt,props:jt,defaultTheme:nt,themeId:et});if(isPlainObject$1(Dt)){let jt=Dt,Pt;return Dt&&Dt.variants&&(Pt=Dt.variants,delete jt.variants,jt=Ct=>{let wt=Dt;return variantsResolver(Ct,transformVariants(Pt),Pt).forEach(Ot=>{wt=deepmerge$1(wt,Ot)}),wt}),jt}return Dt}):[];let At=kt;if(isPlainObject$1(kt)){let Dt;kt&&kt.variants&&(Dt=kt.variants,delete At.variants,At=jt=>{let Pt=kt;return variantsResolver(jt,transformVariants(Dt),Dt).forEach(wt=>{Pt=deepmerge$1(Pt,wt)}),Pt})}else typeof kt=="function"&&kt.__emotion_real!==kt&&(At=Dt=>muiStyledFunctionResolver({styledArg:kt,props:Dt,defaultTheme:nt,themeId:et}));lt&&dt&&Tt.push(Dt=>{const jt=resolveTheme(_extends$u({},Dt,{defaultTheme:nt,themeId:et})),Pt=getStyleOverrides(lt,jt);if(Pt){const Ct={};return Object.entries(Pt).forEach(([wt,It])=>{Ct[wt]=typeof It=="function"?It(_extends$u({},Dt,{theme:jt})):It}),dt(Dt,Ct)}return null}),lt&&!mt&&Tt.push(Dt=>{const jt=resolveTheme(_extends$u({},Dt,{defaultTheme:nt,themeId:et}));return themeVariantsResolver(Dt,getVariantStyles(lt,jt),jt,lt)}),gt||Tt.push(ot);const Et=Tt.length-St.length;if(Array.isArray(kt)&&Et>0){const Dt=new Array(Et).fill("");At=[...kt,...Dt],At.raw=[...kt.raw,...Dt]}const $t=vt(At,...Tt);return at.muiName&&($t.muiName=at.muiName),$t};return vt.withConfig&&(xt.withConfig=vt.withConfig),xt}}const styled$2=createStyled(),systemStyled=styled$2;function getThemeProps(tt){const{theme:et,name:nt,props:rt}=tt;return!et||!et.components||!et.components[nt]||!et.components[nt].defaultProps?rt:resolveProps(et.components[nt].defaultProps,rt)}function useThemeProps$1({props:tt,name:et,defaultTheme:nt,themeId:rt}){let it=useTheme$2(nt);return rt&&(it=it[rt]||it),getThemeProps({theme:it,name:et,props:tt})}function clamp$7(tt,et=0,nt=1){return Math.min(Math.max(et,tt),nt)}function hexToRgb(tt){tt=tt.slice(1);const et=new RegExp(`.{1,${tt.length>=6?2:1}}`,"g");let nt=tt.match(et);return nt&&nt[0].length===1&&(nt=nt.map(rt=>rt+rt)),nt?`rgb${nt.length===4?"a":""}(${nt.map((rt,it)=>it<3?parseInt(rt,16):Math.round(parseInt(rt,16)/255*1e3)/1e3).join(", ")})`:""}function decomposeColor(tt){if(tt.type)return tt;if(tt.charAt(0)==="#")return decomposeColor(hexToRgb(tt));const et=tt.indexOf("("),nt=tt.substring(0,et);if(["rgb","rgba","hsl","hsla","color"].indexOf(nt)===-1)throw new Error(formatMuiErrorMessage(9,tt));let rt=tt.substring(et+1,tt.length-1),it;if(nt==="color"){if(rt=rt.split(" "),it=rt.shift(),rt.length===4&&rt[3].charAt(0)==="/"&&(rt[3]=rt[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(it)===-1)throw new Error(formatMuiErrorMessage(10,it))}else rt=rt.split(",");return rt=rt.map(ot=>parseFloat(ot)),{type:nt,values:rt,colorSpace:it}}function recomposeColor(tt){const{type:et,colorSpace:nt}=tt;let{values:rt}=tt;return et.indexOf("rgb")!==-1?rt=rt.map((it,ot)=>ot<3?parseInt(it,10):it):et.indexOf("hsl")!==-1&&(rt[1]=`${rt[1]}%`,rt[2]=`${rt[2]}%`),et.indexOf("color")!==-1?rt=`${nt} ${rt.join(" ")}`:rt=`${rt.join(", ")}`,`${et}(${rt})`}function hslToRgb(tt){tt=decomposeColor(tt);const{values:et}=tt,nt=et[0],rt=et[1]/100,it=et[2]/100,ot=rt*Math.min(it,1-it),at=(ct,ut=(ct+nt/30)%12)=>it-ot*Math.max(Math.min(ut-3,9-ut,1),-1);let st="rgb";const lt=[Math.round(at(0)*255),Math.round(at(8)*255),Math.round(at(4)*255)];return tt.type==="hsla"&&(st+="a",lt.push(et[3])),recomposeColor({type:st,values:lt})}function getLuminance(tt){tt=decomposeColor(tt);let et=tt.type==="hsl"||tt.type==="hsla"?decomposeColor(hslToRgb(tt)).values:tt.values;return et=et.map(nt=>(tt.type!=="color"&&(nt/=255),nt<=.03928?nt/12.92:((nt+.055)/1.055)**2.4)),Number((.2126*et[0]+.7152*et[1]+.0722*et[2]).toFixed(3))}function getContrastRatio(tt,et){const nt=getLuminance(tt),rt=getLuminance(et);return(Math.max(nt,rt)+.05)/(Math.min(nt,rt)+.05)}function alpha$1(tt,et){return tt=decomposeColor(tt),et=clamp$7(et),(tt.type==="rgb"||tt.type==="hsl")&&(tt.type+="a"),tt.type==="color"?tt.values[3]=`/${et}`:tt.values[3]=et,recomposeColor(tt)}function darken(tt,et){if(tt=decomposeColor(tt),et=clamp$7(et),tt.type.indexOf("hsl")!==-1)tt.values[2]*=1-et;else if(tt.type.indexOf("rgb")!==-1||tt.type.indexOf("color")!==-1)for(let nt=0;nt<3;nt+=1)tt.values[nt]*=1-et;return recomposeColor(tt)}function lighten(tt,et){if(tt=decomposeColor(tt),et=clamp$7(et),tt.type.indexOf("hsl")!==-1)tt.values[2]+=(100-tt.values[2])*et;else if(tt.type.indexOf("rgb")!==-1)for(let nt=0;nt<3;nt+=1)tt.values[nt]+=(255-tt.values[nt])*et;else if(tt.type.indexOf("color")!==-1)for(let nt=0;nt<3;nt+=1)tt.values[nt]+=(1-tt.values[nt])*et;return recomposeColor(tt)}const ThemeContext=reactExports.createContext(null),ThemeContext$1=ThemeContext;function useTheme$1(){return reactExports.useContext(ThemeContext$1)}const hasSymbol=typeof Symbol=="function"&&Symbol.for,nested=hasSymbol?Symbol.for("mui.nested"):"__THEME_NESTED__";function mergeOuterLocalTheme(tt,et){return typeof et=="function"?et(tt):_extends$u({},tt,et)}function ThemeProvider$2(tt){const{children:et,theme:nt}=tt,rt=useTheme$1(),it=reactExports.useMemo(()=>{const ot=rt===null?nt:mergeOuterLocalTheme(rt,nt);return ot!=null&&(ot[nested]=rt!==null),ot},[nt,rt]);return jsxRuntimeExports.jsx(ThemeContext$1.Provider,{value:it,children:et})}const EMPTY_THEME={};function useThemeScoping(tt,et,nt,rt=!1){return reactExports.useMemo(()=>{const it=tt&&et[tt]||et;if(typeof nt=="function"){const ot=nt(it),at=tt?_extends$u({},et,{[tt]:ot}):ot;return rt?()=>at:at}return tt?_extends$u({},et,{[tt]:nt}):_extends$u({},et,nt)},[tt,et,nt,rt])}function ThemeProvider$1(tt){const{children:et,theme:nt,themeId:rt}=tt,it=useTheme$3(EMPTY_THEME),ot=useTheme$1()||EMPTY_THEME,at=useThemeScoping(rt,it,nt),st=useThemeScoping(rt,ot,nt,!0);return jsxRuntimeExports.jsx(ThemeProvider$2,{theme:st,children:jsxRuntimeExports.jsx(ThemeContext$2.Provider,{value:at,children:et})})}const _excluded$1D=["component","direction","spacing","divider","children","className","useFlexGap"],defaultTheme$2=createTheme$1(),defaultCreateStyledComponent=systemStyled("div",{name:"MuiStack",slot:"Root",overridesResolver:(tt,et)=>et.root});function useThemePropsDefault(tt){return useThemeProps$1({props:tt,name:"MuiStack",defaultTheme:defaultTheme$2})}function joinChildren(tt,et){const nt=reactExports.Children.toArray(tt).filter(Boolean);return nt.reduce((rt,it,ot)=>(rt.push(it),ot({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[tt],style$3=({ownerState:tt,theme:et})=>{let nt=_extends$u({display:"flex",flexDirection:"column"},handleBreakpoints({theme:et},resolveBreakpointValues({values:tt.direction,breakpoints:et.breakpoints.values}),rt=>({flexDirection:rt})));if(tt.spacing){const rt=createUnarySpacing(et),it=Object.keys(et.breakpoints.values).reduce((lt,ct)=>((typeof tt.spacing=="object"&&tt.spacing[ct]!=null||typeof tt.direction=="object"&&tt.direction[ct]!=null)&&(lt[ct]=!0),lt),{}),ot=resolveBreakpointValues({values:tt.direction,base:it}),at=resolveBreakpointValues({values:tt.spacing,base:it});typeof ot=="object"&&Object.keys(ot).forEach((lt,ct,ut)=>{if(!ot[lt]){const dt=ct>0?ot[ut[ct-1]]:"column";ot[lt]=dt}}),nt=deepmerge$1(nt,handleBreakpoints({theme:et},at,(lt,ct)=>tt.useFlexGap?{gap:getValue$3(rt,lt)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${getSideFromDirection(ct?ot[ct]:tt.direction)}`]:getValue$3(rt,lt)}}))}return nt=mergeBreakpointsInOrder(et.breakpoints,nt),nt};function createStack(tt={}){const{createStyledComponent:et=defaultCreateStyledComponent,useThemeProps:nt=useThemePropsDefault,componentName:rt="MuiStack"}=tt,it=()=>composeClasses({root:["root"]},lt=>generateUtilityClass(rt,lt),{}),ot=et(style$3);return reactExports.forwardRef(function(lt,ct){const ut=nt(lt),ht=extendSxProp(ut),{component:dt="div",direction:pt="column",spacing:mt=0,divider:gt,children:yt,className:bt,useFlexGap:vt=!1}=ht,xt=_objectWithoutPropertiesLoose$m(ht,_excluded$1D),kt={direction:pt,spacing:mt,useFlexGap:vt},St=it();return jsxRuntimeExports.jsx(ot,_extends$u({as:dt,ownerState:kt,ref:ct,className:clsx$4(St.root,bt)},xt,{children:gt?joinChildren(yt,gt):yt}))})}function createMixins(tt,et){return _extends$u({toolbar:{minHeight:56,[tt.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[tt.up("sm")]:{minHeight:64}}},et)}const _excluded$1C=["mode","contrastThreshold","tonalOffset"],light={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:common$8.white,default:common$8.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},dark={text:{primary:common$8.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:common$8.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function addLightOrDark(tt,et,nt,rt){const it=rt.light||rt,ot=rt.dark||rt*1.5;tt[et]||(tt.hasOwnProperty(nt)?tt[et]=tt[nt]:et==="light"?tt.light=lighten(tt.main,it):et==="dark"&&(tt.dark=darken(tt.main,ot)))}function getDefaultPrimary(tt="light"){return tt==="dark"?{main:blue$1[200],light:blue$1[50],dark:blue$1[400]}:{main:blue$1[700],light:blue$1[400],dark:blue$1[800]}}function getDefaultSecondary(tt="light"){return tt==="dark"?{main:purple$1[200],light:purple$1[50],dark:purple$1[400]}:{main:purple$1[500],light:purple$1[300],dark:purple$1[700]}}function getDefaultError(tt="light"){return tt==="dark"?{main:red$1[500],light:red$1[300],dark:red$1[700]}:{main:red$1[700],light:red$1[400],dark:red$1[800]}}function getDefaultInfo(tt="light"){return tt==="dark"?{main:lightBlue$1[400],light:lightBlue$1[300],dark:lightBlue$1[700]}:{main:lightBlue$1[700],light:lightBlue$1[500],dark:lightBlue$1[900]}}function getDefaultSuccess(tt="light"){return tt==="dark"?{main:green$1[400],light:green$1[300],dark:green$1[700]}:{main:green$1[800],light:green$1[500],dark:green$1[900]}}function getDefaultWarning(tt="light"){return tt==="dark"?{main:orange$1[400],light:orange$1[300],dark:orange$1[700]}:{main:"#ed6c02",light:orange$1[500],dark:orange$1[900]}}function createPalette(tt){const{mode:et="light",contrastThreshold:nt=3,tonalOffset:rt=.2}=tt,it=_objectWithoutPropertiesLoose$m(tt,_excluded$1C),ot=tt.primary||getDefaultPrimary(et),at=tt.secondary||getDefaultSecondary(et),st=tt.error||getDefaultError(et),lt=tt.info||getDefaultInfo(et),ct=tt.success||getDefaultSuccess(et),ut=tt.warning||getDefaultWarning(et);function ht(gt){return getContrastRatio(gt,dark.text.primary)>=nt?dark.text.primary:light.text.primary}const dt=({color:gt,name:yt,mainShade:bt=500,lightShade:vt=300,darkShade:xt=700})=>{if(gt=_extends$u({},gt),!gt.main&>[bt]&&(gt.main=gt[bt]),!gt.hasOwnProperty("main"))throw new Error(formatMuiErrorMessage(11,yt?` (${yt})`:"",bt));if(typeof gt.main!="string")throw new Error(formatMuiErrorMessage(12,yt?` (${yt})`:"",JSON.stringify(gt.main)));return addLightOrDark(gt,"light",vt,rt),addLightOrDark(gt,"dark",xt,rt),gt.contrastText||(gt.contrastText=ht(gt.main)),gt},pt={dark,light};return deepmerge$1(_extends$u({common:_extends$u({},common$8),mode:et,primary:dt({color:ot,name:"primary"}),secondary:dt({color:at,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:dt({color:st,name:"error"}),warning:dt({color:ut,name:"warning"}),info:dt({color:lt,name:"info"}),success:dt({color:ct,name:"success"}),grey:grey$1,contrastThreshold:nt,getContrastText:ht,augmentColor:dt,tonalOffset:rt},pt[et]),it)}const _excluded$1B=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function round$3(tt){return Math.round(tt*1e5)/1e5}const caseAllCaps={textTransform:"uppercase"},defaultFontFamily='"Roboto", "Helvetica", "Arial", sans-serif';function createTypography(tt,et){const nt=typeof et=="function"?et(tt):et,{fontFamily:rt=defaultFontFamily,fontSize:it=14,fontWeightLight:ot=300,fontWeightRegular:at=400,fontWeightMedium:st=500,fontWeightBold:lt=700,htmlFontSize:ct=16,allVariants:ut,pxToRem:ht}=nt,dt=_objectWithoutPropertiesLoose$m(nt,_excluded$1B),pt=it/14,mt=ht||(bt=>`${bt/ct*pt}rem`),gt=(bt,vt,xt,kt,St)=>_extends$u({fontFamily:rt,fontWeight:bt,fontSize:mt(vt),lineHeight:xt},rt===defaultFontFamily?{letterSpacing:`${round$3(kt/vt)}em`}:{},St,ut),yt={h1:gt(ot,96,1.167,-1.5),h2:gt(ot,60,1.2,-.5),h3:gt(at,48,1.167,0),h4:gt(at,34,1.235,.25),h5:gt(at,24,1.334,0),h6:gt(st,20,1.6,.15),subtitle1:gt(at,16,1.75,.15),subtitle2:gt(st,14,1.57,.1),body1:gt(at,16,1.5,.15),body2:gt(at,14,1.43,.15),button:gt(st,14,1.75,.4,caseAllCaps),caption:gt(at,12,1.66,.4),overline:gt(at,12,2.66,1,caseAllCaps),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return deepmerge$1(_extends$u({htmlFontSize:ct,pxToRem:mt,fontFamily:rt,fontSize:it,fontWeightLight:ot,fontWeightRegular:at,fontWeightMedium:st,fontWeightBold:lt},yt),dt,{clone:!1})}const shadowKeyUmbraOpacity=.2,shadowKeyPenumbraOpacity=.14,shadowAmbientShadowOpacity=.12;function createShadow(...tt){return[`${tt[0]}px ${tt[1]}px ${tt[2]}px ${tt[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`,`${tt[4]}px ${tt[5]}px ${tt[6]}px ${tt[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`,`${tt[8]}px ${tt[9]}px ${tt[10]}px ${tt[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(",")}const shadows=["none",createShadow(0,2,1,-1,0,1,1,0,0,1,3,0),createShadow(0,3,1,-2,0,2,2,0,0,1,5,0),createShadow(0,3,3,-2,0,3,4,0,0,1,8,0),createShadow(0,2,4,-1,0,4,5,0,0,1,10,0),createShadow(0,3,5,-1,0,5,8,0,0,1,14,0),createShadow(0,3,5,-1,0,6,10,0,0,1,18,0),createShadow(0,4,5,-2,0,7,10,1,0,2,16,1),createShadow(0,5,5,-3,0,8,10,1,0,3,14,2),createShadow(0,5,6,-3,0,9,12,1,0,3,16,2),createShadow(0,6,6,-3,0,10,14,1,0,4,18,3),createShadow(0,6,7,-4,0,11,15,1,0,4,20,3),createShadow(0,7,8,-4,0,12,17,2,0,5,22,4),createShadow(0,7,8,-4,0,13,19,2,0,5,24,4),createShadow(0,7,9,-4,0,14,21,2,0,5,26,4),createShadow(0,8,9,-5,0,15,22,2,0,6,28,5),createShadow(0,8,10,-5,0,16,24,2,0,6,30,5),createShadow(0,8,11,-5,0,17,26,2,0,6,32,5),createShadow(0,9,11,-5,0,18,28,2,0,7,34,6),createShadow(0,9,12,-6,0,19,29,2,0,7,36,6),createShadow(0,10,13,-6,0,20,31,3,0,8,38,7),createShadow(0,10,13,-6,0,21,33,3,0,8,40,7),createShadow(0,10,14,-6,0,22,35,3,0,8,42,7),createShadow(0,11,14,-7,0,23,36,3,0,9,44,8),createShadow(0,11,15,-7,0,24,38,3,0,9,46,8)],shadows$1=shadows,_excluded$1A=["duration","easing","delay"],easing$1={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function formatMs(tt){return`${Math.round(tt)}ms`}function getAutoHeightDuration(tt){if(!tt)return 0;const et=tt/36;return Math.round((4+15*et**.25+et/5)*10)}function createTransitions(tt){const et=_extends$u({},easing$1,tt.easing),nt=_extends$u({},duration,tt.duration);return _extends$u({getAutoHeightDuration,create:(it=["all"],ot={})=>{const{duration:at=nt.standard,easing:st=et.easeInOut,delay:lt=0}=ot;return _objectWithoutPropertiesLoose$m(ot,_excluded$1A),(Array.isArray(it)?it:[it]).map(ct=>`${ct} ${typeof at=="string"?at:formatMs(at)} ${st} ${typeof lt=="string"?lt:formatMs(lt)}`).join(",")}},tt,{easing:et,duration:nt})}const zIndex={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},zIndex$1=zIndex,_excluded$1z=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function createTheme(tt={},...et){const{mixins:nt={},palette:rt={},transitions:it={},typography:ot={}}=tt,at=_objectWithoutPropertiesLoose$m(tt,_excluded$1z);if(tt.vars)throw new Error(formatMuiErrorMessage(18));const st=createPalette(rt),lt=createTheme$1(tt);let ct=deepmerge$1(lt,{mixins:createMixins(lt.breakpoints,nt),palette:st,shadows:shadows$1.slice(),typography:createTypography(st,ot),transitions:createTransitions(it),zIndex:_extends$u({},zIndex$1)});return ct=deepmerge$1(ct,at),ct=et.reduce((ut,ht)=>deepmerge$1(ut,ht),ct),ct.unstable_sxConfig=_extends$u({},defaultSxConfig$1,at==null?void 0:at.unstable_sxConfig),ct.unstable_sx=function(ht){return styleFunctionSx$1({sx:ht,theme:this})},ct}function getUnit$1(tt){return String(tt).match(/[\d.\-+]*\s*(.*)/)[1]||""}function toUnitless(tt){return parseFloat(tt)}const defaultTheme=createTheme(),defaultTheme$1=defaultTheme;function useTheme(){const tt=useTheme$2(defaultTheme$1);return tt[THEME_ID]||tt}function useThemeProps({props:tt,name:et}){return useThemeProps$1({props:tt,name:et,defaultTheme:defaultTheme$1,themeId:THEME_ID})}const rootShouldForwardProp=tt=>shouldForwardProp(tt)&&tt!=="classes",slotShouldForwardProp=shouldForwardProp,styled=createStyled({themeId:THEME_ID,defaultTheme:defaultTheme$1,rootShouldForwardProp}),styled$1=styled,_excluded$1y=["theme"];function ThemeProvider(tt){let{theme:et}=tt,nt=_objectWithoutPropertiesLoose$m(tt,_excluded$1y);const rt=et[THEME_ID];return jsxRuntimeExports.jsx(ThemeProvider$1,_extends$u({},nt,{themeId:rt?THEME_ID:void 0,theme:rt||et}))}const getOverlayAlpha=tt=>{let et;return tt<1?et=5.11916*tt**2:et=4.5*Math.log(tt+1)+2,(et/100).toFixed(2)},getOverlayAlpha$1=getOverlayAlpha;function r$8(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{const{color:et,fontSize:nt,classes:rt}=tt,it={root:["root",et!=="inherit"&&`color${capitalize(et)}`,`fontSize${capitalize(nt)}`]};return composeClasses(it,getSvgIconUtilityClass,rt)},SvgIconRoot=styled$1("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.color!=="inherit"&&et[`color${capitalize(nt.color)}`],et[`fontSize${capitalize(nt.fontSize)}`]]}})(({theme:tt,ownerState:et})=>{var nt,rt,it,ot,at,st,lt,ct,ut,ht,dt,pt,mt;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:et.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(nt=tt.transitions)==null||(rt=nt.create)==null?void 0:rt.call(nt,"fill",{duration:(it=tt.transitions)==null||(it=it.duration)==null?void 0:it.shorter}),fontSize:{inherit:"inherit",small:((ot=tt.typography)==null||(at=ot.pxToRem)==null?void 0:at.call(ot,20))||"1.25rem",medium:((st=tt.typography)==null||(lt=st.pxToRem)==null?void 0:lt.call(st,24))||"1.5rem",large:((ct=tt.typography)==null||(ut=ct.pxToRem)==null?void 0:ut.call(ct,35))||"2.1875rem"}[et.fontSize],color:(ht=(dt=(tt.vars||tt).palette)==null||(dt=dt[et.color])==null?void 0:dt.main)!=null?ht:{action:(pt=(tt.vars||tt).palette)==null||(pt=pt.action)==null?void 0:pt.active,disabled:(mt=(tt.vars||tt).palette)==null||(mt=mt.action)==null?void 0:mt.disabled,inherit:void 0}[et.color]}}),SvgIcon=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiSvgIcon"}),{children:it,className:ot,color:at="inherit",component:st="svg",fontSize:lt="medium",htmlColor:ct,inheritViewBox:ut=!1,titleAccess:ht,viewBox:dt="0 0 24 24"}=rt,pt=_objectWithoutPropertiesLoose$m(rt,_excluded$1x),mt=reactExports.isValidElement(it)&&it.type==="svg",gt=_extends$u({},rt,{color:at,component:st,fontSize:lt,instanceFontSize:et.fontSize,inheritViewBox:ut,viewBox:dt,hasSvgAsChild:mt}),yt={};ut||(yt.viewBox=dt);const bt=useUtilityClasses$V(gt);return jsxRuntimeExports.jsxs(SvgIconRoot,_extends$u({as:st,className:clsx$3(bt.root,ot),focusable:"false",color:ct,"aria-hidden":ht?void 0:!0,role:ht?"img":void 0,ref:nt},yt,pt,mt&&it.props,{ownerState:gt,children:[mt?it.props.children:it,ht?jsxRuntimeExports.jsx("title",{children:ht}):null]}))});SvgIcon.muiName="SvgIcon";const SvgIcon$1=SvgIcon;function createSvgIcon(tt,et){function nt(rt,it){return jsxRuntimeExports.jsx(SvgIcon$1,_extends$u({"data-testid":`${et}Icon`,ref:it},rt,{children:tt}))}return nt.muiName=SvgIcon$1.muiName,reactExports.memo(reactExports.forwardRef(nt))}function _setPrototypeOf$c(tt,et){return _setPrototypeOf$c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,it){return rt.__proto__=it,rt},_setPrototypeOf$c(tt,et)}function _inheritsLoose$2(tt,et){tt.prototype=Object.create(et.prototype),tt.prototype.constructor=tt,_setPrototypeOf$c(tt,et)}function hasClass(tt,et){return tt.classList?!!et&&tt.classList.contains(et):(" "+(tt.className.baseVal||tt.className)+" ").indexOf(" "+et+" ")!==-1}function addClass(tt,et){tt.classList?tt.classList.add(et):hasClass(tt,et)||(typeof tt.className=="string"?tt.className=tt.className+" "+et:tt.setAttribute("class",(tt.className&&tt.className.baseVal||"")+" "+et))}function replaceClassName(tt,et){return tt.replace(new RegExp("(^|\\s)"+et+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function removeClass$1(tt,et){tt.classList?tt.classList.remove(et):typeof tt.className=="string"?tt.className=replaceClassName(tt.className,et):tt.setAttribute("class",replaceClassName(tt.className&&tt.className.baseVal||"",et))}const config$2={disabled:!1},TransitionGroupContext=React$1.createContext(null);var forceReflow=function(et){return et.scrollTop},UNMOUNTED="unmounted",EXITED="exited",ENTERING="entering",ENTERED="entered",EXITING="exiting",Transition$1=function(tt){_inheritsLoose$2(et,tt);function et(rt,it){var ot;ot=tt.call(this,rt,it)||this;var at=it,st=at&&!at.isMounting?rt.enter:rt.appear,lt;return ot.appearStatus=null,rt.in?st?(lt=EXITED,ot.appearStatus=ENTERING):lt=ENTERED:rt.unmountOnExit||rt.mountOnEnter?lt=UNMOUNTED:lt=EXITED,ot.state={status:lt},ot.nextCallback=null,ot}et.getDerivedStateFromProps=function(it,ot){var at=it.in;return at&&ot.status===UNMOUNTED?{status:EXITED}:null};var nt=et.prototype;return nt.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},nt.componentDidUpdate=function(it){var ot=null;if(it!==this.props){var at=this.state.status;this.props.in?at!==ENTERING&&at!==ENTERED&&(ot=ENTERING):(at===ENTERING||at===ENTERED)&&(ot=EXITING)}this.updateStatus(!1,ot)},nt.componentWillUnmount=function(){this.cancelNextCallback()},nt.getTimeouts=function(){var it=this.props.timeout,ot,at,st;return ot=at=st=it,it!=null&&typeof it!="number"&&(ot=it.exit,at=it.enter,st=it.appear!==void 0?it.appear:at),{exit:ot,enter:at,appear:st}},nt.updateStatus=function(it,ot){if(it===void 0&&(it=!1),ot!==null)if(this.cancelNextCallback(),ot===ENTERING){if(this.props.unmountOnExit||this.props.mountOnEnter){var at=this.props.nodeRef?this.props.nodeRef.current:ReactDOM.findDOMNode(this);at&&forceReflow(at)}this.performEnter(it)}else this.performExit();else this.props.unmountOnExit&&this.state.status===EXITED&&this.setState({status:UNMOUNTED})},nt.performEnter=function(it){var ot=this,at=this.props.enter,st=this.context?this.context.isMounting:it,lt=this.props.nodeRef?[st]:[ReactDOM.findDOMNode(this),st],ct=lt[0],ut=lt[1],ht=this.getTimeouts(),dt=st?ht.appear:ht.enter;if(!it&&!at||config$2.disabled){this.safeSetState({status:ENTERED},function(){ot.props.onEntered(ct)});return}this.props.onEnter(ct,ut),this.safeSetState({status:ENTERING},function(){ot.props.onEntering(ct,ut),ot.onTransitionEnd(dt,function(){ot.safeSetState({status:ENTERED},function(){ot.props.onEntered(ct,ut)})})})},nt.performExit=function(){var it=this,ot=this.props.exit,at=this.getTimeouts(),st=this.props.nodeRef?void 0:ReactDOM.findDOMNode(this);if(!ot||config$2.disabled){this.safeSetState({status:EXITED},function(){it.props.onExited(st)});return}this.props.onExit(st),this.safeSetState({status:EXITING},function(){it.props.onExiting(st),it.onTransitionEnd(at.exit,function(){it.safeSetState({status:EXITED},function(){it.props.onExited(st)})})})},nt.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},nt.safeSetState=function(it,ot){ot=this.setNextCallback(ot),this.setState(it,ot)},nt.setNextCallback=function(it){var ot=this,at=!0;return this.nextCallback=function(st){at&&(at=!1,ot.nextCallback=null,it(st))},this.nextCallback.cancel=function(){at=!1},this.nextCallback},nt.onTransitionEnd=function(it,ot){this.setNextCallback(ot);var at=this.props.nodeRef?this.props.nodeRef.current:ReactDOM.findDOMNode(this),st=it==null&&!this.props.addEndListener;if(!at||st){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var lt=this.props.nodeRef?[this.nextCallback]:[at,this.nextCallback],ct=lt[0],ut=lt[1];this.props.addEndListener(ct,ut)}it!=null&&setTimeout(this.nextCallback,it)},nt.render=function(){var it=this.state.status;if(it===UNMOUNTED)return null;var ot=this.props,at=ot.children;ot.in,ot.mountOnEnter,ot.unmountOnExit,ot.appear,ot.enter,ot.exit,ot.timeout,ot.addEndListener,ot.onEnter,ot.onEntering,ot.onEntered,ot.onExit,ot.onExiting,ot.onExited,ot.nodeRef;var st=_objectWithoutPropertiesLoose$m(ot,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return React$1.createElement(TransitionGroupContext.Provider,{value:null},typeof at=="function"?at(it,st):React$1.cloneElement(React$1.Children.only(at),st))},et}(React$1.Component);Transition$1.contextType=TransitionGroupContext;Transition$1.propTypes={};function noop$9(){}Transition$1.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:noop$9,onEntering:noop$9,onEntered:noop$9,onExit:noop$9,onExiting:noop$9,onExited:noop$9};Transition$1.UNMOUNTED=UNMOUNTED;Transition$1.EXITED=EXITED;Transition$1.ENTERING=ENTERING;Transition$1.ENTERED=ENTERED;Transition$1.EXITING=EXITING;const Transition$2=Transition$1;var _addClass=function(et,nt){return et&&nt&&nt.split(" ").forEach(function(rt){return addClass(et,rt)})},removeClass=function(et,nt){return et&&nt&&nt.split(" ").forEach(function(rt){return removeClass$1(et,rt)})},CSSTransition=function(tt){_inheritsLoose$2(et,tt);function et(){for(var rt,it=arguments.length,ot=new Array(it),at=0;attt.scrollTop;function getTransitionProps(tt,et){var nt,rt;const{timeout:it,easing:ot,style:at={}}=tt;return{duration:(nt=at.transitionDuration)!=null?nt:typeof it=="number"?it:it[et.mode]||0,easing:(rt=at.transitionTimingFunction)!=null?rt:typeof ot=="object"?ot[et.mode]:ot,delay:at.transitionDelay}}function getPaperUtilityClass(tt){return generateUtilityClass("MuiPaper",tt)}generateUtilityClasses("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const _excluded$1v=["className","component","elevation","square","variant"],useUtilityClasses$U=tt=>{const{square:et,elevation:nt,variant:rt,classes:it}=tt,ot={root:["root",rt,!et&&"rounded",rt==="elevation"&&`elevation${nt}`]};return composeClasses(ot,getPaperUtilityClass,it)},PaperRoot=styled$1("div",{name:"MuiPaper",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,et[nt.variant],!nt.square&&et.rounded,nt.variant==="elevation"&&et[`elevation${nt.elevation}`]]}})(({theme:tt,ownerState:et})=>{var nt;return _extends$u({backgroundColor:(tt.vars||tt).palette.background.paper,color:(tt.vars||tt).palette.text.primary,transition:tt.transitions.create("box-shadow")},!et.square&&{borderRadius:tt.shape.borderRadius},et.variant==="outlined"&&{border:`1px solid ${(tt.vars||tt).palette.divider}`},et.variant==="elevation"&&_extends$u({boxShadow:(tt.vars||tt).shadows[et.elevation]},!tt.vars&&tt.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${alpha$1("#fff",getOverlayAlpha$1(et.elevation))}, ${alpha$1("#fff",getOverlayAlpha$1(et.elevation))})`},tt.vars&&{backgroundImage:(nt=tt.vars.overlays)==null?void 0:nt[et.elevation]}))}),Paper=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiPaper"}),{className:it,component:ot="div",elevation:at=1,square:st=!1,variant:lt="elevation"}=rt,ct=_objectWithoutPropertiesLoose$m(rt,_excluded$1v),ut=_extends$u({},rt,{component:ot,elevation:at,square:st,variant:lt}),ht=useUtilityClasses$U(ut);return jsxRuntimeExports.jsx(PaperRoot,_extends$u({as:ot,ownerState:ut,className:clsx$3(ht.root,it),ref:nt},ct))}),Paper$1=Paper;function Ripple(tt){const{className:et,classes:nt,pulsate:rt=!1,rippleX:it,rippleY:ot,rippleSize:at,in:st,onExited:lt,timeout:ct}=tt,[ut,ht]=reactExports.useState(!1),dt=clsx$3(et,nt.ripple,nt.rippleVisible,rt&&nt.ripplePulsate),pt={width:at,height:at,top:-(at/2)+ot,left:-(at/2)+it},mt=clsx$3(nt.child,ut&&nt.childLeaving,rt&&nt.childPulsate);return!st&&!ut&&ht(!0),reactExports.useEffect(()=>{if(!st&<!=null){const gt=setTimeout(lt,ct);return()=>{clearTimeout(gt)}}},[lt,st,ct]),jsxRuntimeExports.jsx("span",{className:dt,style:pt,children:jsxRuntimeExports.jsx("span",{className:mt})})}const touchRippleClasses=generateUtilityClasses("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),touchRippleClasses$1=touchRippleClasses,_excluded$1u=["center","classes","className"];let _$1=tt=>tt,_t$1,_t2$1,_t3$1,_t4$1;const DURATION=550,DELAY_RIPPLE=80,enterKeyframe=keyframes(_t$1||(_t$1=_$1` + */function styled$3(tt,et){return newStyled(tt,et)}const internal_processStyles=(tt,et)=>{Array.isArray(tt.__emotion_styles)&&(tt.__emotion_styles=et(tt.__emotion_styles))},_excluded$1K=["values","unit","step"],sortBreakpointsValues=tt=>{const et=Object.keys(tt).map(nt=>({key:nt,val:tt[nt]}))||[];return et.sort((nt,rt)=>nt.val-rt.val),et.reduce((nt,rt)=>_extends$u({},nt,{[rt.key]:rt.val}),{})};function createBreakpoints(tt){const{values:et={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:nt="px",step:rt=5}=tt,it=_objectWithoutPropertiesLoose$m(tt,_excluded$1K),ot=sortBreakpointsValues(et),at=Object.keys(ot);function st(dt){return`@media (min-width:${typeof et[dt]=="number"?et[dt]:dt}${nt})`}function lt(dt){return`@media (max-width:${(typeof et[dt]=="number"?et[dt]:dt)-rt/100}${nt})`}function ct(dt,pt){const mt=at.indexOf(pt);return`@media (min-width:${typeof et[dt]=="number"?et[dt]:dt}${nt}) and (max-width:${(mt!==-1&&typeof et[at[mt]]=="number"?et[at[mt]]:pt)-rt/100}${nt})`}function ut(dt){return at.indexOf(dt)+1`@media (min-width:${values$1[tt]}px)`};function handleBreakpoints(tt,et,nt){const rt=tt.theme||{};if(Array.isArray(et)){const ot=rt.breakpoints||defaultBreakpoints;return et.reduce((at,st,lt)=>(at[ot.up(ot.keys[lt])]=nt(et[lt]),at),{})}if(typeof et=="object"){const ot=rt.breakpoints||defaultBreakpoints;return Object.keys(et).reduce((at,st)=>{if(Object.keys(ot.values||values$1).indexOf(st)!==-1){const lt=ot.up(st);at[lt]=nt(et[st],st)}else{const lt=st;at[lt]=et[lt]}return at},{})}return nt(et)}function createEmptyBreakpointObject(tt={}){var et;return((et=tt.keys)==null?void 0:et.reduce((rt,it)=>{const ot=tt.up(it);return rt[ot]={},rt},{}))||{}}function removeUnusedBreakpoints(tt,et){return tt.reduce((nt,rt)=>{const it=nt[rt];return(!it||Object.keys(it).length===0)&&delete nt[rt],nt},et)}function mergeBreakpointsInOrder(tt,...et){const nt=createEmptyBreakpointObject(tt),rt=[nt,...et].reduce((it,ot)=>deepmerge$1(it,ot),{});return removeUnusedBreakpoints(Object.keys(nt),rt)}function computeBreakpointsBase(tt,et){if(typeof tt!="object")return{};const nt={},rt=Object.keys(et);return Array.isArray(tt)?rt.forEach((it,ot)=>{ot{tt[it]!=null&&(nt[it]=!0)}),nt}function resolveBreakpointValues({values:tt,breakpoints:et,base:nt}){const rt=nt||computeBreakpointsBase(tt,et),it=Object.keys(rt);if(it.length===0)return tt;let ot;return it.reduce((at,st,lt)=>(Array.isArray(tt)?(at[st]=tt[lt]!=null?tt[lt]:tt[ot],ot=lt):typeof tt=="object"?(at[st]=tt[st]!=null?tt[st]:tt[ot],ot=st):at[st]=tt,at),{})}function getPath$2(tt,et,nt=!0){if(!et||typeof et!="string")return null;if(tt&&tt.vars&&nt){const rt=`vars.${et}`.split(".").reduce((it,ot)=>it&&it[ot]?it[ot]:null,tt);if(rt!=null)return rt}return et.split(".").reduce((rt,it)=>rt&&rt[it]!=null?rt[it]:null,tt)}function getStyleValue$1(tt,et,nt,rt=nt){let it;return typeof tt=="function"?it=tt(nt):Array.isArray(tt)?it=tt[nt]||rt:it=getPath$2(tt,nt)||rt,et&&(it=et(it,rt,tt)),it}function style$5(tt){const{prop:et,cssProperty:nt=tt.prop,themeKey:rt,transform:it}=tt,ot=at=>{if(at[et]==null)return null;const st=at[et],lt=at.theme,ct=getPath$2(lt,rt)||{};return handleBreakpoints(at,st,ht=>{let dt=getStyleValue$1(ct,it,ht);return ht===dt&&typeof ht=="string"&&(dt=getStyleValue$1(ct,it,`${et}${ht==="default"?"":capitalize(ht)}`,ht)),nt===!1?dt:{[nt]:dt}})};return ot.propTypes={},ot.filterProps=[et],ot}function memoize$3(tt){const et={};return nt=>(et[nt]===void 0&&(et[nt]=tt(nt)),et[nt])}const properties={m:"margin",p:"padding"},directions={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},aliases$1={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},getCssProperties=memoize$3(tt=>{if(tt.length>2)if(aliases$1[tt])tt=aliases$1[tt];else return[tt];const[et,nt]=tt.split(""),rt=properties[et],it=directions[nt]||"";return Array.isArray(it)?it.map(ot=>rt+ot):[rt+it]}),marginKeys=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],paddingKeys=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...marginKeys,...paddingKeys];function createUnaryUnit(tt,et,nt,rt){var it;const ot=(it=getPath$2(tt,et,!1))!=null?it:nt;return typeof ot=="number"?at=>typeof at=="string"?at:ot*at:Array.isArray(ot)?at=>typeof at=="string"?at:ot[at]:typeof ot=="function"?ot:()=>{}}function createUnarySpacing(tt){return createUnaryUnit(tt,"spacing",8)}function getValue$3(tt,et){if(typeof et=="string"||et==null)return et;const nt=Math.abs(et),rt=tt(nt);return et>=0?rt:typeof rt=="number"?-rt:`-${rt}`}function getStyleFromPropValue(tt,et){return nt=>tt.reduce((rt,it)=>(rt[it]=getValue$3(et,nt),rt),{})}function resolveCssProperty(tt,et,nt,rt){if(et.indexOf(nt)===-1)return null;const it=getCssProperties(nt),ot=getStyleFromPropValue(it,rt),at=tt[nt];return handleBreakpoints(tt,at,ot)}function style$4(tt,et){const nt=createUnarySpacing(tt.theme);return Object.keys(tt).map(rt=>resolveCssProperty(tt,et,rt,nt)).reduce(merge,{})}function margin(tt){return style$4(tt,marginKeys)}margin.propTypes={};margin.filterProps=marginKeys;function padding$2(tt){return style$4(tt,paddingKeys)}padding$2.propTypes={};padding$2.filterProps=paddingKeys;function createSpacing(tt=8){if(tt.mui)return tt;const et=createUnarySpacing({spacing:tt}),nt=(...rt)=>(rt.length===0?[1]:rt).map(ot=>{const at=et(ot);return typeof at=="number"?`${at}px`:at}).join(" ");return nt.mui=!0,nt}function compose$1(...tt){const et=tt.reduce((rt,it)=>(it.filterProps.forEach(ot=>{rt[ot]=it}),rt),{}),nt=rt=>Object.keys(rt).reduce((it,ot)=>et[ot]?merge(it,et[ot](rt)):it,{});return nt.propTypes={},nt.filterProps=tt.reduce((rt,it)=>rt.concat(it.filterProps),[]),nt}function borderTransform(tt){return typeof tt!="number"?tt:`${tt}px solid`}const border$1=style$5({prop:"border",themeKey:"borders",transform:borderTransform}),borderTop=style$5({prop:"borderTop",themeKey:"borders",transform:borderTransform}),borderRight=style$5({prop:"borderRight",themeKey:"borders",transform:borderTransform}),borderBottom=style$5({prop:"borderBottom",themeKey:"borders",transform:borderTransform}),borderLeft=style$5({prop:"borderLeft",themeKey:"borders",transform:borderTransform}),borderColor=style$5({prop:"borderColor",themeKey:"palette"}),borderTopColor=style$5({prop:"borderTopColor",themeKey:"palette"}),borderRightColor=style$5({prop:"borderRightColor",themeKey:"palette"}),borderBottomColor=style$5({prop:"borderBottomColor",themeKey:"palette"}),borderLeftColor=style$5({prop:"borderLeftColor",themeKey:"palette"}),borderRadius=tt=>{if(tt.borderRadius!==void 0&&tt.borderRadius!==null){const et=createUnaryUnit(tt.theme,"shape.borderRadius",4),nt=rt=>({borderRadius:getValue$3(et,rt)});return handleBreakpoints(tt,tt.borderRadius,nt)}return null};borderRadius.propTypes={};borderRadius.filterProps=["borderRadius"];compose$1(border$1,borderTop,borderRight,borderBottom,borderLeft,borderColor,borderTopColor,borderRightColor,borderBottomColor,borderLeftColor,borderRadius);const gap=tt=>{if(tt.gap!==void 0&&tt.gap!==null){const et=createUnaryUnit(tt.theme,"spacing",8),nt=rt=>({gap:getValue$3(et,rt)});return handleBreakpoints(tt,tt.gap,nt)}return null};gap.propTypes={};gap.filterProps=["gap"];const columnGap=tt=>{if(tt.columnGap!==void 0&&tt.columnGap!==null){const et=createUnaryUnit(tt.theme,"spacing",8),nt=rt=>({columnGap:getValue$3(et,rt)});return handleBreakpoints(tt,tt.columnGap,nt)}return null};columnGap.propTypes={};columnGap.filterProps=["columnGap"];const rowGap=tt=>{if(tt.rowGap!==void 0&&tt.rowGap!==null){const et=createUnaryUnit(tt.theme,"spacing",8),nt=rt=>({rowGap:getValue$3(et,rt)});return handleBreakpoints(tt,tt.rowGap,nt)}return null};rowGap.propTypes={};rowGap.filterProps=["rowGap"];const gridColumn=style$5({prop:"gridColumn"}),gridRow=style$5({prop:"gridRow"}),gridAutoFlow=style$5({prop:"gridAutoFlow"}),gridAutoColumns=style$5({prop:"gridAutoColumns"}),gridAutoRows=style$5({prop:"gridAutoRows"}),gridTemplateColumns=style$5({prop:"gridTemplateColumns"}),gridTemplateRows=style$5({prop:"gridTemplateRows"}),gridTemplateAreas=style$5({prop:"gridTemplateAreas"}),gridArea=style$5({prop:"gridArea"});compose$1(gap,columnGap,rowGap,gridColumn,gridRow,gridAutoFlow,gridAutoColumns,gridAutoRows,gridTemplateColumns,gridTemplateRows,gridTemplateAreas,gridArea);function paletteTransform(tt,et){return et==="grey"?et:tt}const color$2=style$5({prop:"color",themeKey:"palette",transform:paletteTransform}),bgcolor=style$5({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:paletteTransform}),backgroundColor$1=style$5({prop:"backgroundColor",themeKey:"palette",transform:paletteTransform});compose$1(color$2,bgcolor,backgroundColor$1);function sizingTransform(tt){return tt<=1&&tt!==0?`${tt*100}%`:tt}const width=style$5({prop:"width",transform:sizingTransform}),maxWidth=tt=>{if(tt.maxWidth!==void 0&&tt.maxWidth!==null){const et=nt=>{var rt,it;const ot=((rt=tt.theme)==null||(rt=rt.breakpoints)==null||(rt=rt.values)==null?void 0:rt[nt])||values$1[nt];return ot?((it=tt.theme)==null||(it=it.breakpoints)==null?void 0:it.unit)!=="px"?{maxWidth:`${ot}${tt.theme.breakpoints.unit}`}:{maxWidth:ot}:{maxWidth:sizingTransform(nt)}};return handleBreakpoints(tt,tt.maxWidth,et)}return null};maxWidth.filterProps=["maxWidth"];const minWidth=style$5({prop:"minWidth",transform:sizingTransform}),height=style$5({prop:"height",transform:sizingTransform}),maxHeight=style$5({prop:"maxHeight",transform:sizingTransform}),minHeight=style$5({prop:"minHeight",transform:sizingTransform});style$5({prop:"size",cssProperty:"width",transform:sizingTransform});style$5({prop:"size",cssProperty:"height",transform:sizingTransform});const boxSizing=style$5({prop:"boxSizing"});compose$1(width,maxWidth,minWidth,height,maxHeight,minHeight,boxSizing);const defaultSxConfig={border:{themeKey:"borders",transform:borderTransform},borderTop:{themeKey:"borders",transform:borderTransform},borderRight:{themeKey:"borders",transform:borderTransform},borderBottom:{themeKey:"borders",transform:borderTransform},borderLeft:{themeKey:"borders",transform:borderTransform},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:borderRadius},color:{themeKey:"palette",transform:paletteTransform},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:paletteTransform},backgroundColor:{themeKey:"palette",transform:paletteTransform},p:{style:padding$2},pt:{style:padding$2},pr:{style:padding$2},pb:{style:padding$2},pl:{style:padding$2},px:{style:padding$2},py:{style:padding$2},padding:{style:padding$2},paddingTop:{style:padding$2},paddingRight:{style:padding$2},paddingBottom:{style:padding$2},paddingLeft:{style:padding$2},paddingX:{style:padding$2},paddingY:{style:padding$2},paddingInline:{style:padding$2},paddingInlineStart:{style:padding$2},paddingInlineEnd:{style:padding$2},paddingBlock:{style:padding$2},paddingBlockStart:{style:padding$2},paddingBlockEnd:{style:padding$2},m:{style:margin},mt:{style:margin},mr:{style:margin},mb:{style:margin},ml:{style:margin},mx:{style:margin},my:{style:margin},margin:{style:margin},marginTop:{style:margin},marginRight:{style:margin},marginBottom:{style:margin},marginLeft:{style:margin},marginX:{style:margin},marginY:{style:margin},marginInline:{style:margin},marginInlineStart:{style:margin},marginInlineEnd:{style:margin},marginBlock:{style:margin},marginBlockStart:{style:margin},marginBlockEnd:{style:margin},displayPrint:{cssProperty:!1,transform:tt=>({"@media print":{display:tt}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:gap},rowGap:{style:rowGap},columnGap:{style:columnGap},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:sizingTransform},maxWidth:{style:maxWidth},minWidth:{transform:sizingTransform},height:{transform:sizingTransform},maxHeight:{transform:sizingTransform},minHeight:{transform:sizingTransform},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},defaultSxConfig$1=defaultSxConfig;function objectsHaveSameKeys(...tt){const et=tt.reduce((rt,it)=>rt.concat(Object.keys(it)),[]),nt=new Set(et);return tt.every(rt=>nt.size===Object.keys(rt).length)}function callIfFn(tt,et){return typeof tt=="function"?tt(et):tt}function unstable_createStyleFunctionSx(){function tt(nt,rt,it,ot){const at={[nt]:rt,theme:it},st=ot[nt];if(!st)return{[nt]:rt};const{cssProperty:lt=nt,themeKey:ct,transform:ut,style:ht}=st;if(rt==null)return null;if(ct==="typography"&&rt==="inherit")return{[nt]:rt};const dt=getPath$2(it,ct)||{};return ht?ht(at):handleBreakpoints(at,rt,mt=>{let gt=getStyleValue$1(dt,ut,mt);return mt===gt&&typeof mt=="string"&&(gt=getStyleValue$1(dt,ut,`${nt}${mt==="default"?"":capitalize(mt)}`,mt)),lt===!1?gt:{[lt]:gt}})}function et(nt){var rt;const{sx:it,theme:ot={}}=nt||{};if(!it)return null;const at=(rt=ot.unstable_sxConfig)!=null?rt:defaultSxConfig$1;function st(lt){let ct=lt;if(typeof lt=="function")ct=lt(ot);else if(typeof lt!="object")return lt;if(!ct)return null;const ut=createEmptyBreakpointObject(ot.breakpoints),ht=Object.keys(ut);let dt=ut;return Object.keys(ct).forEach(pt=>{const mt=callIfFn(ct[pt],ot);if(mt!=null)if(typeof mt=="object")if(at[pt])dt=merge(dt,tt(pt,mt,ot,at));else{const gt=handleBreakpoints({theme:ot},mt,yt=>({[pt]:yt}));objectsHaveSameKeys(gt,mt)?dt[pt]=et({sx:mt,theme:ot}):dt=merge(dt,gt)}else dt=merge(dt,tt(pt,mt,ot,at))}),removeUnusedBreakpoints(ht,dt)}return Array.isArray(it)?it.map(st):st(it)}return et}const styleFunctionSx=unstable_createStyleFunctionSx();styleFunctionSx.filterProps=["sx"];const styleFunctionSx$1=styleFunctionSx,_excluded$1J=["breakpoints","palette","spacing","shape"];function createTheme$1(tt={},...et){const{breakpoints:nt={},palette:rt={},spacing:it,shape:ot={}}=tt,at=_objectWithoutPropertiesLoose$m(tt,_excluded$1J),st=createBreakpoints(nt),lt=createSpacing(it);let ct=deepmerge$1({breakpoints:st,direction:"ltr",components:{},palette:_extends$u({mode:"light"},rt),spacing:lt,shape:_extends$u({},shape$2,ot)},at);return ct=et.reduce((ut,ht)=>deepmerge$1(ut,ht),ct),ct.unstable_sxConfig=_extends$u({},defaultSxConfig$1,at==null?void 0:at.unstable_sxConfig),ct.unstable_sx=function(ht){return styleFunctionSx$1({sx:ht,theme:this})},ct}function isObjectEmpty$1(tt){return Object.keys(tt).length===0}function useTheme$3(tt=null){const et=reactExports.useContext(ThemeContext$2);return!et||isObjectEmpty$1(et)?tt:et}const systemDefaultTheme$1=createTheme$1();function useTheme$2(tt=systemDefaultTheme$1){return useTheme$3(tt)}function GlobalStyles$1({styles:tt,themeId:et,defaultTheme:nt={}}){const rt=useTheme$2(nt),it=typeof tt=="function"?tt(et&&rt[et]||rt):tt;return jsxRuntimeExports.jsx(GlobalStyles$2,{styles:it})}const _excluded$1I=["sx"],splitProps=tt=>{var et,nt;const rt={systemProps:{},otherProps:{}},it=(et=tt==null||(nt=tt.theme)==null?void 0:nt.unstable_sxConfig)!=null?et:defaultSxConfig$1;return Object.keys(tt).forEach(ot=>{it[ot]?rt.systemProps[ot]=tt[ot]:rt.otherProps[ot]=tt[ot]}),rt};function extendSxProp(tt){const{sx:et}=tt,nt=_objectWithoutPropertiesLoose$m(tt,_excluded$1I),{systemProps:rt,otherProps:it}=splitProps(nt);let ot;return Array.isArray(et)?ot=[rt,...et]:typeof et=="function"?ot=(...at)=>{const st=et(...at);return isPlainObject$1(st)?_extends$u({},rt,st):rt}:ot=_extends$u({},rt,et),_extends$u({},it,{sx:ot})}function r$9(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{it==="color"?rt+=isEmpty$3(rt)?tt[it]:capitalize(tt[it]):rt+=`${isEmpty$3(rt)?it:capitalize(it)}${capitalize(tt[it].toString())}`}),rt}const _excluded$1F=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function isEmpty$2(tt){return Object.keys(tt).length===0}function isStringTag(tt){return typeof tt=="string"&&tt.charCodeAt(0)>96}const getStyleOverrides=(tt,et)=>et.components&&et.components[tt]&&et.components[tt].styleOverrides?et.components[tt].styleOverrides:null,transformVariants=tt=>{const et={};return tt&&tt.forEach(nt=>{const rt=propsToClassKey(nt.props);et[rt]=nt.style}),et},getVariantStyles=(tt,et)=>{let nt=[];return et&&et.components&&et.components[tt]&&et.components[tt].variants&&(nt=et.components[tt].variants),transformVariants(nt)},variantsResolver=(tt,et,nt)=>{const{ownerState:rt={}}=tt,it=[];return nt&&nt.forEach(ot=>{let at=!0;Object.keys(ot.props).forEach(st=>{rt[st]!==ot.props[st]&&tt[st]!==ot.props[st]&&(at=!1)}),at&&it.push(et[propsToClassKey(ot.props)])}),it},themeVariantsResolver=(tt,et,nt,rt)=>{var it;const ot=nt==null||(it=nt.components)==null||(it=it[rt])==null?void 0:it.variants;return variantsResolver(tt,et,ot)};function shouldForwardProp(tt){return tt!=="ownerState"&&tt!=="theme"&&tt!=="sx"&&tt!=="as"}const systemDefaultTheme=createTheme$1(),lowercaseFirstLetter=tt=>tt&&tt.charAt(0).toLowerCase()+tt.slice(1);function resolveTheme({defaultTheme:tt,theme:et,themeId:nt}){return isEmpty$2(et)?tt:et[nt]||et}function defaultOverridesResolver(tt){return tt?(et,nt)=>nt[tt]:null}const muiStyledFunctionResolver=({styledArg:tt,props:et,defaultTheme:nt,themeId:rt})=>{const it=tt(_extends$u({},et,{theme:resolveTheme(_extends$u({},et,{defaultTheme:nt,themeId:rt}))}));let ot;if(it&&it.variants&&(ot=it.variants,delete it.variants),ot){const at=variantsResolver(et,transformVariants(ot),ot);return[it,...at]}return it};function createStyled(tt={}){const{themeId:et,defaultTheme:nt=systemDefaultTheme,rootShouldForwardProp:rt=shouldForwardProp,slotShouldForwardProp:it=shouldForwardProp}=tt,ot=at=>styleFunctionSx$1(_extends$u({},at,{theme:resolveTheme(_extends$u({},at,{defaultTheme:nt,themeId:et}))}));return ot.__mui_systemSx=!0,(at,st={})=>{internal_processStyles(at,kt=>kt.filter(St=>!(St!=null&&St.__mui_systemSx)));const{name:lt,slot:ct,skipVariantsResolver:ut,skipSx:ht,overridesResolver:dt=defaultOverridesResolver(lowercaseFirstLetter(ct))}=st,pt=_objectWithoutPropertiesLoose$m(st,_excluded$1F),mt=ut!==void 0?ut:ct&&ct!=="Root"&&ct!=="root"||!1,gt=ht||!1;let yt,bt=shouldForwardProp;ct==="Root"||ct==="root"?bt=rt:ct?bt=it:isStringTag(at)&&(bt=void 0);const vt=styled$3(at,_extends$u({shouldForwardProp:bt,label:yt},pt)),xt=(kt,...St)=>{const Tt=St?St.map(Dt=>{if(typeof Dt=="function"&&Dt.__emotion_real!==Dt)return jt=>muiStyledFunctionResolver({styledArg:Dt,props:jt,defaultTheme:nt,themeId:et});if(isPlainObject$1(Dt)){let jt=Dt,Pt;return Dt&&Dt.variants&&(Pt=Dt.variants,delete jt.variants,jt=Ct=>{let wt=Dt;return variantsResolver(Ct,transformVariants(Pt),Pt).forEach(Ot=>{wt=deepmerge$1(wt,Ot)}),wt}),jt}return Dt}):[];let At=kt;if(isPlainObject$1(kt)){let Dt;kt&&kt.variants&&(Dt=kt.variants,delete At.variants,At=jt=>{let Pt=kt;return variantsResolver(jt,transformVariants(Dt),Dt).forEach(wt=>{Pt=deepmerge$1(Pt,wt)}),Pt})}else typeof kt=="function"&&kt.__emotion_real!==kt&&(At=Dt=>muiStyledFunctionResolver({styledArg:kt,props:Dt,defaultTheme:nt,themeId:et}));lt&&dt&&Tt.push(Dt=>{const jt=resolveTheme(_extends$u({},Dt,{defaultTheme:nt,themeId:et})),Pt=getStyleOverrides(lt,jt);if(Pt){const Ct={};return Object.entries(Pt).forEach(([wt,It])=>{Ct[wt]=typeof It=="function"?It(_extends$u({},Dt,{theme:jt})):It}),dt(Dt,Ct)}return null}),lt&&!mt&&Tt.push(Dt=>{const jt=resolveTheme(_extends$u({},Dt,{defaultTheme:nt,themeId:et}));return themeVariantsResolver(Dt,getVariantStyles(lt,jt),jt,lt)}),gt||Tt.push(ot);const Et=Tt.length-St.length;if(Array.isArray(kt)&&Et>0){const Dt=new Array(Et).fill("");At=[...kt,...Dt],At.raw=[...kt.raw,...Dt]}const $t=vt(At,...Tt);return at.muiName&&($t.muiName=at.muiName),$t};return vt.withConfig&&(xt.withConfig=vt.withConfig),xt}}const styled$2=createStyled(),systemStyled=styled$2;function getThemeProps(tt){const{theme:et,name:nt,props:rt}=tt;return!et||!et.components||!et.components[nt]||!et.components[nt].defaultProps?rt:resolveProps(et.components[nt].defaultProps,rt)}function useThemeProps$1({props:tt,name:et,defaultTheme:nt,themeId:rt}){let it=useTheme$2(nt);return rt&&(it=it[rt]||it),getThemeProps({theme:it,name:et,props:tt})}function clamp$7(tt,et=0,nt=1){return Math.min(Math.max(et,tt),nt)}function hexToRgb(tt){tt=tt.slice(1);const et=new RegExp(`.{1,${tt.length>=6?2:1}}`,"g");let nt=tt.match(et);return nt&&nt[0].length===1&&(nt=nt.map(rt=>rt+rt)),nt?`rgb${nt.length===4?"a":""}(${nt.map((rt,it)=>it<3?parseInt(rt,16):Math.round(parseInt(rt,16)/255*1e3)/1e3).join(", ")})`:""}function decomposeColor(tt){if(tt.type)return tt;if(tt.charAt(0)==="#")return decomposeColor(hexToRgb(tt));const et=tt.indexOf("("),nt=tt.substring(0,et);if(["rgb","rgba","hsl","hsla","color"].indexOf(nt)===-1)throw new Error(formatMuiErrorMessage(9,tt));let rt=tt.substring(et+1,tt.length-1),it;if(nt==="color"){if(rt=rt.split(" "),it=rt.shift(),rt.length===4&&rt[3].charAt(0)==="/"&&(rt[3]=rt[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(it)===-1)throw new Error(formatMuiErrorMessage(10,it))}else rt=rt.split(",");return rt=rt.map(ot=>parseFloat(ot)),{type:nt,values:rt,colorSpace:it}}function recomposeColor(tt){const{type:et,colorSpace:nt}=tt;let{values:rt}=tt;return et.indexOf("rgb")!==-1?rt=rt.map((it,ot)=>ot<3?parseInt(it,10):it):et.indexOf("hsl")!==-1&&(rt[1]=`${rt[1]}%`,rt[2]=`${rt[2]}%`),et.indexOf("color")!==-1?rt=`${nt} ${rt.join(" ")}`:rt=`${rt.join(", ")}`,`${et}(${rt})`}function hslToRgb(tt){tt=decomposeColor(tt);const{values:et}=tt,nt=et[0],rt=et[1]/100,it=et[2]/100,ot=rt*Math.min(it,1-it),at=(ct,ut=(ct+nt/30)%12)=>it-ot*Math.max(Math.min(ut-3,9-ut,1),-1);let st="rgb";const lt=[Math.round(at(0)*255),Math.round(at(8)*255),Math.round(at(4)*255)];return tt.type==="hsla"&&(st+="a",lt.push(et[3])),recomposeColor({type:st,values:lt})}function getLuminance(tt){tt=decomposeColor(tt);let et=tt.type==="hsl"||tt.type==="hsla"?decomposeColor(hslToRgb(tt)).values:tt.values;return et=et.map(nt=>(tt.type!=="color"&&(nt/=255),nt<=.03928?nt/12.92:((nt+.055)/1.055)**2.4)),Number((.2126*et[0]+.7152*et[1]+.0722*et[2]).toFixed(3))}function getContrastRatio(tt,et){const nt=getLuminance(tt),rt=getLuminance(et);return(Math.max(nt,rt)+.05)/(Math.min(nt,rt)+.05)}function alpha$1(tt,et){return tt=decomposeColor(tt),et=clamp$7(et),(tt.type==="rgb"||tt.type==="hsl")&&(tt.type+="a"),tt.type==="color"?tt.values[3]=`/${et}`:tt.values[3]=et,recomposeColor(tt)}function darken(tt,et){if(tt=decomposeColor(tt),et=clamp$7(et),tt.type.indexOf("hsl")!==-1)tt.values[2]*=1-et;else if(tt.type.indexOf("rgb")!==-1||tt.type.indexOf("color")!==-1)for(let nt=0;nt<3;nt+=1)tt.values[nt]*=1-et;return recomposeColor(tt)}function lighten(tt,et){if(tt=decomposeColor(tt),et=clamp$7(et),tt.type.indexOf("hsl")!==-1)tt.values[2]+=(100-tt.values[2])*et;else if(tt.type.indexOf("rgb")!==-1)for(let nt=0;nt<3;nt+=1)tt.values[nt]+=(255-tt.values[nt])*et;else if(tt.type.indexOf("color")!==-1)for(let nt=0;nt<3;nt+=1)tt.values[nt]+=(1-tt.values[nt])*et;return recomposeColor(tt)}const ThemeContext=reactExports.createContext(null),ThemeContext$1=ThemeContext;function useTheme$1(){return reactExports.useContext(ThemeContext$1)}const hasSymbol=typeof Symbol=="function"&&Symbol.for,nested=hasSymbol?Symbol.for("mui.nested"):"__THEME_NESTED__";function mergeOuterLocalTheme(tt,et){return typeof et=="function"?et(tt):_extends$u({},tt,et)}function ThemeProvider$2(tt){const{children:et,theme:nt}=tt,rt=useTheme$1(),it=reactExports.useMemo(()=>{const ot=rt===null?nt:mergeOuterLocalTheme(rt,nt);return ot!=null&&(ot[nested]=rt!==null),ot},[nt,rt]);return jsxRuntimeExports.jsx(ThemeContext$1.Provider,{value:it,children:et})}const EMPTY_THEME={};function useThemeScoping(tt,et,nt,rt=!1){return reactExports.useMemo(()=>{const it=tt&&et[tt]||et;if(typeof nt=="function"){const ot=nt(it),at=tt?_extends$u({},et,{[tt]:ot}):ot;return rt?()=>at:at}return tt?_extends$u({},et,{[tt]:nt}):_extends$u({},et,nt)},[tt,et,nt,rt])}function ThemeProvider$1(tt){const{children:et,theme:nt,themeId:rt}=tt,it=useTheme$3(EMPTY_THEME),ot=useTheme$1()||EMPTY_THEME,at=useThemeScoping(rt,it,nt),st=useThemeScoping(rt,ot,nt,!0);return jsxRuntimeExports.jsx(ThemeProvider$2,{theme:st,children:jsxRuntimeExports.jsx(ThemeContext$2.Provider,{value:at,children:et})})}const _excluded$1E=["component","direction","spacing","divider","children","className","useFlexGap"],defaultTheme$2=createTheme$1(),defaultCreateStyledComponent=systemStyled("div",{name:"MuiStack",slot:"Root",overridesResolver:(tt,et)=>et.root});function useThemePropsDefault(tt){return useThemeProps$1({props:tt,name:"MuiStack",defaultTheme:defaultTheme$2})}function joinChildren(tt,et){const nt=reactExports.Children.toArray(tt).filter(Boolean);return nt.reduce((rt,it,ot)=>(rt.push(it),ot({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[tt],style$3=({ownerState:tt,theme:et})=>{let nt=_extends$u({display:"flex",flexDirection:"column"},handleBreakpoints({theme:et},resolveBreakpointValues({values:tt.direction,breakpoints:et.breakpoints.values}),rt=>({flexDirection:rt})));if(tt.spacing){const rt=createUnarySpacing(et),it=Object.keys(et.breakpoints.values).reduce((lt,ct)=>((typeof tt.spacing=="object"&&tt.spacing[ct]!=null||typeof tt.direction=="object"&&tt.direction[ct]!=null)&&(lt[ct]=!0),lt),{}),ot=resolveBreakpointValues({values:tt.direction,base:it}),at=resolveBreakpointValues({values:tt.spacing,base:it});typeof ot=="object"&&Object.keys(ot).forEach((lt,ct,ut)=>{if(!ot[lt]){const dt=ct>0?ot[ut[ct-1]]:"column";ot[lt]=dt}}),nt=deepmerge$1(nt,handleBreakpoints({theme:et},at,(lt,ct)=>tt.useFlexGap?{gap:getValue$3(rt,lt)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${getSideFromDirection(ct?ot[ct]:tt.direction)}`]:getValue$3(rt,lt)}}))}return nt=mergeBreakpointsInOrder(et.breakpoints,nt),nt};function createStack(tt={}){const{createStyledComponent:et=defaultCreateStyledComponent,useThemeProps:nt=useThemePropsDefault,componentName:rt="MuiStack"}=tt,it=()=>composeClasses({root:["root"]},lt=>generateUtilityClass(rt,lt),{}),ot=et(style$3);return reactExports.forwardRef(function(lt,ct){const ut=nt(lt),ht=extendSxProp(ut),{component:dt="div",direction:pt="column",spacing:mt=0,divider:gt,children:yt,className:bt,useFlexGap:vt=!1}=ht,xt=_objectWithoutPropertiesLoose$m(ht,_excluded$1E),kt={direction:pt,spacing:mt,useFlexGap:vt},St=it();return jsxRuntimeExports.jsx(ot,_extends$u({as:dt,ownerState:kt,ref:ct,className:clsx$4(St.root,bt)},xt,{children:gt?joinChildren(yt,gt):yt}))})}function createMixins(tt,et){return _extends$u({toolbar:{minHeight:56,[tt.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[tt.up("sm")]:{minHeight:64}}},et)}const _excluded$1D=["mode","contrastThreshold","tonalOffset"],light={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:common$8.white,default:common$8.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},dark={text:{primary:common$8.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:common$8.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function addLightOrDark(tt,et,nt,rt){const it=rt.light||rt,ot=rt.dark||rt*1.5;tt[et]||(tt.hasOwnProperty(nt)?tt[et]=tt[nt]:et==="light"?tt.light=lighten(tt.main,it):et==="dark"&&(tt.dark=darken(tt.main,ot)))}function getDefaultPrimary(tt="light"){return tt==="dark"?{main:blue$1[200],light:blue$1[50],dark:blue$1[400]}:{main:blue$1[700],light:blue$1[400],dark:blue$1[800]}}function getDefaultSecondary(tt="light"){return tt==="dark"?{main:purple$1[200],light:purple$1[50],dark:purple$1[400]}:{main:purple$1[500],light:purple$1[300],dark:purple$1[700]}}function getDefaultError(tt="light"){return tt==="dark"?{main:red$1[500],light:red$1[300],dark:red$1[700]}:{main:red$1[700],light:red$1[400],dark:red$1[800]}}function getDefaultInfo(tt="light"){return tt==="dark"?{main:lightBlue$1[400],light:lightBlue$1[300],dark:lightBlue$1[700]}:{main:lightBlue$1[700],light:lightBlue$1[500],dark:lightBlue$1[900]}}function getDefaultSuccess(tt="light"){return tt==="dark"?{main:green$1[400],light:green$1[300],dark:green$1[700]}:{main:green$1[800],light:green$1[500],dark:green$1[900]}}function getDefaultWarning(tt="light"){return tt==="dark"?{main:orange$1[400],light:orange$1[300],dark:orange$1[700]}:{main:"#ed6c02",light:orange$1[500],dark:orange$1[900]}}function createPalette(tt){const{mode:et="light",contrastThreshold:nt=3,tonalOffset:rt=.2}=tt,it=_objectWithoutPropertiesLoose$m(tt,_excluded$1D),ot=tt.primary||getDefaultPrimary(et),at=tt.secondary||getDefaultSecondary(et),st=tt.error||getDefaultError(et),lt=tt.info||getDefaultInfo(et),ct=tt.success||getDefaultSuccess(et),ut=tt.warning||getDefaultWarning(et);function ht(gt){return getContrastRatio(gt,dark.text.primary)>=nt?dark.text.primary:light.text.primary}const dt=({color:gt,name:yt,mainShade:bt=500,lightShade:vt=300,darkShade:xt=700})=>{if(gt=_extends$u({},gt),!gt.main&>[bt]&&(gt.main=gt[bt]),!gt.hasOwnProperty("main"))throw new Error(formatMuiErrorMessage(11,yt?` (${yt})`:"",bt));if(typeof gt.main!="string")throw new Error(formatMuiErrorMessage(12,yt?` (${yt})`:"",JSON.stringify(gt.main)));return addLightOrDark(gt,"light",vt,rt),addLightOrDark(gt,"dark",xt,rt),gt.contrastText||(gt.contrastText=ht(gt.main)),gt},pt={dark,light};return deepmerge$1(_extends$u({common:_extends$u({},common$8),mode:et,primary:dt({color:ot,name:"primary"}),secondary:dt({color:at,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:dt({color:st,name:"error"}),warning:dt({color:ut,name:"warning"}),info:dt({color:lt,name:"info"}),success:dt({color:ct,name:"success"}),grey:grey$1,contrastThreshold:nt,getContrastText:ht,augmentColor:dt,tonalOffset:rt},pt[et]),it)}const _excluded$1C=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function round$3(tt){return Math.round(tt*1e5)/1e5}const caseAllCaps={textTransform:"uppercase"},defaultFontFamily='"Roboto", "Helvetica", "Arial", sans-serif';function createTypography(tt,et){const nt=typeof et=="function"?et(tt):et,{fontFamily:rt=defaultFontFamily,fontSize:it=14,fontWeightLight:ot=300,fontWeightRegular:at=400,fontWeightMedium:st=500,fontWeightBold:lt=700,htmlFontSize:ct=16,allVariants:ut,pxToRem:ht}=nt,dt=_objectWithoutPropertiesLoose$m(nt,_excluded$1C),pt=it/14,mt=ht||(bt=>`${bt/ct*pt}rem`),gt=(bt,vt,xt,kt,St)=>_extends$u({fontFamily:rt,fontWeight:bt,fontSize:mt(vt),lineHeight:xt},rt===defaultFontFamily?{letterSpacing:`${round$3(kt/vt)}em`}:{},St,ut),yt={h1:gt(ot,96,1.167,-1.5),h2:gt(ot,60,1.2,-.5),h3:gt(at,48,1.167,0),h4:gt(at,34,1.235,.25),h5:gt(at,24,1.334,0),h6:gt(st,20,1.6,.15),subtitle1:gt(at,16,1.75,.15),subtitle2:gt(st,14,1.57,.1),body1:gt(at,16,1.5,.15),body2:gt(at,14,1.43,.15),button:gt(st,14,1.75,.4,caseAllCaps),caption:gt(at,12,1.66,.4),overline:gt(at,12,2.66,1,caseAllCaps),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return deepmerge$1(_extends$u({htmlFontSize:ct,pxToRem:mt,fontFamily:rt,fontSize:it,fontWeightLight:ot,fontWeightRegular:at,fontWeightMedium:st,fontWeightBold:lt},yt),dt,{clone:!1})}const shadowKeyUmbraOpacity=.2,shadowKeyPenumbraOpacity=.14,shadowAmbientShadowOpacity=.12;function createShadow(...tt){return[`${tt[0]}px ${tt[1]}px ${tt[2]}px ${tt[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`,`${tt[4]}px ${tt[5]}px ${tt[6]}px ${tt[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`,`${tt[8]}px ${tt[9]}px ${tt[10]}px ${tt[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(",")}const shadows=["none",createShadow(0,2,1,-1,0,1,1,0,0,1,3,0),createShadow(0,3,1,-2,0,2,2,0,0,1,5,0),createShadow(0,3,3,-2,0,3,4,0,0,1,8,0),createShadow(0,2,4,-1,0,4,5,0,0,1,10,0),createShadow(0,3,5,-1,0,5,8,0,0,1,14,0),createShadow(0,3,5,-1,0,6,10,0,0,1,18,0),createShadow(0,4,5,-2,0,7,10,1,0,2,16,1),createShadow(0,5,5,-3,0,8,10,1,0,3,14,2),createShadow(0,5,6,-3,0,9,12,1,0,3,16,2),createShadow(0,6,6,-3,0,10,14,1,0,4,18,3),createShadow(0,6,7,-4,0,11,15,1,0,4,20,3),createShadow(0,7,8,-4,0,12,17,2,0,5,22,4),createShadow(0,7,8,-4,0,13,19,2,0,5,24,4),createShadow(0,7,9,-4,0,14,21,2,0,5,26,4),createShadow(0,8,9,-5,0,15,22,2,0,6,28,5),createShadow(0,8,10,-5,0,16,24,2,0,6,30,5),createShadow(0,8,11,-5,0,17,26,2,0,6,32,5),createShadow(0,9,11,-5,0,18,28,2,0,7,34,6),createShadow(0,9,12,-6,0,19,29,2,0,7,36,6),createShadow(0,10,13,-6,0,20,31,3,0,8,38,7),createShadow(0,10,13,-6,0,21,33,3,0,8,40,7),createShadow(0,10,14,-6,0,22,35,3,0,8,42,7),createShadow(0,11,14,-7,0,23,36,3,0,9,44,8),createShadow(0,11,15,-7,0,24,38,3,0,9,46,8)],shadows$1=shadows,_excluded$1B=["duration","easing","delay"],easing$1={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function formatMs(tt){return`${Math.round(tt)}ms`}function getAutoHeightDuration(tt){if(!tt)return 0;const et=tt/36;return Math.round((4+15*et**.25+et/5)*10)}function createTransitions(tt){const et=_extends$u({},easing$1,tt.easing),nt=_extends$u({},duration,tt.duration);return _extends$u({getAutoHeightDuration,create:(it=["all"],ot={})=>{const{duration:at=nt.standard,easing:st=et.easeInOut,delay:lt=0}=ot;return _objectWithoutPropertiesLoose$m(ot,_excluded$1B),(Array.isArray(it)?it:[it]).map(ct=>`${ct} ${typeof at=="string"?at:formatMs(at)} ${st} ${typeof lt=="string"?lt:formatMs(lt)}`).join(",")}},tt,{easing:et,duration:nt})}const zIndex={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},zIndex$1=zIndex,_excluded$1A=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function createTheme(tt={},...et){const{mixins:nt={},palette:rt={},transitions:it={},typography:ot={}}=tt,at=_objectWithoutPropertiesLoose$m(tt,_excluded$1A);if(tt.vars)throw new Error(formatMuiErrorMessage(18));const st=createPalette(rt),lt=createTheme$1(tt);let ct=deepmerge$1(lt,{mixins:createMixins(lt.breakpoints,nt),palette:st,shadows:shadows$1.slice(),typography:createTypography(st,ot),transitions:createTransitions(it),zIndex:_extends$u({},zIndex$1)});return ct=deepmerge$1(ct,at),ct=et.reduce((ut,ht)=>deepmerge$1(ut,ht),ct),ct.unstable_sxConfig=_extends$u({},defaultSxConfig$1,at==null?void 0:at.unstable_sxConfig),ct.unstable_sx=function(ht){return styleFunctionSx$1({sx:ht,theme:this})},ct}function getUnit$1(tt){return String(tt).match(/[\d.\-+]*\s*(.*)/)[1]||""}function toUnitless(tt){return parseFloat(tt)}const defaultTheme=createTheme(),defaultTheme$1=defaultTheme;function useTheme(){const tt=useTheme$2(defaultTheme$1);return tt[THEME_ID]||tt}function useThemeProps({props:tt,name:et}){return useThemeProps$1({props:tt,name:et,defaultTheme:defaultTheme$1,themeId:THEME_ID})}const rootShouldForwardProp=tt=>shouldForwardProp(tt)&&tt!=="classes",slotShouldForwardProp=shouldForwardProp,styled=createStyled({themeId:THEME_ID,defaultTheme:defaultTheme$1,rootShouldForwardProp}),styled$1=styled,_excluded$1z=["theme"];function ThemeProvider(tt){let{theme:et}=tt,nt=_objectWithoutPropertiesLoose$m(tt,_excluded$1z);const rt=et[THEME_ID];return jsxRuntimeExports.jsx(ThemeProvider$1,_extends$u({},nt,{themeId:rt?THEME_ID:void 0,theme:rt||et}))}const getOverlayAlpha=tt=>{let et;return tt<1?et=5.11916*tt**2:et=4.5*Math.log(tt+1)+2,(et/100).toFixed(2)},getOverlayAlpha$1=getOverlayAlpha;function r$8(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{const{color:et,fontSize:nt,classes:rt}=tt,it={root:["root",et!=="inherit"&&`color${capitalize(et)}`,`fontSize${capitalize(nt)}`]};return composeClasses(it,getSvgIconUtilityClass,rt)},SvgIconRoot=styled$1("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,nt.color!=="inherit"&&et[`color${capitalize(nt.color)}`],et[`fontSize${capitalize(nt.fontSize)}`]]}})(({theme:tt,ownerState:et})=>{var nt,rt,it,ot,at,st,lt,ct,ut,ht,dt,pt,mt;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:et.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(nt=tt.transitions)==null||(rt=nt.create)==null?void 0:rt.call(nt,"fill",{duration:(it=tt.transitions)==null||(it=it.duration)==null?void 0:it.shorter}),fontSize:{inherit:"inherit",small:((ot=tt.typography)==null||(at=ot.pxToRem)==null?void 0:at.call(ot,20))||"1.25rem",medium:((st=tt.typography)==null||(lt=st.pxToRem)==null?void 0:lt.call(st,24))||"1.5rem",large:((ct=tt.typography)==null||(ut=ct.pxToRem)==null?void 0:ut.call(ct,35))||"2.1875rem"}[et.fontSize],color:(ht=(dt=(tt.vars||tt).palette)==null||(dt=dt[et.color])==null?void 0:dt.main)!=null?ht:{action:(pt=(tt.vars||tt).palette)==null||(pt=pt.action)==null?void 0:pt.active,disabled:(mt=(tt.vars||tt).palette)==null||(mt=mt.action)==null?void 0:mt.disabled,inherit:void 0}[et.color]}}),SvgIcon=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiSvgIcon"}),{children:it,className:ot,color:at="inherit",component:st="svg",fontSize:lt="medium",htmlColor:ct,inheritViewBox:ut=!1,titleAccess:ht,viewBox:dt="0 0 24 24"}=rt,pt=_objectWithoutPropertiesLoose$m(rt,_excluded$1y),mt=reactExports.isValidElement(it)&&it.type==="svg",gt=_extends$u({},rt,{color:at,component:st,fontSize:lt,instanceFontSize:et.fontSize,inheritViewBox:ut,viewBox:dt,hasSvgAsChild:mt}),yt={};ut||(yt.viewBox=dt);const bt=useUtilityClasses$W(gt);return jsxRuntimeExports.jsxs(SvgIconRoot,_extends$u({as:st,className:clsx$3(bt.root,ot),focusable:"false",color:ct,"aria-hidden":ht?void 0:!0,role:ht?"img":void 0,ref:nt},yt,pt,mt&&it.props,{ownerState:gt,children:[mt?it.props.children:it,ht?jsxRuntimeExports.jsx("title",{children:ht}):null]}))});SvgIcon.muiName="SvgIcon";const SvgIcon$1=SvgIcon;function createSvgIcon(tt,et){function nt(rt,it){return jsxRuntimeExports.jsx(SvgIcon$1,_extends$u({"data-testid":`${et}Icon`,ref:it},rt,{children:tt}))}return nt.muiName=SvgIcon$1.muiName,reactExports.memo(reactExports.forwardRef(nt))}function _setPrototypeOf$c(tt,et){return _setPrototypeOf$c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,it){return rt.__proto__=it,rt},_setPrototypeOf$c(tt,et)}function _inheritsLoose$2(tt,et){tt.prototype=Object.create(et.prototype),tt.prototype.constructor=tt,_setPrototypeOf$c(tt,et)}function hasClass(tt,et){return tt.classList?!!et&&tt.classList.contains(et):(" "+(tt.className.baseVal||tt.className)+" ").indexOf(" "+et+" ")!==-1}function addClass(tt,et){tt.classList?tt.classList.add(et):hasClass(tt,et)||(typeof tt.className=="string"?tt.className=tt.className+" "+et:tt.setAttribute("class",(tt.className&&tt.className.baseVal||"")+" "+et))}function replaceClassName(tt,et){return tt.replace(new RegExp("(^|\\s)"+et+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function removeClass$1(tt,et){tt.classList?tt.classList.remove(et):typeof tt.className=="string"?tt.className=replaceClassName(tt.className,et):tt.setAttribute("class",replaceClassName(tt.className&&tt.className.baseVal||"",et))}const config$2={disabled:!1},TransitionGroupContext=React$1.createContext(null);var forceReflow=function(et){return et.scrollTop},UNMOUNTED="unmounted",EXITED="exited",ENTERING="entering",ENTERED="entered",EXITING="exiting",Transition$1=function(tt){_inheritsLoose$2(et,tt);function et(rt,it){var ot;ot=tt.call(this,rt,it)||this;var at=it,st=at&&!at.isMounting?rt.enter:rt.appear,lt;return ot.appearStatus=null,rt.in?st?(lt=EXITED,ot.appearStatus=ENTERING):lt=ENTERED:rt.unmountOnExit||rt.mountOnEnter?lt=UNMOUNTED:lt=EXITED,ot.state={status:lt},ot.nextCallback=null,ot}et.getDerivedStateFromProps=function(it,ot){var at=it.in;return at&&ot.status===UNMOUNTED?{status:EXITED}:null};var nt=et.prototype;return nt.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},nt.componentDidUpdate=function(it){var ot=null;if(it!==this.props){var at=this.state.status;this.props.in?at!==ENTERING&&at!==ENTERED&&(ot=ENTERING):(at===ENTERING||at===ENTERED)&&(ot=EXITING)}this.updateStatus(!1,ot)},nt.componentWillUnmount=function(){this.cancelNextCallback()},nt.getTimeouts=function(){var it=this.props.timeout,ot,at,st;return ot=at=st=it,it!=null&&typeof it!="number"&&(ot=it.exit,at=it.enter,st=it.appear!==void 0?it.appear:at),{exit:ot,enter:at,appear:st}},nt.updateStatus=function(it,ot){if(it===void 0&&(it=!1),ot!==null)if(this.cancelNextCallback(),ot===ENTERING){if(this.props.unmountOnExit||this.props.mountOnEnter){var at=this.props.nodeRef?this.props.nodeRef.current:ReactDOM.findDOMNode(this);at&&forceReflow(at)}this.performEnter(it)}else this.performExit();else this.props.unmountOnExit&&this.state.status===EXITED&&this.setState({status:UNMOUNTED})},nt.performEnter=function(it){var ot=this,at=this.props.enter,st=this.context?this.context.isMounting:it,lt=this.props.nodeRef?[st]:[ReactDOM.findDOMNode(this),st],ct=lt[0],ut=lt[1],ht=this.getTimeouts(),dt=st?ht.appear:ht.enter;if(!it&&!at||config$2.disabled){this.safeSetState({status:ENTERED},function(){ot.props.onEntered(ct)});return}this.props.onEnter(ct,ut),this.safeSetState({status:ENTERING},function(){ot.props.onEntering(ct,ut),ot.onTransitionEnd(dt,function(){ot.safeSetState({status:ENTERED},function(){ot.props.onEntered(ct,ut)})})})},nt.performExit=function(){var it=this,ot=this.props.exit,at=this.getTimeouts(),st=this.props.nodeRef?void 0:ReactDOM.findDOMNode(this);if(!ot||config$2.disabled){this.safeSetState({status:EXITED},function(){it.props.onExited(st)});return}this.props.onExit(st),this.safeSetState({status:EXITING},function(){it.props.onExiting(st),it.onTransitionEnd(at.exit,function(){it.safeSetState({status:EXITED},function(){it.props.onExited(st)})})})},nt.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},nt.safeSetState=function(it,ot){ot=this.setNextCallback(ot),this.setState(it,ot)},nt.setNextCallback=function(it){var ot=this,at=!0;return this.nextCallback=function(st){at&&(at=!1,ot.nextCallback=null,it(st))},this.nextCallback.cancel=function(){at=!1},this.nextCallback},nt.onTransitionEnd=function(it,ot){this.setNextCallback(ot);var at=this.props.nodeRef?this.props.nodeRef.current:ReactDOM.findDOMNode(this),st=it==null&&!this.props.addEndListener;if(!at||st){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var lt=this.props.nodeRef?[this.nextCallback]:[at,this.nextCallback],ct=lt[0],ut=lt[1];this.props.addEndListener(ct,ut)}it!=null&&setTimeout(this.nextCallback,it)},nt.render=function(){var it=this.state.status;if(it===UNMOUNTED)return null;var ot=this.props,at=ot.children;ot.in,ot.mountOnEnter,ot.unmountOnExit,ot.appear,ot.enter,ot.exit,ot.timeout,ot.addEndListener,ot.onEnter,ot.onEntering,ot.onEntered,ot.onExit,ot.onExiting,ot.onExited,ot.nodeRef;var st=_objectWithoutPropertiesLoose$m(ot,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return React$1.createElement(TransitionGroupContext.Provider,{value:null},typeof at=="function"?at(it,st):React$1.cloneElement(React$1.Children.only(at),st))},et}(React$1.Component);Transition$1.contextType=TransitionGroupContext;Transition$1.propTypes={};function noop$9(){}Transition$1.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:noop$9,onEntering:noop$9,onEntered:noop$9,onExit:noop$9,onExiting:noop$9,onExited:noop$9};Transition$1.UNMOUNTED=UNMOUNTED;Transition$1.EXITED=EXITED;Transition$1.ENTERING=ENTERING;Transition$1.ENTERED=ENTERED;Transition$1.EXITING=EXITING;const Transition$2=Transition$1;var _addClass=function(et,nt){return et&&nt&&nt.split(" ").forEach(function(rt){return addClass(et,rt)})},removeClass=function(et,nt){return et&&nt&&nt.split(" ").forEach(function(rt){return removeClass$1(et,rt)})},CSSTransition=function(tt){_inheritsLoose$2(et,tt);function et(){for(var rt,it=arguments.length,ot=new Array(it),at=0;attt.scrollTop;function getTransitionProps(tt,et){var nt,rt;const{timeout:it,easing:ot,style:at={}}=tt;return{duration:(nt=at.transitionDuration)!=null?nt:typeof it=="number"?it:it[et.mode]||0,easing:(rt=at.transitionTimingFunction)!=null?rt:typeof ot=="object"?ot[et.mode]:ot,delay:at.transitionDelay}}function getPaperUtilityClass(tt){return generateUtilityClass("MuiPaper",tt)}generateUtilityClasses("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const _excluded$1x=["className","component","elevation","square","variant"],useUtilityClasses$V=tt=>{const{square:et,elevation:nt,variant:rt,classes:it}=tt,ot={root:["root",rt,!et&&"rounded",rt==="elevation"&&`elevation${nt}`]};return composeClasses(ot,getPaperUtilityClass,it)},PaperRoot=styled$1("div",{name:"MuiPaper",slot:"Root",overridesResolver:(tt,et)=>{const{ownerState:nt}=tt;return[et.root,et[nt.variant],!nt.square&&et.rounded,nt.variant==="elevation"&&et[`elevation${nt.elevation}`]]}})(({theme:tt,ownerState:et})=>{var nt;return _extends$u({backgroundColor:(tt.vars||tt).palette.background.paper,color:(tt.vars||tt).palette.text.primary,transition:tt.transitions.create("box-shadow")},!et.square&&{borderRadius:tt.shape.borderRadius},et.variant==="outlined"&&{border:`1px solid ${(tt.vars||tt).palette.divider}`},et.variant==="elevation"&&_extends$u({boxShadow:(tt.vars||tt).shadows[et.elevation]},!tt.vars&&tt.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${alpha$1("#fff",getOverlayAlpha$1(et.elevation))}, ${alpha$1("#fff",getOverlayAlpha$1(et.elevation))})`},tt.vars&&{backgroundImage:(nt=tt.vars.overlays)==null?void 0:nt[et.elevation]}))}),Paper=reactExports.forwardRef(function(et,nt){const rt=useThemeProps({props:et,name:"MuiPaper"}),{className:it,component:ot="div",elevation:at=1,square:st=!1,variant:lt="elevation"}=rt,ct=_objectWithoutPropertiesLoose$m(rt,_excluded$1x),ut=_extends$u({},rt,{component:ot,elevation:at,square:st,variant:lt}),ht=useUtilityClasses$V(ut);return jsxRuntimeExports.jsx(PaperRoot,_extends$u({as:ot,ownerState:ut,className:clsx$3(ht.root,it),ref:nt},ct))}),Paper$1=Paper;function Ripple(tt){const{className:et,classes:nt,pulsate:rt=!1,rippleX:it,rippleY:ot,rippleSize:at,in:st,onExited:lt,timeout:ct}=tt,[ut,ht]=reactExports.useState(!1),dt=clsx$3(et,nt.ripple,nt.rippleVisible,rt&&nt.ripplePulsate),pt={width:at,height:at,top:-(at/2)+ot,left:-(at/2)+it},mt=clsx$3(nt.child,ut&&nt.childLeaving,rt&&nt.childPulsate);return!st&&!ut&&ht(!0),reactExports.useEffect(()=>{if(!st&<!=null){const gt=setTimeout(lt,ct);return()=>{clearTimeout(gt)}}},[lt,st,ct]),jsxRuntimeExports.jsx("span",{className:dt,style:pt,children:jsxRuntimeExports.jsx("span",{className:mt})})}const touchRippleClasses=generateUtilityClasses("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),touchRippleClasses$1=touchRippleClasses,_excluded$1v=["center","classes","className"];let _$1=tt=>tt,_t$1,_t2$1,_t3$1,_t4$1;const DURATION=550,DELAY_RIPPLE=80,enterKeyframe=keyframes(_t$1||(_t$1=_$1` 0% { transform: scale(0); opacity: 0.1; @@ -192,8 +192,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho animation-iteration-count: infinite; 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$1u),[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$1t=["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$T=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$1t),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$T(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$1s=["edge","children","className","color","disabled","disableFocusRipple","size"],useUtilityClasses$S=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$1s),dt=_extends$u({},rt,{edge:it,color:st,disabled:lt,disableFocusRipple:ct,size:ut}),pt=useUtilityClasses$S(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$1r=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],useUtilityClasses$R=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$1r),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$R(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$1q=["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$1q),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$1p=["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$Q=()=>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$1p),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$Q(),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$1o=["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$1o),{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$1n=["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$1n),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$1m=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],useUtilityClasses$P=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$1m),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$P(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$1l=["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$O=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$1l),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$O(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$1k=["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$1k),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$1j=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],useUtilityClasses$N=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$1j),xt=_extends$u({},at,{component:ct,invisible:dt}),kt=useUtilityClasses$N(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$1i=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],useUtilityClasses$M=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$1i),Tt=_extends$u({},at,{color:lt,component:ct,disabled:ht,disableElevation:dt,disableFocusRipple:pt,fullWidth:yt,size:bt,type:xt,variant:kt}),At=useUtilityClasses$M(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$1h=["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$L=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$1h),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$L(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$1g=["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$K=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$1g),Dt=_extends$u({},rt,{disableEscapeKeyDown:dt,fullScreen:pt,fullWidth:mt,maxWidth:gt,scroll:St}),jt=useUtilityClasses$K(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$1f=["className","disableSpacing"],useUtilityClasses$J=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$1f),st=_extends$u({},rt,{disableSpacing:ot}),lt=useUtilityClasses$J(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$1e=["className","dividers"],useUtilityClasses$I=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$1e),st=_extends$u({},rt,{dividers:ot}),lt=useUtilityClasses$I(st);return jsxRuntimeExports.jsx(DialogContentRoot,_extends$u({className:clsx$3(lt.root,it),ownerState:st,ref:nt},at))}),DialogContent$1=DialogContent,dividerClasses=generateUtilityClasses("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),dividerClasses$1=dividerClasses,_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$1.root}`]:{marginTop:tt.spacing(1),marginBottom:tt.spacing(1)},[`& + .${dividerClasses$1.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=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$1=MenuItem;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=_` +`),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=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$1=MenuItem;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; } @@ -546,9 +546,9 @@ 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}`),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.",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}))}const defaultData$9={isAdmin:!1,pubKey:""},useUserStore=react(tt=>({...defaultData$9,setIsAdmin:et=>tt({isAdmin:et}),setPubKey:et=>tt({pubKey:et})})),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))}/** +`)}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){await distExports$1.enable();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 * Copyright 2010-2022 Three.js Authors * SPDX-License-Identifier: MIT @@ -3721,7 +3721,7 @@ A Bitcoin Podcast. `},{children:["1ba72c1d-ff22-4572-ad24-8171bfce9de3","5efbc2c3-e67a-4b16-9c9d-285bdd37e906"],episode_title:"Bitcoin Charlotte Book Club - Sovereign Individual Ch 1-7",guests:[{name:"Bolt",profile_picture:"https://pbs.twimg.com/profile_images/1352721439879786496/wfevZ8bG_400x400.jpg",ref_id:"b165e497-f255-4ce5-9762-30c90dcf776d",twitter_handle:"Bitcoin_CLT"},{name:"Victor",profile_picture:"https://pbs.twimg.com/profile_images/1519726025013350400/GHxSzgA3_400x400.jpg",ref_id:"d91fff8d-e4c6-4aeb-9f32-021e4a4ff9a6",twitter_handle:"victorwong"},{name:"George",profile_picture:"https://pbs.twimg.com/profile_images/1173474608856608768/vEBnPUdm_400x400.jpg",ref_id:"5946bdf6-8feb-43aa-b2ca-46b2944b0572",twitter_handle:"GeorgeNotFound"},{name:"Mark",profile_picture:"https://pbs.twimg.com/profile_images/1511102924310544387/j6E29xq6_400x400.jpg",ref_id:"c8cd0c95-c105-41c4-8fae-9dbfa76d84f2",twitter_handle:"markiplier"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/fe6bdbce-e91d-43cf-ab33-0e98bffabecc.jpg",node_type:"episode",ref_id:"9dcca755-0a20-45e5-8e4d-dfe2800b9c6f",show_title:"Bitcoin Charlotte"},{children:["821f7b5c-c6ad-422b-b4e1-ed34f915e4af"],episode_title:"TABConf Mixtape Vol 2: Sound Bites from TABConf",guests:[{name:"Michael",profile_picture:"https://pbs.twimg.com/profile_images/1558687629599657990/vf-bU14b_400x400.jpg",ref_id:"c7b4faa1-db77-4459-b03f-0e41e15efae7",twitter_handle:"MichaelHawaii"},{name:"Ben",profile_picture:"https://pbs.twimg.com/profile_images/1580596905721171969/0NnLeJWA_400x400.jpg",ref_id:"da0132b9-0d19-43e6-bc1a-9c7818c79ba4",twitter_handle:"benshapiro"},{name:"brandon",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"8a27da7a-c05c-44da-8247-3c5f68bc3164",twitter_handle:"ThrillerBitcoin"},{name:"shane",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"2e5ce678-7d04-4a48-8bd1-281329ea9424",twitter_handle:"ThrillerBitcoin"},{name:"exfrog",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"d0dc102c-404e-4753-9290-9a3fe27fe2ee",twitter_handle:"ThrillerBitcoin"},{name:"josh",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"34eb29e3-da86-485f-b20a-059f7d41f6ad",twitter_handle:"ThrillerBitcoin"},{name:"autumn",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"3224f2ec-3e77-485f-88b8-6930e19f8ac6",twitter_handle:"ThrillerBitcoin"},{name:"buck",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"00a55ec0-9b1a-482a-893a-345d350a33a0",twitter_handle:"ThrillerBitcoin"},{name:"stephen",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"9dc56711-eacc-4691-821e-fe2a26855ea9",twitter_handle:"ThrillerBitcoin"},{name:"hodl",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"b012eda0-b78c-46e7-ab46-6a7139584fc7",twitter_handle:"ThrillerBitcoin"},{name:"evan",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"9a8418e9-8976-425c-95ce-ed2fe307e380",twitter_handle:"ThrillerBitcoin"},{name:"muzz",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"444b8330-caa1-4bcf-8144-7d9110ae2242",twitter_handle:"ThrillerBitcoin"},{name:"thomas",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"e2140e58-314d-4425-bc97-20f52f951866",twitter_handle:"ThrillerBitcoin"},{name:"justin",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"2ce04090-b9b1-4e84-a87f-9c9dc9ececec",twitter_handle:"ThrillerBitcoin"},{name:"stakamoto",profile_picture:"https://pbs.twimg.com/profile_images/1575598727812812803/4FkPb0vt_400x400.jpg",ref_id:"8b249d9b-8521-4e0e-bf24-2d8b8721d26b",twitter_handle:"ThrillerBitcoin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4240c90e-0086-4ece-bfe5-84a282c5059e.jpg",node_type:"episode",ref_id:"b8289cbb-ec69-49a8-b6ab-c1fd808acc09",show_title:"Thriller Bitcoin"},{children:["c13cad10-b242-4812-ad19-3bce525dfeb0"],episode_title:"Pieter Wuille and Tim Ruffing - Nesting, ROAST, Half-Aggregation, Adaptor Signatures (part 2)",guests:[{name:"Tim Ruffing",profile_picture:"https://pbs.twimg.com/profile_images/925128264502439936/XcmMIk8k_400x400.jpg",ref_id:"222f7374-6d68-4934-81ed-37567c515b59",twitter_handle:"real_or_random"},{name:"Pieter Wuille",profile_picture:"https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg",ref_id:"40260d2f-3480-47d6-8515-d2e780901273",twitter_handle:"pwuille"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/24a144b0-7ca3-40e9-9c42-86b9fce0b662.jpg",node_type:"episode",ref_id:"daddd93e-7bc6-4c50-a150-5199b437afc9",show_title:"The Chaincode Podcast"},{children:["2a01dc8c-19f7-47a8-bfa8-92645a7314c0","1510e150-aee2-42cb-ac57-79b4997bb6cb","9abcd65c-f311-4a4a-ae65-bbef89f36fc7"],episode_title:"BR023 - OP_VAULT for Bitcoin Covenants Panel ft. James O'Beirne, Rijndael, Antoine Poinsot & Carman",guests:[{name:"Carman",profile_picture:"https://pbs.twimg.com/profile_images/1609775498971725824/5vyAafE3_400x400.jpg",ref_id:"09405d70-6fa6-4f2c-92f1-a2951ad56447",twitter_handle:"benthecarman"},{name:"Antoine Poinsot",profile_picture:"https://pbs.twimg.com/profile_images/1108377445936316423/ArRDGbr5_400x400.jpg",ref_id:"1ba10809-b3e6-4e37-a906-697a0368b814",twitter_handle:"darosior"},{name:"Rijndael",profile_picture:"https://pbs.twimg.com/profile_images/1542705395873058817/0zsy4Yur_400x400.jpg",ref_id:"861d5324-8ede-4059-826f-f29abca5d7e6",twitter_handle:"rot13maxi"},{name:"James O'Beirne",profile_picture:"https://pbs.twimg.com/profile_images/1542173995650408450/iDxrdmuj_400x400.jpg",ref_id:"e8e48fcf-9e54-4c66-9b20-aacf5c5b504e",twitter_handle:"jamesob"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg",node_type:"episode",ref_id:"56bf65e9-41d5-42e1-95d6-239e4c835781",show_title:"Bitcoin.Review Podcast with NVK & Guests"},{children:["62034201-203b-42ff-9884-a850d6298caf"],episode_title:"BR020 - Zeus, Alby, Bitcoin Knots Keys Leaked +MORE ft. Sjors, Schmidty, Evan Kaloudis & Justin Moon",guests:[{name:"Sjors",profile_picture:"",ref_id:"fa5c587a-09ef-4cbd-b470-cfc78163f749",twitter_handle:""},{name:"Evan Kaloudis",profile_picture:"https://pbs.twimg.com/profile_images/1596923848997445633/DqxrGpkW_400x400.jpg",ref_id:"420172fa-9431-4ba4-965c-adab17648d1b",twitter_handle:"evankaloudis"},{name:"Schmidty",profile_picture:"https://pbs.twimg.com/profile_images/1334879848280494083/A6ssSEfV_400x400.jpg",ref_id:"28f55137-e733-4f5b-b988-7cb60ef0d330",twitter_handle:"bitschmidty"},{name:"Justin Moon",profile_picture:"https://pbs.twimg.com/profile_images/1512674225651335169/iYHDJQcy_400x400.jpg",ref_id:"1d2cdf64-358f-4b00-8f2b-0c94f798dc2c",twitter_handle:"_JustinMoon_"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg",node_type:"episode",ref_id:"ff88a8b8-bcd6-4d86-8a65-8a68def35b9f",show_title:"Bitcoin.Review Podcast with NVK & Guests"},{children:["08600eb8-a8b1-4be4-b505-3adc409da2f8","1958362b-b149-4466-b873-4d22a36d67d8"],episode_title:"BR019 - Proof of Keys Day Twitter Space ft. Lopp, Craig Raw, Lazy Ninja, mshodl, Rijndael & guests",guests:[],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg",node_type:"episode",ref_id:"810a3acb-e30e-46bc-8c67-1d504b2e7c09",show_title:"Bitcoin.Review Podcast with NVK & Guests"},{children:["f9d1d228-19db-4a2d-bfb3-7853fd745ea0","88a4665a-7414-4ccd-96e4-3fb43f93d9bc"],episode_title:"Taproot Activation Q&A with Bitcoin Devs - TABConf 2021",guests:[{name:"Andrew Chow",profile_picture:"https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg",ref_id:"f96d87ca-5060-4021-aeb9-61db03312027",twitter_handle:"andrewrchow"},{name:"Ben Carman",profile_picture:"https://pbs.twimg.com/profile_images/1550704386007089152/pLwUSeff_400x400.jpg",ref_id:"1d1e95ba-b4af-415f-aafe-85c6dd7571b8",twitter_handle:"benthecarman"},{name:"Matt Corallo",profile_picture:"https://pbs.twimg.com/profile_images/697361498587451394/_rX0-O0W_400x400.png",ref_id:"08cb3c45-c0bc-4a60-ae5b-a1283d352c8b",twitter_handle:"TheBlueMatt"},{name:"Pieter Wuille",profile_picture:"https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg",ref_id:"40260d2f-3480-47d6-8515-d2e780901273",twitter_handle:"pwuille"},{name:"Vivek Kasarabada",profile_picture:"",ref_id:"60ed22d0-8cf3-410e-8a7c-9c343ae109ca",twitter_handle:""},{name:"Murch",profile_picture:"https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png",ref_id:"3e2c1c73-a057-4475-9782-3bb0d3d8cc62",twitter_handle:"murchandamus"},{name:"Andrew Poelstra",profile_picture:"https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg",ref_id:"15fb9c53-c988-4af1-bbf0-4832d71b0a01",twitter_handle:"Blockstream"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",node_type:"episode",ref_id:"f7e75069-adf6-41b0-9bb7-a6a2aa846493",show_title:"TABConf (The Atlanta Bitcoin Conference)"},{children:["cd29b1a1-f94b-4eee-84ce-ddf8a4fcb0c5"],episode_title:"Lightning for Plebs - TABConf 2021",guests:[{name:"ketominer",profile_picture:"https://pbs.twimg.com/profile_images/1245972079528329218/YDUD9N2Q_400x400.jpg",ref_id:"2f8b0b59-6f23-4c89-973c-668cc7666998",twitter_handle:"ketominer"},{name:"Ryan Gentry",profile_picture:"https://pbs.twimg.com/profile_images/1362751223217160203/ekMa_yY-_400x400.jpg",ref_id:"8fe78b55-bc38-40df-9cb5-ffd5c84166a2",twitter_handle:"RyanTheGentry"},{name:"Dread",profile_picture:"https://pbs.twimg.com/profile_images/1532557131819491328/vvs1cD-7_400x400.jpg",ref_id:"e61af76b-8fbd-4719-b753-0a70edd22fa8",twitter_handle:"PoleVaultDream"},{name:"Andre Neves",profile_picture:"https://pbs.twimg.com/profile_images/1604172627550969856/bYCGb7Ev_400x400.jpg",ref_id:"227e071d-f8a6-4137-8078-729fa9eb3a13",twitter_handle:"andreneves"},{name:"Nate G",profile_picture:"https://pbs.twimg.com/profile_images/1542983032507858944/9w_UUx5Z_400x400.jpg",ref_id:"bda29551-f17f-452c-9204-4d6cafdf4f3b",twitter_handle:"natecgriffin"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",node_type:"episode",ref_id:"6eb2a481-408f-4989-9f28-67789651259a",show_title:"TABConf (The Atlanta Bitcoin Conference)"},{children:["6731ba0c-c57b-4fb1-a2f6-6e1ec641e830"],episode_title:"Brink Projects: Research and Improvements for Bitcoin - TABConf 2021",guests:[{name:"Gloria Zhao",profile_picture:"https://pbs.twimg.com/profile_images/1144496084330266631/aPKPfoX3_400x400.png",ref_id:"cebd71c3-4ccf-452d-8ba7-4982f49fd060",twitter_handle:"GloriaHuiZhao"},{name:"Mike Schmidt",profile_picture:"https://pbs.twimg.com/profile_images/1320935020589158400/gFovyRlj_400x400.jpg",ref_id:"d503db9b-a7b1-49e1-8ef6-7541df3c2473",twitter_handle:"nytmike"},{name:"Jesse Posner",profile_picture:"https://pbs.twimg.com/profile_images/1467067234484830213/T6PtLZq1_400x400.jpg",ref_id:"bb55767f-dfbb-4182-8dd8-e1b08e0c6ad6",twitter_handle:"jesseposner"},{name:"Larry Ruane",profile_picture:"https://pbs.twimg.com/profile_images/1226076521/bike_crop_400x400.JPG",ref_id:"ce38f2dd-d41f-4957-ad83-671c3dc29cc5",twitter_handle:"larryruane"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",node_type:"episode",ref_id:"89049a1c-0171-4999-b003-57e1b57d92b2",show_title:"TABConf (The Atlanta Bitcoin Conference)"},{children:["acdb65ab-789f-480c-9f88-414599d19a43"],episode_title:"Scaling Bitcoin Off-Chain - TABConf 2021",guests:[{name:"Graham Krizek",profile_picture:"https://pbs.twimg.com/profile_images/1600169182347288582/yNztRz0g_400x400.jpg",ref_id:"186974f3-37dd-4d62-9d88-1b7fa88c6cce",twitter_handle:"gkrizek"},{name:"Stephen Livera",profile_picture:"https://pbs.twimg.com/profile_images/1362551718110580740/v-W5Q2uo_400x400.jpg",ref_id:"9c9974bd-6a59-480f-8d5a-12b634b15b39",twitter_handle:"stephanlivera"},{name:"Alex Bosworth",profile_picture:"https://pbs.twimg.com/profile_images/1364274244960481281/G5gNi3di_400x400.jpg",ref_id:"2389663a-f7f8-42a7-99da-551089a9ea6a",twitter_handle:"alexbosworth"},{name:"Matt Corallo",profile_picture:"https://pbs.twimg.com/profile_images/697361498587451394/_rX0-O0W_400x400.png",ref_id:"08cb3c45-c0bc-4a60-ae5b-a1283d352c8b",twitter_handle:"TheBlueMatt"},{name:"Niftynei",profile_picture:"https://pbs.twimg.com/profile_images/1594756549162975240/J-4dbH6W_400x400.jpg",ref_id:"5e9f617b-cc12-4e3d-9fb5-ad058f14b171",twitter_handle:"niftynei"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",node_type:"episode",ref_id:"d842ce17-a4c0-49a6-bdc5-5268f1d61779",show_title:"TABConf (The Atlanta Bitcoin Conference)"},{children:["65a9d9c6-3211-444a-a49f-f4a34b9ab5fb","d96fca70-c1c7-4b71-9d35-9aadf2820909"],episode_title:"Scaling Bitcoin On-Chain - TABConf 2021",guests:[{name:"Andrew Chow",profile_picture:"https://pbs.twimg.com/profile_images/1452266201770496010/44FHCtZM_400x400.jpg",ref_id:"f96d87ca-5060-4021-aeb9-61db03312027",twitter_handle:"andrewrchow"},{name:"Mark Erhardt Murch",profile_picture:"https://pbs.twimg.com/profile_images/1269477743525130241/-U843Cmt_400x400.png",ref_id:"ef2f2f68-ae16-4e78-80cb-0be9bd156988",twitter_handle:"Murchandamus"},{name:"Andrew Poelstra",profile_picture:"https://pbs.twimg.com/profile_images/1316562683009921024/FSscAYvJ_400x400.jpg",ref_id:"15fb9c53-c988-4af1-bbf0-4832d71b0a01",twitter_handle:"Blockstream"},{name:"Peter Wuille",profile_picture:"https://pbs.twimg.com/profile_images/1264051937172836353/n7gHdLbB_400x400.jpg",ref_id:"fb836ce4-a933-4419-99d8-932fe65219a1",twitter_handle:"pwuille"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",node_type:"episode",ref_id:"8d9b0689-2e69-44c1-afe2-3519e999390a",show_title:"TABConf (The Atlanta Bitcoin Conference)"},{children:["9f69933d-69fe-47a0-af4d-9d80726e60aa","f507641d-2514-41d3-a4f3-9b218136fa98","addee850-119f-472c-87c2-05fc0642abeb"],episode_title:"Cool Apps Built on Lightning - March 16, 2022 - Voltage Twitter Spaces",guests:[{name:"Chad Atkins",profile_picture:"https://pbs.twimg.com/profile_images/1200611447979544576/W9ocRJTb_400x400.jpg",ref_id:"62da3c50-0a46-400b-81a3-5f482f5b8fee",twitter_handle:"Chemchad"},{name:"Michael Atwood",profile_picture:"https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg",ref_id:"16359ade-afb9-4a37-be0b-0844a6134327",twitter_handle:"Dooowta"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",node_type:"episode",ref_id:"3b818893-4605-499c-a467-5abcc23f9483",show_title:"Voltage"},{children:["c7beffcd-bb44-4cf9-a04a-a26f6439114c","3db5f375-817e-4275-980c-6475803c430b"],episode_title:"Lightning Networks Impact on Music w/ Michael Rhee, Founder of Wavlake - Voltage Twitter Spaces",guests:[{name:"Michael Rhee",profile_picture:"https://pbs.twimg.com/profile_images/1348612450/IMG_0298_400x400.JPG",ref_id:"91302fb9-2d08-400e-bd1f-2d52e0af5508",twitter_handle:"rheedio"},{name:"@rheedio",profile_picture:"https://pbs.twimg.com/profile_images/1348612450/IMG_0298_400x400.JPG",ref_id:"a20f5e1f-5969-47a6-b986-faf29c0c4da0",twitter_handle:"rheedio"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",node_type:"episode",ref_id:"a44e78cd-dc66-4b67-9523-7ddff0d3655f",show_title:"Voltage"},{children:["f10270d7-1cdc-4922-853a-1f8247750382","d2d3e71f-24ad-4cf3-b516-f63ac5283d50"],episode_title:"TRUBIT bringing Digital Loyalty Assets to Bitcoin - Voltage Twitter Spaces",guests:[{name:"@0xLinden",profile_picture:"https://pbs.twimg.com/profile_images/1439365331202437125/JBiXogun_400x400.jpg",ref_id:"b8bb4402-8f86-4220-9dee-0fa28ff8de72",twitter_handle:"0xLinden"},{name:"Stephen Doge",profile_picture:"https://pbs.twimg.com/profile_images/1215979900387184641/nZXkhgoP_400x400.jpg",ref_id:"076972a2-cdab-4766-8c66-618472b80772",twitter_handle:"StephenDodge20"},{name:"@617a7a",profile_picture:"https://pbs.twimg.com/profile_images/1548336437308715016/FUZFJf9k_400x400.jpg",ref_id:"148d77a5-6e95-4855-9e17-19e68f648898",twitter_handle:"617a7a"},{name:"@ian__major",profile_picture:"https://pbs.twimg.com/profile_images/1427414299169984517/Hw0ux6ie_400x400.jpg",ref_id:"7ed41a74-21a4-43a4-9a05-e977c981b6d3",twitter_handle:"ian__major"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",node_type:"episode",ref_id:"0c4f330b-a39d-4312-9775-58b42c7c9723",show_title:"Voltage"},{children:["076eecc3-0553-4bb7-8fe2-9f43a6d54f79","4310fd96-1c4f-42a7-b72f-60fc5968c75d","3d451e38-8616-43bc-8269-c3b8ce7d9b15","ca89bac3-188b-4e90-8d0b-fe42d0abf067","d0f57eb5-87ba-4180-ad39-96589093a0f0"],episode_title:"Small Businesses Embracing Bitcoin w/ Michael from Oshi App - Voltage Twitter Spaces",guests:[{name:"Michael Atwood",profile_picture:"https://pbs.twimg.com/profile_images/1362207977470521345/Jy2_Ge60_400x400.jpg",ref_id:"16359ade-afb9-4a37-be0b-0844a6134327",twitter_handle:"Dooowta"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",node_type:"episode",ref_id:"205a0650-fefe-4aaf-a894-faa8b72d966a",show_title:"Voltage"},{children:["e9443306-25af-42d3-830d-ed6a26721103"],episode_title:"Austin Bitcoin Design Club Interview w/ Sahil, FuturePaul, and Car",guests:[{name:"Car Gonzalez",profile_picture:"https://pbs.twimg.com/profile_images/1541855444720836608/F4v02BuD_400x400.jpg",ref_id:"b554604d-47eb-4c7c-b6c9-87a062e6a844",twitter_handle:"Car_mdq_2010"},{name:"Sahil Chaturvedi",profile_picture:"https://pbs.twimg.com/profile_images/1362511727066107904/yP4o43cz_400x400.jpg",ref_id:"8b56eaa4-c9d6-46e8-a313-fbccd0ee86b5",twitter_handle:"SahilC0"},{name:"Future Paul",profile_picture:"https://pbs.twimg.com/profile_images/1508452962917666821/1QheRD09_400x400.jpg",ref_id:"ec933e22-f395-4817-b608-4337eaaf60a4",twitter_handle:"futurepaul"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",node_type:"episode",ref_id:"a60dc641-5d14-4960-ab73-66ff199edd1d",show_title:"Voltage"},{children:["f3d0a35e-3e21-4c0c-874c-d6f2b1f37eed"],episode_title:"The Future of Bitcoin Technology with Pierre Rochard, Dhruv Bansal, Warren Togami and Guy Swann",guests:[{name:"Warren Togami",profile_picture:"https://pbs.twimg.com/profile_images/1577819570039128065/bBmumEx9_400x400.jpg",ref_id:"f082b94a-673f-4b99-b46e-49a342b5792a",twitter_handle:"wtogami"},{name:"Dhruv Bansal",profile_picture:"https://pbs.twimg.com/profile_images/908397811284172800/kR9kKNsE_400x400.jpg",ref_id:"6ed2b14a-d97d-4a3f-b5b5-4c3222d85624",twitter_handle:"dhruvbansal"},{name:"Pierre Rochard",profile_picture:"https://pbs.twimg.com/profile_images/1567258180861792256/EEEBkvQR_400x400.jpg",ref_id:"426b30ba-7c24-4558-b926-ec307756a876",twitter_handle:"BitcoinPierre"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/492cbcce-3744-4d8b-b2ca-3a7f063e798a.jpg",node_type:"episode",ref_id:"3af98dc1-5e7c-4ef3-ad74-b9b6afaee8b9",show_title:"Swan Bitcoin"},{children:["6e890ef3-7358-40d6-a01f-44f444dbabfc"],episode_title:"#Bitcoin Mining Saves the World - Brought to you by Marathon",guests:[{name:"Steve Barbour",profile_picture:"https://pbs.twimg.com/profile_images/1592714173469065216/q8kXPyQI_400x400.jpg",ref_id:"63a731b8-4759-4360-9e9d-d66f884e12d8",twitter_handle:"SGBarbour"},{name:"Nathaniel Harmon",profile_picture:"https://pbs.twimg.com/profile_images/1578090357102780416/etXW-RA9_400x400.jpg",ref_id:"9105fb4e-4150-4c25-90f1-8ea770585749",twitter_handle:"NateHawaii"},{name:"Taylor Monnig",profile_picture:"https://pbs.twimg.com/profile_images/1599563776621219840/mvb8y3zY_400x400.jpg",ref_id:"b8513b01-ff94-4d7f-944f-5c92e1126885",twitter_handle:"taylorbmonnig"},{name:"Harry Suddock",profile_picture:"",ref_id:"6440ea0f-c982-4b76-b7c2-9c6bf7e9a4a9",twitter_handle:""}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/492cbcce-3744-4d8b-b2ca-3a7f063e798a.jpg",node_type:"episode",ref_id:"625d9252-2f5e-4f53-b577-dd2dfd4d4749",show_title:"Swan Bitcoin"},{children:["876e20ef-be1b-44e6-a77d-4af5beb33ad4"],episode_title:"Austin Bitcoin Club: August - Value for Value Panel",guests:[{name:"Justin Rezvani",profile_picture:"https://pbs.twimg.com/profile_images/1574666257781104641/hWG0vkSQ_400x400.jpg",ref_id:"b00877d0-ccbe-4c77-9c8c-88ab15063150",twitter_handle:"justin_rezvani"},{name:"Lyle Pratt",profile_picture:"https://pbs.twimg.com/profile_images/1477702801962721285/KqnrA7oU_400x400.jpg",ref_id:"ab752a01-84bb-4260-a683-2eb5798b1dce",twitter_handle:"lylepratt"},{name:"Keyan Kousha",profile_picture:"https://pbs.twimg.com/profile_images/1403763601391951878/ybuppfHt_400x400.jpg",ref_id:"7ef39c9b-63ba-4dd0-989e-2230afb45129",twitter_handle:"k00bideh"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b29c81c8-cccd-4a6b-b78f-3c1591a54d27.jpg",node_type:"episode",ref_id:"8eef2f82-bbf9-4fef-ba3d-102679d4a1a5",show_title:"Austin Bitcoin Club"},{children:["b9fd54d3-49e8-44e1-a208-7780d50a3b3a"],episode_title:"Synonym Spaces Lightning Tokens",guests:[{name:"Paolo Ardoino",profile_picture:"https://pbs.twimg.com/profile_images/1583467513198923781/nCWMWFIn_400x400.jpg",ref_id:"9bb3e215-6065-4fe2-aac5-2b1d5545d48c",twitter_handle:"paoloardoino"},{name:"John Carvalho",profile_picture:"https://pbs.twimg.com/profile_images/1601964735016177676/c1mAfspt_400x400.jpg",ref_id:"f28f037f-a3af-48af-bdd3-28023219b524",twitter_handle:"BitcoinErrorLog"},{name:"Reza Bandegi",profile_picture:"https://pbs.twimg.com/profile_images/1446675390370500614/4LGHNSkl_400x400.jpg",ref_id:"ead50c13-2f13-4ffc-86b5-5a3eb49a5804",twitter_handle:"r32a_"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/63e0cbc0-731d-4ea0-9dd2-2b8b841eb28a.jpg",node_type:"episode",ref_id:"a1e3c3cf-2045-4c33-8152-0e162b7ca729",show_title:"Synonym"},{children:["d98bc278-4c35-4325-992c-78437ccf3569","144eff69-fd7a-48da-b92f-bb5b13e0b4f7","9f9305dd-fff2-4bb3-9e3f-698a55090999"],episode_title:"Blockware Intelligence Podcast: 2022 Highlights",guests:[{name:"Michael",profile_picture:"https://pbs.twimg.com/profile_images/1558687629599657990/vf-bU14b_400x400.jpg",ref_id:"c7b4faa1-db77-4459-b03f-0e41e15efae7",twitter_handle:"MichaelHawaii"},{name:"Cory Klippsten",profile_picture:"https://pbs.twimg.com/profile_images/1569687200857755648/fxiCeaqc_400x400.jpg",ref_id:"ddfb9b4c-4e6a-4f4c-a01b-e6bb1bc55464",twitter_handle:"coryklippsten"},{name:"Joe Consorti",profile_picture:"https://pbs.twimg.com/profile_images/1596902707511664640/GYGWVDts_400x400.jpg",ref_id:"8d2024b2-03bb-454d-9bd6-bb121904b76a",twitter_handle:"JoeConsorti"},{name:"Jeff Booth",profile_picture:"https://pbs.twimg.com/profile_images/1362957991410954241/spiaMAg2_400x400.jpg",ref_id:"f1143bcc-9ab9-4716-8259-0e5b026f8039",twitter_handle:"JeffBooth"},{name:"James Lavish",profile_picture:"https://pbs.twimg.com/profile_images/1466279082157502464/flD6cWI3_400x400.jpg",ref_id:"cf06ab2d-2ff3-4d7b-bef6-b996ae68517a",twitter_handle:"jameslavish"},{name:"Adam O",profile_picture:"https://pbs.twimg.com/profile_images/1395896857990160391/tJpgS2_p_400x400.jpg",ref_id:"95af0dd3-1e27-41b9-a36b-8a2c44438e85",twitter_handle:"denverbitcoin"},{name:"Jack Mallers",profile_picture:"https://pbs.twimg.com/profile_images/1599778945699909632/O0qc9ykA_400x400.jpg",ref_id:"d2e4aac5-e5e1-42fc-8f08-b3a77c076a64",twitter_handle:"jackmallers"},{name:"Lyn Alden",profile_picture:"https://pbs.twimg.com/profile_images/1521181379677073414/bm4LcJTr_400x400.jpg",ref_id:"903381dd-4b8a-4b59-8ecd-3281ae3ba297",twitter_handle:"LynAldenContact"},{name:"Dylan LeClair",profile_picture:"https://pbs.twimg.com/profile_images/1508157904913899522/3l7ctauV_400x400.jpg",ref_id:"283edea0-55cf-4245-95df-8d6d3dcb1851",twitter_handle:"DylanLeClair_"},{name:"Jeff Ross",profile_picture:"https://pbs.twimg.com/profile_images/1475554600094552064/DSlPG1lx_400x400.jpg",ref_id:"ae6ee2a2-1cf7-41a0-8366-ff6e94a6403c",twitter_handle:"VailshireCap"},{name:"Stacy Herbert",profile_picture:"https://pbs.twimg.com/profile_images/1546484196750905346/5WYPz-bc_400x400.jpg",ref_id:"7477463b-1f3a-4b83-94c3-9d5a63b576c0",twitter_handle:"Stacyherbert"},{name:"Greg Foss",profile_picture:"https://pbs.twimg.com/profile_images/1552599670945464320/3OgqRHNo_400x400.jpg",ref_id:"853d9f80-f6cf-490f-9d1e-f29cdc6acc6f",twitter_handle:"FossGregfoss"},{name:"Preston Pysh",profile_picture:"https://pbs.twimg.com/profile_images/1408783276081299462/f4Ye5n7-_400x400.jpg",ref_id:"01ad2c81-2d0c-44a9-93a1-42c07287aa80",twitter_handle:"PrestonPysh"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ea2cf2ae-76de-4185-818c-384b3b06228b.jpg",node_type:"episode",ref_id:"e06b030a-063e-4894-9914-d326220f75f8",show_title:"Blockware Intelligence"},{children:["87520be0-ad60-48d0-aba6-44aec1452a09"],episode_title:"A Christmas Trip! | EP 20",guests:[{name:"Erik Cason",profile_picture:"https://pbs.twimg.com/profile_images/1528431738145361921/roDCkAUy_400x400.jpg",ref_id:"345e1da8-42ed-442b-8b90-ecb44bab61a1",twitter_handle:"Erikcason"},{name:"FractalEncrypt",profile_picture:"https://pbs.twimg.com/profile_images/1588218887807680512/lFJArP4n_400x400.jpg",ref_id:"888ea071-8312-4aca-b229-7447217e59f0",twitter_handle:"FractalEncrypt"}],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e79b1a57-ecd0-4df3-b8ec-1a1a55d047e7.jpg",node_type:"episode",ref_id:"b707bbd8-1a9e-4aee-8e0e-2fe0be24c851",show_title:"Pleb UnderGround"},{children:["d4948551-6ec5-4649-a700-364592e09edd","25e36282-297b-4f9d-b6e9-da65731be8a8","53cab9be-0f22-42a2-aef5-87920c2431cf","6028f484-d0b9-424a-87e5-d0dcb39f9fc7","092e9794-afc9-41fe-a635-4802777415a1","092e9794-afc9-41fe-a635-4802777415a1","36f1f7e1-df70-4528-8474-4bba448b1ed0","36f1f7e1-df70-4528-8474-4bba448b1ed0","6d267cc1-22b1-42fc-9b60-9701e64a75d0","6d267cc1-22b1-42fc-9b60-9701e64a75d0"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7de0d293-8ae3-4362-8500-8f7300f3fe41.jpg",node_type:"show",ref_id:"7de0d293-8ae3-4362-8500-8f7300f3fe41",show_title:"Unchained"},{children:["a7afaa66-6878-40c2-97fd-88a20ae007fd","910f5aab-7896-4c19-8649-64dcef44c369"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4e607036-8fde-48ef-ab76-9c2ac4bab031.jpg",node_type:"show",ref_id:"4e607036-8fde-48ef-ab76-9c2ac4bab031",show_title:"What Bitcoin Did with Peter McCormack"},{children:["47c54384-785c-4a4b-bad1-cac242d8f190","aa033894-120f-494e-9d6b-c6d62dfb0a69","aa033894-120f-494e-9d6b-c6d62dfb0a69","53402b84-7b30-4fec-a741-d9ef8fa03389","53402b84-7b30-4fec-a741-d9ef8fa03389","53402b84-7b30-4fec-a741-d9ef8fa03389","3a9db5f7-6722-469c-a0c6-6b157f44f33f","3a9db5f7-6722-469c-a0c6-6b157f44f33f","3a9db5f7-6722-469c-a0c6-6b157f44f33f"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9e7e229f-2631-4542-b5d7-7fcd502798dc.jpg",node_type:"show",ref_id:"9e7e229f-2631-4542-b5d7-7fcd502798dc",show_title:"Bitcoin Audible"},{children:["fccdc763-2b69-4418-9a7a-78cdfe615ba9"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b6c52903-5124-43f4-8632-bc9aeb941f2e.jpg",node_type:"show",ref_id:"b6c52903-5124-43f4-8632-bc9aeb941f2e",show_title:"The Kevin Rooke Show"},{children:["ae631d96-3b81-4308-bcc1-a57f81339b5c","ae631d96-3b81-4308-bcc1-a57f81339b5c","4bea6c89-43b4-4e5e-9fea-0662d9ee7c00","4bea6c89-43b4-4e5e-9fea-0662d9ee7c00"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b79a3eb8-bcd0-4338-b979-d32aef360785.jpg",node_type:"show",ref_id:"b79a3eb8-bcd0-4338-b979-d32aef360785",show_title:"Stephan Livera Podcast"},{children:["46277681-3564-4504-9ca8-e2f41d658d28","b05fa33c-fc91-4b55-a592-85eaa1a5b3fd","b723d81b-9c99-4797-b3a8-67f824924f0c","eaeec64e-8e03-4826-a7c5-e1969a71ca2d","922ae599-5631-4ffe-977e-a9174fc028bb","b534755c-92b6-4df1-b1f9-a28578661f48","b317d76a-25e6-42f6-bc97-3de9f6c3f081","94e1df77-e561-4361-b8ad-e98862d6e51a","94e1df77-e561-4361-b8ad-e98862d6e51a","94e1df77-e561-4361-b8ad-e98862d6e51a","10c6d370-de6e-4a37-9981-d2c27e69d9e0","a52e09df-91bc-4997-ad65-725ee971af2b","a52e09df-91bc-4997-ad65-725ee971af2b","95403824-42d5-4fe8-b50b-72e08ab368c8","2e6613fa-ef17-413b-9158-0e3be5d5ae51","2e6613fa-ef17-413b-9158-0e3be5d5ae51","2e6613fa-ef17-413b-9158-0e3be5d5ae51","c0895c34-042b-4f51-a884-2330d9f83bc7","638c47da-8592-4d7b-aa1a-20e28fa0499f","638c47da-8592-4d7b-aa1a-20e28fa0499f","2e84c98a-d7d8-4341-a129-3f4eaebe1e3e","6b8fbd46-fa4a-4d07-a142-9aeb242d249f","f3b67780-d9c2-4a20-ab5c-115032a05b3a","f3b67780-d9c2-4a20-ab5c-115032a05b3a","1bf7b1ea-f717-4c0f-ae66-0e00b26603df","7070839d-051e-48e4-bd9a-95c09b310db2","728d91e9-025d-43a7-8467-2c8d264ddf59","728d91e9-025d-43a7-8467-2c8d264ddf59","c8ae0def-c33c-4d17-af4e-31ddaeedaf8a","c8ae0def-c33c-4d17-af4e-31ddaeedaf8a","c8ae0def-c33c-4d17-af4e-31ddaeedaf8a","c8ae0def-c33c-4d17-af4e-31ddaeedaf8a","b87feb17-6926-4295-b2c2-d1c2e9d49ca8","b87feb17-6926-4295-b2c2-d1c2e9d49ca8","b87feb17-6926-4295-b2c2-d1c2e9d49ca8","f29a41a4-6764-439e-9fcf-74fefaffc681","065c0900-4e3c-48a0-87b8-4068dc441c82","87cd8227-9464-45ed-8512-4e545d3812c2","2f714adf-e499-4c1f-9864-016a00737153","bbf0a536-990b-49b4-a9c3-a2a40fa38f88","bbf0a536-990b-49b4-a9c3-a2a40fa38f88","0ade0cc4-6303-4e28-8b00-6b3e659c1e3a","9523aa00-daf4-42af-b25b-75d9682bc5a6"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/419512c2-e309-4b25-bfe2-cd481d53f66d.jpg",node_type:"show",ref_id:"419512c2-e309-4b25-bfe2-cd481d53f66d",show_title:"BTC Sessions"},{children:["919ca76f-b3c7-48f1-9f5f-872537d43632"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7934bd86-9344-4f1a-9c36-ea5f63ae418e.jpg",node_type:"show",ref_id:"7934bd86-9344-4f1a-9c36-ea5f63ae418e",show_title:"The Pomp Podcast"},{children:["ded2e35d-9fec-4bad-90f7-f3102d4eebd5"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5fc9c8b0-687f-487e-bde3-bea15e155e3e.jpg",node_type:"show",ref_id:"5fc9c8b0-687f-487e-bde3-bea15e155e3e",show_title:"Bitcoin Takeover Podcast"},{children:["2536a974-d668-4ac2-8613-0b37aa0ca08c","2536a974-d668-4ac2-8613-0b37aa0ca08c","2536a974-d668-4ac2-8613-0b37aa0ca08c","2536a974-d668-4ac2-8613-0b37aa0ca08c","2536a974-d668-4ac2-8613-0b37aa0ca08c"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/3e178b7d-b8b9-4fd4-ba36-017b834537da.jpg",node_type:"show",ref_id:"3e178b7d-b8b9-4fd4-ba36-017b834537da",show_title:"Bitcoin Fixes This"},{children:["43dd10a8-c5d5-4643-9432-93868289f163","6e8b01d5-df4f-4124-a13a-3ee9c93c8eb2","3475140b-3e58-494f-b929-59e6ec5f1636"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd.jpg",node_type:"show",ref_id:"1583c7c4-f4f2-4e52-8f27-a1eaeb6289fd",show_title:"Bitcoin Magazine Podcast"},{children:["68309686-0bf0-4156-8f95-615ba255fdc4","52f31c46-14c5-49f1-9836-70862c6f6567","665facde-c1bd-4091-a071-09e28606b863"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a09a2c49-84f1-4d0b-b150-6e6103f4ee41.jpg",node_type:"show",ref_id:"a09a2c49-84f1-4d0b-b150-6e6103f4ee41",show_title:"Citadel Dispatch"},{children:["274ecab4-c5d8-4ad7-9e16-b1cb5dd39d13","274ecab4-c5d8-4ad7-9e16-b1cb5dd39d13","933d3953-2983-4a8b-a4dc-e9615eeecb88","8a89a96d-5877-4d00-9e11-c33d19ed7264","8a89a96d-5877-4d00-9e11-c33d19ed7264","8a89a96d-5877-4d00-9e11-c33d19ed7264","249e2426-55d6-473c-bbe0-4bebf74594e9","249e2426-55d6-473c-bbe0-4bebf74594e9","0f13f1e8-6031-4920-86bf-c2fbcaaed641","0f13f1e8-6031-4920-86bf-c2fbcaaed641"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f.jpg",node_type:"show",ref_id:"cd6b8d64-bd52-4f1e-86b3-ca8ba2eb169f",show_title:"Bitcoin.Review"},{children:["993787ca-ce29-4d5b-b834-37a83ea2125a"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/afa24463-19f7-4875-b6f4-b261d1d6c648.jpg",node_type:"show",ref_id:"afa24463-19f7-4875-b6f4-b261d1d6c648",show_title:"Orange Pill Podcast"},{children:["72c4dd20-64fa-4d68-a0bd-ac50207ae1c0","cc447ce2-af39-4938-8ec8-2d70a6cfd851"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99d17d22-4448-4267-9065-f55b341f43d2.jpg",node_type:"show",ref_id:"99d17d22-4448-4267-9065-f55b341f43d2",show_title:"The Money Movement"},{children:["337981db-17c3-4c4e-8195-26cda6855ead","337981db-17c3-4c4e-8195-26cda6855ead"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ca3ab815-dc2e-408a-a0c5-8bbe50270a97.jpg",node_type:"show",ref_id:"ca3ab815-dc2e-408a-a0c5-8bbe50270a97",show_title:'The "What is Money?" Show'},{children:["b43f377d-6599-421b-af45-a8ecee409420","b43f377d-6599-421b-af45-a8ecee409420"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/abd94520-1490-42aa-b349-9e861494a654.jpg",node_type:"show",ref_id:"abd94520-1490-42aa-b349-9e861494a654",show_title:"Economy Guy"},{children:["705db675-bc09-4cba-b578-e9904f339f55"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/58189b3c-aa25-408d-8c5e-76f97c9501da.jpg",node_type:"show",ref_id:"58189b3c-aa25-408d-8c5e-76f97c9501da",show_title:"Mises University 2017"},{children:["a12faf50-f4fb-472d-b3a1-030747594fa5","a12faf50-f4fb-472d-b3a1-030747594fa5"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5cdd0aef-f1a7-4d3b-8336-7f81c2db4a40.jpg",node_type:"show",ref_id:"5cdd0aef-f1a7-4d3b-8336-7f81c2db4a40",show_title:"The Bitcoin Standard Podcast"},{children:["87054fe7-6a5c-471a-b518-5e9414d0c644"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4bb9069b-a373-4b1c-9cda-024b2bf4dc84.jpg",node_type:"show",ref_id:"4bb9069b-a373-4b1c-9cda-024b2bf4dc84",show_title:"We Study Billionaires - The Investor’s Podcast Network"},{children:["04dd4023-ed42-4259-921c-e305af656389"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/3325efce-80a8-490c-8645-cad1b9a22d94.jpg",node_type:"show",ref_id:"3325efce-80a8-490c-8645-cad1b9a22d94",show_title:"Crypto Voices"},{children:["c6ecd519-ce8f-45b5-89ca-30a6a017f5d6"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/357dc2db-2643-49f0-9393-5a20ed21d0fe.jpg",node_type:"show",ref_id:"357dc2db-2643-49f0-9393-5a20ed21d0fe",show_title:"The Anita Posch Show: A Bitcoin only podcast"},{children:["b94dbd49-6ac1-497c-8f5b-d13140968920"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/710ac70a-11fc-40ec-a2a2-01b92fb8015e.jpg",node_type:"show",ref_id:"710ac70a-11fc-40ec-a2a2-01b92fb8015e",show_title:"Quoth the Raven"},{children:["406ce1e1-5f39-4c94-907c-eb5e501d2c64"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/da1bbdc0-4d0a-43ed-8345-ee43102db244.jpg",node_type:"show",ref_id:"da1bbdc0-4d0a-43ed-8345-ee43102db244",show_title:"Mercatus Policy Download"},{children:["9585c916-c55a-4284-b348-f8a52c24dc8d","9585c916-c55a-4284-b348-f8a52c24dc8d","9585c916-c55a-4284-b348-f8a52c24dc8d","1d938eb2-3bc2-4268-85d1-8967a1292a18","1d938eb2-3bc2-4268-85d1-8967a1292a18"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/93a6fe5b-364c-43f4-9f38-7da3e811460b.jpg",node_type:"show",ref_id:"93a6fe5b-364c-43f4-9f38-7da3e811460b",show_title:"CRYPTO 101"},{children:["50ab3e37-ccb3-4902-825b-a9da36579707","50ab3e37-ccb3-4902-825b-a9da36579707","50ab3e37-ccb3-4902-825b-a9da36579707"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/6ec51741-3d93-4116-a619-d62a7cee1feb.jpg",node_type:"show",ref_id:"6ec51741-3d93-4116-a619-d62a7cee1feb",show_title:"Radio Rothbard"},{children:["8ec14282-c5bc-4da6-b516-3140efaf6b8f","8ec14282-c5bc-4da6-b516-3140efaf6b8f","8ec14282-c5bc-4da6-b516-3140efaf6b8f","8ec14282-c5bc-4da6-b516-3140efaf6b8f","2fee3ffd-e6f5-4fbf-9cac-2b8977b93b79"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f2b2a2b2-8869-4256-94b9-a91c91c1ce7e.jpg",node_type:"show",ref_id:"f2b2a2b2-8869-4256-94b9-a91c91c1ce7e",show_title:"Economics For Business"},{children:["a77be405-8402-477a-9d72-b96d1e7ea63b","32aad837-d99a-4b5a-b6ea-e12c590b925a"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ef62c7ab-ef09-47b7-9af4-2ebe2384a72f.jpg",node_type:"show",ref_id:"ef62c7ab-ef09-47b7-9af4-2ebe2384a72f",show_title:"Austrian Economics: An Introductory Course"},{children:["62e4eee0-25ba-495a-a7e6-dd0685a75d13","23ea78f2-8e21-42fe-980a-8c6ff04c2748","23ea78f2-8e21-42fe-980a-8c6ff04c2748","b51b127d-9641-42a7-aac5-bd5b1228f52a"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a.jpg",node_type:"show",ref_id:"8e52e9c4-52e8-4dea-8ed9-8c6a7fcef25a",show_title:"The Macro View"},{children:["f18bb143-9582-41f3-b65b-1dbe8de6cfc3"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/3ab6c599-bbcd-4c8f-beef-bcf509ed4afa.jpg",node_type:"show",ref_id:"3ab6c599-bbcd-4c8f-beef-bcf509ed4afa",show_title:"Voices of the Data Economy"},{children:["14dbb9b7-ec35-49e5-bbb9-1f2d626a5d6f"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/5e0220b3-7c70-4423-bb76-3b75bc132fad.jpg",node_type:"show",ref_id:"5e0220b3-7c70-4423-bb76-3b75bc132fad",show_title:"Carnivore Cast"},{children:["c6996d2f-8541-4622-968f-4e4dee7f78e4","41f7e1a4-f5b9-4a7e-8dbd-ee3fcb15260f"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/a8e3517b-b44d-4270-adaa-57587896b1e7.jpg",node_type:"show",ref_id:"a8e3517b-b44d-4270-adaa-57587896b1e7",show_title:"Keto Life Support"},{children:["4b228b78-99c7-4884-b91d-9dc711bde8e6"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4ae5cf53-106f-4ba8-9a77-3ef1de3b44b6.jpg",node_type:"show",ref_id:"4ae5cf53-106f-4ba8-9a77-3ef1de3b44b6",show_title:"Trading Bitcoin: The Tone Vays Podcast"},{children:["556a9506-357d-4dea-a6bb-75f391f7340d"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/1c3fe064-f637-41ea-8a4b-a533ef5985b1.jpg",node_type:"show",ref_id:"1c3fe064-f637-41ea-8a4b-a533ef5985b1",show_title:"aantonop"},{children:["1b47b05f-8f86-4e19-9694-d4255e9e89ac","1b47b05f-8f86-4e19-9694-d4255e9e89ac"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/56bbafde-60ef-4e4b-b930-978429c6a635.jpg",node_type:"show",ref_id:"56bbafde-60ef-4e4b-b930-978429c6a635",show_title:"Global Bitcoin Fest"},{children:["a0826cdb-6198-4416-bd12-1dd5aa09a075","c6447277-9a58-411f-85e1-5ac166884ce5","c6447277-9a58-411f-85e1-5ac166884ce5","c6447277-9a58-411f-85e1-5ac166884ce5","c6447277-9a58-411f-85e1-5ac166884ce5","8418f2a4-1874-403a-9e58-7a76a8e09d4f","a7dcf3bf-b9f2-41f1-a3f3-ffd2db3a0b96","a7dcf3bf-b9f2-41f1-a3f3-ffd2db3a0b96","a7dcf3bf-b9f2-41f1-a3f3-ffd2db3a0b96","47406d36-917a-47f7-b89e-26181d6070bc","47406d36-917a-47f7-b89e-26181d6070bc","47406d36-917a-47f7-b89e-26181d6070bc","dc7b8177-4cef-4da2-bb05-b12dfe4c05bb","dc7b8177-4cef-4da2-bb05-b12dfe4c05bb","dc7b8177-4cef-4da2-bb05-b12dfe4c05bb","dc7b8177-4cef-4da2-bb05-b12dfe4c05bb"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/9b2e17f2-71c5-4f1e-a3e7-720d06dab810.jpg",node_type:"show",ref_id:"9b2e17f2-71c5-4f1e-a3e7-720d06dab810",show_title:"Satoshi’s Journal"},{children:["fb60247a-9b2e-41d4-83f4-f4cf92eb20f4","fb60247a-9b2e-41d4-83f4-f4cf92eb20f4","fb60247a-9b2e-41d4-83f4-f4cf92eb20f4","87a2efa8-6b4c-486d-8511-d6a95cb84514","87a2efa8-6b4c-486d-8511-d6a95cb84514","87a2efa8-6b4c-486d-8511-d6a95cb84514","87a2efa8-6b4c-486d-8511-d6a95cb84514","87a2efa8-6b4c-486d-8511-d6a95cb84514","de9ef389-d0ee-4ce1-ad23-38bfafa28a35","de9ef389-d0ee-4ce1-ad23-38bfafa28a35"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/0c42d408-e518-4ecf-b282-d864a8c14002.jpg",node_type:"show",ref_id:"0c42d408-e518-4ecf-b282-d864a8c14002",show_title:"PUBLORD"},{children:["94726593-cead-47f6-8029-6848f277358c","2c2ac736-0711-4418-8a44-6f9de54cbe6f","2c2ac736-0711-4418-8a44-6f9de54cbe6f","2c2ac736-0711-4418-8a44-6f9de54cbe6f","883300ba-aeb4-42e5-bbd2-7c989e481a3b","883300ba-aeb4-42e5-bbd2-7c989e481a3b","883300ba-aeb4-42e5-bbd2-7c989e481a3b","883300ba-aeb4-42e5-bbd2-7c989e481a3b","a41902c1-9f41-4ea4-b135-0d2078f6074b","6334a91f-b1db-4f05-a381-bc68b121dfb3","3b7e4cc5-bc15-45e9-bb7a-373fa4cca6f1","3b7e4cc5-bc15-45e9-bb7a-373fa4cca6f1","3b7e4cc5-bc15-45e9-bb7a-373fa4cca6f1","3b7e4cc5-bc15-45e9-bb7a-373fa4cca6f1","3b7e4cc5-bc15-45e9-bb7a-373fa4cca6f1","f8a66979-3fac-4793-bad0-8ede604e211b","1d671494-3407-4619-92b0-99c7d6f95f86","9ae3fabe-5d43-47bc-9ab0-541df990773a","a119635b-a66a-4a90-a7e3-2a7929666a82","a119635b-a66a-4a90-a7e3-2a7929666a82","a119635b-a66a-4a90-a7e3-2a7929666a82","a119635b-a66a-4a90-a7e3-2a7929666a82","6fe2326f-7cad-4efb-abed-206db564556e","6fe2326f-7cad-4efb-abed-206db564556e","141ef1e6-e6ec-4d29-a52a-01be662b21ae","141ef1e6-e6ec-4d29-a52a-01be662b21ae","141ef1e6-e6ec-4d29-a52a-01be662b21ae","15cae8e2-7cb3-4c60-9b3a-32cb4b231c26","15cae8e2-7cb3-4c60-9b3a-32cb4b231c26","3bc946bc-82f4-48d3-9bd2-fab82353774d","3bc946bc-82f4-48d3-9bd2-fab82353774d","3bc946bc-82f4-48d3-9bd2-fab82353774d","3bc946bc-82f4-48d3-9bd2-fab82353774d","3bc946bc-82f4-48d3-9bd2-fab82353774d","80617a1c-8bf7-404d-928c-86fc32d643fe","80617a1c-8bf7-404d-928c-86fc32d643fe","d28e279c-4539-4ec8-b187-1b6447bdb6be"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/239722cb-4216-414a-a17b-5adf9d52e15a.jpg",node_type:"show",ref_id:"239722cb-4216-414a-a17b-5adf9d52e15a",show_title:"Swan.com"},{children:["aba10d42-f204-4853-99c4-c8a22f846945","6c6c782e-382c-44c3-9b0a-5c598ef73ddc"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f3a55dda-3dd5-4f62-99c1-bab3a88c27c1.jpg",node_type:"show",ref_id:"f3a55dda-3dd5-4f62-99c1-bab3a88c27c1",show_title:"Bitcoin Magazine"},{children:["7bebf6d3-5f24-4988-9141-7ed42c826983","7bebf6d3-5f24-4988-9141-7ed42c826983"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/7c53ad3c-1ce2-4661-8896-4c40dcc23b4d.jpg",node_type:"show",ref_id:"7c53ad3c-1ce2-4661-8896-4c40dcc23b4d",show_title:"Blockware Solutions"},{children:["de789489-56bc-4012-b7c3-9dc92a937161","62ca7c93-e509-438e-87b3-43400a320f8d","62ca7c93-e509-438e-87b3-43400a320f8d","62ca7c93-e509-438e-87b3-43400a320f8d"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/624262ef-b30f-4114-8061-e310187e6bb4.jpg",node_type:"show",ref_id:"624262ef-b30f-4114-8061-e310187e6bb4",show_title:"Property and Freedom Society"},{children:["0992287c-f653-4032-b06c-e8d65e2536e7","0992287c-f653-4032-b06c-e8d65e2536e7","0992287c-f653-4032-b06c-e8d65e2536e7","0992287c-f653-4032-b06c-e8d65e2536e7","0992287c-f653-4032-b06c-e8d65e2536e7","0992287c-f653-4032-b06c-e8d65e2536e7","0992287c-f653-4032-b06c-e8d65e2536e7"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/c9bb5d58-c781-464d-878a-8b6c469ba198.jpg",node_type:"show",ref_id:"c9bb5d58-c781-464d-878a-8b6c469ba198",show_title:"Geyser 🌊"},{children:["79ea2957-1161-4729-aacb-1981d9237e22","79ea2957-1161-4729-aacb-1981d9237e22","79ea2957-1161-4729-aacb-1981d9237e22","79ea2957-1161-4729-aacb-1981d9237e22"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/75ec86b1-cb6d-467f-a66e-5e642e5c126a.jpg",node_type:"show",ref_id:"75ec86b1-cb6d-467f-a66e-5e642e5c126a",show_title:"Bitcoin Venetians Book Club"},{children:["c0dabc11-aced-4078-93be-bca753fc2b14","c0dabc11-aced-4078-93be-bca753fc2b14","c0dabc11-aced-4078-93be-bca753fc2b14","c0dabc11-aced-4078-93be-bca753fc2b14","c0dabc11-aced-4078-93be-bca753fc2b14","d2e9db27-864c-4ee5-a7ae-abcf895bda98","d2e9db27-864c-4ee5-a7ae-abcf895bda98","d2e9db27-864c-4ee5-a7ae-abcf895bda98","d2e9db27-864c-4ee5-a7ae-abcf895bda98","d2e9db27-864c-4ee5-a7ae-abcf895bda98","6e8c90dc-12fa-415d-bf33-f286a4c5d1b1","6e8c90dc-12fa-415d-bf33-f286a4c5d1b1"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ae91fac6-a1af-4877-9a92-e793d556ee66.jpg",node_type:"show",ref_id:"ae91fac6-a1af-4877-9a92-e793d556ee66",show_title:"Compass Mining"},{children:["5c8bc8cf-4d41-4c71-8154-aafbd1ed20c1","f7310238-67ab-4a2d-8679-72f6511934be","f7310238-67ab-4a2d-8679-72f6511934be","f7310238-67ab-4a2d-8679-72f6511934be","f7310238-67ab-4a2d-8679-72f6511934be","99f0ab76-b0f5-4947-8341-759b5dff5341","99f0ab76-b0f5-4947-8341-759b5dff5341","99f0ab76-b0f5-4947-8341-759b5dff5341","c775e780-43ca-46c6-b5ef-e65b0103ee61","c775e780-43ca-46c6-b5ef-e65b0103ee61"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/965489b4-a414-4fd0-ab8c-55911b1596aa.jpg",node_type:"show",ref_id:"965489b4-a414-4fd0-ab8c-55911b1596aa",show_title:"BOLT FUN"},{children:["54fa34c9-0729-42ab-92d5-e5f8289ed32a","54fa34c9-0729-42ab-92d5-e5f8289ed32a","54fa34c9-0729-42ab-92d5-e5f8289ed32a"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2a1450bc-0649-4dc5-8ec9-1474af1ea1c3.jpg",node_type:"show",ref_id:"2a1450bc-0649-4dc5-8ec9-1474af1ea1c3",show_title:"Anders_🍆"},{children:["258c5ca5-52a6-4ce3-9994-e629263123d8"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4127f08c-505a-4a7d-935f-e93e87204089.jpg",node_type:"show",ref_id:"4127f08c-505a-4a7d-935f-e93e87204089",show_title:"Wicked Smart Bitcoin ∞/21M"},{children:["08c3748a-a85d-4d4f-a702-1fc3f1c46f33"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b2dd8be4-74b5-47b2-b470-e568657f3a0d.jpg",node_type:"show",ref_id:"b2dd8be4-74b5-47b2-b470-e568657f3a0d",show_title:"Art of Tomas"},{children:["d862511e-6330-48b3-9d4a-44e8f754f0a5","d862511e-6330-48b3-9d4a-44e8f754f0a5","d862511e-6330-48b3-9d4a-44e8f754f0a5"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e8ad867b-9cbe-4126-9f37-313b4d2329a5.jpg",node_type:"show",ref_id:"e8ad867b-9cbe-4126-9f37-313b4d2329a5",show_title:"Dr Karl Goldkamp - Keto Naturopath"},{children:["21d1d401-626c-4ec2-ba30-3c08f08ec3ea","21d1d401-626c-4ec2-ba30-3c08f08ec3ea"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/046c6869-0627-4825-8ecf-45ff0aed97b6.jpg",node_type:"show",ref_id:"046c6869-0627-4825-8ecf-45ff0aed97b6",show_title:"Alexandria The Great 🌋⛏🇿🇼"},{children:["18e340ea-90ef-4200-a19d-dc82e1e18e21"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/30180c4d-27f9-4215-81e0-6a22b16aba43.jpg",node_type:"show",ref_id:"30180c4d-27f9-4215-81e0-6a22b16aba43",show_title:"okin@8333.mobi ⚡️ 🏰"},{children:["9f12b8c2-175e-4078-9871-99a2edf2e0f3","9f12b8c2-175e-4078-9871-99a2edf2e0f3","9f12b8c2-175e-4078-9871-99a2edf2e0f3","9f12b8c2-175e-4078-9871-99a2edf2e0f3"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/99046513-2614-4eae-9de4-5781ba4b330a.jpg",node_type:"show",ref_id:"99046513-2614-4eae-9de4-5781ba4b330a",show_title:"STX:LDN"},{children:["03b5ca12-0aeb-4f04-aed0-746681d93b56"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/da64b29e-c2c0-41a6-ba29-acbaa2d022e8.jpg",node_type:"show",ref_id:"da64b29e-c2c0-41a6-ba29-acbaa2d022e8",show_title:"Rabbit Hole Recap"},{children:["70bb863d-7226-4b9e-b13e-673f94a3eb86","06494953-4c8e-4376-9450-9efb8b00acc3","06494953-4c8e-4376-9450-9efb8b00acc3","06494953-4c8e-4376-9450-9efb8b00acc3","06494953-4c8e-4376-9450-9efb8b00acc3","06494953-4c8e-4376-9450-9efb8b00acc3","06494953-4c8e-4376-9450-9efb8b00acc3","06494953-4c8e-4376-9450-9efb8b00acc3"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e1eca67b-d372-4031-bf1f-8f0ff7fe6092.jpg",node_type:"show",ref_id:"e1eca67b-d372-4031-bf1f-8f0ff7fe6092",show_title:`Once Bitten! A Bitcoin Podcast. -`},{children:["9dcca755-0a20-45e5-8e4d-dfe2800b9c6f","9dcca755-0a20-45e5-8e4d-dfe2800b9c6f"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/fe6bdbce-e91d-43cf-ab33-0e98bffabecc.jpg",node_type:"show",ref_id:"fe6bdbce-e91d-43cf-ab33-0e98bffabecc",show_title:"Bitcoin Charlotte"},{children:["b8289cbb-ec69-49a8-b6ab-c1fd808acc09"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4240c90e-0086-4ece-bfe5-84a282c5059e.jpg",node_type:"show",ref_id:"4240c90e-0086-4ece-bfe5-84a282c5059e",show_title:"Thriller Bitcoin"},{children:["daddd93e-7bc6-4c50-a150-5199b437afc9"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/24a144b0-7ca3-40e9-9c42-86b9fce0b662.jpg",node_type:"show",ref_id:"24a144b0-7ca3-40e9-9c42-86b9fce0b662",show_title:"The Chaincode Podcast"},{children:["56bf65e9-41d5-42e1-95d6-239e4c835781","56bf65e9-41d5-42e1-95d6-239e4c835781","56bf65e9-41d5-42e1-95d6-239e4c835781","ff88a8b8-bcd6-4d86-8a65-8a68def35b9f","810a3acb-e30e-46bc-8c67-1d504b2e7c09","810a3acb-e30e-46bc-8c67-1d504b2e7c09"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg",node_type:"show",ref_id:"f1879df9-9bc6-4a76-951f-24548da768ef",show_title:"Bitcoin.Review Podcast with NVK & Guests"},{children:["f7e75069-adf6-41b0-9bb7-a6a2aa846493","f7e75069-adf6-41b0-9bb7-a6a2aa846493","6eb2a481-408f-4989-9f28-67789651259a","89049a1c-0171-4999-b003-57e1b57d92b2","d842ce17-a4c0-49a6-bdc5-5268f1d61779","8d9b0689-2e69-44c1-afe2-3519e999390a","8d9b0689-2e69-44c1-afe2-3519e999390a"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",node_type:"show",ref_id:"e7d2a4ca-6b44-4a45-a94c-6f48987979f7",show_title:"TABConf (The Atlanta Bitcoin Conference)"},{children:["3b818893-4605-499c-a467-5abcc23f9483","3b818893-4605-499c-a467-5abcc23f9483","3b818893-4605-499c-a467-5abcc23f9483","a44e78cd-dc66-4b67-9523-7ddff0d3655f","a44e78cd-dc66-4b67-9523-7ddff0d3655f","0c4f330b-a39d-4312-9775-58b42c7c9723","0c4f330b-a39d-4312-9775-58b42c7c9723","205a0650-fefe-4aaf-a894-faa8b72d966a","205a0650-fefe-4aaf-a894-faa8b72d966a","205a0650-fefe-4aaf-a894-faa8b72d966a","205a0650-fefe-4aaf-a894-faa8b72d966a","205a0650-fefe-4aaf-a894-faa8b72d966a","a60dc641-5d14-4960-ab73-66ff199edd1d"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",node_type:"show",ref_id:"2ec62250-4755-4616-8342-096a2cfab95f",show_title:"Voltage"},{children:["3af98dc1-5e7c-4ef3-ad74-b9b6afaee8b9","625d9252-2f5e-4f53-b577-dd2dfd4d4749"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/492cbcce-3744-4d8b-b2ca-3a7f063e798a.jpg",node_type:"show",ref_id:"492cbcce-3744-4d8b-b2ca-3a7f063e798a",show_title:"Swan Bitcoin"},{children:["8eef2f82-bbf9-4fef-ba3d-102679d4a1a5"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b29c81c8-cccd-4a6b-b78f-3c1591a54d27.jpg",node_type:"show",ref_id:"b29c81c8-cccd-4a6b-b78f-3c1591a54d27",show_title:"Austin Bitcoin Club"},{children:["a1e3c3cf-2045-4c33-8152-0e162b7ca729"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/63e0cbc0-731d-4ea0-9dd2-2b8b841eb28a.jpg",node_type:"show",ref_id:"63e0cbc0-731d-4ea0-9dd2-2b8b841eb28a",show_title:"Synonym"},{children:["e06b030a-063e-4894-9914-d326220f75f8","e06b030a-063e-4894-9914-d326220f75f8","e06b030a-063e-4894-9914-d326220f75f8"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ea2cf2ae-76de-4185-818c-384b3b06228b.jpg",node_type:"show",ref_id:"ea2cf2ae-76de-4185-818c-384b3b06228b",show_title:"Blockware Intelligence"},{children:["b707bbd8-1a9e-4aee-8e0e-2fe0be24c851"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e79b1a57-ecd0-4df3-b8ec-1a1a55d047e7.jpg",node_type:"show",ref_id:"e79b1a57-ecd0-4df3-b8ec-1a1a55d047e7",show_title:"Pleb UnderGround"}],related:[{episode_title:"The Orange Sun ☀️ #Bitcoin vs. Fiat",ref_id:"e5b1ad5b-2ce2-4192-a6d9-e99f0e3e88b5",show_title:"Satoshi’s Journal"},{episode_title:"Orange Sun 🌞 Why Ethereum is a shitcoin/scam & Bitcoin News",ref_id:"0645c5a3-b511-471d-9d8e-ef63b4dfe340",show_title:"Satoshi’s Journal"},{episode_title:"#Bitcoin Beats⚡🎶 by @SatoshisJournal Genesis Block walkthrough",ref_id:"aba7b4db-77bb-40c4-a0d4-4ce20da7b9ba",show_title:"Satoshi’s Journal"},{episode_title:"The Orange Sun 🌞 Does Price = Value? #Bitcoin",ref_id:"a0826cdb-6198-4416-bd12-1dd5aa09a075",show_title:"Satoshi’s Journal"},{episode_title:"#Bitcoin Beats⚡🎶 by @SatoshisJournal w @NEEDcreations & @DJSATOSHI18",ref_id:"fd00f285-c11e-40ba-8af9-b67265ac321b",show_title:"Satoshi’s Journal"},{episode_title:'The Orange Sun ☀️ Reading/Discussion of "The Book of Satoshi."',ref_id:"fcbe1196-c55d-476f-92d6-4dcba954eaf3",show_title:"Satoshi’s Journal"},{episode_title:'The Orange 🌞 Reading/Discussion "The Book of Satoshi" & Bitcoin News',ref_id:"c6447277-9a58-411f-85e1-5ac166884ce5",show_title:"Satoshi’s Journal"},{episode_title:"The Orange Sun 🌞 Bitcoin News and Talk - Happy Holidays!",ref_id:"d0b59017-ae64-47d4-be5c-c1531c9d480f",show_title:"Satoshi’s Journal"},{episode_title:`The Orange Sun 🌞 Reading/Discussion Tomer Strolight's "Why Bitcoin?"`,ref_id:"95848760-3863-4595-b049-f25826eba2d3",show_title:"Satoshi’s Journal"}]},typesWeighedByChildren=["show","episode"],getSuperficialNodeWeight=(tt,et)=>{var rt;return tt.weight?tt.weight:typesWeighedByChildren.includes(tt.node_type)?((rt=tt==null?void 0:tt.children)==null?void 0:rt.length)||0:et.filter(it=>it.sourceRef===tt.ref_id||it.targetRef===tt.ref_id).length},getMaxSuperficialWeightPerNodeType=(tt,et)=>{const nt={};return tt.forEach(rt=>{const it=getSuperficialNodeWeight(rt,et);(!nt[rt.node_type]||nt[rt.node_type]tt.clone().normalize().clone().negate().normalize().multiplyScalar(et).add(tt),getPositionFromLngLat=(tt,et,nt)=>{const rt=et*Math.PI/180,it=(tt-180)*Math.PI/180,ot=-nt*Math.cos(rt)*Math.cos(it),at=nt*Math.sin(rt),st=nt*Math.cos(rt)*Math.sin(it);return new Vector3(ot,at,st)},generateEarthGraphPositions=tt=>{const et=tt.map(rt=>{const{longitude:it,latitude:ot}=rt.longitude&&rt.latitude?rt:{longitude:getRandomLngLat(),latitude:getRandomLngLat()},at=getPositionFromLngLat(it,ot,dataRadius);return{...rt,...at}}),nt=generateLinksFromNodeData(et,!0,!0);return{nodes:et,links:nt}};function forceCenter(tt,et,nt){var rt,it=1;tt==null&&(tt=0),et==null&&(et=0),nt==null&&(nt=0);function ot(){var at,st=rt.length,lt,ct=0,ut=0,ht=0;for(at=0;at=(lt=(at+st)/2))?at=lt:st=lt,rt=it,!(it=it[ht=+ut]))return rt[ht]=ot,tt;if(ct=+tt._x.call(null,it.data),et===ct)return ot.next=it,rt?rt[ht]=ot:tt._root=ot,tt;do rt=rt?rt[ht]=new Array(2):tt._root=new Array(2),(ut=et>=(lt=(at+st)/2))?at=lt:st=lt;while((ht=+ut)==(dt=+(ct>=lt)));return rt[dt]=it,rt[ht]=ot,tt}function addAll$2(tt){Array.isArray(tt)||(tt=Array.from(tt));const et=tt.length,nt=new Float64Array(et);let rt=1/0,it=-1/0;for(let ot=0,at;otit&&(it=at));if(rt>it)return this;this.cover(rt).cover(it);for(let ot=0;ottt||tt>=nt;)switch(at=+(ttat||(ot=ct.x1)=ht))&&(ct=st[st.length-1],st[st.length-1]=st[st.length-1-ut],st[st.length-1-ut]=ct)}else{var dt=Math.abs(tt-+this._x.call(null,lt.data));dt=(ct=(at+st)/2))?at=ct:st=ct,et=nt,!(nt=nt[ht=+ut]))return this;if(!nt.length)break;et[ht+1&1]&&(rt=et,dt=ht)}for(;nt.data!==tt;)if(it=nt,!(nt=nt.next))return this;return(ot=nt.next)&&delete nt.next,it?(ot?it.next=ot:delete it.next,this):et?(ot?et[ht]=ot:delete et[ht],(nt=et[0]||et[1])&&nt===(et[1]||et[0])&&!nt.length&&(rt?rt[dt]=nt:this._root=nt),this):(this._root=ot,this)}function removeAll$2(tt){for(var et=0,nt=tt.length;et=(ht=(st+ct)/2))?st=ht:ct=ht,(yt=nt>=(dt=(lt+ut)/2))?lt=dt:ut=dt,it=ot,!(ot=ot[bt=yt<<1|gt]))return it[bt]=at,tt;if(pt=+tt._x.call(null,ot.data),mt=+tt._y.call(null,ot.data),et===pt&&nt===mt)return at.next=ot,it?it[bt]=at:tt._root=at,tt;do it=it?it[bt]=new Array(4):tt._root=new Array(4),(gt=et>=(ht=(st+ct)/2))?st=ht:ct=ht,(yt=nt>=(dt=(lt+ut)/2))?lt=dt:ut=dt;while((bt=yt<<1|gt)===(vt=(mt>=dt)<<1|pt>=ht));return it[vt]=ot,it[bt]=at,tt}function addAll$1(tt){var et,nt,rt=tt.length,it,ot,at=new Array(rt),st=new Array(rt),lt=1/0,ct=1/0,ut=-1/0,ht=-1/0;for(nt=0;ntut&&(ut=it),otht&&(ht=ot));if(lt>ut||ct>ht)return this;for(this.cover(lt,ct).cover(ut,ht),nt=0;nttt||tt>=it||rt>et||et>=ot;)switch(ct=(etut||(st=mt.y0)>ht||(lt=mt.x1)=bt)<<1|tt>=yt)&&(mt=dt[dt.length-1],dt[dt.length-1]=dt[dt.length-1-gt],dt[dt.length-1-gt]=mt)}else{var vt=tt-+this._x.call(null,pt.data),xt=et-+this._y.call(null,pt.data),kt=vt*vt+xt*xt;if(kt=(dt=(at+lt)/2))?at=dt:lt=dt,(gt=ht>=(pt=(st+ct)/2))?st=pt:ct=pt,et=nt,!(nt=nt[yt=gt<<1|mt]))return this;if(!nt.length)break;(et[yt+1&3]||et[yt+2&3]||et[yt+3&3])&&(rt=et,bt=yt)}for(;nt.data!==tt;)if(it=nt,!(nt=nt.next))return this;return(ot=nt.next)&&delete nt.next,it?(ot?it.next=ot:delete it.next,this):et?(ot?et[yt]=ot:delete et[yt],(nt=et[0]||et[1]||et[2]||et[3])&&nt===(et[3]||et[2]||et[1]||et[0])&&!nt.length&&(rt?rt[bt]=nt:this._root=nt),this):(this._root=ot,this)}function removeAll$1(tt){for(var et=0,nt=tt.length;et=(mt=(lt+ht)/2))?lt=mt:ht=mt,(St=nt>=(gt=(ct+dt)/2))?ct=gt:dt=gt,(Tt=rt>=(yt=(ut+pt)/2))?ut=yt:pt=yt,ot=at,!(at=at[At=Tt<<2|St<<1|kt]))return ot[At]=st,tt;if(bt=+tt._x.call(null,at.data),vt=+tt._y.call(null,at.data),xt=+tt._z.call(null,at.data),et===bt&&nt===vt&&rt===xt)return st.next=at,ot?ot[At]=st:tt._root=st,tt;do ot=ot?ot[At]=new Array(8):tt._root=new Array(8),(kt=et>=(mt=(lt+ht)/2))?lt=mt:ht=mt,(St=nt>=(gt=(ct+dt)/2))?ct=gt:dt=gt,(Tt=rt>=(yt=(ut+pt)/2))?ut=yt:pt=yt;while((At=Tt<<2|St<<1|kt)===(Et=(xt>=yt)<<2|(vt>=gt)<<1|bt>=mt));return ot[Et]=at,ot[At]=st,tt}function addAll(tt){Array.isArray(tt)||(tt=Array.from(tt));const et=tt.length,nt=new Float64Array(et),rt=new Float64Array(et),it=new Float64Array(et);let ot=1/0,at=1/0,st=1/0,lt=-1/0,ct=-1/0,ut=-1/0;for(let ht=0,dt,pt,mt,gt;htlt&&(lt=pt),mtct&&(ct=mt),gtut&&(ut=gt));if(ot>lt||at>ct||st>ut)return this;this.cover(ot,at,st).cover(lt,ct,ut);for(let ht=0;httt||tt>=at||it>et||et>=st||ot>nt||nt>=lt;)switch(dt=(ntmt||(ct=xt.y0)>gt||(ut=xt.z0)>yt||(ht=xt.x1)=At)<<2|(et>=Tt)<<1|tt>=St)&&(xt=bt[bt.length-1],bt[bt.length-1]=bt[bt.length-1-kt],bt[bt.length-1-kt]=xt)}else{var Et=tt-+this._x.call(null,vt.data),$t=et-+this._y.call(null,vt.data),Dt=nt-+this._z.call(null,vt.data),jt=Et*Et+$t*$t+Dt*Dt;if(jt=(gt=(at+ct)/2))?at=gt:ct=gt,(xt=pt>=(yt=(st+ut)/2))?st=yt:ut=yt,(kt=mt>=(bt=(lt+ht)/2))?lt=bt:ht=bt,et=nt,!(nt=nt[St=kt<<2|xt<<1|vt]))return this;if(!nt.length)break;(et[St+1&7]||et[St+2&7]||et[St+3&7]||et[St+4&7]||et[St+5&7]||et[St+6&7]||et[St+7&7])&&(rt=et,Tt=St)}for(;nt.data!==tt;)if(it=nt,!(nt=nt.next))return this;return(ot=nt.next)&&delete nt.next,it?(ot?it.next=ot:delete it.next,this):et?(ot?et[St]=ot:delete et[St],(nt=et[0]||et[1]||et[2]||et[3]||et[4]||et[5]||et[6]||et[7])&&nt===(et[7]||et[6]||et[5]||et[4]||et[3]||et[2]||et[1]||et[0])&&!nt.length&&(rt?rt[Tt]=nt:this._root=nt),this):(this._root=ot,this)}function removeAll(tt){for(var et=0,nt=tt.length;et1&&(gt=pt.y+pt.vy),nt>2&&(yt=pt.z+pt.vz),dt.visit(kt);function kt(St,Tt,At,Et,$t,Dt,jt){var Pt=[Tt,At,Et,$t,Dt,jt],Ct=Pt[0],wt=Pt[1],It=Pt[2],Ot=Pt[nt],Wt=Pt[nt+1],zt=Pt[nt+2],Ft=St.data,Nt=St.r,Ut=bt+Nt;if(Ft){if(Ft.index>pt.index){var Mt=mt-Ft.x-Ft.vx,Ht=nt>1?gt-Ft.y-Ft.vy:0,en=nt>2?yt-Ft.z-Ft.vz:0,sn=Mt*Mt+Ht*Ht+en*en;sn1&&Ht===0&&(Ht=jiggle(it),sn+=Ht*Ht),nt>2&&en===0&&(en=jiggle(it),sn+=en*en),sn=(Ut-(sn=Math.sqrt(sn)))/sn*ot,pt.vx+=(Mt*=sn)*(Ut=(Nt*=Nt)/(vt+Nt)),nt>1&&(pt.vy+=(Ht*=sn)*Ut),nt>2&&(pt.vz+=(en*=sn)*Ut),Ft.vx-=Mt*(Ut=1-Ut),nt>1&&(Ft.vy-=Ht*Ut),nt>2&&(Ft.vz-=en*Ut))}return}return Ct>mt+Ut||Ot1&&(wt>gt+Ut||Wt2&&(It>yt+Ut||ztut.r&&(ut.r=ut[ht].r)}function ct(){if(et){var ut,ht=et.length,dt;for(rt=new Array(ht),ut=0;uttypeof dt=="function")||Math.random,nt=ht.find(dt=>[1,2,3].includes(dt))||2,ct()},st.iterations=function(ut){return arguments.length?(at=+ut,st):at},st.strength=function(ut){return arguments.length?(ot=+ut,st):ot},st.radius=function(ut){return arguments.length?(tt=typeof ut=="function"?ut:constant$7(+ut),ct(),st):tt},st}function index$1(tt){return tt.index}function find$2(tt,et){var nt=tt.get(et);if(!nt)throw new Error("node not found: "+et);return nt}function forceLink(tt){var et=index$1,nt=dt,rt,it=constant$7(30),ot,at,st,lt,ct,ut,ht=1;tt==null&&(tt=[]);function dt(bt){return 1/Math.min(lt[bt.source.index],lt[bt.target.index])}function pt(bt){for(var vt=0,xt=tt.length;vt1&&($t=At.y+At.vy-Tt.y-Tt.vy||jiggle(ut)),st>2&&(Dt=At.z+At.vz-Tt.z-Tt.vz||jiggle(ut)),jt=Math.sqrt(Et*Et+$t*$t+Dt*Dt),jt=(jt-ot[kt])/jt*bt*rt[kt],Et*=jt,$t*=jt,Dt*=jt,At.vx-=Et*(Pt=ct[kt]),st>1&&(At.vy-=$t*Pt),st>2&&(At.vz-=Dt*Pt),Tt.vx+=Et*(Pt=1-Pt),st>1&&(Tt.vy+=$t*Pt),st>2&&(Tt.vz+=Dt*Pt)}function mt(){if(at){var bt,vt=at.length,xt=tt.length,kt=new Map(at.map((Tt,At)=>[et(Tt,At,at),Tt])),St;for(bt=0,lt=new Array(vt);bttypeof xt=="function")||Math.random,st=vt.find(xt=>[1,2,3].includes(xt))||2,mt()},pt.links=function(bt){return arguments.length?(tt=bt,mt(),pt):tt},pt.id=function(bt){return arguments.length?(et=bt,pt):et},pt.iterations=function(bt){return arguments.length?(ht=+bt,pt):ht},pt.strength=function(bt){return arguments.length?(nt=typeof bt=="function"?bt:constant$7(+bt),gt(),pt):nt},pt.distance=function(bt){return arguments.length?(it=typeof bt=="function"?bt:constant$7(+bt),yt(),pt):it},pt}var noop$6={value:()=>{}};function dispatch(){for(var tt=0,et=arguments.length,nt={},rt;tt=0&&(rt=nt.slice(it+1),nt=nt.slice(0,it)),nt&&!et.hasOwnProperty(nt))throw new Error("unknown type: "+nt);return{type:nt,name:rt}})}Dispatch.prototype=dispatch.prototype={constructor:Dispatch,on:function(tt,et){var nt=this._,rt=parseTypenames$1(tt+"",nt),it,ot=-1,at=rt.length;if(arguments.length<2){for(;++ot0)for(var nt=new Array(it),rt=0,it,ot;rt=0&&tt._call.call(void 0,et),tt=tt._next;--frame}function wake(){clockNow=(clockLast=clock.now())+clockSkew,frame=timeout$1=0;try{timerFlush()}finally{frame=0,nap(),clockNow=0}}function poke(){var tt=clock.now(),et=tt-clockLast;et>pokeDelay&&(clockSkew-=et,clockLast=tt)}function nap(){for(var tt,et=taskHead,nt,rt=1/0;et;)et._call?(rt>et._time&&(rt=et._time),tt=et,et=et._next):(nt=et._next,et._next=null,et=tt?tt._next=nt:taskHead=nt);taskTail=tt,sleep(rt)}function sleep(tt){if(!frame){timeout$1&&(timeout$1=clearTimeout(timeout$1));var et=tt-clockNow;et>24?(tt<1/0&&(timeout$1=setTimeout(wake,tt-clock.now()-clockSkew)),interval&&(interval=clearInterval(interval))):(interval||(clockLast=clock.now(),interval=setInterval(poke,pokeDelay)),frame=1,setFrame(wake))}}function timeout(tt,et,nt){var rt=new Timer$1;return et=et==null?0:+et,rt.restart(it=>{rt.stop(),tt(it+et)},et,nt),rt}const a$2=1664525,c$4=1013904223,m$3=4294967296;function lcg(){let tt=1;return()=>(tt=(a$2*tt+c$4)%m$3)/m$3}var MAX_DIMENSIONS=3;function x$2(tt){return tt.x}function y$2(tt){return tt.y}function z$1(tt){return tt.z}var initialRadius=10,initialAngleRoll=Math.PI*(3-Math.sqrt(5)),initialAngleYaw=Math.PI*20/(9+Math.sqrt(221));function forceSimulation(tt,et){et=et||2;var nt=Math.min(MAX_DIMENSIONS,Math.max(1,Math.round(et))),rt,it=1,ot=.001,at=1-Math.pow(ot,1/300),st=0,lt=.6,ct=new Map,ut=timer$1(pt),ht=dispatch("tick","end"),dt=lcg();tt==null&&(tt=[]);function pt(){mt(),ht.call("tick",rt),it1&&(kt.fy==null?kt.y+=kt.vy*=lt:(kt.y=kt.fy,kt.vy=0)),nt>2&&(kt.fz==null?kt.z+=kt.vz*=lt:(kt.z=kt.fz,kt.vz=0));return rt}function gt(){for(var bt=0,vt=tt.length,xt;bt1&&isNaN(xt.y)||nt>2&&isNaN(xt.z)){var kt=initialRadius*(nt>2?Math.cbrt(.5+bt):nt>1?Math.sqrt(.5+bt):bt),St=bt*initialAngleRoll,Tt=bt*initialAngleYaw;nt===1?xt.x=kt:nt===2?(xt.x=kt*Math.cos(St),xt.y=kt*Math.sin(St)):(xt.x=kt*Math.sin(St)*Math.cos(Tt),xt.y=kt*Math.cos(St),xt.z=kt*Math.sin(St)*Math.sin(Tt))}(isNaN(xt.vx)||nt>1&&isNaN(xt.vy)||nt>2&&isNaN(xt.vz))&&(xt.vx=0,nt>1&&(xt.vy=0),nt>2&&(xt.vz=0))}}function yt(bt){return bt.initialize&&bt.initialize(tt,dt,nt),bt}return gt(),rt={tick:mt,restart:function(){return ut.restart(pt),rt},stop:function(){return ut.stop(),rt},numDimensions:function(bt){return arguments.length?(nt=Math.min(MAX_DIMENSIONS,Math.max(1,Math.round(bt))),ct.forEach(yt),rt):nt},nodes:function(bt){return arguments.length?(tt=bt,gt(),ct.forEach(yt),rt):tt},alpha:function(bt){return arguments.length?(it=+bt,rt):it},alphaMin:function(bt){return arguments.length?(ot=+bt,rt):ot},alphaDecay:function(bt){return arguments.length?(at=+bt,rt):+at},alphaTarget:function(bt){return arguments.length?(st=+bt,rt):st},velocityDecay:function(bt){return arguments.length?(lt=1-bt,rt):1-lt},randomSource:function(bt){return arguments.length?(dt=bt,ct.forEach(yt),rt):dt},force:function(bt,vt){return arguments.length>1?(vt==null?ct.delete(bt):ct.set(bt,yt(vt)),rt):ct.get(bt)},find:function(){var bt=Array.prototype.slice.call(arguments),vt=bt.shift()||0,xt=(nt>1?bt.shift():null)||0,kt=(nt>2?bt.shift():null)||0,St=bt.shift()||1/0,Tt=0,At=tt.length,Et,$t,Dt,jt,Pt,Ct;for(St*=St,Tt=0;Tt1?(ht.on(bt,vt),rt):ht.on(bt)}}}function forceManyBody(){var tt,et,nt,rt,it,ot=constant$7(-30),at,st=1,lt=1/0,ct=.81;function ut(mt){var gt,yt=tt.length,bt=(et===1?binarytree(tt,x$2):et===2?quadtree(tt,x$2,y$2):et===3?octree(tt,x$2,y$2,z$1):null).visitAfter(dt);for(it=mt,gt=0;gt1&&(mt.y=kt/vt),et>2&&(mt.z=St/vt)}else{yt=mt,yt.x=yt.data.x,et>1&&(yt.y=yt.data.y),et>2&&(yt.z=yt.data.z);do gt+=at[yt.data.index];while(yt=yt.next)}mt.value=gt}function pt(mt,gt,yt,bt,vt){if(!mt.value)return!0;var xt=[yt,bt,vt][et-1],kt=mt.x-nt.x,St=et>1?mt.y-nt.y:0,Tt=et>2?mt.z-nt.z:0,At=xt-gt,Et=kt*kt+St*St+Tt*Tt;if(At*At/ct1&&St===0&&(St=jiggle(rt),Et+=St*St),et>2&&Tt===0&&(Tt=jiggle(rt),Et+=Tt*Tt),Et1&&(nt.vy+=St*mt.value*it/Et),et>2&&(nt.vz+=Tt*mt.value*it/Et)),!0;if(mt.length||Et>=lt)return;(mt.data!==nt||mt.next)&&(kt===0&&(kt=jiggle(rt),Et+=kt*kt),et>1&&St===0&&(St=jiggle(rt),Et+=St*St),et>2&&Tt===0&&(Tt=jiggle(rt),Et+=Tt*Tt),Et1&&(nt.vy+=St*At),et>2&&(nt.vz+=Tt*At));while(mt=mt.next)}return ut.initialize=function(mt,...gt){tt=mt,rt=gt.find(yt=>typeof yt=="function")||Math.random,et=gt.find(yt=>[1,2,3].includes(yt))||2,ht()},ut.strength=function(mt){return arguments.length?(ot=typeof mt=="function"?mt:constant$7(+mt),ht(),ut):ot},ut.distanceMin=function(mt){return arguments.length?(st=mt*mt,ut):Math.sqrt(st)},ut.distanceMax=function(mt){return arguments.length?(lt=mt*mt,ut):Math.sqrt(lt)},ut.theta=function(mt){return arguments.length?(ct=mt*mt,ut):Math.sqrt(ct)},ut}const simulation=forceSimulation().stop(),defaults$2={numDimensions:3,velocityDecay:.9,forceChargeStrength:-20,forceChargeMinDistance:10,forceChargeMaxDistance:8e3,forceLinkStrength:.04,forceCenterStrength:.85,disableCollide:!1,disableCenter:!1,disableLink:!1,disableCharge:!1,forceCollideRadiusMethod:tt=>(tt.scale||1)*6+200,forceLinkDistanceMethod:tt=>{const et=tt.source.node_type;let nt=50;switch(et){case"topic":nt=30;break;case"guest":nt=30;break;case"clip":nt=10;break;case"episode":nt=15;break}return nt*2}},runForceSimulation=(tt,et,{numDimensions:nt=defaults$2.numDimensions,velocityDecay:rt=defaults$2.velocityDecay,forceChargeStrength:it=defaults$2.forceChargeStrength,forceChargeMinDistance:ot=defaults$2.forceChargeMinDistance,forceChargeMaxDistance:at=defaults$2.forceChargeMaxDistance,forceLinkStrength:st=defaults$2.forceLinkStrength,forceCenterStrength:lt=defaults$2.forceCenterStrength,forceLinkDistanceMethod:ct=defaults$2.forceLinkDistanceMethod,forceCollideRadiusMethod:ut=defaults$2.forceCollideRadiusMethod,disableCollide:ht=defaults$2.disableCollide,disableCenter:dt=defaults$2.disableCenter,disableLink:pt=defaults$2.disableLink,disableCharge:mt=defaults$2.disableCharge})=>(simulation.alpha(1).stop().numDimensions(nt).velocityDecay(rt).force("collide",ht?null:forceCollide().radius(ut).iterations(1)).force("center",dt?null:forceCenter().strength(lt)).force("charge",mt?null:forceManyBody().strength(it).distanceMin(ot).distanceMax(at)).nodes(tt).force("link",pt?null:forceLink().distance(ct).strength(st).id(gt=>gt.id).links(et.filter(gt=>!gt.onlyVisibleOnSelect))).alpha(1).restart(),simulation),simulationTicks$1=60,collisionTicks$1=20,runSimulationPhase$1=tt=>{for(let et=0;et{tt.force("collide",forceCollide().radius(et=>(et.scale||1)*20).iterations(1));for(let et=0;et{const et=tt.map(ot=>({...ot,x:0,y:0,z:0})),nt=generateLinksFromNodeData(et,!1,!1),rt=runForceSimulation(et,nt,{numDimensions:3,forceLinkStrength:.5,forceChargeStrength:-40,forceCenterStrength:.3,velocityDecay:.5});runSimulationPhase$1(rt),runCollisionPhase$1(rt),rt.stop();const it=nt.map(ot=>{const at=et.find(ht=>ht.ref_id===ot.sourceRef),st=et.find(ht=>ht.ref_id===ot.targetRef),lt=["guest","topic"].some(ht=>ht===(at==null?void 0:at.node_type)||ht===(st==null?void 0:st.node_type)),ct=new Vector3((at==null?void 0:at.x)||0,(at==null?void 0:at.y)||0,(at==null?void 0:at.z)||0),ut=new Vector3((st==null?void 0:st.x)||0,(st==null?void 0:st.y)||0,(st==null?void 0:st.z)||0);return{...ot,onlyVisibleOnSelect:lt,sourcePosition:ct,targetPosition:ut}});return{nodes:et,links:it}},sortAB=(tt,et,nt)=>{let rt=-2;return tt===nt&&et===nt?rt=0:tt===nt&&et!==nt?rt=-1:tt!==nt&&et===nt&&(rt=1),rt},sortNodesByHierarchy=tt=>tt.map(nt=>nt).sort((nt,rt)=>{let it=0;return nt.node_type==="show"||rt.node_type==="show"?it=sortAB(nt.node_type,rt.node_type,"show"):nt.node_type==="episode"||rt.node_type==="episode"?it=sortAB(nt.node_type,rt.node_type,"episode"):nt.node_type==="clip"||rt.node_type==="clip"?it=sortAB(nt.node_type,rt.node_type,"clip"):nt.node_type!=="guest"&&rt.node_type==="guest"?it=sortAB(nt.node_type,rt.node_type,"guest"):it=0,it});function getMyParents(tt,et){const{ref_id:nt}=tt;return!nt||!et?[]:et.filter(it=>{var ot;return(ot=it.children)==null?void 0:ot.includes(nt)})}function getMyChildren(tt,et){return et.filter(rt=>rt.ref_id&&tt.includes(rt.ref_id))}const simulationTicks=60,collisionTicks=20,universeScale$1=5e3,universeCube={scale:universeScale$1/2,position:{x:0,y:0,z:0}};function generateNodePosition$1(tt,et){const{scale:nt,position:rt}=universeCube,it={x:rt.x+Math.random()*nt-nt*.5,y:rt.y+Math.random()*nt-nt*.5,z:rt.z+Math.random()*nt-nt*.5},ot=getMyParents(tt,et),at=ot!=null&&ot.length?new Vector3(ot[0].x,ot[0].y,ot[0].z):null;return at&&(it.x=at.x,it.y=at.y,it.z=at.z),new Vector3(it.x,it.y,it.z)}const runSimulationPhase=tt=>{for(let et=0;et{tt.force("collide",forceCollide().radius(et=>(et.scale||1)*20).iterations(1));for(let et=0;et{const et=[],nt=tt.map(at=>{const st=generateNodePosition$1(at,et),lt={...at,...st};return et.push(lt),lt}),rt=generateLinksFromNodeData(nt,!0,!0),it=runForceSimulation(nt,rt,{numDimensions:3,forceLinkStrength:.01,forceChargeStrength:-80,velocityDecay:.5,disableCenter:!0,disableCharge:!0});runSimulationPhase(it),runCollisionPhase(it),it.stop();const ot=rt.map(at=>{const st=nt.find(dt=>dt.ref_id===at.sourceRef),lt=nt.find(dt=>dt.ref_id===at.targetRef),ct=new Vector3((st==null?void 0:st.x)||0,(st==null?void 0:st.y)||0,(st==null?void 0:st.z)||0),ut=new Vector3((lt==null?void 0:lt.x)||0,(lt==null?void 0:lt.y)||0,(lt==null?void 0:lt.z)||0);return{...at,onlyVisibleOnSelect:!0,sourcePosition:ct,targetPosition:ut}});return{nodes:nt,links:ot}},universeScale=5e3,padding=300,guestCube={scale:universeScale/2,position:{x:0,y:0,z:universeScale/2+padding}},topicCube={scale:universeScale/2,position:{x:0,y:0,z:-(universeScale/2+padding)}},dataCube={scale:universeScale/2,position:{x:0,y:0,z:0}};function generateGuestNodePosition(){const{scale:tt,position:et}=guestCube,nt={x:et.x+Math.random()*tt-tt*.5,y:et.y+Math.random()*tt-tt*.5,z:et.z+Math.random()*tt-tt*.5},rt=1,it=10;return new Vector3(nt.x+rt*it,nt.y+rt*it,nt.z+rt*it)}function generateTopicNodePosition(){const{scale:tt,position:et}=topicCube,nt={x:et.x+Math.random()*tt-tt*.5,y:et.y+Math.random()*tt-tt*.5,z:et.z+Math.random()*tt-tt*.5},rt=1,it=10;return new Vector3(nt.x+rt*it,nt.y+rt*it,nt.z+rt*it)}function generateNearbyPosition(tt,et,nt=1){let it=0,ot=10*1;const at=0;switch(et){case"episode":ot+=50*(nt||0);break;case"clip":ot=0,it+=50*(nt||0);break}const st=new Vector3;return st.x=tt.x+it,st.y=tt.y+ot,st.z=tt.z+at,st}function generateNodePosition(tt,et,nt){const{ref_id:rt}=tt,{scale:it,position:ot}=dataCube,at={x:ot.x+Math.random()*it-it*.5,y:ot.y+Math.random()*it-it*.5,z:ot.z+Math.random()*it-it*.5},st=getMyParents(tt,nt);let lt=null;if(st!=null&&st.length){const ht=st[0],pt=getMyChildren(ht.children||[],et).findIndex(mt=>mt.ref_id===rt);lt=generateNearbyPosition(new Vector3(ht.x,ht.y,ht.z),tt.node_type,pt+1)}lt&&(at.x=lt.x,at.y=lt.y,at.z=lt.z);const ct=1,ut=1;return new Vector3(at.x+ct*ut,at.y+ct*ut,at.z+ct*ut)}const generateSplitGraphPositions=tt=>{const et=sortNodesByHierarchy(tt),nt=[],rt=et.map(at=>{let st=new Vector3(0,0,0);switch(at.node_type){case"guest":st=generateGuestNodePosition();break;case"topic":st=generateTopicNodePosition();break;case"data_series":st=generateNodePosition({},et,nt);break;default:st=generateNodePosition(at,et,nt);break}const lt={...at,...st};return nt.push(lt),lt}),ot=generateLinksFromNodeData(rt,!0,!0).map(at=>{const st=rt.find(dt=>dt.ref_id===at.sourceRef),lt=rt.find(dt=>dt.ref_id===at.targetRef);let ct=!1;((st==null?void 0:st.node_type)==="guest"||(st==null?void 0:st.node_type)==="topic"||(lt==null?void 0:lt.node_type)==="guest"||(lt==null?void 0:lt.node_type)==="topic")&&(ct=!0);const ut=new Vector3((st==null?void 0:st.x)||0,(st==null?void 0:st.y)||0,(st==null?void 0:st.z)||0),ht=new Vector3((lt==null?void 0:lt.x)||0,(lt==null?void 0:lt.y)||0,(lt==null?void 0:lt.z)||0);return{...at,onlyVisibleOnSelect:ct,sourcePosition:ut,targetPosition:ht}});return rt.sort((at,st)=>(st.weight||0)-(at.weight||0)),{nodes:rt,links:ot}},getGraphDataPositions=(tt,et)=>tt==="split"?generateSplitGraphPositions(et):tt==="sphere"?generateSphereGraphPositions(et):tt==="earth"?generateEarthGraphPositions(et):generateForceGraphPositions(et),defaultData$8={links:[],nodes:[]},shouldIncludeTopics=!0,maxScale=26,fetchGraphData=async tt=>{try{return getGraphData(tt)}catch{return defaultData$8}},fetchNodes=async tt=>{if(!tt)try{return await api.get("/prediction/content/latest")}catch(nt){return console.error(nt),mock}if(isDevelopment||isE2E)return await api.get(`/v2/searching?word=${tt}&free=true`);const et=await getLSat();try{return await api.get(`/v2/search?word=${tt}`,{Authorization:et})}catch(nt){if(nt.status===402){const rt=distExports.Lsat.fromHeader(nt.headers.get("www-authenticate"));return await payLsat(rt),fetchNodes(tt)}throw nt}},getTrends=async()=>{const tt="/get_trends";return await api.get(tt)},getSentimentData=async tt=>{const et=tt&&new URLSearchParams(tt),nt=et?`/sentiments?${et.toString()}`:"/sentiments";if(isE2E)return await api.get(nt);const rt=await getLSat();try{return await api.get(nt,{Authorization:rt})}catch(it){if(it.status===402){const ot=distExports.Lsat.fromHeader(it.headers.get("www-authenticate"));return await payLsat(ot),getSentimentData(tt)}throw it}},postInstagraph=async tt=>{const et=await getLSat();try{return api.post("/instagraph",JSON.stringify(tt),{Authorization:et})}catch(nt){if(nt.status===402){const rt=distExports.Lsat.fromHeader(nt.headers.get("www-authenticate"));return await payLsat(rt),postInstagraph(tt)}throw nt}},postTeachMe=async tt=>{const et=await getLSat();try{return api.post("/teachme",JSON.stringify(tt),{Authorization:et})}catch(nt){if(nt.status===402){const rt=distExports.Lsat.fromHeader(nt.headers.get("www-authenticate"));return await payLsat(rt),postTeachMe(tt)}throw nt}},postAskQuestion=async tt=>{const et=await getLSat();try{return api.post("/ask_question",JSON.stringify(tt),{Authorization:et})}catch(nt){if(nt.status===402){const rt=distExports.Lsat.fromHeader(nt.headers.get("www-authenticate"));return await payLsat(rt),postAskQuestion(tt)}throw nt}},getNodeScale=tt=>{switch(tt.node_type){case"guest":case"episode":case"document":return 2;case"show":return 3;default:return 1.5}};function generateTopicNodesFromMap(tt,et){Object.entries(tt).forEach(([nt,rt],it)=>{const{children:ot,position:at}=rt,{x:st,y:lt,z:ct}=at,ut=ot.length*2>maxScale?maxScale:ot.length*2,ht=`topic_node_${it}`;et({x:st,y:lt,z:ct,children:ot,colors:["#000"],id:ht,label:nt,name:nt,type:"topic",node_type:"topic",ref_id:ht,scale:ut,show_title:nt,text:nt,weight:0})})}function generateGuestNodesFromMap(tt,et){Object.entries(tt).forEach(([nt,rt],it)=>{const ot=rt.children,at=ot.length*2>maxScale?maxScale:ot.length*2,st=nt||`guestnode_${it}`,lt={...rt,x:0,y:0,z:0,colors:["#000"],id:st,image_url:rt.imageUrl,label:rt.name,name:rt.name,node_type:"guest",ref_id:st,scale:at,show_title:rt.name,text:rt.twitterHandle,type:"guest",weight:0};et(lt)})}const getGraphData=async tt=>{const{graphStyle:et}=useDataStore.getState();let nt=[];const rt={},it={};try{const ot=await fetchNodes(tt),at=Array.isArray(ot.data_series)?ot.data_series:[],st=[...ot.exact,...ot.related,...at];let lt=0;st.length&&st.forEach((dt,pt)=>{var yt;if(dt.weight&<bt.ref_id===dt.ref_id))return;const gt=(yt=dt.image_url)==null?void 0:yt.replace(AWS_IMAGE_BUCKET_URL,CLOUDFRONT_IMAGE_BUCKET_URL).replace(".jpg","_s.jpg");nt.push({...dt,scale:getNodeScale(dt),id:dt.ref_id||dt.tweet_id||dt.id,image_url:gt,type:dt.type||dt.node_type}),dt.node_type==="episode"&&dt.ref_id&&(dt.guests||[]).forEach(vt=>{var kt;const xt=vt;xt.name&&xt.ref_id&&dt.ref_id&&(it[xt.ref_id]={children:[...((kt=it[xt.ref_id])==null?void 0:kt.children)||[],dt.ref_id],imageUrl:xt.profile_picture||"",name:xt.name,twitterHandle:xt.twitter_handle})})}),generateGuestNodesFromMap(it,dt=>{nt.push(dt)}),st.forEach(dt=>{const{topics:pt,ref_id:mt,show_title:gt}=dt;pt&&pt.forEach(yt=>{yt!==tt&>&&(rt[yt]&&!rt[yt].children.includes(mt||gt)?rt[yt].children.push(mt||gt):rt[yt]={position:new Vector3(0,0,0),children:[mt||gt]})})}),shouldIncludeTopics&&generateTopicNodesFromMap(rt,dt=>{nt.push(dt)});const ct=getGraphDataPositions(et,nt),{links:ut}=ct;nt=ct.nodes,nt.sort((dt,pt)=>(pt.weight||0)-(dt.weight||0));const ht=getMaxSuperficialWeightPerNodeType(nt,ut);return nt=addWeightNormalizationToNodes(lt,ht,nt,ut),{links:ut,nodes:nt}}catch(ot){return console.error(ot),defaultData$8}},getSegmentColor=(tt,et)=>tt==="topic"||et==="topic"?NODE_RELATIVE_HIGHLIGHT_COLORS.topics.segmentColor:tt==="guest"||et==="guest"?NODE_RELATIVE_HIGHLIGHT_COLORS.guests.segmentColor:NODE_RELATIVE_HIGHLIGHT_COLORS.children.segmentColor,generateLinksFromNodeData=(tt,et,nt)=>{const rt=[];return tt.forEach(it=>{const{children:ot,guests:at}=it;ot==null||ot.forEach(st=>{if(it.ref_id){const lt=tt.find(ht=>ht.ref_id===st)||null;if(!lt)return;const ct=new Vector3(it.x||0,it.y||0,it.z||0),ut=new Vector3((lt==null?void 0:lt.x)||0,(lt==null?void 0:lt.y)||0,(lt==null?void 0:lt.z)||0);rt.push({onlyVisibleOnSelect:et,color:getSegmentColor(it.node_type,(lt==null?void 0:lt.node_type)||""),source:it.ref_id,sourceRef:it.ref_id,sourcePosition:ct,target:st,targetRef:st,targetPosition:ut})}}),at==null||at.forEach(st=>{if(st&&typeof st!="string"&&it.ref_id){const lt=tt.find(ht=>ht.ref_id===(st==null?void 0:st.ref_id))||null;if(!lt)return;const ct=new Vector3(it.x||0,it.y||0,it.z||0),ut=new Vector3((lt==null?void 0:lt.x)||0,(lt==null?void 0:lt.y)||0,(lt==null?void 0:lt.z)||0);rt.push({onlyVisibleOnSelect:nt,color:getSegmentColor(it.node_type,"guest"),source:it.ref_id,sourceRef:it.ref_id,sourcePosition:ct,target:st==null?void 0:st.ref_id,targetRef:st==null?void 0:st.ref_id,targetPosition:ut})}})}),rt},addWeightNormalizationToNodes=(tt,et,nt,rt)=>nt.map(it=>{let ot=(it.weight||0)/tt;return!it.weight&&et[it.node_type]&&(ot=getSuperficialNodeWeight(it,rt)/et[it.node_type]),{...it,weight:ot}}),saveConsumedContent=async tt=>{await executeIfProd(async()=>{if(!await distExports$1.enable(!0)){console.error("Sphinx enable failed, means no pubkey and no budget (including budget of 0)");return}try{await distExports$1.saveGraphData({metaData:{date:Math.floor(new Date().getTime()/1e3),...tt},type:"second_brain_consumed_content"})}catch(nt){console.warn(nt)}})},saveSearchTerm=async()=>{await executeIfProd(async()=>{await distExports$1.enable(!0)||console.log("Sphinx enable failed, means no pubkey and no budget (including budget of 0)")})},graphStyles=["split","force","sphere","earth"],defaultData$7={categoryFilter:null,data:null,selectionGraphData:{nodes:[],links:[]},scrollEventsDisabled:!1,disableCameraRotation:!1,graphRadius:isChileGraph?1600:3056,graphStyle:"split",isFetching:!1,isTimestampLoaded:!1,queuedSources:null,topics:null,hoveredNode:null,selectedNode:null,selectedTimestamp:null,sources:null,sphinxModalIsOpen:!1,cameraFocusTrigger:!1,selectedNodeRelativeIds:[],nearbyNodeIds:[],showSelectionGraph:!1,showTeachMe:!1,hideNodeDetails:!1},useDataStore=react((tt,et)=>({...defaultData$7,fetchData:async nt=>{if(et().isFetching)return;tt({isFetching:!0,sphinxModalIsOpen:!0});const rt=await fetchGraphData(nt||"");nt&&await saveSearchTerm(),tt({data:rt,isFetching:!1,sphinxModalIsOpen:!1,disableCameraRotation:!1,nearbyNodeIds:[],selectedNodeRelativeIds:[],showSelectionGraph:!1,showTeachMe:!1})},setIsFetching:nt=>tt({isFetching:nt}),setData:nt=>tt({data:nt}),setSelectionData:nt=>tt({selectionGraphData:nt}),setScrollEventsDisabled:nt=>tt({scrollEventsDisabled:nt}),setCategoryFilter:nt=>tt({categoryFilter:nt}),setDisableCameraRotation:nt=>tt({disableCameraRotation:nt}),setGraphRadius:nt=>tt({graphRadius:nt}),setGraphStyle:nt=>tt({graphStyle:nt}),setQueuedSources:nt=>tt({queuedSources:nt}),setTopics:nt=>tt({topics:nt}),setHoveredNode:nt=>tt({hoveredNode:nt}),setSelectedNode:nt=>{const rt=et().selectedNode;if((rt==null?void 0:rt.ref_id)!==(nt==null?void 0:nt.ref_id)){const{data:it}=et(),ot=(it==null?void 0:it.nodes.filter(at=>at.ref_id&&nodesAreRelatives(at,nt)).map(at=>(at==null?void 0:at.ref_id)||""))||[];tt({hoveredNode:null,isTimestampLoaded:!1,selectedNode:nt,disableCameraRotation:!0,selectedNodeRelativeIds:ot})}},setSelectedTimestamp:nt=>tt({selectedTimestamp:nt}),setSources:nt=>tt({sources:nt}),setSphinxModalOpen:nt=>tt({sphinxModalIsOpen:nt}),setCameraFocusTrigger:nt=>tt({cameraFocusTrigger:nt}),setNearbyNodeIds:nt=>{const rt=et().nearbyNodeIds;(nt.length!==rt.length||nt[0]!==rt[0])&&tt({nearbyNodeIds:nt})},setShowSelectionGraph:nt=>tt({showSelectionGraph:nt}),setHideNodeDetails:nt=>tt({hideNodeDetails:nt}),setTeachMe:nt=>tt({showTeachMe:nt})})),useSelectedNode=()=>useDataStore(tt=>tt.selectedNode),setIsTimestampLoaded=tt=>useDataStore.setState({isTimestampLoaded:tt}),topupFromToast=async()=>{try{const tt=await distExports$1.topup();if(!tt)throw new Error("Topup failed");if(tt.budget<5)throw new Error("You set a budget of less than 5 sats");toast(jsxRuntimeExports.jsx(ToastMessage,{message:`You set a budget of ${tt.budget} sats`}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"success"})}catch(tt){tt instanceof Error&&toast(jsxRuntimeExports.jsx(ToastMessage,{message:tt.message}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"error"})}},ToastMessage=({message:tt})=>tt===BOOST_ERROR_BUDGET?jsxRuntimeExports.jsxs("div",{children:[tt,jsxRuntimeExports.jsx(ButtonWrapper,{onClick:topupFromToast,type:"button",children:jsxRuntimeExports.jsx(Text$3,{color:"white",kind:"medium",children:"Topup"})})]}):jsxRuntimeExports.jsx("div",{children:tt}),ButtonWrapper=styled$4.button` +`},{children:["9dcca755-0a20-45e5-8e4d-dfe2800b9c6f","9dcca755-0a20-45e5-8e4d-dfe2800b9c6f"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/fe6bdbce-e91d-43cf-ab33-0e98bffabecc.jpg",node_type:"show",ref_id:"fe6bdbce-e91d-43cf-ab33-0e98bffabecc",show_title:"Bitcoin Charlotte"},{children:["b8289cbb-ec69-49a8-b6ab-c1fd808acc09"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/4240c90e-0086-4ece-bfe5-84a282c5059e.jpg",node_type:"show",ref_id:"4240c90e-0086-4ece-bfe5-84a282c5059e",show_title:"Thriller Bitcoin"},{children:["daddd93e-7bc6-4c50-a150-5199b437afc9"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/24a144b0-7ca3-40e9-9c42-86b9fce0b662.jpg",node_type:"show",ref_id:"24a144b0-7ca3-40e9-9c42-86b9fce0b662",show_title:"The Chaincode Podcast"},{children:["56bf65e9-41d5-42e1-95d6-239e4c835781","56bf65e9-41d5-42e1-95d6-239e4c835781","56bf65e9-41d5-42e1-95d6-239e4c835781","ff88a8b8-bcd6-4d86-8a65-8a68def35b9f","810a3acb-e30e-46bc-8c67-1d504b2e7c09","810a3acb-e30e-46bc-8c67-1d504b2e7c09"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/f1879df9-9bc6-4a76-951f-24548da768ef.jpg",node_type:"show",ref_id:"f1879df9-9bc6-4a76-951f-24548da768ef",show_title:"Bitcoin.Review Podcast with NVK & Guests"},{children:["f7e75069-adf6-41b0-9bb7-a6a2aa846493","f7e75069-adf6-41b0-9bb7-a6a2aa846493","6eb2a481-408f-4989-9f28-67789651259a","89049a1c-0171-4999-b003-57e1b57d92b2","d842ce17-a4c0-49a6-bdc5-5268f1d61779","8d9b0689-2e69-44c1-afe2-3519e999390a","8d9b0689-2e69-44c1-afe2-3519e999390a"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e7d2a4ca-6b44-4a45-a94c-6f48987979f7.jpg",node_type:"show",ref_id:"e7d2a4ca-6b44-4a45-a94c-6f48987979f7",show_title:"TABConf (The Atlanta Bitcoin Conference)"},{children:["3b818893-4605-499c-a467-5abcc23f9483","3b818893-4605-499c-a467-5abcc23f9483","3b818893-4605-499c-a467-5abcc23f9483","a44e78cd-dc66-4b67-9523-7ddff0d3655f","a44e78cd-dc66-4b67-9523-7ddff0d3655f","0c4f330b-a39d-4312-9775-58b42c7c9723","0c4f330b-a39d-4312-9775-58b42c7c9723","205a0650-fefe-4aaf-a894-faa8b72d966a","205a0650-fefe-4aaf-a894-faa8b72d966a","205a0650-fefe-4aaf-a894-faa8b72d966a","205a0650-fefe-4aaf-a894-faa8b72d966a","205a0650-fefe-4aaf-a894-faa8b72d966a","a60dc641-5d14-4960-ab73-66ff199edd1d"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/2ec62250-4755-4616-8342-096a2cfab95f.jpg",node_type:"show",ref_id:"2ec62250-4755-4616-8342-096a2cfab95f",show_title:"Voltage"},{children:["3af98dc1-5e7c-4ef3-ad74-b9b6afaee8b9","625d9252-2f5e-4f53-b577-dd2dfd4d4749"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/492cbcce-3744-4d8b-b2ca-3a7f063e798a.jpg",node_type:"show",ref_id:"492cbcce-3744-4d8b-b2ca-3a7f063e798a",show_title:"Swan Bitcoin"},{children:["8eef2f82-bbf9-4fef-ba3d-102679d4a1a5"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/b29c81c8-cccd-4a6b-b78f-3c1591a54d27.jpg",node_type:"show",ref_id:"b29c81c8-cccd-4a6b-b78f-3c1591a54d27",show_title:"Austin Bitcoin Club"},{children:["a1e3c3cf-2045-4c33-8152-0e162b7ca729"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/63e0cbc0-731d-4ea0-9dd2-2b8b841eb28a.jpg",node_type:"show",ref_id:"63e0cbc0-731d-4ea0-9dd2-2b8b841eb28a",show_title:"Synonym"},{children:["e06b030a-063e-4894-9914-d326220f75f8","e06b030a-063e-4894-9914-d326220f75f8","e06b030a-063e-4894-9914-d326220f75f8"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/ea2cf2ae-76de-4185-818c-384b3b06228b.jpg",node_type:"show",ref_id:"ea2cf2ae-76de-4185-818c-384b3b06228b",show_title:"Blockware Intelligence"},{children:["b707bbd8-1a9e-4aee-8e0e-2fe0be24c851"],image_url:"https://stakwork-uploads.s3.amazonaws.com/knowledge-graph-joe/content-images/e79b1a57-ecd0-4df3-b8ec-1a1a55d047e7.jpg",node_type:"show",ref_id:"e79b1a57-ecd0-4df3-b8ec-1a1a55d047e7",show_title:"Pleb UnderGround"}],related:[{episode_title:"The Orange Sun ☀️ #Bitcoin vs. Fiat",ref_id:"e5b1ad5b-2ce2-4192-a6d9-e99f0e3e88b5",show_title:"Satoshi’s Journal"},{episode_title:"Orange Sun 🌞 Why Ethereum is a shitcoin/scam & Bitcoin News",ref_id:"0645c5a3-b511-471d-9d8e-ef63b4dfe340",show_title:"Satoshi’s Journal"},{episode_title:"#Bitcoin Beats⚡🎶 by @SatoshisJournal Genesis Block walkthrough",ref_id:"aba7b4db-77bb-40c4-a0d4-4ce20da7b9ba",show_title:"Satoshi’s Journal"},{episode_title:"The Orange Sun 🌞 Does Price = Value? #Bitcoin",ref_id:"a0826cdb-6198-4416-bd12-1dd5aa09a075",show_title:"Satoshi’s Journal"},{episode_title:"#Bitcoin Beats⚡🎶 by @SatoshisJournal w @NEEDcreations & @DJSATOSHI18",ref_id:"fd00f285-c11e-40ba-8af9-b67265ac321b",show_title:"Satoshi’s Journal"},{episode_title:'The Orange Sun ☀️ Reading/Discussion of "The Book of Satoshi."',ref_id:"fcbe1196-c55d-476f-92d6-4dcba954eaf3",show_title:"Satoshi’s Journal"},{episode_title:'The Orange 🌞 Reading/Discussion "The Book of Satoshi" & Bitcoin News',ref_id:"c6447277-9a58-411f-85e1-5ac166884ce5",show_title:"Satoshi’s Journal"},{episode_title:"The Orange Sun 🌞 Bitcoin News and Talk - Happy Holidays!",ref_id:"d0b59017-ae64-47d4-be5c-c1531c9d480f",show_title:"Satoshi’s Journal"},{episode_title:`The Orange Sun 🌞 Reading/Discussion Tomer Strolight's "Why Bitcoin?"`,ref_id:"95848760-3863-4595-b049-f25826eba2d3",show_title:"Satoshi’s Journal"}]},typesWeighedByChildren=["show","episode"],getSuperficialNodeWeight=(tt,et)=>{var rt;return tt.weight?tt.weight:typesWeighedByChildren.includes(tt.node_type)?((rt=tt==null?void 0:tt.children)==null?void 0:rt.length)||0:et.filter(it=>it.sourceRef===tt.ref_id||it.targetRef===tt.ref_id).length},getMaxSuperficialWeightPerNodeType=(tt,et)=>{const nt={};return tt.forEach(rt=>{const it=getSuperficialNodeWeight(rt,et);(!nt[rt.node_type]||nt[rt.node_type]tt.clone().normalize().clone().negate().normalize().multiplyScalar(et).add(tt),getPositionFromLngLat=(tt,et,nt)=>{const rt=et*Math.PI/180,it=(tt-180)*Math.PI/180,ot=-nt*Math.cos(rt)*Math.cos(it),at=nt*Math.sin(rt),st=nt*Math.cos(rt)*Math.sin(it);return new Vector3(ot,at,st)},generateEarthGraphPositions=tt=>{const et=tt.map(rt=>{const{longitude:it,latitude:ot}=rt.longitude&&rt.latitude?rt:{longitude:getRandomLngLat(),latitude:getRandomLngLat()},at=getPositionFromLngLat(it,ot,dataRadius);return{...rt,...at}}),nt=generateLinksFromNodeData(et,!0,!0);return{nodes:et,links:nt}};function forceCenter(tt,et,nt){var rt,it=1;tt==null&&(tt=0),et==null&&(et=0),nt==null&&(nt=0);function ot(){var at,st=rt.length,lt,ct=0,ut=0,ht=0;for(at=0;at=(lt=(at+st)/2))?at=lt:st=lt,rt=it,!(it=it[ht=+ut]))return rt[ht]=ot,tt;if(ct=+tt._x.call(null,it.data),et===ct)return ot.next=it,rt?rt[ht]=ot:tt._root=ot,tt;do rt=rt?rt[ht]=new Array(2):tt._root=new Array(2),(ut=et>=(lt=(at+st)/2))?at=lt:st=lt;while((ht=+ut)==(dt=+(ct>=lt)));return rt[dt]=it,rt[ht]=ot,tt}function addAll$2(tt){Array.isArray(tt)||(tt=Array.from(tt));const et=tt.length,nt=new Float64Array(et);let rt=1/0,it=-1/0;for(let ot=0,at;otit&&(it=at));if(rt>it)return this;this.cover(rt).cover(it);for(let ot=0;ottt||tt>=nt;)switch(at=+(ttat||(ot=ct.x1)=ht))&&(ct=st[st.length-1],st[st.length-1]=st[st.length-1-ut],st[st.length-1-ut]=ct)}else{var dt=Math.abs(tt-+this._x.call(null,lt.data));dt=(ct=(at+st)/2))?at=ct:st=ct,et=nt,!(nt=nt[ht=+ut]))return this;if(!nt.length)break;et[ht+1&1]&&(rt=et,dt=ht)}for(;nt.data!==tt;)if(it=nt,!(nt=nt.next))return this;return(ot=nt.next)&&delete nt.next,it?(ot?it.next=ot:delete it.next,this):et?(ot?et[ht]=ot:delete et[ht],(nt=et[0]||et[1])&&nt===(et[1]||et[0])&&!nt.length&&(rt?rt[dt]=nt:this._root=nt),this):(this._root=ot,this)}function removeAll$2(tt){for(var et=0,nt=tt.length;et=(ht=(st+ct)/2))?st=ht:ct=ht,(yt=nt>=(dt=(lt+ut)/2))?lt=dt:ut=dt,it=ot,!(ot=ot[bt=yt<<1|gt]))return it[bt]=at,tt;if(pt=+tt._x.call(null,ot.data),mt=+tt._y.call(null,ot.data),et===pt&&nt===mt)return at.next=ot,it?it[bt]=at:tt._root=at,tt;do it=it?it[bt]=new Array(4):tt._root=new Array(4),(gt=et>=(ht=(st+ct)/2))?st=ht:ct=ht,(yt=nt>=(dt=(lt+ut)/2))?lt=dt:ut=dt;while((bt=yt<<1|gt)===(vt=(mt>=dt)<<1|pt>=ht));return it[vt]=ot,it[bt]=at,tt}function addAll$1(tt){var et,nt,rt=tt.length,it,ot,at=new Array(rt),st=new Array(rt),lt=1/0,ct=1/0,ut=-1/0,ht=-1/0;for(nt=0;ntut&&(ut=it),otht&&(ht=ot));if(lt>ut||ct>ht)return this;for(this.cover(lt,ct).cover(ut,ht),nt=0;nttt||tt>=it||rt>et||et>=ot;)switch(ct=(etut||(st=mt.y0)>ht||(lt=mt.x1)=bt)<<1|tt>=yt)&&(mt=dt[dt.length-1],dt[dt.length-1]=dt[dt.length-1-gt],dt[dt.length-1-gt]=mt)}else{var vt=tt-+this._x.call(null,pt.data),xt=et-+this._y.call(null,pt.data),kt=vt*vt+xt*xt;if(kt=(dt=(at+lt)/2))?at=dt:lt=dt,(gt=ht>=(pt=(st+ct)/2))?st=pt:ct=pt,et=nt,!(nt=nt[yt=gt<<1|mt]))return this;if(!nt.length)break;(et[yt+1&3]||et[yt+2&3]||et[yt+3&3])&&(rt=et,bt=yt)}for(;nt.data!==tt;)if(it=nt,!(nt=nt.next))return this;return(ot=nt.next)&&delete nt.next,it?(ot?it.next=ot:delete it.next,this):et?(ot?et[yt]=ot:delete et[yt],(nt=et[0]||et[1]||et[2]||et[3])&&nt===(et[3]||et[2]||et[1]||et[0])&&!nt.length&&(rt?rt[bt]=nt:this._root=nt),this):(this._root=ot,this)}function removeAll$1(tt){for(var et=0,nt=tt.length;et=(mt=(lt+ht)/2))?lt=mt:ht=mt,(St=nt>=(gt=(ct+dt)/2))?ct=gt:dt=gt,(Tt=rt>=(yt=(ut+pt)/2))?ut=yt:pt=yt,ot=at,!(at=at[At=Tt<<2|St<<1|kt]))return ot[At]=st,tt;if(bt=+tt._x.call(null,at.data),vt=+tt._y.call(null,at.data),xt=+tt._z.call(null,at.data),et===bt&&nt===vt&&rt===xt)return st.next=at,ot?ot[At]=st:tt._root=st,tt;do ot=ot?ot[At]=new Array(8):tt._root=new Array(8),(kt=et>=(mt=(lt+ht)/2))?lt=mt:ht=mt,(St=nt>=(gt=(ct+dt)/2))?ct=gt:dt=gt,(Tt=rt>=(yt=(ut+pt)/2))?ut=yt:pt=yt;while((At=Tt<<2|St<<1|kt)===(Et=(xt>=yt)<<2|(vt>=gt)<<1|bt>=mt));return ot[Et]=at,ot[At]=st,tt}function addAll(tt){Array.isArray(tt)||(tt=Array.from(tt));const et=tt.length,nt=new Float64Array(et),rt=new Float64Array(et),it=new Float64Array(et);let ot=1/0,at=1/0,st=1/0,lt=-1/0,ct=-1/0,ut=-1/0;for(let ht=0,dt,pt,mt,gt;htlt&&(lt=pt),mtct&&(ct=mt),gtut&&(ut=gt));if(ot>lt||at>ct||st>ut)return this;this.cover(ot,at,st).cover(lt,ct,ut);for(let ht=0;httt||tt>=at||it>et||et>=st||ot>nt||nt>=lt;)switch(dt=(ntmt||(ct=xt.y0)>gt||(ut=xt.z0)>yt||(ht=xt.x1)=At)<<2|(et>=Tt)<<1|tt>=St)&&(xt=bt[bt.length-1],bt[bt.length-1]=bt[bt.length-1-kt],bt[bt.length-1-kt]=xt)}else{var Et=tt-+this._x.call(null,vt.data),$t=et-+this._y.call(null,vt.data),Dt=nt-+this._z.call(null,vt.data),jt=Et*Et+$t*$t+Dt*Dt;if(jt=(gt=(at+ct)/2))?at=gt:ct=gt,(xt=pt>=(yt=(st+ut)/2))?st=yt:ut=yt,(kt=mt>=(bt=(lt+ht)/2))?lt=bt:ht=bt,et=nt,!(nt=nt[St=kt<<2|xt<<1|vt]))return this;if(!nt.length)break;(et[St+1&7]||et[St+2&7]||et[St+3&7]||et[St+4&7]||et[St+5&7]||et[St+6&7]||et[St+7&7])&&(rt=et,Tt=St)}for(;nt.data!==tt;)if(it=nt,!(nt=nt.next))return this;return(ot=nt.next)&&delete nt.next,it?(ot?it.next=ot:delete it.next,this):et?(ot?et[St]=ot:delete et[St],(nt=et[0]||et[1]||et[2]||et[3]||et[4]||et[5]||et[6]||et[7])&&nt===(et[7]||et[6]||et[5]||et[4]||et[3]||et[2]||et[1]||et[0])&&!nt.length&&(rt?rt[Tt]=nt:this._root=nt),this):(this._root=ot,this)}function removeAll(tt){for(var et=0,nt=tt.length;et1&&(gt=pt.y+pt.vy),nt>2&&(yt=pt.z+pt.vz),dt.visit(kt);function kt(St,Tt,At,Et,$t,Dt,jt){var Pt=[Tt,At,Et,$t,Dt,jt],Ct=Pt[0],wt=Pt[1],It=Pt[2],Ot=Pt[nt],Wt=Pt[nt+1],zt=Pt[nt+2],Ft=St.data,Nt=St.r,Ut=bt+Nt;if(Ft){if(Ft.index>pt.index){var Mt=mt-Ft.x-Ft.vx,Ht=nt>1?gt-Ft.y-Ft.vy:0,en=nt>2?yt-Ft.z-Ft.vz:0,sn=Mt*Mt+Ht*Ht+en*en;sn1&&Ht===0&&(Ht=jiggle(it),sn+=Ht*Ht),nt>2&&en===0&&(en=jiggle(it),sn+=en*en),sn=(Ut-(sn=Math.sqrt(sn)))/sn*ot,pt.vx+=(Mt*=sn)*(Ut=(Nt*=Nt)/(vt+Nt)),nt>1&&(pt.vy+=(Ht*=sn)*Ut),nt>2&&(pt.vz+=(en*=sn)*Ut),Ft.vx-=Mt*(Ut=1-Ut),nt>1&&(Ft.vy-=Ht*Ut),nt>2&&(Ft.vz-=en*Ut))}return}return Ct>mt+Ut||Ot1&&(wt>gt+Ut||Wt2&&(It>yt+Ut||ztut.r&&(ut.r=ut[ht].r)}function ct(){if(et){var ut,ht=et.length,dt;for(rt=new Array(ht),ut=0;uttypeof dt=="function")||Math.random,nt=ht.find(dt=>[1,2,3].includes(dt))||2,ct()},st.iterations=function(ut){return arguments.length?(at=+ut,st):at},st.strength=function(ut){return arguments.length?(ot=+ut,st):ot},st.radius=function(ut){return arguments.length?(tt=typeof ut=="function"?ut:constant$7(+ut),ct(),st):tt},st}function index$1(tt){return tt.index}function find$2(tt,et){var nt=tt.get(et);if(!nt)throw new Error("node not found: "+et);return nt}function forceLink(tt){var et=index$1,nt=dt,rt,it=constant$7(30),ot,at,st,lt,ct,ut,ht=1;tt==null&&(tt=[]);function dt(bt){return 1/Math.min(lt[bt.source.index],lt[bt.target.index])}function pt(bt){for(var vt=0,xt=tt.length;vt1&&($t=At.y+At.vy-Tt.y-Tt.vy||jiggle(ut)),st>2&&(Dt=At.z+At.vz-Tt.z-Tt.vz||jiggle(ut)),jt=Math.sqrt(Et*Et+$t*$t+Dt*Dt),jt=(jt-ot[kt])/jt*bt*rt[kt],Et*=jt,$t*=jt,Dt*=jt,At.vx-=Et*(Pt=ct[kt]),st>1&&(At.vy-=$t*Pt),st>2&&(At.vz-=Dt*Pt),Tt.vx+=Et*(Pt=1-Pt),st>1&&(Tt.vy+=$t*Pt),st>2&&(Tt.vz+=Dt*Pt)}function mt(){if(at){var bt,vt=at.length,xt=tt.length,kt=new Map(at.map((Tt,At)=>[et(Tt,At,at),Tt])),St;for(bt=0,lt=new Array(vt);bttypeof xt=="function")||Math.random,st=vt.find(xt=>[1,2,3].includes(xt))||2,mt()},pt.links=function(bt){return arguments.length?(tt=bt,mt(),pt):tt},pt.id=function(bt){return arguments.length?(et=bt,pt):et},pt.iterations=function(bt){return arguments.length?(ht=+bt,pt):ht},pt.strength=function(bt){return arguments.length?(nt=typeof bt=="function"?bt:constant$7(+bt),gt(),pt):nt},pt.distance=function(bt){return arguments.length?(it=typeof bt=="function"?bt:constant$7(+bt),yt(),pt):it},pt}var noop$6={value:()=>{}};function dispatch(){for(var tt=0,et=arguments.length,nt={},rt;tt=0&&(rt=nt.slice(it+1),nt=nt.slice(0,it)),nt&&!et.hasOwnProperty(nt))throw new Error("unknown type: "+nt);return{type:nt,name:rt}})}Dispatch.prototype=dispatch.prototype={constructor:Dispatch,on:function(tt,et){var nt=this._,rt=parseTypenames$1(tt+"",nt),it,ot=-1,at=rt.length;if(arguments.length<2){for(;++ot0)for(var nt=new Array(it),rt=0,it,ot;rt=0&&tt._call.call(void 0,et),tt=tt._next;--frame}function wake(){clockNow=(clockLast=clock.now())+clockSkew,frame=timeout$1=0;try{timerFlush()}finally{frame=0,nap(),clockNow=0}}function poke(){var tt=clock.now(),et=tt-clockLast;et>pokeDelay&&(clockSkew-=et,clockLast=tt)}function nap(){for(var tt,et=taskHead,nt,rt=1/0;et;)et._call?(rt>et._time&&(rt=et._time),tt=et,et=et._next):(nt=et._next,et._next=null,et=tt?tt._next=nt:taskHead=nt);taskTail=tt,sleep(rt)}function sleep(tt){if(!frame){timeout$1&&(timeout$1=clearTimeout(timeout$1));var et=tt-clockNow;et>24?(tt<1/0&&(timeout$1=setTimeout(wake,tt-clock.now()-clockSkew)),interval&&(interval=clearInterval(interval))):(interval||(clockLast=clock.now(),interval=setInterval(poke,pokeDelay)),frame=1,setFrame(wake))}}function timeout(tt,et,nt){var rt=new Timer$1;return et=et==null?0:+et,rt.restart(it=>{rt.stop(),tt(it+et)},et,nt),rt}const a$2=1664525,c$4=1013904223,m$3=4294967296;function lcg(){let tt=1;return()=>(tt=(a$2*tt+c$4)%m$3)/m$3}var MAX_DIMENSIONS=3;function x$2(tt){return tt.x}function y$2(tt){return tt.y}function z$1(tt){return tt.z}var initialRadius=10,initialAngleRoll=Math.PI*(3-Math.sqrt(5)),initialAngleYaw=Math.PI*20/(9+Math.sqrt(221));function forceSimulation(tt,et){et=et||2;var nt=Math.min(MAX_DIMENSIONS,Math.max(1,Math.round(et))),rt,it=1,ot=.001,at=1-Math.pow(ot,1/300),st=0,lt=.6,ct=new Map,ut=timer$1(pt),ht=dispatch("tick","end"),dt=lcg();tt==null&&(tt=[]);function pt(){mt(),ht.call("tick",rt),it1&&(kt.fy==null?kt.y+=kt.vy*=lt:(kt.y=kt.fy,kt.vy=0)),nt>2&&(kt.fz==null?kt.z+=kt.vz*=lt:(kt.z=kt.fz,kt.vz=0));return rt}function gt(){for(var bt=0,vt=tt.length,xt;bt1&&isNaN(xt.y)||nt>2&&isNaN(xt.z)){var kt=initialRadius*(nt>2?Math.cbrt(.5+bt):nt>1?Math.sqrt(.5+bt):bt),St=bt*initialAngleRoll,Tt=bt*initialAngleYaw;nt===1?xt.x=kt:nt===2?(xt.x=kt*Math.cos(St),xt.y=kt*Math.sin(St)):(xt.x=kt*Math.sin(St)*Math.cos(Tt),xt.y=kt*Math.cos(St),xt.z=kt*Math.sin(St)*Math.sin(Tt))}(isNaN(xt.vx)||nt>1&&isNaN(xt.vy)||nt>2&&isNaN(xt.vz))&&(xt.vx=0,nt>1&&(xt.vy=0),nt>2&&(xt.vz=0))}}function yt(bt){return bt.initialize&&bt.initialize(tt,dt,nt),bt}return gt(),rt={tick:mt,restart:function(){return ut.restart(pt),rt},stop:function(){return ut.stop(),rt},numDimensions:function(bt){return arguments.length?(nt=Math.min(MAX_DIMENSIONS,Math.max(1,Math.round(bt))),ct.forEach(yt),rt):nt},nodes:function(bt){return arguments.length?(tt=bt,gt(),ct.forEach(yt),rt):tt},alpha:function(bt){return arguments.length?(it=+bt,rt):it},alphaMin:function(bt){return arguments.length?(ot=+bt,rt):ot},alphaDecay:function(bt){return arguments.length?(at=+bt,rt):+at},alphaTarget:function(bt){return arguments.length?(st=+bt,rt):st},velocityDecay:function(bt){return arguments.length?(lt=1-bt,rt):1-lt},randomSource:function(bt){return arguments.length?(dt=bt,ct.forEach(yt),rt):dt},force:function(bt,vt){return arguments.length>1?(vt==null?ct.delete(bt):ct.set(bt,yt(vt)),rt):ct.get(bt)},find:function(){var bt=Array.prototype.slice.call(arguments),vt=bt.shift()||0,xt=(nt>1?bt.shift():null)||0,kt=(nt>2?bt.shift():null)||0,St=bt.shift()||1/0,Tt=0,At=tt.length,Et,$t,Dt,jt,Pt,Ct;for(St*=St,Tt=0;Tt1?(ht.on(bt,vt),rt):ht.on(bt)}}}function forceManyBody(){var tt,et,nt,rt,it,ot=constant$7(-30),at,st=1,lt=1/0,ct=.81;function ut(mt){var gt,yt=tt.length,bt=(et===1?binarytree(tt,x$2):et===2?quadtree(tt,x$2,y$2):et===3?octree(tt,x$2,y$2,z$1):null).visitAfter(dt);for(it=mt,gt=0;gt1&&(mt.y=kt/vt),et>2&&(mt.z=St/vt)}else{yt=mt,yt.x=yt.data.x,et>1&&(yt.y=yt.data.y),et>2&&(yt.z=yt.data.z);do gt+=at[yt.data.index];while(yt=yt.next)}mt.value=gt}function pt(mt,gt,yt,bt,vt){if(!mt.value)return!0;var xt=[yt,bt,vt][et-1],kt=mt.x-nt.x,St=et>1?mt.y-nt.y:0,Tt=et>2?mt.z-nt.z:0,At=xt-gt,Et=kt*kt+St*St+Tt*Tt;if(At*At/ct1&&St===0&&(St=jiggle(rt),Et+=St*St),et>2&&Tt===0&&(Tt=jiggle(rt),Et+=Tt*Tt),Et1&&(nt.vy+=St*mt.value*it/Et),et>2&&(nt.vz+=Tt*mt.value*it/Et)),!0;if(mt.length||Et>=lt)return;(mt.data!==nt||mt.next)&&(kt===0&&(kt=jiggle(rt),Et+=kt*kt),et>1&&St===0&&(St=jiggle(rt),Et+=St*St),et>2&&Tt===0&&(Tt=jiggle(rt),Et+=Tt*Tt),Et1&&(nt.vy+=St*At),et>2&&(nt.vz+=Tt*At));while(mt=mt.next)}return ut.initialize=function(mt,...gt){tt=mt,rt=gt.find(yt=>typeof yt=="function")||Math.random,et=gt.find(yt=>[1,2,3].includes(yt))||2,ht()},ut.strength=function(mt){return arguments.length?(ot=typeof mt=="function"?mt:constant$7(+mt),ht(),ut):ot},ut.distanceMin=function(mt){return arguments.length?(st=mt*mt,ut):Math.sqrt(st)},ut.distanceMax=function(mt){return arguments.length?(lt=mt*mt,ut):Math.sqrt(lt)},ut.theta=function(mt){return arguments.length?(ct=mt*mt,ut):Math.sqrt(ct)},ut}const simulation=forceSimulation().stop(),defaults$2={numDimensions:3,velocityDecay:.9,forceChargeStrength:-20,forceChargeMinDistance:10,forceChargeMaxDistance:8e3,forceLinkStrength:.04,forceCenterStrength:.85,disableCollide:!1,disableCenter:!1,disableLink:!1,disableCharge:!1,forceCollideRadiusMethod:tt=>(tt.scale||1)*6+200,forceLinkDistanceMethod:tt=>{const et=tt.source.node_type;let nt=50;switch(et){case"topic":nt=30;break;case"guest":nt=30;break;case"clip":nt=10;break;case"episode":nt=15;break}return nt*2}},runForceSimulation=(tt,et,{numDimensions:nt=defaults$2.numDimensions,velocityDecay:rt=defaults$2.velocityDecay,forceChargeStrength:it=defaults$2.forceChargeStrength,forceChargeMinDistance:ot=defaults$2.forceChargeMinDistance,forceChargeMaxDistance:at=defaults$2.forceChargeMaxDistance,forceLinkStrength:st=defaults$2.forceLinkStrength,forceCenterStrength:lt=defaults$2.forceCenterStrength,forceLinkDistanceMethod:ct=defaults$2.forceLinkDistanceMethod,forceCollideRadiusMethod:ut=defaults$2.forceCollideRadiusMethod,disableCollide:ht=defaults$2.disableCollide,disableCenter:dt=defaults$2.disableCenter,disableLink:pt=defaults$2.disableLink,disableCharge:mt=defaults$2.disableCharge})=>(simulation.alpha(1).stop().numDimensions(nt).velocityDecay(rt).force("collide",ht?null:forceCollide().radius(ut).iterations(1)).force("center",dt?null:forceCenter().strength(lt)).force("charge",mt?null:forceManyBody().strength(it).distanceMin(ot).distanceMax(at)).nodes(tt).force("link",pt?null:forceLink().distance(ct).strength(st).id(gt=>gt.id).links(et.filter(gt=>!gt.onlyVisibleOnSelect))).alpha(1).restart(),simulation),simulationTicks$1=60,collisionTicks$1=20,runSimulationPhase$1=tt=>{for(let et=0;et{tt.force("collide",forceCollide().radius(et=>(et.scale||1)*20).iterations(1));for(let et=0;et{const et=tt.map(ot=>({...ot,x:0,y:0,z:0})),nt=generateLinksFromNodeData(et,!1,!1),rt=runForceSimulation(et,nt,{numDimensions:3,forceLinkStrength:.5,forceChargeStrength:-40,forceCenterStrength:.3,velocityDecay:.5});runSimulationPhase$1(rt),runCollisionPhase$1(rt),rt.stop();const it=nt.map(ot=>{const at=et.find(ht=>ht.ref_id===ot.sourceRef),st=et.find(ht=>ht.ref_id===ot.targetRef),lt=["guest","topic"].some(ht=>ht===(at==null?void 0:at.node_type)||ht===(st==null?void 0:st.node_type)),ct=new Vector3((at==null?void 0:at.x)||0,(at==null?void 0:at.y)||0,(at==null?void 0:at.z)||0),ut=new Vector3((st==null?void 0:st.x)||0,(st==null?void 0:st.y)||0,(st==null?void 0:st.z)||0);return{...ot,onlyVisibleOnSelect:lt,sourcePosition:ct,targetPosition:ut}});return{nodes:et,links:it}},sortAB=(tt,et,nt)=>{let rt=-2;return tt===nt&&et===nt?rt=0:tt===nt&&et!==nt?rt=-1:tt!==nt&&et===nt&&(rt=1),rt},sortNodesByHierarchy=tt=>tt.map(nt=>nt).sort((nt,rt)=>{let it=0;return nt.node_type==="show"||rt.node_type==="show"?it=sortAB(nt.node_type,rt.node_type,"show"):nt.node_type==="episode"||rt.node_type==="episode"?it=sortAB(nt.node_type,rt.node_type,"episode"):nt.node_type==="clip"||rt.node_type==="clip"?it=sortAB(nt.node_type,rt.node_type,"clip"):nt.node_type!=="guest"&&rt.node_type==="guest"?it=sortAB(nt.node_type,rt.node_type,"guest"):it=0,it});function getMyParents(tt,et){const{ref_id:nt}=tt;return!nt||!et?[]:et.filter(it=>{var ot;return(ot=it.children)==null?void 0:ot.includes(nt)})}function getMyChildren(tt,et){return et.filter(rt=>rt.ref_id&&tt.includes(rt.ref_id))}const simulationTicks=60,collisionTicks=20,universeScale$1=5e3,universeCube={scale:universeScale$1/2,position:{x:0,y:0,z:0}};function generateNodePosition$1(tt,et){const{scale:nt,position:rt}=universeCube,it={x:rt.x+Math.random()*nt-nt*.5,y:rt.y+Math.random()*nt-nt*.5,z:rt.z+Math.random()*nt-nt*.5},ot=getMyParents(tt,et),at=ot!=null&&ot.length?new Vector3(ot[0].x,ot[0].y,ot[0].z):null;return at&&(it.x=at.x,it.y=at.y,it.z=at.z),new Vector3(it.x,it.y,it.z)}const runSimulationPhase=tt=>{for(let et=0;et{tt.force("collide",forceCollide().radius(et=>(et.scale||1)*20).iterations(1));for(let et=0;et{const et=[],nt=tt.map(at=>{const st=generateNodePosition$1(at,et),lt={...at,...st};return et.push(lt),lt}),rt=generateLinksFromNodeData(nt,!0,!0),it=runForceSimulation(nt,rt,{numDimensions:3,forceLinkStrength:.01,forceChargeStrength:-80,velocityDecay:.5,disableCenter:!0,disableCharge:!0});runSimulationPhase(it),runCollisionPhase(it),it.stop();const ot=rt.map(at=>{const st=nt.find(dt=>dt.ref_id===at.sourceRef),lt=nt.find(dt=>dt.ref_id===at.targetRef),ct=new Vector3((st==null?void 0:st.x)||0,(st==null?void 0:st.y)||0,(st==null?void 0:st.z)||0),ut=new Vector3((lt==null?void 0:lt.x)||0,(lt==null?void 0:lt.y)||0,(lt==null?void 0:lt.z)||0);return{...at,onlyVisibleOnSelect:!0,sourcePosition:ct,targetPosition:ut}});return{nodes:nt,links:ot}},universeScale=5e3,padding=300,guestCube={scale:universeScale/2,position:{x:0,y:0,z:universeScale/2+padding}},topicCube={scale:universeScale/2,position:{x:0,y:0,z:-(universeScale/2+padding)}},dataCube={scale:universeScale/2,position:{x:0,y:0,z:0}};function generateGuestNodePosition(){const{scale:tt,position:et}=guestCube,nt={x:et.x+Math.random()*tt-tt*.5,y:et.y+Math.random()*tt-tt*.5,z:et.z+Math.random()*tt-tt*.5},rt=1,it=10;return new Vector3(nt.x+rt*it,nt.y+rt*it,nt.z+rt*it)}function generateTopicNodePosition(){const{scale:tt,position:et}=topicCube,nt={x:et.x+Math.random()*tt-tt*.5,y:et.y+Math.random()*tt-tt*.5,z:et.z+Math.random()*tt-tt*.5},rt=1,it=10;return new Vector3(nt.x+rt*it,nt.y+rt*it,nt.z+rt*it)}function generateNearbyPosition(tt,et,nt=1){let it=0,ot=10*1;const at=0;switch(et){case"episode":ot+=50*(nt||0);break;case"clip":ot=0,it+=50*(nt||0);break}const st=new Vector3;return st.x=tt.x+it,st.y=tt.y+ot,st.z=tt.z+at,st}function generateNodePosition(tt,et,nt){const{ref_id:rt}=tt,{scale:it,position:ot}=dataCube,at={x:ot.x+Math.random()*it-it*.5,y:ot.y+Math.random()*it-it*.5,z:ot.z+Math.random()*it-it*.5},st=getMyParents(tt,nt);let lt=null;if(st!=null&&st.length){const ht=st[0],pt=getMyChildren(ht.children||[],et).findIndex(mt=>mt.ref_id===rt);lt=generateNearbyPosition(new Vector3(ht.x,ht.y,ht.z),tt.node_type,pt+1)}lt&&(at.x=lt.x,at.y=lt.y,at.z=lt.z);const ct=1,ut=1;return new Vector3(at.x+ct*ut,at.y+ct*ut,at.z+ct*ut)}const generateSplitGraphPositions=tt=>{const et=sortNodesByHierarchy(tt),nt=[],rt=et.map(at=>{let st=new Vector3(0,0,0);switch(at.node_type){case"guest":st=generateGuestNodePosition();break;case"topic":st=generateTopicNodePosition();break;case"data_series":st=generateNodePosition({},et,nt);break;default:st=generateNodePosition(at,et,nt);break}const lt={...at,...st};return nt.push(lt),lt}),ot=generateLinksFromNodeData(rt,!0,!0).map(at=>{const st=rt.find(dt=>dt.ref_id===at.sourceRef),lt=rt.find(dt=>dt.ref_id===at.targetRef);let ct=!1;((st==null?void 0:st.node_type)==="guest"||(st==null?void 0:st.node_type)==="topic"||(lt==null?void 0:lt.node_type)==="guest"||(lt==null?void 0:lt.node_type)==="topic")&&(ct=!0);const ut=new Vector3((st==null?void 0:st.x)||0,(st==null?void 0:st.y)||0,(st==null?void 0:st.z)||0),ht=new Vector3((lt==null?void 0:lt.x)||0,(lt==null?void 0:lt.y)||0,(lt==null?void 0:lt.z)||0);return{...at,onlyVisibleOnSelect:ct,sourcePosition:ut,targetPosition:ht}});return rt.sort((at,st)=>(st.weight||0)-(at.weight||0)),{nodes:rt,links:ot}},getGraphDataPositions=(tt,et)=>tt==="split"?generateSplitGraphPositions(et):tt==="sphere"?generateSphereGraphPositions(et):tt==="earth"?generateEarthGraphPositions(et):generateForceGraphPositions(et),defaultData$8={links:[],nodes:[]},shouldIncludeTopics=!0,maxScale=26,fetchGraphData=async tt=>{try{return getGraphData(tt)}catch{return defaultData$8}},fetchNodes=async tt=>{if(!tt)try{return await api.get("/prediction/content/latest")}catch(nt){return console.error(nt),mock}if(isDevelopment||isE2E)return await api.get(`/v2/searching?word=${tt}&free=true`);const et=await getLSat();try{return await api.get(`/v2/search?word=${tt}`,{Authorization:et})}catch(nt){if(nt.status===402){const rt=distExports.Lsat.fromHeader(nt.headers.get("www-authenticate"));return await payLsat(rt),fetchNodes(tt)}throw nt}},getTrends=async()=>{const tt="/get_trends";return await api.get(tt)},getSentimentData=async tt=>{const et=tt&&new URLSearchParams(tt),nt=et?`/sentiments?${et.toString()}`:"/sentiments";if(isE2E)return await api.get(nt);const rt=await getLSat();try{return await api.get(nt,{Authorization:rt})}catch(it){if(it.status===402){const ot=distExports.Lsat.fromHeader(it.headers.get("www-authenticate"));return await payLsat(ot),getSentimentData(tt)}throw it}},postInstagraph=async tt=>{const et=await getLSat();try{await api.post("/instagraph",JSON.stringify(tt),{Authorization:et})}catch(nt){if(nt.status===402){const rt=distExports.Lsat.fromHeader(nt.headers.get("www-authenticate"));await payLsat(rt),await postInstagraph(tt);return}throw nt}},postTeachMe=async tt=>{const et=await getLSat();try{await api.post("/teachme",JSON.stringify(tt),{Authorization:et})}catch(nt){if(nt.status===402){const rt=distExports.Lsat.fromHeader(nt.headers.get("www-authenticate"));await payLsat(rt),await postTeachMe(tt);return}throw nt}},postAskQuestion=async tt=>{const et=await getLSat();try{await api.post("/ask_question",JSON.stringify(tt),{Authorization:et})}catch(nt){if(nt.status===402){const rt=distExports.Lsat.fromHeader(nt.headers.get("www-authenticate"));await payLsat(rt),await postAskQuestion(tt);return}throw nt}},getNodeScale=tt=>{switch(tt.node_type){case"guest":case"episode":case"document":return 2;case"show":return 3;default:return 1.5}};function generateTopicNodesFromMap(tt,et){Object.entries(tt).forEach(([nt,rt],it)=>{const{children:ot,position:at}=rt,{x:st,y:lt,z:ct}=at,ut=ot.length*2>maxScale?maxScale:ot.length*2,ht=`topic_node_${it}`;et({x:st,y:lt,z:ct,children:ot,colors:["#000"],id:ht,label:nt,name:nt,type:"topic",node_type:"topic",ref_id:ht,scale:ut,show_title:nt,text:nt,weight:0})})}function generateGuestNodesFromMap(tt,et){Object.entries(tt).forEach(([nt,rt],it)=>{const ot=rt.children,at=ot.length*2>maxScale?maxScale:ot.length*2,st=nt||`guestnode_${it}`,lt={...rt,x:0,y:0,z:0,colors:["#000"],id:st,image_url:rt.imageUrl,label:rt.name,name:rt.name,node_type:"guest",ref_id:st,scale:at,show_title:rt.name,text:rt.twitterHandle,type:"guest",weight:0};et(lt)})}const getGraphData=async tt=>{const{graphStyle:et}=useDataStore.getState();let nt=[];const rt={},it={};try{const ot=await fetchNodes(tt),at=Array.isArray(ot.data_series)?ot.data_series:[],st=[...ot.exact,...ot.related,...at];let lt=0;st.length&&st.forEach((dt,pt)=>{var yt;if(dt.weight&<bt.ref_id===dt.ref_id))return;const gt=(yt=dt.image_url)==null?void 0:yt.replace(AWS_IMAGE_BUCKET_URL,CLOUDFRONT_IMAGE_BUCKET_URL).replace(".jpg","_s.jpg");nt.push({...dt,scale:getNodeScale(dt),id:dt.ref_id||dt.tweet_id||dt.id,image_url:gt,type:dt.type||dt.node_type}),dt.node_type==="episode"&&dt.ref_id&&(dt.guests||[]).forEach(vt=>{var kt;const xt=vt;xt.name&&xt.ref_id&&dt.ref_id&&(it[xt.ref_id]={children:[...((kt=it[xt.ref_id])==null?void 0:kt.children)||[],dt.ref_id],imageUrl:xt.profile_picture||"",name:xt.name,twitterHandle:xt.twitter_handle})})}),generateGuestNodesFromMap(it,dt=>{nt.push(dt)}),st.forEach(dt=>{const{topics:pt,ref_id:mt,show_title:gt}=dt;pt&&pt.forEach(yt=>{yt!==tt&>&&(rt[yt]&&!rt[yt].children.includes(mt||gt)?rt[yt].children.push(mt||gt):rt[yt]={position:new Vector3(0,0,0),children:[mt||gt]})})}),shouldIncludeTopics&&generateTopicNodesFromMap(rt,dt=>{nt.push(dt)});const ct=getGraphDataPositions(et,nt),{links:ut}=ct;nt=ct.nodes,nt.sort((dt,pt)=>(pt.weight||0)-(dt.weight||0));const ht=getMaxSuperficialWeightPerNodeType(nt,ut);return nt=addWeightNormalizationToNodes(lt,ht,nt,ut),{links:ut,nodes:nt}}catch(ot){return console.error(ot),defaultData$8}},getSegmentColor=(tt,et)=>tt==="topic"||et==="topic"?NODE_RELATIVE_HIGHLIGHT_COLORS.topics.segmentColor:tt==="guest"||et==="guest"?NODE_RELATIVE_HIGHLIGHT_COLORS.guests.segmentColor:NODE_RELATIVE_HIGHLIGHT_COLORS.children.segmentColor,generateLinksFromNodeData=(tt,et,nt)=>{const rt=[];return tt.forEach(it=>{const{children:ot,guests:at}=it;ot==null||ot.forEach(st=>{if(it.ref_id){const lt=tt.find(ht=>ht.ref_id===st)||null;if(!lt)return;const ct=new Vector3(it.x||0,it.y||0,it.z||0),ut=new Vector3((lt==null?void 0:lt.x)||0,(lt==null?void 0:lt.y)||0,(lt==null?void 0:lt.z)||0);rt.push({onlyVisibleOnSelect:et,color:getSegmentColor(it.node_type,(lt==null?void 0:lt.node_type)||""),source:it.ref_id,sourceRef:it.ref_id,sourcePosition:ct,target:st,targetRef:st,targetPosition:ut})}}),at==null||at.forEach(st=>{if(st&&typeof st!="string"&&it.ref_id){const lt=tt.find(ht=>ht.ref_id===(st==null?void 0:st.ref_id))||null;if(!lt)return;const ct=new Vector3(it.x||0,it.y||0,it.z||0),ut=new Vector3((lt==null?void 0:lt.x)||0,(lt==null?void 0:lt.y)||0,(lt==null?void 0:lt.z)||0);rt.push({onlyVisibleOnSelect:nt,color:getSegmentColor(it.node_type,"guest"),source:it.ref_id,sourceRef:it.ref_id,sourcePosition:ct,target:st==null?void 0:st.ref_id,targetRef:st==null?void 0:st.ref_id,targetPosition:ut})}})}),rt},addWeightNormalizationToNodes=(tt,et,nt,rt)=>nt.map(it=>{let ot=(it.weight||0)/tt;return!it.weight&&et[it.node_type]&&(ot=getSuperficialNodeWeight(it,rt)/et[it.node_type]),{...it,weight:ot}}),saveConsumedContent=async tt=>{await executeIfProd(async()=>{if(!await distExports$1.enable(!0)){console.error("Sphinx enable failed, means no pubkey and no budget (including budget of 0)");return}try{await distExports$1.saveGraphData({metaData:{date:Math.floor(new Date().getTime()/1e3),...tt},type:"second_brain_consumed_content"})}catch(nt){console.warn(nt)}})},saveSearchTerm=async()=>{await executeIfProd(async()=>{await distExports$1.enable(!0)||console.log("Sphinx enable failed, means no pubkey and no budget (including budget of 0)")})},graphStyles=["split","force","sphere","earth"],defaultData$7={categoryFilter:null,data:null,selectionGraphData:{nodes:[],links:[]},scrollEventsDisabled:!1,disableCameraRotation:!1,graphRadius:isChileGraph?1600:3056,graphStyle:"split",isFetching:!1,isTimestampLoaded:!1,queuedSources:null,topics:null,hoveredNode:null,selectedNode:null,selectedTimestamp:null,sources:null,sphinxModalIsOpen:!1,cameraFocusTrigger:!1,selectedNodeRelativeIds:[],nearbyNodeIds:[],showSelectionGraph:!1,showTeachMe:!1,hideNodeDetails:!1},useDataStore=react((tt,et)=>({...defaultData$7,fetchData:async nt=>{if(et().isFetching)return;tt({isFetching:!0,sphinxModalIsOpen:!0});const rt=await fetchGraphData(nt||"");nt&&await saveSearchTerm(),tt({data:rt,isFetching:!1,sphinxModalIsOpen:!1,disableCameraRotation:!1,nearbyNodeIds:[],selectedNodeRelativeIds:[],showSelectionGraph:!1,showTeachMe:!1})},setIsFetching:nt=>tt({isFetching:nt}),setData:nt=>tt({data:nt}),setSelectionData:nt=>tt({selectionGraphData:nt}),setScrollEventsDisabled:nt=>tt({scrollEventsDisabled:nt}),setCategoryFilter:nt=>tt({categoryFilter:nt}),setDisableCameraRotation:nt=>tt({disableCameraRotation:nt}),setGraphRadius:nt=>tt({graphRadius:nt}),setGraphStyle:nt=>tt({graphStyle:nt}),setQueuedSources:nt=>tt({queuedSources:nt}),setTopics:nt=>tt({topics:nt}),setHoveredNode:nt=>tt({hoveredNode:nt}),setSelectedNode:nt=>{const rt=et().selectedNode;if((rt==null?void 0:rt.ref_id)!==(nt==null?void 0:nt.ref_id)){const{data:it}=et(),ot=(it==null?void 0:it.nodes.filter(at=>at.ref_id&&nodesAreRelatives(at,nt)).map(at=>(at==null?void 0:at.ref_id)||""))||[];tt({hoveredNode:null,isTimestampLoaded:!1,selectedNode:nt,disableCameraRotation:!0,selectedNodeRelativeIds:ot})}},setSelectedTimestamp:nt=>tt({selectedTimestamp:nt}),setSources:nt=>tt({sources:nt}),setSphinxModalOpen:nt=>tt({sphinxModalIsOpen:nt}),setCameraFocusTrigger:nt=>tt({cameraFocusTrigger:nt}),setNearbyNodeIds:nt=>{const rt=et().nearbyNodeIds;(nt.length!==rt.length||nt[0]!==rt[0])&&tt({nearbyNodeIds:nt})},setShowSelectionGraph:nt=>tt({showSelectionGraph:nt}),setHideNodeDetails:nt=>tt({hideNodeDetails:nt}),setTeachMe:nt=>tt({showTeachMe:nt})})),useSelectedNode=()=>useDataStore(tt=>tt.selectedNode),setIsTimestampLoaded=tt=>useDataStore.setState({isTimestampLoaded:tt}),topupFromToast=async()=>{try{const tt=await distExports$1.topup();if(!tt)throw new Error("Topup failed");if(tt.budget<5)throw new Error("You set a budget of less than 5 sats");toast(jsxRuntimeExports.jsx(ToastMessage,{message:`You set a budget of ${tt.budget} sats`}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"success"})}catch(tt){tt instanceof Error&&toast(jsxRuntimeExports.jsx(ToastMessage,{message:tt.message}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"error"})}},ToastMessage=({message:tt})=>tt===BOOST_ERROR_BUDGET?jsxRuntimeExports.jsxs("div",{children:[tt,jsxRuntimeExports.jsx(ButtonWrapper,{onClick:topupFromToast,type:"button",children:jsxRuntimeExports.jsx(Text$3,{color:"white",kind:"medium",children:"Topup"})})]}):jsxRuntimeExports.jsx("div",{children:tt}),ButtonWrapper=styled$4.button` background: ${colors.gray200}; border: 1px solid ${colors.white}; border-radius: 2px; @@ -4025,7 +4025,7 @@ A Bitcoin Podcast. Enter a valid link to the YouTube video or Twitter Space you were watching, choose a start and end timestamp to encompass the segment you found interesting or useful, provide a brief description of what the segment is about, and add topic tags that are relevant to the segment. Hit "Add node", and your clip will be added to the graph shortly. -Your pubkey will be submitted with your clip, and any boosts your clip receives will go to you!`,infoMessageSource="If you come across a source that produces ongoing content (e.g. a twitter account, youtube channel, etc). You can add it to the source table for your graph. Once the source is added to the table we will gather new content produced by that source, process it, and add it to your graph.",notify$1=tt=>{toast(jsxRuntimeExports.jsx(ToastMessage,{message:tt}),{icon:tt===NODE_ADD_SUCCESS?jsxRuntimeExports.jsx(MdCheckCircle,{color:colors.primaryGreen}):jsxRuntimeExports.jsx(MdWarning,{color:colors.primaryRed}),position:toast.POSITION.BOTTOM_CENTER,type:tt===NODE_ADD_SUCCESS?"success":"error"})},handleSubmit=async(tt,et,nt,rt)=>{var st;const it={};if(nt===LINK)it.media_url=tt.link,tt.withTimeStamps?(it.content_type="clip",it.job_response={tags:[{description:tt.description,"end-time":timeToMilliseconds(tt.endTime),"start-time":timeToMilliseconds(tt.startTime),tag:(st=tt.tags)==null?void 0:st.join(", ")}]}):tt.withLocation?(it.latitude=tt.latitude,it.longitude=tt.longitude):it.content_type;else if(nt===TWITTER_SOURCE){const lt=/(?:https?:\/\/)?(?:www\.)?twitter\.com\/\w+\/status\/\d+/,ct=/^[0-9]{16,}$/;if(lt.test(tt.tweet)){const ut=/\/status\/(\d+)/,ht=tt.tweet.match(ut);if(ht!=null&&ht[1]){const[,dt]=ht;it.tweet_id=dt}}else it.tweet_id=tt.tweet;if(!ct.test(it.tweet_id))return;tt.withLocation&&(it.latitude=tt.latitude,it.longitude=tt.longitude),it.content_type="tweet"}else nt===WEB_PAGE?(it.content_type="webpage",it.web_page=tt.web_page):nt===DOCUMENT?(it.content_type="document",it.text=tt.document):(it.source_type=nt,nt===TWITTER_HANDLE?it.source=(tt.source||"").replace(/[@]/g,""):it.source=tt.source);let ot="";await executeIfProd(async()=>{const lt=await distExports$1.enable();it.pubkey=lt==null?void 0:lt.pubkey,ot=await getLSat()});const at=CONTENT_TYPES.includes(nt)?"add_node":"radar";try{const lt=await api.post(`/${at}`,JSON.stringify(it),{Authorization:ot});if(lt.error){const{message:ct}=lt.error;throw new Error(ct)}at==="radar"&&await rt(),notify$1(NODE_ADD_SUCCESS),et()}catch(lt){if(lt.status===402){const ct=distExports.Lsat.fromHeader(lt.headers.get("www-authenticate"));await payLsat(ct),await handleSubmit(tt,et,nt,rt)}lt instanceof Error&&(notify$1(NODE_ADD_ERROR),et())}},CONTENT_TYPE_OPTIONS={content:{[LINK]:{component:SourceUrl,label:"Youtube / Twitter space / Mp3"},[TWITTER_SOURCE]:{component:TwitId,label:"Tweet"},[WEB_PAGE]:{component:WebPage,label:"Webpage (Text)"},[DOCUMENT]:{component:Document,label:"Document"}},source:{[GITHUB_REPOSITORY]:{component:GithubRepository,label:"Github repository"},[RSS]:{component:RSSFeed,label:"RSS feed"},[TOPIC]:{component:Topic$1,label:"Topic"},[TWITTER_HANDLE]:{component:TwitterHandle$2,label:"Twitter handle"},[YOUTUBE_CHANNEL]:{component:YoutubeChannel,label:"Youtube channel"}}},CONTENT_TYPES=Object.keys(CONTENT_TYPE_OPTIONS.content),AddNodeModal=()=>{const{close:tt,addNodeModalData:et}=useModal("addNode"),[nt,rt]=reactExports.useState(""),it=useDataStore(kt=>kt.setSources),ot=et?CONTENT_TYPE_OPTIONS[et]:null,at=et==="source"?infoMessageSource:infoMessageContent,st=useForm({mode:"onSubmit"}),{reset:lt,watch:ct,setValue:ut}=st,{isSubmitting:ht}=st.formState,dt=()=>{rt(""),lt(),tt()},pt=async()=>{if([TWITTER_HANDLE,TOPIC].includes(nt))try{const kt=await getRadarData();it(kt.data)}catch(kt){console.warn(kt)}},mt=st.handleSubmit(async kt=>{await handleSubmit(kt,dt,nt,pt)}),gt=ot?Object.keys(ot).map(kt=>({label:ot[kt].label,value:kt})):[],yt=nt?[{label:nt,value:nt}]:[],bt=ct("startTime"),vt=nt&&ot?ot[nt].component:()=>null,xt={setValue:ut,startTime:bt};return ot&&jsxRuntimeExports.jsx(BaseModal,{id:"addNode",preventOutsideClose:!0,children:jsxRuntimeExports.jsx(FormProvider,{...st,children:jsxRuntimeExports.jsx("form",{id:"add-node-form",onSubmit:mt,children:jsxRuntimeExports.jsxs(Wrapper$o,{children:[jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",justify:"space-between",pb:32,children:[jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",children:[jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",children:[nt&&jsxRuntimeExports.jsx(BackButton,{onClick:()=>rt(""),children:jsxRuntimeExports.jsx(MdKeyboardBackspace,{color:colors.white,size:24})}),jsxRuntimeExports.jsxs(Text$3,{kind:"bigHeadingBold",children:["Add ",et]})]}),jsxRuntimeExports.jsxs(InfoIcon,{role:"tooltip",tabIndex:0,children:[jsxRuntimeExports.jsx(MdInfo,{}),jsxRuntimeExports.jsx("div",{className:"tooltip",children:at})]})]}),jsxRuntimeExports.jsx(CloseButton$5,{id:"add-node-close-button",onClick:dt,onKeyDown:kt=>{(kt.key==="Enter"||kt.key==="Space")&&dt()},role:"button",tabIndex:0,children:jsxRuntimeExports.jsx(MdClose,{color:"white"})})]}),nt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(vt,{...xt})}),jsxRuntimeExports.jsx(Flex,{pt:16,px:4,tabIndex:0,children:jsxRuntimeExports.jsx(Text$3,{color:"lightGray",kind:"tinyBold",children:"Your pubkey will be submitted with your input, so you can receive sats that your content earns."})}),jsxRuntimeExports.jsx(Flex,{pt:8,children:ht?jsxRuntimeExports.jsx(SubmitLoader$1,{children:jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white,size:20})}):jsxRuntimeExports.jsx(Button,{disabled:ht,id:"add-node-submit-cta",kind:"big",type:"submit",children:`Add ${et}`})})]}):jsxRuntimeExports.jsxs(Stack$5,{alignItems:{xs:"stretch",sm:"flex-start",minHeight:"160px"},component:"div",direction:{xs:"column",sm:"row"},justifyContent:"space-between",spacing:2,children:[jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(Text$3,{kind:"mediumBold",children:"What do you want to add?"})}),jsxRuntimeExports.jsx(Flex,{grow:1,children:jsxRuntimeExports.jsx(StyledSelect$1,{className:clsx$1(yt.length&&"hasSelected","cy-select-content-type"),clearable:!0,onChange:kt=>{rt(kt.length?kt[0].value:"")},options:gt,placeholder:`Select ${et} type`,searchable:!1,values:yt})})]})]})})})})},CloseButton$5=styled$4(Flex)` +Your pubkey will be submitted with your clip, and any boosts your clip receives will go to you!`,infoMessageSource="If you come across a source that produces ongoing content (e.g. a twitter account, youtube channel, etc). You can add it to the source table for your graph. Once the source is added to the table we will gather new content produced by that source, process it, and add it to your graph.",notify$1=tt=>{toast(jsxRuntimeExports.jsx(ToastMessage,{message:tt}),{icon:tt===NODE_ADD_SUCCESS?jsxRuntimeExports.jsx(MdCheckCircle,{color:colors.primaryGreen}):jsxRuntimeExports.jsx(MdWarning,{color:colors.primaryRed}),position:toast.POSITION.BOTTOM_CENTER,type:tt===NODE_ADD_SUCCESS?"success":"error"})},handleSubmit=async(tt,et,nt,rt,it)=>{var lt;const ot={};if(nt===LINK)ot.media_url=tt.link,tt.withTimeStamps?(ot.content_type="clip",ot.job_response={tags:[{description:tt.description,"end-time":timeToMilliseconds(tt.endTime),"start-time":timeToMilliseconds(tt.startTime),tag:(lt=tt.tags)==null?void 0:lt.join(", ")}]}):tt.withLocation?(ot.latitude=tt.latitude,ot.longitude=tt.longitude):ot.content_type;else if(nt===TWITTER_SOURCE){const ct=/(?:https?:\/\/)?(?:www\.)?twitter\.com\/\w+\/status\/\d+/,ut=/^[0-9]{16,}$/;if(ct.test(tt.tweet)){const ht=/\/status\/(\d+)/,dt=tt.tweet.match(ht);if(dt!=null&&dt[1]){const[,pt]=dt;ot.tweet_id=pt}}else ot.tweet_id=tt.tweet;if(!ut.test(ot.tweet_id))return;tt.withLocation&&(ot.latitude=tt.latitude,ot.longitude=tt.longitude),ot.content_type="tweet"}else nt===WEB_PAGE?(ot.content_type="webpage",ot.web_page=tt.web_page):nt===DOCUMENT?(ot.content_type="document",ot.text=tt.document):(ot.source_type=nt,nt===TWITTER_HANDLE?ot.source=(tt.source||"").replace(/[@]/g,""):ot.source=tt.source);let at="";await executeIfProd(async()=>{const ct=await distExports$1.enable();ot.pubkey=ct==null?void 0:ct.pubkey,at=await getLSat()});const st=CONTENT_TYPES.includes(nt)?"add_node":"radar";try{const ct=await api.post(`/${st}`,JSON.stringify(ot),{Authorization:at});if(ct.error){const{message:ut}=ct.error;throw new Error(ut)}st==="radar"&&await rt(),notify$1(NODE_ADD_SUCCESS),et()}catch(ct){if(ct.status===402){const ut=distExports.Lsat.fromHeader(ct.headers.get("www-authenticate"));await payLsat(ut),await updateBudget(it),await handleSubmit(tt,et,nt,rt,it)}ct instanceof Error&&(notify$1(NODE_ADD_ERROR),et())}},CONTENT_TYPE_OPTIONS={content:{[LINK]:{component:SourceUrl,label:"Youtube / Twitter space / Mp3"},[TWITTER_SOURCE]:{component:TwitId,label:"Tweet"},[WEB_PAGE]:{component:WebPage,label:"Webpage (Text)"},[DOCUMENT]:{component:Document,label:"Document"}},source:{[GITHUB_REPOSITORY]:{component:GithubRepository,label:"Github repository"},[RSS]:{component:RSSFeed,label:"RSS feed"},[TOPIC]:{component:Topic$1,label:"Topic"},[TWITTER_HANDLE]:{component:TwitterHandle$2,label:"Twitter handle"},[YOUTUBE_CHANNEL]:{component:YoutubeChannel,label:"Youtube channel"}}},CONTENT_TYPES=Object.keys(CONTENT_TYPE_OPTIONS.content),AddNodeModal=()=>{const{close:tt,addNodeModalData:et}=useModal("addNode"),[nt,rt]=reactExports.useState(""),it=useDataStore(St=>St.setSources),[ot]=useUserStore(St=>[St.setBudget]),at=et?CONTENT_TYPE_OPTIONS[et]:null,st=et==="source"?infoMessageSource:infoMessageContent,lt=useForm({mode:"onSubmit"}),{reset:ct,watch:ut,setValue:ht}=lt,{isSubmitting:dt}=lt.formState,pt=()=>{rt(""),ct(),tt()},mt=async()=>{if([TWITTER_HANDLE,TOPIC].includes(nt))try{const St=await getRadarData();it(St.data)}catch(St){console.warn(St)}},gt=lt.handleSubmit(async St=>{await handleSubmit(St,pt,nt,mt,ot)}),yt=at?Object.keys(at).map(St=>({label:at[St].label,value:St})):[],bt=nt?[{label:nt,value:nt}]:[],vt=ut("startTime"),xt=nt&&at?at[nt].component:()=>null,kt={setValue:ht,startTime:vt};return at&&jsxRuntimeExports.jsx(BaseModal,{id:"addNode",preventOutsideClose:!0,children:jsxRuntimeExports.jsx(FormProvider,{...lt,children:jsxRuntimeExports.jsx("form",{id:"add-node-form",onSubmit:gt,children:jsxRuntimeExports.jsxs(Wrapper$o,{children:[jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",justify:"space-between",pb:32,children:[jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",children:[jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",children:[nt&&jsxRuntimeExports.jsx(BackButton,{onClick:()=>rt(""),children:jsxRuntimeExports.jsx(MdKeyboardBackspace,{color:colors.white,size:24})}),jsxRuntimeExports.jsxs(Text$3,{kind:"bigHeadingBold",children:["Add ",et]})]}),jsxRuntimeExports.jsxs(InfoIcon,{role:"tooltip",tabIndex:0,children:[jsxRuntimeExports.jsx(MdInfo,{}),jsxRuntimeExports.jsx("div",{className:"tooltip",children:st})]})]}),jsxRuntimeExports.jsx(CloseButton$5,{id:"add-node-close-button",onClick:pt,onKeyDown:St=>{(St.key==="Enter"||St.key==="Space")&&pt()},role:"button",tabIndex:0,children:jsxRuntimeExports.jsx(MdClose,{color:"white"})})]}),nt?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(xt,{...kt})}),jsxRuntimeExports.jsx(Flex,{pt:16,px:4,tabIndex:0,children:jsxRuntimeExports.jsx(Text$3,{color:"lightGray",kind:"tinyBold",children:"Your pubkey will be submitted with your input, so you can receive sats that your content earns."})}),jsxRuntimeExports.jsx(Flex,{pt:8,children:dt?jsxRuntimeExports.jsx(SubmitLoader$1,{children:jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white,size:20})}):jsxRuntimeExports.jsx(Button,{disabled:dt,id:"add-node-submit-cta",kind:"big",type:"submit",children:`Add ${et}`})})]}):jsxRuntimeExports.jsxs(Stack$5,{alignItems:{xs:"stretch",sm:"flex-start",minHeight:"160px"},component:"div",direction:{xs:"column",sm:"row"},justifyContent:"space-between",spacing:2,children:[jsxRuntimeExports.jsx(Flex,{children:jsxRuntimeExports.jsx(Text$3,{kind:"mediumBold",children:"What do you want to add?"})}),jsxRuntimeExports.jsx(Flex,{grow:1,children:jsxRuntimeExports.jsx(StyledSelect$1,{className:clsx$1(bt.length&&"hasSelected","cy-select-content-type"),clearable:!0,onChange:St=>{rt(St.length?St[0].value:"")},options:yt,placeholder:`Select ${et} type`,searchable:!1,values:bt})})]})]})})})})},CloseButton$5=styled$4(Flex)` cursor: pointer; svg { @@ -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.84",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.86",StyledTableCell=styled$4(TableCell$1)` && { color: ${colors.white}; border: none; @@ -6897,13 +6897,13 @@ void main() { & + & { margin-left: 16px; } -`,Heading$3=styled$4(Flex)` +`,Heading$4=styled$4(Flex)` margin-bottom: 26px; padding: 0 36px; ${Text$3} { margin-bottom: 0; } -`,sourcesMapper={[GITHUB_REPOSITORY]:"Github repository",[RSS]:"RSS link",[TOPIC]:"Topic",[TWITTER_HANDLE]:"Twitter Handle",[YOUTUBE_CHANNEL]:"Youtube channel"},TWITTER_LINK="https://twitter.com",FilterOffIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"filter_alt_off",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1543_23288",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1543_23288)",children:jsxRuntimeExports.jsx("path",{id:"filter_alt_off_2",d:"M14.8 11.9748L6.82503 3.9998H19C19.4167 3.9998 19.7167 4.18314 19.9 4.5498C20.0834 4.91647 20.05 5.26647 19.8 5.5998L14.8 11.9748ZM19.775 22.5998L14 16.8248V18.9998C14 19.2831 13.9042 19.5206 13.7125 19.7123C13.5209 19.904 13.2834 19.9998 13 19.9998H11C10.7167 19.9998 10.4792 19.904 10.2875 19.7123C10.0959 19.5206 10 19.2831 10 18.9998V12.8248L1.40002 4.2248L2.80002 2.7998L21.2 21.1998L19.775 22.5998Z",fill:"currentColor"})})]})}),ConfirmPopover=({message:tt="Are you sure you want to delete this item?",onConfirm:et,children:nt,anchorOrigin:rt={vertical:"bottom",horizontal:"center"},transformOrigin:it={vertical:"top",horizontal:"center"}})=>{const[ot,at]=reactExports.useState(null),st=dt=>{at(dt.currentTarget)},lt=()=>{at(null)},ct=()=>{et(),lt()},ut=()=>{lt()},ht=!!ot;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{children:React$1.cloneElement(nt,{onClick:st})}),jsxRuntimeExports.jsx(Popover$1,{anchorEl:ot,anchorOrigin:rt,onClose:lt,open:ht,transformOrigin:it,children:jsxRuntimeExports.jsxs(Wrapper$l,{justify:"space-around",children:[jsxRuntimeExports.jsx(Text$3,{children:tt}),jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",justify:"center",pt:8,children:[jsxRuntimeExports.jsx(Button,{kind:"small",onClick:ct,children:"Yes"}),jsxRuntimeExports.jsx(Button,{className:"secondary",kind:"small",onClick:ut,children:"No"})]})]})})]})},Wrapper$l=styled$4(Flex)` +`,sourcesMapper={[GITHUB_REPOSITORY]:"Github repository",[RSS]:"RSS link",[TOPIC]:"Topic",[TWITTER_HANDLE]:"Twitter Handle",[YOUTUBE_CHANNEL]:"Youtube channel"},TWITTER_LINK="https://twitter.com",ConfirmPopover=({message:tt="Are you sure you want to delete this item?",onConfirm:et,children:nt,anchorOrigin:rt={vertical:"bottom",horizontal:"center"},transformOrigin:it={vertical:"top",horizontal:"center"}})=>{const[ot,at]=reactExports.useState(null),st=dt=>{at(dt.currentTarget)},lt=()=>{at(null)},ct=()=>{et(),lt()},ut=()=>{lt()},ht=!!ot;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{children:React$1.cloneElement(nt,{onClick:st})}),jsxRuntimeExports.jsx(Popover$1,{anchorEl:ot,anchorOrigin:rt,onClose:lt,open:ht,transformOrigin:it,children:jsxRuntimeExports.jsxs(Wrapper$l,{justify:"space-around",children:[jsxRuntimeExports.jsx(Text$3,{children:tt}),jsxRuntimeExports.jsxs(Flex,{align:"center",direction:"row",justify:"center",pt:8,children:[jsxRuntimeExports.jsx(Button,{kind:"small",onClick:ct,children:"Yes"}),jsxRuntimeExports.jsx(Button,{className:"secondary",kind:"small",onClick:ut,children:"No"})]})]})})]})},Wrapper$l=styled$4(Flex)` background: ${colors.headerBackground}; color: ${colors.white}; padding: 16px 8px; @@ -6913,7 +6913,7 @@ void main() { background: transparent; border: 1px solid ${colors.primaryButton}; } -`,Table$2=({data:tt})=>{const et=useDataStore(at=>at.setQueuedSources),[nt,rt]=reactExports.useState(""),it=async at=>{if(tt!=null&&tt.length)try{const st=await distExports$1.enable();await approveRadarData(at,st.pubkey),et(tt.filter(lt=>lt.ref_id!==at))}catch(st){console.warn(st)}},ot=async at=>{if(!(!at||!(tt!=null&&tt.length))){rt(at);try{await deleteRadarData(at),et(tt==null?void 0:tt.filter(st=>st.ref_id!==at))}catch(st){console.warn(st)}finally{rt("")}}};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:"Source"}),jsxRuntimeExports.jsx(StyledTableCell,{}),jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"})]})}),(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:sourcesMapper[at.source_type]}),jsxRuntimeExports.jsx(StyledTableCell,{width:"268px",children:at.source_type==="twitter_handle"?jsxRuntimeExports.jsxs(StyledLink$1,{href:`${TWITTER_LINK}/${at.source}`,target:"_blank",children:["@",at.source]}):jsxRuntimeExports.jsx("div",{children:at.source})}),jsxRuntimeExports.jsx(StyledTableCell,{className:"cell-center",children:jsxRuntimeExports.jsxs(Flex,{direction:"row",justify:"space-between",children:[jsxRuntimeExports.jsx("div",{className:"approve-wrapper",children:jsxRuntimeExports.jsx(IconWrapper$4,{className:"centered",onClick:()=>it(at.ref_id),children:jsxRuntimeExports.jsx(MdCheckCircle,{color:colors.primaryGreen,fontSize:24})})}),jsxRuntimeExports.jsx("div",{className:"delete-wrapper",children:nt===at.ref_id?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white,size:16}):jsxRuntimeExports.jsx(ConfirmPopover,{message:"Are you sure ?",onConfirm:()=>ot(at.ref_id),children:jsxRuntimeExports.jsx(IconWrapper$4,{className:"centered",children:jsxRuntimeExports.jsx(MdCancel,{color:colors.primaryRed,fontSize:24})})})})]})}),jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"})]},at.source))})]}):jsxRuntimeExports.jsxs(Flex,{children:[jsxRuntimeExports.jsx(Text$3,{children:"There is not any results for selected filters"}),jsxRuntimeExports.jsx(FilterOffIcon,{})]})},IconWrapper$4=styled$4(Flex)` +`,FilterOffIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"filter_alt_off",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1543_23288",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1543_23288)",children:jsxRuntimeExports.jsx("path",{id:"filter_alt_off_2",d:"M14.8 11.9748L6.82503 3.9998H19C19.4167 3.9998 19.7167 4.18314 19.9 4.5498C20.0834 4.91647 20.05 5.26647 19.8 5.5998L14.8 11.9748ZM19.775 22.5998L14 16.8248V18.9998C14 19.2831 13.9042 19.5206 13.7125 19.7123C13.5209 19.904 13.2834 19.9998 13 19.9998H11C10.7167 19.9998 10.4792 19.904 10.2875 19.7123C10.0959 19.5206 10 19.2831 10 18.9998V12.8248L1.40002 4.2248L2.80002 2.7998L21.2 21.1998L19.775 22.5998Z",fill:"currentColor"})})]})}),Table$2=({data:tt})=>{const et=useDataStore(at=>at.setQueuedSources),[nt,rt]=reactExports.useState(""),it=async at=>{if(tt!=null&&tt.length)try{const st=await distExports$1.enable();await approveRadarData(at,st.pubkey),et(tt.filter(lt=>lt.ref_id!==at))}catch(st){console.warn(st)}},ot=async at=>{if(!(!at||!(tt!=null&&tt.length))){rt(at);try{await deleteRadarData(at),et(tt==null?void 0:tt.filter(st=>st.ref_id!==at))}catch(st){console.warn(st)}finally{rt("")}}};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:"Source"}),jsxRuntimeExports.jsx(StyledTableCell,{}),jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"})]})}),(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:sourcesMapper[at.source_type]}),jsxRuntimeExports.jsx(StyledTableCell,{width:"268px",children:at.source_type==="twitter_handle"?jsxRuntimeExports.jsxs(StyledLink$1,{href:`${TWITTER_LINK}/${at.source}`,target:"_blank",children:["@",at.source]}):jsxRuntimeExports.jsx("div",{children:at.source})}),jsxRuntimeExports.jsx(StyledTableCell,{className:"cell-center",children:jsxRuntimeExports.jsxs(Flex,{direction:"row",justify:"space-between",children:[jsxRuntimeExports.jsx("div",{className:"approve-wrapper",children:jsxRuntimeExports.jsx(IconWrapper$4,{className:"centered",onClick:()=>it(at.ref_id),children:jsxRuntimeExports.jsx(MdCheckCircle,{color:colors.primaryGreen,fontSize:24})})}),jsxRuntimeExports.jsx("div",{className:"delete-wrapper",children:nt===at.ref_id?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white,size:16}):jsxRuntimeExports.jsx(ConfirmPopover,{message:"Are you sure ?",onConfirm:()=>ot(at.ref_id),children:jsxRuntimeExports.jsx(IconWrapper$4,{className:"centered",children:jsxRuntimeExports.jsx(MdCancel,{color:colors.primaryRed,fontSize:24})})})})]})}),jsxRuntimeExports.jsx(StyledTableCell,{className:"empty"})]},at.source))})]}):jsxRuntimeExports.jsxs(Flex,{children:[jsxRuntimeExports.jsx(Text$3,{children:"There is not any results for selected filters"}),jsxRuntimeExports.jsx(FilterOffIcon,{})]})},IconWrapper$4=styled$4(Flex)` width: 20px; height: 20px; border-radius: 50%; @@ -6933,7 +6933,7 @@ void main() { &:visited { color: ${colors.white}; } -`,QueuedSources=()=>{const[tt,et]=reactExports.useState(!0),[nt,rt]=reactExports.useState(""),[it,ot]=useDataStore(lt=>[lt.queuedSources,lt.setQueuedSources]);reactExports.useEffect(()=>{(async()=>{et(!0);try{const ct=await getRadarData({approved:"False"});ot(ct.data)}catch(ct){console.warn(ct)}finally{et(!1)}})()},[ot]);const at=lt=>{rt(nt===lt||!lt?"":lt)},st=it==null?void 0:it.filter(lt=>!nt||lt.source_type===nt);return jsxRuntimeExports.jsxs(Wrapper$k,{align:"stretch",direction:"column",justify:"flex-end",children:[jsxRuntimeExports.jsxs(Heading$3,{align:"flex-start",justify:"space-between",children:[jsxRuntimeExports.jsx(Text$3,{className:"title",children:"Queued Sources"}),jsxRuntimeExports.jsx(Text$3,{className:"subtitle",children:"This is a queue of pending sources waiting for approval or denial from graph users. If you think a source will provide good content for the graph, you can pay to approve it. Think of this as an investment: you pay to add it to the source table, and if the content is popular you will earn from it. If content is not relevant to the graph, you should deny it."})]}),jsxRuntimeExports.jsxs(Flex,{className:"filters",direction:"row",pb:16,px:36,children:[jsxRuntimeExports.jsx(StyledPill,{className:clsx$1({selected:!nt}),onClick:()=>at(""),size:"small",children:"All"}),Object.keys(sourcesMapper).map(lt=>jsxRuntimeExports.jsx(StyledPill,{className:clsx$1({selected:lt===nt}),onClick:()=>at(lt),size:"small",children:sourcesMapper[lt]},lt))]}),jsxRuntimeExports.jsx(TableWrapper$2,{align:"center",justify:tt?"center":"flex-start",children:tt?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white}):jsxRuntimeExports.jsx(Table$2,{data:st})})]})},Wrapper$k=styled$4(Flex)` +`,QueuedSources=()=>{const[tt,et]=reactExports.useState(!0),[nt,rt]=reactExports.useState(""),[it,ot]=useDataStore(lt=>[lt.queuedSources,lt.setQueuedSources]);reactExports.useEffect(()=>{(async()=>{et(!0);try{const ct=await getRadarData({approved:"False"});ot(ct.data)}catch(ct){console.warn(ct)}finally{et(!1)}})()},[ot]);const at=lt=>{rt(nt===lt||!lt?"":lt)},st=it==null?void 0:it.filter(lt=>!nt||lt.source_type===nt);return jsxRuntimeExports.jsxs(Wrapper$k,{align:"stretch",direction:"column",justify:"flex-end",children:[jsxRuntimeExports.jsxs(Heading$4,{align:"flex-start",justify:"space-between",children:[jsxRuntimeExports.jsx(Text$3,{className:"title",children:"Queued Sources"}),jsxRuntimeExports.jsx(Text$3,{className:"subtitle",children:"This is a queue of pending sources waiting for approval or denial from graph users. If you think a source will provide good content for the graph, you can pay to approve it. Think of this as an investment: you pay to add it to the source table, and if the content is popular you will earn from it. If content is not relevant to the graph, you should deny it."})]}),jsxRuntimeExports.jsxs(Flex,{className:"filters",direction:"row",pb:16,px:36,children:[jsxRuntimeExports.jsx(StyledPill,{className:clsx$1({selected:!nt}),onClick:()=>at(""),size:"small",children:"All"}),Object.keys(sourcesMapper).map(lt=>jsxRuntimeExports.jsx(StyledPill,{className:clsx$1({selected:lt===nt}),onClick:()=>at(lt),size:"small",children:sourcesMapper[lt]},lt))]}),jsxRuntimeExports.jsx(TableWrapper$2,{align:"center",justify:tt?"center":"flex-start",children:tt?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white}):jsxRuntimeExports.jsx(Table$2,{data:st})})]})},Wrapper$k=styled$4(Flex)` flex: 1; .title { @@ -7013,7 +7013,7 @@ void main() { &:visited { color: ${colors.white}; } -`,admins$1=["02c431e64078b10925584d64824c9d1d12eca05e2c56660ffa5ac84aa6946adfe5","03a9a8d953fe747d0dd94dd3c567ddc58451101e987e2d2bf7a4d1e10a2c89ff38","024efa31d1e4f98bccc415b222c9d971866013ad6f95f7d1ed9e8be8e3355a36ff","03bfe6723c06fb2b7546df1e8ca1a17ae5c504615da32c945425ccbe8d3ca6260d","024efa31d1e4f98bccc415b222c9d971866013ad6f95f7d1ed9e8be8e3355a36ff"],Sources=()=>{const[tt,et]=reactExports.useState(!0),[nt,rt]=reactExports.useState(""),[it,ot]=useDataStore(gt=>[gt.sources,gt.setSources]),[at,st,lt,ct]=useUserStore(gt=>[gt.setIsAdmin,gt.isAdmin,gt.setPubKey,gt.pubKey]);reactExports.useEffect(()=>{(async()=>{et(!0);try{const yt=await getRadarData();ot(yt.data)}catch(yt){console.warn(yt)}finally{et(!1)}})()},[ot]);const ut=gt=>{rt(nt===gt||!gt?"":gt)},ht=async()=>{await executeIfProd(async()=>{try{const gt=await distExports$1.enable(),yt=gt==null?void 0:gt.pubkey;lt(yt),yt&&at(yt&&admins$1.includes(yt))}catch(gt){console.warn(gt)}})},dt=async()=>{try{const gt=await triggerRadarJob();if(gt!=null&>.error){toast(jsxRuntimeExports.jsx(ToastMessage,{message:"An error happened"}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"error"});return}toast(jsxRuntimeExports.jsx(ToastMessage,{message:"Job started"}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"success"})}catch{toast(jsxRuntimeExports.jsx(ToastMessage,{message:"An error happened"}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"error"})}},pt=()=>ct?ct&&st?jsxRuntimeExports.jsx(RunButton,{endIcon:jsxRuntimeExports.jsx(MdRestartAlt,{color:colors.white}),onClick:dt,size:"small",children:"Run"}):jsxRuntimeExports.jsx(Text$3,{children:"You are not admin"}):jsxRuntimeExports.jsx(EditButton$1,{color:"secondary",onClick:ht,size:"small",startIcon:jsxRuntimeExports.jsx(ShieldPersonIcon,{}),variant:"contained",children:"Admin"}),mt=it==null?void 0:it.filter(gt=>!nt||gt.source_type===nt);return jsxRuntimeExports.jsxs(Wrapper$j,{align:"stretch",direction:"column",justify:"flex-end",children:[jsxRuntimeExports.jsxs(Heading$3,{align:"center",direction:"row",justify:"space-between",children:[jsxRuntimeExports.jsx(Text$3,{className:"title",children:"Sources for this Graph"}),pt()]}),jsxRuntimeExports.jsxs(Flex,{className:"filters",direction:"row",pb:16,px:36,children:[jsxRuntimeExports.jsx(StyledPill,{className:clsx$1({selected:!nt}),onClick:()=>ut(""),size:"small",children:"All"}),Object.keys(sourcesMapper).map(gt=>jsxRuntimeExports.jsx(StyledPill,{className:clsx$1({selected:gt===nt}),onClick:()=>ut(gt),size:"small",children:sourcesMapper[gt]},gt))]}),jsxRuntimeExports.jsx(TableWrapper$1,{align:"center",justify:tt?"center":"flex-start",children:tt?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white}):jsxRuntimeExports.jsx(Table$1,{canEdit:st,data:mt})})]})},Wrapper$j=styled$4(Flex)` +`,admins$1=["02c431e64078b10925584d64824c9d1d12eca05e2c56660ffa5ac84aa6946adfe5","03a9a8d953fe747d0dd94dd3c567ddc58451101e987e2d2bf7a4d1e10a2c89ff38","024efa31d1e4f98bccc415b222c9d971866013ad6f95f7d1ed9e8be8e3355a36ff","03bfe6723c06fb2b7546df1e8ca1a17ae5c504615da32c945425ccbe8d3ca6260d","024efa31d1e4f98bccc415b222c9d971866013ad6f95f7d1ed9e8be8e3355a36ff"],Sources=()=>{const[tt,et]=reactExports.useState(!0),[nt,rt]=reactExports.useState(""),[it,ot]=useDataStore(gt=>[gt.sources,gt.setSources]),[at,st,lt,ct]=useUserStore(gt=>[gt.setIsAdmin,gt.isAdmin,gt.setPubKey,gt.pubKey]);reactExports.useEffect(()=>{(async()=>{et(!0);try{const yt=await getRadarData();ot(yt.data)}catch(yt){console.warn(yt)}finally{et(!1)}})()},[ot]);const ut=gt=>{rt(nt===gt||!gt?"":gt)},ht=async()=>{await executeIfProd(async()=>{try{const gt=await distExports$1.enable(),yt=gt==null?void 0:gt.pubkey;lt(yt),yt&&at(yt&&admins$1.includes(yt))}catch(gt){console.warn(gt)}})},dt=async()=>{try{const gt=await triggerRadarJob();if(gt!=null&>.error){toast(jsxRuntimeExports.jsx(ToastMessage,{message:"An error happened"}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"error"});return}toast(jsxRuntimeExports.jsx(ToastMessage,{message:"Job started"}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"success"})}catch{toast(jsxRuntimeExports.jsx(ToastMessage,{message:"An error happened"}),{icon:!1,position:toast.POSITION.BOTTOM_CENTER,type:"error"})}},pt=()=>ct?ct&&st?jsxRuntimeExports.jsx(RunButton,{endIcon:jsxRuntimeExports.jsx(MdRestartAlt,{color:colors.white}),onClick:dt,size:"small",children:"Run"}):jsxRuntimeExports.jsx(Text$3,{children:"You are not admin"}):jsxRuntimeExports.jsx(EditButton$1,{color:"secondary",onClick:ht,size:"small",startIcon:jsxRuntimeExports.jsx(ShieldPersonIcon,{}),variant:"contained",children:"Admin"}),mt=it==null?void 0:it.filter(gt=>!nt||gt.source_type===nt);return jsxRuntimeExports.jsxs(Wrapper$j,{align:"stretch",direction:"column",justify:"flex-end",children:[jsxRuntimeExports.jsxs(Heading$4,{align:"center",direction:"row",justify:"space-between",children:[jsxRuntimeExports.jsx(Text$3,{className:"title",children:"Sources for this Graph"}),pt()]}),jsxRuntimeExports.jsxs(Flex,{className:"filters",direction:"row",pb:16,px:36,children:[jsxRuntimeExports.jsx(StyledPill,{className:clsx$1({selected:!nt}),onClick:()=>ut(""),size:"small",children:"All"}),Object.keys(sourcesMapper).map(gt=>jsxRuntimeExports.jsx(StyledPill,{className:clsx$1({selected:gt===nt}),onClick:()=>ut(gt),size:"small",children:sourcesMapper[gt]},gt))]}),jsxRuntimeExports.jsx(TableWrapper$1,{align:"center",justify:tt?"center":"flex-start",children:tt?jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white}):jsxRuntimeExports.jsx(Table$1,{canEdit:st,data:mt})})]})},Wrapper$j=styled$4(Flex)` flex: 1; .title { margin-bottom: 16px; @@ -7077,7 +7077,7 @@ ${({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$3,{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(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)` flex: 1; .title { @@ -7194,7 +7194,9 @@ __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"})})]})}),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);return reactExports.useEffect(()=>{(async()=>{try{const rt=await api.get("/stats");rt&&et({numAudio:rt.num_audio,numContributors:rt.num_contributors,numDaily:rt.num_daily,numEpisodes:rt.num_episodes,numNodes:rt.num_nodes,numTwitterSpace:rt.num_twitter_space,numVideo:rt.num_video})}catch{lodashExports.noop()}})()},[]),tt?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})]})]}):null},StatisticsWrapper=styled$4(Flex).attrs({align:"center",direction:"row",grow:1,justify:"flex-start"})``,Stat=styled$4(Flex).attrs({align:"center",direction:"row",justify:"flex-start"})` +}`;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})` + justify-content: between; +`,Stat=styled$4(Flex).attrs({align:"center",direction:"row",justify:"flex-start"})` color: ${colors.white}; background: ${colors.BG1}; padding: 6px 10px 6px 8px; @@ -7222,12 +7224,51 @@ function print() { __p += __j.call(arguments, '') } .text { } -`,defaultData$2={description:"",mission_statement:"",search_term:"",title:""},AppBar=()=>{const[tt,et]=reactExports.useState(defaultData$2);return reactExports.useEffect(()=>{(async()=>{try{const rt=await getAboutData();et(rt)}catch(rt){console.warn(rt)}})()},[]),jsxRuntimeExports.jsxs(Header$1,{children:[jsxRuntimeExports.jsxs(TitleWrapper,{children:[jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:tt.title&&jsxRuntimeExports.jsx(Text$3,{className:"title",color:"white",children:tt.title})}),jsxRuntimeExports.jsx(Text$3,{className:"subtitle",children:" Second Brain"})]}),jsxRuntimeExports.jsx(Stats,{})]})},Header$1=styled$4(Flex).attrs({align:"center",direction:"row",grow:1,justify:"flex-start"})` +`,Budget=styled$4(Flex).attrs({align:"center",direction:"row"})` + display: flex; + height: 2.5rem; + padding: 0.75rem 0.9375rem 0.75rem 0.9375rem; + align-items: center; + gap: 0.625rem; + color: ${colors.white}; + background: ${colors.BG1}; + font-family: Barlow; + font-size: 0.75rem; + font-style: normal; + font-weight: 500; + line-height: normal; + letter-spacing: 0.0075rem; + border-radius: 12.5rem; + + &:hover { + background: ${colors.BUTTON1_PRESS}; + } + + &:active { + background: ${colors.BUTTON1}; + } + + .icon { + display: flex; + align-items: center; + justify-content: center; + } + + .budgetUnit { + color: ${colors.GRAY6}; + } + + .text { + display: flex; + align-items: center; + justify-content: center; + } +`,defaultData$2={description:"",mission_statement:"",search_term:"",title:""},AppBar=()=>{const[tt,et]=reactExports.useState(defaultData$2);return reactExports.useEffect(()=>{(async()=>{try{const rt=await getAboutData();et(rt)}catch(rt){console.warn(rt)}})()},[]),jsxRuntimeExports.jsxs(Header$2,{children:[jsxRuntimeExports.jsxs(TitleWrapper,{children:[jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:tt.title&&jsxRuntimeExports.jsx(Text$3,{className:"title",color:"white",children:tt.title})}),jsxRuntimeExports.jsx(Text$3,{className:"subtitle",children:" Second Brain"})]}),jsxRuntimeExports.jsx(Stats,{})]})},Header$2=styled$4(Flex).attrs({align:"center",direction:"row",grow:1,justify:"flex-start"})` height: 64px; position: absolute; top: 0px; left: 64px; - right: 64px; + right: 32px; transition: opacity 1s; z-index: 99; padding: 20px 23px; @@ -7343,12 +7384,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$5(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$5(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$5(tt,et)}}function _iterableToArray$3(tt){if(typeof Symbol<"u"&&tt[Symbol.iterator]!=null||tt["@@iterator"]!=null)return Array.from(tt)}function _arrayWithoutHoles$3(tt){if(Array.isArray(tt))return _arrayLikeToArray$5(tt)}function _arrayLikeToArray$5(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$3(tt){return _getPrototypeOf$3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf$3(tt)}function _defineProperty$4(tt,et,nt){return et=_toPropertyKey$3(et),et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function _toPropertyKey$3(tt){var et=_toPrimitive$3(tt,"string");return _typeof$4(et)==="symbol"?et:String(et)}function _toPrimitive$3(tt,et){if(_typeof$4(tt)!=="object"||tt===null)return tt;var nt=tt[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(tt,et||"default");if(_typeof$4(rt)!=="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(tt)}var Line=function(tt){_inherits$3(nt,tt);var et=_createSuper$3(nt);function nt(){var rt;_classCallCheck$4(this,nt);for(var it=arguments.length,ot=new Array(it),at=0;atdt){mt=[].concat(_toConsumableArray$3(ct.slice(0,gt)),[dt-yt]);break}var bt=mt.length%2===0?[0,pt]:[pt];return[].concat(_toConsumableArray$3(nt.repeat(ct,ht)),_toConsumableArray$3(mt),bt).map(function(vt){return"".concat(vt,"px")}).join(", ")}),_defineProperty$4(_assertThisInitialized$3(rt),"id",uniqueId("recharts-line-")),_defineProperty$4(_assertThisInitialized$3(rt),"pathRef",function(st){rt.mainCurve=st}),_defineProperty$4(_assertThisInitialized$3(rt),"handleAnimationEnd",function(){rt.setState({isAnimationFinished:!0}),rt.props.onAnimationEnd&&rt.props.onAnimationEnd()}),_defineProperty$4(_assertThisInitialized$3(rt),"handleAnimationStart",function(){rt.setState({isAnimationFinished:!1}),rt.props.onAnimationStart&&rt.props.onAnimationStart()}),rt}return _createClass$4(nt,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var it=this.getTotalLength();this.setState({totalLength:it})}}},{key:"getTotalLength",value:function(){var it=this.mainCurve;try{return it&&it.getTotalLength&&it.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(it,ot){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var at=this.props,st=at.points,lt=at.xAxis,ct=at.yAxis,ut=at.layout,ht=at.children,dt=findAllByType(ht,ErrorBar);if(!dt)return null;var pt=function(yt,bt){return{x:yt.x,y:yt.y,value:yt.value,errorVal:getValueByDataKey(yt.payload,bt)}},mt={clipPath:it?"url(#clipPath-".concat(ot,")"):null};return React$1.createElement(Layer,mt,dt.map(function(gt,yt){return React$1.cloneElement(gt,{key:"bar-".concat(yt),data:st,xAxis:lt,yAxis:ct,layout:ut,dataPointFormatter:pt})}))}},{key:"renderDots",value:function(it,ot,at){var st=this.props.isAnimationActive;if(st&&!this.state.isAnimationFinished)return null;var lt=this.props,ct=lt.dot,ut=lt.points,ht=lt.dataKey,dt=filterProps(this.props),pt=filterProps(ct,!0),mt=ut.map(function(yt,bt){var vt=_objectSpread$3(_objectSpread$3(_objectSpread$3({key:"dot-".concat(bt),r:3},dt),pt),{},{value:yt.value,dataKey:ht,cx:yt.x,cy:yt.y,index:bt,payload:yt.payload});return nt.renderDotItem(ct,vt)}),gt={clipPath:it?"url(#clipPath-".concat(ot?"":"dots-").concat(at,")"):null};return React$1.createElement(Layer,_extends$4({className:"recharts-line-dots",key:"dots"},gt),mt)}},{key:"renderCurveStatically",value:function(it,ot,at,st){var lt=this.props,ct=lt.type,ut=lt.layout,ht=lt.connectNulls;lt.ref;var dt=_objectWithoutProperties$2(lt,_excluded$2),pt=_objectSpread$3(_objectSpread$3(_objectSpread$3({},filterProps(dt,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:ot?"url(#clipPath-".concat(at,")"):null,points:it},st),{},{type:ct,layout:ut,connectNulls:ht});return React$1.createElement(Curve,_extends$4({},pt,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(it,ot){var at=this,st=this.props,lt=st.points,ct=st.strokeDasharray,ut=st.isAnimationActive,ht=st.animationBegin,dt=st.animationDuration,pt=st.animationEasing,mt=st.animationId,gt=st.animateNewValues,yt=st.width,bt=st.height,vt=this.state,xt=vt.prevPoints,kt=vt.totalLength;return React$1.createElement(Animate,{begin:ht,duration:dt,isActive:ut,easing:pt,from:{t:0},to:{t:1},key:"line-".concat(mt),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(St){var Tt=St.t;if(xt){var At=xt.length/lt.length,Et=lt.map(function(Ct,wt){var It=Math.floor(wt*At);if(xt[It]){var Ot=xt[It],Wt=interpolateNumber$2(Ot.x,Ct.x),zt=interpolateNumber$2(Ot.y,Ct.y);return _objectSpread$3(_objectSpread$3({},Ct),{},{x:Wt(Tt),y:zt(Tt)})}if(gt){var Ft=interpolateNumber$2(yt*2,Ct.x),Nt=interpolateNumber$2(bt/2,Ct.y);return _objectSpread$3(_objectSpread$3({},Ct),{},{x:Ft(Tt),y:Nt(Tt)})}return _objectSpread$3(_objectSpread$3({},Ct),{},{x:Ct.x,y:Ct.y})});return at.renderCurveStatically(Et,it,ot)}var $t=interpolateNumber$2(0,kt),Dt=$t(Tt),jt;if(ct){var Pt="".concat(ct).split(/[,\s]+/gim).map(function(Ct){return parseFloat(Ct)});jt=at.getStrokeDasharray(Dt,kt,Pt)}else jt="".concat(Dt,"px ").concat(kt-Dt,"px");return at.renderCurveStatically(lt,it,ot,{strokeDasharray:jt})})}},{key:"renderCurve",value:function(it,ot){var at=this.props,st=at.points,lt=at.isAnimationActive,ct=this.state,ut=ct.prevPoints,ht=ct.totalLength;return lt&&st&&st.length&&(!ut&&ht>0||!_isEqual(ut,st))?this.renderCurveWithAnimation(it,ot):this.renderCurveStatically(st,it,ot)}},{key:"render",value:function(){var it,ot=this.props,at=ot.hide,st=ot.dot,lt=ot.points,ct=ot.className,ut=ot.xAxis,ht=ot.yAxis,dt=ot.top,pt=ot.left,mt=ot.width,gt=ot.height,yt=ot.isAnimationActive,bt=ot.id;if(at||!lt||!lt.length)return null;var vt=this.state.isAnimationFinished,xt=lt.length===1,kt=classNames("recharts-line",ct),St=ut&&ut.allowDataOverflow,Tt=ht&&ht.allowDataOverflow,At=St||Tt,Et=_isNil(bt)?this.id:bt,$t=(it=filterProps(st))!==null&&it!==void 0?it:{r:3,strokeWidth:2},Dt=$t.r,jt=Dt===void 0?3:Dt,Pt=$t.strokeWidth,Ct=Pt===void 0?2:Pt,wt=isDotProps(st)?st:{},It=wt.clipDot,Ot=It===void 0?!0:It,Wt=jt*2+Ct;return React$1.createElement(Layer,{className:kt},St||Tt?React$1.createElement("defs",null,React$1.createElement("clipPath",{id:"clipPath-".concat(Et)},React$1.createElement("rect",{x:St?pt:pt-mt/2,y:Tt?dt:dt-gt/2,width:St?mt:mt*2,height:Tt?gt:gt*2})),!Ot&&React$1.createElement("clipPath",{id:"clipPath-dots-".concat(Et)},React$1.createElement("rect",{x:pt-Wt/2,y:dt-Wt/2,width:mt+Wt,height:gt+Wt}))):null,!xt&&this.renderCurve(At,Et),this.renderErrorBar(At,Et),(xt||st)&&this.renderDots(At,Ot,Et),(!yt||vt)&&LabelList.renderCallByParent(this.props,lt))}}],[{key:"getDerivedStateFromProps",value:function(it,ot){return it.animationId!==ot.prevAnimationId?{prevAnimationId:it.animationId,curPoints:it.points,prevPoints:ot.curPoints}:it.points!==ot.curPoints?{curPoints:it.points}:null}},{key:"repeat",value:function(it,ot){for(var at=it.length%2!==0?[].concat(_toConsumableArray$3(it),[0]):it,st=[],lt=0;lt=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose$1(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function ScatterSymbol(tt){var et=tt.option,nt=tt.isActive,rt=_objectWithoutProperties$1(tt,_excluded$1);return typeof et=="string"?React$1.createElement(Shape,_extends$3({option:React$1.createElement(Symbols,_extends$3({type:et},rt)),isActive:nt,shapeType:"symbols"},rt)):React$1.createElement(Shape,_extends$3({option:et,isActive:nt,shapeType:"symbols"},rt))}function _typeof$3(tt){"@babel/helpers - typeof";return _typeof$3=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},_typeof$3(tt)}function _extends$2(){return _extends$2=Object.assign?Object.assign.bind():function(tt){for(var et=1;et"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$2(tt){return _getPrototypeOf$2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf$2(tt)}function _defineProperty$3(tt,et,nt){return et=_toPropertyKey$2(et),et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function _toPropertyKey$2(tt){var et=_toPrimitive$2(tt,"string");return _typeof$3(et)==="symbol"?et:String(et)}function _toPrimitive$2(tt,et){if(_typeof$3(tt)!=="object"||tt===null)return tt;var nt=tt[Symbol.toPrimitive];if(nt!==void 0){var rt=nt.call(tt,et||"default");if(_typeof$3(rt)!=="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(et==="string"?String:Number)(tt)}var Scatter=function(tt){_inherits$2(nt,tt);var et=_createSuper$2(nt);function nt(){var rt;_classCallCheck$3(this,nt);for(var it=arguments.length,ot=new Array(it),at=0;at-1?it[ot?et[at]:at]:void 0}}var _createFind=createFind$1,toFinite=toFinite_1;function toInteger$1(tt){var et=toFinite(tt),nt=et%1;return et===et?nt?et-nt:et:0}var toInteger_1=toInteger$1,baseFindIndex=_baseFindIndex,baseIteratee=_baseIteratee,toInteger=toInteger_1,nativeMax=Math.max;function findIndex$1(tt,et,nt){var rt=tt==null?0:tt.length;if(!rt)return-1;var it=nt==null?0:toInteger(nt);return it<0&&(it=nativeMax(rt+it,0)),baseFindIndex(tt,baseIteratee(et),it)}var findIndex_1=findIndex$1,createFind=_createFind,findIndex=findIndex_1,find$1=createFind(findIndex),find_1=find$1;const _find=getDefaultExportFromCjs(find_1);var prefix="Invariant failed";function invariant(tt,et){if(!tt)throw new Error(prefix)}function getRadialCursorPoints(tt){var et=tt.cx,nt=tt.cy,rt=tt.radius,it=tt.startAngle,ot=tt.endAngle,at=polarToCartesian(et,nt,rt,it),st=polarToCartesian(et,nt,rt,ot);return{points:[at,st],cx:et,cy:nt,radius:rt,startAngle:it,endAngle:ot}}function _toConsumableArray$2(tt){return _arrayWithoutHoles$2(tt)||_iterableToArray$2(tt)||_unsupportedIterableToArray$4(tt)||_nonIterableSpread$2()}function _nonIterableSpread$2(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$4(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$4(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$4(tt,et)}}function _iterableToArray$2(tt){if(typeof Symbol<"u"&&tt[Symbol.iterator]!=null||tt["@@iterator"]!=null)return Array.from(tt)}function _arrayWithoutHoles$2(tt){if(Array.isArray(tt))return _arrayLikeToArray$4(tt)}function _arrayLikeToArray$4(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt=0)&&Object.prototype.propertyIsEnumerable.call(tt,rt)&&(nt[rt]=tt[rt])}return nt}function _objectWithoutPropertiesLoose(tt,et){if(tt==null)return{};var nt={},rt=Object.keys(tt),it,ot;for(ot=0;ot=0)&&(nt[it]=tt[it]);return nt}function _classCallCheck$1(tt,et){if(!(tt instanceof et))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(tt,et){for(var nt=0;nt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _getPrototypeOf$1(tt){return _getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf$1(tt)}function _toConsumableArray$1(tt){return _arrayWithoutHoles$1(tt)||_iterableToArray$1(tt)||_unsupportedIterableToArray$3(tt)||_nonIterableSpread$1()}function _nonIterableSpread$1(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$3(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$3(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$3(tt,et)}}function _iterableToArray$1(tt){if(typeof Symbol<"u"&&tt[Symbol.iterator]!=null||tt["@@iterator"]!=null)return Array.from(tt)}function _arrayWithoutHoles$1(tt){if(Array.isArray(tt))return _arrayLikeToArray$3(tt)}function _arrayLikeToArray$3(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt0?st:rt&&rt.props&&rt.props.data&&rt.props.data.length>0?rt.props.data:et&&et.length&&isNumber(ot)&&isNumber(at)?et.slice(ot,at+1):[]};function getDefaultDomainByAxisType(tt){return tt==="number"?[0,"auto"]:void 0}var getTooltipContent=function(et,nt,rt,it){var ot=et.graphicalItems,at=et.tooltipAxis,st=getDisplayedData(nt,et);return rt<0||!ot||!ot.length||rt>=st.length?null:ot.reduce(function(lt,ct){var ut=ct.props.hide;if(ut)return lt;var ht=ct.props.data,dt=ht===void 0?nt:ht,pt;if(at.dataKey&&!at.allowDuplicatedCategory){var mt=dt===void 0?st:dt;pt=findEntryInArray(mt,at.dataKey,it)}else pt=dt&&dt[rt]||st[rt];return pt?[].concat(_toConsumableArray$1(lt),[getTooltipItem(ct,pt)]):lt},[])},getTooltipData=function(et,nt,rt,it){var ot=it||{x:et.chartX,y:et.chartY},at=calculateTooltipPos(ot,rt),st=et.orderedTooltipTicks,lt=et.tooltipAxis,ct=et.tooltipTicks,ut=calculateActiveTickIndex(at,st,ct,lt);if(ut>=0&&ct){var ht=ct[ut]&&ct[ut].value,dt=getTooltipContent(et,nt,ut,ht),pt=getActiveCoordinate(rt,st,ut,ot);return{activeTooltipIndex:ut,activeLabel:ht,activePayload:dt,activeCoordinate:pt}}return null},getAxisMapByAxes=function(et,nt){var rt=nt.axes,it=nt.graphicalItems,ot=nt.axisType,at=nt.axisIdKey,st=nt.stackGroups,lt=nt.dataStartIndex,ct=nt.dataEndIndex,ut=et.layout,ht=et.children,dt=et.stackOffset,pt=isCategoricalAxis(ut,ot),mt=rt.reduce(function(gt,yt){var bt,vt=yt.props,xt=vt.type,kt=vt.dataKey,St=vt.allowDataOverflow,Tt=vt.allowDuplicatedCategory,At=vt.scale,Et=vt.ticks,$t=vt.includeHidden,Dt=yt.props[at];if(gt[Dt])return gt;var jt=getDisplayedData(et.data,{graphicalItems:it.filter(function(Ht){return Ht.props[at]===Dt}),dataStartIndex:lt,dataEndIndex:ct}),Pt=jt.length,Ct,wt,It;isDomainSpecifiedByUser(yt.props.domain,St,xt)&&(Ct=parseSpecifiedDomain(yt.props.domain,null,St),pt&&(xt==="number"||At!=="auto")&&(It=getDomainOfDataByKey(jt,kt,"category")));var Ot=getDefaultDomainByAxisType(xt);if(!Ct||Ct.length===0){var Wt,zt=(Wt=yt.props.domain)!==null&&Wt!==void 0?Wt:Ot;if(kt){if(Ct=getDomainOfDataByKey(jt,kt,xt),xt==="category"&&pt){var Ft=hasDuplicate(Ct);Tt&&Ft?(wt=Ct,Ct=_range(0,Pt)):Tt||(Ct=parseDomainOfCategoryAxis(zt,Ct,yt).reduce(function(Ht,en){return Ht.indexOf(en)>=0?Ht:[].concat(_toConsumableArray$1(Ht),[en])},[]))}else if(xt==="category")Tt?Ct=Ct.filter(function(Ht){return Ht!==""&&!_isNil(Ht)}):Ct=parseDomainOfCategoryAxis(zt,Ct,yt).reduce(function(Ht,en){return Ht.indexOf(en)>=0||en===""||_isNil(en)?Ht:[].concat(_toConsumableArray$1(Ht),[en])},[]);else if(xt==="number"){var Nt=parseErrorBarsOfAxis(jt,it.filter(function(Ht){return Ht.props[at]===Dt&&($t||!Ht.props.hide)}),kt,ot,ut);Nt&&(Ct=Nt)}pt&&(xt==="number"||At!=="auto")&&(It=getDomainOfDataByKey(jt,kt,"category"))}else pt?Ct=_range(0,Pt):st&&st[Dt]&&st[Dt].hasStack&&xt==="number"?Ct=dt==="expand"?[0,1]:getDomainOfStackGroups(st[Dt].stackGroups,lt,ct):Ct=getDomainOfItemsWithSameAxis(jt,it.filter(function(Ht){return Ht.props[at]===Dt&&($t||!Ht.props.hide)}),xt,ut,!0);if(xt==="number")Ct=detectReferenceElementsDomain(ht,Ct,Dt,ot,Et),zt&&(Ct=parseSpecifiedDomain(zt,Ct,St));else if(xt==="category"&&zt){var Ut=zt,Mt=Ct.every(function(Ht){return Ut.indexOf(Ht)>=0});Mt&&(Ct=Ut)}}return _objectSpread$1(_objectSpread$1({},gt),{},_defineProperty$1({},Dt,_objectSpread$1(_objectSpread$1({},yt.props),{},{axisType:ot,domain:Ct,categoricalDomain:It,duplicateDomain:wt,originalDomain:(bt=yt.props.domain)!==null&&bt!==void 0?bt:Ot,isCategorical:pt,layout:ut})))},{});return mt},getAxisMapByItems=function(et,nt){var rt=nt.graphicalItems,it=nt.Axis,ot=nt.axisType,at=nt.axisIdKey,st=nt.stackGroups,lt=nt.dataStartIndex,ct=nt.dataEndIndex,ut=et.layout,ht=et.children,dt=getDisplayedData(et.data,{graphicalItems:rt,dataStartIndex:lt,dataEndIndex:ct}),pt=dt.length,mt=isCategoricalAxis(ut,ot),gt=-1,yt=rt.reduce(function(bt,vt){var xt=vt.props[at],kt=getDefaultDomainByAxisType("number");if(!bt[xt]){gt++;var St;return mt?St=_range(0,pt):st&&st[xt]&&st[xt].hasStack?(St=getDomainOfStackGroups(st[xt].stackGroups,lt,ct),St=detectReferenceElementsDomain(ht,St,xt,ot)):(St=parseSpecifiedDomain(kt,getDomainOfItemsWithSameAxis(dt,rt.filter(function(Tt){return Tt.props[at]===xt&&!Tt.props.hide}),"number",ut),it.defaultProps.allowDataOverflow),St=detectReferenceElementsDomain(ht,St,xt,ot)),_objectSpread$1(_objectSpread$1({},bt),{},_defineProperty$1({},xt,_objectSpread$1(_objectSpread$1({axisType:ot},it.defaultProps),{},{hide:!0,orientation:_get(ORIENT_MAP,"".concat(ot,".").concat(gt%2),null),domain:St,originalDomain:kt,isCategorical:mt,layout:ut})))}return bt},{});return yt},getAxisMap=function(et,nt){var rt=nt.axisType,it=rt===void 0?"xAxis":rt,ot=nt.AxisComp,at=nt.graphicalItems,st=nt.stackGroups,lt=nt.dataStartIndex,ct=nt.dataEndIndex,ut=et.children,ht="".concat(it,"Id"),dt=findAllByType(ut,ot),pt={};return dt&&dt.length?pt=getAxisMapByAxes(et,{axes:dt,graphicalItems:at,axisType:it,axisIdKey:ht,stackGroups:st,dataStartIndex:lt,dataEndIndex:ct}):at&&at.length&&(pt=getAxisMapByItems(et,{Axis:ot,graphicalItems:at,axisType:it,axisIdKey:ht,stackGroups:st,dataStartIndex:lt,dataEndIndex:ct})),pt},tooltipTicksGenerator=function(et){var nt=getAnyElementOfObject(et),rt=getTicksOfAxis(nt,!1,!0);return{tooltipTicks:rt,orderedTooltipTicks:_sortBy(rt,function(it){return it.coordinate}),tooltipAxis:nt,tooltipAxisBandSize:getBandSizeOfAxis(nt,rt)}},createDefaultState=function(et){var nt,rt,it=et.children,ot=et.defaultShowTooltip,at=findChildByType(it,Brush),st=at&&at.props&&at.props.startIndex||0,lt=(at==null||(nt=at.props)===null||nt===void 0?void 0:nt.endIndex)!==void 0?at==null||(rt=at.props)===null||rt===void 0?void 0:rt.endIndex:et.data&&et.data.length-1||0;return{chartX:0,chartY:0,dataStartIndex:st,dataEndIndex:lt,activeTooltipIndex:-1,isTooltipActive:_isNil(ot)?!1:ot}},hasGraphicalBarItem=function(et){return!et||!et.length?!1:et.some(function(nt){var rt=getDisplayName(nt&&nt.type);return rt&&rt.indexOf("Bar")>=0})},getAxisNameByLayout=function(et){return et==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:et==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:et==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},calculateOffset=function(et,nt){var rt=et.props,it=et.graphicalItems,ot=et.xAxisMap,at=ot===void 0?{}:ot,st=et.yAxisMap,lt=st===void 0?{}:st,ct=rt.width,ut=rt.height,ht=rt.children,dt=rt.margin||{},pt=findChildByType(ht,Brush),mt=findChildByType(ht,Legend),gt=Object.keys(lt).reduce(function(xt,kt){var St=lt[kt],Tt=St.orientation;return!St.mirror&&!St.hide?_objectSpread$1(_objectSpread$1({},xt),{},_defineProperty$1({},Tt,xt[Tt]+St.width)):xt},{left:dt.left||0,right:dt.right||0}),yt=Object.keys(at).reduce(function(xt,kt){var St=at[kt],Tt=St.orientation;return!St.mirror&&!St.hide?_objectSpread$1(_objectSpread$1({},xt),{},_defineProperty$1({},Tt,_get(xt,"".concat(Tt))+St.height)):xt},{top:dt.top||0,bottom:dt.bottom||0}),bt=_objectSpread$1(_objectSpread$1({},yt),gt),vt=bt.bottom;return pt&&(bt.bottom+=pt.props.height||Brush.defaultProps.height),mt&&nt&&(bt=appendOffsetOfLegend(bt,it,rt,nt)),_objectSpread$1(_objectSpread$1({brushBottom:vt},bt),{},{width:ct-bt.left-bt.right,height:ut-bt.top-bt.bottom})},generateCategoricalChart=function(et){var nt,rt=et.chartName,it=et.GraphicalChild,ot=et.defaultTooltipEventType,at=ot===void 0?"axis":ot,st=et.validateTooltipEventTypes,lt=st===void 0?["axis"]:st,ct=et.axisComponents,ut=et.legendContent,ht=et.formatAxisMap,dt=et.defaultProps,pt=function(yt,bt){var vt=bt.graphicalItems,xt=bt.stackGroups,kt=bt.offset,St=bt.updateId,Tt=bt.dataStartIndex,At=bt.dataEndIndex,Et=yt.barSize,$t=yt.layout,Dt=yt.barGap,jt=yt.barCategoryGap,Pt=yt.maxBarSize,Ct=getAxisNameByLayout($t),wt=Ct.numericAxisName,It=Ct.cateAxisName,Ot=hasGraphicalBarItem(vt),Wt=Ot&&getBarSizeList({barSize:Et,stackGroups:xt}),zt=[];return vt.forEach(function(Ft,Nt){var Ut=getDisplayedData(yt.data,{dataStartIndex:Tt,dataEndIndex:At},Ft),Mt=Ft.props,Ht=Mt.dataKey,en=Mt.maxBarSize,sn=Ft.props["".concat(wt,"Id")],Kt=Ft.props["".concat(It,"Id")],rn={},nn=ct.reduce(function(An,wn){var fn,pn=bt["".concat(wn.axisType,"Map")],kn=Ft.props["".concat(wn.axisType,"Id")];pn&&pn[kn]||wn.axisType==="zAxis"||invariant(!1);var Dn=pn[kn];return _objectSpread$1(_objectSpread$1({},An),{},(fn={},_defineProperty$1(fn,wn.axisType,Dn),_defineProperty$1(fn,"".concat(wn.axisType,"Ticks"),getTicksOfAxis(Dn)),fn))},rn),hn=nn[It],vn=nn["".concat(It,"Ticks")],an=xt&&xt[sn]&&xt[sn].hasStack&&getStackedDataOfItem(Ft,xt[sn].stackGroups),Qt=getDisplayName(Ft.type).indexOf("Bar")>=0,_n=getBandSizeOfAxis(hn,vn),Pn=[];if(Qt){var $n,Nn,Tn=_isNil(en)?Pt:en,cn=($n=(Nn=getBandSizeOfAxis(hn,vn,!0))!==null&&Nn!==void 0?Nn:Tn)!==null&&$n!==void 0?$n:0;Pn=getBarPosition({barGap:Dt,barCategoryGap:jt,bandSize:cn!==_n?cn:_n,sizeList:Wt[Kt],maxBarSize:Tn}),cn!==_n&&(Pn=Pn.map(function(An){return _objectSpread$1(_objectSpread$1({},An),{},{position:_objectSpread$1(_objectSpread$1({},An.position),{},{offset:An.position.offset-cn/2})})}))}var mn=Ft&&Ft.type&&Ft.type.getComposedData;if(mn){var In;zt.push({props:_objectSpread$1(_objectSpread$1({},mn(_objectSpread$1(_objectSpread$1({},nn),{},{displayedData:Ut,props:yt,dataKey:Ht,item:Ft,bandSize:_n,barPosition:Pn,offset:kt,stackedData:an,layout:$t,dataStartIndex:Tt,dataEndIndex:At}))),{},(In={key:Ft.key||"item-".concat(Nt)},_defineProperty$1(In,wt,nn[wt]),_defineProperty$1(In,It,nn[It]),_defineProperty$1(In,"animationId",St),In)),childIndex:parseChildIndex(Ft,yt.children),item:Ft})}}),zt},mt=function(yt,bt){var vt=yt.props,xt=yt.dataStartIndex,kt=yt.dataEndIndex,St=yt.updateId;if(!validateWidthHeight({props:vt}))return null;var Tt=vt.children,At=vt.layout,Et=vt.stackOffset,$t=vt.data,Dt=vt.reverseStackOrder,jt=getAxisNameByLayout(At),Pt=jt.numericAxisName,Ct=jt.cateAxisName,wt=findAllByType(Tt,it),It=getStackGroupsByAxisId($t,wt,"".concat(Pt,"Id"),"".concat(Ct,"Id"),Et,Dt),Ot=ct.reduce(function(Ut,Mt){var Ht="".concat(Mt.axisType,"Map");return _objectSpread$1(_objectSpread$1({},Ut),{},_defineProperty$1({},Ht,getAxisMap(vt,_objectSpread$1(_objectSpread$1({},Mt),{},{graphicalItems:wt,stackGroups:Mt.axisType===Pt&&It,dataStartIndex:xt,dataEndIndex:kt}))))},{}),Wt=calculateOffset(_objectSpread$1(_objectSpread$1({},Ot),{},{props:vt,graphicalItems:wt}),bt==null?void 0:bt.legendBBox);Object.keys(Ot).forEach(function(Ut){Ot[Ut]=ht(vt,Ot[Ut],Wt,Ut.replace("Map",""),rt)});var zt=Ot["".concat(Ct,"Map")],Ft=tooltipTicksGenerator(zt),Nt=pt(vt,_objectSpread$1(_objectSpread$1({},Ot),{},{dataStartIndex:xt,dataEndIndex:kt,updateId:St,graphicalItems:wt,stackGroups:It,offset:Wt}));return _objectSpread$1(_objectSpread$1({formattedGraphicalItems:Nt,graphicalItems:wt,offset:Wt,stackGroups:It},Ft),Ot)};return nt=function(gt){_inherits$1(bt,gt);var yt=_createSuper$1(bt);function bt(vt){var xt;return _classCallCheck$1(this,bt),xt=yt.call(this,vt),_defineProperty$1(_assertThisInitialized$1(xt),"accessibilityManager",new AccessibilityManager),_defineProperty$1(_assertThisInitialized$1(xt),"clearDefer",function(){xt.cancelDefer&&(xt.cancelDefer(),xt.cancelDefer=null)}),_defineProperty$1(_assertThisInitialized$1(xt),"handleLegendBBoxUpdate",function(kt){if(kt){var St=xt.state,Tt=St.dataStartIndex,At=St.dataEndIndex,Et=St.updateId;xt.setState(_objectSpread$1({legendBBox:kt},mt({props:xt.props,dataStartIndex:Tt,dataEndIndex:At,updateId:Et},_objectSpread$1(_objectSpread$1({},xt.state),{},{legendBBox:kt}))))}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleReceiveSyncEvent",function(kt,St,Tt){var At=xt.props.syncId;At===kt&&St!==xt.uniqueChartId&&(xt.clearDefer(),xt.cancelDefer=deferer(xt.applySyncEvent.bind(_assertThisInitialized$1(xt),Tt)))}),_defineProperty$1(_assertThisInitialized$1(xt),"handleBrushChange",function(kt){var St=kt.startIndex,Tt=kt.endIndex;if(St!==xt.state.dataStartIndex||Tt!==xt.state.dataEndIndex){var At=xt.state.updateId;xt.setState(function(){return _objectSpread$1({dataStartIndex:St,dataEndIndex:Tt},mt({props:xt.props,dataStartIndex:St,dataEndIndex:Tt,updateId:At},xt.state))}),xt.triggerSyncEvent({dataStartIndex:St,dataEndIndex:Tt})}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleMouseEnter",function(kt){var St=xt.props.onMouseEnter,Tt=xt.getMouseInfo(kt);if(Tt){var At=_objectSpread$1(_objectSpread$1({},Tt),{},{isTooltipActive:!0});xt.setState(At),xt.triggerSyncEvent(At),_isFunction$1(St)&&St(At,kt)}}),_defineProperty$1(_assertThisInitialized$1(xt),"triggeredAfterMouseMove",function(kt){var St=xt.props.onMouseMove,Tt=xt.getMouseInfo(kt),At=Tt?_objectSpread$1(_objectSpread$1({},Tt),{},{isTooltipActive:!0}):{isTooltipActive:!1};xt.setState(At),xt.triggerSyncEvent(At),_isFunction$1(St)&&St(At,kt)}),_defineProperty$1(_assertThisInitialized$1(xt),"handleItemMouseEnter",function(kt){xt.setState(function(){return{isTooltipActive:!0,activeItem:kt,activePayload:kt.tooltipPayload,activeCoordinate:kt.tooltipPosition||{x:kt.cx,y:kt.cy}}})}),_defineProperty$1(_assertThisInitialized$1(xt),"handleItemMouseLeave",function(){xt.setState(function(){return{isTooltipActive:!1}})}),_defineProperty$1(_assertThisInitialized$1(xt),"handleMouseMove",function(kt){kt&&_isFunction$1(kt.persist)&&kt.persist(),xt.triggeredAfterMouseMove(kt)}),_defineProperty$1(_assertThisInitialized$1(xt),"handleMouseLeave",function(kt){var St=xt.props.onMouseLeave,Tt={isTooltipActive:!1};xt.setState(Tt),xt.triggerSyncEvent(Tt),_isFunction$1(St)&&St(Tt,kt),xt.cancelThrottledTriggerAfterMouseMove()}),_defineProperty$1(_assertThisInitialized$1(xt),"handleOuterEvent",function(kt){var St=getReactEventByType(kt),Tt=_get(xt.props,"".concat(St));if(St&&_isFunction$1(Tt)){var At;/.*touch.*/i.test(St)?At=xt.getMouseInfo(kt.changedTouches[0]):At=xt.getMouseInfo(kt);var Et=Tt;Et(At,kt)}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleClick",function(kt){var St=xt.props.onClick,Tt=xt.getMouseInfo(kt);if(Tt){var At=_objectSpread$1(_objectSpread$1({},Tt),{},{isTooltipActive:!0});xt.setState(At),xt.triggerSyncEvent(At),_isFunction$1(St)&&St(At,kt)}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleMouseDown",function(kt){var St=xt.props.onMouseDown;if(_isFunction$1(St)){var Tt=xt.getMouseInfo(kt);St(Tt,kt)}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleMouseUp",function(kt){var St=xt.props.onMouseUp;if(_isFunction$1(St)){var Tt=xt.getMouseInfo(kt);St(Tt,kt)}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleTouchMove",function(kt){kt.changedTouches!=null&&kt.changedTouches.length>0&&xt.handleMouseMove(kt.changedTouches[0])}),_defineProperty$1(_assertThisInitialized$1(xt),"handleTouchStart",function(kt){kt.changedTouches!=null&&kt.changedTouches.length>0&&xt.handleMouseDown(kt.changedTouches[0])}),_defineProperty$1(_assertThisInitialized$1(xt),"handleTouchEnd",function(kt){kt.changedTouches!=null&&kt.changedTouches.length>0&&xt.handleMouseUp(kt.changedTouches[0])}),_defineProperty$1(_assertThisInitialized$1(xt),"verticalCoordinatesGenerator",function(kt,St){var Tt=kt.xAxis,At=kt.width,Et=kt.height,$t=kt.offset;return getCoordinatesOfGrid(getTicks(_objectSpread$1(_objectSpread$1(_objectSpread$1({},CartesianAxis.defaultProps),Tt),{},{ticks:getTicksOfAxis(Tt,!0),viewBox:{x:0,y:0,width:At,height:Et}})),$t.left,$t.left+$t.width,St)}),_defineProperty$1(_assertThisInitialized$1(xt),"horizontalCoordinatesGenerator",function(kt,St){var Tt=kt.yAxis,At=kt.width,Et=kt.height,$t=kt.offset;return getCoordinatesOfGrid(getTicks(_objectSpread$1(_objectSpread$1(_objectSpread$1({},CartesianAxis.defaultProps),Tt),{},{ticks:getTicksOfAxis(Tt,!0),viewBox:{x:0,y:0,width:At,height:Et}})),$t.top,$t.top+$t.height,St)}),_defineProperty$1(_assertThisInitialized$1(xt),"axesTicksGenerator",function(kt){return getTicksOfAxis(kt,!0)}),_defineProperty$1(_assertThisInitialized$1(xt),"renderCursor",function(kt){var St=xt.state,Tt=St.isTooltipActive,At=St.activeCoordinate,Et=St.activePayload,$t=St.offset,Dt=St.activeTooltipIndex,jt=St.tooltipAxisBandSize,Pt=xt.getTooltipEventType();if(!kt||!kt.props.cursor||!Tt||!At||rt!=="ScatterChart"&&Pt!=="axis")return null;var Ct=xt.props.layout,wt,It=Curve;if(rt==="ScatterChart")wt=At,It=Cross;else if(rt==="BarChart")wt=getCursorRectangle(Ct,At,$t,jt),It=Rectangle;else if(Ct==="radial"){var Ot=getRadialCursorPoints(At),Wt=Ot.cx,zt=Ot.cy,Ft=Ot.radius,Nt=Ot.startAngle,Ut=Ot.endAngle;wt={cx:Wt,cy:zt,startAngle:Nt,endAngle:Ut,innerRadius:Ft,outerRadius:Ft},It=Sector}else wt={points:getCursorPoints(Ct,At,$t)},It=Curve;var Mt=kt.key||"_recharts-cursor",Ht=_objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({stroke:"#ccc",pointerEvents:"none"},$t),wt),filterProps(kt.props.cursor)),{},{payload:Et,payloadIndex:Dt,key:Mt,className:"recharts-tooltip-cursor"});return reactExports.isValidElement(kt.props.cursor)?reactExports.cloneElement(kt.props.cursor,Ht):reactExports.createElement(It,Ht)}),_defineProperty$1(_assertThisInitialized$1(xt),"renderPolarAxis",function(kt,St,Tt){var At=_get(kt,"type.axisType"),Et=_get(xt.state,"".concat(At,"Map")),$t=Et&&Et[kt.props["".concat(At,"Id")]];return reactExports.cloneElement(kt,_objectSpread$1(_objectSpread$1({},$t),{},{className:At,key:kt.key||"".concat(St,"-").concat(Tt),ticks:getTicksOfAxis($t,!0)}))}),_defineProperty$1(_assertThisInitialized$1(xt),"renderXAxis",function(kt,St,Tt){var At=xt.state.xAxisMap,Et=At[kt.props.xAxisId];return xt.renderAxis(Et,kt,St,Tt)}),_defineProperty$1(_assertThisInitialized$1(xt),"renderYAxis",function(kt,St,Tt){var At=xt.state.yAxisMap,Et=At[kt.props.yAxisId];return xt.renderAxis(Et,kt,St,Tt)}),_defineProperty$1(_assertThisInitialized$1(xt),"renderGrid",function(kt){var St=xt.state,Tt=St.xAxisMap,At=St.yAxisMap,Et=St.offset,$t=xt.props,Dt=$t.width,jt=$t.height,Pt=getAnyElementOfObject(Tt),Ct=_find(At,function(Ot){return _every(Ot.domain,isFinit)}),wt=Ct||getAnyElementOfObject(At),It=kt.props||{};return reactExports.cloneElement(kt,{key:kt.key||"grid",x:isNumber(It.x)?It.x:Et.left,y:isNumber(It.y)?It.y:Et.top,width:isNumber(It.width)?It.width:Et.width,height:isNumber(It.height)?It.height:Et.height,xAxis:Pt,yAxis:wt,offset:Et,chartWidth:Dt,chartHeight:jt,verticalCoordinatesGenerator:It.verticalCoordinatesGenerator||xt.verticalCoordinatesGenerator,horizontalCoordinatesGenerator:It.horizontalCoordinatesGenerator||xt.horizontalCoordinatesGenerator})}),_defineProperty$1(_assertThisInitialized$1(xt),"renderPolarGrid",function(kt){var St=kt.props,Tt=St.radialLines,At=St.polarAngles,Et=St.polarRadius,$t=xt.state,Dt=$t.radiusAxisMap,jt=$t.angleAxisMap,Pt=getAnyElementOfObject(Dt),Ct=getAnyElementOfObject(jt),wt=Ct.cx,It=Ct.cy,Ot=Ct.innerRadius,Wt=Ct.outerRadius;return reactExports.cloneElement(kt,{polarAngles:_isArray$1(At)?At:getTicksOfAxis(Ct,!0).map(function(zt){return zt.coordinate}),polarRadius:_isArray$1(Et)?Et:getTicksOfAxis(Pt,!0).map(function(zt){return zt.coordinate}),cx:wt,cy:It,innerRadius:Ot,outerRadius:Wt,key:kt.key||"polar-grid",radialLines:Tt})}),_defineProperty$1(_assertThisInitialized$1(xt),"renderLegend",function(){var kt=xt.state.formattedGraphicalItems,St=xt.props,Tt=St.children,At=St.width,Et=St.height,$t=xt.props.margin||{},Dt=At-($t.left||0)-($t.right||0),jt=getLegendProps({children:Tt,formattedGraphicalItems:kt,legendWidth:Dt,legendContent:ut});if(!jt)return null;var Pt=jt.item,Ct=_objectWithoutProperties(jt,_excluded);return reactExports.cloneElement(Pt,_objectSpread$1(_objectSpread$1({},Ct),{},{chartWidth:At,chartHeight:Et,margin:$t,onBBoxUpdate:xt.handleLegendBBoxUpdate}))}),_defineProperty$1(_assertThisInitialized$1(xt),"renderTooltip",function(){var kt=xt.props.children,St=findChildByType(kt,Tooltip);if(!St)return null;var Tt=xt.state,At=Tt.isTooltipActive,Et=Tt.activeCoordinate,$t=Tt.activePayload,Dt=Tt.activeLabel,jt=Tt.offset;return reactExports.cloneElement(St,{viewBox:_objectSpread$1(_objectSpread$1({},jt),{},{x:jt.left,y:jt.top}),active:At,label:Dt,payload:At?$t:[],coordinate:Et})}),_defineProperty$1(_assertThisInitialized$1(xt),"renderBrush",function(kt){var St=xt.props,Tt=St.margin,At=St.data,Et=xt.state,$t=Et.offset,Dt=Et.dataStartIndex,jt=Et.dataEndIndex,Pt=Et.updateId;return reactExports.cloneElement(kt,{key:kt.key||"_recharts-brush",onChange:combineEventHandlers(xt.handleBrushChange,null,kt.props.onChange),data:At,x:isNumber(kt.props.x)?kt.props.x:$t.left,y:isNumber(kt.props.y)?kt.props.y:$t.top+$t.height+$t.brushBottom-(Tt.bottom||0),width:isNumber(kt.props.width)?kt.props.width:$t.width,startIndex:Dt,endIndex:jt,updateId:"brush-".concat(Pt)})}),_defineProperty$1(_assertThisInitialized$1(xt),"renderReferenceElement",function(kt,St,Tt){if(!kt)return null;var At=_assertThisInitialized$1(xt),Et=At.clipPathId,$t=xt.state,Dt=$t.xAxisMap,jt=$t.yAxisMap,Pt=$t.offset,Ct=kt.props,wt=Ct.xAxisId,It=Ct.yAxisId;return reactExports.cloneElement(kt,{key:kt.key||"".concat(St,"-").concat(Tt),xAxis:Dt[wt],yAxis:jt[It],viewBox:{x:Pt.left,y:Pt.top,width:Pt.width,height:Pt.height},clipPathId:Et})}),_defineProperty$1(_assertThisInitialized$1(xt),"renderActivePoints",function(kt){var St=kt.item,Tt=kt.activePoint,At=kt.basePoint,Et=kt.childIndex,$t=kt.isRange,Dt=[],jt=St.props.key,Pt=St.item.props,Ct=Pt.activeDot,wt=Pt.dataKey,It=_objectSpread$1(_objectSpread$1({index:Et,dataKey:wt,cx:Tt.x,cy:Tt.y,r:4,fill:getMainColorOfGraphicItem(St.item),strokeWidth:2,stroke:"#fff",payload:Tt.payload,value:Tt.value,key:"".concat(jt,"-activePoint-").concat(Et)},filterProps(Ct)),adaptEventHandlers(Ct));return Dt.push(bt.renderActiveDot(Ct,It)),At?Dt.push(bt.renderActiveDot(Ct,_objectSpread$1(_objectSpread$1({},It),{},{cx:At.x,cy:At.y,key:"".concat(jt,"-basePoint-").concat(Et)}))):$t&&Dt.push(null),Dt}),_defineProperty$1(_assertThisInitialized$1(xt),"renderGraphicChild",function(kt,St,Tt){var At=xt.filterFormatItem(kt,St,Tt);if(!At)return null;var Et=xt.getTooltipEventType(),$t=xt.state,Dt=$t.isTooltipActive,jt=$t.tooltipAxis,Pt=$t.activeTooltipIndex,Ct=$t.activeLabel,wt=xt.props.children,It=findChildByType(wt,Tooltip),Ot=At.props,Wt=Ot.points,zt=Ot.isRange,Ft=Ot.baseLine,Nt=At.item.props,Ut=Nt.activeDot,Mt=Nt.hide,Ht=Nt.activeBar,en=Nt.activeShape,sn=!!(!Mt&&Dt&&It&&(Ut||Ht||en)),Kt={};Et!=="axis"&&It&&It.props.trigger==="click"?Kt={onClick:combineEventHandlers(xt.handleItemMouseEnter,null,kt.props.onCLick)}:Et!=="axis"&&(Kt={onMouseLeave:combineEventHandlers(xt.handleItemMouseLeave,null,kt.props.onMouseLeave),onMouseEnter:combineEventHandlers(xt.handleItemMouseEnter,null,kt.props.onMouseEnter)});var rn=reactExports.cloneElement(kt,_objectSpread$1(_objectSpread$1({},At.props),Kt));function nn(In){return typeof jt.dataKey=="function"?jt.dataKey(In.payload):null}if(sn)if(Pt>=0){var hn,vn;if(jt.dataKey&&!jt.allowDuplicatedCategory){var an=typeof jt.dataKey=="function"?nn:"payload.".concat(jt.dataKey.toString());hn=findEntryInArray(Wt,an,Ct),vn=zt&&Ft&&findEntryInArray(Ft,an,Ct)}else hn=Wt==null?void 0:Wt[Pt],vn=zt&&Ft&&Ft[Pt];if(en||Ht){var Qt=kt.props.activeIndex!==void 0?kt.props.activeIndex:Pt;return[reactExports.cloneElement(kt,_objectSpread$1(_objectSpread$1(_objectSpread$1({},At.props),Kt),{},{activeIndex:Qt})),null,null]}if(!_isNil(hn))return[rn].concat(_toConsumableArray$1(xt.renderActivePoints({item:At,activePoint:hn,basePoint:vn,childIndex:Pt,isRange:zt})))}else{var _n,Pn=(_n=xt.getItemByXY(xt.state.activeCoordinate))!==null&&_n!==void 0?_n:{graphicalItem:rn},$n=Pn.graphicalItem,Nn=$n.item,Tn=Nn===void 0?kt:Nn,cn=$n.childIndex,mn=_objectSpread$1(_objectSpread$1(_objectSpread$1({},At.props),Kt),{},{activeIndex:cn});return[reactExports.cloneElement(Tn,mn),null,null]}return zt?[rn,null,null]:[rn,null]}),_defineProperty$1(_assertThisInitialized$1(xt),"renderCustomized",function(kt,St,Tt){return reactExports.cloneElement(kt,_objectSpread$1(_objectSpread$1({key:"recharts-customized-".concat(Tt)},xt.props),xt.state))}),xt.uniqueChartId=_isNil(vt.id)?uniqueId("recharts"):vt.id,xt.clipPathId="".concat(xt.uniqueChartId,"-clip"),vt.throttleDelay&&(xt.triggeredAfterMouseMove=_throttle(xt.triggeredAfterMouseMove,vt.throttleDelay)),xt.state={},xt}return _createClass$1(bt,[{key:"componentDidMount",value:function(){var xt,kt;_isNil(this.props.syncId)||this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(xt=this.props.margin.left)!==null&&xt!==void 0?xt:0,top:(kt=this.props.margin.top)!==null&&kt!==void 0?kt:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.handleMouseMove,layout:this.props.layout})}},{key:"getSnapshotBeforeUpdate",value:function(xt,kt){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==kt.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==xt.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==xt.margin){var St,Tt;this.accessibilityManager.setDetails({offset:{left:(St=this.props.margin.left)!==null&&St!==void 0?St:0,top:(Tt=this.props.margin.top)!==null&&Tt!==void 0?Tt:0}})}return null}},{key:"componentDidUpdate",value:function(xt){_isNil(xt.syncId)&&!_isNil(this.props.syncId)&&this.addListener(),!_isNil(xt.syncId)&&_isNil(this.props.syncId)&&this.removeListener()}},{key:"componentWillUnmount",value:function(){this.clearDefer(),_isNil(this.props.syncId)||this.removeListener(),this.cancelThrottledTriggerAfterMouseMove()}},{key:"cancelThrottledTriggerAfterMouseMove",value:function(){typeof this.triggeredAfterMouseMove.cancel=="function"&&this.triggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var xt=findChildByType(this.props.children,Tooltip);if(xt&&_isBoolean(xt.props.shared)){var kt=xt.props.shared?"axis":"item";return lt.indexOf(kt)>=0?kt:at}return at}},{key:"getMouseInfo",value:function(xt){var kt;if(!this.container)return null;var St=getOffset(this.container),Tt=calculateChartCoordinate(xt,St),At=this.container,Et=At==null||(kt=At.getBoundingClientRect())===null||kt===void 0?void 0:kt.width,$t=At.offsetWidth,Dt=Et/$t||1,jt=this.inRange(Tt.chartX,Tt.chartY,Dt);if(!jt)return null;var Pt=this.state,Ct=Pt.xAxisMap,wt=Pt.yAxisMap,It=this.getTooltipEventType();if(It!=="axis"&&Ct&&wt){var Ot=getAnyElementOfObject(Ct).scale,Wt=getAnyElementOfObject(wt).scale,zt=Ot&&Ot.invert?Ot.invert(Tt.chartX):null,Ft=Wt&&Wt.invert?Wt.invert(Tt.chartY):null;return _objectSpread$1(_objectSpread$1({},Tt),{},{xValue:zt,yValue:Ft})}var Nt=getTooltipData(this.state,this.props.data,this.props.layout,jt);return Nt?_objectSpread$1(_objectSpread$1({},Tt),Nt):null}},{key:"inRange",value:function(xt,kt){var St=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Tt=this.props.layout,At=xt/St,Et=kt/St;if(Tt==="horizontal"||Tt==="vertical"){var $t=this.state.offset,Dt=At>=$t.left&&At<=$t.left+$t.width&&Et>=$t.top&&Et<=$t.top+$t.height;return Dt?{x:At,y:Et}:null}var jt=this.state,Pt=jt.angleAxisMap,Ct=jt.radiusAxisMap;if(Pt&&Ct){var wt=getAnyElementOfObject(Pt);return inRangeOfSector({x:At,y:Et},wt)}return null}},{key:"parseEventsOfWrapper",value:function(){var xt=this.props.children,kt=this.getTooltipEventType(),St=findChildByType(xt,Tooltip),Tt={};St&&kt==="axis"&&(St.props.trigger==="click"?Tt={onClick:this.handleClick}:Tt={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var At=adaptEventHandlers(this.props,this.handleOuterEvent);return _objectSpread$1(_objectSpread$1({},At),Tt)}},{key:"addListener",value:function(){eventCenter.on(SYNC_EVENT,this.handleReceiveSyncEvent),eventCenter.setMaxListeners&&eventCenter._maxListeners&&eventCenter.setMaxListeners(eventCenter._maxListeners+1)}},{key:"removeListener",value:function(){eventCenter.removeListener(SYNC_EVENT,this.handleReceiveSyncEvent),eventCenter.setMaxListeners&&eventCenter._maxListeners&&eventCenter.setMaxListeners(eventCenter._maxListeners-1)}},{key:"triggerSyncEvent",value:function(xt){var kt=this.props.syncId;_isNil(kt)||eventCenter.emit(SYNC_EVENT,kt,this.uniqueChartId,xt)}},{key:"applySyncEvent",value:function(xt){var kt=this.props,St=kt.layout,Tt=kt.syncMethod,At=this.state.updateId,Et=xt.dataStartIndex,$t=xt.dataEndIndex;if(!_isNil(xt.dataStartIndex)||!_isNil(xt.dataEndIndex))this.setState(_objectSpread$1({dataStartIndex:Et,dataEndIndex:$t},mt({props:this.props,dataStartIndex:Et,dataEndIndex:$t,updateId:At},this.state)));else if(_isNil(xt.activeTooltipIndex))this.setState(xt);else{var Dt=xt.chartX,jt=xt.chartY,Pt=xt.activeTooltipIndex,Ct=this.state,wt=Ct.offset,It=Ct.tooltipTicks;if(!wt)return;if(typeof Tt=="function")Pt=Tt(It,xt);else if(Tt==="value"){Pt=-1;for(var Ot=0;OtjsxRuntimeExports.jsx(Dot,{cx:tt,cy:et,fill:colors.blueTextAccent,r:2}),SentimentChart=({data:tt,width:et=500,height:nt=300})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:(tt==null?void 0:tt.length)&&jsxRuntimeExports.jsxs(LineChart,{data:tt,height:nt,id:"cy-sentiment-chart",margin:{bottom:5,left:-20,right:30,top:5},width:et,children:[jsxRuntimeExports.jsx(CartesianGrid,{stroke:colors.lightBlue300,strokeDasharray:"5 5"}),jsxRuntimeExports.jsx(XAxis,{dataKey:"date",interval:Math.floor(tt.length/3),stroke:colors.blueTextAccent}),jsxRuntimeExports.jsx(YAxis,{domain:[0,10],stroke:colors.blueTextAccent}),jsxRuntimeExports.jsx(Tooltip,{}),jsxRuntimeExports.jsx(Line,{dataKey:"score",dot:jsxRuntimeExports.jsx(RenderDot$1,{}),stroke:"#8884d8",type:"monotone"})]})}),SentimentAnalysis=reactExports.memo(()=>{const tt=useAppStore(pt=>pt.currentSearch),[et,nt]=reactExports.useState(void 0),rt=hooks().startOf("day"),it=hooks().subtract(1,"year"),ot=3600*24,[at,st]=reactExports.useState(hooks().startOf("day").subtract(20,"day")),lt=(Math.round((rt.unix()-at.unix())/ot)+1)*50,[ct,ut]=reactExports.useState(!1),ht=async()=>{tt&&(ut(!0),await executeIfProd(()=>distExports$1.enable()),getSentimentData({topic:tt,cutoff_date:String(at.unix())}).then(pt=>{console.log(pt==null?void 0:pt.data),nt(pt==null?void 0:pt.data.filter(mt=>mt.date).map(mt=>({date:hooks.unix(Number(String(mt.date).split(".")[0])).format("MM/DD/YY"),score:mt.sentiment_score})))}).catch(console.error).finally(()=>{ut(!1)}))},dt=reactExports.useRef(null);return jsxRuntimeExports.jsxs(Stack$5,{component:"div",flexGrow:1,p:1,spacing:2,width:"100%",children:[ct&&jsxRuntimeExports.jsx(Stack$5,{alignItems:"center",component:"div",flexGrow:1,p:4,spacing:2,width:"100%",children:jsxRuntimeExports.jsx(PropagateLoader,{color:colors.white})}),!ct&&jsxRuntimeExports.jsxs(ChartWrapper$1,{ref:dt,children:[jsxRuntimeExports.jsx(SentimentChart,{data:et,height:280,width:352}),Array.isArray(et)&&!ct&&!et.length&&jsxRuntimeExports.jsx(Text$3,{children:"No data for this period"})]}),jsxRuntimeExports.jsx(DatePicker,{format:"L",label:"From",maxDate:rt,minDate:it,onChange:pt=>st(pt??hooks()),sx:{background:colors.inputBg1,color:"text.primary"},value:at}),jsxRuntimeExports.jsx(Slider$1,{component:"div",getAriaValueText:pt=>hooks(pt).format("L"),id:"cy-sentiment-analysis-slider",marks:!0,max:rt.unix(),min:it.unix(),onChange:(pt,mt)=>{st(hooks.unix(mt))},step:ot,value:at.unix(),valueLabelDisplay:"auto",valueLabelFormat:pt=>hooks.unix(pt).format("L")}),jsxRuntimeExports.jsxs(StyledButton$1,{className:"button",id:"cy-get-sentiment-analysis-btn",onClick:ht,children:["Create a chart for ",lt.toFixed()," SATS"]})]})}),ChartWrapper$1=styled$4.div` +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray$3(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$3(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$3(tt,et)}}function _iterableToArray$1(tt){if(typeof Symbol<"u"&&tt[Symbol.iterator]!=null||tt["@@iterator"]!=null)return Array.from(tt)}function _arrayWithoutHoles$1(tt){if(Array.isArray(tt))return _arrayLikeToArray$3(tt)}function _arrayLikeToArray$3(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt0?st:rt&&rt.props&&rt.props.data&&rt.props.data.length>0?rt.props.data:et&&et.length&&isNumber(ot)&&isNumber(at)?et.slice(ot,at+1):[]};function getDefaultDomainByAxisType(tt){return tt==="number"?[0,"auto"]:void 0}var getTooltipContent=function(et,nt,rt,it){var ot=et.graphicalItems,at=et.tooltipAxis,st=getDisplayedData(nt,et);return rt<0||!ot||!ot.length||rt>=st.length?null:ot.reduce(function(lt,ct){var ut=ct.props.hide;if(ut)return lt;var ht=ct.props.data,dt=ht===void 0?nt:ht,pt;if(at.dataKey&&!at.allowDuplicatedCategory){var mt=dt===void 0?st:dt;pt=findEntryInArray(mt,at.dataKey,it)}else pt=dt&&dt[rt]||st[rt];return pt?[].concat(_toConsumableArray$1(lt),[getTooltipItem(ct,pt)]):lt},[])},getTooltipData=function(et,nt,rt,it){var ot=it||{x:et.chartX,y:et.chartY},at=calculateTooltipPos(ot,rt),st=et.orderedTooltipTicks,lt=et.tooltipAxis,ct=et.tooltipTicks,ut=calculateActiveTickIndex(at,st,ct,lt);if(ut>=0&&ct){var ht=ct[ut]&&ct[ut].value,dt=getTooltipContent(et,nt,ut,ht),pt=getActiveCoordinate(rt,st,ut,ot);return{activeTooltipIndex:ut,activeLabel:ht,activePayload:dt,activeCoordinate:pt}}return null},getAxisMapByAxes=function(et,nt){var rt=nt.axes,it=nt.graphicalItems,ot=nt.axisType,at=nt.axisIdKey,st=nt.stackGroups,lt=nt.dataStartIndex,ct=nt.dataEndIndex,ut=et.layout,ht=et.children,dt=et.stackOffset,pt=isCategoricalAxis(ut,ot),mt=rt.reduce(function(gt,yt){var bt,vt=yt.props,xt=vt.type,kt=vt.dataKey,St=vt.allowDataOverflow,Tt=vt.allowDuplicatedCategory,At=vt.scale,Et=vt.ticks,$t=vt.includeHidden,Dt=yt.props[at];if(gt[Dt])return gt;var jt=getDisplayedData(et.data,{graphicalItems:it.filter(function(Ht){return Ht.props[at]===Dt}),dataStartIndex:lt,dataEndIndex:ct}),Pt=jt.length,Ct,wt,It;isDomainSpecifiedByUser(yt.props.domain,St,xt)&&(Ct=parseSpecifiedDomain(yt.props.domain,null,St),pt&&(xt==="number"||At!=="auto")&&(It=getDomainOfDataByKey(jt,kt,"category")));var Ot=getDefaultDomainByAxisType(xt);if(!Ct||Ct.length===0){var Wt,zt=(Wt=yt.props.domain)!==null&&Wt!==void 0?Wt:Ot;if(kt){if(Ct=getDomainOfDataByKey(jt,kt,xt),xt==="category"&&pt){var Ft=hasDuplicate(Ct);Tt&&Ft?(wt=Ct,Ct=_range(0,Pt)):Tt||(Ct=parseDomainOfCategoryAxis(zt,Ct,yt).reduce(function(Ht,en){return Ht.indexOf(en)>=0?Ht:[].concat(_toConsumableArray$1(Ht),[en])},[]))}else if(xt==="category")Tt?Ct=Ct.filter(function(Ht){return Ht!==""&&!_isNil(Ht)}):Ct=parseDomainOfCategoryAxis(zt,Ct,yt).reduce(function(Ht,en){return Ht.indexOf(en)>=0||en===""||_isNil(en)?Ht:[].concat(_toConsumableArray$1(Ht),[en])},[]);else if(xt==="number"){var Nt=parseErrorBarsOfAxis(jt,it.filter(function(Ht){return Ht.props[at]===Dt&&($t||!Ht.props.hide)}),kt,ot,ut);Nt&&(Ct=Nt)}pt&&(xt==="number"||At!=="auto")&&(It=getDomainOfDataByKey(jt,kt,"category"))}else pt?Ct=_range(0,Pt):st&&st[Dt]&&st[Dt].hasStack&&xt==="number"?Ct=dt==="expand"?[0,1]:getDomainOfStackGroups(st[Dt].stackGroups,lt,ct):Ct=getDomainOfItemsWithSameAxis(jt,it.filter(function(Ht){return Ht.props[at]===Dt&&($t||!Ht.props.hide)}),xt,ut,!0);if(xt==="number")Ct=detectReferenceElementsDomain(ht,Ct,Dt,ot,Et),zt&&(Ct=parseSpecifiedDomain(zt,Ct,St));else if(xt==="category"&&zt){var Ut=zt,Mt=Ct.every(function(Ht){return Ut.indexOf(Ht)>=0});Mt&&(Ct=Ut)}}return _objectSpread$1(_objectSpread$1({},gt),{},_defineProperty$1({},Dt,_objectSpread$1(_objectSpread$1({},yt.props),{},{axisType:ot,domain:Ct,categoricalDomain:It,duplicateDomain:wt,originalDomain:(bt=yt.props.domain)!==null&&bt!==void 0?bt:Ot,isCategorical:pt,layout:ut})))},{});return mt},getAxisMapByItems=function(et,nt){var rt=nt.graphicalItems,it=nt.Axis,ot=nt.axisType,at=nt.axisIdKey,st=nt.stackGroups,lt=nt.dataStartIndex,ct=nt.dataEndIndex,ut=et.layout,ht=et.children,dt=getDisplayedData(et.data,{graphicalItems:rt,dataStartIndex:lt,dataEndIndex:ct}),pt=dt.length,mt=isCategoricalAxis(ut,ot),gt=-1,yt=rt.reduce(function(bt,vt){var xt=vt.props[at],kt=getDefaultDomainByAxisType("number");if(!bt[xt]){gt++;var St;return mt?St=_range(0,pt):st&&st[xt]&&st[xt].hasStack?(St=getDomainOfStackGroups(st[xt].stackGroups,lt,ct),St=detectReferenceElementsDomain(ht,St,xt,ot)):(St=parseSpecifiedDomain(kt,getDomainOfItemsWithSameAxis(dt,rt.filter(function(Tt){return Tt.props[at]===xt&&!Tt.props.hide}),"number",ut),it.defaultProps.allowDataOverflow),St=detectReferenceElementsDomain(ht,St,xt,ot)),_objectSpread$1(_objectSpread$1({},bt),{},_defineProperty$1({},xt,_objectSpread$1(_objectSpread$1({axisType:ot},it.defaultProps),{},{hide:!0,orientation:_get(ORIENT_MAP,"".concat(ot,".").concat(gt%2),null),domain:St,originalDomain:kt,isCategorical:mt,layout:ut})))}return bt},{});return yt},getAxisMap=function(et,nt){var rt=nt.axisType,it=rt===void 0?"xAxis":rt,ot=nt.AxisComp,at=nt.graphicalItems,st=nt.stackGroups,lt=nt.dataStartIndex,ct=nt.dataEndIndex,ut=et.children,ht="".concat(it,"Id"),dt=findAllByType(ut,ot),pt={};return dt&&dt.length?pt=getAxisMapByAxes(et,{axes:dt,graphicalItems:at,axisType:it,axisIdKey:ht,stackGroups:st,dataStartIndex:lt,dataEndIndex:ct}):at&&at.length&&(pt=getAxisMapByItems(et,{Axis:ot,graphicalItems:at,axisType:it,axisIdKey:ht,stackGroups:st,dataStartIndex:lt,dataEndIndex:ct})),pt},tooltipTicksGenerator=function(et){var nt=getAnyElementOfObject(et),rt=getTicksOfAxis(nt,!1,!0);return{tooltipTicks:rt,orderedTooltipTicks:_sortBy(rt,function(it){return it.coordinate}),tooltipAxis:nt,tooltipAxisBandSize:getBandSizeOfAxis(nt,rt)}},createDefaultState=function(et){var nt,rt,it=et.children,ot=et.defaultShowTooltip,at=findChildByType(it,Brush),st=at&&at.props&&at.props.startIndex||0,lt=(at==null||(nt=at.props)===null||nt===void 0?void 0:nt.endIndex)!==void 0?at==null||(rt=at.props)===null||rt===void 0?void 0:rt.endIndex:et.data&&et.data.length-1||0;return{chartX:0,chartY:0,dataStartIndex:st,dataEndIndex:lt,activeTooltipIndex:-1,isTooltipActive:_isNil(ot)?!1:ot}},hasGraphicalBarItem=function(et){return!et||!et.length?!1:et.some(function(nt){var rt=getDisplayName(nt&&nt.type);return rt&&rt.indexOf("Bar")>=0})},getAxisNameByLayout=function(et){return et==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:et==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:et==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},calculateOffset=function(et,nt){var rt=et.props,it=et.graphicalItems,ot=et.xAxisMap,at=ot===void 0?{}:ot,st=et.yAxisMap,lt=st===void 0?{}:st,ct=rt.width,ut=rt.height,ht=rt.children,dt=rt.margin||{},pt=findChildByType(ht,Brush),mt=findChildByType(ht,Legend),gt=Object.keys(lt).reduce(function(xt,kt){var St=lt[kt],Tt=St.orientation;return!St.mirror&&!St.hide?_objectSpread$1(_objectSpread$1({},xt),{},_defineProperty$1({},Tt,xt[Tt]+St.width)):xt},{left:dt.left||0,right:dt.right||0}),yt=Object.keys(at).reduce(function(xt,kt){var St=at[kt],Tt=St.orientation;return!St.mirror&&!St.hide?_objectSpread$1(_objectSpread$1({},xt),{},_defineProperty$1({},Tt,_get(xt,"".concat(Tt))+St.height)):xt},{top:dt.top||0,bottom:dt.bottom||0}),bt=_objectSpread$1(_objectSpread$1({},yt),gt),vt=bt.bottom;return pt&&(bt.bottom+=pt.props.height||Brush.defaultProps.height),mt&&nt&&(bt=appendOffsetOfLegend(bt,it,rt,nt)),_objectSpread$1(_objectSpread$1({brushBottom:vt},bt),{},{width:ct-bt.left-bt.right,height:ut-bt.top-bt.bottom})},generateCategoricalChart=function(et){var nt,rt=et.chartName,it=et.GraphicalChild,ot=et.defaultTooltipEventType,at=ot===void 0?"axis":ot,st=et.validateTooltipEventTypes,lt=st===void 0?["axis"]:st,ct=et.axisComponents,ut=et.legendContent,ht=et.formatAxisMap,dt=et.defaultProps,pt=function(yt,bt){var vt=bt.graphicalItems,xt=bt.stackGroups,kt=bt.offset,St=bt.updateId,Tt=bt.dataStartIndex,At=bt.dataEndIndex,Et=yt.barSize,$t=yt.layout,Dt=yt.barGap,jt=yt.barCategoryGap,Pt=yt.maxBarSize,Ct=getAxisNameByLayout($t),wt=Ct.numericAxisName,It=Ct.cateAxisName,Ot=hasGraphicalBarItem(vt),Wt=Ot&&getBarSizeList({barSize:Et,stackGroups:xt}),zt=[];return vt.forEach(function(Ft,Nt){var Ut=getDisplayedData(yt.data,{dataStartIndex:Tt,dataEndIndex:At},Ft),Mt=Ft.props,Ht=Mt.dataKey,en=Mt.maxBarSize,sn=Ft.props["".concat(wt,"Id")],Kt=Ft.props["".concat(It,"Id")],rn={},nn=ct.reduce(function(An,wn){var fn,pn=bt["".concat(wn.axisType,"Map")],kn=Ft.props["".concat(wn.axisType,"Id")];pn&&pn[kn]||wn.axisType==="zAxis"||invariant(!1);var Dn=pn[kn];return _objectSpread$1(_objectSpread$1({},An),{},(fn={},_defineProperty$1(fn,wn.axisType,Dn),_defineProperty$1(fn,"".concat(wn.axisType,"Ticks"),getTicksOfAxis(Dn)),fn))},rn),hn=nn[It],vn=nn["".concat(It,"Ticks")],an=xt&&xt[sn]&&xt[sn].hasStack&&getStackedDataOfItem(Ft,xt[sn].stackGroups),Qt=getDisplayName(Ft.type).indexOf("Bar")>=0,_n=getBandSizeOfAxis(hn,vn),Pn=[];if(Qt){var $n,Nn,Tn=_isNil(en)?Pt:en,cn=($n=(Nn=getBandSizeOfAxis(hn,vn,!0))!==null&&Nn!==void 0?Nn:Tn)!==null&&$n!==void 0?$n:0;Pn=getBarPosition({barGap:Dt,barCategoryGap:jt,bandSize:cn!==_n?cn:_n,sizeList:Wt[Kt],maxBarSize:Tn}),cn!==_n&&(Pn=Pn.map(function(An){return _objectSpread$1(_objectSpread$1({},An),{},{position:_objectSpread$1(_objectSpread$1({},An.position),{},{offset:An.position.offset-cn/2})})}))}var mn=Ft&&Ft.type&&Ft.type.getComposedData;if(mn){var In;zt.push({props:_objectSpread$1(_objectSpread$1({},mn(_objectSpread$1(_objectSpread$1({},nn),{},{displayedData:Ut,props:yt,dataKey:Ht,item:Ft,bandSize:_n,barPosition:Pn,offset:kt,stackedData:an,layout:$t,dataStartIndex:Tt,dataEndIndex:At}))),{},(In={key:Ft.key||"item-".concat(Nt)},_defineProperty$1(In,wt,nn[wt]),_defineProperty$1(In,It,nn[It]),_defineProperty$1(In,"animationId",St),In)),childIndex:parseChildIndex(Ft,yt.children),item:Ft})}}),zt},mt=function(yt,bt){var vt=yt.props,xt=yt.dataStartIndex,kt=yt.dataEndIndex,St=yt.updateId;if(!validateWidthHeight({props:vt}))return null;var Tt=vt.children,At=vt.layout,Et=vt.stackOffset,$t=vt.data,Dt=vt.reverseStackOrder,jt=getAxisNameByLayout(At),Pt=jt.numericAxisName,Ct=jt.cateAxisName,wt=findAllByType(Tt,it),It=getStackGroupsByAxisId($t,wt,"".concat(Pt,"Id"),"".concat(Ct,"Id"),Et,Dt),Ot=ct.reduce(function(Ut,Mt){var Ht="".concat(Mt.axisType,"Map");return _objectSpread$1(_objectSpread$1({},Ut),{},_defineProperty$1({},Ht,getAxisMap(vt,_objectSpread$1(_objectSpread$1({},Mt),{},{graphicalItems:wt,stackGroups:Mt.axisType===Pt&&It,dataStartIndex:xt,dataEndIndex:kt}))))},{}),Wt=calculateOffset(_objectSpread$1(_objectSpread$1({},Ot),{},{props:vt,graphicalItems:wt}),bt==null?void 0:bt.legendBBox);Object.keys(Ot).forEach(function(Ut){Ot[Ut]=ht(vt,Ot[Ut],Wt,Ut.replace("Map",""),rt)});var zt=Ot["".concat(Ct,"Map")],Ft=tooltipTicksGenerator(zt),Nt=pt(vt,_objectSpread$1(_objectSpread$1({},Ot),{},{dataStartIndex:xt,dataEndIndex:kt,updateId:St,graphicalItems:wt,stackGroups:It,offset:Wt}));return _objectSpread$1(_objectSpread$1({formattedGraphicalItems:Nt,graphicalItems:wt,offset:Wt,stackGroups:It},Ft),Ot)};return nt=function(gt){_inherits$1(bt,gt);var yt=_createSuper$1(bt);function bt(vt){var xt;return _classCallCheck$1(this,bt),xt=yt.call(this,vt),_defineProperty$1(_assertThisInitialized$1(xt),"accessibilityManager",new AccessibilityManager),_defineProperty$1(_assertThisInitialized$1(xt),"clearDefer",function(){xt.cancelDefer&&(xt.cancelDefer(),xt.cancelDefer=null)}),_defineProperty$1(_assertThisInitialized$1(xt),"handleLegendBBoxUpdate",function(kt){if(kt){var St=xt.state,Tt=St.dataStartIndex,At=St.dataEndIndex,Et=St.updateId;xt.setState(_objectSpread$1({legendBBox:kt},mt({props:xt.props,dataStartIndex:Tt,dataEndIndex:At,updateId:Et},_objectSpread$1(_objectSpread$1({},xt.state),{},{legendBBox:kt}))))}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleReceiveSyncEvent",function(kt,St,Tt){var At=xt.props.syncId;At===kt&&St!==xt.uniqueChartId&&(xt.clearDefer(),xt.cancelDefer=deferer(xt.applySyncEvent.bind(_assertThisInitialized$1(xt),Tt)))}),_defineProperty$1(_assertThisInitialized$1(xt),"handleBrushChange",function(kt){var St=kt.startIndex,Tt=kt.endIndex;if(St!==xt.state.dataStartIndex||Tt!==xt.state.dataEndIndex){var At=xt.state.updateId;xt.setState(function(){return _objectSpread$1({dataStartIndex:St,dataEndIndex:Tt},mt({props:xt.props,dataStartIndex:St,dataEndIndex:Tt,updateId:At},xt.state))}),xt.triggerSyncEvent({dataStartIndex:St,dataEndIndex:Tt})}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleMouseEnter",function(kt){var St=xt.props.onMouseEnter,Tt=xt.getMouseInfo(kt);if(Tt){var At=_objectSpread$1(_objectSpread$1({},Tt),{},{isTooltipActive:!0});xt.setState(At),xt.triggerSyncEvent(At),_isFunction$1(St)&&St(At,kt)}}),_defineProperty$1(_assertThisInitialized$1(xt),"triggeredAfterMouseMove",function(kt){var St=xt.props.onMouseMove,Tt=xt.getMouseInfo(kt),At=Tt?_objectSpread$1(_objectSpread$1({},Tt),{},{isTooltipActive:!0}):{isTooltipActive:!1};xt.setState(At),xt.triggerSyncEvent(At),_isFunction$1(St)&&St(At,kt)}),_defineProperty$1(_assertThisInitialized$1(xt),"handleItemMouseEnter",function(kt){xt.setState(function(){return{isTooltipActive:!0,activeItem:kt,activePayload:kt.tooltipPayload,activeCoordinate:kt.tooltipPosition||{x:kt.cx,y:kt.cy}}})}),_defineProperty$1(_assertThisInitialized$1(xt),"handleItemMouseLeave",function(){xt.setState(function(){return{isTooltipActive:!1}})}),_defineProperty$1(_assertThisInitialized$1(xt),"handleMouseMove",function(kt){kt&&_isFunction$1(kt.persist)&&kt.persist(),xt.triggeredAfterMouseMove(kt)}),_defineProperty$1(_assertThisInitialized$1(xt),"handleMouseLeave",function(kt){var St=xt.props.onMouseLeave,Tt={isTooltipActive:!1};xt.setState(Tt),xt.triggerSyncEvent(Tt),_isFunction$1(St)&&St(Tt,kt),xt.cancelThrottledTriggerAfterMouseMove()}),_defineProperty$1(_assertThisInitialized$1(xt),"handleOuterEvent",function(kt){var St=getReactEventByType(kt),Tt=_get(xt.props,"".concat(St));if(St&&_isFunction$1(Tt)){var At;/.*touch.*/i.test(St)?At=xt.getMouseInfo(kt.changedTouches[0]):At=xt.getMouseInfo(kt);var Et=Tt;Et(At,kt)}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleClick",function(kt){var St=xt.props.onClick,Tt=xt.getMouseInfo(kt);if(Tt){var At=_objectSpread$1(_objectSpread$1({},Tt),{},{isTooltipActive:!0});xt.setState(At),xt.triggerSyncEvent(At),_isFunction$1(St)&&St(At,kt)}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleMouseDown",function(kt){var St=xt.props.onMouseDown;if(_isFunction$1(St)){var Tt=xt.getMouseInfo(kt);St(Tt,kt)}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleMouseUp",function(kt){var St=xt.props.onMouseUp;if(_isFunction$1(St)){var Tt=xt.getMouseInfo(kt);St(Tt,kt)}}),_defineProperty$1(_assertThisInitialized$1(xt),"handleTouchMove",function(kt){kt.changedTouches!=null&&kt.changedTouches.length>0&&xt.handleMouseMove(kt.changedTouches[0])}),_defineProperty$1(_assertThisInitialized$1(xt),"handleTouchStart",function(kt){kt.changedTouches!=null&&kt.changedTouches.length>0&&xt.handleMouseDown(kt.changedTouches[0])}),_defineProperty$1(_assertThisInitialized$1(xt),"handleTouchEnd",function(kt){kt.changedTouches!=null&&kt.changedTouches.length>0&&xt.handleMouseUp(kt.changedTouches[0])}),_defineProperty$1(_assertThisInitialized$1(xt),"verticalCoordinatesGenerator",function(kt,St){var Tt=kt.xAxis,At=kt.width,Et=kt.height,$t=kt.offset;return getCoordinatesOfGrid(getTicks(_objectSpread$1(_objectSpread$1(_objectSpread$1({},CartesianAxis.defaultProps),Tt),{},{ticks:getTicksOfAxis(Tt,!0),viewBox:{x:0,y:0,width:At,height:Et}})),$t.left,$t.left+$t.width,St)}),_defineProperty$1(_assertThisInitialized$1(xt),"horizontalCoordinatesGenerator",function(kt,St){var Tt=kt.yAxis,At=kt.width,Et=kt.height,$t=kt.offset;return getCoordinatesOfGrid(getTicks(_objectSpread$1(_objectSpread$1(_objectSpread$1({},CartesianAxis.defaultProps),Tt),{},{ticks:getTicksOfAxis(Tt,!0),viewBox:{x:0,y:0,width:At,height:Et}})),$t.top,$t.top+$t.height,St)}),_defineProperty$1(_assertThisInitialized$1(xt),"axesTicksGenerator",function(kt){return getTicksOfAxis(kt,!0)}),_defineProperty$1(_assertThisInitialized$1(xt),"renderCursor",function(kt){var St=xt.state,Tt=St.isTooltipActive,At=St.activeCoordinate,Et=St.activePayload,$t=St.offset,Dt=St.activeTooltipIndex,jt=St.tooltipAxisBandSize,Pt=xt.getTooltipEventType();if(!kt||!kt.props.cursor||!Tt||!At||rt!=="ScatterChart"&&Pt!=="axis")return null;var Ct=xt.props.layout,wt,It=Curve;if(rt==="ScatterChart")wt=At,It=Cross;else if(rt==="BarChart")wt=getCursorRectangle(Ct,At,$t,jt),It=Rectangle;else if(Ct==="radial"){var Ot=getRadialCursorPoints(At),Wt=Ot.cx,zt=Ot.cy,Ft=Ot.radius,Nt=Ot.startAngle,Ut=Ot.endAngle;wt={cx:Wt,cy:zt,startAngle:Nt,endAngle:Ut,innerRadius:Ft,outerRadius:Ft},It=Sector}else wt={points:getCursorPoints(Ct,At,$t)},It=Curve;var Mt=kt.key||"_recharts-cursor",Ht=_objectSpread$1(_objectSpread$1(_objectSpread$1(_objectSpread$1({stroke:"#ccc",pointerEvents:"none"},$t),wt),filterProps(kt.props.cursor)),{},{payload:Et,payloadIndex:Dt,key:Mt,className:"recharts-tooltip-cursor"});return reactExports.isValidElement(kt.props.cursor)?reactExports.cloneElement(kt.props.cursor,Ht):reactExports.createElement(It,Ht)}),_defineProperty$1(_assertThisInitialized$1(xt),"renderPolarAxis",function(kt,St,Tt){var At=_get(kt,"type.axisType"),Et=_get(xt.state,"".concat(At,"Map")),$t=Et&&Et[kt.props["".concat(At,"Id")]];return reactExports.cloneElement(kt,_objectSpread$1(_objectSpread$1({},$t),{},{className:At,key:kt.key||"".concat(St,"-").concat(Tt),ticks:getTicksOfAxis($t,!0)}))}),_defineProperty$1(_assertThisInitialized$1(xt),"renderXAxis",function(kt,St,Tt){var At=xt.state.xAxisMap,Et=At[kt.props.xAxisId];return xt.renderAxis(Et,kt,St,Tt)}),_defineProperty$1(_assertThisInitialized$1(xt),"renderYAxis",function(kt,St,Tt){var At=xt.state.yAxisMap,Et=At[kt.props.yAxisId];return xt.renderAxis(Et,kt,St,Tt)}),_defineProperty$1(_assertThisInitialized$1(xt),"renderGrid",function(kt){var St=xt.state,Tt=St.xAxisMap,At=St.yAxisMap,Et=St.offset,$t=xt.props,Dt=$t.width,jt=$t.height,Pt=getAnyElementOfObject(Tt),Ct=_find(At,function(Ot){return _every(Ot.domain,isFinit)}),wt=Ct||getAnyElementOfObject(At),It=kt.props||{};return reactExports.cloneElement(kt,{key:kt.key||"grid",x:isNumber(It.x)?It.x:Et.left,y:isNumber(It.y)?It.y:Et.top,width:isNumber(It.width)?It.width:Et.width,height:isNumber(It.height)?It.height:Et.height,xAxis:Pt,yAxis:wt,offset:Et,chartWidth:Dt,chartHeight:jt,verticalCoordinatesGenerator:It.verticalCoordinatesGenerator||xt.verticalCoordinatesGenerator,horizontalCoordinatesGenerator:It.horizontalCoordinatesGenerator||xt.horizontalCoordinatesGenerator})}),_defineProperty$1(_assertThisInitialized$1(xt),"renderPolarGrid",function(kt){var St=kt.props,Tt=St.radialLines,At=St.polarAngles,Et=St.polarRadius,$t=xt.state,Dt=$t.radiusAxisMap,jt=$t.angleAxisMap,Pt=getAnyElementOfObject(Dt),Ct=getAnyElementOfObject(jt),wt=Ct.cx,It=Ct.cy,Ot=Ct.innerRadius,Wt=Ct.outerRadius;return reactExports.cloneElement(kt,{polarAngles:_isArray$1(At)?At:getTicksOfAxis(Ct,!0).map(function(zt){return zt.coordinate}),polarRadius:_isArray$1(Et)?Et:getTicksOfAxis(Pt,!0).map(function(zt){return zt.coordinate}),cx:wt,cy:It,innerRadius:Ot,outerRadius:Wt,key:kt.key||"polar-grid",radialLines:Tt})}),_defineProperty$1(_assertThisInitialized$1(xt),"renderLegend",function(){var kt=xt.state.formattedGraphicalItems,St=xt.props,Tt=St.children,At=St.width,Et=St.height,$t=xt.props.margin||{},Dt=At-($t.left||0)-($t.right||0),jt=getLegendProps({children:Tt,formattedGraphicalItems:kt,legendWidth:Dt,legendContent:ut});if(!jt)return null;var Pt=jt.item,Ct=_objectWithoutProperties(jt,_excluded);return reactExports.cloneElement(Pt,_objectSpread$1(_objectSpread$1({},Ct),{},{chartWidth:At,chartHeight:Et,margin:$t,onBBoxUpdate:xt.handleLegendBBoxUpdate}))}),_defineProperty$1(_assertThisInitialized$1(xt),"renderTooltip",function(){var kt=xt.props.children,St=findChildByType(kt,Tooltip);if(!St)return null;var Tt=xt.state,At=Tt.isTooltipActive,Et=Tt.activeCoordinate,$t=Tt.activePayload,Dt=Tt.activeLabel,jt=Tt.offset;return reactExports.cloneElement(St,{viewBox:_objectSpread$1(_objectSpread$1({},jt),{},{x:jt.left,y:jt.top}),active:At,label:Dt,payload:At?$t:[],coordinate:Et})}),_defineProperty$1(_assertThisInitialized$1(xt),"renderBrush",function(kt){var St=xt.props,Tt=St.margin,At=St.data,Et=xt.state,$t=Et.offset,Dt=Et.dataStartIndex,jt=Et.dataEndIndex,Pt=Et.updateId;return reactExports.cloneElement(kt,{key:kt.key||"_recharts-brush",onChange:combineEventHandlers(xt.handleBrushChange,null,kt.props.onChange),data:At,x:isNumber(kt.props.x)?kt.props.x:$t.left,y:isNumber(kt.props.y)?kt.props.y:$t.top+$t.height+$t.brushBottom-(Tt.bottom||0),width:isNumber(kt.props.width)?kt.props.width:$t.width,startIndex:Dt,endIndex:jt,updateId:"brush-".concat(Pt)})}),_defineProperty$1(_assertThisInitialized$1(xt),"renderReferenceElement",function(kt,St,Tt){if(!kt)return null;var At=_assertThisInitialized$1(xt),Et=At.clipPathId,$t=xt.state,Dt=$t.xAxisMap,jt=$t.yAxisMap,Pt=$t.offset,Ct=kt.props,wt=Ct.xAxisId,It=Ct.yAxisId;return reactExports.cloneElement(kt,{key:kt.key||"".concat(St,"-").concat(Tt),xAxis:Dt[wt],yAxis:jt[It],viewBox:{x:Pt.left,y:Pt.top,width:Pt.width,height:Pt.height},clipPathId:Et})}),_defineProperty$1(_assertThisInitialized$1(xt),"renderActivePoints",function(kt){var St=kt.item,Tt=kt.activePoint,At=kt.basePoint,Et=kt.childIndex,$t=kt.isRange,Dt=[],jt=St.props.key,Pt=St.item.props,Ct=Pt.activeDot,wt=Pt.dataKey,It=_objectSpread$1(_objectSpread$1({index:Et,dataKey:wt,cx:Tt.x,cy:Tt.y,r:4,fill:getMainColorOfGraphicItem(St.item),strokeWidth:2,stroke:"#fff",payload:Tt.payload,value:Tt.value,key:"".concat(jt,"-activePoint-").concat(Et)},filterProps(Ct)),adaptEventHandlers(Ct));return Dt.push(bt.renderActiveDot(Ct,It)),At?Dt.push(bt.renderActiveDot(Ct,_objectSpread$1(_objectSpread$1({},It),{},{cx:At.x,cy:At.y,key:"".concat(jt,"-basePoint-").concat(Et)}))):$t&&Dt.push(null),Dt}),_defineProperty$1(_assertThisInitialized$1(xt),"renderGraphicChild",function(kt,St,Tt){var At=xt.filterFormatItem(kt,St,Tt);if(!At)return null;var Et=xt.getTooltipEventType(),$t=xt.state,Dt=$t.isTooltipActive,jt=$t.tooltipAxis,Pt=$t.activeTooltipIndex,Ct=$t.activeLabel,wt=xt.props.children,It=findChildByType(wt,Tooltip),Ot=At.props,Wt=Ot.points,zt=Ot.isRange,Ft=Ot.baseLine,Nt=At.item.props,Ut=Nt.activeDot,Mt=Nt.hide,Ht=Nt.activeBar,en=Nt.activeShape,sn=!!(!Mt&&Dt&&It&&(Ut||Ht||en)),Kt={};Et!=="axis"&&It&&It.props.trigger==="click"?Kt={onClick:combineEventHandlers(xt.handleItemMouseEnter,null,kt.props.onCLick)}:Et!=="axis"&&(Kt={onMouseLeave:combineEventHandlers(xt.handleItemMouseLeave,null,kt.props.onMouseLeave),onMouseEnter:combineEventHandlers(xt.handleItemMouseEnter,null,kt.props.onMouseEnter)});var rn=reactExports.cloneElement(kt,_objectSpread$1(_objectSpread$1({},At.props),Kt));function nn(In){return typeof jt.dataKey=="function"?jt.dataKey(In.payload):null}if(sn)if(Pt>=0){var hn,vn;if(jt.dataKey&&!jt.allowDuplicatedCategory){var an=typeof jt.dataKey=="function"?nn:"payload.".concat(jt.dataKey.toString());hn=findEntryInArray(Wt,an,Ct),vn=zt&&Ft&&findEntryInArray(Ft,an,Ct)}else hn=Wt==null?void 0:Wt[Pt],vn=zt&&Ft&&Ft[Pt];if(en||Ht){var Qt=kt.props.activeIndex!==void 0?kt.props.activeIndex:Pt;return[reactExports.cloneElement(kt,_objectSpread$1(_objectSpread$1(_objectSpread$1({},At.props),Kt),{},{activeIndex:Qt})),null,null]}if(!_isNil(hn))return[rn].concat(_toConsumableArray$1(xt.renderActivePoints({item:At,activePoint:hn,basePoint:vn,childIndex:Pt,isRange:zt})))}else{var _n,Pn=(_n=xt.getItemByXY(xt.state.activeCoordinate))!==null&&_n!==void 0?_n:{graphicalItem:rn},$n=Pn.graphicalItem,Nn=$n.item,Tn=Nn===void 0?kt:Nn,cn=$n.childIndex,mn=_objectSpread$1(_objectSpread$1(_objectSpread$1({},At.props),Kt),{},{activeIndex:cn});return[reactExports.cloneElement(Tn,mn),null,null]}return zt?[rn,null,null]:[rn,null]}),_defineProperty$1(_assertThisInitialized$1(xt),"renderCustomized",function(kt,St,Tt){return reactExports.cloneElement(kt,_objectSpread$1(_objectSpread$1({key:"recharts-customized-".concat(Tt)},xt.props),xt.state))}),xt.uniqueChartId=_isNil(vt.id)?uniqueId("recharts"):vt.id,xt.clipPathId="".concat(xt.uniqueChartId,"-clip"),vt.throttleDelay&&(xt.triggeredAfterMouseMove=_throttle(xt.triggeredAfterMouseMove,vt.throttleDelay)),xt.state={},xt}return _createClass$1(bt,[{key:"componentDidMount",value:function(){var xt,kt;_isNil(this.props.syncId)||this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(xt=this.props.margin.left)!==null&&xt!==void 0?xt:0,top:(kt=this.props.margin.top)!==null&&kt!==void 0?kt:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.handleMouseMove,layout:this.props.layout})}},{key:"getSnapshotBeforeUpdate",value:function(xt,kt){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==kt.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==xt.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==xt.margin){var St,Tt;this.accessibilityManager.setDetails({offset:{left:(St=this.props.margin.left)!==null&&St!==void 0?St:0,top:(Tt=this.props.margin.top)!==null&&Tt!==void 0?Tt:0}})}return null}},{key:"componentDidUpdate",value:function(xt){_isNil(xt.syncId)&&!_isNil(this.props.syncId)&&this.addListener(),!_isNil(xt.syncId)&&_isNil(this.props.syncId)&&this.removeListener()}},{key:"componentWillUnmount",value:function(){this.clearDefer(),_isNil(this.props.syncId)||this.removeListener(),this.cancelThrottledTriggerAfterMouseMove()}},{key:"cancelThrottledTriggerAfterMouseMove",value:function(){typeof this.triggeredAfterMouseMove.cancel=="function"&&this.triggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var xt=findChildByType(this.props.children,Tooltip);if(xt&&_isBoolean(xt.props.shared)){var kt=xt.props.shared?"axis":"item";return lt.indexOf(kt)>=0?kt:at}return at}},{key:"getMouseInfo",value:function(xt){var kt;if(!this.container)return null;var St=getOffset(this.container),Tt=calculateChartCoordinate(xt,St),At=this.container,Et=At==null||(kt=At.getBoundingClientRect())===null||kt===void 0?void 0:kt.width,$t=At.offsetWidth,Dt=Et/$t||1,jt=this.inRange(Tt.chartX,Tt.chartY,Dt);if(!jt)return null;var Pt=this.state,Ct=Pt.xAxisMap,wt=Pt.yAxisMap,It=this.getTooltipEventType();if(It!=="axis"&&Ct&&wt){var Ot=getAnyElementOfObject(Ct).scale,Wt=getAnyElementOfObject(wt).scale,zt=Ot&&Ot.invert?Ot.invert(Tt.chartX):null,Ft=Wt&&Wt.invert?Wt.invert(Tt.chartY):null;return _objectSpread$1(_objectSpread$1({},Tt),{},{xValue:zt,yValue:Ft})}var Nt=getTooltipData(this.state,this.props.data,this.props.layout,jt);return Nt?_objectSpread$1(_objectSpread$1({},Tt),Nt):null}},{key:"inRange",value:function(xt,kt){var St=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Tt=this.props.layout,At=xt/St,Et=kt/St;if(Tt==="horizontal"||Tt==="vertical"){var $t=this.state.offset,Dt=At>=$t.left&&At<=$t.left+$t.width&&Et>=$t.top&&Et<=$t.top+$t.height;return Dt?{x:At,y:Et}:null}var jt=this.state,Pt=jt.angleAxisMap,Ct=jt.radiusAxisMap;if(Pt&&Ct){var wt=getAnyElementOfObject(Pt);return inRangeOfSector({x:At,y:Et},wt)}return null}},{key:"parseEventsOfWrapper",value:function(){var xt=this.props.children,kt=this.getTooltipEventType(),St=findChildByType(xt,Tooltip),Tt={};St&&kt==="axis"&&(St.props.trigger==="click"?Tt={onClick:this.handleClick}:Tt={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var At=adaptEventHandlers(this.props,this.handleOuterEvent);return _objectSpread$1(_objectSpread$1({},At),Tt)}},{key:"addListener",value:function(){eventCenter.on(SYNC_EVENT,this.handleReceiveSyncEvent),eventCenter.setMaxListeners&&eventCenter._maxListeners&&eventCenter.setMaxListeners(eventCenter._maxListeners+1)}},{key:"removeListener",value:function(){eventCenter.removeListener(SYNC_EVENT,this.handleReceiveSyncEvent),eventCenter.setMaxListeners&&eventCenter._maxListeners&&eventCenter.setMaxListeners(eventCenter._maxListeners-1)}},{key:"triggerSyncEvent",value:function(xt){var kt=this.props.syncId;_isNil(kt)||eventCenter.emit(SYNC_EVENT,kt,this.uniqueChartId,xt)}},{key:"applySyncEvent",value:function(xt){var kt=this.props,St=kt.layout,Tt=kt.syncMethod,At=this.state.updateId,Et=xt.dataStartIndex,$t=xt.dataEndIndex;if(!_isNil(xt.dataStartIndex)||!_isNil(xt.dataEndIndex))this.setState(_objectSpread$1({dataStartIndex:Et,dataEndIndex:$t},mt({props:this.props,dataStartIndex:Et,dataEndIndex:$t,updateId:At},this.state)));else if(_isNil(xt.activeTooltipIndex))this.setState(xt);else{var Dt=xt.chartX,jt=xt.chartY,Pt=xt.activeTooltipIndex,Ct=this.state,wt=Ct.offset,It=Ct.tooltipTicks;if(!wt)return;if(typeof Tt=="function")Pt=Tt(It,xt);else if(Tt==="value"){Pt=-1;for(var Ot=0;OtjsxRuntimeExports.jsx(Dot,{cx:tt,cy:et,fill:colors.blueTextAccent,r:2}),SentimentChart=({data:tt,width:et=500,height:nt=300})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:(tt==null?void 0:tt.length)&&jsxRuntimeExports.jsxs(LineChart,{data:tt,height:nt,id:"cy-sentiment-chart",margin:{bottom:5,left:-20,right:30,top:5},width:et,children:[jsxRuntimeExports.jsx(CartesianGrid,{stroke:colors.lightBlue300,strokeDasharray:"5 5"}),jsxRuntimeExports.jsx(XAxis,{dataKey:"date",interval:Math.floor(tt.length/3),stroke:colors.blueTextAccent}),jsxRuntimeExports.jsx(YAxis,{domain:[0,10],stroke:colors.blueTextAccent}),jsxRuntimeExports.jsx(Tooltip,{}),jsxRuntimeExports.jsx(Line,{dataKey:"score",dot:jsxRuntimeExports.jsx(RenderDot$1,{}),stroke:"#8884d8",type:"monotone"})]})}),SentimentAnalysis=reactExports.memo(()=>{const tt=useAppStore(mt=>mt.currentSearch),[et,nt]=reactExports.useState(void 0),rt=hooks().startOf("day"),it=hooks().subtract(1,"year"),ot=3600*24,[at]=useUserStore(mt=>[mt.setBudget]),[st,lt]=reactExports.useState(hooks().startOf("day").subtract(20,"day")),ct=(Math.round((rt.unix()-st.unix())/ot)+1)*50,[ut,ht]=reactExports.useState(!1),dt=async()=>{tt&&(ht(!0),await executeIfProd(()=>distExports$1.enable()),getSentimentData({topic:tt,cutoff_date:String(st.unix())}).then(async mt=>{console.log(mt==null?void 0:mt.data),nt(mt==null?void 0:mt.data.filter(gt=>gt.date).map(gt=>({date:hooks.unix(Number(String(gt.date).split(".")[0])).format("MM/DD/YY"),score:gt.sentiment_score}))),await updateBudget(at)}).catch(console.error).finally(()=>{ht(!1)}))},pt=reactExports.useRef(null);return jsxRuntimeExports.jsxs(Stack$5,{component:"div",flexGrow:1,p:1,spacing:2,width:"100%",children:[ut&&jsxRuntimeExports.jsx(Stack$5,{alignItems:"center",component:"div",flexGrow:1,p:4,spacing:2,width:"100%",children:jsxRuntimeExports.jsx(PropagateLoader,{color:colors.white})}),!ut&&jsxRuntimeExports.jsxs(ChartWrapper$1,{ref:pt,children:[jsxRuntimeExports.jsx(SentimentChart,{data:et,height:280,width:352}),Array.isArray(et)&&!ut&&!et.length&&jsxRuntimeExports.jsx(Text$3,{children:"No data for this period"})]}),jsxRuntimeExports.jsx(DatePicker,{format:"L",label:"From",maxDate:rt,minDate:it,onChange:mt=>lt(mt??hooks()),sx:{background:colors.inputBg1,color:"text.primary"},value:st}),jsxRuntimeExports.jsx(Slider$1,{component:"div",getAriaValueText:mt=>hooks(mt).format("L"),id:"cy-sentiment-analysis-slider",marks:!0,max:rt.unix(),min:it.unix(),onChange:(mt,gt)=>{lt(hooks.unix(gt))},step:ot,value:st.unix(),valueLabelDisplay:"auto",valueLabelFormat:mt=>hooks.unix(mt).format("L")}),jsxRuntimeExports.jsxs(StyledButton$1,{className:"button",id:"cy-get-sentiment-analysis-btn",onClick:dt,children:["Create a chart for ",ct.toFixed()," SATS"]})]})}),ChartWrapper$1=styled$4.div` flex: 1 1 auto; 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(vt=>vt.data),[et,nt]=reactExports.useState(""),[rt,it]=reactExports.useState("Beginner"),ot=useAppStore(vt=>vt.currentSearch),at=reactExports.useRef(!1),st=useSocket(),[lt,ct,ut,ht,dt]=useTeachStore(vt=>[vt.askedQuestions,vt.askedQuestionsAnswers,vt.setAskedQuestion,vt.setAskedQuestionAnswer,vt.hasQuestionInProgress]),pt=reactExports.useCallback(vt=>{ht(vt.answer),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"Response is ready"}),{position:toast.POSITION.BOTTOM_CENTER,type:"success"})},[ht]);reactExports.useEffect(()=>{at.current||pt&&st&&(st.on("askquestionhook",pt),at.current=!0)},[pt,st]);const mt=async()=>{et&&(ut(et),nt(""));try{const vt=tt==null?void 0:tt.nodes.filter(St=>St.text),xt=vt==null?void 0:vt.slice(0,5),kt=(xt!=null&&xt.length?xt.map(St=>St.text).join(" "):"").substring(0,2500).replace(/[?&=+/#]/g,St=>`\\${St}`);ot&&(await distExports$1.enable(),await postAskQuestion({expertise_level:rt,question_text:et,search_term:ot,transcripts:kt}),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"We started preparing response for you"}),{type:"success"}))}catch(vt){console.error(vt)}},gt=rt&&et.trim()&&!dt,yt=vt=>{it(vt.target.value)},bt=async vt=>{if(dt){vt.preventDefault();return}vt.keyCode===13&&vt.shiftKey===!1&>&&(vt.preventDefault(),mt())};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:yt,size:"small",value:rt,children:names.map(vt=>jsxRuntimeExports.jsx(MenuItem$1,{component:"li",value:vt,children:vt},vt))})]})})}),jsxRuntimeExports.jsx(ResponsesWrapper,{children:lt==null?void 0:lt.map((vt,xt)=>jsxRuntimeExports.jsxs(Flex,{className:"response",py:12,children:[jsxRuntimeExports.jsx(Text$3,{kind:"medium",children:vt}),jsxRuntimeExports.jsx(Flex,{py:12,children:(ct==null?void 0:ct[xt])!==void 0?jsxRuntimeExports.jsx(Text$3,{color:"unreadMsgText",children:ct[xt]}):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"})})]})})]},vt))}),jsxRuntimeExports.jsxs(TextAreaWrapper,{onKeyDown:bt,py:12,tabIndex:-1,children:[jsxRuntimeExports.jsx(StyledTextarea,{disabled:dt,onChange:vt=>nt(vt.target.value),placeholder:"Enter your question",value:et}),jsxRuntimeExports.jsx(IconWrapper$1,{children:jsxRuntimeExports.jsx(MdSend,{color:gt?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$1,{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}; @@ -7392,7 +7433,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho .response { border-bottom: 1px solid ${colors.divider2}; } -`,emptyValue={},HelperContext=reactExports.createContext(emptyValue),useHelper=()=>reactExports.useContext(HelperContext);function cc(tt){if(typeof tt=="string"||typeof tt=="number")return""+tt;let et="";if(Array.isArray(tt))for(let nt=0,rt;nt{const nt=createStore$3(tt),rt=(it,ot=et)=>useStoreWithEqualityFn(nt,it,ot);return Object.assign(rt,nt),rt},createWithEqualityFn=(tt,et)=>tt?createWithEqualityFnImpl(tt,et):createWithEqualityFnImpl;function shallow$1(tt,et){if(Object.is(tt,et))return!0;if(typeof tt!="object"||tt===null||typeof et!="object"||et===null)return!1;if(tt instanceof Map&&et instanceof Map){if(tt.size!==et.size)return!1;for(const[rt,it]of tt)if(!Object.is(it,et.get(rt)))return!1;return!0}if(tt instanceof Set&&et instanceof Set){if(tt.size!==et.size)return!1;for(const rt of tt)if(!et.has(rt))return!1;return!0}const nt=Object.keys(tt);if(nt.length!==Object.keys(et).length)return!1;for(let rt=0;rt=0&&(et=tt.slice(0,nt))!=="xmlns"&&(tt=tt.slice(nt+1)),namespaces.hasOwnProperty(et)?{space:namespaces[et],local:tt}:tt}function creatorInherit(tt){return function(){var et=this.ownerDocument,nt=this.namespaceURI;return nt===xhtml&&et.documentElement.namespaceURI===xhtml?et.createElement(tt):et.createElementNS(nt,tt)}}function creatorFixed(tt){return function(){return this.ownerDocument.createElementNS(tt.space,tt.local)}}function creator(tt){var et=namespace(tt);return(et.local?creatorFixed:creatorInherit)(et)}function none(){}function selector(tt){return tt==null?none:function(){return this.querySelector(tt)}}function selection_select(tt){typeof tt!="function"&&(tt=selector(tt));for(var et=this._groups,nt=et.length,rt=new Array(nt),it=0;it=xt&&(xt=vt+1);!(St=yt[xt])&&++xt=0;)(at=rt[it])&&(ot&&at.compareDocumentPosition(ot)^4&&ot.parentNode.insertBefore(at,ot),ot=at);return this}function selection_sort(tt){tt||(tt=ascending);function et(ht,dt){return ht&&dt?tt(ht.__data__,dt.__data__):!ht-!dt}for(var nt=this._groups,rt=nt.length,it=new Array(rt),ot=0;otet?1:tt>=et?0:NaN}function selection_call(){var tt=arguments[0];return arguments[0]=this,tt.apply(null,arguments),this}function selection_nodes(){return Array.from(this)}function selection_node(){for(var tt=this._groups,et=0,nt=tt.length;et1?this.each((et==null?styleRemove$1:typeof et=="function"?styleFunction$1:styleConstant$1)(tt,et,nt??"")):styleValue(this.node(),tt)}function styleValue(tt,et){return tt.style.getPropertyValue(et)||defaultView(tt).getComputedStyle(tt,null).getPropertyValue(et)}function propertyRemove(tt){return function(){delete this[tt]}}function propertyConstant(tt,et){return function(){this[tt]=et}}function propertyFunction(tt,et){return function(){var nt=et.apply(this,arguments);nt==null?delete this[tt]:this[tt]=nt}}function selection_property(tt,et){return arguments.length>1?this.each((et==null?propertyRemove:typeof et=="function"?propertyFunction:propertyConstant)(tt,et)):this.node()[tt]}function classArray(tt){return tt.trim().split(/^|\s+/)}function classList(tt){return tt.classList||new ClassList(tt)}function ClassList(tt){this._node=tt,this._names=classArray(tt.getAttribute("class")||"")}ClassList.prototype={add:function(tt){var et=this._names.indexOf(tt);et<0&&(this._names.push(tt),this._node.setAttribute("class",this._names.join(" ")))},remove:function(tt){var et=this._names.indexOf(tt);et>=0&&(this._names.splice(et,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(tt){return this._names.indexOf(tt)>=0}};function classedAdd(tt,et){for(var nt=classList(tt),rt=-1,it=et.length;++rt=0&&(nt=et.slice(rt+1),et=et.slice(0,rt)),{type:et,name:nt}})}function onRemove(tt){return function(){var et=this.__on;if(et){for(var nt=0,rt=-1,it=et.length,ot;nt()=>tt;function DragEvent(tt,{sourceEvent:et,subject:nt,target:rt,identifier:it,active:ot,x:at,y:st,dx:lt,dy:ct,dispatch:ut}){Object.defineProperties(this,{type:{value:tt,enumerable:!0,configurable:!0},sourceEvent:{value:et,enumerable:!0,configurable:!0},subject:{value:nt,enumerable:!0,configurable:!0},target:{value:rt,enumerable:!0,configurable:!0},identifier:{value:it,enumerable:!0,configurable:!0},active:{value:ot,enumerable:!0,configurable:!0},x:{value:at,enumerable:!0,configurable:!0},y:{value:st,enumerable:!0,configurable:!0},dx:{value:lt,enumerable:!0,configurable:!0},dy:{value:ct,enumerable:!0,configurable:!0},_:{value:ut}})}DragEvent.prototype.on=function(){var tt=this._.on.apply(this._,arguments);return tt===this._?this:tt};function defaultFilter$1(tt){return!tt.ctrlKey&&!tt.button}function defaultContainer(){return this.parentNode}function defaultSubject(tt,et){return et??{x:tt.x,y:tt.y}}function defaultTouchable$1(){return navigator.maxTouchPoints||"ontouchstart"in this}function drag(){var tt=defaultFilter$1,et=defaultContainer,nt=defaultSubject,rt=defaultTouchable$1,it={},ot=dispatch("start","drag","end"),at=0,st,lt,ct,ut,ht=0;function dt(kt){kt.on("mousedown.drag",pt).filter(rt).on("touchstart.drag",yt).on("touchmove.drag",bt,nonpassive).on("touchend.drag touchcancel.drag",vt).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function pt(kt,St){if(!(ut||!tt.call(this,kt,St))){var Tt=xt(this,et.call(this,kt,St),kt,St,"mouse");Tt&&(select(kt.view).on("mousemove.drag",mt,nonpassivecapture).on("mouseup.drag",gt,nonpassivecapture),dragDisable(kt.view),nopropagation$1(kt),ct=!1,st=kt.clientX,lt=kt.clientY,Tt("start",kt))}}function mt(kt){if(noevent$1(kt),!ct){var St=kt.clientX-st,Tt=kt.clientY-lt;ct=St*St+Tt*Tt>ht}it.mouse("drag",kt)}function gt(kt){select(kt.view).on("mousemove.drag mouseup.drag",null),yesdrag(kt.view,ct),noevent$1(kt),it.mouse("end",kt)}function yt(kt,St){if(tt.call(this,kt,St)){var Tt=kt.changedTouches,At=et.call(this,kt,St),Et=Tt.length,$t,Dt;for($t=0;$tCREATED)throw new Error("too late; already scheduled");return nt}function set(tt,et){var nt=get(tt,et);if(nt.state>STARTED)throw new Error("too late; already running");return nt}function get(tt,et){var nt=tt.__transition;if(!nt||!(nt=nt[et]))throw new Error("transition not found");return nt}function create(tt,et,nt){var rt=tt.__transition,it;rt[et]=nt,nt.timer=timer$1(ot,0,nt.time);function ot(ct){nt.state=SCHEDULED,nt.timer.restart(at,nt.delay,nt.time),nt.delay<=ct&&at(ct-nt.delay)}function at(ct){var ut,ht,dt,pt;if(nt.state!==SCHEDULED)return lt();for(ut in rt)if(pt=rt[ut],pt.name===nt.name){if(pt.state===STARTED)return timeout(at);pt.state===RUNNING?(pt.state=ENDED,pt.timer.stop(),pt.on.call("interrupt",tt,tt.__data__,pt.index,pt.group),delete rt[ut]):+utSTARTING&&rt.state=0&&(et=et.slice(0,nt)),!et||et==="start"})}function onFunction(tt,et,nt){var rt,it,ot=start(et)?init:set;return function(){var at=ot(this,tt),st=at.on;st!==rt&&(it=(rt=st).copy()).on(et,nt),at.on=it}}function transition_on(tt,et){var nt=this._id;return arguments.length<2?get(this.node(),nt).on.on(tt):this.each(onFunction(nt,tt,et))}function removeFunction(tt){return function(){var et=this.parentNode;for(var nt in this.__transition)if(+nt!==tt)return;et&&et.removeChild(this)}}function transition_remove(){return this.on("end.remove",removeFunction(this._id))}function transition_select(tt){var et=this._name,nt=this._id;typeof tt!="function"&&(tt=selector(tt));for(var rt=this._groups,it=rt.length,ot=new Array(it),at=0;at()=>tt;function ZoomEvent(tt,{sourceEvent:et,target:nt,transform:rt,dispatch:it}){Object.defineProperties(this,{type:{value:tt,enumerable:!0,configurable:!0},sourceEvent:{value:et,enumerable:!0,configurable:!0},target:{value:nt,enumerable:!0,configurable:!0},transform:{value:rt,enumerable:!0,configurable:!0},_:{value:it}})}function Transform(tt,et,nt){this.k=tt,this.x=et,this.y=nt}Transform.prototype={constructor:Transform,scale:function(tt){return tt===1?this:new Transform(this.k*tt,this.x,this.y)},translate:function(tt,et){return tt===0&et===0?this:new Transform(this.k,this.x+this.k*tt,this.y+this.k*et)},apply:function(tt){return[tt[0]*this.k+this.x,tt[1]*this.k+this.y]},applyX:function(tt){return tt*this.k+this.x},applyY:function(tt){return tt*this.k+this.y},invert:function(tt){return[(tt[0]-this.x)/this.k,(tt[1]-this.y)/this.k]},invertX:function(tt){return(tt-this.x)/this.k},invertY:function(tt){return(tt-this.y)/this.k},rescaleX:function(tt){return tt.copy().domain(tt.range().map(this.invertX,this).map(tt.invert,tt))},rescaleY:function(tt){return tt.copy().domain(tt.range().map(this.invertY,this).map(tt.invert,tt))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var identity=new Transform(1,0,0);Transform.prototype;function nopropagation(tt){tt.stopImmediatePropagation()}function noevent(tt){tt.preventDefault(),tt.stopImmediatePropagation()}function defaultFilter(tt){return(!tt.ctrlKey||tt.type==="wheel")&&!tt.button}function defaultExtent(){var tt=this;return tt instanceof SVGElement?(tt=tt.ownerSVGElement||tt,tt.hasAttribute("viewBox")?(tt=tt.viewBox.baseVal,[[tt.x,tt.y],[tt.x+tt.width,tt.y+tt.height]]):[[0,0],[tt.width.baseVal.value,tt.height.baseVal.value]]):[[0,0],[tt.clientWidth,tt.clientHeight]]}function defaultTransform(){return this.__zoom||identity}function defaultWheelDelta(tt){return-tt.deltaY*(tt.deltaMode===1?.05:tt.deltaMode?1:.002)*(tt.ctrlKey?10:1)}function defaultTouchable(){return navigator.maxTouchPoints||"ontouchstart"in this}function defaultConstrain(tt,et,nt){var rt=tt.invertX(et[0][0])-nt[0][0],it=tt.invertX(et[1][0])-nt[1][0],ot=tt.invertY(et[0][1])-nt[0][1],at=tt.invertY(et[1][1])-nt[1][1];return tt.translate(it>rt?(rt+it)/2:Math.min(0,rt)||Math.max(0,it),at>ot?(ot+at)/2:Math.min(0,ot)||Math.max(0,at))}function zoom(){var tt=defaultFilter,et=defaultExtent,nt=defaultConstrain,rt=defaultWheelDelta,it=defaultTouchable,ot=[0,1/0],at=[[-1/0,-1/0],[1/0,1/0]],st=250,lt=interpolateZoom,ct=dispatch("start","zoom","end"),ut,ht,dt,pt=500,mt=150,gt=0,yt=10;function bt(wt){wt.property("__zoom",defaultTransform).on("wheel.zoom",Et,{passive:!1}).on("mousedown.zoom",$t).on("dblclick.zoom",Dt).filter(it).on("touchstart.zoom",jt).on("touchmove.zoom",Pt).on("touchend.zoom touchcancel.zoom",Ct).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}bt.transform=function(wt,It,Ot,Wt){var zt=wt.selection?wt.selection():wt;zt.property("__zoom",defaultTransform),wt!==zt?St(wt,It,Ot,Wt):zt.interrupt().each(function(){Tt(this,arguments).event(Wt).start().zoom(null,typeof It=="function"?It.apply(this,arguments):It).end()})},bt.scaleBy=function(wt,It,Ot,Wt){bt.scaleTo(wt,function(){var zt=this.__zoom.k,Ft=typeof It=="function"?It.apply(this,arguments):It;return zt*Ft},Ot,Wt)},bt.scaleTo=function(wt,It,Ot,Wt){bt.transform(wt,function(){var zt=et.apply(this,arguments),Ft=this.__zoom,Nt=Ot==null?kt(zt):typeof Ot=="function"?Ot.apply(this,arguments):Ot,Ut=Ft.invert(Nt),Mt=typeof It=="function"?It.apply(this,arguments):It;return nt(xt(vt(Ft,Mt),Nt,Ut),zt,at)},Ot,Wt)},bt.translateBy=function(wt,It,Ot,Wt){bt.transform(wt,function(){return nt(this.__zoom.translate(typeof It=="function"?It.apply(this,arguments):It,typeof Ot=="function"?Ot.apply(this,arguments):Ot),et.apply(this,arguments),at)},null,Wt)},bt.translateTo=function(wt,It,Ot,Wt,zt){bt.transform(wt,function(){var Ft=et.apply(this,arguments),Nt=this.__zoom,Ut=Wt==null?kt(Ft):typeof Wt=="function"?Wt.apply(this,arguments):Wt;return nt(identity.translate(Ut[0],Ut[1]).scale(Nt.k).translate(typeof It=="function"?-It.apply(this,arguments):-It,typeof Ot=="function"?-Ot.apply(this,arguments):-Ot),Ft,at)},Wt,zt)};function vt(wt,It){return It=Math.max(ot[0],Math.min(ot[1],It)),It===wt.k?wt:new Transform(It,wt.x,wt.y)}function xt(wt,It,Ot){var Wt=It[0]-Ot[0]*wt.k,zt=It[1]-Ot[1]*wt.k;return Wt===wt.x&&zt===wt.y?wt:new Transform(wt.k,Wt,zt)}function kt(wt){return[(+wt[0][0]+ +wt[1][0])/2,(+wt[0][1]+ +wt[1][1])/2]}function St(wt,It,Ot,Wt){wt.on("start.zoom",function(){Tt(this,arguments).event(Wt).start()}).on("interrupt.zoom end.zoom",function(){Tt(this,arguments).event(Wt).end()}).tween("zoom",function(){var zt=this,Ft=arguments,Nt=Tt(zt,Ft).event(Wt),Ut=et.apply(zt,Ft),Mt=Ot==null?kt(Ut):typeof Ot=="function"?Ot.apply(zt,Ft):Ot,Ht=Math.max(Ut[1][0]-Ut[0][0],Ut[1][1]-Ut[0][1]),en=zt.__zoom,sn=typeof It=="function"?It.apply(zt,Ft):It,Kt=lt(en.invert(Mt).concat(Ht/en.k),sn.invert(Mt).concat(Ht/sn.k));return function(rn){if(rn===1)rn=sn;else{var nn=Kt(rn),hn=Ht/nn[2];rn=new Transform(hn,Mt[0]-nn[0]*hn,Mt[1]-nn[1]*hn)}Nt.zoom(null,rn)}})}function Tt(wt,It,Ot){return!Ot&&wt.__zooming||new At(wt,It)}function At(wt,It){this.that=wt,this.args=It,this.active=0,this.sourceEvent=null,this.extent=et.apply(wt,It),this.taps=0}At.prototype={event:function(wt){return wt&&(this.sourceEvent=wt),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(wt,It){return this.mouse&&wt!=="mouse"&&(this.mouse[1]=It.invert(this.mouse[0])),this.touch0&&wt!=="touch"&&(this.touch0[1]=It.invert(this.touch0[0])),this.touch1&&wt!=="touch"&&(this.touch1[1]=It.invert(this.touch1[0])),this.that.__zoom=It,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(wt){var It=select(this.that).datum();ct.call(wt,this.that,new ZoomEvent(wt,{sourceEvent:this.sourceEvent,target:bt,type:wt,transform:this.that.__zoom,dispatch:ct}),It)}};function Et(wt,...It){if(!tt.apply(this,arguments))return;var Ot=Tt(this,It).event(wt),Wt=this.__zoom,zt=Math.max(ot[0],Math.min(ot[1],Wt.k*Math.pow(2,rt.apply(this,arguments)))),Ft=pointer(wt);if(Ot.wheel)(Ot.mouse[0][0]!==Ft[0]||Ot.mouse[0][1]!==Ft[1])&&(Ot.mouse[1]=Wt.invert(Ot.mouse[0]=Ft)),clearTimeout(Ot.wheel);else{if(Wt.k===zt)return;Ot.mouse=[Ft,Wt.invert(Ft)],interrupt(this),Ot.start()}noevent(wt),Ot.wheel=setTimeout(Nt,mt),Ot.zoom("mouse",nt(xt(vt(Wt,zt),Ot.mouse[0],Ot.mouse[1]),Ot.extent,at));function Nt(){Ot.wheel=null,Ot.end()}}function $t(wt,...It){if(dt||!tt.apply(this,arguments))return;var Ot=wt.currentTarget,Wt=Tt(this,It,!0).event(wt),zt=select(wt.view).on("mousemove.zoom",Mt,!0).on("mouseup.zoom",Ht,!0),Ft=pointer(wt,Ot),Nt=wt.clientX,Ut=wt.clientY;dragDisable(wt.view),nopropagation(wt),Wt.mouse=[Ft,this.__zoom.invert(Ft)],interrupt(this),Wt.start();function Mt(en){if(noevent(en),!Wt.moved){var sn=en.clientX-Nt,Kt=en.clientY-Ut;Wt.moved=sn*sn+Kt*Kt>gt}Wt.event(en).zoom("mouse",nt(xt(Wt.that.__zoom,Wt.mouse[0]=pointer(en,Ot),Wt.mouse[1]),Wt.extent,at))}function Ht(en){zt.on("mousemove.zoom mouseup.zoom",null),yesdrag(en.view,Wt.moved),noevent(en),Wt.event(en).end()}}function Dt(wt,...It){if(tt.apply(this,arguments)){var Ot=this.__zoom,Wt=pointer(wt.changedTouches?wt.changedTouches[0]:wt,this),zt=Ot.invert(Wt),Ft=Ot.k*(wt.shiftKey?.5:2),Nt=nt(xt(vt(Ot,Ft),Wt,zt),et.apply(this,It),at);noevent(wt),st>0?select(this).transition().duration(st).call(St,Nt,Wt,wt):select(this).call(bt.transform,Nt,Wt,wt)}}function jt(wt,...It){if(tt.apply(this,arguments)){var Ot=wt.touches,Wt=Ot.length,zt=Tt(this,It,wt.changedTouches.length===Wt).event(wt),Ft,Nt,Ut,Mt;for(nopropagation(wt),Nt=0;Nt"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:tt=>`Node type "${tt}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:tt=>`The old edge with id=${tt} does not exist.`,error009:tt=>`Marker type "${tt}" doesn't exist.`,error008:(tt,et)=>`Couldn't create edge for ${tt?"target":"source"} handle id: "${tt?et.targetHandle:et.sourceHandle}", edge id: ${et.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:tt=>`Edge type "${tt}" not found. Using fallback type "default".`,error012:tt=>`Node with id "${tt}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},zustandErrorMessage=errorMessages.error001();function useStore(tt,et){const nt=reactExports.useContext(StoreContext);if(nt===null)throw new Error(zustandErrorMessage);return useStoreWithEqualityFn(nt,tt,et)}const useStoreApi=()=>{const tt=reactExports.useContext(StoreContext);if(tt===null)throw new Error(zustandErrorMessage);return reactExports.useMemo(()=>({getState:tt.getState,setState:tt.setState,subscribe:tt.subscribe,destroy:tt.destroy}),[tt])},selector$g=tt=>tt.userSelectionActive?"none":"all";function Panel({position:tt,children:et,className:nt,style:rt,...it}){const ot=useStore(selector$g),at=`${tt}`.split("-");return React$1.createElement("div",{className:cc(["react-flow__panel",nt,...at]),style:{...rt,pointerEvents:ot},...it},et)}function Attribution({proOptions:tt,position:et="bottom-right"}){return tt!=null&&tt.hideAttribution?null:React$1.createElement(Panel,{position:et,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev"},React$1.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const EdgeText=({x:tt,y:et,label:nt,labelStyle:rt={},labelShowBg:it=!0,labelBgStyle:ot={},labelBgPadding:at=[2,4],labelBgBorderRadius:st=2,children:lt,className:ct,...ut})=>{const ht=reactExports.useRef(null),[dt,pt]=reactExports.useState({x:0,y:0,width:0,height:0}),mt=cc(["react-flow__edge-textwrapper",ct]);return reactExports.useEffect(()=>{if(ht.current){const gt=ht.current.getBBox();pt({x:gt.x,y:gt.y,width:gt.width,height:gt.height})}},[nt]),typeof nt>"u"||!nt?null:React$1.createElement("g",{transform:`translate(${tt-dt.width/2} ${et-dt.height/2})`,className:mt,visibility:dt.width?"visible":"hidden",...ut},it&&React$1.createElement("rect",{width:dt.width+2*at[0],x:-at[0],y:-at[1],height:dt.height+2*at[1],className:"react-flow__edge-textbg",style:ot,rx:st,ry:st}),React$1.createElement("text",{className:"react-flow__edge-text",y:dt.height/2,dy:"0.3em",ref:ht,style:rt},nt),lt)};var EdgeText$1=reactExports.memo(EdgeText);const getDimensions=tt=>({width:tt.offsetWidth,height:tt.offsetHeight}),clamp=(tt,et=0,nt=1)=>Math.min(Math.max(tt,et),nt),clampPosition=(tt={x:0,y:0},et)=>({x:clamp(tt.x,et[0][0],et[1][0]),y:clamp(tt.y,et[0][1],et[1][1])}),calcAutoPanVelocity=(tt,et,nt)=>ttnt?-clamp(Math.abs(tt-nt),1,50)/50:0,calcAutoPan=(tt,et)=>{const nt=calcAutoPanVelocity(tt.x,35,et.width-35)*20,rt=calcAutoPanVelocity(tt.y,35,et.height-35)*20;return[nt,rt]},getHostForElement=tt=>{var et;return((et=tt.getRootNode)==null?void 0:et.call(tt))||(window==null?void 0:window.document)},getBoundsOfBoxes=(tt,et)=>({x:Math.min(tt.x,et.x),y:Math.min(tt.y,et.y),x2:Math.max(tt.x2,et.x2),y2:Math.max(tt.y2,et.y2)}),rectToBox=({x:tt,y:et,width:nt,height:rt})=>({x:tt,y:et,x2:tt+nt,y2:et+rt}),boxToRect=({x:tt,y:et,x2:nt,y2:rt})=>({x:tt,y:et,width:nt-tt,height:rt-et}),nodeToRect=tt=>({...tt.positionAbsolute||{x:0,y:0},width:tt.width||0,height:tt.height||0}),getOverlappingArea=(tt,et)=>{const nt=Math.max(0,Math.min(tt.x+tt.width,et.x+et.width)-Math.max(tt.x,et.x)),rt=Math.max(0,Math.min(tt.y+tt.height,et.y+et.height)-Math.max(tt.y,et.y));return Math.ceil(nt*rt)},isRectObject=tt=>isNumeric(tt.width)&&isNumeric(tt.height)&&isNumeric(tt.x)&&isNumeric(tt.y),isNumeric=tt=>!isNaN(tt)&&isFinite(tt),internalsSymbol=Symbol.for("internals"),elementSelectionKeys=["Enter"," ","Escape"],devWarn=(tt,et)=>{},isReactKeyboardEvent=tt=>"nativeEvent"in tt;function isInputDOMNode(tt){var it,ot;const et=isReactKeyboardEvent(tt)?tt.nativeEvent:tt,nt=((ot=(it=et.composedPath)==null?void 0:it.call(et))==null?void 0:ot[0])||tt.target;return["INPUT","SELECT","TEXTAREA"].includes(nt==null?void 0:nt.nodeName)||(nt==null?void 0:nt.hasAttribute("contenteditable"))||!!(nt!=null&&nt.closest(".nokey"))}const isMouseEvent=tt=>"clientX"in tt,getEventPosition=(tt,et)=>{var ot,at;const nt=isMouseEvent(tt),rt=nt?tt.clientX:(ot=tt.touches)==null?void 0:ot[0].clientX,it=nt?tt.clientY:(at=tt.touches)==null?void 0:at[0].clientY;return{x:rt-((et==null?void 0:et.left)??0),y:it-((et==null?void 0:et.top)??0)}},isMacOs=()=>{var tt;return typeof navigator<"u"&&((tt=navigator==null?void 0:navigator.userAgent)==null?void 0:tt.indexOf("Mac"))>=0},BaseEdge=({id:tt,path:et,labelX:nt,labelY:rt,label:it,labelStyle:ot,labelShowBg:at,labelBgStyle:st,labelBgPadding:lt,labelBgBorderRadius:ct,style:ut,markerEnd:ht,markerStart:dt,interactionWidth:pt=20})=>React$1.createElement(React$1.Fragment,null,React$1.createElement("path",{id:tt,style:ut,d:et,fill:"none",className:"react-flow__edge-path",markerEnd:ht,markerStart:dt}),pt&&React$1.createElement("path",{d:et,fill:"none",strokeOpacity:0,strokeWidth:pt,className:"react-flow__edge-interaction"}),it&&isNumeric(nt)&&isNumeric(rt)?React$1.createElement(EdgeText$1,{x:nt,y:rt,label:it,labelStyle:ot,labelShowBg:at,labelBgStyle:st,labelBgPadding:lt,labelBgBorderRadius:ct}):null);BaseEdge.displayName="BaseEdge";function getMouseHandler$1(tt,et,nt){return nt===void 0?nt:rt=>{const it=et().edges.find(ot=>ot.id===tt);it&&nt(rt,{...it})}}function getEdgeCenter({sourceX:tt,sourceY:et,targetX:nt,targetY:rt}){const it=Math.abs(nt-tt)/2,ot=nt{const[yt,bt,vt]=getSimpleBezierPath({sourceX:tt,sourceY:et,sourcePosition:it,targetX:nt,targetY:rt,targetPosition:ot});return React$1.createElement(BaseEdge,{path:yt,labelX:bt,labelY:vt,label:at,labelStyle:st,labelShowBg:lt,labelBgStyle:ct,labelBgPadding:ut,labelBgBorderRadius:ht,style:dt,markerEnd:pt,markerStart:mt,interactionWidth:gt})});SimpleBezierEdge.displayName="SimpleBezierEdge";const handleDirections={[Position.Left]:{x:-1,y:0},[Position.Right]:{x:1,y:0},[Position.Top]:{x:0,y:-1},[Position.Bottom]:{x:0,y:1}},getDirection=({source:tt,sourcePosition:et=Position.Bottom,target:nt})=>et===Position.Left||et===Position.Right?tt.xMath.sqrt(Math.pow(et.x-tt.x,2)+Math.pow(et.y-tt.y,2));function getPoints({source:tt,sourcePosition:et=Position.Bottom,target:nt,targetPosition:rt=Position.Top,center:it,offset:ot}){const at=handleDirections[et],st=handleDirections[rt],lt={x:tt.x+at.x*ot,y:tt.y+at.y*ot},ct={x:nt.x+st.x*ot,y:nt.y+st.y*ot},ut=getDirection({source:lt,sourcePosition:et,target:ct}),ht=ut.x!==0?"x":"y",dt=ut[ht];let pt=[],mt,gt;const yt={x:0,y:0},bt={x:0,y:0},[vt,xt,kt,St]=getEdgeCenter({sourceX:tt.x,sourceY:tt.y,targetX:nt.x,targetY:nt.y});if(at[ht]*st[ht]===-1){mt=it.x||vt,gt=it.y||xt;const At=[{x:mt,y:lt.y},{x:mt,y:ct.y}],Et=[{x:lt.x,y:gt},{x:ct.x,y:gt}];at[ht]===dt?pt=ht==="x"?At:Et:pt=ht==="x"?Et:At}else{const At=[{x:lt.x,y:ct.y}],Et=[{x:ct.x,y:lt.y}];if(ht==="x"?pt=at.x===dt?Et:At:pt=at.y===dt?At:Et,et===rt){const Ct=Math.abs(tt[ht]-nt[ht]);if(Ct<=ot){const wt=Math.min(ot-1,ot-Ct);at[ht]===dt?yt[ht]=(lt[ht]>tt[ht]?-1:1)*wt:bt[ht]=(ct[ht]>nt[ht]?-1:1)*wt}}if(et!==rt){const Ct=ht==="x"?"y":"x",wt=at[ht]===st[Ct],It=lt[Ct]>ct[Ct],Ot=lt[Ct]=Pt?(mt=($t.x+Dt.x)/2,gt=pt[0].y):(mt=pt[0].x,gt=($t.y+Dt.y)/2)}return[[tt,{x:lt.x+yt.x,y:lt.y+yt.y},...pt,{x:ct.x+bt.x,y:ct.y+bt.y},nt],mt,gt,kt,St]}function getBend(tt,et,nt,rt){const it=Math.min(distance(tt,et)/2,distance(et,nt)/2,rt),{x:ot,y:at}=et;if(tt.x===ot&&ot===nt.x||tt.y===at&&at===nt.y)return`L${ot} ${at}`;if(tt.y===at){const ct=tt.x{let xt="";return vt>0&&vt{const[bt,vt,xt]=getSmoothStepPath({sourceX:tt,sourceY:et,sourcePosition:ht,targetX:nt,targetY:rt,targetPosition:dt,borderRadius:gt==null?void 0:gt.borderRadius,offset:gt==null?void 0:gt.offset});return React$1.createElement(BaseEdge,{path:bt,labelX:vt,labelY:xt,label:it,labelStyle:ot,labelShowBg:at,labelBgStyle:st,labelBgPadding:lt,labelBgBorderRadius:ct,style:ut,markerEnd:pt,markerStart:mt,interactionWidth:yt})});SmoothStepEdge.displayName="SmoothStepEdge";const StepEdge=reactExports.memo(tt=>{var et;return React$1.createElement(SmoothStepEdge,{...tt,pathOptions:reactExports.useMemo(()=>{var nt;return{borderRadius:0,offset:(nt=tt.pathOptions)==null?void 0:nt.offset}},[(et=tt.pathOptions)==null?void 0:et.offset])})});StepEdge.displayName="StepEdge";function getStraightPath({sourceX:tt,sourceY:et,targetX:nt,targetY:rt}){const[it,ot,at,st]=getEdgeCenter({sourceX:tt,sourceY:et,targetX:nt,targetY:rt});return[`M ${tt},${et}L ${nt},${rt}`,it,ot,at,st]}const StraightEdge=reactExports.memo(({sourceX:tt,sourceY:et,targetX:nt,targetY:rt,label:it,labelStyle:ot,labelShowBg:at,labelBgStyle:st,labelBgPadding:lt,labelBgBorderRadius:ct,style:ut,markerEnd:ht,markerStart:dt,interactionWidth:pt})=>{const[mt,gt,yt]=getStraightPath({sourceX:tt,sourceY:et,targetX:nt,targetY:rt});return React$1.createElement(BaseEdge,{path:mt,labelX:gt,labelY:yt,label:it,labelStyle:ot,labelShowBg:at,labelBgStyle:st,labelBgPadding:lt,labelBgBorderRadius:ct,style:ut,markerEnd:ht,markerStart:dt,interactionWidth:pt})});StraightEdge.displayName="StraightEdge";function calculateControlOffset(tt,et){return tt>=0?.5*tt:et*25*Math.sqrt(-tt)}function getControlWithCurvature({pos:tt,x1:et,y1:nt,x2:rt,y2:it,c:ot}){switch(tt){case Position.Left:return[et-calculateControlOffset(et-rt,ot),nt];case Position.Right:return[et+calculateControlOffset(rt-et,ot),nt];case Position.Top:return[et,nt-calculateControlOffset(nt-it,ot)];case Position.Bottom:return[et,nt+calculateControlOffset(it-nt,ot)]}}function getBezierPath({sourceX:tt,sourceY:et,sourcePosition:nt=Position.Bottom,targetX:rt,targetY:it,targetPosition:ot=Position.Top,curvature:at=.25}){const[st,lt]=getControlWithCurvature({pos:nt,x1:tt,y1:et,x2:rt,y2:it,c:at}),[ct,ut]=getControlWithCurvature({pos:ot,x1:rt,y1:it,x2:tt,y2:et,c:at}),[ht,dt,pt,mt]=getBezierEdgeCenter({sourceX:tt,sourceY:et,targetX:rt,targetY:it,sourceControlX:st,sourceControlY:lt,targetControlX:ct,targetControlY:ut});return[`M${tt},${et} C${st},${lt} ${ct},${ut} ${rt},${it}`,ht,dt,pt,mt]}const BezierEdge=reactExports.memo(({sourceX:tt,sourceY:et,targetX:nt,targetY:rt,sourcePosition:it=Position.Bottom,targetPosition:ot=Position.Top,label:at,labelStyle:st,labelShowBg:lt,labelBgStyle:ct,labelBgPadding:ut,labelBgBorderRadius:ht,style:dt,markerEnd:pt,markerStart:mt,pathOptions:gt,interactionWidth:yt})=>{const[bt,vt,xt]=getBezierPath({sourceX:tt,sourceY:et,sourcePosition:it,targetX:nt,targetY:rt,targetPosition:ot,curvature:gt==null?void 0:gt.curvature});return React$1.createElement(BaseEdge,{path:bt,labelX:vt,labelY:xt,label:at,labelStyle:st,labelShowBg:lt,labelBgStyle:ct,labelBgPadding:ut,labelBgBorderRadius:ht,style:dt,markerEnd:pt,markerStart:mt,interactionWidth:yt})});BezierEdge.displayName="BezierEdge";const NodeIdContext=reactExports.createContext(null),Provider=NodeIdContext.Provider;NodeIdContext.Consumer;const useNodeId=()=>reactExports.useContext(NodeIdContext),isEdge=tt=>"id"in tt&&"source"in tt&&"target"in tt,getEdgeId=({source:tt,sourceHandle:et,target:nt,targetHandle:rt})=>`reactflow__edge-${tt}${et||""}-${nt}${rt||""}`,getMarkerId=(tt,et)=>typeof tt>"u"?"":typeof tt=="string"?tt:`${et?`${et}__`:""}${Object.keys(tt).sort().map(rt=>`${rt}=${tt[rt]}`).join("&")}`,connectionExists=(tt,et)=>et.some(nt=>nt.source===tt.source&&nt.target===tt.target&&(nt.sourceHandle===tt.sourceHandle||!nt.sourceHandle&&!tt.sourceHandle)&&(nt.targetHandle===tt.targetHandle||!nt.targetHandle&&!tt.targetHandle)),addEdge=(tt,et)=>{if(!tt.source||!tt.target)return et;let nt;return isEdge(tt)?nt={...tt}:nt={...tt,id:getEdgeId(tt)},connectionExists(nt,et)?et:et.concat(nt)},pointToRendererPoint=({x:tt,y:et},[nt,rt,it],ot,[at,st])=>{const lt={x:(tt-nt)/it,y:(et-rt)/it};return ot?{x:at*Math.round(lt.x/at),y:st*Math.round(lt.y/st)}:lt},rendererPointToPoint=({x:tt,y:et},[nt,rt,it])=>({x:tt*it+nt,y:et*it+rt}),getNodePositionWithOrigin=(tt,et=[0,0])=>{if(!tt)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const nt=(tt.width??0)*et[0],rt=(tt.height??0)*et[1],it={x:tt.position.x-nt,y:tt.position.y-rt};return{...it,positionAbsolute:tt.positionAbsolute?{x:tt.positionAbsolute.x-nt,y:tt.positionAbsolute.y-rt}:it}},getRectOfNodes=(tt,et=[0,0])=>{if(tt.length===0)return{x:0,y:0,width:0,height:0};const nt=tt.reduce((rt,it)=>{const{x:ot,y:at}=getNodePositionWithOrigin(it,et).positionAbsolute;return getBoundsOfBoxes(rt,rectToBox({x:ot,y:at,width:it.width||0,height:it.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return boxToRect(nt)},getNodesInside=(tt,et,[nt,rt,it]=[0,0,1],ot=!1,at=!1,st=[0,0])=>{const lt={x:(et.x-nt)/it,y:(et.y-rt)/it,width:et.width/it,height:et.height/it},ct=[];return tt.forEach(ut=>{const{width:ht,height:dt,selectable:pt=!0,hidden:mt=!1}=ut;if(at&&!pt||mt)return!1;const{positionAbsolute:gt}=getNodePositionWithOrigin(ut,st),yt={x:gt.x,y:gt.y,width:ht||0,height:dt||0},bt=getOverlappingArea(lt,yt),vt=typeof ht>"u"||typeof dt>"u"||ht===null||dt===null,xt=ot&&bt>0,kt=(ht||0)*(dt||0);(vt||xt||bt>=kt||ut.dragging)&&ct.push(ut)}),ct},getConnectedEdges=(tt,et)=>{const nt=tt.map(rt=>rt.id);return et.filter(rt=>nt.includes(rt.source)||nt.includes(rt.target))},getTransformForBounds=(tt,et,nt,rt,it,ot=.1)=>{const at=et/(tt.width*(1+ot)),st=nt/(tt.height*(1+ot)),lt=Math.min(at,st),ct=clamp(lt,rt,it),ut=tt.x+tt.width/2,ht=tt.y+tt.height/2,dt=et/2-ut*ct,pt=nt/2-ht*ct;return[dt,pt,ct]},getD3Transition=(tt,et=0)=>tt.transition().duration(et);function getHandles(tt,et,nt,rt){return(et[nt]||[]).reduce((it,ot)=>{var at,st;return`${tt.id}-${ot.id}-${nt}`!==rt&&it.push({id:ot.id||null,type:nt,nodeId:tt.id,x:(((at=tt.positionAbsolute)==null?void 0:at.x)??0)+ot.x+ot.width/2,y:(((st=tt.positionAbsolute)==null?void 0:st.y)??0)+ot.y+ot.height/2}),it},[])}function getClosestHandle(tt,et,nt,rt,it,ot){const{x:at,y:st}=getEventPosition(tt),ct=et.elementsFromPoint(at,st).find(mt=>mt.classList.contains("react-flow__handle"));if(ct){const mt=ct.getAttribute("data-nodeid");if(mt){const gt=getHandleType(void 0,ct),yt=ct.getAttribute("data-handleid"),bt=ot({nodeId:mt,id:yt,type:gt});if(bt)return{handle:{id:yt,type:gt,nodeId:mt,x:nt.x,y:nt.y},validHandleResult:bt}}}let ut=[],ht=1/0;if(it.forEach(mt=>{const gt=Math.sqrt((mt.x-nt.x)**2+(mt.y-nt.y)**2);if(gt<=rt){const yt=ot(mt);gt<=ht&&(gtmt.isValid),pt=ut.some(({handle:mt})=>mt.type==="target");return ut.find(({handle:mt,validHandleResult:gt})=>pt?mt.type==="target":dt?gt.isValid:!0)||ut[0]}const nullConnection={source:null,target:null,sourceHandle:null,targetHandle:null},defaultResult=()=>({handleDomNode:null,isValid:!1,connection:nullConnection,endHandle:null});function isValidHandle(tt,et,nt,rt,it,ot,at){const st=it==="target",lt=at.querySelector(`.react-flow__handle[data-id="${tt==null?void 0:tt.nodeId}-${tt==null?void 0:tt.id}-${tt==null?void 0:tt.type}"]`),ct={...defaultResult(),handleDomNode:lt};if(lt){const ut=getHandleType(void 0,lt),ht=lt.getAttribute("data-nodeid"),dt=lt.getAttribute("data-handleid"),pt=lt.classList.contains("connectable"),mt=lt.classList.contains("connectableend"),gt={source:st?ht:nt,sourceHandle:st?dt:rt,target:st?nt:ht,targetHandle:st?rt:dt};ct.connection=gt,pt&&mt&&(et===ConnectionMode.Strict?st&&ut==="source"||!st&&ut==="target":ht!==nt||dt!==rt)&&(ct.endHandle={nodeId:ht,handleId:dt,type:ut},ct.isValid=ot(gt))}return ct}function getHandleLookup({nodes:tt,nodeId:et,handleId:nt,handleType:rt}){return tt.reduce((it,ot)=>{if(ot[internalsSymbol]){const{handleBounds:at}=ot[internalsSymbol];let st=[],lt=[];at&&(st=getHandles(ot,at,"source",`${et}-${nt}-${rt}`),lt=getHandles(ot,at,"target",`${et}-${nt}-${rt}`)),it.push(...st,...lt)}return it},[])}function getHandleType(tt,et){return tt||(et!=null&&et.classList.contains("target")?"target":et!=null&&et.classList.contains("source")?"source":null)}function resetRecentHandle(tt){tt==null||tt.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function getConnectionStatus(tt,et){let nt=null;return et?nt="valid":tt&&!et&&(nt="invalid"),nt}function handlePointerDown({event:tt,handleId:et,nodeId:nt,onConnect:rt,isTarget:it,getState:ot,setState:at,isValidConnection:st,edgeUpdaterType:lt,onEdgeUpdateEnd:ct}){const ut=getHostForElement(tt.target),{connectionMode:ht,domNode:dt,autoPanOnConnect:pt,connectionRadius:mt,onConnectStart:gt,panBy:yt,getNodes:bt,cancelConnection:vt}=ot();let xt=0,kt;const{x:St,y:Tt}=getEventPosition(tt),At=ut==null?void 0:ut.elementFromPoint(St,Tt),Et=getHandleType(lt,At),$t=dt==null?void 0:dt.getBoundingClientRect();if(!$t||!Et)return;let Dt,jt=getEventPosition(tt,$t),Pt=!1,Ct=null,wt=!1,It=null;const Ot=getHandleLookup({nodes:bt(),nodeId:nt,handleId:et,handleType:Et}),Wt=()=>{if(!pt)return;const[Nt,Ut]=calcAutoPan(jt,$t);yt({x:Nt,y:Ut}),xt=requestAnimationFrame(Wt)};at({connectionPosition:jt,connectionStatus:null,connectionNodeId:nt,connectionHandleId:et,connectionHandleType:Et,connectionStartHandle:{nodeId:nt,handleId:et,type:Et},connectionEndHandle:null}),gt==null||gt(tt,{nodeId:nt,handleId:et,handleType:Et});function zt(Nt){const{transform:Ut}=ot();jt=getEventPosition(Nt,$t);const{handle:Mt,validHandleResult:Ht}=getClosestHandle(Nt,ut,pointToRendererPoint(jt,Ut,!1,[1,1]),mt,Ot,en=>isValidHandle(en,ht,nt,et,it?"target":"source",st,ut));if(kt=Mt,Pt||(Wt(),Pt=!0),It=Ht.handleDomNode,Ct=Ht.connection,wt=Ht.isValid,at({connectionPosition:kt&&wt?rendererPointToPoint({x:kt.x,y:kt.y},Ut):jt,connectionStatus:getConnectionStatus(!!kt,wt),connectionEndHandle:Ht.endHandle}),!kt&&!wt&&!It)return resetRecentHandle(Dt);Ct.source!==Ct.target&&It&&(resetRecentHandle(Dt),Dt=It,It.classList.add("connecting","react-flow__handle-connecting"),It.classList.toggle("valid",wt),It.classList.toggle("react-flow__handle-valid",wt))}function Ft(Nt){var Ut,Mt;(kt||It)&&Ct&&wt&&(rt==null||rt(Ct)),(Mt=(Ut=ot()).onConnectEnd)==null||Mt.call(Ut,Nt),lt&&(ct==null||ct(Nt)),resetRecentHandle(Dt),vt(),cancelAnimationFrame(xt),Pt=!1,wt=!1,Ct=null,It=null,ut.removeEventListener("mousemove",zt),ut.removeEventListener("mouseup",Ft),ut.removeEventListener("touchmove",zt),ut.removeEventListener("touchend",Ft)}ut.addEventListener("mousemove",zt),ut.addEventListener("mouseup",Ft),ut.addEventListener("touchmove",zt),ut.addEventListener("touchend",Ft)}const alwaysValid=()=>!0,selector$f=tt=>({connectionStartHandle:tt.connectionStartHandle,connectOnClick:tt.connectOnClick,noPanClassName:tt.noPanClassName}),connectingSelector=(tt,et,nt)=>rt=>{const{connectionStartHandle:it,connectionEndHandle:ot,connectionClickStartHandle:at}=rt;return{connecting:(it==null?void 0:it.nodeId)===tt&&(it==null?void 0:it.handleId)===et&&(it==null?void 0:it.type)===nt||(ot==null?void 0:ot.nodeId)===tt&&(ot==null?void 0:ot.handleId)===et&&(ot==null?void 0:ot.type)===nt,clickConnecting:(at==null?void 0:at.nodeId)===tt&&(at==null?void 0:at.handleId)===et&&(at==null?void 0:at.type)===nt}},Handle=reactExports.forwardRef(({type:tt="source",position:et=Position.Top,isValidConnection:nt,isConnectable:rt=!0,isConnectableStart:it=!0,isConnectableEnd:ot=!0,id:at,onConnect:st,children:lt,className:ct,onMouseDown:ut,onTouchStart:ht,...dt},pt)=>{var $t,Dt;const mt=at||null,gt=tt==="target",yt=useStoreApi(),bt=useNodeId(),{connectOnClick:vt,noPanClassName:xt}=useStore(selector$f,shallow$1),{connecting:kt,clickConnecting:St}=useStore(connectingSelector(bt,mt,tt),shallow$1);bt||(Dt=($t=yt.getState()).onError)==null||Dt.call($t,"010",errorMessages.error010());const Tt=jt=>{const{defaultEdgeOptions:Pt,onConnect:Ct,hasDefaultEdges:wt}=yt.getState(),It={...Pt,...jt};if(wt){const{edges:Ot,setEdges:Wt}=yt.getState();Wt(addEdge(It,Ot))}Ct==null||Ct(It),st==null||st(It)},At=jt=>{if(!bt)return;const Pt=isMouseEvent(jt);it&&(Pt&&jt.button===0||!Pt)&&handlePointerDown({event:jt,handleId:mt,nodeId:bt,onConnect:Tt,isTarget:gt,getState:yt.getState,setState:yt.setState,isValidConnection:nt||yt.getState().isValidConnection||alwaysValid}),Pt?ut==null||ut(jt):ht==null||ht(jt)},Et=jt=>{const{onClickConnectStart:Pt,onClickConnectEnd:Ct,connectionClickStartHandle:wt,connectionMode:It,isValidConnection:Ot}=yt.getState();if(!bt||!wt&&!it)return;if(!wt){Pt==null||Pt(jt,{nodeId:bt,handleId:mt,handleType:tt}),yt.setState({connectionClickStartHandle:{nodeId:bt,type:tt,handleId:mt}});return}const Wt=getHostForElement(jt.target),zt=nt||Ot||alwaysValid,{connection:Ft,isValid:Nt}=isValidHandle({nodeId:bt,id:mt,type:tt},It,wt.nodeId,wt.handleId||null,wt.type,zt,Wt);Nt&&Tt(Ft),Ct==null||Ct(jt),yt.setState({connectionClickStartHandle:null})};return React$1.createElement("div",{"data-handleid":mt,"data-nodeid":bt,"data-handlepos":et,"data-id":`${bt}-${mt}-${tt}`,className:cc(["react-flow__handle",`react-flow__handle-${et}`,"nodrag",xt,ct,{source:!gt,target:gt,connectable:rt,connectablestart:it,connectableend:ot,connecting:St,connectionindicator:rt&&(it&&!kt||ot&&kt)}]),onMouseDown:At,onTouchStart:At,onClick:vt?Et:void 0,ref:pt,...dt},lt)});Handle.displayName="Handle";var Handle$1=reactExports.memo(Handle);const DefaultNode=({data:tt,isConnectable:et,targetPosition:nt=Position.Top,sourcePosition:rt=Position.Bottom})=>React$1.createElement(React$1.Fragment,null,React$1.createElement(Handle$1,{type:"target",position:nt,isConnectable:et}),tt==null?void 0:tt.label,React$1.createElement(Handle$1,{type:"source",position:rt,isConnectable:et}));DefaultNode.displayName="DefaultNode";var DefaultNode$1=reactExports.memo(DefaultNode);const InputNode=({data:tt,isConnectable:et,sourcePosition:nt=Position.Bottom})=>React$1.createElement(React$1.Fragment,null,tt==null?void 0:tt.label,React$1.createElement(Handle$1,{type:"source",position:nt,isConnectable:et}));InputNode.displayName="InputNode";var InputNode$1=reactExports.memo(InputNode);const OutputNode=({data:tt,isConnectable:et,targetPosition:nt=Position.Top})=>React$1.createElement(React$1.Fragment,null,React$1.createElement(Handle$1,{type:"target",position:nt,isConnectable:et}),tt==null?void 0:tt.label);OutputNode.displayName="OutputNode";var OutputNode$1=reactExports.memo(OutputNode);const GroupNode=()=>null;GroupNode.displayName="GroupNode";const selector$e=tt=>({selectedNodes:tt.getNodes().filter(et=>et.selected),selectedEdges:tt.edges.filter(et=>et.selected)}),selectId=tt=>tt.id;function areEqual(tt,et){return shallow$1(tt.selectedNodes.map(selectId),et.selectedNodes.map(selectId))&&shallow$1(tt.selectedEdges.map(selectId),et.selectedEdges.map(selectId))}const SelectionListener=reactExports.memo(({onSelectionChange:tt})=>{const et=useStoreApi(),{selectedNodes:nt,selectedEdges:rt}=useStore(selector$e,areEqual);return reactExports.useEffect(()=>{var ot,at;const it={nodes:nt,edges:rt};tt==null||tt(it),(at=(ot=et.getState()).onSelectionChange)==null||at.call(ot,it)},[nt,rt,tt]),null});SelectionListener.displayName="SelectionListener";const changeSelector=tt=>!!tt.onSelectionChange;function Wrapper$1$1({onSelectionChange:tt}){const et=useStore(changeSelector);return tt||et?React$1.createElement(SelectionListener,{onSelectionChange:tt}):null}const selector$d=tt=>({setNodes:tt.setNodes,setEdges:tt.setEdges,setDefaultNodesAndEdges:tt.setDefaultNodesAndEdges,setMinZoom:tt.setMinZoom,setMaxZoom:tt.setMaxZoom,setTranslateExtent:tt.setTranslateExtent,setNodeExtent:tt.setNodeExtent,reset:tt.reset});function useStoreUpdater(tt,et){reactExports.useEffect(()=>{typeof tt<"u"&&et(tt)},[tt])}function useDirectStoreUpdater(tt,et,nt){reactExports.useEffect(()=>{typeof et<"u"&&nt({[tt]:et})},[et])}const StoreUpdater=({nodes:tt,edges:et,defaultNodes:nt,defaultEdges:rt,onConnect:it,onConnectStart:ot,onConnectEnd:at,onClickConnectStart:st,onClickConnectEnd:lt,nodesDraggable:ct,nodesConnectable:ut,nodesFocusable:ht,edgesFocusable:dt,edgesUpdatable:pt,elevateNodesOnSelect:mt,minZoom:gt,maxZoom:yt,nodeExtent:bt,onNodesChange:vt,onEdgesChange:xt,elementsSelectable:kt,connectionMode:St,snapGrid:Tt,snapToGrid:At,translateExtent:Et,connectOnClick:$t,defaultEdgeOptions:Dt,fitView:jt,fitViewOptions:Pt,onNodesDelete:Ct,onEdgesDelete:wt,onNodeDrag:It,onNodeDragStart:Ot,onNodeDragStop:Wt,onSelectionDrag:zt,onSelectionDragStart:Ft,onSelectionDragStop:Nt,noPanClassName:Ut,nodeOrigin:Mt,rfId:Ht,autoPanOnConnect:en,autoPanOnNodeDrag:sn,onError:Kt,connectionRadius:rn,isValidConnection:nn,nodeDragThreshold:hn})=>{const{setNodes:vn,setEdges:an,setDefaultNodesAndEdges:Qt,setMinZoom:_n,setMaxZoom:Pn,setTranslateExtent:$n,setNodeExtent:Nn,reset:Tn}=useStore(selector$d,shallow$1),cn=useStoreApi();return reactExports.useEffect(()=>{const mn=rt==null?void 0:rt.map(In=>({...In,...Dt}));return Qt(nt,mn),()=>{Tn()}},[]),useDirectStoreUpdater("defaultEdgeOptions",Dt,cn.setState),useDirectStoreUpdater("connectionMode",St,cn.setState),useDirectStoreUpdater("onConnect",it,cn.setState),useDirectStoreUpdater("onConnectStart",ot,cn.setState),useDirectStoreUpdater("onConnectEnd",at,cn.setState),useDirectStoreUpdater("onClickConnectStart",st,cn.setState),useDirectStoreUpdater("onClickConnectEnd",lt,cn.setState),useDirectStoreUpdater("nodesDraggable",ct,cn.setState),useDirectStoreUpdater("nodesConnectable",ut,cn.setState),useDirectStoreUpdater("nodesFocusable",ht,cn.setState),useDirectStoreUpdater("edgesFocusable",dt,cn.setState),useDirectStoreUpdater("edgesUpdatable",pt,cn.setState),useDirectStoreUpdater("elementsSelectable",kt,cn.setState),useDirectStoreUpdater("elevateNodesOnSelect",mt,cn.setState),useDirectStoreUpdater("snapToGrid",At,cn.setState),useDirectStoreUpdater("snapGrid",Tt,cn.setState),useDirectStoreUpdater("onNodesChange",vt,cn.setState),useDirectStoreUpdater("onEdgesChange",xt,cn.setState),useDirectStoreUpdater("connectOnClick",$t,cn.setState),useDirectStoreUpdater("fitViewOnInit",jt,cn.setState),useDirectStoreUpdater("fitViewOnInitOptions",Pt,cn.setState),useDirectStoreUpdater("onNodesDelete",Ct,cn.setState),useDirectStoreUpdater("onEdgesDelete",wt,cn.setState),useDirectStoreUpdater("onNodeDrag",It,cn.setState),useDirectStoreUpdater("onNodeDragStart",Ot,cn.setState),useDirectStoreUpdater("onNodeDragStop",Wt,cn.setState),useDirectStoreUpdater("onSelectionDrag",zt,cn.setState),useDirectStoreUpdater("onSelectionDragStart",Ft,cn.setState),useDirectStoreUpdater("onSelectionDragStop",Nt,cn.setState),useDirectStoreUpdater("noPanClassName",Ut,cn.setState),useDirectStoreUpdater("nodeOrigin",Mt,cn.setState),useDirectStoreUpdater("rfId",Ht,cn.setState),useDirectStoreUpdater("autoPanOnConnect",en,cn.setState),useDirectStoreUpdater("autoPanOnNodeDrag",sn,cn.setState),useDirectStoreUpdater("onError",Kt,cn.setState),useDirectStoreUpdater("connectionRadius",rn,cn.setState),useDirectStoreUpdater("isValidConnection",nn,cn.setState),useDirectStoreUpdater("nodeDragThreshold",hn,cn.setState),useStoreUpdater(tt,vn),useStoreUpdater(et,an),useStoreUpdater(gt,_n),useStoreUpdater(yt,Pn),useStoreUpdater(Et,$n),useStoreUpdater(bt,Nn),null},style$1={display:"none"},ariaLiveStyle={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},ARIA_NODE_DESC_KEY="react-flow__node-desc",ARIA_EDGE_DESC_KEY="react-flow__edge-desc",ARIA_LIVE_MESSAGE="react-flow__aria-live",selector$c=tt=>tt.ariaLiveMessage;function AriaLiveMessage({rfId:tt}){const et=useStore(selector$c);return React$1.createElement("div",{id:`${ARIA_LIVE_MESSAGE}-${tt}`,"aria-live":"assertive","aria-atomic":"true",style:ariaLiveStyle},et)}function A11yDescriptions({rfId:tt,disableKeyboardA11y:et}){return React$1.createElement(React$1.Fragment,null,React$1.createElement("div",{id:`${ARIA_NODE_DESC_KEY}-${tt}`,style:style$1},"Press enter or space to select a node.",!et&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),React$1.createElement("div",{id:`${ARIA_EDGE_DESC_KEY}-${tt}`,style:style$1},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!et&&React$1.createElement(AriaLiveMessage,{rfId:tt}))}var useKeyPress=(tt=null,et={actInsideInputWithModifier:!0})=>{const[nt,rt]=reactExports.useState(!1),it=reactExports.useRef(!1),ot=reactExports.useRef(new Set([])),[at,st]=reactExports.useMemo(()=>{if(tt!==null){const ct=(Array.isArray(tt)?tt:[tt]).filter(ht=>typeof ht=="string").map(ht=>ht.split("+")),ut=ct.reduce((ht,dt)=>ht.concat(...dt),[]);return[ct,ut]}return[[],[]]},[tt]);return reactExports.useEffect(()=>{const lt=typeof document<"u"?document:null,ct=(et==null?void 0:et.target)||lt;if(tt!==null){const ut=pt=>{if(it.current=pt.ctrlKey||pt.metaKey||pt.shiftKey,(!it.current||it.current&&!et.actInsideInputWithModifier)&&isInputDOMNode(pt))return!1;const gt=useKeyOrCode(pt.code,st);ot.current.add(pt[gt]),isMatchingKey(at,ot.current,!1)&&(pt.preventDefault(),rt(!0))},ht=pt=>{if((!it.current||it.current&&!et.actInsideInputWithModifier)&&isInputDOMNode(pt))return!1;const gt=useKeyOrCode(pt.code,st);isMatchingKey(at,ot.current,!0)?(rt(!1),ot.current.clear()):ot.current.delete(pt[gt]),pt.key==="Meta"&&ot.current.clear(),it.current=!1},dt=()=>{ot.current.clear(),rt(!1)};return ct==null||ct.addEventListener("keydown",ut),ct==null||ct.addEventListener("keyup",ht),window.addEventListener("blur",dt),()=>{ct==null||ct.removeEventListener("keydown",ut),ct==null||ct.removeEventListener("keyup",ht),window.removeEventListener("blur",dt)}}},[tt,rt]),nt};function isMatchingKey(tt,et,nt){return tt.filter(rt=>nt||rt.length===et.size).some(rt=>rt.every(it=>et.has(it)))}function useKeyOrCode(tt,et){return et.includes(tt)?"code":"key"}function calculateXYZPosition(tt,et,nt,rt){var at,st;if(!tt.parentNode)return nt;const it=et.get(tt.parentNode),ot=getNodePositionWithOrigin(it,rt);return calculateXYZPosition(it,et,{x:(nt.x??0)+ot.x,y:(nt.y??0)+ot.y,z:(((at=it[internalsSymbol])==null?void 0:at.z)??0)>(nt.z??0)?((st=it[internalsSymbol])==null?void 0:st.z)??0:nt.z??0},rt)}function updateAbsoluteNodePositions(tt,et,nt){tt.forEach(rt=>{var it;if(rt.parentNode&&!tt.has(rt.parentNode))throw new Error(`Parent node ${rt.parentNode} not found`);if(rt.parentNode||nt!=null&&nt[rt.id]){const{x:ot,y:at,z:st}=calculateXYZPosition(rt,tt,{...rt.position,z:((it=rt[internalsSymbol])==null?void 0:it.z)??0},et);rt.positionAbsolute={x:ot,y:at},rt[internalsSymbol].z=st,nt!=null&&nt[rt.id]&&(rt[internalsSymbol].isParent=!0)}})}function createNodeInternals(tt,et,nt,rt){const it=new Map,ot={},at=rt?1e3:0;return tt.forEach(st=>{var ht;const lt=(isNumeric(st.zIndex)?st.zIndex:0)+(st.selected?at:0),ct=et.get(st.id),ut={width:ct==null?void 0:ct.width,height:ct==null?void 0:ct.height,...st,positionAbsolute:{x:st.position.x,y:st.position.y}};st.parentNode&&(ut.parentNode=st.parentNode,ot[st.parentNode]=!0),Object.defineProperty(ut,internalsSymbol,{enumerable:!1,value:{handleBounds:(ht=ct==null?void 0:ct[internalsSymbol])==null?void 0:ht.handleBounds,z:lt}}),it.set(st.id,ut)}),updateAbsoluteNodePositions(it,nt,ot),it}function fitView(tt,et={}){const{getNodes:nt,width:rt,height:it,minZoom:ot,maxZoom:at,d3Zoom:st,d3Selection:lt,fitViewOnInitDone:ct,fitViewOnInit:ut,nodeOrigin:ht}=tt(),dt=et.initial&&!ct&&ut;if(st&<&&(dt||!et.initial)){const mt=nt().filter(yt=>{var vt;const bt=et.includeHiddenNodes?yt.width&&yt.height:!yt.hidden;return(vt=et.nodes)!=null&&vt.length?bt&&et.nodes.some(xt=>xt.id===yt.id):bt}),gt=mt.every(yt=>yt.width&&yt.height);if(mt.length>0&>){const yt=getRectOfNodes(mt,ht),[bt,vt,xt]=getTransformForBounds(yt,rt,it,et.minZoom??ot,et.maxZoom??at,et.padding??.1),kt=identity.translate(bt,vt).scale(xt);return typeof et.duration=="number"&&et.duration>0?st.transform(getD3Transition(lt,et.duration),kt):st.transform(lt,kt),!0}}return!1}function handleControlledNodeSelectionChange(tt,et){return tt.forEach(nt=>{const rt=et.get(nt.id);rt&&et.set(rt.id,{...rt,[internalsSymbol]:rt[internalsSymbol],selected:nt.selected})}),new Map(et)}function handleControlledEdgeSelectionChange(tt,et){return et.map(nt=>{const rt=tt.find(it=>it.id===nt.id);return rt&&(nt.selected=rt.selected),nt})}function updateNodesAndEdgesSelections({changedNodes:tt,changedEdges:et,get:nt,set:rt}){const{nodeInternals:it,edges:ot,onNodesChange:at,onEdgesChange:st,hasDefaultNodes:lt,hasDefaultEdges:ct}=nt();tt!=null&&tt.length&&(lt&&rt({nodeInternals:handleControlledNodeSelectionChange(tt,it)}),at==null||at(tt)),et!=null&&et.length&&(ct&&rt({edges:handleControlledEdgeSelectionChange(et,ot)}),st==null||st(et))}const noop$1=()=>{},initialViewportHelper={zoomIn:noop$1,zoomOut:noop$1,zoomTo:noop$1,getZoom:()=>1,setViewport:noop$1,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:noop$1,fitBounds:noop$1,project:tt=>tt,viewportInitialized:!1},selector$b=tt=>({d3Zoom:tt.d3Zoom,d3Selection:tt.d3Selection}),useViewportHelper=()=>{const tt=useStoreApi(),{d3Zoom:et,d3Selection:nt}=useStore(selector$b,shallow$1);return reactExports.useMemo(()=>nt&&et?{zoomIn:it=>et.scaleBy(getD3Transition(nt,it==null?void 0:it.duration),1.2),zoomOut:it=>et.scaleBy(getD3Transition(nt,it==null?void 0:it.duration),1/1.2),zoomTo:(it,ot)=>et.scaleTo(getD3Transition(nt,ot==null?void 0:ot.duration),it),getZoom:()=>tt.getState().transform[2],setViewport:(it,ot)=>{const[at,st,lt]=tt.getState().transform,ct=identity.translate(it.x??at,it.y??st).scale(it.zoom??lt);et.transform(getD3Transition(nt,ot==null?void 0:ot.duration),ct)},getViewport:()=>{const[it,ot,at]=tt.getState().transform;return{x:it,y:ot,zoom:at}},fitView:it=>fitView(tt.getState,it),setCenter:(it,ot,at)=>{const{width:st,height:lt,maxZoom:ct}=tt.getState(),ut=typeof(at==null?void 0:at.zoom)<"u"?at.zoom:ct,ht=st/2-it*ut,dt=lt/2-ot*ut,pt=identity.translate(ht,dt).scale(ut);et.transform(getD3Transition(nt,at==null?void 0:at.duration),pt)},fitBounds:(it,ot)=>{const{width:at,height:st,minZoom:lt,maxZoom:ct}=tt.getState(),[ut,ht,dt]=getTransformForBounds(it,at,st,lt,ct,(ot==null?void 0:ot.padding)??.1),pt=identity.translate(ut,ht).scale(dt);et.transform(getD3Transition(nt,ot==null?void 0:ot.duration),pt)},project:it=>{const{transform:ot,snapToGrid:at,snapGrid:st}=tt.getState();return pointToRendererPoint(it,ot,at,st)},viewportInitialized:!0}:initialViewportHelper,[et,nt])};function useReactFlow(){const tt=useViewportHelper(),et=useStoreApi(),nt=reactExports.useCallback(()=>et.getState().getNodes().map(gt=>({...gt})),[]),rt=reactExports.useCallback(gt=>et.getState().nodeInternals.get(gt),[]),it=reactExports.useCallback(()=>{const{edges:gt=[]}=et.getState();return gt.map(yt=>({...yt}))},[]),ot=reactExports.useCallback(gt=>{const{edges:yt=[]}=et.getState();return yt.find(bt=>bt.id===gt)},[]),at=reactExports.useCallback(gt=>{const{getNodes:yt,setNodes:bt,hasDefaultNodes:vt,onNodesChange:xt}=et.getState(),kt=yt(),St=typeof gt=="function"?gt(kt):gt;if(vt)bt(St);else if(xt){const Tt=St.length===0?kt.map(At=>({type:"remove",id:At.id})):St.map(At=>({item:At,type:"reset"}));xt(Tt)}},[]),st=reactExports.useCallback(gt=>{const{edges:yt=[],setEdges:bt,hasDefaultEdges:vt,onEdgesChange:xt}=et.getState(),kt=typeof gt=="function"?gt(yt):gt;if(vt)bt(kt);else if(xt){const St=kt.length===0?yt.map(Tt=>({type:"remove",id:Tt.id})):kt.map(Tt=>({item:Tt,type:"reset"}));xt(St)}},[]),lt=reactExports.useCallback(gt=>{const yt=Array.isArray(gt)?gt:[gt],{getNodes:bt,setNodes:vt,hasDefaultNodes:xt,onNodesChange:kt}=et.getState();if(xt){const Tt=[...bt(),...yt];vt(Tt)}else if(kt){const St=yt.map(Tt=>({item:Tt,type:"add"}));kt(St)}},[]),ct=reactExports.useCallback(gt=>{const yt=Array.isArray(gt)?gt:[gt],{edges:bt=[],setEdges:vt,hasDefaultEdges:xt,onEdgesChange:kt}=et.getState();if(xt)vt([...bt,...yt]);else if(kt){const St=yt.map(Tt=>({item:Tt,type:"add"}));kt(St)}},[]),ut=reactExports.useCallback(()=>{const{getNodes:gt,edges:yt=[],transform:bt}=et.getState(),[vt,xt,kt]=bt;return{nodes:gt().map(St=>({...St})),edges:yt.map(St=>({...St})),viewport:{x:vt,y:xt,zoom:kt}}},[]),ht=reactExports.useCallback(({nodes:gt,edges:yt})=>{const{nodeInternals:bt,getNodes:vt,edges:xt,hasDefaultNodes:kt,hasDefaultEdges:St,onNodesDelete:Tt,onEdgesDelete:At,onNodesChange:Et,onEdgesChange:$t}=et.getState(),Dt=(gt||[]).map(It=>It.id),jt=(yt||[]).map(It=>It.id),Pt=vt().reduce((It,Ot)=>{const Wt=!Dt.includes(Ot.id)&&Ot.parentNode&&It.find(Ft=>Ft.id===Ot.parentNode);return(typeof Ot.deletable=="boolean"?Ot.deletable:!0)&&(Dt.includes(Ot.id)||Wt)&&It.push(Ot),It},[]),Ct=xt.filter(It=>typeof It.deletable=="boolean"?It.deletable:!0),wt=Ct.filter(It=>jt.includes(It.id));if(Pt||wt){const It=getConnectedEdges(Pt,Ct),Ot=[...wt,...It],Wt=Ot.reduce((zt,Ft)=>(zt.includes(Ft.id)||zt.push(Ft.id),zt),[]);if((St||kt)&&(St&&et.setState({edges:xt.filter(zt=>!Wt.includes(zt.id))}),kt&&(Pt.forEach(zt=>{bt.delete(zt.id)}),et.setState({nodeInternals:new Map(bt)}))),Wt.length>0&&(At==null||At(Ot),$t&&$t(Wt.map(zt=>({id:zt,type:"remove"})))),Pt.length>0&&(Tt==null||Tt(Pt),Et)){const zt=Pt.map(Ft=>({id:Ft.id,type:"remove"}));Et(zt)}}},[]),dt=reactExports.useCallback(gt=>{const yt=isRectObject(gt),bt=yt?null:et.getState().nodeInternals.get(gt.id);return[yt?gt:nodeToRect(bt),bt,yt]},[]),pt=reactExports.useCallback((gt,yt=!0,bt)=>{const[vt,xt,kt]=dt(gt);return vt?(bt||et.getState().getNodes()).filter(St=>{if(!kt&&(St.id===xt.id||!St.positionAbsolute))return!1;const Tt=nodeToRect(St),At=getOverlappingArea(Tt,vt);return yt&&At>0||At>=gt.width*gt.height}):[]},[]),mt=reactExports.useCallback((gt,yt,bt=!0)=>{const[vt]=dt(gt);if(!vt)return!1;const xt=getOverlappingArea(vt,yt);return bt&&xt>0||xt>=gt.width*gt.height},[]);return reactExports.useMemo(()=>({...tt,getNodes:nt,getNode:rt,getEdges:it,getEdge:ot,setNodes:at,setEdges:st,addNodes:lt,addEdges:ct,toObject:ut,deleteElements:ht,getIntersectingNodes:pt,isNodeIntersecting:mt}),[tt,nt,rt,it,ot,at,st,lt,ct,ut,ht,pt,mt])}const deleteKeyOptions={actInsideInputWithModifier:!1};var useGlobalKeyHandler=({deleteKeyCode:tt,multiSelectionKeyCode:et})=>{const nt=useStoreApi(),{deleteElements:rt}=useReactFlow(),it=useKeyPress(tt,deleteKeyOptions),ot=useKeyPress(et);reactExports.useEffect(()=>{if(it){const{edges:at,getNodes:st}=nt.getState(),lt=st().filter(ut=>ut.selected),ct=at.filter(ut=>ut.selected);rt({nodes:lt,edges:ct}),nt.setState({nodesSelectionActive:!1})}},[it]),reactExports.useEffect(()=>{nt.setState({multiSelectionActive:ot})},[ot])};function useResizeHandler(tt){const et=useStoreApi();reactExports.useEffect(()=>{let nt;const rt=()=>{var ot,at;if(!tt.current)return;const it=getDimensions(tt.current);(it.height===0||it.width===0)&&((at=(ot=et.getState()).onError)==null||at.call(ot,"004",errorMessages.error004())),et.setState({width:it.width||500,height:it.height||500})};return rt(),window.addEventListener("resize",rt),tt.current&&(nt=new ResizeObserver(()=>rt()),nt.observe(tt.current)),()=>{window.removeEventListener("resize",rt),nt&&tt.current&&nt.unobserve(tt.current)}},[])}const containerStyle={position:"absolute",width:"100%",height:"100%",top:0,left:0},viewChanged=(tt,et)=>tt.x!==et.x||tt.y!==et.y||tt.zoom!==et.k,eventToFlowTransform=tt=>({x:tt.x,y:tt.y,zoom:tt.k}),isWrappedWithClass=(tt,et)=>tt.target.closest(`.${et}`),isRightClickPan=(tt,et)=>et===2&&Array.isArray(tt)&&tt.includes(2),wheelDelta=tt=>{const et=tt.ctrlKey&&isMacOs()?10:1;return-tt.deltaY*(tt.deltaMode===1?.05:tt.deltaMode?1:.002)*et},selector$a=tt=>({d3Zoom:tt.d3Zoom,d3Selection:tt.d3Selection,d3ZoomHandler:tt.d3ZoomHandler,userSelectionActive:tt.userSelectionActive}),ZoomPane=({onMove:tt,onMoveStart:et,onMoveEnd:nt,onPaneContextMenu:rt,zoomOnScroll:it=!0,zoomOnPinch:ot=!0,panOnScroll:at=!1,panOnScrollSpeed:st=.5,panOnScrollMode:lt=PanOnScrollMode.Free,zoomOnDoubleClick:ct=!0,elementsSelectable:ut,panOnDrag:ht=!0,defaultViewport:dt,translateExtent:pt,minZoom:mt,maxZoom:gt,zoomActivationKeyCode:yt,preventScrolling:bt=!0,children:vt,noWheelClassName:xt,noPanClassName:kt})=>{const St=reactExports.useRef(),Tt=useStoreApi(),At=reactExports.useRef(!1),Et=reactExports.useRef(!1),$t=reactExports.useRef(null),Dt=reactExports.useRef({x:0,y:0,zoom:0}),{d3Zoom:jt,d3Selection:Pt,d3ZoomHandler:Ct,userSelectionActive:wt}=useStore(selector$a,shallow$1),It=useKeyPress(yt),Ot=reactExports.useRef(0),Wt=reactExports.useRef(!1),zt=reactExports.useRef();return useResizeHandler($t),reactExports.useEffect(()=>{if($t.current){const Ft=$t.current.getBoundingClientRect(),Nt=zoom().scaleExtent([mt,gt]).translateExtent(pt),Ut=select($t.current).call(Nt),Mt=identity.translate(dt.x,dt.y).scale(clamp(dt.zoom,mt,gt)),Ht=[[0,0],[Ft.width,Ft.height]],en=Nt.constrain()(Mt,Ht,pt);Nt.transform(Ut,en),Nt.wheelDelta(wheelDelta),Tt.setState({d3Zoom:Nt,d3Selection:Ut,d3ZoomHandler:Ut.on("wheel.zoom"),transform:[en.x,en.y,en.k],domNode:$t.current.closest(".react-flow")})}},[]),reactExports.useEffect(()=>{Pt&&jt&&(at&&!It&&!wt?Pt.on("wheel.zoom",Ft=>{if(isWrappedWithClass(Ft,xt))return!1;Ft.preventDefault(),Ft.stopImmediatePropagation();const Nt=Pt.property("__zoom").k||1,Ut=isMacOs();if(Ft.ctrlKey&&ot&&Ut){const hn=pointer(Ft),vn=wheelDelta(Ft),an=Nt*Math.pow(2,vn);jt.scaleTo(Pt,an,hn,Ft);return}const Mt=Ft.deltaMode===1?20:1;let Ht=lt===PanOnScrollMode.Vertical?0:Ft.deltaX*Mt,en=lt===PanOnScrollMode.Horizontal?0:Ft.deltaY*Mt;!Ut&&Ft.shiftKey&<!==PanOnScrollMode.Vertical&&(Ht=Ft.deltaY*Mt,en=0),jt.translateBy(Pt,-(Ht/Nt)*st,-(en/Nt)*st,{internal:!0});const sn=eventToFlowTransform(Pt.property("__zoom")),{onViewportChangeStart:Kt,onViewportChange:rn,onViewportChangeEnd:nn}=Tt.getState();clearTimeout(zt.current),Wt.current||(Wt.current=!0,et==null||et(Ft,sn),Kt==null||Kt(sn)),Wt.current&&(tt==null||tt(Ft,sn),rn==null||rn(sn),zt.current=setTimeout(()=>{nt==null||nt(Ft,sn),nn==null||nn(sn),Wt.current=!1},150))},{passive:!1}):typeof Ct<"u"&&Pt.on("wheel.zoom",function(Ft,Nt){if(!bt||isWrappedWithClass(Ft,xt))return null;Ft.preventDefault(),Ct.call(this,Ft,Nt)},{passive:!1}))},[wt,at,lt,Pt,jt,Ct,It,ot,bt,xt,et,tt,nt]),reactExports.useEffect(()=>{jt&&jt.on("start",Ft=>{var Mt,Ht;if(!Ft.sourceEvent||Ft.sourceEvent.internal)return null;Ot.current=(Mt=Ft.sourceEvent)==null?void 0:Mt.button;const{onViewportChangeStart:Nt}=Tt.getState(),Ut=eventToFlowTransform(Ft.transform);At.current=!0,Dt.current=Ut,((Ht=Ft.sourceEvent)==null?void 0:Ht.type)==="mousedown"&&Tt.setState({paneDragging:!0}),Nt==null||Nt(Ut),et==null||et(Ft.sourceEvent,Ut)})},[jt,et]),reactExports.useEffect(()=>{jt&&(wt&&!At.current?jt.on("zoom",null):wt||jt.on("zoom",Ft=>{var Ut;const{onViewportChange:Nt}=Tt.getState();if(Tt.setState({transform:[Ft.transform.x,Ft.transform.y,Ft.transform.k]}),Et.current=!!(rt&&isRightClickPan(ht,Ot.current??0)),(tt||Nt)&&!((Ut=Ft.sourceEvent)!=null&&Ut.internal)){const Mt=eventToFlowTransform(Ft.transform);Nt==null||Nt(Mt),tt==null||tt(Ft.sourceEvent,Mt)}}))},[wt,jt,tt,ht,rt]),reactExports.useEffect(()=>{jt&&jt.on("end",Ft=>{if(!Ft.sourceEvent||Ft.sourceEvent.internal)return null;const{onViewportChangeEnd:Nt}=Tt.getState();if(At.current=!1,Tt.setState({paneDragging:!1}),rt&&isRightClickPan(ht,Ot.current??0)&&!Et.current&&rt(Ft.sourceEvent),Et.current=!1,(nt||Nt)&&viewChanged(Dt.current,Ft.transform)){const Ut=eventToFlowTransform(Ft.transform);Dt.current=Ut,clearTimeout(St.current),St.current=setTimeout(()=>{Nt==null||Nt(Ut),nt==null||nt(Ft.sourceEvent,Ut)},at?150:0)}})},[jt,at,ht,nt,rt]),reactExports.useEffect(()=>{jt&&jt.filter(Ft=>{const Nt=It||it,Ut=ot&&Ft.ctrlKey;if((ht===!0||Array.isArray(ht)&&ht.includes(1))&&Ft.button===1&&Ft.type==="mousedown"&&(isWrappedWithClass(Ft,"react-flow__node")||isWrappedWithClass(Ft,"react-flow__edge")))return!0;if(!ht&&!Nt&&!at&&!ct&&!ot||wt||!ct&&Ft.type==="dblclick"||isWrappedWithClass(Ft,xt)&&Ft.type==="wheel"||isWrappedWithClass(Ft,kt)&&(Ft.type!=="wheel"||at&&Ft.type==="wheel")||!ot&&Ft.ctrlKey&&Ft.type==="wheel"||!Nt&&!at&&!Ut&&Ft.type==="wheel"||!ht&&(Ft.type==="mousedown"||Ft.type==="touchstart")||Array.isArray(ht)&&!ht.includes(Ft.button)&&(Ft.type==="mousedown"||Ft.type==="touchstart"))return!1;const Mt=Array.isArray(ht)&&ht.includes(Ft.button)||!Ft.button||Ft.button<=1;return(!Ft.ctrlKey||Ft.type==="wheel")&&Mt})},[wt,jt,it,ot,at,ct,ht,ut,It]),React$1.createElement("div",{className:"react-flow__renderer",ref:$t,style:containerStyle},vt)},selector$9=tt=>({userSelectionActive:tt.userSelectionActive,userSelectionRect:tt.userSelectionRect});function UserSelection(){const{userSelectionActive:tt,userSelectionRect:et}=useStore(selector$9,shallow$1);return tt&&et?React$1.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:et.width,height:et.height,transform:`translate(${et.x}px, ${et.y}px)`}}):null}function handleParentExpand(tt,et){const nt=tt.find(rt=>rt.id===et.parentNode);if(nt){const rt=et.position.x+et.width-nt.width,it=et.position.y+et.height-nt.height;if(rt>0||it>0||et.position.x<0||et.position.y<0){if(nt.style={...nt.style},nt.style.width=nt.style.width??nt.width,nt.style.height=nt.style.height??nt.height,rt>0&&(nt.style.width+=rt),it>0&&(nt.style.height+=it),et.position.x<0){const ot=Math.abs(et.position.x);nt.position.x=nt.position.x-ot,nt.style.width+=ot,et.position.x=0}if(et.position.y<0){const ot=Math.abs(et.position.y);nt.position.y=nt.position.y-ot,nt.style.height+=ot,et.position.y=0}nt.width=nt.style.width,nt.height=nt.style.height}}}function applyChanges(tt,et){if(tt.some(rt=>rt.type==="reset"))return tt.filter(rt=>rt.type==="reset").map(rt=>rt.item);const nt=tt.filter(rt=>rt.type==="add").map(rt=>rt.item);return et.reduce((rt,it)=>{const ot=tt.filter(st=>st.id===it.id);if(ot.length===0)return rt.push(it),rt;const at={...it};for(const st of ot)if(st)switch(st.type){case"select":{at.selected=st.selected;break}case"position":{typeof st.position<"u"&&(at.position=st.position),typeof st.positionAbsolute<"u"&&(at.positionAbsolute=st.positionAbsolute),typeof st.dragging<"u"&&(at.dragging=st.dragging),at.expandParent&&handleParentExpand(rt,at);break}case"dimensions":{typeof st.dimensions<"u"&&(at.width=st.dimensions.width,at.height=st.dimensions.height),typeof st.updateStyle<"u"&&(at.style={...at.style||{},...st.dimensions}),typeof st.resizing=="boolean"&&(at.resizing=st.resizing),at.expandParent&&handleParentExpand(rt,at);break}case"remove":return rt}return rt.push(at),rt},nt)}function applyNodeChanges(tt,et){return applyChanges(tt,et)}const createSelectionChange=(tt,et)=>({id:tt,type:"select",selected:et});function getSelectionChanges(tt,et){return tt.reduce((nt,rt)=>{const it=et.includes(rt.id);return!rt.selected&&it?(rt.selected=!0,nt.push(createSelectionChange(rt.id,!0))):rt.selected&&!it&&(rt.selected=!1,nt.push(createSelectionChange(rt.id,!1))),nt},[])}const wrapHandler=(tt,et)=>nt=>{nt.target===et.current&&(tt==null||tt(nt))},selector$8=tt=>({userSelectionActive:tt.userSelectionActive,elementsSelectable:tt.elementsSelectable,dragging:tt.paneDragging}),Pane=reactExports.memo(({isSelecting:tt,selectionMode:et=SelectionMode.Full,panOnDrag:nt,onSelectionStart:rt,onSelectionEnd:it,onPaneClick:ot,onPaneContextMenu:at,onPaneScroll:st,onPaneMouseEnter:lt,onPaneMouseMove:ct,onPaneMouseLeave:ut,children:ht})=>{const dt=reactExports.useRef(null),pt=useStoreApi(),mt=reactExports.useRef(0),gt=reactExports.useRef(0),yt=reactExports.useRef(),{userSelectionActive:bt,elementsSelectable:vt,dragging:xt}=useStore(selector$8,shallow$1),kt=()=>{pt.setState({userSelectionActive:!1,userSelectionRect:null}),mt.current=0,gt.current=0},St=Ct=>{ot==null||ot(Ct),pt.getState().resetSelectedElements(),pt.setState({nodesSelectionActive:!1})},Tt=Ct=>{if(Array.isArray(nt)&&(nt!=null&&nt.includes(2))){Ct.preventDefault();return}at==null||at(Ct)},At=st?Ct=>st(Ct):void 0,Et=Ct=>{const{resetSelectedElements:wt,domNode:It}=pt.getState();if(yt.current=It==null?void 0:It.getBoundingClientRect(),!vt||!tt||Ct.button!==0||Ct.target!==dt.current||!yt.current)return;const{x:Ot,y:Wt}=getEventPosition(Ct,yt.current);wt(),pt.setState({userSelectionRect:{width:0,height:0,startX:Ot,startY:Wt,x:Ot,y:Wt}}),rt==null||rt(Ct)},$t=Ct=>{const{userSelectionRect:wt,nodeInternals:It,edges:Ot,transform:Wt,onNodesChange:zt,onEdgesChange:Ft,nodeOrigin:Nt,getNodes:Ut}=pt.getState();if(!tt||!yt.current||!wt)return;pt.setState({userSelectionActive:!0,nodesSelectionActive:!1});const Mt=getEventPosition(Ct,yt.current),Ht=wt.startX??0,en=wt.startY??0,sn={...wt,x:Mt.xvn.id),hn=rn.map(vn=>vn.id);if(mt.current!==hn.length){mt.current=hn.length;const vn=getSelectionChanges(Kt,hn);vn.length&&(zt==null||zt(vn))}if(gt.current!==nn.length){gt.current=nn.length;const vn=getSelectionChanges(Ot,nn);vn.length&&(Ft==null||Ft(vn))}pt.setState({userSelectionRect:sn})},Dt=Ct=>{if(Ct.button!==0)return;const{userSelectionRect:wt}=pt.getState();!bt&&wt&&Ct.target===dt.current&&(St==null||St(Ct)),pt.setState({nodesSelectionActive:mt.current>0}),kt(),it==null||it(Ct)},jt=Ct=>{bt&&(pt.setState({nodesSelectionActive:mt.current>0}),it==null||it(Ct)),kt()},Pt=vt&&(tt||bt);return React$1.createElement("div",{className:cc(["react-flow__pane",{dragging:xt,selection:tt}]),onClick:Pt?void 0:wrapHandler(St,dt),onContextMenu:wrapHandler(Tt,dt),onWheel:wrapHandler(At,dt),onMouseEnter:Pt?void 0:lt,onMouseDown:Pt?Et:void 0,onMouseMove:Pt?$t:ct,onMouseUp:Pt?Dt:void 0,onMouseLeave:Pt?jt:ut,ref:dt,style:containerStyle},ht,React$1.createElement(UserSelection,null))});Pane.displayName="Pane";function isParentSelected(tt,et){if(!tt.parentNode)return!1;const nt=et.get(tt.parentNode);return nt?nt.selected?!0:isParentSelected(nt,et):!1}function hasSelector(tt,et,nt){let rt=tt;do{if(rt!=null&&rt.matches(et))return!0;if(rt===nt.current)return!1;rt=rt.parentElement}while(rt);return!1}function getDragItems(tt,et,nt,rt){return Array.from(tt.values()).filter(it=>(it.selected||it.id===rt)&&(!it.parentNode||!isParentSelected(it,tt))&&(it.draggable||et&&typeof it.draggable>"u")).map(it=>{var ot,at;return{id:it.id,position:it.position||{x:0,y:0},positionAbsolute:it.positionAbsolute||{x:0,y:0},distance:{x:nt.x-(((ot=it.positionAbsolute)==null?void 0:ot.x)??0),y:nt.y-(((at=it.positionAbsolute)==null?void 0:at.y)??0)},delta:{x:0,y:0},extent:it.extent,parentNode:it.parentNode,width:it.width,height:it.height,expandParent:it.expandParent}})}function clampNodeExtent(tt,et){return!et||et==="parent"?et:[et[0],[et[1][0]-(tt.width||0),et[1][1]-(tt.height||0)]]}function calcNextPosition(tt,et,nt,rt,it=[0,0],ot){const at=clampNodeExtent(tt,tt.extent||rt);let st=at;if(tt.extent==="parent"&&!tt.expandParent)if(tt.parentNode&&tt.width&&tt.height){const ut=nt.get(tt.parentNode),{x:ht,y:dt}=getNodePositionWithOrigin(ut,it).positionAbsolute;st=ut&&isNumeric(ht)&&isNumeric(dt)&&isNumeric(ut.width)&&isNumeric(ut.height)?[[ht+tt.width*it[0],dt+tt.height*it[1]],[ht+ut.width-tt.width+tt.width*it[0],dt+ut.height-tt.height+tt.height*it[1]]]:st}else ot==null||ot("005",errorMessages.error005()),st=at;else if(tt.extent&&tt.parentNode&&tt.extent!=="parent"){const ut=nt.get(tt.parentNode),{x:ht,y:dt}=getNodePositionWithOrigin(ut,it).positionAbsolute;st=[[tt.extent[0][0]+ht,tt.extent[0][1]+dt],[tt.extent[1][0]+ht,tt.extent[1][1]+dt]]}let lt={x:0,y:0};if(tt.parentNode){const ut=nt.get(tt.parentNode);lt=getNodePositionWithOrigin(ut,it).positionAbsolute}const ct=st&&st!=="parent"?clampPosition(et,st):et;return{position:{x:ct.x-lt.x,y:ct.y-lt.y},positionAbsolute:ct}}function getEventHandlerParams({nodeId:tt,dragItems:et,nodeInternals:nt}){const rt=et.map(it=>({...nt.get(it.id),position:it.position,positionAbsolute:it.positionAbsolute}));return[tt?rt.find(it=>it.id===tt):rt[0],rt]}const getHandleBounds=(tt,et,nt,rt)=>{const it=et.querySelectorAll(tt);if(!it||!it.length)return null;const ot=Array.from(it),at=et.getBoundingClientRect(),st={x:at.width*rt[0],y:at.height*rt[1]};return ot.map(lt=>{const ct=lt.getBoundingClientRect();return{id:lt.getAttribute("data-handleid"),position:lt.getAttribute("data-handlepos"),x:(ct.left-at.left-st.x)/nt,y:(ct.top-at.top-st.y)/nt,...getDimensions(lt)}})};function getMouseHandler(tt,et,nt){return nt===void 0?nt:rt=>{const it=et().nodeInternals.get(tt);it&&nt(rt,{...it})}}function handleNodeClick({id:tt,store:et,unselect:nt=!1,nodeRef:rt}){const{addSelectedNodes:it,unselectNodesAndEdges:ot,multiSelectionActive:at,nodeInternals:st,onError:lt}=et.getState(),ct=st.get(tt);if(!ct){lt==null||lt("012",errorMessages.error012(tt));return}et.setState({nodesSelectionActive:!1}),ct.selected?(nt||ct.selected&&at)&&(ot({nodes:[ct],edges:[]}),requestAnimationFrame(()=>{var ut;return(ut=rt==null?void 0:rt.current)==null?void 0:ut.blur()})):it([tt])}function useGetPointerPosition(){const tt=useStoreApi();return reactExports.useCallback(({sourceEvent:nt})=>{const{transform:rt,snapGrid:it,snapToGrid:ot}=tt.getState(),at=nt.touches?nt.touches[0].clientX:nt.clientX,st=nt.touches?nt.touches[0].clientY:nt.clientY,lt={x:(at-rt[0])/rt[2],y:(st-rt[1])/rt[2]};return{xSnapped:ot?it[0]*Math.round(lt.x/it[0]):lt.x,ySnapped:ot?it[1]*Math.round(lt.y/it[1]):lt.y,...lt}},[])}function wrapSelectionDragFunc(tt){return(et,nt,rt)=>tt==null?void 0:tt(et,rt)}function useDrag({nodeRef:tt,disabled:et=!1,noDragClassName:nt,handleSelector:rt,nodeId:it,isSelectable:ot,selectNodesOnDrag:at}){const st=useStoreApi(),[lt,ct]=reactExports.useState(!1),ut=reactExports.useRef([]),ht=reactExports.useRef({x:null,y:null}),dt=reactExports.useRef(0),pt=reactExports.useRef(null),mt=reactExports.useRef({x:0,y:0}),gt=reactExports.useRef(null),yt=reactExports.useRef(!1),bt=reactExports.useRef(!1),vt=useGetPointerPosition();return reactExports.useEffect(()=>{if(tt!=null&&tt.current){const xt=select(tt.current),kt=({x:At,y:Et})=>{const{nodeInternals:$t,onNodeDrag:Dt,onSelectionDrag:jt,updateNodePositions:Pt,nodeExtent:Ct,snapGrid:wt,snapToGrid:It,nodeOrigin:Ot,onError:Wt}=st.getState();ht.current={x:At,y:Et};let zt=!1,Ft={x:0,y:0,x2:0,y2:0};if(ut.current.length>1&&Ct){const Ut=getRectOfNodes(ut.current,Ot);Ft=rectToBox(Ut)}if(ut.current=ut.current.map(Ut=>{const Mt={x:At-Ut.distance.x,y:Et-Ut.distance.y};It&&(Mt.x=wt[0]*Math.round(Mt.x/wt[0]),Mt.y=wt[1]*Math.round(Mt.y/wt[1]));const Ht=[[Ct[0][0],Ct[0][1]],[Ct[1][0],Ct[1][1]]];ut.current.length>1&&Ct&&!Ut.extent&&(Ht[0][0]=Ut.positionAbsolute.x-Ft.x+Ct[0][0],Ht[1][0]=Ut.positionAbsolute.x+(Ut.width??0)-Ft.x2+Ct[1][0],Ht[0][1]=Ut.positionAbsolute.y-Ft.y+Ct[0][1],Ht[1][1]=Ut.positionAbsolute.y+(Ut.height??0)-Ft.y2+Ct[1][1]);const en=calcNextPosition(Ut,Mt,$t,Ht,Ot,Wt);return zt=zt||Ut.position.x!==en.position.x||Ut.position.y!==en.position.y,Ut.position=en.position,Ut.positionAbsolute=en.positionAbsolute,Ut}),!zt)return;Pt(ut.current,!0,!0),ct(!0);const Nt=it?Dt:wrapSelectionDragFunc(jt);if(Nt&>.current){const[Ut,Mt]=getEventHandlerParams({nodeId:it,dragItems:ut.current,nodeInternals:$t});Nt(gt.current,Ut,Mt)}},St=()=>{if(!pt.current)return;const[At,Et]=calcAutoPan(mt.current,pt.current);if(At!==0||Et!==0){const{transform:$t,panBy:Dt}=st.getState();ht.current.x=(ht.current.x??0)-At/$t[2],ht.current.y=(ht.current.y??0)-Et/$t[2],Dt({x:At,y:Et})&&kt(ht.current)}dt.current=requestAnimationFrame(St)},Tt=At=>{var Ot;const{nodeInternals:Et,multiSelectionActive:$t,nodesDraggable:Dt,unselectNodesAndEdges:jt,onNodeDragStart:Pt,onSelectionDragStart:Ct}=st.getState();bt.current=!0;const wt=it?Pt:wrapSelectionDragFunc(Ct);(!at||!ot)&&!$t&&it&&((Ot=Et.get(it))!=null&&Ot.selected||jt()),it&&ot&&at&&handleNodeClick({id:it,store:st,nodeRef:tt});const It=vt(At);if(ht.current=It,ut.current=getDragItems(Et,Dt,It,it),wt&&ut.current){const[Wt,zt]=getEventHandlerParams({nodeId:it,dragItems:ut.current,nodeInternals:Et});wt(At.sourceEvent,Wt,zt)}};if(et)xt.on(".drag",null);else{const At=drag().on("start",Et=>{const{domNode:$t,nodeDragThreshold:Dt}=st.getState();Dt===0&&Tt(Et);const jt=vt(Et);ht.current=jt,pt.current=($t==null?void 0:$t.getBoundingClientRect())||null,mt.current=getEventPosition(Et.sourceEvent,pt.current)}).on("drag",Et=>{var Pt,Ct;const $t=vt(Et),{autoPanOnNodeDrag:Dt,nodeDragThreshold:jt}=st.getState();if(!yt.current&&bt.current&&Dt&&(yt.current=!0,St()),!bt.current){const wt=$t.xSnapped-(((Pt=ht==null?void 0:ht.current)==null?void 0:Pt.x)??0),It=$t.ySnapped-(((Ct=ht==null?void 0:ht.current)==null?void 0:Ct.y)??0);Math.sqrt(wt*wt+It*It)>jt&&Tt(Et)}(ht.current.x!==$t.xSnapped||ht.current.y!==$t.ySnapped)&&ut.current&&bt.current&&(gt.current=Et.sourceEvent,mt.current=getEventPosition(Et.sourceEvent,pt.current),kt($t))}).on("end",Et=>{if(bt.current&&(ct(!1),yt.current=!1,bt.current=!1,cancelAnimationFrame(dt.current),ut.current)){const{updateNodePositions:$t,nodeInternals:Dt,onNodeDragStop:jt,onSelectionDragStop:Pt}=st.getState(),Ct=it?jt:wrapSelectionDragFunc(Pt);if($t(ut.current,!1,!1),Ct){const[wt,It]=getEventHandlerParams({nodeId:it,dragItems:ut.current,nodeInternals:Dt});Ct(Et.sourceEvent,wt,It)}}}).filter(Et=>{const $t=Et.target;return!Et.button&&(!nt||!hasSelector($t,`.${nt}`,tt))&&(!rt||hasSelector($t,rt,tt))});return xt.call(At),()=>{xt.on(".drag",null)}}}},[tt,et,nt,rt,ot,st,it,at,vt]),lt}function useUpdateNodePositions(){const tt=useStoreApi();return reactExports.useCallback(nt=>{const{nodeInternals:rt,nodeExtent:it,updateNodePositions:ot,getNodes:at,snapToGrid:st,snapGrid:lt,onError:ct,nodesDraggable:ut}=tt.getState(),ht=at().filter(vt=>vt.selected&&(vt.draggable||ut&&typeof vt.draggable>"u")),dt=st?lt[0]:5,pt=st?lt[1]:5,mt=nt.isShiftPressed?4:1,gt=nt.x*dt*mt,yt=nt.y*pt*mt,bt=ht.map(vt=>{if(vt.positionAbsolute){const xt={x:vt.positionAbsolute.x+gt,y:vt.positionAbsolute.y+yt};st&&(xt.x=lt[0]*Math.round(xt.x/lt[0]),xt.y=lt[1]*Math.round(xt.y/lt[1]));const{positionAbsolute:kt,position:St}=calcNextPosition(vt,xt,rt,it,void 0,ct);vt.position=St,vt.positionAbsolute=kt}return vt});ot(bt,!0,!1)},[])}const arrowKeyDiffs={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var wrapNode=tt=>{const et=({id:nt,type:rt,data:it,xPos:ot,yPos:at,xPosOrigin:st,yPosOrigin:lt,selected:ct,onClick:ut,onMouseEnter:ht,onMouseMove:dt,onMouseLeave:pt,onContextMenu:mt,onDoubleClick:gt,style:yt,className:bt,isDraggable:vt,isSelectable:xt,isConnectable:kt,isFocusable:St,selectNodesOnDrag:Tt,sourcePosition:At,targetPosition:Et,hidden:$t,resizeObserver:Dt,dragHandle:jt,zIndex:Pt,isParent:Ct,noDragClassName:wt,noPanClassName:It,initialized:Ot,disableKeyboardA11y:Wt,ariaLabel:zt,rfId:Ft})=>{const Nt=useStoreApi(),Ut=reactExports.useRef(null),Mt=reactExports.useRef(At),Ht=reactExports.useRef(Et),en=reactExports.useRef(rt),sn=xt||vt||ut||ht||dt||pt,Kt=useUpdateNodePositions(),rn=getMouseHandler(nt,Nt.getState,ht),nn=getMouseHandler(nt,Nt.getState,dt),hn=getMouseHandler(nt,Nt.getState,pt),vn=getMouseHandler(nt,Nt.getState,mt),an=getMouseHandler(nt,Nt.getState,gt),Qt=$n=>{const{nodeDragThreshold:Nn}=Nt.getState();if(xt&&(!Tt||!vt||Nn>0)&&handleNodeClick({id:nt,store:Nt,nodeRef:Ut}),ut){const Tn=Nt.getState().nodeInternals.get(nt);Tn&&ut($n,{...Tn})}},_n=$n=>{if(!isInputDOMNode($n))if(elementSelectionKeys.includes($n.key)&&xt){const Nn=$n.key==="Escape";handleNodeClick({id:nt,store:Nt,unselect:Nn,nodeRef:Ut})}else!Wt&&vt&&ct&&Object.prototype.hasOwnProperty.call(arrowKeyDiffs,$n.key)&&(Nt.setState({ariaLiveMessage:`Moved selected node ${$n.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~ot}, y: ${~~at}`}),Kt({x:arrowKeyDiffs[$n.key].x,y:arrowKeyDiffs[$n.key].y,isShiftPressed:$n.shiftKey}))};reactExports.useEffect(()=>{if(Ut.current&&!$t){const $n=Ut.current;return Dt==null||Dt.observe($n),()=>Dt==null?void 0:Dt.unobserve($n)}},[$t]),reactExports.useEffect(()=>{const $n=en.current!==rt,Nn=Mt.current!==At,Tn=Ht.current!==Et;Ut.current&&($n||Nn||Tn)&&($n&&(en.current=rt),Nn&&(Mt.current=At),Tn&&(Ht.current=Et),Nt.getState().updateNodeDimensions([{id:nt,nodeElement:Ut.current,forceUpdate:!0}]))},[nt,rt,At,Et]);const Pn=useDrag({nodeRef:Ut,disabled:$t||!vt,noDragClassName:wt,handleSelector:jt,nodeId:nt,isSelectable:xt,selectNodesOnDrag:Tt});return $t?null:React$1.createElement("div",{className:cc(["react-flow__node",`react-flow__node-${rt}`,{[It]:vt},bt,{selected:ct,selectable:xt,parent:Ct,dragging:Pn}]),ref:Ut,style:{zIndex:Pt,transform:`translate(${st}px,${lt}px)`,pointerEvents:sn?"all":"none",visibility:Ot?"visible":"hidden",...yt},"data-id":nt,"data-testid":`rf__node-${nt}`,onMouseEnter:rn,onMouseMove:nn,onMouseLeave:hn,onContextMenu:vn,onClick:Qt,onDoubleClick:an,onKeyDown:St?_n:void 0,tabIndex:St?0:void 0,role:St?"button":void 0,"aria-describedby":Wt?void 0:`${ARIA_NODE_DESC_KEY}-${Ft}`,"aria-label":zt},React$1.createElement(Provider,{value:nt},React$1.createElement(tt,{id:nt,data:it,type:rt,xPos:ot,yPos:at,selected:ct,isConnectable:kt,sourcePosition:At,targetPosition:Et,dragging:Pn,dragHandle:jt,zIndex:Pt})))};return et.displayName="NodeWrapper",reactExports.memo(et)};const selector$7=tt=>{const et=tt.getNodes().filter(nt=>nt.selected);return{...getRectOfNodes(et,tt.nodeOrigin),transformString:`translate(${tt.transform[0]}px,${tt.transform[1]}px) scale(${tt.transform[2]})`,userSelectionActive:tt.userSelectionActive}};function NodesSelection({onSelectionContextMenu:tt,noPanClassName:et,disableKeyboardA11y:nt}){const rt=useStoreApi(),{width:it,height:ot,x:at,y:st,transformString:lt,userSelectionActive:ct}=useStore(selector$7,shallow$1),ut=useUpdateNodePositions(),ht=reactExports.useRef(null);if(reactExports.useEffect(()=>{var mt;nt||(mt=ht.current)==null||mt.focus({preventScroll:!0})},[nt]),useDrag({nodeRef:ht}),ct||!it||!ot)return null;const dt=tt?mt=>{const gt=rt.getState().getNodes().filter(yt=>yt.selected);tt(mt,gt)}:void 0,pt=mt=>{Object.prototype.hasOwnProperty.call(arrowKeyDiffs,mt.key)&&ut({x:arrowKeyDiffs[mt.key].x,y:arrowKeyDiffs[mt.key].y,isShiftPressed:mt.shiftKey})};return React$1.createElement("div",{className:cc(["react-flow__nodesselection","react-flow__container",et]),style:{transform:lt}},React$1.createElement("div",{ref:ht,className:"react-flow__nodesselection-rect",onContextMenu:dt,tabIndex:nt?void 0:-1,onKeyDown:nt?void 0:pt,style:{width:it,height:ot,top:st,left:at}}))}var NodesSelection$1=reactExports.memo(NodesSelection);const selector$6=tt=>tt.nodesSelectionActive,FlowRenderer=({children:tt,onPaneClick:et,onPaneMouseEnter:nt,onPaneMouseMove:rt,onPaneMouseLeave:it,onPaneContextMenu:ot,onPaneScroll:at,deleteKeyCode:st,onMove:lt,onMoveStart:ct,onMoveEnd:ut,selectionKeyCode:ht,selectionOnDrag:dt,selectionMode:pt,onSelectionStart:mt,onSelectionEnd:gt,multiSelectionKeyCode:yt,panActivationKeyCode:bt,zoomActivationKeyCode:vt,elementsSelectable:xt,zoomOnScroll:kt,zoomOnPinch:St,panOnScroll:Tt,panOnScrollSpeed:At,panOnScrollMode:Et,zoomOnDoubleClick:$t,panOnDrag:Dt,defaultViewport:jt,translateExtent:Pt,minZoom:Ct,maxZoom:wt,preventScrolling:It,onSelectionContextMenu:Ot,noWheelClassName:Wt,noPanClassName:zt,disableKeyboardA11y:Ft})=>{const Nt=useStore(selector$6),Ut=useKeyPress(ht),Ht=useKeyPress(bt)||Dt,en=Ut||dt&&Ht!==!0;return useGlobalKeyHandler({deleteKeyCode:st,multiSelectionKeyCode:yt}),React$1.createElement(ZoomPane,{onMove:lt,onMoveStart:ct,onMoveEnd:ut,onPaneContextMenu:ot,elementsSelectable:xt,zoomOnScroll:kt,zoomOnPinch:St,panOnScroll:Tt,panOnScrollSpeed:At,panOnScrollMode:Et,zoomOnDoubleClick:$t,panOnDrag:!Ut&&Ht,defaultViewport:jt,translateExtent:Pt,minZoom:Ct,maxZoom:wt,zoomActivationKeyCode:vt,preventScrolling:It,noWheelClassName:Wt,noPanClassName:zt},React$1.createElement(Pane,{onSelectionStart:mt,onSelectionEnd:gt,onPaneClick:et,onPaneMouseEnter:nt,onPaneMouseMove:rt,onPaneMouseLeave:it,onPaneContextMenu:ot,onPaneScroll:at,panOnDrag:Ht,isSelecting:!!en,selectionMode:pt},tt,Nt&&React$1.createElement(NodesSelection$1,{onSelectionContextMenu:Ot,noPanClassName:zt,disableKeyboardA11y:Ft})))};FlowRenderer.displayName="FlowRenderer";var FlowRenderer$1=reactExports.memo(FlowRenderer);function useVisibleNodes(tt){return useStore(reactExports.useCallback(nt=>tt?getNodesInside(nt.nodeInternals,{x:0,y:0,width:nt.width,height:nt.height},nt.transform,!0):nt.getNodes(),[tt]))}function createNodeTypes(tt){const et={input:wrapNode(tt.input||InputNode$1),default:wrapNode(tt.default||DefaultNode$1),output:wrapNode(tt.output||OutputNode$1),group:wrapNode(tt.group||GroupNode)},nt={},rt=Object.keys(tt).filter(it=>!["input","default","output","group"].includes(it)).reduce((it,ot)=>(it[ot]=wrapNode(tt[ot]||DefaultNode$1),it),nt);return{...et,...rt}}const getPositionWithOrigin=({x:tt,y:et,width:nt,height:rt,origin:it})=>!nt||!rt?{x:tt,y:et}:it[0]<0||it[1]<0||it[0]>1||it[1]>1?{x:tt,y:et}:{x:tt-nt*it[0],y:et-rt*it[1]},selector$5=tt=>({nodesDraggable:tt.nodesDraggable,nodesConnectable:tt.nodesConnectable,nodesFocusable:tt.nodesFocusable,elementsSelectable:tt.elementsSelectable,updateNodeDimensions:tt.updateNodeDimensions,onError:tt.onError}),NodeRenderer=tt=>{const{nodesDraggable:et,nodesConnectable:nt,nodesFocusable:rt,elementsSelectable:it,updateNodeDimensions:ot,onError:at}=useStore(selector$5,shallow$1),st=useVisibleNodes(tt.onlyRenderVisibleElements),lt=reactExports.useRef(),ct=reactExports.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const ut=new ResizeObserver(ht=>{const dt=ht.map(pt=>({id:pt.target.getAttribute("data-id"),nodeElement:pt.target,forceUpdate:!0}));ot(dt)});return lt.current=ut,ut},[]);return reactExports.useEffect(()=>()=>{var ut;(ut=lt==null?void 0:lt.current)==null||ut.disconnect()},[]),React$1.createElement("div",{className:"react-flow__nodes",style:containerStyle},st.map(ut=>{var St,Tt;let ht=ut.type||"default";tt.nodeTypes[ht]||(at==null||at("003",errorMessages.error003(ht)),ht="default");const dt=tt.nodeTypes[ht]||tt.nodeTypes.default,pt=!!(ut.draggable||et&&typeof ut.draggable>"u"),mt=!!(ut.selectable||it&&typeof ut.selectable>"u"),gt=!!(ut.connectable||nt&&typeof ut.connectable>"u"),yt=!!(ut.focusable||rt&&typeof ut.focusable>"u"),bt=tt.nodeExtent?clampPosition(ut.positionAbsolute,tt.nodeExtent):ut.positionAbsolute,vt=(bt==null?void 0:bt.x)??0,xt=(bt==null?void 0:bt.y)??0,kt=getPositionWithOrigin({x:vt,y:xt,width:ut.width??0,height:ut.height??0,origin:tt.nodeOrigin});return React$1.createElement(dt,{key:ut.id,id:ut.id,className:ut.className,style:ut.style,type:ht,data:ut.data,sourcePosition:ut.sourcePosition||Position.Bottom,targetPosition:ut.targetPosition||Position.Top,hidden:ut.hidden,xPos:vt,yPos:xt,xPosOrigin:kt.x,yPosOrigin:kt.y,selectNodesOnDrag:tt.selectNodesOnDrag,onClick:tt.onNodeClick,onMouseEnter:tt.onNodeMouseEnter,onMouseMove:tt.onNodeMouseMove,onMouseLeave:tt.onNodeMouseLeave,onContextMenu:tt.onNodeContextMenu,onDoubleClick:tt.onNodeDoubleClick,selected:!!ut.selected,isDraggable:pt,isSelectable:mt,isConnectable:gt,isFocusable:yt,resizeObserver:ct,dragHandle:ut.dragHandle,zIndex:((St=ut[internalsSymbol])==null?void 0:St.z)??0,isParent:!!((Tt=ut[internalsSymbol])!=null&&Tt.isParent),noDragClassName:tt.noDragClassName,noPanClassName:tt.noPanClassName,initialized:!!ut.width&&!!ut.height,rfId:tt.rfId,disableKeyboardA11y:tt.disableKeyboardA11y,ariaLabel:ut.ariaLabel})}))};NodeRenderer.displayName="NodeRenderer";var NodeRenderer$1=reactExports.memo(NodeRenderer);const shiftX=(tt,et,nt)=>nt===Position.Left?tt-et:nt===Position.Right?tt+et:tt,shiftY=(tt,et,nt)=>nt===Position.Top?tt-et:nt===Position.Bottom?tt+et:tt,EdgeUpdaterClassName="react-flow__edgeupdater",EdgeAnchor=({position:tt,centerX:et,centerY:nt,radius:rt=10,onMouseDown:it,onMouseEnter:ot,onMouseOut:at,type:st})=>React$1.createElement("circle",{onMouseDown:it,onMouseEnter:ot,onMouseOut:at,className:cc([EdgeUpdaterClassName,`${EdgeUpdaterClassName}-${st}`]),cx:shiftX(et,rt,tt),cy:shiftY(nt,rt,tt),r:rt,stroke:"transparent",fill:"transparent"}),alwaysValidConnection=()=>!0;var wrapEdge=tt=>{const et=({id:nt,className:rt,type:it,data:ot,onClick:at,onEdgeDoubleClick:st,selected:lt,animated:ct,label:ut,labelStyle:ht,labelShowBg:dt,labelBgStyle:pt,labelBgPadding:mt,labelBgBorderRadius:gt,style:yt,source:bt,target:vt,sourceX:xt,sourceY:kt,targetX:St,targetY:Tt,sourcePosition:At,targetPosition:Et,elementsSelectable:$t,hidden:Dt,sourceHandleId:jt,targetHandleId:Pt,onContextMenu:Ct,onMouseEnter:wt,onMouseMove:It,onMouseLeave:Ot,edgeUpdaterRadius:Wt,onEdgeUpdate:zt,onEdgeUpdateStart:Ft,onEdgeUpdateEnd:Nt,markerEnd:Ut,markerStart:Mt,rfId:Ht,ariaLabel:en,isFocusable:sn,isUpdatable:Kt,pathOptions:rn,interactionWidth:nn})=>{const hn=reactExports.useRef(null),[vn,an]=reactExports.useState(!1),[Qt,_n]=reactExports.useState(!1),Pn=useStoreApi(),$n=reactExports.useMemo(()=>`url(#${getMarkerId(Mt,Ht)})`,[Mt,Ht]),Nn=reactExports.useMemo(()=>`url(#${getMarkerId(Ut,Ht)})`,[Ut,Ht]);if(Dt)return null;const Tn=Sn=>{var qn;const{edges:Rn,addSelectedEdges:jn,unselectNodesAndEdges:On,multiSelectionActive:Zn}=Pn.getState(),Vn=Rn.find(zn=>zn.id===nt);Vn&&($t&&(Pn.setState({nodesSelectionActive:!1}),Vn.selected&&Zn?(On({nodes:[],edges:[Vn]}),(qn=hn.current)==null||qn.blur()):jn([nt])),at&&at(Sn,Vn))},cn=getMouseHandler$1(nt,Pn.getState,st),mn=getMouseHandler$1(nt,Pn.getState,Ct),In=getMouseHandler$1(nt,Pn.getState,wt),An=getMouseHandler$1(nt,Pn.getState,It),wn=getMouseHandler$1(nt,Pn.getState,Ot),fn=(Sn,Rn)=>{if(Sn.button!==0)return;const{edges:jn,isValidConnection:On}=Pn.getState(),Zn=Rn?vt:bt,Vn=(Rn?Pt:jt)||null,qn=Rn?"target":"source",zn=On||alwaysValidConnection,Jn=Rn,Hn=jn.find(xr=>xr.id===nt);_n(!0),Ft==null||Ft(Sn,Hn,qn);const pr=xr=>{_n(!1),Nt==null||Nt(xr,Hn,qn)};handlePointerDown({event:Sn,handleId:Vn,nodeId:Zn,onConnect:xr=>zt==null?void 0:zt(Hn,xr),isTarget:Jn,getState:Pn.getState,setState:Pn.setState,isValidConnection:zn,edgeUpdaterType:qn,onEdgeUpdateEnd:pr})},pn=Sn=>fn(Sn,!0),kn=Sn=>fn(Sn,!1),Dn=()=>an(!0),un=()=>an(!1),Zt=!$t&&!at,Xt=Sn=>{var Rn;if(elementSelectionKeys.includes(Sn.key)&&$t){const{unselectNodesAndEdges:jn,addSelectedEdges:On,edges:Zn}=Pn.getState();Sn.key==="Escape"?((Rn=hn.current)==null||Rn.blur(),jn({edges:[Zn.find(qn=>qn.id===nt)]})):On([nt])}};return React$1.createElement("g",{className:cc(["react-flow__edge",`react-flow__edge-${it}`,rt,{selected:lt,animated:ct,inactive:Zt,updating:vn}]),onClick:Tn,onDoubleClick:cn,onContextMenu:mn,onMouseEnter:In,onMouseMove:An,onMouseLeave:wn,onKeyDown:sn?Xt:void 0,tabIndex:sn?0:void 0,role:sn?"button":"img","data-testid":`rf__edge-${nt}`,"aria-label":en===null?void 0:en||`Edge from ${bt} to ${vt}`,"aria-describedby":sn?`${ARIA_EDGE_DESC_KEY}-${Ht}`:void 0,ref:hn},!Qt&&React$1.createElement(tt,{id:nt,source:bt,target:vt,selected:lt,animated:ct,label:ut,labelStyle:ht,labelShowBg:dt,labelBgStyle:pt,labelBgPadding:mt,labelBgBorderRadius:gt,data:ot,style:yt,sourceX:xt,sourceY:kt,targetX:St,targetY:Tt,sourcePosition:At,targetPosition:Et,sourceHandleId:jt,targetHandleId:Pt,markerStart:$n,markerEnd:Nn,pathOptions:rn,interactionWidth:nn}),Kt&&React$1.createElement(React$1.Fragment,null,(Kt==="source"||Kt===!0)&&React$1.createElement(EdgeAnchor,{position:At,centerX:xt,centerY:kt,radius:Wt,onMouseDown:pn,onMouseEnter:Dn,onMouseOut:un,type:"source"}),(Kt==="target"||Kt===!0)&&React$1.createElement(EdgeAnchor,{position:Et,centerX:St,centerY:Tt,radius:Wt,onMouseDown:kn,onMouseEnter:Dn,onMouseOut:un,type:"target"})))};return et.displayName="EdgeWrapper",reactExports.memo(et)};function createEdgeTypes(tt){const et={default:wrapEdge(tt.default||BezierEdge),straight:wrapEdge(tt.bezier||StraightEdge),step:wrapEdge(tt.step||StepEdge),smoothstep:wrapEdge(tt.step||SmoothStepEdge),simplebezier:wrapEdge(tt.simplebezier||SimpleBezierEdge)},nt={},rt=Object.keys(tt).filter(it=>!["default","bezier"].includes(it)).reduce((it,ot)=>(it[ot]=wrapEdge(tt[ot]||BezierEdge),it),nt);return{...et,...rt}}function getHandlePosition(tt,et,nt=null){const rt=((nt==null?void 0:nt.x)||0)+et.x,it=((nt==null?void 0:nt.y)||0)+et.y,ot=(nt==null?void 0:nt.width)||et.width,at=(nt==null?void 0:nt.height)||et.height;switch(tt){case Position.Top:return{x:rt+ot/2,y:it};case Position.Right:return{x:rt+ot,y:it+at/2};case Position.Bottom:return{x:rt+ot/2,y:it+at};case Position.Left:return{x:rt,y:it+at/2}}}function getHandle(tt,et){return tt?tt.length===1||!et?tt[0]:et&&tt.find(nt=>nt.id===et)||null:null}const getEdgePositions=(tt,et,nt,rt,it,ot)=>{const at=getHandlePosition(nt,tt,et),st=getHandlePosition(ot,rt,it);return{sourceX:at.x,sourceY:at.y,targetX:st.x,targetY:st.y}};function isEdgeVisible({sourcePos:tt,targetPos:et,sourceWidth:nt,sourceHeight:rt,targetWidth:it,targetHeight:ot,width:at,height:st,transform:lt}){const ct={x:Math.min(tt.x,et.x),y:Math.min(tt.y,et.y),x2:Math.max(tt.x+nt,et.x+it),y2:Math.max(tt.y+rt,et.y+ot)};ct.x===ct.x2&&(ct.x2+=1),ct.y===ct.y2&&(ct.y2+=1);const ut=rectToBox({x:(0-lt[0])/lt[2],y:(0-lt[1])/lt[2],width:at/lt[2],height:st/lt[2]}),ht=Math.max(0,Math.min(ut.x2,ct.x2)-Math.max(ut.x,ct.x)),dt=Math.max(0,Math.min(ut.y2,ct.y2)-Math.max(ut.y,ct.y));return Math.ceil(ht*dt)>0}function getNodeData(tt){var rt,it,ot,at,st;const et=((rt=tt==null?void 0:tt[internalsSymbol])==null?void 0:rt.handleBounds)||null,nt=et&&(tt==null?void 0:tt.width)&&(tt==null?void 0:tt.height)&&typeof((it=tt==null?void 0:tt.positionAbsolute)==null?void 0:it.x)<"u"&&typeof((ot=tt==null?void 0:tt.positionAbsolute)==null?void 0:ot.y)<"u";return[{x:((at=tt==null?void 0:tt.positionAbsolute)==null?void 0:at.x)||0,y:((st=tt==null?void 0:tt.positionAbsolute)==null?void 0:st.y)||0,width:(tt==null?void 0:tt.width)||0,height:(tt==null?void 0:tt.height)||0},et,!!nt]}const defaultEdgeTree=[{level:0,isMaxLevel:!0,edges:[]}];function groupEdgesByZLevel(tt,et,nt=!1){let rt=-1;const it=tt.reduce((at,st)=>{var ut,ht;const lt=isNumeric(st.zIndex);let ct=lt?st.zIndex:0;if(nt){const dt=et.get(st.target),pt=et.get(st.source),mt=st.selected||(dt==null?void 0:dt.selected)||(pt==null?void 0:pt.selected),gt=Math.max(((ut=pt==null?void 0:pt[internalsSymbol])==null?void 0:ut.z)||0,((ht=dt==null?void 0:dt[internalsSymbol])==null?void 0:ht.z)||0,1e3);ct=(lt?st.zIndex:0)+(mt?gt:0)}return at[ct]?at[ct].push(st):at[ct]=[st],rt=ct>rt?ct:rt,at},{}),ot=Object.entries(it).map(([at,st])=>{const lt=+at;return{edges:st,level:lt,isMaxLevel:lt===rt}});return ot.length===0?defaultEdgeTree:ot}function useVisibleEdges(tt,et,nt){const rt=useStore(reactExports.useCallback(it=>tt?it.edges.filter(ot=>{const at=et.get(ot.source),st=et.get(ot.target);return(at==null?void 0:at.width)&&(at==null?void 0:at.height)&&(st==null?void 0:st.width)&&(st==null?void 0:st.height)&&isEdgeVisible({sourcePos:at.positionAbsolute||{x:0,y:0},targetPos:st.positionAbsolute||{x:0,y:0},sourceWidth:at.width,sourceHeight:at.height,targetWidth:st.width,targetHeight:st.height,width:it.width,height:it.height,transform:it.transform})}):it.edges,[tt,et]));return groupEdgesByZLevel(rt,et,nt)}const ArrowSymbol=({color:tt="none",strokeWidth:et=1})=>React$1.createElement("polyline",{style:{stroke:tt,strokeWidth:et},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),ArrowClosedSymbol=({color:tt="none",strokeWidth:et=1})=>React$1.createElement("polyline",{style:{stroke:tt,fill:tt,strokeWidth:et},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),MarkerSymbols={[MarkerType.Arrow]:ArrowSymbol,[MarkerType.ArrowClosed]:ArrowClosedSymbol};function useMarkerSymbol(tt){const et=useStoreApi();return reactExports.useMemo(()=>{var it,ot;return Object.prototype.hasOwnProperty.call(MarkerSymbols,tt)?MarkerSymbols[tt]:((ot=(it=et.getState()).onError)==null||ot.call(it,"009",errorMessages.error009(tt)),null)},[tt])}const Marker=({id:tt,type:et,color:nt,width:rt=12.5,height:it=12.5,markerUnits:ot="strokeWidth",strokeWidth:at,orient:st="auto-start-reverse"})=>{const lt=useMarkerSymbol(et);return lt?React$1.createElement("marker",{className:"react-flow__arrowhead",id:tt,markerWidth:`${rt}`,markerHeight:`${it}`,viewBox:"-10 -10 20 20",markerUnits:ot,orient:st,refX:"0",refY:"0"},React$1.createElement(lt,{color:nt,strokeWidth:at})):null},markerSelector=({defaultColor:tt,rfId:et})=>nt=>{const rt=[];return nt.edges.reduce((it,ot)=>([ot.markerStart,ot.markerEnd].forEach(at=>{if(at&&typeof at=="object"){const st=getMarkerId(at,et);rt.includes(st)||(it.push({id:st,color:at.color||tt,...at}),rt.push(st))}}),it),[]).sort((it,ot)=>it.id.localeCompare(ot.id))},MarkerDefinitions=({defaultColor:tt,rfId:et})=>{const nt=useStore(reactExports.useCallback(markerSelector({defaultColor:tt,rfId:et}),[tt,et]),(rt,it)=>!(rt.length!==it.length||rt.some((ot,at)=>ot.id!==it[at].id)));return React$1.createElement("defs",null,nt.map(rt=>React$1.createElement(Marker,{id:rt.id,key:rt.id,type:rt.type,color:rt.color,width:rt.width,height:rt.height,markerUnits:rt.markerUnits,strokeWidth:rt.strokeWidth,orient:rt.orient})))};MarkerDefinitions.displayName="MarkerDefinitions";var MarkerDefinitions$1=reactExports.memo(MarkerDefinitions);const selector$4=tt=>({nodesConnectable:tt.nodesConnectable,edgesFocusable:tt.edgesFocusable,edgesUpdatable:tt.edgesUpdatable,elementsSelectable:tt.elementsSelectable,width:tt.width,height:tt.height,connectionMode:tt.connectionMode,nodeInternals:tt.nodeInternals,onError:tt.onError}),EdgeRenderer=({defaultMarkerColor:tt,onlyRenderVisibleElements:et,elevateEdgesOnSelect:nt,rfId:rt,edgeTypes:it,noPanClassName:ot,onEdgeUpdate:at,onEdgeContextMenu:st,onEdgeMouseEnter:lt,onEdgeMouseMove:ct,onEdgeMouseLeave:ut,onEdgeClick:ht,edgeUpdaterRadius:dt,onEdgeDoubleClick:pt,onEdgeUpdateStart:mt,onEdgeUpdateEnd:gt,children:yt})=>{const{edgesFocusable:bt,edgesUpdatable:vt,elementsSelectable:xt,width:kt,height:St,connectionMode:Tt,nodeInternals:At,onError:Et}=useStore(selector$4,shallow$1),$t=useVisibleEdges(et,At,nt);return kt?React$1.createElement(React$1.Fragment,null,$t.map(({level:Dt,edges:jt,isMaxLevel:Pt})=>React$1.createElement("svg",{key:Dt,style:{zIndex:Dt},width:kt,height:St,className:"react-flow__edges react-flow__container"},Pt&&React$1.createElement(MarkerDefinitions$1,{defaultColor:tt,rfId:rt}),React$1.createElement("g",null,jt.map(Ct=>{const[wt,It,Ot]=getNodeData(At.get(Ct.source)),[Wt,zt,Ft]=getNodeData(At.get(Ct.target));if(!Ot||!Ft)return null;let Nt=Ct.type||"default";it[Nt]||(Et==null||Et("011",errorMessages.error011(Nt)),Nt="default");const Ut=it[Nt]||it.default,Mt=Tt===ConnectionMode.Strict?zt.target:(zt.target??[]).concat(zt.source??[]),Ht=getHandle(It.source,Ct.sourceHandle),en=getHandle(Mt,Ct.targetHandle),sn=(Ht==null?void 0:Ht.position)||Position.Bottom,Kt=(en==null?void 0:en.position)||Position.Top,rn=!!(Ct.focusable||bt&&typeof Ct.focusable>"u"),nn=typeof at<"u"&&(Ct.updatable||vt&&typeof Ct.updatable>"u");if(!Ht||!en)return Et==null||Et("008",errorMessages.error008(Ht,Ct)),null;const{sourceX:hn,sourceY:vn,targetX:an,targetY:Qt}=getEdgePositions(wt,Ht,sn,Wt,en,Kt);return React$1.createElement(Ut,{key:Ct.id,id:Ct.id,className:cc([Ct.className,ot]),type:Nt,data:Ct.data,selected:!!Ct.selected,animated:!!Ct.animated,hidden:!!Ct.hidden,label:Ct.label,labelStyle:Ct.labelStyle,labelShowBg:Ct.labelShowBg,labelBgStyle:Ct.labelBgStyle,labelBgPadding:Ct.labelBgPadding,labelBgBorderRadius:Ct.labelBgBorderRadius,style:Ct.style,source:Ct.source,target:Ct.target,sourceHandleId:Ct.sourceHandle,targetHandleId:Ct.targetHandle,markerEnd:Ct.markerEnd,markerStart:Ct.markerStart,sourceX:hn,sourceY:vn,targetX:an,targetY:Qt,sourcePosition:sn,targetPosition:Kt,elementsSelectable:xt,onEdgeUpdate:at,onContextMenu:st,onMouseEnter:lt,onMouseMove:ct,onMouseLeave:ut,onClick:ht,edgeUpdaterRadius:dt,onEdgeDoubleClick:pt,onEdgeUpdateStart:mt,onEdgeUpdateEnd:gt,rfId:rt,ariaLabel:Ct.ariaLabel,isFocusable:rn,isUpdatable:nn,pathOptions:"pathOptions"in Ct?Ct.pathOptions:void 0,interactionWidth:Ct.interactionWidth})})))),yt):null};EdgeRenderer.displayName="EdgeRenderer";var EdgeRenderer$1=reactExports.memo(EdgeRenderer);const selector$3=tt=>`translate(${tt.transform[0]}px,${tt.transform[1]}px) scale(${tt.transform[2]})`;function Viewport({children:tt}){const et=useStore(selector$3);return React$1.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:et}},tt)}function useOnInitHandler(tt){const et=useReactFlow(),nt=reactExports.useRef(!1);reactExports.useEffect(()=>{!nt.current&&et.viewportInitialized&&tt&&(setTimeout(()=>tt(et),1),nt.current=!0)},[tt,et.viewportInitialized])}const oppositePosition={[Position.Left]:Position.Right,[Position.Right]:Position.Left,[Position.Top]:Position.Bottom,[Position.Bottom]:Position.Top},ConnectionLine=({nodeId:tt,handleType:et,style:nt,type:rt=ConnectionLineType.Bezier,CustomComponent:it,connectionStatus:ot})=>{var Tt,At,Et;const{fromNode:at,handleId:st,toX:lt,toY:ct,connectionMode:ut}=useStore(reactExports.useCallback($t=>({fromNode:$t.nodeInternals.get(tt),handleId:$t.connectionHandleId,toX:($t.connectionPosition.x-$t.transform[0])/$t.transform[2],toY:($t.connectionPosition.y-$t.transform[1])/$t.transform[2],connectionMode:$t.connectionMode}),[tt]),shallow$1),ht=(Tt=at==null?void 0:at[internalsSymbol])==null?void 0:Tt.handleBounds;let dt=ht==null?void 0:ht[et];if(ut===ConnectionMode.Loose&&(dt=dt||(ht==null?void 0:ht[et==="source"?"target":"source"])),!at||!dt)return null;const pt=st?dt.find($t=>$t.id===st):dt[0],mt=pt?pt.x+pt.width/2:(at.width??0)/2,gt=pt?pt.y+pt.height/2:at.height??0,yt=(((At=at.positionAbsolute)==null?void 0:At.x)??0)+mt,bt=(((Et=at.positionAbsolute)==null?void 0:Et.y)??0)+gt,vt=pt==null?void 0:pt.position,xt=vt?oppositePosition[vt]:null;if(!vt||!xt)return null;if(it)return React$1.createElement(it,{connectionLineType:rt,connectionLineStyle:nt,fromNode:at,fromHandle:pt,fromX:yt,fromY:bt,toX:lt,toY:ct,fromPosition:vt,toPosition:xt,connectionStatus:ot});let kt="";const St={sourceX:yt,sourceY:bt,sourcePosition:vt,targetX:lt,targetY:ct,targetPosition:xt};return rt===ConnectionLineType.Bezier?[kt]=getBezierPath(St):rt===ConnectionLineType.Step?[kt]=getSmoothStepPath({...St,borderRadius:0}):rt===ConnectionLineType.SmoothStep?[kt]=getSmoothStepPath(St):rt===ConnectionLineType.SimpleBezier?[kt]=getSimpleBezierPath(St):kt=`M${yt},${bt} ${lt},${ct}`,React$1.createElement("path",{d:kt,fill:"none",className:"react-flow__connection-path",style:nt})};ConnectionLine.displayName="ConnectionLine";const selector$2=tt=>({nodeId:tt.connectionNodeId,handleType:tt.connectionHandleType,nodesConnectable:tt.nodesConnectable,connectionStatus:tt.connectionStatus,width:tt.width,height:tt.height});function ConnectionLineWrapper({containerStyle:tt,style:et,type:nt,component:rt}){const{nodeId:it,handleType:ot,nodesConnectable:at,width:st,height:lt,connectionStatus:ct}=useStore(selector$2,shallow$1);return!(it&&ot&&st&&at)?null:React$1.createElement("svg",{style:tt,width:st,height:lt,className:"react-flow__edges react-flow__connectionline react-flow__container"},React$1.createElement("g",{className:cc(["react-flow__connection",ct])},React$1.createElement(ConnectionLine,{nodeId:it,handleType:ot,style:et,type:nt,CustomComponent:rt,connectionStatus:ct})))}function useNodeOrEdgeTypes(tt,et){return reactExports.useRef(null),useStoreApi(),reactExports.useMemo(()=>et(tt),[tt])}const GraphView=({nodeTypes:tt,edgeTypes:et,onMove:nt,onMoveStart:rt,onMoveEnd:it,onInit:ot,onNodeClick:at,onEdgeClick:st,onNodeDoubleClick:lt,onEdgeDoubleClick:ct,onNodeMouseEnter:ut,onNodeMouseMove:ht,onNodeMouseLeave:dt,onNodeContextMenu:pt,onSelectionContextMenu:mt,onSelectionStart:gt,onSelectionEnd:yt,connectionLineType:bt,connectionLineStyle:vt,connectionLineComponent:xt,connectionLineContainerStyle:kt,selectionKeyCode:St,selectionOnDrag:Tt,selectionMode:At,multiSelectionKeyCode:Et,panActivationKeyCode:$t,zoomActivationKeyCode:Dt,deleteKeyCode:jt,onlyRenderVisibleElements:Pt,elementsSelectable:Ct,selectNodesOnDrag:wt,defaultViewport:It,translateExtent:Ot,minZoom:Wt,maxZoom:zt,preventScrolling:Ft,defaultMarkerColor:Nt,zoomOnScroll:Ut,zoomOnPinch:Mt,panOnScroll:Ht,panOnScrollSpeed:en,panOnScrollMode:sn,zoomOnDoubleClick:Kt,panOnDrag:rn,onPaneClick:nn,onPaneMouseEnter:hn,onPaneMouseMove:vn,onPaneMouseLeave:an,onPaneScroll:Qt,onPaneContextMenu:_n,onEdgeUpdate:Pn,onEdgeContextMenu:$n,onEdgeMouseEnter:Nn,onEdgeMouseMove:Tn,onEdgeMouseLeave:cn,edgeUpdaterRadius:mn,onEdgeUpdateStart:In,onEdgeUpdateEnd:An,noDragClassName:wn,noWheelClassName:fn,noPanClassName:pn,elevateEdgesOnSelect:kn,disableKeyboardA11y:Dn,nodeOrigin:un,nodeExtent:Zt,rfId:Xt})=>{const Sn=useNodeOrEdgeTypes(tt,createNodeTypes),Rn=useNodeOrEdgeTypes(et,createEdgeTypes);return useOnInitHandler(ot),React$1.createElement(FlowRenderer$1,{onPaneClick:nn,onPaneMouseEnter:hn,onPaneMouseMove:vn,onPaneMouseLeave:an,onPaneContextMenu:_n,onPaneScroll:Qt,deleteKeyCode:jt,selectionKeyCode:St,selectionOnDrag:Tt,selectionMode:At,onSelectionStart:gt,onSelectionEnd:yt,multiSelectionKeyCode:Et,panActivationKeyCode:$t,zoomActivationKeyCode:Dt,elementsSelectable:Ct,onMove:nt,onMoveStart:rt,onMoveEnd:it,zoomOnScroll:Ut,zoomOnPinch:Mt,zoomOnDoubleClick:Kt,panOnScroll:Ht,panOnScrollSpeed:en,panOnScrollMode:sn,panOnDrag:rn,defaultViewport:It,translateExtent:Ot,minZoom:Wt,maxZoom:zt,onSelectionContextMenu:mt,preventScrolling:Ft,noDragClassName:wn,noWheelClassName:fn,noPanClassName:pn,disableKeyboardA11y:Dn},React$1.createElement(Viewport,null,React$1.createElement(EdgeRenderer$1,{edgeTypes:Rn,onEdgeClick:st,onEdgeDoubleClick:ct,onEdgeUpdate:Pn,onlyRenderVisibleElements:Pt,onEdgeContextMenu:$n,onEdgeMouseEnter:Nn,onEdgeMouseMove:Tn,onEdgeMouseLeave:cn,onEdgeUpdateStart:In,onEdgeUpdateEnd:An,edgeUpdaterRadius:mn,defaultMarkerColor:Nt,noPanClassName:pn,elevateEdgesOnSelect:!!kn,disableKeyboardA11y:Dn,rfId:Xt},React$1.createElement(ConnectionLineWrapper,{style:vt,type:bt,component:xt,containerStyle:kt})),React$1.createElement("div",{className:"react-flow__edgelabel-renderer"}),React$1.createElement(NodeRenderer$1,{nodeTypes:Sn,onNodeClick:at,onNodeDoubleClick:lt,onNodeMouseEnter:ut,onNodeMouseMove:ht,onNodeMouseLeave:dt,onNodeContextMenu:pt,selectNodesOnDrag:wt,onlyRenderVisibleElements:Pt,noPanClassName:pn,noDragClassName:wn,disableKeyboardA11y:Dn,nodeOrigin:un,nodeExtent:Zt,rfId:Xt})))};GraphView.displayName="GraphView";var GraphView$1=reactExports.memo(GraphView);const infiniteExtent=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],initialState={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:infiniteExtent,nodeExtent:infiniteExtent,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:ConnectionMode.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:devWarn,isValidConnection:void 0},createRFStore=()=>createWithEqualityFn((tt,et)=>({...initialState,setNodes:nt=>{const{nodeInternals:rt,nodeOrigin:it,elevateNodesOnSelect:ot}=et();tt({nodeInternals:createNodeInternals(nt,rt,it,ot)})},getNodes:()=>Array.from(et().nodeInternals.values()),setEdges:nt=>{const{defaultEdgeOptions:rt={}}=et();tt({edges:nt.map(it=>({...rt,...it}))})},setDefaultNodesAndEdges:(nt,rt)=>{const it=typeof nt<"u",ot=typeof rt<"u",at=it?createNodeInternals(nt,new Map,et().nodeOrigin,et().elevateNodesOnSelect):new Map;tt({nodeInternals:at,edges:ot?rt:[],hasDefaultNodes:it,hasDefaultEdges:ot})},updateNodeDimensions:nt=>{const{onNodesChange:rt,nodeInternals:it,fitViewOnInit:ot,fitViewOnInitDone:at,fitViewOnInitOptions:st,domNode:lt,nodeOrigin:ct}=et(),ut=lt==null?void 0:lt.querySelector(".react-flow__viewport");if(!ut)return;const ht=window.getComputedStyle(ut),{m22:dt}=new window.DOMMatrixReadOnly(ht.transform),pt=nt.reduce((gt,yt)=>{const bt=it.get(yt.id);if(bt){const vt=getDimensions(yt.nodeElement);!!(vt.width&&vt.height&&(bt.width!==vt.width||bt.height!==vt.height||yt.forceUpdate))&&(it.set(bt.id,{...bt,[internalsSymbol]:{...bt[internalsSymbol],handleBounds:{source:getHandleBounds(".source",yt.nodeElement,dt,ct),target:getHandleBounds(".target",yt.nodeElement,dt,ct)}},...vt}),gt.push({id:bt.id,type:"dimensions",dimensions:vt}))}return gt},[]);updateAbsoluteNodePositions(it,ct);const mt=at||ot&&!at&&fitView(et,{initial:!0,...st});tt({nodeInternals:new Map(it),fitViewOnInitDone:mt}),(pt==null?void 0:pt.length)>0&&(rt==null||rt(pt))},updateNodePositions:(nt,rt=!0,it=!1)=>{const{triggerNodeChanges:ot}=et(),at=nt.map(st=>{const lt={id:st.id,type:"position",dragging:it};return rt&&(lt.positionAbsolute=st.positionAbsolute,lt.position=st.position),lt});ot(at)},triggerNodeChanges:nt=>{const{onNodesChange:rt,nodeInternals:it,hasDefaultNodes:ot,nodeOrigin:at,getNodes:st,elevateNodesOnSelect:lt}=et();if(nt!=null&&nt.length){if(ot){const ct=applyNodeChanges(nt,st()),ut=createNodeInternals(ct,it,at,lt);tt({nodeInternals:ut})}rt==null||rt(nt)}},addSelectedNodes:nt=>{const{multiSelectionActive:rt,edges:it,getNodes:ot}=et();let at,st=null;rt?at=nt.map(lt=>createSelectionChange(lt,!0)):(at=getSelectionChanges(ot(),nt),st=getSelectionChanges(it,[])),updateNodesAndEdgesSelections({changedNodes:at,changedEdges:st,get:et,set:tt})},addSelectedEdges:nt=>{const{multiSelectionActive:rt,edges:it,getNodes:ot}=et();let at,st=null;rt?at=nt.map(lt=>createSelectionChange(lt,!0)):(at=getSelectionChanges(it,nt),st=getSelectionChanges(ot(),[])),updateNodesAndEdgesSelections({changedNodes:st,changedEdges:at,get:et,set:tt})},unselectNodesAndEdges:({nodes:nt,edges:rt}={})=>{const{edges:it,getNodes:ot}=et(),at=nt||ot(),st=rt||it,lt=at.map(ut=>(ut.selected=!1,createSelectionChange(ut.id,!1))),ct=st.map(ut=>createSelectionChange(ut.id,!1));updateNodesAndEdgesSelections({changedNodes:lt,changedEdges:ct,get:et,set:tt})},setMinZoom:nt=>{const{d3Zoom:rt,maxZoom:it}=et();rt==null||rt.scaleExtent([nt,it]),tt({minZoom:nt})},setMaxZoom:nt=>{const{d3Zoom:rt,minZoom:it}=et();rt==null||rt.scaleExtent([it,nt]),tt({maxZoom:nt})},setTranslateExtent:nt=>{var rt;(rt=et().d3Zoom)==null||rt.translateExtent(nt),tt({translateExtent:nt})},resetSelectedElements:()=>{const{edges:nt,getNodes:rt}=et(),ot=rt().filter(st=>st.selected).map(st=>createSelectionChange(st.id,!1)),at=nt.filter(st=>st.selected).map(st=>createSelectionChange(st.id,!1));updateNodesAndEdgesSelections({changedNodes:ot,changedEdges:at,get:et,set:tt})},setNodeExtent:nt=>{const{nodeInternals:rt}=et();rt.forEach(it=>{it.positionAbsolute=clampPosition(it.position,nt)}),tt({nodeExtent:nt,nodeInternals:new Map(rt)})},panBy:nt=>{const{transform:rt,width:it,height:ot,d3Zoom:at,d3Selection:st,translateExtent:lt}=et();if(!at||!st||!nt.x&&!nt.y)return!1;const ct=identity.translate(rt[0]+nt.x,rt[1]+nt.y).scale(rt[2]),ut=[[0,0],[it,ot]],ht=at==null?void 0:at.constrain()(ct,ut,lt);return at.transform(st,ht),rt[0]!==ht.x||rt[1]!==ht.y||rt[2]!==ht.k},cancelConnection:()=>tt({connectionNodeId:initialState.connectionNodeId,connectionHandleId:initialState.connectionHandleId,connectionHandleType:initialState.connectionHandleType,connectionStatus:initialState.connectionStatus,connectionStartHandle:initialState.connectionStartHandle,connectionEndHandle:initialState.connectionEndHandle}),reset:()=>tt({...initialState})}),Object.is),ReactFlowProvider=({children:tt})=>{const et=reactExports.useRef(null);return et.current||(et.current=createRFStore()),React$1.createElement(Provider$1,{value:et.current},tt)};ReactFlowProvider.displayName="ReactFlowProvider";const Wrapper$e=({children:tt})=>reactExports.useContext(StoreContext)?React$1.createElement(React$1.Fragment,null,tt):React$1.createElement(ReactFlowProvider,null,tt);Wrapper$e.displayName="ReactFlowWrapper";const defaultNodeTypes={input:InputNode$1,default:DefaultNode$1,output:OutputNode$1,group:GroupNode},defaultEdgeTypes={default:BezierEdge,straight:StraightEdge,step:StepEdge,smoothstep:SmoothStepEdge,simplebezier:SimpleBezierEdge},initNodeOrigin=[0,0],initSnapGrid=[15,15],initDefaultViewport={x:0,y:0,zoom:1},wrapperStyle={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},ReactFlow=reactExports.forwardRef(({nodes:tt,edges:et,defaultNodes:nt,defaultEdges:rt,className:it,nodeTypes:ot=defaultNodeTypes,edgeTypes:at=defaultEdgeTypes,onNodeClick:st,onEdgeClick:lt,onInit:ct,onMove:ut,onMoveStart:ht,onMoveEnd:dt,onConnect:pt,onConnectStart:mt,onConnectEnd:gt,onClickConnectStart:yt,onClickConnectEnd:bt,onNodeMouseEnter:vt,onNodeMouseMove:xt,onNodeMouseLeave:kt,onNodeContextMenu:St,onNodeDoubleClick:Tt,onNodeDragStart:At,onNodeDrag:Et,onNodeDragStop:$t,onNodesDelete:Dt,onEdgesDelete:jt,onSelectionChange:Pt,onSelectionDragStart:Ct,onSelectionDrag:wt,onSelectionDragStop:It,onSelectionContextMenu:Ot,onSelectionStart:Wt,onSelectionEnd:zt,connectionMode:Ft=ConnectionMode.Strict,connectionLineType:Nt=ConnectionLineType.Bezier,connectionLineStyle:Ut,connectionLineComponent:Mt,connectionLineContainerStyle:Ht,deleteKeyCode:en="Backspace",selectionKeyCode:sn="Shift",selectionOnDrag:Kt=!1,selectionMode:rn=SelectionMode.Full,panActivationKeyCode:nn="Space",multiSelectionKeyCode:hn=isMacOs()?"Meta":"Control",zoomActivationKeyCode:vn=isMacOs()?"Meta":"Control",snapToGrid:an=!1,snapGrid:Qt=initSnapGrid,onlyRenderVisibleElements:_n=!1,selectNodesOnDrag:Pn=!0,nodesDraggable:$n,nodesConnectable:Nn,nodesFocusable:Tn,nodeOrigin:cn=initNodeOrigin,edgesFocusable:mn,edgesUpdatable:In,elementsSelectable:An,defaultViewport:wn=initDefaultViewport,minZoom:fn=.5,maxZoom:pn=2,translateExtent:kn=infiniteExtent,preventScrolling:Dn=!0,nodeExtent:un,defaultMarkerColor:Zt="#b1b1b7",zoomOnScroll:Xt=!0,zoomOnPinch:Sn=!0,panOnScroll:Rn=!1,panOnScrollSpeed:jn=.5,panOnScrollMode:On=PanOnScrollMode.Free,zoomOnDoubleClick:Zn=!0,panOnDrag:Vn=!0,onPaneClick:qn,onPaneMouseEnter:zn,onPaneMouseMove:Jn,onPaneMouseLeave:Hn,onPaneScroll:pr,onPaneContextMenu:fr,children:xr,onEdgeUpdate:io,onEdgeContextMenu:Tr,onEdgeDoubleClick:Ar,onEdgeMouseEnter:qr,onEdgeMouseMove:jr,onEdgeMouseLeave:Fr,onEdgeUpdateStart:ao,onEdgeUpdateEnd:Yr,edgeUpdaterRadius:Dr=10,onNodesChange:go,onEdgesChange:xn,noDragClassName:Mn="nodrag",noWheelClassName:dn="nowheel",noPanClassName:Jt="nopan",fitView:En=!1,fitViewOptions:Ln,connectOnClick:Un=!0,attributionPosition:Kn,proOptions:nr,defaultEdgeOptions:lr,elevateNodesOnSelect:cr=!0,elevateEdgesOnSelect:Hr=!1,disableKeyboardA11y:vr=!1,autoPanOnConnect:Nr=!0,autoPanOnNodeDrag:Gr=!0,connectionRadius:eo=20,isValidConnection:Zr,onError:Jr,style:wr,id:Mr,nodeDragThreshold:Ur,...Rr},Pr)=>{const Lr=Mr||"1";return React$1.createElement("div",{...Rr,style:{...wr,...wrapperStyle},ref:Pr,className:cc(["react-flow",it]),"data-testid":"rf__wrapper",id:Mr},React$1.createElement(Wrapper$e,null,React$1.createElement(GraphView$1,{onInit:ct,onMove:ut,onMoveStart:ht,onMoveEnd:dt,onNodeClick:st,onEdgeClick:lt,onNodeMouseEnter:vt,onNodeMouseMove:xt,onNodeMouseLeave:kt,onNodeContextMenu:St,onNodeDoubleClick:Tt,nodeTypes:ot,edgeTypes:at,connectionLineType:Nt,connectionLineStyle:Ut,connectionLineComponent:Mt,connectionLineContainerStyle:Ht,selectionKeyCode:sn,selectionOnDrag:Kt,selectionMode:rn,deleteKeyCode:en,multiSelectionKeyCode:hn,panActivationKeyCode:nn,zoomActivationKeyCode:vn,onlyRenderVisibleElements:_n,selectNodesOnDrag:Pn,defaultViewport:wn,translateExtent:kn,minZoom:fn,maxZoom:pn,preventScrolling:Dn,zoomOnScroll:Xt,zoomOnPinch:Sn,zoomOnDoubleClick:Zn,panOnScroll:Rn,panOnScrollSpeed:jn,panOnScrollMode:On,panOnDrag:Vn,onPaneClick:qn,onPaneMouseEnter:zn,onPaneMouseMove:Jn,onPaneMouseLeave:Hn,onPaneScroll:pr,onPaneContextMenu:fr,onSelectionContextMenu:Ot,onSelectionStart:Wt,onSelectionEnd:zt,onEdgeUpdate:io,onEdgeContextMenu:Tr,onEdgeDoubleClick:Ar,onEdgeMouseEnter:qr,onEdgeMouseMove:jr,onEdgeMouseLeave:Fr,onEdgeUpdateStart:ao,onEdgeUpdateEnd:Yr,edgeUpdaterRadius:Dr,defaultMarkerColor:Zt,noDragClassName:Mn,noWheelClassName:dn,noPanClassName:Jt,elevateEdgesOnSelect:Hr,rfId:Lr,disableKeyboardA11y:vr,nodeOrigin:cn,nodeExtent:un}),React$1.createElement(StoreUpdater,{nodes:tt,edges:et,defaultNodes:nt,defaultEdges:rt,onConnect:pt,onConnectStart:mt,onConnectEnd:gt,onClickConnectStart:yt,onClickConnectEnd:bt,nodesDraggable:$n,nodesConnectable:Nn,nodesFocusable:Tn,edgesFocusable:mn,edgesUpdatable:In,elementsSelectable:An,elevateNodesOnSelect:cr,minZoom:fn,maxZoom:pn,nodeExtent:un,onNodesChange:go,onEdgesChange:xn,snapToGrid:an,snapGrid:Qt,connectionMode:Ft,translateExtent:kn,connectOnClick:Un,defaultEdgeOptions:lr,fitView:En,fitViewOptions:Ln,onNodesDelete:Dt,onEdgesDelete:jt,onNodeDragStart:At,onNodeDrag:Et,onNodeDragStop:$t,onSelectionDrag:wt,onSelectionDragStart:Ct,onSelectionDragStop:It,noPanClassName:Jt,nodeOrigin:cn,rfId:Lr,autoPanOnConnect:Nr,autoPanOnNodeDrag:Gr,onError:Jr,connectionRadius:eo,isValidConnection:Zr,nodeDragThreshold:Ur}),React$1.createElement(Wrapper$1$1,{onSelectionChange:Pt}),xr,React$1.createElement(Attribution,{proOptions:nr,position:Kn}),React$1.createElement(A11yDescriptions,{rfId:Lr,disableKeyboardA11y:vr})))});ReactFlow.displayName="ReactFlow";const style="",TeachMe=()=>{const[tt,et]=useDataStore(pt=>[pt.data,pt.setTeachMe]),[nt,rt]=useAppStore(pt=>[pt.currentSearch,pt.setSidebarOpen]),it=reactExports.useRef(!1),ot=useSocket(),[at,st,lt,ct]=useTeachStore(pt=>[pt.setTeachMeAnswer,pt.setHasTeachingInProgress,pt.setInstagraphAnswer,pt.setHasInstagraphInProgress]),ut=reactExports.useCallback(pt=>{at(pt.tutorial),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"Tutorial is ready"}),{position:toast.POSITION.BOTTOM_CENTER,type:"success"})},[at]),ht=reactExports.useCallback(pt=>{lt(pt),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"Instagraph is ready"}),{position:toast.POSITION.BOTTOM_CENTER,type:"success"})},[lt]);reactExports.useEffect(()=>{it.current||(ut&&ot&&(ot.on("teachmehook",ut),it.current=!0),ht&&ot&&(ot.on("instagraphhook",ht),it.current=!0))},[ot,ut,ht]);const dt=async()=>{if(nt){st(!0),ct(!0),rt(!0),et(!0);try{const pt=tt==null?void 0:tt.nodes.filter(yt=>yt.text),mt=pt==null?void 0:pt.slice(0,5),gt=(mt!=null&&mt.length?mt.map(yt=>yt.text).join(" "):"").substring(0,2500).replace(/[?&=+/#]/g,yt=>`\\${yt}`);await distExports$1.enable(),await postTeachMe({term:nt,transcripts:gt}),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"We started preparing tutorial for you"}),{type:"success"}),await postInstagraph({term:nt,transcripts:gt}),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"We started preparing an instagraph for you"}),{type:"success"})}catch{st(!1),ct(!1)}}};return jsxRuntimeExports.jsx(ButtonStyled,{onClick:()=>dt(),children:"Teach me"})},TeachMeLoader=({text:tt})=>jsxRuntimeExports.jsxs(Flex,{align:"center",justify:"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:tt})})]}),TeachMeText=()=>{const[tt,et,nt,rt]=useTeachStore(ot=>[ot.teachMeAnswer,ot.hasTeachingInProgress,ot.instgraphAnswser,ot.hasInstagraphInProgress]),it=!rt&&!!(nt!=null&&nt.edges)&&!!(nt!=null&&nt.nodes);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[it?jsxRuntimeExports.jsx(ReactFlow,{edges:nt==null?void 0:nt.edges,nodes:nt==null?void 0:nt.nodes}):jsxRuntimeExports.jsx(TeachMeLoader,{text:"Generating instagraph"}),et?jsxRuntimeExports.jsx(TeachMeLoader,{text:"Generating tutorial"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TeachMeAnswerFlex,{children:jsxRuntimeExports.jsx(Text$3,{children:tt})}),jsxRuntimeExports.jsx(AskQuestion,{})]})]})},ButtonStyled=styled$4(Button$2)``,TeachMeAnswerFlex=styled$4(Flex)` +`,emptyValue={},HelperContext=reactExports.createContext(emptyValue),useHelper=()=>reactExports.useContext(HelperContext);function cc(tt){if(typeof tt=="string"||typeof tt=="number")return""+tt;let et="";if(Array.isArray(tt))for(let nt=0,rt;nt{const nt=createStore$3(tt),rt=(it,ot=et)=>useStoreWithEqualityFn(nt,it,ot);return Object.assign(rt,nt),rt},createWithEqualityFn=(tt,et)=>tt?createWithEqualityFnImpl(tt,et):createWithEqualityFnImpl;function shallow$1(tt,et){if(Object.is(tt,et))return!0;if(typeof tt!="object"||tt===null||typeof et!="object"||et===null)return!1;if(tt instanceof Map&&et instanceof Map){if(tt.size!==et.size)return!1;for(const[rt,it]of tt)if(!Object.is(it,et.get(rt)))return!1;return!0}if(tt instanceof Set&&et instanceof Set){if(tt.size!==et.size)return!1;for(const rt of tt)if(!et.has(rt))return!1;return!0}const nt=Object.keys(tt);if(nt.length!==Object.keys(et).length)return!1;for(let rt=0;rt=0&&(et=tt.slice(0,nt))!=="xmlns"&&(tt=tt.slice(nt+1)),namespaces.hasOwnProperty(et)?{space:namespaces[et],local:tt}:tt}function creatorInherit(tt){return function(){var et=this.ownerDocument,nt=this.namespaceURI;return nt===xhtml&&et.documentElement.namespaceURI===xhtml?et.createElement(tt):et.createElementNS(nt,tt)}}function creatorFixed(tt){return function(){return this.ownerDocument.createElementNS(tt.space,tt.local)}}function creator(tt){var et=namespace(tt);return(et.local?creatorFixed:creatorInherit)(et)}function none(){}function selector(tt){return tt==null?none:function(){return this.querySelector(tt)}}function selection_select(tt){typeof tt!="function"&&(tt=selector(tt));for(var et=this._groups,nt=et.length,rt=new Array(nt),it=0;it=xt&&(xt=vt+1);!(St=yt[xt])&&++xt=0;)(at=rt[it])&&(ot&&at.compareDocumentPosition(ot)^4&&ot.parentNode.insertBefore(at,ot),ot=at);return this}function selection_sort(tt){tt||(tt=ascending);function et(ht,dt){return ht&&dt?tt(ht.__data__,dt.__data__):!ht-!dt}for(var nt=this._groups,rt=nt.length,it=new Array(rt),ot=0;otet?1:tt>=et?0:NaN}function selection_call(){var tt=arguments[0];return arguments[0]=this,tt.apply(null,arguments),this}function selection_nodes(){return Array.from(this)}function selection_node(){for(var tt=this._groups,et=0,nt=tt.length;et1?this.each((et==null?styleRemove$1:typeof et=="function"?styleFunction$1:styleConstant$1)(tt,et,nt??"")):styleValue(this.node(),tt)}function styleValue(tt,et){return tt.style.getPropertyValue(et)||defaultView(tt).getComputedStyle(tt,null).getPropertyValue(et)}function propertyRemove(tt){return function(){delete this[tt]}}function propertyConstant(tt,et){return function(){this[tt]=et}}function propertyFunction(tt,et){return function(){var nt=et.apply(this,arguments);nt==null?delete this[tt]:this[tt]=nt}}function selection_property(tt,et){return arguments.length>1?this.each((et==null?propertyRemove:typeof et=="function"?propertyFunction:propertyConstant)(tt,et)):this.node()[tt]}function classArray(tt){return tt.trim().split(/^|\s+/)}function classList(tt){return tt.classList||new ClassList(tt)}function ClassList(tt){this._node=tt,this._names=classArray(tt.getAttribute("class")||"")}ClassList.prototype={add:function(tt){var et=this._names.indexOf(tt);et<0&&(this._names.push(tt),this._node.setAttribute("class",this._names.join(" ")))},remove:function(tt){var et=this._names.indexOf(tt);et>=0&&(this._names.splice(et,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(tt){return this._names.indexOf(tt)>=0}};function classedAdd(tt,et){for(var nt=classList(tt),rt=-1,it=et.length;++rt=0&&(nt=et.slice(rt+1),et=et.slice(0,rt)),{type:et,name:nt}})}function onRemove(tt){return function(){var et=this.__on;if(et){for(var nt=0,rt=-1,it=et.length,ot;nt()=>tt;function DragEvent(tt,{sourceEvent:et,subject:nt,target:rt,identifier:it,active:ot,x:at,y:st,dx:lt,dy:ct,dispatch:ut}){Object.defineProperties(this,{type:{value:tt,enumerable:!0,configurable:!0},sourceEvent:{value:et,enumerable:!0,configurable:!0},subject:{value:nt,enumerable:!0,configurable:!0},target:{value:rt,enumerable:!0,configurable:!0},identifier:{value:it,enumerable:!0,configurable:!0},active:{value:ot,enumerable:!0,configurable:!0},x:{value:at,enumerable:!0,configurable:!0},y:{value:st,enumerable:!0,configurable:!0},dx:{value:lt,enumerable:!0,configurable:!0},dy:{value:ct,enumerable:!0,configurable:!0},_:{value:ut}})}DragEvent.prototype.on=function(){var tt=this._.on.apply(this._,arguments);return tt===this._?this:tt};function defaultFilter$1(tt){return!tt.ctrlKey&&!tt.button}function defaultContainer(){return this.parentNode}function defaultSubject(tt,et){return et??{x:tt.x,y:tt.y}}function defaultTouchable$1(){return navigator.maxTouchPoints||"ontouchstart"in this}function drag(){var tt=defaultFilter$1,et=defaultContainer,nt=defaultSubject,rt=defaultTouchable$1,it={},ot=dispatch("start","drag","end"),at=0,st,lt,ct,ut,ht=0;function dt(kt){kt.on("mousedown.drag",pt).filter(rt).on("touchstart.drag",yt).on("touchmove.drag",bt,nonpassive).on("touchend.drag touchcancel.drag",vt).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function pt(kt,St){if(!(ut||!tt.call(this,kt,St))){var Tt=xt(this,et.call(this,kt,St),kt,St,"mouse");Tt&&(select(kt.view).on("mousemove.drag",mt,nonpassivecapture).on("mouseup.drag",gt,nonpassivecapture),dragDisable(kt.view),nopropagation$1(kt),ct=!1,st=kt.clientX,lt=kt.clientY,Tt("start",kt))}}function mt(kt){if(noevent$1(kt),!ct){var St=kt.clientX-st,Tt=kt.clientY-lt;ct=St*St+Tt*Tt>ht}it.mouse("drag",kt)}function gt(kt){select(kt.view).on("mousemove.drag mouseup.drag",null),yesdrag(kt.view,ct),noevent$1(kt),it.mouse("end",kt)}function yt(kt,St){if(tt.call(this,kt,St)){var Tt=kt.changedTouches,At=et.call(this,kt,St),Et=Tt.length,$t,Dt;for($t=0;$tCREATED)throw new Error("too late; already scheduled");return nt}function set(tt,et){var nt=get(tt,et);if(nt.state>STARTED)throw new Error("too late; already running");return nt}function get(tt,et){var nt=tt.__transition;if(!nt||!(nt=nt[et]))throw new Error("transition not found");return nt}function create(tt,et,nt){var rt=tt.__transition,it;rt[et]=nt,nt.timer=timer$1(ot,0,nt.time);function ot(ct){nt.state=SCHEDULED,nt.timer.restart(at,nt.delay,nt.time),nt.delay<=ct&&at(ct-nt.delay)}function at(ct){var ut,ht,dt,pt;if(nt.state!==SCHEDULED)return lt();for(ut in rt)if(pt=rt[ut],pt.name===nt.name){if(pt.state===STARTED)return timeout(at);pt.state===RUNNING?(pt.state=ENDED,pt.timer.stop(),pt.on.call("interrupt",tt,tt.__data__,pt.index,pt.group),delete rt[ut]):+utSTARTING&&rt.state=0&&(et=et.slice(0,nt)),!et||et==="start"})}function onFunction(tt,et,nt){var rt,it,ot=start(et)?init:set;return function(){var at=ot(this,tt),st=at.on;st!==rt&&(it=(rt=st).copy()).on(et,nt),at.on=it}}function transition_on(tt,et){var nt=this._id;return arguments.length<2?get(this.node(),nt).on.on(tt):this.each(onFunction(nt,tt,et))}function removeFunction(tt){return function(){var et=this.parentNode;for(var nt in this.__transition)if(+nt!==tt)return;et&&et.removeChild(this)}}function transition_remove(){return this.on("end.remove",removeFunction(this._id))}function transition_select(tt){var et=this._name,nt=this._id;typeof tt!="function"&&(tt=selector(tt));for(var rt=this._groups,it=rt.length,ot=new Array(it),at=0;at()=>tt;function ZoomEvent(tt,{sourceEvent:et,target:nt,transform:rt,dispatch:it}){Object.defineProperties(this,{type:{value:tt,enumerable:!0,configurable:!0},sourceEvent:{value:et,enumerable:!0,configurable:!0},target:{value:nt,enumerable:!0,configurable:!0},transform:{value:rt,enumerable:!0,configurable:!0},_:{value:it}})}function Transform(tt,et,nt){this.k=tt,this.x=et,this.y=nt}Transform.prototype={constructor:Transform,scale:function(tt){return tt===1?this:new Transform(this.k*tt,this.x,this.y)},translate:function(tt,et){return tt===0&et===0?this:new Transform(this.k,this.x+this.k*tt,this.y+this.k*et)},apply:function(tt){return[tt[0]*this.k+this.x,tt[1]*this.k+this.y]},applyX:function(tt){return tt*this.k+this.x},applyY:function(tt){return tt*this.k+this.y},invert:function(tt){return[(tt[0]-this.x)/this.k,(tt[1]-this.y)/this.k]},invertX:function(tt){return(tt-this.x)/this.k},invertY:function(tt){return(tt-this.y)/this.k},rescaleX:function(tt){return tt.copy().domain(tt.range().map(this.invertX,this).map(tt.invert,tt))},rescaleY:function(tt){return tt.copy().domain(tt.range().map(this.invertY,this).map(tt.invert,tt))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var identity=new Transform(1,0,0);Transform.prototype;function nopropagation(tt){tt.stopImmediatePropagation()}function noevent(tt){tt.preventDefault(),tt.stopImmediatePropagation()}function defaultFilter(tt){return(!tt.ctrlKey||tt.type==="wheel")&&!tt.button}function defaultExtent(){var tt=this;return tt instanceof SVGElement?(tt=tt.ownerSVGElement||tt,tt.hasAttribute("viewBox")?(tt=tt.viewBox.baseVal,[[tt.x,tt.y],[tt.x+tt.width,tt.y+tt.height]]):[[0,0],[tt.width.baseVal.value,tt.height.baseVal.value]]):[[0,0],[tt.clientWidth,tt.clientHeight]]}function defaultTransform(){return this.__zoom||identity}function defaultWheelDelta(tt){return-tt.deltaY*(tt.deltaMode===1?.05:tt.deltaMode?1:.002)*(tt.ctrlKey?10:1)}function defaultTouchable(){return navigator.maxTouchPoints||"ontouchstart"in this}function defaultConstrain(tt,et,nt){var rt=tt.invertX(et[0][0])-nt[0][0],it=tt.invertX(et[1][0])-nt[1][0],ot=tt.invertY(et[0][1])-nt[0][1],at=tt.invertY(et[1][1])-nt[1][1];return tt.translate(it>rt?(rt+it)/2:Math.min(0,rt)||Math.max(0,it),at>ot?(ot+at)/2:Math.min(0,ot)||Math.max(0,at))}function zoom(){var tt=defaultFilter,et=defaultExtent,nt=defaultConstrain,rt=defaultWheelDelta,it=defaultTouchable,ot=[0,1/0],at=[[-1/0,-1/0],[1/0,1/0]],st=250,lt=interpolateZoom,ct=dispatch("start","zoom","end"),ut,ht,dt,pt=500,mt=150,gt=0,yt=10;function bt(wt){wt.property("__zoom",defaultTransform).on("wheel.zoom",Et,{passive:!1}).on("mousedown.zoom",$t).on("dblclick.zoom",Dt).filter(it).on("touchstart.zoom",jt).on("touchmove.zoom",Pt).on("touchend.zoom touchcancel.zoom",Ct).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}bt.transform=function(wt,It,Ot,Wt){var zt=wt.selection?wt.selection():wt;zt.property("__zoom",defaultTransform),wt!==zt?St(wt,It,Ot,Wt):zt.interrupt().each(function(){Tt(this,arguments).event(Wt).start().zoom(null,typeof It=="function"?It.apply(this,arguments):It).end()})},bt.scaleBy=function(wt,It,Ot,Wt){bt.scaleTo(wt,function(){var zt=this.__zoom.k,Ft=typeof It=="function"?It.apply(this,arguments):It;return zt*Ft},Ot,Wt)},bt.scaleTo=function(wt,It,Ot,Wt){bt.transform(wt,function(){var zt=et.apply(this,arguments),Ft=this.__zoom,Nt=Ot==null?kt(zt):typeof Ot=="function"?Ot.apply(this,arguments):Ot,Ut=Ft.invert(Nt),Mt=typeof It=="function"?It.apply(this,arguments):It;return nt(xt(vt(Ft,Mt),Nt,Ut),zt,at)},Ot,Wt)},bt.translateBy=function(wt,It,Ot,Wt){bt.transform(wt,function(){return nt(this.__zoom.translate(typeof It=="function"?It.apply(this,arguments):It,typeof Ot=="function"?Ot.apply(this,arguments):Ot),et.apply(this,arguments),at)},null,Wt)},bt.translateTo=function(wt,It,Ot,Wt,zt){bt.transform(wt,function(){var Ft=et.apply(this,arguments),Nt=this.__zoom,Ut=Wt==null?kt(Ft):typeof Wt=="function"?Wt.apply(this,arguments):Wt;return nt(identity.translate(Ut[0],Ut[1]).scale(Nt.k).translate(typeof It=="function"?-It.apply(this,arguments):-It,typeof Ot=="function"?-Ot.apply(this,arguments):-Ot),Ft,at)},Wt,zt)};function vt(wt,It){return It=Math.max(ot[0],Math.min(ot[1],It)),It===wt.k?wt:new Transform(It,wt.x,wt.y)}function xt(wt,It,Ot){var Wt=It[0]-Ot[0]*wt.k,zt=It[1]-Ot[1]*wt.k;return Wt===wt.x&&zt===wt.y?wt:new Transform(wt.k,Wt,zt)}function kt(wt){return[(+wt[0][0]+ +wt[1][0])/2,(+wt[0][1]+ +wt[1][1])/2]}function St(wt,It,Ot,Wt){wt.on("start.zoom",function(){Tt(this,arguments).event(Wt).start()}).on("interrupt.zoom end.zoom",function(){Tt(this,arguments).event(Wt).end()}).tween("zoom",function(){var zt=this,Ft=arguments,Nt=Tt(zt,Ft).event(Wt),Ut=et.apply(zt,Ft),Mt=Ot==null?kt(Ut):typeof Ot=="function"?Ot.apply(zt,Ft):Ot,Ht=Math.max(Ut[1][0]-Ut[0][0],Ut[1][1]-Ut[0][1]),en=zt.__zoom,sn=typeof It=="function"?It.apply(zt,Ft):It,Kt=lt(en.invert(Mt).concat(Ht/en.k),sn.invert(Mt).concat(Ht/sn.k));return function(rn){if(rn===1)rn=sn;else{var nn=Kt(rn),hn=Ht/nn[2];rn=new Transform(hn,Mt[0]-nn[0]*hn,Mt[1]-nn[1]*hn)}Nt.zoom(null,rn)}})}function Tt(wt,It,Ot){return!Ot&&wt.__zooming||new At(wt,It)}function At(wt,It){this.that=wt,this.args=It,this.active=0,this.sourceEvent=null,this.extent=et.apply(wt,It),this.taps=0}At.prototype={event:function(wt){return wt&&(this.sourceEvent=wt),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(wt,It){return this.mouse&&wt!=="mouse"&&(this.mouse[1]=It.invert(this.mouse[0])),this.touch0&&wt!=="touch"&&(this.touch0[1]=It.invert(this.touch0[0])),this.touch1&&wt!=="touch"&&(this.touch1[1]=It.invert(this.touch1[0])),this.that.__zoom=It,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(wt){var It=select(this.that).datum();ct.call(wt,this.that,new ZoomEvent(wt,{sourceEvent:this.sourceEvent,target:bt,type:wt,transform:this.that.__zoom,dispatch:ct}),It)}};function Et(wt,...It){if(!tt.apply(this,arguments))return;var Ot=Tt(this,It).event(wt),Wt=this.__zoom,zt=Math.max(ot[0],Math.min(ot[1],Wt.k*Math.pow(2,rt.apply(this,arguments)))),Ft=pointer(wt);if(Ot.wheel)(Ot.mouse[0][0]!==Ft[0]||Ot.mouse[0][1]!==Ft[1])&&(Ot.mouse[1]=Wt.invert(Ot.mouse[0]=Ft)),clearTimeout(Ot.wheel);else{if(Wt.k===zt)return;Ot.mouse=[Ft,Wt.invert(Ft)],interrupt(this),Ot.start()}noevent(wt),Ot.wheel=setTimeout(Nt,mt),Ot.zoom("mouse",nt(xt(vt(Wt,zt),Ot.mouse[0],Ot.mouse[1]),Ot.extent,at));function Nt(){Ot.wheel=null,Ot.end()}}function $t(wt,...It){if(dt||!tt.apply(this,arguments))return;var Ot=wt.currentTarget,Wt=Tt(this,It,!0).event(wt),zt=select(wt.view).on("mousemove.zoom",Mt,!0).on("mouseup.zoom",Ht,!0),Ft=pointer(wt,Ot),Nt=wt.clientX,Ut=wt.clientY;dragDisable(wt.view),nopropagation(wt),Wt.mouse=[Ft,this.__zoom.invert(Ft)],interrupt(this),Wt.start();function Mt(en){if(noevent(en),!Wt.moved){var sn=en.clientX-Nt,Kt=en.clientY-Ut;Wt.moved=sn*sn+Kt*Kt>gt}Wt.event(en).zoom("mouse",nt(xt(Wt.that.__zoom,Wt.mouse[0]=pointer(en,Ot),Wt.mouse[1]),Wt.extent,at))}function Ht(en){zt.on("mousemove.zoom mouseup.zoom",null),yesdrag(en.view,Wt.moved),noevent(en),Wt.event(en).end()}}function Dt(wt,...It){if(tt.apply(this,arguments)){var Ot=this.__zoom,Wt=pointer(wt.changedTouches?wt.changedTouches[0]:wt,this),zt=Ot.invert(Wt),Ft=Ot.k*(wt.shiftKey?.5:2),Nt=nt(xt(vt(Ot,Ft),Wt,zt),et.apply(this,It),at);noevent(wt),st>0?select(this).transition().duration(st).call(St,Nt,Wt,wt):select(this).call(bt.transform,Nt,Wt,wt)}}function jt(wt,...It){if(tt.apply(this,arguments)){var Ot=wt.touches,Wt=Ot.length,zt=Tt(this,It,wt.changedTouches.length===Wt).event(wt),Ft,Nt,Ut,Mt;for(nopropagation(wt),Nt=0;Nt"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:tt=>`Node type "${tt}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:tt=>`The old edge with id=${tt} does not exist.`,error009:tt=>`Marker type "${tt}" doesn't exist.`,error008:(tt,et)=>`Couldn't create edge for ${tt?"target":"source"} handle id: "${tt?et.targetHandle:et.sourceHandle}", edge id: ${et.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:tt=>`Edge type "${tt}" not found. Using fallback type "default".`,error012:tt=>`Node with id "${tt}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},zustandErrorMessage=errorMessages.error001();function useStore(tt,et){const nt=reactExports.useContext(StoreContext);if(nt===null)throw new Error(zustandErrorMessage);return useStoreWithEqualityFn(nt,tt,et)}const useStoreApi=()=>{const tt=reactExports.useContext(StoreContext);if(tt===null)throw new Error(zustandErrorMessage);return reactExports.useMemo(()=>({getState:tt.getState,setState:tt.setState,subscribe:tt.subscribe,destroy:tt.destroy}),[tt])},selector$g=tt=>tt.userSelectionActive?"none":"all";function Panel({position:tt,children:et,className:nt,style:rt,...it}){const ot=useStore(selector$g),at=`${tt}`.split("-");return React$1.createElement("div",{className:cc(["react-flow__panel",nt,...at]),style:{...rt,pointerEvents:ot},...it},et)}function Attribution({proOptions:tt,position:et="bottom-right"}){return tt!=null&&tt.hideAttribution?null:React$1.createElement(Panel,{position:et,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev"},React$1.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const EdgeText=({x:tt,y:et,label:nt,labelStyle:rt={},labelShowBg:it=!0,labelBgStyle:ot={},labelBgPadding:at=[2,4],labelBgBorderRadius:st=2,children:lt,className:ct,...ut})=>{const ht=reactExports.useRef(null),[dt,pt]=reactExports.useState({x:0,y:0,width:0,height:0}),mt=cc(["react-flow__edge-textwrapper",ct]);return reactExports.useEffect(()=>{if(ht.current){const gt=ht.current.getBBox();pt({x:gt.x,y:gt.y,width:gt.width,height:gt.height})}},[nt]),typeof nt>"u"||!nt?null:React$1.createElement("g",{transform:`translate(${tt-dt.width/2} ${et-dt.height/2})`,className:mt,visibility:dt.width?"visible":"hidden",...ut},it&&React$1.createElement("rect",{width:dt.width+2*at[0],x:-at[0],y:-at[1],height:dt.height+2*at[1],className:"react-flow__edge-textbg",style:ot,rx:st,ry:st}),React$1.createElement("text",{className:"react-flow__edge-text",y:dt.height/2,dy:"0.3em",ref:ht,style:rt},nt),lt)};var EdgeText$1=reactExports.memo(EdgeText);const getDimensions=tt=>({width:tt.offsetWidth,height:tt.offsetHeight}),clamp=(tt,et=0,nt=1)=>Math.min(Math.max(tt,et),nt),clampPosition=(tt={x:0,y:0},et)=>({x:clamp(tt.x,et[0][0],et[1][0]),y:clamp(tt.y,et[0][1],et[1][1])}),calcAutoPanVelocity=(tt,et,nt)=>ttnt?-clamp(Math.abs(tt-nt),1,50)/50:0,calcAutoPan=(tt,et)=>{const nt=calcAutoPanVelocity(tt.x,35,et.width-35)*20,rt=calcAutoPanVelocity(tt.y,35,et.height-35)*20;return[nt,rt]},getHostForElement=tt=>{var et;return((et=tt.getRootNode)==null?void 0:et.call(tt))||(window==null?void 0:window.document)},getBoundsOfBoxes=(tt,et)=>({x:Math.min(tt.x,et.x),y:Math.min(tt.y,et.y),x2:Math.max(tt.x2,et.x2),y2:Math.max(tt.y2,et.y2)}),rectToBox=({x:tt,y:et,width:nt,height:rt})=>({x:tt,y:et,x2:tt+nt,y2:et+rt}),boxToRect=({x:tt,y:et,x2:nt,y2:rt})=>({x:tt,y:et,width:nt-tt,height:rt-et}),nodeToRect=tt=>({...tt.positionAbsolute||{x:0,y:0},width:tt.width||0,height:tt.height||0}),getOverlappingArea=(tt,et)=>{const nt=Math.max(0,Math.min(tt.x+tt.width,et.x+et.width)-Math.max(tt.x,et.x)),rt=Math.max(0,Math.min(tt.y+tt.height,et.y+et.height)-Math.max(tt.y,et.y));return Math.ceil(nt*rt)},isRectObject=tt=>isNumeric(tt.width)&&isNumeric(tt.height)&&isNumeric(tt.x)&&isNumeric(tt.y),isNumeric=tt=>!isNaN(tt)&&isFinite(tt),internalsSymbol=Symbol.for("internals"),elementSelectionKeys=["Enter"," ","Escape"],devWarn=(tt,et)=>{},isReactKeyboardEvent=tt=>"nativeEvent"in tt;function isInputDOMNode(tt){var it,ot;const et=isReactKeyboardEvent(tt)?tt.nativeEvent:tt,nt=((ot=(it=et.composedPath)==null?void 0:it.call(et))==null?void 0:ot[0])||tt.target;return["INPUT","SELECT","TEXTAREA"].includes(nt==null?void 0:nt.nodeName)||(nt==null?void 0:nt.hasAttribute("contenteditable"))||!!(nt!=null&&nt.closest(".nokey"))}const isMouseEvent=tt=>"clientX"in tt,getEventPosition=(tt,et)=>{var ot,at;const nt=isMouseEvent(tt),rt=nt?tt.clientX:(ot=tt.touches)==null?void 0:ot[0].clientX,it=nt?tt.clientY:(at=tt.touches)==null?void 0:at[0].clientY;return{x:rt-((et==null?void 0:et.left)??0),y:it-((et==null?void 0:et.top)??0)}},isMacOs=()=>{var tt;return typeof navigator<"u"&&((tt=navigator==null?void 0:navigator.userAgent)==null?void 0:tt.indexOf("Mac"))>=0},BaseEdge=({id:tt,path:et,labelX:nt,labelY:rt,label:it,labelStyle:ot,labelShowBg:at,labelBgStyle:st,labelBgPadding:lt,labelBgBorderRadius:ct,style:ut,markerEnd:ht,markerStart:dt,interactionWidth:pt=20})=>React$1.createElement(React$1.Fragment,null,React$1.createElement("path",{id:tt,style:ut,d:et,fill:"none",className:"react-flow__edge-path",markerEnd:ht,markerStart:dt}),pt&&React$1.createElement("path",{d:et,fill:"none",strokeOpacity:0,strokeWidth:pt,className:"react-flow__edge-interaction"}),it&&isNumeric(nt)&&isNumeric(rt)?React$1.createElement(EdgeText$1,{x:nt,y:rt,label:it,labelStyle:ot,labelShowBg:at,labelBgStyle:st,labelBgPadding:lt,labelBgBorderRadius:ct}):null);BaseEdge.displayName="BaseEdge";function getMouseHandler$1(tt,et,nt){return nt===void 0?nt:rt=>{const it=et().edges.find(ot=>ot.id===tt);it&&nt(rt,{...it})}}function getEdgeCenter({sourceX:tt,sourceY:et,targetX:nt,targetY:rt}){const it=Math.abs(nt-tt)/2,ot=nt{const[yt,bt,vt]=getSimpleBezierPath({sourceX:tt,sourceY:et,sourcePosition:it,targetX:nt,targetY:rt,targetPosition:ot});return React$1.createElement(BaseEdge,{path:yt,labelX:bt,labelY:vt,label:at,labelStyle:st,labelShowBg:lt,labelBgStyle:ct,labelBgPadding:ut,labelBgBorderRadius:ht,style:dt,markerEnd:pt,markerStart:mt,interactionWidth:gt})});SimpleBezierEdge.displayName="SimpleBezierEdge";const handleDirections={[Position.Left]:{x:-1,y:0},[Position.Right]:{x:1,y:0},[Position.Top]:{x:0,y:-1},[Position.Bottom]:{x:0,y:1}},getDirection=({source:tt,sourcePosition:et=Position.Bottom,target:nt})=>et===Position.Left||et===Position.Right?tt.xMath.sqrt(Math.pow(et.x-tt.x,2)+Math.pow(et.y-tt.y,2));function getPoints({source:tt,sourcePosition:et=Position.Bottom,target:nt,targetPosition:rt=Position.Top,center:it,offset:ot}){const at=handleDirections[et],st=handleDirections[rt],lt={x:tt.x+at.x*ot,y:tt.y+at.y*ot},ct={x:nt.x+st.x*ot,y:nt.y+st.y*ot},ut=getDirection({source:lt,sourcePosition:et,target:ct}),ht=ut.x!==0?"x":"y",dt=ut[ht];let pt=[],mt,gt;const yt={x:0,y:0},bt={x:0,y:0},[vt,xt,kt,St]=getEdgeCenter({sourceX:tt.x,sourceY:tt.y,targetX:nt.x,targetY:nt.y});if(at[ht]*st[ht]===-1){mt=it.x||vt,gt=it.y||xt;const At=[{x:mt,y:lt.y},{x:mt,y:ct.y}],Et=[{x:lt.x,y:gt},{x:ct.x,y:gt}];at[ht]===dt?pt=ht==="x"?At:Et:pt=ht==="x"?Et:At}else{const At=[{x:lt.x,y:ct.y}],Et=[{x:ct.x,y:lt.y}];if(ht==="x"?pt=at.x===dt?Et:At:pt=at.y===dt?At:Et,et===rt){const Ct=Math.abs(tt[ht]-nt[ht]);if(Ct<=ot){const wt=Math.min(ot-1,ot-Ct);at[ht]===dt?yt[ht]=(lt[ht]>tt[ht]?-1:1)*wt:bt[ht]=(ct[ht]>nt[ht]?-1:1)*wt}}if(et!==rt){const Ct=ht==="x"?"y":"x",wt=at[ht]===st[Ct],It=lt[Ct]>ct[Ct],Ot=lt[Ct]=Pt?(mt=($t.x+Dt.x)/2,gt=pt[0].y):(mt=pt[0].x,gt=($t.y+Dt.y)/2)}return[[tt,{x:lt.x+yt.x,y:lt.y+yt.y},...pt,{x:ct.x+bt.x,y:ct.y+bt.y},nt],mt,gt,kt,St]}function getBend(tt,et,nt,rt){const it=Math.min(distance(tt,et)/2,distance(et,nt)/2,rt),{x:ot,y:at}=et;if(tt.x===ot&&ot===nt.x||tt.y===at&&at===nt.y)return`L${ot} ${at}`;if(tt.y===at){const ct=tt.x{let xt="";return vt>0&&vt{const[bt,vt,xt]=getSmoothStepPath({sourceX:tt,sourceY:et,sourcePosition:ht,targetX:nt,targetY:rt,targetPosition:dt,borderRadius:gt==null?void 0:gt.borderRadius,offset:gt==null?void 0:gt.offset});return React$1.createElement(BaseEdge,{path:bt,labelX:vt,labelY:xt,label:it,labelStyle:ot,labelShowBg:at,labelBgStyle:st,labelBgPadding:lt,labelBgBorderRadius:ct,style:ut,markerEnd:pt,markerStart:mt,interactionWidth:yt})});SmoothStepEdge.displayName="SmoothStepEdge";const StepEdge=reactExports.memo(tt=>{var et;return React$1.createElement(SmoothStepEdge,{...tt,pathOptions:reactExports.useMemo(()=>{var nt;return{borderRadius:0,offset:(nt=tt.pathOptions)==null?void 0:nt.offset}},[(et=tt.pathOptions)==null?void 0:et.offset])})});StepEdge.displayName="StepEdge";function getStraightPath({sourceX:tt,sourceY:et,targetX:nt,targetY:rt}){const[it,ot,at,st]=getEdgeCenter({sourceX:tt,sourceY:et,targetX:nt,targetY:rt});return[`M ${tt},${et}L ${nt},${rt}`,it,ot,at,st]}const StraightEdge=reactExports.memo(({sourceX:tt,sourceY:et,targetX:nt,targetY:rt,label:it,labelStyle:ot,labelShowBg:at,labelBgStyle:st,labelBgPadding:lt,labelBgBorderRadius:ct,style:ut,markerEnd:ht,markerStart:dt,interactionWidth:pt})=>{const[mt,gt,yt]=getStraightPath({sourceX:tt,sourceY:et,targetX:nt,targetY:rt});return React$1.createElement(BaseEdge,{path:mt,labelX:gt,labelY:yt,label:it,labelStyle:ot,labelShowBg:at,labelBgStyle:st,labelBgPadding:lt,labelBgBorderRadius:ct,style:ut,markerEnd:ht,markerStart:dt,interactionWidth:pt})});StraightEdge.displayName="StraightEdge";function calculateControlOffset(tt,et){return tt>=0?.5*tt:et*25*Math.sqrt(-tt)}function getControlWithCurvature({pos:tt,x1:et,y1:nt,x2:rt,y2:it,c:ot}){switch(tt){case Position.Left:return[et-calculateControlOffset(et-rt,ot),nt];case Position.Right:return[et+calculateControlOffset(rt-et,ot),nt];case Position.Top:return[et,nt-calculateControlOffset(nt-it,ot)];case Position.Bottom:return[et,nt+calculateControlOffset(it-nt,ot)]}}function getBezierPath({sourceX:tt,sourceY:et,sourcePosition:nt=Position.Bottom,targetX:rt,targetY:it,targetPosition:ot=Position.Top,curvature:at=.25}){const[st,lt]=getControlWithCurvature({pos:nt,x1:tt,y1:et,x2:rt,y2:it,c:at}),[ct,ut]=getControlWithCurvature({pos:ot,x1:rt,y1:it,x2:tt,y2:et,c:at}),[ht,dt,pt,mt]=getBezierEdgeCenter({sourceX:tt,sourceY:et,targetX:rt,targetY:it,sourceControlX:st,sourceControlY:lt,targetControlX:ct,targetControlY:ut});return[`M${tt},${et} C${st},${lt} ${ct},${ut} ${rt},${it}`,ht,dt,pt,mt]}const BezierEdge=reactExports.memo(({sourceX:tt,sourceY:et,targetX:nt,targetY:rt,sourcePosition:it=Position.Bottom,targetPosition:ot=Position.Top,label:at,labelStyle:st,labelShowBg:lt,labelBgStyle:ct,labelBgPadding:ut,labelBgBorderRadius:ht,style:dt,markerEnd:pt,markerStart:mt,pathOptions:gt,interactionWidth:yt})=>{const[bt,vt,xt]=getBezierPath({sourceX:tt,sourceY:et,sourcePosition:it,targetX:nt,targetY:rt,targetPosition:ot,curvature:gt==null?void 0:gt.curvature});return React$1.createElement(BaseEdge,{path:bt,labelX:vt,labelY:xt,label:at,labelStyle:st,labelShowBg:lt,labelBgStyle:ct,labelBgPadding:ut,labelBgBorderRadius:ht,style:dt,markerEnd:pt,markerStart:mt,interactionWidth:yt})});BezierEdge.displayName="BezierEdge";const NodeIdContext=reactExports.createContext(null),Provider=NodeIdContext.Provider;NodeIdContext.Consumer;const useNodeId=()=>reactExports.useContext(NodeIdContext),isEdge=tt=>"id"in tt&&"source"in tt&&"target"in tt,getEdgeId=({source:tt,sourceHandle:et,target:nt,targetHandle:rt})=>`reactflow__edge-${tt}${et||""}-${nt}${rt||""}`,getMarkerId=(tt,et)=>typeof tt>"u"?"":typeof tt=="string"?tt:`${et?`${et}__`:""}${Object.keys(tt).sort().map(rt=>`${rt}=${tt[rt]}`).join("&")}`,connectionExists=(tt,et)=>et.some(nt=>nt.source===tt.source&&nt.target===tt.target&&(nt.sourceHandle===tt.sourceHandle||!nt.sourceHandle&&!tt.sourceHandle)&&(nt.targetHandle===tt.targetHandle||!nt.targetHandle&&!tt.targetHandle)),addEdge=(tt,et)=>{if(!tt.source||!tt.target)return et;let nt;return isEdge(tt)?nt={...tt}:nt={...tt,id:getEdgeId(tt)},connectionExists(nt,et)?et:et.concat(nt)},pointToRendererPoint=({x:tt,y:et},[nt,rt,it],ot,[at,st])=>{const lt={x:(tt-nt)/it,y:(et-rt)/it};return ot?{x:at*Math.round(lt.x/at),y:st*Math.round(lt.y/st)}:lt},rendererPointToPoint=({x:tt,y:et},[nt,rt,it])=>({x:tt*it+nt,y:et*it+rt}),getNodePositionWithOrigin=(tt,et=[0,0])=>{if(!tt)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const nt=(tt.width??0)*et[0],rt=(tt.height??0)*et[1],it={x:tt.position.x-nt,y:tt.position.y-rt};return{...it,positionAbsolute:tt.positionAbsolute?{x:tt.positionAbsolute.x-nt,y:tt.positionAbsolute.y-rt}:it}},getRectOfNodes=(tt,et=[0,0])=>{if(tt.length===0)return{x:0,y:0,width:0,height:0};const nt=tt.reduce((rt,it)=>{const{x:ot,y:at}=getNodePositionWithOrigin(it,et).positionAbsolute;return getBoundsOfBoxes(rt,rectToBox({x:ot,y:at,width:it.width||0,height:it.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return boxToRect(nt)},getNodesInside=(tt,et,[nt,rt,it]=[0,0,1],ot=!1,at=!1,st=[0,0])=>{const lt={x:(et.x-nt)/it,y:(et.y-rt)/it,width:et.width/it,height:et.height/it},ct=[];return tt.forEach(ut=>{const{width:ht,height:dt,selectable:pt=!0,hidden:mt=!1}=ut;if(at&&!pt||mt)return!1;const{positionAbsolute:gt}=getNodePositionWithOrigin(ut,st),yt={x:gt.x,y:gt.y,width:ht||0,height:dt||0},bt=getOverlappingArea(lt,yt),vt=typeof ht>"u"||typeof dt>"u"||ht===null||dt===null,xt=ot&&bt>0,kt=(ht||0)*(dt||0);(vt||xt||bt>=kt||ut.dragging)&&ct.push(ut)}),ct},getConnectedEdges=(tt,et)=>{const nt=tt.map(rt=>rt.id);return et.filter(rt=>nt.includes(rt.source)||nt.includes(rt.target))},getTransformForBounds=(tt,et,nt,rt,it,ot=.1)=>{const at=et/(tt.width*(1+ot)),st=nt/(tt.height*(1+ot)),lt=Math.min(at,st),ct=clamp(lt,rt,it),ut=tt.x+tt.width/2,ht=tt.y+tt.height/2,dt=et/2-ut*ct,pt=nt/2-ht*ct;return[dt,pt,ct]},getD3Transition=(tt,et=0)=>tt.transition().duration(et);function getHandles(tt,et,nt,rt){return(et[nt]||[]).reduce((it,ot)=>{var at,st;return`${tt.id}-${ot.id}-${nt}`!==rt&&it.push({id:ot.id||null,type:nt,nodeId:tt.id,x:(((at=tt.positionAbsolute)==null?void 0:at.x)??0)+ot.x+ot.width/2,y:(((st=tt.positionAbsolute)==null?void 0:st.y)??0)+ot.y+ot.height/2}),it},[])}function getClosestHandle(tt,et,nt,rt,it,ot){const{x:at,y:st}=getEventPosition(tt),ct=et.elementsFromPoint(at,st).find(mt=>mt.classList.contains("react-flow__handle"));if(ct){const mt=ct.getAttribute("data-nodeid");if(mt){const gt=getHandleType(void 0,ct),yt=ct.getAttribute("data-handleid"),bt=ot({nodeId:mt,id:yt,type:gt});if(bt)return{handle:{id:yt,type:gt,nodeId:mt,x:nt.x,y:nt.y},validHandleResult:bt}}}let ut=[],ht=1/0;if(it.forEach(mt=>{const gt=Math.sqrt((mt.x-nt.x)**2+(mt.y-nt.y)**2);if(gt<=rt){const yt=ot(mt);gt<=ht&&(gtmt.isValid),pt=ut.some(({handle:mt})=>mt.type==="target");return ut.find(({handle:mt,validHandleResult:gt})=>pt?mt.type==="target":dt?gt.isValid:!0)||ut[0]}const nullConnection={source:null,target:null,sourceHandle:null,targetHandle:null},defaultResult=()=>({handleDomNode:null,isValid:!1,connection:nullConnection,endHandle:null});function isValidHandle(tt,et,nt,rt,it,ot,at){const st=it==="target",lt=at.querySelector(`.react-flow__handle[data-id="${tt==null?void 0:tt.nodeId}-${tt==null?void 0:tt.id}-${tt==null?void 0:tt.type}"]`),ct={...defaultResult(),handleDomNode:lt};if(lt){const ut=getHandleType(void 0,lt),ht=lt.getAttribute("data-nodeid"),dt=lt.getAttribute("data-handleid"),pt=lt.classList.contains("connectable"),mt=lt.classList.contains("connectableend"),gt={source:st?ht:nt,sourceHandle:st?dt:rt,target:st?nt:ht,targetHandle:st?rt:dt};ct.connection=gt,pt&&mt&&(et===ConnectionMode.Strict?st&&ut==="source"||!st&&ut==="target":ht!==nt||dt!==rt)&&(ct.endHandle={nodeId:ht,handleId:dt,type:ut},ct.isValid=ot(gt))}return ct}function getHandleLookup({nodes:tt,nodeId:et,handleId:nt,handleType:rt}){return tt.reduce((it,ot)=>{if(ot[internalsSymbol]){const{handleBounds:at}=ot[internalsSymbol];let st=[],lt=[];at&&(st=getHandles(ot,at,"source",`${et}-${nt}-${rt}`),lt=getHandles(ot,at,"target",`${et}-${nt}-${rt}`)),it.push(...st,...lt)}return it},[])}function getHandleType(tt,et){return tt||(et!=null&&et.classList.contains("target")?"target":et!=null&&et.classList.contains("source")?"source":null)}function resetRecentHandle(tt){tt==null||tt.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function getConnectionStatus(tt,et){let nt=null;return et?nt="valid":tt&&!et&&(nt="invalid"),nt}function handlePointerDown({event:tt,handleId:et,nodeId:nt,onConnect:rt,isTarget:it,getState:ot,setState:at,isValidConnection:st,edgeUpdaterType:lt,onEdgeUpdateEnd:ct}){const ut=getHostForElement(tt.target),{connectionMode:ht,domNode:dt,autoPanOnConnect:pt,connectionRadius:mt,onConnectStart:gt,panBy:yt,getNodes:bt,cancelConnection:vt}=ot();let xt=0,kt;const{x:St,y:Tt}=getEventPosition(tt),At=ut==null?void 0:ut.elementFromPoint(St,Tt),Et=getHandleType(lt,At),$t=dt==null?void 0:dt.getBoundingClientRect();if(!$t||!Et)return;let Dt,jt=getEventPosition(tt,$t),Pt=!1,Ct=null,wt=!1,It=null;const Ot=getHandleLookup({nodes:bt(),nodeId:nt,handleId:et,handleType:Et}),Wt=()=>{if(!pt)return;const[Nt,Ut]=calcAutoPan(jt,$t);yt({x:Nt,y:Ut}),xt=requestAnimationFrame(Wt)};at({connectionPosition:jt,connectionStatus:null,connectionNodeId:nt,connectionHandleId:et,connectionHandleType:Et,connectionStartHandle:{nodeId:nt,handleId:et,type:Et},connectionEndHandle:null}),gt==null||gt(tt,{nodeId:nt,handleId:et,handleType:Et});function zt(Nt){const{transform:Ut}=ot();jt=getEventPosition(Nt,$t);const{handle:Mt,validHandleResult:Ht}=getClosestHandle(Nt,ut,pointToRendererPoint(jt,Ut,!1,[1,1]),mt,Ot,en=>isValidHandle(en,ht,nt,et,it?"target":"source",st,ut));if(kt=Mt,Pt||(Wt(),Pt=!0),It=Ht.handleDomNode,Ct=Ht.connection,wt=Ht.isValid,at({connectionPosition:kt&&wt?rendererPointToPoint({x:kt.x,y:kt.y},Ut):jt,connectionStatus:getConnectionStatus(!!kt,wt),connectionEndHandle:Ht.endHandle}),!kt&&!wt&&!It)return resetRecentHandle(Dt);Ct.source!==Ct.target&&It&&(resetRecentHandle(Dt),Dt=It,It.classList.add("connecting","react-flow__handle-connecting"),It.classList.toggle("valid",wt),It.classList.toggle("react-flow__handle-valid",wt))}function Ft(Nt){var Ut,Mt;(kt||It)&&Ct&&wt&&(rt==null||rt(Ct)),(Mt=(Ut=ot()).onConnectEnd)==null||Mt.call(Ut,Nt),lt&&(ct==null||ct(Nt)),resetRecentHandle(Dt),vt(),cancelAnimationFrame(xt),Pt=!1,wt=!1,Ct=null,It=null,ut.removeEventListener("mousemove",zt),ut.removeEventListener("mouseup",Ft),ut.removeEventListener("touchmove",zt),ut.removeEventListener("touchend",Ft)}ut.addEventListener("mousemove",zt),ut.addEventListener("mouseup",Ft),ut.addEventListener("touchmove",zt),ut.addEventListener("touchend",Ft)}const alwaysValid=()=>!0,selector$f=tt=>({connectionStartHandle:tt.connectionStartHandle,connectOnClick:tt.connectOnClick,noPanClassName:tt.noPanClassName}),connectingSelector=(tt,et,nt)=>rt=>{const{connectionStartHandle:it,connectionEndHandle:ot,connectionClickStartHandle:at}=rt;return{connecting:(it==null?void 0:it.nodeId)===tt&&(it==null?void 0:it.handleId)===et&&(it==null?void 0:it.type)===nt||(ot==null?void 0:ot.nodeId)===tt&&(ot==null?void 0:ot.handleId)===et&&(ot==null?void 0:ot.type)===nt,clickConnecting:(at==null?void 0:at.nodeId)===tt&&(at==null?void 0:at.handleId)===et&&(at==null?void 0:at.type)===nt}},Handle=reactExports.forwardRef(({type:tt="source",position:et=Position.Top,isValidConnection:nt,isConnectable:rt=!0,isConnectableStart:it=!0,isConnectableEnd:ot=!0,id:at,onConnect:st,children:lt,className:ct,onMouseDown:ut,onTouchStart:ht,...dt},pt)=>{var $t,Dt;const mt=at||null,gt=tt==="target",yt=useStoreApi(),bt=useNodeId(),{connectOnClick:vt,noPanClassName:xt}=useStore(selector$f,shallow$1),{connecting:kt,clickConnecting:St}=useStore(connectingSelector(bt,mt,tt),shallow$1);bt||(Dt=($t=yt.getState()).onError)==null||Dt.call($t,"010",errorMessages.error010());const Tt=jt=>{const{defaultEdgeOptions:Pt,onConnect:Ct,hasDefaultEdges:wt}=yt.getState(),It={...Pt,...jt};if(wt){const{edges:Ot,setEdges:Wt}=yt.getState();Wt(addEdge(It,Ot))}Ct==null||Ct(It),st==null||st(It)},At=jt=>{if(!bt)return;const Pt=isMouseEvent(jt);it&&(Pt&&jt.button===0||!Pt)&&handlePointerDown({event:jt,handleId:mt,nodeId:bt,onConnect:Tt,isTarget:gt,getState:yt.getState,setState:yt.setState,isValidConnection:nt||yt.getState().isValidConnection||alwaysValid}),Pt?ut==null||ut(jt):ht==null||ht(jt)},Et=jt=>{const{onClickConnectStart:Pt,onClickConnectEnd:Ct,connectionClickStartHandle:wt,connectionMode:It,isValidConnection:Ot}=yt.getState();if(!bt||!wt&&!it)return;if(!wt){Pt==null||Pt(jt,{nodeId:bt,handleId:mt,handleType:tt}),yt.setState({connectionClickStartHandle:{nodeId:bt,type:tt,handleId:mt}});return}const Wt=getHostForElement(jt.target),zt=nt||Ot||alwaysValid,{connection:Ft,isValid:Nt}=isValidHandle({nodeId:bt,id:mt,type:tt},It,wt.nodeId,wt.handleId||null,wt.type,zt,Wt);Nt&&Tt(Ft),Ct==null||Ct(jt),yt.setState({connectionClickStartHandle:null})};return React$1.createElement("div",{"data-handleid":mt,"data-nodeid":bt,"data-handlepos":et,"data-id":`${bt}-${mt}-${tt}`,className:cc(["react-flow__handle",`react-flow__handle-${et}`,"nodrag",xt,ct,{source:!gt,target:gt,connectable:rt,connectablestart:it,connectableend:ot,connecting:St,connectionindicator:rt&&(it&&!kt||ot&&kt)}]),onMouseDown:At,onTouchStart:At,onClick:vt?Et:void 0,ref:pt,...dt},lt)});Handle.displayName="Handle";var Handle$1=reactExports.memo(Handle);const DefaultNode=({data:tt,isConnectable:et,targetPosition:nt=Position.Top,sourcePosition:rt=Position.Bottom})=>React$1.createElement(React$1.Fragment,null,React$1.createElement(Handle$1,{type:"target",position:nt,isConnectable:et}),tt==null?void 0:tt.label,React$1.createElement(Handle$1,{type:"source",position:rt,isConnectable:et}));DefaultNode.displayName="DefaultNode";var DefaultNode$1=reactExports.memo(DefaultNode);const InputNode=({data:tt,isConnectable:et,sourcePosition:nt=Position.Bottom})=>React$1.createElement(React$1.Fragment,null,tt==null?void 0:tt.label,React$1.createElement(Handle$1,{type:"source",position:nt,isConnectable:et}));InputNode.displayName="InputNode";var InputNode$1=reactExports.memo(InputNode);const OutputNode=({data:tt,isConnectable:et,targetPosition:nt=Position.Top})=>React$1.createElement(React$1.Fragment,null,React$1.createElement(Handle$1,{type:"target",position:nt,isConnectable:et}),tt==null?void 0:tt.label);OutputNode.displayName="OutputNode";var OutputNode$1=reactExports.memo(OutputNode);const GroupNode=()=>null;GroupNode.displayName="GroupNode";const selector$e=tt=>({selectedNodes:tt.getNodes().filter(et=>et.selected),selectedEdges:tt.edges.filter(et=>et.selected)}),selectId=tt=>tt.id;function areEqual(tt,et){return shallow$1(tt.selectedNodes.map(selectId),et.selectedNodes.map(selectId))&&shallow$1(tt.selectedEdges.map(selectId),et.selectedEdges.map(selectId))}const SelectionListener=reactExports.memo(({onSelectionChange:tt})=>{const et=useStoreApi(),{selectedNodes:nt,selectedEdges:rt}=useStore(selector$e,areEqual);return reactExports.useEffect(()=>{var ot,at;const it={nodes:nt,edges:rt};tt==null||tt(it),(at=(ot=et.getState()).onSelectionChange)==null||at.call(ot,it)},[nt,rt,tt]),null});SelectionListener.displayName="SelectionListener";const changeSelector=tt=>!!tt.onSelectionChange;function Wrapper$1$1({onSelectionChange:tt}){const et=useStore(changeSelector);return tt||et?React$1.createElement(SelectionListener,{onSelectionChange:tt}):null}const selector$d=tt=>({setNodes:tt.setNodes,setEdges:tt.setEdges,setDefaultNodesAndEdges:tt.setDefaultNodesAndEdges,setMinZoom:tt.setMinZoom,setMaxZoom:tt.setMaxZoom,setTranslateExtent:tt.setTranslateExtent,setNodeExtent:tt.setNodeExtent,reset:tt.reset});function useStoreUpdater(tt,et){reactExports.useEffect(()=>{typeof tt<"u"&&et(tt)},[tt])}function useDirectStoreUpdater(tt,et,nt){reactExports.useEffect(()=>{typeof et<"u"&&nt({[tt]:et})},[et])}const StoreUpdater=({nodes:tt,edges:et,defaultNodes:nt,defaultEdges:rt,onConnect:it,onConnectStart:ot,onConnectEnd:at,onClickConnectStart:st,onClickConnectEnd:lt,nodesDraggable:ct,nodesConnectable:ut,nodesFocusable:ht,edgesFocusable:dt,edgesUpdatable:pt,elevateNodesOnSelect:mt,minZoom:gt,maxZoom:yt,nodeExtent:bt,onNodesChange:vt,onEdgesChange:xt,elementsSelectable:kt,connectionMode:St,snapGrid:Tt,snapToGrid:At,translateExtent:Et,connectOnClick:$t,defaultEdgeOptions:Dt,fitView:jt,fitViewOptions:Pt,onNodesDelete:Ct,onEdgesDelete:wt,onNodeDrag:It,onNodeDragStart:Ot,onNodeDragStop:Wt,onSelectionDrag:zt,onSelectionDragStart:Ft,onSelectionDragStop:Nt,noPanClassName:Ut,nodeOrigin:Mt,rfId:Ht,autoPanOnConnect:en,autoPanOnNodeDrag:sn,onError:Kt,connectionRadius:rn,isValidConnection:nn,nodeDragThreshold:hn})=>{const{setNodes:vn,setEdges:an,setDefaultNodesAndEdges:Qt,setMinZoom:_n,setMaxZoom:Pn,setTranslateExtent:$n,setNodeExtent:Nn,reset:Tn}=useStore(selector$d,shallow$1),cn=useStoreApi();return reactExports.useEffect(()=>{const mn=rt==null?void 0:rt.map(In=>({...In,...Dt}));return Qt(nt,mn),()=>{Tn()}},[]),useDirectStoreUpdater("defaultEdgeOptions",Dt,cn.setState),useDirectStoreUpdater("connectionMode",St,cn.setState),useDirectStoreUpdater("onConnect",it,cn.setState),useDirectStoreUpdater("onConnectStart",ot,cn.setState),useDirectStoreUpdater("onConnectEnd",at,cn.setState),useDirectStoreUpdater("onClickConnectStart",st,cn.setState),useDirectStoreUpdater("onClickConnectEnd",lt,cn.setState),useDirectStoreUpdater("nodesDraggable",ct,cn.setState),useDirectStoreUpdater("nodesConnectable",ut,cn.setState),useDirectStoreUpdater("nodesFocusable",ht,cn.setState),useDirectStoreUpdater("edgesFocusable",dt,cn.setState),useDirectStoreUpdater("edgesUpdatable",pt,cn.setState),useDirectStoreUpdater("elementsSelectable",kt,cn.setState),useDirectStoreUpdater("elevateNodesOnSelect",mt,cn.setState),useDirectStoreUpdater("snapToGrid",At,cn.setState),useDirectStoreUpdater("snapGrid",Tt,cn.setState),useDirectStoreUpdater("onNodesChange",vt,cn.setState),useDirectStoreUpdater("onEdgesChange",xt,cn.setState),useDirectStoreUpdater("connectOnClick",$t,cn.setState),useDirectStoreUpdater("fitViewOnInit",jt,cn.setState),useDirectStoreUpdater("fitViewOnInitOptions",Pt,cn.setState),useDirectStoreUpdater("onNodesDelete",Ct,cn.setState),useDirectStoreUpdater("onEdgesDelete",wt,cn.setState),useDirectStoreUpdater("onNodeDrag",It,cn.setState),useDirectStoreUpdater("onNodeDragStart",Ot,cn.setState),useDirectStoreUpdater("onNodeDragStop",Wt,cn.setState),useDirectStoreUpdater("onSelectionDrag",zt,cn.setState),useDirectStoreUpdater("onSelectionDragStart",Ft,cn.setState),useDirectStoreUpdater("onSelectionDragStop",Nt,cn.setState),useDirectStoreUpdater("noPanClassName",Ut,cn.setState),useDirectStoreUpdater("nodeOrigin",Mt,cn.setState),useDirectStoreUpdater("rfId",Ht,cn.setState),useDirectStoreUpdater("autoPanOnConnect",en,cn.setState),useDirectStoreUpdater("autoPanOnNodeDrag",sn,cn.setState),useDirectStoreUpdater("onError",Kt,cn.setState),useDirectStoreUpdater("connectionRadius",rn,cn.setState),useDirectStoreUpdater("isValidConnection",nn,cn.setState),useDirectStoreUpdater("nodeDragThreshold",hn,cn.setState),useStoreUpdater(tt,vn),useStoreUpdater(et,an),useStoreUpdater(gt,_n),useStoreUpdater(yt,Pn),useStoreUpdater(Et,$n),useStoreUpdater(bt,Nn),null},style$1={display:"none"},ariaLiveStyle={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},ARIA_NODE_DESC_KEY="react-flow__node-desc",ARIA_EDGE_DESC_KEY="react-flow__edge-desc",ARIA_LIVE_MESSAGE="react-flow__aria-live",selector$c=tt=>tt.ariaLiveMessage;function AriaLiveMessage({rfId:tt}){const et=useStore(selector$c);return React$1.createElement("div",{id:`${ARIA_LIVE_MESSAGE}-${tt}`,"aria-live":"assertive","aria-atomic":"true",style:ariaLiveStyle},et)}function A11yDescriptions({rfId:tt,disableKeyboardA11y:et}){return React$1.createElement(React$1.Fragment,null,React$1.createElement("div",{id:`${ARIA_NODE_DESC_KEY}-${tt}`,style:style$1},"Press enter or space to select a node.",!et&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),React$1.createElement("div",{id:`${ARIA_EDGE_DESC_KEY}-${tt}`,style:style$1},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!et&&React$1.createElement(AriaLiveMessage,{rfId:tt}))}var useKeyPress=(tt=null,et={actInsideInputWithModifier:!0})=>{const[nt,rt]=reactExports.useState(!1),it=reactExports.useRef(!1),ot=reactExports.useRef(new Set([])),[at,st]=reactExports.useMemo(()=>{if(tt!==null){const ct=(Array.isArray(tt)?tt:[tt]).filter(ht=>typeof ht=="string").map(ht=>ht.split("+")),ut=ct.reduce((ht,dt)=>ht.concat(...dt),[]);return[ct,ut]}return[[],[]]},[tt]);return reactExports.useEffect(()=>{const lt=typeof document<"u"?document:null,ct=(et==null?void 0:et.target)||lt;if(tt!==null){const ut=pt=>{if(it.current=pt.ctrlKey||pt.metaKey||pt.shiftKey,(!it.current||it.current&&!et.actInsideInputWithModifier)&&isInputDOMNode(pt))return!1;const gt=useKeyOrCode(pt.code,st);ot.current.add(pt[gt]),isMatchingKey(at,ot.current,!1)&&(pt.preventDefault(),rt(!0))},ht=pt=>{if((!it.current||it.current&&!et.actInsideInputWithModifier)&&isInputDOMNode(pt))return!1;const gt=useKeyOrCode(pt.code,st);isMatchingKey(at,ot.current,!0)?(rt(!1),ot.current.clear()):ot.current.delete(pt[gt]),pt.key==="Meta"&&ot.current.clear(),it.current=!1},dt=()=>{ot.current.clear(),rt(!1)};return ct==null||ct.addEventListener("keydown",ut),ct==null||ct.addEventListener("keyup",ht),window.addEventListener("blur",dt),()=>{ct==null||ct.removeEventListener("keydown",ut),ct==null||ct.removeEventListener("keyup",ht),window.removeEventListener("blur",dt)}}},[tt,rt]),nt};function isMatchingKey(tt,et,nt){return tt.filter(rt=>nt||rt.length===et.size).some(rt=>rt.every(it=>et.has(it)))}function useKeyOrCode(tt,et){return et.includes(tt)?"code":"key"}function calculateXYZPosition(tt,et,nt,rt){var at,st;if(!tt.parentNode)return nt;const it=et.get(tt.parentNode),ot=getNodePositionWithOrigin(it,rt);return calculateXYZPosition(it,et,{x:(nt.x??0)+ot.x,y:(nt.y??0)+ot.y,z:(((at=it[internalsSymbol])==null?void 0:at.z)??0)>(nt.z??0)?((st=it[internalsSymbol])==null?void 0:st.z)??0:nt.z??0},rt)}function updateAbsoluteNodePositions(tt,et,nt){tt.forEach(rt=>{var it;if(rt.parentNode&&!tt.has(rt.parentNode))throw new Error(`Parent node ${rt.parentNode} not found`);if(rt.parentNode||nt!=null&&nt[rt.id]){const{x:ot,y:at,z:st}=calculateXYZPosition(rt,tt,{...rt.position,z:((it=rt[internalsSymbol])==null?void 0:it.z)??0},et);rt.positionAbsolute={x:ot,y:at},rt[internalsSymbol].z=st,nt!=null&&nt[rt.id]&&(rt[internalsSymbol].isParent=!0)}})}function createNodeInternals(tt,et,nt,rt){const it=new Map,ot={},at=rt?1e3:0;return tt.forEach(st=>{var ht;const lt=(isNumeric(st.zIndex)?st.zIndex:0)+(st.selected?at:0),ct=et.get(st.id),ut={width:ct==null?void 0:ct.width,height:ct==null?void 0:ct.height,...st,positionAbsolute:{x:st.position.x,y:st.position.y}};st.parentNode&&(ut.parentNode=st.parentNode,ot[st.parentNode]=!0),Object.defineProperty(ut,internalsSymbol,{enumerable:!1,value:{handleBounds:(ht=ct==null?void 0:ct[internalsSymbol])==null?void 0:ht.handleBounds,z:lt}}),it.set(st.id,ut)}),updateAbsoluteNodePositions(it,nt,ot),it}function fitView(tt,et={}){const{getNodes:nt,width:rt,height:it,minZoom:ot,maxZoom:at,d3Zoom:st,d3Selection:lt,fitViewOnInitDone:ct,fitViewOnInit:ut,nodeOrigin:ht}=tt(),dt=et.initial&&!ct&&ut;if(st&<&&(dt||!et.initial)){const mt=nt().filter(yt=>{var vt;const bt=et.includeHiddenNodes?yt.width&&yt.height:!yt.hidden;return(vt=et.nodes)!=null&&vt.length?bt&&et.nodes.some(xt=>xt.id===yt.id):bt}),gt=mt.every(yt=>yt.width&&yt.height);if(mt.length>0&>){const yt=getRectOfNodes(mt,ht),[bt,vt,xt]=getTransformForBounds(yt,rt,it,et.minZoom??ot,et.maxZoom??at,et.padding??.1),kt=identity.translate(bt,vt).scale(xt);return typeof et.duration=="number"&&et.duration>0?st.transform(getD3Transition(lt,et.duration),kt):st.transform(lt,kt),!0}}return!1}function handleControlledNodeSelectionChange(tt,et){return tt.forEach(nt=>{const rt=et.get(nt.id);rt&&et.set(rt.id,{...rt,[internalsSymbol]:rt[internalsSymbol],selected:nt.selected})}),new Map(et)}function handleControlledEdgeSelectionChange(tt,et){return et.map(nt=>{const rt=tt.find(it=>it.id===nt.id);return rt&&(nt.selected=rt.selected),nt})}function updateNodesAndEdgesSelections({changedNodes:tt,changedEdges:et,get:nt,set:rt}){const{nodeInternals:it,edges:ot,onNodesChange:at,onEdgesChange:st,hasDefaultNodes:lt,hasDefaultEdges:ct}=nt();tt!=null&&tt.length&&(lt&&rt({nodeInternals:handleControlledNodeSelectionChange(tt,it)}),at==null||at(tt)),et!=null&&et.length&&(ct&&rt({edges:handleControlledEdgeSelectionChange(et,ot)}),st==null||st(et))}const noop$1=()=>{},initialViewportHelper={zoomIn:noop$1,zoomOut:noop$1,zoomTo:noop$1,getZoom:()=>1,setViewport:noop$1,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:noop$1,fitBounds:noop$1,project:tt=>tt,viewportInitialized:!1},selector$b=tt=>({d3Zoom:tt.d3Zoom,d3Selection:tt.d3Selection}),useViewportHelper=()=>{const tt=useStoreApi(),{d3Zoom:et,d3Selection:nt}=useStore(selector$b,shallow$1);return reactExports.useMemo(()=>nt&&et?{zoomIn:it=>et.scaleBy(getD3Transition(nt,it==null?void 0:it.duration),1.2),zoomOut:it=>et.scaleBy(getD3Transition(nt,it==null?void 0:it.duration),1/1.2),zoomTo:(it,ot)=>et.scaleTo(getD3Transition(nt,ot==null?void 0:ot.duration),it),getZoom:()=>tt.getState().transform[2],setViewport:(it,ot)=>{const[at,st,lt]=tt.getState().transform,ct=identity.translate(it.x??at,it.y??st).scale(it.zoom??lt);et.transform(getD3Transition(nt,ot==null?void 0:ot.duration),ct)},getViewport:()=>{const[it,ot,at]=tt.getState().transform;return{x:it,y:ot,zoom:at}},fitView:it=>fitView(tt.getState,it),setCenter:(it,ot,at)=>{const{width:st,height:lt,maxZoom:ct}=tt.getState(),ut=typeof(at==null?void 0:at.zoom)<"u"?at.zoom:ct,ht=st/2-it*ut,dt=lt/2-ot*ut,pt=identity.translate(ht,dt).scale(ut);et.transform(getD3Transition(nt,at==null?void 0:at.duration),pt)},fitBounds:(it,ot)=>{const{width:at,height:st,minZoom:lt,maxZoom:ct}=tt.getState(),[ut,ht,dt]=getTransformForBounds(it,at,st,lt,ct,(ot==null?void 0:ot.padding)??.1),pt=identity.translate(ut,ht).scale(dt);et.transform(getD3Transition(nt,ot==null?void 0:ot.duration),pt)},project:it=>{const{transform:ot,snapToGrid:at,snapGrid:st}=tt.getState();return pointToRendererPoint(it,ot,at,st)},viewportInitialized:!0}:initialViewportHelper,[et,nt])};function useReactFlow(){const tt=useViewportHelper(),et=useStoreApi(),nt=reactExports.useCallback(()=>et.getState().getNodes().map(gt=>({...gt})),[]),rt=reactExports.useCallback(gt=>et.getState().nodeInternals.get(gt),[]),it=reactExports.useCallback(()=>{const{edges:gt=[]}=et.getState();return gt.map(yt=>({...yt}))},[]),ot=reactExports.useCallback(gt=>{const{edges:yt=[]}=et.getState();return yt.find(bt=>bt.id===gt)},[]),at=reactExports.useCallback(gt=>{const{getNodes:yt,setNodes:bt,hasDefaultNodes:vt,onNodesChange:xt}=et.getState(),kt=yt(),St=typeof gt=="function"?gt(kt):gt;if(vt)bt(St);else if(xt){const Tt=St.length===0?kt.map(At=>({type:"remove",id:At.id})):St.map(At=>({item:At,type:"reset"}));xt(Tt)}},[]),st=reactExports.useCallback(gt=>{const{edges:yt=[],setEdges:bt,hasDefaultEdges:vt,onEdgesChange:xt}=et.getState(),kt=typeof gt=="function"?gt(yt):gt;if(vt)bt(kt);else if(xt){const St=kt.length===0?yt.map(Tt=>({type:"remove",id:Tt.id})):kt.map(Tt=>({item:Tt,type:"reset"}));xt(St)}},[]),lt=reactExports.useCallback(gt=>{const yt=Array.isArray(gt)?gt:[gt],{getNodes:bt,setNodes:vt,hasDefaultNodes:xt,onNodesChange:kt}=et.getState();if(xt){const Tt=[...bt(),...yt];vt(Tt)}else if(kt){const St=yt.map(Tt=>({item:Tt,type:"add"}));kt(St)}},[]),ct=reactExports.useCallback(gt=>{const yt=Array.isArray(gt)?gt:[gt],{edges:bt=[],setEdges:vt,hasDefaultEdges:xt,onEdgesChange:kt}=et.getState();if(xt)vt([...bt,...yt]);else if(kt){const St=yt.map(Tt=>({item:Tt,type:"add"}));kt(St)}},[]),ut=reactExports.useCallback(()=>{const{getNodes:gt,edges:yt=[],transform:bt}=et.getState(),[vt,xt,kt]=bt;return{nodes:gt().map(St=>({...St})),edges:yt.map(St=>({...St})),viewport:{x:vt,y:xt,zoom:kt}}},[]),ht=reactExports.useCallback(({nodes:gt,edges:yt})=>{const{nodeInternals:bt,getNodes:vt,edges:xt,hasDefaultNodes:kt,hasDefaultEdges:St,onNodesDelete:Tt,onEdgesDelete:At,onNodesChange:Et,onEdgesChange:$t}=et.getState(),Dt=(gt||[]).map(It=>It.id),jt=(yt||[]).map(It=>It.id),Pt=vt().reduce((It,Ot)=>{const Wt=!Dt.includes(Ot.id)&&Ot.parentNode&&It.find(Ft=>Ft.id===Ot.parentNode);return(typeof Ot.deletable=="boolean"?Ot.deletable:!0)&&(Dt.includes(Ot.id)||Wt)&&It.push(Ot),It},[]),Ct=xt.filter(It=>typeof It.deletable=="boolean"?It.deletable:!0),wt=Ct.filter(It=>jt.includes(It.id));if(Pt||wt){const It=getConnectedEdges(Pt,Ct),Ot=[...wt,...It],Wt=Ot.reduce((zt,Ft)=>(zt.includes(Ft.id)||zt.push(Ft.id),zt),[]);if((St||kt)&&(St&&et.setState({edges:xt.filter(zt=>!Wt.includes(zt.id))}),kt&&(Pt.forEach(zt=>{bt.delete(zt.id)}),et.setState({nodeInternals:new Map(bt)}))),Wt.length>0&&(At==null||At(Ot),$t&&$t(Wt.map(zt=>({id:zt,type:"remove"})))),Pt.length>0&&(Tt==null||Tt(Pt),Et)){const zt=Pt.map(Ft=>({id:Ft.id,type:"remove"}));Et(zt)}}},[]),dt=reactExports.useCallback(gt=>{const yt=isRectObject(gt),bt=yt?null:et.getState().nodeInternals.get(gt.id);return[yt?gt:nodeToRect(bt),bt,yt]},[]),pt=reactExports.useCallback((gt,yt=!0,bt)=>{const[vt,xt,kt]=dt(gt);return vt?(bt||et.getState().getNodes()).filter(St=>{if(!kt&&(St.id===xt.id||!St.positionAbsolute))return!1;const Tt=nodeToRect(St),At=getOverlappingArea(Tt,vt);return yt&&At>0||At>=gt.width*gt.height}):[]},[]),mt=reactExports.useCallback((gt,yt,bt=!0)=>{const[vt]=dt(gt);if(!vt)return!1;const xt=getOverlappingArea(vt,yt);return bt&&xt>0||xt>=gt.width*gt.height},[]);return reactExports.useMemo(()=>({...tt,getNodes:nt,getNode:rt,getEdges:it,getEdge:ot,setNodes:at,setEdges:st,addNodes:lt,addEdges:ct,toObject:ut,deleteElements:ht,getIntersectingNodes:pt,isNodeIntersecting:mt}),[tt,nt,rt,it,ot,at,st,lt,ct,ut,ht,pt,mt])}const deleteKeyOptions={actInsideInputWithModifier:!1};var useGlobalKeyHandler=({deleteKeyCode:tt,multiSelectionKeyCode:et})=>{const nt=useStoreApi(),{deleteElements:rt}=useReactFlow(),it=useKeyPress(tt,deleteKeyOptions),ot=useKeyPress(et);reactExports.useEffect(()=>{if(it){const{edges:at,getNodes:st}=nt.getState(),lt=st().filter(ut=>ut.selected),ct=at.filter(ut=>ut.selected);rt({nodes:lt,edges:ct}),nt.setState({nodesSelectionActive:!1})}},[it]),reactExports.useEffect(()=>{nt.setState({multiSelectionActive:ot})},[ot])};function useResizeHandler(tt){const et=useStoreApi();reactExports.useEffect(()=>{let nt;const rt=()=>{var ot,at;if(!tt.current)return;const it=getDimensions(tt.current);(it.height===0||it.width===0)&&((at=(ot=et.getState()).onError)==null||at.call(ot,"004",errorMessages.error004())),et.setState({width:it.width||500,height:it.height||500})};return rt(),window.addEventListener("resize",rt),tt.current&&(nt=new ResizeObserver(()=>rt()),nt.observe(tt.current)),()=>{window.removeEventListener("resize",rt),nt&&tt.current&&nt.unobserve(tt.current)}},[])}const containerStyle={position:"absolute",width:"100%",height:"100%",top:0,left:0},viewChanged=(tt,et)=>tt.x!==et.x||tt.y!==et.y||tt.zoom!==et.k,eventToFlowTransform=tt=>({x:tt.x,y:tt.y,zoom:tt.k}),isWrappedWithClass=(tt,et)=>tt.target.closest(`.${et}`),isRightClickPan=(tt,et)=>et===2&&Array.isArray(tt)&&tt.includes(2),wheelDelta=tt=>{const et=tt.ctrlKey&&isMacOs()?10:1;return-tt.deltaY*(tt.deltaMode===1?.05:tt.deltaMode?1:.002)*et},selector$a=tt=>({d3Zoom:tt.d3Zoom,d3Selection:tt.d3Selection,d3ZoomHandler:tt.d3ZoomHandler,userSelectionActive:tt.userSelectionActive}),ZoomPane=({onMove:tt,onMoveStart:et,onMoveEnd:nt,onPaneContextMenu:rt,zoomOnScroll:it=!0,zoomOnPinch:ot=!0,panOnScroll:at=!1,panOnScrollSpeed:st=.5,panOnScrollMode:lt=PanOnScrollMode.Free,zoomOnDoubleClick:ct=!0,elementsSelectable:ut,panOnDrag:ht=!0,defaultViewport:dt,translateExtent:pt,minZoom:mt,maxZoom:gt,zoomActivationKeyCode:yt,preventScrolling:bt=!0,children:vt,noWheelClassName:xt,noPanClassName:kt})=>{const St=reactExports.useRef(),Tt=useStoreApi(),At=reactExports.useRef(!1),Et=reactExports.useRef(!1),$t=reactExports.useRef(null),Dt=reactExports.useRef({x:0,y:0,zoom:0}),{d3Zoom:jt,d3Selection:Pt,d3ZoomHandler:Ct,userSelectionActive:wt}=useStore(selector$a,shallow$1),It=useKeyPress(yt),Ot=reactExports.useRef(0),Wt=reactExports.useRef(!1),zt=reactExports.useRef();return useResizeHandler($t),reactExports.useEffect(()=>{if($t.current){const Ft=$t.current.getBoundingClientRect(),Nt=zoom().scaleExtent([mt,gt]).translateExtent(pt),Ut=select($t.current).call(Nt),Mt=identity.translate(dt.x,dt.y).scale(clamp(dt.zoom,mt,gt)),Ht=[[0,0],[Ft.width,Ft.height]],en=Nt.constrain()(Mt,Ht,pt);Nt.transform(Ut,en),Nt.wheelDelta(wheelDelta),Tt.setState({d3Zoom:Nt,d3Selection:Ut,d3ZoomHandler:Ut.on("wheel.zoom"),transform:[en.x,en.y,en.k],domNode:$t.current.closest(".react-flow")})}},[]),reactExports.useEffect(()=>{Pt&&jt&&(at&&!It&&!wt?Pt.on("wheel.zoom",Ft=>{if(isWrappedWithClass(Ft,xt))return!1;Ft.preventDefault(),Ft.stopImmediatePropagation();const Nt=Pt.property("__zoom").k||1,Ut=isMacOs();if(Ft.ctrlKey&&ot&&Ut){const hn=pointer(Ft),vn=wheelDelta(Ft),an=Nt*Math.pow(2,vn);jt.scaleTo(Pt,an,hn,Ft);return}const Mt=Ft.deltaMode===1?20:1;let Ht=lt===PanOnScrollMode.Vertical?0:Ft.deltaX*Mt,en=lt===PanOnScrollMode.Horizontal?0:Ft.deltaY*Mt;!Ut&&Ft.shiftKey&<!==PanOnScrollMode.Vertical&&(Ht=Ft.deltaY*Mt,en=0),jt.translateBy(Pt,-(Ht/Nt)*st,-(en/Nt)*st,{internal:!0});const sn=eventToFlowTransform(Pt.property("__zoom")),{onViewportChangeStart:Kt,onViewportChange:rn,onViewportChangeEnd:nn}=Tt.getState();clearTimeout(zt.current),Wt.current||(Wt.current=!0,et==null||et(Ft,sn),Kt==null||Kt(sn)),Wt.current&&(tt==null||tt(Ft,sn),rn==null||rn(sn),zt.current=setTimeout(()=>{nt==null||nt(Ft,sn),nn==null||nn(sn),Wt.current=!1},150))},{passive:!1}):typeof Ct<"u"&&Pt.on("wheel.zoom",function(Ft,Nt){if(!bt||isWrappedWithClass(Ft,xt))return null;Ft.preventDefault(),Ct.call(this,Ft,Nt)},{passive:!1}))},[wt,at,lt,Pt,jt,Ct,It,ot,bt,xt,et,tt,nt]),reactExports.useEffect(()=>{jt&&jt.on("start",Ft=>{var Mt,Ht;if(!Ft.sourceEvent||Ft.sourceEvent.internal)return null;Ot.current=(Mt=Ft.sourceEvent)==null?void 0:Mt.button;const{onViewportChangeStart:Nt}=Tt.getState(),Ut=eventToFlowTransform(Ft.transform);At.current=!0,Dt.current=Ut,((Ht=Ft.sourceEvent)==null?void 0:Ht.type)==="mousedown"&&Tt.setState({paneDragging:!0}),Nt==null||Nt(Ut),et==null||et(Ft.sourceEvent,Ut)})},[jt,et]),reactExports.useEffect(()=>{jt&&(wt&&!At.current?jt.on("zoom",null):wt||jt.on("zoom",Ft=>{var Ut;const{onViewportChange:Nt}=Tt.getState();if(Tt.setState({transform:[Ft.transform.x,Ft.transform.y,Ft.transform.k]}),Et.current=!!(rt&&isRightClickPan(ht,Ot.current??0)),(tt||Nt)&&!((Ut=Ft.sourceEvent)!=null&&Ut.internal)){const Mt=eventToFlowTransform(Ft.transform);Nt==null||Nt(Mt),tt==null||tt(Ft.sourceEvent,Mt)}}))},[wt,jt,tt,ht,rt]),reactExports.useEffect(()=>{jt&&jt.on("end",Ft=>{if(!Ft.sourceEvent||Ft.sourceEvent.internal)return null;const{onViewportChangeEnd:Nt}=Tt.getState();if(At.current=!1,Tt.setState({paneDragging:!1}),rt&&isRightClickPan(ht,Ot.current??0)&&!Et.current&&rt(Ft.sourceEvent),Et.current=!1,(nt||Nt)&&viewChanged(Dt.current,Ft.transform)){const Ut=eventToFlowTransform(Ft.transform);Dt.current=Ut,clearTimeout(St.current),St.current=setTimeout(()=>{Nt==null||Nt(Ut),nt==null||nt(Ft.sourceEvent,Ut)},at?150:0)}})},[jt,at,ht,nt,rt]),reactExports.useEffect(()=>{jt&&jt.filter(Ft=>{const Nt=It||it,Ut=ot&&Ft.ctrlKey;if((ht===!0||Array.isArray(ht)&&ht.includes(1))&&Ft.button===1&&Ft.type==="mousedown"&&(isWrappedWithClass(Ft,"react-flow__node")||isWrappedWithClass(Ft,"react-flow__edge")))return!0;if(!ht&&!Nt&&!at&&!ct&&!ot||wt||!ct&&Ft.type==="dblclick"||isWrappedWithClass(Ft,xt)&&Ft.type==="wheel"||isWrappedWithClass(Ft,kt)&&(Ft.type!=="wheel"||at&&Ft.type==="wheel")||!ot&&Ft.ctrlKey&&Ft.type==="wheel"||!Nt&&!at&&!Ut&&Ft.type==="wheel"||!ht&&(Ft.type==="mousedown"||Ft.type==="touchstart")||Array.isArray(ht)&&!ht.includes(Ft.button)&&(Ft.type==="mousedown"||Ft.type==="touchstart"))return!1;const Mt=Array.isArray(ht)&&ht.includes(Ft.button)||!Ft.button||Ft.button<=1;return(!Ft.ctrlKey||Ft.type==="wheel")&&Mt})},[wt,jt,it,ot,at,ct,ht,ut,It]),React$1.createElement("div",{className:"react-flow__renderer",ref:$t,style:containerStyle},vt)},selector$9=tt=>({userSelectionActive:tt.userSelectionActive,userSelectionRect:tt.userSelectionRect});function UserSelection(){const{userSelectionActive:tt,userSelectionRect:et}=useStore(selector$9,shallow$1);return tt&&et?React$1.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:et.width,height:et.height,transform:`translate(${et.x}px, ${et.y}px)`}}):null}function handleParentExpand(tt,et){const nt=tt.find(rt=>rt.id===et.parentNode);if(nt){const rt=et.position.x+et.width-nt.width,it=et.position.y+et.height-nt.height;if(rt>0||it>0||et.position.x<0||et.position.y<0){if(nt.style={...nt.style},nt.style.width=nt.style.width??nt.width,nt.style.height=nt.style.height??nt.height,rt>0&&(nt.style.width+=rt),it>0&&(nt.style.height+=it),et.position.x<0){const ot=Math.abs(et.position.x);nt.position.x=nt.position.x-ot,nt.style.width+=ot,et.position.x=0}if(et.position.y<0){const ot=Math.abs(et.position.y);nt.position.y=nt.position.y-ot,nt.style.height+=ot,et.position.y=0}nt.width=nt.style.width,nt.height=nt.style.height}}}function applyChanges(tt,et){if(tt.some(rt=>rt.type==="reset"))return tt.filter(rt=>rt.type==="reset").map(rt=>rt.item);const nt=tt.filter(rt=>rt.type==="add").map(rt=>rt.item);return et.reduce((rt,it)=>{const ot=tt.filter(st=>st.id===it.id);if(ot.length===0)return rt.push(it),rt;const at={...it};for(const st of ot)if(st)switch(st.type){case"select":{at.selected=st.selected;break}case"position":{typeof st.position<"u"&&(at.position=st.position),typeof st.positionAbsolute<"u"&&(at.positionAbsolute=st.positionAbsolute),typeof st.dragging<"u"&&(at.dragging=st.dragging),at.expandParent&&handleParentExpand(rt,at);break}case"dimensions":{typeof st.dimensions<"u"&&(at.width=st.dimensions.width,at.height=st.dimensions.height),typeof st.updateStyle<"u"&&(at.style={...at.style||{},...st.dimensions}),typeof st.resizing=="boolean"&&(at.resizing=st.resizing),at.expandParent&&handleParentExpand(rt,at);break}case"remove":return rt}return rt.push(at),rt},nt)}function applyNodeChanges(tt,et){return applyChanges(tt,et)}const createSelectionChange=(tt,et)=>({id:tt,type:"select",selected:et});function getSelectionChanges(tt,et){return tt.reduce((nt,rt)=>{const it=et.includes(rt.id);return!rt.selected&&it?(rt.selected=!0,nt.push(createSelectionChange(rt.id,!0))):rt.selected&&!it&&(rt.selected=!1,nt.push(createSelectionChange(rt.id,!1))),nt},[])}const wrapHandler=(tt,et)=>nt=>{nt.target===et.current&&(tt==null||tt(nt))},selector$8=tt=>({userSelectionActive:tt.userSelectionActive,elementsSelectable:tt.elementsSelectable,dragging:tt.paneDragging}),Pane=reactExports.memo(({isSelecting:tt,selectionMode:et=SelectionMode.Full,panOnDrag:nt,onSelectionStart:rt,onSelectionEnd:it,onPaneClick:ot,onPaneContextMenu:at,onPaneScroll:st,onPaneMouseEnter:lt,onPaneMouseMove:ct,onPaneMouseLeave:ut,children:ht})=>{const dt=reactExports.useRef(null),pt=useStoreApi(),mt=reactExports.useRef(0),gt=reactExports.useRef(0),yt=reactExports.useRef(),{userSelectionActive:bt,elementsSelectable:vt,dragging:xt}=useStore(selector$8,shallow$1),kt=()=>{pt.setState({userSelectionActive:!1,userSelectionRect:null}),mt.current=0,gt.current=0},St=Ct=>{ot==null||ot(Ct),pt.getState().resetSelectedElements(),pt.setState({nodesSelectionActive:!1})},Tt=Ct=>{if(Array.isArray(nt)&&(nt!=null&&nt.includes(2))){Ct.preventDefault();return}at==null||at(Ct)},At=st?Ct=>st(Ct):void 0,Et=Ct=>{const{resetSelectedElements:wt,domNode:It}=pt.getState();if(yt.current=It==null?void 0:It.getBoundingClientRect(),!vt||!tt||Ct.button!==0||Ct.target!==dt.current||!yt.current)return;const{x:Ot,y:Wt}=getEventPosition(Ct,yt.current);wt(),pt.setState({userSelectionRect:{width:0,height:0,startX:Ot,startY:Wt,x:Ot,y:Wt}}),rt==null||rt(Ct)},$t=Ct=>{const{userSelectionRect:wt,nodeInternals:It,edges:Ot,transform:Wt,onNodesChange:zt,onEdgesChange:Ft,nodeOrigin:Nt,getNodes:Ut}=pt.getState();if(!tt||!yt.current||!wt)return;pt.setState({userSelectionActive:!0,nodesSelectionActive:!1});const Mt=getEventPosition(Ct,yt.current),Ht=wt.startX??0,en=wt.startY??0,sn={...wt,x:Mt.xvn.id),hn=rn.map(vn=>vn.id);if(mt.current!==hn.length){mt.current=hn.length;const vn=getSelectionChanges(Kt,hn);vn.length&&(zt==null||zt(vn))}if(gt.current!==nn.length){gt.current=nn.length;const vn=getSelectionChanges(Ot,nn);vn.length&&(Ft==null||Ft(vn))}pt.setState({userSelectionRect:sn})},Dt=Ct=>{if(Ct.button!==0)return;const{userSelectionRect:wt}=pt.getState();!bt&&wt&&Ct.target===dt.current&&(St==null||St(Ct)),pt.setState({nodesSelectionActive:mt.current>0}),kt(),it==null||it(Ct)},jt=Ct=>{bt&&(pt.setState({nodesSelectionActive:mt.current>0}),it==null||it(Ct)),kt()},Pt=vt&&(tt||bt);return React$1.createElement("div",{className:cc(["react-flow__pane",{dragging:xt,selection:tt}]),onClick:Pt?void 0:wrapHandler(St,dt),onContextMenu:wrapHandler(Tt,dt),onWheel:wrapHandler(At,dt),onMouseEnter:Pt?void 0:lt,onMouseDown:Pt?Et:void 0,onMouseMove:Pt?$t:ct,onMouseUp:Pt?Dt:void 0,onMouseLeave:Pt?jt:ut,ref:dt,style:containerStyle},ht,React$1.createElement(UserSelection,null))});Pane.displayName="Pane";function isParentSelected(tt,et){if(!tt.parentNode)return!1;const nt=et.get(tt.parentNode);return nt?nt.selected?!0:isParentSelected(nt,et):!1}function hasSelector(tt,et,nt){let rt=tt;do{if(rt!=null&&rt.matches(et))return!0;if(rt===nt.current)return!1;rt=rt.parentElement}while(rt);return!1}function getDragItems(tt,et,nt,rt){return Array.from(tt.values()).filter(it=>(it.selected||it.id===rt)&&(!it.parentNode||!isParentSelected(it,tt))&&(it.draggable||et&&typeof it.draggable>"u")).map(it=>{var ot,at;return{id:it.id,position:it.position||{x:0,y:0},positionAbsolute:it.positionAbsolute||{x:0,y:0},distance:{x:nt.x-(((ot=it.positionAbsolute)==null?void 0:ot.x)??0),y:nt.y-(((at=it.positionAbsolute)==null?void 0:at.y)??0)},delta:{x:0,y:0},extent:it.extent,parentNode:it.parentNode,width:it.width,height:it.height,expandParent:it.expandParent}})}function clampNodeExtent(tt,et){return!et||et==="parent"?et:[et[0],[et[1][0]-(tt.width||0),et[1][1]-(tt.height||0)]]}function calcNextPosition(tt,et,nt,rt,it=[0,0],ot){const at=clampNodeExtent(tt,tt.extent||rt);let st=at;if(tt.extent==="parent"&&!tt.expandParent)if(tt.parentNode&&tt.width&&tt.height){const ut=nt.get(tt.parentNode),{x:ht,y:dt}=getNodePositionWithOrigin(ut,it).positionAbsolute;st=ut&&isNumeric(ht)&&isNumeric(dt)&&isNumeric(ut.width)&&isNumeric(ut.height)?[[ht+tt.width*it[0],dt+tt.height*it[1]],[ht+ut.width-tt.width+tt.width*it[0],dt+ut.height-tt.height+tt.height*it[1]]]:st}else ot==null||ot("005",errorMessages.error005()),st=at;else if(tt.extent&&tt.parentNode&&tt.extent!=="parent"){const ut=nt.get(tt.parentNode),{x:ht,y:dt}=getNodePositionWithOrigin(ut,it).positionAbsolute;st=[[tt.extent[0][0]+ht,tt.extent[0][1]+dt],[tt.extent[1][0]+ht,tt.extent[1][1]+dt]]}let lt={x:0,y:0};if(tt.parentNode){const ut=nt.get(tt.parentNode);lt=getNodePositionWithOrigin(ut,it).positionAbsolute}const ct=st&&st!=="parent"?clampPosition(et,st):et;return{position:{x:ct.x-lt.x,y:ct.y-lt.y},positionAbsolute:ct}}function getEventHandlerParams({nodeId:tt,dragItems:et,nodeInternals:nt}){const rt=et.map(it=>({...nt.get(it.id),position:it.position,positionAbsolute:it.positionAbsolute}));return[tt?rt.find(it=>it.id===tt):rt[0],rt]}const getHandleBounds=(tt,et,nt,rt)=>{const it=et.querySelectorAll(tt);if(!it||!it.length)return null;const ot=Array.from(it),at=et.getBoundingClientRect(),st={x:at.width*rt[0],y:at.height*rt[1]};return ot.map(lt=>{const ct=lt.getBoundingClientRect();return{id:lt.getAttribute("data-handleid"),position:lt.getAttribute("data-handlepos"),x:(ct.left-at.left-st.x)/nt,y:(ct.top-at.top-st.y)/nt,...getDimensions(lt)}})};function getMouseHandler(tt,et,nt){return nt===void 0?nt:rt=>{const it=et().nodeInternals.get(tt);it&&nt(rt,{...it})}}function handleNodeClick({id:tt,store:et,unselect:nt=!1,nodeRef:rt}){const{addSelectedNodes:it,unselectNodesAndEdges:ot,multiSelectionActive:at,nodeInternals:st,onError:lt}=et.getState(),ct=st.get(tt);if(!ct){lt==null||lt("012",errorMessages.error012(tt));return}et.setState({nodesSelectionActive:!1}),ct.selected?(nt||ct.selected&&at)&&(ot({nodes:[ct],edges:[]}),requestAnimationFrame(()=>{var ut;return(ut=rt==null?void 0:rt.current)==null?void 0:ut.blur()})):it([tt])}function useGetPointerPosition(){const tt=useStoreApi();return reactExports.useCallback(({sourceEvent:nt})=>{const{transform:rt,snapGrid:it,snapToGrid:ot}=tt.getState(),at=nt.touches?nt.touches[0].clientX:nt.clientX,st=nt.touches?nt.touches[0].clientY:nt.clientY,lt={x:(at-rt[0])/rt[2],y:(st-rt[1])/rt[2]};return{xSnapped:ot?it[0]*Math.round(lt.x/it[0]):lt.x,ySnapped:ot?it[1]*Math.round(lt.y/it[1]):lt.y,...lt}},[])}function wrapSelectionDragFunc(tt){return(et,nt,rt)=>tt==null?void 0:tt(et,rt)}function useDrag({nodeRef:tt,disabled:et=!1,noDragClassName:nt,handleSelector:rt,nodeId:it,isSelectable:ot,selectNodesOnDrag:at}){const st=useStoreApi(),[lt,ct]=reactExports.useState(!1),ut=reactExports.useRef([]),ht=reactExports.useRef({x:null,y:null}),dt=reactExports.useRef(0),pt=reactExports.useRef(null),mt=reactExports.useRef({x:0,y:0}),gt=reactExports.useRef(null),yt=reactExports.useRef(!1),bt=reactExports.useRef(!1),vt=useGetPointerPosition();return reactExports.useEffect(()=>{if(tt!=null&&tt.current){const xt=select(tt.current),kt=({x:At,y:Et})=>{const{nodeInternals:$t,onNodeDrag:Dt,onSelectionDrag:jt,updateNodePositions:Pt,nodeExtent:Ct,snapGrid:wt,snapToGrid:It,nodeOrigin:Ot,onError:Wt}=st.getState();ht.current={x:At,y:Et};let zt=!1,Ft={x:0,y:0,x2:0,y2:0};if(ut.current.length>1&&Ct){const Ut=getRectOfNodes(ut.current,Ot);Ft=rectToBox(Ut)}if(ut.current=ut.current.map(Ut=>{const Mt={x:At-Ut.distance.x,y:Et-Ut.distance.y};It&&(Mt.x=wt[0]*Math.round(Mt.x/wt[0]),Mt.y=wt[1]*Math.round(Mt.y/wt[1]));const Ht=[[Ct[0][0],Ct[0][1]],[Ct[1][0],Ct[1][1]]];ut.current.length>1&&Ct&&!Ut.extent&&(Ht[0][0]=Ut.positionAbsolute.x-Ft.x+Ct[0][0],Ht[1][0]=Ut.positionAbsolute.x+(Ut.width??0)-Ft.x2+Ct[1][0],Ht[0][1]=Ut.positionAbsolute.y-Ft.y+Ct[0][1],Ht[1][1]=Ut.positionAbsolute.y+(Ut.height??0)-Ft.y2+Ct[1][1]);const en=calcNextPosition(Ut,Mt,$t,Ht,Ot,Wt);return zt=zt||Ut.position.x!==en.position.x||Ut.position.y!==en.position.y,Ut.position=en.position,Ut.positionAbsolute=en.positionAbsolute,Ut}),!zt)return;Pt(ut.current,!0,!0),ct(!0);const Nt=it?Dt:wrapSelectionDragFunc(jt);if(Nt&>.current){const[Ut,Mt]=getEventHandlerParams({nodeId:it,dragItems:ut.current,nodeInternals:$t});Nt(gt.current,Ut,Mt)}},St=()=>{if(!pt.current)return;const[At,Et]=calcAutoPan(mt.current,pt.current);if(At!==0||Et!==0){const{transform:$t,panBy:Dt}=st.getState();ht.current.x=(ht.current.x??0)-At/$t[2],ht.current.y=(ht.current.y??0)-Et/$t[2],Dt({x:At,y:Et})&&kt(ht.current)}dt.current=requestAnimationFrame(St)},Tt=At=>{var Ot;const{nodeInternals:Et,multiSelectionActive:$t,nodesDraggable:Dt,unselectNodesAndEdges:jt,onNodeDragStart:Pt,onSelectionDragStart:Ct}=st.getState();bt.current=!0;const wt=it?Pt:wrapSelectionDragFunc(Ct);(!at||!ot)&&!$t&&it&&((Ot=Et.get(it))!=null&&Ot.selected||jt()),it&&ot&&at&&handleNodeClick({id:it,store:st,nodeRef:tt});const It=vt(At);if(ht.current=It,ut.current=getDragItems(Et,Dt,It,it),wt&&ut.current){const[Wt,zt]=getEventHandlerParams({nodeId:it,dragItems:ut.current,nodeInternals:Et});wt(At.sourceEvent,Wt,zt)}};if(et)xt.on(".drag",null);else{const At=drag().on("start",Et=>{const{domNode:$t,nodeDragThreshold:Dt}=st.getState();Dt===0&&Tt(Et);const jt=vt(Et);ht.current=jt,pt.current=($t==null?void 0:$t.getBoundingClientRect())||null,mt.current=getEventPosition(Et.sourceEvent,pt.current)}).on("drag",Et=>{var Pt,Ct;const $t=vt(Et),{autoPanOnNodeDrag:Dt,nodeDragThreshold:jt}=st.getState();if(!yt.current&&bt.current&&Dt&&(yt.current=!0,St()),!bt.current){const wt=$t.xSnapped-(((Pt=ht==null?void 0:ht.current)==null?void 0:Pt.x)??0),It=$t.ySnapped-(((Ct=ht==null?void 0:ht.current)==null?void 0:Ct.y)??0);Math.sqrt(wt*wt+It*It)>jt&&Tt(Et)}(ht.current.x!==$t.xSnapped||ht.current.y!==$t.ySnapped)&&ut.current&&bt.current&&(gt.current=Et.sourceEvent,mt.current=getEventPosition(Et.sourceEvent,pt.current),kt($t))}).on("end",Et=>{if(bt.current&&(ct(!1),yt.current=!1,bt.current=!1,cancelAnimationFrame(dt.current),ut.current)){const{updateNodePositions:$t,nodeInternals:Dt,onNodeDragStop:jt,onSelectionDragStop:Pt}=st.getState(),Ct=it?jt:wrapSelectionDragFunc(Pt);if($t(ut.current,!1,!1),Ct){const[wt,It]=getEventHandlerParams({nodeId:it,dragItems:ut.current,nodeInternals:Dt});Ct(Et.sourceEvent,wt,It)}}}).filter(Et=>{const $t=Et.target;return!Et.button&&(!nt||!hasSelector($t,`.${nt}`,tt))&&(!rt||hasSelector($t,rt,tt))});return xt.call(At),()=>{xt.on(".drag",null)}}}},[tt,et,nt,rt,ot,st,it,at,vt]),lt}function useUpdateNodePositions(){const tt=useStoreApi();return reactExports.useCallback(nt=>{const{nodeInternals:rt,nodeExtent:it,updateNodePositions:ot,getNodes:at,snapToGrid:st,snapGrid:lt,onError:ct,nodesDraggable:ut}=tt.getState(),ht=at().filter(vt=>vt.selected&&(vt.draggable||ut&&typeof vt.draggable>"u")),dt=st?lt[0]:5,pt=st?lt[1]:5,mt=nt.isShiftPressed?4:1,gt=nt.x*dt*mt,yt=nt.y*pt*mt,bt=ht.map(vt=>{if(vt.positionAbsolute){const xt={x:vt.positionAbsolute.x+gt,y:vt.positionAbsolute.y+yt};st&&(xt.x=lt[0]*Math.round(xt.x/lt[0]),xt.y=lt[1]*Math.round(xt.y/lt[1]));const{positionAbsolute:kt,position:St}=calcNextPosition(vt,xt,rt,it,void 0,ct);vt.position=St,vt.positionAbsolute=kt}return vt});ot(bt,!0,!1)},[])}const arrowKeyDiffs={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var wrapNode=tt=>{const et=({id:nt,type:rt,data:it,xPos:ot,yPos:at,xPosOrigin:st,yPosOrigin:lt,selected:ct,onClick:ut,onMouseEnter:ht,onMouseMove:dt,onMouseLeave:pt,onContextMenu:mt,onDoubleClick:gt,style:yt,className:bt,isDraggable:vt,isSelectable:xt,isConnectable:kt,isFocusable:St,selectNodesOnDrag:Tt,sourcePosition:At,targetPosition:Et,hidden:$t,resizeObserver:Dt,dragHandle:jt,zIndex:Pt,isParent:Ct,noDragClassName:wt,noPanClassName:It,initialized:Ot,disableKeyboardA11y:Wt,ariaLabel:zt,rfId:Ft})=>{const Nt=useStoreApi(),Ut=reactExports.useRef(null),Mt=reactExports.useRef(At),Ht=reactExports.useRef(Et),en=reactExports.useRef(rt),sn=xt||vt||ut||ht||dt||pt,Kt=useUpdateNodePositions(),rn=getMouseHandler(nt,Nt.getState,ht),nn=getMouseHandler(nt,Nt.getState,dt),hn=getMouseHandler(nt,Nt.getState,pt),vn=getMouseHandler(nt,Nt.getState,mt),an=getMouseHandler(nt,Nt.getState,gt),Qt=$n=>{const{nodeDragThreshold:Nn}=Nt.getState();if(xt&&(!Tt||!vt||Nn>0)&&handleNodeClick({id:nt,store:Nt,nodeRef:Ut}),ut){const Tn=Nt.getState().nodeInternals.get(nt);Tn&&ut($n,{...Tn})}},_n=$n=>{if(!isInputDOMNode($n))if(elementSelectionKeys.includes($n.key)&&xt){const Nn=$n.key==="Escape";handleNodeClick({id:nt,store:Nt,unselect:Nn,nodeRef:Ut})}else!Wt&&vt&&ct&&Object.prototype.hasOwnProperty.call(arrowKeyDiffs,$n.key)&&(Nt.setState({ariaLiveMessage:`Moved selected node ${$n.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~ot}, y: ${~~at}`}),Kt({x:arrowKeyDiffs[$n.key].x,y:arrowKeyDiffs[$n.key].y,isShiftPressed:$n.shiftKey}))};reactExports.useEffect(()=>{if(Ut.current&&!$t){const $n=Ut.current;return Dt==null||Dt.observe($n),()=>Dt==null?void 0:Dt.unobserve($n)}},[$t]),reactExports.useEffect(()=>{const $n=en.current!==rt,Nn=Mt.current!==At,Tn=Ht.current!==Et;Ut.current&&($n||Nn||Tn)&&($n&&(en.current=rt),Nn&&(Mt.current=At),Tn&&(Ht.current=Et),Nt.getState().updateNodeDimensions([{id:nt,nodeElement:Ut.current,forceUpdate:!0}]))},[nt,rt,At,Et]);const Pn=useDrag({nodeRef:Ut,disabled:$t||!vt,noDragClassName:wt,handleSelector:jt,nodeId:nt,isSelectable:xt,selectNodesOnDrag:Tt});return $t?null:React$1.createElement("div",{className:cc(["react-flow__node",`react-flow__node-${rt}`,{[It]:vt},bt,{selected:ct,selectable:xt,parent:Ct,dragging:Pn}]),ref:Ut,style:{zIndex:Pt,transform:`translate(${st}px,${lt}px)`,pointerEvents:sn?"all":"none",visibility:Ot?"visible":"hidden",...yt},"data-id":nt,"data-testid":`rf__node-${nt}`,onMouseEnter:rn,onMouseMove:nn,onMouseLeave:hn,onContextMenu:vn,onClick:Qt,onDoubleClick:an,onKeyDown:St?_n:void 0,tabIndex:St?0:void 0,role:St?"button":void 0,"aria-describedby":Wt?void 0:`${ARIA_NODE_DESC_KEY}-${Ft}`,"aria-label":zt},React$1.createElement(Provider,{value:nt},React$1.createElement(tt,{id:nt,data:it,type:rt,xPos:ot,yPos:at,selected:ct,isConnectable:kt,sourcePosition:At,targetPosition:Et,dragging:Pn,dragHandle:jt,zIndex:Pt})))};return et.displayName="NodeWrapper",reactExports.memo(et)};const selector$7=tt=>{const et=tt.getNodes().filter(nt=>nt.selected);return{...getRectOfNodes(et,tt.nodeOrigin),transformString:`translate(${tt.transform[0]}px,${tt.transform[1]}px) scale(${tt.transform[2]})`,userSelectionActive:tt.userSelectionActive}};function NodesSelection({onSelectionContextMenu:tt,noPanClassName:et,disableKeyboardA11y:nt}){const rt=useStoreApi(),{width:it,height:ot,x:at,y:st,transformString:lt,userSelectionActive:ct}=useStore(selector$7,shallow$1),ut=useUpdateNodePositions(),ht=reactExports.useRef(null);if(reactExports.useEffect(()=>{var mt;nt||(mt=ht.current)==null||mt.focus({preventScroll:!0})},[nt]),useDrag({nodeRef:ht}),ct||!it||!ot)return null;const dt=tt?mt=>{const gt=rt.getState().getNodes().filter(yt=>yt.selected);tt(mt,gt)}:void 0,pt=mt=>{Object.prototype.hasOwnProperty.call(arrowKeyDiffs,mt.key)&&ut({x:arrowKeyDiffs[mt.key].x,y:arrowKeyDiffs[mt.key].y,isShiftPressed:mt.shiftKey})};return React$1.createElement("div",{className:cc(["react-flow__nodesselection","react-flow__container",et]),style:{transform:lt}},React$1.createElement("div",{ref:ht,className:"react-flow__nodesselection-rect",onContextMenu:dt,tabIndex:nt?void 0:-1,onKeyDown:nt?void 0:pt,style:{width:it,height:ot,top:st,left:at}}))}var NodesSelection$1=reactExports.memo(NodesSelection);const selector$6=tt=>tt.nodesSelectionActive,FlowRenderer=({children:tt,onPaneClick:et,onPaneMouseEnter:nt,onPaneMouseMove:rt,onPaneMouseLeave:it,onPaneContextMenu:ot,onPaneScroll:at,deleteKeyCode:st,onMove:lt,onMoveStart:ct,onMoveEnd:ut,selectionKeyCode:ht,selectionOnDrag:dt,selectionMode:pt,onSelectionStart:mt,onSelectionEnd:gt,multiSelectionKeyCode:yt,panActivationKeyCode:bt,zoomActivationKeyCode:vt,elementsSelectable:xt,zoomOnScroll:kt,zoomOnPinch:St,panOnScroll:Tt,panOnScrollSpeed:At,panOnScrollMode:Et,zoomOnDoubleClick:$t,panOnDrag:Dt,defaultViewport:jt,translateExtent:Pt,minZoom:Ct,maxZoom:wt,preventScrolling:It,onSelectionContextMenu:Ot,noWheelClassName:Wt,noPanClassName:zt,disableKeyboardA11y:Ft})=>{const Nt=useStore(selector$6),Ut=useKeyPress(ht),Ht=useKeyPress(bt)||Dt,en=Ut||dt&&Ht!==!0;return useGlobalKeyHandler({deleteKeyCode:st,multiSelectionKeyCode:yt}),React$1.createElement(ZoomPane,{onMove:lt,onMoveStart:ct,onMoveEnd:ut,onPaneContextMenu:ot,elementsSelectable:xt,zoomOnScroll:kt,zoomOnPinch:St,panOnScroll:Tt,panOnScrollSpeed:At,panOnScrollMode:Et,zoomOnDoubleClick:$t,panOnDrag:!Ut&&Ht,defaultViewport:jt,translateExtent:Pt,minZoom:Ct,maxZoom:wt,zoomActivationKeyCode:vt,preventScrolling:It,noWheelClassName:Wt,noPanClassName:zt},React$1.createElement(Pane,{onSelectionStart:mt,onSelectionEnd:gt,onPaneClick:et,onPaneMouseEnter:nt,onPaneMouseMove:rt,onPaneMouseLeave:it,onPaneContextMenu:ot,onPaneScroll:at,panOnDrag:Ht,isSelecting:!!en,selectionMode:pt},tt,Nt&&React$1.createElement(NodesSelection$1,{onSelectionContextMenu:Ot,noPanClassName:zt,disableKeyboardA11y:Ft})))};FlowRenderer.displayName="FlowRenderer";var FlowRenderer$1=reactExports.memo(FlowRenderer);function useVisibleNodes(tt){return useStore(reactExports.useCallback(nt=>tt?getNodesInside(nt.nodeInternals,{x:0,y:0,width:nt.width,height:nt.height},nt.transform,!0):nt.getNodes(),[tt]))}function createNodeTypes(tt){const et={input:wrapNode(tt.input||InputNode$1),default:wrapNode(tt.default||DefaultNode$1),output:wrapNode(tt.output||OutputNode$1),group:wrapNode(tt.group||GroupNode)},nt={},rt=Object.keys(tt).filter(it=>!["input","default","output","group"].includes(it)).reduce((it,ot)=>(it[ot]=wrapNode(tt[ot]||DefaultNode$1),it),nt);return{...et,...rt}}const getPositionWithOrigin=({x:tt,y:et,width:nt,height:rt,origin:it})=>!nt||!rt?{x:tt,y:et}:it[0]<0||it[1]<0||it[0]>1||it[1]>1?{x:tt,y:et}:{x:tt-nt*it[0],y:et-rt*it[1]},selector$5=tt=>({nodesDraggable:tt.nodesDraggable,nodesConnectable:tt.nodesConnectable,nodesFocusable:tt.nodesFocusable,elementsSelectable:tt.elementsSelectable,updateNodeDimensions:tt.updateNodeDimensions,onError:tt.onError}),NodeRenderer=tt=>{const{nodesDraggable:et,nodesConnectable:nt,nodesFocusable:rt,elementsSelectable:it,updateNodeDimensions:ot,onError:at}=useStore(selector$5,shallow$1),st=useVisibleNodes(tt.onlyRenderVisibleElements),lt=reactExports.useRef(),ct=reactExports.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const ut=new ResizeObserver(ht=>{const dt=ht.map(pt=>({id:pt.target.getAttribute("data-id"),nodeElement:pt.target,forceUpdate:!0}));ot(dt)});return lt.current=ut,ut},[]);return reactExports.useEffect(()=>()=>{var ut;(ut=lt==null?void 0:lt.current)==null||ut.disconnect()},[]),React$1.createElement("div",{className:"react-flow__nodes",style:containerStyle},st.map(ut=>{var St,Tt;let ht=ut.type||"default";tt.nodeTypes[ht]||(at==null||at("003",errorMessages.error003(ht)),ht="default");const dt=tt.nodeTypes[ht]||tt.nodeTypes.default,pt=!!(ut.draggable||et&&typeof ut.draggable>"u"),mt=!!(ut.selectable||it&&typeof ut.selectable>"u"),gt=!!(ut.connectable||nt&&typeof ut.connectable>"u"),yt=!!(ut.focusable||rt&&typeof ut.focusable>"u"),bt=tt.nodeExtent?clampPosition(ut.positionAbsolute,tt.nodeExtent):ut.positionAbsolute,vt=(bt==null?void 0:bt.x)??0,xt=(bt==null?void 0:bt.y)??0,kt=getPositionWithOrigin({x:vt,y:xt,width:ut.width??0,height:ut.height??0,origin:tt.nodeOrigin});return React$1.createElement(dt,{key:ut.id,id:ut.id,className:ut.className,style:ut.style,type:ht,data:ut.data,sourcePosition:ut.sourcePosition||Position.Bottom,targetPosition:ut.targetPosition||Position.Top,hidden:ut.hidden,xPos:vt,yPos:xt,xPosOrigin:kt.x,yPosOrigin:kt.y,selectNodesOnDrag:tt.selectNodesOnDrag,onClick:tt.onNodeClick,onMouseEnter:tt.onNodeMouseEnter,onMouseMove:tt.onNodeMouseMove,onMouseLeave:tt.onNodeMouseLeave,onContextMenu:tt.onNodeContextMenu,onDoubleClick:tt.onNodeDoubleClick,selected:!!ut.selected,isDraggable:pt,isSelectable:mt,isConnectable:gt,isFocusable:yt,resizeObserver:ct,dragHandle:ut.dragHandle,zIndex:((St=ut[internalsSymbol])==null?void 0:St.z)??0,isParent:!!((Tt=ut[internalsSymbol])!=null&&Tt.isParent),noDragClassName:tt.noDragClassName,noPanClassName:tt.noPanClassName,initialized:!!ut.width&&!!ut.height,rfId:tt.rfId,disableKeyboardA11y:tt.disableKeyboardA11y,ariaLabel:ut.ariaLabel})}))};NodeRenderer.displayName="NodeRenderer";var NodeRenderer$1=reactExports.memo(NodeRenderer);const shiftX=(tt,et,nt)=>nt===Position.Left?tt-et:nt===Position.Right?tt+et:tt,shiftY=(tt,et,nt)=>nt===Position.Top?tt-et:nt===Position.Bottom?tt+et:tt,EdgeUpdaterClassName="react-flow__edgeupdater",EdgeAnchor=({position:tt,centerX:et,centerY:nt,radius:rt=10,onMouseDown:it,onMouseEnter:ot,onMouseOut:at,type:st})=>React$1.createElement("circle",{onMouseDown:it,onMouseEnter:ot,onMouseOut:at,className:cc([EdgeUpdaterClassName,`${EdgeUpdaterClassName}-${st}`]),cx:shiftX(et,rt,tt),cy:shiftY(nt,rt,tt),r:rt,stroke:"transparent",fill:"transparent"}),alwaysValidConnection=()=>!0;var wrapEdge=tt=>{const et=({id:nt,className:rt,type:it,data:ot,onClick:at,onEdgeDoubleClick:st,selected:lt,animated:ct,label:ut,labelStyle:ht,labelShowBg:dt,labelBgStyle:pt,labelBgPadding:mt,labelBgBorderRadius:gt,style:yt,source:bt,target:vt,sourceX:xt,sourceY:kt,targetX:St,targetY:Tt,sourcePosition:At,targetPosition:Et,elementsSelectable:$t,hidden:Dt,sourceHandleId:jt,targetHandleId:Pt,onContextMenu:Ct,onMouseEnter:wt,onMouseMove:It,onMouseLeave:Ot,edgeUpdaterRadius:Wt,onEdgeUpdate:zt,onEdgeUpdateStart:Ft,onEdgeUpdateEnd:Nt,markerEnd:Ut,markerStart:Mt,rfId:Ht,ariaLabel:en,isFocusable:sn,isUpdatable:Kt,pathOptions:rn,interactionWidth:nn})=>{const hn=reactExports.useRef(null),[vn,an]=reactExports.useState(!1),[Qt,_n]=reactExports.useState(!1),Pn=useStoreApi(),$n=reactExports.useMemo(()=>`url(#${getMarkerId(Mt,Ht)})`,[Mt,Ht]),Nn=reactExports.useMemo(()=>`url(#${getMarkerId(Ut,Ht)})`,[Ut,Ht]);if(Dt)return null;const Tn=Sn=>{var qn;const{edges:Rn,addSelectedEdges:jn,unselectNodesAndEdges:On,multiSelectionActive:Zn}=Pn.getState(),Vn=Rn.find(zn=>zn.id===nt);Vn&&($t&&(Pn.setState({nodesSelectionActive:!1}),Vn.selected&&Zn?(On({nodes:[],edges:[Vn]}),(qn=hn.current)==null||qn.blur()):jn([nt])),at&&at(Sn,Vn))},cn=getMouseHandler$1(nt,Pn.getState,st),mn=getMouseHandler$1(nt,Pn.getState,Ct),In=getMouseHandler$1(nt,Pn.getState,wt),An=getMouseHandler$1(nt,Pn.getState,It),wn=getMouseHandler$1(nt,Pn.getState,Ot),fn=(Sn,Rn)=>{if(Sn.button!==0)return;const{edges:jn,isValidConnection:On}=Pn.getState(),Zn=Rn?vt:bt,Vn=(Rn?Pt:jt)||null,qn=Rn?"target":"source",zn=On||alwaysValidConnection,Jn=Rn,Hn=jn.find(xr=>xr.id===nt);_n(!0),Ft==null||Ft(Sn,Hn,qn);const pr=xr=>{_n(!1),Nt==null||Nt(xr,Hn,qn)};handlePointerDown({event:Sn,handleId:Vn,nodeId:Zn,onConnect:xr=>zt==null?void 0:zt(Hn,xr),isTarget:Jn,getState:Pn.getState,setState:Pn.setState,isValidConnection:zn,edgeUpdaterType:qn,onEdgeUpdateEnd:pr})},pn=Sn=>fn(Sn,!0),kn=Sn=>fn(Sn,!1),Dn=()=>an(!0),un=()=>an(!1),Zt=!$t&&!at,Xt=Sn=>{var Rn;if(elementSelectionKeys.includes(Sn.key)&&$t){const{unselectNodesAndEdges:jn,addSelectedEdges:On,edges:Zn}=Pn.getState();Sn.key==="Escape"?((Rn=hn.current)==null||Rn.blur(),jn({edges:[Zn.find(qn=>qn.id===nt)]})):On([nt])}};return React$1.createElement("g",{className:cc(["react-flow__edge",`react-flow__edge-${it}`,rt,{selected:lt,animated:ct,inactive:Zt,updating:vn}]),onClick:Tn,onDoubleClick:cn,onContextMenu:mn,onMouseEnter:In,onMouseMove:An,onMouseLeave:wn,onKeyDown:sn?Xt:void 0,tabIndex:sn?0:void 0,role:sn?"button":"img","data-testid":`rf__edge-${nt}`,"aria-label":en===null?void 0:en||`Edge from ${bt} to ${vt}`,"aria-describedby":sn?`${ARIA_EDGE_DESC_KEY}-${Ht}`:void 0,ref:hn},!Qt&&React$1.createElement(tt,{id:nt,source:bt,target:vt,selected:lt,animated:ct,label:ut,labelStyle:ht,labelShowBg:dt,labelBgStyle:pt,labelBgPadding:mt,labelBgBorderRadius:gt,data:ot,style:yt,sourceX:xt,sourceY:kt,targetX:St,targetY:Tt,sourcePosition:At,targetPosition:Et,sourceHandleId:jt,targetHandleId:Pt,markerStart:$n,markerEnd:Nn,pathOptions:rn,interactionWidth:nn}),Kt&&React$1.createElement(React$1.Fragment,null,(Kt==="source"||Kt===!0)&&React$1.createElement(EdgeAnchor,{position:At,centerX:xt,centerY:kt,radius:Wt,onMouseDown:pn,onMouseEnter:Dn,onMouseOut:un,type:"source"}),(Kt==="target"||Kt===!0)&&React$1.createElement(EdgeAnchor,{position:Et,centerX:St,centerY:Tt,radius:Wt,onMouseDown:kn,onMouseEnter:Dn,onMouseOut:un,type:"target"})))};return et.displayName="EdgeWrapper",reactExports.memo(et)};function createEdgeTypes(tt){const et={default:wrapEdge(tt.default||BezierEdge),straight:wrapEdge(tt.bezier||StraightEdge),step:wrapEdge(tt.step||StepEdge),smoothstep:wrapEdge(tt.step||SmoothStepEdge),simplebezier:wrapEdge(tt.simplebezier||SimpleBezierEdge)},nt={},rt=Object.keys(tt).filter(it=>!["default","bezier"].includes(it)).reduce((it,ot)=>(it[ot]=wrapEdge(tt[ot]||BezierEdge),it),nt);return{...et,...rt}}function getHandlePosition(tt,et,nt=null){const rt=((nt==null?void 0:nt.x)||0)+et.x,it=((nt==null?void 0:nt.y)||0)+et.y,ot=(nt==null?void 0:nt.width)||et.width,at=(nt==null?void 0:nt.height)||et.height;switch(tt){case Position.Top:return{x:rt+ot/2,y:it};case Position.Right:return{x:rt+ot,y:it+at/2};case Position.Bottom:return{x:rt+ot/2,y:it+at};case Position.Left:return{x:rt,y:it+at/2}}}function getHandle(tt,et){return tt?tt.length===1||!et?tt[0]:et&&tt.find(nt=>nt.id===et)||null:null}const getEdgePositions=(tt,et,nt,rt,it,ot)=>{const at=getHandlePosition(nt,tt,et),st=getHandlePosition(ot,rt,it);return{sourceX:at.x,sourceY:at.y,targetX:st.x,targetY:st.y}};function isEdgeVisible({sourcePos:tt,targetPos:et,sourceWidth:nt,sourceHeight:rt,targetWidth:it,targetHeight:ot,width:at,height:st,transform:lt}){const ct={x:Math.min(tt.x,et.x),y:Math.min(tt.y,et.y),x2:Math.max(tt.x+nt,et.x+it),y2:Math.max(tt.y+rt,et.y+ot)};ct.x===ct.x2&&(ct.x2+=1),ct.y===ct.y2&&(ct.y2+=1);const ut=rectToBox({x:(0-lt[0])/lt[2],y:(0-lt[1])/lt[2],width:at/lt[2],height:st/lt[2]}),ht=Math.max(0,Math.min(ut.x2,ct.x2)-Math.max(ut.x,ct.x)),dt=Math.max(0,Math.min(ut.y2,ct.y2)-Math.max(ut.y,ct.y));return Math.ceil(ht*dt)>0}function getNodeData(tt){var rt,it,ot,at,st;const et=((rt=tt==null?void 0:tt[internalsSymbol])==null?void 0:rt.handleBounds)||null,nt=et&&(tt==null?void 0:tt.width)&&(tt==null?void 0:tt.height)&&typeof((it=tt==null?void 0:tt.positionAbsolute)==null?void 0:it.x)<"u"&&typeof((ot=tt==null?void 0:tt.positionAbsolute)==null?void 0:ot.y)<"u";return[{x:((at=tt==null?void 0:tt.positionAbsolute)==null?void 0:at.x)||0,y:((st=tt==null?void 0:tt.positionAbsolute)==null?void 0:st.y)||0,width:(tt==null?void 0:tt.width)||0,height:(tt==null?void 0:tt.height)||0},et,!!nt]}const defaultEdgeTree=[{level:0,isMaxLevel:!0,edges:[]}];function groupEdgesByZLevel(tt,et,nt=!1){let rt=-1;const it=tt.reduce((at,st)=>{var ut,ht;const lt=isNumeric(st.zIndex);let ct=lt?st.zIndex:0;if(nt){const dt=et.get(st.target),pt=et.get(st.source),mt=st.selected||(dt==null?void 0:dt.selected)||(pt==null?void 0:pt.selected),gt=Math.max(((ut=pt==null?void 0:pt[internalsSymbol])==null?void 0:ut.z)||0,((ht=dt==null?void 0:dt[internalsSymbol])==null?void 0:ht.z)||0,1e3);ct=(lt?st.zIndex:0)+(mt?gt:0)}return at[ct]?at[ct].push(st):at[ct]=[st],rt=ct>rt?ct:rt,at},{}),ot=Object.entries(it).map(([at,st])=>{const lt=+at;return{edges:st,level:lt,isMaxLevel:lt===rt}});return ot.length===0?defaultEdgeTree:ot}function useVisibleEdges(tt,et,nt){const rt=useStore(reactExports.useCallback(it=>tt?it.edges.filter(ot=>{const at=et.get(ot.source),st=et.get(ot.target);return(at==null?void 0:at.width)&&(at==null?void 0:at.height)&&(st==null?void 0:st.width)&&(st==null?void 0:st.height)&&isEdgeVisible({sourcePos:at.positionAbsolute||{x:0,y:0},targetPos:st.positionAbsolute||{x:0,y:0},sourceWidth:at.width,sourceHeight:at.height,targetWidth:st.width,targetHeight:st.height,width:it.width,height:it.height,transform:it.transform})}):it.edges,[tt,et]));return groupEdgesByZLevel(rt,et,nt)}const ArrowSymbol=({color:tt="none",strokeWidth:et=1})=>React$1.createElement("polyline",{style:{stroke:tt,strokeWidth:et},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),ArrowClosedSymbol=({color:tt="none",strokeWidth:et=1})=>React$1.createElement("polyline",{style:{stroke:tt,fill:tt,strokeWidth:et},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),MarkerSymbols={[MarkerType.Arrow]:ArrowSymbol,[MarkerType.ArrowClosed]:ArrowClosedSymbol};function useMarkerSymbol(tt){const et=useStoreApi();return reactExports.useMemo(()=>{var it,ot;return Object.prototype.hasOwnProperty.call(MarkerSymbols,tt)?MarkerSymbols[tt]:((ot=(it=et.getState()).onError)==null||ot.call(it,"009",errorMessages.error009(tt)),null)},[tt])}const Marker=({id:tt,type:et,color:nt,width:rt=12.5,height:it=12.5,markerUnits:ot="strokeWidth",strokeWidth:at,orient:st="auto-start-reverse"})=>{const lt=useMarkerSymbol(et);return lt?React$1.createElement("marker",{className:"react-flow__arrowhead",id:tt,markerWidth:`${rt}`,markerHeight:`${it}`,viewBox:"-10 -10 20 20",markerUnits:ot,orient:st,refX:"0",refY:"0"},React$1.createElement(lt,{color:nt,strokeWidth:at})):null},markerSelector=({defaultColor:tt,rfId:et})=>nt=>{const rt=[];return nt.edges.reduce((it,ot)=>([ot.markerStart,ot.markerEnd].forEach(at=>{if(at&&typeof at=="object"){const st=getMarkerId(at,et);rt.includes(st)||(it.push({id:st,color:at.color||tt,...at}),rt.push(st))}}),it),[]).sort((it,ot)=>it.id.localeCompare(ot.id))},MarkerDefinitions=({defaultColor:tt,rfId:et})=>{const nt=useStore(reactExports.useCallback(markerSelector({defaultColor:tt,rfId:et}),[tt,et]),(rt,it)=>!(rt.length!==it.length||rt.some((ot,at)=>ot.id!==it[at].id)));return React$1.createElement("defs",null,nt.map(rt=>React$1.createElement(Marker,{id:rt.id,key:rt.id,type:rt.type,color:rt.color,width:rt.width,height:rt.height,markerUnits:rt.markerUnits,strokeWidth:rt.strokeWidth,orient:rt.orient})))};MarkerDefinitions.displayName="MarkerDefinitions";var MarkerDefinitions$1=reactExports.memo(MarkerDefinitions);const selector$4=tt=>({nodesConnectable:tt.nodesConnectable,edgesFocusable:tt.edgesFocusable,edgesUpdatable:tt.edgesUpdatable,elementsSelectable:tt.elementsSelectable,width:tt.width,height:tt.height,connectionMode:tt.connectionMode,nodeInternals:tt.nodeInternals,onError:tt.onError}),EdgeRenderer=({defaultMarkerColor:tt,onlyRenderVisibleElements:et,elevateEdgesOnSelect:nt,rfId:rt,edgeTypes:it,noPanClassName:ot,onEdgeUpdate:at,onEdgeContextMenu:st,onEdgeMouseEnter:lt,onEdgeMouseMove:ct,onEdgeMouseLeave:ut,onEdgeClick:ht,edgeUpdaterRadius:dt,onEdgeDoubleClick:pt,onEdgeUpdateStart:mt,onEdgeUpdateEnd:gt,children:yt})=>{const{edgesFocusable:bt,edgesUpdatable:vt,elementsSelectable:xt,width:kt,height:St,connectionMode:Tt,nodeInternals:At,onError:Et}=useStore(selector$4,shallow$1),$t=useVisibleEdges(et,At,nt);return kt?React$1.createElement(React$1.Fragment,null,$t.map(({level:Dt,edges:jt,isMaxLevel:Pt})=>React$1.createElement("svg",{key:Dt,style:{zIndex:Dt},width:kt,height:St,className:"react-flow__edges react-flow__container"},Pt&&React$1.createElement(MarkerDefinitions$1,{defaultColor:tt,rfId:rt}),React$1.createElement("g",null,jt.map(Ct=>{const[wt,It,Ot]=getNodeData(At.get(Ct.source)),[Wt,zt,Ft]=getNodeData(At.get(Ct.target));if(!Ot||!Ft)return null;let Nt=Ct.type||"default";it[Nt]||(Et==null||Et("011",errorMessages.error011(Nt)),Nt="default");const Ut=it[Nt]||it.default,Mt=Tt===ConnectionMode.Strict?zt.target:(zt.target??[]).concat(zt.source??[]),Ht=getHandle(It.source,Ct.sourceHandle),en=getHandle(Mt,Ct.targetHandle),sn=(Ht==null?void 0:Ht.position)||Position.Bottom,Kt=(en==null?void 0:en.position)||Position.Top,rn=!!(Ct.focusable||bt&&typeof Ct.focusable>"u"),nn=typeof at<"u"&&(Ct.updatable||vt&&typeof Ct.updatable>"u");if(!Ht||!en)return Et==null||Et("008",errorMessages.error008(Ht,Ct)),null;const{sourceX:hn,sourceY:vn,targetX:an,targetY:Qt}=getEdgePositions(wt,Ht,sn,Wt,en,Kt);return React$1.createElement(Ut,{key:Ct.id,id:Ct.id,className:cc([Ct.className,ot]),type:Nt,data:Ct.data,selected:!!Ct.selected,animated:!!Ct.animated,hidden:!!Ct.hidden,label:Ct.label,labelStyle:Ct.labelStyle,labelShowBg:Ct.labelShowBg,labelBgStyle:Ct.labelBgStyle,labelBgPadding:Ct.labelBgPadding,labelBgBorderRadius:Ct.labelBgBorderRadius,style:Ct.style,source:Ct.source,target:Ct.target,sourceHandleId:Ct.sourceHandle,targetHandleId:Ct.targetHandle,markerEnd:Ct.markerEnd,markerStart:Ct.markerStart,sourceX:hn,sourceY:vn,targetX:an,targetY:Qt,sourcePosition:sn,targetPosition:Kt,elementsSelectable:xt,onEdgeUpdate:at,onContextMenu:st,onMouseEnter:lt,onMouseMove:ct,onMouseLeave:ut,onClick:ht,edgeUpdaterRadius:dt,onEdgeDoubleClick:pt,onEdgeUpdateStart:mt,onEdgeUpdateEnd:gt,rfId:rt,ariaLabel:Ct.ariaLabel,isFocusable:rn,isUpdatable:nn,pathOptions:"pathOptions"in Ct?Ct.pathOptions:void 0,interactionWidth:Ct.interactionWidth})})))),yt):null};EdgeRenderer.displayName="EdgeRenderer";var EdgeRenderer$1=reactExports.memo(EdgeRenderer);const selector$3=tt=>`translate(${tt.transform[0]}px,${tt.transform[1]}px) scale(${tt.transform[2]})`;function Viewport({children:tt}){const et=useStore(selector$3);return React$1.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:et}},tt)}function useOnInitHandler(tt){const et=useReactFlow(),nt=reactExports.useRef(!1);reactExports.useEffect(()=>{!nt.current&&et.viewportInitialized&&tt&&(setTimeout(()=>tt(et),1),nt.current=!0)},[tt,et.viewportInitialized])}const oppositePosition={[Position.Left]:Position.Right,[Position.Right]:Position.Left,[Position.Top]:Position.Bottom,[Position.Bottom]:Position.Top},ConnectionLine=({nodeId:tt,handleType:et,style:nt,type:rt=ConnectionLineType.Bezier,CustomComponent:it,connectionStatus:ot})=>{var Tt,At,Et;const{fromNode:at,handleId:st,toX:lt,toY:ct,connectionMode:ut}=useStore(reactExports.useCallback($t=>({fromNode:$t.nodeInternals.get(tt),handleId:$t.connectionHandleId,toX:($t.connectionPosition.x-$t.transform[0])/$t.transform[2],toY:($t.connectionPosition.y-$t.transform[1])/$t.transform[2],connectionMode:$t.connectionMode}),[tt]),shallow$1),ht=(Tt=at==null?void 0:at[internalsSymbol])==null?void 0:Tt.handleBounds;let dt=ht==null?void 0:ht[et];if(ut===ConnectionMode.Loose&&(dt=dt||(ht==null?void 0:ht[et==="source"?"target":"source"])),!at||!dt)return null;const pt=st?dt.find($t=>$t.id===st):dt[0],mt=pt?pt.x+pt.width/2:(at.width??0)/2,gt=pt?pt.y+pt.height/2:at.height??0,yt=(((At=at.positionAbsolute)==null?void 0:At.x)??0)+mt,bt=(((Et=at.positionAbsolute)==null?void 0:Et.y)??0)+gt,vt=pt==null?void 0:pt.position,xt=vt?oppositePosition[vt]:null;if(!vt||!xt)return null;if(it)return React$1.createElement(it,{connectionLineType:rt,connectionLineStyle:nt,fromNode:at,fromHandle:pt,fromX:yt,fromY:bt,toX:lt,toY:ct,fromPosition:vt,toPosition:xt,connectionStatus:ot});let kt="";const St={sourceX:yt,sourceY:bt,sourcePosition:vt,targetX:lt,targetY:ct,targetPosition:xt};return rt===ConnectionLineType.Bezier?[kt]=getBezierPath(St):rt===ConnectionLineType.Step?[kt]=getSmoothStepPath({...St,borderRadius:0}):rt===ConnectionLineType.SmoothStep?[kt]=getSmoothStepPath(St):rt===ConnectionLineType.SimpleBezier?[kt]=getSimpleBezierPath(St):kt=`M${yt},${bt} ${lt},${ct}`,React$1.createElement("path",{d:kt,fill:"none",className:"react-flow__connection-path",style:nt})};ConnectionLine.displayName="ConnectionLine";const selector$2=tt=>({nodeId:tt.connectionNodeId,handleType:tt.connectionHandleType,nodesConnectable:tt.nodesConnectable,connectionStatus:tt.connectionStatus,width:tt.width,height:tt.height});function ConnectionLineWrapper({containerStyle:tt,style:et,type:nt,component:rt}){const{nodeId:it,handleType:ot,nodesConnectable:at,width:st,height:lt,connectionStatus:ct}=useStore(selector$2,shallow$1);return!(it&&ot&&st&&at)?null:React$1.createElement("svg",{style:tt,width:st,height:lt,className:"react-flow__edges react-flow__connectionline react-flow__container"},React$1.createElement("g",{className:cc(["react-flow__connection",ct])},React$1.createElement(ConnectionLine,{nodeId:it,handleType:ot,style:et,type:nt,CustomComponent:rt,connectionStatus:ct})))}function useNodeOrEdgeTypes(tt,et){return reactExports.useRef(null),useStoreApi(),reactExports.useMemo(()=>et(tt),[tt])}const GraphView=({nodeTypes:tt,edgeTypes:et,onMove:nt,onMoveStart:rt,onMoveEnd:it,onInit:ot,onNodeClick:at,onEdgeClick:st,onNodeDoubleClick:lt,onEdgeDoubleClick:ct,onNodeMouseEnter:ut,onNodeMouseMove:ht,onNodeMouseLeave:dt,onNodeContextMenu:pt,onSelectionContextMenu:mt,onSelectionStart:gt,onSelectionEnd:yt,connectionLineType:bt,connectionLineStyle:vt,connectionLineComponent:xt,connectionLineContainerStyle:kt,selectionKeyCode:St,selectionOnDrag:Tt,selectionMode:At,multiSelectionKeyCode:Et,panActivationKeyCode:$t,zoomActivationKeyCode:Dt,deleteKeyCode:jt,onlyRenderVisibleElements:Pt,elementsSelectable:Ct,selectNodesOnDrag:wt,defaultViewport:It,translateExtent:Ot,minZoom:Wt,maxZoom:zt,preventScrolling:Ft,defaultMarkerColor:Nt,zoomOnScroll:Ut,zoomOnPinch:Mt,panOnScroll:Ht,panOnScrollSpeed:en,panOnScrollMode:sn,zoomOnDoubleClick:Kt,panOnDrag:rn,onPaneClick:nn,onPaneMouseEnter:hn,onPaneMouseMove:vn,onPaneMouseLeave:an,onPaneScroll:Qt,onPaneContextMenu:_n,onEdgeUpdate:Pn,onEdgeContextMenu:$n,onEdgeMouseEnter:Nn,onEdgeMouseMove:Tn,onEdgeMouseLeave:cn,edgeUpdaterRadius:mn,onEdgeUpdateStart:In,onEdgeUpdateEnd:An,noDragClassName:wn,noWheelClassName:fn,noPanClassName:pn,elevateEdgesOnSelect:kn,disableKeyboardA11y:Dn,nodeOrigin:un,nodeExtent:Zt,rfId:Xt})=>{const Sn=useNodeOrEdgeTypes(tt,createNodeTypes),Rn=useNodeOrEdgeTypes(et,createEdgeTypes);return useOnInitHandler(ot),React$1.createElement(FlowRenderer$1,{onPaneClick:nn,onPaneMouseEnter:hn,onPaneMouseMove:vn,onPaneMouseLeave:an,onPaneContextMenu:_n,onPaneScroll:Qt,deleteKeyCode:jt,selectionKeyCode:St,selectionOnDrag:Tt,selectionMode:At,onSelectionStart:gt,onSelectionEnd:yt,multiSelectionKeyCode:Et,panActivationKeyCode:$t,zoomActivationKeyCode:Dt,elementsSelectable:Ct,onMove:nt,onMoveStart:rt,onMoveEnd:it,zoomOnScroll:Ut,zoomOnPinch:Mt,zoomOnDoubleClick:Kt,panOnScroll:Ht,panOnScrollSpeed:en,panOnScrollMode:sn,panOnDrag:rn,defaultViewport:It,translateExtent:Ot,minZoom:Wt,maxZoom:zt,onSelectionContextMenu:mt,preventScrolling:Ft,noDragClassName:wn,noWheelClassName:fn,noPanClassName:pn,disableKeyboardA11y:Dn},React$1.createElement(Viewport,null,React$1.createElement(EdgeRenderer$1,{edgeTypes:Rn,onEdgeClick:st,onEdgeDoubleClick:ct,onEdgeUpdate:Pn,onlyRenderVisibleElements:Pt,onEdgeContextMenu:$n,onEdgeMouseEnter:Nn,onEdgeMouseMove:Tn,onEdgeMouseLeave:cn,onEdgeUpdateStart:In,onEdgeUpdateEnd:An,edgeUpdaterRadius:mn,defaultMarkerColor:Nt,noPanClassName:pn,elevateEdgesOnSelect:!!kn,disableKeyboardA11y:Dn,rfId:Xt},React$1.createElement(ConnectionLineWrapper,{style:vt,type:bt,component:xt,containerStyle:kt})),React$1.createElement("div",{className:"react-flow__edgelabel-renderer"}),React$1.createElement(NodeRenderer$1,{nodeTypes:Sn,onNodeClick:at,onNodeDoubleClick:lt,onNodeMouseEnter:ut,onNodeMouseMove:ht,onNodeMouseLeave:dt,onNodeContextMenu:pt,selectNodesOnDrag:wt,onlyRenderVisibleElements:Pt,noPanClassName:pn,noDragClassName:wn,disableKeyboardA11y:Dn,nodeOrigin:un,nodeExtent:Zt,rfId:Xt})))};GraphView.displayName="GraphView";var GraphView$1=reactExports.memo(GraphView);const infiniteExtent=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],initialState={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:infiniteExtent,nodeExtent:infiniteExtent,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:ConnectionMode.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:devWarn,isValidConnection:void 0},createRFStore=()=>createWithEqualityFn((tt,et)=>({...initialState,setNodes:nt=>{const{nodeInternals:rt,nodeOrigin:it,elevateNodesOnSelect:ot}=et();tt({nodeInternals:createNodeInternals(nt,rt,it,ot)})},getNodes:()=>Array.from(et().nodeInternals.values()),setEdges:nt=>{const{defaultEdgeOptions:rt={}}=et();tt({edges:nt.map(it=>({...rt,...it}))})},setDefaultNodesAndEdges:(nt,rt)=>{const it=typeof nt<"u",ot=typeof rt<"u",at=it?createNodeInternals(nt,new Map,et().nodeOrigin,et().elevateNodesOnSelect):new Map;tt({nodeInternals:at,edges:ot?rt:[],hasDefaultNodes:it,hasDefaultEdges:ot})},updateNodeDimensions:nt=>{const{onNodesChange:rt,nodeInternals:it,fitViewOnInit:ot,fitViewOnInitDone:at,fitViewOnInitOptions:st,domNode:lt,nodeOrigin:ct}=et(),ut=lt==null?void 0:lt.querySelector(".react-flow__viewport");if(!ut)return;const ht=window.getComputedStyle(ut),{m22:dt}=new window.DOMMatrixReadOnly(ht.transform),pt=nt.reduce((gt,yt)=>{const bt=it.get(yt.id);if(bt){const vt=getDimensions(yt.nodeElement);!!(vt.width&&vt.height&&(bt.width!==vt.width||bt.height!==vt.height||yt.forceUpdate))&&(it.set(bt.id,{...bt,[internalsSymbol]:{...bt[internalsSymbol],handleBounds:{source:getHandleBounds(".source",yt.nodeElement,dt,ct),target:getHandleBounds(".target",yt.nodeElement,dt,ct)}},...vt}),gt.push({id:bt.id,type:"dimensions",dimensions:vt}))}return gt},[]);updateAbsoluteNodePositions(it,ct);const mt=at||ot&&!at&&fitView(et,{initial:!0,...st});tt({nodeInternals:new Map(it),fitViewOnInitDone:mt}),(pt==null?void 0:pt.length)>0&&(rt==null||rt(pt))},updateNodePositions:(nt,rt=!0,it=!1)=>{const{triggerNodeChanges:ot}=et(),at=nt.map(st=>{const lt={id:st.id,type:"position",dragging:it};return rt&&(lt.positionAbsolute=st.positionAbsolute,lt.position=st.position),lt});ot(at)},triggerNodeChanges:nt=>{const{onNodesChange:rt,nodeInternals:it,hasDefaultNodes:ot,nodeOrigin:at,getNodes:st,elevateNodesOnSelect:lt}=et();if(nt!=null&&nt.length){if(ot){const ct=applyNodeChanges(nt,st()),ut=createNodeInternals(ct,it,at,lt);tt({nodeInternals:ut})}rt==null||rt(nt)}},addSelectedNodes:nt=>{const{multiSelectionActive:rt,edges:it,getNodes:ot}=et();let at,st=null;rt?at=nt.map(lt=>createSelectionChange(lt,!0)):(at=getSelectionChanges(ot(),nt),st=getSelectionChanges(it,[])),updateNodesAndEdgesSelections({changedNodes:at,changedEdges:st,get:et,set:tt})},addSelectedEdges:nt=>{const{multiSelectionActive:rt,edges:it,getNodes:ot}=et();let at,st=null;rt?at=nt.map(lt=>createSelectionChange(lt,!0)):(at=getSelectionChanges(it,nt),st=getSelectionChanges(ot(),[])),updateNodesAndEdgesSelections({changedNodes:st,changedEdges:at,get:et,set:tt})},unselectNodesAndEdges:({nodes:nt,edges:rt}={})=>{const{edges:it,getNodes:ot}=et(),at=nt||ot(),st=rt||it,lt=at.map(ut=>(ut.selected=!1,createSelectionChange(ut.id,!1))),ct=st.map(ut=>createSelectionChange(ut.id,!1));updateNodesAndEdgesSelections({changedNodes:lt,changedEdges:ct,get:et,set:tt})},setMinZoom:nt=>{const{d3Zoom:rt,maxZoom:it}=et();rt==null||rt.scaleExtent([nt,it]),tt({minZoom:nt})},setMaxZoom:nt=>{const{d3Zoom:rt,minZoom:it}=et();rt==null||rt.scaleExtent([it,nt]),tt({maxZoom:nt})},setTranslateExtent:nt=>{var rt;(rt=et().d3Zoom)==null||rt.translateExtent(nt),tt({translateExtent:nt})},resetSelectedElements:()=>{const{edges:nt,getNodes:rt}=et(),ot=rt().filter(st=>st.selected).map(st=>createSelectionChange(st.id,!1)),at=nt.filter(st=>st.selected).map(st=>createSelectionChange(st.id,!1));updateNodesAndEdgesSelections({changedNodes:ot,changedEdges:at,get:et,set:tt})},setNodeExtent:nt=>{const{nodeInternals:rt}=et();rt.forEach(it=>{it.positionAbsolute=clampPosition(it.position,nt)}),tt({nodeExtent:nt,nodeInternals:new Map(rt)})},panBy:nt=>{const{transform:rt,width:it,height:ot,d3Zoom:at,d3Selection:st,translateExtent:lt}=et();if(!at||!st||!nt.x&&!nt.y)return!1;const ct=identity.translate(rt[0]+nt.x,rt[1]+nt.y).scale(rt[2]),ut=[[0,0],[it,ot]],ht=at==null?void 0:at.constrain()(ct,ut,lt);return at.transform(st,ht),rt[0]!==ht.x||rt[1]!==ht.y||rt[2]!==ht.k},cancelConnection:()=>tt({connectionNodeId:initialState.connectionNodeId,connectionHandleId:initialState.connectionHandleId,connectionHandleType:initialState.connectionHandleType,connectionStatus:initialState.connectionStatus,connectionStartHandle:initialState.connectionStartHandle,connectionEndHandle:initialState.connectionEndHandle}),reset:()=>tt({...initialState})}),Object.is),ReactFlowProvider=({children:tt})=>{const et=reactExports.useRef(null);return et.current||(et.current=createRFStore()),React$1.createElement(Provider$1,{value:et.current},tt)};ReactFlowProvider.displayName="ReactFlowProvider";const Wrapper$e=({children:tt})=>reactExports.useContext(StoreContext)?React$1.createElement(React$1.Fragment,null,tt):React$1.createElement(ReactFlowProvider,null,tt);Wrapper$e.displayName="ReactFlowWrapper";const defaultNodeTypes={input:InputNode$1,default:DefaultNode$1,output:OutputNode$1,group:GroupNode},defaultEdgeTypes={default:BezierEdge,straight:StraightEdge,step:StepEdge,smoothstep:SmoothStepEdge,simplebezier:SimpleBezierEdge},initNodeOrigin=[0,0],initSnapGrid=[15,15],initDefaultViewport={x:0,y:0,zoom:1},wrapperStyle={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},ReactFlow=reactExports.forwardRef(({nodes:tt,edges:et,defaultNodes:nt,defaultEdges:rt,className:it,nodeTypes:ot=defaultNodeTypes,edgeTypes:at=defaultEdgeTypes,onNodeClick:st,onEdgeClick:lt,onInit:ct,onMove:ut,onMoveStart:ht,onMoveEnd:dt,onConnect:pt,onConnectStart:mt,onConnectEnd:gt,onClickConnectStart:yt,onClickConnectEnd:bt,onNodeMouseEnter:vt,onNodeMouseMove:xt,onNodeMouseLeave:kt,onNodeContextMenu:St,onNodeDoubleClick:Tt,onNodeDragStart:At,onNodeDrag:Et,onNodeDragStop:$t,onNodesDelete:Dt,onEdgesDelete:jt,onSelectionChange:Pt,onSelectionDragStart:Ct,onSelectionDrag:wt,onSelectionDragStop:It,onSelectionContextMenu:Ot,onSelectionStart:Wt,onSelectionEnd:zt,connectionMode:Ft=ConnectionMode.Strict,connectionLineType:Nt=ConnectionLineType.Bezier,connectionLineStyle:Ut,connectionLineComponent:Mt,connectionLineContainerStyle:Ht,deleteKeyCode:en="Backspace",selectionKeyCode:sn="Shift",selectionOnDrag:Kt=!1,selectionMode:rn=SelectionMode.Full,panActivationKeyCode:nn="Space",multiSelectionKeyCode:hn=isMacOs()?"Meta":"Control",zoomActivationKeyCode:vn=isMacOs()?"Meta":"Control",snapToGrid:an=!1,snapGrid:Qt=initSnapGrid,onlyRenderVisibleElements:_n=!1,selectNodesOnDrag:Pn=!0,nodesDraggable:$n,nodesConnectable:Nn,nodesFocusable:Tn,nodeOrigin:cn=initNodeOrigin,edgesFocusable:mn,edgesUpdatable:In,elementsSelectable:An,defaultViewport:wn=initDefaultViewport,minZoom:fn=.5,maxZoom:pn=2,translateExtent:kn=infiniteExtent,preventScrolling:Dn=!0,nodeExtent:un,defaultMarkerColor:Zt="#b1b1b7",zoomOnScroll:Xt=!0,zoomOnPinch:Sn=!0,panOnScroll:Rn=!1,panOnScrollSpeed:jn=.5,panOnScrollMode:On=PanOnScrollMode.Free,zoomOnDoubleClick:Zn=!0,panOnDrag:Vn=!0,onPaneClick:qn,onPaneMouseEnter:zn,onPaneMouseMove:Jn,onPaneMouseLeave:Hn,onPaneScroll:pr,onPaneContextMenu:fr,children:xr,onEdgeUpdate:io,onEdgeContextMenu:Tr,onEdgeDoubleClick:Ar,onEdgeMouseEnter:qr,onEdgeMouseMove:jr,onEdgeMouseLeave:Fr,onEdgeUpdateStart:ao,onEdgeUpdateEnd:Yr,edgeUpdaterRadius:Dr=10,onNodesChange:go,onEdgesChange:xn,noDragClassName:Mn="nodrag",noWheelClassName:dn="nowheel",noPanClassName:Jt="nopan",fitView:En=!1,fitViewOptions:Ln,connectOnClick:Un=!0,attributionPosition:Kn,proOptions:nr,defaultEdgeOptions:lr,elevateNodesOnSelect:cr=!0,elevateEdgesOnSelect:Hr=!1,disableKeyboardA11y:vr=!1,autoPanOnConnect:Nr=!0,autoPanOnNodeDrag:Gr=!0,connectionRadius:eo=20,isValidConnection:Zr,onError:Jr,style:wr,id:Mr,nodeDragThreshold:Ur,...Rr},Pr)=>{const Lr=Mr||"1";return React$1.createElement("div",{...Rr,style:{...wr,...wrapperStyle},ref:Pr,className:cc(["react-flow",it]),"data-testid":"rf__wrapper",id:Mr},React$1.createElement(Wrapper$e,null,React$1.createElement(GraphView$1,{onInit:ct,onMove:ut,onMoveStart:ht,onMoveEnd:dt,onNodeClick:st,onEdgeClick:lt,onNodeMouseEnter:vt,onNodeMouseMove:xt,onNodeMouseLeave:kt,onNodeContextMenu:St,onNodeDoubleClick:Tt,nodeTypes:ot,edgeTypes:at,connectionLineType:Nt,connectionLineStyle:Ut,connectionLineComponent:Mt,connectionLineContainerStyle:Ht,selectionKeyCode:sn,selectionOnDrag:Kt,selectionMode:rn,deleteKeyCode:en,multiSelectionKeyCode:hn,panActivationKeyCode:nn,zoomActivationKeyCode:vn,onlyRenderVisibleElements:_n,selectNodesOnDrag:Pn,defaultViewport:wn,translateExtent:kn,minZoom:fn,maxZoom:pn,preventScrolling:Dn,zoomOnScroll:Xt,zoomOnPinch:Sn,zoomOnDoubleClick:Zn,panOnScroll:Rn,panOnScrollSpeed:jn,panOnScrollMode:On,panOnDrag:Vn,onPaneClick:qn,onPaneMouseEnter:zn,onPaneMouseMove:Jn,onPaneMouseLeave:Hn,onPaneScroll:pr,onPaneContextMenu:fr,onSelectionContextMenu:Ot,onSelectionStart:Wt,onSelectionEnd:zt,onEdgeUpdate:io,onEdgeContextMenu:Tr,onEdgeDoubleClick:Ar,onEdgeMouseEnter:qr,onEdgeMouseMove:jr,onEdgeMouseLeave:Fr,onEdgeUpdateStart:ao,onEdgeUpdateEnd:Yr,edgeUpdaterRadius:Dr,defaultMarkerColor:Zt,noDragClassName:Mn,noWheelClassName:dn,noPanClassName:Jt,elevateEdgesOnSelect:Hr,rfId:Lr,disableKeyboardA11y:vr,nodeOrigin:cn,nodeExtent:un}),React$1.createElement(StoreUpdater,{nodes:tt,edges:et,defaultNodes:nt,defaultEdges:rt,onConnect:pt,onConnectStart:mt,onConnectEnd:gt,onClickConnectStart:yt,onClickConnectEnd:bt,nodesDraggable:$n,nodesConnectable:Nn,nodesFocusable:Tn,edgesFocusable:mn,edgesUpdatable:In,elementsSelectable:An,elevateNodesOnSelect:cr,minZoom:fn,maxZoom:pn,nodeExtent:un,onNodesChange:go,onEdgesChange:xn,snapToGrid:an,snapGrid:Qt,connectionMode:Ft,translateExtent:kn,connectOnClick:Un,defaultEdgeOptions:lr,fitView:En,fitViewOptions:Ln,onNodesDelete:Dt,onEdgesDelete:jt,onNodeDragStart:At,onNodeDrag:Et,onNodeDragStop:$t,onSelectionDrag:wt,onSelectionDragStart:Ct,onSelectionDragStop:It,noPanClassName:Jt,nodeOrigin:cn,rfId:Lr,autoPanOnConnect:Nr,autoPanOnNodeDrag:Gr,onError:Jr,connectionRadius:eo,isValidConnection:Zr,nodeDragThreshold:Ur}),React$1.createElement(Wrapper$1$1,{onSelectionChange:Pt}),xr,React$1.createElement(Attribution,{proOptions:nr,position:Kn}),React$1.createElement(A11yDescriptions,{rfId:Lr,disableKeyboardA11y:vr})))});ReactFlow.displayName="ReactFlow";const style="",TeachMe=()=>{const[tt,et]=useDataStore(mt=>[mt.data,mt.setTeachMe]),[nt,rt]=useAppStore(mt=>[mt.currentSearch,mt.setSidebarOpen]),[it]=useUserStore(mt=>[mt.setBudget]),ot=reactExports.useRef(!1),at=useSocket(),[st,lt,ct,ut]=useTeachStore(mt=>[mt.setTeachMeAnswer,mt.setHasTeachingInProgress,mt.setInstagraphAnswer,mt.setHasInstagraphInProgress]),ht=reactExports.useCallback(mt=>{st(mt.tutorial),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"Tutorial is ready"}),{position:toast.POSITION.BOTTOM_CENTER,type:"success"})},[st]),dt=reactExports.useCallback(mt=>{ct(mt),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"Instagraph is ready"}),{position:toast.POSITION.BOTTOM_CENTER,type:"success"})},[ct]);reactExports.useEffect(()=>{ot.current||(ht&&at&&(at.on("teachmehook",ht),ot.current=!0),dt&&at&&(at.on("instagraphhook",dt),ot.current=!0))},[at,ht,dt]);const pt=async()=>{if(nt){lt(!0),ut(!0),rt(!0),et(!0);try{const mt=tt==null?void 0:tt.nodes.filter(bt=>bt.text),gt=mt==null?void 0:mt.slice(0,5),yt=(gt!=null&>.length?gt.map(bt=>bt.text).join(" "):"").substring(0,2500).replace(/[?&=+/#]/g,bt=>`\\${bt}`);await distExports$1.enable(),await postTeachMe({term:nt,transcripts:yt}),await updateBudget(it),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"We started preparing tutorial for you"}),{type:"success"}),await postInstagraph({term:nt,transcripts:yt}),await updateBudget(it),toast(jsxRuntimeExports.jsx(ToastMessage,{message:"We started preparing an instagraph for you"}),{type:"success"})}catch{lt(!1),ut(!1)}}};return jsxRuntimeExports.jsx(ButtonStyled,{onClick:()=>pt(),children:"Teach me"})},TeachMeLoader=({text:tt})=>jsxRuntimeExports.jsxs(Flex,{align:"center",justify:"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:tt})})]}),TeachMeText=()=>{const[tt,et,nt,rt]=useTeachStore(ot=>[ot.teachMeAnswer,ot.hasTeachingInProgress,ot.instgraphAnswser,ot.hasInstagraphInProgress]),it=!rt&&!!(nt!=null&&nt.edges)&&!!(nt!=null&&nt.nodes);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[it?jsxRuntimeExports.jsx(ReactFlow,{edges:nt==null?void 0:nt.edges,nodes:nt==null?void 0:nt.nodes}):jsxRuntimeExports.jsx(TeachMeLoader,{text:"Generating instagraph"}),et?jsxRuntimeExports.jsx(TeachMeLoader,{text:"Generating tutorial"}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TeachMeAnswerFlex,{children:jsxRuntimeExports.jsx(Text$3,{children:tt})}),jsxRuntimeExports.jsx(AskQuestion,{})]})]})},ButtonStyled=styled$4(Button$2)``,TeachMeAnswerFlex=styled$4(Flex)` padding-left: 10px; padding-right: 10px; `,MENU_WIDTH$2=400,ComponentsMapper$1={askQuestion:jsxRuntimeExports.jsx(AskQuestion,{}),teachMe:jsxRuntimeExports.jsx(TeachMe,{}),sentiment:jsxRuntimeExports.jsx(SentimentAnalysis,{})},heightMap={askQuestion:400,sentiment:600,teachMe:400,default:200},HelperContent=()=>{const{isShow:tt,setIsShow:et}=useHelper(),[nt,rt]=reactExports.useState(null);return jsxRuntimeExports.jsx(ContentWrapper$1,{children:jsxRuntimeExports.jsx(Fade$1,{in:tt,mountOnEnter:!0,unmountOnExit:!0,children:jsxRuntimeExports.jsxs(Stack$5,{bgcolor:colors.listBg,component:Paper$1,elevation:2,height:heightMap[nt??"default"],p:2,pb:4,pt:4,sx:{transition:({transitions:it})=>`${it.create(["height","opacity"])}!important`,overflowY:"auto",overflowX:"hidden"},width:{xs:"calc(100vw - 8px * 4)",sm:MENU_WIDTH$2},children:[jsxRuntimeExports.jsx(CloseButton$3,{onClick:()=>{rt(null),et(it=>!it)}}),jsxRuntimeExports.jsx(ActionsMenu,{active:nt,onChange:rt}),nt&&ComponentsMapper$1[nt]]})})})},ContentWrapper$1=styled$1("div")(()=>({position:"absolute",bottom:"1rem",right:"1rem"})),CloseButton$3=styled$1(tt=>jsxRuntimeExports.jsx(IconButton$2,{component:"button",size:"small",...tt,children:jsxRuntimeExports.jsx(MdClose,{})}))(()=>({position:"absolute",right:"0.5rem",top:"0.5rem"})),dpr=window.devicePixelRatio||1,pi=Math.PI,points=12,radius=200*dpr,h=600*dpr,w=600*dpr,center={x:w/2*dpr,y:h/2*dpr},rangeMin=3,rangeMax=25,createBtn=tt=>{var at;const et=(at=tt.current)==null?void 0:at.getContext("2d"),nt=tt.current;if(!et||!nt)return null;const rt=getGradients(et);et.scale(dpr,dpr),nt.width=w*dpr,nt.height=h*dpr;const it=getCircles(rt),ot=setInterval(()=>{swingCircle(et,it,rt)},16);return()=>clearInterval(ot)};function cycle(tt,et){return(tt%et+et)%et}function swingCircle(tt,et,nt){tt.clearRect(0,0,w*dpr,h*dpr),tt.globalAlpha=.9,tt.globalCompositeOperation="screen";for(let rt=0;rt{const nt=reactExports.useRef(null);return reactExports.useEffect(()=>{const rt=createBtn(nt);return()=>{rt==null||rt()}},[]),jsxRuntimeExports.jsxs(ButtonContainer,{...et,children:[tt&&jsxRuntimeExports.jsx("div",{className:"children",children:tt}),jsxRuntimeExports.jsx(Canvas,{ref:nt})]})},ButtonContainer=styled$1(ButtonBase$1)(()=>({width:48,height:48,"& .children":{zIndex:1}})),Canvas=styled$1("canvas")(()=>({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:70,height:70})),OpenHelperBtn=()=>{const{setIsShow:tt}=useHelper(),[et]=useAppStore(it=>[it.sidebarIsOpen]),nt=reactExports.useRef(null),rt=useAppStore(it=>it.currentSearch);return reactExports.useEffect(()=>{const it=createBtn(nt);return()=>{it==null||it()}},[]),rt?jsxRuntimeExports.jsx(FabContainer,{sidebarIsOpen:et,children:jsxRuntimeExports.jsx(SiriLikeButton,{id:"cy-siri-btn",onClick:()=>tt(it=>!it)})}):null},FabContainer=styled$1("div")(({sidebarIsOpen:tt,theme:et})=>({position:"absolute",bottom:"2rem",transition:et.transitions.create(["right"]),right:tt?"calc((100% - 400px) / 2)":"50%",transform:"translate(50%)"})),Helper=()=>{const[tt,et]=reactExports.useState(!1),nt=reactExports.useMemo(()=>({isShow:tt,setIsShow:et}),[tt]);return jsxRuntimeExports.jsxs(HelperContext.Provider,{value:nt,children:[jsxRuntimeExports.jsx(OpenHelperBtn,{}),jsxRuntimeExports.jsx(HelperContent,{})]})},AddContentIcon=tt=>jsxRuntimeExports.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1259_25",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:jsxRuntimeExports.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1259_25)",children:jsxRuntimeExports.jsx("path",{d:"M11.25 12.75V16C11.25 16.2125 11.3219 16.3906 11.4657 16.5343C11.6095 16.6781 11.7877 16.75 12.0003 16.75C12.2129 16.75 12.391 16.6781 12.5346 16.5343C12.6782 16.3906 12.75 16.2125 12.75 16V12.75H16C16.2125 12.75 16.3906 12.6781 16.5344 12.5343C16.6781 12.3904 16.75 12.2122 16.75 11.9997C16.75 11.7871 16.6781 11.609 16.5344 11.4654C16.3906 11.3218 16.2125 11.25 16 11.25H12.75V7.99998C12.75 7.78748 12.6781 7.60935 12.5343 7.4656C12.3905 7.32187 12.2123 7.25 11.9997 7.25C11.7871 7.25 11.609 7.32187 11.4654 7.4656C11.3218 7.60935 11.25 7.78748 11.25 7.99998V11.25H8.00001C7.78751 11.25 7.60939 11.3219 7.46566 11.4657C7.32191 11.6095 7.25003 11.7877 7.25003 12.0003C7.25003 12.2129 7.32191 12.391 7.46566 12.5346C7.60939 12.6782 7.78751 12.75 8.00001 12.75H11.25ZM12.0017 21.5C10.6877 21.5 9.45271 21.2506 8.29658 20.752C7.14043 20.2533 6.13475 19.5765 5.27953 18.7217C4.4243 17.8669 3.74724 16.8616 3.24836 15.706C2.74947 14.5504 2.50003 13.3156 2.50003 12.0017C2.50003 10.6877 2.74936 9.45268 3.24803 8.29655C3.7467 7.1404 4.42345 6.13472 5.27828 5.2795C6.13313 4.42427 7.13837 3.74721 8.29401 3.24833C9.44962 2.74944 10.6844 2.5 11.9983 2.5C13.3123 2.5 14.5473 2.74933 15.7034 3.248C16.8596 3.74667 17.8653 4.42342 18.7205 5.27825C19.5757 6.1331 20.2528 7.13834 20.7517 8.29398C21.2505 9.44959 21.5 10.6844 21.5 11.9983C21.5 13.3122 21.2506 14.5473 20.752 15.7034C20.2533 16.8596 19.5766 17.8652 18.7217 18.7205C17.8669 19.5757 16.8616 20.2527 15.706 20.7516C14.5504 21.2505 13.3156 21.5 12.0017 21.5ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76664 19.225 7.87498 17.675 6.32498C16.125 4.77498 14.2333 3.99998 12 3.99998C9.76667 3.99998 7.87501 4.77498 6.32501 6.32498C4.77501 7.87498 4.00001 9.76664 4.00001 12C4.00001 14.2333 4.77501 16.125 6.32501 17.675C7.87501 19.225 9.76667 20 12 20Z",fill:"currentColor"})})]}),AddSourceIcon=tt=>jsxRuntimeExports.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1259_27",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:jsxRuntimeExports.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1259_27)",children:jsxRuntimeExports.jsx("path",{d:"M5.30773 20.5C4.81061 20.5 4.38506 20.3229 4.03106 19.9689C3.67704 19.6149 3.50003 19.1894 3.50003 18.6923V5.3077C3.50003 4.81058 3.67704 4.38503 4.03106 4.03103C4.38506 3.67701 4.81061 3.5 5.30773 3.5H18.6923C19.1894 3.5 19.615 3.67701 19.969 4.03103C20.323 4.38503 20.5 4.81058 20.5 5.3077V11.6327C20.2538 11.5275 20.0074 11.4384 19.7606 11.3654C19.5138 11.2923 19.2603 11.234 19 11.1904V5.3077C19 5.23077 18.968 5.16024 18.9039 5.09613C18.8397 5.03203 18.7692 4.99998 18.6923 4.99998H5.30773C5.2308 4.99998 5.16027 5.03203 5.09616 5.09613C5.03206 5.16024 5.00001 5.23077 5.00001 5.3077V18.6923C5.00001 18.7692 5.03206 18.8397 5.09616 18.9038C5.16027 18.9679 5.2308 19 5.30773 19H11.1654C11.2026 19.2769 11.2577 19.5387 11.3308 19.7855C11.4038 20.0323 11.4929 20.2705 11.5981 20.5H5.30773ZM5.00001 19V4.99998V11.1904V11.1154V19ZM7.25003 15.8849C7.25003 16.0975 7.32191 16.2756 7.46566 16.4192C7.60939 16.5628 7.78751 16.6346 8.00001 16.6346H11.2673C11.3109 16.3743 11.3757 16.1208 11.4616 15.874C11.5475 15.6272 11.641 15.3808 11.7423 15.1346H8.00001C7.78751 15.1346 7.60939 15.2065 7.46566 15.3503C7.32191 15.4941 7.25003 15.6723 7.25003 15.8849ZM7.25003 12.0003C7.25003 12.2129 7.32191 12.391 7.46566 12.5346C7.60939 12.6782 7.78751 12.75 8.00001 12.75H13.5904C14.0212 12.3846 14.4808 12.0785 14.9692 11.8317C15.4577 11.5849 15.9807 11.4096 16.5384 11.3058C16.4259 11.281 16.3009 11.2655 16.1634 11.2593C16.0259 11.2531 15.901 11.25 15.7885 11.25H8.00001C7.78751 11.25 7.60939 11.3219 7.46566 11.4657C7.32191 11.6095 7.25003 11.7877 7.25003 12.0003ZM7.25003 8.1157C7.25003 8.3283 7.32191 8.50639 7.46566 8.64998C7.60939 8.79356 7.78751 8.86535 8.00001 8.86535H16C16.2125 8.86535 16.3906 8.79344 16.5344 8.64963C16.6781 8.50583 16.75 8.32763 16.75 8.11503C16.75 7.90244 16.6781 7.72436 16.5344 7.58078C16.3906 7.43718 16.2125 7.36538 16 7.36538H8.00001C7.78751 7.36538 7.60939 7.43728 7.46566 7.5811C7.32191 7.72492 7.25003 7.90312 7.25003 8.1157ZM18 22.5576C16.7513 22.5576 15.6891 22.1198 14.8135 21.2442C13.9378 20.3685 13.5 19.3064 13.5 18.0577C13.5 16.809 13.9378 15.7468 14.8135 14.8712C15.6891 13.9955 16.7513 13.5577 18 13.5577C19.2487 13.5577 20.3109 13.9955 21.1865 14.8712C22.0622 15.7468 22.5 16.809 22.5 18.0577C22.5 19.3064 22.0622 20.3685 21.1865 21.2442C20.3109 22.1198 19.2487 22.5576 18 22.5576ZM17.5577 18.5V20.5577C17.5577 20.6756 17.6019 20.7788 17.6904 20.8673C17.7788 20.9557 17.8821 21 18 21C18.118 21 18.2212 20.9557 18.3096 20.8673C18.3981 20.7788 18.4423 20.6756 18.4423 20.5577V18.5H20.5C20.618 18.5 20.7212 18.4557 20.8096 18.3673C20.8981 18.2788 20.9423 18.1756 20.9423 18.0577C20.9423 17.9397 20.8981 17.8365 20.8096 17.748C20.7212 17.6596 20.618 17.6154 20.5 17.6154H18.4423V15.5577C18.4423 15.4397 18.3981 15.3365 18.3096 15.2481C18.2212 15.1596 18.118 15.1154 18 15.1154C17.8821 15.1154 17.7788 15.1596 17.6904 15.2481C17.6019 15.3365 17.5577 15.4397 17.5577 15.5577V17.6154H15.5C15.3821 17.6154 15.2788 17.6596 15.1904 17.748C15.1019 17.8365 15.0577 17.9397 15.0577 18.0577C15.0577 18.1756 15.1019 18.2788 15.1904 18.3673C15.2788 18.4557 15.3821 18.5 15.5 18.5H17.5577Z",fill:"currentColor"})})]}),SentimentDataIcon=tt=>jsxRuntimeExports.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1259_28",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:jsxRuntimeExports.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1259_28)",children:jsxRuntimeExports.jsx("path",{d:"M3 20.75L2.91345 19.4327L4.74998 17.6058V20.75H3ZM7.25003 20.75V15.1058L8.74998 13.6058V20.75H7.25003ZM11.25 20.75V13.6058L12.75 15.1308V20.75H11.25ZM15.25 20.75V15.1308L16.75 13.6308V20.75H15.25ZM19.25 20.75V11.1058L20.75 9.60583V20.75H19.25ZM3.25003 15.2192V13.1058L10 6.35581L14 10.3558L20.75 3.60583V5.71924L14 12.4692L10 8.46921L3.25003 15.2192Z",fill:"currentColor"})})]}),SourcesTableIcon=tt=>jsxRuntimeExports.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1259_26",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:jsxRuntimeExports.jsx("rect",{width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1259_26)",children:jsxRuntimeExports.jsx("path",{d:"M10.0577 18.7499C9.84521 18.7499 9.66708 18.678 9.52333 18.5342C9.3796 18.3904 9.30773 18.2122 9.30773 17.9996C9.30773 17.787 9.3796 17.609 9.52333 17.4654C9.66708 17.3218 9.84521 17.25 10.0577 17.25H19.75C19.9625 17.25 20.1406 17.3219 20.2844 17.4657C20.4281 17.6095 20.5 17.7877 20.5 18.0003C20.5 18.2129 20.4281 18.391 20.2844 18.5346C20.1406 18.6782 19.9625 18.7499 19.75 18.7499H10.0577ZM10.0577 12.7499C9.84521 12.7499 9.66708 12.678 9.52333 12.5342C9.3796 12.3904 9.30773 12.2122 9.30773 11.9996C9.30773 11.787 9.3796 11.609 9.52333 11.4654C9.66708 11.3218 9.84521 11.25 10.0577 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2844 11.4657C20.4281 11.6095 20.5 11.7877 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2844 12.5346C20.1406 12.6782 19.9625 12.7499 19.75 12.7499H10.0577ZM10.0577 6.74995C9.84521 6.74995 9.66708 6.67805 9.52333 6.53425C9.3796 6.39043 9.30773 6.21223 9.30773 5.99965C9.30773 5.78705 9.3796 5.60896 9.52333 5.46537C9.66708 5.32179 9.84521 5.25 10.0577 5.25H19.75C19.9625 5.25 20.1406 5.3219 20.2844 5.4657C20.4281 5.60951 20.5 5.78771 20.5 6.0003C20.5 6.2129 20.4281 6.39099 20.2844 6.53457C20.1406 6.67816 19.9625 6.74995 19.75 6.74995H10.0577ZM5.16348 19.6634C4.70603 19.6634 4.31443 19.5005 3.98868 19.1748C3.66291 18.849 3.50003 18.4574 3.50003 18C3.50003 17.5425 3.66291 17.1509 3.98868 16.8252C4.31443 16.4994 4.70603 16.3365 5.16348 16.3365C5.62093 16.3365 6.01253 16.4994 6.33828 16.8252C6.66403 17.1509 6.82691 17.5425 6.82691 18C6.82691 18.4574 6.66403 18.849 6.33828 19.1748C6.01253 19.5005 5.62093 19.6634 5.16348 19.6634ZM5.16348 13.6634C4.70603 13.6634 4.31443 13.5005 3.98868 13.1748C3.66291 12.849 3.50003 12.4574 3.50003 12C3.50003 11.5425 3.66291 11.1509 3.98868 10.8252C4.31443 10.4994 4.70603 10.3365 5.16348 10.3365C5.62093 10.3365 6.01253 10.4994 6.33828 10.8252C6.66403 11.1509 6.82691 11.5425 6.82691 12C6.82691 12.4574 6.66403 12.849 6.33828 13.1748C6.01253 13.5005 5.62093 13.6634 5.16348 13.6634ZM5.16348 7.6634C4.70603 7.6634 4.31443 7.50052 3.98868 7.17477C3.66291 6.84902 3.50003 6.45742 3.50003 5.99997C3.50003 5.54252 3.66291 5.15092 3.98868 4.82517C4.31443 4.49942 4.70603 4.33655 5.16348 4.33655C5.62093 4.33655 6.01253 4.49942 6.33828 4.82517C6.66403 5.15092 6.82691 5.54252 6.82691 5.99997C6.82691 6.45742 6.66403 6.84902 6.33828 7.17477C6.01253 7.50052 5.62093 7.6634 5.16348 7.6634Z",fill:"currentColor"})})]}),MainToolbar=()=>{const[tt]=useAppStore(at=>[at.setSecondarySidebarActiveTab]),{open:et,setAddNodeModalData:nt}=useModal("addNode"),{open:rt}=useModal("sourcesTable"),it=at=>{tt(at)},ot=at=>{et(),nt(at)};return jsxRuntimeExports.jsxs(Wrapper$d,{children:[jsxRuntimeExports.jsx(LogoButton,{onClick:()=>it("about"),children:jsxRuntimeExports.jsx("img",{alt:"Second brain",src:"logo.svg"})}),jsxRuntimeExports.jsxs(ActionButton,{onClick:()=>ot("content"),children:[jsxRuntimeExports.jsx(IconWrapper,{children:jsxRuntimeExports.jsx(AddContentIcon,{})}),jsxRuntimeExports.jsx(Text$3,{children:"Add Content"})]}),jsxRuntimeExports.jsxs(ActionButton,{onClick:()=>ot("source"),children:[jsxRuntimeExports.jsx(IconWrapper,{children:jsxRuntimeExports.jsx(AddSourceIcon,{})}),jsxRuntimeExports.jsx(Text$3,{children:"Add Source"})]}),jsxRuntimeExports.jsxs(ActionButton,{id:"cy-open-soure-table",onClick:rt,children:[jsxRuntimeExports.jsx(IconWrapper,{children:jsxRuntimeExports.jsx(SourcesTableIcon,{})}),jsxRuntimeExports.jsx(Text$3,{children:"Source Table"})]}),jsxRuntimeExports.jsxs(ActionButton,{id:"cy-open-sentiment-data",onClick:()=>it("sentiment"),children:[jsxRuntimeExports.jsx(IconWrapper,{children:jsxRuntimeExports.jsx(SentimentDataIcon,{})}),jsxRuntimeExports.jsx(Text$3,{children:"Sentiment Data"})]})]})},Wrapper$d=styled$4(Flex).attrs({align:"flex-start",direction:"column",justify:"flex-start"})` @@ -7491,7 +7532,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `);class AdapterMoment{constructor({locale:et,formats:nt,instance:rt}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="moment",this.moment=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=formatTokenMap,this.setLocaleToValue=it=>{const ot=this.getCurrentLocaleCode();return ot===it.locale()?it:it.locale(ot)},this.syncMomentLocale=it=>{var ot;const at=hooks.locale(),st=(ot=this.locale)!=null?ot:"en-us";if(at!==st){hooks.locale(st);const lt=it();return hooks.locale(at),lt}return it()},this.hasTimezonePlugin=()=>typeof this.moment.tz<"u",this.createSystemDate=it=>{const ot=this.moment(it).local();return this.locale===void 0?ot:ot.locale(this.locale)},this.createUTCDate=it=>{const ot=this.moment.utc(it);return this.locale===void 0?ot:ot.locale(this.locale)},this.createTZDate=(it,ot)=>{if(!this.hasTimezonePlugin())throw new Error(MISSING_TIMEZONE_PLUGIN);const at=ot==="default"?this.moment(it):this.moment.tz(it,ot);return this.locale===void 0?at:at.locale(this.locale)},this.date=it=>{if(it===null)return null;const ot=this.moment(it);return ot.locale(this.getCurrentLocaleCode()),ot},this.dateWithTimezone=(it,ot)=>it===null?null:ot==="UTC"?this.createUTCDate(it):ot==="system"||ot==="default"&&!this.hasTimezonePlugin()?this.createSystemDate(it):this.createTZDate(it,ot),this.getTimezone=it=>{var ot,at,st;const lt=(ot=it._z)==null?void 0:ot.name,ct=it.isUTC()?"UTC":"system";return(at=lt??((st=this.moment.defaultZone)==null?void 0:st.name))!=null?at:ct},this.setTimezone=(it,ot)=>{var at,st;if(this.getTimezone(it)===ot)return it;if(ot==="UTC")return it.clone().utc();if(ot==="system")return it.clone().local();if(!this.hasTimezonePlugin()){if(ot!=="default")throw new Error(MISSING_TIMEZONE_PLUGIN);return it}const lt=ot==="default"?(at=(st=this.moment.defaultZone)==null?void 0:st.name)!=null?at:"system":ot;if(lt==="system")return it.clone().local();const ct=it.clone();return ct.tz(lt),ct},this.toJsDate=it=>it.toDate(),this.parseISO=it=>this.moment(it,!0),this.toISO=it=>it.toISOString(),this.parse=(it,ot)=>it===""?null:this.locale?this.moment(it,ot,this.locale,!0):this.moment(it,ot,!0),this.getCurrentLocaleCode=()=>this.locale||hooks.locale(),this.is12HourCycleInCurrentLocale=()=>/A|a/.test(hooks.localeData(this.getCurrentLocaleCode()).longDateFormat("LT")),this.expandFormat=it=>{const ot=/(\[[^[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})|./g;return it.match(ot).map(at=>{const st=at[0];return st==="L"||st===";"?hooks.localeData(this.getCurrentLocaleCode()).longDateFormat(at):at}).join("")},this.getFormatHelperText=it=>this.expandFormat(it).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=it=>it===null,this.isValid=it=>this.moment(it).isValid(),this.format=(it,ot)=>this.formatByString(it,this.formats[ot]),this.formatByString=(it,ot)=>{const at=it.clone();return at.locale(this.getCurrentLocaleCode()),at.format(ot)},this.formatNumber=it=>it,this.getDiff=(it,ot,at)=>it.diff(ot,at),this.isEqual=(it,ot)=>it===null&&ot===null?!0:this.moment(it).isSame(ot),this.isSameYear=(it,ot)=>it.isSame(ot,"year"),this.isSameMonth=(it,ot)=>it.isSame(ot,"month"),this.isSameDay=(it,ot)=>it.isSame(ot,"day"),this.isSameHour=(it,ot)=>it.isSame(ot,"hour"),this.isAfter=(it,ot)=>it.isAfter(ot),this.isAfterYear=(it,ot)=>it.isAfter(ot,"year"),this.isAfterDay=(it,ot)=>it.isAfter(ot,"day"),this.isBefore=(it,ot)=>it.isBefore(ot),this.isBeforeYear=(it,ot)=>it.isBefore(ot,"year"),this.isBeforeDay=(it,ot)=>it.isBefore(ot,"day"),this.isWithinRange=(it,[ot,at])=>it.isBetween(ot,at,null,"[]"),this.startOfYear=it=>it.clone().startOf("year"),this.startOfMonth=it=>it.clone().startOf("month"),this.startOfWeek=it=>it.clone().startOf("week"),this.startOfDay=it=>it.clone().startOf("day"),this.endOfYear=it=>it.clone().endOf("year"),this.endOfMonth=it=>it.clone().endOf("month"),this.endOfWeek=it=>it.clone().endOf("week"),this.endOfDay=it=>it.clone().endOf("day"),this.addYears=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"years"):it.clone().add(ot,"years"),this.addMonths=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"months"):it.clone().add(ot,"months"),this.addWeeks=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"weeks"):it.clone().add(ot,"weeks"),this.addDays=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"days"):it.clone().add(ot,"days"),this.addHours=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"hours"):it.clone().add(ot,"hours"),this.addMinutes=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"minutes"):it.clone().add(ot,"minutes"),this.addSeconds=(it,ot)=>ot<0?it.clone().subtract(Math.abs(ot),"seconds"):it.clone().add(ot,"seconds"),this.getYear=it=>it.get("year"),this.getMonth=it=>it.get("month"),this.getDate=it=>it.get("date"),this.getHours=it=>it.get("hours"),this.getMinutes=it=>it.get("minutes"),this.getSeconds=it=>it.get("seconds"),this.getMilliseconds=it=>it.get("milliseconds"),this.setYear=(it,ot)=>it.clone().year(ot),this.setMonth=(it,ot)=>it.clone().month(ot),this.setDate=(it,ot)=>it.clone().date(ot),this.setHours=(it,ot)=>it.clone().hours(ot),this.setMinutes=(it,ot)=>it.clone().minutes(ot),this.setSeconds=(it,ot)=>it.clone().seconds(ot),this.setMilliseconds=(it,ot)=>it.clone().milliseconds(ot),this.getDaysInMonth=it=>it.daysInMonth(),this.getNextMonth=it=>it.clone().add(1,"month"),this.getPreviousMonth=it=>it.clone().subtract(1,"month"),this.getMonthArray=it=>{const at=[this.startOfYear(it)];for(;at.length<12;){const st=at[at.length-1];at.push(this.getNextMonth(st))}return at},this.mergeDateAndTime=(it,ot)=>it.clone().hour(ot.hour()).minute(ot.minute()).second(ot.second()),this.getWeekdays=()=>this.syncMomentLocale(()=>hooks.weekdaysShort(!0)),this.getWeekArray=it=>{const ot=this.setLocaleToValue(it),at=ot.clone().startOf("month").startOf("week"),st=ot.clone().endOf("month").endOf("week");let lt=0,ct=at;const ut=[];for(;ct.isBefore(st);){const ht=Math.floor(lt/7);ut[ht]=ut[ht]||[],ut[ht].push(ct),ct=ct.clone().add(1,"day"),lt+=1}return ut},this.getWeekNumber=it=>it.week(),this.getYearRange=(it,ot)=>{const at=this.moment(it).startOf("year"),st=this.moment(ot).endOf("year"),lt=[];let ct=at;for(;ct.isBefore(st);)lt.push(ct),ct=ct.clone().add(1,"year");return lt},this.getMeridiemText=it=>this.is12HourCycleInCurrentLocale()?hooks.localeData(this.getCurrentLocaleCode()).meridiem(it==="am"?0:13,0,!1):it==="am"?"AM":"PM",this.moment=rt||hooks,this.locale=et,this.formats=_extends$u({},defaultFormats,nt)}}const MuiButton={defaultProps:{disableElevation:!0,disableRipple:!0},styleOverrides:{root:{display:"inline-flex",padding:"12px 20px",justifyContent:"center",alignItems:"center",gap:"10px",borderRadius:"200px",background:colors.BUTTON1,color:"var(--Primary-Text, #fff)",fontFamily:"Barlow",fontSize:"12px",fontStyle:"normal",fontWeight:"400",lineHeight:"8px",cursor:"pointer",columnGap:"6px","&:hover":{background:colors.BUTTON1_HOVER,color:colors.GRAY3,outline:"none",boxShadow:"none"},"&:focus":{outline:"none",boxShadow:"none",background:colors.BUTTON1_PRESS,color:colors.GRAY6},"&:active":{outline:"none",boxShadow:"none",background:colors.BUTTON1_PRESS,color:colors.GRAY6},"&.MuiButton-sizeSmall":{padding:"7px 16px",fontSize:"11px",lineHeight:"14px",fontWeight:500},"&.MuiButton-sizeLarge":{padding:"12px 24px",fontSize:"1.2rem"},"&.MuiButton-outlined":{}},outlined:{borderColor:colors.BUTTON1,borderWidth:"1px",backgroundColor:"transparent","&:hover":{borderColor:colors.BUTTON1_HOVER,backgroundColor:"transparent",color:colors.GRAY3},"&:active":{backgroundColor:colors.BUTTON1_PRESS,color:colors.GRAY6}},containedSecondary:{backgroundColor:colors.PRIMARY_BLUE,borderRadius:"6px",color:"white","&:hover":{backgroundColor:colors.PRIMARY_BLUE_BORDER,color:colors.white},"&:active":{backgroundColor:colors.BLUE_PRESS_STATE,color:colors.white},"&:focus":{backgroundColor:colors.BLUE_PRESS_STATE,color:colors.white}},textSecondary:{color:"purple","&:hover":{color:"darkpurple"}},startIcon:{fontSize:"1em",marginRight:0},endIcon:{fontSize:"1em"}}},palette=createPalette({mode:"dark",primary:{main:colors.primaryButton}}),appTheme=createTheme({palette,components:{MuiButton},typography:{button:{textTransform:"none",whiteSpace:"nowrap"}},breakpoints:{values:{xs:breakpoints.small,sm:breakpoints.medium,md:breakpoints.large,lg:1200,xl:1500}}}),AppProviders=({children:tt})=>jsxRuntimeExports.jsxs(ThemeProvider,{theme:appTheme,children:[jsxRuntimeExports.jsx(StyledEngineProvider,{injectFirst:!0}),jsxRuntimeExports.jsx(Le,{theme:appTheme,children:jsxRuntimeExports.jsx(LocalizationProvider,{dateAdapter:AdapterMoment,children:tt})})]}),requiredRule={required:{message:"The field is required",value:!0}},AboutAdminView=({initialValues:tt})=>{const et=useForm({defaultValues:tt,mode:"onSubmit"}),{isSubmitting:nt}=et.formState,rt=et.handleSubmit(async it=>{try{await postAboutData(it)}catch(ot){console.warn(ot)}});return jsxRuntimeExports.jsx(FormProvider,{...et,children:jsxRuntimeExports.jsx("form",{id:"add-node-form",onSubmit:rt,children:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Flex,{children:[jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(TextInput,{id:"cy-about-title-id",label:"Graph Title",maxLength:50,name:"title",placeholder:"Type graph title here...",rules:{...requiredRule}})}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(TextInput,{id:"cy-about-id",label:"Graph Description",maxLength:50,name:"description",placeholder:"Type graph description here...",rules:{...requiredRule}})}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(TextInput,{id:"cy-about-mission_statement-id",label:"Mission Statement",maxLength:50,name:"mission_statement",placeholder:"Type mission statement here...",rules:{...requiredRule}})}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(TextInput,{id:"cy-about-search_term-id",label:"Search Term",maxLength:50,name:"search_term",placeholder:"Type search term here...",rules:{...requiredRule}})})]}),jsxRuntimeExports.jsx(Flex,{pt:8,children:nt?jsxRuntimeExports.jsx(SubmitLoader,{children:jsxRuntimeExports.jsx(ClipLoader$2,{color:colors.white,size:20})}):jsxRuntimeExports.jsx(Button,{disabled:nt,id:"add-node-submit-cta",kind:"big",type:"submit",children:"Save changes"})})]})})})},SubmitLoader=styled$4(Flex).attrs({align:"center",background:"primaryButton",borderRadius:8,justify:"center"})` padding: 16px 24px; opacity: 0.5; -`,CommonView=({initialValues:tt})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[tt.title&&jsxRuntimeExports.jsxs(Flex,{pt:12,children:[jsxRuntimeExports.jsx(Text$3,{kind:"regular",children:"Graph Title"}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(Text$3,{className:"value",kind:"medium",children:tt.title})})]}),tt.description&&jsxRuntimeExports.jsxs(Flex,{pt:12,children:[jsxRuntimeExports.jsx(Text$3,{kind:"regular",children:"Graph Description"}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(Text$3,{className:"value",kind:"medium",children:tt.description})})]}),tt.mission_statement&&jsxRuntimeExports.jsxs(Flex,{pt:12,children:[jsxRuntimeExports.jsx(Text$3,{kind:"regular",children:"Mission Statement"}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(Text$3,{className:"value",kind:"medium",children:tt.mission_statement})})]})]}),admins=["02c431e64078b10925584d64824c9d1d12eca05e2c56660ffa5ac84aa6946adfe5","03a9a8d953fe747d0dd94dd3c567ddc58451101e987e2d2bf7a4d1e10a2c89ff38","024efa31d1e4f98bccc415b222c9d971866013ad6f95f7d1ed9e8be8e3355a36ff"],defaultData$1={description:"",mission_statement:"",search_term:"",title:""},About=()=>{const[tt,et,nt,rt]=useUserStore(ut=>[ut.setIsAdmin,ut.isAdmin,ut.setPubKey,ut.pubKey]),[it,ot]=reactExports.useState(!1),[at,st]=reactExports.useState(defaultData$1);reactExports.useEffect(()=>{(async()=>{ot(!0);try{const ht=await getAboutData();st(ht)}catch(ht){console.warn(ht)}finally{ot(!1)}})()},[]);const lt=async()=>{await executeIfProd(async()=>{try{const ut=await distExports$1.enable(),ht=ut==null?void 0:ut.pubkey;nt(ht),ht&&tt(ht&&admins.includes(ht))}catch(ut){console.warn(ut)}})},ct=()=>rt?rt&&et?null:jsxRuntimeExports.jsx(Text$3,{children:"You are not admin"}):jsxRuntimeExports.jsx(EditButton,{kind:"small",onClick:lt,children:"Admin"});return jsxRuntimeExports.jsxs(Wrapper$c,{align:"stretch",direction:"column",justify:"flex-end",children:[jsxRuntimeExports.jsxs(Heading$2,{align:"center",direction:"row",justify:"space-between",children:[jsxRuntimeExports.jsx(Text$3,{className:"title",children:"About"}),ct()]}),it?jsxRuntimeExports.jsx(ContentWrapper,{align:"center",justify:"center",children:jsxRuntimeExports.jsx(ClipLoader$2,{})}):jsxRuntimeExports.jsx(ContentWrapper,{align:"stretch",justify:"flex-start",children:et?jsxRuntimeExports.jsx(AboutAdminView,{initialValues:at}):jsxRuntimeExports.jsx(CommonView,{initialValues:at})})]})},Wrapper$c=styled$4(Flex)` +`,CommonView=({initialValues:tt})=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[tt.title&&jsxRuntimeExports.jsxs(Flex,{pt:12,children:[jsxRuntimeExports.jsx(Text$3,{kind:"regular",children:"Graph Title"}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(Text$3,{className:"value",kind:"medium",children:tt.title})})]}),tt.description&&jsxRuntimeExports.jsxs(Flex,{pt:12,children:[jsxRuntimeExports.jsx(Text$3,{kind:"regular",children:"Graph Description"}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(Text$3,{className:"value",kind:"medium",children:tt.description})})]}),tt.mission_statement&&jsxRuntimeExports.jsxs(Flex,{pt:12,children:[jsxRuntimeExports.jsx(Text$3,{kind:"regular",children:"Mission Statement"}),jsxRuntimeExports.jsx(Flex,{pt:12,children:jsxRuntimeExports.jsx(Text$3,{className:"value",kind:"medium",children:tt.mission_statement})})]})]}),admins=["02c431e64078b10925584d64824c9d1d12eca05e2c56660ffa5ac84aa6946adfe5","03a9a8d953fe747d0dd94dd3c567ddc58451101e987e2d2bf7a4d1e10a2c89ff38","024efa31d1e4f98bccc415b222c9d971866013ad6f95f7d1ed9e8be8e3355a36ff"],defaultData$1={description:"",mission_statement:"",search_term:"",title:""},About=()=>{const[tt,et,nt,rt]=useUserStore(ut=>[ut.setIsAdmin,ut.isAdmin,ut.setPubKey,ut.pubKey]),[it,ot]=reactExports.useState(!1),[at,st]=reactExports.useState(defaultData$1);reactExports.useEffect(()=>{(async()=>{ot(!0);try{const ht=await getAboutData();st(ht)}catch(ht){console.warn(ht)}finally{ot(!1)}})()},[]);const lt=async()=>{await executeIfProd(async()=>{try{const ut=await distExports$1.enable(),ht=ut==null?void 0:ut.pubkey;nt(ht),ht&&tt(ht&&admins.includes(ht))}catch(ut){console.warn(ut)}})},ct=()=>rt?rt&&et?null:jsxRuntimeExports.jsx(Text$3,{children:"You are not admin"}):jsxRuntimeExports.jsx(EditButton,{kind:"small",onClick:lt,children:"Admin"});return jsxRuntimeExports.jsxs(Wrapper$c,{align:"stretch",direction:"column",justify:"flex-end",children:[jsxRuntimeExports.jsxs(Heading$3,{align:"center",direction:"row",justify:"space-between",children:[jsxRuntimeExports.jsx(Text$3,{className:"title",children:"About"}),ct()]}),it?jsxRuntimeExports.jsx(ContentWrapper,{align:"center",justify:"center",children:jsxRuntimeExports.jsx(ClipLoader$2,{})}):jsxRuntimeExports.jsx(ContentWrapper,{align:"stretch",justify:"flex-start",children:et?jsxRuntimeExports.jsx(AboutAdminView,{initialValues:at}):jsxRuntimeExports.jsx(CommonView,{initialValues:at})})]})},Wrapper$c=styled$4(Flex)` border-radius: 8px; box-shadow: 0px 5px 6px rgb(0 0 0 / 50%); padding: 16px; @@ -7512,12 +7553,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho width: 100%; `,EditButton=styled$4(Button)` margin-left: auto; -`,Heading$2=styled$4(Flex)` +`,Heading$3=styled$4(Flex)` margin-bottom: 16px; ${Text$3} { margin-bottom: 0; } -`,Sentiment=()=>{const[tt,et]=reactExports.useState(void 0),[nt,rt]=reactExports.useState(!1),it=async()=>{rt(!0),await executeIfProd(()=>distExports$1.enable()),getSentimentData().then(ot=>{et(ot==null?void 0:ot.data.filter(at=>at.date).map(at=>({date:hooks.unix(Number(String(at.date).split(".")[0])).format("MM/DD/YY"),score:at.sentiment_score})))}).catch(console.error).finally(()=>{rt(!1)})};return jsxRuntimeExports.jsxs(ChartWrapper,{align:"flex-start",direction:"column",id:"cy-sentiment-chart-wrapper",justify:"flex-end",children:[jsxRuntimeExports.jsx(Text$3,{className:"title",children:"Sentiment chart"}),nt&&jsxRuntimeExports.jsx(Stack$5,{alignItems:"center",component:"div",flexGrow:1,p:4,spacing:2,width:"100%",children:jsxRuntimeExports.jsx(PropagateLoader,{color:colors.white})}),!(tt!=null&&tt.length)&&jsxRuntimeExports.jsx(StyledButton,{className:"button",id:"cy-get-sentiments-btn",onClick:it,children:"Get top 100 sentiments"}),jsxRuntimeExports.jsx(SentimentChart,{data:tt})]})},ChartWrapper=styled$4(Flex)` +`,Sentiment=()=>{const[tt,et]=reactExports.useState(void 0),[nt]=useUserStore(at=>[at.setBudget]),[rt,it]=reactExports.useState(!1),ot=async()=>{it(!0),await executeIfProd(()=>distExports$1.enable()),getSentimentData().then(async at=>{et(at==null?void 0:at.data.filter(st=>st.date).map(st=>({date:hooks.unix(Number(String(st.date).split(".")[0])).format("MM/DD/YY"),score:st.sentiment_score}))),await updateBudget(nt)}).catch(console.error).finally(()=>{it(!1)})};return jsxRuntimeExports.jsxs(ChartWrapper,{align:"flex-start",direction:"column",id:"cy-sentiment-chart-wrapper",justify:"flex-end",children:[jsxRuntimeExports.jsx(Text$3,{className:"title",children:"Sentiment chart"}),rt&&jsxRuntimeExports.jsx(Stack$5,{alignItems:"center",component:"div",flexGrow:1,p:4,spacing:2,width:"100%",children:jsxRuntimeExports.jsx(PropagateLoader,{color:colors.white})}),!(tt!=null&&tt.length)&&jsxRuntimeExports.jsx(StyledButton,{className:"button",id:"cy-get-sentiments-btn",onClick:ot,children:"Get top 100 sentiments"}),jsxRuntimeExports.jsx(SentimentChart,{data:tt})]})},ChartWrapper=styled$4(Flex)` border-radius: 8px; box-shadow: 0px 5px 6px rgb(0 0 0 / 50%); padding: 16px; @@ -7598,7 +7639,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho overflow-y: auto; overflow-x: hidden; background: ${colors.body}; -`,useIsMatchBreakpoint=(tt,et="down")=>{const nt=useTheme(),[rt,it]=reactExports.useState(!1),ot=nt.breakpoints[et](tt).split("@media")[1].trim();return reactExports.useEffect(()=>{const at=()=>{const{matches:st}=window.matchMedia(ot);it(st)};return at(),window.addEventListener("resize",at),()=>window.removeEventListener("resize",at)},[ot]),rt},BoostIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 9 9",style:{color:"#6B7A8D",paddingTop:"5px"},fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...tt,children:jsxRuntimeExports.jsx("path",{id:"Icon","fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.97172 5.26825L8.23268 0.525927C8.24606 0.301673 8.05202 0.110397 7.81782 0.116993L3.00677 0.374226C2.66551 0.394014 2.51161 0.796353 2.7525 1.0338L7.30259 5.51889C7.54348 5.75633 7.95165 5.60463 7.97172 5.26825ZM5.56945 5.5915L2.67881 2.74215L1.79555 3.61278L4.6862 6.46213L5.56945 5.5915ZM1.14615 6.44238L0.0353953 5.34749L0.918648 4.47686L3.80929 7.32621L2.92604 8.19685L1.81528 7.10196L0.918648 7.98578C0.731292 8.17046 0.436874 8.17046 0.249518 7.98578C0.0621611 7.8011 0.0621611 7.51089 0.249517 7.32621L1.14615 6.44238Z",fill:"currentColor"})}),BoostAmt=({amt:tt})=>jsxRuntimeExports.jsxs("div",{style:{alignSelf:"center"},children:[jsxRuntimeExports.jsx(BoostIcon,{}),jsxRuntimeExports.jsx(StyledText,{color:"white",children:tt})]}),StyledText=styled$4(Text$3)` +`,useIsMatchBreakpoint=(tt,et="down")=>{const nt=useTheme(),[rt,it]=reactExports.useState(!1),ot=nt.breakpoints[et](tt).split("@media")[1].trim();return reactExports.useEffect(()=>{const at=()=>{const{matches:st}=window.matchMedia(ot);it(st)};return at(),window.addEventListener("resize",at),()=>window.removeEventListener("resize",at)},[ot]),rt},BoostIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 9 9",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsx("path",{id:"Icon","fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.97172 5.26825L8.23268 0.525927C8.24606 0.301673 8.05202 0.110397 7.81782 0.116993L3.00677 0.374226C2.66551 0.394014 2.51161 0.796353 2.7525 1.0338L7.30259 5.51889C7.54348 5.75633 7.95165 5.60463 7.97172 5.26825ZM5.56945 5.5915L2.67881 2.74215L1.79555 3.61278L4.6862 6.46213L5.56945 5.5915ZM1.14615 6.44238L0.0353953 5.34749L0.918648 4.47686L3.80929 7.32621L2.92604 8.19685L1.81528 7.10196L0.918648 7.98578C0.731292 8.17046 0.436874 8.17046 0.249518 7.98578C0.0621611 7.8011 0.0621611 7.51089 0.249517 7.32621L1.14615 6.44238Z",fill:"currentColor"})}),BoostAmt=({amt:tt})=>jsxRuntimeExports.jsxs("div",{style:{alignSelf:"center"},children:[jsxRuntimeExports.jsx(BoostIcon,{}),jsxRuntimeExports.jsx(StyledText,{color:"white",children:tt})]}),StyledText=styled$4(Text$3)` padding-left: 10px; `,TypePerson=({title:tt,imageUrl:et,name:nt})=>jsxRuntimeExports.jsxs(Flex,{children:[jsxRuntimeExports.jsx(PictureWrapper$1,{children:jsxRuntimeExports.jsx(Avatar$1,{rounded:!0,size:64,src:et||"",type:"person"})}),(tt||nt)&&jsxRuntimeExports.jsx(Name$1,{children:tt||nt})]}),PictureWrapper$1=styled$4(Flex)` img { @@ -7675,7 +7716,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho .player-controls { margin-left: 4px; } -`,Episode=({boostCount:tt,date:et,description:nt,id:rt,isSelectedView:it=!1,imageUrl:ot,title:at,type:st,text:lt,name:ct,profilePicture:ut,verified:ht=!1,twitterHandle:dt,className:pt="episode-wrapper",onClick:mt})=>{const gt=useDataStore(bt=>bt.selectedTimestamp),yt=!!(gt&>.id===rt);return jsxRuntimeExports.jsxs(EpisodeWrapper$2,{className:pt,isSelected:yt,onClick:mt,children:[st!=="tweet"&&st!=="person"&&st!=="guest"&&jsxRuntimeExports.jsxs(Flex,{direction:"row",children:[!it&&jsxRuntimeExports.jsx(Flex,{align:"center",pr:16,children:jsxRuntimeExports.jsx(Avatar$1,{src:ot,type:st||""})}),jsxRuntimeExports.jsxs(Flex,{grow:1,shrink:1,children:[jsxRuntimeExports.jsx(Flex,{align:"center",direction:"row",justify:"space-between",children:jsxRuntimeExports.jsx(Flex,{align:"center",direction:"row",children:st&&jsxRuntimeExports.jsx(TypeBadge,{type:st})})}),jsxRuntimeExports.jsx(Description,{"data-testid":"episode-description",children:nt}),jsxRuntimeExports.jsxs(Flex,{direction:"row",justify:"flex-start",children:[!!et&&jsxRuntimeExports.jsx(Date$2,{children:hooks.unix(et).format("ll")}),!!at&&jsxRuntimeExports.jsx(Title,{children:at}),!it&&tt>0&&jsxRuntimeExports.jsx(Flex,{style:{marginLeft:"auto"},children:jsxRuntimeExports.jsx(BoostAmt,{amt:tt})})]})]})]}),["person","guest"].includes(st)&&jsxRuntimeExports.jsx(TypePerson,{imageUrl:ot,name:ct||"",title:at||""}),st==="tweet"&&jsxRuntimeExports.jsx(TypeTweet,{date:et,imageUrl:ut,name:ct||"",text:lt||"",twitterHandle:dt,verified:ht})]})},Description=styled$4(Flex)` +`,Episode=({boostCount:tt,date:et,episodeTitle:nt,id:rt,isSelectedView:it=!1,imageUrl:ot,showTitle:at,type:st,text:lt,name:ct,profilePicture:ut,verified:ht=!1,twitterHandle:dt,className:pt="episode-wrapper",onClick:mt})=>{const gt=useDataStore(bt=>bt.selectedTimestamp),yt=!!(gt&>.id===rt);return jsxRuntimeExports.jsxs(EpisodeWrapper$2,{className:pt,isSelected:yt,onClick:mt,children:[st!=="tweet"&&st!=="person"&&st!=="guest"&&jsxRuntimeExports.jsxs(Flex,{direction:"row",children:[!it&&jsxRuntimeExports.jsx(Flex,{align:"center",pr:16,children:jsxRuntimeExports.jsx(Avatar$1,{src:ot,type:st||""})}),jsxRuntimeExports.jsxs(Flex,{grow:1,shrink:1,children:[jsxRuntimeExports.jsx(Flex,{align:"center",direction:"row",justify:"space-between",children:jsxRuntimeExports.jsx(Flex,{align:"center",direction:"row",children:st&&jsxRuntimeExports.jsx(TypeBadge,{type:st})})}),jsxRuntimeExports.jsx(Description$1,{"data-testid":"episode-description",children:nt}),jsxRuntimeExports.jsxs(Flex,{direction:"row",justify:"flex-start",children:[!!et&&jsxRuntimeExports.jsx(Date$2,{children:hooks.unix(et).format("ll")}),!!at&&jsxRuntimeExports.jsx(Title,{children:at}),!it&&tt>0&&jsxRuntimeExports.jsx(Flex,{style:{marginLeft:"auto"},children:jsxRuntimeExports.jsx(BoostAmt,{amt:tt})})]})]})]}),["person","guest"].includes(st)&&jsxRuntimeExports.jsx(TypePerson,{imageUrl:ot,name:ct||"",title:at||""}),st==="tweet"&&jsxRuntimeExports.jsx(TypeTweet,{date:et,imageUrl:ut,name:ct||"",text:lt||"",twitterHandle:dt,verified:ht})]})},Description$1=styled$4(Flex)` font-family: Barlow; font-size: 13px; font-style: normal; @@ -7718,7 +7759,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho height: 4px; background: ${colors.GRAY6}; } -`,Relevance=({isSearchResult:tt})=>{const et=useGraphData(),nt=reactExports.useRef(null),rt=tt?80:10,it=useDataStore(yt=>yt.setSelectedNode),ot=useDataStore(yt=>yt.setSelectedTimestamp),[at]=useAppStore(yt=>[yt.setSidebarOpen]),st=useAppStore(yt=>yt.setRelevanceSelected),[lt,ct]=reactExports.useState(0),ht=lt*rt+rt,dt=et.nodes.length-1>ht,pt=useIsMatchBreakpoint("sm","down"),mt=reactExports.useMemo(()=>[...et.nodes].sort((yt,bt)=>(bt.date||0)-(yt.date||0)).slice(0,ht),[et.nodes,ht]),gt=reactExports.useCallback(yt=>{saveConsumedContent(yt),ot(yt),st(!0),it(yt),pt&&at(!1)},[it,st,at,ot,pt]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(ScrollView,{ref:nt,id:"search-result-list",shrink:1,children:[mt.map((yt,bt)=>{const{image_url:vt,description:xt,date:kt,boost:St,type:Tt,id:At,episode_title:Et,node_type:$t,text:Dt,name:jt,profile_picture:Pt,verified:Ct=!1,twitter_handle:wt}=yt||{};return jsxRuntimeExports.jsx(Episode,{boostCount:St||0,date:kt||0,description:formatDescription(xt),id:At,imageUrl:vt||"audio_default.svg",name:jt||"",onClick:()=>gt(yt),profilePicture:Pt,text:Dt||"",title:Et,twitterHandle:wt,type:Tt||$t,verified:Ct},bt.toString())}),jsxRuntimeExports.jsx(LoadMoreWrapper,{align:"center",background:"BG1",direction:"row",justify:"center",children:jsxRuntimeExports.jsx(Button$2,{disabled:!dt,onClick:()=>{var yt;dt&&(ct(lt+1),(yt=nt.current)==null||yt.scrollTo(0,0))},size:"medium",children:"Load More"})})]})})},LoadMoreWrapper=styled$4(Flex)` +`,Relevance=({isSearchResult:tt})=>{const et=useGraphData(),nt=reactExports.useRef(null),rt=tt?80:10,it=useDataStore(yt=>yt.setSelectedNode),ot=useDataStore(yt=>yt.setSelectedTimestamp),[at]=useAppStore(yt=>[yt.setSidebarOpen]),st=useAppStore(yt=>yt.setRelevanceSelected),[lt,ct]=reactExports.useState(0),ht=lt*rt+rt,dt=et.nodes.length-1>ht,pt=useIsMatchBreakpoint("sm","down"),mt=reactExports.useMemo(()=>[...et.nodes].sort((yt,bt)=>(bt.date||0)-(yt.date||0)).slice(0,ht),[et.nodes,ht]),gt=reactExports.useCallback(yt=>{saveConsumedContent(yt),ot(yt),st(!0),it(yt),pt&&at(!1)},[it,st,at,ot,pt]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(ScrollView,{ref:nt,id:"search-result-list",shrink:1,children:[mt.map((yt,bt)=>{const{image_url:vt,date:xt,boost:kt,type:St,id:Tt,episode_title:At,show_title:Et,node_type:$t,text:Dt,name:jt,profile_picture:Pt,verified:Ct=!1,twitter_handle:wt}=yt||{};return jsxRuntimeExports.jsx(Episode,{boostCount:kt||0,date:xt||0,episodeTitle:formatDescription(At),id:Tt,imageUrl:vt||"audio_default.svg",name:jt||"",onClick:()=>gt(yt),profilePicture:Pt,showTitle:formatDescription(Et),text:Dt||"",twitterHandle:wt,type:St||$t,verified:Ct},bt.toString())}),jsxRuntimeExports.jsx(LoadMoreWrapper,{align:"center",background:"BG1",direction:"row",justify:"center",children:jsxRuntimeExports.jsx(Button$2,{disabled:!dt,onClick:()=>{var yt;dt&&(ct(lt+1),(yt=nt.current)==null||yt.scrollTo(0,0))},size:"medium",children:"Load More"})})]})})},LoadMoreWrapper=styled$4(Flex)` flex: 0 0 86px; `,_View$1=({isSearchResult:tt})=>jsxRuntimeExports.jsxs(Wrapper$9,{children:[!tt&&jsxRuntimeExports.jsxs("div",{className:"heading",children:[jsxRuntimeExports.jsx("span",{className:"heading__title",children:"Latest"}),jsxRuntimeExports.jsx("span",{className:"heading__icon",children:jsxRuntimeExports.jsx(BrowseGalleryIcon,{})})]}),jsxRuntimeExports.jsx(Relevance,{isSearchResult:tt})]}),LatestView=reactExports.memo(_View$1),Wrapper$9=styled$4(Flex)` .heading { @@ -7841,7 +7882,39 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } `;const CloseIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 32 32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"cancel",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1264_3381",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"32",height:"32",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1264_3381)",children:jsxRuntimeExports.jsx("path",{id:"cancel_2",d:"M16 17.4051L20.0975 21.5025C20.2821 21.6872 20.5141 21.7816 20.7936 21.7859C21.0731 21.7902 21.3094 21.6957 21.5025 21.5025C21.6957 21.3094 21.7923 21.0752 21.7923 20.8C21.7923 20.5248 21.6957 20.2906 21.5025 20.0975L17.4051 16L21.5025 11.9025C21.6872 11.7179 21.7816 11.4859 21.7859 11.2064C21.7902 10.9269 21.6957 10.6906 21.5025 10.4975C21.3094 10.3043 21.0752 10.2077 20.8 10.2077C20.5248 10.2077 20.2906 10.3043 20.0975 10.4975L16 14.5949L11.9025 10.4975C11.7179 10.3129 11.4859 10.2184 11.2064 10.2141C10.9269 10.2099 10.6906 10.3043 10.4975 10.4975C10.3043 10.6906 10.2077 10.9248 10.2077 11.2C10.2077 11.4752 10.3043 11.7094 10.4975 11.9025L14.5949 16L10.4975 20.0975C10.3129 20.2821 10.2184 20.5141 10.2141 20.7936C10.2099 21.0731 10.3043 21.3094 10.4975 21.5025C10.6906 21.6957 10.9248 21.7923 11.2 21.7923C11.4752 21.7923 11.7094 21.6957 11.9025 21.5025L16 17.4051ZM16.0022 28.6666C14.2503 28.6666 12.6036 28.3342 11.0621 27.6693C9.52057 27.0044 8.17966 26.1021 7.03937 24.9623C5.89906 23.8225 4.99632 22.4822 4.33114 20.9413C3.66596 19.4005 3.33337 17.7542 3.33337 16.0022C3.33337 14.2503 3.66582 12.6036 4.33071 11.0621C4.9956 9.52057 5.89793 8.17967 7.03771 7.03938C8.17751 5.89907 9.51783 4.99632 11.0587 4.33114C12.5995 3.66596 14.2459 3.33337 15.9978 3.33337C17.7497 3.33337 19.3964 3.66582 20.9379 4.33071C22.4794 4.9956 23.8204 5.89793 24.9606 7.03771C26.101 8.17751 27.0037 9.51783 27.6689 11.0587C28.3341 12.5995 28.6666 14.2459 28.6666 15.9978C28.6666 17.7497 28.3342 19.3964 27.6693 20.9379C27.0044 22.4794 26.1021 23.8204 24.9623 24.9606C23.8225 26.101 22.4822 27.0037 20.9413 27.6689C19.4005 28.3341 17.7542 28.6666 16.0022 28.6666Z",fill:"currentColor"})})]})}),TextType=()=>{const tt=useSelectedNode();return jsxRuntimeExports.jsx(Flex,{align:"center",justify:"center",p:12,children:jsxRuntimeExports.jsx(Text$3,{color:"primaryText1",kind:"regular",children:tt==null?void 0:tt.text})})};var bundle=function(tt){var et={};function nt(rt){if(et[rt])return et[rt].exports;var it=et[rt]={i:rt,l:!1,exports:{}};return tt[rt].call(it.exports,it,it.exports,nt),it.l=!0,it.exports}return nt.m=tt,nt.c=et,nt.d=function(rt,it,ot){nt.o(rt,it)||Object.defineProperty(rt,it,{enumerable:!0,get:ot})},nt.r=function(rt){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(rt,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(rt,"__esModule",{value:!0})},nt.t=function(rt,it){if(1&it&&(rt=nt(rt)),8&it||4&it&&typeof rt=="object"&&rt&&rt.__esModule)return rt;var ot=Object.create(null);if(nt.r(ot),Object.defineProperty(ot,"default",{enumerable:!0,value:rt}),2&it&&typeof rt!="string")for(var at in rt)nt.d(ot,at,(function(st){return rt[st]}).bind(null,at));return ot},nt.n=function(rt){var it=rt&&rt.__esModule?function(){return rt.default}:function(){return rt};return nt.d(it,"a",it),it},nt.o=function(rt,it){return Object.prototype.hasOwnProperty.call(rt,it)},nt.p="",nt(nt.s=2)}([function(tt,et){tt.exports=propTypesExports},function(tt,et){tt.exports=reactExports},function(module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),(function(module){var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),prop_types__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(0),prop_types__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__),enterModule;function _typeof(tt){return(_typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(et){return typeof et}:function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et})(tt)}function _extends(){return(_extends=Object.assign||function(tt){for(var et=1;et"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function _getPrototypeOf(tt){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(et){return et.__proto__||Object.getPrototypeOf(et)})(tt)}function _defineProperty(tt,et,nt){return et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}enterModule=typeof reactHotLoaderGlobal<"u"?reactHotLoaderGlobal.enterModule:void 0,enterModule&&enterModule(module),typeof reactHotLoaderGlobal<"u"&&reactHotLoaderGlobal.default.signature;var ReactAudioPlayer=function(_Component){_inherits(ReactAudioPlayer,_Component);var _super=_createSuper(ReactAudioPlayer);function ReactAudioPlayer(){var tt;_classCallCheck(this,ReactAudioPlayer);for(var et=arguments.length,nt=new Array(et),rt=0;rt{const[et,nt,rt]=tt.split(":"),it=parseInt(et,10),ot=parseInt(nt,10),at=parseInt(rt,10);return it*3600+ot*60+at},Audio=styled$4(ReactAudioPlayer)` width: 100%; -`,_AudioPlayer=({mediaUrl:tt,timestamp:et,play:nt,onLoaded:rt=lodashExports.noop,onError:it=lodashExports.noop,onPause:ot=lodashExports.noop,onPlay:at=lodashExports.noop})=>{const[st,lt]=reactExports.useState(!1),[ct,ut]=reactExports.useState(null);return reactExports.useEffect(()=>{lodashExports.isUndefined(nt)||!ct||(nt?ct.play():ct.pause())},[nt,ct]),reactExports.useEffect(()=>{const ht=document.getElementById("audio-player");ht&&ut(ht)},[]),reactExports.useEffect(()=>{if(ct)return ct.addEventListener("play",at),ct.addEventListener("pause",ot),()=>{ct.removeEventListener("play",at),ct.removeEventListener("pause",ot)}},[ot,at,ct]),reactExports.useEffect(()=>()=>{ot()},[ot]),reactExports.useEffect(()=>{ot()},[tt,ot]),reactExports.useEffect(()=>{ct&&(ct.currentTime=et?videoTimetoSeconds(et):0)},[et,ct]),jsxRuntimeExports.jsx(Flex,{children:st?jsxRuntimeExports.jsx(Text$3,{color:"primaryRed",kind:"medium",children:"Audio failed to load"}):jsxRuntimeExports.jsx(Audio,{controls:!0,id:"audio-player",onError:()=>{lt(!0),it()},onLoadedMetadata:()=>{lt(!1),rt()},src:tt,volume:1})})},AudioPlayer=reactExports.memo(_AudioPlayer),defaultData={isPlaying:!1},usePlayerStore=react(tt=>({...defaultData,setIsPlaying:et=>tt({isPlaying:et})})),CopyIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"content_copy",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1489_75628",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"14",height:"14",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1489_75628)",children:jsxRuntimeExports.jsx("path",{id:"content_copy_2",d:"M5.28363 10.2083C4.98897 10.2083 4.73956 10.1063 4.5354 9.9021C4.33124 9.69793 4.22915 9.44852 4.22915 9.15385V2.51287C4.22915 2.21821 4.33124 1.96879 4.5354 1.76462C4.73956 1.56046 4.98897 1.45837 5.28363 1.45837H10.1746C10.4693 1.45837 10.7187 1.56046 10.9229 1.76462C11.127 1.96879 11.2291 2.21821 11.2291 2.51287V9.15385C11.2291 9.44852 11.127 9.69793 10.9229 9.9021C10.7187 10.1063 10.4693 10.2083 10.1746 10.2083H5.28363ZM5.28363 9.33336H10.1746C10.2195 9.33336 10.2606 9.31466 10.298 9.27727C10.3354 9.23987 10.3541 9.19873 10.3541 9.15385V2.51287C10.3541 2.46799 10.3354 2.42685 10.298 2.38945C10.2606 2.35206 10.2195 2.33336 10.1746 2.33336H5.28363C5.23875 2.33336 5.19762 2.35206 5.16023 2.38945C5.12282 2.42685 5.10412 2.46799 5.10412 2.51287V9.15385C5.10412 9.19873 5.12282 9.23987 5.16023 9.27727C5.19762 9.31466 5.23875 9.33336 5.28363 9.33336ZM3.24198 12.25C2.94733 12.25 2.69792 12.1479 2.49375 11.9437C2.28958 11.7396 2.1875 11.4902 2.1875 11.1955V3.67953H3.06249V11.1955C3.06249 11.2404 3.08118 11.2815 3.11857 11.3189C3.15597 11.3563 3.19711 11.375 3.24198 11.375H9.00796V12.25H3.24198Z",fill:"currentColor"})})]})}),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"})})]})}),copyNodeText=tt=>{if(tt===void 0)return;navigator.clipboard.writeText(tt);const et=document.querySelector(".copy-button");et&&(et.classList.add("copied"),setTimeout(()=>{et.classList.remove("copied")},1e3))},Transcript=({stateless:tt,node:et})=>{const[nt,rt]=useAppStore(it=>[it.transcriptIsOpen,it.setTranscriptOpen]);return!tt&&!nt?null:jsxRuntimeExports.jsxs(Flex,{grow:1,shrink:1,children:[jsxRuntimeExports.jsxs(Header,{children:[tt&&jsxRuntimeExports.jsxs(Heading$1,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(NotesIcon,{})}),jsxRuntimeExports.jsx("div",{className:"title",children:"Transcript"})]}),et!=null&&et.text?jsxRuntimeExports.jsx(Button$2,{endIcon:jsxRuntimeExports.jsx(CopyIcon,{}),onPointerDown:()=>copyNodeText(et==null?void 0:et.text),size:"small",variant:"outlined",children:"Copy"}):jsxRuntimeExports.jsx("div",{}),!tt&&jsxRuntimeExports.jsx(CloseButton$1,{onClick:()=>{rt(!1)},children:jsxRuntimeExports.jsx(MdClose,{fontSize:35})})]}),jsxRuntimeExports.jsx(ScrollWrapper$2,{children:jsxRuntimeExports.jsx(Box,{children:et!=null&&et.text?`"${et==null?void 0:et.text}"`:"..."})})]})},ScrollWrapper$2=styled$4(Flex)(()=>({overflow:"auto",flex:1,width:"100%"})),Heading$1=styled$4(Flex).attrs({direction:"row",align:"center"})` +`,_AudioPlayer=({mediaUrl:tt,timestamp:et,play:nt,onLoaded:rt=lodashExports.noop,onError:it=lodashExports.noop,onPause:ot=lodashExports.noop,onPlay:at=lodashExports.noop})=>{const[st,lt]=reactExports.useState(!1),[ct,ut]=reactExports.useState(null);return reactExports.useEffect(()=>{lodashExports.isUndefined(nt)||!ct||(nt?ct.play():ct.pause())},[nt,ct]),reactExports.useEffect(()=>{const ht=document.getElementById("audio-player");ht&&ut(ht)},[]),reactExports.useEffect(()=>{if(ct)return ct.addEventListener("play",at),ct.addEventListener("pause",ot),()=>{ct.removeEventListener("play",at),ct.removeEventListener("pause",ot)}},[ot,at,ct]),reactExports.useEffect(()=>()=>{ot()},[ot]),reactExports.useEffect(()=>{ot()},[tt,ot]),reactExports.useEffect(()=>{ct&&(ct.currentTime=et?videoTimetoSeconds(et):0)},[et,ct]),jsxRuntimeExports.jsx(Flex,{children:st?jsxRuntimeExports.jsx(Text$3,{color:"primaryRed",kind:"medium",children:"Audio failed to load"}):jsxRuntimeExports.jsx(Audio,{controls:!0,id:"audio-player",onError:()=>{lt(!0),it()},onLoadedMetadata:()=>{lt(!1),rt()},src:tt,volume:1})})},AudioPlayer=reactExports.memo(_AudioPlayer);var ClipLoader$1={},unitConverter={};Object.defineProperty(unitConverter,"__esModule",{value:!0});unitConverter.cssValue=unitConverter.parseLengthAndUnit=void 0;var cssUnit={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function parseLengthAndUnit(tt){if(typeof tt=="number")return{value:tt,unit:"px"};var et,nt=(tt.match(/^[0-9.]*/)||"").toString();nt.includes(".")?et=parseFloat(nt):et=parseInt(nt,10);var rt=(tt.match(/[^0-9]*$/)||"").toString();return cssUnit[rt]?{value:et,unit:rt}:(console.warn("React Spinners: ".concat(tt," is not a valid css value. Defaulting to ").concat(et,"px.")),{value:et,unit:"px"})}unitConverter.parseLengthAndUnit=parseLengthAndUnit;function cssValue(tt){var et=parseLengthAndUnit(tt);return"".concat(et.value).concat(et.unit)}unitConverter.cssValue=cssValue;var animation={};Object.defineProperty(animation,"__esModule",{value:!0});animation.createAnimation=void 0;var createAnimation=function(tt,et,nt){var rt="react-spinners-".concat(tt,"-").concat(nt);if(typeof window>"u"||!window.document)return rt;var it=document.createElement("style");document.head.appendChild(it);var ot=it.sheet,at=` + @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"})` + .icon { + font-size: 16px; + color: ${colors.GRAY3}; + margin-right: 7px; + } + + .title { + color: ${colors.white}; + font-family: Barlow; + font-size: 10px; + font-style: normal; + font-weight: 700; + line-height: normal; + letter-spacing: 1px; + text-transform: uppercase; + } +`,Header$1=styled$4(Flex).attrs({direction:"row",align:"center",justify:"space-between"})` + margin-bottom: 18px; +`,Box$1=styled$4(Flex)` + color: ${colors.white}; + text-overflow: ellipsis; + whitespace: nowrap; + font-family: Barlow; + font-size: 13px; + font-style: normal; + font-weight: 400; + line-height: 18px; +`,CopyIcon=tt=>jsxRuntimeExports.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 14 14",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntimeExports.jsxs("g",{id:"content_copy",children:[jsxRuntimeExports.jsx("mask",{id:"mask0_1489_75628",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"14",height:"14",children:jsxRuntimeExports.jsx("rect",{id:"Bounding box",width:"1em",height:"1em",fill:"currentColor"})}),jsxRuntimeExports.jsx("g",{mask:"url(#mask0_1489_75628)",children:jsxRuntimeExports.jsx("path",{id:"content_copy_2",d:"M5.28363 10.2083C4.98897 10.2083 4.73956 10.1063 4.5354 9.9021C4.33124 9.69793 4.22915 9.44852 4.22915 9.15385V2.51287C4.22915 2.21821 4.33124 1.96879 4.5354 1.76462C4.73956 1.56046 4.98897 1.45837 5.28363 1.45837H10.1746C10.4693 1.45837 10.7187 1.56046 10.9229 1.76462C11.127 1.96879 11.2291 2.21821 11.2291 2.51287V9.15385C11.2291 9.44852 11.127 9.69793 10.9229 9.9021C10.7187 10.1063 10.4693 10.2083 10.1746 10.2083H5.28363ZM5.28363 9.33336H10.1746C10.2195 9.33336 10.2606 9.31466 10.298 9.27727C10.3354 9.23987 10.3541 9.19873 10.3541 9.15385V2.51287C10.3541 2.46799 10.3354 2.42685 10.298 2.38945C10.2606 2.35206 10.2195 2.33336 10.1746 2.33336H5.28363C5.23875 2.33336 5.19762 2.35206 5.16023 2.38945C5.12282 2.42685 5.10412 2.46799 5.10412 2.51287V9.15385C5.10412 9.19873 5.12282 9.23987 5.16023 9.27727C5.19762 9.31466 5.23875 9.33336 5.28363 9.33336ZM3.24198 12.25C2.94733 12.25 2.69792 12.1479 2.49375 11.9437C2.28958 11.7396 2.1875 11.4902 2.1875 11.1955V3.67953H3.06249V11.1955C3.06249 11.2404 3.08118 11.2815 3.11857 11.3189C3.15597 11.3563 3.19711 11.375 3.24198 11.375H9.00796V12.25H3.24198Z",fill:"currentColor"})})]})}),copyNodeText=tt=>{if(tt===void 0)return;navigator.clipboard.writeText(tt);const et=document.querySelector(".copy-button");et&&(et.classList.add("copied"),setTimeout(()=>{et.classList.remove("copied")},1e3))},Transcript=({stateless:tt,node:et})=>{const[nt,rt]=useAppStore(it=>[it.transcriptIsOpen,it.setTranscriptOpen]);return!tt&&!nt?null:jsxRuntimeExports.jsxs(Flex,{grow:1,shrink:1,children:[jsxRuntimeExports.jsxs(Header,{children:[tt&&jsxRuntimeExports.jsxs(Heading$1,{children:[jsxRuntimeExports.jsx("div",{className:"icon",children:jsxRuntimeExports.jsx(NotesIcon,{})}),jsxRuntimeExports.jsx("div",{className:"title",children:"Transcript"})]}),et!=null&&et.text?jsxRuntimeExports.jsx(Button$2,{endIcon:jsxRuntimeExports.jsx(CopyIcon,{}),onPointerDown:()=>copyNodeText(et==null?void 0:et.text),size:"small",variant:"outlined",children:"Copy"}):jsxRuntimeExports.jsx("div",{}),!tt&&jsxRuntimeExports.jsx(CloseButton$1,{onClick:()=>{rt(!1)},children:jsxRuntimeExports.jsx(MdClose,{fontSize:35})})]}),jsxRuntimeExports.jsx(Box,{children:et!=null&&et.text?`"${et==null?void 0:et.text}"`:"..."})]})},Heading$1=styled$4(Flex).attrs({direction:"row",align:"center"})` .icon { font-size: 16px; color: ${colors.GRAY3}; @@ -7884,15 +7957,22 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho z-index: 0; `,PlayerWrapper$1=styled$4(Flex)` padding: 30px 18px 0; -`,TranscriptWrapper$1=styled$4(Flex)` - padding: 0 18px 18px; +`,StyledDivider$1=styled$4(Divider$3)` + margin: auto 0px 2px 0px; + opacity: 75%; `,StyledEpisode$1=styled$4(Episode)` & { border-top: none; padding-bottom: 18px; font-size: 16px; } -`,_AudioClip=()=>{const tt=useSelectedNode(),et=useIsMatchBreakpoint("sm","down"),nt=usePlayerStore(gt=>gt.isPlaying),rt=usePlayerStore(gt=>gt.setIsPlaying),{image_url:it,description:ot,date:at,boost:st,type:lt,id:ct,episode_title:ut}=tt||{};reactExports.useEffect(()=>()=>{rt(!1)},[rt]);const ht=reactExports.useCallback(()=>{setIsTimestampLoaded(!0)},[]),dt=reactExports.useCallback(()=>{setIsTimestampLoaded(!0)},[]),pt=reactExports.useCallback(()=>rt(!1),[rt]),mt=reactExports.useCallback(()=>rt(!0),[rt]);return jsxRuntimeExports.jsxs(Wrapper$8,{children:[jsxRuntimeExports.jsxs(PlayerWrapper$1,{children:[jsxRuntimeExports.jsx(Flex,{direction:"row",children:jsxRuntimeExports.jsx(Flex,{direction:"row",grow:1,justify:"center",shrink:1,children:jsxRuntimeExports.jsx(Avatar$1,{size:et?45:188,src:(tt==null?void 0:tt.image_url)||"audio_default.svg",type:"audio"})})}),jsxRuntimeExports.jsx(Flex,{pt:10,children:jsxRuntimeExports.jsx(AudioPlayer,{mediaUrl:(tt==null?void 0:tt.link)||"",onError:ht,onLoaded:dt,onPause:pt,onPlay:mt,play:nt,timestamp:(tt==null?void 0:tt.timestamp)||""})})]}),jsxRuntimeExports.jsx(StyledEpisode$1,{boostCount:st||0,date:at||0,description:formatDescription(ot),id:ct,imageUrl:it||"audio_default.svg",isSelectedView:!0,onClick:()=>null,title:ut,type:lt}),jsxRuntimeExports.jsx(TranscriptWrapper$1,{grow:1,shrink:1,children:jsxRuntimeExports.jsx(Transcript,{node:tt,stateless:!0})})]})},AudioClip=reactExports.memo(_AudioClip),Divider=styled$4(Flex)` +`,_AudioClip=()=>{const tt=useSelectedNode(),et=useIsMatchBreakpoint("sm","down"),nt=usePlayerStore(xt=>xt.isPlaying),rt=usePlayerStore(xt=>xt.setIsPlaying),it=reactExports.useRef(null),{image_url:ot,show_title:at,date:st,boost:lt,type:ct,id:ut,ref_id:ht,episode_title:dt}=tt||{},[pt,mt]=reactExports.useState(lt||0);reactExports.useEffect(()=>()=>{rt(!1),it.current&&it.current.scrollTo({top:0,behavior:"auto"})},[rt]);const gt=reactExports.useCallback(()=>{setIsTimestampLoaded(!0)},[]),yt=reactExports.useCallback(()=>{setIsTimestampLoaded(!0)},[]),bt=reactExports.useCallback(()=>rt(!1),[rt]),vt=reactExports.useCallback(()=>rt(!0),[rt]);return jsxRuntimeExports.jsxs(Wrapper$8,{children:[jsxRuntimeExports.jsxs(PlayerWrapper$1,{children:[jsxRuntimeExports.jsx(Flex,{direction:"row",children:jsxRuntimeExports.jsx(Flex,{direction:"row",grow:1,justify:"center",shrink:1,children:jsxRuntimeExports.jsx(Avatar$1,{size:et?45:188,src:(tt==null?void 0:tt.image_url)||"audio_default.svg",type:"audio"})})}),jsxRuntimeExports.jsx(Flex,{pt:10,children:jsxRuntimeExports.jsx(AudioPlayer,{mediaUrl:(tt==null?void 0:tt.link)||"",onError:gt,onLoaded:yt,onPause:bt,onPlay:vt,play:nt,timestamp:(tt==null?void 0:tt.timestamp)||""})})]}),jsxRuntimeExports.jsx(StyledEpisode$1,{boostCount:lt||0,date:st||0,episodeTitle:formatDescription(dt),id:ut,imageUrl:ot||"audio_default.svg",isSelectedView:!0,onClick:()=>null,showTitle:formatDescription(at),type:ct}),jsxRuntimeExports.jsx(StyledDivider$1,{}),jsxRuntimeExports.jsxs("div",{ref:it,style:{overflow:"auto",flex:1,width:"100%"},children:[jsxRuntimeExports.jsxs(BoostWrapper$1,{children:[jsxRuntimeExports.jsx(BoostAmt,{amt:pt}),jsxRuntimeExports.jsx(Booster,{content:tt,count:pt,refId:ht,updateCount:mt})]}),jsxRuntimeExports.jsx(StyledDivider$1,{}),jsxRuntimeExports.jsx(TextWrapper$1,{children:jsxRuntimeExports.jsx(Description,{node:tt,stateless:!0})}),jsxRuntimeExports.jsx(StyledDivider$1,{}),jsxRuntimeExports.jsx(TextWrapper$1,{children:jsxRuntimeExports.jsx(Transcript,{node:tt,stateless:!0})})]})]})},AudioClip=reactExports.memo(_AudioClip),BoostWrapper$1=styled$4(Flex)` + flex-direction: row; + justify-content: space-between; + padding: 18px 18px 18px; +`,TextWrapper$1=styled$4(Flex)` + padding: 18px 18px 18px; +`,Divider=styled$4(Flex)` background: ${colors.divider2}; height: 1px; margin: auto 22px; @@ -7902,11 +7982,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `,ErrorMsgWrapper=styled$4.textarea` resize: none; margin-bottom: 5px; -`,ErrorSection=()=>{const tt=useSelectedNode(),[et,nt]=reactExports.useState(""),[rt,it]=reactExports.useState(""),ot=useAppStore(st=>st.setFlagErrorOpen),at=async()=>{const st={content_node_ref_id:tt==null?void 0:tt.ref_id,message:et};await distExports$1.enable(!0)||console.warn("Sphinx enable failed");try{const ct=await api.post("/prediction/feedback",JSON.stringify(st));if(ct.error){const{message:ut}=ct.error;throw new Error(ut)}nt(""),it("Sent successfully")}catch(ct){ct instanceof Error&&it(ct.message||"Failed to send")}};return reactExports.useEffect(()=>{et||it("")},[et]),jsxRuntimeExports.jsxs(ErrorWrapper,{children:[jsxRuntimeExports.jsx(Flex,{align:"center",justify:"center",p:6,children:jsxRuntimeExports.jsx(Text$3,{color:"white",kind:"medium",children:"Report Error"})}),jsxRuntimeExports.jsx(ErrorMsgWrapper,{cols:1,onChange:st=>{const{value:lt}=st.target;nt(lt)},placeholder:"flag incorrect information (misspelled words, etc)",rows:10,value:et}),jsxRuntimeExports.jsxs(Flex,{direction:"row",justify:"flex-end",p:8,children:[rt&&jsxRuntimeExports.jsx(Flex,{justify:"center",pb:3,style:{color:rt==="Sent successfully"?colors.green400:"#FF8F80",marginRight:"20px"},children:rt}),jsxRuntimeExports.jsx(Pill,{disabled:!et,onClick:at,children:"Send"}),jsxRuntimeExports.jsx(Pill,{onClick:()=>{ot(!1),nt("")},children:"Cancel"})]})]})};var ClipLoader$1={},unitConverter={};Object.defineProperty(unitConverter,"__esModule",{value:!0});unitConverter.cssValue=unitConverter.parseLengthAndUnit=void 0;var cssUnit={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function parseLengthAndUnit(tt){if(typeof tt=="number")return{value:tt,unit:"px"};var et,nt=(tt.match(/^[0-9.]*/)||"").toString();nt.includes(".")?et=parseFloat(nt):et=parseInt(nt,10);var rt=(tt.match(/[^0-9]*$/)||"").toString();return cssUnit[rt]?{value:et,unit:rt}:(console.warn("React Spinners: ".concat(tt," is not a valid css value. Defaulting to ").concat(et,"px.")),{value:et,unit:"px"})}unitConverter.parseLengthAndUnit=parseLengthAndUnit;function cssValue(tt){var et=parseLengthAndUnit(tt);return"".concat(et.value).concat(et.unit)}unitConverter.cssValue=cssValue;var animation={};Object.defineProperty(animation,"__esModule",{value:!0});animation.createAnimation=void 0;var createAnimation=function(tt,et,nt){var rt="react-spinners-".concat(tt,"-").concat(nt);if(typeof window>"u"||!window.document)return rt;var it=document.createElement("style");document.head.appendChild(it);var ot=it.sheet,at=` - @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){await boostAgainstBudget(et);const nt={amount:et,refid:tt};return api.post("/boost",JSON.stringify(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);reactExports.useEffect(()=>{lt(!1),at(!1)},[it]);let{image_url:ct}=nt||{};ct&&(ct=ct.replace(".jpg","_l.jpg"));const ut=5;async function ht(){if(!(ot||!it)){at(!0);try{await boost(it,ut),lt(!0),notify(BOOST_SUCCESS),et&&et(tt+ut)}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 ht()},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"})]})})})},FlagError=styled$4(Flex)` +`,ErrorSection=()=>{const tt=useSelectedNode(),[et,nt]=reactExports.useState(""),[rt,it]=reactExports.useState(""),ot=useAppStore(st=>st.setFlagErrorOpen),at=async()=>{const st={content_node_ref_id:tt==null?void 0:tt.ref_id,message:et};await distExports$1.enable(!0)||console.warn("Sphinx enable failed");try{const ct=await api.post("/prediction/feedback",JSON.stringify(st));if(ct.error){const{message:ut}=ct.error;throw new Error(ut)}nt(""),it("Sent successfully")}catch(ct){ct instanceof Error&&it(ct.message||"Failed to send")}};return reactExports.useEffect(()=>{et||it("")},[et]),jsxRuntimeExports.jsxs(ErrorWrapper,{children:[jsxRuntimeExports.jsx(Flex,{align:"center",justify:"center",p:6,children:jsxRuntimeExports.jsx(Text$3,{color:"white",kind:"medium",children:"Report Error"})}),jsxRuntimeExports.jsx(ErrorMsgWrapper,{cols:1,onChange:st=>{const{value:lt}=st.target;nt(lt)},placeholder:"flag incorrect information (misspelled words, etc)",rows:10,value:et}),jsxRuntimeExports.jsxs(Flex,{direction:"row",justify:"flex-end",p:8,children:[rt&&jsxRuntimeExports.jsx(Flex,{justify:"center",pb:3,style:{color:rt==="Sent successfully"?colors.green400:"#FF8F80",marginRight:"20px"},children:rt}),jsxRuntimeExports.jsx(Pill,{disabled:!et,onClick:at,children:"Send"}),jsxRuntimeExports.jsx(Pill,{onClick:()=>{ot(!1),nt("")},children:"Cancel"})]})]})},FlagError=styled$4(Flex)` color: ${({flagErrorIsOpen:tt})=>tt?colors.lightBlue200:colors.white}; padding: 0 0 0 8px; &:hover { @@ -8037,7 +8113,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ot=!0,at=!1,st;return{s:function(){nt=tt[Symbol.iterator]()},n:function(){var ct=nt.next();return ot=ct.done,ct},e:function(ct){at=!0,st=ct},f:function(){try{!ot&&nt.return!=null&&nt.return()}finally{if(at)throw st}}}}function _unsupportedIterableToArray$1(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray$1(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray$1(tt,et)}}function _arrayLikeToArray$1(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);ntzt.length)&&(Ft=zt.length);for(var Nt=0,Ut=new Array(Ft);Nt"u"||!(Symbol.iterator in Object(zt)))){var Nt=[],Ut=!0,Mt=!1,Ht=void 0;try{for(var en=zt[Symbol.iterator](),sn;!(Ut=(sn=en.next()).done)&&(Nt.push(sn.value),!(Ft&&Nt.length===Ft));Ut=!0);}catch(Kt){Mt=!0,Ht=Kt}finally{try{!Ut&&en.return!=null&&en.return()}finally{if(Mt)throw Ht}}return Nt}}function mt(zt){if(Array.isArray(zt))return zt}function gt(zt,Ft){if(!(zt instanceof Ft))throw new TypeError("Cannot call a class as a function")}function yt(zt,Ft){for(var Nt=0;Nt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Et(zt){return Et=Object.setPrototypeOf?Object.getPrototypeOf:function(Nt){return Nt.__proto__||Object.getPrototypeOf(Nt)},Et(zt)}function $t(zt,Ft,Nt){return Ft in zt?Object.defineProperty(zt,Ft,{value:Nt,enumerable:!0,configurable:!0,writable:!0}):zt[Ft]=Nt,zt}var Dt="https://www.youtube.com/iframe_api",jt="YT",Pt="onYouTubeIframeAPIReady",Ct=/[?&](?:list|channel)=([a-zA-Z0-9_-]+)/,wt=/user\/([a-zA-Z0-9_-]+)\/?/,It=/youtube-nocookie\.com/,Ot="https://www.youtube-nocookie.com",Wt=function(zt){vt(Nt,zt);var Ft=kt(Nt);function Nt(){var Ut;gt(this,Nt);for(var Mt=arguments.length,Ht=new Array(Mt),en=0;en1&&arguments[1]!==void 0?arguments[1]:!1;this.callPlayer("seekTo",Mt),!Ht&&!this.props.playing&&this.pause()}},{key:"setVolume",value:function(Mt){this.callPlayer("setVolume",Mt*100)}},{key:"setPlaybackRate",value:function(Mt){this.callPlayer("setPlaybackRate",Mt)}},{key:"setLoop",value:function(Mt){this.callPlayer("setLoop",Mt)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}},{key:"render",value:function(){var Mt=this.props.display,Ht={width:"100%",height:"100%",display:Mt};return nt.default.createElement("div",{style:Ht},nt.default.createElement("div",{ref:this.ref}))}}]),Nt}(nt.Component);tt.default=Wt,$t(Wt,"displayName","YouTube"),$t(Wt,"canPlay",it.canPlay.youtube)}(YouTube$1)),YouTube$1}var SoundCloud={},hasRequiredSoundCloud;function requireSoundCloud(){return hasRequiredSoundCloud||(hasRequiredSoundCloud=1,function(tt){function et(At){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function($t){return typeof $t}:et=function($t){return $t&&typeof Symbol=="function"&&$t.constructor===Symbol&&$t!==Symbol.prototype?"symbol":typeof $t},et(At)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var At=new WeakMap;return ot=function(){return At},At}function at(At){if(At&&At.__esModule)return At;if(At===null||et(At)!=="object"&&typeof At!="function")return{default:At};var Et=ot();if(Et&&Et.has(At))return Et.get(At);var $t={},Dt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var jt in At)if(Object.prototype.hasOwnProperty.call(At,jt)){var Pt=Dt?Object.getOwnPropertyDescriptor(At,jt):null;Pt&&(Pt.get||Pt.set)?Object.defineProperty($t,jt,Pt):$t[jt]=At[jt]}return $t.default=At,Et&&Et.set(At,$t),$t}function st(At,Et){var $t=Object.keys(At);if(Object.getOwnPropertySymbols){var Dt=Object.getOwnPropertySymbols(At);Et&&(Dt=Dt.filter(function(jt){return Object.getOwnPropertyDescriptor(At,jt).enumerable})),$t.push.apply($t,Dt)}return $t}function lt(At){for(var Et=1;Et"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function vt(At){return vt=Object.setPrototypeOf?Object.getPrototypeOf:function($t){return $t.__proto__||Object.getPrototypeOf($t)},vt(At)}function xt(At,Et,$t){return Et in At?Object.defineProperty(At,Et,{value:$t,enumerable:!0,configurable:!0,writable:!0}):At[Et]=$t,At}var kt="https://w.soundcloud.com/player/api.js",St="SC",Tt=function(At){dt($t,At);var Et=mt($t);function $t(){var Dt;ct(this,$t);for(var jt=arguments.length,Pt=new Array(jt),Ct=0;Ct1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("seekTo",jt*1e3),Pt||this.pause()}},{key:"setVolume",value:function(jt){this.callPlayer("setVolume",jt*100)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.fractionLoaded*this.duration}},{key:"render",value:function(){var jt=this.props.display,Pt={width:"100%",height:"100%",display:jt};return nt.default.createElement("iframe",{ref:this.ref,src:"https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),style:Pt,frameBorder:0,allow:"autoplay"})}}]),$t}(nt.Component);tt.default=Tt,xt(Tt,"displayName","SoundCloud"),xt(Tt,"canPlay",it.canPlay.soundcloud),xt(Tt,"loopOnEnded",!0)}(SoundCloud)),SoundCloud}var Vimeo={},hasRequiredVimeo;function requireVimeo(){return hasRequiredVimeo||(hasRequiredVimeo=1,function(tt){function et(Et){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(Dt){return typeof Dt}:et=function(Dt){return Dt&&typeof Symbol=="function"&&Dt.constructor===Symbol&&Dt!==Symbol.prototype?"symbol":typeof Dt},et(Et)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var Et=new WeakMap;return ot=function(){return Et},Et}function at(Et){if(Et&&Et.__esModule)return Et;if(Et===null||et(Et)!=="object"&&typeof Et!="function")return{default:Et};var $t=ot();if($t&&$t.has(Et))return $t.get(Et);var Dt={},jt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Pt in Et)if(Object.prototype.hasOwnProperty.call(Et,Pt)){var Ct=jt?Object.getOwnPropertyDescriptor(Et,Pt):null;Ct&&(Ct.get||Ct.set)?Object.defineProperty(Dt,Pt,Ct):Dt[Pt]=Et[Pt]}return Dt.default=Et,$t&&$t.set(Et,Dt),Dt}function st(Et,$t){var Dt=Object.keys(Et);if(Object.getOwnPropertySymbols){var jt=Object.getOwnPropertySymbols(Et);$t&&(jt=jt.filter(function(Pt){return Object.getOwnPropertyDescriptor(Et,Pt).enumerable})),Dt.push.apply(Dt,jt)}return Dt}function lt(Et){for(var $t=1;$t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function vt(Et){return vt=Object.setPrototypeOf?Object.getPrototypeOf:function(Dt){return Dt.__proto__||Object.getPrototypeOf(Dt)},vt(Et)}function xt(Et,$t,Dt){return $t in Et?Object.defineProperty(Et,$t,{value:Dt,enumerable:!0,configurable:!0,writable:!0}):Et[$t]=Dt,Et}var kt="https://player.vimeo.com/api/player.js",St="Vimeo",Tt=function($t){return $t.replace("/manage/videos","")},At=function(Et){dt(Dt,Et);var $t=mt(Dt);function Dt(){var jt;ct(this,Dt);for(var Pt=arguments.length,Ct=new Array(Pt),wt=0;wt1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("setCurrentTime",Pt),Ct||this.pause()}},{key:"setVolume",value:function(Pt){this.callPlayer("setVolume",Pt)}},{key:"setMuted",value:function(Pt){this.callPlayer("setMuted",Pt)}},{key:"setLoop",value:function(Pt){this.callPlayer("setLoop",Pt)}},{key:"setPlaybackRate",value:function(Pt){this.callPlayer("setPlaybackRate",Pt)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var Pt=this.props.display,Ct={width:"100%",height:"100%",overflow:"hidden",display:Pt};return nt.default.createElement("div",{key:this.props.url,ref:this.ref,style:Ct})}}]),Dt}(nt.Component);tt.default=At,xt(At,"displayName","Vimeo"),xt(At,"canPlay",it.canPlay.vimeo),xt(At,"forceLoad",!0)}(Vimeo)),Vimeo}var Facebook={},hasRequiredFacebook;function requireFacebook(){return hasRequiredFacebook||(hasRequiredFacebook=1,function(tt){function et(Et){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(Dt){return typeof Dt}:et=function(Dt){return Dt&&typeof Symbol=="function"&&Dt.constructor===Symbol&&Dt!==Symbol.prototype?"symbol":typeof Dt},et(Et)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var Et=new WeakMap;return ot=function(){return Et},Et}function at(Et){if(Et&&Et.__esModule)return Et;if(Et===null||et(Et)!=="object"&&typeof Et!="function")return{default:Et};var $t=ot();if($t&&$t.has(Et))return $t.get(Et);var Dt={},jt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Pt in Et)if(Object.prototype.hasOwnProperty.call(Et,Pt)){var Ct=jt?Object.getOwnPropertyDescriptor(Et,Pt):null;Ct&&(Ct.get||Ct.set)?Object.defineProperty(Dt,Pt,Ct):Dt[Pt]=Et[Pt]}return Dt.default=Et,$t&&$t.set(Et,Dt),Dt}function st(){return st=Object.assign||function(Et){for(var $t=1;$t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function bt(Et){return bt=Object.setPrototypeOf?Object.getPrototypeOf:function(Dt){return Dt.__proto__||Object.getPrototypeOf(Dt)},bt(Et)}function vt(Et,$t,Dt){return $t in Et?Object.defineProperty(Et,$t,{value:Dt,enumerable:!0,configurable:!0,writable:!0}):Et[$t]=Dt,Et}var xt="https://connect.facebook.net/en_US/sdk.js",kt="FB",St="fbAsyncInit",Tt="facebook-player-",At=function(Et){ht(Dt,Et);var $t=pt(Dt);function Dt(){var jt;lt(this,Dt);for(var Pt=arguments.length,Ct=new Array(Pt),wt=0;wt1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("seek",Pt),Ct||this.pause()}},{key:"setVolume",value:function(Pt){this.callPlayer("setVolume",Pt)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentPosition")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var Pt=this.props.config.attributes,Ct={width:"100%",height:"100%"};return nt.default.createElement("div",st({style:Ct,id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false"},Pt))}}]),Dt}(nt.Component);tt.default=At,vt(At,"displayName","Facebook"),vt(At,"canPlay",it.canPlay.facebook),vt(At,"loopOnEnded",!0)}(Facebook)),Facebook}var Streamable={},hasRequiredStreamable;function requireStreamable(){return hasRequiredStreamable||(hasRequiredStreamable=1,function(tt){function et(St){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(At){return typeof At}:et=function(At){return At&&typeof Symbol=="function"&&At.constructor===Symbol&&At!==Symbol.prototype?"symbol":typeof At},et(St)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var St=new WeakMap;return ot=function(){return St},St}function at(St){if(St&&St.__esModule)return St;if(St===null||et(St)!=="object"&&typeof St!="function")return{default:St};var Tt=ot();if(Tt&&Tt.has(St))return Tt.get(St);var At={},Et=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var $t in St)if(Object.prototype.hasOwnProperty.call(St,$t)){var Dt=Et?Object.getOwnPropertyDescriptor(St,$t):null;Dt&&(Dt.get||Dt.set)?Object.defineProperty(At,$t,Dt):At[$t]=St[$t]}return At.default=St,Tt&&Tt.set(St,At),At}function st(St,Tt){if(!(St instanceof Tt))throw new TypeError("Cannot call a class as a function")}function lt(St,Tt){for(var At=0;At"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function yt(St){return yt=Object.setPrototypeOf?Object.getPrototypeOf:function(At){return At.__proto__||Object.getPrototypeOf(At)},yt(St)}function bt(St,Tt,At){return Tt in St?Object.defineProperty(St,Tt,{value:At,enumerable:!0,configurable:!0,writable:!0}):St[Tt]=At,St}var vt="https://cdn.embed.ly/player-0.1.0.min.js",xt="playerjs",kt=function(St){ut(At,St);var Tt=dt(At);function At(){var Et;st(this,At);for(var $t=arguments.length,Dt=new Array($t),jt=0;jt<$t;jt++)Dt[jt]=arguments[jt];return Et=Tt.call.apply(Tt,[this].concat(Dt)),bt(mt(Et),"callPlayer",rt.callPlayer),bt(mt(Et),"duration",null),bt(mt(Et),"currentTime",null),bt(mt(Et),"secondsLoaded",null),bt(mt(Et),"mute",function(){Et.callPlayer("mute")}),bt(mt(Et),"unmute",function(){Et.callPlayer("unmute")}),bt(mt(Et),"ref",function(Pt){Et.iframe=Pt}),Et}return ct(At,[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function($t){var Dt=this;(0,rt.getSDK)(vt,xt).then(function(jt){Dt.iframe&&(Dt.player=new jt.Player(Dt.iframe),Dt.player.setLoop(Dt.props.loop),Dt.player.on("ready",Dt.props.onReady),Dt.player.on("play",Dt.props.onPlay),Dt.player.on("pause",Dt.props.onPause),Dt.player.on("seeked",Dt.props.onSeek),Dt.player.on("ended",Dt.props.onEnded),Dt.player.on("error",Dt.props.onError),Dt.player.on("timeupdate",function(Pt){var Ct=Pt.duration,wt=Pt.seconds;Dt.duration=Ct,Dt.currentTime=wt}),Dt.player.on("buffered",function(Pt){var Ct=Pt.percent;Dt.duration&&(Dt.secondsLoaded=Dt.duration*Ct)}),Dt.props.muted&&Dt.player.mute())},this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function($t){var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("setCurrentTime",$t),Dt||this.pause()}},{key:"setVolume",value:function($t){this.callPlayer("setVolume",$t*100)}},{key:"setLoop",value:function($t){this.callPlayer("setLoop",$t)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var $t=this.props.url.match(it.MATCH_URL_STREAMABLE)[1],Dt={width:"100%",height:"100%"};return nt.default.createElement("iframe",{ref:this.ref,src:"https://streamable.com/o/".concat($t),frameBorder:"0",scrolling:"no",style:Dt,allow:"encrypted-media; autoplay; fullscreen;"})}}]),At}(nt.Component);tt.default=kt,bt(kt,"displayName","Streamable"),bt(kt,"canPlay",it.canPlay.streamable)}(Streamable)),Streamable}var Wistia={},hasRequiredWistia;function requireWistia(){return hasRequiredWistia||(hasRequiredWistia=1,function(tt){function et(Et){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(Dt){return typeof Dt}:et=function(Dt){return Dt&&typeof Symbol=="function"&&Dt.constructor===Symbol&&Dt!==Symbol.prototype?"symbol":typeof Dt},et(Et)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var Et=new WeakMap;return ot=function(){return Et},Et}function at(Et){if(Et&&Et.__esModule)return Et;if(Et===null||et(Et)!=="object"&&typeof Et!="function")return{default:Et};var $t=ot();if($t&&$t.has(Et))return $t.get(Et);var Dt={},jt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Pt in Et)if(Object.prototype.hasOwnProperty.call(Et,Pt)){var Ct=jt?Object.getOwnPropertyDescriptor(Et,Pt):null;Ct&&(Ct.get||Ct.set)?Object.defineProperty(Dt,Pt,Ct):Dt[Pt]=Et[Pt]}return Dt.default=Et,$t&&$t.set(Et,Dt),Dt}function st(Et,$t){var Dt=Object.keys(Et);if(Object.getOwnPropertySymbols){var jt=Object.getOwnPropertySymbols(Et);$t&&(jt=jt.filter(function(Pt){return Object.getOwnPropertyDescriptor(Et,Pt).enumerable})),Dt.push.apply(Dt,jt)}return Dt}function lt(Et){for(var $t=1;$t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function vt(Et){return vt=Object.setPrototypeOf?Object.getPrototypeOf:function(Dt){return Dt.__proto__||Object.getPrototypeOf(Dt)},vt(Et)}function xt(Et,$t,Dt){return $t in Et?Object.defineProperty(Et,$t,{value:Dt,enumerable:!0,configurable:!0,writable:!0}):Et[$t]=Dt,Et}var kt="https://fast.wistia.com/assets/external/E-v1.js",St="Wistia",Tt="wistia-player-",At=function(Et){dt(Dt,Et);var $t=mt(Dt);function Dt(){var jt;ct(this,Dt);for(var Pt=arguments.length,Ct=new Array(Pt),wt=0;wt1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("time",Pt),Ct||this.pause()}},{key:"setVolume",value:function(Pt){this.callPlayer("volume",Pt)}},{key:"setPlaybackRate",value:function(Pt){this.callPlayer("playbackRate",Pt)}},{key:"getDuration",value:function(){return this.callPlayer("duration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("time")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var Pt=this.props.url,Ct=Pt&&Pt.match(it.MATCH_URL_WISTIA)[1],wt="wistia_embed wistia_async_".concat(Ct),It={width:"100%",height:"100%"};return nt.default.createElement("div",{id:this.playerID,key:Ct,className:wt,style:It})}}]),Dt}(nt.Component);tt.default=At,xt(At,"displayName","Wistia"),xt(At,"canPlay",it.canPlay.wistia),xt(At,"loopOnEnded",!0)}(Wistia)),Wistia}var Twitch={},hasRequiredTwitch;function requireTwitch(){return hasRequiredTwitch||(hasRequiredTwitch=1,function(tt){function et(Et){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(Dt){return typeof Dt}:et=function(Dt){return Dt&&typeof Symbol=="function"&&Dt.constructor===Symbol&&Dt!==Symbol.prototype?"symbol":typeof Dt},et(Et)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var Et=new WeakMap;return ot=function(){return Et},Et}function at(Et){if(Et&&Et.__esModule)return Et;if(Et===null||et(Et)!=="object"&&typeof Et!="function")return{default:Et};var $t=ot();if($t&&$t.has(Et))return $t.get(Et);var Dt={},jt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Pt in Et)if(Object.prototype.hasOwnProperty.call(Et,Pt)){var Ct=jt?Object.getOwnPropertyDescriptor(Et,Pt):null;Ct&&(Ct.get||Ct.set)?Object.defineProperty(Dt,Pt,Ct):Dt[Pt]=Et[Pt]}return Dt.default=Et,$t&&$t.set(Et,Dt),Dt}function st(Et,$t){var Dt=Object.keys(Et);if(Object.getOwnPropertySymbols){var jt=Object.getOwnPropertySymbols(Et);$t&&(jt=jt.filter(function(Pt){return Object.getOwnPropertyDescriptor(Et,Pt).enumerable})),Dt.push.apply(Dt,jt)}return Dt}function lt(Et){for(var $t=1;$t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function vt(Et){return vt=Object.setPrototypeOf?Object.getPrototypeOf:function(Dt){return Dt.__proto__||Object.getPrototypeOf(Dt)},vt(Et)}function xt(Et,$t,Dt){return $t in Et?Object.defineProperty(Et,$t,{value:Dt,enumerable:!0,configurable:!0,writable:!0}):Et[$t]=Dt,Et}var kt="https://player.twitch.tv/js/embed/v1.js",St="Twitch",Tt="twitch-player-",At=function(Et){dt(Dt,Et);var $t=mt(Dt);function Dt(){var jt;ct(this,Dt);for(var Pt=arguments.length,Ct=new Array(Pt),wt=0;wt1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("seek",Pt),Ct||this.pause()}},{key:"setVolume",value:function(Pt){this.callPlayer("setVolume",Pt)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var Pt={width:"100%",height:"100%"};return nt.default.createElement("div",{style:Pt,id:this.playerID})}}]),Dt}(nt.Component);tt.default=At,xt(At,"displayName","Twitch"),xt(At,"canPlay",it.canPlay.twitch),xt(At,"loopOnEnded",!0)}(Twitch)),Twitch}var DailyMotion={},hasRequiredDailyMotion;function requireDailyMotion(){return hasRequiredDailyMotion||(hasRequiredDailyMotion=1,function(tt){function et(wt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(Ot){return typeof Ot}:et=function(Ot){return Ot&&typeof Symbol=="function"&&Ot.constructor===Symbol&&Ot!==Symbol.prototype?"symbol":typeof Ot},et(wt)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var wt=new WeakMap;return ot=function(){return wt},wt}function at(wt){if(wt&&wt.__esModule)return wt;if(wt===null||et(wt)!=="object"&&typeof wt!="function")return{default:wt};var It=ot();if(It&&It.has(wt))return It.get(wt);var Ot={},Wt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var zt in wt)if(Object.prototype.hasOwnProperty.call(wt,zt)){var Ft=Wt?Object.getOwnPropertyDescriptor(wt,zt):null;Ft&&(Ft.get||Ft.set)?Object.defineProperty(Ot,zt,Ft):Ot[zt]=wt[zt]}return Ot.default=wt,It&&It.set(wt,Ot),Ot}function st(wt,It){var Ot=Object.keys(wt);if(Object.getOwnPropertySymbols){var Wt=Object.getOwnPropertySymbols(wt);It&&(Wt=Wt.filter(function(zt){return Object.getOwnPropertyDescriptor(wt,zt).enumerable})),Ot.push.apply(Ot,Wt)}return Ot}function lt(wt){for(var It=1;Itwt.length)&&(It=wt.length);for(var Ot=0,Wt=new Array(It);Ot"u"||!(Symbol.iterator in Object(wt)))){var Ot=[],Wt=!0,zt=!1,Ft=void 0;try{for(var Nt=wt[Symbol.iterator](),Ut;!(Wt=(Ut=Nt.next()).done)&&(Ot.push(Ut.value),!(It&&Ot.length===It));Wt=!0);}catch(Mt){zt=!0,Ft=Mt}finally{try{!Wt&&Nt.return!=null&&Nt.return()}finally{if(zt)throw Ft}}return Ot}}function mt(wt){if(Array.isArray(wt))return wt}function gt(wt,It){if(!(wt instanceof It))throw new TypeError("Cannot call a class as a function")}function yt(wt,It){for(var Ot=0;Ot"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Et(wt){return Et=Object.setPrototypeOf?Object.getPrototypeOf:function(Ot){return Ot.__proto__||Object.getPrototypeOf(Ot)},Et(wt)}function $t(wt,It,Ot){return It in wt?Object.defineProperty(wt,It,{value:Ot,enumerable:!0,configurable:!0,writable:!0}):wt[It]=Ot,wt}var Dt="https://api.dmcdn.net/all.js",jt="DM",Pt="dmAsyncInit",Ct=function(wt){vt(Ot,wt);var It=kt(Ot);function Ot(){var Wt;gt(this,Ot);for(var zt=arguments.length,Ft=new Array(zt),Nt=0;Nt1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("seek",zt),Ft||this.pause()}},{key:"setVolume",value:function(zt){this.callPlayer("setVolume",zt)}},{key:"getDuration",value:function(){return this.player.duration||null}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){return this.player.bufferedTime}},{key:"render",value:function(){var zt=this.props.display,Ft={width:"100%",height:"100%",display:zt};return nt.default.createElement("div",{style:Ft},nt.default.createElement("div",{ref:this.ref}))}}]),Ot}(nt.Component);tt.default=Ct,$t(Ct,"displayName","DailyMotion"),$t(Ct,"canPlay",it.canPlay.dailymotion),$t(Ct,"loopOnEnded",!0)}(DailyMotion)),DailyMotion}var Mixcloud={},hasRequiredMixcloud;function requireMixcloud(){return hasRequiredMixcloud||(hasRequiredMixcloud=1,function(tt){function et(At){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function($t){return typeof $t}:et=function($t){return $t&&typeof Symbol=="function"&&$t.constructor===Symbol&&$t!==Symbol.prototype?"symbol":typeof $t},et(At)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var At=new WeakMap;return ot=function(){return At},At}function at(At){if(At&&At.__esModule)return At;if(At===null||et(At)!=="object"&&typeof At!="function")return{default:At};var Et=ot();if(Et&&Et.has(At))return Et.get(At);var $t={},Dt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var jt in At)if(Object.prototype.hasOwnProperty.call(At,jt)){var Pt=Dt?Object.getOwnPropertyDescriptor(At,jt):null;Pt&&(Pt.get||Pt.set)?Object.defineProperty($t,jt,Pt):$t[jt]=At[jt]}return $t.default=At,Et&&Et.set(At,$t),$t}function st(At,Et){var $t=Object.keys(At);if(Object.getOwnPropertySymbols){var Dt=Object.getOwnPropertySymbols(At);Et&&(Dt=Dt.filter(function(jt){return Object.getOwnPropertyDescriptor(At,jt).enumerable})),$t.push.apply($t,Dt)}return $t}function lt(At){for(var Et=1;Et"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function vt(At){return vt=Object.setPrototypeOf?Object.getPrototypeOf:function($t){return $t.__proto__||Object.getPrototypeOf($t)},vt(At)}function xt(At,Et,$t){return Et in At?Object.defineProperty(At,Et,{value:$t,enumerable:!0,configurable:!0,writable:!0}):At[Et]=$t,At}var kt="https://widget.mixcloud.com/media/js/widgetApi.js",St="Mixcloud",Tt=function(At){dt($t,At);var Et=mt($t);function $t(){var Dt;ct(this,$t);for(var jt=arguments.length,Pt=new Array(jt),Ct=0;Ct1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("seek",jt),Pt||this.pause()}},{key:"setVolume",value:function(jt){}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var jt=this.props,Pt=jt.url,Ct=jt.config,wt=Pt.match(it.MATCH_URL_MIXCLOUD)[1],It={width:"100%",height:"100%"},Ot=(0,rt.queryString)(lt(lt({},Ct.options),{},{feed:"/".concat(wt,"/")}));return nt.default.createElement("iframe",{key:wt,ref:this.ref,style:It,src:"https://www.mixcloud.com/widget/iframe/?".concat(Ot),frameBorder:"0",allow:"autoplay"})}}]),$t}(nt.Component);tt.default=Tt,xt(Tt,"displayName","Mixcloud"),xt(Tt,"canPlay",it.canPlay.mixcloud),xt(Tt,"loopOnEnded",!0)}(Mixcloud)),Mixcloud}var Vidyard={},hasRequiredVidyard;function requireVidyard(){return hasRequiredVidyard||(hasRequiredVidyard=1,function(tt){function et(Et){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(Dt){return typeof Dt}:et=function(Dt){return Dt&&typeof Symbol=="function"&&Dt.constructor===Symbol&&Dt!==Symbol.prototype?"symbol":typeof Dt},et(Et)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var Et=new WeakMap;return ot=function(){return Et},Et}function at(Et){if(Et&&Et.__esModule)return Et;if(Et===null||et(Et)!=="object"&&typeof Et!="function")return{default:Et};var $t=ot();if($t&&$t.has(Et))return $t.get(Et);var Dt={},jt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Pt in Et)if(Object.prototype.hasOwnProperty.call(Et,Pt)){var Ct=jt?Object.getOwnPropertyDescriptor(Et,Pt):null;Ct&&(Ct.get||Ct.set)?Object.defineProperty(Dt,Pt,Ct):Dt[Pt]=Et[Pt]}return Dt.default=Et,$t&&$t.set(Et,Dt),Dt}function st(Et,$t){var Dt=Object.keys(Et);if(Object.getOwnPropertySymbols){var jt=Object.getOwnPropertySymbols(Et);$t&&(jt=jt.filter(function(Pt){return Object.getOwnPropertyDescriptor(Et,Pt).enumerable})),Dt.push.apply(Dt,jt)}return Dt}function lt(Et){for(var $t=1;$t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function vt(Et){return vt=Object.setPrototypeOf?Object.getPrototypeOf:function(Dt){return Dt.__proto__||Object.getPrototypeOf(Dt)},vt(Et)}function xt(Et,$t,Dt){return $t in Et?Object.defineProperty(Et,$t,{value:Dt,enumerable:!0,configurable:!0,writable:!0}):Et[$t]=Dt,Et}var kt="https://play.vidyard.com/embed/v4.js",St="VidyardV4",Tt="onVidyardAPI",At=function(Et){dt(Dt,Et);var $t=mt(Dt);function Dt(){var jt;ct(this,Dt);for(var Pt=arguments.length,Ct=new Array(Pt),wt=0;wt1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("seek",Pt),Ct||this.pause()}},{key:"setVolume",value:function(Pt){this.callPlayer("setVolume",Pt)}},{key:"setPlaybackRate",value:function(Pt){this.callPlayer("setPlaybackSpeed",Pt)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.callPlayer("currentTime")}},{key:"getSecondsLoaded",value:function(){return null}},{key:"render",value:function(){var Pt=this.props.display,Ct={width:"100%",height:"100%",display:Pt};return nt.default.createElement("div",{style:Ct},nt.default.createElement("div",{ref:this.ref}))}}]),Dt}(nt.Component);tt.default=At,xt(At,"displayName","Vidyard"),xt(At,"canPlay",it.canPlay.vidyard)}(Vidyard)),Vidyard}var Kaltura={},hasRequiredKaltura;function requireKaltura(){return hasRequiredKaltura||(hasRequiredKaltura=1,function(tt){function et(St){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(At){return typeof At}:et=function(At){return At&&typeof Symbol=="function"&&At.constructor===Symbol&&At!==Symbol.prototype?"symbol":typeof At},et(St)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var St=new WeakMap;return ot=function(){return St},St}function at(St){if(St&&St.__esModule)return St;if(St===null||et(St)!=="object"&&typeof St!="function")return{default:St};var Tt=ot();if(Tt&&Tt.has(St))return Tt.get(St);var At={},Et=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var $t in St)if(Object.prototype.hasOwnProperty.call(St,$t)){var Dt=Et?Object.getOwnPropertyDescriptor(St,$t):null;Dt&&(Dt.get||Dt.set)?Object.defineProperty(At,$t,Dt):At[$t]=St[$t]}return At.default=St,Tt&&Tt.set(St,At),At}function st(St,Tt){if(!(St instanceof Tt))throw new TypeError("Cannot call a class as a function")}function lt(St,Tt){for(var At=0;At"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function yt(St){return yt=Object.setPrototypeOf?Object.getPrototypeOf:function(At){return At.__proto__||Object.getPrototypeOf(At)},yt(St)}function bt(St,Tt,At){return Tt in St?Object.defineProperty(St,Tt,{value:At,enumerable:!0,configurable:!0,writable:!0}):St[Tt]=At,St}var vt="https://cdn.embed.ly/player-0.1.0.min.js",xt="playerjs",kt=function(St){ut(At,St);var Tt=dt(At);function At(){var Et;st(this,At);for(var $t=arguments.length,Dt=new Array($t),jt=0;jt<$t;jt++)Dt[jt]=arguments[jt];return Et=Tt.call.apply(Tt,[this].concat(Dt)),bt(mt(Et),"callPlayer",rt.callPlayer),bt(mt(Et),"duration",null),bt(mt(Et),"currentTime",null),bt(mt(Et),"secondsLoaded",null),bt(mt(Et),"mute",function(){Et.callPlayer("mute")}),bt(mt(Et),"unmute",function(){Et.callPlayer("unmute")}),bt(mt(Et),"ref",function(Pt){Et.iframe=Pt}),Et}return ct(At,[{key:"componentDidMount",value:function(){this.props.onMount&&this.props.onMount(this)}},{key:"load",value:function($t){var Dt=this;(0,rt.getSDK)(vt,xt).then(function(jt){Dt.iframe&&(Dt.player=new jt.Player(Dt.iframe),Dt.player.on("ready",function(){setTimeout(function(){Dt.player.isReady=!0,Dt.player.setLoop(Dt.props.loop),Dt.props.muted&&Dt.player.mute(),Dt.addListeners(Dt.player,Dt.props),Dt.props.onReady()},500)}))},this.props.onError)}},{key:"addListeners",value:function($t,Dt){var jt=this;$t.on("play",Dt.onPlay),$t.on("pause",Dt.onPause),$t.on("ended",Dt.onEnded),$t.on("error",Dt.onError),$t.on("timeupdate",function(Pt){var Ct=Pt.duration,wt=Pt.seconds;jt.duration=Ct,jt.currentTime=wt})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function($t){var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.callPlayer("setCurrentTime",$t),Dt||this.pause()}},{key:"setVolume",value:function($t){this.callPlayer("setVolume",$t)}},{key:"setLoop",value:function($t){this.callPlayer("setLoop",$t)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var $t={width:"100%",height:"100%"};return nt.default.createElement("iframe",{ref:this.ref,src:this.props.url,frameBorder:"0",scrolling:"no",style:$t,allow:"encrypted-media; autoplay; fullscreen;",referrerPolicy:"no-referrer-when-downgrade"})}}]),At}(nt.Component);tt.default=kt,bt(kt,"displayName","Kaltura"),bt(kt,"canPlay",it.canPlay.kaltura)}(Kaltura)),Kaltura}var FilePlayer={},hasRequiredFilePlayer;function requireFilePlayer(){return hasRequiredFilePlayer||(hasRequiredFilePlayer=1,function(tt){function et(Wt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(Ft){return typeof Ft}:et=function(Ft){return Ft&&typeof Symbol=="function"&&Ft.constructor===Symbol&&Ft!==Symbol.prototype?"symbol":typeof Ft},et(Wt)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=at(reactExports),rt=utils,it=patterns;function ot(){if(typeof WeakMap!="function")return null;var Wt=new WeakMap;return ot=function(){return Wt},Wt}function at(Wt){if(Wt&&Wt.__esModule)return Wt;if(Wt===null||et(Wt)!=="object"&&typeof Wt!="function")return{default:Wt};var zt=ot();if(zt&&zt.has(Wt))return zt.get(Wt);var Ft={},Nt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ut in Wt)if(Object.prototype.hasOwnProperty.call(Wt,Ut)){var Mt=Nt?Object.getOwnPropertyDescriptor(Wt,Ut):null;Mt&&(Mt.get||Mt.set)?Object.defineProperty(Ft,Ut,Mt):Ft[Ut]=Wt[Ut]}return Ft.default=Wt,zt&&zt.set(Wt,Ft),Ft}function st(){return st=Object.assign||function(Wt){for(var zt=1;zt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function bt(Wt){return bt=Object.setPrototypeOf?Object.getPrototypeOf:function(Ft){return Ft.__proto__||Object.getPrototypeOf(Ft)},bt(Wt)}function vt(Wt,zt,Ft){return zt in Wt?Object.defineProperty(Wt,zt,{value:Ft,enumerable:!0,configurable:!0,writable:!0}):Wt[zt]=Ft,Wt}var xt=typeof navigator<"u",kt=xt&&navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,St=xt&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||kt)&&!window.MSStream,Tt=xt&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&!window.MSStream,At="https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js",Et="Hls",$t="https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js",Dt="dashjs",jt="https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js",Pt="flvjs",Ct=/www\.dropbox\.com\/.+/,wt=/https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/,It="https://videodelivery.net/{id}/manifest/video.m3u8",Ot=function(Wt){ht(Ft,Wt);var zt=pt(Ft);function Ft(){var Nt;lt(this,Ft);for(var Ut=arguments.length,Mt=new Array(Ut),Ht=0;Ht1&&arguments[1]!==void 0?arguments[1]:!0;this.player.currentTime=Ut,Mt||this.pause()}},{key:"setVolume",value:function(Ut){this.player.volume=Ut}},{key:"enablePIP",value:function(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player?this.player.requestPictureInPicture():(0,rt.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="picture-in-picture"&&this.player.webkitSetPresentationMode("picture-in-picture")}},{key:"disablePIP",value:function(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player?document.exitPictureInPicture():(0,rt.supportsWebKitPresentationMode)(this.player)&&this.player.webkitPresentationMode!=="inline"&&this.player.webkitSetPresentationMode("inline")}},{key:"setPlaybackRate",value:function(Ut){try{this.player.playbackRate=Ut}catch(Mt){this.props.onError(Mt)}}},{key:"getDuration",value:function(){if(!this.player)return null;var Ut=this.player,Mt=Ut.duration,Ht=Ut.seekable;return Mt===1/0&&Ht.length>0?Ht.end(Ht.length-1):Mt}},{key:"getCurrentTime",value:function(){return this.player?this.player.currentTime:null}},{key:"getSecondsLoaded",value:function(){if(!this.player)return null;var Ut=this.player.buffered;if(Ut.length===0)return 0;var Mt=Ut.end(Ut.length-1),Ht=this.getDuration();return Mt>Ht?Ht:Mt}},{key:"getSource",value:function(Ut){var Mt=this.shouldUseHLS(Ut),Ht=this.shouldUseDASH(Ut),en=this.shouldUseFLV(Ut);if(!(Ut instanceof Array||(0,rt.isMediaStream)(Ut)||Mt||Ht||en))return Ct.test(Ut)?Ut.replace("www.dropbox.com","dl.dropboxusercontent.com"):Ut}},{key:"render",value:function(){var Ut=this.props,Mt=Ut.url,Ht=Ut.playing,en=Ut.loop,sn=Ut.controls,Kt=Ut.muted,rn=Ut.config,nn=Ut.width,hn=Ut.height,vn=this.shouldUseAudio(this.props),an=vn?"audio":"video",Qt={width:nn==="auto"?nn:"100%",height:hn==="auto"?hn:"100%"};return nt.default.createElement(an,st({ref:this.ref,src:this.getSource(Mt),style:Qt,preload:"auto",autoPlay:Ht||void 0,controls:sn,muted:Kt,loop:en},rn.attributes),Mt instanceof Array&&Mt.map(this.renderSourceElement),rn.tracks.map(this.renderTrack))}}]),Ft}(nt.Component);tt.default=Ot,vt(Ot,"displayName","FilePlayer"),vt(Ot,"canPlay",it.canPlay.file)}(FilePlayer)),FilePlayer}(function(tt){Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var et=reactExports,nt=utils,rt=patterns;function it(lt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?it=function(ut){return typeof ut}:it=function(ut){return ut&&typeof Symbol=="function"&&ut.constructor===Symbol&&ut!==Symbol.prototype?"symbol":typeof ut},it(lt)}function ot(){if(typeof WeakMap!="function")return null;var lt=new WeakMap;return ot=function(){return lt},lt}function at(lt){if(lt&<.__esModule)return lt;if(lt===null||it(lt)!=="object"&&typeof lt!="function")return{default:lt};var ct=ot();if(ct&&ct.has(lt))return ct.get(lt);var ut={},ht=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var dt in lt)if(Object.prototype.hasOwnProperty.call(lt,dt)){var pt=ht?Object.getOwnPropertyDescriptor(lt,dt):null;pt&&(pt.get||pt.set)?Object.defineProperty(ut,dt,pt):ut[dt]=lt[dt]}return ut.default=lt,ct&&ct.set(lt,ut),ut}var st=[{key:"youtube",name:"YouTube",canPlay:rt.canPlay.youtube,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireYouTube())})})},{key:"soundcloud",name:"SoundCloud",canPlay:rt.canPlay.soundcloud,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireSoundCloud())})})},{key:"vimeo",name:"Vimeo",canPlay:rt.canPlay.vimeo,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireVimeo())})})},{key:"facebook",name:"Facebook",canPlay:rt.canPlay.facebook,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireFacebook())})})},{key:"streamable",name:"Streamable",canPlay:rt.canPlay.streamable,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireStreamable())})})},{key:"wistia",name:"Wistia",canPlay:rt.canPlay.wistia,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireWistia())})})},{key:"twitch",name:"Twitch",canPlay:rt.canPlay.twitch,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireTwitch())})})},{key:"dailymotion",name:"DailyMotion",canPlay:rt.canPlay.dailymotion,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireDailyMotion())})})},{key:"mixcloud",name:"Mixcloud",canPlay:rt.canPlay.mixcloud,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireMixcloud())})})},{key:"vidyard",name:"Vidyard",canPlay:rt.canPlay.vidyard,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireVidyard())})})},{key:"kaltura",name:"Kaltura",canPlay:rt.canPlay.kaltura,lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireKaltura())})})},{key:"file",name:"FilePlayer",canPlay:rt.canPlay.file,canEnablePIP:function(ct){return rt.canPlay.file(ct)&&(document.pictureInPictureEnabled||(0,nt.supportsWebKitPresentationMode)())&&!rt.AUDIO_EXTENSIONS.test(ct)},lazyPlayer:(0,et.lazy)(function(){return Promise.resolve().then(function(){return at(requireFilePlayer())})})}];tt.default=st})(players);var ReactPlayer$1={},safeIsNaN=Number.isNaN||function tt(et){return typeof et=="number"&&et!==et};function isEqual(tt,et){return!!(tt===et||safeIsNaN(tt)&&safeIsNaN(et))}function areInputsEqual(tt,et){if(tt.length!==et.length)return!1;for(var nt=0;nt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function xt(At){return xt=Object.setPrototypeOf?Object.getPrototypeOf:function($t){return $t.__proto__||Object.getPrototypeOf($t)},xt(At)}function kt(At,Et,$t){return Et in At?Object.defineProperty(At,Et,{value:$t,enumerable:!0,configurable:!0,writable:!0}):At[Et]=$t,At}var St=5e3,Tt=function(At){pt($t,At);var Et=gt($t);function $t(){var Dt;ut(this,$t);for(var jt=arguments.length,Pt=new Array(jt),Ct=0;Ct0&&jt<1;if(It){var Ot=this.player.getDuration();if(!Ot){console.warn("ReactPlayer: could not seek using fraction – duration not yet available");return}this.player.seekTo(Ot*jt,Ct);return}this.player.seekTo(jt,Ct)}},{key:"render",value:function(){var jt=this.props.activePlayer;return jt?nt.default.createElement(jt,ct({},this.props,{onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError})):null}}]),$t}(nt.Component);tt.default=Tt,kt(Tt,"displayName","Player"),kt(Tt,"propTypes",it.propTypes),kt(Tt,"defaultProps",it.defaultProps)})(Player);var Preview$1={},hasRequiredPreview;function requirePreview(){return hasRequiredPreview||(hasRequiredPreview=1,function(tt){function et(St){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?et=function(At){return typeof At}:et=function(At){return At&&typeof Symbol=="function"&&At.constructor===Symbol&&At!==Symbol.prototype?"symbol":typeof At},et(St)}Object.defineProperty(tt,"__esModule",{value:!0}),tt.default=void 0;var nt=it(reactExports);function rt(){if(typeof WeakMap!="function")return null;var St=new WeakMap;return rt=function(){return St},St}function it(St){if(St&&St.__esModule)return St;if(St===null||et(St)!=="object"&&typeof St!="function")return{default:St};var Tt=rt();if(Tt&&Tt.has(St))return Tt.get(St);var At={},Et=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var $t in St)if(Object.prototype.hasOwnProperty.call(St,$t)){var Dt=Et?Object.getOwnPropertyDescriptor(St,$t):null;Dt&&(Dt.get||Dt.set)?Object.defineProperty(At,$t,Dt):At[$t]=St[$t]}return At.default=St,Tt&&Tt.set(St,At),At}function ot(St,Tt){var At=Object.keys(St);if(Object.getOwnPropertySymbols){var Et=Object.getOwnPropertySymbols(St);Tt&&(Et=Et.filter(function($t){return Object.getOwnPropertyDescriptor(St,$t).enumerable})),At.push.apply(At,Et)}return At}function at(St){for(var Tt=1;Tt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function yt(St){return yt=Object.setPrototypeOf?Object.getPrototypeOf:function(At){return At.__proto__||Object.getPrototypeOf(At)},yt(St)}function bt(St,Tt,At){return Tt in St?Object.defineProperty(St,Tt,{value:At,enumerable:!0,configurable:!0,writable:!0}):St[Tt]=At,St}var vt="64px",xt={},kt=function(St){ut(At,St);var Tt=dt(At);function At(){var Et;st(this,At);for(var $t=arguments.length,Dt=new Array($t),jt=0;jt<$t;jt++)Dt[jt]=arguments[jt];return Et=Tt.call.apply(Tt,[this].concat(Dt)),bt(mt(Et),"mounted",!1),bt(mt(Et),"state",{image:null}),bt(mt(Et),"handleKeyPress",function(Pt){(Pt.key==="Enter"||Pt.key===" ")&&Et.props.onClick()}),Et}return ct(At,[{key:"componentDidMount",value:function(){this.mounted=!0,this.fetchImage(this.props)}},{key:"componentDidUpdate",value:function($t){var Dt=this.props,jt=Dt.url,Pt=Dt.light;($t.url!==jt||$t.light!==Pt)&&this.fetchImage(this.props)}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"fetchImage",value:function($t){var Dt=this,jt=$t.url,Pt=$t.light,Ct=$t.oEmbedUrl;if(!nt.default.isValidElement(Pt)){if(typeof Pt=="string"){this.setState({image:Pt});return}if(xt[jt]){this.setState({image:xt[jt]});return}return this.setState({image:null}),window.fetch(Ct.replace("{url}",jt)).then(function(wt){return wt.json()}).then(function(wt){if(wt.thumbnail_url&&Dt.mounted){var It=wt.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");Dt.setState({image:It}),xt[jt]=It}})}}},{key:"render",value:function(){var $t=this.props,Dt=$t.light,jt=$t.onClick,Pt=$t.playIcon,Ct=$t.previewTabIndex,wt=this.state.image,It=nt.default.isValidElement(Dt),Ot={display:"flex",alignItems:"center",justifyContent:"center"},Wt={preview:at({width:"100%",height:"100%",backgroundImage:wt&&!It?"url(".concat(wt,")"):void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer"},Ot),shadow:at({background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:vt,width:vt,height:vt,position:It?"absolute":void 0},Ot),playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},zt=nt.default.createElement("div",{style:Wt.shadow,className:"react-player__shadow"},nt.default.createElement("div",{style:Wt.playIcon,className:"react-player__play-icon"}));return nt.default.createElement("div",{style:Wt.preview,className:"react-player__preview",onClick:jt,tabIndex:Ct,onKeyPress:this.handleKeyPress},It?Dt:null,Pt||zt)}}]),At}(nt.Component);tt.default=kt}(Preview$1)),Preview$1}Object.defineProperty(ReactPlayer$1,"__esModule",{value:!0});ReactPlayer$1.createReactPlayer=void 0;var _react=_interopRequireWildcard(reactExports),_deepmerge=_interopRequireDefault(cjs),_memoizeOne=_interopRequireDefault(require$$2),_reactFastCompare=_interopRequireDefault(reactFastCompare),_props=props,_utils=utils,_Player3=_interopRequireDefault(Player);function _interopRequireDefault(tt){return tt&&tt.__esModule?tt:{default:tt}}function _typeof(tt){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(nt){return typeof nt}:_typeof=function(nt){return nt&&typeof Symbol=="function"&&nt.constructor===Symbol&&nt!==Symbol.prototype?"symbol":typeof nt},_typeof(tt)}function ownKeys(tt,et){var nt=Object.keys(tt);if(Object.getOwnPropertySymbols){var rt=Object.getOwnPropertySymbols(tt);et&&(rt=rt.filter(function(it){return Object.getOwnPropertyDescriptor(tt,it).enumerable})),nt.push.apply(nt,rt)}return nt}function _objectSpread(tt){for(var et=1;ettt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function _getPrototypeOf(tt){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf(tt)}function _defineProperty(tt,et,nt){return et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function _getRequireWildcardCache(){if(typeof WeakMap!="function")return null;var tt=new WeakMap;return _getRequireWildcardCache=function(){return tt},tt}function _interopRequireWildcard(tt){if(tt&&tt.__esModule)return tt;if(tt===null||_typeof(tt)!=="object"&&typeof tt!="function")return{default:tt};var et=_getRequireWildcardCache();if(et&&et.has(tt))return et.get(tt);var nt={},rt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var it in tt)if(Object.prototype.hasOwnProperty.call(tt,it)){var ot=rt?Object.getOwnPropertyDescriptor(tt,it):null;ot&&(ot.get||ot.set)?Object.defineProperty(nt,it,ot):nt[it]=tt[it]}return nt.default=tt,et&&et.set(tt,nt),nt}var Preview=(0,_react.lazy)(function(){return Promise.resolve().then(function(){return _interopRequireWildcard(requirePreview())})}),IS_BROWSER=typeof window<"u"&&window.document,IS_GLOBAL=typeof commonjsGlobal<"u"&&commonjsGlobal.window&&commonjsGlobal.window.document,SUPPORTED_PROPS=Object.keys(_props.propTypes),UniversalSuspense=IS_BROWSER||IS_GLOBAL?_react.Suspense:function(){return null},customPlayers=[],createReactPlayer=function tt(et,nt){var rt,it;return it=rt=function(ot){_inherits(st,ot);var at=_createSuper(st);function st(){var lt;_classCallCheck(this,st);for(var ct=arguments.length,ut=new Array(ct),ht=0;ht0&&arguments[0]!==void 0?arguments[0]:"player";return lt.player?lt.player.getInternalPlayer(dt):null}),_defineProperty(_assertThisInitialized(lt),"seekTo",function(dt,pt,mt){if(!lt.player)return null;lt.player.seekTo(dt,pt,mt)}),_defineProperty(_assertThisInitialized(lt),"handleReady",function(){lt.props.onReady(_assertThisInitialized(lt))}),_defineProperty(_assertThisInitialized(lt),"getActivePlayer",(0,_memoizeOne.default)(function(dt){for(var pt=0,mt=[].concat(customPlayers,_toConsumableArray(et));pt{const tt=useDataStore(gt=>gt.selectedNode),et=reactExports.useRef(null),{link:nt,timestamp:rt,image_url:it,description:ot,date:at,boost:st,type:lt,id:ct,show_title:ut,ref_id:ht}=tt||{},[dt,pt]=reactExports.useState(st||0),mt=videoTimetoSeconds(rt||"");return reactExports.useEffect(()=>{var gt;et.current&&((gt=et.current)==null||gt.seekTo(mt))},[et,mt]),tt?jsxRuntimeExports.jsxs(Wrapper$4,{children:[jsxRuntimeExports.jsx(PlayerWrapper,{children:jsxRuntimeExports.jsx(Flex,{direction:"row",children:jsxRuntimeExports.jsx(ReactPlayer,{ref:et,controls:!0,height:"200px",playing:!0,url:nt,width:"100%"})})}),jsxRuntimeExports.jsx(StyledEpisode,{boostCount:dt||0,date:at||0,description:formatDescription(ot),id:ct,imageUrl:it||"video_default.svg",isSelectedView:!0,onClick:()=>null,title:ut,type:lt}),jsxRuntimeExports.jsx(StyledDivider,{}),jsxRuntimeExports.jsxs(BoostWrapper,{children:[jsxRuntimeExports.jsx(BoostAmt,{amt:dt}),jsxRuntimeExports.jsx(Booster,{content:tt,count:dt,refId:ht,updateCount:pt})]}),jsxRuntimeExports.jsx(StyledDivider,{}),jsxRuntimeExports.jsx(TranscriptWrapper,{grow:1,shrink:1,children:jsxRuntimeExports.jsx(Transcript,{node:tt,stateless:!0})})]}):null},Wrapper$4=styled$4(Flex)` +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _unsupportedIterableToArray(tt,et){if(tt){if(typeof tt=="string")return _arrayLikeToArray(tt,et);var nt=Object.prototype.toString.call(tt).slice(8,-1);if(nt==="Object"&&tt.constructor&&(nt=tt.constructor.name),nt==="Map"||nt==="Set")return Array.from(tt);if(nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(nt))return _arrayLikeToArray(tt,et)}}function _iterableToArray(tt){if(typeof Symbol<"u"&&Symbol.iterator in Object(tt))return Array.from(tt)}function _arrayWithoutHoles(tt){if(Array.isArray(tt))return _arrayLikeToArray(tt)}function _arrayLikeToArray(tt,et){(et==null||et>tt.length)&&(et=tt.length);for(var nt=0,rt=new Array(et);nt"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function _getPrototypeOf(tt){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(nt){return nt.__proto__||Object.getPrototypeOf(nt)},_getPrototypeOf(tt)}function _defineProperty(tt,et,nt){return et in tt?Object.defineProperty(tt,et,{value:nt,enumerable:!0,configurable:!0,writable:!0}):tt[et]=nt,tt}function _getRequireWildcardCache(){if(typeof WeakMap!="function")return null;var tt=new WeakMap;return _getRequireWildcardCache=function(){return tt},tt}function _interopRequireWildcard(tt){if(tt&&tt.__esModule)return tt;if(tt===null||_typeof(tt)!=="object"&&typeof tt!="function")return{default:tt};var et=_getRequireWildcardCache();if(et&&et.has(tt))return et.get(tt);var nt={},rt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var it in tt)if(Object.prototype.hasOwnProperty.call(tt,it)){var ot=rt?Object.getOwnPropertyDescriptor(tt,it):null;ot&&(ot.get||ot.set)?Object.defineProperty(nt,it,ot):nt[it]=tt[it]}return nt.default=tt,et&&et.set(tt,nt),nt}var Preview=(0,_react.lazy)(function(){return Promise.resolve().then(function(){return _interopRequireWildcard(requirePreview())})}),IS_BROWSER=typeof window<"u"&&window.document,IS_GLOBAL=typeof commonjsGlobal<"u"&&commonjsGlobal.window&&commonjsGlobal.window.document,SUPPORTED_PROPS=Object.keys(_props.propTypes),UniversalSuspense=IS_BROWSER||IS_GLOBAL?_react.Suspense:function(){return null},customPlayers=[],createReactPlayer=function tt(et,nt){var rt,it;return it=rt=function(ot){_inherits(st,ot);var at=_createSuper(st);function st(){var lt;_classCallCheck(this,st);for(var ct=arguments.length,ut=new Array(ct),ht=0;ht0&&arguments[0]!==void 0?arguments[0]:"player";return lt.player?lt.player.getInternalPlayer(dt):null}),_defineProperty(_assertThisInitialized(lt),"seekTo",function(dt,pt,mt){if(!lt.player)return null;lt.player.seekTo(dt,pt,mt)}),_defineProperty(_assertThisInitialized(lt),"handleReady",function(){lt.props.onReady(_assertThisInitialized(lt))}),_defineProperty(_assertThisInitialized(lt),"getActivePlayer",(0,_memoizeOne.default)(function(dt){for(var pt=0,mt=[].concat(customPlayers,_toConsumableArray(et));pt{const tt=useDataStore(yt=>yt.selectedNode),et=reactExports.useRef(null),nt=reactExports.useRef(null),{link:rt,timestamp:it,image_url:ot,date:at,boost:st,type:lt,id:ct,show_title:ut,episode_title:ht,ref_id:dt}=tt||{},[pt,mt]=reactExports.useState(st||0),gt=videoTimetoSeconds(it||"");return reactExports.useEffect(()=>{var yt;et.current&&((yt=et.current)==null||yt.seekTo(gt)),nt.current&&nt.current.scrollTo({top:0,behavior:"auto"})},[et,gt]),tt?jsxRuntimeExports.jsxs(Wrapper$4,{children:[jsxRuntimeExports.jsx(PlayerWrapper,{children:jsxRuntimeExports.jsx(Flex,{direction:"row",children:jsxRuntimeExports.jsx(ReactPlayer,{ref:et,controls:!0,height:"200px",playing:!0,url:rt,width:"100%"})})}),jsxRuntimeExports.jsx(StyledEpisode,{boostCount:pt||0,date:at||0,episodeTitle:formatDescription(ht),id:ct,imageUrl:ot||"video_default.svg",isSelectedView:!0,onClick:()=>null,showTitle:ut,type:lt}),jsxRuntimeExports.jsx(StyledDivider,{}),jsxRuntimeExports.jsxs("div",{ref:nt,style:{overflow:"auto",flex:1,width:"100%"},children:[jsxRuntimeExports.jsxs(BoostWrapper,{children:[jsxRuntimeExports.jsx(BoostAmt,{amt:pt}),jsxRuntimeExports.jsx(Booster,{content:tt,count:pt,refId:dt,updateCount:mt})]}),jsxRuntimeExports.jsx(StyledDivider,{}),jsxRuntimeExports.jsx(TextWrapper,{children:jsxRuntimeExports.jsx(Description,{node:tt,stateless:!0})}),jsxRuntimeExports.jsx(StyledDivider,{}),jsxRuntimeExports.jsx(TextWrapper,{children:jsxRuntimeExports.jsx(Transcript,{node:tt,stateless:!0})})]})]}):null},Wrapper$4=styled$4(Flex)` flex: 1; min-height: 100%; flex-direction: column; @@ -8049,9 +8125,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `,BoostWrapper=styled$4(Flex)` flex-direction: row; justify-content: space-between; - padding: 0 18px 18px; -`,TranscriptWrapper=styled$4(Flex)` - padding: 0 18px 18px; + padding: 18px 18px 18px; +`,TextWrapper=styled$4(Flex)` + padding: 18px 18px 18px; `,StyledEpisode=styled$4(Episode)` & { border-top: none; @@ -8059,8 +8135,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho font-size: 16px; } `,StyledDivider=styled$4(Divider)` - margin-bottom: 10px; - margin: auto 0px 10px 0px; + margin: auto 0px 2px 0px; opacity: 75%; `,_View=()=>{const tt=useSelectedNode(),[et]=useDataStore(nt=>[nt.showTeachMe]);if(et)return jsxRuntimeExports.jsx(TeachMeText,{});switch(tt==null?void 0:tt.node_type){case"twitter":return jsxRuntimeExports.jsx(Twitter,{});case"guest":return jsxRuntimeExports.jsx(Person,{});case"data_series":return jsxRuntimeExports.jsx(Data,{});case"tribe_message":return jsxRuntimeExports.jsx(Messages,{});case"tweet":return jsxRuntimeExports.jsx(TwitData,{});case"topic":return jsxRuntimeExports.jsx(Topic,{});case"show":return jsxRuntimeExports.jsx(Show,{});case"clip":return(tt==null?void 0:tt.type)==="youtube"?jsxRuntimeExports.jsx(YouTube,{}):jsxRuntimeExports.jsx(AudioClip,{});case"document":return jsxRuntimeExports.jsx(TextType,{});default:return jsxRuntimeExports.jsx(Creator,{})}},SelectedNodeView=reactExports.memo(_View),SideBarSubView=({open:tt})=>{const[et,nt,rt]=useDataStore(it=>[it.setSelectedNode,it.setTeachMe,it.showTeachMe]);return jsxRuntimeExports.jsx(Slide$1,{direction:"right",in:tt,mountOnEnter:!0,style:{width:rt?"700px":""},unmountOnExit:!0,children:jsxRuntimeExports.jsxs(Wrapper$3,{children:[jsxRuntimeExports.jsx(ScrollWrapper$1,{children:jsxRuntimeExports.jsx(SelectedNodeView,{})}),jsxRuntimeExports.jsx(CloseButton,{onClick:()=>{et(null),nt(!1)},children:jsxRuntimeExports.jsx(CloseIcon,{})}),jsxRuntimeExports.jsx(CollapseButton$1,{onClick:()=>{et(null),nt(!1)},children:jsxRuntimeExports.jsx(ChevronLeftIcon,{})})]})})},Wrapper$3=styled$4(Flex)(({theme:tt})=>({position:"relative",background:colors.BG1,width:"100%",margin:"64px auto 20px 10px",borderRadius:"16px",zIndex:29,[tt.breakpoints.up("sm")]:{width:"390px"}})),CloseButton=styled$4(Flex)` font-size: 32px; @@ -8197,4 +8272,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,nt,rt,it,ot,at]=[useAppStore(xt=>xt.setSidebarOpen),useAppStore(xt=>xt.currentSearch),useAppStore(xt=>xt.setCurrentSearch),useAppStore(xt=>xt.setRelevanceSelected),useAppStore(xt=>xt.setTranscriptOpen),useAppStore(xt=>xt.hasBudgetExplanationModalBeSeen)],st=useTeachStore(xt=>xt.setTeachMeAnswer),[lt,ct,ut,ht,dt,pt,mt]=[useDataStore(xt=>xt.data),useDataStore(xt=>xt.setData),useDataStore(xt=>xt.fetchData),useDataStore(xt=>xt.graphStyle),useDataStore(xt=>xt.setSphinxModalOpen),useDataStore(xt=>xt.setSelectedNode),useDataStore(xt=>xt.setCategoryFilter)],gt=useForm({mode:"onChange"}),yt=gt.handleSubmit(({search:xt})=>{ot(!1),pt(null),it(!1),rt(xt),st(""),mt(null)}),bt=reactExports.useCallback(async()=>{nt&&(dt(!0),isE2E||await distExports$1.enable(),dt(!1)),ut(nt),et(!0)},[ut,nt,dt,et]);reactExports.useEffect(()=>{if(nt&&!at){tt();return}bt()},[nt,bt,at]);const vt=()=>{if(lt){const xt=getGraphDataPositions(ht,lt.nodes);ct(xt)}};return reactExports.useEffect(()=>{vt()},[ht]),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,{...gt,children:[jsxRuntimeExports.jsx(MainToolbar,{}),jsxRuntimeExports.jsx(SideBar,{onSubmit:yt}),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)),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(); diff --git a/build/index.html b/build/index.html index 710a58479..1605ea3ee 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 - + diff --git a/build/svg-icons/BudgetIcon.svg b/build/svg-icons/BudgetIcon.svg new file mode 100644 index 000000000..536176df0 --- /dev/null +++ b/build/svg-icons/BudgetIcon.svg @@ -0,0 +1,3 @@ + + + diff --git a/package.json b/package.json index 6067f78c0..0fa79c808 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sphinx-nav", - "version": "0.1.84", + "version": "0.1.86", "private": true, "dependencies": { "@emotion/react": "^11.11.1", @@ -49,7 +49,7 @@ "reactflow": "^11.9.2", "recharts": "^2.4.3", "socket.io-client": "^4.6.1", - "sphinx-bridge-kevkevinpal": "0.2.58", + "sphinx-bridge-kevkevinpal": "0.2.60", "stream-browserify": "^3.0.0", "string_decoder": "^1.3.0", "styled-components": "^5.3.9", diff --git a/public/svg-icons/BudgetIcon.svg b/public/svg-icons/BudgetIcon.svg new file mode 100644 index 000000000..536176df0 --- /dev/null +++ b/public/svg-icons/BudgetIcon.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/AddNodeModal/index.tsx b/src/components/AddNodeModal/index.tsx index a71b9cfe8..87f882f10 100644 --- a/src/components/AddNodeModal/index.tsx +++ b/src/components/AddNodeModal/index.tsx @@ -28,10 +28,12 @@ import { import { api } from '~/network/api' import { getRadarData } from '~/network/fetchSourcesData' import { useModal } from '~/stores/useModalStore' +import { useUserStore } from '~/stores/useUserStore' import { FetchRadarResponse, SubmitErrRes } from '~/types' import { colors } from '~/utils/colors' import { getLSat } from '~/utils/getLSat' import { payLsat } from '~/utils/payLsat' +import { updateBudget } from '~/utils/setBudget' import { executeIfProd } from '~/utils/tests' import { timeToMilliseconds } from '~/utils/timeToMilliseconds' import { useDataStore } from '../../stores/useDataStore/index' @@ -83,6 +85,7 @@ const handleSubmit = async ( close: () => void, sourceType: string, successCallback: () => void, + setBudget: (value: number | null) => void, ): Promise => { const body: { [index: string]: unknown } = {} @@ -192,7 +195,9 @@ const handleSubmit = async ( await payLsat(lsat) - await handleSubmit(data, close, sourceType, successCallback) + await updateBudget(setBudget) + + await handleSubmit(data, close, sourceType, successCallback, setBudget) } if (err instanceof Error) { @@ -261,6 +266,7 @@ export const AddNodeModal = () => { const { close, addNodeModalData } = useModal('addNode') const [activeType, setActiveType] = useState('') const setSources = useDataStore((s) => s.setSources) + const [setBudget] = useUserStore((s) => [s.setBudget]) const resolvedContentOptions = addNodeModalData ? CONTENT_TYPE_OPTIONS[addNodeModalData] : null @@ -291,7 +297,7 @@ export const AddNodeModal = () => { } const onSubmit = form.handleSubmit(async (data) => { - await handleSubmit(data, handleClose, activeType, onSuccessCallback) + await handleSubmit(data, handleClose, activeType, onSuccessCallback, setBudget) }) const options = resolvedContentOptions diff --git a/src/components/App/AppBar/index.tsx b/src/components/App/AppBar/index.tsx index 3e8c2e9a3..1ba3d1374 100644 --- a/src/components/App/AppBar/index.tsx +++ b/src/components/App/AppBar/index.tsx @@ -1,9 +1,9 @@ import { useEffect, useState } from 'react' import styled from 'styled-components' -import { Stats } from '~/components/Stats' import { Flex } from '~/components/common/Flex' import { Text } from '~/components/common/Text' -import { TAboutParams, getAboutData } from '~/network/fetchSourcesData' +import { Stats } from '~/components/Stats' +import { getAboutData, TAboutParams } from '~/network/fetchSourcesData' import { colors } from '~/utils/colors' import { media } from '~/utils/media' @@ -58,7 +58,7 @@ const Header = styled(Flex).attrs({ position: absolute; top: 0px; left: 64px; - right: 64px; + right: 32px; transition: opacity 1s; z-index: 99; padding: 20px 23px; diff --git a/src/components/App/Helper/AskQuestion/index.tsx b/src/components/App/Helper/AskQuestion/index.tsx index 84cb9afc1..01efa635e 100644 --- a/src/components/App/Helper/AskQuestion/index.tsx +++ b/src/components/App/Helper/AskQuestion/index.tsx @@ -15,7 +15,9 @@ import { postAskQuestion } from '~/network/fetchGraphData' import { useAppStore } from '~/stores/useAppStore' import { useDataStore } from '~/stores/useDataStore' import { useTeachStore } from '~/stores/useTeachStore' +import { useUserStore } from '~/stores/useUserStore' import { colors } from '~/utils/colors' +import { updateBudget } from '~/utils/setBudget' type ResponseType = { answer: string @@ -42,6 +44,7 @@ export const AskQuestion = () => { const searchTerm = useAppStore((s) => s.currentSearch) const isSocketSet: { current: boolean } = useRef(false) const socket: Socket | null = useSocket() + const [setBudget] = useUserStore((s) => [s.setBudget]) const [askedQuestions, askedQuestionsAnswers, setAskedQuestion, setAskedQuestionAnswer, hasQuestionInProgress] = useTeachStore((s) => [ @@ -104,6 +107,8 @@ export const AskQuestion = () => { transcripts, }) + await updateBudget(setBudget) + toast(, { type: 'success', }) diff --git a/src/components/App/Helper/SentimentAnalysis/index.tsx b/src/components/App/Helper/SentimentAnalysis/index.tsx index a0dbf1195..4a1f02942 100644 --- a/src/components/App/Helper/SentimentAnalysis/index.tsx +++ b/src/components/App/Helper/SentimentAnalysis/index.tsx @@ -10,7 +10,9 @@ import { Button } from '~/components/Button' import { Text } from '~/components/common/Text' import { getSentimentData } from '~/network/fetchGraphData' import { useAppStore } from '~/stores/useAppStore' +import { useUserStore } from '~/stores/useUserStore' import { colors } from '~/utils/colors' +import { updateBudget } from '~/utils/setBudget' import { executeIfProd } from '~/utils/tests' import { SentimentChart } from '../../SecondarySidebar/Sentiment/SentimentChart' @@ -26,6 +28,7 @@ export const SentimentAnalysis = memo(() => { const now = moment().startOf('day') const min = moment().subtract(1, 'year') const step = 3600 * 24 // day + const [setBudget] = useUserStore((s) => [s.setBudget]) const [value, setValue] = useState(moment().startOf('day').subtract(20, 'day')) @@ -48,7 +51,7 @@ export const SentimentAnalysis = memo(() => { ) getSentimentData({ topic: search, cutoff_date: String(value.unix()) }) - .then((r) => { + .then(async (r) => { // eslint-disable-next-line no-console console.log(r?.data) @@ -60,6 +63,8 @@ export const SentimentAnalysis = memo(() => { score: i.sentiment_score, })), ) + + await updateBudget(setBudget) }) .catch(console.error) .finally(() => { diff --git a/src/components/App/Helper/TeachMe/index.tsx b/src/components/App/Helper/TeachMe/index.tsx index 74de41033..b04430ee2 100644 --- a/src/components/App/Helper/TeachMe/index.tsx +++ b/src/components/App/Helper/TeachMe/index.tsx @@ -1,21 +1,23 @@ +import { Button } from '@mui/material' import { useCallback, useEffect, useRef } from 'react' -import styled from 'styled-components' import { PropagateLoader } from 'react-spinners' import { toast } from 'react-toastify' +import ReactFlow from 'reactflow' import { Socket } from 'socket.io-client' import * as sphinx from 'sphinx-bridge-kevkevinpal' -import { Button } from '@mui/material' +import styled from 'styled-components' import { Flex } from '~/components/common/Flex' import { Text } from '~/components/common/Text' import { ToastMessage } from '~/components/common/Toast/toastMessage' import useSocket from '~/hooks/useSockets' -import { postTeachMe, postInstagraph } from '~/network/fetchGraphData' +import { postInstagraph, postTeachMe } from '~/network/fetchGraphData' import { useAppStore } from '~/stores/useAppStore' import { useDataStore } from '~/stores/useDataStore' -import { useTeachStore, InstagraphResponse } from '~/stores/useTeachStore' +import { InstagraphResponse, useTeachStore } from '~/stores/useTeachStore' +import { useUserStore } from '~/stores/useUserStore' import { colors } from '~/utils/colors' +import { updateBudget } from '~/utils/setBudget' import { AskQuestion } from '../AskQuestion' -import ReactFlow from 'reactflow' import 'reactflow/dist/style.css' @@ -26,6 +28,7 @@ type ResponseType = { export const TeachMe = () => { const [data, setTeachMe] = useDataStore((s) => [s.data, s.setTeachMe]) const [searchTerm, setSideBarOpen] = useAppStore((s) => [s.currentSearch, s.setSidebarOpen]) + const [setBudget] = useUserStore((s) => [s.setBudget]) const isSocketSet: { current: boolean } = useRef(false) const socket: Socket | null = useSocket() @@ -104,6 +107,8 @@ export const TeachMe = () => { transcripts, }) + await updateBudget(setBudget) + toast(, { type: 'success', }) @@ -113,6 +118,8 @@ export const TeachMe = () => { transcripts, }) + await updateBudget(setBudget) + toast(, { type: 'success', }) diff --git a/src/components/App/SecondarySidebar/About/index.tsx b/src/components/App/SecondarySidebar/About/index.tsx index 8ea9c32a9..14e0a417b 100644 --- a/src/components/App/SecondarySidebar/About/index.tsx +++ b/src/components/App/SecondarySidebar/About/index.tsx @@ -5,7 +5,7 @@ import styled from 'styled-components' import { Button } from '~/components/Button' import { Flex } from '~/components/common/Flex' import { Text } from '~/components/common/Text' -import { TAboutParams, getAboutData } from '~/network/fetchSourcesData' +import { getAboutData, TAboutParams } from '~/network/fetchSourcesData' import { useUserStore } from '~/stores/useUserStore' import { colors } from '~/utils/colors' import { executeIfProd } from '~/utils/tests' diff --git a/src/components/App/SecondarySidebar/Sentiment/index.tsx b/src/components/App/SecondarySidebar/Sentiment/index.tsx index 0fa9f3718..f2352f7b1 100644 --- a/src/components/App/SecondarySidebar/Sentiment/index.tsx +++ b/src/components/App/SecondarySidebar/Sentiment/index.tsx @@ -9,7 +9,9 @@ import { getSentimentData } from '~/network/fetchGraphData' import { Stack } from '@mui/material' import { PropagateLoader } from 'react-spinners' import { Button } from '~/components/Button' +import { useUserStore } from '~/stores/useUserStore' import { colors } from '~/utils/colors' +import { updateBudget } from '~/utils/setBudget' import { executeIfProd } from '~/utils/tests' import { SentimentChart } from './SentimentChart' @@ -20,6 +22,7 @@ type SentimentData = { export const Sentiment = () => { const [sentimentData, setSentimentData] = useState(undefined) + const [setBudget] = useUserStore((s) => [s.setBudget]) const [isLoading, setIsLoading] = useState(false) @@ -34,7 +37,7 @@ export const Sentiment = () => { ) getSentimentData() - .then((r) => { + .then(async (r) => { setSentimentData( r?.data .filter((i) => i.date) @@ -43,6 +46,8 @@ export const Sentiment = () => { score: i.sentiment_score, })), ) + + await updateBudget(setBudget) }) .catch(console.error) .finally(() => { diff --git a/src/components/App/SideBar/AudioClip/index.tsx b/src/components/App/SideBar/AudioClip/index.tsx index a87fe45c1..cd0d40dfe 100644 --- a/src/components/App/SideBar/AudioClip/index.tsx +++ b/src/components/App/SideBar/AudioClip/index.tsx @@ -1,12 +1,16 @@ -import { memo, useCallback, useEffect } from 'react' +import { Divider } from '@mui/material' +import { memo, useCallback, useEffect, useRef, useState } from 'react' import styled from 'styled-components' import { AudioPlayer } from '~/components/AudioPlayer' +import { Booster } from '~/components/Booster' import { Avatar } from '~/components/common/Avatar' import { Flex } from '~/components/common/Flex' import { setIsTimestampLoaded, useSelectedNode } from '~/stores/useDataStore' import { usePlayerStore } from '~/stores/usePlayerStore' import { formatDescription } from '~/utils/formatDescription' import { useIsMatchBreakpoint } from '~/utils/useIsMatchBreakpoint' +import { BoostAmt } from '../../Helper/BoostAmt' +import { Description } from '../Description' import { Episode } from '../Relevance/Episode' import { Transcript } from '../Transcript' @@ -23,8 +27,9 @@ const PlayerWrapper = styled(Flex)` padding: 30px 18px 0; ` -const TranscriptWrapper = styled(Flex)` - padding: 0 18px 18px; +const StyledDivider = styled(Divider)` + margin: auto 0px 2px 0px; + opacity: 75%; ` const StyledEpisode = styled(Episode)` @@ -41,12 +46,28 @@ const _AudioClip = () => { const isMobile = useIsMatchBreakpoint('sm', 'down') const isPlay = usePlayerStore((s) => s.isPlaying) const setIsPlaying = usePlayerStore((s) => s.setIsPlaying) + const scrollTargetRef = useRef(null) - const { image_url: imageUrl, description, date, boost, type, id, episode_title: episodeTitle } = selectedNode || {} + const { + image_url: imageUrl, + show_title: showTitle, + date, + boost, + type, + id, + ref_id: refId, + episode_title: episodeTitle, + } = selectedNode || {} + + const [boostAmount, setBoostAmount] = useState(boost || 0) useEffect( () => () => { setIsPlaying(false) + + if (scrollTargetRef.current) { + scrollTargetRef.current.scrollTo({ top: 0, behavior: 'auto' }) + } }, [setIsPlaying], ) @@ -87,20 +108,42 @@ const _AudioClip = () => { null} - title={episodeTitle} + showTitle={formatDescription(showTitle)} type={type} /> {/* */} - - - + +
+ + + + + + + + + + + + +
) } export const AudioClip = memo(_AudioClip) + +const BoostWrapper = styled(Flex)` + flex-direction: row; + justify-content: space-between; + padding: 18px 18px 18px; +` + +const TextWrapper = styled(Flex)` + padding: 18px 18px 18px; +` diff --git a/src/components/App/SideBar/Description/index.tsx b/src/components/App/SideBar/Description/index.tsx new file mode 100644 index 000000000..e46d64e15 --- /dev/null +++ b/src/components/App/SideBar/Description/index.tsx @@ -0,0 +1,67 @@ +import styled from 'styled-components' +import NotesIcon from '~/components/Icons/NotesIcon' +import { Flex } from '~/components/common/Flex' +import { NodeExtended } from '~/types' +import { colors } from '~/utils/colors' + +type DescriptionProps = { + stateless?: boolean + node: NodeExtended | null +} + +export const Description = ({ stateless, node }: DescriptionProps) => ( + +
+ {stateless && ( + +
+ +
+
Description
+
+ )} +
+ {node?.description ? `"${node?.description}"` : '...'} +
+) + +const Heading = styled(Flex).attrs({ + direction: 'row', + align: 'center', +})` + .icon { + font-size: 16px; + color: ${colors.GRAY3}; + margin-right: 7px; + } + + .title { + color: ${colors.white}; + font-family: Barlow; + font-size: 10px; + font-style: normal; + font-weight: 700; + line-height: normal; + letter-spacing: 1px; + text-transform: uppercase; + } +` + +const Header = styled(Flex).attrs({ + direction: 'row', + align: 'center', + justify: 'space-between', +})` + margin-bottom: 18px; +` + +const Box = styled(Flex)` + color: ${colors.white}; + text-overflow: ellipsis; + whitespace: nowrap; + font-family: Barlow; + font-size: 13px; + font-style: normal; + font-weight: 400; + line-height: 18px; +` diff --git a/src/components/App/SideBar/Relevance/Episode/index.tsx b/src/components/App/SideBar/Relevance/Episode/index.tsx index 1c55332a8..5d7a9d19d 100644 --- a/src/components/App/SideBar/Relevance/Episode/index.tsx +++ b/src/components/App/SideBar/Relevance/Episode/index.tsx @@ -42,11 +42,11 @@ const EpisodeWrapper = styled(Flex).attrs({ type Props = { boostCount: number date: number - description: string + episodeTitle: string isSelectedView?: boolean id?: string imageUrl: string - title?: string + showTitle?: string text?: string type?: string name?: string @@ -60,11 +60,11 @@ type Props = { export const Episode = ({ boostCount, date, - description, + episodeTitle, id, isSelectedView = false, imageUrl, - title, + showTitle, type, text, name, @@ -94,10 +94,10 @@ export const Episode = ({ - {description} + {episodeTitle} {Boolean(date) && {moment.unix(date).format('ll')}} - {Boolean(title) && {title}} + {Boolean(showTitle) && {showTitle}} {!isSelectedView && boostCount > 0 && ( @@ -108,7 +108,7 @@ export const Episode = ({ )} {['person', 'guest'].includes(type as string) && ( - + )} {type === 'tweet' && ( { {currentNodes.map((n, index) => { const { image_url: imageUrl, - description, date, boost, type, id, episode_title: episodeTitle, + show_title: showTitle, node_type: nodeType, text, name, @@ -78,14 +78,14 @@ export const Relevance = ({ isSearchResult }: Props) => { key={index.toString()} boostCount={boost || 0} date={date || 0} - description={formatDescription(description)} + episodeTitle={formatDescription(episodeTitle)} id={id} imageUrl={imageUrl || ''} name={name || ''} onClick={() => handleNodeClick(n)} profilePicture={profilePicture} + showTitle={formatDescription(showTitle)} text={text || ''} - title={episodeTitle} twitterHandle={twitterHandle} type={type || nodeType} verified={verified} diff --git a/src/components/App/SideBar/Transcript/index.tsx b/src/components/App/SideBar/Transcript/index.tsx index 32795b8b3..4e91163a9 100644 --- a/src/components/App/SideBar/Transcript/index.tsx +++ b/src/components/App/SideBar/Transcript/index.tsx @@ -68,19 +68,11 @@ export const Transcript = ({ stateless, node }: TranscriptProps) => { )} - - {node?.text ? `"${node?.text}"` : '...'} - + {node?.text ? `"${node?.text}"` : '...'} ) } -const ScrollWrapper = styled(Flex)(() => ({ - overflow: 'auto', - flex: 1, - width: '100%', -})) - const Heading = styled(Flex).attrs({ direction: 'row', align: 'center', diff --git a/src/components/App/SideBar/YouTube/index.tsx b/src/components/App/SideBar/YouTube/index.tsx index 94bfc8d96..14df0cda8 100644 --- a/src/components/App/SideBar/YouTube/index.tsx +++ b/src/components/App/SideBar/YouTube/index.tsx @@ -8,23 +8,25 @@ import { useDataStore } from '~/stores/useDataStore' import { formatDescription } from '~/utils/formatDescription' import { videoTimetoSeconds } from '~/utils/videoTimetoSeconds' import { BoostAmt } from '../../Helper/BoostAmt' +import { Description } from '../Description' import { Episode } from '../Relevance/Episode' import { Transcript } from '../Transcript' export const YouTube = () => { const selectedNode = useDataStore((s) => s.selectedNode) const playerRef = useRef(null) + const scrollTargetRef = useRef(null) const { link, timestamp, image_url: imageUrl, - description, date, boost, type, id, show_title: showTitle, + episode_title: episodeTitle, ref_id: refId, } = selectedNode || {} @@ -35,6 +37,10 @@ export const YouTube = () => { if (playerRef.current) { playerRef.current?.seekTo(secs) } + + if (scrollTargetRef.current) { + scrollTargetRef.current.scrollTo({ top: 0, behavior: 'auto' }) + } }, [playerRef, secs]) if (!selectedNode) { @@ -51,23 +57,29 @@ export const YouTube = () => { null} - title={showTitle} + showTitle={showTitle} type={type} /> - - - - - - - - +
+ + + + + + + + + + + + +
) } @@ -88,11 +100,11 @@ const PlayerWrapper = styled(Flex)` const BoostWrapper = styled(Flex)` flex-direction: row; justify-content: space-between; - padding: 0 18px 18px; + padding: 18px 18px 18px; ` -const TranscriptWrapper = styled(Flex)` - padding: 0 18px 18px; +const TextWrapper = styled(Flex)` + padding: 18px 18px 18px; ` const StyledEpisode = styled(Episode)` @@ -104,7 +116,6 @@ const StyledEpisode = styled(Episode)` ` const StyledDivider = styled(Divider)` - margin-bottom: 10px; - margin: auto 0px 10px 0px; + margin: auto 0px 2px 0px; opacity: 75%; ` diff --git a/src/components/App/index.tsx b/src/components/App/index.tsx index f1e888294..b06913f1f 100644 --- a/src/components/App/index.tsx +++ b/src/components/App/index.tsx @@ -6,18 +6,20 @@ import * as sphinx from 'sphinx-bridge-kevkevinpal' import styled from 'styled-components' import { AddNodeModal } from '~/components/AddNodeModal' import { BudgetExplanationModal } from '~/components/BudgetExplanationModal' +import { Flex } from '~/components/common/Flex' import { DataRetriever } from '~/components/DataRetriever' import { GlobalStyle } from '~/components/GlobalStyle' import { Universe } from '~/components/Universe' -import { Flex } from '~/components/common/Flex' import { isDevelopment, isE2E } from '~/constants' import { getGraphDataPositions } from '~/network/fetchGraphData/const' import { useAppStore } from '~/stores/useAppStore' import { useDataStore } from '~/stores/useDataStore' import { useModal } from '~/stores/useModalStore' import { useTeachStore } from '~/stores/useTeachStore' +import { useUserStore } from '~/stores/useUserStore' import { GraphData } from '~/types' import { colors } from '~/utils/colors' +import { updateBudget } from '~/utils/setBudget' import { E2ETests } from '~/utils/tests' import version from '~/utils/versionHelper' import { SourcesTableModal } from '../SourcesTableModal' @@ -49,6 +51,8 @@ const Version = styled(Flex)` export const App = () => { const { open } = useModal('budgetExplanation') + const [setBudget] = useUserStore((s) => [s.setBudget]) + const [ setSidebarOpen, searchTerm, @@ -97,14 +101,24 @@ export const App = () => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore await sphinx.enable() + + await updateBudget(setBudget) } + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + await sphinx.enable() + + await updateBudget(setBudget) + setSphinxModalOpen(false) } - fetchData(searchTerm) + await fetchData(searchTerm) setSidebarOpen(true) - }, [fetchData, searchTerm, setSphinxModalOpen, setSidebarOpen]) + + await updateBudget(setBudget) + }, [fetchData, searchTerm, setSphinxModalOpen, setSidebarOpen, setBudget]) useEffect(() => { if (searchTerm) { diff --git a/src/components/Booster/index.tsx b/src/components/Booster/index.tsx index 516970619..168dd7d7b 100644 --- a/src/components/Booster/index.tsx +++ b/src/components/Booster/index.tsx @@ -1,11 +1,12 @@ import { useEffect, useState } from 'react' import { MdBolt } from 'react-icons/md' -import BoostIcon from '~/components/Icons/BoostIcon' import ClipLoader from 'react-spinners/ClipLoader' import { toast } from 'react-toastify' import { Flex } from '~/components/common/Flex' import { Pill } from '~/components/common/Pill' +import BoostIcon from '~/components/Icons/BoostIcon' import { BOOST_ERROR_BUDGET, BOOST_SUCCESS } from '~/constants' +import { useUserStore } from '~/stores/useUserStore' import { Node } from '~/types' import { boost } from '~/utils/boost' import { colors } from '~/utils/colors' @@ -30,6 +31,7 @@ const notify = (message: string) => { export const Booster = ({ count = 0, updateCount, content, readOnly, refId }: Props) => { const [submitting, setSubmitting] = useState(false) const [isSuccess, setIsSuccess] = useState(false) + const [setBudget] = useUserStore((s) => [s.setBudget]) useEffect(() => { setIsSuccess(false) @@ -53,7 +55,7 @@ export const Booster = ({ count = 0, updateCount, content, readOnly, refId }: Pr // eslint-disable-next-line no-useless-catch try { - await boost(refId, defaultBoostAmount) + const boostResponse = await boost(refId, defaultBoostAmount) setIsSuccess(true) notify(BOOST_SUCCESS) @@ -61,6 +63,10 @@ export const Booster = ({ count = 0, updateCount, content, readOnly, refId }: Pr if (updateCount) { updateCount(count + defaultBoostAmount) } + + if (boostResponse.budget) { + setBudget(boostResponse.budget) + } } catch (e) { notify(BOOST_ERROR_BUDGET) } diff --git a/src/components/Icons/BoostIcon.tsx b/src/components/Icons/BoostIcon.tsx index d3f1e8632..d126786d0 100644 --- a/src/components/Icons/BoostIcon.tsx +++ b/src/components/Icons/BoostIcon.tsx @@ -1,14 +1,8 @@ /* eslint-disable */ -import React from 'react'; +import React from 'react' const BoostIcon: React.FC> = (props) => ( - + > = (props) => ( fill="currentColor" /> -); +) -export default BoostIcon; +export default BoostIcon diff --git a/src/components/Icons/BudgetIcon.tsx b/src/components/Icons/BudgetIcon.tsx new file mode 100644 index 000000000..9726aae49 --- /dev/null +++ b/src/components/Icons/BudgetIcon.tsx @@ -0,0 +1,13 @@ +/* eslint-disable */ +import React from 'react' + +const BudgetIcon: React.FC> = (props) => ( + + + +) + +export default BudgetIcon diff --git a/src/components/SourcesTableModal/SourcesView/QueuedSources/Table/index.tsx b/src/components/SourcesTableModal/SourcesView/QueuedSources/Table/index.tsx index 921577216..146a87893 100644 --- a/src/components/SourcesTableModal/SourcesView/QueuedSources/Table/index.tsx +++ b/src/components/SourcesTableModal/SourcesView/QueuedSources/Table/index.tsx @@ -4,16 +4,16 @@ import { MdCancel, MdCheckCircle } from 'react-icons/md' import { ClipLoader } from 'react-spinners' import * as sphinx from 'sphinx-bridge-kevkevinpal' import styled from 'styled-components' -import FilterOffIcon from '~/components/Icons/FilterOffIcon' import ConfirmPopover from '~/components/common/ConfirmPopover' import { Flex } from '~/components/common/Flex' import { Text } from '~/components/common/Text' +import FilterOffIcon from '~/components/Icons/FilterOffIcon' import { approveRadarData, deleteRadarData } from '~/network/fetchSourcesData' import { useDataStore } from '~/stores/useDataStore' import { Sources } from '~/types' import { colors } from '~/utils/colors' import { StyledTableCell, StyledTableHead, StyledTableRow } from '../../common' -import { TWITTER_LINK, sourcesMapper } from '../../constants' +import { sourcesMapper, TWITTER_LINK } from '../../constants' import { Props } from '../../types' const Table: React.FC = ({ data }) => { diff --git a/src/components/SourcesTableModal/SourcesView/Sources/index.tsx b/src/components/SourcesTableModal/SourcesView/Sources/index.tsx index b9561617f..d71019cc6 100644 --- a/src/components/SourcesTableModal/SourcesView/Sources/index.tsx +++ b/src/components/SourcesTableModal/SourcesView/Sources/index.tsx @@ -6,10 +6,10 @@ import { ClipLoader } from 'react-spinners' import { toast } from 'react-toastify' import * as sphinx from 'sphinx-bridge-kevkevinpal' import styled from 'styled-components' -import ShieldPersonIcon from '~/components/Icons/ShieldPersonIcon' import { Flex } from '~/components/common/Flex' import { Text } from '~/components/common/Text' import { ToastMessage } from '~/components/common/Toast/toastMessage' +import ShieldPersonIcon from '~/components/Icons/ShieldPersonIcon' import { getRadarData, triggerRadarJob } from '~/network/fetchSourcesData' import { useDataStore } from '~/stores/useDataStore' import { useUserStore } from '~/stores/useUserStore' diff --git a/src/components/Stats/index.tsx b/src/components/Stats/index.tsx index 5207762e0..0458bd459 100644 --- a/src/components/Stats/index.tsx +++ b/src/components/Stats/index.tsx @@ -2,13 +2,15 @@ import { noop } from 'lodash' import { useEffect, useState } from 'react' import styled from 'styled-components' import AudioIcon from '~/components/Icons/AudioIcon' +import BudgetIcon from '~/components/Icons/BudgetIcon' import NodesIcon from '~/components/Icons/NodesIcon' import TwitterIcon from '~/components/Icons/TwitterIcon' import VideoIcon from '~/components/Icons/VideoIcon' import { api } from '~/network/api' +import { useUserStore } from '~/stores/useUserStore' import { colors } from '~/utils/colors' -import EpisodeIcon from '../Icons/EpisodeIcon' import { Flex } from '../common/Flex' +import EpisodeIcon from '../Icons/EpisodeIcon' type StatResponse = { /* eslint-disable camelcase */ @@ -33,6 +35,19 @@ type TStats = { export const Stats = () => { const [stats, setStats] = useState(null) + const [budget] = useUserStore((s) => [s.budget]) + + function formatBudget(value: number | null) { + if (value === null) { + return '?' + } + + const stringBudget = value.toLocaleString() + + const splittedBudget = stringBudget.split(',') + + return splittedBudget.join(' ') + } useEffect(() => { const run = async () => { @@ -63,38 +78,52 @@ export const Stats = () => { } return ( - - -
- -
-
{stats.numNodes}
- - -
- -
-
{stats.numEpisodes}
-
- -
- -
-
{stats.numAudio}
-
- -
- -
-
{stats.numVideo}
-
- -
- -
-
{stats.numTwitterSpace}
-
- + + + +
+ +
+
{stats.numNodes}
+
+ +
+ +
+
{stats.numEpisodes}
+
+ +
+ +
+
{stats.numAudio}
+
+ +
+ +
+
{stats.numVideo}
+
+ +
+ +
+
{stats.numTwitterSpace}
+
+
+ + +
+ +
+
+

+ {`${formatBudget(budget)} `} SAT +

+
+
+
+
) } @@ -105,6 +134,21 @@ const StatisticsWrapper = styled(Flex).attrs({ justify: 'flex-start', })`` +const StatisticsBudget = styled(Flex).attrs({ + align: 'center', + direction: 'row', + grow: 1, + justify: 'flex-end', +})`` + +const StatisticsContainer = styled(Flex).attrs({ + align: 'center', + direction: 'row', + grow: 1, +})` + justify-content: between; +` + const Stat = styled(Flex).attrs({ align: 'center', direction: 'row', @@ -138,3 +182,47 @@ const Stat = styled(Flex).attrs({ .text { } ` + +const Budget = styled(Flex).attrs({ + align: 'center', + direction: 'row', +})` + display: flex; + height: 2.5rem; + padding: 0.75rem 0.9375rem 0.75rem 0.9375rem; + align-items: center; + gap: 0.625rem; + color: ${colors.white}; + background: ${colors.BG1}; + font-family: Barlow; + font-size: 0.75rem; + font-style: normal; + font-weight: 500; + line-height: normal; + letter-spacing: 0.0075rem; + border-radius: 12.5rem; + + &:hover { + background: ${colors.BUTTON1_PRESS}; + } + + &:active { + background: ${colors.BUTTON1}; + } + + .icon { + display: flex; + align-items: center; + justify-content: center; + } + + .budgetUnit { + color: ${colors.GRAY6}; + } + + .text { + display: flex; + align-items: center; + justify-content: center; + } +` diff --git a/src/network/fetchGraphData/index.ts b/src/network/fetchGraphData/index.ts index 823715fd5..fae8a46d7 100644 --- a/src/network/fetchGraphData/index.ts +++ b/src/network/fetchGraphData/index.ts @@ -168,7 +168,7 @@ export const postInstagraph = async (data: TeachData): Promise => { const lsatToken = await getLSat() try { - return api.post(`/instagraph`, JSON.stringify(data), { Authorization: lsatToken }) + await api.post(`/instagraph`, JSON.stringify(data), { Authorization: lsatToken }) // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (error: any) { @@ -177,7 +177,9 @@ export const postInstagraph = async (data: TeachData): Promise => { await payLsat(lsat) - return postInstagraph(data) + await postInstagraph(data) + + return } throw error @@ -188,7 +190,7 @@ export const postTeachMe = async (data: TeachData): Promise => { const lsatToken = await getLSat() try { - return api.post(`/teachme`, JSON.stringify(data), { Authorization: lsatToken }) + await api.post(`/teachme`, JSON.stringify(data), { Authorization: lsatToken }) // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (error: any) { @@ -197,7 +199,9 @@ export const postTeachMe = async (data: TeachData): Promise => { await payLsat(lsat) - return postTeachMe(data) + await postTeachMe(data) + + return } throw error @@ -208,7 +212,7 @@ export const postAskQuestion = async (data: QuestionData): Promise => { const lsatToken = await getLSat() try { - return api.post(`/ask_question`, JSON.stringify(data), { Authorization: lsatToken }) + await api.post(`/ask_question`, JSON.stringify(data), { Authorization: lsatToken }) // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (error: any) { @@ -217,7 +221,9 @@ export const postAskQuestion = async (data: QuestionData): Promise => { await payLsat(lsat) - return postAskQuestion(data) + await postAskQuestion(data) + + return } throw error diff --git a/src/stores/useUserStore/index.ts b/src/stores/useUserStore/index.ts index 02899beb5..50ea6acb6 100644 --- a/src/stores/useUserStore/index.ts +++ b/src/stores/useUserStore/index.ts @@ -5,15 +5,19 @@ export type UserStore = { pubKey: string setIsAdmin: (val: boolean) => void setPubKey: (val: string) => void + budget: number | null + setBudget: (val: number | null) => void } -const defaultData: Omit = { +const defaultData: Omit = { isAdmin: false, pubKey: '', + budget: 0, } export const useUserStore = create((set) => ({ ...defaultData, setIsAdmin: (isAdmin) => set({ isAdmin }), setPubKey: (pubKey) => set({ pubKey }), + setBudget: (budget) => set({ budget }), })) diff --git a/src/utils/boost/index.tsx b/src/utils/boost/index.tsx index 7777a036c..146a745bc 100644 --- a/src/utils/boost/index.tsx +++ b/src/utils/boost/index.tsx @@ -35,16 +35,22 @@ const boostAgainstBudget = async (amount: number) => { if (!res) { throw new Error('Keysend failed after topup') } + + return res } + + return res } export const boost = async (refId: string, amount: number) => { - await boostAgainstBudget(amount) + const boostResponse = await boostAgainstBudget(amount) const body = { amount, refid: refId, } - return api.post('/boost', JSON.stringify(body)) + await api.post('/boost', JSON.stringify(body)) + + return boostResponse } diff --git a/src/utils/setBudget/index.ts b/src/utils/setBudget/index.ts new file mode 100644 index 000000000..4799f788b --- /dev/null +++ b/src/utils/setBudget/index.ts @@ -0,0 +1,17 @@ +import * as sphinx from 'sphinx-bridge-kevkevinpal' + +export async function updateBudget(setBudget: (value: number | null) => void) { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + await sphinx.enable() + + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + const budget = await sphinx.getBudget() + + if (budget?.msg === 'Invalid Action') { + setBudget(null) + } else if (budget?.budget) { + setBudget(budget.budget) + } +} diff --git a/yarn.lock b/yarn.lock index 806b5d81d..614fc8d07 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13425,12 +13425,12 @@ __metadata: languageName: node linkType: hard -"sphinx-bridge-kevkevinpal@npm:0.2.58": - version: 0.2.58 - resolution: "sphinx-bridge-kevkevinpal@npm:0.2.58" +"sphinx-bridge-kevkevinpal@npm:0.2.60": + version: 0.2.60 + resolution: "sphinx-bridge-kevkevinpal@npm:0.2.60" dependencies: invoices: ^2.1.0 - checksum: 6c8f95abeca7a9e70eb93de37d21d1a0bf96480d8668c1af66ac8c9bf94c22884acf6b7f222977573d2c88a2c431e6a95fc769f3baa08aab63f0ae00c028aa05 + checksum: 3336289100ddf0d8521e32b5a7c8a41fd9c9a58a986402958f91e52fc279ee6058bfddb3bec6d53ae985a373e2f0e26cab8cc83f81489523f0af5681e1c69753 languageName: node linkType: hard @@ -13527,7 +13527,7 @@ __metadata: rollup-plugin-node-polyfills: ^0.2.1 rollup-plugin-polyfill-node: ^0.12.0 socket.io-client: ^4.6.1 - sphinx-bridge-kevkevinpal: 0.2.58 + sphinx-bridge-kevkevinpal: 0.2.60 stream-browserify: ^3.0.0 string_decoder: ^1.3.0 styled-components: ^5.3.9