thursday-agent 0.28.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/artifact/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/file/route.js.nft.json +1 -1
- package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
- package/.next/server/app/api/reach/route.js.nft.json +1 -1
- package/.next/server/app/api/routine/route.js.nft.json +1 -1
- package/.next/server/app/api/signins/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/end/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/plan/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +11 -11
- package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page/server-reference-manifest.json +68 -68
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/_0tkzlv1._.js +11 -9
- package/.next/server/chunks/_1_0gehg._.js +11 -9
- package/.next/server/chunks/features_14kex_m._.js +3 -1
- package/.next/server/chunks/features_1xn6un-._.js +3 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__1ngprpi._.js → [root-of-the-server]__07mxab7._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__0auk-ke._.js +13 -8
- package/.next/server/chunks/ssr/{[root-of-the-server]__11_ws3y._.js → [root-of-the-server]__0bgf9r2._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__1j2x83w._.js → [root-of-the-server]__0nfq6eh._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__0utwbb5._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__13xx3dr._.js → [root-of-the-server]__18l3o37._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__1qiq402._.js → [root-of-the-server]__1njrrpi._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__1t38-p_._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__02-kwsg._.js → [root-of-the-server]__1vgf-i-._.js} +2 -2
- package/.next/server/chunks/ssr/{_15zznka._.js → _01l1svp._.js} +2 -2
- package/.next/server/chunks/ssr/{_1e1qe7w._.js → _01m2s2p._.js} +2 -2
- package/.next/server/chunks/ssr/{_0a31ywo._.js → _06o_p34._.js} +2 -2
- package/.next/server/chunks/ssr/{_1nnl9sj._.js → _0ps83ki._.js} +2 -2
- package/.next/server/chunks/ssr/{_1tc_gbg._.js → _0tfponz._.js} +2 -2
- package/.next/server/chunks/ssr/{_0ldpw1q._.js → _0x9aecq._.js} +2 -2
- package/.next/server/chunks/ssr/_128r03g._.js +3 -1
- package/.next/server/chunks/ssr/{_0nans9v._.js → _16qphtt._.js} +2 -2
- package/.next/server/chunks/ssr/_17fa2ns._.js +5 -5
- package/.next/server/chunks/ssr/_1_px1o-._.js +1 -1
- package/.next/server/chunks/ssr/_1e_9qjr._.js +1 -1
- package/.next/server/chunks/ssr/{_19g10gj._.js → _1k5f6cg._.js} +2 -2
- package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
- package/.next/server/chunks/ssr/_1rlfzdj._.js +6 -0
- package/.next/server/chunks/ssr/_1soynbw._.js +2 -2
- package/.next/server/chunks/ssr/{_1qtcl42._.js → _1tu2bpk._.js} +2 -2
- package/.next/server/chunks/ssr/{components_ui_markdown-body_tsx_13aa4_2._.js → components_ui_markdown-body_tsx_1ac61z0._.js} +2 -2
- package/.next/server/chunks/ssr/features_0rrgq_t._.js +1 -1
- package/.next/server/chunks/ssr/features_ai_components_model-picker_tsx_0ucb1y9._.js +1 -1
- package/.next/server/chunks/ssr/features_bot_components_01ye2wp._.js +1 -1
- package/.next/server/chunks/ssr/features_bot_components_bot-setting_tsx_01ajft6._.js +1 -1
- package/.next/server/chunks/ssr/features_bot_components_thread-setting_tsx_0yae7zy._.js +1 -1
- package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +1 -1
- package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
- package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
- package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
- package/.next/server/chunks/ssr/features_skills_components_skills-setting_tsx_1wtuuip._.js +1 -1
- package/.next/server/chunks/ssr/features_thursday_components_thursday-setting_tsx_1_6ydrc._.js +1 -1
- package/.next/server/chunks/ssr/{node_modules_107hxun._.js → node_modules_0-8ygub._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1v-un0n._.js → node_modules_012orll._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1uyu3cc._.js → node_modules_02fw1bp._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0wa05ay._.js → node_modules_02t-i_c._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_069gsbk._.js → node_modules_03ntdqv._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_150qjpq._.js → node_modules_04e__3n._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_0kdc_b7._.js → node_modules_0507yvc._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1xtd9ml._.js → node_modules_06oedzb._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_05fihwh._.js → node_modules_0b8revr._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0jrjbfv._.js → node_modules_0dfjba7._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0walxvo._.js → node_modules_0i3xlf-._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_0ou72wu._.js → node_modules_0k-r85l._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_19gok-9._.js → node_modules_0kdzuew._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_1-vdt7b._.js → node_modules_0mbx677._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1vh6nr-._.js → node_modules_0o5tzyn._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0z8o0-n._.js → node_modules_0pv4uha._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_17-v4n4._.js → node_modules_0qrh5xo._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0jqaiyb._.js → node_modules_0t4ep0l._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ia9-w8._.js → node_modules_0tx0umb._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_19acw__._.js → node_modules_0ukjqyk._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_050v667._.js → node_modules_0w-dsl0._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_0gb732y._.js → node_modules_0x_do0y._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_0q8xm6u._.js → node_modules_0x_r46g._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_152bm83._.js → node_modules_0zw6cf-._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1misalx._.js → node_modules_122hfb2._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_2045nus._.js → node_modules_13rr6rm._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_0skzy7i._.js → node_modules_152kfg-._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0wsygp2._.js → node_modules_15f2sid._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_06b7g0r._.js → node_modules_162v3_m._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1pt7o47._.js → node_modules_16wbh_d._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_1x7napn._.js → node_modules_1838s3x._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_0zi89fj._.js → node_modules_1_rbg_o._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1jt8w7f._.js → node_modules_1awgatr._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1n5ds4a._.js → node_modules_1g9_m7_._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1fa_3_c._.js → node_modules_1hgqn53._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_1si826e._.js → node_modules_1j59ehc._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0y_dhgi._.js → node_modules_1jvg854._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_140qn14._.js → node_modules_1k9u0x_._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_06p_ayw._.js → node_modules_1kqsyd_._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1jrlct1._.js → node_modules_1kv5-zo._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1b45v66._.js → node_modules_1lwcjnq._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_13ccsqp._.js → node_modules_1mxdor4._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_04qcy8e._.js → node_modules_1o_q011._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_0ljjw5o._.js → node_modules_1p5__vf._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0jaxs1q._.js → node_modules_1p_tdep._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0xetrwd._.js → node_modules_1qyanf-._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_1861d28._.js → node_modules_1rrbt-g._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1k0ygyl._.js → node_modules_1rtx020._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_12409ud._.js → node_modules_1rxd-pq._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0_uhcxd._.js → node_modules_1sum8sx._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_18uwehg._.js → node_modules_1tqxzmp._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ob-uxg._.js → node_modules_1u5xb0j._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0-zy1_5._.js → node_modules_1umqska._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_20llbw8._.js → node_modules_1v065ct._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1o1ud40._.js → node_modules_1w2-as3._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0v0l095._.js → node_modules_1ywecve._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_katex_dist_katex_mjs_0-moq-r._.js → node_modules_katex_dist_katex_mjs_1l3addz._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_katex_dist_katex_mjs_1bf0rdx._.js → node_modules_katex_dist_katex_mjs_1y07ypr._.js} +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +69 -69
- package/.next/static/chunks/{0km5rjf8k0gst.js → 0eepme181mw6f.js} +1 -1
- package/.next/static/chunks/{25tttxgpn-fdl.js → 0rx67d-x-1mmv.js} +2 -2
- package/.next/static/chunks/{2tlvu360xbisx.js → 0wwq57j09skhy.js} +1 -1
- package/.next/static/chunks/0xlr5fmtxb42l.js +4 -0
- package/.next/static/chunks/{3f4aku2z0zdxp.js → 0yp1so_h9mfhf.js} +1 -1
- package/.next/static/chunks/{1vxq-0uxcm5yl.js → 14e3ie8pgxgdb.js} +1 -1
- package/.next/static/chunks/{0_o7o4-itqsz7.js → 1b-3utyj58fn1.js} +1 -1
- package/.next/static/chunks/{1o4z63f94c3r-.js → 1c3tarihhldvd.js} +1 -1
- package/.next/static/chunks/{2njcedjozdqm7.js → 1j2zjawu_2th7.js} +1 -1
- package/.next/static/chunks/{2zvo7b47hhxi5.js → 1l0_q-kf0cbaj.js} +1 -1
- package/.next/static/chunks/{1hwehpk3kk-pc.js → 1la1aeosxvwmz.js} +1 -1
- package/.next/static/chunks/{29fpns41ml485.js → 1n3a07w81jbc-.js} +1 -1
- package/.next/static/chunks/{3ul6m16ba_i3u.js → 227tjgj_th6uf.js} +1 -1
- package/.next/static/chunks/{1zwj72bhapocl.js → 29r_coa80ubpw.js} +1 -1
- package/.next/static/chunks/{06ymo4xf31ggh.js → 2adz3q18q052w.js} +1 -1
- package/.next/static/chunks/{1ki7x6-ehua0u.js → 2b08w7t0hc1fp.js} +1 -1
- package/.next/static/chunks/{0i4df8t5_6a-g.js → 2gl-fo_rmmmq0.js} +1 -1
- package/.next/static/chunks/{1e3karuzhh7ik.js → 2h5rvagz5wdhy.js} +1 -1
- package/.next/static/chunks/2jo02hrgs_zqm.js +1 -0
- package/.next/static/chunks/{3ymtwwxmbactm.js → 2voeol7_1tit_.js} +1 -1
- package/.next/static/chunks/{277zw6dp5yzks.js → 36hfkcfa5a6be.js} +5 -5
- package/.next/static/chunks/{17ow2tmvy65in.js → 3a98r51s8rjtt.js} +1 -1
- package/.next/static/chunks/{2jn9y4sol_low.js → 3hl237797_a8e.js} +2 -2
- package/.next/static/chunks/3sjv-rshh-98q.js +1 -0
- package/.next/static/chunks/{1pxe_gpjic1_h.js → 3tejx8kiotsia.js} +1 -1
- package/.next/static/chunks/{1vwqvgit8a1vm.js → 42xlx1decmn82.js} +1 -1
- package/guide/calls.md +3 -1
- package/package.json +1 -1
- package/.next/server/chunks/ssr/_131wmbl._.js +0 -6
- package/.next/static/chunks/0lc_77uhatqgd.js +0 -1
- package/.next/static/chunks/1gca5ia-a-3e2.js +0 -1
- package/.next/static/chunks/3qhhs3dk6cdbq.js +0 -4
- /package/.next/static/{pekZvsOZ3_8_ohluwgZtY → mTdCVAiiVKCutbZcekyHn}/_buildManifest.js +0 -0
- /package/.next/static/{pekZvsOZ3_8_ohluwgZtY → mTdCVAiiVKCutbZcekyHn}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{pekZvsOZ3_8_ohluwgZtY → mTdCVAiiVKCutbZcekyHn}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,195730,e=>{e.v(t=>Promise.all(["static/chunks/3t9huugh-5_ps.js","static/chunks/43q9cgbuw8krx.js","static/chunks/0dcfqbly-089u.js","static/chunks/13ss71zqoc3if.js","static/chunks/1rowt7kr1tu9y.js","static/chunks/0sqe8zks75fot.js","static/chunks/
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,195730,e=>{e.v(t=>Promise.all(["static/chunks/3t9huugh-5_ps.js","static/chunks/43q9cgbuw8krx.js","static/chunks/0dcfqbly-089u.js","static/chunks/13ss71zqoc3if.js","static/chunks/1rowt7kr1tu9y.js","static/chunks/0sqe8zks75fot.js","static/chunks/2gl-fo_rmmmq0.js","static/chunks/0wwq57j09skhy.js","static/chunks/3l6bwn061vy22.js","static/chunks/2of2-kggzp-fk.js","static/chunks/0ev4hyghq0mbb.js","static/chunks/2re701zfx-nrj.js","static/chunks/33lyk6a4x_hg8.js","static/chunks/1d9i8nlx-zy9a.js"].map(t=>e.l(t))).then(()=>t(683387)))},683408,e=>{"use strict";var t=e.i(843476),s=e.i(271645);let a=null,n=()=>e.A(195730).then(e=>(a=e.MarkdownBody,e)),r=(0,s.lazy)(()=>n().then(e=>({default:e.MarkdownBody})));{let e=()=>void n().catch(()=>{}),t=()=>{"requestIdleCallback"in window?requestIdleCallback(e):setTimeout(e)};"complete"===document.readyState?t():window.addEventListener("load",t,{once:!0})}let i=(0,s.memo)(function(e){if(a){let s=a;return(0,t.jsx)(s,{...e})}return(0,t.jsx)(s.Suspense,{fallback:(0,t.jsx)("div",{className:e.className,style:{whiteSpace:"pre-wrap"},children:e.children}),children:(0,t.jsx)(r,{...e})})});e.s(["Markdown",0,i])},984003,e=>{"use strict";var t=e.i(95187);let s=(0,t.createServerReference)("7ffa31f986dff7e899744bee69f973b343185b5782",t.callServer,void 0,t.findSourceMapURL,"setSignInBotAction");e.s(["setSignInBotAction",0,s])},96892,319841,e=>{"use strict";var t=e.i(456420);let s={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};s.node;let a=(0,t.default)(s);e.s(["ArrowUp",0,a],96892);var n=e.i(271645);let r=["ctrl","alt","meta"],i=/^(Control|Alt|Shift|Meta|OS)/,l=/^(input|textarea|select)$/i,c=e=>!!e&&!!(l.test(e.tagName)||e.isContentEditable||e.closest?.("[data-hotkey-capture]")),u=e=>{let t="nativeEvent"in e?e.nativeEvent:e;return t.isComposing||229===t.keyCode},o=[],d=e=>{if("Escape"!==e.key||e.defaultPrevented||u(e))return;let t=o.at(-1);t&&(e.preventDefault(),t.current())};function f(e){let{code:t,ctrlKey:s,altKey:a,shiftKey:n,metaKey:r}=e;if(!t||i.test(t)||!s&&!a&&!r)return null;let l=[];return s&&l.push("ctrl"),a&&l.push("alt"),n&&l.push("shift"),r&&l.push("meta"),[...l,t].join("+")}let h={ctrl:["Ctrl","⌃"],alt:["Alt","⌥"],shift:["Shift","⇧"],meta:["Meta","⌘"]};function k(e,t=!1){let s=e.split("+"),a=s.at(-1)??"",n=s.slice(0,-1).map(e=>h[e]?.[+!!t]??e),r=a.replace(/^(Key|Digit|Numpad)/,"").replace(/([a-z])([A-Z])/g,"$1 $2")||a;return t?[...n,r].join(""):[...n,r].join(" + ")}e.s(["HOTKEY_CAPTURE",0,{"data-hotkey-capture":""},"capturesKeys",0,c,"comboOf",0,f,"composing",0,u,"isCombo",0,e=>{let t=e.split("+"),s=t.at(-1);return!!(s&&!i.test(s)&&t.slice(0,-1).some(e=>r.includes(e)))},"typed",0,(e,t)=>e.key===t&&!e.metaKey&&(e.altKey||!e.ctrlKey),"useCommandLabel",0,function(e,t=!1){let[s,a]=(0,n.useState)(!1);return(0,n.useEffect)(()=>a(/mac/i.test(navigator.userAgent)),[]),k([...(s?["shift","meta"]:["ctrl","shift"]).filter(e=>t||"shift"!==e),e].join("+"),s)},"useEscape",0,function(e,t){let s=(0,n.useRef)(t);s.current=t,(0,n.useEffect)(()=>{if(e)return o.push(s),1===o.length&&window.addEventListener("keydown",d),()=>{o.splice(o.indexOf(s),1),o.length||window.removeEventListener("keydown",d)}},[e])},"useHotkey",0,function({enabled:e,combo:t,onPress:s}){let a=(0,n.useRef)(s);a.current=s,(0,n.useEffect)(()=>{if(!e||!t)return;let s=e=>{e.repeat||c(e.target)||f(e)===t&&(e.preventDefault(),a.current())};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[e,t])},"useHotkeyLabel",0,function(e){let[t,s]=(0,n.useState)(!1);return(0,n.useEffect)(()=>s(/mac/i.test(navigator.userAgent)),[]),e?k(e,t):null},"windowKey",0,e=>!e.defaultPrevented&&!u(e)&&!c(e.target)&&!e.target?.closest?.('[role="dialog"]')],319841)},24071,e=>{"use strict";var t=e.i(456420);let s={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};s.node;let a=(0,t.default)(s);e.s(["ChevronLeft",0,a],24071)},226091,e=>{"use strict";var t=e.i(456420);let s={name:"file-text",size:24,node:[["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"}]]};s.node;let a=(0,t.default)(s);e.s(["FileText",0,a],226091)},829600,e=>{"use strict";var t=e.i(456420);let s={name:"file",size:24,node:[["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"}]]};s.node;let a=(0,t.default)(s);e.s(["File",0,a],829600)},632781,e=>{"use strict";var t=e.i(758379);e.s(["Loader2",()=>t.default])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59158,e=>{"use strict";var t=e.i(843476),n=e.i(689664),r=e.i(563707),l=e.i(508734),a=e.i(456420);let s={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};s.node;let i=(0,a.default)(s),o={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};o.node;let u=(0,a.default)(o);var c=e.i(466787),d=e.i(271645),p=e.i(798120),m=e.i(167881);e.s([],148099),e.i(148099);var f=e.i(733332),x=e.i(951437),h=e.i(146376),g=e.i(667865),v=e.i(828918),b=e.i(446265),S=e.i(502077),y=e.i(388940),C=e.i(301252),j=e.i(956789),E=e.i(229315),N=e.i(17989),k=e.i(265858),I=e.i(260891),R=e.i(385689),w=e.i(621082);function O(e,t,n,r,l,a,s,i,o,u=2){let c=(0,w.getGridNavigatedIndex)(n.current,{event:e,orientation:r,loopFocus:l,rtl:a,cols:u,disabledIndices:s,minIndex:i,maxIndex:o,prevIndex:t>o?i:t,stopEvent:!0});return(0,w.isIndexOutOfListBounds)(n.current,c)?void 0:c}var A=e.i(584446),P=e.i(675606),T=e.i(56434);let M=d.createContext(void 0),D=d.createContext(void 0),V=d.createContext(void 0),L=d.createContext(!1),_=d.createContext("");function F(){let e=d.useContext(M);if(!e)throw Error((0,f.default)(22));return e}function B(){let e=d.useContext(D);if(!e)throw Error((0,f.default)(23));return e}function K(){let e=d.useContext(V);if(!e)throw Error((0,f.default)(24));return e}function z(){return d.useContext(_)}let H=(e,t)=>Object.is(e,t);function q(e,t,n){return null==e||null==t?Object.is(e,t):n(e,t)}function $(e,t,n){return!!e&&e.some(e=>void 0!==e&&q(t,e,n))}function U(e,t,n){return e?e.findIndex(e=>void 0!==e&&q(e,t,n)):-1}function G(e,t,n,r){let l=r&&Array.isArray(t)?e.findIndex(function(e,t){if(t!==H)return n=>$(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(0!==t||e.some(e=>Object.is(t,e)))}(t,n)):U(e,t,n);return -1===l?null:l}function W(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}function Y(e){var t;return"object"==typeof(t=e?.[0])&&null!=t&&Array.isArray(t.items)}function J(e){return Y(e)?e.flatMap(e=>e.items):e}function X(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 W(e)}function Q(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?W(e.value):W(e)}let Z={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectionChips:e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0},hasSelectedValue:e=>{let{selectedValue:t,selectionMode:n}=e;return null!=t&&(!("multiple"===n&&Array.isArray(t))||t.length>0)},hasNullItemLabel:(e,t)=>!!t&&function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(Y(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}(e.items),open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>q(t,e,n)):q(t,r,n)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemProps:e=>e.itemProps,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight};var ee=e.i(137584),et=e.i(469690),en=e.i(381104),er=e.i(884708),el=e.i(538489);function ea(e){return null==e?void 0:`${e}-popup`}let es=new Map,ei=function(e={}){let t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${function e(t){return Array.isArray(t)?t.map(t=>e(t)).join(","):null==t?"":String(t)}(e.locale)}|${JSON.stringify(t)}`,r=es.get(n);if(r)return r;let l=new Intl.Collator(e.locale,t),a={contains(e,t,n){if(!t)return!0;let r=X(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(0===l.compare(r.slice(e,e+t.length),t))return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=X(e,n);return 0===l.compare(r.slice(0,t.length),t)},endsWith(e,t,n){if(!t)return!0;let r=X(e,n),a=t.length;return r.length>=a&&0===l.compare(r.slice(r.length-a),t)}};return es.set(n,a),a};var eo=e.i(223910),eu=e.i(32199),ec=e.i(606039),ed=e.i(264111),ep=e.i(176782);let em=Symbol("none"),ef={value:em,index:-1};var ex=e.i(872855);function eh(e){let n,r,{id:l,onOpenChangeComplete:a,defaultSelectedValue:s=null,selectedValue:i,onSelectedValueChange:o,defaultInputValue:u,inputValue:c,open:p,defaultOpen:m=!1,selectionMode:w,onItemHighlighted:F,name:B,form:K,disabled:z=!1,readOnly:W=!1,required:ea=!1,inputRef:es,grid:eh=!1,items:eg,filteredItems:ev,filter:eb,filterQuery:eS,openOnInputClick:ey=!0,autoHighlight:eC=!1,keepHighlight:ej=!1,highlightItemOnHover:eE=!0,loopFocus:eN=!0,itemToStringLabel:ek,itemToStringValue:eI,isItemEqualToValue:eR=H,virtualized:ew=!1,inline:eO=!1,fillInputOnItemPress:eA=!0,modal:eP=!1,limit:eT=-1,autoComplete:eM="list",formAutoComplete:eD,locale:eV,submitOnItemClick:eL=!1}=e,{clearErrors:e_}=(0,er.useFormContext)(),{setDirty:eF,validityData:eB,setFilled:eK,name:ez,disabled:eH,setTouched:eq,setFocused:e$,validationMode:eU,validation:eG}=(0,et.useFieldRootContext)(),eW=(0,ex.useDirection)(),eY=(0,el.useLabelableId)({id:l}),eJ=ei({locale:eV}),eX=Array.isArray(eg)?null:eg;if(eX&&"function"!=typeof eX.label)throw Error((0,f.default)(100));let eQ=eX?eX.data:eg,eZ=eX?.value,e0=eZ?void 0:eQ,e1=d.useMemo(()=>{let e;if(!ev||!eZ)return;let t=J(ev),n=t.map(eZ);return{values:n,findItem(r,l){if(!e){e=new Map;for(let r=0;r<n.length;r+=1)e.has(n[r])||e.set(n[r],t[r])}var a=e;let s=a.get(r);if(void 0!==s||l===H)return s;for(let[e,t]of a)if(q(e,r,l))return t}}},[ev,eZ]),e2=d.useMemo(()=>eX?e=>eX.label(e,eR,e=>{let t=e1?.findItem(e,eR);return null!=t?eX.itemLabel(t):X(e,ek)}):ek,[eX,ek,e1,eR]),e5=d.useMemo(()=>eX?Object.assign(e=>eX.itemLabel(e),{selected:e=>X(e,e2)}):ek,[eX,e2,ek]);function e3(e){return X(e,e2)}let[e6,e4]=d.useState(!1),[e8,e7]=d.useState(null),e9=d.useRef(e8),te=d.useRef([]),tt=d.useRef([]),tn=d.useRef(null),tr=d.useRef(null),tl=d.useRef(null),ta=d.useRef(null),ts=d.useRef(null),ti=d.useRef(!0),to=d.useRef(!1),tu=d.useRef(null),tc=d.useRef(null),td=d.useRef(null),tp=d.useRef(ef),tm=d.useRef(null),tf=d.useRef([]),tx=d.useRef(null),th=eH||z,tg=ez??B,tv="multiple"===w,tb="single"===w,tS=void 0!==c||void 0!==u,ty=void 0!==eQ,tC=void 0!==ev;n="always"===eC?"always":!!eC&&"input-change";let[tj,tE]=(0,x.useControlled)({controlled:i,default:tv?s??j.EMPTY_ARRAY:s,name:"Combobox",state:"selectedValue"}),tN=d.useMemo(()=>null===eb?()=>!0:void 0!==eb?eb:(e,t)=>null!=e&&eJ.contains(e,t,e5),[eb,eJ,e5]),tk=(0,y.useRefWithInit)(()=>tS?u??"":tb?e3(tj):"").current,[tI,tR]=(0,x.useControlled)({controlled:c,default:tk,name:"Combobox",state:"inputValue"}),[tw,tO]=(0,x.useControlled)({controlled:p,default:m,name:"Combobox",state:"open"}),tA=Y(eQ),tP=tw||null===e8?String(tI).trim():e8,tT=tb?e3(tj):"",tM=tb&&!e6&&""!==tP&&tT.length===tP.length&&eJ.contains(tT,tP),tD=tM?"":eS??tP,tV=ty&&tC&&tM&&(!eX||eX.hasValue(tj,eR)),tL=d.useMemo(()=>eQ?J(eQ):j.EMPTY_ARRAY,[eQ]),t_=d.useMemo(()=>{if(ev&&!tV)return ev;if(!eQ)return j.EMPTY_ARRAY;if(tA){let e=[],t=0;for(let n of eQ){if(eT>-1&&t>=eT)break;let r=eT>-1?eT-t:1/0,l=""===tD?n.items.slice(0,r):[];if(""!==tD)for(let e of n.items){if(l.length>=r)break;tN(e,tD,e5)&&l.push(e)}if(l.length>0){let r={...n,items:l};e.push(r),t+=l.length}}return e}if(""===tD)return eT>-1?tL.slice(0,eT):tL;let e=[];for(let t of tL){if(eT>-1&&e.length>=eT)break;tN(t,tD,e5)&&e.push(t)}return e},[ev,tV,eQ,tA,tD,eT,tN,e5,tL]),tF=d.useMemo(()=>{if(e1&&t_===ev)return e1.values;let e=J(t_);return eZ?e.map(e=>eZ(e)):e},[t_,ev,e1,eZ]),tB=(0,y.useRefWithInit)(()=>{let e=null;return eO&&tw&&ty&&"none"!==w&&(e=G(tF,tj,eR,tv)),new C.ReactStore({id:eY,labelId:void 0,selectedValue:tj,open:tw,items:e0,selectionMode:w,name:tg,form:K,disabled:th,readOnly:W,required:ea,grid:eh,virtualized:ew,openOnInputClick:ey,itemToStringLabel:e2,isItemEqualToValue:eR,modal:eP,autoHighlight:n,submitOnItemClick:eL,hasInputValue:tS,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:eO,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemProps:j.EMPTY_OBJECT,positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:"none"===w},{onOpenChangeComplete:j.NOOP,setOpen:j.NOOP,setInputValue:j.NOOP,setSelectedValue:j.NOOP,setIndices:j.NOOP,handleSelection:j.NOOP,forceMount:j.NOOP,requestSubmit:j.NOOP,listRef:te,labelsRef:tt,popupRef:tn,emptyRef:ts,inputRef:tr,startDismissRef:tl,endDismissRef:ta,keyboardActiveRef:ti,chipsContainerRef:tu,clearRef:tc,valuesRef:tf,pointerDownItemRef:tx,selectionEventRef:td},Z)}).current,tK="none"===w?tI:tj,tz=d.useMemo(()=>"none"===w?tK:Array.isArray(tj)?tj.map(e=>Q(e,eI)):Q(tj,eI),[tK,eI,w,tj]),tH=(0,g.useStableCallback)(F),tq=(0,g.useStableCallback)(a),t$=tB.useState("activeIndex"),tU=tB.useState("selectedIndex"),tG=tB.useState("positionerElement"),tW=tB.useState("listElement"),tY=tB.useState("triggerElement"),tJ=tB.useState("inputElement"),tX=tB.useState("inputGroupElement"),tQ=tB.useState("inline"),tZ=tB.useState("inputInsidePopup"),t0=tB.useState("inputOwnsFormValue"),t1=tb&&!tZ&&tI===tT,t2=(0,b.useValueAsRef)(tY),{mounted:t5,setMounted:t3,transitionStatus:t6}=(0,eo.useTransitionStatus)(tw),{openMethod:t4,triggerProps:t8}=(0,eu.useOpenInteractionType)(tw),t7=(0,g.useStableCallback)(()=>tz);(0,en.useRegisterFieldControl)(tZ?t2:tr,eY,tK,t7,!th,B);let t9=(0,g.useStableCallback)(()=>{eQ?tt.current=tF.map(e3):tB.set("forceMounted",!0)}),ne=(0,g.useStableCallback)((e,t,n)=>{if(-1===t){if(tp.current===ef)return;tp.current=ef}else tp.current={value:e,index:t};tH(e,(0,P.createGenericEventDetails)(n,void 0,{index:t}))}),nt=(0,g.useStableCallback)(e=>{let t={};void 0!==e.activeIndex&&(t.activeIndex=e.activeIndex),void 0!==e.selectedIndex&&(t.selectedIndex=e.selectedIndex),tB.update(t);let n=e.activeIndex;if(void 0===n)return;let r=e.type||T.REASONS.none;null===n?ne(void 0,-1,r):ne(tf.current[n],n,r)}),nn=(0,g.useStableCallback)((t,r)=>{if(e.onInputValueChange?.(t,r),!r.isCanceled){if(to.current=r.reason===T.REASONS.inputClear,r.reason===T.REASONS.inputChange){tw&&null!==e8&&e7(null);let e=r.event,l=e.inputType;if("compositionend"===e.type||null!=l&&""!==l&&"insertReplacementText"!==l){let e=""!==t.trim();e&&e4(!0),tm.current={hasQuery:e};let r=tB.state.listElement;if(!tB.state.virtualized&&r){let e=tn.current;for(let t of(0,E.getOverflowAncestors)(r.firstElementChild??r)){if(!(0,E.isHTMLElement)(t)||(e?!(0,A.contains)(e,t):"dialog"===t.getAttribute("role")))break;if(function(e,t=!1){let{overflowY:n}=(0,E.getComputedStyle)(e);return("auto"===n||"scroll"===n)&&(t?e.clientHeight>0:e.scrollHeight>e.clientHeight)}(t)){t.scrollTop=0;break}}}e&&n&&null==tB.state.activeIndex&&(tw||tQ)&&tB.set("activeIndex",0)}}else r.reason===T.REASONS.inputClear&&""===t&&tB.state.inputInsidePopup&&(tm.current={hasQuery:!1,selection:!0});tR(t)}}),nr=(0,g.useStableCallback)(e=>{let t=!e&&tZ&&!tQ&&""!==tI&&(String(tI).trim()===e8||tI===tT);!e&&(t||""===tI||t1)&&e4(!1),e7(null),t&&nn("",(0,P.createChangeEventDetails)(T.REASONS.inputClear))}),nl=(0,g.useStableCallback)((t,n)=>{if(tw!==t&&(n.reason===T.REASONS.escapeKey&&ty&&0===tF.length&&!ts.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(t&&null!==e8&&nr(n.reason===T.REASONS.inputChange),!t&&e6&&(tb?(tQ||e7(tP),""===tP&&e4(!1)):tv&&(tQ||e7(tP),tZ&&nt({activeIndex:null}),(!tZ||tQ)&&nn("",(0,P.createChangeEventDetails)(T.REASONS.inputClear,n.event,void 0,{isItemPress:n.reason===T.REASONS.itemPress})))),tO(t),!t&&tZ&&(n.reason===T.REASONS.focusOut||n.reason===T.REASONS.outsidePress))&&(eq(!0),e$(!1),"onBlur"===eU))){let e="none"===w?tI:tj;eG.commit(e)}}),na=(0,g.useStableCallback)((e,t)=>{o?.(e,t),t.isCanceled||(tE(e),("none"===w&&tn.current&&eA||tb&&!tB.state.inputInsidePopup)&&nn(e3(e),(0,P.createChangeEventDetails)(t.reason,t.event)))}),ns=(0,g.useStableCallback)((e,t)=>{let n=(0,A.getTarget)(e),r=td.current??e;td.current=null;let l=(0,P.createChangeEventDetails)(T.REASONS.itemPress,r),a=n?.closest("a")?.getAttribute("href");if(a){a.startsWith("#")&&nl(!1,l);return}if(tv){let e=Array.isArray(tj)?tj:[],n=$(e,t,eR);if(na(n?e.filter(e=>!q(t,e,eR)):[...e,t],l),l.isCanceled||!(tr.current&&""!==tr.current.value.trim()))return;if(tB.state.inputInsidePopup){nn("",(0,P.createChangeEventDetails)(T.REASONS.inputClear,l.event,void 0,{isItemPress:!0}));let e=tm.current;e&&!n&&(e.toggledValue=t)}else nl(!1,l)}else{if(na(t,l),l.isCanceled)return;nl(!1,l)}}),ni=(0,g.useStableCallback)(()=>{let e=eG.inputRef.current?.form??tB.state.inputElement?.form;e&&"function"==typeof e.requestSubmit&&e.requestSubmit()}),no=(0,g.useStableCallback)(()=>{if(t3(!1),tq?.(!1),e4(!1),e7(null),"none"===w?nt({activeIndex:null,selectedIndex:null}):nt({activeIndex:null}),tv&&tr.current&&""!==tr.current.value&&!to.current&&nn("",(0,P.createChangeEventDetails)(T.REASONS.inputClear)),tb)if(tB.state.inputInsidePopup)tr.current&&""!==tr.current.value&&nn("",(0,P.createChangeEventDetails)(T.REASONS.inputClear));else{let e=e3(tj);if(tr.current&&tr.current.value!==e){let t=""===e?T.REASONS.inputClear:T.REASONS.none;nn(e,(0,P.createChangeEventDetails)(t))}}}),nu=d.useMemo(()=>tQ&&tG?{current:tG.closest('[role="dialog"]')}:tn,[tQ,tG]);(0,ee.useOpenChangeComplete)({enabled:!e.actionsRef,open:tw,ref:nu,onComplete(){tw||no()}}),d.useImperativeHandle(e.actionsRef,()=>({unmount:no}),[no]),(0,h.useIsoLayoutEffect)(function(){let e=null!==e9.current&&null===e8;e9.current=e8,(!tw||e&&ty)&&(tw||(tx.current=null),"none"===w||nt({selectedIndex:G(ty?tF:tf.current,tj,eR,tv)}))},[tw,e8,tj,w,tv,ty,tF,eR,nt]),(0,h.useIsoLayoutEffect)(()=>{eQ&&(tf.current=tF,te.current.length=tF.length)},[eQ,tF]),(0,h.useIsoLayoutEffect)(()=>{let e=tm.current;if(e){let t=tw||tQ||tB.state.positionerElement?.hidden===!1;if(e.hasQuery)n&&t&&tB.set("activeIndex",0),tm.current=null;else if(""===String(tI).trim()&&(tm.current=null,t)){let t=e.selection;"always"!==n||t||"none"!==tB.state.selectionMode||tB.set("activeIndex",0),queueMicrotask(()=>{if(!tB.state.open&&!tB.state.inline||tr.current&&""!==tr.current.value.trim())return;let r=tB.state.selectedValue,l="multiple"===tB.state.selectionMode;if(l&&Array.isArray(r)?r.length>0:"none"!==tB.state.selectionMode&&null!=r){let t=ty||tC?tF:tf.current,n=U(t,e.toggledValue,tB.state.isItemEqualToValue);tB.set("activeIndex",-1!==n?n:G(t,r,tB.state.isItemEqualToValue,l))}else t?tB.set("activeIndex",null):"always"===n&&tB.set("activeIndex",0)})}}if(!tw&&!tQ)return;let t=ty||tC?tF:tf.current,r=tB.state.activeIndex;if(null==r)return"always"===n&&t.length>0?void tB.set("activeIndex",0):void ne(void 0,-1,T.REASONS.none);if(r>=t.length){ne(void 0,-1,T.REASONS.none),tB.set("activeIndex",null);return}let l=t[r],a=tp.current.value,s=a!==em&&q(l,a,tB.state.isItemEqualToValue);tp.current.index===r&&s||ne(l,r,T.REASONS.none)},[t$,n,ne,tC,ty,tF,tQ,tw,tB,tI]),(0,h.useIsoLayoutEffect)(()=>{"none"===w?eK(""!==String(tI)):eK(tv?Array.isArray(tj)&&tj.length>0:null!=tj)},[eK,w,tI,tj,tv]),d.useEffect(()=>{ty&&n&&0===tF.length&&nt({activeIndex:null})},[ty,n,tF.length,nt]);let nc=!1;function nd(){nc||tI===tT||(nc=!0,nn(tT,(0,P.createChangeEventDetails)(T.REASONS.none)))}function np(){!tb||tS||tZ||e6||nd()}(0,ec.useValueChanged)(tP,function(){tw&&""!==tP&&tP!==String(tk)&&!t1&&e4(!0)}),(0,ec.useValueChanged)(tw,function(){tw&&null!==e8&&nr(!1)}),(0,ec.useValueChanged)(tj,function(){if("none"!==w){var e;e_(tg),eF((e=eB.initialValue,Array.isArray(tj)&&Array.isArray(e)?!function(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let l=0;l<r;l+=1)if(!n(e[l],t[l]))return!1;return!0}(tj,e,(e,t)=>q(e,t,eR)):tj!==e)),eG.change(tj),!tb||tS||tZ||nd()}}),(0,ec.useValueChanged)(tT,np),(0,ec.useValueChanged)(eQ,np),(0,ec.useValueChanged)(tI,function(){"none"===w&&(e_(tg),eF(tI!==eB.initialValue),eG.change(tI))});let nm=(0,k.useFloatingRootContext)({open:!!tQ||tw,onOpenChange:nl,elements:{reference:tZ?tY:tJ,floating:tG}}),nf=eh?"grid":"listbox",nx=tw||tQ,nh=nx?"true":"false",ng=d.useMemo(()=>{let e=tJ?.tagName==="INPUT",t=null==tJ||e,n=t||nx,r=t?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return n&&(r.role="combobox",r["aria-expanded"]=nh,r["aria-haspopup"]=nf,r["aria-controls"]=nx?tW?.id:void 0,r["aria-autocomplete"]=W?"none":eM),{reference:r,floating:{role:"presentation"}}},[tJ,nx,nh,nf,tW?.id,eM,W]),nv=(0,R.useClick)(nm,{enabled:!th&&ey,event:"mousedown-only",toggle:!1,touchOpenDelay:100*!tZ,reason:T.REASONS.inputPress}),nb=(0,N.useDismiss)(nm,{enabled:!th&&!tQ,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:!!tQ||void 0,outsidePress(e){let t=(0,A.getTarget)(e);return!(0,A.contains)(tY,t)&&!(0,A.contains)(tc.current,t)&&!(0,A.contains)(tu.current,t)&&!(0,A.contains)(tX,t)}}),nS=(0,I.useListNavigation)(nm,{enabled:!th,id:eY,listRef:te,activeIndex:t$,selectedIndex:tU,virtual:!0,loopFocus:eN,allowEscape:eN&&!n,focusItemOnOpen:!e6&&("none"!==w||!!n)&&"auto",focusItemOnHover:eE,resetOnPointerLeave:!ej,orientation:eh?"horizontal":void 0,rtl:"rtl"===eW,disabledIndices:j.EMPTY_ARRAY,grid:eh?O:void 0,onNavigate(e,t){(t||tw)&&"ending"!==t6&&(t?nt({activeIndex:e,type:ti.current?T.REASONS.keyboard:T.REASONS.pointer}):nt({activeIndex:e}))}}),ny=d.useMemo(()=>(0,ep.mergeProps)(nS.reference,{onKeyDown(e){eh&&null==tB.state.activeIndex&&("ArrowLeft"===e.key||"ArrowRight"===e.key)&&e.preventBaseUIHandler()}},nb.reference,nv.reference,ng.reference),[nS.reference,nb.reference,nv.reference,ng.reference,eh,tB]),nC=d.useMemo(()=>(0,ep.mergeProps)(ed.FOCUSABLE_POPUP_PROPS,nb.floating),[nb.floating]),nj=d.useMemo(()=>(0,ep.mergeProps)(nS.floating,ng.floating),[nS.floating,ng.floating]),nE=d.useMemo(()=>{let e=nS.item;return e?{...e,onFocus:void 0}:j.EMPTY_OBJECT},[nS.item]);tB.useContextCallback("setOpen",nl),tB.useContextCallback("setInputValue",nn),tB.useContextCallback("setSelectedValue",na),tB.useContextCallback("setIndices",nt),tB.useContextCallback("handleSelection",ns),tB.useContextCallback("forceMount",t9),tB.useContextCallback("requestSubmit",ni),tB.useContextCallback("onOpenChangeComplete",a),(r=d.useRef(!0)).current&&(r.current=!1,(()=>{tB.update({inline:eO,popupProps:nC,listProps:nj,inputProps:ny,triggerProps:t8,itemProps:nE})})());let nN={id:eY,selectedValue:tj,open:tw,mounted:t5,transitionStatus:t6,items:e0,inline:eO,popupProps:nC,listProps:nj,inputProps:ny,triggerProps:t8,itemProps:nE,openMethod:t4,selectionMode:w,name:tg,form:K,disabled:th,readOnly:W,required:ea,grid:eh,virtualized:ew,openOnInputClick:ey,itemToStringLabel:e2,modal:eP,autoHighlight:n,isItemEqualToValue:eR,submitOnItemClick:eL,hasInputValue:tS};(0,h.useIsoLayoutEffect)(()=>{tB.update({...nN,inputOwnsFormValue:"none"===w&&(eO||!tB.state.inputInsidePopup)})},[tB,...Object.values(nN)]);let nk=(0,v.useMergedRefs)(es,eG.inputRef),nI=d.useMemo(()=>({query:tP,hasItems:ty,filteredItems:t_,flatFilteredValues:tF}),[tP,ty,t_,tF]),nR=d.useMemo(()=>Array.isArray(tK)?"":Q(tK,eI),[tK,eI]),nw=tv&&Array.isArray(tj)&&tj.length>0,nO=tv||"none"===w&&t0?void 0:tg,nA=d.useMemo(()=>tv&&Array.isArray(tj)&&tg?tj.map(e=>{let n=Q(e,eI);return(0,t.jsx)("input",{type:"hidden",form:K,name:tg,value:n,disabled:th},n)}):null,[tv,tj,K,tg,eI,th]),nP=(0,t.jsxs)(d.Fragment,{children:[e.children,(0,t.jsx)("input",{...eG.getValidationProps(th,{onFocus(){tZ?tY?.focus():(tr.current||tY)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||th||W)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=(0,P.createChangeEventDetails)(T.REASONS.none,e.nativeEvent),l=()=>tf.current.findIndex(e=>Q(e,eI).toLowerCase()===n||e3(e).toLowerCase()===n);tb&&(t9(),eQ&&-1===l()&&tB.set("forceMounted",!0)),queueMicrotask(function(){if(tv)return;if("none"===w)return void nn(t,r);let e=l();-1===e&&(e=tf.current.findIndex((e,t)=>{let r=tt.current[t];return null!=r&&r.toLowerCase()===n}));let a=-1===e?void 0:tf.current[e];null!=a&&na?.(a,r)})}}),id:eY&&null==nO?`${eY}-hidden-input`:void 0,form:K,name:nO,autoComplete:eD,disabled:th,required:ea&&!nw,readOnly:W,value:nR,ref:nk,style:nO?S.visuallyHiddenInput:S.visuallyHidden,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),nA]});return(0,t.jsx)(M.Provider,{value:tB,children:(0,t.jsx)(D.Provider,{value:nm,children:(0,t.jsx)(L.Provider,{value:ty,children:(0,t.jsx)(V.Provider,{value:nI,children:(0,t.jsx)(_.Provider,{value:tI,children:nP})})})})})}var eg=e.i(439957),ev=e.i(108868),eb=e.i(552245),eS=e.i(540886),ey=e.i(879938),eC=e.i(875812),ej=e.i(145147);ej.CommonTriggerDataAttributes.popupOpen,ej.CommonTriggerDataAttributes.pressed;let eE={...ey.pressableTriggerOpenStateMapping,...eC.fieldValidityMapping,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};var eN=e.i(247778),ek=e.i(157940),eI=e.i(264042),eR=e.i(736760);function ew(e){let t=e.useState("mounted"),n=e.useState("popupSide"),r=e.useState("positionerElement");return t&&r?n:null}function eO(){return 0===K().filteredItems.length}function eA(e,t,n){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=n,r.click(),e.context.selectionEventRef.current=null)}let eP=d.forwardRef(function(e,t){let n,{render:r,className:l,nativeButton:a=!0,disabled:s=!1,id:i,style:o,...u}=e,{state:c,disabled:p,setTouched:m,setFocused:f,validationMode:x,validation:h}=(0,et.useFieldRootContext)(),{labelId:v}=(0,eN.useLabelableContext)(),b=F(),S=b.useState("selectionMode"),y=b.useState("disabled"),C=b.useState("readOnly"),j=b.useState("required"),E=b.useState("positionerElement"),N=b.useState("listElement"),k=b.useState("popupId"),I=b.useState("triggerProps"),w=b.useState("inputInsidePopup"),O=b.useState("id"),M=b.useState("labelId"),D=b.useState("open"),V=b.useState("selectedValue"),L=b.useState("activeIndex"),_=b.useState("selectedIndex"),K=b.useState("hasSelectedValue"),H=B(),q=z(),$=(0,eg.useTimeout)(),U=p||y||s,G=eO(),W=ew(b);(0,el.useLabelableId)({id:w?i:void 0});let Y=w?i??O:i;D&&w?n=k??ea(O):D&&(n=N?.id);let J=d.useRef("");function X(e){J.current=e.pointerType}let{reference:Q}=(0,eR.useTypeahead)(H,{enabled:!D&&!C&&!y&&"single"===S,listRef:b.context.labelsRef,activeIndex:L,selectedIndex:_,onMatch(e){let t=b.context.valuesRef.current[e];void 0!==t&&b.context.setSelectedValue(t,(0,P.createChangeEventDetails)(T.REASONS.none))}}),{reference:Z}=(0,R.useClick)(H,{enabled:!y,event:"mousedown"}),{buttonRef:ee,getButtonProps:en}=(0,eS.useButton)({native:a,disabled:U}),er={...c,readOnly:C,open:D,disabled:U,popupSide:W,listEmpty:G,placeholder:"none"!==S&&!K},es=(0,g.useStableCallback)(e=>{b.set("triggerElement",e)});return(0,eb.useRenderElement)("button",e,{ref:[t,ee,es],state:er,props:[I,Z,Q,{id:Y,tabIndex:w?0:-1,role:w?"combobox":void 0,"aria-expanded":D,"aria-haspopup":w?"dialog":"listbox","aria-controls":n,"aria-required":w&&j||void 0,"aria-readonly":w&&C||void 0,"aria-labelledby":v??M,onPointerDown:X,onPointerEnter:X,onFocus(){f(!0),U||$.start(0,b.context.forceMount)},onBlur(e){(0,A.contains)(E,e.relatedTarget)||(m(!0),f(!1),"onBlur"===x&&h.commit("none"===S?q:V))},onMouseDown(e){if(U||(w||H.set("domReferenceElement",e.currentTarget),b.context.forceMount(),"touch"!==J.current&&(b.context.inputRef.current?.focus(),w||e.preventDefault()),D))return;let t=(0,ev.ownerDocument)(e.currentTarget);w&&t.addEventListener("mouseup",function(e){let t=b.state.triggerElement;if(!t)return;let n=(0,A.getTarget)(e),r=b.state.positionerElement,l=b.state.listElement;(0,A.contains)(t,n)||(0,A.contains)(r,n)||(0,A.contains)(l,n)||(0,eI.isMouseWithinBounds)(e,t)||b.context.setOpen(!1,(0,P.createChangeEventDetails)(T.REASONS.cancelOpen,e))},{once:!0})},onKeyDown(e){("ArrowDown"===e.key||"ArrowUp"===e.key)&&((0,ek.stopEvent)(e),b.context.setOpen(!0,(0,P.createChangeEventDetails)(T.REASONS.listNavigation,e.nativeEvent)),b.context.inputRef.current?.focus())}},h.getValidationProps(U,u),en],stateAttributesMapping:eE})});var eT=e.i(328744),eM=e.i(788015);let eD=d.createContext(void 0),eV=d.createContext(void 0);function eL(e){let t=d.useContext(eV);if(void 0===t&&!e)throw Error((0,f.default)(21));return t}let e_=d.forwardRef(function(e,n){let r=F(),{buttonRef:l,getButtonProps:a}=(0,eS.useButton)({native:!1}),s=(0,v.useMergedRefs)(n,l),i=a({onClick:function(e){r.context.setOpen(!1,(0,P.createChangeEventDetails)(T.REASONS.closePress,e.nativeEvent,e.currentTarget))}});return(0,t.jsx)("span",{ref:s,...i,"aria-label":"Dismiss",tabIndex:void 0,style:S.visuallyHiddenInput})}),eF=d.forwardRef(function(e,n){let{render:r,className:l,disabled:a=!1,id:s,style:i,...o}=e,{state:u,disabled:c,setTouched:p,setFocused:m,validationMode:f,validation:x}=(0,et.useFieldRootContext)(),{labelId:h}=(0,eN.useLabelableContext)(),v=d.useContext(eD),b=!!eL(!0),S=F(),y=z(),C=(0,ex.useDirection)(),j=S.useState("required"),E=S.useState("disabled"),N=S.useState("readOnly"),k=S.useState("name"),I=S.useState("form"),R=S.useState("selectionMode"),w=S.useState("autoHighlight"),O=S.useState("inputProps"),A=S.useState("triggerProps"),M=S.useState("open"),D=S.useState("mounted"),V=S.useState("selectedValue"),L=S.useState("id"),_=S.useState("inline"),B=S.useState("modal"),K=!!w,H=ew(S),q=c||E||a,$=eO(),U=b||_,G=(0,eM.useBaseUiId)(s??(U?void 0:L)),W=b?eC.DEFAULT_FIELD_STATE_ATTRIBUTES:u,[Y,J]=d.useState(null),X=d.useRef(!1),Q=d.useRef(null),Z=d.useRef(!1),ee="none"===R&&!b,en=(0,g.useStableCallback)(e=>{let t=b||S.state.inline;t&&!S.state.hasInputValue&&S.context.setInputValue("",(0,P.createChangeEventDetails)(T.REASONS.none)),S.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:ee})}),er=b?o:x.getValidationProps(q,o);function el(){S.context.setIndices({activeIndex:null,selectedIndex:null,type:S.context.keyboardActiveRef.current?T.REASONS.keyboard:T.REASONS.pointer})}function ea(){S.context.keyboardActiveRef.current=!1}let es={...W,open:M,disabled:q,readOnly:N,popupSide:H,listEmpty:$},ei=(0,eb.useRenderElement)("input",e,{state:es,ref:[n,S.context.inputRef,en],props:[O,A,{value:Y??y,"aria-readonly":N||void 0,"aria-required":j||void 0,"aria-labelledby":h,disabled:q,readOnly:N,required:"none"===R?j:void 0,form:I,...ee&&k&&{name:k},id:G,onFocus(){if(m(!0),!_||!Z.current)return;Z.current=!1;let e=Q.current;null!=e&&Object.hasOwn(S.context.valuesRef.current,e)&&S.context.setIndices({activeIndex:e})},onBlur(){p(!0),m(!1);let e=S.state.activeIndex;if(_&&null!==e&&"always"!==w&&(Q.current=e,Z.current=!0,S.context.setIndices({activeIndex:null})),"onBlur"===f){let e="none"===R?y:V;x.commit(e)}},onCompositionStart(e){eT.platform.os.android||(X.current=!0,J(e.currentTarget.value))},onCompositionEnd(e){X.current=!1;let t=e.currentTarget.value;J(null),S.context.setInputValue(t,(0,P.createChangeEventDetails)(T.REASONS.inputChange,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=X.current||!(!n||"insertReplacementText"===n);function l(e){!N&&!q&&e&&r&&(S.context.setOpen(!0,(0,P.createChangeEventDetails)(T.REASONS.inputChange,t)),K||el())}if(X.current){let n=e.currentTarget.value;J(n),""!==n||S.state.openOnInputClick||S.state.inputInsidePopup||S.context.setOpen(!1,(0,P.createChangeEventDetails)(T.REASONS.inputClear,t));let r=n.trim(),a=K&&""!==r;l(r),M&&null!==S.state.activeIndex&&!a&&el();return}let a=(0,P.createChangeEventDetails)(T.REASONS.inputChange,t);if(S.context.setInputValue(e.currentTarget.value,a),a.isCanceled)return;let s=""===e.currentTarget.value,i=(0,P.createChangeEventDetails)(T.REASONS.inputClear,t);s&&!S.state.inputInsidePopup&&("single"===R&&S.context.setSelectedValue(null,i),S.state.openOnInputClick||S.context.setOpen(!1,i)),l(e.currentTarget.value.trim()),M&&null!==S.state.activeIndex&&!K&&el()},onKeyDown(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(S.context.keyboardActiveRef.current=!0,q||N){N&&"Enter"===e.key&&M&&null!==S.state.activeIndex&&(0,ek.stopEvent)(e);return}let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r="rtl"===C;if("Home"===e.key){(0,ek.stopEvent)(e);let n=eT.platform.engine.gecko&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if("End"===e.key){(0,ek.stopEvent)(e);let l=eT.platform.engine.gecko&&r?0:t.value.length;t.setSelectionRange(l,l),t.scrollLeft=r?-n:n;return}if(!D&&"Escape"===e.key){let t="multiple"===R&&Array.isArray(V)?0===V.length:null===V,n=(0,P.createChangeEventDetails)(T.REASONS.escapeKey,e.nativeEvent);S.context.setInputValue("",n),S.context.setSelectedValue("multiple"===R?[]:null,n),t||S.state.inline||n.isPropagationAllowed||e.stopPropagation();return}if(v&&"Backspace"===e.key&&""===t.value&&void 0===v.highlightedChipIndex&&Array.isArray(V)&&V.length>0){let t=v.chipsRef.current.length,n=t>0?t-1:V.length-1,r=V.filter((e,t)=>t!==n);el(),S.context.setSelectedValue(r,(0,P.createChangeEventDetails)(T.REASONS.none,e.nativeEvent));return}let l=v?.highlightedChipIndex!==void 0,a=function(e){let t;if(!v)return;let{highlightedChipIndex:n}=v,r=v.chipsRef.current.length,[l,a]="rtl"===C?["ArrowRight","ArrowLeft"]:["ArrowLeft","ArrowRight"];if(void 0!==n){if(e.key===l)e.preventDefault(),t=n>0?n-1:void 0;else if(e.key===a)e.preventDefault(),t=n<r-1?n+1:void 0;else if("Backspace"===e.key||"Delete"===e.key){var s;let r;e.preventDefault(),t=(r=n>=(s=V.length)-1?s-2:n)>=0?r:void 0,el()}return t}return e.key===l&&(e.currentTarget.selectionStart??0)===0&&V.length>0&&(e.preventDefault(),t=r>0?r-1:void 0),t}(e);if(v?.setHighlightedChipIndex(a),void 0!==a?v?.chipsRef.current[a]?.focus():l&&S.context.inputRef.current?.focus(),229!==e.which&&"Enter"===e.key&&M){let t=S.state.activeIndex,n=e.nativeEvent;if(null===t){if(_)return;S.context.setOpen(!1,(0,P.createChangeEventDetails)(T.REASONS.none,n));return}(0,ek.stopEvent)(e),eA(S,t,n)}},onPointerMove:ea,onPointerDown:ea},er],stateAttributesMapping:eE}),eo=b?(0,t.jsx)(et.FieldRootContext.Provider,{value:et.DEFAULT_FIELD_ROOT_CONTEXT,children:ei}):ei;return(0,t.jsxs)(d.Fragment,{children:[M&&(!U||B)&&(0,t.jsx)(e_,{ref:S.context.startDismissRef}),eo]})});var eB=e.i(596296);let eK=d.forwardRef(function(e,t){let{render:n,className:r,style:l,...a}=e,{state:s}=(0,et.useFieldRootContext)(),i=F(),o=i.useState("open"),u=i.useState("disabled"),c=i.useState("readOnly"),d=i.useState("hasSelectedValue"),p=i.useState("selectionMode"),m=ew(i),f=eO(),x={...s,open:o,disabled:u,readOnly:c,popupSide:m,listEmpty:f,placeholder:"none"!==p&&!d},h=(0,g.useStableCallback)(e=>{i.set("inputGroupElement",e)});return(0,eb.useRenderElement)("div",e,{ref:[t,h],props:[{role:"group",onMouseDown(e){!function(e,t,n,r){if(e.baseUIHandlerPrevented)return;let l=(0,A.getTarget)(e.nativeEvent),a=(0,E.isElement)(l)?l:null;a!==e.currentTarget&&(r?.(a)||(0,eB.isInteractiveElement)(a))||(e.preventDefault(),!n&&(t.context.inputRef.current?.focus(),t.state.openOnInputClick&&t.context.setOpen(!0,(0,P.createChangeEventDetails)(T.REASONS.inputPress,e.nativeEvent))))}(e,i,u,e=>(0,A.contains)(i.context.chipsContainerRef.current,e))}},a],state:x,stateAttributesMapping:eE})}),ez=d.forwardRef(function(e,t){let{render:n,className:r,style:l,...a}=e;return(0,eb.useRenderElement)("span",e,{ref:t,props:[{"aria-hidden":!0,children:"▼"},a]})});var eH=e.i(474354);let eq={...eH.transitionStatusMapping,...ey.triggerOpenStateMapping},e$=d.forwardRef(function(e,t){let{render:n,className:r,disabled:l=!1,nativeButton:a=!0,keepMounted:s=!1,style:i,...o}=e,{disabled:u}=(0,et.useFieldRootContext)(),c=F(),d=c.useState("selectionMode"),p=c.useState("disabled"),m=c.useState("readOnly"),f=c.useState("open"),x=c.useState("selectedValue"),h=c.useState("hasSelectionChips"),g=z(),v=!1;v="none"===d?""!==g:"single"===d?null!=x:h;let b=u||p||l,{buttonRef:S,getButtonProps:y}=(0,eS.useButton)({native:a,disabled:b}),{mounted:C,transitionStatus:j,setMounted:E}=(0,eo.useTransitionStatus)(v),N={disabled:b,visible:v,open:f,transitionStatus:j};(0,ee.useOpenChangeComplete)({open:v,ref:c.context.clearRef,onComplete(){v||E(!1)}});let k=(0,eb.useRenderElement)("button",e,{state:N,ref:[t,S,c.context.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(e){e.preventDefault()},onClick(e){if(b||m)return;let t=c.context.keyboardActiveRef.current?T.REASONS.keyboard:T.REASONS.pointer;c.context.setInputValue("",(0,P.createChangeEventDetails)(T.REASONS.clearPress,e.nativeEvent)),"none"!==d?(c.context.setSelectedValue(Array.isArray(x)?[]:null,(0,P.createChangeEventDetails)(T.REASONS.clearPress,e.nativeEvent)),c.context.setIndices({activeIndex:null,selectedIndex:null,type:t})):c.context.setIndices({activeIndex:null,type:t}),c.context.inputRef.current?.focus()}},o,y],stateAttributesMapping:eq});return s||C?k:null}),eU=d.createContext(null);function eG(e){let{children:n,items:r}=e,l=d.useMemo(()=>({items:r}),[r]);return(0,t.jsx)(eU.Provider,{value:l,children:n})}function eW(e){let{children:n}=e,{filteredItems:r}=K(),l=d.useContext(eU),a=l?l.items:r;return(0,t.jsx)(d.Fragment,{children:a.map(n)})}var eY=e.i(53687);let eJ=d.forwardRef(function(e,n){var r;let{render:l,className:a,style:s,children:i,...o}=e,u=F(),c=B(),p=!!eL(!0),{filteredItems:m,hasItems:f}=K(),x=u.useState("selectionMode"),h=u.useState("grid"),v=u.useState("readOnly"),b=u.useState("listProps"),S=u.useState("virtualized"),y=u.useState("forceMounted"),C=0===m.length,j=(0,g.useStableCallback)(e=>{u.set("positionerElement",e)}),E=(0,g.useStableCallback)(e=>{u.set("listElement",e)}),N=d.useMemo(()=>"function"==typeof i?r||(r=(0,t.jsx)(eW,{children:i})):i,[i]),k=c.useState("floatingId"),I=(0,eb.useRenderElement)("div",e,{state:{empty:C},ref:[n,E,p?null:j],props:[b,{children:N,tabIndex:-1,id:k,role:h?"grid":"listbox","aria-multiselectable":"multiple"===x?"true":void 0,"aria-readonly":!h&&!!v||void 0,onKeyDown(e){if(!u.state.disabled&&!u.state.readOnly&&"Enter"===e.key){let t=u.state.activeIndex;null!=t&&((0,ek.stopEvent)(e),eA(u,t,e.nativeEvent))}},onKeyDownCapture(){u.context.keyboardActiveRef.current=!0},onPointerMoveCapture(){u.context.keyboardActiveRef.current=!1}},o]});if(S)return I;let R=f&&!y?void 0:u.context.labelsRef;return(0,t.jsx)(eY.CompositeList,{elementsRef:u.context.listRef,labelsRef:R,children:I})});function eX(){let e=(0,eg.useTimeout)(),t=d.useRef(null);return d.useEffect(()=>{if(eT.platform.os.ios)return;let n=t.current;if(null==n)return;let r=function(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;""!==e.nodeValue&&(n=e)}return n}(n);if(null==r)return;let l=r.data,a=`${l}\u2060`;return r.nodeValue=a,e.start(200,()=>{r.nodeValue===a&&(r.nodeValue=l)}),()=>{e.clear(),r.nodeValue===a&&(r.nodeValue=l)}},[t,e]),t}let eQ=d.forwardRef(function(e,t){let{render:n,className:r,style:l,children:a,...s}=e,i=eX();return(0,eb.useRenderElement)("div",e,{ref:[t,i],props:[{children:a,role:"status","aria-live":"polite","aria-atomic":!0},s]})});var eZ=e.i(726674);let e0=d.createContext(void 0),e1=d.forwardRef(function(e,n){let{keepMounted:r=!1,...l}=e,a=F(),s=a.useState("mounted"),i=a.useState("forceMounted");return s||r||i?(0,t.jsx)(e0.Provider,{value:r,children:(0,t.jsx)(eZ.FloatingPortal,{ref:n,...l})}):null}),e2={...ey.popupStateMapping,...eH.transitionStatusMapping},e5=d.forwardRef(function(e,t){let{render:n,className:r,style:l,...a}=e,s=F(),i=s.useState("open"),o=s.useState("mounted"),u=s.useState("transitionStatus");return(0,eb.useRenderElement)("div",e,{state:{open:i,transitionStatus:u},ref:t,stateAttributesMapping:e2,props:[{role:"presentation",hidden:!o,style:{userSelect:"none",WebkitUserSelect:"none"}},a]})});var e3=e.i(144394),e6=e.i(923706),e4=e.i(638396),e8=e.i(426),e7=e.i(789579),e9=e.i(33383);let te=d.forwardRef(function(e,n){let{render:r,className:l,anchor:a,positionMethod:s,side:i,align:o,sideOffset:u,alignOffset:c,collisionBoundary:p="clipping-ancestors",collisionPadding:m,arrowPadding:x,sticky:v,disableAnchorTracking:b=!1,collisionAvoidance:S=e4.DROPDOWN_COLLISION_AVOIDANCE,style:y,...C}=e,j=F(),E=B(),N=function(){let e=d.useContext(e0);if(void 0===e)throw Error((0,f.default)(20));return e}(),k=j.useState("modal"),I=j.useState("open"),R=j.useState("mounted"),w=j.useState("openMethod"),O=j.useState("positionerElement"),A=j.useState("triggerElement"),P=j.useState("inputElement"),T=j.useState("inputGroupElement"),M=j.useState("inputInsidePopup"),D=j.useState("transitionStatus"),V=eO(),L=(0,e6.useAnchorPositioning)({anchor:a??(M?A:T??P),floatingRootContext:E,positionMethod:s,mounted:R,side:i,sideOffset:u,align:o,alignOffset:c,arrowPadding:x,collisionBoundary:p,collisionPadding:m,sticky:v,disableAnchorTracking:b,keepMounted:N,collisionAvoidance:S,lazyFlip:!0});(0,e9.useAnchoredPopupScrollLock)(I&&k,"touch"===w,O,A);let _={open:I,side:L.side,align:L.align,anchorHidden:L.anchorHidden,empty:V};(0,h.useIsoLayoutEffect)(()=>{j.set("popupSide",L.side)},[j,L.side]);let K=(0,g.useStableCallback)(e=>{j.set("positionerElement",e)}),z=(0,e7.usePositioner)(e,_,{styles:L.positionerStyles,transitionStatus:D,props:C,refs:[n,K],hidden:!R,inert:!I});return(0,t.jsxs)(eV.Provider,{value:L,children:[R&&k&&(0,t.jsx)(e8.InternalBackdrop,{inert:(0,e3.inertValue)(!I),cutout:T??P??A}),z]})});var tt=e.i(61487),tn=e.i(253984);let tr={...ey.popupStateMapping,...eH.transitionStatusMapping},tl=d.forwardRef(function(e,n){let{render:r,className:l,style:a,initialFocus:s,finalFocus:i,...o}=e,u=F(),c=eL(),p=B(),m=u.useState("mounted"),f=u.useState("open"),x=u.useState("openMethod"),g=u.useState("popupProps"),v=u.useState("transitionStatus"),b=u.useState("inputInsidePopup"),S=u.useState("inputElement"),y=u.useState("modal"),C=u.useState("id"),j=eO(),E=o.id??(b?ea(C):void 0);(0,h.useIsoLayoutEffect)(()=>(u.set("popupId",u.context.popupRef.current?.id||E),()=>{u.set("popupId",void 0)}),[u,E]),(0,ee.useOpenChangeComplete)({open:f,ref:u.context.popupRef,onComplete(){f&&u.context.onOpenChangeComplete(!0)}});let N={open:f,side:c.side,align:c.align,anchorHidden:c.anchorHidden,transitionStatus:v,empty:j},k=(0,eb.useRenderElement)("div",e,{state:N,ref:[n,u.context.popupRef],props:[g,{id:E,role:b?"dialog":"presentation",onFocus(e){let t=(0,A.getTarget)(e.nativeEvent);"touch"!==x&&((0,A.contains)(u.state.listElement,t)||t===e.currentTarget)&&u.context.inputRef.current?.focus()}},(0,tn.getDisabledMountTransitionStyles)(v),o],stateAttributesMapping:tr}),I=!!b&&(e=>"touch"===e?u.context.popupRef.current:S),R=!b||y;return(0,t.jsx)(tt.FloatingFocusManager,{context:p,disabled:!m,modal:R,openInteractionType:x,initialFocus:void 0===s?I:s,returnFocus:null!=i?i:!!b&&void 0,getInsideElements:()=>[u.context.startDismissRef.current,u.context.endDismissRef.current],children:(0,t.jsxs)(d.Fragment,{children:[k,R&&(0,t.jsx)(e_,{ref:u.context.endDismissRef})]})})}),ta=d.forwardRef(function(e,t){let{render:n,className:r,style:l,...a}=e,s=F(),{arrowRef:i,side:o,align:u,arrowUncentered:c,arrowStyles:d}=eL(),p=s.useState("open");return(0,eb.useRenderElement)("div",e,{ref:[i,t],stateAttributesMapping:ey.popupStateMapping,state:{open:p,side:o,align:u,uncentered:c},props:{style:d,"aria-hidden":!0,...a}})}),ts=d.createContext(void 0),ti=d.forwardRef(function(e,n){let{render:r,className:l,style:a,items:s,...i}=e,o=F().useState("grid"),[u,c]=d.useState(),p=d.useMemo(()=>({labelId:u,setLabelId:c,items:s}),[u,c,s]),m=(0,eb.useRenderElement)("div",e,{ref:n,props:[{role:o?"rowgroup":"group","aria-labelledby":u},i]}),f=(0,t.jsx)(ts.Provider,{value:p,children:m});return s?(0,t.jsx)(eG,{items:s,children:f}):f}),to=d.forwardRef(function(e,t){let{render:n,className:r,style:l,id:a,...s}=e,{setLabelId:i}=function(){let e=d.useContext(ts);if(void 0===e)throw Error((0,f.default)(18));return e}(),o=(0,eM.useBaseUiId)(a);return(0,h.useIsoLayoutEffect)(()=>(i(o),()=>{i(e=>e===o?void 0:e)}),[o,i]),(0,eb.useRenderElement)("div",e,{ref:t,props:[{id:o,"aria-hidden":!0},s]})});var tu=e.i(174080),tc=e.i(673553);let td=d.createContext(void 0),tp=d.createContext(!1);function tm(e){let{componentProps:n,forwardedRef:r,virtualized:l,indexFromFilter:a}=e,{render:s,className:i,style:o,value:u=null,index:c,disabled:p=!1,nativeButton:m=!1,...f}=n,x=d.useRef(null),g=(0,tc.useCompositeListItem)({guess:!0,index:c,textRef:x}),v=F(),b=d.useContext(tp),S=d.useContext(L),y=v.useState("selectionMode"),C=v.useState("disabled"),j=v.useState("readOnly"),E=v.useState("isItemEqualToValue"),N=C||p,k="none"!==y,I=c??a??g.index,R=-1!==I,w=v.useState("id"),O=v.useState("isActive",I),A=v.useState("isSelected",u),P=v.useState("itemProps"),T=d.useRef(null),M=null!=w&&R?`${w}-${I}`:void 0,D=A&&k;(0,h.useIsoLayoutEffect)(()=>{if(!(R&&(l||null!=c)))return;let e=v.context.listRef.current;return e[I]=T.current,()=>{delete e[I]}},[R,l,I,c,v]),(0,h.useIsoLayoutEffect)(()=>{if(!R||S)return;let e=v.context.valuesRef.current;return e[I]=u,()=>{delete e[I]}},[R,S,I,u,v]),(0,h.useIsoLayoutEffect)(()=>{if(!R||S)return;let e=v.state.selectedValue,t=v.state.selectedIndex;if("multiple"===v.state.selectionMode&&Array.isArray(e)){var n,r;n=v.context.valuesRef.current,r=t,t=$(e,u,E)?null!=r&&I>r&&$(e,n[r],E)?r:I:I===r?G(n,e,E,!0):r}else q(u,e,E)&&(t=I);v.set("selectedIndex",t)},[R,S,v,I,u,E]);let{getButtonProps:V,buttonRef:_}=(0,eS.useButton)({disabled:N,focusableWhenDisabled:!0,native:m,composite:!0});function B(e){function t(){v.context.handleSelection(e,u)}v.state.submitOnItemClick?(tu.flushSync(t),v.context.requestSubmit()):t()}let K=(0,eb.useRenderElement)("div",n,{ref:[_,r,g.ref,T],state:{disabled:N,selected:D,highlighted:O},props:[P,{id:M,role:b?"gridcell":"option","aria-selected":k?D:void 0,tabIndex:void 0,onPointerDownCapture(e){e.isPrimary&&(v.context.pointerDownItemRef.current=e.currentTarget),e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){N||j||B(e.nativeEvent)},onMouseUp(e){let t=v.context.pointerDownItemRef.current===e.currentTarget;v.context.pointerDownItemRef.current=null,N||j||0!==e.button||t||!O||B(e.nativeEvent)}},f,V]}),z=d.useMemo(()=>({selected:D,textRef:x}),[D,x]);return(0,t.jsx)(td.Provider,{value:z,children:K})}function tf(e){let{componentProps:n,forwardedRef:r}=e,l=F().useState("isItemEqualToValue"),{flatFilteredValues:a}=K(),s=U(a,n.value??null,l);return(0,t.jsx)(tm,{componentProps:n,forwardedRef:r,virtualized:!0,indexFromFilter:s})}let tx=d.memo(d.forwardRef(function(e,n){let r=F().useState("virtualized");return r&&null==e.index?(0,t.jsx)(tf,{componentProps:e,forwardedRef:n}):(0,t.jsx)(tm,{componentProps:e,forwardedRef:n,virtualized:r,indexFromFilter:void 0})})),th=d.forwardRef(function(e,n){let{render:r,className:l,style:a,...s}=e,i=(0,eb.useRenderElement)("div",e,{ref:n,props:[{role:"row"},s]});return(0,t.jsx)(tp.Provider,{value:!0,children:i})}),tg=d.forwardRef(function(e,t){let{render:n,className:r,style:l,children:a,...s}=e,{filteredItems:i}=K(),o=F(),u=eX(),c=0===i.length?a:null;return(0,eb.useRenderElement)("div",e,{ref:[t,o.context.emptyRef,u],props:[{children:c,role:"status","aria-live":"polite","aria-atomic":!0},s]})}),tv=d.forwardRef(function(e,t){let{className:n,render:r,orientation:l="horizontal",style:a,...s}=e;return(0,eb.useRenderElement)("div",e,{state:{orientation:l},ref:t,props:[{role:"presentation"},s]})});e.s(["Arrow",0,ta,"Backdrop",0,e5,"Clear",0,e$,"Collection",0,eW,"Empty",0,tg,"Group",0,ti,"GroupLabel",0,to,"Icon",0,ez,"Input",0,eF,"InputGroup",0,eK,"Item",0,tx,"List",0,eJ,"Popup",0,tl,"Portal",0,e1,"Positioner",0,te,"Root",0,function(e){let n,{openOnInputClick:r=!1,value:l,defaultValue:a,onValueChange:s,mode:i="list",itemToStringValue:o,...u}=e,c=("inline"===i||"both"===i)&&!e.readOnly,p=void 0!==l,[m,f]=d.useState(a??""),[x,h]=d.useState("");d.useEffect(()=>{(p||!c)&&h("")},[l,p,c]),n=c&&""!==x?x:p?l??"":m;let g=ei({locale:u.locale}),v=String((p?l:m)??"").trim(),b="inline"===i||"none"===i||null===u.filter?null:u.filter??g.contains;return(0,t.jsx)(eh,{...u,itemToStringLabel:o,openOnInputClick:r,selectionMode:"none",fillInputOnItemPress:!0,filter:b,filterQuery:"both"===i?v:void 0,autoComplete:i,inputValue:n,defaultInputValue:a,onInputValueChange:function(e,t){h(""),p||f(e),s?.(e,t)},onItemHighlighted:function(t,n){e.onItemHighlighted?.(t,n),n.reason!==T.REASONS.pointer&&h(c&&null!=t?X(t,o):"")}})},"Row",0,th,"Separator",0,tv,"Status",0,eQ,"Trigger",0,eP,"Value",0,function(e){let{children:n}=e,r=z(),l=null;return l="function"==typeof n?n(String(r)):null!=n?n:r,(0,t.jsx)(d.Fragment,{children:l})},"useFilter",0,ei,"useFilteredItems",0,function(){return K().filteredItems}],196799);var tb=e.i(196799),tb=tb,tS=e.i(716327),ty=e.i(611568),tC=e.i(23750),tj=e.i(647163);function tE({value:e,onChange:r,options:l,placeholder:a,empty:s="Nothing matches",note:i="Not on the list? Type it, then save.",loading:o=!1,disabled:u=!1,className:c,"aria-label":p}){let f=new Set(l.map(e=>e.value.toLowerCase())),[x,h]=(0,d.useState)(e),[g,v]=(0,d.useState)(e);g!==e&&(v(e),h(e));let b=x.trim(),S=""!==b&&b!==e;return(0,t.jsxs)(tb.Root,{items:l,value:x,onValueChange:(e,t)=>{h(e),"item-press"===t.reason&&r(e)},itemToStringValue:e=>e.value,filter:(e,t)=>{let n;return!!(!(n=t.trim().toLowerCase())||f.has(n))||[e.value,e.label,e.badge].filter(Boolean).some(e=>String(e).toLowerCase().includes(n))},openOnInputClick:!0,disabled:u,children:[(0,t.jsxs)("div",{className:(0,tj.cn)("flex gap-2",c),children:[(0,t.jsxs)(tb.InputGroup,{className:"relative min-w-0 flex-1",children:[(0,t.jsx)(tb.Input,{placeholder:a,"aria-label":p,spellCheck:!1,className:(0,tj.cn)(tC.inputClassName,"pr-8 font-mono text-sm")}),(0,t.jsx)(tb.Trigger,{"aria-label":"Show suggestions",className:"absolute inset-y-0 right-0 flex w-8 items-center justify-center text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:text-foreground disabled:opacity-50",children:o?(0,t.jsx)(ty.LoaderCircle,{className:"size-3.5 animate-spin"}):(0,t.jsx)(tS.ChevronDown,{className:"size-3.5"})})]}),S&&!u&&(0,t.jsx)(m.Button,{variant:"outline",className:"shrink-0",onClick:()=>r(b),children:"Save"})]}),(0,t.jsx)(tb.Portal,{children:(0,t.jsx)(tb.Positioner,{sideOffset:4,className:"isolate z-50 outline-none",children:(0,t.jsxs)(tb.Popup,{className:"max-h-(--available-height) w-max min-w-(--anchor-width) max-w-[min(28rem,var(--available-width))] origin-(--transform-origin) rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none 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",children:[i&&(0,t.jsx)("p",{className:"px-1.5 pt-1 pb-1.5 text-[11px] text-muted-foreground",children:i}),(0,t.jsx)(tb.Empty,{className:"px-2 py-2 font-mono text-[11px] text-muted-foreground empty:hidden",children:o?"Loading":s}),(0,t.jsx)(tb.List,{className:"max-h-64 overflow-y-auto outline-none",children:r=>(0,t.jsxs)(tb.Item,{value:r,className:"flex cursor-default items-center gap-2 rounded-md px-1.5 py-1.5 text-sm outline-none select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground",children:[(0,t.jsx)("span",{className:"flex-1 whitespace-nowrap",children:r.label}),r.badge&&(0,t.jsx)("span",{className:"shrink-0 rounded-full bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:r.badge}),r.hint&&r.hint!==r.label&&(0,t.jsx)("span",{className:"min-w-0 shrink truncate font-mono text-[11px] text-muted-foreground",children:r.hint}),(0,t.jsx)(n.Check,{className:(0,tj.cn)("size-3.5 shrink-0",r.value===e.trim()?"opacity-100":"opacity-0")})]},r.value)})]})})})]})}var tN=e.i(917162),tk=e.i(59377);e.s([],506329),e.i(506329);let tI={checked:e=>e?{"data-checked":""}:{"data-unchecked":""},...eH.transitionStatusMapping,...eC.fieldValidityMapping};var tR=e.i(64350),tw=e.i(370359),tO=e.i(348990),tA=e.i(157153),tP=e.i(31421);let tT=d.createContext(void 0),tM=d.createContext(void 0),tD=d.forwardRef(function(e,n){let{render:r,className:l,disabled:a=!1,readOnly:s=!1,required:i=!1,"aria-labelledby":o,value:u,inputRef:c,nativeButton:p=!1,id:m,style:f,...x}=e,g=d.useContext(tT),{disabled:b,readOnly:y,required:C,form:E,checkedValue:N,touched:k=!1,validation:I,name:R,setCheckedValue:w=j.NOOP,setTouched:O=j.NOOP,registerInputRef:A=j.NOOP}=g??{},{setTouched:M,setFilled:D,state:V,disabled:L}=(0,et.useFieldRootContext)(),_=(0,tA.useFieldItemContext)(),{labelId:F,getDescriptionProps:B}=(0,eN.useLabelableContext)(),K=L||_.disabled||b||a,z=y||s,H=C||i,q=g?N===u:""===u,$=d.useRef(null),U=d.useRef(null),G=I?.registerInput,Y=d.useCallback(e=>G?.(e,{controlRef:$,value:void 0}),[G]),J=(0,v.useMergedRefs)(c,U,A,Y);(0,h.useIsoLayoutEffect)(()=>{U.current?.checked&&D(!0)},[D]),(0,h.useIsoLayoutEffect)(()=>{if(U.current){if(K&&q)return void A(null);A(U.current)}},[q,K,A]);let X=(0,eM.useBaseUiId)(),Q=(0,el.useLabelableId)({id:m}),Z=p?void 0:Q,ee={role:"radio","aria-checked":q,"aria-labelledby":(0,tP.useAriaLabelledBy)(o,F,U,!p,Z),[tw.ACTIVE_COMPOSITE_ITEM]:q?"":void 0,id:p?Q:X,onKeyDown(e){"Enter"===e.key&&e.preventDefault()},onClick(e){if(e.defaultPrevented||K||z)return;e.preventDefault();let t=U.current;t&&(0,tR.dispatchClickWithModifiers)(t,e)},onFocus(e){e.defaultPrevented||K||z||!k||(U.current?.click(),O(!1))}},{getButtonProps:en,buttonRef:er}=(0,eS.useButton)({disabled:K,native:p,composite:!1}),ea={type:"radio",ref:J,form:E,id:Z,name:R,tabIndex:-1,style:R?S.visuallyHiddenInput:S.visuallyHidden,"aria-hidden":!0,...void 0!==u?{value:W(u)}:j.EMPTY_OBJECT,disabled:K,checked:q,required:H,readOnly:z,onChange(e){if(e.nativeEvent.defaultPrevented||K||z||void 0===u)return;let t=(0,P.createChangeEventDetails)(T.REASONS.none,e.nativeEvent);w(u,t),t.isCanceled||M(!0)},onClick(e){e.stopPropagation()},onFocus(){$.current?.focus()}},es=d.useMemo(()=>({...V,required:H,disabled:K,readOnly:z,checked:q}),[V,K,z,q,H]),ei=void 0!==g,eo=[n,$,er],eu=[ee,x,en,B,I?e=>I.getValidationProps(K,e):j.EMPTY_OBJECT],ec=(0,eb.useRenderElement)("span",e,{enabled:!ei,state:es,ref:eo,props:eu,stateAttributesMapping:tI});return(0,t.jsxs)(tM.Provider,{value:es,children:[ei?(0,t.jsx)(tO.CompositeItem,{tag:"span",render:r,className:l,style:f,state:es,refs:eo,props:eu,stateAttributesMapping:tI}):ec,(0,t.jsx)("input",{...ea,suppressHydrationWarning:!0})]})}),tV=d.forwardRef(function(e,t){let{render:n,className:r,style:l,keepMounted:a=!1,...s}=e,i=function(){let e=d.useContext(tM);if(void 0===e)throw Error((0,f.default)(52));return e}(),o=i.checked,{mounted:u,transitionStatus:c,setMounted:p}=(0,eo.useTransitionStatus)(o),m={...i,transitionStatus:c},x=d.useRef(null),h=(0,eb.useRenderElement)("span",e,{ref:[t,x],state:m,props:s,stateAttributesMapping:tI});return((0,ee.useOpenChangeComplete)({batch:!0,enabled:!o,open:o,ref:x,onComplete(){o||p(!1)}}),a||u)?h:null});e.s(["Indicator",0,tV,"Root",0,tD],66747);var tL=e.i(66747),tL=tL,t_=e.i(673327),tF=e.i(405934),tB=e.i(155627),tK=e.i(387068);let tz=[t_.SHIFT],tH=d.forwardRef(function(e,n){let{render:r,className:l,disabled:a,readOnly:s,required:i,onValueChange:o,value:u,defaultValue:c,form:p,name:m,inputRef:f,id:h,style:v,...b}=e,{setTouched:S,setFocused:y,validationMode:C,name:j,disabled:E,state:N,validation:k,setDirty:I,setFilled:R,validityData:w}=(0,et.useFieldRootContext)(),{labelId:O}=(0,eN.useLabelableContext)(),{clearErrors:P,elementRef:T}=(0,er.useFormContext)(),M=(0,tK.useFieldsetRootContext)(!0),D=E||a,V=j??m,L=(0,eM.useBaseUiId)(h),[_,F]=(0,x.useControlled)({controlled:u,default:c,name:"RadioGroup",state:"value"}),[B,K]=d.useState(!1),z=(0,g.useStableCallback)((e,t)=>{o?.(e,t),t.isCanceled||F(e)}),H=k.getInputControl,q=d.useMemo(()=>({get current(){return H()}}),[H]),$=d.useRef(null),U=d.useRef(null);function G(e){let t;return f&&("function"==typeof f?t=f(e):f.current=e),$.current=e,t}let W=(0,g.useStableCallback)(e=>{if(!e||e.disabled)return;U.current||(U.current=e);let t=$.current,n=e.checked||null==t||t.disabled?G(e):void 0;return()=>{U.current===e&&(U.current=null),$.current===e?n?(n(),$.current=null):G(null):n?.()}}),Y=(0,g.useStableCallback)(()=>{let e=T.current;if(!e)return _??null;for(let t of k.registeredInputs.keys())if(t.checked&&(0,tB.isEligibleInput)(t,e))return _??null;return null});(0,en.useRegisterFieldControl)(q,L,_??null,Y,!D,m),(0,ec.useValueChanged)(_,()=>{P(V),I(_!==w.initialValue),R(null!=_),k.change(_);let e=U.current;null==_&&e&&!e.disabled&&G(e)});let J=O??M?.legendId,X={...N,disabled:D??!1,required:i??!1,readOnly:s??!1},Q=d.useMemo(()=>({checkedValue:_,disabled:D,form:p,validation:k,name:V,readOnly:s,registerInputRef:W,required:i,setCheckedValue:z,setTouched:K,touched:B}),[_,D,p,k,V,s,W,i,z,K,B]);return(0,t.jsx)(tT.Provider,{value:Q,children:(0,t.jsx)(tF.CompositeRoot,{render:r,className:l,style:v,state:X,props:[{id:h,role:"radiogroup","aria-required":i||void 0,"aria-disabled":D||void 0,"aria-readonly":s||void 0,"aria-labelledby":J,onFocus(){y(!0)},onBlur(e){(0,A.contains)(e.currentTarget,e.relatedTarget)||(S(!0),y(!1),"onBlur"===C&&k.commit(_))},onKeyDownCapture(e){e.key.startsWith("Arrow")&&(K(!0),y(!0))}},b,e=>k.getValidationProps(D??!1,e)],refs:[n],stateAttributesMapping:eC.fieldValidityMapping,enableHomeAndEndKeys:!1,modifierKeys:tz})})});function tq({className:e,...n}){return(0,t.jsx)(tH,{"data-slot":"radio-group",className:(0,tj.cn)("grid w-full gap-2",e),...n})}function t$({className:e,...n}){return(0,t.jsx)(tL.Root,{"data-slot":"radio-group-item",className:(0,tj.cn)("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 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 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-brand data-checked:bg-brand data-checked:text-brand-foreground group-has-[:focus-visible]/field-label:data-checked:border-brand dark:data-checked:bg-brand",e),...n,children:(0,t.jsx)(tL.Indicator,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:(0,t.jsx)("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-brand-foreground"})})})}var tU=e.i(421429),tG=e.i(660302),tW=e.i(671428),tY=e.i(319036),tJ=e.i(184762),tX=e.i(41533),tQ=e.i(412294),tZ=e.i(458898),t0=e.i(149666),t1=e.i(265402),t2=e.i(609507),t5=e.i(616816),t3=e.i(584923),t6=e.i(895836),t4=e.i(658707),t8=e.i(867927);let t7={name:"phone",size:24,node:[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]};t7.node;let t9=(0,a.default)(t7);var ne=e.i(759659),nt=e.i(633669),nn=e.i(222055),nr=e.i(245629),nl=e.i(609856),na=e.i(661504),ns=e.i(95187);let ni=(0,ns.createServerReference)("7feaa8946edbd4a47df07c66aa0e8525cb94c0de32",ns.callServer,void 0,ns.findSourceMapURL,"deleteCallAction"),no=(0,ns.createServerReference)("7f15e31a13d326e51e009693947656d5af3128c4d9",ns.callServer,void 0,ns.findSourceMapURL,"deleteEndedCallsAction");var nu=e.i(561540),nc=e.i(256604);function nd(){return(0,t.jsxs)("button",{type:"button",onClick:()=>tN.notify.component({className:"sm:max-w-3xl",renderer:()=>(0,t.jsx)(nx,{})}),className:"flex w-full min-w-0 items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:(0,t.jsx)(t9,{className:"size-4"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block text-sm font-medium",children:"Call history"}),(0,t.jsx)("span",{className:"block text-xs text-muted-foreground",children:"Every call, word for word — hers and yours"})]}),(0,t.jsx)(t8.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground"})]})}let np={running:"working",waiting:"waiting on you",done:"done",cancelled:"stopped"},nm={running:"text-muted-foreground",waiting:tj.WAITING_INK,done:"text-muted-foreground",cancelled:"text-muted-foreground"},nf="h-[min(34rem,58vh)] min-h-64 px-1";function nx(){let{items:e,isLoading:n,isLoadingMore:r,error:l,hasMore:a,sentinelRef:s,refresh:i}=(0,na.useServerPages)({key:(e,t)=>{if(0===e)return p.queryKey.callHistory(null);let n=t?.at(-1);return n?p.queryKey.callHistory((0,nr.toDate)(n.startedAt).toISOString()):null},size:tX.CALL_HISTORY_PAGE,swr:{revalidateOnFocus:!1}}),o=(0,d.useMemo)(()=>[...e].reverse(),[e]),[u,c]=(0,nl.useServerAction)(no,{okMessage:e=>1===e?"1 call deleted":`${e} calls deleted`,onOk:i}),f=async()=>{await tN.notify.confirm({title:"Delete every call?",description:"Every turn of every call goes — and she stops reading any of it back into the next call. A call still on the line stays.",okText:"Delete all",destructive:!0})&&u()},x=(0,d.useRef)(null),h=(0,d.useRef)(!1),g=(0,d.useRef)(0);(0,d.useLayoutEffect)(()=>{let e=x.current;e&&0!==o.length&&(h.current?e.scrollTop=e.scrollHeight-g.current:(h.current=!0,e.scrollTop=e.scrollHeight),g.current=e.scrollHeight-e.scrollTop)},[o]);let v=e=>(0,t.jsx)(t6.SettingDialogContent,{title:"Call history",description:`Everything said on the line, oldest at the top.${o.length>0?" Scroll up for older calls.":""}`,children:e});return v(n?(0,t.jsx)("div",{className:(0,tj.cn)(nf,"overflow-hidden"),children:(0,t.jsx)(nh,{})}):l?(0,t.jsx)(t6.SettingError,{message:l.message}):(0,t.jsx)(t.Fragment,{children:0===o.length?(0,t.jsx)("p",{className:"px-1 text-sm leading-relaxed text-muted-foreground",children:"No calls yet. Everything said on the line is kept here — hers and yours, in the order it was said."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{ref:x,onScroll:e=>{let t=e.currentTarget;g.current=t.scrollHeight-t.scrollTop},className:(0,tj.cn)(nf,"overflow-y-auto overscroll-contain pb-6"),children:[(0,t.jsx)(t6.SettingMore,{hasMore:a,loading:r,sentinelRef:s,count:1,ghost:(0,t.jsx)(nh,{})}),o.map((e,n)=>(0,t.jsx)(nv,{call:e,first:0===n,onDropped:i},e.id))]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)(m.Button,{variant:"ghost",loading:c,onClick:f,className:"text-muted-foreground hover:text-destructive",children:[(0,t.jsx)(ne.Trash2,{}),"Delete all"]})})]})}))}function nh(){return(0,t.jsxs)("div",{className:"pb-3",children:[(0,t.jsxs)("div",{className:"flex h-7 items-center gap-2.5",children:[(0,t.jsx)(tW.Skeleton,{className:"h-3 w-24"}),(0,t.jsx)(tW.Skeleton,{className:"h-3 w-10"})]}),(0,t.jsx)("div",{className:"mt-2 mb-[18px] h-px bg-border/60"}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(tW.Skeleton,{className:"h-9 w-3/5 rounded-2xl rounded-br-sm"})}),(0,t.jsxs)("div",{className:"mt-3 flex items-start gap-2",children:[(0,t.jsx)(tW.Skeleton,{className:"mt-0.5 size-[18px] shrink-0 rounded-full"}),(0,t.jsx)(tW.Skeleton,{className:"mt-1 h-3.5 w-2/3"})]})]})}let ng=e=>"user"===e.role?"user":"her";function nv({call:e,first:n,onDropped:r}){let[l,a]=(0,nl.useServerAction)(ni,{okMessage:"Call deleted",onOk:r}),s=(0,nr.toDate)(e.startedAt),i=e.turns.at(-1),o=e.endedAt&&i?function(e,t){let n=Math.max(0,Math.round((t.getTime()-e.getTime())/1e3));if(n<60)return`${n}s`;let r=Math.floor(n/60);return r<60?`${r}m ${String(n%60).padStart(2,"0")}s`:`${Math.floor(r/60)}h ${String(r%60).padStart(2,"0")}m`}(s,(0,nr.toDate)(i.at)):"on the line",u=async()=>{await tN.notify.confirm({title:`Delete the call from ${(0,nr.whenOf)(s)}?`,description:"Every turn of it goes — and she stops reading it back into the next call.",okText:"Delete",destructive:!0})&&l(e.id)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:(0,tj.cn)("group flex items-center gap-2.5",n?"mt-1":"mt-11"),children:[(0,t.jsx)("span",{title:[e.provider,e.model,e.backendModel,null===e.seconds?null:`${e.seconds}s active`,e.endedReason].filter(Boolean).join(" · "),className:"font-mono text-[10px] tracking-[0.14em] uppercase",children:(0,nr.whenOf)(s)}),(0,t.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground",children:e.model===tX.TEXT_CALL.model?`${o} \xb7 in writing`:o}),(0,t.jsx)("span",{className:"ml-auto flex size-7 shrink-0 items-center justify-center",children:e.endedAt&&(0,t.jsx)(m.Button,{size:"icon-sm",variant:"ghost",loading:a,"aria-label":"Delete this call",onClick:u,className:"text-muted-foreground/60 opacity-0 transition-opacity group-hover:opacity-100 hover:text-destructive focus-visible:opacity-100",children:(0,t.jsx)(ne.Trash2,{})})})]}),(0,t.jsx)("div",{className:"mt-2 mb-[18px] h-px bg-border/60"}),(function(e){let t=[];for(let n of e){let e=t.at(-1);if(e&&"tool"===n.role&&"tool"===e.turn.role&&e.turn.tool===n.tool&&e.turn.text===n.text){e.repeats+=1;continue}t.push({turn:n,repeats:1})}return t})(e.turns).map(({turn:n,repeats:r},l,a)=>{var s,i;let o,u=a[l-1]?.turn,c=a[l+1]?.turn;return(0,t.jsx)(nb,{turn:n,job:(s=e,i=n,(o=(0,nu.startedLabel)(i.tool,i.text))?s.jobs.find(e=>e.label===o):void 0),repeats:r,opensRun:!u||ng(u)!==ng(n),closesRun:!c||ng(c)!==ng(n)},n.id)})]})}function nb({turn:e,job:n,opensRun:r,closesRun:l,repeats:a=1}){return"tool"===e.role?(0,t.jsx)(ny,{turn:e,job:n,repeats:a,opensRun:r}):"user"===e.role?(0,t.jsx)("div",{className:(0,tj.cn)("flex justify-end",r?"mt-3":"mt-1"),children:(0,t.jsx)("p",{className:(0,tj.cn)("max-w-[min(34rem,78%)] rounded-2xl bg-muted px-3.5 py-2 text-[13.5px] leading-relaxed break-keep wrap-anywhere whitespace-pre-wrap",l&&"rounded-br-sm"),children:e.text})}):(0,t.jsxs)("div",{className:(0,tj.cn)("flex items-start gap-2",r?"mt-3":"mt-1"),children:[(0,t.jsx)(nS,{face:r,className:"mt-0.5"}),(0,t.jsx)("p",{className:"max-w-[min(34rem,78%)] text-[13.5px] leading-relaxed break-keep wrap-anywhere whitespace-pre-wrap",children:e.text})]})}function nS({face:e,className:n}){return(0,t.jsx)("span",{className:(0,tj.cn)("grid size-[18px] shrink-0 place-items-center",n),children:e&&(0,t.jsx)(nc.ThursdayMark,{size:18})})}function ny({turn:e,job:n,repeats:r,opensRun:l}){let a=e.tool??"",s=(0,nn.toolIcon)(a),i=(0,nu.toolLine)(a,e.text),o=(0,nu.searchOf)(e.tool,e.text)?.sources??[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:(0,tj.cn)("flex items-center gap-2",l?"mt-3":"mt-1.5"),children:[(0,t.jsx)(nS,{face:l}),(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-muted-foreground",children:[(0,t.jsx)(s,{className:"size-3 shrink-0"}),i&&(0,t.jsx)("span",{className:"truncate text-[11px] break-keep",children:i}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground",children:a}),r>1&&(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground",children:["×",r]})]})]}),o.length>0&&(0,t.jsx)(nt.SourceChips,{sources:o,className:"mt-1 ml-[26px]"}),n&&(0,t.jsxs)("p",{className:"mt-0.5 ml-[26px] flex min-w-0 items-baseline gap-1.5 text-[11px]",children:["running"===n.status?(0,t.jsx)(tG.ShinyText,{text:np.running,className:"shrink-0 font-mono text-[10px]"}):(0,t.jsx)("span",{className:(0,tj.cn)("shrink-0 font-mono text-[10px]",nm[n.status]),children:np[n.status]}),n.outcome&&"running"!==n.status&&(0,t.jsx)("span",{className:"truncate text-muted-foreground",children:(0,tj.plainText)(n.outcome)})]})]})}var nC=e.i(263676),nj=e.i(6799),nE=e.i(333495),nN=e.i(218080);let nk=Array(nN.SPECTRUM_BANDS).fill(0);function nI({voice:e,onChange:r}){let[l,a]=(0,d.useState)(!1),[s,i]=(0,d.useState)(e),[o,u]=(0,d.useState)(!1),[c,p]=(0,d.useState)(""),f=(0,d.useRef)(null),x=(0,d.useRef)(null),h=(0,d.useRef)(0),g=(0,d.useRef)(!1),v=(0,d.useCallback)(()=>x.current&&g.current?x.current.clip.read():nk,[]),b=e=>{g.current=e,u(e)};(0,d.useEffect)(()=>{if(l)return()=>{let e=x.current;x.current=null,e&&(e.element.pause(),e.clip.close())}},[l]);let S=(e,t)=>{e===h.current&&(h.current++,b(!1),nj.toast.add({type:"error",title:"Voice sample did not play",description:(0,tj.errorToString)(t)}))},y=()=>{h.current++;let e=f.current;e&&(e.pause(),e.currentTime=0),b(!1)};return l?(0,t.jsxs)("div",{className:"@container space-y-2",children:[(0,t.jsx)("audio",{ref:f,onEnded:()=>b(!1),onError:e=>{g.current&&S(h.current,e.currentTarget.error?.message||"The clip could not be read.")},children:(0,t.jsx)("track",{kind:"captions"})}),(0,t.jsxs)("div",{className:"rounded-xl border border-border/60 p-3",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-[11px] text-muted-foreground",children:"click a name to hear it"}),(0,t.jsx)(m.Button,{variant:"ghost",size:"icon-xs",className:"ml-auto","aria-label":"Close",onClick:()=>{y(),a(!1),p(""),i(e)},children:(0,t.jsx)(nC.X,{})})]}),(0,t.jsxs)("div",{className:"grid gap-4 @md:grid-cols-[11rem_minmax(0,1fr)]",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,t.jsx)(nE.Face,{status:o?"speaking":"idle",getSpectrum:v,className:"w-44"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:o?(0,t.jsx)(tG.ShinyText,{text:s}):s}),(0,t.jsx)("span",{className:"h-4 font-mono text-[11px] text-muted-foreground",children:t0.LIVE_VOICE_NOTE[s]})]}),(0,t.jsx)("div",{className:"max-h-56 min-w-0 overflow-y-auto",children:t0.LIVE_VOICES.map(r=>(0,t.jsxs)("button",{type:"button",onClick:()=>(e=>{let t=f.current;if(!t)return;if(o&&e===s)return void y();i(e),p(""),x.current?.element!==t&&(x.current?.clip.close(),x.current={element:t,clip:(0,nN.createClipTap)(t)}),x.current.clip.resume();let n=++h.current;t.src=(0,t0.voiceSamplePath)(e),b(!0),t.play().catch(e=>{e instanceof DOMException&&"AbortError"===e.name||S(n,e)})})(r),className:(0,tj.cn)("flex w-full items-center gap-2 rounded-md px-1.5 py-1.5 text-sm outline-none hover:bg-accent focus-visible:bg-accent",r===s&&"bg-accent text-accent-foreground"),children:[(0,t.jsx)("span",{className:"flex-1 text-left",children:o&&r===s?(0,t.jsx)(tG.ShinyText,{text:r}):r}),(0,t.jsx)("span",{className:"shrink truncate font-mono text-[11px] text-muted-foreground",children:t0.LIVE_VOICE_NOTE[r]}),(0,t.jsx)(n.Check,{className:(0,tj.cn)("size-3.5 shrink-0",r===e?"opacity-100":"opacity-0")})]},r))})]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(tC.Input,{value:c,onChange:e=>p(e.target.value),placeholder:"another voice id","aria-label":"Another voice id",spellCheck:!1,className:"font-mono text-sm"}),(0,t.jsx)(m.Button,{className:"shrink-0",onClick:()=>{let t=c.trim()||s;y(),a(!1),p(""),i(t),t!==e&&r(t)},children:"Save"})]})]}):(0,t.jsxs)("button",{type:"button",onClick:()=>a(!0),"aria-label":"Voice",className:(0,tj.cn)(tC.inputClassName,"flex items-center gap-2 text-left font-mono text-sm hover:border-ring"),children:[(0,t.jsx)("span",{className:"shrink-0",children:e}),(0,t.jsx)("span",{className:"min-w-0 truncate text-[11px] text-muted-foreground",children:t0.LIVE_VOICE_NOTE[e]}),(0,t.jsx)(tS.ChevronDown,{className:"ml-auto size-3.5 shrink-0 text-muted-foreground"})]})}let nR=(0,ns.createServerReference)("7f5115d7082b289f96cb01892d1b809518f3cd2dfd",ns.callServer,void 0,ns.findSourceMapURL,"resetHistoryAction");var nw=e.i(671228),nO=e.i(67045),nA=e.i(297825),nP=e.i(319841);function nT(e,t,{min:n=1,accepts:r=()=>!0}={}){let[l,a]=(0,d.useState)(e),[s,i]=(0,d.useState)(e);return e!==s&&(i(e),a(e)),{value:l,set:a,commit:()=>{let s=l.trim();if(s.length<n||!r(s))return a(e);a(s),s!==e&&t(s)},onKeyDown:e=>{"Enter"!==e.key||(0,nP.composing)(e)||e.currentTarget.blur()}}}var nM=e.i(413168),nD=e.i(283653);function nV({columns:e,children:n}){return(0,t.jsx)("div",{className:"@container",children:(0,t.jsx)("div",{className:(0,tj.cn)("grid divide-y divide-border/60 overflow-hidden rounded-xl border border-border/60",3===e?"@3xl:grid-cols-3 @3xl:divide-x @3xl:divide-y-0":"@xl:grid-cols-2 @xl:divide-x @xl:divide-y-0"),children:n})})}function nL({label:e,children:n}){return(0,t.jsxs)("div",{className:"flex min-h-5 items-center gap-3",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:e}),n]})}let n_={chatgpt:{model:nM.LIVE_PLAN_MODEL,label:"GPT Subscription"},openai:{model:nM.LIVE_MODEL,label:"OpenAI key"}};function nF({value:e,has:n,plan:r,onChange:l}){let a=(0,t0.liveLineOf)(e.runsOn,n,r),s=e=>(0,t0.liveLineReady)(e,n,r),i=n(t1.TEXT_MODEL_PROVIDERS.chatgpt.apiKeyName),[o,u]=(0,d.useState)(null),c=o&&!s(o)?o:null,p="chatgpt"===a;return(0,t.jsx)(t6.SettingGroup,{label:"Models",note:`Both run on ${p?"your GPT Subscription":"your OpenAI key"}. Instructions are saved when you leave the field.`,children:(0,t.jsxs)("div",{className:"@container divide-y divide-border/60 rounded-xl border border-border/60",children:[!a&&(0,t.jsx)(nq,{plan:i?(0,t1.planName)(r)??"":null}),(0,t.jsxs)(nB,{name:"Voice",fact:p?"on your plan":"billed by the minute",children:[a&&(0,t.jsxs)(nz,{label:"runs on",children:[(0,t.jsx)(tU.Segmented,{options:t0.LIVE_LINES.map(e=>({value:e,label:function(e,{ready:t,set:n,plan:r}){let{label:l}=n_[e];return n&&!t?`${l} \xb7 ${r??"plan"} \xb7 no calls`:t?"chatgpt"===e&&r?`${l} \xb7 ${r}`:l:`${l} \xb7 ${"chatgpt"===e?"sign in":"add"}`}(e,{ready:s(e),set:n(t1.TEXT_MODEL_PROVIDERS[e].apiKeyName),plan:(0,t1.planName)(r)})})),value:c??a,onChange:e=>{u(s(e)?null:e),l({runsOn:e})},"aria-label":"What a call runs on"}),c?(0,t.jsx)(nH,{line:c,runsOn:a,plan:i?(0,t1.planName)(r):null}):(0,t.jsx)("span",{className:"block font-mono text-[11px] text-muted-foreground",children:n_[a].model})]}),(0,t.jsx)(nz,{label:"voice",children:p?(0,t.jsx)(tE,{value:e.planVoice,onChange:e=>l({planVoice:e.trim()||t0.LIVE_DEFAULTS.planVoice}),options:t0.LIVE_PLAN_VOICES.map(e=>({value:e,label:e})),"aria-label":"Voice on the GPT Subscription"}):(0,t.jsx)(nI,{voice:e.voice,onChange:e=>l({voice:e.trim()||t0.LIVE_DEFAULTS.voice})})}),(0,t.jsx)(nz,{label:"style",children:(0,t.jsx)(nK,{value:e.persona,own:e.stylePrompt,onPersona:e=>l({persona:e}),onOwn:e=>l({stylePrompt:e})})})]}),(0,t.jsxs)(nB,{name:"Backend",fact:p?"on your plan":"billed per token",children:[(0,t.jsx)(nz,{label:"model",children:(0,t.jsx)(n$,{value:e.backendModel,onChange:e=>l({backendModel:e})})}),(0,t.jsx)(nz,{label:"effort",children:(0,t.jsx)(tZ.EffortSwitch,{provider:"openai",model:e.backendModel,value:e.reasoningEffort,onChange:e=>l({reasoningEffort:e})})}),(0,t.jsx)(nz,{label:"tools",children:(0,t.jsx)(nU,{webSearch:e.webSearch,readSkills:e.readSkills,onChange:l})}),(0,t.jsx)(nz,{label:"instructions",children:(0,t.jsx)(nY,{value:e.backendPrompt,onCommit:e=>l({backendPrompt:e}),placeholder:"How work should be handed over, what to check first.","aria-label":"Backend instructions"})})]})]})})}function nB({name:e,fact:n,children:r}){return(0,t.jsxs)("div",{className:"grid gap-4 p-5 @2xl:grid-cols-[8.5rem_minmax(0,1fr)] @2xl:gap-6",children:[(0,t.jsxs)("span",{className:"space-y-0.5",children:[(0,t.jsx)("span",{className:"block text-sm font-medium",children:e}),(0,t.jsx)("span",{className:"block font-mono text-[11px] text-muted-foreground",children:n})]}),(0,t.jsx)("div",{className:"min-w-0 space-y-4",children:r})]})}function nK({value:e,own:l,onPersona:a,onOwn:s}){let[i,o]=(0,d.useState)(!1),[u,c]=(0,d.useState)(!1),p=t2.PERSONAS.find(t=>t.id===e)??t2.PERSONAS.find(e=>e.id===t2.DEFAULT_PERSONA)??t2.PERSONAS[0];return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(tk.Popover,{open:i,onOpenChange:o,children:[(0,t.jsx)(tk.PopoverTrigger,{render:(0,t.jsxs)("button",{type:"button",className:"flex w-full items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors hover:bg-muted/50",children:[(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:p.label}),(0,t.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:p.about})]}),(0,t.jsx)(r.ChevronsUpDown,{className:"size-4 shrink-0 text-muted-foreground"})]})}),(0,t.jsxs)(tk.PopoverContent,{align:"start",className:"w-104 p-1.5",children:[(0,t.jsx)("p",{className:"px-2 py-1.5 text-xs text-muted-foreground",children:"How she talks to you. It never changes what she can do."}),t2.PERSONAS.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>{a(e.id),o(!1)},className:(0,tj.cn)("flex w-full items-baseline gap-3 rounded-md px-2 py-1.5 text-left",e.id===p.id?t6.PICKED_ROW:"hover:bg-muted/60"),children:[(0,t.jsx)("span",{className:"w-20 shrink-0 text-sm font-medium",children:e.label}),(0,t.jsx)("span",{className:"min-w-0 flex-1 text-xs text-muted-foreground",children:e.about}),e.id===p.id&&(0,t.jsx)(n.Check,{className:"size-3.5 shrink-0 text-brand"})]},e.id)),(0,t.jsxs)("button",{type:"button",onClick:()=>{c(!0),o(!1)},className:(0,tj.cn)("flex w-full items-baseline gap-3 rounded-md px-2 py-1.5 text-left",l.trim()?t6.PICKED_ROW:"hover:bg-muted/60"),children:[(0,t.jsx)("span",{className:"w-20 shrink-0 text-sm font-medium",children:"Your own"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 text-xs text-muted-foreground",children:"Say it in your words, over the one above."}),l.trim()?(0,t.jsx)(n.Check,{className:"size-3.5 shrink-0 text-brand"}):null]})]})]}),u||l.trim()?(0,t.jsx)(nY,{value:l,onCommit:s,placeholder:"Quieter. Don't explain things I didn't ask about.","aria-label":"In your own words"}):null]})}function nz({label:e,children:n}){return(0,t.jsxs)("div",{className:"min-w-0 space-y-2",children:[(0,t.jsx)("span",{className:"block font-mono text-[11px] text-muted-foreground",children:e}),n]})}function nH({line:e,runsOn:n,plan:r}){let[l,a]=(0,d.useState)(""),[s,i]=(0,nl.useServerAction)(t3.setConfigAction,{onOk:()=>{(0,nD.revalidate)(p.queryKey.llmModel),(0,nD.revalidate)(p.queryKey.config),a("")}}),o=l.trim().length>=tX.KEY_MIN;return(0,t.jsxs)("div",{className:"space-y-2.5 pt-1",children:[(0,t.jsxs)("span",{className:"block text-xs text-muted-foreground",children:["chatgpt"===e?r?`The ${r} plan runs bots and calls in writing, but not spoken calls. Sign in again with a paid plan.`:"Sign in with ChatGPT and calls run on your plan, with no bill by the minute.":"Paste an OpenAI API key. OpenAI bills a call by the minute, apart from ChatGPT."," ","Until then a call runs on your ",n_[n].label,"."]}),"chatgpt"===e?(0,t.jsx)(tQ.ChatGptSignIn,{variant:"brand",size:"sm",label:r?"Sign in again":void 0}):(0,t.jsx)(t5.KeyInput,{dense:!0,provider:t0.LIVE_PROVIDER,saved:!1,autoFocus:!0,value:l,ready:o,saving:i,onValue:a,onSubmit:()=>o&&s(t0.LIVE_PROVIDER.apiKeyName,l)})]})}function nq({plan:e}){return(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsxs)("span",{className:"block space-y-0.5",children:[(0,t.jsx)("span",{className:(0,tj.cn)("block text-sm font-medium",tj.WAITING_INK),children:null===e?"No GPT Subscription or OpenAI key":`Your ${e?`${e} `:""}plan has no spoken calls`}),(0,t.jsx)("span",{className:"block text-xs text-muted-foreground",children:"Her voice and the backend both run on one of them"})]}),(0,t.jsx)("div",{className:"max-w-md",children:(0,t.jsx)(t5.CallLines,{})})]})}function n$({value:e,onChange:r}){let l=nT(t0.LIVE_BACKEND_MODELS.some(t=>t.id===e)?"":e,e=>r(e||t0.LIVE_DEFAULTS.backendModel),{min:0});return(0,t.jsxs)("div",{className:"@container space-y-2",children:[(0,t.jsx)("div",{role:"radiogroup","aria-label":"Backend model",className:"grid grid-cols-2 gap-2 @2xl:grid-cols-4",children:t0.LIVE_BACKEND_MODELS.map(l=>{let a=l.id===e;return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":a,onClick:()=>r(l.id),className:(0,tj.cn)("min-w-0 space-y-0.5 rounded-lg border px-3 py-2.5 text-left outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",a?"border-brand bg-brand/4":"border-border/60 hover:bg-muted/50"),children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:l.label}),a&&(0,t.jsx)(n.Check,{className:"size-3.5 shrink-0 text-brand"})]}),(0,t.jsxs)("span",{className:"block truncate font-mono text-[11px] text-muted-foreground",children:[l.id," · ",l.tier]})]},l.id)})}),(0,t.jsx)(tC.Input,{value:l.value,onChange:e=>l.set(e.target.value),onBlur:l.commit,onKeyDown:l.onKeyDown,placeholder:"Other model id","aria-label":"Other backend model id",spellCheck:!1,className:"font-mono text-sm"})]})}function nU({webSearch:e,readSkills:n,onChange:r}){return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-x-7 gap-y-3",children:[(0,t.jsx)(nG,{label:"Search the web",checked:e,onChange:e=>r({webSearch:e})}),(0,t.jsx)(nG,{label:"Read skills herself",checked:n,onChange:e=>r({readSkills:e})})]}),e&&(0,t.jsx)(t6.SettingNote,{children:"Each search adds to the backend's OpenAI usage."}),n&&(0,t.jsx)(nW,{})]})}function nG({label:e,checked:n,disabled:r,onChange:l}){return(0,t.jsxs)("label",{className:"flex items-center gap-2.5 text-sm",children:[(0,t.jsx)(tY.Switch,{checked:n,disabled:r,onCheckedChange:l}),e]})}function nW(){let{data:e}=(0,nD.useServerRoute)(p.queryKey.skills);return e?(0,t.jsx)(t6.SettingNote,{className:(0,tj.cn)(!e.length&&tj.WAITING_INK),children:e.length?`The same ${e.length} a bot reads. Each one she opens spends a page of the call on it.`:"Nothing installed yet — there is nothing for her to read."}):null}function nY({value:e,onCommit:n,placeholder:r,"aria-label":l}){let a=nT(e,n,{min:0});return(0,t.jsx)(tJ.Textarea,{value:a.value,maxLength:tX.COMMON_VALIDATE.prompt.max,onChange:e=>a.set(e.target.value),onBlur:a.commit,placeholder:r,"aria-label":l})}function nJ(){let[e,n]=(0,nl.useServerAction)(nR,{okMessage:({calls:e,threads:t,notes:n})=>`Wiped ${e} calls, ${t} jobs, ${n} notes`,onOk:()=>{(0,nD.revalidate)(p.queryKey.memory),(0,nD.revalidate)(p.queryKey.threads),(0,nD.revalidate)(p.queryKey.callHistory(null))}}),r=async()=>{await tN.notify.confirm({title:"Reset history?",description:"Every call, every job and everything she remembers is deleted for good. Keys, bots and connectors stay, and so does what each bot keeps for itself.",okText:"Reset",destructive:!0})&&e()};return(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3 p-4",children:[(0,t.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:(0,t.jsx)(c.TriangleAlert,{className:"size-4"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:"Reset history"}),(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:"Calls, jobs and memory. Keys and bots stay."})]}),(0,t.jsx)(m.Button,{variant:"outline",size:"sm",loading:n,onClick:r,className:"shrink-0 text-destructive hover:text-destructive",children:"Reset"})]})}function nX(){let{data:e}=(0,nD.useServerRoute)(p.queryKey.running),{data:n}=(0,nD.useServerRoute)(p.queryKey.update,{onError:()=>{}}),{to:r,failed:l}=(0,t4.useUpdateStore)();if(!e)return(0,t.jsx)(tW.Skeleton,{className:"h-16 w-full rounded-xl"});let{where:a,mac:s,command:o,start:c,home:d}=e,f=n?.newer??null,x=f&&n?.command?n.command:null,h={background:{title:"In the background",hint:"Starts when you log in, and comes back if it stops.",how:o&&{label:"To stop it",run:`${o} stop`}},terminal:{title:"In a terminal",hint:"Closing that terminal stops Thursday.",how:c&&s?{label:"To keep it running without one, press Ctrl+C there and run",run:c}:null},source:{title:"From source",hint:"pnpm dev in a terminal. Closing it stops Thursday.",how:null},elsewhere:{title:"Started by something else",hint:"It stops the way it was started.",how:null}}[a];return(0,t.jsxs)("div",{className:"space-y-3 rounded-xl border border-border/60 p-4",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,t.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:"background"===a?(0,t.jsx)(i,{className:"size-4"}):(0,t.jsx)(u,{className:"size-4"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"block truncate text-sm font-medium",children:[h.title,n?.current&&(0,t.jsxs)("span",{className:"font-normal text-muted-foreground",children:[" ","· ",n.current]})]}),r?(0,t.jsxs)("span",{className:"block text-xs text-muted-foreground",children:[(0,t.jsx)(tG.ShinyText,{text:`Updating to ${r}…`})," Thursday restarts in a moment."]}):f?(0,t.jsxs)("span",{className:"block text-xs",children:[f," is out."]}):(0,t.jsxs)("span",{className:"block text-xs text-muted-foreground",children:[h.hint,"terminal"!==a||s?"":" Running in the background is macOS only for now.",n?.unreached?" npm could not be asked for a newer version.":""]}),(0,t.jsx)("span",{className:"block truncate font-mono text-[11px] text-muted-foreground",children:d})]}),f&&n?.byButton&&!r&&(0,t.jsx)(m.Button,{size:"sm",onClick:()=>void(0,t4.moveTo)(f),children:"Update"})]}),l&&!r&&(0,t.jsxs)("div",{className:"space-y-1 pl-13 text-xs",children:[(0,t.jsxs)("p",{className:"text-destructive",children:["Could not update to ",l.to,"."]}),(0,t.jsx)("p",{className:"line-clamp-3 font-mono text-[11px] whitespace-pre-wrap text-muted-foreground",children:l.why})]}),x&&!r&&(l||!n?.byButton)&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pl-13 text-xs text-muted-foreground",children:[(0,t.jsx)("span",{children:"terminal"===a?"To move to it, press Ctrl+C there and run":"To move to it"}),(0,t.jsx)("code",{className:"rounded-md bg-muted px-1.5 py-0.5 font-mono text-[11px] text-foreground",children:x}),(0,t.jsx)(nQ,{text:x})]}),h.how&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pl-13 text-xs text-muted-foreground",children:[(0,t.jsx)("span",{children:h.how.label}),(0,t.jsx)("code",{className:"rounded-md bg-muted px-1.5 py-0.5 font-mono text-[11px] text-foreground",children:h.how.run}),(0,t.jsx)(nQ,{text:h.how.run})]})]})}function nQ({text:e}){let[r,a]=(0,d.useState)(!1);return(0,t.jsxs)(m.Button,{size:"sm",variant:"outline",onClick:()=>void navigator.clipboard.writeText(e).then(()=>{a(!0),setTimeout(()=>a(!1),2e3)}),children:[r?(0,t.jsx)(n.Check,{}):(0,t.jsx)(l.Copy,{}),r?"Copied":"Copy"]})}let nZ={center:{label:"Her last line",hint:"One caption under the mark — only what she said."},sides:{label:"Both sides",hint:"Hers on the left, yours on the right. Click a line to read it again."}};function n0({value:e,onChange:r}){return(0,t.jsx)(t6.SettingGroup,{label:"Captions",children:(0,t.jsx)("div",{className:"@container",children:(0,t.jsx)("div",{role:"radiogroup","aria-label":"Captions",className:"grid gap-3 @xl:grid-cols-2",children:nw.CAPTION_VIEWS.map(l=>{let a=l===e;return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":a,onClick:()=>r(l),className:(0,tj.cn)("min-w-0 space-y-3 rounded-xl border p-3 text-left outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",a?"border-brand bg-brand/4":"border-border/60 hover:bg-muted/50"),children:[(0,t.jsx)(n1,{view:l}),(0,t.jsxs)("span",{className:"flex items-center gap-3 px-1 pb-0.5",children:[(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:nZ[l].label}),(0,t.jsx)("span",{className:"block text-xs text-pretty text-muted-foreground",children:nZ[l].hint})]}),a&&(0,t.jsx)(n.Check,{className:"size-4 shrink-0 text-brand"})]})]},l)})})})})}function n1({view:e}){let n="block h-1 max-w-full rounded-full bg-foreground/20";return(0,t.jsx)("span",{className:"flex h-24 items-center justify-center rounded-lg bg-muted",children:"center"===e?(0,t.jsxs)("span",{className:"flex flex-col items-center gap-2.5",children:[(0,t.jsx)(nc.ThursdayMark,{size:32}),(0,t.jsx)("span",{className:(0,tj.cn)(n,"w-28")})]}):(0,t.jsxs)("span",{className:"grid w-full grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-4 px-6",children:[(0,t.jsxs)("span",{className:"space-y-1.5",children:[(0,t.jsx)("span",{className:(0,tj.cn)(n,"w-24")}),(0,t.jsx)("span",{className:(0,tj.cn)(n,"w-16")})]}),(0,t.jsx)(nc.ThursdayMark,{size:32}),(0,t.jsx)("span",{children:(0,t.jsx)("span",{className:(0,tj.cn)(n,"ml-auto w-20")})})]})})}function n2({value:e,onChange:n}){return(0,t.jsxs)("div",{className:"min-w-0 space-y-3 p-4",children:[(0,t.jsx)(nL,{label:"She calls you"}),(0,t.jsx)(tq,{"aria-label":"She calls you",value:e,onValueChange:e=>n(nw.CallBackSchema.parse(e)),className:"gap-2.5",children:nw.CALL_BACK_MODES.map(e=>(0,t.jsxs)("label",{className:"flex min-w-0 items-center gap-2.5 text-sm",children:[(0,t.jsx)(t$,{value:e}),(0,t.jsx)("span",{className:"truncate",children:nw.CALL_BACK_LABEL[e]})]},e))}),(0,t.jsx)(t6.SettingNote,{children:n5[e]}),"off"!==e&&(0,t.jsx)(t6.SettingNote,{children:"Needs this tab open. It rings until you answer, decline or let it go."})]})}let n5={off:"Nothing opens a call but you.",waiting:"A job that stopped to ask gets her to ring you.",any:"Anything a bot finishes, she rings you to tell you."};function n3({value:e,onChange:n}){let r=nT(e.phrase,t=>n({...e,phrase:t}),{min:nw.WAKE_PHRASE.min,accepts:nw.isEnglishPhrase}),l=(0,nw.isEnglishPhrase)(r.value)||!r.value.trim(),a=r.value.trim().split(/\s+/).length<2;return(0,t.jsxs)("div",{className:"min-w-0 space-y-3 p-4",children:[(0,t.jsx)(nL,{label:"Wake phrase",children:(0,t.jsx)(tY.Switch,{"aria-label":"Answer to her name",checked:e.enabled,onCheckedChange:t=>n({...e,enabled:t})})}),(0,t.jsx)(tC.Input,{value:r.value,maxLength:nw.WAKE_PHRASE.max,spellCheck:!1,disabled:!e.enabled,onChange:e=>r.set(e.target.value),onBlur:r.commit,onKeyDown:r.onKeyDown,"aria-label":"Wake phrase",className:"font-mono text-sm"}),(0,t.jsx)(t6.SettingNote,{children:e.enabled?l?a?"One word will wake her by accident — say hello first.":"Heard loosely, in English. Near misses count.":"English words only — she listens for it in English.":"Between calls, the browser listens for it and picks up — Chrome by sending what it hears to Google."})]})}function n6({value:e,onChange:n}){let[r,l]=(0,d.useState)(!1),[a,s]=(0,d.useState)(!1),i=(0,nP.useHotkeyLabel)((0,nP.isCombo)(e.combo)?e.combo:null);return(0,t.jsxs)("div",{className:"min-w-0 space-y-3 p-4",children:[(0,t.jsx)(nL,{label:"Shortcut",children:(0,t.jsx)(tY.Switch,{"aria-label":"Answer to a key",checked:e.enabled,onCheckedChange:t=>n({...e,enabled:t})})}),(0,t.jsx)("button",{type:"button",...nP.HOTKEY_CAPTURE,disabled:!e.enabled,onClick:()=>{s(!1),l(!0)},onBlur:()=>l(!1),onKeyDown:r?t=>{if("Tab"===t.key)return;if(t.preventDefault(),t.stopPropagation(),"Escape"===t.key)return l(!1);let r=(0,nP.comboOf)(t.nativeEvent);if(!r)return s(!0);s(!1),l(!1),n({...e,combo:r})}:void 0,className:(0,tj.cn)("flex h-8 w-full items-center justify-center rounded-lg border px-3 font-mono text-sm outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50",r?"border-foreground/40 text-muted-foreground":"border-border/60 hover:bg-muted/50"),children:r?"Press the keys…":i??"Set a shortcut"}),(0,t.jsx)(t6.SettingNote,{children:a?"Hold Ctrl, Alt or Cmd — a plain key is typing.":r?"Esc to keep the one you have.":e.enabled?"Only while this tab has focus. Not while you are typing.":"Starts a call, and ends the one that is running."})]})}e.s(["ThursdaySetting",0,function(){let e=(0,nO.useThursdayStore)(),n=(0,nO.useThursdayStore)(e=>e.patch),{settings:r,patch:l}=(0,nA.useLiveSettings)(),{data:a=[],isLoading:s,error:i}=(0,nD.useServerRoute)(p.queryKey.llmModel);return s||!r?(0,t.jsx)(t6.SettingSkeleton,{rows:4}):i?(0,t.jsx)(t6.SettingError,{message:i.message}):(0,t.jsxs)(t6.SettingScreen,{footer:(0,t.jsx)(t6.SettingRailNote,{children:"Both of her prompts are assembled fresh on every call — memory, the roster and your skills go in. Changes here apply from the next call."}),children:[(0,t.jsx)(n0,{value:e.captionView,onChange:e=>n({captionView:e})}),(0,t.jsx)(nF,{value:r,has:e=>a.some(t=>t.apiKeyName===e&&t.hasKey),plan:a.find(e=>"chatgpt"===e.id)?.plan??null,onChange:l}),(0,t.jsx)(t6.SettingGroup,{label:"Starting a call",children:(0,t.jsxs)(nV,{columns:3,children:[(0,t.jsx)(n3,{value:e.wake,onChange:e=>n({wake:e})}),(0,t.jsx)(n6,{value:e.hotkey,onChange:e=>n({hotkey:e})}),(0,t.jsx)(n2,{value:e.callBack,onChange:e=>n({callBack:e})})]})}),(0,t.jsx)(t6.SettingGroup,{label:"Running",children:(0,t.jsx)(nX,{})}),(0,t.jsx)(t6.SettingGroup,{label:"History",children:(0,t.jsxs)(nV,{columns:2,children:[(0,t.jsx)(nd,{}),(0,t.jsx)(nJ,{})]})})]})}],59158)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,59158,e=>{"use strict";var t=e.i(843476),n=e.i(689664),r=e.i(563707),l=e.i(508734),a=e.i(456420);let s={name:"power",size:24,node:[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]};s.node;let i=(0,a.default)(s),o={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};o.node;let u=(0,a.default)(o);var c=e.i(466787),d=e.i(271645),p=e.i(798120),m=e.i(167881);e.s([],148099),e.i(148099);var f=e.i(733332),x=e.i(951437),h=e.i(146376),g=e.i(667865),v=e.i(828918),b=e.i(446265),S=e.i(502077),y=e.i(388940),C=e.i(301252),j=e.i(956789),E=e.i(229315),N=e.i(17989),k=e.i(265858),I=e.i(260891),R=e.i(385689),w=e.i(621082);function O(e,t,n,r,l,a,s,i,o,u=2){let c=(0,w.getGridNavigatedIndex)(n.current,{event:e,orientation:r,loopFocus:l,rtl:a,cols:u,disabledIndices:s,minIndex:i,maxIndex:o,prevIndex:t>o?i:t,stopEvent:!0});return(0,w.isIndexOutOfListBounds)(n.current,c)?void 0:c}var A=e.i(584446),P=e.i(675606),T=e.i(56434);let M=d.createContext(void 0),D=d.createContext(void 0),V=d.createContext(void 0),L=d.createContext(!1),_=d.createContext("");function F(){let e=d.useContext(M);if(!e)throw Error((0,f.default)(22));return e}function B(){let e=d.useContext(D);if(!e)throw Error((0,f.default)(23));return e}function K(){let e=d.useContext(V);if(!e)throw Error((0,f.default)(24));return e}function z(){return d.useContext(_)}let H=(e,t)=>Object.is(e,t);function q(e,t,n){return null==e||null==t?Object.is(e,t):n(e,t)}function $(e,t,n){return!!e&&e.some(e=>void 0!==e&&q(t,e,n))}function U(e,t,n){return e?e.findIndex(e=>void 0!==e&&q(e,t,n)):-1}function G(e,t,n,r){let l=r&&Array.isArray(t)?e.findIndex(function(e,t){if(t!==H)return n=>$(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(0!==t||e.some(e=>Object.is(t,e)))}(t,n)):U(e,t,n);return -1===l?null:l}function W(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}function Y(e){var t;return"object"==typeof(t=e?.[0])&&null!=t&&Array.isArray(t.items)}function J(e){return Y(e)?e.flatMap(e=>e.items):e}function X(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 W(e)}function Q(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?W(e.value):W(e)}let Z={id:e=>e.id,labelId:e=>e.labelId,items:e=>e.items,selectedValue:e=>e.selectedValue,hasSelectionChips:e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0},hasSelectedValue:e=>{let{selectedValue:t,selectionMode:n}=e;return null!=t&&(!("multiple"===n&&Array.isArray(t))||t.length>0)},hasNullItemLabel:(e,t)=>!!t&&function(e){if(!Array.isArray(e))return null!=e&&"null"in e;if(Y(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}(e.items),open:e=>e.open,mounted:e=>e.mounted,forceMounted:e=>e.forceMounted,inline:e=>e.inline,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>q(t,e,n)):q(t,r,n)},transitionStatus:e=>e.transitionStatus,popupProps:e=>e.popupProps,listProps:e=>e.listProps,inputProps:e=>e.inputProps,triggerProps:e=>e.triggerProps,itemProps:e=>e.itemProps,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupId:e=>e.popupId,triggerElement:e=>e.triggerElement,inputElement:e=>e.inputElement,inputGroupElement:e=>e.inputGroupElement,popupSide:e=>e.popupSide,openMethod:e=>e.openMethod,inputInsidePopup:e=>e.inputInsidePopup,inputOwnsFormValue:e=>e.inputOwnsFormValue,selectionMode:e=>e.selectionMode,name:e=>e.name,form:e=>e.form,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,grid:e=>e.grid,virtualized:e=>e.virtualized,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,modal:e=>e.modal,autoHighlight:e=>e.autoHighlight};var ee=e.i(137584),et=e.i(469690),en=e.i(381104),er=e.i(884708),el=e.i(538489);function ea(e){return null==e?void 0:`${e}-popup`}let es=new Map,ei=function(e={}){let t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${function e(t){return Array.isArray(t)?t.map(t=>e(t)).join(","):null==t?"":String(t)}(e.locale)}|${JSON.stringify(t)}`,r=es.get(n);if(r)return r;let l=new Intl.Collator(e.locale,t),a={contains(e,t,n){if(!t)return!0;let r=X(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(0===l.compare(r.slice(e,e+t.length),t))return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=X(e,n);return 0===l.compare(r.slice(0,t.length),t)},endsWith(e,t,n){if(!t)return!0;let r=X(e,n),a=t.length;return r.length>=a&&0===l.compare(r.slice(r.length-a),t)}};return es.set(n,a),a};var eo=e.i(223910),eu=e.i(32199),ec=e.i(606039),ed=e.i(264111),ep=e.i(176782);let em=Symbol("none"),ef={value:em,index:-1};var ex=e.i(872855);function eh(e){let n,r,{id:l,onOpenChangeComplete:a,defaultSelectedValue:s=null,selectedValue:i,onSelectedValueChange:o,defaultInputValue:u,inputValue:c,open:p,defaultOpen:m=!1,selectionMode:w,onItemHighlighted:F,name:B,form:K,disabled:z=!1,readOnly:W=!1,required:ea=!1,inputRef:es,grid:eh=!1,items:eg,filteredItems:ev,filter:eb,filterQuery:eS,openOnInputClick:ey=!0,autoHighlight:eC=!1,keepHighlight:ej=!1,highlightItemOnHover:eE=!0,loopFocus:eN=!0,itemToStringLabel:ek,itemToStringValue:eI,isItemEqualToValue:eR=H,virtualized:ew=!1,inline:eO=!1,fillInputOnItemPress:eA=!0,modal:eP=!1,limit:eT=-1,autoComplete:eM="list",formAutoComplete:eD,locale:eV,submitOnItemClick:eL=!1}=e,{clearErrors:e_}=(0,er.useFormContext)(),{setDirty:eF,validityData:eB,setFilled:eK,name:ez,disabled:eH,setTouched:eq,setFocused:e$,validationMode:eU,validation:eG}=(0,et.useFieldRootContext)(),eW=(0,ex.useDirection)(),eY=(0,el.useLabelableId)({id:l}),eJ=ei({locale:eV}),eX=Array.isArray(eg)?null:eg;if(eX&&"function"!=typeof eX.label)throw Error((0,f.default)(100));let eQ=eX?eX.data:eg,eZ=eX?.value,e0=eZ?void 0:eQ,e1=d.useMemo(()=>{let e;if(!ev||!eZ)return;let t=J(ev),n=t.map(eZ);return{values:n,findItem(r,l){if(!e){e=new Map;for(let r=0;r<n.length;r+=1)e.has(n[r])||e.set(n[r],t[r])}var a=e;let s=a.get(r);if(void 0!==s||l===H)return s;for(let[e,t]of a)if(q(e,r,l))return t}}},[ev,eZ]),e2=d.useMemo(()=>eX?e=>eX.label(e,eR,e=>{let t=e1?.findItem(e,eR);return null!=t?eX.itemLabel(t):X(e,ek)}):ek,[eX,ek,e1,eR]),e3=d.useMemo(()=>eX?Object.assign(e=>eX.itemLabel(e),{selected:e=>X(e,e2)}):ek,[eX,e2,ek]);function e5(e){return X(e,e2)}let[e6,e4]=d.useState(!1),[e8,e7]=d.useState(null),e9=d.useRef(e8),te=d.useRef([]),tt=d.useRef([]),tn=d.useRef(null),tr=d.useRef(null),tl=d.useRef(null),ta=d.useRef(null),ts=d.useRef(null),ti=d.useRef(!0),to=d.useRef(!1),tu=d.useRef(null),tc=d.useRef(null),td=d.useRef(null),tp=d.useRef(ef),tm=d.useRef(null),tf=d.useRef([]),tx=d.useRef(null),th=eH||z,tg=ez??B,tv="multiple"===w,tb="single"===w,tS=void 0!==c||void 0!==u,ty=void 0!==eQ,tC=void 0!==ev;n="always"===eC?"always":!!eC&&"input-change";let[tj,tE]=(0,x.useControlled)({controlled:i,default:tv?s??j.EMPTY_ARRAY:s,name:"Combobox",state:"selectedValue"}),tN=d.useMemo(()=>null===eb?()=>!0:void 0!==eb?eb:(e,t)=>null!=e&&eJ.contains(e,t,e3),[eb,eJ,e3]),tk=(0,y.useRefWithInit)(()=>tS?u??"":tb?e5(tj):"").current,[tI,tR]=(0,x.useControlled)({controlled:c,default:tk,name:"Combobox",state:"inputValue"}),[tw,tO]=(0,x.useControlled)({controlled:p,default:m,name:"Combobox",state:"open"}),tA=Y(eQ),tP=tw||null===e8?String(tI).trim():e8,tT=tb?e5(tj):"",tM=tb&&!e6&&""!==tP&&tT.length===tP.length&&eJ.contains(tT,tP),tD=tM?"":eS??tP,tV=ty&&tC&&tM&&(!eX||eX.hasValue(tj,eR)),tL=d.useMemo(()=>eQ?J(eQ):j.EMPTY_ARRAY,[eQ]),t_=d.useMemo(()=>{if(ev&&!tV)return ev;if(!eQ)return j.EMPTY_ARRAY;if(tA){let e=[],t=0;for(let n of eQ){if(eT>-1&&t>=eT)break;let r=eT>-1?eT-t:1/0,l=""===tD?n.items.slice(0,r):[];if(""!==tD)for(let e of n.items){if(l.length>=r)break;tN(e,tD,e3)&&l.push(e)}if(l.length>0){let r={...n,items:l};e.push(r),t+=l.length}}return e}if(""===tD)return eT>-1?tL.slice(0,eT):tL;let e=[];for(let t of tL){if(eT>-1&&e.length>=eT)break;tN(t,tD,e3)&&e.push(t)}return e},[ev,tV,eQ,tA,tD,eT,tN,e3,tL]),tF=d.useMemo(()=>{if(e1&&t_===ev)return e1.values;let e=J(t_);return eZ?e.map(e=>eZ(e)):e},[t_,ev,e1,eZ]),tB=(0,y.useRefWithInit)(()=>{let e=null;return eO&&tw&&ty&&"none"!==w&&(e=G(tF,tj,eR,tv)),new C.ReactStore({id:eY,labelId:void 0,selectedValue:tj,open:tw,items:e0,selectionMode:w,name:tg,form:K,disabled:th,readOnly:W,required:ea,grid:eh,virtualized:ew,openOnInputClick:ey,itemToStringLabel:e2,isItemEqualToValue:eR,modal:eP,autoHighlight:n,submitOnItemClick:eL,hasInputValue:tS,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:eO,activeIndex:null,selectedIndex:e,popupProps:{},listProps:{},inputProps:{},triggerProps:{},itemProps:j.EMPTY_OBJECT,positionerElement:null,listElement:null,popupId:void 0,triggerElement:null,inputElement:null,inputGroupElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,inputOwnsFormValue:"none"===w},{onOpenChangeComplete:j.NOOP,setOpen:j.NOOP,setInputValue:j.NOOP,setSelectedValue:j.NOOP,setIndices:j.NOOP,handleSelection:j.NOOP,forceMount:j.NOOP,requestSubmit:j.NOOP,listRef:te,labelsRef:tt,popupRef:tn,emptyRef:ts,inputRef:tr,startDismissRef:tl,endDismissRef:ta,keyboardActiveRef:ti,chipsContainerRef:tu,clearRef:tc,valuesRef:tf,pointerDownItemRef:tx,selectionEventRef:td},Z)}).current,tK="none"===w?tI:tj,tz=d.useMemo(()=>"none"===w?tK:Array.isArray(tj)?tj.map(e=>Q(e,eI)):Q(tj,eI),[tK,eI,w,tj]),tH=(0,g.useStableCallback)(F),tq=(0,g.useStableCallback)(a),t$=tB.useState("activeIndex"),tU=tB.useState("selectedIndex"),tG=tB.useState("positionerElement"),tW=tB.useState("listElement"),tY=tB.useState("triggerElement"),tJ=tB.useState("inputElement"),tX=tB.useState("inputGroupElement"),tQ=tB.useState("inline"),tZ=tB.useState("inputInsidePopup"),t0=tB.useState("inputOwnsFormValue"),t1=tb&&!tZ&&tI===tT,t2=(0,b.useValueAsRef)(tY),{mounted:t3,setMounted:t5,transitionStatus:t6}=(0,eo.useTransitionStatus)(tw),{openMethod:t4,triggerProps:t8}=(0,eu.useOpenInteractionType)(tw),t7=(0,g.useStableCallback)(()=>tz);(0,en.useRegisterFieldControl)(tZ?t2:tr,eY,tK,t7,!th,B);let t9=(0,g.useStableCallback)(()=>{eQ?tt.current=tF.map(e5):tB.set("forceMounted",!0)}),ne=(0,g.useStableCallback)((e,t,n)=>{if(-1===t){if(tp.current===ef)return;tp.current=ef}else tp.current={value:e,index:t};tH(e,(0,P.createGenericEventDetails)(n,void 0,{index:t}))}),nt=(0,g.useStableCallback)(e=>{let t={};void 0!==e.activeIndex&&(t.activeIndex=e.activeIndex),void 0!==e.selectedIndex&&(t.selectedIndex=e.selectedIndex),tB.update(t);let n=e.activeIndex;if(void 0===n)return;let r=e.type||T.REASONS.none;null===n?ne(void 0,-1,r):ne(tf.current[n],n,r)}),nn=(0,g.useStableCallback)((t,r)=>{if(e.onInputValueChange?.(t,r),!r.isCanceled){if(to.current=r.reason===T.REASONS.inputClear,r.reason===T.REASONS.inputChange){tw&&null!==e8&&e7(null);let e=r.event,l=e.inputType;if("compositionend"===e.type||null!=l&&""!==l&&"insertReplacementText"!==l){let e=""!==t.trim();e&&e4(!0),tm.current={hasQuery:e};let r=tB.state.listElement;if(!tB.state.virtualized&&r){let e=tn.current;for(let t of(0,E.getOverflowAncestors)(r.firstElementChild??r)){if(!(0,E.isHTMLElement)(t)||(e?!(0,A.contains)(e,t):"dialog"===t.getAttribute("role")))break;if(function(e,t=!1){let{overflowY:n}=(0,E.getComputedStyle)(e);return("auto"===n||"scroll"===n)&&(t?e.clientHeight>0:e.scrollHeight>e.clientHeight)}(t)){t.scrollTop=0;break}}}e&&n&&null==tB.state.activeIndex&&(tw||tQ)&&tB.set("activeIndex",0)}}else r.reason===T.REASONS.inputClear&&""===t&&tB.state.inputInsidePopup&&(tm.current={hasQuery:!1,selection:!0});tR(t)}}),nr=(0,g.useStableCallback)(e=>{let t=!e&&tZ&&!tQ&&""!==tI&&(String(tI).trim()===e8||tI===tT);!e&&(t||""===tI||t1)&&e4(!1),e7(null),t&&nn("",(0,P.createChangeEventDetails)(T.REASONS.inputClear))}),nl=(0,g.useStableCallback)((t,n)=>{if(tw!==t&&(n.reason===T.REASONS.escapeKey&&ty&&0===tF.length&&!ts.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(t&&null!==e8&&nr(n.reason===T.REASONS.inputChange),!t&&e6&&(tb?(tQ||e7(tP),""===tP&&e4(!1)):tv&&(tQ||e7(tP),tZ&&nt({activeIndex:null}),(!tZ||tQ)&&nn("",(0,P.createChangeEventDetails)(T.REASONS.inputClear,n.event,void 0,{isItemPress:n.reason===T.REASONS.itemPress})))),tO(t),!t&&tZ&&(n.reason===T.REASONS.focusOut||n.reason===T.REASONS.outsidePress))&&(eq(!0),e$(!1),"onBlur"===eU))){let e="none"===w?tI:tj;eG.commit(e)}}),na=(0,g.useStableCallback)((e,t)=>{o?.(e,t),t.isCanceled||(tE(e),("none"===w&&tn.current&&eA||tb&&!tB.state.inputInsidePopup)&&nn(e5(e),(0,P.createChangeEventDetails)(t.reason,t.event)))}),ns=(0,g.useStableCallback)((e,t)=>{let n=(0,A.getTarget)(e),r=td.current??e;td.current=null;let l=(0,P.createChangeEventDetails)(T.REASONS.itemPress,r),a=n?.closest("a")?.getAttribute("href");if(a){a.startsWith("#")&&nl(!1,l);return}if(tv){let e=Array.isArray(tj)?tj:[],n=$(e,t,eR);if(na(n?e.filter(e=>!q(t,e,eR)):[...e,t],l),l.isCanceled||!(tr.current&&""!==tr.current.value.trim()))return;if(tB.state.inputInsidePopup){nn("",(0,P.createChangeEventDetails)(T.REASONS.inputClear,l.event,void 0,{isItemPress:!0}));let e=tm.current;e&&!n&&(e.toggledValue=t)}else nl(!1,l)}else{if(na(t,l),l.isCanceled)return;nl(!1,l)}}),ni=(0,g.useStableCallback)(()=>{let e=eG.inputRef.current?.form??tB.state.inputElement?.form;e&&"function"==typeof e.requestSubmit&&e.requestSubmit()}),no=(0,g.useStableCallback)(()=>{if(t5(!1),tq?.(!1),e4(!1),e7(null),"none"===w?nt({activeIndex:null,selectedIndex:null}):nt({activeIndex:null}),tv&&tr.current&&""!==tr.current.value&&!to.current&&nn("",(0,P.createChangeEventDetails)(T.REASONS.inputClear)),tb)if(tB.state.inputInsidePopup)tr.current&&""!==tr.current.value&&nn("",(0,P.createChangeEventDetails)(T.REASONS.inputClear));else{let e=e5(tj);if(tr.current&&tr.current.value!==e){let t=""===e?T.REASONS.inputClear:T.REASONS.none;nn(e,(0,P.createChangeEventDetails)(t))}}}),nu=d.useMemo(()=>tQ&&tG?{current:tG.closest('[role="dialog"]')}:tn,[tQ,tG]);(0,ee.useOpenChangeComplete)({enabled:!e.actionsRef,open:tw,ref:nu,onComplete(){tw||no()}}),d.useImperativeHandle(e.actionsRef,()=>({unmount:no}),[no]),(0,h.useIsoLayoutEffect)(function(){let e=null!==e9.current&&null===e8;e9.current=e8,(!tw||e&&ty)&&(tw||(tx.current=null),"none"===w||nt({selectedIndex:G(ty?tF:tf.current,tj,eR,tv)}))},[tw,e8,tj,w,tv,ty,tF,eR,nt]),(0,h.useIsoLayoutEffect)(()=>{eQ&&(tf.current=tF,te.current.length=tF.length)},[eQ,tF]),(0,h.useIsoLayoutEffect)(()=>{let e=tm.current;if(e){let t=tw||tQ||tB.state.positionerElement?.hidden===!1;if(e.hasQuery)n&&t&&tB.set("activeIndex",0),tm.current=null;else if(""===String(tI).trim()&&(tm.current=null,t)){let t=e.selection;"always"!==n||t||"none"!==tB.state.selectionMode||tB.set("activeIndex",0),queueMicrotask(()=>{if(!tB.state.open&&!tB.state.inline||tr.current&&""!==tr.current.value.trim())return;let r=tB.state.selectedValue,l="multiple"===tB.state.selectionMode;if(l&&Array.isArray(r)?r.length>0:"none"!==tB.state.selectionMode&&null!=r){let t=ty||tC?tF:tf.current,n=U(t,e.toggledValue,tB.state.isItemEqualToValue);tB.set("activeIndex",-1!==n?n:G(t,r,tB.state.isItemEqualToValue,l))}else t?tB.set("activeIndex",null):"always"===n&&tB.set("activeIndex",0)})}}if(!tw&&!tQ)return;let t=ty||tC?tF:tf.current,r=tB.state.activeIndex;if(null==r)return"always"===n&&t.length>0?void tB.set("activeIndex",0):void ne(void 0,-1,T.REASONS.none);if(r>=t.length){ne(void 0,-1,T.REASONS.none),tB.set("activeIndex",null);return}let l=t[r],a=tp.current.value,s=a!==em&&q(l,a,tB.state.isItemEqualToValue);tp.current.index===r&&s||ne(l,r,T.REASONS.none)},[t$,n,ne,tC,ty,tF,tQ,tw,tB,tI]),(0,h.useIsoLayoutEffect)(()=>{"none"===w?eK(""!==String(tI)):eK(tv?Array.isArray(tj)&&tj.length>0:null!=tj)},[eK,w,tI,tj,tv]),d.useEffect(()=>{ty&&n&&0===tF.length&&nt({activeIndex:null})},[ty,n,tF.length,nt]);let nc=!1;function nd(){nc||tI===tT||(nc=!0,nn(tT,(0,P.createChangeEventDetails)(T.REASONS.none)))}function np(){!tb||tS||tZ||e6||nd()}(0,ec.useValueChanged)(tP,function(){tw&&""!==tP&&tP!==String(tk)&&!t1&&e4(!0)}),(0,ec.useValueChanged)(tw,function(){tw&&null!==e8&&nr(!1)}),(0,ec.useValueChanged)(tj,function(){if("none"!==w){var e;e_(tg),eF((e=eB.initialValue,Array.isArray(tj)&&Array.isArray(e)?!function(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let l=0;l<r;l+=1)if(!n(e[l],t[l]))return!1;return!0}(tj,e,(e,t)=>q(e,t,eR)):tj!==e)),eG.change(tj),!tb||tS||tZ||nd()}}),(0,ec.useValueChanged)(tT,np),(0,ec.useValueChanged)(eQ,np),(0,ec.useValueChanged)(tI,function(){"none"===w&&(e_(tg),eF(tI!==eB.initialValue),eG.change(tI))});let nm=(0,k.useFloatingRootContext)({open:!!tQ||tw,onOpenChange:nl,elements:{reference:tZ?tY:tJ,floating:tG}}),nf=eh?"grid":"listbox",nx=tw||tQ,nh=nx?"true":"false",ng=d.useMemo(()=>{let e=tJ?.tagName==="INPUT",t=null==tJ||e,n=t||nx,r=t?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return n&&(r.role="combobox",r["aria-expanded"]=nh,r["aria-haspopup"]=nf,r["aria-controls"]=nx?tW?.id:void 0,r["aria-autocomplete"]=W?"none":eM),{reference:r,floating:{role:"presentation"}}},[tJ,nx,nh,nf,tW?.id,eM,W]),nv=(0,R.useClick)(nm,{enabled:!th&&ey,event:"mousedown-only",toggle:!1,touchOpenDelay:100*!tZ,reason:T.REASONS.inputPress}),nb=(0,N.useDismiss)(nm,{enabled:!th&&!tQ,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:!!tQ||void 0,outsidePress(e){let t=(0,A.getTarget)(e);return!(0,A.contains)(tY,t)&&!(0,A.contains)(tc.current,t)&&!(0,A.contains)(tu.current,t)&&!(0,A.contains)(tX,t)}}),nS=(0,I.useListNavigation)(nm,{enabled:!th,id:eY,listRef:te,activeIndex:t$,selectedIndex:tU,virtual:!0,loopFocus:eN,allowEscape:eN&&!n,focusItemOnOpen:!e6&&("none"!==w||!!n)&&"auto",focusItemOnHover:eE,resetOnPointerLeave:!ej,orientation:eh?"horizontal":void 0,rtl:"rtl"===eW,disabledIndices:j.EMPTY_ARRAY,grid:eh?O:void 0,onNavigate(e,t){(t||tw)&&"ending"!==t6&&(t?nt({activeIndex:e,type:ti.current?T.REASONS.keyboard:T.REASONS.pointer}):nt({activeIndex:e}))}}),ny=d.useMemo(()=>(0,ep.mergeProps)(nS.reference,{onKeyDown(e){eh&&null==tB.state.activeIndex&&("ArrowLeft"===e.key||"ArrowRight"===e.key)&&e.preventBaseUIHandler()}},nb.reference,nv.reference,ng.reference),[nS.reference,nb.reference,nv.reference,ng.reference,eh,tB]),nC=d.useMemo(()=>(0,ep.mergeProps)(ed.FOCUSABLE_POPUP_PROPS,nb.floating),[nb.floating]),nj=d.useMemo(()=>(0,ep.mergeProps)(nS.floating,ng.floating),[nS.floating,ng.floating]),nE=d.useMemo(()=>{let e=nS.item;return e?{...e,onFocus:void 0}:j.EMPTY_OBJECT},[nS.item]);tB.useContextCallback("setOpen",nl),tB.useContextCallback("setInputValue",nn),tB.useContextCallback("setSelectedValue",na),tB.useContextCallback("setIndices",nt),tB.useContextCallback("handleSelection",ns),tB.useContextCallback("forceMount",t9),tB.useContextCallback("requestSubmit",ni),tB.useContextCallback("onOpenChangeComplete",a),(r=d.useRef(!0)).current&&(r.current=!1,(()=>{tB.update({inline:eO,popupProps:nC,listProps:nj,inputProps:ny,triggerProps:t8,itemProps:nE})})());let nN={id:eY,selectedValue:tj,open:tw,mounted:t3,transitionStatus:t6,items:e0,inline:eO,popupProps:nC,listProps:nj,inputProps:ny,triggerProps:t8,itemProps:nE,openMethod:t4,selectionMode:w,name:tg,form:K,disabled:th,readOnly:W,required:ea,grid:eh,virtualized:ew,openOnInputClick:ey,itemToStringLabel:e2,modal:eP,autoHighlight:n,isItemEqualToValue:eR,submitOnItemClick:eL,hasInputValue:tS};(0,h.useIsoLayoutEffect)(()=>{tB.update({...nN,inputOwnsFormValue:"none"===w&&(eO||!tB.state.inputInsidePopup)})},[tB,...Object.values(nN)]);let nk=(0,v.useMergedRefs)(es,eG.inputRef),nI=d.useMemo(()=>({query:tP,hasItems:ty,filteredItems:t_,flatFilteredValues:tF}),[tP,ty,t_,tF]),nR=d.useMemo(()=>Array.isArray(tK)?"":Q(tK,eI),[tK,eI]),nw=tv&&Array.isArray(tj)&&tj.length>0,nO=tv||"none"===w&&t0?void 0:tg,nA=d.useMemo(()=>tv&&Array.isArray(tj)&&tg?tj.map(e=>{let n=Q(e,eI);return(0,t.jsx)("input",{type:"hidden",form:K,name:tg,value:n,disabled:th},n)}):null,[tv,tj,K,tg,eI,th]),nP=(0,t.jsxs)(d.Fragment,{children:[e.children,(0,t.jsx)("input",{...eG.getValidationProps(th,{onFocus(){tZ?tY?.focus():(tr.current||tY)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented||th||W)return;let t=e.currentTarget.value,n=t.toLowerCase(),r=(0,P.createChangeEventDetails)(T.REASONS.none,e.nativeEvent),l=()=>tf.current.findIndex(e=>Q(e,eI).toLowerCase()===n||e5(e).toLowerCase()===n);tb&&(t9(),eQ&&-1===l()&&tB.set("forceMounted",!0)),queueMicrotask(function(){if(tv)return;if("none"===w)return void nn(t,r);let e=l();-1===e&&(e=tf.current.findIndex((e,t)=>{let r=tt.current[t];return null!=r&&r.toLowerCase()===n}));let a=-1===e?void 0:tf.current[e];null!=a&&na?.(a,r)})}}),id:eY&&null==nO?`${eY}-hidden-input`:void 0,form:K,name:nO,autoComplete:eD,disabled:th,required:ea&&!nw,readOnly:W,value:nR,ref:nk,style:nO?S.visuallyHiddenInput:S.visuallyHidden,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),nA]});return(0,t.jsx)(M.Provider,{value:tB,children:(0,t.jsx)(D.Provider,{value:nm,children:(0,t.jsx)(L.Provider,{value:ty,children:(0,t.jsx)(V.Provider,{value:nI,children:(0,t.jsx)(_.Provider,{value:tI,children:nP})})})})})}var eg=e.i(439957),ev=e.i(108868),eb=e.i(552245),eS=e.i(540886),ey=e.i(879938),eC=e.i(875812),ej=e.i(145147);ej.CommonTriggerDataAttributes.popupOpen,ej.CommonTriggerDataAttributes.pressed;let eE={...ey.pressableTriggerOpenStateMapping,...eC.fieldValidityMapping,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};var eN=e.i(247778),ek=e.i(157940),eI=e.i(264042),eR=e.i(736760);function ew(e){let t=e.useState("mounted"),n=e.useState("popupSide"),r=e.useState("positionerElement");return t&&r?n:null}function eO(){return 0===K().filteredItems.length}function eA(e,t,n){let r=e.context.listRef.current[t];r&&(e.context.selectionEventRef.current=n,r.click(),e.context.selectionEventRef.current=null)}let eP=d.forwardRef(function(e,t){let n,{render:r,className:l,nativeButton:a=!0,disabled:s=!1,id:i,style:o,...u}=e,{state:c,disabled:p,setTouched:m,setFocused:f,validationMode:x,validation:h}=(0,et.useFieldRootContext)(),{labelId:v}=(0,eN.useLabelableContext)(),b=F(),S=b.useState("selectionMode"),y=b.useState("disabled"),C=b.useState("readOnly"),j=b.useState("required"),E=b.useState("positionerElement"),N=b.useState("listElement"),k=b.useState("popupId"),I=b.useState("triggerProps"),w=b.useState("inputInsidePopup"),O=b.useState("id"),M=b.useState("labelId"),D=b.useState("open"),V=b.useState("selectedValue"),L=b.useState("activeIndex"),_=b.useState("selectedIndex"),K=b.useState("hasSelectedValue"),H=B(),q=z(),$=(0,eg.useTimeout)(),U=p||y||s,G=eO(),W=ew(b);(0,el.useLabelableId)({id:w?i:void 0});let Y=w?i??O:i;D&&w?n=k??ea(O):D&&(n=N?.id);let J=d.useRef("");function X(e){J.current=e.pointerType}let{reference:Q}=(0,eR.useTypeahead)(H,{enabled:!D&&!C&&!y&&"single"===S,listRef:b.context.labelsRef,activeIndex:L,selectedIndex:_,onMatch(e){let t=b.context.valuesRef.current[e];void 0!==t&&b.context.setSelectedValue(t,(0,P.createChangeEventDetails)(T.REASONS.none))}}),{reference:Z}=(0,R.useClick)(H,{enabled:!y,event:"mousedown"}),{buttonRef:ee,getButtonProps:en}=(0,eS.useButton)({native:a,disabled:U}),er={...c,readOnly:C,open:D,disabled:U,popupSide:W,listEmpty:G,placeholder:"none"!==S&&!K},es=(0,g.useStableCallback)(e=>{b.set("triggerElement",e)});return(0,eb.useRenderElement)("button",e,{ref:[t,ee,es],state:er,props:[I,Z,Q,{id:Y,tabIndex:w?0:-1,role:w?"combobox":void 0,"aria-expanded":D,"aria-haspopup":w?"dialog":"listbox","aria-controls":n,"aria-required":w&&j||void 0,"aria-readonly":w&&C||void 0,"aria-labelledby":v??M,onPointerDown:X,onPointerEnter:X,onFocus(){f(!0),U||$.start(0,b.context.forceMount)},onBlur(e){(0,A.contains)(E,e.relatedTarget)||(m(!0),f(!1),"onBlur"===x&&h.commit("none"===S?q:V))},onMouseDown(e){if(U||(w||H.set("domReferenceElement",e.currentTarget),b.context.forceMount(),"touch"!==J.current&&(b.context.inputRef.current?.focus(),w||e.preventDefault()),D))return;let t=(0,ev.ownerDocument)(e.currentTarget);w&&t.addEventListener("mouseup",function(e){let t=b.state.triggerElement;if(!t)return;let n=(0,A.getTarget)(e),r=b.state.positionerElement,l=b.state.listElement;(0,A.contains)(t,n)||(0,A.contains)(r,n)||(0,A.contains)(l,n)||(0,eI.isMouseWithinBounds)(e,t)||b.context.setOpen(!1,(0,P.createChangeEventDetails)(T.REASONS.cancelOpen,e))},{once:!0})},onKeyDown(e){("ArrowDown"===e.key||"ArrowUp"===e.key)&&((0,ek.stopEvent)(e),b.context.setOpen(!0,(0,P.createChangeEventDetails)(T.REASONS.listNavigation,e.nativeEvent)),b.context.inputRef.current?.focus())}},h.getValidationProps(U,u),en],stateAttributesMapping:eE})});var eT=e.i(328744),eM=e.i(788015);let eD=d.createContext(void 0),eV=d.createContext(void 0);function eL(e){let t=d.useContext(eV);if(void 0===t&&!e)throw Error((0,f.default)(21));return t}let e_=d.forwardRef(function(e,n){let r=F(),{buttonRef:l,getButtonProps:a}=(0,eS.useButton)({native:!1}),s=(0,v.useMergedRefs)(n,l),i=a({onClick:function(e){r.context.setOpen(!1,(0,P.createChangeEventDetails)(T.REASONS.closePress,e.nativeEvent,e.currentTarget))}});return(0,t.jsx)("span",{ref:s,...i,"aria-label":"Dismiss",tabIndex:void 0,style:S.visuallyHiddenInput})}),eF=d.forwardRef(function(e,n){let{render:r,className:l,disabled:a=!1,id:s,style:i,...o}=e,{state:u,disabled:c,setTouched:p,setFocused:m,validationMode:f,validation:x}=(0,et.useFieldRootContext)(),{labelId:h}=(0,eN.useLabelableContext)(),v=d.useContext(eD),b=!!eL(!0),S=F(),y=z(),C=(0,ex.useDirection)(),j=S.useState("required"),E=S.useState("disabled"),N=S.useState("readOnly"),k=S.useState("name"),I=S.useState("form"),R=S.useState("selectionMode"),w=S.useState("autoHighlight"),O=S.useState("inputProps"),A=S.useState("triggerProps"),M=S.useState("open"),D=S.useState("mounted"),V=S.useState("selectedValue"),L=S.useState("id"),_=S.useState("inline"),B=S.useState("modal"),K=!!w,H=ew(S),q=c||E||a,$=eO(),U=b||_,G=(0,eM.useBaseUiId)(s??(U?void 0:L)),W=b?eC.DEFAULT_FIELD_STATE_ATTRIBUTES:u,[Y,J]=d.useState(null),X=d.useRef(!1),Q=d.useRef(null),Z=d.useRef(!1),ee="none"===R&&!b,en=(0,g.useStableCallback)(e=>{let t=b||S.state.inline;t&&!S.state.hasInputValue&&S.context.setInputValue("",(0,P.createChangeEventDetails)(T.REASONS.none)),S.update({inputElement:e,inputInsidePopup:t,inputOwnsFormValue:ee})}),er=b?o:x.getValidationProps(q,o);function el(){S.context.setIndices({activeIndex:null,selectedIndex:null,type:S.context.keyboardActiveRef.current?T.REASONS.keyboard:T.REASONS.pointer})}function ea(){S.context.keyboardActiveRef.current=!1}let es={...W,open:M,disabled:q,readOnly:N,popupSide:H,listEmpty:$},ei=(0,eb.useRenderElement)("input",e,{state:es,ref:[n,S.context.inputRef,en],props:[O,A,{value:Y??y,"aria-readonly":N||void 0,"aria-required":j||void 0,"aria-labelledby":h,disabled:q,readOnly:N,required:"none"===R?j:void 0,form:I,...ee&&k&&{name:k},id:G,onFocus(){if(m(!0),!_||!Z.current)return;Z.current=!1;let e=Q.current;null!=e&&Object.hasOwn(S.context.valuesRef.current,e)&&S.context.setIndices({activeIndex:e})},onBlur(){p(!0),m(!1);let e=S.state.activeIndex;if(_&&null!==e&&"always"!==w&&(Q.current=e,Z.current=!0,S.context.setIndices({activeIndex:null})),"onBlur"===f){let e="none"===R?y:V;x.commit(e)}},onCompositionStart(e){eT.platform.os.android||(X.current=!0,J(e.currentTarget.value))},onCompositionEnd(e){X.current=!1;let t=e.currentTarget.value;J(null),S.context.setInputValue(t,(0,P.createChangeEventDetails)(T.REASONS.inputChange,e.nativeEvent))},onChange(e){let t=e.nativeEvent,n=t.inputType,r=X.current||!(!n||"insertReplacementText"===n);function l(e){!N&&!q&&e&&r&&(S.context.setOpen(!0,(0,P.createChangeEventDetails)(T.REASONS.inputChange,t)),K||el())}if(X.current){let n=e.currentTarget.value;J(n),""!==n||S.state.openOnInputClick||S.state.inputInsidePopup||S.context.setOpen(!1,(0,P.createChangeEventDetails)(T.REASONS.inputClear,t));let r=n.trim(),a=K&&""!==r;l(r),M&&null!==S.state.activeIndex&&!a&&el();return}let a=(0,P.createChangeEventDetails)(T.REASONS.inputChange,t);if(S.context.setInputValue(e.currentTarget.value,a),a.isCanceled)return;let s=""===e.currentTarget.value,i=(0,P.createChangeEventDetails)(T.REASONS.inputClear,t);s&&!S.state.inputInsidePopup&&("single"===R&&S.context.setSelectedValue(null,i),S.state.openOnInputClick||S.context.setOpen(!1,i)),l(e.currentTarget.value.trim()),M&&null!==S.state.activeIndex&&!K&&el()},onKeyDown(e){if(e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;if(S.context.keyboardActiveRef.current=!0,q||N){N&&"Enter"===e.key&&M&&null!==S.state.activeIndex&&(0,ek.stopEvent)(e);return}let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r="rtl"===C;if("Home"===e.key){(0,ek.stopEvent)(e);let n=eT.platform.engine.gecko&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if("End"===e.key){(0,ek.stopEvent)(e);let l=eT.platform.engine.gecko&&r?0:t.value.length;t.setSelectionRange(l,l),t.scrollLeft=r?-n:n;return}if(!D&&"Escape"===e.key){let t="multiple"===R&&Array.isArray(V)?0===V.length:null===V,n=(0,P.createChangeEventDetails)(T.REASONS.escapeKey,e.nativeEvent);S.context.setInputValue("",n),S.context.setSelectedValue("multiple"===R?[]:null,n),t||S.state.inline||n.isPropagationAllowed||e.stopPropagation();return}if(v&&"Backspace"===e.key&&""===t.value&&void 0===v.highlightedChipIndex&&Array.isArray(V)&&V.length>0){let t=v.chipsRef.current.length,n=t>0?t-1:V.length-1,r=V.filter((e,t)=>t!==n);el(),S.context.setSelectedValue(r,(0,P.createChangeEventDetails)(T.REASONS.none,e.nativeEvent));return}let l=v?.highlightedChipIndex!==void 0,a=function(e){let t;if(!v)return;let{highlightedChipIndex:n}=v,r=v.chipsRef.current.length,[l,a]="rtl"===C?["ArrowRight","ArrowLeft"]:["ArrowLeft","ArrowRight"];if(void 0!==n){if(e.key===l)e.preventDefault(),t=n>0?n-1:void 0;else if(e.key===a)e.preventDefault(),t=n<r-1?n+1:void 0;else if("Backspace"===e.key||"Delete"===e.key){var s;let r;e.preventDefault(),t=(r=n>=(s=V.length)-1?s-2:n)>=0?r:void 0,el()}return t}return e.key===l&&(e.currentTarget.selectionStart??0)===0&&V.length>0&&(e.preventDefault(),t=r>0?r-1:void 0),t}(e);if(v?.setHighlightedChipIndex(a),void 0!==a?v?.chipsRef.current[a]?.focus():l&&S.context.inputRef.current?.focus(),229!==e.which&&"Enter"===e.key&&M){let t=S.state.activeIndex,n=e.nativeEvent;if(null===t){if(_)return;S.context.setOpen(!1,(0,P.createChangeEventDetails)(T.REASONS.none,n));return}(0,ek.stopEvent)(e),eA(S,t,n)}},onPointerMove:ea,onPointerDown:ea},er],stateAttributesMapping:eE}),eo=b?(0,t.jsx)(et.FieldRootContext.Provider,{value:et.DEFAULT_FIELD_ROOT_CONTEXT,children:ei}):ei;return(0,t.jsxs)(d.Fragment,{children:[M&&(!U||B)&&(0,t.jsx)(e_,{ref:S.context.startDismissRef}),eo]})});var eB=e.i(596296);let eK=d.forwardRef(function(e,t){let{render:n,className:r,style:l,...a}=e,{state:s}=(0,et.useFieldRootContext)(),i=F(),o=i.useState("open"),u=i.useState("disabled"),c=i.useState("readOnly"),d=i.useState("hasSelectedValue"),p=i.useState("selectionMode"),m=ew(i),f=eO(),x={...s,open:o,disabled:u,readOnly:c,popupSide:m,listEmpty:f,placeholder:"none"!==p&&!d},h=(0,g.useStableCallback)(e=>{i.set("inputGroupElement",e)});return(0,eb.useRenderElement)("div",e,{ref:[t,h],props:[{role:"group",onMouseDown(e){!function(e,t,n,r){if(e.baseUIHandlerPrevented)return;let l=(0,A.getTarget)(e.nativeEvent),a=(0,E.isElement)(l)?l:null;a!==e.currentTarget&&(r?.(a)||(0,eB.isInteractiveElement)(a))||(e.preventDefault(),!n&&(t.context.inputRef.current?.focus(),t.state.openOnInputClick&&t.context.setOpen(!0,(0,P.createChangeEventDetails)(T.REASONS.inputPress,e.nativeEvent))))}(e,i,u,e=>(0,A.contains)(i.context.chipsContainerRef.current,e))}},a],state:x,stateAttributesMapping:eE})}),ez=d.forwardRef(function(e,t){let{render:n,className:r,style:l,...a}=e;return(0,eb.useRenderElement)("span",e,{ref:t,props:[{"aria-hidden":!0,children:"▼"},a]})});var eH=e.i(474354);let eq={...eH.transitionStatusMapping,...ey.triggerOpenStateMapping},e$=d.forwardRef(function(e,t){let{render:n,className:r,disabled:l=!1,nativeButton:a=!0,keepMounted:s=!1,style:i,...o}=e,{disabled:u}=(0,et.useFieldRootContext)(),c=F(),d=c.useState("selectionMode"),p=c.useState("disabled"),m=c.useState("readOnly"),f=c.useState("open"),x=c.useState("selectedValue"),h=c.useState("hasSelectionChips"),g=z(),v=!1;v="none"===d?""!==g:"single"===d?null!=x:h;let b=u||p||l,{buttonRef:S,getButtonProps:y}=(0,eS.useButton)({native:a,disabled:b}),{mounted:C,transitionStatus:j,setMounted:E}=(0,eo.useTransitionStatus)(v),N={disabled:b,visible:v,open:f,transitionStatus:j};(0,ee.useOpenChangeComplete)({open:v,ref:c.context.clearRef,onComplete(){v||E(!1)}});let k=(0,eb.useRenderElement)("button",e,{state:N,ref:[t,S,c.context.clearRef],props:[{tabIndex:-1,children:"x",onMouseDown(e){e.preventDefault()},onClick(e){if(b||m)return;let t=c.context.keyboardActiveRef.current?T.REASONS.keyboard:T.REASONS.pointer;c.context.setInputValue("",(0,P.createChangeEventDetails)(T.REASONS.clearPress,e.nativeEvent)),"none"!==d?(c.context.setSelectedValue(Array.isArray(x)?[]:null,(0,P.createChangeEventDetails)(T.REASONS.clearPress,e.nativeEvent)),c.context.setIndices({activeIndex:null,selectedIndex:null,type:t})):c.context.setIndices({activeIndex:null,type:t}),c.context.inputRef.current?.focus()}},o,y],stateAttributesMapping:eq});return s||C?k:null}),eU=d.createContext(null);function eG(e){let{children:n,items:r}=e,l=d.useMemo(()=>({items:r}),[r]);return(0,t.jsx)(eU.Provider,{value:l,children:n})}function eW(e){let{children:n}=e,{filteredItems:r}=K(),l=d.useContext(eU),a=l?l.items:r;return(0,t.jsx)(d.Fragment,{children:a.map(n)})}var eY=e.i(53687);let eJ=d.forwardRef(function(e,n){var r;let{render:l,className:a,style:s,children:i,...o}=e,u=F(),c=B(),p=!!eL(!0),{filteredItems:m,hasItems:f}=K(),x=u.useState("selectionMode"),h=u.useState("grid"),v=u.useState("readOnly"),b=u.useState("listProps"),S=u.useState("virtualized"),y=u.useState("forceMounted"),C=0===m.length,j=(0,g.useStableCallback)(e=>{u.set("positionerElement",e)}),E=(0,g.useStableCallback)(e=>{u.set("listElement",e)}),N=d.useMemo(()=>"function"==typeof i?r||(r=(0,t.jsx)(eW,{children:i})):i,[i]),k=c.useState("floatingId"),I=(0,eb.useRenderElement)("div",e,{state:{empty:C},ref:[n,E,p?null:j],props:[b,{children:N,tabIndex:-1,id:k,role:h?"grid":"listbox","aria-multiselectable":"multiple"===x?"true":void 0,"aria-readonly":!h&&!!v||void 0,onKeyDown(e){if(!u.state.disabled&&!u.state.readOnly&&"Enter"===e.key){let t=u.state.activeIndex;null!=t&&((0,ek.stopEvent)(e),eA(u,t,e.nativeEvent))}},onKeyDownCapture(){u.context.keyboardActiveRef.current=!0},onPointerMoveCapture(){u.context.keyboardActiveRef.current=!1}},o]});if(S)return I;let R=f&&!y?void 0:u.context.labelsRef;return(0,t.jsx)(eY.CompositeList,{elementsRef:u.context.listRef,labelsRef:R,children:I})});function eX(){let e=(0,eg.useTimeout)(),t=d.useRef(null);return d.useEffect(()=>{if(eT.platform.os.ios)return;let n=t.current;if(null==n)return;let r=function(e){let t=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT),n=null;for(;t.nextNode();){let e=t.currentNode;""!==e.nodeValue&&(n=e)}return n}(n);if(null==r)return;let l=r.data,a=`${l}\u2060`;return r.nodeValue=a,e.start(200,()=>{r.nodeValue===a&&(r.nodeValue=l)}),()=>{e.clear(),r.nodeValue===a&&(r.nodeValue=l)}},[t,e]),t}let eQ=d.forwardRef(function(e,t){let{render:n,className:r,style:l,children:a,...s}=e,i=eX();return(0,eb.useRenderElement)("div",e,{ref:[t,i],props:[{children:a,role:"status","aria-live":"polite","aria-atomic":!0},s]})});var eZ=e.i(726674);let e0=d.createContext(void 0),e1=d.forwardRef(function(e,n){let{keepMounted:r=!1,...l}=e,a=F(),s=a.useState("mounted"),i=a.useState("forceMounted");return s||r||i?(0,t.jsx)(e0.Provider,{value:r,children:(0,t.jsx)(eZ.FloatingPortal,{ref:n,...l})}):null}),e2={...ey.popupStateMapping,...eH.transitionStatusMapping},e3=d.forwardRef(function(e,t){let{render:n,className:r,style:l,...a}=e,s=F(),i=s.useState("open"),o=s.useState("mounted"),u=s.useState("transitionStatus");return(0,eb.useRenderElement)("div",e,{state:{open:i,transitionStatus:u},ref:t,stateAttributesMapping:e2,props:[{role:"presentation",hidden:!o,style:{userSelect:"none",WebkitUserSelect:"none"}},a]})});var e5=e.i(144394),e6=e.i(923706),e4=e.i(638396),e8=e.i(426),e7=e.i(789579),e9=e.i(33383);let te=d.forwardRef(function(e,n){let{render:r,className:l,anchor:a,positionMethod:s,side:i,align:o,sideOffset:u,alignOffset:c,collisionBoundary:p="clipping-ancestors",collisionPadding:m,arrowPadding:x,sticky:v,disableAnchorTracking:b=!1,collisionAvoidance:S=e4.DROPDOWN_COLLISION_AVOIDANCE,style:y,...C}=e,j=F(),E=B(),N=function(){let e=d.useContext(e0);if(void 0===e)throw Error((0,f.default)(20));return e}(),k=j.useState("modal"),I=j.useState("open"),R=j.useState("mounted"),w=j.useState("openMethod"),O=j.useState("positionerElement"),A=j.useState("triggerElement"),P=j.useState("inputElement"),T=j.useState("inputGroupElement"),M=j.useState("inputInsidePopup"),D=j.useState("transitionStatus"),V=eO(),L=(0,e6.useAnchorPositioning)({anchor:a??(M?A:T??P),floatingRootContext:E,positionMethod:s,mounted:R,side:i,sideOffset:u,align:o,alignOffset:c,arrowPadding:x,collisionBoundary:p,collisionPadding:m,sticky:v,disableAnchorTracking:b,keepMounted:N,collisionAvoidance:S,lazyFlip:!0});(0,e9.useAnchoredPopupScrollLock)(I&&k,"touch"===w,O,A);let _={open:I,side:L.side,align:L.align,anchorHidden:L.anchorHidden,empty:V};(0,h.useIsoLayoutEffect)(()=>{j.set("popupSide",L.side)},[j,L.side]);let K=(0,g.useStableCallback)(e=>{j.set("positionerElement",e)}),z=(0,e7.usePositioner)(e,_,{styles:L.positionerStyles,transitionStatus:D,props:C,refs:[n,K],hidden:!R,inert:!I});return(0,t.jsxs)(eV.Provider,{value:L,children:[R&&k&&(0,t.jsx)(e8.InternalBackdrop,{inert:(0,e5.inertValue)(!I),cutout:T??P??A}),z]})});var tt=e.i(61487),tn=e.i(253984);let tr={...ey.popupStateMapping,...eH.transitionStatusMapping},tl=d.forwardRef(function(e,n){let{render:r,className:l,style:a,initialFocus:s,finalFocus:i,...o}=e,u=F(),c=eL(),p=B(),m=u.useState("mounted"),f=u.useState("open"),x=u.useState("openMethod"),g=u.useState("popupProps"),v=u.useState("transitionStatus"),b=u.useState("inputInsidePopup"),S=u.useState("inputElement"),y=u.useState("modal"),C=u.useState("id"),j=eO(),E=o.id??(b?ea(C):void 0);(0,h.useIsoLayoutEffect)(()=>(u.set("popupId",u.context.popupRef.current?.id||E),()=>{u.set("popupId",void 0)}),[u,E]),(0,ee.useOpenChangeComplete)({open:f,ref:u.context.popupRef,onComplete(){f&&u.context.onOpenChangeComplete(!0)}});let N={open:f,side:c.side,align:c.align,anchorHidden:c.anchorHidden,transitionStatus:v,empty:j},k=(0,eb.useRenderElement)("div",e,{state:N,ref:[n,u.context.popupRef],props:[g,{id:E,role:b?"dialog":"presentation",onFocus(e){let t=(0,A.getTarget)(e.nativeEvent);"touch"!==x&&((0,A.contains)(u.state.listElement,t)||t===e.currentTarget)&&u.context.inputRef.current?.focus()}},(0,tn.getDisabledMountTransitionStyles)(v),o],stateAttributesMapping:tr}),I=!!b&&(e=>"touch"===e?u.context.popupRef.current:S),R=!b||y;return(0,t.jsx)(tt.FloatingFocusManager,{context:p,disabled:!m,modal:R,openInteractionType:x,initialFocus:void 0===s?I:s,returnFocus:null!=i?i:!!b&&void 0,getInsideElements:()=>[u.context.startDismissRef.current,u.context.endDismissRef.current],children:(0,t.jsxs)(d.Fragment,{children:[k,R&&(0,t.jsx)(e_,{ref:u.context.endDismissRef})]})})}),ta=d.forwardRef(function(e,t){let{render:n,className:r,style:l,...a}=e,s=F(),{arrowRef:i,side:o,align:u,arrowUncentered:c,arrowStyles:d}=eL(),p=s.useState("open");return(0,eb.useRenderElement)("div",e,{ref:[i,t],stateAttributesMapping:ey.popupStateMapping,state:{open:p,side:o,align:u,uncentered:c},props:{style:d,"aria-hidden":!0,...a}})}),ts=d.createContext(void 0),ti=d.forwardRef(function(e,n){let{render:r,className:l,style:a,items:s,...i}=e,o=F().useState("grid"),[u,c]=d.useState(),p=d.useMemo(()=>({labelId:u,setLabelId:c,items:s}),[u,c,s]),m=(0,eb.useRenderElement)("div",e,{ref:n,props:[{role:o?"rowgroup":"group","aria-labelledby":u},i]}),f=(0,t.jsx)(ts.Provider,{value:p,children:m});return s?(0,t.jsx)(eG,{items:s,children:f}):f}),to=d.forwardRef(function(e,t){let{render:n,className:r,style:l,id:a,...s}=e,{setLabelId:i}=function(){let e=d.useContext(ts);if(void 0===e)throw Error((0,f.default)(18));return e}(),o=(0,eM.useBaseUiId)(a);return(0,h.useIsoLayoutEffect)(()=>(i(o),()=>{i(e=>e===o?void 0:e)}),[o,i]),(0,eb.useRenderElement)("div",e,{ref:t,props:[{id:o,"aria-hidden":!0},s]})});var tu=e.i(174080),tc=e.i(673553);let td=d.createContext(void 0),tp=d.createContext(!1);function tm(e){let{componentProps:n,forwardedRef:r,virtualized:l,indexFromFilter:a}=e,{render:s,className:i,style:o,value:u=null,index:c,disabled:p=!1,nativeButton:m=!1,...f}=n,x=d.useRef(null),g=(0,tc.useCompositeListItem)({guess:!0,index:c,textRef:x}),v=F(),b=d.useContext(tp),S=d.useContext(L),y=v.useState("selectionMode"),C=v.useState("disabled"),j=v.useState("readOnly"),E=v.useState("isItemEqualToValue"),N=C||p,k="none"!==y,I=c??a??g.index,R=-1!==I,w=v.useState("id"),O=v.useState("isActive",I),A=v.useState("isSelected",u),P=v.useState("itemProps"),T=d.useRef(null),M=null!=w&&R?`${w}-${I}`:void 0,D=A&&k;(0,h.useIsoLayoutEffect)(()=>{if(!(R&&(l||null!=c)))return;let e=v.context.listRef.current;return e[I]=T.current,()=>{delete e[I]}},[R,l,I,c,v]),(0,h.useIsoLayoutEffect)(()=>{if(!R||S)return;let e=v.context.valuesRef.current;return e[I]=u,()=>{delete e[I]}},[R,S,I,u,v]),(0,h.useIsoLayoutEffect)(()=>{if(!R||S)return;let e=v.state.selectedValue,t=v.state.selectedIndex;if("multiple"===v.state.selectionMode&&Array.isArray(e)){var n,r;n=v.context.valuesRef.current,r=t,t=$(e,u,E)?null!=r&&I>r&&$(e,n[r],E)?r:I:I===r?G(n,e,E,!0):r}else q(u,e,E)&&(t=I);v.set("selectedIndex",t)},[R,S,v,I,u,E]);let{getButtonProps:V,buttonRef:_}=(0,eS.useButton)({disabled:N,focusableWhenDisabled:!0,native:m,composite:!0});function B(e){function t(){v.context.handleSelection(e,u)}v.state.submitOnItemClick?(tu.flushSync(t),v.context.requestSubmit()):t()}let K=(0,eb.useRenderElement)("div",n,{ref:[_,r,g.ref,T],state:{disabled:N,selected:D,highlighted:O},props:[P,{id:M,role:b?"gridcell":"option","aria-selected":k?D:void 0,tabIndex:void 0,onPointerDownCapture(e){e.isPrimary&&(v.context.pointerDownItemRef.current=e.currentTarget),e.preventDefault()},onMouseDown(e){e.preventDefault()},onClick(e){N||j||B(e.nativeEvent)},onMouseUp(e){let t=v.context.pointerDownItemRef.current===e.currentTarget;v.context.pointerDownItemRef.current=null,N||j||0!==e.button||t||!O||B(e.nativeEvent)}},f,V]}),z=d.useMemo(()=>({selected:D,textRef:x}),[D,x]);return(0,t.jsx)(td.Provider,{value:z,children:K})}function tf(e){let{componentProps:n,forwardedRef:r}=e,l=F().useState("isItemEqualToValue"),{flatFilteredValues:a}=K(),s=U(a,n.value??null,l);return(0,t.jsx)(tm,{componentProps:n,forwardedRef:r,virtualized:!0,indexFromFilter:s})}let tx=d.memo(d.forwardRef(function(e,n){let r=F().useState("virtualized");return r&&null==e.index?(0,t.jsx)(tf,{componentProps:e,forwardedRef:n}):(0,t.jsx)(tm,{componentProps:e,forwardedRef:n,virtualized:r,indexFromFilter:void 0})})),th=d.forwardRef(function(e,n){let{render:r,className:l,style:a,...s}=e,i=(0,eb.useRenderElement)("div",e,{ref:n,props:[{role:"row"},s]});return(0,t.jsx)(tp.Provider,{value:!0,children:i})}),tg=d.forwardRef(function(e,t){let{render:n,className:r,style:l,children:a,...s}=e,{filteredItems:i}=K(),o=F(),u=eX(),c=0===i.length?a:null;return(0,eb.useRenderElement)("div",e,{ref:[t,o.context.emptyRef,u],props:[{children:c,role:"status","aria-live":"polite","aria-atomic":!0},s]})}),tv=d.forwardRef(function(e,t){let{className:n,render:r,orientation:l="horizontal",style:a,...s}=e;return(0,eb.useRenderElement)("div",e,{state:{orientation:l},ref:t,props:[{role:"presentation"},s]})});e.s(["Arrow",0,ta,"Backdrop",0,e3,"Clear",0,e$,"Collection",0,eW,"Empty",0,tg,"Group",0,ti,"GroupLabel",0,to,"Icon",0,ez,"Input",0,eF,"InputGroup",0,eK,"Item",0,tx,"List",0,eJ,"Popup",0,tl,"Portal",0,e1,"Positioner",0,te,"Root",0,function(e){let n,{openOnInputClick:r=!1,value:l,defaultValue:a,onValueChange:s,mode:i="list",itemToStringValue:o,...u}=e,c=("inline"===i||"both"===i)&&!e.readOnly,p=void 0!==l,[m,f]=d.useState(a??""),[x,h]=d.useState("");d.useEffect(()=>{(p||!c)&&h("")},[l,p,c]),n=c&&""!==x?x:p?l??"":m;let g=ei({locale:u.locale}),v=String((p?l:m)??"").trim(),b="inline"===i||"none"===i||null===u.filter?null:u.filter??g.contains;return(0,t.jsx)(eh,{...u,itemToStringLabel:o,openOnInputClick:r,selectionMode:"none",fillInputOnItemPress:!0,filter:b,filterQuery:"both"===i?v:void 0,autoComplete:i,inputValue:n,defaultInputValue:a,onInputValueChange:function(e,t){h(""),p||f(e),s?.(e,t)},onItemHighlighted:function(t,n){e.onItemHighlighted?.(t,n),n.reason!==T.REASONS.pointer&&h(c&&null!=t?X(t,o):"")}})},"Row",0,th,"Separator",0,tv,"Status",0,eQ,"Trigger",0,eP,"Value",0,function(e){let{children:n}=e,r=z(),l=null;return l="function"==typeof n?n(String(r)):null!=n?n:r,(0,t.jsx)(d.Fragment,{children:l})},"useFilter",0,ei,"useFilteredItems",0,function(){return K().filteredItems}],196799);var tb=e.i(196799),tb=tb,tS=e.i(716327),ty=e.i(611568),tC=e.i(23750),tj=e.i(647163);function tE({value:e,onChange:r,options:l,placeholder:a,empty:s="Nothing matches",note:i="Not on the list? Type it, then save.",loading:o=!1,disabled:u=!1,className:c,"aria-label":p}){let f=new Set(l.map(e=>e.value.toLowerCase())),[x,h]=(0,d.useState)(e),[g,v]=(0,d.useState)(e);g!==e&&(v(e),h(e));let b=x.trim(),S=""!==b&&b!==e;return(0,t.jsxs)(tb.Root,{items:l,value:x,onValueChange:(e,t)=>{h(e),"item-press"===t.reason&&r(e)},itemToStringValue:e=>e.value,filter:(e,t)=>{let n;return!!(!(n=t.trim().toLowerCase())||f.has(n))||[e.value,e.label,e.badge].filter(Boolean).some(e=>String(e).toLowerCase().includes(n))},openOnInputClick:!0,disabled:u,children:[(0,t.jsxs)("div",{className:(0,tj.cn)("flex gap-2",c),children:[(0,t.jsxs)(tb.InputGroup,{className:"relative min-w-0 flex-1",children:[(0,t.jsx)(tb.Input,{placeholder:a,"aria-label":p,spellCheck:!1,className:(0,tj.cn)(tC.inputClassName,"pr-8 font-mono text-sm")}),(0,t.jsx)(tb.Trigger,{"aria-label":"Show suggestions",className:"absolute inset-y-0 right-0 flex w-8 items-center justify-center text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:text-foreground disabled:opacity-50",children:o?(0,t.jsx)(ty.LoaderCircle,{className:"size-3.5 animate-spin"}):(0,t.jsx)(tS.ChevronDown,{className:"size-3.5"})})]}),S&&!u&&(0,t.jsx)(m.Button,{variant:"outline",className:"shrink-0",onClick:()=>r(b),children:"Save"})]}),(0,t.jsx)(tb.Portal,{children:(0,t.jsx)(tb.Positioner,{sideOffset:4,className:"isolate z-50 outline-none",children:(0,t.jsxs)(tb.Popup,{className:"max-h-(--available-height) w-max min-w-(--anchor-width) max-w-[min(28rem,var(--available-width))] origin-(--transform-origin) rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none 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",children:[i&&(0,t.jsx)("p",{className:"px-1.5 pt-1 pb-1.5 text-[11px] text-muted-foreground",children:i}),(0,t.jsx)(tb.Empty,{className:"px-2 py-2 font-mono text-[11px] text-muted-foreground empty:hidden",children:o?"Loading":s}),(0,t.jsx)(tb.List,{className:"max-h-64 overflow-y-auto outline-none",children:r=>(0,t.jsxs)(tb.Item,{value:r,className:"flex cursor-default items-center gap-2 rounded-md px-1.5 py-1.5 text-sm outline-none select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground",children:[(0,t.jsx)("span",{className:"flex-1 whitespace-nowrap",children:r.label}),r.badge&&(0,t.jsx)("span",{className:"shrink-0 rounded-full bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:r.badge}),r.hint&&r.hint!==r.label&&(0,t.jsx)("span",{className:"min-w-0 shrink truncate font-mono text-[11px] text-muted-foreground",children:r.hint}),(0,t.jsx)(n.Check,{className:(0,tj.cn)("size-3.5 shrink-0",r.value===e.trim()?"opacity-100":"opacity-0")})]},r.value)})]})})})]})}var tN=e.i(917162),tk=e.i(59377);e.s([],506329),e.i(506329);let tI={checked:e=>e?{"data-checked":""}:{"data-unchecked":""},...eH.transitionStatusMapping,...eC.fieldValidityMapping};var tR=e.i(64350),tw=e.i(370359),tO=e.i(348990),tA=e.i(157153),tP=e.i(31421);let tT=d.createContext(void 0),tM=d.createContext(void 0),tD=d.forwardRef(function(e,n){let{render:r,className:l,disabled:a=!1,readOnly:s=!1,required:i=!1,"aria-labelledby":o,value:u,inputRef:c,nativeButton:p=!1,id:m,style:f,...x}=e,g=d.useContext(tT),{disabled:b,readOnly:y,required:C,form:E,checkedValue:N,touched:k=!1,validation:I,name:R,setCheckedValue:w=j.NOOP,setTouched:O=j.NOOP,registerInputRef:A=j.NOOP}=g??{},{setTouched:M,setFilled:D,state:V,disabled:L}=(0,et.useFieldRootContext)(),_=(0,tA.useFieldItemContext)(),{labelId:F,getDescriptionProps:B}=(0,eN.useLabelableContext)(),K=L||_.disabled||b||a,z=y||s,H=C||i,q=g?N===u:""===u,$=d.useRef(null),U=d.useRef(null),G=I?.registerInput,Y=d.useCallback(e=>G?.(e,{controlRef:$,value:void 0}),[G]),J=(0,v.useMergedRefs)(c,U,A,Y);(0,h.useIsoLayoutEffect)(()=>{U.current?.checked&&D(!0)},[D]),(0,h.useIsoLayoutEffect)(()=>{if(U.current){if(K&&q)return void A(null);A(U.current)}},[q,K,A]);let X=(0,eM.useBaseUiId)(),Q=(0,el.useLabelableId)({id:m}),Z=p?void 0:Q,ee={role:"radio","aria-checked":q,"aria-labelledby":(0,tP.useAriaLabelledBy)(o,F,U,!p,Z),[tw.ACTIVE_COMPOSITE_ITEM]:q?"":void 0,id:p?Q:X,onKeyDown(e){"Enter"===e.key&&e.preventDefault()},onClick(e){if(e.defaultPrevented||K||z)return;e.preventDefault();let t=U.current;t&&(0,tR.dispatchClickWithModifiers)(t,e)},onFocus(e){e.defaultPrevented||K||z||!k||(U.current?.click(),O(!1))}},{getButtonProps:en,buttonRef:er}=(0,eS.useButton)({disabled:K,native:p,composite:!1}),ea={type:"radio",ref:J,form:E,id:Z,name:R,tabIndex:-1,style:R?S.visuallyHiddenInput:S.visuallyHidden,"aria-hidden":!0,...void 0!==u?{value:W(u)}:j.EMPTY_OBJECT,disabled:K,checked:q,required:H,readOnly:z,onChange(e){if(e.nativeEvent.defaultPrevented||K||z||void 0===u)return;let t=(0,P.createChangeEventDetails)(T.REASONS.none,e.nativeEvent);w(u,t),t.isCanceled||M(!0)},onClick(e){e.stopPropagation()},onFocus(){$.current?.focus()}},es=d.useMemo(()=>({...V,required:H,disabled:K,readOnly:z,checked:q}),[V,K,z,q,H]),ei=void 0!==g,eo=[n,$,er],eu=[ee,x,en,B,I?e=>I.getValidationProps(K,e):j.EMPTY_OBJECT],ec=(0,eb.useRenderElement)("span",e,{enabled:!ei,state:es,ref:eo,props:eu,stateAttributesMapping:tI});return(0,t.jsxs)(tM.Provider,{value:es,children:[ei?(0,t.jsx)(tO.CompositeItem,{tag:"span",render:r,className:l,style:f,state:es,refs:eo,props:eu,stateAttributesMapping:tI}):ec,(0,t.jsx)("input",{...ea,suppressHydrationWarning:!0})]})}),tV=d.forwardRef(function(e,t){let{render:n,className:r,style:l,keepMounted:a=!1,...s}=e,i=function(){let e=d.useContext(tM);if(void 0===e)throw Error((0,f.default)(52));return e}(),o=i.checked,{mounted:u,transitionStatus:c,setMounted:p}=(0,eo.useTransitionStatus)(o),m={...i,transitionStatus:c},x=d.useRef(null),h=(0,eb.useRenderElement)("span",e,{ref:[t,x],state:m,props:s,stateAttributesMapping:tI});return((0,ee.useOpenChangeComplete)({batch:!0,enabled:!o,open:o,ref:x,onComplete(){o||p(!1)}}),a||u)?h:null});e.s(["Indicator",0,tV,"Root",0,tD],66747);var tL=e.i(66747),tL=tL,t_=e.i(673327),tF=e.i(405934),tB=e.i(155627),tK=e.i(387068);let tz=[t_.SHIFT],tH=d.forwardRef(function(e,n){let{render:r,className:l,disabled:a,readOnly:s,required:i,onValueChange:o,value:u,defaultValue:c,form:p,name:m,inputRef:f,id:h,style:v,...b}=e,{setTouched:S,setFocused:y,validationMode:C,name:j,disabled:E,state:N,validation:k,setDirty:I,setFilled:R,validityData:w}=(0,et.useFieldRootContext)(),{labelId:O}=(0,eN.useLabelableContext)(),{clearErrors:P,elementRef:T}=(0,er.useFormContext)(),M=(0,tK.useFieldsetRootContext)(!0),D=E||a,V=j??m,L=(0,eM.useBaseUiId)(h),[_,F]=(0,x.useControlled)({controlled:u,default:c,name:"RadioGroup",state:"value"}),[B,K]=d.useState(!1),z=(0,g.useStableCallback)((e,t)=>{o?.(e,t),t.isCanceled||F(e)}),H=k.getInputControl,q=d.useMemo(()=>({get current(){return H()}}),[H]),$=d.useRef(null),U=d.useRef(null);function G(e){let t;return f&&("function"==typeof f?t=f(e):f.current=e),$.current=e,t}let W=(0,g.useStableCallback)(e=>{if(!e||e.disabled)return;U.current||(U.current=e);let t=$.current,n=e.checked||null==t||t.disabled?G(e):void 0;return()=>{U.current===e&&(U.current=null),$.current===e?n?(n(),$.current=null):G(null):n?.()}}),Y=(0,g.useStableCallback)(()=>{let e=T.current;if(!e)return _??null;for(let t of k.registeredInputs.keys())if(t.checked&&(0,tB.isEligibleInput)(t,e))return _??null;return null});(0,en.useRegisterFieldControl)(q,L,_??null,Y,!D,m),(0,ec.useValueChanged)(_,()=>{P(V),I(_!==w.initialValue),R(null!=_),k.change(_);let e=U.current;null==_&&e&&!e.disabled&&G(e)});let J=O??M?.legendId,X={...N,disabled:D??!1,required:i??!1,readOnly:s??!1},Q=d.useMemo(()=>({checkedValue:_,disabled:D,form:p,validation:k,name:V,readOnly:s,registerInputRef:W,required:i,setCheckedValue:z,setTouched:K,touched:B}),[_,D,p,k,V,s,W,i,z,K,B]);return(0,t.jsx)(tT.Provider,{value:Q,children:(0,t.jsx)(tF.CompositeRoot,{render:r,className:l,style:v,state:X,props:[{id:h,role:"radiogroup","aria-required":i||void 0,"aria-disabled":D||void 0,"aria-readonly":s||void 0,"aria-labelledby":J,onFocus(){y(!0)},onBlur(e){(0,A.contains)(e.currentTarget,e.relatedTarget)||(S(!0),y(!1),"onBlur"===C&&k.commit(_))},onKeyDownCapture(e){e.key.startsWith("Arrow")&&(K(!0),y(!0))}},b,e=>k.getValidationProps(D??!1,e)],refs:[n],stateAttributesMapping:eC.fieldValidityMapping,enableHomeAndEndKeys:!1,modifierKeys:tz})})});function tq({className:e,...n}){return(0,t.jsx)(tH,{"data-slot":"radio-group",className:(0,tj.cn)("grid w-full gap-2",e),...n})}function t$({className:e,...n}){return(0,t.jsx)(tL.Root,{"data-slot":"radio-group-item",className:(0,tj.cn)("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 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 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-brand data-checked:bg-brand data-checked:text-brand-foreground group-has-[:focus-visible]/field-label:data-checked:border-brand dark:data-checked:bg-brand",e),...n,children:(0,t.jsx)(tL.Indicator,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:(0,t.jsx)("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-brand-foreground"})})})}var tU=e.i(421429),tG=e.i(660302),tW=e.i(671428),tY=e.i(319036),tJ=e.i(184762),tX=e.i(41533),tQ=e.i(412294),tZ=e.i(458898),t0=e.i(149666),t1=e.i(265402),t2=e.i(609507),t3=e.i(616816),t5=e.i(247632),t6=e.i(895836),t4=e.i(658707),t8=e.i(867927);let t7={name:"phone",size:24,node:[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]};t7.node;let t9=(0,a.default)(t7);var ne=e.i(759659),nt=e.i(633669),nn=e.i(222055),nr=e.i(245629),nl=e.i(609856),na=e.i(661504),ns=e.i(95187);let ni=(0,ns.createServerReference)("7fee450ba207b10b52bb0f646fb9314d75bcd76853",ns.callServer,void 0,ns.findSourceMapURL,"deleteCallAction"),no=(0,ns.createServerReference)("7f04f15700d999ff9ad66315f017c33ecbaf7579e1",ns.callServer,void 0,ns.findSourceMapURL,"deleteEndedCallsAction");var nu=e.i(561540),nc=e.i(256604);function nd(){return(0,t.jsxs)("button",{type:"button",onClick:()=>tN.notify.component({className:"sm:max-w-3xl",renderer:()=>(0,t.jsx)(nx,{})}),className:"flex w-full min-w-0 items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:(0,t.jsx)(t9,{className:"size-4"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block text-sm font-medium",children:"Call history"}),(0,t.jsx)("span",{className:"block text-xs text-muted-foreground",children:"Every call, word for word — hers and yours"})]}),(0,t.jsx)(t8.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground"})]})}let np={running:"working",waiting:"waiting on you",done:"done",cancelled:"stopped"},nm={running:"text-muted-foreground",waiting:tj.WAITING_INK,done:"text-muted-foreground",cancelled:"text-muted-foreground"},nf="h-[min(34rem,58vh)] min-h-64 px-1";function nx(){let{items:e,isLoading:n,isLoadingMore:r,error:l,hasMore:a,sentinelRef:s,refresh:i}=(0,na.useServerPages)({key:(e,t)=>{if(0===e)return p.queryKey.callHistory(null);let n=t?.at(-1);return n?p.queryKey.callHistory((0,nr.toDate)(n.startedAt).toISOString()):null},size:tX.CALL_HISTORY_PAGE,swr:{revalidateOnFocus:!1}}),o=(0,d.useMemo)(()=>[...e].reverse(),[e]),[u,c]=(0,nl.useServerAction)(no,{okMessage:e=>1===e?"1 call deleted":`${e} calls deleted`,onOk:i}),f=async()=>{await tN.notify.confirm({title:"Delete every call?",description:"Every turn of every call goes — and she stops reading any of it back into the next call. A call still on the line stays.",okText:"Delete all",destructive:!0})&&u()},x=(0,d.useRef)(null),h=(0,d.useRef)(!1),g=(0,d.useRef)(0);(0,d.useLayoutEffect)(()=>{let e=x.current;e&&0!==o.length&&(h.current?e.scrollTop=e.scrollHeight-g.current:(h.current=!0,e.scrollTop=e.scrollHeight),g.current=e.scrollHeight-e.scrollTop)},[o]);let v=e=>(0,t.jsx)(t6.SettingDialogContent,{title:"Call history",description:`Everything said on the line, oldest at the top.${o.length>0?" Scroll up for older calls.":""}`,children:e});return v(n?(0,t.jsx)("div",{className:(0,tj.cn)(nf,"overflow-hidden"),children:(0,t.jsx)(nh,{})}):l?(0,t.jsx)(t6.SettingError,{message:l.message}):(0,t.jsx)(t.Fragment,{children:0===o.length?(0,t.jsx)("p",{className:"px-1 text-sm leading-relaxed text-muted-foreground",children:"No calls yet. Everything said on the line is kept here — hers and yours, in the order it was said."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{ref:x,onScroll:e=>{let t=e.currentTarget;g.current=t.scrollHeight-t.scrollTop},className:(0,tj.cn)(nf,"overflow-y-auto overscroll-contain pb-6"),children:[(0,t.jsx)(t6.SettingMore,{hasMore:a,loading:r,sentinelRef:s,count:1,ghost:(0,t.jsx)(nh,{})}),o.map((e,n)=>(0,t.jsx)(nv,{call:e,first:0===n,onDropped:i},e.id))]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)(m.Button,{variant:"ghost",loading:c,onClick:f,className:"text-muted-foreground hover:text-destructive",children:[(0,t.jsx)(ne.Trash2,{}),"Delete all"]})})]})}))}function nh(){return(0,t.jsxs)("div",{className:"pb-3",children:[(0,t.jsxs)("div",{className:"flex h-7 items-center gap-2.5",children:[(0,t.jsx)(tW.Skeleton,{className:"h-3 w-24"}),(0,t.jsx)(tW.Skeleton,{className:"h-3 w-10"})]}),(0,t.jsx)("div",{className:"mt-2 mb-[18px] h-px bg-border/60"}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(tW.Skeleton,{className:"h-9 w-3/5 rounded-2xl rounded-br-sm"})}),(0,t.jsxs)("div",{className:"mt-3 flex items-start gap-2",children:[(0,t.jsx)(tW.Skeleton,{className:"mt-0.5 size-[18px] shrink-0 rounded-full"}),(0,t.jsx)(tW.Skeleton,{className:"mt-1 h-3.5 w-2/3"})]})]})}let ng=e=>"user"===e.role?"user":"her";function nv({call:e,first:n,onDropped:r}){let[l,a]=(0,nl.useServerAction)(ni,{okMessage:"Call deleted",onOk:r}),s=(0,nr.toDate)(e.startedAt),i=e.turns.at(-1),o=e.endedAt&&i?function(e,t){let n=Math.max(0,Math.round((t.getTime()-e.getTime())/1e3));if(n<60)return`${n}s`;let r=Math.floor(n/60);return r<60?`${r}m ${String(n%60).padStart(2,"0")}s`:`${Math.floor(r/60)}h ${String(r%60).padStart(2,"0")}m`}(s,(0,nr.toDate)(i.at)):"on the line",u=async()=>{await tN.notify.confirm({title:`Delete the call from ${(0,nr.whenOf)(s)}?`,description:"Every turn of it goes — and she stops reading it back into the next call.",okText:"Delete",destructive:!0})&&l(e.id)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:(0,tj.cn)("group flex items-center gap-2.5",n?"mt-1":"mt-11"),children:[(0,t.jsx)("span",{title:[e.provider,e.model,e.backendModel,null===e.seconds?null:`${e.seconds}s active`,e.endedReason].filter(Boolean).join(" · "),className:"font-mono text-[10px] tracking-[0.14em] uppercase",children:(0,nr.whenOf)(s)}),(0,t.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground",children:e.model===tX.TEXT_CALL.model?`${o} \xb7 in writing`:o}),(0,t.jsx)("span",{className:"ml-auto flex size-7 shrink-0 items-center justify-center",children:e.endedAt&&(0,t.jsx)(m.Button,{size:"icon-sm",variant:"ghost",loading:a,"aria-label":"Delete this call",onClick:u,className:"text-muted-foreground/60 opacity-0 transition-opacity group-hover:opacity-100 hover:text-destructive focus-visible:opacity-100",children:(0,t.jsx)(ne.Trash2,{})})})]}),(0,t.jsx)("div",{className:"mt-2 mb-[18px] h-px bg-border/60"}),(function(e){let t=[];for(let n of e){let e=t.at(-1);if(e&&"tool"===n.role&&"tool"===e.turn.role&&e.turn.tool===n.tool&&e.turn.text===n.text){e.repeats+=1;continue}t.push({turn:n,repeats:1})}return t})(e.turns).map(({turn:n,repeats:r},l,a)=>{var s,i;let o,u=a[l-1]?.turn,c=a[l+1]?.turn;return(0,t.jsx)(nb,{turn:n,job:(s=e,i=n,(o=(0,nu.startedLabel)(i.tool,i.text))?s.jobs.find(e=>e.label===o):void 0),repeats:r,opensRun:!u||ng(u)!==ng(n),closesRun:!c||ng(c)!==ng(n)},n.id)})]})}function nb({turn:e,job:n,opensRun:r,closesRun:l,repeats:a=1}){return"tool"===e.role?(0,t.jsx)(ny,{turn:e,job:n,repeats:a,opensRun:r}):"user"===e.role?(0,t.jsx)("div",{className:(0,tj.cn)("flex justify-end",r?"mt-3":"mt-1"),children:(0,t.jsx)("p",{className:(0,tj.cn)("max-w-[min(34rem,78%)] rounded-2xl bg-muted px-3.5 py-2 text-[13.5px] leading-relaxed break-keep wrap-anywhere whitespace-pre-wrap",l&&"rounded-br-sm"),children:e.text})}):(0,t.jsxs)("div",{className:(0,tj.cn)("flex items-start gap-2",r?"mt-3":"mt-1"),children:[(0,t.jsx)(nS,{face:r,className:"mt-0.5"}),(0,t.jsx)("p",{className:"max-w-[min(34rem,78%)] text-[13.5px] leading-relaxed break-keep wrap-anywhere whitespace-pre-wrap",children:e.text})]})}function nS({face:e,className:n}){return(0,t.jsx)("span",{className:(0,tj.cn)("grid size-[18px] shrink-0 place-items-center",n),children:e&&(0,t.jsx)(nc.ThursdayMark,{size:18})})}function ny({turn:e,job:n,repeats:r,opensRun:l}){let a=e.tool??"",s=(0,nn.toolIcon)(a),i=(0,nu.toolLine)(a,e.text),o=(0,nu.searchOf)(e.tool,e.text)?.sources??[];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:(0,tj.cn)("flex items-center gap-2",l?"mt-3":"mt-1.5"),children:[(0,t.jsx)(nS,{face:l}),(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-muted-foreground",children:[(0,t.jsx)(s,{className:"size-3 shrink-0"}),i&&(0,t.jsx)("span",{className:"truncate text-[11px] break-keep",children:i}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground",children:a}),r>1&&(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground",children:["×",r]})]})]}),o.length>0&&(0,t.jsx)(nt.SourceChips,{sources:o,className:"mt-1 ml-[26px]"}),n&&(0,t.jsxs)("p",{className:"mt-0.5 ml-[26px] flex min-w-0 items-baseline gap-1.5 text-[11px]",children:["running"===n.status?(0,t.jsx)(tG.ShinyText,{text:np.running,className:"shrink-0 font-mono text-[10px]"}):(0,t.jsx)("span",{className:(0,tj.cn)("shrink-0 font-mono text-[10px]",nm[n.status]),children:np[n.status]}),n.outcome&&"running"!==n.status&&(0,t.jsx)("span",{className:"truncate text-muted-foreground",children:(0,tj.plainText)(n.outcome)})]})]})}var nC=e.i(263676),nj=e.i(6799),nE=e.i(333495),nN=e.i(218080);let nk=Array(nN.SPECTRUM_BANDS).fill(0);function nI({voice:e,onChange:r}){let[l,a]=(0,d.useState)(!1),[s,i]=(0,d.useState)(e),[o,u]=(0,d.useState)(!1),[c,p]=(0,d.useState)(""),f=(0,d.useRef)(null),x=(0,d.useRef)(null),h=(0,d.useRef)(0),g=(0,d.useRef)(!1),v=(0,d.useCallback)(()=>x.current&&g.current?x.current.clip.read():nk,[]),b=e=>{g.current=e,u(e)};(0,d.useEffect)(()=>{if(l)return()=>{let e=x.current;x.current=null,e&&(e.element.pause(),e.clip.close())}},[l]);let S=(e,t)=>{e===h.current&&(h.current++,b(!1),nj.toast.add({type:"error",title:"Voice sample did not play",description:(0,tj.errorToString)(t)}))},y=()=>{h.current++;let e=f.current;e&&(e.pause(),e.currentTime=0),b(!1)};return l?(0,t.jsxs)("div",{className:"@container space-y-2",children:[(0,t.jsx)("audio",{ref:f,onEnded:()=>b(!1),onError:e=>{g.current&&S(h.current,e.currentTarget.error?.message||"The clip could not be read.")},children:(0,t.jsx)("track",{kind:"captions"})}),(0,t.jsxs)("div",{className:"rounded-xl border border-border/60 p-3",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-[11px] text-muted-foreground",children:"click a name to hear it"}),(0,t.jsx)(m.Button,{variant:"ghost",size:"icon-xs",className:"ml-auto","aria-label":"Close",onClick:()=>{y(),a(!1),p(""),i(e)},children:(0,t.jsx)(nC.X,{})})]}),(0,t.jsxs)("div",{className:"grid gap-4 @md:grid-cols-[11rem_minmax(0,1fr)]",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,t.jsx)(nE.Face,{status:o?"speaking":"idle",getSpectrum:v,className:"w-44"}),(0,t.jsx)("span",{className:"text-sm font-medium",children:o?(0,t.jsx)(tG.ShinyText,{text:s}):s}),(0,t.jsx)("span",{className:"h-4 font-mono text-[11px] text-muted-foreground",children:t0.LIVE_VOICE_NOTE[s]})]}),(0,t.jsx)("div",{className:"max-h-56 min-w-0 overflow-y-auto",children:t0.LIVE_VOICES.map(r=>(0,t.jsxs)("button",{type:"button",onClick:()=>(e=>{let t=f.current;if(!t)return;if(o&&e===s)return void y();i(e),p(""),x.current?.element!==t&&(x.current?.clip.close(),x.current={element:t,clip:(0,nN.createClipTap)(t)}),x.current.clip.resume();let n=++h.current;t.src=(0,t0.voiceSamplePath)(e),b(!0),t.play().catch(e=>{e instanceof DOMException&&"AbortError"===e.name||S(n,e)})})(r),className:(0,tj.cn)("flex w-full items-center gap-2 rounded-md px-1.5 py-1.5 text-sm outline-none hover:bg-accent focus-visible:bg-accent",r===s&&"bg-accent text-accent-foreground"),children:[(0,t.jsx)("span",{className:"flex-1 text-left",children:o&&r===s?(0,t.jsx)(tG.ShinyText,{text:r}):r}),(0,t.jsx)("span",{className:"shrink truncate font-mono text-[11px] text-muted-foreground",children:t0.LIVE_VOICE_NOTE[r]}),(0,t.jsx)(n.Check,{className:(0,tj.cn)("size-3.5 shrink-0",r===e?"opacity-100":"opacity-0")})]},r))})]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(tC.Input,{value:c,onChange:e=>p(e.target.value),placeholder:"another voice id","aria-label":"Another voice id",spellCheck:!1,className:"font-mono text-sm"}),(0,t.jsx)(m.Button,{className:"shrink-0",onClick:()=>{let t=c.trim()||s;y(),a(!1),p(""),i(t),t!==e&&r(t)},children:"Save"})]})]}):(0,t.jsxs)("button",{type:"button",onClick:()=>a(!0),"aria-label":"Voice",className:(0,tj.cn)(tC.inputClassName,"flex items-center gap-2 text-left font-mono text-sm hover:border-ring"),children:[(0,t.jsx)("span",{className:"shrink-0",children:e}),(0,t.jsx)("span",{className:"min-w-0 truncate text-[11px] text-muted-foreground",children:t0.LIVE_VOICE_NOTE[e]}),(0,t.jsx)(tS.ChevronDown,{className:"ml-auto size-3.5 shrink-0 text-muted-foreground"})]})}let nR=(0,ns.createServerReference)("7fd239bd88f118f24bd6f79d838bc5b5560fe3e3d3",ns.callServer,void 0,ns.findSourceMapURL,"resetHistoryAction");var nw=e.i(671228),nO=e.i(67045),nA=e.i(297825),nP=e.i(319841);function nT(e,t,{min:n=1,accepts:r=()=>!0}={}){let[l,a]=(0,d.useState)(e),[s,i]=(0,d.useState)(e);return e!==s&&(i(e),a(e)),{value:l,set:a,commit:()=>{let s=l.trim();if(s.length<n||!r(s))return a(e);a(s),s!==e&&t(s)},onKeyDown:e=>{"Enter"!==e.key||(0,nP.composing)(e)||e.currentTarget.blur()}}}var nM=e.i(413168),nD=e.i(283653);function nV({columns:e,children:n}){return(0,t.jsx)("div",{className:"@container",children:(0,t.jsx)("div",{className:(0,tj.cn)("grid divide-y divide-border/60 overflow-hidden rounded-xl border border-border/60",3===e?"@3xl:grid-cols-3 @3xl:divide-x @3xl:divide-y-0":"@xl:grid-cols-2 @xl:divide-x @xl:divide-y-0"),children:n})})}function nL({label:e,children:n}){return(0,t.jsxs)("div",{className:"flex min-h-5 items-center gap-3",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:e}),n]})}let n_={chatgpt:{model:nM.LIVE_PLAN_MODEL,label:"GPT Subscription"},openai:{model:nM.LIVE_MODEL,label:"OpenAI key"}};function nF({value:e,has:n,plan:r,onChange:l}){let a=(0,t0.liveLineOf)(e.runsOn,n,r),s=e=>(0,t0.liveLineReady)(e,n,r),i=n(t1.TEXT_MODEL_PROVIDERS.chatgpt.apiKeyName),[o,u]=(0,d.useState)(null),c=o&&!s(o)?o:null,p="chatgpt"===a;return(0,t.jsx)(t6.SettingGroup,{label:"Models",note:`Both run on ${p?"your GPT Subscription":"your OpenAI key"}. Instructions are saved when you leave the field.`,children:(0,t.jsxs)("div",{className:"@container divide-y divide-border/60 rounded-xl border border-border/60",children:[!a&&(0,t.jsx)(nq,{plan:i?(0,t1.planName)(r)??"":null}),(0,t.jsxs)(nB,{name:"Voice",fact:p?"on your plan":"billed by the minute",children:[a&&(0,t.jsxs)(nz,{label:"runs on",children:[(0,t.jsx)(tU.Segmented,{options:t0.LIVE_LINES.map(e=>({value:e,label:function(e,{ready:t,set:n,plan:r}){let{label:l}=n_[e];return n&&!t?`${l} \xb7 ${r??"plan"} \xb7 no calls`:t?"chatgpt"===e&&r?`${l} \xb7 ${r}`:l:`${l} \xb7 ${"chatgpt"===e?"sign in":"add"}`}(e,{ready:s(e),set:n(t1.TEXT_MODEL_PROVIDERS[e].apiKeyName),plan:(0,t1.planName)(r)})})),value:c??a,onChange:e=>{u(s(e)?null:e),l({runsOn:e})},"aria-label":"What a call runs on"}),c?(0,t.jsx)(nH,{line:c,runsOn:a,plan:i?(0,t1.planName)(r):null}):(0,t.jsx)("span",{className:"block font-mono text-[11px] text-muted-foreground",children:n_[a].model})]}),(0,t.jsx)(nz,{label:"voice",children:p?(0,t.jsx)(tE,{value:e.planVoice,onChange:e=>l({planVoice:e.trim()||t0.LIVE_DEFAULTS.planVoice}),options:t0.LIVE_PLAN_VOICES.map(e=>({value:e,label:e})),"aria-label":"Voice on the GPT Subscription"}):(0,t.jsx)(nI,{voice:e.voice,onChange:e=>l({voice:e.trim()||t0.LIVE_DEFAULTS.voice})})}),(0,t.jsx)(nz,{label:"style",children:(0,t.jsx)(nK,{value:e.persona,own:e.stylePrompt,onPersona:e=>l({persona:e}),onOwn:e=>l({stylePrompt:e})})})]}),(0,t.jsxs)(nB,{name:"Backend",fact:p?"on your plan":"billed per token",children:[(0,t.jsx)(nz,{label:"model",children:(0,t.jsx)(n$,{value:e.backendModel,onChange:e=>l({backendModel:e})})}),(0,t.jsx)(nz,{label:"effort",children:(0,t.jsx)(tZ.EffortSwitch,{provider:"openai",model:e.backendModel,value:e.reasoningEffort,onChange:e=>l({reasoningEffort:e})})}),(0,t.jsx)(nz,{label:"tools",children:(0,t.jsx)(nU,{webSearch:e.webSearch,readSkills:e.readSkills,onChange:l})}),(0,t.jsx)(nz,{label:"instructions",children:(0,t.jsx)(nY,{value:e.backendPrompt,onCommit:e=>l({backendPrompt:e}),placeholder:"How work should be handed over, what to check first.","aria-label":"Backend instructions"})})]})]})})}function nB({name:e,fact:n,children:r}){return(0,t.jsxs)("div",{className:"grid gap-4 p-5 @2xl:grid-cols-[8.5rem_minmax(0,1fr)] @2xl:gap-6",children:[(0,t.jsxs)("span",{className:"space-y-0.5",children:[(0,t.jsx)("span",{className:"block text-sm font-medium",children:e}),(0,t.jsx)("span",{className:"block font-mono text-[11px] text-muted-foreground",children:n})]}),(0,t.jsx)("div",{className:"min-w-0 space-y-4",children:r})]})}function nK({value:e,own:l,onPersona:a,onOwn:s}){let[i,o]=(0,d.useState)(!1),[u,c]=(0,d.useState)(!1),p=t2.PERSONAS.find(t=>t.id===e)??t2.PERSONAS.find(e=>e.id===t2.DEFAULT_PERSONA)??t2.PERSONAS[0];return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(tk.Popover,{open:i,onOpenChange:o,children:[(0,t.jsx)(tk.PopoverTrigger,{render:(0,t.jsxs)("button",{type:"button",className:"flex w-full items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors hover:bg-muted/50",children:[(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:p.label}),(0,t.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:p.about})]}),(0,t.jsx)(r.ChevronsUpDown,{className:"size-4 shrink-0 text-muted-foreground"})]})}),(0,t.jsxs)(tk.PopoverContent,{align:"start",className:"w-104 p-1.5",children:[(0,t.jsx)("p",{className:"px-2 py-1.5 text-xs text-muted-foreground",children:"How she talks to you. It never changes what she can do."}),t2.PERSONAS.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>{a(e.id),o(!1)},className:(0,tj.cn)("flex w-full items-baseline gap-3 rounded-md px-2 py-1.5 text-left",e.id===p.id?t6.PICKED_ROW:"hover:bg-muted/60"),children:[(0,t.jsx)("span",{className:"w-20 shrink-0 text-sm font-medium",children:e.label}),(0,t.jsx)("span",{className:"min-w-0 flex-1 text-xs text-muted-foreground",children:e.about}),e.id===p.id&&(0,t.jsx)(n.Check,{className:"size-3.5 shrink-0 text-brand"})]},e.id)),(0,t.jsxs)("button",{type:"button",onClick:()=>{c(!0),o(!1)},className:(0,tj.cn)("flex w-full items-baseline gap-3 rounded-md px-2 py-1.5 text-left",l.trim()?t6.PICKED_ROW:"hover:bg-muted/60"),children:[(0,t.jsx)("span",{className:"w-20 shrink-0 text-sm font-medium",children:"Your own"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 text-xs text-muted-foreground",children:"Say it in your words, over the one above."}),l.trim()?(0,t.jsx)(n.Check,{className:"size-3.5 shrink-0 text-brand"}):null]})]})]}),u||l.trim()?(0,t.jsx)(nY,{value:l,onCommit:s,placeholder:"Quieter. Don't explain things I didn't ask about.","aria-label":"In your own words"}):null]})}function nz({label:e,children:n}){return(0,t.jsxs)("div",{className:"min-w-0 space-y-2",children:[(0,t.jsx)("span",{className:"block font-mono text-[11px] text-muted-foreground",children:e}),n]})}function nH({line:e,runsOn:n,plan:r}){let[l,a]=(0,d.useState)(""),[s,i]=(0,nl.useServerAction)(t5.setConfigAction,{onOk:()=>{(0,nD.revalidate)(p.queryKey.llmModel),(0,nD.revalidate)(p.queryKey.config),a("")}}),o=l.trim().length>=tX.KEY_MIN;return(0,t.jsxs)("div",{className:"space-y-2.5 pt-1",children:[(0,t.jsxs)("span",{className:"block text-xs text-muted-foreground",children:["chatgpt"===e?r?`The ${r} plan runs bots and calls in writing, but not spoken calls. Sign in again with a paid plan.`:"Sign in with ChatGPT and calls run on your plan, with no bill by the minute.":"Paste an OpenAI API key. OpenAI bills a call by the minute, apart from ChatGPT."," ","Until then a call runs on your ",n_[n].label,"."]}),"chatgpt"===e?(0,t.jsx)(tQ.ChatGptSignIn,{variant:"brand",size:"sm",label:r?"Sign in again":void 0}):(0,t.jsx)(t3.KeyInput,{dense:!0,provider:t0.LIVE_PROVIDER,saved:!1,autoFocus:!0,value:l,ready:o,saving:i,onValue:a,onSubmit:()=>o&&s(t0.LIVE_PROVIDER.apiKeyName,l)})]})}function nq({plan:e}){return(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsxs)("span",{className:"block space-y-0.5",children:[(0,t.jsx)("span",{className:(0,tj.cn)("block text-sm font-medium",tj.WAITING_INK),children:null===e?"No GPT Subscription or OpenAI key":`Your ${e?`${e} `:""}plan has no spoken calls`}),(0,t.jsx)("span",{className:"block text-xs text-muted-foreground",children:"Her voice and the backend both run on one of them"})]}),(0,t.jsx)("div",{className:"max-w-md",children:(0,t.jsx)(t3.CallLines,{})})]})}function n$({value:e,onChange:r}){let l=nT(t0.LIVE_BACKEND_MODELS.some(t=>t.id===e)?"":e,e=>r(e||t0.LIVE_DEFAULTS.backendModel),{min:0});return(0,t.jsxs)("div",{className:"@container space-y-2",children:[(0,t.jsx)("div",{role:"radiogroup","aria-label":"Backend model",className:"grid grid-cols-2 gap-2 @2xl:grid-cols-4",children:t0.LIVE_BACKEND_MODELS.map(l=>{let a=l.id===e;return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":a,onClick:()=>r(l.id),className:(0,tj.cn)("min-w-0 space-y-0.5 rounded-lg border px-3 py-2.5 text-left outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",a?"border-brand bg-brand/4":"border-border/60 hover:bg-muted/50"),children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:l.label}),a&&(0,t.jsx)(n.Check,{className:"size-3.5 shrink-0 text-brand"})]}),(0,t.jsxs)("span",{className:"block truncate font-mono text-[11px] text-muted-foreground",children:[l.id," · ",l.tier]})]},l.id)})}),(0,t.jsx)(tC.Input,{value:l.value,onChange:e=>l.set(e.target.value),onBlur:l.commit,onKeyDown:l.onKeyDown,placeholder:"Other model id","aria-label":"Other backend model id",spellCheck:!1,className:"font-mono text-sm"})]})}function nU({webSearch:e,readSkills:n,onChange:r}){return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-x-7 gap-y-3",children:[(0,t.jsx)(nG,{label:"Search the web",checked:e,onChange:e=>r({webSearch:e})}),(0,t.jsx)(nG,{label:"Read skills herself",checked:n,onChange:e=>r({readSkills:e})})]}),e&&(0,t.jsx)(t6.SettingNote,{children:"Each search adds to the backend's OpenAI usage."}),n&&(0,t.jsx)(nW,{})]})}function nG({label:e,checked:n,disabled:r,onChange:l}){return(0,t.jsxs)("label",{className:"flex items-center gap-2.5 text-sm",children:[(0,t.jsx)(tY.Switch,{checked:n,disabled:r,onCheckedChange:l}),e]})}function nW(){let{data:e}=(0,nD.useServerRoute)(p.queryKey.skills);return e?(0,t.jsx)(t6.SettingNote,{className:(0,tj.cn)(!e.length&&tj.WAITING_INK),children:e.length?`The same ${e.length} a bot reads. Each one she opens spends a page of the call on it.`:"Nothing installed yet — there is nothing for her to read."}):null}function nY({value:e,onCommit:n,placeholder:r,"aria-label":l}){let a=nT(e,n,{min:0});return(0,t.jsx)(tJ.Textarea,{value:a.value,maxLength:tX.COMMON_VALIDATE.prompt.max,onChange:e=>a.set(e.target.value),onBlur:a.commit,placeholder:r,"aria-label":l})}function nJ(){let[e,n]=(0,nl.useServerAction)(nR,{okMessage:({calls:e,threads:t,notes:n})=>`Wiped ${e} calls, ${t} jobs, ${n} notes`,onOk:()=>{(0,nD.revalidate)(p.queryKey.memory),(0,nD.revalidate)(p.queryKey.threads),(0,nD.revalidate)(p.queryKey.callHistory(null))}}),r=async()=>{await tN.notify.confirm({title:"Reset history?",description:"Every call, every job and everything she remembers is deleted for good. Keys, bots and connectors stay, and so does what each bot keeps for itself.",okText:"Reset",destructive:!0})&&e()};return(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3 p-4",children:[(0,t.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:(0,t.jsx)(c.TriangleAlert,{className:"size-4"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:"Reset history"}),(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:"Calls, jobs and memory. Keys and bots stay."})]}),(0,t.jsx)(m.Button,{variant:"outline",size:"sm",loading:n,onClick:r,className:"shrink-0 text-destructive hover:text-destructive",children:"Reset"})]})}function nX(){let{data:e}=(0,nD.useServerRoute)(p.queryKey.running),{data:n}=(0,nD.useServerRoute)(p.queryKey.update,{onError:()=>{}}),{to:r,failed:l}=(0,t4.useUpdateStore)();if(!e)return(0,t.jsx)(tW.Skeleton,{className:"h-16 w-full rounded-xl"});let{where:a,mac:s,command:o,start:c,home:d}=e,f=n?.newer??null,x=f&&n?.command?n.command:null,h={background:{title:"In the background",hint:"Starts when you log in, and comes back if it stops.",how:o&&{label:"To stop it",run:`${o} stop`}},terminal:{title:"In a terminal",hint:"Closing that terminal stops Thursday.",how:c&&s?{label:"To keep it running without one, press Ctrl+C there and run",run:c}:null},source:{title:"From source",hint:"pnpm dev in a terminal. Closing it stops Thursday.",how:null},elsewhere:{title:"Started by something else",hint:"It stops the way it was started.",how:null}}[a];return(0,t.jsxs)("div",{className:"space-y-3 rounded-xl border border-border/60 p-4",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,t.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:"background"===a?(0,t.jsx)(i,{className:"size-4"}):(0,t.jsx)(u,{className:"size-4"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"block truncate text-sm font-medium",children:[h.title,n?.current&&(0,t.jsxs)("span",{className:"font-normal text-muted-foreground",children:[" ","· ",n.current]})]}),r?(0,t.jsxs)("span",{className:"block text-xs text-muted-foreground",children:[(0,t.jsx)(tG.ShinyText,{text:`Updating to ${r}…`})," Thursday restarts in a moment."]}):f?(0,t.jsxs)("span",{className:"block text-xs",children:[f," is out."]}):(0,t.jsxs)("span",{className:"block text-xs text-muted-foreground",children:[h.hint,"terminal"!==a||s?"":" Running in the background is macOS only for now.",n?.unreached?" npm could not be asked for a newer version.":""]}),(0,t.jsx)("span",{className:"block truncate font-mono text-[11px] text-muted-foreground",children:d})]}),f&&n?.byButton&&!r&&(0,t.jsx)(m.Button,{size:"sm",onClick:()=>void(0,t4.moveTo)(f),children:"Update"})]}),l&&!r&&(0,t.jsxs)("div",{className:"space-y-1 pl-13 text-xs",children:[(0,t.jsxs)("p",{className:"text-destructive",children:["Could not update to ",l.to,"."]}),(0,t.jsx)("p",{className:"line-clamp-3 font-mono text-[11px] whitespace-pre-wrap text-muted-foreground",children:l.why})]}),x&&!r&&(l||!n?.byButton)&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pl-13 text-xs text-muted-foreground",children:[(0,t.jsx)("span",{children:"terminal"===a?"To move to it, press Ctrl+C there and run":"To move to it"}),(0,t.jsx)("code",{className:"rounded-md bg-muted px-1.5 py-0.5 font-mono text-[11px] text-foreground",children:x}),(0,t.jsx)(nQ,{text:x})]}),h.how&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pl-13 text-xs text-muted-foreground",children:[(0,t.jsx)("span",{children:h.how.label}),(0,t.jsx)("code",{className:"rounded-md bg-muted px-1.5 py-0.5 font-mono text-[11px] text-foreground",children:h.how.run}),(0,t.jsx)(nQ,{text:h.how.run})]})]})}function nQ({text:e}){let[r,a]=(0,d.useState)(!1);return(0,t.jsxs)(m.Button,{size:"sm",variant:"outline",onClick:()=>void navigator.clipboard.writeText(e).then(()=>{a(!0),setTimeout(()=>a(!1),2e3)}),children:[r?(0,t.jsx)(n.Check,{}):(0,t.jsx)(l.Copy,{}),r?"Copied":"Copy"]})}let nZ={center:{label:"Her last line",hint:"One caption under the mark — only what she said."},sides:{label:"Both sides",hint:"Hers on the left, yours on the right. Click a line to read it again."}};function n0({value:e,onChange:r}){return(0,t.jsx)(t6.SettingGroup,{label:"Captions",children:(0,t.jsx)("div",{className:"@container",children:(0,t.jsx)("div",{role:"radiogroup","aria-label":"Captions",className:"grid gap-3 @xl:grid-cols-2",children:nw.CAPTION_VIEWS.map(l=>{let a=l===e;return(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":a,onClick:()=>r(l),className:(0,tj.cn)("min-w-0 space-y-3 rounded-xl border p-3 text-left outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",a?"border-brand bg-brand/4":"border-border/60 hover:bg-muted/50"),children:[(0,t.jsx)(n1,{view:l}),(0,t.jsxs)("span",{className:"flex items-center gap-3 px-1 pb-0.5",children:[(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:nZ[l].label}),(0,t.jsx)("span",{className:"block text-xs text-pretty text-muted-foreground",children:nZ[l].hint})]}),a&&(0,t.jsx)(n.Check,{className:"size-4 shrink-0 text-brand"})]})]},l)})})})})}function n1({view:e}){let n="block h-1 max-w-full rounded-full bg-foreground/20";return(0,t.jsx)("span",{className:"flex h-24 items-center justify-center rounded-lg bg-muted",children:"center"===e?(0,t.jsxs)("span",{className:"flex flex-col items-center gap-2.5",children:[(0,t.jsx)(nc.ThursdayMark,{size:32}),(0,t.jsx)("span",{className:(0,tj.cn)(n,"w-28")})]}):(0,t.jsxs)("span",{className:"grid w-full grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-4 px-6",children:[(0,t.jsxs)("span",{className:"space-y-1.5",children:[(0,t.jsx)("span",{className:(0,tj.cn)(n,"w-24")}),(0,t.jsx)("span",{className:(0,tj.cn)(n,"w-16")})]}),(0,t.jsx)(nc.ThursdayMark,{size:32}),(0,t.jsx)("span",{children:(0,t.jsx)("span",{className:(0,tj.cn)(n,"ml-auto w-20")})})]})})}function n2({value:e,onChange:n}){return(0,t.jsxs)("div",{className:"min-w-0 space-y-3 p-4",children:[(0,t.jsx)(nL,{label:"She calls you"}),(0,t.jsx)(tq,{"aria-label":"She calls you",value:e,onValueChange:e=>n(nw.CallBackSchema.parse(e)),className:"gap-2.5",children:nw.CALL_BACK_MODES.map(e=>(0,t.jsxs)("label",{className:"flex min-w-0 items-center gap-2.5 text-sm",children:[(0,t.jsx)(t$,{value:e}),(0,t.jsx)("span",{className:"truncate",children:nw.CALL_BACK_LABEL[e]})]},e))}),(0,t.jsx)(t6.SettingNote,{children:n3[e]}),"off"!==e&&(0,t.jsx)(t6.SettingNote,{children:"Needs this tab open. It rings until you answer, decline or let it go."})]})}let n3={off:"Nothing opens a call but you.",waiting:"A job that stopped to ask gets her to ring you.",any:"Anything a bot finishes, she rings you to tell you."};function n5({value:e,onChange:n}){let r=nT(e.phrase,t=>n({...e,phrase:t}),{min:nw.WAKE_PHRASE.min,accepts:nw.isEnglishPhrase}),l=(0,nw.isEnglishPhrase)(r.value)||!r.value.trim(),a=r.value.trim().split(/\s+/).length<2;return(0,t.jsxs)("div",{className:"min-w-0 space-y-3 p-4",children:[(0,t.jsx)(nL,{label:"Wake phrase",children:(0,t.jsx)(tY.Switch,{"aria-label":"Answer to her name",checked:e.enabled,onCheckedChange:t=>n({...e,enabled:t})})}),(0,t.jsx)(tC.Input,{value:r.value,maxLength:nw.WAKE_PHRASE.max,spellCheck:!1,disabled:!e.enabled,onChange:e=>r.set(e.target.value),onBlur:r.commit,onKeyDown:r.onKeyDown,"aria-label":"Wake phrase",className:"font-mono text-sm"}),(0,t.jsx)(t6.SettingNote,{children:e.enabled?l?a?"One word will wake her by accident — say hello first.":"Heard loosely, in English. Near misses count.":"English words only — she listens for it in English.":"Between calls, the browser listens for it and picks up — Chrome by sending what it hears to Google."})]})}function n6({value:e,onChange:n}){let[r,l]=(0,d.useState)(!1),[a,s]=(0,d.useState)(!1),i=(0,nP.useHotkeyLabel)((0,nP.isCombo)(e.combo)?e.combo:null);return(0,t.jsxs)("div",{className:"min-w-0 space-y-3 p-4",children:[(0,t.jsx)(nL,{label:"Shortcut",children:(0,t.jsx)(tY.Switch,{"aria-label":"Answer to a key",checked:e.enabled,onCheckedChange:t=>n({...e,enabled:t})})}),(0,t.jsx)("button",{type:"button",...nP.HOTKEY_CAPTURE,disabled:!e.enabled,onClick:()=>{s(!1),l(!0)},onBlur:()=>l(!1),onKeyDown:r?t=>{if("Tab"===t.key)return;if(t.preventDefault(),t.stopPropagation(),"Escape"===t.key)return l(!1);let r=(0,nP.comboOf)(t.nativeEvent);if(!r)return s(!0);s(!1),l(!1),n({...e,combo:r})}:void 0,className:(0,tj.cn)("flex h-8 w-full items-center justify-center rounded-lg border px-3 font-mono text-sm outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50",r?"border-foreground/40 text-muted-foreground":"border-border/60 hover:bg-muted/50"),children:r?"Press the keys…":i??"Set a shortcut"}),(0,t.jsx)(t6.SettingNote,{children:a?"Hold Ctrl, Alt or Cmd — a plain key is typing.":r?"Esc to keep the one you have.":e.enabled?"Only while this tab has focus. Not while you are typing.":"Starts a call, and ends the one that is running."})]})}e.s(["ThursdaySetting",0,function(){let e=(0,nO.useThursdayStore)(),n=(0,nO.useThursdayStore)(e=>e.patch),{settings:r,patch:l}=(0,nA.useLiveSettings)(),{data:a=[],isLoading:s,error:i}=(0,nD.useServerRoute)(p.queryKey.llmModel);return s||!r?(0,t.jsx)(t6.SettingSkeleton,{rows:4}):i?(0,t.jsx)(t6.SettingError,{message:i.message}):(0,t.jsxs)(t6.SettingScreen,{footer:(0,t.jsx)(t6.SettingRailNote,{children:"Both of her prompts are assembled fresh on every call — memory, the roster and your skills go in. Changes here apply from the next call."}),children:[(0,t.jsx)(n0,{value:e.captionView,onChange:e=>n({captionView:e})}),(0,t.jsx)(nF,{value:r,has:e=>a.some(t=>t.apiKeyName===e&&t.hasKey),plan:a.find(e=>"chatgpt"===e.id)?.plan??null,onChange:l}),(0,t.jsx)(t6.SettingGroup,{label:"Starting a call",children:(0,t.jsxs)(nV,{columns:3,children:[(0,t.jsx)(n5,{value:e.wake,onChange:e=>n({wake:e})}),(0,t.jsx)(n6,{value:e.hotkey,onChange:e=>n({hotkey:e})}),(0,t.jsx)(n2,{value:e.callBack,onChange:e=>n({callBack:e})})]})}),(0,t.jsx)(t6.SettingGroup,{label:"Running",children:(0,t.jsx)(nX,{})}),(0,t.jsx)(t6.SettingGroup,{label:"History",children:(0,t.jsxs)(nV,{columns:2,children:[(0,t.jsx)(nd,{}),(0,t.jsx)(nJ,{})]})})]})}],59158)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94682,e=>{"use strict";var t=e.i(843476),n=e.i(24071),s=e.i(482022),r=e.i(569644),i=e.i(456420);let o={name:"images",size:24,node:[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]]};o.node;let a=(0,i.default)(o);var l=e.i(759659),c=e.i(271645),d=e.i(798120),u=e.i(167881),h=e.i(917162),f=e.i(671428),m=e.i(41533),x=e.i(95187);let p=(0,x.createServerReference)("7fc06d49cc0f30e3e74c1571897a76afd4a4491af2",x.callServer,void 0,x.findSourceMapURL,"deleteArtifactAction");var g=e.i(635963),b=e.i(853483),v=e.i(978411),j=e.i(895836),y=e.i(989409),k=e.i(83928),N=e.i(621285),S=e.i(796312),w=e.i(245629),A=e.i(609856),C=e.i(283653),T=e.i(647163);function $(e){let t=new Map;for(let n of e){let e=t.get(n.bot)??[];e.push(n),t.set(n.bot,e)}return[...t].map(([e,t])=>({bot:e,rows:t}))}function F({label:e,mark:n,count:s,active:r,onPick:i}){return(0,t.jsxs)("button",{type:"button",onClick:i,className:(0,T.cn)("mx-2 flex h-9 items-center gap-2 rounded-md px-2 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",r?(0,T.cn)(j.PICKED_ROW,"font-medium"):"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[n??(0,t.jsx)(a,{className:"size-4 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[10.5px] text-muted-foreground tabular-nums",children:s})]})}function z({row:e,file:i,onOpen:o,onBack:a,onGone:c,onShelf:f}){let[m]=(0,A.useServerAction)(S.revealFileAction),[x,g]=(0,A.useServerAction)(p,{okMessage:"Deleted",onOk:()=>{(0,C.revalidate)(d.queryKey.artifacts),i?a():c()}}),j=i?{path:i.path,bytes:i.bytes,at:i.at}:"file"===e.kind?{path:e.path,bytes:e.bytes,at:e.at}:null,{filed:k,note:$,failure:F,follow:R}=(0,b.useFileNote)(j?.path??null,null),M=e=>{y.useSettingsStore.getState().hide(),v.roomOpens.open(e)},P=async e=>{await h.notify.confirm({title:`Delete ${e.split("/").pop()}?`,description:j?"It is deleted from disk for good.":"The folder and everything in it are deleted from disk for good.",okText:"Delete",destructive:!0})&&x(e)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex h-11 shrink-0 items-center gap-3 border-b border-border/60 px-6",children:[(0,t.jsxs)("button",{type:"button",onClick:i?a:f,className:"-ml-1 flex shrink-0 items-center gap-1 rounded-md px-1.5 py-1 font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(n.ChevronLeft,{className:"size-3"}),i?e.name:"Shelf"]}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-foreground",children:j?j.path.split("/").pop()??e.name:e.name}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:j?`${(0,T.formatBytes)(j.bytes)} \xb7 ${(0,w.shortAgo)(j.at)}`:`${e.count} ${1===e.count?"file":"files"} \xb7 ${(0,w.shortAgo)(e.at)}`}),k&&(0,t.jsx)(b.FileThreadChip,{note:$,onOpen:M}),j&&(0,t.jsx)("a",{href:d.queryKey.fileView(j.path),target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",className:"grid size-7 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(s.ExternalLink,{className:"size-4"})}),(0,t.jsx)(u.Button,{size:"icon-sm",variant:"ghost","aria-label":"Reveal in the file manager",className:"text-muted-foreground",onClick:()=>m(j?.path??e.path),children:(0,t.jsx)(r.FolderOpen,{})}),(0,t.jsx)(u.Button,{size:"icon-sm",variant:"ghost","aria-label":"Delete",loading:g,className:"ml-1.5 text-muted-foreground hover:text-destructive",onClick:()=>P(j?.path??e.path),children:(0,t.jsx)(l.Trash2,{})})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:j?(0,t.jsx)(N.FilePreview,{path:j.path,bytes:j.bytes}):(0,t.jsx)(O,{path:e.path,onOpen:o})}),j&&k&&(0,t.jsx)("div",{className:"shrink-0 border-t border-border/60 px-6 pt-2.5 pb-3",children:(0,t.jsx)(b.FileNoteBar,{path:j.path,note:$,failure:F,onThread:R,onOpenThread:M})})]})}function O({path:e,onOpen:n}){let{data:s,isLoading:r,error:i}=(0,C.useServerRoute)(d.queryKey.artifactSet(e,m.ARTIFACT_VIEW.setFiles));if(r)return(0,t.jsx)("div",{className:"grid grid-cols-4 gap-3 p-5",children:Array.from({length:8},(e,n)=>(0,t.jsx)(f.Skeleton,{className:"aspect-4/3 w-full rounded-xl"},n))});if(i)return(0,t.jsx)(j.SettingError,{message:i.message});let o=s?.files??[];return 0===o.length?(0,t.jsx)("p",{className:"p-5 text-xs text-muted-foreground",children:"Nothing in here the app can open."}):(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsx)("div",{className:"grid grid-cols-4 gap-3",children:o.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>n(e),title:`${e.name} \xb7 ${(0,T.formatBytes)(e.bytes)}`,className:"flex flex-col gap-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-2",children:[(0,t.jsx)(R,{file:e}),(0,t.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:e.name})]},e.path))}),s&&s.total>o.length&&(0,t.jsx)("p",{className:"pt-4 font-mono text-[11px] text-muted-foreground",children:`${o.length} of ${s.total.toLocaleString("en")} — the rest are in the folder`})]})}function R({file:e}){return(0,t.jsx)(k.FileThumb,{path:e.path,bytes:e.bytes,glyph:"size-5",className:"aspect-4/3 w-full rounded-xl ring-1 ring-foreground/5 ring-inset"})}function M({entries:e,bots:n,onPick:s}){return(0,t.jsx)("div",{className:"space-y-7 p-6",children:$(e).map(({bot:e,rows:i})=>(0,t.jsxs)("section",{className:"space-y-3",children:[(0,t.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-medium",children:[e&&(0,t.jsx)(g.BotMark,{size:20,seed:e,...(0,g.markOf)(e,n),notify:!1,className:"shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e??"Unsorted"}),(0,t.jsx)("span",{className:"font-mono text-[11px] font-normal text-muted-foreground",children:i.length})]}),(0,t.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(9.5rem,1fr))] gap-x-4 gap-y-5",children:i.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>s(e),className:"group flex min-w-0 flex-col gap-1.5 rounded-xl text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:["set"===e.kind?(0,t.jsx)("span",{className:"grid aspect-4/3 w-full place-items-center rounded-xl bg-muted/60 text-muted-foreground transition-colors group-hover:bg-muted",children:(0,t.jsx)(r.FolderOpen,{className:"size-5"})}):(0,t.jsx)(k.FileThumb,{path:e.path,bytes:e.bytes,glyph:"size-5",className:"aspect-4/3 w-full rounded-xl ring-1 ring-foreground/5 ring-inset"}),(0,t.jsxs)("span",{className:"min-w-0 space-y-0.5 px-0.5",children:[(0,t.jsx)("span",{className:"block truncate text-[13px]",children:e.name}),(0,t.jsxs)("span",{className:"block truncate font-mono text-[10.5px] text-muted-foreground",children:["set"===e.kind?`${e.count} ${1===e.count?"file":"files"} \xb7 `:"",(0,w.shortAgo)(e.at)]})]})]},e.path))})]},e??""))})}function P({empty:e}){return(0,t.jsx)("div",{className:"p-8",children:(0,t.jsx)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:e?"Nothing finished yet. When a bot ends a job with something to hand over — a page, a report, a set of pictures — it lands here.":"Pick something on the left. Each bot's work is under its face; a folder it filled is one row, and opens as a sheet."})})}e.s(["ArtifactSetting",0,function(){let[e,n]=(0,c.useState)(null),[s,i]=(0,c.useState)(""),[o,a]=(0,c.useState)(void 0),[l,h]=(0,c.useState)(m.ARTIFACT_VIEW.rows),{data:f,isLoading:x,error:p}=(0,C.useServerRoute)(d.queryKey.artifactShelf(l),{keepPreviousData:!0}),{data:b}=(0,C.useServerRoute)(d.queryKey.bot),[v]=(0,A.useServerAction)(S.revealFileAction);if(x)return(0,t.jsx)(j.SettingPanesSkeleton,{});if(p)return(0,t.jsx)(j.SettingError,{message:p.message});let y=f?.entries??[],k=f?.total??0,N=s.trim().toLowerCase(),w=y.filter(e=>(void 0===o||e.bot===o)&&(!N||e.name.toLowerCase().includes(N)||e.bot?.toLowerCase().includes(N))),T=y.find(t=>t.path===e?.row.path)??e?.row;return(0,t.jsx)(j.SettingPanes,{footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.SettingRailNote,{children:(0,t.jsxs)("span",{className:"font-mono",children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:"finished"}),` \xb7 ${function(e,t,n){if(0===t)return"empty";let s=t>e.length?`${e.length} of ${t.toLocaleString("en")} results`:`${t} ${1===t?"result":"results"}`;return n>t?`${s} \xb7 ${n.toLocaleString("en")} files`:s}(y,k,f?.files??0)}`]})}),(0,t.jsxs)(u.Button,{variant:"outline",size:"sm",onClick:()=>v(m.PATHS.artifacts),children:[(0,t.jsx)(r.FolderOpen,{}),"Reveal folder"]})]}),left:(0,t.jsxs)("div",{className:"flex flex-col py-2",children:[(0,t.jsx)(j.SettingFilter,{value:s,onChange:i,placeholder:"Filter files",className:"mx-2 mb-1.5 w-auto"}),(0,t.jsx)(F,{label:"Everyone",count:y.length,active:void 0===o,onPick:()=>{a(void 0),n(null)}}),$(y).map(({bot:e,rows:s})=>(0,t.jsx)(F,{label:e??"Unsorted",mark:e?(0,t.jsx)(g.BotMark,{size:18,seed:e,...(0,g.markOf)(e,b),notify:!1,className:"shrink-0"}):void 0,count:s.length,active:o===e,onPick:()=>{a(e),n(null)}},e??"")),k>y.length&&(0,t.jsx)("button",{type:"button",onClick:()=>h(l+m.ARTIFACT_VIEW.rows),className:"mx-2 mt-2 rounded-md px-2 py-1.5 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:`Show ${Math.min(m.ARTIFACT_VIEW.rows,k-y.length)} more of ${k.toLocaleString("en")}`})]}),right:T?(0,t.jsx)(z,{row:T,file:e?.file??null,onOpen:e=>n({row:T,file:e}),onBack:()=>n({row:T,file:null}),onGone:()=>n(null),onShelf:()=>n(null)},T.path):w.length>0?(0,t.jsx)(M,{entries:w,bots:b,onPick:e=>n({row:e,file:null})}):(0,t.jsx)(P,{empty:0===k})})}],94682)},759659,e=>{"use strict";var t=e.i(456420);let n={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};n.node;let s=(0,t.default)(n);e.s(["Trash2",0,s],759659)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94682,e=>{"use strict";var t=e.i(843476),n=e.i(24071),s=e.i(482022),r=e.i(569644),i=e.i(456420);let o={name:"images",size:24,node:[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]]};o.node;let a=(0,i.default)(o);var l=e.i(759659),c=e.i(271645),d=e.i(798120),u=e.i(167881),h=e.i(917162),f=e.i(671428),m=e.i(41533),x=e.i(95187);let p=(0,x.createServerReference)("7f0ef6d97479e5105ff0c586f28102035e93f4810e",x.callServer,void 0,x.findSourceMapURL,"deleteArtifactAction");var g=e.i(635963),b=e.i(853483),v=e.i(978411),j=e.i(895836),y=e.i(989409),k=e.i(83928),N=e.i(621285),S=e.i(921484),w=e.i(245629),A=e.i(609856),C=e.i(283653),T=e.i(647163);function $(e){let t=new Map;for(let n of e){let e=t.get(n.bot)??[];e.push(n),t.set(n.bot,e)}return[...t].map(([e,t])=>({bot:e,rows:t}))}function F({label:e,mark:n,count:s,active:r,onPick:i}){return(0,t.jsxs)("button",{type:"button",onClick:i,className:(0,T.cn)("mx-2 flex h-9 items-center gap-2 rounded-md px-2 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",r?(0,T.cn)(j.PICKED_ROW,"font-medium"):"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[n??(0,t.jsx)(a,{className:"size-4 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[10.5px] text-muted-foreground tabular-nums",children:s})]})}function z({row:e,file:i,onOpen:o,onBack:a,onGone:c,onShelf:f}){let[m]=(0,A.useServerAction)(S.revealFileAction),[x,g]=(0,A.useServerAction)(p,{okMessage:"Deleted",onOk:()=>{(0,C.revalidate)(d.queryKey.artifacts),i?a():c()}}),j=i?{path:i.path,bytes:i.bytes,at:i.at}:"file"===e.kind?{path:e.path,bytes:e.bytes,at:e.at}:null,{filed:k,note:$,failure:F,follow:R}=(0,b.useFileNote)(j?.path??null,null),M=e=>{y.useSettingsStore.getState().hide(),v.roomOpens.open(e)},P=async e=>{await h.notify.confirm({title:`Delete ${e.split("/").pop()}?`,description:j?"It is deleted from disk for good.":"The folder and everything in it are deleted from disk for good.",okText:"Delete",destructive:!0})&&x(e)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex h-11 shrink-0 items-center gap-3 border-b border-border/60 px-6",children:[(0,t.jsxs)("button",{type:"button",onClick:i?a:f,className:"-ml-1 flex shrink-0 items-center gap-1 rounded-md px-1.5 py-1 font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(n.ChevronLeft,{className:"size-3"}),i?e.name:"Shelf"]}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-foreground",children:j?j.path.split("/").pop()??e.name:e.name}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:j?`${(0,T.formatBytes)(j.bytes)} \xb7 ${(0,w.shortAgo)(j.at)}`:`${e.count} ${1===e.count?"file":"files"} \xb7 ${(0,w.shortAgo)(e.at)}`}),k&&(0,t.jsx)(b.FileThreadChip,{note:$,onOpen:M}),j&&(0,t.jsx)("a",{href:d.queryKey.fileView(j.path),target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",className:"grid size-7 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(s.ExternalLink,{className:"size-4"})}),(0,t.jsx)(u.Button,{size:"icon-sm",variant:"ghost","aria-label":"Reveal in the file manager",className:"text-muted-foreground",onClick:()=>m(j?.path??e.path),children:(0,t.jsx)(r.FolderOpen,{})}),(0,t.jsx)(u.Button,{size:"icon-sm",variant:"ghost","aria-label":"Delete",loading:g,className:"ml-1.5 text-muted-foreground hover:text-destructive",onClick:()=>P(j?.path??e.path),children:(0,t.jsx)(l.Trash2,{})})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:j?(0,t.jsx)(N.FilePreview,{path:j.path,bytes:j.bytes}):(0,t.jsx)(O,{path:e.path,onOpen:o})}),j&&k&&(0,t.jsx)("div",{className:"shrink-0 border-t border-border/60 px-6 pt-2.5 pb-3",children:(0,t.jsx)(b.FileNoteBar,{path:j.path,note:$,failure:F,onThread:R,onOpenThread:M})})]})}function O({path:e,onOpen:n}){let{data:s,isLoading:r,error:i}=(0,C.useServerRoute)(d.queryKey.artifactSet(e,m.ARTIFACT_VIEW.setFiles));if(r)return(0,t.jsx)("div",{className:"grid grid-cols-4 gap-3 p-5",children:Array.from({length:8},(e,n)=>(0,t.jsx)(f.Skeleton,{className:"aspect-4/3 w-full rounded-xl"},n))});if(i)return(0,t.jsx)(j.SettingError,{message:i.message});let o=s?.files??[];return 0===o.length?(0,t.jsx)("p",{className:"p-5 text-xs text-muted-foreground",children:"Nothing in here the app can open."}):(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsx)("div",{className:"grid grid-cols-4 gap-3",children:o.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>n(e),title:`${e.name} \xb7 ${(0,T.formatBytes)(e.bytes)}`,className:"flex flex-col gap-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-2",children:[(0,t.jsx)(R,{file:e}),(0,t.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:e.name})]},e.path))}),s&&s.total>o.length&&(0,t.jsx)("p",{className:"pt-4 font-mono text-[11px] text-muted-foreground",children:`${o.length} of ${s.total.toLocaleString("en")} — the rest are in the folder`})]})}function R({file:e}){return(0,t.jsx)(k.FileThumb,{path:e.path,bytes:e.bytes,glyph:"size-5",className:"aspect-4/3 w-full rounded-xl ring-1 ring-foreground/5 ring-inset"})}function M({entries:e,bots:n,onPick:s}){return(0,t.jsx)("div",{className:"space-y-7 p-6",children:$(e).map(({bot:e,rows:i})=>(0,t.jsxs)("section",{className:"space-y-3",children:[(0,t.jsxs)("h3",{className:"flex items-center gap-2 text-sm font-medium",children:[e&&(0,t.jsx)(g.BotMark,{size:20,seed:e,...(0,g.markOf)(e,n),notify:!1,className:"shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e??"Unsorted"}),(0,t.jsx)("span",{className:"font-mono text-[11px] font-normal text-muted-foreground",children:i.length})]}),(0,t.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(9.5rem,1fr))] gap-x-4 gap-y-5",children:i.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>s(e),className:"group flex min-w-0 flex-col gap-1.5 rounded-xl text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:["set"===e.kind?(0,t.jsx)("span",{className:"grid aspect-4/3 w-full place-items-center rounded-xl bg-muted/60 text-muted-foreground transition-colors group-hover:bg-muted",children:(0,t.jsx)(r.FolderOpen,{className:"size-5"})}):(0,t.jsx)(k.FileThumb,{path:e.path,bytes:e.bytes,glyph:"size-5",className:"aspect-4/3 w-full rounded-xl ring-1 ring-foreground/5 ring-inset"}),(0,t.jsxs)("span",{className:"min-w-0 space-y-0.5 px-0.5",children:[(0,t.jsx)("span",{className:"block truncate text-[13px]",children:e.name}),(0,t.jsxs)("span",{className:"block truncate font-mono text-[10.5px] text-muted-foreground",children:["set"===e.kind?`${e.count} ${1===e.count?"file":"files"} \xb7 `:"",(0,w.shortAgo)(e.at)]})]})]},e.path))})]},e??""))})}function P({empty:e}){return(0,t.jsx)("div",{className:"p-8",children:(0,t.jsx)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:e?"Nothing finished yet. When a bot ends a job with something to hand over — a page, a report, a set of pictures — it lands here.":"Pick something on the left. Each bot's work is under its face; a folder it filled is one row, and opens as a sheet."})})}e.s(["ArtifactSetting",0,function(){let[e,n]=(0,c.useState)(null),[s,i]=(0,c.useState)(""),[o,a]=(0,c.useState)(void 0),[l,h]=(0,c.useState)(m.ARTIFACT_VIEW.rows),{data:f,isLoading:x,error:p}=(0,C.useServerRoute)(d.queryKey.artifactShelf(l),{keepPreviousData:!0}),{data:b}=(0,C.useServerRoute)(d.queryKey.bot),[v]=(0,A.useServerAction)(S.revealFileAction);if(x)return(0,t.jsx)(j.SettingPanesSkeleton,{});if(p)return(0,t.jsx)(j.SettingError,{message:p.message});let y=f?.entries??[],k=f?.total??0,N=s.trim().toLowerCase(),w=y.filter(e=>(void 0===o||e.bot===o)&&(!N||e.name.toLowerCase().includes(N)||e.bot?.toLowerCase().includes(N))),T=y.find(t=>t.path===e?.row.path)??e?.row;return(0,t.jsx)(j.SettingPanes,{footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.SettingRailNote,{children:(0,t.jsxs)("span",{className:"font-mono",children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:"finished"}),` \xb7 ${function(e,t,n){if(0===t)return"empty";let s=t>e.length?`${e.length} of ${t.toLocaleString("en")} results`:`${t} ${1===t?"result":"results"}`;return n>t?`${s} \xb7 ${n.toLocaleString("en")} files`:s}(y,k,f?.files??0)}`]})}),(0,t.jsxs)(u.Button,{variant:"outline",size:"sm",onClick:()=>v(m.PATHS.artifacts),children:[(0,t.jsx)(r.FolderOpen,{}),"Reveal folder"]})]}),left:(0,t.jsxs)("div",{className:"flex flex-col py-2",children:[(0,t.jsx)(j.SettingFilter,{value:s,onChange:i,placeholder:"Filter files",className:"mx-2 mb-1.5 w-auto"}),(0,t.jsx)(F,{label:"Everyone",count:y.length,active:void 0===o,onPick:()=>{a(void 0),n(null)}}),$(y).map(({bot:e,rows:s})=>(0,t.jsx)(F,{label:e??"Unsorted",mark:e?(0,t.jsx)(g.BotMark,{size:18,seed:e,...(0,g.markOf)(e,b),notify:!1,className:"shrink-0"}):void 0,count:s.length,active:o===e,onPick:()=>{a(e),n(null)}},e??"")),k>y.length&&(0,t.jsx)("button",{type:"button",onClick:()=>h(l+m.ARTIFACT_VIEW.rows),className:"mx-2 mt-2 rounded-md px-2 py-1.5 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:`Show ${Math.min(m.ARTIFACT_VIEW.rows,k-y.length)} more of ${k.toLocaleString("en")}`})]}),right:T?(0,t.jsx)(z,{row:T,file:e?.file??null,onOpen:e=>n({row:T,file:e}),onBack:()=>n({row:T,file:null}),onGone:()=>n(null),onShelf:()=>n(null)},T.path):w.length>0?(0,t.jsx)(M,{entries:w,bots:b,onPick:e=>n({row:e,file:null})}):(0,t.jsx)(P,{empty:0===k})})}],94682)},759659,e=>{"use strict";var t=e.i(456420);let n={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};n.node;let s=(0,t.default)(n);e.s(["Trash2",0,s],759659)}]);
|