limixbot 0.2.2 → 0.2.3
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/dist/assets/{ActivityPanel-BJ-KjzZQ.js → ActivityPanel-SyXMCej4.js} +1 -1
- package/dist/assets/{App-B88ABHQh.js → App-X_zk2xl3.js} +9 -9
- package/dist/assets/{AppEventEditor-C1j7B-on.js → AppEventEditor-B-cNA9KG.js} +1 -1
- package/dist/assets/{BotSettingsDialog-CVVgZ_Nc.js → BotSettingsDialog-CmheslCU.js} +1 -1
- package/dist/assets/{BrowserPanel-DD7r9HOn.js → BrowserPanel-BHNWYfsE.js} +1 -1
- package/dist/assets/{BrowserProfilesManager-D1rUYWVD.js → BrowserProfilesManager-TkQi-a3T.js} +1 -1
- package/dist/assets/{CloudAddDialog-CZhJqPdM.js → CloudAddDialog-CqMPQ-0_.js} +1 -1
- package/dist/assets/{ComputerFilesPane-B1y88sYp.js → ComputerFilesPane-C2_Khy6Z.js} +1 -1
- package/dist/assets/{ComputerPanel-DBvlrkN9.js → ComputerPanel-Zc6gSPqv.js} +2 -2
- package/dist/assets/{DataPanel-Bu3s4f1H.js → DataPanel-BQfys1jK.js} +1 -1
- package/dist/assets/{DesktopViewer-D_Tc0DtD.js → DesktopViewer-CmQvv2Qp.js} +1 -1
- package/dist/assets/{FilesView-DwGmVJUN.js → FilesView-DIvdjTfH.js} +1 -1
- package/dist/assets/{GrokMoveDialog-f1ta87oZ.js → GrokMoveDialog-ClB9Gmym.js} +1 -1
- package/dist/assets/{InspectorPanel-D0_Z99j4.js → InspectorPanel-D86H4VDB.js} +1 -1
- package/dist/assets/{KeyboardShortcutsModal-CEwkgGoB.js → KeyboardShortcutsModal--OBnvszl.js} +1 -1
- package/dist/assets/{LiveDesktop-E6f1BBs1.js → LiveDesktop-qaS7h5XB.js} +1 -1
- package/dist/assets/{LocalVmWorkspace-D6Eotsee.js → LocalVmWorkspace-B-P5zHz6.js} +1 -1
- package/dist/assets/{MacLocalControl-B3YOye-H.js → MacLocalControl-BYNcLKoB.js} +1 -1
- package/dist/assets/{MarkdownFilePreview-BLGAemwy.js → MarkdownFilePreview-DlUycNRH.js} +1 -1
- package/dist/assets/{MenuMotion-vm5ldfak.js → MenuMotion-V6wxTHIu.js} +1 -1
- package/dist/assets/{NewBotDialog-B2X4qm4R.js → NewBotDialog-oiX-W3q2.js} +1 -1
- package/dist/assets/{PhoneAppDialog-hQoVtk6q.js → PhoneAppDialog-PE1xfgqx.js} +1 -1
- package/dist/assets/{PlacesRail-0dNv7oZB.js → PlacesRail-B9RHHjvB.js} +1 -1
- package/dist/assets/{PluginsPanel-DtdtIk9h.js → PluginsPanel-DObrpruo.js} +1 -1
- package/dist/assets/{ProIntroduction-B7TckG4N.js → ProIntroduction-CC1iFzJ8.js} +1 -1
- package/dist/assets/{RemoteAgentSettingsPanel-DxXqwhrm.js → RemoteAgentSettingsPanel-BmTQFEnJ.js} +1 -1
- package/dist/assets/{RoomPanel-FwiCG8NY.js → RoomPanel-Dqe-JRuH.js} +1 -1
- package/dist/assets/{RoutinesPage-D7e6qR1n.js → RoutinesPage-DF0vugaB.js} +1 -1
- package/dist/assets/{SettingsModal-DBR7IGpo.js → SettingsModal--kx8POGb.js} +1 -1
- package/dist/assets/{ShareTeamDialog-TxtG8d2Y.js → ShareTeamDialog-CAAPet8R.js} +1 -1
- package/dist/assets/{SignedInSites-CVRfJGQY.js → SignedInSites-DMOzwYFf.js} +1 -1
- package/dist/assets/{TeamLibraryPanel-NG1mKW-M.js → TeamLibraryPanel-D4zeyxsY.js} +1 -1
- package/dist/assets/{TeamMapPage-j9euCmPt.js → TeamMapPage-DG7S7JTR.js} +1 -1
- package/dist/assets/{TriggersPage-rajjjJ3z.js → TriggersPage--3O5UVSD.js} +1 -1
- package/dist/assets/{VisibilitySection-BVTc_bLr.js → VisibilitySection-DQw13aWS.js} +1 -1
- package/dist/assets/{WebhookTrigger-Bap1eB3c.js → WebhookTrigger-D9RAfcql.js} +1 -1
- package/dist/assets/{WorksOnGrid-BH9WTY-z.js → WorksOnGrid-CviOksXp.js} +1 -1
- package/dist/assets/{abnfDiagram-YUKMZFIV-DCjLKsgc.js → abnfDiagram-YUKMZFIV-BLZgYnje.js} +1 -1
- package/dist/assets/{activity-BjR5nw9Z.js → activity-DCHcmn3c.js} +1 -1
- package/dist/assets/{architectureDiagram-47P4ROYG-DhdUk3XR.js → architectureDiagram-47P4ROYG-D0neESJD.js} +1 -1
- package/dist/assets/{blockDiagram-E7TT5TSB-CJN1G2VQ.js → blockDiagram-E7TT5TSB-CrnkLSzZ.js} +1 -1
- package/dist/assets/{c4Diagram-CRA5TL53-BfkzahxK.js → c4Diagram-CRA5TL53-D0tNc6O-.js} +1 -1
- package/dist/assets/{calendar-days-DlTxBFXF.js → calendar-days-C5I0mEXB.js} +1 -1
- package/dist/assets/channel-uYq3EMr8.js +1 -0
- package/dist/assets/{chunk-2Q5K7J3B-BwH3UOL3.js → chunk-2Q5K7J3B-DGtBJhY1.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-qo9dxZfl.js → chunk-5VM5RSS4-D5kTbdEy.js} +1 -1
- package/dist/assets/{chunk-7TKQ45FW-B_b-TvDW.js → chunk-7TKQ45FW-DaN8eX-m.js} +1 -1
- package/dist/assets/{chunk-AW2ZBBNX-DTVjfWfo.js → chunk-AW2ZBBNX-DMhIBKZU.js} +1 -1
- package/dist/assets/{chunk-FVRAUYC3-6Ej1chkf.js → chunk-FVRAUYC3-Dos86Pqk.js} +2 -2
- package/dist/assets/{chunk-HTAEGDNF-dGKAv3Ly.js → chunk-HTAEGDNF-CsLodVYj.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-Dl30Op6i.js → chunk-JWPE2WC7-6THZlDrB.js} +1 -1
- package/dist/assets/{chunk-KQW6MTUR-C7I5DprK.js → chunk-KQW6MTUR-CoD74fHy.js} +1 -1
- package/dist/assets/{chunk-XXDRQBXY-niGkH3Wm.js → chunk-XXDRQBXY-DMl-0hJf.js} +1 -1
- package/dist/assets/{classDiagram-v2-K4WV4PDN-DV3eJqTd.js → classDiagram-v2-K4WV4PDN-BscLWNpw.js} +1 -1
- package/dist/assets/{coins-DEObq6EM.js → coins-CZu-SgM9.js} +1 -1
- package/dist/assets/{core-CQuzVAof.js → core-BDlOAqLn.js} +1 -1
- package/dist/assets/{cose-bilkent-JH36ORCC-Dw675nir.js → cose-bilkent-JH36ORCC-BeKB4nW9.js} +1 -1
- package/dist/assets/{cynefin-EF2NZ3EQ-rM_Vx_Nc.js → cynefin-EF2NZ3EQ-D0aWGmzz.js} +1 -1
- package/dist/assets/{cynefinDiagram-3GCD6N5R-LQIlP8_F.js → cynefinDiagram-3GCD6N5R-4SW-h53B.js} +1 -1
- package/dist/assets/{dagre-W4DXFKR2-DIGKS0Jz.js → dagre-W4DXFKR2-DNq2AGoj.js} +1 -1
- package/dist/assets/{diagram-2UJZ2QOL-DHcKf8Wa.js → diagram-2UJZ2QOL-lSLAkRD3.js} +1 -1
- package/dist/assets/{diagram-OVF4WLC6-CaakNCyA.js → diagram-OVF4WLC6-BHf__HqF.js} +1 -1
- package/dist/assets/{diagram-PFPMY2P6-BQTgTfVh.js → diagram-PFPMY2P6-B5YmPbc0.js} +1 -1
- package/dist/assets/{diagram-UMYRVEAY-Dz4tiefj.js → diagram-UMYRVEAY-DdOUcYJA.js} +1 -1
- package/dist/assets/{diagram-YEKJPTXX-4K0yWjUe.js → diagram-YEKJPTXX-r41O-hkk.js} +1 -1
- package/dist/assets/{diagram-ZIFT7M5P-rWWlZtci.js → diagram-ZIFT7M5P-DKV_3_Sr.js} +1 -1
- package/dist/assets/{ebnfDiagram-VR2GEFS7-QPG43w9u.js → ebnfDiagram-VR2GEFS7-CD4xgv0O.js} +1 -1
- package/dist/assets/{elk-IJKZMXRS-hRSqsqP_.js → elk-IJKZMXRS-D0Vwqj3g.js} +1 -1
- package/dist/assets/{erDiagram-O2IAPWRE-V8e4toBc.js → erDiagram-O2IAPWRE-C388tpIL.js} +1 -1
- package/dist/assets/{file-up-DY1vL6py.js → file-up-DGhlT3MD.js} +1 -1
- package/dist/assets/{flowDiagram-OXPTDLAJ-Cz7Ay48V.js → flowDiagram-OXPTDLAJ-B1p6s4tu.js} +1 -1
- package/dist/assets/{ganttDiagram-R7TSEDQI-CI6nugxH.js → ganttDiagram-R7TSEDQI-BzJAoXbd.js} +1 -1
- package/dist/assets/{gitGraphDiagram-XJZIOB7I-BjtDxt_s.js → gitGraphDiagram-XJZIOB7I-Bb3SHitI.js} +1 -1
- package/dist/assets/{import-name-DqzojGXy.js → import-name-B7AGian6.js} +1 -1
- package/dist/assets/{index-BfUxIMI-.js → index-C-EiNxm_.js} +1 -1
- package/dist/assets/{index-BjLGGSd_.js → index-CmUdQ2of.js} +1 -1
- package/dist/assets/{index-BiSZ69F2.js → index-DJPPxxyF.js} +2 -2
- package/dist/assets/{infoDiagram-5W2HQ5XZ-B7kSPI8x.js → infoDiagram-5W2HQ5XZ-DUF-NVrB.js} +1 -1
- package/dist/assets/{ishikawaDiagram-K3B6WC7H-B80aI5uW.js → ishikawaDiagram-K3B6WC7H-CITswxnS.js} +1 -1
- package/dist/assets/{journeyDiagram-COXZFDF6-CjxmU5O_.js → journeyDiagram-COXZFDF6-C8xhr3tj.js} +1 -1
- package/dist/assets/{kanban-definition-P3RFRI5V-BIU0Q11m.js → kanban-definition-P3RFRI5V-C94FCxQq.js} +1 -1
- package/dist/assets/{mcp-servers-LGwHCvUp.js → mcp-servers-Cu4E6BBW.js} +1 -1
- package/dist/assets/{mermaid.core-C9748YDA.js → mermaid.core-5_WMXhyJ.js} +4 -4
- package/dist/assets/{mindmap-definition-LZFPQGKD-C_QDmkR_.js → mindmap-definition-LZFPQGKD-Dgq8HUHz.js} +1 -1
- package/dist/assets/{minimize-DxmLA74X.js → minimize-C8Om8qhk.js} +1 -1
- package/dist/assets/{monitor-saVltJVe.js → monitor-DUEBF6Jm.js} +1 -1
- package/dist/assets/{new-bot-BdMgVWOM.js → new-bot-DKmgM4tN.js} +1 -1
- package/dist/assets/{org-library-DWY9-OyC.js → org-library-BqY2D4NK.js} +1 -1
- package/dist/assets/{package-format-CqLquC8E.js → package-format-BZOfdy7w.js} +1 -1
- package/dist/assets/{pegDiagram-BGZESJAR-CWQyllhq.js → pegDiagram-BGZESJAR-DM0SAjez.js} +1 -1
- package/dist/assets/{pieDiagram-CAPJLFHJ-BXx9zdy3.js → pieDiagram-CAPJLFHJ-okeIqCL5.js} +1 -1
- package/dist/assets/{quadrantDiagram-GDMTTRAM-CT3VU9ss.js → quadrantDiagram-GDMTTRAM-ihMGhHs3.js} +1 -1
- package/dist/assets/{rail-DDUwvn54.js → rail-JcqaOG9e.js} +1 -1
- package/dist/assets/{railroadDiagram-SM67HX2B-DsZVUfT9.js → railroadDiagram-SM67HX2B-CkWYP-ib.js} +1 -1
- package/dist/assets/{remote-desktop-panel-B-L_Sc4G.js → remote-desktop-panel-ij2w_JZy.js} +1 -1
- package/dist/assets/{requirementDiagram-X7JNWC4A-DieBBfKD.js → requirementDiagram-X7JNWC4A-CSZ3nQJ1.js} +1 -1
- package/dist/assets/{sankeyDiagram-UM26HJRW-D1n5IJ1M.js → sankeyDiagram-UM26HJRW-RL7DTxjH.js} +1 -1
- package/dist/assets/{sequenceDiagram-ZO4K6R2Y-Cn7_MLcn.js → sequenceDiagram-ZO4K6R2Y-C6MjuYtv.js} +1 -1
- package/dist/assets/{sizeCapture-INFHLROL-BCwe4Nln.js → sizeCapture-INFHLROL-QtHNQM-7.js} +1 -1
- package/dist/assets/{stateDiagram-v2-TBUQTH76-Dpy7t5Eb.js → stateDiagram-v2-TBUQTH76-CwPZ7nQm.js} +1 -1
- package/dist/assets/{styles-Df9bbQa1.js → styles-Bj-lDRZL.js} +1 -1
- package/dist/assets/{swimlanes-N4OXWK64-CAY2xzWw.js → swimlanes-N4OXWK64-BfcwKeNi.js} +1 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-D3m_eGXn.js +8 -0
- package/dist/assets/{team-share-B5XghBFg.js → team-share-BQnZfIPS.js} +1 -1
- package/dist/assets/{timeline-definition-YOQAKGHF-ClPw93T0.js → timeline-definition-YOQAKGHF-COZpJ85U.js} +1 -1
- package/dist/assets/{usecaseDiagram-VIAY4XPW-Bodg7BA2.js → usecaseDiagram-VIAY4XPW-B6vldE5m.js} +1 -1
- package/dist/assets/{vennDiagram-BLWOH2XV-jHU0_O9m.js → vennDiagram-BLWOH2XV-Cmgzf72_.js} +1 -1
- package/dist/assets/{wardleyDiagram-YMQ3BMBF-Bqb5Ov5q.js → wardleyDiagram-YMQ3BMBF-XlosqW3x.js} +1 -1
- package/dist/assets/{xychartDiagram-TAQBALBS-cNVR4g0S.js → xychartDiagram-TAQBALBS-Byro5SJm.js} +1 -1
- package/dist/index.html +2 -2
- package/dist/rail.html +4 -4
- package/dist-server/index.js +1 -1
- package/dist-server/package.json +1 -1
- package/dist-server/server/brand.js +1 -1
- package/package.json +1 -1
- package/dist/assets/channel-BAivii3N.js +0 -1
- package/dist/assets/swimlanesDiagram-K3J5GTZL-25FmnC_u.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as r1,t as f,j as a,M as Me,aF as se,O as i1,a2 as ve,aG as ie,$ as We,a as D,f as B2,U as Kt,T as Gt,Q as Wo,aH as Ho,al as Vo,r as m,X as L2,ac as Jo,ae as Ko,aw as F2,a5 as U2,aI as Go,e as Yo,R as An,aJ as qo,aK as Xo,aL as Qo,aM as es,aN as ts,aj as ns,aO as rs,aP as os,K as O1,a0 as ss,Z as is,aQ as rt,u as Nn,V as as,aR as cs,L as ot,g as W2,aS as ls,aT as kt,aU as H2,aV as h1,aW as us,am as ds,S as fs,aa as ps,aX as V2,aY as hs,b as Cs,aZ as ms,a_ as gs,a$ as bs}from"./styles-Df9bbQa1.js";import{M as ys}from"./monitor-saVltJVe.js";const xs=[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]],vs=r1("audio-lines",xs);const ks=[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],ws=r1("building-2",ks);const _s=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],Ss=r1("cloud-upload",_s);const js=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Ms=r1("copy",js);const As=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Ns=r1("ellipsis",As);const Es=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Yt=r1("external-link",Es);const zs=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],Zs=r1("hard-drive",zs);const Os=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],Is=r1("house",Os);const Ps=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],x1=r1("loader-circle",Ps);const Ts=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],J2=r1("lock",Ts);const $s=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Rs=r1("log-out",$s);const Ds=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Bs=r1("moon",Ds);const Ls=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],K2=r1("plus",Ls);const Fs=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],Us=r1("power",Fs);const Ws=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],G2=r1("server",Ws);const Hs=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],Vs=r1("smartphone",Hs);const Js=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],Ks=r1("timer",Js);const Gs=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],qt=r1("user-round",Gs),E1=8,Ys=new Set(["sso","two-factor","browser"]);function qs(e,t){switch(e){case"invalid-email":return f("cloudBuy.signIn.invalidEmail");case"rate-limited":return f("cloudBuy.signIn.rateLimited");case"wrong-code":return t===1?f("cloudBuy.signIn.wrongCodeOne"):f("cloudBuy.signIn.wrongCode",{count:t??0});case"expired":return f("cloudBuy.signIn.expired");case"signup-closed":return f("cloudBuy.signIn.signupClosed");case"device-limit":return f("cloudBuy.signIn.deviceLimit");case"sso":return f("cloudBuy.signIn.sso");case"two-factor":return f("cloudBuy.signIn.twoFactor");case"browser":return f("cloudBuy.signIn.browser");case"failed":return f("cloudBuy.signIn.failed")}}function de(e){return e.replace(/\D/g,"").slice(0,E1)}const Xs=e=>{const t=Math.max(0,Math.ceil(e/1e3));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`};function Qs({phase:e,email:t,code:n,profileEmail:r,busy:o,now:s,onBack:i,onEmail:c,onSend:l,onChangeEmail:u,onCode:d,onResend:p,onBrowser:h}){const C=e.step==="done"?null:e.problem,g=C!==null&&Ys.has(C),y=e.intent?f("cloudBuy.signIn.title"):f("cloudBuy.signIn.titlePlain"),x=(w,v)=>w.parentElement?.querySelectorAll("input")[v]?.focus(),k=(w,v,z)=>{const O=de(v);if(O.length>1){d(de(n.slice(0,w)+O)),x(z,Math.min(E1-1,w+O.length));return}const Z=(n.slice(0,w)+O+n.slice(w+1)).slice(0,E1);d(de(Z)),O&&w<E1-1&&x(z,w+1)},_=w=>v=>{v.key==="Backspace"&&!n[w]&&w>0?(v.preventDefault(),d(n.slice(0,w-1)),x(v.currentTarget,w-1)):v.key==="ArrowLeft"&&w>0?(v.preventDefault(),x(v.currentTarget,w-1)):v.key==="ArrowRight"&&w<E1-1&&(v.preventDefault(),x(v.currentTarget,w+1))},j=w=>{const v=de(w.clipboardData.getData("text"));v&&(w.preventDefault(),d(v),x(w.currentTarget,Math.min(E1-1,v.length)))},A=w=>{w.preventDefault(),o||l()};return a.jsxs("div",{"data-cloud-add":`sign-in-${e.step}`,className:Me,children:[a.jsxs("div",{className:"flex flex-col gap-3",children:[a.jsx(se,{label:f("cloudBuy.back"),onClick:i}),a.jsx(i1,{title:y,sub:f("cloudBuy.signIn.sub")})]}),e.step==="email"&&a.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:A,noValidate:!0,children:[a.jsx("label",{htmlFor:"cloud-add-email",className:"text-[13px] leading-[18px] text-ink-secondary",children:f("cloudBuy.signIn.email")}),a.jsx("input",{id:"cloud-add-email","data-autofocus":!0,type:"email",autoComplete:"email",inputMode:"email",spellCheck:!1,value:t,disabled:o,"aria-invalid":C==="invalid-email"||void 0,"aria-describedby":C?"cloud-add-problem":void 0,onChange:w=>c(w.target.value),className:ve}),a.jsxs("button",{type:"submit",className:`${ie} mt-2`,disabled:o||!t.trim(),children:[o&&a.jsx(x1,{size:16,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudBuy.signIn.send")]}),r&&t.trim().toLowerCase()===r.trim().toLowerCase()&&a.jsx("p",{className:"text-[13px] leading-[18px] text-ink-tertiary",children:f("cloudBuy.signIn.fromProfile")})]}),e.step==="code"&&a.jsxs("div",{className:"flex flex-col gap-2.5",children:[a.jsxs("p",{id:"cloud-add-code-label",className:"text-[13px] leading-[18px] text-ink-secondary",children:[f("cloudBuy.signIn.codeLabel",{email:e.email})," · ",a.jsx("button",{type:"button",className:We,disabled:o,onClick:u,children:f("cloudBuy.signIn.change")})]}),a.jsx("div",{role:"group","aria-labelledby":"cloud-add-code-label",className:"grid grid-cols-8 gap-1.5",dir:"ltr",children:Array.from({length:E1},(w,v)=>a.jsx("input",{"data-autofocus":v===Math.min(n.length,E1-1)||void 0,value:n[v]??"",inputMode:"numeric",pattern:"[0-9]*",maxLength:E1,autoComplete:v===0?"one-time-code":"off","aria-label":f("cloudBuy.signIn.digit",{n:v+1}),disabled:o,"aria-invalid":C==="wrong-code"||void 0,"aria-describedby":C?"cloud-add-problem":void 0,onChange:z=>k(v,z.target.value,z.currentTarget),onKeyDown:_(v),onPaste:j,onFocus:z=>z.currentTarget.select(),className:D(ve,"h-11 min-w-0 px-0 text-center text-[20px] font-medium tabular-nums")},v))}),e.signupOpen===!1&&a.jsx("p",{"data-cloud-signup-closed":!0,className:"text-[13px] leading-[18px] text-ink-secondary",children:f("cloudBuy.signIn.signupClosedNote")}),a.jsx("div",{className:"flex min-h-6 items-center justify-between gap-3 text-[13px] text-ink-tertiary",children:o?a.jsxs("span",{role:"status",className:"inline-flex items-center gap-1.5",children:[a.jsx(x1,{size:13,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudBuy.signIn.checking")]}):e.resendAt>s?a.jsx("span",{children:f("cloudBuy.signIn.resendIn",{time:Xs(e.resendAt-s)})}):a.jsx("button",{type:"button",className:We,onClick:p,children:f("cloudBuy.signIn.resend")})})]}),e.step==="done"&&a.jsxs("p",{role:"status",className:"flex items-center gap-2 text-[14px] leading-5 text-ink",children:[a.jsx("span",{"aria-hidden":"true",className:"grid size-5 shrink-0 place-items-center rounded-full bg-ink text-app",children:a.jsx(B2,{size:12,strokeWidth:2.4})}),e.intent?f("cloudBuy.signIn.done"):f("cloudBuy.signIn.donePlain")]}),C&&a.jsxs("div",{id:"cloud-add-problem",role:"alert",className:"flex flex-col items-start gap-3 rounded-[12px] bg-ink/[0.04] px-4 py-3 text-[13px] leading-[18px] text-ink",children:[a.jsx("p",{children:qs(C,e.step==="code"?e.triesLeft:null)}),g&&a.jsxs("button",{type:"button",className:Kt,onClick:h,children:[f("cloudBuy.signIn.continueBrowser"),a.jsx(Yt,{size:14,"aria-hidden":"true"})]}),C==="expired"&&e.step==="code"&&a.jsx("button",{type:"button",className:Gt,disabled:o,onClick:p,children:f("cloudBuy.signIn.newCode")})]}),e.step!=="done"&&!g&&a.jsxs("p",{className:"text-[13px] leading-[18px] text-ink-tertiary",children:[f("cloudBuy.signIn.ssoHint")," ",a.jsx("button",{type:"button",className:We,onClick:h,children:f("cloudBuy.signIn.continueBrowser")})]})]})}function r7({code:e,checkout:t,trial:n,busy:r,onReopen:o,onCancel:s}){return a.jsxs("div",{"data-cloud-add":"signing-in",className:Me,children:[a.jsx(i1,{title:f("cloudAdd.browserTitle")}),e?a.jsxs("ol",{className:"flex list-decimal flex-col gap-1.5 ps-5 text-[14px] leading-5 text-ink marker:text-ink-tertiary",children:[a.jsx("li",{children:f("cloudAdd.signInStep1")}),a.jsxs("li",{children:[f("cloudAccount.codeCheck"),a.jsx("code",{dir:"ltr",className:"mt-1.5 block w-fit select-all rounded-[8px] bg-ink/[0.05] px-3 py-1.5 font-mono text-[17px] font-medium tracking-[0.12em]",children:e})]}),a.jsx("li",{children:f(t?n?"cloudAdd.signInStep3Trial":"cloudAdd.signInStep3":"cloudAdd.signInStep3Connect")})]}):a.jsxs("p",{role:"status",className:"flex items-center gap-2 text-[13px] text-ink-secondary",children:[a.jsx(x1,{size:14,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudAdd.opening")]}),a.jsxs("div",{className:Wo,children:[a.jsx("button",{type:"button",className:Gt,disabled:r,onClick:s,children:f("cloudAdd.cancel")}),a.jsxs("button",{type:"button",className:Kt,disabled:r||!e,onClick:o,children:[f("cloudAdd.reopenBrowser"),a.jsx(Yt,{size:14,"aria-hidden":"true"})]})]})]})}var Y2=Ho();const o7=Vo(Y2);let ei=0;const fe=[],wt=m.createContext(null),ti=()=>()=>{};function q2({modal:e=!1,children:t}){const[n]=m.useState(()=>++ei);m.useLayoutEffect(()=>{if(e)return fe.push(n),fe.sort((i,c)=>i-c),()=>{fe.splice(fe.indexOf(n),1)}},[e,n]);const r=m.useContext(wt),o=m.useSyncExternalStore(ti,()=>!1,()=>!0),s=a.jsx(wt.Provider,{value:e?n:r,children:t});return o?s:Y2.createPortal(s,document.body)}function ni(){const e=m.useContext(wt);return m.useCallback(()=>e===null||fe.at(-1)===e,[e])}const ri="a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]";function oi(e,t){const n=m.useRef(t);n.current=t,m.useEffect(()=>{const r=e.current;if(!r)return;const o=document.activeElement instanceof HTMLElement?document.activeElement:null;r.contains(document.activeElement)||r.focus();const s=()=>Array.from(r.querySelectorAll(ri)).filter(c=>c.getAttribute("tabindex")!=="-1"&&!c.closest("[hidden], [inert]")),i=c=>{if(c.defaultPrevented)return;if(c.key==="Escape"){c.preventDefault(),c.stopPropagation(),n.current();return}if(c.key!=="Tab")return;const l=s();if(!l.length)return c.preventDefault();const u=l[0],d=l[l.length-1];c.shiftKey&&(document.activeElement===u||!r.contains(document.activeElement)||document.activeElement===r)?(c.preventDefault(),d.focus()):!c.shiftKey&&document.activeElement===d&&(c.preventDefault(),u.focus())};return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i),o?.focus()}},[e])}function Xt(e){switch(e.outcome){case"moving":return f("accounts.moving");case"gone":return f("accounts.gone");case"failed":return f("accounts.failed");default:return null}}function s7(){const e=window.ogb?.remoteClient?.active?void 0:window.ogb?.accounts,t=window.ogb?.accountSheet,n=window.ogb?.app?.ownPage===!0&&!!e,r=F2(),[o,s]=m.useState(null),[i,c]=m.useState(!1),[l,u]=m.useState(null);return m.useEffect(()=>{if(!n)return;const d=()=>{e.list().then(s).catch(()=>{})};return d(),e.onChanged(d)},[n,e]),m.useEffect(()=>{if(n||!t)return;let d=!0;return t.offered().then(p=>{d&&c(p===!0)}).catch(()=>{}),()=>{d=!1}},[n,t]),{view:n?o:null,openSheet:!n&&i&&t?()=>{t.open().catch(()=>{})}:null,noRail:!r.beside&&!r.places.length,signOut:d=>{e?.signOut(d).then(p=>{s(p.view);const h=Xt(p);h&&u({email:null,note:h})}).catch(()=>u({email:null,note:f("accounts.failed")}))},add:d=>u({email:d??"",note:null}),sheet:l,closeSheet:()=>u(null)}}function i7(e){return f(e&&!e.active?"accounts.signIn":"settings.section.cloudAccount")}function a7({view:e,openSheet:t,noRail:n,signOut:r,add:o}){if(t)return[{key:"accounts-sheet",label:f("accounts.manage"),icon:a.jsx(qt,{size:18}),onSelect:t}];const s=e?.active;return s?[{key:"accounts-active",heading:f("accounts.heading"),label:s.email,title:s.email,checked:!0,icon:a.jsx(B2,{size:18}),disabled:!s.signIn,...s.signIn?{subtitle:f("accounts.needsSignIn")}:{},onSelect:()=>{s.signIn&&o(s.email)}},...n?[{key:"accounts-add",label:f("accounts.add"),icon:a.jsx(K2,{size:18}),onSelect:()=>o()}]:[],{key:"accounts-sign-out",label:f("accounts.signOut"),icon:a.jsx(Rs,{size:18}),onSelect:()=>r(s.id)}]:[]}const En={step:"email",intent:!1,problem:null};function si({start:e,onDone:t,onBack:n}){const r=window.ogb?.accounts,[o,s]=m.useState(En),[i,c]=m.useState(e),[l,u]=m.useState(""),[d,p]=m.useState(!1),[h,C]=m.useState(!1),[g,y]=m.useState(Date.now());m.useEffect(()=>{const _=setInterval(()=>y(Date.now()),1e3);return()=>clearInterval(_)},[]),m.useEffect(()=>()=>{r?.addCancel().catch(()=>{})},[r]);const x=()=>{d||!r||(p(!0),r.addStart(i).then(_=>{_.outcome==="sent"?(s({step:"code",intent:!1,email:_.email,resendAt:_.resendAt,problem:null,triesLeft:null,..._.signupOpen===!1?{signupOpen:!1}:{}}),u("")):s({step:"email",intent:!1,problem:_.outcome})},()=>s({step:"email",intent:!1,problem:"failed"})).finally(()=>p(!1)))},k=_=>{if(!r||o.step!=="code")return;const j=o;p(!0),r.addVerify(_).then(A=>{A.outcome==="switched"?t(null):A.outcome==="added"?t(f("accounts.added",{email:A.email??i})):A.outcome==="already"?t(f("accounts.already",{email:A.email??i})):(u(""),s({...j,problem:A.outcome,triesLeft:A.outcome==="wrong-code"?A.triesLeft:null}))},()=>s({...j,problem:"failed",triesLeft:null})).finally(()=>p(!1))};return m.useEffect(()=>{if(!h||!r)return;const _=()=>{r.addResult().then(j=>{j&&(j.outcome==="switched"?t(null):j.outcome==="added"?t(f("accounts.added",{email:j.email??i})):j.outcome==="already"?t(f("accounts.already",{email:j.email??i})):(C(!1),s({step:"email",intent:!1,problem:"failed"})))}).catch(()=>{})};return _(),r.onChanged(_)},[h,r,t,i]),h?a.jsxs("div",{"data-accounts-browser":!0,className:Me,children:[a.jsx(i1,{title:f("accounts.browserTitle"),sub:f("accounts.browserBody")}),a.jsx("button",{type:"button",className:Gt,onClick:()=>{r?.addReopen().catch(()=>{})},children:f("accounts.browserOpen")})]}):a.jsx(Qs,{phase:o,email:i,code:l,profileEmail:null,busy:d,now:g,onBack:n,onEmail:c,onSend:x,onChangeEmail:()=>{s(En),r?.addCancel().catch(()=>{})},onCode:_=>{const j=de(_);u(j),j.length===8&&!d&&k(j)},onResend:x,onBrowser:()=>{p(!0),r?.addBrowser().then(_=>{_.outcome==="browser"?C(!0):s({step:"email",intent:!1,problem:"failed"})},()=>s({step:"email",intent:!1,problem:"failed"})).finally(()=>p(!1))}})}function ii({onClose:e,adding:t=null,note:n=null}){const r=window.ogb?.accounts,[o,s]=m.useState(null),[i,c]=m.useState(n),[l,u]=m.useState(t);m.useEffect(()=>{if(!r)return;const C=()=>{r.list().then(s).catch(()=>c(f("accounts.failed")))};return C(),r.onChanged(C)},[r]);const d=C=>{c(null),r?.signOut(C).then(g=>{s(g.view);const y=Xt(g);y?c(y):e()},()=>c(f("accounts.failed")))},p=o?.active??null,h=m.useRef(null);return oi(h,e),a.jsx(q2,{modal:!0,children:a.jsx("div",{className:"ui-scrim fixed inset-0 z-[60] flex items-center justify-center p-4",onMouseDown:C=>C.target===C.currentTarget&&e(),children:a.jsxs("div",{ref:h,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":"cloud-add-title","data-accounts-sheet":!0,className:D(Ko,"relative w-full max-w-[420px] outline-none"),children:[a.jsx("button",{type:"button",onClick:e,"aria-label":f("accounts.close"),className:D(Jo,"absolute end-4 top-4 z-10"),children:a.jsx(L2,{size:16})}),l!==null?a.jsx(si,{start:l,onBack:()=>t!==null?e():u(null),onDone:C=>{u(null),C?c(C):e()}}):a.jsxs("div",{className:Me,children:[a.jsx(i1,{title:f("accounts.title")}),p&&!n&&a.jsxs("p",{"data-accounts-active":!0,className:"truncate text-[14px] text-ink",title:p.email,children:[f("accounts.heading")," ",p.email]}),i&&a.jsx("p",{role:"status","data-accounts-note":!0,className:"text-[13px] leading-5 text-ink-secondary",children:i}),p&&!n&&a.jsx("button",{type:"button","data-accounts-sign-out":!0,className:Kt,onClick:()=>d(p.id),children:f("accounts.signOut")})]})]})})})}function c7(){const e=window.ogb?.accounts,[t,n]=m.useState(!1);return m.useEffect(()=>{if(e)return e.sheetPending().then(r=>{r&&n(!0)}).catch(()=>{}),e.onOpenSheet(()=>n(!0))},[e]),m.useEffect(()=>{t&&window.ogb?.rail?.expand?.(!0)?.catch(()=>{})},[t]),{open:t,close:()=>{n(!1),window.ogb?.rail?.expand?.(!1)?.catch(()=>{}),e?.sheetClosed().catch(()=>{})}}}const me={host:{platform:"other",label:"Browser",session:"unknown",packaged:!1},windowChrome:"native",screenPreview:{available:!1,interaction:"none",reasonCode:"desktop-app-required"},dictation:{available:!1,engine:"none",onDevice:!1,reasonCode:"desktop-app-required"},localComputer:{available:!1,support:"unsupported",enabled:!1,status:"unavailable",reasonCode:"desktop-app-required"}};let D1=null,_t=0;function Qt(){const e=typeof window>"u"?void 0:window.ogb?.platform;if(!e)return me;const t=e==="darwin",n=e==="win32"||e==="linux",r={available:t||n,engine:t?"apple-speech":n?"fish-audio":"none",onDevice:t};return r.available||(r.reasonCode="unsupported-platform"),{...me,host:{...me.host,platform:e==="darwin"||e==="linux"||e==="win32"?e:"other",label:e==="darwin"?"macOS":e==="linux"?"Linux":e==="win32"?"Windows":"Desktop"},windowChrome:t?"mac-inset":e==="win32"?"win-caption":"native",dictation:r}}async function ai(){if(D1)return D1;if(!window.ogb?.getCapabilities)return me;const e=_t;let t;try{t=await window.ogb.getCapabilities()}catch{t=me}return _t!==e&&D1||(D1=t),D1}function l7(){return D1??Qt()}function ci(e){return _t+=1,D1=e,e}function u7(){return typeof window>"u"||window.ogb?.remoteClient?.active?void 0:window.ogb?.approvals}const X2=m.createContext({capabilities:Qt(),ready:typeof window>"u"||!window.ogb});function d7({children:e}){const[t,n]=m.useState(()=>({capabilities:Qt(),ready:typeof window>"u"||!window.ogb}));return m.useEffect(()=>{let r=!0,o=0;const s=window.ogb?.onCapabilitiesChanged?.(c=>{o+=1,r&&n({capabilities:ci(c),ready:!0})}),i=o;return ai().then(c=>{r&&o===i&&n({capabilities:c,ready:!0})}),()=>{r=!1,s?.()}},[]),a.jsx(X2.Provider,{value:t,children:e})}function Q2(){return m.useContext(X2)}function li(){const{capabilities:e}=Q2();return pi(e.windowChrome)}const zn={WebkitAppRegion:"drag"},ui={WebkitAppRegion:"no-drag"};function di(e){return e?.windowChrome==="mac-inset"||e?.windowChrome==="win-caption"}function fi(e){return di(e)&&e?.windowFrame!==!1}function pi(e){const t=e==="win-caption",n=t||e==="mac-inset";return{windowsCaption:t,draggable:n,dragProps:n?{"data-window-drag":"",style:zn}:{},dragStyle:n?zn:void 0,noDragStyle:n?ui:void 0}}function f7(){const{dragProps:e}=li();return e.style?a.jsx("div",{"aria-hidden":!0,"data-window-drag-strip":!0,...e,className:"pointer-events-none absolute inset-x-0 top-0 h-[52px]"}):null}function hi(e,t,n=Date.now()){const r=Math.max(0,Math.round((n-e)/1e3)),o=new Intl.RelativeTimeFormat(t,{numeric:"auto"});if(r<45)return o.format(0,"second");const s=Math.round(r/60);if(s<60)return o.format(-s,"minute");const i=Math.round(s/60);if(i<24)return o.format(-i,"hour");const c=Math.round(i/24);return c<7?o.format(-c,"day"):new Date(e).toLocaleDateString(t,{month:"short",day:"numeric"})}let ke=null,Zn=!1;const St=new Set,st=()=>typeof window>"u"?void 0:window.ogb?.rail;function ee(e){ke=e;for(const t of St)t(ke)}function Ci(){const e=st();Zn||!e?.state||(Zn=!0,e.onState?.(ee),e.state().then(ee,()=>ee(null)))}function p7(){const[e,t]=m.useState(ke);return m.useEffect(()=>(St.add(t),Ci(),t(ke),()=>{St.delete(t)}),[]),e}function mi(){const[e,t]=m.useState(!0);return m.useEffect(()=>st()?.onFramed?.(t),[]),e}function h7(e=!0){st()?.drawsFrame?.(e)?.catch(()=>{})}function C7(e){const t=st(),n=ke;!t?.setHidden||!n||(ee({...n,hidden:e}),t.setHidden(e).then(ee,()=>ee(n)))}const en="popover-surface flex flex-col gap-1 rounded-[var(--radius-menu)] border border-hairline/50 bg-menu p-1.5 shadow-lg [&_svg.lucide]:stroke-[1.5]",m7="flex min-h-[30px] w-full shrink-0 items-center gap-2 whitespace-nowrap rounded-md px-2 py-1.5 text-left text-[14px] leading-[18px] focus-visible:bg-menu-hover",g7="mx-1.5 h-px shrink-0 bg-hairline/50",b7="px-2 pb-1 pt-2 text-[12px] font-medium leading-4 text-ink-secondary",Ae="group flex h-[30px] w-full min-w-0 shrink-0 items-center gap-2 rounded-md px-2 text-left text-[13px] leading-[18px] text-ink hover:bg-ink/[0.06] focus:bg-ink/[0.06] active:bg-ink/[0.08] disabled:cursor-default disabled:opacity-50 disabled:hover:bg-transparent touch:h-10",y7="group flex min-h-[30px] w-full min-w-0 shrink-0 items-center gap-2 rounded-md px-2 py-1 text-left text-[13px] leading-[18px] text-ink hover:bg-ink/[0.06] focus:bg-ink/[0.06] active:bg-ink/[0.08] disabled:cursor-default disabled:opacity-50 disabled:hover:bg-transparent touch:min-h-10",x7="min-w-0 max-w-full truncate text-[12px] leading-4 text-ink-tertiary",v7="flex h-[30px] w-full min-w-0 shrink-0 items-center gap-2 px-2 text-[13px] leading-[18px] touch:h-10",k7="flex size-4 shrink-0 items-center justify-center",w7="min-w-0 max-w-[45%] shrink truncate text-[12px] leading-4 text-ink-tertiary",_7="flex h-6 shrink-0 items-end gap-2 px-2 pb-0.5 text-[12px] font-medium leading-4 text-ink-tertiary",S7="mx-2 my-[5px] h-[0.5px] shrink-0 bg-ink/10",j7="px-2 py-1 text-[12px] leading-4 text-ink-tertiary",M7="shrink-0 text-ink-secondary",A7="shrink-0 text-ink-tertiary rtl:-scale-x-100",N7=1.75,gi=Object.freeze({empty:"native.connect.empty",codeOnly:"native.connect.codeOnly",emailCode:"native.connect.emailCode",oldCode:"native.connect.oldCode",scriptKey:"native.connect.scriptKey",notACode:"native.connect.notACode",publicHttp:"native.connect.publicHttp",phoneLink:"native.connect.phoneLink",notAnAddress:"native.connect.notAnAddress",unreachable:"native.connect.unreachable",dns:"native.connect.dns",certificate:"native.connect.certificate",notMausBot:"native.connect.notMausBot",desktopApp:"native.connect.desktopApp",desktopAppTailnet:"native.connect.desktopAppTailnet",loopback:"native.connect.loopback",localNetwork:"native.connect.localNetwork",tailscaleOff:"native.connect.tailscaleOff",otherTailnet:"native.connect.otherTailnet",tailnetBlocked:"native.connect.tailnetBlocked",tailnetSilent:"native.connect.tailnetSilent"}),tn=40,er={blue:"blue",green:"teal",amber:"yellow",rose:"red",violet:"purple",slate:null};function it(e){const t=er[e];return t?U2(t):"var(--color-raised)"}const jt={blue:"cloudBuy.color.blue",green:"cloudBuy.color.teal",amber:"cloudBuy.color.yellow",rose:"cloudBuy.color.red",violet:"cloudBuy.color.purple",slate:"cloudBuy.color.slate"},B1=Object.keys(jt),tr="blue";function bi(e,{now:t,tier:n=null,failed:r=!1,stop:o=null}){if(e===void 0)return{kind:"checking"};if(e===null)return{kind:"unreachable"};if(!e.signedIn||!e.hasCloud)return{kind:"first"};const s=e.adding&&!e.adding.done?e.adding:null;if(s)return s.status==="ready"?{kind:"ready",adding:s}:s.status==="setting_up"?{kind:"starting",adding:s}:s.status==="problem"?{kind:"problem",adding:s}:{kind:"waiting",adding:s,late:t-s.startedAt>=Go};const i=e.home?.name??null;if(!e.supported)return{kind:"stop",reason:"one",home:i};const c=o??(e.canAdd?null:e.blocked==="cap"||!e.blocked?"one":e.blocked);if(c)return{kind:"stop",reason:c,home:i};if(r)return{kind:"error"};if(!e.offer?.plans.length)return{kind:"unreachable"};const l=n?e.offer.plans.find(u=>u.tier===n):void 0;return l?{kind:"name",plan:l}:{kind:"choose",offer:e.offer}}function yi(e){return e==="signups_closed"||e==="checkout_open"||e==="rate"?e:"one"}const xi=1200,vi=3e3;function ki(e){return new Promise(t=>{let n=!1;const r=s=>{n||(n=!0,clearTimeout(o),t(s))},o=setTimeout(()=>r(!1),vi);try{if(!navigator.clipboard?.writeText)return r(!1);Promise.resolve(navigator.clipboard.writeText(e)).then(()=>r(!0),()=>r(!1))}catch{r(!1)}})}function wi(e){if(typeof document>"u"||!document.body||typeof document.execCommand!="function")return!1;const t=document.activeElement,n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style.position="fixed",n.style.left="-9999px";try{return document.body.appendChild(n),n.select(),n.setSelectionRange(0,e.length),document.execCommand("copy")}catch{return!1}finally{n.remove(),t?.focus?.({preventScroll:!0})}}async function _i(e){if(!e.trim())return"empty";if(await ki(e))return"copied";try{if(typeof window<"u"&&await window.ogb?.copyText?.(e)===!0)return"copied"}catch{}return wi(e)?"copied":"failed"}function Si({copy:e,onChange:t,resetMs:n=xi,setTimer:r=(s,i)=>setTimeout(s,i),clearTimer:o=s=>clearTimeout(s)}){let s=!1,i=!1,c;const l=()=>{c!==void 0&&o(c),c=void 0};return{async click(u){if(s)return"busy";s=!0;let d;try{d=await e(u)}catch{d="failed"}finally{s=!1}return i||d==="empty"||(l(),t(d==="copied"?"copied":"failed"),c=r(()=>{c=void 0,t("idle")},n)),d},dispose(){i=!0,l()}}}function ji(e){const[t,n]=m.useState("idle"),r=m.useRef(null);m.useEffect(()=>{const s=Si({copy:_i,onChange:n});return r.current=s,()=>{s.dispose(),r.current=null}},[]);const o=m.useCallback(()=>{r.current?.click(e)},[e]);return{state:t,copy:o}}const Mi={panel:"ring-offset-panel",card:"ring-offset-card",menu:"ring-offset-menu"};function Ne({value:e,onChange:t,label:n,disabled:r=!1,offset:o="panel",none:s=!1}){const i=e??B1[0],c=l=>s&&l==="slate";return a.jsx("div",{role:"radiogroup","aria-label":n,"aria-disabled":r||void 0,className:"flex flex-wrap gap-2.5",children:B1.map(l=>a.jsx("button",{type:"button",role:"radio","aria-checked":l===e,"aria-label":f(c(l)?"placeLook.none":jt[l]),title:f(c(l)?"placeLook.none":jt[l]),"data-swatch":l,disabled:r,onClick:()=>t(l),onKeyDown:u=>{const d=u.key==="ArrowRight"||u.key==="ArrowDown"?1:u.key==="ArrowLeft"||u.key==="ArrowUp"?-1:0;if(!d)return;u.preventDefault();const p=B1[(B1.indexOf(l)+d+B1.length)%B1.length];t(p),u.currentTarget.parentElement?.querySelector(`[data-swatch="${p}"]`)?.focus()},tabIndex:l===i?0:-1,className:D("grid size-8 place-items-center rounded-full border transition-[box-shadow] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:cursor-default",c(l)?"border-ink/55 text-ink/55":"border-ink/10",l===e&&D("ring-2 ring-ink/70 ring-offset-2",Mi[o]),r&&l!==e&&"opacity-50"),style:c(l)?void 0:{background:it(l)},children:c(l)&&a.jsx("span",{"aria-hidden":"true",className:"h-[1.5px] w-[60%] -rotate-45 rounded-full bg-current"})},l))})}function Mt(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function On(e,t="|"){return e.map(n=>ir(n)).join(t)}function At(e,t){return typeof t=="bigint"?t.toString():t}class Ai{constructor(t){this._getter=t,this._value=void 0}get value(){const t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}}function at(e){return new Ai(e)}function Ni(e){return e==null}function nn(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Ei(e,t){const n=e/t,r=Math.round(n),o=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}function T1(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function rn(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function I1(e){return rn(e._zod.def)??e._zod.def.shape}function nr(e,t,n){Object.defineProperty(e,t,{get(){const r=n();return T1(this,t,r),r},enumerable:!0,configurable:!0})}function rr(e,t,n){t in e?T1(e,t,n):e[t]=n}function G1(e,t,n,r){const o=I1(t);for(const s of n){const i=Object.getOwnPropertyDescriptor(o,s);i.enumerable&&(i.get?nr(e,s,()=>{const c=t._zod.def.shape[s];return r?r(c,s):c}):rr(e,s,r?r(i.value,s):i.value))}}function zi(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?nr(e,n,()=>t[n]):rr(e,n,r.value))}}function p1(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Zi(e){return JSON.stringify(e)}function Oi(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const or="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function we(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Ii=at(()=>{if(v1.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function te(e){if(we(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(we(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function sr(e){return te(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Pi=new Set(["string","number","symbol"]);function ne(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function U1(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function S(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function ir(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Ti(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const ar={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},$i={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Ri(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s={};return G1(s,e,ct(e,t)),U1(e,p1(n,{shape:s,checks:[]}))}function ct(e,t){const n=I1(e),r=[];for(const o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&r.push(o)}return r}function Di(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=new Set(ct(e,t)),i={};return G1(i,e,Reflect.ownKeys(I1(e)).filter(c=>!s.has(c))),U1(e,p1(n,{shape:i,checks:[]}))}function Bi(e,t){if(!te(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=I1(e);for(const s of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return U1(e,p1(e._zod.def,{shape:cr(e,t)}))}function cr(e,t){const n={};return G1(n,e,Reflect.ownKeys(I1(e))),zi(n,t),n}function Li(e,t){if(!te(t))throw new Error("Invalid input to safeExtend: expected a plain object");return U1(e,p1(e._zod.def,{shape:cr(e,t)}))}function Fi(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n={};G1(n,e,Reflect.ownKeys(I1(e))),G1(n,t,Reflect.ownKeys(I1(t)));const r=p1(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return U1(e,r)}function In(e,t,n,r="partial"){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const c=n?new Set(ct(t,n)):void 0,l={};return G1(l,t,Reflect.ownKeys(I1(t)),e&&((u,d)=>c&&!c.has(d)?u:new e({type:"optional",innerType:u}))),U1(t,p1(t._zod.def,{shape:l,checks:[]}))}function Ui(e,t,n){const r=n?new Set(ct(t,n)):void 0,o={};return G1(o,t,Reflect.ownKeys(I1(t)),(s,i)=>r&&!r.has(i)?s:new e({type:"nonoptional",innerType:s})),U1(t,p1(t._zod.def,{shape:o}))}function Z1(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Wi(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Q1(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function le(e){return typeof e=="string"?e:e?.message}function Pn(e){const t=[];for(const n of e??[]){const r=n._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const o=r.maximum??r.length??r.size;o>=0&&t.push([o,n])}return t}function Nt(e,t,n){var r;for(let o=t;o<e.length;o++)(r=e[o]).schema??(r.schema=n)}function L1(e,t,n){var r;const o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const s=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,i=e.message?e.message:le(e.inst?._zod.def?.error?.(e))??le(s?.(e))??le(t?.error?.(e))??le(n.customError?.(e))??le(n.localeError?.(e))??"Invalid input",c={};for(const l of Object.keys(e))l==="inst"||l==="schema"||l==="continue"||l==="input"||l==="__proto__"||(c[l]=e[l]);return c.path??(c.path=[]),c.message=i,t?.reportInput&&(c.input=e.input),c}const Hi=/[\uD800-\uDBFF]/;function on(e){const t=e.length;if(!Hi.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function sn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Vi(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function _e(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function Ji(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ki(e,n,r.value)}}function F1(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function lr(e,t,n){return F1(e,t,n,!1)}function ur(e,t){for(const n in e){const r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return F1(this,n,r(this))},set(o){F1(this,n,o)}})}return t}function Ki(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:F1(this,t,n.bind(this))},set(r){F1(this,t,r)}})}function Gi(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let pt,R1=!1;const Yi={configurable:!0,get(){R1=!0}};function R(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&pt!==e._zod){pt=void 0;return}pt=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Yi);const o=R1;R1=!1;try{const s=n(this);return R1?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:s}),R1=R1||o,s}catch(s){throw delete this[t],R1=R1||o,s}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function qi(e,t,n,r){const o=Gi(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){const s={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,s),s.value=n(this),Object.defineProperty(this,t,s),s.value},set(s){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:s})}})}const Xi="~constantCatch";function Qi(e){const t=()=>e;return t[Xi]=!0,t}var Tn;const ht={value:void 0,enumerable:!1};let $n="captureStackTrace"in Error?Error:null;function e5(e){const t=$n;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return $n=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function b(e,t,n,r){const o={};function s(h){this.def=h,this.constr=p,this.traits=new Set}s.prototype=o;const i=n,c=i&&new WeakSet;function l(h,C){if(h._zod){if(h._zod.traits.has(e))return}else{ht.value=new s(C);try{Object.defineProperty(h,"_zod",ht)}finally{ht.value=void 0}}if(h._zod.traits.add(e),t(h,C),c){const y=Object.getPrototypeOf(h),x=h._zod.constr.prototype;let k=y;for(;k&&k!==x;)k=Object.getPrototypeOf(k);const _=k??y;c.has(_)||(c.add(_),Ji(_,i))}const g=p.prototype;for(const y in g)Object.prototype.hasOwnProperty.call(g,y)&&(y in h||(h[y]=g[y].bind(h)))}const u=r?.Parent??Object;class d extends u{}Object.defineProperty(d,"name",{value:e});function p(h){const C=r?.Parent?e5(d):this;l(C,h);const g=C._zod.deferred;if(g){for(const x of g)x();C._zod.deferred=void 0}const y=globalThis.__zod_globalConfig?.postProcessor;return y&&y(C),C}return Object.defineProperty(p,"init",{value:l}),Object.defineProperty(p,Symbol.hasInstance,{value:h=>r?.Parent&&h instanceof r.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(p,"name",{value:e}),p}class K1 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class dr extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(Tn=globalThis).__zod_globalConfig??(Tn.__zod_globalConfig={});const v1=globalThis.__zod_globalConfig;function _1(e){return e&&Object.assign(v1,e),v1}function t5(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,At,2)),e.message}function n5(e){this._zod.message=e}const r5={get:t5,set:n5,enumerable:!0,configurable:!0},Ct={value:void 0,enumerable:!1},Rn=new WeakSet([Object.prototype,Error.prototype]),o5=(e,t)=>{e.name="$ZodError",Ct.value=t,Object.defineProperty(e,"issues",Ct),Ct.value=void 0,Object.defineProperty(e,"message",r5);const n=Object.getPrototypeOf(e);Rn.has(n)||(Rn.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},s5=b("$ZodError",o5);function i5(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function a5(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?i5(n,o.path[0],()=>[]).push(t(o)):r.push(t(o));return{formErrors:r,fieldErrors:n}}function c5(e,t=n=>n.message){const n={_errors:[]},r=(o,s=[])=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(c=>r({issues:c},[...s,...i.path]));else if(i.code==="invalid_key")r({issues:i.issues},[...s,...i.path]);else if(i.code==="invalid_element")r({issues:i.issues},[...s,...i.path]);else{const c=[...s,...i.path];if(c.length===0)n._errors.push(t(i));else{let l=n,u=0;for(;u<c.length;){const d=c[u],p=u===c.length-1;if(d==="_errors"){p&&l._errors.push(t(i)),u++;continue}Object.prototype.hasOwnProperty.call(l,d)||Object.defineProperty(l,d,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const h=l[d];p&&h._errors.push(t(i)),l=h,u++}}}};return r(e),n}function lt(e,t){return{callee:t?.callee??e,Err:t?.Err}}const an=e=>{const t=(n,r,o,s)=>{const i=o?{...o,async:!1}:{async:!1},c=n._zod.run({value:r,issues:[]},i);if(c instanceof Promise)throw new K1;if(c.issues.length){const l=new(s?.Err??e)(c.issues.map(u=>L1(u,i,_1())));throw or(l,s?.callee??t),l}return c.value};return t},cn=e=>{const t=async(n,r,o,s)=>{const i=o?{...o,async:!0}:{async:!0};let c=n._zod.run({value:r,issues:[]},i);if(c instanceof Promise&&(c=await c),c.issues.length){const l=new(s?.Err??e)(c.issues.map(u=>L1(u,i,_1())));throw or(l,s?.callee??t),l}return c.value};return t},ln=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new K1;return s.issues.length?fr(e,s.issues,o):{success:!0,data:s.value}};function fr(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(o=>L1(o,n,_1()))),t=void 0,n=void 0),r},set error(o){r=o,t=void 0,n=void 0}}}const un=e=>async(t,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?fr(e,s.issues,o):{success:!0,data:s.value}},l5=Symbol.for("zod.compile.invalid"),u5=Symbol.for("zod.compile.fallback"),d5=((e,t,n)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==l5)return!0;if(r.definite===!0&&n===void 0)return!1}return f5(e,t,n)});function f5(e,t,n){const r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;let s;if(o?(r[u5]=!0,s=o({value:t,issues:[]},r)):s=e._zod.run({value:t,issues:[]},r),s instanceof Promise)throw new K1;return s.issues.length===0}const p5=async(e,t,n)=>{const r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=e._zod.run({value:t,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},h5=e=>{const t=an(e),n=(r,o,s,i)=>{const c=s?{...s,direction:"backward"}:{direction:"backward"};return t(r,o,c,lt(n,i))};return n},C5=e=>{const t=an(e),n=(r,o,s,i)=>t(r,o,s,lt(n,i));return n},m5=e=>{const t=cn(e),n=async(r,o,s,i)=>{const c=s?{...s,direction:"backward"}:{direction:"backward"};return await t(r,o,c,lt(n,i))};return n},g5=e=>{const t=cn(e),n=async(r,o,s,i)=>await t(r,o,s,lt(n,i));return n},b5=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return ln(e)(t,n,o)},y5=e=>(t,n,r)=>ln(e)(t,n,r),x5=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return un(e)(t,n,o)},v5=e=>async(t,n,r)=>un(e)(t,n,r),k5=/^[cC][0-9a-z]{6,}$/,w5=/^[0-9a-z]+$/,_5=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,S5=/^[0-9a-vA-V]{20}$/,j5=/^[A-Za-z0-9]{27}$/,M5=/^[a-zA-Z0-9_-]{21}$/;function A5(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const N5=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,E5=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Dn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,z5=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Z5="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function O5(){return new RegExp(Z5,"u")}const I5=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,P5=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,T5=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,$5=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,R5=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,D5=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,B5=/^https?$/,L5=/^\+[1-9]\d{6,14}$/,pr="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function F5(e){return new RegExp(`^${e}$`)}const U5=F5(pr);function Et(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function W5(e){return new RegExp(`^${Et(e)}$`)}function H5(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${Et({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${Et({precision:e.precision})}`:n;return new RegExp(`^${pr}T(?:${r})$`)}const V5=/^[\s\S]{0,}$/,J5=/^-?\d+$/,dn=/^-?\d+(?:\.\d+)?$/,K5=/^(?:true|false)$/i,G5=/^null$/i,Y5=/^undefined$/i,q5=/^[^A-Z]*$/,X5=/^[^a-z]*$/,d1=b("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),fn=e=>{const t=e.value;return!Ni(t)&&t.length!==void 0},Ke={number:"number",bigint:"bigint",object:"date"},hr=b("$ZodCheckLessThan",(e,t)=>{d1.init(e,t);const n=Ke[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Ke[typeof r.value]??n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Cr=b("$ZodCheckGreaterThan",(e,t)=>{d1.init(e,t);const n=Ke[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Ke[typeof r.value]??n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Q5=b("$ZodCheckMultipleOf",(e,t)=>{d1.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):Ei(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ea=b("$ZodCheckNumberFormat",(e,t)=>{d1.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=ar[t.format];e._zod.check=i=>{const c=i.value;if(n){if(!Number.isInteger(c)){i.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?i.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):i.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}c<o&&i.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>s&&i.issues.push({origin:"number",input:c,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),ta=b("$ZodCheckMaxLength",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=fn),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>t.maximum?on(o):s)<=t.maximum)return;const c=sn(o);r.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),na=b("$ZodCheckMinLength",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=fn),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>=t.minimum&&s<t.minimum*2?on(o):s)>=t.minimum)return;const c=sn(o);r.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),ra=b("$ZodCheckLengthEquals",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=fn),e._zod.check=r=>{const o=r.value,s=o.length,i=typeof o=="string"&&s>=t.length&&s<=t.length*2?on(o):s;if(i===t.length)return;const c=sn(o),l=i>t.length;r.issues.push({origin:c,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),ut=b("$ZodCheckStringFormat",(e,t)=>{var n,r;d1.init(e,t),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),oa=b("$ZodCheckRegex",(e,t)=>{ut.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),sa=b("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=q5),ut.init(e,t)}),ia=b("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=X5),ut.init(e,t)}),aa=b("$ZodCheckIncludes",(e,t)=>{d1.init(e,t);const n=ne(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),ca=b("$ZodCheckStartsWith",(e,t)=>{d1.init(e,t);const n=new RegExp(`^${ne(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),la=b("$ZodCheckEndsWith",(e,t)=>{d1.init(e,t);const n=new RegExp(`.*${ne(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),ua=b("$ZodCheckOverwrite",(e,t)=>{d1.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class da{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
1
|
+
import{c as r1,t as f,j as a,M as Me,aF as se,O as i1,a2 as ve,aG as ie,$ as We,a as D,f as B2,U as Kt,T as Gt,Q as Wo,aH as Ho,al as Vo,r as m,X as L2,ac as Jo,ae as Ko,aw as F2,a5 as U2,aI as Go,e as Yo,R as An,aJ as qo,aK as Xo,aL as Qo,aM as es,aN as ts,aj as ns,aO as rs,aP as os,K as O1,a0 as ss,Z as is,aQ as rt,u as Nn,V as as,aR as cs,L as ot,g as W2,aS as ls,aT as kt,aU as H2,aV as h1,aW as us,am as ds,S as fs,aa as ps,aX as V2,aY as hs,b as Cs,aZ as ms,a_ as gs,a$ as bs}from"./styles-Bj-lDRZL.js";import{M as ys}from"./monitor-DUEBF6Jm.js";const xs=[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]],vs=r1("audio-lines",xs);const ks=[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],ws=r1("building-2",ks);const _s=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],Ss=r1("cloud-upload",_s);const js=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Ms=r1("copy",js);const As=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Ns=r1("ellipsis",As);const Es=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Yt=r1("external-link",Es);const zs=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],Zs=r1("hard-drive",zs);const Os=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],Is=r1("house",Os);const Ps=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],x1=r1("loader-circle",Ps);const Ts=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],J2=r1("lock",Ts);const $s=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Rs=r1("log-out",$s);const Ds=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Bs=r1("moon",Ds);const Ls=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],K2=r1("plus",Ls);const Fs=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],Us=r1("power",Fs);const Ws=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],G2=r1("server",Ws);const Hs=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],Vs=r1("smartphone",Hs);const Js=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],Ks=r1("timer",Js);const Gs=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],qt=r1("user-round",Gs),E1=8,Ys=new Set(["sso","two-factor","browser"]);function qs(e,t){switch(e){case"invalid-email":return f("cloudBuy.signIn.invalidEmail");case"rate-limited":return f("cloudBuy.signIn.rateLimited");case"wrong-code":return t===1?f("cloudBuy.signIn.wrongCodeOne"):f("cloudBuy.signIn.wrongCode",{count:t??0});case"expired":return f("cloudBuy.signIn.expired");case"signup-closed":return f("cloudBuy.signIn.signupClosed");case"device-limit":return f("cloudBuy.signIn.deviceLimit");case"sso":return f("cloudBuy.signIn.sso");case"two-factor":return f("cloudBuy.signIn.twoFactor");case"browser":return f("cloudBuy.signIn.browser");case"failed":return f("cloudBuy.signIn.failed")}}function de(e){return e.replace(/\D/g,"").slice(0,E1)}const Xs=e=>{const t=Math.max(0,Math.ceil(e/1e3));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`};function Qs({phase:e,email:t,code:n,profileEmail:r,busy:o,now:s,onBack:i,onEmail:c,onSend:l,onChangeEmail:u,onCode:d,onResend:p,onBrowser:h}){const C=e.step==="done"?null:e.problem,g=C!==null&&Ys.has(C),y=e.intent?f("cloudBuy.signIn.title"):f("cloudBuy.signIn.titlePlain"),x=(w,v)=>w.parentElement?.querySelectorAll("input")[v]?.focus(),k=(w,v,z)=>{const O=de(v);if(O.length>1){d(de(n.slice(0,w)+O)),x(z,Math.min(E1-1,w+O.length));return}const Z=(n.slice(0,w)+O+n.slice(w+1)).slice(0,E1);d(de(Z)),O&&w<E1-1&&x(z,w+1)},_=w=>v=>{v.key==="Backspace"&&!n[w]&&w>0?(v.preventDefault(),d(n.slice(0,w-1)),x(v.currentTarget,w-1)):v.key==="ArrowLeft"&&w>0?(v.preventDefault(),x(v.currentTarget,w-1)):v.key==="ArrowRight"&&w<E1-1&&(v.preventDefault(),x(v.currentTarget,w+1))},j=w=>{const v=de(w.clipboardData.getData("text"));v&&(w.preventDefault(),d(v),x(w.currentTarget,Math.min(E1-1,v.length)))},A=w=>{w.preventDefault(),o||l()};return a.jsxs("div",{"data-cloud-add":`sign-in-${e.step}`,className:Me,children:[a.jsxs("div",{className:"flex flex-col gap-3",children:[a.jsx(se,{label:f("cloudBuy.back"),onClick:i}),a.jsx(i1,{title:y,sub:f("cloudBuy.signIn.sub")})]}),e.step==="email"&&a.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:A,noValidate:!0,children:[a.jsx("label",{htmlFor:"cloud-add-email",className:"text-[13px] leading-[18px] text-ink-secondary",children:f("cloudBuy.signIn.email")}),a.jsx("input",{id:"cloud-add-email","data-autofocus":!0,type:"email",autoComplete:"email",inputMode:"email",spellCheck:!1,value:t,disabled:o,"aria-invalid":C==="invalid-email"||void 0,"aria-describedby":C?"cloud-add-problem":void 0,onChange:w=>c(w.target.value),className:ve}),a.jsxs("button",{type:"submit",className:`${ie} mt-2`,disabled:o||!t.trim(),children:[o&&a.jsx(x1,{size:16,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudBuy.signIn.send")]}),r&&t.trim().toLowerCase()===r.trim().toLowerCase()&&a.jsx("p",{className:"text-[13px] leading-[18px] text-ink-tertiary",children:f("cloudBuy.signIn.fromProfile")})]}),e.step==="code"&&a.jsxs("div",{className:"flex flex-col gap-2.5",children:[a.jsxs("p",{id:"cloud-add-code-label",className:"text-[13px] leading-[18px] text-ink-secondary",children:[f("cloudBuy.signIn.codeLabel",{email:e.email})," · ",a.jsx("button",{type:"button",className:We,disabled:o,onClick:u,children:f("cloudBuy.signIn.change")})]}),a.jsx("div",{role:"group","aria-labelledby":"cloud-add-code-label",className:"grid grid-cols-8 gap-1.5",dir:"ltr",children:Array.from({length:E1},(w,v)=>a.jsx("input",{"data-autofocus":v===Math.min(n.length,E1-1)||void 0,value:n[v]??"",inputMode:"numeric",pattern:"[0-9]*",maxLength:E1,autoComplete:v===0?"one-time-code":"off","aria-label":f("cloudBuy.signIn.digit",{n:v+1}),disabled:o,"aria-invalid":C==="wrong-code"||void 0,"aria-describedby":C?"cloud-add-problem":void 0,onChange:z=>k(v,z.target.value,z.currentTarget),onKeyDown:_(v),onPaste:j,onFocus:z=>z.currentTarget.select(),className:D(ve,"h-11 min-w-0 px-0 text-center text-[20px] font-medium tabular-nums")},v))}),e.signupOpen===!1&&a.jsx("p",{"data-cloud-signup-closed":!0,className:"text-[13px] leading-[18px] text-ink-secondary",children:f("cloudBuy.signIn.signupClosedNote")}),a.jsx("div",{className:"flex min-h-6 items-center justify-between gap-3 text-[13px] text-ink-tertiary",children:o?a.jsxs("span",{role:"status",className:"inline-flex items-center gap-1.5",children:[a.jsx(x1,{size:13,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudBuy.signIn.checking")]}):e.resendAt>s?a.jsx("span",{children:f("cloudBuy.signIn.resendIn",{time:Xs(e.resendAt-s)})}):a.jsx("button",{type:"button",className:We,onClick:p,children:f("cloudBuy.signIn.resend")})})]}),e.step==="done"&&a.jsxs("p",{role:"status",className:"flex items-center gap-2 text-[14px] leading-5 text-ink",children:[a.jsx("span",{"aria-hidden":"true",className:"grid size-5 shrink-0 place-items-center rounded-full bg-ink text-app",children:a.jsx(B2,{size:12,strokeWidth:2.4})}),e.intent?f("cloudBuy.signIn.done"):f("cloudBuy.signIn.donePlain")]}),C&&a.jsxs("div",{id:"cloud-add-problem",role:"alert",className:"flex flex-col items-start gap-3 rounded-[12px] bg-ink/[0.04] px-4 py-3 text-[13px] leading-[18px] text-ink",children:[a.jsx("p",{children:qs(C,e.step==="code"?e.triesLeft:null)}),g&&a.jsxs("button",{type:"button",className:Kt,onClick:h,children:[f("cloudBuy.signIn.continueBrowser"),a.jsx(Yt,{size:14,"aria-hidden":"true"})]}),C==="expired"&&e.step==="code"&&a.jsx("button",{type:"button",className:Gt,disabled:o,onClick:p,children:f("cloudBuy.signIn.newCode")})]}),e.step!=="done"&&!g&&a.jsxs("p",{className:"text-[13px] leading-[18px] text-ink-tertiary",children:[f("cloudBuy.signIn.ssoHint")," ",a.jsx("button",{type:"button",className:We,onClick:h,children:f("cloudBuy.signIn.continueBrowser")})]})]})}function r7({code:e,checkout:t,trial:n,busy:r,onReopen:o,onCancel:s}){return a.jsxs("div",{"data-cloud-add":"signing-in",className:Me,children:[a.jsx(i1,{title:f("cloudAdd.browserTitle")}),e?a.jsxs("ol",{className:"flex list-decimal flex-col gap-1.5 ps-5 text-[14px] leading-5 text-ink marker:text-ink-tertiary",children:[a.jsx("li",{children:f("cloudAdd.signInStep1")}),a.jsxs("li",{children:[f("cloudAccount.codeCheck"),a.jsx("code",{dir:"ltr",className:"mt-1.5 block w-fit select-all rounded-[8px] bg-ink/[0.05] px-3 py-1.5 font-mono text-[17px] font-medium tracking-[0.12em]",children:e})]}),a.jsx("li",{children:f(t?n?"cloudAdd.signInStep3Trial":"cloudAdd.signInStep3":"cloudAdd.signInStep3Connect")})]}):a.jsxs("p",{role:"status",className:"flex items-center gap-2 text-[13px] text-ink-secondary",children:[a.jsx(x1,{size:14,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),f("cloudAdd.opening")]}),a.jsxs("div",{className:Wo,children:[a.jsx("button",{type:"button",className:Gt,disabled:r,onClick:s,children:f("cloudAdd.cancel")}),a.jsxs("button",{type:"button",className:Kt,disabled:r||!e,onClick:o,children:[f("cloudAdd.reopenBrowser"),a.jsx(Yt,{size:14,"aria-hidden":"true"})]})]})]})}var Y2=Ho();const o7=Vo(Y2);let ei=0;const fe=[],wt=m.createContext(null),ti=()=>()=>{};function q2({modal:e=!1,children:t}){const[n]=m.useState(()=>++ei);m.useLayoutEffect(()=>{if(e)return fe.push(n),fe.sort((i,c)=>i-c),()=>{fe.splice(fe.indexOf(n),1)}},[e,n]);const r=m.useContext(wt),o=m.useSyncExternalStore(ti,()=>!1,()=>!0),s=a.jsx(wt.Provider,{value:e?n:r,children:t});return o?s:Y2.createPortal(s,document.body)}function ni(){const e=m.useContext(wt);return m.useCallback(()=>e===null||fe.at(-1)===e,[e])}const ri="a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]";function oi(e,t){const n=m.useRef(t);n.current=t,m.useEffect(()=>{const r=e.current;if(!r)return;const o=document.activeElement instanceof HTMLElement?document.activeElement:null;r.contains(document.activeElement)||r.focus();const s=()=>Array.from(r.querySelectorAll(ri)).filter(c=>c.getAttribute("tabindex")!=="-1"&&!c.closest("[hidden], [inert]")),i=c=>{if(c.defaultPrevented)return;if(c.key==="Escape"){c.preventDefault(),c.stopPropagation(),n.current();return}if(c.key!=="Tab")return;const l=s();if(!l.length)return c.preventDefault();const u=l[0],d=l[l.length-1];c.shiftKey&&(document.activeElement===u||!r.contains(document.activeElement)||document.activeElement===r)?(c.preventDefault(),d.focus()):!c.shiftKey&&document.activeElement===d&&(c.preventDefault(),u.focus())};return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i),o?.focus()}},[e])}function Xt(e){switch(e.outcome){case"moving":return f("accounts.moving");case"gone":return f("accounts.gone");case"failed":return f("accounts.failed");default:return null}}function s7(){const e=window.ogb?.remoteClient?.active?void 0:window.ogb?.accounts,t=window.ogb?.accountSheet,n=window.ogb?.app?.ownPage===!0&&!!e,r=F2(),[o,s]=m.useState(null),[i,c]=m.useState(!1),[l,u]=m.useState(null);return m.useEffect(()=>{if(!n)return;const d=()=>{e.list().then(s).catch(()=>{})};return d(),e.onChanged(d)},[n,e]),m.useEffect(()=>{if(n||!t)return;let d=!0;return t.offered().then(p=>{d&&c(p===!0)}).catch(()=>{}),()=>{d=!1}},[n,t]),{view:n?o:null,openSheet:!n&&i&&t?()=>{t.open().catch(()=>{})}:null,noRail:!r.beside&&!r.places.length,signOut:d=>{e?.signOut(d).then(p=>{s(p.view);const h=Xt(p);h&&u({email:null,note:h})}).catch(()=>u({email:null,note:f("accounts.failed")}))},add:d=>u({email:d??"",note:null}),sheet:l,closeSheet:()=>u(null)}}function i7(e){return f(e&&!e.active?"accounts.signIn":"settings.section.cloudAccount")}function a7({view:e,openSheet:t,noRail:n,signOut:r,add:o}){if(t)return[{key:"accounts-sheet",label:f("accounts.manage"),icon:a.jsx(qt,{size:18}),onSelect:t}];const s=e?.active;return s?[{key:"accounts-active",heading:f("accounts.heading"),label:s.email,title:s.email,checked:!0,icon:a.jsx(B2,{size:18}),disabled:!s.signIn,...s.signIn?{subtitle:f("accounts.needsSignIn")}:{},onSelect:()=>{s.signIn&&o(s.email)}},...n?[{key:"accounts-add",label:f("accounts.add"),icon:a.jsx(K2,{size:18}),onSelect:()=>o()}]:[],{key:"accounts-sign-out",label:f("accounts.signOut"),icon:a.jsx(Rs,{size:18}),onSelect:()=>r(s.id)}]:[]}const En={step:"email",intent:!1,problem:null};function si({start:e,onDone:t,onBack:n}){const r=window.ogb?.accounts,[o,s]=m.useState(En),[i,c]=m.useState(e),[l,u]=m.useState(""),[d,p]=m.useState(!1),[h,C]=m.useState(!1),[g,y]=m.useState(Date.now());m.useEffect(()=>{const _=setInterval(()=>y(Date.now()),1e3);return()=>clearInterval(_)},[]),m.useEffect(()=>()=>{r?.addCancel().catch(()=>{})},[r]);const x=()=>{d||!r||(p(!0),r.addStart(i).then(_=>{_.outcome==="sent"?(s({step:"code",intent:!1,email:_.email,resendAt:_.resendAt,problem:null,triesLeft:null,..._.signupOpen===!1?{signupOpen:!1}:{}}),u("")):s({step:"email",intent:!1,problem:_.outcome})},()=>s({step:"email",intent:!1,problem:"failed"})).finally(()=>p(!1)))},k=_=>{if(!r||o.step!=="code")return;const j=o;p(!0),r.addVerify(_).then(A=>{A.outcome==="switched"?t(null):A.outcome==="added"?t(f("accounts.added",{email:A.email??i})):A.outcome==="already"?t(f("accounts.already",{email:A.email??i})):(u(""),s({...j,problem:A.outcome,triesLeft:A.outcome==="wrong-code"?A.triesLeft:null}))},()=>s({...j,problem:"failed",triesLeft:null})).finally(()=>p(!1))};return m.useEffect(()=>{if(!h||!r)return;const _=()=>{r.addResult().then(j=>{j&&(j.outcome==="switched"?t(null):j.outcome==="added"?t(f("accounts.added",{email:j.email??i})):j.outcome==="already"?t(f("accounts.already",{email:j.email??i})):(C(!1),s({step:"email",intent:!1,problem:"failed"})))}).catch(()=>{})};return _(),r.onChanged(_)},[h,r,t,i]),h?a.jsxs("div",{"data-accounts-browser":!0,className:Me,children:[a.jsx(i1,{title:f("accounts.browserTitle"),sub:f("accounts.browserBody")}),a.jsx("button",{type:"button",className:Gt,onClick:()=>{r?.addReopen().catch(()=>{})},children:f("accounts.browserOpen")})]}):a.jsx(Qs,{phase:o,email:i,code:l,profileEmail:null,busy:d,now:g,onBack:n,onEmail:c,onSend:x,onChangeEmail:()=>{s(En),r?.addCancel().catch(()=>{})},onCode:_=>{const j=de(_);u(j),j.length===8&&!d&&k(j)},onResend:x,onBrowser:()=>{p(!0),r?.addBrowser().then(_=>{_.outcome==="browser"?C(!0):s({step:"email",intent:!1,problem:"failed"})},()=>s({step:"email",intent:!1,problem:"failed"})).finally(()=>p(!1))}})}function ii({onClose:e,adding:t=null,note:n=null}){const r=window.ogb?.accounts,[o,s]=m.useState(null),[i,c]=m.useState(n),[l,u]=m.useState(t);m.useEffect(()=>{if(!r)return;const C=()=>{r.list().then(s).catch(()=>c(f("accounts.failed")))};return C(),r.onChanged(C)},[r]);const d=C=>{c(null),r?.signOut(C).then(g=>{s(g.view);const y=Xt(g);y?c(y):e()},()=>c(f("accounts.failed")))},p=o?.active??null,h=m.useRef(null);return oi(h,e),a.jsx(q2,{modal:!0,children:a.jsx("div",{className:"ui-scrim fixed inset-0 z-[60] flex items-center justify-center p-4",onMouseDown:C=>C.target===C.currentTarget&&e(),children:a.jsxs("div",{ref:h,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":"cloud-add-title","data-accounts-sheet":!0,className:D(Ko,"relative w-full max-w-[420px] outline-none"),children:[a.jsx("button",{type:"button",onClick:e,"aria-label":f("accounts.close"),className:D(Jo,"absolute end-4 top-4 z-10"),children:a.jsx(L2,{size:16})}),l!==null?a.jsx(si,{start:l,onBack:()=>t!==null?e():u(null),onDone:C=>{u(null),C?c(C):e()}}):a.jsxs("div",{className:Me,children:[a.jsx(i1,{title:f("accounts.title")}),p&&!n&&a.jsxs("p",{"data-accounts-active":!0,className:"truncate text-[14px] text-ink",title:p.email,children:[f("accounts.heading")," ",p.email]}),i&&a.jsx("p",{role:"status","data-accounts-note":!0,className:"text-[13px] leading-5 text-ink-secondary",children:i}),p&&!n&&a.jsx("button",{type:"button","data-accounts-sign-out":!0,className:Kt,onClick:()=>d(p.id),children:f("accounts.signOut")})]})]})})})}function c7(){const e=window.ogb?.accounts,[t,n]=m.useState(!1);return m.useEffect(()=>{if(e)return e.sheetPending().then(r=>{r&&n(!0)}).catch(()=>{}),e.onOpenSheet(()=>n(!0))},[e]),m.useEffect(()=>{t&&window.ogb?.rail?.expand?.(!0)?.catch(()=>{})},[t]),{open:t,close:()=>{n(!1),window.ogb?.rail?.expand?.(!1)?.catch(()=>{}),e?.sheetClosed().catch(()=>{})}}}const me={host:{platform:"other",label:"Browser",session:"unknown",packaged:!1},windowChrome:"native",screenPreview:{available:!1,interaction:"none",reasonCode:"desktop-app-required"},dictation:{available:!1,engine:"none",onDevice:!1,reasonCode:"desktop-app-required"},localComputer:{available:!1,support:"unsupported",enabled:!1,status:"unavailable",reasonCode:"desktop-app-required"}};let D1=null,_t=0;function Qt(){const e=typeof window>"u"?void 0:window.ogb?.platform;if(!e)return me;const t=e==="darwin",n=e==="win32"||e==="linux",r={available:t||n,engine:t?"apple-speech":n?"fish-audio":"none",onDevice:t};return r.available||(r.reasonCode="unsupported-platform"),{...me,host:{...me.host,platform:e==="darwin"||e==="linux"||e==="win32"?e:"other",label:e==="darwin"?"macOS":e==="linux"?"Linux":e==="win32"?"Windows":"Desktop"},windowChrome:t?"mac-inset":e==="win32"?"win-caption":"native",dictation:r}}async function ai(){if(D1)return D1;if(!window.ogb?.getCapabilities)return me;const e=_t;let t;try{t=await window.ogb.getCapabilities()}catch{t=me}return _t!==e&&D1||(D1=t),D1}function l7(){return D1??Qt()}function ci(e){return _t+=1,D1=e,e}function u7(){return typeof window>"u"||window.ogb?.remoteClient?.active?void 0:window.ogb?.approvals}const X2=m.createContext({capabilities:Qt(),ready:typeof window>"u"||!window.ogb});function d7({children:e}){const[t,n]=m.useState(()=>({capabilities:Qt(),ready:typeof window>"u"||!window.ogb}));return m.useEffect(()=>{let r=!0,o=0;const s=window.ogb?.onCapabilitiesChanged?.(c=>{o+=1,r&&n({capabilities:ci(c),ready:!0})}),i=o;return ai().then(c=>{r&&o===i&&n({capabilities:c,ready:!0})}),()=>{r=!1,s?.()}},[]),a.jsx(X2.Provider,{value:t,children:e})}function Q2(){return m.useContext(X2)}function li(){const{capabilities:e}=Q2();return pi(e.windowChrome)}const zn={WebkitAppRegion:"drag"},ui={WebkitAppRegion:"no-drag"};function di(e){return e?.windowChrome==="mac-inset"||e?.windowChrome==="win-caption"}function fi(e){return di(e)&&e?.windowFrame!==!1}function pi(e){const t=e==="win-caption",n=t||e==="mac-inset";return{windowsCaption:t,draggable:n,dragProps:n?{"data-window-drag":"",style:zn}:{},dragStyle:n?zn:void 0,noDragStyle:n?ui:void 0}}function f7(){const{dragProps:e}=li();return e.style?a.jsx("div",{"aria-hidden":!0,"data-window-drag-strip":!0,...e,className:"pointer-events-none absolute inset-x-0 top-0 h-[52px]"}):null}function hi(e,t,n=Date.now()){const r=Math.max(0,Math.round((n-e)/1e3)),o=new Intl.RelativeTimeFormat(t,{numeric:"auto"});if(r<45)return o.format(0,"second");const s=Math.round(r/60);if(s<60)return o.format(-s,"minute");const i=Math.round(s/60);if(i<24)return o.format(-i,"hour");const c=Math.round(i/24);return c<7?o.format(-c,"day"):new Date(e).toLocaleDateString(t,{month:"short",day:"numeric"})}let ke=null,Zn=!1;const St=new Set,st=()=>typeof window>"u"?void 0:window.ogb?.rail;function ee(e){ke=e;for(const t of St)t(ke)}function Ci(){const e=st();Zn||!e?.state||(Zn=!0,e.onState?.(ee),e.state().then(ee,()=>ee(null)))}function p7(){const[e,t]=m.useState(ke);return m.useEffect(()=>(St.add(t),Ci(),t(ke),()=>{St.delete(t)}),[]),e}function mi(){const[e,t]=m.useState(!0);return m.useEffect(()=>st()?.onFramed?.(t),[]),e}function h7(e=!0){st()?.drawsFrame?.(e)?.catch(()=>{})}function C7(e){const t=st(),n=ke;!t?.setHidden||!n||(ee({...n,hidden:e}),t.setHidden(e).then(ee,()=>ee(n)))}const en="popover-surface flex flex-col gap-1 rounded-[var(--radius-menu)] border border-hairline/50 bg-menu p-1.5 shadow-lg [&_svg.lucide]:stroke-[1.5]",m7="flex min-h-[30px] w-full shrink-0 items-center gap-2 whitespace-nowrap rounded-md px-2 py-1.5 text-left text-[14px] leading-[18px] focus-visible:bg-menu-hover",g7="mx-1.5 h-px shrink-0 bg-hairline/50",b7="px-2 pb-1 pt-2 text-[12px] font-medium leading-4 text-ink-secondary",Ae="group flex h-[30px] w-full min-w-0 shrink-0 items-center gap-2 rounded-md px-2 text-left text-[13px] leading-[18px] text-ink hover:bg-ink/[0.06] focus:bg-ink/[0.06] active:bg-ink/[0.08] disabled:cursor-default disabled:opacity-50 disabled:hover:bg-transparent touch:h-10",y7="group flex min-h-[30px] w-full min-w-0 shrink-0 items-center gap-2 rounded-md px-2 py-1 text-left text-[13px] leading-[18px] text-ink hover:bg-ink/[0.06] focus:bg-ink/[0.06] active:bg-ink/[0.08] disabled:cursor-default disabled:opacity-50 disabled:hover:bg-transparent touch:min-h-10",x7="min-w-0 max-w-full truncate text-[12px] leading-4 text-ink-tertiary",v7="flex h-[30px] w-full min-w-0 shrink-0 items-center gap-2 px-2 text-[13px] leading-[18px] touch:h-10",k7="flex size-4 shrink-0 items-center justify-center",w7="min-w-0 max-w-[45%] shrink truncate text-[12px] leading-4 text-ink-tertiary",_7="flex h-6 shrink-0 items-end gap-2 px-2 pb-0.5 text-[12px] font-medium leading-4 text-ink-tertiary",S7="mx-2 my-[5px] h-[0.5px] shrink-0 bg-ink/10",j7="px-2 py-1 text-[12px] leading-4 text-ink-tertiary",M7="shrink-0 text-ink-secondary",A7="shrink-0 text-ink-tertiary rtl:-scale-x-100",N7=1.75,gi=Object.freeze({empty:"native.connect.empty",codeOnly:"native.connect.codeOnly",emailCode:"native.connect.emailCode",oldCode:"native.connect.oldCode",scriptKey:"native.connect.scriptKey",notACode:"native.connect.notACode",publicHttp:"native.connect.publicHttp",phoneLink:"native.connect.phoneLink",notAnAddress:"native.connect.notAnAddress",unreachable:"native.connect.unreachable",dns:"native.connect.dns",certificate:"native.connect.certificate",notMausBot:"native.connect.notMausBot",desktopApp:"native.connect.desktopApp",desktopAppTailnet:"native.connect.desktopAppTailnet",loopback:"native.connect.loopback",localNetwork:"native.connect.localNetwork",tailscaleOff:"native.connect.tailscaleOff",otherTailnet:"native.connect.otherTailnet",tailnetBlocked:"native.connect.tailnetBlocked",tailnetSilent:"native.connect.tailnetSilent"}),tn=40,er={blue:"blue",green:"teal",amber:"yellow",rose:"red",violet:"purple",slate:null};function it(e){const t=er[e];return t?U2(t):"var(--color-raised)"}const jt={blue:"cloudBuy.color.blue",green:"cloudBuy.color.teal",amber:"cloudBuy.color.yellow",rose:"cloudBuy.color.red",violet:"cloudBuy.color.purple",slate:"cloudBuy.color.slate"},B1=Object.keys(jt),tr="blue";function bi(e,{now:t,tier:n=null,failed:r=!1,stop:o=null}){if(e===void 0)return{kind:"checking"};if(e===null)return{kind:"unreachable"};if(!e.signedIn||!e.hasCloud)return{kind:"first"};const s=e.adding&&!e.adding.done?e.adding:null;if(s)return s.status==="ready"?{kind:"ready",adding:s}:s.status==="setting_up"?{kind:"starting",adding:s}:s.status==="problem"?{kind:"problem",adding:s}:{kind:"waiting",adding:s,late:t-s.startedAt>=Go};const i=e.home?.name??null;if(!e.supported)return{kind:"stop",reason:"one",home:i};const c=o??(e.canAdd?null:e.blocked==="cap"||!e.blocked?"one":e.blocked);if(c)return{kind:"stop",reason:c,home:i};if(r)return{kind:"error"};if(!e.offer?.plans.length)return{kind:"unreachable"};const l=n?e.offer.plans.find(u=>u.tier===n):void 0;return l?{kind:"name",plan:l}:{kind:"choose",offer:e.offer}}function yi(e){return e==="signups_closed"||e==="checkout_open"||e==="rate"?e:"one"}const xi=1200,vi=3e3;function ki(e){return new Promise(t=>{let n=!1;const r=s=>{n||(n=!0,clearTimeout(o),t(s))},o=setTimeout(()=>r(!1),vi);try{if(!navigator.clipboard?.writeText)return r(!1);Promise.resolve(navigator.clipboard.writeText(e)).then(()=>r(!0),()=>r(!1))}catch{r(!1)}})}function wi(e){if(typeof document>"u"||!document.body||typeof document.execCommand!="function")return!1;const t=document.activeElement,n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style.position="fixed",n.style.left="-9999px";try{return document.body.appendChild(n),n.select(),n.setSelectionRange(0,e.length),document.execCommand("copy")}catch{return!1}finally{n.remove(),t?.focus?.({preventScroll:!0})}}async function _i(e){if(!e.trim())return"empty";if(await ki(e))return"copied";try{if(typeof window<"u"&&await window.ogb?.copyText?.(e)===!0)return"copied"}catch{}return wi(e)?"copied":"failed"}function Si({copy:e,onChange:t,resetMs:n=xi,setTimer:r=(s,i)=>setTimeout(s,i),clearTimer:o=s=>clearTimeout(s)}){let s=!1,i=!1,c;const l=()=>{c!==void 0&&o(c),c=void 0};return{async click(u){if(s)return"busy";s=!0;let d;try{d=await e(u)}catch{d="failed"}finally{s=!1}return i||d==="empty"||(l(),t(d==="copied"?"copied":"failed"),c=r(()=>{c=void 0,t("idle")},n)),d},dispose(){i=!0,l()}}}function ji(e){const[t,n]=m.useState("idle"),r=m.useRef(null);m.useEffect(()=>{const s=Si({copy:_i,onChange:n});return r.current=s,()=>{s.dispose(),r.current=null}},[]);const o=m.useCallback(()=>{r.current?.click(e)},[e]);return{state:t,copy:o}}const Mi={panel:"ring-offset-panel",card:"ring-offset-card",menu:"ring-offset-menu"};function Ne({value:e,onChange:t,label:n,disabled:r=!1,offset:o="panel",none:s=!1}){const i=e??B1[0],c=l=>s&&l==="slate";return a.jsx("div",{role:"radiogroup","aria-label":n,"aria-disabled":r||void 0,className:"flex flex-wrap gap-2.5",children:B1.map(l=>a.jsx("button",{type:"button",role:"radio","aria-checked":l===e,"aria-label":f(c(l)?"placeLook.none":jt[l]),title:f(c(l)?"placeLook.none":jt[l]),"data-swatch":l,disabled:r,onClick:()=>t(l),onKeyDown:u=>{const d=u.key==="ArrowRight"||u.key==="ArrowDown"?1:u.key==="ArrowLeft"||u.key==="ArrowUp"?-1:0;if(!d)return;u.preventDefault();const p=B1[(B1.indexOf(l)+d+B1.length)%B1.length];t(p),u.currentTarget.parentElement?.querySelector(`[data-swatch="${p}"]`)?.focus()},tabIndex:l===i?0:-1,className:D("grid size-8 place-items-center rounded-full border transition-[box-shadow] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:cursor-default",c(l)?"border-ink/55 text-ink/55":"border-ink/10",l===e&&D("ring-2 ring-ink/70 ring-offset-2",Mi[o]),r&&l!==e&&"opacity-50"),style:c(l)?void 0:{background:it(l)},children:c(l)&&a.jsx("span",{"aria-hidden":"true",className:"h-[1.5px] w-[60%] -rotate-45 rounded-full bg-current"})},l))})}function Mt(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function On(e,t="|"){return e.map(n=>ir(n)).join(t)}function At(e,t){return typeof t=="bigint"?t.toString():t}class Ai{constructor(t){this._getter=t,this._value=void 0}get value(){const t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}}function at(e){return new Ai(e)}function Ni(e){return e==null}function nn(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Ei(e,t){const n=e/t,r=Math.round(n),o=4*Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}function T1(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function rn(e){const t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function I1(e){return rn(e._zod.def)??e._zod.def.shape}function nr(e,t,n){Object.defineProperty(e,t,{get(){const r=n();return T1(this,t,r),r},enumerable:!0,configurable:!0})}function rr(e,t,n){t in e?T1(e,t,n):e[t]=n}function G1(e,t,n,r){const o=I1(t);for(const s of n){const i=Object.getOwnPropertyDescriptor(o,s);i.enumerable&&(i.get?nr(e,s,()=>{const c=t._zod.def.shape[s];return r?r(c,s):c}):rr(e,s,r?r(i.value,s):i.value))}}function zi(e,t){for(const n of Reflect.ownKeys(t)){const r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?nr(e,n,()=>t[n]):rr(e,n,r.value))}}function p1(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Zi(e){return JSON.stringify(e)}function Oi(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const or="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function we(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Ii=at(()=>{if(v1.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function te(e){if(we(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(we(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function sr(e){return te(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const Pi=new Set(["string","number","symbol"]);function ne(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function U1(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function S(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function ir(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Ti(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}const ar={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},$i={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Ri(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s={};return G1(s,e,ct(e,t)),U1(e,p1(n,{shape:s,checks:[]}))}function ct(e,t){const n=I1(e),r=[];for(const o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&r.push(o)}return r}function Di(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=new Set(ct(e,t)),i={};return G1(i,e,Reflect.ownKeys(I1(e)).filter(c=>!s.has(c))),U1(e,p1(n,{shape:i,checks:[]}))}function Bi(e,t){if(!te(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const o=I1(e);for(const s of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return U1(e,p1(e._zod.def,{shape:cr(e,t)}))}function cr(e,t){const n={};return G1(n,e,Reflect.ownKeys(I1(e))),zi(n,t),n}function Li(e,t){if(!te(t))throw new Error("Invalid input to safeExtend: expected a plain object");return U1(e,p1(e._zod.def,{shape:cr(e,t)}))}function Fi(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const n={};G1(n,e,Reflect.ownKeys(I1(e))),G1(n,t,Reflect.ownKeys(I1(t)));const r=p1(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return U1(e,r)}function In(e,t,n,r="partial"){const s=t._zod.def.checks;if(s&&s.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const c=n?new Set(ct(t,n)):void 0,l={};return G1(l,t,Reflect.ownKeys(I1(t)),e&&((u,d)=>c&&!c.has(d)?u:new e({type:"optional",innerType:u}))),U1(t,p1(t._zod.def,{shape:l,checks:[]}))}function Ui(e,t,n){const r=n?new Set(ct(t,n)):void 0,o={};return G1(o,t,Reflect.ownKeys(I1(t)),(s,i)=>r&&!r.has(i)?s:new e({type:"nonoptional",innerType:s})),U1(t,p1(t._zod.def,{shape:o}))}function Z1(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Wi(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Q1(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function le(e){return typeof e=="string"?e:e?.message}function Pn(e){const t=[];for(const n of e??[]){const r=n._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const o=r.maximum??r.length??r.size;o>=0&&t.push([o,n])}return t}function Nt(e,t,n){var r;for(let o=t;o<e.length;o++)(r=e[o]).schema??(r.schema=n)}function L1(e,t,n){var r;const o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const s=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,i=e.message?e.message:le(e.inst?._zod.def?.error?.(e))??le(s?.(e))??le(t?.error?.(e))??le(n.customError?.(e))??le(n.localeError?.(e))??"Invalid input",c={};for(const l of Object.keys(e))l==="inst"||l==="schema"||l==="continue"||l==="input"||l==="__proto__"||(c[l]=e[l]);return c.path??(c.path=[]),c.message=i,t?.reportInput&&(c.input=e.input),c}const Hi=/[\uD800-\uDBFF]/;function on(e){const t=e.length;if(!Hi.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(n--,r++);return n}function sn(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Vi(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function _e(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function Ji(e,t){for(const n in t){const r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ki(e,n,r.value)}}function F1(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function lr(e,t,n){return F1(e,t,n,!1)}function ur(e,t){for(const n in e){const r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return F1(this,n,r(this))},set(o){F1(this,n,o)}})}return t}function Ki(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:F1(this,t,n.bind(this))},set(r){F1(this,t,r)}})}function Gi(e,t){const n=Object.getPrototypeOf(e);return t in n?void 0:n}let pt,R1=!1;const Yi={configurable:!0,get(){R1=!0}};function R(e,t,n){const r=Object.getPrototypeOf(e._zod);if(t in r&&pt!==e._zod){pt=void 0;return}pt=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Yi);const o=R1;R1=!1;try{const s=n(this);return R1?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:s}),R1=R1||o,s}catch(s){throw delete this[t],R1=R1||o,s}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function qi(e,t,n,r){const o=Gi(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){const s={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,s),s.value=n(this),Object.defineProperty(this,t,s),s.value},set(s){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:s})}})}const Xi="~constantCatch";function Qi(e){const t=()=>e;return t[Xi]=!0,t}var Tn;const ht={value:void 0,enumerable:!1};let $n="captureStackTrace"in Error?Error:null;function e5(e){const t=$n;if(t){const n=t.stackTraceLimit;if(typeof n=="number"){try{t.stackTraceLimit=0}catch{return $n=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function b(e,t,n,r){const o={};function s(h){this.def=h,this.constr=p,this.traits=new Set}s.prototype=o;const i=n,c=i&&new WeakSet;function l(h,C){if(h._zod){if(h._zod.traits.has(e))return}else{ht.value=new s(C);try{Object.defineProperty(h,"_zod",ht)}finally{ht.value=void 0}}if(h._zod.traits.add(e),t(h,C),c){const y=Object.getPrototypeOf(h),x=h._zod.constr.prototype;let k=y;for(;k&&k!==x;)k=Object.getPrototypeOf(k);const _=k??y;c.has(_)||(c.add(_),Ji(_,i))}const g=p.prototype;for(const y in g)Object.prototype.hasOwnProperty.call(g,y)&&(y in h||(h[y]=g[y].bind(h)))}const u=r?.Parent??Object;class d extends u{}Object.defineProperty(d,"name",{value:e});function p(h){const C=r?.Parent?e5(d):this;l(C,h);const g=C._zod.deferred;if(g){for(const x of g)x();C._zod.deferred=void 0}const y=globalThis.__zod_globalConfig?.postProcessor;return y&&y(C),C}return Object.defineProperty(p,"init",{value:l}),Object.defineProperty(p,Symbol.hasInstance,{value:h=>r?.Parent&&h instanceof r.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(p,"name",{value:e}),p}class K1 extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class dr extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(Tn=globalThis).__zod_globalConfig??(Tn.__zod_globalConfig={});const v1=globalThis.__zod_globalConfig;function _1(e){return e&&Object.assign(v1,e),v1}function t5(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,At,2)),e.message}function n5(e){this._zod.message=e}const r5={get:t5,set:n5,enumerable:!0,configurable:!0},Ct={value:void 0,enumerable:!1},Rn=new WeakSet([Object.prototype,Error.prototype]),o5=(e,t)=>{e.name="$ZodError",Ct.value=t,Object.defineProperty(e,"issues",Ct),Ct.value=void 0,Object.defineProperty(e,"message",r5);const n=Object.getPrototypeOf(e);Rn.has(n)||(Rn.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},s5=b("$ZodError",o5);function i5(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function a5(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?i5(n,o.path[0],()=>[]).push(t(o)):r.push(t(o));return{formErrors:r,fieldErrors:n}}function c5(e,t=n=>n.message){const n={_errors:[]},r=(o,s=[])=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(c=>r({issues:c},[...s,...i.path]));else if(i.code==="invalid_key")r({issues:i.issues},[...s,...i.path]);else if(i.code==="invalid_element")r({issues:i.issues},[...s,...i.path]);else{const c=[...s,...i.path];if(c.length===0)n._errors.push(t(i));else{let l=n,u=0;for(;u<c.length;){const d=c[u],p=u===c.length-1;if(d==="_errors"){p&&l._errors.push(t(i)),u++;continue}Object.prototype.hasOwnProperty.call(l,d)||Object.defineProperty(l,d,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const h=l[d];p&&h._errors.push(t(i)),l=h,u++}}}};return r(e),n}function lt(e,t){return{callee:t?.callee??e,Err:t?.Err}}const an=e=>{const t=(n,r,o,s)=>{const i=o?{...o,async:!1}:{async:!1},c=n._zod.run({value:r,issues:[]},i);if(c instanceof Promise)throw new K1;if(c.issues.length){const l=new(s?.Err??e)(c.issues.map(u=>L1(u,i,_1())));throw or(l,s?.callee??t),l}return c.value};return t},cn=e=>{const t=async(n,r,o,s)=>{const i=o?{...o,async:!0}:{async:!0};let c=n._zod.run({value:r,issues:[]},i);if(c instanceof Promise&&(c=await c),c.issues.length){const l=new(s?.Err??e)(c.issues.map(u=>L1(u,i,_1())));throw or(l,s?.callee??t),l}return c.value};return t},ln=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new K1;return s.issues.length?fr(e,s.issues,o):{success:!0,data:s.value}};function fr(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(o=>L1(o,n,_1()))),t=void 0,n=void 0),r},set error(o){r=o,t=void 0,n=void 0}}}const un=e=>async(t,n,r)=>{const o=r?{...r,async:!0}:{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?fr(e,s.issues,o):{success:!0,data:s.value}},l5=Symbol.for("zod.compile.invalid"),u5=Symbol.for("zod.compile.fallback"),d5=((e,t,n)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==l5)return!0;if(r.definite===!0&&n===void 0)return!1}return f5(e,t,n)});function f5(e,t,n){const r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;let s;if(o?(r[u5]=!0,s=o({value:t,issues:[]},r)):s=e._zod.run({value:t,issues:[]},r),s instanceof Promise)throw new K1;return s.issues.length===0}const p5=async(e,t,n)=>{const r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=e._zod.run({value:t,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},h5=e=>{const t=an(e),n=(r,o,s,i)=>{const c=s?{...s,direction:"backward"}:{direction:"backward"};return t(r,o,c,lt(n,i))};return n},C5=e=>{const t=an(e),n=(r,o,s,i)=>t(r,o,s,lt(n,i));return n},m5=e=>{const t=cn(e),n=async(r,o,s,i)=>{const c=s?{...s,direction:"backward"}:{direction:"backward"};return await t(r,o,c,lt(n,i))};return n},g5=e=>{const t=cn(e),n=async(r,o,s,i)=>await t(r,o,s,lt(n,i));return n},b5=e=>(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return ln(e)(t,n,o)},y5=e=>(t,n,r)=>ln(e)(t,n,r),x5=e=>async(t,n,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return un(e)(t,n,o)},v5=e=>async(t,n,r)=>un(e)(t,n,r),k5=/^[cC][0-9a-z]{6,}$/,w5=/^[0-9a-z]+$/,_5=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,S5=/^[0-9a-vA-V]{20}$/,j5=/^[A-Za-z0-9]{27}$/,M5=/^[a-zA-Z0-9_-]{21}$/;function A5(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const N5=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,E5=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Dn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,z5=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Z5="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function O5(){return new RegExp(Z5,"u")}const I5=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,P5=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,T5=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,$5=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,R5=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,D5=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,B5=/^https?$/,L5=/^\+[1-9]\d{6,14}$/,pr="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function F5(e){return new RegExp(`^${e}$`)}const U5=F5(pr);function Et(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function W5(e){return new RegExp(`^${Et(e)}$`)}function H5(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${Et({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,r=e.local?`${n}|${Et({precision:e.precision})}`:n;return new RegExp(`^${pr}T(?:${r})$`)}const V5=/^[\s\S]{0,}$/,J5=/^-?\d+$/,dn=/^-?\d+(?:\.\d+)?$/,K5=/^(?:true|false)$/i,G5=/^null$/i,Y5=/^undefined$/i,q5=/^[^A-Z]*$/,X5=/^[^a-z]*$/,d1=b("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),fn=e=>{const t=e.value;return!Ni(t)&&t.length!==void 0},Ke={number:"number",bigint:"bigint",object:"date"},hr=b("$ZodCheckLessThan",(e,t)=>{d1.init(e,t);const n=Ke[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Ke[typeof r.value]??n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Cr=b("$ZodCheckGreaterThan",(e,t)=>{d1.init(e,t);const n=Ke[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Ke[typeof r.value]??n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Q5=b("$ZodCheckMultipleOf",(e,t)=>{d1.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):Ei(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ea=b("$ZodCheckNumberFormat",(e,t)=>{d1.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=ar[t.format];e._zod.check=i=>{const c=i.value;if(n){if(!Number.isInteger(c)){i.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?i.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):i.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}c<o&&i.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>s&&i.issues.push({origin:"number",input:c,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),ta=b("$ZodCheckMaxLength",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=fn),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>t.maximum?on(o):s)<=t.maximum)return;const c=sn(o);r.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),na=b("$ZodCheckMinLength",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=fn),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>=t.minimum&&s<t.minimum*2?on(o):s)>=t.minimum)return;const c=sn(o);r.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),ra=b("$ZodCheckLengthEquals",(e,t)=>{var n;d1.init(e,t),(n=e._zod.def).when??(n.when=fn),e._zod.check=r=>{const o=r.value,s=o.length,i=typeof o=="string"&&s>=t.length&&s<=t.length*2?on(o):s;if(i===t.length)return;const c=sn(o),l=i>t.length;r.issues.push({origin:c,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),ut=b("$ZodCheckStringFormat",(e,t)=>{var n,r;d1.init(e,t),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),oa=b("$ZodCheckRegex",(e,t)=>{ut.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),sa=b("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=q5),ut.init(e,t)}),ia=b("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=X5),ut.init(e,t)}),aa=b("$ZodCheckIncludes",(e,t)=>{d1.init(e,t);const n=ne(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),ca=b("$ZodCheckStartsWith",(e,t)=>{d1.init(e,t);const n=new RegExp(`^${ne(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),la=b("$ZodCheckEndsWith",(e,t)=>{d1.init(e,t);const n=new RegExp(`.*${ne(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),ua=b("$ZodCheckOverwrite",(e,t)=>{d1.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class da{constructor(t=[],n={}){this.content=[],this.indent=0,this.args=t,this.closed=n}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
2
2
|
`).filter(i=>i),o=Math.min(...r.map(i=>i.length-i.trimStart().length)),s=r.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of s)this.content.push(i)}compile(){const t=Function,n=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
3
3
|
${n.join(`
|
|
4
4
|
`)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as dn,t as n,r as d,j as e,X as es,aj as ts,a as G,f as Ye,o as Xt,b as Bt,aD as ws,S as Ns,i as _t}from"./styles-
|
|
1
|
+
import{c as dn,t as n,r as d,j as e,X as es,aj as ts,a as G,f as Ye,o as Xt,b as Bt,aD as ws,S as Ns,i as _t}from"./styles-Bj-lDRZL.js";import{S as un,n as w,u as et,eq as As,er as Cs,es as Ss,et as ht,D as Rs,eu as Es,ev as zs,l as Is,G as Sn,ew as Ts,ex as Os,cI as Bs,T as Ps,ah as en,br as Ms,ey as Rt,ez as ns,eA as Et,eB as ss,an as as,eC as zt,eD as Ls,eE as is,eF as It,eG as os,eH as Us,eI as Rn,eJ as $s,Y as cs,eK as Nt,eL as Fs,eM as Ks,eN as Ds,eO as Qs,eP as Hs,eQ as ct,eR as En,eS as Js,eT as zn,e4 as In,eU as _s,eV as Vs,eW as Gs,eX as Vt,eY as qs,eZ as Zs,e_ as Ws,e$ as Ys,f0 as Xs,f1 as ea,f2 as ta,f3 as na,f4 as sa,f5 as aa,f6 as ia}from"./App-X_zk2xl3.js";import{L as ae,P as rs,X as oa,a as ca,y as pn,E as ra,$ as la,B as da}from"./PlacesRail-B9RHHjvB.js";import{u as Gt}from"./mcp-servers-Cu4E6BBW.js";import{C as ls,R as tn}from"./MenuMotion-V6wxTHIu.js";import{u as ua}from"./ProIntroduction-CC1iFzJ8.js";import"./index-DJPPxxyF.js";import"./monitor-DUEBF6Jm.js";const pa=[["path",{d:"M13 2a9 9 0 0 1 9 9",key:"1itnx2"}],["path",{d:"M13 6a5 5 0 0 1 5 5",key:"11nki7"}],["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"}]],ma=dn("phone-call",pa);const ha=[["path",{d:"M4.9 16.1C1 12.2 1 5.8 4.9 1.9",key:"s0qx1y"}],["path",{d:"M7.8 4.7a6.14 6.14 0 0 0-.8 7.5",key:"1idnkw"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}],["path",{d:"M16.2 4.8c2 2 2.26 5.11.8 7.47",key:"ojru2q"}],["path",{d:"M19.1 1.9a9.96 9.96 0 0 1 0 14.1",key:"rhi7fg"}],["path",{d:"M9.5 18h5",key:"mfy3pd"}],["path",{d:"m8 22 4-11 4 11",key:"25yftu"}]],xa=dn("radio-tower",ha);const fa=[["path",{d:"m10.852 14.772-.383.923",key:"11vil6"}],["path",{d:"M13.148 14.772a3 3 0 1 0-2.296-5.544l-.383-.923",key:"1v3clb"}],["path",{d:"m13.148 9.228.383-.923",key:"t2zzyc"}],["path",{d:"m13.53 15.696-.382-.924a3 3 0 1 1-2.296-5.544",key:"1bxfiv"}],["path",{d:"m14.772 10.852.923-.383",key:"k9m8cz"}],["path",{d:"m14.772 13.148.923.383",key:"1xvhww"}],["path",{d:"M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5",key:"tn8das"}],["path",{d:"M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5",key:"1g2pve"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"m9.228 10.852-.923-.383",key:"1wtb30"}],["path",{d:"m9.228 13.148-.923.383",key:"1a830x"}]],qt=dn("server-cog",fa),ga=new Set(["twitter","x"]);function Tn(t,s){return t!=="managed"||!ga.has(s.trim().toLowerCase())?null:"Twitter/X needs your own X Developer app and Composio auth config. Use self-hosted connected apps for now."}const ba=5,ya=3,Tt=4;function ka(t,s=ba,c=[]){const o=new Map;for(const g of t)for(const k of new Set(g.categories??[]))o.set(k,(o.get(k)??0)+1);const r=[...o].sort((g,k)=>k[1]-g[1]||g[0].localeCompare(k[0])).map(([g])=>g),l=c.filter(g=>r.indexOf(g)>=s),y=[...r.slice(0,Math.max(0,s-l.length)),...l];return{inline:y,more:r.filter(g=>!y.includes(g))}}function nn(t,s){return s===null||(t.categories??[]).includes(s)}function ja(t,s,c){const o=[],r=t.filter(l=>s(l.slug));r.length&&o.push({kind:"connected",cards:r});for(const l of c.slice(0,ya)){const y=t.filter(g=>!s(g.slug)&&nn(g,l));y.length&&o.push({kind:"category",category:l,cards:y.slice(0,Tt),more:y.length>Tt})}return o.push({kind:"all",cards:t.filter(l=>!s(l.slug))}),o}const va={productivity:"productivity","developer tools":"developerTools",communication:"communication",files:"files","sales and crm":"salesCrm",design:"design",marketing:"marketing",analytics:"analytics",social:"social"},wa={"google calendar":"googleCalendar","google sheets":"googleSheets","google docs":"googleDocs",notion:"notion",github:"github",linear:"linear",sentry:"sentry",jira:"jira",slack:"slack",gmail:"gmail",discord:"discord","google drive":"googleDrive",posthog:"posthog","x (twitter)":"xTwitter",reddit:"reddit",zapier:"zapier",hubspot:"hubspot",salesforce:"salesforce",asana:"asana",trello:"trello",dropbox:"dropbox",airtable:"airtable",figma:"figma",stripe:"stripe"};function rt(t){const s=va[t.trim().toLowerCase()];return s?n(`apps.category.${s}`):t}function On(t){const s=wa[t.label.trim().toLowerCase()];return s?n(`apps.catalog.${s}.blurb`):t.blurb}function Na({server:t,disabled:s,onSaved:c}){const[o,r]=d.useState(!1),[l,y]=d.useState(null);if(typeof t.apps!="boolean"||t.apps&&t.hasApps!==!0)return null;const g=t.apps,k=async()=>{r(!0),y(null);try{const p=await w(`/api/mcp/servers/${encodeURIComponent(t.name)}`,{method:"PATCH",body:JSON.stringify({apps:!g})});c(p.servers??[])}catch(p){y(p instanceof Error?p.message:String(p))}finally{r(!1)}};return e.jsxs("div",{"data-mcp-apps":t.name,className:"mt-3 flex items-center gap-3 border-t border-hairline/40 pt-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"text-[13px] font-medium text-ink",children:n("mcp.apps.title")}),e.jsx("div",{role:l?"alert":void 0,className:l?"mt-0.5 text-[12px] text-danger":"mt-0.5 text-[12px] text-ink-secondary",children:l??n("mcp.apps.desc")})]}),o&&e.jsx(ae,{"aria-hidden":"true",size:13,className:"animate-spin text-ink-secondary"}),e.jsx(un,{checked:g,disabled:s||o,onClick:()=>{k()},"aria-label":n("mcp.apps.toggleAria",{name:t.name}),className:"disabled:opacity-40"})]})}function Bn({feature:t,enabled:s,prefix:c}){const{dispatch:o}=et(),[r,l]=d.useState(!1),[y,g]=d.useState(!1),k=async()=>{if(!r){l(!0),g(!1);try{const p=await w("/api/config",{method:"PATCH",body:JSON.stringify({features:{[t]:!s}})});o({type:"configStatus",config:p})}catch{g(!0)}finally{l(!1)}}};return e.jsxs("div",{className:"mt-4 flex items-start justify-between gap-4 rounded-2xl border border-hairline/50 bg-card px-4 py-4 sm:px-5",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-[14px] font-medium text-ink",children:n(`${c}.title`)}),e.jsx("p",{className:"mt-1 text-[12px] leading-relaxed text-ink-secondary",children:n(`${c}.desc`)}),y&&e.jsx("p",{role:"alert",className:"mt-1 text-[12px] text-danger",children:n("mcp.claude.error")})]}),e.jsx(un,{checked:s,"aria-label":n(`${c}.aria`),disabled:r,onClick:()=>{k()},className:"mt-0.5 shrink-0 disabled:cursor-wait disabled:opacity-50"})]})}function Aa(){const{state:t}=et();return e.jsxs(e.Fragment,{children:[e.jsx(Bn,{feature:"claudeUserMcp",enabled:As(t.config),prefix:"mcp.claude"}),e.jsx(Bn,{feature:"claudeUserSkills",enabled:Cs(t.config),prefix:"mcp.claudeSkills"})]})}function Pn({app:t}){if("image"in t.icon)return e.jsx("img",{src:t.icon.image,alt:"",className:"size-10 shrink-0 rounded-xl object-contain"});const s=t.icon.glyph;return e.jsx("span",{className:"flex size-10 shrink-0 items-center justify-center rounded-xl bg-raised text-ink-secondary",children:e.jsx(s,{size:19,"aria-hidden":"true"})})}class me extends Error{key;constructor(s){super(s),this.key=s}}const sn=/^https?:\/\//i,ds=/^[A-Za-z_][A-Za-z0-9_]*=/,Ca=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+:/,Sa=new Set(["npx","uvx","bunx"]),Ra=new Set(["pnpm","yarn"]);function Ea(t,s=[]){const c=za(t).trim();if(!c)return null;try{const o=/^[{[]/.test(c)?La(c):sn.test(c)&&!/\s/.test(c)?[mn(void 0,c,void 0,[])]:Ia(c);return{ok:!0,servers:Da(o,s)}}catch(o){if(o instanceof me)return{ok:!1,error:o.key};throw o}}function za(t){return t.replace(/[“”„]/g,'"').replace(/[‘’]/g,"'").replace(/(^|\s)[–—](?=[a-z])/g,"$1--")}function us(t){const s=[];let c=[],o="",r=!1;const l=()=>{r&&c.push(o),o="",r=!1},y=()=>{l(),c.length&&s.push(c),c=[]},g=k=>t[k]===`
|
|
2
2
|
`?1:t[k]==="\r"&&t[k+1]===`
|
|
3
3
|
`?2:0;for(let k=0;k<t.length;k+=1){const p=t[k];if(p==="\\"||(p==="`"||p==="^")&&g(k+1)){const h=g(k+1);if(h){k+=h;continue}k+1<t.length&&(o+=t[k+1],r=!0,k+=1);continue}if(p==="'"){const h=t.indexOf("'",k+1);if(h<0)throw new me("mcp.paste.notRecognized");o+=t.slice(k+1,h),r=!0,k=h;continue}if(p==='"'){let h=k+1;for(;h<t.length&&t[h]!=='"';h+=1){if(t[h]==="\\"&&h+1<t.length){const A=g(h+1);if(A){h+=A;continue}if('"\\$`'.includes(t[h+1])){o+=t[h+1],h+=1;continue}}o+=t[h]}if(h>=t.length)throw new me("mcp.paste.notRecognized");r=!0,k=h;continue}if(p==="$"&&t[k+1]==="("){const h=t.indexOf(")",k+2);if(h<0)throw new me("mcp.paste.notRecognized");o+=t.slice(k,h+1),r=!0,k=h;continue}if(p==="#"&&!r){for(;k+1<t.length&&t[k+1]!==`
|
|
4
4
|
`;)k+=1;continue}if(p===`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p,h as w,k as f,l as g,m as b,j as e,t,u as y,q as j,g as N}from"./styles-
|
|
1
|
+
import{r as p,h as w,k as f,l as g,m as b,j as e,t,u as y,q as j,g as N}from"./styles-Bj-lDRZL.js";import{u as k,a2 as C,a3 as h,a4 as A}from"./App-X_zk2xl3.js";function x(n,s){const r=n&&!window.ogb?.remoteClient?.active?window.ogb?.cloudAccount:void 0,[i,o]=p.useState(null),a=r?.offer?JSON.stringify(s??null):null;return p.useEffect(()=>{if(a===null||!r?.offer)return;let l=!0;return r.offer().then(c=>{l&&o(c)},()=>{}),()=>{l=!1}},[r,a]),r?.offer?i:null}function m(){const n=window.ogb?.remoteClient?.active?void 0:window.ogb?.cloudAccount,[s,r]=p.useState(null);return p.useEffect(()=>{if(!n)return;let i=!0,o=!1;const a=n.onState(l=>{o=!0,i&&r(l)});return n.state().then(l=>{i&&!o&&r(l)}).catch(()=>{}),()=>{i=!1,a()}},[n]),n?{view:w(s),account:s}:null}function I(){const{dispatch:n}=k(),s=m(),r=s!==null&&f(s.view),i=x(r,s?.account?.offer);if(!s)return null;const{view:o}=s;if(r){const l=g(i)!==null,c=b(i),u=i?Math.min(...i.plans.map(d=>d.amount)):null;return e.jsxs("section",{"aria-label":t("pro.name"),"data-cloud-offer":l?"trial":i?"plans":"none",className:"flex flex-wrap items-center justify-between gap-3 rounded-xl border border-hairline/50 p-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(C,{className:"text-ink-secondary",size:18,"aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-[14px] font-semibold text-ink",children:t("pro.name")}),e.jsx("p",{className:"mt-1 text-[12px] text-ink-secondary",children:t("pro.settingsSummary")}),u!==null&&e.jsx("p",{className:"mt-1 text-[12px] text-ink-secondary",children:t("pro.fromPrice",{price:y(u/100)})}),c&&e.jsx("p",{className:"mt-1 text-[12px] text-ink-secondary",children:c}),e.jsx("p",{className:"mt-1 text-[12px] text-ink-secondary",children:t("pro.disclaimer")})]})]}),e.jsxs("div",{className:"flex flex-col items-end gap-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx("button",{type:"button",className:"cursor-pointer text-[13px] text-ink-secondary underline underline-offset-2 hover:text-ink",onClick:()=>n({type:"openCloudAdd",source:"app_settings"}),children:t("pro.seePlans")}),e.jsx("button",{type:"button",className:"ui-button ui-button-primary",onClick:()=>n({type:"openCloudAdd",source:"app_settings"}),children:t(l?"cloudIntro.start":"cloudAccount.upgrade")})]}),o.kind==="signed-out"&&e.jsx("button",{type:"button",className:"cursor-pointer text-[13px] font-medium text-accent-text underline underline-offset-2 hover:text-ink",onClick:()=>n({type:"openCloudAdd",source:"app_settings",signIn:!0}),children:t("cloudAccount.signIn")})]})]})}const a=j(o);return!a&&o.kind!=="reauth"?null:e.jsxs("section",{"aria-label":t("settings.section.cloudAccount"),"data-cloud-plan":o.kind,className:"flex flex-wrap items-center justify-between gap-3 rounded-xl border border-hairline/50 p-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(N,{className:"text-ink-secondary",size:18,"aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-[14px] font-semibold text-ink",children:t("settings.section.cloudAccount")}),e.jsx("p",{className:"mt-1 text-[12px] text-ink-secondary",children:o.kind==="reauth"?t("pro.reauthShort"):a})]})]}),e.jsx("button",{type:"button",className:"ui-button",onClick:()=>n({type:"toggleAppSettings",open:!0,section:"cloudAccount"}),children:t("pro.openCloudSettings")})]})}function _({place:n,usage:s=null,upgrade:r}){const{dispatch:i}=k(),o=m(),a=o!==null&&f(o.view),l=x(a,o?.account?.offer);if(!o)return null;if(a){const u=g(l)!==null,d=l&&l.plans.length?Math.min(...l.plans.map(v=>v.amount)):null;return e.jsx(h,{title:t("pro.name"),subtitle:n==="plan"&&d!==null?t("pro.fromPrice",{price:y(d/100)}):t("pro.settingsSummary"),children:e.jsxs("div",{className:"flex items-center gap-3",children:[n==="plan"&&o.view.kind==="signed-out"&&e.jsx("button",{type:"button",className:"cursor-pointer text-[13px] text-ink-secondary hover:text-ink",onClick:()=>i({type:"openCloudAdd",source:"app_settings",signIn:!0}),children:t("cloudAccount.signIn")}),e.jsx("button",{type:"button","data-cloud-offer":u?"trial":"plans",className:"ui-button ui-button-primary",onClick:()=>i({type:"openCloudAdd",source:"app_settings"}),children:t(u?"cloudIntro.start":"cloudAccount.upgrade")})]})})}const c=o.view.kind==="reauth"?t("pro.reauthShort"):j(o.view);return c?e.jsx(h,{title:t("pro.name"),subtitle:c,children:n==="account"?e.jsx("button",{type:"button","data-cloud-plan":o.view.kind,className:"ui-button",onClick:()=>i({type:"toggleAppSettings",open:!0,section:"cloudAccount"}),children:t("settings.simple.account.manage")}):s&&r?e.jsx(A,{usage:s,upgrade:r}):null}):null}function B(){const n=m(),s=n!==null&&f(n.view),r=x(s,n?.account?.offer);return s?[t("pro.disclaimer"),b(r)].filter(Boolean).join(" "):null}export{_ as C,I as P,x as a,B as b,m as u};
|
package/dist/assets/{RemoteAgentSettingsPanel-DxXqwhrm.js → RemoteAgentSettingsPanel-BmTQFEnJ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as e,C as w,t as n,X as C,a as S}from"./styles-
|
|
1
|
+
import{r,j as e,C as w,t as n,X as C,a as S}from"./styles-Bj-lDRZL.js";import{u as A,I as z,T,B as p,V as L,k as P,S as B,m as E,n as I}from"./App-X_zk2xl3.js";import{u as R,B as F,L as U,b as V}from"./PlacesRail-B9RHHjvB.js";import"./index-DJPPxxyF.js";import"./monitor-DUEBF6Jm.js";import"./MenuMotion-V6wxTHIu.js";function M({bot:t,overlay:b=!1}){const{dispatch:f}=A(),{dragProps:k}=R(),[x,g]=r.useState(!1),[h,l]=r.useState(""),[v,j]=r.useState(!1),d=r.useRef(null),o=r.useRef(null),c=r.useRef(null),y=()=>f({type:"toggleSettings",open:!1}),i=a=>{if(o.current={...o.current,...a},c.current)return c.current;g(!0),l("");const s=async()=>{for(;o.current;){const u=o.current;o.current=null,l("");try{const m=await I(`/api/bots/${t.id}/profile`,{method:"PATCH",body:JSON.stringify(u)});f({type:"botPatched",bot:m.bot})}catch(m){l(m instanceof Error?m.message:n("remoteAgent.updateFailed"))}}};return c.current=s().finally(()=>{c.current=null,g(!1)}),c.current},N=async a=>{if(a){j(!0),l("");try{const s=await E(a),u=s?V(s.path):null;if(!u)throw new Error(n("settings.profile.avatar.invalidType"));await i({avatarUrl:u,avatarCrop:t.avatarCrop==="square"?"square":"circle"})}catch(s){l(s instanceof Error?s.message:String(s))}finally{j(!1),d.current&&(d.current.value="")}}};return e.jsxs("aside",{className:S("animate-panel-in absolute inset-0 z-40 flex h-full min-w-0 flex-col border-l border-hairline/40 bg-panel",b?"md:left-auto md:w-[400px] md:shadow-2xl":"md:relative md:z-20 md:w-[400px] md:shrink-0"),children:[e.jsxs("div",{...k,className:"flex items-center justify-between px-4 py-3",children:[e.jsx("button",{onClick:y,"aria-label":n("remoteAgent.collapse"),className:"flex size-10 items-center justify-center rounded-md text-ink-secondary hover:bg-control hover:text-ink",children:e.jsx(w,{size:18})}),e.jsx("span",{className:"text-[15px] font-semibold text-ink",children:n("remoteAgent.title")}),e.jsx("button",{onClick:y,"aria-label":n("remoteAgent.close"),className:"flex size-10 items-center justify-center rounded-md text-ink-secondary hover:bg-control hover:text-ink",children:e.jsx(C,{size:18})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-5 pb-5",children:e.jsxs("div",{className:"flex flex-col gap-4 pt-4",children:[e.jsxs("div",{className:"rounded-xl bg-card p-4",children:[e.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[e.jsx(F,{bot:t,state:"idle",size:64,motion:"none",motionKey:0,animated:!1}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("input",{ref:d,type:"file",accept:"image/png,image/jpeg,image/gif,image/webp",className:"sr-only",onChange:a=>{N(a.target.files?.[0])}}),e.jsxs("button",{type:"button",disabled:v||x,onClick:()=>d.current?.click(),className:"flex items-center gap-1.5 rounded-lg bg-control px-3 py-2 text-[13px] text-ink hover:bg-raised-hover disabled:opacity-50",children:[v?e.jsx(U,{size:14,className:"animate-spin"}):e.jsx(z,{size:14})," ",n("botIdentity.avatar")]}),t.avatarUrl&&e.jsx("button",{type:"button",disabled:x,onClick:()=>{i({avatarUrl:null,avatarCrop:"mascot"})},"aria-label":n("remoteAgent.removeAvatar"),className:"flex size-9 items-center justify-center rounded-lg text-ink-secondary hover:bg-control hover:text-danger",children:e.jsx(T,{size:14})})]})]}),e.jsxs("label",{className:"block text-[12px] font-medium text-ink-secondary",children:[n("botSettings.identity.name"),e.jsx("input",{defaultValue:t.name,maxLength:p.name,onBlur:a=>{const s=a.currentTarget.value.trim();s&&s!==t.name&&i({name:s})},className:"mt-1 w-full rounded-lg bg-inset px-3 py-2 text-[14px] text-ink focus:outline-none focus:ring-1 focus:ring-accent"},t.id)]}),e.jsxs("label",{className:"mt-3 block text-[12px] font-medium text-ink-secondary",children:[n("botSettings.identity.title"),e.jsx("input",{defaultValue:t.title??"",maxLength:p.title,onBlur:a=>{a.currentTarget.value!==(t.title??"")&&i({title:a.currentTarget.value})},className:"mt-1 w-full rounded-lg bg-inset px-3 py-2 text-[14px] text-ink focus:outline-none focus:ring-1 focus:ring-accent"},t.id)]}),e.jsxs("label",{className:"mt-3 block text-[12px] font-medium text-ink-secondary",children:[n("remoteAgent.description"),e.jsx("textarea",{defaultValue:t.description??"",maxLength:p.description,rows:4,onBlur:a=>{a.currentTarget.value!==(t.description??"")&&i({description:a.currentTarget.value})},className:"mt-1 w-full resize-y rounded-lg bg-inset px-3 py-2 text-[13px] leading-relaxed text-ink focus:outline-none focus:ring-1 focus:ring-accent"},t.id)]})]}),e.jsx(L,{bot:t,workspaceConfigurationLocked:!0,onPatch:a=>{i(a)}}),e.jsxs("div",{className:"flex items-center justify-between gap-4 rounded-xl bg-card p-4",children:[e.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[e.jsx(P,{size:16,className:"mt-0.5 shrink-0 text-ink-secondary"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[15px] font-medium text-ink",children:n("notifications.title")}),e.jsx("div",{className:"mt-0.5 text-[12px] leading-relaxed text-ink-secondary",children:n("remoteAgent.notificationsHint")})]})]}),e.jsx(B,{checked:t.notifications,disabled:x,"aria-label":n("remoteAgent.notifications"),onClick:()=>{i({notifications:!t.notifications})}})]}),h?e.jsx("div",{role:"alert",className:"text-[12px] text-danger",children:h}):null]})})]})}export{M as RemoteAgentSettingsPanel};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,a as z,t,J as F,r as d,S as L,X as B}from"./styles-
|
|
1
|
+
import{j as e,a as z,t,J as F,r as d,S as L,X as B}from"./styles-Bj-lDRZL.js";import{E as O,C as $,T as G,B as E,j as K,u as q,r as H}from"./PlacesRail-B9RHHjvB.js";import{an as U,u as g,ao as A,ap as W,aq as J,ar as X,as as _,at as Q,au as V,av as Y,aw as M,ax as Z,ay as ee,az as ae,M as te,aA as se,aB as ne,aC as oe,aD as re,aE as le,aF as ie,aG as ce,aH as P,aI as R,aJ as de,aK as ue,aL as pe,aM as S,aN as k,aO as me,d as fe,aP as xe,aQ as he,aR as be,aS as je,aT as ye,aU as ke,aV as ge,aW as C,aX as we,ac as ve,aY as Re}from"./App-X_zk2xl3.js";import{C as Se}from"./MenuMotion-V6wxTHIu.js";import"./monitor-DUEBF6Jm.js";import"./index-DJPPxxyF.js";function N(a){return a===60?t("room.panel.hour"):a%60===0?t("room.panel.hours",{hours:a/60}):t("room.panel.minutes",{minutes:a})}function Ce(a){const{dispatch:n}=g(),l=F(),u=A(a.threadId),o=W(a),[p,r]=d.useState(null),f=a.messages,h=f.length>0,s=()=>oe({title:a.name,messages:f,isGroup:!0}),x=l?[]:J(a.tasks??[]),m=X(a.usage);return{items:[{key:"find",label:t("chat.find"),icon:e.jsx(L,{size:16}),active:u,trailing:e.jsx(Q,{id:"find-conversation"}),onSelect:()=>_(a.threadId)},...l?[]:[{key:"new-thread",heading:t("task.list"),separatorBefore:!0,label:t("task.newShort"),icon:e.jsx(V,{size:16}),onSelect:()=>n({type:"newGroupTask",groupId:a.id})}],...x.length<2?[]:[{key:"threads",label:t("task.switch"),icon:e.jsx(M,{size:16}),value:String(x.length),submenu:x.map(i=>({key:`thread:${i.threadId}`,label:Y(i.title||t("task.newShort")),active:i.threadId===a.threadId,onSelect:()=>n({type:"switchGroupTask",groupId:a.id,threadId:i.threadId})})),onSelect:()=>{}}],{key:"copy",heading:t("chat.export.heading"),separatorBefore:!0,label:t("chat.export.copy"),icon:e.jsx($,{size:16}),disabled:!h,keepOpen:!0,trailing:p&&e.jsx("span",{role:"status",className:"text-[11px] text-ink-secondary",children:t(p==="copied"?"chat.export.copied":"chat.export.copyFailed")}),onSelect:()=>{Z(s()).then(i=>r(i?"copied":"failed"))}},{key:"download",label:t("chat.export.download"),icon:e.jsx(te,{size:16}),disabled:!h,onSelect:()=>ee(ae(a.name),s())},{key:"turn-limit",label:t("room.panel.turnLimit"),icon:e.jsx(G,{size:16}),separatorBefore:!0,value:N(o.saved??o.globalMinutes),submenu:[{key:"turn-limit:default",label:t("room.turnLimit.default",{minutes:o.globalMinutes}),active:o.saved===null,onSelect:()=>o.save(null)},...se.map(i=>({key:`turn-limit:${i}`,label:N(i),active:o.saved===i,onSelect:()=>o.save(i)}))],onSelect:()=>{}},...m?[{key:"usage",label:t("chat.usage.menu"),icon:e.jsx(ne,{size:16}),keepOpen:!0,trailing:e.jsx("span",{title:m.title,"data-testid":"group-usage-chip",className:"tabular-nums text-[12px] text-ink-secondary",children:m.short}),onSelect:()=>{}}]:[]],on:u}}function Ne({group:a}){const{items:n,on:l}=Ce(a);return e.jsx(U,{items:n,ariaLabel:t("chat.more"),triggerClassName:"rounded-full",triggerTitle:t("chat.more"),renderTrigger:({open:u})=>e.jsx("span",{"data-testid":"room-more",className:z("flex size-8 items-center justify-center rounded-full bg-raised/50 transition-colors hover:bg-raised","max-md:size-9 max-md:border max-md:border-hairline max-md:bg-card",u||l?"text-accent":"text-ink"),children:e.jsx(O,{size:16})})})}function Te({group:a}){return e.jsx(Ne,{group:a},a.threadId)}function ze({group:a,members:n}){const{state:l,dispatch:u}=g(),o=re(l.config),p=le(a,n),r=ie(p),f=s=>{s!==r&&u({type:"patchGroup",groupId:a.id,patch:{defaultResponder:de(s,p)}})},h=[{choice:"auto",title:t("room.panel.responder.autoOption"),hint:o?void 0:t("room.responder.autoOff",{name:ce(a,n)??t("room.responder.leadFallback")})},{choice:"everyone",title:t("room.panel.responder.everyone")},{choice:"mentions",title:t("room.panel.responder.mentions")}];return e.jsx("div",{role:"radiogroup","aria-label":t("room.panel.whoResponds"),children:e.jsxs(P,{children:[n.map(s=>e.jsx(R,{"data-panel-choice":`member:${s.id}`,title:e.jsxs("span",{className:"flex min-w-0 items-center gap-2.5",children:[e.jsx(E,{bot:s,state:K(s.mascotExpression)??"happy",size:22,animated:!1}),e.jsx("span",{className:"truncate",children:s.name})]}),checked:r===`member:${s.id}`,onClick:()=>f(`member:${s.id}`)},s.id)),h.map(({choice:s,title:x,hint:m})=>e.jsx(R,{"data-panel-choice":s,title:x,hint:m,checked:r===s,onClick:()=>f(s)},s))]})})}const T={responder:{title:"room.panel.whoResponds",intro:"room.panel.responder.intro"},folder:{title:"room.folder.title",intro:"room.folder.detail"}};function Ee({group:a,members:n}){return e.jsxs("div",{className:"flex flex-col items-center text-center",children:[e.jsx("div",{"data-room-panel-faces":!0,className:"mt-0.5 flex -space-x-3",children:n.slice(0,3).map(l=>e.jsx(E,{bot:l,state:"happy",size:52,animated:!1},l.id))}),e.jsx("h2",{id:"room-panel-title",className:"mt-2.5 max-w-full truncate px-1.5 text-[18px] font-semibold text-ink",children:a.name}),a.description&&e.jsx("p",{className:"mt-px line-clamp-2 max-w-full text-[13px] text-ink-secondary",children:a.description})]})}function Me({group:a}){const n=ke(a),l=d.useRef(null),u=d.useRef(!1);d.useEffect(()=>{n.open||!u.current||(u.current=!1,l.current?.focus())},[n.open]);const o=r=>{r.key==="Escape"&&(r.preventDefault(),r.stopPropagation()),(r.key==="Escape"||r.key==="Enter"&&(r.metaKey||r.ctrlKey))&&(u.current=!0),n.onKeyDown(r)};if(n.open)return e.jsxs(ge,{"data-panel-row":"instructions",children:[e.jsx(C,{title:t("room.panel.instructions")}),e.jsx("textarea",{autoFocus:!0,dir:"auto","aria-label":t("room.panel.instructions"),value:n.draft,onChange:r=>n.setDraft(r.target.value),onBlur:n.save,onKeyDown:o,placeholder:t("room.bulletin.placeholder"),rows:6,className:"w-full resize-y rounded-lg border border-hairline bg-inset px-2.5 py-2 text-[13px] leading-relaxed text-ink outline-none placeholder:text-ink-tertiary focus:border-accent-border"}),e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{type:"button","data-panel-done":"instructions",onMouseDown:r=>r.preventDefault(),onClick:()=>{u.current=!0,n.save()},className:we,children:t("botSettings.simple.done")})})]});const p=a.bulletin.split(`
|
|
2
2
|
`)[0]?.trim();return e.jsxs("button",{ref:l,type:"button","data-panel-edit":"instructions","aria-label":`${t("botSettings.simple.edit")}: ${t("room.panel.instructions")}`,onClick:n.start,className:z(Re,"w-full text-left hover:bg-ink/[0.03]"),children:[e.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-lg bg-ink/[0.05] text-ink-secondary max-md:size-8 max-md:rounded-full","aria-hidden":"true",children:e.jsx(ve,{size:15})}),e.jsx(C,{title:t("room.panel.instructions"),hint:e.jsx("span",{dir:"auto",className:"line-clamp-1",children:p||t("room.panel.instructionsHint")})}),e.jsx(Se,{size:15,className:"shrink-0 text-ink-tertiary","aria-hidden":"true"})]})}function Oe({group:a,overlay:n=!1}){const{state:l}=g(),{dragProps:u}=q(),[o,p]=d.useState(null),[r,f]=d.useState(!1),h=d.useRef(null),s=d.useRef(null),x=d.useRef(null),m=d.useRef(null),b=d.useMemo(()=>a.memberIds.map(c=>l.bots.find(y=>y.id===c)).filter(c=>!!c),[a.memberIds,l.bots]),i=ue(a),I=d.useCallback(()=>f(!1),[]),w=c=>{p(c),s.current?.scrollTo({top:0})},v=()=>{m.current=o,p(null)};d.useEffect(()=>{o!==null?s.current?.querySelector("[data-panel-back]")?.focus():m.current&&(s.current?.querySelector(`[data-panel-page="${m.current}"]`)?.focus(),m.current=null)},[o]),d.useEffect(()=>{const c=h.current;c?.focus();const y=j=>{j.key!=="Escape"||j.defaultPrevented||c&&j.target instanceof Node&&!c.contains(j.target)||(j.preventDefault(),S({refocus:!0}))};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[]);const D=c=>{c.key!=="Escape"||c.defaultPrevented||o===null||(c.preventDefault(),c.stopPropagation(),v())};return e.jsxs(e.Fragment,{children:[e.jsxs("aside",{ref:h,role:"dialog","aria-labelledby":"room-panel-title",tabIndex:-1,"data-room-panel":!0,onKeyDown:D,className:je(n,!0),children:[e.jsxs("div",{...u,className:"flex h-[52px] shrink-0 items-center justify-end gap-2 px-3.5",children:[e.jsx(Te,{group:a}),e.jsx("button",{type:"button",onClick:()=>S({refocus:!0}),"aria-label":t("botSettings.simple.close"),className:pe,children:e.jsx(B,{size:16,className:"pointer-events-none"})})]}),e.jsx("div",{ref:s,className:"@container relative min-h-0 flex-1 overflow-y-auto px-5 pb-7",children:o===null?e.jsxs(e.Fragment,{children:[e.jsx(Ee,{group:a,members:b}),e.jsxs(P,{children:[e.jsx(k,{"data-panel-page":"responder",icon:M,title:t("room.panel.whoResponds"),value:me(a,b),onClick:()=>w("responder")}),e.jsx(k,{"data-panel-page":"folder",icon:fe,title:t("room.folder.title"),value:i?.name??t("room.panel.folder.own"),tooltip:i?.path,onClick:()=>w("folder")}),e.jsx(Me,{group:a}),e.jsx(k,{ref:x,"data-panel-row":"members",icon:xe,title:t("room.panel.members"),value:String(b.length),onClick:()=>f(!0)})]})]}):e.jsxs("div",{"data-panel-page-view":o,children:[e.jsx("span",{id:"room-panel-title",className:"sr-only",children:a.name}),e.jsx(he,{back:a.name,title:t(T[o].title),intro:t(T[o].intro),onBack:v}),e.jsx("div",{className:"mt-4 flex flex-col gap-3",children:o==="responder"?e.jsx(ze,{group:a,members:b}):e.jsx(be,{group:a,heading:!1})})]})})]}),r&&H.createPortal(e.jsx(ye,{group:a,onClose:I,triggerRef:x}),document.body)]})}export{Oe as RoomPanel};
|