agent-session-inspector 0.1.2 → 0.1.4
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.
- package/LICENSE +21 -0
- package/README.md +144 -138
- package/VERSION +1 -1
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +3 -0
- package/app/.next/build-manifest.json +5 -5
- package/app/.next/prerender-manifest.json +38 -6
- package/app/.next/required-server-files.json +1 -1
- package/app/.next/routes-manifest.json +21 -0
- package/app/.next/server/app/_global-error/page/build-manifest.json +2 -2
- package/app/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next/server/app/_global-error.html +1 -1
- package/app/.next/server/app/_global-error.rsc +2 -2
- package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page/build-manifest.json +2 -2
- package/app/.next/server/app/_not-found/page.js +4 -4
- package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +20 -19
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +20 -19
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +17 -15
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/api/analytics/route.js +2 -2
- package/app/.next/server/app/api/analytics/route.js.nft.json +1 -1
- package/app/.next/server/app/api/logs/route.js +2 -2
- package/app/.next/server/app/api/logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/pricing/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/pricing/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/pricing/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/pricing/route.js +6 -0
- package/app/.next/server/app/api/pricing/route.js.map +5 -0
- package/app/.next/server/app/api/pricing/route.js.nft.json +1 -0
- package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/providers/route.js +2 -2
- package/app/.next/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next/server/app/api/search/route.js +2 -2
- package/app/.next/server/app/api/search/route.js.nft.json +1 -1
- package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route/build-manifest.json +12 -0
- package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route/server-reference-manifest.json +4 -0
- package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route.js +7 -0
- package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route.js.map +5 -0
- package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route.js.nft.json +1 -0
- package/app/.next/server/app/api/sessions/[provider]/[id]/reveal/route_client-reference-manifest.js +3 -0
- package/app/.next/server/app/api/sessions/[provider]/[id]/route.js +2 -2
- package/app/.next/server/app/api/sessions/[provider]/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/sessions/route.js +2 -2
- package/app/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/app/.next/server/app/favicon.ico/route.js +1 -2
- package/app/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next/server/app/favicon.ico.body +0 -0
- package/app/.next/server/app/icon.svg/route/app-paths-manifest.json +3 -0
- package/app/.next/server/app/icon.svg/route/build-manifest.json +12 -0
- package/app/.next/server/app/icon.svg/route.js +6 -0
- package/app/.next/server/app/icon.svg/route.js.map +5 -0
- package/app/.next/server/app/icon.svg/route.js.nft.json +1 -0
- package/app/.next/server/app/icon.svg.body +21 -0
- package/app/.next/server/app/icon.svg.meta +1 -0
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +22 -21
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +18 -17
- package/app/.next/server/app/index.segments/_full.segment.rsc +22 -21
- package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/page/build-manifest.json +2 -2
- package/app/.next/server/app/page.js +4 -4
- package/app/.next/server/app/page.js.nft.json +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/sessions/[provider]/[id]/page/build-manifest.json +2 -2
- package/app/.next/server/app/sessions/[provider]/[id]/page.js +4 -4
- package/app/.next/server/app/sessions/[provider]/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/sessions/[provider]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +3 -0
- package/app/.next/server/chunks/1oeh_server_app_api_sessions_[provider]_[id]_reveal_route_actions_1mqlatn.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0dyq0rc._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0kgkqhn._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__0yxic1z._.js +6 -0
- package/app/.next/server/chunks/[root-of-the-server]__10p8y9z._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__11n7k65._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1cceere._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1eclfq8._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1lz20wm._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1w48qe_._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__1zdh1mi._.js +3 -0
- package/app/.next/server/chunks/[root-of-the-server]__20epvou._.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_api_pricing_route_actions_06i5bdm.js +3 -0
- package/app/.next/server/chunks/_next-internal_server_app_icon_svg_route_actions_1r2h_ub.js +3 -0
- package/app/.next/server/chunks/ssr/{[root-of-the-server]__136432r._.js → [root-of-the-server]__09wcsz4._.js} +2 -2
- package/app/.next/server/chunks/ssr/[root-of-the-server]__0rwa1xd._.js +3 -0
- package/app/.next/server/chunks/ssr/[root-of-the-server]__0vog67g._.js +3 -0
- package/app/.next/server/chunks/ssr/[root-of-the-server]__0zh4z_k._.js +3 -0
- package/app/.next/server/chunks/ssr/[root-of-the-server]__14zv8r1._.js +1 -1
- package/app/.next/server/chunks/ssr/[root-of-the-server]__1ei65vj._.js +3 -0
- package/app/.next/server/chunks/ssr/_0136j91._.js +1 -1
- package/app/.next/server/chunks/ssr/_0o294sf._.js +3 -0
- package/app/.next/server/chunks/ssr/_1-5v1mi._.js +3 -0
- package/app/.next/server/chunks/ssr/_12__495._.js +1 -1
- package/app/.next/server/chunks/ssr/_1ck8cbf._.js +1 -1
- package/app/.next/server/chunks/ssr/src_app_page_tsx_1chiuah._.js +1 -1
- package/app/.next/server/chunks/ssr/src_app_sessions_[provider]_[id]_page_tsx_0uf635h._.js +3 -3
- package/app/.next/server/middleware-build-manifest.js +5 -5
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +1 -1
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/{1golqn9hvdi85.js → 0pkcgt8dr0jkl.js} +1 -1
- package/app/.next/static/chunks/10x4j1wts3xx2.js +1 -0
- package/app/.next/static/chunks/1dz8a9ds45tdb.js +6 -0
- package/app/.next/static/chunks/1g3ep2o7fhgpe.css +1 -0
- package/app/.next/static/chunks/{1bvlgvy9l9_54.js → 244zytz360e56.js} +1 -1
- package/app/.next/static/chunks/2iedud09ou282.js +1 -0
- package/app/.next/static/chunks/2k65elb1vo-2z.js +1 -0
- package/app/.next/static/chunks/2t205sbe-_sk4.js +1 -0
- package/app/.next/static/chunks/{0u22wlboqnsjn.js → 3_e2d472hbms0.js} +1 -1
- package/app/.next/static/chunks/{turbopack-1whpqxvx8f759.js → turbopack-2r-q4_3piunr7.js} +1 -1
- package/app/.next/static/media/favicon.1xg7fnblxruif.ico +0 -0
- package/app/.next/static/media/icon.3q7e6rp5-d1lv.svg +21 -0
- package/app/AGENTS.md +9 -0
- package/app/CLAUDE.md +1 -0
- package/app/CONTRIBUTING.md +71 -0
- package/app/Dockerfile +34 -0
- package/app/LICENSE +21 -0
- package/app/README.md +277 -0
- package/app/bin/agent-session-inspector.mjs +159 -0
- package/app/components.json +25 -0
- package/app/docs/screenshots/analytics-dark.png +0 -0
- package/app/docs/screenshots/analytics.png +0 -0
- package/app/docs/screenshots/session-overview-dark.png +0 -0
- package/app/docs/screenshots/session-overview.png +0 -0
- package/app/docs/screenshots/sessions-dark.png +0 -0
- package/app/docs/screenshots/sessions.png +0 -0
- package/app/docs/screenshots/timeline-dark.png +0 -0
- package/app/docs/screenshots/timeline.png +0 -0
- package/app/docs/screenshots/token-optimizer-dark.png +0 -0
- package/app/docs/screenshots/token-optimizer.png +0 -0
- package/app/docs/social-preview.png +0 -0
- package/app/eslint.config.mjs +19 -0
- package/app/install.sh +85 -0
- package/app/next.config.ts +17 -0
- package/app/package.json +17 -3
- package/app/pnpm-lock.yaml +6760 -0
- package/app/pnpm-workspace.yaml +2 -0
- package/app/postcss.config.mjs +7 -0
- package/app/scripts/demo-data.mjs +288 -0
- package/app/scripts/deploy-docker.sh +67 -0
- package/app/scripts/package-release.sh +84 -0
- package/app/server.js +1 -1
- package/app/tsconfig.json +34 -0
- package/bin/agent-session-inspector.mjs +2 -1
- package/package.json +17 -3
- package/app/.next/server/chunks/[externals]__0l8ei7u._.js +0 -3
- package/app/.next/server/chunks/[externals]__0xll52b._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__093lyxv._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0ne74op._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__0uqb915._.js +0 -6
- package/app/.next/server/chunks/[root-of-the-server]__0uv5tnc._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1lfc-ga._.js +0 -3
- package/app/.next/server/chunks/[root-of-the-server]__1n_sepq._.js +0 -3
- package/app/.next/server/chunks/_1i74yrf._.js +0 -3
- package/app/.next/server/chunks/ssr/[root-of-the-server]__0o9lim0._.js +0 -3
- package/app/.next/server/chunks/ssr/[root-of-the-server]__0ovxc0l._.js +0 -3
- package/app/.next/server/chunks/ssr/[root-of-the-server]__0u75sqx._.js +0 -3
- package/app/.next/server/chunks/ssr/[root-of-the-server]__10av_pp._.js +0 -3
- package/app/.next/server/chunks/ssr/_02qe55s._.js +0 -3
- package/app/.next/server/chunks/ssr/_1f2ffz2._.js +0 -3
- package/app/.next/static/chunks/1a6ohz9e-zu6v.js +0 -6
- package/app/.next/static/chunks/1gjrekoh3wbwd.js +0 -1
- package/app/.next/static/chunks/2bron83qy3bb-.js +0 -1
- package/app/.next/static/chunks/2rm87uoxc3wi6.js +0 -1
- package/app/.next/static/chunks/2wkix9od_vgcp.css +0 -1
- package/app/.next/static/chunks/3fjiamhx4adq8.js +0 -1
- package/app/.next/static/media/favicon.2vob68tjqpejf.ico +0 -0
- package/app/public/file.svg +0 -1
- package/app/public/globe.svg +0 -1
- package/app/public/next.svg +0 -1
- package/app/public/vercel.svg +0 -1
- package/app/public/window.svg +0 -1
- /package/app/.next/static/{66JBn2mmg7nPYv4u88Jb6 → KFq9wlUt8U-Sma3McE5Jw}/_buildManifest.js +0 -0
- /package/app/.next/static/{66JBn2mmg7nPYv4u88Jb6 → KFq9wlUt8U-Sma3McE5Jw}/_clientMiddlewareManifest.js +0 -0
- /package/app/.next/static/{66JBn2mmg7nPYv4u88Jb6 → KFq9wlUt8U-Sma3McE5Jw}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,77224,e=>{"use strict";let t=(0,e.i(13496).default)("bug",[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]);e.s(["Bug",0,t],77224)},50267,e=>{"use strict";let t=(0,e.i(13496).default)("calendar-days",[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M8 13h.01",key:"1sbv64"}],["path",{d:"M12 13h.01",key:"y0uutt"}],["path",{d:"M16 13h.01",key:"wip0gl"}],["path",{d:"M8 17h.01",key:"p3bg7i"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M16 17h.01",key:"ql8jdd"}]]);e.s(["CalendarDays",0,t],50267)},93304,98993,e=>{"use strict";let t=(0,e.i(13496).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t],98993),e.s(["ChevronRight",0,t],93304)},26162,e=>{"use strict";let t=(0,e.i(13496).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",0,t],26162)},93125,e=>{"use strict";let t=(0,e.i(13496).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);e.s(["GitBranch",0,t],93125)},50395,e=>{"use strict";let t=(0,e.i(13496).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["Info",0,t],50395)},59920,10976,e=>{"use strict";let t=(0,e.i(13496).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",0,t],10976),e.s(["AlertTriangle",0,t],59920)},32660,e=>{"use strict";let t=(0,e.i(13496).default)("zap",[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]]);e.s(["Zap",0,t],32660)},93472,e=>{"use strict";var t=e.i(45650),r=e.i(75157);e.s(["BarList",0,function({items:e,color:a="bg-brand",max:n,emptyLabel:s="None",limit:i,format:o=e=>e.toLocaleString()}){if(0===e.length)return(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:s});let l=[...e].sort((e,t)=>t.value-e.value),d=i?l.slice(0,i):l,u=n??l[0].value??1;return(0,t.jsxs)("div",{className:"space-y-1.5",children:[d.map(({name:e,value:n})=>(0,t.jsxs)("div",{className:"flex items-center gap-2.5 text-xs",children:[(0,t.jsx)("div",{className:"w-28 shrink-0 truncate font-mono text-muted-foreground sm:w-36",title:e,children:e}),(0,t.jsx)("div",{className:"h-4 flex-1 overflow-hidden rounded-sm bg-muted",children:(0,t.jsx)("div",{className:(0,r.cn)("h-full rounded-sm",a),style:{width:`${Math.max(n/u*100,2)}%`}})}),(0,t.jsx)("div",{className:"w-12 shrink-0 text-right font-medium tabular-nums text-foreground",children:o(n)})]},e)),i&&l.length>i&&(0,t.jsxs)("p",{className:"pt-1 text-xs text-muted-foreground",children:["+",l.length-i," more"]})]})}])},35334,e=>{"use strict";var t=e.i(45650),r=e.i(75157);e.s(["EmptyState",0,function({icon:e,title:a,description:n,action:s,className:i}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-border px-6 py-14 text-center",i),children:[(0,t.jsx)("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted text-muted-foreground",children:(0,t.jsx)(e,{className:"size-5","aria-hidden":!0})}),(0,t.jsx)("p",{className:"text-sm font-medium text-foreground",children:a}),n&&(0,t.jsx)("p",{className:"max-w-sm text-xs leading-relaxed text-muted-foreground",children:n}),s&&(0,t.jsx)("div",{className:"mt-2",children:s})]})}])},82183,9449,e=>{"use strict";var t=e.i(45650);let r={A:{badge:"border-emerald-300 bg-emerald-50 text-emerald-700 dark:border-emerald-900 dark:bg-emerald-950/40 dark:text-emerald-300",bar:"bg-emerald-500"},B:{badge:"border-sky-300 bg-sky-50 text-sky-700 dark:border-sky-900 dark:bg-sky-950/40 dark:text-sky-300",bar:"bg-sky-500"},C:{badge:"border-amber-300 bg-amber-50 text-amber-700 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-300",bar:"bg-amber-500"},D:{badge:"border-orange-300 bg-orange-50 text-orange-700 dark:border-orange-900 dark:bg-orange-950/40 dark:text-orange-300",bar:"bg-orange-500"},F:{badge:"border-red-300 bg-red-50 text-red-700 dark:border-red-900 dark:bg-red-950/40 dark:text-red-300",bar:"bg-red-500"}},a={completed:"The agent had the last word.",in_progress:"The agent is still writing to this session.",abandoned:"The session stops mid-work, or on a prompt the agent never answered.",errored:"The transcript ends on an API error."},n=(e,t,r=`${t}s`)=>`${e.toLocaleString()} ${1===e?t:r}`;e.s(["GRADES",0,["A","B","C","D","F"],"GRADE_STYLES",0,r,"OUTCOMES",0,["completed","in_progress","abandoned","errored"],"OUTCOME_BARS",0,{completed:"bg-emerald-500",in_progress:"bg-sky-500",abandoned:"bg-amber-500",errored:"bg-red-500"},"OUTCOME_LABELS",0,{completed:"Completed",in_progress:"In progress",abandoned:"Abandoned",errored:"Errored"},"OUTCOME_NOTES",0,a,"SIGNAL_INFO",0,{outcome:{label:"Unfinished sessions",describe:(e,t)=>a[t.outcome],advice:"Review errored and abandoned sessions first: they spent tokens without reaching an answer."},tool_failures:{label:"Tool failures",describe:(e,t)=>{let r=Math.max(t.toolResults,e.count);return`${e.count.toLocaleString()} of ${n(r,"tool result")} failed (${Math.round(e.count/r*100)}%).`},advice:"Open the failed calls and look for a recurring cause: wrong paths, missing dependencies, commands that need a flag.",focus:{failures:!0}},retry_loops:{label:"Retry loops",describe:e=>`The same tool failed three or more times in a row, ${n(e.count,"time")}.`,advice:"An agent repeating a failing call lacks the context to try something else. Put the working command in AGENTS.md or CLAUDE.md.",focus:{failures:!0}},api_errors:{label:"API errors",describe:e=>`${n(e.count,"API error")} or retried request${1===e.count?"":"s"}.`,advice:"Each retry re-sends the whole context. Frequent errors point at rate limits or an overloaded model.",focus:{categories:["session"],subKeys:["session.error"]}},aborted_turns:{label:"Interrupted turns",describe:e=>`${n(e.count,"turn")} interrupted before the agent finished.`,advice:"Interruptions usually mean the agent set off in the wrong direction. State the constraints and the success criteria up front.",focus:{categories:["session"],subKeys:["session.turn_aborted"]}},compactions:{label:"Context compactions",describe:e=>`Context was compacted ${n(e.count,"time")}.`,advice:"Split long tasks into separate sessions before the context fills up: compacting mid-task loses detail.",focus:{categories:["session"],subKeys:["session.compaction_start"]}}},"healthSummary",0,function(e){return`${e.grade} \xb7 ${e.score}`}],9449);var s=e.i(75157);e.s(["GradeBadge",0,function({grade:e,score:a,className:n,...i}){return(0,t.jsxs)("span",{...i,className:(0,s.cn)("inline-flex h-5 min-w-5 shrink-0 items-center justify-center gap-1 rounded-sm border px-1 font-mono text-xs font-bold leading-none",r[e].badge,n),children:[e,void 0!==a&&(0,t.jsx)("span",{className:"font-medium tabular-nums",children:a})]})}],82183)},4503,22910,e=>{"use strict";var t=e.i(45650),r=e.i(10364);let a=(0,e.i(13496).default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);var n=e.i(19455),s=e.i(46798),i=e.i(75157);function o({className:e}){return(0,t.jsx)("div",{"aria-hidden":!0,className:(0,i.cn)("animate-pulse rounded-md bg-muted",e)})}e.s(["ScrollToTop",0,function({threshold:e=600}){let[o,l]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let t=()=>l(window.scrollY>e);return t(),window.addEventListener("scroll",t,{passive:!0}),()=>window.removeEventListener("scroll",t)},[e]),(0,t.jsxs)(s.Tooltip,{children:[(0,t.jsx)(s.TooltipTrigger,{render:(0,t.jsx)(n.Button,{variant:"outline",size:"icon-lg",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),"aria-label":"Back to top",tabIndex:o?0:-1,className:(0,i.cn)("fixed bottom-6 right-6 z-30 size-10 rounded-full bg-card text-muted-foreground shadow-lg dark:bg-card",o?"translate-y-0 opacity-100":"pointer-events-none translate-y-2 opacity-0"),children:(0,t.jsx)(a,{"aria-hidden":!0})})}),(0,t.jsx)(s.TooltipContent,{side:"left",children:"Back to top"})]})}],4503),e.s(["SessionCardSkeleton",0,function(){return(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-card px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,t.jsx)(o,{className:"h-4 w-2/3"}),(0,t.jsx)(o,{className:"h-3 w-1/3"})]}),(0,t.jsx)(o,{className:"h-3 w-16"})]}),(0,t.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,t.jsx)(o,{className:"h-3 w-20"}),(0,t.jsx)(o,{className:"h-3 w-16"}),(0,t.jsx)(o,{className:"h-3 w-24"})]})]})},"Skeleton",0,o],22910)},75858,e=>{"use strict";var t=e.i(45650),r=e.i(50395),a=e.i(75157);e.s(["StatCard",0,function({label:e,value:n,sub:s,accent:i=!1,onClick:o}){let l=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"flex items-center justify-between gap-2 text-xs uppercase tracking-wider text-muted-foreground",children:[e,o&&(0,t.jsx)(r.Info,{className:"size-3.5 shrink-0 opacity-60 transition-opacity group-hover:opacity-100","aria-hidden":!0})]}),(0,t.jsx)("span",{className:(0,a.cn)("mt-1.5 block text-2xl font-bold leading-none tabular-nums",i?"text-brand":"text-foreground"),children:n}),s&&(0,t.jsx)("span",{className:"mt-1 block truncate text-xs normal-case text-muted-foreground",title:s,children:s})]});return o?(0,t.jsx)("button",{type:"button",onClick:o,"aria-haspopup":"dialog",className:"group block rounded-xl border border-border bg-card p-4 text-left transition-colors hover:border-brand/40 hover:bg-muted/40 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:l}):(0,t.jsx)("div",{className:"rounded-xl border border-border bg-card p-4",children:l})},"StatCardGrid",0,function({children:e}){return(0,t.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(150px,1fr))] gap-3",children:e})}])},82574,e=>{"use strict";var t=e.i(13496);let r=(0,t.default)("arrow-down-to-line",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]),a=(0,t.default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);e.s(["InputTokensIcon",0,a,"OutputTokensIcon",0,r],82574)},19007,44581,e=>{"use strict";var t=e.i(45650),r=e.i(10364),a=e.i(51958),n=e.i(77224),s=e.i(50395);let i=(0,e.i(13496).default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);var o=e.i(19455),l=e.i(76639),d=e.i(46798),u=e.i(34960);let c="https://github.com/kishanmundha/agent-session-inspector",f={name:"Agent Session Inspector",description:"A local web UI for reading agent CLI transcripts: what the agent did, how long it took, and where the tokens went. It reads the session files on this machine and never sends them anywhere.",version:"0.1.4",author:{name:"Kishan Mundha",url:"https://github.com/kishanmundha"},repoUrl:c,issuesUrl:`${c}/issues`,releasesUrl:`${c}/releases`};e.s(["APP_INFO",0,f],44581);var h=e.i(46816),p=e.i(75157);function m({className:e}){return(0,t.jsx)("svg",{viewBox:"0 0 16 16",fill:"currentColor",className:e,"aria-hidden":!0,children:(0,t.jsx)("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z"})})}let b={target:"_blank",rel:"noreferrer"};e.s(["AboutDialog",0,function({providers:e,className:c}){let[x,g]=(0,r.useState)(!1),[v,y]=(0,r.useState)(null),w=(0,r.useRef)(!1),k=e??v;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(d.Tooltip,{children:[(0,t.jsx)(d.TooltipTrigger,{render:(0,t.jsx)(o.Button,{variant:"outline",size:"icon",onClick:function(){g(!0),e||w.current||(w.current=!0,fetch("/api/providers").then(e=>e.ok?e.json():[]).then(y).catch(()=>y([])))},"aria-label":"About",className:(0,p.cn)("text-muted-foreground",c),children:(0,t.jsx)(s.Info,{className:"size-3.5","aria-hidden":!0})})}),(0,t.jsx)(d.TooltipContent,{children:"About"})]}),(0,t.jsx)(l.Dialog,{open:x,onOpenChange:g,children:(0,t.jsxs)(l.DialogContent,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-lg bg-brand text-brand-foreground",children:(0,t.jsx)(a.Bot,{className:"size-5","aria-hidden":!0})}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)(l.DialogTitle,{children:f.name}),(0,t.jsxs)("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[(0,t.jsxs)("span",{className:"font-mono",children:["v",f.version]})," · by ",(0,t.jsx)("a",{href:f.author.url,...b,className:"font-medium text-foreground underline-offset-2 hover:underline",children:f.author.name})]})]})]}),(0,t.jsx)(l.DialogDescription,{children:f.description}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsxs)(o.Button,{variant:"outline",size:"sm",nativeButton:!1,render:(0,t.jsx)("a",{href:f.repoUrl,...b}),children:[(0,t.jsx)(m,{className:"size-3.5"}),"GitHub"]}),(0,t.jsxs)(o.Button,{variant:"outline",size:"sm",nativeButton:!1,render:(0,t.jsx)("a",{href:f.releasesUrl,...b}),children:[(0,t.jsx)(i,{className:"size-3.5","aria-hidden":!0}),"Releases"]}),(0,t.jsxs)(o.Button,{variant:"outline",size:"sm",nativeButton:!1,render:(0,t.jsx)("a",{href:f.issuesUrl,...b}),children:[(0,t.jsx)(n.Bug,{className:"size-3.5","aria-hidden":!0}),"Report an issue"]})]}),(0,t.jsxs)("section",{className:"space-y-2 border-t border-border pt-3",children:[(0,t.jsx)("h3",{className:"text-xs font-medium text-foreground",children:"Data sources"}),k?k.length>0?(0,t.jsx)("ul",{className:"overflow-hidden rounded-lg border border-border text-xs",children:k.map(e=>(0,t.jsxs)("li",{className:"flex items-center gap-2 border-b border-border/60 px-3 py-2 last:border-b-0",children:[(0,t.jsx)("span",{className:(0,p.cn)("size-1.5 shrink-0 rounded-full",e.available?(0,h.providerStyle)(e.id).dotCls:"bg-muted-foreground/40"),"aria-hidden":!0}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"truncate font-medium text-foreground",children:e.label}),(0,t.jsx)("p",{className:"truncate font-mono text-muted-foreground",children:e.rootDir})]}),(0,t.jsx)("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:e.available?`${e.sessionCount??0} ${1===e.sessionCount?"session":"sessions"}`:"not found"}),(0,t.jsx)(u.CopyButton,{value:e.rootDir,label:"Copy path"})]},e.id))}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"No agent directories found."}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Loading…"})]})]})})]})}],19007)},19390,e=>{"use strict";var t=e.i(45650),r=e.i(10364),a=e.i(75379),n=e.i(75157);let s="\0other";function i(e,t){return"costUSD"===e?(0,a.formatCost)(t):(0,a.formatTokens)(t)??"0"}function o(e){if(e<=0)return 1;let t=10**Math.floor(Math.log10(e));return([1,1.5,2,3,4,5,6,8,10].find(r=>r*t>=e)??10)*t}let l=e=>e.toLocaleDateString([],{month:"short",day:"numeric"});e.s(["OTHER",0,s,"OTHER_COLOR",0,"color-mix(in srgb, var(--muted-foreground) 45%, transparent)","SERIES_COLORS",0,["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"],"StackedBars",0,function({periods:e,breakdownOf:a,series:d,unit:u}){var c;let[f,h]=(0,r.useState)(null),p=o(Math.max(0,...e.map(e=>e[u]))),m=e.map(e=>(function(e,t,r){let a=new Set(t.map(e=>e.name)),n=0;for(let[t,s]of Object.entries(e))a.has(t)||(n+=s[r]);return t.map(t=>t.name===s?n:e[t.name]?.[r]??0)})(a(e),d,u)),b=null!==f&&f<e.length?f:null,x=d.map((e,t)=>m.reduce((e,r)=>e+r[t],0)),g=null===b?x:m[b],v=g.reduce((e,t)=>e+t,0),y=Math.floor((e.length-1)/2);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("div",{className:"flex h-48 flex-col justify-between text-right text-[10px] leading-none tabular-nums text-muted-foreground",children:[(0,t.jsx)("span",{children:i(u,p)}),(0,t.jsx)("span",{children:i(u,p/2)}),(0,t.jsx)("span",{children:i(u,0)})]}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{role:"img","aria-label":`${"costUSD"===u?"Cost":"Tokens"} per ${e[0]?.days===1?"day":"week"} over ${e.length} bars`,className:"relative flex h-48 items-end gap-[2px] border-b border-border",onMouseLeave:()=>h(null),children:[(0,t.jsx)("span",{className:"pointer-events-none absolute inset-x-0 top-0 border-t border-dashed border-border"}),(0,t.jsx)("span",{className:"pointer-events-none absolute inset-x-0 top-1/2 border-t border-dashed border-border"}),e.map((e,r)=>(0,t.jsx)("div",{onMouseEnter:()=>h(r),className:(0,n.cn)("relative flex h-full min-w-0 max-w-12 flex-1 flex-col-reverse",null!==b&&b!==r&&"opacity-50"),children:d.map((e,a)=>m[r][a]>0?(0,t.jsx)("div",{className:"w-full shrink-0 border-t-2 border-card first:border-t-0 last:rounded-t-[3px]",style:{height:`${m[r][a]/p*100}%`,minHeight:2,background:e.color}},e.name):null)},e.start.getTime()))]}),(0,t.jsxs)("div",{className:"mt-1.5 flex justify-between text-[10px] text-muted-foreground",children:[(0,t.jsx)("span",{children:e.length>0&&l(e[0].start)}),e.length>4&&(0,t.jsx)("span",{children:l(e[y].start)}),(0,t.jsx)("span",{children:e.length>1&&l(e[e.length-1].start)})]})]})]}),(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs","aria-live":"polite",children:[(0,t.jsxs)("span",{className:"font-medium tabular-nums",children:[null===b?"Whole range":1===(c=e[b]).days?c.start.toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"}):`Week of ${l(c.start)}`," ·"," ",i(u,v)]}),d.map((e,r)=>(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-muted-foreground",children:[(0,t.jsx)("span",{className:"size-2.5 shrink-0 rounded-[3px]",style:{background:e.color},"aria-hidden":!0}),(0,t.jsx)("span",{className:"max-w-40 truncate",title:e.label,children:e.label}),(0,t.jsx)("span",{className:"tabular-nums text-foreground",children:i(u,g[r])})]},e.name))]})]})},"Treemap",0,function({items:e,unit:r}){let a=e.filter(e=>e.value>0).sort((e,t)=>t.value-e.value),n=a.reduce((e,t)=>e+t.value,0),s=function(e){let t=e.reduce((e,t)=>e+t,0);if(t<=0)return[];let r=e.map(e=>e/t*5600),a=[],n=0,s=0,i=100,o=56,l=0;for(;l<r.length;){let e=Math.min(i,o),t=(t,r,a)=>Math.max(e*e*a/(t*t),t*t/(e*e*r)),d=r[l],u=l+1;for(;u<r.length;){let e=d+r[u];if(t(e,r[u],r[l])>t(d,r[u-1],r[l]))break;d=e,u++}let c=d/e,f=0;for(let e=l;e<u;e++){let t=r[e]/c;a.push(i>=o?{x:n,y:s+f,w:c,h:t}:{x:n+f,y:s,w:t,h:c}),f+=t}i>=o?(n+=c,i-=c):(s+=c,o-=c),l=u}return a}(a.map(e=>e.value));return(0,t.jsx)("div",{className:"relative w-full",style:{aspectRatio:"100 / 56"},role:"img","aria-label":`Share of ${"costUSD"===r?"cost":"tokens"} across ${a.length} groups`,children:a.map((e,a)=>{let o=s[a],l=e.value/n;return(0,t.jsx)("div",{title:`${e.label}: ${i(r,e.value)} (${(100*l).toFixed(1)}%)`,className:"absolute p-px",style:{left:`${o.x/100*100}%`,top:`${o.y/56*100}%`,width:`${o.w/100*100}%`,height:`${o.h/56*100}%`},children:(0,t.jsx)("div",{className:"size-full overflow-hidden rounded-[4px] border-l-[3px] px-1.5 py-1 hover:ring-1 hover:ring-foreground/50",style:{background:`color-mix(in srgb, ${e.color} 28%, var(--card))`,borderColor:e.color},children:o.w>14&&o.h>11&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"block truncate text-xs font-medium",children:e.label}),(0,t.jsxs)("span",{className:"block truncate text-[11px] tabular-nums text-muted-foreground",children:[i(r,e.value)," · ",(100*l).toFixed(1),"%"]})]})})},e.name)})})},"formatUnit",0,i,"niceCeil",0,o])},87486,e=>{"use strict";var t=e.i(29494),r=e.i(50403),a=e.i(94237),n=e.i(75157);let s=(0,a.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:a="default",render:i,...o}){var l;return l={defaultTagName:"span",props:(0,t.mergeProps)({className:(0,n.cn)(s({variant:a}),e)},o),render:i,state:{slot:"badge",variant:a}},(0,r.useRenderElement)(l.defaultTagName??"div",l,l)}],87486)},59684,34960,e=>{"use strict";var t=e.i(45650);e.s([],88752),e.i(88752);var r=e.i(10364),a=e.i(19458),n=e.i(2304),s=e.i(82420);let i=r.createContext(void 0);function o(){let e=r.useContext(i);if(void 0===e)throw Error((0,s.default)(53));return e}var l=e.i(50403);function d(e,t,r){if(!e)return 0;let a=getComputedStyle(e),n=`${t}${"x"===r?"Inline":"Block"}`,s=parseFloat(a[`${n}Start`]);return"x"===r&&"margin"===t?2*s:s+parseFloat(a[`${n}End`])}var u=e.i(96100),c=e.i(99281);let f=e=>t=>t?{[e]:""}:null,h={hasOverflowX:f("data-has-overflow-x"),hasOverflowY:f("data-has-overflow-y"),overflowXStart:f("data-overflow-x-start"),overflowXEnd:f("data-overflow-x-end"),overflowYStart:f("data-overflow-y-start"),overflowYEnd:f("data-overflow-y-end"),cornerHidden:()=>null};var p=e.i(29148),m=e.i(63370);let b={x:0,y:0},x={width:0,height:0},g={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},v={x:!0,y:!0,corner:!0},y=r.forwardRef(function(e,s){var o;let f,{render:y,className:w,overflowEdgeThreshold:k,style:j,...S}=e,{xStart:N,xEnd:C,yStart:E,yEnd:R}=(f="number"==typeof(o=k)?{xStart:o,xEnd:o,yStart:o,yEnd:o}:o,{xStart:Math.max(0,f?.xStart||0),xEnd:Math.max(0,f?.xEnd||0),yStart:Math.max(0,f?.yStart||0),yEnd:Math.max(0,f?.yEnd||0)}),T=(0,c.useBaseUiId)(),M=(0,n.useTimeout)(),I=(0,n.useTimeout)(),{nonce:z,disableStyleElements:L}=(0,m.useCSPContext)(),[A,$]=r.useState(!1),[P,O]=r.useState(!1),[D,B]=r.useState(!1),[H,_]=r.useState(!1),[W,U]=r.useState(!1),[V,F]=r.useState(x),[Y,q]=r.useState(x),[X,K]=r.useState(g),[G,Z]=r.useState(v),Q=r.useRef(null),J=r.useRef(null),ee=r.useRef(null),et=r.useRef(null),er=r.useRef(null),ea=r.useRef(null),en=r.useRef(null),es=r.useRef(null),ei=r.useRef(0),eo=r.useRef(0),el=r.useRef(0),ed=r.useRef(0),eu=r.useRef("vertical"),ec=r.useRef(b),ef=r.useRef(null);function eh(e){let t=e?B:O;t(!0),(e?M:I).start(500,()=>{t(!1)})}let ep=(0,a.useStableCallback)(e=>{let t=e.x-ec.current.x,r=e.y-ec.current.y;ec.current=e,0!==r&&eh(!0),0!==t&&eh(!1)}),em=(0,a.useStableCallback)(()=>{let e=J.current;e&&null===ef.current&&(ef.current=e.style.scrollSnapType,e.style.scrollSnapType="none")}),eb=(0,a.useStableCallback)(e=>{if(0!==e.button)return;if(null!==es.current){let e="vertical"===eu.current?er.current:ea.current;if(e?.hasPointerCapture(es.current))return}es.current=e.pointerId,ei.current=e.clientY,eo.current=e.clientX,eu.current=e.currentTarget.getAttribute("data-orientation");let t=J.current;t&&(el.current=t.scrollTop,ed.current=t.scrollLeft,em());let r="vertical"===eu.current?er.current:ea.current;r?.setPointerCapture(e.pointerId)}),ex=(0,a.useStableCallback)(e=>{if(e.pointerId!==es.current)return;es.current=null,("vertical"===eu.current?B:O)(!1),null!==ef.current&&(J.current&&(J.current.style.scrollSnapType=ef.current),ef.current=null);let t="vertical"===eu.current?er.current:ea.current;t?.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)}),eg=(0,a.useStableCallback)(e=>{if(e.pointerId!==es.current)return;if(e.buttons%2==0)return void ex(e);let t=J.current;if(!t)return;let r="vertical"===eu.current,a=r?er.current:ea.current,n=r?ee.current:et.current;if(!a||!n)return;let s=r?"y":"x",i=d(n,"padding",s),o=d(a,"margin",s),l=r?a.offsetHeight:a.offsetWidth,u=(r?n.offsetHeight:n.offsetWidth)-l-i-o,c=r?e.clientY-ei.current:e.clientX-eo.current,f=r?t.scrollHeight:t.scrollWidth,h=r?t.clientHeight:t.clientWidth,p=(r?el.current:ed.current)+(u<=0?0:c/u)*(f-h);r?t.scrollTop=p:t.scrollLeft=p,e.preventDefault(),eh(r)});function ev(e){_("touch"===e.pointerType)}function ey(e){ev(e),"touch"!==e.pointerType&&$((0,p.contains)(Q.current,e.target))}let ew=r.useMemo(()=>({scrolling:P||D,hasOverflowX:!G.x,hasOverflowY:!G.y,overflowXStart:X.xStart,overflowXEnd:X.xEnd,overflowYStart:X.yStart,overflowYEnd:X.yEnd,cornerHidden:G.corner}),[P,D,G.x,G.y,G.corner,X]),ek={role:"presentation",onPointerEnter:ey,onPointerMove:ey,onPointerDown:ev,onPointerLeave(){$(!1)},style:{position:"relative","--scroll-area-corner-height":`${V.height}px`,"--scroll-area-corner-width":`${V.width}px`}},ej=(0,l.useRenderElement)("div",e,{state:ew,ref:[s,Q],props:[ek,S],stateAttributesMapping:h}),eS=r.useMemo(()=>({handlePointerDown:eb,handlePointerMove:eg,handlePointerUp:ex,handleScroll:ep,disableViewportSnap:em,cornerSize:V,setCornerSize:F,thumbSize:Y,setThumbSize:q,hasMeasuredScrollbar:W,setHasMeasuredScrollbar:U,touchModality:H,cornerRef:en,scrollingX:P,scrollingY:D,hovering:A,setHovering:$,viewportRef:J,scrollbarYRef:ee,scrollbarXRef:et,thumbYRef:er,thumbXRef:ea,rootId:T,hiddenState:G,setHiddenState:Z,overflowEdges:X,setOverflowEdges:K,viewportState:ew,overflowEdgeThreshold:{xStart:N,xEnd:C,yStart:E,yEnd:R}}),[eb,eg,ex,ep,em,V,Y,W,H,P,D,A,T,G,X,ew,N,C,E,R]);return(0,t.jsxs)(i.Provider,{value:eS,children:[!L&&u.styleDisableScrollbar.getElement(z),ej]})});var w=e.i(61362),k=e.i(33858);let j=r.createContext(void 0);var S=e.i(21023),N=e.i(91338),C=e.i(98934);let E=["--scroll-area-overflow-x-start","--scroll-area-overflow-x-end","--scroll-area-overflow-y-start","--scroll-area-overflow-y-end"],R=!1,T=r.forwardRef(function(e,s){let{render:i,className:c,style:f,...p}=e,{viewportRef:m,scrollbarYRef:b,scrollbarXRef:x,thumbYRef:g,thumbXRef:v,cornerRef:y,cornerSize:N,setCornerSize:T,setThumbSize:z,rootId:L,setHiddenState:A,hiddenState:$,setHasMeasuredScrollbar:P,handleScroll:O,touchModality:D,setHovering:B,setOverflowEdges:H,overflowEdgeThreshold:_,viewportState:W}=o(),U=(0,S.useDirection)(),V=r.useRef(!0),F=r.useRef([NaN,NaN,NaN,NaN]),Y=(0,n.useTimeout)(),q=(0,n.useTimeout)(),X=(0,a.useStableCallback)(()=>{var e;let t,r,a=m.current,n=b.current,s=x.current,i=g.current,o=v.current,l=y.current;if(!a)return;let u=a.scrollHeight,c=a.scrollWidth,f=a.clientHeight,h=a.clientWidth,p=a.scrollTop,w=a.scrollLeft,k=F.current,j=Number.isNaN(k[0]);if(k[0]=f,k[1]=u,k[2]=h,k[3]=c,j&&P(!0),0===u||0===c)return;let S=(t=(e=a).clientHeight>=e.scrollHeight,{y:t,x:r=e.clientWidth>=e.scrollWidth,corner:t||r}),R=S.y,L=S.x,$=h/c,O=f/u,D=Math.max(0,c-h),B=Math.max(0,u-f),W=0,V=0;L||(W=(0,C.normalizeScrollOffset)("rtl"===U?-w:w,D),V=D-W);let Y=R?0:(0,C.normalizeScrollOffset)(p,B),q=R?0:B-Y,X=L?0:h,K=R?0:f,G=0,Z=0;L||R||(G=n?.offsetWidth||0,Z=s?.offsetHeight||0);let Q=0===N.width&&0===N.height,J=Q?G:0,ee=Q?Z:0,et=d(s,"padding","x"),er=d(n,"padding","y"),ea=d(o,"margin","x"),en=d(i,"margin","y"),es=X-et-ea,ei=K-er-en,eo=s?Math.min(s.offsetWidth-J,es):es,el=n?Math.min(n.offsetHeight-ee,ei):ei,ed=Math.max(16,eo*$),eu=Math.max(16,el*O);if(z(e=>M(e,{width:ed,height:eu})),n&&i){let e=n.offsetHeight-eu-er-en,t=I(i,"--scroll-area-thumb-height",p,B,u,eu,e);i.style.transform=`translate3d(0,${t}px,0)`}if(s&&o){let e=s.offsetWidth-ed-et-ea,t=I(o,"--scroll-area-thumb-width","rtl"===U?-w:w,D,c,ed,e);o.style.transform=`translate3d(${"rtl"===U?-t:t}px,0,0)`}let ec=[W,V,Y,q];E.forEach((e,t)=>{a.style.setProperty(e,`${ec[t]}px`)}),l&&T(e=>M(e,{width:G,height:Z})),A(e=>M(e,S));let ef={xStart:!L&&W>_.xStart,xEnd:!L&&V>_.xEnd,yStart:!R&&Y>_.yStart,yEnd:!R&&q>_.yEnd};H(e=>M(e,ef))});function K(){V.current=!1}(0,w.useIsoLayoutEffect)(()=>{R||k.platform.engine.webkit||("u">typeof CSS&&"registerProperty"in CSS&&E.forEach(e=>{try{CSS.registerProperty({name:e,syntax:"<length>",inherits:!1,initialValue:"0px"})}catch{}}),R=!0)},[]),(0,w.useIsoLayoutEffect)(()=>{queueMicrotask(X)},[X,$,U,_.xStart,_.xEnd,_.yStart,_.yEnd]),(0,w.useIsoLayoutEffect)(()=>{m.current?.matches(":hover")&&B(!0)},[m,B]),(0,w.useIsoLayoutEffect)(()=>{let e=m.current;if("u"<typeof ResizeObserver||!e)return;let t=!1,r=new ResizeObserver(()=>{if(!t){t=!0;let r=F.current;if(r[0]===e.clientHeight&&r[1]===e.scrollHeight&&r[2]===e.clientWidth&&r[3]===e.scrollWidth)return}X()});return r.observe(e),q.start(0,()=>{let t=e.getAnimations({subtree:!0});0!==t.length&&Promise.allSettled(t.map(e=>e.finished)).then(X).catch(()=>{})}),()=>{r.disconnect(),q.clear()}},[X,m,q]);let G={role:"presentation",...L&&{"data-id":`${L}-viewport`},tabIndex:$.x&&$.y?-1:0,className:u.styleDisableScrollbar.className,style:{overflow:"scroll"},onScroll(){m.current&&(X(),(D||!V.current)&&O({x:m.current.scrollLeft,y:m.current.scrollTop}),Y.start(100,()=>{V.current=!0}))},onWheel:K,onPointerMove:K,onPointerEnter:K,onKeyDown:K},Z=(0,l.useRenderElement)("div",e,{ref:[s,m],state:W,props:[G,p],stateAttributesMapping:h}),Q=r.useMemo(()=>({computeThumbPosition:X}),[X]);return(0,t.jsx)(j.Provider,{value:Q,children:Z})});function M(e,t){for(let r in t)if(e[r]!==t[r])return t;return e}function I(e,t,r,a,n,s,i){let o=(0,N.clamp)(r,0,a),l=r-o,d=Math.max(16,s*n/(n+Math.abs(l)));return e.style.setProperty(t,l?`${d}px`:""),(a?o/a*i:0)+(l>0?s-d:0)}var z=e.i(78645);let L=r.createContext(void 0),A=r.forwardRef(function(e,a){let{render:n,className:s,orientation:i="vertical",keepMounted:u=!1,style:c,...f}=e,{hovering:m,scrollingX:b,scrollingY:x,hiddenState:g,scrollbarYRef:v,scrollbarXRef:y,viewportRef:w,thumbYRef:k,thumbXRef:j,handlePointerDown:N,handlePointerUp:C,handleScroll:E,disableViewportSnap:R,rootId:T,thumbSize:M,hasMeasuredScrollbar:I,viewportState:A}=o(),$="vertical"===i,P={...A,hovering:m,scrolling:$?x:b,orientation:i},O=(0,S.useDirection)(),D=!I&&!u,B=$?g.y:g.x,H=u||!B;r.useEffect(()=>{if(!H)return;let e=w.current,t=$?v.current:y.current;if(t)return(0,z.addEventListener)(t,"wheel",function(t){if(!e||t.ctrlKey)return;let r=!$,a=r?"scrollLeft":"scrollTop",n=r?t.deltaX:t.deltaY;if(0===n)return;let s=r?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight,i=r&&"rtl"===O?-s:0,o=r&&"rtl"===O?0:s,l=e[a];l<=i&&n<0||l>=o&&n>0||(t.preventDefault(),e[a]=Math.min(o,Math.max(i,l+n)),E({x:e.scrollLeft,y:e.scrollTop}))},{passive:!1})},[O,E,$,y,v,H,w]);let _={...T&&{"data-id":`${T}-scrollbar`},onPointerDown(e){if(0!==e.button)return;let t=(0,p.getTarget)(e.nativeEvent),r=$?k.current:j.current;if(r&&(0,p.contains)(r,t))return;let a=w.current;if(!a)return;let n=$?v.current:y.current;if(!r||!n)return;let s=$?"y":"x",i=d(r,"margin",s),o=d(n,"padding",s),l=$?r.offsetHeight:r.offsetWidth,u=n.getBoundingClientRect(),c=$?e.clientY-u.top-l/2-o+i/2:e.clientX-u.left-l/2-o+i/2,f=$?a.scrollHeight:a.scrollWidth,h=$?a.clientHeight:a.clientWidth,m=($?n.offsetHeight:n.offsetWidth)-l-o-i;if(m<=0)return;let b=c/m,x=f-h;R(),$?a.scrollTop=b*x:"rtl"===O?a.scrollLeft=-(1-b)*x:a.scrollLeft=b*x,E({x:a.scrollLeft,y:a.scrollTop}),N(e)},onPointerUp:C,onPointerCancel:C,style:{position:"absolute",touchAction:"none",WebkitUserSelect:"none",userSelect:"none",visibility:D?"hidden":void 0,...$?{top:0,bottom:"var(--scroll-area-corner-height)",insetInlineEnd:0,"--scroll-area-thumb-height":`${M.height}px`}:{insetInlineStart:0,insetInlineEnd:"var(--scroll-area-corner-width)",bottom:0,"--scroll-area-thumb-width":`${M.width}px`}}},W=(0,l.useRenderElement)("div",e,{ref:[a,$?v:y],state:P,props:[_,f],stateAttributesMapping:h});return H?(0,t.jsx)(L.Provider,{value:i,children:W}):null}),$=r.forwardRef(function(e,t){let{render:a,className:n,style:i,...d}=e,{computeThumbPosition:u}=function(){let e=r.useContext(j);if(void 0===e)throw Error((0,s.default)(55));return e}(),{hasMeasuredScrollbar:c,viewportState:f}=o(),p=r.useRef(null),m=r.useRef(c);return(0,w.useIsoLayoutEffect)(()=>{if("u"<typeof ResizeObserver)return;let e=!1,t=new ResizeObserver(()=>{(e||(e=!0,m.current))&&u()});return p.current&&t.observe(p.current),()=>{t.disconnect()}},[u]),(0,l.useRenderElement)("div",e,{ref:[t,p],state:f,stateAttributesMapping:h,props:[{role:"presentation",style:{minWidth:"fit-content"}},d]})}),P=r.forwardRef(function(e,t){let{render:a,className:n,style:i,...d}=e,{thumbYRef:u,thumbXRef:c,handlePointerDown:f,handlePointerMove:h,handlePointerUp:p,scrollingX:m,scrollingY:b,hasMeasuredScrollbar:x}=o(),g=function(){let e=r.useContext(L);if(void 0===e)throw Error((0,s.default)(54));return e}(),v="vertical"===g;return(0,l.useRenderElement)("div",e,{ref:[t,v?u:c],state:{scrolling:v?b:m,orientation:g},props:[{onPointerDown:f,onPointerMove:h,onPointerUp:p,onPointerCancel:p,style:{visibility:x?void 0:"hidden",...v?{height:"var(--scroll-area-thumb-height)"}:{width:"var(--scroll-area-thumb-width)"}}},d]})}),O=r.forwardRef(function(e,t){let{render:r,className:a,style:n,...s}=e,{cornerRef:i,cornerSize:d,hiddenState:u}=o(),c=(0,l.useRenderElement)("div",e,{ref:[t,i],props:[{style:{position:"absolute",bottom:0,insetInlineEnd:0,width:d.width,height:d.height}},s]});return u.corner?null:c});e.s(["Content",0,$,"Corner",0,O,"Root",0,y,"Scrollbar",0,A,"Thumb",0,P,"Viewport",0,T],55500);var D=e.i(55500),D=D,B=e.i(75157);function H({className:e,orientation:r="vertical",...a}){return(0,t.jsx)(D.Scrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":r,orientation:r,className:(0,B.cn)("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",e),...a,children:(0,t.jsx)(D.Thumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}e.s(["ScrollArea",0,function({className:e,children:r,...a}){return(0,t.jsxs)(D.Root,{"data-slot":"scroll-area",className:(0,B.cn)("relative",e),...a,children:[(0,t.jsx)(D.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:r}),(0,t.jsx)(H,{}),(0,t.jsx)(D.Corner,{})]})}],59684);var _=e.i(250),_=_;let W=(0,e.i(13496).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var U=e.i(98007),V=e.i(19455),F=e.i(46798);e.s(["CopyButton",0,function({value:e,label:a="Copy",size:n="xs",icon:s=W,className:i,children:o}){let[l,d]=(0,r.useState)("idle"),u=(0,r.useRef)(void 0);async function c(){try{await navigator.clipboard.writeText("function"==typeof e?e():e),d("copied")}catch{d("failed")}window.clearTimeout(u.current),u.current=window.setTimeout(()=>d("idle"),1600)}(0,r.useEffect)(()=>()=>window.clearTimeout(u.current),[]);let f="copied"===l?_.default:"failed"===l?U.X:s;return(0,t.jsxs)(F.Tooltip,{children:[(0,t.jsx)(F.TooltipTrigger,{render:(0,t.jsxs)(V.Button,{variant:"ghost",size:o?n:`icon-${n}`,onClick:c,"aria-label":a,className:(0,B.cn)("text-muted-foreground","copied"===l&&"text-emerald-600 dark:text-emerald-400","failed"===l&&"text-destructive",i),children:[(0,t.jsx)(f,{className:"size-3.5","aria-hidden":!0}),o]})}),(0,t.jsx)(F.TooltipContent,{children:"copied"===l?"Copied":"failed"===l?"Copy failed":a})]})}],34960)},84774,e=>{"use strict";var t=e.i(45650),r=e.i(75157);e.s(["Table",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,r.cn)("w-full caption-bottom text-sm",e),...a})})},"TableBody",0,function({className:e,...a}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,r.cn)("[&_tr:last-child]:border-0",e),...a})},"TableCell",0,function({className:e,...a}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,r.cn)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",e),...a})},"TableFooter",0,function({className:e,...a}){return(0,t.jsx)("tfoot",{"data-slot":"table-footer",className:(0,r.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a})},"TableHead",0,function({className:e,...a}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,r.cn)("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",e),...a})},"TableHeader",0,function({className:e,...a}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,r.cn)("[&_tr]:border-b",e),...a})},"TableRow",0,function({className:e,...a}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,r.cn)("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...a})}])},77572,e=>{"use strict";var t,r=e.i(45650);e.s([],25931),e.i(25931);var a=e.i(10364),n=e.i(25587),s=e.i(61362),i=e.i(19458),o=e.i(50403),l=e.i(6385),d=e.i(82420);let u=a.createContext(void 0);function c(){let e=a.useContext(u);if(void 0===e)throw Error((0,d.default)(64));return e}let f={tabActivationDirection:e=>({"data-activation-direction":e})};var h=e.i(51068),p=e.i(99389);let m=a.forwardRef(function(e,t){let{className:d,defaultValue:c=0,onValueChange:m,orientation:g="horizontal",render:v,value:y,style:w,...k}=e,j=void 0!==e.defaultValue,S=a.useRef([]),[N,C]=a.useState(()=>new Map),[E,R]=(0,n.useControlled)({controlled:y,default:c,name:"Tabs",state:"value"}),T=void 0!==y,[M,I]=a.useState(()=>new Map),z=a.useRef(void 0),L=a.useCallback(e=>b(M,e),[M]),[A,$]=a.useState(()=>({previousValue:E,tabActivationDirection:"none"})),{previousValue:P,tabActivationDirection:O}=A,D=O,B=!1;P!==E&&(D=x(P,E,g,M),B=null!=P&&null!=E&&null==L(E));let H=B?P:E,_=P!==H||O!==D;(0,s.useIsoLayoutEffect)(()=>{_&&$({previousValue:H,tabActivationDirection:D})},[H,_,D]);let W=(0,i.useStableCallback)((e,t)=>{t.activationDirection=x(E,e,g,M),m?.(e,t),t.isCanceled||R(e)}),U=(0,i.useStableCallback)((e,t)=>{m?.(e,(0,h.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),V=(0,i.useStableCallback)((e,t)=>(C(r=>{let a=new Map(r);return a.set(e,t),a}),()=>{C(r=>{if(r.get(e)!==t)return r;let a=new Map(r);return a.delete(e),a})})),F=a.useCallback(e=>N.get(e),[N]),Y=a.useCallback(e=>{for(let t of M.values())if(e===t.value)return t.id},[M]),q=a.useMemo(()=>({getTabElementBySelectedValue:L,getTabIdByPanelValue:Y,getTabPanelIdByValue:F,onValueChange:W,orientation:g,registerMountedTabPanel:V,setTabMap:I,tabActivationDirection:D,value:E}),[L,Y,F,W,g,V,I,D,E]),X=a.useMemo(()=>{for(let e of M.values())if(e.value===E)return e},[M,E]),K=a.useMemo(()=>{for(let e of M.values())if(!e.disabled)return e.value},[M]),G=a.useRef(!j),Z=a.useRef(c),Q=a.useRef(j),J=a.useRef(!1);(0,s.useIsoLayoutEffect)(()=>{if(T)return;function e(e,t){R(e),$({previousValue:e,tabActivationDirection:"none"}),U(e,t),G.current=!1}if(0===M.size){J.current&&null!==E&&!z.current?.isConnected&&e(null,p.REASONS.missing);return}J.current=!0,z.current=M.keys().next().value;let t=X?.disabled,r=null==X&&null!==E;if(t||E!==Z.current||(Q.current=!1),Q.current&&t&&E===Z.current)return;let a=G.current;if(t||r){let r=K??null;if(E===r){G.current=!1;return}let n=p.REASONS.missing;a?n=p.REASONS.initial:t&&(n=p.REASONS.disabled),e(r,n);return}a&&null!=X&&(U(E,p.REASONS.initial),G.current=!1)},[K,T,U,X,R,M,E]);let ee={orientation:g,tabActivationDirection:D},et=(0,o.useRenderElement)("div",e,{state:ee,ref:t,props:k,stateAttributesMapping:f});return(0,r.jsx)(u.Provider,{value:q,children:(0,r.jsx)(l.CompositeList,{elementsRef:S,children:et})})});function b(e,t){for(let[r,a]of e.entries())if(t===a.value)return r;return null}function x(e,t,r,a){if(null==e||null==t)return"none";let[n,s,i]="horizontal"===r?["left","left","right"]:["top","up","down"],o=b(a,e),l=b(a,t);if(null==o||null==l)return o!==l&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?t>e?i:s:"none";let d=o.getBoundingClientRect()[n],u=l.getBoundingClientRect()[n];return u<d?s:u>d?i:"none"}var g=e.i(52515),v=e.i(99281),y=e.i(45034),w=e.i(93901),k=e.i(1788),j=e.i(60857);let S=a.createContext(void 0);function N(){let e=a.useContext(S);if(void 0===e)throw Error((0,d.default)(65));return e}var C=e.i(29148);let E=a.forwardRef(function(e,t){let{className:r,disabled:n=!1,render:l,value:d,id:u,nativeButton:m=!0,style:b,...x}=e,{value:S,getTabPanelIdByValue:E,onValueChange:R,orientation:T,tabActivationDirection:M}=c(),{activateOnFocus:I,registerTabResizeObserverElement:z,tabsListElement:L}=N(),{highlightedIndex:A,onHighlightedIndexChange:$}=(0,j.useCompositeRootContext)(),P=(0,v.useBaseUiId)(u),O=a.useMemo(()=>({disabled:n,id:P,value:d}),[n,P,d]),{compositeProps:D,compositeRef:B,index:H}=(0,k.useCompositeItem)({metadata:O}),_=d===S,W=a.useRef(!1),U=a.useRef(null),V=(0,i.useStableCallback)(e=>{U.current?.(),U.current=e?z(e):null});(0,s.useIsoLayoutEffect)(()=>{if(W.current){W.current=!1;return}if(_&&H>-1&&A!==H){if(null!=L){let e=(0,C.activeElement)((0,g.ownerDocument)(L));if(e&&(0,C.contains)(L,e))return}n||$(H)}},[_,H,A,$,n,L]);let{getButtonProps:F,buttonRef:Y}=(0,y.useButton)({disabled:n,native:m,focusableWhenDisabled:!0}),q=E(d),X=a.useRef(!1),K=a.useRef(!1);function G(e){R(d,(0,h.createChangeEventDetails)(p.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))}return(0,o.useRenderElement)("button",e,{state:{disabled:n,active:_,orientation:T,tabActivationDirection:M},ref:[t,Y,B,V],props:[D,{role:"tab","aria-controls":q,"aria-selected":_,id:P,onClick:function(e){_||n||G(e)},onFocus:function(e){_||n||I&&(!X.current||K.current)&&G(e)},onPointerDown:function(e){if(_||n)return;X.current=!0,K.current=0===e.button;let t=(0,g.ownerDocument)(e.currentTarget);function r(){X.current=!1,K.current=!1,t.removeEventListener("pointerup",r),t.removeEventListener("pointercancel",r)}t.addEventListener("pointerup",r),t.addEventListener("pointercancel",r)},[w.ACTIVE_COMPOSITE_ITEM]:_?"":void 0,onKeyDownCapture(){W.current=!0}},x,F],stateAttributesMapping:f})});var R=e.i(16428),T=e.i(45549),M=e.i(53076);function I(){return M.NOOP}function z(){return!1}function L(){return!0}var A=e.i(63370);function $(e){let{script:t}=e,{nonce:a}=(0,A.useCSPContext)();return(0,T.useSyncExternalStore)(I,z,L)?(0,r.jsx)("script",{nonce:a,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}let P={...f,activeTabPosition:()=>null,activeTabSize:()=>null},O=a.forwardRef(function(e,n){let{className:s,render:i,renderBeforeHydration:l=!1,style:d,...u}=e,{getTabElementBySelectedValue:f,orientation:h,tabActivationDirection:p,value:m}=c(),{tabsListElement:b,registerIndicatorUpdateListener:x}=N(),g=function(){let[,e]=a.useState({});return a.useCallback(()=>{e({})},[])}();a.useEffect(()=>x(g),[x,g]);let v=0,y=0,w=0,k=0,j=0,S=0,C=!1;if(null!=m&&null!=b){let e=f(m);if(null!=e){C=!0;let{width:t,height:r}=(0,R.getCssDimensions)(e),{width:a,height:n}=(0,R.getCssDimensions)(b),s=e.getBoundingClientRect(),i=b.getBoundingClientRect(),o=a>0?i.width/a:1,l=n>0?i.height/n:1;if(o>Number.EPSILON&&l>Number.EPSILON){let e=s.left-i.left,t=s.top-i.top;v=e/o+b.scrollLeft-b.clientLeft,w=t/l+b.scrollTop-b.clientTop}else v=e.offsetLeft,w=e.offsetTop;j=t,S=r,y=b.scrollWidth-v-j,k=b.scrollHeight-w-S}}let E=C?{left:v,right:y,top:w,bottom:k}:null,T=C?{width:j,height:S}:null,M=C?{"--active-tab-left":`${v}px`,"--active-tab-right":`${y}px`,"--active-tab-top":`${w}px`,"--active-tab-bottom":`${k}px`,"--active-tab-width":`${j}px`,"--active-tab-height":`${S}px`}:void 0,I=C&&j>0&&S>0,z=(0,o.useRenderElement)("span",e,{state:{orientation:h,activeTabPosition:E,activeTabSize:T,tabActivationDirection:p},ref:n,props:[{role:"presentation",style:M,hidden:!I},u,{suppressHydrationWarning:!0}],stateAttributesMapping:P});return null==m?null:(0,r.jsxs)(a.Fragment,{children:[z,l&&(t||(t=(0,r.jsx)($,{script:""})))]})});var D=e.i(33262),B=e.i(53),H=e.i(11296),_=e.i(4678),W=e.i(68285);let U={...f,...B.transitionStatusMapping},V=a.forwardRef(function(e,t){let{className:r,value:n,render:i,keepMounted:l=!1,style:d,...u}=e,{value:f,getTabIdByPanelValue:h,orientation:p,tabActivationDirection:m,registerMountedTabPanel:b}=c(),x=(0,v.useBaseUiId)(),{ref:g,index:y}=(0,W.useCompositeListItem)(),w=n===f,{mounted:k,transitionStatus:j,setMounted:S}=(0,_.useTransitionStatus)(w),N=!k,C=h(n),E=a.useRef(null),R=(0,o.useRenderElement)("div",e,{state:{hidden:N,orientation:p,tabActivationDirection:m,transitionStatus:j},ref:[t,g,E],props:[{"aria-labelledby":C,hidden:N,id:x,role:"tabpanel",tabIndex:w?0:-1,inert:(0,D.inertValue)(!w),"data-index":y},u],stateAttributesMapping:U});return((0,H.useOpenChangeComplete)({open:w,ref:E,onComplete(){w||S(!1)}}),(0,s.useIsoLayoutEffect)(()=>{if(null!=x&&(!N||l))return b(n,x)},[N,l,n,x,b]),l||k)?R:null});var F=e.i(67149);let Y=a.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:o,loopFocus:l=!0,render:d,style:u,...h}=e,{orientation:p,setTabMap:m,tabActivationDirection:b}=c(),[x,g]=a.useState(0),[v,y]=a.useState(null),w=a.useRef(new Set),k=a.useRef(new Set),j=a.useRef(null);(0,s.useIsoLayoutEffect)(()=>{if("u"<typeof ResizeObserver)return;let e=new ResizeObserver(()=>{w.current.forEach(e=>{e()})});return j.current=e,v&&e.observe(v),k.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),j.current=null}},[v]);let N=(0,i.useStableCallback)(e=>(w.current.add(e),()=>{w.current.delete(e)})),C=(0,i.useStableCallback)(e=>(k.current.add(e),j.current?.observe(e),()=>{k.current.delete(e),j.current?.unobserve(e)})),E=a.useMemo(()=>({activateOnFocus:n,registerIndicatorUpdateListener:N,registerTabResizeObserverElement:C,tabsListElement:v}),[n,N,C,v]);return(0,r.jsx)(S.Provider,{value:E,children:(0,r.jsx)(F.CompositeRoot,{render:d,className:o,style:u,state:{orientation:p,tabActivationDirection:b},refs:[t,y],props:[{"aria-orientation":"vertical"===p?"vertical":void 0,role:"tablist"},h],stateAttributesMapping:f,highlightedIndex:x,enableHomeAndEndKeys:!0,loopFocus:l,orientation:p,onHighlightedIndexChange:g,onMapChange:m,disabledIndices:M.EMPTY_ARRAY})})});e.s(["Indicator",0,O,"List",0,Y,"Panel",0,V,"Root",0,m,"Tab",0,E],11037);var q=e.i(11037),q=q,X=e.i(94237),K=e.i(75157);let G=(0,X.cva)("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...a}){return(0,r.jsx)(q.Root,{"data-slot":"tabs","data-orientation":t,className:(0,K.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...a})},"TabsContent",0,function({className:e,...t}){return(0,r.jsx)(q.Panel,{"data-slot":"tabs-content",className:(0,K.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...a}){return(0,r.jsx)(q.List,{"data-slot":"tabs-list","data-variant":t,className:(0,K.cn)(G({variant:t}),e),...a})},"TabsTrigger",0,function({className:e,...t}){return(0,r.jsx)(q.Tab,{"data-slot":"tabs-trigger",className:(0,K.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],77572)},42526,e=>{"use strict";var t=e.i(10364),r=e.i(57864);function a(e,a){return[(0,r.useSearchParams)().get(e)??a,(0,t.useCallback)(t=>{let r=new URL(window.location.href);t===a?r.searchParams.delete(e):r.searchParams.set(e,t),window.history.replaceState(null,"",r)},[e,a])]}e.s(["useQueryParam",0,a,"useTabParam",0,function(e,t){let[r,n]=a("tab",t);return[e.includes(r)?r:t,n]}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,32735,51560,49537,e=>{"use strict";var t=e.i(13496);let r=(0,t.default)("keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);e.s(["Keyboard",0,r],32735);let s=(0,t.default)("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);e.s(["PanelLeft",0,s],51560);let n=(0,t.default)("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);e.s(["PanelLeftClose",0,n],49537)},28735,e=>{"use strict";var t=e.i(45650),r=e.i(10364),s=e.i(4253),n=e.i(57864),i=e.i(56248),o=e.i(32735),a=e.i(51560),l=e.i(49537),d=e.i(19455),c=e.i(76639),u=e.i(70962),h=e.i(46798),p=e.i(81795),x=e.i(75379),m=e.i(46816),f=e.i(48209),g=e.i(27195),v=e.i(29794),b=e.i(75157);let w="asv:toggle-sidebar",j="asv:open-shortcuts",y="asv-session-sidebar",k=new Set;function N(e){return k.add(e),window.addEventListener("storage",e),()=>{k.delete(e),window.removeEventListener("storage",e)}}function S(){try{return"0"!==localStorage.getItem(y)}catch{return!0}}let E=[{group:"Timeline",items:[[["/"],"Search events in this session"],[["f"],"Cycle the transcript view: normal, compact, focused"],[["o"],"Flip the order: oldest or newest first"],[["l"],"Follow the session live"],[["j","k"],"Move to the next or previous event"],[["Enter"],"Expand or collapse the selected event"],[["e","E"],"Expand or collapse every event"]]},{group:"Navigation",items:[[["b"],"Show or hide the session sidebar"],[["]","["],"Open the next or previous session"],[["⌘K"],"Search every session"],[["?"],"Show this list"]]}];function T({open:e,onOpenChange:r}){return(0,t.jsx)(c.Dialog,{open:e,onOpenChange:r,children:(0,t.jsxs)(c.DialogContent,{children:[(0,t.jsx)(c.DialogTitle,{children:"Keyboard shortcuts"}),(0,t.jsx)(c.DialogDescription,{children:"Available on any session page, outside text fields."}),E.map(({group:e,items:r})=>(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-1.5 text-[11px] uppercase tracking-wide text-muted-foreground",children:e}),(0,t.jsx)("dl",{className:"divide-y divide-border rounded-lg border border-border",children:r.map(([e,r])=>(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 px-3 py-1.5",children:[(0,t.jsx)("dt",{className:"text-xs text-foreground",children:r}),(0,t.jsx)("dd",{className:"flex shrink-0 gap-1",children:e.map(e=>(0,t.jsx)("kbd",{className:"min-w-5 rounded-sm border border-border bg-muted px-1.5 py-0.5 text-center font-mono text-[11px] text-muted-foreground",children:e},e))})]},r))})]},e))]})})}function C(e){let t=new URLSearchParams(window.location.search),r=new URLSearchParams;for(let e of["tab","mode"]){let s=t.get(e);s&&r.set(e,s)}let s=r.toString();return`/sessions/${e.provider}/${e.id}${s?`?${s}`:""}`}function L(e){return e.title??(0,x.firstLine)(e.name)??e.id}e.s(["SessionShell",0,function({children:e}){let o=(0,n.useRouter)(),a=(0,n.useParams)(),c=(0,r.useSyncExternalStore)(N,S,()=>!1),[E,$]=(0,r.useState)(!1),[M,z]=(0,r.useState)(!1),[P,K]=(0,r.useState)(null),[R,I]=(0,r.useState)(!1),[D,O]=(0,r.useState)(""),[A,B]=(0,r.useState)(!1),[F]=(0,g.useSessionSort)();function q(){if(window.matchMedia("(min-width: 1024px)").matches){var e=!S();try{localStorage.setItem(y,e?"1":"0")}catch{}k.forEach(e=>e())}else $(e=>!e)}(0,r.useEffect)(()=>{let e=!1;async function t(){try{let t=await fetch("/api/sessions");if(!t.ok)throw Error("Request failed");let r=await t.json();e||(K(r),I(!1))}catch{e||I(!0)}}t();let r=window.setInterval(()=>{document.hidden||t()},3e4);return()=>{e=!0,window.clearInterval(r)}},[]),(0,r.useEffect)(()=>{let e=()=>z(!0);return window.addEventListener(w,q),window.addEventListener(j,e),()=>{window.removeEventListener(w,q),window.removeEventListener(j,e)}},[]);let U=P?.find(e=>e.provider===a.provider&&e.id===a.id),H=U?.project,_=(0,r.useMemo)(()=>{let e=D.toLowerCase().split(/\s+/).filter(Boolean),t=(P??[]).filter(t=>{if(A&&H&&t.project!==H)return!1;if(0===e.length)return!0;let r=`${L(t)} ${t.project??""} ${t.branch??""} ${t.id}`.toLowerCase();return e.every(e=>r.includes(e))});return(0,g.sortSessions)(t,F)},[P,D,A,H,F]);function G(e){let t=_.findIndex(e=>e.provider===a.provider&&e.id===a.id),r=_[-1===t?0:t+e];r&&o.push(C(r))}(0,v.useHotkeys)({b:q,"?":()=>z(!0),"]":()=>G(1),"[":()=>G(-1)});let V=(0,r.useRef)(null),X=null!==P;return(0,r.useEffect)(()=>{V.current?.scrollIntoView({block:"nearest"})},[a.id,X,c,E,F]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:(0,b.cn)("flex min-h-full flex-1 flex-col",c&&"lg:pl-72"),children:e}),E&&(0,t.jsx)("div",{className:"fixed inset-0 z-40 bg-black/40 lg:hidden",onClick:()=>$(!1),"aria-hidden":!0}),(0,t.jsxs)("aside",{"aria-label":"Sessions",className:(0,b.cn)("fixed inset-y-0 left-0 z-40 w-72 flex-col border-r border-border bg-background",E?"flex":c?"hidden lg:flex":"hidden"),children:[(0,t.jsxs)("div",{className:"flex h-[var(--cv-topbar-h)] shrink-0 items-center gap-2 border-b border-border px-3",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Sessions"}),P&&(0,t.jsx)("span",{className:"text-xs tabular-nums text-muted-foreground",children:_.length===P.length?P.length:`${_.length} of ${P.length}`}),(0,t.jsx)(d.Button,{variant:"ghost",size:"icon-sm",onClick:q,"aria-label":"Hide session sidebar",className:"ml-auto text-muted-foreground",children:(0,t.jsx)(l.PanelLeftClose,{"aria-hidden":!0})})]}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5 border-b border-border p-2",children:[(0,t.jsx)(p.SearchInput,{value:D,onChange:O,size:"sm",placeholder:"Filter sessions…","aria-label":"Filter sessions",className:"min-w-0 flex-1"}),H&&(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{render:(0,t.jsx)(u.Toggle,{variant:"outline",size:"sm",pressed:A,onPressedChange:B,"aria-label":`Only sessions in ${H}`,className:"text-muted-foreground aria-pressed:border-foreground/25 aria-pressed:text-foreground",children:(0,t.jsx)(i.FolderGit2,{"aria-hidden":!0})})}),(0,t.jsxs)(h.TooltipContent,{children:["Only ",H]})]})]}),(0,t.jsxs)("nav",{className:"min-h-0 flex-1 overflow-y-auto p-1.5",children:[_.map(e=>{let r=e.provider===a.provider&&e.id===a.id,n=(0,f.isRunning)(e.updated_at);return(0,t.jsxs)(s.default,{ref:r?V:void 0,href:`/sessions/${e.provider}/${e.id}`,onClick:()=>$(!1),onNavigate:t=>{t.preventDefault(),o.push(C(e))},"aria-current":r?"page":void 0,className:(0,b.cn)("block rounded-md border-l-2 px-2.5 py-1.5 transition-colors focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring",r?"border-brand bg-muted":"border-transparent hover:bg-muted/60"),children:[(0,t.jsx)("span",{className:"line-clamp-2 break-words text-xs font-medium leading-snug text-foreground",children:L(e)}),(0,t.jsxs)("span",{className:"mt-0.5 flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[(0,t.jsx)("span",{className:(0,b.cn)("size-1.5 shrink-0 rounded-full",(0,m.providerStyle)(e.provider).dotCls),title:(0,m.providerStyle)(e.provider).label}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:e.project??e.repository??"—"}),(0,t.jsx)("span",{className:"ml-auto shrink-0 whitespace-nowrap",children:n?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 font-medium text-emerald-600 dark:text-emerald-400",children:[(0,t.jsx)("span",{className:"size-1.5 animate-pulse rounded-full bg-emerald-500","aria-hidden":!0}),"running"]}):(0,x.timeAgo)(e.updated_at)})]})]},`${e.provider}:${e.id}`)}),null===P&&(0,t.jsx)("p",{className:"px-2.5 py-3 text-xs text-muted-foreground",children:R?"The session list could not be loaded.":"Loading sessions…"}),null!==P&&0===_.length&&(0,t.jsx)("p",{className:"px-2.5 py-3 text-xs text-muted-foreground",children:"No sessions match."})]})]}),(0,t.jsx)(T,{open:M,onOpenChange:z})]})},"ShortcutsTrigger",0,function({className:e}){return(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{render:(0,t.jsx)(d.Button,{variant:"outline",size:"icon",onClick:()=>window.dispatchEvent(new Event(j)),"aria-label":"Keyboard shortcuts",className:(0,b.cn)("text-muted-foreground",e),children:(0,t.jsx)(o.Keyboard,{"aria-hidden":!0})})}),(0,t.jsx)(h.TooltipContent,{children:"Keyboard shortcuts (?)"})]})},"SidebarTrigger",0,function({className:e}){return(0,t.jsxs)(h.Tooltip,{children:[(0,t.jsx)(h.TooltipTrigger,{render:(0,t.jsx)(d.Button,{variant:"ghost",size:"icon",onClick:()=>window.dispatchEvent(new Event(w)),"aria-label":"Toggle session sidebar",className:(0,b.cn)("text-muted-foreground",e),children:(0,t.jsx)(a.PanelLeft,{"aria-hidden":!0})})}),(0,t.jsx)(h.TooltipContent,{children:"Session sidebar (b)"})]})}])},29794,e=>{"use strict";var t=e.i(10364);e.s(["useHotkeys",0,function(e){let r=(0,t.useRef)(e);(0,t.useEffect)(()=>{r.current=e}),(0,t.useEffect)(()=>{function e(e){if(e.metaKey||e.ctrlKey||e.altKey||e.defaultPrevented)return;let t=e.target,s=t?.tagName;if("INPUT"===s||"TEXTAREA"===s||"SELECT"===s||t?.isContentEditable||document.querySelector('[data-slot="dialog-content"]'))return;let n=r.current[e.key];n&&(e.preventDefault(),n())}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[])}])}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,4864,38419,94020,71696,46706,72033,87900,29549,e=>{"use strict";var t=e.i(80269),r=e.i(25804),n=e.i(61362),l=e.i(17975),o=e.i(47385),s=e.i(80553),i=e.i(57238);e.s(["useFloatingRootContext",0,function(e){let{open:a=!1,onOpenChange:u,elements:c={}}=e,d=(0,r.useId)(),f=null!=(0,s.useFloatingParentNodeId)(),p=(0,l.useRefWithInit)(()=>new i.FloatingRootStore({open:a,transitionStatus:void 0,onOpenChange:u,referenceElement:c.reference??null,floatingElement:c.floating??null,triggerElements:new o.PopupTriggerMap,floatingId:d,syncOnly:!1,nested:f})).current;return(0,n.useIsoLayoutEffect)(()=>{let e={open:a,floatingId:d};void 0!==c.reference&&(e.referenceElement=c.reference,e.domReferenceElement=(0,t.isElement)(c.reference)?c.reference:null),void 0!==c.floating&&(e.floatingElement=c.floating),p.update(e)},[a,d,c.reference,c.floating,p]),p.context.onOpenChange=u,p.context.nested=f,p}],4864);var a=e.i(10364),u=e.i(99124),c=e.i(52515),d=e.i(19458),f=e.i(46230),p=e.i(33858),g=e.i(51068),m=e.i(99389),h=e.i(76553),v=e.i(26206),x=e.i(29148),b=e.i(17049),S=e.i(2283),y=e.i(38810);function E(e){return p.platform.engine.webkit&&0===e.movementX&&0===e.movementY}function R(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function C(e,t){return R(t,e===v.ARROW_UP||e===v.ARROW_DOWN,e===v.ARROW_LEFT||e===v.ARROW_RIGHT)}function w(e,t,r){return R(t,e===v.ARROW_DOWN,r?e===v.ARROW_LEFT:e===v.ARROW_RIGHT)||"Enter"===e||" "===e||""===e}e.s(["useListNavigation",0,function(e,r){let{listRef:l,activeIndex:o,onNavigate:i=()=>{},enabled:p=!0,selectedIndex:I=null,allowEscape:k=!1,loopFocus:M=!1,nested:A=!1,rtl:T=!1,virtual:L=!1,focusItemOnOpen:O="auto",focusItemOnHover:N=!0,openOnArrowKeyDown:j=!0,disabledIndices:P,orientation:D="vertical",parentOrientation:_,id:V,resetOnPointerLeave:z=!0,externalTree:F,grid:H}=r,W=null!=H,$="rootStore"in e?e.rootStore:e,U=$.useState("open"),B=$.useState("floatingElement"),q=$.useState("domReferenceElement"),Y=$.context.dataRef,G=(0,b.getFloatingFocusElement)(B),K=(0,b.isTypeableCombobox)(q),X=(0,f.useValueAsRef)(G),J=(0,s.useFloatingParentNodeId)(),Q=(0,s.useFloatingTree)(F),Z=a.useRef(O),ee=a.useRef(I??-1),et=a.useRef(null),er=a.useRef(!0),en=(0,d.useStableCallback)(e=>{i(-1===ee.current?null:ee.current,e)}),el=a.useRef(!!B),eo=a.useRef(U),es=a.useRef(!1),ei=a.useRef(!1),ea=a.useRef(null),eu=(0,f.useValueAsRef)(P),ec=(0,f.useValueAsRef)(U),ed=(0,f.useValueAsRef)(I),ef=(0,f.useValueAsRef)(z),ep=(0,u.useAnimationFrame)(),eg=(0,u.useAnimationFrame)(),em=(0,d.useStableCallback)(()=>{function e(e){L?Q?.events.emit("virtualfocus",e):ea.current=(0,S.enqueueFocus)(e,{sync:es.current,preventScroll:!0})}let t=l.current[ee.current],r=ei.current;t&&e(t),(es.current?e=>e():e=>ep.request(e))(()=>{let n=l.current[ee.current]||t;!n||(t||e(n),ey&&(r||!er.current)&&n.scrollIntoView?.({block:"nearest",inline:"nearest"}))})});(0,n.useIsoLayoutEffect)(()=>{Y.current.orientation=D},[Y,D]),(0,n.useIsoLayoutEffect)(()=>{p&&(U&&B?(ee.current=I??-1,Z.current&&null!=I&&(ei.current=!0,en())):el.current&&(ee.current=-1,en()))},[p,U,B,I,en]),(0,n.useIsoLayoutEffect)(()=>{if(p){if(!U){es.current=!1;return}if(B)if(null==o){if(es.current=!1,null!=ed.current)return;if(el.current&&(ee.current=-1,em()),(!eo.current||!el.current)&&Z.current&&(null!=et.current||!0===Z.current&&null==et.current)){let e=0,t=()=>{null==l.current[0]?(e<2&&(e?e=>eg.request(e):queueMicrotask)(t),e+=1):(ee.current=null==et.current||w(et.current,D,T)||A?(0,h.getMinListIndex)(l):(0,h.getMaxListIndex)(l),et.current=null,en())};t()}}else(0,h.isIndexOutOfListBounds)(l.current,o)||(ee.current=o,em(),ei.current=!1)}},[p,U,B,o,ed,A,l,D,T,en,em,eg]),(0,n.useIsoLayoutEffect)(()=>{if(!p||B||!Q||L||!el.current)return;let e=Q.nodesRef.current,t=e.find(e=>e.id===J)?.context?.elements.floating,r=(0,x.activeElement)((0,c.ownerDocument)(q??t??null)),n=e.some(e=>e.context&&(0,x.contains)(e.context.elements.floating,r));t&&!n&&er.current&&t.focus({preventScroll:!0})},[p,B,q,Q,J,L]),(0,n.useIsoLayoutEffect)(()=>{eo.current=U,el.current=!!B}),(0,n.useIsoLayoutEffect)(()=>{U||(et.current=null,Z.current=O)},[U,O]);let eh=null!=o,ev=(0,d.useStableCallback)(e=>{if(!ec.current)return;let t=l.current.indexOf(e.currentTarget);-1!==t&&(ee.current!==t||o!==t)&&(ee.current=t,en(e))}),ex=(0,d.useStableCallback)(()=>_??Q?.nodesRef.current.find(e=>e.id===J)?.context?.dataRef?.current.orientation),eb=(0,d.useStableCallback)(()=>(0,h.getMinListIndex)(l,eu.current)),eS=(0,d.useStableCallback)(e=>{var r;let n,o;if(er.current=!1,es.current=!0,229===e.which||!ec.current&&e.currentTarget===X.current)return;if(A&&(r=e.key,n=T?r===v.ARROW_RIGHT:r===v.ARROW_LEFT,o=r===v.ARROW_UP,"both"===D||"horizontal"===D&&W?"Escape"===r:R(D,n,o))){C(e.key,ex())||(0,y.stopEvent)(e),$.setOpen(!1,(0,g.createChangeEventDetails)(m.REASONS.listNavigation,e.nativeEvent)),(0,t.isHTMLElement)(q)&&(L?Q?.events.emit("virtualfocus",q):q.focus());return}let s=ee.current,i=(0,h.getMinListIndex)(l,P),a=(0,h.getMaxListIndex)(l,P);if(K||("Home"===e.key&&((0,y.stopEvent)(e),ee.current=i,en(e)),"End"===e.key&&((0,y.stopEvent)(e),ee.current=a,en(e))),null!=H){let t=H(e,ee.current,l,D,M,T,P,i,a);if(null!=t&&(ee.current=t,en(e)),"both"===D)return}if(C(e.key,D)){if((0,y.stopEvent)(e),U&&!L&&(0,x.activeElement)(e.currentTarget.ownerDocument)===e.currentTarget){ee.current=w(e.key,D,T)?i:a,en(e);return}w(e.key,D,T)?M?s>=a?k&&s!==l.current.length?ee.current=-1:(es.current=!1,ee.current=i):ee.current=(0,h.findNonDisabledListIndex)(l.current,{startingIndex:s,disabledIndices:P}):ee.current=Math.min(a,(0,h.findNonDisabledListIndex)(l.current,{startingIndex:s,disabledIndices:P})):M?s<=i?k&&-1!==s?ee.current=l.current.length:(es.current=!1,ee.current=a):ee.current=(0,h.findNonDisabledListIndex)(l.current,{startingIndex:s,decrement:!0,disabledIndices:P}):ee.current=Math.max(i,(0,h.findNonDisabledListIndex)(l.current,{startingIndex:s,decrement:!0,disabledIndices:P})),(0,h.isIndexOutOfListBounds)(l.current,ee.current)&&(ee.current=-1),en(e)}}),ey=a.useMemo(()=>({onFocus(e){es.current=!0,ev(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){!E(e)&&(es.current=!0,ei.current=!1,N&&ev(e))},onPointerLeave(e){if(!ec.current||!er.current||"touch"===e.pointerType)return;es.current=!0;let t=e.relatedTarget;if(!(!N||l.current.includes(t))&&ef.current&&(ea.current?.(),ea.current=null,ee.current=-1,en(e),!L)){let e=X.current,t=(0,x.activeElement)((0,c.ownerDocument)(e));e&&(0,x.contains)(e,t)&&e.focus({preventScroll:!0})}}}),[ev,ec,X,N,l,en,ef,L]),eE=a.useMemo(()=>L&&U&&eh&&{"aria-activedescendant":`${V}-${o}`},[L,U,eh,V,o]),eR=a.useMemo(()=>({"aria-orientation":"both"===D?void 0:D,...!K?eE:{},onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&U&&!L){let r=(0,x.getTarget)(e.nativeEvent);if(r&&!(0,x.contains)(X.current,r))return;(0,y.stopEvent)(e),$.setOpen(!1,(0,g.createChangeEventDetails)(m.REASONS.focusOut,e.nativeEvent)),(0,t.isHTMLElement)(q)&&q.focus();return}eS(e)},onPointerMove(e){E(e)||(er.current=!0)}}),[eE,eS,X,D,K,$,U,L,q]),eC=a.useMemo(()=>{function e(e){$.setOpen(!0,(0,g.createChangeEventDetails)(m.REASONS.listNavigation,e.nativeEvent,e.currentTarget))}function t(e){"auto"===O&&(0,y.isVirtualClick)(e.nativeEvent)&&(Z.current=!L)}function r(e){Z.current=O,"auto"===O&&(0,y.isVirtualPointerEvent)(e.nativeEvent)&&(Z.current=!0)}return{onKeyDown(t){var r,n;let l=$.select("open");er.current=!1;let o=t.key.startsWith("Arrow"),s=(r=t.key,n=ex(),R(n,T?r===v.ARROW_LEFT:r===v.ARROW_RIGHT,r===v.ARROW_DOWN)),i=C(t.key,D),a=(A?s:i)||"Enter"===t.key||""===t.key.trim();if(L&&l)return eS(t);if(l||j||!o){if(a){let e=C(t.key,ex());et.current=A&&e?null:t.key}if(A){s&&((0,y.stopEvent)(t),l?(ee.current=eb(),en(t)):e(t));return}i&&(null!=ed.current&&(ee.current=ed.current),(0,y.stopEvent)(t),!l&&j?e(t):eS(t),l&&en(t))}},onFocus(e){$.select("open")&&!L&&(ee.current=-1,en(e))},onPointerDown:r,onPointerEnter:r,onMouseDown:t,onClick:t}},[eS,O,eb,A,en,$,j,D,ex,T,ed,L]),ew=a.useMemo(()=>({...eE,...eC}),[eE,eC]);return a.useMemo(()=>p?{reference:ew,floating:eR,item:ey,trigger:eC}:{},[p,ew,eR,eC,ey])}],38419);var I=e.i(2304),k=e.i(53076);e.s(["useTypeahead",0,function(e,t){let{listRef:r,elementsRef:l,activeIndex:o,onMatch:s,disabledIndices:i,onTyping:u,enabled:c=!0,resetMs:f=750,selectedIndex:p=null}=t,g="rootStore"in e?e.rootStore:e,m=g.useState("open"),v=(0,I.useTimeout)(),b=a.useRef(""),S=a.useRef(p??o??-1),E=a.useRef(null),R=(0,d.useStableCallback)(e=>{function t(e){let t=l?.current[e];return!(t&&!(0,h.isElementVisible)(t)||t?.matches(":disabled"))&&(null==i||!(0,h.isListIndexDisabled)(k.EMPTY_ARRAY,e,i))}function n(e,r,l=0){if(0===e.length)return -1;let o=(l%e.length+e.length)%e.length,s=r.toLowerCase();for(let r=0;r<e.length;r+=1){let n=(o+r)%e.length,l=e[n];if(l?.toLowerCase().startsWith(s)&&t(n))return n}return -1}let a=r.current;if(b.current.length>0&&" "===e.key&&((0,y.stopEvent)(e),u?.(!0)),b.current.length>0&&" "!==b.current[0]&&-1===n(a,b.current)&&" "!==e.key&&u?.(!1),null==a||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;m&&" "!==e.key&&((0,y.stopEvent)(e),u?.(!0));let c=""===b.current;c&&(S.current=p??o??-1),a.every((e,r)=>!(e&&t(r))||e[0]?.toLowerCase()!==e[1]?.toLowerCase())&&b.current===e.key&&(b.current="",S.current=E.current),b.current+=e.key,v.start(f,()=>{b.current="",S.current=E.current,u?.(!1)});let d=c?p??o??-1:S.current,g=n(a,b.current,(d??0)+1);-1!==g?(s?.(g),E.current=g):" "!==e.key&&(b.current="",u?.(!1))}),C=(0,d.useStableCallback)(e=>{let t=e.relatedTarget,r=g.select("domReferenceElement"),n=g.select("floatingElement");(0,x.contains)(r,t)||(0,x.contains)(n,t)||(v.clear(),b.current="",S.current=E.current,u?.(!1))});(0,n.useIsoLayoutEffect)(()=>{(m||null===p)&&(v.clear(),E.current=null,""!==b.current&&(b.current=""))},[m,p,v]);let w=a.useMemo(()=>({onKeyDown:R,onBlur:C}),[R,C]);return a.useMemo(()=>c?{reference:w,floating:w}:{},[c,w])}],94020);var M=e.i(82420);let A=a.createContext(null);function T(e,t,r){return null==e||null==t?Object.is(e,t):r(e,t)}function L(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}e.s(["SelectRootContext",0,A,"useSelectRootContext",0,function(){let e=a.useContext(A);if(null===e)throw Error((0,M.default)(60));return e}],71696),e.s(["compareItemEquality",0,T,"defaultItemEquality",0,(e,t)=>Object.is(e,t),"findItemIndex",0,function(e,t,r){return e&&0!==e.length?e.findIndex(e=>void 0!==e&&T(e,t,r)):-1},"removeItem",0,function(e,t,r){return e.filter(e=>!T(t,e,r))}],46706);var O=e.i(45650);function N(e){return null!=e&&e.length>0&&"object"==typeof e[0]&&null!=e[0]&&"items"in e[0]}function j(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(N(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1}function P(e,t){if(t&&null!=e)return t(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return L(e)}function D(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?L(e.value):L(e)}function _(e,t,r){if(r&&null!=e)return r(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return t[e]??P(e,r);if(Array.isArray(t)){let n=N(t)?t.flatMap(e=>e.items):t;if(null==e||"object"!=typeof e){let t=n.find(t=>t.value===e);return t&&null!=t.label?t.label:P(e,r)}if("value"in e){let t=n.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return P(e,r)}e.s(["hasNullItemLabel",0,j,"resolveMultipleLabels",0,function(e,t,r){return e.reduce((e,n,l)=>(l>0&&e.push(", "),e.push((0,O.jsx)(a.Fragment,{children:_(n,t,r)},l)),e),[])},"resolveSelectedLabel",0,_,"stringifyAsLabel",0,P,"stringifyAsValue",0,D],72033),e.s(["selectors",0,{id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:r,itemToStringValue:n}=e;return null!=t&&(r&&Array.isArray(t)?t.length>0:""!==D(t,n))},hasNullItemLabel:(e,t)=>!!t&&j(e.items),open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let r=e.isItemEqualToValue,n=e.value;return e.multiple?Array.isArray(n)&&n.some(e=>T(t,e,r)):T(t,n,r)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows}],87900),e.s(["areArraysEqual",0,function(e,t,r=(e,t)=>e===t){return e.length===t.length&&e.every((e,n)=>r(e,t[n]))}],29549)},93901,e=>{"use strict";e.s(["ACTIVE_COMPOSITE_ITEM",0,"data-composite-item-active"])},6385,e=>{"use strict";var t=e.i(10364),r=e.i(17975),n=e.i(19458),l=e.i(61362),o=e.i(19206),s=e.i(45650);function i(){return new Map}function a(){return new Set}function u(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}e.s(["CompositeList",0,function(e){let{children:c,elementsRef:d,labelsRef:f,onMapChange:p}=e,g=(0,n.useStableCallback)(p),[,m]=t.useState(!1),h=(0,r.useRefWithInit)(a).current,v=(0,r.useRefWithInit)(i).current,x=t.useRef(0),b=t.useRef(!0),S=t.useRef([]),y=t.useRef(null),E=(0,n.useStableCallback)(()=>{b.current||(b.current=!0,m(e=>!e))}),R=(0,n.useStableCallback)((e,t)=>{v.set(e,t),E()}),C=(0,n.useStableCallback)(e=>{v.delete(e),E()}),w=(0,n.useStableCallback)(e=>{let t=new Map;return d.current.length=0,f&&(f.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),d.current[e.index]=e.element,f&&(f.current[e.index]=void 0!==e.registration.label?e.registration.label:e.registration.textRef?.current?.textContent??e.element.textContent)}),x.current=d.current.length,t}),I=(0,n.useStableCallback)(()=>{var e;let t,r,n,l,[o,s]=(e=v,t=new Set,r=[],n=[],e.forEach((e,l)=>{if(!l.isConnected)return;let o=e.index,s={index:o??-1,element:l,registration:e};null===o?n.push(s):o>=0&&(t.add(o),r.push(s))}),l=0,n.sort((e,t)=>u(e.element,t.element)),n.forEach(e=>{for(;t.has(l);)l+=1;e.index=l,r.push(e),l+=1}),t.size>0&&r.sort((e,t)=>e.index-t.index),[r,n.map(e=>e.element)]),i=w(o);!function(e){if(y.current?.disconnect(),y.current=null,"function"!=typeof MutationObserver||e.length<2)return;let t=new MutationObserver(r=>{if(!function(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}(r))return;let n=null;for(let r of e)if(r.isConnected){if(n&&u(n,r)>0){t.disconnect(),E();return}n=r}});y.current=t;let r=new Set;for(let t=1;t<e.length;t+=1){let n=function(e,t){let r=e.parentElement;for(;r&&!r.contains(t);)r=r.parentElement;return r}(e[t-1],e[t]);n&&r.add(n)}r.forEach(e=>t.observe(e,{childList:!0}))}(s),S.current=o,b.current=!1,h.forEach(e=>e(i)),g(i)});(0,l.useIsoLayoutEffect)(()=>(b.current||w(S.current),()=>{d.current=[],f&&(f.current=[])}),[d,f,w]),(0,l.useIsoLayoutEffect)(()=>{b.current&&I()}),(0,l.useIsoLayoutEffect)(()=>()=>{y.current?.disconnect(),b.current=!0},[]);let k=(0,n.useStableCallback)(e=>(h.add(e),()=>{h.delete(e)})),M=t.useMemo(()=>({register:R,unregister:C,subscribeMapChange:k,nextIndexRef:x}),[R,C,k,x]);return(0,s.jsx)(o.CompositeListContext.Provider,{value:M,children:c})}])},67149,e=>{"use strict";var t=e.i(10364),r=e.i(53076),n=e.i(6385),l=e.i(54130),o=e.i(19458),s=e.i(49939),i=e.i(61362),a=e.i(35987),u=e.i(76553),c=e.i(93901),d=e.i(29148);let f=[];var p=e.i(60857),g=e.i(50403),m=e.i(21023),h=e.i(45650);e.s(["CompositeRoot",0,function(e){let{render:v,className:x,style:b,refs:S=r.EMPTY_ARRAY,props:y=r.EMPTY_ARRAY,state:E=r.EMPTY_OBJECT,stateAttributesMapping:R,highlightedIndex:C,onHighlightedIndexChange:w,orientation:I,grid:k,loopFocus:M,onLoop:A,enableHomeAndEndKeys:T,onMapChange:L,stopEventPropagation:O=!0,rootRef:N,disabledIndices:j,modifierKeys:P,highlightItemOnHover:D=!1,tag:_="div",...V}=e,{props:z,highlightedIndex:F,onHighlightedIndexChange:H,elementsRef:W,onMapChange:$,relayKeyboardEvent:U}=function(e){let{loopFocus:r=!0,orientation:n="both",grid:p,onLoop:g,direction:m,highlightedIndex:h,onHighlightedIndexChange:v,rootRef:x,enableHomeAndEndKeys:b=!1,stopEventPropagation:S,disabledIndices:y,modifierKeys:E=f}=e,[R,C]=t.useState(0),w=null!=p,I=t.useRef(null),k=(0,s.useMergedRefs)(I,x),M=t.useRef([]),A=t.useRef(!1),T=h??R,L=(0,o.useStableCallback)((e,t=!1)=>{if((v??C)(e),t){let t=M.current[e];(0,a.scrollIntoViewIfNeeded)(I.current,t,m,n)}}),O=(0,o.useStableCallback)(e=>{if(0===e.size||A.current)return;A.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(c.ACTIVE_COMPOSITE_ITEM))??null,l=r?e.get(r)?.index??-1:-1;if(-1!==l)L(l);else if((0,u.isListIndexDisabled)(t,T,y)){let e=(0,u.findNonDisabledListIndex)(t,{disabledIndices:y});(0,u.isIndexOutOfListBounds)(t,e)||L(e)}(0,a.scrollIntoViewIfNeeded)(I.current,r,m,n)});(0,i.useIsoLayoutEffect)(()=>{if(null==y||null!=h||!A.current)return;let e=M.current;if((0,u.isListIndexDisabled)(e,T,y)){let t=(0,u.findNonDisabledListIndex)(e,{disabledIndices:y});(0,u.isIndexOutOfListBounds)(e,t)||L(t)}},[y,h,T,M,L]);let N=(0,o.useStableCallback)((e,t,r)=>g?g(e,t,r,M):r),j=(0,o.useStableCallback)(e=>{let t=e.key===a.HOME||e.key===a.END;if(!a.COMPOSITE_KEYS.has(e.key)||!b&&t||function(e,t){for(let r of a.MODIFIER_KEYS)if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}(e,E)||!I.current)return;let o="rtl"===m,s=o?a.ARROW_LEFT:a.ARROW_RIGHT,i=o?a.ARROW_RIGHT:a.ARROW_LEFT,c="vertical"===n?a.ARROW_DOWN:s,f="vertical"===n?a.ARROW_UP:i,h=(0,d.getTarget)(e.nativeEvent);if(null!=h&&(0,a.isNativeInput)(h)&&!(0,l.isElementDisabled)(h)){let t=h.selectionStart,r=h.selectionEnd,n=h.value;if(null==t||e.shiftKey||t!==r||e.key!==f&&t<n.length||e.key!==c&&t>0)return}let v=T,x=(0,u.getMinListIndex)(M,y),R=(0,u.getMaxListIndex)(M,y);null!=p&&(v=p({disabledIndices:y,elementsRef:M,event:e,highlightedIndex:T,loopFocus:r,maxIndex:R,minIndex:x,onLoop:N,orientation:n,rtl:o}));let C="vertical"!==n&&e.key===s||"horizontal"!==n&&e.key===a.ARROW_DOWN,k="vertical"!==n&&e.key===i||"horizontal"!==n&&e.key===a.ARROW_UP;b&&(e.key===a.HOME?v=x:e.key===a.END&&(v=R)),v===T&&(C||k)&&(r&&v===R&&C?(v=x,g&&(v=g(e,T,v,M))):r&&v===x&&k?(v=R,g&&(v=g(e,T,v,M))):v=(0,u.findNonDisabledListIndex)(M.current,{startingIndex:v,decrement:k,disabledIndices:y})),v===T||(0,u.isIndexOutOfListBounds)(M.current,v)||(S&&e.stopPropagation(),(w||t||C||k)&&e.preventDefault(),L(v,!0),queueMicrotask(()=>{M.current[v]?.focus()}))});return{props:{ref:k,onFocus(e){let t=I.current,r=(0,d.getTarget)(e.nativeEvent);t&&null!=r&&(0,a.isNativeInput)(r)&&r.setSelectionRange(0,r.value.length)},onKeyDown:j},highlightedIndex:T,onHighlightedIndexChange:L,elementsRef:M,onMapChange:O,relayKeyboardEvent:j}}({grid:k,loopFocus:M,onLoop:A,orientation:I,highlightedIndex:C,onHighlightedIndexChange:w,rootRef:N,stopEventPropagation:O,enableHomeAndEndKeys:T,direction:(0,m.useDirection)(),disabledIndices:j,modifierKeys:P}),B=(0,g.useRenderElement)(_,e,{state:E,ref:S,props:[z,...y,V],stateAttributesMapping:R}),q=t.useMemo(()=>({highlightedIndex:F,onHighlightedIndexChange:H,highlightItemOnHover:D,relayKeyboardEvent:U}),[F,H,D,U]);return(0,h.jsx)(p.CompositeRootContext.Provider,{value:q,children:(0,h.jsx)(n.CompositeList,{elementsRef:W,onMapChange:e=>{L?.(e),$(e)},children:B})})}],67149)},63370,e=>{"use strict";e.i(97222);var t=e.i(10364);let r=t.createContext(void 0),n={disableStyleElements:!1};e.s(["useCSPContext",0,function(){return t.useContext(r)??n}])},90741,98689,98464,e=>{"use strict";e.i(10570);var t=e.i(2405),r=e.i(23755),n=e.i(7120),l=e.i(86135),o=e.i(61535),s=e.i(10907),i=e.i(76044),a=e.i(57675),u=e.i(10364),c=e.i(10242),d=e.i(78645),f=e.i(33858),p=e.i(19458),g=e.i(52515),m=e.i(79995),h=e.i(61362),v=e.i(68947),x=e.i(99124),b=e.i(45237),S=e.i(25339),y=e.i(71696),E=e.i(72343),R=e.i(73793),C=e.i(96100),w=e.i(53),I=e.i(11296),k=e.i(50403),M=e.i(87900),A=e.i(63741),T=e.i(51068),L=e.i(99389),O=e.i(92975),N=e.i(35987),j=e.i(51131),P=e.i(91338),D=e.i(98934),_=e.i(63370),V=e.i(21023),z=e.i(45650);let F={...E.popupStateMapping,...w.transitionStatusMapping},H=u.forwardRef(function(e,t){let{render:r,className:n,style:l,finalFocus:o,...s}=e,{store:i,popupRef:a,onOpenChangeComplete:c,setOpen:S,valueRef:E,firstItemTextRef:w,selectedItemTextRef:H,multiple:Y,handleScrollArrowVisibility:G,scrollHandlerRef:K,listRef:X,highlightItemOnHover:J,floatingContext:Q}=(0,y.useSelectRootContext)(),{side:Z,align:ee,alignItemWithTriggerActive:et,isPositioned:er,setControlledAlignItemWithTrigger:en}=(0,R.useSelectPositionerContext)(),el=null!=(0,O.useToolbarRootContext)(!0),eo=(0,V.useDirection)(),{nonce:es,disableStyleElements:ei}=(0,_.useCSPContext)(),ea=(0,v.useStore)(i,M.selectors.id),eu=(0,v.useStore)(i,M.selectors.open),ec=(0,v.useStore)(i,M.selectors.openMethod),ed=(0,v.useStore)(i,M.selectors.mounted),ef=(0,v.useStore)(i,M.selectors.popupProps),ep=(0,v.useStore)(i,M.selectors.transitionStatus),eg=(0,v.useStore)(i,M.selectors.triggerElement),em=(0,v.useStore)(i,M.selectors.positionerElement),eh=(0,v.useStore)(i,M.selectors.listElement),ev=u.useRef(!1),ex=u.useRef(!1),eb=u.useRef({}),eS=(0,x.useAnimationFrame)(),ey=(0,p.useStableCallback)(e=>{var t;if(!em||!a.current||!ex.current)return;let r="0px"===em.style.top,n="0px"===em.style.bottom;if(ev.current||!et||!r&&!n)return void G(e);let l=U(em),o=(t=em.getBoundingClientRect().height,t/l.y),s=(0,g.ownerDocument)(em),i=(0,m.ownerWindow)(em),u=i.getComputedStyle(em),c=parseFloat(u.marginTop),d=parseFloat(u.marginBottom),f=W(i.getComputedStyle(a.current)),p=Math.min(s.documentElement.clientHeight-c-d,f),h=e.scrollTop,v=$(e),x=null,b=e=>{em.style.height=`${e}px`},S=r?v-h:h,y=Math.min(o+S,p);if(S<=D.SCROLL_EDGE_TOLERANCE_PX){let t=(0,P.clamp)(S,0,p-o);t>0&&b(o+t),e.scrollTop=r?v:0,p-(o+t)<=D.SCROLL_EDGE_TOLERANCE_PX&&(ev.current=!0),G(e);return}if(p-y>D.SCROLL_EDGE_TOLERANCE_PX)x=r?1/0:0;else if(n&&h<v){let e=o+S-p;x=h-(S-e)}let E=Math.ceil(y);if(0!==E&&b(E),null!=x){let t=(0,P.clamp)(x,0,$(e));Math.abs(e.scrollTop-t)>D.SCROLL_EDGE_TOLERANCE_PX&&(e.scrollTop=t)}E>=p-D.SCROLL_EDGE_TOLERANCE_PX&&(ev.current=!0),G(e)});u.useImperativeHandle(K,()=>ey,[ey]),(0,I.useOpenChangeComplete)({open:eu,ref:a,onComplete(){eu&&c?.(!0)}}),(0,h.useIsoLayoutEffect)(()=>{em&&a.current&&!Object.keys(eb.current).length&&(eb.current={top:em.style.top||"0",left:em.style.left||"0",right:em.style.right,height:em.style.height,bottom:em.style.bottom,minHeight:em.style.minHeight,maxHeight:em.style.maxHeight,marginTop:em.style.marginTop,marginBottom:em.style.marginBottom})},[a,em]),(0,h.useIsoLayoutEffect)(()=>{eu||et||(ex.current=!1,ev.current=!1,(0,A.clearStyles)(em,eb.current))},[eu,et,em,a]),(0,h.useIsoLayoutEffect)(()=>{let e=a.current;if(!eu||!eg||!em||!e||et&&!er||"ending"===i.state.transitionStatus)return;if(ex.current=!0,e.style.removeProperty("--transform-origin"),!et)return void eS.request(()=>G(eh||e));let t=function(e){let{style:t}=e,r={};for(let[e,n]of q)r[e]=t.getPropertyValue(e),t.setProperty(e,n,"important");return()=>{for(let[e]of q){let n=r[e];n?t.setProperty(e,n):t.removeProperty(e)}}}(e);try{let t,r=H.current;r?.isConnected||(r=!M.selectors.hasSelectedValue(i.state)&&w.current?.isConnected?w.current:null);let n=E.current,l=(0,m.ownerWindow)(em),o=l.getComputedStyle(em),s=l.getComputedStyle(e),a=(0,g.ownerDocument)(eg),u=U(eg),c=B(eg.getBoundingClientRect(),u),d=B(em.getBoundingClientRect(),u),p=c.height,h=eh||e,v=h.scrollHeight,x=parseFloat(s.borderBottomWidth),b=parseFloat(o.marginTop)||10,S=parseFloat(o.marginBottom)||10,y=parseFloat(o.minHeight)||100,R=W(s),C=a.documentElement.clientHeight-b-S,I=a.documentElement.clientWidth,k=C-c.bottom+p,T="rtl"===eo?c.right-d.width:c.left,L=0;if(r&&n){let e=B(n.getBoundingClientRect(),u);t=B(r.getBoundingClientRect(),u),T=d.left+("rtl"===eo?e.right-t.right:e.left-t.left);let l=e.top-c.top+e.height/2;L=t.top-d.top+t.height/2-l}let O=k+L+S+x,N=Math.min(C,O),j=C-b-S,_=O-N;em.style.left=`${(0,P.clamp)(T,5,I-5-d.width)}px`,em.style.height=`${N}px`,em.style.maxHeight="none",em.style.marginTop=`${b}px`,em.style.marginBottom=`${S}px`,e.style.height="100%";let V=$(h),z=_>=V-D.SCROLL_EDGE_TOLERANCE_PX;z&&(N=Math.min(C,d.height)-(_-V));let F=c.top<20||c.bottom>C-20||Math.ceil(N)+D.SCROLL_EDGE_TOLERANCE_PX<Math.min(v,y),q=(l.visualViewport?.scale??1)!==1&&f.platform.engine.webkit;if(F||q){(0,A.clearStyles)(em,eb.current),en(!1);return}let Y=Math.max(y,N);if(z){let e=Math.max(0,C-O);em.style.top=d.height>=j?"0":`${e}px`,em.style.height=`${N}px`,h.scrollTop=$(h)}else em.style.bottom="0",h.scrollTop=_;if(t){let r=d.top,n=d.height,l=t.top+t.height/2,o=(0,P.clamp)(n>0?(l-r)/n*100:50,0,100);e.style.setProperty("--transform-origin",`50% ${o}%`)}(Y===C||N>=R)&&(ev.current=!0),G(h),J&&null===i.state.selectedIndex&&null===i.state.activeIndex&&null!=X.current[0]&&i.set("activeIndex",0)}finally{t()}},[i,eu,em,eg,E,w,H,a,G,et,en,eS,eh,X,J,eo,er]),u.useEffect(()=>{if(!et||!em||!eu)return;let e=(0,m.ownerWindow)(em);return(0,d.addEventListener)(e,"resize",function(e){S(!1,(0,T.createChangeEventDetails)(L.REASONS.windowResize,e))})},[S,et,em,eu]);let eE={...eh?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":Y||void 0,id:`${ea}-list`},onKeyDown(e){el&&N.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()},onScroll(e){eh||ey(e.currentTarget)},...et&&{style:eh?{height:"100%"}:A.LIST_FUNCTIONAL_STYLES},className:!eh&&et?C.styleDisableScrollbar.className:void 0},eR=(0,k.useRenderElement)("div",e,{ref:[t,a],state:{open:eu,transitionStatus:ep,side:Z,align:ee},stateAttributesMapping:F,props:[ef,eE,(0,j.getDisabledMountTransitionStyles)(ep),s]});return(0,z.jsxs)(u.Fragment,{children:[!ei&&C.styleDisableScrollbar.getElement(es),(0,z.jsx)(b.FloatingFocusManager,{context:Q,modal:!1,disabled:!ed,openInteractionType:ec,returnFocus:o,restoreFocus:!0,children:eR})]})});function W(e){let t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function $(e){return(0,D.getMaxScrollOffset)(e.scrollHeight,e.clientHeight)}function U(e){return S.platform.getScale(e)}function B(e,t){return(0,c.rectToClientRect)({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}let q=[["transform","none"],["scale","1"],["translate","0 0"]],Y=u.forwardRef(function(e,t){let{render:r,className:n,style:l,...o}=e,{store:s,scrollHandlerRef:i,multiple:a}=(0,y.useSelectRootContext)(),{alignItemWithTriggerActive:u}=(0,R.useSelectPositionerContext)(),c=(0,v.useStore)(s,M.selectors.hasScrollArrows),d=(0,v.useStore)(s,M.selectors.openMethod),f=(0,v.useStore)(s,M.selectors.id),p={id:`${f}-list`,role:"listbox","aria-multiselectable":a||void 0,onScroll(e){i.current?.(e.currentTarget)},...u&&{style:A.LIST_FUNCTIONAL_STYLES},className:c&&"touch"!==d?C.styleDisableScrollbar.className:void 0},g=s.useStateSetter("listElement");return(0,k.useRenderElement)("div",e,{ref:[t,g],props:[p,o]})});var G=e.i(68285),K=e.i(82420);let X=u.createContext(void 0);function J(){let e=u.useContext(X);if(!e)throw Error((0,K.default)(57));return e}var Q=e.i(45034),Z=e.i(46706),ee=e.i(38810);let et=u.memo(u.forwardRef(function(e,t){let{render:r,className:n,style:l,value:o=null,label:s,disabled:i=!1,nativeButton:a=!1,...c}=e,d=u.useRef(null),f=(0,G.useCompositeListItem)({guess:!0,label:s,textRef:d}),{store:p,itemProps:g,setOpen:m,setValue:x,selectionRef:b,typingRef:S,valuesRef:E,multiple:R,selectedItemTextRef:C,disabled:w,readOnly:I}=(0,y.useSelectRootContext)(),A=w||i,O=(0,v.useStore)(p,M.selectors.isActive,f.index),N=(0,v.useStore)(p,M.selectors.open),j=(0,v.useStore)(p,M.selectors.isSelected,o),P=(0,v.useStore)(p,M.selectors.isSelectedByFocus,f.index),D=(0,v.useStore)(p,M.selectors.isItemEqualToValue),_=f.index,V=u.useRef(null);(0,h.useIsoLayoutEffect)(()=>{let e=E.current;return e[_]=o,()=>{delete e[_]}},[_,o,E]),(0,h.useIsoLayoutEffect)(()=>{let e=p.state.value,t=e;R&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),void 0!==t&&(0,Z.compareItemEquality)(o,t,D)&&(p.set("selectedIndex",_),d.current&&(C.current=d.current))},[_,R,D,p,o,C]);let F=u.useRef("mouse"),H=u.useRef(!1),{getButtonProps:W,buttonRef:$}=(0,Q.useButton)({disabled:A,focusableWhenDisabled:!0,native:a,composite:!0});function U(){b.current.dragY=0}let B=(0,k.useRenderElement)("div",e,{ref:[$,t,f.ref,V],state:{disabled:A,selected:j,highlighted:O},props:[g,{role:"option","aria-selected":j,tabIndex:N&&O?0:-1,onKeyDown(e){p.set("activeIndex",_)," "===e.key&&S.current&&e.preventDefault()},onClick(e){let t="touch"!==F.current,r=e.nativeEvent.pointerType,n=t&&(0,ee.isVirtualClick)(e.nativeEvent)&&(void 0!==r||O),l=t&&!n&&!H.current;H.current=!1,A||l||function(e){if(w||I)return;let t=p.state.value;if(R){let r=Array.isArray(t)?t:[];x(j?(0,Z.removeItem)(r,o,D):[...r,o],(0,T.createChangeEventDetails)(L.REASONS.itemPress,e))}else x(o,(0,T.createChangeEventDetails)(L.REASONS.itemPress,e)),m(!1,(0,T.createChangeEventDetails)(L.REASONS.itemPress,e))}(e.nativeEvent)},onPointerEnter(e){F.current=e.pointerType},onPointerMove(e){if("mouse"===e.pointerType&&1===e.buttons){let t=b.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){F.current=e.pointerType,H.current=!0,U()},onMouseUp(){if(U(),A||"touch"===F.current||H.current)return;let e=!b.current.allowSelectedMouseUp&&j,t=!b.current.allowUnselectedMouseUp&&!j;e||t||(H.current=!0,V.current?.click(),H.current=!1)}},c,W]}),q=u.useMemo(()=>({selected:j,index:_,textRef:d,selectedByFocus:P}),[j,_,d,P]);return(0,z.jsx)(X.Provider,{value:q,children:B})}));var er=e.i(4678);let en=u.forwardRef(function(e,t){let{selected:r}=J();return e.keepMounted||r?(0,z.jsx)(el,{...e,ref:t}):null}),el=u.memo(u.forwardRef((e,t)=>{let{render:r,className:n,style:l,keepMounted:o,...s}=e,{selected:i}=J(),a=u.useRef(null),{transitionStatus:c,setMounted:d}=(0,er.useTransitionStatus)(i),f=(0,k.useRenderElement)("span",e,{ref:[t,a],state:{selected:i,transitionStatus:c},props:[{"aria-hidden":!0,children:"✔️"},s],stateAttributesMapping:w.transitionStatusMapping});return(0,I.useOpenChangeComplete)({open:i,ref:a,onComplete(){i||d(!1)}}),f})),eo=u.memo(u.forwardRef(function(e,t){let{index:r,textRef:n,selectedByFocus:l}=J(),{firstItemTextRef:o,selectedItemTextRef:s}=(0,y.useSelectRootContext)(),{render:i,className:a,style:c,...d}=e,f=u.useCallback(e=>{e&&(0===r&&(o.current=e),l&&(s.current=e))},[o,s,r,l]);return(0,k.useRenderElement)("div",e,{ref:[f,t,n],props:d})})),es=u.forwardRef(function(e,t){let{render:r,className:n,style:l,...o}=e,{store:s}=(0,y.useSelectRootContext)(),{side:i,align:a,arrowRef:u,arrowStyles:c,arrowUncentered:d,alignItemWithTriggerActive:f}=(0,R.useSelectPositionerContext)(),p=(0,v.useStore)(s,M.selectors.open),g=(0,k.useRenderElement)("div",e,{state:{open:p,side:i,align:a,uncentered:d},ref:[u,t],props:[{style:c,"aria-hidden":!0},o],stateAttributesMapping:E.popupTransitionStateMapping});return f?null:g});var ei=e.i(2304);let ea=u.forwardRef(function(e,t){let{render:r,className:n,style:l,direction:o,keepMounted:s,...i}=e,a="up"===o,{store:u,popupRef:c,listRef:d,handleScrollArrowVisibility:f,scrollArrowsMountedCountRef:p}=(0,y.useSelectRootContext)(),{side:g,scrollDownArrowRef:m,scrollUpArrowRef:x}=(0,R.useSelectPositionerContext)(),b=a?M.selectors.scrollUpArrowVisible:M.selectors.scrollDownArrowVisible,S=(0,v.useStore)(u,b),E=(0,v.useStore)(u,M.selectors.openMethod),C=S&&"touch"!==E,A=(0,ei.useTimeout)(),T=a?x:m,{mounted:L,transitionStatus:O,setMounted:N}=(0,er.useTransitionStatus)(C);(0,h.useIsoLayoutEffect)(()=>(p.current+=1,u.set("hasScrollArrows",!0),()=>{p.current=Math.max(0,p.current-1),0===p.current&&u.set("hasScrollArrows",!1)}),[u,p]),(0,I.useOpenChangeComplete)({open:C,ref:T,onComplete(){C||N(!1)}});let j=(0,k.useRenderElement)("div",e,{ref:[t,T],state:{direction:o,visible:C,side:g,transitionStatus:O},props:[{"aria-hidden":!0,children:a?"▲":"▼",style:{position:"absolute"},onMouseMove(e){0===e.movementX&&0===e.movementY||A.isStarted()||(u.set("activeIndex",null),A.start(40,function e(){let t=u.state.listElement??c.current;if(!t)return;u.set("activeIndex",null),f(t);let r=(0,D.getMaxScrollOffset)(t.scrollHeight,t.clientHeight),n=(0,D.normalizeScrollOffset)(t.scrollTop,r),l=n===(a?0:r),o=d.current;if(n!==t.scrollTop&&(t.scrollTop=n),l)return void A.clear();if(o.length>0){let e=T.current?.offsetHeight||0;t.scrollTop=function(e,t,r,n,l,o){if(t){let t=0,n=r+l-D.SCROLL_EDGE_TOLERANCE_PX;for(let r=0;r<e.length;r+=1){let l=e[r];if(l&&l.offsetTop>=n){t=r;break}}let s=Math.max(0,t-1),i=e[s];return s<t&&i?(0,D.normalizeScrollOffset)(i.offsetTop-l,o):0}let s=e.length-1,i=r+n-l+D.SCROLL_EDGE_TOLERANCE_PX;for(let t=0;t<e.length;t+=1){let r=e[t];if(r&&r.offsetTop+r.offsetHeight>i){s=Math.max(0,t-1);break}}let a=Math.min(e.length-1,s+1),u=e[a];return a>s&&u?(0,D.normalizeScrollOffset)(u.offsetTop+u.offsetHeight-n+l,o):o}(o,a,n,t.clientHeight,e,r)}A.start(40,e)}))},onMouseLeave(){A.clear()}},i],stateAttributesMapping:w.transitionStatusMapping});return L||s?j:null}),eu=u.forwardRef(function(e,t){return(0,z.jsx)(ea,{...e,ref:t,direction:"down"})}),ec=u.forwardRef(function(e,t){return(0,z.jsx)(ea,{...e,ref:t,direction:"up"})}),ed=u.createContext(void 0),ef=u.forwardRef(function(e,t){let{render:r,className:n,style:l,...o}=e,[s,i]=u.useState(),a=u.useMemo(()=>({labelId:s,setLabelId:i}),[s,i]),c=(0,k.useRenderElement)("div",e,{ref:t,props:[{role:"group","aria-labelledby":s},o]});return(0,z.jsx)(ed.Provider,{value:a,children:c})});var ep=e.i(99281);let eg=u.forwardRef(function(e,t){let{render:r,className:n,style:l,id:o,...s}=e,{setLabelId:i}=function(){let e=u.useContext(ed);if(void 0===e)throw Error((0,K.default)(56));return e}(),a=(0,ep.useBaseUiId)(o);return(0,h.useIsoLayoutEffect)(()=>(i(a),()=>{i(e=>e===a?void 0:e)}),[a,i]),(0,k.useRenderElement)("div",e,{ref:t,props:[{id:a},s]})}),em=u.forwardRef(function(e,t){let{className:r,render:n,orientation:l="horizontal",style:o,...s}=e;return(0,k.useRenderElement)("div",e,{state:{orientation:l},ref:t,props:[{role:"presentation"},s]})});e.s(["Arrow",0,es,"Backdrop",()=>i.SelectBackdrop,"Group",0,ef,"GroupLabel",0,eg,"Icon",()=>o.SelectIcon,"Item",0,et,"ItemIndicator",0,en,"ItemText",0,eo,"Label",()=>r.SelectLabel,"List",0,Y,"Popup",0,H,"Portal",()=>s.SelectPortal,"Positioner",()=>a.SelectPositioner,"Root",()=>t.SelectRoot,"ScrollDownArrow",0,eu,"ScrollUpArrow",0,ec,"Separator",0,em,"Trigger",()=>n.SelectTrigger,"Value",()=>l.SelectValue],47737);var eh=e.i(47737);e.s(["Select",0,eh],90741);let ev=(0,e.i(13496).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,ev],98689),e.s(["ChevronDownIcon",0,ev],98464)},10570,75567,e=>{"use strict";e.s([],10570);var t=e.i(10364);e.s(["useOnFirstRender",0,function(e){let r=t.useRef(!0);r.current&&(r.current=!1,e())}],75567)},57675,73793,63741,59019,e=>{"use strict";var t=e.i(10364),r=e.i(33262),n=e.i(61362),l=e.i(19458),o=e.i(68947),s=e.i(71696),i=e.i(6385),a=e.i(58479),u=e.i(82420);let c=t.createContext(void 0);e.s(["SelectPositionerContext",0,c,"useSelectPositionerContext",0,function(){let e=t.useContext(c);if(!e)throw Error((0,u.default)(59));return e}],73793);var d=e.i(54222),f=e.i(51162);function p(e,t){e&&Object.assign(e.style,t)}e.s(["LIST_FUNCTIONAL_STYLES",0,{position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},"clearStyles",0,p],63741);var g=e.i(87900),m=e.i(51068),h=e.i(99389),v=e.i(46706),x=e.i(2690),b=e.i(52515),S=e.i(87252);function y(e,r,l,o){let[s,i]=t.useState(!1);(0,n.useIsoLayoutEffect)(()=>{if(!e||!r||null==l)return void i(!1);let t=(0,b.ownerDocument)(l).documentElement.clientWidth,n=l.offsetWidth;i(t>0&&n>0&&n>=t-20)},[e,r,l]),(0,S.useScrollLock)(e&&(!r||s),o)}e.s(["useAnchoredPopupScrollLock",0,y],59019);var E=e.i(45650);let R={position:"fixed"},C=t.forwardRef(function(e,u){let{anchor:b,className:S,render:C,positionMethod:w,side:I,align:k,sideOffset:M,alignOffset:A,collisionBoundary:T="clipping-ancestors",collisionPadding:L,arrowPadding:O,sticky:N,disableAnchorTracking:j,alignItemWithTrigger:P=!0,collisionAvoidance:D=f.DROPDOWN_COLLISION_AVOIDANCE,style:_,...V}=e,{store:z,listRef:F,labelsRef:H,alignItemWithTriggerActiveRef:W,selectedItemTextRef:$,valuesRef:U,initialValueRef:B,popupRef:q,setValue:Y,floatingContext:G}=(0,s.useSelectRootContext)(),K=(0,o.useStore)(z,g.selectors.open),X=(0,o.useStore)(z,g.selectors.mounted),J=(0,o.useStore)(z,g.selectors.modal),Q=(0,o.useStore)(z,g.selectors.value),Z=(0,o.useStore)(z,g.selectors.openMethod),ee=(0,o.useStore)(z,g.selectors.positionerElement),et=(0,o.useStore)(z,g.selectors.triggerElement),er=(0,o.useStore)(z,g.selectors.isItemEqualToValue),en=(0,o.useStore)(z,g.selectors.transitionStatus),el=t.useRef(null),eo=t.useRef(null),[es,ei]=t.useState(P),ea=X&&es&&"touch"!==Z;X||es===P||ei(P),t.useImperativeHandle(W,()=>ea),y((ea||J)&&K,"touch"===Z,ee,et);let eu=(0,a.useAnchorPositioning)({anchor:b,floatingRootContext:G,positionMethod:w,mounted:X,side:I,sideOffset:M,align:k,alignOffset:A,arrowPadding:O,collisionBoundary:T,collisionPadding:L,sticky:N,disableAnchorTracking:j??ea,collisionAvoidance:D,keepMounted:!0}),ec=ea?"none":eu.side,ed=ea?R:eu.positionerStyles,ef={open:K,side:ec,align:eu.align,anchorHidden:eu.anchorHidden};(0,n.useIsoLayoutEffect)(()=>{z.set("popupSide",eu.side)},[z,eu.side]);let ep=z.useStateSetter("positionerElement"),eg=(0,x.usePositioner)(e,ef,{styles:ed,transitionStatus:en,props:V,refs:[u,ep],hidden:!X,inert:!K}),em=t.useRef(0),eh=(0,l.useStableCallback)(e=>{if(0===U.current.length)return;let t=em.current;if(em.current=e.size,e.size===t)return;let r=(0,m.createChangeEventDetails)(h.REASONS.none);if(0!==t&&!z.state.multiple&&null!==Q&&-1===(0,v.findItemIndex)(U.current,Q,er)){let e=B.current,t=null!=e&&-1!==(0,v.findItemIndex)(U.current,e,er)?e:null;Y(t,r),null===t&&(z.set("selectedIndex",null),$.current=null)}if(0!==t&&z.state.multiple&&Array.isArray(Q)){let e=Q.filter(e=>-1!==(0,v.findItemIndex)(U.current,e,er));e.length!==Q.length&&(Y(e,r),0===e.length&&(z.set("selectedIndex",null),$.current=null))}if(K&&ea){z.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:""};p(ee,e),p(q.current,e)}}),ev=t.useMemo(()=>({...eu,side:ec,alignItemWithTriggerActive:ea,setControlledAlignItemWithTrigger:ei,scrollUpArrowRef:el,scrollDownArrowRef:eo}),[eu,ec,ea,ei]);return(0,E.jsx)(i.CompositeList,{elementsRef:F,labelsRef:H,onMapChange:eh,children:(0,E.jsxs)(c.Provider,{value:ev,children:[X&&J&&(0,E.jsx)(d.InternalBackdrop,{inert:(0,r.inertValue)(!K),cutout:et}),eg]})})});e.s(["SelectPositioner",0,C],57675)},2405,23755,7120,86135,61535,10907,76044,e=>{"use strict";var t=e.i(10364),r=e.i(88333),n=e.i(49939),l=e.i(17975),o=e.i(75567),s=e.i(39399),i=e.i(54130),a=e.i(25587),u=e.i(61362),c=e.i(19458),d=e.i(46230),f=e.i(68947),p=e.i(68790),g=e.i(53076),m=e.i(76072),h=e.i(28698),v=e.i(4864),x=e.i(38419),b=e.i(94020),S=e.i(71696),y=e.i(12147),E=e.i(29134),R=e.i(10883),C=e.i(4678),w=e.i(87900),I=e.i(51068),k=e.i(99389),M=e.i(11296),A=e.i(18674),T=e.i(72033),L=e.i(46706),O=e.i(29549),N=e.i(75491),j=e.i(27229),P=e.i(98934),D=e.i(1556),_=e.i(29494),V=e.i(45650);e.s(["SelectRoot",0,function(e){let{id:z,value:F,defaultValue:H=null,onValueChange:W,open:$,defaultOpen:U=!1,onOpenChange:B,name:q,form:Y,autoComplete:G,disabled:K=!1,readOnly:X=!1,required:J=!1,modal:Q=!0,actionsRef:Z,inputRef:ee,onOpenChangeComplete:et,items:er,multiple:en=!1,itemToStringLabel:el,itemToStringValue:eo,isItemEqualToValue:es=L.defaultItemEquality,highlightItemOnHover:ei=!0,children:ea}=e,{clearErrors:eu}=(0,A.useFormContext)(),{setDirty:ec,setTouched:ed,setFocused:ef,validityData:ep,setFilled:eg,name:em,disabled:eh,validation:ev,validationMode:ex}=(0,y.useFieldRootContext)(),eb=(0,R.useLabelableId)({id:z}),eS=eh||K,ey=em??q,[eE,eR]=(0,a.useControlled)({controlled:F,default:en?H??g.EMPTY_ARRAY:H,name:"Select",state:"value"}),[eC,ew]=(0,a.useControlled)({controlled:$,default:U,name:"Select",state:"open"}),eI=t.useRef([]),ek=t.useRef([]),eM=t.useRef(null),eA=t.useRef(null),eT=t.useRef(0),eL=t.useRef(null),eO=t.useRef([]),eN=t.useRef(!1),ej=t.useRef(null),eP=t.useRef(null),eD=t.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),e_=t.useRef(!1),{mounted:eV,setMounted:ez,transitionStatus:eF}=(0,C.useTransitionStatus)(eC),{openMethod:eH,triggerProps:eW}=(0,j.useOpenInteractionType)(eC),e$=(0,l.useRefWithInit)(()=>new p.ReactStore({id:eb,labelId:void 0,modal:Q,multiple:en,itemToStringLabel:el,itemToStringValue:eo,isItemEqualToValue:es,value:eE,open:eC,mounted:eV,transitionStatus:eF,items:er,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,eU=(0,f.useStore)(e$,w.selectors.activeIndex),eB=(0,f.useStore)(e$,w.selectors.selectedIndex),eq=(0,f.useStore)(e$,w.selectors.triggerElement),eY=(0,f.useStore)(e$,w.selectors.positionerElement),eG=(0,s.usePreviousValue)(eH),eK=eH??eG,eX=t.useMemo(()=>en?"":(0,T.stringifyAsValue)(eE,eo),[en,eE,eo]),eJ=t.useMemo(()=>en&&Array.isArray(eE)?eE.map(e=>(0,T.stringifyAsValue)(e,eo)):(0,T.stringifyAsValue)(eE,eo),[en,eE,eo]),eQ=(0,d.useValueAsRef)(eq),eZ=(0,c.useStableCallback)(()=>eJ);(0,E.useRegisterFieldControl)(eQ,eb,eE,eZ,!eS,q);let e0=t.useRef(eE),e1=en?Array.isArray(eE)&&eE.length>0:null!=eE&&""!==eX;(0,u.useIsoLayoutEffect)(()=>{eg(e1)},[e1,eg]),(0,u.useIsoLayoutEffect)(function(){let e=eE,t=!1;if(en){let r=Array.isArray(eE)?eE:[];t=0===r.length,e=r[r.length-1]}let r=t?-1:(0,L.findItemIndex)(eO.current,e,es),n=-1===r?null:r;null===n&&(eP.current=null),eC||e$.set("selectedIndex",n)},[en,eC,eE,es,e$]),(0,N.useValueChanged)(eE,()=>{let e;eu(ey),ec((e=ep.initialValue,Array.isArray(eE)&&Array.isArray(e)?!(0,O.areArraysEqual)(eE,e,(e,t)=>(0,L.compareItemEquality)(e,t,es)):eE!==e)),ev.change(eE)});let e4=(0,c.useStableCallback)((e,t)=>{B?.(e,t),!t.isCanceled&&(ew(e),e||t.reason!==k.REASONS.focusOut&&t.reason!==k.REASONS.outsidePress||(ed(!0),ef(!1),"onBlur"===ex&&ev.commit(eE)))}),e2=(0,c.useStableCallback)(()=>{ez(!1),e$.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),et?.(!1)});(0,M.useOpenChangeComplete)({enabled:!Z,open:eC,ref:eM,onComplete(){eC||e2()}}),t.useImperativeHandle(Z,()=>({unmount:e2}),[e2]);let e5=(0,c.useStableCallback)((e,t)=>{W?.(e,t),t.isCanceled||eR(e)}),e6=(0,c.useStableCallback)(e=>{let t=(0,P.getMaxScrollOffset)(e.scrollHeight,e.clientHeight),r=(0,P.normalizeScrollOffset)(e.scrollTop,t);e$.set("scrollUpArrowVisible",r>0),e$.set("scrollDownArrowVisible",r<t)}),e9=(0,v.useFloatingRootContext)({open:eC,onOpenChange:e4,elements:{reference:eq,floating:eY}}),e3=(0,m.useClick)(e9,{enabled:!X&&!eS,event:"mousedown"}),e7=(0,h.useDismiss)(e9),e8=(0,x.useListNavigation)(e9,{enabled:!X&&!eS,listRef:eI,activeIndex:eU,selectedIndex:eB,disabledIndices:g.EMPTY_ARRAY,onNavigate(e){(null!==e||eC)&&e$.set("activeIndex",e)},focusItemOnHover:ei}),te=(0,b.useTypeahead)(e9,{enabled:!X&&!eS&&(eC||!en),listRef:ek,activeIndex:eU,selectedIndex:eB,disabledIndices:e=>(0,i.isElementDisabled)(eI.current[e]),onMatch(e){eC?e$.set("activeIndex",e):e5(eO.current[e],(0,I.createChangeEventDetails)(k.REASONS.none))},onTyping(e){eN.current=e}}),tt=t.useMemo(()=>(0,_.mergeProps)(te.reference,e8.reference,e7.reference,e3.reference,eW),[e3.reference,te.reference,e8.reference,e7.reference,eW]),tr=t.useMemo(()=>(0,_.mergeProps)(D.FOCUSABLE_POPUP_PROPS,te.floating,e8.floating,e7.floating),[te.floating,e8.floating,e7.floating]),tn=e8.item??g.EMPTY_OBJECT;(0,o.useOnFirstRender)(()=>{e$.update({popupProps:tr,triggerProps:tt})}),e$.useSyncedValues({id:eb,modal:Q,multiple:en,value:eE,open:eC,mounted:eV,transitionStatus:eF,popupProps:tr,triggerProps:tt,items:er,itemToStringLabel:el,itemToStringValue:eo,isItemEqualToValue:es,openMethod:eK});let tl=t.useMemo(()=>({store:e$,floatingContext:e9,required:J,disabled:eS,readOnly:X,multiple:en,highlightItemOnHover:ei,setValue:e5,setOpen:e4,listRef:eI,popupRef:eM,scrollHandlerRef:eA,handleScrollArrowVisibility:e6,scrollArrowsMountedCountRef:eT,itemProps:tn,valueRef:eL,valuesRef:eO,labelsRef:ek,typingRef:eN,selectionRef:eD,firstItemTextRef:ej,selectedItemTextRef:eP,validation:ev,onOpenChangeComplete:et,alignItemWithTriggerActiveRef:e_,initialValueRef:e0}),[e$,e9,J,eS,X,en,ei,e5,e4,tn,ev,et,e6]),to=(0,n.useMergedRefs)(ee,ev.inputRef),ts=en?void 0:ey,ti=t.useMemo(()=>en&&Array.isArray(eE)&&ey?eE.map(e=>{let t=(0,T.stringifyAsValue)(e,eo);return(0,V.jsx)("input",{type:"hidden",form:Y,name:ey,value:t,disabled:eS},t)}):null,[en,eE,Y,ey,eo,eS]);return(0,V.jsxs)(S.SelectRootContext.Provider,{value:tl,children:[ea,(0,V.jsx)("input",{...ev.getValidationProps(eS,{onFocus(){e$.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||eS||X)return;let t=e.currentTarget.value,r=(0,I.createChangeEventDetails)(k.REASONS.none,e.nativeEvent);e$.set("forceMount",!0),queueMicrotask(function(){if(en)return;let e=t.toLowerCase(),n=eO.current.findIndex(t=>(0,T.stringifyAsValue)(t,eo).toLowerCase()===e||(0,T.stringifyAsLabel)(t,el).toLowerCase()===e);-1===n&&(n=eO.current.findIndex((t,r)=>{let n=ek.current[r];return null!=n&&n.toLowerCase()===e}));let l=eO.current[n];null!=l&&e5(l,r)})}}),id:eb&&null==ts?`${eb}-hidden-input`:void 0,form:Y,name:ts,autoComplete:G,value:eX,disabled:eS,required:J&&!(en&&e1),readOnly:X,ref:to,style:ey?r.visuallyHiddenInput:r.visuallyHidden,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),ti]})}],2405);var z=e.i(50403),F=e.i(3527),H=e.i(52135);let W=t.forwardRef(function(e,t){let{render:r,className:n,style:l,...o}=e;delete o.id;let s=(0,y.useFieldRootContext)(),{store:i}=(0,S.useSelectRootContext)(),a=(0,f.useStore)(i,w.selectors.triggerElement),u=(0,f.useStore)(i,w.selectors.id),c=null==u?void 0:`${u}-label`,d=(0,H.useLabel)({id:c,fallbackControlId:a?.id??u,setLabelId(e){let t="function"==typeof e?e(i.state.labelId):e;i.set("labelId",t)}});return(0,z.useRenderElement)("div",e,{ref:t,state:s.state,props:[d,o],stateAttributesMapping:F.fieldValidityMapping})});e.s(["SelectLabel",0,W],23755);var $=e.i(52515),U=e.i(2304),B=e.i(86613),q=e.i(72343),Y=e.i(79995),G=e.i(33858),K=e.i(29148),X=e.i(17049),J=e.i(45034);let Q={...q.pressableTriggerOpenStateMapping,...F.fieldValidityMapping,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},Z=t.forwardRef(function(e,r){let{render:n,className:l,id:o,disabled:s=!1,nativeButton:i=!0,style:a,...u}=e,{setTouched:c,setFocused:p,validationMode:g,state:m,disabled:h}=(0,y.useFieldRootContext)(),{labelId:v}=(0,B.useLabelableContext)(),{store:x,setOpen:b,selectionRef:E,validation:C,readOnly:M,required:A,alignItemWithTriggerActiveRef:T,disabled:L}=(0,S.useSelectRootContext)(),O=h||L||s,N=(0,f.useStore)(x,w.selectors.open),j=(0,f.useStore)(x,w.selectors.mounted),P=(0,f.useStore)(x,w.selectors.value),D=(0,f.useStore)(x,w.selectors.triggerProps),V=(0,f.useStore)(x,w.selectors.positionerElement),F=(0,f.useStore)(x,w.selectors.listElement),H=(0,f.useStore)(x,w.selectors.popupSide),W=(0,f.useStore)(x,w.selectors.id),q=(0,f.useStore)(x,w.selectors.labelId),Z=(0,f.useStore)(x,w.selectors.hasSelectedValue),ee=j&&V?H:null,et=o??W;(0,R.useLabelableId)({id:et});let er=(0,d.useValueAsRef)(V),en=t.useRef(null),{getButtonProps:el,buttonRef:eo}=(0,J.useButton)({disabled:O,native:i}),es=x.useStateSetter("triggerElement"),ei=(0,U.useTimeout)(),ea=(0,U.useTimeout)(),eu=(0,U.useTimeout)();t.useEffect(()=>{if(N)return eu.start(400,()=>{E.current.allowUnselectedMouseUp=!0,E.current.allowSelectedMouseUp=!0}),()=>{eu.clear()};E.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},ea.clear()},[N,E,ea,eu]);let ec=(0,_.mergeProps)(D,{id:et,role:"combobox","aria-expanded":N,"aria-haspopup":"listbox","aria-controls":N?F?.id??(0,X.getFloatingFocusElement)(V)?.id:void 0,"aria-labelledby":v??q,"aria-readonly":M||void 0,"aria-required":A||void 0,tabIndex:O?-1:0,onFocus(e){p(!0),N&&T.current&&b(!1,(0,I.createChangeEventDetails)(k.REASONS.none,e.nativeEvent)),ei.start(0,()=>{x.set("forceMount",!0)})},onBlur(e){(0,K.contains)(V,e.relatedTarget)||(c(!0),p(!1),"onBlur"===g&&C.commit(P))},onMouseDown(e){if(N)return;let t=(0,$.ownerDocument)(e.currentTarget);function r(e){let t;if(!en.current)return;let r=e.target;!((0,K.contains)(en.current,r)||(0,K.contains)(er.current,r))&&(t=function(e){let t=e.getBoundingClientRect(),r=(0,Y.ownerWindow)(e);if(G.platform.env.jsdom)return t;let n=r.getComputedStyle(e,"::before"),l=r.getComputedStyle(e,"::after");if("none"===n.content&&"none"===l.content)return t;let o=parseFloat(n.width)||0,s=parseFloat(n.height)||0,i=parseFloat(l.width)||0,a=parseFloat(l.height)||0,u=Math.max(t.width,o,i),c=Math.max(t.height,s,a),d=u-t.width,f=c-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}(en.current),e.clientX>=t.left-5&&e.clientX<=t.right+5&&e.clientY>=t.top-5&&e.clientY<=t.bottom+5||b(!1,(0,I.createChangeEventDetails)(k.REASONS.cancelOpen,e)))}ea.start(0,()=>{t.addEventListener("mouseup",r,{once:!0})})}},u,el),ed=C.getValidationProps(O,ec);ed.role="combobox";let ef={...m,open:N,disabled:O,value:P,readOnly:M,popupSide:ee,placeholder:!Z};return(0,z.useRenderElement)("button",e,{ref:[r,en,eo,es],state:ef,stateAttributesMapping:Q,props:ed})});e.s(["SelectTrigger",0,Z],7120);let ee={value:()=>null},et=t.forwardRef(function(e,t){let{className:r,render:n,children:l,placeholder:o,style:s,...i}=e,{store:a,valueRef:u}=(0,S.useSelectRootContext)(),c=(0,f.useStore)(a,w.selectors.value),d=(0,f.useStore)(a,w.selectors.items),p=(0,f.useStore)(a,w.selectors.itemToStringLabel),g=(0,f.useStore)(a,w.selectors.hasSelectedValue),m=!g&&null!=o&&null==l,h=(0,f.useStore)(a,w.selectors.hasNullItemLabel,m),v=null;return v="function"==typeof l?l(c):null!=l?l:m&&!h?o:Array.isArray(c)?(0,T.resolveMultipleLabels)(c,d,p):(0,T.resolveSelectedLabel)(c,d,p),(0,z.useRenderElement)("span",e,{state:{value:c,placeholder:!g},ref:[t,u],props:[{children:v},i],stateAttributesMapping:ee})});e.s(["SelectValue",0,et],86135);let er=t.forwardRef(function(e,t){let{render:r,className:n,style:l,...o}=e,{store:s}=(0,S.useSelectRootContext)(),i=(0,f.useStore)(s,w.selectors.open);return(0,z.useRenderElement)("span",e,{state:{open:i},ref:t,props:[{"aria-hidden":!0,children:"▼"},o],stateAttributesMapping:q.triggerOpenStateMapping})});e.s(["SelectIcon",0,er],61535);var en=e.i(45247);let el=t.forwardRef(function(e,t){let{store:r}=(0,S.useSelectRootContext)(),n=(0,f.useStore)(r,w.selectors.mounted),l=(0,f.useStore)(r,w.selectors.forceMount);return n||l?(0,V.jsx)(en.FloatingPortal,{ref:t,...e}):null});e.s(["SelectPortal",0,el],10907);var eo=e.i(53);let es={...q.popupStateMapping,...eo.transitionStatusMapping},ei=t.forwardRef(function(e,t){let{render:r,className:n,style:l,...o}=e,{store:s}=(0,S.useSelectRootContext)(),i=(0,f.useStore)(s,w.selectors.open),a=(0,f.useStore)(s,w.selectors.mounted),u=(0,f.useStore)(s,w.selectors.transitionStatus);return(0,z.useRenderElement)("div",e,{state:{open:i,transitionStatus:u},ref:t,props:[{role:"presentation",hidden:!a,style:{userSelect:"none",WebkitUserSelect:"none"}},o],stateAttributesMapping:es})});e.s(["SelectBackdrop",0,ei],76044)},92975,e=>{"use strict";e.i(97222);var t=e.i(82420),r=e.i(10364);let n=r.createContext(void 0);e.s(["useToolbarRootContext",0,function(e){let l=r.useContext(n);if(void 0===l&&!e)throw Error((0,t.default)(69));return l}])},98934,91338,e=>{"use strict";function t(e,r=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(r,Math.min(e,n))}e.s(["clamp",0,t],91338),e.s(["SCROLL_EDGE_TOLERANCE_PX",0,1,"getMaxScrollOffset",0,function(e,t){return Math.max(0,e-t)},"normalizeScrollOffset",0,function(e,r){if(r<=0)return 0;let n=t(e,0,r),l=r-n,o=n<=1,s=l<=1;return o&&s?n<=l?0:r:o?0:s?r:n}],98934)},96100,e=>{"use strict";e.i(97222);var t=e.i(45650);let r="base-ui-disable-scrollbar";e.s(["styleDisableScrollbar",0,{className:r,getElement:e=>(0,t.jsx)("style",{nonce:e,href:r,precedence:"base-ui:low",children:`.${r}{scrollbar-width:none}.${r}::-webkit-scrollbar{display:none}`})}])},54130,e=>{"use strict";e.s(["isElementDisabled",0,function(e){return null==e||e.hasAttribute("disabled")||"true"===e.getAttribute("aria-disabled")}])},3151,51958,e=>{"use strict";var t=e.i(13496);let r=(0,t.default)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);e.s(["BarChart3",0,r],3151);let n=(0,t.default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["Bot",0,n],51958)},250,e=>{"use strict";let t=(0,e.i(13496).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},84304,e=>{"use strict";let t=(0,e.i(13496).default)("corner-down-left",[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]]);e.s(["CornerDownLeft",0,t],84304)},44467,e=>{"use strict";let t=(0,e.i(13496).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",0,t],44467)},9590,e=>{"use strict";let t=(0,e.i(13496).default)("list-tree",[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]]);e.s(["ListTree",0,t],9590)},7725,99160,73365,e=>{"use strict";var t=e.i(13496);let r=(0,t.default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,r],7725);let n=(0,t.default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,n],99160);let l=(0,t.default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,l],73365)},288,92930,44474,e=>{"use strict";var t=e.i(13496);let r=(0,t.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);e.s(["Monitor",0,r],288);let n=(0,t.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["Moon",0,n],92930);let l=(0,t.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,l],44474)},42893,e=>{"use strict";let t=(0,e.i(13496).default)("wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);e.s(["Wallet",0,t],42893)},84445,10,e=>{"use strict";var t=e.i(45650),r=e.i(10364),n=e.i(57864),l=e.i(3151),o=e.i(51958),s=e.i(84304),i=e.i(44467),a=e.i(56248),u=e.i(9590),c=e.i(7725),d=e.i(37755),f=e.i(99160),p=e.i(73365),g=e.i(42893);let m=(0,e.i(13496).default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);e.s(["Wrench",0,m],10);var h=e.i(76639),v=e.i(19455),x=e.i(46816),b=e.i(75379),S=e.i(75157);let y="asv:open-search",E=[{label:"Analytics",href:"/?tab=analytics",icon:l.BarChart3},{label:"Usage",href:"/?tab=usage",icon:g.Wallet},{label:"Projects",href:"/?tab=projects",icon:a.FolderGit2},{label:"Sessions",href:"/?tab=sessions",icon:u.ListTree},{label:"Logs",href:"/?tab=logs",icon:i.FileText}],R={user:{label:"Prompt",icon:p.User},assistant:{label:"Reply",icon:o.Bot},thinking:{label:"Thinking",icon:o.Bot},tool:{label:"Tool call",icon:m},result:{label:"Tool output",icon:f.Terminal}};function C({text:e,terms:n}){let l=(0,r.useMemo)(()=>{let e=n.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));return e.length>0?RegExp(`(${e.join("|")})`,"gi"):null},[n]);return l?e.split(l).map((e,n)=>n%2==1?(0,t.jsx)("mark",{className:"rounded-xs bg-brand/20 text-foreground",children:e},n):(0,t.jsx)(r.Fragment,{children:e},n)):e}e.s(["CommandPalette",0,function(){let e=(0,n.useRouter)(),[l,o]=(0,r.useState)(!1),[i,a]=(0,r.useState)(""),[u,f]=(0,r.useState)(null),[p,g]=(0,r.useState)(!1),[m,v]=(0,r.useState)(0),w=(0,r.useRef)(null),I=(0,r.useCallback)(e=>{o(e),a(""),f(null),g(!1),v(0)},[]),k=i.trim(),M=k.replace(/\s+/g,"").length>=2,A=M&&!p&&u?.query!==k;(0,r.useEffect)(()=>{function e(e){"k"===e.key.toLowerCase()&&(e.metaKey||e.ctrlKey)&&!e.altKey&&(e.preventDefault(),I(e=>!e))}let t=()=>I(!0);return window.addEventListener("keydown",e),window.addEventListener(y,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(y,t)}},[I]),(0,r.useEffect)(()=>{if(!M)return;let e=new AbortController,t=setTimeout(async()=>{try{let t=await fetch(`/api/search?q=${encodeURIComponent(k)}`,{signal:e.signal});if(!t.ok)throw Error("Request failed");f(await t.json()),v(0)}catch{e.signal.aborted||g(!0)}},150);return()=>{clearTimeout(t),e.abort()}},[k,M]);let T=(0,r.useMemo)(()=>k.toLowerCase().split(/\s+/).filter(Boolean),[k]),L=E.filter(e=>e.label.toLowerCase().includes(k.toLowerCase())),O=M?u?.results??[]:[],N=[...L.map(e=>({key:`page:${e.href}`,href:e.href})),...O.flatMap(e=>{let t=`/sessions/${e.provider}/${e.id}`,r=`${t}?q=${encodeURIComponent(k)}`;return[{key:`session:${e.provider}:${e.id}`,href:e.matchCount>0?r:t},...e.hits.map((t,n)=>({key:`hit:${e.provider}:${e.id}:${n}`,href:r}))]})];function j(t){I(!1),e.push(t)}(0,r.useEffect)(()=>{w.current?.querySelector(`[data-index="${m}"]`)?.scrollIntoView({block:"nearest"})},[m]);let P=e=>{let t=N.findIndex(t=>t.key===e);return{"data-index":t,role:"option","aria-selected":t===m,onMouseMove:()=>v(t),onClick:()=>j(N[t].href),className:(0,S.cn)("flex w-full cursor-pointer items-center gap-2.5 px-4 text-left",t===m&&"bg-muted")}};return(0,t.jsx)(h.Dialog,{open:l,onOpenChange:I,children:(0,t.jsxs)(h.DialogContent,{className:"top-[12vh] max-h-[76vh] translate-y-0 gap-0 overflow-hidden p-0 sm:max-w-2xl",children:[(0,t.jsx)(h.DialogTitle,{className:"sr-only",children:"Search"}),(0,t.jsx)(h.DialogDescription,{className:"sr-only",children:"Search the text of every session, or jump to a page."}),(0,t.jsxs)("div",{className:"flex items-center gap-2.5 border-b border-border py-3 pr-12 pl-4",children:[A?(0,t.jsx)(c.Loader2,{className:"size-4 animate-spin text-muted-foreground","aria-hidden":!0}):(0,t.jsx)(d.Search,{className:"size-4 text-muted-foreground","aria-hidden":!0}),(0,t.jsx)("input",{autoFocus:!0,value:i,onChange:e=>{a(e.target.value),g(!1),v(0)},onKeyDown:function(e){if("ArrowDown"===e.key||"ArrowUp"===e.key){if(e.preventDefault(),0===N.length)return;let t="ArrowDown"===e.key?1:-1;v(e=>(e+t+N.length)%N.length)}else"Enter"===e.key&&N[m]&&(e.preventDefault(),j(N[m].href))},placeholder:"Search prompts, replies, commands and tool output…","aria-label":"Search all sessions",role:"combobox","aria-expanded":!0,"aria-controls":"cv-palette-list",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),(0,t.jsxs)("div",{ref:w,id:"cv-palette-list",role:"listbox",className:"min-h-0 flex-1 overflow-y-auto py-1.5",children:[L.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"px-4 pt-1.5 pb-1 text-[11px] font-medium tracking-wide text-muted-foreground uppercase",children:"Go to"}),L.map(e=>(0,t.jsxs)("div",{...P(`page:${e.href}`),children:[(0,t.jsx)(e.icon,{className:"size-3.5 shrink-0 text-muted-foreground","aria-hidden":!0}),(0,t.jsx)("span",{className:"py-1.5 text-sm",children:e.label})]},e.href))]}),M&&u&&(0,t.jsx)("p",{className:"px-4 pt-3 pb-1 text-[11px] font-medium tracking-wide text-muted-foreground uppercase",children:0===u.total?"Sessions":u.total>O.length?`Sessions \xb7 first ${O.length} of ${u.total}`:`Sessions \xb7 ${u.total}`}),O.map(e=>{let r=(0,x.providerStyle)(e.provider),n=`${e.provider}:${e.id}`;return(0,t.jsxs)("div",{className:"pb-1",children:[(0,t.jsxs)("div",{...P(`session:${n}`),children:[(0,t.jsx)("span",{className:(0,S.cn)("size-2 shrink-0 rounded-full",r.dotCls),"aria-hidden":!0}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate py-1.5 text-sm font-medium",children:(0,t.jsx)(C,{text:e.label,terms:T})}),(0,t.jsx)("span",{className:"shrink-0 truncate text-xs text-muted-foreground",children:[r.shortLabel,e.project,(0,b.timeAgo)(e.updated_at)].filter(Boolean).join(" · ")})]}),e.hits.map((e,r)=>{let l=R[e.kind];return(0,t.jsxs)("div",{...P(`hit:${n}:${r}`),children:[(0,t.jsx)(l.icon,{className:"ml-4.5 size-3 shrink-0 text-muted-foreground","aria-label":e.tool?`${l.label}: ${e.tool}`:l.label}),(0,t.jsx)("span",{className:(0,S.cn)("min-w-0 flex-1 truncate py-1 text-xs text-muted-foreground",("tool"===e.kind||"result"===e.kind)&&"font-mono"),children:(0,t.jsx)(C,{text:e.snippet,terms:T})})]},r)}),e.matchCount>e.hits.length&&(0,t.jsxs)("p",{className:"py-0.5 pr-4 pl-13 text-[11px] text-muted-foreground/80",children:["+",e.matchCount-e.hits.length," more in this session"]})]},n)}),p?(0,t.jsx)("p",{className:"px-4 py-6 text-center text-sm text-destructive",children:"Search failed. Check that the app is still running."}):M&&u&&0===u.total&&!A?(0,t.jsxs)("p",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:["No session mentions “",u.query,"”."]}):M&&!u?(0,t.jsx)("p",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:"Searching… the first search reads every transcript."}):!M&&0===L.length&&(0,t.jsx)("p",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:"Type at least two characters to search."})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 border-t border-border px-4 py-2 text-[11px] text-muted-foreground",children:[(0,t.jsx)("span",{children:"↑↓ to move"}),(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(s.CornerDownLeft,{className:"size-3","aria-hidden":!0})," to open"]}),(0,t.jsx)("span",{children:"Words must all appear in the same message"})]})]})})},"SearchTrigger",0,function({className:e}){return(0,t.jsxs)(v.Button,{variant:"outline",onClick:()=>window.dispatchEvent(new Event(y)),"aria-label":"Search all sessions",className:(0,S.cn)("gap-2 text-muted-foreground",e),children:[(0,t.jsx)(d.Search,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"hidden md:inline",children:"Search…"}),(0,t.jsx)("kbd",{className:"pointer-events-none hidden rounded-sm border border-border bg-muted px-1.5 py-0.5 font-mono text-[10px] md:block",children:"⌘K"})]})}],84445)},7067,67489,e=>{"use strict";var t=e.i(45650),r=e.i(10364),n=e.i(90741),l=e.i(75157),o=e.i(98464),s=e.i(250),s=s;let i=(0,e.i(13496).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),a=n.Select.Root;function u({className:e,...r}){return(0,t.jsx)(n.Select.Group,{"data-slot":"select-group",className:(0,l.cn)("scroll-my-1 p-1",e),...r})}function c({className:e,size:r="default",children:s,...i}){return(0,t.jsxs)(n.Select.Trigger,{"data-slot":"select-trigger","data-size":r,className:(0,l.cn)("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i,children:[s,(0,t.jsx)(n.Select.Icon,{render:(0,t.jsx)(o.ChevronDownIcon,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function d({className:e,children:r,side:o="bottom",sideOffset:s=4,align:i="center",alignOffset:a=0,alignItemWithTrigger:u=!0,...c}){return(0,t.jsx)(n.Select.Portal,{children:(0,t.jsx)(n.Select.Positioner,{side:o,sideOffset:s,align:i,alignOffset:a,alignItemWithTrigger:u,className:"isolate z-50",children:(0,t.jsxs)(n.Select.Popup,{"data-slot":"select-content","data-align-trigger":u,className:(0,l.cn)("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...c,children:[(0,t.jsx)(p,{}),(0,t.jsx)(n.Select.List,{children:r}),(0,t.jsx)(g,{})]})})})}function f({className:e,children:r,...o}){return(0,t.jsxs)(n.Select.Item,{"data-slot":"select-item",className:(0,l.cn)("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...o,children:[(0,t.jsx)(n.Select.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:r}),(0,t.jsx)(n.Select.ItemIndicator,{render:(0,t.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:(0,t.jsx)(s.default,{className:"pointer-events-none"})})]})}function p({className:e,...r}){return(0,t.jsx)(n.Select.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:(0,l.cn)("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...r,children:(0,t.jsx)(i,{})})}function g({className:e,...r}){return(0,t.jsx)(n.Select.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:(0,l.cn)("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...r,children:(0,t.jsx)(o.ChevronDownIcon,{})})}e.s(["Select",0,a,"SelectContent",0,d,"SelectGroup",0,u,"SelectItem",0,f,"SelectTrigger",0,c,"SelectValue",0,function({className:e,...r}){return(0,t.jsx)(n.Select.Value,{"data-slot":"select-value",className:(0,l.cn)("flex flex-1 text-left",e),...r})}],67489);let m="cv-palette",h=[{value:"ocean",label:"Ocean",swatch:"#4a8fd0"},{value:"sage",label:"Sage",swatch:"#6b9c81"},{value:"plum",label:"Plum",swatch:"#9c7fae"},{value:"rose",label:"Rose",swatch:"#c4758c"},{value:"sand",label:"Sand",swatch:"#b0915a"},{value:"graphite",label:"Graphite",swatch:"#6b717c"},{value:"terracotta",label:"Terracotta",swatch:"#d97757"}],v="ocean";function x(e){return h.some(t=>t.value===e)}let b=new Set;function S(e){b.add(e);let t=()=>{R(y()),e()};return window.addEventListener("storage",t),()=>{b.delete(e),window.removeEventListener("storage",t)}}function y(){try{let e=localStorage.getItem(m);if(x(e))return e}catch{}return v}function E(){return v}function R(e){e===v?delete document.documentElement.dataset.palette:document.documentElement.dataset.palette=e}function C({color:e}){return(0,t.jsx)("span",{"aria-hidden":!0,className:"size-3 shrink-0 rounded-full ring-1 ring-foreground/15",style:{backgroundColor:e}})}e.s(["PALETTES",0,h,"PALETTE_STORAGE_KEY",0,m,"PalettePicker",0,function({className:e}){let n=(0,r.useSyncExternalStore)(S,y,E),o=h.find(e=>e.value===n)??h[0];return(0,t.jsxs)(a,{items:h,value:n,onValueChange:e=>{x(e)&&function(e){try{localStorage.setItem(m,e)}catch{}for(let t of(R(e),b))t()}(e)},children:[(0,t.jsxs)(c,{"aria-label":`Color palette: ${o.label}`,className:(0,l.cn)("text-xs",e),children:[(0,t.jsx)(C,{color:o.swatch}),(0,t.jsx)("span",{className:"hidden sm:inline",children:o.label})]}),(0,t.jsx)(d,{align:"end",className:"w-auto min-w-36",children:(0,t.jsx)(u,{children:h.map(e=>(0,t.jsxs)(f,{value:e.value,children:[(0,t.jsx)(C,{color:e.swatch}),e.label]},e.value))})})]})}],7067)},7346,48154,e=>{"use strict";var t=e.i(45650),r=e.i(10364),n=e.i(288),l=e.i(92930),o=e.i(44474),s=e.i(7067),i=e.i(41966),a=e.i(19458),u=e.i(25587),c=e.i(53076),d=e.i(50403),f=e.i(67149),p=e.i(92975);let g=r.createContext(void 0);var m=e.i(30875);let h=r.forwardRef(function(e,n){let{defaultValue:l,disabled:o=!1,loopFocus:s=!0,onValueChange:i,orientation:h="horizontal",multiple:v=!1,value:x,className:b,render:S,style:y,...E}=e,R=(0,p.useToolbarRootContext)(!0),C=r.useContext(g),w=void 0!==x||void 0!==l,I=(R?.disabled??!1)||(C?.disabled??!1)||o,[k,M]=(0,u.useControlled)({controlled:x,default:void 0===x?l??c.EMPTY_ARRAY:void 0,name:"ToggleGroup",state:"value"}),A=(0,a.useStableCallback)((e,t,r)=>{let n;v?(n=k.slice(),t?n.push(e):n.splice(k.indexOf(e),1)):n=t?[e]:[],i?.(n,r),r.isCanceled||M(n)}),T={disabled:I,multiple:v,orientation:h},L=r.useMemo(()=>({disabled:I,setGroupValue:A,value:k,isValueInitialized:w}),[I,A,k,w]),O={role:"group"},N=(0,d.useRenderElement)("div",e,{enabled:!!R,state:T,ref:n,props:[O,E]});return(0,t.jsx)(m.ToggleGroupContext.Provider,{value:L,children:R?N:(0,t.jsx)(f.CompositeRoot,{render:S,className:b,style:y,state:T,refs:[n],props:[O,E],loopFocus:s,enableHomeAndEndKeys:!0,orientation:h})})});var v=e.i(75157),x=e.i(70962);let b=r.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});function S({className:e,variant:r,size:n,spacing:l=2,orientation:o="horizontal",children:s,...i}){return(0,t.jsx)(h,{"data-slot":"toggle-group","data-variant":r,"data-size":n,"data-spacing":l,"data-orientation":o,style:{"--gap":l},className:(0,v.cn)("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch",e),...i,children:(0,t.jsx)(b.Provider,{value:{variant:r,size:n,spacing:l,orientation:o},children:s})})}function y({className:e,children:n,variant:l="default",size:o="default",...s}){let a=r.useContext(b);return(0,t.jsx)(i.Toggle,{"data-slot":"toggle-group-item","data-variant":a.variant||l,"data-size":a.size||o,"data-spacing":a.spacing,className:(0,v.cn)("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",(0,x.toggleVariants)({variant:a.variant||l,size:a.size||o}),e),...s,children:n})}var E=e.i(46798);let R={sm:"h-7",default:"h-8"},C="h-full min-w-0 rounded-md border border-transparent px-2 text-xs text-muted-foreground hover:bg-transparent hover:text-foreground aria-pressed:bg-background aria-pressed:text-foreground aria-pressed:shadow-sm dark:aria-pressed:border-input dark:aria-pressed:bg-input/30";function w({value:e,onChange:r,options:n,label:l,size:o="sm",className:s}){return(0,t.jsx)(S,{"aria-label":l,value:[e],onValueChange:e=>{e.length>0&&r(e[0])},spacing:.5,className:(0,v.cn)("rounded-lg bg-muted p-[3px]",R[o],s),children:n.map(({value:e,label:r,icon:n})=>n?(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{render:(0,t.jsx)(y,{value:e,"aria-label":r,className:(0,v.cn)(C,"aspect-square px-0"),children:(0,t.jsx)(n,{className:"size-3.5","aria-hidden":!0})})}),(0,t.jsx)(E.TooltipContent,{children:r})]},e):(0,t.jsx)(y,{value:e,className:C,children:r},e))})}e.s(["Segmented",0,w],48154);let I="cv-theme",k=`
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,4864,38419,94020,71696,46706,72033,87900,29549,e=>{"use strict";var t=e.i(80269),r=e.i(25804),n=e.i(61362),l=e.i(17975),o=e.i(47385),s=e.i(80553),i=e.i(57238);e.s(["useFloatingRootContext",0,function(e){let{open:a=!1,onOpenChange:u,elements:c={}}=e,d=(0,r.useId)(),f=null!=(0,s.useFloatingParentNodeId)(),p=(0,l.useRefWithInit)(()=>new i.FloatingRootStore({open:a,transitionStatus:void 0,onOpenChange:u,referenceElement:c.reference??null,floatingElement:c.floating??null,triggerElements:new o.PopupTriggerMap,floatingId:d,syncOnly:!1,nested:f})).current;return(0,n.useIsoLayoutEffect)(()=>{let e={open:a,floatingId:d};void 0!==c.reference&&(e.referenceElement=c.reference,e.domReferenceElement=(0,t.isElement)(c.reference)?c.reference:null),void 0!==c.floating&&(e.floatingElement=c.floating),p.update(e)},[a,d,c.reference,c.floating,p]),p.context.onOpenChange=u,p.context.nested=f,p}],4864);var a=e.i(10364),u=e.i(99124),c=e.i(52515),d=e.i(19458),f=e.i(46230),p=e.i(33858),g=e.i(51068),m=e.i(99389),h=e.i(76553),v=e.i(26206),x=e.i(29148),b=e.i(17049),S=e.i(2283),y=e.i(38810);function E(e){return p.platform.engine.webkit&&0===e.movementX&&0===e.movementY}function R(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function C(e,t){return R(t,e===v.ARROW_UP||e===v.ARROW_DOWN,e===v.ARROW_LEFT||e===v.ARROW_RIGHT)}function w(e,t,r){return R(t,e===v.ARROW_DOWN,r?e===v.ARROW_LEFT:e===v.ARROW_RIGHT)||"Enter"===e||" "===e||""===e}e.s(["useListNavigation",0,function(e,r){let{listRef:l,activeIndex:o,onNavigate:i=()=>{},enabled:p=!0,selectedIndex:I=null,allowEscape:k=!1,loopFocus:M=!1,nested:A=!1,rtl:T=!1,virtual:L=!1,focusItemOnOpen:O="auto",focusItemOnHover:N=!0,openOnArrowKeyDown:j=!0,disabledIndices:P,orientation:D="vertical",parentOrientation:_,id:V,resetOnPointerLeave:z=!0,externalTree:F,grid:H}=r,W=null!=H,$="rootStore"in e?e.rootStore:e,U=$.useState("open"),B=$.useState("floatingElement"),q=$.useState("domReferenceElement"),Y=$.context.dataRef,G=(0,b.getFloatingFocusElement)(B),K=(0,b.isTypeableCombobox)(q),X=(0,f.useValueAsRef)(G),J=(0,s.useFloatingParentNodeId)(),Q=(0,s.useFloatingTree)(F),Z=a.useRef(O),ee=a.useRef(I??-1),et=a.useRef(null),er=a.useRef(!0),en=(0,d.useStableCallback)(e=>{i(-1===ee.current?null:ee.current,e)}),el=a.useRef(!!B),eo=a.useRef(U),es=a.useRef(!1),ei=a.useRef(!1),ea=a.useRef(null),eu=(0,f.useValueAsRef)(P),ec=(0,f.useValueAsRef)(U),ed=(0,f.useValueAsRef)(I),ef=(0,f.useValueAsRef)(z),ep=(0,u.useAnimationFrame)(),eg=(0,u.useAnimationFrame)(),em=(0,d.useStableCallback)(()=>{function e(e){L?Q?.events.emit("virtualfocus",e):ea.current=(0,S.enqueueFocus)(e,{sync:es.current,preventScroll:!0})}let t=l.current[ee.current],r=ei.current;t&&e(t),(es.current?e=>e():e=>ep.request(e))(()=>{let n=l.current[ee.current]||t;!n||(t||e(n),ey&&(r||!er.current)&&n.scrollIntoView?.({block:"nearest",inline:"nearest"}))})});(0,n.useIsoLayoutEffect)(()=>{Y.current.orientation=D},[Y,D]),(0,n.useIsoLayoutEffect)(()=>{p&&(U&&B?(ee.current=I??-1,Z.current&&null!=I&&(ei.current=!0,en())):el.current&&(ee.current=-1,en()))},[p,U,B,I,en]),(0,n.useIsoLayoutEffect)(()=>{if(p){if(!U){es.current=!1;return}if(B)if(null==o){if(es.current=!1,null!=ed.current)return;if(el.current&&(ee.current=-1,em()),(!eo.current||!el.current)&&Z.current&&(null!=et.current||!0===Z.current&&null==et.current)){let e=0,t=()=>{null==l.current[0]?(e<2&&(e?e=>eg.request(e):queueMicrotask)(t),e+=1):(ee.current=null==et.current||w(et.current,D,T)||A?(0,h.getMinListIndex)(l):(0,h.getMaxListIndex)(l),et.current=null,en())};t()}}else(0,h.isIndexOutOfListBounds)(l.current,o)||(ee.current=o,em(),ei.current=!1)}},[p,U,B,o,ed,A,l,D,T,en,em,eg]),(0,n.useIsoLayoutEffect)(()=>{if(!p||B||!Q||L||!el.current)return;let e=Q.nodesRef.current,t=e.find(e=>e.id===J)?.context?.elements.floating,r=(0,x.activeElement)((0,c.ownerDocument)(q??t??null)),n=e.some(e=>e.context&&(0,x.contains)(e.context.elements.floating,r));t&&!n&&er.current&&t.focus({preventScroll:!0})},[p,B,q,Q,J,L]),(0,n.useIsoLayoutEffect)(()=>{eo.current=U,el.current=!!B}),(0,n.useIsoLayoutEffect)(()=>{U||(et.current=null,Z.current=O)},[U,O]);let eh=null!=o,ev=(0,d.useStableCallback)(e=>{if(!ec.current)return;let t=l.current.indexOf(e.currentTarget);-1!==t&&(ee.current!==t||o!==t)&&(ee.current=t,en(e))}),ex=(0,d.useStableCallback)(()=>_??Q?.nodesRef.current.find(e=>e.id===J)?.context?.dataRef?.current.orientation),eb=(0,d.useStableCallback)(()=>(0,h.getMinListIndex)(l,eu.current)),eS=(0,d.useStableCallback)(e=>{var r;let n,o;if(er.current=!1,es.current=!0,229===e.which||!ec.current&&e.currentTarget===X.current)return;if(A&&(r=e.key,n=T?r===v.ARROW_RIGHT:r===v.ARROW_LEFT,o=r===v.ARROW_UP,"both"===D||"horizontal"===D&&W?"Escape"===r:R(D,n,o))){C(e.key,ex())||(0,y.stopEvent)(e),$.setOpen(!1,(0,g.createChangeEventDetails)(m.REASONS.listNavigation,e.nativeEvent)),(0,t.isHTMLElement)(q)&&(L?Q?.events.emit("virtualfocus",q):q.focus());return}let s=ee.current,i=(0,h.getMinListIndex)(l,P),a=(0,h.getMaxListIndex)(l,P);if(K||("Home"===e.key&&((0,y.stopEvent)(e),ee.current=i,en(e)),"End"===e.key&&((0,y.stopEvent)(e),ee.current=a,en(e))),null!=H){let t=H(e,ee.current,l,D,M,T,P,i,a);if(null!=t&&(ee.current=t,en(e)),"both"===D)return}if(C(e.key,D)){if((0,y.stopEvent)(e),U&&!L&&(0,x.activeElement)(e.currentTarget.ownerDocument)===e.currentTarget){ee.current=w(e.key,D,T)?i:a,en(e);return}w(e.key,D,T)?M?s>=a?k&&s!==l.current.length?ee.current=-1:(es.current=!1,ee.current=i):ee.current=(0,h.findNonDisabledListIndex)(l.current,{startingIndex:s,disabledIndices:P}):ee.current=Math.min(a,(0,h.findNonDisabledListIndex)(l.current,{startingIndex:s,disabledIndices:P})):M?s<=i?k&&-1!==s?ee.current=l.current.length:(es.current=!1,ee.current=a):ee.current=(0,h.findNonDisabledListIndex)(l.current,{startingIndex:s,decrement:!0,disabledIndices:P}):ee.current=Math.max(i,(0,h.findNonDisabledListIndex)(l.current,{startingIndex:s,decrement:!0,disabledIndices:P})),(0,h.isIndexOutOfListBounds)(l.current,ee.current)&&(ee.current=-1),en(e)}}),ey=a.useMemo(()=>({onFocus(e){es.current=!0,ev(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){!E(e)&&(es.current=!0,ei.current=!1,N&&ev(e))},onPointerLeave(e){if(!ec.current||!er.current||"touch"===e.pointerType)return;es.current=!0;let t=e.relatedTarget;if(!(!N||l.current.includes(t))&&ef.current&&(ea.current?.(),ea.current=null,ee.current=-1,en(e),!L)){let e=X.current,t=(0,x.activeElement)((0,c.ownerDocument)(e));e&&(0,x.contains)(e,t)&&e.focus({preventScroll:!0})}}}),[ev,ec,X,N,l,en,ef,L]),eE=a.useMemo(()=>L&&U&&eh&&{"aria-activedescendant":`${V}-${o}`},[L,U,eh,V,o]),eR=a.useMemo(()=>({"aria-orientation":"both"===D?void 0:D,...!K?eE:{},onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&U&&!L){let r=(0,x.getTarget)(e.nativeEvent);if(r&&!(0,x.contains)(X.current,r))return;(0,y.stopEvent)(e),$.setOpen(!1,(0,g.createChangeEventDetails)(m.REASONS.focusOut,e.nativeEvent)),(0,t.isHTMLElement)(q)&&q.focus();return}eS(e)},onPointerMove(e){E(e)||(er.current=!0)}}),[eE,eS,X,D,K,$,U,L,q]),eC=a.useMemo(()=>{function e(e){$.setOpen(!0,(0,g.createChangeEventDetails)(m.REASONS.listNavigation,e.nativeEvent,e.currentTarget))}function t(e){"auto"===O&&(0,y.isVirtualClick)(e.nativeEvent)&&(Z.current=!L)}function r(e){Z.current=O,"auto"===O&&(0,y.isVirtualPointerEvent)(e.nativeEvent)&&(Z.current=!0)}return{onKeyDown(t){var r,n;let l=$.select("open");er.current=!1;let o=t.key.startsWith("Arrow"),s=(r=t.key,n=ex(),R(n,T?r===v.ARROW_LEFT:r===v.ARROW_RIGHT,r===v.ARROW_DOWN)),i=C(t.key,D),a=(A?s:i)||"Enter"===t.key||""===t.key.trim();if(L&&l)return eS(t);if(l||j||!o){if(a){let e=C(t.key,ex());et.current=A&&e?null:t.key}if(A){s&&((0,y.stopEvent)(t),l?(ee.current=eb(),en(t)):e(t));return}i&&(null!=ed.current&&(ee.current=ed.current),(0,y.stopEvent)(t),!l&&j?e(t):eS(t),l&&en(t))}},onFocus(e){$.select("open")&&!L&&(ee.current=-1,en(e))},onPointerDown:r,onPointerEnter:r,onMouseDown:t,onClick:t}},[eS,O,eb,A,en,$,j,D,ex,T,ed,L]),ew=a.useMemo(()=>({...eE,...eC}),[eE,eC]);return a.useMemo(()=>p?{reference:ew,floating:eR,item:ey,trigger:eC}:{},[p,ew,eR,eC,ey])}],38419);var I=e.i(2304),k=e.i(53076);e.s(["useTypeahead",0,function(e,t){let{listRef:r,elementsRef:l,activeIndex:o,onMatch:s,disabledIndices:i,onTyping:u,enabled:c=!0,resetMs:f=750,selectedIndex:p=null}=t,g="rootStore"in e?e.rootStore:e,m=g.useState("open"),v=(0,I.useTimeout)(),b=a.useRef(""),S=a.useRef(p??o??-1),E=a.useRef(null),R=(0,d.useStableCallback)(e=>{function t(e){let t=l?.current[e];return!(t&&!(0,h.isElementVisible)(t)||t?.matches(":disabled"))&&(null==i||!(0,h.isListIndexDisabled)(k.EMPTY_ARRAY,e,i))}function n(e,r,l=0){if(0===e.length)return -1;let o=(l%e.length+e.length)%e.length,s=r.toLowerCase();for(let r=0;r<e.length;r+=1){let n=(o+r)%e.length,l=e[n];if(l?.toLowerCase().startsWith(s)&&t(n))return n}return -1}let a=r.current;if(b.current.length>0&&" "===e.key&&((0,y.stopEvent)(e),u?.(!0)),b.current.length>0&&" "!==b.current[0]&&-1===n(a,b.current)&&" "!==e.key&&u?.(!1),null==a||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;m&&" "!==e.key&&((0,y.stopEvent)(e),u?.(!0));let c=""===b.current;c&&(S.current=p??o??-1),a.every((e,r)=>!(e&&t(r))||e[0]?.toLowerCase()!==e[1]?.toLowerCase())&&b.current===e.key&&(b.current="",S.current=E.current),b.current+=e.key,v.start(f,()=>{b.current="",S.current=E.current,u?.(!1)});let d=c?p??o??-1:S.current,g=n(a,b.current,(d??0)+1);-1!==g?(s?.(g),E.current=g):" "!==e.key&&(b.current="",u?.(!1))}),C=(0,d.useStableCallback)(e=>{let t=e.relatedTarget,r=g.select("domReferenceElement"),n=g.select("floatingElement");(0,x.contains)(r,t)||(0,x.contains)(n,t)||(v.clear(),b.current="",S.current=E.current,u?.(!1))});(0,n.useIsoLayoutEffect)(()=>{(m||null===p)&&(v.clear(),E.current=null,""!==b.current&&(b.current=""))},[m,p,v]);let w=a.useMemo(()=>({onKeyDown:R,onBlur:C}),[R,C]);return a.useMemo(()=>c?{reference:w,floating:w}:{},[c,w])}],94020);var M=e.i(82420);let A=a.createContext(null);function T(e,t,r){return null==e||null==t?Object.is(e,t):r(e,t)}function L(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}e.s(["SelectRootContext",0,A,"useSelectRootContext",0,function(){let e=a.useContext(A);if(null===e)throw Error((0,M.default)(60));return e}],71696),e.s(["compareItemEquality",0,T,"defaultItemEquality",0,(e,t)=>Object.is(e,t),"findItemIndex",0,function(e,t,r){return e&&0!==e.length?e.findIndex(e=>void 0!==e&&T(e,t,r)):-1},"removeItem",0,function(e,t,r){return e.filter(e=>!T(t,e,r))}],46706);var O=e.i(45650);function N(e){return null!=e&&e.length>0&&"object"==typeof e[0]&&null!=e[0]&&"items"in e[0]}function j(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(N(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1}function P(e,t){if(t&&null!=e)return t(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return L(e)}function D(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?L(e.value):L(e)}function _(e,t,r){if(r&&null!=e)return r(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return t[e]??P(e,r);if(Array.isArray(t)){let n=N(t)?t.flatMap(e=>e.items):t;if(null==e||"object"!=typeof e){let t=n.find(t=>t.value===e);return t&&null!=t.label?t.label:P(e,r)}if("value"in e){let t=n.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return P(e,r)}e.s(["hasNullItemLabel",0,j,"resolveMultipleLabels",0,function(e,t,r){return e.reduce((e,n,l)=>(l>0&&e.push(", "),e.push((0,O.jsx)(a.Fragment,{children:_(n,t,r)},l)),e),[])},"resolveSelectedLabel",0,_,"stringifyAsLabel",0,P,"stringifyAsValue",0,D],72033),e.s(["selectors",0,{id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:r,itemToStringValue:n}=e;return null!=t&&(r&&Array.isArray(t)?t.length>0:""!==D(t,n))},hasNullItemLabel:(e,t)=>!!t&&j(e.items),open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let r=e.isItemEqualToValue,n=e.value;return e.multiple?Array.isArray(n)&&n.some(e=>T(t,e,r)):T(t,n,r)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows}],87900),e.s(["areArraysEqual",0,function(e,t,r=(e,t)=>e===t){return e.length===t.length&&e.every((e,n)=>r(e,t[n]))}],29549)},93901,e=>{"use strict";e.s(["ACTIVE_COMPOSITE_ITEM",0,"data-composite-item-active"])},6385,e=>{"use strict";var t=e.i(10364),r=e.i(17975),n=e.i(19458),l=e.i(61362),o=e.i(19206),s=e.i(45650);function i(){return new Map}function a(){return new Set}function u(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}e.s(["CompositeList",0,function(e){let{children:c,elementsRef:d,labelsRef:f,onMapChange:p}=e,g=(0,n.useStableCallback)(p),[,m]=t.useState(!1),h=(0,r.useRefWithInit)(a).current,v=(0,r.useRefWithInit)(i).current,x=t.useRef(0),b=t.useRef(!0),S=t.useRef([]),y=t.useRef(null),E=(0,n.useStableCallback)(()=>{b.current||(b.current=!0,m(e=>!e))}),R=(0,n.useStableCallback)((e,t)=>{v.set(e,t),E()}),C=(0,n.useStableCallback)(e=>{v.delete(e),E()}),w=(0,n.useStableCallback)(e=>{let t=new Map;return d.current.length=0,f&&(f.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),d.current[e.index]=e.element,f&&(f.current[e.index]=void 0!==e.registration.label?e.registration.label:e.registration.textRef?.current?.textContent??e.element.textContent)}),x.current=d.current.length,t}),I=(0,n.useStableCallback)(()=>{var e;let t,r,n,l,[o,s]=(e=v,t=new Set,r=[],n=[],e.forEach((e,l)=>{if(!l.isConnected)return;let o=e.index,s={index:o??-1,element:l,registration:e};null===o?n.push(s):o>=0&&(t.add(o),r.push(s))}),l=0,n.sort((e,t)=>u(e.element,t.element)),n.forEach(e=>{for(;t.has(l);)l+=1;e.index=l,r.push(e),l+=1}),t.size>0&&r.sort((e,t)=>e.index-t.index),[r,n.map(e=>e.element)]),i=w(o);!function(e){if(y.current?.disconnect(),y.current=null,"function"!=typeof MutationObserver||e.length<2)return;let t=new MutationObserver(r=>{if(!function(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}(r))return;let n=null;for(let r of e)if(r.isConnected){if(n&&u(n,r)>0){t.disconnect(),E();return}n=r}});y.current=t;let r=new Set;for(let t=1;t<e.length;t+=1){let n=function(e,t){let r=e.parentElement;for(;r&&!r.contains(t);)r=r.parentElement;return r}(e[t-1],e[t]);n&&r.add(n)}r.forEach(e=>t.observe(e,{childList:!0}))}(s),S.current=o,b.current=!1,h.forEach(e=>e(i)),g(i)});(0,l.useIsoLayoutEffect)(()=>(b.current||w(S.current),()=>{d.current=[],f&&(f.current=[])}),[d,f,w]),(0,l.useIsoLayoutEffect)(()=>{b.current&&I()}),(0,l.useIsoLayoutEffect)(()=>()=>{y.current?.disconnect(),b.current=!0},[]);let k=(0,n.useStableCallback)(e=>(h.add(e),()=>{h.delete(e)})),M=t.useMemo(()=>({register:R,unregister:C,subscribeMapChange:k,nextIndexRef:x}),[R,C,k,x]);return(0,s.jsx)(o.CompositeListContext.Provider,{value:M,children:c})}])},67149,e=>{"use strict";var t=e.i(10364),r=e.i(53076),n=e.i(6385),l=e.i(54130),o=e.i(19458),s=e.i(49939),i=e.i(61362),a=e.i(35987),u=e.i(76553),c=e.i(93901),d=e.i(29148);let f=[];var p=e.i(60857),g=e.i(50403),m=e.i(21023),h=e.i(45650);e.s(["CompositeRoot",0,function(e){let{render:v,className:x,style:b,refs:S=r.EMPTY_ARRAY,props:y=r.EMPTY_ARRAY,state:E=r.EMPTY_OBJECT,stateAttributesMapping:R,highlightedIndex:C,onHighlightedIndexChange:w,orientation:I,grid:k,loopFocus:M,onLoop:A,enableHomeAndEndKeys:T,onMapChange:L,stopEventPropagation:O=!0,rootRef:N,disabledIndices:j,modifierKeys:P,highlightItemOnHover:D=!1,tag:_="div",...V}=e,{props:z,highlightedIndex:F,onHighlightedIndexChange:H,elementsRef:W,onMapChange:$,relayKeyboardEvent:U}=function(e){let{loopFocus:r=!0,orientation:n="both",grid:p,onLoop:g,direction:m,highlightedIndex:h,onHighlightedIndexChange:v,rootRef:x,enableHomeAndEndKeys:b=!1,stopEventPropagation:S,disabledIndices:y,modifierKeys:E=f}=e,[R,C]=t.useState(0),w=null!=p,I=t.useRef(null),k=(0,s.useMergedRefs)(I,x),M=t.useRef([]),A=t.useRef(!1),T=h??R,L=(0,o.useStableCallback)((e,t=!1)=>{if((v??C)(e),t){let t=M.current[e];(0,a.scrollIntoViewIfNeeded)(I.current,t,m,n)}}),O=(0,o.useStableCallback)(e=>{if(0===e.size||A.current)return;A.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(c.ACTIVE_COMPOSITE_ITEM))??null,l=r?e.get(r)?.index??-1:-1;if(-1!==l)L(l);else if((0,u.isListIndexDisabled)(t,T,y)){let e=(0,u.findNonDisabledListIndex)(t,{disabledIndices:y});(0,u.isIndexOutOfListBounds)(t,e)||L(e)}(0,a.scrollIntoViewIfNeeded)(I.current,r,m,n)});(0,i.useIsoLayoutEffect)(()=>{if(null==y||null!=h||!A.current)return;let e=M.current;if((0,u.isListIndexDisabled)(e,T,y)){let t=(0,u.findNonDisabledListIndex)(e,{disabledIndices:y});(0,u.isIndexOutOfListBounds)(e,t)||L(t)}},[y,h,T,M,L]);let N=(0,o.useStableCallback)((e,t,r)=>g?g(e,t,r,M):r),j=(0,o.useStableCallback)(e=>{let t=e.key===a.HOME||e.key===a.END;if(!a.COMPOSITE_KEYS.has(e.key)||!b&&t||function(e,t){for(let r of a.MODIFIER_KEYS)if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}(e,E)||!I.current)return;let o="rtl"===m,s=o?a.ARROW_LEFT:a.ARROW_RIGHT,i=o?a.ARROW_RIGHT:a.ARROW_LEFT,c="vertical"===n?a.ARROW_DOWN:s,f="vertical"===n?a.ARROW_UP:i,h=(0,d.getTarget)(e.nativeEvent);if(null!=h&&(0,a.isNativeInput)(h)&&!(0,l.isElementDisabled)(h)){let t=h.selectionStart,r=h.selectionEnd,n=h.value;if(null==t||e.shiftKey||t!==r||e.key!==f&&t<n.length||e.key!==c&&t>0)return}let v=T,x=(0,u.getMinListIndex)(M,y),R=(0,u.getMaxListIndex)(M,y);null!=p&&(v=p({disabledIndices:y,elementsRef:M,event:e,highlightedIndex:T,loopFocus:r,maxIndex:R,minIndex:x,onLoop:N,orientation:n,rtl:o}));let C="vertical"!==n&&e.key===s||"horizontal"!==n&&e.key===a.ARROW_DOWN,k="vertical"!==n&&e.key===i||"horizontal"!==n&&e.key===a.ARROW_UP;b&&(e.key===a.HOME?v=x:e.key===a.END&&(v=R)),v===T&&(C||k)&&(r&&v===R&&C?(v=x,g&&(v=g(e,T,v,M))):r&&v===x&&k?(v=R,g&&(v=g(e,T,v,M))):v=(0,u.findNonDisabledListIndex)(M.current,{startingIndex:v,decrement:k,disabledIndices:y})),v===T||(0,u.isIndexOutOfListBounds)(M.current,v)||(S&&e.stopPropagation(),(w||t||C||k)&&e.preventDefault(),L(v,!0),queueMicrotask(()=>{M.current[v]?.focus()}))});return{props:{ref:k,onFocus(e){let t=I.current,r=(0,d.getTarget)(e.nativeEvent);t&&null!=r&&(0,a.isNativeInput)(r)&&r.setSelectionRange(0,r.value.length)},onKeyDown:j},highlightedIndex:T,onHighlightedIndexChange:L,elementsRef:M,onMapChange:O,relayKeyboardEvent:j}}({grid:k,loopFocus:M,onLoop:A,orientation:I,highlightedIndex:C,onHighlightedIndexChange:w,rootRef:N,stopEventPropagation:O,enableHomeAndEndKeys:T,direction:(0,m.useDirection)(),disabledIndices:j,modifierKeys:P}),B=(0,g.useRenderElement)(_,e,{state:E,ref:S,props:[z,...y,V],stateAttributesMapping:R}),q=t.useMemo(()=>({highlightedIndex:F,onHighlightedIndexChange:H,highlightItemOnHover:D,relayKeyboardEvent:U}),[F,H,D,U]);return(0,h.jsx)(p.CompositeRootContext.Provider,{value:q,children:(0,h.jsx)(n.CompositeList,{elementsRef:W,onMapChange:e=>{L?.(e),$(e)},children:B})})}],67149)},63370,e=>{"use strict";e.i(97222);var t=e.i(10364);let r=t.createContext(void 0),n={disableStyleElements:!1};e.s(["useCSPContext",0,function(){return t.useContext(r)??n}])},90741,98689,98464,e=>{"use strict";e.i(10570);var t=e.i(2405),r=e.i(23755),n=e.i(7120),l=e.i(86135),o=e.i(61535),s=e.i(10907),i=e.i(76044),a=e.i(57675),u=e.i(10364),c=e.i(10242),d=e.i(78645),f=e.i(33858),p=e.i(19458),g=e.i(52515),m=e.i(79995),h=e.i(61362),v=e.i(68947),x=e.i(99124),b=e.i(45237),S=e.i(25339),y=e.i(71696),E=e.i(72343),R=e.i(73793),C=e.i(96100),w=e.i(53),I=e.i(11296),k=e.i(50403),M=e.i(87900),A=e.i(63741),T=e.i(51068),L=e.i(99389),O=e.i(92975),N=e.i(35987),j=e.i(51131),P=e.i(91338),D=e.i(98934),_=e.i(63370),V=e.i(21023),z=e.i(45650);let F={...E.popupStateMapping,...w.transitionStatusMapping},H=u.forwardRef(function(e,t){let{render:r,className:n,style:l,finalFocus:o,...s}=e,{store:i,popupRef:a,onOpenChangeComplete:c,setOpen:S,valueRef:E,firstItemTextRef:w,selectedItemTextRef:H,multiple:Y,handleScrollArrowVisibility:G,scrollHandlerRef:K,listRef:X,highlightItemOnHover:J,floatingContext:Q}=(0,y.useSelectRootContext)(),{side:Z,align:ee,alignItemWithTriggerActive:et,isPositioned:er,setControlledAlignItemWithTrigger:en}=(0,R.useSelectPositionerContext)(),el=null!=(0,O.useToolbarRootContext)(!0),eo=(0,V.useDirection)(),{nonce:es,disableStyleElements:ei}=(0,_.useCSPContext)(),ea=(0,v.useStore)(i,M.selectors.id),eu=(0,v.useStore)(i,M.selectors.open),ec=(0,v.useStore)(i,M.selectors.openMethod),ed=(0,v.useStore)(i,M.selectors.mounted),ef=(0,v.useStore)(i,M.selectors.popupProps),ep=(0,v.useStore)(i,M.selectors.transitionStatus),eg=(0,v.useStore)(i,M.selectors.triggerElement),em=(0,v.useStore)(i,M.selectors.positionerElement),eh=(0,v.useStore)(i,M.selectors.listElement),ev=u.useRef(!1),ex=u.useRef(!1),eb=u.useRef({}),eS=(0,x.useAnimationFrame)(),ey=(0,p.useStableCallback)(e=>{var t;if(!em||!a.current||!ex.current)return;let r="0px"===em.style.top,n="0px"===em.style.bottom;if(ev.current||!et||!r&&!n)return void G(e);let l=U(em),o=(t=em.getBoundingClientRect().height,t/l.y),s=(0,g.ownerDocument)(em),i=(0,m.ownerWindow)(em),u=i.getComputedStyle(em),c=parseFloat(u.marginTop),d=parseFloat(u.marginBottom),f=W(i.getComputedStyle(a.current)),p=Math.min(s.documentElement.clientHeight-c-d,f),h=e.scrollTop,v=$(e),x=null,b=e=>{em.style.height=`${e}px`},S=r?v-h:h,y=Math.min(o+S,p);if(S<=D.SCROLL_EDGE_TOLERANCE_PX){let t=(0,P.clamp)(S,0,p-o);t>0&&b(o+t),e.scrollTop=r?v:0,p-(o+t)<=D.SCROLL_EDGE_TOLERANCE_PX&&(ev.current=!0),G(e);return}if(p-y>D.SCROLL_EDGE_TOLERANCE_PX)x=r?1/0:0;else if(n&&h<v){let e=o+S-p;x=h-(S-e)}let E=Math.ceil(y);if(0!==E&&b(E),null!=x){let t=(0,P.clamp)(x,0,$(e));Math.abs(e.scrollTop-t)>D.SCROLL_EDGE_TOLERANCE_PX&&(e.scrollTop=t)}E>=p-D.SCROLL_EDGE_TOLERANCE_PX&&(ev.current=!0),G(e)});u.useImperativeHandle(K,()=>ey,[ey]),(0,I.useOpenChangeComplete)({open:eu,ref:a,onComplete(){eu&&c?.(!0)}}),(0,h.useIsoLayoutEffect)(()=>{em&&a.current&&!Object.keys(eb.current).length&&(eb.current={top:em.style.top||"0",left:em.style.left||"0",right:em.style.right,height:em.style.height,bottom:em.style.bottom,minHeight:em.style.minHeight,maxHeight:em.style.maxHeight,marginTop:em.style.marginTop,marginBottom:em.style.marginBottom})},[a,em]),(0,h.useIsoLayoutEffect)(()=>{eu||et||(ex.current=!1,ev.current=!1,(0,A.clearStyles)(em,eb.current))},[eu,et,em,a]),(0,h.useIsoLayoutEffect)(()=>{let e=a.current;if(!eu||!eg||!em||!e||et&&!er||"ending"===i.state.transitionStatus)return;if(ex.current=!0,e.style.removeProperty("--transform-origin"),!et)return void eS.request(()=>G(eh||e));let t=function(e){let{style:t}=e,r={};for(let[e,n]of q)r[e]=t.getPropertyValue(e),t.setProperty(e,n,"important");return()=>{for(let[e]of q){let n=r[e];n?t.setProperty(e,n):t.removeProperty(e)}}}(e);try{let t,r=H.current;r?.isConnected||(r=!M.selectors.hasSelectedValue(i.state)&&w.current?.isConnected?w.current:null);let n=E.current,l=(0,m.ownerWindow)(em),o=l.getComputedStyle(em),s=l.getComputedStyle(e),a=(0,g.ownerDocument)(eg),u=U(eg),c=B(eg.getBoundingClientRect(),u),d=B(em.getBoundingClientRect(),u),p=c.height,h=eh||e,v=h.scrollHeight,x=parseFloat(s.borderBottomWidth),b=parseFloat(o.marginTop)||10,S=parseFloat(o.marginBottom)||10,y=parseFloat(o.minHeight)||100,R=W(s),C=a.documentElement.clientHeight-b-S,I=a.documentElement.clientWidth,k=C-c.bottom+p,T="rtl"===eo?c.right-d.width:c.left,L=0;if(r&&n){let e=B(n.getBoundingClientRect(),u);t=B(r.getBoundingClientRect(),u),T=d.left+("rtl"===eo?e.right-t.right:e.left-t.left);let l=e.top-c.top+e.height/2;L=t.top-d.top+t.height/2-l}let O=k+L+S+x,N=Math.min(C,O),j=C-b-S,_=O-N;em.style.left=`${(0,P.clamp)(T,5,I-5-d.width)}px`,em.style.height=`${N}px`,em.style.maxHeight="none",em.style.marginTop=`${b}px`,em.style.marginBottom=`${S}px`,e.style.height="100%";let V=$(h),z=_>=V-D.SCROLL_EDGE_TOLERANCE_PX;z&&(N=Math.min(C,d.height)-(_-V));let F=c.top<20||c.bottom>C-20||Math.ceil(N)+D.SCROLL_EDGE_TOLERANCE_PX<Math.min(v,y),q=(l.visualViewport?.scale??1)!==1&&f.platform.engine.webkit;if(F||q){(0,A.clearStyles)(em,eb.current),en(!1);return}let Y=Math.max(y,N);if(z){let e=Math.max(0,C-O);em.style.top=d.height>=j?"0":`${e}px`,em.style.height=`${N}px`,h.scrollTop=$(h)}else em.style.bottom="0",h.scrollTop=_;if(t){let r=d.top,n=d.height,l=t.top+t.height/2,o=(0,P.clamp)(n>0?(l-r)/n*100:50,0,100);e.style.setProperty("--transform-origin",`50% ${o}%`)}(Y===C||N>=R)&&(ev.current=!0),G(h),J&&null===i.state.selectedIndex&&null===i.state.activeIndex&&null!=X.current[0]&&i.set("activeIndex",0)}finally{t()}},[i,eu,em,eg,E,w,H,a,G,et,en,eS,eh,X,J,eo,er]),u.useEffect(()=>{if(!et||!em||!eu)return;let e=(0,m.ownerWindow)(em);return(0,d.addEventListener)(e,"resize",function(e){S(!1,(0,T.createChangeEventDetails)(L.REASONS.windowResize,e))})},[S,et,em,eu]);let eE={...eh?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":Y||void 0,id:`${ea}-list`},onKeyDown(e){el&&N.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()},onScroll(e){eh||ey(e.currentTarget)},...et&&{style:eh?{height:"100%"}:A.LIST_FUNCTIONAL_STYLES},className:!eh&&et?C.styleDisableScrollbar.className:void 0},eR=(0,k.useRenderElement)("div",e,{ref:[t,a],state:{open:eu,transitionStatus:ep,side:Z,align:ee},stateAttributesMapping:F,props:[ef,eE,(0,j.getDisabledMountTransitionStyles)(ep),s]});return(0,z.jsxs)(u.Fragment,{children:[!ei&&C.styleDisableScrollbar.getElement(es),(0,z.jsx)(b.FloatingFocusManager,{context:Q,modal:!1,disabled:!ed,openInteractionType:ec,returnFocus:o,restoreFocus:!0,children:eR})]})});function W(e){let t=e.maxHeight;return t.endsWith("px")&&parseFloat(t)||1/0}function $(e){return(0,D.getMaxScrollOffset)(e.scrollHeight,e.clientHeight)}function U(e){return S.platform.getScale(e)}function B(e,t){return(0,c.rectToClientRect)({x:e.x/t.x,y:e.y/t.y,width:e.width/t.x,height:e.height/t.y})}let q=[["transform","none"],["scale","1"],["translate","0 0"]],Y=u.forwardRef(function(e,t){let{render:r,className:n,style:l,...o}=e,{store:s,scrollHandlerRef:i,multiple:a}=(0,y.useSelectRootContext)(),{alignItemWithTriggerActive:u}=(0,R.useSelectPositionerContext)(),c=(0,v.useStore)(s,M.selectors.hasScrollArrows),d=(0,v.useStore)(s,M.selectors.openMethod),f=(0,v.useStore)(s,M.selectors.id),p={id:`${f}-list`,role:"listbox","aria-multiselectable":a||void 0,onScroll(e){i.current?.(e.currentTarget)},...u&&{style:A.LIST_FUNCTIONAL_STYLES},className:c&&"touch"!==d?C.styleDisableScrollbar.className:void 0},g=s.useStateSetter("listElement");return(0,k.useRenderElement)("div",e,{ref:[t,g],props:[p,o]})});var G=e.i(68285),K=e.i(82420);let X=u.createContext(void 0);function J(){let e=u.useContext(X);if(!e)throw Error((0,K.default)(57));return e}var Q=e.i(45034),Z=e.i(46706),ee=e.i(38810);let et=u.memo(u.forwardRef(function(e,t){let{render:r,className:n,style:l,value:o=null,label:s,disabled:i=!1,nativeButton:a=!1,...c}=e,d=u.useRef(null),f=(0,G.useCompositeListItem)({guess:!0,label:s,textRef:d}),{store:p,itemProps:g,setOpen:m,setValue:x,selectionRef:b,typingRef:S,valuesRef:E,multiple:R,selectedItemTextRef:C,disabled:w,readOnly:I}=(0,y.useSelectRootContext)(),A=w||i,O=(0,v.useStore)(p,M.selectors.isActive,f.index),N=(0,v.useStore)(p,M.selectors.open),j=(0,v.useStore)(p,M.selectors.isSelected,o),P=(0,v.useStore)(p,M.selectors.isSelectedByFocus,f.index),D=(0,v.useStore)(p,M.selectors.isItemEqualToValue),_=f.index,V=u.useRef(null);(0,h.useIsoLayoutEffect)(()=>{let e=E.current;return e[_]=o,()=>{delete e[_]}},[_,o,E]),(0,h.useIsoLayoutEffect)(()=>{let e=p.state.value,t=e;R&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),void 0!==t&&(0,Z.compareItemEquality)(o,t,D)&&(p.set("selectedIndex",_),d.current&&(C.current=d.current))},[_,R,D,p,o,C]);let F=u.useRef("mouse"),H=u.useRef(!1),{getButtonProps:W,buttonRef:$}=(0,Q.useButton)({disabled:A,focusableWhenDisabled:!0,native:a,composite:!0});function U(){b.current.dragY=0}let B=(0,k.useRenderElement)("div",e,{ref:[$,t,f.ref,V],state:{disabled:A,selected:j,highlighted:O},props:[g,{role:"option","aria-selected":j,tabIndex:N&&O?0:-1,onKeyDown(e){p.set("activeIndex",_)," "===e.key&&S.current&&e.preventDefault()},onClick(e){let t="touch"!==F.current,r=e.nativeEvent.pointerType,n=t&&(0,ee.isVirtualClick)(e.nativeEvent)&&(void 0!==r||O),l=t&&!n&&!H.current;H.current=!1,A||l||function(e){if(w||I)return;let t=p.state.value;if(R){let r=Array.isArray(t)?t:[];x(j?(0,Z.removeItem)(r,o,D):[...r,o],(0,T.createChangeEventDetails)(L.REASONS.itemPress,e))}else x(o,(0,T.createChangeEventDetails)(L.REASONS.itemPress,e)),m(!1,(0,T.createChangeEventDetails)(L.REASONS.itemPress,e))}(e.nativeEvent)},onPointerEnter(e){F.current=e.pointerType},onPointerMove(e){if("mouse"===e.pointerType&&1===e.buttons){let t=b.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){F.current=e.pointerType,H.current=!0,U()},onMouseUp(){if(U(),A||"touch"===F.current||H.current)return;let e=!b.current.allowSelectedMouseUp&&j,t=!b.current.allowUnselectedMouseUp&&!j;e||t||(H.current=!0,V.current?.click(),H.current=!1)}},c,W]}),q=u.useMemo(()=>({selected:j,index:_,textRef:d,selectedByFocus:P}),[j,_,d,P]);return(0,z.jsx)(X.Provider,{value:q,children:B})}));var er=e.i(4678);let en=u.forwardRef(function(e,t){let{selected:r}=J();return e.keepMounted||r?(0,z.jsx)(el,{...e,ref:t}):null}),el=u.memo(u.forwardRef((e,t)=>{let{render:r,className:n,style:l,keepMounted:o,...s}=e,{selected:i}=J(),a=u.useRef(null),{transitionStatus:c,setMounted:d}=(0,er.useTransitionStatus)(i),f=(0,k.useRenderElement)("span",e,{ref:[t,a],state:{selected:i,transitionStatus:c},props:[{"aria-hidden":!0,children:"✔️"},s],stateAttributesMapping:w.transitionStatusMapping});return(0,I.useOpenChangeComplete)({open:i,ref:a,onComplete(){i||d(!1)}}),f})),eo=u.memo(u.forwardRef(function(e,t){let{index:r,textRef:n,selectedByFocus:l}=J(),{firstItemTextRef:o,selectedItemTextRef:s}=(0,y.useSelectRootContext)(),{render:i,className:a,style:c,...d}=e,f=u.useCallback(e=>{e&&(0===r&&(o.current=e),l&&(s.current=e))},[o,s,r,l]);return(0,k.useRenderElement)("div",e,{ref:[f,t,n],props:d})})),es=u.forwardRef(function(e,t){let{render:r,className:n,style:l,...o}=e,{store:s}=(0,y.useSelectRootContext)(),{side:i,align:a,arrowRef:u,arrowStyles:c,arrowUncentered:d,alignItemWithTriggerActive:f}=(0,R.useSelectPositionerContext)(),p=(0,v.useStore)(s,M.selectors.open),g=(0,k.useRenderElement)("div",e,{state:{open:p,side:i,align:a,uncentered:d},ref:[u,t],props:[{style:c,"aria-hidden":!0},o],stateAttributesMapping:E.popupTransitionStateMapping});return f?null:g});var ei=e.i(2304);let ea=u.forwardRef(function(e,t){let{render:r,className:n,style:l,direction:o,keepMounted:s,...i}=e,a="up"===o,{store:u,popupRef:c,listRef:d,handleScrollArrowVisibility:f,scrollArrowsMountedCountRef:p}=(0,y.useSelectRootContext)(),{side:g,scrollDownArrowRef:m,scrollUpArrowRef:x}=(0,R.useSelectPositionerContext)(),b=a?M.selectors.scrollUpArrowVisible:M.selectors.scrollDownArrowVisible,S=(0,v.useStore)(u,b),E=(0,v.useStore)(u,M.selectors.openMethod),C=S&&"touch"!==E,A=(0,ei.useTimeout)(),T=a?x:m,{mounted:L,transitionStatus:O,setMounted:N}=(0,er.useTransitionStatus)(C);(0,h.useIsoLayoutEffect)(()=>(p.current+=1,u.set("hasScrollArrows",!0),()=>{p.current=Math.max(0,p.current-1),0===p.current&&u.set("hasScrollArrows",!1)}),[u,p]),(0,I.useOpenChangeComplete)({open:C,ref:T,onComplete(){C||N(!1)}});let j=(0,k.useRenderElement)("div",e,{ref:[t,T],state:{direction:o,visible:C,side:g,transitionStatus:O},props:[{"aria-hidden":!0,children:a?"▲":"▼",style:{position:"absolute"},onMouseMove(e){0===e.movementX&&0===e.movementY||A.isStarted()||(u.set("activeIndex",null),A.start(40,function e(){let t=u.state.listElement??c.current;if(!t)return;u.set("activeIndex",null),f(t);let r=(0,D.getMaxScrollOffset)(t.scrollHeight,t.clientHeight),n=(0,D.normalizeScrollOffset)(t.scrollTop,r),l=n===(a?0:r),o=d.current;if(n!==t.scrollTop&&(t.scrollTop=n),l)return void A.clear();if(o.length>0){let e=T.current?.offsetHeight||0;t.scrollTop=function(e,t,r,n,l,o){if(t){let t=0,n=r+l-D.SCROLL_EDGE_TOLERANCE_PX;for(let r=0;r<e.length;r+=1){let l=e[r];if(l&&l.offsetTop>=n){t=r;break}}let s=Math.max(0,t-1),i=e[s];return s<t&&i?(0,D.normalizeScrollOffset)(i.offsetTop-l,o):0}let s=e.length-1,i=r+n-l+D.SCROLL_EDGE_TOLERANCE_PX;for(let t=0;t<e.length;t+=1){let r=e[t];if(r&&r.offsetTop+r.offsetHeight>i){s=Math.max(0,t-1);break}}let a=Math.min(e.length-1,s+1),u=e[a];return a>s&&u?(0,D.normalizeScrollOffset)(u.offsetTop+u.offsetHeight-n+l,o):o}(o,a,n,t.clientHeight,e,r)}A.start(40,e)}))},onMouseLeave(){A.clear()}},i],stateAttributesMapping:w.transitionStatusMapping});return L||s?j:null}),eu=u.forwardRef(function(e,t){return(0,z.jsx)(ea,{...e,ref:t,direction:"down"})}),ec=u.forwardRef(function(e,t){return(0,z.jsx)(ea,{...e,ref:t,direction:"up"})}),ed=u.createContext(void 0),ef=u.forwardRef(function(e,t){let{render:r,className:n,style:l,...o}=e,[s,i]=u.useState(),a=u.useMemo(()=>({labelId:s,setLabelId:i}),[s,i]),c=(0,k.useRenderElement)("div",e,{ref:t,props:[{role:"group","aria-labelledby":s},o]});return(0,z.jsx)(ed.Provider,{value:a,children:c})});var ep=e.i(99281);let eg=u.forwardRef(function(e,t){let{render:r,className:n,style:l,id:o,...s}=e,{setLabelId:i}=function(){let e=u.useContext(ed);if(void 0===e)throw Error((0,K.default)(56));return e}(),a=(0,ep.useBaseUiId)(o);return(0,h.useIsoLayoutEffect)(()=>(i(a),()=>{i(e=>e===a?void 0:e)}),[a,i]),(0,k.useRenderElement)("div",e,{ref:t,props:[{id:a},s]})}),em=u.forwardRef(function(e,t){let{className:r,render:n,orientation:l="horizontal",style:o,...s}=e;return(0,k.useRenderElement)("div",e,{state:{orientation:l},ref:t,props:[{role:"presentation"},s]})});e.s(["Arrow",0,es,"Backdrop",()=>i.SelectBackdrop,"Group",0,ef,"GroupLabel",0,eg,"Icon",()=>o.SelectIcon,"Item",0,et,"ItemIndicator",0,en,"ItemText",0,eo,"Label",()=>r.SelectLabel,"List",0,Y,"Popup",0,H,"Portal",()=>s.SelectPortal,"Positioner",()=>a.SelectPositioner,"Root",()=>t.SelectRoot,"ScrollDownArrow",0,eu,"ScrollUpArrow",0,ec,"Separator",0,em,"Trigger",()=>n.SelectTrigger,"Value",()=>l.SelectValue],47737);var eh=e.i(47737);e.s(["Select",0,eh],90741);let ev=(0,e.i(13496).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,ev],98689),e.s(["ChevronDownIcon",0,ev],98464)},10570,75567,e=>{"use strict";e.s([],10570);var t=e.i(10364);e.s(["useOnFirstRender",0,function(e){let r=t.useRef(!0);r.current&&(r.current=!1,e())}],75567)},57675,73793,63741,59019,e=>{"use strict";var t=e.i(10364),r=e.i(33262),n=e.i(61362),l=e.i(19458),o=e.i(68947),s=e.i(71696),i=e.i(6385),a=e.i(58479),u=e.i(82420);let c=t.createContext(void 0);e.s(["SelectPositionerContext",0,c,"useSelectPositionerContext",0,function(){let e=t.useContext(c);if(!e)throw Error((0,u.default)(59));return e}],73793);var d=e.i(54222),f=e.i(51162);function p(e,t){e&&Object.assign(e.style,t)}e.s(["LIST_FUNCTIONAL_STYLES",0,{position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},"clearStyles",0,p],63741);var g=e.i(87900),m=e.i(51068),h=e.i(99389),v=e.i(46706),x=e.i(2690),b=e.i(52515),S=e.i(87252);function y(e,r,l,o){let[s,i]=t.useState(!1);(0,n.useIsoLayoutEffect)(()=>{if(!e||!r||null==l)return void i(!1);let t=(0,b.ownerDocument)(l).documentElement.clientWidth,n=l.offsetWidth;i(t>0&&n>0&&n>=t-20)},[e,r,l]),(0,S.useScrollLock)(e&&(!r||s),o)}e.s(["useAnchoredPopupScrollLock",0,y],59019);var E=e.i(45650);let R={position:"fixed"},C=t.forwardRef(function(e,u){let{anchor:b,className:S,render:C,positionMethod:w,side:I,align:k,sideOffset:M,alignOffset:A,collisionBoundary:T="clipping-ancestors",collisionPadding:L,arrowPadding:O,sticky:N,disableAnchorTracking:j,alignItemWithTrigger:P=!0,collisionAvoidance:D=f.DROPDOWN_COLLISION_AVOIDANCE,style:_,...V}=e,{store:z,listRef:F,labelsRef:H,alignItemWithTriggerActiveRef:W,selectedItemTextRef:$,valuesRef:U,initialValueRef:B,popupRef:q,setValue:Y,floatingContext:G}=(0,s.useSelectRootContext)(),K=(0,o.useStore)(z,g.selectors.open),X=(0,o.useStore)(z,g.selectors.mounted),J=(0,o.useStore)(z,g.selectors.modal),Q=(0,o.useStore)(z,g.selectors.value),Z=(0,o.useStore)(z,g.selectors.openMethod),ee=(0,o.useStore)(z,g.selectors.positionerElement),et=(0,o.useStore)(z,g.selectors.triggerElement),er=(0,o.useStore)(z,g.selectors.isItemEqualToValue),en=(0,o.useStore)(z,g.selectors.transitionStatus),el=t.useRef(null),eo=t.useRef(null),[es,ei]=t.useState(P),ea=X&&es&&"touch"!==Z;X||es===P||ei(P),t.useImperativeHandle(W,()=>ea),y((ea||J)&&K,"touch"===Z,ee,et);let eu=(0,a.useAnchorPositioning)({anchor:b,floatingRootContext:G,positionMethod:w,mounted:X,side:I,sideOffset:M,align:k,alignOffset:A,arrowPadding:O,collisionBoundary:T,collisionPadding:L,sticky:N,disableAnchorTracking:j??ea,collisionAvoidance:D,keepMounted:!0}),ec=ea?"none":eu.side,ed=ea?R:eu.positionerStyles,ef={open:K,side:ec,align:eu.align,anchorHidden:eu.anchorHidden};(0,n.useIsoLayoutEffect)(()=>{z.set("popupSide",eu.side)},[z,eu.side]);let ep=z.useStateSetter("positionerElement"),eg=(0,x.usePositioner)(e,ef,{styles:ed,transitionStatus:en,props:V,refs:[u,ep],hidden:!X,inert:!K}),em=t.useRef(0),eh=(0,l.useStableCallback)(e=>{if(0===U.current.length)return;let t=em.current;if(em.current=e.size,e.size===t)return;let r=(0,m.createChangeEventDetails)(h.REASONS.none);if(0!==t&&!z.state.multiple&&null!==Q&&-1===(0,v.findItemIndex)(U.current,Q,er)){let e=B.current,t=null!=e&&-1!==(0,v.findItemIndex)(U.current,e,er)?e:null;Y(t,r),null===t&&(z.set("selectedIndex",null),$.current=null)}if(0!==t&&z.state.multiple&&Array.isArray(Q)){let e=Q.filter(e=>-1!==(0,v.findItemIndex)(U.current,e,er));e.length!==Q.length&&(Y(e,r),0===e.length&&(z.set("selectedIndex",null),$.current=null))}if(K&&ea){z.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:""};p(ee,e),p(q.current,e)}}),ev=t.useMemo(()=>({...eu,side:ec,alignItemWithTriggerActive:ea,setControlledAlignItemWithTrigger:ei,scrollUpArrowRef:el,scrollDownArrowRef:eo}),[eu,ec,ea,ei]);return(0,E.jsx)(i.CompositeList,{elementsRef:F,labelsRef:H,onMapChange:eh,children:(0,E.jsxs)(c.Provider,{value:ev,children:[X&&J&&(0,E.jsx)(d.InternalBackdrop,{inert:(0,r.inertValue)(!K),cutout:et}),eg]})})});e.s(["SelectPositioner",0,C],57675)},2405,23755,7120,86135,61535,10907,76044,e=>{"use strict";var t=e.i(10364),r=e.i(88333),n=e.i(49939),l=e.i(17975),o=e.i(75567),s=e.i(39399),i=e.i(54130),a=e.i(25587),u=e.i(61362),c=e.i(19458),d=e.i(46230),f=e.i(68947),p=e.i(68790),g=e.i(53076),m=e.i(76072),h=e.i(28698),v=e.i(4864),x=e.i(38419),b=e.i(94020),S=e.i(71696),y=e.i(12147),E=e.i(29134),R=e.i(10883),C=e.i(4678),w=e.i(87900),I=e.i(51068),k=e.i(99389),M=e.i(11296),A=e.i(18674),T=e.i(72033),L=e.i(46706),O=e.i(29549),N=e.i(75491),j=e.i(27229),P=e.i(98934),D=e.i(1556),_=e.i(29494),V=e.i(45650);e.s(["SelectRoot",0,function(e){let{id:z,value:F,defaultValue:H=null,onValueChange:W,open:$,defaultOpen:U=!1,onOpenChange:B,name:q,form:Y,autoComplete:G,disabled:K=!1,readOnly:X=!1,required:J=!1,modal:Q=!0,actionsRef:Z,inputRef:ee,onOpenChangeComplete:et,items:er,multiple:en=!1,itemToStringLabel:el,itemToStringValue:eo,isItemEqualToValue:es=L.defaultItemEquality,highlightItemOnHover:ei=!0,children:ea}=e,{clearErrors:eu}=(0,A.useFormContext)(),{setDirty:ec,setTouched:ed,setFocused:ef,validityData:ep,setFilled:eg,name:em,disabled:eh,validation:ev,validationMode:ex}=(0,y.useFieldRootContext)(),eb=(0,R.useLabelableId)({id:z}),eS=eh||K,ey=em??q,[eE,eR]=(0,a.useControlled)({controlled:F,default:en?H??g.EMPTY_ARRAY:H,name:"Select",state:"value"}),[eC,ew]=(0,a.useControlled)({controlled:$,default:U,name:"Select",state:"open"}),eI=t.useRef([]),ek=t.useRef([]),eM=t.useRef(null),eA=t.useRef(null),eT=t.useRef(0),eL=t.useRef(null),eO=t.useRef([]),eN=t.useRef(!1),ej=t.useRef(null),eP=t.useRef(null),eD=t.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),e_=t.useRef(!1),{mounted:eV,setMounted:ez,transitionStatus:eF}=(0,C.useTransitionStatus)(eC),{openMethod:eH,triggerProps:eW}=(0,j.useOpenInteractionType)(eC),e$=(0,l.useRefWithInit)(()=>new p.ReactStore({id:eb,labelId:void 0,modal:Q,multiple:en,itemToStringLabel:el,itemToStringValue:eo,isItemEqualToValue:es,value:eE,open:eC,mounted:eV,transitionStatus:eF,items:er,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,eU=(0,f.useStore)(e$,w.selectors.activeIndex),eB=(0,f.useStore)(e$,w.selectors.selectedIndex),eq=(0,f.useStore)(e$,w.selectors.triggerElement),eY=(0,f.useStore)(e$,w.selectors.positionerElement),eG=(0,s.usePreviousValue)(eH),eK=eH??eG,eX=t.useMemo(()=>en?"":(0,T.stringifyAsValue)(eE,eo),[en,eE,eo]),eJ=t.useMemo(()=>en&&Array.isArray(eE)?eE.map(e=>(0,T.stringifyAsValue)(e,eo)):(0,T.stringifyAsValue)(eE,eo),[en,eE,eo]),eQ=(0,d.useValueAsRef)(eq),eZ=(0,c.useStableCallback)(()=>eJ);(0,E.useRegisterFieldControl)(eQ,eb,eE,eZ,!eS,q);let e0=t.useRef(eE),e1=en?Array.isArray(eE)&&eE.length>0:null!=eE&&""!==eX;(0,u.useIsoLayoutEffect)(()=>{eg(e1)},[e1,eg]),(0,u.useIsoLayoutEffect)(function(){let e=eE,t=!1;if(en){let r=Array.isArray(eE)?eE:[];t=0===r.length,e=r[r.length-1]}let r=t?-1:(0,L.findItemIndex)(eO.current,e,es),n=-1===r?null:r;null===n&&(eP.current=null),eC||e$.set("selectedIndex",n)},[en,eC,eE,es,e$]),(0,N.useValueChanged)(eE,()=>{let e;eu(ey),ec((e=ep.initialValue,Array.isArray(eE)&&Array.isArray(e)?!(0,O.areArraysEqual)(eE,e,(e,t)=>(0,L.compareItemEquality)(e,t,es)):eE!==e)),ev.change(eE)});let e4=(0,c.useStableCallback)((e,t)=>{B?.(e,t),!t.isCanceled&&(ew(e),e||t.reason!==k.REASONS.focusOut&&t.reason!==k.REASONS.outsidePress||(ed(!0),ef(!1),"onBlur"===ex&&ev.commit(eE)))}),e2=(0,c.useStableCallback)(()=>{ez(!1),e$.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),et?.(!1)});(0,M.useOpenChangeComplete)({enabled:!Z,open:eC,ref:eM,onComplete(){eC||e2()}}),t.useImperativeHandle(Z,()=>({unmount:e2}),[e2]);let e5=(0,c.useStableCallback)((e,t)=>{W?.(e,t),t.isCanceled||eR(e)}),e6=(0,c.useStableCallback)(e=>{let t=(0,P.getMaxScrollOffset)(e.scrollHeight,e.clientHeight),r=(0,P.normalizeScrollOffset)(e.scrollTop,t);e$.set("scrollUpArrowVisible",r>0),e$.set("scrollDownArrowVisible",r<t)}),e9=(0,v.useFloatingRootContext)({open:eC,onOpenChange:e4,elements:{reference:eq,floating:eY}}),e3=(0,m.useClick)(e9,{enabled:!X&&!eS,event:"mousedown"}),e7=(0,h.useDismiss)(e9),e8=(0,x.useListNavigation)(e9,{enabled:!X&&!eS,listRef:eI,activeIndex:eU,selectedIndex:eB,disabledIndices:g.EMPTY_ARRAY,onNavigate(e){(null!==e||eC)&&e$.set("activeIndex",e)},focusItemOnHover:ei}),te=(0,b.useTypeahead)(e9,{enabled:!X&&!eS&&(eC||!en),listRef:ek,activeIndex:eU,selectedIndex:eB,disabledIndices:e=>(0,i.isElementDisabled)(eI.current[e]),onMatch(e){eC?e$.set("activeIndex",e):e5(eO.current[e],(0,I.createChangeEventDetails)(k.REASONS.none))},onTyping(e){eN.current=e}}),tt=t.useMemo(()=>(0,_.mergeProps)(te.reference,e8.reference,e7.reference,e3.reference,eW),[e3.reference,te.reference,e8.reference,e7.reference,eW]),tr=t.useMemo(()=>(0,_.mergeProps)(D.FOCUSABLE_POPUP_PROPS,te.floating,e8.floating,e7.floating),[te.floating,e8.floating,e7.floating]),tn=e8.item??g.EMPTY_OBJECT;(0,o.useOnFirstRender)(()=>{e$.update({popupProps:tr,triggerProps:tt})}),e$.useSyncedValues({id:eb,modal:Q,multiple:en,value:eE,open:eC,mounted:eV,transitionStatus:eF,popupProps:tr,triggerProps:tt,items:er,itemToStringLabel:el,itemToStringValue:eo,isItemEqualToValue:es,openMethod:eK});let tl=t.useMemo(()=>({store:e$,floatingContext:e9,required:J,disabled:eS,readOnly:X,multiple:en,highlightItemOnHover:ei,setValue:e5,setOpen:e4,listRef:eI,popupRef:eM,scrollHandlerRef:eA,handleScrollArrowVisibility:e6,scrollArrowsMountedCountRef:eT,itemProps:tn,valueRef:eL,valuesRef:eO,labelsRef:ek,typingRef:eN,selectionRef:eD,firstItemTextRef:ej,selectedItemTextRef:eP,validation:ev,onOpenChangeComplete:et,alignItemWithTriggerActiveRef:e_,initialValueRef:e0}),[e$,e9,J,eS,X,en,ei,e5,e4,tn,ev,et,e6]),to=(0,n.useMergedRefs)(ee,ev.inputRef),ts=en?void 0:ey,ti=t.useMemo(()=>en&&Array.isArray(eE)&&ey?eE.map(e=>{let t=(0,T.stringifyAsValue)(e,eo);return(0,V.jsx)("input",{type:"hidden",form:Y,name:ey,value:t,disabled:eS},t)}):null,[en,eE,Y,ey,eo,eS]);return(0,V.jsxs)(S.SelectRootContext.Provider,{value:tl,children:[ea,(0,V.jsx)("input",{...ev.getValidationProps(eS,{onFocus(){e$.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||eS||X)return;let t=e.currentTarget.value,r=(0,I.createChangeEventDetails)(k.REASONS.none,e.nativeEvent);e$.set("forceMount",!0),queueMicrotask(function(){if(en)return;let e=t.toLowerCase(),n=eO.current.findIndex(t=>(0,T.stringifyAsValue)(t,eo).toLowerCase()===e||(0,T.stringifyAsLabel)(t,el).toLowerCase()===e);-1===n&&(n=eO.current.findIndex((t,r)=>{let n=ek.current[r];return null!=n&&n.toLowerCase()===e}));let l=eO.current[n];null!=l&&e5(l,r)})}}),id:eb&&null==ts?`${eb}-hidden-input`:void 0,form:Y,name:ts,autoComplete:G,value:eX,disabled:eS,required:J&&!(en&&e1),readOnly:X,ref:to,style:ey?r.visuallyHiddenInput:r.visuallyHidden,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),ti]})}],2405);var z=e.i(50403),F=e.i(3527),H=e.i(52135);let W=t.forwardRef(function(e,t){let{render:r,className:n,style:l,...o}=e;delete o.id;let s=(0,y.useFieldRootContext)(),{store:i}=(0,S.useSelectRootContext)(),a=(0,f.useStore)(i,w.selectors.triggerElement),u=(0,f.useStore)(i,w.selectors.id),c=null==u?void 0:`${u}-label`,d=(0,H.useLabel)({id:c,fallbackControlId:a?.id??u,setLabelId(e){let t="function"==typeof e?e(i.state.labelId):e;i.set("labelId",t)}});return(0,z.useRenderElement)("div",e,{ref:t,state:s.state,props:[d,o],stateAttributesMapping:F.fieldValidityMapping})});e.s(["SelectLabel",0,W],23755);var $=e.i(52515),U=e.i(2304),B=e.i(86613),q=e.i(72343),Y=e.i(79995),G=e.i(33858),K=e.i(29148),X=e.i(17049),J=e.i(45034);let Q={...q.pressableTriggerOpenStateMapping,...F.fieldValidityMapping,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},Z=t.forwardRef(function(e,r){let{render:n,className:l,id:o,disabled:s=!1,nativeButton:i=!0,style:a,...u}=e,{setTouched:c,setFocused:p,validationMode:g,state:m,disabled:h}=(0,y.useFieldRootContext)(),{labelId:v}=(0,B.useLabelableContext)(),{store:x,setOpen:b,selectionRef:E,validation:C,readOnly:M,required:A,alignItemWithTriggerActiveRef:T,disabled:L}=(0,S.useSelectRootContext)(),O=h||L||s,N=(0,f.useStore)(x,w.selectors.open),j=(0,f.useStore)(x,w.selectors.mounted),P=(0,f.useStore)(x,w.selectors.value),D=(0,f.useStore)(x,w.selectors.triggerProps),V=(0,f.useStore)(x,w.selectors.positionerElement),F=(0,f.useStore)(x,w.selectors.listElement),H=(0,f.useStore)(x,w.selectors.popupSide),W=(0,f.useStore)(x,w.selectors.id),q=(0,f.useStore)(x,w.selectors.labelId),Z=(0,f.useStore)(x,w.selectors.hasSelectedValue),ee=j&&V?H:null,et=o??W;(0,R.useLabelableId)({id:et});let er=(0,d.useValueAsRef)(V),en=t.useRef(null),{getButtonProps:el,buttonRef:eo}=(0,J.useButton)({disabled:O,native:i}),es=x.useStateSetter("triggerElement"),ei=(0,U.useTimeout)(),ea=(0,U.useTimeout)(),eu=(0,U.useTimeout)();t.useEffect(()=>{if(N)return eu.start(400,()=>{E.current.allowUnselectedMouseUp=!0,E.current.allowSelectedMouseUp=!0}),()=>{eu.clear()};E.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},ea.clear()},[N,E,ea,eu]);let ec=(0,_.mergeProps)(D,{id:et,role:"combobox","aria-expanded":N,"aria-haspopup":"listbox","aria-controls":N?F?.id??(0,X.getFloatingFocusElement)(V)?.id:void 0,"aria-labelledby":v??q,"aria-readonly":M||void 0,"aria-required":A||void 0,tabIndex:O?-1:0,onFocus(e){p(!0),N&&T.current&&b(!1,(0,I.createChangeEventDetails)(k.REASONS.none,e.nativeEvent)),ei.start(0,()=>{x.set("forceMount",!0)})},onBlur(e){(0,K.contains)(V,e.relatedTarget)||(c(!0),p(!1),"onBlur"===g&&C.commit(P))},onMouseDown(e){if(N)return;let t=(0,$.ownerDocument)(e.currentTarget);function r(e){let t;if(!en.current)return;let r=e.target;!((0,K.contains)(en.current,r)||(0,K.contains)(er.current,r))&&(t=function(e){let t=e.getBoundingClientRect(),r=(0,Y.ownerWindow)(e);if(G.platform.env.jsdom)return t;let n=r.getComputedStyle(e,"::before"),l=r.getComputedStyle(e,"::after");if("none"===n.content&&"none"===l.content)return t;let o=parseFloat(n.width)||0,s=parseFloat(n.height)||0,i=parseFloat(l.width)||0,a=parseFloat(l.height)||0,u=Math.max(t.width,o,i),c=Math.max(t.height,s,a),d=u-t.width,f=c-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}(en.current),e.clientX>=t.left-5&&e.clientX<=t.right+5&&e.clientY>=t.top-5&&e.clientY<=t.bottom+5||b(!1,(0,I.createChangeEventDetails)(k.REASONS.cancelOpen,e)))}ea.start(0,()=>{t.addEventListener("mouseup",r,{once:!0})})}},u,el),ed=C.getValidationProps(O,ec);ed.role="combobox";let ef={...m,open:N,disabled:O,value:P,readOnly:M,popupSide:ee,placeholder:!Z};return(0,z.useRenderElement)("button",e,{ref:[r,en,eo,es],state:ef,stateAttributesMapping:Q,props:ed})});e.s(["SelectTrigger",0,Z],7120);let ee={value:()=>null},et=t.forwardRef(function(e,t){let{className:r,render:n,children:l,placeholder:o,style:s,...i}=e,{store:a,valueRef:u}=(0,S.useSelectRootContext)(),c=(0,f.useStore)(a,w.selectors.value),d=(0,f.useStore)(a,w.selectors.items),p=(0,f.useStore)(a,w.selectors.itemToStringLabel),g=(0,f.useStore)(a,w.selectors.hasSelectedValue),m=!g&&null!=o&&null==l,h=(0,f.useStore)(a,w.selectors.hasNullItemLabel,m),v=null;return v="function"==typeof l?l(c):null!=l?l:m&&!h?o:Array.isArray(c)?(0,T.resolveMultipleLabels)(c,d,p):(0,T.resolveSelectedLabel)(c,d,p),(0,z.useRenderElement)("span",e,{state:{value:c,placeholder:!g},ref:[t,u],props:[{children:v},i],stateAttributesMapping:ee})});e.s(["SelectValue",0,et],86135);let er=t.forwardRef(function(e,t){let{render:r,className:n,style:l,...o}=e,{store:s}=(0,S.useSelectRootContext)(),i=(0,f.useStore)(s,w.selectors.open);return(0,z.useRenderElement)("span",e,{state:{open:i},ref:t,props:[{"aria-hidden":!0,children:"▼"},o],stateAttributesMapping:q.triggerOpenStateMapping})});e.s(["SelectIcon",0,er],61535);var en=e.i(45247);let el=t.forwardRef(function(e,t){let{store:r}=(0,S.useSelectRootContext)(),n=(0,f.useStore)(r,w.selectors.mounted),l=(0,f.useStore)(r,w.selectors.forceMount);return n||l?(0,V.jsx)(en.FloatingPortal,{ref:t,...e}):null});e.s(["SelectPortal",0,el],10907);var eo=e.i(53);let es={...q.popupStateMapping,...eo.transitionStatusMapping},ei=t.forwardRef(function(e,t){let{render:r,className:n,style:l,...o}=e,{store:s}=(0,S.useSelectRootContext)(),i=(0,f.useStore)(s,w.selectors.open),a=(0,f.useStore)(s,w.selectors.mounted),u=(0,f.useStore)(s,w.selectors.transitionStatus);return(0,z.useRenderElement)("div",e,{state:{open:i,transitionStatus:u},ref:t,props:[{role:"presentation",hidden:!a,style:{userSelect:"none",WebkitUserSelect:"none"}},o],stateAttributesMapping:es})});e.s(["SelectBackdrop",0,ei],76044)},92975,e=>{"use strict";e.i(97222);var t=e.i(82420),r=e.i(10364);let n=r.createContext(void 0);e.s(["useToolbarRootContext",0,function(e){let l=r.useContext(n);if(void 0===l&&!e)throw Error((0,t.default)(69));return l}])},98934,91338,e=>{"use strict";function t(e,r=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(r,Math.min(e,n))}e.s(["clamp",0,t],91338),e.s(["SCROLL_EDGE_TOLERANCE_PX",0,1,"getMaxScrollOffset",0,function(e,t){return Math.max(0,e-t)},"normalizeScrollOffset",0,function(e,r){if(r<=0)return 0;let n=t(e,0,r),l=r-n,o=n<=1,s=l<=1;return o&&s?n<=l?0:r:o?0:s?r:n}],98934)},96100,e=>{"use strict";e.i(97222);var t=e.i(45650);let r="base-ui-disable-scrollbar";e.s(["styleDisableScrollbar",0,{className:r,getElement:e=>(0,t.jsx)("style",{nonce:e,href:r,precedence:"base-ui:low",children:`.${r}{scrollbar-width:none}.${r}::-webkit-scrollbar{display:none}`})}])},54130,e=>{"use strict";e.s(["isElementDisabled",0,function(e){return null==e||e.hasAttribute("disabled")||"true"===e.getAttribute("aria-disabled")}])},3151,51958,e=>{"use strict";var t=e.i(13496);let r=(0,t.default)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);e.s(["BarChart3",0,r],3151);let n=(0,t.default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["Bot",0,n],51958)},250,e=>{"use strict";let t=(0,e.i(13496).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["default",0,t])},84304,e=>{"use strict";let t=(0,e.i(13496).default)("corner-down-left",[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]]);e.s(["CornerDownLeft",0,t],84304)},44467,e=>{"use strict";let t=(0,e.i(13496).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",0,t],44467)},9590,e=>{"use strict";let t=(0,e.i(13496).default)("list-tree",[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]]);e.s(["ListTree",0,t],9590)},7725,99160,73365,e=>{"use strict";var t=e.i(13496);let r=(0,t.default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,r],7725);let n=(0,t.default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,n],99160);let l=(0,t.default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",0,l],73365)},288,92930,44474,e=>{"use strict";var t=e.i(13496);let r=(0,t.default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);e.s(["Monitor",0,r],288);let n=(0,t.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["Moon",0,n],92930);let l=(0,t.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,l],44474)},42893,e=>{"use strict";let t=(0,e.i(13496).default)("wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);e.s(["Wallet",0,t],42893)},84445,10,e=>{"use strict";var t=e.i(45650),r=e.i(10364),n=e.i(57864),l=e.i(3151),o=e.i(51958),s=e.i(84304),i=e.i(44467),a=e.i(56248),u=e.i(9590),c=e.i(7725),d=e.i(37755),f=e.i(99160),p=e.i(73365),g=e.i(42893);let m=(0,e.i(13496).default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);e.s(["Wrench",0,m],10);var h=e.i(76639),v=e.i(19455),x=e.i(46816),b=e.i(75379),S=e.i(75157);let y="asv:open-search",E=[{label:"Analytics",href:"/?tab=analytics",icon:l.BarChart3},{label:"Usage",href:"/?tab=usage",icon:g.Wallet},{label:"Projects",href:"/?tab=projects",icon:a.FolderGit2},{label:"Sessions",href:"/?tab=sessions",icon:u.ListTree},{label:"Logs",href:"/?tab=logs",icon:i.FileText}],R={user:{label:"Prompt",icon:p.User},assistant:{label:"Reply",icon:o.Bot},thinking:{label:"Thinking",icon:o.Bot},tool:{label:"Tool call",icon:m},result:{label:"Tool output",icon:f.Terminal}};function C({text:e,terms:n}){let l=(0,r.useMemo)(()=>{let e=n.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));return e.length>0?RegExp(`(${e.join("|")})`,"gi"):null},[n]);return l?e.split(l).map((e,n)=>n%2==1?(0,t.jsx)("mark",{className:"rounded-xs bg-brand/20 text-foreground",children:e},n):(0,t.jsx)(r.Fragment,{children:e},n)):e}e.s(["CommandPalette",0,function(){let e=(0,n.useRouter)(),[l,o]=(0,r.useState)(!1),[i,a]=(0,r.useState)(""),[u,f]=(0,r.useState)(null),[p,g]=(0,r.useState)(!1),[m,v]=(0,r.useState)(0),w=(0,r.useRef)(null),I=(0,r.useCallback)(e=>{o(e),a(""),f(null),g(!1),v(0)},[]),k=i.trim(),M=k.replace(/\s+/g,"").length>=2,A=M&&!p&&u?.query!==k;(0,r.useEffect)(()=>{function e(e){"k"===e.key.toLowerCase()&&(e.metaKey||e.ctrlKey)&&!e.altKey&&(e.preventDefault(),I(e=>!e))}let t=()=>I(!0);return window.addEventListener("keydown",e),window.addEventListener(y,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(y,t)}},[I]),(0,r.useEffect)(()=>{if(!M)return;let e=new AbortController,t=setTimeout(async()=>{try{let t=await fetch(`/api/search?q=${encodeURIComponent(k)}`,{signal:e.signal});if(!t.ok)throw Error("Request failed");f(await t.json()),v(0)}catch{e.signal.aborted||g(!0)}},150);return()=>{clearTimeout(t),e.abort()}},[k,M]);let T=(0,r.useMemo)(()=>k.toLowerCase().split(/\s+/).filter(Boolean),[k]),L=E.filter(e=>e.label.toLowerCase().includes(k.toLowerCase())),O=M?u?.results??[]:[],N=[...L.map(e=>({key:`page:${e.href}`,href:e.href})),...O.flatMap(e=>{let t=`/sessions/${e.provider}/${e.id}`,r=`${t}?q=${encodeURIComponent(k)}`;return[{key:`session:${e.provider}:${e.id}`,href:e.matchCount>0?r:t},...e.hits.map((t,n)=>({key:`hit:${e.provider}:${e.id}:${n}`,href:r}))]})];function j(t){I(!1),e.push(t)}(0,r.useEffect)(()=>{w.current?.querySelector(`[data-index="${m}"]`)?.scrollIntoView({block:"nearest"})},[m]);let P=e=>{let t=N.findIndex(t=>t.key===e);return{"data-index":t,role:"option","aria-selected":t===m,onMouseMove:()=>v(t),onClick:()=>j(N[t].href),className:(0,S.cn)("flex w-full cursor-pointer items-center gap-2.5 px-4 text-left",t===m&&"bg-muted")}};return(0,t.jsx)(h.Dialog,{open:l,onOpenChange:I,children:(0,t.jsxs)(h.DialogContent,{className:"top-[12vh] max-h-[76vh] translate-y-0 gap-0 overflow-hidden p-0 sm:max-w-2xl",children:[(0,t.jsx)(h.DialogTitle,{className:"sr-only",children:"Search"}),(0,t.jsx)(h.DialogDescription,{className:"sr-only",children:"Search the text of every session, or jump to a page."}),(0,t.jsxs)("div",{className:"flex items-center gap-2.5 border-b border-border py-3 pr-12 pl-4",children:[A?(0,t.jsx)(c.Loader2,{className:"size-4 animate-spin text-muted-foreground","aria-hidden":!0}):(0,t.jsx)(d.Search,{className:"size-4 text-muted-foreground","aria-hidden":!0}),(0,t.jsx)("input",{autoFocus:!0,value:i,onChange:e=>{a(e.target.value),g(!1),v(0)},onKeyDown:function(e){if("ArrowDown"===e.key||"ArrowUp"===e.key){if(e.preventDefault(),0===N.length)return;let t="ArrowDown"===e.key?1:-1;v(e=>(e+t+N.length)%N.length)}else"Enter"===e.key&&N[m]&&(e.preventDefault(),j(N[m].href))},placeholder:"Search prompts, replies, commands and tool output…","aria-label":"Search all sessions",role:"combobox","aria-expanded":!0,"aria-controls":"cv-palette-list",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),(0,t.jsxs)("div",{ref:w,id:"cv-palette-list",role:"listbox",className:"min-h-0 flex-1 shrink! overflow-y-auto py-1.5",children:[L.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"px-4 pt-1.5 pb-1 text-[11px] font-medium tracking-wide text-muted-foreground uppercase",children:"Go to"}),L.map(e=>(0,t.jsxs)("div",{...P(`page:${e.href}`),children:[(0,t.jsx)(e.icon,{className:"size-3.5 shrink-0 text-muted-foreground","aria-hidden":!0}),(0,t.jsx)("span",{className:"py-1.5 text-sm",children:e.label})]},e.href))]}),M&&u&&(0,t.jsx)("p",{className:"px-4 pt-3 pb-1 text-[11px] font-medium tracking-wide text-muted-foreground uppercase",children:0===u.total?"Sessions":u.total>O.length?`Sessions \xb7 first ${O.length} of ${u.total}`:`Sessions \xb7 ${u.total}`}),O.map(e=>{let r=(0,x.providerStyle)(e.provider),n=`${e.provider}:${e.id}`;return(0,t.jsxs)("div",{className:"pb-1",children:[(0,t.jsxs)("div",{...P(`session:${n}`),children:[(0,t.jsx)("span",{className:(0,S.cn)("size-2 shrink-0 rounded-full",r.dotCls),"aria-hidden":!0}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate py-1.5 text-sm font-medium",children:(0,t.jsx)(C,{text:e.label,terms:T})}),(0,t.jsx)("span",{className:"shrink-0 truncate text-xs text-muted-foreground",children:[r.shortLabel,e.project,(0,b.timeAgo)(e.updated_at)].filter(Boolean).join(" · ")})]}),e.hits.map((e,r)=>{let l=R[e.kind];return(0,t.jsxs)("div",{...P(`hit:${n}:${r}`),children:[(0,t.jsx)(l.icon,{className:"ml-4.5 size-3 shrink-0 text-muted-foreground","aria-label":e.tool?`${l.label}: ${e.tool}`:l.label}),(0,t.jsx)("span",{className:(0,S.cn)("min-w-0 flex-1 truncate py-1 text-xs text-muted-foreground",("tool"===e.kind||"result"===e.kind)&&"font-mono"),children:(0,t.jsx)(C,{text:e.snippet,terms:T})})]},r)}),e.matchCount>e.hits.length&&(0,t.jsxs)("p",{className:"py-0.5 pr-4 pl-13 text-[11px] text-muted-foreground/80",children:["+",e.matchCount-e.hits.length," more in this session"]})]},n)}),p?(0,t.jsx)("p",{className:"px-4 py-6 text-center text-sm text-destructive",children:"Search failed. Check that the app is still running."}):M&&u&&0===u.total&&!A?(0,t.jsxs)("p",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:["No session mentions “",u.query,"”."]}):M&&!u?(0,t.jsx)("p",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:"Searching… the first search reads every transcript."}):!M&&0===L.length&&(0,t.jsx)("p",{className:"px-4 py-6 text-center text-sm text-muted-foreground",children:"Type at least two characters to search."})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 border-t border-border px-4 py-2 text-[11px] text-muted-foreground",children:[(0,t.jsx)("span",{children:"↑↓ to move"}),(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(s.CornerDownLeft,{className:"size-3","aria-hidden":!0})," to open"]}),(0,t.jsx)("span",{children:"Words must all appear in the same message"})]})]})})},"SearchTrigger",0,function({className:e}){return(0,t.jsxs)(v.Button,{variant:"outline",onClick:()=>window.dispatchEvent(new Event(y)),"aria-label":"Search all sessions",className:(0,S.cn)("gap-2 text-muted-foreground",e),children:[(0,t.jsx)(d.Search,{"aria-hidden":!0}),(0,t.jsx)("span",{className:"hidden md:inline",children:"Search…"}),(0,t.jsx)("kbd",{className:"pointer-events-none hidden rounded-sm border border-border bg-muted px-1.5 py-0.5 font-mono text-[10px] md:block",children:"⌘K"})]})}],84445)},7067,67489,e=>{"use strict";var t=e.i(45650),r=e.i(10364),n=e.i(90741),l=e.i(75157),o=e.i(98464),s=e.i(250),s=s;let i=(0,e.i(13496).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),a=n.Select.Root;function u({className:e,...r}){return(0,t.jsx)(n.Select.Group,{"data-slot":"select-group",className:(0,l.cn)("scroll-my-1 p-1",e),...r})}function c({className:e,size:r="default",children:s,...i}){return(0,t.jsxs)(n.Select.Trigger,{"data-slot":"select-trigger","data-size":r,className:(0,l.cn)("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i,children:[s,(0,t.jsx)(n.Select.Icon,{render:(0,t.jsx)(o.ChevronDownIcon,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function d({className:e,children:r,side:o="bottom",sideOffset:s=4,align:i="center",alignOffset:a=0,alignItemWithTrigger:u=!0,...c}){return(0,t.jsx)(n.Select.Portal,{children:(0,t.jsx)(n.Select.Positioner,{side:o,sideOffset:s,align:i,alignOffset:a,alignItemWithTrigger:u,className:"isolate z-50",children:(0,t.jsxs)(n.Select.Popup,{"data-slot":"select-content","data-align-trigger":u,className:(0,l.cn)("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...c,children:[(0,t.jsx)(p,{}),(0,t.jsx)(n.Select.List,{children:r}),(0,t.jsx)(g,{})]})})})}function f({className:e,children:r,...o}){return(0,t.jsxs)(n.Select.Item,{"data-slot":"select-item",className:(0,l.cn)("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...o,children:[(0,t.jsx)(n.Select.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:r}),(0,t.jsx)(n.Select.ItemIndicator,{render:(0,t.jsx)("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:(0,t.jsx)(s.default,{className:"pointer-events-none"})})]})}function p({className:e,...r}){return(0,t.jsx)(n.Select.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:(0,l.cn)("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...r,children:(0,t.jsx)(i,{})})}function g({className:e,...r}){return(0,t.jsx)(n.Select.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:(0,l.cn)("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...r,children:(0,t.jsx)(o.ChevronDownIcon,{})})}e.s(["Select",0,a,"SelectContent",0,d,"SelectGroup",0,u,"SelectItem",0,f,"SelectTrigger",0,c,"SelectValue",0,function({className:e,...r}){return(0,t.jsx)(n.Select.Value,{"data-slot":"select-value",className:(0,l.cn)("flex flex-1 text-left",e),...r})}],67489);let m="cv-palette",h=[{value:"ocean",label:"Ocean",swatch:"#4a8fd0"},{value:"sage",label:"Sage",swatch:"#6b9c81"},{value:"plum",label:"Plum",swatch:"#9c7fae"},{value:"rose",label:"Rose",swatch:"#c4758c"},{value:"sand",label:"Sand",swatch:"#b0915a"},{value:"graphite",label:"Graphite",swatch:"#6b717c"},{value:"terracotta",label:"Terracotta",swatch:"#d97757"}],v="ocean";function x(e){return h.some(t=>t.value===e)}let b=new Set;function S(e){b.add(e);let t=()=>{R(y()),e()};return window.addEventListener("storage",t),()=>{b.delete(e),window.removeEventListener("storage",t)}}function y(){try{let e=localStorage.getItem(m);if(x(e))return e}catch{}return v}function E(){return v}function R(e){e===v?delete document.documentElement.dataset.palette:document.documentElement.dataset.palette=e}function C({color:e}){return(0,t.jsx)("span",{"aria-hidden":!0,className:"size-3 shrink-0 rounded-full ring-1 ring-foreground/15",style:{backgroundColor:e}})}e.s(["PALETTES",0,h,"PALETTE_STORAGE_KEY",0,m,"PalettePicker",0,function({className:e}){let n=(0,r.useSyncExternalStore)(S,y,E),o=h.find(e=>e.value===n)??h[0];return(0,t.jsxs)(a,{items:h,value:n,onValueChange:e=>{x(e)&&function(e){try{localStorage.setItem(m,e)}catch{}for(let t of(R(e),b))t()}(e)},children:[(0,t.jsxs)(c,{"aria-label":`Color palette: ${o.label}`,className:(0,l.cn)("text-xs",e),children:[(0,t.jsx)(C,{color:o.swatch}),(0,t.jsx)("span",{className:"hidden sm:inline",children:o.label})]}),(0,t.jsx)(d,{align:"end",className:"w-auto min-w-36",children:(0,t.jsx)(u,{children:h.map(e=>(0,t.jsxs)(f,{value:e.value,children:[(0,t.jsx)(C,{color:e.swatch}),e.label]},e.value))})})]})}],7067)},7346,48154,e=>{"use strict";var t=e.i(45650),r=e.i(10364),n=e.i(288),l=e.i(92930),o=e.i(44474),s=e.i(7067),i=e.i(41966),a=e.i(19458),u=e.i(25587),c=e.i(53076),d=e.i(50403),f=e.i(67149),p=e.i(92975);let g=r.createContext(void 0);var m=e.i(30875);let h=r.forwardRef(function(e,n){let{defaultValue:l,disabled:o=!1,loopFocus:s=!0,onValueChange:i,orientation:h="horizontal",multiple:v=!1,value:x,className:b,render:S,style:y,...E}=e,R=(0,p.useToolbarRootContext)(!0),C=r.useContext(g),w=void 0!==x||void 0!==l,I=(R?.disabled??!1)||(C?.disabled??!1)||o,[k,M]=(0,u.useControlled)({controlled:x,default:void 0===x?l??c.EMPTY_ARRAY:void 0,name:"ToggleGroup",state:"value"}),A=(0,a.useStableCallback)((e,t,r)=>{let n;v?(n=k.slice(),t?n.push(e):n.splice(k.indexOf(e),1)):n=t?[e]:[],i?.(n,r),r.isCanceled||M(n)}),T={disabled:I,multiple:v,orientation:h},L=r.useMemo(()=>({disabled:I,setGroupValue:A,value:k,isValueInitialized:w}),[I,A,k,w]),O={role:"group"},N=(0,d.useRenderElement)("div",e,{enabled:!!R,state:T,ref:n,props:[O,E]});return(0,t.jsx)(m.ToggleGroupContext.Provider,{value:L,children:R?N:(0,t.jsx)(f.CompositeRoot,{render:S,className:b,style:y,state:T,refs:[n],props:[O,E],loopFocus:s,enableHomeAndEndKeys:!0,orientation:h})})});var v=e.i(75157),x=e.i(70962);let b=r.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});function S({className:e,variant:r,size:n,spacing:l=2,orientation:o="horizontal",children:s,...i}){return(0,t.jsx)(h,{"data-slot":"toggle-group","data-variant":r,"data-size":n,"data-spacing":l,"data-orientation":o,style:{"--gap":l},className:(0,v.cn)("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch",e),...i,children:(0,t.jsx)(b.Provider,{value:{variant:r,size:n,spacing:l,orientation:o},children:s})})}function y({className:e,children:n,variant:l="default",size:o="default",...s}){let a=r.useContext(b);return(0,t.jsx)(i.Toggle,{"data-slot":"toggle-group-item","data-variant":a.variant||l,"data-size":a.size||o,"data-spacing":a.spacing,className:(0,v.cn)("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",(0,x.toggleVariants)({variant:a.variant||l,size:a.size||o}),e),...s,children:n})}var E=e.i(46798);let R={sm:"h-7",default:"h-8"},C="h-full min-w-0 rounded-md border border-transparent px-2 text-xs text-muted-foreground hover:bg-transparent hover:text-foreground aria-pressed:bg-background aria-pressed:text-foreground aria-pressed:shadow-sm dark:aria-pressed:border-input dark:aria-pressed:bg-input/30";function w({value:e,onChange:r,options:n,label:l,size:o="sm",className:s}){return(0,t.jsx)(S,{"aria-label":l,value:[e],onValueChange:e=>{e.length>0&&r(e[0])},spacing:.5,className:(0,v.cn)("rounded-lg bg-muted p-[3px]",R[o],s),children:n.map(({value:e,label:r,icon:n})=>n?(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{render:(0,t.jsx)(y,{value:e,"aria-label":r,className:(0,v.cn)(C,"aspect-square px-0"),children:(0,t.jsx)(n,{className:"size-3.5","aria-hidden":!0})})}),(0,t.jsx)(E.TooltipContent,{children:r})]},e):(0,t.jsx)(y,{value:e,className:C,children:r},e))})}e.s(["Segmented",0,w],48154);let I="cv-theme",k=`
|
|
2
2
|
(function () {
|
|
3
3
|
try {
|
|
4
4
|
var stored = localStorage.getItem("${I}");
|