agent-tower 0.5.2-beta.0 → 0.5.2-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.
Files changed (108) hide show
  1. package/dist/mcp/http-client.d.ts +4 -1
  2. package/dist/mcp/http-client.d.ts.map +1 -1
  3. package/dist/mcp/http-client.js +2 -2
  4. package/dist/mcp/http-client.js.map +1 -1
  5. package/dist/mcp/tools/workspaces.d.ts.map +1 -1
  6. package/dist/mcp/tools/workspaces.js +4 -1
  7. package/dist/mcp/tools/workspaces.js.map +1 -1
  8. package/dist/mcp/types.d.ts +3 -0
  9. package/dist/mcp/types.d.ts.map +1 -1
  10. package/dist/mcp/types.js +2 -0
  11. package/dist/mcp/types.js.map +1 -1
  12. package/dist/routes/git.d.ts.map +1 -1
  13. package/dist/routes/git.js +6 -1
  14. package/dist/routes/git.js.map +1 -1
  15. package/dist/routes/system.d.ts.map +1 -1
  16. package/dist/routes/system.js +21 -5
  17. package/dist/routes/system.js.map +1 -1
  18. package/dist/routes/workspaces.d.ts.map +1 -1
  19. package/dist/routes/workspaces.js +11 -4
  20. package/dist/routes/workspaces.js.map +1 -1
  21. package/dist/services/__tests__/task.service.test.js +65 -1
  22. package/dist/services/__tests__/task.service.test.js.map +1 -1
  23. package/dist/services/__tests__/workspace.service.test.js +55 -0
  24. package/dist/services/__tests__/workspace.service.test.js.map +1 -1
  25. package/dist/services/commit-message.service.d.ts.map +1 -1
  26. package/dist/services/commit-message.service.js +3 -0
  27. package/dist/services/commit-message.service.js.map +1 -1
  28. package/dist/services/project.service.d.ts.map +1 -1
  29. package/dist/services/project.service.js +3 -2
  30. package/dist/services/project.service.js.map +1 -1
  31. package/dist/services/session-manager.d.ts +8 -0
  32. package/dist/services/session-manager.d.ts.map +1 -1
  33. package/dist/services/session-manager.js +9 -6
  34. package/dist/services/session-manager.js.map +1 -1
  35. package/dist/services/task-cleanup.service.d.ts +2 -0
  36. package/dist/services/task-cleanup.service.d.ts.map +1 -1
  37. package/dist/services/task-cleanup.service.js +8 -1
  38. package/dist/services/task-cleanup.service.js.map +1 -1
  39. package/dist/services/task.service.d.ts +4 -0
  40. package/dist/services/task.service.d.ts.map +1 -1
  41. package/dist/services/task.service.js +3 -0
  42. package/dist/services/task.service.js.map +1 -1
  43. package/dist/services/workspace-kind.d.ts +13 -0
  44. package/dist/services/workspace-kind.d.ts.map +1 -0
  45. package/dist/services/workspace-kind.js +16 -0
  46. package/dist/services/workspace-kind.js.map +1 -0
  47. package/dist/services/workspace.service.d.ts +18 -0
  48. package/dist/services/workspace.service.d.ts.map +1 -1
  49. package/dist/services/workspace.service.js +104 -12
  50. package/dist/services/workspace.service.js.map +1 -1
  51. package/dist/types/index.d.ts +4 -0
  52. package/dist/types/index.d.ts.map +1 -1
  53. package/dist/types/index.js +6 -0
  54. package/dist/types/index.js.map +1 -1
  55. package/dist/web/assets/{AgentDemoPage-CWcu7-P7.js → AgentDemoPage-CkhVcgZo.js} +1 -1
  56. package/dist/web/assets/{DemoPage-6hMli_sP.js → DemoPage-dkmp8Vvn.js} +1 -1
  57. package/dist/web/assets/{GeneralSettingsPage-DUaFSgCY.js → GeneralSettingsPage-B4DH6g3D.js} +1 -1
  58. package/dist/web/assets/{MemberAvatar-S-eJAdWH.js → MemberAvatar-pwugXGL4.js} +1 -1
  59. package/dist/web/assets/{NotificationSettingsPage-Cl5x8F4G.js → NotificationSettingsPage-C-bPU_ZE.js} +1 -1
  60. package/dist/web/assets/{ProfileSettingsPage-QFN9385l.js → ProfileSettingsPage-Dlr6BmHb.js} +1 -1
  61. package/dist/web/assets/ProjectKanbanPage-7oEfjjWV.js +89 -0
  62. package/dist/web/assets/{ProjectSettingsPage-Do3Q1_r4.js → ProjectSettingsPage-DZZksq5G.js} +1 -1
  63. package/dist/web/assets/{ProviderSettingsPage-DYOb33XQ.js → ProviderSettingsPage-BWN7CEG6.js} +14 -14
  64. package/dist/web/assets/{SettingsSection-D0Zzbbhp.js → SettingsSection-C-sMhXpf.js} +1 -1
  65. package/dist/web/assets/{TeamSettingsPage-Dq_DU1S8.js → TeamSettingsPage-924xpocx.js} +1 -1
  66. package/dist/web/assets/{arrow-left-D0xGRsQG.js → arrow-left-UHjQiY5K.js} +1 -1
  67. package/dist/web/assets/{button-C-IDw2d8.js → button-CUTjpRqw.js} +1 -1
  68. package/dist/web/assets/check-CPkZgPjx.js +1 -0
  69. package/dist/web/assets/{chevron-down-C735lPj9.js → chevron-down-Bby7sJEv.js} +1 -1
  70. package/dist/web/assets/{chevron-right-DfFiWY3R.js → chevron-right-DCC0lyoB.js} +1 -1
  71. package/dist/web/assets/{chevron-up-DqGc0SsZ.js → chevron-up-BnCoaejn.js} +1 -1
  72. package/dist/web/assets/{circle-check-CSlvn06a.js → circle-check-BscClK07.js} +1 -1
  73. package/dist/web/assets/{code-block-OCS4YCEC-BRT1Nrpy.js → code-block-OCS4YCEC-DkMlYSza.js} +1 -1
  74. package/dist/web/assets/{confirm-dialog-BtsxywSG.js → confirm-dialog-wsb35VpE.js} +1 -1
  75. package/dist/web/assets/{folder-picker-BuvfyaHB.js → folder-picker-B-X_nrS1.js} +1 -1
  76. package/dist/web/assets/index-4hNWw0yi.css +1 -0
  77. package/dist/web/assets/{index-BAz6UxmL.js → index-CUJoWIuo.js} +2 -2
  78. package/dist/web/assets/{loader-circle-BLO3w-ze.js → loader-circle-Cul4BuAa.js} +1 -1
  79. package/dist/web/assets/log-adapter-CtvxzS4j.js +1 -0
  80. package/dist/web/assets/{mermaid-NOHMQCX5-BLfGHrOE.js → mermaid-NOHMQCX5-DoPzf-UA.js} +3 -3
  81. package/dist/web/assets/{message-square-CIyucdyo.js → message-square-C7Q71jFj.js} +1 -1
  82. package/dist/web/assets/modal-25-qs8P5.js +1 -0
  83. package/dist/web/assets/{pencil-CdJXJig-.js → pencil-CaJR6Dqm.js} +1 -1
  84. package/dist/web/assets/{rotate-ccw-B42Jf1RW.js → rotate-ccw-Bvz7590n.js} +1 -1
  85. package/dist/web/assets/{select-kVmZCXo9.js → select-CzeTYLO4.js} +1 -1
  86. package/dist/web/assets/upload-_2T21rVP.js +1 -0
  87. package/dist/web/assets/{use-profiles-Bvj_EW-7.js → use-profiles-BaCwGP06.js} +1 -1
  88. package/dist/web/assets/{use-providers-CcFzAUyf.js → use-providers-Bwl7R5Ql.js} +1 -1
  89. package/dist/web/index.html +2 -2
  90. package/node_modules/@agent-tower/shared/dist/types.d.ts +10 -0
  91. package/node_modules/@agent-tower/shared/dist/types.d.ts.map +1 -1
  92. package/node_modules/@agent-tower/shared/dist/types.js +6 -0
  93. package/node_modules/@agent-tower/shared/dist/types.js.map +1 -1
  94. package/node_modules/@prisma/client/.prisma/client/edge.js +7 -5
  95. package/node_modules/@prisma/client/.prisma/client/index-browser.js +2 -0
  96. package/node_modules/@prisma/client/.prisma/client/index.d.ts +118 -0
  97. package/node_modules/@prisma/client/.prisma/client/index.js +7 -5
  98. package/node_modules/@prisma/client/.prisma/client/package.json +1 -1
  99. package/node_modules/@prisma/client/.prisma/client/schema.prisma +6 -1
  100. package/node_modules/@prisma/client/.prisma/client/wasm.js +2 -0
  101. package/package.json +1 -1
  102. package/prisma/migrations/20260609000000_add_workspace_kind_working_dir/migration.sql +7 -0
  103. package/prisma/schema.prisma +6 -1
  104. package/dist/web/assets/ProjectKanbanPage-Dye8K5K1.js +0 -89
  105. package/dist/web/assets/check-KjbNKANU.js +0 -1
  106. package/dist/web/assets/index-r8en4dlI.css +0 -1
  107. package/dist/web/assets/log-adapter-i7kNXXup.js +0 -1
  108. package/dist/web/assets/modal-D_VShm6D.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GeneralSettingsPage-DUaFSgCY.js","assets/select-kVmZCXo9.js","assets/chevron-down-C735lPj9.js","assets/check-KjbNKANU.js","assets/use-providers-CcFzAUyf.js","assets/SettingsSection-D0Zzbbhp.js","assets/ProviderSettingsPage-DYOb33XQ.js","assets/button-C-IDw2d8.js","assets/confirm-dialog-BtsxywSG.js","assets/modal-D_VShm6D.js","assets/log-adapter-i7kNXXup.js","assets/arrow-left-D0xGRsQG.js","assets/pencil-CdJXJig-.js","assets/rotate-ccw-B42Jf1RW.js","assets/circle-check-CSlvn06a.js","assets/TeamSettingsPage-Dq_DU1S8.js","assets/MemberAvatar-S-eJAdWH.js","assets/chevron-up-DqGc0SsZ.js","assets/ProjectSettingsPage-Do3Q1_r4.js","assets/folder-picker-BuvfyaHB.js","assets/chevron-right-DfFiWY3R.js","assets/loader-circle-BLO3w-ze.js","assets/NotificationSettingsPage-Cl5x8F4G.js","assets/message-square-CIyucdyo.js","assets/ProfileSettingsPage-QFN9385l.js","assets/use-profiles-Bvj_EW-7.js","assets/ProjectKanbanPage-Dye8K5K1.js","assets/mermaid-NOHMQCX5-BLfGHrOE.js","assets/mermaid-NOHMQCX5-lI9o3AWT.css","assets/ProjectKanbanPage-G5OQeJvU.css","assets/DemoPage-6hMli_sP.js","assets/AgentDemoPage-CWcu7-P7.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GeneralSettingsPage-B4DH6g3D.js","assets/select-CzeTYLO4.js","assets/chevron-down-Bby7sJEv.js","assets/check-CPkZgPjx.js","assets/use-providers-Bwl7R5Ql.js","assets/SettingsSection-C-sMhXpf.js","assets/ProviderSettingsPage-BWN7CEG6.js","assets/button-CUTjpRqw.js","assets/confirm-dialog-wsb35VpE.js","assets/modal-25-qs8P5.js","assets/log-adapter-CtvxzS4j.js","assets/upload-_2T21rVP.js","assets/arrow-left-UHjQiY5K.js","assets/pencil-CaJR6Dqm.js","assets/rotate-ccw-Bvz7590n.js","assets/circle-check-BscClK07.js","assets/TeamSettingsPage-924xpocx.js","assets/MemberAvatar-pwugXGL4.js","assets/chevron-up-BnCoaejn.js","assets/ProjectSettingsPage-DZZksq5G.js","assets/folder-picker-B-X_nrS1.js","assets/chevron-right-DCC0lyoB.js","assets/loader-circle-Cul4BuAa.js","assets/NotificationSettingsPage-C-bPU_ZE.js","assets/message-square-C7Q71jFj.js","assets/ProfileSettingsPage-Dlr6BmHb.js","assets/use-profiles-BaCwGP06.js","assets/ProjectKanbanPage-7oEfjjWV.js","assets/mermaid-NOHMQCX5-DoPzf-UA.js","assets/mermaid-NOHMQCX5-lI9o3AWT.css","assets/ProjectKanbanPage-G5OQeJvU.css","assets/DemoPage-dkmp8Vvn.js","assets/AgentDemoPage-CkhVcgZo.js"])))=>i.map(i=>d[i]);
2
2
  function Cb(n,i){for(var l=0;l<i.length;l++){const s=i[l];if(typeof s!="string"&&!Array.isArray(s)){for(const c in s)if(c!=="default"&&!(c in n)){const f=Object.getOwnPropertyDescriptor(s,c);f&&Object.defineProperty(n,c,f.get?f:{enumerable:!0,get:()=>s[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))s(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function l(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function s(c){if(c.ep)return;c.ep=!0;const f=l(c);fetch(c.href,f)}})();function Jy(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Hc={exports:{}},_l={};var Lp;function Ob(){if(Lp)return _l;Lp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function l(s,c,f){var d=null;if(f!==void 0&&(d=""+f),c.key!==void 0&&(d=""+c.key),"key"in c){f={};for(var p in c)p!=="key"&&(f[p]=c[p])}else f=c;return c=f.ref,{$$typeof:n,type:s,key:d,ref:c!==void 0?c:null,props:f}}return _l.Fragment=i,_l.jsx=l,_l.jsxs=l,_l}var Bp;function Mb(){return Bp||(Bp=1,Hc.exports=Ob()),Hc.exports}var be=Mb(),Qc={exports:{}},Oe={};var jp;function Db(){if(jp)return Oe;jp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),T=Symbol.iterator;function M(w){return w===null||typeof w!="object"?null:(w=T&&w[T]||w["@@iterator"],typeof w=="function"?w:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,K={};function G(w,q,B){this.props=w,this.context=q,this.refs=K,this.updater=B||U}G.prototype.isReactComponent={},G.prototype.setState=function(w,q){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,q,"setState")},G.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function P(){}P.prototype=G.prototype;function I(w,q,B){this.props=w,this.context=q,this.refs=K,this.updater=B||U}var ye=I.prototype=new P;ye.constructor=I,H(ye,G.prototype),ye.isPureReactComponent=!0;var de=Array.isArray;function he(){}var A={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function se(w,q,B){var Z=B.ref;return{$$typeof:n,type:w,key:q,ref:Z!==void 0?Z:null,props:B}}function Ce(w,q){return se(w.type,q,w.props)}function Ae(w){return typeof w=="object"&&w!==null&&w.$$typeof===n}function Re(w){var q={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(B){return q[B]})}var ke=/\/+/g;function Ue(w,q){return typeof w=="object"&&w!==null&&w.key!=null?Re(""+w.key):q.toString(36)}function Ee(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(he,he):(w.status="pending",w.then(function(q){w.status==="pending"&&(w.status="fulfilled",w.value=q)},function(q){w.status==="pending"&&(w.status="rejected",w.reason=q)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function C(w,q,B,Z,ee){var oe=typeof w;(oe==="undefined"||oe==="boolean")&&(w=null);var ue=!1;if(w===null)ue=!0;else switch(oe){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(w.$$typeof){case n:case i:ue=!0;break;case b:return ue=w._init,C(ue(w._payload),q,B,Z,ee)}}if(ue)return ee=ee(w),ue=Z===""?"."+Ue(w,0):Z,de(ee)?(B="",ue!=null&&(B=ue.replace(ke,"$&/")+"/"),C(ee,q,B,"",function(jt){return jt})):ee!=null&&(Ae(ee)&&(ee=Ce(ee,B+(ee.key==null||w&&w.key===ee.key?"":(""+ee.key).replace(ke,"$&/")+"/")+ue)),q.push(ee)),1;ue=0;var xe=Z===""?".":Z+":";if(de(w))for(var Qe=0;Qe<w.length;Qe++)Z=w[Qe],oe=xe+Ue(Z,Qe),ue+=C(Z,q,B,oe,ee);else if(Qe=M(w),typeof Qe=="function")for(w=Qe.call(w),Qe=0;!(Z=w.next()).done;)Z=Z.value,oe=xe+Ue(Z,Qe++),ue+=C(Z,q,B,oe,ee);else if(oe==="object"){if(typeof w.then=="function")return C(Ee(w),q,B,Z,ee);throw q=String(w),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ue}function F(w,q,B){if(w==null)return w;var Z=[],ee=0;return C(w,Z,"","",function(oe){return q.call(B,oe,ee++)}),Z}function j(w){if(w._status===-1){var q=w._result;q=q(),q.then(function(B){(w._status===0||w._status===-1)&&(w._status=1,w._result=B)},function(B){(w._status===0||w._status===-1)&&(w._status=2,w._result=B)}),w._status===-1&&(w._status=0,w._result=q)}if(w._status===1)return w._result.default;throw w._result}var pe=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},ge={map:F,forEach:function(w,q,B){F(w,function(){q.apply(this,arguments)},B)},count:function(w){var q=0;return F(w,function(){q++}),q},toArray:function(w){return F(w,function(q){return q})||[]},only:function(w){if(!Ae(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return Oe.Activity=g,Oe.Children=ge,Oe.Component=G,Oe.Fragment=l,Oe.Profiler=c,Oe.PureComponent=I,Oe.StrictMode=s,Oe.Suspense=y,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,Oe.__COMPILER_RUNTIME={__proto__:null,c:function(w){return A.H.useMemoCache(w)}},Oe.cache=function(w){return function(){return w.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(w,q,B){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var Z=H({},w.props),ee=w.key;if(q!=null)for(oe in q.key!==void 0&&(ee=""+q.key),q)!Y.call(q,oe)||oe==="key"||oe==="__self"||oe==="__source"||oe==="ref"&&q.ref===void 0||(Z[oe]=q[oe]);var oe=arguments.length-2;if(oe===1)Z.children=B;else if(1<oe){for(var ue=Array(oe),xe=0;xe<oe;xe++)ue[xe]=arguments[xe+2];Z.children=ue}return se(w.type,ee,Z)},Oe.createContext=function(w){return w={$$typeof:d,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:f,_context:w},w},Oe.createElement=function(w,q,B){var Z,ee={},oe=null;if(q!=null)for(Z in q.key!==void 0&&(oe=""+q.key),q)Y.call(q,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ee[Z]=q[Z]);var ue=arguments.length-2;if(ue===1)ee.children=B;else if(1<ue){for(var xe=Array(ue),Qe=0;Qe<ue;Qe++)xe[Qe]=arguments[Qe+2];ee.children=xe}if(w&&w.defaultProps)for(Z in ue=w.defaultProps,ue)ee[Z]===void 0&&(ee[Z]=ue[Z]);return se(w,oe,ee)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(w){return{$$typeof:p,render:w}},Oe.isValidElement=Ae,Oe.lazy=function(w){return{$$typeof:b,_payload:{_status:-1,_result:w},_init:j}},Oe.memo=function(w,q){return{$$typeof:m,type:w,compare:q===void 0?null:q}},Oe.startTransition=function(w){var q=A.T,B={};A.T=B;try{var Z=w(),ee=A.S;ee!==null&&ee(B,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(he,pe)}catch(oe){pe(oe)}finally{q!==null&&B.types!==null&&(q.types=B.types),A.T=q}},Oe.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},Oe.use=function(w){return A.H.use(w)},Oe.useActionState=function(w,q,B){return A.H.useActionState(w,q,B)},Oe.useCallback=function(w,q){return A.H.useCallback(w,q)},Oe.useContext=function(w){return A.H.useContext(w)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(w,q){return A.H.useDeferredValue(w,q)},Oe.useEffect=function(w,q){return A.H.useEffect(w,q)},Oe.useEffectEvent=function(w){return A.H.useEffectEvent(w)},Oe.useId=function(){return A.H.useId()},Oe.useImperativeHandle=function(w,q,B){return A.H.useImperativeHandle(w,q,B)},Oe.useInsertionEffect=function(w,q){return A.H.useInsertionEffect(w,q)},Oe.useLayoutEffect=function(w,q){return A.H.useLayoutEffect(w,q)},Oe.useMemo=function(w,q){return A.H.useMemo(w,q)},Oe.useOptimistic=function(w,q){return A.H.useOptimistic(w,q)},Oe.useReducer=function(w,q,B){return A.H.useReducer(w,q,B)},Oe.useRef=function(w){return A.H.useRef(w)},Oe.useState=function(w){return A.H.useState(w)},Oe.useSyncExternalStore=function(w,q,B){return A.H.useSyncExternalStore(w,q,B)},Oe.useTransition=function(){return A.H.useTransition()},Oe.version="19.2.4",Oe}var qp;function _f(){return qp||(qp=1,Qc.exports=Db()),Qc.exports}var x=_f();const W=Jy(x),zb=Cb({__proto__:null,default:W},[x]);var Yc={exports:{}},Al={},Gc={exports:{}},Vc={};var Hp;function Nb(){return Hp||(Hp=1,(function(n){function i(C,F){var j=C.length;C.push(F);e:for(;0<j;){var pe=j-1>>>1,ge=C[pe];if(0<c(ge,F))C[pe]=F,C[j]=ge,j=pe;else break e}}function l(C){return C.length===0?null:C[0]}function s(C){if(C.length===0)return null;var F=C[0],j=C.pop();if(j!==F){C[0]=j;e:for(var pe=0,ge=C.length,w=ge>>>1;pe<w;){var q=2*(pe+1)-1,B=C[q],Z=q+1,ee=C[Z];if(0>c(B,j))Z<ge&&0>c(ee,B)?(C[pe]=ee,C[Z]=j,pe=Z):(C[pe]=B,C[q]=j,pe=q);else if(Z<ge&&0>c(ee,j))C[pe]=ee,C[Z]=j,pe=Z;else break e}}return F}function c(C,F){var j=C.sortIndex-F.sortIndex;return j!==0?j:C.id-F.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,p=d.now();n.unstable_now=function(){return d.now()-p}}var y=[],m=[],b=1,g=null,T=3,M=!1,U=!1,H=!1,K=!1,G=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;function ye(C){for(var F=l(m);F!==null;){if(F.callback===null)s(m);else if(F.startTime<=C)s(m),F.sortIndex=F.expirationTime,i(y,F);else break;F=l(m)}}function de(C){if(H=!1,ye(C),!U)if(l(y)!==null)U=!0,he||(he=!0,Re());else{var F=l(m);F!==null&&Ee(de,F.startTime-C)}}var he=!1,A=-1,Y=5,se=-1;function Ce(){return K?!0:!(n.unstable_now()-se<Y)}function Ae(){if(K=!1,he){var C=n.unstable_now();se=C;var F=!0;try{e:{U=!1,H&&(H=!1,P(A),A=-1),M=!0;var j=T;try{t:{for(ye(C),g=l(y);g!==null&&!(g.expirationTime>C&&Ce());){var pe=g.callback;if(typeof pe=="function"){g.callback=null,T=g.priorityLevel;var ge=pe(g.expirationTime<=C);if(C=n.unstable_now(),typeof ge=="function"){g.callback=ge,ye(C),F=!0;break t}g===l(y)&&s(y),ye(C)}else s(y);g=l(y)}if(g!==null)F=!0;else{var w=l(m);w!==null&&Ee(de,w.startTime-C),F=!1}}break e}finally{g=null,T=j,M=!1}F=void 0}}finally{F?Re():he=!1}}}var Re;if(typeof I=="function")Re=function(){I(Ae)};else if(typeof MessageChannel<"u"){var ke=new MessageChannel,Ue=ke.port2;ke.port1.onmessage=Ae,Re=function(){Ue.postMessage(null)}}else Re=function(){G(Ae,0)};function Ee(C,F){A=G(function(){C(n.unstable_now())},F)}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(C){C.callback=null},n.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<C?Math.floor(1e3/C):5},n.unstable_getCurrentPriorityLevel=function(){return T},n.unstable_next=function(C){switch(T){case 1:case 2:case 3:var F=3;break;default:F=T}var j=T;T=F;try{return C()}finally{T=j}},n.unstable_requestPaint=function(){K=!0},n.unstable_runWithPriority=function(C,F){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var j=T;T=C;try{return F()}finally{T=j}},n.unstable_scheduleCallback=function(C,F,j){var pe=n.unstable_now();switch(typeof j=="object"&&j!==null?(j=j.delay,j=typeof j=="number"&&0<j?pe+j:pe):j=pe,C){case 1:var ge=-1;break;case 2:ge=250;break;case 5:ge=1073741823;break;case 4:ge=1e4;break;default:ge=5e3}return ge=j+ge,C={id:b++,callback:F,priorityLevel:C,startTime:j,expirationTime:ge,sortIndex:-1},j>pe?(C.sortIndex=j,i(m,C),l(y)===null&&C===l(m)&&(H?(P(A),A=-1):H=!0,Ee(de,j-pe))):(C.sortIndex=ge,i(y,C),U||M||(U=!0,he||(he=!0,Re()))),C},n.unstable_shouldYield=Ce,n.unstable_wrapCallback=function(C){var F=T;return function(){var j=T;T=F;try{return C.apply(this,arguments)}finally{T=j}}}})(Vc)),Vc}var Qp;function kb(){return Qp||(Qp=1,Gc.exports=Nb()),Gc.exports}var Kc={exports:{}},Zt={};var Yp;function Ub(){if(Yp)return Zt;Yp=1;var n=_f();function i(y){var m="https://react.dev/errors/"+y;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)m+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var s={d:{f:l,r:function(){throw Error(i(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(y,m,b){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:g==null?null:""+g,children:y,containerInfo:m,implementation:b}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(y,m){if(y==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Zt.createPortal=function(y,m){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(i(299));return f(y,m,null,b)},Zt.flushSync=function(y){var m=d.T,b=s.p;try{if(d.T=null,s.p=2,y)return y()}finally{d.T=m,s.p=b,s.d.f()}},Zt.preconnect=function(y,m){typeof y=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,s.d.C(y,m))},Zt.prefetchDNS=function(y){typeof y=="string"&&s.d.D(y)},Zt.preinit=function(y,m){if(typeof y=="string"&&m&&typeof m.as=="string"){var b=m.as,g=p(b,m.crossOrigin),T=typeof m.integrity=="string"?m.integrity:void 0,M=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;b==="style"?s.d.S(y,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:T,fetchPriority:M}):b==="script"&&s.d.X(y,{crossOrigin:g,integrity:T,fetchPriority:M,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Zt.preinitModule=function(y,m){if(typeof y=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var b=p(m.as,m.crossOrigin);s.d.M(y,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&s.d.M(y)},Zt.preload=function(y,m){if(typeof y=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var b=m.as,g=p(b,m.crossOrigin);s.d.L(y,b,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Zt.preloadModule=function(y,m){if(typeof y=="string")if(m){var b=p(m.as,m.crossOrigin);s.d.m(y,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else s.d.m(y)},Zt.requestFormReset=function(y){s.d.r(y)},Zt.unstable_batchedUpdates=function(y,m){return y(m)},Zt.useFormState=function(y,m,b){return d.H.useFormState(y,m,b)},Zt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Zt.version="19.2.4",Zt}var Gp;function Iy(){if(Gp)return Kc.exports;Gp=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(i){console.error(i)}}return n(),Kc.exports=Ub(),Kc.exports}var Vp;function Lb(){if(Vp)return Al;Vp=1;var n=kb(),i=_f(),l=Iy();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(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 p(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 y(e){if(f(e)!==e)throw Error(s(188))}function m(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(s(188));return t!==e?null:e}for(var a=e,r=t;;){var o=a.return;if(o===null)break;var u=o.alternate;if(u===null){if(r=o.return,r!==null){a=r;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===a)return y(o),e;if(u===r)return y(o),t;u=u.sibling}throw Error(s(188))}if(a.return!==r.return)a=o,r=u;else{for(var h=!1,v=o.child;v;){if(v===a){h=!0,a=o,r=u;break}if(v===r){h=!0,r=o,a=u;break}v=v.sibling}if(!h){for(v=u.child;v;){if(v===a){h=!0,a=u,r=o;break}if(v===r){h=!0,r=u,a=o;break}v=v.sibling}if(!h)throw Error(s(189))}}if(a.alternate!==r)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var g=Object.assign,T=Symbol.for("react.element"),M=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),I=Symbol.for("react.context"),ye=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),he=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),se=Symbol.for("react.activity"),Ce=Symbol.for("react.memo_cache_sentinel"),Ae=Symbol.iterator;function Re(e){return e===null||typeof e!="object"?null:(e=Ae&&e[Ae]||e["@@iterator"],typeof e=="function"?e:null)}var ke=Symbol.for("react.client.reference");function Ue(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ke?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case H:return"Fragment";case G:return"Profiler";case K:return"StrictMode";case de:return"Suspense";case he:return"SuspenseList";case se:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case U:return"Portal";case I:return e.displayName||"Context";case P:return(e._context.displayName||"Context")+".Consumer";case ye:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case A:return t=e.displayName||null,t!==null?t:Ue(e.type)||"Memo";case Y:t=e._payload,e=e._init;try{return Ue(e(t))}catch{}}return null}var Ee=Array.isArray,C=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j={pending:!1,data:null,method:null,action:null},pe=[],ge=-1;function w(e){return{current:e}}function q(e){0>ge||(e.current=pe[ge],pe[ge]=null,ge--)}function B(e,t){ge++,pe[ge]=e.current,e.current=t}var Z=w(null),ee=w(null),oe=w(null),ue=w(null);function xe(e,t){switch(B(oe,t),B(ee,e),B(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?rp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=rp(t),e=lp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(Z),B(Z,e)}function Qe(){q(Z),q(ee),q(oe)}function jt(e){e.memoizedState!==null&&B(ue,e);var t=Z.current,a=lp(t,e.type);t!==a&&(B(ee,e),B(Z,a))}function Jt(e){ee.current===e&&(q(Z),q(ee)),ue.current===e&&(q(ue),wl._currentValue=j)}var Pe,Yn;function tn(e){if(Pe===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Pe=t&&t[1]||"",Yn=-1<a.stack.indexOf(`
3
3
  at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
4
4
  `+Pe+e+Yn}var hi=!1;function nn(e,t){if(!e||hi)return"";hi=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(L){var N=L}Reflect.construct(e,[],X)}else{try{X.call()}catch(L){N=L}e.call(X.prototype)}}else{try{throw Error()}catch(L){N=L}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(L){if(L&&N&&typeof L.stack=="string")return[L.stack,N.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=r.DetermineComponentFrameRoot(),h=u[0],v=u[1];if(h&&v){var E=h.split(`
@@ -10,4 +10,4 @@ Error generating stack: `+r.message+`
10
10
  `).replace(J0,"")}function ap(e,t){return t=np(t),np(e)===t}function at(e,t,a,r,o,u){switch(a){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Pi(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Pi(e,""+r);break;case"className":Fn(e,"class",r);break;case"tabIndex":Fn(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Fn(e,a,r);break;case"style":ad(e,r,u);break;case"data":if(t!=="object"){Fn(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=Pl(""+r),e.setAttribute(a,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(a,"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"&&(a==="formAction"?(t!=="input"&&at(e,t,"name",o.name,o,null),at(e,t,"formEncType",o.formEncType,o,null),at(e,t,"formMethod",o.formMethod,o,null),at(e,t,"formTarget",o.formTarget,o,null)):(at(e,t,"encType",o.encType,o,null),at(e,t,"method",o.method,o,null),at(e,t,"target",o.target,o,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=Pl(""+r),e.setAttribute(a,r);break;case"onClick":r!=null&&(e.onclick=ya);break;case"onScroll":r!=null&&je("scroll",e);break;case"onScrollEnd":r!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(s(61));if(a=r.__html,a!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}a=Pl(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""+r):e.removeAttribute(a);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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":r===!0?e.setAttribute(a,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,r):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(a,r):e.removeAttribute(a);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(a):e.setAttribute(a,r);break;case"popover":je("beforetoggle",e),je("toggle",e),wt(e,"popover",r);break;case"xlinkActuate":Qt(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Qt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Qt(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Qt(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Qt(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Qt(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":wt(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Rv.get(a)||a,wt(e,a,r))}}function wc(e,t,a,r,o,u){switch(a){case"style":ad(e,r,u);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(s(61));if(a=r.__html,a!=null){if(o.children!=null)throw Error(s(60));e.innerHTML=a}}break;case"children":typeof r=="string"?Pi(e,r):(typeof r=="number"||typeof r=="bigint")&&Pi(e,""+r);break;case"onScroll":r!=null&&je("scroll",e);break;case"onScrollEnd":r!=null&&je("scrollend",e);break;case"onClick":r!=null&&(e.onclick=ya);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!pn.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),u=e[ae]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof r=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,r,o);break e}a in e?e[a]=r:r===!0?e.setAttribute(a,""):wt(e,a,r)}}}function Kt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("load",e);var r=!1,o=!1,u;for(u in a)if(a.hasOwnProperty(u)){var h=a[u];if(h!=null)switch(u){case"src":r=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:at(e,t,u,h,a,null)}}o&&at(e,t,"srcSet",a.srcSet,a,null),r&&at(e,t,"src",a.src,a,null);return;case"input":je("invalid",e);var v=u=h=o=null,E=null,z=null;for(r in a)if(a.hasOwnProperty(r)){var Q=a[r];if(Q!=null)switch(r){case"name":o=Q;break;case"type":h=Q;break;case"checked":E=Q;break;case"defaultChecked":z=Q;break;case"value":u=Q;break;case"defaultValue":v=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(s(137,t));break;default:at(e,t,r,Q,a,null)}}Wf(e,u,v,E,z,h,o,!1);return;case"select":je("invalid",e),r=h=u=null;for(o in a)if(a.hasOwnProperty(o)&&(v=a[o],v!=null))switch(o){case"value":u=v;break;case"defaultValue":h=v;break;case"multiple":r=v;default:at(e,t,o,v,a,null)}t=u,a=h,e.multiple=!!r,t!=null?Zi(e,!!r,t,!1):a!=null&&Zi(e,!!r,a,!0);return;case"textarea":je("invalid",e),u=o=r=null;for(h in a)if(a.hasOwnProperty(h)&&(v=a[h],v!=null))switch(h){case"value":r=v;break;case"defaultValue":o=v;break;case"children":u=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(s(91));break;default:at(e,t,h,v,a,null)}td(e,r,o,u);return;case"option":for(E in a)a.hasOwnProperty(E)&&(r=a[E],r!=null)&&(E==="selected"?e.selected=r&&typeof r!="function"&&typeof r!="symbol":at(e,t,E,r,a,null));return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(r=0;r<gl.length;r++)je(gl[r],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("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(z in a)if(a.hasOwnProperty(z)&&(r=a[z],r!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:at(e,t,z,r,a,null)}return;default:if(Lo(t)){for(Q in a)a.hasOwnProperty(Q)&&(r=a[Q],r!==void 0&&wc(e,t,Q,r,a,void 0));return}}for(v in a)a.hasOwnProperty(v)&&(r=a[v],r!=null&&at(e,t,v,r,a,null))}function I0(e,t,a,r){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,v=null,E=null,z=null,Q=null;for(L in a){var X=a[L];if(a.hasOwnProperty(L)&&X!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":E=X;default:r.hasOwnProperty(L)||at(e,t,L,null,r,X)}}for(var N in r){var L=r[N];if(X=a[N],r.hasOwnProperty(N)&&(L!=null||X!=null))switch(N){case"type":u=L;break;case"name":o=L;break;case"checked":z=L;break;case"defaultChecked":Q=L;break;case"value":h=L;break;case"defaultValue":v=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(s(137,t));break;default:L!==X&&at(e,t,N,L,r,X)}}ko(e,h,v,E,z,Q,u,o);return;case"select":L=h=v=N=null;for(u in a)if(E=a[u],a.hasOwnProperty(u)&&E!=null)switch(u){case"value":break;case"multiple":L=E;default:r.hasOwnProperty(u)||at(e,t,u,null,r,E)}for(o in r)if(u=r[o],E=a[o],r.hasOwnProperty(o)&&(u!=null||E!=null))switch(o){case"value":N=u;break;case"defaultValue":v=u;break;case"multiple":h=u;default:u!==E&&at(e,t,o,u,r,E)}t=v,a=h,r=L,N!=null?Zi(e,!!a,N,!1):!!r!=!!a&&(t!=null?Zi(e,!!a,t,!0):Zi(e,!!a,a?[]:"",!1));return;case"textarea":L=N=null;for(v in a)if(o=a[v],a.hasOwnProperty(v)&&o!=null&&!r.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:at(e,t,v,null,r,o)}for(h in r)if(o=r[h],u=a[h],r.hasOwnProperty(h)&&(o!=null||u!=null))switch(h){case"value":N=o;break;case"defaultValue":L=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(s(91));break;default:o!==u&&at(e,t,h,o,r,u)}ed(e,N,L);return;case"option":for(var ie in a)N=a[ie],a.hasOwnProperty(ie)&&N!=null&&!r.hasOwnProperty(ie)&&(ie==="selected"?e.selected=!1:at(e,t,ie,null,r,N));for(E in r)N=r[E],L=a[E],r.hasOwnProperty(E)&&N!==L&&(N!=null||L!=null)&&(E==="selected"?e.selected=N&&typeof N!="function"&&typeof N!="symbol":at(e,t,E,N,r,L));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 Te in a)N=a[Te],a.hasOwnProperty(Te)&&N!=null&&!r.hasOwnProperty(Te)&&at(e,t,Te,null,r,N);for(z in r)if(N=r[z],L=a[z],r.hasOwnProperty(z)&&N!==L&&(N!=null||L!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(N!=null)throw Error(s(137,t));break;default:at(e,t,z,N,r,L)}return;default:if(Lo(t)){for(var it in a)N=a[it],a.hasOwnProperty(it)&&N!==void 0&&!r.hasOwnProperty(it)&&wc(e,t,it,void 0,r,N);for(Q in r)N=r[Q],L=a[Q],!r.hasOwnProperty(Q)||N===L||N===void 0&&L===void 0||wc(e,t,Q,N,r,L);return}}for(var O in a)N=a[O],a.hasOwnProperty(O)&&N!=null&&!r.hasOwnProperty(O)&&at(e,t,O,null,r,N);for(X in r)N=r[X],L=a[X],!r.hasOwnProperty(X)||N===L||N==null&&L==null||at(e,t,X,N,r,L)}function ip(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),r=0;r<a.length;r++){var o=a[r],u=o.transferSize,h=o.initiatorType,v=o.duration;if(u&&v&&ip(h)){for(h=0,v=o.responseEnd,r+=1;r<a.length;r++){var E=a[r],z=E.startTime;if(z>v)break;var Q=E.transferSize,X=E.initiatorType;Q&&ip(X)&&(E=E.responseEnd,h+=Q*(E<v?1:(v-z)/(E-z)))}if(--r,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 Tc=null,Rc=null;function Vs(e){return e.nodeType===9?e:e.ownerDocument}function rp(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 lp(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 xc(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 _c=null;function W0(){var e=window.event;return e&&e.type==="popstate"?e===_c?!1:(_c=e,!0):(_c=null,!1)}var sp=typeof setTimeout=="function"?setTimeout:void 0,eb=typeof clearTimeout=="function"?clearTimeout:void 0,op=typeof Promise=="function"?Promise:void 0,tb=typeof queueMicrotask=="function"?queueMicrotask:typeof op<"u"?function(e){return op.resolve(null).then(e).catch(nb)}:sp;function nb(e){setTimeout(function(){throw e})}function ei(e){return e==="head"}function up(e,t){var a=t,r=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(r===0){e.removeChild(o),_r(t);return}r--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")r++;else if(a==="html")bl(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,bl(a);for(var u=a.firstChild;u;){var h=u.nextSibling,v=u.nodeName;u[mt]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=h}}else a==="body"&&bl(e.ownerDocument.body);a=o}while(a);_r(t)}function cp(e,t){var a=e;e=0;do{var r=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),r&&r.nodeType===8)if(a=r.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=r}while(a)}function Ac(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Ac(a),pt(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function ab(e,t,a,r){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[mt])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=Un(e.nextSibling),e===null)break}return null}function ib(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Un(e.nextSibling),e===null))return null;return e}function fp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Un(e.nextSibling),e===null))return null;return e}function Cc(e){return e.data==="$?"||e.data==="$~"}function Oc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function rb(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var r=function(){t(),a.removeEventListener("DOMContentLoaded",r)};a.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Un(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 Mc=null;function dp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Un(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function hp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function mp(e,t,a){switch(t=Vs(a),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function bl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pt(e)}var Ln=new Map,pp=new Set;function Ks(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var za=F.d;F.d={f:lb,r:sb,D:ob,C:ub,L:cb,m:fb,X:hb,S:db,M:mb};function lb(){var e=za.f(),t=Ls();return e||t}function sb(e){var t=Ge(e);t!==null&&t.tag===5&&t.type==="form"?zh(t):za.r(e)}var Tr=typeof document>"u"?null:document;function yp(e,t,a){var r=Tr;if(r&&typeof t=="string"&&t){var o=Cn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),pp.has(o)||(pp.add(o),e={rel:e,crossOrigin:a,href:t},r.querySelector(o)===null&&(t=r.createElement("link"),Kt(t,"link",e),ft(t),r.head.appendChild(t)))}}function ob(e){za.D(e),yp("dns-prefetch",e,null)}function ub(e,t){za.C(e,t),yp("preconnect",e,t)}function cb(e,t,a){za.L(e,t,a);var r=Tr;if(r&&e&&t){var o='link[rel="preload"][as="'+Cn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+Cn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+Cn(a.imageSizes)+'"]')):o+='[href="'+Cn(e)+'"]';var u=o;switch(t){case"style":u=Rr(e);break;case"script":u=xr(e)}Ln.has(u)||(e=g({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ln.set(u,e),r.querySelector(o)!==null||t==="style"&&r.querySelector(Sl(u))||t==="script"&&r.querySelector(El(u))||(t=r.createElement("link"),Kt(t,"link",e),ft(t),r.head.appendChild(t)))}}function fb(e,t){za.m(e,t);var a=Tr;if(a&&e){var r=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Cn(r)+'"][href="'+Cn(e)+'"]',u=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=xr(e)}if(!Ln.has(u)&&(e=g({rel:"modulepreload",href:e},t),Ln.set(u,e),a.querySelector(o)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(El(u)))return}r=a.createElement("link"),Kt(r,"link",e),ft(r),a.head.appendChild(r)}}}function db(e,t,a){za.S(e,t,a);var r=Tr;if(r&&e){var o=rn(r).hoistableStyles,u=Rr(e);t=t||"default";var h=o.get(u);if(!h){var v={loading:0,preload:null};if(h=r.querySelector(Sl(u)))v.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ln.get(u))&&Dc(e,a);var E=h=r.createElement("link");ft(E),Kt(E,"link",e),E._p=new Promise(function(z,Q){E.onload=z,E.onerror=Q}),E.addEventListener("load",function(){v.loading|=1}),E.addEventListener("error",function(){v.loading|=2}),v.loading|=4,Xs(h,t,r)}h={type:"stylesheet",instance:h,count:1,state:v},o.set(u,h)}}}function hb(e,t){za.X(e,t);var a=Tr;if(a&&e){var r=rn(a).hoistableScripts,o=xr(e),u=r.get(o);u||(u=a.querySelector(El(o)),u||(e=g({src:e,async:!0},t),(t=Ln.get(o))&&zc(e,t),u=a.createElement("script"),ft(u),Kt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},r.set(o,u))}}function mb(e,t){za.M(e,t);var a=Tr;if(a&&e){var r=rn(a).hoistableScripts,o=xr(e),u=r.get(o);u||(u=a.querySelector(El(o)),u||(e=g({src:e,async:!0,type:"module"},t),(t=Ln.get(o))&&zc(e,t),u=a.createElement("script"),ft(u),Kt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},r.set(o,u))}}function gp(e,t,a,r){var o=(o=oe.current)?Ks(o):null;if(!o)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Rr(a.href),a=rn(o).hoistableStyles,r=a.get(t),r||(r={type:"style",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Rr(a.href);var u=rn(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(Sl(e)))&&!u._p&&(h.instance=u,h.state.loading=5),Ln.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Ln.set(e,a),u||pb(o,e,a,h.state))),t&&r===null)throw Error(s(528,""));return h}if(t&&r!==null)throw Error(s(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=xr(a),a=rn(o).hoistableScripts,r=a.get(t),r||(r={type:"script",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Rr(e){return'href="'+Cn(e)+'"'}function Sl(e){return'link[rel="stylesheet"]['+e+"]"}function vp(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function pb(e,t,a,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),Kt(t,"link",a),ft(t),e.head.appendChild(t))}function xr(e){return'[src="'+Cn(e)+'"]'}function El(e){return"script[async]"+e}function bp(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Cn(a.href)+'"]');if(r)return t.instance=r,ft(r),r;var o=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),ft(r),Kt(r,"style",o),Xs(r,a.precedence,e),t.instance=r;case"stylesheet":o=Rr(a.href);var u=e.querySelector(Sl(o));if(u)return t.state.loading|=4,t.instance=u,ft(u),u;r=vp(a),(o=Ln.get(o))&&Dc(r,o),u=(e.ownerDocument||e).createElement("link"),ft(u);var h=u;return h._p=new Promise(function(v,E){h.onload=v,h.onerror=E}),Kt(u,"link",r),t.state.loading|=4,Xs(u,a.precedence,e),t.instance=u;case"script":return u=xr(a.src),(o=e.querySelector(El(u)))?(t.instance=o,ft(o),o):(r=a,(o=Ln.get(u))&&(r=g({},a),zc(r,o)),e=e.ownerDocument||e,o=e.createElement("script"),ft(o),Kt(o,"link",r),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,Xs(r,a.precedence,e));return t.instance}function Xs(e,t,a){for(var r=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=r.length?r[r.length-1]:null,u=o,h=0;h<r.length;h++){var v=r[h];if(v.dataset.precedence===t)u=v;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Dc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function zc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Fs=null;function Sp(e,t,a){if(Fs===null){var r=new Map,o=Fs=new Map;o.set(a,r)}else o=Fs,r=o.get(a),r||(r=new Map,o.set(a,r));if(r.has(e))return r;for(r.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var u=a[o];if(!(u[mt]||u[te]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var h=u.getAttribute(t)||"";h=e+h;var v=r.get(h);v?v.push(u):r.set(h,[u])}}return r}function Ep(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function yb(e,t,a){if(a===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 wp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function gb(e,t,a,r){if(a.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=Rr(r.href),u=t.querySelector(Sl(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Zs.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,ft(u);return}u=t.ownerDocument||t,r=vp(r),(o=Ln.get(o))&&Dc(r,o),u=u.createElement("link"),ft(u);var h=u;h._p=new Promise(function(v,E){h.onload=v,h.onerror=E}),Kt(u,"link",r),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Zs.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Nc=0;function vb(e,t){return e.stylesheets&&e.count===0&&Js(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var r=setTimeout(function(){if(e.stylesheets&&Js(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Nc===0&&(Nc=62500*$0());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Js(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Nc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(o)}}:null}function Zs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Js(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ps=null;function Js(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ps=new Map,t.forEach(bb,e),Ps=null,Zs.call(e))}function bb(e,t){if(!(t.state.loading&4)){var a=Ps.get(e);if(a)var r=a.get(null);else{a=new Map,Ps.set(e,a);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")&&(a.set(h.dataset.precedence,h),r=h)}r&&a.set(null,r)}o=t.instance,h=o.getAttribute("data-precedence"),u=a.get(h)||r,u===r&&a.set(null,o),a.set(h,o),this.count++,r=Zs.bind(this),o.addEventListener("load",r),o.addEventListener("error",r),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var wl={$$typeof:I,Provider:null,Consumer:null,_currentValue:j,_currentValue2:j,_threadCount:0};function Sb(e,t,a,r,o,u,h,v,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=mn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mn(0),this.hiddenUpdates=mn(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Tp(e,t,a,r,o,u,h,v,E,z,Q,X){return e=new Sb(e,t,a,h,E,z,Q,X,v),t=1,u===!0&&(t|=24),u=gn(3,null,null,t),e.current=u,u.stateNode=e,t=du(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:r,isDehydrated:a,cache:t},yu(u),e}function Rp(e){return e?(e=nr,e):nr}function xp(e,t,a,r,o,u){o=Rp(o),r.context===null?r.context=o:r.pendingContext=o,r=Ga(t),r.payload={element:a},u=u===void 0?null:u,u!==null&&(r.callback=u),a=Va(e,r,t),a!==null&&(fn(a,e,t),el(a,e,t))}function _p(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function kc(e,t){_p(e,t),(e=e.alternate)&&_p(e,t)}function Ap(e){if(e.tag===13||e.tag===31){var t=Ri(e,67108864);t!==null&&fn(t,e,67108864),kc(e,67108864)}}function Cp(e){if(e.tag===13||e.tag===31){var t=wn();t=k(t);var a=Ri(e,t);a!==null&&fn(a,e,t),kc(e,t)}}var Is=!0;function Eb(e,t,a,r){var o=C.T;C.T=null;var u=F.p;try{F.p=2,Uc(e,t,a,r)}finally{F.p=u,C.T=o}}function wb(e,t,a,r){var o=C.T;C.T=null;var u=F.p;try{F.p=8,Uc(e,t,a,r)}finally{F.p=u,C.T=o}}function Uc(e,t,a,r){if(Is){var o=Lc(r);if(o===null)Ec(e,t,r,$s,a),Mp(e,r);else if(Rb(o,e,t,a,r))r.stopPropagation();else if(Mp(e,r),t&4&&-1<Tb.indexOf(e)){for(;o!==null;){var u=Ge(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=_n(u.pendingLanes);if(h!==0){var v=u;for(v.pendingLanes|=2,v.entangledLanes|=2;h;){var E=1<<31-Dt(h);v.entanglements[1]|=E,h&=~E}ia(u),($e&6)===0&&(ks=ht()+500,yl(0))}}break;case 31:case 13:v=Ri(u,2),v!==null&&fn(v,u,2),Ls(),kc(u,2)}if(u=Lc(r),u===null&&Ec(e,t,r,$s,a),u===o)break;o=u}o!==null&&r.stopPropagation()}else Ec(e,t,r,null,a)}}function Lc(e){return e=jo(e),Bc(e)}var $s=null;function Bc(e){if($s=null,e=yt(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===31){if(e=p(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return $s=e,null}function Op(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(fa()){case ea:return 2;case La:return 8;case Ht:case It:return 32;case Rn:return 268435456;default:return 32}default:return 32}}var jc=!1,ti=null,ni=null,ai=null,Tl=new Map,Rl=new Map,ii=[],Tb="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 Mp(e,t){switch(e){case"focusin":case"focusout":ti=null;break;case"dragenter":case"dragleave":ni=null;break;case"mouseover":case"mouseout":ai=null;break;case"pointerover":case"pointerout":Tl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Rl.delete(t.pointerId)}}function xl(e,t,a,r,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:r,nativeEvent:u,targetContainers:[o]},t!==null&&(t=Ge(t),t!==null&&Ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Rb(e,t,a,r,o){switch(t){case"focusin":return ti=xl(ti,e,t,a,r,o),!0;case"dragenter":return ni=xl(ni,e,t,a,r,o),!0;case"mouseover":return ai=xl(ai,e,t,a,r,o),!0;case"pointerover":var u=o.pointerId;return Tl.set(u,xl(Tl.get(u)||null,e,t,a,r,o)),!0;case"gotpointercapture":return u=o.pointerId,Rl.set(u,xl(Rl.get(u)||null,e,t,a,r,o)),!0}return!1}function Dp(e){var t=yt(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,me(e.priority,function(){Cp(a)});return}}else if(t===31){if(t=p(a),t!==null){e.blockedOn=t,me(e.priority,function(){Cp(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ws(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Lc(e.nativeEvent);if(a===null){a=e.nativeEvent;var r=new a.constructor(a.type,a);Bo=r,a.target.dispatchEvent(r),Bo=null}else return t=Ge(a),t!==null&&Ap(t),e.blockedOn=a,!1;t.shift()}return!0}function zp(e,t,a){Ws(e)&&a.delete(t)}function xb(){jc=!1,ti!==null&&Ws(ti)&&(ti=null),ni!==null&&Ws(ni)&&(ni=null),ai!==null&&Ws(ai)&&(ai=null),Tl.forEach(zp),Rl.forEach(zp)}function eo(e,t){e.blockedOn===t&&(e.blockedOn=null,jc||(jc=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,xb)))}var to=null;function Np(e){to!==e&&(to=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){to===e&&(to=null);for(var t=0;t<e.length;t+=3){var a=e[t],r=e[t+1],o=e[t+2];if(typeof r!="function"){if(Bc(r||a)===null)continue;break}var u=Ge(a);u!==null&&(e.splice(t,3),t-=3,Lu(u,{pending:!0,data:o,method:a.method,action:r},r,o))}}))}function _r(e){function t(E){return eo(E,e)}ti!==null&&eo(ti,e),ni!==null&&eo(ni,e),ai!==null&&eo(ai,e),Tl.forEach(t),Rl.forEach(t);for(var a=0;a<ii.length;a++){var r=ii[a];r.blockedOn===e&&(r.blockedOn=null)}for(;0<ii.length&&(a=ii[0],a.blockedOn===null);)Dp(a),a.blockedOn===null&&ii.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(r=0;r<a.length;r+=3){var o=a[r],u=a[r+1],h=o[ae]||null;if(typeof u=="function")h||Np(a);else if(h){var v=null;if(u&&u.hasAttribute("formAction")){if(o=u,h=u[ae]||null)v=h.formAction;else if(Bc(o)!==null)continue}else v=h.action;typeof v=="function"?a[r+1]=v:(a.splice(r,3),r-=3),Np(a)}}}function kp(){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),r||setTimeout(a,20)}function a(){if(!r&&!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 r=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function qc(e){this._internalRoot=e}no.prototype.render=qc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var a=t.current,r=wn();xp(a,r,e,t,null,null)},no.prototype.unmount=qc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;xp(e.current,2,null,e,null,null),Ls(),t[fe]=null}};function no(e){this._internalRoot=e}no.prototype.unstable_scheduleHydration=function(e){if(e){var t=$();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ii.length&&t!==0&&t<ii[a].priority;a++);ii.splice(a,0,e),a===0&&Dp(e)}};var Up=i.version;if(Up!=="19.2.4")throw Error(s(527,Up,"19.2.4"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=m(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var _b={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:C,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ao=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ao.isDisabled&&ao.supportsFiber)try{da=ao.inject(_b),ot=ao}catch{}}return Al.createRoot=function(e,t){if(!c(e))throw Error(s(299));var a=!1,r="",o=Yh,u=Gh,h=Vh;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Tp(e,1,!1,null,null,a,r,null,o,u,h,kp),e[fe]=t.current,Sc(e),new qc(t)},Al.hydrateRoot=function(e,t,a){if(!c(e))throw Error(s(299));var r=!1,o="",u=Yh,h=Gh,v=Vh,E=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(v=a.onRecoverableError),a.formState!==void 0&&(E=a.formState)),t=Tp(e,1,!0,t,a??null,r,o,E,u,h,v,kp),t.context=Rp(null),a=t.current,r=wn(),r=k(r),o=Ga(r),o.callback=null,Va(a,o,r),a=r,t.current.lanes=a,st(t,a),ia(t),e[fe]=t.current,Sc(e),new no(t)},Al.version="19.2.4",Al}var Kp;function Bb(){if(Kp)return Yc.exports;Kp=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(i){console.error(i)}}return n(),Yc.exports=Lb(),Yc.exports}var jb=Bb(),kr=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(){}},qb={setTimeout:(n,i)=>setTimeout(n,i),clearTimeout:n=>clearTimeout(n),setInterval:(n,i)=>setInterval(n,i),clearInterval:n=>clearInterval(n)},Hb=class{#e=qb;#t=!1;setTimeoutProvider(n){this.#e=n}setTimeout(n,i){return this.#e.setTimeout(n,i)}clearTimeout(n){this.#e.clearTimeout(n)}setInterval(n,i){return this.#e.setInterval(n,i)}clearInterval(n){this.#e.clearInterval(n)}},ji=new Hb;function Qb(n){setTimeout(n,0)}var Hi=typeof window>"u"||"Deno"in globalThis;function Wt(){}function Yb(n,i){return typeof n=="function"?n(i):n}function lf(n){return typeof n=="number"&&n>=0&&n!==1/0}function $y(n,i){return Math.max(n+(i||0)-Date.now(),0)}function ci(n,i){return typeof n=="function"?n(i):n}function jn(n,i){return typeof n=="function"?n(i):n}function Xp(n,i){const{type:l="all",exact:s,fetchStatus:c,predicate:f,queryKey:d,stale:p}=n;if(d){if(s){if(i.queryHash!==Af(d,i.options))return!1}else if(!jl(i.queryKey,d))return!1}if(l!=="all"){const y=i.isActive();if(l==="active"&&!y||l==="inactive"&&y)return!1}return!(typeof p=="boolean"&&i.isStale()!==p||c&&c!==i.state.fetchStatus||f&&!f(i))}function Fp(n,i){const{exact:l,status:s,predicate:c,mutationKey:f}=n;if(f){if(!i.options.mutationKey)return!1;if(l){if(Qi(i.options.mutationKey)!==Qi(f))return!1}else if(!jl(i.options.mutationKey,f))return!1}return!(s&&i.state.status!==s||c&&!c(i))}function Af(n,i){return(i?.queryKeyHashFn||Qi)(n)}function Qi(n){return JSON.stringify(n,(i,l)=>sf(l)?Object.keys(l).sort().reduce((s,c)=>(s[c]=l[c],s),{}):l)}function jl(n,i){return n===i?!0:typeof n!=typeof i?!1:n&&i&&typeof n=="object"&&typeof i=="object"?Object.keys(i).every(l=>jl(n[l],i[l])):!1}var Gb=Object.prototype.hasOwnProperty;function Wy(n,i,l=0){if(n===i)return n;if(l>500)return i;const s=Zp(n)&&Zp(i);if(!s&&!(sf(n)&&sf(i)))return i;const f=(s?n:Object.keys(n)).length,d=s?i:Object.keys(i),p=d.length,y=s?new Array(p):{};let m=0;for(let b=0;b<p;b++){const g=s?b:d[b],T=n[g],M=i[g];if(T===M){y[g]=T,(s?b<f:Gb.call(n,g))&&m++;continue}if(T===null||M===null||typeof T!="object"||typeof M!="object"){y[g]=M;continue}const U=Wy(T,M,l+1);y[g]=U,U===T&&m++}return f===p&&m===f?n:y}function xo(n,i){if(!i||Object.keys(n).length!==Object.keys(i).length)return!1;for(const l in n)if(n[l]!==i[l])return!1;return!0}function Zp(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function sf(n){if(!Pp(n))return!1;const i=n.constructor;if(i===void 0)return!0;const l=i.prototype;return!(!Pp(l)||!l.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Pp(n){return Object.prototype.toString.call(n)==="[object Object]"}function Vb(n){return new Promise(i=>{ji.setTimeout(i,n)})}function of(n,i,l){return typeof l.structuralSharing=="function"?l.structuralSharing(n,i):l.structuralSharing!==!1?Wy(n,i):i}function Kb(n,i,l=0){const s=[...n,i];return l&&s.length>l?s.slice(1):s}function Xb(n,i,l=0){const s=[i,...n];return l&&s.length>l?s.slice(0,-1):s}var Cf=Symbol();function eg(n,i){return!n.queryFn&&i?.initialPromise?()=>i.initialPromise:!n.queryFn||n.queryFn===Cf?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Of(n,i){return typeof n=="function"?n(...i):!!n}function Fb(n,i,l){let s=!1,c;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(c??=i(),s||(s=!0,c.aborted?l():c.addEventListener("abort",l,{once:!0})),c)}),n}var Zb=class extends kr{#e;#t;#n;constructor(){super(),this.#n=n=>{if(!Hi&&window.addEventListener){const i=()=>n();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",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(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(n){this.#e!==n&&(this.#e=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(i=>{i(n)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Mf=new Zb;function uf(){let n,i;const l=new Promise((c,f)=>{n=c,i=f});l.status="pending",l.catch(()=>{});function s(c){Object.assign(l,c),delete l.resolve,delete l.reject}return l.resolve=c=>{s({status:"fulfilled",value:c}),n(c)},l.reject=c=>{s({status:"rejected",reason:c}),i(c)},l}var Pb=Qb;function Jb(){let n=[],i=0,l=p=>{p()},s=p=>{p()},c=Pb;const f=p=>{i?n.push(p):c(()=>{l(p)})},d=()=>{const p=n;n=[],p.length&&c(()=>{s(()=>{p.forEach(y=>{l(y)})})})};return{batch:p=>{let y;i++;try{y=p()}finally{i--,i||d()}return y},batchCalls:p=>(...y)=>{f(()=>{p(...y)})},schedule:f,setNotifyFunction:p=>{l=p},setBatchNotifyFunction:p=>{s=p},setScheduler:p=>{c=p}}}var kt=Jb(),Ib=class extends kr{#e=!0;#t;#n;constructor(){super(),this.#n=n=>{if(!Hi&&window.addEventListener){const i=()=>n(!0),l=()=>n(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",l,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",l)}}}}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(l=>{l(n)}))}isOnline(){return this.#e}},_o=new Ib;function $b(n){return Math.min(1e3*2**n,3e4)}function tg(n){return(n??"online")==="online"?_o.isOnline():!0}var cf=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function ng(n){let i=!1,l=0,s;const c=uf(),f=()=>c.status!=="pending",d=H=>{if(!f()){const K=new cf(H);T(K),n.onCancel?.(K)}},p=()=>{i=!0},y=()=>{i=!1},m=()=>Mf.isFocused()&&(n.networkMode==="always"||_o.isOnline())&&n.canRun(),b=()=>tg(n.networkMode)&&n.canRun(),g=H=>{f()||(s?.(),c.resolve(H))},T=H=>{f()||(s?.(),c.reject(H))},M=()=>new Promise(H=>{s=K=>{(f()||m())&&H(K)},n.onPause?.()}).then(()=>{s=void 0,f()||n.onContinue?.()}),U=()=>{if(f())return;let H;const K=l===0?n.initialPromise:void 0;try{H=K??n.fn()}catch(G){H=Promise.reject(G)}Promise.resolve(H).then(g).catch(G=>{if(f())return;const P=n.retry??(Hi?0:3),I=n.retryDelay??$b,ye=typeof I=="function"?I(l,G):I,de=P===!0||typeof P=="number"&&l<P||typeof P=="function"&&P(l,G);if(i||!de){T(G);return}l++,n.onFail?.(l,G),Vb(ye).then(()=>m()?void 0:M()).then(()=>{i?T(G):U()})})};return{promise:c,status:()=>c.status,cancel:d,continue:()=>(s?.(),c),cancelRetry:p,continueRetry:y,canStart:b,start:()=>(b()?U():M().then(U),c)}}var ag=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lf(this.gcTime)&&(this.#e=ji.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Hi?1/0:300*1e3))}clearGcTimeout(){this.#e&&(ji.clearTimeout(this.#e),this.#e=void 0)}},Wb=class extends ag{#e;#t;#n;#i;#a;#l;#s;constructor(n){super(),this.#s=!1,this.#l=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.#i=n.client,this.#n=this.#i.getQueryCache(),this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.#e=Ip(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.#l,...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Ip(this.options);i.data!==void 0&&(this.setState(Jp(i.data,i.dataUpdatedAt)),this.#e=i)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(n,i){const l=of(this.state.data,n,this.options);return this.#r({data:l,type:"success",dataUpdatedAt:i?.updatedAt,manual:i?.manual}),l}setState(n,i){this.#r({type:"setState",state:n,setStateOptions:i})}cancel(n){const i=this.#a?.promise;return this.#a?.cancel(n),i?i.then(Wt).catch(Wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(n=>jn(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Cf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>ci(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:!$y(this.state.dataUpdatedAt,n)}onFocus(){this.observers.find(i=>i.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(i=>i.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(i=>i!==n),this.observers.length||(this.#a&&(this.#s?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.#r({type:"invalidate"})}async fetch(n,i){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&i?.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 p=this.observers.find(y=>y.options.queryFn);p&&this.setOptions(p.options)}const l=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(this.#s=!0,l.signal)})},c=()=>{const p=eg(this.options,i),m=(()=>{const b={client:this.#i,queryKey:this.queryKey,meta:this.meta};return s(b),b})();return this.#s=!1,this.options.persister?this.options.persister(p,m,this):p(m)},d=(()=>{const p={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:c};return s(p),p})();this.options.behavior?.onFetch(d,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==d.fetchOptions?.meta)&&this.#r({type:"fetch",meta:d.fetchOptions?.meta}),this.#a=ng({initialPromise:i?.initialPromise,fn:d.fetchFn,onCancel:p=>{p instanceof cf&&p.revert&&this.setState({...this.#t,fetchStatus:"idle"}),l.abort()},onFail:(p,y)=>{this.#r({type:"failed",failureCount:p,error:y})},onPause:()=>{this.#r({type:"pause"})},onContinue:()=>{this.#r({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0});try{const p=await this.#a.start();if(p===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(p),this.#n.config.onSuccess?.(p,this),this.#n.config.onSettled?.(p,this.state.error,this),p}catch(p){if(p instanceof cf){if(p.silent)return this.#a.promise;if(p.revert){if(this.state.data===void 0)throw p;return this.state.data}}throw this.#r({type:"error",error:p}),this.#n.config.onError?.(p,this),this.#n.config.onSettled?.(this.state.data,p,this),p}finally{this.scheduleGc()}}#r(n){const i=l=>{switch(n.type){case"failed":return{...l,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...l,fetchStatus:"paused"};case"continue":return{...l,fetchStatus:"fetching"};case"fetch":return{...l,...ig(l.data,this.options),fetchMeta:n.meta??null};case"success":const s={...l,...Jp(n.data,n.dataUpdatedAt),dataUpdateCount:l.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=n.manual?s:void 0,s;case"error":const c=n.error;return{...l,error:c,errorUpdateCount:l.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:l.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...l,isInvalidated:!0};case"setState":return{...l,...n.state}}};this.state=i(this.state),kt.batch(()=>{this.observers.forEach(l=>{l.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:n})})}};function ig(n,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tg(i.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Jp(n,i){return{data:n,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ip(n){const i=typeof n.initialData=="function"?n.initialData():n.initialData,l=i!==void 0,s=l?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:l?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:l?"success":"pending",fetchStatus:"idle"}}var eS=class extends kr{constructor(n,i){super(),this.options=i,this.#e=n,this.#r=null,this.#s=uf(),this.bindMethods(),this.setOptions(i)}#e;#t=void 0;#n=void 0;#i=void 0;#a;#l;#s;#r;#p;#d;#h;#u;#c;#o;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),$p(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ff(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ff(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#E(),this.#t.removeObserver(this)}setOptions(n){const i=this.options,l=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 jn(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),i._defaulted&&!xo(this.options,i)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&Wp(this.#t,l,this.options,i)&&this.#f(),this.updateResult(),s&&(this.#t!==l||jn(this.options.enabled,this.#t)!==jn(i.enabled,this.#t)||ci(this.options.staleTime,this.#t)!==ci(i.staleTime,this.#t))&&this.#y();const c=this.#g();s&&(this.#t!==l||jn(this.options.enabled,this.#t)!==jn(i.enabled,this.#t)||c!==this.#o)&&this.#v(c)}getOptimisticResult(n){const i=this.#e.getQueryCache().build(this.#e,n),l=this.createResult(i,n);return nS(this,l)&&(this.#i=l,this.#l=this.options,this.#a=this.#t.state),l}getCurrentResult(){return this.#i}trackResult(n,i){return new Proxy(n,{get:(l,s)=>(this.trackProp(s),i?.(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(l,s))})}trackProp(n){this.#m.add(n)}getCurrentQuery(){return this.#t}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const i=this.#e.defaultQueryOptions(n),l=this.#e.getQueryCache().build(this.#e,i);return l.fetch().then(()=>this.createResult(l,i))}fetch(n){return this.#f({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#f(n){this.#w();let i=this.#t.fetch(this.options,n);return n?.throwOnError||(i=i.catch(Wt)),i}#y(){this.#S();const n=ci(this.options.staleTime,this.#t);if(Hi||this.#i.isStale||!lf(n))return;const l=$y(this.#i.dataUpdatedAt,n)+1;this.#u=ji.setTimeout(()=>{this.#i.isStale||this.updateResult()},l)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(n){this.#E(),this.#o=n,!(Hi||jn(this.options.enabled,this.#t)===!1||!lf(this.#o)||this.#o===0)&&(this.#c=ji.setInterval(()=>{(this.options.refetchIntervalInBackground||Mf.isFocused())&&this.#f()},this.#o))}#b(){this.#y(),this.#v(this.#g())}#S(){this.#u&&(ji.clearTimeout(this.#u),this.#u=void 0)}#E(){this.#c&&(ji.clearInterval(this.#c),this.#c=void 0)}createResult(n,i){const l=this.#t,s=this.options,c=this.#i,f=this.#a,d=this.#l,y=n!==l?n.state:this.#n,{state:m}=n;let b={...m},g=!1,T;if(i._optimisticResults){const Y=this.hasListeners(),se=!Y&&$p(n,i),Ce=Y&&Wp(n,l,i,s);(se||Ce)&&(b={...b,...ig(m.data,n.options)}),i._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:M,errorUpdatedAt:U,status:H}=b;T=b.data;let K=!1;if(i.placeholderData!==void 0&&T===void 0&&H==="pending"){let Y;c?.isPlaceholderData&&i.placeholderData===d?.placeholderData?(Y=c.data,K=!0):Y=typeof i.placeholderData=="function"?i.placeholderData(this.#h?.state.data,this.#h):i.placeholderData,Y!==void 0&&(H="success",T=of(c?.data,Y,i),g=!0)}if(i.select&&T!==void 0&&!K)if(c&&T===f?.data&&i.select===this.#p)T=this.#d;else try{this.#p=i.select,T=i.select(T),T=of(c?.data,T,i),this.#d=T,this.#r=null}catch(Y){this.#r=Y}this.#r&&(M=this.#r,T=this.#d,U=Date.now(),H="error");const G=b.fetchStatus==="fetching",P=H==="pending",I=H==="error",ye=P&&G,de=T!==void 0,A={status:H,fetchStatus:b.fetchStatus,isPending:P,isSuccess:H==="success",isError:I,isInitialLoading:ye,isLoading:ye,data:T,dataUpdatedAt:b.dataUpdatedAt,error:M,errorUpdatedAt:U,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:b.dataUpdateCount>0||b.errorUpdateCount>0,isFetchedAfterMount:b.dataUpdateCount>y.dataUpdateCount||b.errorUpdateCount>y.errorUpdateCount,isFetching:G,isRefetching:G&&!P,isLoadingError:I&&!de,isPaused:b.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:I&&de,isStale:Df(n,i),refetch:this.refetch,promise:this.#s,isEnabled:jn(i.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const Y=A.data!==void 0,se=A.status==="error"&&!Y,Ce=ke=>{se?ke.reject(A.error):Y&&ke.resolve(A.data)},Ae=()=>{const ke=this.#s=A.promise=uf();Ce(ke)},Re=this.#s;switch(Re.status){case"pending":n.queryHash===l.queryHash&&Ce(Re);break;case"fulfilled":(se||A.data!==Re.value)&&Ae();break;case"rejected":(!se||A.error!==Re.reason)&&Ae();break}}return A}updateResult(){const n=this.#i,i=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#l=this.options,this.#a.data!==void 0&&(this.#h=this.#t),xo(i,n))return;this.#i=i;const l=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,c=typeof s=="function"?s():s;if(c==="all"||!c&&!this.#m.size)return!0;const f=new Set(c??this.#m);return this.options.throwOnError&&f.add("error"),Object.keys(this.#i).some(d=>{const p=d;return this.#i[p]!==n[p]&&f.has(p)})};this.#T({listeners:l()})}#w(){const n=this.#e.getQueryCache().build(this.#e,this.options);if(n===this.#t)return;const i=this.#t;this.#t=n,this.#n=n.state,this.hasListeners()&&(i?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#T(n){kt.batch(()=>{n.listeners&&this.listeners.forEach(i=>{i(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function tS(n,i){return jn(i.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&i.retryOnMount===!1)}function $p(n,i){return tS(n,i)||n.state.data!==void 0&&ff(n,i,i.refetchOnMount)}function ff(n,i,l){if(jn(i.enabled,n)!==!1&&ci(i.staleTime,n)!=="static"){const s=typeof l=="function"?l(n):l;return s==="always"||s!==!1&&Df(n,i)}return!1}function Wp(n,i,l,s){return(n!==i||jn(s.enabled,n)===!1)&&(!l.suspense||n.state.status!=="error")&&Df(n,l)}function Df(n,i){return jn(i.enabled,n)!==!1&&n.isStaleByTime(ci(i.staleTime,n))}function nS(n,i){return!xo(n.getCurrentResult(),i)}function ey(n){return{onFetch:(i,l)=>{const s=i.options,c=i.fetchOptions?.meta?.fetchMore?.direction,f=i.state.data?.pages||[],d=i.state.data?.pageParams||[];let p={pages:[],pageParams:[]},y=0;const m=async()=>{let b=!1;const g=U=>{Fb(U,()=>i.signal,()=>b=!0)},T=eg(i.options,i.fetchOptions),M=async(U,H,K)=>{if(b)return Promise.reject();if(H==null&&U.pages.length)return Promise.resolve(U);const P=(()=>{const he={client:i.client,queryKey:i.queryKey,pageParam:H,direction:K?"backward":"forward",meta:i.options.meta};return g(he),he})(),I=await T(P),{maxPages:ye}=i.options,de=K?Xb:Kb;return{pages:de(U.pages,I,ye),pageParams:de(U.pageParams,H,ye)}};if(c&&f.length){const U=c==="backward",H=U?rg:df,K={pages:f,pageParams:d},G=H(s,K);p=await M(K,G,U)}else{const U=n??f.length;do{const H=y===0?d[0]??s.initialPageParam:df(s,p);if(y>0&&H==null)break;p=await M(p,H),y++}while(y<U)}return p};i.options.persister?i.fetchFn=()=>i.options.persister?.(m,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},l):i.fetchFn=m}}}function df(n,{pages:i,pageParams:l}){const s=i.length-1;return i.length>0?n.getNextPageParam(i[s],i,l[s],l):void 0}function rg(n,{pages:i,pageParams:l}){return i.length>0?n.getPreviousPageParam?.(i[0],i,l[0],l):void 0}function dx(n,i){return i?df(n,i)!=null:!1}function hx(n,i){return!i||!n.getPreviousPageParam?!1:rg(n,i)!=null}var aS=class extends ag{#e;#t;#n;#i;constructor(n){super(),this.#e=n.client,this.mutationId=n.mutationId,this.#n=n.mutationCache,this.#t=[],this.state=n.state||lg(),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(i=>i!==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.#i?.continue()??this.execute(this.state.variables)}async execute(n){const i=()=>{this.#a({type:"continue"})},l={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=ng({fn:()=>this.options.mutationFn?this.options.mutationFn(n,l):Promise.reject(new Error("No mutationFn found")),onFail:(f,d)=>{this.#a({type:"failed",failureCount:f,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const s=this.state.status==="pending",c=!this.#i.canStart();try{if(s)i();else{this.#a({type:"pending",variables:n,isPaused:c}),this.#n.config.onMutate&&await this.#n.config.onMutate(n,this,l);const d=await this.options.onMutate?.(n,l);d!==this.state.context&&this.#a({type:"pending",context:d,variables:n,isPaused:c})}const f=await this.#i.start();return await this.#n.config.onSuccess?.(f,n,this.state.context,this,l),await this.options.onSuccess?.(f,n,this.state.context,l),await this.#n.config.onSettled?.(f,null,this.state.variables,this.state.context,this,l),await this.options.onSettled?.(f,null,n,this.state.context,l),this.#a({type:"success",data:f}),f}catch(f){try{await this.#n.config.onError?.(f,n,this.state.context,this,l)}catch(d){Promise.reject(d)}try{await this.options.onError?.(f,n,this.state.context,l)}catch(d){Promise.reject(d)}try{await this.#n.config.onSettled?.(void 0,f,this.state.variables,this.state.context,this,l)}catch(d){Promise.reject(d)}try{await this.options.onSettled?.(void 0,f,n,this.state.context,l)}catch(d){Promise.reject(d)}throw this.#a({type:"error",error:f}),f}finally{this.#n.runNext(this)}}#a(n){const i=l=>{switch(n.type){case"failed":return{...l,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...l,isPaused:!0};case"continue":return{...l,isPaused:!1};case"pending":return{...l,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{...l,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...l,data:void 0,error:n.error,failureCount:l.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=i(this.state),kt.batch(()=>{this.#t.forEach(l=>{l.onMutationUpdate(n)}),this.#n.notify({mutation:this,type:"updated",action:n})})}};function lg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var iS=class extends kr{constructor(n={}){super(),this.config=n,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(n,i,l){const s=new aS({client:n,mutationCache:this,mutationId:++this.#n,options:n.defaultMutationOptions(i),state:l});return this.add(s),s}add(n){this.#e.add(n);const i=io(n);if(typeof i=="string"){const l=this.#t.get(i);l?l.push(n):this.#t.set(i,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#e.delete(n)){const i=io(n);if(typeof i=="string"){const l=this.#t.get(i);if(l)if(l.length>1){const s=l.indexOf(n);s!==-1&&l.splice(s,1)}else l[0]===n&&this.#t.delete(i)}}this.notify({type:"removed",mutation:n})}canRun(n){const i=io(n);if(typeof i=="string"){const s=this.#t.get(i)?.find(c=>c.state.status==="pending");return!s||s===n}else return!0}runNext(n){const i=io(n);return typeof i=="string"?this.#t.get(i)?.find(s=>s!==n&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){kt.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 i={exact:!0,...n};return this.getAll().find(l=>Fp(i,l))}findAll(n={}){return this.getAll().filter(i=>Fp(n,i))}notify(n){kt.batch(()=>{this.listeners.forEach(i=>{i(n)})})}resumePausedMutations(){const n=this.getAll().filter(i=>i.state.isPaused);return kt.batch(()=>Promise.all(n.map(i=>i.continue().catch(Wt))))}};function io(n){return n.options.scope?.id}var rS=class extends kr{#e;#t=void 0;#n;#i;constructor(i,l){super(),this.#e=i,this.setOptions(l),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){const l=this.options;this.options=this.#e.defaultMutationOptions(i),xo(this.options,l)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),l?.mutationKey&&this.options.mutationKey&&Qi(l.mutationKey)!==Qi(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(i){this.#a(),this.#l(i)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#l()}mutate(i,l){return this.#i=l,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(i)}#a(){const i=this.#n?.state??lg();this.#t={...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset}}#l(i){kt.batch(()=>{if(this.#i&&this.hasListeners()){const l=this.#t.variables,s=this.#t.context,c={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(i?.type==="success"){try{this.#i.onSuccess?.(i.data,l,s,c)}catch(f){Promise.reject(f)}try{this.#i.onSettled?.(i.data,null,l,s,c)}catch(f){Promise.reject(f)}}else if(i?.type==="error"){try{this.#i.onError?.(i.error,l,s,c)}catch(f){Promise.reject(f)}try{this.#i.onSettled?.(void 0,i.error,l,s,c)}catch(f){Promise.reject(f)}}}this.listeners.forEach(l=>{l(this.#t)})})}},lS=class extends kr{constructor(n={}){super(),this.config=n,this.#e=new Map}#e;build(n,i,l){const s=i.queryKey,c=i.queryHash??Af(s,i);let f=this.get(c);return f||(f=new Wb({client:n,queryKey:s,queryHash:c,options:n.defaultQueryOptions(i),state:l,defaultOptions:n.getQueryDefaults(s)}),this.add(f)),f}add(n){this.#e.has(n.queryHash)||(this.#e.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const i=this.#e.get(n.queryHash);i&&(n.destroy(),i===n&&this.#e.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){kt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#e.get(n)}getAll(){return[...this.#e.values()]}find(n){const i={exact:!0,...n};return this.getAll().find(l=>Xp(i,l))}findAll(n={}){const i=this.getAll();return Object.keys(n).length>0?i.filter(l=>Xp(n,l)):i}notify(n){kt.batch(()=>{this.listeners.forEach(i=>{i(n)})})}onFocus(){kt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){kt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},sS=class{#e;#t;#n;#i;#a;#l;#s;#r;constructor(n={}){this.#e=n.queryCache||new lS,this.#t=n.mutationCache||new iS,this.#n=n.defaultOptions||{},this.#i=new Map,this.#a=new Map,this.#l=0}mount(){this.#l++,this.#l===1&&(this.#s=Mf.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#r=_o.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#l--,this.#l===0&&(this.#s?.(),this.#s=void 0,this.#r?.(),this.#r=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 i=this.defaultQueryOptions({queryKey:n});return this.#e.get(i.queryHash)?.state.data}ensureQueryData(n){const i=this.defaultQueryOptions(n),l=this.#e.build(this,i),s=l.state.data;return s===void 0?this.fetchQuery(n):(n.revalidateIfStale&&l.isStaleByTime(ci(i.staleTime,l))&&this.prefetchQuery(i),Promise.resolve(s))}getQueriesData(n){return this.#e.findAll(n).map(({queryKey:i,state:l})=>{const s=l.data;return[i,s]})}setQueryData(n,i,l){const s=this.defaultQueryOptions({queryKey:n}),f=this.#e.get(s.queryHash)?.state.data,d=Yb(i,f);if(d!==void 0)return this.#e.build(this,s).setData(d,{...l,manual:!0})}setQueriesData(n,i,l){return kt.batch(()=>this.#e.findAll(n).map(({queryKey:s})=>[s,this.setQueryData(s,i,l)]))}getQueryState(n){const i=this.defaultQueryOptions({queryKey:n});return this.#e.get(i.queryHash)?.state}removeQueries(n){const i=this.#e;kt.batch(()=>{i.findAll(n).forEach(l=>{i.remove(l)})})}resetQueries(n,i){const l=this.#e;return kt.batch(()=>(l.findAll(n).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...n},i)))}cancelQueries(n,i={}){const l={revert:!0,...i},s=kt.batch(()=>this.#e.findAll(n).map(c=>c.cancel(l)));return Promise.all(s).then(Wt).catch(Wt)}invalidateQueries(n,i={}){return kt.batch(()=>(this.#e.findAll(n).forEach(l=>{l.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},i)))}refetchQueries(n,i={}){const l={...i,cancelRefetch:i.cancelRefetch??!0},s=kt.batch(()=>this.#e.findAll(n).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let f=c.fetch(void 0,l);return l.throwOnError||(f=f.catch(Wt)),c.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(s).then(Wt)}fetchQuery(n){const i=this.defaultQueryOptions(n);i.retry===void 0&&(i.retry=!1);const l=this.#e.build(this,i);return l.isStaleByTime(ci(i.staleTime,l))?l.fetch(i):Promise.resolve(l.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Wt).catch(Wt)}fetchInfiniteQuery(n){return n.behavior=ey(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Wt).catch(Wt)}ensureInfiniteQueryData(n){return n.behavior=ey(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return _o.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,i){this.#i.set(Qi(n),{queryKey:n,defaultOptions:i})}getQueryDefaults(n){const i=[...this.#i.values()],l={};return i.forEach(s=>{jl(n,s.queryKey)&&Object.assign(l,s.defaultOptions)}),l}setMutationDefaults(n,i){this.#a.set(Qi(n),{mutationKey:n,defaultOptions:i})}getMutationDefaults(n){const i=[...this.#a.values()],l={};return i.forEach(s=>{jl(n,s.mutationKey)&&Object.assign(l,s.defaultOptions)}),l}defaultQueryOptions(n){if(n._defaulted)return n;const i={...this.#n.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return i.queryHash||(i.queryHash=Af(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===Cf&&(i.enabled=!1),i}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()}},sg=x.createContext(void 0),Ut=n=>{const i=x.useContext(sg);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},oS=({client:n,children:i})=>(x.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),be.jsx(sg.Provider,{value:n,children:i})),og=x.createContext(!1),uS=()=>x.useContext(og);og.Provider;function cS(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var fS=x.createContext(cS()),dS=()=>x.useContext(fS),hS=(n,i,l)=>{const s=l?.state.error&&typeof n.throwOnError=="function"?Of(n.throwOnError,[l.state.error,l]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||s)&&(i.isReset()||(n.retryOnMount=!1))},mS=n=>{x.useEffect(()=>{n.clearReset()},[n])},pS=({result:n,errorResetBoundary:i,throwOnError:l,query:s,suspense:c})=>n.isError&&!i.isReset()&&!n.isFetching&&s&&(c&&n.data===void 0||Of(l,[n.error,s])),yS=n=>{if(n.suspense){const l=c=>c==="static"?c:Math.max(c??1e3,1e3),s=n.staleTime;n.staleTime=typeof s=="function"?(...c)=>l(s(...c)):l(s),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},gS=(n,i)=>n.isLoading&&n.isFetching&&!i,vS=(n,i)=>n?.suspense&&i.isPending,ty=(n,i,l)=>i.fetchOptimistic(n).catch(()=>{l.clearReset()});function bS(n,i,l){const s=uS(),c=dS(),f=Ut(),d=f.defaultQueryOptions(n);f.getDefaultOptions().queries?._experimental_beforeQuery?.(d);const p=f.getQueryCache().get(d.queryHash);d._optimisticResults=s?"isRestoring":"optimistic",yS(d),hS(d,c,p),mS(c);const y=!f.getQueryCache().get(d.queryHash),[m]=x.useState(()=>new i(f,d)),b=m.getOptimisticResult(d),g=!s&&n.subscribed!==!1;if(x.useSyncExternalStore(x.useCallback(T=>{const M=g?m.subscribe(kt.batchCalls(T)):Wt;return m.updateResult(),M},[m,g]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),x.useEffect(()=>{m.setOptions(d)},[d,m]),vS(d,b))throw ty(d,m,c);if(pS({result:b,errorResetBoundary:c,throwOnError:d.throwOnError,query:p,suspense:d.suspense}))throw b.error;return f.getDefaultOptions().queries?._experimental_afterQuery?.(d,b),d.experimental_prefetchInRender&&!Hi&&gS(b,s)&&(y?ty(d,m,c):p?.promise)?.catch(Wt).finally(()=>{m.updateResult()}),d.notifyOnChangeProps?b:m.trackResult(b)}function Yi(n,i){return bS(n,eS)}function en(n,i){const l=Ut(),[s]=x.useState(()=>new rS(l,n));x.useEffect(()=>{s.setOptions(n)},[s,n]);const c=x.useSyncExternalStore(x.useCallback(d=>s.subscribe(kt.batchCalls(d)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),f=x.useCallback((d,p)=>{s.mutate(d,p).catch(Wt)},[s]);if(c.error&&Of(s.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:f,mutateAsync:c.mutate}}var ug=Iy();const SS=Jy(ug);function ES(n){if(typeof document>"u")return;let i=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css",i.appendChild(l),l.styleSheet?l.styleSheet.cssText=n:l.appendChild(document.createTextNode(n))}const wS=n=>{switch(n){case"success":return xS;case"info":return AS;case"warning":return _S;case"error":return CS;default:return null}},TS=Array(12).fill(0),RS=({visible:n,className:i})=>W.createElement("div",{className:["sonner-loading-wrapper",i].filter(Boolean).join(" "),"data-visible":n},W.createElement("div",{className:"sonner-spinner"},TS.map((l,s)=>W.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),xS=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.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"})),_S=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},W.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"})),AS=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.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"})),CS=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.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"})),OS=W.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"},W.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),W.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),MS=()=>{const[n,i]=W.useState(document.hidden);return W.useEffect(()=>{const l=()=>{i(document.hidden)};return document.addEventListener("visibilitychange",l),()=>window.removeEventListener("visibilitychange",l)},[]),n};let hf=1;class DS{constructor(){this.subscribe=i=>(this.subscribers.push(i),()=>{const l=this.subscribers.indexOf(i);this.subscribers.splice(l,1)}),this.publish=i=>{this.subscribers.forEach(l=>l(i))},this.addToast=i=>{this.publish(i),this.toasts=[...this.toasts,i]},this.create=i=>{var l;const{message:s,...c}=i,f=typeof i?.id=="number"||((l=i.id)==null?void 0:l.length)>0?i.id:hf++,d=this.toasts.find(y=>y.id===f),p=i.dismissible===void 0?!0:i.dismissible;return this.dismissedToasts.has(f)&&this.dismissedToasts.delete(f),d?this.toasts=this.toasts.map(y=>y.id===f?(this.publish({...y,...i,id:f,title:s}),{...y,...i,id:f,dismissible:p,title:s}):y):this.addToast({title:s,...c,dismissible:p,id:f}),f},this.dismiss=i=>(i?(this.dismissedToasts.add(i),requestAnimationFrame(()=>this.subscribers.forEach(l=>l({id:i,dismiss:!0})))):this.toasts.forEach(l=>{this.subscribers.forEach(s=>s({id:l.id,dismiss:!0}))}),i),this.message=(i,l)=>this.create({...l,message:i}),this.error=(i,l)=>this.create({...l,message:i,type:"error"}),this.success=(i,l)=>this.create({...l,type:"success",message:i}),this.info=(i,l)=>this.create({...l,type:"info",message:i}),this.warning=(i,l)=>this.create({...l,type:"warning",message:i}),this.loading=(i,l)=>this.create({...l,type:"loading",message:i}),this.promise=(i,l)=>{if(!l)return;let s;l.loading!==void 0&&(s=this.create({...l,promise:i,type:"loading",message:l.loading,description:typeof l.description!="function"?l.description:void 0}));const c=Promise.resolve(i instanceof Function?i():i);let f=s!==void 0,d;const p=c.then(async m=>{if(d=["resolve",m],W.isValidElement(m))f=!1,this.create({id:s,type:"default",message:m});else if(NS(m)&&!m.ok){f=!1;const g=typeof l.error=="function"?await l.error(`HTTP error! status: ${m.status}`):l.error,T=typeof l.description=="function"?await l.description(`HTTP error! status: ${m.status}`):l.description,U=typeof g=="object"&&!W.isValidElement(g)?g:{message:g};this.create({id:s,type:"error",description:T,...U})}else if(m instanceof Error){f=!1;const g=typeof l.error=="function"?await l.error(m):l.error,T=typeof l.description=="function"?await l.description(m):l.description,U=typeof g=="object"&&!W.isValidElement(g)?g:{message:g};this.create({id:s,type:"error",description:T,...U})}else if(l.success!==void 0){f=!1;const g=typeof l.success=="function"?await l.success(m):l.success,T=typeof l.description=="function"?await l.description(m):l.description,U=typeof g=="object"&&!W.isValidElement(g)?g:{message:g};this.create({id:s,type:"success",description:T,...U})}}).catch(async m=>{if(d=["reject",m],l.error!==void 0){f=!1;const b=typeof l.error=="function"?await l.error(m):l.error,g=typeof l.description=="function"?await l.description(m):l.description,M=typeof b=="object"&&!W.isValidElement(b)?b:{message:b};this.create({id:s,type:"error",description:g,...M})}}).finally(()=>{f&&(this.dismiss(s),s=void 0),l.finally==null||l.finally.call(l)}),y=()=>new Promise((m,b)=>p.then(()=>d[0]==="reject"?b(d[1]):m(d[1])).catch(b));return typeof s!="string"&&typeof s!="number"?{unwrap:y}:Object.assign(s,{unwrap:y})},this.custom=(i,l)=>{const s=l?.id||hf++;return this.create({jsx:i(s),id:s,...l}),s},this.getActiveToasts=()=>this.toasts.filter(i=>!this.dismissedToasts.has(i.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const dn=new DS,zS=(n,i)=>{const l=i?.id||hf++;return dn.addToast({title:n,...i,id:l}),l},NS=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",kS=zS,US=()=>dn.toasts,LS=()=>dn.getActiveToasts(),BS=Object.assign(kS,{success:dn.success,info:dn.info,warning:dn.warning,error:dn.error,custom:dn.custom,message:dn.message,promise:dn.promise,dismiss:dn.dismiss,loading:dn.loading},{getHistory:US,getToasts:LS});ES("[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 ro(n){return n.label!==void 0}const jS=3,qS="24px",HS="16px",ny=4e3,QS=356,YS=14,GS=45,VS=200;function ra(...n){return n.filter(Boolean).join(" ")}function KS(n){const[i,l]=n.split("-"),s=[];return i&&s.push(i),l&&s.push(l),s}const XS=n=>{var i,l,s,c,f,d,p,y,m;const{invert:b,toast:g,unstyled:T,interacting:M,setHeights:U,visibleToasts:H,heights:K,index:G,toasts:P,expanded:I,removeToast:ye,defaultRichColors:de,closeButton:he,style:A,cancelButtonStyle:Y,actionButtonStyle:se,className:Ce="",descriptionClassName:Ae="",duration:Re,position:ke,gap:Ue,expandByDefault:Ee,classNames:C,icons:F,closeButtonAriaLabel:j="Close toast"}=n,[pe,ge]=W.useState(null),[w,q]=W.useState(null),[B,Z]=W.useState(!1),[ee,oe]=W.useState(!1),[ue,xe]=W.useState(!1),[Qe,jt]=W.useState(!1),[Jt,Pe]=W.useState(!1),[Yn,tn]=W.useState(0),[hi,nn]=W.useState(0),ca=W.useRef(g.duration||Re||ny),mi=W.useRef(null),Xt=W.useRef(null),pi=G===0,yi=G+1<=H,qt=g.type,Wn=g.dismissible!==!1,ht=g.className||"",fa=g.descriptionClassName||"",ea=W.useMemo(()=>K.findIndex(_e=>_e.toastId===g.id)||0,[K,g.id]),La=W.useMemo(()=>{var _e;return(_e=g.closeButton)!=null?_e:he},[g.closeButton,he]),Ht=W.useMemo(()=>g.duration||Re||ny,[g.duration,Re]),It=W.useRef(0),Rn=W.useRef(0),Xi=W.useRef(0),xn=W.useRef(null),[da,ot]=ke.split("-"),an=W.useMemo(()=>K.reduce((_e,lt,St)=>St>=ea?_e:_e+lt.height,0),[K,ea]),Dt=MS(),Fi=g.invert||b,gi=qt==="loading";Rn.current=W.useMemo(()=>ea*Ue+an,[ea,an]),W.useEffect(()=>{ca.current=Ht},[Ht]),W.useEffect(()=>{Z(!0)},[]),W.useEffect(()=>{const _e=Xt.current;if(_e){const lt=_e.getBoundingClientRect().height;return nn(lt),U(St=>[{toastId:g.id,height:lt,position:g.position},...St]),()=>U(St=>St.filter(Et=>Et.toastId!==g.id))}},[U,g.id]),W.useLayoutEffect(()=>{if(!B)return;const _e=Xt.current,lt=_e.style.height;_e.style.height="auto";const St=_e.getBoundingClientRect().height;_e.style.height=lt,nn(St),U(Et=>Et.find(st=>st.toastId===g.id)?Et.map(st=>st.toastId===g.id?{...st,height:St}:st):[{toastId:g.id,height:St,position:g.position},...Et])},[B,g.title,g.description,U,g.id,g.jsx,g.action,g.cancel]);const hn=W.useCallback(()=>{oe(!0),tn(Rn.current),U(_e=>_e.filter(lt=>lt.toastId!==g.id)),setTimeout(()=>{ye(g)},VS)},[g,ye,U,Rn]);W.useEffect(()=>{if(g.promise&&qt==="loading"||g.duration===1/0||g.type==="loading")return;let _e;return I||M||Dt?(()=>{if(Xi.current<It.current){const Et=new Date().getTime()-It.current;ca.current=ca.current-Et}Xi.current=new Date().getTime()})():ca.current!==1/0&&(It.current=new Date().getTime(),_e=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),hn()},ca.current)),()=>clearTimeout(_e)},[I,M,g,qt,Dt,hn]),W.useEffect(()=>{g.delete&&(hn(),g.onDismiss==null||g.onDismiss.call(g,g))},[hn,g.delete]);function Gn(){var _e;if(F?.loading){var lt;return W.createElement("div",{className:ra(C?.loader,g==null||(lt=g.classNames)==null?void 0:lt.loader,"sonner-loader"),"data-visible":qt==="loading"},F.loading)}return W.createElement(RS,{className:ra(C?.loader,g==null||(_e=g.classNames)==null?void 0:_e.loader),visible:qt==="loading"})}const ha=g.icon||F?.[qt]||wS(qt);var Vn,_n;return W.createElement("li",{tabIndex:0,ref:Xt,className:ra(Ce,ht,C?.toast,g==null||(i=g.classNames)==null?void 0:i.toast,C?.default,C?.[qt],g==null||(l=g.classNames)==null?void 0:l[qt]),"data-sonner-toast":"","data-rich-colors":(Vn=g.richColors)!=null?Vn:de,"data-styled":!(g.jsx||g.unstyled||T),"data-mounted":B,"data-promise":!!g.promise,"data-swiped":Jt,"data-removed":ee,"data-visible":yi,"data-y-position":da,"data-x-position":ot,"data-index":G,"data-front":pi,"data-swiping":ue,"data-dismissible":Wn,"data-type":qt,"data-invert":Fi,"data-swipe-out":Qe,"data-swipe-direction":w,"data-expanded":!!(I||Ee&&B),"data-testid":g.testId,style:{"--index":G,"--toasts-before":G,"--z-index":P.length-G,"--offset":`${ee?Yn:Rn.current}px`,"--initial-height":Ee?"auto":`${hi}px`,...A,...g.style},onDragEnd:()=>{xe(!1),ge(null),xn.current=null},onPointerDown:_e=>{_e.button!==2&&(gi||!Wn||(mi.current=new Date,tn(Rn.current),_e.target.setPointerCapture(_e.pointerId),_e.target.tagName!=="BUTTON"&&(xe(!0),xn.current={x:_e.clientX,y:_e.clientY})))},onPointerUp:()=>{var _e,lt,St;if(Qe||!Wn)return;xn.current=null;const Et=Number(((_e=Xt.current)==null?void 0:_e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),mn=Number(((lt=Xt.current)==null?void 0:lt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),st=new Date().getTime()-((St=mi.current)==null?void 0:St.getTime()),Ft=pe==="x"?Et:mn,ma=Math.abs(Ft)/st;if(Math.abs(Ft)>=GS||ma>.11){tn(Rn.current),g.onDismiss==null||g.onDismiss.call(g,g),q(pe==="x"?Et>0?"right":"left":mn>0?"down":"up"),hn(),jt(!0);return}else{var S,_;(S=Xt.current)==null||S.style.setProperty("--swipe-amount-x","0px"),(_=Xt.current)==null||_.style.setProperty("--swipe-amount-y","0px")}Pe(!1),xe(!1),ge(null)},onPointerMove:_e=>{var lt,St,Et;if(!xn.current||!Wn||((lt=window.getSelection())==null?void 0:lt.toString().length)>0)return;const st=_e.clientY-xn.current.y,Ft=_e.clientX-xn.current.x;var ma;const S=(ma=n.swipeDirections)!=null?ma:KS(ke);!pe&&(Math.abs(Ft)>1||Math.abs(st)>1)&&ge(Math.abs(Ft)>Math.abs(st)?"x":"y");let _={x:0,y:0};const k=J=>1/(1.5+Math.abs(J)/20);if(pe==="y"){if(S.includes("top")||S.includes("bottom"))if(S.includes("top")&&st<0||S.includes("bottom")&&st>0)_.y=st;else{const J=st*k(st);_.y=Math.abs(J)<Math.abs(st)?J:st}}else if(pe==="x"&&(S.includes("left")||S.includes("right")))if(S.includes("left")&&Ft<0||S.includes("right")&&Ft>0)_.x=Ft;else{const J=Ft*k(Ft);_.x=Math.abs(J)<Math.abs(Ft)?J:Ft}(Math.abs(_.x)>0||Math.abs(_.y)>0)&&Pe(!0),(St=Xt.current)==null||St.style.setProperty("--swipe-amount-x",`${_.x}px`),(Et=Xt.current)==null||Et.style.setProperty("--swipe-amount-y",`${_.y}px`)}},La&&!g.jsx&&qt!=="loading"?W.createElement("button",{"aria-label":j,"data-disabled":gi,"data-close-button":!0,onClick:gi||!Wn?()=>{}:()=>{hn(),g.onDismiss==null||g.onDismiss.call(g,g)},className:ra(C?.closeButton,g==null||(s=g.classNames)==null?void 0:s.closeButton)},(_n=F?.close)!=null?_n:OS):null,(qt||g.icon||g.promise)&&g.icon!==null&&(F?.[qt]!==null||g.icon)?W.createElement("div",{"data-icon":"",className:ra(C?.icon,g==null||(c=g.classNames)==null?void 0:c.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Gn():null,g.type!=="loading"?ha:null):null,W.createElement("div",{"data-content":"",className:ra(C?.content,g==null||(f=g.classNames)==null?void 0:f.content)},W.createElement("div",{"data-title":"",className:ra(C?.title,g==null||(d=g.classNames)==null?void 0:d.title)},g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title),g.description?W.createElement("div",{"data-description":"",className:ra(Ae,fa,C?.description,g==null||(p=g.classNames)==null?void 0:p.description)},typeof g.description=="function"?g.description():g.description):null),W.isValidElement(g.cancel)?g.cancel:g.cancel&&ro(g.cancel)?W.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||Y,onClick:_e=>{ro(g.cancel)&&Wn&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,_e),hn())},className:ra(C?.cancelButton,g==null||(y=g.classNames)==null?void 0:y.cancelButton)},g.cancel.label):null,W.isValidElement(g.action)?g.action:g.action&&ro(g.action)?W.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||se,onClick:_e=>{ro(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,_e),!_e.defaultPrevented&&hn())},className:ra(C?.actionButton,g==null||(m=g.classNames)==null?void 0:m.actionButton)},g.action.label):null)};function ay(){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 FS(n,i){const l={};return[n,i].forEach((s,c)=>{const f=c===1,d=f?"--mobile-offset":"--offset",p=f?HS:qS;function y(m){["top","right","bottom","left"].forEach(b=>{l[`${d}-${b}`]=typeof m=="number"?`${m}px`:m})}typeof s=="number"||typeof s=="string"?y(s):typeof s=="object"?["top","right","bottom","left"].forEach(m=>{s[m]===void 0?l[`${d}-${m}`]=p:l[`${d}-${m}`]=typeof s[m]=="number"?`${s[m]}px`:s[m]}):y(p)}),l}const ZS=W.forwardRef(function(i,l){const{id:s,invert:c,position:f="bottom-right",hotkey:d=["altKey","KeyT"],expand:p,closeButton:y,className:m,offset:b,mobileOffset:g,theme:T="light",richColors:M,duration:U,style:H,visibleToasts:K=jS,toastOptions:G,dir:P=ay(),gap:I=YS,icons:ye,containerAriaLabel:de="Notifications"}=i,[he,A]=W.useState([]),Y=W.useMemo(()=>s?he.filter(B=>B.toasterId===s):he.filter(B=>!B.toasterId),[he,s]),se=W.useMemo(()=>Array.from(new Set([f].concat(Y.filter(B=>B.position).map(B=>B.position)))),[Y,f]),[Ce,Ae]=W.useState([]),[Re,ke]=W.useState(!1),[Ue,Ee]=W.useState(!1),[C,F]=W.useState(T!=="system"?T:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),j=W.useRef(null),pe=d.join("+").replace(/Key/g,"").replace(/Digit/g,""),ge=W.useRef(null),w=W.useRef(!1),q=W.useCallback(B=>{A(Z=>{var ee;return(ee=Z.find(oe=>oe.id===B.id))!=null&&ee.delete||dn.dismiss(B.id),Z.filter(({id:oe})=>oe!==B.id)})},[]);return W.useEffect(()=>dn.subscribe(B=>{if(B.dismiss){requestAnimationFrame(()=>{A(Z=>Z.map(ee=>ee.id===B.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{SS.flushSync(()=>{A(Z=>{const ee=Z.findIndex(oe=>oe.id===B.id);return ee!==-1?[...Z.slice(0,ee),{...Z[ee],...B},...Z.slice(ee+1)]:[B,...Z]})})})}),[he]),W.useEffect(()=>{if(T!=="system"){F(T);return}if(T==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?F("dark"):F("light")),typeof window>"u")return;const B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:Z})=>{F(Z?"dark":"light")})}catch{B.addListener(({matches:ee})=>{try{F(ee?"dark":"light")}catch(oe){console.error(oe)}})}},[T]),W.useEffect(()=>{he.length<=1&&ke(!1)},[he]),W.useEffect(()=>{const B=Z=>{var ee;if(d.every(xe=>Z[xe]||Z.code===xe)){var ue;ke(!0),(ue=j.current)==null||ue.focus()}Z.code==="Escape"&&(document.activeElement===j.current||(ee=j.current)!=null&&ee.contains(document.activeElement))&&ke(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[d]),W.useEffect(()=>{if(j.current)return()=>{ge.current&&(ge.current.focus({preventScroll:!0}),ge.current=null,w.current=!1)}},[j.current]),W.createElement("section",{ref:l,"aria-label":`${de} ${pe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},se.map((B,Z)=>{var ee;const[oe,ue]=B.split("-");return Y.length?W.createElement("ol",{key:B,dir:P==="auto"?ay():P,tabIndex:-1,ref:j,className:m,"data-sonner-toaster":!0,"data-sonner-theme":C,"data-y-position":oe,"data-x-position":ue,style:{"--front-toast-height":`${((ee=Ce[0])==null?void 0:ee.height)||0}px`,"--width":`${QS}px`,"--gap":`${I}px`,...H,...FS(b,g)},onBlur:xe=>{w.current&&!xe.currentTarget.contains(xe.relatedTarget)&&(w.current=!1,ge.current&&(ge.current.focus({preventScroll:!0}),ge.current=null))},onFocus:xe=>{xe.target instanceof HTMLElement&&xe.target.dataset.dismissible==="false"||w.current||(w.current=!0,ge.current=xe.relatedTarget)},onMouseEnter:()=>ke(!0),onMouseMove:()=>ke(!0),onMouseLeave:()=>{Ue||ke(!1)},onDragEnd:()=>ke(!1),onPointerDown:xe=>{xe.target instanceof HTMLElement&&xe.target.dataset.dismissible==="false"||Ee(!0)},onPointerUp:()=>Ee(!1)},Y.filter(xe=>!xe.position&&Z===0||xe.position===B).map((xe,Qe)=>{var jt,Jt;return W.createElement(XS,{key:xe.id,icons:ye,index:Qe,toast:xe,defaultRichColors:M,duration:(jt=G?.duration)!=null?jt:U,className:G?.className,descriptionClassName:G?.descriptionClassName,invert:c,visibleToasts:K,closeButton:(Jt=G?.closeButton)!=null?Jt:y,interacting:Ue,position:B,style:G?.style,unstyled:G?.unstyled,classNames:G?.classNames,cancelButtonStyle:G?.cancelButtonStyle,actionButtonStyle:G?.actionButtonStyle,closeButtonAriaLabel:G?.closeButtonAriaLabel,removeToast:q,toasts:Y.filter(Pe=>Pe.position==xe.position),heights:Ce.filter(Pe=>Pe.position==xe.position),setHeights:Ae,expandByDefault:p,gap:I,expanded:Re,swipeDirections:i.swipeDirections})})):null}))}),PS=new sS({defaultOptions:{queries:{staleTime:1e3*60,retry:1}}}),JS="modulepreload",IS=function(n){return"/"+n},iy={},Ua=function(i,l,s){let c=Promise.resolve();if(l&&l.length>0){let y=function(m){return Promise.all(m.map(b=>Promise.resolve(b).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),p=d?.nonce||d?.getAttribute("nonce");c=y(l.map(m=>{if(m=IS(m),m in iy)return;iy[m]=!0;const b=m.endsWith(".css"),g=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${g}`))return;const T=document.createElement("link");if(T.rel=b?"stylesheet":JS,b||(T.as="script"),T.crossOrigin="",T.href=m,p&&T.setAttribute("nonce",p),document.head.appendChild(T),b)return new Promise((M,U)=>{T.addEventListener("load",M),T.addEventListener("error",()=>U(new Error(`Unable to preload CSS for ${m}`)))})}))}function f(d){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=d,window.dispatchEvent(p),!p.defaultPrevented)throw d}return c.then(d=>{for(const p of d||[])p.status==="rejected"&&f(p.reason);return i().catch(f)})};var cg=n=>{throw TypeError(n)},$S=(n,i,l)=>i.has(n)||cg("Cannot "+l),Xc=(n,i,l)=>($S(n,i,"read from private field"),l?l.call(n):i.get(n)),WS=(n,i,l)=>i.has(n)?cg("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(n):i.set(n,l),ry="popstate";function e1(n={}){function i(s,c){let{pathname:f,search:d,hash:p}=s.location;return ql("",{pathname:f,search:d,hash:p},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function l(s,c){return typeof c=="string"?c:oa(c)}return n1(i,l,null,n)}function Le(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function Mt(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function t1(){return Math.random().toString(36).substring(2,10)}function ly(n,i){return{usr:n.state,key:n.key,idx:i}}function ql(n,i,l=null,s){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof i=="string"?di(i):i,state:l,key:i&&i.key||s||t1()}}function oa({pathname:n="/",search:i="",hash:l=""}){return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function di(n){let i={};if(n){let l=n.indexOf("#");l>=0&&(i.hash=n.substring(l),n=n.substring(0,l));let s=n.indexOf("?");s>=0&&(i.search=n.substring(s),n=n.substring(0,s)),n&&(i.pathname=n)}return i}function n1(n,i,l,s={}){let{window:c=document.defaultView,v5Compat:f=!1}=s,d=c.history,p="POP",y=null,m=b();m==null&&(m=0,d.replaceState({...d.state,idx:m},""));function b(){return(d.state||{idx:null}).idx}function g(){p="POP";let K=b(),G=K==null?null:K-m;m=K,y&&y({action:p,location:H.location,delta:G})}function T(K,G){p="PUSH";let P=ql(H.location,K,G);m=b()+1;let I=ly(P,m),ye=H.createHref(P);try{d.pushState(I,"",ye)}catch(de){if(de instanceof DOMException&&de.name==="DataCloneError")throw de;c.location.assign(ye)}f&&y&&y({action:p,location:H.location,delta:1})}function M(K,G){p="REPLACE";let P=ql(H.location,K,G);m=b();let I=ly(P,m),ye=H.createHref(P);d.replaceState(I,"",ye),f&&y&&y({action:p,location:H.location,delta:0})}function U(K){return fg(K)}let H={get action(){return p},get location(){return n(c,d)},listen(K){if(y)throw new Error("A history only accepts one active listener");return c.addEventListener(ry,g),y=K,()=>{c.removeEventListener(ry,g),y=null}},createHref(K){return i(c,K)},createURL:U,encodeLocation(K){let G=U(K);return{pathname:G.pathname,search:G.search,hash:G.hash}},push:T,replace:M,go(K){return d.go(K)}};return H}function fg(n,i=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),Le(l,"No window.location.(origin|href) available to create URL");let s=typeof n=="string"?n:oa(n);return s=s.replace(/ $/,"%20"),!i&&s.startsWith("//")&&(s=l+s),new URL(s,l)}var Nl,sy=class{constructor(n){if(WS(this,Nl,new Map),n)for(let[i,l]of n)this.set(i,l)}get(n){if(Xc(this,Nl).has(n))return Xc(this,Nl).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,i){Xc(this,Nl).set(n,i)}};Nl=new WeakMap;var a1=new Set(["lazy","caseSensitive","path","id","index","children"]);function i1(n){return a1.has(n)}var r1=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function l1(n){return r1.has(n)}function s1(n){return n.index===!0}function Hl(n,i,l=[],s={},c=!1){return n.map((f,d)=>{let p=[...l,String(d)],y=typeof f.id=="string"?f.id:p.join("-");if(Le(f.index!==!0||!f.children,"Cannot specify children on an index route"),Le(c||!s[y],`Found a route id collision on id "${y}". Route id's must be globally unique within Data Router usages`),s1(f)){let m={...f,id:y};return s[y]=oy(m,i(m)),m}else{let m={...f,id:y,children:void 0};return s[y]=oy(m,i(m)),f.children&&(m.children=Hl(f.children,i,p,s,c)),m}})}function oy(n,i){return Object.assign(n,{...i,...typeof i.lazy=="object"&&i.lazy!=null?{lazy:{...n.lazy,...i.lazy}}:{}})}function si(n,i,l="/"){return kl(n,i,l,!1)}function kl(n,i,l,s){let c=typeof i=="string"?di(i):i,f=Hn(c.pathname||"/",l);if(f==null)return null;let d=dg(n);u1(d);let p=null;for(let y=0;p==null&&y<d.length;++y){let m=S1(f);p=v1(d[y],m,s)}return p}function o1(n,i){let{route:l,pathname:s,params:c}=n;return{id:l.id,pathname:s,params:c,data:i[l.id],loaderData:i[l.id],handle:l.handle}}function dg(n,i=[],l=[],s="",c=!1){let f=(d,p,y=c,m)=>{let b={relativePath:m===void 0?d.path||"":m,caseSensitive:d.caseSensitive===!0,childrenIndex:p,route:d};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(s)&&y)return;Le(b.relativePath.startsWith(s),`Absolute route path "${b.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(s.length)}let g=sa([s,b.relativePath]),T=l.concat(b);d.children&&d.children.length>0&&(Le(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),dg(d.children,i,T,g,y)),!(d.path==null&&!d.index)&&i.push({path:g,score:y1(g,d.index),routesMeta:T})};return n.forEach((d,p)=>{if(d.path===""||!d.path?.includes("?"))f(d,p);else for(let y of hg(d.path))f(d,p,!0,y)}),i}function hg(n){let i=n.split("/");if(i.length===0)return[];let[l,...s]=i,c=l.endsWith("?"),f=l.replace(/\?$/,"");if(s.length===0)return c?[f,""]:[f];let d=hg(s.join("/")),p=[];return p.push(...d.map(y=>y===""?f:[f,y].join("/"))),c&&p.push(...d),p.map(y=>n.startsWith("/")&&y===""?"/":y)}function u1(n){n.sort((i,l)=>i.score!==l.score?l.score-i.score:g1(i.routesMeta.map(s=>s.childrenIndex),l.routesMeta.map(s=>s.childrenIndex)))}var c1=/^:[\w-]+$/,f1=3,d1=2,h1=1,m1=10,p1=-2,uy=n=>n==="*";function y1(n,i){let l=n.split("/"),s=l.length;return l.some(uy)&&(s+=p1),i&&(s+=d1),l.filter(c=>!uy(c)).reduce((c,f)=>c+(c1.test(f)?f1:f===""?h1:m1),s)}function g1(n,i){return n.length===i.length&&n.slice(0,-1).every((s,c)=>s===i[c])?n[n.length-1]-i[i.length-1]:0}function v1(n,i,l=!1){let{routesMeta:s}=n,c={},f="/",d=[];for(let p=0;p<s.length;++p){let y=s[p],m=p===s.length-1,b=f==="/"?i:i.slice(f.length)||"/",g=Ao({path:y.relativePath,caseSensitive:y.caseSensitive,end:m},b),T=y.route;if(!g&&m&&l&&!s[s.length-1].route.index&&(g=Ao({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},b)),!g)return null;Object.assign(c,g.params),d.push({params:c,pathname:sa([f,g.pathname]),pathnameBase:T1(sa([f,g.pathnameBase])),route:T}),g.pathnameBase!=="/"&&(f=sa([f,g.pathnameBase]))}return d}function Ao(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,s]=b1(n.path,n.caseSensitive,n.end),c=i.match(l);if(!c)return null;let f=c[0],d=f.replace(/(.)\/+$/,"$1"),p=c.slice(1);return{params:s.reduce((m,{paramName:b,isOptional:g},T)=>{if(b==="*"){let U=p[T]||"";d=f.slice(0,f.length-U.length).replace(/(.)\/+$/,"$1")}const M=p[T];return g&&!M?m[b]=void 0:m[b]=(M||"").replace(/%2F/g,"/"),m},{}),pathname:f,pathnameBase:d,pattern:n}}function b1(n,i=!1,l=!0){Mt(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 s=[],c="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,p,y)=>(s.push({paramName:p,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(s.push({paramName:"*"}),c+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?c+="\\/*$":n!==""&&n!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,i?void 0:"i"),s]}function S1(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return Mt(!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 (${i}).`),n}}function Hn(n,i){if(i==="/")return n;if(!n.toLowerCase().startsWith(i.toLowerCase()))return null;let l=i.endsWith("/")?i.length-1:i.length,s=n.charAt(l);return s&&s!=="/"?null:n.slice(l)||"/"}function E1({basename:n,pathname:i}){return i==="/"?n:sa([n,i])}var mg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zf=n=>mg.test(n);function w1(n,i="/"){let{pathname:l,search:s="",hash:c=""}=typeof n=="string"?di(n):n,f;return l?(l=l.replace(/\/\/+/g,"/"),l.startsWith("/")?f=cy(l.substring(1),"/"):f=cy(l,i)):f=i,{pathname:f,search:R1(s),hash:x1(c)}}function cy(n,i){let l=i.replace(/\/+$/,"").split("/");return n.split("/").forEach(c=>{c===".."?l.length>1&&l.pop():c!=="."&&l.push(c)}),l.length>1?l.join("/"):"/"}function Fc(n,i,l,s){return`Cannot include a '${n}' character in a manually specified \`to.${i}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${l}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function pg(n){return n.filter((i,l)=>l===0||i.route.path&&i.route.path.length>0)}function Nf(n){let i=pg(n);return i.map((l,s)=>s===i.length-1?l.pathname:l.pathnameBase)}function kf(n,i,l,s=!1){let c;typeof n=="string"?c=di(n):(c={...n},Le(!c.pathname||!c.pathname.includes("?"),Fc("?","pathname","search",c)),Le(!c.pathname||!c.pathname.includes("#"),Fc("#","pathname","hash",c)),Le(!c.search||!c.search.includes("#"),Fc("#","search","hash",c)));let f=n===""||c.pathname==="",d=f?"/":c.pathname,p;if(d==null)p=l;else{let g=i.length-1;if(!s&&d.startsWith("..")){let T=d.split("/");for(;T[0]==="..";)T.shift(),g-=1;c.pathname=T.join("/")}p=g>=0?i[g]:"/"}let y=w1(c,p),m=d&&d!=="/"&&d.endsWith("/"),b=(f||d===".")&&l.endsWith("/");return!y.pathname.endsWith("/")&&(m||b)&&(y.pathname+="/"),y}var sa=n=>n.join("/").replace(/\/\/+/g,"/"),T1=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),R1=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,x1=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Yl=class{constructor(n,i,l,s=!1){this.status=n,this.statusText=i||"",this.internal=s,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function Ql(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Gl(n){return n.map(i=>i.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var yg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function gg(n,i){let l=n;if(typeof l!="string"||!mg.test(l))return{absoluteURL:void 0,isExternal:!1,to:l};let s=l,c=!1;if(yg)try{let f=new URL(window.location.href),d=l.startsWith("//")?new URL(f.protocol+l):new URL(l),p=Hn(d.pathname,i);d.origin===f.origin&&p!=null?l=p+d.search+d.hash:c=!0}catch{Mt(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:c,to:l}}var ui=Symbol("Uninstrumented");function _1(n,i){let l={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};n.forEach(c=>c({id:i.id,index:i.index,path:i.path,instrument(f){let d=Object.keys(l);for(let p of d)f[p]&&l[p].push(f[p])}}));let s={};if(typeof i.lazy=="function"&&l.lazy.length>0){let c=Or(l.lazy,i.lazy,()=>{});c&&(s.lazy=c)}if(typeof i.lazy=="object"){let c=i.lazy;["middleware","loader","action"].forEach(f=>{let d=c[f],p=l[`lazy.${f}`];if(typeof d=="function"&&p.length>0){let y=Or(p,d,()=>{});y&&(s.lazy=Object.assign(s.lazy||{},{[f]:y}))}})}return["loader","action"].forEach(c=>{let f=i[c];if(typeof f=="function"&&l[c].length>0){let d=f[ui]??f,p=Or(l[c],d,(...y)=>fy(y[0]));p&&(c==="loader"&&d.hydrate===!0&&(p.hydrate=!0),p[ui]=d,s[c]=p)}}),i.middleware&&i.middleware.length>0&&l.middleware.length>0&&(s.middleware=i.middleware.map(c=>{let f=c[ui]??c,d=Or(l.middleware,f,(...p)=>fy(p[0]));return d?(d[ui]=f,d):c})),s}function A1(n,i){let l={navigate:[],fetch:[]};if(i.forEach(s=>s({instrument(c){let f=Object.keys(c);for(let d of f)c[d]&&l[d].push(c[d])}})),l.navigate.length>0){let s=n.navigate[ui]??n.navigate,c=Or(l.navigate,s,(...f)=>{let[d,p]=f;return{to:typeof d=="number"||typeof d=="string"?d:d?oa(d):".",...dy(n,p??{})}});c&&(c[ui]=s,n.navigate=c)}if(l.fetch.length>0){let s=n.fetch[ui]??n.fetch,c=Or(l.fetch,s,(...f)=>{let[d,,p,y]=f;return{href:p??".",fetcherKey:d,...dy(n,y??{})}});c&&(c[ui]=s,n.fetch=c)}return n}function Or(n,i,l){return n.length===0?null:async(...s)=>{let c=await vg(n,l(...s),()=>i(...s),n.length-1);if(c.type==="error")throw c.value;return c.value}}async function vg(n,i,l,s){let c=n[s],f;if(c){let d,p=async()=>(d?console.error("You cannot call instrumented handlers more than once"):d=vg(n,i,l,s-1),f=await d,Le(f,"Expected a result"),f.type==="error"&&f.value instanceof Error?{status:"error",error:f.value}:{status:"success",error:void 0});try{await c(p,i)}catch(y){console.error("An instrumentation function threw an error:",y)}d||await p(),await d}else try{f={type:"success",value:await l()}}catch(d){f={type:"error",value:d}}return f||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function fy(n){let{request:i,context:l,params:s,unstable_pattern:c}=n;return{request:C1(i),params:{...s},unstable_pattern:c,context:O1(l)}}function dy(n,i){return{currentUrl:oa(n.state.location),..."formMethod"in i?{formMethod:i.formMethod}:{},..."formEncType"in i?{formEncType:i.formEncType}:{},..."formData"in i?{formData:i.formData}:{},..."body"in i?{body:i.body}:{}}}function C1(n){return{method:n.method,url:n.url,headers:{get:(...i)=>n.headers.get(...i)}}}function O1(n){if(D1(n)){let i={...n};return Object.freeze(i),i}else return{get:i=>n.get(i)}}var M1=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function D1(n){if(n===null||typeof n!="object")return!1;const i=Object.getPrototypeOf(n);return i===Object.prototype||i===null||Object.getOwnPropertyNames(i).sort().join("\0")===M1}var bg=["POST","PUT","PATCH","DELETE"],z1=new Set(bg),N1=["GET",...bg],k1=new Set(N1),Sg=new Set([301,302,303,307,308]),U1=new Set([307,308]),Zc={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},L1={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Cl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},B1=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),Eg="remix-router-transitions",wg=Symbol("ResetLoaderData");function j1(n){const i=n.window?n.window:typeof window<"u"?window:void 0,l=typeof i<"u"&&typeof i.document<"u"&&typeof i.document.createElement<"u";Le(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let s=n.hydrationRouteProperties||[],c=n.mapRouteProperties||B1,f=c;if(n.unstable_instrumentations){let S=n.unstable_instrumentations;f=_=>({...c(_),..._1(S.map(k=>k.route).filter(Boolean),_)})}let d={},p=Hl(n.routes,f,void 0,d),y,m=n.basename||"/";m.startsWith("/")||(m=`/${m}`);let b=n.dataStrategy||G1,g={...n.future},T=null,M=new Set,U=null,H=null,K=null,G=n.hydrationData!=null,P=si(p,n.history.location,m),I=!1,ye=null,de;if(P==null&&!n.patchRoutesOnNavigation){let S=Bn(404,{pathname:n.history.location.pathname}),{matches:_,route:k}=lo(p);de=!0,P=_,ye={[k.id]:S}}else if(P&&!n.hydrationData&&Et(P,p,n.history.location.pathname).active&&(P=null),P)if(P.some(S=>S.route.lazy))de=!1;else if(!P.some(S=>Uf(S.route)))de=!0;else{let S=n.hydrationData?n.hydrationData.loaderData:null,_=n.hydrationData?n.hydrationData.errors:null;if(_){let k=P.findIndex(J=>_[J.route.id]!==void 0);de=P.slice(0,k+1).every(J=>!pf(J.route,S,_))}else de=P.every(k=>!pf(k.route,S,_))}else{de=!1,P=[];let S=Et(null,p,n.history.location.pathname);S.active&&S.matches&&(I=!0,P=S.matches)}let he,A={historyAction:n.history.action,location:n.history.location,matches:P,initialized:de,navigation:Zc,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||ye,fetchers:new Map,blockers:new Map},Y="POP",se=null,Ce=!1,Ae,Re=!1,ke=new Map,Ue=null,Ee=!1,C=!1,F=new Set,j=new Map,pe=0,ge=-1,w=new Map,q=new Set,B=new Map,Z=new Map,ee=new Set,oe=new Map,ue,xe=null;function Qe(){if(T=n.history.listen(({action:S,location:_,delta:k})=>{if(ue){ue(),ue=void 0;return}Mt(oe.size===0||k!=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=ha({currentLocation:A.location,nextLocation:_,historyAction:S});if(J&&k!=null){let $=new Promise(me=>{ue=me});n.history.go(k*-1),Gn(J,{state:"blocked",location:_,proceed(){Gn(J,{state:"proceeding",proceed:void 0,reset:void 0,location:_}),$.then(()=>n.history.go(k))},reset(){let me=new Map(A.blockers);me.set(J,Cl),Pe({blockers:me})}}),se?.resolve(),se=null;return}return nn(S,_)}),l){sE(i,ke);let S=()=>oE(i,ke);i.addEventListener("pagehide",S),Ue=()=>i.removeEventListener("pagehide",S)}return A.initialized||nn("POP",A.location,{initialHydration:!0}),he}function jt(){T&&T(),Ue&&Ue(),M.clear(),Ae&&Ae.abort(),A.fetchers.forEach((S,_)=>xn(_)),A.blockers.forEach((S,_)=>hn(_))}function Jt(S){return M.add(S),()=>M.delete(S)}function Pe(S,_={}){S.matches&&(S.matches=S.matches.map($=>{let me=d[$.route.id],ne=$.route;return ne.element!==me.element||ne.errorElement!==me.errorElement||ne.hydrateFallbackElement!==me.hydrateFallbackElement?{...$,route:me}:$})),A={...A,...S};let k=[],J=[];A.fetchers.forEach(($,me)=>{$.state==="idle"&&(ee.has(me)?k.push(me):J.push(me))}),ee.forEach($=>{!A.fetchers.has($)&&!j.has($)&&k.push($)}),[...M].forEach($=>$(A,{deletedFetchers:k,newErrors:S.errors??null,viewTransitionOpts:_.viewTransitionOpts,flushSync:_.flushSync===!0})),k.forEach($=>xn($)),J.forEach($=>A.fetchers.delete($))}function Yn(S,_,{flushSync:k}={}){let J=A.actionData!=null&&A.navigation.formMethod!=null&&Pt(A.navigation.formMethod)&&A.navigation.state==="loading"&&S.state?._isRedirect!==!0,$;_.actionData?Object.keys(_.actionData).length>0?$=_.actionData:$=null:J?$=A.actionData:$=null;let me=_.loaderData?wy(A.loaderData,_.loaderData,_.matches||[],_.errors):A.loaderData,ne=A.blockers;ne.size>0&&(ne=new Map(ne),ne.forEach((we,ve)=>ne.set(ve,Cl)));let te=Ee?!1:St(S,_.matches||A.matches),ae=Ce===!0||A.navigation.formMethod!=null&&Pt(A.navigation.formMethod)&&S.state?._isRedirect!==!0;y&&(p=y,y=void 0),Ee||Y==="POP"||(Y==="PUSH"?n.history.push(S,S.state):Y==="REPLACE"&&n.history.replace(S,S.state));let fe;if(Y==="POP"){let we=ke.get(A.location.pathname);we&&we.has(S.pathname)?fe={currentLocation:A.location,nextLocation:S}:ke.has(S.pathname)&&(fe={currentLocation:S,nextLocation:A.location})}else if(Re){let we=ke.get(A.location.pathname);we?we.add(S.pathname):(we=new Set([S.pathname]),ke.set(A.location.pathname,we)),fe={currentLocation:A.location,nextLocation:S}}Pe({..._,actionData:$,loaderData:me,historyAction:Y,location:S,initialized:!0,navigation:Zc,revalidation:"idle",restoreScrollPosition:te,preventScrollReset:ae,blockers:ne},{viewTransitionOpts:fe,flushSync:k===!0}),Y="POP",Ce=!1,Re=!1,Ee=!1,C=!1,se?.resolve(),se=null,xe?.resolve(),xe=null}async function tn(S,_){if(se?.resolve(),se=null,typeof S=="number"){se||(se=_y());let Ye=se.promise;return n.history.go(S),Ye}let k=mf(A.location,A.matches,m,S,_?.fromRouteId,_?.relative),{path:J,submission:$,error:me}=hy(!1,k,_),ne=A.location,te=ql(A.location,J,_&&_.state);te={...te,...n.history.encodeLocation(te)};let ae=_&&_.replace!=null?_.replace:void 0,fe="PUSH";ae===!0?fe="REPLACE":ae===!1||$!=null&&Pt($.formMethod)&&$.formAction===A.location.pathname+A.location.search&&(fe="REPLACE");let we=_&&"preventScrollReset"in _?_.preventScrollReset===!0:void 0,ve=(_&&_.flushSync)===!0,Ze=ha({currentLocation:ne,nextLocation:te,historyAction:fe});if(Ze){Gn(Ze,{state:"blocked",location:te,proceed(){Gn(Ze,{state:"proceeding",proceed:void 0,reset:void 0,location:te}),tn(S,_)},reset(){let Ye=new Map(A.blockers);Ye.set(Ze,Cl),Pe({blockers:Ye})}});return}await nn(fe,te,{submission:$,pendingError:me,preventScrollReset:we,replace:_&&_.replace,enableViewTransition:_&&_.viewTransition,flushSync:ve,callSiteDefaultShouldRevalidate:_&&_.unstable_defaultShouldRevalidate})}function hi(){xe||(xe=_y()),La(),Pe({revalidation:"loading"});let S=xe.promise;return A.navigation.state==="submitting"?S:A.navigation.state==="idle"?(nn(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),S):(nn(Y||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:Re===!0}),S)}async function nn(S,_,k){Ae&&Ae.abort(),Ae=null,Y=S,Ee=(k&&k.startUninterruptedRevalidation)===!0,lt(A.location,A.matches),Ce=(k&&k.preventScrollReset)===!0,Re=(k&&k.enableViewTransition)===!0;let J=y||p,$=k&&k.overrideNavigation,me=k?.initialHydration&&A.matches&&A.matches.length>0&&!I?A.matches:si(J,_,m),ne=(k&&k.flushSync)===!0;if(me&&A.initialized&&!C&&I1(A.location,_)&&!(k&&k.submission&&Pt(k.submission.formMethod))){Yn(_,{matches:me},{flushSync:ne});return}let te=Et(me,J,_.pathname);if(te.active&&te.matches&&(me=te.matches),!me){let{error:pt,notFoundMatches:yt,route:Ge}=Vn(_.pathname);Yn(_,{matches:yt,loaderData:{},errors:{[Ge.id]:pt}},{flushSync:ne});return}Ae=new AbortController;let ae=Cr(n.history,_,Ae.signal,k&&k.submission),fe=n.getContext?await n.getContext():new sy,we;if(k&&k.pendingError)we=[oi(me).route.id,{type:"error",error:k.pendingError}];else if(k&&k.submission&&Pt(k.submission.formMethod)){let pt=await ca(ae,_,k.submission,me,fe,te.active,k&&k.initialHydration===!0,{replace:k.replace,flushSync:ne});if(pt.shortCircuited)return;if(pt.pendingActionResult){let[yt,Ge]=pt.pendingActionResult;if(Tn(Ge)&&Ql(Ge.error)&&Ge.error.status===404){Ae=null,Yn(_,{matches:pt.matches,loaderData:{},errors:{[yt]:Ge.error}});return}}me=pt.matches||me,we=pt.pendingActionResult,$=Pc(_,k.submission),ne=!1,te.active=!1,ae=Cr(n.history,ae.url,ae.signal)}let{shortCircuited:ve,matches:Ze,loaderData:Ye,errors:mt}=await mi(ae,_,me,fe,te.active,$,k&&k.submission,k&&k.fetcherSubmission,k&&k.replace,k&&k.initialHydration===!0,ne,we,k&&k.callSiteDefaultShouldRevalidate);ve||(Ae=null,Yn(_,{matches:Ze||me,...Ty(we),loaderData:Ye,errors:mt}))}async function ca(S,_,k,J,$,me,ne,te={}){La();let ae=rE(_,k);if(Pe({navigation:ae},{flushSync:te.flushSync===!0}),me){let ve=await mn(J,_.pathname,S.signal);if(ve.type==="aborted")return{shortCircuited:!0};if(ve.type==="error"){if(ve.partialMatches.length===0){let{matches:Ye,route:mt}=lo(p);return{matches:Ye,pendingActionResult:[mt.id,{type:"error",error:ve.error}]}}let Ze=oi(ve.partialMatches).route.id;return{matches:ve.partialMatches,pendingActionResult:[Ze,{type:"error",error:ve.error}]}}else if(ve.matches)J=ve.matches;else{let{notFoundMatches:Ze,error:Ye,route:mt}=Vn(_.pathname);return{matches:Ze,pendingActionResult:[mt.id,{type:"error",error:Ye}]}}}let fe,we=yo(J,_);if(!we.route.action&&!we.route.lazy)fe={type:"error",error:Bn(405,{method:S.method,pathname:_.pathname,routeId:we.route.id})};else{let ve=Dr(f,d,S,J,we,ne?[]:s,$),Ze=await fa(S,ve,$,null);if(fe=Ze[we.route.id],!fe){for(let Ye of J)if(Ze[Ye.route.id]){fe=Ze[Ye.route.id];break}}if(S.signal.aborted)return{shortCircuited:!0}}if(qi(fe)){let ve;return te&&te.replace!=null?ve=te.replace:ve=by(fe.response.headers.get("Location"),new URL(S.url),m,n.history)===A.location.pathname+A.location.search,await ht(S,fe,!0,{submission:k,replace:ve}),{shortCircuited:!0}}if(Tn(fe)){let ve=oi(J,we.route.id);return(te&&te.replace)!==!0&&(Y="PUSH"),{matches:J,pendingActionResult:[ve.route.id,fe,we.route.id]}}return{matches:J,pendingActionResult:[we.route.id,fe]}}async function mi(S,_,k,J,$,me,ne,te,ae,fe,we,ve,Ze){let Ye=me||Pc(_,ne),mt=ne||te||xy(Ye),pt=!Ee&&!fe;if($){if(pt){let wt=Xt(ve);Pe({navigation:Ye,...wt!==void 0?{actionData:wt}:{}},{flushSync:we})}let Ve=await mn(k,_.pathname,S.signal);if(Ve.type==="aborted")return{shortCircuited:!0};if(Ve.type==="error"){if(Ve.partialMatches.length===0){let{matches:Fn,route:Qt}=lo(p);return{matches:Fn,loaderData:{},errors:{[Qt.id]:Ve.error}}}let wt=oi(Ve.partialMatches).route.id;return{matches:Ve.partialMatches,loaderData:{},errors:{[wt]:Ve.error}}}else if(Ve.matches)k=Ve.matches;else{let{error:wt,notFoundMatches:Fn,route:Qt}=Vn(_.pathname);return{matches:Fn,loaderData:{},errors:{[Qt.id]:wt}}}}let yt=y||p,{dsMatches:Ge,revalidatingFetchers:Lt}=my(S,J,f,d,n.history,A,k,mt,_,fe?[]:s,fe===!0,C,F,ee,B,q,yt,m,n.patchRoutesOnNavigation!=null,ve,Ze);if(ge=++pe,!n.dataStrategy&&!Ge.some(Ve=>Ve.shouldLoad)&&!Ge.some(Ve=>Ve.route.middleware&&Ve.route.middleware.length>0)&&Lt.length===0){let Ve=Dt();return Yn(_,{matches:k,loaderData:{},errors:ve&&Tn(ve[1])?{[ve[0]]:ve[1].error}:null,...Ty(ve),...Ve?{fetchers:new Map(A.fetchers)}:{}},{flushSync:we}),{shortCircuited:!0}}if(pt){let Ve={};if(!$){Ve.navigation=Ye;let wt=Xt(ve);wt!==void 0&&(Ve.actionData=wt)}Lt.length>0&&(Ve.fetchers=pi(Lt)),Pe(Ve,{flushSync:we})}Lt.forEach(Ve=>{ot(Ve.key),Ve.controller&&j.set(Ve.key,Ve.controller)});let rn=()=>Lt.forEach(Ve=>ot(Ve.key));Ae&&Ae.signal.addEventListener("abort",rn);let{loaderResults:ft,fetcherResults:Kn}=await ea(Ge,Lt,S,J);if(S.signal.aborted)return{shortCircuited:!0};Ae&&Ae.signal.removeEventListener("abort",rn),Lt.forEach(Ve=>j.delete(Ve.key));let pn=so(ft);if(pn)return await ht(S,pn.result,!0,{replace:ae}),{shortCircuited:!0};if(pn=so(Kn),pn)return q.add(pn.key),await ht(S,pn.result,!0,{replace:ae}),{shortCircuited:!0};let{loaderData:Xn,errors:An}=Ey(A,k,ft,ve,Lt,Kn);fe&&A.errors&&(An={...A.errors,...An});let pa=Dt(),vi=Fi(ge),bi=pa||vi||Lt.length>0;return{matches:k,loaderData:Xn,errors:An,...bi?{fetchers:new Map(A.fetchers)}:{}}}function Xt(S){if(S&&!Tn(S[1]))return{[S[0]]:S[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function pi(S){return S.forEach(_=>{let k=A.fetchers.get(_.key),J=Ol(void 0,k?k.data:void 0);A.fetchers.set(_.key,J)}),new Map(A.fetchers)}async function yi(S,_,k,J){ot(S);let $=(J&&J.flushSync)===!0,me=y||p,ne=mf(A.location,A.matches,m,k,_,J?.relative),te=si(me,ne,m),ae=Et(te,me,ne);if(ae.active&&ae.matches&&(te=ae.matches),!te){It(S,_,Bn(404,{pathname:ne}),{flushSync:$});return}let{path:fe,submission:we,error:ve}=hy(!0,ne,J);if(ve){It(S,_,ve,{flushSync:$});return}let Ze=n.getContext?await n.getContext():new sy,Ye=(J&&J.preventScrollReset)===!0;if(we&&Pt(we.formMethod)){await qt(S,_,fe,te,Ze,ae.active,$,Ye,we,J&&J.unstable_defaultShouldRevalidate);return}B.set(S,{routeId:_,path:fe}),await Wn(S,_,fe,te,Ze,ae.active,$,Ye,we)}async function qt(S,_,k,J,$,me,ne,te,ae,fe){La(),B.delete(S);let we=A.fetchers.get(S);Ht(S,lE(ae,we),{flushSync:ne});let ve=new AbortController,Ze=Cr(n.history,k,ve.signal,ae);if(me){let Ke=await mn(J,new URL(Ze.url).pathname,Ze.signal,S);if(Ke.type==="aborted")return;if(Ke.type==="error"){It(S,_,Ke.error,{flushSync:ne});return}else if(Ke.matches)J=Ke.matches;else{It(S,_,Bn(404,{pathname:k}),{flushSync:ne});return}}let Ye=yo(J,k);if(!Ye.route.action&&!Ye.route.lazy){let Ke=Bn(405,{method:ae.formMethod,pathname:k,routeId:_});It(S,_,Ke,{flushSync:ne});return}j.set(S,ve);let mt=pe,pt=Dr(f,d,Ze,J,Ye,s,$),yt=await fa(Ze,pt,$,S),Ge=yt[Ye.route.id];if(!Ge){for(let Ke of pt)if(yt[Ke.route.id]){Ge=yt[Ke.route.id];break}}if(Ze.signal.aborted){j.get(S)===ve&&j.delete(S);return}if(ee.has(S)){if(qi(Ge)||Tn(Ge)){Ht(S,ka(void 0));return}}else{if(qi(Ge))if(j.delete(S),ge>mt){Ht(S,ka(void 0));return}else return q.add(S),Ht(S,Ol(ae)),ht(Ze,Ge,!1,{fetcherSubmission:ae,preventScrollReset:te});if(Tn(Ge)){It(S,_,Ge.error);return}}let Lt=A.navigation.location||A.location,rn=Cr(n.history,Lt,ve.signal),ft=y||p,Kn=A.navigation.state!=="idle"?si(ft,A.navigation.location,m):A.matches;Le(Kn,"Didn't find any matches after fetcher action");let pn=++pe;w.set(S,pn);let Xn=Ol(ae,Ge.data);A.fetchers.set(S,Xn);let{dsMatches:An,revalidatingFetchers:pa}=my(rn,$,f,d,n.history,A,Kn,ae,Lt,s,!1,C,F,ee,B,q,ft,m,n.patchRoutesOnNavigation!=null,[Ye.route.id,Ge],fe);pa.filter(Ke=>Ke.key!==S).forEach(Ke=>{let Si=Ke.key,Fl=A.fetchers.get(Si),jr=Ol(void 0,Fl?Fl.data:void 0);A.fetchers.set(Si,jr),ot(Si),Ke.controller&&j.set(Si,Ke.controller)}),Pe({fetchers:new Map(A.fetchers)});let vi=()=>pa.forEach(Ke=>ot(Ke.key));ve.signal.addEventListener("abort",vi);let{loaderResults:bi,fetcherResults:Ve}=await ea(An,pa,rn,$);if(ve.signal.aborted)return;if(ve.signal.removeEventListener("abort",vi),w.delete(S),j.delete(S),pa.forEach(Ke=>j.delete(Ke.key)),A.fetchers.has(S)){let Ke=ka(Ge.data);A.fetchers.set(S,Ke)}let wt=so(bi);if(wt)return ht(rn,wt.result,!1,{preventScrollReset:te});if(wt=so(Ve),wt)return q.add(wt.key),ht(rn,wt.result,!1,{preventScrollReset:te});let{loaderData:Fn,errors:Qt}=Ey(A,Kn,bi,void 0,pa,Ve);Fi(pn),A.navigation.state==="loading"&&pn>ge?(Le(Y,"Expected pending action"),Ae&&Ae.abort(),Yn(A.navigation.location,{matches:Kn,loaderData:Fn,errors:Qt,fetchers:new Map(A.fetchers)})):(Pe({errors:Qt,loaderData:wy(A.loaderData,Fn,Kn,Qt),fetchers:new Map(A.fetchers)}),C=!1)}async function Wn(S,_,k,J,$,me,ne,te,ae){let fe=A.fetchers.get(S);Ht(S,Ol(ae,fe?fe.data:void 0),{flushSync:ne});let we=new AbortController,ve=Cr(n.history,k,we.signal);if(me){let Ge=await mn(J,new URL(ve.url).pathname,ve.signal,S);if(Ge.type==="aborted")return;if(Ge.type==="error"){It(S,_,Ge.error,{flushSync:ne});return}else if(Ge.matches)J=Ge.matches;else{It(S,_,Bn(404,{pathname:k}),{flushSync:ne});return}}let Ze=yo(J,k);j.set(S,we);let Ye=pe,mt=Dr(f,d,ve,J,Ze,s,$),yt=(await fa(ve,mt,$,S))[Ze.route.id];if(j.get(S)===we&&j.delete(S),!ve.signal.aborted){if(ee.has(S)){Ht(S,ka(void 0));return}if(qi(yt))if(ge>Ye){Ht(S,ka(void 0));return}else{q.add(S),await ht(ve,yt,!1,{preventScrollReset:te});return}if(Tn(yt)){It(S,_,yt.error);return}Ht(S,ka(yt.data))}}async function ht(S,_,k,{submission:J,fetcherSubmission:$,preventScrollReset:me,replace:ne}={}){k||(se?.resolve(),se=null),_.response.headers.has("X-Remix-Revalidate")&&(C=!0);let te=_.response.headers.get("Location");Le(te,"Expected a Location header on the redirect Response"),te=by(te,new URL(S.url),m,n.history);let ae=ql(A.location,te,{_isRedirect:!0});if(l){let mt=!1;if(_.response.headers.has("X-Remix-Reload-Document"))mt=!0;else if(zf(te)){const pt=fg(te,!0);mt=pt.origin!==i.location.origin||Hn(pt.pathname,m)==null}if(mt){ne?i.location.replace(te):i.location.assign(te);return}}Ae=null;let fe=ne===!0||_.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:we,formAction:ve,formEncType:Ze}=A.navigation;!J&&!$&&we&&ve&&Ze&&(J=xy(A.navigation));let Ye=J||$;if(U1.has(_.response.status)&&Ye&&Pt(Ye.formMethod))await nn(fe,ae,{submission:{...Ye,formAction:te},preventScrollReset:me||Ce,enableViewTransition:k?Re:void 0});else{let mt=Pc(ae,J);await nn(fe,ae,{overrideNavigation:mt,fetcherSubmission:$,preventScrollReset:me||Ce,enableViewTransition:k?Re:void 0})}}async function fa(S,_,k,J){let $,me={};try{$=await K1(b,S,_,J,k,!1)}catch(ne){return _.filter(te=>te.shouldLoad).forEach(te=>{me[te.route.id]={type:"error",error:ne}}),me}if(S.signal.aborted)return me;if(!Pt(S.method))for(let ne of _){if($[ne.route.id]?.type==="error")break;!$.hasOwnProperty(ne.route.id)&&!A.loaderData.hasOwnProperty(ne.route.id)&&(!A.errors||!A.errors.hasOwnProperty(ne.route.id))&&ne.shouldCallHandler()&&($[ne.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ne.route.id}`)})}for(let[ne,te]of Object.entries($))if(tE(te)){let ae=te.result;me[ne]={type:"redirect",response:P1(ae,S,ne,_,m)}}else me[ne]=await Z1(te);return me}async function ea(S,_,k,J){let $=fa(k,S,J,null),me=Promise.all(_.map(async ae=>{if(ae.matches&&ae.match&&ae.request&&ae.controller){let we=(await fa(ae.request,ae.matches,J,ae.key))[ae.match.route.id];return{[ae.key]:we}}else return Promise.resolve({[ae.key]:{type:"error",error:Bn(404,{pathname:ae.path})}})})),ne=await $,te=(await me).reduce((ae,fe)=>Object.assign(ae,fe),{});return{loaderResults:ne,fetcherResults:te}}function La(){C=!0,B.forEach((S,_)=>{j.has(_)&&F.add(_),ot(_)})}function Ht(S,_,k={}){A.fetchers.set(S,_),Pe({fetchers:new Map(A.fetchers)},{flushSync:(k&&k.flushSync)===!0})}function It(S,_,k,J={}){let $=oi(A.matches,_);xn(S),Pe({errors:{[$.route.id]:k},fetchers:new Map(A.fetchers)},{flushSync:(J&&J.flushSync)===!0})}function Rn(S){return Z.set(S,(Z.get(S)||0)+1),ee.has(S)&&ee.delete(S),A.fetchers.get(S)||L1}function Xi(S,_){ot(S,_?.reason),Ht(S,ka(null))}function xn(S){let _=A.fetchers.get(S);j.has(S)&&!(_&&_.state==="loading"&&w.has(S))&&ot(S),B.delete(S),w.delete(S),q.delete(S),ee.delete(S),F.delete(S),A.fetchers.delete(S)}function da(S){let _=(Z.get(S)||0)-1;_<=0?(Z.delete(S),ee.add(S)):Z.set(S,_),Pe({fetchers:new Map(A.fetchers)})}function ot(S,_){let k=j.get(S);k&&(k.abort(_),j.delete(S))}function an(S){for(let _ of S){let k=Rn(_),J=ka(k.data);A.fetchers.set(_,J)}}function Dt(){let S=[],_=!1;for(let k of q){let J=A.fetchers.get(k);Le(J,`Expected fetcher: ${k}`),J.state==="loading"&&(q.delete(k),S.push(k),_=!0)}return an(S),_}function Fi(S){let _=[];for(let[k,J]of w)if(J<S){let $=A.fetchers.get(k);Le($,`Expected fetcher: ${k}`),$.state==="loading"&&(ot(k),w.delete(k),_.push(k))}return an(_),_.length>0}function gi(S,_){let k=A.blockers.get(S)||Cl;return oe.get(S)!==_&&oe.set(S,_),k}function hn(S){A.blockers.delete(S),oe.delete(S)}function Gn(S,_){let k=A.blockers.get(S)||Cl;Le(k.state==="unblocked"&&_.state==="blocked"||k.state==="blocked"&&_.state==="blocked"||k.state==="blocked"&&_.state==="proceeding"||k.state==="blocked"&&_.state==="unblocked"||k.state==="proceeding"&&_.state==="unblocked",`Invalid blocker state transition: ${k.state} -> ${_.state}`);let J=new Map(A.blockers);J.set(S,_),Pe({blockers:J})}function ha({currentLocation:S,nextLocation:_,historyAction:k}){if(oe.size===0)return;oe.size>1&&Mt(!1,"A router only supports one blocker at a time");let J=Array.from(oe.entries()),[$,me]=J[J.length-1],ne=A.blockers.get($);if(!(ne&&ne.state==="proceeding")&&me({currentLocation:S,nextLocation:_,historyAction:k}))return $}function Vn(S){let _=Bn(404,{pathname:S}),k=y||p,{matches:J,route:$}=lo(k);return{notFoundMatches:J,route:$,error:_}}function _n(S,_,k){if(U=S,K=_,H=k||null,!G&&A.navigation===Zc){G=!0;let J=St(A.location,A.matches);J!=null&&Pe({restoreScrollPosition:J})}return()=>{U=null,K=null,H=null}}function _e(S,_){return H&&H(S,_.map(J=>o1(J,A.loaderData)))||S.key}function lt(S,_){if(U&&K){let k=_e(S,_);U[k]=K()}}function St(S,_){if(U){let k=_e(S,_),J=U[k];if(typeof J=="number")return J}return null}function Et(S,_,k){if(n.patchRoutesOnNavigation)if(S){if(Object.keys(S[0].params).length>0)return{active:!0,matches:kl(_,k,m,!0)}}else return{active:!0,matches:kl(_,k,m,!0)||[]};return{active:!1,matches:null}}async function mn(S,_,k,J){if(!n.patchRoutesOnNavigation)return{type:"success",matches:S};let $=S;for(;;){let me=y==null,ne=y||p,te=d;try{await n.patchRoutesOnNavigation({signal:k,path:_,matches:$,fetcherKey:J,patch:(we,ve)=>{k.aborted||py(we,ve,ne,te,f,!1)}})}catch(we){return{type:"error",error:we,partialMatches:$}}finally{me&&!k.aborted&&(p=[...p])}if(k.aborted)return{type:"aborted"};let ae=si(ne,_,m),fe=null;if(ae){if(Object.keys(ae[0].params).length===0)return{type:"success",matches:ae};if(fe=kl(ne,_,m,!0),!(fe&&$.length<fe.length&&st($,fe.slice(0,$.length))))return{type:"success",matches:ae}}if(fe||(fe=kl(ne,_,m,!0)),!fe||st($,fe))return{type:"success",matches:null};$=fe}}function st(S,_){return S.length===_.length&&S.every((k,J)=>k.route.id===_[J].route.id)}function Ft(S){d={},y=Hl(S,f,void 0,d)}function ma(S,_,k=!1){let J=y==null;py(S,_,y||p,d,f,k),J&&(p=[...p],Pe({}))}return he={get basename(){return m},get future(){return g},get state(){return A},get routes(){return p},get window(){return i},initialize:Qe,subscribe:Jt,enableScrollRestoration:_n,navigate:tn,fetch:yi,revalidate:hi,createHref:S=>n.history.createHref(S),encodeLocation:S=>n.history.encodeLocation(S),getFetcher:Rn,resetFetcher:Xi,deleteFetcher:da,dispose:jt,getBlocker:gi,deleteBlocker:hn,patchRoutes:ma,_internalFetchControllers:j,_internalSetRoutes:Ft,_internalSetStateDoNotUseOrYouWillBreakYourApp(S){Pe(S)}},n.unstable_instrumentations&&(he=A1(he,n.unstable_instrumentations.map(S=>S.router).filter(Boolean))),he}function q1(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function mf(n,i,l,s,c,f){let d,p;if(c){d=[];for(let m of i)if(d.push(m),m.route.id===c){p=m;break}}else d=i,p=i[i.length-1];let y=kf(s||".",Nf(d),Hn(n.pathname,l)||n.pathname,f==="path");if(s==null&&(y.search=n.search,y.hash=n.hash),(s==null||s===""||s===".")&&p){let m=Bf(y.search);if(p.route.index&&!m)y.search=y.search?y.search.replace(/^\?/,"?index&"):"?index";else if(!p.route.index&&m){let b=new URLSearchParams(y.search),g=b.getAll("index");b.delete("index"),g.filter(M=>M).forEach(M=>b.append("index",M));let T=b.toString();y.search=T?`?${T}`:""}}return l!=="/"&&(y.pathname=E1({basename:l,pathname:y.pathname})),oa(y)}function hy(n,i,l){if(!l||!q1(l))return{path:i};if(l.formMethod&&!iE(l.formMethod))return{path:i,error:Bn(405,{method:l.formMethod})};let s=()=>({path:i,error:Bn(400,{type:"invalid-body"})}),f=(l.formMethod||"get").toUpperCase(),d=Cg(i);if(l.body!==void 0){if(l.formEncType==="text/plain"){if(!Pt(f))return s();let g=typeof l.body=="string"?l.body:l.body instanceof FormData||l.body instanceof URLSearchParams?Array.from(l.body.entries()).reduce((T,[M,U])=>`${T}${M}=${U}
11
11
  `,""):String(l.body);return{path:i,submission:{formMethod:f,formAction:d,formEncType:l.formEncType,formData:void 0,json:void 0,text:g}}}else if(l.formEncType==="application/json"){if(!Pt(f))return s();try{let g=typeof l.body=="string"?JSON.parse(l.body):l.body;return{path:i,submission:{formMethod:f,formAction:d,formEncType:l.formEncType,formData:void 0,json:g,text:void 0}}}catch{return s()}}}Le(typeof FormData=="function","FormData is not available in this environment");let p,y;if(l.formData)p=gf(l.formData),y=l.formData;else if(l.body instanceof FormData)p=gf(l.body),y=l.body;else if(l.body instanceof URLSearchParams)p=l.body,y=Sy(p);else if(l.body==null)p=new URLSearchParams,y=new FormData;else try{p=new URLSearchParams(l.body),y=Sy(p)}catch{return s()}let m={formMethod:f,formAction:d,formEncType:l&&l.formEncType||"application/x-www-form-urlencoded",formData:y,json:void 0,text:void 0};if(Pt(m.formMethod))return{path:i,submission:m};let b=di(i);return n&&b.search&&Bf(b.search)&&p.append("index",""),b.search=`?${p}`,{path:oa(b),submission:m}}function my(n,i,l,s,c,f,d,p,y,m,b,g,T,M,U,H,K,G,P,I,ye){let de=I?Tn(I[1])?I[1].error:I[1].data:void 0,he=c.createURL(f.location),A=c.createURL(y),Y;if(b&&f.errors){let Ee=Object.keys(f.errors)[0];Y=d.findIndex(C=>C.route.id===Ee)}else if(I&&Tn(I[1])){let Ee=I[0];Y=d.findIndex(C=>C.route.id===Ee)-1}let se=I?I[1].statusCode:void 0,Ce=se&&se>=400,Ae={currentUrl:he,currentParams:f.matches[0]?.params||{},nextUrl:A,nextParams:d[0].params,...p,actionResult:de,actionStatus:se},Re=Gl(d),ke=d.map((Ee,C)=>{let{route:F}=Ee,j=null;if(Y!=null&&C>Y?j=!1:F.lazy?j=!0:Uf(F)?b?j=pf(F,f.loaderData,f.errors):H1(f.loaderData,f.matches[C],Ee)&&(j=!0):j=!1,j!==null)return yf(l,s,n,Re,Ee,m,i,j);let pe=!1;typeof ye=="boolean"?pe=ye:Ce?pe=!1:(g||he.pathname+he.search===A.pathname+A.search||he.search!==A.search||Q1(f.matches[C],Ee))&&(pe=!0);let ge={...Ae,defaultShouldRevalidate:pe},w=Bl(Ee,ge);return yf(l,s,n,Re,Ee,m,i,w,ge,ye)}),Ue=[];return U.forEach((Ee,C)=>{if(b||!d.some(Z=>Z.route.id===Ee.routeId)||M.has(C))return;let F=f.fetchers.get(C),j=F&&F.state!=="idle"&&F.data===void 0,pe=si(K,Ee.path,G);if(!pe){if(P&&j)return;Ue.push({key:C,routeId:Ee.routeId,path:Ee.path,matches:null,match:null,request:null,controller:null});return}if(H.has(C))return;let ge=yo(pe,Ee.path),w=new AbortController,q=Cr(c,Ee.path,w.signal),B=null;if(T.has(C))T.delete(C),B=Dr(l,s,q,pe,ge,m,i);else if(j)g&&(B=Dr(l,s,q,pe,ge,m,i));else{let Z;typeof ye=="boolean"?Z=ye:Ce?Z=!1:Z=g;let ee={...Ae,defaultShouldRevalidate:Z};Bl(ge,ee)&&(B=Dr(l,s,q,pe,ge,m,i,ee))}B&&Ue.push({key:C,routeId:Ee.routeId,path:Ee.path,matches:B,match:ge,request:q,controller:w})}),{dsMatches:ke,revalidatingFetchers:Ue}}function Uf(n){return n.loader!=null||n.middleware!=null&&n.middleware.length>0}function pf(n,i,l){if(n.lazy)return!0;if(!Uf(n))return!1;let s=i!=null&&n.id in i,c=l!=null&&l[n.id]!==void 0;return!s&&c?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!s&&!c}function H1(n,i,l){let s=!i||l.route.id!==i.route.id,c=!n.hasOwnProperty(l.route.id);return s||c}function Q1(n,i){let l=n.route.path;return n.pathname!==i.pathname||l!=null&&l.endsWith("*")&&n.params["*"]!==i.params["*"]}function Bl(n,i){if(n.route.shouldRevalidate){let l=n.route.shouldRevalidate(i);if(typeof l=="boolean")return l}return i.defaultShouldRevalidate}function py(n,i,l,s,c,f){let d;if(n){let m=s[n];Le(m,`No route found to patch children into: routeId = ${n}`),m.children||(m.children=[]),d=m.children}else d=l;let p=[],y=[];if(i.forEach(m=>{let b=d.find(g=>Tg(m,g));b?y.push({existingRoute:b,newRoute:m}):p.push(m)}),p.length>0){let m=Hl(p,c,[n||"_","patch",String(d?.length||"0")],s);d.push(...m)}if(f&&y.length>0)for(let m=0;m<y.length;m++){let{existingRoute:b,newRoute:g}=y[m],T=b,[M]=Hl([g],c,[],{},!0);Object.assign(T,{element:M.element?M.element:T.element,errorElement:M.errorElement?M.errorElement:T.errorElement,hydrateFallbackElement:M.hydrateFallbackElement?M.hydrateFallbackElement:T.hydrateFallbackElement})}}function Tg(n,i){return"id"in n&&"id"in i&&n.id===i.id?!0:n.index===i.index&&n.path===i.path&&n.caseSensitive===i.caseSensitive?(!n.children||n.children.length===0)&&(!i.children||i.children.length===0)?!0:n.children.every((l,s)=>i.children?.some(c=>Tg(l,c))):!1}var yy=new WeakMap,Rg=({key:n,route:i,manifest:l,mapRouteProperties:s})=>{let c=l[i.id];if(Le(c,"No route found in manifest"),!c.lazy||typeof c.lazy!="object")return;let f=c.lazy[n];if(!f)return;let d=yy.get(c);d||(d={},yy.set(c,d));let p=d[n];if(p)return p;let y=(async()=>{let m=i1(n),g=c[n]!==void 0&&n!=="hasErrorBoundary";if(m)Mt(!m,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),d[n]=Promise.resolve();else if(g)Mt(!1,`Route "${c.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let T=await f();T!=null&&(Object.assign(c,{[n]:T}),Object.assign(c,s(c)))}typeof c.lazy=="object"&&(c.lazy[n]=void 0,Object.values(c.lazy).every(T=>T===void 0)&&(c.lazy=void 0))})();return d[n]=y,y},gy=new WeakMap;function Y1(n,i,l,s,c){let f=l[n.id];if(Le(f,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let b=gy.get(f);if(b)return{lazyRoutePromise:b,lazyHandlerPromise:b};let g=(async()=>{Le(typeof n.lazy=="function","No lazy route function found");let T=await n.lazy(),M={};for(let U in T){let H=T[U];if(H===void 0)continue;let K=l1(U),P=f[U]!==void 0&&U!=="hasErrorBoundary";K?Mt(!K,"Route property "+U+" is not a supported property to be returned from a lazy route function. This property will be ignored."):P?Mt(!P,`Route "${f.id}" has a static property "${U}" defined but its lazy function is also returning a value for this property. The lazy route property "${U}" will be ignored.`):M[U]=H}Object.assign(f,M),Object.assign(f,{...s(f),lazy:void 0})})();return gy.set(f,g),g.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:g}}let d=Object.keys(n.lazy),p=[],y;for(let b of d){if(c&&c.includes(b))continue;let g=Rg({key:b,route:n,manifest:l,mapRouteProperties:s});g&&(p.push(g),b===i&&(y=g))}let m=p.length>0?Promise.all(p).then(()=>{}):void 0;return m?.catch(()=>{}),y?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:y}}async function vy(n){let i=n.matches.filter(c=>c.shouldLoad),l={};return(await Promise.all(i.map(c=>c.resolve()))).forEach((c,f)=>{l[i[f].route.id]=c}),l}async function G1(n){return n.matches.some(i=>i.route.middleware)?xg(n,()=>vy(n)):vy(n)}function xg(n,i){return V1(n,i,s=>{if(aE(s))throw s;return s},W1,l);function l(s,c,f){if(f)return Promise.resolve(Object.assign(f.value,{[c]:{type:"error",result:s}}));{let{matches:d}=n,p=Math.min(Math.max(d.findIndex(m=>m.route.id===c),0),Math.max(d.findIndex(m=>m.shouldCallHandler()),0)),y=oi(d,d[p].route.id).route.id;return Promise.resolve({[y]:{type:"error",result:s}})}}}async function V1(n,i,l,s,c){let{matches:f,request:d,params:p,context:y,unstable_pattern:m}=n,b=f.flatMap(T=>T.route.middleware?T.route.middleware.map(M=>[T.route.id,M]):[]);return await _g({request:d,params:p,context:y,unstable_pattern:m},b,i,l,s,c)}async function _g(n,i,l,s,c,f,d=0){let{request:p}=n;if(p.signal.aborted)throw p.signal.reason??new Error(`Request aborted: ${p.method} ${p.url}`);let y=i[d];if(!y)return await l();let[m,b]=y,g,T=async()=>{if(g)throw new Error("You may only call `next()` once per middleware");try{return g={value:await _g(n,i,l,s,c,f,d+1)},g.value}catch(M){return g={value:await f(M,m,g)},g.value}};try{let M=await b(n,T),U=M!=null?s(M):void 0;return c(U)?U:g?U??g.value:(g={value:await T()},g.value)}catch(M){return await f(M,m,g)}}function Ag(n,i,l,s,c){let f=Rg({key:"middleware",route:s.route,manifest:i,mapRouteProperties:n}),d=Y1(s.route,Pt(l.method)?"action":"loader",i,n,c);return{middleware:f,route:d.lazyRoutePromise,handler:d.lazyHandlerPromise}}function yf(n,i,l,s,c,f,d,p,y=null,m){let b=!1,g=Ag(n,i,l,c,f);return{...c,_lazyPromises:g,shouldLoad:p,shouldRevalidateArgs:y,shouldCallHandler(T){return b=!0,y?typeof m=="boolean"?Bl(c,{...y,defaultShouldRevalidate:m}):typeof T=="boolean"?Bl(c,{...y,defaultShouldRevalidate:T}):Bl(c,y):p},resolve(T){let{lazy:M,loader:U,middleware:H}=c.route,K=b||p||T&&!Pt(l.method)&&(M||U),G=H&&H.length>0&&!U&&!M;return K&&(Pt(l.method)||!G)?X1({request:l,unstable_pattern:s,match:c,lazyHandlerPromise:g?.handler,lazyRoutePromise:g?.route,handlerOverride:T,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function Dr(n,i,l,s,c,f,d,p=null){return s.map(y=>y.route.id!==c.route.id?{...y,shouldLoad:!1,shouldRevalidateArgs:p,shouldCallHandler:()=>!1,_lazyPromises:Ag(n,i,l,y,f),resolve:()=>Promise.resolve({type:"data",result:void 0})}:yf(n,i,l,Gl(s),y,f,d,!0,p))}async function K1(n,i,l,s,c,f){l.some(m=>m._lazyPromises?.middleware)&&await Promise.all(l.map(m=>m._lazyPromises?.middleware));let d={request:i,unstable_pattern:Gl(l),params:l[0].params,context:c,matches:l},y=await n({...d,fetcherKey:s,runClientMiddleware:m=>{let b=d;return xg(b,()=>m({...b,fetcherKey:s,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(l.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return y}async function X1({request:n,unstable_pattern:i,match:l,lazyHandlerPromise:s,lazyRoutePromise:c,handlerOverride:f,scopedContext:d}){let p,y,m=Pt(n.method),b=m?"action":"loader",g=T=>{let M,U=new Promise((G,P)=>M=P);y=()=>M(),n.signal.addEventListener("abort",y);let H=G=>typeof T!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${b}" [routeId: ${l.route.id}]`)):T({request:n,unstable_pattern:i,params:l.params,context:d},...G!==void 0?[G]:[]),K=(async()=>{try{return{type:"data",result:await(f?f(P=>H(P)):H())}}catch(G){return{type:"error",result:G}}})();return Promise.race([K,U])};try{let T=m?l.route.action:l.route.loader;if(s||c)if(T){let M,[U]=await Promise.all([g(T).catch(H=>{M=H}),s,c]);if(M!==void 0)throw M;p=U}else{await s;let M=m?l.route.action:l.route.loader;if(M)[p]=await Promise.all([g(M),c]);else if(b==="action"){let U=new URL(n.url),H=U.pathname+U.search;throw Bn(405,{method:n.method,pathname:H,routeId:l.route.id})}else return{type:"data",result:void 0}}else if(T)p=await g(T);else{let M=new URL(n.url),U=M.pathname+M.search;throw Bn(404,{pathname:U})}}catch(T){return{type:"error",result:T}}finally{y&&n.signal.removeEventListener("abort",y)}return p}async function F1(n){let i=n.headers.get("Content-Type");return i&&/\bapplication\/json\b/.test(i)?n.body==null?null:n.json():n.text()}async function Z1(n){let{result:i,type:l}=n;if(Lf(i)){let s;try{s=await F1(i)}catch(c){return{type:"error",error:c}}return l==="error"?{type:"error",error:new Yl(i.status,i.statusText,s),statusCode:i.status,headers:i.headers}:{type:"data",data:s,statusCode:i.status,headers:i.headers}}return l==="error"?Ry(i)?i.data instanceof Error?{type:"error",error:i.data,statusCode:i.init?.status,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:$1(i),statusCode:Ql(i)?i.status:void 0,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:i,statusCode:Ql(i)?i.status:void 0}:Ry(i)?{type:"data",data:i.data,statusCode:i.init?.status,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"data",data:i}}function P1(n,i,l,s,c){let f=n.headers.get("Location");if(Le(f,"Redirects returned/thrown from loaders/actions must have a Location header"),!zf(f)){let d=s.slice(0,s.findIndex(p=>p.route.id===l)+1);f=mf(new URL(i.url),d,c,f),n.headers.set("Location",f)}return n}function by(n,i,l,s){let c=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(zf(n)){let f=n,d=f.startsWith("//")?new URL(i.protocol+f):new URL(f);if(c.includes(d.protocol))throw new Error("Invalid redirect location");let p=Hn(d.pathname,l)!=null;if(d.origin===i.origin&&p)return d.pathname+d.search+d.hash}try{let f=s.createURL(n);if(c.includes(f.protocol))throw new Error("Invalid redirect location")}catch{}return n}function Cr(n,i,l,s){let c=n.createURL(Cg(i)).toString(),f={signal:l};if(s&&Pt(s.formMethod)){let{formMethod:d,formEncType:p}=s;f.method=d.toUpperCase(),p==="application/json"?(f.headers=new Headers({"Content-Type":p}),f.body=JSON.stringify(s.json)):p==="text/plain"?f.body=s.text:p==="application/x-www-form-urlencoded"&&s.formData?f.body=gf(s.formData):f.body=s.formData}return new Request(c,f)}function gf(n){let i=new URLSearchParams;for(let[l,s]of n.entries())i.append(l,typeof s=="string"?s:s.name);return i}function Sy(n){let i=new FormData;for(let[l,s]of n.entries())i.append(l,s);return i}function J1(n,i,l,s=!1,c=!1){let f={},d=null,p,y=!1,m={},b=l&&Tn(l[1])?l[1].error:void 0;return n.forEach(g=>{if(!(g.route.id in i))return;let T=g.route.id,M=i[T];if(Le(!qi(M),"Cannot handle redirect results in processLoaderData"),Tn(M)){let U=M.error;if(b!==void 0&&(U=b,b=void 0),d=d||{},c)d[T]=U;else{let H=oi(n,T);d[H.route.id]==null&&(d[H.route.id]=U)}s||(f[T]=wg),y||(y=!0,p=Ql(M.error)?M.error.status:500),M.headers&&(m[T]=M.headers)}else f[T]=M.data,M.statusCode&&M.statusCode!==200&&!y&&(p=M.statusCode),M.headers&&(m[T]=M.headers)}),b!==void 0&&l&&(d={[l[0]]:b},l[2]&&(f[l[2]]=void 0)),{loaderData:f,errors:d,statusCode:p||200,loaderHeaders:m}}function Ey(n,i,l,s,c,f){let{loaderData:d,errors:p}=J1(i,l,s);return c.filter(y=>!y.matches||y.matches.some(m=>m.shouldLoad)).forEach(y=>{let{key:m,match:b,controller:g}=y;if(g&&g.signal.aborted)return;let T=f[m];if(Le(T,"Did not find corresponding fetcher result"),Tn(T)){let M=oi(n.matches,b?.route.id);p&&p[M.route.id]||(p={...p,[M.route.id]:T.error}),n.fetchers.delete(m)}else if(qi(T))Le(!1,"Unhandled fetcher revalidation redirect");else{let M=ka(T.data);n.fetchers.set(m,M)}}),{loaderData:d,errors:p}}function wy(n,i,l,s){let c=Object.entries(i).filter(([,f])=>f!==wg).reduce((f,[d,p])=>(f[d]=p,f),{});for(let f of l){let d=f.route.id;if(!i.hasOwnProperty(d)&&n.hasOwnProperty(d)&&f.route.loader&&(c[d]=n[d]),s&&s.hasOwnProperty(d))break}return c}function Ty(n){return n?Tn(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function oi(n,i){return(i?n.slice(0,n.findIndex(s=>s.route.id===i)+1):[...n]).reverse().find(s=>s.route.hasErrorBoundary===!0)||n[0]}function lo(n){let i=n.length===1?n[0]:n.find(l=>l.index||!l.path||l.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:i}],route:i}}function Bn(n,{pathname:i,routeId:l,method:s,type:c,message:f}={}){let d="Unknown Server Error",p="Unknown @remix-run/router error";return n===400?(d="Bad Request",s&&i&&l?p=`You made a ${s} request to "${i}" but did not provide a \`loader\` for route "${l}", so there is no way to handle the request.`:c==="invalid-body"&&(p="Unable to encode submission body")):n===403?(d="Forbidden",p=`Route "${l}" does not match URL "${i}"`):n===404?(d="Not Found",p=`No route matches URL "${i}"`):n===405&&(d="Method Not Allowed",s&&i&&l?p=`You made a ${s.toUpperCase()} request to "${i}" but did not provide an \`action\` for route "${l}", so there is no way to handle the request.`:s&&(p=`Invalid request method "${s.toUpperCase()}"`)),new Yl(n||500,d,new Error(p),!0)}function so(n){let i=Object.entries(n);for(let l=i.length-1;l>=0;l--){let[s,c]=i[l];if(qi(c))return{key:s,result:c}}}function Cg(n){let i=typeof n=="string"?di(n):n;return oa({...i,hash:""})}function I1(n,i){return n.pathname!==i.pathname||n.search!==i.search?!1:n.hash===""?i.hash!=="":n.hash===i.hash?!0:i.hash!==""}function $1(n){return new Yl(n.init?.status??500,n.init?.statusText??"Internal Server Error",n.data)}function W1(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([i,l])=>typeof i=="string"&&eE(l))}function eE(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function tE(n){return Lf(n.result)&&Sg.has(n.result.status)}function Tn(n){return n.type==="error"}function qi(n){return(n&&n.type)==="redirect"}function Ry(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function Lf(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function nE(n){return Sg.has(n)}function aE(n){return Lf(n)&&nE(n.status)&&n.headers.has("Location")}function iE(n){return k1.has(n.toUpperCase())}function Pt(n){return z1.has(n.toUpperCase())}function Bf(n){return new URLSearchParams(n).getAll("index").some(i=>i==="")}function yo(n,i){let l=typeof i=="string"?di(i).search:i.search;if(n[n.length-1].route.index&&Bf(l||""))return n[n.length-1];let s=pg(n);return s[s.length-1]}function xy(n){let{formMethod:i,formAction:l,formEncType:s,text:c,formData:f,json:d}=n;if(!(!i||!l||!s)){if(c!=null)return{formMethod:i,formAction:l,formEncType:s,formData:void 0,json:void 0,text:c};if(f!=null)return{formMethod:i,formAction:l,formEncType:s,formData:f,json:void 0,text:void 0};if(d!==void 0)return{formMethod:i,formAction:l,formEncType:s,formData:void 0,json:d,text:void 0}}}function Pc(n,i){return i?{state:"loading",location:n,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function rE(n,i){return{state:"submitting",location:n,formMethod:i.formMethod,formAction:i.formAction,formEncType:i.formEncType,formData:i.formData,json:i.json,text:i.text}}function Ol(n,i){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:i}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:i}}function lE(n,i){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:i?i.data:void 0}}function ka(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 sE(n,i){try{let l=n.sessionStorage.getItem(Eg);if(l){let s=JSON.parse(l);for(let[c,f]of Object.entries(s||{}))f&&Array.isArray(f)&&i.set(c,new Set(f||[]))}}catch{}}function oE(n,i){if(i.size>0){let l={};for(let[s,c]of i)l[s]=[...c];try{n.sessionStorage.setItem(Eg,JSON.stringify(l))}catch(s){Mt(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function _y(){let n,i,l=new Promise((s,c)=>{n=async f=>{s(f);try{await l}catch{}},i=async f=>{c(f);try{await l}catch{}}});return{promise:l,resolve:n,reject:i}}var Gi=x.createContext(null);Gi.displayName="DataRouter";var Vl=x.createContext(null);Vl.displayName="DataRouterState";var Og=x.createContext(!1);function uE(){return x.useContext(Og)}var jf=x.createContext({isTransitioning:!1});jf.displayName="ViewTransition";var Mg=x.createContext(new Map);Mg.displayName="Fetchers";var cE=x.createContext(null);cE.displayName="Await";var Qn=x.createContext(null);Qn.displayName="Navigation";var Mo=x.createContext(null);Mo.displayName="Location";var $n=x.createContext({outlet:null,matches:[],isDataRoute:!1});$n.displayName="Route";var qf=x.createContext(null);qf.displayName="RouteError";var Dg="REACT_ROUTER_ERROR",fE="REDIRECT",dE="ROUTE_ERROR_RESPONSE";function hE(n){if(n.startsWith(`${Dg}:${fE}:{`))try{let i=JSON.parse(n.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function mE(n){if(n.startsWith(`${Dg}:${dE}:{`))try{let i=JSON.parse(n.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new Yl(i.status,i.statusText,i.data)}catch{}}function pE(n,{relative:i}={}){Le(Kl(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:s}=x.useContext(Qn),{hash:c,pathname:f,search:d}=Xl(n,{relative:i}),p=f;return l!=="/"&&(p=f==="/"?l:sa([l,f])),s.createHref({pathname:p,search:d,hash:c})}function Kl(){return x.useContext(Mo)!=null}function Vi(){return Le(Kl(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(Mo).location}var zg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ng(n){x.useContext(Qn).static||x.useLayoutEffect(n)}function kg(){let{isDataRoute:n}=x.useContext($n);return n?DE():yE()}function yE(){Le(Kl(),"useNavigate() may be used only in the context of a <Router> component.");let n=x.useContext(Gi),{basename:i,navigator:l}=x.useContext(Qn),{matches:s}=x.useContext($n),{pathname:c}=Vi(),f=JSON.stringify(Nf(s)),d=x.useRef(!1);return Ng(()=>{d.current=!0}),x.useCallback((y,m={})=>{if(Mt(d.current,zg),!d.current)return;if(typeof y=="number"){l.go(y);return}let b=kf(y,JSON.parse(f),c,m.relative==="path");n==null&&i!=="/"&&(b.pathname=b.pathname==="/"?i:sa([i,b.pathname])),(m.replace?l.replace:l.push)(b,m.state,m)},[i,l,f,c,n])}var gE=x.createContext(null);function vE(n){let i=x.useContext($n).outlet;return x.useMemo(()=>i&&x.createElement(gE.Provider,{value:n},i),[i,n])}function bE(){let{matches:n}=x.useContext($n),i=n[n.length-1];return i?i.params:{}}function Xl(n,{relative:i}={}){let{matches:l}=x.useContext($n),{pathname:s}=Vi(),c=JSON.stringify(Nf(l));return x.useMemo(()=>kf(n,JSON.parse(c),s,i==="path"),[n,c,s,i])}function SE(n,i,l,s,c){Le(Kl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=x.useContext(Qn),{matches:d}=x.useContext($n),p=d[d.length-1],y=p?p.params:{},m=p?p.pathname:"/",b=p?p.pathnameBase:"/",g=p&&p.route;{let P=g&&g.path||"";Lg(m,!g||P.endsWith("*")||P.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${P}">) 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="${P}"> to <Route path="${P==="/"?"*":`${P}/*`}">.`)}let T=Vi(),M;M=T;let U=M.pathname||"/",H=U;if(b!=="/"){let P=b.replace(/^\//,"").split("/");H="/"+U.replace(/^\//,"").split("/").slice(P.length).join("/")}let K=si(n,{pathname:H});return Mt(g||K!=null,`No routes matched location "${M.pathname}${M.search}${M.hash}" `),Mt(K==null||K[K.length-1].route.element!==void 0||K[K.length-1].route.Component!==void 0||K[K.length-1].route.lazy!==void 0,`Matched leaf route at location "${M.pathname}${M.search}${M.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.`),xE(K&&K.map(P=>Object.assign({},P,{params:Object.assign({},y,P.params),pathname:sa([b,f.encodeLocation?f.encodeLocation(P.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?b:sa([b,f.encodeLocation?f.encodeLocation(P.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathnameBase])})),d,l,s,c)}function EE(){let n=ME(),i=Ql(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),l=n instanceof Error?n.stack:null,s="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:s},f={padding:"2px 4px",backgroundColor:s},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:f},"ErrorBoundary")," or"," ",x.createElement("code",{style:f},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},i),l?x.createElement("pre",{style:c},l):null,d)}var wE=x.createElement(EE,null),Ug=class extends x.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,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){this.props.onError?this.props.onError(n,i):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 l=mE(n.digest);l&&(n=l)}let i=n!==void 0?x.createElement($n.Provider,{value:this.props.routeContext},x.createElement(qf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?x.createElement(TE,{error:n},i):i}};Ug.contextType=Og;var Jc=new WeakMap;function TE({children:n,error:i}){let{basename:l}=x.useContext(Qn);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let s=hE(i.digest);if(s){let c=Jc.get(i);if(c)throw c;let f=gg(s.location,l);if(yg&&!Jc.get(i))if(f.isExternal||s.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:s.replace}));throw Jc.set(i,d),d}return x.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return n}function RE({routeContext:n,match:i,children:l}){let s=x.useContext(Gi);return s&&s.static&&s.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=i.route.id),x.createElement($n.Provider,{value:n},l)}function xE(n,i=[],l=null,s=null,c=null){if(n==null){if(!l)return null;if(l.errors)n=l.matches;else if(i.length===0&&!l.initialized&&l.matches.length>0)n=l.matches;else return null}let f=n,d=l?.errors;if(d!=null){let b=f.findIndex(g=>g.route.id&&d?.[g.route.id]!==void 0);Le(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),f=f.slice(0,Math.min(f.length,b+1))}let p=!1,y=-1;if(l)for(let b=0;b<f.length;b++){let g=f[b];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(y=b),g.route.id){let{loaderData:T,errors:M}=l,U=g.route.loader&&!T.hasOwnProperty(g.route.id)&&(!M||M[g.route.id]===void 0);if(g.route.lazy||U){p=!0,y>=0?f=f.slice(0,y+1):f=[f[0]];break}}}let m=l&&s?(b,g)=>{s(b,{location:l.location,params:l.matches?.[0]?.params??{},unstable_pattern:Gl(l.matches),errorInfo:g})}:void 0;return f.reduceRight((b,g,T)=>{let M,U=!1,H=null,K=null;l&&(M=d&&g.route.id?d[g.route.id]:void 0,H=g.route.errorElement||wE,p&&(y<0&&T===0?(Lg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),U=!0,K=null):y===T&&(U=!0,K=g.route.hydrateFallbackElement||null)));let G=i.concat(f.slice(0,T+1)),P=()=>{let I;return M?I=H:U?I=K:g.route.Component?I=x.createElement(g.route.Component,null):g.route.element?I=g.route.element:I=b,x.createElement(RE,{match:g,routeContext:{outlet:b,matches:G,isDataRoute:l!=null},children:I})};return l&&(g.route.ErrorBoundary||g.route.errorElement||T===0)?x.createElement(Ug,{location:l.location,revalidation:l.revalidation,component:H,error:M,children:P(),routeContext:{outlet:null,matches:G,isDataRoute:!0},onError:m}):P()},null)}function Hf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _E(n){let i=x.useContext(Gi);return Le(i,Hf(n)),i}function AE(n){let i=x.useContext(Vl);return Le(i,Hf(n)),i}function CE(n){let i=x.useContext($n);return Le(i,Hf(n)),i}function Qf(n){let i=CE(n),l=i.matches[i.matches.length-1];return Le(l.route.id,`${n} can only be used on routes that contain a unique "id"`),l.route.id}function OE(){return Qf("useRouteId")}function ME(){let n=x.useContext(qf),i=AE("useRouteError"),l=Qf("useRouteError");return n!==void 0?n:i.errors?.[l]}function DE(){let{router:n}=_E("useNavigate"),i=Qf("useNavigate"),l=x.useRef(!1);return Ng(()=>{l.current=!0}),x.useCallback(async(c,f={})=>{Mt(l.current,zg),l.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:i,...f}))},[n,i])}var Ay={};function Lg(n,i,l){!i&&!Ay[n]&&(Ay[n]=!0,Mt(!1,l))}var Cy={};function Oy(n,i){!n&&!Cy[i]&&(Cy[i]=!0,console.warn(i))}var zE="useOptimistic",My=zb[zE],NE=()=>{};function kE(n){return My?My(n):[n,NE]}function UE(n){let i={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&Mt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(i,{element:x.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&Mt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(i,{hydrateFallbackElement:x.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&Mt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(i,{errorElement:x.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),i}var LE=["HydrateFallback","hydrateFallbackElement"],BE=class{constructor(){this.status="pending",this.promise=new Promise((n,i)=>{this.resolve=l=>{this.status==="pending"&&(this.status="resolved",n(l))},this.reject=l=>{this.status==="pending"&&(this.status="rejected",i(l))}})}};function jE({router:n,flushSync:i,onError:l,unstable_useTransitions:s}){s=uE()||s;let[f,d]=x.useState(n.state),[p,y]=kE(f),[m,b]=x.useState(),[g,T]=x.useState({isTransitioning:!1}),[M,U]=x.useState(),[H,K]=x.useState(),[G,P]=x.useState(),I=x.useRef(new Map),ye=x.useCallback((Y,{deletedFetchers:se,newErrors:Ce,flushSync:Ae,viewTransitionOpts:Re})=>{Ce&&l&&Object.values(Ce).forEach(Ue=>l(Ue,{location:Y.location,params:Y.matches[0]?.params??{},unstable_pattern:Gl(Y.matches)})),Y.fetchers.forEach((Ue,Ee)=>{Ue.data!==void 0&&I.current.set(Ee,Ue.data)}),se.forEach(Ue=>I.current.delete(Ue)),Oy(Ae===!1||i!=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 ke=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(Oy(Re==null||ke,"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."),!Re||!ke){i&&Ae?i(()=>d(Y)):s===!1?d(Y):x.startTransition(()=>{s===!0&&y(Ue=>Dy(Ue,Y)),d(Y)});return}if(i&&Ae){i(()=>{H&&(M?.resolve(),H.skipTransition()),T({isTransitioning:!0,flushSync:!0,currentLocation:Re.currentLocation,nextLocation:Re.nextLocation})});let Ue=n.window.document.startViewTransition(()=>{i(()=>d(Y))});Ue.finished.finally(()=>{i(()=>{U(void 0),K(void 0),b(void 0),T({isTransitioning:!1})})}),i(()=>K(Ue));return}H?(M?.resolve(),H.skipTransition(),P({state:Y,currentLocation:Re.currentLocation,nextLocation:Re.nextLocation})):(b(Y),T({isTransitioning:!0,flushSync:!1,currentLocation:Re.currentLocation,nextLocation:Re.nextLocation}))},[n.window,i,H,M,s,y,l]);x.useLayoutEffect(()=>n.subscribe(ye),[n,ye]),x.useEffect(()=>{g.isTransitioning&&!g.flushSync&&U(new BE)},[g]),x.useEffect(()=>{if(M&&m&&n.window){let Y=m,se=M.promise,Ce=n.window.document.startViewTransition(async()=>{s===!1?d(Y):x.startTransition(()=>{s===!0&&y(Ae=>Dy(Ae,Y)),d(Y)}),await se});Ce.finished.finally(()=>{U(void 0),K(void 0),b(void 0),T({isTransitioning:!1})}),K(Ce)}},[m,M,n.window,s,y]),x.useEffect(()=>{M&&m&&p.location.key===m.location.key&&M.resolve()},[M,H,p.location,m]),x.useEffect(()=>{!g.isTransitioning&&G&&(b(G.state),T({isTransitioning:!0,flushSync:!1,currentLocation:G.currentLocation,nextLocation:G.nextLocation}),P(void 0))},[g.isTransitioning,G]);let de=x.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:Y=>n.navigate(Y),push:(Y,se,Ce)=>n.navigate(Y,{state:se,preventScrollReset:Ce?.preventScrollReset}),replace:(Y,se,Ce)=>n.navigate(Y,{replace:!0,state:se,preventScrollReset:Ce?.preventScrollReset})}),[n]),he=n.basename||"/",A=x.useMemo(()=>({router:n,navigator:de,static:!1,basename:he,onError:l}),[n,de,he,l]);return x.createElement(x.Fragment,null,x.createElement(Gi.Provider,{value:A},x.createElement(Vl.Provider,{value:p},x.createElement(Mg.Provider,{value:I.current},x.createElement(jf.Provider,{value:g},x.createElement(YE,{basename:he,location:p.location,navigationType:p.historyAction,navigator:de,unstable_useTransitions:s},x.createElement(qE,{routes:n.routes,future:n.future,state:p,onError:l})))))),null)}function Dy(n,i){return{...n,navigation:i.navigation.state!=="idle"?i.navigation:n.navigation,revalidation:i.revalidation!=="idle"?i.revalidation:n.revalidation,actionData:i.navigation.state!=="submitting"?i.actionData:n.actionData,fetchers:i.fetchers}}var qE=x.memo(HE);function HE({routes:n,future:i,state:l,onError:s}){return SE(n,void 0,l,s,i)}function QE(n){return vE(n.context)}function YE({basename:n="/",children:i=null,location:l,navigationType:s="POP",navigator:c,static:f=!1,unstable_useTransitions:d}){Le(!Kl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=n.replace(/^\/*/,"/"),y=x.useMemo(()=>({basename:p,navigator:c,static:f,unstable_useTransitions:d,future:{}}),[p,c,f,d]);typeof l=="string"&&(l=di(l));let{pathname:m="/",search:b="",hash:g="",state:T=null,key:M="default"}=l,U=x.useMemo(()=>{let H=Hn(m,p);return H==null?null:{location:{pathname:H,search:b,hash:g,state:T,key:M},navigationType:s}},[p,m,b,g,T,M,s]);return Mt(U!=null,`<Router basename="${p}"> is not able to match the URL "${m}${b}${g}" because it does not start with the basename, so the <Router> won't render anything.`),U==null?null:x.createElement(Qn.Provider,{value:y},x.createElement(Mo.Provider,{children:i,value:U}))}var go="get",vo="application/x-www-form-urlencoded";function Do(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function GE(n){return Do(n)&&n.tagName.toLowerCase()==="button"}function VE(n){return Do(n)&&n.tagName.toLowerCase()==="form"}function KE(n){return Do(n)&&n.tagName.toLowerCase()==="input"}function XE(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function FE(n,i){return n.button===0&&(!i||i==="_self")&&!XE(n)}var oo=null;function ZE(){if(oo===null)try{new FormData(document.createElement("form"),0),oo=!1}catch{oo=!0}return oo}var PE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ic(n){return n!=null&&!PE.has(n)?(Mt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${vo}"`),null):n}function JE(n,i){let l,s,c,f,d;if(VE(n)){let p=n.getAttribute("action");s=p?Hn(p,i):null,l=n.getAttribute("method")||go,c=Ic(n.getAttribute("enctype"))||vo,f=new FormData(n)}else if(GE(n)||KE(n)&&(n.type==="submit"||n.type==="image")){let p=n.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=n.getAttribute("formaction")||p.getAttribute("action");if(s=y?Hn(y,i):null,l=n.getAttribute("formmethod")||p.getAttribute("method")||go,c=Ic(n.getAttribute("formenctype"))||Ic(p.getAttribute("enctype"))||vo,f=new FormData(p,n),!ZE()){let{name:m,type:b,value:g}=n;if(b==="image"){let T=m?`${m}.`:"";f.append(`${T}x`,"0"),f.append(`${T}y`,"0")}else m&&f.append(m,g)}}else{if(Do(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=go,s=null,c=vo,d=n}return f&&c==="text/plain"&&(d=f,f=void 0),{action:s,method:l.toLowerCase(),encType:c,formData:f,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Yf(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function IE(n,i,l,s){let c=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return l?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${s}`:c.pathname=`${c.pathname}.${s}`:c.pathname==="/"?c.pathname=`_root.${s}`:i&&Hn(c.pathname,i)==="/"?c.pathname=`${i.replace(/\/$/,"")}/_root.${s}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${s}`,c}async function $E(n,i){if(n.id in i)return i[n.id];try{let l=await import(n.module);return i[n.id]=l,l}catch(l){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(l),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function WE(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 ew(n,i,l){let s=await Promise.all(n.map(async c=>{let f=i.routes[c.route.id];if(f){let d=await $E(f,l);return d.links?d.links():[]}return[]}));return iw(s.flat(1).filter(WE).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function zy(n,i,l,s,c,f){let d=(y,m)=>l[m]?y.route.id!==l[m].route.id:!0,p=(y,m)=>l[m].pathname!==y.pathname||l[m].route.path?.endsWith("*")&&l[m].params["*"]!==y.params["*"];return f==="assets"?i.filter((y,m)=>d(y,m)||p(y,m)):f==="data"?i.filter((y,m)=>{let b=s.routes[y.route.id];if(!b||!b.hasLoader)return!1;if(d(y,m)||p(y,m))return!0;if(y.route.shouldRevalidate){let g=y.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:l[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function tw(n,i,{includeHydrateFallback:l}={}){return nw(n.map(s=>{let c=i.routes[s.route.id];if(!c)return[];let f=[c.module];return c.clientActionModule&&(f=f.concat(c.clientActionModule)),c.clientLoaderModule&&(f=f.concat(c.clientLoaderModule)),l&&c.hydrateFallbackModule&&(f=f.concat(c.hydrateFallbackModule)),c.imports&&(f=f.concat(c.imports)),f}).flat(1))}function nw(n){return[...new Set(n)]}function aw(n){let i={},l=Object.keys(n).sort();for(let s of l)i[s]=n[s];return i}function iw(n,i){let l=new Set;return new Set(i),n.reduce((s,c)=>{let f=JSON.stringify(aw(c));return l.has(f)||(l.add(f),s.push({key:f,link:c})),s},[])}function Bg(){let n=x.useContext(Gi);return Yf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function rw(){let n=x.useContext(Vl);return Yf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Gf=x.createContext(void 0);Gf.displayName="FrameworkContext";function jg(){let n=x.useContext(Gf);return Yf(n,"You must render this element inside a <HydratedRouter> element"),n}function lw(n,i){let l=x.useContext(Gf),[s,c]=x.useState(!1),[f,d]=x.useState(!1),{onFocus:p,onBlur:y,onMouseEnter:m,onMouseLeave:b,onTouchStart:g}=i,T=x.useRef(null);x.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let H=G=>{G.forEach(P=>{d(P.isIntersecting)})},K=new IntersectionObserver(H,{threshold:.5});return T.current&&K.observe(T.current),()=>{K.disconnect()}}},[n]),x.useEffect(()=>{if(s){let H=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(H)}}},[s]);let M=()=>{c(!0)},U=()=>{c(!1),d(!1)};return l?n!=="intent"?[f,T,{}]:[f,T,{onFocus:Ml(p,M),onBlur:Ml(y,U),onMouseEnter:Ml(m,M),onMouseLeave:Ml(b,U),onTouchStart:Ml(g,M)}]:[!1,T,{}]}function Ml(n,i){return l=>{n&&n(l),l.defaultPrevented||i(l)}}function sw({page:n,...i}){let{router:l}=Bg(),s=x.useMemo(()=>si(l.routes,n,l.basename),[l.routes,n,l.basename]);return s?x.createElement(uw,{page:n,matches:s,...i}):null}function ow(n){let{manifest:i,routeModules:l}=jg(),[s,c]=x.useState([]);return x.useEffect(()=>{let f=!1;return ew(n,i,l).then(d=>{f||c(d)}),()=>{f=!0}},[n,i,l]),s}function uw({page:n,matches:i,...l}){let s=Vi(),{future:c,manifest:f,routeModules:d}=jg(),{basename:p}=Bg(),{loaderData:y,matches:m}=rw(),b=x.useMemo(()=>zy(n,i,m,f,s,"data"),[n,i,m,f,s]),g=x.useMemo(()=>zy(n,i,m,f,s,"assets"),[n,i,m,f,s]),T=x.useMemo(()=>{if(n===s.pathname+s.search+s.hash)return[];let H=new Set,K=!1;if(i.forEach(P=>{let I=f.routes[P.route.id];!I||!I.hasLoader||(!b.some(ye=>ye.route.id===P.route.id)&&P.route.id in y&&d[P.route.id]?.shouldRevalidate||I.hasClientLoader?K=!0:H.add(P.route.id))}),H.size===0)return[];let G=IE(n,p,c.unstable_trailingSlashAwareDataRequests,"data");return K&&H.size>0&&G.searchParams.set("_routes",i.filter(P=>H.has(P.route.id)).map(P=>P.route.id).join(",")),[G.pathname+G.search]},[p,c.unstable_trailingSlashAwareDataRequests,y,s,f,b,i,n,d]),M=x.useMemo(()=>tw(g,f),[g,f]),U=ow(g);return x.createElement(x.Fragment,null,T.map(H=>x.createElement("link",{key:H,rel:"prefetch",as:"fetch",href:H,...l})),M.map(H=>x.createElement("link",{key:H,rel:"modulepreload",href:H,...l})),U.map(({key:H,link:K})=>x.createElement("link",{key:H,nonce:l.nonce,...K,crossOrigin:K.crossOrigin??l.crossOrigin})))}function cw(...n){return i=>{n.forEach(l=>{typeof l=="function"?l(i):l!=null&&(l.current=i)})}}var fw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{fw&&(window.__reactRouterVersion="7.13.0")}catch{}function dw(n,i){return j1({basename:i?.basename,getContext:i?.getContext,future:i?.future,history:e1({window:i?.window}),hydrationData:hw(),routes:n,mapRouteProperties:UE,hydrationRouteProperties:LE,dataStrategy:i?.dataStrategy,patchRoutesOnNavigation:i?.patchRoutesOnNavigation,window:i?.window,unstable_instrumentations:i?.unstable_instrumentations}).initialize()}function hw(){let n=window?.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:mw(n.errors)}),n}function mw(n){if(!n)return null;let i=Object.entries(n),l={};for(let[s,c]of i)if(c&&c.__type==="RouteErrorResponse")l[s]=new Yl(c.status,c.statusText,c.data,c.internal===!0);else if(c&&c.__type==="Error"){if(c.__subType){let f=window[c.__subType];if(typeof f=="function")try{let d=new f(c.message);d.stack="",l[s]=d}catch{}}if(l[s]==null){let f=new Error(c.message);f.stack="",l[s]=f}}else l[s]=c;return l}var qg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hg=x.forwardRef(function({onClick:i,discover:l="render",prefetch:s="none",relative:c,reloadDocument:f,replace:d,state:p,target:y,to:m,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:T,...M},U){let{basename:H,unstable_useTransitions:K}=x.useContext(Qn),G=typeof m=="string"&&qg.test(m),P=gg(m,H);m=P.to;let I=pE(m,{relative:c}),[ye,de,he]=lw(s,M),A=vw(m,{replace:d,state:p,target:y,preventScrollReset:b,relative:c,viewTransition:g,unstable_defaultShouldRevalidate:T,unstable_useTransitions:K});function Y(Ce){i&&i(Ce),Ce.defaultPrevented||A(Ce)}let se=x.createElement("a",{...M,...he,href:P.absoluteURL||I,onClick:P.isExternal||f?i:Y,ref:cw(U,de),target:y,"data-discover":!G&&l==="render"?"true":void 0});return ye&&!G?x.createElement(x.Fragment,null,se,x.createElement(sw,{page:I})):se});Hg.displayName="Link";var pw=x.forwardRef(function({"aria-current":i="page",caseSensitive:l=!1,className:s="",end:c=!1,style:f,to:d,viewTransition:p,children:y,...m},b){let g=Xl(d,{relative:m.relative}),T=Vi(),M=x.useContext(Vl),{navigator:U,basename:H}=x.useContext(Qn),K=M!=null&&Tw(g)&&p===!0,G=U.encodeLocation?U.encodeLocation(g).pathname:g.pathname,P=T.pathname,I=M&&M.navigation&&M.navigation.location?M.navigation.location.pathname:null;l||(P=P.toLowerCase(),I=I?I.toLowerCase():null,G=G.toLowerCase()),I&&H&&(I=Hn(I,H)||I);const ye=G!=="/"&&G.endsWith("/")?G.length-1:G.length;let de=P===G||!c&&P.startsWith(G)&&P.charAt(ye)==="/",he=I!=null&&(I===G||!c&&I.startsWith(G)&&I.charAt(G.length)==="/"),A={isActive:de,isPending:he,isTransitioning:K},Y=de?i:void 0,se;typeof s=="function"?se=s(A):se=[s,de?"active":null,he?"pending":null,K?"transitioning":null].filter(Boolean).join(" ");let Ce=typeof f=="function"?f(A):f;return x.createElement(Hg,{...m,"aria-current":Y,className:se,ref:b,style:Ce,to:d,viewTransition:p},typeof y=="function"?y(A):y)});pw.displayName="NavLink";var yw=x.forwardRef(({discover:n="render",fetcherKey:i,navigate:l,reloadDocument:s,replace:c,state:f,method:d=go,action:p,onSubmit:y,relative:m,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:T,...M},U)=>{let{unstable_useTransitions:H}=x.useContext(Qn),K=Ew(),G=ww(p,{relative:m}),P=d.toLowerCase()==="get"?"get":"post",I=typeof p=="string"&&qg.test(p),ye=de=>{if(y&&y(de),de.defaultPrevented)return;de.preventDefault();let he=de.nativeEvent.submitter,A=he?.getAttribute("formmethod")||d,Y=()=>K(he||de.currentTarget,{fetcherKey:i,method:A,navigate:l,replace:c,state:f,relative:m,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:T});H&&l!==!1?x.startTransition(()=>Y()):Y()};return x.createElement("form",{ref:U,method:P,action:G,onSubmit:s?y:ye,...M,"data-discover":!I&&n==="render"?"true":void 0})});yw.displayName="Form";function gw(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Qg(n){let i=x.useContext(Gi);return Le(i,gw(n)),i}function vw(n,{target:i,replace:l,state:s,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:p,unstable_useTransitions:y}={}){let m=kg(),b=Vi(),g=Xl(n,{relative:f});return x.useCallback(T=>{if(FE(T,i)){T.preventDefault();let M=l!==void 0?l:oa(b)===oa(g),U=()=>m(n,{replace:M,state:s,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:p});y?x.startTransition(()=>U()):U()}},[b,m,g,l,s,i,n,c,f,d,p,y])}var bw=0,Sw=()=>`__${String(++bw)}__`;function Ew(){let{router:n}=Qg("useSubmit"),{basename:i}=x.useContext(Qn),l=OE(),s=n.fetch,c=n.navigate;return x.useCallback(async(f,d={})=>{let{action:p,method:y,encType:m,formData:b,body:g}=JE(f,i);if(d.navigate===!1){let T=d.fetcherKey||Sw();await s(T,l,d.action||p,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:b,body:g,formMethod:d.method||y,formEncType:d.encType||m,flushSync:d.flushSync})}else await c(d.action||p,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:b,body:g,formMethod:d.method||y,formEncType:d.encType||m,replace:d.replace,state:d.state,fromRouteId:l,flushSync:d.flushSync,viewTransition:d.viewTransition})},[s,c,i,l])}function ww(n,{relative:i}={}){let{basename:l}=x.useContext(Qn),s=x.useContext($n);Le(s,"useFormAction must be used inside a RouteContext");let[c]=s.matches.slice(-1),f={...Xl(n||".",{relative:i})},d=Vi();if(n==null){f.search=d.search;let p=new URLSearchParams(f.search),y=p.getAll("index");if(y.some(b=>b==="")){p.delete("index"),y.filter(g=>g).forEach(g=>p.append("index",g));let b=p.toString();f.search=b?`?${b}`:""}}return(!n||n===".")&&c.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(f.pathname=f.pathname==="/"?l:sa([l,f.pathname])),oa(f)}function Tw(n,{relative:i}={}){let l=x.useContext(jf);Le(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=Qg("useViewTransitionState"),c=Xl(n,{relative:i});if(!l.isTransitioning)return!1;let f=Hn(l.currentLocation.pathname,s)||l.currentLocation.pathname,d=Hn(l.nextLocation.pathname,s)||l.nextLocation.pathname;return Ao(c.pathname,d)!=null||Ao(c.pathname,f)!=null}function Rw(n){return x.createElement(jE,{flushSync:ug.flushSync,...n})}const Yg=(...n)=>n.filter((i,l,s)=>!!i&&i.trim()!==""&&s.indexOf(i)===l).join(" ").trim();const xw=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const _w=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,l,s)=>s?s.toUpperCase():l.toLowerCase());const Ny=n=>{const i=_w(n);return i.charAt(0).toUpperCase()+i.slice(1)};var Aw={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 Cw=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};const Ow=x.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:l=2,absoluteStrokeWidth:s,className:c="",children:f,iconNode:d,...p},y)=>x.createElement("svg",{ref:y,...Aw,width:i,height:i,stroke:n,strokeWidth:s?Number(l)*24/Number(i):l,className:Yg("lucide",c),...!f&&!Cw(p)&&{"aria-hidden":"true"},...p},[...d.map(([m,b])=>x.createElement(m,b)),...Array.isArray(f)?f:[f]]));const Ki=(n,i)=>{const l=x.forwardRef(({className:s,...c},f)=>x.createElement(Ow,{ref:f,iconNode:i,className:Yg(`lucide-${xw(Ny(n))}`,`lucide-${n}`,s),...c}));return l.displayName=Ny(n),l};const Mw=[["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"}]],Dw=Ki("bell",Mw);const zw=[["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"}]],Nw=Ki("cpu",zw);const kw=[["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"}]],Uw=Ki("folder-git-2",kw);const Lw=[["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"}]],Bw=Ki("languages",Lw);const jw=[["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"}]],qw=Ki("settings",jw);const Hw=[["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"}]],Qw=Ki("users",Hw);const Yw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Gw=Ki("x",Yw),ky=n=>{let i;const l=new Set,s=(m,b)=>{const g=typeof m=="function"?m(i):m;if(!Object.is(g,i)){const T=i;i=b??(typeof g!="object"||g===null)?g:Object.assign({},i,g),l.forEach(M=>M(i,T))}},c=()=>i,p={setState:s,getState:c,getInitialState:()=>y,subscribe:m=>(l.add(m),()=>l.delete(m))},y=i=n(s,c,p);return p},Vw=(n=>n?ky(n):ky),Kw=n=>n;function Xw(n,i=Kw){const l=W.useSyncExternalStore(n.subscribe,W.useCallback(()=>i(n.getState()),[n,i]),W.useCallback(()=>i(n.getInitialState()),[n,i]));return W.useDebugValue(l),l}const Uy=n=>{const i=Vw(n),l=s=>Xw(i,s);return Object.assign(l,i),l},Fw=(n=>n?Uy(n):Uy),Ul=Fw(n=>({sidebarOpen:!0,theme:"system",settingsOpen:!1,settingsTab:"general",toggleSidebar:()=>n(i=>({sidebarOpen:!i.sidebarOpen})),setSidebarOpen:i=>n({sidebarOpen:i}),setTheme:i=>n({theme:i}),openSettings:i=>n({settingsOpen:!0,...i?{settingsTab:i}:{}}),closeSettings:()=>n({settingsOpen:!1}),setSettingsTab:i=>n({settingsTab:i})})),Zw="/api";class Pw{baseUrl;constructor(i){this.baseUrl=i}async request(i,l={}){const{params:s,...c}=l;let f=`${this.baseUrl}${i}`;if(s){const y=new URLSearchParams(s);f+=`?${y.toString()}`}const d={...c.headers};c.body!==void 0&&(d["Content-Type"]="application/json");const p=await fetch(f,{...c,headers:d});if(!p.ok){const y=await p.json().catch(()=>({}));throw new Vf(p.status,typeof y.message=="string"?y.message:typeof y.error=="string"?y.error:"Request failed",y)}if(p.status!==204)return p.json()}get(i,l){return this.request(i,{...l,method:"GET"})}post(i,l,s){return this.request(i,{...s,method:"POST",body:l?JSON.stringify(l):void 0})}put(i,l,s){return this.request(i,{...s,method:"PUT",body:l?JSON.stringify(l):void 0})}patch(i,l,s){return this.request(i,{...s,method:"PATCH",body:l?JSON.stringify(l):void 0})}delete(i,l){return this.request(i,{...l,method:"DELETE"})}}class Vf extends Error{status;details;constructor(i,l,s={}){super(l),this.name="ApiError",this.status=i,this.details=s}}const bt=new Pw(Zw),tt={projects:{all:["projects"],list:n=>["projects","list",n],detail:n=>["projects","detail",n]},tasks:{all:["tasks"],list:(n,i)=>["tasks","list",n,i],detail:n=>["tasks","detail",n],stats:n=>["tasks","stats",n]},workspaces:{all:["workspaces"],list:n=>["workspaces","list",n],detail:n=>["workspaces","detail",n],diff:n=>["workspaces","diff",n],gitStatus:n=>["workspaces","gitStatus",n]},previews:{all:["previews"],status:n=>["previews","status",n]},sessions:{all:["sessions"],detail:n=>["sessions","detail",n]},files:{all:["files"],tree:(n,i)=>["files","tree",n,i],content:(n,i)=>["files","content",n,i]},git:{all:["git"],changes:n=>["git","changes",n],diff:(n,i,l)=>["git","diff",n,i,l],log:n=>["git","log",n],commitFiles:(n,i)=>["git","commitFiles",n,i],commitDiff:(n,i,l)=>["git","commitDiff",n,i,l]},profiles:{all:["profiles"],defaults:["profiles","defaults"],agent:n=>["profiles","agent",n],variant:(n,i)=>["profiles","variant",n,i]},providers:{all:["providers"],detail:n=>["providers","detail",n]},tunnel:{status:["tunnel","status"]},notifications:{settings:["notifications","settings"]},appSettings:{detail:["app-settings"]},system:{cursorAgentModels:["system","cursor-agent-models"],slashCommandCatalog:(n,i)=>["system","slash-command-catalog",n??null,i??null],skillCatalog:(n,i)=>["system","skill-catalog",n??null,i??null]}};function Jw(){return Yi({queryKey:tt.appSettings.detail,queryFn:()=>bt.get("/app-settings")})}function Iw(){const n=Ut();return en({mutationFn:i=>bt.put("/app-settings",i),onSuccess:()=>{n.invalidateQueries({queryKey:tt.appSettings.detail})}})}function px(){return Yi({queryKey:[...tt.appSettings.detail,"commit-message-defaults"],queryFn:()=>bt.get("/app-settings/commit-message-defaults")})}const $w={"zh-CN":{Settings:"设置",General:"通用",Back:"返回","Loading...":"加载中...","No options":"暂无选项","Processing...":"处理中...",Confirm:"确认",Cancel:"取消","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":"选择当前目录","Agent 配置":"Agent 配置",项目配置:"项目配置",通知:"通知",通用:"通用","AI Agent Task Management Dashboard":"AI Agent 任务管理面板","Project Management":"项目管理","Manage your AI agent projects":"管理你的 AI Agent 项目","View Projects":"查看项目","Task Board":"任务看板","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":"所有项目","Select View":"选择视图","Create New Project...":"创建新项目...","New Task":"新建任务","{count} tasks":"{count} 个任务","Clear filter":"清除筛选",Review:"待审查",Running:"进行中",Pending:"待开始",Done:"已完成",Cancelled:"已取消",Changes:"变更",History:"历史",Editor:"编辑器",Terminal:"终端",Preview:"预览","Coming soon...":"即将推出...",Modified:"已修改",Added:"已新增",Deleted:"已删除",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} 天前","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":"加载失败",Files:"文件","No working directory":"未选择工作目录","Refresh file tree":"刷新文件树","Collapse file tree":"收起文件树","Shell {count}":"终端 {count}","New Terminal":"新终端","No terminals open":"暂无打开终端",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":"工具调用","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...","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":"无法检查仓库路径","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":"滚动到底部","Drop files here...":"将文件拖到这里...","Continue conversation...":"继续对话...","Message Agent...":"给 Agent 发送消息...","Upload file":"上传文件","Uploading...":"上传中...","Describe your task...":"描述你的任务...","Switch to TeamRun":"切换到 TeamRun","Switch to Solo Agent":"切换到单 Agent"," (unavailable)":"(不可用)"},en:{设置:"Settings",通用:"General",返回:"Back","加载中...":"Loading...",暂无选项:"No options","处理中...":"Processing...",确认:"Confirm",取消:"Cancel",工具调用:"Tool Calls","失败 {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","Agent 配置":"Agent Settings",项目配置:"Project Settings",通知:"Notifications","暂无项目,请先创建项目":"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",系统通知:"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.","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",模型:"Model",强制执行:"Force Execution",跳过所有确认和沙盒:"Skip All Confirmations and Sandbox",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","设为该类型的默认 Provider":"Set as the default provider for this agent type",运行配置:"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)","直接填写 Codex":"Enter a Codex","格式的配置片段,通过":"configuration snippet directly and inject it via","参数注入。不会修改你的":". It will not modify your","文件。":"file.","对应 Claude Code 的":"This corresponds to Claude Code",通过:"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",删除自定义覆盖并恢复默认:"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.","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",团队协作:"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",收起:"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."}},Gg=x.createContext(null);function Ww(n){return n?n==="en"?"en":n==="zh-CN"?"zh-CN":null:null}function eT(){return typeof navigator>"u"||navigator.language.toLowerCase().startsWith("zh")?"zh-CN":"en"}function tT(n,i){if(!i)return n;let l=n;for(const[s,c]of Object.entries(i))l=l.replaceAll(`{${s}}`,String(c??""));return l}let vf="zh-CN";function Vg(n,i,l){const s=$w[n][i]??i;return tT(s,l)}function nT(n,i){return Vg(vf,n,i)}function aT({children:n}){const i=x.useRef(eT()),[l,s]=x.useState(i.current),{data:c}=Jw(),f=Iw(),d=x.useRef(!1),p=x.useCallback(b=>{vf=b,s(b),document.documentElement.lang=b},[]);x.useEffect(()=>{const b=Ww(c?.locale)??i.current;p(b),c&&c.locale===null&&!d.current&&(d.current=!0,f.mutate({locale:b}))},[c,p,f]);const y=x.useCallback(b=>{const g=vf;p(b),f.mutate({locale:b},{onError:()=>{p(g),BS.error(nT("语言设置保存失败"))}})},[p,f]),m=x.useMemo(()=>({locale:l,setLocale:y,t:(b,g)=>Vg(l,b,g)}),[l,y]);return be.jsx(Gg.Provider,{value:m,children:n})}function Kg(){const n=x.useContext(Gg);if(!n)throw new Error("useI18n must be used within I18nProvider");return n}function Xg(n){var i,l,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(i=0;i<c;i++)n[i]&&(l=Xg(n[i]))&&(s&&(s+=" "),s+=l)}else for(l in n)n[l]&&(s&&(s+=" "),s+=l);return s}function iT(){for(var n,i,l=0,s="",c=arguments.length;l<c;l++)(n=arguments[l])&&(i=Xg(n))&&(s&&(s+=" "),s+=i);return s}const rT=(n,i)=>{const l=new Array(n.length+i.length);for(let s=0;s<n.length;s++)l[s]=n[s];for(let s=0;s<i.length;s++)l[n.length+s]=i[s];return l},lT=(n,i)=>({classGroupId:n,validator:i}),Fg=(n=new Map,i=null,l)=>({nextPart:n,validators:i,classGroupId:l}),Co="-",Ly=[],sT="arbitrary..",oT=n=>{const i=cT(n),{conflictingClassGroups:l,conflictingClassGroupModifiers:s}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return uT(d);const p=d.split(Co),y=p[0]===""&&p.length>1?1:0;return Zg(p,y,i)},getConflictingClassGroupIds:(d,p)=>{if(p){const y=s[d],m=l[d];return y?m?rT(m,y):y:m||Ly}return l[d]||Ly}}},Zg=(n,i,l)=>{if(n.length-i===0)return l.classGroupId;const c=n[i],f=l.nextPart.get(c);if(f){const m=Zg(n,i+1,f);if(m)return m}const d=l.validators;if(d===null)return;const p=i===0?n.join(Co):n.slice(i).join(Co),y=d.length;for(let m=0;m<y;m++){const b=d[m];if(b.validator(p))return b.classGroupId}},uT=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=n.slice(1,-1),l=i.indexOf(":"),s=i.slice(0,l);return s?sT+s:void 0})(),cT=n=>{const{theme:i,classGroups:l}=n;return fT(l,i)},fT=(n,i)=>{const l=Fg();for(const s in n){const c=n[s];Kf(c,l,s,i)}return l},Kf=(n,i,l,s)=>{const c=n.length;for(let f=0;f<c;f++){const d=n[f];dT(d,i,l,s)}},dT=(n,i,l,s)=>{if(typeof n=="string"){hT(n,i,l);return}if(typeof n=="function"){mT(n,i,l,s);return}pT(n,i,l,s)},hT=(n,i,l)=>{const s=n===""?i:Pg(i,n);s.classGroupId=l},mT=(n,i,l,s)=>{if(yT(n)){Kf(n(s),i,l,s);return}i.validators===null&&(i.validators=[]),i.validators.push(lT(l,n))},pT=(n,i,l,s)=>{const c=Object.entries(n),f=c.length;for(let d=0;d<f;d++){const[p,y]=c[d];Kf(y,Pg(i,p),l,s)}},Pg=(n,i)=>{let l=n;const s=i.split(Co),c=s.length;for(let f=0;f<c;f++){const d=s[f];let p=l.nextPart.get(d);p||(p=Fg(),l.nextPart.set(d,p)),l=p}return l},yT=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,gT=n=>{if(n<1)return{get:()=>{},set:()=>{}};let i=0,l=Object.create(null),s=Object.create(null);const c=(f,d)=>{l[f]=d,i++,i>n&&(i=0,s=l,l=Object.create(null))};return{get(f){let d=l[f];if(d!==void 0)return d;if((d=s[f])!==void 0)return c(f,d),d},set(f,d){f in l?l[f]=d:c(f,d)}}},bf="!",By=":",vT=[],jy=(n,i,l,s,c)=>({modifiers:n,hasImportantModifier:i,baseClassName:l,maybePostfixModifierPosition:s,isExternal:c}),bT=n=>{const{prefix:i,experimentalParseClassName:l}=n;let s=c=>{const f=[];let d=0,p=0,y=0,m;const b=c.length;for(let H=0;H<b;H++){const K=c[H];if(d===0&&p===0){if(K===By){f.push(c.slice(y,H)),y=H+1;continue}if(K==="/"){m=H;continue}}K==="["?d++:K==="]"?d--:K==="("?p++:K===")"&&p--}const g=f.length===0?c:c.slice(y);let T=g,M=!1;g.endsWith(bf)?(T=g.slice(0,-1),M=!0):g.startsWith(bf)&&(T=g.slice(1),M=!0);const U=m&&m>y?m-y:void 0;return jy(f,M,T,U)};if(i){const c=i+By,f=s;s=d=>d.startsWith(c)?f(d.slice(c.length)):jy(vT,!1,d,void 0,!0)}if(l){const c=s;s=f=>l({className:f,parseClassName:c})}return s},ST=n=>{const i=new Map;return n.orderSensitiveModifiers.forEach((l,s)=>{i.set(l,1e6+s)}),l=>{const s=[];let c=[];for(let f=0;f<l.length;f++){const d=l[f],p=d[0]==="[",y=i.has(d);p||y?(c.length>0&&(c.sort(),s.push(...c),c=[]),s.push(d)):c.push(d)}return c.length>0&&(c.sort(),s.push(...c)),s}},ET=n=>({cache:gT(n.cacheSize),parseClassName:bT(n),sortModifiers:ST(n),...oT(n)}),wT=/\s+/,TT=(n,i)=>{const{parseClassName:l,getClassGroupId:s,getConflictingClassGroupIds:c,sortModifiers:f}=i,d=[],p=n.trim().split(wT);let y="";for(let m=p.length-1;m>=0;m-=1){const b=p[m],{isExternal:g,modifiers:T,hasImportantModifier:M,baseClassName:U,maybePostfixModifierPosition:H}=l(b);if(g){y=b+(y.length>0?" "+y:y);continue}let K=!!H,G=s(K?U.substring(0,H):U);if(!G){if(!K){y=b+(y.length>0?" "+y:y);continue}if(G=s(U),!G){y=b+(y.length>0?" "+y:y);continue}K=!1}const P=T.length===0?"":T.length===1?T[0]:f(T).join(":"),I=M?P+bf:P,ye=I+G;if(d.indexOf(ye)>-1)continue;d.push(ye);const de=c(G,K);for(let he=0;he<de.length;++he){const A=de[he];d.push(I+A)}y=b+(y.length>0?" "+y:y)}return y},RT=(...n)=>{let i=0,l,s,c="";for(;i<n.length;)(l=n[i++])&&(s=Jg(l))&&(c&&(c+=" "),c+=s);return c},Jg=n=>{if(typeof n=="string")return n;let i,l="";for(let s=0;s<n.length;s++)n[s]&&(i=Jg(n[s]))&&(l&&(l+=" "),l+=i);return l},xT=(n,...i)=>{let l,s,c,f;const d=y=>{const m=i.reduce((b,g)=>g(b),n());return l=ET(m),s=l.cache.get,c=l.cache.set,f=p,p(y)},p=y=>{const m=s(y);if(m)return m;const b=TT(y,l);return c(y,b),b};return f=d,(...y)=>f(RT(...y))},_T=[],Nt=n=>{const i=l=>l[n]||_T;return i.isThemeGetter=!0,i},Ig=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$g=/^\((?:(\w[\w-]*):)?(.+)\)$/i,AT=/^\d+\/\d+$/,CT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,OT=/\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$/,MT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,DT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ar=n=>AT.test(n),Ne=n=>!!n&&!Number.isNaN(Number(n)),li=n=>!!n&&Number.isInteger(Number(n)),$c=n=>n.endsWith("%")&&Ne(n.slice(0,-1)),Na=n=>CT.test(n),NT=()=>!0,kT=n=>OT.test(n)&&!MT.test(n),Wg=()=>!1,UT=n=>DT.test(n),LT=n=>zT.test(n),BT=n=>!re(n)&&!le(n),jT=n=>Ur(n,nv,Wg),re=n=>Ig.test(n),Bi=n=>Ur(n,av,kT),Wc=n=>Ur(n,GT,Ne),qy=n=>Ur(n,ev,Wg),qT=n=>Ur(n,tv,LT),uo=n=>Ur(n,iv,UT),le=n=>$g.test(n),Dl=n=>Lr(n,av),HT=n=>Lr(n,VT),Hy=n=>Lr(n,ev),QT=n=>Lr(n,nv),YT=n=>Lr(n,tv),co=n=>Lr(n,iv,!0),Ur=(n,i,l)=>{const s=Ig.exec(n);return s?s[1]?i(s[1]):l(s[2]):!1},Lr=(n,i,l=!1)=>{const s=$g.exec(n);return s?s[1]?i(s[1]):l:!1},ev=n=>n==="position"||n==="percentage",tv=n=>n==="image"||n==="url",nv=n=>n==="length"||n==="size"||n==="bg-size",av=n=>n==="length",GT=n=>n==="number",VT=n=>n==="family-name",iv=n=>n==="shadow",KT=()=>{const n=Nt("color"),i=Nt("font"),l=Nt("text"),s=Nt("font-weight"),c=Nt("tracking"),f=Nt("leading"),d=Nt("breakpoint"),p=Nt("container"),y=Nt("spacing"),m=Nt("radius"),b=Nt("shadow"),g=Nt("inset-shadow"),T=Nt("text-shadow"),M=Nt("drop-shadow"),U=Nt("blur"),H=Nt("perspective"),K=Nt("aspect"),G=Nt("ease"),P=Nt("animate"),I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ye=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],de=()=>[...ye(),le,re],he=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],Y=()=>[le,re,y],se=()=>[Ar,"full","auto",...Y()],Ce=()=>[li,"none","subgrid",le,re],Ae=()=>["auto",{span:["full",li,le,re]},li,le,re],Re=()=>[li,"auto",le,re],ke=()=>["auto","min","max","fr",le,re],Ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ee=()=>["start","end","center","stretch","center-safe","end-safe"],C=()=>["auto",...Y()],F=()=>[Ar,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Y()],j=()=>[n,le,re],pe=()=>[...ye(),Hy,qy,{position:[le,re]}],ge=()=>["no-repeat",{repeat:["","x","y","space","round"]}],w=()=>["auto","cover","contain",QT,jT,{size:[le,re]}],q=()=>[$c,Dl,Bi],B=()=>["","none","full",m,le,re],Z=()=>["",Ne,Dl,Bi],ee=()=>["solid","dashed","dotted","double"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[Ne,$c,Hy,qy],xe=()=>["","none",U,le,re],Qe=()=>["none",Ne,le,re],jt=()=>["none",Ne,le,re],Jt=()=>[Ne,le,re],Pe=()=>[Ar,"full",...Y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Na],breakpoint:[Na],color:[NT],container:[Na],"drop-shadow":[Na],ease:["in","out","in-out"],font:[BT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Na],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Na],shadow:[Na],spacing:["px",Ne],text:[Na],"text-shadow":[Na],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ar,re,le,K]}],container:["container"],columns:[{columns:[Ne,re,le,p]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"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:de()}],overflow:[{overflow:he()}],"overflow-x":[{"overflow-x":he()}],"overflow-y":[{"overflow-y":he()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:se()}],"inset-x":[{"inset-x":se()}],"inset-y":[{"inset-y":se()}],start:[{start:se()}],end:[{end:se()}],top:[{top:se()}],right:[{right:se()}],bottom:[{bottom:se()}],left:[{left:se()}],visibility:["visible","invisible","collapse"],z:[{z:[li,"auto",le,re]}],basis:[{basis:[Ar,"full","auto",p,...Y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,Ar,"auto","initial","none",re]}],grow:[{grow:["",Ne,le,re]}],shrink:[{shrink:["",Ne,le,re]}],order:[{order:[li,"first","last","none",le,re]}],"grid-cols":[{"grid-cols":Ce()}],"col-start-end":[{col:Ae()}],"col-start":[{"col-start":Re()}],"col-end":[{"col-end":Re()}],"grid-rows":[{"grid-rows":Ce()}],"row-start-end":[{row:Ae()}],"row-start":[{"row-start":Re()}],"row-end":[{"row-end":Re()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ke()}],"auto-rows":[{"auto-rows":ke()}],gap:[{gap:Y()}],"gap-x":[{"gap-x":Y()}],"gap-y":[{"gap-y":Y()}],"justify-content":[{justify:[...Ue(),"normal"]}],"justify-items":[{"justify-items":[...Ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ee()]}],"align-content":[{content:["normal",...Ue()]}],"align-items":[{items:[...Ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":Ue()}],"place-items":[{"place-items":[...Ee(),"baseline"]}],"place-self":[{"place-self":["auto",...Ee()]}],p:[{p:Y()}],px:[{px:Y()}],py:[{py:Y()}],ps:[{ps:Y()}],pe:[{pe:Y()}],pt:[{pt:Y()}],pr:[{pr:Y()}],pb:[{pb:Y()}],pl:[{pl:Y()}],m:[{m:C()}],mx:[{mx:C()}],my:[{my:C()}],ms:[{ms:C()}],me:[{me:C()}],mt:[{mt:C()}],mr:[{mr:C()}],mb:[{mb:C()}],ml:[{ml:C()}],"space-x":[{"space-x":Y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Y()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[p,"screen",...F()]}],"min-w":[{"min-w":[p,"screen","none",...F()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[d]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",l,Dl,Bi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,le,Wc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$c,re]}],"font-family":[{font:[HT,re,i]}],"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,le,re]}],"line-clamp":[{"line-clamp":[Ne,"none",le,Wc]}],leading:[{leading:[f,...Y()]}],"list-image":[{"list-image":["none",le,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",le,Bi]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[Ne,"auto",le,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,re]}],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",le,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:pe()}],"bg-repeat":[{bg:ge()}],"bg-size":[{bg:w()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},li,le,re],radial:["",le,re],conic:[li,le,re]},YT,qT]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"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:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,le,re]}],"outline-w":[{outline:["",Ne,Dl,Bi]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",b,co,uo]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",g,co,uo]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[Ne,Bi]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",T,co,uo]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[Ne,le,re]}],"mix-blend":[{"mix-blend":[...oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":oe()}],"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":[Ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[le,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"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":ye()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:pe()}],"mask-repeat":[{mask:ge()}],"mask-size":[{mask:w()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,re]}],filter:[{filter:["","none",le,re]}],blur:[{blur:xe()}],brightness:[{brightness:[Ne,le,re]}],contrast:[{contrast:[Ne,le,re]}],"drop-shadow":[{"drop-shadow":["","none",M,co,uo]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",Ne,le,re]}],"hue-rotate":[{"hue-rotate":[Ne,le,re]}],invert:[{invert:["",Ne,le,re]}],saturate:[{saturate:[Ne,le,re]}],sepia:[{sepia:["",Ne,le,re]}],"backdrop-filter":[{"backdrop-filter":["","none",le,re]}],"backdrop-blur":[{"backdrop-blur":xe()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,le,re]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,le,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,le,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,le,re]}],"backdrop-invert":[{"backdrop-invert":["",Ne,le,re]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,le,re]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,le,re]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,le,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Y()}],"border-spacing-x":[{"border-spacing-x":Y()}],"border-spacing-y":[{"border-spacing-y":Y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",le,re]}],ease:[{ease:["linear","initial",G,le,re]}],delay:[{delay:[Ne,le,re]}],animate:[{animate:["none",P,le,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[H,le,re]}],"perspective-origin":[{"perspective-origin":de()}],rotate:[{rotate:Qe()}],"rotate-x":[{"rotate-x":Qe()}],"rotate-y":[{"rotate-y":Qe()}],"rotate-z":[{"rotate-z":Qe()}],scale:[{scale:jt()}],"scale-x":[{"scale-x":jt()}],"scale-y":[{"scale-y":jt()}],"scale-z":[{"scale-z":jt()}],"scale-3d":["scale-3d"],skew:[{skew:Jt()}],"skew-x":[{"skew-x":Jt()}],"skew-y":[{"skew-y":Jt()}],transform:[{transform:[le,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:de()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Pe()}],"translate-x":[{"translate-x":Pe()}],"translate-y":[{"translate-y":Pe()}],"translate-z":[{"translate-z":Pe()}],"translate-none":["translate-none"],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"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",le,re]}],"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":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"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",le,re]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[Ne,Dl,Bi,Wc]}],stroke:[{stroke:["none",...j()]}],"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"]}},XT=xT(KT);function fo(...n){return XT(iT(n))}function ef(n){let i=0;for(const l of n){const s=l.codePointAt(0);s>=19968&&s<=40959||s>=13312&&s<=19903||s>=65280&&s<=65376||s>=12288&&s<=12351?i+=2:i+=1}return i}function yx(n,i){if(ef(n)<=i)return n;const l=i-1,s=Math.ceil(l/2),c=Math.floor(l/2);let f="",d=0;for(const b of n){const g=ef(b);if(d+g>s)break;f+=b,d+=g}const p=[...n];let y="",m=0;for(let b=p.length-1;b>=0;b--){const g=ef(p[b]);if(m+g>c)break;y=p[b]+y,m+=g}return f+"…"+y}let zr=0;function FT(){zr++,zr===1&&(document.body.style.overflow="hidden")}function Qy(){zr=Math.max(0,zr-1),zr===0&&(document.body.style.overflow="")}function ZT(){return zr}const PT=x.lazy(()=>Ua(()=>import("./GeneralSettingsPage-DUaFSgCY.js"),__vite__mapDeps([0,1,2,3,4,5])).then(n=>({default:n.GeneralSettingsPage}))),JT=x.lazy(()=>Ua(()=>import("./ProviderSettingsPage-DYOb33XQ.js"),__vite__mapDeps([6,4,7,8,9,1,2,3,10,5,11,12,13,14])).then(n=>({default:n.ProviderSettingsPage}))),IT=x.lazy(()=>Ua(()=>import("./TeamSettingsPage-Dq_DU1S8.js"),__vite__mapDeps([15,7,8,9,1,2,3,16,4,5,11,17])).then(n=>({default:n.TeamSettingsPage}))),$T=x.lazy(()=>Ua(()=>import("./ProjectSettingsPage-Do3Q1_r4.js"),__vite__mapDeps([18,19,20,21,3,7,9,5,13,11])).then(n=>({default:n.ProjectSettingsPage}))),WT=x.lazy(()=>Ua(()=>import("./NotificationSettingsPage-Cl5x8F4G.js"),__vite__mapDeps([22,7,1,2,3,5,23,21,14])).then(n=>({default:n.NotificationSettingsPage}))),eR=x.lazy(()=>Ua(()=>import("./ProfileSettingsPage-QFN9385l.js"),__vite__mapDeps([24,25,7,9,8,5,2,12])).then(n=>({default:n.ProfileSettingsPage}))),Yy=[{id:"general",label:"通用",icon:Bw},{id:"agents",label:"Agent 配置",icon:Nw},{id:"team",label:"团队协作",icon:Qw},{id:"projects",label:"项目配置",icon:Uw},{id:"notifications",label:"通知",icon:Dw}];function tR({tab:n}){switch(n){case"general":return be.jsx(PT,{});case"agents":return be.jsx(JT,{});case"team":return be.jsx(IT,{});case"projects":return be.jsx($T,{});case"notifications":return be.jsx(WT,{});case"agents-legacy":return be.jsx(eR,{})}}function nR(){return be.jsx("div",{className:"flex items-center justify-center py-20",children:be.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-neutral-200 border-t-neutral-600"})})}function aR(){const{t:n}=Kg(),i=Ul(m=>m.settingsOpen),l=Ul(m=>m.settingsTab),s=Ul(m=>m.closeSettings),c=Ul(m=>m.setSettingsTab),[f,d]=x.useState(!1),p=x.useRef(!1),y=x.useRef(null);return x.useEffect(()=>{if(i)d(!0),p.current||(FT(),p.current=!0),requestAnimationFrame(()=>y.current?.focus());else{const m=setTimeout(()=>d(!1),200);return p.current&&(Qy(),p.current=!1),()=>clearTimeout(m)}},[i]),x.useEffect(()=>()=>{p.current&&(Qy(),p.current=!1)},[]),x.useEffect(()=>{if(!i)return;const m=b=>{b.key==="Escape"&&ZT()===1&&s()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[i,s]),!f&&!i?null:be.jsxs("div",{className:fo("fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-6 transition-opacity duration-200",i?"opacity-100":"opacity-0 pointer-events-none"),children:[be.jsx("div",{className:"absolute inset-0 bg-black/20 backdrop-blur-sm",onClick:s}),be.jsxs("div",{ref:y,tabIndex:-1,className:fo("relative flex w-full max-w-[1100px] flex-col overflow-hidden rounded-2xl bg-white shadow-xl ring-1 ring-neutral-950/5 transform transition-all duration-200 outline-none","h-[min(calc(100vh-1.5rem),840px)] sm:h-[min(calc(100vh-3rem),840px)]",i?"scale-100 translate-y-0":"scale-[0.97] translate-y-1"),children:[be.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-neutral-100 bg-neutral-50/60 px-5 py-3 sm:px-6",children:[be.jsxs("div",{className:"flex items-center gap-2.5",children:[be.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-neutral-900 text-white",children:be.jsx(qw,{size:14})}),be.jsx("h2",{className:"text-[15px] font-semibold text-neutral-900",children:n("设置")})]}),be.jsx("button",{onClick:s,className:"flex h-7 w-7 items-center justify-center rounded-lg text-neutral-400 transition-colors hover:bg-neutral-100 hover:text-neutral-700",children:be.jsx(Gw,{size:15})})]}),be.jsx("div",{className:"sm:hidden flex shrink-0 border-b border-neutral-100 bg-white overflow-x-auto scrollbar-none",children:Yy.map(m=>be.jsxs("button",{onClick:()=>c(m.id),className:fo("flex items-center gap-1.5 px-4 py-2.5 text-xs whitespace-nowrap transition-colors border-b-2 -mb-px",l===m.id?"border-neutral-900 text-neutral-900 font-medium":"border-transparent text-neutral-400 hover:text-neutral-600"),children:[be.jsx(m.icon,{size:13}),be.jsx("span",{children:n(m.label)})]},m.id))}),be.jsxs("div",{className:"flex flex-1 min-h-0",children:[be.jsx("nav",{className:"hidden sm:flex w-[180px] shrink-0 flex-col gap-0.5 border-r border-neutral-100 bg-neutral-50/40 p-3 overflow-y-auto scrollbar-app-thin",children:Yy.map(m=>be.jsxs("button",{onClick:()=>c(m.id),className:fo("flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] transition-all",l===m.id?"bg-white text-neutral-900 font-medium shadow-sm ring-1 ring-neutral-950/[0.04]":"text-neutral-500 hover:text-neutral-800 hover:bg-white/60"),children:[be.jsx(m.icon,{size:15,className:"shrink-0"}),be.jsx("span",{children:n(m.label)})]},m.id))}),be.jsx("div",{className:"flex-1 min-w-0 overflow-y-auto scrollbar-app-thin bg-white",children:be.jsx(x.Suspense,{fallback:be.jsx(nR,{}),children:be.jsx(tR,{tab:l})})})]})]})]})}function iR(){return be.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[be.jsx(QE,{}),be.jsx(aR,{})]})}const rR=x.lazy(()=>Ua(()=>import("./ProjectKanbanPage-Dye8K5K1.js"),__vite__mapDeps([26,27,10,20,2,3,28,8,9,7,21,16,17,23,19,4,13,11,29])).then(n=>({default:n.ProjectKanbanPage}))),lR=x.lazy(()=>Ua(()=>import("./DemoPage-6hMli_sP.js"),__vite__mapDeps([30,7])).then(n=>({default:n.DemoPage}))),sR=x.lazy(()=>Ua(()=>import("./AgentDemoPage-CWcu7-P7.js"),__vite__mapDeps([31,27,10,20,2,3,28,7,25,17])).then(n=>({default:n.AgentDemoPage})));function tf(){const{t:n}=Kg();return be.jsx("div",{className:"p-8",children:n("Loading...")})}const oR=new Set(["general","agents","team","projects","notifications","agents-legacy"]);function Gy(){const n=kg(),{tab:i}=bE();return x.useEffect(()=>{const l=i&&oR.has(i)?i:"general";Ul.getState().openSettings(l),n("/",{replace:!0})},[n,i]),null}const uR=dw([{path:"/",element:be.jsx(iR,{}),children:[{index:!0,element:be.jsx(x.Suspense,{fallback:be.jsx(tf,{}),children:be.jsx(rR,{})})},{path:"demo",element:be.jsx(x.Suspense,{fallback:be.jsx(tf,{}),children:be.jsx(lR,{})})},{path:"agent-demo",element:be.jsx(x.Suspense,{fallback:be.jsx(tf,{}),children:be.jsx(sR,{})})},{path:"settings",element:be.jsx(Gy,{})},{path:"settings/:tab",element:be.jsx(Gy,{})}]}]);function cR(){return be.jsx(Rw,{router:uR})}const ua=Object.create(null);ua.open="0";ua.close="1";ua.ping="2";ua.pong="3";ua.message="4";ua.upgrade="5";ua.noop="6";const bo=Object.create(null);Object.keys(ua).forEach(n=>{bo[ua[n]]=n});const Sf={type:"error",data:"parser error"},rv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",lv=typeof ArrayBuffer=="function",sv=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,Xf=({type:n,data:i},l,s)=>rv&&i instanceof Blob?l?s(i):Vy(i,s):lv&&(i instanceof ArrayBuffer||sv(i))?l?s(i):Vy(new Blob([i]),s):s(ua[n]+(i||"")),Vy=(n,i)=>{const l=new FileReader;return l.onload=function(){const s=l.result.split(",")[1];i("b"+(s||""))},l.readAsDataURL(n)};function Ky(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let nf;function fR(n,i){if(rv&&n.data instanceof Blob)return n.data.arrayBuffer().then(Ky).then(i);if(lv&&(n.data instanceof ArrayBuffer||sv(n.data)))return i(Ky(n.data));Xf(n,!1,l=>{nf||(nf=new TextEncoder),i(nf.encode(l))})}const Xy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ll=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<Xy.length;n++)Ll[Xy.charCodeAt(n)]=n;const dR=n=>{let i=n.length*.75,l=n.length,s,c=0,f,d,p,y;n[n.length-1]==="="&&(i--,n[n.length-2]==="="&&i--);const m=new ArrayBuffer(i),b=new Uint8Array(m);for(s=0;s<l;s+=4)f=Ll[n.charCodeAt(s)],d=Ll[n.charCodeAt(s+1)],p=Ll[n.charCodeAt(s+2)],y=Ll[n.charCodeAt(s+3)],b[c++]=f<<2|d>>4,b[c++]=(d&15)<<4|p>>2,b[c++]=(p&3)<<6|y&63;return m},hR=typeof ArrayBuffer=="function",Ff=(n,i)=>{if(typeof n!="string")return{type:"message",data:ov(n,i)};const l=n.charAt(0);return l==="b"?{type:"message",data:mR(n.substring(1),i)}:bo[l]?n.length>1?{type:bo[l],data:n.substring(1)}:{type:bo[l]}:Sf},mR=(n,i)=>{if(hR){const l=dR(n);return ov(l,i)}else return{base64:!0,data:n}},ov=(n,i)=>i==="blob"?n instanceof Blob?n:new Blob([n]):n instanceof ArrayBuffer?n:n.buffer,uv="",pR=(n,i)=>{const l=n.length,s=new Array(l);let c=0;n.forEach((f,d)=>{Xf(f,!1,p=>{s[d]=p,++c===l&&i(s.join(uv))})})},yR=(n,i)=>{const l=n.split(uv),s=[];for(let c=0;c<l.length;c++){const f=Ff(l[c],i);if(s.push(f),f.type==="error")break}return s};function gR(){return new TransformStream({transform(n,i){fR(n,l=>{const s=l.length;let c;if(s<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,s);else if(s<65536){c=new Uint8Array(3);const f=new DataView(c.buffer);f.setUint8(0,126),f.setUint16(1,s)}else{c=new Uint8Array(9);const f=new DataView(c.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(s))}n.data&&typeof n.data!="string"&&(c[0]|=128),i.enqueue(c),i.enqueue(l)})}})}let af;function ho(n){return n.reduce((i,l)=>i+l.length,0)}function mo(n,i){if(n[0].length===i)return n.shift();const l=new Uint8Array(i);let s=0;for(let c=0;c<i;c++)l[c]=n[0][s++],s===n[0].length&&(n.shift(),s=0);return n.length&&s<n[0].length&&(n[0]=n[0].slice(s)),l}function vR(n,i){af||(af=new TextDecoder);const l=[];let s=0,c=-1,f=!1;return new TransformStream({transform(d,p){for(l.push(d);;){if(s===0){if(ho(l)<1)break;const y=mo(l,1);f=(y[0]&128)===128,c=y[0]&127,c<126?s=3:c===126?s=1:s=2}else if(s===1){if(ho(l)<2)break;const y=mo(l,2);c=new DataView(y.buffer,y.byteOffset,y.length).getUint16(0),s=3}else if(s===2){if(ho(l)<8)break;const y=mo(l,8),m=new DataView(y.buffer,y.byteOffset,y.length),b=m.getUint32(0);if(b>Math.pow(2,21)-1){p.enqueue(Sf);break}c=b*Math.pow(2,32)+m.getUint32(4),s=3}else{if(ho(l)<c)break;const y=mo(l,c);p.enqueue(Ff(f?y:af.decode(y),i)),s=0}if(c===0||c>n){p.enqueue(Sf);break}}}})}const cv=4;function Ot(n){if(n)return bR(n)}function bR(n){for(var i in Ot.prototype)n[i]=Ot.prototype[i];return n}Ot.prototype.on=Ot.prototype.addEventListener=function(n,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(i),this};Ot.prototype.once=function(n,i){function l(){this.off(n,l),i.apply(this,arguments)}return l.fn=i,this.on(n,l),this};Ot.prototype.off=Ot.prototype.removeListener=Ot.prototype.removeAllListeners=Ot.prototype.removeEventListener=function(n,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var l=this._callbacks["$"+n];if(!l)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var s,c=0;c<l.length;c++)if(s=l[c],s===i||s.fn===i){l.splice(c,1);break}return l.length===0&&delete this._callbacks["$"+n],this};Ot.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),l=this._callbacks["$"+n],s=1;s<arguments.length;s++)i[s-1]=arguments[s];if(l){l=l.slice(0);for(var s=0,c=l.length;s<c;++s)l[s].apply(this,i)}return this};Ot.prototype.emitReserved=Ot.prototype.emit;Ot.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};Ot.prototype.hasListeners=function(n){return!!this.listeners(n).length};const zo=typeof Promise=="function"&&typeof Promise.resolve=="function"?i=>Promise.resolve().then(i):(i,l)=>l(i,0),qn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),SR="arraybuffer";function fv(n,...i){return i.reduce((l,s)=>(n.hasOwnProperty(s)&&(l[s]=n[s]),l),{})}const ER=qn.setTimeout,wR=qn.clearTimeout;function No(n,i){i.useNativeTimers?(n.setTimeoutFn=ER.bind(qn),n.clearTimeoutFn=wR.bind(qn)):(n.setTimeoutFn=qn.setTimeout.bind(qn),n.clearTimeoutFn=qn.clearTimeout.bind(qn))}const TR=1.33;function RR(n){return typeof n=="string"?xR(n):Math.ceil((n.byteLength||n.size)*TR)}function xR(n){let i=0,l=0;for(let s=0,c=n.length;s<c;s++)i=n.charCodeAt(s),i<128?l+=1:i<2048?l+=2:i<55296||i>=57344?l+=3:(s++,l+=4);return l}function dv(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function _R(n){let i="";for(let l in n)n.hasOwnProperty(l)&&(i.length&&(i+="&"),i+=encodeURIComponent(l)+"="+encodeURIComponent(n[l]));return i}function AR(n){let i={},l=n.split("&");for(let s=0,c=l.length;s<c;s++){let f=l[s].split("=");i[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return i}class CR extends Error{constructor(i,l,s){super(i),this.description=l,this.context=s,this.type="TransportError"}}class Zf extends Ot{constructor(i){super(),this.writable=!1,No(this,i),this.opts=i,this.query=i.query,this.socket=i.socket,this.supportsBinary=!i.forceBase64}onError(i,l,s){return super.emitReserved("error",new CR(i,l,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(i){this.readyState==="open"&&this.write(i)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(i){const l=Ff(i,this.socket.binaryType);this.onPacket(l)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,l={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(l)}_hostname(){const i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_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(i){const l=_R(i);return l.length?"?"+l:""}}class OR extends Zf{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(i){this.readyState="pausing";const l=()=>{this.readyState="paused",i()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||l()})),this.writable||(s++,this.once("drain",function(){--s||l()}))}else l()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const l=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};yR(i,this.socket.binaryType).forEach(l),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const i=()=>{this.write([{type:"close"}])};this.readyState==="open"?i():this.once("open",i)}write(i){this.writable=!1,pR(i,l=>{this.doWrite(l,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",l=this.query||{};return this.opts.timestampRequests!==!1&&(l[this.opts.timestampParam]=dv()),!this.supportsBinary&&!l.sid&&(l.b64=1),this.createUri(i,l)}}let hv=!1;try{hv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const MR=hv;function DR(){}class zR extends OR{constructor(i){if(super(i),typeof location<"u"){const l=location.protocol==="https:";let s=location.port;s||(s=l?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||s!==i.port}}doWrite(i,l){const s=this.request({method:"POST",data:i});s.on("success",l),s.on("error",(c,f)=>{this.onError("xhr post error",c,f)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(l,s)=>{this.onError("xhr poll error",l,s)}),this.pollXhr=i}}let Nr=class So extends Ot{constructor(i,l,s){super(),this.createRequest=i,No(this,s),this._opts=s,this._method=s.method||"GET",this._uri=l,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var i;const l=fv(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");l.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(l);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let c in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(c)&&s.setRequestHeader(c,this._opts.extraHeaders[c])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(i=this._opts.cookieJar)===null||i===void 0||i.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var c;s.readyState===3&&((c=this._opts.cookieJar)===null||c===void 0||c.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(c){this.setTimeoutFn(()=>{this._onError(c)},0);return}typeof document<"u"&&(this._index=So.requestsCount++,So.requests[this._index]=this)}_onError(i){this.emitReserved("error",i,this._xhr),this._cleanup(!0)}_cleanup(i){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=DR,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete So.requests[this._index],this._xhr=null}}_onLoad(){const i=this._xhr.responseText;i!==null&&(this.emitReserved("data",i),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Nr.requestsCount=0;Nr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Fy);else if(typeof addEventListener=="function"){const n="onpagehide"in qn?"pagehide":"unload";addEventListener(n,Fy,!1)}}function Fy(){for(let n in Nr.requests)Nr.requests.hasOwnProperty(n)&&Nr.requests[n].abort()}const NR=(function(){const n=mv({xdomain:!1});return n&&n.responseType!==null})();class kR extends zR{constructor(i){super(i);const l=i&&i.forceBase64;this.supportsBinary=NR&&!l}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new Nr(mv,this.uri(),i)}}function mv(n){const i=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||MR))return new XMLHttpRequest}catch{}if(!i)try{return new qn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const pv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class UR extends Zf{get name(){return"websocket"}doOpen(){const i=this.uri(),l=this.opts.protocols,s=pv?{}:fv(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(i,l,s)}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=i=>this.onClose({description:"websocket connection closed",context:i}),this.ws.onmessage=i=>this.onData(i.data),this.ws.onerror=i=>this.onError("websocket error",i)}write(i){this.writable=!1;for(let l=0;l<i.length;l++){const s=i[l],c=l===i.length-1;Xf(s,this.supportsBinary,f=>{try{this.doWrite(s,f)}catch{}c&&zo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const i=this.opts.secure?"wss":"ws",l=this.query||{};return this.opts.timestampRequests&&(l[this.opts.timestampParam]=dv()),this.supportsBinary||(l.b64=1),this.createUri(i,l)}}const rf=qn.WebSocket||qn.MozWebSocket;class LR extends UR{createSocket(i,l,s){return pv?new rf(i,l,s):l?new rf(i,l):new rf(i)}doWrite(i,l){this.ws.send(l)}}class BR extends Zf{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(i){return this.emitReserved("error",i)}this._transport.closed.then(()=>{this.onClose()}).catch(i=>{this.onError("webtransport error",i)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(i=>{const l=vR(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=i.readable.pipeThrough(l).getReader(),c=gR();c.readable.pipeTo(i.writable),this._writer=c.writable.getWriter();const f=()=>{s.read().then(({done:p,value:y})=>{p||(this.onPacket(y),f())}).catch(p=>{})};f();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(i){this.writable=!1;for(let l=0;l<i.length;l++){const s=i[l],c=l===i.length-1;this._writer.write(s).then(()=>{c&&zo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const jR={websocket:LR,webtransport:BR,polling:kR},qR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,HR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ef(n){if(n.length>8e3)throw"URI too long";const i=n,l=n.indexOf("["),s=n.indexOf("]");l!=-1&&s!=-1&&(n=n.substring(0,l)+n.substring(l,s).replace(/:/g,";")+n.substring(s,n.length));let c=qR.exec(n||""),f={},d=14;for(;d--;)f[HR[d]]=c[d]||"";return l!=-1&&s!=-1&&(f.source=i,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=QR(f,f.path),f.queryKey=YR(f,f.query),f}function QR(n,i){const l=/\/{2,9}/g,s=i.replace(l,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&s.splice(0,1),i.slice(-1)=="/"&&s.splice(s.length-1,1),s}function YR(n,i){const l={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,c,f){c&&(l[c]=f)}),l}const wf=typeof addEventListener=="function"&&typeof removeEventListener=="function",Eo=[];wf&&addEventListener("offline",()=>{Eo.forEach(n=>n())},!1);class fi extends Ot{constructor(i,l){if(super(),this.binaryType=SR,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,i&&typeof i=="object"&&(l=i,i=null),i){const s=Ef(i);l.hostname=s.host,l.secure=s.protocol==="https"||s.protocol==="wss",l.port=s.port,s.query&&(l.query=s.query)}else l.host&&(l.hostname=Ef(l.host).host);No(this,l),this.secure=l.secure!=null?l.secure:typeof location<"u"&&location.protocol==="https:",l.hostname&&!l.port&&(l.port=this.secure?"443":"80"),this.hostname=l.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=l.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},l.transports.forEach(s=>{const c=s.prototype.name;this.transports.push(c),this._transportsByName[c]=s}),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},l),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=AR(this.opts.query)),wf&&(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"})},Eo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){const l=Object.assign({},this.opts.query);l.EIO=cv,l.transport=i,this.id&&(l.sid=this.id);const s=Object.assign({},this.opts,{query:l,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new this._transportsByName[i](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const i=this.opts.rememberUpgrade&&fi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const l=this.createTransport(i);l.open(),this.setTransport(l)}setTransport(i){this.transport&&this.transport.removeAllListeners(),this.transport=i,i.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",l=>this._onClose("transport close",l))}onOpen(){this.readyState="open",fi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",i),this.emitReserved("heartbeat"),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const l=new Error("server error");l.code=i.data,this._onError(l);break;case"message":this.emitReserved("data",i.data),this.emitReserved("message",i.data);break}}onHandshake(i){this.emitReserved("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this._pingInterval=i.pingInterval,this._pingTimeout=i.pingTimeout,this._maxPayload=i.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const i=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+i,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},i),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 i=this._getWritablePackets();this.transport.send(i),this._prevBufferLen=i.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let l=1;for(let s=0;s<this.writeBuffer.length;s++){const c=this.writeBuffer[s].data;if(c&&(l+=RR(c)),s>0&&l>this._maxPayload)return this.writeBuffer.slice(0,s);l+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const i=Date.now()>this._pingTimeoutTime;return i&&(this._pingTimeoutTime=0,zo(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,l,s){return this._sendPacket("message",i,l,s),this}send(i,l,s){return this._sendPacket("message",i,l,s),this}_sendPacket(i,l,s,c){if(typeof l=="function"&&(c=l,l=void 0),typeof s=="function"&&(c=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const f={type:i,data:l,options:s};this.emitReserved("packetCreate",f),this.writeBuffer.push(f),c&&this.once("flush",c),this.flush()}close(){const i=()=>{this._onClose("forced close"),this.transport.close()},l=()=>{this.off("upgrade",l),this.off("upgradeError",l),i()},s=()=>{this.once("upgrade",l),this.once("upgradeError",l)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():i()}):this.upgrading?s():i()),this}_onError(i){if(fi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",i),this._onClose("transport error",i)}_onClose(i,l){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(),wf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Eo.indexOf(this._offlineEventListener);s!==-1&&Eo.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,l),this.writeBuffer=[],this._prevBufferLen=0}}}fi.protocol=cv;class GR extends fi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let i=0;i<this._upgrades.length;i++)this._probe(this._upgrades[i])}_probe(i){let l=this.createTransport(i),s=!1;fi.priorWebsocketSuccess=!1;const c=()=>{s||(l.send([{type:"ping",data:"probe"}]),l.once("packet",g=>{if(!s)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",l),!l)return;fi.priorWebsocketSuccess=l.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(b(),this.setTransport(l),l.send([{type:"upgrade"}]),this.emitReserved("upgrade",l),l=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=l.name,this.emitReserved("upgradeError",T)}}))};function f(){s||(s=!0,b(),l.close(),l=null)}const d=g=>{const T=new Error("probe error: "+g);T.transport=l.name,f(),this.emitReserved("upgradeError",T)};function p(){d("transport closed")}function y(){d("socket closed")}function m(g){l&&g.name!==l.name&&f()}const b=()=>{l.removeListener("open",c),l.removeListener("error",d),l.removeListener("close",p),this.off("close",y),this.off("upgrading",m)};l.once("open",c),l.once("error",d),l.once("close",p),this.once("close",y),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&i!=="webtransport"?this.setTimeoutFn(()=>{s||l.open()},200):l.open()}onHandshake(i){this._upgrades=this._filterUpgrades(i.upgrades),super.onHandshake(i)}_filterUpgrades(i){const l=[];for(let s=0;s<i.length;s++)~this.transports.indexOf(i[s])&&l.push(i[s]);return l}}let VR=class extends GR{constructor(i,l={}){const s=typeof i=="object"?i:l;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(c=>jR[c]).filter(c=>!!c)),super(i,s)}};function KR(n,i="",l){let s=n;l=l||typeof location<"u"&&location,n==null&&(n=l.protocol+"//"+l.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=l.protocol+n:n=l.host+n),/^(https?|wss?):\/\//.test(n)||(typeof l<"u"?n=l.protocol+"//"+n:n="https://"+n),s=Ef(n)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const f=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+f+":"+s.port+i,s.href=s.protocol+"://"+f+(l&&l.port===s.port?"":":"+s.port),s}const XR=typeof ArrayBuffer=="function",FR=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,yv=Object.prototype.toString,ZR=typeof Blob=="function"||typeof Blob<"u"&&yv.call(Blob)==="[object BlobConstructor]",PR=typeof File=="function"||typeof File<"u"&&yv.call(File)==="[object FileConstructor]";function Pf(n){return XR&&(n instanceof ArrayBuffer||FR(n))||ZR&&n instanceof Blob||PR&&n instanceof File}function wo(n,i){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let l=0,s=n.length;l<s;l++)if(wo(n[l]))return!0;return!1}if(Pf(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return wo(n.toJSON(),!0);for(const l in n)if(Object.prototype.hasOwnProperty.call(n,l)&&wo(n[l]))return!0;return!1}function JR(n){const i=[],l=n.data,s=n;return s.data=Tf(l,i),s.attachments=i.length,{packet:s,buffers:i}}function Tf(n,i){if(!n)return n;if(Pf(n)){const l={_placeholder:!0,num:i.length};return i.push(n),l}else if(Array.isArray(n)){const l=new Array(n.length);for(let s=0;s<n.length;s++)l[s]=Tf(n[s],i);return l}else if(typeof n=="object"&&!(n instanceof Date)){const l={};for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&(l[s]=Tf(n[s],i));return l}return n}function IR(n,i){return n.data=Rf(n.data,i),delete n.attachments,n}function Rf(n,i){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<i.length)return i[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let l=0;l<n.length;l++)n[l]=Rf(n[l],i);else if(typeof n=="object")for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&(n[l]=Rf(n[l],i));return n}const $R=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Fe;(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"})(Fe||(Fe={}));class WR{constructor(i){this.replacer=i}encode(i){return(i.type===Fe.EVENT||i.type===Fe.ACK)&&wo(i)?this.encodeAsBinary({type:i.type===Fe.EVENT?Fe.BINARY_EVENT:Fe.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let l=""+i.type;return(i.type===Fe.BINARY_EVENT||i.type===Fe.BINARY_ACK)&&(l+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(l+=i.nsp+","),i.id!=null&&(l+=i.id),i.data!=null&&(l+=JSON.stringify(i.data,this.replacer)),l}encodeAsBinary(i){const l=JR(i),s=this.encodeAsString(l.packet),c=l.buffers;return c.unshift(s),c}}class Jf extends Ot{constructor(i){super(),this.reviver=i}add(i){let l;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");l=this.decodeString(i);const s=l.type===Fe.BINARY_EVENT;s||l.type===Fe.BINARY_ACK?(l.type=s?Fe.EVENT:Fe.ACK,this.reconstructor=new ex(l),l.attachments===0&&super.emitReserved("decoded",l)):super.emitReserved("decoded",l)}else if(Pf(i)||i.base64)if(this.reconstructor)l=this.reconstructor.takeBinaryData(i),l&&(this.reconstructor=null,super.emitReserved("decoded",l));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let l=0;const s={type:Number(i.charAt(0))};if(Fe[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===Fe.BINARY_EVENT||s.type===Fe.BINARY_ACK){const f=l+1;for(;i.charAt(++l)!=="-"&&l!=i.length;);const d=i.substring(f,l);if(d!=Number(d)||i.charAt(l)!=="-")throw new Error("Illegal attachments");s.attachments=Number(d)}if(i.charAt(l+1)==="/"){const f=l+1;for(;++l&&!(i.charAt(l)===","||l===i.length););s.nsp=i.substring(f,l)}else s.nsp="/";const c=i.charAt(l+1);if(c!==""&&Number(c)==c){const f=l+1;for(;++l;){const d=i.charAt(l);if(d==null||Number(d)!=d){--l;break}if(l===i.length)break}s.id=Number(i.substring(f,l+1))}if(i.charAt(++l)){const f=this.tryParse(i.substr(l));if(Jf.isPayloadValid(s.type,f))s.data=f;else throw new Error("invalid payload")}return s}tryParse(i){try{return JSON.parse(i,this.reviver)}catch{return!1}}static isPayloadValid(i,l){switch(i){case Fe.CONNECT:return Zy(l);case Fe.DISCONNECT:return l===void 0;case Fe.CONNECT_ERROR:return typeof l=="string"||Zy(l);case Fe.EVENT:case Fe.BINARY_EVENT:return Array.isArray(l)&&(typeof l[0]=="number"||typeof l[0]=="string"&&$R.indexOf(l[0])===-1);case Fe.ACK:case Fe.BINARY_ACK:return Array.isArray(l)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ex{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const l=IR(this.reconPack,this.buffers);return this.finishedReconstruction(),l}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Zy(n){return Object.prototype.toString.call(n)==="[object Object]"}const tx=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Jf,Encoder:WR,get PacketType(){return Fe}},Symbol.toStringTag,{value:"Module"}));function In(n,i,l){return n.on(i,l),function(){n.off(i,l)}}const nx=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class gv extends Ot{constructor(i,l,s){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=i,this.nsp=l,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const i=this.io;this.subs=[In(i,"open",this.onopen.bind(this)),In(i,"packet",this.onpacket.bind(this)),In(i,"error",this.onerror.bind(this)),In(i,"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(...i){return i.unshift("message"),this.emit.apply(this,i),this}emit(i,...l){var s,c,f;if(nx.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(l.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(l),this;const d={type:Fe.EVENT,data:l};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof l[l.length-1]=="function"){const b=this.ids++,g=l.pop();this._registerAckCallback(b,g),d.id=b}const p=(c=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||c===void 0?void 0:c.writable,y=this.connected&&!(!((f=this.io.engine)===null||f===void 0)&&f._hasPingExpired());return this.flags.volatile&&!p||(y?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(i,l){var s;const c=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(c===void 0){this.acks[i]=l;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let p=0;p<this.sendBuffer.length;p++)this.sendBuffer[p].id===i&&this.sendBuffer.splice(p,1);l.call(this,new Error("operation has timed out"))},c),d=(...p)=>{this.io.clearTimeoutFn(f),l.apply(this,p)};d.withError=!0,this.acks[i]=d}emitWithAck(i,...l){return new Promise((s,c)=>{const f=(d,p)=>d?c(d):s(p);f.withError=!0,l.push(f),this.emit(i,...l)})}_addToQueue(i){let l;typeof i[i.length-1]=="function"&&(l=i.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((c,...f)=>(this._queue[0],c!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),l&&l(c)):(this._queue.shift(),l&&l(null,...f)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const l=this._queue[0];l.pending&&!i||(l.pending=!0,l.tryCount++,this.flags=l.flags,this.emit.apply(this,l.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=>{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type:Fe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},i):i})}onerror(i){this.connected||this.emitReserved("connect_error",i)}onclose(i,l){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,l),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(i=>{if(!this.sendBuffer.some(s=>String(s.id)===i)){const s=this.acks[i];delete this.acks[i],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case Fe.CONNECT:i.data&&i.data.sid?this.onconnect(i.data.sid,i.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 Fe.EVENT:case Fe.BINARY_EVENT:this.onevent(i);break;case Fe.ACK:case Fe.BINARY_ACK:this.onack(i);break;case Fe.DISCONNECT:this.ondisconnect();break;case Fe.CONNECT_ERROR:this.destroy();const s=new Error(i.data.message);s.data=i.data.data,this.emitReserved("connect_error",s);break}}onevent(i){const l=i.data||[];i.id!=null&&l.push(this.ack(i.id)),this.connected?this.emitEvent(l):this.receiveBuffer.push(Object.freeze(l))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const l=this._anyListeners.slice();for(const s of l)s.apply(this,i)}super.emit.apply(this,i),this._pid&&i.length&&typeof i[i.length-1]=="string"&&(this._lastOffset=i[i.length-1])}ack(i){const l=this;let s=!1;return function(...c){s||(s=!0,l.packet({type:Fe.ACK,id:i,data:c}))}}onack(i){const l=this.acks[i.id];typeof l=="function"&&(delete this.acks[i.id],l.withError&&i.data.unshift(null),l.apply(this,i.data))}onconnect(i,l){this.id=i,this.recovered=l&&this._pid===l,this._pid=l,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(i=>this.emitEvent(i)),this.receiveBuffer=[],this.sendBuffer.forEach(i=>{this.notifyOutgoingListeners(i),this.packet(i)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(i=>i()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Fe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(i){return this.flags.compress=i,this}get volatile(){return this.flags.volatile=!0,this}timeout(i){return this.flags.timeout=i,this}onAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(i),this}prependAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(i),this}offAny(i){if(!this._anyListeners)return this;if(i){const l=this._anyListeners;for(let s=0;s<l.length;s++)if(i===l[s])return l.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(i),this}prependAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(i),this}offAnyOutgoing(i){if(!this._anyOutgoingListeners)return this;if(i){const l=this._anyOutgoingListeners;for(let s=0;s<l.length;s++)if(i===l[s])return l.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const l=this._anyOutgoingListeners.slice();for(const s of l)s.apply(this,i.data)}}}function Br(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}Br.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),l=Math.floor(i*this.jitter*n);n=(Math.floor(i*10)&1)==0?n-l:n+l}return Math.min(n,this.max)|0};Br.prototype.reset=function(){this.attempts=0};Br.prototype.setMin=function(n){this.ms=n};Br.prototype.setMax=function(n){this.max=n};Br.prototype.setJitter=function(n){this.jitter=n};class xf extends Ot{constructor(i,l){var s;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(l=i,i=void 0),l=l||{},l.path=l.path||"/socket.io",this.opts=l,No(this,l),this.reconnection(l.reconnection!==!1),this.reconnectionAttempts(l.reconnectionAttempts||1/0),this.reconnectionDelay(l.reconnectionDelay||1e3),this.reconnectionDelayMax(l.reconnectionDelayMax||5e3),this.randomizationFactor((s=l.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Br({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(l.timeout==null?2e4:l.timeout),this._readyState="closed",this.uri=i;const c=l.parser||tx;this.encoder=new c.Encoder,this.decoder=new c.Decoder,this._autoConnect=l.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(i){return arguments.length?(this._reconnection=!!i,i||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(i){return i===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=i,this)}reconnectionDelay(i){var l;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(l=this.backoff)===null||l===void 0||l.setMin(i),this)}randomizationFactor(i){var l;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(l=this.backoff)===null||l===void 0||l.setJitter(i),this)}reconnectionDelayMax(i){var l;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(l=this.backoff)===null||l===void 0||l.setMax(i),this)}timeout(i){return arguments.length?(this._timeout=i,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(i){if(~this._readyState.indexOf("open"))return this;this.engine=new VR(this.uri,this.opts);const l=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const c=In(l,"open",function(){s.onopen(),i&&i()}),f=p=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",p),i?i(p):this.maybeReconnectOnOpen()},d=In(l,"error",f);if(this._timeout!==!1){const p=this._timeout,y=this.setTimeoutFn(()=>{c(),f(new Error("timeout")),l.close()},p);this.opts.autoUnref&&y.unref(),this.subs.push(()=>{this.clearTimeoutFn(y)})}return this.subs.push(c),this.subs.push(d),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(In(i,"ping",this.onping.bind(this)),In(i,"data",this.ondata.bind(this)),In(i,"error",this.onerror.bind(this)),In(i,"close",this.onclose.bind(this)),In(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(l){this.onclose("parse error",l)}}ondecoded(i){zo(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,l){let s=this.nsps[i];return s?this._autoConnect&&!s.active&&s.connect():(s=new gv(this,i,l),this.nsps[i]=s),s}_destroy(i){const l=Object.keys(this.nsps);for(const s of l)if(this.nsps[s].active)return;this._close()}_packet(i){const l=this.encoder.encode(i);for(let s=0;s<l.length;s++)this.engine.write(l[s],i.options)}cleanup(){this.subs.forEach(i=>i()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(i,l){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,l),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const i=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const l=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(c=>{c?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",c)):i.onreconnect()}))},l);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const zl={};function To(n,i){typeof n=="object"&&(i=n,n=void 0),i=i||{};const l=KR(n,i.path||"/socket.io"),s=l.source,c=l.id,f=l.path,d=zl[c]&&f in zl[c].nsps,p=i.forceNew||i["force new connection"]||i.multiplex===!1||d;let y;return p?y=new xf(s,i):(zl[c]||(zl[c]=new xf(s,i)),y=zl[c]),l.query&&!i.query&&(i.query=l.queryKey),y.socket(l.path,i)}Object.assign(To,{Manager:xf,Socket:gv,io:To,connect:To});const po="/events",vx={SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",INPUT:"input",RESIZE:"resize",TERMINAL_INPUT:"terminal:input",TERMINAL_RESIZE:"terminal:resize"},Mr={SESSION_STDOUT:"session:stdout",SESSION_PATCH:"session:patch",SESSION_EXIT:"session:exit",SESSION_COMPLETED:"session:completed",SESSION_ID:"session:sessionId",SESSION_ERROR:"session:error",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",TEAM_RUN_INVALIDATED:"team-run:invalidated"};class ax{socket=null;baseUrl;visibilityHandler=null;constructor(){this.baseUrl=""}getSocket(){return this.socket||(this.socket=To(`${this.baseUrl}${po}`,{autoConnect:!1,transports:["websocket"],reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,reconnectionDelayMax:1e4}),this.socket.on("connect",()=>{console.log(`[Socket] Connected to ${po} t=${Date.now()}`)}),this.socket.on("disconnect",i=>{console.log(`[Socket] Disconnected from ${po}: t=${Date.now()}`,i)}),this.socket.on("connect_error",i=>{console.error(`[Socket] Connection error on ${po}: t=${Date.now()}`,i.message)})),this.socket}connect(){const i=this.getSocket();return i.connected||i.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)),i}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 Oo=new ax;function vv(n,i,l){const s=f=>Ro(f.queryKey,l),c=n.getQueriesData({predicate:s});return n.setQueriesData({predicate:s},f=>{if(!f||!Array.isArray(f.data))return f;const d=f.data.filter(p=>p.id!==i);return d.length===f.data.length?f:{...f,data:d,total:Math.max(0,f.total-(f.data.length-d.length))}}),n.removeQueries({queryKey:tt.tasks.detail(i),exact:!0}),c}function Ro(n,i){return!Array.isArray(n)||n[0]!=="tasks"||n[1]!=="list"?!1:i?n[2]===i:!0}function ix(n,i){for(const[l,s]of i)n.setQueryData(l,s)}function bx(n,i){const l={};return i?.status!=null&&(l.status=i.status),i?.page!=null&&(l.page=String(i.page)),i?.limit!=null&&(l.limit=String(i.limit)),Yi({queryKey:tt.tasks.list(n,i),queryFn:()=>bt.get(`/projects/${n}/tasks`,{params:l}),enabled:!!n})}function Sx(){const n=Ut();return en({mutationFn:({id:i,status:l})=>bt.patch(`/tasks/${i}/status`,{status:l}),onSuccess:i=>{n.invalidateQueries({queryKey:tt.tasks.all}),n.invalidateQueries({queryKey:tt.tasks.detail(i.id)})}})}function Ex(){const n=Ut();return en({mutationFn:i=>bt.delete(`/tasks/${i}`),onMutate:async i=>(await n.cancelQueries({queryKey:tt.tasks.all}),{snapshots:vv(n,i)}),onError:(i,l,s)=>{s?.snapshots&&ix(n,s.snapshots)},onSuccess:()=>{n.invalidateQueries({queryKey:tt.tasks.all}),n.invalidateQueries({queryKey:tt.projects.all})}})}function wx(){const n=Ut();return en({mutationFn:i=>bt.post(`/tasks/${i}/retry`,{}),onSuccess:i=>{n.invalidateQueries({queryKey:tt.tasks.all}),n.invalidateQueries({queryKey:tt.workspaces.all}),n.invalidateQueries({queryKey:tt.tasks.detail(i.id)})}})}function rx(){const n=Ut();x.useEffect(()=>{const i=Oo.connect(),l=()=>{n.invalidateQueries({queryKey:tt.tasks.all})},s=async f=>{await n.cancelQueries({predicate:d=>Ro(d.queryKey,f.projectId)}),n.invalidateQueries({predicate:d=>Ro(d.queryKey,f.projectId)}),n.invalidateQueries({queryKey:tt.tasks.detail(f.taskId)})},c=f=>{vv(n,f.taskId,f.projectId),n.invalidateQueries({predicate:d=>Ro(d.queryKey,f.projectId)}),n.invalidateQueries({queryKey:tt.projects.all})};return i.on("connect",l),i.on(Mr.TASK_UPDATED,s),i.on(Mr.TASK_DELETED,c),()=>{i.off("connect",l),i.off(Mr.TASK_UPDATED,s),i.off(Mr.TASK_DELETED,c)}},[n])}const De={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],workRequests:n=>["team-runs","work-requests",n],invocations:n=>["team-runs","invocations",n]},bv=5e3;function Sv(n,i){const l=n??[],s=l.findIndex(c=>c.id===i.id);return s>=0?l.map((c,f)=>f===s?i:c):[...l,i]}function Py(n,i){return!n||n.id!==i.teamRunId?n:{...n,messages:Sv(n.messages,i)}}function Ev(n,i){const l=n.getQueryData(De.detail(i));if(l?.taskId)return l.taskId;const s=n.getQueriesData({queryKey:De.all});for(const[,c]of s)if(c?.id===i&&c.taskId)return c.taskId}function If(n,i){const l=Ev(n,i);n.invalidateQueries({queryKey:De.all}),n.invalidateQueries({queryKey:De.detail(i)}),n.invalidateQueries({queryKey:De.workRequests(i)}),n.invalidateQueries({queryKey:De.invocations(i)}),n.invalidateQueries({queryKey:tt.tasks.all}),n.invalidateQueries({queryKey:tt.workspaces.all}),l&&(n.invalidateQueries({queryKey:tt.tasks.detail(l)}),n.invalidateQueries({queryKey:De.task(l)}),n.invalidateQueries({queryKey:tt.workspaces.list(l)}))}function Tx(){return Yi({queryKey:De.memberPresets,queryFn:()=>bt.get("/member-presets")})}function Rx(){const n=Ut();return en({mutationFn:i=>bt.post("/member-presets",i),onSuccess:()=>{n.invalidateQueries({queryKey:De.memberPresets}),n.invalidateQueries({queryKey:De.teamTemplates})}})}function xx(){const n=Ut();return en({mutationFn:({id:i,data:l})=>bt.patch(`/member-presets/${i}`,l),onSuccess:(i,l)=>{n.invalidateQueries({queryKey:De.memberPresets}),n.invalidateQueries({queryKey:De.memberPresetDetail(l.id)}),n.invalidateQueries({queryKey:De.teamTemplates})}})}function _x(){const n=Ut();return en({mutationFn:i=>bt.delete(`/member-presets/${i}`),onSuccess:()=>{n.invalidateQueries({queryKey:De.memberPresets}),n.invalidateQueries({queryKey:De.teamTemplates})}})}function Ax(){return Yi({queryKey:De.teamTemplates,queryFn:()=>bt.get("/team-templates")})}function Cx(){const n=Ut();return en({mutationFn:i=>bt.post("/team-templates",i),onSuccess:()=>{n.invalidateQueries({queryKey:De.teamTemplates})}})}function Ox(){const n=Ut();return en({mutationFn:({id:i,data:l})=>bt.patch(`/team-templates/${i}`,l),onSuccess:(i,l)=>{n.invalidateQueries({queryKey:De.teamTemplates}),n.invalidateQueries({queryKey:De.teamTemplateDetail(l.id)})}})}function Mx(){const n=Ut();return en({mutationFn:i=>bt.delete(`/team-templates/${i}`),onSuccess:()=>{n.invalidateQueries({queryKey:De.teamTemplates})}})}function Dx(){const n=Ut();return en({mutationFn:({taskId:i,...l})=>bt.post(`/tasks/${i}/team-runs`,l),onSuccess:(i,l)=>{n.setQueryData(De.task(l.taskId),i),n.setQueryData(De.detail(i.id),i),n.setQueryData(De.messages(i.id),i.messages??[]),n.setQueryData(De.workRequests(i.id),i.workRequests??[]),n.setQueryData(De.invocations(i.id),i.invocations??[]),n.invalidateQueries({queryKey:De.task(l.taskId)}),n.invalidateQueries({queryKey:De.all}),n.invalidateQueries({queryKey:tt.tasks.all}),n.invalidateQueries({queryKey:tt.tasks.detail(l.taskId)}),n.invalidateQueries({queryKey:tt.workspaces.all}),n.invalidateQueries({queryKey:tt.workspaces.list(l.taskId)})},onError:(i,l)=>{n.invalidateQueries({queryKey:De.task(l.taskId)}),n.invalidateQueries({queryKey:De.all})}})}function zx(n){return Yi({queryKey:De.task(n),queryFn:async()=>{try{return await bt.get(`/tasks/${n}/team-run`)}catch(i){if(i instanceof Vf&&i.status===404)return null;throw i}},enabled:!!n,retry:!1,refetchInterval:i=>i.state.data?bv:!1})}function Nx(n){return Yi({queryKey:De.messages(n),queryFn:async()=>{try{return await bt.get(`/team-runs/${n}/messages`)}catch(i){if(i instanceof Vf&&i.status===404)return[];throw i}},enabled:!!n,retry:!1,refetchInterval:bv})}function kx(n){const i=Ut();return en({mutationFn:l=>bt.post(`/team-runs/${n}/messages`,l),onSuccess:l=>{i.setQueryData(De.messages(n),c=>Sv(c,l)),i.setQueryData(De.detail(n),c=>Py(c,l));const s=Ev(i,n);s&&i.setQueryData(De.task(s),c=>Py(c,l)),i.invalidateQueries({queryKey:De.all}),i.invalidateQueries({queryKey:["tasks"]}),i.invalidateQueries({queryKey:tt.workspaces.all})}})}function Ux(n){const i=Ut();return en({mutationFn:l=>bt.post(`/team-runs/work-requests/${l}/approve`),onSuccess:()=>{If(i,n)}})}function Lx(n){const i=Ut();return en({mutationFn:l=>bt.post(`/team-runs/work-requests/${l}/reject`),onSuccess:()=>{If(i,n)}})}function Bx(n){const i=Ut();return en({mutationFn:({memberId:l,cancelQueued:s})=>bt.post(`/team-runs/${n}/members/${l}/stop`,{cancelQueued:s}),onSuccess:()=>{If(i,n)}})}function la(n,i){return n.scopes.includes(i)}function lx(){const n=Ut();x.useEffect(()=>{const i=Oo.connect(),l=f=>{if(!f){n.invalidateQueries({queryKey:De.all});return}n.invalidateQueries({queryKey:De.detail(f.teamRunId)}),(la(f,"team-run")||la(f,"team-members"))&&n.invalidateQueries({queryKey:De.all}),la(f,"room-messages")&&n.invalidateQueries({queryKey:De.messages(f.teamRunId)}),la(f,"work-requests")&&n.invalidateQueries({queryKey:De.workRequests(f.teamRunId)}),la(f,"agent-invocations")&&n.invalidateQueries({queryKey:De.invocations(f.teamRunId)}),f.taskId&&n.invalidateQueries({queryKey:De.task(f.taskId)}),f.taskId&&(la(f,"task")||la(f,"team-run"))&&n.invalidateQueries({queryKey:tt.tasks.detail(f.taskId)}),f.projectId&&(la(f,"task")||la(f,"team-run"))&&n.invalidateQueries({queryKey:tt.tasks.list(f.projectId)}),la(f,"workspaces")&&(n.invalidateQueries({queryKey:tt.workspaces.all}),f.taskId&&n.invalidateQueries({queryKey:tt.workspaces.list(f.taskId)}))},s=()=>l(),c=f=>l(f);return i.on("connect",s),i.on(Mr.TEAM_RUN_INVALIDATED,c),()=>{i.off("connect",s),i.off(Mr.TEAM_RUN_INVALIDATED,c)}},[n])}function sx(){return rx(),lx(),null}function ox(){return x.useEffect(()=>(Oo.connect(),()=>Oo.disconnect()),[]),be.jsx(oS,{client:PS,children:be.jsxs(aT,{children:[be.jsx(sx,{}),be.jsx(cR,{}),be.jsx(ZS,{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"}}})]})})}const ux="/api/tunnel/bootstrap";async function cx(){const n=new URL(window.location.href),i=n.searchParams.get("token");if(!i)return;const l=await fetch(`${ux}?token=${encodeURIComponent(i)}`,{method:"POST",credentials:"same-origin"});if(!l.ok)throw new Error(`Tunnel bootstrap failed (${l.status})`);n.searchParams.delete("token"),window.history.replaceState({},"",n.toString())}async function fx(){try{await cx()}catch(n){console.error("[Tunnel] Failed to bootstrap tunnel session",n)}jb.createRoot(document.getElementById("root")).render(be.jsx(x.StrictMode,{children:be.jsx(ox,{})}))}fx();export{bS as $,ug as A,Dw as B,vx as C,iT as D,nT as E,Uw as F,ey as G,hx as H,dx as I,kr as J,kt as K,Hg as L,xo as M,Wy as N,uS as O,dS as P,eS as Q,yS as R,Mr as S,hS as T,mS as U,Wt as V,vS as W,Gw as X,ty as Y,gS as Z,pS as _,Jw as a,W as a0,Ux as a1,Lx as a2,Bx as a3,Qw as a4,yx as a5,Dx as a6,Vf as a7,Nw as a8,kx as a9,zx as aa,Nx as ab,wx as ac,De as ad,bx as ae,Ex as af,Sx as ag,Ul as ah,Jy as ai,XT as aj,Ua as ak,Fw as al,px as b,Iw as c,fo as d,Ki as e,Yi as f,Ut as g,en as h,bt as i,be as j,Tx as k,Ax as l,Rx as m,xx as n,_x as o,Cx as p,tt as q,x as r,Ox as s,BS as t,Kg as u,Mx as v,Oo as w,qw as x,FT as y,Qy as z};
13
+ Please change the parent <Route path="${P}"> to <Route path="${P==="/"?"*":`${P}/*`}">.`)}let T=Vi(),M;M=T;let U=M.pathname||"/",H=U;if(b!=="/"){let P=b.replace(/^\//,"").split("/");H="/"+U.replace(/^\//,"").split("/").slice(P.length).join("/")}let K=si(n,{pathname:H});return Mt(g||K!=null,`No routes matched location "${M.pathname}${M.search}${M.hash}" `),Mt(K==null||K[K.length-1].route.element!==void 0||K[K.length-1].route.Component!==void 0||K[K.length-1].route.lazy!==void 0,`Matched leaf route at location "${M.pathname}${M.search}${M.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.`),xE(K&&K.map(P=>Object.assign({},P,{params:Object.assign({},y,P.params),pathname:sa([b,f.encodeLocation?f.encodeLocation(P.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?b:sa([b,f.encodeLocation?f.encodeLocation(P.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathnameBase])})),d,l,s,c)}function EE(){let n=ME(),i=Ql(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),l=n instanceof Error?n.stack:null,s="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:s},f={padding:"2px 4px",backgroundColor:s},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:f},"ErrorBoundary")," or"," ",x.createElement("code",{style:f},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},i),l?x.createElement("pre",{style:c},l):null,d)}var wE=x.createElement(EE,null),Ug=class extends x.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,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){this.props.onError?this.props.onError(n,i):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 l=mE(n.digest);l&&(n=l)}let i=n!==void 0?x.createElement($n.Provider,{value:this.props.routeContext},x.createElement(qf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?x.createElement(TE,{error:n},i):i}};Ug.contextType=Og;var Jc=new WeakMap;function TE({children:n,error:i}){let{basename:l}=x.useContext(Qn);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let s=hE(i.digest);if(s){let c=Jc.get(i);if(c)throw c;let f=gg(s.location,l);if(yg&&!Jc.get(i))if(f.isExternal||s.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:s.replace}));throw Jc.set(i,d),d}return x.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return n}function RE({routeContext:n,match:i,children:l}){let s=x.useContext(Gi);return s&&s.static&&s.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=i.route.id),x.createElement($n.Provider,{value:n},l)}function xE(n,i=[],l=null,s=null,c=null){if(n==null){if(!l)return null;if(l.errors)n=l.matches;else if(i.length===0&&!l.initialized&&l.matches.length>0)n=l.matches;else return null}let f=n,d=l?.errors;if(d!=null){let b=f.findIndex(g=>g.route.id&&d?.[g.route.id]!==void 0);Le(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),f=f.slice(0,Math.min(f.length,b+1))}let p=!1,y=-1;if(l)for(let b=0;b<f.length;b++){let g=f[b];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(y=b),g.route.id){let{loaderData:T,errors:M}=l,U=g.route.loader&&!T.hasOwnProperty(g.route.id)&&(!M||M[g.route.id]===void 0);if(g.route.lazy||U){p=!0,y>=0?f=f.slice(0,y+1):f=[f[0]];break}}}let m=l&&s?(b,g)=>{s(b,{location:l.location,params:l.matches?.[0]?.params??{},unstable_pattern:Gl(l.matches),errorInfo:g})}:void 0;return f.reduceRight((b,g,T)=>{let M,U=!1,H=null,K=null;l&&(M=d&&g.route.id?d[g.route.id]:void 0,H=g.route.errorElement||wE,p&&(y<0&&T===0?(Lg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),U=!0,K=null):y===T&&(U=!0,K=g.route.hydrateFallbackElement||null)));let G=i.concat(f.slice(0,T+1)),P=()=>{let I;return M?I=H:U?I=K:g.route.Component?I=x.createElement(g.route.Component,null):g.route.element?I=g.route.element:I=b,x.createElement(RE,{match:g,routeContext:{outlet:b,matches:G,isDataRoute:l!=null},children:I})};return l&&(g.route.ErrorBoundary||g.route.errorElement||T===0)?x.createElement(Ug,{location:l.location,revalidation:l.revalidation,component:H,error:M,children:P(),routeContext:{outlet:null,matches:G,isDataRoute:!0},onError:m}):P()},null)}function Hf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _E(n){let i=x.useContext(Gi);return Le(i,Hf(n)),i}function AE(n){let i=x.useContext(Vl);return Le(i,Hf(n)),i}function CE(n){let i=x.useContext($n);return Le(i,Hf(n)),i}function Qf(n){let i=CE(n),l=i.matches[i.matches.length-1];return Le(l.route.id,`${n} can only be used on routes that contain a unique "id"`),l.route.id}function OE(){return Qf("useRouteId")}function ME(){let n=x.useContext(qf),i=AE("useRouteError"),l=Qf("useRouteError");return n!==void 0?n:i.errors?.[l]}function DE(){let{router:n}=_E("useNavigate"),i=Qf("useNavigate"),l=x.useRef(!1);return Ng(()=>{l.current=!0}),x.useCallback(async(c,f={})=>{Mt(l.current,zg),l.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:i,...f}))},[n,i])}var Ay={};function Lg(n,i,l){!i&&!Ay[n]&&(Ay[n]=!0,Mt(!1,l))}var Cy={};function Oy(n,i){!n&&!Cy[i]&&(Cy[i]=!0,console.warn(i))}var zE="useOptimistic",My=zb[zE],NE=()=>{};function kE(n){return My?My(n):[n,NE]}function UE(n){let i={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&Mt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(i,{element:x.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&Mt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(i,{hydrateFallbackElement:x.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&Mt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(i,{errorElement:x.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),i}var LE=["HydrateFallback","hydrateFallbackElement"],BE=class{constructor(){this.status="pending",this.promise=new Promise((n,i)=>{this.resolve=l=>{this.status==="pending"&&(this.status="resolved",n(l))},this.reject=l=>{this.status==="pending"&&(this.status="rejected",i(l))}})}};function jE({router:n,flushSync:i,onError:l,unstable_useTransitions:s}){s=uE()||s;let[f,d]=x.useState(n.state),[p,y]=kE(f),[m,b]=x.useState(),[g,T]=x.useState({isTransitioning:!1}),[M,U]=x.useState(),[H,K]=x.useState(),[G,P]=x.useState(),I=x.useRef(new Map),ye=x.useCallback((Y,{deletedFetchers:se,newErrors:Ce,flushSync:Ae,viewTransitionOpts:Re})=>{Ce&&l&&Object.values(Ce).forEach(Ue=>l(Ue,{location:Y.location,params:Y.matches[0]?.params??{},unstable_pattern:Gl(Y.matches)})),Y.fetchers.forEach((Ue,Ee)=>{Ue.data!==void 0&&I.current.set(Ee,Ue.data)}),se.forEach(Ue=>I.current.delete(Ue)),Oy(Ae===!1||i!=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 ke=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(Oy(Re==null||ke,"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."),!Re||!ke){i&&Ae?i(()=>d(Y)):s===!1?d(Y):x.startTransition(()=>{s===!0&&y(Ue=>Dy(Ue,Y)),d(Y)});return}if(i&&Ae){i(()=>{H&&(M?.resolve(),H.skipTransition()),T({isTransitioning:!0,flushSync:!0,currentLocation:Re.currentLocation,nextLocation:Re.nextLocation})});let Ue=n.window.document.startViewTransition(()=>{i(()=>d(Y))});Ue.finished.finally(()=>{i(()=>{U(void 0),K(void 0),b(void 0),T({isTransitioning:!1})})}),i(()=>K(Ue));return}H?(M?.resolve(),H.skipTransition(),P({state:Y,currentLocation:Re.currentLocation,nextLocation:Re.nextLocation})):(b(Y),T({isTransitioning:!0,flushSync:!1,currentLocation:Re.currentLocation,nextLocation:Re.nextLocation}))},[n.window,i,H,M,s,y,l]);x.useLayoutEffect(()=>n.subscribe(ye),[n,ye]),x.useEffect(()=>{g.isTransitioning&&!g.flushSync&&U(new BE)},[g]),x.useEffect(()=>{if(M&&m&&n.window){let Y=m,se=M.promise,Ce=n.window.document.startViewTransition(async()=>{s===!1?d(Y):x.startTransition(()=>{s===!0&&y(Ae=>Dy(Ae,Y)),d(Y)}),await se});Ce.finished.finally(()=>{U(void 0),K(void 0),b(void 0),T({isTransitioning:!1})}),K(Ce)}},[m,M,n.window,s,y]),x.useEffect(()=>{M&&m&&p.location.key===m.location.key&&M.resolve()},[M,H,p.location,m]),x.useEffect(()=>{!g.isTransitioning&&G&&(b(G.state),T({isTransitioning:!0,flushSync:!1,currentLocation:G.currentLocation,nextLocation:G.nextLocation}),P(void 0))},[g.isTransitioning,G]);let de=x.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:Y=>n.navigate(Y),push:(Y,se,Ce)=>n.navigate(Y,{state:se,preventScrollReset:Ce?.preventScrollReset}),replace:(Y,se,Ce)=>n.navigate(Y,{replace:!0,state:se,preventScrollReset:Ce?.preventScrollReset})}),[n]),he=n.basename||"/",A=x.useMemo(()=>({router:n,navigator:de,static:!1,basename:he,onError:l}),[n,de,he,l]);return x.createElement(x.Fragment,null,x.createElement(Gi.Provider,{value:A},x.createElement(Vl.Provider,{value:p},x.createElement(Mg.Provider,{value:I.current},x.createElement(jf.Provider,{value:g},x.createElement(YE,{basename:he,location:p.location,navigationType:p.historyAction,navigator:de,unstable_useTransitions:s},x.createElement(qE,{routes:n.routes,future:n.future,state:p,onError:l})))))),null)}function Dy(n,i){return{...n,navigation:i.navigation.state!=="idle"?i.navigation:n.navigation,revalidation:i.revalidation!=="idle"?i.revalidation:n.revalidation,actionData:i.navigation.state!=="submitting"?i.actionData:n.actionData,fetchers:i.fetchers}}var qE=x.memo(HE);function HE({routes:n,future:i,state:l,onError:s}){return SE(n,void 0,l,s,i)}function QE(n){return vE(n.context)}function YE({basename:n="/",children:i=null,location:l,navigationType:s="POP",navigator:c,static:f=!1,unstable_useTransitions:d}){Le(!Kl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=n.replace(/^\/*/,"/"),y=x.useMemo(()=>({basename:p,navigator:c,static:f,unstable_useTransitions:d,future:{}}),[p,c,f,d]);typeof l=="string"&&(l=di(l));let{pathname:m="/",search:b="",hash:g="",state:T=null,key:M="default"}=l,U=x.useMemo(()=>{let H=Hn(m,p);return H==null?null:{location:{pathname:H,search:b,hash:g,state:T,key:M},navigationType:s}},[p,m,b,g,T,M,s]);return Mt(U!=null,`<Router basename="${p}"> is not able to match the URL "${m}${b}${g}" because it does not start with the basename, so the <Router> won't render anything.`),U==null?null:x.createElement(Qn.Provider,{value:y},x.createElement(Mo.Provider,{children:i,value:U}))}var go="get",vo="application/x-www-form-urlencoded";function Do(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function GE(n){return Do(n)&&n.tagName.toLowerCase()==="button"}function VE(n){return Do(n)&&n.tagName.toLowerCase()==="form"}function KE(n){return Do(n)&&n.tagName.toLowerCase()==="input"}function XE(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function FE(n,i){return n.button===0&&(!i||i==="_self")&&!XE(n)}var oo=null;function ZE(){if(oo===null)try{new FormData(document.createElement("form"),0),oo=!1}catch{oo=!0}return oo}var PE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ic(n){return n!=null&&!PE.has(n)?(Mt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${vo}"`),null):n}function JE(n,i){let l,s,c,f,d;if(VE(n)){let p=n.getAttribute("action");s=p?Hn(p,i):null,l=n.getAttribute("method")||go,c=Ic(n.getAttribute("enctype"))||vo,f=new FormData(n)}else if(GE(n)||KE(n)&&(n.type==="submit"||n.type==="image")){let p=n.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=n.getAttribute("formaction")||p.getAttribute("action");if(s=y?Hn(y,i):null,l=n.getAttribute("formmethod")||p.getAttribute("method")||go,c=Ic(n.getAttribute("formenctype"))||Ic(p.getAttribute("enctype"))||vo,f=new FormData(p,n),!ZE()){let{name:m,type:b,value:g}=n;if(b==="image"){let T=m?`${m}.`:"";f.append(`${T}x`,"0"),f.append(`${T}y`,"0")}else m&&f.append(m,g)}}else{if(Do(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=go,s=null,c=vo,d=n}return f&&c==="text/plain"&&(d=f,f=void 0),{action:s,method:l.toLowerCase(),encType:c,formData:f,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Yf(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function IE(n,i,l,s){let c=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return l?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${s}`:c.pathname=`${c.pathname}.${s}`:c.pathname==="/"?c.pathname=`_root.${s}`:i&&Hn(c.pathname,i)==="/"?c.pathname=`${i.replace(/\/$/,"")}/_root.${s}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${s}`,c}async function $E(n,i){if(n.id in i)return i[n.id];try{let l=await import(n.module);return i[n.id]=l,l}catch(l){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(l),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function WE(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 ew(n,i,l){let s=await Promise.all(n.map(async c=>{let f=i.routes[c.route.id];if(f){let d=await $E(f,l);return d.links?d.links():[]}return[]}));return iw(s.flat(1).filter(WE).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function zy(n,i,l,s,c,f){let d=(y,m)=>l[m]?y.route.id!==l[m].route.id:!0,p=(y,m)=>l[m].pathname!==y.pathname||l[m].route.path?.endsWith("*")&&l[m].params["*"]!==y.params["*"];return f==="assets"?i.filter((y,m)=>d(y,m)||p(y,m)):f==="data"?i.filter((y,m)=>{let b=s.routes[y.route.id];if(!b||!b.hasLoader)return!1;if(d(y,m)||p(y,m))return!0;if(y.route.shouldRevalidate){let g=y.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:l[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function tw(n,i,{includeHydrateFallback:l}={}){return nw(n.map(s=>{let c=i.routes[s.route.id];if(!c)return[];let f=[c.module];return c.clientActionModule&&(f=f.concat(c.clientActionModule)),c.clientLoaderModule&&(f=f.concat(c.clientLoaderModule)),l&&c.hydrateFallbackModule&&(f=f.concat(c.hydrateFallbackModule)),c.imports&&(f=f.concat(c.imports)),f}).flat(1))}function nw(n){return[...new Set(n)]}function aw(n){let i={},l=Object.keys(n).sort();for(let s of l)i[s]=n[s];return i}function iw(n,i){let l=new Set;return new Set(i),n.reduce((s,c)=>{let f=JSON.stringify(aw(c));return l.has(f)||(l.add(f),s.push({key:f,link:c})),s},[])}function Bg(){let n=x.useContext(Gi);return Yf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function rw(){let n=x.useContext(Vl);return Yf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Gf=x.createContext(void 0);Gf.displayName="FrameworkContext";function jg(){let n=x.useContext(Gf);return Yf(n,"You must render this element inside a <HydratedRouter> element"),n}function lw(n,i){let l=x.useContext(Gf),[s,c]=x.useState(!1),[f,d]=x.useState(!1),{onFocus:p,onBlur:y,onMouseEnter:m,onMouseLeave:b,onTouchStart:g}=i,T=x.useRef(null);x.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let H=G=>{G.forEach(P=>{d(P.isIntersecting)})},K=new IntersectionObserver(H,{threshold:.5});return T.current&&K.observe(T.current),()=>{K.disconnect()}}},[n]),x.useEffect(()=>{if(s){let H=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(H)}}},[s]);let M=()=>{c(!0)},U=()=>{c(!1),d(!1)};return l?n!=="intent"?[f,T,{}]:[f,T,{onFocus:Ml(p,M),onBlur:Ml(y,U),onMouseEnter:Ml(m,M),onMouseLeave:Ml(b,U),onTouchStart:Ml(g,M)}]:[!1,T,{}]}function Ml(n,i){return l=>{n&&n(l),l.defaultPrevented||i(l)}}function sw({page:n,...i}){let{router:l}=Bg(),s=x.useMemo(()=>si(l.routes,n,l.basename),[l.routes,n,l.basename]);return s?x.createElement(uw,{page:n,matches:s,...i}):null}function ow(n){let{manifest:i,routeModules:l}=jg(),[s,c]=x.useState([]);return x.useEffect(()=>{let f=!1;return ew(n,i,l).then(d=>{f||c(d)}),()=>{f=!0}},[n,i,l]),s}function uw({page:n,matches:i,...l}){let s=Vi(),{future:c,manifest:f,routeModules:d}=jg(),{basename:p}=Bg(),{loaderData:y,matches:m}=rw(),b=x.useMemo(()=>zy(n,i,m,f,s,"data"),[n,i,m,f,s]),g=x.useMemo(()=>zy(n,i,m,f,s,"assets"),[n,i,m,f,s]),T=x.useMemo(()=>{if(n===s.pathname+s.search+s.hash)return[];let H=new Set,K=!1;if(i.forEach(P=>{let I=f.routes[P.route.id];!I||!I.hasLoader||(!b.some(ye=>ye.route.id===P.route.id)&&P.route.id in y&&d[P.route.id]?.shouldRevalidate||I.hasClientLoader?K=!0:H.add(P.route.id))}),H.size===0)return[];let G=IE(n,p,c.unstable_trailingSlashAwareDataRequests,"data");return K&&H.size>0&&G.searchParams.set("_routes",i.filter(P=>H.has(P.route.id)).map(P=>P.route.id).join(",")),[G.pathname+G.search]},[p,c.unstable_trailingSlashAwareDataRequests,y,s,f,b,i,n,d]),M=x.useMemo(()=>tw(g,f),[g,f]),U=ow(g);return x.createElement(x.Fragment,null,T.map(H=>x.createElement("link",{key:H,rel:"prefetch",as:"fetch",href:H,...l})),M.map(H=>x.createElement("link",{key:H,rel:"modulepreload",href:H,...l})),U.map(({key:H,link:K})=>x.createElement("link",{key:H,nonce:l.nonce,...K,crossOrigin:K.crossOrigin??l.crossOrigin})))}function cw(...n){return i=>{n.forEach(l=>{typeof l=="function"?l(i):l!=null&&(l.current=i)})}}var fw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{fw&&(window.__reactRouterVersion="7.13.0")}catch{}function dw(n,i){return j1({basename:i?.basename,getContext:i?.getContext,future:i?.future,history:e1({window:i?.window}),hydrationData:hw(),routes:n,mapRouteProperties:UE,hydrationRouteProperties:LE,dataStrategy:i?.dataStrategy,patchRoutesOnNavigation:i?.patchRoutesOnNavigation,window:i?.window,unstable_instrumentations:i?.unstable_instrumentations}).initialize()}function hw(){let n=window?.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:mw(n.errors)}),n}function mw(n){if(!n)return null;let i=Object.entries(n),l={};for(let[s,c]of i)if(c&&c.__type==="RouteErrorResponse")l[s]=new Yl(c.status,c.statusText,c.data,c.internal===!0);else if(c&&c.__type==="Error"){if(c.__subType){let f=window[c.__subType];if(typeof f=="function")try{let d=new f(c.message);d.stack="",l[s]=d}catch{}}if(l[s]==null){let f=new Error(c.message);f.stack="",l[s]=f}}else l[s]=c;return l}var qg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Hg=x.forwardRef(function({onClick:i,discover:l="render",prefetch:s="none",relative:c,reloadDocument:f,replace:d,state:p,target:y,to:m,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:T,...M},U){let{basename:H,unstable_useTransitions:K}=x.useContext(Qn),G=typeof m=="string"&&qg.test(m),P=gg(m,H);m=P.to;let I=pE(m,{relative:c}),[ye,de,he]=lw(s,M),A=vw(m,{replace:d,state:p,target:y,preventScrollReset:b,relative:c,viewTransition:g,unstable_defaultShouldRevalidate:T,unstable_useTransitions:K});function Y(Ce){i&&i(Ce),Ce.defaultPrevented||A(Ce)}let se=x.createElement("a",{...M,...he,href:P.absoluteURL||I,onClick:P.isExternal||f?i:Y,ref:cw(U,de),target:y,"data-discover":!G&&l==="render"?"true":void 0});return ye&&!G?x.createElement(x.Fragment,null,se,x.createElement(sw,{page:I})):se});Hg.displayName="Link";var pw=x.forwardRef(function({"aria-current":i="page",caseSensitive:l=!1,className:s="",end:c=!1,style:f,to:d,viewTransition:p,children:y,...m},b){let g=Xl(d,{relative:m.relative}),T=Vi(),M=x.useContext(Vl),{navigator:U,basename:H}=x.useContext(Qn),K=M!=null&&Tw(g)&&p===!0,G=U.encodeLocation?U.encodeLocation(g).pathname:g.pathname,P=T.pathname,I=M&&M.navigation&&M.navigation.location?M.navigation.location.pathname:null;l||(P=P.toLowerCase(),I=I?I.toLowerCase():null,G=G.toLowerCase()),I&&H&&(I=Hn(I,H)||I);const ye=G!=="/"&&G.endsWith("/")?G.length-1:G.length;let de=P===G||!c&&P.startsWith(G)&&P.charAt(ye)==="/",he=I!=null&&(I===G||!c&&I.startsWith(G)&&I.charAt(G.length)==="/"),A={isActive:de,isPending:he,isTransitioning:K},Y=de?i:void 0,se;typeof s=="function"?se=s(A):se=[s,de?"active":null,he?"pending":null,K?"transitioning":null].filter(Boolean).join(" ");let Ce=typeof f=="function"?f(A):f;return x.createElement(Hg,{...m,"aria-current":Y,className:se,ref:b,style:Ce,to:d,viewTransition:p},typeof y=="function"?y(A):y)});pw.displayName="NavLink";var yw=x.forwardRef(({discover:n="render",fetcherKey:i,navigate:l,reloadDocument:s,replace:c,state:f,method:d=go,action:p,onSubmit:y,relative:m,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:T,...M},U)=>{let{unstable_useTransitions:H}=x.useContext(Qn),K=Ew(),G=ww(p,{relative:m}),P=d.toLowerCase()==="get"?"get":"post",I=typeof p=="string"&&qg.test(p),ye=de=>{if(y&&y(de),de.defaultPrevented)return;de.preventDefault();let he=de.nativeEvent.submitter,A=he?.getAttribute("formmethod")||d,Y=()=>K(he||de.currentTarget,{fetcherKey:i,method:A,navigate:l,replace:c,state:f,relative:m,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:T});H&&l!==!1?x.startTransition(()=>Y()):Y()};return x.createElement("form",{ref:U,method:P,action:G,onSubmit:s?y:ye,...M,"data-discover":!I&&n==="render"?"true":void 0})});yw.displayName="Form";function gw(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Qg(n){let i=x.useContext(Gi);return Le(i,gw(n)),i}function vw(n,{target:i,replace:l,state:s,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:p,unstable_useTransitions:y}={}){let m=kg(),b=Vi(),g=Xl(n,{relative:f});return x.useCallback(T=>{if(FE(T,i)){T.preventDefault();let M=l!==void 0?l:oa(b)===oa(g),U=()=>m(n,{replace:M,state:s,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:p});y?x.startTransition(()=>U()):U()}},[b,m,g,l,s,i,n,c,f,d,p,y])}var bw=0,Sw=()=>`__${String(++bw)}__`;function Ew(){let{router:n}=Qg("useSubmit"),{basename:i}=x.useContext(Qn),l=OE(),s=n.fetch,c=n.navigate;return x.useCallback(async(f,d={})=>{let{action:p,method:y,encType:m,formData:b,body:g}=JE(f,i);if(d.navigate===!1){let T=d.fetcherKey||Sw();await s(T,l,d.action||p,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:b,body:g,formMethod:d.method||y,formEncType:d.encType||m,flushSync:d.flushSync})}else await c(d.action||p,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:b,body:g,formMethod:d.method||y,formEncType:d.encType||m,replace:d.replace,state:d.state,fromRouteId:l,flushSync:d.flushSync,viewTransition:d.viewTransition})},[s,c,i,l])}function ww(n,{relative:i}={}){let{basename:l}=x.useContext(Qn),s=x.useContext($n);Le(s,"useFormAction must be used inside a RouteContext");let[c]=s.matches.slice(-1),f={...Xl(n||".",{relative:i})},d=Vi();if(n==null){f.search=d.search;let p=new URLSearchParams(f.search),y=p.getAll("index");if(y.some(b=>b==="")){p.delete("index"),y.filter(g=>g).forEach(g=>p.append("index",g));let b=p.toString();f.search=b?`?${b}`:""}}return(!n||n===".")&&c.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(f.pathname=f.pathname==="/"?l:sa([l,f.pathname])),oa(f)}function Tw(n,{relative:i}={}){let l=x.useContext(jf);Le(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=Qg("useViewTransitionState"),c=Xl(n,{relative:i});if(!l.isTransitioning)return!1;let f=Hn(l.currentLocation.pathname,s)||l.currentLocation.pathname,d=Hn(l.nextLocation.pathname,s)||l.nextLocation.pathname;return Ao(c.pathname,d)!=null||Ao(c.pathname,f)!=null}function Rw(n){return x.createElement(jE,{flushSync:ug.flushSync,...n})}const Yg=(...n)=>n.filter((i,l,s)=>!!i&&i.trim()!==""&&s.indexOf(i)===l).join(" ").trim();const xw=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const _w=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,l,s)=>s?s.toUpperCase():l.toLowerCase());const Ny=n=>{const i=_w(n);return i.charAt(0).toUpperCase()+i.slice(1)};var Aw={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 Cw=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};const Ow=x.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:l=2,absoluteStrokeWidth:s,className:c="",children:f,iconNode:d,...p},y)=>x.createElement("svg",{ref:y,...Aw,width:i,height:i,stroke:n,strokeWidth:s?Number(l)*24/Number(i):l,className:Yg("lucide",c),...!f&&!Cw(p)&&{"aria-hidden":"true"},...p},[...d.map(([m,b])=>x.createElement(m,b)),...Array.isArray(f)?f:[f]]));const Ki=(n,i)=>{const l=x.forwardRef(({className:s,...c},f)=>x.createElement(Ow,{ref:f,iconNode:i,className:Yg(`lucide-${xw(Ny(n))}`,`lucide-${n}`,s),...c}));return l.displayName=Ny(n),l};const Mw=[["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"}]],Dw=Ki("bell",Mw);const zw=[["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"}]],Nw=Ki("cpu",zw);const kw=[["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"}]],Uw=Ki("folder-git-2",kw);const Lw=[["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"}]],Bw=Ki("languages",Lw);const jw=[["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"}]],qw=Ki("settings",jw);const Hw=[["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"}]],Qw=Ki("users",Hw);const Yw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Gw=Ki("x",Yw),ky=n=>{let i;const l=new Set,s=(m,b)=>{const g=typeof m=="function"?m(i):m;if(!Object.is(g,i)){const T=i;i=b??(typeof g!="object"||g===null)?g:Object.assign({},i,g),l.forEach(M=>M(i,T))}},c=()=>i,p={setState:s,getState:c,getInitialState:()=>y,subscribe:m=>(l.add(m),()=>l.delete(m))},y=i=n(s,c,p);return p},Vw=(n=>n?ky(n):ky),Kw=n=>n;function Xw(n,i=Kw){const l=W.useSyncExternalStore(n.subscribe,W.useCallback(()=>i(n.getState()),[n,i]),W.useCallback(()=>i(n.getInitialState()),[n,i]));return W.useDebugValue(l),l}const Uy=n=>{const i=Vw(n),l=s=>Xw(i,s);return Object.assign(l,i),l},Fw=(n=>n?Uy(n):Uy),Ul=Fw(n=>({sidebarOpen:!0,theme:"system",settingsOpen:!1,settingsTab:"general",toggleSidebar:()=>n(i=>({sidebarOpen:!i.sidebarOpen})),setSidebarOpen:i=>n({sidebarOpen:i}),setTheme:i=>n({theme:i}),openSettings:i=>n({settingsOpen:!0,...i?{settingsTab:i}:{}}),closeSettings:()=>n({settingsOpen:!1}),setSettingsTab:i=>n({settingsTab:i})})),Zw="/api";class Pw{baseUrl;constructor(i){this.baseUrl=i}async request(i,l={}){const{params:s,...c}=l;let f=`${this.baseUrl}${i}`;if(s){const y=new URLSearchParams(s);f+=`?${y.toString()}`}const d={...c.headers};c.body!==void 0&&(d["Content-Type"]="application/json");const p=await fetch(f,{...c,headers:d});if(!p.ok){const y=await p.json().catch(()=>({}));throw new Vf(p.status,typeof y.message=="string"?y.message:typeof y.error=="string"?y.error:"Request failed",y)}if(p.status!==204)return p.json()}get(i,l){return this.request(i,{...l,method:"GET"})}post(i,l,s){return this.request(i,{...s,method:"POST",body:l?JSON.stringify(l):void 0})}put(i,l,s){return this.request(i,{...s,method:"PUT",body:l?JSON.stringify(l):void 0})}patch(i,l,s){return this.request(i,{...s,method:"PATCH",body:l?JSON.stringify(l):void 0})}delete(i,l){return this.request(i,{...l,method:"DELETE"})}}class Vf extends Error{status;details;constructor(i,l,s={}){super(l),this.name="ApiError",this.status=i,this.details=s}}const bt=new Pw(Zw),tt={projects:{all:["projects"],list:n=>["projects","list",n],detail:n=>["projects","detail",n]},tasks:{all:["tasks"],list:(n,i)=>["tasks","list",n,i],detail:n=>["tasks","detail",n],stats:n=>["tasks","stats",n]},workspaces:{all:["workspaces"],list:n=>["workspaces","list",n],detail:n=>["workspaces","detail",n],diff:n=>["workspaces","diff",n],gitStatus:n=>["workspaces","gitStatus",n]},previews:{all:["previews"],status:n=>["previews","status",n]},sessions:{all:["sessions"],detail:n=>["sessions","detail",n]},files:{all:["files"],tree:(n,i)=>["files","tree",n,i],content:(n,i)=>["files","content",n,i]},git:{all:["git"],changes:n=>["git","changes",n],diff:(n,i,l)=>["git","diff",n,i,l],log:n=>["git","log",n],commitFiles:(n,i)=>["git","commitFiles",n,i],commitDiff:(n,i,l)=>["git","commitDiff",n,i,l]},profiles:{all:["profiles"],defaults:["profiles","defaults"],agent:n=>["profiles","agent",n],variant:(n,i)=>["profiles","variant",n,i]},providers:{all:["providers"],detail:n=>["providers","detail",n]},tunnel:{status:["tunnel","status"]},notifications:{settings:["notifications","settings"]},appSettings:{detail:["app-settings"]},system:{cursorAgentModels:["system","cursor-agent-models"],slashCommandCatalog:(n,i)=>["system","slash-command-catalog",n??null,i??null],skillCatalog:(n,i)=>["system","skill-catalog",n??null,i??null]}};function Jw(){return Yi({queryKey:tt.appSettings.detail,queryFn:()=>bt.get("/app-settings")})}function Iw(){const n=Ut();return en({mutationFn:i=>bt.put("/app-settings",i),onSuccess:()=>{n.invalidateQueries({queryKey:tt.appSettings.detail})}})}function px(){return Yi({queryKey:[...tt.appSettings.detail,"commit-message-defaults"],queryFn:()=>bt.get("/app-settings/commit-message-defaults")})}const $w={"zh-CN":{Settings:"设置",General:"通用",Back:"返回","Loading...":"加载中...","No options":"暂无选项","Processing...":"处理中...",Confirm:"确认",Cancel:"取消","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":"选择当前目录","Agent 配置":"Agent 配置",项目配置:"项目配置",通知:"通知",通用:"通用","AI Agent Task Management Dashboard":"AI Agent 任务管理面板","Project Management":"项目管理","Manage your AI agent projects":"管理你的 AI Agent 项目","View Projects":"查看项目","Task Board":"任务看板","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":"所有项目","Select View":"选择视图","Create New Project...":"创建新项目...","New Task":"新建任务","{count} tasks":"{count} 个任务","Clear filter":"清除筛选",Review:"待审查",Running:"进行中",Pending:"待开始",Done:"已完成",Cancelled:"已取消",Changes:"变更",History:"历史",Editor:"编辑器",Terminal:"终端",Preview:"预览","Coming soon...":"即将推出...",Modified:"已修改",Added:"已新增",Deleted:"已删除",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} 天前","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":"加载失败",Files:"文件","No working directory":"未选择工作目录","Refresh file tree":"刷新文件树","Collapse file tree":"收起文件树","Shell {count}":"终端 {count}","New Terminal":"新终端","No terminals open":"暂无打开终端",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":"工具调用","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...","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":"无法检查仓库路径","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":"滚动到底部","Drop files here...":"将文件拖到这里...","Continue conversation...":"继续对话...","Message Agent...":"给 Agent 发送消息...","Upload file":"上传文件","Uploading...":"上传中...","Describe your task...":"描述你的任务...","Switch to TeamRun":"切换到 TeamRun","Switch to Solo Agent":"切换到单 Agent"," (unavailable)":"(不可用)"},en:{设置:"Settings",通用:"General",返回:"Back","加载中...":"Loading...",暂无选项:"No options","处理中...":"Processing...",确认:"Confirm",取消:"Cancel",工具调用:"Tool Calls","失败 {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","Agent 配置":"Agent Settings",项目配置:"Project Settings",通知:"Notifications","暂无项目,请先创建项目":"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",系统通知:"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.","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",模型:"Model",强制执行:"Force Execution",跳过所有确认和沙盒:"Skip All Confirmations and Sandbox",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","设为该类型的默认 Provider":"Set as the default provider for this agent type",运行配置:"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)","直接填写 Codex":"Enter a Codex","格式的配置片段,通过":"configuration snippet directly and inject it via","参数注入。不会修改你的":". It will not modify your","文件。":"file.","对应 Claude Code 的":"This corresponds to Claude Code",通过:"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",删除自定义覆盖并恢复默认:"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.","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",团队协作:"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",收起:"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","{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",请描述本次修改的内容:"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"}},Gg=x.createContext(null);function Ww(n){return n?n==="en"?"en":n==="zh-CN"?"zh-CN":null:null}function eT(){return typeof navigator>"u"||navigator.language.toLowerCase().startsWith("zh")?"zh-CN":"en"}function tT(n,i){if(!i)return n;let l=n;for(const[s,c]of Object.entries(i))l=l.replaceAll(`{${s}}`,String(c??""));return l}let vf="zh-CN";function Vg(n,i,l){const s=$w[n][i]??i;return tT(s,l)}function nT(n,i){return Vg(vf,n,i)}function aT({children:n}){const i=x.useRef(eT()),[l,s]=x.useState(i.current),{data:c}=Jw(),f=Iw(),d=x.useRef(!1),p=x.useCallback(b=>{vf=b,s(b),document.documentElement.lang=b},[]);x.useEffect(()=>{const b=Ww(c?.locale)??i.current;p(b),c&&c.locale===null&&!d.current&&(d.current=!0,f.mutate({locale:b}))},[c,p,f]);const y=x.useCallback(b=>{const g=vf;p(b),f.mutate({locale:b},{onError:()=>{p(g),BS.error(nT("语言设置保存失败"))}})},[p,f]),m=x.useMemo(()=>({locale:l,setLocale:y,t:(b,g)=>Vg(l,b,g)}),[l,y]);return be.jsx(Gg.Provider,{value:m,children:n})}function Kg(){const n=x.useContext(Gg);if(!n)throw new Error("useI18n must be used within I18nProvider");return n}function Xg(n){var i,l,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(i=0;i<c;i++)n[i]&&(l=Xg(n[i]))&&(s&&(s+=" "),s+=l)}else for(l in n)n[l]&&(s&&(s+=" "),s+=l);return s}function iT(){for(var n,i,l=0,s="",c=arguments.length;l<c;l++)(n=arguments[l])&&(i=Xg(n))&&(s&&(s+=" "),s+=i);return s}const rT=(n,i)=>{const l=new Array(n.length+i.length);for(let s=0;s<n.length;s++)l[s]=n[s];for(let s=0;s<i.length;s++)l[n.length+s]=i[s];return l},lT=(n,i)=>({classGroupId:n,validator:i}),Fg=(n=new Map,i=null,l)=>({nextPart:n,validators:i,classGroupId:l}),Co="-",Ly=[],sT="arbitrary..",oT=n=>{const i=cT(n),{conflictingClassGroups:l,conflictingClassGroupModifiers:s}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return uT(d);const p=d.split(Co),y=p[0]===""&&p.length>1?1:0;return Zg(p,y,i)},getConflictingClassGroupIds:(d,p)=>{if(p){const y=s[d],m=l[d];return y?m?rT(m,y):y:m||Ly}return l[d]||Ly}}},Zg=(n,i,l)=>{if(n.length-i===0)return l.classGroupId;const c=n[i],f=l.nextPart.get(c);if(f){const m=Zg(n,i+1,f);if(m)return m}const d=l.validators;if(d===null)return;const p=i===0?n.join(Co):n.slice(i).join(Co),y=d.length;for(let m=0;m<y;m++){const b=d[m];if(b.validator(p))return b.classGroupId}},uT=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=n.slice(1,-1),l=i.indexOf(":"),s=i.slice(0,l);return s?sT+s:void 0})(),cT=n=>{const{theme:i,classGroups:l}=n;return fT(l,i)},fT=(n,i)=>{const l=Fg();for(const s in n){const c=n[s];Kf(c,l,s,i)}return l},Kf=(n,i,l,s)=>{const c=n.length;for(let f=0;f<c;f++){const d=n[f];dT(d,i,l,s)}},dT=(n,i,l,s)=>{if(typeof n=="string"){hT(n,i,l);return}if(typeof n=="function"){mT(n,i,l,s);return}pT(n,i,l,s)},hT=(n,i,l)=>{const s=n===""?i:Pg(i,n);s.classGroupId=l},mT=(n,i,l,s)=>{if(yT(n)){Kf(n(s),i,l,s);return}i.validators===null&&(i.validators=[]),i.validators.push(lT(l,n))},pT=(n,i,l,s)=>{const c=Object.entries(n),f=c.length;for(let d=0;d<f;d++){const[p,y]=c[d];Kf(y,Pg(i,p),l,s)}},Pg=(n,i)=>{let l=n;const s=i.split(Co),c=s.length;for(let f=0;f<c;f++){const d=s[f];let p=l.nextPart.get(d);p||(p=Fg(),l.nextPart.set(d,p)),l=p}return l},yT=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,gT=n=>{if(n<1)return{get:()=>{},set:()=>{}};let i=0,l=Object.create(null),s=Object.create(null);const c=(f,d)=>{l[f]=d,i++,i>n&&(i=0,s=l,l=Object.create(null))};return{get(f){let d=l[f];if(d!==void 0)return d;if((d=s[f])!==void 0)return c(f,d),d},set(f,d){f in l?l[f]=d:c(f,d)}}},bf="!",By=":",vT=[],jy=(n,i,l,s,c)=>({modifiers:n,hasImportantModifier:i,baseClassName:l,maybePostfixModifierPosition:s,isExternal:c}),bT=n=>{const{prefix:i,experimentalParseClassName:l}=n;let s=c=>{const f=[];let d=0,p=0,y=0,m;const b=c.length;for(let H=0;H<b;H++){const K=c[H];if(d===0&&p===0){if(K===By){f.push(c.slice(y,H)),y=H+1;continue}if(K==="/"){m=H;continue}}K==="["?d++:K==="]"?d--:K==="("?p++:K===")"&&p--}const g=f.length===0?c:c.slice(y);let T=g,M=!1;g.endsWith(bf)?(T=g.slice(0,-1),M=!0):g.startsWith(bf)&&(T=g.slice(1),M=!0);const U=m&&m>y?m-y:void 0;return jy(f,M,T,U)};if(i){const c=i+By,f=s;s=d=>d.startsWith(c)?f(d.slice(c.length)):jy(vT,!1,d,void 0,!0)}if(l){const c=s;s=f=>l({className:f,parseClassName:c})}return s},ST=n=>{const i=new Map;return n.orderSensitiveModifiers.forEach((l,s)=>{i.set(l,1e6+s)}),l=>{const s=[];let c=[];for(let f=0;f<l.length;f++){const d=l[f],p=d[0]==="[",y=i.has(d);p||y?(c.length>0&&(c.sort(),s.push(...c),c=[]),s.push(d)):c.push(d)}return c.length>0&&(c.sort(),s.push(...c)),s}},ET=n=>({cache:gT(n.cacheSize),parseClassName:bT(n),sortModifiers:ST(n),...oT(n)}),wT=/\s+/,TT=(n,i)=>{const{parseClassName:l,getClassGroupId:s,getConflictingClassGroupIds:c,sortModifiers:f}=i,d=[],p=n.trim().split(wT);let y="";for(let m=p.length-1;m>=0;m-=1){const b=p[m],{isExternal:g,modifiers:T,hasImportantModifier:M,baseClassName:U,maybePostfixModifierPosition:H}=l(b);if(g){y=b+(y.length>0?" "+y:y);continue}let K=!!H,G=s(K?U.substring(0,H):U);if(!G){if(!K){y=b+(y.length>0?" "+y:y);continue}if(G=s(U),!G){y=b+(y.length>0?" "+y:y);continue}K=!1}const P=T.length===0?"":T.length===1?T[0]:f(T).join(":"),I=M?P+bf:P,ye=I+G;if(d.indexOf(ye)>-1)continue;d.push(ye);const de=c(G,K);for(let he=0;he<de.length;++he){const A=de[he];d.push(I+A)}y=b+(y.length>0?" "+y:y)}return y},RT=(...n)=>{let i=0,l,s,c="";for(;i<n.length;)(l=n[i++])&&(s=Jg(l))&&(c&&(c+=" "),c+=s);return c},Jg=n=>{if(typeof n=="string")return n;let i,l="";for(let s=0;s<n.length;s++)n[s]&&(i=Jg(n[s]))&&(l&&(l+=" "),l+=i);return l},xT=(n,...i)=>{let l,s,c,f;const d=y=>{const m=i.reduce((b,g)=>g(b),n());return l=ET(m),s=l.cache.get,c=l.cache.set,f=p,p(y)},p=y=>{const m=s(y);if(m)return m;const b=TT(y,l);return c(y,b),b};return f=d,(...y)=>f(RT(...y))},_T=[],Nt=n=>{const i=l=>l[n]||_T;return i.isThemeGetter=!0,i},Ig=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$g=/^\((?:(\w[\w-]*):)?(.+)\)$/i,AT=/^\d+\/\d+$/,CT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,OT=/\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$/,MT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,DT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ar=n=>AT.test(n),Ne=n=>!!n&&!Number.isNaN(Number(n)),li=n=>!!n&&Number.isInteger(Number(n)),$c=n=>n.endsWith("%")&&Ne(n.slice(0,-1)),Na=n=>CT.test(n),NT=()=>!0,kT=n=>OT.test(n)&&!MT.test(n),Wg=()=>!1,UT=n=>DT.test(n),LT=n=>zT.test(n),BT=n=>!re(n)&&!le(n),jT=n=>Ur(n,nv,Wg),re=n=>Ig.test(n),Bi=n=>Ur(n,av,kT),Wc=n=>Ur(n,GT,Ne),qy=n=>Ur(n,ev,Wg),qT=n=>Ur(n,tv,LT),uo=n=>Ur(n,iv,UT),le=n=>$g.test(n),Dl=n=>Lr(n,av),HT=n=>Lr(n,VT),Hy=n=>Lr(n,ev),QT=n=>Lr(n,nv),YT=n=>Lr(n,tv),co=n=>Lr(n,iv,!0),Ur=(n,i,l)=>{const s=Ig.exec(n);return s?s[1]?i(s[1]):l(s[2]):!1},Lr=(n,i,l=!1)=>{const s=$g.exec(n);return s?s[1]?i(s[1]):l:!1},ev=n=>n==="position"||n==="percentage",tv=n=>n==="image"||n==="url",nv=n=>n==="length"||n==="size"||n==="bg-size",av=n=>n==="length",GT=n=>n==="number",VT=n=>n==="family-name",iv=n=>n==="shadow",KT=()=>{const n=Nt("color"),i=Nt("font"),l=Nt("text"),s=Nt("font-weight"),c=Nt("tracking"),f=Nt("leading"),d=Nt("breakpoint"),p=Nt("container"),y=Nt("spacing"),m=Nt("radius"),b=Nt("shadow"),g=Nt("inset-shadow"),T=Nt("text-shadow"),M=Nt("drop-shadow"),U=Nt("blur"),H=Nt("perspective"),K=Nt("aspect"),G=Nt("ease"),P=Nt("animate"),I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ye=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],de=()=>[...ye(),le,re],he=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],Y=()=>[le,re,y],se=()=>[Ar,"full","auto",...Y()],Ce=()=>[li,"none","subgrid",le,re],Ae=()=>["auto",{span:["full",li,le,re]},li,le,re],Re=()=>[li,"auto",le,re],ke=()=>["auto","min","max","fr",le,re],Ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ee=()=>["start","end","center","stretch","center-safe","end-safe"],C=()=>["auto",...Y()],F=()=>[Ar,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Y()],j=()=>[n,le,re],pe=()=>[...ye(),Hy,qy,{position:[le,re]}],ge=()=>["no-repeat",{repeat:["","x","y","space","round"]}],w=()=>["auto","cover","contain",QT,jT,{size:[le,re]}],q=()=>[$c,Dl,Bi],B=()=>["","none","full",m,le,re],Z=()=>["",Ne,Dl,Bi],ee=()=>["solid","dashed","dotted","double"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[Ne,$c,Hy,qy],xe=()=>["","none",U,le,re],Qe=()=>["none",Ne,le,re],jt=()=>["none",Ne,le,re],Jt=()=>[Ne,le,re],Pe=()=>[Ar,"full",...Y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Na],breakpoint:[Na],color:[NT],container:[Na],"drop-shadow":[Na],ease:["in","out","in-out"],font:[BT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Na],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Na],shadow:[Na],spacing:["px",Ne],text:[Na],"text-shadow":[Na],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ar,re,le,K]}],container:["container"],columns:[{columns:[Ne,re,le,p]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"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:de()}],overflow:[{overflow:he()}],"overflow-x":[{"overflow-x":he()}],"overflow-y":[{"overflow-y":he()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:se()}],"inset-x":[{"inset-x":se()}],"inset-y":[{"inset-y":se()}],start:[{start:se()}],end:[{end:se()}],top:[{top:se()}],right:[{right:se()}],bottom:[{bottom:se()}],left:[{left:se()}],visibility:["visible","invisible","collapse"],z:[{z:[li,"auto",le,re]}],basis:[{basis:[Ar,"full","auto",p,...Y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,Ar,"auto","initial","none",re]}],grow:[{grow:["",Ne,le,re]}],shrink:[{shrink:["",Ne,le,re]}],order:[{order:[li,"first","last","none",le,re]}],"grid-cols":[{"grid-cols":Ce()}],"col-start-end":[{col:Ae()}],"col-start":[{"col-start":Re()}],"col-end":[{"col-end":Re()}],"grid-rows":[{"grid-rows":Ce()}],"row-start-end":[{row:Ae()}],"row-start":[{"row-start":Re()}],"row-end":[{"row-end":Re()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ke()}],"auto-rows":[{"auto-rows":ke()}],gap:[{gap:Y()}],"gap-x":[{"gap-x":Y()}],"gap-y":[{"gap-y":Y()}],"justify-content":[{justify:[...Ue(),"normal"]}],"justify-items":[{"justify-items":[...Ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ee()]}],"align-content":[{content:["normal",...Ue()]}],"align-items":[{items:[...Ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":Ue()}],"place-items":[{"place-items":[...Ee(),"baseline"]}],"place-self":[{"place-self":["auto",...Ee()]}],p:[{p:Y()}],px:[{px:Y()}],py:[{py:Y()}],ps:[{ps:Y()}],pe:[{pe:Y()}],pt:[{pt:Y()}],pr:[{pr:Y()}],pb:[{pb:Y()}],pl:[{pl:Y()}],m:[{m:C()}],mx:[{mx:C()}],my:[{my:C()}],ms:[{ms:C()}],me:[{me:C()}],mt:[{mt:C()}],mr:[{mr:C()}],mb:[{mb:C()}],ml:[{ml:C()}],"space-x":[{"space-x":Y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Y()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[p,"screen",...F()]}],"min-w":[{"min-w":[p,"screen","none",...F()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[d]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",l,Dl,Bi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,le,Wc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$c,re]}],"font-family":[{font:[HT,re,i]}],"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,le,re]}],"line-clamp":[{"line-clamp":[Ne,"none",le,Wc]}],leading:[{leading:[f,...Y()]}],"list-image":[{"list-image":["none",le,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",le,Bi]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[Ne,"auto",le,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,re]}],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",le,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:pe()}],"bg-repeat":[{bg:ge()}],"bg-size":[{bg:w()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},li,le,re],radial:["",le,re],conic:[li,le,re]},YT,qT]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"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:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,le,re]}],"outline-w":[{outline:["",Ne,Dl,Bi]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",b,co,uo]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",g,co,uo]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[Ne,Bi]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",T,co,uo]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[Ne,le,re]}],"mix-blend":[{"mix-blend":[...oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":oe()}],"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":[Ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[le,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"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":ye()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:pe()}],"mask-repeat":[{mask:ge()}],"mask-size":[{mask:w()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,re]}],filter:[{filter:["","none",le,re]}],blur:[{blur:xe()}],brightness:[{brightness:[Ne,le,re]}],contrast:[{contrast:[Ne,le,re]}],"drop-shadow":[{"drop-shadow":["","none",M,co,uo]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",Ne,le,re]}],"hue-rotate":[{"hue-rotate":[Ne,le,re]}],invert:[{invert:["",Ne,le,re]}],saturate:[{saturate:[Ne,le,re]}],sepia:[{sepia:["",Ne,le,re]}],"backdrop-filter":[{"backdrop-filter":["","none",le,re]}],"backdrop-blur":[{"backdrop-blur":xe()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,le,re]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,le,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,le,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,le,re]}],"backdrop-invert":[{"backdrop-invert":["",Ne,le,re]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,le,re]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,le,re]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,le,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Y()}],"border-spacing-x":[{"border-spacing-x":Y()}],"border-spacing-y":[{"border-spacing-y":Y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",le,re]}],ease:[{ease:["linear","initial",G,le,re]}],delay:[{delay:[Ne,le,re]}],animate:[{animate:["none",P,le,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[H,le,re]}],"perspective-origin":[{"perspective-origin":de()}],rotate:[{rotate:Qe()}],"rotate-x":[{"rotate-x":Qe()}],"rotate-y":[{"rotate-y":Qe()}],"rotate-z":[{"rotate-z":Qe()}],scale:[{scale:jt()}],"scale-x":[{"scale-x":jt()}],"scale-y":[{"scale-y":jt()}],"scale-z":[{"scale-z":jt()}],"scale-3d":["scale-3d"],skew:[{skew:Jt()}],"skew-x":[{"skew-x":Jt()}],"skew-y":[{"skew-y":Jt()}],transform:[{transform:[le,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:de()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Pe()}],"translate-x":[{"translate-x":Pe()}],"translate-y":[{"translate-y":Pe()}],"translate-z":[{"translate-z":Pe()}],"translate-none":["translate-none"],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"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",le,re]}],"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":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"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",le,re]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[Ne,Dl,Bi,Wc]}],stroke:[{stroke:["none",...j()]}],"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"]}},XT=xT(KT);function fo(...n){return XT(iT(n))}function ef(n){let i=0;for(const l of n){const s=l.codePointAt(0);s>=19968&&s<=40959||s>=13312&&s<=19903||s>=65280&&s<=65376||s>=12288&&s<=12351?i+=2:i+=1}return i}function yx(n,i){if(ef(n)<=i)return n;const l=i-1,s=Math.ceil(l/2),c=Math.floor(l/2);let f="",d=0;for(const b of n){const g=ef(b);if(d+g>s)break;f+=b,d+=g}const p=[...n];let y="",m=0;for(let b=p.length-1;b>=0;b--){const g=ef(p[b]);if(m+g>c)break;y=p[b]+y,m+=g}return f+"…"+y}let zr=0;function FT(){zr++,zr===1&&(document.body.style.overflow="hidden")}function Qy(){zr=Math.max(0,zr-1),zr===0&&(document.body.style.overflow="")}function ZT(){return zr}const PT=x.lazy(()=>Ua(()=>import("./GeneralSettingsPage-B4DH6g3D.js"),__vite__mapDeps([0,1,2,3,4,5])).then(n=>({default:n.GeneralSettingsPage}))),JT=x.lazy(()=>Ua(()=>import("./ProviderSettingsPage-BWN7CEG6.js"),__vite__mapDeps([6,4,7,8,9,1,2,3,10,5,11,12,13,14,15])).then(n=>({default:n.ProviderSettingsPage}))),IT=x.lazy(()=>Ua(()=>import("./TeamSettingsPage-924xpocx.js"),__vite__mapDeps([16,7,8,9,1,2,3,17,4,5,12,18])).then(n=>({default:n.TeamSettingsPage}))),$T=x.lazy(()=>Ua(()=>import("./ProjectSettingsPage-DZZksq5G.js"),__vite__mapDeps([19,20,21,22,3,7,9,5,14,12])).then(n=>({default:n.ProjectSettingsPage}))),WT=x.lazy(()=>Ua(()=>import("./NotificationSettingsPage-C-bPU_ZE.js"),__vite__mapDeps([23,7,1,2,3,5,24,22,15])).then(n=>({default:n.NotificationSettingsPage}))),eR=x.lazy(()=>Ua(()=>import("./ProfileSettingsPage-Dlr6BmHb.js"),__vite__mapDeps([25,26,7,9,8,5,2,13])).then(n=>({default:n.ProfileSettingsPage}))),Yy=[{id:"general",label:"通用",icon:Bw},{id:"agents",label:"Agent 配置",icon:Nw},{id:"team",label:"团队协作",icon:Qw},{id:"projects",label:"项目配置",icon:Uw},{id:"notifications",label:"通知",icon:Dw}];function tR({tab:n}){switch(n){case"general":return be.jsx(PT,{});case"agents":return be.jsx(JT,{});case"team":return be.jsx(IT,{});case"projects":return be.jsx($T,{});case"notifications":return be.jsx(WT,{});case"agents-legacy":return be.jsx(eR,{})}}function nR(){return be.jsx("div",{className:"flex items-center justify-center py-20",children:be.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-neutral-200 border-t-neutral-600"})})}function aR(){const{t:n}=Kg(),i=Ul(m=>m.settingsOpen),l=Ul(m=>m.settingsTab),s=Ul(m=>m.closeSettings),c=Ul(m=>m.setSettingsTab),[f,d]=x.useState(!1),p=x.useRef(!1),y=x.useRef(null);return x.useEffect(()=>{if(i)d(!0),p.current||(FT(),p.current=!0),requestAnimationFrame(()=>y.current?.focus());else{const m=setTimeout(()=>d(!1),200);return p.current&&(Qy(),p.current=!1),()=>clearTimeout(m)}},[i]),x.useEffect(()=>()=>{p.current&&(Qy(),p.current=!1)},[]),x.useEffect(()=>{if(!i)return;const m=b=>{b.key==="Escape"&&ZT()===1&&s()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[i,s]),!f&&!i?null:be.jsxs("div",{className:fo("fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-6 transition-opacity duration-200",i?"opacity-100":"opacity-0 pointer-events-none"),children:[be.jsx("div",{className:"absolute inset-0 bg-black/20 backdrop-blur-sm",onClick:s}),be.jsxs("div",{ref:y,tabIndex:-1,className:fo("relative flex w-full max-w-[1100px] flex-col overflow-hidden rounded-2xl bg-white shadow-xl ring-1 ring-neutral-950/5 transform transition-all duration-200 outline-none","h-[min(calc(100vh-1.5rem),840px)] sm:h-[min(calc(100vh-3rem),840px)]",i?"scale-100 translate-y-0":"scale-[0.97] translate-y-1"),children:[be.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-neutral-100 bg-neutral-50/60 px-5 py-3 sm:px-6",children:[be.jsxs("div",{className:"flex items-center gap-2.5",children:[be.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-neutral-900 text-white",children:be.jsx(qw,{size:14})}),be.jsx("h2",{className:"text-[15px] font-semibold text-neutral-900",children:n("设置")})]}),be.jsx("button",{onClick:s,className:"flex h-7 w-7 items-center justify-center rounded-lg text-neutral-400 transition-colors hover:bg-neutral-100 hover:text-neutral-700",children:be.jsx(Gw,{size:15})})]}),be.jsx("div",{className:"sm:hidden flex shrink-0 border-b border-neutral-100 bg-white overflow-x-auto scrollbar-none",children:Yy.map(m=>be.jsxs("button",{onClick:()=>c(m.id),className:fo("flex items-center gap-1.5 px-4 py-2.5 text-xs whitespace-nowrap transition-colors border-b-2 -mb-px",l===m.id?"border-neutral-900 text-neutral-900 font-medium":"border-transparent text-neutral-400 hover:text-neutral-600"),children:[be.jsx(m.icon,{size:13}),be.jsx("span",{children:n(m.label)})]},m.id))}),be.jsxs("div",{className:"flex flex-1 min-h-0",children:[be.jsx("nav",{className:"hidden sm:flex w-[180px] shrink-0 flex-col gap-0.5 border-r border-neutral-100 bg-neutral-50/40 p-3 overflow-y-auto scrollbar-app-thin",children:Yy.map(m=>be.jsxs("button",{onClick:()=>c(m.id),className:fo("flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] transition-all",l===m.id?"bg-white text-neutral-900 font-medium shadow-sm ring-1 ring-neutral-950/[0.04]":"text-neutral-500 hover:text-neutral-800 hover:bg-white/60"),children:[be.jsx(m.icon,{size:15,className:"shrink-0"}),be.jsx("span",{children:n(m.label)})]},m.id))}),be.jsx("div",{className:"flex-1 min-w-0 overflow-y-auto scrollbar-app-thin bg-white",children:be.jsx(x.Suspense,{fallback:be.jsx(nR,{}),children:be.jsx(tR,{tab:l})})})]})]})]})}function iR(){return be.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[be.jsx(QE,{}),be.jsx(aR,{})]})}const rR=x.lazy(()=>Ua(()=>import("./ProjectKanbanPage-7oEfjjWV.js"),__vite__mapDeps([27,10,28,21,2,3,29,8,9,7,22,17,18,24,20,11,4,1,14,12,30])).then(n=>({default:n.ProjectKanbanPage}))),lR=x.lazy(()=>Ua(()=>import("./DemoPage-dkmp8Vvn.js"),__vite__mapDeps([31,7])).then(n=>({default:n.DemoPage}))),sR=x.lazy(()=>Ua(()=>import("./AgentDemoPage-CkhVcgZo.js"),__vite__mapDeps([32,28,10,21,2,3,29,7,26,18])).then(n=>({default:n.AgentDemoPage})));function tf(){const{t:n}=Kg();return be.jsx("div",{className:"p-8",children:n("Loading...")})}const oR=new Set(["general","agents","team","projects","notifications","agents-legacy"]);function Gy(){const n=kg(),{tab:i}=bE();return x.useEffect(()=>{const l=i&&oR.has(i)?i:"general";Ul.getState().openSettings(l),n("/",{replace:!0})},[n,i]),null}const uR=dw([{path:"/",element:be.jsx(iR,{}),children:[{index:!0,element:be.jsx(x.Suspense,{fallback:be.jsx(tf,{}),children:be.jsx(rR,{})})},{path:"demo",element:be.jsx(x.Suspense,{fallback:be.jsx(tf,{}),children:be.jsx(lR,{})})},{path:"agent-demo",element:be.jsx(x.Suspense,{fallback:be.jsx(tf,{}),children:be.jsx(sR,{})})},{path:"settings",element:be.jsx(Gy,{})},{path:"settings/:tab",element:be.jsx(Gy,{})}]}]);function cR(){return be.jsx(Rw,{router:uR})}const ua=Object.create(null);ua.open="0";ua.close="1";ua.ping="2";ua.pong="3";ua.message="4";ua.upgrade="5";ua.noop="6";const bo=Object.create(null);Object.keys(ua).forEach(n=>{bo[ua[n]]=n});const Sf={type:"error",data:"parser error"},rv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",lv=typeof ArrayBuffer=="function",sv=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,Xf=({type:n,data:i},l,s)=>rv&&i instanceof Blob?l?s(i):Vy(i,s):lv&&(i instanceof ArrayBuffer||sv(i))?l?s(i):Vy(new Blob([i]),s):s(ua[n]+(i||"")),Vy=(n,i)=>{const l=new FileReader;return l.onload=function(){const s=l.result.split(",")[1];i("b"+(s||""))},l.readAsDataURL(n)};function Ky(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let nf;function fR(n,i){if(rv&&n.data instanceof Blob)return n.data.arrayBuffer().then(Ky).then(i);if(lv&&(n.data instanceof ArrayBuffer||sv(n.data)))return i(Ky(n.data));Xf(n,!1,l=>{nf||(nf=new TextEncoder),i(nf.encode(l))})}const Xy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ll=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<Xy.length;n++)Ll[Xy.charCodeAt(n)]=n;const dR=n=>{let i=n.length*.75,l=n.length,s,c=0,f,d,p,y;n[n.length-1]==="="&&(i--,n[n.length-2]==="="&&i--);const m=new ArrayBuffer(i),b=new Uint8Array(m);for(s=0;s<l;s+=4)f=Ll[n.charCodeAt(s)],d=Ll[n.charCodeAt(s+1)],p=Ll[n.charCodeAt(s+2)],y=Ll[n.charCodeAt(s+3)],b[c++]=f<<2|d>>4,b[c++]=(d&15)<<4|p>>2,b[c++]=(p&3)<<6|y&63;return m},hR=typeof ArrayBuffer=="function",Ff=(n,i)=>{if(typeof n!="string")return{type:"message",data:ov(n,i)};const l=n.charAt(0);return l==="b"?{type:"message",data:mR(n.substring(1),i)}:bo[l]?n.length>1?{type:bo[l],data:n.substring(1)}:{type:bo[l]}:Sf},mR=(n,i)=>{if(hR){const l=dR(n);return ov(l,i)}else return{base64:!0,data:n}},ov=(n,i)=>i==="blob"?n instanceof Blob?n:new Blob([n]):n instanceof ArrayBuffer?n:n.buffer,uv="",pR=(n,i)=>{const l=n.length,s=new Array(l);let c=0;n.forEach((f,d)=>{Xf(f,!1,p=>{s[d]=p,++c===l&&i(s.join(uv))})})},yR=(n,i)=>{const l=n.split(uv),s=[];for(let c=0;c<l.length;c++){const f=Ff(l[c],i);if(s.push(f),f.type==="error")break}return s};function gR(){return new TransformStream({transform(n,i){fR(n,l=>{const s=l.length;let c;if(s<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,s);else if(s<65536){c=new Uint8Array(3);const f=new DataView(c.buffer);f.setUint8(0,126),f.setUint16(1,s)}else{c=new Uint8Array(9);const f=new DataView(c.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(s))}n.data&&typeof n.data!="string"&&(c[0]|=128),i.enqueue(c),i.enqueue(l)})}})}let af;function ho(n){return n.reduce((i,l)=>i+l.length,0)}function mo(n,i){if(n[0].length===i)return n.shift();const l=new Uint8Array(i);let s=0;for(let c=0;c<i;c++)l[c]=n[0][s++],s===n[0].length&&(n.shift(),s=0);return n.length&&s<n[0].length&&(n[0]=n[0].slice(s)),l}function vR(n,i){af||(af=new TextDecoder);const l=[];let s=0,c=-1,f=!1;return new TransformStream({transform(d,p){for(l.push(d);;){if(s===0){if(ho(l)<1)break;const y=mo(l,1);f=(y[0]&128)===128,c=y[0]&127,c<126?s=3:c===126?s=1:s=2}else if(s===1){if(ho(l)<2)break;const y=mo(l,2);c=new DataView(y.buffer,y.byteOffset,y.length).getUint16(0),s=3}else if(s===2){if(ho(l)<8)break;const y=mo(l,8),m=new DataView(y.buffer,y.byteOffset,y.length),b=m.getUint32(0);if(b>Math.pow(2,21)-1){p.enqueue(Sf);break}c=b*Math.pow(2,32)+m.getUint32(4),s=3}else{if(ho(l)<c)break;const y=mo(l,c);p.enqueue(Ff(f?y:af.decode(y),i)),s=0}if(c===0||c>n){p.enqueue(Sf);break}}}})}const cv=4;function Ot(n){if(n)return bR(n)}function bR(n){for(var i in Ot.prototype)n[i]=Ot.prototype[i];return n}Ot.prototype.on=Ot.prototype.addEventListener=function(n,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(i),this};Ot.prototype.once=function(n,i){function l(){this.off(n,l),i.apply(this,arguments)}return l.fn=i,this.on(n,l),this};Ot.prototype.off=Ot.prototype.removeListener=Ot.prototype.removeAllListeners=Ot.prototype.removeEventListener=function(n,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var l=this._callbacks["$"+n];if(!l)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var s,c=0;c<l.length;c++)if(s=l[c],s===i||s.fn===i){l.splice(c,1);break}return l.length===0&&delete this._callbacks["$"+n],this};Ot.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),l=this._callbacks["$"+n],s=1;s<arguments.length;s++)i[s-1]=arguments[s];if(l){l=l.slice(0);for(var s=0,c=l.length;s<c;++s)l[s].apply(this,i)}return this};Ot.prototype.emitReserved=Ot.prototype.emit;Ot.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};Ot.prototype.hasListeners=function(n){return!!this.listeners(n).length};const zo=typeof Promise=="function"&&typeof Promise.resolve=="function"?i=>Promise.resolve().then(i):(i,l)=>l(i,0),qn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),SR="arraybuffer";function fv(n,...i){return i.reduce((l,s)=>(n.hasOwnProperty(s)&&(l[s]=n[s]),l),{})}const ER=qn.setTimeout,wR=qn.clearTimeout;function No(n,i){i.useNativeTimers?(n.setTimeoutFn=ER.bind(qn),n.clearTimeoutFn=wR.bind(qn)):(n.setTimeoutFn=qn.setTimeout.bind(qn),n.clearTimeoutFn=qn.clearTimeout.bind(qn))}const TR=1.33;function RR(n){return typeof n=="string"?xR(n):Math.ceil((n.byteLength||n.size)*TR)}function xR(n){let i=0,l=0;for(let s=0,c=n.length;s<c;s++)i=n.charCodeAt(s),i<128?l+=1:i<2048?l+=2:i<55296||i>=57344?l+=3:(s++,l+=4);return l}function dv(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function _R(n){let i="";for(let l in n)n.hasOwnProperty(l)&&(i.length&&(i+="&"),i+=encodeURIComponent(l)+"="+encodeURIComponent(n[l]));return i}function AR(n){let i={},l=n.split("&");for(let s=0,c=l.length;s<c;s++){let f=l[s].split("=");i[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return i}class CR extends Error{constructor(i,l,s){super(i),this.description=l,this.context=s,this.type="TransportError"}}class Zf extends Ot{constructor(i){super(),this.writable=!1,No(this,i),this.opts=i,this.query=i.query,this.socket=i.socket,this.supportsBinary=!i.forceBase64}onError(i,l,s){return super.emitReserved("error",new CR(i,l,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(i){this.readyState==="open"&&this.write(i)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(i){const l=Ff(i,this.socket.binaryType);this.onPacket(l)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,l={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(l)}_hostname(){const i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_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(i){const l=_R(i);return l.length?"?"+l:""}}class OR extends Zf{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(i){this.readyState="pausing";const l=()=>{this.readyState="paused",i()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||l()})),this.writable||(s++,this.once("drain",function(){--s||l()}))}else l()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const l=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};yR(i,this.socket.binaryType).forEach(l),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const i=()=>{this.write([{type:"close"}])};this.readyState==="open"?i():this.once("open",i)}write(i){this.writable=!1,pR(i,l=>{this.doWrite(l,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",l=this.query||{};return this.opts.timestampRequests!==!1&&(l[this.opts.timestampParam]=dv()),!this.supportsBinary&&!l.sid&&(l.b64=1),this.createUri(i,l)}}let hv=!1;try{hv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const MR=hv;function DR(){}class zR extends OR{constructor(i){if(super(i),typeof location<"u"){const l=location.protocol==="https:";let s=location.port;s||(s=l?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||s!==i.port}}doWrite(i,l){const s=this.request({method:"POST",data:i});s.on("success",l),s.on("error",(c,f)=>{this.onError("xhr post error",c,f)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(l,s)=>{this.onError("xhr poll error",l,s)}),this.pollXhr=i}}let Nr=class So extends Ot{constructor(i,l,s){super(),this.createRequest=i,No(this,s),this._opts=s,this._method=s.method||"GET",this._uri=l,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var i;const l=fv(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");l.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(l);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let c in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(c)&&s.setRequestHeader(c,this._opts.extraHeaders[c])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(i=this._opts.cookieJar)===null||i===void 0||i.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var c;s.readyState===3&&((c=this._opts.cookieJar)===null||c===void 0||c.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(c){this.setTimeoutFn(()=>{this._onError(c)},0);return}typeof document<"u"&&(this._index=So.requestsCount++,So.requests[this._index]=this)}_onError(i){this.emitReserved("error",i,this._xhr),this._cleanup(!0)}_cleanup(i){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=DR,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete So.requests[this._index],this._xhr=null}}_onLoad(){const i=this._xhr.responseText;i!==null&&(this.emitReserved("data",i),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};Nr.requestsCount=0;Nr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Fy);else if(typeof addEventListener=="function"){const n="onpagehide"in qn?"pagehide":"unload";addEventListener(n,Fy,!1)}}function Fy(){for(let n in Nr.requests)Nr.requests.hasOwnProperty(n)&&Nr.requests[n].abort()}const NR=(function(){const n=mv({xdomain:!1});return n&&n.responseType!==null})();class kR extends zR{constructor(i){super(i);const l=i&&i.forceBase64;this.supportsBinary=NR&&!l}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new Nr(mv,this.uri(),i)}}function mv(n){const i=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||MR))return new XMLHttpRequest}catch{}if(!i)try{return new qn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const pv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class UR extends Zf{get name(){return"websocket"}doOpen(){const i=this.uri(),l=this.opts.protocols,s=pv?{}:fv(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(i,l,s)}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=i=>this.onClose({description:"websocket connection closed",context:i}),this.ws.onmessage=i=>this.onData(i.data),this.ws.onerror=i=>this.onError("websocket error",i)}write(i){this.writable=!1;for(let l=0;l<i.length;l++){const s=i[l],c=l===i.length-1;Xf(s,this.supportsBinary,f=>{try{this.doWrite(s,f)}catch{}c&&zo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const i=this.opts.secure?"wss":"ws",l=this.query||{};return this.opts.timestampRequests&&(l[this.opts.timestampParam]=dv()),this.supportsBinary||(l.b64=1),this.createUri(i,l)}}const rf=qn.WebSocket||qn.MozWebSocket;class LR extends UR{createSocket(i,l,s){return pv?new rf(i,l,s):l?new rf(i,l):new rf(i)}doWrite(i,l){this.ws.send(l)}}class BR extends Zf{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(i){return this.emitReserved("error",i)}this._transport.closed.then(()=>{this.onClose()}).catch(i=>{this.onError("webtransport error",i)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(i=>{const l=vR(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=i.readable.pipeThrough(l).getReader(),c=gR();c.readable.pipeTo(i.writable),this._writer=c.writable.getWriter();const f=()=>{s.read().then(({done:p,value:y})=>{p||(this.onPacket(y),f())}).catch(p=>{})};f();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(i){this.writable=!1;for(let l=0;l<i.length;l++){const s=i[l],c=l===i.length-1;this._writer.write(s).then(()=>{c&&zo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const jR={websocket:LR,webtransport:BR,polling:kR},qR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,HR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ef(n){if(n.length>8e3)throw"URI too long";const i=n,l=n.indexOf("["),s=n.indexOf("]");l!=-1&&s!=-1&&(n=n.substring(0,l)+n.substring(l,s).replace(/:/g,";")+n.substring(s,n.length));let c=qR.exec(n||""),f={},d=14;for(;d--;)f[HR[d]]=c[d]||"";return l!=-1&&s!=-1&&(f.source=i,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=QR(f,f.path),f.queryKey=YR(f,f.query),f}function QR(n,i){const l=/\/{2,9}/g,s=i.replace(l,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&s.splice(0,1),i.slice(-1)=="/"&&s.splice(s.length-1,1),s}function YR(n,i){const l={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,c,f){c&&(l[c]=f)}),l}const wf=typeof addEventListener=="function"&&typeof removeEventListener=="function",Eo=[];wf&&addEventListener("offline",()=>{Eo.forEach(n=>n())},!1);class fi extends Ot{constructor(i,l){if(super(),this.binaryType=SR,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,i&&typeof i=="object"&&(l=i,i=null),i){const s=Ef(i);l.hostname=s.host,l.secure=s.protocol==="https"||s.protocol==="wss",l.port=s.port,s.query&&(l.query=s.query)}else l.host&&(l.hostname=Ef(l.host).host);No(this,l),this.secure=l.secure!=null?l.secure:typeof location<"u"&&location.protocol==="https:",l.hostname&&!l.port&&(l.port=this.secure?"443":"80"),this.hostname=l.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=l.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},l.transports.forEach(s=>{const c=s.prototype.name;this.transports.push(c),this._transportsByName[c]=s}),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},l),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=AR(this.opts.query)),wf&&(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"})},Eo.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){const l=Object.assign({},this.opts.query);l.EIO=cv,l.transport=i,this.id&&(l.sid=this.id);const s=Object.assign({},this.opts,{query:l,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new this._transportsByName[i](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const i=this.opts.rememberUpgrade&&fi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const l=this.createTransport(i);l.open(),this.setTransport(l)}setTransport(i){this.transport&&this.transport.removeAllListeners(),this.transport=i,i.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",l=>this._onClose("transport close",l))}onOpen(){this.readyState="open",fi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",i),this.emitReserved("heartbeat"),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const l=new Error("server error");l.code=i.data,this._onError(l);break;case"message":this.emitReserved("data",i.data),this.emitReserved("message",i.data);break}}onHandshake(i){this.emitReserved("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this._pingInterval=i.pingInterval,this._pingTimeout=i.pingTimeout,this._maxPayload=i.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const i=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+i,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},i),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 i=this._getWritablePackets();this.transport.send(i),this._prevBufferLen=i.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let l=1;for(let s=0;s<this.writeBuffer.length;s++){const c=this.writeBuffer[s].data;if(c&&(l+=RR(c)),s>0&&l>this._maxPayload)return this.writeBuffer.slice(0,s);l+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const i=Date.now()>this._pingTimeoutTime;return i&&(this._pingTimeoutTime=0,zo(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,l,s){return this._sendPacket("message",i,l,s),this}send(i,l,s){return this._sendPacket("message",i,l,s),this}_sendPacket(i,l,s,c){if(typeof l=="function"&&(c=l,l=void 0),typeof s=="function"&&(c=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const f={type:i,data:l,options:s};this.emitReserved("packetCreate",f),this.writeBuffer.push(f),c&&this.once("flush",c),this.flush()}close(){const i=()=>{this._onClose("forced close"),this.transport.close()},l=()=>{this.off("upgrade",l),this.off("upgradeError",l),i()},s=()=>{this.once("upgrade",l),this.once("upgradeError",l)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():i()}):this.upgrading?s():i()),this}_onError(i){if(fi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",i),this._onClose("transport error",i)}_onClose(i,l){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(),wf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Eo.indexOf(this._offlineEventListener);s!==-1&&Eo.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,l),this.writeBuffer=[],this._prevBufferLen=0}}}fi.protocol=cv;class GR extends fi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let i=0;i<this._upgrades.length;i++)this._probe(this._upgrades[i])}_probe(i){let l=this.createTransport(i),s=!1;fi.priorWebsocketSuccess=!1;const c=()=>{s||(l.send([{type:"ping",data:"probe"}]),l.once("packet",g=>{if(!s)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",l),!l)return;fi.priorWebsocketSuccess=l.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(b(),this.setTransport(l),l.send([{type:"upgrade"}]),this.emitReserved("upgrade",l),l=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=l.name,this.emitReserved("upgradeError",T)}}))};function f(){s||(s=!0,b(),l.close(),l=null)}const d=g=>{const T=new Error("probe error: "+g);T.transport=l.name,f(),this.emitReserved("upgradeError",T)};function p(){d("transport closed")}function y(){d("socket closed")}function m(g){l&&g.name!==l.name&&f()}const b=()=>{l.removeListener("open",c),l.removeListener("error",d),l.removeListener("close",p),this.off("close",y),this.off("upgrading",m)};l.once("open",c),l.once("error",d),l.once("close",p),this.once("close",y),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&i!=="webtransport"?this.setTimeoutFn(()=>{s||l.open()},200):l.open()}onHandshake(i){this._upgrades=this._filterUpgrades(i.upgrades),super.onHandshake(i)}_filterUpgrades(i){const l=[];for(let s=0;s<i.length;s++)~this.transports.indexOf(i[s])&&l.push(i[s]);return l}}let VR=class extends GR{constructor(i,l={}){const s=typeof i=="object"?i:l;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(c=>jR[c]).filter(c=>!!c)),super(i,s)}};function KR(n,i="",l){let s=n;l=l||typeof location<"u"&&location,n==null&&(n=l.protocol+"//"+l.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=l.protocol+n:n=l.host+n),/^(https?|wss?):\/\//.test(n)||(typeof l<"u"?n=l.protocol+"//"+n:n="https://"+n),s=Ef(n)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const f=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+f+":"+s.port+i,s.href=s.protocol+"://"+f+(l&&l.port===s.port?"":":"+s.port),s}const XR=typeof ArrayBuffer=="function",FR=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,yv=Object.prototype.toString,ZR=typeof Blob=="function"||typeof Blob<"u"&&yv.call(Blob)==="[object BlobConstructor]",PR=typeof File=="function"||typeof File<"u"&&yv.call(File)==="[object FileConstructor]";function Pf(n){return XR&&(n instanceof ArrayBuffer||FR(n))||ZR&&n instanceof Blob||PR&&n instanceof File}function wo(n,i){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let l=0,s=n.length;l<s;l++)if(wo(n[l]))return!0;return!1}if(Pf(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return wo(n.toJSON(),!0);for(const l in n)if(Object.prototype.hasOwnProperty.call(n,l)&&wo(n[l]))return!0;return!1}function JR(n){const i=[],l=n.data,s=n;return s.data=Tf(l,i),s.attachments=i.length,{packet:s,buffers:i}}function Tf(n,i){if(!n)return n;if(Pf(n)){const l={_placeholder:!0,num:i.length};return i.push(n),l}else if(Array.isArray(n)){const l=new Array(n.length);for(let s=0;s<n.length;s++)l[s]=Tf(n[s],i);return l}else if(typeof n=="object"&&!(n instanceof Date)){const l={};for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&(l[s]=Tf(n[s],i));return l}return n}function IR(n,i){return n.data=Rf(n.data,i),delete n.attachments,n}function Rf(n,i){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<i.length)return i[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let l=0;l<n.length;l++)n[l]=Rf(n[l],i);else if(typeof n=="object")for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&(n[l]=Rf(n[l],i));return n}const $R=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Fe;(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"})(Fe||(Fe={}));class WR{constructor(i){this.replacer=i}encode(i){return(i.type===Fe.EVENT||i.type===Fe.ACK)&&wo(i)?this.encodeAsBinary({type:i.type===Fe.EVENT?Fe.BINARY_EVENT:Fe.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let l=""+i.type;return(i.type===Fe.BINARY_EVENT||i.type===Fe.BINARY_ACK)&&(l+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(l+=i.nsp+","),i.id!=null&&(l+=i.id),i.data!=null&&(l+=JSON.stringify(i.data,this.replacer)),l}encodeAsBinary(i){const l=JR(i),s=this.encodeAsString(l.packet),c=l.buffers;return c.unshift(s),c}}class Jf extends Ot{constructor(i){super(),this.reviver=i}add(i){let l;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");l=this.decodeString(i);const s=l.type===Fe.BINARY_EVENT;s||l.type===Fe.BINARY_ACK?(l.type=s?Fe.EVENT:Fe.ACK,this.reconstructor=new ex(l),l.attachments===0&&super.emitReserved("decoded",l)):super.emitReserved("decoded",l)}else if(Pf(i)||i.base64)if(this.reconstructor)l=this.reconstructor.takeBinaryData(i),l&&(this.reconstructor=null,super.emitReserved("decoded",l));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let l=0;const s={type:Number(i.charAt(0))};if(Fe[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===Fe.BINARY_EVENT||s.type===Fe.BINARY_ACK){const f=l+1;for(;i.charAt(++l)!=="-"&&l!=i.length;);const d=i.substring(f,l);if(d!=Number(d)||i.charAt(l)!=="-")throw new Error("Illegal attachments");s.attachments=Number(d)}if(i.charAt(l+1)==="/"){const f=l+1;for(;++l&&!(i.charAt(l)===","||l===i.length););s.nsp=i.substring(f,l)}else s.nsp="/";const c=i.charAt(l+1);if(c!==""&&Number(c)==c){const f=l+1;for(;++l;){const d=i.charAt(l);if(d==null||Number(d)!=d){--l;break}if(l===i.length)break}s.id=Number(i.substring(f,l+1))}if(i.charAt(++l)){const f=this.tryParse(i.substr(l));if(Jf.isPayloadValid(s.type,f))s.data=f;else throw new Error("invalid payload")}return s}tryParse(i){try{return JSON.parse(i,this.reviver)}catch{return!1}}static isPayloadValid(i,l){switch(i){case Fe.CONNECT:return Zy(l);case Fe.DISCONNECT:return l===void 0;case Fe.CONNECT_ERROR:return typeof l=="string"||Zy(l);case Fe.EVENT:case Fe.BINARY_EVENT:return Array.isArray(l)&&(typeof l[0]=="number"||typeof l[0]=="string"&&$R.indexOf(l[0])===-1);case Fe.ACK:case Fe.BINARY_ACK:return Array.isArray(l)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ex{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const l=IR(this.reconPack,this.buffers);return this.finishedReconstruction(),l}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Zy(n){return Object.prototype.toString.call(n)==="[object Object]"}const tx=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Jf,Encoder:WR,get PacketType(){return Fe}},Symbol.toStringTag,{value:"Module"}));function In(n,i,l){return n.on(i,l),function(){n.off(i,l)}}const nx=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class gv extends Ot{constructor(i,l,s){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=i,this.nsp=l,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const i=this.io;this.subs=[In(i,"open",this.onopen.bind(this)),In(i,"packet",this.onpacket.bind(this)),In(i,"error",this.onerror.bind(this)),In(i,"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(...i){return i.unshift("message"),this.emit.apply(this,i),this}emit(i,...l){var s,c,f;if(nx.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(l.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(l),this;const d={type:Fe.EVENT,data:l};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof l[l.length-1]=="function"){const b=this.ids++,g=l.pop();this._registerAckCallback(b,g),d.id=b}const p=(c=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||c===void 0?void 0:c.writable,y=this.connected&&!(!((f=this.io.engine)===null||f===void 0)&&f._hasPingExpired());return this.flags.volatile&&!p||(y?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(i,l){var s;const c=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(c===void 0){this.acks[i]=l;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let p=0;p<this.sendBuffer.length;p++)this.sendBuffer[p].id===i&&this.sendBuffer.splice(p,1);l.call(this,new Error("operation has timed out"))},c),d=(...p)=>{this.io.clearTimeoutFn(f),l.apply(this,p)};d.withError=!0,this.acks[i]=d}emitWithAck(i,...l){return new Promise((s,c)=>{const f=(d,p)=>d?c(d):s(p);f.withError=!0,l.push(f),this.emit(i,...l)})}_addToQueue(i){let l;typeof i[i.length-1]=="function"&&(l=i.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((c,...f)=>(this._queue[0],c!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),l&&l(c)):(this._queue.shift(),l&&l(null,...f)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const l=this._queue[0];l.pending&&!i||(l.pending=!0,l.tryCount++,this.flags=l.flags,this.emit.apply(this,l.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=>{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type:Fe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},i):i})}onerror(i){this.connected||this.emitReserved("connect_error",i)}onclose(i,l){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,l),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(i=>{if(!this.sendBuffer.some(s=>String(s.id)===i)){const s=this.acks[i];delete this.acks[i],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case Fe.CONNECT:i.data&&i.data.sid?this.onconnect(i.data.sid,i.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 Fe.EVENT:case Fe.BINARY_EVENT:this.onevent(i);break;case Fe.ACK:case Fe.BINARY_ACK:this.onack(i);break;case Fe.DISCONNECT:this.ondisconnect();break;case Fe.CONNECT_ERROR:this.destroy();const s=new Error(i.data.message);s.data=i.data.data,this.emitReserved("connect_error",s);break}}onevent(i){const l=i.data||[];i.id!=null&&l.push(this.ack(i.id)),this.connected?this.emitEvent(l):this.receiveBuffer.push(Object.freeze(l))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const l=this._anyListeners.slice();for(const s of l)s.apply(this,i)}super.emit.apply(this,i),this._pid&&i.length&&typeof i[i.length-1]=="string"&&(this._lastOffset=i[i.length-1])}ack(i){const l=this;let s=!1;return function(...c){s||(s=!0,l.packet({type:Fe.ACK,id:i,data:c}))}}onack(i){const l=this.acks[i.id];typeof l=="function"&&(delete this.acks[i.id],l.withError&&i.data.unshift(null),l.apply(this,i.data))}onconnect(i,l){this.id=i,this.recovered=l&&this._pid===l,this._pid=l,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(i=>this.emitEvent(i)),this.receiveBuffer=[],this.sendBuffer.forEach(i=>{this.notifyOutgoingListeners(i),this.packet(i)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(i=>i()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Fe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(i){return this.flags.compress=i,this}get volatile(){return this.flags.volatile=!0,this}timeout(i){return this.flags.timeout=i,this}onAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(i),this}prependAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(i),this}offAny(i){if(!this._anyListeners)return this;if(i){const l=this._anyListeners;for(let s=0;s<l.length;s++)if(i===l[s])return l.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(i),this}prependAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(i),this}offAnyOutgoing(i){if(!this._anyOutgoingListeners)return this;if(i){const l=this._anyOutgoingListeners;for(let s=0;s<l.length;s++)if(i===l[s])return l.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const l=this._anyOutgoingListeners.slice();for(const s of l)s.apply(this,i.data)}}}function Br(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}Br.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),l=Math.floor(i*this.jitter*n);n=(Math.floor(i*10)&1)==0?n-l:n+l}return Math.min(n,this.max)|0};Br.prototype.reset=function(){this.attempts=0};Br.prototype.setMin=function(n){this.ms=n};Br.prototype.setMax=function(n){this.max=n};Br.prototype.setJitter=function(n){this.jitter=n};class xf extends Ot{constructor(i,l){var s;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(l=i,i=void 0),l=l||{},l.path=l.path||"/socket.io",this.opts=l,No(this,l),this.reconnection(l.reconnection!==!1),this.reconnectionAttempts(l.reconnectionAttempts||1/0),this.reconnectionDelay(l.reconnectionDelay||1e3),this.reconnectionDelayMax(l.reconnectionDelayMax||5e3),this.randomizationFactor((s=l.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Br({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(l.timeout==null?2e4:l.timeout),this._readyState="closed",this.uri=i;const c=l.parser||tx;this.encoder=new c.Encoder,this.decoder=new c.Decoder,this._autoConnect=l.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(i){return arguments.length?(this._reconnection=!!i,i||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(i){return i===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=i,this)}reconnectionDelay(i){var l;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(l=this.backoff)===null||l===void 0||l.setMin(i),this)}randomizationFactor(i){var l;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(l=this.backoff)===null||l===void 0||l.setJitter(i),this)}reconnectionDelayMax(i){var l;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(l=this.backoff)===null||l===void 0||l.setMax(i),this)}timeout(i){return arguments.length?(this._timeout=i,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(i){if(~this._readyState.indexOf("open"))return this;this.engine=new VR(this.uri,this.opts);const l=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const c=In(l,"open",function(){s.onopen(),i&&i()}),f=p=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",p),i?i(p):this.maybeReconnectOnOpen()},d=In(l,"error",f);if(this._timeout!==!1){const p=this._timeout,y=this.setTimeoutFn(()=>{c(),f(new Error("timeout")),l.close()},p);this.opts.autoUnref&&y.unref(),this.subs.push(()=>{this.clearTimeoutFn(y)})}return this.subs.push(c),this.subs.push(d),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(In(i,"ping",this.onping.bind(this)),In(i,"data",this.ondata.bind(this)),In(i,"error",this.onerror.bind(this)),In(i,"close",this.onclose.bind(this)),In(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(l){this.onclose("parse error",l)}}ondecoded(i){zo(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,l){let s=this.nsps[i];return s?this._autoConnect&&!s.active&&s.connect():(s=new gv(this,i,l),this.nsps[i]=s),s}_destroy(i){const l=Object.keys(this.nsps);for(const s of l)if(this.nsps[s].active)return;this._close()}_packet(i){const l=this.encoder.encode(i);for(let s=0;s<l.length;s++)this.engine.write(l[s],i.options)}cleanup(){this.subs.forEach(i=>i()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(i,l){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,l),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const i=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const l=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(c=>{c?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",c)):i.onreconnect()}))},l);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const zl={};function To(n,i){typeof n=="object"&&(i=n,n=void 0),i=i||{};const l=KR(n,i.path||"/socket.io"),s=l.source,c=l.id,f=l.path,d=zl[c]&&f in zl[c].nsps,p=i.forceNew||i["force new connection"]||i.multiplex===!1||d;let y;return p?y=new xf(s,i):(zl[c]||(zl[c]=new xf(s,i)),y=zl[c]),l.query&&!i.query&&(i.query=l.queryKey),y.socket(l.path,i)}Object.assign(To,{Manager:xf,Socket:gv,io:To,connect:To});const po="/events",vx={SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",INPUT:"input",RESIZE:"resize",TERMINAL_INPUT:"terminal:input",TERMINAL_RESIZE:"terminal:resize"},Mr={SESSION_STDOUT:"session:stdout",SESSION_PATCH:"session:patch",SESSION_EXIT:"session:exit",SESSION_COMPLETED:"session:completed",SESSION_ID:"session:sessionId",SESSION_ERROR:"session:error",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",TEAM_RUN_INVALIDATED:"team-run:invalidated"};class ax{socket=null;baseUrl;visibilityHandler=null;constructor(){this.baseUrl=""}getSocket(){return this.socket||(this.socket=To(`${this.baseUrl}${po}`,{autoConnect:!1,transports:["websocket"],reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,reconnectionDelayMax:1e4}),this.socket.on("connect",()=>{console.log(`[Socket] Connected to ${po} t=${Date.now()}`)}),this.socket.on("disconnect",i=>{console.log(`[Socket] Disconnected from ${po}: t=${Date.now()}`,i)}),this.socket.on("connect_error",i=>{console.error(`[Socket] Connection error on ${po}: t=${Date.now()}`,i.message)})),this.socket}connect(){const i=this.getSocket();return i.connected||i.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)),i}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 Oo=new ax;function vv(n,i,l){const s=f=>Ro(f.queryKey,l),c=n.getQueriesData({predicate:s});return n.setQueriesData({predicate:s},f=>{if(!f||!Array.isArray(f.data))return f;const d=f.data.filter(p=>p.id!==i);return d.length===f.data.length?f:{...f,data:d,total:Math.max(0,f.total-(f.data.length-d.length))}}),n.removeQueries({queryKey:tt.tasks.detail(i),exact:!0}),c}function Ro(n,i){return!Array.isArray(n)||n[0]!=="tasks"||n[1]!=="list"?!1:i?n[2]===i:!0}function ix(n,i){for(const[l,s]of i)n.setQueryData(l,s)}function bx(n,i){const l={};return i?.status!=null&&(l.status=i.status),i?.page!=null&&(l.page=String(i.page)),i?.limit!=null&&(l.limit=String(i.limit)),Yi({queryKey:tt.tasks.list(n,i),queryFn:()=>bt.get(`/projects/${n}/tasks`,{params:l}),enabled:!!n})}function Sx(){const n=Ut();return en({mutationFn:({id:i,status:l})=>bt.patch(`/tasks/${i}/status`,{status:l}),onSuccess:i=>{n.invalidateQueries({queryKey:tt.tasks.all}),n.invalidateQueries({queryKey:tt.tasks.detail(i.id)})}})}function Ex(){const n=Ut();return en({mutationFn:i=>bt.delete(`/tasks/${i}`),onMutate:async i=>(await n.cancelQueries({queryKey:tt.tasks.all}),{snapshots:vv(n,i)}),onError:(i,l,s)=>{s?.snapshots&&ix(n,s.snapshots)},onSuccess:()=>{n.invalidateQueries({queryKey:tt.tasks.all}),n.invalidateQueries({queryKey:tt.projects.all})}})}function wx(){const n=Ut();return en({mutationFn:i=>bt.post(`/tasks/${i}/retry`,{}),onSuccess:i=>{n.invalidateQueries({queryKey:tt.tasks.all}),n.invalidateQueries({queryKey:tt.workspaces.all}),n.invalidateQueries({queryKey:tt.tasks.detail(i.id)})}})}function rx(){const n=Ut();x.useEffect(()=>{const i=Oo.connect(),l=()=>{n.invalidateQueries({queryKey:tt.tasks.all})},s=async f=>{await n.cancelQueries({predicate:d=>Ro(d.queryKey,f.projectId)}),n.invalidateQueries({predicate:d=>Ro(d.queryKey,f.projectId)}),n.invalidateQueries({queryKey:tt.tasks.detail(f.taskId)})},c=f=>{vv(n,f.taskId,f.projectId),n.invalidateQueries({predicate:d=>Ro(d.queryKey,f.projectId)}),n.invalidateQueries({queryKey:tt.projects.all})};return i.on("connect",l),i.on(Mr.TASK_UPDATED,s),i.on(Mr.TASK_DELETED,c),()=>{i.off("connect",l),i.off(Mr.TASK_UPDATED,s),i.off(Mr.TASK_DELETED,c)}},[n])}const De={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],workRequests:n=>["team-runs","work-requests",n],invocations:n=>["team-runs","invocations",n]},bv=5e3;function Sv(n,i){const l=n??[],s=l.findIndex(c=>c.id===i.id);return s>=0?l.map((c,f)=>f===s?i:c):[...l,i]}function Py(n,i){return!n||n.id!==i.teamRunId?n:{...n,messages:Sv(n.messages,i)}}function Ev(n,i){const l=n.getQueryData(De.detail(i));if(l?.taskId)return l.taskId;const s=n.getQueriesData({queryKey:De.all});for(const[,c]of s)if(c?.id===i&&c.taskId)return c.taskId}function If(n,i){const l=Ev(n,i);n.invalidateQueries({queryKey:De.all}),n.invalidateQueries({queryKey:De.detail(i)}),n.invalidateQueries({queryKey:De.workRequests(i)}),n.invalidateQueries({queryKey:De.invocations(i)}),n.invalidateQueries({queryKey:tt.tasks.all}),n.invalidateQueries({queryKey:tt.workspaces.all}),l&&(n.invalidateQueries({queryKey:tt.tasks.detail(l)}),n.invalidateQueries({queryKey:De.task(l)}),n.invalidateQueries({queryKey:tt.workspaces.list(l)}))}function Tx(){return Yi({queryKey:De.memberPresets,queryFn:()=>bt.get("/member-presets")})}function Rx(){const n=Ut();return en({mutationFn:i=>bt.post("/member-presets",i),onSuccess:()=>{n.invalidateQueries({queryKey:De.memberPresets}),n.invalidateQueries({queryKey:De.teamTemplates})}})}function xx(){const n=Ut();return en({mutationFn:({id:i,data:l})=>bt.patch(`/member-presets/${i}`,l),onSuccess:(i,l)=>{n.invalidateQueries({queryKey:De.memberPresets}),n.invalidateQueries({queryKey:De.memberPresetDetail(l.id)}),n.invalidateQueries({queryKey:De.teamTemplates})}})}function _x(){const n=Ut();return en({mutationFn:i=>bt.delete(`/member-presets/${i}`),onSuccess:()=>{n.invalidateQueries({queryKey:De.memberPresets}),n.invalidateQueries({queryKey:De.teamTemplates})}})}function Ax(){return Yi({queryKey:De.teamTemplates,queryFn:()=>bt.get("/team-templates")})}function Cx(){const n=Ut();return en({mutationFn:i=>bt.post("/team-templates",i),onSuccess:()=>{n.invalidateQueries({queryKey:De.teamTemplates})}})}function Ox(){const n=Ut();return en({mutationFn:({id:i,data:l})=>bt.patch(`/team-templates/${i}`,l),onSuccess:(i,l)=>{n.invalidateQueries({queryKey:De.teamTemplates}),n.invalidateQueries({queryKey:De.teamTemplateDetail(l.id)})}})}function Mx(){const n=Ut();return en({mutationFn:i=>bt.delete(`/team-templates/${i}`),onSuccess:()=>{n.invalidateQueries({queryKey:De.teamTemplates})}})}function Dx(){const n=Ut();return en({mutationFn:({taskId:i,...l})=>bt.post(`/tasks/${i}/team-runs`,l),onSuccess:(i,l)=>{n.setQueryData(De.task(l.taskId),i),n.setQueryData(De.detail(i.id),i),n.setQueryData(De.messages(i.id),i.messages??[]),n.setQueryData(De.workRequests(i.id),i.workRequests??[]),n.setQueryData(De.invocations(i.id),i.invocations??[]),n.invalidateQueries({queryKey:De.task(l.taskId)}),n.invalidateQueries({queryKey:De.all}),n.invalidateQueries({queryKey:tt.tasks.all}),n.invalidateQueries({queryKey:tt.tasks.detail(l.taskId)}),n.invalidateQueries({queryKey:tt.workspaces.all}),n.invalidateQueries({queryKey:tt.workspaces.list(l.taskId)})},onError:(i,l)=>{n.invalidateQueries({queryKey:De.task(l.taskId)}),n.invalidateQueries({queryKey:De.all})}})}function zx(n){return Yi({queryKey:De.task(n),queryFn:async()=>{try{return await bt.get(`/tasks/${n}/team-run`)}catch(i){if(i instanceof Vf&&i.status===404)return null;throw i}},enabled:!!n,retry:!1,refetchInterval:i=>i.state.data?bv:!1})}function Nx(n){return Yi({queryKey:De.messages(n),queryFn:async()=>{try{return await bt.get(`/team-runs/${n}/messages`)}catch(i){if(i instanceof Vf&&i.status===404)return[];throw i}},enabled:!!n,retry:!1,refetchInterval:bv})}function kx(n){const i=Ut();return en({mutationFn:l=>bt.post(`/team-runs/${n}/messages`,l),onSuccess:l=>{i.setQueryData(De.messages(n),c=>Sv(c,l)),i.setQueryData(De.detail(n),c=>Py(c,l));const s=Ev(i,n);s&&i.setQueryData(De.task(s),c=>Py(c,l)),i.invalidateQueries({queryKey:De.all}),i.invalidateQueries({queryKey:["tasks"]}),i.invalidateQueries({queryKey:tt.workspaces.all})}})}function Ux(n){const i=Ut();return en({mutationFn:l=>bt.post(`/team-runs/work-requests/${l}/approve`),onSuccess:()=>{If(i,n)}})}function Lx(n){const i=Ut();return en({mutationFn:l=>bt.post(`/team-runs/work-requests/${l}/reject`),onSuccess:()=>{If(i,n)}})}function Bx(n){const i=Ut();return en({mutationFn:({memberId:l,cancelQueued:s})=>bt.post(`/team-runs/${n}/members/${l}/stop`,{cancelQueued:s}),onSuccess:()=>{If(i,n)}})}function la(n,i){return n.scopes.includes(i)}function lx(){const n=Ut();x.useEffect(()=>{const i=Oo.connect(),l=f=>{if(!f){n.invalidateQueries({queryKey:De.all});return}n.invalidateQueries({queryKey:De.detail(f.teamRunId)}),(la(f,"team-run")||la(f,"team-members"))&&n.invalidateQueries({queryKey:De.all}),la(f,"room-messages")&&n.invalidateQueries({queryKey:De.messages(f.teamRunId)}),la(f,"work-requests")&&n.invalidateQueries({queryKey:De.workRequests(f.teamRunId)}),la(f,"agent-invocations")&&n.invalidateQueries({queryKey:De.invocations(f.teamRunId)}),f.taskId&&n.invalidateQueries({queryKey:De.task(f.taskId)}),f.taskId&&(la(f,"task")||la(f,"team-run"))&&n.invalidateQueries({queryKey:tt.tasks.detail(f.taskId)}),f.projectId&&(la(f,"task")||la(f,"team-run"))&&n.invalidateQueries({queryKey:tt.tasks.list(f.projectId)}),la(f,"workspaces")&&(n.invalidateQueries({queryKey:tt.workspaces.all}),f.taskId&&n.invalidateQueries({queryKey:tt.workspaces.list(f.taskId)}))},s=()=>l(),c=f=>l(f);return i.on("connect",s),i.on(Mr.TEAM_RUN_INVALIDATED,c),()=>{i.off("connect",s),i.off(Mr.TEAM_RUN_INVALIDATED,c)}},[n])}function sx(){return rx(),lx(),null}function ox(){return x.useEffect(()=>(Oo.connect(),()=>Oo.disconnect()),[]),be.jsx(oS,{client:PS,children:be.jsxs(aT,{children:[be.jsx(sx,{}),be.jsx(cR,{}),be.jsx(ZS,{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"}}})]})})}const ux="/api/tunnel/bootstrap";async function cx(){const n=new URL(window.location.href),i=n.searchParams.get("token");if(!i)return;const l=await fetch(`${ux}?token=${encodeURIComponent(i)}`,{method:"POST",credentials:"same-origin"});if(!l.ok)throw new Error(`Tunnel bootstrap failed (${l.status})`);n.searchParams.delete("token"),window.history.replaceState({},"",n.toString())}async function fx(){try{await cx()}catch(n){console.error("[Tunnel] Failed to bootstrap tunnel session",n)}jb.createRoot(document.getElementById("root")).render(be.jsx(x.StrictMode,{children:be.jsx(ox,{})}))}fx();export{bS as $,ug as A,Dw as B,vx as C,iT as D,nT as E,Uw as F,ey as G,hx as H,dx as I,kr as J,kt as K,Hg as L,xo as M,Wy as N,uS as O,dS as P,eS as Q,yS as R,Mr as S,hS as T,mS as U,Wt as V,vS as W,Gw as X,ty as Y,gS as Z,pS as _,Jw as a,W as a0,Ux as a1,Lx as a2,Bx as a3,Qw as a4,Vf as a5,yx as a6,Dx as a7,Nw as a8,kx as a9,zx as aa,Nx as ab,wx as ac,De as ad,bx as ae,Ex as af,Sx as ag,Ul as ah,Jy as ai,XT as aj,Ua as ak,Fw as al,px as b,Iw as c,fo as d,Ki as e,Yi as f,Ut as g,en as h,bt as i,be as j,Tx as k,Ax as l,Rx as m,xx as n,_x as o,Cx as p,tt as q,x as r,Ox as s,BS as t,Kg as u,Mx as v,Oo as w,qw as x,FT as y,Qy as z};