@juejin-opensource/jusage 0.1.3 → 0.1.6-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/rank-C9MoOP_H.js","assets/env-BbnNUCLB.js","assets/index-Dcf5uSFM.js","assets/pricing-CkW_F8H_.js","assets/download-DgoD8a6U.js","assets/ChevronDown-CQwgznix.js","assets/dashboard-lj5vT943.js","assets/dashboard-QA2DxQpC.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/rank-DNpmekT1.js","assets/env-Bahc-RuR.js","assets/index-C28OANM4.js","assets/downloads-DRt36RTZ.js","assets/pricing-C1AgdgdM.js","assets/download-w1_SlsVA.js","assets/ChevronDown-raqOGGZY.js","assets/dashboard-2aS4UXAq.js","assets/dashboard-QA2DxQpC.css"])))=>i.map(i=>d[i]);
2
2
  var Ag=e=>{throw TypeError(e)};var Lg=(e,t,l)=>t.has(e)||Ag("Cannot "+l);var kg=(e,t,l)=>(Lg(e,t,"read from private field"),l?l.call(e):t.get(e)),Ng=(e,t,l)=>t.has(e)?Ag("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,l),Xd=(e,t,l,r)=>(Lg(e,t,"write to private field"),r?r.call(e,l):t.set(e,l),l);function a8(e,t){for(var l=0;l<t.length;l++){const r=t[l];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function l(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=l(i);fetch(i.href,s)}})();function by(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wd={exports:{}},po={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
@@ -74,7 +74,7 @@ Error generating stack: `+c.message+`
74
74
  * {
75
75
  overscroll-behavior: contain;
76
76
  }
77
- }`.trim(),document.head.prepend(i);let u=p=>{if(!(p.touches.length===2||l)){if(!t||t===document.documentElement||t===document.body){p.preventDefault();return}t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth&&p.preventDefault()}},f=p=>{var w;let b=ve(p),v=p.relatedTarget;if(v&&Ao(v))v.focus({preventScroll:!0}),ev(v,Ao(b));else if(!v){let x=(w=b.parentElement)==null?void 0:w.closest("[tabindex]");x==null||x.focus({preventScroll:!0})}},d=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(p){let b=et(),v=b!=null&&Ao(b);d.call(this,{...p,preventScroll:!0}),(!p||!p.preventScroll)&&ev(this,v)};let h=er(M0(document,"touchstart",r,{passive:!1,capture:!0}),M0(document,"touchmove",u,{passive:!1,capture:!0}),M0(document,"blur",f,!0));return()=>{e(),h(),i.remove(),HTMLElement.prototype.focus=d}}function Fc(e,t,l){let r=e.style[t];return e.style[t]=l,()=>{e.style[t]=r}}function M0(e,t,l,r){return e.addEventListener(t,l,r),()=>{e.removeEventListener(t,l,r)}}function ev(e,t){t||!No?tv(e):No.addEventListener("resize",()=>tv(e),{once:!0})}function tv(e){let t=document.scrollingElement||document.documentElement,l=e;for(;l&&l!==t;){let r=i3(l);if(r!==document.documentElement&&r!==document.body&&r!==l){let i=r.getBoundingClientRect(),s=l.getBoundingClientRect();if(s.top<i.top||s.bottom>i.top+l.clientHeight){let u=i.bottom;No&&(u=Math.min(u,No.offsetTop+No.height));let f=s.top-i.top-((u-i.top)/2-s.height/2);r.scrollTo({top:Math.max(0,Math.min(r.scrollHeight-r.clientHeight,r.scrollTop+f)),behavior:"smooth"})}}l=r.parentElement}}function ER(e,t){let{triggerRef:l,popoverRef:r,groupRef:i,isNonModal:s,isKeyboardDismissDisabled:u,shouldCloseOnInteractOutside:f,...d}=e,h=d.trigger==="SubmenuTrigger",{overlayProps:p,underlayProps:b}=o4({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!s||h,isKeyboardDismissDisabled:u,shouldCloseOnInteractOutside:f},i??r),{overlayProps:v,arrowProps:w,placement:x,triggerAnchorPoint:T}=sR({...d,targetRef:l,overlayRef:r,isOpen:t.isOpen,onClose:s&&!h?t.close:null,getTargetRect:d.getTargetRect??(t.point?()=>new DOMRect(t.point.x,t.point.y,0,0):void 0)});s4({isDisabled:s||!t.isOpen}),y.useEffect(()=>{if(t.isOpen&&r.current)return s?QT((i==null?void 0:i.current)??r.current):n4([(i==null?void 0:i.current)??r.current],{shouldUseInert:!0})},[s,t.isOpen,r,i]);let{focusWithinProps:C}=Yo(e);return{popoverProps:Ce(p,v,C),arrowProps:w,underlayProps:b,placement:x,triggerAnchorPoint:T}}var c4={};c4={dismiss:"تجاهل"};var u4={};u4={dismiss:"Отхвърляне"};var f4={};f4={dismiss:"Odstranit"};var d4={};d4={dismiss:"Luk"};var h4={};h4={dismiss:"Schließen"};var m4={};m4={dismiss:"Απόρριψη"};var p4={};p4={dismiss:"Dismiss"};var g4={};g4={dismiss:"Descartar"};var b4={};b4={dismiss:"Lõpeta"};var v4={};v4={dismiss:"Hylkää"};var y4={};y4={dismiss:"Rejeter"};var x4={};x4={dismiss:"התעלם"};var S4={};S4={dismiss:"Odbaci"};var w4={};w4={dismiss:"Elutasítás"};var E4={};E4={dismiss:"Ignora"};var C4={};C4={dismiss:"閉じる"};var T4={};T4={dismiss:"무시"};var R4={};R4={dismiss:"Atmesti"};var M4={};M4={dismiss:"Nerādīt"};var A4={};A4={dismiss:"Lukk"};var L4={};L4={dismiss:"Negeren"};var k4={};k4={dismiss:"Zignoruj"};var N4={};N4={dismiss:"Descartar"};var D4={};D4={dismiss:"Dispensar"};var $4={};$4={dismiss:"Revocare"};var z4={};z4={dismiss:"Пропустить"};var P4={};P4={dismiss:"Zrušiť"};var O4={};O4={dismiss:"Opusti"};var j4={};j4={dismiss:"Odbaci"};var I4={};I4={dismiss:"Avvisa"};var B4={};B4={dismiss:"Kapat"};var H4={};H4={dismiss:"Скасувати"};var K4={};K4={dismiss:"取消"};var U4={};U4={dismiss:"關閉"};var F4={};F4={"ar-AE":c4,"bg-BG":u4,"cs-CZ":f4,"da-DK":d4,"de-DE":h4,"el-GR":m4,"en-US":p4,"es-ES":g4,"et-EE":b4,"fi-FI":v4,"fr-FR":y4,"he-IL":x4,"hr-HR":S4,"hu-HU":w4,"it-IT":E4,"ja-JP":C4,"ko-KR":T4,"lt-LT":R4,"lv-LV":M4,"nb-NO":A4,"nl-NL":L4,"pl-PL":k4,"pt-BR":N4,"pt-PT":D4,"ro-RO":$4,"ru-RU":z4,"sk-SK":P4,"sl-SI":O4,"sr-SP":j4,"sv-SE":I4,"tr-TR":B4,"uk-UA":H4,"zh-CN":K4,"zh-TW":U4};const CR=Symbol.for("react-aria.i18n.locale"),TR=Symbol.for("react-aria.i18n.strings");let Qr;class Au{constructor(t,l="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=l}getStringForLocale(t,l){let i=this.getStringsForLocale(l)[t];if(!i)throw new Error(`Could not find intl message ${t} in ${l} locale`);return i}getStringsForLocale(t){let l=this.strings[t];return l||(l=RR(t,this.strings,this.defaultLocale),this.strings[t]=l),l}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let l=window[CR];if(Qr===void 0){let i=window[TR];if(!i)return null;Qr={};for(let s in i)Qr[s]=new Au({[l]:i[s]},l)}let r=Qr==null?void 0:Qr[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}}function RR(e,t,l="en-US"){if(t[e])return t[e];let r=MR(e),i=AR(e);if(i&&t[`${r}-${i}`])return t[`${r}-${i}`];if(t[r])return t[r];for(let s in t)if(s.startsWith(r+"-"))return t[s];return t[l]}function MR(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}function AR(e){if(Intl.Locale)return new Intl.Locale(e).script}const nv=new Map,lv=new Map;class LR{constructor(t,l){this.locale=t,this.strings=l}format(t,l){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(l,this):r}plural(t,l,r="cardinal"){let i=l["="+t];if(i)return typeof i=="function"?i():i;let s=this.locale+":"+r,u=nv.get(s);u||(u=new Intl.PluralRules(this.locale,{type:r}),nv.set(s,u));let f=u.select(t);return i=l[f]||l.other,typeof i=="function"?i():i}number(t){let l=lv.get(this.locale);return l||(l=new Intl.NumberFormat(this.locale),lv.set(this.locale,l)),l.format(t)}select(t,l){let r=t[l]||t.other;return typeof r=="function"?r():r}}const av=new WeakMap;function kR(e){let t=av.get(e);return t||(t=new Au(e),av.set(e,t)),t}function NR(e,t){return t&&Au.getGlobalDictionaryForPackage(t)||kR(e)}function l2(e,t){let{locale:l}=bi(),r=NR(e,t);return y.useMemo(()=>new LR(l,r),[l,r])}const rv={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function DR(e={}){let{style:t,isFocusable:l}=e,[r,i]=y.useState(!1),{focusWithinProps:s}=Yo({isDisabled:!l,onFocusWithinChange:f=>i(f)}),u=y.useMemo(()=>r?t:t?{...rv,...t}:rv,[r]);return{visuallyHiddenProps:{...s,style:u}}}function V4(e){let{children:t,elementType:l="div",isFocusable:r,style:i,...s}=e,{visuallyHiddenProps:u}=DR(e);return V.createElement(l,Ce(s,u),t)}function $R(e){return e&&e.__esModule?e.default:e}function mh(e){let{onDismiss:t,...l}=e,r=l2($R(F4),"@react-aria/overlays"),i=Kh(l,r.format("dismiss")),s=()=>{t&&t()};return V.createElement(V4,null,V.createElement("button",{...i,tabIndex:-1,onClick:s,style:{width:1,height:1}}))}const zR=V.forwardRef(({children:e,...t},l)=>{let r=y.useRef(!1),i=y.useContext(Ho),s=Ce(i||{},{...t,register(){r.current=!0,i&&i.register()}});return s.ref=bn(l||(i==null?void 0:i.ref)),Uh(i,s.ref),y.useEffect(()=>{r.current||(r.current=!0)},[]),V.createElement(Ho.Provider,{value:s},e)});function PR({children:e}){let t=y.useMemo(()=>({register:()=>{}}),[]);return V.createElement(Ho.Provider,{value:t},e)}const OR=y.createContext({});function _4(){return y.useContext(OR)??{}}const G4=V.createContext(null);function ph(e){let t=Nl(),{portalContainer:l=t?null:document.body,isExiting:r}=e,[i,s]=y.useState(!1),u=y.useMemo(()=>({contain:i,setContain:s}),[i,s]),{getContainer:f}=_4();if(!e.portalContainer&&f&&(l=f()),!l)return null;let d=e.children;return e.disableFocusManagement||(d=V.createElement(fR,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!r},d)),d=V.createElement(G4.Provider,{value:u},V.createElement(PR,null,V.createElement(Bo.Provider,{value:null},d))),D9.createPortal(d,l)}function q4(){let e=y.useContext(G4),t=e==null?void 0:e.setContain;Ne(()=>{t==null||t(!0)},[t])}function a2(e){let[t,l]=Ru(e.isOpen,e.defaultOpen||!1,e.onOpenChange),[r,i]=y.useState(null);const s=y.useCallback(()=>{l(!0)},[l]),u=y.useCallback(()=>{l(!1)},[l]),f=y.useCallback(()=>{l(!t)},[l,t]);return{isOpen:t,setOpen:l,open:s,close:u,toggle:f,point:r,setPoint:i}}const Y4=y.createContext(null),iv=y.createContext(null),xz=y.forwardRef(function(t,l){[t,l]=yn(t,l,Y4);let r=y.useContext(yi),i=a2(t),s=t.isOpen!=null||t.defaultOpen!=null||!r?i:r,u=Zc(l,s.isOpen),f=t.isExiting||!t.shouldSkipAnimation&&u||!1,d=oT(),{direction:h}=bi();if(d){let p=t.children;return typeof p=="function"&&(p=p({trigger:t.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),V.createElement(V.Fragment,null,p)}return s&&!s.isOpen&&!f?null:V.createElement(jR,{...t,triggerRef:t.triggerRef,state:s,popoverRef:l,isExiting:f,dir:h})});function jR({state:e,isExiting:t,UNSTABLE_portalContainer:l,clearContexts:r,...i}){var q,te;let s=y.useRef(null),u=y.useRef(null),f=y.useContext(iv),d=f&&i.trigger==="SubmenuTrigger",{popoverProps:h,underlayProps:p,arrowProps:b,placement:v,triggerAnchorPoint:w}=ER({...i,offset:i.offset??8,arrowRef:s,groupRef:d?f:u},e),x=i.popoverRef,T=wu(x,!!v),C=i.isEntering||!i.shouldSkipAnimation&&T||!1,N=At({...i,defaultClassName:"react-aria-Popover",values:{trigger:i.trigger||null,placement:v,isEntering:C,isExiting:t}}),M=!i.isNonModal||i.trigger==="SubmenuTrigger"||i.trigger==="PreviewTrigger",[L,k]=y.useState(i.trigger==="PreviewTrigger");Ne(()=>{x.current&&k(M&&!x.current.querySelector("[role=dialog]"))},[x,M]),y.useEffect(()=>{L&&i.trigger!=="PreviewTrigger"&&(i.trigger!=="SubmenuTrigger"||pa()!=="pointer")&&x.current&&!Oo(x.current)&&va(x.current)},[L,x,i.trigger]);let B=y.useMemo(()=>{let ne=N.children;if(r)for(let j of r)ne=V.createElement(j.Provider,{value:null},ne);return ne},[N.children,r]),[G,$]=y.useState(null),A=y.useCallback(()=>{i.triggerRef.current&&$(i.triggerRef.current.getBoundingClientRect().width+"px")},[i.triggerRef]);Ne(A,[A]),W0({ref:(q=N.style)!=null&&q["--trigger-width"]?void 0:i.triggerRef,onResize:A});let U={...h.style,"--trigger-anchor-point":w?`${w.x}px ${w.y}px`:void 0,...N.style,"--trigger-width":((te=N.style)==null?void 0:te["--trigger-width"])||G},K=V.createElement(ut.div,{...Ce(mt(i,{global:!0}),h),...N,id:L?i.id:void 0,role:L?"dialog":void 0,tabIndex:L?-1:void 0,"aria-label":i["aria-label"],"aria-labelledby":i["aria-labelledby"],ref:x,slot:i.slot||void 0,style:U,dir:i.dir,"data-trigger":i.trigger,"data-placement":v,"data-entering":C||void 0,"data-exiting":t||void 0},!i.isNonModal&&V.createElement(mh,{onDismiss:e.close}),V.createElement(t4.Provider,{value:{...b,placement:v,ref:s}},B),V.createElement(mh,{onDismiss:e.close}));return d?V.createElement(ph,{...i,shouldContainFocus:L&&i.trigger!=="PreviewTrigger",isExiting:t,portalContainer:l??(f==null?void 0:f.current)??void 0},K):V.createElement(ph,{...i,shouldContainFocus:L&&i.trigger!=="PreviewTrigger",isExiting:t,portalContainer:l},!i.isNonModal&&e.isOpen&&V.createElement("div",{"data-testid":"underlay",...p,style:{position:"fixed",inset:0}}),V.createElement("div",{ref:u,style:{display:"contents"}},V.createElement(iv.Provider,{value:u},K)))}class vi{constructor(t){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=t}get childNodes(){throw new Error("childNodes is not supported")}clone(){let t=new this.constructor(this.key);return t.value=this.value,t.level=this.level,t.hasChildNodes=this.hasChildNodes,t.rendered=this.rendered,t.textValue=this.textValue,t["aria-label"]=this["aria-label"],t.index=this.index,t.parentKey=this.parentKey,t.prevKey=this.prevKey,t.nextKey=this.nextKey,t.firstChildKey=this.firstChildKey,t.lastChildKey=this.lastChildKey,t.props=this.props,t.render=this.render,t.colSpan=this.colSpan,t.colIndex=this.colIndex,t}filter(t,l,r){let i=this.clone();return l.addDescendants(i,t),i}}class X4 extends vi{filter(t,l,r){let[i,s]=W4(t,l,this.firstChildKey,r),u=this.clone();return u.firstChildKey=i,u.lastChildKey=s,u}}const T2=class T2 extends vi{};T2.type="header";let ov=T2;const R2=class R2 extends vi{};R2.type="loader";let sv=R2;const M2=class M2 extends X4{filter(t,l,r){if(r(this.textValue,this)){let i=this.clone();return l.addDescendants(i,t),i}return null}};M2.type="item";let cv=M2;const A2=class A2 extends X4{filter(t,l,r){let i=super.filter(t,l,r);if(i&&i.lastChildKey!==null){let s=t.getItem(i.lastChildKey);if(s&&s.type!=="header")return i}return null}};A2.type="section";let uv=A2;class IR{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let t=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;t;)yield t,t=t.nextKey!=null?this.keyMap.get(t.nextKey):void 0}getChildren(t){let l=this.keyMap;return{*[Symbol.iterator](){let r=l.get(t),i=(r==null?void 0:r.firstChildKey)!=null?l.get(r.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?l.get(i.nextKey):void 0}}}getKeyBefore(t){let l=this.keyMap.get(t);if(!l)return null;if(l.prevKey!=null){for(l=this.keyMap.get(l.prevKey);l&&l.type!=="item"&&l.lastChildKey!=null;)l=this.keyMap.get(l.lastChildKey);return(l==null?void 0:l.key)??null}return l.parentKey}getKeyAfter(t){let l=this.keyMap.get(t);if(!l)return null;if(l.type!=="item"&&l.firstChildKey!=null)return l.firstChildKey;for(;l;){if(l.nextKey!=null)return l.nextKey;if(l.parentKey!=null)l=this.keyMap.get(l.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let t=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(t==null?void 0:t.lastChildKey)!=null;)t=this.keyMap.get(t.lastChildKey);return(t==null?void 0:t.key)??null}getItem(t){return this.keyMap.get(t)??null}at(){throw new Error("Not implemented")}clone(){let t=this.constructor,l=new t;return l.keyMap=new Map(this.keyMap),l.firstKey=this.firstKey,l.lastKey=this.lastKey,l.itemCount=this.itemCount,l}addNode(t){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");t.type==="item"&&this.keyMap.get(t.key)==null&&this.itemCount++,this.keyMap.set(t.key,t)}addDescendants(t,l){this.addNode(t);let r=l.getChildren(t.key);for(let i of r)this.addDescendants(i,l)}removeNode(t){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");let l=this.keyMap.get(t);l!=null&&l.type==="item"&&this.itemCount--,this.keyMap.delete(t)}commit(t,l,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=t,this.lastKey=l,this.frozen=!r}filter(t){let l=new this.constructor,[r,i]=W4(this,l,this.firstKey,t);return l==null||l.commit(r,i),l}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}}function W4(e,t,l,r){if(l==null)return[null,null];let i=null,s=null,u=e.getItem(l);for(;u!=null;){let f=u.filter(e,t,r);f!=null&&(f.nextKey=null,s&&(f.prevKey=s.key,s.nextKey=f.key),i==null&&(i=f),t.addNode(f),s=f),u=u.nextKey!=null?e.getItem(u.nextKey):null}if(s&&s.type==="separator"){let f=s.prevKey;t.removeNode(s.key),f!=null?(s=t.getItem(f),s.nextKey=null):s=null}return[(i==null?void 0:i.key)??null,(s==null?void 0:s.key)??null]}class Z4{constructor(t){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=t}*[Symbol.iterator](){let t=this.firstChild;for(;t;)yield t,t=t.nextSibling}get firstChild(){return this._firstChild}set firstChild(t){this._firstChild=t,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(t){this._lastChild=t,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(t){this._previousSibling=t,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(t){this._nextSibling=t,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(t){this._parentNode=t,this.ownerDocument.markDirty(this)}get isConnected(){var t;return((t=this.parentNode)==null?void 0:t.isConnected)||!1}invalidateChildIndices(t){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||t.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=t,this.ownerDocument.markDirty(this))}updateChildIndices(){let t=this._minInvalidChildIndex;for(;t;)t.index=t.previousSibling?t.previousSibling.index+1:0,t=t.nextSibling;this._minInvalidChildIndex=null}appendChild(t){t.parentNode&&t.parentNode.removeChild(t),this.firstChild==null&&(this.firstChild=t),this.lastChild?(this.lastChild.nextSibling=t,t.index=this.lastChild.index+1,t.previousSibling=this.lastChild):(t.previousSibling=null,t.index=0),t.parentNode=this,t.nextSibling=null,this.lastChild=t,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(t,l){if(l==null)return this.appendChild(t);t.parentNode&&t.parentNode.removeChild(t),t.nextSibling=l,t.previousSibling=l.previousSibling,t.index=l.index-1,this.firstChild===l?this.firstChild=t:l.previousSibling&&(l.previousSibling.nextSibling=t),l.previousSibling=t,t.parentNode=l.parentNode,this.invalidateChildIndices(t),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(t){t.parentNode===this&&(this._minInvalidChildIndex===t&&(this._minInvalidChildIndex=null),t.nextSibling&&(this.invalidateChildIndices(t.nextSibling),t.nextSibling.previousSibling=t.previousSibling),t.previousSibling&&(t.previousSibling.nextSibling=t.nextSibling),this.firstChild===t&&(this.firstChild=t.nextSibling),this.lastChild===t&&(this.lastChild=t.previousSibling),t.parentNode=null,t.nextSibling=null,t.previousSibling=null,t.index=0,this.ownerDocument.markDirty(t),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let t=this.previousSibling;for(;t&&t.isHidden;)t=t.previousSibling;return t}get nextVisibleSibling(){let t=this.nextSibling;for(;t&&t.isHidden;)t=t.nextSibling;return t}get firstVisibleChild(){let t=this.firstChild;for(;t&&t.isHidden;)t=t.nextSibling;return t}get lastVisibleChild(){let t=this.lastChild;for(;t&&t.isHidden;)t=t.previousSibling;return t}}class hi extends Z4{constructor(t,l){super(l),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}get index(){return this._index}set index(t){this._index=t,this.ownerDocument.markDirty(this)}get level(){var t;return this.parentNode instanceof hi?this.parentNode.level+(((t=this.parentNode.node)==null?void 0:t.type)==="item"?1:0):0}getMutableNode(){return this.node==null?null:(this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){var r,i,s,u,f,d,h,p;let t=this.nextVisibleSibling,l=this.getMutableNode();if(l!=null&&(l.index=this.index,l.level=this.level,l.parentKey=this.parentNode instanceof hi?((r=this.parentNode.node)==null?void 0:r.key)??null:null,l.prevKey=((s=(i=this.previousVisibleSibling)==null?void 0:i.node)==null?void 0:s.key)??null,l.nextKey=((u=t==null?void 0:t.node)==null?void 0:u.key)??null,l.hasChildNodes=!!this.firstChild,l.firstChildKey=((d=(f=this.firstVisibleChild)==null?void 0:f.node)==null?void 0:d.key)??null,l.lastChildKey=((p=(h=this.lastVisibleChild)==null?void 0:h.node)==null?void 0:p.key)??null,(l.colSpan!=null||l.colIndex!=null)&&t)){let b=(l.colIndex??l.index)+(l.colSpan??1);if(t.node!=null&&b!==t.node.colIndex){let v=t.getMutableNode();v.colIndex=b}}}setProps(t,l,r,i,s){let u,{value:f,textValue:d,id:h,...p}=t;if(this.node==null?(u=new r(h??`react-aria-${++this.ownerDocument.nodeId}`),this.node=u):u=this.getMutableNode(),p.ref=l,u.props=p,u.rendered=i,u.render=s,u.value=f,t["aria-label"]&&(u["aria-label"]=t["aria-label"]),u.textValue=d||(typeof p.children=="string"?p.children:"")||t["aria-label"]||"",h!=null&&h!==u.key)throw new Error("Cannot change the id of an item");p.colSpan!=null&&(u.colSpan=p.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let t=this;return{get display(){return t.isHidden?"none":""},set display(l){var i,s;let r=l==="none";if(t.isHidden!==r){(((i=t.parentNode)==null?void 0:i.firstVisibleChild)===t||((s=t.parentNode)==null?void 0:s.lastVisibleChild)===t)&&t.ownerDocument.markDirty(t.parentNode);let u=t.previousVisibleSibling,f=t.nextVisibleSibling;u&&t.ownerDocument.markDirty(u),f&&t.ownerDocument.markDirty(f),t.isHidden=r,t.ownerDocument.markDirty(t)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}}class BR extends Z4{constructor(t){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=t,this.nextCollection=t}get isConnected(){return!0}createElement(t){return new hi(t,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(t){this.dirtyNodes.add(t)}addNode(t){if(t.isHidden||t.node==null)return;let l=this.getMutableCollection();if(!l.getItem(t.node.key))for(let r of t)this.addNode(r);l.addNode(t.node)}removeNode(t){for(let l of t)this.removeNode(l);t.node&&this.getMutableCollection().removeNode(t.node.key)}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){var t,l,r,i;for(let s of this.dirtyNodes)s instanceof hi&&(!s.isConnected||s.isHidden)?this.removeNode(s):s.updateChildIndices();for(let s of this.dirtyNodes)s instanceof hi?(s.isConnected&&!s.isHidden&&(s.updateNode(),this.addNode(s)),s.node&&this.dirtyNodes.delete(s),s.isMutated=!1):this.dirtyNodes.delete(s);this.nextCollection&&(this.nextCollection.commit(((l=(t=this.firstVisibleChild)==null?void 0:t.node)==null?void 0:l.key)??null,((i=(r=this.lastVisibleChild)==null?void 0:r.node)==null?void 0:i.key)??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0,this.isSSR||(this.collection=this.collection.clone());for(let t of this.subscriptions)t();this.inSubscription=!1}}subscribe(t){return this.subscriptions.add(t),this.queuedRender&&t(),()=>this.subscriptions.delete(t)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}}function Q4(e){let{children:t,items:l,idScope:r,addIdAndValue:i,dependencies:s=[]}=e,u=y.useMemo(()=>{},[t]),f=y.useMemo(()=>new WeakMap,[...s,u]);return y.useMemo(()=>{if(l&&typeof t=="function"){let d=[];for(let h of l){let p=HR(h)?h:null,b=p?f.get(p):null;if(!b){b=t(h);let v=b.props.id??(h==null?void 0:h.key)??(h==null?void 0:h.id);r!=null&&b.props.id==null&&v!=null&&(v=r+":"+v);let w=v??d.length;b=y.cloneElement(b,i?{key:w,id:v,value:h}:{key:w}),p&&f.set(p,b)}d.push(b)}return d}else if(typeof t!="function")return t},[t,l,f,r,i])}function HR(e){switch(typeof e){case"object":return e!=null;case"function":case"symbol":return!0;default:return!1}}var Lu=By();const J4=y.createContext(!1),Uo=y.createContext(null);function KR(e){if(y.useContext(Uo))return e.content;let{collection:l,document:r}=_R(e.createCollection);return V.createElement(V.Fragment,null,V.createElement(iT,null,V.createElement(Uo.Provider,{value:r},e.content)),V.createElement(UR,{render:e.children,collection:l}))}function UR({collection:e,render:t}){return t(e)}function FR(e,t,l){let r=Nl(),i=y.useRef(r);i.current=r;let s=y.useCallback(()=>i.current?l():t(),[t,l]);return Lu.useSyncExternalStore(e,s)}const VR=typeof V.useSyncExternalStore=="function"?V.useSyncExternalStore:FR;function _R(e){let[t]=y.useState(()=>new BR((e==null?void 0:e())||new IR)),l=y.useCallback(u=>t.subscribe(u),[t]),r=y.useCallback(()=>{let u=t.getCollection();return t.isSSR&&t.resetAfterSSR(),u},[t]),i=y.useCallback(()=>(t.isSSR=!0,t.getCollection()),[t]);return{collection:VR(l,r,i),document:t}}const gh=y.createContext(null);function GR(e){var l;return l=class extends vi{},l.type=e,l}function e5(e,t,l,r,i,s){typeof e=="string"&&(e=GR(e));let u=y.useCallback(d=>{d==null||d.setProps(t,l,e,r,s)},[t,l,r,s,e]),f=y.useContext(gh);if(f){let d=f.ownerDocument.nodesByProps.get(t);return d||(d=f.ownerDocument.createElement(e.type),d.setProps(t,l,e,r,s),f.appendChild(d),f.ownerDocument.updateCollection(),f.ownerDocument.nodesByProps.set(t,d)),i?V.createElement(gh.Provider,{value:d},i):null}return V.createElement(e.type,{ref:u},i)}function qR(e,t){let l=({node:i})=>t(i.props,i.props.ref,i),r=y.forwardRef((i,s)=>{let u=y.useContext(Bo);if(!y.useContext(J4)){if(t.length>=3)throw new Error(t.name+" cannot be rendered outside a collection.");return t(i,s)}return e5(e,i,s,"children"in i?i.children:null,null,d=>V.createElement(Bo.Provider,{value:u},V.createElement(l,{node:d})))});return r.displayName=t.name,r}function Sz(e,t,l=t5){let r=({node:s})=>t(s.props,s.props.ref,s),i=y.forwardRef((s,u)=>{let f=l(s);return e5(e,s,u,null,f,d=>V.createElement(r,{node:d}))??V.createElement(V.Fragment,null)});return i.displayName=t.name,i}function t5(e){return Q4({...e,addIdAndValue:!0})}const fv=y.createContext(null);function YR(e){let t=y.useContext(fv),l=((t==null?void 0:t.dependencies)||[]).concat(e.dependencies),r=e.idScope??(t==null?void 0:t.idScope),i=t5({...e,idScope:r,dependencies:l});return y.useContext(Uo)&&(i=V.createElement(XR,null,i)),t=y.useMemo(()=>({dependencies:l,idScope:r}),[r,...l]),V.createElement(fv.Provider,{value:t},i)}function XR({children:e}){let t=y.useContext(Uo),l=y.useMemo(()=>V.createElement(Uo.Provider,{value:null},V.createElement(J4.Provider,{value:!0},e)),[e]);return Nl()?V.createElement(gh.Provider,{value:t},l):al.createPortal(l,t)}const wz=y.createContext(null),n5={CollectionRoot({collection:e,renderDropIndicator:t}){return dv(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:l}){return dv(e,t,l)}};function dv(e,t,l){return Q4({items:t?e.getChildren(t.key):e,dependencies:[l],children(r){if(r.type==="content")return V.createElement(V.Fragment,null);let i=r.render(r);return!l||r.type!=="item"?i:V.createElement(V.Fragment,null,l({type:"item",key:r.key,dropPosition:"before"}),i,WR(e,r,l))}})}function WR(e,t,l){let r=t.key,i=e.getKeyAfter(r),s=i!=null?e.getItem(i):null;for(;s!=null&&s.type!=="item";)i=e.getKeyAfter(s.key),s=i!=null?e.getItem(i):null;let u=t.nextKey!=null?e.getItem(t.nextKey):null;for(;u!=null&&u.type!=="item";)u=u.nextKey!=null?e.getItem(u.nextKey):null;let f=[];if(u==null){let d=t;for(;(d==null?void 0:d.type)==="item"&&(!s||d.parentKey!==s.parentKey&&s.level<d.level);){let h=l({type:"item",key:d.key,dropPosition:"after"});y.isValidElement(h)&&f.push(y.cloneElement(h,{key:`${d.key}-after`})),d=d.parentKey!=null?e.getItem(d.parentKey):null}}return f}const l5=y.createContext(n5);function ZR(e){return y.useMemo(()=>e!=null?new Set([e]):null,[e])}function a5(e){let t=JR(He(e));t!==e&&(t&&QR(t,e),e&&r5(e,t))}function QR(e,t){e.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function r5(e,t){e.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function JR(e){let t=et(e),l=t==null?void 0:t.getAttribute("aria-activedescendant");return l&&e.getElementById(l)||t}const i5=y.createContext(null);function eM(e){let t=y.useRef({});return V.createElement(i5.Provider,{value:t},e.children)}const tM=y.forwardRef(function(t,l){let{name:r,isVisible:i=!0,children:s,className:u,style:f,render:d,...h}=t,[p,b]=y.useState(i?"visible":"hidden"),v=y.useContext(i5);if(!v)throw new Error("<SharedElement> must be rendered inside a <SharedElementTransition>");i&&p==="hidden"&&b("visible"),l=bn(l),Ne(()=>{let x=l.current,T=v.current,C=T[r],N=null;if(x&&i&&C){b("visible");let M=x.getAnimations(),L=C.style.map(([k,B])=>{let G=x.style[k];if(k==="translate"){let $=C.rect,A=x.getBoundingClientRect(),U=$.left-(A==null?void 0:A.left),K=$.top-(A==null?void 0:A.top);x.style.translate=`${U}px ${K}px`}else x.style[k]=B;return[k,G]});for(let k of x.getAnimations())M.includes(k)||k.cancel();N=requestAnimationFrame(()=>{N=null;for(let[k,B]of L)x.style[k]=B}),delete T[r]}else x&&i&&!C?(queueMicrotask(()=>al.flushSync(()=>b("entering"))),N=requestAnimationFrame(()=>{N=null,b("visible")})):x&&!i&&queueMicrotask(()=>{T[r]?(delete T[r],al.flushSync(()=>b("exiting")),Promise.all(x.getAnimations().map(M=>M.finished)).then(()=>b("hidden")).catch(()=>{})):b("hidden")});return()=>{if(N!=null&&cancelAnimationFrame(N),x&&x.isConnected&&!x.hasAttribute("data-exiting")){let M=window.getComputedStyle(x);if(M.transitionProperty!=="none"){let L=M.transitionProperty.split(/\s*,\s*/);T[r]={rect:x.getBoundingClientRect(),style:L.map(k=>[k,M[k]])}}}}},[l,v,r,i]);let w=At({children:s,className:u,style:f,render:d,values:{isEntering:p==="entering",isExiting:p==="exiting"}});return p==="hidden"?null:V.createElement(ut.div,{...h,...w,ref:l,"data-entering":p==="entering"||void 0,"data-exiting":p==="exiting"||void 0})}),o5=y.createContext({isSelected:!1}),nM=y.forwardRef(function(t,l){[t,l]=yn(t,l,o5);let{isSelected:r,...i}=t;return V.createElement(tM,{...i,ref:l,className:t.className||"react-aria-SelectionIndicator",name:"SelectionIndicator",isVisible:r})}),ku=y.createContext({}),s5=y.forwardRef(function(t,l){[t,l]=yn(t,l,ku);let{elementType:r="span",...i}=t,s=ut[r];return V.createElement(s,{className:"react-aria-Text",...i,ref:l})}),lM=500;function aM(e){let{isDisabled:t,pointerType:l,onLongPressStart:r,onLongPressEnd:i,onLongPress:s,threshold:u=lM,accessibilityDescription:f}=e;const d=y.useRef(void 0);let{addGlobalListener:h,removeAllGlobalListeners:p}=Su(),b=x=>l?x.pointerType===l:x.pointerType==="mouse"||x.pointerType==="touch",{pressProps:v}=lr({isDisabled:t,onPressStart(x){if(x.continuePropagation(),b(x)){r&&r({...x,type:"longpressstart"}),d.current=setTimeout(()=>{x.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),h(x.target,"click",C=>C.preventDefault(),{once:!0}),He(x.target).activeElement!==x.target&&en(x.target),s&&s({...x,type:"longpress"}),d.current=void 0},u),x.pointerType==="touch"&&h(x.target,"contextmenu",C=>C.preventDefault(),{once:!0});let T=jt(x.target);h(T,"pointerup",()=>{setTimeout(()=>{p()},100)},{once:!0})}},onPressEnd(x){d.current&&clearTimeout(d.current),i&&b(x)&&i({...x,type:"longpressend"})}}),w=Zw(s&&!t?f:void 0);return{longPressProps:Ce(v,w)}}function rM(e,t,l){let{type:r}=e,{isOpen:i}=t;y.useEffect(()=>{l&&l.current&&a4.set(l.current,t.close)});let s;r==="menu"?s=!0:r==="listbox"&&(s="listbox");let u=_n();return{triggerProps:{"aria-haspopup":s,"aria-expanded":i,"aria-controls":i?u:void 0,onPress:t.toggle},overlayProps:{id:u}}}function bh(e){return hw()?e.altKey:e.ctrlKey}function A0(e,t){var i,s;let l=`[data-key="${CSS.escape(String(t))}"]`,r=(i=e.current)==null?void 0:i.dataset.collection;return r&&(l=`[data-collection="${CSS.escape(r)}"]${l}`),(s=e.current)==null?void 0:s.querySelector(l)}const c5=new WeakMap;function iM(e){let t=_n();return c5.set(e,t),t}function oM(e){return c5.get(e)}const hv=1e3;function sM(e){let{keyboardDelegate:t,selectionManager:l,onTypeSelect:r}=e,i=y.useRef({search:"",timeout:void 0}),s=f=>{if(i.current.search.length>0&&f.key===" "){if(f.preventDefault(),(!("continuePropagation"in f)||"continuePropagation"in f&&!f.isPropagationStopped())&&f.stopPropagation(),i.current.search+=" ",t.getKeyForSearch!=null){let d=t.getKeyForSearch(i.current.search,l.focusedKey);d==null&&(d=t.getKeyForSearch(i.current.search)),d!=null&&(l.setFocusedKey(d),r&&r(d))}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search=""},hv)}},u=f=>{let d=cM(f.key);if(!(!d||f.ctrlKey||f.metaKey||f.altKey||!Ie(f.currentTarget,ve(f))||i.current.search.length===0&&d===" ")){if(i.current.search+=d,t.getKeyForSearch!=null){let h=t.getKeyForSearch(i.current.search,l.focusedKey);if(h==null&&(h=t.getKeyForSearch(i.current.search)),h!=null)l.setFocusedKey(h),r&&r(h),f.preventDefault(),"continuePropagation"in f||f.stopPropagation();else{i.current.search="",clearTimeout(i.current.timeout),i.current.timeout=void 0;return}}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search=""},hv)}};return y.useEffect(()=>{let f=i.current.timeout;return()=>{clearTimeout(f)}},[i]),{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:void 0,onKeyDown:t.getKeyForSearch?u:void 0}}}function cM(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function uM(e){var it;let{selectionManager:t,keyboardDelegate:l,ref:r,autoFocus:i=!1,shouldFocusWrap:s=!1,disallowEmptySelection:u=!1,disallowSelectAll:f=!1,escapeKeyBehavior:d="clearSelection",selectOnFocus:h=t.selectionBehavior==="replace",disallowTypeAhead:p=!1,shouldUseVirtualFocus:b,allowsTabNavigation:v=!1,scrollRef:w=r,linkBehavior:x="action",UNSTABLE_focusOnEntry:T}=e,{direction:C}=bi(),N=Go();const M=(ue,fe,Ee)=>{if(fe!=null){if(t.isLink(fe)&&x==="selection"&&h&&!bh(ue)){al.flushSync(()=>{t.setFocusedKey(fe,Ee)});let _e=A0(r,fe),Fe=t.getItemProps(fe);if(_e){N.open(_e,ue,Fe.href,Fe.routerOptions);return}return!1}if(t.setFocusedKey(fe,Ee),t.isLink(fe)&&x==="override")return!1;if(ue.shiftKey&&t.selectionMode==="multiple"){t.extendSelection(fe);return}else if(h&&!bh(ue)){t.replaceSelection(fe);return}}return!1};let L=ue=>{var fe,Ee,_e;if(l.getKeyBelow){let Fe=t.focusedKey!=null?(fe=l.getKeyBelow)==null?void 0:fe.call(l,t.focusedKey):(Ee=l.getFirstKey)==null?void 0:Ee.call(l);if(Fe==null&&s&&(Fe=(_e=l.getFirstKey)==null?void 0:_e.call(l,t.focusedKey)),Fe!=null){M(ue,Fe);return}}return!1},k=ue=>{var fe,Ee,_e;if(l.getKeyAbove){let Fe=t.focusedKey!=null?(fe=l.getKeyAbove)==null?void 0:fe.call(l,t.focusedKey):(Ee=l.getLastKey)==null?void 0:Ee.call(l);if(Fe==null&&s&&(Fe=(_e=l.getLastKey)==null?void 0:_e.call(l,t.focusedKey)),Fe!=null){M(ue,Fe);return}}return!1},B=ue=>{if(l.getFirstKey){if(t.focusedKey===null&&ue.shiftKey)return!1;let fe=l.getFirstKey(t.focusedKey,To(ue));if(t.setFocusedKey(fe),fe!=null){if(To(ue)&&ue.shiftKey&&t.selectionMode==="multiple"){t.extendSelection(fe);return}else if(h){t.replaceSelection(fe);return}}}return!1},G=ue=>{var fe,Ee,_e,Fe;if(l.getKeyLeftOf){let kt=t.focusedKey!=null?(fe=l.getKeyLeftOf)==null?void 0:fe.call(l,t.focusedKey):(Ee=l.getFirstKey)==null?void 0:Ee.call(l);if(kt==null&&s&&(kt=C==="rtl"?(_e=l.getFirstKey)==null?void 0:_e.call(l,t.focusedKey):(Fe=l.getLastKey)==null?void 0:Fe.call(l,t.focusedKey)),kt!=null){M(ue,kt,C==="rtl"?"first":"last");return}}return!1},$=ue=>{var fe,Ee,_e,Fe;if(l.getKeyRightOf){let kt=t.focusedKey!=null?(fe=l.getKeyRightOf)==null?void 0:fe.call(l,t.focusedKey):(Ee=l.getFirstKey)==null?void 0:Ee.call(l);if(kt==null&&s&&(kt=C==="rtl"?(_e=l.getLastKey)==null?void 0:_e.call(l,t.focusedKey):(Fe=l.getFirstKey)==null?void 0:Fe.call(l,t.focusedKey)),kt!=null){M(ue,kt,C==="rtl"?"last":"first");return}}return!1},A=ue=>{if(l.getLastKey){if(t.focusedKey===null&&ue.shiftKey)return!1;let fe=l.getLastKey(t.focusedKey,To(ue));if(t.setFocusedKey(fe),fe!=null){if(To(ue)&&ue.shiftKey&&t.selectionMode==="multiple"){t.extendSelection(fe);return}else if(h){t.replaceSelection(fe);return}}}return!1},U=ue=>{if(l.getKeyPageBelow&&t.focusedKey!=null){let fe=l.getKeyPageBelow(t.focusedKey);if(fe!=null)return M(ue,fe)}return!1},K=ue=>{if(l.getKeyPageAbove&&t.focusedKey!=null){let fe=l.getKeyPageAbove(t.focusedKey);if(fe!=null)return M(ue,fe)}return!1},q=()=>{if(t.selectionMode==="multiple"&&f!==!0){t.selectAll();return}return!1},te=()=>{if(d==="clearSelection"&&!u&&t.selectedKeys.size!==0){t.clearSelection();return}return!1},ne=()=>{if(!v&&r.current){let ue=ll(r.current,{tabbable:!0}),fe,Ee;do Ee=ue.lastChild(),Ee&&(fe=Ee);while(Ee);let _e=et();fe&&(!Oo(fe)||_e&&!_h(_e))&&en(fe)}return{shouldContinuePropagation:!0,shouldPreventDefault:!1}},j=()=>(!v&&r.current&&r.current.focus(),{shouldContinuePropagation:!0,shouldPreventDefault:!1}),Y=(ue,fe)=>({[Vn()?ue+"+Shift+Alt":ue+"+Shift+Control"]:fe,[ue+"+Shift"]:fe,[Vn()?ue+"+Alt":ue+"+Control"]:fe,[ue]:fe}),{keyboardProps:z}=lu({shortcuts:{...Y("ArrowDown",L),...Y("ArrowUp",k),...Y("ArrowLeft",G),...Y("ArrowRight",$),...Y("PageDown",U),...Y("PageUp",K)},allowRepeats:!0}),{keyboardProps:O}=lu({shortcuts:{...Y("Home",B),...Y("End",A),"Mod+A":q,Escape:te,Tab:ne,"Tab+Shift":j}}),oe=y.useRef({top:0,left:0});xc(w,"scroll",()=>{var ue,fe;oe.current={top:((ue=w.current)==null?void 0:ue.scrollTop)??0,left:((fe=w.current)==null?void 0:fe.scrollLeft)??0}});let J=ue=>{var _e,Fe,kt,Sn;if(t.isFocused){Ie(ue.currentTarget,ve(ue))||t.setFocused(!1);return}if(!Ie(ue.currentTarget,ve(ue)))return;let fe=pa();t.setFocused(!0);let Ee=pt=>{pt!=null&&(t.setFocusedKey(pt),h&&!t.isSelected(pt)&&t.replaceSelection(pt))};if(T&&(fe==="keyboard"||fe==="virtual"))Ee(T==="first"?(_e=l.getFirstKey)==null?void 0:_e.call(l):(Fe=l.getLastKey)==null?void 0:Fe.call(l));else if(t.focusedKey==null){let pt=ue.relatedTarget;pt&&ue.currentTarget.compareDocumentPosition(pt)&Node.DOCUMENT_POSITION_FOLLOWING?Ee(t.lastSelectedKey??((kt=l.getLastKey)==null?void 0:kt.call(l))):Ee(t.firstSelectedKey??((Sn=l.getFirstKey)==null?void 0:Sn.call(l)))}else w.current&&(w.current.scrollTop=oe.current.top,w.current.scrollLeft=oe.current.left);if(t.focusedKey!=null&&w.current){let pt=A0(r,t.focusedKey);pt instanceof HTMLElement&&(!Oo(pt)&&!b&&en(pt),(fe==="keyboard"||T&&fe==="virtual")&&xb(pt,{containingElement:r.current}))}},_=ue=>{Ie(ue.currentTarget,ue.relatedTarget)||t.setFocused(!1)},D=y.useRef(!1);xc(r,fw,b?ue=>{let{detail:fe}=ue;ue.stopPropagation(),t.setFocused(!0),(fe==null?void 0:fe.focusStrategy)==="first"&&(D.current=!0)}:void 0);let Q=((it=l.getFirstKey)==null?void 0:it.call(l))??null;yb(()=>{if(D.current)if(Q==null){let ue=et();a5(r.current),r5(ue,null),t.collection.size>0&&(D.current=!1)}else t.setFocusedKey(Q),D.current=!1},[Q,t.collection.size]),yb(()=>{t.collection.size>0&&(D.current=!1)},[t.focusedKey]),xc(r,uw,b?ue=>{var fe;ue.stopPropagation(),t.setFocused(!1),(fe=ue.detail)!=null&&fe.clearFocusKey&&t.setFocusedKey(null)}:void 0);const se=y.useRef(i),ce=y.useRef(!1);y.useEffect(()=>{var ue,fe;if(se.current){let Ee=null;i==="first"&&(Ee=((ue=l.getFirstKey)==null?void 0:ue.call(l))??null),i==="last"&&(Ee=((fe=l.getLastKey)==null?void 0:fe.call(l))??null);let _e=t.selectedKeys;if(_e.size){for(let Fe of _e)if(t.canSelectItem(Fe)){Ee=Fe;break}}t.setFocused(!0),t.setFocusedKey(Ee),Ee==null&&!b&&r.current&&va(r.current),t.collection.size>0&&(se.current=!1,ce.current=!0)}});let H=y.useRef(t.focusedKey),ie=y.useRef(null);y.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==H.current||ce.current)&&w.current&&r.current){let ue=pa(),fe=A0(r,t.focusedKey);if(!(fe instanceof HTMLElement))return;(ue==="keyboard"||ce.current)&&(ie.current&&cancelAnimationFrame(ie.current),ie.current=requestAnimationFrame(()=>{w.current&&(Hc(w.current,fe),ue!=="virtual"&&xb(fe,{containingElement:r.current}))}))}!b&&t.isFocused&&t.focusedKey==null&&H.current!=null&&r.current&&va(r.current),H.current=t.focusedKey,ce.current=!1}),y.useEffect(()=>()=>{ie.current&&cancelAnimationFrame(ie.current)},[]),xc(r,"react-aria-focus-scope-restore",ue=>{ue.preventDefault(),t.setFocused(!0)});let xe={...Ce(O,z),onFocus:J,onBlur:_,onMouseDown(ue){w.current===ve(ue)&&ue.preventDefault()}},{typeSelectProps:Ae}=sM({keyboardDelegate:l,selectionManager:t});p||(xe=Ce(Ae,xe));let de;b||(de=t.focusedKey==null?0:-1);let Lt=iM(t.collection);return{collectionProps:Ce(xe,{tabIndex:de,"data-collection":Lt})}}function fM(e){let{id:t,selectionManager:l,key:r,ref:i,shouldSelectOnPressUp:s,shouldUseVirtualFocus:u,focus:f,isDisabled:d,onAction:h,allowsDifferentPressOrigin:p,linkBehavior:b="action"}=e,v=Go();t=_n(t);let w=H=>{if(H.pointerType==="keyboard"&&bh(H))l.toggleSelection(r);else{if(l.selectionMode==="none")return;if(l.isLink(r)){if(b==="selection"&&i.current){let ie=l.getItemProps(r);v.open(i.current,H,ie.href,ie.routerOptions),l.setSelectedKeys(l.selectedKeys);return}else if(b==="override"||b==="none")return}l.selectionMode==="single"?l.isSelected(r)&&!l.disallowEmptySelection?l.toggleSelection(r):l.replaceSelection(r):H&&H.shiftKey?l.extendSelection(r):l.selectionBehavior==="toggle"||H&&(To(H)||H.pointerType==="touch"||H.pointerType==="virtual")?l.toggleSelection(r):l.replaceSelection(r)}};y.useEffect(()=>{r===l.focusedKey&&l.isFocused&&(u?a5(i.current):f?f():et()!==i.current&&i.current&&va(i.current))},[i,r,l.focusedKey,l.childFocusStrategy,l.isFocused,u]),d=d||l.isDisabled(r);let x={};!u&&!d?x={tabIndex:r===l.focusedKey?0:-1,onFocus(H){ve(H)===i.current&&l.setFocusedKey(r)}}:d&&(x.onMouseDown=H=>{H.preventDefault()}),y.useEffect(()=>{d&&l.focusedKey===r&&l.setFocusedKey(null)},[l,d,r]);let T=l.isLink(r)&&b==="override",C=h&&e.UNSTABLE_itemBehavior==="action",N=l.isLink(r)&&b!=="selection"&&b!=="none",M=!d&&l.canSelectItem(r)&&!T&&!C,L=(h||N)&&!d,k=L&&(l.selectionBehavior==="replace"?!M:!M||l.isEmpty),B=L&&M&&l.selectionBehavior==="replace",G=k||B,$=y.useRef(null),A=G&&M,U=y.useRef(!1),K=y.useRef(!1),q=l.getItemProps(r),te=H=>{var ie;h&&(h(),(ie=i.current)==null||ie.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}))),N&&i.current&&v.open(i.current,H,q.href,q.routerOptions)},ne={ref:i};s?(ne.onPressStart=H=>{$.current=H.pointerType,U.current=A,H.pointerType==="keyboard"&&(!G||pv(H.key))&&w(H)},p?(ne.onPressUp=k?void 0:H=>{H.pointerType==="mouse"&&M&&w(H)},ne.onPress=k?te:H=>{H.pointerType!=="keyboard"&&H.pointerType!=="mouse"&&M&&w(H)}):ne.onPress=H=>{if(k||B&&H.pointerType!=="mouse"){if(H.pointerType==="keyboard"&&!mv(H.key))return;te(H)}else H.pointerType!=="keyboard"&&M&&w(H)}):(ne.onPressStart=H=>{$.current=H.pointerType,U.current=A,K.current=k,M&&(H.pointerType==="mouse"&&!k||H.pointerType==="keyboard"&&(!L||pv(H.key)))&&w(H)},ne.onPress=H=>{(H.pointerType==="touch"||H.pointerType==="pen"||H.pointerType==="virtual"||H.pointerType==="keyboard"&&G&&mv(H.key)||H.pointerType==="mouse"&&K.current)&&(G?te(H):M&&w(H))});let j=oM(l.collection);if(x["data-collection"]=j,x["data-key"]=r,ne.preventFocusOnPress=u,u&&(ne=Ce(ne,{onPressStart(H){H.pointerType!=="touch"&&(l.setFocused(!0),l.setFocusedKey(r))},onPress(H){H.pointerType==="touch"&&(l.setFocused(!0),l.setFocusedKey(r))}})),q)for(let H of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])q[H]&&(ne[H]=er(ne[H],q[H]));let{pressProps:Y,isPressed:z}=lr(ne),O=B?H=>{$.current==="mouse"&&(H.stopPropagation(),H.preventDefault(),te(H))}:void 0,{longPressProps:oe}=aM({isDisabled:!A,onLongPress(H){H.pointerType==="touch"&&(w(H),l.setSelectionBehavior("toggle"))}}),J=H=>{$.current==="touch"&&U.current&&H.preventDefault()},_=b!=="none"&&l.isLink(r)?H=>{Al.isOpening||H.preventDefault()}:void 0,D=Ce(x,M||k||u&&!d?Y:{},A?oe:{},{onDoubleClick:O,onDragStartCapture:J,onClick:_,id:t},u?{onMouseDown:H=>H.preventDefault()}:void 0),Q=H=>{let ie=H;for(;ie&&ie!==i.current;){let xe=ie.getAttribute("data-collection");if(xe!=null)return xe!==j;ie=ie.parentElement}return _h(H)},se=D.onPointerDown;D.onPointerDown=H=>{let ie=ve(H);if(ie&&ie!==i.current&&Q(ie)){H.stopPropagation();return}se==null||se(H)};let ce=D.onMouseDown;return D.onMouseDown=H=>{let ie=ve(H);if(ie&&ie!==i.current&&Q(ie)){H.stopPropagation();return}ce==null||ce(H)},{itemProps:D,isPressed:z,isSelected:l.isSelected(r),isFocused:l.isFocused&&l.focusedKey===r,isDisabled:d,allowsSelection:M,hasAction:G}}function mv(e){return e==="Enter"}function pv(e){return e===" "}function dM(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function hM(e){return mM(e,0)}function mM(e,t){if(t<0)return;let l=0;for(let r of e){if(l===t)return r;l++}}function Ez(e){let t;for(let l of e)t=l;return t}function L0(e,t,l){if(t.parentKey===l.parentKey)return t.index-l.index;let r=[...gv(e,t),t],i=[...gv(e,l),l],s=r.slice(0,i.length).findIndex((u,f)=>u!==i[f]);return s!==-1?(t=r[s],l=i[s],t.index-l.index):r.findIndex(u=>u===l)>=0?1:(i.findIndex(u=>u===t)>=0,-1)}function gv(e,t){let l=[],r=t;for(;(r==null?void 0:r.parentKey)!=null;)r=e.getItem(r.parentKey),r&&l.unshift(r);return l}function pM(e){let t=a2(e),[l,r]=y.useState(null),[i,s]=y.useState([]),u=()=>{s([]),t.close()};return{focusStrategy:l,...t,open(h=null){r(h),t.open()},toggle(h=null){r(h),t.toggle()},close(){u()},expandedKeysStack:i,openSubmenu:(h,p)=>{s(b=>p>b.length?b:[...b.slice(0,p),h])},closeSubmenu:(h,p)=>{s(b=>b[p]===h?b.slice(0,p):b)}}}class Kn extends Set{constructor(t,l,r){super(t),t instanceof Kn?(this.anchorKey=l??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=l??null,this.currentKey=r??null)}}class r2{constructor(t,l,r){this.collection=t,this.state=l,this.allowsCellSelection=(r==null?void 0:r.allowsCellSelection)??!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null,this.fullCollection=(r==null?void 0:r.fullCollection)||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,l){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,l)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let l=this.getKey(t);return l==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(l):this.state.selectedKeys.has(l)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),l=this.state.selectedKeys;return this._isSelectAll=t.every(r=>l.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let l of this.state.selectedKeys){let r=this.collection.getItem(l);(!t||r&&L0(this.collection,r,t)<0)&&(t=r)}return(t==null?void 0:t.key)??null}get lastSelectedKey(){let t=null;for(let l of this.state.selectedKeys){let r=this.collection.getItem(l);(!t||r&&L0(this.collection,r,t)>0)&&(t=r)}return(t==null?void 0:t.key)??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let l=this.getKey(t);if(l==null)return;let r;if(this.state.selectedKeys==="all")r=new Kn([l],l,l);else{let i=this.state.selectedKeys,s=i.anchorKey??l;r=new Kn(i,s,l);for(let u of this.getKeyRange(s,i.currentKey??l))r.delete(u);for(let u of this.getKeyRange(l,s))this.canSelectItem(u)&&r.add(u)}this.state.setSelectedKeys(r)}getKeyRange(t,l){let r=this.collection.getItem(t),i=this.collection.getItem(l);return r&&i?L0(this.collection,r,i)<=0?this.getKeyRangeInternal(t,l):this.getKeyRangeInternal(l,t):[]}getKeyRangeInternal(t,l){var s;if((s=this.layoutDelegate)!=null&&s.getKeyRange)return this.layoutDelegate.getKeyRange(t,l);let r=[],i=t;for(;i!=null;){let u=this.collection.getItem(i);if(u&&(u.type==="item"||u.type==="cell"&&this.allowsCellSelection)&&r.push(i),i===l)return r;i=this.collection.getKeyAfter(i)}return[]}getKey(t){let l=this.collection.getItem(t);if(!l||l.type==="cell"&&this.allowsCellSelection)return t;for(;l&&l.type!=="item"&&l.parentKey!=null;)l=this.collection.getItem(l.parentKey);return!l||l.type!=="item"?null:l.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let l=this.getKey(t);if(l==null)return;let r=new Kn(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(l)?r.delete(l):this.canSelectItem(l)&&(r.add(l),r.anchorKey=l,r.currentKey=l),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode==="none")return;let l=this.getKey(t);if(l==null)return;let r=this.canSelectItem(l)?new Kn([l],l,l):new Kn;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode==="none")return;let l=new Kn;for(let r of t){let i=this.getKey(r);if(i!=null&&(l.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(l)}getSelectAllKeys(){let t=this.fullCollection??this.collection,l=[],r=i=>{var s;for(;i!=null;){if(this.canSelectItemIn(i,t)){let u=t.getItem(i);(u==null?void 0:u.type)==="item"&&l.push(i),u!=null&&u.hasChildNodes&&(this.allowsCellSelection||u.type!=="item")&&r(((s=hM(dM(u,t)))==null?void 0:s.key)??null)}i=t.getKeyAfter(i)}};return r(t.getFirstKey()),l}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Kn)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,l){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||l&&(l.pointerType==="touch"||l.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let l=this.selectedKeys;if(t.size!==l.size)return!1;for(let r of t)if(!l.has(r))return!1;for(let r of l)if(!t.has(r))return!1;return!0}canSelectItem(t){return this.canSelectItemIn(t,this.collection)}canSelectItemIn(t,l){var i;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=l.getItem(t);return!(!r||(i=r==null?void 0:r.props)!=null&&i.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var r,i;let l=this.collection.getItem(t);return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!((r=l==null?void 0:l.props)!=null&&r.isDisabled))&&((i=l==null?void 0:l.props)==null?void 0:i.disabledBehavior)!=="selection"}isLink(t){var l,r;return!!((r=(l=this.collection.getItem(t))==null?void 0:l.props)!=null&&r.href)}getItemProps(t){var l;return(l=this.collection.getItem(t))==null?void 0:l.props}withCollection(t){return new r2(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class gM{build(t,l){return this.context=l,bv(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:l,items:r}=t;if(V.isValidElement(l)&&l.type===V.Fragment)yield*this.iterateCollection({children:l.props.children,items:r});else if(typeof l=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let s of r)yield*this.getFullNode({value:s,index:i},{renderer:l}),i++}else{let i=[];V.Children.forEach(l,u=>{u&&i.push(u)});let s=0;for(let u of i){let f=this.getFullNode({element:u,index:s},{});for(let d of f)s++,yield d}}}getKey(t,l,r,i){if(t.key!=null)return t.key;if(l.type==="cell"&&l.key!=null)return`${i}${l.key}`;let s=l.value;if(s!=null){let u=s.key??s.id;if(u==null)throw new Error("No key found for item");return u}return i?`${i}.${l.index}`:`$.${l.index}`}getChildState(t,l){return{renderer:l.renderer||t.renderer}}*getFullNode(t,l,r,i){if(V.isValidElement(t.element)&&t.element.type===V.Fragment){let d=[];V.Children.forEach(t.element.props.children,p=>{d.push(p)});let h=t.index??0;for(const p of d)yield*this.getFullNode({element:p,index:h++},l,r,i);return}let s=t.element;if(!s&&t.value&&l&&l.renderer){let d=this.cache.get(t.value);if(d&&(!d.shouldInvalidate||!d.shouldInvalidate(this.context))){d.index=t.index,d.parentKey=i?i.key:null,yield d;return}s=l.renderer(t.value)}if(V.isValidElement(s)){let d=s.type;if(typeof d!="function"&&typeof d.getCollectionNode!="function"){let v=s.type;throw new Error(`Unknown element <${v}> in collection.`)}let h=d.getCollectionNode(s.props,this.context),p=t.index??0,b=h.next();for(;!b.done&&b.value;){let v=b.value;t.index=p;let w=v.key??null;w==null&&(w=v.element?null:this.getKey(s,t,l,r));let T=[...this.getFullNode({...v,key:w,index:p,wrapper:bM(t.wrapper,v.wrapper)},this.getChildState(l,v),r?`${r}${s.key}`:s.key,i)];for(let C of T){if(C.value=v.value??t.value??null,C.value&&this.cache.set(C.value,C),t.type&&C.type!==t.type)throw new Error(`Unsupported type <${k0(C.type)}> in <${k0((i==null?void 0:i.type)??"unknown parent type")}>. Only <${k0(t.type)}> is supported.`);p++,yield C}b=h.next(T)}return}if(t.key==null||t.type==null)return;let u=this,f={type:t.type,props:t.props,key:t.key,parentKey:i?i.key:null,value:t.value??null,level:((i==null?void 0:i.level)??0)+((i==null?void 0:i.type)==="item"?1:0),index:t.index,rendered:t.rendered,textValue:t.textValue??"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:bv(function*(){if(!t.hasChildNodes||!t.childNodes)return;let d=0;for(let h of t.childNodes()){h.key!=null&&(h.key=`${f.key}${h.key}`);let p=u.getFullNode({...h,index:d},u.getChildState(l,h),f.key,f);for(let b of p)d++,yield b}})};yield f}constructor(){this.cache=new WeakMap}}function bv(e){let t=[],l=null;return{*[Symbol.iterator](){for(let r of t)yield r;l||(l=e());for(let r of l)t.push(r),yield r}}}function bM(e,t){if(e&&t)return l=>e(t(l));if(e)return e;if(t)return t}function k0(e){return e[0].toUpperCase()+e.slice(1)}function vM(e,t,l){let r=y.useMemo(()=>new gM,[]),{children:i,items:s,collection:u}=e;return y.useMemo(()=>{if(u)return u;let d=r.build({children:i,items:s},l);return t(d)},[r,i,s,u,l,t])}function yM(e,t){if(e.size!==t.size)return!1;for(let l of e)if(!t.has(l))return!1;return!0}function xM(e){let{selectionMode:t="none",disallowEmptySelection:l=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:s="all"}=e,u=y.useRef(!1),[,f]=y.useState(!1),d=y.useRef(null),h=y.useRef(null),[,p]=y.useState(null),b=y.useMemo(()=>vv(e.selectedKeys),[e.selectedKeys]),v=y.useMemo(()=>vv(e.defaultSelectedKeys,new Kn),[e.defaultSelectedKeys]),[w,x]=Ru(b,v,e.onSelectionChange),T=y.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[C,N]=y.useState(i);i==="replace"&&C==="toggle"&&typeof w=="object"&&w.size===0&&N("replace");let M=y.useRef(i);return y.useEffect(()=>{i!==M.current&&(N(i),M.current=i)},[i]),{selectionMode:t,disallowEmptySelection:l,selectionBehavior:C,setSelectionBehavior:N,get isFocused(){return u.current},setFocused(L){u.current=L,f(L)},get focusedKey(){return d.current},get childFocusStrategy(){return h.current},setFocusedKey(L,k="first"){d.current=L,h.current=k,p(L)},selectedKeys:w,setSelectedKeys(L){(r||!yM(L,w))&&x(L)},disabledKeys:T,disabledBehavior:s}}function vv(e,t){return e?e==="all"?"all":new Kn(e):t}const SM=y.createContext(null),L2=class L2 extends vi{filter(t,l,r){let i=t.getItem(this.firstChildKey);if(i&&r(i.textValue,this)){let s=this.clone();return l.addDescendants(s,t),s}return null}};L2.type="submenutrigger";let yv=L2;function wM(e,t){let{role:l="dialog"}=e,r=Y0();r=e["aria-label"]?void 0:r;let i=Y0();i=l==="alertdialog"&&!e["aria-describedby"]?i:void 0;let s=y.useRef(!1);y.useEffect(()=>{if(t.current&&!Oo(t.current)){va(t.current);let f=setTimeout(()=>{(et()===t.current||et()===document.body)&&(s.current=!0,t.current&&(t.current.blur(),va(t.current)),s.current=!1)},500);return()=>{clearTimeout(f)}}},[t]),q4(),y.useRef(!1),y.useEffect(()=>{});let u=e["aria-describedby"]??i;return{dialogProps:{...mt(e,{labelable:!0}),role:l,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]??r,"aria-describedby":u,onBlur:f=>{s.current&&f.stopPropagation()}},titleProps:{id:r},contentProps:{id:i}}}const u5=y.createContext(null),yi=y.createContext(null);function EM(e){let t=pM(e),l=y.useRef(null),{triggerProps:r,overlayProps:i}=rM({type:"dialog"},t,l);return r.id=_n(),i["aria-labelledby"]=r.id,V.createElement(sr,{values:[[yi,t],[SM,t],[u5,i],[Y4,{trigger:"DialogTrigger",triggerRef:l,id:i.id,"aria-labelledby":i["aria-labelledby"]}]]},V.createElement(zR,{...r,ref:l,isPressed:t.isOpen},e.children))}const CM=y.forwardRef(function(t,l){let r=t["aria-labelledby"];[t,l]=yn(t,l,u5);let{dialogProps:i,titleProps:s,contentProps:u}=wM({...t,"aria-labelledby":r},l),f=y.useContext(yi);!i["aria-label"]&&!i["aria-labelledby"]&&t["aria-labelledby"]&&(i["aria-labelledby"]=t["aria-labelledby"]);let d=At({defaultClassName:"react-aria-Dialog",className:t.className,style:t.style,children:t.children,values:{close:(f==null?void 0:f.close)||(()=>{})}}),h=mt(t,{global:!0});return V.createElement(ut.section,{...Ce(h,d,i),render:t.render,ref:l,slot:t.slot||void 0},V.createElement(sr,{values:[[Z3,{slots:{[fi]:{},title:{...s,level:2}}}],[ku,{slots:{[fi]:{},description:u}}],[e2,{slots:{[fi]:{},close:{onPress:()=>f==null?void 0:f.close()}}}]]},d.children))});function TM(e,t,l){let{overlayProps:r,underlayProps:i}=o4({...e,isOpen:t.isOpen,onClose:t.close},l);return s4({isDisabled:!t.isOpen}),q4(),y.useEffect(()=>{if(t.isOpen&&l.current)return n4([l.current],{shouldUseInert:!0})},[t.isOpen,l]),{modalProps:Ce(r),underlayProps:i}}const RM=y.createContext(null),i2=y.createContext(null),MM=y.forwardRef(function(t,l){if(y.useContext(i2))return V.createElement(xv,{...t,modalRef:l},t.children);let{isDismissable:i,isKeyboardDismissDisabled:s,isOpen:u,defaultOpen:f,onOpenChange:d,children:h,isEntering:p,isExiting:b,UNSTABLE_portalContainer:v,shouldCloseOnInteractOutside:w,...x}=t;return V.createElement(f5,{isDismissable:i,isKeyboardDismissDisabled:s,isOpen:u,defaultOpen:f,onOpenChange:d,isEntering:p,isExiting:b,UNSTABLE_portalContainer:v,shouldCloseOnInteractOutside:w},V.createElement(xv,{...x,modalRef:l},h))});function AM(e,t){[e,t]=yn(e,t,RM);let l=y.useContext(yi),r=a2(e),i=e.isOpen!=null||e.defaultOpen!=null||!l?r:l,s=bn(t),u=y.useRef(null),f=Zc(s,i.isOpen),d=Zc(u,i.isOpen),h=f||d||e.isExiting||!1,p=Nl();return!i.isOpen&&!h||p?null:V.createElement(LM,{...e,state:i,isExiting:h,overlayRef:s,modalRef:u})}const f5=y.forwardRef(AM);function LM({UNSTABLE_portalContainer:e,...t}){let l=t.modalRef,{state:r}=t,{modalProps:i,underlayProps:s}=TM(t,r,l),u=wu(t.overlayRef)||t.isEntering||!1,f=At({...t,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:u,isExiting:t.isExiting,state:r}}),d=Xw(),h,p;if(typeof document<"u"){let v=jo(document.body)?document.body:document.scrollingElement||document.documentElement,w=v.getBoundingClientRect().width%1,x=v.getBoundingClientRect().height%1;h=v.scrollWidth-w,p=v.scrollHeight-x}let b={...f.style,"--visual-viewport-width":d.width+"px","--visual-viewport-height":d.height+"px","--page-width":h!==void 0?h+"px":void 0,"--page-height":p!==void 0?p+"px":void 0};return V.createElement(ph,{isExiting:t.isExiting,portalContainer:e},V.createElement(ut.div,{...Ce(mt(t,{global:!0}),s),...f,style:b,ref:t.overlayRef,"data-entering":u||void 0,"data-exiting":t.isExiting||void 0},V.createElement(sr,{values:[[i2,{modalProps:i,modalRef:l,isExiting:t.isExiting,isDismissable:t.isDismissable}],[yi,r]]},f.children)))}function xv(e){let{modalProps:t,modalRef:l,isExiting:r,isDismissable:i}=y.useContext(i2),s=y.useContext(yi),u=y.useMemo(()=>ya(e.modalRef,l),[e.modalRef,l]),f=bn(u),d=wu(f),h=At({...e,defaultClassName:"react-aria-Modal",values:{isEntering:d,isExiting:r,state:s}});return V.createElement(ut.div,{...Ce(mt(e,{global:!0}),t),...h,ref:f,"data-entering":d||void 0,"data-exiting":r||void 0},i&&V.createElement(mh,{onDismiss:s.close}),h.children)}const kM=V.forwardRef(({children:e,...t},l)=>{l=bn(l);let{pressProps:r}=lr({...t,ref:l}),{focusableProps:i}=qo(t,l),s=V.Children.only(e);y.useEffect(()=>{},[l,t.isDisabled]);let u=parseInt(V.version,10)<19?s.ref:s.props.ref;return V.cloneElement(s,{...Ce(r,i,s.props),ref:ya(u,l)})}),Sv=({children:e,className:t,slot:l,style:r,variant:i,...s})=>{const u=y.useMemo(()=>WC({variant:i}),[i]);return E.jsx(W3,{"aria-label":"Close",className:Mt(t,u),"data-slot":"close-button",slot:l,style:r,type:"button",...s,children:f=>typeof e=="function"?e(f):e??E.jsx(WT,{"data-slot":"close-button-icon"})})},d5=Object.assign(Sv,{Root:Sv}),NM=y.createContext({}),DM=y.forwardRef(function(t,l){[t,l]=yn(t,l,NM);let{isDisabled:r,isInvalid:i,isReadOnly:s,onHoverStart:u,onHoverChange:f,onHoverEnd:d,...h}=t;r??(r=!!t["aria-disabled"]&&t["aria-disabled"]!=="false"),i??(i=!!t["aria-invalid"]&&t["aria-invalid"]!=="false");let{hoverProps:p,isHovered:b}=Sa({onHoverStart:u,onHoverChange:f,onHoverEnd:d,isDisabled:r}),{isFocused:v,isFocusVisible:w,focusProps:x}=Dl({within:!0}),T=At({...t,values:{isHovered:b,isFocusWithin:v,isFocusVisible:w,isDisabled:r,isInvalid:i},defaultClassName:"react-aria-Group"});return V.createElement(ut.div,{...Ce(h,x,p),...T,ref:l,role:t.role??"group",slot:t.slot??void 0,"data-focus-within":v||void 0,"data-hovered":b||void 0,"data-focus-visible":w||void 0,"data-disabled":r||void 0,"data-invalid":i||void 0,"data-readonly":s||void 0},T.children)}),$M=y.createContext(null),h5={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},m5={...h5,customError:!0,valid:!1},ai={isInvalid:!1,validationDetails:h5,validationErrors:[]},zM=y.createContext({}),ou="__reactAriaFormValidationState";function p5(e){if(e[ou]){let{realtimeValidation:t,displayValidation:l,updateValidation:r,resetValidation:i,commitValidation:s}=e[ou];return{realtimeValidation:t,displayValidation:l,updateValidation:r,resetValidation:i,commitValidation:s}}return PM(e)}function PM(e){let{isInvalid:t,validationState:l,name:r,value:i,builtinValidation:s,validate:u,validationBehavior:f="aria"}=e;l&&(t||(t=l==="invalid"));let d=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:m5}:null,h=y.useMemo(()=>{if(!u||i==null)return null;let K=OM(u,i);return wv(K)},[u,i]);s!=null&&s.validationDetails.valid&&(s=void 0);let p=y.useContext(zM),b=y.useMemo(()=>r?Array.isArray(r)?r.flatMap(K=>vh(p[K])):vh(p[r]):[],[p,r]),[v,w]=y.useState(p),[x,T]=y.useState(!1);p!==v&&(w(p),T(!1));let C=y.useMemo(()=>wv(x?[]:b),[x,b]),N=y.useRef(ai),[M,L]=y.useState(ai),k=y.useRef(ai),B=()=>{if(!G)return;$(!1);let K=h||s||N.current;N0(K,k.current)||(k.current=K,L(K))},[G,$]=y.useState(!1);return y.useEffect(B),{realtimeValidation:d||C||h||s||ai,displayValidation:f==="native"?d||C||M:d||C||h||s||M,updateValidation(K){f==="aria"&&!N0(M,K)?L(K):N.current=K},resetValidation(){let K=ai;N0(K,k.current)||(k.current=K,L(K)),f==="native"&&$(!1),T(!0)},commitValidation(){f==="native"&&$(!0),T(!0)}}}function vh(e){return e?Array.isArray(e)?e:[e]:[]}function OM(e,t){if(typeof e=="function"){let l=e(t);if(l&&typeof l!="boolean")return vh(l)}return[]}function wv(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:m5}:null}function N0(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((l,r)=>l===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([l,r])=>t.validationDetails[l]===r)}const jM=y.createContext(null);class Ev{constructor(t){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t;let l=u=>{if(this.keyMap.set(u.key,u),u.childNodes&&u.type==="section")for(let f of u.childNodes)l(f)};for(let u of t)l(u);let r=null,i=0,s=0;for(let[u,f]of this.keyMap)r?(r.nextKey=u,f.prevKey=r.key):(this.firstKey=u,f.prevKey=void 0),f.type==="item"&&(f.index=i++),(f.type==="section"||f.type==="item")&&s++,r=f,r.nextKey=void 0;this._size=s,this.lastKey=(r==null?void 0:r.key)??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let l=this.keyMap.get(t);return l?l.prevKey??null:null}getKeyAfter(t){let l=this.keyMap.get(t);return l?l.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){return this.keyMap.get(t)??null}at(t){const l=[...this.getKeys()];return this.getItem(l[t])}getChildren(t){let l=this.keyMap.get(t);return(l==null?void 0:l.childNodes)||[]}}function IM(e){let{filter:t,layoutDelegate:l}=e,r=xM(e),i=y.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),s=y.useCallback(h=>t?new Ev(t(h)):new Ev(h),[t]),u=y.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),f=vM(e,s,u),d=y.useMemo(()=>new r2(f,r,{layoutDelegate:l}),[f,r,l]);return g5(f,d),{collection:f,disabledKeys:i,selectionManager:d}}function Cz(e,t){let l=y.useMemo(()=>t?e.collection.filter(t):e.collection,[e.collection,t]),r=e.selectionManager.withCollection(l);return g5(l,r),{collection:l,selectionManager:r,disabledKeys:e.disabledKeys}}function g5(e,t){const l=y.useRef(null);y.useEffect(()=>{if(t.focusedKey!=null&&!e.getItem(t.focusedKey)&&l.current){let r=l.current.getKeyAfter(t.focusedKey),i=null;for(;r!=null;){let s=e.getItem(r);if(s&&s.type==="item"&&!t.isDisabled(r)){i=r;break}r=l.current.getKeyAfter(r)}if(i==null)for(r=l.current.getKeyBefore(t.focusedKey);r!=null;){let s=e.getItem(r);if(s&&s.type==="item"&&!t.isDisabled(r)){i=r;break}r=l.current.getKeyBefore(r)}t.setFocusedKey(i)}l.current=e},[e,t])}function BM(e,t,l){let{validationBehavior:r,focus:i}=e;Ne(()=>{if(r==="native"&&(l!=null&&l.current)&&"setCustomValidity"in l.current&&!l.current.disabled){let h=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";l.current.setCustomValidity(h),l.current.hasAttribute("title")||(l.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(KM(l.current))}});let s=y.useRef(!1),u=Fn(()=>{s.current||t.resetValidation()}),f=Fn(h=>{var b,v;t.displayValidation.isInvalid||t.commitValidation();let p=(b=l==null?void 0:l.current)==null?void 0:b.form;!h.defaultPrevented&&l&&p&&UM(p)===l.current&&(i?i():(v=l.current)==null||v.focus(),yT("keyboard")),h.preventDefault()}),d=Fn(()=>{t.commitValidation()});y.useEffect(()=>{let h=l==null?void 0:l.current;if(!h)return;let p=h.form,b=p==null?void 0:p.reset;return p&&(p.reset=()=>{s.current=!window.event||window.event.type==="message"&&ve(window.event)instanceof MessagePort,b==null||b.call(p),s.current=!1}),h.addEventListener("invalid",f),h.addEventListener("change",d),p==null||p.addEventListener("reset",u),()=>{h.removeEventListener("invalid",f),h.removeEventListener("change",d),p==null||p.removeEventListener("reset",u),p&&(p.reset=b)}},[l,r])}function HM(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function KM(e){return{isInvalid:!e.validity.valid,validationDetails:HM(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function UM(e){var t;for(let l=0;l<e.elements.length;l++){let r=e.elements[l];if(((t=r.validity)==null?void 0:t.valid)===!1)return r}return null}function FM(e,t=[]){let l=[];function r(s,u){const f=y.createContext(u);f.displayName=s+"Context";const d=l.length;l=[...l,u];const h=b=>{var N;const{scope:v,children:w,...x}=b,T=((N=v==null?void 0:v[e])==null?void 0:N[d])||f,C=y.useMemo(()=>x,Object.values(x));return E.jsx(T.Provider,{value:C,children:w})};h.displayName=s+"Provider";function p(b,v){var T;const w=((T=v==null?void 0:v[e])==null?void 0:T[d])||f,x=y.useContext(w);if(x)return x;if(u!==void 0)return u;throw new Error(`\`${b}\` must be used within \`${s}\``)}return[h,p]}const i=()=>{const s=l.map(u=>y.createContext(u));return function(f){const d=(f==null?void 0:f[e])||s;return y.useMemo(()=>({[`__scope${e}`]:{...f,[e]:d}}),[f,d])}};return i.scopeName=e,[r,VM(i,...t)]}function VM(...e){const t=e[0];if(e.length===1)return t;const l=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const u=r.reduce((f,{useScope:d,scopeName:h})=>{const b=d(s)[`__scope${h}`];return{...f,...b}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return l.scopeName=t.scopeName,l}function _M(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...l)=>{var r;return(r=t.current)==null?void 0:r.call(t,...l)},[])}var yh=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{};function Cv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function GM(...e){return t=>{let l=!1;const r=e.map(i=>{const s=Cv(i,t);return!l&&typeof s=="function"&&(l=!0),s});if(l)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():Cv(e[i],null)}}}}var qM=Symbol.for("react.lazy"),su=s8[" use ".trim().toString()];function YM(e){return typeof e=="object"&&e!==null&&"then"in e}function b5(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===qM&&"_payload"in e&&YM(e._payload)}function XM(e){const t=WM(e),l=y.forwardRef((r,i)=>{let{children:s,...u}=r;b5(s)&&typeof su=="function"&&(s=su(s._payload));const f=y.Children.toArray(s),d=f.find(QM);if(d){const h=d.props.children,p=f.map(b=>b===d?y.Children.count(h)>1?y.Children.only(null):y.isValidElement(h)?h.props.children:null:b);return E.jsx(t,{...u,ref:i,children:y.isValidElement(h)?y.cloneElement(h,void 0,p):null})}return E.jsx(t,{...u,ref:i,children:s})});return l.displayName=`${e}.Slot`,l}function WM(e){const t=y.forwardRef((l,r)=>{let{children:i,...s}=l;if(b5(i)&&typeof su=="function"&&(i=su(i._payload)),y.isValidElement(i)){const u=eA(i),f=JM(s,i.props);return i.type!==y.Fragment&&(f.ref=r?GM(r,u):u),y.cloneElement(i,f)}return y.Children.count(i)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ZM=Symbol("radix.slottable");function QM(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ZM}function JM(e,t){const l={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?l[r]=(...f)=>{const d=s(...f);return i(...f),d}:i&&(l[r]=i):r==="style"?l[r]={...i,...s}:r==="className"&&(l[r]=[i,s].filter(Boolean).join(" "))}return{...e,...l}}function eA(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,l=t&&"isReactWarning"in t&&t.isReactWarning;return l?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,l=t&&"isReactWarning"in t&&t.isReactWarning,l?e.props.ref:e.props.ref||e.ref)}var tA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],o2=tA.reduce((e,t)=>{const l=XM(`Primitive.${t}`),r=y.forwardRef((i,s)=>{const{asChild:u,...f}=i,d=u?l:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(d,{...f,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function nA(){return Lu.useSyncExternalStore(lA,()=>!0,()=>!1)}function lA(){return()=>{}}var s2="Avatar",[aA]=FM(s2),[rA,v5]=aA(s2),y5=y.forwardRef((e,t)=>{const{__scopeAvatar:l,...r}=e,[i,s]=y.useState("idle");return E.jsx(rA,{scope:l,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:E.jsx(o2.span,{...r,ref:t})})});y5.displayName=s2;var x5="AvatarImage",S5=y.forwardRef((e,t)=>{const{__scopeAvatar:l,src:r,onLoadingStatusChange:i=()=>{},...s}=e,u=v5(x5,l),f=iA(r,s),d=_M(h=>{i(h),u.onImageLoadingStatusChange(h)});return yh(()=>{f!=="idle"&&d(f)},[f,d]),f==="loaded"?E.jsx(o2.img,{...s,ref:t,src:r}):null});S5.displayName=x5;var w5="AvatarFallback",E5=y.forwardRef((e,t)=>{const{__scopeAvatar:l,delayMs:r,...i}=e,s=v5(w5,l),[u,f]=y.useState(r===void 0);return y.useEffect(()=>{if(r!==void 0){const d=window.setTimeout(()=>f(!0),r);return()=>window.clearTimeout(d)}},[r]),u&&s.imageLoadingStatus!=="loaded"?E.jsx(o2.span,{...i,ref:t}):null});E5.displayName=w5;function Tv(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function iA(e,{referrerPolicy:t,crossOrigin:l}){const r=nA(),i=y.useRef(null),s=r?(i.current||(i.current=new window.Image),i.current):null,[u,f]=y.useState(()=>Tv(s,e));return yh(()=>{f(Tv(s,e))},[s,e]),yh(()=>{const d=b=>()=>{f(b)};if(!s)return;const h=d("loaded"),p=d("error");return s.addEventListener("load",h),s.addEventListener("error",p),t&&(s.referrerPolicy=t),typeof l=="string"&&(s.crossOrigin=l),()=>{s.removeEventListener("load",h),s.removeEventListener("error",p)}},[s,l,t]),u}var oA=y5,sA=S5,cA=E5;const c2=y.createContext({}),Rv=({children:e,className:t,color:l,size:r,variant:i,...s})=>{const u=V.useMemo(()=>GC({color:l,size:r,variant:i}),[l,r,i]);return E.jsx(c2,{value:{slots:u},children:E.jsx(oA,{className:u.base({className:t}),...s,children:e})})},uA=({className:e,crossOrigin:t,loading:l,onError:r,onLoad:i,sizes:s,src:u,srcSet:f,...d})=>{const{slots:h}=V.use(c2);return E.jsx(sA,{className:Je(h==null?void 0:h.image,e),crossOrigin:t,loading:l,sizes:s,src:u,srcSet:f,onError:r,onLoad:i,...d})},fA=({className:e,color:t,...l})=>{const{slots:r}=V.use(c2);return E.jsx(cA,{className:Je(r==null?void 0:r.fallback,e,{color:t}),"data-slot":"avatar-fallback",...l})},D0=Object.assign(Rv,{Root:Rv,Image:uA,Fallback:fA});function dA(e,t){let{elementType:l="a",onPress:r,onPressStart:i,onPressEnd:s,onPressChange:u,onClick:f,isDisabled:d,...h}=e,p={};l!=="a"&&(p={role:"link",tabIndex:d?void 0:0});let{focusableProps:b}=qo(e,t),{pressProps:v,isPressed:w}=lr({onPress:r,onPressStart:i,onPressEnd:s,onPressChange:u,onClick:f,isDisabled:d,ref:t}),x=mt(h,{labelable:!0}),T=Ce(b,v),C=Go(),N=Qy(e);return{isPressed:w,linkProps:Ce(x,N,{...T,...p,"aria-disabled":d||void 0,"aria-current":e["aria-current"],onClick:M=>{var L;(L=v.onClick)==null||L.call(v,M),ww(M,C,e.href,e.routerOptions)}})}}const hA=y.createContext(null),mA=y.forwardRef(function(t,l){[t,l]=yn(t,l,hA);let r=t.href&&!t.isDisabled?"a":"span",{linkProps:i,isPressed:s}=dA({...t,elementType:r},l),u=ut[r],{hoverProps:f,isHovered:d}=Sa(t),{focusProps:h,isFocused:p,isFocusVisible:b}=Dl(),v=At({...t,defaultClassName:"react-aria-Link",values:{isCurrent:!!t["aria-current"],isDisabled:t.isDisabled||!1,isPressed:s,isHovered:d,isFocused:p,isFocusVisible:b}}),w=mt(t,{global:!0});return delete w.onClick,V.createElement(u,{ref:l,slot:t.slot||void 0,...Ce(w,v,i,f,h),"data-focused":p||void 0,"data-hovered":d||void 0,"data-pressed":s||void 0,"data-focus-visible":b||void 0,"data-current":!!t["aria-current"]||void 0,"data-disabled":t.isDisabled||void 0},v.children)}),C5=y.createContext({}),Mv=({children:e,className:t,...l})=>{const r=V.useMemo(()=>ZC(),[]);return E.jsx(C5,{value:{slots:r},children:E.jsx(mA,{"data-slot":"link",...l,className:Mt(t,r==null?void 0:r.base()),children:i=>E.jsx(E.Fragment,{children:typeof e=="function"?e(i):e})})})},pA=({children:e,className:t,...l})=>{const{slots:r}=y.use(C5);return E.jsx(Ct.span,{className:Je(r==null?void 0:r.icon,t),"data-default-icon":ch(!e),"data-slot":"link-icon",...l,children:e??E.jsx(XT,{"data-slot":"link-default-icon"})})},Nc=Object.assign(Mv,{Root:Mv,Icon:pA}),gA=y.createContext({});function T5(e={}){let{isReadOnly:t}=e,[l,r]=Ru(e.isSelected,e.defaultSelected||!1,e.onChange),[i]=y.useState(l);function s(f){t||r(f)}function u(){t||r(!l)}return{isSelected:l,defaultSelected:e.defaultSelected??i,setSelected:s,toggle:u}}const u2=y.createContext({}),R5="__button_group_child",Tz=({children:e,className:t,fullWidth:l,isDisabled:r,orientation:i,size:s,variant:u,...f})=>{const d=Cu(gA),h=i??(d==null?void 0:d.orientation)??"horizontal",p=V.useMemo(()=>YC({fullWidth:l,orientation:h}),[l,h]),b=y.Children.map(e,v=>y.isValidElement(v)?V.cloneElement(v,{[R5]:!0}):v);return E.jsx(u2,{value:{slots:p,size:s,variant:u,isDisabled:r,fullWidth:l},children:E.jsx(DM,{className:Mt(t,p.base()),"data-slot":"button-group",isDisabled:r,...f,children:b})})},Rz=({className:e,...t})=>{const{slots:l}=y.use(u2);return E.jsx(Ct.span,{"aria-hidden":"true",className:Je(l==null?void 0:l.separator,e),"data-slot":"button-group-separator",...t})},Av=({children:e,className:t,fullWidth:l,isDisabled:r,isIconOnly:i,size:s,slot:u,style:f,variant:d,[R5]:h,...p})=>{const b=y.use(u2),v=h===!0,w=s??(v?b==null?void 0:b.size:void 0),x=d??(v?b==null?void 0:b.variant:void 0),T=r??(v?b==null?void 0:b.isDisabled:void 0),C=l??(v?b==null?void 0:b.fullWidth:void 0),N=qC({fullWidth:C,isIconOnly:i,size:w,variant:x});return E.jsx(W3,{className:Mt(t,N),"data-slot":"button",isDisabled:T,slot:u,style:f,...p,children:M=>typeof e=="function"?e(M):e})},mn=Object.assign(Av,{Root:Av}),bA=new WeakMap;function vA(e=!0){let[t,l]=y.useState(e),r=y.useRef(!1),i=y.useCallback(s=>{r.current=!0,l(!!s)},[]);return Ne(()=>{r.current||l(!1)},[]),[i,t]}function Lv(e=!0){let t=_n(),[l,r]=vA(e);return{id:r?t:void 0,ref:l}}function yA(e,t,l){let{isDisabled:r=!1,isReadOnly:i=!1,value:s,name:u,form:f,children:d,isRequired:h,validationBehavior:p="aria","aria-label":b,"aria-labelledby":v,"aria-describedby":w,onPressStart:x,onPressEnd:T,onPressChange:C,onPress:N,onPressUp:M,onClick:L}=e,k=p5({...e,value:t.isSelected}),{isInvalid:B,validationErrors:G,validationDetails:$}=k.displayValidation;BM(e,k,l);let A=J=>{J.stopPropagation(),t.setSelected(ve(J).checked)},{pressProps:U,isPressed:K}=lr({onPressStart:x,onPressEnd:T,onPressChange:C,onPress:N,onPressUp:M,onClick:L,isDisabled:r}),[q,te]=y.useState(!1),{pressProps:ne}=lr({onPressStart(J){if(J.pointerType==="keyboard"||J.pointerType==="virtual"){J.continuePropagation();return}x==null||x(J),C==null||C(!0),te(!0)},onPressEnd(J){if(J.pointerType==="keyboard"||J.pointerType==="virtual"){J.continuePropagation();return}T==null||T(J),C==null||C(!1),te(!1)},onPressUp(J){if(J.pointerType==="keyboard"||J.pointerType==="virtual"){J.continuePropagation();return}M==null||M(J)},onClick:L,onPress(J){var Q;if(J.pointerType==="keyboard"||J.pointerType==="virtual"){J.continuePropagation();return}N==null||N(J),t.toggle(),(Q=l.current)==null||Q.focus();let{[ou]:_}=e,{commitValidation:D}=_||k;D()},isDisabled:r||i}),{focusableProps:j}=qo(e,l),Y=Ce(U,j),z=mt(e,{labelable:!0});Jw(l,t.defaultSelected,t.setSelected);let O=Lv(),oe=Lv();return{labelProps:Ce(ne,{onClick:J=>J.preventDefault()}),inputProps:Ce(z,{checked:t.isSelected,"aria-required":h&&p==="aria"||void 0,required:h&&p==="native","aria-invalid":B||e.validationState==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-controls":e["aria-controls"],"aria-readonly":i||void 0,"aria-describedby":[O.id,oe.id,w].filter(Boolean).join(" ")||void 0,onChange:A,disabled:r,...s==null?{}:{value:s},name:u,form:f,type:"checkbox",...Y}),descriptionProps:O,errorMessageProps:oe,isSelected:t.isSelected,isPressed:K||q,isDisabled:r,isReadOnly:i,isInvalid:B||e.validationState==="invalid",validationErrors:G,validationDetails:$}}function M5(e,t,l){let{labelProps:r,inputProps:i,descriptionProps:s,errorMessageProps:u,isSelected:f,isPressed:d,isDisabled:h,isReadOnly:p,isInvalid:b,validationErrors:v,validationDetails:w}=yA(e,t,l),{isIndeterminate:x}=e;return y.useEffect(()=>{l.current&&(l.current.indeterminate=!!x)}),{labelProps:Ce(r,y.useMemo(()=>({onMouseDown:T=>T.preventDefault()}),[])),inputProps:i,descriptionProps:s,errorMessageProps:u,isSelected:f,isPressed:d,isDisabled:h,isReadOnly:p,isInvalid:b,validationErrors:v,validationDetails:w}}function xA(e,t,l){const r=T5({isReadOnly:e.isReadOnly||t.isReadOnly,isSelected:t.isSelected(e.value),defaultSelected:t.defaultValue.includes(e.value),onChange(T){T?t.addValue(e.value):t.removeValue(e.value),e.onChange&&e.onChange(T)}});let{name:i,form:s,descriptionId:u,errorMessageId:f,validationBehavior:d}=bA.get(t);d=e.validationBehavior??d;let{realtimeValidation:h}=p5({...e,value:r.isSelected,name:void 0,validationBehavior:"aria"}),p=y.useRef(ai),b=()=>{t.setInvalid(e.value,h.isInvalid?h:p.current)};y.useEffect(b);let v=t.realtimeValidation.isInvalid?t.realtimeValidation:h,w=d==="native"?t.displayValidation:v,x=M5({...e,isReadOnly:e.isReadOnly||t.isReadOnly,isDisabled:e.isDisabled||t.isDisabled,name:e.name||i,form:e.form||s,isRequired:e.isRequired??t.isRequired,validationBehavior:d,[ou]:{realtimeValidation:v,displayValidation:w,resetValidation:t.resetValidation,commitValidation:t.commitValidation,updateValidation(T){p.current=T,b()}}},r,l);return{...x,inputProps:{...x.inputProps,"aria-describedby":[x.inputProps["aria-describedby"],t.isInvalid?f:null,u].filter(Boolean).join(" ")||void 0}}}const Mz=y.createContext(null),SA=y.createContext(null),A5=y.createContext(null),L5=y.createContext(null),wA=y.forwardRef(function(t,l){let{inputRef:r=null,...i}=t;[t,l]=yn(i,l,SA);let s=y.useContext(A5),[u,f]=EA(t,r),{descriptionProps:d,errorMessageProps:h,isSelected:p,isDisabled:b,isReadOnly:v,isInvalid:w,validationDetails:x,validationErrors:T}=u,C=At({...t,defaultClassName:"react-aria-CheckboxField",values:{isSelected:p,isIndeterminate:t.isIndeterminate||!1,isDisabled:b,isReadOnly:v,isInvalid:w,isRequired:t.isRequired||!1}}),N=mt(t,{global:!0});return delete N.id,delete N.onClick,V.createElement(ut.div,{...Ce(N,C),ref:l,slot:t.slot||void 0,"data-selected":p||void 0,"data-indeterminate":t.isIndeterminate||void 0,"data-disabled":b||void 0,"data-readonly":v||void 0,"data-invalid":w||void 0,"data-required":t.isRequired||void 0},V.createElement(sr,{values:[[L5,{...u,inputRef:f,defaultClassName:"react-aria-CheckboxButton",isIndeterminate:t.isIndeterminate,isRequired:t.isRequired}],[ku,{slots:{description:d,errorMessage:h}}],[$M,s?null:{isInvalid:w,validationDetails:x,validationErrors:T}]]},C.children))});function EA(e,t){let{validationBehavior:l}=Cu(jM)||{},r=e.validationBehavior??l??"native",i=y.useContext(A5),s=bn(y.useMemo(()=>ya(t,e.inputRef!==void 0?e.inputRef:null),[t,e.inputRef])),u={...aT(e),children:typeof e.children=="function"?!0:e.children,value:e.value,validationBehavior:r};return[i?xA(u,i,s):M5(u,T5(e),s),s]}const CA=y.forwardRef(function(t,l){let{labelProps:r,inputProps:i,isSelected:s,isDisabled:u,isReadOnly:f,isPressed:d,isInvalid:h,inputRef:p,defaultClassName:b,isIndeterminate:v,isRequired:w}=y.useContext(L5),{isFocused:x,isFocusVisible:T,focusProps:C}=Dl(),N=u||f,{hoverProps:M,isHovered:L}=Sa({...t,isDisabled:N}),k=At({...t,defaultClassName:b,values:{isSelected:s,isIndeterminate:v||!1,isPressed:d,isHovered:L,isFocused:x,isFocusVisible:T,isDisabled:u,isReadOnly:f,isInvalid:h,isRequired:w||!1}}),B=mt(t,{global:!0});return delete B.id,delete B.onClick,V.createElement(ut.label,{...Ce(B,r,M,k),ref:l,slot:t.slot||void 0,"data-selected":s||void 0,"data-indeterminate":v||void 0,"data-pressed":d||void 0,"data-hovered":L||void 0,"data-focused":x||void 0,"data-focus-visible":T||void 0,"data-disabled":u||void 0,"data-readonly":f||void 0,"data-invalid":h||void 0,"data-required":w||void 0},V.createElement(V4,{elementType:"span"},V.createElement("input",{...Ce(i,C),ref:p})),k.children)}),TA=y.createContext({}),Nu=y.createContext({}),xh=({children:e,className:t,variant:l,...r})=>{const i=y.use(TA),s=l??i.variant,u=V.useMemo(()=>XC({variant:s}),[s]);return E.jsx(wA,{"data-slot":"checkbox",...r,className:Mt(t,u.base()),children:f=>E.jsx(Nu,{value:{slots:u,state:f},children:typeof e=="function"?e(f):e})})};xh.displayName="HeroUI.Checkbox";const k5=({children:e,className:t,...l})=>{const{slots:r}=y.use(Nu);return E.jsx(CA,{"data-slot":"checkbox-content",...l,className:Mt(t,r==null?void 0:r.content()),children:e})};k5.displayName="HeroUI.Checkbox.Content";const N5=({children:e,className:t,...l})=>{const{slots:r}=y.use(Nu);return E.jsx(Ct.span,{className:Je(r==null?void 0:r.control,t),"data-slot":"checkbox-control",...l,children:e})};N5.displayName="HeroUI.Checkbox.Control";const D5=({children:e,className:t,...l})=>{const{slots:r,state:i}=y.use(Nu),s=i==null?void 0:i.isSelected,u=i==null?void 0:i.isIndeterminate,f=typeof e=="function"?e(i??{}):e||(u?E.jsx("svg",{"aria-hidden":"true","data-slot":"checkbox-default-indicator--indeterminate",fill:"none",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeWidth:3,viewBox:"0 0 24 24",children:E.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})}):E.jsx("svg",{"aria-hidden":"true","data-slot":"checkbox-default-indicator--checkmark",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:s?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 17 18",children:E.jsx("polyline",{points:"1 9 7 14 15 4"})}));return E.jsx(Ct.span,{"aria-hidden":"true",className:Je(r==null?void 0:r.indicator,t),"data-slot":"checkbox-indicator",...l,children:f})};D5.displayName="HeroUI.Checkbox.Indicator";const ha=Object.assign(xh,{Root:xh,Content:k5,Control:N5,Indicator:D5}),ri={blue:"\x1B[34m",green:"\x1B[32m",magenta:"\x1B[35m",red:"\x1B[31m",reset:"\x1B[0m",yellow:"\x1B[33m"},RA={debug:ri.magenta,error:ri.red,info:ri.blue,success:ri.green,warn:ri.yellow},MA={debug:"🔍",error:"❌",info:"ℹ️",success:"✅",warn:"⚠️"};class AA{constructor(t={}){this.enabled=t.enabled??!0,this.prefix=t.prefix??"HeroUI"}formatMessage(t,l){const r=RA[t],i=MA[t];return`${r}[${this.prefix}]${ri.reset} ${i} ${l}`}log(t,l,...r){if(!this.enabled)return;const i=this.formatMessage(t,l);switch(t){case"error":console.error(i,...r);break;case"warn":console.warn(i,...r);break;default:console.log(i,...r)}}info(t,...l){this.log("info",t,...l)}success(t,...l){this.log("success",t,...l)}warn(t,...l){this.log("warn",t,...l)}error(t,...l){this.log("error",t,...l)}debug(t,...l){this.log("debug",t,...l)}divider(t="=",l=80){this.enabled&&console.log(t.repeat(l))}newline(){this.enabled&&console.log()}}new AA({prefix:"HeroUI"});const LA=e=>{const t=`$$heroui.collection.${e}`,l=y.createContext(void 0),r=(d,h)=>y.Children.map(d,p=>y.isValidElement(p)?V.cloneElement(p,{[t]:h}):p),i=d=>{const{[t]:h,...p}=d;return[h,p]},s=d=>{const[h,p]=i(d),b=y.useContext(l);return[h??b,p]},u=({children:d,...h})=>E.jsx(l.Provider,{value:h,children:r(d,h)});return u.displayName=`HeroUI.CollectionSlot(${e})`,{key:t,inject:r,consume:i,useSlot:s,Injector:u,withSlot:(d,h)=>{const p=y.forwardRef(function(v,w){const[x,T]=s(v),{children:C,...N}=T;if(!x)return E.jsx(d,{...N,ref:w,children:C});if(h)return h({...N,children:C},x,w);const{className:M,render:L,...k}=x;return E.jsx(d,{...N,ref:w,children:L?L({children:C,className:M,...k}):E.jsx("div",{className:M,"data-slot":`${e}-container`,...k,children:C})})});return p.displayName=`HeroUI.withCollectionSlot(${d.displayName||d.name||e})`,p},Context:l}},kA=e=>{const{containerRef:t,isEnabled:l,offset:r,onVisibilityChange:i,orientation:s,visibility:u}=e,f=y.useRef(null),d=y.useRef(null),h=y.useCallback(()=>{const p=t.current;if(!p)return;const b=s==="vertical",v=b?p.scrollTop:Math.abs(p.scrollLeft),w=b?p.scrollHeight:p.scrollWidth,x=b?p.clientHeight:p.clientWidth,T=v>r,C=v+x+r<w-1,N=f.current;N&&N.hasScrollBefore===T&&N.hasScrollAfter===C||(f.current={hasScrollBefore:T,hasScrollAfter:C},d.current!==null&&cancelAnimationFrame(d.current),d.current=requestAnimationFrame(()=>{d.current=null,b?T&&C?(p.dataset.topBottomScroll="true",delete p.dataset.topScroll,delete p.dataset.bottomScroll,i==null||i("both")):(p.dataset.topScroll=String(T),p.dataset.bottomScroll=String(C),delete p.dataset.topBottomScroll,i&&i(T?"top":C?"bottom":"none")):T&&C?(p.dataset.leftRightScroll="true",delete p.dataset.leftScroll,delete p.dataset.rightScroll,i==null||i("both")):(p.dataset.leftScroll=String(T),p.dataset.rightScroll=String(C),delete p.dataset.leftRightScroll,i&&i(T?"left":C?"right":"none"))}))},[t,s,r,i]);y.useEffect(()=>{const p=t.current;if(!p||!l||u!=="auto")return;h(),p.addEventListener("scroll",h,{passive:!0});const b=new ResizeObserver(h);return b.observe(p),()=>{p.removeEventListener("scroll",h),b.disconnect(),d.current!==null&&(cancelAnimationFrame(d.current),d.current=null),f.current=null}},[t,u,l,h])},NA=globalThis!=null&&globalThis.document?y.useLayoutEffect:y.useEffect,Sh=({children:e,className:t,hideScrollBar:l=!1,isEnabled:r=!0,offset:i=0,onVisibilityChange:s,orientation:u="vertical",ref:f,size:d=40,variant:h="fade",visibility:p="auto",...b})=>{const v=y.useRef(null);kA({containerRef:v,isEnabled:r,offset:i,onVisibilityChange:s,orientation:u,visibility:p}),NA(()=>{const T=v.current;!T||p==="auto"||(delete T.dataset.topScroll,delete T.dataset.bottomScroll,delete T.dataset.topBottomScroll,delete T.dataset.leftScroll,delete T.dataset.rightScroll,delete T.dataset.leftRightScroll,p==="both"?T.dataset[u==="vertical"?"topBottomScroll":"leftRightScroll"]="true":p!=="none"&&(T.dataset[`${p}Scroll`]="true"))},[p,u]);const w=y.useMemo(()=>QC({hideScrollBar:l,orientation:u,variant:h}),[u,l,h]),x={"--scroll-shadow-size":`${d}px`,...b.style};return E.jsx("div",{ref:ya(v,f),className:w.base({className:t}),"data-orientation":u,"data-scroll-shadow-size":d,"data-slot":"scroll-shadow",style:x,...b,children:e})};Sh.displayName="HeroUI.ScrollShadow";const DA=Object.assign(Sh,{Root:Sh}),$A=({...e})=>{const t=y.useId();return E.jsxs("svg",{"data-slot":"spinner-icon",viewBox:"0 0 24 24",...e,children:[E.jsxs("defs",{children:[E.jsxs("linearGradient",{id:`«data-slot-icon-def-1»-${t}`,x1:"50%",x2:"50%",y1:"5.271%",y2:"91.793%",children:[E.jsx("stop",{offset:"0%",stopColor:"currentColor"}),E.jsx("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:.55})]}),E.jsxs("linearGradient",{id:`«data-slot-icon-def-2»-${t}`,x1:"50%",x2:"50%",y1:"15.24%",y2:"87.15%",children:[E.jsx("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:0}),E.jsx("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:.55})]})]}),E.jsxs("g",{fill:"none",children:[E.jsx("path",{d:"m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"}),E.jsx("path",{d:"M8.749.021a1.5 1.5 0 0 1 .497 2.958A7.5 7.5 0 0 0 3 10.375a7.5 7.5 0 0 0 7.5 7.5v3c-5.799 0-10.5-4.7-10.5-10.5C0 5.23 3.726.865 8.749.021",fill:`url(#«data-slot-icon-def-1»-${t})`,transform:"translate(1.5 1.625)"}),E.jsx("path",{d:"M15.392 2.673a1.5 1.5 0 0 1 2.119-.115A10.48 10.48 0 0 1 21 10.375c0 5.8-4.701 10.5-10.5 10.5v-3a7.5 7.5 0 0 0 5.007-13.084a1.5 1.5 0 0 1-.115-2.118",fill:`url(#«data-slot-icon-def-2»-${t})`,transform:"translate(1.5 1.625)"})]})]})},kv=({className:e,color:t,size:l,...r})=>E.jsx(Ct.span,{"aria-label":"Loading","data-slot":"spinner",role:"status",...r,className:JC({className:e,color:t,size:l}),children:E.jsx($A,{"aria-hidden":!0})}),zA=Object.assign(kv,{Root:kv}),$5=Object.assign(Ub,{Root:Ub}),z5=12,P5=3,O5=Number.MAX_SAFE_INTEGER,j5=.05,PA=460,I5=4e3;var B5={};B5={close:"إغلاق",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} إشعار`,other:()=>`${t.number(e.count)} إشعارات`})}.`};var H5={};H5={close:"Затвори",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} известие`,other:()=>`${t.number(e.count)} известия`})}.`};var K5={};K5={close:"Zavřít",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} oznámení`,other:()=>`${t.number(e.count)} oznámení`})}.`};var U5={};U5={close:"Luk",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} besked`,other:()=>`${t.number(e.count)} beskeder`})}.`};var F5={};F5={close:"Schließen",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} Benachrichtigung`,other:()=>`${t.number(e.count)} Benachrichtigungen`})}.`};var V5={};V5={close:"Κλείσιμο",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} ειδοποίηση`,other:()=>`${t.number(e.count)} ειδοποιήσεις`})}.`};var _5={};_5={close:"Close",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notification`,other:()=>`${t.number(e.count)} notifications`})}.`};var G5={};G5={close:"Cerrar",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notificación`,other:()=>`${t.number(e.count)} notificaciones`})}.`};var q5={};q5={close:"Sule",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} teatis`,other:()=>`${t.number(e.count)} teatist`})}.`};var Y5={};Y5={close:"Sulje",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} ilmoitus`,other:()=>`${t.number(e.count)} ilmoitusta`})}.`};var X5={};X5={close:"Fermer",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notification`,other:()=>`${t.number(e.count)} notifications`})}.`};var W5={};W5={close:"סגור",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} התראה`,other:()=>`${t.number(e.count)} התראות`})}.`};var Z5={};Z5={close:"Zatvori",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} obavijest`,other:()=>`${t.number(e.count)} obavijesti`})}.`};var Q5={};Q5={close:"Bezárás",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} értesítés`,other:()=>`${t.number(e.count)} értesítés`})}.`};var J5={};J5={close:"Chiudi",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notifica`,other:()=>`${t.number(e.count)} notifiche`})}.`};var ex={};ex={close:"閉じる",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} 個の通知`,other:()=>`${t.number(e.count)} 個の通知`})}。`};var tx={};tx={close:"닫기",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)}개 알림`,other:()=>`${t.number(e.count)}개 알림`})}.`};var nx={};nx={close:"Uždaryti",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} pranešimas`,other:()=>`${t.number(e.count)} pranešimai`})}.`};var lx={};lx={close:"Aizvērt",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} paziņojums`,other:()=>`${t.number(e.count)} paziņojumi`})}.`};var ax={};ax={close:"Lukk",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} varsling`,other:()=>`${t.number(e.count)} varsler`})}.`};var rx={};rx={close:"Sluiten",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} melding`,other:()=>`${t.number(e.count)} meldingen`})}.`};var ix={};ix={close:"Zamknij",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} powiadomienie`,few:()=>`${t.number(e.count)} powiadomienia`,many:()=>`${t.number(e.count)} powiadomień`,other:()=>`${t.number(e.count)} powiadomienia`})}.`};var ox={};ox={close:"Fechar",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notificação`,other:()=>`${t.number(e.count)} notificações`})}.`};var sx={};sx={close:"Fechar",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notificação`,other:()=>`${t.number(e.count)} notificações`})}.`};var cx={};cx={close:"Închideţi",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notificare`,other:()=>`${t.number(e.count)} notificări`})}.`};var ux={};ux={close:"Закрыть",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} уведомление`,other:()=>`${t.number(e.count)} уведомления`})}.`};var fx={};fx={close:"Zatvoriť",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} oznámenie`,few:()=>`${t.number(e.count)} oznámenia`,other:()=>`${t.number(e.count)} oznámení`})}.`};var dx={};dx={close:"Zapri",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} obvestilo`,two:()=>`${t.number(e.count)} obvestili`,few:()=>`${t.number(e.count)} obvestila`,other:()=>`${t.number(e.count)} obvestil`})}.`};var hx={};hx={close:"Zatvori",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} obaveštenje`,other:()=>`${t.number(e.count)} obaveštenja`})}.`};var mx={};mx={close:"Stäng",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} meddelande`,other:()=>`${t.number(e.count)} meddelanden`})}.`};var px={};px={close:"Kapat",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} bildirim`,other:()=>`${t.number(e.count)} bildirim`})}.`};var gx={};gx={close:"Закрити",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} сповіщення`,other:()=>`${t.number(e.count)} сповіщення`})}.`};var bx={};bx={close:"关闭",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} 个通知`,other:()=>`${t.number(e.count)} 个通知`})}。`};var vx={};vx={close:"關閉",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} 個通知`,other:()=>`${t.number(e.count)} 個通知`})}。`};var f2={};f2={"ar-AE":B5,"bg-BG":H5,"cs-CZ":K5,"da-DK":U5,"de-DE":F5,"el-GR":V5,"en-US":_5,"es-ES":G5,"et-EE":q5,"fi-FI":Y5,"fr-FR":X5,"he-IL":W5,"hr-HR":Z5,"hu-HU":Q5,"it-IT":J5,"ja-JP":ex,"ko-KR":tx,"lt-LT":nx,"lv-LV":lx,"nb-NO":ax,"nl-NL":rx,"pl-PL":ix,"pt-BR":ox,"pt-PT":sx,"ro-RO":cx,"ru-RU":ux,"sk-SK":fx,"sl-SI":dx,"sr-SP":hx,"sv-SE":mx,"tr-TR":px,"uk-UA":gx,"zh-CN":bx,"zh-TW":vx};function OA(e){return e&&e.__esModule?e.default:e}function jA(e,t,l){let{key:r,timer:i,timeout:s}=e.toast;y.useEffect(()=>{if(!(i==null||s==null))return i.reset(s),()=>{i.pause()}},[i,s]);let u=_n(),f=Y0(),d=l2(OA(f2),"@react-aria/toast"),[h,p]=y.useState(!1);return Ne(()=>{p(!0)},[]),{toastProps:{...mt(e,{labelable:!0}),role:"alertdialog","aria-modal":"false","aria-labelledby":e["aria-labelledby"]||u,"aria-describedby":e["aria-describedby"]||f,tabIndex:0},contentProps:{role:"alert","aria-atomic":"true","aria-hidden":h?void 0:"true"},titleProps:{id:u},descriptionProps:{id:f},closeButtonProps:{"aria-label":d.format("close"),onPress:()=>t.close(r)}}}const yx=1,$0=Symbol.for("react-aria-landmark-manager");function IA(e){return document.addEventListener("react-aria-landmark-manager-change",e),()=>document.removeEventListener("react-aria-landmark-manager-change",e)}function Nv(){if(typeof document>"u")return null;let e=document[$0];return e&&e.version>=yx?e:(document[$0]=new HA,document.dispatchEvent(new CustomEvent("react-aria-landmark-manager-change")),document[$0])}function BA(){return Lu.useSyncExternalStore(IA,Nv,Nv)}class HA{constructor(){this.landmarks=[],this.isListening=!1,this.refCount=0,this.version=yx,this.f6Handler=this.f6Handler.bind(this),this.focusinHandler=this.focusinHandler.bind(this),this.focusoutHandler=this.focusoutHandler.bind(this)}setupIfNeeded(){this.isListening||(document.addEventListener("keydown",this.f6Handler,{capture:!0}),document.addEventListener("focusin",this.focusinHandler,{capture:!0}),document.addEventListener("focusout",this.focusoutHandler,{capture:!0}),this.isListening=!0)}teardownIfNeeded(){!this.isListening||this.landmarks.length>0||this.refCount>0||(document.removeEventListener("keydown",this.f6Handler,{capture:!0}),document.removeEventListener("focusin",this.focusinHandler,{capture:!0}),document.removeEventListener("focusout",this.focusoutHandler,{capture:!0}),this.isListening=!1)}focusLandmark(t,l){var r,i;(i=(r=this.landmarks.find(s=>s.ref.current===t))==null?void 0:r.focus)==null||i.call(r,l)}getLandmarksByRole(t){return new Set(this.landmarks.filter(l=>l.role===t))}getLandmarkByRole(t){return this.landmarks.find(l=>l.role===t)}addLandmark(t){if(this.setupIfNeeded(),this.landmarks.find(i=>i.ref===t.ref)||!t.ref.current)return;if(this.landmarks.filter(i=>i.role==="main").length>1,this.landmarks.length===0){this.landmarks=[t],this.checkLabels(t.role);return}let l=0,r=this.landmarks.length-1;for(;l<=r;){let i=Math.floor((l+r)/2),s=t.ref.current.compareDocumentPosition(this.landmarks[i].ref.current);!!(s&Node.DOCUMENT_POSITION_PRECEDING||s&Node.DOCUMENT_POSITION_CONTAINS)?l=i+1:r=i-1}this.landmarks.splice(l,0,t),this.checkLabels(t.role)}updateLandmark(t){let l=this.landmarks.findIndex(r=>r.ref===t.ref);l>=0&&(this.landmarks[l]={...this.landmarks[l],...t},this.checkLabels(this.landmarks[l].role))}removeLandmark(t){this.landmarks=this.landmarks.filter(l=>l.ref!==t),this.teardownIfNeeded()}checkLabels(t){let l=this.getLandmarksByRole(t);l.size>1&&[...l].filter(r=>!r.label)}closestLandmark(t){let l=new Map(this.landmarks.map(i=>[i.ref.current,i])),r=t;for(;r&&!l.has(r)&&r!==document.body&&r.parentElement;)r=r.parentElement;return l.get(r)}getNextLandmark(t,{backward:l}){var f;let r=this.closestLandmark(t),i=l?this.landmarks.length-1:0;r&&(i=this.landmarks.indexOf(r)+(l?-1:1));let s=()=>{if(i<0){if(!t.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"backward"},bubbles:!0,cancelable:!0})))return!0;i=this.landmarks.length-1}else if(i>=this.landmarks.length){if(!t.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"forward"},bubbles:!0,cancelable:!0})))return!0;i=0}return i<0||i>=this.landmarks.length};if(s())return;let u=i;for(;(f=this.landmarks[i].ref.current)!=null&&f.closest("[aria-hidden=true]");){if(i+=l?-1:1,s())return;if(i===u)break}return this.landmarks[i]}f6Handler(t){t.key==="F6"&&(t.altKey?this.focusMain():this.navigate(ve(t),t.shiftKey))&&(t.preventDefault(),t.stopPropagation())}focusMain(){let t=this.getLandmarkByRole("main");return t&&t.ref.current&&t.ref.current.isConnected?(this.focusLandmark(t.ref.current,"forward"),!0):!1}navigate(t,l){let r=this.getNextLandmark(t,{backward:l});if(!r)return!1;if(r.lastFocused){let i=r.lastFocused;if(Ie(document.body,i))return i.focus(),!0}return r.ref.current&&r.ref.current.isConnected?(this.focusLandmark(r.ref.current,l?"backward":"forward"),!0):!1}focusinHandler(t){let l=this.closestLandmark(ve(t));l&&l.ref.current!==ve(t)&&this.updateLandmark({ref:l.ref,lastFocused:ve(t)});let r=t.relatedTarget;if(r){let i=this.closestLandmark(r);i&&i.ref.current===r&&i.blur()}}focusoutHandler(t){let l=ve(t),r=t.relatedTarget;if(!r||r===document){let i=this.closestLandmark(l);i&&i.ref.current===l&&i.blur()}}createLandmarkController(){let t=this;return t.refCount++,t.setupIfNeeded(),{navigate(l,r){let i=(r==null?void 0:r.from)||document.activeElement;return t.navigate(i,l==="backward")},focusNext(l){let r=(l==null?void 0:l.from)||document.activeElement;return t.navigate(r,!1)},focusPrevious(l){let r=(l==null?void 0:l.from)||document.activeElement;return t.navigate(r,!0)},focusMain(){return t.focusMain()},dispose(){t&&(t.refCount--,t.teardownIfNeeded(),t=null)}}}registerLandmark(t){return this.landmarks.find(l=>l.ref===t.ref)?this.updateLandmark(t):this.addLandmark(t),()=>this.removeLandmark(t.ref)}}function KA(e,t){const{role:l,"aria-label":r,"aria-labelledby":i,focus:s}=e;let u=BA(),f=r||i,[d,h]=y.useState(!1),p=y.useCallback(()=>{h(!0)},[h]),b=y.useCallback(()=>{h(!1)},[h]);return Ne(()=>{if(u)return u.registerLandmark({ref:t,label:f,role:l,focus:s||p,blur:b})},[u,f,t,l,s,p,b]),y.useEffect(()=>{var v;d&&((v=t.current)==null||v.focus())},[d,t]),{landmarkProps:{role:l,tabIndex:d?-1:void 0,"aria-label":r,"aria-labelledby":i}}}function UA(e){return e&&e.__esModule?e.default:e}function FA(e,t,l){let r=l2(UA(f2),"@react-aria/toast"),{landmarkProps:i}=KA({role:"region","aria-label":e["aria-label"]||r.format("notifications",{count:t.visibleToasts.length})},l),s=y.useRef(!1),u=y.useRef(!1),f=y.useCallback(()=>{s.current||u.current?t.pauseAll():t.resumeAll()},[t]),{hoverProps:d}=Sa({onHoverStart:()=>{s.current=!0,f()},onHoverEnd:()=>{s.current=!1,f()}}),h=y.useRef([]),p=y.useRef(t.visibleToasts),b=y.useRef(null);Ne(()=>{var C;if(b.current===-1||t.visibleToasts.length===0||!l.current){h.current=[],p.current=t.visibleToasts;return}if(h.current=[...l.current.querySelectorAll('[role="alertdialog"]')],p.current.length===t.visibleToasts.length&&t.visibleToasts.every((N,M)=>N.key===p.current[M].key)){p.current=t.visibleToasts;return}let x=p.current.map((N,M)=>({...N,i:M,isRemoved:!t.visibleToasts.some(L=>N.key===L.key)})),T=x.findIndex(N=>N.i===b.current&&N.isRemoved);if(T>-1)if(pa()==="pointer"&&((C=v.current)!=null&&C.isConnected))en(v.current);else{let N=0,M,L;for(;N<=T;)x[N].isRemoved||(L=Math.max(0,N-1)),N++;for(;N<x.length;){if(!x[N].isRemoved){M=N-1;break}N++}L===void 0&&M===void 0&&(L=0),L>=0&&L<h.current.length?en(h.current[L]):M>=0&&M<h.current.length&&en(h.current[M])}p.current=t.visibleToasts},[t.visibleToasts,l]);let v=y.useRef(null),{focusWithinProps:w}=Yo({onFocusWithin:x=>{u.current=!0,v.current=x.relatedTarget,f()},onBlurWithin:()=>{u.current=!1,v.current=null,f()}});return y.useEffect(()=>{var x;t.visibleToasts.length===0&&((x=v.current)!=null&&x.isConnected)&&(pa()==="pointer"?en(v.current):v.current.focus(),v.current=null)},[l,t.visibleToasts.length]),y.useEffect(()=>()=>{var x;(x=v.current)!=null&&x.isConnected&&(pa()==="pointer"?en(v.current):v.current.focus(),v.current=null)},[l]),{regionProps:Ce(i,d,w,{tabIndex:-1,"data-react-aria-top-layer":!0,onFocus:x=>{let T=ve(x).closest('[role="alertdialog"]');b.current=h.current.findIndex(C=>C===T)},onBlur:()=>{b.current=-1}})}}function VA(e){let t=y.useCallback(i=>e.subscribe(i),[e]),l=y.useCallback(()=>e.visibleToasts,[e]);return{visibleToasts:Lu.useSyncExternalStore(t,l,l),add:(i,s)=>e.add(i,s),close:i=>e.close(i),pauseAll:()=>e.pauseAll(),resumeAll:()=>e.resumeAll()}}class _A{constructor(t){this.queue=[],this.subscriptions=new Set,this.visibleToasts=[],this.maxVisibleToasts=(t==null?void 0:t.maxVisibleToasts)??1/0,this.wrapUpdate=t==null?void 0:t.wrapUpdate}runWithWrapUpdate(t,l){this.wrapUpdate?this.wrapUpdate(t,l):t()}subscribe(t){return this.subscriptions.add(t),()=>this.subscriptions.delete(t)}add(t,l={}){let r="_"+Math.random().toString(36).slice(2),i={...l,content:t,key:r,timer:l.timeout?new GA(()=>this.close(r),l.timeout):void 0};return this.queue.unshift(i),this.updateVisibleToasts("add"),r}close(t){var r,i;let l=this.queue.findIndex(s=>s.key===t);l>=0&&((i=(r=this.queue[l]).onClose)==null||i.call(r),this.queue.splice(l,1)),this.updateVisibleToasts("remove")}updateVisibleToasts(t){this.visibleToasts=this.queue.slice(0,this.maxVisibleToasts),this.runWithWrapUpdate(()=>{for(let l of this.subscriptions)l()},t)}pauseAll(){for(let t of this.visibleToasts)t.timer&&t.timer.pause()}resumeAll(){for(let t of this.visibleToasts)t.timer&&t.timer.resume()}clear(){this.queue=[],this.updateVisibleToasts("clear")}}class GA{constructor(t,l){this.startTime=null,this.remaining=l,this.callback=t}reset(t){this.remaining=t,this.resume()}pause(){this.timerId!=null&&(clearTimeout(this.timerId),this.timerId=null,this.remaining-=Date.now()-this.startTime)}resume(){this.remaining<=0||(this.startTime=Date.now(),this.timerId=setTimeout(()=>{this.timerId=null,this.remaining=0,this.callback()},this.remaining))}}const Du=y.createContext(null),qA=y.forwardRef(function(t,l){let r=Nl(),i=VA(t.queue),s=bn(l),{regionProps:u}=FA(t,i,s),{focusProps:f,isFocused:d,isFocusVisible:h}=Dl(),{hoverProps:p,isHovered:b}=Sa({}),v=At({...t,children:void 0,defaultClassName:"react-aria-ToastRegion",values:{visibleToasts:i.visibleToasts,isHovered:b,isFocused:d,isFocusVisible:h}}),{direction:w}=bi(),x,{getContainer:T}=_4();r||(x=document.body,T&&(x=T()));let C=mt(t,{global:!0}),N=V.createElement(Du.Provider,{value:i},V.createElement(ut.div,{...Ce(C,v,u,f,p),dir:w,ref:s,"data-hovered":b||void 0,"data-focused":d||void 0,"data-focus-visible":h||void 0},typeof t.children=="function"?V.createElement(YA,{...t,render:void 0,className:void 0,style:{display:"contents"}},t.children):t.children));return i.visibleToasts.length>0&&x?al.createPortal(N,x):null}),YA=y.forwardRef(function(t,l){let r=y.useContext(Du),{hoverProps:i,isHovered:s}=Sa({}),u=At({...t,children:void 0,defaultClassName:"react-aria-ToastList",values:{visibleToasts:r.visibleToasts,isFocused:!1,isFocusVisible:!1,isHovered:s}});return V.createElement(ut.ol,{...i,...u,ref:l},r.visibleToasts.map(f=>V.createElement("li",{key:f.key,style:{display:"contents"}},t.children({toast:f}))))}),XA=y.forwardRef(function(t,l){let r=y.useContext(Du),i=bn(l),{toastProps:s,contentProps:u,titleProps:f,descriptionProps:d,closeButtonProps:h}=jA(t,r,i),{focusProps:p,isFocused:b,isFocusVisible:v}=Dl(),w=At({...t,defaultClassName:"react-aria-Toast",values:{toast:t.toast,isFocused:b,isFocusVisible:v}}),x=mt(t,{global:!0});return V.createElement(ut.div,{...Ce(x,w,s,p),ref:i,"data-focused":b||void 0,"data-focus-visible":v||void 0},V.createElement(sr,{values:[[xx,u],[ku,{slots:{[fi]:{},title:f,description:d}}],[e2,{slots:{[fi]:{},close:h}}]]},w.children))}),xx=y.createContext({}),WA=y.forwardRef(function(t,l){return[t,l]=yn(t,l,xx),V.createElement(ut.div,{render:t.render,className:"react-aria-ToastContent",...t,ref:l},t.children)});class Xo{constructor(t){this.maxVisibleToasts=t==null?void 0:t.maxVisibleToasts;let l=Promise.resolve();const r=i=>{if(typeof document>"u"||!("startViewTransition"in document)){i();return}const s=()=>{const u=document.startViewTransition(()=>{al.flushSync(i)});return u.ready.catch(()=>{}),u.finished.catch(()=>{})};l=l.then(s,s)};this.queue=new _A({maxVisibleToasts:O5,wrapUpdate:(t==null?void 0:t.wrapUpdate)??r})}add(t,l){const r=(l==null?void 0:l.timeout)!==void 0?l.timeout:I5;return this.queue.add(t,{...l,timeout:r})}close(t){this.queue.close(t)}pauseAll(){this.queue.pauseAll()}resumeAll(){this.queue.resumeAll()}clear(){this.queue.clear()}subscribe(t){return this.queue.subscribe(t)}get visibleToasts(){return this.queue.visibleToasts}getQueue(){return this.queue}}function ZA(e){const t=(l,r)=>{const i=(r==null?void 0:r.timeout)!==void 0?r.timeout:I5;return e.add({title:l,description:r==null?void 0:r.description,indicator:r==null?void 0:r.indicator,variant:(r==null?void 0:r.variant)||"default",actionProps:r==null?void 0:r.actionProps,isLoading:r==null?void 0:r.isLoading},{timeout:i,onClose:()=>{requestAnimationFrame(()=>{var s;(s=r==null?void 0:r.onClose)==null||s.call(r)})}})};return t.success=(l,r)=>t(l,{...r,variant:"success"}),t.danger=(l,r)=>t(l,{...r,variant:"danger"}),t.info=(l,r)=>t(l,{...r,variant:"accent"}),t.warning=(l,r)=>t(l,{...r,variant:"warning"}),t.promise=(l,r)=>{const i=typeof l=="function"?l():l,s=e.add({title:r.loading,variant:"default",isLoading:!0},{timeout:0});return i.then(u=>{const f=typeof r.success=="function"?r.success(u):r.success;return e.close(s),t.success(f)}).catch(u=>{const f=typeof r.error=="function"?r.error(u):r.error;return e.close(s),t.danger(f)}),s},t.getQueue=()=>e.getQueue(),t.close=l=>e.close(l),t.pauseAll=()=>e.pauseAll(),t.resumeAll=()=>e.resumeAll(),t.clear=()=>e.clear(),t}const QA=new Xo({maxVisibleToasts:O5}),Sx=ZA(QA),JA=e=>{const[t,l]=y.useState(void 0),r=y.useCallback(()=>{if(e.current){const i=e.current.scrollHeight;l(s=>s!==i?i:s)}},[e]);return y.useEffect(()=>{const i=e.current;if(!i)return;const s=new ResizeObserver(r),u=new MutationObserver(f=>{f.some(h=>h.type==="attributes"&&h.attributeName==="aria-hidden")&&r()});return s.observe(i),u.observe(i,{attributeFilter:["aria-hidden"],attributes:!0}),()=>{s.disconnect(),u.disconnect()}},[e,r]),{height:t}},wx=typeof window<"u"?y.useLayoutEffect:y.useEffect,eL=typeof window>"u";function tL(e,{defaultValue:t=!1,initializeWithValue:l=!0}={}){const r=f=>eL?t:window.matchMedia(f).matches,[i,s]=y.useState(()=>l?r(e):t);function u(){s(r(e))}return wx(()=>{const f=window.matchMedia(e);return u(),f.addListener?f.addListener(u):f.addEventListener("change",u),()=>{f.removeListener?f.removeListener(u):f.removeEventListener("change",u)}},[e]),i}const wa=y.createContext({}),d2=({children:e,className:t,placement:l,scaleFactor:r=j5,toast:i,variant:s,...u})=>{const{gap:f=z5,heightsByKey:d,maxVisibleToasts:h=P5,onToastHeightChange:p,onToastHeightRemove:b,placement:v,scaleFactor:w,slots:x}=y.use(wa),T=l??v,C=r??w,M=y.use(Du).visibleToasts,L=M.indexOf(i),k=L<=0,B=T==null?void 0:T.startsWith("bottom"),G=L>=h,$=i==null?void 0:i.key,A=y.useRef(null),{height:U}=JA(A);y.useEffect(()=>{$&&typeof U=="number"&&(p==null||p($,U))},[$,U,p]),y.useEffect(()=>{if($)return()=>{b==null||b($)}},[$,b]),y.useLayoutEffect(()=>{const q=A.current;q&&(q.tabIndex=k?0:-1)},[k]);const K=y.useMemo(()=>{var z;const q=(z=M[0])==null?void 0:z.key,te=(q?d==null?void 0:d[q]:void 0)??U??0,ne=L*f,j=(B?-1:1)*ne;return{scale:`${1-L*C}`,translate:`0 ${j}px 0`,viewTransitionName:`toast-${String(i.key).replace(/[^a-zA-Z0-9]/g,"-")}`,zIndex:M.length-L,...te?{"--front-height":`${te}px`}:null,opacity:G?0:1,pointerEvents:G?"none":"auto",...u.style}},[C,f,d,L,B,k,G,u.style,i==null?void 0:i.key,U,M]);return E.jsx(XA,{ref:A,"aria-hidden":G,className:Mt(t,x==null?void 0:x.toast({variant:s})),"data-frontmost":ch(k),"data-hidden":ch(G),"data-index":L,"data-slot":"toast",style:K,toast:i,...u,children:e})};d2.displayName="HeroUI.Toast";const Ex=({children:e,className:t,...l})=>{const{slots:r}=y.use(wa);return E.jsx(WA,{className:Je(r==null?void 0:r.content,t),"data-slot":"toast-content",...l,children:e})},cu=({children:e,className:t,variant:l,...r})=>{const{slots:i}=y.use(wa),s=y.useCallback(()=>{switch(l){case"accent":return E.jsx(au,{"data-slot":"toast-default-icon"});case"success":return E.jsx(e4,{"data-slot":"toast-default-icon"});case"warning":return E.jsx(Q3,{"data-slot":"toast-default-icon"});case"danger":return E.jsx(J3,{"data-slot":"toast-default-icon"});default:return E.jsx(au,{"data-slot":"toast-default-icon"})}},[l]);return E.jsx(Ct.div,{className:Je(i==null?void 0:i.indicator,t),"data-slot":"toast-indicator",...r,children:e??s()})};cu.displayName="HeroUI.ToastIndicator";const h2=({children:e,className:t,...l})=>{const{slots:r}=y.use(wa);return E.jsx(s5,{className:Je(r==null?void 0:r.title,t),"data-slot":"toast-title",slot:"title",...l,children:e})};h2.displayName="HeroUI.ToastTitle";const m2=({children:e,className:t,...l})=>{const{slots:r}=y.use(wa);return E.jsx(s5,{className:Je(r==null?void 0:r.description,t),"data-slot":"toast-description",slot:"description",...l,children:e})};m2.displayName="HeroUI.ToastDescription";const p2=({className:e,...t})=>{const{slots:l}=y.use(wa);return E.jsx(d5,{className:Mt(e,l==null?void 0:l.close()),"data-slot":"toast-close",slot:"close",...t})};p2.displayName="HeroUI.ToastCloseButton";const uu=({children:e,className:t,...l})=>{var i;const{slots:r}=y.use(wa);return E.jsx(mn,{className:Mt(t,(i=r==null?void 0:r.action)==null?void 0:i.call(r)),"data-slot":"toast-action-button",...l,children:e})};uu.displayName="HeroUI.ToastActionButton";const Cx=({children:e,className:t,gap:l=z5,maxVisibleToasts:r,placement:i="bottom",queue:s,scaleFactor:u=j5,width:f=PA,...d})=>{const h=y.useMemo(()=>nT({placement:i}),[i]),p=tL("(max-width: 768px)"),[b,v]=V.useState({}),w=y.useMemo(()=>s?s.getQueue():Sx.getQueue(),[s]),x=y.useMemo(()=>{const M=s&&"maxVisibleToasts"in s?s.maxVisibleToasts:void 0;return r??M??P5},[r,s]),T=y.useCallback((M,L)=>{v(k=>k[M]===L?k:{...k,[M]:L})},[]),C=y.useCallback(M=>{v(L=>{if(!(M in L))return L;const k={...L};return delete k[M],k})},[]),N=y.useCallback(M=>{const{actionProps:L,description:k,indicator:B,isLoading:G,title:$,variant:A}=M.toast.content??{};return E.jsxs(d2,{placement:i,scaleFactor:u,toast:M.toast,variant:A,children:[B===null?null:G?E.jsx(cu,{variant:A,children:E.jsx(zA,{color:"current",size:"sm"})}):E.jsx(cu,{variant:A,children:B}),E.jsxs(Ex,{children:[!!$&&E.jsx(h2,{children:$}),!!k&&E.jsx(m2,{children:k}),p&&(L!=null&&L.children)?E.jsx(uu,{...L,children:L.children}):null]}),!p&&(L!=null&&L.children)?E.jsx(uu,{...L,children:L.children}):null,E.jsx(p2,{})]})},[p,i,u]);return E.jsx(qA,{className:Mt(t,h==null?void 0:h.region()),"data-slot":"toast-region",queue:w,style:{"--gap":`${l}px`,"--placement":i,"--scale-factor":u,"--toast-width":typeof f=="number"?`${f}px`:f},...d,children:M=>{const L=M.toast.content,k={...M,isLoading:(L==null?void 0:L.isLoading)??!1};return E.jsx(wa,{value:{gap:l,heightsByKey:b,maxVisibleToasts:x,onToastHeightChange:T,onToastHeightRemove:C,placement:i,scaleFactor:u,slots:h,width:f},children:typeof e>"u"?N(M):typeof e=="function"?e(k):e})}})};Cx.displayName="HeroUI.ToastProvider";const g2=Object.assign(d2,{Provider:Cx,Content:Ex,Indicator:cu,Title:h2,Description:m2,ActionButton:uu,CloseButton:p2,Queue:Xo,toast:Sx}),Tx=new WeakMap;function fu(e,t,l){return e?(typeof t=="string"&&(t=t.replace(/\s+/g,"")),`${Tx.get(e)}-${l}-${t}`):""}function nL(e,t,l){let{key:r,isDisabled:i,shouldSelectOnPressUp:s}=e,{selectionManager:u,selectedKey:f}=t,d=r===f,h=i||t.isDisabled||t.selectionManager.isDisabled(r),p=t.collection.getItem(r),{itemProps:b,isPressed:v}=fM({selectionManager:u,key:r,ref:l,isDisabled:h,shouldSelectOnPressUp:s??(p==null?void 0:p.props.href)!=null,linkBehavior:"selection"}),w=fu(t,r,"tab"),x=fu(t,r,"tabpanel"),{tabIndex:T}=b,C=mt(p==null?void 0:p.props,{labelable:!0});delete C.id;let N=Qy(p==null?void 0:p.props),{focusableProps:M}=qo({...p==null?void 0:p.props,isDisabled:h},l);return{tabProps:Ce(C,M,N,b,{id:w,"aria-selected":d,"aria-disabled":h||void 0,"aria-controls":d?x:void 0,tabIndex:h?void 0:T,role:"tab"}),isSelected:d,isDisabled:h,isPressed:v}}function lL(e,t){let l=t==null?void 0:t.isDisabled,[r,i]=y.useState(!1);return Ne(()=>{if(e!=null&&e.current&&!l){let s=()=>{if(e.current){let f=ll(e.current,{tabbable:!0});i(!!f.nextNode())}};s();let u=new MutationObserver(s);return u.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{u.disconnect()}}}),l?!1:r}function aL(e,t,l){let r=lL(l)?void 0:0;const i=fu(t,e.id??(t==null?void 0:t.selectedKey),"tabpanel"),s=Kh({...e,id:i,"aria-labelledby":fu(t,t==null?void 0:t.selectedKey,"tab")});return{tabPanelProps:Ce(s,{tabIndex:r,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}class rL{constructor(t,l,r,i=new Set){this.collection=t,this.flipDirection=l==="rtl"&&r==="horizontal",this.disabledKeys=i,this.tabDirection=r==="horizontal"}getKeyLeftOf(t){return this.flipDirection?this.getNextKey(t):this.getPreviousKey(t)}getKeyRightOf(t){return this.flipDirection?this.getPreviousKey(t):this.getNextKey(t)}isDisabled(t){var l,r;return this.disabledKeys.has(t)||!!((r=(l=this.collection.getItem(t))==null?void 0:l.props)!=null&&r.isDisabled)}getFirstKey(){let t=this.collection.getFirstKey();return t!=null&&this.isDisabled(t)&&(t=this.getNextKey(t)),t}getLastKey(){let t=this.collection.getLastKey();return t!=null&&this.isDisabled(t)&&(t=this.getPreviousKey(t)),t}getKeyAbove(t){return this.tabDirection?null:this.getPreviousKey(t)}getKeyBelow(t){return this.tabDirection?null:this.getNextKey(t)}getNextKey(t){let l=t;do l=this.collection.getKeyAfter(l),l==null&&(l=this.collection.getFirstKey());while(l!=null&&this.isDisabled(l)&&l!==t);return l}getPreviousKey(t){let l=t;do l=this.collection.getKeyBefore(l),l==null&&(l=this.collection.getLastKey());while(l!=null&&this.isDisabled(l)&&l!==t);return l}}function iL(e,t,l){let{orientation:r="horizontal",keyboardActivation:i="automatic"}=e,{collection:s,selectionManager:u,disabledKeys:f}=t,{direction:d}=bi(),h=y.useMemo(()=>new rL(s,d,r,f),[s,f,r,d]),{collectionProps:p}=uM({ref:l,selectionManager:u,keyboardDelegate:h,selectOnFocus:i==="automatic",disallowEmptySelection:!0,scrollRef:l,linkBehavior:"selection"}),b=_n();Tx.set(t,b);let v=Kh({...e,id:b});return{tabListProps:{...Ce(p,v),role:"tablist","aria-orientation":r,tabIndex:void 0}}}function oL(e){let[t,l]=Ru(e.selectedKey,e.defaultSelectedKey??null,e.onSelectionChange),r=y.useMemo(()=>t!=null?[t]:[],[t]),{collection:i,disabledKeys:s,selectionManager:u}=IM({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:r,onSelectionChange:d=>{if(d==="all")return;let h=d.values().next().value??null;h===t&&e.onSelectionChange&&e.onSelectionChange(h),l(h)}}),f=t!=null?i.getItem(t):null;return{collection:i,disabledKeys:s,selectionManager:u,selectedKey:t,setSelectedKey:l,selectedItem:f}}function sL(e){let t=oL({...e,onSelectionChange:e.onSelectionChange?u=>{var f;u!=null&&((f=e.onSelectionChange)==null||f.call(e,u))}:void 0,suppressTextValueWarning:!0,defaultSelectedKey:e.defaultSelectedKey??Dv(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)??void 0}),{selectionManager:l,collection:r,selectedKey:i}=t,s=y.useRef(i);return y.useEffect(()=>{let u=i;e.selectedKey==null&&(l.isEmpty||u==null||!r.getItem(u))&&(u=Dv(r,t.disabledKeys),u!=null&&l.setSelectedKeys([u])),(u!=null&&l.focusedKey==null||!l.isFocused&&u!==s.current)&&l.setFocusedKey(u),s.current=u}),{...t,isDisabled:e.isDisabled||!1}}function Dv(e,t){var r,i,s,u;let l=null;if(e){for(l=e.getFirstKey();l!=null&&(t.has(l)||(i=(r=e.getItem(l))==null?void 0:r.props)!=null&&i.isDisabled)&&l!==e.getLastKey();)l=e.getKeyAfter(l);l!=null&&(t.has(l)||(u=(s=e.getItem(l))==null?void 0:s.props)!=null&&u.isDisabled)&&l===e.getLastKey()&&(l=e.getFirstKey())}return l}const $u=y.createContext(null),ar=y.createContext(null),cL=y.forwardRef(function(t,l){[t,l]=yn(t,l,$u);let{children:r,orientation:i="horizontal"}=t;return r=y.useMemo(()=>typeof r=="function"?r({orientation:i,defaultChildren:null}):r,[r,i]),V.createElement(KR,{content:r},s=>V.createElement(uL,{props:t,collection:s,tabsRef:l}))});function uL({props:e,tabsRef:t,collection:l}){let{orientation:r="horizontal"}=e,i=sL({...e,collection:l,children:void 0}),{focusProps:s,isFocused:u,isFocusVisible:f}=Dl({within:!0}),d=y.useMemo(()=>({orientation:r,isFocusWithin:u,isFocusVisible:f}),[r,u,f]),h=At({...e,defaultClassName:"react-aria-Tabs",values:d}),p=mt(e,{global:!0});return V.createElement(ut.div,{...Ce(p,h,s),ref:t,slot:e.slot||void 0,"data-focused":u||void 0,"data-orientation":r,"data-focus-visible":f||void 0,"data-disabled":i.isDisabled||void 0},V.createElement(sr,{values:[[$u,e],[ar,i]]},h.children))}const $v=y.forwardRef(function(t,l){return y.useContext(ar)?V.createElement(fL,{props:t,forwardedRef:l}):V.createElement(YR,t)});function fL({props:e,forwardedRef:t}){let l=y.useContext(ar),{CollectionRoot:r}=y.useContext(l5),{orientation:i="horizontal",keyboardActivation:s="automatic"}=Cu($u),u=bn(t),{tabListProps:f}=iL({...e,orientation:i,keyboardActivation:s},l,u),d=At({...e,children:null,defaultClassName:"react-aria-TabList",values:{orientation:i,state:l}}),h=mt(e,{global:!0});return delete h.id,V.createElement(ut.div,{...Ce(h,d,f),ref:u,"data-orientation":i||void 0},V.createElement(eM,null,V.createElement(r,{collection:l.collection,persistedKeys:ZR(l.selectionManager.focusedKey)})))}const k2=class k2 extends vi{};k2.type="item";let wh=k2;const dL=qR(wh,(e,t,l)=>{let r=y.useContext(ar),i=bn(t),{tabProps:s,isSelected:u,isDisabled:f,isPressed:d}=nL({key:l.key,...e},r,i),{focusProps:h,isFocused:p,isFocusVisible:b}=Dl(),{hoverProps:v,isHovered:w}=Sa({isDisabled:f,onHoverStart:e.onHoverStart,onHoverEnd:e.onHoverEnd,onHoverChange:e.onHoverChange}),x=At({...e,id:void 0,children:l.rendered,defaultClassName:"react-aria-Tab",values:{isSelected:u,isDisabled:f,isFocused:p,isFocusVisible:b,isPressed:d,isHovered:w}}),T=l.props.href?ut.a:ut.div,C=mt(e,{global:!0});return delete C.id,delete C.onClick,V.createElement(T,{...Ce(C,x,s,h,v),ref:i,"data-selected":u||void 0,"data-disabled":f||void 0,"data-focused":p||void 0,"data-focus-visible":b||void 0,"data-pressed":d||void 0,"data-hovered":w||void 0},V.createElement(o5.Provider,{value:{isSelected:u}},x.children))}),hL=O3(function(t,l){const r=y.useContext(ar);let i=bn(l),s=r.selectedKey===t.id,[u,f]=y.useState(r.selectedKey!=null?s:null);u==null&&r.selectedKey!=null?f(s):!s&&u&&f(!1);let d=Zc(i,s);return!s&&!t.shouldForceMount&&!d?null:V.createElement(mL,{...t,tabPanelRef:i,isInitiallySelected:u||!1,isExiting:d})});function mL(e){let t=y.useContext(ar),{id:l,tabPanelRef:r,isInitiallySelected:i,isExiting:s,...u}=e,{tabPanelProps:f}=aL(e,t,r),{focusProps:d,isFocused:h,isFocusVisible:p}=Dl(),b=t.selectedKey===e.id,v=wu(r)&&!i,w=At({...e,defaultClassName:"react-aria-TabPanel",values:{isFocused:h,isFocusVisible:p,isInert:Sb(!b),isEntering:v,isExiting:s,state:t}}),x=mt(u,{global:!0});delete x.id;let T=b?Ce(x,f,d,w):Ce(x,w);return V.createElement(ut.div,{...T,ref:r,"data-focused":h||void 0,"data-focus-visible":p||void 0,inert:Sb(!b||e.inert),"data-inert":b?void 0:"true","data-entering":v||void 0,"data-exiting":s||void 0},V.createElement(sr,{values:[[$u,null],[ar,null]]},V.createElement(l5.Provider,{value:n5},w.children)))}const xi=y.createContext({}),Rx=LA("tabs.listContainer"),zv=({children:e,className:t,orientation:l="horizontal",variant:r,...i})=>{const s=V.useMemo(()=>tT({variant:r}),[r]);return E.jsx(xi,{value:{orientation:l,slots:s},children:E.jsx(cL,{...i,className:Mt(t,s.base()),"data-slot":"tabs",orientation:l,children:e})})},pL=({children:e,className:t,render:l,...r})=>E.jsx(Rx.Injector,{...r,className:t,render:l,children:e}),gL=({children:e,className:t,...l})=>{const{orientation:r="horizontal",slots:i}=y.use(xi),s=y.useRef(null),u=r==="vertical",[f,d]=Rx.useSlot(l),h=y.useCallback(w=>{const x=s.current;if(!x)return;const T=u?x.clientHeight:x.clientWidth,C=u?x.scrollHeight:x.scrollWidth,N=Math.max(0,C-T),M=!u&&getComputedStyle(x).direction==="rtl",L=w*T*.8*(M?-1:1),k=u?x.scrollTop:x.scrollLeft,B=Math.min(M?0:N,Math.max(M?-N:0,k+L));B!==k&&x.scrollTo({behavior:"smooth",[u?"top":"left"]:B})},[u]);if(!f)return E.jsx($v,{...d,className:Mt(t,i==null?void 0:i.tabList()),"data-slot":"tabs-list",children:e});const{className:p,render:b,...v}=f;return E.jsx($v,{...d,className:Mt(t,i==null?void 0:i.tabList()),"data-slot":"tabs-list",render:w=>{const{children:x,className:T,ref:C,...N}=w;return E.jsxs(Ct.div,{className:Je(i==null?void 0:i.tabListContainer,p),"data-slot":"tabs-list-container",render:b,...v,children:[E.jsx(DA,{ref:s,hideScrollBar:!0,className:Je(i==null?void 0:i.scroller),orientation:r,size:64,children:E.jsx("div",{...N,ref:C,className:T,children:x})}),E.jsx("button",{"aria-label":u?"Scroll tabs up":"Scroll tabs left",className:Je(i==null?void 0:i.scrollPrev),tabIndex:-1,type:"button",onClick:()=>h(-1),children:u?E.jsx(GT,{}):E.jsx(qT,{})}),E.jsx("button",{"aria-label":u?"Scroll tabs down":"Scroll tabs right",className:Je(i==null?void 0:i.scrollNext),tabIndex:-1,type:"button",onClick:()=>h(1),children:u?E.jsx(_T,{}):E.jsx(YT,{})})]})},children:e})},bL=({children:e,className:t,...l})=>{const{slots:r}=y.use(xi);return E.jsx(dL,{...l,className:Mt(t,r==null?void 0:r.tab()),"data-slot":"tabs-tab",children:e})},vL=({className:e,...t})=>{const{slots:l}=y.use(xi);return E.jsx(nM,{className:Je(l==null?void 0:l.tabIndicator,e),"data-slot":"tabs-indicator",...t})},yL=({children:e,className:t,...l})=>{const{slots:r}=y.use(xi);return E.jsx(hL,{...l,className:Mt(t,r==null?void 0:r.tabPanel()),"data-slot":"tabs-panel",children:e})},xL=({className:e,...t})=>{const{slots:l}=y.use(xi);return E.jsx(Ct.span,{"aria-hidden":"true",className:Je(l==null?void 0:l.separator,e),"data-slot":"tabs-separator",...t})},ra=Object.assign(zv,{Root:zv,ListContainer:pL,List:gL,Tab:bL,Indicator:vL,Separator:xL,Panel:yL}),Wo=y.createContext({}),Pv=({children:e,className:t,status:l,...r})=>{const i=V.useMemo(()=>_C({status:l}),[l]);return E.jsx(Wo,{value:{slots:i,status:l},children:E.jsx(t2,{value:{variant:"default"},children:E.jsx(Ct.div,{className:i==null?void 0:i.base({className:t}),"data-slot":"alert-root",...r,children:e})})})},SL=({children:e,className:t,...l})=>{const{slots:r,status:i}=y.use(Wo),s=()=>{switch(i){case"accent":return E.jsx(au,{"data-slot":"alert-default-icon"});case"success":return E.jsx(e4,{"data-slot":"alert-default-icon"});case"warning":return E.jsx(Q3,{"data-slot":"alert-default-icon"});case"danger":return E.jsx(J3,{"data-slot":"alert-default-icon"});default:return E.jsx(au,{"data-slot":"alert-default-icon"})}};return E.jsx(Ct.div,{className:Je(r==null?void 0:r.indicator,t),"data-slot":"alert-indicator",...l,children:e??s()})},wL=({children:e,className:t,...l})=>{const{slots:r}=y.use(Wo);return E.jsx(Ct.div,{className:Je(r==null?void 0:r.content,t),"data-slot":"alert-content",...l,children:e})},EL=({children:e,className:t,...l})=>{const{slots:r}=y.use(Wo);return E.jsx(Ct.p,{className:Je(r==null?void 0:r.title,t),"data-slot":"alert-title",...l,children:e})},CL=({children:e,className:t,...l})=>{const{slots:r}=y.use(Wo);return E.jsx(Ct.span,{className:Je(r==null?void 0:r.description,t),"data-slot":"alert-description",...l,children:e})},wo=Object.assign(Pv,{Root:Pv,Indicator:SL,Content:wL,Title:EL,Description:CL}),pn=y.createContext({}),Ov=({children:e,state:t,...l})=>{const r=y.useMemo(()=>({slots:Zh(),placement:void 0}),[]),i=y.useMemo(()=>t?{isOpen:t.isOpen,onOpenChange:t.setOpen}:{},[t]);return E.jsx(pn,{value:r,children:E.jsx(EM,{"data-slot":"modal-root",...Ce(l,i),children:e})})},TL=({children:e,className:t,...l})=>{const{slots:r}=y.use(pn);return E.jsx(kM,{children:E.jsx(Ct.div,{className:Je(r==null?void 0:r.trigger,t),"data-slot":"modal-trigger",role:"button",...l,children:e})})},RL=({children:e,className:t,isDismissable:l=!0,onClick:r,variant:i,...s})=>{const{slots:u}=y.use(pn),f=y.useMemo(()=>Zh({variant:i}),[i]),d=y.useMemo(()=>({slots:{...u,...f}}),[u,f]);return E.jsx(f5,{className:Mt(t,f==null?void 0:f.backdrop()),"data-slot":"modal-backdrop",isDismissable:l,onClick:h=>{h.stopPropagation(),r==null||r(h)},...s,children:h=>E.jsxs(pn,{value:d,children:[typeof e=="function"?e(h):e," "]})})},ML=({children:e,className:t,placement:l="auto",scroll:r,size:i,...s})=>{const{slots:u}=y.use(pn),f=y.useMemo(()=>Zh({scroll:r,size:i}),[r,i]),d=y.useMemo(()=>({placement:l,slots:{...u,...f}}),[u,l,f]);return E.jsx(MM,{className:Mt(t,f==null?void 0:f.container()),"data-placement":l,"data-slot":"modal-container",...s,children:h=>E.jsx(pn,{value:d,children:typeof e=="function"?e(h):e})})},AL=({children:e,className:t,...l})=>{const{placement:r,slots:i}=y.use(pn);return E.jsx(t2,{value:{variant:"default"},children:E.jsx(CM,{className:Je(i==null?void 0:i.dialog,t),"data-placement":r,"data-slot":"modal-dialog",...l,children:e})})},LL=({children:e,className:t,...l})=>{const{slots:r}=y.use(pn);return E.jsx(Ct.div,{className:Je(r==null?void 0:r.header,t),"data-slot":"modal-header",...l,children:e})},kL=({children:e,className:t,...l})=>{const{slots:r}=y.use(pn);return E.jsx(Ct.div,{className:Je(r==null?void 0:r.body,t),"data-slot":"modal-body",...l,children:e})},NL=({children:e,className:t,...l})=>{const{slots:r}=y.use(pn);return E.jsx(Ct.div,{className:Je(r==null?void 0:r.footer,t),"data-slot":"modal-footer",...l,children:e})},DL=({children:e,className:t,...l})=>{const{slots:r}=y.use(pn);return E.jsx(VT,{className:Je(r==null?void 0:r.heading,t),"data-slot":"modal-heading",slot:"title",...l,children:e})},$L=({children:e,className:t,...l})=>{const{slots:r}=y.use(pn);return E.jsx(Ct.div,{className:Je(r==null?void 0:r.icon,t),"data-slot":"modal-icon",...l,children:e})},zL=({className:e,...t})=>{const{slots:l}=y.use(pn);return E.jsx(d5,{className:Mt(e,l==null?void 0:l.closeTrigger()),"data-slot":"modal-close-trigger",slot:"close",...t})},Be=Object.assign(Ov,{Root:Ov,Trigger:TL,Backdrop:RL,Container:ML,Dialog:AL,Header:LL,Icon:$L,Heading:DL,Body:kL,Footer:NL,CloseTrigger:zL}),jv="heroui-theme",Mx="(prefers-color-scheme: dark)";function PL(e){if(typeof window>"u")return()=>{};const t=window.matchMedia(Mx);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function OL(){var e;return(e=window.matchMedia)!=null&&e.call(window,Mx).matches?"dark":"light"}function jL(){}function IL(e,t){t!==e&&(t&&document.documentElement.classList.remove(t),document.documentElement.classList.add(e),document.documentElement.setAttribute("data-theme",e))}function BL(e="system"){const[t,l]=y.useState(()=>typeof window>"u"?e:localStorage.getItem(jv)??e),r=y.useSyncExternalStore(PL,OL,jL),i=t==="system"?r:t,s=y.useRef(void 0);wx(()=>{i&&(IL(i,s.current),s.current=i)},[i]);const u=y.useCallback(f=>{typeof window>"u"||(localStorage.setItem(jv,f),l(f))},[]);return{resolvedTheme:i,setTheme:u,theme:t}}const Ax=y.createContext(null);function HL({children:e}){const{theme:t,setTheme:l}=BL("light"),r=t==="dark"?"dark":"light",i=y.useCallback(f=>{l(f)},[l]),s=y.useCallback(()=>{l(r==="light"?"dark":"light")},[l,r]),u=y.useMemo(()=>({theme:r,setTheme:i,toggleTheme:s}),[r,i,s]);return E.jsx(Ax.Provider,{value:u,children:e})}function Az(){const e=y.useContext(Ax);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const KL=e=>y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),y.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.53 11.78a.75.75 0 0 1-1.06 0l-2.5-2.5a.75.75 0 0 1 1.06-1.06l1.22 1.22V1.75a.75.75 0 0 1 1.5 0v7.69l1.22-1.22a.75.75 0 1 1 1.06 1.06zM1.75 13.5a.75.75 0 0 0 0 1.5h12.5a.75.75 0 0 0 0-1.5z",clipRule:"evenodd"})),UL=e=>y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),y.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-.25 3a.75.75 0 0 0-1.5 0V11a.75.75 0 0 0 1.5 0z",clipRule:"evenodd"})),FL=e=>y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),y.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.199 2H8.8a.2.2 0 0 1 .2.2c0 1.808 1.958 2.939 3.524 2.034a.2.2 0 0 1 .271.073l.802 1.388a.2.2 0 0 1-.073.272c-1.566.904-1.566 3.164 0 4.069a.2.2 0 0 1 .073.271l-.802 1.388a.2.2 0 0 1-.271.073C10.958 10.863 9 11.993 9 13.8a.2.2 0 0 1-.199.2H7.2a.2.2 0 0 1-.2-.2c0-1.808-1.958-2.938-3.524-2.034a.2.2 0 0 1-.272-.073l-.8-1.388a.2.2 0 0 1 .072-.271c1.566-.905 1.566-3.165 0-4.07a.2.2 0 0 1-.073-.27l.801-1.389a.2.2 0 0 1 .272-.072C5.042 5.138 7 4.007 7 2.199c0-.11.089-.199.199-.199M5.5 2.2c0-.94.76-1.7 1.699-1.7H8.8c.94 0 1.7.76 1.7 1.7a.85.85 0 0 0 1.274.735 1.7 1.7 0 0 1 2.32.622l.802 1.388c.469.813.19 1.851-.622 2.32a.85.85 0 0 0 0 1.472 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.7 1.7 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .939-.76 1.7-1.699 1.7H7.2a1.7 1.7 0 0 1-1.699-1.7.85.85 0 0 0-1.274-.735 1.7 1.7 0 0 1-2.32-.622l-.802-1.388a1.7 1.7 0 0 1 .622-2.32.85.85 0 0 0 0-1.471 1.7 1.7 0 0 1-.622-2.32l.801-1.389a1.7 1.7 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2m4 5.8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0",clipRule:"evenodd"})),VL="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20d='M9.205%208.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357%201.356-.523%202.117-.523%202.854%200%204.662%202.212%204.662%204.566%200%20.167%200%20.357-.024.547l-4.71-2.759a.797.797%200%2000-.856%200l-5.97%203.473zm10.609%208.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473%201.95-1.118a.433.433%200%2001.476%200l4.543%202.617c1.309.76%202.189%202.378%202.189%203.948%200%201.808-1.07%203.473-2.76%204.163zM7.802%2012.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545%201.95-4.472%204.591-4.472%201%200%201.927.333%202.712.928L8.23%205.067c-.285.166-.428.404-.428.737v6.898zM12%2015.128l-2.795-1.57v-3.33L12%208.658l2.795%201.57v3.33L12%2015.128zm1.796%207.23c-1%200-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974%201.142c.167.095.238.238.238.428v5.233c0%202.545-1.974%204.472-4.614%204.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482%204.482%200%20014.21%206.327v5.423c0%20.333.143.571.428.738l5.947%203.449-1.95%201.118a.432.432%200%2001-.476%200zm-.262%203.9c-2.688%200-4.662-2.021-4.662-4.519%200-.19.024-.38.047-.57l4.686%202.71c.286.167.571.167.856%200l5.97-3.448v2.26c0%20.19-.07.333-.237.428l-4.543%202.616c-.619.357-1.356.523-2.117.523zm5.899%202.83a5.947%205.947%200%20005.827-4.756C22.287%2018.339%2024%2015.84%2024%2013.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498%200-3.401-2.759-5.947-5.946-5.947-.642%200-1.26.095-1.88.31A5.962%205.962%200%200010.205%200a5.947%205.947%200%2000-5.827%204.757C1.713%205.447%200%207.945%200%2010.49c0%201.666.713%203.283%201.998%204.448-.119.5-.19%201-.19%201.499%200%203.401%202.759%205.946%205.946%205.946.642%200%201.26-.095%201.88-.309a5.96%205.96%200%20004.162%201.713z'%3e%3c/path%3e%3c/svg%3e",Eh="https://lf3-cdn-tos.draftstatic.com/obj/ies-hotsoon-draft/juejin/7b28b328-1ae4-4781-8d46-430fef1b872e.html";async function _L(){var t;const e=(t=window.tud)==null?void 0:t.openExternal;if(typeof e=="function"){await e(Eh);return}window.open(Eh,"_blank","noopener,noreferrer")}function GL({isOpen:e,onOpenChange:t,onConfirm:l}){const[r,i]=y.useState(!1);return y.useEffect(()=>{e&&i(!1)},[e]),E.jsx(Be.Backdrop,{isOpen:e,onOpenChange:t,variant:"blur",children:E.jsx(Be.Container,{size:"sm",children:E.jsxs(Be.Dialog,{children:[E.jsx(Be.CloseTrigger,{"aria-label":"关闭"}),E.jsx(Be.Header,{children:E.jsx(Be.Heading,{children:"用户协议"})}),E.jsxs(Be.Body,{className:"space-y-4 text-sm leading-6 text-muted",children:[E.jsx("p",{children:"关联掘金账号后,本机用量数据将在您开启云端同步时上传至掘金服务。请先阅读并同意相关协议。"}),E.jsx(ha,{id:"juejin-login-consent",isSelected:r,onChange:i,children:E.jsxs(ha.Content,{children:[E.jsx(ha.Control,{children:E.jsx(ha.Indicator,{})}),E.jsxs("span",{children:["我已阅读并同意",E.jsx("button",{className:"mx-0.5 text-accent underline underline-offset-2 hover:opacity-80",onClick:s=>{s.preventDefault(),s.stopPropagation(),_L()},type:"button",children:"《稀土掘金隐私政策》"}),",并同意上传数据"]})]})})]}),E.jsxs(Be.Footer,{className:"gap-2",children:[E.jsx(mn,{slot:"close",variant:"tertiary",children:"取消"}),E.jsx(mn,{isDisabled:!r,onPress:()=>{t(!1),l()},variant:"primary",children:"同意并登录"})]})]})})})}const qL="/assets/antigravity-color-DgAQAdn3.svg",YL="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eAmp%3c/title%3e%3cpath%20d='M15.087%2023.18L12.03%2024l-2.097-7.823-5.738%205.738-2.251-2.251%205.718-5.719-7.769-2.082.82-3.057%2011.294%203.08%203.08%2011.295z'%20fill='%23F34E3F'%3e%3c/path%3e%3cpath%20d='M19.505%2018.762l-3.057.82-2.564-9.573-9.572-2.564.819-3.057%2011.295%203.079%203.08%2011.295z'%20fill='%23F34E3F'%3e%3c/path%3e%3cpath%20d='M23.893%2014.374l-3.057.82-2.565-9.572L8.7%203.057%209.52%200l11.295%203.08%203.079%2011.294z'%20fill='%23F34E3F'%3e%3c/path%3e%3c/svg%3e",XL="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eClaude%20Code%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M20.998%2010.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6%2010.949h1.488V8.102H6v2.847zm10.51%200H18V8.102h-1.49v2.847z'%20fill='%23D97757'%20fill-rule='evenodd'%3e%3c/path%3e%3c/svg%3e",WL="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCline%3c/title%3e%3cpath%20d='M17.035%203.991c2.75%200%204.98%202.24%204.98%205.003v1.667l1.45%202.896a1.01%201.01%200%2001-.002.909l-1.448%202.864v1.668c0%202.762-2.23%205.002-4.98%205.002H7.074c-2.751%200-4.98-2.24-4.98-5.002V17.33l-1.48-2.855a1.01%201.01%200%2001-.003-.927l1.482-2.887V8.994c0-2.763%202.23-5.003%204.98-5.003h9.962zM8.265%209.6a2.274%202.274%200%2000-2.274%202.274v4.042a2.274%202.274%200%20004.547%200v-4.042A2.274%202.274%200%20008.265%209.6zm7.326%200a2.274%202.274%200%2000-2.274%202.274v4.042a2.274%202.274%200%20104.548%200v-4.042A2.274%202.274%200%200015.59%209.6z'%3e%3c/path%3e%3cpath%20d='M12.054%205.558a2.779%202.779%200%20100-5.558%202.779%202.779%200%20000%205.558z'%3e%3c/path%3e%3c/svg%3e",Iv="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodeBuddy%3c/title%3e%3cpath%20d='M18.821%200H5.18A5.179%205.179%200%20000%205.179V18.82A5.179%205.179%200%20005.179%2024H18.82A5.179%205.179%200%200024%2018.821V5.18A5.179%205.179%200%200018.821%200z'%20fill='url(%23lobe-icons-code-buddy-_R_0_)'%3e%3c/path%3e%3cpath%20d='M18.777%201.647c.28-.02.536.114.972.51%201.018.926%202.437%202.828%203.318%204.452l.34.631.482.24.11.06v3.638a5.206%205.206%200%2000-5.32-1.23c-.491.166-1.021.471-2.08%201.082l-6.09%203.516c-1.057.61-1.586.916-1.975%201.259a5.208%205.208%200%2000-1.493%205.572c.165.49.471%201.02%201.082%202.08l.315.543h-3.26c-.685%200-1.34-.135-1.939-.377-.169-.956-.009-1.789.469-2.335.158-.18.164-.189.13-.493a11.846%2011.846%200%2001-.057-1.711l.02-.444-.667-1.18C2.1%2015.622%201.445%2014.078%201.192%2012.9c-.133-.647-.125-.934.04-1.146.1-.128.427-.261.822-.334.994-.175%203.162-.017%205.575.41l.25.043.551-.487c.915-.81%201.522-1.264%202.641-1.962%201.167-.73%202.484-1.331%203.967-1.807l.476-.152.261-.688c.937-2.471%201.896-4.293%202.58-4.9.235-.21.25-.22.422-.23z'%20fill='%23fff'%3e%3c/path%3e%3cpath%20d='M12.139%2018.2a1.203%201.203%200%20011.642.44l1.296%202.243a1.204%201.204%200%2001-2.083%201.203l-1.296-2.243a1.203%201.203%200%2001.44-1.644zM18.629%2014.452a1.203%201.203%200%20011.642.44l1.295%202.244a1.203%201.203%200%2011-2.083%201.203l-1.295-2.243a1.203%201.203%200%2001.44-1.644z'%20fill='%23fff'%3e%3c/path%3e%3cdefs%3e%3cradialGradient%20cx='0'%20cy='0'%20gradientTransform='matrix(-9.00009%20-16%2016%20-9.00009%2021%2024.5)'%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-code-buddy-_R_0_'%20r='1'%3e%3cstop%20stop-color='%232EA99D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%236C4DFF'%3e%3c/stop%3e%3c/radialGradient%3e%3c/defs%3e%3c/svg%3e",Bv="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",ZL="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCopilot%3c/title%3e%3cpath%20d='M17.533%201.829A2.528%202.528%200%200015.11%200h-.737a2.531%202.531%200%2000-2.484%202.087l-1.263%206.937.314-1.08a2.528%202.528%200%20012.424-1.833h4.284l1.797.706%201.731-.706h-.505a2.528%202.528%200%2001-2.423-1.829l-.715-2.453z'%20fill='url(%23lobe-icons-copilot-0-_R_0_)'%20transform='translate(0%201)'%3e%3c/path%3e%3cpath%20d='M6.726%2020.16A2.528%202.528%200%20009.152%2022h1.566c1.37%200%202.49-1.1%202.525-2.48l.17-6.69-.357%201.228a2.528%202.528%200%2001-2.423%201.83h-4.32l-1.54-.842-1.667.843h.497c1.124%200%202.113.75%202.426%201.84l.697%202.432z'%20fill='url(%23lobe-icons-copilot-1-_R_0_)'%20transform='translate(0%201)'%3e%3c/path%3e%3cpath%20d='M15%200H6.252c-2.5%200-4%203.331-5%206.662-1.184%203.947-2.734%209.225%201.75%209.225H6.78c1.13%200%202.12-.753%202.43-1.847.657-2.317%201.809-6.359%202.713-9.436.46-1.563.842-2.906%201.43-3.742A1.97%201.97%200%200115%200'%20fill='url(%23lobe-icons-copilot-2-_R_0_)'%20transform='translate(0%201)'%3e%3c/path%3e%3cpath%20d='M15%200H6.252c-2.5%200-4%203.331-5%206.662-1.184%203.947-2.734%209.225%201.75%209.225H6.78c1.13%200%202.12-.753%202.43-1.847.657-2.317%201.809-6.359%202.713-9.436.46-1.563.842-2.906%201.43-3.742A1.97%201.97%200%200115%200'%20fill='url(%23lobe-icons-copilot-3-_R_0_)'%20transform='translate(0%201)'%3e%3c/path%3e%3cpath%20d='M9%2022h8.749c2.5%200%204-3.332%205-6.663%201.184-3.948%202.734-9.227-1.75-9.227H17.22c-1.129%200-2.12.754-2.43%201.848a1149.2%201149.2%200%2001-2.713%209.437c-.46%201.564-.842%202.907-1.43%203.743A1.97%201.97%200%20019%2022'%20fill='url(%23lobe-icons-copilot-4-_R_0_)'%20transform='translate(0%201)'%3e%3c/path%3e%3cpath%20d='M9%2022h8.749c2.5%200%204-3.332%205-6.663%201.184-3.948%202.734-9.227-1.75-9.227H17.22c-1.129%200-2.12.754-2.43%201.848a1149.2%201149.2%200%2001-2.713%209.437c-.46%201.564-.842%202.907-1.43%203.743A1.97%201.97%200%20019%2022'%20fill='url(%23lobe-icons-copilot-5-_R_0_)'%20transform='translate(0%201)'%3e%3c/path%3e%3cdefs%3e%3cradialGradient%20cx='85.44%25'%20cy='100.653%25'%20fx='85.44%25'%20fy='100.653%25'%20gradientTransform='scale(-.8553%20-1)%20rotate(50.927%202.041%20-1.946)'%20id='lobe-icons-copilot-0-_R_0_'%20r='105.116%25'%3e%3cstop%20offset='9.6%25'%20stop-color='%2300AEFF'%3e%3c/stop%3e%3cstop%20offset='77.3%25'%20stop-color='%232253CE'%3e%3c/stop%3e%3cstop%20offset='100%25'%20stop-color='%230736C4'%3e%3c/stop%3e%3c/radialGradient%3e%3cradialGradient%20cx='18.143%25'%20cy='32.928%25'%20fx='18.143%25'%20fy='32.928%25'%20gradientTransform='scale(.8897%201)%20rotate(52.069%20.193%20.352)'%20id='lobe-icons-copilot-1-_R_0_'%20r='95.612%25'%3e%3cstop%20offset='0%25'%20stop-color='%23FFB657'%3e%3c/stop%3e%3cstop%20offset='63.4%25'%20stop-color='%23FF5F3D'%3e%3c/stop%3e%3cstop%20offset='92.3%25'%20stop-color='%23C02B3C'%3e%3c/stop%3e%3c/radialGradient%3e%3cradialGradient%20cx='82.987%25'%20cy='-9.792%25'%20fx='82.987%25'%20fy='-9.792%25'%20gradientTransform='scale(-1%20-.9441)%20rotate(-70.872%20.142%201.17)'%20id='lobe-icons-copilot-4-_R_0_'%20r='140.622%25'%3e%3cstop%20offset='6.6%25'%20stop-color='%238C48FF'%3e%3c/stop%3e%3cstop%20offset='50%25'%20stop-color='%23F2598A'%3e%3c/stop%3e%3cstop%20offset='89.6%25'%20stop-color='%23FFB152'%3e%3c/stop%3e%3c/radialGradient%3e%3clinearGradient%20id='lobe-icons-copilot-2-_R_0_'%20x1='39.465%25'%20x2='46.884%25'%20y1='12.117%25'%20y2='103.774%25'%3e%3cstop%20offset='15.6%25'%20stop-color='%230D91E1'%3e%3c/stop%3e%3cstop%20offset='48.7%25'%20stop-color='%2352B471'%3e%3c/stop%3e%3cstop%20offset='65.2%25'%20stop-color='%2398BD42'%3e%3c/stop%3e%3cstop%20offset='93.7%25'%20stop-color='%23FFC800'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20id='lobe-icons-copilot-3-_R_0_'%20x1='45.949%25'%20x2='50%25'%20y1='0%25'%20y2='100%25'%3e%3cstop%20offset='0%25'%20stop-color='%233DCBFF'%3e%3c/stop%3e%3cstop%20offset='24.7%25'%20stop-color='%230588F7'%20stop-opacity='0'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20id='lobe-icons-copilot-5-_R_0_'%20x1='83.507%25'%20x2='83.453%25'%20y1='-6.106%25'%20y2='21.131%25'%3e%3cstop%20offset='5.8%25'%20stop-color='%23F8ADFA'%3e%3c/stop%3e%3cstop%20offset='70.8%25'%20stop-color='%23A86EDD'%20stop-opacity='0'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",QL="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCursor%3c/title%3e%3cpath%20d='M22.106%205.68L12.5.135a.998.998%200%2000-.998%200L1.893%205.68a.84.84%200%2000-.419.726v11.186c0%20.3.16.577.42.727l9.607%205.547a.999.999%200%2000.998%200l9.608-5.547a.84.84%200%2000.42-.727V6.407a.84.84%200%2000-.42-.726zm-.603%201.176L12.228%2022.92c-.063.108-.228.064-.228-.061V12.34a.59.59%200%2000-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264%200%20.428.286.296.514z'%3e%3c/path%3e%3c/svg%3e",JL="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eDevin%3c/title%3e%3cpath%20d='M2.033%209.867l2.554%201.483a.589.589%200%2000.592%200l2.554-1.483.01-.008a.608.608%200%2000.11-.084l.013-.015a.631.631%200%2000.076-.1c.003-.005.008-.01.01-.016a.558.558%200%2000.052-.125l.007-.028a.611.611%200%2000.019-.14V7.868c0-.572.307-1.105.8-1.392a1.595%201.595%200%20011.598%200l1.277.742a.54.54%200%2000.129.053l.028.01c.044.01.088.015.133.016h.006l.013-.002a.587.587%200%2000.27-.074l.011-.004%202.554-1.483a.596.596%200%2000.297-.516V2.253a.595.595%200%2000-.297-.516L12.293.257a.587.587%200%2000-.591%200L9.148%201.737l-.01.01a.609.609%200%2000-.109.083l-.014.015a.632.632%200%2000-.076.1c-.003.005-.008.01-.01.016a.57.57%200%2000-.052.124l-.007.028a.612.612%200%2000-.018.14v1.483c0%20.572-.307%201.105-.8%201.393a1.597%201.597%200%2001-1.599%200l-1.276-.742a.603.603%200%2000-.13-.053l-.028-.008a.658.658%200%2000-.133-.018h-.02a.57.57%200%2000-.269.074c-.003.002-.008.002-.012.005L2.033%205.872a.596.596%200%2000-.297.515v2.966c0%20.213.113.41.297.515z'%20fill='%233969CA'%3e%3c/path%3e%3cpath%20d='M15.943%2010.607a1.596%201.596%200%20011.599%200l1.276.74c.041.025.085.04.13.055l.028.008c.043.01.088.016.133.018h.005c.005%200%20.01-.002.014-.003a.474.474%200%2000.122-.016l.021-.005a.616.616%200%2000.126-.052c.004-.002.009-.002.013-.005l2.554-1.482a.597.597%200%2000.297-.516V6.383a.596.596%200%2000-.297-.515l-2.552-1.483a.587.587%200%2000-.592%200l-2.553%201.482-.011.008a.61.61%200%2000-.108.084l-.014.016a.637.637%200%2000-.076.1c-.003.005-.008.01-.01.016a.57.57%200%2000-.052.124l-.007.029a.612.612%200%2000-.018.14v1.482c0%20.572-.307%201.105-.8%201.393a1.597%201.597%200%2001-1.599%200l-1.276-.742a.584.584%200%2000-.13-.053l-.028-.008a.62.62%200%2000-.133-.018h-.02a.587.587%200%2000-.269.074l-.012.004L9.15%2010a.596.596%200%2000-.296.516v2.966c0%20.212.112.409.296.515l2.554%201.483s.008.002.012.005c.04.022.082.04.126.052l.02.004a.57.57%200%2000.123.017l.014.002h.006c.054%200%20.108-.01.16-.025a.587.587%200%2000.13-.054l1.277-.741a1.597%201.597%200%20012.398%201.392v1.482c0%20.049.007.095.019.14l.007.028a.619.619%200%2000.051.125c.004.006.008.01.01.016a.6.6%200%2000.076.1l.014.015c.033.032.069.06.108.084.004.002.006.006.011.008l2.554%201.483a.59.59%200%2000.593%200l2.554-1.483a.597.597%200%2000.296-.516v-2.965a.595.595%200%2000-.296-.516l-2.554-1.483s-.008-.002-.012-.005a.54.54%200%2000-.126-.051c-.007-.003-.013-.003-.02-.005a.635.635%200%2000-.125-.017h-.018a.557.557%200%2000-.16.026.588.588%200%2000-.13.053l-1.276.742a1.595%201.595%200%2001-1.598%200%201.615%201.615%200%20010-2.785l-.005-.001z'%20fill='%2321C19A'%3e%3c/path%3e%3cpath%20d='M14.848%2018.265l-2.554-1.482-.012-.005a.526.526%200%2000-.126-.052c-.007-.002-.014-.002-.02-.005a.64.64%200%2000-.124-.017h-.02a.56.56%200%2000-.16.026.588.588%200%2000-.13.053l-1.276.742a1.594%201.594%200%2001-1.598%200c-.493-.286-.8-.82-.8-1.393V14.65a.563.563%200%2000-.018-.14l-.008-.028a.604.604%200%2000-.051-.124l-.01-.017a.603.603%200%2000-.076-.1l-.014-.015a.596.596%200%2000-.109-.084c-.003-.002-.005-.006-.01-.008L5.178%2012.65a.587.587%200%2000-.591%200l-2.554%201.483a.596.596%200%2000-.297.516v2.965c0%20.213.113.41.297.516l2.554%201.483.012.004a.618.618%200%2000.267.074l.016.002h.007a.55.55%200%2000.16-.026.584.584%200%2000.129-.053l1.277-.742a1.597%201.597%200%20012.398%201.393v1.482c0%20.05.007.095.019.14l.007.028c.013.044.03.085.051.125l.01.016c.022.036.047.07.076.1l.014.015c.032.032.069.06.109.084l.01.008%202.554%201.483a.587.587%200%2000.593%200l2.554-1.483a.596.596%200%2000.296-.515v-2.966a.596.596%200%2000-.296-.516h-.002z'%20fill='%230294DE'%3e%3c/path%3e%3c/svg%3e",ek="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGemini%3c/title%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%20fill='%233186FF'%3e%3c/path%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%20fill='url(%23lobe-icons-gemini-0-_R_0_)'%3e%3c/path%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%20fill='url(%23lobe-icons-gemini-1-_R_0_)'%3e%3c/path%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%20fill='url(%23lobe-icons-gemini-2-_R_0_)'%3e%3c/path%3e%3cdefs%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-gemini-0-_R_0_'%20x1='7'%20x2='11'%20y1='15.5'%20y2='12'%3e%3cstop%20stop-color='%2308B962'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%2308B962'%20stop-opacity='0'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-gemini-1-_R_0_'%20x1='8'%20x2='11.5'%20y1='5.5'%20y2='11'%3e%3cstop%20stop-color='%23F94543'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23F94543'%20stop-opacity='0'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-gemini-2-_R_0_'%20x1='3.5'%20x2='17.5'%20y1='13.5'%20y2='12'%3e%3cstop%20stop-color='%23FABC12'%3e%3c/stop%3e%3cstop%20offset='.46'%20stop-color='%23FABC12'%20stop-opacity='0'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",tk="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGemini%20CLI%3c/title%3e%3cpath%20d='M0%204.391A4.391%204.391%200%20014.391%200h15.217A4.391%204.391%200%200124%204.391v15.217A4.391%204.391%200%200119.608%2024H4.391A4.391%204.391%200%20010%2019.608V4.391z'%20fill='url(%23lobe-icons-gemini-cli-_R_0_)'%3e%3c/path%3e%3cpath%20clip-rule='evenodd'%20d='M19.74%201.444a2.816%202.816%200%20012.816%202.816v15.48a2.816%202.816%200%2001-2.816%202.816H4.26a2.816%202.816%200%2001-2.816-2.816V4.26A2.816%202.816%200%20014.26%201.444h15.48zM7.236%208.564l7.752%203.728-7.752%203.727v2.802l9.557-4.596v-3.866L7.236%205.763v2.801z'%20fill='%231E1E2E'%20fill-rule='evenodd'%3e%3c/path%3e%3cdefs%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-gemini-cli-_R_0_'%20x1='24'%20x2='0'%20y1='6.587'%20y2='16.494'%3e%3cstop%20stop-color='%23EE4D5D'%3e%3c/stop%3e%3cstop%20offset='.328'%20stop-color='%23B381DD'%3e%3c/stop%3e%3cstop%20offset='.476'%20stop-color='%23207CFE'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",nk="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGoose%3c/title%3e%3cpath%20d='M21.595%2023.61c1.167-.254%202.405-.944%202.405-.944l-2.167-1.784a12.124%2012.124%200%2001-2.695-3.131%2012.127%2012.127%200%2000-3.97-4.049l-.794-.462a1.115%201.115%200%2001-.488-.815.844.844%200%2001.154-.575c.413-.582%202.548-3.115%202.94-3.44.503-.416%201.065-.762%201.586-1.159.074-.056.148-.112.221-.17.003-.002.007-.004.009-.007.167-.131.325-.272.45-.438.453-.524.563-.988.59-1.193-.061-.197-.244-.639-.753-1.148.319.02.705.272%201.056.569.235-.376.481-.773.727-1.171.165-.266-.08-.465-.086-.471h-.001V3.22c-.007-.007-.206-.25-.471-.086-.567.35-1.134.702-1.639%201.021%200%200-.597-.012-1.305.599a2.464%202.464%200%2000-.438.45l-.007.009c-.058.072-.114.147-.17.221-.397.521-.743%201.083-1.16%201.587-.323.391-2.857%202.526-3.44%202.94a.842.842%200%2001-.574.153%201.115%201.115%200%2001-.815-.488l-.462-.794a12.123%2012.123%200%2000-4.049-3.97%2012.133%2012.133%200%2001-3.13-2.695L1.332%200S.643%201.238.39%202.405c.352.428%201.27%201.49%202.34%202.302C1.58%204.167.73%203.75.06%203.4c-.103.765-.063%201.92.043%202.816.726.317%201.961.806%203.219%201.066-1.006.236-2.11.278-2.961.262.15.554.358%201.119.64%201.688.119.263.25.52.39.77.452.125%202.222.383%203.164.171l-2.51.897a27.776%2027.776%200%20002.544%202.726c2.031-1.092%202.494-1.241%204.018-2.238-2.467%202.008-3.108%202.828-3.8%203.67l-.483.678c-.25.351-.469.725-.65%201.117-.61%201.31-1.47%204.1-1.47%204.1-.154.486.202.842.674.674%200%200%202.79-.861%204.1-1.47.392-.182.766-.4%201.118-.65l.677-.483c.227-.187.453-.37.701-.586%200%200%201.705%202.02%203.458%203.349l.896-2.511c-.211.942.046%202.712.17%203.163.252.142.509.272.772.392.569.28%201.134.49%201.688.64-.016-.853.026-1.956.261-2.962.26%201.258.75%202.493%201.067%203.219.895.106%202.051.146%202.816.043a73.87%2073.87%200%2001-1.308-2.67c.811%201.07%201.874%201.988%202.302%202.34h-.001z'%3e%3c/path%3e%3c/svg%3e",lk="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGrok%3c/title%3e%3cpath%20d='M9.27%2015.29l7.978-5.897c.391-.29.95-.177%201.137.272.98%202.369.542%205.215-1.41%207.169-1.951%201.954-4.667%202.382-7.149%201.406l-2.711%201.257c3.889%202.661%208.611%202.003%2011.562-.953%202.341-2.344%203.066-5.539%202.388-8.42l.006.007c-.983-4.232.242-5.924%202.75-9.383.06-.082.12-.164.179-.248l-3.301%203.305v-.01L9.267%2015.292M7.623%2016.723c-2.792-2.67-2.31-6.801.071-9.184%201.761-1.763%204.647-2.483%207.166-1.425l2.705-1.25a7.808%207.808%200%2000-1.829-1A8.975%208.975%200%20005.984%205.83c-2.533%202.536-3.33%206.436-1.962%209.764%201.022%202.487-.653%204.246-2.34%206.022-.599.63-1.199%201.259-1.682%201.925l7.62-6.815'%3e%3c/path%3e%3c/svg%3e",ak="/assets/hermesagent-DUfTwIy7.svg",rk="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eKimi%3c/title%3e%3cpath%20d='M21.846%200a1.923%201.923%200%20110%203.846H20.15a.226.226%200%2001-.227-.226V1.923C19.923.861%2020.784%200%2021.846%200z'%20fill='%231783FF'%3e%3c/path%3e%3cpath%20d='M11.065%2011.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164%200%2000-.117.051l-7.82%207.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103%200-.186.103-.186.23V19.77c0%20.128.083.23.186.23h2.69c.103%200%20.186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158%200%2001.205-.023l6.484%204.772a7.677%207.677%200%20003.453%201.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028%205.028%200%2001-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z'%20fill='%23fff'%3e%3c/path%3e%3c/svg%3e",Hv="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eKilo%20Code%3c/title%3e%3cpath%20d='M0%200v24h24V0H0zm22.222%2022.222H1.778V1.778h20.444v20.444zm-7.555-4.964h2.222v1.778h-2.794L12.89%2017.83v-2.794h1.778v2.222zm4%200h-1.778v-2.222h-2.222v-1.778h2.793l1.207%201.207v2.793zm-7.556-2.591H9.333v-1.778h1.778v1.778zm-5.778-1.778h1.778v4h4v1.778H6.54L5.333%2017.46V12.89zm13.334-3.556v1.778h-5.778V9.333h1.987V7.111h-1.987V5.333h2.558l1.206%201.207v2.793h2.014zm-11.556-2h2.222l1.778%201.778v2H9.333v-2H7.111v2H5.333V5.333h1.778v2zm4%200H9.333v-2h1.778v2z'%3e%3c/path%3e%3c/svg%3e",ik="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eKiro%3c/title%3e%3cpath%20d='M18.8%200H5.2A5.2%205.2%200%20000%205.2v13.6A5.2%205.2%200%20005.2%2024h13.6a5.2%205.2%200%20005.2-5.2V5.2A5.2%205.2%200%200018.8%200z'%20fill='%239046FF'%3e%3c/path%3e%3cpath%20d='M7.97%2016.376c-1.644%203.642%201.86%204.556%204.443%202.424.76%202.39%203.608.607%204.631-1.247%202.251-4.084%201.342-8.249%201.108-9.108-1.6-5.859-9.6-5.869-10.976.03-.323%201.033-.328%202.206-.507%203.423-.09.617-.16%201.009-.393%201.655-.139.373-.323.7-.62%201.257-.458.865-.264%202.53%202.101%201.665l.224-.1h-.01l-.001.001z'%20fill='%23fff'%3e%3c/path%3e%3cpath%20d='M12.722%2010.985c-.656%200-.755-.785-.755-1.252%200-.423.074-.756.218-.97a.61.61%200%2001.537-.283c.229%200%20.428.095.567.289.159.218.243.55.243.964%200%20.785-.303%201.252-.805%201.252h-.005zm2.703%200c-.656%200-.755-.785-.755-1.252%200-.423.074-.756.219-.97a.61.61%200%2001.536-.283c.229%200%20.428.095.567.289.159.218.243.55.243.964%200%20.785-.303%201.252-.805%201.252h-.005z'%20fill='%23000'%3e%3c/path%3e%3c/svg%3e",ok="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenClaw%3c/title%3e%3cpath%20d='M12%202.568c-6.33%200-9.495%205.275-9.495%209.495%200%204.22%203.165%208.44%206.33%209.494v2.11h2.11v-2.11s1.055.422%202.11%200v2.11h2.11v-2.11c3.165-1.055%206.33-5.274%206.33-9.494S18.33%202.568%2012%202.568z'%20fill='url(%23lobe-icons-open-claw-0-_R_0_)'%3e%3c/path%3e%3cpath%20d='M3.56%209.953C.396%208.898-.66%2011.008.396%2013.118c1.055%202.11%203.164%201.055%204.22-1.055.632-1.477%200-2.11-1.056-2.11z'%20fill='url(%23lobe-icons-open-claw-1-_R_0_)'%3e%3c/path%3e%3cpath%20d='M20.44%209.953c3.164-1.055%204.22%201.055%203.164%203.165-1.055%202.11-3.164%201.055-4.22-1.055-.632-1.477%200-2.11%201.056-2.11z'%20fill='url(%23lobe-icons-open-claw-2-_R_0_)'%3e%3c/path%3e%3cpath%20d='M5.507%201.875c.476-.285%201.036-.233%201.615.037.577.27%201.223.774%201.937%201.488a.316.316%200%2001-.447.447c-.693-.693-1.279-1.138-1.757-1.361-.475-.222-.795-.205-1.022-.069a.317.317%200%2001-.326-.542zM16.877%201.913c.58-.27%201.14-.323%201.616-.038a.317.317%200%2001-.326.542c-.227-.136-.547-.153-1.022.069-.478.223-1.064.668-1.756%201.361a.316.316%200%2011-.448-.447c.714-.714%201.36-1.218%201.936-1.487z'%20fill='%23FF4D4D'%3e%3c/path%3e%3cpath%20d='M8.835%209.109a1.266%201.266%200%20100-2.532%201.266%201.266%200%20000%202.532zM15.165%209.109a1.266%201.266%200%20100-2.532%201.266%201.266%200%20000%202.532z'%20fill='%23050810'%3e%3c/path%3e%3cpath%20d='M9.046%208.16a.527.527%200%20100-1.056.527.527%200%20000%201.055zM15.376%208.16a.527.527%200%20100-1.055.527.527%200%20000%201.054z'%20fill='%2300E5CC'%3e%3c/path%3e%3cdefs%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-open-claw-0-_R_0_'%20x1='-.659'%20x2='27.023'%20y1='.458'%20y2='22.855'%3e%3cstop%20stop-color='%23FF4D4D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23991B1B'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-open-claw-1-_R_0_'%20x1='0'%20x2='4.311'%20y1='9.672'%20y2='14.949'%3e%3cstop%20stop-color='%23FF4D4D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23991B1B'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-open-claw-2-_R_0_'%20x1='19.385'%20x2='24.399'%20y1='9.953'%20y2='14.462'%3e%3cstop%20stop-color='%23FF4D4D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23991B1B'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",sk="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eopencode%3c/title%3e%3cpath%20d='M16%206H8v12h8V6zm4%2016H4V2h16v20z'%3e%3c/path%3e%3c/svg%3e",ck="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3ePi%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M1%201h16.5v11H12v5.5H6.5V23H1V1zm5.5%205.5V12H12V6.5H6.5z'%3e%3c/path%3e%3cpath%20d='M17.5%2012H23v11h-5.5V12z'%3e%3c/path%3e%3c/svg%3e",uk="/assets/qoder-color-CCjsVbDP.svg",Kv="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eQwen%3c/title%3e%3cpath%20d='M12.604%201.34c.393.69.784%201.382%201.174%202.075a.18.18%200%2000.157.091h5.552c.174%200%20.322.11.446.327l1.454%202.57c.19.337.24.478.024.837-.26.43-.513.864-.76%201.3l-.367.658c-.106.196-.223.28-.04.512l2.652%204.637c.172.301.111.494-.043.77-.437.785-.882%201.564-1.335%202.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099%200%2000-.081.05%20575.097%20575.097%200%2001-2.705%204.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537%200%2001-.465-.271l-1.335-2.323a.09.09%200%2000-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543%200%2001-.002-.54l1.207-2.12a.198.198%200%20000-.197%20550.951%20550.951%200%2001-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625%201.387-2.436.132-.234.304-.334.584-.335a338.3%20338.3%200%20012.589-.001.124.124%200%2000.107-.063l2.806-4.895a.488.488%200%2001.422-.246c.524-.001%201.053%200%201.583-.006L11.704%201c.341-.003.724.032.9.34zm-3.432.403a.06.06%200%2000-.052.03L6.254%206.788a.157.157%200%2001-.135.078H3.253c-.056%200-.07.025-.041.074l5.81%2010.156c.025.042.013.062-.034.063l-2.795.015a.218.218%200%2000-.2.116l-1.32%202.31c-.044.078-.021.118.068.118l5.716.008c.046%200%20.08.02.104.061l1.403%202.454c.046.081.092.082.139%200l5.006-8.76.783-1.382a.055.055%200%2001.096%200l1.424%202.53a.122.122%200%2000.107.062l2.763-.02a.04.04%200%2000.035-.02.041.041%200%20000-.04l-2.9-5.086a.108.108%200%20010-.113l.293-.507%201.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059%200-.073-.026-.043-.077l1.434-2.505a.107.107%200%20000-.114L9.225%201.774a.06.06%200%2000-.053-.031zm6.29%208.02c.046%200%20.058.02.034.06l-.832%201.465-2.613%204.585a.056.056%200%2001-.05.029.058.058%200%2001-.05-.029L8.498%209.841c-.02-.034-.01-.052.028-.054l.216-.012%206.722-.012z'%20fill='url(%23lobe-icons-qwen-_R_0_)'%20fill-rule='nonzero'%3e%3c/path%3e%3cdefs%3e%3clinearGradient%20id='lobe-icons-qwen-_R_0_'%20x1='0%25'%20x2='100%25'%20y1='0%25'%20y2='0%25'%3e%3cstop%20offset='0%25'%20stop-color='%236336E7'%20stop-opacity='.84'%3e%3c/stop%3e%3cstop%20offset='100%25'%20stop-color='%236F69F7'%20stop-opacity='.84'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",fk="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eRooCode%3c/title%3e%3cpath%20d='M20.113%205.5l-.442%201.557a.157.157%200%2001-.196.106l-7.414-2.157a.16.16%200%2000-.143.028l-7.342%205.74a.159.159%200%2001-.074.032l-4.37.656a.154.154%200%2000-.132.162l.02.245c.005.078.071.14.152.141l5.074.128.058.002%203.75-1.953a.16.16%200%2001.164.01l2.657%201.847a.152.152%200%2001.066.125l-.023%202.45c0%20.032.01.063.028.089l3.737%205.227c.03.04.077.065.129.065h1.182a.153.153%200%2000.14-.224l-2.664-4.919a.15.15%200%2001.005-.152l1.389-2.169a.156.156%200%2001.062-.055l4.965-2.456a.16.16%200%2001.158.01l1.418.921a.16.16%200%2000.087.026h1.289c.125%200%20.2-.136.13-.237l-3.578-5.29c-.074-.109-.246-.082-.282.044z'%3e%3c/path%3e%3c/svg%3e",dk="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eTRAE%3c/title%3e%3cpath%20d='M24%2020.541H3.428v-3.426H0V3.4h24V20.54zM3.428%2017.115h17.144V6.827H3.428v10.288zm8.573-5.196l-2.425%202.424-2.424-2.424%202.424-2.424%202.425%202.424zm6.857-.001l-2.424%202.423-2.425-2.423%202.425-2.425%202.424%202.425z'%20fill='%2332F08C'%3e%3c/path%3e%3c/svg%3e",hk="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eWindsurf%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M23.78%205.004h-.228a2.187%202.187%200%2000-2.18%202.196v4.912c0%20.98-.804%201.775-1.76%201.775a1.818%201.818%200%2001-1.472-.773L13.168%205.95a2.197%202.197%200%2000-1.81-.95c-1.134%200-2.154.972-2.154%202.173v4.94c0%20.98-.797%201.775-1.76%201.775-.57%200-1.136-.289-1.472-.773L.408%205.098C.282%204.918%200%205.007%200%205.228v4.284c0%20.216.066.426.188.604l5.475%207.889c.324.466.8.812%201.351.938%201.377.316%202.645-.754%202.645-2.117V11.89c0-.98.787-1.775%201.76-1.775h.002c.586%200%201.135.288%201.472.773l4.972%207.163a2.15%202.15%200%20001.81.95c1.158%200%202.151-.973%202.151-2.173v-4.939c0-.98.787-1.775%201.76-1.775h.194c.122%200%20.22-.1.22-.222V5.225a.221.221%200%2000-.22-.222z'%3e%3c/path%3e%3c/svg%3e",mk="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eXiaomiMiMo%3c/title%3e%3cpath%20d='M.958%2015.936a.459.459%200%2001.459.44v2.729a.46.46%200%2001-.918%200v-2.729a.459.459%200%2001.459-.44zm4.814-2.035a.46.46%200%2001.553.45v4.754a.458.458%200%2011-.918%200V15.48L3.74%2017.202a.462.462%200%2001-.655.016.462.462%200%2001-.065-.082L.628%2014.67a.459.459%200%2001.658-.637l2.124%202.187%202.127-2.188a.46.46%200%2001.235-.13zm2.068.004a.46.46%200%2001.458.445v4.755a.46.46%200%2001-.458.458.459.459%200%2001-.458-.458V14.35a.459.459%200%2001.458-.445zm1.973%202.014a.46.46%200%2001.46.457v2.729a.46.46%200%2001-.784.324.46.46%200%2001-.134-.324v-2.729a.46.46%200%2001.458-.458zm.002-2.045a.458.458%200%2001.328.157l2.127%202.19%202.125-2.19a.459.459%200%2001.784.318v4.756a.46.46%200%2001-.455.458.46.46%200%2001-.458-.458V15.48l-1.667%201.723a.46.46%200%2001-.65.008l-.005-.005c0-.002-.002-.002-.004-.003l-2.455-2.534a.46.46%200%2001-.008-.667.461.461%200%2001.338-.128zm6.797%201.206a.46.46%200%2001.53.651A1.966%201.966%200%200019.81%2018.4a.462.462%200%2001.623.18.46.46%200%2001-.181.624%202.863%202.863%200%2001-1.38.353l-.142-.004a2.88%202.88%200%2001-2.393-4.263.461.461%200%2001.274-.21zm.864-.931a2.884%202.884%200%20013.915%203.914.46.46%200%2001-.402.24l-.057-.004a.458.458%200%2001-.164-.055.46.46%200%2001-.182-.622%201.967%201.967%200%2000-2.669-2.67.459.459%200%2011-.441-.803zM9.59%206.368c1.481%200%201.696%201.202%201.696%201.654v2.648h-.917v-.432c-.26.346-.792.535-1.36.535-.133%200-1.289-.03-1.384-1.136-.082-.932.675-1.61%202.053-1.61h.691c0-.563-.367-.886-.983-.886-.44.013-.864.174-1.2.458l-.36-.664c.484-.379%201.012-.567%201.764-.567zm4.427.1c1.263%200%202.082.97%202.083%202.15%200%201.181-.824%202.154-2.083%202.154-1.26%200-2.084-.972-2.084-2.152%200-1.18.82-2.153%202.084-2.153zm6.801.015c.68%200%201.202.465%201.197%201.548v2.642H21.1V8.29c0-.312-.002-.98-.63-.98s-.628.667-.628.838v2.524h-.89V8.148c0-.17-.001-.838-.63-.838-.628%200-.628.668-.628.98v2.383h-.917v-4.03h.917V7a1.22%201.22%200%2001.947-.516c.398%200%20.76.193.982.686a1.321%201.321%200%20011.195-.686zm-18.093.872l1.457-1.772H5.32L3.311%208.07l2.14%202.602H4.24L2.725%208.796%201.21%2010.672H0L2.138%208.07.13%205.583h1.138l1.458%201.772zm4.149%203.317h-.916V6.644h.916v4.028zm16.99%200h-.916V6.644h.916v4.028zM9.925%208.71c-1.055%200-1.359.412-1.326.742.032.329.324.537.757.537a1.013%201.013%200%20001.014-.968l.002-.31h-.447zM14.018%207.3c-.663%200-1.184.487-1.184%201.32%200%20.832.52%201.32%201.184%201.32.662%200%201.182-.49%201.182-1.32%200-.832-.52-1.32-1.182-1.32zM6.417%205.001a.568.568%200%2001.587.582.588.588%200%2001-1.175%200A.57.57%200%20016.417%205zm16.991%200a.57.57%200%2001.592.582.588.588%200%2001-1.174%200%20.57.57%200%2001.357-.542.572.572%200%2001.225-.04z'%3e%3c/path%3e%3c/svg%3e",pk="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eZ.ai%3c/title%3e%3cpath%20d='M12.105%202L9.927%204.953H.653L2.83%202h9.276zM23.254%2019.048L21.078%2022h-9.242l2.174-2.952h9.244zM24%202L9.264%2022H0L14.736%202H24z'%3e%3c/path%3e%3c/svg%3e",gk={amp:{src:YL},antigravity:{src:qL},"claude-code":{src:XL},cline:{monochrome:!0,src:WL},codebuddy:{src:Iv},codex:{monochrome:!0,src:Bv},"every-code":{monochrome:!0,src:Bv},copilot:{src:ZL},cursor:{monochrome:!0,src:QL},devin:{src:JL},gemini:{src:ek},"gemini-cli":{src:tk},grok:{monochrome:!0,src:lk},goose:{monochrome:!0,src:nk},hermes:{monochrome:!0,src:ak},kimi:{src:rk},"kilo-cli":{monochrome:!0,src:Hv},kilocode:{monochrome:!0,src:Hv},kiro:{src:ik},mimo:{monochrome:!0,src:mk},openclaw:{src:ok},opencode:{monochrome:!0,src:sk},pi:{monochrome:!0,src:ck},qoder:{src:uk},qwen:{src:Kv},"qwen-code":{src:Kv},roocode:{monochrome:!0,src:fk},trae:{src:dk},windsurf:{monochrome:!0,src:hk},workbuddy:{src:Iv},zcode:{monochrome:!0,src:pk}},bk={"code-buddy":"codebuddy",everycode:"every-code","github-copilot":"copilot","grok-build":"grok","kilo-code":"kilocode",kilo:"kilo-cli",mimocode:"mimo","oh-my-pi":"omp","open-claw":"openclaw","open-code":"opencode","openai-codex":"codex","roo-code":"roocode",zai:"zcode","hermes-agent":"hermes","kimi-code":"kimi","kimi-legacy":"kimi","pi-coding-agent":"pi",factory:"droid"};function vk(e){const t=e.trim().toLowerCase().replace(/[\s_]+/g,"-");return t==="claude-code"||t.startsWith("claude")?"claude-code":t==="codex"||t.startsWith("codex-")?"codex":t==="cursor"||t.startsWith("cursor-")?"cursor":t==="gemini"||t==="gemini-cli"||t.startsWith("gemini-")?"gemini-cli":t==="copilot"||t==="copilot-cli"||t.startsWith("copilot-")?"copilot":t==="opencode"||t.startsWith("opencode-")?"opencode":t.startsWith("antigravity")?"antigravity":t.startsWith("openclaw")?"openclaw":t.startsWith("hermes")?"hermes":t.startsWith("kimi")?"kimi":t.startsWith("kiro")?"kiro":t==="roo-code"||t.startsWith("roocode")||t.startsWith("roo-")?"roocode":t.startsWith("zcode")||t==="zai"?"zcode":t==="pi-coding-agent"||t.startsWith("pi-")||t==="pi"?"pi":t.startsWith("droid")||t.startsWith("factory")?"droid":t.startsWith("qoder")?"qoder":t.startsWith("trae")?"trae":t.startsWith("amp")?"amp":t.startsWith("qwen")?"qwen-code":t.startsWith("codebuddy")||t==="code-buddy"?"codebuddy":t.startsWith("workbuddy")?"workbuddy":t.startsWith("grok")?"grok":t.startsWith("goose")?"goose":t.startsWith("mimo")||t==="mimocode"||t.startsWith("xiaomi")?"mimo":t==="everycode"||t.startsWith("every-code")?"every-code":t.startsWith("omp")||t==="oh-my-pi"?"omp":t.startsWith("kilo-cli")||t==="kilo"?"kilo-cli":t.startsWith("kilocode")||t==="kilo-code"?"kilocode":t.startsWith("zed")?"zed":t.startsWith("warp")?"warp":bk[t]??t}function Uv({provider:e,size:t=16,className:l="",onLightBackground:r=!1,isSelected:i=!1,color:s}){const u=vk(e),f=gk[u];return f?E.jsx("img",{alt:"","aria-hidden":!0,className:`shrink-0 object-contain ${f.monochrome?i?"invert":r?"":"dark:invert":""} ${l}`,height:t,src:f.src,style:{height:t,width:t},width:t}):u==="droid"?E.jsx(wk,{className:l,size:t,style:{color:s}}):u==="omp"?E.jsx(yk,{className:l,size:t,style:{color:s}}):u==="zed"?E.jsx(xk,{className:l,size:t,style:{color:s}}):u==="warp"?E.jsx(Sk,{className:l,size:t,style:{color:s}}):E.jsx(Ek,{className:l,size:t,style:{color:s}})}function yk({className:e,size:t,style:l}){return E.jsxs("svg",{"aria-hidden":!0,className:`shrink-0 ${e}`,fill:"currentColor",height:t,style:l,viewBox:"0 0 120 90",width:t,children:[E.jsx("rect",{height:"12",rx:"2",width:"100",x:"10",y:"8"}),E.jsx("rect",{height:"62",rx:"2",width:"12",x:"25",y:"20"}),E.jsx("rect",{height:"45",rx:"2",width:"12",x:"75",y:"20"}),E.jsx("rect",{height:"16",rx:"3",width:"20",x:"71",y:"55"}),E.jsx("rect",{height:"8",rx:"1",width:"3",x:"76",y:"71"}),E.jsx("rect",{height:"8",rx:"1",width:"3",x:"82",y:"71"})]})}function xk({className:e,size:t,style:l}){return E.jsx("svg",{"aria-hidden":!0,className:`shrink-0 ${e}`,fill:"currentColor",height:t,style:l,viewBox:"0 0 16 16",width:t,children:E.jsx("path",{clipRule:"evenodd",d:"M3.125 2.75C2.9179 2.75 2.75 2.9179 2.75 3.125V11.375H2V3.125C2 2.50368 2.50368 2 3.125 2H13.1723C13.6735 2 13.9244 2.6059 13.5701 2.96025L7.38189 9.14843H9.125V8.375H9.875V9.33593C9.875 9.6466 9.6232 9.8984 9.3125 9.8984H6.63189L5.34282 11.1875H11.1875V6.5H11.9375V11.1875C11.9375 11.6017 11.6017 11.9375 11.1875 11.9375H4.59282L3.28032 13.25H12.875C13.0821 13.25 13.25 13.0821 13.25 12.875V4.625H14V12.875C14 13.4963 13.4963 14 12.875 14H2.82767C2.32653 14 2.07557 13.3941 2.42992 13.0397L8.59468 6.875H6.875V7.625H6.125V6.6875C6.125 6.37684 6.37684 6.125 6.6875 6.125H9.34468L10.6571 4.8125H4.8125V9.5H4.0625V4.8125C4.0625 4.39829 4.39829 4.0625 4.8125 4.0625H11.4071L12.7197 2.75H3.125Z",fillRule:"evenodd"})})}function Sk({className:e,size:t,style:l}){return E.jsx("svg",{"aria-hidden":!0,className:`shrink-0 ${e}`,fill:"currentColor",height:t,style:l,viewBox:"0 0 24 24",width:t,children:E.jsx("path",{d:"M4.2 5.5h3.1l2.05 8.2 2.15-8.2h2.9l2.15 8.2 2.05-8.2h3.1L17.3 18.5h-3.05L12 10.2l-2.25 8.3H6.7L4.2 5.5Z"})})}function wk({className:e,size:t,style:l}){return E.jsxs("svg",{"aria-hidden":!0,className:`shrink-0 ${e}`,fill:"none",height:t,style:l,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",width:t,children:[E.jsx("path",{d:"M9 3v2"}),E.jsx("path",{d:"M15 3v2"}),E.jsx("rect",{height:"13",rx:"3",width:"16",x:"4",y:"6"}),E.jsx("circle",{cx:"9",cy:"13",fill:"currentColor",r:"1.4",stroke:"none"}),E.jsx("circle",{cx:"15",cy:"13",fill:"currentColor",r:"1.4",stroke:"none"}),E.jsx("path",{d:"M9 16h6"})]})}function Ek({className:e,size:t,style:l}){return E.jsx("svg",{"aria-hidden":!0,className:`shrink-0 ${e}`,fill:"none",height:t,style:l,viewBox:"0 0 24 24",width:t,children:E.jsx("circle",{cx:"12",cy:"12",r:"7.5",stroke:"currentColor",strokeDasharray:"3 3",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})}const Ck="Juejin Usage",Tk=[{name:"Claude",source:"claude",variants:["CLI","Desktop"]},{name:"Codex",source:"codex"},{name:"Cursor",source:"cursor"},{name:"Qoder",source:"qoder",variants:["CLI","IDE","IDE CN","Work"]},{name:"Gemini",source:"gemini",variants:["CLI"]},{name:"OpenCode",source:"opencode"},{name:"Copilot",source:"copilot",variants:["CLI"]},{name:"Antigravity",source:"antigravity",variants:["App","IDE","CLI"]},{name:"OpenClaw",source:"openclaw"},{name:"Hermes",source:"hermes"},{name:"ZCode",source:"zcode"},{name:"pi",source:"pi"},{name:"Kimi",source:"kimi",variants:["Code","Legacy"]},{name:"Roo Code",source:"roocode"},{name:"Droid",source:"droid"},{name:"Kiro",source:"kiro",variants:["CLI"]},{name:"Cline",source:"cline"},{name:"Amp",source:"amp"},{name:"Qwen Code",source:"qwen"},{name:"CodeBuddy",source:"codebuddy"},{name:"WorkBuddy",source:"workbuddy"},{name:"Grok Build",source:"grok"},{name:"Mimo",source:"mimo"},{name:"Every Code",source:"every-code"},{name:"OMP",source:"omp"},{name:"Kilo CLI",source:"kilo-cli"},{name:"Kilo Code",source:"kilocode"},{name:"Goose",source:"goose"},{name:"Zed",source:"zed"},{name:"Warp",source:"warp"}];function Rk(e){var t;return(t=e.variants)!=null&&t.length?`${e.name} (${e.variants.join("、")})`:e.name}function Mk(){return"0.1.3"}const Ak="http://github.com/juejin-cn/juejin-usage/issues/new",Lk={cline:"bg-red-500",cursor:"bg-black",droid:"bg-blue-500","every-code":"bg-emerald-600",goose:"bg-amber-500",grok:"bg-violet-600",hermes:"bg-amber-500",kimi:"bg-black","kilo-cli":"bg-violet-500",kilocode:"bg-violet-500",mimo:"bg-rose-400",omp:"bg-violet-500",opencode:"bg-blue-600",pi:"bg-orange-500",roocode:"bg-green-500",zcode:"bg-indigo-500",zed:"bg-orange-500"};function Lx(){const e=Mk();return E.jsxs("div",{className:"space-y-5",children:[E.jsxs("section",{className:"space-y-1.5",children:[E.jsx("h3",{className:"text-sm font-medium text-foreground",children:"版本信息"}),E.jsxs("p",{className:"text-sm text-foreground/70",children:[Ck," ",E.jsxs("span",{className:"font-mono text-foreground/90",children:["v",e]})]})]}),E.jsxs("section",{className:"space-y-1.5",children:[E.jsx("h3",{className:"text-sm font-medium text-foreground",children:"隐私与协议"}),E.jsxs(Nc,{className:"w-fit text-sm text-accent",href:Eh,rel:"noopener noreferrer",target:"_blank",children:["查看用户隐私协议",E.jsx(Nc.Icon,{})]})]}),E.jsxs("section",{className:"space-y-1.5",children:[E.jsx("h3",{className:"text-sm font-medium text-foreground",children:"问题反馈"}),E.jsxs(Nc,{className:"w-fit text-sm text-accent",href:Ak,rel:"noopener noreferrer",target:"_blank",children:["提交问题反馈",E.jsx(Nc.Icon,{})]})]}),E.jsxs("section",{className:"space-y-2",children:[E.jsx("h3",{className:"text-sm font-medium text-foreground",children:"支持的工具"}),E.jsx("p",{className:"text-xs text-foreground/55",children:"同一系列的多端形态用括号标出。"}),E.jsx("ul",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-2",children:Tk.map(t=>E.jsxs("li",{className:"flex items-center gap-2 rounded-lg bg-black/3 px-2.5 py-1.5 text-sm text-foreground/80 dark:bg-white/5",children:[E.jsx(kk,{source:t.source}),E.jsx("span",{className:"min-w-0 leading-snug",children:Rk(t)})]},t.source))})]})]})}function kk({source:e}){if(e==="codex")return E.jsx("span",{className:"flex size-6 shrink-0 items-center justify-center rounded-md bg-emerald-600",children:E.jsx("img",{alt:"","aria-hidden":!0,className:"size-[15px] invert",src:VL})});const t=Lk[e];return t?E.jsx("span",{className:`flex size-6 shrink-0 items-center justify-center rounded-md ${t}`,children:E.jsx(Uv,{color:"#fff",isSelected:!0,provider:e,size:15})}):E.jsx(Uv,{provider:e,size:18})}const Nk="tud:data-synced",Ch="tud:open-settings",Fv="tud:open-about",Th="tud:open-share",Dk="tud:juejin-link-changed";function Lz(){window.dispatchEvent(new CustomEvent(Nk))}function kz(e){window.dispatchEvent(new CustomEvent(Ch,{detail:{}}))}function $k(){window.dispatchEvent(new CustomEvent(Th))}function kx(){window.dispatchEvent(new CustomEvent(Dk))}function Nz(){return $k(),Promise.resolve()}function zk({trigger:e,isOpen:t,onOpenChange:l,listenForOpenEvent:r=!0,hideTrigger:i=!1}={}){const[s,u]=y.useState(!1),f=t!==void 0,d=f?t:s,h=y.useCallback(p=>{f||u(p),l==null||l(p)},[f,l]);return y.useEffect(()=>{if(!r)return;const p=()=>h(!0);return window.addEventListener(Fv,p),()=>window.removeEventListener(Fv,p)},[r,h]),E.jsxs(E.Fragment,{children:[!i&&(e??E.jsxs(mn,{"aria-label":"关于",onPress:()=>h(!0),variant:"tertiary",children:[E.jsx(UL,{}),"关于"]})),E.jsx(Be.Backdrop,{isOpen:d,onOpenChange:h,variant:"blur",children:E.jsx(Be.Container,{className:"w-[840px] max-w-[min(840px,92vw)]",scroll:"outside",size:"lg",children:E.jsxs(Be.Dialog,{children:[E.jsx(Be.CloseTrigger,{"aria-label":"关闭关于"}),E.jsx(Be.Header,{children:E.jsx(Be.Heading,{children:"关于"})}),E.jsx(Be.Body,{className:"pt-2",children:E.jsx(Lx,{})})]})})})]})}const Pk=50;async function Pn(e,t){const l=await fetch(e,t);let r=null;try{r=await l.json()}catch{throw new Error(`${(t==null?void 0:t.method)??"GET"} ${e} → ${l.status}`)}if(!l.ok||!r||r.success!==!0||r.data===null){const i=(r==null?void 0:r.message)??`HTTP ${l.status}`;throw new Error(i)}return r.data}const Vv="tud.apiBearer";function Ok(){return!0}function jk(){return"/functions/tud-"}function On(){const e=jk();return{summary:`${e}account-usage-summary`,others:e}}function _v(e){try{e!=null&&e.trim()?localStorage.setItem(Vv,e.trim()):localStorage.removeItem(Vv)}catch{}}function xn(){return{}}async function Nx(){const{summary:e}=On();return Pn(e,{headers:xn()})}async function Ik(e=90){const{others:t}=On();return Pn(`${t}usage-daily?days=${e}`,{headers:xn()})}async function Dx(e=1){const{others:t}=On();return Pn(`${t}usage-hourly?days=${e}`,{headers:xn()})}async function $x(e=30){const{others:t}=On();return Pn(`${t}usage-model-breakdown?days=${e}`,{headers:xn()})}const Gv="https://api.juejin.cn/aiusage_api/functions/tud-pricing";async function Dz(){const e=await fetch(Gv,{headers:xn()});let t=null;try{t=await e.json()}catch{throw new Error(`GET ${Gv} → ${e.status}`)}if(!e.ok)throw new Error(`HTTP ${e.status}`);const l=Bk(t);return Hk(l,e.headers.get("last-modified"))}function Bk(e){if(e===null||typeof e!="object"||Array.isArray(e))throw new Error("模型价格数据格式错误:响应必须是对象");const t=e.exact;if(t===null||typeof t!="object"||Array.isArray(t))throw new Error("模型价格数据格式错误:exact 必须是对象");for(const[l,r]of Object.entries(t)){if(r===null||typeof r!="object"||Array.isArray(r))throw new Error(`模型价格数据格式错误:exact.${l} 必须是对象`);for(const i of["input","output","cache_read","cache_write"]){const s=r[i];if(s!==void 0&&(typeof s!="number"||!Number.isFinite(s)||s<0))throw new Error(`模型价格数据格式错误:exact.${l}.${i} 必须是非负数字`)}}return e}function Hk(e,t){return{units:"usd_per_million_tokens",generatedAt:null,updatedAt:t,models:Object.entries(e.exact).map(([l,r])=>({model:l,input:r.input??0,output:r.output??0,cacheRead:r.cache_read??0,cacheWrite:r.cache_write??0})).sort((l,r)=>l.model.localeCompare(r.model))}}async function $z(e,t=Pk,l={}){const{others:r}=On(),i=new URLSearchParams({range:e,limit:String(t)});return l.tool&&i.set("tool",l.tool),l.model&&i.set("model",l.model),Pn(`${r}leaderboard-overview?${i.toString()}`,{headers:xn()})}async function zz(){const{others:e}=On();return Pn(`${e}leaderboard-preference`,{headers:xn()})}async function Pz(e){const{others:t}=On();return Pn(`${t}leaderboard-preference`,{method:"PUT",headers:{"Content-Type":"application/json",...xn()},body:JSON.stringify({hideFromLeaderboard:e})})}async function Kk(){const{others:e}=On();return Pn(`${e}sync-status`,{headers:xn()})}function zx(){return Kk().catch(()=>null)}function Uk(e){return typeof e=="number"?{dailyDays:e,breakdownDays:e,hourlyDays:e}:{dailyDays:e.dailyDays,breakdownDays:e.breakdownDays,hourlyDays:e.hourlyDays??e.breakdownDays}}async function Oz(e){const{dailyDays:t,breakdownDays:l,hourlyDays:r}=Uk(e),[i,s,u,f,d]=await Promise.all([Nx(),zx(),Ik(t),Dx(r).catch(()=>({hours:[],timeZone:"Asia/Shanghai"})),$x(l)]);return{summary:i,syncStatus:s,dailyRows:u.days??[],hourlyRows:f.hours??[],modelRows:(d.models??[]).filter(h=>h.tokens>0),projectRows:(d.projects??[]).filter(h=>h.tokens>0)}}async function jz(e,t,l){const[r,i,s,u]=await Promise.all([Nx(),zx(),Dx(l).catch(()=>({hours:[],timeZone:"Asia/Shanghai"})),$x(t)]);return{summary:r,syncStatus:i??e.syncStatus,dailyRows:e.dailyRows,hourlyRows:s.hours??[],modelRows:(u.models??[]).filter(f=>f.tokens>0),projectRows:(u.projects??[]).filter(f=>f.tokens>0)}}async function Iz(){const{others:e}=On();return Pn(`${e}trigger-sync`,{method:"POST",headers:{"Content-Type":"application/json",...xn()},body:"{}"})}async function Bz(e){const{others:t}=On();return Pn(`${t}ensure-local-range`,{method:"POST",headers:{"Content-Type":"application/json",...xn()},body:JSON.stringify({days:e})})}async function b2(){const{others:e}=On();return Pn(`${e}config`,{headers:xn()})}async function Rh(e){const{others:t}=On();return Pn(`${t}config`,{method:"PUT",headers:{"Content-Type":"application/json",...xn()},body:JSON.stringify(e)})}const v2="login_from_client",y2="port",Px="user_id",Ox="origin_user_id",jx="user_name",Ix="avatar_large",Fo=8452,Fk="https://juejin.cn/aiusage/dashboard";function Vk(e,t){return t}const Bx=Vk(void 0,Fk),_k=512,Gk=64;function qk(e){return e==="desktop"||e==="cli"?e:null}function Hx(e){if(e==null||e==="")return Fo;const t=Number.parseInt(e,10);return!Number.isFinite(t)||t<=0||t>65535?Fo:t}function Kx(e){const t=e.trim();return t.length>0&&t.length<=_k&&!/\s/.test(t)}function Ux(e){const t=e.trim();return t.length>0&&t.length<=Gk&&!/\s/.test(t)}function qv(e){return(e??"").trim()}function Yv(e){const t=e.trim();return t.length>=2&&(t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))?t.slice(1,-1).trim():t}function Yk(e){const t=new URL(Bx);return t.searchParams.set(v2,e.loginFromClient),e.loginFromClient==="cli"&&t.searchParams.set(y2,String(e.port??Fo)),t.toString()}function Fx(e=window.location.search){const t=new URLSearchParams(e),l=Yv(t.get(Px)??""),r=Yv(t.get(Ox)??"");return{loginFromClient:qk(t.get(v2)),port:Hx(t.get(y2)),userId:Kx(l)?l:null,originUserId:Ux(r)?r:"",userName:qv(t.get(jx)),avatarLarge:qv(t.get(Ix))}}const z0=typeof window<"u"?Fx(window.location.search):{loginFromClient:null,port:Fo,userId:null,originUserId:"",userName:"",avatarLarge:""};function Vx(){const e=Fx(window.location.search);return e.loginFromClient||e.userId?e:z0.loginFromClient||z0.userId?z0:e}function Xk(){const e=new URL(window.location.href);e.searchParams.delete(v2),e.searchParams.delete(y2),e.searchParams.delete(Px),e.searchParams.delete(Ox),e.searchParams.delete(jx),e.searchParams.delete(Ix);const t=`${e.pathname}${e.search}${e.hash}`;window.history.replaceState(window.history.state,"",t)}function Wk(){const e="".trim().replace(/\/$/,"");return e?`${e}/functions/tud-session`:"/api/functions/tud-session"}async function Zk(){const e=await fetch(Wk(),{credentials:"include",headers:{Accept:"application/json"}});if(!e.ok)return null;let t;try{t=await e.json()}catch{return null}if(!t||typeof t!="object")return null;const l=t.success,r=t.data;if(l===!1||!r||typeof r!="object")return null;const i=r.encryptedUserId,s=r.originUserId;if(typeof i!="string"||!Kx(i)||typeof s!="string"||!Ux(s))return null;const u=r.userName,f=r.avatarLarge;return{userId:i.trim(),originUserId:s.trim(),userName:typeof u=="string"?u.trim():"",avatarLarge:typeof f=="string"?f.trim():""}}function Qk(){return typeof window<"u"&&typeof window.tud<"u"?"desktop":"cli"}function Jk(){const e=window.location.port;return Hx(e||String(Fo))}async function _x(){var i;const e=Qk(),t=e==="cli"?Jk():void 0,l=Yk({loginFromClient:e,port:t}),r=(i=window.tud)==null?void 0:i.openExternal;return typeof r=="function"?r(l):(window.location.assign(l),{ok:!0})}const eN={info:"accent",warn:"warning",error:"danger",success:"success"};function Gx({tone:e="info",title:t,description:l}){return E.jsxs(wo,{status:eN[e],children:[E.jsx(wo.Indicator,{}),E.jsxs(wo.Content,{children:[E.jsx(wo.Title,{children:t}),l&&E.jsx(wo.Description,{children:l})]})]})}const tN=[{id:"sync",label:"云端同步"},{id:"app",label:"应用"},{id:"about",label:"关于"}];function nN({activeTab:e,onTabChange:t}={}){const[l]=y.useState(()=>new Xo({maxVisibleToasts:1})),[r,i]=y.useState("sync"),s=e??r,u=t??i,f=s==="pet"?"sync":s;return E.jsxs("div",{className:"w-full",children:[E.jsx(g2.Provider,{placement:"top end",queue:l}),E.jsxs(ra,{className:"w-full text-center",selectedKey:f,onSelectionChange:d=>u(String(d)),children:[E.jsx(ra.ListContainer,{className:"m-3 mr-14 w-fit",children:E.jsx(ra.List,{"aria-label":"设置分类",className:"w-fit *:h-6 *:w-fit *:px-3 *:text-sm *:font-normal *:data-[selected=true]:text-accent-foreground",children:tN.map(d=>E.jsxs(ra.Tab,{id:d.id,children:[E.jsx("span",{className:"text-xs font-normal",children:d.label}),E.jsx(ra.Indicator,{className:"bg-accent"})]},d.id))})}),E.jsx(ra.Panel,{className:"h-[50vh] overflow-y-auto p-3 text-left font-normal [&_*]:font-normal",id:"sync",children:f==="sync"&&E.jsx(lN,{onNotify:d=>l.add(d),onSaved:()=>l.add({description:"写入本机 CLI 配置",title:"已保存",variant:"success"})})}),E.jsx(ra.Panel,{className:"h-[50vh] overflow-y-auto p-3 text-left",id:"app",children:f==="app"&&E.jsx(aN,{})}),E.jsx(ra.Panel,{className:"h-[50vh] overflow-y-auto p-3 text-left",id:"about",children:f==="about"&&E.jsx(Lx,{})})]})]})}function lN({onSaved:e,onNotify:t}){var te,ne,j;const[l,r]=y.useState(null),[i,s]=y.useState(!1),[u,f]=y.useState(!0),[d,h]=y.useState(!1),[p,b]=y.useState(!1),[v,w]=y.useState(!1),[x,T]=y.useState(null),C=y.useCallback(async()=>{f(!0);try{const Y=await b2();r(Y),s(Y.juejin.enabled),T(null)}catch(Y){T(Y instanceof Error?Y.message:"加载配置失败"),r(null)}finally{f(!1)}},[]);y.useEffect(()=>{C()},[C]);const N=async Y=>{const z=i;s(Y),h(!0),T(null);try{const O=await Rh({juejin:{enabled:Y}});r(O),e()}catch(O){s(z),T(O instanceof Error?O.message:"保存失败")}finally{h(!1)}},M=async()=>{h(!0),T(null);try{const Y=await Rh({juejin:{token:null,originUserId:null,userName:null,avatarLarge:null}});r(Y),b(!1),kx(),t({title:"已退出登录",variant:"success"})}catch(Y){T(Y instanceof Error?Y.message:"退出失败"),b(!1)}finally{h(!1)}};if(u)return E.jsx("p",{className:"text-muted",children:"加载配置…"});const L=Y=>Y.replace(/^['"]+|['"]+$/g,"").trim(),k=(l==null?void 0:l.juejin.userId)??null,B=L(((te=l==null?void 0:l.juejin.originUserId)==null?void 0:te.trim())||""),G=((ne=l==null?void 0:l.juejin.userName)==null?void 0:ne.trim())||"",$=((j=l==null?void 0:l.juejin.avatarLarge)==null?void 0:j.trim())||"",A=(l==null?void 0:l.juejin.hasToken)??!1,U=k&&!k.startsWith("jau.")?L(k):"",K=B||U||null,q=()=>{_x().then(Y=>{Y.ok||t({title:"无法打开掘金登录页",description:Y.message??"请稍后重试",variant:"danger"})})};return E.jsxs("div",{className:"flex h-full flex-col gap-3 overflow-hidden",children:[x&&E.jsx(Gx,{tone:"error",title:x}),E.jsxs($5,{className:"rounded-xl p-4",variant:"secondary",children:[E.jsxs("div",{className:"flex items-start justify-between gap-4",children:[E.jsxs("div",{className:"min-w-0",children:[E.jsx("h3",{className:"text-sm text-foreground",children:"云端同步"}),E.jsx("p",{className:"mt-1 text-xs text-muted",children:"本地 sync 完成后自动上报掘金"})]}),E.jsx(ha,{id:"cli-juejin-enabled",isDisabled:d,isSelected:i,onChange:Y=>{N(Y)},children:E.jsxs(ha.Content,{children:[E.jsx(ha.Control,{children:E.jsx(ha.Indicator,{})}),"启用"]})})]}),E.jsxs("div",{className:"mt-4 flex items-start justify-between gap-4 text-sm",children:[E.jsxs("div",{children:[E.jsx("p",{className:"text-foreground",children:"关联账号"}),E.jsx("p",{className:"mt-1 text-xs text-muted",children:"用于识别云端用量归属"})]}),k?E.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[$?E.jsx("img",{alt:G||"用户头像",className:"size-8 shrink-0 rounded-full object-cover",referrerPolicy:"no-referrer",src:$,title:G||void 0}):E.jsx("span",{"aria-hidden":"true",className:"inline-flex size-8 shrink-0 items-center justify-center rounded-full bg-accent/15 text-[13px] text-accent",title:G||void 0,children:(G||k).slice(0,1)}),E.jsxs("div",{className:"min-w-0 text-right",children:[E.jsx("p",{className:"truncate text-foreground",title:G||void 0,children:G||"已关联"}),E.jsx("p",{className:"break-all font-mono text-xs text-muted",title:K?void 0:"缺少 originUserId,请重新掘金登录关联",children:K??"缺少用户 ID(请重新登录关联)"})]})]}):E.jsx("span",{className:"text-muted",children:"未关联"})]}),i&&!k&&E.jsx("p",{className:"mt-3 text-xs text-amber-600 dark:text-amber-400",children:A?"尚未通过掘金登录关联账号;关联前不会上报。":"已开启同步但未关联用户 ID,上报将跳过。"})]}),E.jsx("div",{className:"mt-auto flex justify-end gap-2",children:k?E.jsx(mn,{isDisabled:d,onPress:()=>b(!0),variant:"danger",children:"退出登录"}):E.jsx(mn,{isDisabled:d,onPress:()=>w(!0),variant:"primary",children:"掘金登录"})}),E.jsx(GL,{isOpen:v,onConfirm:q,onOpenChange:w}),E.jsx(Be.Backdrop,{isOpen:p,onOpenChange:b,variant:"blur",children:E.jsx(Be.Container,{size:"sm",children:E.jsxs(Be.Dialog,{children:[E.jsx(Be.CloseTrigger,{"aria-label":"关闭"}),E.jsx(Be.Header,{children:E.jsx(Be.Heading,{children:"退出登录"})}),E.jsx(Be.Body,{className:"text-sm text-muted",children:"确认清除本机保存的用户 ID?清除后需重新通过掘金登录关联。"}),E.jsxs(Be.Footer,{className:"gap-2",children:[E.jsx(mn,{slot:"close",variant:"tertiary",children:"取消"}),E.jsx(mn,{isDisabled:d,onPress:()=>{M()},variant:"danger",children:"确认退出"})]})]})})})]})}function aN(){const[e,t]=y.useState(null),[l,r]=y.useState(!0),[i,s]=y.useState(null);return y.useEffect(()=>{let u=!1;return b2().then(f=>{u||(t(f),s(null))}).catch(f=>{u||s(f instanceof Error?f.message:"加载配置失败")}).finally(()=>{u||r(!1)}),()=>{u=!0}},[]),l?E.jsx("p",{className:"text-muted",children:"加载配置…"}):i?E.jsx(Gx,{tone:"error",title:i}):e?E.jsx("div",{className:"flex flex-col gap-4",children:E.jsxs($5,{className:"rounded-xl p-4",variant:"secondary",children:[E.jsx("h3",{className:"mb-3 text-sm font-medium text-foreground",children:"设备信息"}),E.jsxs("div",{className:"flex flex-col gap-2 text-sm",children:[E.jsx(Dc,{label:"设备 ID",value:e.deviceId}),E.jsx(Dc,{label:"上报起点",value:e.statsSince.slice(0,19).replace("T"," ")}),E.jsx(Dc,{label:"上次同步",value:e.lastSyncAt?new Date(e.lastSyncAt).toLocaleString():"从未"}),E.jsx(Dc,{label:"上次上报",value:e.lastUploadAt?new Date(e.lastUploadAt).toLocaleString():"从未"})]})]})}):E.jsx("p",{className:"text-sm text-muted",children:"当前为 Web 模式,设备信息仅在本机 CLI / 桌面端可见。"})}function Dc({label:e,value:t}){return E.jsxs("div",{className:"flex items-center justify-between gap-4 text-sm",children:[E.jsx("span",{className:"text-muted",children:e}),E.jsx("span",{className:"break-all text-right font-mono text-xs",children:t})]})}function rN({trigger:e,isOpen:t,onOpenChange:l,listenForOpenEvent:r=!0,hideTrigger:i=!1,activeTab:s,onTabChange:u}={}){const[f,d]=y.useState(!1),[h,p]=y.useState("sync"),b=t!==void 0,v=b?t:f,w=s??h,x=y.useCallback(C=>{b||d(C),l==null||l(C)},[b,l]),T=y.useCallback(C=>{s===void 0&&p(C),u==null||u(C)},[s,u]);return y.useEffect(()=>{if(!r)return;const C=N=>{const M=N.detail;M!=null&&M.tab&&T(M.tab),x(!0)};return window.addEventListener(Ch,C),()=>window.removeEventListener(Ch,C)},[r,x,T]),E.jsxs(E.Fragment,{children:[!i&&(e??E.jsxs(mn,{"aria-label":"设置",onPress:()=>x(!0),variant:"tertiary",children:[E.jsx(FL,{}),"设置"]})),E.jsx(Be.Backdrop,{isOpen:v,onOpenChange:x,variant:"blur",children:E.jsx(Be.Container,{className:"w-[760px] max-w-[min(760px,92vw)]",scroll:"inside",size:"lg",children:E.jsxs(Be.Dialog,{"aria-label":"设置",className:"overflow-hidden p-0",children:[E.jsx(Be.CloseTrigger,{"aria-label":"关闭设置",className:"z-20"}),E.jsx(Be.Body,{className:"m-0 flex-none overflow-hidden p-0",children:E.jsx(nN,{activeTab:w,onTabChange:T})})]})})})]})}/**
77
+ }`.trim(),document.head.prepend(i);let u=p=>{if(!(p.touches.length===2||l)){if(!t||t===document.documentElement||t===document.body){p.preventDefault();return}t.scrollHeight===t.clientHeight&&t.scrollWidth===t.clientWidth&&p.preventDefault()}},f=p=>{var w;let b=ve(p),v=p.relatedTarget;if(v&&Ao(v))v.focus({preventScroll:!0}),ev(v,Ao(b));else if(!v){let x=(w=b.parentElement)==null?void 0:w.closest("[tabindex]");x==null||x.focus({preventScroll:!0})}},d=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(p){let b=et(),v=b!=null&&Ao(b);d.call(this,{...p,preventScroll:!0}),(!p||!p.preventScroll)&&ev(this,v)};let h=er(M0(document,"touchstart",r,{passive:!1,capture:!0}),M0(document,"touchmove",u,{passive:!1,capture:!0}),M0(document,"blur",f,!0));return()=>{e(),h(),i.remove(),HTMLElement.prototype.focus=d}}function Fc(e,t,l){let r=e.style[t];return e.style[t]=l,()=>{e.style[t]=r}}function M0(e,t,l,r){return e.addEventListener(t,l,r),()=>{e.removeEventListener(t,l,r)}}function ev(e,t){t||!No?tv(e):No.addEventListener("resize",()=>tv(e),{once:!0})}function tv(e){let t=document.scrollingElement||document.documentElement,l=e;for(;l&&l!==t;){let r=i3(l);if(r!==document.documentElement&&r!==document.body&&r!==l){let i=r.getBoundingClientRect(),s=l.getBoundingClientRect();if(s.top<i.top||s.bottom>i.top+l.clientHeight){let u=i.bottom;No&&(u=Math.min(u,No.offsetTop+No.height));let f=s.top-i.top-((u-i.top)/2-s.height/2);r.scrollTo({top:Math.max(0,Math.min(r.scrollHeight-r.clientHeight,r.scrollTop+f)),behavior:"smooth"})}}l=r.parentElement}}function ER(e,t){let{triggerRef:l,popoverRef:r,groupRef:i,isNonModal:s,isKeyboardDismissDisabled:u,shouldCloseOnInteractOutside:f,...d}=e,h=d.trigger==="SubmenuTrigger",{overlayProps:p,underlayProps:b}=o4({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!s||h,isKeyboardDismissDisabled:u,shouldCloseOnInteractOutside:f},i??r),{overlayProps:v,arrowProps:w,placement:x,triggerAnchorPoint:T}=sR({...d,targetRef:l,overlayRef:r,isOpen:t.isOpen,onClose:s&&!h?t.close:null,getTargetRect:d.getTargetRect??(t.point?()=>new DOMRect(t.point.x,t.point.y,0,0):void 0)});s4({isDisabled:s||!t.isOpen}),y.useEffect(()=>{if(t.isOpen&&r.current)return s?QT((i==null?void 0:i.current)??r.current):n4([(i==null?void 0:i.current)??r.current],{shouldUseInert:!0})},[s,t.isOpen,r,i]);let{focusWithinProps:C}=Yo(e);return{popoverProps:Ce(p,v,C),arrowProps:w,underlayProps:b,placement:x,triggerAnchorPoint:T}}var c4={};c4={dismiss:"تجاهل"};var u4={};u4={dismiss:"Отхвърляне"};var f4={};f4={dismiss:"Odstranit"};var d4={};d4={dismiss:"Luk"};var h4={};h4={dismiss:"Schließen"};var m4={};m4={dismiss:"Απόρριψη"};var p4={};p4={dismiss:"Dismiss"};var g4={};g4={dismiss:"Descartar"};var b4={};b4={dismiss:"Lõpeta"};var v4={};v4={dismiss:"Hylkää"};var y4={};y4={dismiss:"Rejeter"};var x4={};x4={dismiss:"התעלם"};var S4={};S4={dismiss:"Odbaci"};var w4={};w4={dismiss:"Elutasítás"};var E4={};E4={dismiss:"Ignora"};var C4={};C4={dismiss:"閉じる"};var T4={};T4={dismiss:"무시"};var R4={};R4={dismiss:"Atmesti"};var M4={};M4={dismiss:"Nerādīt"};var A4={};A4={dismiss:"Lukk"};var L4={};L4={dismiss:"Negeren"};var k4={};k4={dismiss:"Zignoruj"};var N4={};N4={dismiss:"Descartar"};var D4={};D4={dismiss:"Dispensar"};var $4={};$4={dismiss:"Revocare"};var z4={};z4={dismiss:"Пропустить"};var P4={};P4={dismiss:"Zrušiť"};var O4={};O4={dismiss:"Opusti"};var j4={};j4={dismiss:"Odbaci"};var I4={};I4={dismiss:"Avvisa"};var B4={};B4={dismiss:"Kapat"};var H4={};H4={dismiss:"Скасувати"};var K4={};K4={dismiss:"取消"};var U4={};U4={dismiss:"關閉"};var F4={};F4={"ar-AE":c4,"bg-BG":u4,"cs-CZ":f4,"da-DK":d4,"de-DE":h4,"el-GR":m4,"en-US":p4,"es-ES":g4,"et-EE":b4,"fi-FI":v4,"fr-FR":y4,"he-IL":x4,"hr-HR":S4,"hu-HU":w4,"it-IT":E4,"ja-JP":C4,"ko-KR":T4,"lt-LT":R4,"lv-LV":M4,"nb-NO":A4,"nl-NL":L4,"pl-PL":k4,"pt-BR":N4,"pt-PT":D4,"ro-RO":$4,"ru-RU":z4,"sk-SK":P4,"sl-SI":O4,"sr-SP":j4,"sv-SE":I4,"tr-TR":B4,"uk-UA":H4,"zh-CN":K4,"zh-TW":U4};const CR=Symbol.for("react-aria.i18n.locale"),TR=Symbol.for("react-aria.i18n.strings");let Qr;class Au{constructor(t,l="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=l}getStringForLocale(t,l){let i=this.getStringsForLocale(l)[t];if(!i)throw new Error(`Could not find intl message ${t} in ${l} locale`);return i}getStringsForLocale(t){let l=this.strings[t];return l||(l=RR(t,this.strings,this.defaultLocale),this.strings[t]=l),l}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let l=window[CR];if(Qr===void 0){let i=window[TR];if(!i)return null;Qr={};for(let s in i)Qr[s]=new Au({[l]:i[s]},l)}let r=Qr==null?void 0:Qr[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}}function RR(e,t,l="en-US"){if(t[e])return t[e];let r=MR(e),i=AR(e);if(i&&t[`${r}-${i}`])return t[`${r}-${i}`];if(t[r])return t[r];for(let s in t)if(s.startsWith(r+"-"))return t[s];return t[l]}function MR(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}function AR(e){if(Intl.Locale)return new Intl.Locale(e).script}const nv=new Map,lv=new Map;class LR{constructor(t,l){this.locale=t,this.strings=l}format(t,l){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(l,this):r}plural(t,l,r="cardinal"){let i=l["="+t];if(i)return typeof i=="function"?i():i;let s=this.locale+":"+r,u=nv.get(s);u||(u=new Intl.PluralRules(this.locale,{type:r}),nv.set(s,u));let f=u.select(t);return i=l[f]||l.other,typeof i=="function"?i():i}number(t){let l=lv.get(this.locale);return l||(l=new Intl.NumberFormat(this.locale),lv.set(this.locale,l)),l.format(t)}select(t,l){let r=t[l]||t.other;return typeof r=="function"?r():r}}const av=new WeakMap;function kR(e){let t=av.get(e);return t||(t=new Au(e),av.set(e,t)),t}function NR(e,t){return t&&Au.getGlobalDictionaryForPackage(t)||kR(e)}function l2(e,t){let{locale:l}=bi(),r=NR(e,t);return y.useMemo(()=>new LR(l,r),[l,r])}const rv={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function DR(e={}){let{style:t,isFocusable:l}=e,[r,i]=y.useState(!1),{focusWithinProps:s}=Yo({isDisabled:!l,onFocusWithinChange:f=>i(f)}),u=y.useMemo(()=>r?t:t?{...rv,...t}:rv,[r]);return{visuallyHiddenProps:{...s,style:u}}}function V4(e){let{children:t,elementType:l="div",isFocusable:r,style:i,...s}=e,{visuallyHiddenProps:u}=DR(e);return V.createElement(l,Ce(s,u),t)}function $R(e){return e&&e.__esModule?e.default:e}function mh(e){let{onDismiss:t,...l}=e,r=l2($R(F4),"@react-aria/overlays"),i=Kh(l,r.format("dismiss")),s=()=>{t&&t()};return V.createElement(V4,null,V.createElement("button",{...i,tabIndex:-1,onClick:s,style:{width:1,height:1}}))}const zR=V.forwardRef(({children:e,...t},l)=>{let r=y.useRef(!1),i=y.useContext(Ho),s=Ce(i||{},{...t,register(){r.current=!0,i&&i.register()}});return s.ref=bn(l||(i==null?void 0:i.ref)),Uh(i,s.ref),y.useEffect(()=>{r.current||(r.current=!0)},[]),V.createElement(Ho.Provider,{value:s},e)});function PR({children:e}){let t=y.useMemo(()=>({register:()=>{}}),[]);return V.createElement(Ho.Provider,{value:t},e)}const OR=y.createContext({});function _4(){return y.useContext(OR)??{}}const G4=V.createContext(null);function ph(e){let t=Nl(),{portalContainer:l=t?null:document.body,isExiting:r}=e,[i,s]=y.useState(!1),u=y.useMemo(()=>({contain:i,setContain:s}),[i,s]),{getContainer:f}=_4();if(!e.portalContainer&&f&&(l=f()),!l)return null;let d=e.children;return e.disableFocusManagement||(d=V.createElement(fR,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!r},d)),d=V.createElement(G4.Provider,{value:u},V.createElement(PR,null,V.createElement(Bo.Provider,{value:null},d))),D9.createPortal(d,l)}function q4(){let e=y.useContext(G4),t=e==null?void 0:e.setContain;Ne(()=>{t==null||t(!0)},[t])}function a2(e){let[t,l]=Ru(e.isOpen,e.defaultOpen||!1,e.onOpenChange),[r,i]=y.useState(null);const s=y.useCallback(()=>{l(!0)},[l]),u=y.useCallback(()=>{l(!1)},[l]),f=y.useCallback(()=>{l(!t)},[l,t]);return{isOpen:t,setOpen:l,open:s,close:u,toggle:f,point:r,setPoint:i}}const Y4=y.createContext(null),iv=y.createContext(null),xz=y.forwardRef(function(t,l){[t,l]=yn(t,l,Y4);let r=y.useContext(yi),i=a2(t),s=t.isOpen!=null||t.defaultOpen!=null||!r?i:r,u=Zc(l,s.isOpen),f=t.isExiting||!t.shouldSkipAnimation&&u||!1,d=oT(),{direction:h}=bi();if(d){let p=t.children;return typeof p=="function"&&(p=p({trigger:t.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),V.createElement(V.Fragment,null,p)}return s&&!s.isOpen&&!f?null:V.createElement(jR,{...t,triggerRef:t.triggerRef,state:s,popoverRef:l,isExiting:f,dir:h})});function jR({state:e,isExiting:t,UNSTABLE_portalContainer:l,clearContexts:r,...i}){var q,te;let s=y.useRef(null),u=y.useRef(null),f=y.useContext(iv),d=f&&i.trigger==="SubmenuTrigger",{popoverProps:h,underlayProps:p,arrowProps:b,placement:v,triggerAnchorPoint:w}=ER({...i,offset:i.offset??8,arrowRef:s,groupRef:d?f:u},e),x=i.popoverRef,T=wu(x,!!v),C=i.isEntering||!i.shouldSkipAnimation&&T||!1,N=At({...i,defaultClassName:"react-aria-Popover",values:{trigger:i.trigger||null,placement:v,isEntering:C,isExiting:t}}),M=!i.isNonModal||i.trigger==="SubmenuTrigger"||i.trigger==="PreviewTrigger",[L,k]=y.useState(i.trigger==="PreviewTrigger");Ne(()=>{x.current&&k(M&&!x.current.querySelector("[role=dialog]"))},[x,M]),y.useEffect(()=>{L&&i.trigger!=="PreviewTrigger"&&(i.trigger!=="SubmenuTrigger"||pa()!=="pointer")&&x.current&&!Oo(x.current)&&va(x.current)},[L,x,i.trigger]);let B=y.useMemo(()=>{let ne=N.children;if(r)for(let j of r)ne=V.createElement(j.Provider,{value:null},ne);return ne},[N.children,r]),[G,$]=y.useState(null),A=y.useCallback(()=>{i.triggerRef.current&&$(i.triggerRef.current.getBoundingClientRect().width+"px")},[i.triggerRef]);Ne(A,[A]),W0({ref:(q=N.style)!=null&&q["--trigger-width"]?void 0:i.triggerRef,onResize:A});let U={...h.style,"--trigger-anchor-point":w?`${w.x}px ${w.y}px`:void 0,...N.style,"--trigger-width":((te=N.style)==null?void 0:te["--trigger-width"])||G},K=V.createElement(ut.div,{...Ce(mt(i,{global:!0}),h),...N,id:L?i.id:void 0,role:L?"dialog":void 0,tabIndex:L?-1:void 0,"aria-label":i["aria-label"],"aria-labelledby":i["aria-labelledby"],ref:x,slot:i.slot||void 0,style:U,dir:i.dir,"data-trigger":i.trigger,"data-placement":v,"data-entering":C||void 0,"data-exiting":t||void 0},!i.isNonModal&&V.createElement(mh,{onDismiss:e.close}),V.createElement(t4.Provider,{value:{...b,placement:v,ref:s}},B),V.createElement(mh,{onDismiss:e.close}));return d?V.createElement(ph,{...i,shouldContainFocus:L&&i.trigger!=="PreviewTrigger",isExiting:t,portalContainer:l??(f==null?void 0:f.current)??void 0},K):V.createElement(ph,{...i,shouldContainFocus:L&&i.trigger!=="PreviewTrigger",isExiting:t,portalContainer:l},!i.isNonModal&&e.isOpen&&V.createElement("div",{"data-testid":"underlay",...p,style:{position:"fixed",inset:0}}),V.createElement("div",{ref:u,style:{display:"contents"}},V.createElement(iv.Provider,{value:u},K)))}class vi{constructor(t){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=t}get childNodes(){throw new Error("childNodes is not supported")}clone(){let t=new this.constructor(this.key);return t.value=this.value,t.level=this.level,t.hasChildNodes=this.hasChildNodes,t.rendered=this.rendered,t.textValue=this.textValue,t["aria-label"]=this["aria-label"],t.index=this.index,t.parentKey=this.parentKey,t.prevKey=this.prevKey,t.nextKey=this.nextKey,t.firstChildKey=this.firstChildKey,t.lastChildKey=this.lastChildKey,t.props=this.props,t.render=this.render,t.colSpan=this.colSpan,t.colIndex=this.colIndex,t}filter(t,l,r){let i=this.clone();return l.addDescendants(i,t),i}}class X4 extends vi{filter(t,l,r){let[i,s]=W4(t,l,this.firstChildKey,r),u=this.clone();return u.firstChildKey=i,u.lastChildKey=s,u}}const T2=class T2 extends vi{};T2.type="header";let ov=T2;const R2=class R2 extends vi{};R2.type="loader";let sv=R2;const M2=class M2 extends X4{filter(t,l,r){if(r(this.textValue,this)){let i=this.clone();return l.addDescendants(i,t),i}return null}};M2.type="item";let cv=M2;const A2=class A2 extends X4{filter(t,l,r){let i=super.filter(t,l,r);if(i&&i.lastChildKey!==null){let s=t.getItem(i.lastChildKey);if(s&&s.type!=="header")return i}return null}};A2.type="section";let uv=A2;class IR{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let t=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;t;)yield t,t=t.nextKey!=null?this.keyMap.get(t.nextKey):void 0}getChildren(t){let l=this.keyMap;return{*[Symbol.iterator](){let r=l.get(t),i=(r==null?void 0:r.firstChildKey)!=null?l.get(r.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?l.get(i.nextKey):void 0}}}getKeyBefore(t){let l=this.keyMap.get(t);if(!l)return null;if(l.prevKey!=null){for(l=this.keyMap.get(l.prevKey);l&&l.type!=="item"&&l.lastChildKey!=null;)l=this.keyMap.get(l.lastChildKey);return(l==null?void 0:l.key)??null}return l.parentKey}getKeyAfter(t){let l=this.keyMap.get(t);if(!l)return null;if(l.type!=="item"&&l.firstChildKey!=null)return l.firstChildKey;for(;l;){if(l.nextKey!=null)return l.nextKey;if(l.parentKey!=null)l=this.keyMap.get(l.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let t=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(t==null?void 0:t.lastChildKey)!=null;)t=this.keyMap.get(t.lastChildKey);return(t==null?void 0:t.key)??null}getItem(t){return this.keyMap.get(t)??null}at(){throw new Error("Not implemented")}clone(){let t=this.constructor,l=new t;return l.keyMap=new Map(this.keyMap),l.firstKey=this.firstKey,l.lastKey=this.lastKey,l.itemCount=this.itemCount,l}addNode(t){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");t.type==="item"&&this.keyMap.get(t.key)==null&&this.itemCount++,this.keyMap.set(t.key,t)}addDescendants(t,l){this.addNode(t);let r=l.getChildren(t.key);for(let i of r)this.addDescendants(i,l)}removeNode(t){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");let l=this.keyMap.get(t);l!=null&&l.type==="item"&&this.itemCount--,this.keyMap.delete(t)}commit(t,l,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=t,this.lastKey=l,this.frozen=!r}filter(t){let l=new this.constructor,[r,i]=W4(this,l,this.firstKey,t);return l==null||l.commit(r,i),l}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}}function W4(e,t,l,r){if(l==null)return[null,null];let i=null,s=null,u=e.getItem(l);for(;u!=null;){let f=u.filter(e,t,r);f!=null&&(f.nextKey=null,s&&(f.prevKey=s.key,s.nextKey=f.key),i==null&&(i=f),t.addNode(f),s=f),u=u.nextKey!=null?e.getItem(u.nextKey):null}if(s&&s.type==="separator"){let f=s.prevKey;t.removeNode(s.key),f!=null?(s=t.getItem(f),s.nextKey=null):s=null}return[(i==null?void 0:i.key)??null,(s==null?void 0:s.key)??null]}class Z4{constructor(t){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=t}*[Symbol.iterator](){let t=this.firstChild;for(;t;)yield t,t=t.nextSibling}get firstChild(){return this._firstChild}set firstChild(t){this._firstChild=t,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(t){this._lastChild=t,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(t){this._previousSibling=t,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(t){this._nextSibling=t,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(t){this._parentNode=t,this.ownerDocument.markDirty(this)}get isConnected(){var t;return((t=this.parentNode)==null?void 0:t.isConnected)||!1}invalidateChildIndices(t){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||t.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=t,this.ownerDocument.markDirty(this))}updateChildIndices(){let t=this._minInvalidChildIndex;for(;t;)t.index=t.previousSibling?t.previousSibling.index+1:0,t=t.nextSibling;this._minInvalidChildIndex=null}appendChild(t){t.parentNode&&t.parentNode.removeChild(t),this.firstChild==null&&(this.firstChild=t),this.lastChild?(this.lastChild.nextSibling=t,t.index=this.lastChild.index+1,t.previousSibling=this.lastChild):(t.previousSibling=null,t.index=0),t.parentNode=this,t.nextSibling=null,this.lastChild=t,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(t,l){if(l==null)return this.appendChild(t);t.parentNode&&t.parentNode.removeChild(t),t.nextSibling=l,t.previousSibling=l.previousSibling,t.index=l.index-1,this.firstChild===l?this.firstChild=t:l.previousSibling&&(l.previousSibling.nextSibling=t),l.previousSibling=t,t.parentNode=l.parentNode,this.invalidateChildIndices(t),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(t){t.parentNode===this&&(this._minInvalidChildIndex===t&&(this._minInvalidChildIndex=null),t.nextSibling&&(this.invalidateChildIndices(t.nextSibling),t.nextSibling.previousSibling=t.previousSibling),t.previousSibling&&(t.previousSibling.nextSibling=t.nextSibling),this.firstChild===t&&(this.firstChild=t.nextSibling),this.lastChild===t&&(this.lastChild=t.previousSibling),t.parentNode=null,t.nextSibling=null,t.previousSibling=null,t.index=0,this.ownerDocument.markDirty(t),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let t=this.previousSibling;for(;t&&t.isHidden;)t=t.previousSibling;return t}get nextVisibleSibling(){let t=this.nextSibling;for(;t&&t.isHidden;)t=t.nextSibling;return t}get firstVisibleChild(){let t=this.firstChild;for(;t&&t.isHidden;)t=t.nextSibling;return t}get lastVisibleChild(){let t=this.lastChild;for(;t&&t.isHidden;)t=t.previousSibling;return t}}class hi extends Z4{constructor(t,l){super(l),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}get index(){return this._index}set index(t){this._index=t,this.ownerDocument.markDirty(this)}get level(){var t;return this.parentNode instanceof hi?this.parentNode.level+(((t=this.parentNode.node)==null?void 0:t.type)==="item"?1:0):0}getMutableNode(){return this.node==null?null:(this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){var r,i,s,u,f,d,h,p;let t=this.nextVisibleSibling,l=this.getMutableNode();if(l!=null&&(l.index=this.index,l.level=this.level,l.parentKey=this.parentNode instanceof hi?((r=this.parentNode.node)==null?void 0:r.key)??null:null,l.prevKey=((s=(i=this.previousVisibleSibling)==null?void 0:i.node)==null?void 0:s.key)??null,l.nextKey=((u=t==null?void 0:t.node)==null?void 0:u.key)??null,l.hasChildNodes=!!this.firstChild,l.firstChildKey=((d=(f=this.firstVisibleChild)==null?void 0:f.node)==null?void 0:d.key)??null,l.lastChildKey=((p=(h=this.lastVisibleChild)==null?void 0:h.node)==null?void 0:p.key)??null,(l.colSpan!=null||l.colIndex!=null)&&t)){let b=(l.colIndex??l.index)+(l.colSpan??1);if(t.node!=null&&b!==t.node.colIndex){let v=t.getMutableNode();v.colIndex=b}}}setProps(t,l,r,i,s){let u,{value:f,textValue:d,id:h,...p}=t;if(this.node==null?(u=new r(h??`react-aria-${++this.ownerDocument.nodeId}`),this.node=u):u=this.getMutableNode(),p.ref=l,u.props=p,u.rendered=i,u.render=s,u.value=f,t["aria-label"]&&(u["aria-label"]=t["aria-label"]),u.textValue=d||(typeof p.children=="string"?p.children:"")||t["aria-label"]||"",h!=null&&h!==u.key)throw new Error("Cannot change the id of an item");p.colSpan!=null&&(u.colSpan=p.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let t=this;return{get display(){return t.isHidden?"none":""},set display(l){var i,s;let r=l==="none";if(t.isHidden!==r){(((i=t.parentNode)==null?void 0:i.firstVisibleChild)===t||((s=t.parentNode)==null?void 0:s.lastVisibleChild)===t)&&t.ownerDocument.markDirty(t.parentNode);let u=t.previousVisibleSibling,f=t.nextVisibleSibling;u&&t.ownerDocument.markDirty(u),f&&t.ownerDocument.markDirty(f),t.isHidden=r,t.ownerDocument.markDirty(t)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}}class BR extends Z4{constructor(t){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=t,this.nextCollection=t}get isConnected(){return!0}createElement(t){return new hi(t,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(t){this.dirtyNodes.add(t)}addNode(t){if(t.isHidden||t.node==null)return;let l=this.getMutableCollection();if(!l.getItem(t.node.key))for(let r of t)this.addNode(r);l.addNode(t.node)}removeNode(t){for(let l of t)this.removeNode(l);t.node&&this.getMutableCollection().removeNode(t.node.key)}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){var t,l,r,i;for(let s of this.dirtyNodes)s instanceof hi&&(!s.isConnected||s.isHidden)?this.removeNode(s):s.updateChildIndices();for(let s of this.dirtyNodes)s instanceof hi?(s.isConnected&&!s.isHidden&&(s.updateNode(),this.addNode(s)),s.node&&this.dirtyNodes.delete(s),s.isMutated=!1):this.dirtyNodes.delete(s);this.nextCollection&&(this.nextCollection.commit(((l=(t=this.firstVisibleChild)==null?void 0:t.node)==null?void 0:l.key)??null,((i=(r=this.lastVisibleChild)==null?void 0:r.node)==null?void 0:i.key)??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0,this.isSSR||(this.collection=this.collection.clone());for(let t of this.subscriptions)t();this.inSubscription=!1}}subscribe(t){return this.subscriptions.add(t),this.queuedRender&&t(),()=>this.subscriptions.delete(t)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}}function Q4(e){let{children:t,items:l,idScope:r,addIdAndValue:i,dependencies:s=[]}=e,u=y.useMemo(()=>{},[t]),f=y.useMemo(()=>new WeakMap,[...s,u]);return y.useMemo(()=>{if(l&&typeof t=="function"){let d=[];for(let h of l){let p=HR(h)?h:null,b=p?f.get(p):null;if(!b){b=t(h);let v=b.props.id??(h==null?void 0:h.key)??(h==null?void 0:h.id);r!=null&&b.props.id==null&&v!=null&&(v=r+":"+v);let w=v??d.length;b=y.cloneElement(b,i?{key:w,id:v,value:h}:{key:w}),p&&f.set(p,b)}d.push(b)}return d}else if(typeof t!="function")return t},[t,l,f,r,i])}function HR(e){switch(typeof e){case"object":return e!=null;case"function":case"symbol":return!0;default:return!1}}var Lu=By();const J4=y.createContext(!1),Uo=y.createContext(null);function KR(e){if(y.useContext(Uo))return e.content;let{collection:l,document:r}=_R(e.createCollection);return V.createElement(V.Fragment,null,V.createElement(iT,null,V.createElement(Uo.Provider,{value:r},e.content)),V.createElement(UR,{render:e.children,collection:l}))}function UR({collection:e,render:t}){return t(e)}function FR(e,t,l){let r=Nl(),i=y.useRef(r);i.current=r;let s=y.useCallback(()=>i.current?l():t(),[t,l]);return Lu.useSyncExternalStore(e,s)}const VR=typeof V.useSyncExternalStore=="function"?V.useSyncExternalStore:FR;function _R(e){let[t]=y.useState(()=>new BR((e==null?void 0:e())||new IR)),l=y.useCallback(u=>t.subscribe(u),[t]),r=y.useCallback(()=>{let u=t.getCollection();return t.isSSR&&t.resetAfterSSR(),u},[t]),i=y.useCallback(()=>(t.isSSR=!0,t.getCollection()),[t]);return{collection:VR(l,r,i),document:t}}const gh=y.createContext(null);function GR(e){var l;return l=class extends vi{},l.type=e,l}function e5(e,t,l,r,i,s){typeof e=="string"&&(e=GR(e));let u=y.useCallback(d=>{d==null||d.setProps(t,l,e,r,s)},[t,l,r,s,e]),f=y.useContext(gh);if(f){let d=f.ownerDocument.nodesByProps.get(t);return d||(d=f.ownerDocument.createElement(e.type),d.setProps(t,l,e,r,s),f.appendChild(d),f.ownerDocument.updateCollection(),f.ownerDocument.nodesByProps.set(t,d)),i?V.createElement(gh.Provider,{value:d},i):null}return V.createElement(e.type,{ref:u},i)}function qR(e,t){let l=({node:i})=>t(i.props,i.props.ref,i),r=y.forwardRef((i,s)=>{let u=y.useContext(Bo);if(!y.useContext(J4)){if(t.length>=3)throw new Error(t.name+" cannot be rendered outside a collection.");return t(i,s)}return e5(e,i,s,"children"in i?i.children:null,null,d=>V.createElement(Bo.Provider,{value:u},V.createElement(l,{node:d})))});return r.displayName=t.name,r}function Sz(e,t,l=t5){let r=({node:s})=>t(s.props,s.props.ref,s),i=y.forwardRef((s,u)=>{let f=l(s);return e5(e,s,u,null,f,d=>V.createElement(r,{node:d}))??V.createElement(V.Fragment,null)});return i.displayName=t.name,i}function t5(e){return Q4({...e,addIdAndValue:!0})}const fv=y.createContext(null);function YR(e){let t=y.useContext(fv),l=((t==null?void 0:t.dependencies)||[]).concat(e.dependencies),r=e.idScope??(t==null?void 0:t.idScope),i=t5({...e,idScope:r,dependencies:l});return y.useContext(Uo)&&(i=V.createElement(XR,null,i)),t=y.useMemo(()=>({dependencies:l,idScope:r}),[r,...l]),V.createElement(fv.Provider,{value:t},i)}function XR({children:e}){let t=y.useContext(Uo),l=y.useMemo(()=>V.createElement(Uo.Provider,{value:null},V.createElement(J4.Provider,{value:!0},e)),[e]);return Nl()?V.createElement(gh.Provider,{value:t},l):al.createPortal(l,t)}const wz=y.createContext(null),n5={CollectionRoot({collection:e,renderDropIndicator:t}){return dv(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:l}){return dv(e,t,l)}};function dv(e,t,l){return Q4({items:t?e.getChildren(t.key):e,dependencies:[l],children(r){if(r.type==="content")return V.createElement(V.Fragment,null);let i=r.render(r);return!l||r.type!=="item"?i:V.createElement(V.Fragment,null,l({type:"item",key:r.key,dropPosition:"before"}),i,WR(e,r,l))}})}function WR(e,t,l){let r=t.key,i=e.getKeyAfter(r),s=i!=null?e.getItem(i):null;for(;s!=null&&s.type!=="item";)i=e.getKeyAfter(s.key),s=i!=null?e.getItem(i):null;let u=t.nextKey!=null?e.getItem(t.nextKey):null;for(;u!=null&&u.type!=="item";)u=u.nextKey!=null?e.getItem(u.nextKey):null;let f=[];if(u==null){let d=t;for(;(d==null?void 0:d.type)==="item"&&(!s||d.parentKey!==s.parentKey&&s.level<d.level);){let h=l({type:"item",key:d.key,dropPosition:"after"});y.isValidElement(h)&&f.push(y.cloneElement(h,{key:`${d.key}-after`})),d=d.parentKey!=null?e.getItem(d.parentKey):null}}return f}const l5=y.createContext(n5);function ZR(e){return y.useMemo(()=>e!=null?new Set([e]):null,[e])}function a5(e){let t=JR(He(e));t!==e&&(t&&QR(t,e),e&&r5(e,t))}function QR(e,t){e.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function r5(e,t){e.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function JR(e){let t=et(e),l=t==null?void 0:t.getAttribute("aria-activedescendant");return l&&e.getElementById(l)||t}const i5=y.createContext(null);function eM(e){let t=y.useRef({});return V.createElement(i5.Provider,{value:t},e.children)}const tM=y.forwardRef(function(t,l){let{name:r,isVisible:i=!0,children:s,className:u,style:f,render:d,...h}=t,[p,b]=y.useState(i?"visible":"hidden"),v=y.useContext(i5);if(!v)throw new Error("<SharedElement> must be rendered inside a <SharedElementTransition>");i&&p==="hidden"&&b("visible"),l=bn(l),Ne(()=>{let x=l.current,T=v.current,C=T[r],N=null;if(x&&i&&C){b("visible");let M=x.getAnimations(),L=C.style.map(([k,B])=>{let G=x.style[k];if(k==="translate"){let $=C.rect,A=x.getBoundingClientRect(),U=$.left-(A==null?void 0:A.left),K=$.top-(A==null?void 0:A.top);x.style.translate=`${U}px ${K}px`}else x.style[k]=B;return[k,G]});for(let k of x.getAnimations())M.includes(k)||k.cancel();N=requestAnimationFrame(()=>{N=null;for(let[k,B]of L)x.style[k]=B}),delete T[r]}else x&&i&&!C?(queueMicrotask(()=>al.flushSync(()=>b("entering"))),N=requestAnimationFrame(()=>{N=null,b("visible")})):x&&!i&&queueMicrotask(()=>{T[r]?(delete T[r],al.flushSync(()=>b("exiting")),Promise.all(x.getAnimations().map(M=>M.finished)).then(()=>b("hidden")).catch(()=>{})):b("hidden")});return()=>{if(N!=null&&cancelAnimationFrame(N),x&&x.isConnected&&!x.hasAttribute("data-exiting")){let M=window.getComputedStyle(x);if(M.transitionProperty!=="none"){let L=M.transitionProperty.split(/\s*,\s*/);T[r]={rect:x.getBoundingClientRect(),style:L.map(k=>[k,M[k]])}}}}},[l,v,r,i]);let w=At({children:s,className:u,style:f,render:d,values:{isEntering:p==="entering",isExiting:p==="exiting"}});return p==="hidden"?null:V.createElement(ut.div,{...h,...w,ref:l,"data-entering":p==="entering"||void 0,"data-exiting":p==="exiting"||void 0})}),o5=y.createContext({isSelected:!1}),nM=y.forwardRef(function(t,l){[t,l]=yn(t,l,o5);let{isSelected:r,...i}=t;return V.createElement(tM,{...i,ref:l,className:t.className||"react-aria-SelectionIndicator",name:"SelectionIndicator",isVisible:r})}),ku=y.createContext({}),s5=y.forwardRef(function(t,l){[t,l]=yn(t,l,ku);let{elementType:r="span",...i}=t,s=ut[r];return V.createElement(s,{className:"react-aria-Text",...i,ref:l})}),lM=500;function aM(e){let{isDisabled:t,pointerType:l,onLongPressStart:r,onLongPressEnd:i,onLongPress:s,threshold:u=lM,accessibilityDescription:f}=e;const d=y.useRef(void 0);let{addGlobalListener:h,removeAllGlobalListeners:p}=Su(),b=x=>l?x.pointerType===l:x.pointerType==="mouse"||x.pointerType==="touch",{pressProps:v}=lr({isDisabled:t,onPressStart(x){if(x.continuePropagation(),b(x)){r&&r({...x,type:"longpressstart"}),d.current=setTimeout(()=>{x.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),h(x.target,"click",C=>C.preventDefault(),{once:!0}),He(x.target).activeElement!==x.target&&en(x.target),s&&s({...x,type:"longpress"}),d.current=void 0},u),x.pointerType==="touch"&&h(x.target,"contextmenu",C=>C.preventDefault(),{once:!0});let T=jt(x.target);h(T,"pointerup",()=>{setTimeout(()=>{p()},100)},{once:!0})}},onPressEnd(x){d.current&&clearTimeout(d.current),i&&b(x)&&i({...x,type:"longpressend"})}}),w=Zw(s&&!t?f:void 0);return{longPressProps:Ce(v,w)}}function rM(e,t,l){let{type:r}=e,{isOpen:i}=t;y.useEffect(()=>{l&&l.current&&a4.set(l.current,t.close)});let s;r==="menu"?s=!0:r==="listbox"&&(s="listbox");let u=_n();return{triggerProps:{"aria-haspopup":s,"aria-expanded":i,"aria-controls":i?u:void 0,onPress:t.toggle},overlayProps:{id:u}}}function bh(e){return hw()?e.altKey:e.ctrlKey}function A0(e,t){var i,s;let l=`[data-key="${CSS.escape(String(t))}"]`,r=(i=e.current)==null?void 0:i.dataset.collection;return r&&(l=`[data-collection="${CSS.escape(r)}"]${l}`),(s=e.current)==null?void 0:s.querySelector(l)}const c5=new WeakMap;function iM(e){let t=_n();return c5.set(e,t),t}function oM(e){return c5.get(e)}const hv=1e3;function sM(e){let{keyboardDelegate:t,selectionManager:l,onTypeSelect:r}=e,i=y.useRef({search:"",timeout:void 0}),s=f=>{if(i.current.search.length>0&&f.key===" "){if(f.preventDefault(),(!("continuePropagation"in f)||"continuePropagation"in f&&!f.isPropagationStopped())&&f.stopPropagation(),i.current.search+=" ",t.getKeyForSearch!=null){let d=t.getKeyForSearch(i.current.search,l.focusedKey);d==null&&(d=t.getKeyForSearch(i.current.search)),d!=null&&(l.setFocusedKey(d),r&&r(d))}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search=""},hv)}},u=f=>{let d=cM(f.key);if(!(!d||f.ctrlKey||f.metaKey||f.altKey||!Ie(f.currentTarget,ve(f))||i.current.search.length===0&&d===" ")){if(i.current.search+=d,t.getKeyForSearch!=null){let h=t.getKeyForSearch(i.current.search,l.focusedKey);if(h==null&&(h=t.getKeyForSearch(i.current.search)),h!=null)l.setFocusedKey(h),r&&r(h),f.preventDefault(),"continuePropagation"in f||f.stopPropagation();else{i.current.search="",clearTimeout(i.current.timeout),i.current.timeout=void 0;return}}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search=""},hv)}};return y.useEffect(()=>{let f=i.current.timeout;return()=>{clearTimeout(f)}},[i]),{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:void 0,onKeyDown:t.getKeyForSearch?u:void 0}}}function cM(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function uM(e){var it;let{selectionManager:t,keyboardDelegate:l,ref:r,autoFocus:i=!1,shouldFocusWrap:s=!1,disallowEmptySelection:u=!1,disallowSelectAll:f=!1,escapeKeyBehavior:d="clearSelection",selectOnFocus:h=t.selectionBehavior==="replace",disallowTypeAhead:p=!1,shouldUseVirtualFocus:b,allowsTabNavigation:v=!1,scrollRef:w=r,linkBehavior:x="action",UNSTABLE_focusOnEntry:T}=e,{direction:C}=bi(),N=Go();const M=(ue,fe,Ee)=>{if(fe!=null){if(t.isLink(fe)&&x==="selection"&&h&&!bh(ue)){al.flushSync(()=>{t.setFocusedKey(fe,Ee)});let _e=A0(r,fe),Fe=t.getItemProps(fe);if(_e){N.open(_e,ue,Fe.href,Fe.routerOptions);return}return!1}if(t.setFocusedKey(fe,Ee),t.isLink(fe)&&x==="override")return!1;if(ue.shiftKey&&t.selectionMode==="multiple"){t.extendSelection(fe);return}else if(h&&!bh(ue)){t.replaceSelection(fe);return}}return!1};let L=ue=>{var fe,Ee,_e;if(l.getKeyBelow){let Fe=t.focusedKey!=null?(fe=l.getKeyBelow)==null?void 0:fe.call(l,t.focusedKey):(Ee=l.getFirstKey)==null?void 0:Ee.call(l);if(Fe==null&&s&&(Fe=(_e=l.getFirstKey)==null?void 0:_e.call(l,t.focusedKey)),Fe!=null){M(ue,Fe);return}}return!1},k=ue=>{var fe,Ee,_e;if(l.getKeyAbove){let Fe=t.focusedKey!=null?(fe=l.getKeyAbove)==null?void 0:fe.call(l,t.focusedKey):(Ee=l.getLastKey)==null?void 0:Ee.call(l);if(Fe==null&&s&&(Fe=(_e=l.getLastKey)==null?void 0:_e.call(l,t.focusedKey)),Fe!=null){M(ue,Fe);return}}return!1},B=ue=>{if(l.getFirstKey){if(t.focusedKey===null&&ue.shiftKey)return!1;let fe=l.getFirstKey(t.focusedKey,To(ue));if(t.setFocusedKey(fe),fe!=null){if(To(ue)&&ue.shiftKey&&t.selectionMode==="multiple"){t.extendSelection(fe);return}else if(h){t.replaceSelection(fe);return}}}return!1},G=ue=>{var fe,Ee,_e,Fe;if(l.getKeyLeftOf){let kt=t.focusedKey!=null?(fe=l.getKeyLeftOf)==null?void 0:fe.call(l,t.focusedKey):(Ee=l.getFirstKey)==null?void 0:Ee.call(l);if(kt==null&&s&&(kt=C==="rtl"?(_e=l.getFirstKey)==null?void 0:_e.call(l,t.focusedKey):(Fe=l.getLastKey)==null?void 0:Fe.call(l,t.focusedKey)),kt!=null){M(ue,kt,C==="rtl"?"first":"last");return}}return!1},$=ue=>{var fe,Ee,_e,Fe;if(l.getKeyRightOf){let kt=t.focusedKey!=null?(fe=l.getKeyRightOf)==null?void 0:fe.call(l,t.focusedKey):(Ee=l.getFirstKey)==null?void 0:Ee.call(l);if(kt==null&&s&&(kt=C==="rtl"?(_e=l.getLastKey)==null?void 0:_e.call(l,t.focusedKey):(Fe=l.getFirstKey)==null?void 0:Fe.call(l,t.focusedKey)),kt!=null){M(ue,kt,C==="rtl"?"last":"first");return}}return!1},A=ue=>{if(l.getLastKey){if(t.focusedKey===null&&ue.shiftKey)return!1;let fe=l.getLastKey(t.focusedKey,To(ue));if(t.setFocusedKey(fe),fe!=null){if(To(ue)&&ue.shiftKey&&t.selectionMode==="multiple"){t.extendSelection(fe);return}else if(h){t.replaceSelection(fe);return}}}return!1},U=ue=>{if(l.getKeyPageBelow&&t.focusedKey!=null){let fe=l.getKeyPageBelow(t.focusedKey);if(fe!=null)return M(ue,fe)}return!1},K=ue=>{if(l.getKeyPageAbove&&t.focusedKey!=null){let fe=l.getKeyPageAbove(t.focusedKey);if(fe!=null)return M(ue,fe)}return!1},q=()=>{if(t.selectionMode==="multiple"&&f!==!0){t.selectAll();return}return!1},te=()=>{if(d==="clearSelection"&&!u&&t.selectedKeys.size!==0){t.clearSelection();return}return!1},ne=()=>{if(!v&&r.current){let ue=ll(r.current,{tabbable:!0}),fe,Ee;do Ee=ue.lastChild(),Ee&&(fe=Ee);while(Ee);let _e=et();fe&&(!Oo(fe)||_e&&!_h(_e))&&en(fe)}return{shouldContinuePropagation:!0,shouldPreventDefault:!1}},j=()=>(!v&&r.current&&r.current.focus(),{shouldContinuePropagation:!0,shouldPreventDefault:!1}),Y=(ue,fe)=>({[Vn()?ue+"+Shift+Alt":ue+"+Shift+Control"]:fe,[ue+"+Shift"]:fe,[Vn()?ue+"+Alt":ue+"+Control"]:fe,[ue]:fe}),{keyboardProps:z}=lu({shortcuts:{...Y("ArrowDown",L),...Y("ArrowUp",k),...Y("ArrowLeft",G),...Y("ArrowRight",$),...Y("PageDown",U),...Y("PageUp",K)},allowRepeats:!0}),{keyboardProps:O}=lu({shortcuts:{...Y("Home",B),...Y("End",A),"Mod+A":q,Escape:te,Tab:ne,"Tab+Shift":j}}),oe=y.useRef({top:0,left:0});xc(w,"scroll",()=>{var ue,fe;oe.current={top:((ue=w.current)==null?void 0:ue.scrollTop)??0,left:((fe=w.current)==null?void 0:fe.scrollLeft)??0}});let J=ue=>{var _e,Fe,kt,Sn;if(t.isFocused){Ie(ue.currentTarget,ve(ue))||t.setFocused(!1);return}if(!Ie(ue.currentTarget,ve(ue)))return;let fe=pa();t.setFocused(!0);let Ee=pt=>{pt!=null&&(t.setFocusedKey(pt),h&&!t.isSelected(pt)&&t.replaceSelection(pt))};if(T&&(fe==="keyboard"||fe==="virtual"))Ee(T==="first"?(_e=l.getFirstKey)==null?void 0:_e.call(l):(Fe=l.getLastKey)==null?void 0:Fe.call(l));else if(t.focusedKey==null){let pt=ue.relatedTarget;pt&&ue.currentTarget.compareDocumentPosition(pt)&Node.DOCUMENT_POSITION_FOLLOWING?Ee(t.lastSelectedKey??((kt=l.getLastKey)==null?void 0:kt.call(l))):Ee(t.firstSelectedKey??((Sn=l.getFirstKey)==null?void 0:Sn.call(l)))}else w.current&&(w.current.scrollTop=oe.current.top,w.current.scrollLeft=oe.current.left);if(t.focusedKey!=null&&w.current){let pt=A0(r,t.focusedKey);pt instanceof HTMLElement&&(!Oo(pt)&&!b&&en(pt),(fe==="keyboard"||T&&fe==="virtual")&&xb(pt,{containingElement:r.current}))}},_=ue=>{Ie(ue.currentTarget,ue.relatedTarget)||t.setFocused(!1)},D=y.useRef(!1);xc(r,fw,b?ue=>{let{detail:fe}=ue;ue.stopPropagation(),t.setFocused(!0),(fe==null?void 0:fe.focusStrategy)==="first"&&(D.current=!0)}:void 0);let Q=((it=l.getFirstKey)==null?void 0:it.call(l))??null;yb(()=>{if(D.current)if(Q==null){let ue=et();a5(r.current),r5(ue,null),t.collection.size>0&&(D.current=!1)}else t.setFocusedKey(Q),D.current=!1},[Q,t.collection.size]),yb(()=>{t.collection.size>0&&(D.current=!1)},[t.focusedKey]),xc(r,uw,b?ue=>{var fe;ue.stopPropagation(),t.setFocused(!1),(fe=ue.detail)!=null&&fe.clearFocusKey&&t.setFocusedKey(null)}:void 0);const se=y.useRef(i),ce=y.useRef(!1);y.useEffect(()=>{var ue,fe;if(se.current){let Ee=null;i==="first"&&(Ee=((ue=l.getFirstKey)==null?void 0:ue.call(l))??null),i==="last"&&(Ee=((fe=l.getLastKey)==null?void 0:fe.call(l))??null);let _e=t.selectedKeys;if(_e.size){for(let Fe of _e)if(t.canSelectItem(Fe)){Ee=Fe;break}}t.setFocused(!0),t.setFocusedKey(Ee),Ee==null&&!b&&r.current&&va(r.current),t.collection.size>0&&(se.current=!1,ce.current=!0)}});let H=y.useRef(t.focusedKey),ie=y.useRef(null);y.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==H.current||ce.current)&&w.current&&r.current){let ue=pa(),fe=A0(r,t.focusedKey);if(!(fe instanceof HTMLElement))return;(ue==="keyboard"||ce.current)&&(ie.current&&cancelAnimationFrame(ie.current),ie.current=requestAnimationFrame(()=>{w.current&&(Hc(w.current,fe),ue!=="virtual"&&xb(fe,{containingElement:r.current}))}))}!b&&t.isFocused&&t.focusedKey==null&&H.current!=null&&r.current&&va(r.current),H.current=t.focusedKey,ce.current=!1}),y.useEffect(()=>()=>{ie.current&&cancelAnimationFrame(ie.current)},[]),xc(r,"react-aria-focus-scope-restore",ue=>{ue.preventDefault(),t.setFocused(!0)});let xe={...Ce(O,z),onFocus:J,onBlur:_,onMouseDown(ue){w.current===ve(ue)&&ue.preventDefault()}},{typeSelectProps:Ae}=sM({keyboardDelegate:l,selectionManager:t});p||(xe=Ce(Ae,xe));let de;b||(de=t.focusedKey==null?0:-1);let Lt=iM(t.collection);return{collectionProps:Ce(xe,{tabIndex:de,"data-collection":Lt})}}function fM(e){let{id:t,selectionManager:l,key:r,ref:i,shouldSelectOnPressUp:s,shouldUseVirtualFocus:u,focus:f,isDisabled:d,onAction:h,allowsDifferentPressOrigin:p,linkBehavior:b="action"}=e,v=Go();t=_n(t);let w=H=>{if(H.pointerType==="keyboard"&&bh(H))l.toggleSelection(r);else{if(l.selectionMode==="none")return;if(l.isLink(r)){if(b==="selection"&&i.current){let ie=l.getItemProps(r);v.open(i.current,H,ie.href,ie.routerOptions),l.setSelectedKeys(l.selectedKeys);return}else if(b==="override"||b==="none")return}l.selectionMode==="single"?l.isSelected(r)&&!l.disallowEmptySelection?l.toggleSelection(r):l.replaceSelection(r):H&&H.shiftKey?l.extendSelection(r):l.selectionBehavior==="toggle"||H&&(To(H)||H.pointerType==="touch"||H.pointerType==="virtual")?l.toggleSelection(r):l.replaceSelection(r)}};y.useEffect(()=>{r===l.focusedKey&&l.isFocused&&(u?a5(i.current):f?f():et()!==i.current&&i.current&&va(i.current))},[i,r,l.focusedKey,l.childFocusStrategy,l.isFocused,u]),d=d||l.isDisabled(r);let x={};!u&&!d?x={tabIndex:r===l.focusedKey?0:-1,onFocus(H){ve(H)===i.current&&l.setFocusedKey(r)}}:d&&(x.onMouseDown=H=>{H.preventDefault()}),y.useEffect(()=>{d&&l.focusedKey===r&&l.setFocusedKey(null)},[l,d,r]);let T=l.isLink(r)&&b==="override",C=h&&e.UNSTABLE_itemBehavior==="action",N=l.isLink(r)&&b!=="selection"&&b!=="none",M=!d&&l.canSelectItem(r)&&!T&&!C,L=(h||N)&&!d,k=L&&(l.selectionBehavior==="replace"?!M:!M||l.isEmpty),B=L&&M&&l.selectionBehavior==="replace",G=k||B,$=y.useRef(null),A=G&&M,U=y.useRef(!1),K=y.useRef(!1),q=l.getItemProps(r),te=H=>{var ie;h&&(h(),(ie=i.current)==null||ie.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}))),N&&i.current&&v.open(i.current,H,q.href,q.routerOptions)},ne={ref:i};s?(ne.onPressStart=H=>{$.current=H.pointerType,U.current=A,H.pointerType==="keyboard"&&(!G||pv(H.key))&&w(H)},p?(ne.onPressUp=k?void 0:H=>{H.pointerType==="mouse"&&M&&w(H)},ne.onPress=k?te:H=>{H.pointerType!=="keyboard"&&H.pointerType!=="mouse"&&M&&w(H)}):ne.onPress=H=>{if(k||B&&H.pointerType!=="mouse"){if(H.pointerType==="keyboard"&&!mv(H.key))return;te(H)}else H.pointerType!=="keyboard"&&M&&w(H)}):(ne.onPressStart=H=>{$.current=H.pointerType,U.current=A,K.current=k,M&&(H.pointerType==="mouse"&&!k||H.pointerType==="keyboard"&&(!L||pv(H.key)))&&w(H)},ne.onPress=H=>{(H.pointerType==="touch"||H.pointerType==="pen"||H.pointerType==="virtual"||H.pointerType==="keyboard"&&G&&mv(H.key)||H.pointerType==="mouse"&&K.current)&&(G?te(H):M&&w(H))});let j=oM(l.collection);if(x["data-collection"]=j,x["data-key"]=r,ne.preventFocusOnPress=u,u&&(ne=Ce(ne,{onPressStart(H){H.pointerType!=="touch"&&(l.setFocused(!0),l.setFocusedKey(r))},onPress(H){H.pointerType==="touch"&&(l.setFocused(!0),l.setFocusedKey(r))}})),q)for(let H of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])q[H]&&(ne[H]=er(ne[H],q[H]));let{pressProps:Y,isPressed:z}=lr(ne),O=B?H=>{$.current==="mouse"&&(H.stopPropagation(),H.preventDefault(),te(H))}:void 0,{longPressProps:oe}=aM({isDisabled:!A,onLongPress(H){H.pointerType==="touch"&&(w(H),l.setSelectionBehavior("toggle"))}}),J=H=>{$.current==="touch"&&U.current&&H.preventDefault()},_=b!=="none"&&l.isLink(r)?H=>{Al.isOpening||H.preventDefault()}:void 0,D=Ce(x,M||k||u&&!d?Y:{},A?oe:{},{onDoubleClick:O,onDragStartCapture:J,onClick:_,id:t},u?{onMouseDown:H=>H.preventDefault()}:void 0),Q=H=>{let ie=H;for(;ie&&ie!==i.current;){let xe=ie.getAttribute("data-collection");if(xe!=null)return xe!==j;ie=ie.parentElement}return _h(H)},se=D.onPointerDown;D.onPointerDown=H=>{let ie=ve(H);if(ie&&ie!==i.current&&Q(ie)){H.stopPropagation();return}se==null||se(H)};let ce=D.onMouseDown;return D.onMouseDown=H=>{let ie=ve(H);if(ie&&ie!==i.current&&Q(ie)){H.stopPropagation();return}ce==null||ce(H)},{itemProps:D,isPressed:z,isSelected:l.isSelected(r),isFocused:l.isFocused&&l.focusedKey===r,isDisabled:d,allowsSelection:M,hasAction:G}}function mv(e){return e==="Enter"}function pv(e){return e===" "}function dM(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function hM(e){return mM(e,0)}function mM(e,t){if(t<0)return;let l=0;for(let r of e){if(l===t)return r;l++}}function Ez(e){let t;for(let l of e)t=l;return t}function L0(e,t,l){if(t.parentKey===l.parentKey)return t.index-l.index;let r=[...gv(e,t),t],i=[...gv(e,l),l],s=r.slice(0,i.length).findIndex((u,f)=>u!==i[f]);return s!==-1?(t=r[s],l=i[s],t.index-l.index):r.findIndex(u=>u===l)>=0?1:(i.findIndex(u=>u===t)>=0,-1)}function gv(e,t){let l=[],r=t;for(;(r==null?void 0:r.parentKey)!=null;)r=e.getItem(r.parentKey),r&&l.unshift(r);return l}function pM(e){let t=a2(e),[l,r]=y.useState(null),[i,s]=y.useState([]),u=()=>{s([]),t.close()};return{focusStrategy:l,...t,open(h=null){r(h),t.open()},toggle(h=null){r(h),t.toggle()},close(){u()},expandedKeysStack:i,openSubmenu:(h,p)=>{s(b=>p>b.length?b:[...b.slice(0,p),h])},closeSubmenu:(h,p)=>{s(b=>b[p]===h?b.slice(0,p):b)}}}class Kn extends Set{constructor(t,l,r){super(t),t instanceof Kn?(this.anchorKey=l??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=l??null,this.currentKey=r??null)}}class r2{constructor(t,l,r){this.collection=t,this.state=l,this.allowsCellSelection=(r==null?void 0:r.allowsCellSelection)??!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null,this.fullCollection=(r==null?void 0:r.fullCollection)||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,l){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,l)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let l=this.getKey(t);return l==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(l):this.state.selectedKeys.has(l)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),l=this.state.selectedKeys;return this._isSelectAll=t.every(r=>l.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let l of this.state.selectedKeys){let r=this.collection.getItem(l);(!t||r&&L0(this.collection,r,t)<0)&&(t=r)}return(t==null?void 0:t.key)??null}get lastSelectedKey(){let t=null;for(let l of this.state.selectedKeys){let r=this.collection.getItem(l);(!t||r&&L0(this.collection,r,t)>0)&&(t=r)}return(t==null?void 0:t.key)??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let l=this.getKey(t);if(l==null)return;let r;if(this.state.selectedKeys==="all")r=new Kn([l],l,l);else{let i=this.state.selectedKeys,s=i.anchorKey??l;r=new Kn(i,s,l);for(let u of this.getKeyRange(s,i.currentKey??l))r.delete(u);for(let u of this.getKeyRange(l,s))this.canSelectItem(u)&&r.add(u)}this.state.setSelectedKeys(r)}getKeyRange(t,l){let r=this.collection.getItem(t),i=this.collection.getItem(l);return r&&i?L0(this.collection,r,i)<=0?this.getKeyRangeInternal(t,l):this.getKeyRangeInternal(l,t):[]}getKeyRangeInternal(t,l){var s;if((s=this.layoutDelegate)!=null&&s.getKeyRange)return this.layoutDelegate.getKeyRange(t,l);let r=[],i=t;for(;i!=null;){let u=this.collection.getItem(i);if(u&&(u.type==="item"||u.type==="cell"&&this.allowsCellSelection)&&r.push(i),i===l)return r;i=this.collection.getKeyAfter(i)}return[]}getKey(t){let l=this.collection.getItem(t);if(!l||l.type==="cell"&&this.allowsCellSelection)return t;for(;l&&l.type!=="item"&&l.parentKey!=null;)l=this.collection.getItem(l.parentKey);return!l||l.type!=="item"?null:l.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let l=this.getKey(t);if(l==null)return;let r=new Kn(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(l)?r.delete(l):this.canSelectItem(l)&&(r.add(l),r.anchorKey=l,r.currentKey=l),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode==="none")return;let l=this.getKey(t);if(l==null)return;let r=this.canSelectItem(l)?new Kn([l],l,l):new Kn;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode==="none")return;let l=new Kn;for(let r of t){let i=this.getKey(r);if(i!=null&&(l.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(l)}getSelectAllKeys(){let t=this.fullCollection??this.collection,l=[],r=i=>{var s;for(;i!=null;){if(this.canSelectItemIn(i,t)){let u=t.getItem(i);(u==null?void 0:u.type)==="item"&&l.push(i),u!=null&&u.hasChildNodes&&(this.allowsCellSelection||u.type!=="item")&&r(((s=hM(dM(u,t)))==null?void 0:s.key)??null)}i=t.getKeyAfter(i)}};return r(t.getFirstKey()),l}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Kn)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,l){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||l&&(l.pointerType==="touch"||l.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let l=this.selectedKeys;if(t.size!==l.size)return!1;for(let r of t)if(!l.has(r))return!1;for(let r of l)if(!t.has(r))return!1;return!0}canSelectItem(t){return this.canSelectItemIn(t,this.collection)}canSelectItemIn(t,l){var i;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=l.getItem(t);return!(!r||(i=r==null?void 0:r.props)!=null&&i.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var r,i;let l=this.collection.getItem(t);return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!((r=l==null?void 0:l.props)!=null&&r.isDisabled))&&((i=l==null?void 0:l.props)==null?void 0:i.disabledBehavior)!=="selection"}isLink(t){var l,r;return!!((r=(l=this.collection.getItem(t))==null?void 0:l.props)!=null&&r.href)}getItemProps(t){var l;return(l=this.collection.getItem(t))==null?void 0:l.props}withCollection(t){return new r2(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class gM{build(t,l){return this.context=l,bv(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:l,items:r}=t;if(V.isValidElement(l)&&l.type===V.Fragment)yield*this.iterateCollection({children:l.props.children,items:r});else if(typeof l=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let s of r)yield*this.getFullNode({value:s,index:i},{renderer:l}),i++}else{let i=[];V.Children.forEach(l,u=>{u&&i.push(u)});let s=0;for(let u of i){let f=this.getFullNode({element:u,index:s},{});for(let d of f)s++,yield d}}}getKey(t,l,r,i){if(t.key!=null)return t.key;if(l.type==="cell"&&l.key!=null)return`${i}${l.key}`;let s=l.value;if(s!=null){let u=s.key??s.id;if(u==null)throw new Error("No key found for item");return u}return i?`${i}.${l.index}`:`$.${l.index}`}getChildState(t,l){return{renderer:l.renderer||t.renderer}}*getFullNode(t,l,r,i){if(V.isValidElement(t.element)&&t.element.type===V.Fragment){let d=[];V.Children.forEach(t.element.props.children,p=>{d.push(p)});let h=t.index??0;for(const p of d)yield*this.getFullNode({element:p,index:h++},l,r,i);return}let s=t.element;if(!s&&t.value&&l&&l.renderer){let d=this.cache.get(t.value);if(d&&(!d.shouldInvalidate||!d.shouldInvalidate(this.context))){d.index=t.index,d.parentKey=i?i.key:null,yield d;return}s=l.renderer(t.value)}if(V.isValidElement(s)){let d=s.type;if(typeof d!="function"&&typeof d.getCollectionNode!="function"){let v=s.type;throw new Error(`Unknown element <${v}> in collection.`)}let h=d.getCollectionNode(s.props,this.context),p=t.index??0,b=h.next();for(;!b.done&&b.value;){let v=b.value;t.index=p;let w=v.key??null;w==null&&(w=v.element?null:this.getKey(s,t,l,r));let T=[...this.getFullNode({...v,key:w,index:p,wrapper:bM(t.wrapper,v.wrapper)},this.getChildState(l,v),r?`${r}${s.key}`:s.key,i)];for(let C of T){if(C.value=v.value??t.value??null,C.value&&this.cache.set(C.value,C),t.type&&C.type!==t.type)throw new Error(`Unsupported type <${k0(C.type)}> in <${k0((i==null?void 0:i.type)??"unknown parent type")}>. Only <${k0(t.type)}> is supported.`);p++,yield C}b=h.next(T)}return}if(t.key==null||t.type==null)return;let u=this,f={type:t.type,props:t.props,key:t.key,parentKey:i?i.key:null,value:t.value??null,level:((i==null?void 0:i.level)??0)+((i==null?void 0:i.type)==="item"?1:0),index:t.index,rendered:t.rendered,textValue:t.textValue??"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:bv(function*(){if(!t.hasChildNodes||!t.childNodes)return;let d=0;for(let h of t.childNodes()){h.key!=null&&(h.key=`${f.key}${h.key}`);let p=u.getFullNode({...h,index:d},u.getChildState(l,h),f.key,f);for(let b of p)d++,yield b}})};yield f}constructor(){this.cache=new WeakMap}}function bv(e){let t=[],l=null;return{*[Symbol.iterator](){for(let r of t)yield r;l||(l=e());for(let r of l)t.push(r),yield r}}}function bM(e,t){if(e&&t)return l=>e(t(l));if(e)return e;if(t)return t}function k0(e){return e[0].toUpperCase()+e.slice(1)}function vM(e,t,l){let r=y.useMemo(()=>new gM,[]),{children:i,items:s,collection:u}=e;return y.useMemo(()=>{if(u)return u;let d=r.build({children:i,items:s},l);return t(d)},[r,i,s,u,l,t])}function yM(e,t){if(e.size!==t.size)return!1;for(let l of e)if(!t.has(l))return!1;return!0}function xM(e){let{selectionMode:t="none",disallowEmptySelection:l=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:s="all"}=e,u=y.useRef(!1),[,f]=y.useState(!1),d=y.useRef(null),h=y.useRef(null),[,p]=y.useState(null),b=y.useMemo(()=>vv(e.selectedKeys),[e.selectedKeys]),v=y.useMemo(()=>vv(e.defaultSelectedKeys,new Kn),[e.defaultSelectedKeys]),[w,x]=Ru(b,v,e.onSelectionChange),T=y.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[C,N]=y.useState(i);i==="replace"&&C==="toggle"&&typeof w=="object"&&w.size===0&&N("replace");let M=y.useRef(i);return y.useEffect(()=>{i!==M.current&&(N(i),M.current=i)},[i]),{selectionMode:t,disallowEmptySelection:l,selectionBehavior:C,setSelectionBehavior:N,get isFocused(){return u.current},setFocused(L){u.current=L,f(L)},get focusedKey(){return d.current},get childFocusStrategy(){return h.current},setFocusedKey(L,k="first"){d.current=L,h.current=k,p(L)},selectedKeys:w,setSelectedKeys(L){(r||!yM(L,w))&&x(L)},disabledKeys:T,disabledBehavior:s}}function vv(e,t){return e?e==="all"?"all":new Kn(e):t}const SM=y.createContext(null),L2=class L2 extends vi{filter(t,l,r){let i=t.getItem(this.firstChildKey);if(i&&r(i.textValue,this)){let s=this.clone();return l.addDescendants(s,t),s}return null}};L2.type="submenutrigger";let yv=L2;function wM(e,t){let{role:l="dialog"}=e,r=Y0();r=e["aria-label"]?void 0:r;let i=Y0();i=l==="alertdialog"&&!e["aria-describedby"]?i:void 0;let s=y.useRef(!1);y.useEffect(()=>{if(t.current&&!Oo(t.current)){va(t.current);let f=setTimeout(()=>{(et()===t.current||et()===document.body)&&(s.current=!0,t.current&&(t.current.blur(),va(t.current)),s.current=!1)},500);return()=>{clearTimeout(f)}}},[t]),q4(),y.useRef(!1),y.useEffect(()=>{});let u=e["aria-describedby"]??i;return{dialogProps:{...mt(e,{labelable:!0}),role:l,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]??r,"aria-describedby":u,onBlur:f=>{s.current&&f.stopPropagation()}},titleProps:{id:r},contentProps:{id:i}}}const u5=y.createContext(null),yi=y.createContext(null);function EM(e){let t=pM(e),l=y.useRef(null),{triggerProps:r,overlayProps:i}=rM({type:"dialog"},t,l);return r.id=_n(),i["aria-labelledby"]=r.id,V.createElement(sr,{values:[[yi,t],[SM,t],[u5,i],[Y4,{trigger:"DialogTrigger",triggerRef:l,id:i.id,"aria-labelledby":i["aria-labelledby"]}]]},V.createElement(zR,{...r,ref:l,isPressed:t.isOpen},e.children))}const CM=y.forwardRef(function(t,l){let r=t["aria-labelledby"];[t,l]=yn(t,l,u5);let{dialogProps:i,titleProps:s,contentProps:u}=wM({...t,"aria-labelledby":r},l),f=y.useContext(yi);!i["aria-label"]&&!i["aria-labelledby"]&&t["aria-labelledby"]&&(i["aria-labelledby"]=t["aria-labelledby"]);let d=At({defaultClassName:"react-aria-Dialog",className:t.className,style:t.style,children:t.children,values:{close:(f==null?void 0:f.close)||(()=>{})}}),h=mt(t,{global:!0});return V.createElement(ut.section,{...Ce(h,d,i),render:t.render,ref:l,slot:t.slot||void 0},V.createElement(sr,{values:[[Z3,{slots:{[fi]:{},title:{...s,level:2}}}],[ku,{slots:{[fi]:{},description:u}}],[e2,{slots:{[fi]:{},close:{onPress:()=>f==null?void 0:f.close()}}}]]},d.children))});function TM(e,t,l){let{overlayProps:r,underlayProps:i}=o4({...e,isOpen:t.isOpen,onClose:t.close},l);return s4({isDisabled:!t.isOpen}),q4(),y.useEffect(()=>{if(t.isOpen&&l.current)return n4([l.current],{shouldUseInert:!0})},[t.isOpen,l]),{modalProps:Ce(r),underlayProps:i}}const RM=y.createContext(null),i2=y.createContext(null),MM=y.forwardRef(function(t,l){if(y.useContext(i2))return V.createElement(xv,{...t,modalRef:l},t.children);let{isDismissable:i,isKeyboardDismissDisabled:s,isOpen:u,defaultOpen:f,onOpenChange:d,children:h,isEntering:p,isExiting:b,UNSTABLE_portalContainer:v,shouldCloseOnInteractOutside:w,...x}=t;return V.createElement(f5,{isDismissable:i,isKeyboardDismissDisabled:s,isOpen:u,defaultOpen:f,onOpenChange:d,isEntering:p,isExiting:b,UNSTABLE_portalContainer:v,shouldCloseOnInteractOutside:w},V.createElement(xv,{...x,modalRef:l},h))});function AM(e,t){[e,t]=yn(e,t,RM);let l=y.useContext(yi),r=a2(e),i=e.isOpen!=null||e.defaultOpen!=null||!l?r:l,s=bn(t),u=y.useRef(null),f=Zc(s,i.isOpen),d=Zc(u,i.isOpen),h=f||d||e.isExiting||!1,p=Nl();return!i.isOpen&&!h||p?null:V.createElement(LM,{...e,state:i,isExiting:h,overlayRef:s,modalRef:u})}const f5=y.forwardRef(AM);function LM({UNSTABLE_portalContainer:e,...t}){let l=t.modalRef,{state:r}=t,{modalProps:i,underlayProps:s}=TM(t,r,l),u=wu(t.overlayRef)||t.isEntering||!1,f=At({...t,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:u,isExiting:t.isExiting,state:r}}),d=Xw(),h,p;if(typeof document<"u"){let v=jo(document.body)?document.body:document.scrollingElement||document.documentElement,w=v.getBoundingClientRect().width%1,x=v.getBoundingClientRect().height%1;h=v.scrollWidth-w,p=v.scrollHeight-x}let b={...f.style,"--visual-viewport-width":d.width+"px","--visual-viewport-height":d.height+"px","--page-width":h!==void 0?h+"px":void 0,"--page-height":p!==void 0?p+"px":void 0};return V.createElement(ph,{isExiting:t.isExiting,portalContainer:e},V.createElement(ut.div,{...Ce(mt(t,{global:!0}),s),...f,style:b,ref:t.overlayRef,"data-entering":u||void 0,"data-exiting":t.isExiting||void 0},V.createElement(sr,{values:[[i2,{modalProps:i,modalRef:l,isExiting:t.isExiting,isDismissable:t.isDismissable}],[yi,r]]},f.children)))}function xv(e){let{modalProps:t,modalRef:l,isExiting:r,isDismissable:i}=y.useContext(i2),s=y.useContext(yi),u=y.useMemo(()=>ya(e.modalRef,l),[e.modalRef,l]),f=bn(u),d=wu(f),h=At({...e,defaultClassName:"react-aria-Modal",values:{isEntering:d,isExiting:r,state:s}});return V.createElement(ut.div,{...Ce(mt(e,{global:!0}),t),...h,ref:f,"data-entering":d||void 0,"data-exiting":r||void 0},i&&V.createElement(mh,{onDismiss:s.close}),h.children)}const kM=V.forwardRef(({children:e,...t},l)=>{l=bn(l);let{pressProps:r}=lr({...t,ref:l}),{focusableProps:i}=qo(t,l),s=V.Children.only(e);y.useEffect(()=>{},[l,t.isDisabled]);let u=parseInt(V.version,10)<19?s.ref:s.props.ref;return V.cloneElement(s,{...Ce(r,i,s.props),ref:ya(u,l)})}),Sv=({children:e,className:t,slot:l,style:r,variant:i,...s})=>{const u=y.useMemo(()=>WC({variant:i}),[i]);return E.jsx(W3,{"aria-label":"Close",className:Mt(t,u),"data-slot":"close-button",slot:l,style:r,type:"button",...s,children:f=>typeof e=="function"?e(f):e??E.jsx(WT,{"data-slot":"close-button-icon"})})},d5=Object.assign(Sv,{Root:Sv}),NM=y.createContext({}),DM=y.forwardRef(function(t,l){[t,l]=yn(t,l,NM);let{isDisabled:r,isInvalid:i,isReadOnly:s,onHoverStart:u,onHoverChange:f,onHoverEnd:d,...h}=t;r??(r=!!t["aria-disabled"]&&t["aria-disabled"]!=="false"),i??(i=!!t["aria-invalid"]&&t["aria-invalid"]!=="false");let{hoverProps:p,isHovered:b}=Sa({onHoverStart:u,onHoverChange:f,onHoverEnd:d,isDisabled:r}),{isFocused:v,isFocusVisible:w,focusProps:x}=Dl({within:!0}),T=At({...t,values:{isHovered:b,isFocusWithin:v,isFocusVisible:w,isDisabled:r,isInvalid:i},defaultClassName:"react-aria-Group"});return V.createElement(ut.div,{...Ce(h,x,p),...T,ref:l,role:t.role??"group",slot:t.slot??void 0,"data-focus-within":v||void 0,"data-hovered":b||void 0,"data-focus-visible":w||void 0,"data-disabled":r||void 0,"data-invalid":i||void 0,"data-readonly":s||void 0},T.children)}),$M=y.createContext(null),h5={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},m5={...h5,customError:!0,valid:!1},ai={isInvalid:!1,validationDetails:h5,validationErrors:[]},zM=y.createContext({}),ou="__reactAriaFormValidationState";function p5(e){if(e[ou]){let{realtimeValidation:t,displayValidation:l,updateValidation:r,resetValidation:i,commitValidation:s}=e[ou];return{realtimeValidation:t,displayValidation:l,updateValidation:r,resetValidation:i,commitValidation:s}}return PM(e)}function PM(e){let{isInvalid:t,validationState:l,name:r,value:i,builtinValidation:s,validate:u,validationBehavior:f="aria"}=e;l&&(t||(t=l==="invalid"));let d=t!==void 0?{isInvalid:t,validationErrors:[],validationDetails:m5}:null,h=y.useMemo(()=>{if(!u||i==null)return null;let K=OM(u,i);return wv(K)},[u,i]);s!=null&&s.validationDetails.valid&&(s=void 0);let p=y.useContext(zM),b=y.useMemo(()=>r?Array.isArray(r)?r.flatMap(K=>vh(p[K])):vh(p[r]):[],[p,r]),[v,w]=y.useState(p),[x,T]=y.useState(!1);p!==v&&(w(p),T(!1));let C=y.useMemo(()=>wv(x?[]:b),[x,b]),N=y.useRef(ai),[M,L]=y.useState(ai),k=y.useRef(ai),B=()=>{if(!G)return;$(!1);let K=h||s||N.current;N0(K,k.current)||(k.current=K,L(K))},[G,$]=y.useState(!1);return y.useEffect(B),{realtimeValidation:d||C||h||s||ai,displayValidation:f==="native"?d||C||M:d||C||h||s||M,updateValidation(K){f==="aria"&&!N0(M,K)?L(K):N.current=K},resetValidation(){let K=ai;N0(K,k.current)||(k.current=K,L(K)),f==="native"&&$(!1),T(!0)},commitValidation(){f==="native"&&$(!0),T(!0)}}}function vh(e){return e?Array.isArray(e)?e:[e]:[]}function OM(e,t){if(typeof e=="function"){let l=e(t);if(l&&typeof l!="boolean")return vh(l)}return[]}function wv(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:m5}:null}function N0(e,t){return e===t?!0:!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((l,r)=>l===t.validationErrors[r])&&Object.entries(e.validationDetails).every(([l,r])=>t.validationDetails[l]===r)}const jM=y.createContext(null);class Ev{constructor(t){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t;let l=u=>{if(this.keyMap.set(u.key,u),u.childNodes&&u.type==="section")for(let f of u.childNodes)l(f)};for(let u of t)l(u);let r=null,i=0,s=0;for(let[u,f]of this.keyMap)r?(r.nextKey=u,f.prevKey=r.key):(this.firstKey=u,f.prevKey=void 0),f.type==="item"&&(f.index=i++),(f.type==="section"||f.type==="item")&&s++,r=f,r.nextKey=void 0;this._size=s,this.lastKey=(r==null?void 0:r.key)??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let l=this.keyMap.get(t);return l?l.prevKey??null:null}getKeyAfter(t){let l=this.keyMap.get(t);return l?l.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){return this.keyMap.get(t)??null}at(t){const l=[...this.getKeys()];return this.getItem(l[t])}getChildren(t){let l=this.keyMap.get(t);return(l==null?void 0:l.childNodes)||[]}}function IM(e){let{filter:t,layoutDelegate:l}=e,r=xM(e),i=y.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),s=y.useCallback(h=>t?new Ev(t(h)):new Ev(h),[t]),u=y.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),f=vM(e,s,u),d=y.useMemo(()=>new r2(f,r,{layoutDelegate:l}),[f,r,l]);return g5(f,d),{collection:f,disabledKeys:i,selectionManager:d}}function Cz(e,t){let l=y.useMemo(()=>t?e.collection.filter(t):e.collection,[e.collection,t]),r=e.selectionManager.withCollection(l);return g5(l,r),{collection:l,selectionManager:r,disabledKeys:e.disabledKeys}}function g5(e,t){const l=y.useRef(null);y.useEffect(()=>{if(t.focusedKey!=null&&!e.getItem(t.focusedKey)&&l.current){let r=l.current.getKeyAfter(t.focusedKey),i=null;for(;r!=null;){let s=e.getItem(r);if(s&&s.type==="item"&&!t.isDisabled(r)){i=r;break}r=l.current.getKeyAfter(r)}if(i==null)for(r=l.current.getKeyBefore(t.focusedKey);r!=null;){let s=e.getItem(r);if(s&&s.type==="item"&&!t.isDisabled(r)){i=r;break}r=l.current.getKeyBefore(r)}t.setFocusedKey(i)}l.current=e},[e,t])}function BM(e,t,l){let{validationBehavior:r,focus:i}=e;Ne(()=>{if(r==="native"&&(l!=null&&l.current)&&"setCustomValidity"in l.current&&!l.current.disabled){let h=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";l.current.setCustomValidity(h),l.current.hasAttribute("title")||(l.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation(KM(l.current))}});let s=y.useRef(!1),u=Fn(()=>{s.current||t.resetValidation()}),f=Fn(h=>{var b,v;t.displayValidation.isInvalid||t.commitValidation();let p=(b=l==null?void 0:l.current)==null?void 0:b.form;!h.defaultPrevented&&l&&p&&UM(p)===l.current&&(i?i():(v=l.current)==null||v.focus(),yT("keyboard")),h.preventDefault()}),d=Fn(()=>{t.commitValidation()});y.useEffect(()=>{let h=l==null?void 0:l.current;if(!h)return;let p=h.form,b=p==null?void 0:p.reset;return p&&(p.reset=()=>{s.current=!window.event||window.event.type==="message"&&ve(window.event)instanceof MessagePort,b==null||b.call(p),s.current=!1}),h.addEventListener("invalid",f),h.addEventListener("change",d),p==null||p.addEventListener("reset",u),()=>{h.removeEventListener("invalid",f),h.removeEventListener("change",d),p==null||p.removeEventListener("reset",u),p&&(p.reset=b)}},[l,r])}function HM(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function KM(e){return{isInvalid:!e.validity.valid,validationDetails:HM(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function UM(e){var t;for(let l=0;l<e.elements.length;l++){let r=e.elements[l];if(((t=r.validity)==null?void 0:t.valid)===!1)return r}return null}function FM(e,t=[]){let l=[];function r(s,u){const f=y.createContext(u);f.displayName=s+"Context";const d=l.length;l=[...l,u];const h=b=>{var N;const{scope:v,children:w,...x}=b,T=((N=v==null?void 0:v[e])==null?void 0:N[d])||f,C=y.useMemo(()=>x,Object.values(x));return E.jsx(T.Provider,{value:C,children:w})};h.displayName=s+"Provider";function p(b,v){var T;const w=((T=v==null?void 0:v[e])==null?void 0:T[d])||f,x=y.useContext(w);if(x)return x;if(u!==void 0)return u;throw new Error(`\`${b}\` must be used within \`${s}\``)}return[h,p]}const i=()=>{const s=l.map(u=>y.createContext(u));return function(f){const d=(f==null?void 0:f[e])||s;return y.useMemo(()=>({[`__scope${e}`]:{...f,[e]:d}}),[f,d])}};return i.scopeName=e,[r,VM(i,...t)]}function VM(...e){const t=e[0];if(e.length===1)return t;const l=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const u=r.reduce((f,{useScope:d,scopeName:h})=>{const b=d(s)[`__scope${h}`];return{...f,...b}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return l.scopeName=t.scopeName,l}function _M(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...l)=>{var r;return(r=t.current)==null?void 0:r.call(t,...l)},[])}var yh=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{};function Cv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function GM(...e){return t=>{let l=!1;const r=e.map(i=>{const s=Cv(i,t);return!l&&typeof s=="function"&&(l=!0),s});if(l)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():Cv(e[i],null)}}}}var qM=Symbol.for("react.lazy"),su=s8[" use ".trim().toString()];function YM(e){return typeof e=="object"&&e!==null&&"then"in e}function b5(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===qM&&"_payload"in e&&YM(e._payload)}function XM(e){const t=WM(e),l=y.forwardRef((r,i)=>{let{children:s,...u}=r;b5(s)&&typeof su=="function"&&(s=su(s._payload));const f=y.Children.toArray(s),d=f.find(QM);if(d){const h=d.props.children,p=f.map(b=>b===d?y.Children.count(h)>1?y.Children.only(null):y.isValidElement(h)?h.props.children:null:b);return E.jsx(t,{...u,ref:i,children:y.isValidElement(h)?y.cloneElement(h,void 0,p):null})}return E.jsx(t,{...u,ref:i,children:s})});return l.displayName=`${e}.Slot`,l}function WM(e){const t=y.forwardRef((l,r)=>{let{children:i,...s}=l;if(b5(i)&&typeof su=="function"&&(i=su(i._payload)),y.isValidElement(i)){const u=eA(i),f=JM(s,i.props);return i.type!==y.Fragment&&(f.ref=r?GM(r,u):u),y.cloneElement(i,f)}return y.Children.count(i)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ZM=Symbol("radix.slottable");function QM(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ZM}function JM(e,t){const l={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?l[r]=(...f)=>{const d=s(...f);return i(...f),d}:i&&(l[r]=i):r==="style"?l[r]={...i,...s}:r==="className"&&(l[r]=[i,s].filter(Boolean).join(" "))}return{...e,...l}}function eA(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,l=t&&"isReactWarning"in t&&t.isReactWarning;return l?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,l=t&&"isReactWarning"in t&&t.isReactWarning,l?e.props.ref:e.props.ref||e.ref)}var tA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],o2=tA.reduce((e,t)=>{const l=XM(`Primitive.${t}`),r=y.forwardRef((i,s)=>{const{asChild:u,...f}=i,d=u?l:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(d,{...f,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function nA(){return Lu.useSyncExternalStore(lA,()=>!0,()=>!1)}function lA(){return()=>{}}var s2="Avatar",[aA]=FM(s2),[rA,v5]=aA(s2),y5=y.forwardRef((e,t)=>{const{__scopeAvatar:l,...r}=e,[i,s]=y.useState("idle");return E.jsx(rA,{scope:l,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:E.jsx(o2.span,{...r,ref:t})})});y5.displayName=s2;var x5="AvatarImage",S5=y.forwardRef((e,t)=>{const{__scopeAvatar:l,src:r,onLoadingStatusChange:i=()=>{},...s}=e,u=v5(x5,l),f=iA(r,s),d=_M(h=>{i(h),u.onImageLoadingStatusChange(h)});return yh(()=>{f!=="idle"&&d(f)},[f,d]),f==="loaded"?E.jsx(o2.img,{...s,ref:t,src:r}):null});S5.displayName=x5;var w5="AvatarFallback",E5=y.forwardRef((e,t)=>{const{__scopeAvatar:l,delayMs:r,...i}=e,s=v5(w5,l),[u,f]=y.useState(r===void 0);return y.useEffect(()=>{if(r!==void 0){const d=window.setTimeout(()=>f(!0),r);return()=>window.clearTimeout(d)}},[r]),u&&s.imageLoadingStatus!=="loaded"?E.jsx(o2.span,{...i,ref:t}):null});E5.displayName=w5;function Tv(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function iA(e,{referrerPolicy:t,crossOrigin:l}){const r=nA(),i=y.useRef(null),s=r?(i.current||(i.current=new window.Image),i.current):null,[u,f]=y.useState(()=>Tv(s,e));return yh(()=>{f(Tv(s,e))},[s,e]),yh(()=>{const d=b=>()=>{f(b)};if(!s)return;const h=d("loaded"),p=d("error");return s.addEventListener("load",h),s.addEventListener("error",p),t&&(s.referrerPolicy=t),typeof l=="string"&&(s.crossOrigin=l),()=>{s.removeEventListener("load",h),s.removeEventListener("error",p)}},[s,l,t]),u}var oA=y5,sA=S5,cA=E5;const c2=y.createContext({}),Rv=({children:e,className:t,color:l,size:r,variant:i,...s})=>{const u=V.useMemo(()=>GC({color:l,size:r,variant:i}),[l,r,i]);return E.jsx(c2,{value:{slots:u},children:E.jsx(oA,{className:u.base({className:t}),...s,children:e})})},uA=({className:e,crossOrigin:t,loading:l,onError:r,onLoad:i,sizes:s,src:u,srcSet:f,...d})=>{const{slots:h}=V.use(c2);return E.jsx(sA,{className:Je(h==null?void 0:h.image,e),crossOrigin:t,loading:l,sizes:s,src:u,srcSet:f,onError:r,onLoad:i,...d})},fA=({className:e,color:t,...l})=>{const{slots:r}=V.use(c2);return E.jsx(cA,{className:Je(r==null?void 0:r.fallback,e,{color:t}),"data-slot":"avatar-fallback",...l})},D0=Object.assign(Rv,{Root:Rv,Image:uA,Fallback:fA});function dA(e,t){let{elementType:l="a",onPress:r,onPressStart:i,onPressEnd:s,onPressChange:u,onClick:f,isDisabled:d,...h}=e,p={};l!=="a"&&(p={role:"link",tabIndex:d?void 0:0});let{focusableProps:b}=qo(e,t),{pressProps:v,isPressed:w}=lr({onPress:r,onPressStart:i,onPressEnd:s,onPressChange:u,onClick:f,isDisabled:d,ref:t}),x=mt(h,{labelable:!0}),T=Ce(b,v),C=Go(),N=Qy(e);return{isPressed:w,linkProps:Ce(x,N,{...T,...p,"aria-disabled":d||void 0,"aria-current":e["aria-current"],onClick:M=>{var L;(L=v.onClick)==null||L.call(v,M),ww(M,C,e.href,e.routerOptions)}})}}const hA=y.createContext(null),mA=y.forwardRef(function(t,l){[t,l]=yn(t,l,hA);let r=t.href&&!t.isDisabled?"a":"span",{linkProps:i,isPressed:s}=dA({...t,elementType:r},l),u=ut[r],{hoverProps:f,isHovered:d}=Sa(t),{focusProps:h,isFocused:p,isFocusVisible:b}=Dl(),v=At({...t,defaultClassName:"react-aria-Link",values:{isCurrent:!!t["aria-current"],isDisabled:t.isDisabled||!1,isPressed:s,isHovered:d,isFocused:p,isFocusVisible:b}}),w=mt(t,{global:!0});return delete w.onClick,V.createElement(u,{ref:l,slot:t.slot||void 0,...Ce(w,v,i,f,h),"data-focused":p||void 0,"data-hovered":d||void 0,"data-pressed":s||void 0,"data-focus-visible":b||void 0,"data-current":!!t["aria-current"]||void 0,"data-disabled":t.isDisabled||void 0},v.children)}),C5=y.createContext({}),Mv=({children:e,className:t,...l})=>{const r=V.useMemo(()=>ZC(),[]);return E.jsx(C5,{value:{slots:r},children:E.jsx(mA,{"data-slot":"link",...l,className:Mt(t,r==null?void 0:r.base()),children:i=>E.jsx(E.Fragment,{children:typeof e=="function"?e(i):e})})})},pA=({children:e,className:t,...l})=>{const{slots:r}=y.use(C5);return E.jsx(Ct.span,{className:Je(r==null?void 0:r.icon,t),"data-default-icon":ch(!e),"data-slot":"link-icon",...l,children:e??E.jsx(XT,{"data-slot":"link-default-icon"})})},Nc=Object.assign(Mv,{Root:Mv,Icon:pA}),gA=y.createContext({});function T5(e={}){let{isReadOnly:t}=e,[l,r]=Ru(e.isSelected,e.defaultSelected||!1,e.onChange),[i]=y.useState(l);function s(f){t||r(f)}function u(){t||r(!l)}return{isSelected:l,defaultSelected:e.defaultSelected??i,setSelected:s,toggle:u}}const u2=y.createContext({}),R5="__button_group_child",Tz=({children:e,className:t,fullWidth:l,isDisabled:r,orientation:i,size:s,variant:u,...f})=>{const d=Cu(gA),h=i??(d==null?void 0:d.orientation)??"horizontal",p=V.useMemo(()=>YC({fullWidth:l,orientation:h}),[l,h]),b=y.Children.map(e,v=>y.isValidElement(v)?V.cloneElement(v,{[R5]:!0}):v);return E.jsx(u2,{value:{slots:p,size:s,variant:u,isDisabled:r,fullWidth:l},children:E.jsx(DM,{className:Mt(t,p.base()),"data-slot":"button-group",isDisabled:r,...f,children:b})})},Rz=({className:e,...t})=>{const{slots:l}=y.use(u2);return E.jsx(Ct.span,{"aria-hidden":"true",className:Je(l==null?void 0:l.separator,e),"data-slot":"button-group-separator",...t})},Av=({children:e,className:t,fullWidth:l,isDisabled:r,isIconOnly:i,size:s,slot:u,style:f,variant:d,[R5]:h,...p})=>{const b=y.use(u2),v=h===!0,w=s??(v?b==null?void 0:b.size:void 0),x=d??(v?b==null?void 0:b.variant:void 0),T=r??(v?b==null?void 0:b.isDisabled:void 0),C=l??(v?b==null?void 0:b.fullWidth:void 0),N=qC({fullWidth:C,isIconOnly:i,size:w,variant:x});return E.jsx(W3,{className:Mt(t,N),"data-slot":"button",isDisabled:T,slot:u,style:f,...p,children:M=>typeof e=="function"?e(M):e})},mn=Object.assign(Av,{Root:Av}),bA=new WeakMap;function vA(e=!0){let[t,l]=y.useState(e),r=y.useRef(!1),i=y.useCallback(s=>{r.current=!0,l(!!s)},[]);return Ne(()=>{r.current||l(!1)},[]),[i,t]}function Lv(e=!0){let t=_n(),[l,r]=vA(e);return{id:r?t:void 0,ref:l}}function yA(e,t,l){let{isDisabled:r=!1,isReadOnly:i=!1,value:s,name:u,form:f,children:d,isRequired:h,validationBehavior:p="aria","aria-label":b,"aria-labelledby":v,"aria-describedby":w,onPressStart:x,onPressEnd:T,onPressChange:C,onPress:N,onPressUp:M,onClick:L}=e,k=p5({...e,value:t.isSelected}),{isInvalid:B,validationErrors:G,validationDetails:$}=k.displayValidation;BM(e,k,l);let A=J=>{J.stopPropagation(),t.setSelected(ve(J).checked)},{pressProps:U,isPressed:K}=lr({onPressStart:x,onPressEnd:T,onPressChange:C,onPress:N,onPressUp:M,onClick:L,isDisabled:r}),[q,te]=y.useState(!1),{pressProps:ne}=lr({onPressStart(J){if(J.pointerType==="keyboard"||J.pointerType==="virtual"){J.continuePropagation();return}x==null||x(J),C==null||C(!0),te(!0)},onPressEnd(J){if(J.pointerType==="keyboard"||J.pointerType==="virtual"){J.continuePropagation();return}T==null||T(J),C==null||C(!1),te(!1)},onPressUp(J){if(J.pointerType==="keyboard"||J.pointerType==="virtual"){J.continuePropagation();return}M==null||M(J)},onClick:L,onPress(J){var Q;if(J.pointerType==="keyboard"||J.pointerType==="virtual"){J.continuePropagation();return}N==null||N(J),t.toggle(),(Q=l.current)==null||Q.focus();let{[ou]:_}=e,{commitValidation:D}=_||k;D()},isDisabled:r||i}),{focusableProps:j}=qo(e,l),Y=Ce(U,j),z=mt(e,{labelable:!0});Jw(l,t.defaultSelected,t.setSelected);let O=Lv(),oe=Lv();return{labelProps:Ce(ne,{onClick:J=>J.preventDefault()}),inputProps:Ce(z,{checked:t.isSelected,"aria-required":h&&p==="aria"||void 0,required:h&&p==="native","aria-invalid":B||e.validationState==="invalid"||void 0,"aria-errormessage":e["aria-errormessage"],"aria-controls":e["aria-controls"],"aria-readonly":i||void 0,"aria-describedby":[O.id,oe.id,w].filter(Boolean).join(" ")||void 0,onChange:A,disabled:r,...s==null?{}:{value:s},name:u,form:f,type:"checkbox",...Y}),descriptionProps:O,errorMessageProps:oe,isSelected:t.isSelected,isPressed:K||q,isDisabled:r,isReadOnly:i,isInvalid:B||e.validationState==="invalid",validationErrors:G,validationDetails:$}}function M5(e,t,l){let{labelProps:r,inputProps:i,descriptionProps:s,errorMessageProps:u,isSelected:f,isPressed:d,isDisabled:h,isReadOnly:p,isInvalid:b,validationErrors:v,validationDetails:w}=yA(e,t,l),{isIndeterminate:x}=e;return y.useEffect(()=>{l.current&&(l.current.indeterminate=!!x)}),{labelProps:Ce(r,y.useMemo(()=>({onMouseDown:T=>T.preventDefault()}),[])),inputProps:i,descriptionProps:s,errorMessageProps:u,isSelected:f,isPressed:d,isDisabled:h,isReadOnly:p,isInvalid:b,validationErrors:v,validationDetails:w}}function xA(e,t,l){const r=T5({isReadOnly:e.isReadOnly||t.isReadOnly,isSelected:t.isSelected(e.value),defaultSelected:t.defaultValue.includes(e.value),onChange(T){T?t.addValue(e.value):t.removeValue(e.value),e.onChange&&e.onChange(T)}});let{name:i,form:s,descriptionId:u,errorMessageId:f,validationBehavior:d}=bA.get(t);d=e.validationBehavior??d;let{realtimeValidation:h}=p5({...e,value:r.isSelected,name:void 0,validationBehavior:"aria"}),p=y.useRef(ai),b=()=>{t.setInvalid(e.value,h.isInvalid?h:p.current)};y.useEffect(b);let v=t.realtimeValidation.isInvalid?t.realtimeValidation:h,w=d==="native"?t.displayValidation:v,x=M5({...e,isReadOnly:e.isReadOnly||t.isReadOnly,isDisabled:e.isDisabled||t.isDisabled,name:e.name||i,form:e.form||s,isRequired:e.isRequired??t.isRequired,validationBehavior:d,[ou]:{realtimeValidation:v,displayValidation:w,resetValidation:t.resetValidation,commitValidation:t.commitValidation,updateValidation(T){p.current=T,b()}}},r,l);return{...x,inputProps:{...x.inputProps,"aria-describedby":[x.inputProps["aria-describedby"],t.isInvalid?f:null,u].filter(Boolean).join(" ")||void 0}}}const Mz=y.createContext(null),SA=y.createContext(null),A5=y.createContext(null),L5=y.createContext(null),wA=y.forwardRef(function(t,l){let{inputRef:r=null,...i}=t;[t,l]=yn(i,l,SA);let s=y.useContext(A5),[u,f]=EA(t,r),{descriptionProps:d,errorMessageProps:h,isSelected:p,isDisabled:b,isReadOnly:v,isInvalid:w,validationDetails:x,validationErrors:T}=u,C=At({...t,defaultClassName:"react-aria-CheckboxField",values:{isSelected:p,isIndeterminate:t.isIndeterminate||!1,isDisabled:b,isReadOnly:v,isInvalid:w,isRequired:t.isRequired||!1}}),N=mt(t,{global:!0});return delete N.id,delete N.onClick,V.createElement(ut.div,{...Ce(N,C),ref:l,slot:t.slot||void 0,"data-selected":p||void 0,"data-indeterminate":t.isIndeterminate||void 0,"data-disabled":b||void 0,"data-readonly":v||void 0,"data-invalid":w||void 0,"data-required":t.isRequired||void 0},V.createElement(sr,{values:[[L5,{...u,inputRef:f,defaultClassName:"react-aria-CheckboxButton",isIndeterminate:t.isIndeterminate,isRequired:t.isRequired}],[ku,{slots:{description:d,errorMessage:h}}],[$M,s?null:{isInvalid:w,validationDetails:x,validationErrors:T}]]},C.children))});function EA(e,t){let{validationBehavior:l}=Cu(jM)||{},r=e.validationBehavior??l??"native",i=y.useContext(A5),s=bn(y.useMemo(()=>ya(t,e.inputRef!==void 0?e.inputRef:null),[t,e.inputRef])),u={...aT(e),children:typeof e.children=="function"?!0:e.children,value:e.value,validationBehavior:r};return[i?xA(u,i,s):M5(u,T5(e),s),s]}const CA=y.forwardRef(function(t,l){let{labelProps:r,inputProps:i,isSelected:s,isDisabled:u,isReadOnly:f,isPressed:d,isInvalid:h,inputRef:p,defaultClassName:b,isIndeterminate:v,isRequired:w}=y.useContext(L5),{isFocused:x,isFocusVisible:T,focusProps:C}=Dl(),N=u||f,{hoverProps:M,isHovered:L}=Sa({...t,isDisabled:N}),k=At({...t,defaultClassName:b,values:{isSelected:s,isIndeterminate:v||!1,isPressed:d,isHovered:L,isFocused:x,isFocusVisible:T,isDisabled:u,isReadOnly:f,isInvalid:h,isRequired:w||!1}}),B=mt(t,{global:!0});return delete B.id,delete B.onClick,V.createElement(ut.label,{...Ce(B,r,M,k),ref:l,slot:t.slot||void 0,"data-selected":s||void 0,"data-indeterminate":v||void 0,"data-pressed":d||void 0,"data-hovered":L||void 0,"data-focused":x||void 0,"data-focus-visible":T||void 0,"data-disabled":u||void 0,"data-readonly":f||void 0,"data-invalid":h||void 0,"data-required":w||void 0},V.createElement(V4,{elementType:"span"},V.createElement("input",{...Ce(i,C),ref:p})),k.children)}),TA=y.createContext({}),Nu=y.createContext({}),xh=({children:e,className:t,variant:l,...r})=>{const i=y.use(TA),s=l??i.variant,u=V.useMemo(()=>XC({variant:s}),[s]);return E.jsx(wA,{"data-slot":"checkbox",...r,className:Mt(t,u.base()),children:f=>E.jsx(Nu,{value:{slots:u,state:f},children:typeof e=="function"?e(f):e})})};xh.displayName="HeroUI.Checkbox";const k5=({children:e,className:t,...l})=>{const{slots:r}=y.use(Nu);return E.jsx(CA,{"data-slot":"checkbox-content",...l,className:Mt(t,r==null?void 0:r.content()),children:e})};k5.displayName="HeroUI.Checkbox.Content";const N5=({children:e,className:t,...l})=>{const{slots:r}=y.use(Nu);return E.jsx(Ct.span,{className:Je(r==null?void 0:r.control,t),"data-slot":"checkbox-control",...l,children:e})};N5.displayName="HeroUI.Checkbox.Control";const D5=({children:e,className:t,...l})=>{const{slots:r,state:i}=y.use(Nu),s=i==null?void 0:i.isSelected,u=i==null?void 0:i.isIndeterminate,f=typeof e=="function"?e(i??{}):e||(u?E.jsx("svg",{"aria-hidden":"true","data-slot":"checkbox-default-indicator--indeterminate",fill:"none",role:"presentation",stroke:"currentColor",strokeLinecap:"round",strokeWidth:3,viewBox:"0 0 24 24",children:E.jsx("line",{x1:"21",x2:"3",y1:"12",y2:"12"})}):E.jsx("svg",{"aria-hidden":"true","data-slot":"checkbox-default-indicator--checkmark",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:s?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 17 18",children:E.jsx("polyline",{points:"1 9 7 14 15 4"})}));return E.jsx(Ct.span,{"aria-hidden":"true",className:Je(r==null?void 0:r.indicator,t),"data-slot":"checkbox-indicator",...l,children:f})};D5.displayName="HeroUI.Checkbox.Indicator";const ha=Object.assign(xh,{Root:xh,Content:k5,Control:N5,Indicator:D5}),ri={blue:"\x1B[34m",green:"\x1B[32m",magenta:"\x1B[35m",red:"\x1B[31m",reset:"\x1B[0m",yellow:"\x1B[33m"},RA={debug:ri.magenta,error:ri.red,info:ri.blue,success:ri.green,warn:ri.yellow},MA={debug:"🔍",error:"❌",info:"ℹ️",success:"✅",warn:"⚠️"};class AA{constructor(t={}){this.enabled=t.enabled??!0,this.prefix=t.prefix??"HeroUI"}formatMessage(t,l){const r=RA[t],i=MA[t];return`${r}[${this.prefix}]${ri.reset} ${i} ${l}`}log(t,l,...r){if(!this.enabled)return;const i=this.formatMessage(t,l);switch(t){case"error":console.error(i,...r);break;case"warn":console.warn(i,...r);break;default:console.log(i,...r)}}info(t,...l){this.log("info",t,...l)}success(t,...l){this.log("success",t,...l)}warn(t,...l){this.log("warn",t,...l)}error(t,...l){this.log("error",t,...l)}debug(t,...l){this.log("debug",t,...l)}divider(t="=",l=80){this.enabled&&console.log(t.repeat(l))}newline(){this.enabled&&console.log()}}new AA({prefix:"HeroUI"});const LA=e=>{const t=`$$heroui.collection.${e}`,l=y.createContext(void 0),r=(d,h)=>y.Children.map(d,p=>y.isValidElement(p)?V.cloneElement(p,{[t]:h}):p),i=d=>{const{[t]:h,...p}=d;return[h,p]},s=d=>{const[h,p]=i(d),b=y.useContext(l);return[h??b,p]},u=({children:d,...h})=>E.jsx(l.Provider,{value:h,children:r(d,h)});return u.displayName=`HeroUI.CollectionSlot(${e})`,{key:t,inject:r,consume:i,useSlot:s,Injector:u,withSlot:(d,h)=>{const p=y.forwardRef(function(v,w){const[x,T]=s(v),{children:C,...N}=T;if(!x)return E.jsx(d,{...N,ref:w,children:C});if(h)return h({...N,children:C},x,w);const{className:M,render:L,...k}=x;return E.jsx(d,{...N,ref:w,children:L?L({children:C,className:M,...k}):E.jsx("div",{className:M,"data-slot":`${e}-container`,...k,children:C})})});return p.displayName=`HeroUI.withCollectionSlot(${d.displayName||d.name||e})`,p},Context:l}},kA=e=>{const{containerRef:t,isEnabled:l,offset:r,onVisibilityChange:i,orientation:s,visibility:u}=e,f=y.useRef(null),d=y.useRef(null),h=y.useCallback(()=>{const p=t.current;if(!p)return;const b=s==="vertical",v=b?p.scrollTop:Math.abs(p.scrollLeft),w=b?p.scrollHeight:p.scrollWidth,x=b?p.clientHeight:p.clientWidth,T=v>r,C=v+x+r<w-1,N=f.current;N&&N.hasScrollBefore===T&&N.hasScrollAfter===C||(f.current={hasScrollBefore:T,hasScrollAfter:C},d.current!==null&&cancelAnimationFrame(d.current),d.current=requestAnimationFrame(()=>{d.current=null,b?T&&C?(p.dataset.topBottomScroll="true",delete p.dataset.topScroll,delete p.dataset.bottomScroll,i==null||i("both")):(p.dataset.topScroll=String(T),p.dataset.bottomScroll=String(C),delete p.dataset.topBottomScroll,i&&i(T?"top":C?"bottom":"none")):T&&C?(p.dataset.leftRightScroll="true",delete p.dataset.leftScroll,delete p.dataset.rightScroll,i==null||i("both")):(p.dataset.leftScroll=String(T),p.dataset.rightScroll=String(C),delete p.dataset.leftRightScroll,i&&i(T?"left":C?"right":"none"))}))},[t,s,r,i]);y.useEffect(()=>{const p=t.current;if(!p||!l||u!=="auto")return;h(),p.addEventListener("scroll",h,{passive:!0});const b=new ResizeObserver(h);return b.observe(p),()=>{p.removeEventListener("scroll",h),b.disconnect(),d.current!==null&&(cancelAnimationFrame(d.current),d.current=null),f.current=null}},[t,u,l,h])},NA=globalThis!=null&&globalThis.document?y.useLayoutEffect:y.useEffect,Sh=({children:e,className:t,hideScrollBar:l=!1,isEnabled:r=!0,offset:i=0,onVisibilityChange:s,orientation:u="vertical",ref:f,size:d=40,variant:h="fade",visibility:p="auto",...b})=>{const v=y.useRef(null);kA({containerRef:v,isEnabled:r,offset:i,onVisibilityChange:s,orientation:u,visibility:p}),NA(()=>{const T=v.current;!T||p==="auto"||(delete T.dataset.topScroll,delete T.dataset.bottomScroll,delete T.dataset.topBottomScroll,delete T.dataset.leftScroll,delete T.dataset.rightScroll,delete T.dataset.leftRightScroll,p==="both"?T.dataset[u==="vertical"?"topBottomScroll":"leftRightScroll"]="true":p!=="none"&&(T.dataset[`${p}Scroll`]="true"))},[p,u]);const w=y.useMemo(()=>QC({hideScrollBar:l,orientation:u,variant:h}),[u,l,h]),x={"--scroll-shadow-size":`${d}px`,...b.style};return E.jsx("div",{ref:ya(v,f),className:w.base({className:t}),"data-orientation":u,"data-scroll-shadow-size":d,"data-slot":"scroll-shadow",style:x,...b,children:e})};Sh.displayName="HeroUI.ScrollShadow";const DA=Object.assign(Sh,{Root:Sh}),$A=({...e})=>{const t=y.useId();return E.jsxs("svg",{"data-slot":"spinner-icon",viewBox:"0 0 24 24",...e,children:[E.jsxs("defs",{children:[E.jsxs("linearGradient",{id:`«data-slot-icon-def-1»-${t}`,x1:"50%",x2:"50%",y1:"5.271%",y2:"91.793%",children:[E.jsx("stop",{offset:"0%",stopColor:"currentColor"}),E.jsx("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:.55})]}),E.jsxs("linearGradient",{id:`«data-slot-icon-def-2»-${t}`,x1:"50%",x2:"50%",y1:"15.24%",y2:"87.15%",children:[E.jsx("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:0}),E.jsx("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:.55})]})]}),E.jsxs("g",{fill:"none",children:[E.jsx("path",{d:"m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"}),E.jsx("path",{d:"M8.749.021a1.5 1.5 0 0 1 .497 2.958A7.5 7.5 0 0 0 3 10.375a7.5 7.5 0 0 0 7.5 7.5v3c-5.799 0-10.5-4.7-10.5-10.5C0 5.23 3.726.865 8.749.021",fill:`url(#«data-slot-icon-def-1»-${t})`,transform:"translate(1.5 1.625)"}),E.jsx("path",{d:"M15.392 2.673a1.5 1.5 0 0 1 2.119-.115A10.48 10.48 0 0 1 21 10.375c0 5.8-4.701 10.5-10.5 10.5v-3a7.5 7.5 0 0 0 5.007-13.084a1.5 1.5 0 0 1-.115-2.118",fill:`url(#«data-slot-icon-def-2»-${t})`,transform:"translate(1.5 1.625)"})]})]})},kv=({className:e,color:t,size:l,...r})=>E.jsx(Ct.span,{"aria-label":"Loading","data-slot":"spinner",role:"status",...r,className:JC({className:e,color:t,size:l}),children:E.jsx($A,{"aria-hidden":!0})}),zA=Object.assign(kv,{Root:kv}),$5=Object.assign(Ub,{Root:Ub}),z5=12,P5=3,O5=Number.MAX_SAFE_INTEGER,j5=.05,PA=460,I5=4e3;var B5={};B5={close:"إغلاق",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} إشعار`,other:()=>`${t.number(e.count)} إشعارات`})}.`};var H5={};H5={close:"Затвори",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} известие`,other:()=>`${t.number(e.count)} известия`})}.`};var K5={};K5={close:"Zavřít",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} oznámení`,other:()=>`${t.number(e.count)} oznámení`})}.`};var U5={};U5={close:"Luk",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} besked`,other:()=>`${t.number(e.count)} beskeder`})}.`};var F5={};F5={close:"Schließen",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} Benachrichtigung`,other:()=>`${t.number(e.count)} Benachrichtigungen`})}.`};var V5={};V5={close:"Κλείσιμο",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} ειδοποίηση`,other:()=>`${t.number(e.count)} ειδοποιήσεις`})}.`};var _5={};_5={close:"Close",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notification`,other:()=>`${t.number(e.count)} notifications`})}.`};var G5={};G5={close:"Cerrar",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notificación`,other:()=>`${t.number(e.count)} notificaciones`})}.`};var q5={};q5={close:"Sule",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} teatis`,other:()=>`${t.number(e.count)} teatist`})}.`};var Y5={};Y5={close:"Sulje",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} ilmoitus`,other:()=>`${t.number(e.count)} ilmoitusta`})}.`};var X5={};X5={close:"Fermer",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notification`,other:()=>`${t.number(e.count)} notifications`})}.`};var W5={};W5={close:"סגור",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} התראה`,other:()=>`${t.number(e.count)} התראות`})}.`};var Z5={};Z5={close:"Zatvori",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} obavijest`,other:()=>`${t.number(e.count)} obavijesti`})}.`};var Q5={};Q5={close:"Bezárás",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} értesítés`,other:()=>`${t.number(e.count)} értesítés`})}.`};var J5={};J5={close:"Chiudi",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notifica`,other:()=>`${t.number(e.count)} notifiche`})}.`};var ex={};ex={close:"閉じる",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} 個の通知`,other:()=>`${t.number(e.count)} 個の通知`})}。`};var tx={};tx={close:"닫기",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)}개 알림`,other:()=>`${t.number(e.count)}개 알림`})}.`};var nx={};nx={close:"Uždaryti",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} pranešimas`,other:()=>`${t.number(e.count)} pranešimai`})}.`};var lx={};lx={close:"Aizvērt",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} paziņojums`,other:()=>`${t.number(e.count)} paziņojumi`})}.`};var ax={};ax={close:"Lukk",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} varsling`,other:()=>`${t.number(e.count)} varsler`})}.`};var rx={};rx={close:"Sluiten",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} melding`,other:()=>`${t.number(e.count)} meldingen`})}.`};var ix={};ix={close:"Zamknij",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} powiadomienie`,few:()=>`${t.number(e.count)} powiadomienia`,many:()=>`${t.number(e.count)} powiadomień`,other:()=>`${t.number(e.count)} powiadomienia`})}.`};var ox={};ox={close:"Fechar",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notificação`,other:()=>`${t.number(e.count)} notificações`})}.`};var sx={};sx={close:"Fechar",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notificação`,other:()=>`${t.number(e.count)} notificações`})}.`};var cx={};cx={close:"Închideţi",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} notificare`,other:()=>`${t.number(e.count)} notificări`})}.`};var ux={};ux={close:"Закрыть",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} уведомление`,other:()=>`${t.number(e.count)} уведомления`})}.`};var fx={};fx={close:"Zatvoriť",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} oznámenie`,few:()=>`${t.number(e.count)} oznámenia`,other:()=>`${t.number(e.count)} oznámení`})}.`};var dx={};dx={close:"Zapri",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} obvestilo`,two:()=>`${t.number(e.count)} obvestili`,few:()=>`${t.number(e.count)} obvestila`,other:()=>`${t.number(e.count)} obvestil`})}.`};var hx={};hx={close:"Zatvori",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} obaveštenje`,other:()=>`${t.number(e.count)} obaveštenja`})}.`};var mx={};mx={close:"Stäng",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} meddelande`,other:()=>`${t.number(e.count)} meddelanden`})}.`};var px={};px={close:"Kapat",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} bildirim`,other:()=>`${t.number(e.count)} bildirim`})}.`};var gx={};gx={close:"Закрити",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} сповіщення`,other:()=>`${t.number(e.count)} сповіщення`})}.`};var bx={};bx={close:"关闭",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} 个通知`,other:()=>`${t.number(e.count)} 个通知`})}。`};var vx={};vx={close:"關閉",notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} 個通知`,other:()=>`${t.number(e.count)} 個通知`})}。`};var f2={};f2={"ar-AE":B5,"bg-BG":H5,"cs-CZ":K5,"da-DK":U5,"de-DE":F5,"el-GR":V5,"en-US":_5,"es-ES":G5,"et-EE":q5,"fi-FI":Y5,"fr-FR":X5,"he-IL":W5,"hr-HR":Z5,"hu-HU":Q5,"it-IT":J5,"ja-JP":ex,"ko-KR":tx,"lt-LT":nx,"lv-LV":lx,"nb-NO":ax,"nl-NL":rx,"pl-PL":ix,"pt-BR":ox,"pt-PT":sx,"ro-RO":cx,"ru-RU":ux,"sk-SK":fx,"sl-SI":dx,"sr-SP":hx,"sv-SE":mx,"tr-TR":px,"uk-UA":gx,"zh-CN":bx,"zh-TW":vx};function OA(e){return e&&e.__esModule?e.default:e}function jA(e,t,l){let{key:r,timer:i,timeout:s}=e.toast;y.useEffect(()=>{if(!(i==null||s==null))return i.reset(s),()=>{i.pause()}},[i,s]);let u=_n(),f=Y0(),d=l2(OA(f2),"@react-aria/toast"),[h,p]=y.useState(!1);return Ne(()=>{p(!0)},[]),{toastProps:{...mt(e,{labelable:!0}),role:"alertdialog","aria-modal":"false","aria-labelledby":e["aria-labelledby"]||u,"aria-describedby":e["aria-describedby"]||f,tabIndex:0},contentProps:{role:"alert","aria-atomic":"true","aria-hidden":h?void 0:"true"},titleProps:{id:u},descriptionProps:{id:f},closeButtonProps:{"aria-label":d.format("close"),onPress:()=>t.close(r)}}}const yx=1,$0=Symbol.for("react-aria-landmark-manager");function IA(e){return document.addEventListener("react-aria-landmark-manager-change",e),()=>document.removeEventListener("react-aria-landmark-manager-change",e)}function Nv(){if(typeof document>"u")return null;let e=document[$0];return e&&e.version>=yx?e:(document[$0]=new HA,document.dispatchEvent(new CustomEvent("react-aria-landmark-manager-change")),document[$0])}function BA(){return Lu.useSyncExternalStore(IA,Nv,Nv)}class HA{constructor(){this.landmarks=[],this.isListening=!1,this.refCount=0,this.version=yx,this.f6Handler=this.f6Handler.bind(this),this.focusinHandler=this.focusinHandler.bind(this),this.focusoutHandler=this.focusoutHandler.bind(this)}setupIfNeeded(){this.isListening||(document.addEventListener("keydown",this.f6Handler,{capture:!0}),document.addEventListener("focusin",this.focusinHandler,{capture:!0}),document.addEventListener("focusout",this.focusoutHandler,{capture:!0}),this.isListening=!0)}teardownIfNeeded(){!this.isListening||this.landmarks.length>0||this.refCount>0||(document.removeEventListener("keydown",this.f6Handler,{capture:!0}),document.removeEventListener("focusin",this.focusinHandler,{capture:!0}),document.removeEventListener("focusout",this.focusoutHandler,{capture:!0}),this.isListening=!1)}focusLandmark(t,l){var r,i;(i=(r=this.landmarks.find(s=>s.ref.current===t))==null?void 0:r.focus)==null||i.call(r,l)}getLandmarksByRole(t){return new Set(this.landmarks.filter(l=>l.role===t))}getLandmarkByRole(t){return this.landmarks.find(l=>l.role===t)}addLandmark(t){if(this.setupIfNeeded(),this.landmarks.find(i=>i.ref===t.ref)||!t.ref.current)return;if(this.landmarks.filter(i=>i.role==="main").length>1,this.landmarks.length===0){this.landmarks=[t],this.checkLabels(t.role);return}let l=0,r=this.landmarks.length-1;for(;l<=r;){let i=Math.floor((l+r)/2),s=t.ref.current.compareDocumentPosition(this.landmarks[i].ref.current);!!(s&Node.DOCUMENT_POSITION_PRECEDING||s&Node.DOCUMENT_POSITION_CONTAINS)?l=i+1:r=i-1}this.landmarks.splice(l,0,t),this.checkLabels(t.role)}updateLandmark(t){let l=this.landmarks.findIndex(r=>r.ref===t.ref);l>=0&&(this.landmarks[l]={...this.landmarks[l],...t},this.checkLabels(this.landmarks[l].role))}removeLandmark(t){this.landmarks=this.landmarks.filter(l=>l.ref!==t),this.teardownIfNeeded()}checkLabels(t){let l=this.getLandmarksByRole(t);l.size>1&&[...l].filter(r=>!r.label)}closestLandmark(t){let l=new Map(this.landmarks.map(i=>[i.ref.current,i])),r=t;for(;r&&!l.has(r)&&r!==document.body&&r.parentElement;)r=r.parentElement;return l.get(r)}getNextLandmark(t,{backward:l}){var f;let r=this.closestLandmark(t),i=l?this.landmarks.length-1:0;r&&(i=this.landmarks.indexOf(r)+(l?-1:1));let s=()=>{if(i<0){if(!t.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"backward"},bubbles:!0,cancelable:!0})))return!0;i=this.landmarks.length-1}else if(i>=this.landmarks.length){if(!t.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"forward"},bubbles:!0,cancelable:!0})))return!0;i=0}return i<0||i>=this.landmarks.length};if(s())return;let u=i;for(;(f=this.landmarks[i].ref.current)!=null&&f.closest("[aria-hidden=true]");){if(i+=l?-1:1,s())return;if(i===u)break}return this.landmarks[i]}f6Handler(t){t.key==="F6"&&(t.altKey?this.focusMain():this.navigate(ve(t),t.shiftKey))&&(t.preventDefault(),t.stopPropagation())}focusMain(){let t=this.getLandmarkByRole("main");return t&&t.ref.current&&t.ref.current.isConnected?(this.focusLandmark(t.ref.current,"forward"),!0):!1}navigate(t,l){let r=this.getNextLandmark(t,{backward:l});if(!r)return!1;if(r.lastFocused){let i=r.lastFocused;if(Ie(document.body,i))return i.focus(),!0}return r.ref.current&&r.ref.current.isConnected?(this.focusLandmark(r.ref.current,l?"backward":"forward"),!0):!1}focusinHandler(t){let l=this.closestLandmark(ve(t));l&&l.ref.current!==ve(t)&&this.updateLandmark({ref:l.ref,lastFocused:ve(t)});let r=t.relatedTarget;if(r){let i=this.closestLandmark(r);i&&i.ref.current===r&&i.blur()}}focusoutHandler(t){let l=ve(t),r=t.relatedTarget;if(!r||r===document){let i=this.closestLandmark(l);i&&i.ref.current===l&&i.blur()}}createLandmarkController(){let t=this;return t.refCount++,t.setupIfNeeded(),{navigate(l,r){let i=(r==null?void 0:r.from)||document.activeElement;return t.navigate(i,l==="backward")},focusNext(l){let r=(l==null?void 0:l.from)||document.activeElement;return t.navigate(r,!1)},focusPrevious(l){let r=(l==null?void 0:l.from)||document.activeElement;return t.navigate(r,!0)},focusMain(){return t.focusMain()},dispose(){t&&(t.refCount--,t.teardownIfNeeded(),t=null)}}}registerLandmark(t){return this.landmarks.find(l=>l.ref===t.ref)?this.updateLandmark(t):this.addLandmark(t),()=>this.removeLandmark(t.ref)}}function KA(e,t){const{role:l,"aria-label":r,"aria-labelledby":i,focus:s}=e;let u=BA(),f=r||i,[d,h]=y.useState(!1),p=y.useCallback(()=>{h(!0)},[h]),b=y.useCallback(()=>{h(!1)},[h]);return Ne(()=>{if(u)return u.registerLandmark({ref:t,label:f,role:l,focus:s||p,blur:b})},[u,f,t,l,s,p,b]),y.useEffect(()=>{var v;d&&((v=t.current)==null||v.focus())},[d,t]),{landmarkProps:{role:l,tabIndex:d?-1:void 0,"aria-label":r,"aria-labelledby":i}}}function UA(e){return e&&e.__esModule?e.default:e}function FA(e,t,l){let r=l2(UA(f2),"@react-aria/toast"),{landmarkProps:i}=KA({role:"region","aria-label":e["aria-label"]||r.format("notifications",{count:t.visibleToasts.length})},l),s=y.useRef(!1),u=y.useRef(!1),f=y.useCallback(()=>{s.current||u.current?t.pauseAll():t.resumeAll()},[t]),{hoverProps:d}=Sa({onHoverStart:()=>{s.current=!0,f()},onHoverEnd:()=>{s.current=!1,f()}}),h=y.useRef([]),p=y.useRef(t.visibleToasts),b=y.useRef(null);Ne(()=>{var C;if(b.current===-1||t.visibleToasts.length===0||!l.current){h.current=[],p.current=t.visibleToasts;return}if(h.current=[...l.current.querySelectorAll('[role="alertdialog"]')],p.current.length===t.visibleToasts.length&&t.visibleToasts.every((N,M)=>N.key===p.current[M].key)){p.current=t.visibleToasts;return}let x=p.current.map((N,M)=>({...N,i:M,isRemoved:!t.visibleToasts.some(L=>N.key===L.key)})),T=x.findIndex(N=>N.i===b.current&&N.isRemoved);if(T>-1)if(pa()==="pointer"&&((C=v.current)!=null&&C.isConnected))en(v.current);else{let N=0,M,L;for(;N<=T;)x[N].isRemoved||(L=Math.max(0,N-1)),N++;for(;N<x.length;){if(!x[N].isRemoved){M=N-1;break}N++}L===void 0&&M===void 0&&(L=0),L>=0&&L<h.current.length?en(h.current[L]):M>=0&&M<h.current.length&&en(h.current[M])}p.current=t.visibleToasts},[t.visibleToasts,l]);let v=y.useRef(null),{focusWithinProps:w}=Yo({onFocusWithin:x=>{u.current=!0,v.current=x.relatedTarget,f()},onBlurWithin:()=>{u.current=!1,v.current=null,f()}});return y.useEffect(()=>{var x;t.visibleToasts.length===0&&((x=v.current)!=null&&x.isConnected)&&(pa()==="pointer"?en(v.current):v.current.focus(),v.current=null)},[l,t.visibleToasts.length]),y.useEffect(()=>()=>{var x;(x=v.current)!=null&&x.isConnected&&(pa()==="pointer"?en(v.current):v.current.focus(),v.current=null)},[l]),{regionProps:Ce(i,d,w,{tabIndex:-1,"data-react-aria-top-layer":!0,onFocus:x=>{let T=ve(x).closest('[role="alertdialog"]');b.current=h.current.findIndex(C=>C===T)},onBlur:()=>{b.current=-1}})}}function VA(e){let t=y.useCallback(i=>e.subscribe(i),[e]),l=y.useCallback(()=>e.visibleToasts,[e]);return{visibleToasts:Lu.useSyncExternalStore(t,l,l),add:(i,s)=>e.add(i,s),close:i=>e.close(i),pauseAll:()=>e.pauseAll(),resumeAll:()=>e.resumeAll()}}class _A{constructor(t){this.queue=[],this.subscriptions=new Set,this.visibleToasts=[],this.maxVisibleToasts=(t==null?void 0:t.maxVisibleToasts)??1/0,this.wrapUpdate=t==null?void 0:t.wrapUpdate}runWithWrapUpdate(t,l){this.wrapUpdate?this.wrapUpdate(t,l):t()}subscribe(t){return this.subscriptions.add(t),()=>this.subscriptions.delete(t)}add(t,l={}){let r="_"+Math.random().toString(36).slice(2),i={...l,content:t,key:r,timer:l.timeout?new GA(()=>this.close(r),l.timeout):void 0};return this.queue.unshift(i),this.updateVisibleToasts("add"),r}close(t){var r,i;let l=this.queue.findIndex(s=>s.key===t);l>=0&&((i=(r=this.queue[l]).onClose)==null||i.call(r),this.queue.splice(l,1)),this.updateVisibleToasts("remove")}updateVisibleToasts(t){this.visibleToasts=this.queue.slice(0,this.maxVisibleToasts),this.runWithWrapUpdate(()=>{for(let l of this.subscriptions)l()},t)}pauseAll(){for(let t of this.visibleToasts)t.timer&&t.timer.pause()}resumeAll(){for(let t of this.visibleToasts)t.timer&&t.timer.resume()}clear(){this.queue=[],this.updateVisibleToasts("clear")}}class GA{constructor(t,l){this.startTime=null,this.remaining=l,this.callback=t}reset(t){this.remaining=t,this.resume()}pause(){this.timerId!=null&&(clearTimeout(this.timerId),this.timerId=null,this.remaining-=Date.now()-this.startTime)}resume(){this.remaining<=0||(this.startTime=Date.now(),this.timerId=setTimeout(()=>{this.timerId=null,this.remaining=0,this.callback()},this.remaining))}}const Du=y.createContext(null),qA=y.forwardRef(function(t,l){let r=Nl(),i=VA(t.queue),s=bn(l),{regionProps:u}=FA(t,i,s),{focusProps:f,isFocused:d,isFocusVisible:h}=Dl(),{hoverProps:p,isHovered:b}=Sa({}),v=At({...t,children:void 0,defaultClassName:"react-aria-ToastRegion",values:{visibleToasts:i.visibleToasts,isHovered:b,isFocused:d,isFocusVisible:h}}),{direction:w}=bi(),x,{getContainer:T}=_4();r||(x=document.body,T&&(x=T()));let C=mt(t,{global:!0}),N=V.createElement(Du.Provider,{value:i},V.createElement(ut.div,{...Ce(C,v,u,f,p),dir:w,ref:s,"data-hovered":b||void 0,"data-focused":d||void 0,"data-focus-visible":h||void 0},typeof t.children=="function"?V.createElement(YA,{...t,render:void 0,className:void 0,style:{display:"contents"}},t.children):t.children));return i.visibleToasts.length>0&&x?al.createPortal(N,x):null}),YA=y.forwardRef(function(t,l){let r=y.useContext(Du),{hoverProps:i,isHovered:s}=Sa({}),u=At({...t,children:void 0,defaultClassName:"react-aria-ToastList",values:{visibleToasts:r.visibleToasts,isFocused:!1,isFocusVisible:!1,isHovered:s}});return V.createElement(ut.ol,{...i,...u,ref:l},r.visibleToasts.map(f=>V.createElement("li",{key:f.key,style:{display:"contents"}},t.children({toast:f}))))}),XA=y.forwardRef(function(t,l){let r=y.useContext(Du),i=bn(l),{toastProps:s,contentProps:u,titleProps:f,descriptionProps:d,closeButtonProps:h}=jA(t,r,i),{focusProps:p,isFocused:b,isFocusVisible:v}=Dl(),w=At({...t,defaultClassName:"react-aria-Toast",values:{toast:t.toast,isFocused:b,isFocusVisible:v}}),x=mt(t,{global:!0});return V.createElement(ut.div,{...Ce(x,w,s,p),ref:i,"data-focused":b||void 0,"data-focus-visible":v||void 0},V.createElement(sr,{values:[[xx,u],[ku,{slots:{[fi]:{},title:f,description:d}}],[e2,{slots:{[fi]:{},close:h}}]]},w.children))}),xx=y.createContext({}),WA=y.forwardRef(function(t,l){return[t,l]=yn(t,l,xx),V.createElement(ut.div,{render:t.render,className:"react-aria-ToastContent",...t,ref:l},t.children)});class Xo{constructor(t){this.maxVisibleToasts=t==null?void 0:t.maxVisibleToasts;let l=Promise.resolve();const r=i=>{if(typeof document>"u"||!("startViewTransition"in document)){i();return}const s=()=>{const u=document.startViewTransition(()=>{al.flushSync(i)});return u.ready.catch(()=>{}),u.finished.catch(()=>{})};l=l.then(s,s)};this.queue=new _A({maxVisibleToasts:O5,wrapUpdate:(t==null?void 0:t.wrapUpdate)??r})}add(t,l){const r=(l==null?void 0:l.timeout)!==void 0?l.timeout:I5;return this.queue.add(t,{...l,timeout:r})}close(t){this.queue.close(t)}pauseAll(){this.queue.pauseAll()}resumeAll(){this.queue.resumeAll()}clear(){this.queue.clear()}subscribe(t){return this.queue.subscribe(t)}get visibleToasts(){return this.queue.visibleToasts}getQueue(){return this.queue}}function ZA(e){const t=(l,r)=>{const i=(r==null?void 0:r.timeout)!==void 0?r.timeout:I5;return e.add({title:l,description:r==null?void 0:r.description,indicator:r==null?void 0:r.indicator,variant:(r==null?void 0:r.variant)||"default",actionProps:r==null?void 0:r.actionProps,isLoading:r==null?void 0:r.isLoading},{timeout:i,onClose:()=>{requestAnimationFrame(()=>{var s;(s=r==null?void 0:r.onClose)==null||s.call(r)})}})};return t.success=(l,r)=>t(l,{...r,variant:"success"}),t.danger=(l,r)=>t(l,{...r,variant:"danger"}),t.info=(l,r)=>t(l,{...r,variant:"accent"}),t.warning=(l,r)=>t(l,{...r,variant:"warning"}),t.promise=(l,r)=>{const i=typeof l=="function"?l():l,s=e.add({title:r.loading,variant:"default",isLoading:!0},{timeout:0});return i.then(u=>{const f=typeof r.success=="function"?r.success(u):r.success;return e.close(s),t.success(f)}).catch(u=>{const f=typeof r.error=="function"?r.error(u):r.error;return e.close(s),t.danger(f)}),s},t.getQueue=()=>e.getQueue(),t.close=l=>e.close(l),t.pauseAll=()=>e.pauseAll(),t.resumeAll=()=>e.resumeAll(),t.clear=()=>e.clear(),t}const QA=new Xo({maxVisibleToasts:O5}),Sx=ZA(QA),JA=e=>{const[t,l]=y.useState(void 0),r=y.useCallback(()=>{if(e.current){const i=e.current.scrollHeight;l(s=>s!==i?i:s)}},[e]);return y.useEffect(()=>{const i=e.current;if(!i)return;const s=new ResizeObserver(r),u=new MutationObserver(f=>{f.some(h=>h.type==="attributes"&&h.attributeName==="aria-hidden")&&r()});return s.observe(i),u.observe(i,{attributeFilter:["aria-hidden"],attributes:!0}),()=>{s.disconnect(),u.disconnect()}},[e,r]),{height:t}},wx=typeof window<"u"?y.useLayoutEffect:y.useEffect,eL=typeof window>"u";function tL(e,{defaultValue:t=!1,initializeWithValue:l=!0}={}){const r=f=>eL?t:window.matchMedia(f).matches,[i,s]=y.useState(()=>l?r(e):t);function u(){s(r(e))}return wx(()=>{const f=window.matchMedia(e);return u(),f.addListener?f.addListener(u):f.addEventListener("change",u),()=>{f.removeListener?f.removeListener(u):f.removeEventListener("change",u)}},[e]),i}const wa=y.createContext({}),d2=({children:e,className:t,placement:l,scaleFactor:r=j5,toast:i,variant:s,...u})=>{const{gap:f=z5,heightsByKey:d,maxVisibleToasts:h=P5,onToastHeightChange:p,onToastHeightRemove:b,placement:v,scaleFactor:w,slots:x}=y.use(wa),T=l??v,C=r??w,M=y.use(Du).visibleToasts,L=M.indexOf(i),k=L<=0,B=T==null?void 0:T.startsWith("bottom"),G=L>=h,$=i==null?void 0:i.key,A=y.useRef(null),{height:U}=JA(A);y.useEffect(()=>{$&&typeof U=="number"&&(p==null||p($,U))},[$,U,p]),y.useEffect(()=>{if($)return()=>{b==null||b($)}},[$,b]),y.useLayoutEffect(()=>{const q=A.current;q&&(q.tabIndex=k?0:-1)},[k]);const K=y.useMemo(()=>{var z;const q=(z=M[0])==null?void 0:z.key,te=(q?d==null?void 0:d[q]:void 0)??U??0,ne=L*f,j=(B?-1:1)*ne;return{scale:`${1-L*C}`,translate:`0 ${j}px 0`,viewTransitionName:`toast-${String(i.key).replace(/[^a-zA-Z0-9]/g,"-")}`,zIndex:M.length-L,...te?{"--front-height":`${te}px`}:null,opacity:G?0:1,pointerEvents:G?"none":"auto",...u.style}},[C,f,d,L,B,k,G,u.style,i==null?void 0:i.key,U,M]);return E.jsx(XA,{ref:A,"aria-hidden":G,className:Mt(t,x==null?void 0:x.toast({variant:s})),"data-frontmost":ch(k),"data-hidden":ch(G),"data-index":L,"data-slot":"toast",style:K,toast:i,...u,children:e})};d2.displayName="HeroUI.Toast";const Ex=({children:e,className:t,...l})=>{const{slots:r}=y.use(wa);return E.jsx(WA,{className:Je(r==null?void 0:r.content,t),"data-slot":"toast-content",...l,children:e})},cu=({children:e,className:t,variant:l,...r})=>{const{slots:i}=y.use(wa),s=y.useCallback(()=>{switch(l){case"accent":return E.jsx(au,{"data-slot":"toast-default-icon"});case"success":return E.jsx(e4,{"data-slot":"toast-default-icon"});case"warning":return E.jsx(Q3,{"data-slot":"toast-default-icon"});case"danger":return E.jsx(J3,{"data-slot":"toast-default-icon"});default:return E.jsx(au,{"data-slot":"toast-default-icon"})}},[l]);return E.jsx(Ct.div,{className:Je(i==null?void 0:i.indicator,t),"data-slot":"toast-indicator",...r,children:e??s()})};cu.displayName="HeroUI.ToastIndicator";const h2=({children:e,className:t,...l})=>{const{slots:r}=y.use(wa);return E.jsx(s5,{className:Je(r==null?void 0:r.title,t),"data-slot":"toast-title",slot:"title",...l,children:e})};h2.displayName="HeroUI.ToastTitle";const m2=({children:e,className:t,...l})=>{const{slots:r}=y.use(wa);return E.jsx(s5,{className:Je(r==null?void 0:r.description,t),"data-slot":"toast-description",slot:"description",...l,children:e})};m2.displayName="HeroUI.ToastDescription";const p2=({className:e,...t})=>{const{slots:l}=y.use(wa);return E.jsx(d5,{className:Mt(e,l==null?void 0:l.close()),"data-slot":"toast-close",slot:"close",...t})};p2.displayName="HeroUI.ToastCloseButton";const uu=({children:e,className:t,...l})=>{var i;const{slots:r}=y.use(wa);return E.jsx(mn,{className:Mt(t,(i=r==null?void 0:r.action)==null?void 0:i.call(r)),"data-slot":"toast-action-button",...l,children:e})};uu.displayName="HeroUI.ToastActionButton";const Cx=({children:e,className:t,gap:l=z5,maxVisibleToasts:r,placement:i="bottom",queue:s,scaleFactor:u=j5,width:f=PA,...d})=>{const h=y.useMemo(()=>nT({placement:i}),[i]),p=tL("(max-width: 768px)"),[b,v]=V.useState({}),w=y.useMemo(()=>s?s.getQueue():Sx.getQueue(),[s]),x=y.useMemo(()=>{const M=s&&"maxVisibleToasts"in s?s.maxVisibleToasts:void 0;return r??M??P5},[r,s]),T=y.useCallback((M,L)=>{v(k=>k[M]===L?k:{...k,[M]:L})},[]),C=y.useCallback(M=>{v(L=>{if(!(M in L))return L;const k={...L};return delete k[M],k})},[]),N=y.useCallback(M=>{const{actionProps:L,description:k,indicator:B,isLoading:G,title:$,variant:A}=M.toast.content??{};return E.jsxs(d2,{placement:i,scaleFactor:u,toast:M.toast,variant:A,children:[B===null?null:G?E.jsx(cu,{variant:A,children:E.jsx(zA,{color:"current",size:"sm"})}):E.jsx(cu,{variant:A,children:B}),E.jsxs(Ex,{children:[!!$&&E.jsx(h2,{children:$}),!!k&&E.jsx(m2,{children:k}),p&&(L!=null&&L.children)?E.jsx(uu,{...L,children:L.children}):null]}),!p&&(L!=null&&L.children)?E.jsx(uu,{...L,children:L.children}):null,E.jsx(p2,{})]})},[p,i,u]);return E.jsx(qA,{className:Mt(t,h==null?void 0:h.region()),"data-slot":"toast-region",queue:w,style:{"--gap":`${l}px`,"--placement":i,"--scale-factor":u,"--toast-width":typeof f=="number"?`${f}px`:f},...d,children:M=>{const L=M.toast.content,k={...M,isLoading:(L==null?void 0:L.isLoading)??!1};return E.jsx(wa,{value:{gap:l,heightsByKey:b,maxVisibleToasts:x,onToastHeightChange:T,onToastHeightRemove:C,placement:i,scaleFactor:u,slots:h,width:f},children:typeof e>"u"?N(M):typeof e=="function"?e(k):e})}})};Cx.displayName="HeroUI.ToastProvider";const g2=Object.assign(d2,{Provider:Cx,Content:Ex,Indicator:cu,Title:h2,Description:m2,ActionButton:uu,CloseButton:p2,Queue:Xo,toast:Sx}),Tx=new WeakMap;function fu(e,t,l){return e?(typeof t=="string"&&(t=t.replace(/\s+/g,"")),`${Tx.get(e)}-${l}-${t}`):""}function nL(e,t,l){let{key:r,isDisabled:i,shouldSelectOnPressUp:s}=e,{selectionManager:u,selectedKey:f}=t,d=r===f,h=i||t.isDisabled||t.selectionManager.isDisabled(r),p=t.collection.getItem(r),{itemProps:b,isPressed:v}=fM({selectionManager:u,key:r,ref:l,isDisabled:h,shouldSelectOnPressUp:s??(p==null?void 0:p.props.href)!=null,linkBehavior:"selection"}),w=fu(t,r,"tab"),x=fu(t,r,"tabpanel"),{tabIndex:T}=b,C=mt(p==null?void 0:p.props,{labelable:!0});delete C.id;let N=Qy(p==null?void 0:p.props),{focusableProps:M}=qo({...p==null?void 0:p.props,isDisabled:h},l);return{tabProps:Ce(C,M,N,b,{id:w,"aria-selected":d,"aria-disabled":h||void 0,"aria-controls":d?x:void 0,tabIndex:h?void 0:T,role:"tab"}),isSelected:d,isDisabled:h,isPressed:v}}function lL(e,t){let l=t==null?void 0:t.isDisabled,[r,i]=y.useState(!1);return Ne(()=>{if(e!=null&&e.current&&!l){let s=()=>{if(e.current){let f=ll(e.current,{tabbable:!0});i(!!f.nextNode())}};s();let u=new MutationObserver(s);return u.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{u.disconnect()}}}),l?!1:r}function aL(e,t,l){let r=lL(l)?void 0:0;const i=fu(t,e.id??(t==null?void 0:t.selectedKey),"tabpanel"),s=Kh({...e,id:i,"aria-labelledby":fu(t,t==null?void 0:t.selectedKey,"tab")});return{tabPanelProps:Ce(s,{tabIndex:r,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}class rL{constructor(t,l,r,i=new Set){this.collection=t,this.flipDirection=l==="rtl"&&r==="horizontal",this.disabledKeys=i,this.tabDirection=r==="horizontal"}getKeyLeftOf(t){return this.flipDirection?this.getNextKey(t):this.getPreviousKey(t)}getKeyRightOf(t){return this.flipDirection?this.getPreviousKey(t):this.getNextKey(t)}isDisabled(t){var l,r;return this.disabledKeys.has(t)||!!((r=(l=this.collection.getItem(t))==null?void 0:l.props)!=null&&r.isDisabled)}getFirstKey(){let t=this.collection.getFirstKey();return t!=null&&this.isDisabled(t)&&(t=this.getNextKey(t)),t}getLastKey(){let t=this.collection.getLastKey();return t!=null&&this.isDisabled(t)&&(t=this.getPreviousKey(t)),t}getKeyAbove(t){return this.tabDirection?null:this.getPreviousKey(t)}getKeyBelow(t){return this.tabDirection?null:this.getNextKey(t)}getNextKey(t){let l=t;do l=this.collection.getKeyAfter(l),l==null&&(l=this.collection.getFirstKey());while(l!=null&&this.isDisabled(l)&&l!==t);return l}getPreviousKey(t){let l=t;do l=this.collection.getKeyBefore(l),l==null&&(l=this.collection.getLastKey());while(l!=null&&this.isDisabled(l)&&l!==t);return l}}function iL(e,t,l){let{orientation:r="horizontal",keyboardActivation:i="automatic"}=e,{collection:s,selectionManager:u,disabledKeys:f}=t,{direction:d}=bi(),h=y.useMemo(()=>new rL(s,d,r,f),[s,f,r,d]),{collectionProps:p}=uM({ref:l,selectionManager:u,keyboardDelegate:h,selectOnFocus:i==="automatic",disallowEmptySelection:!0,scrollRef:l,linkBehavior:"selection"}),b=_n();Tx.set(t,b);let v=Kh({...e,id:b});return{tabListProps:{...Ce(p,v),role:"tablist","aria-orientation":r,tabIndex:void 0}}}function oL(e){let[t,l]=Ru(e.selectedKey,e.defaultSelectedKey??null,e.onSelectionChange),r=y.useMemo(()=>t!=null?[t]:[],[t]),{collection:i,disabledKeys:s,selectionManager:u}=IM({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:r,onSelectionChange:d=>{if(d==="all")return;let h=d.values().next().value??null;h===t&&e.onSelectionChange&&e.onSelectionChange(h),l(h)}}),f=t!=null?i.getItem(t):null;return{collection:i,disabledKeys:s,selectionManager:u,selectedKey:t,setSelectedKey:l,selectedItem:f}}function sL(e){let t=oL({...e,onSelectionChange:e.onSelectionChange?u=>{var f;u!=null&&((f=e.onSelectionChange)==null||f.call(e,u))}:void 0,suppressTextValueWarning:!0,defaultSelectedKey:e.defaultSelectedKey??Dv(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)??void 0}),{selectionManager:l,collection:r,selectedKey:i}=t,s=y.useRef(i);return y.useEffect(()=>{let u=i;e.selectedKey==null&&(l.isEmpty||u==null||!r.getItem(u))&&(u=Dv(r,t.disabledKeys),u!=null&&l.setSelectedKeys([u])),(u!=null&&l.focusedKey==null||!l.isFocused&&u!==s.current)&&l.setFocusedKey(u),s.current=u}),{...t,isDisabled:e.isDisabled||!1}}function Dv(e,t){var r,i,s,u;let l=null;if(e){for(l=e.getFirstKey();l!=null&&(t.has(l)||(i=(r=e.getItem(l))==null?void 0:r.props)!=null&&i.isDisabled)&&l!==e.getLastKey();)l=e.getKeyAfter(l);l!=null&&(t.has(l)||(u=(s=e.getItem(l))==null?void 0:s.props)!=null&&u.isDisabled)&&l===e.getLastKey()&&(l=e.getFirstKey())}return l}const $u=y.createContext(null),ar=y.createContext(null),cL=y.forwardRef(function(t,l){[t,l]=yn(t,l,$u);let{children:r,orientation:i="horizontal"}=t;return r=y.useMemo(()=>typeof r=="function"?r({orientation:i,defaultChildren:null}):r,[r,i]),V.createElement(KR,{content:r},s=>V.createElement(uL,{props:t,collection:s,tabsRef:l}))});function uL({props:e,tabsRef:t,collection:l}){let{orientation:r="horizontal"}=e,i=sL({...e,collection:l,children:void 0}),{focusProps:s,isFocused:u,isFocusVisible:f}=Dl({within:!0}),d=y.useMemo(()=>({orientation:r,isFocusWithin:u,isFocusVisible:f}),[r,u,f]),h=At({...e,defaultClassName:"react-aria-Tabs",values:d}),p=mt(e,{global:!0});return V.createElement(ut.div,{...Ce(p,h,s),ref:t,slot:e.slot||void 0,"data-focused":u||void 0,"data-orientation":r,"data-focus-visible":f||void 0,"data-disabled":i.isDisabled||void 0},V.createElement(sr,{values:[[$u,e],[ar,i]]},h.children))}const $v=y.forwardRef(function(t,l){return y.useContext(ar)?V.createElement(fL,{props:t,forwardedRef:l}):V.createElement(YR,t)});function fL({props:e,forwardedRef:t}){let l=y.useContext(ar),{CollectionRoot:r}=y.useContext(l5),{orientation:i="horizontal",keyboardActivation:s="automatic"}=Cu($u),u=bn(t),{tabListProps:f}=iL({...e,orientation:i,keyboardActivation:s},l,u),d=At({...e,children:null,defaultClassName:"react-aria-TabList",values:{orientation:i,state:l}}),h=mt(e,{global:!0});return delete h.id,V.createElement(ut.div,{...Ce(h,d,f),ref:u,"data-orientation":i||void 0},V.createElement(eM,null,V.createElement(r,{collection:l.collection,persistedKeys:ZR(l.selectionManager.focusedKey)})))}const k2=class k2 extends vi{};k2.type="item";let wh=k2;const dL=qR(wh,(e,t,l)=>{let r=y.useContext(ar),i=bn(t),{tabProps:s,isSelected:u,isDisabled:f,isPressed:d}=nL({key:l.key,...e},r,i),{focusProps:h,isFocused:p,isFocusVisible:b}=Dl(),{hoverProps:v,isHovered:w}=Sa({isDisabled:f,onHoverStart:e.onHoverStart,onHoverEnd:e.onHoverEnd,onHoverChange:e.onHoverChange}),x=At({...e,id:void 0,children:l.rendered,defaultClassName:"react-aria-Tab",values:{isSelected:u,isDisabled:f,isFocused:p,isFocusVisible:b,isPressed:d,isHovered:w}}),T=l.props.href?ut.a:ut.div,C=mt(e,{global:!0});return delete C.id,delete C.onClick,V.createElement(T,{...Ce(C,x,s,h,v),ref:i,"data-selected":u||void 0,"data-disabled":f||void 0,"data-focused":p||void 0,"data-focus-visible":b||void 0,"data-pressed":d||void 0,"data-hovered":w||void 0},V.createElement(o5.Provider,{value:{isSelected:u}},x.children))}),hL=O3(function(t,l){const r=y.useContext(ar);let i=bn(l),s=r.selectedKey===t.id,[u,f]=y.useState(r.selectedKey!=null?s:null);u==null&&r.selectedKey!=null?f(s):!s&&u&&f(!1);let d=Zc(i,s);return!s&&!t.shouldForceMount&&!d?null:V.createElement(mL,{...t,tabPanelRef:i,isInitiallySelected:u||!1,isExiting:d})});function mL(e){let t=y.useContext(ar),{id:l,tabPanelRef:r,isInitiallySelected:i,isExiting:s,...u}=e,{tabPanelProps:f}=aL(e,t,r),{focusProps:d,isFocused:h,isFocusVisible:p}=Dl(),b=t.selectedKey===e.id,v=wu(r)&&!i,w=At({...e,defaultClassName:"react-aria-TabPanel",values:{isFocused:h,isFocusVisible:p,isInert:Sb(!b),isEntering:v,isExiting:s,state:t}}),x=mt(u,{global:!0});delete x.id;let T=b?Ce(x,f,d,w):Ce(x,w);return V.createElement(ut.div,{...T,ref:r,"data-focused":h||void 0,"data-focus-visible":p||void 0,inert:Sb(!b||e.inert),"data-inert":b?void 0:"true","data-entering":v||void 0,"data-exiting":s||void 0},V.createElement(sr,{values:[[$u,null],[ar,null]]},V.createElement(l5.Provider,{value:n5},w.children)))}const xi=y.createContext({}),Rx=LA("tabs.listContainer"),zv=({children:e,className:t,orientation:l="horizontal",variant:r,...i})=>{const s=V.useMemo(()=>tT({variant:r}),[r]);return E.jsx(xi,{value:{orientation:l,slots:s},children:E.jsx(cL,{...i,className:Mt(t,s.base()),"data-slot":"tabs",orientation:l,children:e})})},pL=({children:e,className:t,render:l,...r})=>E.jsx(Rx.Injector,{...r,className:t,render:l,children:e}),gL=({children:e,className:t,...l})=>{const{orientation:r="horizontal",slots:i}=y.use(xi),s=y.useRef(null),u=r==="vertical",[f,d]=Rx.useSlot(l),h=y.useCallback(w=>{const x=s.current;if(!x)return;const T=u?x.clientHeight:x.clientWidth,C=u?x.scrollHeight:x.scrollWidth,N=Math.max(0,C-T),M=!u&&getComputedStyle(x).direction==="rtl",L=w*T*.8*(M?-1:1),k=u?x.scrollTop:x.scrollLeft,B=Math.min(M?0:N,Math.max(M?-N:0,k+L));B!==k&&x.scrollTo({behavior:"smooth",[u?"top":"left"]:B})},[u]);if(!f)return E.jsx($v,{...d,className:Mt(t,i==null?void 0:i.tabList()),"data-slot":"tabs-list",children:e});const{className:p,render:b,...v}=f;return E.jsx($v,{...d,className:Mt(t,i==null?void 0:i.tabList()),"data-slot":"tabs-list",render:w=>{const{children:x,className:T,ref:C,...N}=w;return E.jsxs(Ct.div,{className:Je(i==null?void 0:i.tabListContainer,p),"data-slot":"tabs-list-container",render:b,...v,children:[E.jsx(DA,{ref:s,hideScrollBar:!0,className:Je(i==null?void 0:i.scroller),orientation:r,size:64,children:E.jsx("div",{...N,ref:C,className:T,children:x})}),E.jsx("button",{"aria-label":u?"Scroll tabs up":"Scroll tabs left",className:Je(i==null?void 0:i.scrollPrev),tabIndex:-1,type:"button",onClick:()=>h(-1),children:u?E.jsx(GT,{}):E.jsx(qT,{})}),E.jsx("button",{"aria-label":u?"Scroll tabs down":"Scroll tabs right",className:Je(i==null?void 0:i.scrollNext),tabIndex:-1,type:"button",onClick:()=>h(1),children:u?E.jsx(_T,{}):E.jsx(YT,{})})]})},children:e})},bL=({children:e,className:t,...l})=>{const{slots:r}=y.use(xi);return E.jsx(dL,{...l,className:Mt(t,r==null?void 0:r.tab()),"data-slot":"tabs-tab",children:e})},vL=({className:e,...t})=>{const{slots:l}=y.use(xi);return E.jsx(nM,{className:Je(l==null?void 0:l.tabIndicator,e),"data-slot":"tabs-indicator",...t})},yL=({children:e,className:t,...l})=>{const{slots:r}=y.use(xi);return E.jsx(hL,{...l,className:Mt(t,r==null?void 0:r.tabPanel()),"data-slot":"tabs-panel",children:e})},xL=({className:e,...t})=>{const{slots:l}=y.use(xi);return E.jsx(Ct.span,{"aria-hidden":"true",className:Je(l==null?void 0:l.separator,e),"data-slot":"tabs-separator",...t})},ra=Object.assign(zv,{Root:zv,ListContainer:pL,List:gL,Tab:bL,Indicator:vL,Separator:xL,Panel:yL}),Wo=y.createContext({}),Pv=({children:e,className:t,status:l,...r})=>{const i=V.useMemo(()=>_C({status:l}),[l]);return E.jsx(Wo,{value:{slots:i,status:l},children:E.jsx(t2,{value:{variant:"default"},children:E.jsx(Ct.div,{className:i==null?void 0:i.base({className:t}),"data-slot":"alert-root",...r,children:e})})})},SL=({children:e,className:t,...l})=>{const{slots:r,status:i}=y.use(Wo),s=()=>{switch(i){case"accent":return E.jsx(au,{"data-slot":"alert-default-icon"});case"success":return E.jsx(e4,{"data-slot":"alert-default-icon"});case"warning":return E.jsx(Q3,{"data-slot":"alert-default-icon"});case"danger":return E.jsx(J3,{"data-slot":"alert-default-icon"});default:return E.jsx(au,{"data-slot":"alert-default-icon"})}};return E.jsx(Ct.div,{className:Je(r==null?void 0:r.indicator,t),"data-slot":"alert-indicator",...l,children:e??s()})},wL=({children:e,className:t,...l})=>{const{slots:r}=y.use(Wo);return E.jsx(Ct.div,{className:Je(r==null?void 0:r.content,t),"data-slot":"alert-content",...l,children:e})},EL=({children:e,className:t,...l})=>{const{slots:r}=y.use(Wo);return E.jsx(Ct.p,{className:Je(r==null?void 0:r.title,t),"data-slot":"alert-title",...l,children:e})},CL=({children:e,className:t,...l})=>{const{slots:r}=y.use(Wo);return E.jsx(Ct.span,{className:Je(r==null?void 0:r.description,t),"data-slot":"alert-description",...l,children:e})},wo=Object.assign(Pv,{Root:Pv,Indicator:SL,Content:wL,Title:EL,Description:CL}),pn=y.createContext({}),Ov=({children:e,state:t,...l})=>{const r=y.useMemo(()=>({slots:Zh(),placement:void 0}),[]),i=y.useMemo(()=>t?{isOpen:t.isOpen,onOpenChange:t.setOpen}:{},[t]);return E.jsx(pn,{value:r,children:E.jsx(EM,{"data-slot":"modal-root",...Ce(l,i),children:e})})},TL=({children:e,className:t,...l})=>{const{slots:r}=y.use(pn);return E.jsx(kM,{children:E.jsx(Ct.div,{className:Je(r==null?void 0:r.trigger,t),"data-slot":"modal-trigger",role:"button",...l,children:e})})},RL=({children:e,className:t,isDismissable:l=!0,onClick:r,variant:i,...s})=>{const{slots:u}=y.use(pn),f=y.useMemo(()=>Zh({variant:i}),[i]),d=y.useMemo(()=>({slots:{...u,...f}}),[u,f]);return E.jsx(f5,{className:Mt(t,f==null?void 0:f.backdrop()),"data-slot":"modal-backdrop",isDismissable:l,onClick:h=>{h.stopPropagation(),r==null||r(h)},...s,children:h=>E.jsxs(pn,{value:d,children:[typeof e=="function"?e(h):e," "]})})},ML=({children:e,className:t,placement:l="auto",scroll:r,size:i,...s})=>{const{slots:u}=y.use(pn),f=y.useMemo(()=>Zh({scroll:r,size:i}),[r,i]),d=y.useMemo(()=>({placement:l,slots:{...u,...f}}),[u,l,f]);return E.jsx(MM,{className:Mt(t,f==null?void 0:f.container()),"data-placement":l,"data-slot":"modal-container",...s,children:h=>E.jsx(pn,{value:d,children:typeof e=="function"?e(h):e})})},AL=({children:e,className:t,...l})=>{const{placement:r,slots:i}=y.use(pn);return E.jsx(t2,{value:{variant:"default"},children:E.jsx(CM,{className:Je(i==null?void 0:i.dialog,t),"data-placement":r,"data-slot":"modal-dialog",...l,children:e})})},LL=({children:e,className:t,...l})=>{const{slots:r}=y.use(pn);return E.jsx(Ct.div,{className:Je(r==null?void 0:r.header,t),"data-slot":"modal-header",...l,children:e})},kL=({children:e,className:t,...l})=>{const{slots:r}=y.use(pn);return E.jsx(Ct.div,{className:Je(r==null?void 0:r.body,t),"data-slot":"modal-body",...l,children:e})},NL=({children:e,className:t,...l})=>{const{slots:r}=y.use(pn);return E.jsx(Ct.div,{className:Je(r==null?void 0:r.footer,t),"data-slot":"modal-footer",...l,children:e})},DL=({children:e,className:t,...l})=>{const{slots:r}=y.use(pn);return E.jsx(VT,{className:Je(r==null?void 0:r.heading,t),"data-slot":"modal-heading",slot:"title",...l,children:e})},$L=({children:e,className:t,...l})=>{const{slots:r}=y.use(pn);return E.jsx(Ct.div,{className:Je(r==null?void 0:r.icon,t),"data-slot":"modal-icon",...l,children:e})},zL=({className:e,...t})=>{const{slots:l}=y.use(pn);return E.jsx(d5,{className:Mt(e,l==null?void 0:l.closeTrigger()),"data-slot":"modal-close-trigger",slot:"close",...t})},Be=Object.assign(Ov,{Root:Ov,Trigger:TL,Backdrop:RL,Container:ML,Dialog:AL,Header:LL,Icon:$L,Heading:DL,Body:kL,Footer:NL,CloseTrigger:zL}),jv="heroui-theme",Mx="(prefers-color-scheme: dark)";function PL(e){if(typeof window>"u")return()=>{};const t=window.matchMedia(Mx);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function OL(){var e;return(e=window.matchMedia)!=null&&e.call(window,Mx).matches?"dark":"light"}function jL(){}function IL(e,t){t!==e&&(t&&document.documentElement.classList.remove(t),document.documentElement.classList.add(e),document.documentElement.setAttribute("data-theme",e))}function BL(e="system"){const[t,l]=y.useState(()=>typeof window>"u"?e:localStorage.getItem(jv)??e),r=y.useSyncExternalStore(PL,OL,jL),i=t==="system"?r:t,s=y.useRef(void 0);wx(()=>{i&&(IL(i,s.current),s.current=i)},[i]);const u=y.useCallback(f=>{typeof window>"u"||(localStorage.setItem(jv,f),l(f))},[]);return{resolvedTheme:i,setTheme:u,theme:t}}const Ax=y.createContext(null);function HL({children:e}){const{theme:t,setTheme:l}=BL("light"),r=t==="dark"?"dark":"light",i=y.useCallback(f=>{l(f)},[l]),s=y.useCallback(()=>{l(r==="light"?"dark":"light")},[l,r]),u=y.useMemo(()=>({theme:r,setTheme:i,toggleTheme:s}),[r,i,s]);return E.jsx(Ax.Provider,{value:u,children:e})}function Az(){const e=y.useContext(Ax);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const KL=e=>y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),y.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.53 11.78a.75.75 0 0 1-1.06 0l-2.5-2.5a.75.75 0 0 1 1.06-1.06l1.22 1.22V1.75a.75.75 0 0 1 1.5 0v7.69l1.22-1.22a.75.75 0 1 1 1.06 1.06zM1.75 13.5a.75.75 0 0 0 0 1.5h12.5a.75.75 0 0 0 0-1.5z",clipRule:"evenodd"})),UL=e=>y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),y.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14m1-9.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0m-.25 3a.75.75 0 0 0-1.5 0V11a.75.75 0 0 0 1.5 0z",clipRule:"evenodd"})),FL=e=>y.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),y.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.199 2H8.8a.2.2 0 0 1 .2.2c0 1.808 1.958 2.939 3.524 2.034a.2.2 0 0 1 .271.073l.802 1.388a.2.2 0 0 1-.073.272c-1.566.904-1.566 3.164 0 4.069a.2.2 0 0 1 .073.271l-.802 1.388a.2.2 0 0 1-.271.073C10.958 10.863 9 11.993 9 13.8a.2.2 0 0 1-.199.2H7.2a.2.2 0 0 1-.2-.2c0-1.808-1.958-2.938-3.524-2.034a.2.2 0 0 1-.272-.073l-.8-1.388a.2.2 0 0 1 .072-.271c1.566-.905 1.566-3.165 0-4.07a.2.2 0 0 1-.073-.27l.801-1.389a.2.2 0 0 1 .272-.072C5.042 5.138 7 4.007 7 2.199c0-.11.089-.199.199-.199M5.5 2.2c0-.94.76-1.7 1.699-1.7H8.8c.94 0 1.7.76 1.7 1.7a.85.85 0 0 0 1.274.735 1.7 1.7 0 0 1 2.32.622l.802 1.388c.469.813.19 1.851-.622 2.32a.85.85 0 0 0 0 1.472 1.7 1.7 0 0 1 .622 2.32l-.802 1.388a1.7 1.7 0 0 1-2.32.622.85.85 0 0 0-1.274.735c0 .939-.76 1.7-1.699 1.7H7.2a1.7 1.7 0 0 1-1.699-1.7.85.85 0 0 0-1.274-.735 1.7 1.7 0 0 1-2.32-.622l-.802-1.388a1.7 1.7 0 0 1 .622-2.32.85.85 0 0 0 0-1.471 1.7 1.7 0 0 1-.622-2.32l.801-1.389a1.7 1.7 0 0 1 2.32-.622A.85.85 0 0 0 5.5 2.2m4 5.8a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0",clipRule:"evenodd"})),VL="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20d='M9.205%208.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357%201.356-.523%202.117-.523%202.854%200%204.662%202.212%204.662%204.566%200%20.167%200%20.357-.024.547l-4.71-2.759a.797.797%200%2000-.856%200l-5.97%203.473zm10.609%208.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473%201.95-1.118a.433.433%200%2001.476%200l4.543%202.617c1.309.76%202.189%202.378%202.189%203.948%200%201.808-1.07%203.473-2.76%204.163zM7.802%2012.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545%201.95-4.472%204.591-4.472%201%200%201.927.333%202.712.928L8.23%205.067c-.285.166-.428.404-.428.737v6.898zM12%2015.128l-2.795-1.57v-3.33L12%208.658l2.795%201.57v3.33L12%2015.128zm1.796%207.23c-1%200-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974%201.142c.167.095.238.238.238.428v5.233c0%202.545-1.974%204.472-4.614%204.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482%204.482%200%20014.21%206.327v5.423c0%20.333.143.571.428.738l5.947%203.449-1.95%201.118a.432.432%200%2001-.476%200zm-.262%203.9c-2.688%200-4.662-2.021-4.662-4.519%200-.19.024-.38.047-.57l4.686%202.71c.286.167.571.167.856%200l5.97-3.448v2.26c0%20.19-.07.333-.237.428l-4.543%202.616c-.619.357-1.356.523-2.117.523zm5.899%202.83a5.947%205.947%200%20005.827-4.756C22.287%2018.339%2024%2015.84%2024%2013.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498%200-3.401-2.759-5.947-5.946-5.947-.642%200-1.26.095-1.88.31A5.962%205.962%200%200010.205%200a5.947%205.947%200%2000-5.827%204.757C1.713%205.447%200%207.945%200%2010.49c0%201.666.713%203.283%201.998%204.448-.119.5-.19%201-.19%201.499%200%203.401%202.759%205.946%205.946%205.946.642%200%201.26-.095%201.88-.309a5.96%205.96%200%20004.162%201.713z'%3e%3c/path%3e%3c/svg%3e",Eh="https://lf3-cdn-tos.draftstatic.com/obj/ies-hotsoon-draft/juejin/7b28b328-1ae4-4781-8d46-430fef1b872e.html";async function _L(){var t;const e=(t=window.tud)==null?void 0:t.openExternal;if(typeof e=="function"){await e(Eh);return}window.open(Eh,"_blank","noopener,noreferrer")}function GL({isOpen:e,onOpenChange:t,onConfirm:l}){const[r,i]=y.useState(!1);return y.useEffect(()=>{e&&i(!1)},[e]),E.jsx(Be.Backdrop,{isOpen:e,onOpenChange:t,variant:"blur",children:E.jsx(Be.Container,{size:"sm",children:E.jsxs(Be.Dialog,{children:[E.jsx(Be.CloseTrigger,{"aria-label":"关闭"}),E.jsx(Be.Header,{children:E.jsx(Be.Heading,{children:"用户协议"})}),E.jsxs(Be.Body,{className:"space-y-4 text-sm leading-6 text-muted",children:[E.jsx("p",{children:"关联掘金账号后,本机用量数据将在您开启云端同步时上传至掘金服务。请先阅读并同意相关协议。"}),E.jsx(ha,{id:"juejin-login-consent",isSelected:r,onChange:i,children:E.jsxs(ha.Content,{children:[E.jsx(ha.Control,{children:E.jsx(ha.Indicator,{})}),E.jsxs("span",{children:["我已阅读并同意",E.jsx("button",{className:"mx-0.5 text-accent underline underline-offset-2 hover:opacity-80",onClick:s=>{s.preventDefault(),s.stopPropagation(),_L()},type:"button",children:"《稀土掘金隐私政策》"}),",并同意上传数据"]})]})})]}),E.jsxs(Be.Footer,{className:"gap-2",children:[E.jsx(mn,{slot:"close",variant:"tertiary",children:"取消"}),E.jsx(mn,{isDisabled:!r,onPress:()=>{t(!1),l()},variant:"primary",children:"同意并登录"})]})]})})})}const qL="/assets/antigravity-color-DgAQAdn3.svg",YL="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eAmp%3c/title%3e%3cpath%20d='M15.087%2023.18L12.03%2024l-2.097-7.823-5.738%205.738-2.251-2.251%205.718-5.719-7.769-2.082.82-3.057%2011.294%203.08%203.08%2011.295z'%20fill='%23F34E3F'%3e%3c/path%3e%3cpath%20d='M19.505%2018.762l-3.057.82-2.564-9.573-9.572-2.564.819-3.057%2011.295%203.079%203.08%2011.295z'%20fill='%23F34E3F'%3e%3c/path%3e%3cpath%20d='M23.893%2014.374l-3.057.82-2.565-9.572L8.7%203.057%209.52%200l11.295%203.08%203.079%2011.294z'%20fill='%23F34E3F'%3e%3c/path%3e%3c/svg%3e",XL="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eClaude%20Code%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M20.998%2010.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6%2010.949h1.488V8.102H6v2.847zm10.51%200H18V8.102h-1.49v2.847z'%20fill='%23D97757'%20fill-rule='evenodd'%3e%3c/path%3e%3c/svg%3e",WL="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCline%3c/title%3e%3cpath%20d='M17.035%203.991c2.75%200%204.98%202.24%204.98%205.003v1.667l1.45%202.896a1.01%201.01%200%2001-.002.909l-1.448%202.864v1.668c0%202.762-2.23%205.002-4.98%205.002H7.074c-2.751%200-4.98-2.24-4.98-5.002V17.33l-1.48-2.855a1.01%201.01%200%2001-.003-.927l1.482-2.887V8.994c0-2.763%202.23-5.003%204.98-5.003h9.962zM8.265%209.6a2.274%202.274%200%2000-2.274%202.274v4.042a2.274%202.274%200%20004.547%200v-4.042A2.274%202.274%200%20008.265%209.6zm7.326%200a2.274%202.274%200%2000-2.274%202.274v4.042a2.274%202.274%200%20104.548%200v-4.042A2.274%202.274%200%200015.59%209.6z'%3e%3c/path%3e%3cpath%20d='M12.054%205.558a2.779%202.779%200%20100-5.558%202.779%202.779%200%20000%205.558z'%3e%3c/path%3e%3c/svg%3e",Iv="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodeBuddy%3c/title%3e%3cpath%20d='M18.821%200H5.18A5.179%205.179%200%20000%205.179V18.82A5.179%205.179%200%20005.179%2024H18.82A5.179%205.179%200%200024%2018.821V5.18A5.179%205.179%200%200018.821%200z'%20fill='url(%23lobe-icons-code-buddy-_R_0_)'%3e%3c/path%3e%3cpath%20d='M18.777%201.647c.28-.02.536.114.972.51%201.018.926%202.437%202.828%203.318%204.452l.34.631.482.24.11.06v3.638a5.206%205.206%200%2000-5.32-1.23c-.491.166-1.021.471-2.08%201.082l-6.09%203.516c-1.057.61-1.586.916-1.975%201.259a5.208%205.208%200%2000-1.493%205.572c.165.49.471%201.02%201.082%202.08l.315.543h-3.26c-.685%200-1.34-.135-1.939-.377-.169-.956-.009-1.789.469-2.335.158-.18.164-.189.13-.493a11.846%2011.846%200%2001-.057-1.711l.02-.444-.667-1.18C2.1%2015.622%201.445%2014.078%201.192%2012.9c-.133-.647-.125-.934.04-1.146.1-.128.427-.261.822-.334.994-.175%203.162-.017%205.575.41l.25.043.551-.487c.915-.81%201.522-1.264%202.641-1.962%201.167-.73%202.484-1.331%203.967-1.807l.476-.152.261-.688c.937-2.471%201.896-4.293%202.58-4.9.235-.21.25-.22.422-.23z'%20fill='%23fff'%3e%3c/path%3e%3cpath%20d='M12.139%2018.2a1.203%201.203%200%20011.642.44l1.296%202.243a1.204%201.204%200%2001-2.083%201.203l-1.296-2.243a1.203%201.203%200%2001.44-1.644zM18.629%2014.452a1.203%201.203%200%20011.642.44l1.295%202.244a1.203%201.203%200%2011-2.083%201.203l-1.295-2.243a1.203%201.203%200%2001.44-1.644z'%20fill='%23fff'%3e%3c/path%3e%3cdefs%3e%3cradialGradient%20cx='0'%20cy='0'%20gradientTransform='matrix(-9.00009%20-16%2016%20-9.00009%2021%2024.5)'%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-code-buddy-_R_0_'%20r='1'%3e%3cstop%20stop-color='%232EA99D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%236C4DFF'%3e%3c/stop%3e%3c/radialGradient%3e%3c/defs%3e%3c/svg%3e",Bv="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",ZL="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCopilot%3c/title%3e%3cpath%20d='M17.533%201.829A2.528%202.528%200%200015.11%200h-.737a2.531%202.531%200%2000-2.484%202.087l-1.263%206.937.314-1.08a2.528%202.528%200%20012.424-1.833h4.284l1.797.706%201.731-.706h-.505a2.528%202.528%200%2001-2.423-1.829l-.715-2.453z'%20fill='url(%23lobe-icons-copilot-0-_R_0_)'%20transform='translate(0%201)'%3e%3c/path%3e%3cpath%20d='M6.726%2020.16A2.528%202.528%200%20009.152%2022h1.566c1.37%200%202.49-1.1%202.525-2.48l.17-6.69-.357%201.228a2.528%202.528%200%2001-2.423%201.83h-4.32l-1.54-.842-1.667.843h.497c1.124%200%202.113.75%202.426%201.84l.697%202.432z'%20fill='url(%23lobe-icons-copilot-1-_R_0_)'%20transform='translate(0%201)'%3e%3c/path%3e%3cpath%20d='M15%200H6.252c-2.5%200-4%203.331-5%206.662-1.184%203.947-2.734%209.225%201.75%209.225H6.78c1.13%200%202.12-.753%202.43-1.847.657-2.317%201.809-6.359%202.713-9.436.46-1.563.842-2.906%201.43-3.742A1.97%201.97%200%200115%200'%20fill='url(%23lobe-icons-copilot-2-_R_0_)'%20transform='translate(0%201)'%3e%3c/path%3e%3cpath%20d='M15%200H6.252c-2.5%200-4%203.331-5%206.662-1.184%203.947-2.734%209.225%201.75%209.225H6.78c1.13%200%202.12-.753%202.43-1.847.657-2.317%201.809-6.359%202.713-9.436.46-1.563.842-2.906%201.43-3.742A1.97%201.97%200%200115%200'%20fill='url(%23lobe-icons-copilot-3-_R_0_)'%20transform='translate(0%201)'%3e%3c/path%3e%3cpath%20d='M9%2022h8.749c2.5%200%204-3.332%205-6.663%201.184-3.948%202.734-9.227-1.75-9.227H17.22c-1.129%200-2.12.754-2.43%201.848a1149.2%201149.2%200%2001-2.713%209.437c-.46%201.564-.842%202.907-1.43%203.743A1.97%201.97%200%20019%2022'%20fill='url(%23lobe-icons-copilot-4-_R_0_)'%20transform='translate(0%201)'%3e%3c/path%3e%3cpath%20d='M9%2022h8.749c2.5%200%204-3.332%205-6.663%201.184-3.948%202.734-9.227-1.75-9.227H17.22c-1.129%200-2.12.754-2.43%201.848a1149.2%201149.2%200%2001-2.713%209.437c-.46%201.564-.842%202.907-1.43%203.743A1.97%201.97%200%20019%2022'%20fill='url(%23lobe-icons-copilot-5-_R_0_)'%20transform='translate(0%201)'%3e%3c/path%3e%3cdefs%3e%3cradialGradient%20cx='85.44%25'%20cy='100.653%25'%20fx='85.44%25'%20fy='100.653%25'%20gradientTransform='scale(-.8553%20-1)%20rotate(50.927%202.041%20-1.946)'%20id='lobe-icons-copilot-0-_R_0_'%20r='105.116%25'%3e%3cstop%20offset='9.6%25'%20stop-color='%2300AEFF'%3e%3c/stop%3e%3cstop%20offset='77.3%25'%20stop-color='%232253CE'%3e%3c/stop%3e%3cstop%20offset='100%25'%20stop-color='%230736C4'%3e%3c/stop%3e%3c/radialGradient%3e%3cradialGradient%20cx='18.143%25'%20cy='32.928%25'%20fx='18.143%25'%20fy='32.928%25'%20gradientTransform='scale(.8897%201)%20rotate(52.069%20.193%20.352)'%20id='lobe-icons-copilot-1-_R_0_'%20r='95.612%25'%3e%3cstop%20offset='0%25'%20stop-color='%23FFB657'%3e%3c/stop%3e%3cstop%20offset='63.4%25'%20stop-color='%23FF5F3D'%3e%3c/stop%3e%3cstop%20offset='92.3%25'%20stop-color='%23C02B3C'%3e%3c/stop%3e%3c/radialGradient%3e%3cradialGradient%20cx='82.987%25'%20cy='-9.792%25'%20fx='82.987%25'%20fy='-9.792%25'%20gradientTransform='scale(-1%20-.9441)%20rotate(-70.872%20.142%201.17)'%20id='lobe-icons-copilot-4-_R_0_'%20r='140.622%25'%3e%3cstop%20offset='6.6%25'%20stop-color='%238C48FF'%3e%3c/stop%3e%3cstop%20offset='50%25'%20stop-color='%23F2598A'%3e%3c/stop%3e%3cstop%20offset='89.6%25'%20stop-color='%23FFB152'%3e%3c/stop%3e%3c/radialGradient%3e%3clinearGradient%20id='lobe-icons-copilot-2-_R_0_'%20x1='39.465%25'%20x2='46.884%25'%20y1='12.117%25'%20y2='103.774%25'%3e%3cstop%20offset='15.6%25'%20stop-color='%230D91E1'%3e%3c/stop%3e%3cstop%20offset='48.7%25'%20stop-color='%2352B471'%3e%3c/stop%3e%3cstop%20offset='65.2%25'%20stop-color='%2398BD42'%3e%3c/stop%3e%3cstop%20offset='93.7%25'%20stop-color='%23FFC800'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20id='lobe-icons-copilot-3-_R_0_'%20x1='45.949%25'%20x2='50%25'%20y1='0%25'%20y2='100%25'%3e%3cstop%20offset='0%25'%20stop-color='%233DCBFF'%3e%3c/stop%3e%3cstop%20offset='24.7%25'%20stop-color='%230588F7'%20stop-opacity='0'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20id='lobe-icons-copilot-5-_R_0_'%20x1='83.507%25'%20x2='83.453%25'%20y1='-6.106%25'%20y2='21.131%25'%3e%3cstop%20offset='5.8%25'%20stop-color='%23F8ADFA'%3e%3c/stop%3e%3cstop%20offset='70.8%25'%20stop-color='%23A86EDD'%20stop-opacity='0'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",QL="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCursor%3c/title%3e%3cpath%20d='M22.106%205.68L12.5.135a.998.998%200%2000-.998%200L1.893%205.68a.84.84%200%2000-.419.726v11.186c0%20.3.16.577.42.727l9.607%205.547a.999.999%200%2000.998%200l9.608-5.547a.84.84%200%2000.42-.727V6.407a.84.84%200%2000-.42-.726zm-.603%201.176L12.228%2022.92c-.063.108-.228.064-.228-.061V12.34a.59.59%200%2000-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264%200%20.428.286.296.514z'%3e%3c/path%3e%3c/svg%3e",JL="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eDevin%3c/title%3e%3cpath%20d='M2.033%209.867l2.554%201.483a.589.589%200%2000.592%200l2.554-1.483.01-.008a.608.608%200%2000.11-.084l.013-.015a.631.631%200%2000.076-.1c.003-.005.008-.01.01-.016a.558.558%200%2000.052-.125l.007-.028a.611.611%200%2000.019-.14V7.868c0-.572.307-1.105.8-1.392a1.595%201.595%200%20011.598%200l1.277.742a.54.54%200%2000.129.053l.028.01c.044.01.088.015.133.016h.006l.013-.002a.587.587%200%2000.27-.074l.011-.004%202.554-1.483a.596.596%200%2000.297-.516V2.253a.595.595%200%2000-.297-.516L12.293.257a.587.587%200%2000-.591%200L9.148%201.737l-.01.01a.609.609%200%2000-.109.083l-.014.015a.632.632%200%2000-.076.1c-.003.005-.008.01-.01.016a.57.57%200%2000-.052.124l-.007.028a.612.612%200%2000-.018.14v1.483c0%20.572-.307%201.105-.8%201.393a1.597%201.597%200%2001-1.599%200l-1.276-.742a.603.603%200%2000-.13-.053l-.028-.008a.658.658%200%2000-.133-.018h-.02a.57.57%200%2000-.269.074c-.003.002-.008.002-.012.005L2.033%205.872a.596.596%200%2000-.297.515v2.966c0%20.213.113.41.297.515z'%20fill='%233969CA'%3e%3c/path%3e%3cpath%20d='M15.943%2010.607a1.596%201.596%200%20011.599%200l1.276.74c.041.025.085.04.13.055l.028.008c.043.01.088.016.133.018h.005c.005%200%20.01-.002.014-.003a.474.474%200%2000.122-.016l.021-.005a.616.616%200%2000.126-.052c.004-.002.009-.002.013-.005l2.554-1.482a.597.597%200%2000.297-.516V6.383a.596.596%200%2000-.297-.515l-2.552-1.483a.587.587%200%2000-.592%200l-2.553%201.482-.011.008a.61.61%200%2000-.108.084l-.014.016a.637.637%200%2000-.076.1c-.003.005-.008.01-.01.016a.57.57%200%2000-.052.124l-.007.029a.612.612%200%2000-.018.14v1.482c0%20.572-.307%201.105-.8%201.393a1.597%201.597%200%2001-1.599%200l-1.276-.742a.584.584%200%2000-.13-.053l-.028-.008a.62.62%200%2000-.133-.018h-.02a.587.587%200%2000-.269.074l-.012.004L9.15%2010a.596.596%200%2000-.296.516v2.966c0%20.212.112.409.296.515l2.554%201.483s.008.002.012.005c.04.022.082.04.126.052l.02.004a.57.57%200%2000.123.017l.014.002h.006c.054%200%20.108-.01.16-.025a.587.587%200%2000.13-.054l1.277-.741a1.597%201.597%200%20012.398%201.392v1.482c0%20.049.007.095.019.14l.007.028a.619.619%200%2000.051.125c.004.006.008.01.01.016a.6.6%200%2000.076.1l.014.015c.033.032.069.06.108.084.004.002.006.006.011.008l2.554%201.483a.59.59%200%2000.593%200l2.554-1.483a.597.597%200%2000.296-.516v-2.965a.595.595%200%2000-.296-.516l-2.554-1.483s-.008-.002-.012-.005a.54.54%200%2000-.126-.051c-.007-.003-.013-.003-.02-.005a.635.635%200%2000-.125-.017h-.018a.557.557%200%2000-.16.026.588.588%200%2000-.13.053l-1.276.742a1.595%201.595%200%2001-1.598%200%201.615%201.615%200%20010-2.785l-.005-.001z'%20fill='%2321C19A'%3e%3c/path%3e%3cpath%20d='M14.848%2018.265l-2.554-1.482-.012-.005a.526.526%200%2000-.126-.052c-.007-.002-.014-.002-.02-.005a.64.64%200%2000-.124-.017h-.02a.56.56%200%2000-.16.026.588.588%200%2000-.13.053l-1.276.742a1.594%201.594%200%2001-1.598%200c-.493-.286-.8-.82-.8-1.393V14.65a.563.563%200%2000-.018-.14l-.008-.028a.604.604%200%2000-.051-.124l-.01-.017a.603.603%200%2000-.076-.1l-.014-.015a.596.596%200%2000-.109-.084c-.003-.002-.005-.006-.01-.008L5.178%2012.65a.587.587%200%2000-.591%200l-2.554%201.483a.596.596%200%2000-.297.516v2.965c0%20.213.113.41.297.516l2.554%201.483.012.004a.618.618%200%2000.267.074l.016.002h.007a.55.55%200%2000.16-.026.584.584%200%2000.129-.053l1.277-.742a1.597%201.597%200%20012.398%201.393v1.482c0%20.05.007.095.019.14l.007.028c.013.044.03.085.051.125l.01.016c.022.036.047.07.076.1l.014.015c.032.032.069.06.109.084l.01.008%202.554%201.483a.587.587%200%2000.593%200l2.554-1.483a.596.596%200%2000.296-.515v-2.966a.596.596%200%2000-.296-.516h-.002z'%20fill='%230294DE'%3e%3c/path%3e%3c/svg%3e",ek="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGemini%3c/title%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%20fill='%233186FF'%3e%3c/path%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%20fill='url(%23lobe-icons-gemini-0-_R_0_)'%3e%3c/path%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%20fill='url(%23lobe-icons-gemini-1-_R_0_)'%3e%3c/path%3e%3cpath%20d='M20.616%2010.835a14.147%2014.147%200%2001-4.45-3.001%2014.111%2014.111%200%2001-3.678-6.452.503.503%200%2000-.975%200%2014.134%2014.134%200%2001-3.679%206.452%2014.155%2014.155%200%2001-4.45%203.001c-.65.28-1.318.505-2.002.678a.502.502%200%20000%20.975c.684.172%201.35.397%202.002.677a14.147%2014.147%200%20014.45%203.001%2014.112%2014.112%200%20013.679%206.453.502.502%200%2000.975%200c.172-.685.397-1.351.677-2.003a14.145%2014.145%200%20013.001-4.45%2014.113%2014.113%200%20016.453-3.678.503.503%200%20000-.975%2013.245%2013.245%200%2001-2.003-.678z'%20fill='url(%23lobe-icons-gemini-2-_R_0_)'%3e%3c/path%3e%3cdefs%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-gemini-0-_R_0_'%20x1='7'%20x2='11'%20y1='15.5'%20y2='12'%3e%3cstop%20stop-color='%2308B962'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%2308B962'%20stop-opacity='0'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-gemini-1-_R_0_'%20x1='8'%20x2='11.5'%20y1='5.5'%20y2='11'%3e%3cstop%20stop-color='%23F94543'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23F94543'%20stop-opacity='0'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-gemini-2-_R_0_'%20x1='3.5'%20x2='17.5'%20y1='13.5'%20y2='12'%3e%3cstop%20stop-color='%23FABC12'%3e%3c/stop%3e%3cstop%20offset='.46'%20stop-color='%23FABC12'%20stop-opacity='0'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",tk="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGemini%20CLI%3c/title%3e%3cpath%20d='M0%204.391A4.391%204.391%200%20014.391%200h15.217A4.391%204.391%200%200124%204.391v15.217A4.391%204.391%200%200119.608%2024H4.391A4.391%204.391%200%20010%2019.608V4.391z'%20fill='url(%23lobe-icons-gemini-cli-_R_0_)'%3e%3c/path%3e%3cpath%20clip-rule='evenodd'%20d='M19.74%201.444a2.816%202.816%200%20012.816%202.816v15.48a2.816%202.816%200%2001-2.816%202.816H4.26a2.816%202.816%200%2001-2.816-2.816V4.26A2.816%202.816%200%20014.26%201.444h15.48zM7.236%208.564l7.752%203.728-7.752%203.727v2.802l9.557-4.596v-3.866L7.236%205.763v2.801z'%20fill='%231E1E2E'%20fill-rule='evenodd'%3e%3c/path%3e%3cdefs%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-gemini-cli-_R_0_'%20x1='24'%20x2='0'%20y1='6.587'%20y2='16.494'%3e%3cstop%20stop-color='%23EE4D5D'%3e%3c/stop%3e%3cstop%20offset='.328'%20stop-color='%23B381DD'%3e%3c/stop%3e%3cstop%20offset='.476'%20stop-color='%23207CFE'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",nk="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGoose%3c/title%3e%3cpath%20d='M21.595%2023.61c1.167-.254%202.405-.944%202.405-.944l-2.167-1.784a12.124%2012.124%200%2001-2.695-3.131%2012.127%2012.127%200%2000-3.97-4.049l-.794-.462a1.115%201.115%200%2001-.488-.815.844.844%200%2001.154-.575c.413-.582%202.548-3.115%202.94-3.44.503-.416%201.065-.762%201.586-1.159.074-.056.148-.112.221-.17.003-.002.007-.004.009-.007.167-.131.325-.272.45-.438.453-.524.563-.988.59-1.193-.061-.197-.244-.639-.753-1.148.319.02.705.272%201.056.569.235-.376.481-.773.727-1.171.165-.266-.08-.465-.086-.471h-.001V3.22c-.007-.007-.206-.25-.471-.086-.567.35-1.134.702-1.639%201.021%200%200-.597-.012-1.305.599a2.464%202.464%200%2000-.438.45l-.007.009c-.058.072-.114.147-.17.221-.397.521-.743%201.083-1.16%201.587-.323.391-2.857%202.526-3.44%202.94a.842.842%200%2001-.574.153%201.115%201.115%200%2001-.815-.488l-.462-.794a12.123%2012.123%200%2000-4.049-3.97%2012.133%2012.133%200%2001-3.13-2.695L1.332%200S.643%201.238.39%202.405c.352.428%201.27%201.49%202.34%202.302C1.58%204.167.73%203.75.06%203.4c-.103.765-.063%201.92.043%202.816.726.317%201.961.806%203.219%201.066-1.006.236-2.11.278-2.961.262.15.554.358%201.119.64%201.688.119.263.25.52.39.77.452.125%202.222.383%203.164.171l-2.51.897a27.776%2027.776%200%20002.544%202.726c2.031-1.092%202.494-1.241%204.018-2.238-2.467%202.008-3.108%202.828-3.8%203.67l-.483.678c-.25.351-.469.725-.65%201.117-.61%201.31-1.47%204.1-1.47%204.1-.154.486.202.842.674.674%200%200%202.79-.861%204.1-1.47.392-.182.766-.4%201.118-.65l.677-.483c.227-.187.453-.37.701-.586%200%200%201.705%202.02%203.458%203.349l.896-2.511c-.211.942.046%202.712.17%203.163.252.142.509.272.772.392.569.28%201.134.49%201.688.64-.016-.853.026-1.956.261-2.962.26%201.258.75%202.493%201.067%203.219.895.106%202.051.146%202.816.043a73.87%2073.87%200%2001-1.308-2.67c.811%201.07%201.874%201.988%202.302%202.34h-.001z'%3e%3c/path%3e%3c/svg%3e",lk="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGrok%3c/title%3e%3cpath%20d='M9.27%2015.29l7.978-5.897c.391-.29.95-.177%201.137.272.98%202.369.542%205.215-1.41%207.169-1.951%201.954-4.667%202.382-7.149%201.406l-2.711%201.257c3.889%202.661%208.611%202.003%2011.562-.953%202.341-2.344%203.066-5.539%202.388-8.42l.006.007c-.983-4.232.242-5.924%202.75-9.383.06-.082.12-.164.179-.248l-3.301%203.305v-.01L9.267%2015.292M7.623%2016.723c-2.792-2.67-2.31-6.801.071-9.184%201.761-1.763%204.647-2.483%207.166-1.425l2.705-1.25a7.808%207.808%200%2000-1.829-1A8.975%208.975%200%20005.984%205.83c-2.533%202.536-3.33%206.436-1.962%209.764%201.022%202.487-.653%204.246-2.34%206.022-.599.63-1.199%201.259-1.682%201.925l7.62-6.815'%3e%3c/path%3e%3c/svg%3e",ak="/assets/hermesagent-DUfTwIy7.svg",rk="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eKimi%3c/title%3e%3cpath%20d='M21.846%200a1.923%201.923%200%20110%203.846H20.15a.226.226%200%2001-.227-.226V1.923C19.923.861%2020.784%200%2021.846%200z'%20fill='%231783FF'%3e%3c/path%3e%3cpath%20d='M11.065%2011.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164%200%2000-.117.051l-7.82%207.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103%200-.186.103-.186.23V19.77c0%20.128.083.23.186.23h2.69c.103%200%20.186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158%200%2001.205-.023l6.484%204.772a7.677%207.677%200%20003.453%201.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028%205.028%200%2001-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z'%20fill='%23fff'%3e%3c/path%3e%3c/svg%3e",Hv="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eKilo%20Code%3c/title%3e%3cpath%20d='M0%200v24h24V0H0zm22.222%2022.222H1.778V1.778h20.444v20.444zm-7.555-4.964h2.222v1.778h-2.794L12.89%2017.83v-2.794h1.778v2.222zm4%200h-1.778v-2.222h-2.222v-1.778h2.793l1.207%201.207v2.793zm-7.556-2.591H9.333v-1.778h1.778v1.778zm-5.778-1.778h1.778v4h4v1.778H6.54L5.333%2017.46V12.89zm13.334-3.556v1.778h-5.778V9.333h1.987V7.111h-1.987V5.333h2.558l1.206%201.207v2.793h2.014zm-11.556-2h2.222l1.778%201.778v2H9.333v-2H7.111v2H5.333V5.333h1.778v2zm4%200H9.333v-2h1.778v2z'%3e%3c/path%3e%3c/svg%3e",ik="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eKiro%3c/title%3e%3cpath%20d='M18.8%200H5.2A5.2%205.2%200%20000%205.2v13.6A5.2%205.2%200%20005.2%2024h13.6a5.2%205.2%200%20005.2-5.2V5.2A5.2%205.2%200%200018.8%200z'%20fill='%239046FF'%3e%3c/path%3e%3cpath%20d='M7.97%2016.376c-1.644%203.642%201.86%204.556%204.443%202.424.76%202.39%203.608.607%204.631-1.247%202.251-4.084%201.342-8.249%201.108-9.108-1.6-5.859-9.6-5.869-10.976.03-.323%201.033-.328%202.206-.507%203.423-.09.617-.16%201.009-.393%201.655-.139.373-.323.7-.62%201.257-.458.865-.264%202.53%202.101%201.665l.224-.1h-.01l-.001.001z'%20fill='%23fff'%3e%3c/path%3e%3cpath%20d='M12.722%2010.985c-.656%200-.755-.785-.755-1.252%200-.423.074-.756.218-.97a.61.61%200%2001.537-.283c.229%200%20.428.095.567.289.159.218.243.55.243.964%200%20.785-.303%201.252-.805%201.252h-.005zm2.703%200c-.656%200-.755-.785-.755-1.252%200-.423.074-.756.219-.97a.61.61%200%2001.536-.283c.229%200%20.428.095.567.289.159.218.243.55.243.964%200%20.785-.303%201.252-.805%201.252h-.005z'%20fill='%23000'%3e%3c/path%3e%3c/svg%3e",ok="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenClaw%3c/title%3e%3cpath%20d='M12%202.568c-6.33%200-9.495%205.275-9.495%209.495%200%204.22%203.165%208.44%206.33%209.494v2.11h2.11v-2.11s1.055.422%202.11%200v2.11h2.11v-2.11c3.165-1.055%206.33-5.274%206.33-9.494S18.33%202.568%2012%202.568z'%20fill='url(%23lobe-icons-open-claw-0-_R_0_)'%3e%3c/path%3e%3cpath%20d='M3.56%209.953C.396%208.898-.66%2011.008.396%2013.118c1.055%202.11%203.164%201.055%204.22-1.055.632-1.477%200-2.11-1.056-2.11z'%20fill='url(%23lobe-icons-open-claw-1-_R_0_)'%3e%3c/path%3e%3cpath%20d='M20.44%209.953c3.164-1.055%204.22%201.055%203.164%203.165-1.055%202.11-3.164%201.055-4.22-1.055-.632-1.477%200-2.11%201.056-2.11z'%20fill='url(%23lobe-icons-open-claw-2-_R_0_)'%3e%3c/path%3e%3cpath%20d='M5.507%201.875c.476-.285%201.036-.233%201.615.037.577.27%201.223.774%201.937%201.488a.316.316%200%2001-.447.447c-.693-.693-1.279-1.138-1.757-1.361-.475-.222-.795-.205-1.022-.069a.317.317%200%2001-.326-.542zM16.877%201.913c.58-.27%201.14-.323%201.616-.038a.317.317%200%2001-.326.542c-.227-.136-.547-.153-1.022.069-.478.223-1.064.668-1.756%201.361a.316.316%200%2011-.448-.447c.714-.714%201.36-1.218%201.936-1.487z'%20fill='%23FF4D4D'%3e%3c/path%3e%3cpath%20d='M8.835%209.109a1.266%201.266%200%20100-2.532%201.266%201.266%200%20000%202.532zM15.165%209.109a1.266%201.266%200%20100-2.532%201.266%201.266%200%20000%202.532z'%20fill='%23050810'%3e%3c/path%3e%3cpath%20d='M9.046%208.16a.527.527%200%20100-1.056.527.527%200%20000%201.055zM15.376%208.16a.527.527%200%20100-1.055.527.527%200%20000%201.054z'%20fill='%2300E5CC'%3e%3c/path%3e%3cdefs%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-open-claw-0-_R_0_'%20x1='-.659'%20x2='27.023'%20y1='.458'%20y2='22.855'%3e%3cstop%20stop-color='%23FF4D4D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23991B1B'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-open-claw-1-_R_0_'%20x1='0'%20x2='4.311'%20y1='9.672'%20y2='14.949'%3e%3cstop%20stop-color='%23FF4D4D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23991B1B'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-open-claw-2-_R_0_'%20x1='19.385'%20x2='24.399'%20y1='9.953'%20y2='14.462'%3e%3cstop%20stop-color='%23FF4D4D'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23991B1B'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",sk="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eopencode%3c/title%3e%3cpath%20d='M16%206H8v12h8V6zm4%2016H4V2h16v20z'%3e%3c/path%3e%3c/svg%3e",ck="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3ePi%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M1%201h16.5v11H12v5.5H6.5V23H1V1zm5.5%205.5V12H12V6.5H6.5z'%3e%3c/path%3e%3cpath%20d='M17.5%2012H23v11h-5.5V12z'%3e%3c/path%3e%3c/svg%3e",uk="/assets/qoder-color-CCjsVbDP.svg",Kv="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eQwen%3c/title%3e%3cpath%20d='M12.604%201.34c.393.69.784%201.382%201.174%202.075a.18.18%200%2000.157.091h5.552c.174%200%20.322.11.446.327l1.454%202.57c.19.337.24.478.024.837-.26.43-.513.864-.76%201.3l-.367.658c-.106.196-.223.28-.04.512l2.652%204.637c.172.301.111.494-.043.77-.437.785-.882%201.564-1.335%202.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099%200%2000-.081.05%20575.097%20575.097%200%2001-2.705%204.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537%200%2001-.465-.271l-1.335-2.323a.09.09%200%2000-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543%200%2001-.002-.54l1.207-2.12a.198.198%200%20000-.197%20550.951%20550.951%200%2001-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625%201.387-2.436.132-.234.304-.334.584-.335a338.3%20338.3%200%20012.589-.001.124.124%200%2000.107-.063l2.806-4.895a.488.488%200%2001.422-.246c.524-.001%201.053%200%201.583-.006L11.704%201c.341-.003.724.032.9.34zm-3.432.403a.06.06%200%2000-.052.03L6.254%206.788a.157.157%200%2001-.135.078H3.253c-.056%200-.07.025-.041.074l5.81%2010.156c.025.042.013.062-.034.063l-2.795.015a.218.218%200%2000-.2.116l-1.32%202.31c-.044.078-.021.118.068.118l5.716.008c.046%200%20.08.02.104.061l1.403%202.454c.046.081.092.082.139%200l5.006-8.76.783-1.382a.055.055%200%2001.096%200l1.424%202.53a.122.122%200%2000.107.062l2.763-.02a.04.04%200%2000.035-.02.041.041%200%20000-.04l-2.9-5.086a.108.108%200%20010-.113l.293-.507%201.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059%200-.073-.026-.043-.077l1.434-2.505a.107.107%200%20000-.114L9.225%201.774a.06.06%200%2000-.053-.031zm6.29%208.02c.046%200%20.058.02.034.06l-.832%201.465-2.613%204.585a.056.056%200%2001-.05.029.058.058%200%2001-.05-.029L8.498%209.841c-.02-.034-.01-.052.028-.054l.216-.012%206.722-.012z'%20fill='url(%23lobe-icons-qwen-_R_0_)'%20fill-rule='nonzero'%3e%3c/path%3e%3cdefs%3e%3clinearGradient%20id='lobe-icons-qwen-_R_0_'%20x1='0%25'%20x2='100%25'%20y1='0%25'%20y2='0%25'%3e%3cstop%20offset='0%25'%20stop-color='%236336E7'%20stop-opacity='.84'%3e%3c/stop%3e%3cstop%20offset='100%25'%20stop-color='%236F69F7'%20stop-opacity='.84'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",fk="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eRooCode%3c/title%3e%3cpath%20d='M20.113%205.5l-.442%201.557a.157.157%200%2001-.196.106l-7.414-2.157a.16.16%200%2000-.143.028l-7.342%205.74a.159.159%200%2001-.074.032l-4.37.656a.154.154%200%2000-.132.162l.02.245c.005.078.071.14.152.141l5.074.128.058.002%203.75-1.953a.16.16%200%2001.164.01l2.657%201.847a.152.152%200%2001.066.125l-.023%202.45c0%20.032.01.063.028.089l3.737%205.227c.03.04.077.065.129.065h1.182a.153.153%200%2000.14-.224l-2.664-4.919a.15.15%200%2001.005-.152l1.389-2.169a.156.156%200%2001.062-.055l4.965-2.456a.16.16%200%2001.158.01l1.418.921a.16.16%200%2000.087.026h1.289c.125%200%20.2-.136.13-.237l-3.578-5.29c-.074-.109-.246-.082-.282.044z'%3e%3c/path%3e%3c/svg%3e",dk="data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eTRAE%3c/title%3e%3cpath%20d='M24%2020.541H3.428v-3.426H0V3.4h24V20.54zM3.428%2017.115h17.144V6.827H3.428v10.288zm8.573-5.196l-2.425%202.424-2.424-2.424%202.424-2.424%202.425%202.424zm6.857-.001l-2.424%202.423-2.425-2.423%202.425-2.425%202.424%202.425z'%20fill='%2332F08C'%3e%3c/path%3e%3c/svg%3e",hk="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eWindsurf%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M23.78%205.004h-.228a2.187%202.187%200%2000-2.18%202.196v4.912c0%20.98-.804%201.775-1.76%201.775a1.818%201.818%200%2001-1.472-.773L13.168%205.95a2.197%202.197%200%2000-1.81-.95c-1.134%200-2.154.972-2.154%202.173v4.94c0%20.98-.797%201.775-1.76%201.775-.57%200-1.136-.289-1.472-.773L.408%205.098C.282%204.918%200%205.007%200%205.228v4.284c0%20.216.066.426.188.604l5.475%207.889c.324.466.8.812%201.351.938%201.377.316%202.645-.754%202.645-2.117V11.89c0-.98.787-1.775%201.76-1.775h.002c.586%200%201.135.288%201.472.773l4.972%207.163a2.15%202.15%200%20001.81.95c1.158%200%202.151-.973%202.151-2.173v-4.939c0-.98.787-1.775%201.76-1.775h.194c.122%200%20.22-.1.22-.222V5.225a.221.221%200%2000-.22-.222z'%3e%3c/path%3e%3c/svg%3e",mk="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eXiaomiMiMo%3c/title%3e%3cpath%20d='M.958%2015.936a.459.459%200%2001.459.44v2.729a.46.46%200%2001-.918%200v-2.729a.459.459%200%2001.459-.44zm4.814-2.035a.46.46%200%2001.553.45v4.754a.458.458%200%2011-.918%200V15.48L3.74%2017.202a.462.462%200%2001-.655.016.462.462%200%2001-.065-.082L.628%2014.67a.459.459%200%2001.658-.637l2.124%202.187%202.127-2.188a.46.46%200%2001.235-.13zm2.068.004a.46.46%200%2001.458.445v4.755a.46.46%200%2001-.458.458.459.459%200%2001-.458-.458V14.35a.459.459%200%2001.458-.445zm1.973%202.014a.46.46%200%2001.46.457v2.729a.46.46%200%2001-.784.324.46.46%200%2001-.134-.324v-2.729a.46.46%200%2001.458-.458zm.002-2.045a.458.458%200%2001.328.157l2.127%202.19%202.125-2.19a.459.459%200%2001.784.318v4.756a.46.46%200%2001-.455.458.46.46%200%2001-.458-.458V15.48l-1.667%201.723a.46.46%200%2001-.65.008l-.005-.005c0-.002-.002-.002-.004-.003l-2.455-2.534a.46.46%200%2001-.008-.667.461.461%200%2001.338-.128zm6.797%201.206a.46.46%200%2001.53.651A1.966%201.966%200%200019.81%2018.4a.462.462%200%2001.623.18.46.46%200%2001-.181.624%202.863%202.863%200%2001-1.38.353l-.142-.004a2.88%202.88%200%2001-2.393-4.263.461.461%200%2001.274-.21zm.864-.931a2.884%202.884%200%20013.915%203.914.46.46%200%2001-.402.24l-.057-.004a.458.458%200%2001-.164-.055.46.46%200%2001-.182-.622%201.967%201.967%200%2000-2.669-2.67.459.459%200%2011-.441-.803zM9.59%206.368c1.481%200%201.696%201.202%201.696%201.654v2.648h-.917v-.432c-.26.346-.792.535-1.36.535-.133%200-1.289-.03-1.384-1.136-.082-.932.675-1.61%202.053-1.61h.691c0-.563-.367-.886-.983-.886-.44.013-.864.174-1.2.458l-.36-.664c.484-.379%201.012-.567%201.764-.567zm4.427.1c1.263%200%202.082.97%202.083%202.15%200%201.181-.824%202.154-2.083%202.154-1.26%200-2.084-.972-2.084-2.152%200-1.18.82-2.153%202.084-2.153zm6.801.015c.68%200%201.202.465%201.197%201.548v2.642H21.1V8.29c0-.312-.002-.98-.63-.98s-.628.667-.628.838v2.524h-.89V8.148c0-.17-.001-.838-.63-.838-.628%200-.628.668-.628.98v2.383h-.917v-4.03h.917V7a1.22%201.22%200%2001.947-.516c.398%200%20.76.193.982.686a1.321%201.321%200%20011.195-.686zm-18.093.872l1.457-1.772H5.32L3.311%208.07l2.14%202.602H4.24L2.725%208.796%201.21%2010.672H0L2.138%208.07.13%205.583h1.138l1.458%201.772zm4.149%203.317h-.916V6.644h.916v4.028zm16.99%200h-.916V6.644h.916v4.028zM9.925%208.71c-1.055%200-1.359.412-1.326.742.032.329.324.537.757.537a1.013%201.013%200%20001.014-.968l.002-.31h-.447zM14.018%207.3c-.663%200-1.184.487-1.184%201.32%200%20.832.52%201.32%201.184%201.32.662%200%201.182-.49%201.182-1.32%200-.832-.52-1.32-1.182-1.32zM6.417%205.001a.568.568%200%2001.587.582.588.588%200%2001-1.175%200A.57.57%200%20016.417%205zm16.991%200a.57.57%200%2001.592.582.588.588%200%2001-1.174%200%20.57.57%200%2001.357-.542.572.572%200%2001.225-.04z'%3e%3c/path%3e%3c/svg%3e",pk="data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eZ.ai%3c/title%3e%3cpath%20d='M12.105%202L9.927%204.953H.653L2.83%202h9.276zM23.254%2019.048L21.078%2022h-9.242l2.174-2.952h9.244zM24%202L9.264%2022H0L14.736%202H24z'%3e%3c/path%3e%3c/svg%3e",gk={amp:{src:YL},antigravity:{src:qL},"claude-code":{src:XL},cline:{monochrome:!0,src:WL},codebuddy:{src:Iv},codex:{monochrome:!0,src:Bv},"every-code":{monochrome:!0,src:Bv},copilot:{src:ZL},cursor:{monochrome:!0,src:QL},devin:{src:JL},gemini:{src:ek},"gemini-cli":{src:tk},grok:{monochrome:!0,src:lk},goose:{monochrome:!0,src:nk},hermes:{monochrome:!0,src:ak},kimi:{src:rk},"kilo-cli":{monochrome:!0,src:Hv},kilocode:{monochrome:!0,src:Hv},kiro:{src:ik},mimo:{monochrome:!0,src:mk},openclaw:{src:ok},opencode:{monochrome:!0,src:sk},pi:{monochrome:!0,src:ck},qoder:{src:uk},qwen:{src:Kv},"qwen-code":{src:Kv},roocode:{monochrome:!0,src:fk},trae:{src:dk},windsurf:{monochrome:!0,src:hk},workbuddy:{src:Iv},zcode:{monochrome:!0,src:pk}},bk={"code-buddy":"codebuddy",everycode:"every-code","github-copilot":"copilot","grok-build":"grok","kilo-code":"kilocode",kilo:"kilo-cli",mimocode:"mimo","oh-my-pi":"omp","open-claw":"openclaw","open-code":"opencode","openai-codex":"codex","roo-code":"roocode",zai:"zcode","hermes-agent":"hermes","kimi-code":"kimi","kimi-legacy":"kimi","pi-coding-agent":"pi",factory:"droid"};function vk(e){const t=e.trim().toLowerCase().replace(/[\s_]+/g,"-");return t==="claude-code"||t.startsWith("claude")?"claude-code":t==="codex"||t.startsWith("codex-")?"codex":t==="cursor"||t.startsWith("cursor-")?"cursor":t==="gemini"||t==="gemini-cli"||t.startsWith("gemini-")?"gemini-cli":t==="copilot"||t==="copilot-cli"||t.startsWith("copilot-")?"copilot":t==="opencode"||t.startsWith("opencode-")?"opencode":t.startsWith("antigravity")?"antigravity":t.startsWith("openclaw")?"openclaw":t.startsWith("hermes")?"hermes":t.startsWith("kimi")?"kimi":t.startsWith("kiro")?"kiro":t==="roo-code"||t.startsWith("roocode")||t.startsWith("roo-")?"roocode":t.startsWith("zcode")||t==="zai"?"zcode":t==="pi-coding-agent"||t.startsWith("pi-")||t==="pi"?"pi":t.startsWith("droid")||t.startsWith("factory")?"droid":t.startsWith("qoder")?"qoder":t.startsWith("trae")?"trae":t.startsWith("amp")?"amp":t.startsWith("qwen")?"qwen-code":t.startsWith("codebuddy")||t==="code-buddy"?"codebuddy":t.startsWith("workbuddy")?"workbuddy":t.startsWith("grok")?"grok":t.startsWith("goose")?"goose":t.startsWith("mimo")||t==="mimocode"||t.startsWith("xiaomi")?"mimo":t==="everycode"||t.startsWith("every-code")?"every-code":t.startsWith("omp")||t==="oh-my-pi"?"omp":t.startsWith("kilo-cli")||t==="kilo"?"kilo-cli":t.startsWith("kilocode")||t==="kilo-code"?"kilocode":t.startsWith("zed")?"zed":t.startsWith("warp")?"warp":bk[t]??t}function Uv({provider:e,size:t=16,className:l="",onLightBackground:r=!1,isSelected:i=!1,color:s}){const u=vk(e),f=gk[u];return f?E.jsx("img",{alt:"","aria-hidden":!0,className:`shrink-0 object-contain ${f.monochrome?i?"invert":r?"":"dark:invert":""} ${l}`,height:t,src:f.src,style:{height:t,width:t},width:t}):u==="droid"?E.jsx(wk,{className:l,size:t,style:{color:s}}):u==="omp"?E.jsx(yk,{className:l,size:t,style:{color:s}}):u==="zed"?E.jsx(xk,{className:l,size:t,style:{color:s}}):u==="warp"?E.jsx(Sk,{className:l,size:t,style:{color:s}}):E.jsx(Ek,{className:l,size:t,style:{color:s}})}function yk({className:e,size:t,style:l}){return E.jsxs("svg",{"aria-hidden":!0,className:`shrink-0 ${e}`,fill:"currentColor",height:t,style:l,viewBox:"0 0 120 90",width:t,children:[E.jsx("rect",{height:"12",rx:"2",width:"100",x:"10",y:"8"}),E.jsx("rect",{height:"62",rx:"2",width:"12",x:"25",y:"20"}),E.jsx("rect",{height:"45",rx:"2",width:"12",x:"75",y:"20"}),E.jsx("rect",{height:"16",rx:"3",width:"20",x:"71",y:"55"}),E.jsx("rect",{height:"8",rx:"1",width:"3",x:"76",y:"71"}),E.jsx("rect",{height:"8",rx:"1",width:"3",x:"82",y:"71"})]})}function xk({className:e,size:t,style:l}){return E.jsx("svg",{"aria-hidden":!0,className:`shrink-0 ${e}`,fill:"currentColor",height:t,style:l,viewBox:"0 0 16 16",width:t,children:E.jsx("path",{clipRule:"evenodd",d:"M3.125 2.75C2.9179 2.75 2.75 2.9179 2.75 3.125V11.375H2V3.125C2 2.50368 2.50368 2 3.125 2H13.1723C13.6735 2 13.9244 2.6059 13.5701 2.96025L7.38189 9.14843H9.125V8.375H9.875V9.33593C9.875 9.6466 9.6232 9.8984 9.3125 9.8984H6.63189L5.34282 11.1875H11.1875V6.5H11.9375V11.1875C11.9375 11.6017 11.6017 11.9375 11.1875 11.9375H4.59282L3.28032 13.25H12.875C13.0821 13.25 13.25 13.0821 13.25 12.875V4.625H14V12.875C14 13.4963 13.4963 14 12.875 14H2.82767C2.32653 14 2.07557 13.3941 2.42992 13.0397L8.59468 6.875H6.875V7.625H6.125V6.6875C6.125 6.37684 6.37684 6.125 6.6875 6.125H9.34468L10.6571 4.8125H4.8125V9.5H4.0625V4.8125C4.0625 4.39829 4.39829 4.0625 4.8125 4.0625H11.4071L12.7197 2.75H3.125Z",fillRule:"evenodd"})})}function Sk({className:e,size:t,style:l}){return E.jsx("svg",{"aria-hidden":!0,className:`shrink-0 ${e}`,fill:"currentColor",height:t,style:l,viewBox:"0 0 24 24",width:t,children:E.jsx("path",{d:"M4.2 5.5h3.1l2.05 8.2 2.15-8.2h2.9l2.15 8.2 2.05-8.2h3.1L17.3 18.5h-3.05L12 10.2l-2.25 8.3H6.7L4.2 5.5Z"})})}function wk({className:e,size:t,style:l}){return E.jsxs("svg",{"aria-hidden":!0,className:`shrink-0 ${e}`,fill:"none",height:t,style:l,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8",viewBox:"0 0 24 24",width:t,children:[E.jsx("path",{d:"M9 3v2"}),E.jsx("path",{d:"M15 3v2"}),E.jsx("rect",{height:"13",rx:"3",width:"16",x:"4",y:"6"}),E.jsx("circle",{cx:"9",cy:"13",fill:"currentColor",r:"1.4",stroke:"none"}),E.jsx("circle",{cx:"15",cy:"13",fill:"currentColor",r:"1.4",stroke:"none"}),E.jsx("path",{d:"M9 16h6"})]})}function Ek({className:e,size:t,style:l}){return E.jsx("svg",{"aria-hidden":!0,className:`shrink-0 ${e}`,fill:"none",height:t,style:l,viewBox:"0 0 24 24",width:t,children:E.jsx("circle",{cx:"12",cy:"12",r:"7.5",stroke:"currentColor",strokeDasharray:"3 3",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})}const Ck="Juejin Usage",Tk=[{name:"Claude",source:"claude",variants:["CLI","Desktop"]},{name:"Codex",source:"codex"},{name:"Cursor",source:"cursor"},{name:"Qoder",source:"qoder",variants:["CLI","IDE","IDE CN","Work"]},{name:"Gemini",source:"gemini",variants:["CLI"]},{name:"OpenCode",source:"opencode"},{name:"Copilot",source:"copilot",variants:["CLI"]},{name:"Antigravity",source:"antigravity",variants:["App","IDE","CLI"]},{name:"OpenClaw",source:"openclaw"},{name:"Hermes",source:"hermes"},{name:"ZCode",source:"zcode"},{name:"pi",source:"pi"},{name:"Kimi",source:"kimi",variants:["Code","Legacy"]},{name:"Roo Code",source:"roocode"},{name:"Droid",source:"droid"},{name:"Kiro",source:"kiro",variants:["CLI"]},{name:"Cline",source:"cline"},{name:"Amp",source:"amp"},{name:"Qwen Code",source:"qwen"},{name:"CodeBuddy",source:"codebuddy"},{name:"WorkBuddy",source:"workbuddy"},{name:"Grok Build",source:"grok"},{name:"Mimo",source:"mimo"},{name:"Every Code",source:"every-code"},{name:"OMP",source:"omp"},{name:"Kilo CLI",source:"kilo-cli"},{name:"Kilo Code",source:"kilocode"},{name:"Goose",source:"goose"},{name:"Zed",source:"zed"},{name:"Warp",source:"warp"}];function Rk(e){var t;return(t=e.variants)!=null&&t.length?`${e.name} (${e.variants.join("、")})`:e.name}function Mk(){return"0.1.5"}const Ak="http://github.com/juejin-cn/juejin-usage/issues/new",Lk={cline:"bg-red-500",cursor:"bg-black",droid:"bg-blue-500","every-code":"bg-emerald-600",goose:"bg-amber-500",grok:"bg-violet-600",hermes:"bg-amber-500",kimi:"bg-black","kilo-cli":"bg-violet-500",kilocode:"bg-violet-500",mimo:"bg-rose-400",omp:"bg-violet-500",opencode:"bg-blue-600",pi:"bg-orange-500",roocode:"bg-green-500",zcode:"bg-indigo-500",zed:"bg-orange-500"};function Lx(){const e=Mk();return E.jsxs("div",{className:"space-y-5",children:[E.jsxs("section",{className:"space-y-1.5",children:[E.jsx("h3",{className:"text-sm font-medium text-foreground",children:"版本信息"}),E.jsxs("p",{className:"text-sm text-foreground/70",children:[Ck," ",E.jsxs("span",{className:"font-mono text-foreground/90",children:["v",e]})]})]}),E.jsxs("section",{className:"space-y-1.5",children:[E.jsx("h3",{className:"text-sm font-medium text-foreground",children:"隐私与协议"}),E.jsxs(Nc,{className:"w-fit text-sm text-accent",href:Eh,rel:"noopener noreferrer",target:"_blank",children:["查看用户隐私协议",E.jsx(Nc.Icon,{})]})]}),E.jsxs("section",{className:"space-y-1.5",children:[E.jsx("h3",{className:"text-sm font-medium text-foreground",children:"问题反馈"}),E.jsxs(Nc,{className:"w-fit text-sm text-accent",href:Ak,rel:"noopener noreferrer",target:"_blank",children:["提交问题反馈",E.jsx(Nc.Icon,{})]})]}),E.jsxs("section",{className:"space-y-2",children:[E.jsx("h3",{className:"text-sm font-medium text-foreground",children:"支持的工具"}),E.jsx("p",{className:"text-xs text-foreground/55",children:"同一系列的多端形态用括号标出。"}),E.jsx("ul",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-2",children:Tk.map(t=>E.jsxs("li",{className:"flex items-center gap-2 rounded-lg bg-black/3 px-2.5 py-1.5 text-sm text-foreground/80 dark:bg-white/5",children:[E.jsx(kk,{source:t.source}),E.jsx("span",{className:"min-w-0 leading-snug",children:Rk(t)})]},t.source))})]})]})}function kk({source:e}){if(e==="codex")return E.jsx("span",{className:"flex size-6 shrink-0 items-center justify-center rounded-md bg-emerald-600",children:E.jsx("img",{alt:"","aria-hidden":!0,className:"size-[15px] invert",src:VL})});const t=Lk[e];return t?E.jsx("span",{className:`flex size-6 shrink-0 items-center justify-center rounded-md ${t}`,children:E.jsx(Uv,{color:"#fff",isSelected:!0,provider:e,size:15})}):E.jsx(Uv,{provider:e,size:18})}const Nk="tud:data-synced",Ch="tud:open-settings",Fv="tud:open-about",Th="tud:open-share",Dk="tud:juejin-link-changed";function Lz(){window.dispatchEvent(new CustomEvent(Nk))}function kz(e){window.dispatchEvent(new CustomEvent(Ch,{detail:{}}))}function $k(){window.dispatchEvent(new CustomEvent(Th))}function kx(){window.dispatchEvent(new CustomEvent(Dk))}function Nz(){return $k(),Promise.resolve()}function zk({trigger:e,isOpen:t,onOpenChange:l,listenForOpenEvent:r=!0,hideTrigger:i=!1}={}){const[s,u]=y.useState(!1),f=t!==void 0,d=f?t:s,h=y.useCallback(p=>{f||u(p),l==null||l(p)},[f,l]);return y.useEffect(()=>{if(!r)return;const p=()=>h(!0);return window.addEventListener(Fv,p),()=>window.removeEventListener(Fv,p)},[r,h]),E.jsxs(E.Fragment,{children:[!i&&(e??E.jsxs(mn,{"aria-label":"关于",onPress:()=>h(!0),variant:"tertiary",children:[E.jsx(UL,{}),"关于"]})),E.jsx(Be.Backdrop,{isOpen:d,onOpenChange:h,variant:"blur",children:E.jsx(Be.Container,{className:"w-[840px] max-w-[min(840px,92vw)]",scroll:"outside",size:"lg",children:E.jsxs(Be.Dialog,{children:[E.jsx(Be.CloseTrigger,{"aria-label":"关闭关于"}),E.jsx(Be.Header,{children:E.jsx(Be.Heading,{children:"关于"})}),E.jsx(Be.Body,{className:"pt-2",children:E.jsx(Lx,{})})]})})})]})}const Pk=50;async function Pn(e,t){const l=await fetch(e,t);let r=null;try{r=await l.json()}catch{throw new Error(`${(t==null?void 0:t.method)??"GET"} ${e} → ${l.status}`)}if(!l.ok||!r||r.success!==!0||r.data===null){const i=(r==null?void 0:r.message)??`HTTP ${l.status}`;throw new Error(i)}return r.data}const Vv="tud.apiBearer";function Ok(){return!0}function jk(){return"/functions/tud-"}function On(){const e=jk();return{summary:`${e}account-usage-summary`,others:e}}function _v(e){try{e!=null&&e.trim()?localStorage.setItem(Vv,e.trim()):localStorage.removeItem(Vv)}catch{}}function xn(){return{}}async function Nx(){const{summary:e}=On();return Pn(e,{headers:xn()})}async function Ik(e=90){const{others:t}=On();return Pn(`${t}usage-daily?days=${e}`,{headers:xn()})}async function Dx(e=1){const{others:t}=On();return Pn(`${t}usage-hourly?days=${e}`,{headers:xn()})}async function $x(e=30){const{others:t}=On();return Pn(`${t}usage-model-breakdown?days=${e}`,{headers:xn()})}const Gv="https://api.juejin.cn/aiusage_api/functions/tud-pricing";async function Dz(){const e=await fetch(Gv,{headers:xn()});let t=null;try{t=await e.json()}catch{throw new Error(`GET ${Gv} → ${e.status}`)}if(!e.ok)throw new Error(`HTTP ${e.status}`);const l=Bk(t);return Hk(l,e.headers.get("last-modified"))}function Bk(e){if(e===null||typeof e!="object"||Array.isArray(e))throw new Error("模型价格数据格式错误:响应必须是对象");const t=e.exact;if(t===null||typeof t!="object"||Array.isArray(t))throw new Error("模型价格数据格式错误:exact 必须是对象");for(const[l,r]of Object.entries(t)){if(r===null||typeof r!="object"||Array.isArray(r))throw new Error(`模型价格数据格式错误:exact.${l} 必须是对象`);for(const i of["input","output","cache_read","cache_write"]){const s=r[i];if(s!==void 0&&(typeof s!="number"||!Number.isFinite(s)||s<0))throw new Error(`模型价格数据格式错误:exact.${l}.${i} 必须是非负数字`)}}return e}function Hk(e,t){return{units:"usd_per_million_tokens",generatedAt:null,updatedAt:t,models:Object.entries(e.exact).map(([l,r])=>({model:l,input:r.input??0,output:r.output??0,cacheRead:r.cache_read??0,cacheWrite:r.cache_write??0})).sort((l,r)=>l.model.localeCompare(r.model))}}async function $z(e,t=Pk,l={}){const{others:r}=On(),i=new URLSearchParams({range:e,limit:String(t)});return l.tool&&i.set("tool",l.tool),l.model&&i.set("model",l.model),Pn(`${r}leaderboard-overview?${i.toString()}`,{headers:xn()})}async function zz(){const{others:e}=On();return Pn(`${e}leaderboard-preference`,{headers:xn()})}async function Pz(e){const{others:t}=On();return Pn(`${t}leaderboard-preference`,{method:"PUT",headers:{"Content-Type":"application/json",...xn()},body:JSON.stringify({hideFromLeaderboard:e})})}async function Kk(){const{others:e}=On();return Pn(`${e}sync-status`,{headers:xn()})}function zx(){return Kk().catch(()=>null)}function Uk(e){return typeof e=="number"?{dailyDays:e,breakdownDays:e,hourlyDays:e}:{dailyDays:e.dailyDays,breakdownDays:e.breakdownDays,hourlyDays:e.hourlyDays??e.breakdownDays}}async function Oz(e){const{dailyDays:t,breakdownDays:l,hourlyDays:r}=Uk(e),[i,s,u,f,d]=await Promise.all([Nx(),zx(),Ik(t),Dx(r).catch(()=>({hours:[],timeZone:"Asia/Shanghai"})),$x(l)]);return{summary:i,syncStatus:s,dailyRows:u.days??[],hourlyRows:f.hours??[],modelRows:(d.models??[]).filter(h=>h.tokens>0),projectRows:(d.projects??[]).filter(h=>h.tokens>0)}}async function jz(e,t,l){const[r,i,s,u]=await Promise.all([Nx(),zx(),Dx(l).catch(()=>({hours:[],timeZone:"Asia/Shanghai"})),$x(t)]);return{summary:r,syncStatus:i??e.syncStatus,dailyRows:e.dailyRows,hourlyRows:s.hours??[],modelRows:(u.models??[]).filter(f=>f.tokens>0),projectRows:(u.projects??[]).filter(f=>f.tokens>0)}}async function Iz(){const{others:e}=On();return Pn(`${e}trigger-sync`,{method:"POST",headers:{"Content-Type":"application/json",...xn()},body:"{}"})}async function Bz(e){const{others:t}=On();return Pn(`${t}ensure-local-range`,{method:"POST",headers:{"Content-Type":"application/json",...xn()},body:JSON.stringify({days:e})})}async function b2(){const{others:e}=On();return Pn(`${e}config`,{headers:xn()})}async function Rh(e){const{others:t}=On();return Pn(`${t}config`,{method:"PUT",headers:{"Content-Type":"application/json",...xn()},body:JSON.stringify(e)})}const v2="login_from_client",y2="port",Px="user_id",Ox="origin_user_id",jx="user_name",Ix="avatar_large",Fo=8452,Fk="https://juejin.cn/aiusage/dashboard";function Vk(e,t){return t}const Bx=Vk(void 0,Fk),_k=512,Gk=64;function qk(e){return e==="desktop"||e==="cli"?e:null}function Hx(e){if(e==null||e==="")return Fo;const t=Number.parseInt(e,10);return!Number.isFinite(t)||t<=0||t>65535?Fo:t}function Kx(e){const t=e.trim();return t.length>0&&t.length<=_k&&!/\s/.test(t)}function Ux(e){const t=e.trim();return t.length>0&&t.length<=Gk&&!/\s/.test(t)}function qv(e){return(e??"").trim()}function Yv(e){const t=e.trim();return t.length>=2&&(t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))?t.slice(1,-1).trim():t}function Yk(e){const t=new URL(Bx);return t.searchParams.set(v2,e.loginFromClient),e.loginFromClient==="cli"&&t.searchParams.set(y2,String(e.port??Fo)),t.toString()}function Fx(e=window.location.search){const t=new URLSearchParams(e),l=Yv(t.get(Px)??""),r=Yv(t.get(Ox)??"");return{loginFromClient:qk(t.get(v2)),port:Hx(t.get(y2)),userId:Kx(l)?l:null,originUserId:Ux(r)?r:"",userName:qv(t.get(jx)),avatarLarge:qv(t.get(Ix))}}const z0=typeof window<"u"?Fx(window.location.search):{loginFromClient:null,port:Fo,userId:null,originUserId:"",userName:"",avatarLarge:""};function Vx(){const e=Fx(window.location.search);return e.loginFromClient||e.userId?e:z0.loginFromClient||z0.userId?z0:e}function Xk(){const e=new URL(window.location.href);e.searchParams.delete(v2),e.searchParams.delete(y2),e.searchParams.delete(Px),e.searchParams.delete(Ox),e.searchParams.delete(jx),e.searchParams.delete(Ix);const t=`${e.pathname}${e.search}${e.hash}`;window.history.replaceState(window.history.state,"",t)}function Wk(){const e="".trim().replace(/\/$/,"");return e?`${e}/functions/tud-session`:"/api/functions/tud-session"}async function Zk(){const e=await fetch(Wk(),{credentials:"include",headers:{Accept:"application/json"}});if(!e.ok)return null;let t;try{t=await e.json()}catch{return null}if(!t||typeof t!="object")return null;const l=t.success,r=t.data;if(l===!1||!r||typeof r!="object")return null;const i=r.encryptedUserId,s=r.originUserId;if(typeof i!="string"||!Kx(i)||typeof s!="string"||!Ux(s))return null;const u=r.userName,f=r.avatarLarge;return{userId:i.trim(),originUserId:s.trim(),userName:typeof u=="string"?u.trim():"",avatarLarge:typeof f=="string"?f.trim():""}}function Qk(){return typeof window<"u"&&typeof window.tud<"u"?"desktop":"cli"}function Jk(){const e=window.location.port;return Hx(e||String(Fo))}async function _x(){var i;const e=Qk(),t=e==="cli"?Jk():void 0,l=Yk({loginFromClient:e,port:t}),r=(i=window.tud)==null?void 0:i.openExternal;return typeof r=="function"?r(l):(window.location.assign(l),{ok:!0})}const eN={info:"accent",warn:"warning",error:"danger",success:"success"};function Gx({tone:e="info",title:t,description:l}){return E.jsxs(wo,{status:eN[e],children:[E.jsx(wo.Indicator,{}),E.jsxs(wo.Content,{children:[E.jsx(wo.Title,{children:t}),l&&E.jsx(wo.Description,{children:l})]})]})}const tN=[{id:"sync",label:"云端同步"},{id:"app",label:"应用"},{id:"about",label:"关于"}];function nN({activeTab:e,onTabChange:t}={}){const[l]=y.useState(()=>new Xo({maxVisibleToasts:1})),[r,i]=y.useState("sync"),s=e??r,u=t??i,f=s==="pet"?"sync":s;return E.jsxs("div",{className:"w-full",children:[E.jsx(g2.Provider,{placement:"top end",queue:l}),E.jsxs(ra,{className:"w-full text-center",selectedKey:f,onSelectionChange:d=>u(String(d)),children:[E.jsx(ra.ListContainer,{className:"m-3 mr-14 w-fit",children:E.jsx(ra.List,{"aria-label":"设置分类",className:"w-fit *:h-6 *:w-fit *:px-3 *:text-sm *:font-normal *:data-[selected=true]:text-accent-foreground",children:tN.map(d=>E.jsxs(ra.Tab,{id:d.id,children:[E.jsx("span",{className:"text-xs font-normal",children:d.label}),E.jsx(ra.Indicator,{className:"bg-accent"})]},d.id))})}),E.jsx(ra.Panel,{className:"h-[50vh] overflow-y-auto p-3 text-left font-normal [&_*]:font-normal",id:"sync",children:f==="sync"&&E.jsx(lN,{onNotify:d=>l.add(d),onSaved:()=>l.add({description:"写入本机 CLI 配置",title:"已保存",variant:"success"})})}),E.jsx(ra.Panel,{className:"h-[50vh] overflow-y-auto p-3 text-left",id:"app",children:f==="app"&&E.jsx(aN,{})}),E.jsx(ra.Panel,{className:"h-[50vh] overflow-y-auto p-3 text-left",id:"about",children:f==="about"&&E.jsx(Lx,{})})]})]})}function lN({onSaved:e,onNotify:t}){var te,ne,j;const[l,r]=y.useState(null),[i,s]=y.useState(!1),[u,f]=y.useState(!0),[d,h]=y.useState(!1),[p,b]=y.useState(!1),[v,w]=y.useState(!1),[x,T]=y.useState(null),C=y.useCallback(async()=>{f(!0);try{const Y=await b2();r(Y),s(Y.juejin.enabled),T(null)}catch(Y){T(Y instanceof Error?Y.message:"加载配置失败"),r(null)}finally{f(!1)}},[]);y.useEffect(()=>{C()},[C]);const N=async Y=>{const z=i;s(Y),h(!0),T(null);try{const O=await Rh({juejin:{enabled:Y}});r(O),e()}catch(O){s(z),T(O instanceof Error?O.message:"保存失败")}finally{h(!1)}},M=async()=>{h(!0),T(null);try{const Y=await Rh({juejin:{token:null,originUserId:null,userName:null,avatarLarge:null}});r(Y),b(!1),kx(),t({title:"已退出登录",variant:"success"})}catch(Y){T(Y instanceof Error?Y.message:"退出失败"),b(!1)}finally{h(!1)}};if(u)return E.jsx("p",{className:"text-muted",children:"加载配置…"});const L=Y=>Y.replace(/^['"]+|['"]+$/g,"").trim(),k=(l==null?void 0:l.juejin.userId)??null,B=L(((te=l==null?void 0:l.juejin.originUserId)==null?void 0:te.trim())||""),G=((ne=l==null?void 0:l.juejin.userName)==null?void 0:ne.trim())||"",$=((j=l==null?void 0:l.juejin.avatarLarge)==null?void 0:j.trim())||"",A=(l==null?void 0:l.juejin.hasToken)??!1,U=k&&!k.startsWith("jau.")?L(k):"",K=B||U||null,q=()=>{_x().then(Y=>{Y.ok||t({title:"无法打开掘金登录页",description:Y.message??"请稍后重试",variant:"danger"})})};return E.jsxs("div",{className:"flex h-full flex-col gap-3 overflow-hidden",children:[x&&E.jsx(Gx,{tone:"error",title:x}),E.jsxs($5,{className:"rounded-xl p-4",variant:"secondary",children:[E.jsxs("div",{className:"flex items-start justify-between gap-4",children:[E.jsxs("div",{className:"min-w-0",children:[E.jsx("h3",{className:"text-sm text-foreground",children:"云端同步"}),E.jsx("p",{className:"mt-1 text-xs text-muted",children:"本地 sync 完成后自动上报掘金"})]}),E.jsx(ha,{id:"cli-juejin-enabled",isDisabled:d,isSelected:i,onChange:Y=>{N(Y)},children:E.jsxs(ha.Content,{children:[E.jsx(ha.Control,{children:E.jsx(ha.Indicator,{})}),"启用"]})})]}),E.jsxs("div",{className:"mt-4 flex items-start justify-between gap-4 text-sm",children:[E.jsxs("div",{children:[E.jsx("p",{className:"text-foreground",children:"关联账号"}),E.jsx("p",{className:"mt-1 text-xs text-muted",children:"用于识别云端用量归属"})]}),k?E.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[$?E.jsx("img",{alt:G||"用户头像",className:"size-8 shrink-0 rounded-full object-cover",referrerPolicy:"no-referrer",src:$,title:G||void 0}):E.jsx("span",{"aria-hidden":"true",className:"inline-flex size-8 shrink-0 items-center justify-center rounded-full bg-accent/15 text-[13px] text-accent",title:G||void 0,children:(G||k).slice(0,1)}),E.jsxs("div",{className:"min-w-0 text-right",children:[E.jsx("p",{className:"truncate text-foreground",title:G||void 0,children:G||"已关联"}),E.jsx("p",{className:"break-all font-mono text-xs text-muted",title:K?void 0:"缺少 originUserId,请重新掘金登录关联",children:K??"缺少用户 ID(请重新登录关联)"})]})]}):E.jsx("span",{className:"text-muted",children:"未关联"})]}),i&&!k&&E.jsx("p",{className:"mt-3 text-xs text-amber-600 dark:text-amber-400",children:A?"尚未通过掘金登录关联账号;关联前不会上报。":"已开启同步但未关联用户 ID,上报将跳过。"})]}),E.jsx("div",{className:"mt-auto flex justify-end gap-2",children:k?E.jsx(mn,{isDisabled:d,onPress:()=>b(!0),variant:"danger",children:"退出登录"}):E.jsx(mn,{isDisabled:d,onPress:()=>w(!0),variant:"primary",children:"掘金登录"})}),E.jsx(GL,{isOpen:v,onConfirm:q,onOpenChange:w}),E.jsx(Be.Backdrop,{isOpen:p,onOpenChange:b,variant:"blur",children:E.jsx(Be.Container,{size:"sm",children:E.jsxs(Be.Dialog,{children:[E.jsx(Be.CloseTrigger,{"aria-label":"关闭"}),E.jsx(Be.Header,{children:E.jsx(Be.Heading,{children:"退出登录"})}),E.jsx(Be.Body,{className:"text-sm text-muted",children:"确认清除本机保存的用户 ID?清除后需重新通过掘金登录关联。"}),E.jsxs(Be.Footer,{className:"gap-2",children:[E.jsx(mn,{slot:"close",variant:"tertiary",children:"取消"}),E.jsx(mn,{isDisabled:d,onPress:()=>{M()},variant:"danger",children:"确认退出"})]})]})})})]})}function aN(){const[e,t]=y.useState(null),[l,r]=y.useState(!0),[i,s]=y.useState(null);return y.useEffect(()=>{let u=!1;return b2().then(f=>{u||(t(f),s(null))}).catch(f=>{u||s(f instanceof Error?f.message:"加载配置失败")}).finally(()=>{u||r(!1)}),()=>{u=!0}},[]),l?E.jsx("p",{className:"text-muted",children:"加载配置…"}):i?E.jsx(Gx,{tone:"error",title:i}):e?E.jsx("div",{className:"flex flex-col gap-4",children:E.jsxs($5,{className:"rounded-xl p-4",variant:"secondary",children:[E.jsx("h3",{className:"mb-3 text-sm font-medium text-foreground",children:"设备信息"}),E.jsxs("div",{className:"flex flex-col gap-2 text-sm",children:[E.jsx(Dc,{label:"设备 ID",value:e.deviceId}),E.jsx(Dc,{label:"上报起点",value:e.statsSince.slice(0,19).replace("T"," ")}),E.jsx(Dc,{label:"上次同步",value:e.lastSyncAt?new Date(e.lastSyncAt).toLocaleString():"从未"}),E.jsx(Dc,{label:"上次上报",value:e.lastUploadAt?new Date(e.lastUploadAt).toLocaleString():"从未"})]})]})}):E.jsx("p",{className:"text-sm text-muted",children:"当前为 Web 模式,设备信息仅在本机 CLI / 桌面端可见。"})}function Dc({label:e,value:t}){return E.jsxs("div",{className:"flex items-center justify-between gap-4 text-sm",children:[E.jsx("span",{className:"text-muted",children:e}),E.jsx("span",{className:"break-all text-right font-mono text-xs",children:t})]})}function rN({trigger:e,isOpen:t,onOpenChange:l,listenForOpenEvent:r=!0,hideTrigger:i=!1,activeTab:s,onTabChange:u}={}){const[f,d]=y.useState(!1),[h,p]=y.useState("sync"),b=t!==void 0,v=b?t:f,w=s??h,x=y.useCallback(C=>{b||d(C),l==null||l(C)},[b,l]),T=y.useCallback(C=>{s===void 0&&p(C),u==null||u(C)},[s,u]);return y.useEffect(()=>{if(!r)return;const C=N=>{const M=N.detail;M!=null&&M.tab&&T(M.tab),x(!0)};return window.addEventListener(Ch,C),()=>window.removeEventListener(Ch,C)},[r,x,T]),E.jsxs(E.Fragment,{children:[!i&&(e??E.jsxs(mn,{"aria-label":"设置",onPress:()=>x(!0),variant:"tertiary",children:[E.jsx(FL,{}),"设置"]})),E.jsx(Be.Backdrop,{isOpen:v,onOpenChange:x,variant:"blur",children:E.jsx(Be.Container,{className:"w-[760px] max-w-[min(760px,92vw)]",scroll:"inside",size:"lg",children:E.jsxs(Be.Dialog,{"aria-label":"设置",className:"overflow-hidden p-0",children:[E.jsx(Be.CloseTrigger,{"aria-label":"关闭设置",className:"z-20"}),E.jsx(Be.Body,{className:"m-0 flex-none overflow-hidden p-0",children:E.jsx(nN,{activeTab:w,onTabChange:T})})]})})})]})}/**
78
78
  * @license lucide-react v1.24.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
@@ -140,4 +140,4 @@ Error generating stack: `+c.message+`
140
140
  font-style: normal;
141
141
  font-weight: 100 800;
142
142
  }
143
- `;function R$(){return new Promise(e=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>e())})})}async function z6(e){await document.fonts.ready,await Promise.all(Array.from(e.querySelectorAll("img")).map(t=>t.decode().catch(()=>{}))),await R$()}function M$(e){return new Promise((t,l)=>{const r=new FileReader;r.onerror=()=>l(r.error??new Error("读取分享资源失败")),r.onload=()=>t(String(r.result)),r.readAsDataURL(e)})}async function A$(e){await z6(e);const t=await N6(e,{cacheBust:!0,canvasHeight:E$,canvasWidth:w$,fontEmbedCSS:$6,height:Dh,imagePlaceholder:D6,pixelRatio:1,width:Nh});if(!t)throw new Error("生成分享图片失败");return t}async function Vz(e){await z6(e);const t=await N6(e,{cacheBust:!0,fontEmbedCSS:$6,imagePlaceholder:D6,pixelRatio:3});if(!t)throw new Error("生成分享图片失败");return t}function L$(e){const t=URL.createObjectURL(e),l=document.createElement("a");l.download=`juejin-ai-usage-${new Date().toISOString().slice(0,10)}.png`,l.href=t,l.click(),window.requestAnimationFrame(()=>URL.revokeObjectURL(t))}async function k$(e){var l;const t=window.tud;if(t!=null&&t.copyImageToClipboard){if(!await t.copyImageToClipboard(await M$(await e)))throw new Error("复制图片到系统剪贴板失败");return}if(typeof ClipboardItem>"u"||!((l=navigator.clipboard)!=null&&l.write))throw new Error("当前环境不支持复制图片到剪贴板");await navigator.clipboard.write([new ClipboardItem({[S$]:e})])}const N$={yoyo:{name:"Yoyo",image:TD},click:{name:"Click",image:ED},hawking:{name:"Hawking",image:CD}},P6="transition-[transform,opacity] duration-[320ms] ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none";function O6(e){return{backgroundColor:e}}function D$(e,t){if(t===2)return e===0?{offset:0,rotation:0,opacity:0,zIndex:0}:{offset:38,rotation:3,opacity:.88,zIndex:1};const l=Math.max(0,t-1);if(e>=l)return{offset:0,rotation:0,opacity:.55,zIndex:0};const r=Math.ceil(l/2),i=e<r,s=i?r-e:e-r+1;return{offset:(i?-1:1)*38*s,rotation:(i?-1:1)*3*s,opacity:Math.max(.5,.88-.16*(s-1)),zIndex:Math.max(1,r-s+1)}}function $$({className:e}){return E.jsx("svg",{"aria-hidden":"true",className:e,fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:E.jsx("path",{d:"m12 14.316 7.454-5.88-2.022-1.625L12 11.1l-.004.003-5.432-4.288-2.02 1.624 7.452 5.88Zm0-7.247 2.89-2.298L12 2.453l-.004-.005-2.884 2.318 2.884 2.3Zm0 11.266-.005.002-9.975-7.87L0 12.088l.194.156 11.803 9.308 7.463-5.885L24 12.085l-2.023-1.624Z",transform:"translate(2.4 2.4) scale(.8)"})})}function z$(){return E.jsx(S6,{bgColor:"transparent",className:"ml-auto size-12 shrink-0 self-center overflow-hidden rounded-[6px]",fgColor:"#fff",imageSettings:{excavate:!0,height:12,src:wD,width:12},level:"H",marginSize:4,size:48,title:"访问稀土掘金 AI 用量页面",value:Bx})}const dy=["M0 42 C16 40 20 23 36 27 S58 38 72 20 S98 9 120 14","M0 36 C14 29 24 34 38 23 S61 14 76 22 S101 15 120 7","M0 39 C12 34 26 36 40 30 S61 9 76 17 S99 31 120 18","M0 43 C17 42 23 25 39 29 S62 37 78 23 S105 19 120 8"];function P$({color:e,index:t}){const l=dy[t]??dy[0];return E.jsxs("svg",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-11 w-full",preserveAspectRatio:"none",viewBox:"0 0 120 52",children:[E.jsx("path",{d:`${l} L120 52 L0 52 Z`,fill:e,fillOpacity:"0.06"}),E.jsx("path",{d:l,fill:"none",stroke:e,strokeLinecap:"round",strokeOpacity:"0.22",strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})]})}function ti(e=0,t=0,l=1){return`translate(calc(-50% + ${e}px), -50%) rotate(${t}deg) scale(${l})`}function O$(){return document.querySelector('[data-reduce-motion="true"]')!==null||window.matchMedia("(prefers-reduced-motion: reduce)").matches}function j6({avatarUrl:e,borderRadius:t=30,cardRef:l,color:r,isHidden:i,petId:s,rangeLabel:u,summary:f,toolLabel:d,userName:h}){const p=r.toLowerCase()==="#141b1a",b=N$[s],v=(h==null?void 0:h.trim())||"掘金用户",w=v.slice(0,1).toUpperCase(),x=`${u||"全部时间"} · ${d||"全部工具"}`,T=[{label:"预估费用",value:f?RD(f.totalCostUsd):"—"},{label:"总 Token",value:f?I0(f.totalTokens):"—"},{label:"输入 Token",value:f?I0(f.inputTokens):"—"},{label:"输出 Token",value:f?I0(f.outputTokens):"—"}];return E.jsxs("article",{"aria-hidden":i||void 0,className:"relative grid h-full w-full grid-rows-[minmax(0,1fr)_auto_auto] overflow-hidden text-white",ref:l,style:{...O6(r),borderRadius:`${t}px`,fontFamily:C$},children:[E.jsxs("div",{className:"absolute left-5 top-4 flex items-center gap-1 text-[13px] font-normal leading-none text-white",children:[E.jsx($$,{className:"size-5.5"}),E.jsx("div",{className:"text-[13px]",children:"稀土掘金"})]}),E.jsx("div",{className:"flex min-h-0 pt-8",children:E.jsx("div",{className:"relative flex h-full w-full items-center justify-center overflow-hidden rounded-xl",children:E.jsxs("div",{className:"relative flex max-w-[72%] items-end justify-center",children:[E.jsx("span",{"aria-hidden":"true",className:"absolute bottom-0 left-1/2 h-4 w-20 -translate-x-1/2 rounded-[50%]",style:{background:"radial-gradient(ellipse at center, rgba(12, 18, 30, 0.3) 0%, rgba(12, 18, 30, 0.2) 42%, rgba(12, 18, 30, 0) 76%)"}}),E.jsx("img",{alt:i?"":b.name,className:"relative z-10 mb-5 max-h-30 max-w-full object-contain",src:b.image})]})})}),E.jsx("dl",{className:"grid auto-rows-fr grid-cols-2 gap-2 px-4 font-sans font-normal",children:T.map((C,N)=>{const M=p&&N===0?"#11EE8C":"#fff";return E.jsxs("div",{className:"relative isolate flex min-h-16 min-w-0 flex-col justify-between overflow-hidden rounded-xl border border-white/10 bg-white/[0.07] p-3",children:[E.jsx(P$,{color:M,index:N}),E.jsx("dt",{className:"relative z-10 truncate text-[11px] font-normal text-white/60",children:C.label}),E.jsx("dd",{className:"relative z-10 mt-2 truncate text-base font-medium tracking-tight tabular-nums",style:{color:M,fontFamily:T$},children:C.value})]},C.label)})}),E.jsxs("div",{className:"flex max-w-full items-center gap-2.5 px-4 pb-4 pt-4",children:[E.jsxs(D0,{className:"aspect-square size-9 shrink-0 overflow-hidden rounded-full",variant:"soft",children:[e?E.jsx(D0.Image,{alt:i?"":`${v}的头像`,className:"aspect-square size-full rounded-full object-cover",src:e}):null,E.jsx(D0.Fallback,{className:"aspect-square size-full rounded-full border-none bg-white/15 font-normal text-white/70",children:w})]}),E.jsxs("div",{className:"min-w-0 text-left font-normal",children:[E.jsxs("p",{className:"max-w-40 truncate pb-0.5 text-[11px] leading-4",title:v,children:["@",v]}),E.jsx("p",{className:"max-w-40 truncate text-[9px] leading-3.5 text-white/55",title:x,children:x})]}),E.jsx(z$,{})]})]})}function H0({avatarUrl:e,color:t,isHidden:l,onTransitionEnd:r,petId:i,rangeLabel:s,style:u,summary:f,toolLabel:d,userName:h}){return E.jsx("div",{"aria-hidden":l||void 0,className:`absolute left-1/2 top-1/2 h-full aspect-2/3 ${P6}`,onTransitionEnd:r,style:u,children:E.jsx(j6,{avatarUrl:e,color:t,isHidden:l,petId:i,rangeLabel:s,summary:f,toolLabel:d,userName:h})})}const Qt=[{color:"#141b1A",petId:"yoyo"},{color:"#141b1A",petId:"click"},{color:"#141b1A",petId:"hawking"},{color:"#087FFA",petId:"yoyo"},{color:"#087FFA",petId:"click"},{color:"#087FFA",petId:"hawking"}];function Ga(e){const t=(e%Qt.length+Qt.length)%Qt.length;return Qt[t]??Qt[0]}function j$({activeIndex:e,avatarUrl:t,onActiveIndexChange:l,rangeLabel:r,summary:i,toolLabel:s,userName:u}){const[f,d]=y.useState(null),h=y.useRef(null),p=(e%Qt.length+Qt.length)%Qt.length;y.useEffect(()=>{if((f==null?void 0:f.phase)==="prepare")return h.current=window.requestAnimationFrame(()=>{h.current=window.requestAnimationFrame(()=>{d(T=>T&&{...T,phase:"running"})})}),()=>{h.current!==null&&window.cancelAnimationFrame(h.current)}},[f==null?void 0:f.phase]);const b=T=>{if(f)return;const C=(p+T+Qt.length)%Qt.length;if(O$()){l(C);return}d({direction:T,fromIndex:p,phase:"prepare",toIndex:C})},v=T=>{T.propertyName!=="transform"||(f==null?void 0:f.phase)!=="running"||(l(f.toIndex),d(null))},w=(f==null?void 0:f.toIndex)??p,x=Ga(p);return E.jsx("section",{className:"flex w-full flex-col items-center gap-5 py-2","aria-label":"分享卡片选择",children:E.jsxs("div",{className:"grid w-full max-w-170 grid-cols-[2.5rem_minmax(0,1fr)_2.5rem] items-center gap-2 sm:gap-6",children:[E.jsx(mn,{"aria-label":"上一张卡片",className:"z-20 rounded-full",isDisabled:f!==null,isIconOnly:!0,onPress:()=>b(-1),variant:"tertiary",children:E.jsx(hN,{className:"size-5"})}),E.jsxs("div",{className:"relative aspect-2/3 w-full max-w-75 min-w-0 justify-self-center",children:[Qt.map((T,C)=>{const N=(C-w+Qt.length)%Qt.length,M=D$(N,Qt.length);return E.jsx("div",{"aria-hidden":"true",className:`absolute left-1/2 top-1/2 h-[92%] aspect-2/3 rounded-[28px] ${P6}`,style:{...O6(T.color),opacity:M.opacity,transform:ti(M.offset,M.rotation),zIndex:M.zIndex}},`${T.color}-${T.petId}`)}),f?E.jsxs(E.Fragment,{children:[E.jsx(H0,{avatarUrl:t,color:Ga(f.fromIndex).color,isHidden:!0,petId:Ga(f.fromIndex).petId,rangeLabel:r,style:{opacity:f.phase==="running"?0:1,transform:f.phase==="running"?ti(-f.direction*72,-f.direction*4,.96):ti(),zIndex:20},summary:i,toolLabel:s,userName:u}),E.jsx(H0,{avatarUrl:t,color:Ga(f.toIndex).color,onTransitionEnd:v,petId:Ga(f.toIndex).petId,rangeLabel:r,style:{opacity:f.phase==="running"?1:0,transform:f.phase==="running"?ti():ti(f.direction*72,f.direction*4,.96),zIndex:10},summary:i,toolLabel:s,userName:u})]}):E.jsx(H0,{avatarUrl:t,color:x.color,petId:x.petId,rangeLabel:r,style:{opacity:1,transform:ti(),zIndex:10},summary:i,toolLabel:s,userName:u})]}),E.jsx(mn,{"aria-label":"下一张卡片",className:"z-20 rounded-full",isDisabled:f!==null,isIconOnly:!0,onPress:()=>b(1),variant:"tertiary",children:E.jsx(pN,{className:"size-5"})})]})})}const I$=1e3;async function hy(e){const t=performance.now();try{return await e}finally{const l=I$-(performance.now()-t);l>0&&await new Promise(r=>{window.setTimeout(r,l)})}}const K0={download:{error:"下载失败",idle:"下载",pending:"生成中…",success:"已下载"},copy:{error:"复制失败",idle:"复制",pending:"复制中…",success:"已复制"}};function B$({avatarUrl:e,color:t,petId:l,rangeLabel:r,summary:i,toolLabel:s,userName:u}){const[f]=y.useState(()=>new Xo({maxVisibleToasts:2})),[d,h]=y.useState(null),[p,b]=y.useState(null),[v,w]=y.useState(null),x=y.useRef(null),T=y.useRef(0),C=y.useRef(null),N=y.useRef(null),M=y.useRef(null);N.current=p,y.useEffect(()=>{if(!p||!x.current||C.current===p.id)return;const A=p;C.current=A.id,A$(x.current).then(A.resolve,A.reject).finally(()=>{C.current=null,b(U=>(U==null?void 0:U.id)===A.id?null:U)})},[p]),y.useEffect(()=>()=>{var A;M.current!==null&&window.clearTimeout(M.current),(A=N.current)==null||A.reject(new Error("分享弹窗已关闭"))},[]);const L=(A,U)=>{h(null),w({action:A,state:U}),M.current!==null&&window.clearTimeout(M.current),M.current=window.setTimeout(()=>w(null),1800)},k=()=>{const A=T.current+1;return T.current=A,new Promise((U,K)=>{b({avatarUrl:e,color:t,id:A,petId:l,rangeLabel:r,reject:K,resolve:U,summary:i,toolLabel:s,userName:u})})},B=async()=>{if(!d){h("download"),w(null);try{const A=await hy(k());L$(A),L("download","success"),f.add({description:"卡片图片已保存到本地",title:"下载成功",variant:"success"})}catch(A){console.error("[share-card] download failed",A),L("download","error")}}},G=async()=>{if(!d){h("copy"),w(null);try{const A=k();await hy(k$(A)),L("copy","success"),f.add({description:"卡片图片已复制,可直接粘贴",title:"复制成功",variant:"success"})}catch(A){console.error("[share-card] clipboard write failed",A),L("copy","error")}}},$=A=>d===A?K0[A].pending:(v==null?void 0:v.action)===A?K0[A][v.state]:K0[A].idle;return E.jsxs(E.Fragment,{children:[E.jsx(g2.Provider,{placement:"top end",queue:f}),E.jsxs(mn,{isDisabled:d==="copy",isPending:d==="download",onPress:()=>void B(),variant:"primary",children:[E.jsx(KL,{className:"size-4"}),$("download")]}),E.jsxs(mn,{isDisabled:d==="download",isPending:d==="copy",onPress:()=>void G(),variant:"outline",children:[E.jsx(bN,{className:"size-4"}),$("copy")]}),p?al.createPortal(E.jsx("div",{"aria-hidden":"true",className:"pointer-events-none fixed left-[-10000px] top-0 z-[-1] overflow-hidden opacity-100",style:{height:`${Dh}px`,width:`${Nh}px`},children:E.jsx("div",{className:"relative overflow-hidden opacity-100",ref:x,style:{background:p.color,borderRadius:"6px",height:`${Dh}px`,width:`${Nh}px`},children:E.jsx(j6,{avatarUrl:p.avatarUrl,borderRadius:6,color:p.color,isHidden:!0,petId:p.petId,rangeLabel:p.rangeLabel,summary:p.summary,toolLabel:p.toolLabel,userName:p.userName})})}),document.body):null]})}function H$(){const[e,t]=y.useState(!1),[l,r]=y.useState(0),{avatarLarge:i,userName:s}=uD(),{snapshot:u}=dD();return y.useEffect(()=>{const f=()=>{t(!0)};return window.addEventListener(Th,f),()=>window.removeEventListener(Th,f)},[]),E.jsx(Be.Backdrop,{isOpen:e,onOpenChange:t,children:E.jsx(Be.Container,{scroll:"inside",size:"lg",children:E.jsxs(Be.Dialog,{"aria-label":"分享",className:"overflow-hidden sm:max-w-[760px]",children:[E.jsx(Be.CloseTrigger,{"aria-label":"关闭分享"}),E.jsx(Be.Body,{className:"px-4 pb-4 pt-8 sm:px-8",children:E.jsx(j$,{activeIndex:l,avatarUrl:i,onActiveIndexChange:r,rangeLabel:u==null?void 0:u.rangeLabel,summary:(u==null?void 0:u.summary)??null,toolLabel:u==null?void 0:u.toolLabel,userName:s})}),E.jsx(Be.Footer,{className:"justify-center",children:E.jsx(B$,{avatarUrl:i,color:Ga(l).color,petId:Ga(l).petId,rangeLabel:u==null?void 0:u.rangeLabel,summary:(u==null?void 0:u.summary)??null,toolLabel:u==null?void 0:u.toolLabel,userName:s})})]})})})}const I6=y.createContext(null);function K$({children:e,value:t}){return E.jsx(I6.Provider,{value:t,children:e})}function _z(){return y.useContext(I6)}function U$(){const[e]=y.useState(()=>new Xo({maxVisibleToasts:2})),[t,l]=y.useState(()=>"unauthenticated"),[r,i]=y.useState(null),[s,u]=y.useState(""),[f,d]=y.useState(""),h=y.useRef(!1),p=y.useCallback(async()=>{let v=null;l("loading");try{v=await Zk()}catch{v=null}return v?(_v(v.userId),i(v.originUserId),u(v.userName),d(v.avatarLarge),l("authenticated"),v):(_v(null),i(null),u(""),d(""),l("unauthenticated"),null)},[]),b=y.useCallback(async()=>!1,[p]);return y.useEffect(()=>{if(h.current)return;const{loginFromClient:v,port:w,userId:x,originUserId:T,userName:C,avatarLarge:N}=Vx();if(x){h.current=!0,(async()=>{try{await Rh({juejin:{enabled:!0,token:x,originUserId:T||void 0,userName:C||void 0,avatarLarge:N||void 0}}),Xk(),i(T||x),u(C),d(N),l("authenticated"),kx(),e.add({title:"登录成功",variant:"success"})}catch(M){l("unauthenticated"),e.add({title:"写入失败",description:M instanceof Error?M.message:"请确认本机面板服务已启动",variant:"danger"})}})();return}{h.current=!0,l("unauthenticated");return}},[p,e]),y.useEffect(()=>{},[t,b]),{authStatus:t,userId:r,userName:s,avatarLarge:f,refreshAuth:b,toastQueue:e,ToastProvider:g2.Provider}}const my="tud.autoJuejinLoginPrompted";function F$(){const e=Ih(),t=cw({select:k=>k.pathname}),[l,r]=y.useState(!1),[i,s]=y.useState(!1),[u,f]=y.useState(!1),[d,h]=y.useState(null),[p,b]=y.useState(!1),v=Ok(),{authStatus:w,userId:x,userName:T,avatarLarge:C,toastQueue:N,ToastProvider:M}=U$();y.useEffect(()=>{t==="/settings"&&(r(!0),e({to:"/dashboard",replace:!0}))},[t,e]),y.useEffect(()=>{const k=()=>f(window.scrollY>4);return k(),window.addEventListener("scroll",k,{passive:!0}),()=>window.removeEventListener("scroll",k)},[]),y.useEffect(()=>{Vx().userId||(async()=>{try{if((await b2()).juejin.userId||sessionStorage.getItem(my))return;sessionStorage.setItem(my,"1"),await _x()}catch{}})()},[v]),y.useEffect(()=>{},[v,w]),y.useEffect(()=>{},[v,d==null?void 0:d.shouldShowGuide,e,t]);const L=y.useMemo(()=>({ready:!1,hasUserData:(d==null?void 0:d.reason)==="active",reason:(d==null?void 0:d.reason)==="uninstalled"?"uninstalled":(d==null?void 0:d.reason)==="active"?"active":"new_user"}),[w,v,d,p]);return E.jsx(cD,{authStatus:w,userId:x,userName:T,avatarLarge:C,children:E.jsx(fD,{children:E.jsx(K$,{value:L,children:E.jsxs("div",{className:"flex h-svh min-w-0 max-w-full flex-col overflow-hidden bg-background text-foreground",children:[E.jsx(M,{placement:"top end",queue:N}),E.jsx("div",{"aria-hidden":"true",className:`pointer-events-none fixed inset-x-0 top-0 z-40 h-8 transition-[background-color,backdrop-filter] duration-200 ${u?"bg-white/35 backdrop-blur-xl dark:bg-black/30":"bg-transparent"}`}),E.jsxs("div",{className:ny("relative min-h-0 flex-1 overflow-x-hidden overscroll-contain",t==="/pricing"?"overflow-y-hidden":"overflow-y-auto"),onScroll:k=>{f(k.currentTarget.scrollTop>4)},children:[E.jsx("div",{className:ny("relative mx-auto w-full px-4 py-4 sm:px-4 sm:py-6 md:px-8",t==="/download"?"max-w-328":"max-w-240","pb-12 min-[1040px]:pb-10"),children:E.jsx("main",{className:"min-w-0 w-full",children:E.jsx(Xy,{})})}),E.jsx(rN,{hideTrigger:!0,isOpen:l,onOpenChange:r}),E.jsx(zk,{hideTrigger:!0,isOpen:i,onOpenChange:s}),E.jsx(H$,{})]})]})})})})}const ur=_9({component:F$}),V$="modulepreload",_$=function(e){return"/"+e},py={},Zo=function(t,l,r){let i=Promise.resolve();if(l&&l.length>0){let u=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),d=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));i=u(l.map(h=>{if(h=_$(h),h in py)return;py[h]=!0;const p=h.endsWith(".css"),b=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${b}`))return;const v=document.createElement("link");if(v.rel=p?"stylesheet":V$,p||(v.as="script"),v.crossOrigin="",v.href=h,d&&v.setAttribute("nonce",d),document.head.appendChild(v),p)return new Promise((w,x)=>{v.addEventListener("load",w),v.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return i.then(u=>{for(const f of u||[])f.status==="rejected"&&s(f.reason);return t().catch(s)})},G$=()=>Zo(()=>import("./settings-CbKDaI0o.js"),[]),q$=gi("/settings")({component:_o(G$,"component")}),Y$=()=>Zo(()=>import("./rank-C9MoOP_H.js"),__vite__mapDeps([0,1,2])),X$=gi("/rank")({beforeLoad:()=>{throw bu({to:"/dashboard"})},component:_o(Y$,"component")}),W$=()=>Zo(()=>import("./pricing-CkW_F8H_.js"),__vite__mapDeps([3,2])),Z$=gi("/pricing")({component:_o(W$,"component")}),Q$=()=>Zo(()=>import("./download-DgoD8a6U.js"),__vite__mapDeps([4,5])),J$=gi("/download")({beforeLoad:()=>{throw bu({to:"/dashboard"})},component:_o(Q$,"component")}),ez=()=>Zo(()=>import("./dashboard-lj5vT943.js"),__vite__mapDeps([6,1,2,5,7])),tz=gi("/dashboard")({component:_o(ez,"component")}),nz=gi("/")({beforeLoad:({location:e})=>{const t=Object.fromEntries(new URLSearchParams(e.searchStr));throw bu({to:"/dashboard",replace:!0,search:t})}}),lz=q$.update({id:"/settings",path:"/settings",getParentRoute:()=>ur}),az=X$.update({id:"/rank",path:"/rank",getParentRoute:()=>ur}),rz=Z$.update({id:"/pricing",path:"/pricing",getParentRoute:()=>ur}),iz=J$.update({id:"/download",path:"/download",getParentRoute:()=>ur}),oz=tz.update({id:"/dashboard",path:"/dashboard",getParentRoute:()=>ur}),sz=nz.update({id:"/",path:"/",getParentRoute:()=>ur}),cz={IndexRoute:sz,DashboardRoute:oz,DownloadRoute:iz,PricingRoute:rz,RankRoute:az,SettingsRoute:lz},uz=ur._addFileChildren(cz)._addFileTypes(),gy=(()=>{const e="/".trim();if(!(!e||e==="/"))return e.replace(/\/+$/,"")})(),fz=rw({routeTree:uz,...gy?{basepath:gy}:{},defaultPreload:"intent",scrollRestoration:!0});m8.createRoot(document.getElementById("root")).render(E.jsx(y.StrictMode,{children:E.jsx(HL,{children:E.jsx(sw,{router:fz})})}));export{Fn as $,KL as A,mn as B,bN as C,Nk as D,Dl as E,At as F,ut as G,Ce as H,Ru as I,qo as J,p5 as K,mt as L,Be as M,Jw as N,BM as O,Uv as P,S6 as Q,V as R,Gx as S,ra as T,l2 as U,Pb as V,gz as W,Zw as X,lu as Y,Cu as Z,jM as _,wD as a,al as a$,pz as a0,aT as a1,sr as a2,e2 as a3,ku as a4,NM as a5,$M as a6,Mt as a7,d5 as a8,Je as a9,Kh as aA,mz as aB,DR as aC,Sz as aD,bn as aE,l5 as aF,Mz as aG,SA as aH,o5 as aI,fi as aJ,YR as aK,Ne as aL,jo as aM,W0 as aN,qR as aO,sv as aP,Sb as aQ,Q4 as aR,KR as aS,D9 as aT,n5 as aU,vi as aV,IR as aW,ya as aX,fR as aY,eM as aZ,X4 as a_,vz as aa,DM as ab,_n as ac,hM as ad,Ez as ae,xM as af,dM as ag,r2 as ah,vM as ai,mM as aj,bi as ak,uM as al,Ie as am,lL as an,fM as ao,ll as ap,Oo as aq,et as ar,He as as,va as at,ih as au,xb as av,i3 as aw,lr as ax,Wc as ay,er as az,L$ as b,Cz as b$,Ow as b0,Iw as b1,Fh as b2,WR as b3,Ct as b4,GT as b5,VC as b6,pk as b7,VL as b8,lk as b9,Bz as bA,jz as bB,Oz as bC,dD as bD,yA as bE,T5 as bF,V4 as bG,Nl as bH,_4 as bI,a2 as bJ,pa as bK,bz as bL,Zc as bM,sR as bN,wu as bO,t4 as bP,yz as bQ,aM as bR,ba as bS,Vn as bT,rM as bU,en as bV,A0 as bW,Yo as bX,Y0 as bY,Qy as bZ,uv as b_,Dz as ba,_z as bb,Tz as bc,Rz as bd,t2 as be,Ih as bf,b2 as bg,Ch as bh,Dk as bi,GL as bj,_x as bk,Nz as bl,FL as bm,Iz as bn,Lz as bo,Az as bp,Uz as bq,CD as br,TD as bs,ED as bt,a3 as bu,k9 as bv,Vo as bw,by as bx,s8 as by,Fz as bz,x2 as c,wz as c0,IM as c1,cv as c2,G3 as c3,sM as c4,yT as c5,yi as c6,Y4 as c7,xz as c8,ch as c9,_T as ca,W3 as cb,EM as cc,VT as cd,CM as ce,kM as cf,kz as d,k$ as e,I0 as f,RD as g,D0 as h,Vz as i,E as j,ny as k,$z as l,Ok as m,zz as n,Pz as o,Su as p,Ob as q,y as r,jt as s,vn as t,uD as u,ve as v,zT as w,O3 as x,yn as y,Sa as z};
143
+ `;function R$(){return new Promise(e=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>e())})})}async function z6(e){await document.fonts.ready,await Promise.all(Array.from(e.querySelectorAll("img")).map(t=>t.decode().catch(()=>{}))),await R$()}function M$(e){return new Promise((t,l)=>{const r=new FileReader;r.onerror=()=>l(r.error??new Error("读取分享资源失败")),r.onload=()=>t(String(r.result)),r.readAsDataURL(e)})}async function A$(e){await z6(e);const t=await N6(e,{cacheBust:!0,canvasHeight:E$,canvasWidth:w$,fontEmbedCSS:$6,height:Dh,imagePlaceholder:D6,pixelRatio:1,width:Nh});if(!t)throw new Error("生成分享图片失败");return t}async function Vz(e){await z6(e);const t=await N6(e,{cacheBust:!0,fontEmbedCSS:$6,imagePlaceholder:D6,pixelRatio:3});if(!t)throw new Error("生成分享图片失败");return t}function L$(e){const t=URL.createObjectURL(e),l=document.createElement("a");l.download=`juejin-ai-usage-${new Date().toISOString().slice(0,10)}.png`,l.href=t,l.click(),window.requestAnimationFrame(()=>URL.revokeObjectURL(t))}async function k$(e){var l;const t=window.tud;if(t!=null&&t.copyImageToClipboard){if(!await t.copyImageToClipboard(await M$(await e)))throw new Error("复制图片到系统剪贴板失败");return}if(typeof ClipboardItem>"u"||!((l=navigator.clipboard)!=null&&l.write))throw new Error("当前环境不支持复制图片到剪贴板");await navigator.clipboard.write([new ClipboardItem({[S$]:e})])}const N$={yoyo:{name:"Yoyo",image:TD},click:{name:"Click",image:ED},hawking:{name:"Hawking",image:CD}},P6="transition-[transform,opacity] duration-[320ms] ease-[cubic-bezier(0.22,1,0.36,1)] motion-reduce:transition-none";function O6(e){return{backgroundColor:e}}function D$(e,t){if(t===2)return e===0?{offset:0,rotation:0,opacity:0,zIndex:0}:{offset:38,rotation:3,opacity:.88,zIndex:1};const l=Math.max(0,t-1);if(e>=l)return{offset:0,rotation:0,opacity:.55,zIndex:0};const r=Math.ceil(l/2),i=e<r,s=i?r-e:e-r+1;return{offset:(i?-1:1)*38*s,rotation:(i?-1:1)*3*s,opacity:Math.max(.5,.88-.16*(s-1)),zIndex:Math.max(1,r-s+1)}}function $$({className:e}){return E.jsx("svg",{"aria-hidden":"true",className:e,fill:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:E.jsx("path",{d:"m12 14.316 7.454-5.88-2.022-1.625L12 11.1l-.004.003-5.432-4.288-2.02 1.624 7.452 5.88Zm0-7.247 2.89-2.298L12 2.453l-.004-.005-2.884 2.318 2.884 2.3Zm0 11.266-.005.002-9.975-7.87L0 12.088l.194.156 11.803 9.308 7.463-5.885L24 12.085l-2.023-1.624Z",transform:"translate(2.4 2.4) scale(.8)"})})}function z$(){return E.jsx(S6,{bgColor:"transparent",className:"ml-auto size-12 shrink-0 self-center overflow-hidden rounded-[6px]",fgColor:"#fff",imageSettings:{excavate:!0,height:12,src:wD,width:12},level:"H",marginSize:4,size:48,title:"访问稀土掘金 AI 用量页面",value:Bx})}const dy=["M0 42 C16 40 20 23 36 27 S58 38 72 20 S98 9 120 14","M0 36 C14 29 24 34 38 23 S61 14 76 22 S101 15 120 7","M0 39 C12 34 26 36 40 30 S61 9 76 17 S99 31 120 18","M0 43 C17 42 23 25 39 29 S62 37 78 23 S105 19 120 8"];function P$({color:e,index:t}){const l=dy[t]??dy[0];return E.jsxs("svg",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-11 w-full",preserveAspectRatio:"none",viewBox:"0 0 120 52",children:[E.jsx("path",{d:`${l} L120 52 L0 52 Z`,fill:e,fillOpacity:"0.06"}),E.jsx("path",{d:l,fill:"none",stroke:e,strokeLinecap:"round",strokeOpacity:"0.22",strokeWidth:"1.5",vectorEffect:"non-scaling-stroke"})]})}function ti(e=0,t=0,l=1){return`translate(calc(-50% + ${e}px), -50%) rotate(${t}deg) scale(${l})`}function O$(){return document.querySelector('[data-reduce-motion="true"]')!==null||window.matchMedia("(prefers-reduced-motion: reduce)").matches}function j6({avatarUrl:e,borderRadius:t=30,cardRef:l,color:r,isHidden:i,petId:s,rangeLabel:u,summary:f,toolLabel:d,userName:h}){const p=r.toLowerCase()==="#141b1a",b=N$[s],v=(h==null?void 0:h.trim())||"掘金用户",w=v.slice(0,1).toUpperCase(),x=`${u||"全部时间"} · ${d||"全部工具"}`,T=[{label:"预估费用",value:f?RD(f.totalCostUsd):"—"},{label:"总 Token",value:f?I0(f.totalTokens):"—"},{label:"输入 Token",value:f?I0(f.inputTokens):"—"},{label:"输出 Token",value:f?I0(f.outputTokens):"—"}];return E.jsxs("article",{"aria-hidden":i||void 0,className:"relative grid h-full w-full grid-rows-[minmax(0,1fr)_auto_auto] overflow-hidden text-white",ref:l,style:{...O6(r),borderRadius:`${t}px`,fontFamily:C$},children:[E.jsxs("div",{className:"absolute left-5 top-4 flex items-center gap-1 text-[13px] font-normal leading-none text-white",children:[E.jsx($$,{className:"size-5.5"}),E.jsx("div",{className:"text-[13px]",children:"稀土掘金"})]}),E.jsx("div",{className:"flex min-h-0 pt-8",children:E.jsx("div",{className:"relative flex h-full w-full items-center justify-center overflow-hidden rounded-xl",children:E.jsxs("div",{className:"relative flex max-w-[72%] items-end justify-center",children:[E.jsx("span",{"aria-hidden":"true",className:"absolute bottom-0 left-1/2 h-4 w-20 -translate-x-1/2 rounded-[50%]",style:{background:"radial-gradient(ellipse at center, rgba(12, 18, 30, 0.3) 0%, rgba(12, 18, 30, 0.2) 42%, rgba(12, 18, 30, 0) 76%)"}}),E.jsx("img",{alt:i?"":b.name,className:"relative z-10 mb-5 max-h-30 max-w-full object-contain",src:b.image})]})})}),E.jsx("dl",{className:"grid auto-rows-fr grid-cols-2 gap-2 px-4 font-sans font-normal",children:T.map((C,N)=>{const M=p&&N===0?"#11EE8C":"#fff";return E.jsxs("div",{className:"relative isolate flex min-h-16 min-w-0 flex-col justify-between overflow-hidden rounded-xl border border-white/10 bg-white/[0.07] p-3",children:[E.jsx(P$,{color:M,index:N}),E.jsx("dt",{className:"relative z-10 truncate text-[11px] font-normal text-white/60",children:C.label}),E.jsx("dd",{className:"relative z-10 mt-2 truncate text-base font-medium tracking-tight tabular-nums",style:{color:M,fontFamily:T$},children:C.value})]},C.label)})}),E.jsxs("div",{className:"flex max-w-full items-center gap-2.5 px-4 pb-4 pt-4",children:[E.jsxs(D0,{className:"aspect-square size-9 shrink-0 overflow-hidden rounded-full",variant:"soft",children:[e?E.jsx(D0.Image,{alt:i?"":`${v}的头像`,className:"aspect-square size-full rounded-full object-cover",src:e}):null,E.jsx(D0.Fallback,{className:"aspect-square size-full rounded-full border-none bg-white/15 font-normal text-white/70",children:w})]}),E.jsxs("div",{className:"min-w-0 text-left font-normal",children:[E.jsxs("p",{className:"max-w-40 truncate pb-0.5 text-[11px] leading-4",title:v,children:["@",v]}),E.jsx("p",{className:"max-w-40 truncate text-[9px] leading-3.5 text-white/55",title:x,children:x})]}),E.jsx(z$,{})]})]})}function H0({avatarUrl:e,color:t,isHidden:l,onTransitionEnd:r,petId:i,rangeLabel:s,style:u,summary:f,toolLabel:d,userName:h}){return E.jsx("div",{"aria-hidden":l||void 0,className:`absolute left-1/2 top-1/2 h-full aspect-2/3 ${P6}`,onTransitionEnd:r,style:u,children:E.jsx(j6,{avatarUrl:e,color:t,isHidden:l,petId:i,rangeLabel:s,summary:f,toolLabel:d,userName:h})})}const Qt=[{color:"#141b1A",petId:"yoyo"},{color:"#141b1A",petId:"click"},{color:"#141b1A",petId:"hawking"},{color:"#087FFA",petId:"yoyo"},{color:"#087FFA",petId:"click"},{color:"#087FFA",petId:"hawking"}];function Ga(e){const t=(e%Qt.length+Qt.length)%Qt.length;return Qt[t]??Qt[0]}function j$({activeIndex:e,avatarUrl:t,onActiveIndexChange:l,rangeLabel:r,summary:i,toolLabel:s,userName:u}){const[f,d]=y.useState(null),h=y.useRef(null),p=(e%Qt.length+Qt.length)%Qt.length;y.useEffect(()=>{if((f==null?void 0:f.phase)==="prepare")return h.current=window.requestAnimationFrame(()=>{h.current=window.requestAnimationFrame(()=>{d(T=>T&&{...T,phase:"running"})})}),()=>{h.current!==null&&window.cancelAnimationFrame(h.current)}},[f==null?void 0:f.phase]);const b=T=>{if(f)return;const C=(p+T+Qt.length)%Qt.length;if(O$()){l(C);return}d({direction:T,fromIndex:p,phase:"prepare",toIndex:C})},v=T=>{T.propertyName!=="transform"||(f==null?void 0:f.phase)!=="running"||(l(f.toIndex),d(null))},w=(f==null?void 0:f.toIndex)??p,x=Ga(p);return E.jsx("section",{className:"flex w-full flex-col items-center gap-5 py-2","aria-label":"分享卡片选择",children:E.jsxs("div",{className:"grid w-full max-w-170 grid-cols-[2.5rem_minmax(0,1fr)_2.5rem] items-center gap-2 sm:gap-6",children:[E.jsx(mn,{"aria-label":"上一张卡片",className:"z-20 rounded-full",isDisabled:f!==null,isIconOnly:!0,onPress:()=>b(-1),variant:"tertiary",children:E.jsx(hN,{className:"size-5"})}),E.jsxs("div",{className:"relative aspect-2/3 w-full max-w-75 min-w-0 justify-self-center",children:[Qt.map((T,C)=>{const N=(C-w+Qt.length)%Qt.length,M=D$(N,Qt.length);return E.jsx("div",{"aria-hidden":"true",className:`absolute left-1/2 top-1/2 h-[92%] aspect-2/3 rounded-[28px] ${P6}`,style:{...O6(T.color),opacity:M.opacity,transform:ti(M.offset,M.rotation),zIndex:M.zIndex}},`${T.color}-${T.petId}`)}),f?E.jsxs(E.Fragment,{children:[E.jsx(H0,{avatarUrl:t,color:Ga(f.fromIndex).color,isHidden:!0,petId:Ga(f.fromIndex).petId,rangeLabel:r,style:{opacity:f.phase==="running"?0:1,transform:f.phase==="running"?ti(-f.direction*72,-f.direction*4,.96):ti(),zIndex:20},summary:i,toolLabel:s,userName:u}),E.jsx(H0,{avatarUrl:t,color:Ga(f.toIndex).color,onTransitionEnd:v,petId:Ga(f.toIndex).petId,rangeLabel:r,style:{opacity:f.phase==="running"?1:0,transform:f.phase==="running"?ti():ti(f.direction*72,f.direction*4,.96),zIndex:10},summary:i,toolLabel:s,userName:u})]}):E.jsx(H0,{avatarUrl:t,color:x.color,petId:x.petId,rangeLabel:r,style:{opacity:1,transform:ti(),zIndex:10},summary:i,toolLabel:s,userName:u})]}),E.jsx(mn,{"aria-label":"下一张卡片",className:"z-20 rounded-full",isDisabled:f!==null,isIconOnly:!0,onPress:()=>b(1),variant:"tertiary",children:E.jsx(pN,{className:"size-5"})})]})})}const I$=1e3;async function hy(e){const t=performance.now();try{return await e}finally{const l=I$-(performance.now()-t);l>0&&await new Promise(r=>{window.setTimeout(r,l)})}}const K0={download:{error:"下载失败",idle:"下载",pending:"生成中…",success:"已下载"},copy:{error:"复制失败",idle:"复制",pending:"复制中…",success:"已复制"}};function B$({avatarUrl:e,color:t,petId:l,rangeLabel:r,summary:i,toolLabel:s,userName:u}){const[f]=y.useState(()=>new Xo({maxVisibleToasts:2})),[d,h]=y.useState(null),[p,b]=y.useState(null),[v,w]=y.useState(null),x=y.useRef(null),T=y.useRef(0),C=y.useRef(null),N=y.useRef(null),M=y.useRef(null);N.current=p,y.useEffect(()=>{if(!p||!x.current||C.current===p.id)return;const A=p;C.current=A.id,A$(x.current).then(A.resolve,A.reject).finally(()=>{C.current=null,b(U=>(U==null?void 0:U.id)===A.id?null:U)})},[p]),y.useEffect(()=>()=>{var A;M.current!==null&&window.clearTimeout(M.current),(A=N.current)==null||A.reject(new Error("分享弹窗已关闭"))},[]);const L=(A,U)=>{h(null),w({action:A,state:U}),M.current!==null&&window.clearTimeout(M.current),M.current=window.setTimeout(()=>w(null),1800)},k=()=>{const A=T.current+1;return T.current=A,new Promise((U,K)=>{b({avatarUrl:e,color:t,id:A,petId:l,rangeLabel:r,reject:K,resolve:U,summary:i,toolLabel:s,userName:u})})},B=async()=>{if(!d){h("download"),w(null);try{const A=await hy(k());L$(A),L("download","success"),f.add({description:"卡片图片已保存到本地",title:"下载成功",variant:"success"})}catch(A){console.error("[share-card] download failed",A),L("download","error")}}},G=async()=>{if(!d){h("copy"),w(null);try{const A=k();await hy(k$(A)),L("copy","success"),f.add({description:"卡片图片已复制,可直接粘贴",title:"复制成功",variant:"success"})}catch(A){console.error("[share-card] clipboard write failed",A),L("copy","error")}}},$=A=>d===A?K0[A].pending:(v==null?void 0:v.action)===A?K0[A][v.state]:K0[A].idle;return E.jsxs(E.Fragment,{children:[E.jsx(g2.Provider,{placement:"top end",queue:f}),E.jsxs(mn,{isDisabled:d==="copy",isPending:d==="download",onPress:()=>void B(),variant:"primary",children:[E.jsx(KL,{className:"size-4"}),$("download")]}),E.jsxs(mn,{isDisabled:d==="download",isPending:d==="copy",onPress:()=>void G(),variant:"outline",children:[E.jsx(bN,{className:"size-4"}),$("copy")]}),p?al.createPortal(E.jsx("div",{"aria-hidden":"true",className:"pointer-events-none fixed left-[-10000px] top-0 z-[-1] overflow-hidden opacity-100",style:{height:`${Dh}px`,width:`${Nh}px`},children:E.jsx("div",{className:"relative overflow-hidden opacity-100",ref:x,style:{background:p.color,borderRadius:"6px",height:`${Dh}px`,width:`${Nh}px`},children:E.jsx(j6,{avatarUrl:p.avatarUrl,borderRadius:6,color:p.color,isHidden:!0,petId:p.petId,rangeLabel:p.rangeLabel,summary:p.summary,toolLabel:p.toolLabel,userName:p.userName})})}),document.body):null]})}function H$(){const[e,t]=y.useState(!1),[l,r]=y.useState(0),{avatarLarge:i,userName:s}=uD(),{snapshot:u}=dD();return y.useEffect(()=>{const f=()=>{t(!0)};return window.addEventListener(Th,f),()=>window.removeEventListener(Th,f)},[]),E.jsx(Be.Backdrop,{isOpen:e,onOpenChange:t,children:E.jsx(Be.Container,{scroll:"inside",size:"lg",children:E.jsxs(Be.Dialog,{"aria-label":"分享",className:"overflow-hidden sm:max-w-[760px]",children:[E.jsx(Be.CloseTrigger,{"aria-label":"关闭分享"}),E.jsx(Be.Body,{className:"px-4 pb-4 pt-8 sm:px-8",children:E.jsx(j$,{activeIndex:l,avatarUrl:i,onActiveIndexChange:r,rangeLabel:u==null?void 0:u.rangeLabel,summary:(u==null?void 0:u.summary)??null,toolLabel:u==null?void 0:u.toolLabel,userName:s})}),E.jsx(Be.Footer,{className:"justify-center",children:E.jsx(B$,{avatarUrl:i,color:Ga(l).color,petId:Ga(l).petId,rangeLabel:u==null?void 0:u.rangeLabel,summary:(u==null?void 0:u.summary)??null,toolLabel:u==null?void 0:u.toolLabel,userName:s})})]})})})}const I6=y.createContext(null);function K$({children:e,value:t}){return E.jsx(I6.Provider,{value:t,children:e})}function _z(){return y.useContext(I6)}function U$(){const[e]=y.useState(()=>new Xo({maxVisibleToasts:2})),[t,l]=y.useState(()=>"unauthenticated"),[r,i]=y.useState(null),[s,u]=y.useState(""),[f,d]=y.useState(""),h=y.useRef(!1),p=y.useCallback(async()=>{let v=null;l("loading");try{v=await Zk()}catch{v=null}return v?(_v(v.userId),i(v.originUserId),u(v.userName),d(v.avatarLarge),l("authenticated"),v):(_v(null),i(null),u(""),d(""),l("unauthenticated"),null)},[]),b=y.useCallback(async()=>!1,[p]);return y.useEffect(()=>{if(h.current)return;const{loginFromClient:v,port:w,userId:x,originUserId:T,userName:C,avatarLarge:N}=Vx();if(x){h.current=!0,(async()=>{try{await Rh({juejin:{enabled:!0,token:x,originUserId:T||void 0,userName:C||void 0,avatarLarge:N||void 0}}),Xk(),i(T||x),u(C),d(N),l("authenticated"),kx(),e.add({title:"登录成功",variant:"success"})}catch(M){l("unauthenticated"),e.add({title:"写入失败",description:M instanceof Error?M.message:"请确认本机面板服务已启动",variant:"danger"})}})();return}{h.current=!0,l("unauthenticated");return}},[p,e]),y.useEffect(()=>{},[t,b]),{authStatus:t,userId:r,userName:s,avatarLarge:f,refreshAuth:b,toastQueue:e,ToastProvider:g2.Provider}}const my="tud.autoJuejinLoginPrompted";function F$(){const e=Ih(),t=cw({select:k=>k.pathname}),[l,r]=y.useState(!1),[i,s]=y.useState(!1),[u,f]=y.useState(!1),[d,h]=y.useState(null),[p,b]=y.useState(!1),v=Ok(),{authStatus:w,userId:x,userName:T,avatarLarge:C,toastQueue:N,ToastProvider:M}=U$();y.useEffect(()=>{t==="/settings"&&(r(!0),e({to:"/dashboard",replace:!0}))},[t,e]),y.useEffect(()=>{const k=()=>f(window.scrollY>4);return k(),window.addEventListener("scroll",k,{passive:!0}),()=>window.removeEventListener("scroll",k)},[]),y.useEffect(()=>{Vx().userId||(async()=>{try{if((await b2()).juejin.userId||sessionStorage.getItem(my))return;sessionStorage.setItem(my,"1"),await _x()}catch{}})()},[v]),y.useEffect(()=>{},[v,w]),y.useEffect(()=>{},[v,d==null?void 0:d.shouldShowGuide,e,t]);const L=y.useMemo(()=>({ready:!1,hasUserData:(d==null?void 0:d.reason)==="active",reason:(d==null?void 0:d.reason)==="uninstalled"?"uninstalled":(d==null?void 0:d.reason)==="active"?"active":"new_user"}),[w,v,d,p]);return E.jsx(cD,{authStatus:w,userId:x,userName:T,avatarLarge:C,children:E.jsx(fD,{children:E.jsx(K$,{value:L,children:E.jsxs("div",{className:"flex h-svh min-w-0 max-w-full flex-col overflow-hidden bg-background text-foreground",children:[E.jsx(M,{placement:"top end",queue:N}),E.jsx("div",{"aria-hidden":"true",className:`pointer-events-none fixed inset-x-0 top-0 z-40 h-8 transition-[background-color,backdrop-filter] duration-200 ${u?"bg-white/35 backdrop-blur-xl dark:bg-black/30":"bg-transparent"}`}),E.jsxs("div",{className:ny("relative min-h-0 flex-1 overflow-x-hidden overscroll-contain",t==="/pricing"?"overflow-y-hidden":"overflow-y-auto"),onScroll:k=>{f(k.currentTarget.scrollTop>4)},children:[E.jsx("div",{className:ny("relative mx-auto w-full px-4 py-4 sm:px-4 sm:py-6 md:px-8",t==="/download"?"max-w-328":"max-w-240","pb-12 min-[1040px]:pb-10"),children:E.jsx("main",{className:"min-w-0 w-full",children:E.jsx(Xy,{})})}),E.jsx(rN,{hideTrigger:!0,isOpen:l,onOpenChange:r}),E.jsx(zk,{hideTrigger:!0,isOpen:i,onOpenChange:s}),E.jsx(H$,{})]})]})})})})}const ur=_9({component:F$}),V$="modulepreload",_$=function(e){return"/"+e},py={},Zo=function(t,l,r){let i=Promise.resolve();if(l&&l.length>0){let u=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),d=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));i=u(l.map(h=>{if(h=_$(h),h in py)return;py[h]=!0;const p=h.endsWith(".css"),b=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${b}`))return;const v=document.createElement("link");if(v.rel=p?"stylesheet":V$,p||(v.as="script"),v.crossOrigin="",v.href=h,d&&v.setAttribute("nonce",d),document.head.appendChild(v),p)return new Promise((w,x)=>{v.addEventListener("load",w),v.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return i.then(u=>{for(const f of u||[])f.status==="rejected"&&s(f.reason);return t().catch(s)})},G$=()=>Zo(()=>import("./settings-BA_UlPf3.js"),[]),q$=gi("/settings")({component:_o(G$,"component")}),Y$=()=>Zo(()=>import("./rank-DNpmekT1.js"),__vite__mapDeps([0,1,2,3])),X$=gi("/rank")({beforeLoad:()=>{throw bu({to:"/dashboard"})},component:_o(Y$,"component")}),W$=()=>Zo(()=>import("./pricing-C1AgdgdM.js"),__vite__mapDeps([4,2])),Z$=gi("/pricing")({component:_o(W$,"component")}),Q$=()=>Zo(()=>import("./download-w1_SlsVA.js"),__vite__mapDeps([5,3,6])),J$=gi("/download")({beforeLoad:()=>{throw bu({to:"/dashboard"})},component:_o(Q$,"component")}),ez=()=>Zo(()=>import("./dashboard-2aS4UXAq.js"),__vite__mapDeps([7,1,2,3,6,8])),tz=gi("/dashboard")({component:_o(ez,"component")}),nz=gi("/")({beforeLoad:({location:e})=>{const t=Object.fromEntries(new URLSearchParams(e.searchStr));throw bu({to:"/dashboard",replace:!0,search:t})}}),lz=q$.update({id:"/settings",path:"/settings",getParentRoute:()=>ur}),az=X$.update({id:"/rank",path:"/rank",getParentRoute:()=>ur}),rz=Z$.update({id:"/pricing",path:"/pricing",getParentRoute:()=>ur}),iz=J$.update({id:"/download",path:"/download",getParentRoute:()=>ur}),oz=tz.update({id:"/dashboard",path:"/dashboard",getParentRoute:()=>ur}),sz=nz.update({id:"/",path:"/",getParentRoute:()=>ur}),cz={IndexRoute:sz,DashboardRoute:oz,DownloadRoute:iz,PricingRoute:rz,RankRoute:az,SettingsRoute:lz},uz=ur._addFileChildren(cz)._addFileTypes(),gy=(()=>{const e="/".trim();if(!(!e||e==="/"))return e.replace(/\/+$/,"")})(),fz=rw({routeTree:uz,...gy?{basepath:gy}:{},defaultPreload:"intent",scrollRestoration:!0});m8.createRoot(document.getElementById("root")).render(E.jsx(y.StrictMode,{children:E.jsx(HL,{children:E.jsx(sw,{router:fz})})}));export{Fn as $,KL as A,mn as B,bN as C,Nk as D,Dl as E,At as F,ut as G,Ce as H,Ru as I,qo as J,p5 as K,mt as L,Be as M,Jw as N,BM as O,Uv as P,S6 as Q,V as R,Gx as S,ra as T,l2 as U,Pb as V,gz as W,Zw as X,lu as Y,Cu as Z,jM as _,wD as a,al as a$,pz as a0,aT as a1,sr as a2,e2 as a3,ku as a4,NM as a5,$M as a6,Mt as a7,d5 as a8,Je as a9,Kh as aA,mz as aB,DR as aC,Sz as aD,bn as aE,l5 as aF,Mz as aG,SA as aH,o5 as aI,fi as aJ,YR as aK,Ne as aL,jo as aM,W0 as aN,qR as aO,sv as aP,Sb as aQ,Q4 as aR,KR as aS,D9 as aT,n5 as aU,vi as aV,IR as aW,ya as aX,fR as aY,eM as aZ,X4 as a_,vz as aa,DM as ab,_n as ac,hM as ad,Ez as ae,xM as af,dM as ag,r2 as ah,vM as ai,mM as aj,bi as ak,uM as al,Ie as am,lL as an,fM as ao,ll as ap,Oo as aq,et as ar,He as as,va as at,ih as au,xb as av,i3 as aw,lr as ax,Wc as ay,er as az,L$ as b,Cz as b$,Ow as b0,Iw as b1,Fh as b2,WR as b3,Ct as b4,GT as b5,VC as b6,pk as b7,VL as b8,lk as b9,Bz as bA,jz as bB,Oz as bC,dD as bD,yA as bE,T5 as bF,V4 as bG,Nl as bH,_4 as bI,a2 as bJ,pa as bK,bz as bL,Zc as bM,sR as bN,wu as bO,t4 as bP,yz as bQ,aM as bR,ba as bS,Vn as bT,rM as bU,en as bV,A0 as bW,Yo as bX,Y0 as bY,Qy as bZ,uv as b_,Dz as ba,_z as bb,Tz as bc,Rz as bd,t2 as be,Ih as bf,b2 as bg,Ch as bh,Dk as bi,GL as bj,_x as bk,Nz as bl,FL as bm,Iz as bn,Lz as bo,Az as bp,Uz as bq,CD as br,TD as bs,ED as bt,a3 as bu,k9 as bv,Vo as bw,by as bx,s8 as by,Fz as bz,x2 as c,wz as c0,IM as c1,cv as c2,G3 as c3,sM as c4,yT as c5,yi as c6,Y4 as c7,xz as c8,ch as c9,_T as ca,W3 as cb,EM as cc,VT as cd,CM as ce,kM as cf,kz as d,k$ as e,I0 as f,RD as g,D0 as h,Vz as i,E as j,ny as k,$z as l,Ok as m,zz as n,Pz as o,Su as p,Ob as q,y as r,jt as s,vn as t,uD as u,ve as v,zT as w,O3 as x,yn as y,Sa as z};