@juejin-opensource/jusage 0.1.1-beta.8 → 0.1.1

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.
@@ -0,0 +1 @@
1
+ import{r as i,j as e,k as m,B as L,b6 as Q}from"./index-DKJwDJt7.js";import{P as f,C as H,a as k}from"./ChevronDown-CBnDSnT1.js";const X=n=>i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},n),i.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 2.5H8A1.5 1.5 0 0 0 6.5 4v1H8a3 3 0 0 1 3 3v1.5h1A1.5 1.5 0 0 0 13.5 8V4A1.5 1.5 0 0 0 12 2.5M11 11h1a3 3 0 0 0 3-3V4a3 3 0 0 0-3-3H8a3 3 0 0 0-3 3v1H4a3 3 0 0 0-3 3v4a3 3 0 0 0 3 3h4a3 3 0 0 0 3-3zM4 6.5h4A1.5 1.5 0 0 1 9.5 8v4A1.5 1.5 0 0 1 8 13.5H4A1.5 1.5 0 0 1 2.5 12V8A1.5 1.5 0 0 1 4 6.5",clipRule:"evenodd"})),ee=n=>i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},n),i.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M10.418 2.489c.9-1.196 2.382-1.724 3.154-1.391.852.367 1.539 2.08 1.054 3.702a4 4 0 0 1-2.616 5.559c.309.471.49 1.035.49 1.641v2.25a.75.75 0 0 1-1.5 0V12a1.5 1.5 0 0 0-3 0v2.25a.75.75 0 0 1-1.5 0v-.75h-.876a2.626 2.626 0 0 1-2.625-2.625c0-.621-.504-1.125-1.125-1.125h-.125a.75.75 0 0 1 0-1.5h.125a2.625 2.625 0 0 1 2.625 2.625c0 .621.504 1.125 1.125 1.125H6.5c0-.606.18-1.17.488-1.641A4 4 0 0 1 4.373 4.8c-.484-1.623.202-3.335 1.054-3.702.772-.333 2.254.195 3.155 1.39zm2.549.02a1.4 1.4 0 0 0-.35.098 2.5 2.5 0 0 0-1 .784l-.451.598H7.834l-.45-.598a2.5 2.5 0 0 0-1.001-.784 1.4 1.4 0 0 0-.352-.099c-.063.088-.14.231-.204.429a2.5 2.5 0 0 0-.016 1.434l.163.546-.242.517c-.13.279-.21.586-.228.913l-.004.142a2.5 2.5 0 0 0 2.5 2.5h3a2.5 2.5 0 0 0 2.267-3.555l-.242-.517.163-.547a2.5 2.5 0 0 0-.016-1.433 1.6 1.6 0 0 0-.205-.429",clipRule:"evenodd"})),B="https://gitee.com/juejin-cn/juejin-usage",ne=`${B}/releases`,te="https://gitee.com/api/v5/repos/juejin-cn/juejin-usage/releases?per_page=8",U="https://github.com/juejin-cn/juejin-usage",se=`${U}/releases`,ae="https://api.github.com/repos/juejin-cn/juejin-usage/releases?per_page=8",re=8e3,v=[{id:"macos-arm",os:"macos",label:"下载 macOS",menuLabel:"macOS(Apple Silicon)",badgePlatform:"macOS",requirement:"macOS 14+"},{id:"macos-intel",os:"macos",label:"下载 macOS(Intel)",menuLabel:"macOS(Intel)",badgePlatform:"macOS",requirement:"macOS 14+"},{id:"windows",os:"windows",label:"下载 Windows",menuLabel:"Windows",badgePlatform:"Windows",requirement:"Windows 10+"}],oe=new Map(v.map(n=>[n.id,n]));function ie(n){return oe.get(n)??v[0]}function M(n,t="",a=""){const o=`${a} ${t} ${n}`.toLowerCase();return/\bwin(?:dows|32|64|ce)?\b/.test(o)||o.includes("windows")?"windows":o.includes("mac")||o.includes("darwin")||o.includes("iphone")||o.includes("ipad")||o.includes("ipod")?"macos":"other"}function P(n,t=""){const a=t.toLowerCase();return a.includes("arm")?"arm":a.includes("x86")||a.includes("x64")||a.includes("amd64")||/\bintel\b/i.test(n)?"x64":"unknown"}function $(n,t="unknown"){return n==="windows"?"windows":n==="macos"&&t==="x64"?"macos-intel":"macos-arm"}function le(n){return n.find(t=>!t.draft)??null}function W(n){return!/\.(blockmap|yml|yaml|zip|tar\.gz)$/i.test(n)}function C(n){return n.some(t=>W(t.name)&&/\.(dmg|exe)$/i.test(t.name))}function ce(n,t){var o,u,p,h;const a=n.filter(l=>W(l.name));if(t==="windows"){const l=a.find(d=>/\.exe$/i.test(d.name)&&/setup/i.test(d.name)&&!/portable/i.test(d.name));return l?l.browser_download_url:((o=a.find(d=>/\.exe$/i.test(d.name)&&!/portable/i.test(d.name)))==null?void 0:o.browser_download_url)??null}return t==="macos-arm"?((u=a.find(l=>/arm64\.dmg$/i.test(l.name)))==null?void 0:u.browser_download_url)??null:((p=a.find(l=>/x64\.dmg$/i.test(l.name)))==null?void 0:p.browser_download_url)??((h=a.find(l=>/\.dmg$/i.test(l.name)&&!/arm64/i.test(l.name)))==null?void 0:h.browser_download_url)??null}function de(n){return n==="github"?se:ne}function ue(n,t){return{source:n,tagName:t.tag_name,assets:t.assets??[]}}function fe(n,t){if(n&&C(n.assets))return n;if(t&&C(t.assets))return t;throw new Error("No published desktop release")}async function V(n,t){const a=new AbortController,o=setTimeout(()=>a.abort(),re);try{const u=await fetch(n,{headers:{Accept:t==="github"?"application/vnd.github+json":"application/json"},signal:a.signal});if(!u.ok)throw new Error(`${t} releases ${u.status}`);const p=await u.json(),h=le(p);if(!h)throw new Error(`No published ${t} release`);return ue(t,h)}finally{clearTimeout(o)}}async function me(){let n=null;try{n=await V(te,"gitee")}catch{n=null}if(n&&C(n.assets))return n;const t=await V(ae,"github");return fe(n,t)}const he={new_user:{badge:"Juejin Usage",headline:["Cursor、Claude、Codex","多工具 Token 与费用","本地面板一张表看完。"],description:"汇总你实际在用的 AI 编码工具用量与趋势,安装后即可查看。"},uninstalled:{badge:"客户端暂未连接",headline:["客户端暂未连接","启动后继续","同步本机用量。"],description:"下载并打开 Juejin Usage,即可把本机 AI 用量同步回这块面板。"}},xe="/e1.png",E=[{id:"install-start",label:"npm",command:"npm i -g @juejin-opensource/jusage && jusage service start"},{id:"npx",label:"npx",command:"npx @juejin-opensource/jusage start"}],q="tud.downloadTarget";function D(){try{const n=sessionStorage.getItem(q);if(n&&v.some(t=>t.id===n))return n}catch{}return null}function pe(n){try{sessionStorage.setItem(q,n)}catch{}}function ge({reason:n}){const t=he[n],[a,o]=i.useState(()=>{const s=D();return s||(typeof navigator>"u"?"macos-arm":$(M(navigator.userAgent,navigator.platform),P(navigator.userAgent)))}),[u,p]=i.useState({}),[h,l]=i.useState(),[d,R]=i.useState(!1),[_,I]=i.useState(!1),[T,Z]=i.useState("npx"),[g,N]=i.useState(!1),O=i.useRef(D()!==null),b=ie(a),F=de(h),y=E.find(s=>s.id===T)??E[0];i.useEffect(()=>{var x,w;let s=!1;const r=navigator,c=(j,K)=>{var z;s||O.current||o($(M(r.userAgent,r.platform,K??((z=r.userAgentData)==null?void 0:z.platform)??""),P(r.userAgent,j)))};return c(),(w=(x=r.userAgentData)==null?void 0:x.getHighEntropyValues)==null||w.call(x,["architecture","platform"]).then(j=>{c(j.architecture,j.platform)}).catch(()=>{}),()=>{s=!0}},[]),i.useEffect(()=>{let s=!1;return me().then(r=>{if(s)return;const c={};for(const x of v){const w=ce(r.assets,x.id);w&&(c[x.id]=w)}p(c),l(r.source)}).catch(()=>{}),()=>{s=!0}},[]),i.useEffect(()=>{if(!g)return;const s=window.setTimeout(()=>N(!1),1600);return()=>window.clearTimeout(s)},[g]);const J=s=>{const r=u[s]??F,c=document.createElement("a");c.href=r,c.rel="noopener noreferrer",c.target="_blank",u[s]&&(c.download=""),document.body.append(c),c.click(),c.remove()},Y=async()=>{try{await navigator.clipboard.writeText(y.command),N(!0)}catch{N(!1)}};return e.jsx("section",{className:"flex min-h-[calc(100svh-9rem)] items-start pt-4 pb-10 sm:pt-6 sm:pb-14 lg:pt-8",children:e.jsxs("div",{className:"grid w-full items-start gap-10 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.15fr)] lg:gap-16 xl:gap-20",children:[e.jsxs("div",{className:"max-w-2xl motion-safe:animate-[fade-up_420ms_ease-out] lg:max-w-none",children:[e.jsxs("p",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-base text-muted",children:[e.jsx("span",{children:t.badge}),e.jsx("span",{"aria-hidden":"true",className:"text-foreground/25",children:"·"}),b.os==="windows"?e.jsx(S,{className:"size-4 text-foreground/70"}):e.jsx(A,{className:"size-4 text-foreground/70"}),e.jsxs("span",{children:["适用于 ",b.badgePlatform]})]}),e.jsxs("h1",{className:"mt-6 text-[2.15rem] leading-[1.15] font-semibold tracking-tight text-foreground sm:text-5xl sm:leading-[1.12] lg:text-[3.15rem] lg:leading-[1.1]",children:[t.headline[0],e.jsx("br",{}),t.headline[1],e.jsx("br",{}),t.headline[2]]}),e.jsx("p",{className:"mt-5 max-w-xl text-lg leading-8 text-muted",children:t.description}),e.jsxs("div",{className:"mt-9 flex flex-col gap-4",children:[e.jsxs("div",{"aria-label":"下载客户端",className:"inline-flex max-w-full shrink-0 overflow-hidden rounded-full shadow-[0_1px_2px_rgb(0_0_0/0.06)]",role:"group",children:[e.jsxs("button",{className:m(G,"rounded-l-full ps-6 pe-5"),type:"button",onClick:()=>J(a),children:[b.os==="windows"?e.jsx(S,{className:"size-4.5"}):e.jsx(A,{className:"size-4.5"}),b.label]}),e.jsxs(f,{isOpen:d,onOpenChange:R,children:[e.jsx(L,{"aria-expanded":d,"aria-haspopup":"menu","aria-label":"选择其它系统",className:m(G,"h-14! min-h-14! min-w-14 rounded-l-none rounded-r-full border-0 p-0 shadow-none","bg-[#1e80ff]! text-white! hover:bg-[#1171ee]!","relative before:absolute before:inset-y-2.5 before:left-0 before:w-px before:bg-white/30","dark:bg-[#4b9cff]! dark:hover:bg-[#3a8ff0]!"),isIconOnly:!0,variant:"primary",children:e.jsx(H,{"aria-hidden":"true",className:m("size-4.5 transition-transform duration-200 motion-reduce:transition-none",d&&"rotate-180")})}),e.jsx(f.Content,{className:"min-w-56 overflow-hidden rounded-[10px] border-0 bg-overlay p-0 text-overlay-foreground shadow-surface",placement:"bottom start",children:e.jsxs(f.Dialog,{className:"p-0 outline-none",children:[e.jsx(f.Heading,{className:"sr-only",children:"选择下载平台"}),e.jsx("div",{className:"flex flex-col py-1",role:"menu",children:v.map(s=>{const r=s.id===a;return e.jsxs("button",{"aria-current":r?"true":void 0,className:m("flex min-h-11 w-full cursor-pointer items-center gap-2 px-3 text-left text-sm","transition-colors duration-150","hover:bg-surface-secondary","focus-visible:bg-surface-secondary focus-visible:outline-none",r?"text-foreground":"text-foreground/80"),role:"menuitem",type:"button",onClick:()=>{O.current=!0,pe(s.id),o(s.id),R(!1)},children:[s.os==="windows"?e.jsx(S,{className:"size-4 text-foreground/70"}):e.jsx(A,{className:"size-4 text-foreground/70"}),e.jsx("span",{className:"min-w-0 flex-1",children:s.menuLabel}),r?e.jsx(k,{"aria-hidden":"true",className:"size-4 text-[#1e80ff] dark:text-[#4b9cff]"}):null]},s.id)})})]})})]})]}),e.jsxs("div",{className:"flex min-h-14 min-w-0 max-w-2xl items-center gap-2 rounded-2xl border border-border bg-surface-secondary/80 p-2 ps-3 dark:bg-overlay/60",children:[e.jsxs(f,{isOpen:_,onOpenChange:I,children:[e.jsxs(L,{"aria-expanded":_,"aria-haspopup":"menu","aria-label":"选择 CLI 启动方式",className:"h-10 min-h-10 shrink-0 gap-1 rounded-full bg-background/80 px-3 text-xs font-medium text-foreground shadow-none hover:bg-background dark:bg-black/10 dark:hover:bg-black/20",variant:"secondary",children:[e.jsx("span",{children:y.label}),e.jsx(H,{"aria-hidden":"true",className:m("size-3.5 transition-transform duration-200 motion-reduce:transition-none",_&&"rotate-180")})]}),e.jsx(f.Content,{className:"min-w-60 overflow-hidden rounded-[10px] border-0 bg-overlay p-0 text-overlay-foreground shadow-surface",placement:"bottom start",children:e.jsxs(f.Dialog,{className:"p-0 outline-none",children:[e.jsx(f.Heading,{className:"sr-only",children:"选择 CLI 启动方式"}),e.jsx("div",{className:"flex flex-col py-1",role:"menu",children:E.map(s=>{const r=s.id===T;return e.jsxs("button",{"aria-current":r?"true":void 0,className:m("flex min-h-11 w-full cursor-pointer items-center gap-2 px-3 text-left text-sm","transition-colors duration-150 hover:bg-surface-secondary","focus-visible:bg-surface-secondary focus-visible:outline-none",r?"text-foreground":"text-foreground/80"),role:"menuitem",type:"button",onClick:()=>{Z(s.id),I(!1)},children:[e.jsx("span",{className:"min-w-0 flex-1",children:s.label}),r?e.jsx(k,{"aria-hidden":"true",className:"size-4 text-[#1e80ff] dark:text-[#4b9cff]"}):null]},s.id)})})]})})]}),e.jsx("div",{className:"min-w-0 flex-1 overflow-hidden rounded-xl bg-background/75 px-3 py-2 dark:bg-black/10",children:e.jsxs("code",{className:"block overflow-x-auto whitespace-nowrap font-mono text-sm text-foreground/85 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:["$ ",y.command]})}),e.jsx("button",{"aria-label":g?"安装命令已复制":"复制 CLI 安装命令",className:m("inline-flex size-11 shrink-0 items-center justify-center rounded-full","text-muted transition-colors duration-150","hover:bg-background hover:text-foreground","focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","touch-manipulation"),type:"button",onClick:()=>{Y()},children:g?e.jsx(k,{"aria-hidden":"true",className:"size-4 text-[#1e80ff] dark:text-[#4b9cff]"}):e.jsx(X,{"aria-hidden":"true",className:"size-4"})})]})]}),e.jsx("p",{"aria-live":"polite",className:"sr-only",children:g?"安装命令已复制":""}),e.jsxs("p",{className:"mt-5 flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted",children:[e.jsxs("span",{className:"inline-flex items-center gap-2",children:[e.jsx("a",{"aria-label":"前往 Gitee 仓库",className:"inline-flex size-8 items-center justify-center rounded-full text-foreground/70 transition-colors hover:bg-surface-secondary hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent",href:B,rel:"noopener noreferrer",target:"_blank",children:e.jsx(be,{className:"size-4.5"})}),e.jsx("a",{"aria-label":"前往 GitHub 仓库",className:"inline-flex size-8 items-center justify-center rounded-full text-foreground/70 transition-colors hover:bg-surface-secondary hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent",href:U,rel:"noopener noreferrer",target:"_blank",children:e.jsx(ee,{"aria-hidden":"true",className:"size-4.5"})})]}),e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx("span",{children:b.requirement}),e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx("span",{children:"CLI 需 Node.js 20+"})]})]}),e.jsx("div",{className:"min-w-0 motion-safe:animate-[fade-up_520ms_ease-out]",children:e.jsx("figure",{className:"overflow-hidden rounded-2xl border border-border/80 bg-surface shadow-[0_24px_48px_-28px_rgb(15_23_42/0.45)] dark:shadow-[0_24px_48px_-24px_rgb(0_0_0/0.65)]",children:e.jsx("img",{alt:"Juejin Usage 用量看板界面预览:费用、Token、热力图与趋势图",className:"h-auto w-full",decoding:"async",fetchPriority:"high",height:1560,src:xe,width:2102})})})]})})}const G=m("inline-flex h-14 min-h-14 cursor-pointer items-center justify-center gap-2.5","bg-[#1e80ff] text-base font-medium whitespace-nowrap text-white","transition-colors duration-200 motion-reduce:transition-none","hover:bg-[#1171ee] active:brightness-[0.96]","focus-visible:z-10 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[#1e80ff]","dark:bg-[#4b9cff] dark:hover:bg-[#3a8ff0] dark:focus-visible:outline-[#4b9cff]","touch-manipulation");function A({className:n}){return e.jsx("svg",{"aria-hidden":"true",className:n,fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"})})}function be({className:n}){return e.jsx("svg",{"aria-hidden":"true",className:n,fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M11.984 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.016 0zm6.09 5.333c.328 0 .593.266.592.593v1.482a.594.594 0 0 1-.593.592H9.777c-.982 0-1.778.796-1.778 1.778v5.63c0 .327.266.592.593.592h5.63c.982 0 1.778-.796 1.778-1.778v-.296a.593.593 0 0 0-.592-.593h-4.15a.592.592 0 0 1-.592-.592v-1.482a.593.593 0 0 1 .593-.592h6.815c.327 0 .593.265.593.592v3.408a4 4 0 0 1-4 4H5.926a.593.593 0 0 1-.593-.593V9.778a4.444 4.444 0 0 1 4.445-4.444h8.296z"})})}function S({className:n}){return e.jsx("svg",{"aria-hidden":"true",className:n,fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M3 5.2 11.2 4v7.4H3V5.2Zm8.9-1.4L21 2.6v8.8h-9.1V3.8ZM3 13.4h8.2V21L3 19.7v-6.3Zm8.9 0H21V21.4l-9.1-1.3v-6.7Z"})})}function je(){const n=Q(),t=(n==null?void 0:n.reason)==="uninstalled"?"uninstalled":"new_user";return e.jsx(ge,{reason:t})}export{je as component};
@@ -0,0 +1 @@
1
+ import{t as K,r as s,aV as Qt,bz as Oe,H as M,bA as ea,bB as ta,ac as W,bC as aa,Y as re,U as je,v as Ve,bD as De,al as la,ag as oa,L as w,bE as ra,bF as Ce,ao as sa,az as Le,z as G,au as ae,bG as na,y as _,R as d,aS as Ne,aK as ia,aD as ua,bH as ca,bI as da,ak as Ke,aF as se,E as ne,F as T,aY as fa,G as F,a2 as Z,bJ as ba,aZ as $a,bK as ze,a0 as Ue,aO as _e,bL as ga,aE as ie,bM as pa,a4 as J,aI as ma,aJ as xa,aP as va,aQ as ha,bN as Pa,am as ya,bO as Da,aC as Ca,N as Ea,O as Sa,bP as He,I as Ma,K as Ba,x as qe,Z as ue,_ as We,a1 as Ge,a3 as Ze,bQ as wa,bR as Aa,a6 as Je,j as v,a$ as z,a9 as O,bS as ka,aX as Fa,bT as Ra,bU as Ta,a7 as j,bV as Ia,bW as Oa,aT as ja,J as Ye,bX as Va,bY as La,bZ as Na,b_ as Ka,b$ as za,c0 as Ua,c1 as _a,c2 as Ha,c3 as qa,c4 as Ee,c5 as Wa,b1 as Ga,bj as Za,T as V}from"./index-DKJwDJt7.js";import{d as ce,i as de,m as Ja,h as Ya,e as Q,j as Xa,g as Xe,k as Qa,f as el,$ as tl,b as Qe,l as al,u as Se}from"./index-Cx78OSHq.js";const ll=K({defaultVariants:{color:"default",variant:"secondary"},slots:{base:"chip",label:"chip__label"},variants:{color:{accent:{base:"chip--accent"},danger:{base:"chip--danger"},default:{base:"chip--default"},success:{base:"chip--success"},warning:{base:"chip--warning"}},size:{lg:{base:"chip--lg"},md:{base:"chip--md"},sm:{base:"chip--sm"}},variant:{primary:{base:"chip--primary"},secondary:{base:"chip--secondary"},soft:{base:"chip--soft"},tertiary:{base:"chip--tertiary"}}}}),ol=K({base:"list-box",defaultVariants:{variant:"default"},variants:{variant:{danger:"list-box--danger",default:"list-box--default"}}}),rl=K({defaultVariants:{variant:"default"},slots:{indicator:"list-box-item__indicator",item:"list-box-item"},variants:{variant:{danger:{item:"list-box-item--danger"},default:{item:"list-box-item--default"}}}}),sl=K({base:"list-box-section"}),nl=K({defaultVariants:{fullWidth:!1,variant:"primary"},slots:{base:"select",indicator:"select__indicator",popover:"select__popover",trigger:"select__trigger",value:"select__value"},variants:{fullWidth:{false:{},true:{base:"select--full-width",trigger:"select__trigger--full-width"}},variant:{primary:{base:"select--primary"},secondary:{base:"select--secondary"}}}}),il=K({defaultVariants:{size:"md"},slots:{base:"switch",content:"switch__content",control:"switch__control",icon:"switch__icon",thumb:"switch__thumb"},variants:{size:{lg:{base:"switch--lg"},md:{base:"switch--md"},sm:{base:"switch--sm"}}}}),ul=K({slots:{base:"tooltip",trigger:"tooltip__trigger"}}),cl=s.createContext({}),dl=s.createContext({}),xe=class xe extends Qt{filter(e,l){let a=l.getItem(this.prevKey);if(a&&a.type!=="separator"){let o=this.clone();return l.addDescendants(o,e),o}return null}};xe.type="separator";let Me=xe;var et={};et={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var tt={};tt={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var at={};at={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var lt={};lt={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var ot={};ot={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var rt={};rt={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var st={};st={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var nt={};nt={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var it={};it={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var ut={};ut={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var ct={};ct={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var dt={};dt={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var ft={};ft={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var bt={};bt={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var $t={};$t={longPressMessage:"Premi a lungo o premi Alt + Freccia giù per aprire il menu"};var gt={};gt={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var pt={};pt={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var mt={};mt={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var xt={};xt={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var vt={};vt={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var ht={};ht={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var Pt={};Pt={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var yt={};yt={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var Dt={};Dt={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var Ct={};Ct={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var Et={};Et={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var St={};St={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var Mt={};Mt={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var Bt={};Bt={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var wt={};wt={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var At={};At={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var kt={};kt={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var Ft={};Ft={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var Rt={};Rt={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var Tt={};Tt={"ar-AE":et,"bg-BG":tt,"cs-CZ":at,"da-DK":lt,"de-DE":ot,"el-GR":rt,"en-US":st,"es-ES":nt,"et-EE":it,"fi-FI":ut,"fr-FR":ct,"he-IL":dt,"hr-HR":ft,"hu-HU":bt,"it-IT":$t,"ja-JP":gt,"ko-KR":pt,"lt-LT":mt,"lv-LV":xt,"nb-NO":vt,"nl-NL":ht,"pl-PL":Pt,"pt-BR":yt,"pt-PT":Dt,"ro-RO":Ct,"ru-RU":Et,"sk-SK":St,"sl-SI":Mt,"sr-SP":Bt,"sv-SE":wt,"tr-TR":At,"uk-UA":kt,"zh-CN":Ft,"zh-TW":Rt};function fl(t){let{onContextMenu:e}=t,l=s.useRef(!1),{longPressProps:a}=Oe({onLongPressStart(){l.current=!1},onLongPress(o){l.current?l.current=!1:e==null||e({target:o.target,x:o.x,y:o.y})}});return e?{contextMenuProps:M(ea()?a:{},{onContextMenu(o){o.stopPropagation(),o.preventDefault(),l.current=!0;let r=o.currentTarget.getBoundingClientRect();e({target:o.currentTarget,x:o.clientX-r.x,y:o.clientY-r.y})},onKeyDown(o){if(ta()&&o.ctrlKey&&o.key==="Enter"){l.current=!1;let r=o.currentTarget;o.stopPropagation(),setTimeout(()=>{if(l.current)l.current=!1;else{let n=r.getBoundingClientRect();e({target:r,x:n.width/2,y:n.height/2})}},10)}}})}:{contextMenuProps:{}}}function bl(t){return t&&t.__esModule?t.default:t}function $l(t,e,l){let{type:a="menu",isDisabled:o,trigger:r="press"}=t,n=W(),{triggerProps:i,overlayProps:c}=aa({type:a},e,l),f=(u,P,y="first")=>{if(!u||P.isDefaultPrevented())return!1;e.toggle(y)},{keyboardProps:b}=re({isDisabled:o,shortcuts:{Enter:u=>f(r!=="longPress",u,"first")," ":u=>f(r!=="longPress",u,"first"),ArrowDown:u=>f(r!=="longPress",u,"first"),ArrowUp:u=>f(r!=="longPress",u,"last"),"Alt+Enter":u=>f(r==="longPress",u,"first"),"Alt+ ":u=>f(r==="longPress",u,"first"),"Alt+ArrowDown":u=>f(!0,u,"first"),"Alt+ArrowUp":u=>f(!0,u,"last")}}),p=je(bl(Tt),"@react-aria/menu"),{longPressProps:m}=Oe({isDisabled:o||r!=="longPress",accessibilityDescription:p.format("longPressMessage"),onLongPressStart(){e.close()},onLongPress(){e.open("first")}}),$={preventFocusOnPress:!0,onPressStart(u){u.pointerType!=="touch"&&u.pointerType!=="keyboard"&&!o&&(De(u.target),e.open(u.pointerType==="virtual"?"first":null))},onPress(u){u.pointerType==="touch"&&!o&&(De(u.target),e.toggle())}};delete i.onPress;let{contextMenuProps:x}=fl({onContextMenu(u){let P=u.target.getBoundingClientRect();e.setPoint({x:P.x+u.x,y:P.y+u.y}),e.open()}});s.useEffect(()=>{if(e.isOpen&&r==="contextMenu"){let u=P=>{(P.button===2||P.button===0&&P.ctrlKey===!0)&&Ve(P)===document.body&&e.close()};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)}},[e,r]);let h;if(r==="press")h={...$,...b};else if(r==="longPress")h={...m,...b};else if(r==="contextMenu"){h=x;let{"aria-haspopup":u,"aria-expanded":P,"aria-controls":y,...g}=i;i=g}return{menuTriggerProps:{...i,...h,id:n},menuProps:{...c,"aria-labelledby":n,autoFocus:e.focusStrategy||!0,onClose:e.close}}}function gl(t){let{selectionManager:e,collection:l,disabledKeys:a,ref:o,keyboardDelegate:r,layoutDelegate:n,orientation:i}=t,c=ce({usage:"search",sensitivity:"base"}),f=e.disabledBehavior,b=s.useMemo(()=>r||new de({collection:l,disabledKeys:a,disabledBehavior:f,ref:o,collator:c,layoutDelegate:n,orientation:i}),[r,n,l,a,o,c,f,i]),{collectionProps:p}=la({...t,ref:o,selectionManager:e,keyboardDelegate:b});return{listProps:p}}const Be=new WeakMap;function pl(t){let e=Be.get(t);if(e!=null)return e;let l=0,a=o=>{for(let r of o)r.type==="section"?a(oa(r,t)):r.type==="item"&&l++};return a(t),Be.set(t,l),l}const fe=new WeakMap;function ml(t){return typeof t=="string"?t.replace(/\s*/g,""):""+t}function xl(t,e){let l=fe.get(t);if(!l)throw new Error("Unknown list");return`${l.id}-option-${ml(e)}`}function vl(t,e,l){let a=w(t,{labelable:!0}),o=t.selectionBehavior||"toggle",r=t.orientation||"vertical",n=t.linkBehavior||(o==="replace"?"action":"override");o==="toggle"&&n==="action"&&(n="override");let{listProps:i}=gl({...t,ref:l,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,linkBehavior:n}),{focusWithinProps:c}=ra({onFocusWithin:t.onFocus,onBlurWithin:t.onBlur,onFocusWithinChange:t.onFocusChange}),f=W(t.id);fe.set(e,{id:f,shouldUseVirtualFocus:t.shouldUseVirtualFocus,shouldSelectOnPressUp:t.shouldSelectOnPressUp,shouldFocusOnHover:t.shouldFocusOnHover,isVirtualized:t.isVirtualized,onAction:t.onAction,linkBehavior:n,UNSTABLE_itemBehavior:t.UNSTABLE_itemBehavior});let{labelProps:b,fieldProps:p}=Ja({...t,id:f,labelElementType:"span"});return{labelProps:b,listBoxProps:M(a,c,e.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox","aria-orientation":r,...M(p,i)})}}function hl(t,e,l){var D,k;let{key:a}=t,o=fe.get(e),r=t.isDisabled??e.selectionManager.isDisabled(a),n=t.isSelected??e.selectionManager.isSelected(a),i=t.shouldSelectOnPressUp??(o==null?void 0:o.shouldSelectOnPressUp),c=t.shouldFocusOnHover??(o==null?void 0:o.shouldFocusOnHover),f=t.shouldUseVirtualFocus??(o==null?void 0:o.shouldUseVirtualFocus),b=t.isVirtualized??(o==null?void 0:o.isVirtualized),p=Ce(),m=Ce(),$={role:"option","aria-disabled":r||void 0,"aria-selected":e.selectionManager.selectionMode!=="none"?n:void 0,"aria-label":t["aria-label"],"aria-labelledby":p,"aria-describedby":m},x=e.collection.getItem(a);if(b){let B=Number(x==null?void 0:x.index);$["aria-posinset"]=Number.isNaN(B)?void 0:B+1,$["aria-setsize"]=pl(e.collection)}let h=o!=null&&o.onAction?()=>{var B;return(B=o==null?void 0:o.onAction)==null?void 0:B.call(o,a)}:void 0,u=xl(e,a),{itemProps:P,isPressed:y,isFocused:g,hasAction:S,allowsSelection:C}=sa({selectionManager:e.selectionManager,key:a,ref:l,shouldSelectOnPressUp:i,allowsDifferentPressOrigin:i&&c,isVirtualized:b,shouldUseVirtualFocus:f,isDisabled:r,onAction:h||(D=x==null?void 0:x.props)!=null&&D.onAction?Le((k=x==null?void 0:x.props)==null?void 0:k.onAction,h):void 0,linkBehavior:o==null?void 0:o.linkBehavior,UNSTABLE_itemBehavior:o==null?void 0:o.UNSTABLE_itemBehavior,id:u}),{hoverProps:A}=G({isDisabled:r||!c,onHoverStart(){ae()||(e.selectionManager.setFocused(!0),e.selectionManager.setFocusedKey(a))}}),E=w(x==null?void 0:x.props);delete E.id;let I=na(x==null?void 0:x.props);return{optionProps:{...$,...M(E,P,A,I),id:u},labelProps:{id:p},descriptionProps:{id:m},isFocused:g,isFocusVisible:g&&e.selectionManager.isFocused&&ae(),isSelected:n,isDisabled:r,isPressed:y,allowsSelection:C,hasAction:S}}function Pl(t){let{heading:e,"aria-label":l}=t,a=W();return{itemProps:{role:"presentation"},headingProps:e?{id:a,role:"presentation",onMouseDown:o=>{o.preventDefault()}}:{},groupProps:{role:"group","aria-label":l,"aria-labelledby":e?a:void 0}}}const be=s.createContext(null),H=s.createContext(null),yl=s.forwardRef(function(e,l){[e,l]=_(e,l,be);let a=s.useContext(H);return a?d.createElement(It,{state:a,props:e,listBoxRef:l}):d.createElement(Ne,{content:d.createElement(ia,e)},o=>d.createElement(Dl,{props:e,listBoxRef:l,collection:o}))});function Dl({props:t,listBoxRef:e,collection:l}){t={...t,collection:l,children:null,items:null};let{layoutDelegate:a}=s.useContext(se),o=ze({...t,layoutDelegate:a});return d.createElement(It,{state:o,props:t,listBoxRef:e})}function It({state:t,props:e,listBoxRef:l}){[e,l]=_(e,l,Ya);let{dragAndDropHooks:a,layout:o="stack",orientation:r="vertical",filter:n}=e,i=da(t,n),{collection:c,selectionManager:f}=i,b=!!(a!=null&&a.useDraggableCollectionState),p=!!(a!=null&&a.useDroppableCollectionState),{direction:m}=Ke(),{disabledBehavior:$,disabledKeys:x}=f,h=ce({usage:"search",sensitivity:"base"}),{isVirtualized:u,layoutDelegate:P,dropTargetDelegate:y,CollectionRoot:g}=s.useContext(se),S=s.useMemo(()=>e.keyboardDelegate||new de({collection:c,collator:h,ref:l,disabledKeys:x,disabledBehavior:$,layout:o,orientation:r,direction:m,layoutDelegate:P}),[c,h,l,$,x,r,m,e.keyboardDelegate,o,P]),{listBoxProps:C}=vl({...e,shouldSelectOnPressUp:b||e.shouldSelectOnPressUp,keyboardDelegate:S,isVirtualized:u},i,l);s.useRef(b),s.useRef(p),s.useEffect(()=>{},[b,p]);let A,E,I,D=!1,k=null,B=s.useRef(null);if(b&&a){A=a.useDraggableCollectionState({collection:c,selectionManager:f,preview:a.renderDragPreview?B:void 0}),a.useDraggableCollection({},A,l);let te=a.DragPreview;k=a.renderDragPreview?d.createElement(te,{ref:B},a.renderDragPreview):null}if(p&&a){E=a.useDroppableCollectionState({collection:c,selectionManager:f});let te=a.dropTargetDelegate||y||new a.ListDropTargetDelegate(c,l,{orientation:r,layout:o,direction:m});I=a.useDroppableCollection({keyboardDelegate:S,dropTargetDelegate:te},E,l),D=E.isDropTarget({type:"root"})}let{focusProps:Jt,isFocused:ve,isFocusVisible:he}=ne(),ee=i.collection.size===0,Pe={isDropTarget:D,isEmpty:ee,isFocused:ve,isFocusVisible:he,layout:e.layout||"stack",orientation:r,state:i},Yt=T({...e,children:void 0,defaultClassName:"react-aria-ListBox",values:Pe}),ye=null;ee&&e.renderEmptyState&&(ye=d.createElement("div",{role:"option",style:{display:"contents"}},e.renderEmptyState(Pe)));let Xt=w(e,{global:!0});return d.createElement(fa,null,d.createElement(F.div,{...M(Xt,Yt,C,Jt,I==null?void 0:I.collectionProps),ref:l,slot:e.slot||void 0,onScroll:e.onScroll,"data-drop-target":D||void 0,"data-empty":ee||void 0,"data-focused":ve||void 0,"data-focus-visible":he||void 0,"data-layout":e.layout||"stack","data-orientation":r},d.createElement(Z,{values:[[be,e],[H,i],[Q,{dragAndDropHooks:a,dragState:A,dropState:E}],[dl,{elementType:"div"}],[Xa,{render:Sl}],[ba,{name:"ListBoxSection",render:Ot}]]},d.createElement($a,null,d.createElement(g,{collection:c,scrollRef:l,persistedKeys:Qa(f,a,E),renderDropIndicator:Xe(a,E)}))),ye,k))}function Ot(t,e,l,a="react-aria-ListBoxSection"){let o=s.useContext(H),{dragAndDropHooks:r,dropState:n}=s.useContext(Q),{CollectionBranch:i}=s.useContext(se),[c,f]=Ue(),{headingProps:b,groupProps:p}=Pl({heading:f,"aria-label":t["aria-label"]??void 0}),m=T({...t,id:void 0,children:void 0,defaultClassName:a,values:void 0}),$=w(t,{global:!0});return delete $.id,d.createElement(F.section,{...M($,m,p),ref:e},d.createElement(cl.Provider,{value:{...b,ref:c}},d.createElement(i,{collection:o.collection,parent:l,renderDropIndicator:Xe(r,n)})))}const Cl=ua(ca,Ot),El=_e(ga,function(e,l,a){let o=ie(l),r=s.useContext(H),{dragAndDropHooks:n,dragState:i,dropState:c}=s.useContext(Q),f=i&&!(i.isDisabled||i.selectionManager.isDisabled(a.key)),{optionProps:b,labelProps:p,descriptionProps:m,...$}=hl({key:a.key,"aria-label":e==null?void 0:e["aria-label"]},r,o),{hoverProps:x,isHovered:h}=G({isDisabled:!$.allowsSelection&&!$.hasAction&&!f,onHoverStart:a.props.onHoverStart,onHoverChange:a.props.onHoverChange,onHoverEnd:a.props.onHoverEnd}),{keyboardProps:u}=re(e),{focusProps:P}=pa(e),y=null;i&&n&&(y=n.useDraggableItem({key:a.key,hasAction:$.hasAction},i));let g=null;c&&n&&(g=n.useDroppableItem({target:{type:"item",key:a.key,dropPosition:"on"}},c,o));let S=i&&i.isDragging(a.key),C=T({...e,id:void 0,children:e.children,defaultClassName:"react-aria-ListBoxItem",values:{...$,isHovered:h,selectionMode:r.selectionManager.selectionMode,selectionBehavior:r.selectionManager.selectionBehavior,allowsDragging:!!i,isDragging:S,isDropTarget:g==null?void 0:g.isDropTarget}});s.useEffect(()=>{a.textValue},[a.textValue]);let A=e.href?F.a:F.div,E=w(e,{global:!0});return delete E.id,delete E.onClick,e.href&&b.tabIndex==null&&(b.tabIndex=-1),d.createElement(A,{...M(E,C,b,x,u,P,y==null?void 0:y.dragProps,g==null?void 0:g.dropProps),ref:o,"data-allows-dragging":!!i||void 0,"data-selected":$.isSelected||void 0,"data-disabled":$.isDisabled||void 0,"data-hovered":h||void 0,"data-focused":$.isFocused||void 0,"data-focus-visible":$.isFocusVisible||void 0,"data-pressed":$.isPressed||void 0,"data-dragging":S||void 0,"data-drop-target":(g==null?void 0:g.isDropTarget)||void 0,"data-selection-mode":r.selectionManager.selectionMode==="none"?void 0:r.selectionManager.selectionMode},d.createElement(Z,{values:[[J,{slots:{[xa]:p,label:p,description:m}}],[ma,{isSelected:$.isSelected}]]},C.children))});function Sl(t,e){e=ie(e);let{dragAndDropHooks:l,dropState:a}=s.useContext(Q),{dropIndicatorProps:o,isHidden:r,isDropTarget:n}=l.useDropIndicator(t,a,e);return r?null:d.createElement(Bl,{...t,dropIndicatorProps:o,isDropTarget:n,ref:e})}function Ml(t,e){let{dropIndicatorProps:l,isDropTarget:a,...o}=t,r=T({...o,defaultClassName:"react-aria-DropIndicator",values:{isDropTarget:a}});return d.createElement(d.Fragment,null,d.createElement(F.div,{...l,...r,role:"option",ref:e,"data-drop-target":a||void 0}))}const Bl=s.forwardRef(Ml);_e(va,function(e,l,a){let o=s.useContext(H),{isLoading:r,onLoadMore:n,scrollOffset:i,...c}=e,f=s.useRef(null),b=s.useMemo(()=>({onLoadMore:n,collection:o==null?void 0:o.collection,sentinelRef:f,scrollOffset:i}),[n,i,o==null?void 0:o.collection]);el(b,f);let p=T({...c,id:void 0,children:a.rendered,defaultClassName:"react-aria-ListBoxLoadingIndicator",values:void 0}),m={tabIndex:-1};return d.createElement(d.Fragment,null,d.createElement("div",{style:{position:"relative",width:0,height:0},inert:ha(!0)},d.createElement("div",{"data-testid":"loadMoreSentinel",ref:f,style:{position:"absolute",height:1,width:1}})),r&&p.children&&d.createElement(d.Fragment,null,d.createElement(F.div,{...M(w(e,{global:!0}),m),...p,role:"option",ref:l},p.children)))});const $e=new WeakMap;function wl(t,e,l){let{keyboardDelegate:a,isDisabled:o,isRequired:r,name:n,form:i,validationBehavior:c="aria"}=t,f=ce({usage:"search",sensitivity:"base"}),b=s.useMemo(()=>a||new de(e.collection,e.disabledKeys,l,f),[a,e.collection,e.disabledKeys,f,l]),{menuTriggerProps:p,menuProps:m}=$l({isDisabled:o,type:"listbox"},e,l),{keyboardProps:$}=re({shortcuts:{ArrowLeft:()=>{var k,B;if(e.selectionManager.selectionMode==="multiple")return!1;let D=e.selectedKey!=null?(k=b.getKeyAbove)==null?void 0:k.call(b,e.selectedKey):(B=b.getFirstKey)==null?void 0:B.call(b);D!=null&&e.setSelectedKey(D)},ArrowRight:()=>{var k,B;if(e.selectionManager.selectionMode==="multiple")return!1;let D=e.selectedKey!=null?(k=b.getKeyBelow)==null?void 0:k.call(b,e.selectedKey):(B=b.getFirstKey)==null?void 0:B.call(b);D!=null&&e.setSelectedKey(D)}},allowRepeats:!0,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp}),{typeSelectProps:x}=Pa({keyboardDelegate:b,selectionManager:e.selectionManager,onTypeSelect(D){e.setSelectedKey(D)}}),{isInvalid:h,validationErrors:u,validationDetails:P}=e.displayValidation,{labelProps:y,fieldProps:g,descriptionProps:S,errorMessageProps:C}=tl({...t,labelElementType:"span",isInvalid:h,errorMessage:t.errorMessage||u});e.selectionManager.selectionMode==="multiple"&&(x={});let A=w(t,{labelable:!0}),E=M(x,p,g),I=W();return $e.set(e,{isDisabled:o,isRequired:r,name:n,form:i,validationBehavior:c}),{labelProps:{...y,onClick:()=>{var D;t.isDisabled||((D=l.current)==null||D.focus(),Da("keyboard"))}},triggerProps:M(A,{...E,isDisabled:o,onKeyDown:Le(E.onKeyDown,$.onKeyDown),onKeyUp:$.onKeyUp,"aria-labelledby":[I,E["aria-labelledby"],E["aria-label"]&&!E["aria-labelledby"]?E.id:null].filter(Boolean).join(" "),onFocus(D){e.isFocused||(t.onFocus&&t.onFocus(D),t.onFocusChange&&t.onFocusChange(!0),e.setFocused(!0))},onBlur(D){e.isOpen||(t.onBlur&&t.onBlur(D),t.onFocusChange&&t.onFocusChange(!1),e.setFocused(!1))}}),valueProps:{id:I},menuProps:{...m,onAction:void 0,autoFocus:e.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,disallowEmptySelection:!0,linkBehavior:"selection",onBlur:D=>{ya(D.currentTarget,D.relatedTarget)||(t.onBlur&&t.onBlur(D),t.onFocusChange&&t.onFocusChange(!1),e.setFocused(!1))},"aria-labelledby":[g["aria-labelledby"],E["aria-label"]&&!g["aria-labelledby"]?E.id:null].filter(Boolean).join(" ")},descriptionProps:S,errorMessageProps:C,isInvalid:h,validationErrors:u,validationDetails:P,hiddenSelectProps:{isDisabled:o,name:n,label:t.label,state:e,triggerRef:l,form:i}}}function Al(t,e,l){let a=$e.get(e)||{},{autoComplete:o,name:r=a.name,form:n=a.form,isDisabled:i=a.isDisabled}=t,{validationBehavior:c,isRequired:f}=a,{visuallyHiddenProps:b}=Ca({style:{position:"fixed",top:0,left:0}});Ea(t.selectRef,e.defaultValue,e.setValue),Sa({validationBehavior:c,focus:()=>{var $;return($=l.current)==null?void 0:$.focus()}},e,t.selectRef);let p=e.setValue,m=s.useCallback($=>{let x=Ve($);x.multiple?p(Array.from(x.selectedOptions,h=>h.value)):p($.currentTarget.value)},[p]);return{containerProps:{...b,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:o,disabled:i,multiple:e.selectionManager.selectionMode==="multiple",required:c==="native"&&f,name:r,form:n,value:e.value??"",onChange:m,onInput:m}}}function kl(t){let{state:e,triggerRef:l,label:a,name:o,form:r,isDisabled:n}=t,i=s.useRef(null),c=s.useRef(null),{containerProps:f,selectProps:b}=Al({...t,selectRef:e.collection.size<=300?i:c},e,l),p=Array.isArray(e.value)?e.value:[e.value];if(e.collection.size<=300)return d.createElement("div",{...f,"data-testid":"hidden-select-container"},d.createElement("label",null,a,d.createElement("select",{...b,ref:i},d.createElement("option",{value:"",label:" "}," "),[...e.collection.getKeys()].map(m=>{let $=e.collection.getItem(m);if($&&$.type==="item")return d.createElement("option",{key:$.key,value:$.key},$.textValue)}),e.collection.size===0&&o&&p.map((m,$)=>d.createElement("option",{key:$,value:m??""})))));if(o){let m=$e.get(e)||{},{validationBehavior:$}=m;p.length===0&&(p=[null]);let x=p.map((h,u)=>{let P={type:"hidden",autoComplete:b.autoComplete,name:o,form:r,disabled:n,value:h??""};return $==="native"?d.createElement("input",{key:u,...P,ref:u===0?c:null,style:{display:"none"},type:"text",required:u===0?b.required:!1,onChange:()=>{}}):d.createElement("input",{key:u,...P,ref:u===0?c:null})});return d.createElement(d.Fragment,null,x)}return null}function Fl(t){let{selectionMode:e="single",shouldCloseOnSelect:l=e==="single"}=t,a=He(t),[o,r]=s.useState(null),n=s.useMemo(()=>t.defaultValue!==void 0?t.defaultValue:e==="single"?t.defaultSelectedKey??null:[],[t.defaultValue,t.defaultSelectedKey,e]),i=s.useMemo(()=>t.value!==void 0?t.value:e==="single"?t.selectedKey:void 0,[t.value,t.selectedKey,e]),[c,f]=Ma(i,n,t.onChange),b=e==="single"&&Array.isArray(c)?c[0]:c,p=g=>{var S;if(e==="single"){let C=Array.isArray(g)?g[0]??null:g;f(C),C!==b&&((S=t.onSelectionChange)==null||S.call(t,C))}else{let C=[];Array.isArray(g)?C=g:g!=null&&(C=[g]),f(C)}},m=ze({...t,selectionMode:e,disallowEmptySelection:e==="single",allowDuplicateSelectionEvents:!0,selectedKeys:s.useMemo(()=>Rl(b),[b]),onSelectionChange:g=>{if(g!=="all"){if(e==="single"){let S=g.values().next().value??null;p(S)}else p([...g]);l&&a.close(),h.commitValidation()}}}),$=m.selectionManager.firstSelectedKey,x=s.useMemo(()=>[...m.selectionManager.selectedKeys].map(g=>m.collection.getItem(g)).filter(g=>g!=null),[m.selectionManager.selectedKeys,m.collection]),h=Ba({...t,value:Array.isArray(b)&&b.length===0?null:b}),[u,P]=s.useState(!1),[y]=s.useState(b);return{...h,...m,...a,value:b,defaultValue:n??y,setValue:p,selectedKey:$,setSelectedKey:p,selectedItem:x[0]??null,selectedItems:x,defaultSelectedKey:t.defaultSelectedKey??(t.selectionMode==="single"?y:null),focusStrategy:o,open(g=null){(m.collection.size!==0||t.allowsEmptyCollection)&&(r(g),a.open())},toggle(g=null){(m.collection.size!==0||t.allowsEmptyCollection)&&(r(g),a.toggle())},isFocused:u,setFocused:P}}function Rl(t){if(t!==void 0)return t===null?[]:Array.isArray(t)?t:[t]}function Tl(t={}){let{locale:e}=Ke();return s.useMemo(()=>new Intl.ListFormat(e,t),[e,t])}function Il(t){return t&&t.__esModule?t.default:t}const ge=s.createContext(null),pe=s.createContext(null),Ol=qe(function(e,l){[e,l]=_(e,l,ge);let{children:a,isDisabled:o=!1,isInvalid:r=!1,isRequired:n=!1}=e,i=s.useMemo(()=>typeof a=="function"?a({isOpen:!1,isDisabled:o,isInvalid:r,isRequired:n,isFocused:!1,isFocusVisible:!1,defaultChildren:null}):a,[a,o,r,n]);return d.createElement(Ne,{content:i},c=>d.createElement(Vl,{props:e,collection:c,selectRef:l}))}),jl=[Qe,Ze,J];function Vl({props:t,selectRef:e,collection:l}){let{validationBehavior:a}=ue(We)||{},o=t.validationBehavior??a??"native",r=Fl({...t,collection:l,children:void 0,validationBehavior:o}),{isFocusVisible:n,focusProps:i}=ne({within:!0}),c=s.useRef(null),[f,b]=Ue(!t["aria-label"]&&!t["aria-labelledby"]),{labelProps:p,triggerProps:m,valueProps:$,menuProps:x,descriptionProps:h,errorMessageProps:u,hiddenSelectProps:P,...y}=wl({...Ge(t),label:b,validationBehavior:o},r,c),g=s.useMemo(()=>({isOpen:r.isOpen,isFocused:r.isFocused,isFocusVisible:n,isDisabled:t.isDisabled||!1,isInvalid:y.isInvalid||!1,isRequired:t.isRequired||!1}),[r.isOpen,r.isFocused,n,t.isDisabled,y.isInvalid,t.isRequired]),S=T({...t,values:g,defaultClassName:"react-aria-Select"}),C=w(t,{global:!0});delete C.id;let A=s.useRef(null);return d.createElement(Z,{values:[[ge,t],[pe,r],[jt,$],[Qe,{...p,ref:f,elementType:"span"}],[Ze,{...m,ref:c,isPressed:r.isOpen,autoFocus:t.autoFocus}],[wa,r],[Aa,{trigger:"Select",triggerRef:c,scrollRef:A,placement:"bottom start","aria-labelledby":x["aria-labelledby"],clearContexts:jl}],[be,{...x,ref:A}],[H,r],[J,{slots:{description:h,errorMessage:u}}],[Je,y]]},d.createElement(F.div,{...M(C,S,i),ref:e,slot:t.slot||void 0,"data-focused":r.isFocused||void 0,"data-focus-visible":n||void 0,"data-open":r.isOpen||void 0,"data-disabled":t.isDisabled||void 0,"data-invalid":y.isInvalid||void 0,"data-required":t.isRequired||void 0},S.children,d.createElement(kl,{...P,autoComplete:t.autoComplete})))}const jt=s.createContext(null),Ll=qe(function(e,l){var x;[e,l]=_(e,l,jt);let a=s.useContext(pe),{placeholder:o}=ue(ge),r=a.selectedItems.map(h=>{var P;let u=(P=h.props)==null?void 0:P.children;return typeof u=="function"&&(u=u({isHovered:!1,isPressed:!1,isSelected:!1,isFocused:!1,isFocusVisible:!1,isDisabled:!1,selectionMode:"single",selectionBehavior:"toggle"})),u}),n=Tl(),i=s.useMemo(()=>a.selectedItems.map(h=>h==null?void 0:h.textValue),[a.selectedItems]),c=a.selectionManager.selectionMode,f=s.useMemo(()=>c==="single"?i[0]??"":n.format(i),[c,n,i]),b=s.useMemo(()=>{if(c==="single")return r[0];let h=n.formatToParts(i);if(h.length===0)return null;let u=0;return h.map(P=>P.type==="element"?d.createElement(s.Fragment,{key:u},r[u++]):P.value)},[c,n,i,r]),p=je(Il(al),"react-aria-components"),m=T({...e,defaultChildren:b??o??p.format("selectPlaceholder"),defaultClassName:"react-aria-SelectValue",values:{selectedItem:((x=a.selectedItems[0])==null?void 0:x.value)??null,selectedItems:s.useMemo(()=>a.selectedItems.map(h=>h.value??null),[a.selectedItems]),selectedText:f,isPlaceholder:a.selectedItems.length===0,state:a}}),$=w(e,{global:!0});return d.createElement(F.span,{ref:l,...$,...m,"data-placeholder":a.selectedItems.length===0||void 0},d.createElement(J.Provider,{value:void 0},m.children))}),Nl=s.createContext(!1),Kl=({children:t})=>v.jsx(Nl,{value:!0,children:t}),Vt=s.createContext({}),we=({children:t,className:e,color:l,size:a,variant:o,...r})=>{const n=d.useMemo(()=>ll({color:l,size:a,variant:o}),[l,a,o]),i=d.useMemo(()=>typeof t=="string"||typeof t=="number"?v.jsx(Lt,{children:t}):t,[t]);return v.jsx(Vt,{value:{slots:n},children:v.jsx(z.span,{...r,className:O(n.base,e),"data-slot":"chip",children:i})})},Lt=({children:t,className:e,...l})=>{const{slots:a}=s.use(Vt);return v.jsx(z.span,{className:O(a==null?void 0:a.label,e),"data-slot":"chip-label",...l,children:t})},ho=Object.assign(we,{Root:we,Label:Lt});function zl(t,e,l){let{labelProps:a,inputProps:o,isSelected:r,...n}=ka(t,e,l);return{labelProps:a,inputProps:{...o,role:"switch",checked:r},isSelected:r,...n}}const Ul=s.createContext(null),Nt=s.createContext(null),Kt=s.createContext(null),_l=s.forwardRef(function(e,l){let{inputRef:a=null,...o}=e;[e,l]=_(o,l,Ul);let{validationBehavior:r}=ue(We)||{},n=e.validationBehavior??r??"native",i=ie(Fa(a,e.inputRef!==void 0?e.inputRef:null)),c=Ra(e),f=zl({...Ge(e),children:typeof e.children=="function"?!0:e.children,validationBehavior:n},c,i),{descriptionProps:b,errorMessageProps:p,isSelected:m,isDisabled:$,isReadOnly:x,isInvalid:h,validationDetails:u,validationErrors:P}=f,y=T({...e,defaultClassName:"react-aria-SwitchField",values:{isSelected:m,isDisabled:$,isReadOnly:x,isInvalid:h,isRequired:e.isRequired||!1,state:c}}),g=w(e,{global:!0});return delete g.id,delete g.onClick,d.createElement(F.div,{...M(g,y),ref:l,slot:e.slot||void 0,"data-selected":m||void 0,"data-disabled":$||void 0,"data-readonly":x||void 0,"data-invalid":h||void 0,"data-required":e.isRequired||void 0},d.createElement(Z,{values:[[Nt,c],[Kt,{...f,inputRef:i,defaultClassName:"react-aria-SwitchButton",isRequired:e.isRequired}],[J,{slots:{description:b,errorMessage:p}}],[Je,{isInvalid:h,validationDetails:u,validationErrors:P}]]},y.children))}),Hl=s.forwardRef(function(e,l){let{labelProps:a,inputProps:o,isSelected:r,isDisabled:n,isReadOnly:i,isPressed:c,isInvalid:f,inputRef:b,defaultClassName:p,isRequired:m}=s.useContext(Kt),{isFocused:$,isFocusVisible:x,focusProps:h}=ne(),u=n||i,P=s.useContext(Nt),{hoverProps:y,isHovered:g}=G({...e,isDisabled:u}),S=T({...e,defaultClassName:p,values:{isSelected:r,isPressed:c,isHovered:g,isFocused:$,isFocusVisible:x,isDisabled:n,isReadOnly:i,isInvalid:f,isRequired:m||!1,state:P}}),C=w(e,{global:!0});return delete C.id,delete C.onClick,d.createElement(F.label,{...M(C,a,y,S),ref:l,slot:e.slot||void 0,"data-selected":r||void 0,"data-pressed":c||void 0,"data-hovered":g||void 0,"data-focused":$||void 0,"data-focus-visible":x||void 0,"data-disabled":n||void 0,"data-readonly":i||void 0,"data-invalid":f||void 0,"data-required":m||void 0},d.createElement(Ta,{elementType:"span"},d.createElement("input",{...M(o,h),ref:b})),S.children)}),Y=s.createContext({}),le=({children:t,className:e,size:l,...a})=>{const o=d.useMemo(()=>il({size:l}),[l]);return v.jsx(_l,{"data-slot":"switch",...a,className:j(e,o.base()),children:r=>v.jsx(Y,{value:{slots:o,state:r},children:typeof t=="function"?t(r):t})})};le.displayName="HeroUI.Switch";const zt=({children:t,className:e,...l})=>{const{slots:a}=s.use(Y);return v.jsx(Hl,{"data-slot":"switch-content",...l,className:j(e,a==null?void 0:a.content()),children:t})};zt.displayName="HeroUI.Switch.Content";const Ut=({children:t,className:e,...l})=>{const{slots:a}=s.use(Y);return v.jsx(z.span,{className:O(a==null?void 0:a.control,e),"data-slot":"switch-control",...l,children:t})};Ut.displayName="HeroUI.Switch.Control";const _t=({children:t,className:e,...l})=>{const{slots:a}=s.use(Y);return v.jsx(z.span,{className:O(a==null?void 0:a.thumb,e),"data-slot":"switch-thumb",...l,children:t})};_t.displayName="HeroUI.Switch.Thumb";const Ht=({children:t,className:e,...l})=>{const{slots:a}=s.use(Y);return v.jsx(z.span,{className:O(a==null?void 0:a.icon,e),"data-slot":"switch-icon",...l,children:t})};Ht.displayName="HeroUI.Switch.Icon";const Po=Object.assign(le,{Root:le,Content:zt,Control:Ut,Thumb:_t,Icon:Ht}),oe=d.createContext(null);function ql(t){let{children:e}=t,l=s.useContext(oe),[a,o]=s.useState(0),r=s.useMemo(()=>({parent:l,modalCount:a,addModal(){o(n=>n+1),l&&l.addModal()},removeModal(){o(n=>n-1),l&&l.removeModal()}}),[l,a]);return d.createElement(oe.Provider,{value:r},e)}function Wl(){let t=s.useContext(oe);return{modalProviderProps:{"aria-hidden":t&&t.modalCount>0?!0:void 0}}}function Gl(t){let{modalProviderProps:e}=Wl();return d.createElement("div",{"data-overlay-container":!0,...t,...e})}function Zl(t){return d.createElement(ql,null,d.createElement(Gl,t))}function Jl(t){let e=Ia(),{portalContainer:l=e?null:document.body,...a}=t,{getContainer:o}=Oa();if(!t.portalContainer&&o&&(l=o()),d.useEffect(()=>{if(l!=null&&l.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[l]),!l)return null;let r=d.createElement(Zl,a);return ja.createPortal(r,l)}const Yl=1500,Ae=500;let L={},Xl=0,U=!1,R=null,N=null;function qt(t={}){let{delay:e=Yl,closeDelay:l=Ae}=t,{isOpen:a,open:o,close:r}=He(t),[n,i]=s.useState(!1),c=s.useMemo(()=>`${++Xl}`,[]),f=s.useRef(null),b=s.useRef(r),p=()=>{L[c]=x},m=()=>{for(let u in L)u!==c&&(L[u](!0,!0),delete L[u])},$=u=>{f.current&&clearTimeout(f.current),f.current=null,m(),p(),i(!!u),U=!0,o(),R&&(clearTimeout(R),R=null),N&&(clearTimeout(N),N=null)},x=(u,P)=>{i(!!P),u||l<=0?(f.current&&clearTimeout(f.current),f.current=null,b.current()):f.current||(f.current=setTimeout(()=>{f.current=null,b.current()},l)),R&&(clearTimeout(R),R=null),U&&(N&&clearTimeout(N),N=setTimeout(()=>{delete L[c],N=null,U=!1},Math.max(Ae,l)))},h=()=>{m(),p(),!a&&!U?(R&&clearTimeout(R),R=setTimeout(()=>{R=null,U=!0,$(!1)},e)):a||$(!0)};return s.useEffect(()=>{b.current=r},[r]),s.useEffect(()=>()=>{f.current&&clearTimeout(f.current),L[c]&&delete L[c]},[c]),{isOpen:a,shouldSkipAnimation:n,open:u=>{!u&&e>0&&!f.current?h():$(U)},close:x}}function Ql(t,e){let l=w(t,{labelable:!0}),{hoverProps:a}=G({onHoverStart:()=>e==null?void 0:e.open(!0),onHoverEnd:()=>e==null?void 0:e.close()});return{tooltipProps:M(l,a,{role:"tooltip"})}}function eo(t,e,l){let{isDisabled:a,trigger:o,shouldCloseOnPress:r=!0}=t,n=W(),i=s.useRef(!1),c=s.useRef(!1),f=()=>{(i.current||c.current)&&e.open(c.current)},b=y=>{!i.current&&!c.current&&e.close(y)};s.useEffect(()=>{let y=g=>{l&&l.current&&g.key==="Escape"&&(g.stopPropagation(),e.close(!0))};if(e.isOpen)return document.addEventListener("keydown",y,!0),()=>{document.removeEventListener("keydown",y,!0)}},[l,e]);let p=()=>{o!=="focus"&&(Va()==="pointer"?i.current=!0:i.current=!1,f())},m=()=>{o!=="focus"&&(c.current=!1,i.current=!1,b())},$=()=>{r&&(c.current=!1,i.current=!1,b(!0))},x=()=>{ae()&&(c.current=!0,f())},h=()=>{c.current=!1,i.current=!1,b(!0)},{hoverProps:u}=G({isDisabled:a,onHoverStart:p,onHoverEnd:m}),{focusableProps:P}=Ye({isDisabled:a,onFocus:x,onBlur:h},l);return{triggerProps:{"aria-describedby":e.isOpen?n:void 0,...M(P,u,{onPointerDown:$,onKeyDown:$}),tabIndex:void 0},tooltipProps:{id:n}}}const q=s.createContext(null),Wt=s.createContext(null);function to(t){let e=qt(t),l=s.useRef(null),{triggerProps:a,tooltipProps:o}=eo(t,e,l);return d.createElement(Z,{values:[[q,e],[Wt,{...o,triggerRef:l}]]},d.createElement(La,{...a,ref:l},t.children))}const ao=s.forwardRef(function({UNSTABLE_portalContainer:e,...l},a){[l,a]=_(l,a,Wt);let o=s.useContext(q),r=qt(l),n=l.isOpen!=null||l.defaultOpen!=null||!o?r:o,i=Na(a,n.isOpen),c=l.isExiting||!n.shouldSkipAnimation&&i||!1;return!n.isOpen&&!c?null:d.createElement(Jl,{portalContainer:e},d.createElement(lo,{...l,tooltipRef:a,isExiting:c}))});function lo(t){let e=s.useContext(q),l=s.useRef(null),{overlayProps:a,arrowProps:o,placement:r,triggerAnchorPoint:n}=Ka({placement:t.placement||"top",targetRef:t.triggerRef,overlayRef:t.tooltipRef,arrowRef:l,offset:t.offset,crossOffset:t.crossOffset,isOpen:e.isOpen,arrowBoundaryOffset:t.arrowBoundaryOffset,shouldFlip:t.shouldFlip,containerPadding:t.containerPadding,onClose:()=>e.close(!0)}),i=za(t.tooltipRef,!!r),c=t.isEntering||!e.shouldSkipAnimation&&i||!1,f=T({...t,defaultClassName:"react-aria-Tooltip",values:{placement:r,isEntering:c,isExiting:t.isExiting,state:e}});t=M(t,a);let{tooltipProps:b}=Ql(t,e),p=w(t,{global:!0});return d.createElement(F.div,{...M(p,f,b),ref:t.tooltipRef,style:{...a.style,"--trigger-anchor-point":n?`${n.x}px ${n.y}px`:void 0,...f.style},"data-placement":r??void 0,"data-entering":c||void 0,"data-exiting":t.isExiting||void 0},d.createElement(Ua.Provider,{value:{...o,placement:r,ref:l}},f.children))}const ke=t=>{if(!t)return;const e=t.trim(),l=parseFloat(e);if(!Number.isNaN(l))return e.endsWith("ms")?l:e.endsWith("s")?l*1e3:l},me=s.createContext({}),oo=({children:t,shouldSkipAnimation:e})=>{const l=s.use(q);return!l||e?t:v.jsx(q,{value:{...l,shouldSkipAnimation:!1},children:t})},Fe=({children:t,closeDelay:e,delay:l,shouldSkipAnimation:a=!1,...o})=>{const r=d.useMemo(()=>ul(),[]),n=Se("--tooltip-delay"),i=Se("--tooltip-close-delay"),c=l??ke(n),f=e??ke(i);return v.jsx(me,{value:{slots:r},children:v.jsx(to,{closeDelay:f,"data-slot":"tooltip-root",delay:c,...o,children:v.jsx(oo,{shouldSkipAnimation:a,children:t})})})},ro=({children:t,className:e,offset:l,showArrow:a=!1,...o})=>{const{slots:r}=s.use(me),n=l||(a?7:3);return v.jsx(ao,{...o,className:j(e,r==null?void 0:r.base()),offset:n,children:t})},so=({children:t,className:e,...l})=>{const a=v.jsx("svg",{"data-slot":"overlay-arrow",fill:"none",height:"12",viewBox:"0 0 12 12",width:"12",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("path",{d:"M0 0C5.48483 8 6.5 8 12 0Z"})}),o=d.isValidElement(t)?d.cloneElement(t,{"data-slot":"overlay-arrow"}):a;return v.jsx(_a,{"data-slot":"tooltip-arrow",...l,className:e,children:o})},no=({children:t,className:e,...l})=>{const{slots:a}=s.use(me),o=s.useRef(null),{focusableProps:r}=Ye({},o);return v.jsx(z.div,{ref:o,className:O(a==null?void 0:a.trigger,e),"data-slot":"tooltip-trigger",role:"button",...M(r,l),children:t})},yo=Object.assign(Fe,{Root:Fe,Trigger:no,Content:ro,Arrow:so}),Gt=s.createContext({}),Re=({children:t,className:e,variant:l,...a})=>{const o=d.useMemo(()=>rl({variant:l}),[l]);return v.jsx(El,{className:j(e,o.item()),"data-slot":"list-box-item",...a,children:r=>v.jsx(Gt,{value:{slots:o,state:r},children:typeof t=="function"?t(r):t})})},Zt=({children:t,className:e,...l})=>{const{slots:a,state:o}=s.use(Gt),r=o==null?void 0:o.isSelected,n=typeof t=="function"?t(o??{}):t||v.jsx("svg",{"aria-hidden":"true","data-slot":"list-box-item-indicator--checkmark",fill:"none",role:"presentation",stroke:"currentColor",strokeDasharray:22,strokeDashoffset:r?44:66,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 17 18",children:v.jsx("polyline",{points:"1 9 7 14 15 4"})});return v.jsx(z.span,{"aria-hidden":"true",className:O(a==null?void 0:a.indicator,e),"data-slot":"list-box-item-indicator","data-visible":r||void 0,...l,children:n})},io=Object.assign(Re,{Root:Re,Indicator:Zt}),uo=({children:t,className:e,...l})=>{const a=d.useMemo(()=>sl({class:typeof e=="string"?e:void 0}),[e]);return v.jsx(Cl,{className:a,...l,children:t})},co=uo;function Te({className:t,variant:e,...l}){const a=d.useMemo(()=>ol({variant:e}),[e]);return v.jsx(yl,{className:j(t,a),"data-slot":"list-box",...l})}const Do=Object.assign(Te,{Root:Te,Item:io,ItemIndicator:Zt,Section:co}),X=s.createContext({}),Ie=({children:t,className:e,fullWidth:l,variant:a,...o})=>{const r=d.useMemo(()=>nl({fullWidth:l,variant:a}),[l,a]);return v.jsx(Kl,{children:v.jsx(X,{value:{slots:r},children:v.jsx(Ol,{"data-slot":"select",...o,className:j(e,r==null?void 0:r.base()),children:n=>v.jsx(v.Fragment,{children:typeof t=="function"?t(n):t})})})})},fo=({children:t,className:e,...l})=>{const{slots:a}=s.use(X);return v.jsx(Ga,{className:j(e,a==null?void 0:a.trigger()),"data-slot":"select-trigger",...l,children:o=>v.jsx(v.Fragment,{children:typeof t=="function"?t(o):t})})},bo=({children:t,className:e,...l})=>{const{slots:a}=s.use(X);return v.jsx(Ll,{className:j(e,a==null?void 0:a.value()),"data-slot":"select-value",...l,children:t})},$o=({children:t,className:e,...l})=>{const{slots:a}=s.use(X),o=s.use(pe);return t&&d.isValidElement(t)?d.cloneElement(t,{...l,className:O(a==null?void 0:a.indicator,e),"data-slot":"select-indicator","data-open":Ee(o==null?void 0:o.isOpen)}):v.jsx(Wa,{className:O(a==null?void 0:a.indicator,e),"data-open":Ee(o==null?void 0:o.isOpen),"data-slot":"select-default-indicator",...l})},go=({children:t,className:e,placement:l="bottom",...a})=>{const{slots:o}=s.use(X);return v.jsx(Ha,{value:{variant:"default"},children:v.jsx(qa,{...a,className:j(e,o==null?void 0:o.popover()),"data-slot":"select-popover",placement:l,children:t})})},Co=Object.assign(Ie,{Root:Ie,Trigger:fo,Value:bo,Indicator:$o,Popover:go}),po=t=>s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},t),s.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 13.5a5.5 5.5 0 0 0 2.263-10.514 5.5 5.5 0 0 1-7.278 7.278A5.5 5.5 0 0 0 8 13.5M1.045 8.795a7.001 7.001 0 1 0 7.75-7.75l-.028-.003A7 7 0 0 0 8 1c-.527 0-.59.842-.185 1.18a4 4 0 0 1 .342.322A4 4 0 1 1 2.18 7.814C1.842 7.41 1 7.474 1 8a7 7 0 0 0 .045.794",clipRule:"evenodd"})),mo=t=>s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},t),s.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 3a.75.75 0 0 1-.75-.75V.75a.75.75 0 0 1 1.5 0v1.5A.75.75 0 0 1 8 3m0 7.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8m-.75 3.25a.75.75 0 0 0 1.5 0v-1.5a.75.75 0 0 0-1.5 0zM13 8a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 0 1.5h-1.5A.75.75 0 0 1 13 8M.75 7.25a.75.75 0 0 0 0 1.5h1.5a.75.75 0 0 0 0-1.5zm10.786-2.786a.75.75 0 0 1 0-1.06l1.06-1.06a.75.75 0 0 1 1.06 1.06l-1.06 1.06a.75.75 0 0 1-1.06 0m-9.193 8.132a.75.75 0 0 0 1.06 1.06l1.062-1.06a.75.75 0 0 0-1.061-1.06zm9.193-1.06a.75.75 0 0 1 1.06 0l1.06 1.06a.75.75 0 0 1-1.06 1.06l-1.06-1.06a.75.75 0 0 1 0-1.06M3.404 2.343a.75.75 0 0 0-1.06 1.06l1.06 1.061a.75.75 0 1 0 1.06-1.06z",clipRule:"evenodd"}));function Eo(){const{theme:t,setTheme:e}=Za(),l=a=>{const o=a;(o==="light"||o==="dark")&&e(o)};return v.jsx(V,{className:"w-fit shrink-0 text-center",selectedKey:t,onSelectionChange:a=>l(String(a)),children:v.jsx(V.ListContainer,{children:v.jsxs(V.List,{"aria-label":"页面主题",className:"w-fit",children:[v.jsxs(V.Tab,{"aria-label":"使用亮色模式",className:"h-6 w-6 px-0 text-xs data-[selected=true]:text-accent-foreground",id:"light",children:[v.jsx(mo,{className:"size-3.5"}),v.jsx(V.Indicator,{className:"bg-accent"})]}),v.jsxs(V.Tab,{"aria-label":"使用暗色模式",className:"h-6 w-6 px-0 text-xs data-[selected=true]:text-accent-foreground",id:"dark",children:[v.jsx(po,{className:"size-3.5"}),v.jsx(V.Indicator,{className:"bg-accent"})]})]})})})}function So(){return!1}export{ho as C,Do as L,Co as S,yo as T,Eo as a,Po as b,So as i};