agent-tower 0.7.0 → 0.7.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/runtime/__tests__/acp-process-manager.test.js +62 -11
- package/dist/runtime/__tests__/acp-process-manager.test.js.map +1 -1
- package/dist/runtime/__tests__/deepseek-hermes-definition.test.js +6 -3
- package/dist/runtime/__tests__/deepseek-hermes-definition.test.js.map +1 -1
- package/dist/runtime/__tests__/tool-frame-normalizer.test.d.ts +2 -0
- package/dist/runtime/__tests__/tool-frame-normalizer.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/tool-frame-normalizer.test.js +120 -0
- package/dist/runtime/__tests__/tool-frame-normalizer.test.js.map +1 -0
- package/dist/runtime/acp/agents/codex.js +3 -3
- package/dist/runtime/acp/agents/codex.js.map +1 -1
- package/dist/runtime/acp/agents/deepseek-hermes.d.ts +0 -1
- package/dist/runtime/acp/agents/deepseek-hermes.d.ts.map +1 -1
- package/dist/runtime/acp/agents/deepseek-hermes.js +7 -10
- package/dist/runtime/acp/agents/deepseek-hermes.js.map +1 -1
- package/dist/runtime/acp/agents/native-agent.d.ts +3 -1
- package/dist/runtime/acp/agents/native-agent.d.ts.map +1 -1
- package/dist/runtime/acp/agents/native-agent.js +1 -0
- package/dist/runtime/acp/agents/native-agent.js.map +1 -1
- package/dist/runtime/acp/agents/tool-frame-normalizer.d.ts +25 -0
- package/dist/runtime/acp/agents/tool-frame-normalizer.d.ts.map +1 -0
- package/dist/runtime/acp/agents/tool-frame-normalizer.js +192 -0
- package/dist/runtime/acp/agents/tool-frame-normalizer.js.map +1 -0
- package/dist/runtime/acp/process-manager.js +14 -6
- package/dist/runtime/acp/process-manager.js.map +1 -1
- package/dist/web/assets/{AgentDemoPage-B_9OhUu7.js → AgentDemoPage-B6pABvRL.js} +1 -1
- package/dist/web/assets/{AgentEnvironmentSettingsPage-D7pZQLiC.js → AgentEnvironmentSettingsPage-CqMfdwkM.js} +1 -1
- package/dist/web/assets/{AgentLogo-C0bPAxbG.js → AgentLogo-Ntqe3_Mx.js} +1 -1
- package/dist/web/assets/{ConversationPage-BkIJfuUB.js → ConversationPage-BINGA8XL.js} +1 -1
- package/dist/web/assets/{CreateTaskInput-CS9ktr5a.js → CreateTaskInput-8bLhHYOc.js} +1 -1
- package/dist/web/assets/{DemoPage-D5HfzpfS.js → DemoPage-D1Ki6sJ0.js} +1 -1
- package/dist/web/assets/{GeneralSettingsPage-CKFLk4bt.js → GeneralSettingsPage-DoAXPabw.js} +1 -1
- package/dist/web/assets/{Icons-CqVh1zOu.js → Icons-KJJd6C8K.js} +1 -1
- package/dist/web/assets/{LoadingPreviewPage-DWr9Bc06.js → LoadingPreviewPage-BqCKBvgv.js} +1 -1
- package/dist/web/assets/{McpSettingsPage-GDNWUFUx.js → McpSettingsPage-QXVD4XCW.js} +1 -1
- package/dist/web/assets/{MemberAvatar-BA3zVRhl.js → MemberAvatar-kbJEoyh0.js} +1 -1
- package/dist/web/assets/{NotificationSettingsPage-OpJo7zJ4.js → NotificationSettingsPage-BrqSeU--.js} +1 -1
- package/dist/web/assets/{ProfileSettingsPage-DYV5Up2y.js → ProfileSettingsPage-BmWgVdnG.js} +1 -1
- package/dist/web/assets/{ProjectKanbanPage-DNhv4WcA.js → ProjectKanbanPage-D7RJm4yg.js} +3 -3
- package/dist/web/assets/{ProjectSettingsPage-DJ5LIrW5.js → ProjectSettingsPage-BVINN99w.js} +1 -1
- package/dist/web/assets/{ProviderSettingsPage-DkKvjXXL.js → ProviderSettingsPage-BlgfQMwe.js} +1 -1
- package/dist/web/assets/{SettingsMasterDetail-nkWk1iMZ.js → SettingsMasterDetail-OF28cvPV.js} +1 -1
- package/dist/web/assets/{TeamSettingsPage-B6paYIi8.js → TeamSettingsPage-BWGm0m7s.js} +1 -1
- package/dist/web/assets/{arc-D6K3W0ZB.js → arc-CqFgRaZU.js} +1 -1
- package/dist/web/assets/{architectureDiagram-3BPJPVTR-CnyQ4xAO.js → architectureDiagram-3BPJPVTR-C0PMdIZJ.js} +1 -1
- package/dist/web/assets/{blockDiagram-GPEHLZMM-BFL71oe3.js → blockDiagram-GPEHLZMM-SqqtxqkX.js} +1 -1
- package/dist/web/assets/{c4Diagram-AAUBKEIU-Cv39zyqp.js → c4Diagram-AAUBKEIU-DYJXB3xL.js} +1 -1
- package/dist/web/assets/channel-B8s9dqlX.js +1 -0
- package/dist/web/assets/check-C1zWgxFO.js +1 -0
- package/dist/web/assets/{chevron-down-F0HaYv4G.js → chevron-down-BZfpVhYr.js} +1 -1
- package/dist/web/assets/{chevron-right-CPwvo275.js → chevron-right-D52zUyOF.js} +1 -1
- package/dist/web/assets/{chevron-up-DS7W1CS_.js → chevron-up-CFOy5dmW.js} +1 -1
- package/dist/web/assets/{chunk-2J33WTMH-o03x4Lwh.js → chunk-2J33WTMH-DQCbv8W_.js} +1 -1
- package/dist/web/assets/{chunk-4BX2VUAB-OMTDHlMp.js → chunk-4BX2VUAB-B_68_oNW.js} +1 -1
- package/dist/web/assets/{chunk-55IACEB6-BYhGICji.js → chunk-55IACEB6-Bb-pPIxs.js} +1 -1
- package/dist/web/assets/{chunk-727SXJPM-DzoqZgN8.js → chunk-727SXJPM-CAiaySk6.js} +1 -1
- package/dist/web/assets/{chunk-AQP2D5EJ-RWSpIm7i.js → chunk-AQP2D5EJ-ChCLJ4Wv.js} +1 -1
- package/dist/web/assets/{chunk-FMBD7UC4-A8Ezik8l.js → chunk-FMBD7UC4-Kz0Cc0mv.js} +1 -1
- package/dist/web/assets/{chunk-ND2GUHAM-l8t1S54b.js → chunk-ND2GUHAM-BttoT7UR.js} +1 -1
- package/dist/web/assets/{chunk-QZHKN3VN-CfzOWd9g.js → chunk-QZHKN3VN-BcVhzXXK.js} +1 -1
- package/dist/web/assets/{circle-alert-D_JK6Nsk.js → circle-alert-D67xfWMs.js} +1 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-61bPx188.js +1 -0
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-61bPx188.js +1 -0
- package/dist/web/assets/{code-block-OCS4YCEC-DOp940bN.js → code-block-OCS4YCEC-CMA1utSp.js} +1 -1
- package/dist/web/assets/{confirm-dialog-BOmXWU-c.js → confirm-dialog-BWvZEHpu.js} +1 -1
- package/dist/web/assets/{cose-bilkent-S5V4N54A-D2t-do1X.js → cose-bilkent-S5V4N54A-B391zTey.js} +1 -1
- package/dist/web/assets/{cssMode-BtqVF1ly.js → cssMode-CNU1q_Gl.js} +1 -1
- package/dist/web/assets/{dagre-BM42HDAG-BtYlmBNC.js → dagre-BM42HDAG-CymH_FEZ.js} +1 -1
- package/dist/web/assets/{diagram-2AECGRRQ-WDOcMaWr.js → diagram-2AECGRRQ-DXOIiLDr.js} +1 -1
- package/dist/web/assets/{diagram-5GNKFQAL-LbMipgIf.js → diagram-5GNKFQAL-B9ocgjdh.js} +1 -1
- package/dist/web/assets/{diagram-KO2AKTUF-DsKCSLdx.js → diagram-KO2AKTUF-DLMpk9Wg.js} +1 -1
- package/dist/web/assets/{diagram-LMA3HP47-DUkuN6RR.js → diagram-LMA3HP47-BBnF83je.js} +1 -1
- package/dist/web/assets/{diagram-OG6HWLK6-DLyJH0mw.js → diagram-OG6HWLK6-AK4FunVI.js} +1 -1
- package/dist/web/assets/{erDiagram-TEJ5UH35-kZ9_YLwi.js → erDiagram-TEJ5UH35-B1mryURg.js} +1 -1
- package/dist/web/assets/{flowDiagram-I6XJVG4X-CtWP6zim.js → flowDiagram-I6XJVG4X-BjIG_1l5.js} +1 -1
- package/dist/web/assets/{folder-picker-ClBdFSv_.js → folder-picker-CaM_drIJ.js} +1 -1
- package/dist/web/assets/{freemarker2-Cz_cflgL.js → freemarker2-Dj1C_6Ng.js} +1 -1
- package/dist/web/assets/{ganttDiagram-6RSMTGT7-Cpsrbddz.js → ganttDiagram-6RSMTGT7-DjR6lyIQ.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-PVQCEYII-Z2AN7JLu.js → gitGraphDiagram-PVQCEYII-BpW2L4ry.js} +1 -1
- package/dist/web/assets/{handlebars-DXQ11OYe.js → handlebars-DNXOgRZc.js} +1 -1
- package/dist/web/assets/{html-CPKzsFQJ.js → html-C20FgNS-.js} +1 -1
- package/dist/web/assets/{htmlMode-BuLIJ65E.js → htmlMode-CtcV1Ktd.js} +1 -1
- package/dist/web/assets/{index-BPuQ0J75.js → index-DaRxJqVy.js} +4 -4
- package/dist/web/assets/{index-DJqjl4es.js → index-oC5eh7mZ.js} +3 -3
- package/dist/web/assets/{infoDiagram-5YYISTIA-CG5Z1SIw.js → infoDiagram-5YYISTIA-Cu-PA_-6.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-CI-1kybP.js → ishikawaDiagram-YF4QCWOH-S6Esbkdw.js} +1 -1
- package/dist/web/assets/javascript-CFAVZ6Tb.js +1 -0
- package/dist/web/assets/{journeyDiagram-JHISSGLW-Yf0W6ar4.js → journeyDiagram-JHISSGLW-wPF9FT9V.js} +1 -1
- package/dist/web/assets/{jsonMode-D7mGQAMX.js → jsonMode-D6IoFlQF.js} +1 -1
- package/dist/web/assets/{kanban-definition-UN3LZRKU-CSo-Ej3T.js → kanban-definition-UN3LZRKU-C4jl9zOj.js} +1 -1
- package/dist/web/assets/{layers-E7xs4_fY.js → layers-hQUUT3Gb.js} +1 -1
- package/dist/web/assets/{linear-bYzPbs_W.js → linear-D83xDp0H.js} +1 -1
- package/dist/web/assets/{liquid-D1dGDf_h.js → liquid-CuzuRJIN.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-Fa-E2Zl-.js → lspLanguageFeatures-CUyibjAN.js} +1 -1
- package/dist/web/assets/{mdx-CRf_kl0j.js → mdx-C3rxTvel.js} +1 -1
- package/dist/web/assets/{mermaid-NOHMQCX5-9Sp0Awb9.js → mermaid-NOHMQCX5-CGCWmHha.js} +5 -5
- package/dist/web/assets/{message-square-CQV6Jqyx.js → message-square-B-uYQiTq.js} +1 -1
- package/dist/web/assets/{mindmap-definition-RKZ34NQL-DfqJHEQn.js → mindmap-definition-RKZ34NQL-D5v2uvjn.js} +1 -1
- package/dist/web/assets/{modal-BUKaDX-v.js → modal-D87uszzb.js} +1 -1
- package/dist/web/assets/{monaco-uSRaugmx.js → monaco-B25-2nEB.js} +3 -3
- package/dist/web/assets/{pencil-BRpoyX8s.js → pencil-CY2RnQrx.js} +1 -1
- package/dist/web/assets/{pieDiagram-4H26LBE5-D6mZqc_7.js → pieDiagram-4H26LBE5-6wdFz_7x.js} +1 -1
- package/dist/web/assets/{python-b877PDdg.js → python-BYGLbOzO.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-W4KKPZXB-DCcabkRn.js → quadrantDiagram-W4KKPZXB-C1CrGMEK.js} +1 -1
- package/dist/web/assets/{razor-Bi1FXUoZ.js → razor-m0U9iUAj.js} +1 -1
- package/dist/web/assets/{requirementDiagram-4Y6WPE33-CP6GHzII.js → requirementDiagram-4Y6WPE33-mDtZrxpp.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-5OEKKPKP-BNJypqP0.js → sankeyDiagram-5OEKKPKP-hBlj0XoH.js} +1 -1
- package/dist/web/assets/{select-DQiySo8W.js → select-D7WkUiad.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-3UESZ5HK-CTceFzh8.js → sequenceDiagram-3UESZ5HK-DsWmMm20.js} +1 -1
- package/dist/web/assets/{server-Du56rX8Y.js → server-qlZupTvg.js} +1 -1
- package/dist/web/assets/{stateDiagram-AJRCARHV-CW_WR-7F.js → stateDiagram-AJRCARHV-VNyX1L66.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-DHz3oGyD.js +1 -0
- package/dist/web/assets/{switch-Bmbr34G9.js → switch-1pvXCcP-.js} +1 -1
- package/dist/web/assets/{textarea-SORnJi9y.js → textarea-D9oaz-Ba.js} +1 -1
- package/dist/web/assets/{timeline-definition-PNZ67QCA-YMyJrcx3.js → timeline-definition-PNZ67QCA-DuBxxd9E.js} +1 -1
- package/dist/web/assets/{trash-2-BeXtY9XM.js → trash-2-C0P8jNpJ.js} +1 -1
- package/dist/web/assets/{tsMode-PVZGxtwF.js → tsMode-ogL-3MSe.js} +1 -1
- package/dist/web/assets/{typescript-Lb9pWYyY.js → typescript-rHoDxTY8.js} +1 -1
- package/dist/web/assets/{upload-mXU9O8ZR.js → upload-BYgsDplu.js} +1 -1
- package/dist/web/assets/{use-profiles-CwhDBM9-.js → use-profiles-BkGnmson.js} +1 -1
- package/dist/web/assets/{use-projects-FC2A-qiG.js → use-projects-B4w00h5I.js} +1 -1
- package/dist/web/assets/{use-providers-BzZ7Dpm4.js → use-providers-B70-BYNu.js} +1 -1
- package/dist/web/assets/{useNormalizedLogs-Cxh15U2o.js → useNormalizedLogs-MsDkcnRQ.js} +1 -1
- package/dist/web/assets/{vennDiagram-CIIHVFJN-2FtrQsyg.js → vennDiagram-CIIHVFJN-RbPPOLBo.js} +1 -1
- package/dist/web/assets/{wardley-L42UT6IY-DzhpFsrC.js → wardley-L42UT6IY-DXzUbdMF.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-YWT4CUSO-SWglvyXQ.js → wardleyDiagram-YWT4CUSO-B0QXobQM.js} +1 -1
- package/dist/web/assets/{xml-aN9gPs-U.js → xml-BqnpQrAq.js} +1 -1
- package/dist/web/assets/{xychartDiagram-2RQKCTM6-BMScKGN8.js → xychartDiagram-2RQKCTM6-C7bFJItM.js} +1 -1
- package/dist/web/assets/{yaml-iYUoM2EE.js → yaml-mz2Zn_K2.js} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/dist/runtime/acp/agents/codex-frame-normalizer.d.ts +0 -4
- package/dist/runtime/acp/agents/codex-frame-normalizer.d.ts.map +0 -1
- package/dist/runtime/acp/agents/codex-frame-normalizer.js +0 -120
- package/dist/runtime/acp/agents/codex-frame-normalizer.js.map +0 -1
- package/dist/web/assets/channel-DIRGk9YF.js +0 -1
- package/dist/web/assets/check-D0G5G0XX.js +0 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-B7c8qeN5.js +0 -1
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-B7c8qeN5.js +0 -1
- package/dist/web/assets/javascript-CWV4KdLq.js +0 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-Veali8j7.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GeneralSettingsPage-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GeneralSettingsPage-DoAXPabw.js","assets/select-D7WkUiad.js","assets/chevron-down-BZfpVhYr.js","assets/check-C1zWgxFO.js","assets/textarea-D9oaz-Ba.js","assets/switch-1pvXCcP-.js","assets/use-providers-B70-BYNu.js","assets/ProviderSettingsPage-BlgfQMwe.js","assets/confirm-dialog-BWvZEHpu.js","assets/modal-D87uszzb.js","assets/mermaid-NOHMQCX5-CGCWmHha.js","assets/chevron-right-D52zUyOF.js","assets/mermaid-NOHMQCX5-lI9o3AWT.css","assets/AgentLogo-Ntqe3_Mx.js","assets/SettingsMasterDetail-OF28cvPV.js","assets/trash-2-C0P8jNpJ.js","assets/upload-BYgsDplu.js","assets/pencil-CY2RnQrx.js","assets/TeamSettingsPage-BWGm0m7s.js","assets/MemberAvatar-kbJEoyh0.js","assets/chevron-up-CFOy5dmW.js","assets/ProjectSettingsPage-BVINN99w.js","assets/use-projects-B4w00h5I.js","assets/folder-picker-CaM_drIJ.js","assets/circle-alert-D67xfWMs.js","assets/NotificationSettingsPage-BrqSeU--.js","assets/message-square-B-uYQiTq.js","assets/McpSettingsPage-QXVD4XCW.js","assets/server-qlZupTvg.js","assets/ProfileSettingsPage-BmWgVdnG.js","assets/use-profiles-BkGnmson.js","assets/layers-hQUUT3Gb.js","assets/ProjectKanbanPage-D7RJm4yg.js","assets/Icons-KJJd6C8K.js","assets/CreateTaskInput-8bLhHYOc.js","assets/useNormalizedLogs-MsDkcnRQ.js","assets/ProjectKanbanPage-DcpNTP1B.css","assets/ConversationPage-BINGA8XL.js","assets/AgentDemoPage-B6pABvRL.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
function S1(n,a){for(var i=0;i<a.length;i++){const l=a[i];if(typeof l!="string"&&!Array.isArray(l)){for(const c in l)if(c!=="default"&&!(c in n)){const d=Object.getOwnPropertyDescriptor(l,c);d&&Object.defineProperty(n,c,d.get?d:{enumerable:!0,get:()=>l[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))l(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&l(f)}).observe(document,{childList:!0,subtree:!0});function i(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function l(c){if(c.ep)return;c.ep=!0;const d=i(c);fetch(c.href,d)}})();function xy(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var td={exports:{}},Bs={};var Wp;function w1(){if(Wp)return Bs;Wp=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(l,c,d){var f=null;if(d!==void 0&&(f=""+d),c.key!==void 0&&(f=""+c.key),"key"in c){d={};for(var m in c)m!=="key"&&(d[m]=c[m])}else d=c;return c=d.ref,{$$typeof:n,type:l,key:f,ref:c!==void 0?c:null,props:d}}return Bs.Fragment=a,Bs.jsx=i,Bs.jsxs=i,Bs}var eg;function E1(){return eg||(eg=1,td.exports=w1()),td.exports}var v=E1(),nd={exports:{}},Ne={};var tg;function T1(){if(tg)return Ne;tg=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),T=Symbol.iterator;function N(C){return C===null||typeof C!="object"?null:(C=T&&C[T]||C["@@iterator"],typeof C=="function"?C:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,P={};function K(C,q,H){this.props=C,this.context=q,this.refs=P,this.updater=H||L}K.prototype.isReactComponent={},K.prototype.setState=function(C,q){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,q,"setState")},K.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function Y(){}Y.prototype=K.prototype;function W(C,q,H){this.props=C,this.context=q,this.refs=P,this.updater=H||L}var he=W.prototype=new Y;he.constructor=W,B(he,K.prototype),he.isPureReactComponent=!0;var fe=Array.isArray;function de(){}var R={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function re(C,q,H){var Z=H.ref;return{$$typeof:n,type:C,key:q,ref:Z!==void 0?Z:null,props:H}}function ke(C,q){return re(C.type,q,C.props)}function Re(C){return typeof C=="object"&&C!==null&&C.$$typeof===n}function Se(C){var q={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(H){return q[H]})}var Me=/\/+/g;function Le(C,q){return typeof C=="object"&&C!==null&&C.key!=null?Se(""+C.key):q.toString(36)}function Ee(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(de,de):(C.status="pending",C.then(function(q){C.status==="pending"&&(C.status="fulfilled",C.value=q)},function(q){C.status==="pending"&&(C.status="rejected",C.reason=q)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function k(C,q,H,Z,ee){var $=typeof C;($==="undefined"||$==="boolean")&&(C=null);var ae=!1;if(C===null)ae=!0;else switch($){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(C.$$typeof){case n:case a:ae=!0;break;case x:return ae=C._init,k(ae(C._payload),q,H,Z,ee)}}if(ae)return ee=ee(C),ae=Z===""?"."+Le(C,0):Z,fe(ee)?(H="",ae!=null&&(H=ae.replace(Me,"$&/")+"/"),k(ee,q,H,"",function(Pt){return Pt})):ee!=null&&(Re(ee)&&(ee=ke(ee,H+(ee.key==null||C&&C.key===ee.key?"":(""+ee.key).replace(Me,"$&/")+"/")+ae)),q.push(ee)),1;ae=0;var Te=Z===""?".":Z+":";if(fe(C))for(var Be=0;Be<C.length;Be++)Z=C[Be],$=Te+Le(Z,Be),ae+=k(Z,q,H,$,ee);else if(Be=N(C),typeof Be=="function")for(C=Be.call(C),Be=0;!(Z=C.next()).done;)Z=Z.value,$=Te+Le(Z,Be++),ae+=k(Z,q,H,$,ee);else if($==="object"){if(typeof C.then=="function")return k(Ee(C),q,H,Z,ee);throw q=String(C),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ae}function X(C,q,H){if(C==null)return C;var Z=[],ee=0;return k(C,Z,"","",function($){return q.call(H,$,ee++)}),Z}function Q(C){if(C._status===-1){var q=C._result;q=q(),q.then(function(H){(C._status===0||C._status===-1)&&(C._status=1,C._result=H)},function(H){(C._status===0||C._status===-1)&&(C._status=2,C._result=H)}),C._status===-1&&(C._status=0,C._result=q)}if(C._status===1)return C._result.default;throw C._result}var me=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},ve={map:X,forEach:function(C,q,H){X(C,function(){q.apply(this,arguments)},H)},count:function(C){var q=0;return X(C,function(){q++}),q},toArray:function(C){return X(C,function(q){return q})||[]},only:function(C){if(!Re(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return Ne.Activity=y,Ne.Children=ve,Ne.Component=K,Ne.Fragment=i,Ne.Profiler=c,Ne.PureComponent=W,Ne.StrictMode=l,Ne.Suspense=g,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(C){return R.H.useMemoCache(C)}},Ne.cache=function(C){return function(){return C.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(C,q,H){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var Z=B({},C.props),ee=C.key;if(q!=null)for($ in q.key!==void 0&&(ee=""+q.key),q)!V.call(q,$)||$==="key"||$==="__self"||$==="__source"||$==="ref"&&q.ref===void 0||(Z[$]=q[$]);var $=arguments.length-2;if($===1)Z.children=H;else if(1<$){for(var ae=Array($),Te=0;Te<$;Te++)ae[Te]=arguments[Te+2];Z.children=ae}return re(C.type,ee,Z)},Ne.createContext=function(C){return C={$$typeof:f,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:d,_context:C},C},Ne.createElement=function(C,q,H){var Z,ee={},$=null;if(q!=null)for(Z in q.key!==void 0&&($=""+q.key),q)V.call(q,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ee[Z]=q[Z]);var ae=arguments.length-2;if(ae===1)ee.children=H;else if(1<ae){for(var Te=Array(ae),Be=0;Be<ae;Be++)Te[Be]=arguments[Be+2];ee.children=Te}if(C&&C.defaultProps)for(Z in ae=C.defaultProps,ae)ee[Z]===void 0&&(ee[Z]=ae[Z]);return re(C,$,ee)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(C){return{$$typeof:m,render:C}},Ne.isValidElement=Re,Ne.lazy=function(C){return{$$typeof:x,_payload:{_status:-1,_result:C},_init:Q}},Ne.memo=function(C,q){return{$$typeof:p,type:C,compare:q===void 0?null:q}},Ne.startTransition=function(C){var q=R.T,H={};R.T=H;try{var Z=C(),ee=R.S;ee!==null&&ee(H,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(de,me)}catch($){me($)}finally{q!==null&&H.types!==null&&(q.types=H.types),R.T=q}},Ne.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},Ne.use=function(C){return R.H.use(C)},Ne.useActionState=function(C,q,H){return R.H.useActionState(C,q,H)},Ne.useCallback=function(C,q){return R.H.useCallback(C,q)},Ne.useContext=function(C){return R.H.useContext(C)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(C,q){return R.H.useDeferredValue(C,q)},Ne.useEffect=function(C,q){return R.H.useEffect(C,q)},Ne.useEffectEvent=function(C){return R.H.useEffectEvent(C)},Ne.useId=function(){return R.H.useId()},Ne.useImperativeHandle=function(C,q,H){return R.H.useImperativeHandle(C,q,H)},Ne.useInsertionEffect=function(C,q){return R.H.useInsertionEffect(C,q)},Ne.useLayoutEffect=function(C,q){return R.H.useLayoutEffect(C,q)},Ne.useMemo=function(C,q){return R.H.useMemo(C,q)},Ne.useOptimistic=function(C,q){return R.H.useOptimistic(C,q)},Ne.useReducer=function(C,q,H){return R.H.useReducer(C,q,H)},Ne.useRef=function(C){return R.H.useRef(C)},Ne.useState=function(C){return R.H.useState(C)},Ne.useSyncExternalStore=function(C,q,H){return R.H.useSyncExternalStore(C,q,H)},Ne.useTransition=function(){return R.H.useTransition()},Ne.version="19.2.4",Ne}var ng;function Pd(){return ng||(ng=1,nd.exports=T1()),nd.exports}var S=Pd();const ne=xy(S),C1=S1({__proto__:null,default:ne},[S]);var ad={exports:{}},qs={},rd={exports:{}},id={};var ag;function A1(){return ag||(ag=1,(function(n){function a(k,X){var Q=k.length;k.push(X);e:for(;0<Q;){var me=Q-1>>>1,ve=k[me];if(0<c(ve,X))k[me]=X,k[Q]=ve,Q=me;else break e}}function i(k){return k.length===0?null:k[0]}function l(k){if(k.length===0)return null;var X=k[0],Q=k.pop();if(Q!==X){k[0]=Q;e:for(var me=0,ve=k.length,C=ve>>>1;me<C;){var q=2*(me+1)-1,H=k[q],Z=q+1,ee=k[Z];if(0>c(H,Q))Z<ve&&0>c(ee,H)?(k[me]=ee,k[Z]=Q,me=Z):(k[me]=H,k[q]=Q,me=q);else if(Z<ve&&0>c(ee,Q))k[me]=ee,k[Z]=Q,me=Z;else break e}}return X}function c(k,X){var Q=k.sortIndex-X.sortIndex;return Q!==0?Q:k.id-X.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var f=Date,m=f.now();n.unstable_now=function(){return f.now()-m}}var g=[],p=[],x=1,y=null,T=3,N=!1,L=!1,B=!1,P=!1,K=typeof setTimeout=="function"?setTimeout:null,Y=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function he(k){for(var X=i(p);X!==null;){if(X.callback===null)l(p);else if(X.startTime<=k)l(p),X.sortIndex=X.expirationTime,a(g,X);else break;X=i(p)}}function fe(k){if(B=!1,he(k),!L)if(i(g)!==null)L=!0,de||(de=!0,Se());else{var X=i(p);X!==null&&Ee(fe,X.startTime-k)}}var de=!1,R=-1,V=5,re=-1;function ke(){return P?!0:!(n.unstable_now()-re<V)}function Re(){if(P=!1,de){var k=n.unstable_now();re=k;var X=!0;try{e:{L=!1,B&&(B=!1,Y(R),R=-1),N=!0;var Q=T;try{t:{for(he(k),y=i(g);y!==null&&!(y.expirationTime>k&&ke());){var me=y.callback;if(typeof me=="function"){y.callback=null,T=y.priorityLevel;var ve=me(y.expirationTime<=k);if(k=n.unstable_now(),typeof ve=="function"){y.callback=ve,he(k),X=!0;break t}y===i(g)&&l(g),he(k)}else l(g);y=i(g)}if(y!==null)X=!0;else{var C=i(p);C!==null&&Ee(fe,C.startTime-k),X=!1}}break e}finally{y=null,T=Q,N=!1}X=void 0}}finally{X?Se():de=!1}}}var Se;if(typeof W=="function")Se=function(){W(Re)};else if(typeof MessageChannel<"u"){var Me=new MessageChannel,Le=Me.port2;Me.port1.onmessage=Re,Se=function(){Le.postMessage(null)}}else Se=function(){K(Re,0)};function Ee(k,X){R=K(function(){k(n.unstable_now())},X)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(k){k.callback=null},n.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<k?Math.floor(1e3/k):5},n.unstable_getCurrentPriorityLevel=function(){return T},n.unstable_next=function(k){switch(T){case 1:case 2:case 3:var X=3;break;default:X=T}var Q=T;T=X;try{return k()}finally{T=Q}},n.unstable_requestPaint=function(){P=!0},n.unstable_runWithPriority=function(k,X){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var Q=T;T=k;try{return X()}finally{T=Q}},n.unstable_scheduleCallback=function(k,X,Q){var me=n.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?me+Q:me):Q=me,k){case 1:var ve=-1;break;case 2:ve=250;break;case 5:ve=1073741823;break;case 4:ve=1e4;break;default:ve=5e3}return ve=Q+ve,k={id:x++,callback:X,priorityLevel:k,startTime:Q,expirationTime:ve,sortIndex:-1},Q>me?(k.sortIndex=Q,a(p,k),i(g)===null&&k===i(p)&&(B?(Y(R),R=-1):B=!0,Ee(fe,Q-me))):(k.sortIndex=ve,a(g,k),L||N||(L=!0,de||(de=!0,Se()))),k},n.unstable_shouldYield=ke,n.unstable_wrapCallback=function(k){var X=T;return function(){var Q=T;T=X;try{return k.apply(this,arguments)}finally{T=Q}}}})(id)),id}var rg;function R1(){return rg||(rg=1,rd.exports=A1()),rd.exports}var sd={exports:{}},$t={};var ig;function _1(){if(ig)return $t;ig=1;var n=Pd();function a(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)p+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var l={d:{f:i,r:function(){throw Error(a(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},c=Symbol.for("react.portal");function d(g,p,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:y==null?null:""+y,children:g,containerInfo:p,implementation:x}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return $t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,$t.createPortal=function(g,p){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(a(299));return d(g,p,null,x)},$t.flushSync=function(g){var p=f.T,x=l.p;try{if(f.T=null,l.p=2,g)return g()}finally{f.T=p,l.p=x,l.d.f()}},$t.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,l.d.C(g,p))},$t.prefetchDNS=function(g){typeof g=="string"&&l.d.D(g)},$t.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var x=p.as,y=m(x,p.crossOrigin),T=typeof p.integrity=="string"?p.integrity:void 0,N=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;x==="style"?l.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:T,fetchPriority:N}):x==="script"&&l.d.X(g,{crossOrigin:y,integrity:T,fetchPriority:N,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},$t.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var x=m(p.as,p.crossOrigin);l.d.M(g,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&l.d.M(g)},$t.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var x=p.as,y=m(x,p.crossOrigin);l.d.L(g,x,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},$t.preloadModule=function(g,p){if(typeof g=="string")if(p){var x=m(p.as,p.crossOrigin);l.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else l.d.m(g)},$t.requestFormReset=function(g){l.d.r(g)},$t.unstable_batchedUpdates=function(g,p){return g(p)},$t.useFormState=function(g,p,x){return f.H.useFormState(g,p,x)},$t.useFormStatus=function(){return f.H.useHostTransitionStatus()},$t.version="19.2.4",$t}var sg;function Sy(){if(sg)return sd.exports;sg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),sd.exports=_1(),sd.exports}var lg;function k1(){if(lg)return qs;lg=1;var n=R1(),a=Pd(),i=Sy();function l(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(d(e)!==e)throw Error(l(188))}function p(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(l(188));return t!==e?null:e}for(var r=e,s=t;;){var o=r.return;if(o===null)break;var u=o.alternate;if(u===null){if(s=o.return,s!==null){r=s;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===r)return g(o),e;if(u===s)return g(o),t;u=u.sibling}throw Error(l(188))}if(r.return!==s.return)r=o,s=u;else{for(var h=!1,b=o.child;b;){if(b===r){h=!0,r=o,s=u;break}if(b===s){h=!0,s=o,r=u;break}b=b.sibling}if(!h){for(b=u.child;b;){if(b===r){h=!0,r=u,s=o;break}if(b===s){h=!0,s=u,r=o;break}b=b.sibling}if(!h)throw Error(l(189))}}if(r.alternate!==s)throw Error(l(190))}if(r.tag!==3)throw Error(l(188));return r.stateNode.current===r?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,T=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),Y=Symbol.for("react.consumer"),W=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),ke=Symbol.for("react.memo_cache_sentinel"),Re=Symbol.iterator;function Se(e){return e===null||typeof e!="object"?null:(e=Re&&e[Re]||e["@@iterator"],typeof e=="function"?e:null)}var Me=Symbol.for("react.client.reference");function Le(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case B:return"Fragment";case K:return"Profiler";case P:return"StrictMode";case fe:return"Suspense";case de:return"SuspenseList";case re:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case L:return"Portal";case W:return e.displayName||"Context";case Y:return(e._context.displayName||"Context")+".Consumer";case he:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case R:return t=e.displayName||null,t!==null?t:Le(e.type)||"Memo";case V:t=e._payload,e=e._init;try{return Le(e(t))}catch{}}return null}var Ee=Array.isArray,k=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},me=[],ve=-1;function C(e){return{current:e}}function q(e){0>ve||(e.current=me[ve],me[ve]=null,ve--)}function H(e,t){ve++,me[ve]=e.current,e.current=t}var Z=C(null),ee=C(null),$=C(null),ae=C(null);function Te(e,t){switch(H($,t),H(ee,e),H(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?wp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=wp(t),e=Ep(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(Z),H(Z,e)}function Be(){q(Z),q(ee),q($)}function Pt(e){e.memoizedState!==null&&H(ae,e);var t=Z.current,r=Ep(t,e.type);t!==r&&(H(ee,e),H(Z,r))}function en(e){ee.current===e&&(q(Z),q(ee)),ae.current===e&&(q(ae),Ds._currentValue=Q)}var Je,Fn;function sn(e){if(Je===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Je=t&&t[1]||"",Fn=-1<r.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+Je+e+Fn}var wr=!1;function ln(e,t){if(!e||wr)return"";wr=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(U){var D=U}Reflect.construct(e,[],I)}else{try{I.call()}catch(U){D=U}e.call(I.prototype)}}else{try{throw Error()}catch(U){D=U}(I=e())&&typeof I.catch=="function"&&I.catch(function(){})}}catch(U){if(U&&D&&typeof U.stack=="string")return[U.stack,D.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=s.DetermineComponentFrameRoot(),h=u[0],b=u[1];if(h&&b){var E=h.split(`
|
|
@@ -10,7 +10,7 @@ Error generating stack: `+s.message+`
|
|
|
10
10
|
`).replace(G0,"")}function xp(e,t){return t=bp(t),bp(e)===t}function it(e,t,r,s,o,u){switch(r){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||ai(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&ai(e,""+s);break;case"className":$n(e,"class",s);break;case"tabIndex":$n(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":$n(e,r,s);break;case"style":xf(e,s,u);break;case"data":if(t!=="object"){$n(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(r);break}s=ul(""+s),e.setAttribute(r,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(r==="formAction"?(t!=="input"&&it(e,t,"name",o.name,o,null),it(e,t,"formEncType",o.formEncType,o,null),it(e,t,"formMethod",o.formMethod,o,null),it(e,t,"formTarget",o.formTarget,o,null)):(it(e,t,"encType",o.encType,o,null),it(e,t,"method",o.method,o,null),it(e,t,"target",o.target,o,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(r);break}s=ul(""+s),e.setAttribute(r,s);break;case"onClick":s!=null&&(e.onclick=Ta);break;case"onScroll":s!=null&&Qe("scroll",e);break;case"onScrollEnd":s!=null&&Qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(r=s.__html,r!=null){if(o.children!=null)throw Error(l(60));e.innerHTML=r}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}r=ul(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(r,""+s):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":s===!0?e.setAttribute(r,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(r,s):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(r,s):e.removeAttribute(r);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(r):e.setAttribute(r,s);break;case"popover":Qe("beforetoggle",e),Qe("toggle",e),Ct(e,"popover",s);break;case"xlinkActuate":Vt(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Vt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Vt(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Vt(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Vt(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Vt(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Ct(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=yb.get(r)||r,Ct(e,r,s))}}function Uc(e,t,r,s,o,u){switch(r){case"style":xf(e,s,u);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(l(61));if(r=s.__html,r!=null){if(o.children!=null)throw Error(l(60));e.innerHTML=r}}break;case"children":typeof s=="string"?ai(e,s):(typeof s=="number"||typeof s=="bigint")&&ai(e,""+s);break;case"onScroll":s!=null&&Qe("scroll",e);break;case"onScrollEnd":s!=null&&Qe("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Ta);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bn.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(o=r.endsWith("Capture"),t=r.slice(2,o?r.length-7:void 0),u=e[le]||null,u=u!=null?u[r]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof s=="function")){typeof u!="function"&&u!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,s,o);break e}r in e?e[r]=s:s===!0?e.setAttribute(r,""):Ct(e,r,s)}}}function It(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",e),Qe("load",e);var s=!1,o=!1,u;for(u in r)if(r.hasOwnProperty(u)){var h=r[u];if(h!=null)switch(u){case"src":s=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:it(e,t,u,h,r,null)}}o&&it(e,t,"srcSet",r.srcSet,r,null),s&&it(e,t,"src",r.src,r,null);return;case"input":Qe("invalid",e);var b=u=h=o=null,E=null,j=null;for(s in r)if(r.hasOwnProperty(s)){var G=r[s];if(G!=null)switch(s){case"name":o=G;break;case"type":h=G;break;case"checked":E=G;break;case"defaultChecked":j=G;break;case"value":u=G;break;case"defaultValue":b=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(l(137,t));break;default:it(e,t,s,G,r,null)}}gf(e,u,b,E,j,h,o,!1);return;case"select":Qe("invalid",e),s=h=u=null;for(o in r)if(r.hasOwnProperty(o)&&(b=r[o],b!=null))switch(o){case"value":u=b;break;case"defaultValue":h=b;break;case"multiple":s=b;default:it(e,t,o,b,r,null)}t=u,r=h,e.multiple=!!s,t!=null?ni(e,!!s,t,!1):r!=null&&ni(e,!!s,r,!0);return;case"textarea":Qe("invalid",e),u=o=s=null;for(h in r)if(r.hasOwnProperty(h)&&(b=r[h],b!=null))switch(h){case"value":s=b;break;case"defaultValue":o=b;break;case"children":u=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(l(91));break;default:it(e,t,h,b,r,null)}vf(e,s,o,u);return;case"option":for(E in r)r.hasOwnProperty(E)&&(s=r[E],s!=null)&&(E==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":it(e,t,E,s,r,null));return;case"dialog":Qe("beforetoggle",e),Qe("toggle",e),Qe("cancel",e),Qe("close",e);break;case"iframe":case"object":Qe("load",e);break;case"video":case"audio":for(s=0;s<ks.length;s++)Qe(ks[s],e);break;case"image":Qe("error",e),Qe("load",e);break;case"details":Qe("toggle",e);break;case"embed":case"source":case"link":Qe("error",e),Qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(j in r)if(r.hasOwnProperty(j)&&(s=r[j],s!=null))switch(j){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:it(e,t,j,s,r,null)}return;default:if(Jo(t)){for(G in r)r.hasOwnProperty(G)&&(s=r[G],s!==void 0&&Uc(e,t,G,s,r,void 0));return}}for(b in r)r.hasOwnProperty(b)&&(s=r[b],s!=null&&it(e,t,b,s,r,null))}function K0(e,t,r,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,u=null,h=null,b=null,E=null,j=null,G=null;for(U in r){var I=r[U];if(r.hasOwnProperty(U)&&I!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":E=I;default:s.hasOwnProperty(U)||it(e,t,U,null,s,I)}}for(var D in s){var U=s[D];if(I=r[D],s.hasOwnProperty(D)&&(U!=null||I!=null))switch(D){case"type":u=U;break;case"name":o=U;break;case"checked":j=U;break;case"defaultChecked":G=U;break;case"value":h=U;break;case"defaultValue":b=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(l(137,t));break;default:U!==I&&it(e,t,D,U,s,I)}}Io(e,h,b,E,j,G,u,o);return;case"select":U=h=b=D=null;for(u in r)if(E=r[u],r.hasOwnProperty(u)&&E!=null)switch(u){case"value":break;case"multiple":U=E;default:s.hasOwnProperty(u)||it(e,t,u,null,s,E)}for(o in s)if(u=s[o],E=r[o],s.hasOwnProperty(o)&&(u!=null||E!=null))switch(o){case"value":D=u;break;case"defaultValue":b=u;break;case"multiple":h=u;default:u!==E&&it(e,t,o,u,s,E)}t=b,r=h,s=U,D!=null?ni(e,!!r,D,!1):!!s!=!!r&&(t!=null?ni(e,!!r,t,!0):ni(e,!!r,r?[]:"",!1));return;case"textarea":U=D=null;for(b in r)if(o=r[b],r.hasOwnProperty(b)&&o!=null&&!s.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:it(e,t,b,null,s,o)}for(h in s)if(o=s[h],u=r[h],s.hasOwnProperty(h)&&(o!=null||u!=null))switch(h){case"value":D=o;break;case"defaultValue":U=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(l(91));break;default:o!==u&&it(e,t,h,o,s,u)}yf(e,D,U);return;case"option":for(var oe in r)D=r[oe],r.hasOwnProperty(oe)&&D!=null&&!s.hasOwnProperty(oe)&&(oe==="selected"?e.selected=!1:it(e,t,oe,null,s,D));for(E in s)D=s[E],U=r[E],s.hasOwnProperty(E)&&D!==U&&(D!=null||U!=null)&&(E==="selected"?e.selected=D&&typeof D!="function"&&typeof D!="symbol":it(e,t,E,D,s,U));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ae in r)D=r[Ae],r.hasOwnProperty(Ae)&&D!=null&&!s.hasOwnProperty(Ae)&&it(e,t,Ae,null,s,D);for(j in s)if(D=s[j],U=r[j],s.hasOwnProperty(j)&&D!==U&&(D!=null||U!=null))switch(j){case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(l(137,t));break;default:it(e,t,j,D,s,U)}return;default:if(Jo(t)){for(var st in r)D=r[st],r.hasOwnProperty(st)&&D!==void 0&&!s.hasOwnProperty(st)&&Uc(e,t,st,void 0,s,D);for(G in s)D=s[G],U=r[G],!s.hasOwnProperty(G)||D===U||D===void 0&&U===void 0||Uc(e,t,G,D,s,U);return}}for(var O in r)D=r[O],r.hasOwnProperty(O)&&D!=null&&!s.hasOwnProperty(O)&&it(e,t,O,null,s,D);for(I in s)D=s[I],U=r[I],!s.hasOwnProperty(I)||D===U||D==null&&U==null||it(e,t,I,D,s,U)}function Sp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function V0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,r=performance.getEntriesByType("resource"),s=0;s<r.length;s++){var o=r[s],u=o.transferSize,h=o.initiatorType,b=o.duration;if(u&&b&&Sp(h)){for(h=0,b=o.responseEnd,s+=1;s<r.length;s++){var E=r[s],j=E.startTime;if(j>b)break;var G=E.transferSize,I=E.initiatorType;G&&Sp(I)&&(E=E.responseEnd,h+=G*(E<b?1:(b-j)/(E-j)))}if(--s,t+=8*(u+h)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Bc=null,qc=null;function ro(e){return e.nodeType===9?e:e.ownerDocument}function wp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ep(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Hc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Qc=null;function Y0(){var e=window.event;return e&&e.type==="popstate"?e===Qc?!1:(Qc=e,!0):(Qc=null,!1)}var Tp=typeof setTimeout=="function"?setTimeout:void 0,F0=typeof clearTimeout=="function"?clearTimeout:void 0,Cp=typeof Promise=="function"?Promise:void 0,X0=typeof queueMicrotask=="function"?queueMicrotask:typeof Cp<"u"?function(e){return Cp.resolve(null).then(e).catch(I0)}:Tp;function I0(e){setTimeout(function(){throw e})}function lr(e){return e==="head"}function Ap(e,t){var r=t,s=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"||r==="/&"){if(s===0){e.removeChild(o),Di(t);return}s--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")s++;else if(r==="html")Os(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,Os(r);for(var u=r.firstChild;u;){var h=u.nextSibling,b=u.nodeName;u[vt]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&u.rel.toLowerCase()==="stylesheet"||r.removeChild(u),u=h}}else r==="body"&&Os(e.ownerDocument.body);r=o}while(r);Di(t)}function Rp(e,t){var r=e;e=0;do{var s=r.nextSibling;if(r.nodeType===1?t?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(t?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=s}while(r)}function Pc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Pc(r),bt(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function Z0(e,t,r,s){for(;e.nodeType===1;){var o=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[vt])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Hn(e.nextSibling),e===null)break}return null}function J0(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Hn(e.nextSibling),e===null))return null;return e}function _p(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Hn(e.nextSibling),e===null))return null;return e}function Gc(e){return e.data==="$?"||e.data==="$~"}function Kc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function $0(e,t){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||r.readyState!=="loading")t();else{var s=function(){t(),r.removeEventListener("DOMContentLoaded",s)};r.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Hn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Vc=null;function kp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return Hn(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function Np(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(t===0)return e;t--}else r!=="/$"&&r!=="/&"||t++}e=e.previousSibling}return null}function Op(e,t,r){switch(t=ro(r),e){case"html":if(e=t.documentElement,!e)throw Error(l(452));return e;case"head":if(e=t.head,!e)throw Error(l(453));return e;case"body":if(e=t.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function Os(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bt(e)}var Qn=new Map,Mp=new Set;function io(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ha=X.d;X.d={f:W0,r:e1,D:t1,C:n1,L:a1,m:r1,X:s1,S:i1,M:l1};function W0(){var e=Ha.f(),t=Zl();return e||t}function e1(e){var t=Ve(e);t!==null&&t.tag===5&&t.type==="form"?Ih(t):Ha.r(e)}var Oi=typeof document>"u"?null:document;function jp(e,t,r){var s=Oi;if(s&&typeof t=="string"&&t){var o=jn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof r=="string"&&(o+='[crossorigin="'+r+'"]'),Mp.has(o)||(Mp.add(o),e={rel:e,crossOrigin:r,href:t},s.querySelector(o)===null&&(t=s.createElement("link"),It(t,"link",e),mt(t),s.head.appendChild(t)))}}function t1(e){Ha.D(e),jp("dns-prefetch",e,null)}function n1(e,t){Ha.C(e,t),jp("preconnect",e,t)}function a1(e,t,r){Ha.L(e,t,r);var s=Oi;if(s&&e&&t){var o='link[rel="preload"][as="'+jn(t)+'"]';t==="image"&&r&&r.imageSrcSet?(o+='[imagesrcset="'+jn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(o+='[imagesizes="'+jn(r.imageSizes)+'"]')):o+='[href="'+jn(e)+'"]';var u=o;switch(t){case"style":u=Mi(e);break;case"script":u=ji(e)}Qn.has(u)||(e=y({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),Qn.set(u,e),s.querySelector(o)!==null||t==="style"&&s.querySelector(Ms(u))||t==="script"&&s.querySelector(js(u))||(t=s.createElement("link"),It(t,"link",e),mt(t),s.head.appendChild(t)))}}function r1(e,t){Ha.m(e,t);var r=Oi;if(r&&e){var s=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+jn(s)+'"][href="'+jn(e)+'"]',u=o;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=ji(e)}if(!Qn.has(u)&&(e=y({rel:"modulepreload",href:e},t),Qn.set(u,e),r.querySelector(o)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(js(u)))return}s=r.createElement("link"),It(s,"link",e),mt(s),r.head.appendChild(s)}}}function i1(e,t,r){Ha.S(e,t,r);var s=Oi;if(s&&e){var o=un(s).hoistableStyles,u=Mi(e);t=t||"default";var h=o.get(u);if(!h){var b={loading:0,preload:null};if(h=s.querySelector(Ms(u)))b.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},r),(r=Qn.get(u))&&Yc(e,r);var E=h=s.createElement("link");mt(E),It(E,"link",e),E._p=new Promise(function(j,G){E.onload=j,E.onerror=G}),E.addEventListener("load",function(){b.loading|=1}),E.addEventListener("error",function(){b.loading|=2}),b.loading|=4,so(h,t,s)}h={type:"stylesheet",instance:h,count:1,state:b},o.set(u,h)}}}function s1(e,t){Ha.X(e,t);var r=Oi;if(r&&e){var s=un(r).hoistableScripts,o=ji(e),u=s.get(o);u||(u=r.querySelector(js(o)),u||(e=y({src:e,async:!0},t),(t=Qn.get(o))&&Fc(e,t),u=r.createElement("script"),mt(u),It(u,"link",e),r.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(o,u))}}function l1(e,t){Ha.M(e,t);var r=Oi;if(r&&e){var s=un(r).hoistableScripts,o=ji(e),u=s.get(o);u||(u=r.querySelector(js(o)),u||(e=y({src:e,async:!0,type:"module"},t),(t=Qn.get(o))&&Fc(e,t),u=r.createElement("script"),mt(u),It(u,"link",e),r.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},s.set(o,u))}}function Dp(e,t,r,s){var o=(o=$.current)?io(o):null;if(!o)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=Mi(r.href),r=un(o).hoistableStyles,s=r.get(t),s||(s={type:"style",instance:null,count:0,state:null},r.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=Mi(r.href);var u=un(o).hoistableStyles,h=u.get(e);if(h||(o=o.ownerDocument||o,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,h),(u=o.querySelector(Ms(e)))&&!u._p&&(h.instance=u,h.state.loading=5),Qn.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Qn.set(e,r),u||o1(o,e,r,h.state))),t&&s===null)throw Error(l(528,""));return h}if(t&&s!==null)throw Error(l(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ji(r),r=un(o).hoistableScripts,s=r.get(t),s||(s={type:"script",instance:null,count:0,state:null},r.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Mi(e){return'href="'+jn(e)+'"'}function Ms(e){return'link[rel="stylesheet"]['+e+"]"}function zp(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function o1(e,t,r,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),It(t,"link",r),mt(t),e.head.appendChild(t))}function ji(e){return'[src="'+jn(e)+'"]'}function js(e){return"script[async]"+e}function Lp(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+jn(r.href)+'"]');if(s)return t.instance=s,mt(s),s;var o=y({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),mt(s),It(s,"style",o),so(s,r.precedence,e),t.instance=s;case"stylesheet":o=Mi(r.href);var u=e.querySelector(Ms(o));if(u)return t.state.loading|=4,t.instance=u,mt(u),u;s=zp(r),(o=Qn.get(o))&&Yc(s,o),u=(e.ownerDocument||e).createElement("link"),mt(u);var h=u;return h._p=new Promise(function(b,E){h.onload=b,h.onerror=E}),It(u,"link",s),t.state.loading|=4,so(u,r.precedence,e),t.instance=u;case"script":return u=ji(r.src),(o=e.querySelector(js(u)))?(t.instance=o,mt(o),o):(s=r,(o=Qn.get(u))&&(s=y({},r),Fc(s,o)),e=e.ownerDocument||e,o=e.createElement("script"),mt(o),It(o,"link",s),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(l(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,so(s,r.precedence,e));return t.instance}function so(e,t,r){for(var s=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=s.length?s[s.length-1]:null,u=o,h=0;h<s.length;h++){var b=s[h];if(b.dataset.precedence===t)u=b;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function Yc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Fc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var lo=null;function Up(e,t,r){if(lo===null){var s=new Map,o=lo=new Map;o.set(r,s)}else o=lo,s=o.get(r),s||(s=new Map,o.set(r,s));if(s.has(e))return s;for(s.set(e,null),r=r.getElementsByTagName(e),o=0;o<r.length;o++){var u=r[o];if(!(u[vt]||u[ie]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var h=u.getAttribute(t)||"";h=e+h;var b=s.get(h);b?b.push(u):s.set(h,[u])}}return s}function Bp(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function u1(e,t,r){if(r===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function qp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function c1(e,t,r,s){if(r.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var o=Mi(s.href),u=t.querySelector(Ms(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=oo.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=u,mt(u);return}u=t.ownerDocument||t,s=zp(s),(o=Qn.get(o))&&Yc(s,o),u=u.createElement("link"),mt(u);var h=u;h._p=new Promise(function(b,E){h.onload=b,h.onerror=E}),It(u,"link",s),r.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=oo.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var Xc=0;function d1(e,t){return e.stylesheets&&e.count===0&&co(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var s=setTimeout(function(){if(e.stylesheets&&co(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Xc===0&&(Xc=62500*V0());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&co(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Xc?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(o)}}:null}function oo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)co(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var uo=null;function co(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,uo=new Map,t.forEach(f1,e),uo=null,oo.call(e))}function f1(e,t){if(!(t.state.loading&4)){var r=uo.get(e);if(r)var s=r.get(null);else{r=new Map,uo.set(e,r);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var h=o[u];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(r.set(h.dataset.precedence,h),s=h)}s&&r.set(null,s)}o=t.instance,h=o.getAttribute("data-precedence"),u=r.get(h)||s,u===s&&r.set(null,o),r.set(h,o),this.count++,s=oo.bind(this),o.addEventListener("load",s),o.addEventListener("error",s),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Ds={$$typeof:W,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function h1(e,t,r,s,o,u,h,b,E){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=vn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vn(0),this.hiddenUpdates=vn(null),this.identifierPrefix=s,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Hp(e,t,r,s,o,u,h,b,E,j,G,I){return e=new h1(e,t,r,h,E,j,G,I,b),t=1,u===!0&&(t|=24),u=Sn(3,null,null,t),e.current=u,u.stateNode=e,t=Ru(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:s,isDehydrated:r,cache:t},Ou(u),e}function Qp(e){return e?(e=ci,e):ci}function Pp(e,t,r,s,o,u){o=Qp(o),s.context===null?s.context=o:s.pendingContext=o,s=Za(t),s.payload={element:r},u=u===void 0?null:u,u!==null&&(s.callback=u),r=Ja(e,s,t),r!==null&&(pn(r,e,t),fs(r,e,t))}function Gp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Ic(e,t){Gp(e,t),(e=e.alternate)&&Gp(e,t)}function Kp(e){if(e.tag===13||e.tag===31){var t=jr(e,67108864);t!==null&&pn(t,e,67108864),Ic(e,67108864)}}function Vp(e){if(e.tag===13||e.tag===31){var t=An();t=z(t);var r=jr(e,t);r!==null&&pn(r,e,t),Ic(e,t)}}var fo=!0;function m1(e,t,r,s){var o=k.T;k.T=null;var u=X.p;try{X.p=2,Zc(e,t,r,s)}finally{X.p=u,k.T=o}}function p1(e,t,r,s){var o=k.T;k.T=null;var u=X.p;try{X.p=8,Zc(e,t,r,s)}finally{X.p=u,k.T=o}}function Zc(e,t,r,s){if(fo){var o=Jc(s);if(o===null)Lc(e,t,s,ho,r),Fp(e,s);else if(y1(o,e,t,r,s))s.stopPropagation();else if(Fp(e,s),t&4&&-1<g1.indexOf(e)){for(;o!==null;){var u=Ve(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=On(u.pendingLanes);if(h!==0){var b=u;for(b.pendingLanes|=2,b.entangledLanes|=2;h;){var E=1<<31-Lt(h);b.entanglements[1]|=E,h&=~E}ca(u),(et&6)===0&&(Xl=yt()+500,_s(0))}}break;case 31:case 13:b=jr(u,2),b!==null&&pn(b,u,2),Zl(),Ic(u,2)}if(u=Jc(s),u===null&&Lc(e,t,s,ho,r),u===o)break;o=u}o!==null&&s.stopPropagation()}else Lc(e,t,s,null,r)}}function Jc(e){return e=Wo(e),$c(e)}var ho=null;function $c(e){if(ho=null,e=xt(e),e!==null){var t=d(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=f(t),e!==null)return e;e=null}else if(r===31){if(e=m(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ho=e,null}function Yp(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ba()){case sa:return 2;case Ga:return 8;case Kt:case tn:return 32;case kn:return 268435456;default:return 32}default:return 32}}var Wc=!1,or=null,ur=null,cr=null,zs=new Map,Ls=new Map,dr=[],g1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Fp(e,t){switch(e){case"focusin":case"focusout":or=null;break;case"dragenter":case"dragleave":ur=null;break;case"mouseover":case"mouseout":cr=null;break;case"pointerover":case"pointerout":zs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ls.delete(t.pointerId)}}function Us(e,t,r,s,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:r,eventSystemFlags:s,nativeEvent:u,targetContainers:[o]},t!==null&&(t=Ve(t),t!==null&&Kp(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function y1(e,t,r,s,o){switch(t){case"focusin":return or=Us(or,e,t,r,s,o),!0;case"dragenter":return ur=Us(ur,e,t,r,s,o),!0;case"mouseover":return cr=Us(cr,e,t,r,s,o),!0;case"pointerover":var u=o.pointerId;return zs.set(u,Us(zs.get(u)||null,e,t,r,s,o)),!0;case"gotpointercapture":return u=o.pointerId,Ls.set(u,Us(Ls.get(u)||null,e,t,r,s,o)),!0}return!1}function Xp(e){var t=xt(e.target);if(t!==null){var r=d(t);if(r!==null){if(t=r.tag,t===13){if(t=f(r),t!==null){e.blockedOn=t,be(e.priority,function(){Vp(r)});return}}else if(t===31){if(t=m(r),t!==null){e.blockedOn=t,be(e.priority,function(){Vp(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Jc(e.nativeEvent);if(r===null){r=e.nativeEvent;var s=new r.constructor(r.type,r);$o=s,r.target.dispatchEvent(s),$o=null}else return t=Ve(r),t!==null&&Kp(t),e.blockedOn=r,!1;t.shift()}return!0}function Ip(e,t,r){mo(e)&&r.delete(t)}function v1(){Wc=!1,or!==null&&mo(or)&&(or=null),ur!==null&&mo(ur)&&(ur=null),cr!==null&&mo(cr)&&(cr=null),zs.forEach(Ip),Ls.forEach(Ip)}function po(e,t){e.blockedOn===t&&(e.blockedOn=null,Wc||(Wc=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,v1)))}var go=null;function Zp(e){go!==e&&(go=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){go===e&&(go=null);for(var t=0;t<e.length;t+=3){var r=e[t],s=e[t+1],o=e[t+2];if(typeof s!="function"){if($c(s||r)===null)continue;break}var u=Ve(r);u!==null&&(e.splice(t,3),t-=3,Ju(u,{pending:!0,data:o,method:r.method,action:s},s,o))}}))}function Di(e){function t(E){return po(E,e)}or!==null&&po(or,e),ur!==null&&po(ur,e),cr!==null&&po(cr,e),zs.forEach(t),Ls.forEach(t);for(var r=0;r<dr.length;r++){var s=dr[r];s.blockedOn===e&&(s.blockedOn=null)}for(;0<dr.length&&(r=dr[0],r.blockedOn===null);)Xp(r),r.blockedOn===null&&dr.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(s=0;s<r.length;s+=3){var o=r[s],u=r[s+1],h=o[le]||null;if(typeof u=="function")h||Zp(r);else if(h){var b=null;if(u&&u.hasAttribute("formAction")){if(o=u,h=u[le]||null)b=h.formAction;else if($c(o)!==null)continue}else b=h.action;typeof b=="function"?r[s+1]=b:(r.splice(s,3),s-=3),Zp(r)}}}function Jp(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(h){return o=h})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),s||setTimeout(r,20)}function r(){if(!s&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(r,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function ed(e){this._internalRoot=e}yo.prototype.render=ed.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));var r=t.current,s=An();Pp(r,s,e,t,null,null)},yo.prototype.unmount=ed.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Pp(e.current,2,null,e,null,null),Zl(),t[ye]=null}};function yo(e){this._internalRoot=e}yo.prototype.unstable_scheduleHydration=function(e){if(e){var t=te();e={blockedOn:null,target:e,priority:t};for(var r=0;r<dr.length&&t!==0&&t<dr[r].priority;r++);dr.splice(r,0,e),r===0&&Xp(e)}};var $p=a.version;if($p!=="19.2.4")throw Error(l(527,$p,"19.2.4"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=p(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var b1={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vo.isDisabled&&vo.supportsFiber)try{xa=vo.inject(b1),dt=vo}catch{}}return qs.createRoot=function(e,t){if(!c(e))throw Error(l(299));var r=!1,s="",o=im,u=sm,h=lm;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Hp(e,1,!1,null,null,r,s,null,o,u,h,Jp),e[ye]=t.current,zc(e),new ed(t)},qs.hydrateRoot=function(e,t,r){if(!c(e))throw Error(l(299));var s=!1,o="",u=im,h=sm,b=lm,E=null;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onUncaughtError!==void 0&&(u=r.onUncaughtError),r.onCaughtError!==void 0&&(h=r.onCaughtError),r.onRecoverableError!==void 0&&(b=r.onRecoverableError),r.formState!==void 0&&(E=r.formState)),t=Hp(e,1,!0,t,r??null,s,o,E,u,h,b,Jp),t.context=Qp(null),r=t.current,s=An(),s=z(s),o=Za(s),o.callback=null,Ja(r,o,s),r=s,t.current.lanes=r,ut(t,r),ca(t),e[ye]=t.current,zc(e),new yo(t)},qs.version="19.2.4",qs}var og;function N1(){if(og)return ad.exports;og=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),ad.exports=k1(),ad.exports}var O1=N1(),Vi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},M1={setTimeout:(n,a)=>setTimeout(n,a),clearTimeout:n=>clearTimeout(n),setInterval:(n,a)=>setInterval(n,a),clearInterval:n=>clearInterval(n)},j1=class{#e=M1;#t=!1;setTimeoutProvider(n){this.#e=n}setTimeout(n,a){return this.#e.setTimeout(n,a)}clearTimeout(n){this.#e.clearTimeout(n)}setInterval(n,a){return this.#e.setInterval(n,a)}clearInterval(n){this.#e.clearInterval(n)}},Fr=new j1;function D1(n){setTimeout(n,0)}var Ir=typeof window>"u"||"Deno"in globalThis;function an(){}function z1(n,a){return typeof n=="function"?n(a):n}function bd(n){return typeof n=="number"&&n>=0&&n!==1/0}function wy(n,a){return Math.max(n+(a||0)-Date.now(),0)}function vr(n,a){return typeof n=="function"?n(a):n}function Gn(n,a){return typeof n=="function"?n(a):n}function ug(n,a){const{type:i="all",exact:l,fetchStatus:c,predicate:d,queryKey:f,stale:m}=n;if(f){if(l){if(a.queryHash!==Gd(f,a.options))return!1}else if(!Zs(a.queryKey,f))return!1}if(i!=="all"){const g=a.isActive();if(i==="active"&&!g||i==="inactive"&&g)return!1}return!(typeof m=="boolean"&&a.isStale()!==m||c&&c!==a.state.fetchStatus||d&&!d(a))}function cg(n,a){const{exact:i,status:l,predicate:c,mutationKey:d}=n;if(d){if(!a.options.mutationKey)return!1;if(i){if(Zr(a.options.mutationKey)!==Zr(d))return!1}else if(!Zs(a.options.mutationKey,d))return!1}return!(l&&a.state.status!==l||c&&!c(a))}function Gd(n,a){return(a?.queryKeyHashFn||Zr)(n)}function Zr(n){return JSON.stringify(n,(a,i)=>xd(i)?Object.keys(i).sort().reduce((l,c)=>(l[c]=i[c],l),{}):i)}function Zs(n,a){return n===a?!0:typeof n!=typeof a?!1:n&&a&&typeof n=="object"&&typeof a=="object"?Object.keys(a).every(i=>Zs(n[i],a[i])):!1}var L1=Object.prototype.hasOwnProperty;function Ey(n,a,i=0){if(n===a)return n;if(i>500)return a;const l=dg(n)&&dg(a);if(!l&&!(xd(n)&&xd(a)))return a;const d=(l?n:Object.keys(n)).length,f=l?a:Object.keys(a),m=f.length,g=l?new Array(m):{};let p=0;for(let x=0;x<m;x++){const y=l?x:f[x],T=n[y],N=a[y];if(T===N){g[y]=T,(l?x<d:L1.call(n,y))&&p++;continue}if(T===null||N===null||typeof T!="object"||typeof N!="object"){g[y]=N;continue}const L=Ey(T,N,i+1);g[y]=L,L===T&&p++}return d===m&&p===d?n:g}function Ho(n,a){if(!a||Object.keys(n).length!==Object.keys(a).length)return!1;for(const i in n)if(n[i]!==a[i])return!1;return!0}function dg(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function xd(n){if(!fg(n))return!1;const a=n.constructor;if(a===void 0)return!0;const i=a.prototype;return!(!fg(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function fg(n){return Object.prototype.toString.call(n)==="[object Object]"}function U1(n){return new Promise(a=>{Fr.setTimeout(a,n)})}function Sd(n,a,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,a):i.structuralSharing!==!1?Ey(n,a):a}function B1(n,a,i=0){const l=[...n,a];return i&&l.length>i?l.slice(1):l}function q1(n,a,i=0){const l=[a,...n];return i&&l.length>i?l.slice(0,-1):l}var Kd=Symbol();function Ty(n,a){return!n.queryFn&&a?.initialPromise?()=>a.initialPromise:!n.queryFn||n.queryFn===Kd?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Vd(n,a){return typeof n=="function"?n(...a):!!n}function H1(n,a,i){let l=!1,c;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(c??=a(),l||(l=!0,c.aborted?i():c.addEventListener("abort",i,{once:!0})),c)}),n}var Q1=class extends Vi{#e;#t;#n;constructor(){super(),this.#n=n=>{if(!Ir&&window.addEventListener){const a=()=>n();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()})}setFocused(n){this.#e!==n&&(this.#e=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(a=>{a(n)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Yd=new Q1;function wd(){let n,a;const i=new Promise((c,d)=>{n=c,a=d});i.status="pending",i.catch(()=>{});function l(c){Object.assign(i,c),delete i.resolve,delete i.reject}return i.resolve=c=>{l({status:"fulfilled",value:c}),n(c)},i.reject=c=>{l({status:"rejected",reason:c}),a(c)},i}var P1=D1;function G1(){let n=[],a=0,i=m=>{m()},l=m=>{m()},c=P1;const d=m=>{a?n.push(m):c(()=>{i(m)})},f=()=>{const m=n;n=[],m.length&&c(()=>{l(()=>{m.forEach(g=>{i(g)})})})};return{batch:m=>{let g;a++;try{g=m()}finally{a--,a||f()}return g},batchCalls:m=>(...g)=>{d(()=>{m(...g)})},schedule:d,setNotifyFunction:m=>{i=m},setBatchNotifyFunction:m=>{l=m},setScheduler:m=>{c=m}}}var qt=G1(),K1=class extends Vi{#e=!0;#t;#n;constructor(){super(),this.#n=n=>{if(!Ir&&window.addEventListener){const a=()=>n(!0),i=()=>n(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#n=n,this.#t?.(),this.#t=n(this.setOnline.bind(this))}setOnline(n){this.#e!==n&&(this.#e=n,this.listeners.forEach(i=>{i(n)}))}isOnline(){return this.#e}},Qo=new K1;function V1(n){return Math.min(1e3*2**n,3e4)}function Cy(n){return(n??"online")==="online"?Qo.isOnline():!0}var Ed=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function Ay(n){let a=!1,i=0,l;const c=wd(),d=()=>c.status!=="pending",f=B=>{if(!d()){const P=new Ed(B);T(P),n.onCancel?.(P)}},m=()=>{a=!0},g=()=>{a=!1},p=()=>Yd.isFocused()&&(n.networkMode==="always"||Qo.isOnline())&&n.canRun(),x=()=>Cy(n.networkMode)&&n.canRun(),y=B=>{d()||(l?.(),c.resolve(B))},T=B=>{d()||(l?.(),c.reject(B))},N=()=>new Promise(B=>{l=P=>{(d()||p())&&B(P)},n.onPause?.()}).then(()=>{l=void 0,d()||n.onContinue?.()}),L=()=>{if(d())return;let B;const P=i===0?n.initialPromise:void 0;try{B=P??n.fn()}catch(K){B=Promise.reject(K)}Promise.resolve(B).then(y).catch(K=>{if(d())return;const Y=n.retry??(Ir?0:3),W=n.retryDelay??V1,he=typeof W=="function"?W(i,K):W,fe=Y===!0||typeof Y=="number"&&i<Y||typeof Y=="function"&&Y(i,K);if(a||!fe){T(K);return}i++,n.onFail?.(i,K),U1(he).then(()=>p()?void 0:N()).then(()=>{a?T(K):L()})})};return{promise:c,status:()=>c.status,cancel:f,continue:()=>(l?.(),c),cancelRetry:m,continueRetry:g,canStart:x,start:()=>(x()?L():N().then(L),c)}}var Ry=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bd(this.gcTime)&&(this.#e=Fr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Ir?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Fr.clearTimeout(this.#e),this.#e=void 0)}},Y1=class extends Ry{#e;#t;#n;#r;#a;#s;#l;constructor(n){super(),this.#l=!1,this.#s=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.#r=n.client,this.#n=this.#r.getQueryCache(),this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.#e=mg(this.options),this.state=n.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(n){if(this.options={...this.#s,...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=mg(this.options);a.data!==void 0&&(this.setState(hg(a.data,a.dataUpdatedAt)),this.#e=a)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(n,a){const i=Sd(this.state.data,n,this.options);return this.#i({data:i,type:"success",dataUpdatedAt:a?.updatedAt,manual:a?.manual}),i}setState(n,a){this.#i({type:"setState",state:n,setStateOptions:a})}cancel(n){const a=this.#a?.promise;return this.#a?.cancel(n),a?a.then(an).catch(an):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(n=>Gn(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Kd||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>vr(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!wy(this.state.dataUpdatedAt,n)}onFocus(){this.observers.find(a=>a.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(a=>a.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(a=>a!==n),this.observers.length||(this.#a&&(this.#l?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(n,a){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&a?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(n&&this.setOptions(n),!this.options.queryFn){const m=this.observers.find(g=>g.options.queryFn);m&&this.setOptions(m.options)}const i=new AbortController,l=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(this.#l=!0,i.signal)})},c=()=>{const m=Ty(this.options,a),p=(()=>{const x={client:this.#r,queryKey:this.queryKey,meta:this.meta};return l(x),x})();return this.#l=!1,this.options.persister?this.options.persister(m,p,this):m(p)},f=(()=>{const m={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:c};return l(m),m})();this.options.behavior?.onFetch(f,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==f.fetchOptions?.meta)&&this.#i({type:"fetch",meta:f.fetchOptions?.meta}),this.#a=Ay({initialPromise:a?.initialPromise,fn:f.fetchFn,onCancel:m=>{m instanceof Ed&&m.revert&&this.setState({...this.#t,fetchStatus:"idle"}),i.abort()},onFail:(m,g)=>{this.#i({type:"failed",failureCount:m,error:g})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0});try{const m=await this.#a.start();if(m===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(m),this.#n.config.onSuccess?.(m,this),this.#n.config.onSettled?.(m,this.state.error,this),m}catch(m){if(m instanceof Ed){if(m.silent)return this.#a.promise;if(m.revert){if(this.state.data===void 0)throw m;return this.state.data}}throw this.#i({type:"error",error:m}),this.#n.config.onError?.(m,this),this.#n.config.onSettled?.(this.state.data,m,this),m}finally{this.scheduleGc()}}#i(n){const a=i=>{switch(n.type){case"failed":return{...i,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,..._y(i.data,this.options),fetchMeta:n.meta??null};case"success":const l={...i,...hg(n.data,n.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=n.manual?l:void 0,l;case"error":const c=n.error;return{...i,error:c,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...n.state}}};this.state=a(this.state),qt.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:n})})}};function _y(n,a){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Cy(a.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function hg(n,a){return{data:n,dataUpdatedAt:a??Date.now(),error:null,isInvalidated:!1,status:"success"}}function mg(n){const a=typeof n.initialData=="function"?n.initialData():n.initialData,i=a!==void 0,l=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:a,dataUpdateCount:0,dataUpdatedAt:i?l??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var F1=class extends Vi{constructor(n,a){super(),this.options=a,this.#e=n,this.#i=null,this.#l=wd(),this.bindMethods(),this.setOptions(a)}#e;#t=void 0;#n=void 0;#r=void 0;#a;#s;#l;#i;#p;#f;#h;#u;#c;#o;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),pg(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Td(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Td(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#S(),this.#t.removeObserver(this)}setOptions(n){const a=this.options,i=this.#t;if(this.options=this.#e.defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Gn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),a._defaulted&&!Ho(this.options,a)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const l=this.hasListeners();l&&gg(this.#t,i,this.options,a)&&this.#d(),this.updateResult(),l&&(this.#t!==i||Gn(this.options.enabled,this.#t)!==Gn(a.enabled,this.#t)||vr(this.options.staleTime,this.#t)!==vr(a.staleTime,this.#t))&&this.#g();const c=this.#y();l&&(this.#t!==i||Gn(this.options.enabled,this.#t)!==Gn(a.enabled,this.#t)||c!==this.#o)&&this.#v(c)}getOptimisticResult(n){const a=this.#e.getQueryCache().build(this.#e,n),i=this.createResult(a,n);return I1(this,i)&&(this.#r=i,this.#s=this.options,this.#a=this.#t.state),i}getCurrentResult(){return this.#r}trackResult(n,a){return new Proxy(n,{get:(i,l)=>(this.trackProp(l),a?.(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#l.status==="pending"&&this.#l.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,l))})}trackProp(n){this.#m.add(n)}getCurrentQuery(){return this.#t}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const a=this.#e.defaultQueryOptions(n),i=this.#e.getQueryCache().build(this.#e,a);return i.fetch().then(()=>this.createResult(i,a))}fetch(n){return this.#d({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#d(n){this.#w();let a=this.#t.fetch(this.options,n);return n?.throwOnError||(a=a.catch(an)),a}#g(){this.#x();const n=vr(this.options.staleTime,this.#t);if(Ir||this.#r.isStale||!bd(n))return;const i=wy(this.#r.dataUpdatedAt,n)+1;this.#u=Fr.setTimeout(()=>{this.#r.isStale||this.updateResult()},i)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(n){this.#S(),this.#o=n,!(Ir||Gn(this.options.enabled,this.#t)===!1||!bd(this.#o)||this.#o===0)&&(this.#c=Fr.setInterval(()=>{(this.options.refetchIntervalInBackground||Yd.isFocused())&&this.#d()},this.#o))}#b(){this.#g(),this.#v(this.#y())}#x(){this.#u&&(Fr.clearTimeout(this.#u),this.#u=void 0)}#S(){this.#c&&(Fr.clearInterval(this.#c),this.#c=void 0)}createResult(n,a){const i=this.#t,l=this.options,c=this.#r,d=this.#a,f=this.#s,g=n!==i?n.state:this.#n,{state:p}=n;let x={...p},y=!1,T;if(a._optimisticResults){const V=this.hasListeners(),re=!V&&pg(n,a),ke=V&&gg(n,i,a,l);(re||ke)&&(x={...x,..._y(p.data,n.options)}),a._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:N,errorUpdatedAt:L,status:B}=x;T=x.data;let P=!1;if(a.placeholderData!==void 0&&T===void 0&&B==="pending"){let V;c?.isPlaceholderData&&a.placeholderData===f?.placeholderData?(V=c.data,P=!0):V=typeof a.placeholderData=="function"?a.placeholderData(this.#h?.state.data,this.#h):a.placeholderData,V!==void 0&&(B="success",T=Sd(c?.data,V,a),y=!0)}if(a.select&&T!==void 0&&!P)if(c&&T===d?.data&&a.select===this.#p)T=this.#f;else try{this.#p=a.select,T=a.select(T),T=Sd(c?.data,T,a),this.#f=T,this.#i=null}catch(V){this.#i=V}this.#i&&(N=this.#i,T=this.#f,L=Date.now(),B="error");const K=x.fetchStatus==="fetching",Y=B==="pending",W=B==="error",he=Y&&K,fe=T!==void 0,R={status:B,fetchStatus:x.fetchStatus,isPending:Y,isSuccess:B==="success",isError:W,isInitialLoading:he,isLoading:he,data:T,dataUpdatedAt:x.dataUpdatedAt,error:N,errorUpdatedAt:L,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:x.dataUpdateCount>0||x.errorUpdateCount>0,isFetchedAfterMount:x.dataUpdateCount>g.dataUpdateCount||x.errorUpdateCount>g.errorUpdateCount,isFetching:K,isRefetching:K&&!Y,isLoadingError:W&&!fe,isPaused:x.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:W&&fe,isStale:Fd(n,a),refetch:this.refetch,promise:this.#l,isEnabled:Gn(a.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const V=R.data!==void 0,re=R.status==="error"&&!V,ke=Me=>{re?Me.reject(R.error):V&&Me.resolve(R.data)},Re=()=>{const Me=this.#l=R.promise=wd();ke(Me)},Se=this.#l;switch(Se.status){case"pending":n.queryHash===i.queryHash&&ke(Se);break;case"fulfilled":(re||R.data!==Se.value)&&Re();break;case"rejected":(!re||R.error!==Se.reason)&&Re();break}}return R}updateResult(){const n=this.#r,a=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#s=this.options,this.#a.data!==void 0&&(this.#h=this.#t),Ho(a,n))return;this.#r=a;const i=()=>{if(!n)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!this.#m.size)return!0;const d=new Set(c??this.#m);return this.options.throwOnError&&d.add("error"),Object.keys(this.#r).some(f=>{const m=f;return this.#r[m]!==n[m]&&d.has(m)})};this.#E({listeners:i()})}#w(){const n=this.#e.getQueryCache().build(this.#e,this.options);if(n===this.#t)return;const a=this.#t;this.#t=n,this.#n=n.state,this.hasListeners()&&(a?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#E(n){qt.batch(()=>{n.listeners&&this.listeners.forEach(a=>{a(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function X1(n,a){return Gn(a.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&a.retryOnMount===!1)}function pg(n,a){return X1(n,a)||n.state.data!==void 0&&Td(n,a,a.refetchOnMount)}function Td(n,a,i){if(Gn(a.enabled,n)!==!1&&vr(a.staleTime,n)!=="static"){const l=typeof i=="function"?i(n):i;return l==="always"||l!==!1&&Fd(n,a)}return!1}function gg(n,a,i,l){return(n!==a||Gn(l.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&Fd(n,i)}function Fd(n,a){return Gn(a.enabled,n)!==!1&&n.isStaleByTime(vr(a.staleTime,n))}function I1(n,a){return!Ho(n.getCurrentResult(),a)}function yg(n){return{onFetch:(a,i)=>{const l=a.options,c=a.fetchOptions?.meta?.fetchMore?.direction,d=a.state.data?.pages||[],f=a.state.data?.pageParams||[];let m={pages:[],pageParams:[]},g=0;const p=async()=>{let x=!1;const y=L=>{H1(L,()=>a.signal,()=>x=!0)},T=Ty(a.options,a.fetchOptions),N=async(L,B,P)=>{if(x)return Promise.reject();if(B==null&&L.pages.length)return Promise.resolve(L);const Y=(()=>{const de={client:a.client,queryKey:a.queryKey,pageParam:B,direction:P?"backward":"forward",meta:a.options.meta};return y(de),de})(),W=await T(Y),{maxPages:he}=a.options,fe=P?q1:B1;return{pages:fe(L.pages,W,he),pageParams:fe(L.pageParams,B,he)}};if(c&&d.length){const L=c==="backward",B=L?ky:Cd,P={pages:d,pageParams:f},K=B(l,P);m=await N(P,K,L)}else{const L=n??d.length;do{const B=g===0?f[0]??l.initialPageParam:Cd(l,m);if(g>0&&B==null)break;m=await N(m,B),g++}while(g<L)}return m};a.options.persister?a.fetchFn=()=>a.options.persister?.(p,{client:a.client,queryKey:a.queryKey,meta:a.options.meta,signal:a.signal},i):a.fetchFn=p}}}function Cd(n,{pages:a,pageParams:i}){const l=a.length-1;return a.length>0?n.getNextPageParam(a[l],a,i[l],i):void 0}function ky(n,{pages:a,pageParams:i}){return a.length>0?n.getPreviousPageParam?.(a[0],a,i[0],i):void 0}function eR(n,a){return a?Cd(n,a)!=null:!1}function tR(n,a){return!a||!n.getPreviousPageParam?!1:ky(n,a)!=null}var Z1=class extends Ry{#e;#t;#n;#r;constructor(n){super(),this.#e=n.client,this.mutationId=n.mutationId,this.#n=n.mutationCache,this.#t=[],this.state=n.state||Ny(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){this.#t.includes(n)||(this.#t.push(n),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.#t=this.#t.filter(a=>a!==n),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(n){const a=()=>{this.#a({type:"continue"})},i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Ay({fn:()=>this.options.mutationFn?this.options.mutationFn(n,i):Promise.reject(new Error("No mutationFn found")),onFail:(d,f)=>{this.#a({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#a({type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const l=this.state.status==="pending",c=!this.#r.canStart();try{if(l)a();else{this.#a({type:"pending",variables:n,isPaused:c}),this.#n.config.onMutate&&await this.#n.config.onMutate(n,this,i);const f=await this.options.onMutate?.(n,i);f!==this.state.context&&this.#a({type:"pending",context:f,variables:n,isPaused:c})}const d=await this.#r.start();return await this.#n.config.onSuccess?.(d,n,this.state.context,this,i),await this.options.onSuccess?.(d,n,this.state.context,i),await this.#n.config.onSettled?.(d,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(d,null,n,this.state.context,i),this.#a({type:"success",data:d}),d}catch(d){try{await this.#n.config.onError?.(d,n,this.state.context,this,i)}catch(f){Promise.reject(f)}try{await this.options.onError?.(d,n,this.state.context,i)}catch(f){Promise.reject(f)}try{await this.#n.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,i)}catch(f){Promise.reject(f)}try{await this.options.onSettled?.(void 0,d,n,this.state.context,i)}catch(f){Promise.reject(f)}throw this.#a({type:"error",error:d}),d}finally{this.#n.runNext(this)}}#a(n){const a=i=>{switch(n.type){case"failed":return{...i,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...i,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:n.error,failureCount:i.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=a(this.state),qt.batch(()=>{this.#t.forEach(i=>{i.onMutationUpdate(n)}),this.#n.notify({mutation:this,type:"updated",action:n})})}};function Ny(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var J1=class extends Vi{constructor(n={}){super(),this.config=n,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(n,a,i){const l=new Z1({client:n,mutationCache:this,mutationId:++this.#n,options:n.defaultMutationOptions(a),state:i});return this.add(l),l}add(n){this.#e.add(n);const a=bo(n);if(typeof a=="string"){const i=this.#t.get(a);i?i.push(n):this.#t.set(a,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#e.delete(n)){const a=bo(n);if(typeof a=="string"){const i=this.#t.get(a);if(i)if(i.length>1){const l=i.indexOf(n);l!==-1&&i.splice(l,1)}else i[0]===n&&this.#t.delete(a)}}this.notify({type:"removed",mutation:n})}canRun(n){const a=bo(n);if(typeof a=="string"){const l=this.#t.get(a)?.find(c=>c.state.status==="pending");return!l||l===n}else return!0}runNext(n){const a=bo(n);return typeof a=="string"?this.#t.get(a)?.find(l=>l!==n&&l.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){qt.batch(()=>{this.#e.forEach(n=>{this.notify({type:"removed",mutation:n})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(n){const a={exact:!0,...n};return this.getAll().find(i=>cg(a,i))}findAll(n={}){return this.getAll().filter(a=>cg(n,a))}notify(n){qt.batch(()=>{this.listeners.forEach(a=>{a(n)})})}resumePausedMutations(){const n=this.getAll().filter(a=>a.state.isPaused);return qt.batch(()=>Promise.all(n.map(a=>a.continue().catch(an))))}};function bo(n){return n.options.scope?.id}var $1=class extends Vi{#e;#t=void 0;#n;#r;constructor(a,i){super(),this.#e=a,this.setOptions(i),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(a){const i=this.options;this.options=this.#e.defaultMutationOptions(a),Ho(this.options,i)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),i?.mutationKey&&this.options.mutationKey&&Zr(i.mutationKey)!==Zr(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(a){this.#a(),this.#s(a)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#s()}mutate(a,i){return this.#r=i,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(a)}#a(){const a=this.#n?.state??Ny();this.#t={...a,isPending:a.status==="pending",isSuccess:a.status==="success",isError:a.status==="error",isIdle:a.status==="idle",mutate:this.mutate,reset:this.reset}}#s(a){qt.batch(()=>{if(this.#r&&this.hasListeners()){const i=this.#t.variables,l=this.#t.context,c={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(a?.type==="success"){try{this.#r.onSuccess?.(a.data,i,l,c)}catch(d){Promise.reject(d)}try{this.#r.onSettled?.(a.data,null,i,l,c)}catch(d){Promise.reject(d)}}else if(a?.type==="error"){try{this.#r.onError?.(a.error,i,l,c)}catch(d){Promise.reject(d)}try{this.#r.onSettled?.(void 0,a.error,i,l,c)}catch(d){Promise.reject(d)}}}this.listeners.forEach(i=>{i(this.#t)})})}},W1=class extends Vi{constructor(n={}){super(),this.config=n,this.#e=new Map}#e;build(n,a,i){const l=a.queryKey,c=a.queryHash??Gd(l,a);let d=this.get(c);return d||(d=new Y1({client:n,queryKey:l,queryHash:c,options:n.defaultQueryOptions(a),state:i,defaultOptions:n.getQueryDefaults(l)}),this.add(d)),d}add(n){this.#e.has(n.queryHash)||(this.#e.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const a=this.#e.get(n.queryHash);a&&(n.destroy(),a===n&&this.#e.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){qt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#e.get(n)}getAll(){return[...this.#e.values()]}find(n){const a={exact:!0,...n};return this.getAll().find(i=>ug(a,i))}findAll(n={}){const a=this.getAll();return Object.keys(n).length>0?a.filter(i=>ug(n,i)):a}notify(n){qt.batch(()=>{this.listeners.forEach(a=>{a(n)})})}onFocus(){qt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){qt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},ex=class{#e;#t;#n;#r;#a;#s;#l;#i;constructor(n={}){this.#e=n.queryCache||new W1,this.#t=n.mutationCache||new J1,this.#n=n.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#l=Yd.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Qo.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#l?.(),this.#l=void 0,this.#i?.(),this.#i=void 0)}isFetching(n){return this.#e.findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return this.#t.findAll({...n,status:"pending"}).length}getQueryData(n){const a=this.defaultQueryOptions({queryKey:n});return this.#e.get(a.queryHash)?.state.data}ensureQueryData(n){const a=this.defaultQueryOptions(n),i=this.#e.build(this,a),l=i.state.data;return l===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(vr(a.staleTime,i))&&this.prefetchQuery(a),Promise.resolve(l))}getQueriesData(n){return this.#e.findAll(n).map(({queryKey:a,state:i})=>{const l=i.data;return[a,l]})}setQueryData(n,a,i){const l=this.defaultQueryOptions({queryKey:n}),d=this.#e.get(l.queryHash)?.state.data,f=z1(a,d);if(f!==void 0)return this.#e.build(this,l).setData(f,{...i,manual:!0})}setQueriesData(n,a,i){return qt.batch(()=>this.#e.findAll(n).map(({queryKey:l})=>[l,this.setQueryData(l,a,i)]))}getQueryState(n){const a=this.defaultQueryOptions({queryKey:n});return this.#e.get(a.queryHash)?.state}removeQueries(n){const a=this.#e;qt.batch(()=>{a.findAll(n).forEach(i=>{a.remove(i)})})}resetQueries(n,a){const i=this.#e;return qt.batch(()=>(i.findAll(n).forEach(l=>{l.reset()}),this.refetchQueries({type:"active",...n},a)))}cancelQueries(n,a={}){const i={revert:!0,...a},l=qt.batch(()=>this.#e.findAll(n).map(c=>c.cancel(i)));return Promise.all(l).then(an).catch(an)}invalidateQueries(n,a={}){return qt.batch(()=>(this.#e.findAll(n).forEach(i=>{i.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},a)))}refetchQueries(n,a={}){const i={...a,cancelRefetch:a.cancelRefetch??!0},l=qt.batch(()=>this.#e.findAll(n).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let d=c.fetch(void 0,i);return i.throwOnError||(d=d.catch(an)),c.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(l).then(an)}fetchQuery(n){const a=this.defaultQueryOptions(n);a.retry===void 0&&(a.retry=!1);const i=this.#e.build(this,a);return i.isStaleByTime(vr(a.staleTime,i))?i.fetch(a):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(an).catch(an)}fetchInfiniteQuery(n){return n.behavior=yg(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(an).catch(an)}ensureInfiniteQueryData(n){return n.behavior=yg(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Qo.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(n){this.#n=n}setQueryDefaults(n,a){this.#r.set(Zr(n),{queryKey:n,defaultOptions:a})}getQueryDefaults(n){const a=[...this.#r.values()],i={};return a.forEach(l=>{Zs(n,l.queryKey)&&Object.assign(i,l.defaultOptions)}),i}setMutationDefaults(n,a){this.#a.set(Zr(n),{mutationKey:n,defaultOptions:a})}getMutationDefaults(n){const a=[...this.#a.values()],i={};return a.forEach(l=>{Zs(n,l.mutationKey)&&Object.assign(i,l.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const a={...this.#n.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return a.queryHash||(a.queryHash=Gd(a.queryKey,a)),a.refetchOnReconnect===void 0&&(a.refetchOnReconnect=a.networkMode!=="always"),a.throwOnError===void 0&&(a.throwOnError=!!a.suspense),!a.networkMode&&a.persister&&(a.networkMode="offlineFirst"),a.queryFn===Kd&&(a.enabled=!1),a}defaultMutationOptions(n){return n?._defaulted?n:{...this.#n.mutations,...n?.mutationKey&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Oy=S.createContext(void 0),tt=n=>{const a=S.useContext(Oy);if(!a)throw new Error("No QueryClient set, use QueryClientProvider to set one");return a},tx=({client:n,children:a})=>(S.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),v.jsx(Oy.Provider,{value:n,children:a})),My=S.createContext(!1),nx=()=>S.useContext(My);My.Provider;function ax(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var rx=S.createContext(ax()),ix=()=>S.useContext(rx),sx=(n,a,i)=>{const l=i?.state.error&&typeof n.throwOnError=="function"?Vd(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||l)&&(a.isReset()||(n.retryOnMount=!1))},lx=n=>{S.useEffect(()=>{n.clearReset()},[n])},ox=({result:n,errorResetBoundary:a,throwOnError:i,query:l,suspense:c})=>n.isError&&!a.isReset()&&!n.isFetching&&l&&(c&&n.data===void 0||Vd(i,[n.error,l])),ux=n=>{if(n.suspense){const i=c=>c==="static"?c:Math.max(c??1e3,1e3),l=n.staleTime;n.staleTime=typeof l=="function"?(...c)=>i(l(...c)):i(l),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},cx=(n,a)=>n.isLoading&&n.isFetching&&!a,dx=(n,a)=>n?.suspense&&a.isPending,vg=(n,a,i)=>a.fetchOptimistic(n).catch(()=>{i.clearReset()});function fx(n,a,i){const l=nx(),c=ix(),d=tt(),f=d.defaultQueryOptions(n);d.getDefaultOptions().queries?._experimental_beforeQuery?.(f);const m=d.getQueryCache().get(f.queryHash);f._optimisticResults=l?"isRestoring":"optimistic",ux(f),sx(f,c,m),lx(c);const g=!d.getQueryCache().get(f.queryHash),[p]=S.useState(()=>new a(d,f)),x=p.getOptimisticResult(f),y=!l&&n.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(T=>{const N=y?p.subscribe(qt.batchCalls(T)):an;return p.updateResult(),N},[p,y]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),S.useEffect(()=>{p.setOptions(f)},[f,p]),dx(f,x))throw vg(f,p,c);if(ox({result:x,errorResetBoundary:c,throwOnError:f.throwOnError,query:m,suspense:f.suspense}))throw x.error;return d.getDefaultOptions().queries?._experimental_afterQuery?.(f,x),f.experimental_prefetchInRender&&!Ir&&cx(x,l)&&(g?vg(f,p,c):m?.promise)?.catch(an).finally(()=>{p.updateResult()}),f.notifyOnChangeProps?x:p.trackResult(x)}function rn(n,a){return fx(n,F1)}function ct(n,a){const i=tt(),[l]=S.useState(()=>new $1(i,n));S.useEffect(()=>{l.setOptions(n)},[l,n]);const c=S.useSyncExternalStore(S.useCallback(f=>l.subscribe(qt.batchCalls(f)),[l]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),d=S.useCallback((f,m)=>{l.mutate(f,m).catch(an)},[l]);if(c.error&&Vd(l.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}var jy=Sy();const hx=xy(jy);function mx(n){if(typeof document>"u")return;let a=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",a.appendChild(i),i.styleSheet?i.styleSheet.cssText=n:i.appendChild(document.createTextNode(n))}const px=n=>{switch(n){case"success":return vx;case"info":return xx;case"warning":return bx;case"error":return Sx;default:return null}},gx=Array(12).fill(0),yx=({visible:n,className:a})=>ne.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":n},ne.createElement("div",{className:"sonner-spinner"},gx.map((i,l)=>ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${l}`})))),vx=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),bx=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),xx=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Sx=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),wx=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Ex=()=>{const[n,a]=ne.useState(document.hidden);return ne.useEffect(()=>{const i=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",i),()=>window.removeEventListener("visibilitychange",i)},[]),n};let Ad=1;class Tx{constructor(){this.subscribe=a=>(this.subscribers.push(a),()=>{const i=this.subscribers.indexOf(a);this.subscribers.splice(i,1)}),this.publish=a=>{this.subscribers.forEach(i=>i(a))},this.addToast=a=>{this.publish(a),this.toasts=[...this.toasts,a]},this.create=a=>{var i;const{message:l,...c}=a,d=typeof a?.id=="number"||((i=a.id)==null?void 0:i.length)>0?a.id:Ad++,f=this.toasts.find(g=>g.id===d),m=a.dismissible===void 0?!0:a.dismissible;return this.dismissedToasts.has(d)&&this.dismissedToasts.delete(d),f?this.toasts=this.toasts.map(g=>g.id===d?(this.publish({...g,...a,id:d,title:l}),{...g,...a,id:d,dismissible:m,title:l}):g):this.addToast({title:l,...c,dismissible:m,id:d}),d},this.dismiss=a=>(a?(this.dismissedToasts.add(a),requestAnimationFrame(()=>this.subscribers.forEach(i=>i({id:a,dismiss:!0})))):this.toasts.forEach(i=>{this.subscribers.forEach(l=>l({id:i.id,dismiss:!0}))}),a),this.message=(a,i)=>this.create({...i,message:a}),this.error=(a,i)=>this.create({...i,message:a,type:"error"}),this.success=(a,i)=>this.create({...i,type:"success",message:a}),this.info=(a,i)=>this.create({...i,type:"info",message:a}),this.warning=(a,i)=>this.create({...i,type:"warning",message:a}),this.loading=(a,i)=>this.create({...i,type:"loading",message:a}),this.promise=(a,i)=>{if(!i)return;let l;i.loading!==void 0&&(l=this.create({...i,promise:a,type:"loading",message:i.loading,description:typeof i.description!="function"?i.description:void 0}));const c=Promise.resolve(a instanceof Function?a():a);let d=l!==void 0,f;const m=c.then(async p=>{if(f=["resolve",p],ne.isValidElement(p))d=!1,this.create({id:l,type:"default",message:p});else if(Ax(p)&&!p.ok){d=!1;const y=typeof i.error=="function"?await i.error(`HTTP error! status: ${p.status}`):i.error,T=typeof i.description=="function"?await i.description(`HTTP error! status: ${p.status}`):i.description,L=typeof y=="object"&&!ne.isValidElement(y)?y:{message:y};this.create({id:l,type:"error",description:T,...L})}else if(p instanceof Error){d=!1;const y=typeof i.error=="function"?await i.error(p):i.error,T=typeof i.description=="function"?await i.description(p):i.description,L=typeof y=="object"&&!ne.isValidElement(y)?y:{message:y};this.create({id:l,type:"error",description:T,...L})}else if(i.success!==void 0){d=!1;const y=typeof i.success=="function"?await i.success(p):i.success,T=typeof i.description=="function"?await i.description(p):i.description,L=typeof y=="object"&&!ne.isValidElement(y)?y:{message:y};this.create({id:l,type:"success",description:T,...L})}}).catch(async p=>{if(f=["reject",p],i.error!==void 0){d=!1;const x=typeof i.error=="function"?await i.error(p):i.error,y=typeof i.description=="function"?await i.description(p):i.description,N=typeof x=="object"&&!ne.isValidElement(x)?x:{message:x};this.create({id:l,type:"error",description:y,...N})}}).finally(()=>{d&&(this.dismiss(l),l=void 0),i.finally==null||i.finally.call(i)}),g=()=>new Promise((p,x)=>m.then(()=>f[0]==="reject"?x(f[1]):p(f[1])).catch(x));return typeof l!="string"&&typeof l!="number"?{unwrap:g}:Object.assign(l,{unwrap:g})},this.custom=(a,i)=>{const l=i?.id||Ad++;return this.create({jsx:a(l),id:l,...i}),l},this.getActiveToasts=()=>this.toasts.filter(a=>!this.dismissedToasts.has(a.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const gn=new Tx,Cx=(n,a)=>{const i=a?.id||Ad++;return gn.addToast({title:n,...a,id:i}),i},Ax=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",Rx=Cx,_x=()=>gn.toasts,kx=()=>gn.getActiveToasts(),Bi=Object.assign(Rx,{success:gn.success,info:gn.info,warning:gn.warning,error:gn.error,custom:gn.custom,message:gn.message,promise:gn.promise,dismiss:gn.dismiss,loading:gn.loading},{getHistory:_x,getToasts:kx});mx("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function xo(n){return n.label!==void 0}const Nx=3,Ox="24px",Mx="16px",bg=4e3,jx=356,Dx=14,zx=45,Lx=200;function da(...n){return n.filter(Boolean).join(" ")}function Ux(n){const[a,i]=n.split("-"),l=[];return a&&l.push(a),i&&l.push(i),l}const Bx=n=>{var a,i,l,c,d,f,m,g,p;const{invert:x,toast:y,unstyled:T,interacting:N,setHeights:L,visibleToasts:B,heights:P,index:K,toasts:Y,expanded:W,removeToast:he,defaultRichColors:fe,closeButton:de,style:R,cancelButtonStyle:V,actionButtonStyle:re,className:ke="",descriptionClassName:Re="",duration:Se,position:Me,gap:Le,expandByDefault:Ee,classNames:k,icons:X,closeButtonAriaLabel:Q="Close toast"}=n,[me,ve]=ne.useState(null),[C,q]=ne.useState(null),[H,Z]=ne.useState(!1),[ee,$]=ne.useState(!1),[ae,Te]=ne.useState(!1),[Be,Pt]=ne.useState(!1),[en,Je]=ne.useState(!1),[Fn,sn]=ne.useState(0),[wr,ln]=ne.useState(0),va=ne.useRef(y.duration||Se||bg),Er=ne.useRef(null),Zt=ne.useRef(null),Tr=K===0,Cr=K+1<=B,Gt=y.type,ia=y.dismissible!==!1,yt=y.className||"",ba=y.descriptionClassName||"",sa=ne.useMemo(()=>P.findIndex(_e=>_e.toastId===y.id)||0,[P,y.id]),Ga=ne.useMemo(()=>{var _e;return(_e=y.closeButton)!=null?_e:de},[y.closeButton,de]),Kt=ne.useMemo(()=>y.duration||Se||bg,[y.duration,Se]),tn=ne.useRef(0),kn=ne.useRef(0),ei=ne.useRef(0),Nn=ne.useRef(null),[xa,dt]=Me.split("-"),on=ne.useMemo(()=>P.reduce((_e,ot,Et)=>Et>=sa?_e:_e+ot.height,0),[P,sa]),Lt=Ex(),ti=y.invert||x,Ar=Gt==="loading";kn.current=ne.useMemo(()=>sa*Le+on,[sa,on]),ne.useEffect(()=>{va.current=Kt},[Kt]),ne.useEffect(()=>{Z(!0)},[]),ne.useEffect(()=>{const _e=Zt.current;if(_e){const ot=_e.getBoundingClientRect().height;return ln(ot),L(Et=>[{toastId:y.id,height:ot,position:y.position},...Et]),()=>L(Et=>Et.filter(Tt=>Tt.toastId!==y.id))}},[L,y.id]),ne.useLayoutEffect(()=>{if(!H)return;const _e=Zt.current,ot=_e.style.height;_e.style.height="auto";const Et=_e.getBoundingClientRect().height;_e.style.height=ot,ln(Et),L(Tt=>Tt.find(ut=>ut.toastId===y.id)?Tt.map(ut=>ut.toastId===y.id?{...ut,height:Et}:ut):[{toastId:y.id,height:Et,position:y.position},...Tt])},[H,y.title,y.description,L,y.id,y.jsx,y.action,y.cancel]);const yn=ne.useCallback(()=>{$(!0),sn(kn.current),L(_e=>_e.filter(ot=>ot.toastId!==y.id)),setTimeout(()=>{he(y)},Lx)},[y,he,L,kn]);ne.useEffect(()=>{if(y.promise&&Gt==="loading"||y.duration===1/0||y.type==="loading")return;let _e;return W||N||Lt?(()=>{if(ei.current<tn.current){const Tt=new Date().getTime()-tn.current;va.current=va.current-Tt}ei.current=new Date().getTime()})():va.current!==1/0&&(tn.current=new Date().getTime(),_e=setTimeout(()=>{y.onAutoClose==null||y.onAutoClose.call(y,y),yn()},va.current)),()=>clearTimeout(_e)},[W,N,y,Gt,Lt,yn]),ne.useEffect(()=>{y.delete&&(yn(),y.onDismiss==null||y.onDismiss.call(y,y))},[yn,y.delete]);function Xn(){var _e;if(X?.loading){var ot;return ne.createElement("div",{className:da(k?.loader,y==null||(ot=y.classNames)==null?void 0:ot.loader,"sonner-loader"),"data-visible":Gt==="loading"},X.loading)}return ne.createElement(yx,{className:da(k?.loader,y==null||(_e=y.classNames)==null?void 0:_e.loader),visible:Gt==="loading"})}const Sa=y.icon||X?.[Gt]||px(Gt);var In,On;return ne.createElement("li",{tabIndex:0,ref:Zt,className:da(ke,yt,k?.toast,y==null||(a=y.classNames)==null?void 0:a.toast,k?.default,k?.[Gt],y==null||(i=y.classNames)==null?void 0:i[Gt]),"data-sonner-toast":"","data-rich-colors":(In=y.richColors)!=null?In:fe,"data-styled":!(y.jsx||y.unstyled||T),"data-mounted":H,"data-promise":!!y.promise,"data-swiped":en,"data-removed":ee,"data-visible":Cr,"data-y-position":xa,"data-x-position":dt,"data-index":K,"data-front":Tr,"data-swiping":ae,"data-dismissible":ia,"data-type":Gt,"data-invert":ti,"data-swipe-out":Be,"data-swipe-direction":C,"data-expanded":!!(W||Ee&&H),"data-testid":y.testId,style:{"--index":K,"--toasts-before":K,"--z-index":Y.length-K,"--offset":`${ee?Fn:kn.current}px`,"--initial-height":Ee?"auto":`${wr}px`,...R,...y.style},onDragEnd:()=>{Te(!1),ve(null),Nn.current=null},onPointerDown:_e=>{_e.button!==2&&(Ar||!ia||(Er.current=new Date,sn(kn.current),_e.target.setPointerCapture(_e.pointerId),_e.target.tagName!=="BUTTON"&&(Te(!0),Nn.current={x:_e.clientX,y:_e.clientY})))},onPointerUp:()=>{var _e,ot,Et;if(Be||!ia)return;Nn.current=null;const Tt=Number(((_e=Zt.current)==null?void 0:_e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),vn=Number(((ot=Zt.current)==null?void 0:ot.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ut=new Date().getTime()-((Et=Er.current)==null?void 0:Et.getTime()),Jt=me==="x"?Tt:vn,wa=Math.abs(Jt)/ut;if(Math.abs(Jt)>=zx||wa>.11){sn(kn.current),y.onDismiss==null||y.onDismiss.call(y,y),q(me==="x"?Tt>0?"right":"left":vn>0?"down":"up"),yn(),Pt(!0);return}else{var w,_;(w=Zt.current)==null||w.style.setProperty("--swipe-amount-x","0px"),(_=Zt.current)==null||_.style.setProperty("--swipe-amount-y","0px")}Je(!1),Te(!1),ve(null)},onPointerMove:_e=>{var ot,Et,Tt;if(!Nn.current||!ia||((ot=window.getSelection())==null?void 0:ot.toString().length)>0)return;const ut=_e.clientY-Nn.current.y,Jt=_e.clientX-Nn.current.x;var wa;const w=(wa=n.swipeDirections)!=null?wa:Ux(Me);!me&&(Math.abs(Jt)>1||Math.abs(ut)>1)&&ve(Math.abs(Jt)>Math.abs(ut)?"x":"y");let _={x:0,y:0};const z=J=>1/(1.5+Math.abs(J)/20);if(me==="y"){if(w.includes("top")||w.includes("bottom"))if(w.includes("top")&&ut<0||w.includes("bottom")&&ut>0)_.y=ut;else{const J=ut*z(ut);_.y=Math.abs(J)<Math.abs(ut)?J:ut}}else if(me==="x"&&(w.includes("left")||w.includes("right")))if(w.includes("left")&&Jt<0||w.includes("right")&&Jt>0)_.x=Jt;else{const J=Jt*z(Jt);_.x=Math.abs(J)<Math.abs(Jt)?J:Jt}(Math.abs(_.x)>0||Math.abs(_.y)>0)&&Je(!0),(Et=Zt.current)==null||Et.style.setProperty("--swipe-amount-x",`${_.x}px`),(Tt=Zt.current)==null||Tt.style.setProperty("--swipe-amount-y",`${_.y}px`)}},Ga&&!y.jsx&&Gt!=="loading"?ne.createElement("button",{"aria-label":Q,"data-disabled":Ar,"data-close-button":!0,onClick:Ar||!ia?()=>{}:()=>{yn(),y.onDismiss==null||y.onDismiss.call(y,y)},className:da(k?.closeButton,y==null||(l=y.classNames)==null?void 0:l.closeButton)},(On=X?.close)!=null?On:wx):null,(Gt||y.icon||y.promise)&&y.icon!==null&&(X?.[Gt]!==null||y.icon)?ne.createElement("div",{"data-icon":"",className:da(k?.icon,y==null||(c=y.classNames)==null?void 0:c.icon)},y.promise||y.type==="loading"&&!y.icon?y.icon||Xn():null,y.type!=="loading"?Sa:null):null,ne.createElement("div",{"data-content":"",className:da(k?.content,y==null||(d=y.classNames)==null?void 0:d.content)},ne.createElement("div",{"data-title":"",className:da(k?.title,y==null||(f=y.classNames)==null?void 0:f.title)},y.jsx?y.jsx:typeof y.title=="function"?y.title():y.title),y.description?ne.createElement("div",{"data-description":"",className:da(Re,ba,k?.description,y==null||(m=y.classNames)==null?void 0:m.description)},typeof y.description=="function"?y.description():y.description):null),ne.isValidElement(y.cancel)?y.cancel:y.cancel&&xo(y.cancel)?ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:y.cancelButtonStyle||V,onClick:_e=>{xo(y.cancel)&&ia&&(y.cancel.onClick==null||y.cancel.onClick.call(y.cancel,_e),yn())},className:da(k?.cancelButton,y==null||(g=y.classNames)==null?void 0:g.cancelButton)},y.cancel.label):null,ne.isValidElement(y.action)?y.action:y.action&&xo(y.action)?ne.createElement("button",{"data-button":!0,"data-action":!0,style:y.actionButtonStyle||re,onClick:_e=>{xo(y.action)&&(y.action.onClick==null||y.action.onClick.call(y.action,_e),!_e.defaultPrevented&&yn())},className:da(k?.actionButton,y==null||(p=y.classNames)==null?void 0:p.actionButton)},y.action.label):null)};function xg(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function qx(n,a){const i={};return[n,a].forEach((l,c)=>{const d=c===1,f=d?"--mobile-offset":"--offset",m=d?Mx:Ox;function g(p){["top","right","bottom","left"].forEach(x=>{i[`${f}-${x}`]=typeof p=="number"?`${p}px`:p})}typeof l=="number"||typeof l=="string"?g(l):typeof l=="object"?["top","right","bottom","left"].forEach(p=>{l[p]===void 0?i[`${f}-${p}`]=m:i[`${f}-${p}`]=typeof l[p]=="number"?`${l[p]}px`:l[p]}):g(m)}),i}const Hx=ne.forwardRef(function(a,i){const{id:l,invert:c,position:d="bottom-right",hotkey:f=["altKey","KeyT"],expand:m,closeButton:g,className:p,offset:x,mobileOffset:y,theme:T="light",richColors:N,duration:L,style:B,visibleToasts:P=Nx,toastOptions:K,dir:Y=xg(),gap:W=Dx,icons:he,containerAriaLabel:fe="Notifications"}=a,[de,R]=ne.useState([]),V=ne.useMemo(()=>l?de.filter(H=>H.toasterId===l):de.filter(H=>!H.toasterId),[de,l]),re=ne.useMemo(()=>Array.from(new Set([d].concat(V.filter(H=>H.position).map(H=>H.position)))),[V,d]),[ke,Re]=ne.useState([]),[Se,Me]=ne.useState(!1),[Le,Ee]=ne.useState(!1),[k,X]=ne.useState(T!=="system"?T:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Q=ne.useRef(null),me=f.join("+").replace(/Key/g,"").replace(/Digit/g,""),ve=ne.useRef(null),C=ne.useRef(!1),q=ne.useCallback(H=>{R(Z=>{var ee;return(ee=Z.find($=>$.id===H.id))!=null&&ee.delete||gn.dismiss(H.id),Z.filter(({id:$})=>$!==H.id)})},[]);return ne.useEffect(()=>gn.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{R(Z=>Z.map(ee=>ee.id===H.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{hx.flushSync(()=>{R(Z=>{const ee=Z.findIndex($=>$.id===H.id);return ee!==-1?[...Z.slice(0,ee),{...Z[ee],...H},...Z.slice(ee+1)]:[H,...Z]})})})}),[de]),ne.useEffect(()=>{if(T!=="system"){X(T);return}if(T==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?X("dark"):X("light")),typeof window>"u")return;const H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:Z})=>{X(Z?"dark":"light")})}catch{H.addListener(({matches:ee})=>{try{X(ee?"dark":"light")}catch($){console.error($)}})}},[T]),ne.useEffect(()=>{de.length<=1&&Me(!1)},[de]),ne.useEffect(()=>{const H=Z=>{var ee;if(f.every(Te=>Z[Te]||Z.code===Te)){var ae;Me(!0),(ae=Q.current)==null||ae.focus()}Z.code==="Escape"&&(document.activeElement===Q.current||(ee=Q.current)!=null&&ee.contains(document.activeElement))&&Me(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[f]),ne.useEffect(()=>{if(Q.current)return()=>{ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null,C.current=!1)}},[Q.current]),ne.createElement("section",{ref:i,"aria-label":`${fe} ${me}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},re.map((H,Z)=>{var ee;const[$,ae]=H.split("-");return V.length?ne.createElement("ol",{key:H,dir:Y==="auto"?xg():Y,tabIndex:-1,ref:Q,className:p,"data-sonner-toaster":!0,"data-sonner-theme":k,"data-y-position":$,"data-x-position":ae,style:{"--front-toast-height":`${((ee=ke[0])==null?void 0:ee.height)||0}px`,"--width":`${jx}px`,"--gap":`${W}px`,...B,...qx(x,y)},onBlur:Te=>{C.current&&!Te.currentTarget.contains(Te.relatedTarget)&&(C.current=!1,ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null))},onFocus:Te=>{Te.target instanceof HTMLElement&&Te.target.dataset.dismissible==="false"||C.current||(C.current=!0,ve.current=Te.relatedTarget)},onMouseEnter:()=>Me(!0),onMouseMove:()=>Me(!0),onMouseLeave:()=>{Le||Me(!1)},onDragEnd:()=>Me(!1),onPointerDown:Te=>{Te.target instanceof HTMLElement&&Te.target.dataset.dismissible==="false"||Ee(!0)},onPointerUp:()=>Ee(!1)},V.filter(Te=>!Te.position&&Z===0||Te.position===H).map((Te,Be)=>{var Pt,en;return ne.createElement(Bx,{key:Te.id,icons:he,index:Be,toast:Te,defaultRichColors:N,duration:(Pt=K?.duration)!=null?Pt:L,className:K?.className,descriptionClassName:K?.descriptionClassName,invert:c,visibleToasts:P,closeButton:(en=K?.closeButton)!=null?en:g,interacting:Le,position:H,style:K?.style,unstyled:K?.unstyled,classNames:K?.classNames,cancelButtonStyle:K?.cancelButtonStyle,actionButtonStyle:K?.actionButtonStyle,closeButtonAriaLabel:K?.closeButtonAriaLabel,removeToast:q,toasts:V.filter(Je=>Je.position==Te.position),heights:ke.filter(Je=>Je.position==Te.position),setHeights:Re,expandByDefault:m,gap:W,expanded:Se,swipeDirections:a.swipeDirections})})):null}))}),Qx=new ex({defaultOptions:{queries:{staleTime:1e3*60,retry:1}}});var Dy=n=>{throw TypeError(n)},Px=(n,a,i)=>a.has(n)||Dy("Cannot "+i),ld=(n,a,i)=>(Px(n,a,"read from private field"),i?i.call(n):a.get(n)),Gx=(n,a,i)=>a.has(n)?Dy("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(n):a.set(n,i),Sg="popstate";function Kx(n={}){function a(l,c){let{pathname:d,search:f,hash:m}=l.location;return Js("",{pathname:d,search:f,hash:m},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function i(l,c){return typeof c=="string"?c:pa(c)}return Yx(a,i,null,n)}function qe(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function zt(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function Vx(){return Math.random().toString(36).substring(2,10)}function wg(n,a){return{usr:n.state,key:n.key,idx:a}}function Js(n,a,i=null,l){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?xr(a):a,state:i,key:a&&a.key||l||Vx()}}function pa({pathname:n="/",search:a="",hash:i=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function xr(n){let a={};if(n){let i=n.indexOf("#");i>=0&&(a.hash=n.substring(i),n=n.substring(0,i));let l=n.indexOf("?");l>=0&&(a.search=n.substring(l),n=n.substring(0,l)),n&&(a.pathname=n)}return a}function Yx(n,a,i,l={}){let{window:c=document.defaultView,v5Compat:d=!1}=l,f=c.history,m="POP",g=null,p=x();p==null&&(p=0,f.replaceState({...f.state,idx:p},""));function x(){return(f.state||{idx:null}).idx}function y(){m="POP";let P=x(),K=P==null?null:P-p;p=P,g&&g({action:m,location:B.location,delta:K})}function T(P,K){m="PUSH";let Y=Js(B.location,P,K);p=x()+1;let W=wg(Y,p),he=B.createHref(Y);try{f.pushState(W,"",he)}catch(fe){if(fe instanceof DOMException&&fe.name==="DataCloneError")throw fe;c.location.assign(he)}d&&g&&g({action:m,location:B.location,delta:1})}function N(P,K){m="REPLACE";let Y=Js(B.location,P,K);p=x();let W=wg(Y,p),he=B.createHref(Y);f.replaceState(W,"",he),d&&g&&g({action:m,location:B.location,delta:0})}function L(P){return zy(P)}let B={get action(){return m},get location(){return n(c,f)},listen(P){if(g)throw new Error("A history only accepts one active listener");return c.addEventListener(Sg,y),g=P,()=>{c.removeEventListener(Sg,y),g=null}},createHref(P){return a(c,P)},createURL:L,encodeLocation(P){let K=L(P);return{pathname:K.pathname,search:K.search,hash:K.hash}},push:T,replace:N,go(P){return f.go(P)}};return B}function zy(n,a=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),qe(i,"No window.location.(origin|href) available to create URL");let l=typeof n=="string"?n:pa(n);return l=l.replace(/ $/,"%20"),!a&&l.startsWith("//")&&(l=i+l),new URL(l,i)}var Vs,Eg=class{constructor(n){if(Gx(this,Vs,new Map),n)for(let[a,i]of n)this.set(a,i)}get(n){if(ld(this,Vs).has(n))return ld(this,Vs).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,a){ld(this,Vs).set(n,a)}};Vs=new WeakMap;var Fx=new Set(["lazy","caseSensitive","path","id","index","children"]);function Xx(n){return Fx.has(n)}var Ix=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Zx(n){return Ix.has(n)}function Jx(n){return n.index===!0}function $s(n,a,i=[],l={},c=!1){return n.map((d,f)=>{let m=[...i,String(f)],g=typeof d.id=="string"?d.id:m.join("-");if(qe(d.index!==!0||!d.children,"Cannot specify children on an index route"),qe(c||!l[g],`Found a route id collision on id "${g}". Route id's must be globally unique within Data Router usages`),Jx(d)){let p={...d,id:g};return l[g]=Tg(p,a(p)),p}else{let p={...d,id:g,children:void 0};return l[g]=Tg(p,a(p)),d.children&&(p.children=$s(d.children,a,m,l,c)),p}})}function Tg(n,a){return Object.assign(n,{...a,...typeof a.lazy=="object"&&a.lazy!=null?{lazy:{...n.lazy,...a.lazy}}:{}})}function mr(n,a,i="/"){return Ys(n,a,i,!1)}function Ys(n,a,i,l){let c=typeof a=="string"?xr(a):a,d=Vn(c.pathname||"/",i);if(d==null)return null;let f=Ly(n);Wx(f);let m=null;for(let g=0;m==null&&g<f.length;++g){let p=cS(d);m=oS(f[g],p,l)}return m}function $x(n,a){let{route:i,pathname:l,params:c}=n;return{id:i.id,pathname:l,params:c,data:a[i.id],loaderData:a[i.id],handle:i.handle}}function Ly(n,a=[],i=[],l="",c=!1){let d=(f,m,g=c,p)=>{let x={relativePath:p===void 0?f.path||"":p,caseSensitive:f.caseSensitive===!0,childrenIndex:m,route:f};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(l)&&g)return;qe(x.relativePath.startsWith(l),`Absolute route path "${x.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(l.length)}let y=ha([l,x.relativePath]),T=i.concat(x);f.children&&f.children.length>0&&(qe(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),Ly(f.children,a,T,y,g)),!(f.path==null&&!f.index)&&a.push({path:y,score:sS(y,f.index),routesMeta:T})};return n.forEach((f,m)=>{if(f.path===""||!f.path?.includes("?"))d(f,m);else for(let g of Uy(f.path))d(f,m,!0,g)}),a}function Uy(n){let a=n.split("/");if(a.length===0)return[];let[i,...l]=a,c=i.endsWith("?"),d=i.replace(/\?$/,"");if(l.length===0)return c?[d,""]:[d];let f=Uy(l.join("/")),m=[];return m.push(...f.map(g=>g===""?d:[d,g].join("/"))),c&&m.push(...f),m.map(g=>n.startsWith("/")&&g===""?"/":g)}function Wx(n){n.sort((a,i)=>a.score!==i.score?i.score-a.score:lS(a.routesMeta.map(l=>l.childrenIndex),i.routesMeta.map(l=>l.childrenIndex)))}var eS=/^:[\w-]+$/,tS=3,nS=2,aS=1,rS=10,iS=-2,Cg=n=>n==="*";function sS(n,a){let i=n.split("/"),l=i.length;return i.some(Cg)&&(l+=iS),a&&(l+=nS),i.filter(c=>!Cg(c)).reduce((c,d)=>c+(eS.test(d)?tS:d===""?aS:rS),l)}function lS(n,a){return n.length===a.length&&n.slice(0,-1).every((l,c)=>l===a[c])?n[n.length-1]-a[a.length-1]:0}function oS(n,a,i=!1){let{routesMeta:l}=n,c={},d="/",f=[];for(let m=0;m<l.length;++m){let g=l[m],p=m===l.length-1,x=d==="/"?a:a.slice(d.length)||"/",y=Po({path:g.relativePath,caseSensitive:g.caseSensitive,end:p},x),T=g.route;if(!y&&p&&i&&!l[l.length-1].route.index&&(y=Po({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},x)),!y)return null;Object.assign(c,y.params),f.push({params:c,pathname:ha([d,y.pathname]),pathnameBase:hS(ha([d,y.pathnameBase])),route:T}),y.pathnameBase!=="/"&&(d=ha([d,y.pathnameBase]))}return f}function Po(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,l]=uS(n.path,n.caseSensitive,n.end),c=a.match(i);if(!c)return null;let d=c[0],f=d.replace(/(.)\/+$/,"$1"),m=c.slice(1);return{params:l.reduce((p,{paramName:x,isOptional:y},T)=>{if(x==="*"){let L=m[T]||"";f=d.slice(0,d.length-L.length).replace(/(.)\/+$/,"$1")}const N=m[T];return y&&!N?p[x]=void 0:p[x]=(N||"").replace(/%2F/g,"/"),p},{}),pathname:d,pathnameBase:f,pattern:n}}function uS(n,a=!1,i=!0){zt(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let l=[],c="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,m,g)=>(l.push({paramName:m,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(l.push({paramName:"*"}),c+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?c+="\\/*$":n!==""&&n!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,a?void 0:"i"),l]}function cS(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return zt(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),n}}function Vn(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,l=n.charAt(i);return l&&l!=="/"?null:n.slice(i)||"/"}function dS({basename:n,pathname:a}){return a==="/"?n:ha([n,a])}var By=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Xd=n=>By.test(n);function fS(n,a="/"){let{pathname:i,search:l="",hash:c=""}=typeof n=="string"?xr(n):n,d;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?d=Ag(i.substring(1),"/"):d=Ag(i,a)):d=a,{pathname:d,search:mS(l),hash:pS(c)}}function Ag(n,a){let i=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(c=>{c===".."?i.length>1&&i.pop():c!=="."&&i.push(c)}),i.length>1?i.join("/"):"/"}function od(n,a,i,l){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(l)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function qy(n){return n.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function Id(n){let a=qy(n);return a.map((i,l)=>l===a.length-1?i.pathname:i.pathnameBase)}function Zd(n,a,i,l=!1){let c;typeof n=="string"?c=xr(n):(c={...n},qe(!c.pathname||!c.pathname.includes("?"),od("?","pathname","search",c)),qe(!c.pathname||!c.pathname.includes("#"),od("#","pathname","hash",c)),qe(!c.search||!c.search.includes("#"),od("#","search","hash",c)));let d=n===""||c.pathname==="",f=d?"/":c.pathname,m;if(f==null)m=i;else{let y=a.length-1;if(!l&&f.startsWith("..")){let T=f.split("/");for(;T[0]==="..";)T.shift(),y-=1;c.pathname=T.join("/")}m=y>=0?a[y]:"/"}let g=fS(c,m),p=f&&f!=="/"&&f.endsWith("/"),x=(d||f===".")&&i.endsWith("/");return!g.pathname.endsWith("/")&&(p||x)&&(g.pathname+="/"),g}var ha=n=>n.join("/").replace(/\/\/+/g,"/"),hS=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),mS=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,pS=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,tl=class{constructor(n,a,i,l=!1){this.status=n,this.statusText=a||"",this.internal=l,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function Ws(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function nl(n){return n.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Hy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Qy(n,a){let i=n;if(typeof i!="string"||!By.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let l=i,c=!1;if(Hy)try{let d=new URL(window.location.href),f=i.startsWith("//")?new URL(d.protocol+i):new URL(i),m=Vn(f.pathname,a);f.origin===d.origin&&m!=null?i=m+f.search+f.hash:c=!0}catch{zt(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:l,isExternal:c,to:i}}var gr=Symbol("Uninstrumented");function gS(n,a){let i={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};n.forEach(c=>c({id:a.id,index:a.index,path:a.path,instrument(d){let f=Object.keys(i);for(let m of f)d[m]&&i[m].push(d[m])}}));let l={};if(typeof a.lazy=="function"&&i.lazy.length>0){let c=Hi(i.lazy,a.lazy,()=>{});c&&(l.lazy=c)}if(typeof a.lazy=="object"){let c=a.lazy;["middleware","loader","action"].forEach(d=>{let f=c[d],m=i[`lazy.${d}`];if(typeof f=="function"&&m.length>0){let g=Hi(m,f,()=>{});g&&(l.lazy=Object.assign(l.lazy||{},{[d]:g}))}})}return["loader","action"].forEach(c=>{let d=a[c];if(typeof d=="function"&&i[c].length>0){let f=d[gr]??d,m=Hi(i[c],f,(...g)=>Rg(g[0]));m&&(c==="loader"&&f.hydrate===!0&&(m.hydrate=!0),m[gr]=f,l[c]=m)}}),a.middleware&&a.middleware.length>0&&i.middleware.length>0&&(l.middleware=a.middleware.map(c=>{let d=c[gr]??c,f=Hi(i.middleware,d,(...m)=>Rg(m[0]));return f?(f[gr]=d,f):c})),l}function yS(n,a){let i={navigate:[],fetch:[]};if(a.forEach(l=>l({instrument(c){let d=Object.keys(c);for(let f of d)c[f]&&i[f].push(c[f])}})),i.navigate.length>0){let l=n.navigate[gr]??n.navigate,c=Hi(i.navigate,l,(...d)=>{let[f,m]=d;return{to:typeof f=="number"||typeof f=="string"?f:f?pa(f):".",..._g(n,m??{})}});c&&(c[gr]=l,n.navigate=c)}if(i.fetch.length>0){let l=n.fetch[gr]??n.fetch,c=Hi(i.fetch,l,(...d)=>{let[f,,m,g]=d;return{href:m??".",fetcherKey:f,..._g(n,g??{})}});c&&(c[gr]=l,n.fetch=c)}return n}function Hi(n,a,i){return n.length===0?null:async(...l)=>{let c=await Py(n,i(...l),()=>a(...l),n.length-1);if(c.type==="error")throw c.value;return c.value}}async function Py(n,a,i,l){let c=n[l],d;if(c){let f,m=async()=>(f?console.error("You cannot call instrumented handlers more than once"):f=Py(n,a,i,l-1),d=await f,qe(d,"Expected a result"),d.type==="error"&&d.value instanceof Error?{status:"error",error:d.value}:{status:"success",error:void 0});try{await c(m,a)}catch(g){console.error("An instrumentation function threw an error:",g)}f||await m(),await f}else try{d={type:"success",value:await i()}}catch(f){d={type:"error",value:f}}return d||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Rg(n){let{request:a,context:i,params:l,unstable_pattern:c}=n;return{request:vS(a),params:{...l},unstable_pattern:c,context:bS(i)}}function _g(n,a){return{currentUrl:pa(n.state.location),..."formMethod"in a?{formMethod:a.formMethod}:{},..."formEncType"in a?{formEncType:a.formEncType}:{},..."formData"in a?{formData:a.formData}:{},..."body"in a?{body:a.body}:{}}}function vS(n){return{method:n.method,url:n.url,headers:{get:(...a)=>n.headers.get(...a)}}}function bS(n){if(SS(n)){let a={...n};return Object.freeze(a),a}else return{get:a=>n.get(a)}}var xS=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function SS(n){if(n===null||typeof n!="object")return!1;const a=Object.getPrototypeOf(n);return a===Object.prototype||a===null||Object.getOwnPropertyNames(a).sort().join("\0")===xS}var Gy=["POST","PUT","PATCH","DELETE"],wS=new Set(Gy),ES=["GET",...Gy],TS=new Set(ES),Ky=new Set([301,302,303,307,308]),CS=new Set([307,308]),ud={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},AS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Hs={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},RS=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),Vy="remix-router-transitions",Yy=Symbol("ResetLoaderData");function _S(n){const a=n.window?n.window:typeof window<"u"?window:void 0,i=typeof a<"u"&&typeof a.document<"u"&&typeof a.document.createElement<"u";qe(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let l=n.hydrationRouteProperties||[],c=n.mapRouteProperties||RS,d=c;if(n.unstable_instrumentations){let w=n.unstable_instrumentations;d=_=>({...c(_),...gS(w.map(z=>z.route).filter(Boolean),_)})}let f={},m=$s(n.routes,d,void 0,f),g,p=n.basename||"/";p.startsWith("/")||(p=`/${p}`);let x=n.dataStrategy||jS,y={...n.future},T=null,N=new Set,L=null,B=null,P=null,K=n.hydrationData!=null,Y=mr(m,n.history.location,p),W=!1,he=null,fe;if(Y==null&&!n.patchRoutesOnNavigation){let w=Pn(404,{pathname:n.history.location.pathname}),{matches:_,route:z}=So(m);fe=!0,Y=_,he={[z.id]:w}}else if(Y&&!n.hydrationData&&Tt(Y,m,n.history.location.pathname).active&&(Y=null),Y)if(Y.some(w=>w.route.lazy))fe=!1;else if(!Y.some(w=>Jd(w.route)))fe=!0;else{let w=n.hydrationData?n.hydrationData.loaderData:null,_=n.hydrationData?n.hydrationData.errors:null;if(_){let z=Y.findIndex(J=>_[J.route.id]!==void 0);fe=Y.slice(0,z+1).every(J=>!_d(J.route,w,_))}else fe=Y.every(z=>!_d(z.route,w,_))}else{fe=!1,Y=[];let w=Tt(null,m,n.history.location.pathname);w.active&&w.matches&&(W=!0,Y=w.matches)}let de,R={historyAction:n.history.action,location:n.history.location,matches:Y,initialized:fe,navigation:ud,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||he,fetchers:new Map,blockers:new Map},V="POP",re=null,ke=!1,Re,Se=!1,Me=new Map,Le=null,Ee=!1,k=!1,X=new Set,Q=new Map,me=0,ve=-1,C=new Map,q=new Set,H=new Map,Z=new Map,ee=new Set,$=new Map,ae,Te=null;function Be(){if(T=n.history.listen(({action:w,location:_,delta:z})=>{if(ae){ae(),ae=void 0;return}zt($.size===0||z!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let J=Sa({currentLocation:R.location,nextLocation:_,historyAction:w});if(J&&z!=null){let te=new Promise(be=>{ae=be});n.history.go(z*-1),Xn(J,{state:"blocked",location:_,proceed(){Xn(J,{state:"proceeding",proceed:void 0,reset:void 0,location:_}),te.then(()=>n.history.go(z))},reset(){let be=new Map(R.blockers);be.set(J,Hs),Je({blockers:be})}}),re?.resolve(),re=null;return}return ln(w,_)}),i){JS(a,Me);let w=()=>$S(a,Me);a.addEventListener("pagehide",w),Le=()=>a.removeEventListener("pagehide",w)}return R.initialized||ln("POP",R.location,{initialHydration:!0}),de}function Pt(){T&&T(),Le&&Le(),N.clear(),Re&&Re.abort(),R.fetchers.forEach((w,_)=>Nn(_)),R.blockers.forEach((w,_)=>yn(_))}function en(w){return N.add(w),()=>N.delete(w)}function Je(w,_={}){w.matches&&(w.matches=w.matches.map(te=>{let be=f[te.route.id],se=te.route;return se.element!==be.element||se.errorElement!==be.errorElement||se.hydrateFallbackElement!==be.hydrateFallbackElement?{...te,route:be}:te})),R={...R,...w};let z=[],J=[];R.fetchers.forEach((te,be)=>{te.state==="idle"&&(ee.has(be)?z.push(be):J.push(be))}),ee.forEach(te=>{!R.fetchers.has(te)&&!Q.has(te)&&z.push(te)}),[...N].forEach(te=>te(R,{deletedFetchers:z,newErrors:w.errors??null,viewTransitionOpts:_.viewTransitionOpts,flushSync:_.flushSync===!0})),z.forEach(te=>Nn(te)),J.forEach(te=>R.fetchers.delete(te))}function Fn(w,_,{flushSync:z}={}){let J=R.actionData!=null&&R.navigation.formMethod!=null&&Wt(R.navigation.formMethod)&&R.navigation.state==="loading"&&w.state?._isRedirect!==!0,te;_.actionData?Object.keys(_.actionData).length>0?te=_.actionData:te=null:J?te=R.actionData:te=null;let be=_.loaderData?Bg(R.loaderData,_.loaderData,_.matches||[],_.errors):R.loaderData,se=R.blockers;se.size>0&&(se=new Map(se),se.forEach((Ce,xe)=>se.set(xe,Hs)));let ie=Ee?!1:Et(w,_.matches||R.matches),le=ke===!0||R.navigation.formMethod!=null&&Wt(R.navigation.formMethod)&&w.state?._isRedirect!==!0;g&&(m=g,g=void 0),Ee||V==="POP"||(V==="PUSH"?n.history.push(w,w.state):V==="REPLACE"&&n.history.replace(w,w.state));let ye;if(V==="POP"){let Ce=Me.get(R.location.pathname);Ce&&Ce.has(w.pathname)?ye={currentLocation:R.location,nextLocation:w}:Me.has(w.pathname)&&(ye={currentLocation:w,nextLocation:R.location})}else if(Se){let Ce=Me.get(R.location.pathname);Ce?Ce.add(w.pathname):(Ce=new Set([w.pathname]),Me.set(R.location.pathname,Ce)),ye={currentLocation:R.location,nextLocation:w}}Je({..._,actionData:te,loaderData:be,historyAction:V,location:w,initialized:!0,navigation:ud,revalidation:"idle",restoreScrollPosition:ie,preventScrollReset:le,blockers:se},{viewTransitionOpts:ye,flushSync:z===!0}),V="POP",ke=!1,Se=!1,Ee=!1,k=!1,re?.resolve(),re=null,Te?.resolve(),Te=null}async function sn(w,_){if(re?.resolve(),re=null,typeof w=="number"){re||(re=Pg());let Ke=re.promise;return n.history.go(w),Ke}let z=Rd(R.location,R.matches,p,w,_?.fromRouteId,_?.relative),{path:J,submission:te,error:be}=kg(!1,z,_),se=R.location,ie=Js(R.location,J,_&&_.state);ie={...ie,...n.history.encodeLocation(ie)};let le=_&&_.replace!=null?_.replace:void 0,ye="PUSH";le===!0?ye="REPLACE":le===!1||te!=null&&Wt(te.formMethod)&&te.formAction===R.location.pathname+R.location.search&&(ye="REPLACE");let Ce=_&&"preventScrollReset"in _?_.preventScrollReset===!0:void 0,xe=(_&&_.flushSync)===!0,Ze=Sa({currentLocation:se,nextLocation:ie,historyAction:ye});if(Ze){Xn(Ze,{state:"blocked",location:ie,proceed(){Xn(Ze,{state:"proceeding",proceed:void 0,reset:void 0,location:ie}),sn(w,_)},reset(){let Ke=new Map(R.blockers);Ke.set(Ze,Hs),Je({blockers:Ke})}});return}await ln(ye,ie,{submission:te,pendingError:be,preventScrollReset:Ce,replace:_&&_.replace,enableViewTransition:_&&_.viewTransition,flushSync:xe,callSiteDefaultShouldRevalidate:_&&_.unstable_defaultShouldRevalidate})}function wr(){Te||(Te=Pg()),Ga(),Je({revalidation:"loading"});let w=Te.promise;return R.navigation.state==="submitting"?w:R.navigation.state==="idle"?(ln(R.historyAction,R.location,{startUninterruptedRevalidation:!0}),w):(ln(V||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:Se===!0}),w)}async function ln(w,_,z){Re&&Re.abort(),Re=null,V=w,Ee=(z&&z.startUninterruptedRevalidation)===!0,ot(R.location,R.matches),ke=(z&&z.preventScrollReset)===!0,Se=(z&&z.enableViewTransition)===!0;let J=g||m,te=z&&z.overrideNavigation,be=z?.initialHydration&&R.matches&&R.matches.length>0&&!W?R.matches:mr(J,_,p),se=(z&&z.flushSync)===!0;if(be&&R.initialized&&!k&&QS(R.location,_)&&!(z&&z.submission&&Wt(z.submission.formMethod))){Fn(_,{matches:be},{flushSync:se});return}let ie=Tt(be,J,_.pathname);if(ie.active&&ie.matches&&(be=ie.matches),!be){let{error:bt,notFoundMatches:xt,route:Ve}=In(_.pathname);Fn(_,{matches:xt,loaderData:{},errors:{[Ve.id]:bt}},{flushSync:se});return}Re=new AbortController;let le=qi(n.history,_,Re.signal,z&&z.submission),ye=n.getContext?await n.getContext():new Eg,Ce;if(z&&z.pendingError)Ce=[pr(be).route.id,{type:"error",error:z.pendingError}];else if(z&&z.submission&&Wt(z.submission.formMethod)){let bt=await va(le,_,z.submission,be,ye,ie.active,z&&z.initialHydration===!0,{replace:z.replace,flushSync:se});if(bt.shortCircuited)return;if(bt.pendingActionResult){let[xt,Ve]=bt.pendingActionResult;if(Rn(Ve)&&Ws(Ve.error)&&Ve.error.status===404){Re=null,Fn(_,{matches:bt.matches,loaderData:{},errors:{[xt]:Ve.error}});return}}be=bt.matches||be,Ce=bt.pendingActionResult,te=cd(_,z.submission),se=!1,ie.active=!1,le=qi(n.history,le.url,le.signal)}let{shortCircuited:xe,matches:Ze,loaderData:Ke,errors:vt}=await Er(le,_,be,ye,ie.active,te,z&&z.submission,z&&z.fetcherSubmission,z&&z.replace,z&&z.initialHydration===!0,se,Ce,z&&z.callSiteDefaultShouldRevalidate);xe||(Re=null,Fn(_,{matches:Ze||be,...qg(Ce),loaderData:Ke,errors:vt}))}async function va(w,_,z,J,te,be,se,ie={}){Ga();let le=IS(_,z);if(Je({navigation:le},{flushSync:ie.flushSync===!0}),be){let xe=await vn(J,_.pathname,w.signal);if(xe.type==="aborted")return{shortCircuited:!0};if(xe.type==="error"){if(xe.partialMatches.length===0){let{matches:Ke,route:vt}=So(m);return{matches:Ke,pendingActionResult:[vt.id,{type:"error",error:xe.error}]}}let Ze=pr(xe.partialMatches).route.id;return{matches:xe.partialMatches,pendingActionResult:[Ze,{type:"error",error:xe.error}]}}else if(xe.matches)J=xe.matches;else{let{notFoundMatches:Ze,error:Ke,route:vt}=In(_.pathname);return{matches:Ze,pendingActionResult:[vt.id,{type:"error",error:Ke}]}}}let ye,Ce=ko(J,_);if(!Ce.route.action&&!Ce.route.lazy)ye={type:"error",error:Pn(405,{method:w.method,pathname:_.pathname,routeId:Ce.route.id})};else{let xe=Qi(d,f,w,J,Ce,se?[]:l,te),Ze=await ba(w,xe,te,null);if(ye=Ze[Ce.route.id],!ye){for(let Ke of J)if(Ze[Ke.route.id]){ye=Ze[Ke.route.id];break}}if(w.signal.aborted)return{shortCircuited:!0}}if(Xr(ye)){let xe;return ie&&ie.replace!=null?xe=ie.replace:xe=zg(ye.response.headers.get("Location"),new URL(w.url),p,n.history)===R.location.pathname+R.location.search,await yt(w,ye,!0,{submission:z,replace:xe}),{shortCircuited:!0}}if(Rn(ye)){let xe=pr(J,Ce.route.id);return(ie&&ie.replace)!==!0&&(V="PUSH"),{matches:J,pendingActionResult:[xe.route.id,ye,Ce.route.id]}}return{matches:J,pendingActionResult:[Ce.route.id,ye]}}async function Er(w,_,z,J,te,be,se,ie,le,ye,Ce,xe,Ze){let Ke=be||cd(_,se),vt=se||ie||Qg(Ke),bt=!Ee&&!ye;if(te){if(bt){let Ct=Zt(xe);Je({navigation:Ke,...Ct!==void 0?{actionData:Ct}:{}},{flushSync:Ce})}let Ye=await vn(z,_.pathname,w.signal);if(Ye.type==="aborted")return{shortCircuited:!0};if(Ye.type==="error"){if(Ye.partialMatches.length===0){let{matches:$n,route:Vt}=So(m);return{matches:$n,loaderData:{},errors:{[Vt.id]:Ye.error}}}let Ct=pr(Ye.partialMatches).route.id;return{matches:Ye.partialMatches,loaderData:{},errors:{[Ct]:Ye.error}}}else if(Ye.matches)z=Ye.matches;else{let{error:Ct,notFoundMatches:$n,route:Vt}=In(_.pathname);return{matches:$n,loaderData:{},errors:{[Vt.id]:Ct}}}}let xt=g||m,{dsMatches:Ve,revalidatingFetchers:Ht}=Ng(w,J,d,f,n.history,R,z,vt,_,ye?[]:l,ye===!0,k,X,ee,H,q,xt,p,n.patchRoutesOnNavigation!=null,xe,Ze);if(ve=++me,!n.dataStrategy&&!Ve.some(Ye=>Ye.shouldLoad)&&!Ve.some(Ye=>Ye.route.middleware&&Ye.route.middleware.length>0)&&Ht.length===0){let Ye=Lt();return Fn(_,{matches:z,loaderData:{},errors:xe&&Rn(xe[1])?{[xe[0]]:xe[1].error}:null,...qg(xe),...Ye?{fetchers:new Map(R.fetchers)}:{}},{flushSync:Ce}),{shortCircuited:!0}}if(bt){let Ye={};if(!te){Ye.navigation=Ke;let Ct=Zt(xe);Ct!==void 0&&(Ye.actionData=Ct)}Ht.length>0&&(Ye.fetchers=Tr(Ht)),Je(Ye,{flushSync:Ce})}Ht.forEach(Ye=>{dt(Ye.key),Ye.controller&&Q.set(Ye.key,Ye.controller)});let un=()=>Ht.forEach(Ye=>dt(Ye.key));Re&&Re.signal.addEventListener("abort",un);let{loaderResults:mt,fetcherResults:Zn}=await sa(Ve,Ht,w,J);if(w.signal.aborted)return{shortCircuited:!0};Re&&Re.signal.removeEventListener("abort",un),Ht.forEach(Ye=>Q.delete(Ye.key));let bn=wo(mt);if(bn)return await yt(w,bn.result,!0,{replace:le}),{shortCircuited:!0};if(bn=wo(Zn),bn)return q.add(bn.key),await yt(w,bn.result,!0,{replace:le}),{shortCircuited:!0};let{loaderData:Jn,errors:Mn}=Ug(R,z,mt,xe,Ht,Zn);ye&&R.errors&&(Mn={...R.errors,...Mn});let Ea=Lt(),Rr=ti(ve),_r=Ea||Rr||Ht.length>0;return{matches:z,loaderData:Jn,errors:Mn,..._r?{fetchers:new Map(R.fetchers)}:{}}}function Zt(w){if(w&&!Rn(w[1]))return{[w[0]]:w[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function Tr(w){return w.forEach(_=>{let z=R.fetchers.get(_.key),J=Qs(void 0,z?z.data:void 0);R.fetchers.set(_.key,J)}),new Map(R.fetchers)}async function Cr(w,_,z,J){dt(w);let te=(J&&J.flushSync)===!0,be=g||m,se=Rd(R.location,R.matches,p,z,_,J?.relative),ie=mr(be,se,p),le=Tt(ie,be,se);if(le.active&&le.matches&&(ie=le.matches),!ie){tn(w,_,Pn(404,{pathname:se}),{flushSync:te});return}let{path:ye,submission:Ce,error:xe}=kg(!0,se,J);if(xe){tn(w,_,xe,{flushSync:te});return}let Ze=n.getContext?await n.getContext():new Eg,Ke=(J&&J.preventScrollReset)===!0;if(Ce&&Wt(Ce.formMethod)){await Gt(w,_,ye,ie,Ze,le.active,te,Ke,Ce,J&&J.unstable_defaultShouldRevalidate);return}H.set(w,{routeId:_,path:ye}),await ia(w,_,ye,ie,Ze,le.active,te,Ke,Ce)}async function Gt(w,_,z,J,te,be,se,ie,le,ye){Ga(),H.delete(w);let Ce=R.fetchers.get(w);Kt(w,ZS(le,Ce),{flushSync:se});let xe=new AbortController,Ze=qi(n.history,z,xe.signal,le);if(be){let Fe=await vn(J,new URL(Ze.url).pathname,Ze.signal,w);if(Fe.type==="aborted")return;if(Fe.type==="error"){tn(w,_,Fe.error,{flushSync:se});return}else if(Fe.matches)J=Fe.matches;else{tn(w,_,Pn(404,{pathname:z}),{flushSync:se});return}}let Ke=ko(J,z);if(!Ke.route.action&&!Ke.route.lazy){let Fe=Pn(405,{method:le.formMethod,pathname:z,routeId:_});tn(w,_,Fe,{flushSync:se});return}Q.set(w,xe);let vt=me,bt=Qi(d,f,Ze,J,Ke,l,te),xt=await ba(Ze,bt,te,w),Ve=xt[Ke.route.id];if(!Ve){for(let Fe of bt)if(xt[Fe.route.id]){Ve=xt[Fe.route.id];break}}if(Ze.signal.aborted){Q.get(w)===xe&&Q.delete(w);return}if(ee.has(w)){if(Xr(Ve)||Rn(Ve)){Kt(w,Pa(void 0));return}}else{if(Xr(Ve))if(Q.delete(w),ve>vt){Kt(w,Pa(void 0));return}else return q.add(w),Kt(w,Qs(le)),yt(Ze,Ve,!1,{fetcherSubmission:le,preventScrollReset:ie});if(Rn(Ve)){tn(w,_,Ve.error);return}}let Ht=R.navigation.location||R.location,un=qi(n.history,Ht,xe.signal),mt=g||m,Zn=R.navigation.state!=="idle"?mr(mt,R.navigation.location,p):R.matches;qe(Zn,"Didn't find any matches after fetcher action");let bn=++me;C.set(w,bn);let Jn=Qs(le,Ve.data);R.fetchers.set(w,Jn);let{dsMatches:Mn,revalidatingFetchers:Ea}=Ng(un,te,d,f,n.history,R,Zn,le,Ht,l,!1,k,X,ee,H,q,mt,p,n.patchRoutesOnNavigation!=null,[Ke.route.id,Ve],ye);Ea.filter(Fe=>Fe.key!==w).forEach(Fe=>{let kr=Fe.key,ll=R.fetchers.get(kr),Zi=Qs(void 0,ll?ll.data:void 0);R.fetchers.set(kr,Zi),dt(kr),Fe.controller&&Q.set(kr,Fe.controller)}),Je({fetchers:new Map(R.fetchers)});let Rr=()=>Ea.forEach(Fe=>dt(Fe.key));xe.signal.addEventListener("abort",Rr);let{loaderResults:_r,fetcherResults:Ye}=await sa(Mn,Ea,un,te);if(xe.signal.aborted)return;if(xe.signal.removeEventListener("abort",Rr),C.delete(w),Q.delete(w),Ea.forEach(Fe=>Q.delete(Fe.key)),R.fetchers.has(w)){let Fe=Pa(Ve.data);R.fetchers.set(w,Fe)}let Ct=wo(_r);if(Ct)return yt(un,Ct.result,!1,{preventScrollReset:ie});if(Ct=wo(Ye),Ct)return q.add(Ct.key),yt(un,Ct.result,!1,{preventScrollReset:ie});let{loaderData:$n,errors:Vt}=Ug(R,Zn,_r,void 0,Ea,Ye);ti(bn),R.navigation.state==="loading"&&bn>ve?(qe(V,"Expected pending action"),Re&&Re.abort(),Fn(R.navigation.location,{matches:Zn,loaderData:$n,errors:Vt,fetchers:new Map(R.fetchers)})):(Je({errors:Vt,loaderData:Bg(R.loaderData,$n,Zn,Vt),fetchers:new Map(R.fetchers)}),k=!1)}async function ia(w,_,z,J,te,be,se,ie,le){let ye=R.fetchers.get(w);Kt(w,Qs(le,ye?ye.data:void 0),{flushSync:se});let Ce=new AbortController,xe=qi(n.history,z,Ce.signal);if(be){let Ve=await vn(J,new URL(xe.url).pathname,xe.signal,w);if(Ve.type==="aborted")return;if(Ve.type==="error"){tn(w,_,Ve.error,{flushSync:se});return}else if(Ve.matches)J=Ve.matches;else{tn(w,_,Pn(404,{pathname:z}),{flushSync:se});return}}let Ze=ko(J,z);Q.set(w,Ce);let Ke=me,vt=Qi(d,f,xe,J,Ze,l,te),xt=(await ba(xe,vt,te,w))[Ze.route.id];if(Q.get(w)===Ce&&Q.delete(w),!xe.signal.aborted){if(ee.has(w)){Kt(w,Pa(void 0));return}if(Xr(xt))if(ve>Ke){Kt(w,Pa(void 0));return}else{q.add(w),await yt(xe,xt,!1,{preventScrollReset:ie});return}if(Rn(xt)){tn(w,_,xt.error);return}Kt(w,Pa(xt.data))}}async function yt(w,_,z,{submission:J,fetcherSubmission:te,preventScrollReset:be,replace:se}={}){z||(re?.resolve(),re=null),_.response.headers.has("X-Remix-Revalidate")&&(k=!0);let ie=_.response.headers.get("Location");qe(ie,"Expected a Location header on the redirect Response"),ie=zg(ie,new URL(w.url),p,n.history);let le=Js(R.location,ie,{_isRedirect:!0});if(i){let vt=!1;if(_.response.headers.has("X-Remix-Reload-Document"))vt=!0;else if(Xd(ie)){const bt=zy(ie,!0);vt=bt.origin!==a.location.origin||Vn(bt.pathname,p)==null}if(vt){se?a.location.replace(ie):a.location.assign(ie);return}}Re=null;let ye=se===!0||_.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ce,formAction:xe,formEncType:Ze}=R.navigation;!J&&!te&&Ce&&xe&&Ze&&(J=Qg(R.navigation));let Ke=J||te;if(CS.has(_.response.status)&&Ke&&Wt(Ke.formMethod))await ln(ye,le,{submission:{...Ke,formAction:ie},preventScrollReset:be||ke,enableViewTransition:z?Se:void 0});else{let vt=cd(le,J);await ln(ye,le,{overrideNavigation:vt,fetcherSubmission:te,preventScrollReset:be||ke,enableViewTransition:z?Se:void 0})}}async function ba(w,_,z,J){let te,be={};try{te=await zS(x,w,_,J,z,!1)}catch(se){return _.filter(ie=>ie.shouldLoad).forEach(ie=>{be[ie.route.id]={type:"error",error:se}}),be}if(w.signal.aborted)return be;if(!Wt(w.method))for(let se of _){if(te[se.route.id]?.type==="error")break;!te.hasOwnProperty(se.route.id)&&!R.loaderData.hasOwnProperty(se.route.id)&&(!R.errors||!R.errors.hasOwnProperty(se.route.id))&&se.shouldCallHandler()&&(te[se.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${se.route.id}`)})}for(let[se,ie]of Object.entries(te))if(VS(ie)){let le=ie.result;be[se]={type:"redirect",response:qS(le,w,se,_,p)}}else be[se]=await BS(ie);return be}async function sa(w,_,z,J){let te=ba(z,w,J,null),be=Promise.all(_.map(async le=>{if(le.matches&&le.match&&le.request&&le.controller){let Ce=(await ba(le.request,le.matches,J,le.key))[le.match.route.id];return{[le.key]:Ce}}else return Promise.resolve({[le.key]:{type:"error",error:Pn(404,{pathname:le.path})}})})),se=await te,ie=(await be).reduce((le,ye)=>Object.assign(le,ye),{});return{loaderResults:se,fetcherResults:ie}}function Ga(){k=!0,H.forEach((w,_)=>{Q.has(_)&&X.add(_),dt(_)})}function Kt(w,_,z={}){R.fetchers.set(w,_),Je({fetchers:new Map(R.fetchers)},{flushSync:(z&&z.flushSync)===!0})}function tn(w,_,z,J={}){let te=pr(R.matches,_);Nn(w),Je({errors:{[te.route.id]:z},fetchers:new Map(R.fetchers)},{flushSync:(J&&J.flushSync)===!0})}function kn(w){return Z.set(w,(Z.get(w)||0)+1),ee.has(w)&&ee.delete(w),R.fetchers.get(w)||AS}function ei(w,_){dt(w,_?.reason),Kt(w,Pa(null))}function Nn(w){let _=R.fetchers.get(w);Q.has(w)&&!(_&&_.state==="loading"&&C.has(w))&&dt(w),H.delete(w),C.delete(w),q.delete(w),ee.delete(w),X.delete(w),R.fetchers.delete(w)}function xa(w){let _=(Z.get(w)||0)-1;_<=0?(Z.delete(w),ee.add(w)):Z.set(w,_),Je({fetchers:new Map(R.fetchers)})}function dt(w,_){let z=Q.get(w);z&&(z.abort(_),Q.delete(w))}function on(w){for(let _ of w){let z=kn(_),J=Pa(z.data);R.fetchers.set(_,J)}}function Lt(){let w=[],_=!1;for(let z of q){let J=R.fetchers.get(z);qe(J,`Expected fetcher: ${z}`),J.state==="loading"&&(q.delete(z),w.push(z),_=!0)}return on(w),_}function ti(w){let _=[];for(let[z,J]of C)if(J<w){let te=R.fetchers.get(z);qe(te,`Expected fetcher: ${z}`),te.state==="loading"&&(dt(z),C.delete(z),_.push(z))}return on(_),_.length>0}function Ar(w,_){let z=R.blockers.get(w)||Hs;return $.get(w)!==_&&$.set(w,_),z}function yn(w){R.blockers.delete(w),$.delete(w)}function Xn(w,_){let z=R.blockers.get(w)||Hs;qe(z.state==="unblocked"&&_.state==="blocked"||z.state==="blocked"&&_.state==="blocked"||z.state==="blocked"&&_.state==="proceeding"||z.state==="blocked"&&_.state==="unblocked"||z.state==="proceeding"&&_.state==="unblocked",`Invalid blocker state transition: ${z.state} -> ${_.state}`);let J=new Map(R.blockers);J.set(w,_),Je({blockers:J})}function Sa({currentLocation:w,nextLocation:_,historyAction:z}){if($.size===0)return;$.size>1&&zt(!1,"A router only supports one blocker at a time");let J=Array.from($.entries()),[te,be]=J[J.length-1],se=R.blockers.get(te);if(!(se&&se.state==="proceeding")&&be({currentLocation:w,nextLocation:_,historyAction:z}))return te}function In(w){let _=Pn(404,{pathname:w}),z=g||m,{matches:J,route:te}=So(z);return{notFoundMatches:J,route:te,error:_}}function On(w,_,z){if(L=w,P=_,B=z||null,!K&&R.navigation===ud){K=!0;let J=Et(R.location,R.matches);J!=null&&Je({restoreScrollPosition:J})}return()=>{L=null,P=null,B=null}}function _e(w,_){return B&&B(w,_.map(J=>$x(J,R.loaderData)))||w.key}function ot(w,_){if(L&&P){let z=_e(w,_);L[z]=P()}}function Et(w,_){if(L){let z=_e(w,_),J=L[z];if(typeof J=="number")return J}return null}function Tt(w,_,z){if(n.patchRoutesOnNavigation)if(w){if(Object.keys(w[0].params).length>0)return{active:!0,matches:Ys(_,z,p,!0)}}else return{active:!0,matches:Ys(_,z,p,!0)||[]};return{active:!1,matches:null}}async function vn(w,_,z,J){if(!n.patchRoutesOnNavigation)return{type:"success",matches:w};let te=w;for(;;){let be=g==null,se=g||m,ie=f;try{await n.patchRoutesOnNavigation({signal:z,path:_,matches:te,fetcherKey:J,patch:(Ce,xe)=>{z.aborted||Og(Ce,xe,se,ie,d,!1)}})}catch(Ce){return{type:"error",error:Ce,partialMatches:te}}finally{be&&!z.aborted&&(m=[...m])}if(z.aborted)return{type:"aborted"};let le=mr(se,_,p),ye=null;if(le){if(Object.keys(le[0].params).length===0)return{type:"success",matches:le};if(ye=Ys(se,_,p,!0),!(ye&&te.length<ye.length&&ut(te,ye.slice(0,te.length))))return{type:"success",matches:le}}if(ye||(ye=Ys(se,_,p,!0)),!ye||ut(te,ye))return{type:"success",matches:null};te=ye}}function ut(w,_){return w.length===_.length&&w.every((z,J)=>z.route.id===_[J].route.id)}function Jt(w){f={},g=$s(w,d,void 0,f)}function wa(w,_,z=!1){let J=g==null;Og(w,_,g||m,f,d,z),J&&(m=[...m],Je({}))}return de={get basename(){return p},get future(){return y},get state(){return R},get routes(){return m},get window(){return a},initialize:Be,subscribe:en,enableScrollRestoration:On,navigate:sn,fetch:Cr,revalidate:wr,createHref:w=>n.history.createHref(w),encodeLocation:w=>n.history.encodeLocation(w),getFetcher:kn,resetFetcher:ei,deleteFetcher:xa,dispose:Pt,getBlocker:Ar,deleteBlocker:yn,patchRoutes:wa,_internalFetchControllers:Q,_internalSetRoutes:Jt,_internalSetStateDoNotUseOrYouWillBreakYourApp(w){Je(w)}},n.unstable_instrumentations&&(de=yS(de,n.unstable_instrumentations.map(w=>w.router).filter(Boolean))),de}function kS(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function Rd(n,a,i,l,c,d){let f,m;if(c){f=[];for(let p of a)if(f.push(p),p.route.id===c){m=p;break}}else f=a,m=a[a.length-1];let g=Zd(l||".",Id(f),Vn(n.pathname,i)||n.pathname,d==="path");if(l==null&&(g.search=n.search,g.hash=n.hash),(l==null||l===""||l===".")&&m){let p=Wd(g.search);if(m.route.index&&!p)g.search=g.search?g.search.replace(/^\?/,"?index&"):"?index";else if(!m.route.index&&p){let x=new URLSearchParams(g.search),y=x.getAll("index");x.delete("index"),y.filter(N=>N).forEach(N=>x.append("index",N));let T=x.toString();g.search=T?`?${T}`:""}}return i!=="/"&&(g.pathname=dS({basename:i,pathname:g.pathname})),pa(g)}function kg(n,a,i){if(!i||!kS(i))return{path:a};if(i.formMethod&&!XS(i.formMethod))return{path:a,error:Pn(405,{method:i.formMethod})};let l=()=>({path:a,error:Pn(400,{type:"invalid-body"})}),d=(i.formMethod||"get").toUpperCase(),f=$y(a);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!Wt(d))return l();let y=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((T,[N,L])=>`${T}${N}=${L}
|
|
11
11
|
`,""):String(i.body);return{path:a,submission:{formMethod:d,formAction:f,formEncType:i.formEncType,formData:void 0,json:void 0,text:y}}}else if(i.formEncType==="application/json"){if(!Wt(d))return l();try{let y=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:a,submission:{formMethod:d,formAction:f,formEncType:i.formEncType,formData:void 0,json:y,text:void 0}}}catch{return l()}}}qe(typeof FormData=="function","FormData is not available in this environment");let m,g;if(i.formData)m=Nd(i.formData),g=i.formData;else if(i.body instanceof FormData)m=Nd(i.body),g=i.body;else if(i.body instanceof URLSearchParams)m=i.body,g=Lg(m);else if(i.body==null)m=new URLSearchParams,g=new FormData;else try{m=new URLSearchParams(i.body),g=Lg(m)}catch{return l()}let p={formMethod:d,formAction:f,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(Wt(p.formMethod))return{path:a,submission:p};let x=xr(a);return n&&x.search&&Wd(x.search)&&m.append("index",""),x.search=`?${m}`,{path:pa(x),submission:p}}function Ng(n,a,i,l,c,d,f,m,g,p,x,y,T,N,L,B,P,K,Y,W,he){let fe=W?Rn(W[1])?W[1].error:W[1].data:void 0,de=c.createURL(d.location),R=c.createURL(g),V;if(x&&d.errors){let Ee=Object.keys(d.errors)[0];V=f.findIndex(k=>k.route.id===Ee)}else if(W&&Rn(W[1])){let Ee=W[0];V=f.findIndex(k=>k.route.id===Ee)-1}let re=W?W[1].statusCode:void 0,ke=re&&re>=400,Re={currentUrl:de,currentParams:d.matches[0]?.params||{},nextUrl:R,nextParams:f[0].params,...m,actionResult:fe,actionStatus:re},Se=nl(f),Me=f.map((Ee,k)=>{let{route:X}=Ee,Q=null;if(V!=null&&k>V?Q=!1:X.lazy?Q=!0:Jd(X)?x?Q=_d(X,d.loaderData,d.errors):NS(d.loaderData,d.matches[k],Ee)&&(Q=!0):Q=!1,Q!==null)return kd(i,l,n,Se,Ee,p,a,Q);let me=!1;typeof he=="boolean"?me=he:ke?me=!1:(y||de.pathname+de.search===R.pathname+R.search||de.search!==R.search||OS(d.matches[k],Ee))&&(me=!0);let ve={...Re,defaultShouldRevalidate:me},C=Is(Ee,ve);return kd(i,l,n,Se,Ee,p,a,C,ve,he)}),Le=[];return L.forEach((Ee,k)=>{if(x||!f.some(Z=>Z.route.id===Ee.routeId)||N.has(k))return;let X=d.fetchers.get(k),Q=X&&X.state!=="idle"&&X.data===void 0,me=mr(P,Ee.path,K);if(!me){if(Y&&Q)return;Le.push({key:k,routeId:Ee.routeId,path:Ee.path,matches:null,match:null,request:null,controller:null});return}if(B.has(k))return;let ve=ko(me,Ee.path),C=new AbortController,q=qi(c,Ee.path,C.signal),H=null;if(T.has(k))T.delete(k),H=Qi(i,l,q,me,ve,p,a);else if(Q)y&&(H=Qi(i,l,q,me,ve,p,a));else{let Z;typeof he=="boolean"?Z=he:ke?Z=!1:Z=y;let ee={...Re,defaultShouldRevalidate:Z};Is(ve,ee)&&(H=Qi(i,l,q,me,ve,p,a,ee))}H&&Le.push({key:k,routeId:Ee.routeId,path:Ee.path,matches:H,match:ve,request:q,controller:C})}),{dsMatches:Me,revalidatingFetchers:Le}}function Jd(n){return n.loader!=null||n.middleware!=null&&n.middleware.length>0}function _d(n,a,i){if(n.lazy)return!0;if(!Jd(n))return!1;let l=a!=null&&n.id in a,c=i!=null&&i[n.id]!==void 0;return!l&&c?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!l&&!c}function NS(n,a,i){let l=!a||i.route.id!==a.route.id,c=!n.hasOwnProperty(i.route.id);return l||c}function OS(n,a){let i=n.route.path;return n.pathname!==a.pathname||i!=null&&i.endsWith("*")&&n.params["*"]!==a.params["*"]}function Is(n,a){if(n.route.shouldRevalidate){let i=n.route.shouldRevalidate(a);if(typeof i=="boolean")return i}return a.defaultShouldRevalidate}function Og(n,a,i,l,c,d){let f;if(n){let p=l[n];qe(p,`No route found to patch children into: routeId = ${n}`),p.children||(p.children=[]),f=p.children}else f=i;let m=[],g=[];if(a.forEach(p=>{let x=f.find(y=>Fy(p,y));x?g.push({existingRoute:x,newRoute:p}):m.push(p)}),m.length>0){let p=$s(m,c,[n||"_","patch",String(f?.length||"0")],l);f.push(...p)}if(d&&g.length>0)for(let p=0;p<g.length;p++){let{existingRoute:x,newRoute:y}=g[p],T=x,[N]=$s([y],c,[],{},!0);Object.assign(T,{element:N.element?N.element:T.element,errorElement:N.errorElement?N.errorElement:T.errorElement,hydrateFallbackElement:N.hydrateFallbackElement?N.hydrateFallbackElement:T.hydrateFallbackElement})}}function Fy(n,a){return"id"in n&&"id"in a&&n.id===a.id?!0:n.index===a.index&&n.path===a.path&&n.caseSensitive===a.caseSensitive?(!n.children||n.children.length===0)&&(!a.children||a.children.length===0)?!0:n.children.every((i,l)=>a.children?.some(c=>Fy(i,c))):!1}var Mg=new WeakMap,Xy=({key:n,route:a,manifest:i,mapRouteProperties:l})=>{let c=i[a.id];if(qe(c,"No route found in manifest"),!c.lazy||typeof c.lazy!="object")return;let d=c.lazy[n];if(!d)return;let f=Mg.get(c);f||(f={},Mg.set(c,f));let m=f[n];if(m)return m;let g=(async()=>{let p=Xx(n),y=c[n]!==void 0&&n!=="hasErrorBoundary";if(p)zt(!p,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),f[n]=Promise.resolve();else if(y)zt(!1,`Route "${c.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let T=await d();T!=null&&(Object.assign(c,{[n]:T}),Object.assign(c,l(c)))}typeof c.lazy=="object"&&(c.lazy[n]=void 0,Object.values(c.lazy).every(T=>T===void 0)&&(c.lazy=void 0))})();return f[n]=g,g},jg=new WeakMap;function MS(n,a,i,l,c){let d=i[n.id];if(qe(d,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let x=jg.get(d);if(x)return{lazyRoutePromise:x,lazyHandlerPromise:x};let y=(async()=>{qe(typeof n.lazy=="function","No lazy route function found");let T=await n.lazy(),N={};for(let L in T){let B=T[L];if(B===void 0)continue;let P=Zx(L),Y=d[L]!==void 0&&L!=="hasErrorBoundary";P?zt(!P,"Route property "+L+" is not a supported property to be returned from a lazy route function. This property will be ignored."):Y?zt(!Y,`Route "${d.id}" has a static property "${L}" defined but its lazy function is also returning a value for this property. The lazy route property "${L}" will be ignored.`):N[L]=B}Object.assign(d,N),Object.assign(d,{...l(d),lazy:void 0})})();return jg.set(d,y),y.catch(()=>{}),{lazyRoutePromise:y,lazyHandlerPromise:y}}let f=Object.keys(n.lazy),m=[],g;for(let x of f){if(c&&c.includes(x))continue;let y=Xy({key:x,route:n,manifest:i,mapRouteProperties:l});y&&(m.push(y),x===a&&(g=y))}let p=m.length>0?Promise.all(m).then(()=>{}):void 0;return p?.catch(()=>{}),g?.catch(()=>{}),{lazyRoutePromise:p,lazyHandlerPromise:g}}async function Dg(n){let a=n.matches.filter(c=>c.shouldLoad),i={};return(await Promise.all(a.map(c=>c.resolve()))).forEach((c,d)=>{i[a[d].route.id]=c}),i}async function jS(n){return n.matches.some(a=>a.route.middleware)?Iy(n,()=>Dg(n)):Dg(n)}function Iy(n,a){return DS(n,a,l=>{if(FS(l))throw l;return l},GS,i);function i(l,c,d){if(d)return Promise.resolve(Object.assign(d.value,{[c]:{type:"error",result:l}}));{let{matches:f}=n,m=Math.min(Math.max(f.findIndex(p=>p.route.id===c),0),Math.max(f.findIndex(p=>p.shouldCallHandler()),0)),g=pr(f,f[m].route.id).route.id;return Promise.resolve({[g]:{type:"error",result:l}})}}}async function DS(n,a,i,l,c){let{matches:d,request:f,params:m,context:g,unstable_pattern:p}=n,x=d.flatMap(T=>T.route.middleware?T.route.middleware.map(N=>[T.route.id,N]):[]);return await Zy({request:f,params:m,context:g,unstable_pattern:p},x,a,i,l,c)}async function Zy(n,a,i,l,c,d,f=0){let{request:m}=n;if(m.signal.aborted)throw m.signal.reason??new Error(`Request aborted: ${m.method} ${m.url}`);let g=a[f];if(!g)return await i();let[p,x]=g,y,T=async()=>{if(y)throw new Error("You may only call `next()` once per middleware");try{return y={value:await Zy(n,a,i,l,c,d,f+1)},y.value}catch(N){return y={value:await d(N,p,y)},y.value}};try{let N=await x(n,T),L=N!=null?l(N):void 0;return c(L)?L:y?L??y.value:(y={value:await T()},y.value)}catch(N){return await d(N,p,y)}}function Jy(n,a,i,l,c){let d=Xy({key:"middleware",route:l.route,manifest:a,mapRouteProperties:n}),f=MS(l.route,Wt(i.method)?"action":"loader",a,n,c);return{middleware:d,route:f.lazyRoutePromise,handler:f.lazyHandlerPromise}}function kd(n,a,i,l,c,d,f,m,g=null,p){let x=!1,y=Jy(n,a,i,c,d);return{...c,_lazyPromises:y,shouldLoad:m,shouldRevalidateArgs:g,shouldCallHandler(T){return x=!0,g?typeof p=="boolean"?Is(c,{...g,defaultShouldRevalidate:p}):typeof T=="boolean"?Is(c,{...g,defaultShouldRevalidate:T}):Is(c,g):m},resolve(T){let{lazy:N,loader:L,middleware:B}=c.route,P=x||m||T&&!Wt(i.method)&&(N||L),K=B&&B.length>0&&!L&&!N;return P&&(Wt(i.method)||!K)?LS({request:i,unstable_pattern:l,match:c,lazyHandlerPromise:y?.handler,lazyRoutePromise:y?.route,handlerOverride:T,scopedContext:f}):Promise.resolve({type:"data",result:void 0})}}}function Qi(n,a,i,l,c,d,f,m=null){return l.map(g=>g.route.id!==c.route.id?{...g,shouldLoad:!1,shouldRevalidateArgs:m,shouldCallHandler:()=>!1,_lazyPromises:Jy(n,a,i,g,d),resolve:()=>Promise.resolve({type:"data",result:void 0})}:kd(n,a,i,nl(l),g,d,f,!0,m))}async function zS(n,a,i,l,c,d){i.some(p=>p._lazyPromises?.middleware)&&await Promise.all(i.map(p=>p._lazyPromises?.middleware));let f={request:a,unstable_pattern:nl(i),params:i[0].params,context:c,matches:i},g=await n({...f,fetcherKey:l,runClientMiddleware:p=>{let x=f;return Iy(x,()=>p({...x,fetcherKey:l,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(i.flatMap(p=>[p._lazyPromises?.handler,p._lazyPromises?.route]))}catch{}return g}async function LS({request:n,unstable_pattern:a,match:i,lazyHandlerPromise:l,lazyRoutePromise:c,handlerOverride:d,scopedContext:f}){let m,g,p=Wt(n.method),x=p?"action":"loader",y=T=>{let N,L=new Promise((K,Y)=>N=Y);g=()=>N(),n.signal.addEventListener("abort",g);let B=K=>typeof T!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${x}" [routeId: ${i.route.id}]`)):T({request:n,unstable_pattern:a,params:i.params,context:f},...K!==void 0?[K]:[]),P=(async()=>{try{return{type:"data",result:await(d?d(Y=>B(Y)):B())}}catch(K){return{type:"error",result:K}}})();return Promise.race([P,L])};try{let T=p?i.route.action:i.route.loader;if(l||c)if(T){let N,[L]=await Promise.all([y(T).catch(B=>{N=B}),l,c]);if(N!==void 0)throw N;m=L}else{await l;let N=p?i.route.action:i.route.loader;if(N)[m]=await Promise.all([y(N),c]);else if(x==="action"){let L=new URL(n.url),B=L.pathname+L.search;throw Pn(405,{method:n.method,pathname:B,routeId:i.route.id})}else return{type:"data",result:void 0}}else if(T)m=await y(T);else{let N=new URL(n.url),L=N.pathname+N.search;throw Pn(404,{pathname:L})}}catch(T){return{type:"error",result:T}}finally{g&&n.signal.removeEventListener("abort",g)}return m}async function US(n){let a=n.headers.get("Content-Type");return a&&/\bapplication\/json\b/.test(a)?n.body==null?null:n.json():n.text()}async function BS(n){let{result:a,type:i}=n;if($d(a)){let l;try{l=await US(a)}catch(c){return{type:"error",error:c}}return i==="error"?{type:"error",error:new tl(a.status,a.statusText,l),statusCode:a.status,headers:a.headers}:{type:"data",data:l,statusCode:a.status,headers:a.headers}}return i==="error"?Hg(a)?a.data instanceof Error?{type:"error",error:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:PS(a),statusCode:Ws(a)?a.status:void 0,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"error",error:a,statusCode:Ws(a)?a.status:void 0}:Hg(a)?{type:"data",data:a.data,statusCode:a.init?.status,headers:a.init?.headers?new Headers(a.init.headers):void 0}:{type:"data",data:a}}function qS(n,a,i,l,c){let d=n.headers.get("Location");if(qe(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!Xd(d)){let f=l.slice(0,l.findIndex(m=>m.route.id===i)+1);d=Rd(new URL(a.url),f,c,d),n.headers.set("Location",d)}return n}function zg(n,a,i,l){let c=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Xd(n)){let d=n,f=d.startsWith("//")?new URL(a.protocol+d):new URL(d);if(c.includes(f.protocol))throw new Error("Invalid redirect location");let m=Vn(f.pathname,i)!=null;if(f.origin===a.origin&&m)return f.pathname+f.search+f.hash}try{let d=l.createURL(n);if(c.includes(d.protocol))throw new Error("Invalid redirect location")}catch{}return n}function qi(n,a,i,l){let c=n.createURL($y(a)).toString(),d={signal:i};if(l&&Wt(l.formMethod)){let{formMethod:f,formEncType:m}=l;d.method=f.toUpperCase(),m==="application/json"?(d.headers=new Headers({"Content-Type":m}),d.body=JSON.stringify(l.json)):m==="text/plain"?d.body=l.text:m==="application/x-www-form-urlencoded"&&l.formData?d.body=Nd(l.formData):d.body=l.formData}return new Request(c,d)}function Nd(n){let a=new URLSearchParams;for(let[i,l]of n.entries())a.append(i,typeof l=="string"?l:l.name);return a}function Lg(n){let a=new FormData;for(let[i,l]of n.entries())a.append(i,l);return a}function HS(n,a,i,l=!1,c=!1){let d={},f=null,m,g=!1,p={},x=i&&Rn(i[1])?i[1].error:void 0;return n.forEach(y=>{if(!(y.route.id in a))return;let T=y.route.id,N=a[T];if(qe(!Xr(N),"Cannot handle redirect results in processLoaderData"),Rn(N)){let L=N.error;if(x!==void 0&&(L=x,x=void 0),f=f||{},c)f[T]=L;else{let B=pr(n,T);f[B.route.id]==null&&(f[B.route.id]=L)}l||(d[T]=Yy),g||(g=!0,m=Ws(N.error)?N.error.status:500),N.headers&&(p[T]=N.headers)}else d[T]=N.data,N.statusCode&&N.statusCode!==200&&!g&&(m=N.statusCode),N.headers&&(p[T]=N.headers)}),x!==void 0&&i&&(f={[i[0]]:x},i[2]&&(d[i[2]]=void 0)),{loaderData:d,errors:f,statusCode:m||200,loaderHeaders:p}}function Ug(n,a,i,l,c,d){let{loaderData:f,errors:m}=HS(a,i,l);return c.filter(g=>!g.matches||g.matches.some(p=>p.shouldLoad)).forEach(g=>{let{key:p,match:x,controller:y}=g;if(y&&y.signal.aborted)return;let T=d[p];if(qe(T,"Did not find corresponding fetcher result"),Rn(T)){let N=pr(n.matches,x?.route.id);m&&m[N.route.id]||(m={...m,[N.route.id]:T.error}),n.fetchers.delete(p)}else if(Xr(T))qe(!1,"Unhandled fetcher revalidation redirect");else{let N=Pa(T.data);n.fetchers.set(p,N)}}),{loaderData:f,errors:m}}function Bg(n,a,i,l){let c=Object.entries(a).filter(([,d])=>d!==Yy).reduce((d,[f,m])=>(d[f]=m,d),{});for(let d of i){let f=d.route.id;if(!a.hasOwnProperty(f)&&n.hasOwnProperty(f)&&d.route.loader&&(c[f]=n[f]),l&&l.hasOwnProperty(f))break}return c}function qg(n){return n?Rn(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function pr(n,a){return(a?n.slice(0,n.findIndex(l=>l.route.id===a)+1):[...n]).reverse().find(l=>l.route.hasErrorBoundary===!0)||n[0]}function So(n){let a=n.length===1?n[0]:n.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:a}],route:a}}function Pn(n,{pathname:a,routeId:i,method:l,type:c,message:d}={}){let f="Unknown Server Error",m="Unknown @remix-run/router error";return n===400?(f="Bad Request",l&&a&&i?m=`You made a ${l} request to "${a}" but did not provide a \`loader\` for route "${i}", so there is no way to handle the request.`:c==="invalid-body"&&(m="Unable to encode submission body")):n===403?(f="Forbidden",m=`Route "${i}" does not match URL "${a}"`):n===404?(f="Not Found",m=`No route matches URL "${a}"`):n===405&&(f="Method Not Allowed",l&&a&&i?m=`You made a ${l.toUpperCase()} request to "${a}" but did not provide an \`action\` for route "${i}", so there is no way to handle the request.`:l&&(m=`Invalid request method "${l.toUpperCase()}"`)),new tl(n||500,f,new Error(m),!0)}function wo(n){let a=Object.entries(n);for(let i=a.length-1;i>=0;i--){let[l,c]=a[i];if(Xr(c))return{key:l,result:c}}}function $y(n){let a=typeof n=="string"?xr(n):n;return pa({...a,hash:""})}function QS(n,a){return n.pathname!==a.pathname||n.search!==a.search?!1:n.hash===""?a.hash!=="":n.hash===a.hash?!0:a.hash!==""}function PS(n){return new tl(n.init?.status??500,n.init?.statusText??"Internal Server Error",n.data)}function GS(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([a,i])=>typeof a=="string"&&KS(i))}function KS(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function VS(n){return $d(n.result)&&Ky.has(n.result.status)}function Rn(n){return n.type==="error"}function Xr(n){return(n&&n.type)==="redirect"}function Hg(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function $d(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function YS(n){return Ky.has(n)}function FS(n){return $d(n)&&YS(n.status)&&n.headers.has("Location")}function XS(n){return TS.has(n.toUpperCase())}function Wt(n){return wS.has(n.toUpperCase())}function Wd(n){return new URLSearchParams(n).getAll("index").some(a=>a==="")}function ko(n,a){let i=typeof a=="string"?xr(a).search:a.search;if(n[n.length-1].route.index&&Wd(i||""))return n[n.length-1];let l=qy(n);return l[l.length-1]}function Qg(n){let{formMethod:a,formAction:i,formEncType:l,text:c,formData:d,json:f}=n;if(!(!a||!i||!l)){if(c!=null)return{formMethod:a,formAction:i,formEncType:l,formData:void 0,json:void 0,text:c};if(d!=null)return{formMethod:a,formAction:i,formEncType:l,formData:d,json:void 0,text:void 0};if(f!==void 0)return{formMethod:a,formAction:i,formEncType:l,formData:void 0,json:f,text:void 0}}}function cd(n,a){return a?{state:"loading",location:n,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function IS(n,a){return{state:"submitting",location:n,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function Qs(n,a){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:a}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:a}}function ZS(n,a){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:a?a.data:void 0}}function Pa(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function JS(n,a){try{let i=n.sessionStorage.getItem(Vy);if(i){let l=JSON.parse(i);for(let[c,d]of Object.entries(l||{}))d&&Array.isArray(d)&&a.set(c,new Set(d||[]))}}catch{}}function $S(n,a){if(a.size>0){let i={};for(let[l,c]of a)i[l]=[...c];try{n.sessionStorage.setItem(Vy,JSON.stringify(i))}catch(l){zt(!1,`Failed to save applied view transitions in sessionStorage (${l}).`)}}}function Pg(){let n,a,i=new Promise((l,c)=>{n=async d=>{l(d);try{await i}catch{}},a=async d=>{c(d);try{await i}catch{}}});return{promise:i,resolve:n,reject:a}}var Wr=S.createContext(null);Wr.displayName="DataRouter";var al=S.createContext(null);al.displayName="DataRouterState";var Wy=S.createContext(!1);function WS(){return S.useContext(Wy)}var ef=S.createContext({isTransitioning:!1});ef.displayName="ViewTransition";var ev=S.createContext(new Map);ev.displayName="Fetchers";var ew=S.createContext(null);ew.displayName="Await";var Yn=S.createContext(null);Yn.displayName="Navigation";var Ko=S.createContext(null);Ko.displayName="Location";var ra=S.createContext({outlet:null,matches:[],isDataRoute:!1});ra.displayName="Route";var tf=S.createContext(null);tf.displayName="RouteError";var tv="REACT_ROUTER_ERROR",tw="REDIRECT",nw="ROUTE_ERROR_RESPONSE";function aw(n){if(n.startsWith(`${tv}:${tw}:{`))try{let a=JSON.parse(n.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function rw(n){if(n.startsWith(`${tv}:${nw}:{`))try{let a=JSON.parse(n.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new tl(a.status,a.statusText,a.data)}catch{}}function iw(n,{relative:a}={}){qe(rl(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:l}=S.useContext(Yn),{hash:c,pathname:d,search:f}=il(n,{relative:a}),m=d;return i!=="/"&&(m=d==="/"?i:ha([i,d])),l.createHref({pathname:m,search:f,hash:c})}function rl(){return S.useContext(Ko)!=null}function Sr(){return qe(rl(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Ko).location}var nv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function av(n){S.useContext(Yn).static||S.useLayoutEffect(n)}function nf(){let{isDataRoute:n}=S.useContext(ra);return n?xw():sw()}function sw(){qe(rl(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(Wr),{basename:a,navigator:i}=S.useContext(Yn),{matches:l}=S.useContext(ra),{pathname:c}=Sr(),d=JSON.stringify(Id(l)),f=S.useRef(!1);return av(()=>{f.current=!0}),S.useCallback((g,p={})=>{if(zt(f.current,nv),!f.current)return;if(typeof g=="number"){i.go(g);return}let x=Zd(g,JSON.parse(d),c,p.relative==="path");n==null&&a!=="/"&&(x.pathname=x.pathname==="/"?a:ha([a,x.pathname])),(p.replace?i.replace:i.push)(x,p.state,p)},[a,i,d,c,n])}var lw=S.createContext(null);function ow(n){let a=S.useContext(ra).outlet;return S.useMemo(()=>a&&S.createElement(lw.Provider,{value:n},a),[a,n])}function uw(){let{matches:n}=S.useContext(ra),a=n[n.length-1];return a?a.params:{}}function il(n,{relative:a}={}){let{matches:i}=S.useContext(ra),{pathname:l}=Sr(),c=JSON.stringify(Id(i));return S.useMemo(()=>Zd(n,JSON.parse(c),l,a==="path"),[n,c,l,a])}function cw(n,a,i,l,c){qe(rl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d}=S.useContext(Yn),{matches:f}=S.useContext(ra),m=f[f.length-1],g=m?m.params:{},p=m?m.pathname:"/",x=m?m.pathnameBase:"/",y=m&&m.route;{let Y=y&&y.path||"";sv(p,!y||Y.endsWith("*")||Y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${Y}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
12
12
|
|
|
13
|
-
Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}/*`}">.`)}let T=Sr(),N;N=T;let L=N.pathname||"/",B=L;if(x!=="/"){let Y=x.replace(/^\//,"").split("/");B="/"+L.replace(/^\//,"").split("/").slice(Y.length).join("/")}let P=mr(n,{pathname:B});return zt(y||P!=null,`No routes matched location "${N.pathname}${N.search}${N.hash}" `),zt(P==null||P[P.length-1].route.element!==void 0||P[P.length-1].route.Component!==void 0||P[P.length-1].route.lazy!==void 0,`Matched leaf route at location "${N.pathname}${N.search}${N.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),pw(P&&P.map(Y=>Object.assign({},Y,{params:Object.assign({},g,Y.params),pathname:ha([x,d.encodeLocation?d.encodeLocation(Y.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathname]),pathnameBase:Y.pathnameBase==="/"?x:ha([x,d.encodeLocation?d.encodeLocation(Y.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathnameBase])})),f,i,l,c)}function dw(){let n=iv(),a=Ws(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,l="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:l},d={padding:"2px 4px",backgroundColor:l},f=null;return console.error("Error handled by React Router default ErrorBoundary:",n),f=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:d},"ErrorBoundary")," or"," ",S.createElement("code",{style:d},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),i?S.createElement("pre",{style:c},i):null,f)}var fw=S.createElement(dw,null),rv=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){this.props.onError?this.props.onError(n,a):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const i=rw(n.digest);i&&(n=i)}let a=n!==void 0?S.createElement(ra.Provider,{value:this.props.routeContext},S.createElement(tf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(hw,{error:n},a):a}};rv.contextType=Wy;var dd=new WeakMap;function hw({children:n,error:a}){let{basename:i}=S.useContext(Yn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let l=aw(a.digest);if(l){let c=dd.get(a);if(c)throw c;let d=Qy(l.location,i);if(Hy&&!dd.get(a))if(d.isExternal||l.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:l.replace}));throw dd.set(a,f),f}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function mw({routeContext:n,match:a,children:i}){let l=S.useContext(Wr);return l&&l.static&&l.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(ra.Provider,{value:n},i)}function pw(n,a=[],i=null,l=null,c=null){if(n==null){if(!i)return null;if(i.errors)n=i.matches;else if(a.length===0&&!i.initialized&&i.matches.length>0)n=i.matches;else return null}let d=n,f=i?.errors;if(f!=null){let x=d.findIndex(y=>y.route.id&&f?.[y.route.id]!==void 0);qe(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),d=d.slice(0,Math.min(d.length,x+1))}let m=!1,g=-1;if(i)for(let x=0;x<d.length;x++){let y=d[x];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(g=x),y.route.id){let{loaderData:T,errors:N}=i,L=y.route.loader&&!T.hasOwnProperty(y.route.id)&&(!N||N[y.route.id]===void 0);if(y.route.lazy||L){m=!0,g>=0?d=d.slice(0,g+1):d=[d[0]];break}}}let p=i&&l?(x,y)=>{l(x,{location:i.location,params:i.matches?.[0]?.params??{},unstable_pattern:nl(i.matches),errorInfo:y})}:void 0;return d.reduceRight((x,y,T)=>{let N,L=!1,B=null,P=null;i&&(N=f&&y.route.id?f[y.route.id]:void 0,B=y.route.errorElement||fw,m&&(g<0&&T===0?(sv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),L=!0,P=null):g===T&&(L=!0,P=y.route.hydrateFallbackElement||null)));let K=a.concat(d.slice(0,T+1)),Y=()=>{let W;return N?W=B:L?W=P:y.route.Component?W=S.createElement(y.route.Component,null):y.route.element?W=y.route.element:W=x,S.createElement(mw,{match:y,routeContext:{outlet:x,matches:K,isDataRoute:i!=null},children:W})};return i&&(y.route.ErrorBoundary||y.route.errorElement||T===0)?S.createElement(rv,{location:i.location,revalidation:i.revalidation,component:B,error:N,children:Y(),routeContext:{outlet:null,matches:K,isDataRoute:!0},onError:p}):Y()},null)}function af(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gw(n){let a=S.useContext(Wr);return qe(a,af(n)),a}function yw(n){let a=S.useContext(al);return qe(a,af(n)),a}function vw(n){let a=S.useContext(ra);return qe(a,af(n)),a}function rf(n){let a=vw(n),i=a.matches[a.matches.length-1];return qe(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function bw(){return rf("useRouteId")}function iv(){let n=S.useContext(tf),a=yw("useRouteError"),i=rf("useRouteError");return n!==void 0?n:a.errors?.[i]}function xw(){let{router:n}=gw("useNavigate"),a=rf("useNavigate"),i=S.useRef(!1);return av(()=>{i.current=!0}),S.useCallback(async(c,d={})=>{zt(i.current,nv),i.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:a,...d}))},[n,a])}var Gg={};function sv(n,a,i){!a&&!Gg[n]&&(Gg[n]=!0,zt(!1,i))}var Kg={};function Vg(n,a){!n&&!Kg[a]&&(Kg[a]=!0,console.warn(a))}var Sw="useOptimistic",Yg=C1[Sw],ww=()=>{};function Ew(n){return Yg?Yg(n):[n,ww]}function Tw(n){let a={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&zt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:S.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&zt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:S.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&zt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:S.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),a}var Cw=["HydrateFallback","hydrateFallbackElement"],Aw=class{constructor(){this.status="pending",this.promise=new Promise((n,a)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",n(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",a(i))}})}};function Rw({router:n,flushSync:a,onError:i,unstable_useTransitions:l}){l=WS()||l;let[d,f]=S.useState(n.state),[m,g]=Ew(d),[p,x]=S.useState(),[y,T]=S.useState({isTransitioning:!1}),[N,L]=S.useState(),[B,P]=S.useState(),[K,Y]=S.useState(),W=S.useRef(new Map),he=S.useCallback((V,{deletedFetchers:re,newErrors:ke,flushSync:Re,viewTransitionOpts:Se})=>{ke&&i&&Object.values(ke).forEach(Le=>i(Le,{location:V.location,params:V.matches[0]?.params??{},unstable_pattern:nl(V.matches)})),V.fetchers.forEach((Le,Ee)=>{Le.data!==void 0&&W.current.set(Ee,Le.data)}),re.forEach(Le=>W.current.delete(Le)),Vg(Re===!1||a!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Me=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(Vg(Se==null||Me,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!Se||!Me){a&&Re?a(()=>f(V)):l===!1?f(V):S.startTransition(()=>{l===!0&&g(Le=>Fg(Le,V)),f(V)});return}if(a&&Re){a(()=>{B&&(N?.resolve(),B.skipTransition()),T({isTransitioning:!0,flushSync:!0,currentLocation:Se.currentLocation,nextLocation:Se.nextLocation})});let Le=n.window.document.startViewTransition(()=>{a(()=>f(V))});Le.finished.finally(()=>{a(()=>{L(void 0),P(void 0),x(void 0),T({isTransitioning:!1})})}),a(()=>P(Le));return}B?(N?.resolve(),B.skipTransition(),Y({state:V,currentLocation:Se.currentLocation,nextLocation:Se.nextLocation})):(x(V),T({isTransitioning:!0,flushSync:!1,currentLocation:Se.currentLocation,nextLocation:Se.nextLocation}))},[n.window,a,B,N,l,g,i]);S.useLayoutEffect(()=>n.subscribe(he),[n,he]),S.useEffect(()=>{y.isTransitioning&&!y.flushSync&&L(new Aw)},[y]),S.useEffect(()=>{if(N&&p&&n.window){let V=p,re=N.promise,ke=n.window.document.startViewTransition(async()=>{l===!1?f(V):S.startTransition(()=>{l===!0&&g(Re=>Fg(Re,V)),f(V)}),await re});ke.finished.finally(()=>{L(void 0),P(void 0),x(void 0),T({isTransitioning:!1})}),P(ke)}},[p,N,n.window,l,g]),S.useEffect(()=>{N&&p&&m.location.key===p.location.key&&N.resolve()},[N,B,m.location,p]),S.useEffect(()=>{!y.isTransitioning&&K&&(x(K.state),T({isTransitioning:!0,flushSync:!1,currentLocation:K.currentLocation,nextLocation:K.nextLocation}),Y(void 0))},[y.isTransitioning,K]);let fe=S.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:V=>n.navigate(V),push:(V,re,ke)=>n.navigate(V,{state:re,preventScrollReset:ke?.preventScrollReset}),replace:(V,re,ke)=>n.navigate(V,{replace:!0,state:re,preventScrollReset:ke?.preventScrollReset})}),[n]),de=n.basename||"/",R=S.useMemo(()=>({router:n,navigator:fe,static:!1,basename:de,onError:i}),[n,fe,de,i]);return S.createElement(S.Fragment,null,S.createElement(Wr.Provider,{value:R},S.createElement(al.Provider,{value:m},S.createElement(ev.Provider,{value:W.current},S.createElement(ef.Provider,{value:y},S.createElement(Ow,{basename:de,location:m.location,navigationType:m.historyAction,navigator:fe,unstable_useTransitions:l},S.createElement(_w,{routes:n.routes,future:n.future,state:m,onError:i})))))),null)}function Fg(n,a){return{...n,navigation:a.navigation.state!=="idle"?a.navigation:n.navigation,revalidation:a.revalidation!=="idle"?a.revalidation:n.revalidation,actionData:a.navigation.state!=="submitting"?a.actionData:n.actionData,fetchers:a.fetchers}}var _w=S.memo(kw);function kw({routes:n,future:a,state:i,onError:l}){return cw(n,void 0,i,l,a)}function Nw(n){return ow(n.context)}function Ow({basename:n="/",children:a=null,location:i,navigationType:l="POP",navigator:c,static:d=!1,unstable_useTransitions:f}){qe(!rl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),g=S.useMemo(()=>({basename:m,navigator:c,static:d,unstable_useTransitions:f,future:{}}),[m,c,d,f]);typeof i=="string"&&(i=xr(i));let{pathname:p="/",search:x="",hash:y="",state:T=null,key:N="default"}=i,L=S.useMemo(()=>{let B=Vn(p,m);return B==null?null:{location:{pathname:B,search:x,hash:y,state:T,key:N},navigationType:l}},[m,p,x,y,T,N,l]);return zt(L!=null,`<Router basename="${m}"> is not able to match the URL "${p}${x}${y}" because it does not start with the basename, so the <Router> won't render anything.`),L==null?null:S.createElement(Yn.Provider,{value:g},S.createElement(Ko.Provider,{children:a,value:L}))}var No="get",Oo="application/x-www-form-urlencoded";function Vo(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Mw(n){return Vo(n)&&n.tagName.toLowerCase()==="button"}function jw(n){return Vo(n)&&n.tagName.toLowerCase()==="form"}function Dw(n){return Vo(n)&&n.tagName.toLowerCase()==="input"}function zw(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Lw(n,a){return n.button===0&&(!a||a==="_self")&&!zw(n)}var Eo=null;function Uw(){if(Eo===null)try{new FormData(document.createElement("form"),0),Eo=!1}catch{Eo=!0}return Eo}var Bw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function fd(n){return n!=null&&!Bw.has(n)?(zt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Oo}"`),null):n}function qw(n,a){let i,l,c,d,f;if(jw(n)){let m=n.getAttribute("action");l=m?Vn(m,a):null,i=n.getAttribute("method")||No,c=fd(n.getAttribute("enctype"))||Oo,d=new FormData(n)}else if(Mw(n)||Dw(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=n.getAttribute("formaction")||m.getAttribute("action");if(l=g?Vn(g,a):null,i=n.getAttribute("formmethod")||m.getAttribute("method")||No,c=fd(n.getAttribute("formenctype"))||fd(m.getAttribute("enctype"))||Oo,d=new FormData(m,n),!Uw()){let{name:p,type:x,value:y}=n;if(x==="image"){let T=p?`${p}.`:"";d.append(`${T}x`,"0"),d.append(`${T}y`,"0")}else p&&d.append(p,y)}}else{if(Vo(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=No,l=null,c=Oo,f=n}return d&&c==="text/plain"&&(f=d,d=void 0),{action:l,method:i.toLowerCase(),encType:c,formData:d,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function sf(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function Hw(n,a,i,l){let c=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${l}`:c.pathname=`${c.pathname}.${l}`:c.pathname==="/"?c.pathname=`_root.${l}`:a&&Vn(c.pathname,a)==="/"?c.pathname=`${a.replace(/\/$/,"")}/_root.${l}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${l}`,c}async function Qw(n,a){if(n.id in a)return a[n.id];try{let i=await import(n.module);return a[n.id]=i,i}catch(i){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Pw(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Gw(n,a,i){let l=await Promise.all(n.map(async c=>{let d=a.routes[c.route.id];if(d){let f=await Qw(d,i);return f.links?f.links():[]}return[]}));return Fw(l.flat(1).filter(Pw).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function Xg(n,a,i,l,c,d){let f=(g,p)=>i[p]?g.route.id!==i[p].route.id:!0,m=(g,p)=>i[p].pathname!==g.pathname||i[p].route.path?.endsWith("*")&&i[p].params["*"]!==g.params["*"];return d==="assets"?a.filter((g,p)=>f(g,p)||m(g,p)):d==="data"?a.filter((g,p)=>{let x=l.routes[g.route.id];if(!x||!x.hasLoader)return!1;if(f(g,p)||m(g,p))return!0;if(g.route.shouldRevalidate){let y=g.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:i[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function Kw(n,a,{includeHydrateFallback:i}={}){return Vw(n.map(l=>{let c=a.routes[l.route.id];if(!c)return[];let d=[c.module];return c.clientActionModule&&(d=d.concat(c.clientActionModule)),c.clientLoaderModule&&(d=d.concat(c.clientLoaderModule)),i&&c.hydrateFallbackModule&&(d=d.concat(c.hydrateFallbackModule)),c.imports&&(d=d.concat(c.imports)),d}).flat(1))}function Vw(n){return[...new Set(n)]}function Yw(n){let a={},i=Object.keys(n).sort();for(let l of i)a[l]=n[l];return a}function Fw(n,a){let i=new Set;return new Set(a),n.reduce((l,c)=>{let d=JSON.stringify(Yw(c));return i.has(d)||(i.add(d),l.push({key:d,link:c})),l},[])}function lv(){let n=S.useContext(Wr);return sf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Xw(){let n=S.useContext(al);return sf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var lf=S.createContext(void 0);lf.displayName="FrameworkContext";function ov(){let n=S.useContext(lf);return sf(n,"You must render this element inside a <HydratedRouter> element"),n}function Iw(n,a){let i=S.useContext(lf),[l,c]=S.useState(!1),[d,f]=S.useState(!1),{onFocus:m,onBlur:g,onMouseEnter:p,onMouseLeave:x,onTouchStart:y}=a,T=S.useRef(null);S.useEffect(()=>{if(n==="render"&&f(!0),n==="viewport"){let B=K=>{K.forEach(Y=>{f(Y.isIntersecting)})},P=new IntersectionObserver(B,{threshold:.5});return T.current&&P.observe(T.current),()=>{P.disconnect()}}},[n]),S.useEffect(()=>{if(l){let B=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(B)}}},[l]);let N=()=>{c(!0)},L=()=>{c(!1),f(!1)};return i?n!=="intent"?[d,T,{}]:[d,T,{onFocus:Ps(m,N),onBlur:Ps(g,L),onMouseEnter:Ps(p,N),onMouseLeave:Ps(x,L),onTouchStart:Ps(y,N)}]:[!1,T,{}]}function Ps(n,a){return i=>{n&&n(i),i.defaultPrevented||a(i)}}function Zw({page:n,...a}){let{router:i}=lv(),l=S.useMemo(()=>mr(i.routes,n,i.basename),[i.routes,n,i.basename]);return l?S.createElement($w,{page:n,matches:l,...a}):null}function Jw(n){let{manifest:a,routeModules:i}=ov(),[l,c]=S.useState([]);return S.useEffect(()=>{let d=!1;return Gw(n,a,i).then(f=>{d||c(f)}),()=>{d=!0}},[n,a,i]),l}function $w({page:n,matches:a,...i}){let l=Sr(),{future:c,manifest:d,routeModules:f}=ov(),{basename:m}=lv(),{loaderData:g,matches:p}=Xw(),x=S.useMemo(()=>Xg(n,a,p,d,l,"data"),[n,a,p,d,l]),y=S.useMemo(()=>Xg(n,a,p,d,l,"assets"),[n,a,p,d,l]),T=S.useMemo(()=>{if(n===l.pathname+l.search+l.hash)return[];let B=new Set,P=!1;if(a.forEach(Y=>{let W=d.routes[Y.route.id];!W||!W.hasLoader||(!x.some(he=>he.route.id===Y.route.id)&&Y.route.id in g&&f[Y.route.id]?.shouldRevalidate||W.hasClientLoader?P=!0:B.add(Y.route.id))}),B.size===0)return[];let K=Hw(n,m,c.unstable_trailingSlashAwareDataRequests,"data");return P&&B.size>0&&K.searchParams.set("_routes",a.filter(Y=>B.has(Y.route.id)).map(Y=>Y.route.id).join(",")),[K.pathname+K.search]},[m,c.unstable_trailingSlashAwareDataRequests,g,l,d,x,a,n,f]),N=S.useMemo(()=>Kw(y,d),[y,d]),L=Jw(y);return S.createElement(S.Fragment,null,T.map(B=>S.createElement("link",{key:B,rel:"prefetch",as:"fetch",href:B,...i})),N.map(B=>S.createElement("link",{key:B,rel:"modulepreload",href:B,...i})),L.map(({key:B,link:P})=>S.createElement("link",{key:B,nonce:i.nonce,...P,crossOrigin:P.crossOrigin??i.crossOrigin})))}function Ww(...n){return a=>{n.forEach(i=>{typeof i=="function"?i(a):i!=null&&(i.current=a)})}}var eE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{eE&&(window.__reactRouterVersion="7.13.0")}catch{}function tE(n,a){return _S({basename:a?.basename,getContext:a?.getContext,future:a?.future,history:Kx({window:a?.window}),hydrationData:nE(),routes:n,mapRouteProperties:Tw,hydrationRouteProperties:Cw,dataStrategy:a?.dataStrategy,patchRoutesOnNavigation:a?.patchRoutesOnNavigation,window:a?.window,unstable_instrumentations:a?.unstable_instrumentations}).initialize()}function nE(){let n=window?.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:aE(n.errors)}),n}function aE(n){if(!n)return null;let a=Object.entries(n),i={};for(let[l,c]of a)if(c&&c.__type==="RouteErrorResponse")i[l]=new tl(c.status,c.statusText,c.data,c.internal===!0);else if(c&&c.__type==="Error"){if(c.__subType){let d=window[c.__subType];if(typeof d=="function")try{let f=new d(c.message);f.stack="",i[l]=f}catch{}}if(i[l]==null){let d=new Error(c.message);d.stack="",i[l]=d}}else i[l]=c;return i}var uv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cv=S.forwardRef(function({onClick:a,discover:i="render",prefetch:l="none",relative:c,reloadDocument:d,replace:f,state:m,target:g,to:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T,...N},L){let{basename:B,unstable_useTransitions:P}=S.useContext(Yn),K=typeof p=="string"&&uv.test(p),Y=Qy(p,B);p=Y.to;let W=iw(p,{relative:c}),[he,fe,de]=Iw(l,N),R=lE(p,{replace:f,state:m,target:g,preventScrollReset:x,relative:c,viewTransition:y,unstable_defaultShouldRevalidate:T,unstable_useTransitions:P});function V(ke){a&&a(ke),ke.defaultPrevented||R(ke)}let re=S.createElement("a",{...N,...de,href:Y.absoluteURL||W,onClick:Y.isExternal||d?a:V,ref:Ww(L,fe),target:g,"data-discover":!K&&i==="render"?"true":void 0});return he&&!K?S.createElement(S.Fragment,null,re,S.createElement(Zw,{page:W})):re});cv.displayName="Link";var rE=S.forwardRef(function({"aria-current":a="page",caseSensitive:i=!1,className:l="",end:c=!1,style:d,to:f,viewTransition:m,children:g,...p},x){let y=il(f,{relative:p.relative}),T=Sr(),N=S.useContext(al),{navigator:L,basename:B}=S.useContext(Yn),P=N!=null&&fE(y)&&m===!0,K=L.encodeLocation?L.encodeLocation(y).pathname:y.pathname,Y=T.pathname,W=N&&N.navigation&&N.navigation.location?N.navigation.location.pathname:null;i||(Y=Y.toLowerCase(),W=W?W.toLowerCase():null,K=K.toLowerCase()),W&&B&&(W=Vn(W,B)||W);const he=K!=="/"&&K.endsWith("/")?K.length-1:K.length;let fe=Y===K||!c&&Y.startsWith(K)&&Y.charAt(he)==="/",de=W!=null&&(W===K||!c&&W.startsWith(K)&&W.charAt(K.length)==="/"),R={isActive:fe,isPending:de,isTransitioning:P},V=fe?a:void 0,re;typeof l=="function"?re=l(R):re=[l,fe?"active":null,de?"pending":null,P?"transitioning":null].filter(Boolean).join(" ");let ke=typeof d=="function"?d(R):d;return S.createElement(cv,{...p,"aria-current":V,className:re,ref:x,style:ke,to:f,viewTransition:m},typeof g=="function"?g(R):g)});rE.displayName="NavLink";var iE=S.forwardRef(({discover:n="render",fetcherKey:a,navigate:i,reloadDocument:l,replace:c,state:d,method:f=No,action:m,onSubmit:g,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T,...N},L)=>{let{unstable_useTransitions:B}=S.useContext(Yn),P=cE(),K=dE(m,{relative:p}),Y=f.toLowerCase()==="get"?"get":"post",W=typeof m=="string"&&uv.test(m),he=fe=>{if(g&&g(fe),fe.defaultPrevented)return;fe.preventDefault();let de=fe.nativeEvent.submitter,R=de?.getAttribute("formmethod")||f,V=()=>P(de||fe.currentTarget,{fetcherKey:a,method:R,navigate:i,replace:c,state:d,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T});B&&i!==!1?S.startTransition(()=>V()):V()};return S.createElement("form",{ref:L,method:Y,action:K,onSubmit:l?g:he,...N,"data-discover":!W&&n==="render"?"true":void 0})});iE.displayName="Form";function sE(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function dv(n){let a=S.useContext(Wr);return qe(a,sE(n)),a}function lE(n,{target:a,replace:i,state:l,preventScrollReset:c,relative:d,viewTransition:f,unstable_defaultShouldRevalidate:m,unstable_useTransitions:g}={}){let p=nf(),x=Sr(),y=il(n,{relative:d});return S.useCallback(T=>{if(Lw(T,a)){T.preventDefault();let N=i!==void 0?i:pa(x)===pa(y),L=()=>p(n,{replace:N,state:l,preventScrollReset:c,relative:d,viewTransition:f,unstable_defaultShouldRevalidate:m});g?S.startTransition(()=>L()):L()}},[x,p,y,i,l,a,n,c,d,f,m,g])}var oE=0,uE=()=>`__${String(++oE)}__`;function cE(){let{router:n}=dv("useSubmit"),{basename:a}=S.useContext(Yn),i=bw(),l=n.fetch,c=n.navigate;return S.useCallback(async(d,f={})=>{let{action:m,method:g,encType:p,formData:x,body:y}=qw(d,a);if(f.navigate===!1){let T=f.fetcherKey||uE();await l(T,i,f.action||m,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:x,body:y,formMethod:f.method||g,formEncType:f.encType||p,flushSync:f.flushSync})}else await c(f.action||m,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:x,body:y,formMethod:f.method||g,formEncType:f.encType||p,replace:f.replace,state:f.state,fromRouteId:i,flushSync:f.flushSync,viewTransition:f.viewTransition})},[l,c,a,i])}function dE(n,{relative:a}={}){let{basename:i}=S.useContext(Yn),l=S.useContext(ra);qe(l,"useFormAction must be used inside a RouteContext");let[c]=l.matches.slice(-1),d={...il(n||".",{relative:a})},f=Sr();if(n==null){d.search=f.search;let m=new URLSearchParams(d.search),g=m.getAll("index");if(g.some(x=>x==="")){m.delete("index"),g.filter(y=>y).forEach(y=>m.append("index",y));let x=m.toString();d.search=x?`?${x}`:""}}return(!n||n===".")&&c.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(d.pathname=d.pathname==="/"?i:ha([i,d.pathname])),pa(d)}function fE(n,{relative:a}={}){let i=S.useContext(ef);qe(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=dv("useViewTransitionState"),c=il(n,{relative:a});if(!i.isTransitioning)return!1;let d=Vn(i.currentLocation.pathname,l)||i.currentLocation.pathname,f=Vn(i.nextLocation.pathname,l)||i.nextLocation.pathname;return Po(c.pathname,f)!=null||Po(c.pathname,d)!=null}function hE(n){return S.createElement(Rw,{flushSync:jy.flushSync,...n})}const mE="modulepreload",pE=function(n){return"/"+n},Ig={},_n=function(a,i,l){let c=Promise.resolve();if(i&&i.length>0){let g=function(p){return Promise.all(p.map(x=>Promise.resolve(x).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),m=f?.nonce||f?.getAttribute("nonce");c=g(i.map(p=>{if(p=pE(p),p in Ig)return;Ig[p]=!0;const x=p.endsWith(".css"),y=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${y}`))return;const T=document.createElement("link");if(T.rel=x?"stylesheet":mE,x||(T.as="script"),T.crossOrigin="",T.href=p,m&&T.setAttribute("nonce",m),document.head.appendChild(T),x)return new Promise((N,L)=>{T.addEventListener("load",N),T.addEventListener("error",()=>L(new Error(`Unable to preload CSS for ${p}`)))})}))}function d(f){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=f,window.dispatchEvent(m),!m.defaultPrevented)throw f}return c.then(f=>{for(const m of f||[])m.status==="rejected"&&d(m.reason);return a().catch(d)})};const fv=(...n)=>n.filter((a,i,l)=>!!a&&a.trim()!==""&&l.indexOf(a)===i).join(" ").trim();const gE=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const yE=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,i,l)=>l?l.toUpperCase():i.toLowerCase());const Zg=n=>{const a=yE(n);return a.charAt(0).toUpperCase()+a.slice(1)};var vE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const bE=n=>{for(const a in n)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};const xE=S.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:c="",children:d,iconNode:f,...m},g)=>S.createElement("svg",{ref:g,...vE,width:a,height:a,stroke:n,strokeWidth:l?Number(i)*24/Number(a):i,className:fv("lucide",c),...!d&&!bE(m)&&{"aria-hidden":"true"},...m},[...f.map(([p,x])=>S.createElement(p,x)),...Array.isArray(d)?d:[d]]));const gt=(n,a)=>{const i=S.forwardRef(({className:l,...c},d)=>S.createElement(xE,{ref:d,iconNode:a,className:fv(`lucide-${gE(Zg(n))}`,`lucide-${n}`,l),...c}));return i.displayName=Zg(n),i};const SE=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],wE=gt("arrow-left",SE);const EE=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],TE=gt("bell",EE);const CE=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],hv=gt("bot",CE);const AE=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]],RE=gt("cable",AE);const _E=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Od=gt("circle-check",_E);const kE=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],NE=gt("circle-dashed",kE);const OE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],mv=gt("circle-x",OE);const ME=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],jE=gt("cpu",ME);const DE=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],pv=gt("download",DE);const zE=[["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"}]],LE=gt("external-link",zE);const UE=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],BE=gt("folder-git-2",UE);const qE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],HE=gt("info",qE);const QE=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],PE=gt("languages",QE);const GE=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ki=gt("loader-circle",GE);const KE=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],VE=gt("lock-keyhole",KE);const YE=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],FE=gt("refresh-cw",YE);const XE=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Yo=gt("rotate-ccw",XE);const IE=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ZE=gt("settings",IE);const JE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],$E=gt("shield-check",JE);const WE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],eT=gt("square",WE);const tT=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],nT=gt("terminal",tT);const aT=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Jr=gt("triangle-alert",aT);const rT=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],iT=gt("users",rT);const sT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gv=gt("x",sT),Jg=n=>{let a;const i=new Set,l=(p,x)=>{const y=typeof p=="function"?p(a):p;if(!Object.is(y,a)){const T=a;a=x??(typeof y!="object"||y===null)?y:Object.assign({},a,y),i.forEach(N=>N(a,T))}},c=()=>a,m={setState:l,getState:c,getInitialState:()=>g,subscribe:p=>(i.add(p),()=>i.delete(p))},g=a=n(l,c,m);return m},lT=(n=>n?Jg(n):Jg),oT=n=>n;function uT(n,a=oT){const i=ne.useSyncExternalStore(n.subscribe,ne.useCallback(()=>a(n.getState()),[n,a]),ne.useCallback(()=>a(n.getInitialState()),[n,a]));return ne.useDebugValue(i),i}const $g=n=>{const a=lT(n),i=l=>uT(a,l);return Object.assign(i,a),i},yv=(n=>n?$g(n):$g),Fs=yv(n=>({sidebarOpen:!0,theme:"system",settingsOpen:!1,settingsTab:"general",toggleSidebar:()=>n(a=>({sidebarOpen:!a.sidebarOpen})),setSidebarOpen:a=>n({sidebarOpen:a}),setTheme:a=>n({theme:a}),openSettings:a=>n({settingsOpen:!0,...a?{settingsTab:a}:{}}),closeSettings:()=>n({settingsOpen:!1}),setSettingsTab:a=>n({settingsTab:a})})),Wg="/api";function vv(n){return n.endsWith("/")?n.slice(0,-1):n}function bv(n){return!1}function cT(){return bv()?Wg:vv(Wg)}function dT(){return bv()?"":vv("")}const fT=cT();class hT{baseUrl;constructor(a){this.baseUrl=a}async request(a,i={}){const{params:l,...c}=i;let d=`${this.baseUrl}${a}`;if(l){const g=new URLSearchParams(l);d+=`?${g.toString()}`}const f={...c.headers};c.body!==void 0&&(f["Content-Type"]="application/json");const m=await fetch(d,{...c,headers:f,credentials:c.credentials??"same-origin"});if(!m.ok){const g=await m.json().catch(()=>({}));throw new sl(m.status,typeof g.message=="string"?g.message:typeof g.error=="string"?g.error:"Request failed",g)}if(m.status!==204)return m.json()}get(a,i){return this.request(a,{...i,method:"GET"})}post(a,i,l){return this.request(a,{...l,method:"POST",body:i?JSON.stringify(i):void 0})}put(a,i,l){return this.request(a,{...l,method:"PUT",body:i?JSON.stringify(i):void 0})}patch(a,i,l){return this.request(a,{...l,method:"PATCH",body:i?JSON.stringify(i):void 0})}delete(a,i){return this.request(a,{...i,method:"DELETE"})}}class sl extends Error{status;details;constructor(a,i,l={}){super(i),this.name="ApiError",this.status=a,this.details=l}}const ze=new hT(fT),ge={projects:{all:["projects"],list:n=>["projects","list",n],detail:n=>["projects","detail",n],gitCapability:n=>["projects","gitCapability",n]},tasks:{all:["tasks"],boardAll:["tasks","board"],board:n=>["tasks","board",n],list:(n,a)=>["tasks","list",n,a],detail:n=>["tasks","detail",n],body:n=>["tasks","body",n],stats:n=>["tasks","stats",n]},workspaces:{all:["workspaces"],list:n=>["workspaces","list",n],setupProgress:n=>["workspaces","setup-progress",n],detail:n=>["workspaces","detail",n],diff:n=>["workspaces","diff",n],gitStatus:n=>["workspaces","gitStatus",n]},workspaceServices:{all:["workspace-services"],list:n=>["workspace-services","list",n],logs:(n,a)=>["workspace-services","logs",n,a]},previews:{all:["previews"],status:n=>["previews","status",n]},sessions:{all:["sessions"],detail:n=>["sessions","detail",n],runtime:n=>["sessions","runtime",n]},conversations:{all:["conversations"],list:n=>["conversations","list",n],detail:n=>["conversations","detail",n]},files:{all:["files"],tree:(n,a)=>["files","tree",n,a],content:(n,a)=>["files","content",n,a]},git:{all:["git"],changes:n=>["git","changes",n],diff:(n,a,i)=>["git","diff",n,a,i],log:n=>["git","log",n],commitFiles:(n,a)=>["git","commitFiles",n,a],commitDiff:(n,a,i)=>["git","commitDiff",n,a,i]},profiles:{all:["profiles"],defaults:["profiles","defaults"],agent:n=>["profiles","agent",n],variant:(n,a)=>["profiles","variant",n,a]},providers:{all:["providers"],capabilities:(n,a)=>["providers","capabilities",n??"",a??""],detail:n=>["providers","detail",n]},tunnel:{status:["tunnel","status"]},notifications:{settings:["notifications","settings"]},appSettings:{detail:["app-settings"]},accessAuth:{status:["access-auth","status"],settings:["access-auth","settings"]},agentCli:{manifest:["agent-cli","manifest"],status:["agent-cli","status"],preview:n=>["agent-cli","preview",n],task:n=>["agent-cli","task",n],logs:n=>["agent-cli","logs",n]},system:{cursorAgentModels:["system","cursor-agent-models"],mcpConfig:["system","mcp-config"],slashCommandCatalog:(n,a)=>["system","slash-command-catalog",n??null,a??null],skillCatalog:(n,a)=>["system","skill-catalog",n??null,a??null]}};function mT(){return rn({queryKey:ge.appSettings.detail,queryFn:()=>ze.get("/app-settings")})}function pT(){const n=tt();return ct({mutationFn:a=>ze.put("/app-settings",a),onSuccess:()=>{n.invalidateQueries({queryKey:ge.appSettings.detail})}})}function aR(){return rn({queryKey:[...ge.appSettings.detail,"commit-message-defaults"],queryFn:()=>ze.get("/app-settings/commit-message-defaults")})}const gT={"zh-CN":{Settings:"设置",General:"通用",Back:"返回","Loading...":"加载中...","No options":"暂无选项","Processing...":"处理中...","Permission required":"需要授权","The agent needs approval to continue.":"Agent 需要你的授权才能继续。",Confirm:"确认",Cancel:"取消",Start:"开始","Starting...":"启动中...","General Settings":"通用设置","Display Language":"显示语言","Choose the interface language. The setting is saved to the local Agent Tower database and will still apply after restart.":"选择界面语言。设置会保存到本地 Agent Tower 数据库,并在重新打开后继续生效。",English:"English","Simplified Chinese":"简体中文","Language setting":"语言设置","Language setting could not be saved":"语言设置保存失败","Browse and select a Git repository, or type a path and press Enter":"浏览并选择一个 Git 仓库,或输入路径后按 Enter","Browse and select a directory, or type a path and press Enter":"浏览并选择一个目录,或输入路径后按 Enter","Select Current":"选择当前目录","Project Path":"项目路径","Create Local Project":"创建本地项目","Local project":"本地项目","Local projects only support local Solo tasks. Initialize Git to use worktrees and TeamRun.":"本地项目仅支持本地 Solo 任务。初始化 Git 后可使用工作树和 TeamRun。","You can also create it as a local project now. Local projects only support local Solo tasks until Git is initialized.":"你也可以现在将其创建为本地项目。初始化 Git 前,本地项目仅支持本地 Solo 任务。","This setting applies only to Git worktree projects.":"此设置仅适用于 Git 工作树项目。","Agent 配置":"Agent 配置",项目配置:"项目配置",通知:"通知",通用:"通用","AI Agent Task Management Dashboard":"AI Agent 任务管理面板","Project Management":"项目管理","Manage your AI agent projects":"管理你的 AI Agent 项目","View Projects":"查看项目","Task Board":"任务看板",Tasks:"任务","Kanban-style task management":"Kanban 风格的任务管理","Open Board":"打开看板",Workspace:"工作区","Git worktree isolated environments":"Git Worktree 隔离环境","Manage Workspaces":"管理工作区","Move to":"移动到","Delete Task":"删除任务","Drop into {title}":"放入 {title}","Drop here":"拖到此处","No tasks":"暂无任务","All Projects":"所有项目",Projects:"项目","Select View":"选择视图","Create New Project...":"创建新项目...","New Task":"新任务","New Project":"新项目",Search:"搜索","Search tasks...":"搜索任务...","Search conversations...":"搜索对话...","Recent tasks":"近期任务","Recent conversations":"最近对话","No matching tasks":"没有匹配的任务","No matching conversations":"没有匹配的对话","{count} tasks":"{count} 个任务","Clear filter":"清除筛选",Review:"待审查",Running:"进行中",Pending:"待开始",Priority:"优先级","Task priority":"任务优先级",紧急:"紧急",高:"高",普通:"普通",低:"低",优先级变更失败:"优先级变更失败",Done:"已完成",Cancelled:"已取消",Starting:"启动中",Completed:"已完成",Stopped:"已停止",Changes:"变更",History:"历史",Conversation:"对话",Conversations:"对话","New Conversation":"新对话","No conversations":"暂无对话","Conversation not found":"对话不存在","Delete this conversation?":"删除这个对话?","Ask a question...":"问一个问题...",Editor:"编辑器",Terminal:"终端",Preview:"预览","Open visualization":"打开可视化","Download file":"下载文件","Viewing agent visualization":"正在查看 Agent 可视化","Session file":"会话文件","Coming soon...":"即将推出...",Modified:"已修改",Added:"已新增",Deleted:"已删除",Delete:"删除",Renamed:"已重命名","Loading diff...":"正在加载差异...","Failed to load diff.":"加载差异失败。","No diff content available.":"没有可显示的差异内容。","No workspace selected.":"未选择工作区。","Loading changes...":"正在加载变更...","Failed to load changes.":"加载变更失败。","No pending changes":"暂无待处理变更",Uncommitted:"未提交",Committed:"已提交","Select a file to view diff":"选择一个文件以查看差异","{count}s ago":"{count} 秒前","{count}m ago":"{count} 分钟前","{count}h ago":"{count} 小时前","{count}d ago":"{count} 天前",正在思考:"正在思考","最后一次输出于 {duration}前":"最后一次输出于 {duration}前",等待首次输出:"等待首次输出","{count} 秒":"{count} 秒","{minutes} 分 {seconds} 秒":"{minutes} 分 {seconds} 秒","{hours} 小时 {minutes} 分":"{hours} 小时 {minutes} 分","Loading files...":"正在加载文件列表...","No files changed":"没有文件变更","Loading history...":"正在加载历史记录...","Failed to load history.":"加载历史记录失败。","No commit history":"暂无提交历史","Load more":"加载更多","Select a commit to view changes":"选择一个提交以查看变更","Zoom out":"缩小","Reset zoom":"重置缩放","Zoom in":"放大","Fit to view":"适应视图","Failed to load image.":"加载图片失败。","Close tab":"关闭标签页",Close:"关闭","Expand file tree":"展开文件树","No open files":"暂无打开文件",Saving:"保存中",Unsaved:"未保存","Select a file from the tree to open.":"从文件树中选择一个文件以打开。","Loading file...":"正在加载文件...","Failed to load file":"加载文件失败","Failed to load":"加载失败","Failed to start. Please try again.":"启动失败,请重试","Failed to stop session. Refreshing status; check it and try again.":"停止会话失败。正在刷新状态,请确认后重试。",Files:"文件","No working directory":"未选择工作目录","Refresh file tree":"刷新文件树","Collapse file tree":"收起文件树","Shell {count}":"终端 {count}","New Terminal":"新终端","No terminals open":"暂无打开终端","Interactive terminals":"交互终端","Background services":"后台服务","Background service logs":"后台服务日志","Loading background services...":"正在加载后台服务...","Failed to load background services.":"加载后台服务失败。","No background services":"暂无后台服务","Select a background service":"选择一个后台服务","Loading service logs...":"正在加载服务日志...","Failed to refresh service logs.":"刷新服务日志失败。","Earlier log output is unavailable.":"较早的日志内容已不可用。","No logs yet":"暂无日志",Retry:"重试","Something went wrong":"出了点问题","Only rendering errors are caught here. Errors from event handlers, async callbacks or observers are not.":"此处只兜住渲染阶段抛出的错误;事件处理器、异步回调或 observer 中抛出的错误不会进入兜底。","This section hit a rendering error and was replaced by this message.":"这一区域渲染出错,已由本条提示替代。","Failed to display logs":"日志显示失败","The log view hit a rendering error. Retry renders the same data again, so it will fail again while the bad data is still there.":"日志视图渲染出错。重试只是重新渲染同一份数据,坏数据仍在时会再次出错。","This page could not be displayed. Go back to the task board and try again.":"这个页面无法显示。请返回任务看板后重试。","The interface hit a rendering error. Reload the page to continue.":"界面渲染出错,请重新加载页面后继续。","The interface could not be displayed. Reload the page to try again.":"界面无法显示,请重新加载页面后再试。","Reload page":"重新加载页面","Back to home":"返回首页",Command:"命令","Working directory":"工作目录",Started:"启动时间","Not started":"尚未启动",Exited:"已退出","Paste into terminal":"粘贴到终端","Paste terminal input here":"在此粘贴终端输入内容","Terminal paste content":"终端粘贴内容","Terminal is not ready":"终端尚未就绪","Pasted into terminal":"已粘贴到终端",Paste:"粘贴",Disconnected:"未连接","Connecting...":"连接中...",Connected:"已连接","No active session":"暂无活动会话","Create a workspace and start a session to see terminal output.":"创建工作区并启动会话后即可查看终端输出。","Process exited with code {code}":"进程已退出,退出码 {code}","Error: {message}":"错误: {message}","Session: {id}":"会话: {id}","Tunnel active":"隧道已启用","Share via tunnel":"通过隧道分享","Tunnel Active":"隧道已启用","Tunnel healthy":"隧道健康","Tunnel needs attention":"隧道需要注意","Tunnel unavailable":"隧道不可用","Tunnel starting":"隧道启动中","Tunnel is off":"隧道未开启","Checking tunnel health":"正在检查隧道健康","Observing original link":"正在观察原链接","Local service unavailable":"本地服务不可用","Tunnel process exited":"隧道进程已退出","Tunnel error":"隧道错误","New link generated":"新链接已生成","Use Agent Tower on your phone":"在手机上使用 Agent Tower","After enabling the tunnel, you can scan a QR code with your phone to visit this Agent Tower instance, assign tasks, and check agent status.":"开启隧道后,可以用手机扫码访问本机的 Agent Tower,用手机派任务、查看 Agent 状态。","Enable phone access":"开启手机访问","Starting tunnel...":"正在开启隧道...","Start a temporary Quick Tunnel when you need to share this Agent Tower session.":"需要分享当前 Agent Tower 会话时,可以启动一个临时 Quick Tunnel。","The Cloudflare tunnel is running and the local Agent Tower health check passed.":"Cloudflare 隧道正在运行,且本地 Agent Tower 健康检查已通过。","The Cloudflare tunnel is running. Agent Tower is waiting for the first local health check.":"Cloudflare 隧道正在运行,Agent Tower 正在等待首次本地健康检查。","The original public URL is currently unreachable. Agent Tower is watching for it to recover and will not generate a new link automatically.":"原公网链接当前不可访问。Agent Tower 正在观察它是否恢复,不会自动生成新链接。","The local Agent Tower target is not responding, so the tunnel cannot be considered healthy.":"本地 Agent Tower 目标没有响应,因此隧道不能视为健康。","The tunnel process has exited. The old Quick Tunnel link is unlikely to recover.":"隧道进程已退出,旧 Quick Tunnel 链接大概率无法恢复。","The tunnel reported an error. Check the diagnostics before generating a new link.":"隧道报告了错误。生成新链接前请先查看诊断信息。","A new Quick Tunnel link was generated. The old link and token are no longer valid.":"已生成新的 Quick Tunnel 链接。旧链接和 token 已失效。","Agent Tower is asking Cloudflare Quick Tunnel for a temporary public URL.":"Agent Tower 正在向 Cloudflare Quick Tunnel 申请临时公网链接。","Last checked":"上次检查","Last healthy":"上次健康",Never:"从未","Agent Tower is keeping the same URL and waiting for Cloudflare Quick Tunnel to recover.":"Agent Tower 会保留同一个 URL,并等待 Cloudflare Quick Tunnel 自行恢复。","The previous tunnel link and token are no longer valid.":"之前的隧道链接和 token 已不再有效。","Generating a new link will invalidate the current link. People using the old URL must receive the new one.":"生成新链接会使当前链接失效。正在使用旧 URL 的人需要收到新链接。","Regenerate link":"重新生成链接","Generating...":"生成中...","Token protected":"受 Token 保护","Copy shareable link":"复制分享链接","No tunnel link available":"暂无可用隧道链接","Hide token":"隐藏 Token","Show token":"显示 Token","Copy token":"复制 Token","Stopping...":"停止中...","Stop Tunnel":"停止隧道","Create & Start":"创建并启动","Create TeamRun":"创建 TeamRun","Creating TeamRun...":"正在创建 TeamRun...","Team Status":"团队状态","Team mode":"团队模式","Review reason":"审查原因",Members:"成员","No members":"暂无成员",Queue:"队列","No queued work requests":"暂无排队中的工作请求","Active invocations":"活动调用","No active invocations":"暂无活动调用","Recently completed":"最近完成","No completed invocations":"暂无已完成调用","New session per request":"每次新会话","Resume last session":"复用上次会话",Latest:"最新","Invocation history":"调用历史","No invocation history":"暂无调用历史","No invocations yet":"暂无调用记录","All members idle":"所有成员空闲",Log:"日志",Details:"详情",Workspaces:"工作区",Owner:"所有者",Parent:"父级",Selected:"已选",Select:"选择","View workspace":"查看工作区",Invocation:"调用",Session:"会话","View log":"查看日志","View details":"查看详情","Team room":"团队房间","No room messages yet":"暂无房间消息",Messages:"消息","Work requests":"工作请求","Active work":"进行中的工作",Working:"正在工作","Queued...":"排队中...","Waiting reply...":"等待回复...",running:"进行中",queued:"排队",waiting:"等待",ended:"已结束",Elapsed:"耗时",Failed:"失败","Session ended":"会话已结束","Failed to send room message":"发送房间消息失败",selected:"已选择","Back to bottom":"回到底部","Expand full message":"展开全部","Collapse message":"收起","Invocation details":"调用详情","Back to room":"返回群聊","Pending approval":"待审批","Tool Calls":"工具调用",已处理:"已处理","已处理 {duration}":"已处理 {duration}","No pending approvals":"暂无待审批项",Requester:"发起者",User:"用户",System:"系统","Waiting room reply":"等待房间回复",Queued:"排队中",Idle:"空闲","Queue if busy":"忙碌时排队","Cancel current if busy":"忙碌时取消当前并开始","Cancel queued":"取消排队",Approve:"批准",Approving:"批准中...",Reject:"拒绝",Rejecting:"拒绝中...",Cancelling:"取消中...","Failed to update work request":"更新工作请求失败","Failed to cancel work request":"取消工作请求失败",Stop:"停止","Stop running work?":"停止正在运行的工作?","Stop only":"仅停止","Stop + clear queue":"停止并清空队列",Stopping:"停止中...","Failed to stop member work":"停止成员工作失败",Yes:"是",No:"否","Creating Task...":"正在创建任务...","Creating Workspace...":"正在创建工作区...","Creating Session...":"正在创建会话...","Starting Agent...":"正在启动 Agent...","Creating worktree":"正在创建工作树","Creating session":"正在创建会话","Starting agent":"正在启动 Agent","Starting task":"正在启动任务","Agent start failed":"启动 Agent 失败","Preparing workspace":"准备工作空间","Run setup script":"执行 Setup 脚本","Running setup ({current}/{total})":"正在执行 Setup({current}/{total})","Setup complete":"Setup 完成","View setup output":"查看 Setup 输出","Hide setup output":"收起 Setup 输出","Setup failed":"Setup 失败","More details":"更多详情","Hide details":"收起详情","Retry start":"重试启动 Agent","Workspace setup is running in the background.":"工作空间正在后台准备。","启动 Agent 失败":"启动 Agent 失败","重试启动 Agent":"重试启动 Agent","Create New Project":"创建新项目","Creating...":"创建中...","Checking...":"检查中...",Create:"创建","Create Project":"创建项目","Initialize Git repository?":"初始化 Git 仓库?","Initialize and Create":"初始化并创建","This directory is empty and does not have Git version control yet. Agent Tower can initialize Git and create the initial commit before creating the project.":"该目录为空且尚未启用 Git 版本管理。Agent Tower 可以先初始化 Git 并创建初始提交,然后再创建项目。","The selected directory is not a Git repository and is not empty. Initialize Git manually and make an initial commit, then create the project.":"所选目录不是 Git 仓库且不为空。请手动初始化 Git 并完成首次提交,然后再创建项目。","Selected path is not a valid directory":"所选路径不是有效目录","Could not check repository path":"无法检查仓库路径","Could not check project path":"无法检查项目路径","Project Name":"项目名称","e.g., Agent Tower":"例如:Agent Tower","Repository Path":"仓库路径","Create New Task":"创建新任务",Execution:"执行方式","Solo Agent":"Solo Agent",Project:"项目",Provider:"Provider",Agent:"Agent","Select project...":"选择项目...","Select provider...":"选择 Provider...","Task Title":"任务标题","e.g., Implement login flow":"例如:实现登录流程",Description:"描述","Optional...":"可选...","Optional description...":"可选描述...","Drop files here":"将文件拖到这里","Attach files":"添加文件","or paste files":"或粘贴文件","or paste/drag files":"或粘贴/拖拽文件","Drag to resize":"拖动以调整大小","Failed to create task":"创建任务失败","Failed to create project":"创建项目失败","Select a task from the sidebar to view logs, monitor execution, or interact with an agent.":"从侧边栏选择一个任务,以查看日志、监控执行过程,或与 Agent 交互。","Open in IDE":"在 IDE 中打开","Toggle Workspace":"切换工作区面板","More actions":"更多操作","No description":"暂无描述","Setup ({current}/{total}): {command}":"Setup({current}/{total}):{command}","Loading logs...":"正在加载日志...","Waiting for agent output...":"等待 Agent 输出...","No logs recorded for this session.":"当前会话暂无日志记录。","Scroll to bottom":"滚动到底部","Send failed. Please try again.":"发送失败,请重试","Drop files here...":"将文件拖到这里...","Continue conversation...":"继续对话...","Message Agent...":"给 Agent 发送消息...","Upload file":"上传文件","Uploading...":"上传中...",Send:"发送","Describe your task...":"描述你的任务...","Switch to TeamRun":"切换到 TeamRun","Switch to Solo Agent":"切换到单 Agent"," (unavailable)":"(不可用)","Manage Team Members":"管理团队成员","Add member":"添加成员","Save member":"保存成员","Edit member":"编辑成员","Remove member":"移除成员",Remove:"移除","Member added":"成员已添加","Member updated":"成员已更新","Member removed":"成员已移除","Failed to save member":"保存成员失败","Failed to remove member":"移除成员失败","Name, provider, and role prompt are required":"名称、Provider 和角色提示词不能为空","No active members":"暂无活跃成员","Add member from preset":"从预设添加成员","Choose a saved preset to add a ready-to-run member snapshot.":"选择已保存的预设,添加一个可直接工作的成员快照。","Custom member":"自定义成员",Custom:"自定义","Use preset":"使用预设",Preset:"预设","Select a member":"选择成员","Choose a member on the left to edit its future TeamRun configuration.":"从左侧选择成员,编辑其后续 TeamRun 配置。","Provider, role, workspace, and session changes apply to future work only.":"Provider、角色、工作区和会话变更只影响后续工作。","Create a one-off member snapshot for this TeamRun.":"为当前 TeamRun 创建一次性的成员快照。","Create a custom member for this TeamRun, or add presets from Team Collaboration Settings.":"可以为当前 TeamRun 创建自定义成员,或先在团队协作设置中添加预设。","Remove this member from future TeamRun work?":"将该成员从后续 TeamRun 工作中移除?",Name:"名称",Aliases:"别名",Avatar:"头像","Workspace policy":"工作区策略","Trigger policy":"触发策略","Session policy":"会话策略","Queue policy":"队列策略","Role prompt":"角色提示词",Capabilities:"能力","Comma separated":"用逗号分隔","No member presets":"暂无成员预设","...":"...","alice, a, reviewer":"alice, a, reviewer","Checking preview target...":"正在检查预览目标...","Configure a local preview target to display it here.":"配置本地预览目标后将在此显示。","Delete Project":"删除项目","Deleted projects are read-only":"已删除项目为只读","Deleting...":"删除中...","Enter a local preview URL on the Agent Tower machine.":"输入 Agent Tower 所在机器上的本地预览 URL。","Failed to delete project":"删除项目失败","Failed to load full message":"加载完整消息失败","Failed to restore project":"恢复项目失败","Failed to save preview target":"保存预览目标失败",Forward:"前进","Git Commit Message":"Git Commit Message",Loading:"加载中","Loopback only":"仅限本机回环地址","Mention members":"提及成员","Message the team room...":"向 Team Room 发送消息...","No active workspace.":"暂无活动工作区。","Open preview in new tab":"在新标签页打开预览","Preview target is not reachable":"预览目标不可访问","Preview target saved":"预览目标已保存","Preview address":"预览地址",Private:"私密",Proxying:"代理中","Read-only":"只读",Refresh:"刷新","Refresh preview":"刷新预览","Remove mention":"移除提及","Restore Project":"恢复项目","Restoring...":"恢复中...",Save:"保存","Save preview target":"保存预览目标","Start the preview server, then refresh.":"启动预览服务后刷新。","Stop loading":"停止加载","Team members":"团队成员","this project":"此项目","This project is read-only":"此项目为只读","10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果":"10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果",设计推荐:"设计推荐","首选:Charcoal Breathe (#10)":"首选:Charcoal Breathe (#10)","备选A:Tower Pulse (#1)":"备选A:Tower Pulse (#1)","备选B:Terminal Cursor (#4)":"备选B:Terminal Cursor (#4)","品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。":"品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。","品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。":"品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。","终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。":"终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。","全屏预览:{name}":"全屏预览:{name}",关闭预览:"关闭预览","按 Esc 或点击关闭按钮退出":"按 Esc 或点击关闭按钮退出","Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。":"Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。","五根柱状条交错升降,暗喻任务编排队列,节奏感强。":"五根柱状条交错升降,暗喻任务编排队列,节奏感强。","双层同心圆环反向旋转,精密工具质感,不浮夸。":"双层同心圆环反向旋转,精密工具质感,不浮夸。","终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。":"终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。","三点波浪脉动,极简克制,适合工具型产品的默认加载。":"三点波浪脉动,极简克制,适合工具型产品的默认加载。","三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。":"三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。","水平光束往复滑过进度条,线性进度隐喻,不阻断视线。":"水平光束往复滑过进度条,线性进度隐喻,不阻断视线。","三列骨架屏微闪,预示看板布局,减少布局跳变。":"三列骨架屏微闪,预示看板布局,减少布局跳变。","圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。":"圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。","Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。":"Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。",active:"活跃",working:"工作中"},en:{设置:"Settings",通用:"General",返回:"Back","加载中...":"Loading...",暂无选项:"No options","处理中...":"Processing...",确认:"Confirm",取消:"Cancel",工具调用:"Tool Calls",已处理:"Processed","已处理 {duration}":"Processed {duration}",正在思考:"Thinking","最后一次输出于 {duration}前":"Last output {duration} ago",等待首次输出:"Waiting for the first output","{count} 秒":"{count}s","{minutes} 分 {seconds} 秒":"{minutes}m {seconds}s","{hours} 小时 {minutes} 分":"{hours}h {minutes}m","失败 {count}":"Failed {count}",通用设置:"General Settings",显示语言:"Display Language","选择界面语言。设置会保存到本地 Agent Tower 数据库,并在重新打开后继续生效。":"Choose the interface language. The setting is saved to the local Agent Tower database and will still apply after restart.",简体中文:"Simplified Chinese",语言设置:"Language setting",语言设置保存失败:"Language setting could not be saved",Priority:"Priority","Task priority":"Task priority",紧急:"Urgent",普通:"Normal",优先级变更失败:"Failed to update task priority","Agent 配置":"Agent Settings",项目配置:"Project Settings",通知:"Notifications","MCP 配置":"MCP Config","复制下面的 JSON 到支持 MCP 的客户端配置中。桌面打包版使用 App 内置 runtime,不需要全局安装 agent-tower。":"Copy this JSON into an MCP-capable client config. The packaged desktop app uses the bundled runtime and does not require a global agent-tower install.",复制配置:"Copy Config","MCP 配置已复制":"MCP config copied","复制 MCP 配置失败":"Failed to copy MCP config","MCP 配置加载失败":"Failed to load MCP config","无需全局 CLI":"No global CLI needed","桌面打包 runtime":"Desktop packaged runtime","工作区 runtime":"Workspace runtime","当前版本只生成通用 MCP 配置,不会自动修改 Claude、Codex 或其他第三方客户端配置文件。":"This version only generates generic MCP config and does not modify Claude, Codex, or other third-party client config files automatically.","暂无项目,请先创建项目":"No projects yet. Create one first.",选择项目:"Select Project","选择项目...":"Select project...",自动复制文件:"Auto-copy Files","创建 worktree 时自动从主仓库复制的文件或目录。支持 glob 模式。":"Files or directories to copy from the main repository when creating a worktree. Glob patterns are supported.","适用于不在 git 管理中但启动必需的文件,如 .env、node_modules、数据库文件等":"Useful for required startup files that are not tracked by git, such as .env, node_modules, or database files.","Setup 脚本":"Setup Script","创建 worktree 后自动执行的命令,每行一条,按顺序执行。":"Commands to run automatically after creating the worktree, one per line in order.","命令在 worktree 目录下执行,单条命令超时 5 分钟,失败不会阻断后续命令":"Commands run inside the worktree directory. Each command times out after 5 minutes, and a failure does not block later commands.",常用命令:"Quick Commands","在终端中可快速执行的命令,不会自动运行。":"Commands that can be run quickly in the terminal. They are not executed automatically.","保存中...":"Saving...",保存:"Save",有未保存的更改:"You have unsaved changes",系统通知:"System Notifications",任务完成时弹出桌面通知:"Show a desktop notification when a task finishes.",第三方通知:"Third-party Notifications",选择一个第三方渠道接收通知:"Choose a third-party channel to receive notifications.",无:"None",飞书:"Feishu",测试发送:"Send Test",发送成功:"Sent successfully",发送失败:"Send failed","跳转地址(用于生成任务链接)":"Base URL (used to generate task links)",'通知卡片中的"查看任务"按钮将跳转到 {path}':'The "View Task" button in the notification card will open {path}',通知模板:"Notification Templates","支持变量: {taskTitle}, {taskId}, {projectId}, {projectName}, {status}":"Supported variables: {taskTitle}, {taskId}, {projectId}, {projectName}, {status}",标题模板:"Title Template",内容模板:"Body Template",'✅ "{taskTitle}" 已完成,等待审查':'✅ "{taskTitle}" is complete and ready for review',保存所有更改:"Save All Changes","启动失败: {message}":"Start failed: {message}",未知错误:"Unknown error",会话已停止:"Session stopped","Agent 交互演示":"Agent Interaction Demo","选择 Agent":"Select Agent","输入你的问题或任务...":"Enter your question or task...","启动中...":"Starting...",开始:"Start",对话:"Conversation",已连接:"Connected","连接中...":"Connecting...",未连接:"Disconnected",停止:"Stop","选择 Agent 并输入问题开始对话":"Select an agent and enter a prompt to start chatting.",你:"You","发送后续消息...":"Send a follow-up message...",发送:"Send",新会话:"New Session",未选择:"Not selected",连接:"Connection","Profiles 设置":"Profile Settings","配置变体 (Profile Variant)":"Profile Variant",输入任务:"Task Input","等待 Agent 响应...":"Waiting for agent output...","发送消息给 Agent...":"Send a message to the agent...","启动失败,请重试":"Failed to start. Please try again.",启动:"Start","创建工作空间...":"Creating workspace...","创建会话...":"Creating session...","启动 Agent...":"Starting agent...","启动 Agent":"Start Agent","选择 Provider":"Select Provider"," (不可用)":" (Unavailable)",任务描述:"Task Description","描述你想让 Agent 完成的任务...":"Describe the task you want the agent to complete...","输入文件路径...":"Enter a file path...",添加:"Add",添加此目录:"Add this directory",名称:"Name",命令:"Command",切换渠道:"Switch Provider","(默认)":"(Default)","留空为 auto;或直接输入模型 ID(与 cursor-agent --model 一致)":"Leave empty for auto, or enter a model ID directly (same as cursor-agent --model).","正在加载 cursor-agent 模型列表…":"Loading cursor-agent model list...",收起列表:"Collapse List","从本机 cursor-agent 选择({count} 个)":"Choose from local cursor-agent ({count})","筛选模型…":"Filter models...","默认 (auto)":"Default (auto)",无匹配项:"No matches",请求失败:"Request failed","无法从本机加载模型列表({error})。仍可手动输入;或在安装 cursor-agent 的机器上运行":"Could not load models from the local machine ({error}). You can still enter one manually, or run","查看 ID。":"to inspect available IDs.","Windows 将下载并执行官方 PowerShell 安装脚本;不会使用复制粘贴式 shell pipeline。":"Windows will download and run the official PowerShell installer script; no copy-paste shell pipeline is used.","安装器可能已完成,但当前 Agent Tower 进程尚未刷新 PATH;请重启 Agent Tower 后重新检测。":"The installer may have completed, but the current Agent Tower process has not refreshed PATH. Restart Agent Tower and detect again.","JSON 格式错误":"Invalid JSON format","删除 Profile Variant":"Delete Profile Variant","确定删除 {agentType} / {variant}?":"Delete {agentType} / {variant}?",新增:"New",内置:"Built-in","新增 Variant — {agentType}":"New Variant — {agentType}","编辑 {variant}":"Edit {variant}","Variant 名称":"Variant Name","例如: CUSTOM":"e.g. CUSTOM","配置 (JSON)":"Configuration (JSON)","状态变更失败,该操作不被允许":"Status change failed. This action is not allowed.","Git 操作":"Git Operations",删除任务:"Delete Task","Setup 完成":"Setup complete","Setup 失败: {error}":"Setup failed: {error}","尚未启动 Agent":"No agent started yet","选择一个 Agent 来执行此任务":"Choose an agent to execute this task.","选择一个 Agent 来执行此任务,Agent 将自动创建工作空间并开始工作。":"Choose an agent to execute this task. The agent will create a workspace automatically and start working.",回到底部:"Back to Bottom","代码已合并,以上为历史沟通记录":"The code has been merged. The conversation above is historical.","启动新 Agent":"Start New Agent","确认删除任务「{title}」?此操作不可撤销。":'Delete task "{title}"? This action cannot be undone.',删除:"Delete","正在运行的 Agent 将被停止":"The running agent will be stopped.",分支上未合并的变更将丢失:"Unmerged changes on the branch will be lost.","关联的工作目录(worktree)将被清理":"The associated worktree directory will be cleaned up.","{opLabel} 冲突 — {count} 个文件":"{opLabel} conflicts — {count} files",中止操作:"Abort Operation",解决冲突:"Resolve Conflicts","解决 {opLabel} 冲突":"Resolve {opLabel} Conflicts","在 IDE 中打开":"Open in IDE","发送中...":"Sending...","AI 辅助解决":"Resolve with AI","冲突文件({count})":"Conflicted Files ({count})","选择 Session(AI 辅助解决)":"Choose Session (Resolve with AI)","选择一个 Session...":"Select a session...","没有可用的 Session,请在 IDE 中手动解决冲突。":"No session is available. Please resolve the conflicts manually in your IDE.","TeamRun 模式下会把处理冲突请求发送到 Team Room,由团队调度处理。":"In TeamRun mode, the conflict request will be sent to Team Room for team scheduling.","已发送到 Team Room":"Sent to Team Room",快捷命令:"Quick Commands",待办:"Todos","上下文: {used} / {max} tokens":"Context: {used} / {max} tokens","已使用: {used} tokens":"Used: {used} tokens",可用:"Available",不可用:"Unavailable",该类型暂无运行配置:"No runtime configuration is available for this type.","追加 Prompt":"Append Prompt","追加到每次 prompt 末尾的文本":"Text appended to the end of every prompt.",跳过权限确认:"Skip Permission Confirmation","自动批准操作(YOLO)":"Auto-approve Actions (YOLO)",模型:"Model",推理强度:"Reasoning Effort",强制执行:"Force Execution",跳过所有确认和沙盒:"Skip All Confirmations and Sandbox","Fast 模式":"Fast mode","支持的模型速度约提升至 1.5 倍,并增加用量消耗。ChatGPT 登录消耗更多额度;API Key 按 Priority 处理计费。":"Supported models run about 1.5x faster with increased usage. ChatGPT sign-in consumes more credits; API keys use Priority processing rates.","Fast 模式字段必须为 true 或 false,请在运行配置 JSON 中修正。":"The Fast mode field must be true or false. Fix it in the runtime configuration JSON.","跟随 Codex":"Use Codex default",标准速度:"Standard speed",Profile:"Profile","~/.codex/config.toml 中的 profile 名称":"Profile name in ~/.codex/config.toml",是:"Yes",否:"No",覆盖:"Overwrite",跳过:"Skip","JSON 语法错误":"Invalid JSON syntax","TOML 语法错误: {message}":"Invalid TOML syntax: {message}","编辑 Provider":"Edit Provider","新建 Provider":"New Provider","例如: Claude Code (官方)":"e.g. Claude Code (Official)","Agent 类型":"Agent Type","选择 Agent 类型":"Select Agent Type","Codex (ACP)":"Codex (ACP)","设为该类型的默认 Provider":"Set as the default provider for this agent type",基本配置:"Basic Configuration","API 地址":"API URL","请输入以 http:// 或 https:// 开头的完整 API 地址":"Enter a complete API URL beginning with http:// or https://.","输入 API Key":"Enter API Key",未配置:"Not configured",由高级配置管理:"Managed in advanced configuration",替换:"Replace",取消替换:"Cancel replacement","确定清除此 API Key?":"Clear this API key?",思考强度:"Reasoning Effort","跟随 CLI":"Use CLI default",更高效:"More efficient",更智能:"More capable",当前:"Current",最低:"Minimal",低:"Low",中:"Medium",高:"High",超高:"Extra high",最高:"Maximum","请选择当前 Agent 支持的思考强度档位":"Choose a reasoning effort supported by this agent.",测试配置:"Test Configuration","测试中...":"Testing...","保存 Provider":"Save Provider",高级配置:"Advanced Configuration",执行权限:"Execution Permission","禁用 WebSocket":"Disable WebSocket","仅禁用 Codex Responses API 的 WebSocket 传输;新启动和后续继续的请求将使用 HTTP。":"Disable only the Codex Responses API WebSocket transport. New sessions and follow-ups will use HTTP.","当前原生 Provider 已使用非 WebSocket 传输;此开关不会添加额外运行时覆盖。":"The current native provider already uses a non-WebSocket transport. This switch adds no runtime override.","禁用 WebSocket 字段必须为 true 或 false,请在运行配置 JSON 中修正。":"The Disable WebSocket field must be true or false. Correct it in the runtime JSON.",高风险执行已开启:"High-risk execution enabled","Agent 将不再请求工具执行权限确认。":"The agent will no longer ask for tool execution permission.","Agent 将自动批准操作,不再逐项请求确认。":"The agent will approve operations automatically without asking for each action.","Agent 将以强制模式执行操作。":"The agent will execute operations in force mode.","Agent 将拥有完全访问电脑的权限":"The agent will have full access to this computer.","执行权限字段必须为 true 或 false,请在运行配置 JSON 中修正。":"The execution permission field must be true or false. Correct it in the runtime JSON.","开启高风险执行权限?":"Enable high-risk execution permission?",确认开启:"Enable","配置错误:权限字段必须为布尔值":"Configuration error: the permission field must be a boolean.",配置错误:"Configuration error",权限已开启:"Enabled",权限已关闭:"Disabled","运行配置 (JSON)":"Runtime Configuration (JSON)",配置检查通过:"Configuration check passed",连接测试通过:"Connection test passed",本机可用性检查通过:"Local availability check passed",配置检查未通过:"Configuration check did not pass",测试对象:"Test target",测试时间:"Tested at",需要解决配置冲突:"Configuration conflicts must be resolved",简化字段与高级配置值不同:"The simplified and advanced values differ",采用简化值:"Use simplified value",保留高级值:"Keep advanced value","测试失败不会阻止保存。":"A failed test does not prevent saving.",测试配置失败:"Configuration test failed","存在未保存的修改,确定放弃吗?":"Discard the unsaved changes?","切换 Agent 类型会清空当前类型的配置,是否继续?":"Changing the agent type clears the current type-specific configuration. Continue?","JSON 顶层必须是对象":"The top-level JSON value must be an object.","{format} 语法错误: {message}":"Invalid {format} syntax: {message}","已配置,输入新值以替换":"Configured. Enter a new value to replace it.",权限策略:"Permission Policy",每次询问:"Ask Every Time",无限制:"Unrestricted","ACP 权限策略必须为 ASK 或 UNRESTRICTED":"ACP permission policy must be ASK or UNRESTRICTED",运行配置:"Runtime Configuration",环境变量:"Environment Variables","注入到 Agent 进程的环境变量。Codex 的":"Environment variables injected into the agent process. Codex","指定的是变量名,实际值需在此处设置。":"specifies the variable name in env_key, and the actual value must be set here.","变量名,如 AZURE_OPENAI_API_KEY":"Variable name, e.g. AZURE_OPENAI_API_KEY",值:"Value",添加变量:"Add Variable","CLI 原生配置 (config.toml)":"Native CLI Config (config.toml)","CLI 原生配置 (settings.json)":"Native CLI Config (settings.json)","Agent 原生配置 (config.toml)":"Native Agent Config (config.toml)","Agent 原生配置 (settings.json)":"Native Agent Config (settings.json)","直接填写 Codex":"Enter a Codex","格式的配置片段,由当前 Runtime 注入。不会修改你的":"configuration snippet. The selected runtime injects it without modifying your","格式的配置片段,通过":"configuration snippet directly and inject it via","参数注入。不会修改你的":". It will not modify your","文件。":"file.","对应 Claude Code 的":"This corresponds to Claude Code","由当前 Runtime 注入。在":". The selected runtime injects it. Configure",通过:"and is injected through","参数注入。在":". Configure","中设置 ANTHROPIC_API_KEY、ANTHROPIC_BASE_URL 等。":"inside env, such as ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL.","导出 Provider 备份":"Export Provider Backup","导出中...":"Exporting...",导出备份:"Export Backup","导出的备份文件将包含完整的 Provider 配置,包括环境变量、CLI settings 等敏感信息。任何拿到文件的人都可能直接使用这些 Provider。":"The exported backup file contains the full provider configuration, including sensitive information such as environment variables and CLI settings. Anyone with this file may be able to use those providers directly.","这个功能用于备份和迁移,不用于分享配置。":"This feature is for backup and migration, not for sharing configuration.","导出内容只包含用户层配置:自定义 Provider,以及对内置 Provider 的覆盖。":"The export only contains user-level configuration: custom providers and overrides of built-in providers.","我已知晓该备份文件包含敏感信息,只会保存在安全位置。":"I understand that this backup contains sensitive information and will only store it in a secure location.","导入 Provider 备份":"Import Provider Backup","导入中...":"Importing...","确认导入 {count} 项":"Import {count} item(s)","导出时间:{value}":"Exported at: {value}","模式:完整备份(含敏感信息)":"Mode: Full backup (contains sensitive data)","文件内 Provider 数量:{count}":"Providers in file: {count}","将覆盖当前已有的 Provider:{name}":"This will overwrite the existing provider: {name}","当前同 ID Provider 配置一致,本次不会重复写入。":"The provider with the same ID is already identical. It will not be written again.","当前不存在同 ID Provider,将直接新增。":"No provider with the same ID exists. It will be created directly.","系统内置 Provider 不可删除":"Built-in providers cannot be deleted.","已恢复默认 Provider 配置":"Default provider configuration restored.","Provider 已删除":"Provider deleted.","删除 Provider 失败":"Failed to delete provider.","Provider 备份已导出":"Provider backup exported.","导出 Provider 备份失败":"Failed to export provider backup.","备份文件不是有效的 JSON":"The backup file is not valid JSON.",导入预览失败:"Failed to preview import.","导入完成,当前配置无需变更":"Import complete. No changes were needed.","导入完成:新增 {create},覆盖 {overwrite},跳过 {skip}":"Import complete: created {create}, overwritten {overwrite}, skipped {skip}","导入 Provider 备份失败":"Failed to import provider backup.","Provider 配置":"Provider Configuration","管理 AI Agent 的连接配置和运行参数":"Manage AI agent connection settings and runtime parameters.",导入备份:"Import Backup","暂无 Provider 配置":"No providers configured yet.",默认:"Default","CLI 配置:":"CLI Config:",已配置:"Configured","环境变量:":"Environment Variables:",编辑:"Edit",编辑标题:"Edit title",输入任务标题:"Enter task title",字符:"characters",删除自定义覆盖并恢复默认:"Delete custom override and restore default","恢复默认 Provider":"Restore Default Provider",'确定删除 "{name}" 的自定义覆盖,并恢复系统默认配置?':'Delete the custom override for "{name}" and restore the system default configuration?','确定删除 "{name}"?此操作不可撤销。':'Delete "{name}"? This action cannot be undone.',恢复默认:"Restore Default","{count} 个未提交变更":"{count} uncommitted changes","{count} 个冲突文件":"{count} conflicted files",变基进行中:"Rebase in progress",合并进行中:"Merge in progress","领先 {count} 个提交":"{count} commits ahead","落后 {count} 个提交":"{count} commits behind",已是最新:"Up to date","工作区有未提交的变更,请先让 Agent 提交或手动处理后再执行 Rebase / Merge 操作。":"The workspace has uncommitted changes. Ask the agent to commit them or handle them manually before running Rebase / Merge.",变基失败:"Rebase failed",合并失败:"Merge failed",确认合并:"Confirm Merge","加载分支状态...":"Loading branch status...","变基中...":"Rebasing...","变基 (Rebase)":"Rebase","将当前分支变基到最新的 {targetBranch}":"Rebase the current branch onto the latest {targetBranch}","合并 (Merge)":"Merge","合并中...":"Merging...","Squash merge 到 {targetBranch}":"Squash merge into {targetBranch}",提交消息:"Commit Message","输入提交消息...":"Enter commit message...",留空将使用默认消息:"Leave blank to use the default message.","Git Commit Message":"Git Commit Message","配置自动生成 commit message 时使用的 Agent 渠道和提示词。":"Configure the agent provider and prompt used for auto-generating commit messages.",访问安全:"Access Security",访问密码:"Access Password","开启后,进入 Agent Tower 需要输入密码。":"When enabled, Agent Tower requires this password before opening.",未启用:"Off",已启用:"On",将启用:"Will turn on",将关闭:"Will turn off",修改密码:"Change password",退出登录:"Log out","退出中...":"Logging out...",退出登录失败:"Failed to log out",已退出登录:"Logged out",当前密码:"Current password",新密码:"New password",确认密码:"Confirm password",请输入当前密码:"Enter the current password","密码至少需要 8 个字符":"Password must be at least 8 characters",两次输入不一致:"Passwords do not match",当前密码不正确:"Current password is incorrect","关闭后不再要求访问密码。":"After turning it off, Agent Tower will no longer require an access password.","保存后其他已登录页面需要重新输入。":"After saving, other signed-in pages will need to enter the password again.",关闭访问密码:"Turn off access password",已关闭:"Turned off","密码不正确,请重试":"Incorrect password. Please try again.",输入访问密码继续:"Enter the access password to continue","验证中...":"Verifying...",解锁:"Unlock","访问状态加载失败,请刷新后重试。":"Failed to load access status. Refresh and try again.","Agent 渠道":"Agent Provider",跟随任务:"Follow Task",'"跟随任务"表示使用当前任务所用的 Agent 渠道。选择具体渠道可使用更经济的模型。':'"Follow Task" uses the same provider as the current task. Select a specific provider to use a more cost-effective model.',提示词模板:"Prompt Template","自定义生成 commit message 的提示词。留空则使用内置默认模板。":"Custom prompt for generating commit messages. Leave empty to use the built-in default template.",保存失败:"Save failed",已保存:"Saved",已创建:"Created",创建:"Create",单人:"Solo",团队:"Team",团队协作:"Team Collaboration",团队协作设置:"Team Collaboration Settings","管理成员预设与团队模板。":"Manage member presets and team templates.",成员预设:"Member Presets",团队模板:"Team Templates","点击列表项可编辑。":"Click an item to edit it.",当前没有成员预设:"No member presets yet.",当前没有团队模板:"No team templates yet.",创建新成员预设:"Create a new member preset",编辑成员预设:"Edit member preset",创建新团队模板:"Create a new team template",编辑团队模板:"Edit team template",成员预设名称:"Member preset name",成员预设别名:"Member preset aliases",成员预设头像:"Member preset avatar",成员预设角色提示词:"Member preset role prompt",团队模板名称:"Team template name",别名:"Aliases",头像:"Avatar",角色提示词:"Role Prompt",可用能力:"Capabilities",工作区策略:"Workspace Policy",触发策略:"Trigger Policy",共享:"Shared",独占:"Dedicated",仅提及:"Mention only",所有用户消息:"All user messages",读房间:"Read room",发房间消息:"Post room message",提及成员:"Mention members",停止成员工作:"Stop member work",标记可审查:"Mark ready for review",读文件:"Read files",写文件:"Write files",运行命令:"Run commands","读 diff":"Read diff",合并工作区:"Merge workspace","{count} 个成员":"{count} member(s)","Provider 列表加载失败":"Failed to load providers","Provider 列表加载失败,无法创建或修改成员预设。":"Failed to load providers. Member presets cannot be created or updated.",成员预设加载失败:"Failed to load member presets",团队模板加载失败:"Failed to load team templates","请稍后重试。":"Please try again later.",重试:"Retry","暂无可用 Provider,请先在 Agent 配置中创建。":"No available provider. Create one in Agent Settings first.","alice, a, reviewer":"alice, a, reviewer","选择顺序即保存顺序。":"Selection order is the saved order.",已选成员:"Selected Members","上移下移后即为保存顺序。":"Use up/down to change the saved order.",尚未选择成员预设:"No member presets selected yet.","先创建成员预设,再配置团队模板。":"Create member presets first, then configure a team template.",删除失败:"Delete failed",上移:"Move up",下移:"Move down","创建 TeamRun":"Create TeamRun",TeamRun:"TeamRun",模式:"Mode",执行模式:"Execution mode","TeamRun 模式":"TeamRun mode",确认模式:"Confirm mode",自动模式:"Auto mode","默认使用自动模式,团队消息会直接排队执行。":"Auto mode is the default. Team messages are queued for execution directly.","模板成员会先加入,随后按顺序追加所选成员。":"Template members are added first, then the selected members are appended in order.","请选择至少一个团队模板或成员预设。":"Select at least one team template or member preset.","该任务已经存在 TeamRun。请刷新后再试。":"This task already has a TeamRun. Refresh and try again.","创建 TeamRun 失败":"Failed to create TeamRun","TeamRun 创建失败,请检查团队配置后重试":"TeamRun creation failed. Please check team config and retry.","前往 /settings/team 创建":"Go to /settings/team to create one","欢迎使用 Agent Tower":"Welcome to Agent Tower","需要我帮你做点什么?":"What can I help you with?","描述任务,选择 Agent 或团队,即刻开始":"Describe a task, pick an Agent or team, and start right away","描述一个任务,AI Agent 将为你开始工作":"Describe a task and an AI agent will start working on it.","TeamRun 协作配置":"TeamRun Configuration",团队协作配置:"Team Collaboration Config","切换回单 Agent":"Switch to Solo Agent",追加成员:"Additional Members","{count} 个追加成员":"{count} additional member(s)",去创建:"Create",请选择团队模板或追加成员:"Select a team template or add members","工作树隔离改动,支持 TeamRun、Merge、Rebase 和冲突解决。":"Worktrees isolate changes and support TeamRun, Merge, Rebase, and conflict resolution.","初始化 Git 后可使用工作树模式。":"Initialize Git to use worktree mode.","本地模式会直接修改项目主目录,不会自动提交,也不能使用 Merge、Rebase 或冲突解决。":"Main directory mode modifies the project directory directly. Auto-commit, Merge, Rebase, and conflict resolution are unavailable.","非 Git 项目只能使用本地模式。":"Non-Git projects can only use main directory mode.","TeamRun 需要工作树模式。开启团队模式时会自动切换为工作树模式。":"TeamRun requires worktree mode. Enabling team mode will switch to worktree mode automatically.","启用 TeamRun 后可选择团队模板或成员。":"After enabling TeamRun, choose a team template or members.",收起:"Collapse","没有可用项目,请先创建或恢复项目":"No available projects. Please create or restore a project first.","任务已创建,但启动 Agent 失败,可在详情中重试":"Task created, but failed to start Agent. You can retry from the task detail.",冲突:"Conflict",变基中:"Rebasing",合并中:"Merging","{count} 未提交":"{count} uncommitted","落后 {count}":"Behind {count}",可合并:"Mergeable",查看变更详情:"View changes","分支落后 {count} 个提交,建议先执行变基 (Rebase) 同步最新代码。":"The branch is {count} commits behind. Consider rebasing to sync the latest code.","合并到 {target}":"Merge into {target}",需要先变基同步最新代码:"Rebase required to sync latest code",请先处理未提交变更:"Handle uncommitted changes first","中止中...":"Aborting...","正在检查工作区状态...":"Checking workspace status...",当前分支还没有任何变更:"No changes on this branch yet",调整工作区宽度:"Resize workspace panel","{files} 个文件 · {lines} 行":"{files} files · {lines} lines",更新:"Update",合并:"Merge","{count} 个本地改动未处理,需要先整理后再继续":"{count} local changes pending — clean them up before continuing","{count} 个文件存在冲突,需要处理后继续":"{count} files have conflicts — resolve them to continue","正在同步源分支更新...":"Syncing updates from source branch...","正在提交变更...":"Submitting changes...","源分支 {branch} 有 {count} 个更新":"Source branch {branch} has {count} updates","{count} 个文件变更,可以安全提交":"{count} file changes, safe to submit",同步更新:"Sync updates","正在同步...":"Syncing...",提交变更:"Submit changes",需要先同步源分支更新:"Sync source branch updates first","更新失败,请稍后重试":"Update failed. Please try again later.","提交失败,请稍后重试":"Submit failed. Please try again later.","正在提交...":"Submitting...",确认提交:"Confirm Submit","正在检查后台服务...":"Checking services...","无法检查后台服务状态,提交时会再次确认。":"Background service status could not be checked. The server will verify it when submitting.","合并前将停止 {count} 个后台服务":"{count} background services will be stopped before merging","停止后不会自动恢复。":"They will not restart automatically after being stopped.",停止服务并提交:"Stop Services and Submit","正在停止服务并提交...":"Stopping and submitting...","后台服务仍在运行,请确认停止服务后再提交。":"Background services are still running. Confirm that they should be stopped before submitting.",请描述本次修改的内容:"Describe the changes in this submission","建议以 feat、fix、docs、refactor、chore 开头,保持提交记录清晰。feat 新增功能,fix 修复问题,docs 文档更新,refactor 代码重构,chore 日常维护。":"Start with feat (new feature), fix (bug fix), docs (documentation), refactor (restructure), or chore (maintenance) to keep the history clean.",需要先处理本地改动:"Handle local changes first",处理冲突:"Resolve conflicts","正在撤销...":"Undoing...",撤销操作:"Undo operation",确认后会停止当前工作并取消队列:"Confirming will stop the current work and clear the queue",每次新会话:"New session per request",复用上次会话:"Resume last session",仅自己队列:"Own queue only",全队列待处理:"Team pending queue",代码审查:"Review","{count} 个文件":"{count} files",未选择工作区:"No workspace selected",没有可显示的差异内容:"No diff content available","还有 {count} 行变更被折叠,点击展开全部":"{count} more lines collapsed — click to expand all","正在加载差异...":"Loading diff...",差异加载失败:"Failed to load diff",变更加载失败:"Failed to load changes",没有匹配筛选条件的文件:"No files match the filter",该提交没有文件变更:"No file changes in this commit",没有待审查的变更:"No changes to review",未提交:"Uncommitted",已提交:"Committed","筛选文件...":"Filter files...",无匹配文件:"No matching files",暂无变更文件:"No changed files",提交记录:"Commits",全部变更:"All changes","正在加载提交记录...":"Loading commits...",暂无提交记录:"No commits yet",加载更多提交:"Load more commits","{count} 个成员预设":"{count} member preset(s)","{count} 个团队模板":"{count} team template(s)",本地模式:"Main directory mode",编辑模板:"Edit template",编辑预设:"Edit preset",标题:"Title",测试:"Test",测试消息发送成功:"Test message sent successfully",触发:"Trigger","创建 Provider 失败":"Failed to create provider","创建 worktree 后自动执行的命令,每行一条。在 worktree 目录下执行,单条超时 5 分钟。":"Commands to run automatically after creating a worktree, one per line. Commands run inside the worktree directory and time out after 5 minutes each.","创建 worktree 时自动从主仓库复制的文件或目录,适用于 .env、node_modules 等不在 git 管理中的文件。支持 glob。":"Files or directories to copy from the main repository when creating a worktree, such as .env or node_modules files not tracked by git. Glob patterns are supported.",创建新模板:"Create new template",创建新预设:"Create new preset",当前没有可配置的项目:"No configurable projects yet",导出:"Export",导入:"Import",队列:"Queue","发送失败,请检查 Webhook 地址":"Failed to send. Check the webhook URL.","发送失败: {message}":"Send failed: {message}",返回列表:"Back to list","飞书 Webhook":"Feishu Webhook",'该 Provider 未配置额外参数。点击"编辑"添加运行配置、环境变量或 CLI 配置。':'This provider has no extra parameters configured. Click "Edit" to add runtime configuration, environment variables, or CLI configuration.','该 Provider 未配置额外参数。点击"编辑"添加运行配置、环境变量或 Agent 原生配置。':'This provider has no extra parameters configured. Click "Edit" to add runtime configuration, environment variables, or native agent configuration.',个变体:"variants",个文件:"files","更新 Provider 失败":"Failed to update provider",工作区:"Workspace",工作树模式:"Worktree mode","勾选后会连项目文件一起删除,请谨慎选择。":"When checked, project files will also be deleted. Choose carefully.","勾选后会删除 repoPath 指向的本地仓库目录,并禁用代码/Git 相关能力。":"When checked, the local repository directory pointed to by repoPath will be deleted, and code/Git capabilities will be disabled.","勾选后会删除项目路径指向的本地目录,并禁用代码/Git 相关能力。":"When checked, the local directory at the project path will be deleted, and code/Git capabilities will be disabled.",关闭:"Off","管理 Agent 执行器的配置变体。每个变体定义一组运行参数。":"Manage configuration variants for agent executors. Each variant defines a set of runtime parameters.","合并到 {targetBranch}":"Merge into {targetBranch}","恢复该项目时需要重新绑定一个有效的 Git 仓库路径。":"Restoring this project requires rebinding a valid Git repository path.","恢复该项目时需要重新绑定一个有效的项目路径。":"Restoring this project requires rebinding a valid project path.","恢复后,项目会重新出现在默认项目列表中。":"After restore, the project will appear in the default project list again.",恢复项目:"Restore project",会话:"Session",加载失败:"Failed to load","将归档当前工作区并自动在新 Worktree 中重新启动 Agent,旧工作区内容保留供参考。":"The current workspace will be archived and the agent will restart automatically in a new worktree. The old workspace content is kept for reference.","界面语言会保存到本地数据库,重启后继续生效。":"The interface language is saved to the local database and remains active after restart.","仅支持 PNG、JPG、WebP 头像。":"Only PNG, JPG, and WebP avatars are supported.",可用预设:"Available presets",模板名称:"Template name","成员心跳检测时间(分钟)":"Member heartbeat timeout (minutes)",内容:"Content",能力:"capabilities","启动 Agent 失败":"Failed to start Agent",启用团队模式:"Enable team mode",清除:"Clear",确认重试:"Confirm retry",人:" members",任务完成时弹出系统通知:"Show a system notification when a task finishes.","删除 Provider":"Delete Provider",删除任务失败:"Failed to delete task",删除项目:"Delete project",上传:"Upload",尚未选择:"Nothing selected yet",跳转地址:"Link target",'通知卡片中的"查看任务"按钮跳转地址前缀':'URL prefix for the "View Task" button in notification cards',通知设置:"Notification Settings",同时删除本地项目文件:"Also delete local project files",头像上传失败:"Avatar upload failed","头像图片不能超过 2MB。":"Avatar image must be 2 MB or smaller.",头像已上传:"Avatar uploaded",团队模式:"Team mode","推送到外部渠道(飞书群机器人等)":"Push to external channels such as Feishu bot webhooks.",我已确认这会删除本地项目文件:"I understand this will delete local project files",先创建成员预设:"Create member presets first","项目「{title}」的本地仓库文件已删除。恢复前需要重新绑定一个有效的 Git 仓库路径。":'Local repository files for project "{title}" have been deleted. Rebind a valid Git repository path before restoring it.',"项目「{title}」的本地项目文件已删除。恢复前需要重新绑定一个有效的项目路径。":'Local project files for project "{title}" have been deleted. Rebind a valid project path before restoring it.',"项目「{title}」将从默认项目列表隐藏,但历史任务、workspace 和会话记录仍会保留。":'Project "{title}" will be hidden from the default project list, but historical tasks, workspaces, and sessions will be kept.',"项目将从默认列表隐藏,历史记录保留。可选同时删除本地文件。":"The project will be hidden from the default list while history is kept. You can also delete local files.",项目为只读历史:"Project is read-only history",项目已恢复:"Project restored",项目已删除:"Project deleted","项目已删除,本地仓库文件也已清理。恢复项目并重新绑定仓库后才能继续操作。":"The project was deleted and local repository files were removed. Restore the project and rebind a repository before continuing.","项目已删除,并清理了本地文件":"Project deleted and local files removed","项目已删除。恢复项目后才能继续创建会话或修改任务。":"The project was deleted. Restore it before creating sessions or editing tasks.","项目已删除。Workspace 以只读模式展示历史内容。":"The project was deleted. The workspace shows historical content in read-only mode.","项目已删除且本地仓库文件已清理。这里只保留历史视图。":"The project was deleted and local repository files were removed. Only the historical view remains here.",新建:"New",新建配置:"New configuration",新增模板:"New template",新增预设:"New preset",选择:"Select","选择 {name} 头像":"Select {name} avatar","选择...":"Select...","选择一个 Provider 查看详情":"Select a provider to view details",选择一个项目查看配置:"Select a project to view configuration",选择预设头像:"Select preset avatar",已删除:"Deleted",源码已删除:"Source deleted","暂无 Agent 配置":"No agent configuration yet","暂无 Profile 配置":"No profile configuration yet",暂无变体:"No variants yet",暂无成员预设:"No member presets yet",暂无团队模板:"No team templates yet","重试启动 Agent":"Retry starting Agent",重新开始:"Restart",重新开始任务:"Restart task",追加独立成员:"Add standalone members",桌面通知:"Desktop notifications","Agent 将直接修改项目主目录;不会自动提交,也不能使用 Merge、Rebase 或冲突解决流程。":"The agent will modify the project main directory directly. Auto-commit, Merge, Rebase, and conflict resolution flows are unavailable.","Agent Tower 会尽量校验仓库 identity;如果 remote URL 或目录名不同,会给出警告但允许继续。":"Agent Tower will try to verify repository identity. If the remote URL or directory name differs, it will show a warning but still allow restore.","Agent Tower 会尽量校验项目 identity;如果 remote URL 或目录名不同,会给出警告但允许继续。":"Agent Tower will try to verify project identity. If the remote URL or directory name differs, it will show a warning but still allow restore.","CLI 配置":"CLI Config","Agent 原生配置":"Native Agent Config","Profile 配置":"Profile Configuration","Provider 列表加载失败。":"Failed to load provider list.","10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果":"10 first-screen loading animation candidates. Colors follow the Agent Tower design system. Click a card to view it fullscreen.",设计推荐:"Design recommendation","首选:Charcoal Breathe (#10)":"Top choice: Charcoal Breathe (#10)","备选A:Tower Pulse (#1)":"Alternative A: Tower Pulse (#1)","备选B:Terminal Cursor (#4)":"Alternative B: Terminal Cursor (#4)","品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。":"Strongest brand presence: a breathing Charcoal block with the Tower icon, making the product brand the first impression.","品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。":"The brand icon appears directly with a steady pulse. It stays restrained and fits a workspace product.","终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。":"A blinking terminal cursor matches the core agent and terminal collaboration flow and feels familiar to developers.","全屏预览:{name}":"Fullscreen preview: {name}",关闭预览:"Close preview","按 Esc 或点击关闭按钮退出":"Press Esc or click the close button to exit","Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。":'Agent Tower brand icon with a pulsing dot, conveying a branded "system is getting ready" state.',"五根柱状条交错升降,暗喻任务编排队列,节奏感强。":"Five bars rise in sequence, suggesting an orchestration queue with a strong rhythm.","双层同心圆环反向旋转,精密工具质感,不浮夸。":"Two concentric rings rotate in opposite directions for a precise tool feel without excess.","终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。":"A terminal-style cursor blink that directly echoes Agent Tower terminal collaboration.","三点波浪脉动,极简克制,适合工具型产品的默认加载。":"A minimal three-dot wave, restrained enough for a default loading state in a tool product.","三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。":"Three cards float subtly, suggesting stacked kanban pages and task management.","水平光束往复滑过进度条,线性进度隐喻,不阻断视线。":"A horizontal beam sweeps across a progress bar, implying linear progress without distraction.","三列骨架屏微闪,预示看板布局,减少布局跳变。":"Three shimmering skeleton columns preview the kanban layout and reduce layout shift.","圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。":"A ring progress arc and breathing center diamond combine progress feedback with a brand mark.","Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。":"A breathing Charcoal rounded block with the Tower icon embedded, giving the strongest brand presence.","正在加载...":"Loading..."}},xv=S.createContext(null),Sv="agent-tower.locale";function wv(n){return n?n==="en"?"en":n==="zh-CN"?"zh-CN":null:null}function yT(){if(typeof window>"u")return null;try{return wv(window.localStorage.getItem(Sv))}catch{return null}}function vT(n){if(!(typeof window>"u"))try{window.localStorage.setItem(Sv,n)}catch{}}function bT(){return typeof navigator>"u"||navigator.language.toLowerCase().startsWith("zh")?"zh-CN":"en"}function Ev(){return yT()??bT()}function xT(n,a){if(!a)return n;let i=n;for(const[l,c]of Object.entries(a))i=i.replaceAll(`{${l}}`,String(c??""));return i}let Md=Ev();function Tv(n,a,i){const l=gT[n]?.[a]??a;return xT(l,i)}function aa(n,a){return Tv(Md,n,a)}function ST({children:n}){const a=S.useRef(Ev()),[i,l]=S.useState(a.current),{data:c}=mT(),d=pT(),f=S.useRef(!1),m=S.useCallback(x=>{Md=x,l(x),document.documentElement.lang=x,vT(x)},[]);S.useEffect(()=>{const x=wv(c?.locale)??a.current;m(x),c&&c.locale===null&&!f.current&&(f.current=!0,d.mutate({locale:x}))},[c,m,d]);const g=S.useCallback(x=>{const y=Md;m(x),d.mutate({locale:x},{onError:()=>{m(y),Bi.error(aa("语言设置保存失败"))}})},[m,d]),p=S.useMemo(()=>({locale:i,setLocale:g,t:(x,y)=>Tv(i,x,y)}),[i,g]);return v.jsx(xv.Provider,{value:p,children:n})}function ya(){const n=S.useContext(xv);if(!n)throw new Error("useI18n must be used within I18nProvider");return n}function Cv(n){var a,i,l="";if(typeof n=="string"||typeof n=="number")l+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(a=0;a<c;a++)n[a]&&(i=Cv(n[a]))&&(l&&(l+=" "),l+=i)}else for(i in n)n[i]&&(l&&(l+=" "),l+=i);return l}function Av(){for(var n,a,i=0,l="",c=arguments.length;i<c;i++)(n=arguments[i])&&(a=Cv(n))&&(l&&(l+=" "),l+=a);return l}const wT=(n,a)=>{const i=new Array(n.length+a.length);for(let l=0;l<n.length;l++)i[l]=n[l];for(let l=0;l<a.length;l++)i[n.length+l]=a[l];return i},ET=(n,a)=>({classGroupId:n,validator:a}),Rv=(n=new Map,a=null,i)=>({nextPart:n,validators:a,classGroupId:i}),Go="-",ey=[],TT="arbitrary..",CT=n=>{const a=RT(n),{conflictingClassGroups:i,conflictingClassGroupModifiers:l}=n;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return AT(f);const m=f.split(Go),g=m[0]===""&&m.length>1?1:0;return _v(m,g,a)},getConflictingClassGroupIds:(f,m)=>{if(m){const g=l[f],p=i[f];return g?p?wT(p,g):g:p||ey}return i[f]||ey}}},_v=(n,a,i)=>{if(n.length-a===0)return i.classGroupId;const c=n[a],d=i.nextPart.get(c);if(d){const p=_v(n,a+1,d);if(p)return p}const f=i.validators;if(f===null)return;const m=a===0?n.join(Go):n.slice(a).join(Go),g=f.length;for(let p=0;p<g;p++){const x=f[p];if(x.validator(m))return x.classGroupId}},AT=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=n.slice(1,-1),i=a.indexOf(":"),l=a.slice(0,i);return l?TT+l:void 0})(),RT=n=>{const{theme:a,classGroups:i}=n;return _T(i,a)},_T=(n,a)=>{const i=Rv();for(const l in n){const c=n[l];of(c,i,l,a)}return i},of=(n,a,i,l)=>{const c=n.length;for(let d=0;d<c;d++){const f=n[d];kT(f,a,i,l)}},kT=(n,a,i,l)=>{if(typeof n=="string"){NT(n,a,i);return}if(typeof n=="function"){OT(n,a,i,l);return}MT(n,a,i,l)},NT=(n,a,i)=>{const l=n===""?a:kv(a,n);l.classGroupId=i},OT=(n,a,i,l)=>{if(jT(n)){of(n(l),a,i,l);return}a.validators===null&&(a.validators=[]),a.validators.push(ET(i,n))},MT=(n,a,i,l)=>{const c=Object.entries(n),d=c.length;for(let f=0;f<d;f++){const[m,g]=c[f];of(g,kv(a,m),i,l)}},kv=(n,a)=>{let i=n;const l=a.split(Go),c=l.length;for(let d=0;d<c;d++){const f=l[d];let m=i.nextPart.get(f);m||(m=Rv(),i.nextPart.set(f,m)),i=m}return i},jT=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,DT=n=>{if(n<1)return{get:()=>{},set:()=>{}};let a=0,i=Object.create(null),l=Object.create(null);const c=(d,f)=>{i[d]=f,a++,a>n&&(a=0,l=i,i=Object.create(null))};return{get(d){let f=i[d];if(f!==void 0)return f;if((f=l[d])!==void 0)return c(d,f),f},set(d,f){d in i?i[d]=f:c(d,f)}}},jd="!",ty=":",zT=[],ny=(n,a,i,l,c)=>({modifiers:n,hasImportantModifier:a,baseClassName:i,maybePostfixModifierPosition:l,isExternal:c}),LT=n=>{const{prefix:a,experimentalParseClassName:i}=n;let l=c=>{const d=[];let f=0,m=0,g=0,p;const x=c.length;for(let B=0;B<x;B++){const P=c[B];if(f===0&&m===0){if(P===ty){d.push(c.slice(g,B)),g=B+1;continue}if(P==="/"){p=B;continue}}P==="["?f++:P==="]"?f--:P==="("?m++:P===")"&&m--}const y=d.length===0?c:c.slice(g);let T=y,N=!1;y.endsWith(jd)?(T=y.slice(0,-1),N=!0):y.startsWith(jd)&&(T=y.slice(1),N=!0);const L=p&&p>g?p-g:void 0;return ny(d,N,T,L)};if(a){const c=a+ty,d=l;l=f=>f.startsWith(c)?d(f.slice(c.length)):ny(zT,!1,f,void 0,!0)}if(i){const c=l;l=d=>i({className:d,parseClassName:c})}return l},UT=n=>{const a=new Map;return n.orderSensitiveModifiers.forEach((i,l)=>{a.set(i,1e6+l)}),i=>{const l=[];let c=[];for(let d=0;d<i.length;d++){const f=i[d],m=f[0]==="[",g=a.has(f);m||g?(c.length>0&&(c.sort(),l.push(...c),c=[]),l.push(f)):c.push(f)}return c.length>0&&(c.sort(),l.push(...c)),l}},BT=n=>({cache:DT(n.cacheSize),parseClassName:LT(n),sortModifiers:UT(n),...CT(n)}),qT=/\s+/,HT=(n,a)=>{const{parseClassName:i,getClassGroupId:l,getConflictingClassGroupIds:c,sortModifiers:d}=a,f=[],m=n.trim().split(qT);let g="";for(let p=m.length-1;p>=0;p-=1){const x=m[p],{isExternal:y,modifiers:T,hasImportantModifier:N,baseClassName:L,maybePostfixModifierPosition:B}=i(x);if(y){g=x+(g.length>0?" "+g:g);continue}let P=!!B,K=l(P?L.substring(0,B):L);if(!K){if(!P){g=x+(g.length>0?" "+g:g);continue}if(K=l(L),!K){g=x+(g.length>0?" "+g:g);continue}P=!1}const Y=T.length===0?"":T.length===1?T[0]:d(T).join(":"),W=N?Y+jd:Y,he=W+K;if(f.indexOf(he)>-1)continue;f.push(he);const fe=c(K,P);for(let de=0;de<fe.length;++de){const R=fe[de];f.push(W+R)}g=x+(g.length>0?" "+g:g)}return g},QT=(...n)=>{let a=0,i,l,c="";for(;a<n.length;)(i=n[a++])&&(l=Nv(i))&&(c&&(c+=" "),c+=l);return c},Nv=n=>{if(typeof n=="string")return n;let a,i="";for(let l=0;l<n.length;l++)n[l]&&(a=Nv(n[l]))&&(i&&(i+=" "),i+=a);return i},PT=(n,...a)=>{let i,l,c,d;const f=g=>{const p=a.reduce((x,y)=>y(x),n());return i=BT(p),l=i.cache.get,c=i.cache.set,d=m,m(g)},m=g=>{const p=l(g);if(p)return p;const x=HT(g,i);return c(g,x),x};return d=f,(...g)=>d(QT(...g))},GT=[],Bt=n=>{const a=i=>i[n]||GT;return a.isThemeGetter=!0,a},Ov=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Mv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,KT=/^\d+\/\d+$/,VT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,YT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,FT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,XT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,IT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zi=n=>KT.test(n),Ue=n=>!!n&&!Number.isNaN(Number(n)),hr=n=>!!n&&Number.isInteger(Number(n)),hd=n=>n.endsWith("%")&&Ue(n.slice(0,-1)),Qa=n=>VT.test(n),ZT=()=>!0,JT=n=>YT.test(n)&&!FT.test(n),jv=()=>!1,$T=n=>XT.test(n),WT=n=>IT.test(n),e2=n=>!ue(n)&&!ce(n),t2=n=>Yi(n,Lv,jv),ue=n=>Ov.test(n),Yr=n=>Yi(n,Uv,JT),md=n=>Yi(n,s2,Ue),ay=n=>Yi(n,Dv,jv),n2=n=>Yi(n,zv,WT),To=n=>Yi(n,Bv,$T),ce=n=>Mv.test(n),Gs=n=>Fi(n,Uv),a2=n=>Fi(n,l2),ry=n=>Fi(n,Dv),r2=n=>Fi(n,Lv),i2=n=>Fi(n,zv),Co=n=>Fi(n,Bv,!0),Yi=(n,a,i)=>{const l=Ov.exec(n);return l?l[1]?a(l[1]):i(l[2]):!1},Fi=(n,a,i=!1)=>{const l=Mv.exec(n);return l?l[1]?a(l[1]):i:!1},Dv=n=>n==="position"||n==="percentage",zv=n=>n==="image"||n==="url",Lv=n=>n==="length"||n==="size"||n==="bg-size",Uv=n=>n==="length",s2=n=>n==="number",l2=n=>n==="family-name",Bv=n=>n==="shadow",o2=()=>{const n=Bt("color"),a=Bt("font"),i=Bt("text"),l=Bt("font-weight"),c=Bt("tracking"),d=Bt("leading"),f=Bt("breakpoint"),m=Bt("container"),g=Bt("spacing"),p=Bt("radius"),x=Bt("shadow"),y=Bt("inset-shadow"),T=Bt("text-shadow"),N=Bt("drop-shadow"),L=Bt("blur"),B=Bt("perspective"),P=Bt("aspect"),K=Bt("ease"),Y=Bt("animate"),W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],he=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],fe=()=>[...he(),ce,ue],de=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],V=()=>[ce,ue,g],re=()=>[zi,"full","auto",...V()],ke=()=>[hr,"none","subgrid",ce,ue],Re=()=>["auto",{span:["full",hr,ce,ue]},hr,ce,ue],Se=()=>[hr,"auto",ce,ue],Me=()=>["auto","min","max","fr",ce,ue],Le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ee=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...V()],X=()=>[zi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...V()],Q=()=>[n,ce,ue],me=()=>[...he(),ry,ay,{position:[ce,ue]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],C=()=>["auto","cover","contain",r2,t2,{size:[ce,ue]}],q=()=>[hd,Gs,Yr],H=()=>["","none","full",p,ce,ue],Z=()=>["",Ue,Gs,Yr],ee=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Ue,hd,ry,ay],Te=()=>["","none",L,ce,ue],Be=()=>["none",Ue,ce,ue],Pt=()=>["none",Ue,ce,ue],en=()=>[Ue,ce,ue],Je=()=>[zi,"full",...V()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qa],breakpoint:[Qa],color:[ZT],container:[Qa],"drop-shadow":[Qa],ease:["in","out","in-out"],font:[e2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qa],shadow:[Qa],spacing:["px",Ue],text:[Qa],"text-shadow":[Qa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",zi,ue,ce,P]}],container:["container"],columns:[{columns:[Ue,ue,ce,m]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:fe()}],overflow:[{overflow:de()}],"overflow-x":[{"overflow-x":de()}],"overflow-y":[{"overflow-y":de()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:re()}],"inset-x":[{"inset-x":re()}],"inset-y":[{"inset-y":re()}],start:[{start:re()}],end:[{end:re()}],top:[{top:re()}],right:[{right:re()}],bottom:[{bottom:re()}],left:[{left:re()}],visibility:["visible","invisible","collapse"],z:[{z:[hr,"auto",ce,ue]}],basis:[{basis:[zi,"full","auto",m,...V()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ue,zi,"auto","initial","none",ue]}],grow:[{grow:["",Ue,ce,ue]}],shrink:[{shrink:["",Ue,ce,ue]}],order:[{order:[hr,"first","last","none",ce,ue]}],"grid-cols":[{"grid-cols":ke()}],"col-start-end":[{col:Re()}],"col-start":[{"col-start":Se()}],"col-end":[{"col-end":Se()}],"grid-rows":[{"grid-rows":ke()}],"row-start-end":[{row:Re()}],"row-start":[{"row-start":Se()}],"row-end":[{"row-end":Se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Me()}],"auto-rows":[{"auto-rows":Me()}],gap:[{gap:V()}],"gap-x":[{"gap-x":V()}],"gap-y":[{"gap-y":V()}],"justify-content":[{justify:[...Le(),"normal"]}],"justify-items":[{"justify-items":[...Ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ee()]}],"align-content":[{content:["normal",...Le()]}],"align-items":[{items:[...Ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":Le()}],"place-items":[{"place-items":[...Ee(),"baseline"]}],"place-self":[{"place-self":["auto",...Ee()]}],p:[{p:V()}],px:[{px:V()}],py:[{py:V()}],ps:[{ps:V()}],pe:[{pe:V()}],pt:[{pt:V()}],pr:[{pr:V()}],pb:[{pb:V()}],pl:[{pl:V()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":V()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":V()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[m,"screen",...X()]}],"min-w":[{"min-w":[m,"screen","none",...X()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[f]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",i,Gs,Yr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,ce,md]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hd,ue]}],"font-family":[{font:[a2,ue,a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,ce,ue]}],"line-clamp":[{"line-clamp":[Ue,"none",ce,md]}],leading:[{leading:[d,...V()]}],"list-image":[{"list-image":["none",ce,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Q()}],"text-color":[{text:Q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ue,"from-font","auto",ce,Yr]}],"text-decoration-color":[{decoration:Q()}],"underline-offset":[{"underline-offset":[Ue,"auto",ce,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce,ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:me()}],"bg-repeat":[{bg:ve()}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},hr,ce,ue],radial:["",ce,ue],conic:[hr,ce,ue]},i2,n2]}],"bg-color":[{bg:Q()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Q()}],"gradient-via":[{via:Q()}],"gradient-to":[{to:Q()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:Q()}],"border-color-x":[{"border-x":Q()}],"border-color-y":[{"border-y":Q()}],"border-color-s":[{"border-s":Q()}],"border-color-e":[{"border-e":Q()}],"border-color-t":[{"border-t":Q()}],"border-color-r":[{"border-r":Q()}],"border-color-b":[{"border-b":Q()}],"border-color-l":[{"border-l":Q()}],"divide-color":[{divide:Q()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ue,ce,ue]}],"outline-w":[{outline:["",Ue,Gs,Yr]}],"outline-color":[{outline:Q()}],shadow:[{shadow:["","none",x,Co,To]}],"shadow-color":[{shadow:Q()}],"inset-shadow":[{"inset-shadow":["none",y,Co,To]}],"inset-shadow-color":[{"inset-shadow":Q()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Q()}],"ring-offset-w":[{"ring-offset":[Ue,Yr]}],"ring-offset-color":[{"ring-offset":Q()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":Q()}],"text-shadow":[{"text-shadow":["none",T,Co,To]}],"text-shadow-color":[{"text-shadow":Q()}],opacity:[{opacity:[Ue,ce,ue]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ue]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":Q()}],"mask-image-linear-to-color":[{"mask-linear-to":Q()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":Q()}],"mask-image-t-to-color":[{"mask-t-to":Q()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":Q()}],"mask-image-r-to-color":[{"mask-r-to":Q()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":Q()}],"mask-image-b-to-color":[{"mask-b-to":Q()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":Q()}],"mask-image-l-to-color":[{"mask-l-to":Q()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":Q()}],"mask-image-x-to-color":[{"mask-x-to":Q()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":Q()}],"mask-image-y-to-color":[{"mask-y-to":Q()}],"mask-image-radial":[{"mask-radial":[ce,ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":Q()}],"mask-image-radial-to-color":[{"mask-radial-to":Q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":he()}],"mask-image-conic-pos":[{"mask-conic":[Ue]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":Q()}],"mask-image-conic-to-color":[{"mask-conic-to":Q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:me()}],"mask-repeat":[{mask:ve()}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,ue]}],filter:[{filter:["","none",ce,ue]}],blur:[{blur:Te()}],brightness:[{brightness:[Ue,ce,ue]}],contrast:[{contrast:[Ue,ce,ue]}],"drop-shadow":[{"drop-shadow":["","none",N,Co,To]}],"drop-shadow-color":[{"drop-shadow":Q()}],grayscale:[{grayscale:["",Ue,ce,ue]}],"hue-rotate":[{"hue-rotate":[Ue,ce,ue]}],invert:[{invert:["",Ue,ce,ue]}],saturate:[{saturate:[Ue,ce,ue]}],sepia:[{sepia:["",Ue,ce,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,ue]}],"backdrop-blur":[{"backdrop-blur":Te()}],"backdrop-brightness":[{"backdrop-brightness":[Ue,ce,ue]}],"backdrop-contrast":[{"backdrop-contrast":[Ue,ce,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ue,ce,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ue,ce,ue]}],"backdrop-invert":[{"backdrop-invert":["",Ue,ce,ue]}],"backdrop-opacity":[{"backdrop-opacity":[Ue,ce,ue]}],"backdrop-saturate":[{"backdrop-saturate":[Ue,ce,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",Ue,ce,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":V()}],"border-spacing-x":[{"border-spacing-x":V()}],"border-spacing-y":[{"border-spacing-y":V()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ue,"initial",ce,ue]}],ease:[{ease:["linear","initial",K,ce,ue]}],delay:[{delay:[Ue,ce,ue]}],animate:[{animate:["none",Y,ce,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[B,ce,ue]}],"perspective-origin":[{"perspective-origin":fe()}],rotate:[{rotate:Be()}],"rotate-x":[{"rotate-x":Be()}],"rotate-y":[{"rotate-y":Be()}],"rotate-z":[{"rotate-z":Be()}],scale:[{scale:Pt()}],"scale-x":[{"scale-x":Pt()}],"scale-y":[{"scale-y":Pt()}],"scale-z":[{"scale-z":Pt()}],"scale-3d":["scale-3d"],skew:[{skew:en()}],"skew-x":[{"skew-x":en()}],"skew-y":[{"skew-y":en()}],transform:[{transform:[ce,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:fe()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Je()}],"translate-x":[{"translate-x":Je()}],"translate-y":[{"translate-y":Je()}],"translate-z":[{"translate-z":Je()}],"translate-none":["translate-none"],accent:[{accent:Q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce,ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce,ue]}],fill:[{fill:["none",...Q()]}],"stroke-w":[{stroke:[Ue,Gs,Yr,md]}],stroke:[{stroke:["none",...Q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},u2=PT(o2);function jt(...n){return u2(Av(n))}function pd(n){let a=0;for(const i of n){const l=i.codePointAt(0);l>=19968&&l<=40959||l>=13312&&l<=19903||l>=65280&&l<=65376||l>=12288&&l<=12351?a+=2:a+=1}return a}function rR(n,a){if(pd(n)<=a)return n;const i=a-1,l=Math.ceil(i/2),c=Math.floor(i/2);let d="",f=0;for(const x of n){const y=pd(x);if(f+y>l)break;d+=x,f+=y}const m=[...n];let g="",p=0;for(let x=m.length-1;x>=0;x--){const y=pd(m[x]);if(p+y>c)break;g=m[x]+g,p+=y}return d+"…"+g}let Pi=0;function qv(){Pi++,Pi===1&&(document.body.style.overflow="hidden")}function Dd(){Pi=Math.max(0,Pi-1),Pi===0&&(document.body.style.overflow="")}function c2(){return Pi}const iy=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,sy=Av,d2=(n,a)=>i=>{var l;if(a?.variants==null)return sy(n,i?.class,i?.className);const{variants:c,defaultVariants:d}=a,f=Object.keys(c).map(p=>{const x=i?.[p],y=d?.[p];if(x===null)return null;const T=iy(x)||iy(y);return c[p][T]}),m=i&&Object.entries(i).reduce((p,x)=>{let[y,T]=x;return T===void 0||(p[y]=T),p},{}),g=a==null||(l=a.compoundVariants)===null||l===void 0?void 0:l.reduce((p,x)=>{let{class:y,className:T,...N}=x;return Object.entries(N).every(L=>{let[B,P]=L;return Array.isArray(P)?P.includes({...d,...m}[B]):{...d,...m}[B]===P})?[...p,y,T]:p},[]);return sy(n,f,g,i?.class,i?.className)};function ly(n,a){if(typeof n=="function")return n(a);n!=null&&(n.current=a)}function f2(...n){return a=>{let i=!1;const l=n.map(c=>{const d=ly(c,a);return!i&&typeof d=="function"&&(i=!0),d});if(i)return()=>{for(let c=0;c<l.length;c++){const d=l[c];typeof d=="function"?d():ly(n[c],null)}}}}function h2(n){const a=p2(n),i=S.forwardRef((l,c)=>{const{children:d,...f}=l,m=S.Children.toArray(d),g=m.find(y2);if(g){const p=g.props.children,x=m.map(y=>y===g?S.Children.count(p)>1?S.Children.only(null):S.isValidElement(p)?p.props.children:null:y);return v.jsx(a,{...f,ref:c,children:S.isValidElement(p)?S.cloneElement(p,void 0,x):null})}return v.jsx(a,{...f,ref:c,children:d})});return i.displayName=`${n}.Slot`,i}var m2=h2("Slot");function p2(n){const a=S.forwardRef((i,l)=>{const{children:c,...d}=i;if(S.isValidElement(c)){const f=b2(c),m=v2(d,c.props);return c.type!==S.Fragment&&(m.ref=l?f2(l,f):f),S.cloneElement(c,m)}return S.Children.count(c)>1?S.Children.only(null):null});return a.displayName=`${n}.SlotClone`,a}var g2=Symbol("radix.slottable");function y2(n){return S.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===g2}function v2(n,a){const i={...a};for(const l in a){const c=n[l],d=a[l];/^on[A-Z]/.test(l)?c&&d?i[l]=(...m)=>{const g=d(...m);return c(...m),g}:c&&(i[l]=c):l==="style"?i[l]={...c,...d}:l==="className"&&(i[l]=[c,d].filter(Boolean).join(" "))}return{...n,...i}}function b2(n){let a=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,i=a&&"isReactWarning"in a&&a.isReactWarning;return i?n.ref:(a=Object.getOwnPropertyDescriptor(n,"ref")?.get,i=a&&"isReactWarning"in a&&a.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}const x2=d2("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function ma({className:n,variant:a="default",size:i="default",asChild:l=!1,...c}){const d=l?m2:"button";return v.jsx(d,{"data-slot":"button","data-variant":a,"data-size":i,className:jt(x2({variant:a,size:i,className:n})),...c})}function _t({className:n,...a}){return v.jsx("div",{"data-slot":"skeleton","aria-hidden":"true",className:jt("animate-pulse rounded-md bg-muted motion-reduce:animate-none",n),...a})}function S2({children:n,className:a}){return v.jsx("div",{className:jt("mx-auto w-full max-w-4xl px-5 py-5 sm:px-8 sm:py-6",a),children:n})}function iR({title:n,description:a,actions:i,className:l}){return v.jsxs("div",{className:jt("mb-5 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",l),children:[v.jsxs("div",{className:"min-w-0",children:[v.jsx("h2",{className:"text-xl font-semibold tracking-tight text-foreground",children:n}),a&&v.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-muted-foreground",children:a})]}),i&&v.jsx("div",{className:"flex flex-wrap items-center gap-2 shrink-0",children:i})]})}function sR({children:n,className:a}){return v.jsx("h3",{className:jt("text-[12px] font-semibold uppercase tracking-wide text-muted-foreground",a),children:n})}function lR({label:n,description:a,icon:i,children:l,align:c="start",controlWidth:d="fixed",className:f}){return v.jsxs("div",{className:jt("flex flex-col gap-3 py-5 sm:flex-row sm:justify-between sm:gap-8",c==="center"?"sm:items-center":"sm:items-start",f),children:[v.jsxs("div",{className:"flex min-w-0 items-start gap-3 sm:max-w-[360px]",children:[i&&v.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground","aria-hidden":"true",children:v.jsx(i,{size:15})}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("div",{className:"text-[13px] font-medium text-foreground",children:n}),a&&v.jsx("p",{className:"mt-0.5 text-xs leading-relaxed text-muted-foreground",children:a})]})]}),v.jsx("div",{className:jt("shrink-0",d==="fixed"?"w-full sm:w-[260px]":"w-auto"),children:l})]})}function oR({label:n,description:a,children:i,className:l,htmlFor:c}){return v.jsxs("div",{className:jt("space-y-1.5",l),children:[v.jsxs("div",{children:[v.jsx("label",{htmlFor:c,className:"block text-[13px] font-medium text-foreground",children:n}),a&&v.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:a})]}),i]})}function uR({icon:n,message:a,action:i,className:l}){return v.jsxs("div",{className:jt("rounded-xl border border-dashed border-border bg-muted/30 py-14 text-center",l),children:[n&&v.jsx(n,{size:48,strokeWidth:1.25,className:"mx-auto mb-3 text-muted-foreground/40","aria-hidden":"true"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:a}),i&&v.jsx("div",{className:"mt-4 flex justify-center",children:i})]})}function cR({saving:n,onSave:a,onCancel:i,className:l}){const{t:c}=ya();return v.jsx("div",{className:jt("sticky bottom-0 z-10 -mx-5 border-t border-border/60 bg-background/90 px-5 py-3 backdrop-blur sm:-mx-8 sm:px-8",l),children:v.jsxs("div",{className:"flex items-center justify-between gap-3",children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:c("有未保存的更改")}),v.jsxs("div",{className:"flex items-center gap-2",children:[i&&v.jsx(ma,{size:"sm",variant:"ghost",onClick:i,disabled:n,children:c("取消")}),v.jsx(ma,{size:"sm",onClick:a,disabled:n,children:c(n?"保存中...":"保存")})]})]})})}function w2({rows:n=3}){return v.jsxs("div",{role:"status","aria-label":"Loading",children:[v.jsx(_t,{className:"h-7 w-36"}),v.jsx("div",{className:"mt-6 divide-y divide-border/60",children:Array.from({length:n}).map((a,i)=>v.jsxs("div",{className:"flex items-start justify-between gap-8 py-5",children:[v.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[v.jsx(_t,{className:"h-4 w-32"}),v.jsx(_t,{className:"h-3 w-64 max-w-full"})]}),v.jsx(_t,{className:"h-9 w-[260px] shrink-0 rounded-lg"})]},i))})]})}function dR(){return v.jsxs("div",{role:"status","aria-label":"Loading",children:[v.jsx(_t,{className:"h-7 w-36"}),v.jsxs("div",{className:"mt-6 grid gap-5 lg:grid-cols-[240px_minmax(0,1fr)]",children:[v.jsx("div",{className:"space-y-1",children:Array.from({length:5}).map((n,a)=>v.jsxs("div",{className:"flex items-center gap-3 rounded-lg px-3 py-2.5",children:[v.jsx(_t,{className:"h-2 w-2 rounded-full"}),v.jsxs("div",{className:"flex-1 space-y-1.5",children:[v.jsx(_t,{className:"h-3.5 w-3/4"}),v.jsx(_t,{className:"h-2.5 w-1/2"})]})]},a))}),v.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[v.jsxs("div",{className:"flex items-start justify-between gap-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsx(_t,{className:"h-5 w-44"}),v.jsx(_t,{className:"h-3 w-28"})]}),v.jsx(_t,{className:"h-8 w-24 rounded-md"})]}),v.jsxs("div",{className:"mt-8 space-y-3",children:[v.jsx(_t,{className:"h-3 w-20"}),v.jsx(_t,{className:"h-24 w-full rounded-lg"}),v.jsx(_t,{className:"h-3 w-20"}),v.jsx(_t,{className:"h-16 w-full rounded-lg"})]})]})]})]})}function fR({cards:n=6}){return v.jsxs("div",{role:"status","aria-label":"Loading",children:[v.jsxs("div",{className:"flex items-center justify-between gap-4",children:[v.jsx(_t,{className:"h-7 w-36"}),v.jsx(_t,{className:"h-8 w-44 rounded-lg"})]}),v.jsx("div",{className:"mt-6 grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:n}).map((a,i)=>v.jsxs("div",{className:"flex items-start gap-3 rounded-xl border border-border bg-card p-4",children:[v.jsx(_t,{className:"h-10 w-10 shrink-0 rounded-full"}),v.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[v.jsx(_t,{className:"h-4 w-2/3"}),v.jsx(_t,{className:"h-3 w-1/2"}),v.jsx(_t,{className:"h-3 w-3/4"})]})]},i))})]})}const E2=S.lazy(()=>_n(()=>import("./GeneralSettingsPage-CKFLk4bt.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(n=>({default:n.GeneralSettingsPage}))),T2=S.lazy(()=>_n(()=>import("./ProviderSettingsPage-DkKvjXXL.js"),__vite__mapDeps([7,6,8,9,1,2,3,4,5,10,11,12,13,14,15,16,17])).then(n=>({default:n.ProviderSettingsPage}))),C2=S.lazy(()=>_n(()=>import("./AgentEnvironmentSettingsPage-D7pZQLiC.js"),[]).then(n=>({default:n.AgentEnvironmentSettingsPage}))),A2=S.lazy(()=>_n(()=>import("./TeamSettingsPage-B6paYIi8.js"),__vite__mapDeps([18,8,9,1,2,3,10,11,12,13,19,6,15,20])).then(n=>({default:n.TeamSettingsPage}))),R2=S.lazy(()=>_n(()=>import("./ProjectSettingsPage-DJ5LIrW5.js"),__vite__mapDeps([21,22,23,11,24,3,15,9,14])).then(n=>({default:n.ProjectSettingsPage}))),_2=S.lazy(()=>_n(()=>import("./NotificationSettingsPage-OpJo7zJ4.js"),__vite__mapDeps([25,1,2,3,5,26,24])).then(n=>({default:n.NotificationSettingsPage}))),k2=S.lazy(()=>_n(()=>import("./McpSettingsPage-GDNWUFUx.js"),__vite__mapDeps([27,28,3])).then(n=>({default:n.McpSettingsPage}))),N2=S.lazy(()=>_n(()=>import("./ProfileSettingsPage-DYV5Up2y.js"),__vite__mapDeps([29,30,9,8,4,31,2,15,17])).then(n=>({default:n.ProfileSettingsPage}))),oy=[{id:"general",label:"通用",icon:PE},{id:"agent-environment",label:"Agent 环境",icon:hv},{id:"agents",label:"Agent 配置",icon:jE},{id:"team",label:"团队协作",icon:iT},{id:"projects",label:"项目配置",icon:BE},{id:"notifications",label:"通知",icon:TE},{id:"mcp",label:"MCP 配置",icon:RE}];function O2({tab:n}){switch(n){case"general":return v.jsx(E2,{});case"agent-environment":return v.jsx(C2,{});case"agents":return v.jsx(T2,{});case"team":return v.jsx(A2,{});case"projects":return v.jsx(R2,{});case"notifications":return v.jsx(_2,{});case"mcp":return v.jsx(k2,{});case"agents-legacy":return v.jsx(N2,{})}}function M2(){return v.jsx(S2,{children:v.jsx(w2,{rows:3})})}function j2(){const{t:n}=ya(),a=Fs(p=>p.settingsOpen),i=Fs(p=>p.settingsTab),l=Fs(p=>p.closeSettings),c=Fs(p=>p.setSettingsTab),[d,f]=S.useState(!1),m=S.useRef(!1),g=S.useRef(null);return S.useEffect(()=>{if(a){const p=requestAnimationFrame(()=>f(!0));m.current||(qv(),m.current=!0);const x=requestAnimationFrame(()=>g.current?.focus());return()=>{cancelAnimationFrame(p),cancelAnimationFrame(x)}}else{const p=setTimeout(()=>f(!1),200);return m.current&&(Dd(),m.current=!1),()=>clearTimeout(p)}},[a]),S.useEffect(()=>()=>{m.current&&(Dd(),m.current=!1)},[]),S.useEffect(()=>{if(!a)return;const p=x=>{x.key==="Escape"&&c2()===1&&l()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[a,l]),!d&&!a?null:v.jsxs("div",{className:jt("fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-6 transition-opacity duration-200 motion-reduce:transition-none",a?"opacity-100":"opacity-0 pointer-events-none"),children:[v.jsx("div",{className:"absolute inset-0 bg-black/20 backdrop-blur-sm",onClick:l,"aria-hidden":"true"}),v.jsxs("div",{ref:g,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":n("设置"),className:jt("relative flex w-full max-w-[1100px] flex-col overflow-hidden rounded-2xl bg-background shadow-[0_12px_16px_-4px_rgba(36,36,36,0.08)] ring-1 ring-foreground/5 transform transition-all duration-200 outline-none motion-reduce:transition-none","h-[min(calc(100vh-1.5rem),840px)] sm:h-[min(calc(100vh-3rem),840px)]",a?"scale-100 translate-y-0":"scale-[0.97] translate-y-1"),children:[v.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border/60 bg-muted/40 px-5 py-3 sm:px-6",children:[v.jsxs("div",{className:"flex items-center gap-2.5",children:[v.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary text-primary-foreground","aria-hidden":"true",children:v.jsx(ZE,{size:14})}),v.jsx("h2",{className:"text-[15px] font-semibold text-foreground",children:n("设置")})]}),v.jsx("button",{onClick:l,"aria-label":n("取消"),className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:v.jsx(gv,{size:15})})]}),v.jsx("div",{className:"sm:hidden flex shrink-0 border-b border-border/60 bg-background overflow-x-auto scrollbar-none",role:"tablist",children:oy.map(p=>v.jsxs("button",{role:"tab","aria-selected":i===p.id,onClick:()=>c(p.id),className:jt("flex items-center gap-1.5 px-4 py-2.5 text-xs whitespace-nowrap transition-colors border-b-2 -mb-px focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-inset",i===p.id?"border-primary text-foreground font-medium":"border-transparent text-muted-foreground hover:text-foreground"),children:[v.jsx(p.icon,{size:13,"aria-hidden":"true"}),v.jsx("span",{children:n(p.label)})]},p.id))}),v.jsxs("div",{className:"flex flex-1 min-h-0",children:[v.jsx("nav",{"aria-label":n("设置"),className:"hidden sm:flex w-[180px] shrink-0 flex-col gap-0.5 border-r border-border/60 bg-muted/30 p-3 overflow-y-auto scrollbar-app-thin",children:oy.map(p=>v.jsxs("button",{"aria-current":i===p.id?"page":void 0,onClick:()=>c(p.id),className:jt("flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",i===p.id?"bg-background text-foreground font-medium shadow-[0_1px_2px_rgba(0,0,0,0.05)] ring-1 ring-foreground/[0.04]":"text-muted-foreground hover:text-foreground hover:bg-background/60"),children:[v.jsx(p.icon,{size:15,className:"shrink-0","aria-hidden":"true"}),v.jsx("span",{children:n(p.label)})]},p.id))}),v.jsx("div",{className:"flex-1 min-w-0 overflow-y-auto scrollbar-app-thin bg-background",children:v.jsx(S.Suspense,{fallback:v.jsx(M2,{}),children:v.jsx(O2,{tab:i})})})]})]})]})}const Hv="agent-tower:desktop-titlebar",zd="agent-tower:desktop-platform",$r={desktop:"1",desktopTitlebar:"integrated"},Qv=S.createContext(null),D2={usesIntegratedTitlebar:!1,desktopPlatform:"unknown",hasMacTrafficLights:!1,preserveDesktopSearch:n=>n};function z2(n){const a=new URLSearchParams(n);return a.get("desktop")===$r.desktop&&a.get("desktopTitlebar")===$r.desktopTitlebar}function Pv(n){return n==="darwin"||n==="win32"||n==="linux"?n:"unknown"}function L2(){if(typeof window>"u")return"unknown";try{return Pv(window.sessionStorage.getItem(zd))}catch{return"unknown"}}function U2(n){if(!(typeof window>"u"))try{n==="unknown"?window.sessionStorage.removeItem(zd):window.sessionStorage.setItem(zd,n)}catch{}}function B2(){if(typeof window>"u")return"none";try{return window.sessionStorage.getItem(Hv)===$r.desktopTitlebar?"integrated":"none"}catch{return"none"}}function q2(n){if(!(typeof window>"u"))try{n==="integrated"&&window.sessionStorage.setItem(Hv,$r.desktopTitlebar)}catch{}}function H2(n){return z2(n)?(q2("integrated"),"integrated"):B2()}function Q2(n){const a=new URLSearchParams(n),i=Pv(a.get("desktopPlatform"));return a.get("desktop")===$r.desktop&&i!=="unknown"?(U2(i),i):L2()}function uy(n,a){const i=new URLSearchParams(n);i.set("desktop",$r.desktop),i.set("desktopTitlebar",$r.desktopTitlebar),a!=="unknown"&&i.set("desktopPlatform",a);const l=i.toString();return l?`?${l}`:""}function P2(n,a){if(typeof n=="string"){const i=n.indexOf("#"),l=i>=0?n.slice(0,i):n,c=i>=0?n.slice(i):"",d=l.indexOf("?"),f=d>=0?l.slice(0,d):l,m=d>=0?l.slice(d):"";return`${f}${uy(m,a)}${c}`}return{...n,search:uy(n.search??"",a)}}function G2({children:n}){const a=Sr(),i=S.useMemo(()=>H2(a.search),[a.search]),l=S.useMemo(()=>Q2(a.search),[a.search]),c=i==="integrated",d=c&&l==="darwin",f=S.useMemo(()=>({usesIntegratedTitlebar:c,desktopPlatform:l,hasMacTrafficLights:d,preserveDesktopSearch:m=>c?P2(m,l):m}),[l,d,c]);return v.jsx(Qv.Provider,{value:f,children:n})}function Gv(){return S.useContext(Qv)??D2}function K2(){const n=nf(),{preserveDesktopSearch:a}=Gv();return S.useMemo(()=>((l,c)=>typeof l=="number"?n(l):n(a(l),c)),[n,a])}function V2(){return rn({queryKey:ge.agentCli.manifest,queryFn:()=>ze.get("/agent-cli/manifest")})}function Kv(){return rn({queryKey:ge.agentCli.status,queryFn:()=>ze.get("/agent-cli/status")})}function Vv(){const n=tt();return ct({mutationFn:()=>ze.post("/agent-cli/status/refresh"),onSuccess:a=>{n.setQueryData(ge.agentCli.status,a)}})}function Y2(){const n=tt();return ct({mutationFn:a=>ze.post("/agent-cli/install-previews",{toolId:a}),onSuccess:a=>{n.setQueryData(ge.agentCli.preview(a.id),a)}})}function F2(n,a=!0){return rn({queryKey:n?ge.agentCli.task(n):["agent-cli","task",null],queryFn:()=>ze.get(`/agent-cli/install-tasks/${n}`),enabled:!!n&&a,refetchInterval:i=>{const l=i.state.data?.status;return l==="running"||l==="verifying"||l==="cancelling"?1e3:!1}})}function X2(n,a=!0){return rn({queryKey:n?ge.agentCli.logs(n):["agent-cli","logs",null],queryFn:()=>ze.get(`/agent-cli/install-tasks/${n}/logs`),enabled:!!n&&a,refetchInterval:a&&n?1e3:!1})}function I2(){const n=tt();return ct({mutationFn:a=>ze.post("/agent-cli/install-tasks",{previewId:a}),onSuccess:({task:a})=>{n.setQueryData(ge.agentCli.task(a.id),a),n.invalidateQueries({queryKey:ge.agentCli.status})}})}function Z2(){const n=tt();return ct({mutationFn:a=>ze.post(`/agent-cli/install-tasks/${a}/cancel`),onSuccess:a=>{n.setQueryData(ge.agentCli.task(a.id),a)}})}const Yv=["codex","claude-code","cursor-agent"];function Fv(n){return Yv.includes(n)}function J2(n){return Yv.some(a=>n?.some(i=>i.toolId===a&&i.installStatus==="installed"))}const Mo=new Set(["succeeded","failed","cancelled"]),$2="AGENT_CLI_INSTALL_LOCAL_ONLY",W2=[];function eC(n){if(!(n instanceof sl))return;const a=n.details.code;return typeof a=="string"?a:void 0}function Li(n,a){return n instanceof sl&&(n.status===403||eC(n)===$2)?"需要在本机 Agent Tower 打开后安装。":n instanceof Error?n.message:a}function tC(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/1024/1024).toFixed(2)} MB`}function nC(n){return n==="darwin"?"macOS":n==="linux"?"Linux":n==="win32"?"Windows":n??"Unknown"}function aC(n){return n.map(a=>a.data.endsWith(`
|
|
13
|
+
Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}/*`}">.`)}let T=Sr(),N;N=T;let L=N.pathname||"/",B=L;if(x!=="/"){let Y=x.replace(/^\//,"").split("/");B="/"+L.replace(/^\//,"").split("/").slice(Y.length).join("/")}let P=mr(n,{pathname:B});return zt(y||P!=null,`No routes matched location "${N.pathname}${N.search}${N.hash}" `),zt(P==null||P[P.length-1].route.element!==void 0||P[P.length-1].route.Component!==void 0||P[P.length-1].route.lazy!==void 0,`Matched leaf route at location "${N.pathname}${N.search}${N.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),pw(P&&P.map(Y=>Object.assign({},Y,{params:Object.assign({},g,Y.params),pathname:ha([x,d.encodeLocation?d.encodeLocation(Y.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathname]),pathnameBase:Y.pathnameBase==="/"?x:ha([x,d.encodeLocation?d.encodeLocation(Y.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Y.pathnameBase])})),f,i,l,c)}function dw(){let n=iv(),a=Ws(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,l="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:l},d={padding:"2px 4px",backgroundColor:l},f=null;return console.error("Error handled by React Router default ErrorBoundary:",n),f=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:d},"ErrorBoundary")," or"," ",S.createElement("code",{style:d},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),i?S.createElement("pre",{style:c},i):null,f)}var fw=S.createElement(dw,null),rv=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){this.props.onError?this.props.onError(n,a):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const i=rw(n.digest);i&&(n=i)}let a=n!==void 0?S.createElement(ra.Provider,{value:this.props.routeContext},S.createElement(tf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(hw,{error:n},a):a}};rv.contextType=Wy;var dd=new WeakMap;function hw({children:n,error:a}){let{basename:i}=S.useContext(Yn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let l=aw(a.digest);if(l){let c=dd.get(a);if(c)throw c;let d=Qy(l.location,i);if(Hy&&!dd.get(a))if(d.isExternal||l.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:l.replace}));throw dd.set(a,f),f}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function mw({routeContext:n,match:a,children:i}){let l=S.useContext(Wr);return l&&l.static&&l.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(ra.Provider,{value:n},i)}function pw(n,a=[],i=null,l=null,c=null){if(n==null){if(!i)return null;if(i.errors)n=i.matches;else if(a.length===0&&!i.initialized&&i.matches.length>0)n=i.matches;else return null}let d=n,f=i?.errors;if(f!=null){let x=d.findIndex(y=>y.route.id&&f?.[y.route.id]!==void 0);qe(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),d=d.slice(0,Math.min(d.length,x+1))}let m=!1,g=-1;if(i)for(let x=0;x<d.length;x++){let y=d[x];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(g=x),y.route.id){let{loaderData:T,errors:N}=i,L=y.route.loader&&!T.hasOwnProperty(y.route.id)&&(!N||N[y.route.id]===void 0);if(y.route.lazy||L){m=!0,g>=0?d=d.slice(0,g+1):d=[d[0]];break}}}let p=i&&l?(x,y)=>{l(x,{location:i.location,params:i.matches?.[0]?.params??{},unstable_pattern:nl(i.matches),errorInfo:y})}:void 0;return d.reduceRight((x,y,T)=>{let N,L=!1,B=null,P=null;i&&(N=f&&y.route.id?f[y.route.id]:void 0,B=y.route.errorElement||fw,m&&(g<0&&T===0?(sv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),L=!0,P=null):g===T&&(L=!0,P=y.route.hydrateFallbackElement||null)));let K=a.concat(d.slice(0,T+1)),Y=()=>{let W;return N?W=B:L?W=P:y.route.Component?W=S.createElement(y.route.Component,null):y.route.element?W=y.route.element:W=x,S.createElement(mw,{match:y,routeContext:{outlet:x,matches:K,isDataRoute:i!=null},children:W})};return i&&(y.route.ErrorBoundary||y.route.errorElement||T===0)?S.createElement(rv,{location:i.location,revalidation:i.revalidation,component:B,error:N,children:Y(),routeContext:{outlet:null,matches:K,isDataRoute:!0},onError:p}):Y()},null)}function af(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gw(n){let a=S.useContext(Wr);return qe(a,af(n)),a}function yw(n){let a=S.useContext(al);return qe(a,af(n)),a}function vw(n){let a=S.useContext(ra);return qe(a,af(n)),a}function rf(n){let a=vw(n),i=a.matches[a.matches.length-1];return qe(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function bw(){return rf("useRouteId")}function iv(){let n=S.useContext(tf),a=yw("useRouteError"),i=rf("useRouteError");return n!==void 0?n:a.errors?.[i]}function xw(){let{router:n}=gw("useNavigate"),a=rf("useNavigate"),i=S.useRef(!1);return av(()=>{i.current=!0}),S.useCallback(async(c,d={})=>{zt(i.current,nv),i.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:a,...d}))},[n,a])}var Gg={};function sv(n,a,i){!a&&!Gg[n]&&(Gg[n]=!0,zt(!1,i))}var Kg={};function Vg(n,a){!n&&!Kg[a]&&(Kg[a]=!0,console.warn(a))}var Sw="useOptimistic",Yg=C1[Sw],ww=()=>{};function Ew(n){return Yg?Yg(n):[n,ww]}function Tw(n){let a={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&zt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(a,{element:S.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&zt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(a,{hydrateFallbackElement:S.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&zt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(a,{errorElement:S.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),a}var Cw=["HydrateFallback","hydrateFallbackElement"],Aw=class{constructor(){this.status="pending",this.promise=new Promise((n,a)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",n(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",a(i))}})}};function Rw({router:n,flushSync:a,onError:i,unstable_useTransitions:l}){l=WS()||l;let[d,f]=S.useState(n.state),[m,g]=Ew(d),[p,x]=S.useState(),[y,T]=S.useState({isTransitioning:!1}),[N,L]=S.useState(),[B,P]=S.useState(),[K,Y]=S.useState(),W=S.useRef(new Map),he=S.useCallback((V,{deletedFetchers:re,newErrors:ke,flushSync:Re,viewTransitionOpts:Se})=>{ke&&i&&Object.values(ke).forEach(Le=>i(Le,{location:V.location,params:V.matches[0]?.params??{},unstable_pattern:nl(V.matches)})),V.fetchers.forEach((Le,Ee)=>{Le.data!==void 0&&W.current.set(Ee,Le.data)}),re.forEach(Le=>W.current.delete(Le)),Vg(Re===!1||a!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let Me=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(Vg(Se==null||Me,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!Se||!Me){a&&Re?a(()=>f(V)):l===!1?f(V):S.startTransition(()=>{l===!0&&g(Le=>Fg(Le,V)),f(V)});return}if(a&&Re){a(()=>{B&&(N?.resolve(),B.skipTransition()),T({isTransitioning:!0,flushSync:!0,currentLocation:Se.currentLocation,nextLocation:Se.nextLocation})});let Le=n.window.document.startViewTransition(()=>{a(()=>f(V))});Le.finished.finally(()=>{a(()=>{L(void 0),P(void 0),x(void 0),T({isTransitioning:!1})})}),a(()=>P(Le));return}B?(N?.resolve(),B.skipTransition(),Y({state:V,currentLocation:Se.currentLocation,nextLocation:Se.nextLocation})):(x(V),T({isTransitioning:!0,flushSync:!1,currentLocation:Se.currentLocation,nextLocation:Se.nextLocation}))},[n.window,a,B,N,l,g,i]);S.useLayoutEffect(()=>n.subscribe(he),[n,he]),S.useEffect(()=>{y.isTransitioning&&!y.flushSync&&L(new Aw)},[y]),S.useEffect(()=>{if(N&&p&&n.window){let V=p,re=N.promise,ke=n.window.document.startViewTransition(async()=>{l===!1?f(V):S.startTransition(()=>{l===!0&&g(Re=>Fg(Re,V)),f(V)}),await re});ke.finished.finally(()=>{L(void 0),P(void 0),x(void 0),T({isTransitioning:!1})}),P(ke)}},[p,N,n.window,l,g]),S.useEffect(()=>{N&&p&&m.location.key===p.location.key&&N.resolve()},[N,B,m.location,p]),S.useEffect(()=>{!y.isTransitioning&&K&&(x(K.state),T({isTransitioning:!0,flushSync:!1,currentLocation:K.currentLocation,nextLocation:K.nextLocation}),Y(void 0))},[y.isTransitioning,K]);let fe=S.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:V=>n.navigate(V),push:(V,re,ke)=>n.navigate(V,{state:re,preventScrollReset:ke?.preventScrollReset}),replace:(V,re,ke)=>n.navigate(V,{replace:!0,state:re,preventScrollReset:ke?.preventScrollReset})}),[n]),de=n.basename||"/",R=S.useMemo(()=>({router:n,navigator:fe,static:!1,basename:de,onError:i}),[n,fe,de,i]);return S.createElement(S.Fragment,null,S.createElement(Wr.Provider,{value:R},S.createElement(al.Provider,{value:m},S.createElement(ev.Provider,{value:W.current},S.createElement(ef.Provider,{value:y},S.createElement(Ow,{basename:de,location:m.location,navigationType:m.historyAction,navigator:fe,unstable_useTransitions:l},S.createElement(_w,{routes:n.routes,future:n.future,state:m,onError:i})))))),null)}function Fg(n,a){return{...n,navigation:a.navigation.state!=="idle"?a.navigation:n.navigation,revalidation:a.revalidation!=="idle"?a.revalidation:n.revalidation,actionData:a.navigation.state!=="submitting"?a.actionData:n.actionData,fetchers:a.fetchers}}var _w=S.memo(kw);function kw({routes:n,future:a,state:i,onError:l}){return cw(n,void 0,i,l,a)}function Nw(n){return ow(n.context)}function Ow({basename:n="/",children:a=null,location:i,navigationType:l="POP",navigator:c,static:d=!1,unstable_useTransitions:f}){qe(!rl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=n.replace(/^\/*/,"/"),g=S.useMemo(()=>({basename:m,navigator:c,static:d,unstable_useTransitions:f,future:{}}),[m,c,d,f]);typeof i=="string"&&(i=xr(i));let{pathname:p="/",search:x="",hash:y="",state:T=null,key:N="default"}=i,L=S.useMemo(()=>{let B=Vn(p,m);return B==null?null:{location:{pathname:B,search:x,hash:y,state:T,key:N},navigationType:l}},[m,p,x,y,T,N,l]);return zt(L!=null,`<Router basename="${m}"> is not able to match the URL "${p}${x}${y}" because it does not start with the basename, so the <Router> won't render anything.`),L==null?null:S.createElement(Yn.Provider,{value:g},S.createElement(Ko.Provider,{children:a,value:L}))}var No="get",Oo="application/x-www-form-urlencoded";function Vo(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Mw(n){return Vo(n)&&n.tagName.toLowerCase()==="button"}function jw(n){return Vo(n)&&n.tagName.toLowerCase()==="form"}function Dw(n){return Vo(n)&&n.tagName.toLowerCase()==="input"}function zw(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Lw(n,a){return n.button===0&&(!a||a==="_self")&&!zw(n)}var Eo=null;function Uw(){if(Eo===null)try{new FormData(document.createElement("form"),0),Eo=!1}catch{Eo=!0}return Eo}var Bw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function fd(n){return n!=null&&!Bw.has(n)?(zt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Oo}"`),null):n}function qw(n,a){let i,l,c,d,f;if(jw(n)){let m=n.getAttribute("action");l=m?Vn(m,a):null,i=n.getAttribute("method")||No,c=fd(n.getAttribute("enctype"))||Oo,d=new FormData(n)}else if(Mw(n)||Dw(n)&&(n.type==="submit"||n.type==="image")){let m=n.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=n.getAttribute("formaction")||m.getAttribute("action");if(l=g?Vn(g,a):null,i=n.getAttribute("formmethod")||m.getAttribute("method")||No,c=fd(n.getAttribute("formenctype"))||fd(m.getAttribute("enctype"))||Oo,d=new FormData(m,n),!Uw()){let{name:p,type:x,value:y}=n;if(x==="image"){let T=p?`${p}.`:"";d.append(`${T}x`,"0"),d.append(`${T}y`,"0")}else p&&d.append(p,y)}}else{if(Vo(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=No,l=null,c=Oo,f=n}return d&&c==="text/plain"&&(f=d,d=void 0),{action:l,method:i.toLowerCase(),encType:c,formData:d,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function sf(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function Hw(n,a,i,l){let c=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${l}`:c.pathname=`${c.pathname}.${l}`:c.pathname==="/"?c.pathname=`_root.${l}`:a&&Vn(c.pathname,a)==="/"?c.pathname=`${a.replace(/\/$/,"")}/_root.${l}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${l}`,c}async function Qw(n,a){if(n.id in a)return a[n.id];try{let i=await import(n.module);return a[n.id]=i,i}catch(i){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Pw(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Gw(n,a,i){let l=await Promise.all(n.map(async c=>{let d=a.routes[c.route.id];if(d){let f=await Qw(d,i);return f.links?f.links():[]}return[]}));return Fw(l.flat(1).filter(Pw).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function Xg(n,a,i,l,c,d){let f=(g,p)=>i[p]?g.route.id!==i[p].route.id:!0,m=(g,p)=>i[p].pathname!==g.pathname||i[p].route.path?.endsWith("*")&&i[p].params["*"]!==g.params["*"];return d==="assets"?a.filter((g,p)=>f(g,p)||m(g,p)):d==="data"?a.filter((g,p)=>{let x=l.routes[g.route.id];if(!x||!x.hasLoader)return!1;if(f(g,p)||m(g,p))return!0;if(g.route.shouldRevalidate){let y=g.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:i[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function Kw(n,a,{includeHydrateFallback:i}={}){return Vw(n.map(l=>{let c=a.routes[l.route.id];if(!c)return[];let d=[c.module];return c.clientActionModule&&(d=d.concat(c.clientActionModule)),c.clientLoaderModule&&(d=d.concat(c.clientLoaderModule)),i&&c.hydrateFallbackModule&&(d=d.concat(c.hydrateFallbackModule)),c.imports&&(d=d.concat(c.imports)),d}).flat(1))}function Vw(n){return[...new Set(n)]}function Yw(n){let a={},i=Object.keys(n).sort();for(let l of i)a[l]=n[l];return a}function Fw(n,a){let i=new Set;return new Set(a),n.reduce((l,c)=>{let d=JSON.stringify(Yw(c));return i.has(d)||(i.add(d),l.push({key:d,link:c})),l},[])}function lv(){let n=S.useContext(Wr);return sf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Xw(){let n=S.useContext(al);return sf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var lf=S.createContext(void 0);lf.displayName="FrameworkContext";function ov(){let n=S.useContext(lf);return sf(n,"You must render this element inside a <HydratedRouter> element"),n}function Iw(n,a){let i=S.useContext(lf),[l,c]=S.useState(!1),[d,f]=S.useState(!1),{onFocus:m,onBlur:g,onMouseEnter:p,onMouseLeave:x,onTouchStart:y}=a,T=S.useRef(null);S.useEffect(()=>{if(n==="render"&&f(!0),n==="viewport"){let B=K=>{K.forEach(Y=>{f(Y.isIntersecting)})},P=new IntersectionObserver(B,{threshold:.5});return T.current&&P.observe(T.current),()=>{P.disconnect()}}},[n]),S.useEffect(()=>{if(l){let B=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(B)}}},[l]);let N=()=>{c(!0)},L=()=>{c(!1),f(!1)};return i?n!=="intent"?[d,T,{}]:[d,T,{onFocus:Ps(m,N),onBlur:Ps(g,L),onMouseEnter:Ps(p,N),onMouseLeave:Ps(x,L),onTouchStart:Ps(y,N)}]:[!1,T,{}]}function Ps(n,a){return i=>{n&&n(i),i.defaultPrevented||a(i)}}function Zw({page:n,...a}){let{router:i}=lv(),l=S.useMemo(()=>mr(i.routes,n,i.basename),[i.routes,n,i.basename]);return l?S.createElement($w,{page:n,matches:l,...a}):null}function Jw(n){let{manifest:a,routeModules:i}=ov(),[l,c]=S.useState([]);return S.useEffect(()=>{let d=!1;return Gw(n,a,i).then(f=>{d||c(f)}),()=>{d=!0}},[n,a,i]),l}function $w({page:n,matches:a,...i}){let l=Sr(),{future:c,manifest:d,routeModules:f}=ov(),{basename:m}=lv(),{loaderData:g,matches:p}=Xw(),x=S.useMemo(()=>Xg(n,a,p,d,l,"data"),[n,a,p,d,l]),y=S.useMemo(()=>Xg(n,a,p,d,l,"assets"),[n,a,p,d,l]),T=S.useMemo(()=>{if(n===l.pathname+l.search+l.hash)return[];let B=new Set,P=!1;if(a.forEach(Y=>{let W=d.routes[Y.route.id];!W||!W.hasLoader||(!x.some(he=>he.route.id===Y.route.id)&&Y.route.id in g&&f[Y.route.id]?.shouldRevalidate||W.hasClientLoader?P=!0:B.add(Y.route.id))}),B.size===0)return[];let K=Hw(n,m,c.unstable_trailingSlashAwareDataRequests,"data");return P&&B.size>0&&K.searchParams.set("_routes",a.filter(Y=>B.has(Y.route.id)).map(Y=>Y.route.id).join(",")),[K.pathname+K.search]},[m,c.unstable_trailingSlashAwareDataRequests,g,l,d,x,a,n,f]),N=S.useMemo(()=>Kw(y,d),[y,d]),L=Jw(y);return S.createElement(S.Fragment,null,T.map(B=>S.createElement("link",{key:B,rel:"prefetch",as:"fetch",href:B,...i})),N.map(B=>S.createElement("link",{key:B,rel:"modulepreload",href:B,...i})),L.map(({key:B,link:P})=>S.createElement("link",{key:B,nonce:i.nonce,...P,crossOrigin:P.crossOrigin??i.crossOrigin})))}function Ww(...n){return a=>{n.forEach(i=>{typeof i=="function"?i(a):i!=null&&(i.current=a)})}}var eE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{eE&&(window.__reactRouterVersion="7.13.0")}catch{}function tE(n,a){return _S({basename:a?.basename,getContext:a?.getContext,future:a?.future,history:Kx({window:a?.window}),hydrationData:nE(),routes:n,mapRouteProperties:Tw,hydrationRouteProperties:Cw,dataStrategy:a?.dataStrategy,patchRoutesOnNavigation:a?.patchRoutesOnNavigation,window:a?.window,unstable_instrumentations:a?.unstable_instrumentations}).initialize()}function nE(){let n=window?.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:aE(n.errors)}),n}function aE(n){if(!n)return null;let a=Object.entries(n),i={};for(let[l,c]of a)if(c&&c.__type==="RouteErrorResponse")i[l]=new tl(c.status,c.statusText,c.data,c.internal===!0);else if(c&&c.__type==="Error"){if(c.__subType){let d=window[c.__subType];if(typeof d=="function")try{let f=new d(c.message);f.stack="",i[l]=f}catch{}}if(i[l]==null){let d=new Error(c.message);d.stack="",i[l]=d}}else i[l]=c;return i}var uv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cv=S.forwardRef(function({onClick:a,discover:i="render",prefetch:l="none",relative:c,reloadDocument:d,replace:f,state:m,target:g,to:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T,...N},L){let{basename:B,unstable_useTransitions:P}=S.useContext(Yn),K=typeof p=="string"&&uv.test(p),Y=Qy(p,B);p=Y.to;let W=iw(p,{relative:c}),[he,fe,de]=Iw(l,N),R=lE(p,{replace:f,state:m,target:g,preventScrollReset:x,relative:c,viewTransition:y,unstable_defaultShouldRevalidate:T,unstable_useTransitions:P});function V(ke){a&&a(ke),ke.defaultPrevented||R(ke)}let re=S.createElement("a",{...N,...de,href:Y.absoluteURL||W,onClick:Y.isExternal||d?a:V,ref:Ww(L,fe),target:g,"data-discover":!K&&i==="render"?"true":void 0});return he&&!K?S.createElement(S.Fragment,null,re,S.createElement(Zw,{page:W})):re});cv.displayName="Link";var rE=S.forwardRef(function({"aria-current":a="page",caseSensitive:i=!1,className:l="",end:c=!1,style:d,to:f,viewTransition:m,children:g,...p},x){let y=il(f,{relative:p.relative}),T=Sr(),N=S.useContext(al),{navigator:L,basename:B}=S.useContext(Yn),P=N!=null&&fE(y)&&m===!0,K=L.encodeLocation?L.encodeLocation(y).pathname:y.pathname,Y=T.pathname,W=N&&N.navigation&&N.navigation.location?N.navigation.location.pathname:null;i||(Y=Y.toLowerCase(),W=W?W.toLowerCase():null,K=K.toLowerCase()),W&&B&&(W=Vn(W,B)||W);const he=K!=="/"&&K.endsWith("/")?K.length-1:K.length;let fe=Y===K||!c&&Y.startsWith(K)&&Y.charAt(he)==="/",de=W!=null&&(W===K||!c&&W.startsWith(K)&&W.charAt(K.length)==="/"),R={isActive:fe,isPending:de,isTransitioning:P},V=fe?a:void 0,re;typeof l=="function"?re=l(R):re=[l,fe?"active":null,de?"pending":null,P?"transitioning":null].filter(Boolean).join(" ");let ke=typeof d=="function"?d(R):d;return S.createElement(cv,{...p,"aria-current":V,className:re,ref:x,style:ke,to:f,viewTransition:m},typeof g=="function"?g(R):g)});rE.displayName="NavLink";var iE=S.forwardRef(({discover:n="render",fetcherKey:a,navigate:i,reloadDocument:l,replace:c,state:d,method:f=No,action:m,onSubmit:g,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T,...N},L)=>{let{unstable_useTransitions:B}=S.useContext(Yn),P=cE(),K=dE(m,{relative:p}),Y=f.toLowerCase()==="get"?"get":"post",W=typeof m=="string"&&uv.test(m),he=fe=>{if(g&&g(fe),fe.defaultPrevented)return;fe.preventDefault();let de=fe.nativeEvent.submitter,R=de?.getAttribute("formmethod")||f,V=()=>P(de||fe.currentTarget,{fetcherKey:a,method:R,navigate:i,replace:c,state:d,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:T});B&&i!==!1?S.startTransition(()=>V()):V()};return S.createElement("form",{ref:L,method:Y,action:K,onSubmit:l?g:he,...N,"data-discover":!W&&n==="render"?"true":void 0})});iE.displayName="Form";function sE(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function dv(n){let a=S.useContext(Wr);return qe(a,sE(n)),a}function lE(n,{target:a,replace:i,state:l,preventScrollReset:c,relative:d,viewTransition:f,unstable_defaultShouldRevalidate:m,unstable_useTransitions:g}={}){let p=nf(),x=Sr(),y=il(n,{relative:d});return S.useCallback(T=>{if(Lw(T,a)){T.preventDefault();let N=i!==void 0?i:pa(x)===pa(y),L=()=>p(n,{replace:N,state:l,preventScrollReset:c,relative:d,viewTransition:f,unstable_defaultShouldRevalidate:m});g?S.startTransition(()=>L()):L()}},[x,p,y,i,l,a,n,c,d,f,m,g])}var oE=0,uE=()=>`__${String(++oE)}__`;function cE(){let{router:n}=dv("useSubmit"),{basename:a}=S.useContext(Yn),i=bw(),l=n.fetch,c=n.navigate;return S.useCallback(async(d,f={})=>{let{action:m,method:g,encType:p,formData:x,body:y}=qw(d,a);if(f.navigate===!1){let T=f.fetcherKey||uE();await l(T,i,f.action||m,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:x,body:y,formMethod:f.method||g,formEncType:f.encType||p,flushSync:f.flushSync})}else await c(f.action||m,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:x,body:y,formMethod:f.method||g,formEncType:f.encType||p,replace:f.replace,state:f.state,fromRouteId:i,flushSync:f.flushSync,viewTransition:f.viewTransition})},[l,c,a,i])}function dE(n,{relative:a}={}){let{basename:i}=S.useContext(Yn),l=S.useContext(ra);qe(l,"useFormAction must be used inside a RouteContext");let[c]=l.matches.slice(-1),d={...il(n||".",{relative:a})},f=Sr();if(n==null){d.search=f.search;let m=new URLSearchParams(d.search),g=m.getAll("index");if(g.some(x=>x==="")){m.delete("index"),g.filter(y=>y).forEach(y=>m.append("index",y));let x=m.toString();d.search=x?`?${x}`:""}}return(!n||n===".")&&c.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(d.pathname=d.pathname==="/"?i:ha([i,d.pathname])),pa(d)}function fE(n,{relative:a}={}){let i=S.useContext(ef);qe(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=dv("useViewTransitionState"),c=il(n,{relative:a});if(!i.isTransitioning)return!1;let d=Vn(i.currentLocation.pathname,l)||i.currentLocation.pathname,f=Vn(i.nextLocation.pathname,l)||i.nextLocation.pathname;return Po(c.pathname,f)!=null||Po(c.pathname,d)!=null}function hE(n){return S.createElement(Rw,{flushSync:jy.flushSync,...n})}const mE="modulepreload",pE=function(n){return"/"+n},Ig={},_n=function(a,i,l){let c=Promise.resolve();if(i&&i.length>0){let g=function(p){return Promise.all(p.map(x=>Promise.resolve(x).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),m=f?.nonce||f?.getAttribute("nonce");c=g(i.map(p=>{if(p=pE(p),p in Ig)return;Ig[p]=!0;const x=p.endsWith(".css"),y=x?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${y}`))return;const T=document.createElement("link");if(T.rel=x?"stylesheet":mE,x||(T.as="script"),T.crossOrigin="",T.href=p,m&&T.setAttribute("nonce",m),document.head.appendChild(T),x)return new Promise((N,L)=>{T.addEventListener("load",N),T.addEventListener("error",()=>L(new Error(`Unable to preload CSS for ${p}`)))})}))}function d(f){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=f,window.dispatchEvent(m),!m.defaultPrevented)throw f}return c.then(f=>{for(const m of f||[])m.status==="rejected"&&d(m.reason);return a().catch(d)})};const fv=(...n)=>n.filter((a,i,l)=>!!a&&a.trim()!==""&&l.indexOf(a)===i).join(" ").trim();const gE=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const yE=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,i,l)=>l?l.toUpperCase():i.toLowerCase());const Zg=n=>{const a=yE(n);return a.charAt(0).toUpperCase()+a.slice(1)};var vE={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const bE=n=>{for(const a in n)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};const xE=S.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:c="",children:d,iconNode:f,...m},g)=>S.createElement("svg",{ref:g,...vE,width:a,height:a,stroke:n,strokeWidth:l?Number(i)*24/Number(a):i,className:fv("lucide",c),...!d&&!bE(m)&&{"aria-hidden":"true"},...m},[...f.map(([p,x])=>S.createElement(p,x)),...Array.isArray(d)?d:[d]]));const gt=(n,a)=>{const i=S.forwardRef(({className:l,...c},d)=>S.createElement(xE,{ref:d,iconNode:a,className:fv(`lucide-${gE(Zg(n))}`,`lucide-${n}`,l),...c}));return i.displayName=Zg(n),i};const SE=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],wE=gt("arrow-left",SE);const EE=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],TE=gt("bell",EE);const CE=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],hv=gt("bot",CE);const AE=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]],RE=gt("cable",AE);const _E=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Od=gt("circle-check",_E);const kE=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],NE=gt("circle-dashed",kE);const OE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],mv=gt("circle-x",OE);const ME=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],jE=gt("cpu",ME);const DE=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],pv=gt("download",DE);const zE=[["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"}]],LE=gt("external-link",zE);const UE=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],BE=gt("folder-git-2",UE);const qE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],HE=gt("info",qE);const QE=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],PE=gt("languages",QE);const GE=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ki=gt("loader-circle",GE);const KE=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],VE=gt("lock-keyhole",KE);const YE=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],FE=gt("refresh-cw",YE);const XE=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Yo=gt("rotate-ccw",XE);const IE=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ZE=gt("settings",IE);const JE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],$E=gt("shield-check",JE);const WE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],eT=gt("square",WE);const tT=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],nT=gt("terminal",tT);const aT=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Jr=gt("triangle-alert",aT);const rT=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],iT=gt("users",rT);const sT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gv=gt("x",sT),Jg=n=>{let a;const i=new Set,l=(p,x)=>{const y=typeof p=="function"?p(a):p;if(!Object.is(y,a)){const T=a;a=x??(typeof y!="object"||y===null)?y:Object.assign({},a,y),i.forEach(N=>N(a,T))}},c=()=>a,m={setState:l,getState:c,getInitialState:()=>g,subscribe:p=>(i.add(p),()=>i.delete(p))},g=a=n(l,c,m);return m},lT=(n=>n?Jg(n):Jg),oT=n=>n;function uT(n,a=oT){const i=ne.useSyncExternalStore(n.subscribe,ne.useCallback(()=>a(n.getState()),[n,a]),ne.useCallback(()=>a(n.getInitialState()),[n,a]));return ne.useDebugValue(i),i}const $g=n=>{const a=lT(n),i=l=>uT(a,l);return Object.assign(i,a),i},yv=(n=>n?$g(n):$g),Fs=yv(n=>({sidebarOpen:!0,theme:"system",settingsOpen:!1,settingsTab:"general",toggleSidebar:()=>n(a=>({sidebarOpen:!a.sidebarOpen})),setSidebarOpen:a=>n({sidebarOpen:a}),setTheme:a=>n({theme:a}),openSettings:a=>n({settingsOpen:!0,...a?{settingsTab:a}:{}}),closeSettings:()=>n({settingsOpen:!1}),setSettingsTab:a=>n({settingsTab:a})})),Wg="/api";function vv(n){return n.endsWith("/")?n.slice(0,-1):n}function bv(n){return!1}function cT(){return bv()?Wg:vv(Wg)}function dT(){return bv()?"":vv("")}const fT=cT();class hT{baseUrl;constructor(a){this.baseUrl=a}async request(a,i={}){const{params:l,...c}=i;let d=`${this.baseUrl}${a}`;if(l){const g=new URLSearchParams(l);d+=`?${g.toString()}`}const f={...c.headers};c.body!==void 0&&(f["Content-Type"]="application/json");const m=await fetch(d,{...c,headers:f,credentials:c.credentials??"same-origin"});if(!m.ok){const g=await m.json().catch(()=>({}));throw new sl(m.status,typeof g.message=="string"?g.message:typeof g.error=="string"?g.error:"Request failed",g)}if(m.status!==204)return m.json()}get(a,i){return this.request(a,{...i,method:"GET"})}post(a,i,l){return this.request(a,{...l,method:"POST",body:i?JSON.stringify(i):void 0})}put(a,i,l){return this.request(a,{...l,method:"PUT",body:i?JSON.stringify(i):void 0})}patch(a,i,l){return this.request(a,{...l,method:"PATCH",body:i?JSON.stringify(i):void 0})}delete(a,i){return this.request(a,{...i,method:"DELETE"})}}class sl extends Error{status;details;constructor(a,i,l={}){super(i),this.name="ApiError",this.status=a,this.details=l}}const ze=new hT(fT),ge={projects:{all:["projects"],list:n=>["projects","list",n],detail:n=>["projects","detail",n],gitCapability:n=>["projects","gitCapability",n]},tasks:{all:["tasks"],boardAll:["tasks","board"],board:n=>["tasks","board",n],list:(n,a)=>["tasks","list",n,a],detail:n=>["tasks","detail",n],body:n=>["tasks","body",n],stats:n=>["tasks","stats",n]},workspaces:{all:["workspaces"],list:n=>["workspaces","list",n],setupProgress:n=>["workspaces","setup-progress",n],detail:n=>["workspaces","detail",n],diff:n=>["workspaces","diff",n],gitStatus:n=>["workspaces","gitStatus",n]},workspaceServices:{all:["workspace-services"],list:n=>["workspace-services","list",n],logs:(n,a)=>["workspace-services","logs",n,a]},previews:{all:["previews"],status:n=>["previews","status",n]},sessions:{all:["sessions"],detail:n=>["sessions","detail",n],runtime:n=>["sessions","runtime",n]},conversations:{all:["conversations"],list:n=>["conversations","list",n],detail:n=>["conversations","detail",n]},files:{all:["files"],tree:(n,a)=>["files","tree",n,a],content:(n,a)=>["files","content",n,a]},git:{all:["git"],changes:n=>["git","changes",n],diff:(n,a,i)=>["git","diff",n,a,i],log:n=>["git","log",n],commitFiles:(n,a)=>["git","commitFiles",n,a],commitDiff:(n,a,i)=>["git","commitDiff",n,a,i]},profiles:{all:["profiles"],defaults:["profiles","defaults"],agent:n=>["profiles","agent",n],variant:(n,a)=>["profiles","variant",n,a]},providers:{all:["providers"],capabilities:(n,a)=>["providers","capabilities",n??"",a??""],detail:n=>["providers","detail",n]},tunnel:{status:["tunnel","status"]},notifications:{settings:["notifications","settings"]},appSettings:{detail:["app-settings"]},accessAuth:{status:["access-auth","status"],settings:["access-auth","settings"]},agentCli:{manifest:["agent-cli","manifest"],status:["agent-cli","status"],preview:n=>["agent-cli","preview",n],task:n=>["agent-cli","task",n],logs:n=>["agent-cli","logs",n]},system:{cursorAgentModels:["system","cursor-agent-models"],mcpConfig:["system","mcp-config"],slashCommandCatalog:(n,a)=>["system","slash-command-catalog",n??null,a??null],skillCatalog:(n,a)=>["system","skill-catalog",n??null,a??null]}};function mT(){return rn({queryKey:ge.appSettings.detail,queryFn:()=>ze.get("/app-settings")})}function pT(){const n=tt();return ct({mutationFn:a=>ze.put("/app-settings",a),onSuccess:()=>{n.invalidateQueries({queryKey:ge.appSettings.detail})}})}function aR(){return rn({queryKey:[...ge.appSettings.detail,"commit-message-defaults"],queryFn:()=>ze.get("/app-settings/commit-message-defaults")})}const gT={"zh-CN":{Settings:"设置",General:"通用",Back:"返回","Loading...":"加载中...","No options":"暂无选项","Processing...":"处理中...","Permission required":"需要授权","The agent needs approval to continue.":"Agent 需要你的授权才能继续。",Confirm:"确认",Cancel:"取消",Start:"开始","Starting...":"启动中...","General Settings":"通用设置","Display Language":"显示语言","Choose the interface language. The setting is saved to the local Agent Tower database and will still apply after restart.":"选择界面语言。设置会保存到本地 Agent Tower 数据库,并在重新打开后继续生效。",English:"English","Simplified Chinese":"简体中文","Language setting":"语言设置","Language setting could not be saved":"语言设置保存失败","Browse and select a Git repository, or type a path and press Enter":"浏览并选择一个 Git 仓库,或输入路径后按 Enter","Browse and select a directory, or type a path and press Enter":"浏览并选择一个目录,或输入路径后按 Enter","Select Current":"选择当前目录","Project Path":"项目路径","Create Local Project":"创建本地项目","Local project":"本地项目","Local projects only support local Solo tasks. Initialize Git to use worktrees and TeamRun.":"本地项目仅支持本地 Solo 任务。初始化 Git 后可使用工作树和 TeamRun。","You can also create it as a local project now. Local projects only support local Solo tasks until Git is initialized.":"你也可以现在将其创建为本地项目。初始化 Git 前,本地项目仅支持本地 Solo 任务。","This setting applies only to Git worktree projects.":"此设置仅适用于 Git 工作树项目。","Agent 配置":"Agent 配置",项目配置:"项目配置",通知:"通知",通用:"通用","AI Agent Task Management Dashboard":"AI Agent 任务管理面板","Project Management":"项目管理","Manage your AI agent projects":"管理你的 AI Agent 项目","View Projects":"查看项目","Task Board":"任务看板",Tasks:"任务","Kanban-style task management":"Kanban 风格的任务管理","Open Board":"打开看板",Workspace:"工作区","Git worktree isolated environments":"Git Worktree 隔离环境","Manage Workspaces":"管理工作区","Move to":"移动到","Delete Task":"删除任务","Drop into {title}":"放入 {title}","Drop here":"拖到此处","No tasks":"暂无任务","All Projects":"所有项目",Projects:"项目","Select View":"选择视图","Create New Project...":"创建新项目...","New Task":"新任务","New Project":"新项目",Search:"搜索","Search tasks...":"搜索任务...","Search conversations...":"搜索对话...","Recent tasks":"近期任务","Recent conversations":"最近对话","No matching tasks":"没有匹配的任务","No matching conversations":"没有匹配的对话","{count} tasks":"{count} 个任务","Clear filter":"清除筛选",Review:"待审查",Running:"进行中",Pending:"待开始",Priority:"优先级","Task priority":"任务优先级",紧急:"紧急",高:"高",普通:"普通",低:"低",优先级变更失败:"优先级变更失败",Done:"已完成",Cancelled:"已取消",Starting:"启动中",Completed:"已完成",Stopped:"已停止",Changes:"变更",History:"历史",Conversation:"对话",Conversations:"对话","New Conversation":"新对话","No conversations":"暂无对话","Conversation not found":"对话不存在","Delete this conversation?":"删除这个对话?","Ask a question...":"问一个问题...",Editor:"编辑器",Terminal:"终端",Preview:"预览","Open visualization":"打开可视化","Download file":"下载文件","Viewing agent visualization":"正在查看 Agent 可视化","Session file":"会话文件","Coming soon...":"即将推出...",Modified:"已修改",Added:"已新增",Deleted:"已删除",Delete:"删除",Renamed:"已重命名","Loading diff...":"正在加载差异...","Failed to load diff.":"加载差异失败。","No diff content available.":"没有可显示的差异内容。","No workspace selected.":"未选择工作区。","Loading changes...":"正在加载变更...","Failed to load changes.":"加载变更失败。","No pending changes":"暂无待处理变更",Uncommitted:"未提交",Committed:"已提交","Select a file to view diff":"选择一个文件以查看差异","{count}s ago":"{count} 秒前","{count}m ago":"{count} 分钟前","{count}h ago":"{count} 小时前","{count}d ago":"{count} 天前",正在思考:"正在思考","最后一次输出于 {duration}前":"最后一次输出于 {duration}前",等待首次输出:"等待首次输出","{count} 秒":"{count} 秒","{minutes} 分 {seconds} 秒":"{minutes} 分 {seconds} 秒","{hours} 小时 {minutes} 分":"{hours} 小时 {minutes} 分","Loading files...":"正在加载文件列表...","No files changed":"没有文件变更","Loading history...":"正在加载历史记录...","Failed to load history.":"加载历史记录失败。","No commit history":"暂无提交历史","Load more":"加载更多","Select a commit to view changes":"选择一个提交以查看变更","Zoom out":"缩小","Reset zoom":"重置缩放","Zoom in":"放大","Fit to view":"适应视图","Failed to load image.":"加载图片失败。","Close tab":"关闭标签页",Close:"关闭","Expand file tree":"展开文件树","No open files":"暂无打开文件",Saving:"保存中",Unsaved:"未保存","Select a file from the tree to open.":"从文件树中选择一个文件以打开。","Loading file...":"正在加载文件...","Failed to load file":"加载文件失败","Failed to load":"加载失败","Failed to start. Please try again.":"启动失败,请重试","Failed to stop session. Refreshing status; check it and try again.":"停止会话失败。正在刷新状态,请确认后重试。",Files:"文件","No working directory":"未选择工作目录","Refresh file tree":"刷新文件树","Collapse file tree":"收起文件树","Shell {count}":"终端 {count}","New Terminal":"新终端","No terminals open":"暂无打开终端","Interactive terminals":"交互终端","Background services":"后台服务","Background service logs":"后台服务日志","Loading background services...":"正在加载后台服务...","Failed to load background services.":"加载后台服务失败。","No background services":"暂无后台服务","Select a background service":"选择一个后台服务","Loading service logs...":"正在加载服务日志...","Failed to refresh service logs.":"刷新服务日志失败。","Earlier log output is unavailable.":"较早的日志内容已不可用。","No logs yet":"暂无日志",Retry:"重试","Something went wrong":"出了点问题","Only rendering errors are caught here. Errors from event handlers, async callbacks or observers are not.":"此处只兜住渲染阶段抛出的错误;事件处理器、异步回调或 observer 中抛出的错误不会进入兜底。","This section hit a rendering error and was replaced by this message.":"这一区域渲染出错,已由本条提示替代。","Failed to display logs":"日志显示失败","The log view hit a rendering error. Retry renders the same data again, so it will fail again while the bad data is still there.":"日志视图渲染出错。重试只是重新渲染同一份数据,坏数据仍在时会再次出错。","This page could not be displayed. Go back to the task board and try again.":"这个页面无法显示。请返回任务看板后重试。","The interface hit a rendering error. Reload the page to continue.":"界面渲染出错,请重新加载页面后继续。","The interface could not be displayed. Reload the page to try again.":"界面无法显示,请重新加载页面后再试。","Reload page":"重新加载页面","Back to home":"返回首页",Command:"命令","Working directory":"工作目录",Started:"启动时间","Not started":"尚未启动",Exited:"已退出","Paste into terminal":"粘贴到终端","Paste terminal input here":"在此粘贴终端输入内容","Terminal paste content":"终端粘贴内容","Terminal is not ready":"终端尚未就绪","Pasted into terminal":"已粘贴到终端",Paste:"粘贴",Disconnected:"未连接","Connecting...":"连接中...",Connected:"已连接","No active session":"暂无活动会话","Create a workspace and start a session to see terminal output.":"创建工作区并启动会话后即可查看终端输出。","Process exited with code {code}":"进程已退出,退出码 {code}","Error: {message}":"错误: {message}","Session: {id}":"会话: {id}","Tunnel active":"隧道已启用","Share via tunnel":"通过隧道分享","Tunnel Active":"隧道已启用","Tunnel healthy":"隧道健康","Tunnel needs attention":"隧道需要注意","Tunnel unavailable":"隧道不可用","Tunnel starting":"隧道启动中","Tunnel is off":"隧道未开启","Checking tunnel health":"正在检查隧道健康","Observing original link":"正在观察原链接","Local service unavailable":"本地服务不可用","Tunnel process exited":"隧道进程已退出","Tunnel error":"隧道错误","New link generated":"新链接已生成","Use Agent Tower on your phone":"在手机上使用 Agent Tower","After enabling the tunnel, you can scan a QR code with your phone to visit this Agent Tower instance, assign tasks, and check agent status.":"开启隧道后,可以用手机扫码访问本机的 Agent Tower,用手机派任务、查看 Agent 状态。","Enable phone access":"开启手机访问","Starting tunnel...":"正在开启隧道...","Start a temporary Quick Tunnel when you need to share this Agent Tower session.":"需要分享当前 Agent Tower 会话时,可以启动一个临时 Quick Tunnel。","The Cloudflare tunnel is running and the local Agent Tower health check passed.":"Cloudflare 隧道正在运行,且本地 Agent Tower 健康检查已通过。","The Cloudflare tunnel is running. Agent Tower is waiting for the first local health check.":"Cloudflare 隧道正在运行,Agent Tower 正在等待首次本地健康检查。","The original public URL is currently unreachable. Agent Tower is watching for it to recover and will not generate a new link automatically.":"原公网链接当前不可访问。Agent Tower 正在观察它是否恢复,不会自动生成新链接。","The local Agent Tower target is not responding, so the tunnel cannot be considered healthy.":"本地 Agent Tower 目标没有响应,因此隧道不能视为健康。","The tunnel process has exited. The old Quick Tunnel link is unlikely to recover.":"隧道进程已退出,旧 Quick Tunnel 链接大概率无法恢复。","The tunnel reported an error. Check the diagnostics before generating a new link.":"隧道报告了错误。生成新链接前请先查看诊断信息。","A new Quick Tunnel link was generated. The old link and token are no longer valid.":"已生成新的 Quick Tunnel 链接。旧链接和 token 已失效。","Agent Tower is asking Cloudflare Quick Tunnel for a temporary public URL.":"Agent Tower 正在向 Cloudflare Quick Tunnel 申请临时公网链接。","Last checked":"上次检查","Last healthy":"上次健康",Never:"从未","Agent Tower is keeping the same URL and waiting for Cloudflare Quick Tunnel to recover.":"Agent Tower 会保留同一个 URL,并等待 Cloudflare Quick Tunnel 自行恢复。","The previous tunnel link and token are no longer valid.":"之前的隧道链接和 token 已不再有效。","Generating a new link will invalidate the current link. People using the old URL must receive the new one.":"生成新链接会使当前链接失效。正在使用旧 URL 的人需要收到新链接。","Regenerate link":"重新生成链接","Generating...":"生成中...","Token protected":"受 Token 保护","Copy shareable link":"复制分享链接","No tunnel link available":"暂无可用隧道链接","Hide token":"隐藏 Token","Show token":"显示 Token","Copy token":"复制 Token","Stopping...":"停止中...","Stop Tunnel":"停止隧道","Create & Start":"创建并启动","Create TeamRun":"创建 TeamRun","Creating TeamRun...":"正在创建 TeamRun...","Team Status":"团队状态","Team mode":"团队模式","Review reason":"审查原因",Members:"成员","No members":"暂无成员",Queue:"队列","No queued work requests":"暂无排队中的工作请求","Active invocations":"活动调用","No active invocations":"暂无活动调用","Recently completed":"最近完成","No completed invocations":"暂无已完成调用","New session per request":"每次新会话","Resume last session":"复用上次会话",Latest:"最新","Invocation history":"调用历史","No invocation history":"暂无调用历史","No invocations yet":"暂无调用记录","All members idle":"所有成员空闲",Log:"日志",Details:"详情",Workspaces:"工作区",Owner:"所有者",Parent:"父级",Selected:"已选",Select:"选择","View workspace":"查看工作区",Invocation:"调用",Session:"会话","View log":"查看日志","View details":"查看详情","Team room":"团队房间","No room messages yet":"暂无房间消息",Messages:"消息","Work requests":"工作请求","Active work":"进行中的工作",Working:"正在工作","Queued...":"排队中...","Waiting reply...":"等待回复...",running:"进行中",queued:"排队",waiting:"等待",ended:"已结束",Elapsed:"耗时",Failed:"失败","Session ended":"会话已结束","Failed to send room message":"发送房间消息失败",selected:"已选择","Back to bottom":"回到底部","Expand full message":"展开全部","Collapse message":"收起","Invocation details":"调用详情","Back to room":"返回群聊","Pending approval":"待审批","Tool Calls":"工具调用",已处理:"已处理","已处理 {duration}":"已处理 {duration}","No pending approvals":"暂无待审批项",Requester:"发起者",User:"用户",System:"系统","Waiting room reply":"等待房间回复",Queued:"排队中",Idle:"空闲","Queue if busy":"忙碌时排队","Cancel current if busy":"忙碌时取消当前并开始","Cancel queued":"取消排队",Approve:"批准",Approving:"批准中...",Reject:"拒绝",Rejecting:"拒绝中...",Cancelling:"取消中...","Failed to update work request":"更新工作请求失败","Failed to cancel work request":"取消工作请求失败",Stop:"停止","Stop running work?":"停止正在运行的工作?","Stop only":"仅停止","Stop + clear queue":"停止并清空队列",Stopping:"停止中...","Failed to stop member work":"停止成员工作失败",Yes:"是",No:"否","Creating Task...":"正在创建任务...","Creating Workspace...":"正在创建工作区...","Creating Session...":"正在创建会话...","Starting Agent...":"正在启动 Agent...","Creating worktree":"正在创建工作树","Creating session":"正在创建会话","Starting agent":"正在启动 Agent","Starting task":"正在启动任务","Agent start failed":"启动 Agent 失败","Preparing workspace":"准备工作空间","Run setup script":"执行 Setup 脚本","Running setup ({current}/{total})":"正在执行 Setup({current}/{total})","Setup complete":"Setup 完成","View setup output":"查看 Setup 输出","Hide setup output":"收起 Setup 输出","Setup failed":"Setup 失败","More details":"更多详情","Hide details":"收起详情","Retry start":"重试启动 Agent","Workspace setup is running in the background.":"工作空间正在后台准备。","启动 Agent 失败":"启动 Agent 失败","重试启动 Agent":"重试启动 Agent","Create New Project":"创建新项目","Creating...":"创建中...","Checking...":"检查中...",Create:"创建","Create Project":"创建项目","Initialize Git repository?":"初始化 Git 仓库?","Initialize and Create":"初始化并创建","This directory is empty and does not have Git version control yet. Agent Tower can initialize Git and create the initial commit before creating the project.":"该目录为空且尚未启用 Git 版本管理。Agent Tower 可以先初始化 Git 并创建初始提交,然后再创建项目。","The selected directory is not a Git repository and is not empty. Initialize Git manually and make an initial commit, then create the project.":"所选目录不是 Git 仓库且不为空。请手动初始化 Git 并完成首次提交,然后再创建项目。","Selected path is not a valid directory":"所选路径不是有效目录","Could not check repository path":"无法检查仓库路径","Could not check project path":"无法检查项目路径","Project Name":"项目名称","e.g., Agent Tower":"例如:Agent Tower","Repository Path":"仓库路径","Create New Task":"创建新任务",Execution:"执行方式","Solo Agent":"Solo Agent",Project:"项目",Provider:"Provider",Agent:"Agent","Select project...":"选择项目...","Select provider...":"选择 Provider...","Task Title":"任务标题","e.g., Implement login flow":"例如:实现登录流程",Description:"描述","Optional...":"可选...","Optional description...":"可选描述...","Drop files here":"将文件拖到这里","Attach files":"添加文件","or paste files":"或粘贴文件","or paste/drag files":"或粘贴/拖拽文件","Drag to resize":"拖动以调整大小","Failed to create task":"创建任务失败","Failed to create project":"创建项目失败","Select a task from the sidebar to view logs, monitor execution, or interact with an agent.":"从侧边栏选择一个任务,以查看日志、监控执行过程,或与 Agent 交互。","Open in IDE":"在 IDE 中打开","Toggle Workspace":"切换工作区面板","More actions":"更多操作","No description":"暂无描述","Setup ({current}/{total}): {command}":"Setup({current}/{total}):{command}","Loading logs...":"正在加载日志...","Waiting for agent output...":"等待 Agent 输出...","No logs recorded for this session.":"当前会话暂无日志记录。","Scroll to bottom":"滚动到底部","Send failed. Please try again.":"发送失败,请重试","Drop files here...":"将文件拖到这里...","Continue conversation...":"继续对话...","Message Agent...":"给 Agent 发送消息...","Upload file":"上传文件","Uploading...":"上传中...",Send:"发送","Describe your task...":"描述你的任务...","Switch to TeamRun":"切换到 TeamRun","Switch to Solo Agent":"切换到单 Agent"," (unavailable)":"(不可用)","Manage Team Members":"管理团队成员","Add member":"添加成员","Save member":"保存成员","Edit member":"编辑成员","Remove member":"移除成员",Remove:"移除","Member added":"成员已添加","Member updated":"成员已更新","Member removed":"成员已移除","Failed to save member":"保存成员失败","Failed to remove member":"移除成员失败","Name, provider, and role prompt are required":"名称、Provider 和角色提示词不能为空","No active members":"暂无活跃成员","Add member from preset":"从预设添加成员","Choose a saved preset to add a ready-to-run member snapshot.":"选择已保存的预设,添加一个可直接工作的成员快照。","Custom member":"自定义成员",Custom:"自定义","Use preset":"使用预设",Preset:"预设","Select a member":"选择成员","Choose a member on the left to edit its future TeamRun configuration.":"从左侧选择成员,编辑其后续 TeamRun 配置。","Provider, role, workspace, and session changes apply to future work only.":"Provider、角色、工作区和会话变更只影响后续工作。","Create a one-off member snapshot for this TeamRun.":"为当前 TeamRun 创建一次性的成员快照。","Create a custom member for this TeamRun, or add presets from Team Collaboration Settings.":"可以为当前 TeamRun 创建自定义成员,或先在团队协作设置中添加预设。","Remove this member from future TeamRun work?":"将该成员从后续 TeamRun 工作中移除?",Name:"名称",Aliases:"别名",Avatar:"头像","Workspace policy":"工作区策略","Trigger policy":"触发策略","Session policy":"会话策略","Queue policy":"队列策略","Role prompt":"角色提示词",Capabilities:"能力","Comma separated":"用逗号分隔","No member presets":"暂无成员预设","...":"...","alice, a, reviewer":"alice, a, reviewer","Checking preview target...":"正在检查预览目标...","Configure a local preview target to display it here.":"配置本地预览目标后将在此显示。","Delete Project":"删除项目","Deleted projects are read-only":"已删除项目为只读","Deleting...":"删除中...","Enter a local preview URL on the Agent Tower machine.":"输入 Agent Tower 所在机器上的本地预览 URL。","Failed to delete project":"删除项目失败","Failed to load full message":"加载完整消息失败","Failed to restore project":"恢复项目失败","Failed to save preview target":"保存预览目标失败",Forward:"前进","Git Commit Message":"Git Commit Message",Loading:"加载中","Loopback only":"仅限本机回环地址","Mention members":"提及成员","Message the team room...":"向 Team Room 发送消息...","No active workspace.":"暂无活动工作区。","Open preview in new tab":"在新标签页打开预览","Preview target is not reachable":"预览目标不可访问","Preview target saved":"预览目标已保存","Preview address":"预览地址",Private:"私密",Proxying:"代理中","Read-only":"只读",Refresh:"刷新","Refresh preview":"刷新预览","Remove mention":"移除提及","Restore Project":"恢复项目","Restoring...":"恢复中...",Save:"保存","Save preview target":"保存预览目标","Start the preview server, then refresh.":"启动预览服务后刷新。","Stop loading":"停止加载","Team members":"团队成员","this project":"此项目","This project is read-only":"此项目为只读","10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果":"10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果",设计推荐:"设计推荐","首选:Charcoal Breathe (#10)":"首选:Charcoal Breathe (#10)","备选A:Tower Pulse (#1)":"备选A:Tower Pulse (#1)","备选B:Terminal Cursor (#4)":"备选B:Terminal Cursor (#4)","品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。":"品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。","品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。":"品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。","终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。":"终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。","全屏预览:{name}":"全屏预览:{name}",关闭预览:"关闭预览","按 Esc 或点击关闭按钮退出":"按 Esc 或点击关闭按钮退出","Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。":"Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。","五根柱状条交错升降,暗喻任务编排队列,节奏感强。":"五根柱状条交错升降,暗喻任务编排队列,节奏感强。","双层同心圆环反向旋转,精密工具质感,不浮夸。":"双层同心圆环反向旋转,精密工具质感,不浮夸。","终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。":"终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。","三点波浪脉动,极简克制,适合工具型产品的默认加载。":"三点波浪脉动,极简克制,适合工具型产品的默认加载。","三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。":"三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。","水平光束往复滑过进度条,线性进度隐喻,不阻断视线。":"水平光束往复滑过进度条,线性进度隐喻,不阻断视线。","三列骨架屏微闪,预示看板布局,减少布局跳变。":"三列骨架屏微闪,预示看板布局,减少布局跳变。","圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。":"圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。","Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。":"Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。",active:"活跃",working:"工作中"},en:{设置:"Settings",通用:"General",返回:"Back","加载中...":"Loading...",暂无选项:"No options","处理中...":"Processing...",确认:"Confirm",取消:"Cancel",工具调用:"Tool Calls",已处理:"Processed","已处理 {duration}":"Processed {duration}",正在思考:"Thinking","最后一次输出于 {duration}前":"Last output {duration} ago",等待首次输出:"Waiting for the first output","{count} 秒":"{count}s","{minutes} 分 {seconds} 秒":"{minutes}m {seconds}s","{hours} 小时 {minutes} 分":"{hours}h {minutes}m","失败 {count}":"Failed {count}",通用设置:"General Settings",显示语言:"Display Language","选择界面语言。设置会保存到本地 Agent Tower 数据库,并在重新打开后继续生效。":"Choose the interface language. The setting is saved to the local Agent Tower database and will still apply after restart.",简体中文:"Simplified Chinese",语言设置:"Language setting",语言设置保存失败:"Language setting could not be saved",Priority:"Priority","Task priority":"Task priority",紧急:"Urgent",普通:"Normal",优先级变更失败:"Failed to update task priority","Agent 配置":"Agent Settings",项目配置:"Project Settings",通知:"Notifications","MCP 配置":"MCP Config","复制下面的 JSON 到支持 MCP 的客户端配置中。桌面打包版使用 App 内置 runtime,不需要全局安装 agent-tower。":"Copy this JSON into an MCP-capable client config. The packaged desktop app uses the bundled runtime and does not require a global agent-tower install.",复制配置:"Copy Config","MCP 配置已复制":"MCP config copied","复制 MCP 配置失败":"Failed to copy MCP config","MCP 配置加载失败":"Failed to load MCP config","无需全局 CLI":"No global CLI needed","桌面打包 runtime":"Desktop packaged runtime","工作区 runtime":"Workspace runtime","当前版本只生成通用 MCP 配置,不会自动修改 Claude、Codex 或其他第三方客户端配置文件。":"This version only generates generic MCP config and does not modify Claude, Codex, or other third-party client config files automatically.","暂无项目,请先创建项目":"No projects yet. Create one first.",选择项目:"Select Project","选择项目...":"Select project...",自动复制文件:"Auto-copy Files","创建 worktree 时自动从主仓库复制的文件或目录。支持 glob 模式。":"Files or directories to copy from the main repository when creating a worktree. Glob patterns are supported.","适用于不在 git 管理中但启动必需的文件,如 .env、node_modules、数据库文件等":"Useful for required startup files that are not tracked by git, such as .env, node_modules, or database files.","Setup 脚本":"Setup Script","创建 worktree 后自动执行的命令,每行一条,按顺序执行。":"Commands to run automatically after creating the worktree, one per line in order.","命令在 worktree 目录下执行,单条命令超时 5 分钟,失败不会阻断后续命令":"Commands run inside the worktree directory. Each command times out after 5 minutes, and a failure does not block later commands.",常用命令:"Quick Commands","在终端中可快速执行的命令,不会自动运行。":"Commands that can be run quickly in the terminal. They are not executed automatically.","保存中...":"Saving...",保存:"Save",有未保存的更改:"You have unsaved changes",系统通知:"System Notifications",任务完成时弹出桌面通知:"Show a desktop notification when a task finishes.",第三方通知:"Third-party Notifications",选择一个第三方渠道接收通知:"Choose a third-party channel to receive notifications.",无:"None",飞书:"Feishu",测试发送:"Send Test",发送成功:"Sent successfully",发送失败:"Send failed","跳转地址(用于生成任务链接)":"Base URL (used to generate task links)",'通知卡片中的"查看任务"按钮将跳转到 {path}':'The "View Task" button in the notification card will open {path}',通知模板:"Notification Templates","支持变量: {taskTitle}, {taskId}, {projectId}, {projectName}, {status}":"Supported variables: {taskTitle}, {taskId}, {projectId}, {projectName}, {status}",标题模板:"Title Template",内容模板:"Body Template",'✅ "{taskTitle}" 已完成,等待审查':'✅ "{taskTitle}" is complete and ready for review',保存所有更改:"Save All Changes","启动失败: {message}":"Start failed: {message}",未知错误:"Unknown error",会话已停止:"Session stopped","Agent 交互演示":"Agent Interaction Demo","选择 Agent":"Select Agent","输入你的问题或任务...":"Enter your question or task...","启动中...":"Starting...",开始:"Start",对话:"Conversation",已连接:"Connected","连接中...":"Connecting...",未连接:"Disconnected",停止:"Stop","选择 Agent 并输入问题开始对话":"Select an agent and enter a prompt to start chatting.",你:"You","发送后续消息...":"Send a follow-up message...",发送:"Send",新会话:"New Session",未选择:"Not selected",连接:"Connection","Profiles 设置":"Profile Settings","配置变体 (Profile Variant)":"Profile Variant",输入任务:"Task Input","等待 Agent 响应...":"Waiting for agent output...","发送消息给 Agent...":"Send a message to the agent...","启动失败,请重试":"Failed to start. Please try again.",启动:"Start","创建工作空间...":"Creating workspace...","创建会话...":"Creating session...","启动 Agent...":"Starting agent...","启动 Agent":"Start Agent","选择 Provider":"Select Provider"," (不可用)":" (Unavailable)",任务描述:"Task Description","描述你想让 Agent 完成的任务...":"Describe the task you want the agent to complete...","输入文件路径...":"Enter a file path...",添加:"Add",添加此目录:"Add this directory",名称:"Name",命令:"Command",切换渠道:"Switch Provider","(默认)":"(Default)","留空为 auto;或直接输入模型 ID(与 cursor-agent --model 一致)":"Leave empty for auto, or enter a model ID directly (same as cursor-agent --model).","正在加载 cursor-agent 模型列表…":"Loading cursor-agent model list...",收起列表:"Collapse List","从本机 cursor-agent 选择({count} 个)":"Choose from local cursor-agent ({count})","筛选模型…":"Filter models...","默认 (auto)":"Default (auto)",无匹配项:"No matches",请求失败:"Request failed","无法从本机加载模型列表({error})。仍可手动输入;或在安装 cursor-agent 的机器上运行":"Could not load models from the local machine ({error}). You can still enter one manually, or run","查看 ID。":"to inspect available IDs.","Windows 将下载并执行官方 PowerShell 安装脚本;不会使用复制粘贴式 shell pipeline。":"Windows will download and run the official PowerShell installer script; no copy-paste shell pipeline is used.","安装器可能已完成,但当前 Agent Tower 进程尚未刷新 PATH;请重启 Agent Tower 后重新检测。":"The installer may have completed, but the current Agent Tower process has not refreshed PATH. Restart Agent Tower and detect again.","JSON 格式错误":"Invalid JSON format","删除 Profile Variant":"Delete Profile Variant","确定删除 {agentType} / {variant}?":"Delete {agentType} / {variant}?",新增:"New",内置:"Built-in","新增 Variant — {agentType}":"New Variant — {agentType}","编辑 {variant}":"Edit {variant}","Variant 名称":"Variant Name","例如: CUSTOM":"e.g. CUSTOM","配置 (JSON)":"Configuration (JSON)","状态变更失败,该操作不被允许":"Status change failed. This action is not allowed.","Git 操作":"Git Operations",删除任务:"Delete Task","Setup 完成":"Setup complete","Setup 失败: {error}":"Setup failed: {error}","尚未启动 Agent":"No agent started yet","选择一个 Agent 来执行此任务":"Choose an agent to execute this task.","选择一个 Agent 来执行此任务,Agent 将自动创建工作空间并开始工作。":"Choose an agent to execute this task. The agent will create a workspace automatically and start working.",回到底部:"Back to Bottom","代码已合并,以上为历史沟通记录":"The code has been merged. The conversation above is historical.","启动新 Agent":"Start New Agent","确认删除任务「{title}」?此操作不可撤销。":'Delete task "{title}"? This action cannot be undone.',删除:"Delete","正在运行的 Agent 将被停止":"The running agent will be stopped.",分支上未合并的变更将丢失:"Unmerged changes on the branch will be lost.","关联的工作目录(worktree)将被清理":"The associated worktree directory will be cleaned up.","{opLabel} 冲突 — {count} 个文件":"{opLabel} conflicts — {count} files",中止操作:"Abort Operation",解决冲突:"Resolve Conflicts","解决 {opLabel} 冲突":"Resolve {opLabel} Conflicts","在 IDE 中打开":"Open in IDE","发送中...":"Sending...","AI 辅助解决":"Resolve with AI","冲突文件({count})":"Conflicted Files ({count})","选择 Session(AI 辅助解决)":"Choose Session (Resolve with AI)","选择一个 Session...":"Select a session...","没有可用的 Session,请在 IDE 中手动解决冲突。":"No session is available. Please resolve the conflicts manually in your IDE.","TeamRun 模式下会把处理冲突请求发送到 Team Room,由团队调度处理。":"In TeamRun mode, the conflict request will be sent to Team Room for team scheduling.","已发送到 Team Room":"Sent to Team Room",快捷命令:"Quick Commands",待办:"Todos","上下文: {used} / {max} tokens":"Context: {used} / {max} tokens","已使用: {used} tokens":"Used: {used} tokens",可用:"Available",不可用:"Unavailable",该类型暂无运行配置:"No runtime configuration is available for this type.","追加 Prompt":"Append Prompt","追加到每次 prompt 末尾的文本":"Text appended to the end of every prompt.",跳过权限确认:"Skip Permission Confirmation","自动批准操作(YOLO)":"Auto-approve Actions (YOLO)",模型:"Model",推理强度:"Reasoning Effort",强制执行:"Force Execution",跳过所有确认和沙盒:"Skip All Confirmations and Sandbox","Fast 模式":"Fast mode","支持的模型速度约提升至 1.5 倍,并增加用量消耗。ChatGPT 登录消耗更多额度;API Key 按 Priority 处理计费。":"Supported models run about 1.5x faster with increased usage. ChatGPT sign-in consumes more credits; API keys use Priority processing rates.","Fast 模式字段必须为 true 或 false,请在运行配置 JSON 中修正。":"The Fast mode field must be true or false. Fix it in the runtime configuration JSON.","跟随 Codex":"Use Codex default",标准速度:"Standard speed",Profile:"Profile","~/.codex/config.toml 中的 profile 名称":"Profile name in ~/.codex/config.toml",是:"Yes",否:"No",覆盖:"Overwrite",跳过:"Skip","JSON 语法错误":"Invalid JSON syntax","TOML 语法错误: {message}":"Invalid TOML syntax: {message}","编辑 Provider":"Edit Provider","新建 Provider":"New Provider","例如: Claude Code (官方)":"e.g. Claude Code (Official)","Agent 类型":"Agent Type","选择 Agent 类型":"Select Agent Type","Codex (ACP)":"Codex (ACP)","设为该类型的默认 Provider":"Set as the default provider for this agent type",基本配置:"Basic Configuration","API 地址":"API URL","请输入以 http:// 或 https:// 开头的完整 API 地址":"Enter a complete API URL beginning with http:// or https://.","输入 API Key":"Enter API Key",未配置:"Not configured",由高级配置管理:"Managed in advanced configuration",替换:"Replace",取消替换:"Cancel replacement","确定清除此 API Key?":"Clear this API key?",思考强度:"Reasoning Effort","跟随 CLI":"Use CLI default",更高效:"More efficient",更智能:"More capable",当前:"Current",最低:"Minimal",低:"Low",中:"Medium",高:"High",超高:"Extra high",最高:"Maximum","请选择当前 Agent 支持的思考强度档位":"Choose a reasoning effort supported by this agent.",测试配置:"Test Configuration","测试中...":"Testing...","保存 Provider":"Save Provider",高级配置:"Advanced Configuration",执行权限:"Execution Permission","禁用 WebSocket":"Disable WebSocket","仅禁用 Codex Responses API 的 WebSocket 传输;新启动和后续继续的请求将使用 HTTP。":"Disable only the Codex Responses API WebSocket transport. New sessions and follow-ups will use HTTP.","当前原生 Provider 已使用非 WebSocket 传输;此开关不会添加额外运行时覆盖。":"The current native provider already uses a non-WebSocket transport. This switch adds no runtime override.","禁用 WebSocket 字段必须为 true 或 false,请在运行配置 JSON 中修正。":"The Disable WebSocket field must be true or false. Correct it in the runtime JSON.",高风险执行已开启:"High-risk execution enabled","Agent 将不再请求工具执行权限确认。":"The agent will no longer ask for tool execution permission.","Agent 将自动批准操作,不再逐项请求确认。":"The agent will approve operations automatically without asking for each action.","Agent 将以强制模式执行操作。":"The agent will execute operations in force mode.","Agent 将拥有完全访问电脑的权限":"The agent will have full access to this computer.","执行权限字段必须为 true 或 false,请在运行配置 JSON 中修正。":"The execution permission field must be true or false. Correct it in the runtime JSON.","开启高风险执行权限?":"Enable high-risk execution permission?",确认开启:"Enable","配置错误:权限字段必须为布尔值":"Configuration error: the permission field must be a boolean.",配置错误:"Configuration error",权限已开启:"Enabled",权限已关闭:"Disabled","运行配置 (JSON)":"Runtime Configuration (JSON)",配置检查通过:"Configuration check passed",连接测试通过:"Connection test passed",本机可用性检查通过:"Local availability check passed",配置检查未通过:"Configuration check did not pass",测试对象:"Test target",测试时间:"Tested at",需要解决配置冲突:"Configuration conflicts must be resolved",简化字段与高级配置值不同:"The simplified and advanced values differ",采用简化值:"Use simplified value",保留高级值:"Keep advanced value","测试失败不会阻止保存。":"A failed test does not prevent saving.",测试配置失败:"Configuration test failed","存在未保存的修改,确定放弃吗?":"Discard the unsaved changes?","切换 Agent 类型会清空当前类型的配置,是否继续?":"Changing the agent type clears the current type-specific configuration. Continue?","JSON 顶层必须是对象":"The top-level JSON value must be an object.","{format} 语法错误: {message}":"Invalid {format} syntax: {message}","已配置,输入新值以替换":"Configured. Enter a new value to replace it.",权限策略:"Permission Policy",每次询问:"Ask Every Time",无限制:"Unrestricted","ACP 权限策略必须为 ASK 或 UNRESTRICTED":"ACP permission policy must be ASK or UNRESTRICTED",运行配置:"Runtime Configuration",环境变量:"Environment Variables","注入到 Agent 进程的环境变量。Codex 的":"Environment variables injected into the agent process. Codex","指定的是变量名,实际值需在此处设置。":"specifies the variable name in env_key, and the actual value must be set here.","变量名,如 AZURE_OPENAI_API_KEY":"Variable name, e.g. AZURE_OPENAI_API_KEY",值:"Value",添加变量:"Add Variable","CLI 原生配置 (config.toml)":"Native CLI Config (config.toml)","CLI 原生配置 (settings.json)":"Native CLI Config (settings.json)","Agent 原生配置 (config.toml)":"Native Agent Config (config.toml)","Agent 原生配置 (settings.json)":"Native Agent Config (settings.json)","直接填写 Codex":"Enter a Codex","格式的配置片段,由当前 Runtime 注入。不会修改你的":"configuration snippet. The selected runtime injects it without modifying your","格式的配置片段,通过":"configuration snippet directly and inject it via","参数注入。不会修改你的":". It will not modify your","文件。":"file.","对应 Claude Code 的":"This corresponds to Claude Code","由当前 Runtime 注入。在":". The selected runtime injects it. Configure",通过:"and is injected through","参数注入。在":". Configure","中设置 ANTHROPIC_API_KEY、ANTHROPIC_BASE_URL 等。":"inside env, such as ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL.","导出 Provider 备份":"Export Provider Backup","导出中...":"Exporting...",导出备份:"Export Backup","导出的备份文件将包含完整的 Provider 配置,包括环境变量、CLI settings 等敏感信息。任何拿到文件的人都可能直接使用这些 Provider。":"The exported backup file contains the full provider configuration, including sensitive information such as environment variables and CLI settings. Anyone with this file may be able to use those providers directly.","这个功能用于备份和迁移,不用于分享配置。":"This feature is for backup and migration, not for sharing configuration.","导出内容只包含用户层配置:自定义 Provider,以及对内置 Provider 的覆盖。":"The export only contains user-level configuration: custom providers and overrides of built-in providers.","我已知晓该备份文件包含敏感信息,只会保存在安全位置。":"I understand that this backup contains sensitive information and will only store it in a secure location.","导入 Provider 备份":"Import Provider Backup","导入中...":"Importing...","确认导入 {count} 项":"Import {count} item(s)","导出时间:{value}":"Exported at: {value}","模式:完整备份(含敏感信息)":"Mode: Full backup (contains sensitive data)","文件内 Provider 数量:{count}":"Providers in file: {count}","将覆盖当前已有的 Provider:{name}":"This will overwrite the existing provider: {name}","当前同 ID Provider 配置一致,本次不会重复写入。":"The provider with the same ID is already identical. It will not be written again.","当前不存在同 ID Provider,将直接新增。":"No provider with the same ID exists. It will be created directly.","系统内置 Provider 不可删除":"Built-in providers cannot be deleted.","已恢复默认 Provider 配置":"Default provider configuration restored.","Provider 已删除":"Provider deleted.","删除 Provider 失败":"Failed to delete provider.","Provider 备份已导出":"Provider backup exported.","导出 Provider 备份失败":"Failed to export provider backup.","备份文件不是有效的 JSON":"The backup file is not valid JSON.",导入预览失败:"Failed to preview import.","导入完成,当前配置无需变更":"Import complete. No changes were needed.","导入完成:新增 {create},覆盖 {overwrite},跳过 {skip}":"Import complete: created {create}, overwritten {overwrite}, skipped {skip}","导入 Provider 备份失败":"Failed to import provider backup.","Provider 配置":"Provider Configuration","管理 AI Agent 的连接配置和运行参数":"Manage AI agent connection settings and runtime parameters.",导入备份:"Import Backup","暂无 Provider 配置":"No providers configured yet.",默认:"Default","CLI 配置:":"CLI Config:",已配置:"Configured","环境变量:":"Environment Variables:",编辑:"Edit",编辑标题:"Edit title",输入任务标题:"Enter task title",字符:"characters",删除自定义覆盖并恢复默认:"Delete custom override and restore default","恢复默认 Provider":"Restore Default Provider",'确定删除 "{name}" 的自定义覆盖,并恢复系统默认配置?':'Delete the custom override for "{name}" and restore the system default configuration?','确定删除 "{name}"?此操作不可撤销。':'Delete "{name}"? This action cannot be undone.',恢复默认:"Restore Default","{count} 个未提交变更":"{count} uncommitted changes","{count} 个冲突文件":"{count} conflicted files",变基进行中:"Rebase in progress",合并进行中:"Merge in progress","领先 {count} 个提交":"{count} commits ahead","落后 {count} 个提交":"{count} commits behind",已是最新:"Up to date","工作区有未提交的变更,请先让 Agent 提交或手动处理后再执行 Rebase / Merge 操作。":"The workspace has uncommitted changes. Ask the agent to commit them or handle them manually before running Rebase / Merge.",变基失败:"Rebase failed",合并失败:"Merge failed",确认合并:"Confirm Merge","加载分支状态...":"Loading branch status...","变基中...":"Rebasing...","变基 (Rebase)":"Rebase","将当前分支变基到最新的 {targetBranch}":"Rebase the current branch onto the latest {targetBranch}","合并 (Merge)":"Merge","合并中...":"Merging...","Squash merge 到 {targetBranch}":"Squash merge into {targetBranch}",提交消息:"Commit Message","输入提交消息...":"Enter commit message...",留空将使用默认消息:"Leave blank to use the default message.","Git Commit Message":"Git Commit Message","配置自动生成 commit message 时使用的 Agent 渠道和提示词。":"Configure the agent provider and prompt used for auto-generating commit messages.",访问安全:"Access Security",访问密码:"Access Password","开启后,进入 Agent Tower 需要输入密码。":"When enabled, Agent Tower requires this password before opening.",未启用:"Off",已启用:"On",将启用:"Will turn on",将关闭:"Will turn off",修改密码:"Change password",退出登录:"Log out","退出中...":"Logging out...",退出登录失败:"Failed to log out",已退出登录:"Logged out",当前密码:"Current password",新密码:"New password",确认密码:"Confirm password",请输入当前密码:"Enter the current password","密码至少需要 8 个字符":"Password must be at least 8 characters",两次输入不一致:"Passwords do not match",当前密码不正确:"Current password is incorrect","关闭后不再要求访问密码。":"After turning it off, Agent Tower will no longer require an access password.","保存后其他已登录页面需要重新输入。":"After saving, other signed-in pages will need to enter the password again.",关闭访问密码:"Turn off access password",已关闭:"Turned off","密码不正确,请重试":"Incorrect password. Please try again.",输入访问密码继续:"Enter the access password to continue","验证中...":"Verifying...",解锁:"Unlock","访问状态加载失败,请刷新后重试。":"Failed to load access status. Refresh and try again.","Agent 渠道":"Agent Provider",跟随任务:"Follow Task",'"跟随任务"表示使用当前任务所用的 Agent 渠道。选择具体渠道可使用更经济的模型。':'"Follow Task" uses the same provider as the current task. Select a specific provider to use a more cost-effective model.',提示词模板:"Prompt Template","自定义生成 commit message 的提示词。留空则使用内置默认模板。":"Custom prompt for generating commit messages. Leave empty to use the built-in default template.",保存失败:"Save failed",已保存:"Saved",已创建:"Created",创建:"Create",单人:"Solo",团队:"Team",团队协作:"Team Collaboration",团队协作设置:"Team Collaboration Settings","管理成员预设与团队模板。":"Manage member presets and team templates.",成员预设:"Member Presets",团队模板:"Team Templates","点击列表项可编辑。":"Click an item to edit it.",当前没有成员预设:"No member presets yet.",当前没有团队模板:"No team templates yet.",创建新成员预设:"Create a new member preset",编辑成员预设:"Edit member preset",创建新团队模板:"Create a new team template",编辑团队模板:"Edit team template",成员预设名称:"Member preset name",成员预设别名:"Member preset aliases",成员预设头像:"Member preset avatar",成员预设角色提示词:"Member preset role prompt",团队模板名称:"Team template name",别名:"Aliases",头像:"Avatar",角色提示词:"Role Prompt",可用能力:"Capabilities",工作区策略:"Workspace Policy",触发策略:"Trigger Policy",共享:"Shared",独占:"Dedicated",仅提及:"Mention only",所有用户消息:"All user messages",读房间:"Read room",发房间消息:"Post room message",提及成员:"Mention members",停止成员工作:"Stop member work",标记可审查:"Mark ready for review",读文件:"Read files",写文件:"Write files",运行命令:"Run commands","读 diff":"Read diff",合并工作区:"Merge workspace","{count} 个成员":"{count} member(s)","Provider 列表加载失败":"Failed to load providers","Provider 列表加载失败,无法创建或修改成员预设。":"Failed to load providers. Member presets cannot be created or updated.",成员预设加载失败:"Failed to load member presets",团队模板加载失败:"Failed to load team templates","请稍后重试。":"Please try again later.",重试:"Retry","暂无可用 Provider,请先在 Agent 配置中创建。":"No available provider. Create one in Agent Settings first.","alice, a, reviewer":"alice, a, reviewer","选择顺序即保存顺序。":"Selection order is the saved order.",已选成员:"Selected Members","上移下移后即为保存顺序。":"Use up/down to change the saved order.",尚未选择成员预设:"No member presets selected yet.","先创建成员预设,再配置团队模板。":"Create member presets first, then configure a team template.",删除失败:"Delete failed",上移:"Move up",下移:"Move down","创建 TeamRun":"Create TeamRun",TeamRun:"TeamRun",模式:"Mode",执行模式:"Execution mode","TeamRun 模式":"TeamRun mode",确认模式:"Confirm mode",自动模式:"Auto mode","默认使用自动模式,团队消息会直接排队执行。":"Auto mode is the default. Team messages are queued for execution directly.","模板成员会先加入,随后按顺序追加所选成员。":"Template members are added first, then the selected members are appended in order.","请选择至少一个团队模板或成员预设。":"Select at least one team template or member preset.","该任务已经存在 TeamRun。请刷新后再试。":"This task already has a TeamRun. Refresh and try again.","创建 TeamRun 失败":"Failed to create TeamRun","TeamRun 创建失败,请检查团队配置后重试":"TeamRun creation failed. Please check team config and retry.","前往 /settings/team 创建":"Go to /settings/team to create one","欢迎使用 Agent Tower":"Welcome to Agent Tower","需要我帮你做点什么?":"What can I help you with?","描述任务,选择 Agent 或团队,即刻开始":"Describe a task, pick an Agent or team, and start right away","描述一个任务,AI Agent 将为你开始工作":"Describe a task and an AI agent will start working on it.","TeamRun 协作配置":"TeamRun Configuration",团队协作配置:"Team Collaboration Config","切换回单 Agent":"Switch to Solo Agent",追加成员:"Additional Members","{count} 个追加成员":"{count} additional member(s)",去创建:"Create",请选择团队模板或追加成员:"Select a team template or add members","工作树隔离改动,支持 TeamRun、Merge、Rebase 和冲突解决。":"Worktrees isolate changes and support TeamRun, Merge, Rebase, and conflict resolution.","初始化 Git 后可使用工作树模式。":"Initialize Git to use worktree mode.","本地模式会直接修改项目主目录,不会自动提交,也不能使用 Merge、Rebase 或冲突解决。":"Main directory mode modifies the project directory directly. Auto-commit, Merge, Rebase, and conflict resolution are unavailable.","非 Git 项目只能使用本地模式。":"Non-Git projects can only use main directory mode.","TeamRun 需要工作树模式。开启团队模式时会自动切换为工作树模式。":"TeamRun requires worktree mode. Enabling team mode will switch to worktree mode automatically.","启用 TeamRun 后可选择团队模板或成员。":"After enabling TeamRun, choose a team template or members.",收起:"Collapse","没有可用项目,请先创建或恢复项目":"No available projects. Please create or restore a project first.","任务已创建,但启动 Agent 失败,可在详情中重试":"Task created, but failed to start Agent. You can retry from the task detail.",冲突:"Conflict",变基中:"Rebasing",合并中:"Merging","{count} 未提交":"{count} uncommitted","落后 {count}":"Behind {count}",可合并:"Mergeable",查看变更详情:"View changes","分支落后 {count} 个提交,建议先执行变基 (Rebase) 同步最新代码。":"The branch is {count} commits behind. Consider rebasing to sync the latest code.","合并到 {target}":"Merge into {target}",需要先变基同步最新代码:"Rebase required to sync latest code",请先处理未提交变更:"Handle uncommitted changes first","中止中...":"Aborting...","正在检查工作区状态...":"Checking workspace status...",当前分支还没有任何变更:"No changes on this branch yet",调整工作区宽度:"Resize workspace panel","{files} 个文件 · {lines} 行":"{files} files · {lines} lines",更新:"Update",合并:"Merge","{count} 个本地改动未处理,需要先整理后再继续":"{count} local changes pending — clean them up before continuing","{count} 个文件存在冲突,需要处理后继续":"{count} files have conflicts — resolve them to continue","正在同步源分支更新...":"Syncing updates from source branch...","正在提交变更...":"Submitting changes...","源分支 {branch} 有 {count} 个更新":"Source branch {branch} has {count} updates","{count} 个文件变更,可以安全提交":"{count} file changes, safe to submit",同步更新:"Sync updates","正在同步...":"Syncing...",提交变更:"Submit changes",需要先同步源分支更新:"Sync source branch updates first","更新失败,请稍后重试":"Update failed. Please try again later.","提交失败,请稍后重试":"Submit failed. Please try again later.","正在提交...":"Submitting...",确认提交:"Confirm Submit","正在检查后台服务...":"Checking services...","无法检查后台服务状态,提交时会再次确认。":"Background service status could not be checked. The server will verify it when submitting.","合并前将停止 {count} 个后台服务":"{count} background services will be stopped before merging","停止后不会自动恢复。":"They will not restart automatically after being stopped.",停止服务并提交:"Stop Services and Submit","正在停止服务并提交...":"Stopping and submitting...","后台服务仍在运行,请确认停止服务后再提交。":"Background services are still running. Confirm that they should be stopped before submitting.",请描述本次修改的内容:"Describe the changes in this submission","建议以 feat、fix、docs、refactor、chore 开头,保持提交记录清晰。feat 新增功能,fix 修复问题,docs 文档更新,refactor 代码重构,chore 日常维护。":"Start with feat (new feature), fix (bug fix), docs (documentation), refactor (restructure), or chore (maintenance) to keep the history clean.",需要先处理本地改动:"Handle local changes first",处理冲突:"Resolve conflicts","正在撤销...":"Undoing...",撤销操作:"Undo operation",确认后会停止当前工作并取消队列:"Confirming will stop the current work and clear the queue",每次新会话:"New session per request",复用上次会话:"Resume last session",仅自己队列:"Own queue only",全队列待处理:"Team pending queue",代码审查:"Review","{count} 个文件":"{count} files",未选择工作区:"No workspace selected",没有可显示的差异内容:"No diff content available","还有 {count} 行变更被折叠,点击展开全部":"{count} more lines collapsed — click to expand all","正在加载差异...":"Loading diff...",差异加载失败:"Failed to load diff",变更加载失败:"Failed to load changes",没有匹配筛选条件的文件:"No files match the filter",该提交没有文件变更:"No file changes in this commit",没有待审查的变更:"No changes to review",未提交:"Uncommitted",已提交:"Committed","筛选文件...":"Filter files...",无匹配文件:"No matching files",暂无变更文件:"No changed files",提交记录:"Commits",全部变更:"All changes","正在加载提交记录...":"Loading commits...",暂无提交记录:"No commits yet",加载更多提交:"Load more commits","{count} 个成员预设":"{count} member preset(s)","{count} 个团队模板":"{count} team template(s)",本地模式:"Main directory mode",编辑模板:"Edit template",编辑预设:"Edit preset",标题:"Title",测试:"Test",测试消息发送成功:"Test message sent successfully",触发:"Trigger","创建 Provider 失败":"Failed to create provider","创建 worktree 后自动执行的命令,每行一条。在 worktree 目录下执行,单条超时 5 分钟。":"Commands to run automatically after creating a worktree, one per line. Commands run inside the worktree directory and time out after 5 minutes each.","创建 worktree 时自动从主仓库复制的文件或目录,适用于 .env、node_modules 等不在 git 管理中的文件。支持 glob。":"Files or directories to copy from the main repository when creating a worktree, such as .env or node_modules files not tracked by git. Glob patterns are supported.",创建新模板:"Create new template",创建新预设:"Create new preset",当前没有可配置的项目:"No configurable projects yet",导出:"Export",导入:"Import",队列:"Queue","发送失败,请检查 Webhook 地址":"Failed to send. Check the webhook URL.","发送失败: {message}":"Send failed: {message}",返回列表:"Back to list","飞书 Webhook":"Feishu Webhook",'该 Provider 未配置额外参数。点击"编辑"添加运行配置、环境变量或 CLI 配置。':'This provider has no extra parameters configured. Click "Edit" to add runtime configuration, environment variables, or CLI configuration.','该 Provider 未配置额外参数。点击"编辑"添加运行配置、环境变量或 Agent 原生配置。':'This provider has no extra parameters configured. Click "Edit" to add runtime configuration, environment variables, or native agent configuration.',个变体:"variants",个文件:"files","更新 Provider 失败":"Failed to update provider",工作区:"Workspace",工作树模式:"Worktree mode","勾选后会连项目文件一起删除,请谨慎选择。":"When checked, project files will also be deleted. Choose carefully.","勾选后会删除 repoPath 指向的本地仓库目录,并禁用代码/Git 相关能力。":"When checked, the local repository directory pointed to by repoPath will be deleted, and code/Git capabilities will be disabled.","勾选后会删除项目路径指向的本地目录,并禁用代码/Git 相关能力。":"When checked, the local directory at the project path will be deleted, and code/Git capabilities will be disabled.",关闭:"Off","管理 Agent 执行器的配置变体。每个变体定义一组运行参数。":"Manage configuration variants for agent executors. Each variant defines a set of runtime parameters.","合并到 {targetBranch}":"Merge into {targetBranch}","恢复该项目时需要重新绑定一个有效的 Git 仓库路径。":"Restoring this project requires rebinding a valid Git repository path.","恢复该项目时需要重新绑定一个有效的项目路径。":"Restoring this project requires rebinding a valid project path.","恢复后,项目会重新出现在默认项目列表中。":"After restore, the project will appear in the default project list again.",恢复项目:"Restore project",会话:"Session",加载失败:"Failed to load","将归档当前工作区并自动在新 Worktree 中重新启动 Agent,旧工作区内容保留供参考。":"The current workspace will be archived and the agent will restart automatically in a new worktree. The old workspace content is kept for reference.","界面语言会保存到本地数据库,重启后继续生效。":"The interface language is saved to the local database and remains active after restart.","仅支持 PNG、JPG、WebP 头像。":"Only PNG, JPG, and WebP avatars are supported.",可用预设:"Available presets",模板名称:"Template name","成员心跳检测时间(分钟)":"Member heartbeat timeout (minutes)",内容:"Content",能力:"capabilities","启动 Agent 失败":"Failed to start Agent",启用团队模式:"Enable team mode",清除:"Clear",确认重试:"Confirm retry",人:" members",任务完成时弹出系统通知:"Show a system notification when a task finishes.","删除 Provider":"Delete Provider",删除任务失败:"Failed to delete task",删除项目:"Delete project",上传:"Upload",尚未选择:"Nothing selected yet",跳转地址:"Link target",'通知卡片中的"查看任务"按钮跳转地址前缀':'URL prefix for the "View Task" button in notification cards',通知设置:"Notification Settings",同时删除本地项目文件:"Also delete local project files",头像上传失败:"Avatar upload failed","头像图片不能超过 2MB。":"Avatar image must be 2 MB or smaller.",头像已上传:"Avatar uploaded",团队模式:"Team mode","推送到外部渠道(飞书群机器人等)":"Push to external channels such as Feishu bot webhooks.",我已确认这会删除本地项目文件:"I understand this will delete local project files",先创建成员预设:"Create member presets first","项目「{title}」的本地仓库文件已删除。恢复前需要重新绑定一个有效的 Git 仓库路径。":'Local repository files for project "{title}" have been deleted. Rebind a valid Git repository path before restoring it.',"项目「{title}」的本地项目文件已删除。恢复前需要重新绑定一个有效的项目路径。":'Local project files for project "{title}" have been deleted. Rebind a valid project path before restoring it.',"项目「{title}」将从默认项目列表隐藏,但历史任务、workspace 和会话记录仍会保留。":'Project "{title}" will be hidden from the default project list, but historical tasks, workspaces, and sessions will be kept.',"项目将从默认列表隐藏,历史记录保留。可选同时删除本地文件。":"The project will be hidden from the default list while history is kept. You can also delete local files.",项目为只读历史:"Project is read-only history",项目已恢复:"Project restored",项目已删除:"Project deleted","项目已删除,本地仓库文件也已清理。恢复项目并重新绑定仓库后才能继续操作。":"The project was deleted and local repository files were removed. Restore the project and rebind a repository before continuing.","项目已删除,并清理了本地文件":"Project deleted and local files removed","项目已删除。恢复项目后才能继续创建会话或修改任务。":"The project was deleted. Restore it before creating sessions or editing tasks.","项目已删除。Workspace 以只读模式展示历史内容。":"The project was deleted. The workspace shows historical content in read-only mode.","项目已删除且本地仓库文件已清理。这里只保留历史视图。":"The project was deleted and local repository files were removed. Only the historical view remains here.",新建:"New",新建配置:"New configuration",新增模板:"New template",新增预设:"New preset",选择:"Select","选择 {name} 头像":"Select {name} avatar","选择...":"Select...","选择一个 Provider 查看详情":"Select a provider to view details",选择一个项目查看配置:"Select a project to view configuration",选择预设头像:"Select preset avatar",已删除:"Deleted",源码已删除:"Source deleted","暂无 Agent 配置":"No agent configuration yet","暂无 Profile 配置":"No profile configuration yet",暂无变体:"No variants yet",暂无成员预设:"No member presets yet",暂无团队模板:"No team templates yet","重试启动 Agent":"Retry starting Agent",重新开始:"Restart",重新开始任务:"Restart task",追加独立成员:"Add standalone members",桌面通知:"Desktop notifications","Agent 将直接修改项目主目录;不会自动提交,也不能使用 Merge、Rebase 或冲突解决流程。":"The agent will modify the project main directory directly. Auto-commit, Merge, Rebase, and conflict resolution flows are unavailable.","Agent Tower 会尽量校验仓库 identity;如果 remote URL 或目录名不同,会给出警告但允许继续。":"Agent Tower will try to verify repository identity. If the remote URL or directory name differs, it will show a warning but still allow restore.","Agent Tower 会尽量校验项目 identity;如果 remote URL 或目录名不同,会给出警告但允许继续。":"Agent Tower will try to verify project identity. If the remote URL or directory name differs, it will show a warning but still allow restore.","CLI 配置":"CLI Config","Agent 原生配置":"Native Agent Config","Profile 配置":"Profile Configuration","Provider 列表加载失败。":"Failed to load provider list.","10 个首屏加载动画候选 · 颜色遵循 Agent Tower 设计规范 · 点击卡片查看全屏效果":"10 first-screen loading animation candidates. Colors follow the Agent Tower design system. Click a card to view it fullscreen.",设计推荐:"Design recommendation","首选:Charcoal Breathe (#10)":"Top choice: Charcoal Breathe (#10)","备选A:Tower Pulse (#1)":"Alternative A: Tower Pulse (#1)","备选B:Terminal Cursor (#4)":"Alternative B: Terminal Cursor (#4)","品牌感最强,Charcoal 色块+Tower 图标呼吸,用户对产品的第一印象即品牌本身。":"Strongest brand presence: a breathing Charcoal block with the Tower icon, making the product brand the first impression.","品牌图标直接出现,脉冲节奏稳定,不浮夸,适合工作台场景。":"The brand icon appears directly with a steady pulse. It stays restrained and fits a workspace product.","终端光标闪烁,贴合 Agent/终端协作的核心场景,开发者亲切感强。":"A blinking terminal cursor matches the core agent and terminal collaboration flow and feels familiar to developers.","全屏预览:{name}":"Fullscreen preview: {name}",关闭预览:"Close preview","按 Esc 或点击关闭按钮退出":"Press Esc or click the close button to exit","Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。":'Agent Tower brand icon with a pulsing dot, conveying a branded "system is getting ready" state.',"五根柱状条交错升降,暗喻任务编排队列,节奏感强。":"Five bars rise in sequence, suggesting an orchestration queue with a strong rhythm.","双层同心圆环反向旋转,精密工具质感,不浮夸。":"Two concentric rings rotate in opposite directions for a precise tool feel without excess.","终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。":"A terminal-style cursor blink that directly echoes Agent Tower terminal collaboration.","三点波浪脉动,极简克制,适合工具型产品的默认加载。":"A minimal three-dot wave, restrained enough for a default loading state in a tool product.","三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。":"Three cards float subtly, suggesting stacked kanban pages and task management.","水平光束往复滑过进度条,线性进度隐喻,不阻断视线。":"A horizontal beam sweeps across a progress bar, implying linear progress without distraction.","三列骨架屏微闪,预示看板布局,减少布局跳变。":"Three shimmering skeleton columns preview the kanban layout and reduce layout shift.","圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。":"A ring progress arc and breathing center diamond combine progress feedback with a brand mark.","Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。":"A breathing Charcoal rounded block with the Tower icon embedded, giving the strongest brand presence.","正在加载...":"Loading..."}},xv=S.createContext(null),Sv="agent-tower.locale";function wv(n){return n?n==="en"?"en":n==="zh-CN"?"zh-CN":null:null}function yT(){if(typeof window>"u")return null;try{return wv(window.localStorage.getItem(Sv))}catch{return null}}function vT(n){if(!(typeof window>"u"))try{window.localStorage.setItem(Sv,n)}catch{}}function bT(){return typeof navigator>"u"||navigator.language.toLowerCase().startsWith("zh")?"zh-CN":"en"}function Ev(){return yT()??bT()}function xT(n,a){if(!a)return n;let i=n;for(const[l,c]of Object.entries(a))i=i.replaceAll(`{${l}}`,String(c??""));return i}let Md=Ev();function Tv(n,a,i){const l=gT[n]?.[a]??a;return xT(l,i)}function aa(n,a){return Tv(Md,n,a)}function ST({children:n}){const a=S.useRef(Ev()),[i,l]=S.useState(a.current),{data:c}=mT(),d=pT(),f=S.useRef(!1),m=S.useCallback(x=>{Md=x,l(x),document.documentElement.lang=x,vT(x)},[]);S.useEffect(()=>{const x=wv(c?.locale)??a.current;m(x),c&&c.locale===null&&!f.current&&(f.current=!0,d.mutate({locale:x}))},[c,m,d]);const g=S.useCallback(x=>{const y=Md;m(x),d.mutate({locale:x},{onError:()=>{m(y),Bi.error(aa("语言设置保存失败"))}})},[m,d]),p=S.useMemo(()=>({locale:i,setLocale:g,t:(x,y)=>Tv(i,x,y)}),[i,g]);return v.jsx(xv.Provider,{value:p,children:n})}function ya(){const n=S.useContext(xv);if(!n)throw new Error("useI18n must be used within I18nProvider");return n}function Cv(n){var a,i,l="";if(typeof n=="string"||typeof n=="number")l+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(a=0;a<c;a++)n[a]&&(i=Cv(n[a]))&&(l&&(l+=" "),l+=i)}else for(i in n)n[i]&&(l&&(l+=" "),l+=i);return l}function Av(){for(var n,a,i=0,l="",c=arguments.length;i<c;i++)(n=arguments[i])&&(a=Cv(n))&&(l&&(l+=" "),l+=a);return l}const wT=(n,a)=>{const i=new Array(n.length+a.length);for(let l=0;l<n.length;l++)i[l]=n[l];for(let l=0;l<a.length;l++)i[n.length+l]=a[l];return i},ET=(n,a)=>({classGroupId:n,validator:a}),Rv=(n=new Map,a=null,i)=>({nextPart:n,validators:a,classGroupId:i}),Go="-",ey=[],TT="arbitrary..",CT=n=>{const a=RT(n),{conflictingClassGroups:i,conflictingClassGroupModifiers:l}=n;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return AT(f);const m=f.split(Go),g=m[0]===""&&m.length>1?1:0;return _v(m,g,a)},getConflictingClassGroupIds:(f,m)=>{if(m){const g=l[f],p=i[f];return g?p?wT(p,g):g:p||ey}return i[f]||ey}}},_v=(n,a,i)=>{if(n.length-a===0)return i.classGroupId;const c=n[a],d=i.nextPart.get(c);if(d){const p=_v(n,a+1,d);if(p)return p}const f=i.validators;if(f===null)return;const m=a===0?n.join(Go):n.slice(a).join(Go),g=f.length;for(let p=0;p<g;p++){const x=f[p];if(x.validator(m))return x.classGroupId}},AT=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=n.slice(1,-1),i=a.indexOf(":"),l=a.slice(0,i);return l?TT+l:void 0})(),RT=n=>{const{theme:a,classGroups:i}=n;return _T(i,a)},_T=(n,a)=>{const i=Rv();for(const l in n){const c=n[l];of(c,i,l,a)}return i},of=(n,a,i,l)=>{const c=n.length;for(let d=0;d<c;d++){const f=n[d];kT(f,a,i,l)}},kT=(n,a,i,l)=>{if(typeof n=="string"){NT(n,a,i);return}if(typeof n=="function"){OT(n,a,i,l);return}MT(n,a,i,l)},NT=(n,a,i)=>{const l=n===""?a:kv(a,n);l.classGroupId=i},OT=(n,a,i,l)=>{if(jT(n)){of(n(l),a,i,l);return}a.validators===null&&(a.validators=[]),a.validators.push(ET(i,n))},MT=(n,a,i,l)=>{const c=Object.entries(n),d=c.length;for(let f=0;f<d;f++){const[m,g]=c[f];of(g,kv(a,m),i,l)}},kv=(n,a)=>{let i=n;const l=a.split(Go),c=l.length;for(let d=0;d<c;d++){const f=l[d];let m=i.nextPart.get(f);m||(m=Rv(),i.nextPart.set(f,m)),i=m}return i},jT=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,DT=n=>{if(n<1)return{get:()=>{},set:()=>{}};let a=0,i=Object.create(null),l=Object.create(null);const c=(d,f)=>{i[d]=f,a++,a>n&&(a=0,l=i,i=Object.create(null))};return{get(d){let f=i[d];if(f!==void 0)return f;if((f=l[d])!==void 0)return c(d,f),f},set(d,f){d in i?i[d]=f:c(d,f)}}},jd="!",ty=":",zT=[],ny=(n,a,i,l,c)=>({modifiers:n,hasImportantModifier:a,baseClassName:i,maybePostfixModifierPosition:l,isExternal:c}),LT=n=>{const{prefix:a,experimentalParseClassName:i}=n;let l=c=>{const d=[];let f=0,m=0,g=0,p;const x=c.length;for(let B=0;B<x;B++){const P=c[B];if(f===0&&m===0){if(P===ty){d.push(c.slice(g,B)),g=B+1;continue}if(P==="/"){p=B;continue}}P==="["?f++:P==="]"?f--:P==="("?m++:P===")"&&m--}const y=d.length===0?c:c.slice(g);let T=y,N=!1;y.endsWith(jd)?(T=y.slice(0,-1),N=!0):y.startsWith(jd)&&(T=y.slice(1),N=!0);const L=p&&p>g?p-g:void 0;return ny(d,N,T,L)};if(a){const c=a+ty,d=l;l=f=>f.startsWith(c)?d(f.slice(c.length)):ny(zT,!1,f,void 0,!0)}if(i){const c=l;l=d=>i({className:d,parseClassName:c})}return l},UT=n=>{const a=new Map;return n.orderSensitiveModifiers.forEach((i,l)=>{a.set(i,1e6+l)}),i=>{const l=[];let c=[];for(let d=0;d<i.length;d++){const f=i[d],m=f[0]==="[",g=a.has(f);m||g?(c.length>0&&(c.sort(),l.push(...c),c=[]),l.push(f)):c.push(f)}return c.length>0&&(c.sort(),l.push(...c)),l}},BT=n=>({cache:DT(n.cacheSize),parseClassName:LT(n),sortModifiers:UT(n),...CT(n)}),qT=/\s+/,HT=(n,a)=>{const{parseClassName:i,getClassGroupId:l,getConflictingClassGroupIds:c,sortModifiers:d}=a,f=[],m=n.trim().split(qT);let g="";for(let p=m.length-1;p>=0;p-=1){const x=m[p],{isExternal:y,modifiers:T,hasImportantModifier:N,baseClassName:L,maybePostfixModifierPosition:B}=i(x);if(y){g=x+(g.length>0?" "+g:g);continue}let P=!!B,K=l(P?L.substring(0,B):L);if(!K){if(!P){g=x+(g.length>0?" "+g:g);continue}if(K=l(L),!K){g=x+(g.length>0?" "+g:g);continue}P=!1}const Y=T.length===0?"":T.length===1?T[0]:d(T).join(":"),W=N?Y+jd:Y,he=W+K;if(f.indexOf(he)>-1)continue;f.push(he);const fe=c(K,P);for(let de=0;de<fe.length;++de){const R=fe[de];f.push(W+R)}g=x+(g.length>0?" "+g:g)}return g},QT=(...n)=>{let a=0,i,l,c="";for(;a<n.length;)(i=n[a++])&&(l=Nv(i))&&(c&&(c+=" "),c+=l);return c},Nv=n=>{if(typeof n=="string")return n;let a,i="";for(let l=0;l<n.length;l++)n[l]&&(a=Nv(n[l]))&&(i&&(i+=" "),i+=a);return i},PT=(n,...a)=>{let i,l,c,d;const f=g=>{const p=a.reduce((x,y)=>y(x),n());return i=BT(p),l=i.cache.get,c=i.cache.set,d=m,m(g)},m=g=>{const p=l(g);if(p)return p;const x=HT(g,i);return c(g,x),x};return d=f,(...g)=>d(QT(...g))},GT=[],Bt=n=>{const a=i=>i[n]||GT;return a.isThemeGetter=!0,a},Ov=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Mv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,KT=/^\d+\/\d+$/,VT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,YT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,FT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,XT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,IT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zi=n=>KT.test(n),Ue=n=>!!n&&!Number.isNaN(Number(n)),hr=n=>!!n&&Number.isInteger(Number(n)),hd=n=>n.endsWith("%")&&Ue(n.slice(0,-1)),Qa=n=>VT.test(n),ZT=()=>!0,JT=n=>YT.test(n)&&!FT.test(n),jv=()=>!1,$T=n=>XT.test(n),WT=n=>IT.test(n),e2=n=>!ue(n)&&!ce(n),t2=n=>Yi(n,Lv,jv),ue=n=>Ov.test(n),Yr=n=>Yi(n,Uv,JT),md=n=>Yi(n,s2,Ue),ay=n=>Yi(n,Dv,jv),n2=n=>Yi(n,zv,WT),To=n=>Yi(n,Bv,$T),ce=n=>Mv.test(n),Gs=n=>Fi(n,Uv),a2=n=>Fi(n,l2),ry=n=>Fi(n,Dv),r2=n=>Fi(n,Lv),i2=n=>Fi(n,zv),Co=n=>Fi(n,Bv,!0),Yi=(n,a,i)=>{const l=Ov.exec(n);return l?l[1]?a(l[1]):i(l[2]):!1},Fi=(n,a,i=!1)=>{const l=Mv.exec(n);return l?l[1]?a(l[1]):i:!1},Dv=n=>n==="position"||n==="percentage",zv=n=>n==="image"||n==="url",Lv=n=>n==="length"||n==="size"||n==="bg-size",Uv=n=>n==="length",s2=n=>n==="number",l2=n=>n==="family-name",Bv=n=>n==="shadow",o2=()=>{const n=Bt("color"),a=Bt("font"),i=Bt("text"),l=Bt("font-weight"),c=Bt("tracking"),d=Bt("leading"),f=Bt("breakpoint"),m=Bt("container"),g=Bt("spacing"),p=Bt("radius"),x=Bt("shadow"),y=Bt("inset-shadow"),T=Bt("text-shadow"),N=Bt("drop-shadow"),L=Bt("blur"),B=Bt("perspective"),P=Bt("aspect"),K=Bt("ease"),Y=Bt("animate"),W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],he=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],fe=()=>[...he(),ce,ue],de=()=>["auto","hidden","clip","visible","scroll"],R=()=>["auto","contain","none"],V=()=>[ce,ue,g],re=()=>[zi,"full","auto",...V()],ke=()=>[hr,"none","subgrid",ce,ue],Re=()=>["auto",{span:["full",hr,ce,ue]},hr,ce,ue],Se=()=>[hr,"auto",ce,ue],Me=()=>["auto","min","max","fr",ce,ue],Le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ee=()=>["start","end","center","stretch","center-safe","end-safe"],k=()=>["auto",...V()],X=()=>[zi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...V()],Q=()=>[n,ce,ue],me=()=>[...he(),ry,ay,{position:[ce,ue]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],C=()=>["auto","cover","contain",r2,t2,{size:[ce,ue]}],q=()=>[hd,Gs,Yr],H=()=>["","none","full",p,ce,ue],Z=()=>["",Ue,Gs,Yr],ee=()=>["solid","dashed","dotted","double"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[Ue,hd,ry,ay],Te=()=>["","none",L,ce,ue],Be=()=>["none",Ue,ce,ue],Pt=()=>["none",Ue,ce,ue],en=()=>[Ue,ce,ue],Je=()=>[zi,"full",...V()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qa],breakpoint:[Qa],color:[ZT],container:[Qa],"drop-shadow":[Qa],ease:["in","out","in-out"],font:[e2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qa],shadow:[Qa],spacing:["px",Ue],text:[Qa],"text-shadow":[Qa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",zi,ue,ce,P]}],container:["container"],columns:[{columns:[Ue,ue,ce,m]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:fe()}],overflow:[{overflow:de()}],"overflow-x":[{"overflow-x":de()}],"overflow-y":[{"overflow-y":de()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:re()}],"inset-x":[{"inset-x":re()}],"inset-y":[{"inset-y":re()}],start:[{start:re()}],end:[{end:re()}],top:[{top:re()}],right:[{right:re()}],bottom:[{bottom:re()}],left:[{left:re()}],visibility:["visible","invisible","collapse"],z:[{z:[hr,"auto",ce,ue]}],basis:[{basis:[zi,"full","auto",m,...V()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ue,zi,"auto","initial","none",ue]}],grow:[{grow:["",Ue,ce,ue]}],shrink:[{shrink:["",Ue,ce,ue]}],order:[{order:[hr,"first","last","none",ce,ue]}],"grid-cols":[{"grid-cols":ke()}],"col-start-end":[{col:Re()}],"col-start":[{"col-start":Se()}],"col-end":[{"col-end":Se()}],"grid-rows":[{"grid-rows":ke()}],"row-start-end":[{row:Re()}],"row-start":[{"row-start":Se()}],"row-end":[{"row-end":Se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Me()}],"auto-rows":[{"auto-rows":Me()}],gap:[{gap:V()}],"gap-x":[{"gap-x":V()}],"gap-y":[{"gap-y":V()}],"justify-content":[{justify:[...Le(),"normal"]}],"justify-items":[{"justify-items":[...Ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ee()]}],"align-content":[{content:["normal",...Le()]}],"align-items":[{items:[...Ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":Le()}],"place-items":[{"place-items":[...Ee(),"baseline"]}],"place-self":[{"place-self":["auto",...Ee()]}],p:[{p:V()}],px:[{px:V()}],py:[{py:V()}],ps:[{ps:V()}],pe:[{pe:V()}],pt:[{pt:V()}],pr:[{pr:V()}],pb:[{pb:V()}],pl:[{pl:V()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":V()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":V()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[m,"screen",...X()]}],"min-w":[{"min-w":[m,"screen","none",...X()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[f]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",i,Gs,Yr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,ce,md]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",hd,ue]}],"font-family":[{font:[a2,ue,a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,ce,ue]}],"line-clamp":[{"line-clamp":[Ue,"none",ce,md]}],leading:[{leading:[d,...V()]}],"list-image":[{"list-image":["none",ce,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Q()}],"text-color":[{text:Q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ue,"from-font","auto",ce,Yr]}],"text-decoration-color":[{decoration:Q()}],"underline-offset":[{"underline-offset":[Ue,"auto",ce,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce,ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:me()}],"bg-repeat":[{bg:ve()}],"bg-size":[{bg:C()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},hr,ce,ue],radial:["",ce,ue],conic:[hr,ce,ue]},i2,n2]}],"bg-color":[{bg:Q()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:Q()}],"gradient-via":[{via:Q()}],"gradient-to":[{to:Q()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:Q()}],"border-color-x":[{"border-x":Q()}],"border-color-y":[{"border-y":Q()}],"border-color-s":[{"border-s":Q()}],"border-color-e":[{"border-e":Q()}],"border-color-t":[{"border-t":Q()}],"border-color-r":[{"border-r":Q()}],"border-color-b":[{"border-b":Q()}],"border-color-l":[{"border-l":Q()}],"divide-color":[{divide:Q()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ue,ce,ue]}],"outline-w":[{outline:["",Ue,Gs,Yr]}],"outline-color":[{outline:Q()}],shadow:[{shadow:["","none",x,Co,To]}],"shadow-color":[{shadow:Q()}],"inset-shadow":[{"inset-shadow":["none",y,Co,To]}],"inset-shadow-color":[{"inset-shadow":Q()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Q()}],"ring-offset-w":[{"ring-offset":[Ue,Yr]}],"ring-offset-color":[{"ring-offset":Q()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":Q()}],"text-shadow":[{"text-shadow":["none",T,Co,To]}],"text-shadow-color":[{"text-shadow":Q()}],opacity:[{opacity:[Ue,ce,ue]}],"mix-blend":[{"mix-blend":[...$(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":$()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ue]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":Q()}],"mask-image-linear-to-color":[{"mask-linear-to":Q()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":Q()}],"mask-image-t-to-color":[{"mask-t-to":Q()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":Q()}],"mask-image-r-to-color":[{"mask-r-to":Q()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":Q()}],"mask-image-b-to-color":[{"mask-b-to":Q()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":Q()}],"mask-image-l-to-color":[{"mask-l-to":Q()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":Q()}],"mask-image-x-to-color":[{"mask-x-to":Q()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":Q()}],"mask-image-y-to-color":[{"mask-y-to":Q()}],"mask-image-radial":[{"mask-radial":[ce,ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":Q()}],"mask-image-radial-to-color":[{"mask-radial-to":Q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":he()}],"mask-image-conic-pos":[{"mask-conic":[Ue]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":Q()}],"mask-image-conic-to-color":[{"mask-conic-to":Q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:me()}],"mask-repeat":[{mask:ve()}],"mask-size":[{mask:C()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,ue]}],filter:[{filter:["","none",ce,ue]}],blur:[{blur:Te()}],brightness:[{brightness:[Ue,ce,ue]}],contrast:[{contrast:[Ue,ce,ue]}],"drop-shadow":[{"drop-shadow":["","none",N,Co,To]}],"drop-shadow-color":[{"drop-shadow":Q()}],grayscale:[{grayscale:["",Ue,ce,ue]}],"hue-rotate":[{"hue-rotate":[Ue,ce,ue]}],invert:[{invert:["",Ue,ce,ue]}],saturate:[{saturate:[Ue,ce,ue]}],sepia:[{sepia:["",Ue,ce,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,ue]}],"backdrop-blur":[{"backdrop-blur":Te()}],"backdrop-brightness":[{"backdrop-brightness":[Ue,ce,ue]}],"backdrop-contrast":[{"backdrop-contrast":[Ue,ce,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ue,ce,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ue,ce,ue]}],"backdrop-invert":[{"backdrop-invert":["",Ue,ce,ue]}],"backdrop-opacity":[{"backdrop-opacity":[Ue,ce,ue]}],"backdrop-saturate":[{"backdrop-saturate":[Ue,ce,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",Ue,ce,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":V()}],"border-spacing-x":[{"border-spacing-x":V()}],"border-spacing-y":[{"border-spacing-y":V()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ue,"initial",ce,ue]}],ease:[{ease:["linear","initial",K,ce,ue]}],delay:[{delay:[Ue,ce,ue]}],animate:[{animate:["none",Y,ce,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[B,ce,ue]}],"perspective-origin":[{"perspective-origin":fe()}],rotate:[{rotate:Be()}],"rotate-x":[{"rotate-x":Be()}],"rotate-y":[{"rotate-y":Be()}],"rotate-z":[{"rotate-z":Be()}],scale:[{scale:Pt()}],"scale-x":[{"scale-x":Pt()}],"scale-y":[{"scale-y":Pt()}],"scale-z":[{"scale-z":Pt()}],"scale-3d":["scale-3d"],skew:[{skew:en()}],"skew-x":[{"skew-x":en()}],"skew-y":[{"skew-y":en()}],transform:[{transform:[ce,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:fe()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Je()}],"translate-x":[{"translate-x":Je()}],"translate-y":[{"translate-y":Je()}],"translate-z":[{"translate-z":Je()}],"translate-none":["translate-none"],accent:[{accent:Q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ce,ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ce,ue]}],fill:[{fill:["none",...Q()]}],"stroke-w":[{stroke:[Ue,Gs,Yr,md]}],stroke:[{stroke:["none",...Q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},u2=PT(o2);function jt(...n){return u2(Av(n))}function pd(n){let a=0;for(const i of n){const l=i.codePointAt(0);l>=19968&&l<=40959||l>=13312&&l<=19903||l>=65280&&l<=65376||l>=12288&&l<=12351?a+=2:a+=1}return a}function rR(n,a){if(pd(n)<=a)return n;const i=a-1,l=Math.ceil(i/2),c=Math.floor(i/2);let d="",f=0;for(const x of n){const y=pd(x);if(f+y>l)break;d+=x,f+=y}const m=[...n];let g="",p=0;for(let x=m.length-1;x>=0;x--){const y=pd(m[x]);if(p+y>c)break;g=m[x]+g,p+=y}return d+"…"+g}let Pi=0;function qv(){Pi++,Pi===1&&(document.body.style.overflow="hidden")}function Dd(){Pi=Math.max(0,Pi-1),Pi===0&&(document.body.style.overflow="")}function c2(){return Pi}const iy=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,sy=Av,d2=(n,a)=>i=>{var l;if(a?.variants==null)return sy(n,i?.class,i?.className);const{variants:c,defaultVariants:d}=a,f=Object.keys(c).map(p=>{const x=i?.[p],y=d?.[p];if(x===null)return null;const T=iy(x)||iy(y);return c[p][T]}),m=i&&Object.entries(i).reduce((p,x)=>{let[y,T]=x;return T===void 0||(p[y]=T),p},{}),g=a==null||(l=a.compoundVariants)===null||l===void 0?void 0:l.reduce((p,x)=>{let{class:y,className:T,...N}=x;return Object.entries(N).every(L=>{let[B,P]=L;return Array.isArray(P)?P.includes({...d,...m}[B]):{...d,...m}[B]===P})?[...p,y,T]:p},[]);return sy(n,f,g,i?.class,i?.className)};function ly(n,a){if(typeof n=="function")return n(a);n!=null&&(n.current=a)}function f2(...n){return a=>{let i=!1;const l=n.map(c=>{const d=ly(c,a);return!i&&typeof d=="function"&&(i=!0),d});if(i)return()=>{for(let c=0;c<l.length;c++){const d=l[c];typeof d=="function"?d():ly(n[c],null)}}}}function h2(n){const a=p2(n),i=S.forwardRef((l,c)=>{const{children:d,...f}=l,m=S.Children.toArray(d),g=m.find(y2);if(g){const p=g.props.children,x=m.map(y=>y===g?S.Children.count(p)>1?S.Children.only(null):S.isValidElement(p)?p.props.children:null:y);return v.jsx(a,{...f,ref:c,children:S.isValidElement(p)?S.cloneElement(p,void 0,x):null})}return v.jsx(a,{...f,ref:c,children:d})});return i.displayName=`${n}.Slot`,i}var m2=h2("Slot");function p2(n){const a=S.forwardRef((i,l)=>{const{children:c,...d}=i;if(S.isValidElement(c)){const f=b2(c),m=v2(d,c.props);return c.type!==S.Fragment&&(m.ref=l?f2(l,f):f),S.cloneElement(c,m)}return S.Children.count(c)>1?S.Children.only(null):null});return a.displayName=`${n}.SlotClone`,a}var g2=Symbol("radix.slottable");function y2(n){return S.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===g2}function v2(n,a){const i={...a};for(const l in a){const c=n[l],d=a[l];/^on[A-Z]/.test(l)?c&&d?i[l]=(...m)=>{const g=d(...m);return c(...m),g}:c&&(i[l]=c):l==="style"?i[l]={...c,...d}:l==="className"&&(i[l]=[c,d].filter(Boolean).join(" "))}return{...n,...i}}function b2(n){let a=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,i=a&&"isReactWarning"in a&&a.isReactWarning;return i?n.ref:(a=Object.getOwnPropertyDescriptor(n,"ref")?.get,i=a&&"isReactWarning"in a&&a.isReactWarning,i?n.props.ref:n.props.ref||n.ref)}const x2=d2("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function ma({className:n,variant:a="default",size:i="default",asChild:l=!1,...c}){const d=l?m2:"button";return v.jsx(d,{"data-slot":"button","data-variant":a,"data-size":i,className:jt(x2({variant:a,size:i,className:n})),...c})}function _t({className:n,...a}){return v.jsx("div",{"data-slot":"skeleton","aria-hidden":"true",className:jt("animate-pulse rounded-md bg-muted motion-reduce:animate-none",n),...a})}function S2({children:n,className:a}){return v.jsx("div",{className:jt("mx-auto w-full max-w-4xl px-5 py-5 sm:px-8 sm:py-6",a),children:n})}function iR({title:n,description:a,actions:i,className:l}){return v.jsxs("div",{className:jt("mb-5 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",l),children:[v.jsxs("div",{className:"min-w-0",children:[v.jsx("h2",{className:"text-xl font-semibold tracking-tight text-foreground",children:n}),a&&v.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-muted-foreground",children:a})]}),i&&v.jsx("div",{className:"flex flex-wrap items-center gap-2 shrink-0",children:i})]})}function sR({children:n,className:a}){return v.jsx("h3",{className:jt("text-[12px] font-semibold uppercase tracking-wide text-muted-foreground",a),children:n})}function lR({label:n,description:a,icon:i,children:l,align:c="start",controlWidth:d="fixed",className:f}){return v.jsxs("div",{className:jt("flex flex-col gap-3 py-5 sm:flex-row sm:justify-between sm:gap-8",c==="center"?"sm:items-center":"sm:items-start",f),children:[v.jsxs("div",{className:"flex min-w-0 items-start gap-3 sm:max-w-[360px]",children:[i&&v.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground","aria-hidden":"true",children:v.jsx(i,{size:15})}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("div",{className:"text-[13px] font-medium text-foreground",children:n}),a&&v.jsx("p",{className:"mt-0.5 text-xs leading-relaxed text-muted-foreground",children:a})]})]}),v.jsx("div",{className:jt("shrink-0",d==="fixed"?"w-full sm:w-[260px]":"w-auto"),children:l})]})}function oR({label:n,description:a,children:i,className:l,htmlFor:c}){return v.jsxs("div",{className:jt("space-y-1.5",l),children:[v.jsxs("div",{children:[v.jsx("label",{htmlFor:c,className:"block text-[13px] font-medium text-foreground",children:n}),a&&v.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:a})]}),i]})}function uR({icon:n,message:a,action:i,className:l}){return v.jsxs("div",{className:jt("rounded-xl border border-dashed border-border bg-muted/30 py-14 text-center",l),children:[n&&v.jsx(n,{size:48,strokeWidth:1.25,className:"mx-auto mb-3 text-muted-foreground/40","aria-hidden":"true"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:a}),i&&v.jsx("div",{className:"mt-4 flex justify-center",children:i})]})}function cR({saving:n,onSave:a,onCancel:i,className:l}){const{t:c}=ya();return v.jsx("div",{className:jt("sticky bottom-0 z-10 -mx-5 border-t border-border/60 bg-background/90 px-5 py-3 backdrop-blur sm:-mx-8 sm:px-8",l),children:v.jsxs("div",{className:"flex items-center justify-between gap-3",children:[v.jsx("span",{className:"text-xs text-muted-foreground",children:c("有未保存的更改")}),v.jsxs("div",{className:"flex items-center gap-2",children:[i&&v.jsx(ma,{size:"sm",variant:"ghost",onClick:i,disabled:n,children:c("取消")}),v.jsx(ma,{size:"sm",onClick:a,disabled:n,children:c(n?"保存中...":"保存")})]})]})})}function w2({rows:n=3}){return v.jsxs("div",{role:"status","aria-label":"Loading",children:[v.jsx(_t,{className:"h-7 w-36"}),v.jsx("div",{className:"mt-6 divide-y divide-border/60",children:Array.from({length:n}).map((a,i)=>v.jsxs("div",{className:"flex items-start justify-between gap-8 py-5",children:[v.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[v.jsx(_t,{className:"h-4 w-32"}),v.jsx(_t,{className:"h-3 w-64 max-w-full"})]}),v.jsx(_t,{className:"h-9 w-[260px] shrink-0 rounded-lg"})]},i))})]})}function dR(){return v.jsxs("div",{role:"status","aria-label":"Loading",children:[v.jsx(_t,{className:"h-7 w-36"}),v.jsxs("div",{className:"mt-6 grid gap-5 lg:grid-cols-[240px_minmax(0,1fr)]",children:[v.jsx("div",{className:"space-y-1",children:Array.from({length:5}).map((n,a)=>v.jsxs("div",{className:"flex items-center gap-3 rounded-lg px-3 py-2.5",children:[v.jsx(_t,{className:"h-2 w-2 rounded-full"}),v.jsxs("div",{className:"flex-1 space-y-1.5",children:[v.jsx(_t,{className:"h-3.5 w-3/4"}),v.jsx(_t,{className:"h-2.5 w-1/2"})]})]},a))}),v.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[v.jsxs("div",{className:"flex items-start justify-between gap-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsx(_t,{className:"h-5 w-44"}),v.jsx(_t,{className:"h-3 w-28"})]}),v.jsx(_t,{className:"h-8 w-24 rounded-md"})]}),v.jsxs("div",{className:"mt-8 space-y-3",children:[v.jsx(_t,{className:"h-3 w-20"}),v.jsx(_t,{className:"h-24 w-full rounded-lg"}),v.jsx(_t,{className:"h-3 w-20"}),v.jsx(_t,{className:"h-16 w-full rounded-lg"})]})]})]})]})}function fR({cards:n=6}){return v.jsxs("div",{role:"status","aria-label":"Loading",children:[v.jsxs("div",{className:"flex items-center justify-between gap-4",children:[v.jsx(_t,{className:"h-7 w-36"}),v.jsx(_t,{className:"h-8 w-44 rounded-lg"})]}),v.jsx("div",{className:"mt-6 grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:n}).map((a,i)=>v.jsxs("div",{className:"flex items-start gap-3 rounded-xl border border-border bg-card p-4",children:[v.jsx(_t,{className:"h-10 w-10 shrink-0 rounded-full"}),v.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[v.jsx(_t,{className:"h-4 w-2/3"}),v.jsx(_t,{className:"h-3 w-1/2"}),v.jsx(_t,{className:"h-3 w-3/4"})]})]},i))})]})}const E2=S.lazy(()=>_n(()=>import("./GeneralSettingsPage-DoAXPabw.js"),__vite__mapDeps([0,1,2,3,4,5,6])).then(n=>({default:n.GeneralSettingsPage}))),T2=S.lazy(()=>_n(()=>import("./ProviderSettingsPage-BlgfQMwe.js"),__vite__mapDeps([7,6,8,9,1,2,3,4,5,10,11,12,13,14,15,16,17])).then(n=>({default:n.ProviderSettingsPage}))),C2=S.lazy(()=>_n(()=>import("./AgentEnvironmentSettingsPage-CqMfdwkM.js"),[]).then(n=>({default:n.AgentEnvironmentSettingsPage}))),A2=S.lazy(()=>_n(()=>import("./TeamSettingsPage-BWGm0m7s.js"),__vite__mapDeps([18,8,9,1,2,3,10,11,12,13,19,6,15,20])).then(n=>({default:n.TeamSettingsPage}))),R2=S.lazy(()=>_n(()=>import("./ProjectSettingsPage-BVINN99w.js"),__vite__mapDeps([21,22,23,11,24,3,15,9,14])).then(n=>({default:n.ProjectSettingsPage}))),_2=S.lazy(()=>_n(()=>import("./NotificationSettingsPage-BrqSeU--.js"),__vite__mapDeps([25,1,2,3,5,26,24])).then(n=>({default:n.NotificationSettingsPage}))),k2=S.lazy(()=>_n(()=>import("./McpSettingsPage-QXVD4XCW.js"),__vite__mapDeps([27,28,3])).then(n=>({default:n.McpSettingsPage}))),N2=S.lazy(()=>_n(()=>import("./ProfileSettingsPage-BmWgVdnG.js"),__vite__mapDeps([29,30,9,8,4,31,2,15,17])).then(n=>({default:n.ProfileSettingsPage}))),oy=[{id:"general",label:"通用",icon:PE},{id:"agent-environment",label:"Agent 环境",icon:hv},{id:"agents",label:"Agent 配置",icon:jE},{id:"team",label:"团队协作",icon:iT},{id:"projects",label:"项目配置",icon:BE},{id:"notifications",label:"通知",icon:TE},{id:"mcp",label:"MCP 配置",icon:RE}];function O2({tab:n}){switch(n){case"general":return v.jsx(E2,{});case"agent-environment":return v.jsx(C2,{});case"agents":return v.jsx(T2,{});case"team":return v.jsx(A2,{});case"projects":return v.jsx(R2,{});case"notifications":return v.jsx(_2,{});case"mcp":return v.jsx(k2,{});case"agents-legacy":return v.jsx(N2,{})}}function M2(){return v.jsx(S2,{children:v.jsx(w2,{rows:3})})}function j2(){const{t:n}=ya(),a=Fs(p=>p.settingsOpen),i=Fs(p=>p.settingsTab),l=Fs(p=>p.closeSettings),c=Fs(p=>p.setSettingsTab),[d,f]=S.useState(!1),m=S.useRef(!1),g=S.useRef(null);return S.useEffect(()=>{if(a){const p=requestAnimationFrame(()=>f(!0));m.current||(qv(),m.current=!0);const x=requestAnimationFrame(()=>g.current?.focus());return()=>{cancelAnimationFrame(p),cancelAnimationFrame(x)}}else{const p=setTimeout(()=>f(!1),200);return m.current&&(Dd(),m.current=!1),()=>clearTimeout(p)}},[a]),S.useEffect(()=>()=>{m.current&&(Dd(),m.current=!1)},[]),S.useEffect(()=>{if(!a)return;const p=x=>{x.key==="Escape"&&c2()===1&&l()};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[a,l]),!d&&!a?null:v.jsxs("div",{className:jt("fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-6 transition-opacity duration-200 motion-reduce:transition-none",a?"opacity-100":"opacity-0 pointer-events-none"),children:[v.jsx("div",{className:"absolute inset-0 bg-black/20 backdrop-blur-sm",onClick:l,"aria-hidden":"true"}),v.jsxs("div",{ref:g,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":n("设置"),className:jt("relative flex w-full max-w-[1100px] flex-col overflow-hidden rounded-2xl bg-background shadow-[0_12px_16px_-4px_rgba(36,36,36,0.08)] ring-1 ring-foreground/5 transform transition-all duration-200 outline-none motion-reduce:transition-none","h-[min(calc(100vh-1.5rem),840px)] sm:h-[min(calc(100vh-3rem),840px)]",a?"scale-100 translate-y-0":"scale-[0.97] translate-y-1"),children:[v.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border/60 bg-muted/40 px-5 py-3 sm:px-6",children:[v.jsxs("div",{className:"flex items-center gap-2.5",children:[v.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary text-primary-foreground","aria-hidden":"true",children:v.jsx(ZE,{size:14})}),v.jsx("h2",{className:"text-[15px] font-semibold text-foreground",children:n("设置")})]}),v.jsx("button",{onClick:l,"aria-label":n("取消"),className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:v.jsx(gv,{size:15})})]}),v.jsx("div",{className:"sm:hidden flex shrink-0 border-b border-border/60 bg-background overflow-x-auto scrollbar-none",role:"tablist",children:oy.map(p=>v.jsxs("button",{role:"tab","aria-selected":i===p.id,onClick:()=>c(p.id),className:jt("flex items-center gap-1.5 px-4 py-2.5 text-xs whitespace-nowrap transition-colors border-b-2 -mb-px focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-inset",i===p.id?"border-primary text-foreground font-medium":"border-transparent text-muted-foreground hover:text-foreground"),children:[v.jsx(p.icon,{size:13,"aria-hidden":"true"}),v.jsx("span",{children:n(p.label)})]},p.id))}),v.jsxs("div",{className:"flex flex-1 min-h-0",children:[v.jsx("nav",{"aria-label":n("设置"),className:"hidden sm:flex w-[180px] shrink-0 flex-col gap-0.5 border-r border-border/60 bg-muted/30 p-3 overflow-y-auto scrollbar-app-thin",children:oy.map(p=>v.jsxs("button",{"aria-current":i===p.id?"page":void 0,onClick:()=>c(p.id),className:jt("flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",i===p.id?"bg-background text-foreground font-medium shadow-[0_1px_2px_rgba(0,0,0,0.05)] ring-1 ring-foreground/[0.04]":"text-muted-foreground hover:text-foreground hover:bg-background/60"),children:[v.jsx(p.icon,{size:15,className:"shrink-0","aria-hidden":"true"}),v.jsx("span",{children:n(p.label)})]},p.id))}),v.jsx("div",{className:"flex-1 min-w-0 overflow-y-auto scrollbar-app-thin bg-background",children:v.jsx(S.Suspense,{fallback:v.jsx(M2,{}),children:v.jsx(O2,{tab:i})})})]})]})]})}const Hv="agent-tower:desktop-titlebar",zd="agent-tower:desktop-platform",$r={desktop:"1",desktopTitlebar:"integrated"},Qv=S.createContext(null),D2={usesIntegratedTitlebar:!1,desktopPlatform:"unknown",hasMacTrafficLights:!1,preserveDesktopSearch:n=>n};function z2(n){const a=new URLSearchParams(n);return a.get("desktop")===$r.desktop&&a.get("desktopTitlebar")===$r.desktopTitlebar}function Pv(n){return n==="darwin"||n==="win32"||n==="linux"?n:"unknown"}function L2(){if(typeof window>"u")return"unknown";try{return Pv(window.sessionStorage.getItem(zd))}catch{return"unknown"}}function U2(n){if(!(typeof window>"u"))try{n==="unknown"?window.sessionStorage.removeItem(zd):window.sessionStorage.setItem(zd,n)}catch{}}function B2(){if(typeof window>"u")return"none";try{return window.sessionStorage.getItem(Hv)===$r.desktopTitlebar?"integrated":"none"}catch{return"none"}}function q2(n){if(!(typeof window>"u"))try{n==="integrated"&&window.sessionStorage.setItem(Hv,$r.desktopTitlebar)}catch{}}function H2(n){return z2(n)?(q2("integrated"),"integrated"):B2()}function Q2(n){const a=new URLSearchParams(n),i=Pv(a.get("desktopPlatform"));return a.get("desktop")===$r.desktop&&i!=="unknown"?(U2(i),i):L2()}function uy(n,a){const i=new URLSearchParams(n);i.set("desktop",$r.desktop),i.set("desktopTitlebar",$r.desktopTitlebar),a!=="unknown"&&i.set("desktopPlatform",a);const l=i.toString();return l?`?${l}`:""}function P2(n,a){if(typeof n=="string"){const i=n.indexOf("#"),l=i>=0?n.slice(0,i):n,c=i>=0?n.slice(i):"",d=l.indexOf("?"),f=d>=0?l.slice(0,d):l,m=d>=0?l.slice(d):"";return`${f}${uy(m,a)}${c}`}return{...n,search:uy(n.search??"",a)}}function G2({children:n}){const a=Sr(),i=S.useMemo(()=>H2(a.search),[a.search]),l=S.useMemo(()=>Q2(a.search),[a.search]),c=i==="integrated",d=c&&l==="darwin",f=S.useMemo(()=>({usesIntegratedTitlebar:c,desktopPlatform:l,hasMacTrafficLights:d,preserveDesktopSearch:m=>c?P2(m,l):m}),[l,d,c]);return v.jsx(Qv.Provider,{value:f,children:n})}function Gv(){return S.useContext(Qv)??D2}function K2(){const n=nf(),{preserveDesktopSearch:a}=Gv();return S.useMemo(()=>((l,c)=>typeof l=="number"?n(l):n(a(l),c)),[n,a])}function V2(){return rn({queryKey:ge.agentCli.manifest,queryFn:()=>ze.get("/agent-cli/manifest")})}function Kv(){return rn({queryKey:ge.agentCli.status,queryFn:()=>ze.get("/agent-cli/status")})}function Vv(){const n=tt();return ct({mutationFn:()=>ze.post("/agent-cli/status/refresh"),onSuccess:a=>{n.setQueryData(ge.agentCli.status,a)}})}function Y2(){const n=tt();return ct({mutationFn:a=>ze.post("/agent-cli/install-previews",{toolId:a}),onSuccess:a=>{n.setQueryData(ge.agentCli.preview(a.id),a)}})}function F2(n,a=!0){return rn({queryKey:n?ge.agentCli.task(n):["agent-cli","task",null],queryFn:()=>ze.get(`/agent-cli/install-tasks/${n}`),enabled:!!n&&a,refetchInterval:i=>{const l=i.state.data?.status;return l==="running"||l==="verifying"||l==="cancelling"?1e3:!1}})}function X2(n,a=!0){return rn({queryKey:n?ge.agentCli.logs(n):["agent-cli","logs",null],queryFn:()=>ze.get(`/agent-cli/install-tasks/${n}/logs`),enabled:!!n&&a,refetchInterval:a&&n?1e3:!1})}function I2(){const n=tt();return ct({mutationFn:a=>ze.post("/agent-cli/install-tasks",{previewId:a}),onSuccess:({task:a})=>{n.setQueryData(ge.agentCli.task(a.id),a),n.invalidateQueries({queryKey:ge.agentCli.status})}})}function Z2(){const n=tt();return ct({mutationFn:a=>ze.post(`/agent-cli/install-tasks/${a}/cancel`),onSuccess:a=>{n.setQueryData(ge.agentCli.task(a.id),a)}})}const Yv=["codex","claude-code","cursor-agent"];function Fv(n){return Yv.includes(n)}function J2(n){return Yv.some(a=>n?.some(i=>i.toolId===a&&i.installStatus==="installed"))}const Mo=new Set(["succeeded","failed","cancelled"]),$2="AGENT_CLI_INSTALL_LOCAL_ONLY",W2=[];function eC(n){if(!(n instanceof sl))return;const a=n.details.code;return typeof a=="string"?a:void 0}function Li(n,a){return n instanceof sl&&(n.status===403||eC(n)===$2)?"需要在本机 Agent Tower 打开后安装。":n instanceof Error?n.message:a}function tC(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/1024/1024).toFixed(2)} MB`}function nC(n){return n==="darwin"?"macOS":n==="linux"?"Linux":n==="win32"?"Windows":n??"Unknown"}function aC(n){return n.map(a=>a.data.endsWith(`
|
|
14
14
|
`)?a.data:`${a.data}
|
|
15
15
|
`).join("")}function rC(n){switch(n?.installStatus){case"installed":return{label:"已安装",className:"bg-success/10 text-success",icon:Od};case"legacy_detected":return{label:"Legacy 已检测",className:"bg-warning/10 text-warning",icon:Od};case"missing":return{label:"未安装",className:"bg-muted text-muted-foreground",icon:mv};case"unsupported":return{label:"当前平台不支持",className:"bg-muted text-muted-foreground",icon:Jr};case"error":return{label:"检测失败",className:"bg-destructive/10 text-destructive",icon:Jr};default:return{label:"未检测",className:"bg-muted text-muted-foreground",icon:NE}}}function iC(n){switch(n){case"running":return"安装中";case"verifying":return"验证中";case"succeeded":return"已完成";case"failed":return"失败";case"cancelling":return"取消中";case"cancelled":return"已取消";default:return"未开始"}}function sC(n){return n?.installStatus==="installed"}function lC({status:n}){const{t:a}=ya(),i=rC(n),l=i.icon;return v.jsxs("span",{className:jt("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-medium",i.className),children:[v.jsx(l,{size:11,"aria-hidden":"true"}),a(i.label)]})}function oC({item:n,status:a,selected:i,disabled:l,onSelect:c,onPreview:d,previewing:f,previewDisabled:m}){const{t:g}=ya(),p=n.install.kind==="downloaded-script"&&Fv(n.id),x=sC(a),y=a?.installStatus==="unsupported";return v.jsx("div",{className:jt("rounded-lg border px-4 py-3 transition-colors",i?"border-primary bg-muted/30":"border-border bg-background"),children:v.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[v.jsxs("button",{type:"button",onClick:c,className:"min-w-0 flex-1 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:[v.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[v.jsx("span",{className:"text-sm font-semibold text-foreground",children:n.displayName}),v.jsx(lC,{status:a}),n.legacy&&v.jsx("span",{className:"rounded-full bg-warning/10 px-2 py-0.5 text-[11px] font-medium text-warning",children:g("迁移中")})]}),v.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[v.jsx("span",{children:n.description??g("Agent CLI 工具")}),n.install.kind==="detect-only"&&v.jsx("span",{children:n.install.reason}),a?.version&&v.jsxs("span",{className:"font-mono",children:["v",a.version]}),a?.authStatus==="needs_interactive_login"&&v.jsx("span",{children:g("需要登录")})]})]}),v.jsx("div",{className:"flex shrink-0 items-center gap-2",children:p?v.jsxs("div",{className:"flex flex-col items-start gap-1 sm:items-end",children:[v.jsxs(ma,{size:"sm",variant:x?"outline":"default",onClick:d,disabled:l||m||f||y,children:[f?v.jsx(Ki,{className:"animate-spin",size:14}):v.jsx(pv,{size:14}),g(x?"重新预览":"预览安装")]}),y&&v.jsx("span",{className:"max-w-40 text-xs text-muted-foreground",children:g("当前平台不可安装。")})]}):v.jsxs(ma,{size:"sm",variant:"outline",disabled:!0,children:[v.jsx(HE,{size:14}),g("只检测")]})})]})})}function uC({preview:n,item:a,confirmed:i,onConfirmedChange:l,onInstall:c,installing:d,disabled:f}){const{t:m}=ya();return v.jsxs("section",{className:"rounded-lg border border-border bg-muted/20 p-4",children:[v.jsxs("div",{className:"flex items-start gap-2.5",children:[v.jsx($E,{size:16,className:"mt-0.5 shrink-0 text-success","aria-hidden":"true"}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx("h3",{className:"text-sm font-semibold text-foreground",children:m("安装预览")}),v.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:m("安装任务将使用后端 manifest 中的受控计划执行,前端只提交工具选择和预览 ID。")})]})]}),v.jsxs("dl",{className:"mt-4 grid gap-3 text-xs sm:grid-cols-2",children:[v.jsxs("div",{children:[v.jsx("dt",{className:"text-muted-foreground",children:m("平台")}),v.jsx("dd",{className:"mt-1 font-medium text-foreground",children:nC(n.platform)})]}),v.jsxs("div",{children:[v.jsx("dt",{className:"text-muted-foreground",children:m("脚本大小")}),v.jsx("dd",{className:"mt-1 font-medium text-foreground",children:tC(n.sizeBytes)})]}),v.jsxs("div",{className:"sm:col-span-2",children:[v.jsx("dt",{className:"text-muted-foreground",children:m("最终下载地址")}),v.jsx("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:n.finalUrl})]}),v.jsxs("div",{children:[v.jsx("dt",{className:"text-muted-foreground",children:m("解释器")}),v.jsxs("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:[n.interpreter.command,n.interpreter.args.length>0?` ${n.interpreter.args.join(" ")}`:""]})]}),v.jsxs("div",{children:[v.jsx("dt",{className:"text-muted-foreground",children:m("固定参数")}),v.jsx("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:n.fixedArgs.length>0?n.fixedArgs.join(" "):m("无")})]}),v.jsxs("div",{className:"sm:col-span-2",children:[v.jsx("dt",{className:"text-muted-foreground",children:"SHA-256"}),v.jsx("dd",{className:"mt-1 break-all font-mono text-[11px] text-foreground",children:n.sha256})]})]}),n.platform==="win32"&&v.jsx("div",{className:"mt-4 rounded-lg border border-info/25 bg-info/10 px-3 py-2.5 text-xs leading-relaxed text-foreground",children:m("Windows 将下载并执行官方 PowerShell 安装脚本;不会使用复制粘贴式 shell pipeline。")}),a?.officialSources.length?v.jsxs("div",{className:"mt-4",children:[v.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:m("官方来源")}),v.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:a.officialSources.map(g=>v.jsxs("a",{href:g.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md border border-border bg-background px-2 py-1 text-xs text-foreground hover:bg-muted",children:[g.label,v.jsx(LE,{size:11,"aria-hidden":"true"})]},g.url))})]}):null,n.redirectChain.length>0&&v.jsxs("div",{className:"mt-4",children:[v.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:m("下载链路")}),v.jsx("div",{className:"mt-2 space-y-1 rounded-md bg-background px-3 py-2",children:n.redirectChain.map((g,p)=>v.jsxs("div",{className:"flex items-start justify-between gap-3 text-[11px]",children:[v.jsxs("span",{className:"break-all text-foreground",children:[g.host,g.path]}),v.jsx("span",{className:"shrink-0 font-mono text-muted-foreground",children:g.statusCode})]},`${g.url}-${p}`))})]}),n.riskNotes.length>0&&v.jsxs("div",{className:"mt-4 rounded-lg border border-warning/25 bg-warning/10 px-3 py-2.5",children:[v.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-warning",children:[v.jsx(Jr,{size:13,"aria-hidden":"true"}),m("安装风险")]}),v.jsx("ul",{className:"mt-2 space-y-1 text-xs leading-relaxed text-foreground",children:n.riskNotes.map(g=>v.jsxs("li",{children:["• ",g]},g))})]}),v.jsxs("label",{className:"mt-4 flex cursor-pointer items-start gap-2 rounded-lg border border-border bg-background px-3 py-2.5 text-xs leading-relaxed text-foreground",children:[v.jsx("input",{type:"checkbox",checked:i,onChange:g=>l(g.target.checked),className:"mt-0.5 h-4 w-4 rounded border-border"}),v.jsx("span",{children:m("我已确认官方来源、下载摘要和风险说明。")})]}),v.jsx("div",{className:"mt-4 flex justify-end",children:v.jsxs(ma,{onClick:c,disabled:!i||d||f,children:[d?v.jsx(Ki,{className:"animate-spin",size:14}):v.jsx(pv,{size:14}),m("确认安装")]})})]})}function cC({task:n,logs:a,onCancel:i,cancelling:l}){const{t:c}=ya(),d=n&&!Mo.has(n.status),f=n?.status==="failed",m=n?.status==="succeeded";return v.jsxs("section",{className:"rounded-lg border border-border bg-background p-4",children:[v.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[d?v.jsx(Ki,{className:"animate-spin text-primary",size:16,"aria-hidden":"true"}):m?v.jsx(Od,{className:"text-success",size:16,"aria-hidden":"true"}):f?v.jsx(mv,{className:"text-destructive",size:16,"aria-hidden":"true"}):v.jsx(nT,{className:"text-muted-foreground",size:16,"aria-hidden":"true"}),v.jsxs("div",{children:[v.jsx("h3",{className:"text-sm font-semibold text-foreground",children:c("安装任务")}),v.jsx("p",{className:"text-xs text-muted-foreground",children:c(iC(n?.status))})]})]}),d&&v.jsxs(ma,{size:"sm",variant:"outline",onClick:i,disabled:l,children:[l?v.jsx(Ki,{className:"animate-spin",size:14}):v.jsx(eT,{size:14}),c("取消")]})]}),n?.errorMessage&&v.jsx("div",{className:"mt-3 rounded-md border border-destructive/25 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:n.errorMessage}),n?.errorCode==="VERIFY_FAILED"&&v.jsx("div",{className:"mt-3 rounded-md border border-warning/25 bg-warning/10 px-3 py-2 text-xs leading-relaxed text-foreground",children:c("安装器可能已完成,但当前 Agent Tower 进程尚未刷新 PATH;请重启 Agent Tower 后重新检测。")}),v.jsx("pre",{className:"mt-4 max-h-56 overflow-auto rounded-lg bg-muted/60 p-3 font-mono text-[11px] leading-relaxed text-foreground scrollbar-app-thin",children:a||c("等待安装日志...")})]})}function dC({variant:n="settings",onSkip:a}){const{t:i}=ya(),l=V2(),c=Kv(),d=Vv(),f=Y2(),m=I2(),g=Z2(),[p,x]=S.useState(null),[y,T]=S.useState(null),[N,L]=S.useState(null),[B,P]=S.useState(!1),[K,Y]=S.useState(null),[W,he]=S.useState(null),fe=S.useRef(!1),de=S.useRef(null),R=S.useRef(0),V=F2(N),re=N?V.data??(m.data?.task.id===N?m.data.task:void 0):void 0,ke=re?!Mo.has(re.status):!1,Re=X2(N,!!N&&(ke||!re)),Se=l.data??W2,Me=S.useMemo(()=>new Map((c.data?.tools??[]).map($=>[$.toolId,$])),[c.data]),Le=S.useMemo(()=>(Se.find(ae=>Fv(ae.id)&&Me.get(ae.id)?.installStatus!=="installed")??Se[0])?.id??null,[Se,Me]),Ee=p??Le,k=y?Se.find($=>$.id===y.toolId)??null:null,X=!!re&&!Mo.has(re.status),Q=aC(Re.data?.entries??[]),me=()=>{T(null),P(!1)};S.useEffect(()=>{fe.current||c.data?.stale&&(fe.current=!0,d.mutate(void 0,{onError:$=>{Y(Li($,i("检测失败")))}}))},[d,c.data?.stale,i]),S.useEffect(()=>{!re||!Mo.has(re.status)||de.current!==re.id&&(de.current=re.id,Re.refetch(),d.mutate(void 0,{onError:$=>{Y(Li($,i("检测失败")))}}))},[Re,d,re,i]);const ve=()=>{Y(null),d.mutate(void 0,{onError:$=>{const ae=Li($,i("检测失败"));Y(ae),Bi.error(ae)}})},C=$=>{R.current+=1,he(null),x($),me(),Y(null)},q=$=>{const ae=R.current+1;R.current=ae,x($),he($),me(),Y(null),f.mutate($,{onSuccess:Te=>{R.current!==ae||Te.toolId!==$||(T(Te),P(!1))},onError:Te=>{if(R.current!==ae)return;const Be=Li(Te,i("创建安装预览失败"));Y(Be),Bi.error(Be)},onSettled:()=>{R.current===ae&&he(null)}})},H=()=>{if(!y||!k||y.toolId!==k.id||!B){P(!1),Y(i("安装预览已失效,请重新预览当前工具。"));return}Y(null),m.mutate(y.id,{onSuccess:$=>{L($.task.id),T(null),P(!1),Bi.success($.reused?i("已有安装任务正在运行"):i("安装任务已启动"))},onError:$=>{const ae=Li($,i("启动安装失败"));Y(ae),Bi.error(ae)}})},Z=()=>{N&&g.mutate(N,{onError:$=>{const ae=Li($,i("取消安装失败"));Y(ae),Bi.error(ae)}})},ee=()=>{re?.toolId&&(L(null),de.current=null,q(re.toolId))};return l.isLoading||c.isLoading?v.jsx("div",{className:"space-y-3",children:Array.from({length:4}).map(($,ae)=>v.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-muted"},ae))}):l.isError||c.isError?v.jsx("div",{role:"alert",className:"rounded-lg border border-destructive/25 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:i("Agent CLI 环境信息加载失败。")}):v.jsxs("div",{className:jt("space-y-5",n==="onboarding"&&"max-h-[min(72vh,720px)] overflow-y-auto pr-1 scrollbar-app-thin"),children:[v.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[v.jsxs("div",{className:"min-w-0",children:[v.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[v.jsx("h3",{className:"text-base font-semibold text-foreground",children:i("Agent CLI 环境")}),c.data?.stale&&v.jsx("span",{className:"rounded-full bg-muted px-2 py-0.5 text-[11px] font-medium text-muted-foreground",children:i("状态待检测")})]}),v.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:i("Codex、Claude Code 和 Cursor 可通过官方安装计划引导安装;Gemini CLI 首版只检测。")})]}),v.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a&&v.jsx(ma,{size:"sm",variant:"ghost",onClick:a,children:i("跳过")}),v.jsxs(ma,{size:"sm",variant:"outline",onClick:ve,disabled:d.isPending,children:[v.jsx(FE,{className:jt(d.isPending&&"animate-spin"),size:14}),i("重新检测")]})]})]}),K&&v.jsx("div",{role:"alert",className:"rounded-lg border border-warning/25 bg-warning/10 px-4 py-3 text-sm text-foreground",children:v.jsxs("div",{className:"flex items-start gap-2",children:[v.jsx(Jr,{size:15,className:"mt-0.5 shrink-0 text-warning","aria-hidden":"true"}),v.jsx("span",{children:K})]})}),v.jsx("div",{className:"grid gap-3",children:Se.map($=>v.jsx(oC,{item:$,status:Me.get($.id),selected:$.id===Ee,disabled:X,onSelect:()=>C($.id),onPreview:()=>q($.id),previewing:f.isPending&&W===$.id,previewDisabled:f.isPending},$.id))}),y&&k&&v.jsx(uC,{preview:y,item:k,confirmed:B,onConfirmedChange:P,onInstall:H,installing:m.isPending,disabled:X}),re&&v.jsxs("div",{className:"space-y-3",children:[v.jsx(cC,{task:re,logs:Q,onCancel:Z,cancelling:g.isPending}),re.status==="failed"&&v.jsx("div",{className:"flex justify-end",children:v.jsxs(ma,{size:"sm",variant:"outline",onClick:ee,disabled:f.isPending,children:[v.jsx(Yo,{size:14}),i("重试")]})})]})]})}const Xv="agentCliEnvironmentOnboardingSkipped";function fC(){return typeof window>"u"?!0:window.localStorage.getItem(Xv)==="true"}function hC(){typeof window>"u"||window.localStorage.setItem(Xv,"true")}function mC(){const{t:n}=ya(),a=Kv(),i=Vv(),[l,c]=S.useState(fC),d=S.useRef(!1),f=S.useMemo(()=>{if(l)return!1;const g=a.data;return!g||g.stale?!1:!J2(g.tools)},[l,a.data]);S.useEffect(()=>{l||d.current||!a.data?.stale||(d.current=!0,i.mutate())},[l,i,a.data?.stale]),S.useEffect(()=>{if(f)return qv(),()=>Dd()},[f]);const m=()=>{hC(),c(!0)};return f?v.jsxs("div",{className:"fixed inset-0 z-[55] flex items-center justify-center p-3 sm:p-6",role:"dialog","aria-modal":"true","aria-label":n("Agent 环境引导"),children:[v.jsx("div",{className:"absolute inset-0 bg-black/25 backdrop-blur-sm","aria-hidden":"true"}),v.jsxs("div",{className:jt("relative flex max-h-[calc(100vh-1.5rem)] w-full max-w-4xl flex-col overflow-hidden rounded-xl border border-border bg-background shadow-xl","sm:max-h-[calc(100vh-3rem)]"),children:[v.jsxs("div",{className:"flex shrink-0 items-start justify-between gap-4 border-b border-border/60 bg-muted/30 px-5 py-4",children:[v.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[v.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-primary text-primary-foreground","aria-hidden":"true",children:v.jsx(hv,{size:18})}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("h2",{className:"text-base font-semibold text-foreground",children:n("配置本机 Agent CLI")}),v.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:n("当前没有检测到可用的 Codex、Claude Code 或 Cursor CLI。可以先完成安装,也可以稍后从设置里打开。")})]})]}),v.jsx("button",{type:"button",onClick:m,"aria-label":n("跳过"),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:v.jsx(gv,{size:16})})]}),v.jsx("div",{className:"min-h-0 flex-1 overflow-hidden p-5",children:v.jsx(dC,{variant:"onboarding",onSkip:m})})]})]}):null}function pC(){return v.jsx(G2,{children:v.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[v.jsx(Nw,{}),v.jsx(j2,{}),v.jsx(mC,{})]})})}function gC(n,a,i={}){const l=a instanceof Error?a:new Error(yC(a));return{time:new Date().toISOString(),source:n,name:l.name,message:l.message,...l.stack?{stack:l.stack}:{},...i.componentStack?{componentStack:i.componentStack}:{},...i.metadata?{metadata:i.metadata}:{}}}function Iv(n,a,i={}){try{console.error(`[error-log] ${n}`,gC(n,a,i))}catch{}}function yC(n){if(typeof n=="string")return n;if(n===void 0)return"undefined";try{return JSON.stringify(n)??String(n)}catch{return String(n)}}class uf extends S.Component{state={error:null};static getDerivedStateFromError(a){return{error:a}}componentDidCatch(a,i){Iv(this.props.source,a,{componentStack:i.componentStack,metadata:this.props.metadata}),this.props.onError?.(a,i)}reset=()=>{this.setState({error:null})};render(){const{error:a}=this.state;return a?this.props.fallback({error:a,reset:this.reset}):this.props.children}}function vC({children:n}){const{t:a}=ya();return v.jsx(uf,{source:"app-root",fallback:({error:i})=>v.jsxs("div",{role:"alert",className:"flex min-h-dvh flex-col items-center justify-center gap-4 bg-background px-6 py-12 text-center text-foreground",children:[v.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full border border-destructive/20 bg-destructive/10 text-destructive",children:v.jsx(Jr,{size:22})}),v.jsxs("div",{className:"space-y-1",children:[v.jsx("h1",{className:"text-base font-semibold",children:a("Something went wrong")}),v.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:a("The interface hit a rendering error. Reload the page to continue.")})]}),v.jsx("p",{className:"max-w-xl truncate rounded-md border border-border/60 bg-muted/40 px-2 py-1 font-mono text-[11px] text-muted-foreground",title:i.message||i.name,children:i.message||i.name}),v.jsx("p",{className:"max-w-md text-[11px] text-muted-foreground/80",children:a("Only rendering errors are caught here. Errors from event handlers, async callbacks or observers are not.")}),v.jsxs("button",{type:"button",onClick:()=>window.location.reload(),className:"inline-flex items-center gap-1.5 rounded-md bg-brand px-3.5 py-1.5 text-xs font-medium text-brand-foreground transition-colors hover:bg-brand/90",children:[v.jsx(Yo,{size:13}),a("Reload page")]})]}),children:n})}function bC({children:n}){return v.jsx(uf,{source:"app-shell",fallback:({error:a})=>v.jsxs("div",{role:"alert",className:"flex min-h-dvh flex-col items-center justify-center gap-4 bg-background px-6 py-12 text-center text-foreground",children:[v.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full border border-destructive/20 bg-destructive/10 text-destructive",children:v.jsx(Jr,{size:22})}),v.jsxs("div",{className:"space-y-1",children:[v.jsx("h1",{className:"text-base font-semibold",children:aa("Something went wrong")}),v.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:aa("The interface could not be displayed. Reload the page to try again.")})]}),v.jsx("p",{className:"max-w-xl truncate rounded-md border border-border/60 bg-muted/40 px-2 py-1 font-mono text-[11px] text-muted-foreground",title:a.message||a.name,children:a.message||a.name}),v.jsx("p",{className:"max-w-md text-[11px] text-muted-foreground/80",children:aa("Only rendering errors are caught here. Errors from event handlers, async callbacks or observers are not.")}),v.jsxs("button",{type:"button",onClick:()=>window.location.reload(),className:"inline-flex items-center gap-1.5 rounded-md bg-brand px-3.5 py-1.5 text-xs font-medium text-brand-foreground transition-colors hover:bg-brand/90",children:[v.jsx(Yo,{size:13}),aa("Reload page")]})]}),children:n})}function xC(n){if(n instanceof Error)return n.message||n.name;if(typeof n=="string")return n;if(n&&typeof n=="object"){const{status:a,statusText:i,message:l}=n;if(typeof l=="string"&&l)return l;if(typeof a=="number")return typeof i=="string"&&i?`${a} ${i}`:String(a)}return n==null?"Unknown route error":String(n)}function cy(){const n=iv(),a=nf(),{t:i}=ya(),l=S.useRef(void 0);S.useEffect(()=>{l.current!==n&&(l.current=n,Iv("router.errorElement",n,{metadata:{path:typeof window>"u"?null:window.location.pathname}}))},[n]);const c=xC(n);return v.jsxs("div",{role:"alert",className:"flex min-h-dvh flex-col items-center justify-center gap-4 bg-background px-6 py-12 text-center text-foreground",children:[v.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full border border-destructive/20 bg-destructive/10 text-destructive",children:v.jsx(Jr,{size:22})}),v.jsxs("div",{className:"space-y-1",children:[v.jsx("h1",{className:"text-base font-semibold",children:i("Something went wrong")}),v.jsx("p",{className:"max-w-md text-sm text-muted-foreground",children:i("This page could not be displayed. Go back to the task board and try again.")})]}),v.jsx("p",{className:"max-w-xl truncate rounded-md border border-border/60 bg-muted/40 px-2 py-1 font-mono text-[11px] text-muted-foreground",title:c,children:c}),v.jsx("p",{className:"max-w-md text-[11px] text-muted-foreground/80",children:i("Only rendering errors are caught here. Errors from event handlers, async callbacks or observers are not.")}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsxs("button",{type:"button",onClick:()=>a("/"),className:"inline-flex items-center gap-1.5 rounded-md bg-brand px-3.5 py-1.5 text-xs font-medium text-brand-foreground transition-colors hover:bg-brand/90",children:[v.jsx(wE,{size:13}),i("Back to home")]}),v.jsxs("button",{type:"button",onClick:()=>window.location.reload(),className:"inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-3.5 py-1.5 text-xs font-medium text-foreground transition-colors hover:bg-accent",children:[v.jsx(Yo,{size:13}),i("Retry")]})]})]})}const SC="/assets/agent-tower-logo-fKNk9Ce3.png",wC=`
|
|
16
16
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -119,4 +119,4 @@ Please change the parent <Route path="${Y}"> to <Route path="${Y==="/"?"*":`${Y}
|
|
|
119
119
|
0%, 100% { transform: scale(1); opacity: 1; }
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
`})]})}const hR=[{id:"tower-pulse",name:"Tower Pulse",description:"Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。",component:EC},{id:"stack-rise",name:"Stack Rise",description:"五根柱状条交错升降,暗喻任务编排队列,节奏感强。",component:TC},{id:"orbit-ring",name:"Orbit Ring",description:"双层同心圆环反向旋转,精密工具质感,不浮夸。",component:CC},{id:"terminal-cursor",name:"Terminal Cursor",description:"终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。",component:AC},{id:"dot-wave",name:"Dot Wave",description:"三点波浪脉动,极简克制,适合工具型产品的默认加载。",component:RC},{id:"layer-shift",name:"Layer Shift",description:"三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。",component:_C},{id:"progress-beam",name:"Progress Beam",description:"水平光束往复滑过进度条,线性进度隐喻,不阻断视线。",component:kC},{id:"skeleton-board",name:"Skeleton Board",description:"三列骨架屏微闪,预示看板布局,减少布局跳变。",component:NC},{id:"glyph-rotate",name:"Glyph Rotate",description:"圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。",component:OC},{id:"charcoal-breathe",name:"Charcoal Breathe",description:"Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。",component:Zv}];function Ui(){const{usesIntegratedTitlebar:n}=Gv();return v.jsxs("div",{className:`fixed inset-0 z-50 flex items-center justify-center bg-background ${n?"app-region-drag":""}`,children:[v.jsx("style",{children:wC}),v.jsx(Zv,{size:"lg"})]})}const MC=new Set(["general","agent-environment","agents","team","projects","notifications","mcp","agents-legacy"]);function dy(){const n=K2(),{tab:a}=uw();return S.useEffect(()=>{const i=a&&MC.has(a)?a:"general";Fs.getState().openSettings(i),n("/",{replace:!0})},[n,a]),null}const jC=S.lazy(()=>_n(()=>import("./ProjectKanbanPage-DNhv4WcA.js").then(n=>n.P),__vite__mapDeps([32,10,11,2,12,8,9,33,34,13,3,22,19,6,15,35,23,24,26,31,20,1,4,28,16,17,36])).then(n=>({default:n.ProjectKanbanPage}))),fy=S.lazy(()=>_n(()=>import("./ConversationPage-BkIJfuUB.js"),__vite__mapDeps([37,10,11,2,12,35,3,34,13,22,19,6,15,26])).then(n=>({default:n.ConversationPage}))),DC=S.lazy(()=>_n(()=>import("./DemoPage-D5HfzpfS.js"),[]).then(n=>({default:n.DemoPage}))),zC=S.lazy(()=>_n(()=>import("./AgentDemoPage-B_9OhUu7.js"),__vite__mapDeps([38,35,2,3,10,11,12,33,30,20])).then(n=>({default:n.AgentDemoPage}))),LC=S.lazy(()=>_n(()=>import("./LoadingPreviewPage-DWr9Bc06.js"),[]).then(n=>({default:n.LoadingPreviewPage}))),UC=[{path:"/",element:v.jsx(pC,{}),errorElement:v.jsx(cy,{}),children:[{errorElement:v.jsx(cy,{}),children:[{index:!0,element:v.jsx(S.Suspense,{fallback:v.jsx(Ui,{}),children:v.jsx(jC,{})})},{path:"conversations",element:v.jsx(S.Suspense,{fallback:v.jsx(Ui,{}),children:v.jsx(fy,{})})},{path:"conversations/:conversationId",element:v.jsx(S.Suspense,{fallback:v.jsx(Ui,{}),children:v.jsx(fy,{})})},{path:"demo",element:v.jsx(S.Suspense,{fallback:v.jsx(Ui,{}),children:v.jsx(DC,{})})},{path:"agent-demo",element:v.jsx(S.Suspense,{fallback:v.jsx(Ui,{}),children:v.jsx(zC,{})})},{path:"loading-preview",element:v.jsx(S.Suspense,{fallback:v.jsx(Ui,{}),children:v.jsx(LC,{})})},{path:"settings",element:v.jsx(dy,{})},{path:"settings/:tab",element:v.jsx(dy,{})}]}]}],BC=tE(UC);function qC(){return v.jsx(hE,{router:BC})}const ga=Object.create(null);ga.open="0";ga.close="1";ga.ping="2";ga.pong="3";ga.message="4";ga.upgrade="5";ga.noop="6";const jo=Object.create(null);Object.keys(ga).forEach(n=>{jo[ga[n]]=n});const Ld={type:"error",data:"parser error"},Jv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",$v=typeof ArrayBuffer=="function",Wv=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,cf=({type:n,data:a},i,l)=>Jv&&a instanceof Blob?i?l(a):hy(a,l):$v&&(a instanceof ArrayBuffer||Wv(a))?i?l(a):hy(new Blob([a]),l):l(ga[n]+(a||"")),hy=(n,a)=>{const i=new FileReader;return i.onload=function(){const l=i.result.split(",")[1];a("b"+(l||""))},i.readAsDataURL(n)};function my(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let gd;function HC(n,a){if(Jv&&n.data instanceof Blob)return n.data.arrayBuffer().then(my).then(a);if($v&&(n.data instanceof ArrayBuffer||Wv(n.data)))return a(my(n.data));cf(n,!1,i=>{gd||(gd=new TextEncoder),a(gd.encode(i))})}const py="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<py.length;n++)Xs[py.charCodeAt(n)]=n;const QC=n=>{let a=n.length*.75,i=n.length,l,c=0,d,f,m,g;n[n.length-1]==="="&&(a--,n[n.length-2]==="="&&a--);const p=new ArrayBuffer(a),x=new Uint8Array(p);for(l=0;l<i;l+=4)d=Xs[n.charCodeAt(l)],f=Xs[n.charCodeAt(l+1)],m=Xs[n.charCodeAt(l+2)],g=Xs[n.charCodeAt(l+3)],x[c++]=d<<2|f>>4,x[c++]=(f&15)<<4|m>>2,x[c++]=(m&3)<<6|g&63;return p},PC=typeof ArrayBuffer=="function",df=(n,a)=>{if(typeof n!="string")return{type:"message",data:eb(n,a)};const i=n.charAt(0);return i==="b"?{type:"message",data:GC(n.substring(1),a)}:jo[i]?n.length>1?{type:jo[i],data:n.substring(1)}:{type:jo[i]}:Ld},GC=(n,a)=>{if(PC){const i=QC(n);return eb(i,a)}else return{base64:!0,data:n}},eb=(n,a)=>a==="blob"?n instanceof Blob?n:new Blob([n]):n instanceof ArrayBuffer?n:n.buffer,tb="",KC=(n,a)=>{const i=n.length,l=new Array(i);let c=0;n.forEach((d,f)=>{cf(d,!1,m=>{l[f]=m,++c===i&&a(l.join(tb))})})},VC=(n,a)=>{const i=n.split(tb),l=[];for(let c=0;c<i.length;c++){const d=df(i[c],a);if(l.push(d),d.type==="error")break}return l};function YC(){return new TransformStream({transform(n,a){HC(n,i=>{const l=i.length;let c;if(l<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,l);else if(l<65536){c=new Uint8Array(3);const d=new DataView(c.buffer);d.setUint8(0,126),d.setUint16(1,l)}else{c=new Uint8Array(9);const d=new DataView(c.buffer);d.setUint8(0,127),d.setBigUint64(1,BigInt(l))}n.data&&typeof n.data!="string"&&(c[0]|=128),a.enqueue(c),a.enqueue(i)})}})}let yd;function Ao(n){return n.reduce((a,i)=>a+i.length,0)}function Ro(n,a){if(n[0].length===a)return n.shift();const i=new Uint8Array(a);let l=0;for(let c=0;c<a;c++)i[c]=n[0][l++],l===n[0].length&&(n.shift(),l=0);return n.length&&l<n[0].length&&(n[0]=n[0].slice(l)),i}function FC(n,a){yd||(yd=new TextDecoder);const i=[];let l=0,c=-1,d=!1;return new TransformStream({transform(f,m){for(i.push(f);;){if(l===0){if(Ao(i)<1)break;const g=Ro(i,1);d=(g[0]&128)===128,c=g[0]&127,c<126?l=3:c===126?l=1:l=2}else if(l===1){if(Ao(i)<2)break;const g=Ro(i,2);c=new DataView(g.buffer,g.byteOffset,g.length).getUint16(0),l=3}else if(l===2){if(Ao(i)<8)break;const g=Ro(i,8),p=new DataView(g.buffer,g.byteOffset,g.length),x=p.getUint32(0);if(x>Math.pow(2,21)-1){m.enqueue(Ld);break}c=x*Math.pow(2,32)+p.getUint32(4),l=3}else{if(Ao(i)<c)break;const g=Ro(i,c);m.enqueue(df(d?g:yd.decode(g),a)),l=0}if(c===0||c>n){m.enqueue(Ld);break}}}})}const nb=4;function Dt(n){if(n)return XC(n)}function XC(n){for(var a in Dt.prototype)n[a]=Dt.prototype[a];return n}Dt.prototype.on=Dt.prototype.addEventListener=function(n,a){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(a),this};Dt.prototype.once=function(n,a){function i(){this.off(n,i),a.apply(this,arguments)}return i.fn=a,this.on(n,i),this};Dt.prototype.off=Dt.prototype.removeListener=Dt.prototype.removeAllListeners=Dt.prototype.removeEventListener=function(n,a){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+n];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var l,c=0;c<i.length;c++)if(l=i[c],l===a||l.fn===a){i.splice(c,1);break}return i.length===0&&delete this._callbacks["$"+n],this};Dt.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var a=new Array(arguments.length-1),i=this._callbacks["$"+n],l=1;l<arguments.length;l++)a[l-1]=arguments[l];if(i){i=i.slice(0);for(var l=0,c=i.length;l<c;++l)i[l].apply(this,a)}return this};Dt.prototype.emitReserved=Dt.prototype.emit;Dt.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};Dt.prototype.hasListeners=function(n){return!!this.listeners(n).length};const Fo=typeof Promise=="function"&&typeof Promise.resolve=="function"?a=>Promise.resolve().then(a):(a,i)=>i(a,0),Kn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),IC="arraybuffer";function ab(n,...a){return a.reduce((i,l)=>(n.hasOwnProperty(l)&&(i[l]=n[l]),i),{})}const ZC=Kn.setTimeout,JC=Kn.clearTimeout;function Xo(n,a){a.useNativeTimers?(n.setTimeoutFn=ZC.bind(Kn),n.clearTimeoutFn=JC.bind(Kn)):(n.setTimeoutFn=Kn.setTimeout.bind(Kn),n.clearTimeoutFn=Kn.clearTimeout.bind(Kn))}const $C=1.33;function WC(n){return typeof n=="string"?eA(n):Math.ceil((n.byteLength||n.size)*$C)}function eA(n){let a=0,i=0;for(let l=0,c=n.length;l<c;l++)a=n.charCodeAt(l),a<128?i+=1:a<2048?i+=2:a<55296||a>=57344?i+=3:(l++,i+=4);return i}function rb(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function tA(n){let a="";for(let i in n)n.hasOwnProperty(i)&&(a.length&&(a+="&"),a+=encodeURIComponent(i)+"="+encodeURIComponent(n[i]));return a}function nA(n){let a={},i=n.split("&");for(let l=0,c=i.length;l<c;l++){let d=i[l].split("=");a[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return a}class aA extends Error{constructor(a,i,l){super(a),this.description=i,this.context=l,this.type="TransportError"}}class ff extends Dt{constructor(a){super(),this.writable=!1,Xo(this,a),this.opts=a,this.query=a.query,this.socket=a.socket,this.supportsBinary=!a.forceBase64}onError(a,i,l){return super.emitReserved("error",new aA(a,i,l)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(a){this.readyState==="open"&&this.write(a)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(a){const i=df(a,this.socket.binaryType);this.onPacket(i)}onPacket(a){super.emitReserved("packet",a)}onClose(a){this.readyState="closed",super.emitReserved("close",a)}pause(a){}createUri(a,i={}){return a+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_hostname(){const a=this.opts.hostname;return a.indexOf(":")===-1?a:"["+a+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(a){const i=tA(a);return i.length?"?"+i:""}}class rA extends ff{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(a){this.readyState="pausing";const i=()=>{this.readyState="paused",a()};if(this._polling||!this.writable){let l=0;this._polling&&(l++,this.once("pollComplete",function(){--l||i()})),this.writable||(l++,this.once("drain",function(){--l||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(a){const i=l=>{if(this.readyState==="opening"&&l.type==="open"&&this.onOpen(),l.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(l)};VC(a,this.socket.binaryType).forEach(i),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const a=()=>{this.write([{type:"close"}])};this.readyState==="open"?a():this.once("open",a)}write(a){this.writable=!1,KC(a,i=>{this.doWrite(i,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const a=this.opts.secure?"https":"http",i=this.query||{};return this.opts.timestampRequests!==!1&&(i[this.opts.timestampParam]=rb()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(a,i)}}let ib=!1;try{ib=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const iA=ib;function sA(){}class lA extends rA{constructor(a){if(super(a),typeof location<"u"){const i=location.protocol==="https:";let l=location.port;l||(l=i?"443":"80"),this.xd=typeof location<"u"&&a.hostname!==location.hostname||l!==a.port}}doWrite(a,i){const l=this.request({method:"POST",data:a});l.on("success",i),l.on("error",(c,d)=>{this.onError("xhr post error",c,d)})}doPoll(){const a=this.request();a.on("data",this.onData.bind(this)),a.on("error",(i,l)=>{this.onError("xhr poll error",i,l)}),this.pollXhr=a}}let Gi=class Do extends Dt{constructor(a,i,l){super(),this.createRequest=a,Xo(this,l),this._opts=l,this._method=l.method||"GET",this._uri=i,this._data=l.data!==void 0?l.data:null,this._create()}_create(){var a;const i=ab(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;const l=this._xhr=this.createRequest(i);try{l.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){l.setDisableHeaderCheck&&l.setDisableHeaderCheck(!0);for(let c in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(c)&&l.setRequestHeader(c,this._opts.extraHeaders[c])}}catch{}if(this._method==="POST")try{l.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{l.setRequestHeader("Accept","*/*")}catch{}(a=this._opts.cookieJar)===null||a===void 0||a.addCookies(l),"withCredentials"in l&&(l.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(l.timeout=this._opts.requestTimeout),l.onreadystatechange=()=>{var c;l.readyState===3&&((c=this._opts.cookieJar)===null||c===void 0||c.parseCookies(l.getResponseHeader("set-cookie"))),l.readyState===4&&(l.status===200||l.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof l.status=="number"?l.status:0)},0))},l.send(this._data)}catch(c){this.setTimeoutFn(()=>{this._onError(c)},0);return}typeof document<"u"&&(this._index=Do.requestsCount++,Do.requests[this._index]=this)}_onError(a){this.emitReserved("error",a,this._xhr),this._cleanup(!0)}_cleanup(a){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=sA,a)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Do.requests[this._index],this._xhr=null}}_onLoad(){const a=this._xhr.responseText;a!==null&&(this.emitReserved("data",a),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Gi.requestsCount=0;Gi.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",gy);else if(typeof addEventListener=="function"){const n="onpagehide"in Kn?"pagehide":"unload";addEventListener(n,gy,!1)}}function gy(){for(let n in Gi.requests)Gi.requests.hasOwnProperty(n)&&Gi.requests[n].abort()}const oA=(function(){const n=sb({xdomain:!1});return n&&n.responseType!==null})();class uA extends lA{constructor(a){super(a);const i=a&&a.forceBase64;this.supportsBinary=oA&&!i}request(a={}){return Object.assign(a,{xd:this.xd},this.opts),new Gi(sb,this.uri(),a)}}function sb(n){const a=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!a||iA))return new XMLHttpRequest}catch{}if(!a)try{return new Kn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const lb=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class cA extends ff{get name(){return"websocket"}doOpen(){const a=this.uri(),i=this.opts.protocols,l=lb?{}:ab(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(l.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(a,i,l)}catch(c){return this.emitReserved("error",c)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=a=>this.onClose({description:"websocket connection closed",context:a}),this.ws.onmessage=a=>this.onData(a.data),this.ws.onerror=a=>this.onError("websocket error",a)}write(a){this.writable=!1;for(let i=0;i<a.length;i++){const l=a[i],c=i===a.length-1;cf(l,this.supportsBinary,d=>{try{this.doWrite(l,d)}catch{}c&&Fo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const a=this.opts.secure?"wss":"ws",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=rb()),this.supportsBinary||(i.b64=1),this.createUri(a,i)}}const vd=Kn.WebSocket||Kn.MozWebSocket;class dA extends cA{createSocket(a,i,l){return lb?new vd(a,i,l):i?new vd(a,i):new vd(a)}doWrite(a,i){this.ws.send(i)}}class fA extends ff{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(a){return this.emitReserved("error",a)}this._transport.closed.then(()=>{this.onClose()}).catch(a=>{this.onError("webtransport error",a)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(a=>{const i=FC(Number.MAX_SAFE_INTEGER,this.socket.binaryType),l=a.readable.pipeThrough(i).getReader(),c=YC();c.readable.pipeTo(a.writable),this._writer=c.writable.getWriter();const d=()=>{l.read().then(({done:m,value:g})=>{m||(this.onPacket(g),d())}).catch(m=>{})};d();const f={type:"open"};this.query.sid&&(f.data=`{"sid":"${this.query.sid}"}`),this._writer.write(f).then(()=>this.onOpen())})})}write(a){this.writable=!1;for(let i=0;i<a.length;i++){const l=a[i],c=i===a.length-1;this._writer.write(l).then(()=>{c&&Fo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var a;(a=this._transport)===null||a===void 0||a.close()}}const hA={websocket:dA,webtransport:fA,polling:uA},mA=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,pA=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ud(n){if(n.length>8e3)throw"URI too long";const a=n,i=n.indexOf("["),l=n.indexOf("]");i!=-1&&l!=-1&&(n=n.substring(0,i)+n.substring(i,l).replace(/:/g,";")+n.substring(l,n.length));let c=mA.exec(n||""),d={},f=14;for(;f--;)d[pA[f]]=c[f]||"";return i!=-1&&l!=-1&&(d.source=a,d.host=d.host.substring(1,d.host.length-1).replace(/;/g,":"),d.authority=d.authority.replace("[","").replace("]","").replace(/;/g,":"),d.ipv6uri=!0),d.pathNames=gA(d,d.path),d.queryKey=yA(d,d.query),d}function gA(n,a){const i=/\/{2,9}/g,l=a.replace(i,"/").split("/");return(a.slice(0,1)=="/"||a.length===0)&&l.splice(0,1),a.slice(-1)=="/"&&l.splice(l.length-1,1),l}function yA(n,a){const i={};return a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(l,c,d){c&&(i[c]=d)}),i}const Bd=typeof addEventListener=="function"&&typeof removeEventListener=="function",zo=[];Bd&&addEventListener("offline",()=>{zo.forEach(n=>n())},!1);class br extends Dt{constructor(a,i){if(super(),this.binaryType=IC,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,a&&typeof a=="object"&&(i=a,a=null),a){const l=Ud(a);i.hostname=l.host,i.secure=l.protocol==="https"||l.protocol==="wss",i.port=l.port,l.query&&(i.query=l.query)}else i.host&&(i.hostname=Ud(i.host).host);Xo(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(l=>{const c=l.prototype.name;this.transports.push(c),this._transportsByName[c]=l}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=nA(this.opts.query)),Bd&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},zo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(a){const i=Object.assign({},this.opts.query);i.EIO=nb,i.transport=a,this.id&&(i.sid=this.id);const l=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[a]);return new this._transportsByName[a](l)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const a=this.opts.rememberUpgrade&&br.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const i=this.createTransport(a);i.open(),this.setTransport(i)}setTransport(a){this.transport&&this.transport.removeAllListeners(),this.transport=a,a.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",br.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(a){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",a),this.emitReserved("heartbeat"),a.type){case"open":this.onHandshake(JSON.parse(a.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const i=new Error("server error");i.code=a.data,this._onError(i);break;case"message":this.emitReserved("data",a.data),this.emitReserved("message",a.data);break}}onHandshake(a){this.emitReserved("handshake",a),this.id=a.sid,this.transport.query.sid=a.sid,this._pingInterval=a.pingInterval,this._pingTimeout=a.pingTimeout,this._maxPayload=a.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const a=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+a,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},a),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const a=this._getWritablePackets();this.transport.send(a),this._prevBufferLen=a.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let l=0;l<this.writeBuffer.length;l++){const c=this.writeBuffer[l].data;if(c&&(i+=WC(c)),l>0&&i>this._maxPayload)return this.writeBuffer.slice(0,l);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const a=Date.now()>this._pingTimeoutTime;return a&&(this._pingTimeoutTime=0,Fo(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),a}write(a,i,l){return this._sendPacket("message",a,i,l),this}send(a,i,l){return this._sendPacket("message",a,i,l),this}_sendPacket(a,i,l,c){if(typeof i=="function"&&(c=i,i=void 0),typeof l=="function"&&(c=l,l=null),this.readyState==="closing"||this.readyState==="closed")return;l=l||{},l.compress=l.compress!==!1;const d={type:a,data:i,options:l};this.emitReserved("packetCreate",d),this.writeBuffer.push(d),c&&this.once("flush",c),this.flush()}close(){const a=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),a()},l=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?l():a()}):this.upgrading?l():a()),this}_onError(a){if(br.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",a),this._onClose("transport error",a)}_onClose(a,i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Bd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const l=zo.indexOf(this._offlineEventListener);l!==-1&&zo.splice(l,1)}this.readyState="closed",this.id=null,this.emitReserved("close",a,i),this.writeBuffer=[],this._prevBufferLen=0}}}br.protocol=nb;class vA extends br{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let a=0;a<this._upgrades.length;a++)this._probe(this._upgrades[a])}_probe(a){let i=this.createTransport(a),l=!1;br.priorWebsocketSuccess=!1;const c=()=>{l||(i.send([{type:"ping",data:"probe"}]),i.once("packet",y=>{if(!l)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;br.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{l||this.readyState!=="closed"&&(x(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=i.name,this.emitReserved("upgradeError",T)}}))};function d(){l||(l=!0,x(),i.close(),i=null)}const f=y=>{const T=new Error("probe error: "+y);T.transport=i.name,d(),this.emitReserved("upgradeError",T)};function m(){f("transport closed")}function g(){f("socket closed")}function p(y){i&&y.name!==i.name&&d()}const x=()=>{i.removeListener("open",c),i.removeListener("error",f),i.removeListener("close",m),this.off("close",g),this.off("upgrading",p)};i.once("open",c),i.once("error",f),i.once("close",m),this.once("close",g),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&a!=="webtransport"?this.setTimeoutFn(()=>{l||i.open()},200):i.open()}onHandshake(a){this._upgrades=this._filterUpgrades(a.upgrades),super.onHandshake(a)}_filterUpgrades(a){const i=[];for(let l=0;l<a.length;l++)~this.transports.indexOf(a[l])&&i.push(a[l]);return i}}let bA=class extends vA{constructor(a,i={}){const l=typeof a=="object"?a:i;(!l.transports||l.transports&&typeof l.transports[0]=="string")&&(l.transports=(l.transports||["polling","websocket","webtransport"]).map(c=>hA[c]).filter(c=>!!c)),super(a,l)}};function xA(n,a="",i){let l=n;i=i||typeof location<"u"&&location,n==null&&(n=i.protocol+"//"+i.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=i.protocol+n:n=i.host+n),/^(https?|wss?):\/\//.test(n)||(typeof i<"u"?n=i.protocol+"//"+n:n="https://"+n),l=Ud(n)),l.port||(/^(http|ws)$/.test(l.protocol)?l.port="80":/^(http|ws)s$/.test(l.protocol)&&(l.port="443")),l.path=l.path||"/";const d=l.host.indexOf(":")!==-1?"["+l.host+"]":l.host;return l.id=l.protocol+"://"+d+":"+l.port+a,l.href=l.protocol+"://"+d+(i&&i.port===l.port?"":":"+l.port),l}const SA=typeof ArrayBuffer=="function",wA=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,ob=Object.prototype.toString,EA=typeof Blob=="function"||typeof Blob<"u"&&ob.call(Blob)==="[object BlobConstructor]",TA=typeof File=="function"||typeof File<"u"&&ob.call(File)==="[object FileConstructor]";function hf(n){return SA&&(n instanceof ArrayBuffer||wA(n))||EA&&n instanceof Blob||TA&&n instanceof File}function Lo(n,a){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let i=0,l=n.length;i<l;i++)if(Lo(n[i]))return!0;return!1}if(hf(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return Lo(n.toJSON(),!0);for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&Lo(n[i]))return!0;return!1}function CA(n){const a=[],i=n.data,l=n;return l.data=qd(i,a),l.attachments=a.length,{packet:l,buffers:a}}function qd(n,a){if(!n)return n;if(hf(n)){const i={_placeholder:!0,num:a.length};return a.push(n),i}else if(Array.isArray(n)){const i=new Array(n.length);for(let l=0;l<n.length;l++)i[l]=qd(n[l],a);return i}else if(typeof n=="object"&&!(n instanceof Date)){const i={};for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=qd(n[l],a));return i}return n}function AA(n,a){return n.data=Hd(n.data,a),delete n.attachments,n}function Hd(n,a){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<a.length)return a[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let i=0;i<n.length;i++)n[i]=Hd(n[i],a);else if(typeof n=="object")for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=Hd(n[i],a));return n}const RA=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ie;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(Ie||(Ie={}));class _A{constructor(a){this.replacer=a}encode(a){return(a.type===Ie.EVENT||a.type===Ie.ACK)&&Lo(a)?this.encodeAsBinary({type:a.type===Ie.EVENT?Ie.BINARY_EVENT:Ie.BINARY_ACK,nsp:a.nsp,data:a.data,id:a.id}):[this.encodeAsString(a)]}encodeAsString(a){let i=""+a.type;return(a.type===Ie.BINARY_EVENT||a.type===Ie.BINARY_ACK)&&(i+=a.attachments+"-"),a.nsp&&a.nsp!=="/"&&(i+=a.nsp+","),a.id!=null&&(i+=a.id),a.data!=null&&(i+=JSON.stringify(a.data,this.replacer)),i}encodeAsBinary(a){const i=CA(a),l=this.encodeAsString(i.packet),c=i.buffers;return c.unshift(l),c}}class mf extends Dt{constructor(a){super(),this.reviver=a}add(a){let i;if(typeof a=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");i=this.decodeString(a);const l=i.type===Ie.BINARY_EVENT;l||i.type===Ie.BINARY_ACK?(i.type=l?Ie.EVENT:Ie.ACK,this.reconstructor=new kA(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(hf(a)||a.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(a),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+a)}decodeString(a){let i=0;const l={type:Number(a.charAt(0))};if(Ie[l.type]===void 0)throw new Error("unknown packet type "+l.type);if(l.type===Ie.BINARY_EVENT||l.type===Ie.BINARY_ACK){const d=i+1;for(;a.charAt(++i)!=="-"&&i!=a.length;);const f=a.substring(d,i);if(f!=Number(f)||a.charAt(i)!=="-")throw new Error("Illegal attachments");l.attachments=Number(f)}if(a.charAt(i+1)==="/"){const d=i+1;for(;++i&&!(a.charAt(i)===","||i===a.length););l.nsp=a.substring(d,i)}else l.nsp="/";const c=a.charAt(i+1);if(c!==""&&Number(c)==c){const d=i+1;for(;++i;){const f=a.charAt(i);if(f==null||Number(f)!=f){--i;break}if(i===a.length)break}l.id=Number(a.substring(d,i+1))}if(a.charAt(++i)){const d=this.tryParse(a.substr(i));if(mf.isPayloadValid(l.type,d))l.data=d;else throw new Error("invalid payload")}return l}tryParse(a){try{return JSON.parse(a,this.reviver)}catch{return!1}}static isPayloadValid(a,i){switch(a){case Ie.CONNECT:return yy(i);case Ie.DISCONNECT:return i===void 0;case Ie.CONNECT_ERROR:return typeof i=="string"||yy(i);case Ie.EVENT:case Ie.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&RA.indexOf(i[0])===-1);case Ie.ACK:case Ie.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class kA{constructor(a){this.packet=a,this.buffers=[],this.reconPack=a}takeBinaryData(a){if(this.buffers.push(a),this.buffers.length===this.reconPack.attachments){const i=AA(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function yy(n){return Object.prototype.toString.call(n)==="[object Object]"}const NA=Object.freeze(Object.defineProperty({__proto__:null,Decoder:mf,Encoder:_A,get PacketType(){return Ie}},Symbol.toStringTag,{value:"Module"}));function na(n,a,i){return n.on(a,i),function(){n.off(a,i)}}const OA=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ub extends Dt{constructor(a,i,l){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=a,this.nsp=i,l&&l.auth&&(this.auth=l.auth),this._opts=Object.assign({},l),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const a=this.io;this.subs=[na(a,"open",this.onopen.bind(this)),na(a,"packet",this.onpacket.bind(this)),na(a,"error",this.onerror.bind(this)),na(a,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...a){return a.unshift("message"),this.emit.apply(this,a),this}emit(a,...i){var l,c,d;if(OA.hasOwnProperty(a))throw new Error('"'+a.toString()+'" is a reserved event name');if(i.unshift(a),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;const f={type:Ie.EVENT,data:i};if(f.options={},f.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const x=this.ids++,y=i.pop();this._registerAckCallback(x,y),f.id=x}const m=(c=(l=this.io.engine)===null||l===void 0?void 0:l.transport)===null||c===void 0?void 0:c.writable,g=this.connected&&!(!((d=this.io.engine)===null||d===void 0)&&d._hasPingExpired());return this.flags.volatile&&!m||(g?(this.notifyOutgoingListeners(f),this.packet(f)):this.sendBuffer.push(f)),this.flags={},this}_registerAckCallback(a,i){var l;const c=(l=this.flags.timeout)!==null&&l!==void 0?l:this._opts.ackTimeout;if(c===void 0){this.acks[a]=i;return}const d=this.io.setTimeoutFn(()=>{delete this.acks[a];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===a&&this.sendBuffer.splice(m,1);i.call(this,new Error("operation has timed out"))},c),f=(...m)=>{this.io.clearTimeoutFn(d),i.apply(this,m)};f.withError=!0,this.acks[a]=f}emitWithAck(a,...i){return new Promise((l,c)=>{const d=(f,m)=>f?c(f):l(m);d.withError=!0,i.push(d),this.emit(a,...i)})}_addToQueue(a){let i;typeof a[a.length-1]=="function"&&(i=a.pop());const l={id:this._queueSeq++,tryCount:0,pending:!1,args:a,flags:Object.assign({fromQueue:!0},this.flags)};a.push((c,...d)=>(this._queue[0],c!==null?l.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(c)):(this._queue.shift(),i&&i(null,...d)),l.pending=!1,this._drainQueue())),this._queue.push(l),this._drainQueue()}_drainQueue(a=!1){if(!this.connected||this._queue.length===0)return;const i=this._queue[0];i.pending&&!a||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.args))}packet(a){a.nsp=this.nsp,this.io._packet(a)}onopen(){typeof this.auth=="function"?this.auth(a=>{this._sendConnectPacket(a)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(a){this.packet({type:Ie.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},a):a})}onerror(a){this.connected||this.emitReserved("connect_error",a)}onclose(a,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",a,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(a=>{if(!this.sendBuffer.some(l=>String(l.id)===a)){const l=this.acks[a];delete this.acks[a],l.withError&&l.call(this,new Error("socket has been disconnected"))}})}onpacket(a){if(a.nsp===this.nsp)switch(a.type){case Ie.CONNECT:a.data&&a.data.sid?this.onconnect(a.data.sid,a.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ie.EVENT:case Ie.BINARY_EVENT:this.onevent(a);break;case Ie.ACK:case Ie.BINARY_ACK:this.onack(a);break;case Ie.DISCONNECT:this.ondisconnect();break;case Ie.CONNECT_ERROR:this.destroy();const l=new Error(a.data.message);l.data=a.data.data,this.emitReserved("connect_error",l);break}}onevent(a){const i=a.data||[];a.id!=null&&i.push(this.ack(a.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(a){if(this._anyListeners&&this._anyListeners.length){const i=this._anyListeners.slice();for(const l of i)l.apply(this,a)}super.emit.apply(this,a),this._pid&&a.length&&typeof a[a.length-1]=="string"&&(this._lastOffset=a[a.length-1])}ack(a){const i=this;let l=!1;return function(...c){l||(l=!0,i.packet({type:Ie.ACK,id:a,data:c}))}}onack(a){const i=this.acks[a.id];typeof i=="function"&&(delete this.acks[a.id],i.withError&&a.data.unshift(null),i.apply(this,a.data))}onconnect(a,i){this.id=a,this.recovered=i&&this._pid===i,this._pid=i,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(a=>this.emitEvent(a)),this.receiveBuffer=[],this.sendBuffer.forEach(a=>{this.notifyOutgoingListeners(a),this.packet(a)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(a=>a()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ie.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(a){return this.flags.compress=a,this}get volatile(){return this.flags.volatile=!0,this}timeout(a){return this.flags.timeout=a,this}onAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(a),this}prependAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(a),this}offAny(a){if(!this._anyListeners)return this;if(a){const i=this._anyListeners;for(let l=0;l<i.length;l++)if(a===i[l])return i.splice(l,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(a),this}prependAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(a),this}offAnyOutgoing(a){if(!this._anyOutgoingListeners)return this;if(a){const i=this._anyOutgoingListeners;for(let l=0;l<i.length;l++)if(a===i[l])return i.splice(l,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(a){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const i=this._anyOutgoingListeners.slice();for(const l of i)l.apply(this,a.data)}}}function Xi(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}Xi.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var a=Math.random(),i=Math.floor(a*this.jitter*n);n=(Math.floor(a*10)&1)==0?n-i:n+i}return Math.min(n,this.max)|0};Xi.prototype.reset=function(){this.attempts=0};Xi.prototype.setMin=function(n){this.ms=n};Xi.prototype.setMax=function(n){this.max=n};Xi.prototype.setJitter=function(n){this.jitter=n};class Qd extends Dt{constructor(a,i){var l;super(),this.nsps={},this.subs=[],a&&typeof a=="object"&&(i=a,a=void 0),i=i||{},i.path=i.path||"/socket.io",this.opts=i,Xo(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((l=i.randomizationFactor)!==null&&l!==void 0?l:.5),this.backoff=new Xi({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=a;const c=i.parser||NA;this.encoder=new c.Encoder,this.decoder=new c.Decoder,this._autoConnect=i.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(a){return arguments.length?(this._reconnection=!!a,a||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(a){return a===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=a,this)}reconnectionDelay(a){var i;return a===void 0?this._reconnectionDelay:(this._reconnectionDelay=a,(i=this.backoff)===null||i===void 0||i.setMin(a),this)}randomizationFactor(a){var i;return a===void 0?this._randomizationFactor:(this._randomizationFactor=a,(i=this.backoff)===null||i===void 0||i.setJitter(a),this)}reconnectionDelayMax(a){var i;return a===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=a,(i=this.backoff)===null||i===void 0||i.setMax(a),this)}timeout(a){return arguments.length?(this._timeout=a,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(a){if(~this._readyState.indexOf("open"))return this;this.engine=new bA(this.uri,this.opts);const i=this.engine,l=this;this._readyState="opening",this.skipReconnect=!1;const c=na(i,"open",function(){l.onopen(),a&&a()}),d=m=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",m),a?a(m):this.maybeReconnectOnOpen()},f=na(i,"error",d);if(this._timeout!==!1){const m=this._timeout,g=this.setTimeoutFn(()=>{c(),d(new Error("timeout")),i.close()},m);this.opts.autoUnref&&g.unref(),this.subs.push(()=>{this.clearTimeoutFn(g)})}return this.subs.push(c),this.subs.push(f),this}connect(a){return this.open(a)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const a=this.engine;this.subs.push(na(a,"ping",this.onping.bind(this)),na(a,"data",this.ondata.bind(this)),na(a,"error",this.onerror.bind(this)),na(a,"close",this.onclose.bind(this)),na(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(a){try{this.decoder.add(a)}catch(i){this.onclose("parse error",i)}}ondecoded(a){Fo(()=>{this.emitReserved("packet",a)},this.setTimeoutFn)}onerror(a){this.emitReserved("error",a)}socket(a,i){let l=this.nsps[a];return l?this._autoConnect&&!l.active&&l.connect():(l=new ub(this,a,i),this.nsps[a]=l),l}_destroy(a){const i=Object.keys(this.nsps);for(const l of i)if(this.nsps[l].active)return;this._close()}_packet(a){const i=this.encoder.encode(a);for(let l=0;l<i.length;l++)this.engine.write(i[l],a.options)}cleanup(){this.subs.forEach(a=>a()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(a,i){var l;this.cleanup(),(l=this.engine)===null||l===void 0||l.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",a,i),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const a=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const i=this.backoff.duration();this._reconnecting=!0;const l=this.setTimeoutFn(()=>{a.skipReconnect||(this.emitReserved("reconnect_attempt",a.backoff.attempts),!a.skipReconnect&&a.open(c=>{c?(a._reconnecting=!1,a.reconnect(),this.emitReserved("reconnect_error",c)):a.onreconnect()}))},i);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}}onreconnect(){const a=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",a)}}const Ks={};function Uo(n,a){typeof n=="object"&&(a=n,n=void 0),a=a||{};const i=xA(n,a.path||"/socket.io"),l=i.source,c=i.id,d=i.path,f=Ks[c]&&d in Ks[c].nsps,m=a.forceNew||a["force new connection"]||a.multiplex===!1||f;let g;return m?g=new Qd(l,a):(Ks[c]||(Ks[c]=new Qd(l,a)),g=Ks[c]),i.query&&!a.query&&(a.query=i.queryKey),g.socket(i.path,a)}Object.assign(Uo,{Manager:Qd,Socket:ub,io:Uo,connect:Uo});const _o="/events",pR={SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",INPUT:"input",RESIZE:"resize",TERMINAL_INPUT:"terminal:input",TERMINAL_RESIZE:"terminal:resize"},yr={SESSION_STDOUT:"session:stdout",SESSION_PATCH:"session:patch",SESSION_EXIT:"session:exit",SESSION_COMPLETED:"session:completed",SESSION_ID:"session:sessionId",SESSION_ERROR:"session:error",SESSION_PERMISSION_REQUESTED:"session:permission_requested",SESSION_PERMISSION_INVALIDATED:"session:permission_invalidated",SESSION_RUNTIME_STATE_CHANGED:"session:runtime_state_changed",TASK_UPDATED:"task:updated",TASK_DELETED:"task:deleted",TERMINAL_STDOUT:"terminal:stdout",TERMINAL_EXIT:"terminal:exit",TERMINAL_SUBSCRIBED:"terminal:subscribed",TERMINAL_UNSUBSCRIBED:"terminal:unsubscribed",WORKSPACE_SETUP_PROGRESS:"workspace:setup_progress",WORKSPACE_COMMIT_MESSAGE_UPDATED:"workspace:commit_message_updated",WORKSPACE_HIBERNATED:"workspace:hibernated",WORKSPACE_GIT_CHANGED:"workspace:git_changed",TEAM_RUN_INVALIDATED:"team-run:invalidated"};class MA{socket=null;baseUrl;visibilityHandler=null;constructor(){this.baseUrl=dT()}getSocket(){return this.socket||(this.socket=Uo(`${this.baseUrl}${_o}`,{autoConnect:!1,transports:["websocket"],reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,reconnectionDelayMax:1e4}),this.socket.on("connect",()=>{console.log(`[Socket] Connected to ${_o} t=${Date.now()}`)}),this.socket.on("disconnect",a=>{console.log(`[Socket] Disconnected from ${_o}: t=${Date.now()}`,a)}),this.socket.on("connect_error",a=>{console.error(`[Socket] Connection error on ${_o}: t=${Date.now()}`,a.message)})),this.socket}connect(){const a=this.getSocket();return a.connected||a.connect(),this.visibilityHandler||(this.visibilityHandler=()=>{document.visibilityState==="visible"&&this.socket&&!this.socket.connected&&(console.log("[Socket] Page became visible, socket disconnected — reconnecting"),this.socket.connect())},document.addEventListener("visibilitychange",this.visibilityHandler)),a}disconnect(){this.visibilityHandler&&(document.removeEventListener("visibilitychange",this.visibilityHandler),this.visibilityHandler=null),this.socket&&(this.socket.disconnect(),this.socket=null)}isConnected(){return this.socket?.connected??!1}}const el=new MA;function cb(n,a,i){const l=d=>Bo(d.queryKey,i),c=n.getQueriesData({predicate:l});return n.setQueriesData({predicate:l},d=>{if(!d||!Array.isArray(d.data))return d;const f=d.data.filter(m=>m.id!==a);return f.length===d.data.length?d:{...d,data:f,total:Math.max(0,d.total-(d.data.length-f.length))}}),n.removeQueries({queryKey:ge.tasks.detail(a),exact:!0}),n.removeQueries({queryKey:ge.tasks.body(a),exact:!0}),c}function Bo(n,a){return!Array.isArray(n)||n[0]!=="tasks"||n[1]!=="list"?!1:a?n[2]===a:!0}function qo(n,a){if(!Array.isArray(n)||n[0]!=="tasks"||n[1]!=="board")return!1;if(!a)return!0;const i=n[2];if(!i||typeof i!="object")return!0;const l=i.projectId;return l==null||l===a}function db(n,a,i){const l=d=>qo(d.queryKey,i),c=n.getQueriesData({predicate:l});return n.setQueriesData({predicate:l},d=>{if(!d||!Array.isArray(d.data))return d;const f=d.data.filter(m=>m.id!==a);return f.length===d.data.length?d:{...d,data:f,total:Math.max(0,d.total-(d.data.length-f.length))}}),c}function jA(n,a){for(const[i,l]of a)n.setQueryData(i,l)}function DA(n,a){for(const[i,l]of a)n.setQueryData(i,l)}function gR(n){const a={};return n?.projectId&&(a.projectId=n.projectId),n?.status!=null&&(a.status=n.status),n?.page!=null&&(a.page=String(n.page)),n?.limit!=null&&(a.limit=String(n.limit)),rn({queryKey:ge.tasks.board(n),queryFn:()=>ze.get("/task-board",{params:a})})}function yR(n,a=!0){return rn({queryKey:ge.tasks.body(n),queryFn:()=>ze.get(`/tasks/${n}/body`),enabled:!!n&&a})}function vR(){const n=tt();return ct({mutationFn:({id:a,...i})=>ze.put(`/tasks/${a}`,i),onSuccess:a=>{n.invalidateQueries({queryKey:ge.tasks.all}),n.invalidateQueries({queryKey:ge.tasks.detail(a.id)}),n.invalidateQueries({queryKey:ge.tasks.body(a.id)})}})}function bR(){const n=tt();return ct({mutationFn:({id:a,status:i})=>ze.patch(`/tasks/${a}/status`,{status:i}),onSuccess:a=>{n.invalidateQueries({queryKey:ge.tasks.all}),n.invalidateQueries({queryKey:ge.tasks.detail(a.id)})}})}function xR(){const n=tt();return ct({mutationFn:a=>ze.delete(`/tasks/${a}`),onMutate:async a=>{await n.cancelQueries({queryKey:ge.tasks.all});const i=cb(n,a),l=db(n,a);return{snapshots:i,boardSnapshots:l}},onError:(a,i,l)=>{l?.snapshots&&jA(n,l.snapshots),l?.boardSnapshots&&DA(n,l.boardSnapshots)},onSuccess:()=>{n.invalidateQueries({queryKey:ge.tasks.all}),n.invalidateQueries({queryKey:ge.projects.all})}})}function SR(){const n=tt();return ct({mutationFn:a=>ze.post(`/tasks/${a}/retry`,{}),onSuccess:a=>{n.invalidateQueries({queryKey:ge.tasks.all}),n.invalidateQueries({queryKey:ge.workspaces.all}),n.invalidateQueries({queryKey:ge.tasks.detail(a.id)}),n.invalidateQueries({queryKey:ge.tasks.body(a.id)})}})}function zA(){const n=tt();S.useEffect(()=>{const a=el.connect(),i=()=>{n.invalidateQueries({queryKey:ge.tasks.all})},l=async d=>{await n.cancelQueries({predicate:f=>Bo(f.queryKey,d.projectId)||qo(f.queryKey,d.projectId)}),n.invalidateQueries({predicate:f=>Bo(f.queryKey,d.projectId)||qo(f.queryKey,d.projectId)}),n.invalidateQueries({queryKey:ge.tasks.detail(d.taskId)})},c=d=>{cb(n,d.taskId,d.projectId),db(n,d.taskId,d.projectId),n.invalidateQueries({predicate:f=>Bo(f.queryKey,d.projectId)||qo(f.queryKey,d.projectId)}),n.invalidateQueries({queryKey:ge.projects.all})};return a.on("connect",i),a.on(yr.TASK_UPDATED,l),a.on(yr.TASK_DELETED,c),()=>{a.off("connect",i),a.off(yr.TASK_UPDATED,l),a.off(yr.TASK_DELETED,c)}},[n])}const Oe={all:["team-runs"],memberPresets:["member-presets"],memberPresetDetail:n=>["member-presets","detail",n],teamTemplates:["team-templates"],teamTemplateDetail:n=>["team-templates","detail",n],task:n=>["team-runs","task",n],detail:n=>["team-runs","detail",n],messages:n=>["team-runs","messages",n],messageDetail:(n,a)=>["team-runs","messages",n,a],workRequests:n=>["team-runs","work-requests",n],invocations:n=>["team-runs","invocations",n]},fb=5e3,LA=45e3;function hb(n,a){const i=n??[],l=i.findIndex(c=>c.id===a.id);return l>=0?i.map((c,d)=>d===l?a:c):[...i,a]}function vy(n,a){return!n||n.id!==a.teamRunId?n:{...n,messages:hb(n.messages,a)}}function mb(n,a){const i=n.getQueryData(Oe.detail(a));if(i?.taskId)return i.taskId;const l=n.getQueriesData({queryKey:Oe.all});for(const[,c]of l)if(c?.id===a&&c.taskId)return c.taskId}function Ii(n,a){const i=mb(n,a);n.invalidateQueries({queryKey:Oe.all}),n.invalidateQueries({queryKey:Oe.detail(a)}),n.invalidateQueries({queryKey:Oe.workRequests(a)}),n.invalidateQueries({queryKey:Oe.invocations(a)}),n.invalidateQueries({queryKey:ge.tasks.all}),n.invalidateQueries({queryKey:ge.workspaces.all}),i&&(n.invalidateQueries({queryKey:ge.tasks.detail(i)}),n.invalidateQueries({queryKey:Oe.task(i)}),n.invalidateQueries({queryKey:ge.workspaces.list(i)}))}function wR(){return rn({queryKey:Oe.memberPresets,queryFn:()=>ze.get("/member-presets")})}function ER(){const n=tt();return ct({mutationFn:a=>ze.post("/member-presets",a),onSuccess:()=>{n.invalidateQueries({queryKey:Oe.memberPresets}),n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function TR(){const n=tt();return ct({mutationFn:({id:a,data:i})=>ze.patch(`/member-presets/${a}`,i),onSuccess:(a,i)=>{n.invalidateQueries({queryKey:Oe.memberPresets}),n.invalidateQueries({queryKey:Oe.memberPresetDetail(i.id)}),n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function CR(){const n=tt();return ct({mutationFn:a=>ze.delete(`/member-presets/${a}`),onSuccess:()=>{n.invalidateQueries({queryKey:Oe.memberPresets}),n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function AR(){return rn({queryKey:Oe.teamTemplates,queryFn:()=>ze.get("/team-templates")})}function RR(){const n=tt();return ct({mutationFn:a=>ze.post("/team-templates",a),onSuccess:()=>{n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function _R(){const n=tt();return ct({mutationFn:({id:a,data:i})=>ze.patch(`/team-templates/${a}`,i),onSuccess:(a,i)=>{n.invalidateQueries({queryKey:Oe.teamTemplates}),n.invalidateQueries({queryKey:Oe.teamTemplateDetail(i.id)})}})}function kR(){const n=tt();return ct({mutationFn:a=>ze.delete(`/team-templates/${a}`),onSuccess:()=>{n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function NR(){const n=tt();return ct({mutationFn:({taskId:a,...i})=>ze.post(`/tasks/${a}/team-runs`,i),onSuccess:(a,i)=>{n.setQueryData(Oe.task(i.taskId),a),n.setQueryData(Oe.detail(a.id),a),n.setQueryData(Oe.messages(a.id),a.messages??[]),n.setQueryData(Oe.workRequests(a.id),a.workRequests??[]),n.setQueryData(Oe.invocations(a.id),a.invocations??[]),n.invalidateQueries({queryKey:Oe.task(i.taskId)}),n.invalidateQueries({queryKey:Oe.all}),n.invalidateQueries({queryKey:ge.tasks.all}),n.invalidateQueries({queryKey:ge.tasks.detail(i.taskId)}),n.invalidateQueries({queryKey:ge.workspaces.all}),n.invalidateQueries({queryKey:ge.workspaces.list(i.taskId)})},onError:(a,i)=>{n.invalidateQueries({queryKey:Oe.task(i.taskId)}),n.invalidateQueries({queryKey:Oe.all})}})}function OR(n){return rn({queryKey:Oe.task(n),queryFn:async()=>{try{return await ze.get(`/tasks/${n}/team-run`)}catch(a){if(a instanceof sl&&a.status===404)return null;throw a}},enabled:!!n,retry:!1,refetchInterval:a=>a.state.data?fb:!1})}function MR(n){return rn({queryKey:Oe.messages(n),queryFn:async()=>{try{return await ze.get(`/team-runs/${n}/messages`)}catch(a){if(a instanceof sl&&a.status===404)return[];throw a}},enabled:!!n,retry:!1,refetchInterval:fb})}function jR(n,a,i=!1){return rn({queryKey:Oe.messageDetail(n,a),queryFn:()=>ze.get(`/team-runs/${n}/messages/${a}`),enabled:!!(n&&a&&i),retry:!1})}function DR(n){const a=tt();return ct({mutationFn:i=>ze.post(`/team-runs/${n}/messages`,i),onSuccess:i=>{a.setQueryData(Oe.messages(n),c=>hb(c,i)),a.setQueryData(Oe.detail(n),c=>vy(c,i));const l=mb(a,n);l&&a.setQueryData(Oe.task(l),c=>vy(c,i)),a.invalidateQueries({queryKey:Oe.all}),a.invalidateQueries({queryKey:["tasks"]}),a.invalidateQueries({queryKey:ge.workspaces.all})}})}function zR(n){const a=tt();return ct({mutationFn:i=>ze.post(`/team-runs/${n}/members`,i),onSuccess:()=>{Ii(a,n)}})}function LR(n){const a=tt();return ct({mutationFn:({memberId:i,data:l})=>ze.patch(`/team-runs/${n}/members/${i}`,l),onSuccess:()=>{Ii(a,n)}})}function UR(n){const a=tt();return ct({mutationFn:({memberId:i,stopActive:l=!0,cancelQueued:c=!0})=>ze.post(`/team-runs/${n}/members/${i}/remove`,{stopActive:l,cancelQueued:c}),onSuccess:()=>{Ii(a,n)}})}function BR(n){const a=tt();return ct({mutationFn:i=>ze.post(`/team-runs/work-requests/${i}/approve`),onSuccess:()=>{Ii(a,n)}})}function qR(n){const a=tt();return ct({mutationFn:i=>ze.post(`/team-runs/work-requests/${i}/reject`),onSuccess:()=>{Ii(a,n)}})}function HR(n){const a=tt();return ct({mutationFn:async({memberId:i,cancelQueued:l})=>{try{return await ze.post(`/team-runs/${n}/members/${i}/stop`,{cancelQueued:l},{signal:AbortSignal.timeout(LA)})}catch(c){throw c instanceof DOMException&&c.name==="TimeoutError"?new Error("Stop request timed out before the server answered. Refresh the team status and retry."):c}},onSuccess:()=>{Ii(a,n)}})}function fa(n,a){return n.scopes.includes(a)}function UA(){const n=tt();S.useEffect(()=>{const a=el.connect(),i=d=>{if(!d){n.invalidateQueries({queryKey:Oe.all});return}n.invalidateQueries({queryKey:Oe.detail(d.teamRunId)}),(fa(d,"team-run")||fa(d,"team-members"))&&n.invalidateQueries({queryKey:Oe.all}),fa(d,"room-messages")&&n.invalidateQueries({queryKey:Oe.messages(d.teamRunId)}),fa(d,"work-requests")&&n.invalidateQueries({queryKey:Oe.workRequests(d.teamRunId)}),fa(d,"agent-invocations")&&n.invalidateQueries({queryKey:Oe.invocations(d.teamRunId)}),d.taskId&&n.invalidateQueries({queryKey:Oe.task(d.taskId)}),d.taskId&&(fa(d,"task")||fa(d,"team-run"))&&n.invalidateQueries({queryKey:ge.tasks.detail(d.taskId)}),d.projectId&&(fa(d,"task")||fa(d,"team-run"))&&(n.invalidateQueries({queryKey:ge.tasks.list(d.projectId)}),n.invalidateQueries({queryKey:ge.tasks.boardAll})),fa(d,"workspaces")&&(n.invalidateQueries({queryKey:ge.workspaces.all}),d.taskId&&n.invalidateQueries({queryKey:ge.workspaces.list(d.taskId)}))},l=()=>i(),c=d=>i(d);return a.on("connect",l),a.on(yr.TEAM_RUN_INVALIDATED,c),()=>{a.off("connect",l),a.off(yr.TEAM_RUN_INVALIDATED,c)}},[n])}const BA=yv(n=>({visibleContext:null,setVisibleContext:a=>n({visibleContext:a})}));function qA(n){n.invalidateQueries({queryKey:ge.git.all,refetchType:"none"}),n.invalidateQueries({queryKey:["workspaces","gitStatus"],refetchType:"none"}),n.invalidateQueries({queryKey:["workspaces","diff"],refetchType:"none"})}function HA(n,a){a.workingDir&&(n.invalidateQueries({queryKey:ge.git.changes(a.workingDir),refetchType:"none"}),n.invalidateQueries({queryKey:ge.git.log(a.workingDir),refetchType:"none"})),a.workspaceId&&n.invalidateQueries({queryKey:ge.workspaces.gitStatus(a.workspaceId),refetchType:"none"})}function by(n,a,i){if(!(!a?.workspaceId||!a?.workingDir)){if(!i||i.workspaceId!==a.workspaceId||i.workingDir!==a.workingDir){HA(n,a);return}if(i.tab==="changes"){n.invalidateQueries({queryKey:ge.git.changes(a.workingDir)}),n.invalidateQueries({queryKey:ge.workspaces.gitStatus(a.workspaceId)}),n.invalidateQueries({queryKey:ge.git.log(a.workingDir),refetchType:"none"});return}n.invalidateQueries({queryKey:ge.git.log(a.workingDir)}),n.invalidateQueries({queryKey:ge.git.changes(a.workingDir),refetchType:"none"}),n.invalidateQueries({queryKey:ge.workspaces.gitStatus(a.workspaceId),refetchType:"none"})}}function QA(){const n=tt(),a=BA(i=>i.visibleContext);S.useEffect(()=>{const i=el.connect(),l=()=>{qA(n),a&&by(n,{workspaceId:a.workspaceId,workingDir:a.workingDir},a)},c=d=>{by(n,d,a)};return i.on("connect",l),i.on(yr.WORKSPACE_GIT_CHANGED,c),()=>{i.off("connect",l),i.off(yr.WORKSPACE_GIT_CHANGED,c)}},[n,a])}function PA(){return zA(),UA(),QA(),null}function GA({className:n,type:a="text",...i}){return v.jsx("input",{type:a,"data-slot":"input",className:jt("w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground transition-colors","placeholder:text-muted-foreground/70","focus:border-ring focus:outline-none focus-visible:border-ring","disabled:cursor-not-allowed disabled:bg-muted/50 disabled:text-muted-foreground","aria-invalid:border-destructive",n),...i})}function KA(){return rn({queryKey:ge.accessAuth.status,queryFn:()=>ze.get("/access-auth/status"),retry:!1})}function QR(n=!0){return rn({queryKey:ge.accessAuth.settings,queryFn:()=>ze.get("/access-auth/settings"),enabled:n})}function VA(){const n=tt();return ct({mutationFn:a=>ze.post("/access-auth/login",{password:a}),onSuccess:a=>{n.setQueryData(ge.accessAuth.status,a),n.invalidateQueries()}})}function PR(){const n=tt();return ct({mutationFn:()=>ze.post("/access-auth/logout",{}),onSuccess:a=>{n.setQueryData(ge.accessAuth.status,a),n.invalidateQueries()}})}function GR(){const n=tt();return ct({mutationFn:a=>ze.put("/access-auth/settings",a),onSuccess:()=>{n.invalidateQueries({queryKey:ge.accessAuth.status}),n.invalidateQueries({queryKey:ge.accessAuth.settings})}})}function YA(){return v.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background text-foreground",children:v.jsx(Ki,{size:18,className:"animate-spin text-muted-foreground motion-reduce:animate-none","aria-hidden":"true"})})}function FA(){const[n,a]=S.useState(""),i=VA(),l=i.isError?aa("密码不正确,请重试"):null;return v.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 text-foreground",children:v.jsxs("form",{className:"w-full max-w-sm space-y-5",onSubmit:c=>{c.preventDefault();const d=n;d&&i.mutate(d)},children:[v.jsxs("div",{className:"space-y-2 text-center",children:[v.jsx("div",{className:"mx-auto flex h-10 w-10 items-center justify-center rounded-lg bg-muted text-muted-foreground",children:v.jsx(VE,{size:18,"aria-hidden":"true"})}),v.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Agent Tower"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:aa("输入访问密码继续")})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(GA,{type:"password",autoFocus:!0,autoComplete:"current-password",value:n,onChange:c=>{a(c.target.value),i.reset()},"aria-invalid":!!l,placeholder:aa("访问密码")}),l&&v.jsx("p",{className:"text-xs text-destructive",children:l})]}),v.jsxs(ma,{className:"w-full",type:"submit",disabled:!n||i.isPending,children:[i.isPending&&v.jsx(Ki,{size:14,className:"mr-2 animate-spin motion-reduce:animate-none","aria-hidden":"true"}),i.isPending?aa("验证中..."):aa("解锁")]})]})})}function XA({children:n}){const{data:a,isLoading:i,isError:l}=KA();return i?v.jsx(YA,{}):l?v.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 text-sm text-muted-foreground",children:aa("访问状态加载失败,请刷新后重试。")}):a?.enabled&&!a.authenticated?v.jsx(FA,{}):v.jsx(v.Fragment,{children:n})}function IA(){return S.useEffect(()=>(el.connect(),()=>el.disconnect()),[]),v.jsxs(ST,{children:[v.jsxs(vC,{children:[v.jsx(PA,{}),v.jsx(qC,{})]}),v.jsx(uf,{source:"toaster",fallback:()=>null,children:v.jsx(Hx,{position:"top-center",toastOptions:{className:"text-sm",style:{fontFamily:"inherit"},classNames:{error:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg",success:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg",default:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg"}}})})]})}function ZA(){return v.jsx(bC,{children:v.jsx(tx,{client:Qx,children:v.jsx(XA,{children:v.jsx(IA,{})})})})}const JA="/api/tunnel/bootstrap";async function $A(){const n=new URL(window.location.href),a=n.searchParams.get("token");if(!a)return;const i=await fetch(`${JA}?token=${encodeURIComponent(a)}`,{method:"POST",credentials:"same-origin"});if(!i.ok)throw new Error(`Tunnel bootstrap failed (${i.status})`);n.searchParams.delete("token"),window.history.replaceState({},"",n.toString())}async function WA(){try{await $A()}catch(n){console.error("[Tunnel] Failed to bootstrap tunnel session",n)}O1.createRoot(document.getElementById("root")).render(v.jsx(S.StrictMode,{children:v.jsx(ZA,{})}))}WA();export{ZE as $,dC as A,ma as B,jE as C,jy as D,wR as E,AR as F,ER as G,TR as H,GA as I,CR as J,RR as K,hR as L,_R as M,kR as N,fR as O,cT as P,Ki as Q,wC as R,S2 as S,Jr as T,nT as U,el as V,yr as W,gv as X,pR as Y,Gv as Z,cv as _,mT as a,eT as a0,dR as a1,cR as a2,Yo as a3,w2 as a4,TE as a5,Od as a6,K2 as a7,uw as a8,Fs as a9,_n as aA,sl as aB,NR as aC,DR as aD,vR as aE,OR as aF,MR as aG,yR as aH,SR as aI,Oe as aJ,gR as aK,xR as aL,bR as aM,u2 as aN,Av as aO,yv as aP,aa,BE as ab,uf as ac,xy as ad,pv as ae,mv as af,rR as ag,iT as ah,HE as ai,F1 as aj,yg as ak,tR as al,eR as am,fx as an,ne as ao,BA as ap,BR as aq,qR as ar,HR as as,LE as at,VE as au,jR as av,zR as aw,LR as ax,UR as ay,FE as az,aR as b,QR as c,pT as d,GR as e,PR as f,iR as g,lR as h,sR as i,v as j,gt as k,jt as l,rn as m,ct as n,tt as o,ze as p,ge as q,S as r,wE as s,Bi as t,ya as u,uR as v,oR as w,_t as x,qv as y,Dd as z};
|
|
122
|
+
`})]})}const hR=[{id:"tower-pulse",name:"Tower Pulse",description:"Agent Tower 品牌图标配合脉冲光点,传达「系统就绪中」的品牌感。",component:EC},{id:"stack-rise",name:"Stack Rise",description:"五根柱状条交错升降,暗喻任务编排队列,节奏感强。",component:TC},{id:"orbit-ring",name:"Orbit Ring",description:"双层同心圆环反向旋转,精密工具质感,不浮夸。",component:CC},{id:"terminal-cursor",name:"Terminal Cursor",description:"终端风格光标闪烁,与 Agent Tower 终端协作场景直接呼应。",component:AC},{id:"dot-wave",name:"Dot Wave",description:"三点波浪脉动,极简克制,适合工具型产品的默认加载。",component:RC},{id:"layer-shift",name:"Layer Shift",description:"三层卡片微幅浮动,模拟看板层叠翻页,呼应任务管理语境。",component:_C},{id:"progress-beam",name:"Progress Beam",description:"水平光束往复滑过进度条,线性进度隐喻,不阻断视线。",component:kC},{id:"skeleton-board",name:"Skeleton Board",description:"三列骨架屏微闪,预示看板布局,减少布局跳变。",component:NC},{id:"glyph-rotate",name:"Glyph Rotate",description:"圆环进度弧 + 中心菱形符号呼吸,兼具进度指示与品牌印记。",component:OC},{id:"charcoal-breathe",name:"Charcoal Breathe",description:"Charcoal 圆角色块呼吸缩放,内嵌 Tower 图标,品牌存在感最强。",component:Zv}];function Ui(){const{usesIntegratedTitlebar:n}=Gv();return v.jsxs("div",{className:`fixed inset-0 z-50 flex items-center justify-center bg-background ${n?"app-region-drag":""}`,children:[v.jsx("style",{children:wC}),v.jsx(Zv,{size:"lg"})]})}const MC=new Set(["general","agent-environment","agents","team","projects","notifications","mcp","agents-legacy"]);function dy(){const n=K2(),{tab:a}=uw();return S.useEffect(()=>{const i=a&&MC.has(a)?a:"general";Fs.getState().openSettings(i),n("/",{replace:!0})},[n,a]),null}const jC=S.lazy(()=>_n(()=>import("./ProjectKanbanPage-D7RJm4yg.js").then(n=>n.P),__vite__mapDeps([32,10,11,2,12,8,9,33,34,13,3,22,19,6,15,35,23,24,26,31,20,1,4,28,16,17,36])).then(n=>({default:n.ProjectKanbanPage}))),fy=S.lazy(()=>_n(()=>import("./ConversationPage-BINGA8XL.js"),__vite__mapDeps([37,10,11,2,12,35,3,34,13,22,19,6,15,26])).then(n=>({default:n.ConversationPage}))),DC=S.lazy(()=>_n(()=>import("./DemoPage-D1Ki6sJ0.js"),[]).then(n=>({default:n.DemoPage}))),zC=S.lazy(()=>_n(()=>import("./AgentDemoPage-B6pABvRL.js"),__vite__mapDeps([38,35,2,3,10,11,12,33,30,20])).then(n=>({default:n.AgentDemoPage}))),LC=S.lazy(()=>_n(()=>import("./LoadingPreviewPage-BqCKBvgv.js"),[]).then(n=>({default:n.LoadingPreviewPage}))),UC=[{path:"/",element:v.jsx(pC,{}),errorElement:v.jsx(cy,{}),children:[{errorElement:v.jsx(cy,{}),children:[{index:!0,element:v.jsx(S.Suspense,{fallback:v.jsx(Ui,{}),children:v.jsx(jC,{})})},{path:"conversations",element:v.jsx(S.Suspense,{fallback:v.jsx(Ui,{}),children:v.jsx(fy,{})})},{path:"conversations/:conversationId",element:v.jsx(S.Suspense,{fallback:v.jsx(Ui,{}),children:v.jsx(fy,{})})},{path:"demo",element:v.jsx(S.Suspense,{fallback:v.jsx(Ui,{}),children:v.jsx(DC,{})})},{path:"agent-demo",element:v.jsx(S.Suspense,{fallback:v.jsx(Ui,{}),children:v.jsx(zC,{})})},{path:"loading-preview",element:v.jsx(S.Suspense,{fallback:v.jsx(Ui,{}),children:v.jsx(LC,{})})},{path:"settings",element:v.jsx(dy,{})},{path:"settings/:tab",element:v.jsx(dy,{})}]}]}],BC=tE(UC);function qC(){return v.jsx(hE,{router:BC})}const ga=Object.create(null);ga.open="0";ga.close="1";ga.ping="2";ga.pong="3";ga.message="4";ga.upgrade="5";ga.noop="6";const jo=Object.create(null);Object.keys(ga).forEach(n=>{jo[ga[n]]=n});const Ld={type:"error",data:"parser error"},Jv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",$v=typeof ArrayBuffer=="function",Wv=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,cf=({type:n,data:a},i,l)=>Jv&&a instanceof Blob?i?l(a):hy(a,l):$v&&(a instanceof ArrayBuffer||Wv(a))?i?l(a):hy(new Blob([a]),l):l(ga[n]+(a||"")),hy=(n,a)=>{const i=new FileReader;return i.onload=function(){const l=i.result.split(",")[1];a("b"+(l||""))},i.readAsDataURL(n)};function my(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let gd;function HC(n,a){if(Jv&&n.data instanceof Blob)return n.data.arrayBuffer().then(my).then(a);if($v&&(n.data instanceof ArrayBuffer||Wv(n.data)))return a(my(n.data));cf(n,!1,i=>{gd||(gd=new TextEncoder),a(gd.encode(i))})}const py="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<py.length;n++)Xs[py.charCodeAt(n)]=n;const QC=n=>{let a=n.length*.75,i=n.length,l,c=0,d,f,m,g;n[n.length-1]==="="&&(a--,n[n.length-2]==="="&&a--);const p=new ArrayBuffer(a),x=new Uint8Array(p);for(l=0;l<i;l+=4)d=Xs[n.charCodeAt(l)],f=Xs[n.charCodeAt(l+1)],m=Xs[n.charCodeAt(l+2)],g=Xs[n.charCodeAt(l+3)],x[c++]=d<<2|f>>4,x[c++]=(f&15)<<4|m>>2,x[c++]=(m&3)<<6|g&63;return p},PC=typeof ArrayBuffer=="function",df=(n,a)=>{if(typeof n!="string")return{type:"message",data:eb(n,a)};const i=n.charAt(0);return i==="b"?{type:"message",data:GC(n.substring(1),a)}:jo[i]?n.length>1?{type:jo[i],data:n.substring(1)}:{type:jo[i]}:Ld},GC=(n,a)=>{if(PC){const i=QC(n);return eb(i,a)}else return{base64:!0,data:n}},eb=(n,a)=>a==="blob"?n instanceof Blob?n:new Blob([n]):n instanceof ArrayBuffer?n:n.buffer,tb="",KC=(n,a)=>{const i=n.length,l=new Array(i);let c=0;n.forEach((d,f)=>{cf(d,!1,m=>{l[f]=m,++c===i&&a(l.join(tb))})})},VC=(n,a)=>{const i=n.split(tb),l=[];for(let c=0;c<i.length;c++){const d=df(i[c],a);if(l.push(d),d.type==="error")break}return l};function YC(){return new TransformStream({transform(n,a){HC(n,i=>{const l=i.length;let c;if(l<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,l);else if(l<65536){c=new Uint8Array(3);const d=new DataView(c.buffer);d.setUint8(0,126),d.setUint16(1,l)}else{c=new Uint8Array(9);const d=new DataView(c.buffer);d.setUint8(0,127),d.setBigUint64(1,BigInt(l))}n.data&&typeof n.data!="string"&&(c[0]|=128),a.enqueue(c),a.enqueue(i)})}})}let yd;function Ao(n){return n.reduce((a,i)=>a+i.length,0)}function Ro(n,a){if(n[0].length===a)return n.shift();const i=new Uint8Array(a);let l=0;for(let c=0;c<a;c++)i[c]=n[0][l++],l===n[0].length&&(n.shift(),l=0);return n.length&&l<n[0].length&&(n[0]=n[0].slice(l)),i}function FC(n,a){yd||(yd=new TextDecoder);const i=[];let l=0,c=-1,d=!1;return new TransformStream({transform(f,m){for(i.push(f);;){if(l===0){if(Ao(i)<1)break;const g=Ro(i,1);d=(g[0]&128)===128,c=g[0]&127,c<126?l=3:c===126?l=1:l=2}else if(l===1){if(Ao(i)<2)break;const g=Ro(i,2);c=new DataView(g.buffer,g.byteOffset,g.length).getUint16(0),l=3}else if(l===2){if(Ao(i)<8)break;const g=Ro(i,8),p=new DataView(g.buffer,g.byteOffset,g.length),x=p.getUint32(0);if(x>Math.pow(2,21)-1){m.enqueue(Ld);break}c=x*Math.pow(2,32)+p.getUint32(4),l=3}else{if(Ao(i)<c)break;const g=Ro(i,c);m.enqueue(df(d?g:yd.decode(g),a)),l=0}if(c===0||c>n){m.enqueue(Ld);break}}}})}const nb=4;function Dt(n){if(n)return XC(n)}function XC(n){for(var a in Dt.prototype)n[a]=Dt.prototype[a];return n}Dt.prototype.on=Dt.prototype.addEventListener=function(n,a){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(a),this};Dt.prototype.once=function(n,a){function i(){this.off(n,i),a.apply(this,arguments)}return i.fn=a,this.on(n,i),this};Dt.prototype.off=Dt.prototype.removeListener=Dt.prototype.removeAllListeners=Dt.prototype.removeEventListener=function(n,a){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+n];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var l,c=0;c<i.length;c++)if(l=i[c],l===a||l.fn===a){i.splice(c,1);break}return i.length===0&&delete this._callbacks["$"+n],this};Dt.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var a=new Array(arguments.length-1),i=this._callbacks["$"+n],l=1;l<arguments.length;l++)a[l-1]=arguments[l];if(i){i=i.slice(0);for(var l=0,c=i.length;l<c;++l)i[l].apply(this,a)}return this};Dt.prototype.emitReserved=Dt.prototype.emit;Dt.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};Dt.prototype.hasListeners=function(n){return!!this.listeners(n).length};const Fo=typeof Promise=="function"&&typeof Promise.resolve=="function"?a=>Promise.resolve().then(a):(a,i)=>i(a,0),Kn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),IC="arraybuffer";function ab(n,...a){return a.reduce((i,l)=>(n.hasOwnProperty(l)&&(i[l]=n[l]),i),{})}const ZC=Kn.setTimeout,JC=Kn.clearTimeout;function Xo(n,a){a.useNativeTimers?(n.setTimeoutFn=ZC.bind(Kn),n.clearTimeoutFn=JC.bind(Kn)):(n.setTimeoutFn=Kn.setTimeout.bind(Kn),n.clearTimeoutFn=Kn.clearTimeout.bind(Kn))}const $C=1.33;function WC(n){return typeof n=="string"?eA(n):Math.ceil((n.byteLength||n.size)*$C)}function eA(n){let a=0,i=0;for(let l=0,c=n.length;l<c;l++)a=n.charCodeAt(l),a<128?i+=1:a<2048?i+=2:a<55296||a>=57344?i+=3:(l++,i+=4);return i}function rb(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function tA(n){let a="";for(let i in n)n.hasOwnProperty(i)&&(a.length&&(a+="&"),a+=encodeURIComponent(i)+"="+encodeURIComponent(n[i]));return a}function nA(n){let a={},i=n.split("&");for(let l=0,c=i.length;l<c;l++){let d=i[l].split("=");a[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}return a}class aA extends Error{constructor(a,i,l){super(a),this.description=i,this.context=l,this.type="TransportError"}}class ff extends Dt{constructor(a){super(),this.writable=!1,Xo(this,a),this.opts=a,this.query=a.query,this.socket=a.socket,this.supportsBinary=!a.forceBase64}onError(a,i,l){return super.emitReserved("error",new aA(a,i,l)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(a){this.readyState==="open"&&this.write(a)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(a){const i=df(a,this.socket.binaryType);this.onPacket(i)}onPacket(a){super.emitReserved("packet",a)}onClose(a){this.readyState="closed",super.emitReserved("close",a)}pause(a){}createUri(a,i={}){return a+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_hostname(){const a=this.opts.hostname;return a.indexOf(":")===-1?a:"["+a+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(a){const i=tA(a);return i.length?"?"+i:""}}class rA extends ff{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(a){this.readyState="pausing";const i=()=>{this.readyState="paused",a()};if(this._polling||!this.writable){let l=0;this._polling&&(l++,this.once("pollComplete",function(){--l||i()})),this.writable||(l++,this.once("drain",function(){--l||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(a){const i=l=>{if(this.readyState==="opening"&&l.type==="open"&&this.onOpen(),l.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(l)};VC(a,this.socket.binaryType).forEach(i),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const a=()=>{this.write([{type:"close"}])};this.readyState==="open"?a():this.once("open",a)}write(a){this.writable=!1,KC(a,i=>{this.doWrite(i,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const a=this.opts.secure?"https":"http",i=this.query||{};return this.opts.timestampRequests!==!1&&(i[this.opts.timestampParam]=rb()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(a,i)}}let ib=!1;try{ib=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const iA=ib;function sA(){}class lA extends rA{constructor(a){if(super(a),typeof location<"u"){const i=location.protocol==="https:";let l=location.port;l||(l=i?"443":"80"),this.xd=typeof location<"u"&&a.hostname!==location.hostname||l!==a.port}}doWrite(a,i){const l=this.request({method:"POST",data:a});l.on("success",i),l.on("error",(c,d)=>{this.onError("xhr post error",c,d)})}doPoll(){const a=this.request();a.on("data",this.onData.bind(this)),a.on("error",(i,l)=>{this.onError("xhr poll error",i,l)}),this.pollXhr=a}}let Gi=class Do extends Dt{constructor(a,i,l){super(),this.createRequest=a,Xo(this,l),this._opts=l,this._method=l.method||"GET",this._uri=i,this._data=l.data!==void 0?l.data:null,this._create()}_create(){var a;const i=ab(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;const l=this._xhr=this.createRequest(i);try{l.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){l.setDisableHeaderCheck&&l.setDisableHeaderCheck(!0);for(let c in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(c)&&l.setRequestHeader(c,this._opts.extraHeaders[c])}}catch{}if(this._method==="POST")try{l.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{l.setRequestHeader("Accept","*/*")}catch{}(a=this._opts.cookieJar)===null||a===void 0||a.addCookies(l),"withCredentials"in l&&(l.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(l.timeout=this._opts.requestTimeout),l.onreadystatechange=()=>{var c;l.readyState===3&&((c=this._opts.cookieJar)===null||c===void 0||c.parseCookies(l.getResponseHeader("set-cookie"))),l.readyState===4&&(l.status===200||l.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof l.status=="number"?l.status:0)},0))},l.send(this._data)}catch(c){this.setTimeoutFn(()=>{this._onError(c)},0);return}typeof document<"u"&&(this._index=Do.requestsCount++,Do.requests[this._index]=this)}_onError(a){this.emitReserved("error",a,this._xhr),this._cleanup(!0)}_cleanup(a){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=sA,a)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Do.requests[this._index],this._xhr=null}}_onLoad(){const a=this._xhr.responseText;a!==null&&(this.emitReserved("data",a),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Gi.requestsCount=0;Gi.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",gy);else if(typeof addEventListener=="function"){const n="onpagehide"in Kn?"pagehide":"unload";addEventListener(n,gy,!1)}}function gy(){for(let n in Gi.requests)Gi.requests.hasOwnProperty(n)&&Gi.requests[n].abort()}const oA=(function(){const n=sb({xdomain:!1});return n&&n.responseType!==null})();class uA extends lA{constructor(a){super(a);const i=a&&a.forceBase64;this.supportsBinary=oA&&!i}request(a={}){return Object.assign(a,{xd:this.xd},this.opts),new Gi(sb,this.uri(),a)}}function sb(n){const a=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!a||iA))return new XMLHttpRequest}catch{}if(!a)try{return new Kn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const lb=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class cA extends ff{get name(){return"websocket"}doOpen(){const a=this.uri(),i=this.opts.protocols,l=lb?{}:ab(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(l.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(a,i,l)}catch(c){return this.emitReserved("error",c)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=a=>this.onClose({description:"websocket connection closed",context:a}),this.ws.onmessage=a=>this.onData(a.data),this.ws.onerror=a=>this.onError("websocket error",a)}write(a){this.writable=!1;for(let i=0;i<a.length;i++){const l=a[i],c=i===a.length-1;cf(l,this.supportsBinary,d=>{try{this.doWrite(l,d)}catch{}c&&Fo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const a=this.opts.secure?"wss":"ws",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=rb()),this.supportsBinary||(i.b64=1),this.createUri(a,i)}}const vd=Kn.WebSocket||Kn.MozWebSocket;class dA extends cA{createSocket(a,i,l){return lb?new vd(a,i,l):i?new vd(a,i):new vd(a)}doWrite(a,i){this.ws.send(i)}}class fA extends ff{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(a){return this.emitReserved("error",a)}this._transport.closed.then(()=>{this.onClose()}).catch(a=>{this.onError("webtransport error",a)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(a=>{const i=FC(Number.MAX_SAFE_INTEGER,this.socket.binaryType),l=a.readable.pipeThrough(i).getReader(),c=YC();c.readable.pipeTo(a.writable),this._writer=c.writable.getWriter();const d=()=>{l.read().then(({done:m,value:g})=>{m||(this.onPacket(g),d())}).catch(m=>{})};d();const f={type:"open"};this.query.sid&&(f.data=`{"sid":"${this.query.sid}"}`),this._writer.write(f).then(()=>this.onOpen())})})}write(a){this.writable=!1;for(let i=0;i<a.length;i++){const l=a[i],c=i===a.length-1;this._writer.write(l).then(()=>{c&&Fo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var a;(a=this._transport)===null||a===void 0||a.close()}}const hA={websocket:dA,webtransport:fA,polling:uA},mA=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,pA=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ud(n){if(n.length>8e3)throw"URI too long";const a=n,i=n.indexOf("["),l=n.indexOf("]");i!=-1&&l!=-1&&(n=n.substring(0,i)+n.substring(i,l).replace(/:/g,";")+n.substring(l,n.length));let c=mA.exec(n||""),d={},f=14;for(;f--;)d[pA[f]]=c[f]||"";return i!=-1&&l!=-1&&(d.source=a,d.host=d.host.substring(1,d.host.length-1).replace(/;/g,":"),d.authority=d.authority.replace("[","").replace("]","").replace(/;/g,":"),d.ipv6uri=!0),d.pathNames=gA(d,d.path),d.queryKey=yA(d,d.query),d}function gA(n,a){const i=/\/{2,9}/g,l=a.replace(i,"/").split("/");return(a.slice(0,1)=="/"||a.length===0)&&l.splice(0,1),a.slice(-1)=="/"&&l.splice(l.length-1,1),l}function yA(n,a){const i={};return a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(l,c,d){c&&(i[c]=d)}),i}const Bd=typeof addEventListener=="function"&&typeof removeEventListener=="function",zo=[];Bd&&addEventListener("offline",()=>{zo.forEach(n=>n())},!1);class br extends Dt{constructor(a,i){if(super(),this.binaryType=IC,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,a&&typeof a=="object"&&(i=a,a=null),a){const l=Ud(a);i.hostname=l.host,i.secure=l.protocol==="https"||l.protocol==="wss",i.port=l.port,l.query&&(i.query=l.query)}else i.host&&(i.hostname=Ud(i.host).host);Xo(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(l=>{const c=l.prototype.name;this.transports.push(c),this._transportsByName[c]=l}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=nA(this.opts.query)),Bd&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},zo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(a){const i=Object.assign({},this.opts.query);i.EIO=nb,i.transport=a,this.id&&(i.sid=this.id);const l=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[a]);return new this._transportsByName[a](l)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const a=this.opts.rememberUpgrade&&br.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const i=this.createTransport(a);i.open(),this.setTransport(i)}setTransport(a){this.transport&&this.transport.removeAllListeners(),this.transport=a,a.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",br.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(a){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",a),this.emitReserved("heartbeat"),a.type){case"open":this.onHandshake(JSON.parse(a.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const i=new Error("server error");i.code=a.data,this._onError(i);break;case"message":this.emitReserved("data",a.data),this.emitReserved("message",a.data);break}}onHandshake(a){this.emitReserved("handshake",a),this.id=a.sid,this.transport.query.sid=a.sid,this._pingInterval=a.pingInterval,this._pingTimeout=a.pingTimeout,this._maxPayload=a.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const a=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+a,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},a),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const a=this._getWritablePackets();this.transport.send(a),this._prevBufferLen=a.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let l=0;l<this.writeBuffer.length;l++){const c=this.writeBuffer[l].data;if(c&&(i+=WC(c)),l>0&&i>this._maxPayload)return this.writeBuffer.slice(0,l);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const a=Date.now()>this._pingTimeoutTime;return a&&(this._pingTimeoutTime=0,Fo(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),a}write(a,i,l){return this._sendPacket("message",a,i,l),this}send(a,i,l){return this._sendPacket("message",a,i,l),this}_sendPacket(a,i,l,c){if(typeof i=="function"&&(c=i,i=void 0),typeof l=="function"&&(c=l,l=null),this.readyState==="closing"||this.readyState==="closed")return;l=l||{},l.compress=l.compress!==!1;const d={type:a,data:i,options:l};this.emitReserved("packetCreate",d),this.writeBuffer.push(d),c&&this.once("flush",c),this.flush()}close(){const a=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),a()},l=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?l():a()}):this.upgrading?l():a()),this}_onError(a){if(br.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",a),this._onClose("transport error",a)}_onClose(a,i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Bd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const l=zo.indexOf(this._offlineEventListener);l!==-1&&zo.splice(l,1)}this.readyState="closed",this.id=null,this.emitReserved("close",a,i),this.writeBuffer=[],this._prevBufferLen=0}}}br.protocol=nb;class vA extends br{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let a=0;a<this._upgrades.length;a++)this._probe(this._upgrades[a])}_probe(a){let i=this.createTransport(a),l=!1;br.priorWebsocketSuccess=!1;const c=()=>{l||(i.send([{type:"ping",data:"probe"}]),i.once("packet",y=>{if(!l)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;br.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{l||this.readyState!=="closed"&&(x(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=i.name,this.emitReserved("upgradeError",T)}}))};function d(){l||(l=!0,x(),i.close(),i=null)}const f=y=>{const T=new Error("probe error: "+y);T.transport=i.name,d(),this.emitReserved("upgradeError",T)};function m(){f("transport closed")}function g(){f("socket closed")}function p(y){i&&y.name!==i.name&&d()}const x=()=>{i.removeListener("open",c),i.removeListener("error",f),i.removeListener("close",m),this.off("close",g),this.off("upgrading",p)};i.once("open",c),i.once("error",f),i.once("close",m),this.once("close",g),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&a!=="webtransport"?this.setTimeoutFn(()=>{l||i.open()},200):i.open()}onHandshake(a){this._upgrades=this._filterUpgrades(a.upgrades),super.onHandshake(a)}_filterUpgrades(a){const i=[];for(let l=0;l<a.length;l++)~this.transports.indexOf(a[l])&&i.push(a[l]);return i}}let bA=class extends vA{constructor(a,i={}){const l=typeof a=="object"?a:i;(!l.transports||l.transports&&typeof l.transports[0]=="string")&&(l.transports=(l.transports||["polling","websocket","webtransport"]).map(c=>hA[c]).filter(c=>!!c)),super(a,l)}};function xA(n,a="",i){let l=n;i=i||typeof location<"u"&&location,n==null&&(n=i.protocol+"//"+i.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=i.protocol+n:n=i.host+n),/^(https?|wss?):\/\//.test(n)||(typeof i<"u"?n=i.protocol+"//"+n:n="https://"+n),l=Ud(n)),l.port||(/^(http|ws)$/.test(l.protocol)?l.port="80":/^(http|ws)s$/.test(l.protocol)&&(l.port="443")),l.path=l.path||"/";const d=l.host.indexOf(":")!==-1?"["+l.host+"]":l.host;return l.id=l.protocol+"://"+d+":"+l.port+a,l.href=l.protocol+"://"+d+(i&&i.port===l.port?"":":"+l.port),l}const SA=typeof ArrayBuffer=="function",wA=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,ob=Object.prototype.toString,EA=typeof Blob=="function"||typeof Blob<"u"&&ob.call(Blob)==="[object BlobConstructor]",TA=typeof File=="function"||typeof File<"u"&&ob.call(File)==="[object FileConstructor]";function hf(n){return SA&&(n instanceof ArrayBuffer||wA(n))||EA&&n instanceof Blob||TA&&n instanceof File}function Lo(n,a){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let i=0,l=n.length;i<l;i++)if(Lo(n[i]))return!0;return!1}if(hf(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return Lo(n.toJSON(),!0);for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&Lo(n[i]))return!0;return!1}function CA(n){const a=[],i=n.data,l=n;return l.data=qd(i,a),l.attachments=a.length,{packet:l,buffers:a}}function qd(n,a){if(!n)return n;if(hf(n)){const i={_placeholder:!0,num:a.length};return a.push(n),i}else if(Array.isArray(n)){const i=new Array(n.length);for(let l=0;l<n.length;l++)i[l]=qd(n[l],a);return i}else if(typeof n=="object"&&!(n instanceof Date)){const i={};for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=qd(n[l],a));return i}return n}function AA(n,a){return n.data=Hd(n.data,a),delete n.attachments,n}function Hd(n,a){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<a.length)return a[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let i=0;i<n.length;i++)n[i]=Hd(n[i],a);else if(typeof n=="object")for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=Hd(n[i],a));return n}const RA=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ie;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(Ie||(Ie={}));class _A{constructor(a){this.replacer=a}encode(a){return(a.type===Ie.EVENT||a.type===Ie.ACK)&&Lo(a)?this.encodeAsBinary({type:a.type===Ie.EVENT?Ie.BINARY_EVENT:Ie.BINARY_ACK,nsp:a.nsp,data:a.data,id:a.id}):[this.encodeAsString(a)]}encodeAsString(a){let i=""+a.type;return(a.type===Ie.BINARY_EVENT||a.type===Ie.BINARY_ACK)&&(i+=a.attachments+"-"),a.nsp&&a.nsp!=="/"&&(i+=a.nsp+","),a.id!=null&&(i+=a.id),a.data!=null&&(i+=JSON.stringify(a.data,this.replacer)),i}encodeAsBinary(a){const i=CA(a),l=this.encodeAsString(i.packet),c=i.buffers;return c.unshift(l),c}}class mf extends Dt{constructor(a){super(),this.reviver=a}add(a){let i;if(typeof a=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");i=this.decodeString(a);const l=i.type===Ie.BINARY_EVENT;l||i.type===Ie.BINARY_ACK?(i.type=l?Ie.EVENT:Ie.ACK,this.reconstructor=new kA(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(hf(a)||a.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(a),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+a)}decodeString(a){let i=0;const l={type:Number(a.charAt(0))};if(Ie[l.type]===void 0)throw new Error("unknown packet type "+l.type);if(l.type===Ie.BINARY_EVENT||l.type===Ie.BINARY_ACK){const d=i+1;for(;a.charAt(++i)!=="-"&&i!=a.length;);const f=a.substring(d,i);if(f!=Number(f)||a.charAt(i)!=="-")throw new Error("Illegal attachments");l.attachments=Number(f)}if(a.charAt(i+1)==="/"){const d=i+1;for(;++i&&!(a.charAt(i)===","||i===a.length););l.nsp=a.substring(d,i)}else l.nsp="/";const c=a.charAt(i+1);if(c!==""&&Number(c)==c){const d=i+1;for(;++i;){const f=a.charAt(i);if(f==null||Number(f)!=f){--i;break}if(i===a.length)break}l.id=Number(a.substring(d,i+1))}if(a.charAt(++i)){const d=this.tryParse(a.substr(i));if(mf.isPayloadValid(l.type,d))l.data=d;else throw new Error("invalid payload")}return l}tryParse(a){try{return JSON.parse(a,this.reviver)}catch{return!1}}static isPayloadValid(a,i){switch(a){case Ie.CONNECT:return yy(i);case Ie.DISCONNECT:return i===void 0;case Ie.CONNECT_ERROR:return typeof i=="string"||yy(i);case Ie.EVENT:case Ie.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&RA.indexOf(i[0])===-1);case Ie.ACK:case Ie.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class kA{constructor(a){this.packet=a,this.buffers=[],this.reconPack=a}takeBinaryData(a){if(this.buffers.push(a),this.buffers.length===this.reconPack.attachments){const i=AA(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function yy(n){return Object.prototype.toString.call(n)==="[object Object]"}const NA=Object.freeze(Object.defineProperty({__proto__:null,Decoder:mf,Encoder:_A,get PacketType(){return Ie}},Symbol.toStringTag,{value:"Module"}));function na(n,a,i){return n.on(a,i),function(){n.off(a,i)}}const OA=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ub extends Dt{constructor(a,i,l){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=a,this.nsp=i,l&&l.auth&&(this.auth=l.auth),this._opts=Object.assign({},l),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const a=this.io;this.subs=[na(a,"open",this.onopen.bind(this)),na(a,"packet",this.onpacket.bind(this)),na(a,"error",this.onerror.bind(this)),na(a,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...a){return a.unshift("message"),this.emit.apply(this,a),this}emit(a,...i){var l,c,d;if(OA.hasOwnProperty(a))throw new Error('"'+a.toString()+'" is a reserved event name');if(i.unshift(a),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;const f={type:Ie.EVENT,data:i};if(f.options={},f.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const x=this.ids++,y=i.pop();this._registerAckCallback(x,y),f.id=x}const m=(c=(l=this.io.engine)===null||l===void 0?void 0:l.transport)===null||c===void 0?void 0:c.writable,g=this.connected&&!(!((d=this.io.engine)===null||d===void 0)&&d._hasPingExpired());return this.flags.volatile&&!m||(g?(this.notifyOutgoingListeners(f),this.packet(f)):this.sendBuffer.push(f)),this.flags={},this}_registerAckCallback(a,i){var l;const c=(l=this.flags.timeout)!==null&&l!==void 0?l:this._opts.ackTimeout;if(c===void 0){this.acks[a]=i;return}const d=this.io.setTimeoutFn(()=>{delete this.acks[a];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===a&&this.sendBuffer.splice(m,1);i.call(this,new Error("operation has timed out"))},c),f=(...m)=>{this.io.clearTimeoutFn(d),i.apply(this,m)};f.withError=!0,this.acks[a]=f}emitWithAck(a,...i){return new Promise((l,c)=>{const d=(f,m)=>f?c(f):l(m);d.withError=!0,i.push(d),this.emit(a,...i)})}_addToQueue(a){let i;typeof a[a.length-1]=="function"&&(i=a.pop());const l={id:this._queueSeq++,tryCount:0,pending:!1,args:a,flags:Object.assign({fromQueue:!0},this.flags)};a.push((c,...d)=>(this._queue[0],c!==null?l.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(c)):(this._queue.shift(),i&&i(null,...d)),l.pending=!1,this._drainQueue())),this._queue.push(l),this._drainQueue()}_drainQueue(a=!1){if(!this.connected||this._queue.length===0)return;const i=this._queue[0];i.pending&&!a||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.args))}packet(a){a.nsp=this.nsp,this.io._packet(a)}onopen(){typeof this.auth=="function"?this.auth(a=>{this._sendConnectPacket(a)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(a){this.packet({type:Ie.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},a):a})}onerror(a){this.connected||this.emitReserved("connect_error",a)}onclose(a,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",a,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(a=>{if(!this.sendBuffer.some(l=>String(l.id)===a)){const l=this.acks[a];delete this.acks[a],l.withError&&l.call(this,new Error("socket has been disconnected"))}})}onpacket(a){if(a.nsp===this.nsp)switch(a.type){case Ie.CONNECT:a.data&&a.data.sid?this.onconnect(a.data.sid,a.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ie.EVENT:case Ie.BINARY_EVENT:this.onevent(a);break;case Ie.ACK:case Ie.BINARY_ACK:this.onack(a);break;case Ie.DISCONNECT:this.ondisconnect();break;case Ie.CONNECT_ERROR:this.destroy();const l=new Error(a.data.message);l.data=a.data.data,this.emitReserved("connect_error",l);break}}onevent(a){const i=a.data||[];a.id!=null&&i.push(this.ack(a.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(a){if(this._anyListeners&&this._anyListeners.length){const i=this._anyListeners.slice();for(const l of i)l.apply(this,a)}super.emit.apply(this,a),this._pid&&a.length&&typeof a[a.length-1]=="string"&&(this._lastOffset=a[a.length-1])}ack(a){const i=this;let l=!1;return function(...c){l||(l=!0,i.packet({type:Ie.ACK,id:a,data:c}))}}onack(a){const i=this.acks[a.id];typeof i=="function"&&(delete this.acks[a.id],i.withError&&a.data.unshift(null),i.apply(this,a.data))}onconnect(a,i){this.id=a,this.recovered=i&&this._pid===i,this._pid=i,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(a=>this.emitEvent(a)),this.receiveBuffer=[],this.sendBuffer.forEach(a=>{this.notifyOutgoingListeners(a),this.packet(a)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(a=>a()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ie.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(a){return this.flags.compress=a,this}get volatile(){return this.flags.volatile=!0,this}timeout(a){return this.flags.timeout=a,this}onAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(a),this}prependAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(a),this}offAny(a){if(!this._anyListeners)return this;if(a){const i=this._anyListeners;for(let l=0;l<i.length;l++)if(a===i[l])return i.splice(l,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(a),this}prependAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(a),this}offAnyOutgoing(a){if(!this._anyOutgoingListeners)return this;if(a){const i=this._anyOutgoingListeners;for(let l=0;l<i.length;l++)if(a===i[l])return i.splice(l,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(a){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const i=this._anyOutgoingListeners.slice();for(const l of i)l.apply(this,a.data)}}}function Xi(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}Xi.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var a=Math.random(),i=Math.floor(a*this.jitter*n);n=(Math.floor(a*10)&1)==0?n-i:n+i}return Math.min(n,this.max)|0};Xi.prototype.reset=function(){this.attempts=0};Xi.prototype.setMin=function(n){this.ms=n};Xi.prototype.setMax=function(n){this.max=n};Xi.prototype.setJitter=function(n){this.jitter=n};class Qd extends Dt{constructor(a,i){var l;super(),this.nsps={},this.subs=[],a&&typeof a=="object"&&(i=a,a=void 0),i=i||{},i.path=i.path||"/socket.io",this.opts=i,Xo(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((l=i.randomizationFactor)!==null&&l!==void 0?l:.5),this.backoff=new Xi({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=a;const c=i.parser||NA;this.encoder=new c.Encoder,this.decoder=new c.Decoder,this._autoConnect=i.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(a){return arguments.length?(this._reconnection=!!a,a||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(a){return a===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=a,this)}reconnectionDelay(a){var i;return a===void 0?this._reconnectionDelay:(this._reconnectionDelay=a,(i=this.backoff)===null||i===void 0||i.setMin(a),this)}randomizationFactor(a){var i;return a===void 0?this._randomizationFactor:(this._randomizationFactor=a,(i=this.backoff)===null||i===void 0||i.setJitter(a),this)}reconnectionDelayMax(a){var i;return a===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=a,(i=this.backoff)===null||i===void 0||i.setMax(a),this)}timeout(a){return arguments.length?(this._timeout=a,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(a){if(~this._readyState.indexOf("open"))return this;this.engine=new bA(this.uri,this.opts);const i=this.engine,l=this;this._readyState="opening",this.skipReconnect=!1;const c=na(i,"open",function(){l.onopen(),a&&a()}),d=m=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",m),a?a(m):this.maybeReconnectOnOpen()},f=na(i,"error",d);if(this._timeout!==!1){const m=this._timeout,g=this.setTimeoutFn(()=>{c(),d(new Error("timeout")),i.close()},m);this.opts.autoUnref&&g.unref(),this.subs.push(()=>{this.clearTimeoutFn(g)})}return this.subs.push(c),this.subs.push(f),this}connect(a){return this.open(a)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const a=this.engine;this.subs.push(na(a,"ping",this.onping.bind(this)),na(a,"data",this.ondata.bind(this)),na(a,"error",this.onerror.bind(this)),na(a,"close",this.onclose.bind(this)),na(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(a){try{this.decoder.add(a)}catch(i){this.onclose("parse error",i)}}ondecoded(a){Fo(()=>{this.emitReserved("packet",a)},this.setTimeoutFn)}onerror(a){this.emitReserved("error",a)}socket(a,i){let l=this.nsps[a];return l?this._autoConnect&&!l.active&&l.connect():(l=new ub(this,a,i),this.nsps[a]=l),l}_destroy(a){const i=Object.keys(this.nsps);for(const l of i)if(this.nsps[l].active)return;this._close()}_packet(a){const i=this.encoder.encode(a);for(let l=0;l<i.length;l++)this.engine.write(i[l],a.options)}cleanup(){this.subs.forEach(a=>a()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(a,i){var l;this.cleanup(),(l=this.engine)===null||l===void 0||l.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",a,i),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const a=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const i=this.backoff.duration();this._reconnecting=!0;const l=this.setTimeoutFn(()=>{a.skipReconnect||(this.emitReserved("reconnect_attempt",a.backoff.attempts),!a.skipReconnect&&a.open(c=>{c?(a._reconnecting=!1,a.reconnect(),this.emitReserved("reconnect_error",c)):a.onreconnect()}))},i);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}}onreconnect(){const a=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",a)}}const Ks={};function Uo(n,a){typeof n=="object"&&(a=n,n=void 0),a=a||{};const i=xA(n,a.path||"/socket.io"),l=i.source,c=i.id,d=i.path,f=Ks[c]&&d in Ks[c].nsps,m=a.forceNew||a["force new connection"]||a.multiplex===!1||f;let g;return m?g=new Qd(l,a):(Ks[c]||(Ks[c]=new Qd(l,a)),g=Ks[c]),i.query&&!a.query&&(a.query=i.queryKey),g.socket(i.path,a)}Object.assign(Uo,{Manager:Qd,Socket:ub,io:Uo,connect:Uo});const _o="/events",pR={SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",INPUT:"input",RESIZE:"resize",TERMINAL_INPUT:"terminal:input",TERMINAL_RESIZE:"terminal:resize"},yr={SESSION_STDOUT:"session:stdout",SESSION_PATCH:"session:patch",SESSION_EXIT:"session:exit",SESSION_COMPLETED:"session:completed",SESSION_ID:"session:sessionId",SESSION_ERROR:"session:error",SESSION_PERMISSION_REQUESTED:"session:permission_requested",SESSION_PERMISSION_INVALIDATED:"session:permission_invalidated",SESSION_RUNTIME_STATE_CHANGED:"session:runtime_state_changed",TASK_UPDATED:"task:updated",TASK_DELETED:"task:deleted",TERMINAL_STDOUT:"terminal:stdout",TERMINAL_EXIT:"terminal:exit",TERMINAL_SUBSCRIBED:"terminal:subscribed",TERMINAL_UNSUBSCRIBED:"terminal:unsubscribed",WORKSPACE_SETUP_PROGRESS:"workspace:setup_progress",WORKSPACE_COMMIT_MESSAGE_UPDATED:"workspace:commit_message_updated",WORKSPACE_HIBERNATED:"workspace:hibernated",WORKSPACE_GIT_CHANGED:"workspace:git_changed",TEAM_RUN_INVALIDATED:"team-run:invalidated"};class MA{socket=null;baseUrl;visibilityHandler=null;constructor(){this.baseUrl=dT()}getSocket(){return this.socket||(this.socket=Uo(`${this.baseUrl}${_o}`,{autoConnect:!1,transports:["websocket"],reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,reconnectionDelayMax:1e4}),this.socket.on("connect",()=>{console.log(`[Socket] Connected to ${_o} t=${Date.now()}`)}),this.socket.on("disconnect",a=>{console.log(`[Socket] Disconnected from ${_o}: t=${Date.now()}`,a)}),this.socket.on("connect_error",a=>{console.error(`[Socket] Connection error on ${_o}: t=${Date.now()}`,a.message)})),this.socket}connect(){const a=this.getSocket();return a.connected||a.connect(),this.visibilityHandler||(this.visibilityHandler=()=>{document.visibilityState==="visible"&&this.socket&&!this.socket.connected&&(console.log("[Socket] Page became visible, socket disconnected — reconnecting"),this.socket.connect())},document.addEventListener("visibilitychange",this.visibilityHandler)),a}disconnect(){this.visibilityHandler&&(document.removeEventListener("visibilitychange",this.visibilityHandler),this.visibilityHandler=null),this.socket&&(this.socket.disconnect(),this.socket=null)}isConnected(){return this.socket?.connected??!1}}const el=new MA;function cb(n,a,i){const l=d=>Bo(d.queryKey,i),c=n.getQueriesData({predicate:l});return n.setQueriesData({predicate:l},d=>{if(!d||!Array.isArray(d.data))return d;const f=d.data.filter(m=>m.id!==a);return f.length===d.data.length?d:{...d,data:f,total:Math.max(0,d.total-(d.data.length-f.length))}}),n.removeQueries({queryKey:ge.tasks.detail(a),exact:!0}),n.removeQueries({queryKey:ge.tasks.body(a),exact:!0}),c}function Bo(n,a){return!Array.isArray(n)||n[0]!=="tasks"||n[1]!=="list"?!1:a?n[2]===a:!0}function qo(n,a){if(!Array.isArray(n)||n[0]!=="tasks"||n[1]!=="board")return!1;if(!a)return!0;const i=n[2];if(!i||typeof i!="object")return!0;const l=i.projectId;return l==null||l===a}function db(n,a,i){const l=d=>qo(d.queryKey,i),c=n.getQueriesData({predicate:l});return n.setQueriesData({predicate:l},d=>{if(!d||!Array.isArray(d.data))return d;const f=d.data.filter(m=>m.id!==a);return f.length===d.data.length?d:{...d,data:f,total:Math.max(0,d.total-(d.data.length-f.length))}}),c}function jA(n,a){for(const[i,l]of a)n.setQueryData(i,l)}function DA(n,a){for(const[i,l]of a)n.setQueryData(i,l)}function gR(n){const a={};return n?.projectId&&(a.projectId=n.projectId),n?.status!=null&&(a.status=n.status),n?.page!=null&&(a.page=String(n.page)),n?.limit!=null&&(a.limit=String(n.limit)),rn({queryKey:ge.tasks.board(n),queryFn:()=>ze.get("/task-board",{params:a})})}function yR(n,a=!0){return rn({queryKey:ge.tasks.body(n),queryFn:()=>ze.get(`/tasks/${n}/body`),enabled:!!n&&a})}function vR(){const n=tt();return ct({mutationFn:({id:a,...i})=>ze.put(`/tasks/${a}`,i),onSuccess:a=>{n.invalidateQueries({queryKey:ge.tasks.all}),n.invalidateQueries({queryKey:ge.tasks.detail(a.id)}),n.invalidateQueries({queryKey:ge.tasks.body(a.id)})}})}function bR(){const n=tt();return ct({mutationFn:({id:a,status:i})=>ze.patch(`/tasks/${a}/status`,{status:i}),onSuccess:a=>{n.invalidateQueries({queryKey:ge.tasks.all}),n.invalidateQueries({queryKey:ge.tasks.detail(a.id)})}})}function xR(){const n=tt();return ct({mutationFn:a=>ze.delete(`/tasks/${a}`),onMutate:async a=>{await n.cancelQueries({queryKey:ge.tasks.all});const i=cb(n,a),l=db(n,a);return{snapshots:i,boardSnapshots:l}},onError:(a,i,l)=>{l?.snapshots&&jA(n,l.snapshots),l?.boardSnapshots&&DA(n,l.boardSnapshots)},onSuccess:()=>{n.invalidateQueries({queryKey:ge.tasks.all}),n.invalidateQueries({queryKey:ge.projects.all})}})}function SR(){const n=tt();return ct({mutationFn:a=>ze.post(`/tasks/${a}/retry`,{}),onSuccess:a=>{n.invalidateQueries({queryKey:ge.tasks.all}),n.invalidateQueries({queryKey:ge.workspaces.all}),n.invalidateQueries({queryKey:ge.tasks.detail(a.id)}),n.invalidateQueries({queryKey:ge.tasks.body(a.id)})}})}function zA(){const n=tt();S.useEffect(()=>{const a=el.connect(),i=()=>{n.invalidateQueries({queryKey:ge.tasks.all})},l=async d=>{await n.cancelQueries({predicate:f=>Bo(f.queryKey,d.projectId)||qo(f.queryKey,d.projectId)}),n.invalidateQueries({predicate:f=>Bo(f.queryKey,d.projectId)||qo(f.queryKey,d.projectId)}),n.invalidateQueries({queryKey:ge.tasks.detail(d.taskId)})},c=d=>{cb(n,d.taskId,d.projectId),db(n,d.taskId,d.projectId),n.invalidateQueries({predicate:f=>Bo(f.queryKey,d.projectId)||qo(f.queryKey,d.projectId)}),n.invalidateQueries({queryKey:ge.projects.all})};return a.on("connect",i),a.on(yr.TASK_UPDATED,l),a.on(yr.TASK_DELETED,c),()=>{a.off("connect",i),a.off(yr.TASK_UPDATED,l),a.off(yr.TASK_DELETED,c)}},[n])}const Oe={all:["team-runs"],memberPresets:["member-presets"],memberPresetDetail:n=>["member-presets","detail",n],teamTemplates:["team-templates"],teamTemplateDetail:n=>["team-templates","detail",n],task:n=>["team-runs","task",n],detail:n=>["team-runs","detail",n],messages:n=>["team-runs","messages",n],messageDetail:(n,a)=>["team-runs","messages",n,a],workRequests:n=>["team-runs","work-requests",n],invocations:n=>["team-runs","invocations",n]},fb=5e3,LA=45e3;function hb(n,a){const i=n??[],l=i.findIndex(c=>c.id===a.id);return l>=0?i.map((c,d)=>d===l?a:c):[...i,a]}function vy(n,a){return!n||n.id!==a.teamRunId?n:{...n,messages:hb(n.messages,a)}}function mb(n,a){const i=n.getQueryData(Oe.detail(a));if(i?.taskId)return i.taskId;const l=n.getQueriesData({queryKey:Oe.all});for(const[,c]of l)if(c?.id===a&&c.taskId)return c.taskId}function Ii(n,a){const i=mb(n,a);n.invalidateQueries({queryKey:Oe.all}),n.invalidateQueries({queryKey:Oe.detail(a)}),n.invalidateQueries({queryKey:Oe.workRequests(a)}),n.invalidateQueries({queryKey:Oe.invocations(a)}),n.invalidateQueries({queryKey:ge.tasks.all}),n.invalidateQueries({queryKey:ge.workspaces.all}),i&&(n.invalidateQueries({queryKey:ge.tasks.detail(i)}),n.invalidateQueries({queryKey:Oe.task(i)}),n.invalidateQueries({queryKey:ge.workspaces.list(i)}))}function wR(){return rn({queryKey:Oe.memberPresets,queryFn:()=>ze.get("/member-presets")})}function ER(){const n=tt();return ct({mutationFn:a=>ze.post("/member-presets",a),onSuccess:()=>{n.invalidateQueries({queryKey:Oe.memberPresets}),n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function TR(){const n=tt();return ct({mutationFn:({id:a,data:i})=>ze.patch(`/member-presets/${a}`,i),onSuccess:(a,i)=>{n.invalidateQueries({queryKey:Oe.memberPresets}),n.invalidateQueries({queryKey:Oe.memberPresetDetail(i.id)}),n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function CR(){const n=tt();return ct({mutationFn:a=>ze.delete(`/member-presets/${a}`),onSuccess:()=>{n.invalidateQueries({queryKey:Oe.memberPresets}),n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function AR(){return rn({queryKey:Oe.teamTemplates,queryFn:()=>ze.get("/team-templates")})}function RR(){const n=tt();return ct({mutationFn:a=>ze.post("/team-templates",a),onSuccess:()=>{n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function _R(){const n=tt();return ct({mutationFn:({id:a,data:i})=>ze.patch(`/team-templates/${a}`,i),onSuccess:(a,i)=>{n.invalidateQueries({queryKey:Oe.teamTemplates}),n.invalidateQueries({queryKey:Oe.teamTemplateDetail(i.id)})}})}function kR(){const n=tt();return ct({mutationFn:a=>ze.delete(`/team-templates/${a}`),onSuccess:()=>{n.invalidateQueries({queryKey:Oe.teamTemplates})}})}function NR(){const n=tt();return ct({mutationFn:({taskId:a,...i})=>ze.post(`/tasks/${a}/team-runs`,i),onSuccess:(a,i)=>{n.setQueryData(Oe.task(i.taskId),a),n.setQueryData(Oe.detail(a.id),a),n.setQueryData(Oe.messages(a.id),a.messages??[]),n.setQueryData(Oe.workRequests(a.id),a.workRequests??[]),n.setQueryData(Oe.invocations(a.id),a.invocations??[]),n.invalidateQueries({queryKey:Oe.task(i.taskId)}),n.invalidateQueries({queryKey:Oe.all}),n.invalidateQueries({queryKey:ge.tasks.all}),n.invalidateQueries({queryKey:ge.tasks.detail(i.taskId)}),n.invalidateQueries({queryKey:ge.workspaces.all}),n.invalidateQueries({queryKey:ge.workspaces.list(i.taskId)})},onError:(a,i)=>{n.invalidateQueries({queryKey:Oe.task(i.taskId)}),n.invalidateQueries({queryKey:Oe.all})}})}function OR(n){return rn({queryKey:Oe.task(n),queryFn:async()=>{try{return await ze.get(`/tasks/${n}/team-run`)}catch(a){if(a instanceof sl&&a.status===404)return null;throw a}},enabled:!!n,retry:!1,refetchInterval:a=>a.state.data?fb:!1})}function MR(n){return rn({queryKey:Oe.messages(n),queryFn:async()=>{try{return await ze.get(`/team-runs/${n}/messages`)}catch(a){if(a instanceof sl&&a.status===404)return[];throw a}},enabled:!!n,retry:!1,refetchInterval:fb})}function jR(n,a,i=!1){return rn({queryKey:Oe.messageDetail(n,a),queryFn:()=>ze.get(`/team-runs/${n}/messages/${a}`),enabled:!!(n&&a&&i),retry:!1})}function DR(n){const a=tt();return ct({mutationFn:i=>ze.post(`/team-runs/${n}/messages`,i),onSuccess:i=>{a.setQueryData(Oe.messages(n),c=>hb(c,i)),a.setQueryData(Oe.detail(n),c=>vy(c,i));const l=mb(a,n);l&&a.setQueryData(Oe.task(l),c=>vy(c,i)),a.invalidateQueries({queryKey:Oe.all}),a.invalidateQueries({queryKey:["tasks"]}),a.invalidateQueries({queryKey:ge.workspaces.all})}})}function zR(n){const a=tt();return ct({mutationFn:i=>ze.post(`/team-runs/${n}/members`,i),onSuccess:()=>{Ii(a,n)}})}function LR(n){const a=tt();return ct({mutationFn:({memberId:i,data:l})=>ze.patch(`/team-runs/${n}/members/${i}`,l),onSuccess:()=>{Ii(a,n)}})}function UR(n){const a=tt();return ct({mutationFn:({memberId:i,stopActive:l=!0,cancelQueued:c=!0})=>ze.post(`/team-runs/${n}/members/${i}/remove`,{stopActive:l,cancelQueued:c}),onSuccess:()=>{Ii(a,n)}})}function BR(n){const a=tt();return ct({mutationFn:i=>ze.post(`/team-runs/work-requests/${i}/approve`),onSuccess:()=>{Ii(a,n)}})}function qR(n){const a=tt();return ct({mutationFn:i=>ze.post(`/team-runs/work-requests/${i}/reject`),onSuccess:()=>{Ii(a,n)}})}function HR(n){const a=tt();return ct({mutationFn:async({memberId:i,cancelQueued:l})=>{try{return await ze.post(`/team-runs/${n}/members/${i}/stop`,{cancelQueued:l},{signal:AbortSignal.timeout(LA)})}catch(c){throw c instanceof DOMException&&c.name==="TimeoutError"?new Error("Stop request timed out before the server answered. Refresh the team status and retry."):c}},onSuccess:()=>{Ii(a,n)}})}function fa(n,a){return n.scopes.includes(a)}function UA(){const n=tt();S.useEffect(()=>{const a=el.connect(),i=d=>{if(!d){n.invalidateQueries({queryKey:Oe.all});return}n.invalidateQueries({queryKey:Oe.detail(d.teamRunId)}),(fa(d,"team-run")||fa(d,"team-members"))&&n.invalidateQueries({queryKey:Oe.all}),fa(d,"room-messages")&&n.invalidateQueries({queryKey:Oe.messages(d.teamRunId)}),fa(d,"work-requests")&&n.invalidateQueries({queryKey:Oe.workRequests(d.teamRunId)}),fa(d,"agent-invocations")&&n.invalidateQueries({queryKey:Oe.invocations(d.teamRunId)}),d.taskId&&n.invalidateQueries({queryKey:Oe.task(d.taskId)}),d.taskId&&(fa(d,"task")||fa(d,"team-run"))&&n.invalidateQueries({queryKey:ge.tasks.detail(d.taskId)}),d.projectId&&(fa(d,"task")||fa(d,"team-run"))&&(n.invalidateQueries({queryKey:ge.tasks.list(d.projectId)}),n.invalidateQueries({queryKey:ge.tasks.boardAll})),fa(d,"workspaces")&&(n.invalidateQueries({queryKey:ge.workspaces.all}),d.taskId&&n.invalidateQueries({queryKey:ge.workspaces.list(d.taskId)}))},l=()=>i(),c=d=>i(d);return a.on("connect",l),a.on(yr.TEAM_RUN_INVALIDATED,c),()=>{a.off("connect",l),a.off(yr.TEAM_RUN_INVALIDATED,c)}},[n])}const BA=yv(n=>({visibleContext:null,setVisibleContext:a=>n({visibleContext:a})}));function qA(n){n.invalidateQueries({queryKey:ge.git.all,refetchType:"none"}),n.invalidateQueries({queryKey:["workspaces","gitStatus"],refetchType:"none"}),n.invalidateQueries({queryKey:["workspaces","diff"],refetchType:"none"})}function HA(n,a){a.workingDir&&(n.invalidateQueries({queryKey:ge.git.changes(a.workingDir),refetchType:"none"}),n.invalidateQueries({queryKey:ge.git.log(a.workingDir),refetchType:"none"})),a.workspaceId&&n.invalidateQueries({queryKey:ge.workspaces.gitStatus(a.workspaceId),refetchType:"none"})}function by(n,a,i){if(!(!a?.workspaceId||!a?.workingDir)){if(!i||i.workspaceId!==a.workspaceId||i.workingDir!==a.workingDir){HA(n,a);return}if(i.tab==="changes"){n.invalidateQueries({queryKey:ge.git.changes(a.workingDir)}),n.invalidateQueries({queryKey:ge.workspaces.gitStatus(a.workspaceId)}),n.invalidateQueries({queryKey:ge.git.log(a.workingDir),refetchType:"none"});return}n.invalidateQueries({queryKey:ge.git.log(a.workingDir)}),n.invalidateQueries({queryKey:ge.git.changes(a.workingDir),refetchType:"none"}),n.invalidateQueries({queryKey:ge.workspaces.gitStatus(a.workspaceId),refetchType:"none"})}}function QA(){const n=tt(),a=BA(i=>i.visibleContext);S.useEffect(()=>{const i=el.connect(),l=()=>{qA(n),a&&by(n,{workspaceId:a.workspaceId,workingDir:a.workingDir},a)},c=d=>{by(n,d,a)};return i.on("connect",l),i.on(yr.WORKSPACE_GIT_CHANGED,c),()=>{i.off("connect",l),i.off(yr.WORKSPACE_GIT_CHANGED,c)}},[n,a])}function PA(){return zA(),UA(),QA(),null}function GA({className:n,type:a="text",...i}){return v.jsx("input",{type:a,"data-slot":"input",className:jt("w-full rounded-lg border border-input bg-background px-3 py-2 text-sm text-foreground transition-colors","placeholder:text-muted-foreground/70","focus:border-ring focus:outline-none focus-visible:border-ring","disabled:cursor-not-allowed disabled:bg-muted/50 disabled:text-muted-foreground","aria-invalid:border-destructive",n),...i})}function KA(){return rn({queryKey:ge.accessAuth.status,queryFn:()=>ze.get("/access-auth/status"),retry:!1})}function QR(n=!0){return rn({queryKey:ge.accessAuth.settings,queryFn:()=>ze.get("/access-auth/settings"),enabled:n})}function VA(){const n=tt();return ct({mutationFn:a=>ze.post("/access-auth/login",{password:a}),onSuccess:a=>{n.setQueryData(ge.accessAuth.status,a),n.invalidateQueries()}})}function PR(){const n=tt();return ct({mutationFn:()=>ze.post("/access-auth/logout",{}),onSuccess:a=>{n.setQueryData(ge.accessAuth.status,a),n.invalidateQueries()}})}function GR(){const n=tt();return ct({mutationFn:a=>ze.put("/access-auth/settings",a),onSuccess:()=>{n.invalidateQueries({queryKey:ge.accessAuth.status}),n.invalidateQueries({queryKey:ge.accessAuth.settings})}})}function YA(){return v.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background text-foreground",children:v.jsx(Ki,{size:18,className:"animate-spin text-muted-foreground motion-reduce:animate-none","aria-hidden":"true"})})}function FA(){const[n,a]=S.useState(""),i=VA(),l=i.isError?aa("密码不正确,请重试"):null;return v.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 text-foreground",children:v.jsxs("form",{className:"w-full max-w-sm space-y-5",onSubmit:c=>{c.preventDefault();const d=n;d&&i.mutate(d)},children:[v.jsxs("div",{className:"space-y-2 text-center",children:[v.jsx("div",{className:"mx-auto flex h-10 w-10 items-center justify-center rounded-lg bg-muted text-muted-foreground",children:v.jsx(VE,{size:18,"aria-hidden":"true"})}),v.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:"Agent Tower"}),v.jsx("p",{className:"text-sm text-muted-foreground",children:aa("输入访问密码继续")})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(GA,{type:"password",autoFocus:!0,autoComplete:"current-password",value:n,onChange:c=>{a(c.target.value),i.reset()},"aria-invalid":!!l,placeholder:aa("访问密码")}),l&&v.jsx("p",{className:"text-xs text-destructive",children:l})]}),v.jsxs(ma,{className:"w-full",type:"submit",disabled:!n||i.isPending,children:[i.isPending&&v.jsx(Ki,{size:14,className:"mr-2 animate-spin motion-reduce:animate-none","aria-hidden":"true"}),i.isPending?aa("验证中..."):aa("解锁")]})]})})}function XA({children:n}){const{data:a,isLoading:i,isError:l}=KA();return i?v.jsx(YA,{}):l?v.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 text-sm text-muted-foreground",children:aa("访问状态加载失败,请刷新后重试。")}):a?.enabled&&!a.authenticated?v.jsx(FA,{}):v.jsx(v.Fragment,{children:n})}function IA(){return S.useEffect(()=>(el.connect(),()=>el.disconnect()),[]),v.jsxs(ST,{children:[v.jsxs(vC,{children:[v.jsx(PA,{}),v.jsx(qC,{})]}),v.jsx(uf,{source:"toaster",fallback:()=>null,children:v.jsx(Hx,{position:"top-center",toastOptions:{className:"text-sm",style:{fontFamily:"inherit"},classNames:{error:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg",success:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg",default:"!bg-neutral-900 !text-neutral-100 !border-neutral-800 !shadow-lg"}}})})]})}function ZA(){return v.jsx(bC,{children:v.jsx(tx,{client:Qx,children:v.jsx(XA,{children:v.jsx(IA,{})})})})}const JA="/api/tunnel/bootstrap";async function $A(){const n=new URL(window.location.href),a=n.searchParams.get("token");if(!a)return;const i=await fetch(`${JA}?token=${encodeURIComponent(a)}`,{method:"POST",credentials:"same-origin"});if(!i.ok)throw new Error(`Tunnel bootstrap failed (${i.status})`);n.searchParams.delete("token"),window.history.replaceState({},"",n.toString())}async function WA(){try{await $A()}catch(n){console.error("[Tunnel] Failed to bootstrap tunnel session",n)}O1.createRoot(document.getElementById("root")).render(v.jsx(S.StrictMode,{children:v.jsx(ZA,{})}))}WA();export{ZE as $,dC as A,ma as B,jE as C,jy as D,wR as E,AR as F,ER as G,TR as H,GA as I,CR as J,RR as K,hR as L,_R as M,kR as N,fR as O,cT as P,Ki as Q,wC as R,S2 as S,Jr as T,nT as U,el as V,yr as W,gv as X,pR as Y,Gv as Z,cv as _,mT as a,eT as a0,dR as a1,cR as a2,Yo as a3,w2 as a4,TE as a5,Od as a6,K2 as a7,uw as a8,Fs as a9,_n as aA,sl as aB,NR as aC,DR as aD,vR as aE,OR as aF,MR as aG,yR as aH,SR as aI,Oe as aJ,gR as aK,xR as aL,bR as aM,u2 as aN,Av as aO,yv as aP,aa,BE as ab,uf as ac,xy as ad,pv as ae,mv as af,rR as ag,iT as ah,HE as ai,F1 as aj,yg as ak,tR as al,eR as am,fx as an,ne as ao,BA as ap,BR as aq,qR as ar,HR as as,LE as at,VE as au,jR as av,zR as aw,LR as ax,UR as ay,FE as az,aR as b,QR as c,pT as d,GR as e,PR as f,iR as g,lR as h,sR as i,v as j,gt as k,jt as l,rn as m,ct as n,tt as o,ze as p,ge as q,S as r,wE as s,Bi as t,ya as u,uR as v,oR as w,_t as x,qv as y,Dd as z};
|