agent-tower 0.5.2-beta.2 → 0.5.2-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/dist/app.d.ts.map +1 -1
  2. package/dist/app.js +9 -2
  3. package/dist/app.js.map +1 -1
  4. package/dist/app.test.js +67 -0
  5. package/dist/app.test.js.map +1 -1
  6. package/dist/cli.js +2 -0
  7. package/dist/cli.js.map +1 -1
  8. package/dist/core/container.d.ts +2 -0
  9. package/dist/core/container.d.ts.map +1 -1
  10. package/dist/core/container.js +9 -1
  11. package/dist/core/container.js.map +1 -1
  12. package/dist/core/event-bus.d.ts +2 -1
  13. package/dist/core/event-bus.d.ts.map +1 -1
  14. package/dist/core/event-bus.js.map +1 -1
  15. package/dist/executors/__tests__/base.executor.test.d.ts +2 -0
  16. package/dist/executors/__tests__/base.executor.test.d.ts.map +1 -0
  17. package/dist/executors/__tests__/base.executor.test.js +264 -0
  18. package/dist/executors/__tests__/base.executor.test.js.map +1 -0
  19. package/dist/executors/__tests__/codex.executor.test.js +18 -1
  20. package/dist/executors/__tests__/codex.executor.test.js.map +1 -1
  21. package/dist/executors/base.executor.d.ts.map +1 -1
  22. package/dist/executors/base.executor.js +61 -33
  23. package/dist/executors/base.executor.js.map +1 -1
  24. package/dist/executors/codex.executor.d.ts.map +1 -1
  25. package/dist/executors/codex.executor.js +3 -4
  26. package/dist/executors/codex.executor.js.map +1 -1
  27. package/dist/executors/execution-env.d.ts +7 -1
  28. package/dist/executors/execution-env.d.ts.map +1 -1
  29. package/dist/executors/execution-env.js +41 -2
  30. package/dist/executors/execution-env.js.map +1 -1
  31. package/dist/index.js +2 -0
  32. package/dist/index.js.map +1 -1
  33. package/dist/mcp/types.d.ts +6 -6
  34. package/dist/routes/__tests__/tasks.test.js +179 -0
  35. package/dist/routes/__tests__/tasks.test.js.map +1 -1
  36. package/dist/routes/git.d.ts.map +1 -1
  37. package/dist/routes/git.js +41 -1
  38. package/dist/routes/git.js.map +1 -1
  39. package/dist/routes/tasks.d.ts.map +1 -1
  40. package/dist/routes/tasks.js +10 -2
  41. package/dist/routes/tasks.js.map +1 -1
  42. package/dist/services/__tests__/project.service.test.js +85 -1
  43. package/dist/services/__tests__/project.service.test.js.map +1 -1
  44. package/dist/services/__tests__/session-manager.team-run.test.js +84 -1
  45. package/dist/services/__tests__/session-manager.team-run.test.js.map +1 -1
  46. package/dist/services/__tests__/task.service.test.js +190 -0
  47. package/dist/services/__tests__/task.service.test.js.map +1 -1
  48. package/dist/services/__tests__/team-reconciler.service.test.js +2 -2
  49. package/dist/services/__tests__/team-reconciler.service.test.js.map +1 -1
  50. package/dist/services/__tests__/team-run.service.test.js +75 -1
  51. package/dist/services/__tests__/team-run.service.test.js.map +1 -1
  52. package/dist/services/__tests__/team-scheduler.service.test.js +46 -5
  53. package/dist/services/__tests__/team-scheduler.service.test.js.map +1 -1
  54. package/dist/services/__tests__/workspace-git-watcher.service.test.d.ts +2 -0
  55. package/dist/services/__tests__/workspace-git-watcher.service.test.d.ts.map +1 -0
  56. package/dist/services/__tests__/workspace-git-watcher.service.test.js +148 -0
  57. package/dist/services/__tests__/workspace-git-watcher.service.test.js.map +1 -0
  58. package/dist/services/__tests__/workspace.service.test.js +43 -1
  59. package/dist/services/__tests__/workspace.service.test.js.map +1 -1
  60. package/dist/services/project.service.d.ts +28 -24
  61. package/dist/services/project.service.d.ts.map +1 -1
  62. package/dist/services/project.service.js +11 -0
  63. package/dist/services/project.service.js.map +1 -1
  64. package/dist/services/session-manager.d.ts +44 -43
  65. package/dist/services/session-manager.d.ts.map +1 -1
  66. package/dist/services/session-manager.js +19 -3
  67. package/dist/services/session-manager.js.map +1 -1
  68. package/dist/services/task-cleanup.service.d.ts +3 -1
  69. package/dist/services/task-cleanup.service.d.ts.map +1 -1
  70. package/dist/services/task-cleanup.service.js +6 -1
  71. package/dist/services/task-cleanup.service.js.map +1 -1
  72. package/dist/services/task.service.d.ts +96 -65
  73. package/dist/services/task.service.d.ts.map +1 -1
  74. package/dist/services/task.service.js +208 -15
  75. package/dist/services/task.service.js.map +1 -1
  76. package/dist/services/team-run.service.d.ts +2 -0
  77. package/dist/services/team-run.service.d.ts.map +1 -1
  78. package/dist/services/team-run.service.js +38 -9
  79. package/dist/services/team-run.service.js.map +1 -1
  80. package/dist/services/team-scheduler.service.d.ts.map +1 -1
  81. package/dist/services/team-scheduler.service.js +16 -4
  82. package/dist/services/team-scheduler.service.js.map +1 -1
  83. package/dist/services/workspace-git-watcher.service.d.ts +62 -0
  84. package/dist/services/workspace-git-watcher.service.d.ts.map +1 -0
  85. package/dist/services/workspace-git-watcher.service.js +427 -0
  86. package/dist/services/workspace-git-watcher.service.js.map +1 -0
  87. package/dist/services/workspace.service.d.ts +99 -108
  88. package/dist/services/workspace.service.d.ts.map +1 -1
  89. package/dist/services/workspace.service.js +43 -6
  90. package/dist/services/workspace.service.js.map +1 -1
  91. package/dist/socket/events.d.ts +1 -1
  92. package/dist/socket/events.d.ts.map +1 -1
  93. package/dist/socket/events.js.map +1 -1
  94. package/dist/socket/socket-gateway.d.ts.map +1 -1
  95. package/dist/socket/socket-gateway.js +5 -1
  96. package/dist/socket/socket-gateway.js.map +1 -1
  97. package/dist/web/assets/AgentDemoPage-DRtgA1-w.js +1 -0
  98. package/dist/web/assets/{DemoPage-PD8AX5pI.js → DemoPage-8g4kqlV1.js} +3 -3
  99. package/dist/web/assets/GeneralSettingsPage-b2dViAif.js +1 -0
  100. package/dist/web/assets/{MemberAvatar-BDXmryjB.js → MemberAvatar-BuaKw8fE.js} +1 -1
  101. package/dist/web/assets/NotificationSettingsPage-DCtnFBrk.js +1 -0
  102. package/dist/web/assets/ProfileSettingsPage-Hplbudpu.js +3 -0
  103. package/dist/web/assets/ProjectKanbanPage-UJVkISeV.js +89 -0
  104. package/dist/web/assets/ProjectSettingsPage-CnG-6FVF.js +2 -0
  105. package/dist/web/assets/ProviderSettingsPage-B-u7Av-v.js +54 -0
  106. package/dist/web/assets/SettingsMasterDetail-C7L4KTOf.js +1 -0
  107. package/dist/web/assets/TeamSettingsPage-DCsq_ojZ.js +1 -0
  108. package/dist/web/assets/arrow-left-BSle2OYV.js +1 -0
  109. package/dist/web/assets/check-COf1UbPe.js +1 -0
  110. package/dist/web/assets/chevron-down-Dj8_pYCl.js +1 -0
  111. package/dist/web/assets/chevron-right-BUCnUjsN.js +1 -0
  112. package/dist/web/assets/{chevron-up-BEHjZ-SB.js → chevron-up-BhzmceCN.js} +1 -1
  113. package/dist/web/assets/{code-block-OCS4YCEC-6FHTyCN2.js → code-block-OCS4YCEC-C9ZDvx5q.js} +1 -1
  114. package/dist/web/assets/{confirm-dialog-B_wk_zqm.js → confirm-dialog-NY6uLJRk.js} +1 -1
  115. package/dist/web/assets/folder-picker-B5loyQsl.js +1 -0
  116. package/dist/web/assets/index-3iFMFw1l.css +1 -0
  117. package/dist/web/assets/index-DSFOeuuj.js +13 -0
  118. package/dist/web/assets/input-D67geHKZ.js +1 -0
  119. package/dist/web/assets/layers-Dl9LLqoY.js +1 -0
  120. package/dist/web/assets/loader-circle-CP1oxYjb.js +1 -0
  121. package/dist/web/assets/{mermaid-NOHMQCX5-fubZbKyF.js → mermaid-NOHMQCX5-C-bBE9vu.js} +4 -4
  122. package/dist/web/assets/message-square-Bwt_cqko.js +1 -0
  123. package/dist/web/assets/modal-0iwqEf_V.js +1 -0
  124. package/dist/web/assets/{pencil-uRBgB4qA.js → pencil-CAgGPSMf.js} +1 -1
  125. package/dist/web/assets/rotate-ccw-CnfGwAnp.js +1 -0
  126. package/dist/web/assets/{select-BMlH2AuL.js → select-C0X1iRxk.js} +1 -1
  127. package/dist/web/assets/switch-D_KOTssd.js +1 -0
  128. package/dist/web/assets/textarea-DS-Evqsv.js +1 -0
  129. package/dist/web/assets/{upload-B-Mpvu9j.js → upload-CTsJ3wDk.js} +1 -1
  130. package/dist/web/assets/{use-profiles-D6cZwU1R.js → use-profiles-CzdxiQuG.js} +1 -1
  131. package/dist/web/assets/{use-providers-DVP6emIi.js → use-providers-BdxKwaE3.js} +1 -1
  132. package/dist/web/favicon.ico +0 -0
  133. package/dist/web/index.html +4 -4
  134. package/node_modules/@agent-tower/shared/dist/socket/events.d.ts +9 -0
  135. package/node_modules/@agent-tower/shared/dist/socket/events.d.ts.map +1 -1
  136. package/node_modules/@agent-tower/shared/dist/socket/events.js +1 -0
  137. package/node_modules/@agent-tower/shared/dist/socket/events.js.map +1 -1
  138. package/node_modules/@agent-tower/shared/dist/types.d.ts +21 -0
  139. package/node_modules/@agent-tower/shared/dist/types.d.ts.map +1 -1
  140. package/node_modules/@agent-tower/shared/dist/types.js.map +1 -1
  141. package/node_modules/@prisma/client/.prisma/client/edge.js +2 -2
  142. package/node_modules/@prisma/client/.prisma/client/index.js +2 -2
  143. package/package.json +1 -1
  144. package/dist/web/assets/AgentDemoPage-Co63rtls.js +0 -1
  145. package/dist/web/assets/GeneralSettingsPage-C5eiEeTZ.js +0 -1
  146. package/dist/web/assets/NotificationSettingsPage-BjjPan2M.js +0 -1
  147. package/dist/web/assets/ProfileSettingsPage-BRpeNq6u.js +0 -3
  148. package/dist/web/assets/ProjectKanbanPage-DUUu2EYy.js +0 -89
  149. package/dist/web/assets/ProjectSettingsPage-avctMKfk.js +0 -2
  150. package/dist/web/assets/ProviderSettingsPage-BIUYN2e0.js +0 -54
  151. package/dist/web/assets/SettingsSection-pLJ3msrT.js +0 -1
  152. package/dist/web/assets/TeamSettingsPage-BjKW9nT8.js +0 -1
  153. package/dist/web/assets/arrow-left-lFz8nyZM.js +0 -1
  154. package/dist/web/assets/button-BUA8P726.js +0 -1
  155. package/dist/web/assets/check-BYuuXc71.js +0 -1
  156. package/dist/web/assets/chevron-down-B931AgE2.js +0 -1
  157. package/dist/web/assets/chevron-right-F9i4wey6.js +0 -1
  158. package/dist/web/assets/circle-check-C7xXtl8B.js +0 -1
  159. package/dist/web/assets/folder-picker-BEHS3b2Q.js +0 -1
  160. package/dist/web/assets/index-DEQhT5sD.css +0 -1
  161. package/dist/web/assets/index-RxbHMWXV.js +0 -13
  162. package/dist/web/assets/loader-circle-stJcjnm-.js +0 -1
  163. package/dist/web/assets/message-square-C8lb-TDo.js +0 -1
  164. package/dist/web/assets/modal-UGrjU63G.js +0 -1
  165. package/dist/web/assets/rotate-ccw-CWaMrTz4.js +0 -1
@@ -0,0 +1,13 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GeneralSettingsPage-b2dViAif.js","assets/select-C0X1iRxk.js","assets/chevron-down-Dj8_pYCl.js","assets/check-COf1UbPe.js","assets/textarea-DS-Evqsv.js","assets/use-providers-BdxKwaE3.js","assets/ProviderSettingsPage-B-u7Av-v.js","assets/confirm-dialog-NY6uLJRk.js","assets/modal-0iwqEf_V.js","assets/input-D67geHKZ.js","assets/switch-D_KOTssd.js","assets/log-adapter-CtvxzS4j.js","assets/SettingsMasterDetail-C7L4KTOf.js","assets/arrow-left-BSle2OYV.js","assets/upload-CTsJ3wDk.js","assets/pencil-CAgGPSMf.js","assets/rotate-ccw-CnfGwAnp.js","assets/TeamSettingsPage-DCsq_ojZ.js","assets/MemberAvatar-BuaKw8fE.js","assets/chevron-up-BhzmceCN.js","assets/ProjectSettingsPage-CnG-6FVF.js","assets/folder-picker-B5loyQsl.js","assets/chevron-right-BUCnUjsN.js","assets/loader-circle-CP1oxYjb.js","assets/NotificationSettingsPage-DCtnFBrk.js","assets/message-square-Bwt_cqko.js","assets/ProfileSettingsPage-Hplbudpu.js","assets/use-profiles-CzdxiQuG.js","assets/layers-Dl9LLqoY.js","assets/ProjectKanbanPage-UJVkISeV.js","assets/mermaid-NOHMQCX5-C-bBE9vu.js","assets/mermaid-NOHMQCX5-lI9o3AWT.css","assets/ProjectKanbanPage-G5OQeJvU.css","assets/AgentDemoPage-DRtgA1-w.js"])))=>i.map(i=>d[i]);
2
+ function Ub(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 ng(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Yc={exports:{}},Ol={};var Bp;function Lb(){if(Bp)return Ol;Bp=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 Ol.Fragment=i,Ol.jsx=l,Ol.jsxs=l,Ol}var qp;function jb(){return qp||(qp=1,Yc.exports=Lb()),Yc.exports}var Q=jb(),Vc={exports:{}},Oe={};var Hp;function Bb(){if(Hp)return Oe;Hp=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"),E=Symbol.iterator;function M(x){return x===null||typeof x!="object"?null:(x=E&&x[E]||x["@@iterator"],typeof x=="function"?x:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,K={};function G(x,H,B){this.props=x,this.context=H,this.refs=K,this.updater=B||U}G.prototype.isReactComponent={},G.prototype.setState=function(x,H){if(typeof x!="object"&&typeof x!="function"&&x!=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,x,H,"setState")},G.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function J(){}J.prototype=G.prototype;function $(x,H,B){this.props=x,this.context=H,this.refs=K,this.updater=B||U}var ge=$.prototype=new J;ge.constructor=$,j(ge,G.prototype),ge.isPureReactComponent=!0;var he=Array.isArray;function me(){}var A={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function oe(x,H,B){var Z=B.ref;return{$$typeof:n,type:x,key:H,ref:Z!==void 0?Z:null,props:B}}function Ce(x,H){return oe(x.type,H,x.props)}function Ae(x){return typeof x=="object"&&x!==null&&x.$$typeof===n}function Te(x){var H={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(B){return H[B]})}var ke=/\/+/g;function Ue(x,H){return typeof x=="object"&&x!==null&&x.key!=null?Te(""+x.key):H.toString(36)}function we(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(me,me):(x.status="pending",x.then(function(H){x.status==="pending"&&(x.status="fulfilled",x.value=H)},function(H){x.status==="pending"&&(x.status="rejected",x.reason=H)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function C(x,H,B,Z,te){var ue=typeof x;(ue==="undefined"||ue==="boolean")&&(x=null);var ce=!1;if(x===null)ce=!0;else switch(ue){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(x.$$typeof){case n:case i:ce=!0;break;case b:return ce=x._init,C(ce(x._payload),H,B,Z,te)}}if(ce)return te=te(x),ce=Z===""?"."+Ue(x,0):Z,he(te)?(B="",ce!=null&&(B=ce.replace(ke,"$&/")+"/"),C(te,H,B,"",function(Ht){return Ht})):te!=null&&(Ae(te)&&(te=Ce(te,B+(te.key==null||x&&x.key===te.key?"":(""+te.key).replace(ke,"$&/")+"/")+ce)),H.push(te)),1;ce=0;var Re=Z===""?".":Z+":";if(he(x))for(var Qe=0;Qe<x.length;Qe++)Z=x[Qe],ue=Re+Ue(Z,Qe),ce+=C(Z,H,B,ue,te);else if(Qe=M(x),typeof Qe=="function")for(x=Qe.call(x),Qe=0;!(Z=x.next()).done;)Z=Z.value,ue=Re+Ue(Z,Qe++),ce+=C(Z,H,B,ue,te);else if(ue==="object"){if(typeof x.then=="function")return C(we(x),H,B,Z,te);throw H=String(x),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return ce}function P(x,H,B){if(x==null)return x;var Z=[],te=0;return C(x,Z,"","",function(ue){return H.call(B,ue,te++)}),Z}function q(x){if(x._status===-1){var H=x._result;H=H(),H.then(function(B){(x._status===0||x._status===-1)&&(x._status=1,x._result=B)},function(B){(x._status===0||x._status===-1)&&(x._status=2,x._result=B)}),x._status===-1&&(x._status=0,x._result=H)}if(x._status===1)return x._result.default;throw x._result}var ye=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},ve={map:P,forEach:function(x,H,B){P(x,function(){H.apply(this,arguments)},B)},count:function(x){var H=0;return P(x,function(){H++}),H},toArray:function(x){return P(x,function(H){return H})||[]},only:function(x){if(!Ae(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return Oe.Activity=g,Oe.Children=ve,Oe.Component=G,Oe.Fragment=l,Oe.Profiler=c,Oe.PureComponent=$,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(x){return A.H.useMemoCache(x)}},Oe.cache=function(x){return function(){return x.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(x,H,B){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var Z=j({},x.props),te=x.key;if(H!=null)for(ue in H.key!==void 0&&(te=""+H.key),H)!V.call(H,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&H.ref===void 0||(Z[ue]=H[ue]);var ue=arguments.length-2;if(ue===1)Z.children=B;else if(1<ue){for(var ce=Array(ue),Re=0;Re<ue;Re++)ce[Re]=arguments[Re+2];Z.children=ce}return oe(x.type,te,Z)},Oe.createContext=function(x){return x={$$typeof:d,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:f,_context:x},x},Oe.createElement=function(x,H,B){var Z,te={},ue=null;if(H!=null)for(Z in H.key!==void 0&&(ue=""+H.key),H)V.call(H,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(te[Z]=H[Z]);var ce=arguments.length-2;if(ce===1)te.children=B;else if(1<ce){for(var Re=Array(ce),Qe=0;Qe<ce;Qe++)Re[Qe]=arguments[Qe+2];te.children=Re}if(x&&x.defaultProps)for(Z in ce=x.defaultProps,ce)te[Z]===void 0&&(te[Z]=ce[Z]);return oe(x,ue,te)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(x){return{$$typeof:p,render:x}},Oe.isValidElement=Ae,Oe.lazy=function(x){return{$$typeof:b,_payload:{_status:-1,_result:x},_init:q}},Oe.memo=function(x,H){return{$$typeof:m,type:x,compare:H===void 0?null:H}},Oe.startTransition=function(x){var H=A.T,B={};A.T=B;try{var Z=x(),te=A.S;te!==null&&te(B,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(me,ye)}catch(ue){ye(ue)}finally{H!==null&&B.types!==null&&(H.types=B.types),A.T=H}},Oe.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},Oe.use=function(x){return A.H.use(x)},Oe.useActionState=function(x,H,B){return A.H.useActionState(x,H,B)},Oe.useCallback=function(x,H){return A.H.useCallback(x,H)},Oe.useContext=function(x){return A.H.useContext(x)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(x,H){return A.H.useDeferredValue(x,H)},Oe.useEffect=function(x,H){return A.H.useEffect(x,H)},Oe.useEffectEvent=function(x){return A.H.useEffectEvent(x)},Oe.useId=function(){return A.H.useId()},Oe.useImperativeHandle=function(x,H,B){return A.H.useImperativeHandle(x,H,B)},Oe.useInsertionEffect=function(x,H){return A.H.useInsertionEffect(x,H)},Oe.useLayoutEffect=function(x,H){return A.H.useLayoutEffect(x,H)},Oe.useMemo=function(x,H){return A.H.useMemo(x,H)},Oe.useOptimistic=function(x,H){return A.H.useOptimistic(x,H)},Oe.useReducer=function(x,H,B){return A.H.useReducer(x,H,B)},Oe.useRef=function(x){return A.H.useRef(x)},Oe.useState=function(x){return A.H.useState(x)},Oe.useSyncExternalStore=function(x,H,B){return A.H.useSyncExternalStore(x,H,B)},Oe.useTransition=function(){return A.H.useTransition()},Oe.version="19.2.4",Oe}var Qp;function Cf(){return Qp||(Qp=1,Vc.exports=Bb()),Vc.exports}var T=Cf();const ee=ng(T),qb=Ub({__proto__:null,default:ee},[T]);var Gc={exports:{}},Ml={},Kc={exports:{}},Xc={};var Yp;function Hb(){return Yp||(Yp=1,(function(n){function i(C,P){var q=C.length;C.push(P);e:for(;0<q;){var ye=q-1>>>1,ve=C[ye];if(0<c(ve,P))C[ye]=P,C[q]=ve,q=ye;else break e}}function l(C){return C.length===0?null:C[0]}function s(C){if(C.length===0)return null;var P=C[0],q=C.pop();if(q!==P){C[0]=q;e:for(var ye=0,ve=C.length,x=ve>>>1;ye<x;){var H=2*(ye+1)-1,B=C[H],Z=H+1,te=C[Z];if(0>c(B,q))Z<ve&&0>c(te,B)?(C[ye]=te,C[Z]=q,ye=Z):(C[ye]=B,C[H]=q,ye=H);else if(Z<ve&&0>c(te,q))C[ye]=te,C[Z]=q,ye=Z;else break e}}return P}function c(C,P){var q=C.sortIndex-P.sortIndex;return q!==0?q:C.id-P.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,E=3,M=!1,U=!1,j=!1,K=!1,G=typeof setTimeout=="function"?setTimeout:null,J=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function ge(C){for(var P=l(m);P!==null;){if(P.callback===null)s(m);else if(P.startTime<=C)s(m),P.sortIndex=P.expirationTime,i(y,P);else break;P=l(m)}}function he(C){if(j=!1,ge(C),!U)if(l(y)!==null)U=!0,me||(me=!0,Te());else{var P=l(m);P!==null&&we(he,P.startTime-C)}}var me=!1,A=-1,V=5,oe=-1;function Ce(){return K?!0:!(n.unstable_now()-oe<V)}function Ae(){if(K=!1,me){var C=n.unstable_now();oe=C;var P=!0;try{e:{U=!1,j&&(j=!1,J(A),A=-1),M=!0;var q=E;try{t:{for(ge(C),g=l(y);g!==null&&!(g.expirationTime>C&&Ce());){var ye=g.callback;if(typeof ye=="function"){g.callback=null,E=g.priorityLevel;var ve=ye(g.expirationTime<=C);if(C=n.unstable_now(),typeof ve=="function"){g.callback=ve,ge(C),P=!0;break t}g===l(y)&&s(y),ge(C)}else s(y);g=l(y)}if(g!==null)P=!0;else{var x=l(m);x!==null&&we(he,x.startTime-C),P=!1}}break e}finally{g=null,E=q,M=!1}P=void 0}}finally{P?Te():me=!1}}}var Te;if(typeof $=="function")Te=function(){$(Ae)};else if(typeof MessageChannel<"u"){var ke=new MessageChannel,Ue=ke.port2;ke.port1.onmessage=Ae,Te=function(){Ue.postMessage(null)}}else Te=function(){G(Ae,0)};function we(C,P){A=G(function(){C(n.unstable_now())},P)}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"):V=0<C?Math.floor(1e3/C):5},n.unstable_getCurrentPriorityLevel=function(){return E},n.unstable_next=function(C){switch(E){case 1:case 2:case 3:var P=3;break;default:P=E}var q=E;E=P;try{return C()}finally{E=q}},n.unstable_requestPaint=function(){K=!0},n.unstable_runWithPriority=function(C,P){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var q=E;E=C;try{return P()}finally{E=q}},n.unstable_scheduleCallback=function(C,P,q){var ye=n.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?ye+q:ye):q=ye,C){case 1:var ve=-1;break;case 2:ve=250;break;case 5:ve=1073741823;break;case 4:ve=1e4;break;default:ve=5e3}return ve=q+ve,C={id:b++,callback:P,priorityLevel:C,startTime:q,expirationTime:ve,sortIndex:-1},q>ye?(C.sortIndex=q,i(m,C),l(y)===null&&C===l(m)&&(j?(J(A),A=-1):j=!0,we(he,q-ye))):(C.sortIndex=ve,i(y,C),U||M||(U=!0,me||(me=!0,Te()))),C},n.unstable_shouldYield=Ce,n.unstable_wrapCallback=function(C){var P=E;return function(){var q=E;E=P;try{return C.apply(this,arguments)}finally{E=q}}}})(Xc)),Xc}var Vp;function Qb(){return Vp||(Vp=1,Kc.exports=Hb()),Kc.exports}var Fc={exports:{}},Jt={};var Gp;function Yb(){if(Gp)return Jt;Gp=1;var n=Cf();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 Jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Jt.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)},Jt.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()}},Jt.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))},Jt.prefetchDNS=function(y){typeof y=="string"&&s.d.D(y)},Jt.preinit=function(y,m){if(typeof y=="string"&&m&&typeof m.as=="string"){var b=m.as,g=p(b,m.crossOrigin),E=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:E,fetchPriority:M}):b==="script"&&s.d.X(y,{crossOrigin:g,integrity:E,fetchPriority:M,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Jt.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)},Jt.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})}},Jt.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)},Jt.requestFormReset=function(y){s.d.r(y)},Jt.unstable_batchedUpdates=function(y,m){return y(m)},Jt.useFormState=function(y,m,b){return d.H.useFormState(y,m,b)},Jt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Jt.version="19.2.4",Jt}var Kp;function ag(){if(Kp)return Fc.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(),Fc.exports=Yb(),Fc.exports}var Xp;function Vb(){if(Xp)return Ml;Xp=1;var n=Qb(),i=Cf(),l=ag();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,E=Symbol.for("react.element"),M=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),$=Symbol.for("react.context"),ge=Symbol.for("react.forward_ref"),he=Symbol.for("react.suspense"),me=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),oe=Symbol.for("react.activity"),Ce=Symbol.for("react.memo_cache_sentinel"),Ae=Symbol.iterator;function Te(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 j:return"Fragment";case G:return"Profiler";case K:return"StrictMode";case he:return"Suspense";case me:return"SuspenseList";case oe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case U:return"Portal";case $:return e.displayName||"Context";case J:return(e._context.displayName||"Context")+".Consumer";case ge: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 V:t=e._payload,e=e._init;try{return Ue(e(t))}catch{}}return null}var we=Array.isArray,C=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},ye=[],ve=-1;function x(e){return{current:e}}function H(e){0>ve||(e.current=ye[ve],ye[ve]=null,ve--)}function B(e,t){ve++,ye[ve]=e.current,e.current=t}var Z=x(null),te=x(null),ue=x(null),ce=x(null);function Re(e,t){switch(B(ue,t),B(te,e),B(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?sp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=sp(t),e=op(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(Z),B(Z,e)}function Qe(){H(Z),H(te),H(ue)}function Ht(e){e.memoizedState!==null&&B(ce,e);var t=Z.current,a=op(t,e.type);t!==a&&(B(te,e),B(Z,a))}function $t(e){te.current===e&&(H(Z),H(te)),ce.current===e&&(H(ce),Rl._currentValue=q)}var Je,Gn;function nn(e){if(Je===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Je=t&&t[1]||"",Gn=-1<a.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+Je+e+Gn}var gi=!1;function an(e,t){if(!e||gi)return"";gi=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(L){var z=L}Reflect.construct(e,[],F)}else{try{F.call()}catch(L){z=L}e.call(F.prototype)}}else{try{throw Error()}catch(L){z=L}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(L){if(L&&z&&typeof L.stack=="string")return[L.stack,z.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 w=h.split(`
5
+ `),N=v.split(`
6
+ `);for(o=r=0;r<w.length&&!w[r].includes("DetermineComponentFrameRoot");)r++;for(;o<N.length&&!N[o].includes("DetermineComponentFrameRoot");)o++;if(r===w.length||o===N.length)for(r=w.length-1,o=N.length-1;1<=r&&0<=o&&w[r]!==N[o];)o--;for(;1<=r&&0<=o;r--,o--)if(w[r]!==N[o]){if(r!==1||o!==1)do if(r--,o--,0>o||w[r]!==N[o]){var Y=`
7
+ `+w[r].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),Y}while(1<=r&&0<=o);break}}}finally{gi=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?nn(a):""}function da(e,t){switch(e.tag){case 26:case 27:case 5:return nn(e.type);case 16:return nn("Lazy");case 13:return e.child!==t&&t!==null?nn("Suspense Fallback"):nn("Suspense");case 19:return nn("SuspenseList");case 0:case 15:return an(e.type,!1);case 11:return an(e.type.render,!1);case 1:return an(e.type,!0);case 31:return nn("Activity");default:return""}}function vi(e){try{var t="",a=null;do t+=da(e,a),a=e,e=e.return;while(e);return t}catch(r){return`
8
+ Error generating stack: `+r.message+`
9
+ `+r.stack}}var Pt=Object.prototype.hasOwnProperty,bi=n.unstable_scheduleCallback,Si=n.unstable_cancelCallback,Qt=n.unstable_shouldYield,ta=n.unstable_requestPaint,mt=n.unstable_now,ha=n.unstable_getCurrentPriorityLevel,na=n.unstable_ImmediatePriority,Ba=n.unstable_UserBlockingPriority,Yt=n.unstable_NormalPriority,Wt=n.unstable_LowPriority,_n=n.unstable_IdlePriority,Zi=n.log,An=n.unstable_setDisableYieldValue,ma=null,ut=null;function rn(e){if(typeof Zi=="function"&&An(e),ut&&typeof ut.setStrictMode=="function")try{ut.setStrictMode(ma,e)}catch{}}var zt=Math.clz32?Math.clz32:pn,Ji=Math.log,wi=Math.LN2;function pn(e){return e>>>=0,e===0?32:31-(Ji(e)/wi|0)|0}var Kn=256,pa=262144,Xn=4194304;function Cn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function _e(e,t,a){var r=e.pendingLanes;if(r===0)return 0;var o=0,u=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var v=r&134217727;return v!==0?(r=v&~u,r!==0?o=Cn(r):(h&=v,h!==0?o=Cn(h):a||(a=v&~e,a!==0&&(o=Cn(a))))):(v=r&~u,v!==0?o=Cn(v):h!==0?o=Cn(h):a||(a=r&~e,a!==0&&(o=Cn(a)))),o===0?0:t!==0&&t!==o&&(t&u)===0&&(u=o&-o,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:o}function lt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function wt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Et(){var e=Xn;return Xn<<=1,(Xn&62914560)===0&&(Xn=4194304),e}function yn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function st(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Zt(e,t,a,r,o,u){var h=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var v=e.entanglements,w=e.expirationTimes,N=e.hiddenUpdates;for(a=h&~a;0<a;){var Y=31-zt(a),F=1<<Y;v[Y]=0,w[Y]=-1;var z=N[Y];if(z!==null)for(N[Y]=null,Y=0;Y<z.length;Y++){var L=z[Y];L!==null&&(L.lane&=-536870913)}a&=~F}r!==0&&ya(e,r,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(h&~t))}function ya(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-zt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|a&261930}function S(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var r=31-zt(a),o=1<<r;o&t|e[r]&t&&(e[r]|=t),a&=~o}}function _(e,t){var a=t&-t;return a=(a&42)!==0?1:k(a),(a&(e.suspendedLanes|t))!==0?0:a}function k(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function I(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function W(){var e=P.p;return e!==0?e:(e=window.event,e===void 0?32:Dp(e.type))}function pe(e,t){var a=P.p;try{return P.p=e,t()}finally{P.p=a}}var ae=Math.random().toString(36).slice(2),ne="__reactFiber$"+ae,ie="__reactProps$"+ae,de="__reactContainer$"+ae,Ee="__reactEvents$"+ae,be="__reactListeners$"+ae,Ze="__reactHandles$"+ae,Ye="__reactResources$"+ae,pt="__reactMarker$"+ae;function gt(e){delete e[ne],delete e[ie],delete e[Ee],delete e[be],delete e[Ze]}function vt(e){var t=e[ne];if(t)return t;for(var a=e.parentNode;a;){if(t=a[de]||a[ne]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=pp(e);e!==null;){if(a=e[ne])return a;e=pp(e)}return t}e=a,a=e.parentNode}return null}function Ve(e){if(e=e[ne]||e[de]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function jt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function ln(e){var t=e[Ye];return t||(t=e[Ye]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function dt(e){e[pt]=!0}var Fn=new Set,gn={};function Pn(e,t){On(e,t),On(e+"Capture",t)}function On(e,t){for(gn[e]=t,e=0;e<t.length;e++)Fn.add(t[e])}var ga=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ei={},xi={};function Ge(e){return Pt.call(xi,e)?!0:Pt.call(Ei,e)?!1:ga.test(e)?xi[e]=!0:(Ei[e]=!0,!1)}function xt(e,t,a){if(Ge(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Zn(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Vt(e,t,a,r){if(r===null)e.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+r)}}function Ke(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ti(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Il(e,t,a){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,u=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(h){a=""+h,u.call(this,h)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return a},setValue:function(h){a=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qr(e){if(!e._valueTracker){var t=Ti(e)?"checked":"value";e._valueTracker=Il(e,t,""+e[t])}}function ed(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),r="";return e&&(r=Ti(e)?e.checked?"true":"false":e.value),e=r,e!==a?(t.setValue(e),!0):!1}function $l(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Ov=/[\n"\\]/g;function Mn(e){return e.replace(Ov,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Lo(e,t,a,r,o,u,h,v){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ke(t)):e.value!==""+Ke(t)&&(e.value=""+Ke(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?jo(e,h,Ke(t)):a!=null?jo(e,h,Ke(a)):r!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+Ke(v):e.removeAttribute("name")}function td(e,t,a,r,o,u,h,v){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Qr(e);return}a=a!=null?""+Ke(a):"",t=t!=null?""+Ke(t):a,v||t===e.value||(e.value=t),e.defaultValue=t}r=r??o,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=v?e.checked:!!r,e.defaultChecked=!!r,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),Qr(e)}function jo(e,t,a){t==="number"&&$l(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Ii(e,t,a,r){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&r&&(e[a].defaultSelected=!0)}else{for(a=""+Ke(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function nd(e,t,a){if(t!=null&&(t=""+Ke(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ke(a):""}function ad(e,t,a,r){if(t==null){if(r!=null){if(a!=null)throw Error(s(92));if(we(r)){if(1<r.length)throw Error(s(93));r=r[0]}a=r}a==null&&(a=""),t=a}a=Ke(t),e.defaultValue=a,r=e.textContent,r===a&&r!==""&&r!==null&&(e.value=r),Qr(e)}function $i(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Mv=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function id(e,t,a){var r=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,a):typeof a!="number"||a===0||Mv.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function rd(e,t,a){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,a!=null){for(var r in a)!a.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var o in t)r=t[o],t.hasOwnProperty(o)&&a[o]!==r&&id(e,o,r)}else for(var u in t)t.hasOwnProperty(u)&&id(e,u,t[u])}function Bo(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Dv=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Nv=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Wl(e){return Nv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function va(){}var qo=null;function Ho(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wi=null,er=null;function ld(e){var t=Ve(e);if(t&&(e=t.stateNode)){var a=e[ie]||null;e:switch(e=t.stateNode,t.type){case"input":if(Lo(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Mn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var r=a[t];if(r!==e&&r.form===e.form){var o=r[ie]||null;if(!o)throw Error(s(90));Lo(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)r=a[t],r.form===e.form&&ed(r)}break e;case"textarea":nd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Ii(e,!!a.multiple,t,!1)}}}var Qo=!1;function sd(e,t,a){if(Qo)return e(t,a);Qo=!0;try{var r=e(t);return r}finally{if(Qo=!1,(Wi!==null||er!==null)&&(Hs(),Wi&&(t=Wi,e=er,er=Wi=null,ld(t),e)))for(t=0;t<e.length;t++)ld(e[t])}}function Yr(e,t){var a=e.stateNode;if(a===null)return null;var r=a[ie]||null;if(r===null)return null;a=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(s(231,t,typeof a));return a}var ba=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yo=!1;if(ba)try{var Vr={};Object.defineProperty(Vr,"passive",{get:function(){Yo=!0}}),window.addEventListener("test",Vr,Vr),window.removeEventListener("test",Vr,Vr)}catch{Yo=!1}var qa=null,Vo=null,es=null;function od(){if(es)return es;var e,t=Vo,a=t.length,r,o="value"in qa?qa.value:qa.textContent,u=o.length;for(e=0;e<a&&t[e]===o[e];e++);var h=a-e;for(r=1;r<=h&&t[a-r]===o[u-r];r++);return es=o.slice(e,1<r?1-r:void 0)}function ts(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ns(){return!0}function ud(){return!1}function sn(e){function t(a,r,o,u,h){this._reactName=a,this._targetInst=o,this.type=r,this.nativeEvent=u,this.target=h,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(a=e[v],this[v]=a?a(u):u[v]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ns:ud,this.isPropagationStopped=ud,this}return g(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ns)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ns)},persist:function(){},isPersistent:ns}),t}var Ri={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},as=sn(Ri),Gr=g({},Ri,{view:0,detail:0}),zv=sn(Gr),Go,Ko,Kr,is=g({},Gr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fo,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Kr&&(Kr&&e.type==="mousemove"?(Go=e.screenX-Kr.screenX,Ko=e.screenY-Kr.screenY):Ko=Go=0,Kr=e),Go)},movementY:function(e){return"movementY"in e?e.movementY:Ko}}),cd=sn(is),kv=g({},is,{dataTransfer:0}),Uv=sn(kv),Lv=g({},Gr,{relatedTarget:0}),Xo=sn(Lv),jv=g({},Ri,{animationName:0,elapsedTime:0,pseudoElement:0}),Bv=sn(jv),qv=g({},Ri,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Hv=sn(qv),Qv=g({},Ri,{data:0}),fd=sn(Qv),Yv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Vv={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Gv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Kv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Gv[e])?!!t[e]:!1}function Fo(){return Kv}var Xv=g({},Gr,{key:function(e){if(e.key){var t=Yv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ts(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Vv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fo,charCode:function(e){return e.type==="keypress"?ts(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ts(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Fv=sn(Xv),Pv=g({},is,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dd=sn(Pv),Zv=g({},Gr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fo}),Jv=sn(Zv),Iv=g({},Ri,{propertyName:0,elapsedTime:0,pseudoElement:0}),$v=sn(Iv),Wv=g({},is,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),e0=sn(Wv),t0=g({},Ri,{newState:0,oldState:0}),n0=sn(t0),a0=[9,13,27,32],Po=ba&&"CompositionEvent"in window,Xr=null;ba&&"documentMode"in document&&(Xr=document.documentMode);var i0=ba&&"TextEvent"in window&&!Xr,hd=ba&&(!Po||Xr&&8<Xr&&11>=Xr),md=" ",pd=!1;function yd(e,t){switch(e){case"keyup":return a0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var tr=!1;function r0(e,t){switch(e){case"compositionend":return gd(t);case"keypress":return t.which!==32?null:(pd=!0,md);case"textInput":return e=t.data,e===md&&pd?null:e;default:return null}}function l0(e,t){if(tr)return e==="compositionend"||!Po&&yd(e,t)?(e=od(),es=Vo=qa=null,tr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return hd&&t.locale!=="ko"?null:t.data;default:return null}}var s0={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function vd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!s0[e.type]:t==="textarea"}function bd(e,t,a,r){Wi?er?er.push(r):er=[r]:Wi=r,t=Fs(t,"onChange"),0<t.length&&(a=new as("onChange","change",null,a,r),e.push({event:a,listeners:t}))}var Fr=null,Pr=null;function o0(e){tp(e,0)}function rs(e){var t=jt(e);if(ed(t))return e}function Sd(e,t){if(e==="change")return t}var wd=!1;if(ba){var Zo;if(ba){var Jo="oninput"in document;if(!Jo){var Ed=document.createElement("div");Ed.setAttribute("oninput","return;"),Jo=typeof Ed.oninput=="function"}Zo=Jo}else Zo=!1;wd=Zo&&(!document.documentMode||9<document.documentMode)}function xd(){Fr&&(Fr.detachEvent("onpropertychange",Td),Pr=Fr=null)}function Td(e){if(e.propertyName==="value"&&rs(Pr)){var t=[];bd(t,Pr,e,Ho(e)),sd(o0,t)}}function u0(e,t,a){e==="focusin"?(xd(),Fr=t,Pr=a,Fr.attachEvent("onpropertychange",Td)):e==="focusout"&&xd()}function c0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return rs(Pr)}function f0(e,t){if(e==="click")return rs(t)}function d0(e,t){if(e==="input"||e==="change")return rs(t)}function h0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vn=typeof Object.is=="function"?Object.is:h0;function Zr(e,t){if(vn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),r=Object.keys(t);if(a.length!==r.length)return!1;for(r=0;r<a.length;r++){var o=a[r];if(!Pt.call(t,o)||!vn(e[o],t[o]))return!1}return!0}function Rd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _d(e,t){var a=Rd(e);e=0;for(var r;a;){if(a.nodeType===3){if(r=e+a.textContent.length,e<=t&&r>=t)return{node:a,offset:t-e};e=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Rd(a)}}function Ad(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ad(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=$l(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=$l(e.document)}return t}function Io(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var m0=ba&&"documentMode"in document&&11>=document.documentMode,nr=null,$o=null,Jr=null,Wo=!1;function Od(e,t,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Wo||nr==null||nr!==$l(r)||(r=nr,"selectionStart"in r&&Io(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Jr&&Zr(Jr,r)||(Jr=r,r=Fs($o,"onSelect"),0<r.length&&(t=new as("onSelect","select",null,t,a),e.push({event:t,listeners:r}),t.target=nr)))}function _i(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var ar={animationend:_i("Animation","AnimationEnd"),animationiteration:_i("Animation","AnimationIteration"),animationstart:_i("Animation","AnimationStart"),transitionrun:_i("Transition","TransitionRun"),transitionstart:_i("Transition","TransitionStart"),transitioncancel:_i("Transition","TransitionCancel"),transitionend:_i("Transition","TransitionEnd")},eu={},Md={};ba&&(Md=document.createElement("div").style,"AnimationEvent"in window||(delete ar.animationend.animation,delete ar.animationiteration.animation,delete ar.animationstart.animation),"TransitionEvent"in window||delete ar.transitionend.transition);function Ai(e){if(eu[e])return eu[e];if(!ar[e])return e;var t=ar[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Md)return eu[e]=t[a];return e}var Dd=Ai("animationend"),Nd=Ai("animationiteration"),zd=Ai("animationstart"),p0=Ai("transitionrun"),y0=Ai("transitionstart"),g0=Ai("transitioncancel"),kd=Ai("transitionend"),Ud=new Map,tu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");tu.push("scrollEnd");function Jn(e,t){Ud.set(e,t),Pn(t,[e])}var ls=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Dn=[],ir=0,nu=0;function ss(){for(var e=ir,t=nu=ir=0;t<e;){var a=Dn[t];Dn[t++]=null;var r=Dn[t];Dn[t++]=null;var o=Dn[t];Dn[t++]=null;var u=Dn[t];if(Dn[t++]=null,r!==null&&o!==null){var h=r.pending;h===null?o.next=o:(o.next=h.next,h.next=o),r.pending=o}u!==0&&Ld(a,o,u)}}function os(e,t,a,r){Dn[ir++]=e,Dn[ir++]=t,Dn[ir++]=a,Dn[ir++]=r,nu|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function au(e,t,a,r){return os(e,t,a,r),us(e)}function Ci(e,t){return os(e,null,null,t),us(e)}function Ld(e,t,a){e.lanes|=a;var r=e.alternate;r!==null&&(r.lanes|=a);for(var o=!1,u=e.return;u!==null;)u.childLanes|=a,r=u.alternate,r!==null&&(r.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-zt(a),e=u.hiddenUpdates,r=e[o],r===null?e[o]=[t]:r.push(t),t.lane=a|536870912),u):null}function us(e){if(50<vl)throw vl=0,dc=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var rr={};function v0(e,t,a,r){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bn(e,t,a,r){return new v0(e,t,a,r)}function iu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Sa(e,t){var a=e.alternate;return a===null?(a=bn(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function jd(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function cs(e,t,a,r,o,u){var h=0;if(r=e,typeof e=="function")iu(e)&&(h=1);else if(typeof e=="string")h=xb(e,a,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case oe:return e=bn(31,a,t,o),e.elementType=oe,e.lanes=u,e;case j:return Oi(a.children,o,u,t);case K:h=8,o|=24;break;case G:return e=bn(12,a,t,o|2),e.elementType=G,e.lanes=u,e;case he:return e=bn(13,a,t,o),e.elementType=he,e.lanes=u,e;case me:return e=bn(19,a,t,o),e.elementType=me,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $:h=10;break e;case J:h=9;break e;case ge:h=11;break e;case A:h=14;break e;case V:h=16,r=null;break e}h=29,a=Error(s(130,e===null?"null":typeof e,"")),r=null}return t=bn(h,a,t,o),t.elementType=e,t.type=r,t.lanes=u,t}function Oi(e,t,a,r){return e=bn(7,e,r,t),e.lanes=a,e}function ru(e,t,a){return e=bn(6,e,null,t),e.lanes=a,e}function Bd(e){var t=bn(18,null,null,0);return t.stateNode=e,t}function lu(e,t,a){return t=bn(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var qd=new WeakMap;function Nn(e,t){if(typeof e=="object"&&e!==null){var a=qd.get(e);return a!==void 0?a:(t={value:e,source:t,stack:vi(t)},qd.set(e,t),t)}return{value:e,source:t,stack:vi(t)}}var lr=[],sr=0,fs=null,Ir=0,zn=[],kn=0,Ha=null,aa=1,ia="";function wa(e,t){lr[sr++]=Ir,lr[sr++]=fs,fs=e,Ir=t}function Hd(e,t,a){zn[kn++]=aa,zn[kn++]=ia,zn[kn++]=Ha,Ha=e;var r=aa;e=ia;var o=32-zt(r)-1;r&=~(1<<o),a+=1;var u=32-zt(t)+o;if(30<u){var h=o-o%5;u=(r&(1<<h)-1).toString(32),r>>=h,o-=h,aa=1<<32-zt(t)+o|a<<o|r,ia=u+e}else aa=1<<u|a<<o|r,ia=e}function su(e){e.return!==null&&(wa(e,1),Hd(e,1,0))}function ou(e){for(;e===fs;)fs=lr[--sr],lr[sr]=null,Ir=lr[--sr],lr[sr]=null;for(;e===Ha;)Ha=zn[--kn],zn[kn]=null,ia=zn[--kn],zn[kn]=null,aa=zn[--kn],zn[kn]=null}function Qd(e,t){zn[kn++]=aa,zn[kn++]=ia,zn[kn++]=Ha,aa=t.id,ia=t.overflow,Ha=e}var Gt=null,ct=null,Xe=!1,Qa=null,Un=!1,uu=Error(s(519));function Ya(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $r(Nn(t,e)),uu}function Yd(e){var t=e.stateNode,a=e.type,r=e.memoizedProps;switch(t[ne]=e,t[ie]=r,a){case"dialog":Be("cancel",t),Be("close",t);break;case"iframe":case"object":case"embed":Be("load",t);break;case"video":case"audio":for(a=0;a<Sl.length;a++)Be(Sl[a],t);break;case"source":Be("error",t);break;case"img":case"image":case"link":Be("error",t),Be("load",t);break;case"details":Be("toggle",t);break;case"input":Be("invalid",t),td(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Be("invalid",t);break;case"textarea":Be("invalid",t),ad(t,r.value,r.defaultValue,r.children)}a=r.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||r.suppressHydrationWarning===!0||rp(t.textContent,a)?(r.popover!=null&&(Be("beforetoggle",t),Be("toggle",t)),r.onScroll!=null&&Be("scroll",t),r.onScrollEnd!=null&&Be("scrollend",t),r.onClick!=null&&(t.onclick=va),t=!0):t=!1,t||Ya(e,!0)}function Vd(e){for(Gt=e.return;Gt;)switch(Gt.tag){case 5:case 31:case 13:Un=!1;return;case 27:case 3:Un=!0;return;default:Gt=Gt.return}}function or(e){if(e!==Gt)return!1;if(!Xe)return Vd(e),Xe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Ac(e.type,e.memoizedProps)),a=!a),a&&ct&&Ya(e),Vd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));ct=mp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));ct=mp(e)}else t===27?(t=ct,ni(e.type)?(e=Nc,Nc=null,ct=e):ct=t):ct=Gt?jn(e.stateNode.nextSibling):null;return!0}function Mi(){ct=Gt=null,Xe=!1}function cu(){var e=Qa;return e!==null&&(fn===null?fn=e:fn.push.apply(fn,e),Qa=null),e}function $r(e){Qa===null?Qa=[e]:Qa.push(e)}var fu=x(null),Di=null,Ea=null;function Va(e,t,a){B(fu,t._currentValue),t._currentValue=a}function xa(e){e._currentValue=fu.current,H(fu)}function du(e,t,a){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===a)break;e=e.return}}function hu(e,t,a,r){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var h=o.child;u=u.firstContext;e:for(;u!==null;){var v=u;u=o;for(var w=0;w<t.length;w++)if(v.context===t[w]){u.lanes|=a,v=u.alternate,v!==null&&(v.lanes|=a),du(u.return,a,e),r||(h=null);break e}u=v.next}}else if(o.tag===18){if(h=o.return,h===null)throw Error(s(341));h.lanes|=a,u=h.alternate,u!==null&&(u.lanes|=a),du(h,a,e),h=null}else h=o.child;if(h!==null)h.return=o;else for(h=o;h!==null;){if(h===e){h=null;break}if(o=h.sibling,o!==null){o.return=h.return,h=o;break}h=h.return}o=h}}function ur(e,t,a,r){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var h=o.alternate;if(h===null)throw Error(s(387));if(h=h.memoizedProps,h!==null){var v=o.type;vn(o.pendingProps.value,h.value)||(e!==null?e.push(v):e=[v])}}else if(o===ce.current){if(h=o.alternate,h===null)throw Error(s(387));h.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Rl):e=[Rl])}o=o.return}e!==null&&hu(t,e,a,r),t.flags|=262144}function ds(e){for(e=e.firstContext;e!==null;){if(!vn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ni(e){Di=e,Ea=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Kt(e){return Gd(Di,e)}function hs(e,t){return Di===null&&Ni(e),Gd(e,t)}function Gd(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ea===null){if(e===null)throw Error(s(308));Ea=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ea=Ea.next=t;return a}var b0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},S0=n.unstable_scheduleCallback,w0=n.unstable_NormalPriority,At={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function mu(){return{controller:new b0,data:new Map,refCount:0}}function Wr(e){e.refCount--,e.refCount===0&&S0(w0,function(){e.controller.abort()})}var el=null,pu=0,cr=0,fr=null;function E0(e,t){if(el===null){var a=el=[];pu=0,cr=vc(),fr={status:"pending",value:void 0,then:function(r){a.push(r)}}}return pu++,t.then(Kd,Kd),t}function Kd(){if(--pu===0&&el!==null){fr!==null&&(fr.status="fulfilled");var e=el;el=null,cr=0,fr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function x0(e,t){var a=[],r={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(r.status="rejected",r.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),r}var Xd=C.S;C.S=function(e,t){Om=mt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&E0(e,t),Xd!==null&&Xd(e,t)};var zi=x(null);function yu(){var e=zi.current;return e!==null?e:rt.pooledCache}function ms(e,t){t===null?B(zi,zi.current):B(zi,t.pool)}function Fd(){var e=yu();return e===null?null:{parent:At._currentValue,pool:e}}var dr=Error(s(460)),gu=Error(s(474)),ps=Error(s(542)),ys={then:function(){}};function Pd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Zd(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(va,va),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Id(e),e;default:if(typeof t.status=="string")t.then(va,va);else{if(e=rt,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=r}},function(r){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Id(e),e}throw Ui=t,dr}}function ki(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ui=a,dr):a}}var Ui=null;function Jd(){if(Ui===null)throw Error(s(459));var e=Ui;return Ui=null,e}function Id(e){if(e===dr||e===ps)throw Error(s(483))}var hr=null,tl=0;function gs(e){var t=tl;return tl+=1,hr===null&&(hr=[]),Zd(hr,e,t)}function nl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function vs(e,t){throw t.$$typeof===E?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function $d(e){function t(O,R){if(e){var D=O.deletions;D===null?(O.deletions=[R],O.flags|=16):D.push(R)}}function a(O,R){if(!e)return null;for(;R!==null;)t(O,R),R=R.sibling;return null}function r(O){for(var R=new Map;O!==null;)O.key!==null?R.set(O.key,O):R.set(O.index,O),O=O.sibling;return R}function o(O,R){return O=Sa(O,R),O.index=0,O.sibling=null,O}function u(O,R,D){return O.index=D,e?(D=O.alternate,D!==null?(D=D.index,D<R?(O.flags|=67108866,R):D):(O.flags|=67108866,R)):(O.flags|=1048576,R)}function h(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function v(O,R,D,X){return R===null||R.tag!==6?(R=ru(D,O.mode,X),R.return=O,R):(R=o(R,D),R.return=O,R)}function w(O,R,D,X){var Se=D.type;return Se===j?Y(O,R,D.props.children,X,D.key):R!==null&&(R.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===V&&ki(Se)===R.type)?(R=o(R,D.props),nl(R,D),R.return=O,R):(R=cs(D.type,D.key,D.props,null,O.mode,X),nl(R,D),R.return=O,R)}function N(O,R,D,X){return R===null||R.tag!==4||R.stateNode.containerInfo!==D.containerInfo||R.stateNode.implementation!==D.implementation?(R=lu(D,O.mode,X),R.return=O,R):(R=o(R,D.children||[]),R.return=O,R)}function Y(O,R,D,X,Se){return R===null||R.tag!==7?(R=Oi(D,O.mode,X,Se),R.return=O,R):(R=o(R,D),R.return=O,R)}function F(O,R,D){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=ru(""+R,O.mode,D),R.return=O,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case M:return D=cs(R.type,R.key,R.props,null,O.mode,D),nl(D,R),D.return=O,D;case U:return R=lu(R,O.mode,D),R.return=O,R;case V:return R=ki(R),F(O,R,D)}if(we(R)||Te(R))return R=Oi(R,O.mode,D,null),R.return=O,R;if(typeof R.then=="function")return F(O,gs(R),D);if(R.$$typeof===$)return F(O,hs(O,R),D);vs(O,R)}return null}function z(O,R,D,X){var Se=R!==null?R.key:null;if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return Se!==null?null:v(O,R,""+D,X);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case M:return D.key===Se?w(O,R,D,X):null;case U:return D.key===Se?N(O,R,D,X):null;case V:return D=ki(D),z(O,R,D,X)}if(we(D)||Te(D))return Se!==null?null:Y(O,R,D,X,null);if(typeof D.then=="function")return z(O,R,gs(D),X);if(D.$$typeof===$)return z(O,R,hs(O,D),X);vs(O,D)}return null}function L(O,R,D,X,Se){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return O=O.get(D)||null,v(R,O,""+X,Se);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case M:return O=O.get(X.key===null?D:X.key)||null,w(R,O,X,Se);case U:return O=O.get(X.key===null?D:X.key)||null,N(R,O,X,Se);case V:return X=ki(X),L(O,R,D,X,Se)}if(we(X)||Te(X))return O=O.get(D)||null,Y(R,O,X,Se,null);if(typeof X.then=="function")return L(O,R,D,gs(X),Se);if(X.$$typeof===$)return L(O,R,D,hs(R,X),Se);vs(R,X)}return null}function re(O,R,D,X){for(var Se=null,Ie=null,fe=R,Ne=R=0,He=null;fe!==null&&Ne<D.length;Ne++){fe.index>Ne?(He=fe,fe=null):He=fe.sibling;var $e=z(O,fe,D[Ne],X);if($e===null){fe===null&&(fe=He);break}e&&fe&&$e.alternate===null&&t(O,fe),R=u($e,R,Ne),Ie===null?Se=$e:Ie.sibling=$e,Ie=$e,fe=He}if(Ne===D.length)return a(O,fe),Xe&&wa(O,Ne),Se;if(fe===null){for(;Ne<D.length;Ne++)fe=F(O,D[Ne],X),fe!==null&&(R=u(fe,R,Ne),Ie===null?Se=fe:Ie.sibling=fe,Ie=fe);return Xe&&wa(O,Ne),Se}for(fe=r(fe);Ne<D.length;Ne++)He=L(fe,O,Ne,D[Ne],X),He!==null&&(e&&He.alternate!==null&&fe.delete(He.key===null?Ne:He.key),R=u(He,R,Ne),Ie===null?Se=He:Ie.sibling=He,Ie=He);return e&&fe.forEach(function(si){return t(O,si)}),Xe&&wa(O,Ne),Se}function xe(O,R,D,X){if(D==null)throw Error(s(151));for(var Se=null,Ie=null,fe=R,Ne=R=0,He=null,$e=D.next();fe!==null&&!$e.done;Ne++,$e=D.next()){fe.index>Ne?(He=fe,fe=null):He=fe.sibling;var si=z(O,fe,$e.value,X);if(si===null){fe===null&&(fe=He);break}e&&fe&&si.alternate===null&&t(O,fe),R=u(si,R,Ne),Ie===null?Se=si:Ie.sibling=si,Ie=si,fe=He}if($e.done)return a(O,fe),Xe&&wa(O,Ne),Se;if(fe===null){for(;!$e.done;Ne++,$e=D.next())$e=F(O,$e.value,X),$e!==null&&(R=u($e,R,Ne),Ie===null?Se=$e:Ie.sibling=$e,Ie=$e);return Xe&&wa(O,Ne),Se}for(fe=r(fe);!$e.done;Ne++,$e=D.next())$e=L(fe,O,Ne,$e.value,X),$e!==null&&(e&&$e.alternate!==null&&fe.delete($e.key===null?Ne:$e.key),R=u($e,R,Ne),Ie===null?Se=$e:Ie.sibling=$e,Ie=$e);return e&&fe.forEach(function(kb){return t(O,kb)}),Xe&&wa(O,Ne),Se}function it(O,R,D,X){if(typeof D=="object"&&D!==null&&D.type===j&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case M:e:{for(var Se=D.key;R!==null;){if(R.key===Se){if(Se=D.type,Se===j){if(R.tag===7){a(O,R.sibling),X=o(R,D.props.children),X.return=O,O=X;break e}}else if(R.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===V&&ki(Se)===R.type){a(O,R.sibling),X=o(R,D.props),nl(X,D),X.return=O,O=X;break e}a(O,R);break}else t(O,R);R=R.sibling}D.type===j?(X=Oi(D.props.children,O.mode,X,D.key),X.return=O,O=X):(X=cs(D.type,D.key,D.props,null,O.mode,X),nl(X,D),X.return=O,O=X)}return h(O);case U:e:{for(Se=D.key;R!==null;){if(R.key===Se)if(R.tag===4&&R.stateNode.containerInfo===D.containerInfo&&R.stateNode.implementation===D.implementation){a(O,R.sibling),X=o(R,D.children||[]),X.return=O,O=X;break e}else{a(O,R);break}else t(O,R);R=R.sibling}X=lu(D,O.mode,X),X.return=O,O=X}return h(O);case V:return D=ki(D),it(O,R,D,X)}if(we(D))return re(O,R,D,X);if(Te(D)){if(Se=Te(D),typeof Se!="function")throw Error(s(150));return D=Se.call(D),xe(O,R,D,X)}if(typeof D.then=="function")return it(O,R,gs(D),X);if(D.$$typeof===$)return it(O,R,hs(O,D),X);vs(O,D)}return typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint"?(D=""+D,R!==null&&R.tag===6?(a(O,R.sibling),X=o(R,D),X.return=O,O=X):(a(O,R),X=ru(D,O.mode,X),X.return=O,O=X),h(O)):a(O,R)}return function(O,R,D,X){try{tl=0;var Se=it(O,R,D,X);return hr=null,Se}catch(fe){if(fe===dr||fe===ps)throw fe;var Ie=bn(29,fe,null,O.mode);return Ie.lanes=X,Ie.return=O,Ie}}}var Li=$d(!0),Wd=$d(!1),Ga=!1;function vu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Xa(e,t,a){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(We&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=us(e),Ld(e,null,a),t}return os(e,r,t,a),us(e)}function al(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,S(e,a)}}function Su(e,t){var a=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var o=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var h={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?o=u=h:u=u.next=h,a=a.next}while(a!==null);u===null?o=u=t:u=u.next=t}else o=u=t;a={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:r.shared,callbacks:r.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var wu=!1;function il(){if(wu){var e=fr;if(e!==null)throw e}}function rl(e,t,a,r){wu=!1;var o=e.updateQueue;Ga=!1;var u=o.firstBaseUpdate,h=o.lastBaseUpdate,v=o.shared.pending;if(v!==null){o.shared.pending=null;var w=v,N=w.next;w.next=null,h===null?u=N:h.next=N,h=w;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,v=Y.lastBaseUpdate,v!==h&&(v===null?Y.firstBaseUpdate=N:v.next=N,Y.lastBaseUpdate=w))}if(u!==null){var F=o.baseState;h=0,Y=N=w=null,v=u;do{var z=v.lane&-536870913,L=z!==v.lane;if(L?(qe&z)===z:(r&z)===z){z!==0&&z===cr&&(wu=!0),Y!==null&&(Y=Y.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var re=e,xe=v;z=t;var it=a;switch(xe.tag){case 1:if(re=xe.payload,typeof re=="function"){F=re.call(it,F,z);break e}F=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=xe.payload,z=typeof re=="function"?re.call(it,F,z):re,z==null)break e;F=g({},F,z);break e;case 2:Ga=!0}}z=v.callback,z!==null&&(e.flags|=64,L&&(e.flags|=8192),L=o.callbacks,L===null?o.callbacks=[z]:L.push(z))}else L={lane:z,tag:v.tag,payload:v.payload,callback:v.callback,next:null},Y===null?(N=Y=L,w=F):Y=Y.next=L,h|=z;if(v=v.next,v===null){if(v=o.shared.pending,v===null)break;L=v,v=L.next,L.next=null,o.lastBaseUpdate=L,o.shared.pending=null}}while(!0);Y===null&&(w=F),o.baseState=w,o.firstBaseUpdate=N,o.lastBaseUpdate=Y,u===null&&(o.shared.lanes=0),Ia|=h,e.lanes=h,e.memoizedState=F}}function eh(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function th(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)eh(a[e],t)}var mr=x(null),bs=x(0);function nh(e,t){e=Na,B(bs,e),B(mr,t),Na=e|t.baseLanes}function Eu(){B(bs,Na),B(mr,mr.current)}function xu(){Na=bs.current,H(mr),H(bs)}var Sn=x(null),Ln=null;function Fa(e){var t=e.alternate;B(Tt,Tt.current&1),B(Sn,e),Ln===null&&(t===null||mr.current!==null||t.memoizedState!==null)&&(Ln=e)}function Tu(e){B(Tt,Tt.current),B(Sn,e),Ln===null&&(Ln=e)}function ah(e){e.tag===22?(B(Tt,Tt.current),B(Sn,e),Ln===null&&(Ln=e)):Pa()}function Pa(){B(Tt,Tt.current),B(Sn,Sn.current)}function wn(e){H(Sn),Ln===e&&(Ln=null),H(Tt)}var Tt=x(0);function Ss(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Mc(a)||Dc(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ta=0,Me=null,nt=null,Ct=null,ws=!1,pr=!1,ji=!1,Es=0,ll=0,yr=null,T0=0;function bt(){throw Error(s(321))}function Ru(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!vn(e[a],t[a]))return!1;return!0}function _u(e,t,a,r,o,u){return Ta=u,Me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,C.H=e===null||e.memoizedState===null?Hh:Qu,ji=!1,u=a(r,o),ji=!1,pr&&(u=rh(t,a,r,o)),ih(e),u}function ih(e){C.H=ul;var t=nt!==null&&nt.next!==null;if(Ta=0,Ct=nt=Me=null,ws=!1,ll=0,yr=null,t)throw Error(s(300));e===null||Ot||(e=e.dependencies,e!==null&&ds(e)&&(Ot=!0))}function rh(e,t,a,r){Me=e;var o=0;do{if(pr&&(yr=null),ll=0,pr=!1,25<=o)throw Error(s(301));if(o+=1,Ct=nt=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}C.H=Qh,u=t(a,r)}while(pr);return u}function R0(){var e=C.H,t=e.useState()[0];return t=typeof t.then=="function"?sl(t):t,e=e.useState()[0],(nt!==null?nt.memoizedState:null)!==e&&(Me.flags|=1024),t}function Au(){var e=Es!==0;return Es=0,e}function Cu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Ou(e){if(ws){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ws=!1}Ta=0,Ct=nt=Me=null,pr=!1,ll=Es=0,yr=null}function en(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?Me.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function Rt(){if(nt===null){var e=Me.alternate;e=e!==null?e.memoizedState:null}else e=nt.next;var t=Ct===null?Me.memoizedState:Ct.next;if(t!==null)Ct=t,nt=e;else{if(e===null)throw Me.alternate===null?Error(s(467)):Error(s(310));nt=e,e={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},Ct===null?Me.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}function xs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function sl(e){var t=ll;return ll+=1,yr===null&&(yr=[]),e=Zd(yr,e,t),t=Me,(Ct===null?t.memoizedState:Ct.next)===null&&(t=t.alternate,C.H=t===null||t.memoizedState===null?Hh:Qu),e}function Ts(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return sl(e);if(e.$$typeof===$)return Kt(e)}throw Error(s(438,String(e)))}function Mu(e){var t=null,a=Me.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var r=Me.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=xs(),Me.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),r=0;r<e;r++)a[r]=Ce;return t.index++,a}function Ra(e,t){return typeof t=="function"?t(e):t}function Rs(e){var t=Rt();return Du(t,nt,e)}function Du(e,t,a){var r=e.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=a;var o=e.baseQueue,u=r.pending;if(u!==null){if(o!==null){var h=o.next;o.next=u.next,u.next=h}t.baseQueue=o=u,r.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var v=h=null,w=null,N=t,Y=!1;do{var F=N.lane&-536870913;if(F!==N.lane?(qe&F)===F:(Ta&F)===F){var z=N.revertLane;if(z===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),F===cr&&(Y=!0);else if((Ta&z)===z){N=N.next,z===cr&&(Y=!0);continue}else F={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},w===null?(v=w=F,h=u):w=w.next=F,Me.lanes|=z,Ia|=z;F=N.action,ji&&a(u,F),u=N.hasEagerState?N.eagerState:a(u,F)}else z={lane:F,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},w===null?(v=w=z,h=u):w=w.next=z,Me.lanes|=F,Ia|=F;N=N.next}while(N!==null&&N!==t);if(w===null?h=u:w.next=v,!vn(u,e.memoizedState)&&(Ot=!0,Y&&(a=fr,a!==null)))throw a;e.memoizedState=u,e.baseState=h,e.baseQueue=w,r.lastRenderedState=u}return o===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Nu(e){var t=Rt(),a=t.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=e;var r=a.dispatch,o=a.pending,u=t.memoizedState;if(o!==null){a.pending=null;var h=o=o.next;do u=e(u,h.action),h=h.next;while(h!==o);vn(u,t.memoizedState)||(Ot=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,r]}function lh(e,t,a){var r=Me,o=Rt(),u=Xe;if(u){if(a===void 0)throw Error(s(407));a=a()}else a=t();var h=!vn((nt||o).memoizedState,a);if(h&&(o.memoizedState=a,Ot=!0),o=o.queue,Uu(uh.bind(null,r,o,e),[e]),o.getSnapshot!==t||h||Ct!==null&&Ct.memoizedState.tag&1){if(r.flags|=2048,gr(9,{destroy:void 0},oh.bind(null,r,o,a,t),null),rt===null)throw Error(s(349));u||(Ta&127)!==0||sh(r,t,a)}return a}function sh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Me.updateQueue,t===null?(t=xs(),Me.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function oh(e,t,a,r){t.value=a,t.getSnapshot=r,ch(t)&&fh(e)}function uh(e,t,a){return a(function(){ch(t)&&fh(e)})}function ch(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!vn(e,a)}catch{return!0}}function fh(e){var t=Ci(e,2);t!==null&&dn(t,e,2)}function zu(e){var t=en();if(typeof e=="function"){var a=e;if(e=a(),ji){rn(!0);try{a()}finally{rn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:e},t}function dh(e,t,a,r){return e.baseState=a,Du(e,nt,typeof r=="function"?r:Ra)}function _0(e,t,a,r,o){if(Cs(e))throw Error(s(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){u.listeners.push(h)}};C.T!==null?a(!0):u.isTransition=!1,r(u),a=t.pending,a===null?(u.next=t.pending=u,hh(t,u)):(u.next=a.next,t.pending=a.next=u)}}function hh(e,t){var a=t.action,r=t.payload,o=e.state;if(t.isTransition){var u=C.T,h={};C.T=h;try{var v=a(o,r),w=C.S;w!==null&&w(h,v),mh(e,t,v)}catch(N){ku(e,t,N)}finally{u!==null&&h.types!==null&&(u.types=h.types),C.T=u}}else try{u=a(o,r),mh(e,t,u)}catch(N){ku(e,t,N)}}function mh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(r){ph(e,t,r)},function(r){return ku(e,t,r)}):ph(e,t,a)}function ph(e,t,a){t.status="fulfilled",t.value=a,yh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,hh(e,a)))}function ku(e,t,a){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=a,yh(t),t=t.next;while(t!==r)}e.action=null}function yh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function gh(e,t){return t}function vh(e,t){if(Xe){var a=rt.formState;if(a!==null){e:{var r=Me;if(Xe){if(ct){t:{for(var o=ct,u=Un;o.nodeType!==8;){if(!u){o=null;break t}if(o=jn(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){ct=jn(o.nextSibling),r=o.data==="F!";break e}}Ya(r)}r=!1}r&&(t=a[0])}}return a=en(),a.memoizedState=a.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gh,lastRenderedState:t},a.queue=r,a=jh.bind(null,Me,r),r.dispatch=a,r=zu(!1),u=Hu.bind(null,Me,!1,r.queue),r=en(),o={state:t,dispatch:null,action:e,pending:null},r.queue=o,a=_0.bind(null,Me,o,u,a),o.dispatch=a,r.memoizedState=e,[t,a,!1]}function bh(e){var t=Rt();return Sh(t,nt,e)}function Sh(e,t,a){if(t=Du(e,t,gh)[0],e=Rs(Ra)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=sl(t)}catch(h){throw h===dr?ps:h}else r=t;t=Rt();var o=t.queue,u=o.dispatch;return a!==t.memoizedState&&(Me.flags|=2048,gr(9,{destroy:void 0},A0.bind(null,o,a),null)),[r,u,e]}function A0(e,t){e.action=t}function wh(e){var t=Rt(),a=nt;if(a!==null)return Sh(t,a,e);Rt(),t=t.memoizedState,a=Rt();var r=a.queue.dispatch;return a.memoizedState=e,[t,r,!1]}function gr(e,t,a,r){return e={tag:e,create:a,deps:r,inst:t,next:null},t=Me.updateQueue,t===null&&(t=xs(),Me.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(r=a.next,a.next=e,e.next=r,t.lastEffect=e),e}function Eh(){return Rt().memoizedState}function _s(e,t,a,r){var o=en();Me.flags|=e,o.memoizedState=gr(1|t,{destroy:void 0},a,r===void 0?null:r)}function As(e,t,a,r){var o=Rt();r=r===void 0?null:r;var u=o.memoizedState.inst;nt!==null&&r!==null&&Ru(r,nt.memoizedState.deps)?o.memoizedState=gr(t,u,a,r):(Me.flags|=e,o.memoizedState=gr(1|t,u,a,r))}function xh(e,t){_s(8390656,8,e,t)}function Uu(e,t){As(2048,8,e,t)}function C0(e){Me.flags|=4;var t=Me.updateQueue;if(t===null)t=xs(),Me.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Th(e){var t=Rt().memoizedState;return C0({ref:t,nextImpl:e}),function(){if((We&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Rh(e,t){return As(4,2,e,t)}function _h(e,t){return As(4,4,e,t)}function Ah(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ch(e,t,a){a=a!=null?a.concat([e]):null,As(4,4,Ah.bind(null,t,e),a)}function Lu(){}function Oh(e,t){var a=Rt();t=t===void 0?null:t;var r=a.memoizedState;return t!==null&&Ru(t,r[1])?r[0]:(a.memoizedState=[e,t],e)}function Mh(e,t){var a=Rt();t=t===void 0?null:t;var r=a.memoizedState;if(t!==null&&Ru(t,r[1]))return r[0];if(r=e(),ji){rn(!0);try{e()}finally{rn(!1)}}return a.memoizedState=[r,t],r}function ju(e,t,a){return a===void 0||(Ta&1073741824)!==0&&(qe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Dm(),Me.lanes|=e,Ia|=e,a)}function Dh(e,t,a,r){return vn(a,t)?a:mr.current!==null?(e=ju(e,a,r),vn(e,t)||(Ot=!0),e):(Ta&42)===0||(Ta&1073741824)!==0&&(qe&261930)===0?(Ot=!0,e.memoizedState=a):(e=Dm(),Me.lanes|=e,Ia|=e,t)}function Nh(e,t,a,r,o){var u=P.p;P.p=u!==0&&8>u?u:8;var h=C.T,v={};C.T=v,Hu(e,!1,t,a);try{var w=o(),N=C.S;if(N!==null&&N(v,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var Y=x0(w,r);ol(e,t,Y,Tn(e))}else ol(e,t,r,Tn(e))}catch(F){ol(e,t,{then:function(){},status:"rejected",reason:F},Tn())}finally{P.p=u,h!==null&&v.types!==null&&(h.types=v.types),C.T=h}}function O0(){}function Bu(e,t,a,r){if(e.tag!==5)throw Error(s(476));var o=zh(e).queue;Nh(e,o,t,q,a===null?O0:function(){return kh(e),a(r)})}function zh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:q},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function kh(e){var t=zh(e);t.next===null&&(t=e.alternate.memoizedState),ol(e,t.next.queue,{},Tn())}function qu(){return Kt(Rl)}function Uh(){return Rt().memoizedState}function Lh(){return Rt().memoizedState}function M0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Tn();e=Ka(a);var r=Xa(t,e,a);r!==null&&(dn(r,t,a),al(r,t,a)),t={cache:mu()},e.payload=t;return}t=t.return}}function D0(e,t,a){var r=Tn();a={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Cs(e)?Bh(t,a):(a=au(e,t,a,r),a!==null&&(dn(a,e,r),qh(a,t,r)))}function jh(e,t,a){var r=Tn();ol(e,t,a,r)}function ol(e,t,a,r){var o={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Cs(e))Bh(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var h=t.lastRenderedState,v=u(h,a);if(o.hasEagerState=!0,o.eagerState=v,vn(v,h))return os(e,t,o,0),rt===null&&ss(),!1}catch{}if(a=au(e,t,o,r),a!==null)return dn(a,e,r),qh(a,t,r),!0}return!1}function Hu(e,t,a,r){if(r={lane:2,revertLane:vc(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Cs(e)){if(t)throw Error(s(479))}else t=au(e,a,r,2),t!==null&&dn(t,e,2)}function Cs(e){var t=e.alternate;return e===Me||t!==null&&t===Me}function Bh(e,t){pr=ws=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function qh(e,t,a){if((a&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,S(e,a)}}var ul={readContext:Kt,use:Ts,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useLayoutEffect:bt,useInsertionEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useSyncExternalStore:bt,useId:bt,useHostTransitionStatus:bt,useFormState:bt,useActionState:bt,useOptimistic:bt,useMemoCache:bt,useCacheRefresh:bt};ul.useEffectEvent=bt;var Hh={readContext:Kt,use:Ts,useCallback:function(e,t){return en().memoizedState=[e,t===void 0?null:t],e},useContext:Kt,useEffect:xh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,_s(4194308,4,Ah.bind(null,t,e),a)},useLayoutEffect:function(e,t){return _s(4194308,4,e,t)},useInsertionEffect:function(e,t){_s(4,2,e,t)},useMemo:function(e,t){var a=en();t=t===void 0?null:t;var r=e();if(ji){rn(!0);try{e()}finally{rn(!1)}}return a.memoizedState=[r,t],r},useReducer:function(e,t,a){var r=en();if(a!==void 0){var o=a(t);if(ji){rn(!0);try{a(t)}finally{rn(!1)}}}else o=t;return r.memoizedState=r.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},r.queue=e,e=e.dispatch=D0.bind(null,Me,e),[r.memoizedState,e]},useRef:function(e){var t=en();return e={current:e},t.memoizedState=e},useState:function(e){e=zu(e);var t=e.queue,a=jh.bind(null,Me,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Lu,useDeferredValue:function(e,t){var a=en();return ju(a,e,t)},useTransition:function(){var e=zu(!1);return e=Nh.bind(null,Me,e.queue,!0,!1),en().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var r=Me,o=en();if(Xe){if(a===void 0)throw Error(s(407));a=a()}else{if(a=t(),rt===null)throw Error(s(349));(qe&127)!==0||sh(r,t,a)}o.memoizedState=a;var u={value:a,getSnapshot:t};return o.queue=u,xh(uh.bind(null,r,u,e),[e]),r.flags|=2048,gr(9,{destroy:void 0},oh.bind(null,r,u,a,t),null),a},useId:function(){var e=en(),t=rt.identifierPrefix;if(Xe){var a=ia,r=aa;a=(r&~(1<<32-zt(r)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Es++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=T0++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:qu,useFormState:vh,useActionState:vh,useOptimistic:function(e){var t=en();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Hu.bind(null,Me,!0,a),a.dispatch=t,[e,t]},useMemoCache:Mu,useCacheRefresh:function(){return en().memoizedState=M0.bind(null,Me)},useEffectEvent:function(e){var t=en(),a={impl:e};return t.memoizedState=a,function(){if((We&2)!==0)throw Error(s(440));return a.impl.apply(void 0,arguments)}}},Qu={readContext:Kt,use:Ts,useCallback:Oh,useContext:Kt,useEffect:Uu,useImperativeHandle:Ch,useInsertionEffect:Rh,useLayoutEffect:_h,useMemo:Mh,useReducer:Rs,useRef:Eh,useState:function(){return Rs(Ra)},useDebugValue:Lu,useDeferredValue:function(e,t){var a=Rt();return Dh(a,nt.memoizedState,e,t)},useTransition:function(){var e=Rs(Ra)[0],t=Rt().memoizedState;return[typeof e=="boolean"?e:sl(e),t]},useSyncExternalStore:lh,useId:Uh,useHostTransitionStatus:qu,useFormState:bh,useActionState:bh,useOptimistic:function(e,t){var a=Rt();return dh(a,nt,e,t)},useMemoCache:Mu,useCacheRefresh:Lh};Qu.useEffectEvent=Th;var Qh={readContext:Kt,use:Ts,useCallback:Oh,useContext:Kt,useEffect:Uu,useImperativeHandle:Ch,useInsertionEffect:Rh,useLayoutEffect:_h,useMemo:Mh,useReducer:Nu,useRef:Eh,useState:function(){return Nu(Ra)},useDebugValue:Lu,useDeferredValue:function(e,t){var a=Rt();return nt===null?ju(a,e,t):Dh(a,nt.memoizedState,e,t)},useTransition:function(){var e=Nu(Ra)[0],t=Rt().memoizedState;return[typeof e=="boolean"?e:sl(e),t]},useSyncExternalStore:lh,useId:Uh,useHostTransitionStatus:qu,useFormState:wh,useActionState:wh,useOptimistic:function(e,t){var a=Rt();return nt!==null?dh(a,nt,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Mu,useCacheRefresh:Lh};Qh.useEffectEvent=Th;function Yu(e,t,a,r){t=e.memoizedState,a=a(r,t),a=a==null?t:g({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Vu={enqueueSetState:function(e,t,a){e=e._reactInternals;var r=Tn(),o=Ka(r);o.payload=t,a!=null&&(o.callback=a),t=Xa(e,o,r),t!==null&&(dn(t,e,r),al(t,e,r))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var r=Tn(),o=Ka(r);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=Xa(e,o,r),t!==null&&(dn(t,e,r),al(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Tn(),r=Ka(a);r.tag=2,t!=null&&(r.callback=t),t=Xa(e,r,a),t!==null&&(dn(t,e,a),al(t,e,a))}};function Yh(e,t,a,r,o,u,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,u,h):t.prototype&&t.prototype.isPureReactComponent?!Zr(a,r)||!Zr(o,u):!0}function Vh(e,t,a,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,r),t.state!==e&&Vu.enqueueReplaceState(t,t.state,null)}function Bi(e,t){var a=t;if("ref"in t){a={};for(var r in t)r!=="ref"&&(a[r]=t[r])}if(e=e.defaultProps){a===t&&(a=g({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function Gh(e){ls(e)}function Kh(e){console.error(e)}function Xh(e){ls(e)}function Os(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function Fh(e,t,a){try{var r=e.onCaughtError;r(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Gu(e,t,a){return a=Ka(a),a.tag=3,a.payload={element:null},a.callback=function(){Os(e,t)},a}function Ph(e){return e=Ka(e),e.tag=3,e}function Zh(e,t,a,r){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var u=r.value;e.payload=function(){return o(u)},e.callback=function(){Fh(t,a,r)}}var h=a.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){Fh(t,a,r),typeof o!="function"&&($a===null?$a=new Set([this]):$a.add(this));var v=r.stack;this.componentDidCatch(r.value,{componentStack:v!==null?v:""})})}function N0(e,t,a,r,o){if(a.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=a.alternate,t!==null&&ur(t,a,o,!0),a=Sn.current,a!==null){switch(a.tag){case 31:case 13:return Ln===null?Qs():a.alternate===null&&St===0&&(St=3),a.flags&=-257,a.flags|=65536,a.lanes=o,r===ys?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([r]):t.add(r),pc(e,r,o)),!1;case 22:return a.flags|=65536,r===ys?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([r]):a.add(r)),pc(e,r,o)),!1}throw Error(s(435,a.tag))}return pc(e,r,o),Qs(),!1}if(Xe)return t=Sn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,r!==uu&&(e=Error(s(422),{cause:r}),$r(Nn(e,a)))):(r!==uu&&(t=Error(s(423),{cause:r}),$r(Nn(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,r=Nn(r,a),o=Gu(e.stateNode,r,o),Su(e,o),St!==4&&(St=2)),!1;var u=Error(s(520),{cause:r});if(u=Nn(u,a),gl===null?gl=[u]:gl.push(u),St!==4&&(St=2),t===null)return!0;r=Nn(r,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=Gu(a.stateNode,r,e),Su(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&($a===null||!$a.has(u))))return a.flags|=65536,o&=-o,a.lanes|=o,o=Ph(o),Zh(o,e,a,r),Su(a,o),!1}a=a.return}while(a!==null);return!1}var Ku=Error(s(461)),Ot=!1;function Xt(e,t,a,r){t.child=e===null?Wd(t,null,a,r):Li(t,e.child,a,r)}function Jh(e,t,a,r,o){a=a.render;var u=t.ref;if("ref"in r){var h={};for(var v in r)v!=="ref"&&(h[v]=r[v])}else h=r;return Ni(t),r=_u(e,t,a,h,u,o),v=Au(),e!==null&&!Ot?(Cu(e,t,o),_a(e,t,o)):(Xe&&v&&su(t),t.flags|=1,Xt(e,t,r,o),t.child)}function Ih(e,t,a,r,o){if(e===null){var u=a.type;return typeof u=="function"&&!iu(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,$h(e,t,u,r,o)):(e=cs(a.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Wu(e,o)){var h=u.memoizedProps;if(a=a.compare,a=a!==null?a:Zr,a(h,r)&&e.ref===t.ref)return _a(e,t,o)}return t.flags|=1,e=Sa(u,r),e.ref=t.ref,e.return=t,t.child=e}function $h(e,t,a,r,o){if(e!==null){var u=e.memoizedProps;if(Zr(u,r)&&e.ref===t.ref)if(Ot=!1,t.pendingProps=r=u,Wu(e,o))(e.flags&131072)!==0&&(Ot=!0);else return t.lanes=e.lanes,_a(e,t,o)}return Xu(e,t,a,r,o)}function Wh(e,t,a,r){var o=r.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(r=t.child=e.child,o=0;r!==null;)o=o|r.lanes|r.childLanes,r=r.sibling;r=o&~u}else r=0,t.child=null;return em(e,t,u,a,r)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ms(t,u!==null?u.cachePool:null),u!==null?nh(t,u):Eu(),ah(t);else return r=t.lanes=536870912,em(e,t,u!==null?u.baseLanes|a:a,a,r)}else u!==null?(ms(t,u.cachePool),nh(t,u),Pa(),t.memoizedState=null):(e!==null&&ms(t,null),Eu(),Pa());return Xt(e,t,o,a),t.child}function cl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function em(e,t,a,r,o){var u=yu();return u=u===null?null:{parent:At._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&ms(t,null),Eu(),ah(t),e!==null&&ur(e,t,r,!0),t.childLanes=o,null}function Ms(e,t){return t=Ns({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function tm(e,t,a){return Li(t,e.child,null,a),e=Ms(t,t.pendingProps),e.flags|=2,wn(t),t.memoizedState=null,e}function z0(e,t,a){var r=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Xe){if(r.mode==="hidden")return e=Ms(t,r),t.lanes=536870912,cl(null,e);if(Tu(t),(e=ct)?(e=hp(e,Un),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ha!==null?{id:aa,overflow:ia}:null,retryLane:536870912,hydrationErrors:null},a=Bd(e),a.return=t,t.child=a,Gt=t,ct=null)):e=null,e===null)throw Ya(t);return t.lanes=536870912,null}return Ms(t,r)}var u=e.memoizedState;if(u!==null){var h=u.dehydrated;if(Tu(t),o)if(t.flags&256)t.flags&=-257,t=tm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(Ot||ur(e,t,a,!1),o=(a&e.childLanes)!==0,Ot||o){if(r=rt,r!==null&&(h=_(r,a),h!==0&&h!==u.retryLane))throw u.retryLane=h,Ci(e,h),dn(r,e,h),Ku;Qs(),t=tm(e,t,a)}else e=u.treeContext,ct=jn(h.nextSibling),Gt=t,Xe=!0,Qa=null,Un=!1,e!==null&&Qd(t,e),t=Ms(t,r),t.flags|=4096;return t}return e=Sa(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ds(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(s(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Xu(e,t,a,r,o){return Ni(t),a=_u(e,t,a,r,void 0,o),r=Au(),e!==null&&!Ot?(Cu(e,t,o),_a(e,t,o)):(Xe&&r&&su(t),t.flags|=1,Xt(e,t,a,o),t.child)}function nm(e,t,a,r,o,u){return Ni(t),t.updateQueue=null,a=rh(t,r,a,o),ih(e),r=Au(),e!==null&&!Ot?(Cu(e,t,u),_a(e,t,u)):(Xe&&r&&su(t),t.flags|=1,Xt(e,t,a,u),t.child)}function am(e,t,a,r,o){if(Ni(t),t.stateNode===null){var u=rr,h=a.contextType;typeof h=="object"&&h!==null&&(u=Kt(h)),u=new a(r,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Vu,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=r,u.state=t.memoizedState,u.refs={},vu(t),h=a.contextType,u.context=typeof h=="object"&&h!==null?Kt(h):rr,u.state=t.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(Yu(t,a,h,r),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(h=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),h!==u.state&&Vu.enqueueReplaceState(u,u.state,null),rl(t,r,u,o),il(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){u=t.stateNode;var v=t.memoizedProps,w=Bi(a,v);u.props=w;var N=u.context,Y=a.contextType;h=rr,typeof Y=="object"&&Y!==null&&(h=Kt(Y));var F=a.getDerivedStateFromProps;Y=typeof F=="function"||typeof u.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,Y||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(v||N!==h)&&Vh(t,u,r,h),Ga=!1;var z=t.memoizedState;u.state=z,rl(t,r,u,o),il(),N=t.memoizedState,v||z!==N||Ga?(typeof F=="function"&&(Yu(t,a,F,r),N=t.memoizedState),(w=Ga||Yh(t,a,w,r,z,N,h))?(Y||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=N),u.props=r,u.state=N,u.context=h,r=w):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{u=t.stateNode,bu(e,t),h=t.memoizedProps,Y=Bi(a,h),u.props=Y,F=t.pendingProps,z=u.context,N=a.contextType,w=rr,typeof N=="object"&&N!==null&&(w=Kt(N)),v=a.getDerivedStateFromProps,(N=typeof v=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h!==F||z!==w)&&Vh(t,u,r,w),Ga=!1,z=t.memoizedState,u.state=z,rl(t,r,u,o),il();var L=t.memoizedState;h!==F||z!==L||Ga||e!==null&&e.dependencies!==null&&ds(e.dependencies)?(typeof v=="function"&&(Yu(t,a,v,r),L=t.memoizedState),(Y=Ga||Yh(t,a,Y,r,z,L,w)||e!==null&&e.dependencies!==null&&ds(e.dependencies))?(N||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(r,L,w),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(r,L,w)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=L),u.props=r,u.state=L,u.context=w,r=Y):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),r=!1)}return u=r,Ds(e,t),r=(t.flags&128)!==0,u||r?(u=t.stateNode,a=r&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&r?(t.child=Li(t,e.child,null,o),t.child=Li(t,null,a,o)):Xt(e,t,a,o),t.memoizedState=u.state,e=t.child):e=_a(e,t,o),e}function im(e,t,a,r){return Mi(),t.flags|=256,Xt(e,t,a,r),t.child}var Fu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Pu(e){return{baseLanes:e,cachePool:Fd()}}function Zu(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=xn),e}function rm(e,t,a){var r=t.pendingProps,o=!1,u=(t.flags&128)!==0,h;if((h=u)||(h=e!==null&&e.memoizedState===null?!1:(Tt.current&2)!==0),h&&(o=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Xe){if(o?Fa(t):Pa(),(e=ct)?(e=hp(e,Un),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ha!==null?{id:aa,overflow:ia}:null,retryLane:536870912,hydrationErrors:null},a=Bd(e),a.return=t,t.child=a,Gt=t,ct=null)):e=null,e===null)throw Ya(t);return Dc(e)?t.lanes=32:t.lanes=536870912,null}var v=r.children;return r=r.fallback,o?(Pa(),o=t.mode,v=Ns({mode:"hidden",children:v},o),r=Oi(r,o,a,null),v.return=t,r.return=t,v.sibling=r,t.child=v,r=t.child,r.memoizedState=Pu(a),r.childLanes=Zu(e,h,a),t.memoizedState=Fu,cl(null,r)):(Fa(t),Ju(t,v))}var w=e.memoizedState;if(w!==null&&(v=w.dehydrated,v!==null)){if(u)t.flags&256?(Fa(t),t.flags&=-257,t=Iu(e,t,a)):t.memoizedState!==null?(Pa(),t.child=e.child,t.flags|=128,t=null):(Pa(),v=r.fallback,o=t.mode,r=Ns({mode:"visible",children:r.children},o),v=Oi(v,o,a,null),v.flags|=2,r.return=t,v.return=t,r.sibling=v,t.child=r,Li(t,e.child,null,a),r=t.child,r.memoizedState=Pu(a),r.childLanes=Zu(e,h,a),t.memoizedState=Fu,t=cl(null,r));else if(Fa(t),Dc(v)){if(h=v.nextSibling&&v.nextSibling.dataset,h)var N=h.dgst;h=N,r=Error(s(419)),r.stack="",r.digest=h,$r({value:r,source:null,stack:null}),t=Iu(e,t,a)}else if(Ot||ur(e,t,a,!1),h=(a&e.childLanes)!==0,Ot||h){if(h=rt,h!==null&&(r=_(h,a),r!==0&&r!==w.retryLane))throw w.retryLane=r,Ci(e,r),dn(h,e,r),Ku;Mc(v)||Qs(),t=Iu(e,t,a)}else Mc(v)?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,ct=jn(v.nextSibling),Gt=t,Xe=!0,Qa=null,Un=!1,e!==null&&Qd(t,e),t=Ju(t,r.children),t.flags|=4096);return t}return o?(Pa(),v=r.fallback,o=t.mode,w=e.child,N=w.sibling,r=Sa(w,{mode:"hidden",children:r.children}),r.subtreeFlags=w.subtreeFlags&65011712,N!==null?v=Sa(N,v):(v=Oi(v,o,a,null),v.flags|=2),v.return=t,r.return=t,r.sibling=v,t.child=r,cl(null,r),r=t.child,v=e.child.memoizedState,v===null?v=Pu(a):(o=v.cachePool,o!==null?(w=At._currentValue,o=o.parent!==w?{parent:w,pool:w}:o):o=Fd(),v={baseLanes:v.baseLanes|a,cachePool:o}),r.memoizedState=v,r.childLanes=Zu(e,h,a),t.memoizedState=Fu,cl(e.child,r)):(Fa(t),a=e.child,e=a.sibling,a=Sa(a,{mode:"visible",children:r.children}),a.return=t,a.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=a,t.memoizedState=null,a)}function Ju(e,t){return t=Ns({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ns(e,t){return e=bn(22,e,null,t),e.lanes=0,e}function Iu(e,t,a){return Li(t,e.child,null,a),e=Ju(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lm(e,t,a){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),du(e.return,t,a)}function $u(e,t,a,r,o,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:o,treeForkCount:u}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=r,h.tail=a,h.tailMode=o,h.treeForkCount=u)}function sm(e,t,a){var r=t.pendingProps,o=r.revealOrder,u=r.tail;r=r.children;var h=Tt.current,v=(h&2)!==0;if(v?(h=h&1|2,t.flags|=128):h&=1,B(Tt,h),Xt(e,t,r,a),r=Xe?Ir:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&lm(e,a,t);else if(e.tag===19)lm(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&Ss(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),$u(t,!1,o,a,u,r);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Ss(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}$u(t,!0,a,null,u,r);break;case"together":$u(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function _a(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ia|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(ur(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,a=Sa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Sa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Wu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ds(e)))}function k0(e,t,a){switch(t.tag){case 3:Re(t,t.stateNode.containerInfo),Va(t,At,e.memoizedState.cache),Mi();break;case 27:case 5:Ht(t);break;case 4:Re(t,t.stateNode.containerInfo);break;case 10:Va(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Tu(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Fa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?rm(e,t,a):(Fa(t),e=_a(e,t,a),e!==null?e.sibling:null);Fa(t);break;case 19:var o=(e.flags&128)!==0;if(r=(a&t.childLanes)!==0,r||(ur(e,t,a,!1),r=(a&t.childLanes)!==0),o){if(r)return sm(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),B(Tt,Tt.current),r)break;return null;case 22:return t.lanes=0,Wh(e,t,a,t.pendingProps);case 24:Va(t,At,e.memoizedState.cache)}return _a(e,t,a)}function om(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ot=!0;else{if(!Wu(e,a)&&(t.flags&128)===0)return Ot=!1,k0(e,t,a);Ot=(e.flags&131072)!==0}else Ot=!1,Xe&&(t.flags&1048576)!==0&&Hd(t,Ir,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=ki(t.elementType),t.type=e,typeof e=="function")iu(e)?(r=Bi(e,r),t.tag=1,t=am(null,t,e,r,a)):(t.tag=0,t=Xu(null,t,e,r,a));else{if(e!=null){var o=e.$$typeof;if(o===ge){t.tag=11,t=Jh(null,t,e,r,a);break e}else if(o===A){t.tag=14,t=Ih(null,t,e,r,a);break e}}throw t=Ue(e)||e,Error(s(306,t,""))}}return t;case 0:return Xu(e,t,t.type,t.pendingProps,a);case 1:return r=t.type,o=Bi(r,t.pendingProps),am(e,t,r,o,a);case 3:e:{if(Re(t,t.stateNode.containerInfo),e===null)throw Error(s(387));r=t.pendingProps;var u=t.memoizedState;o=u.element,bu(e,t),rl(t,r,null,a);var h=t.memoizedState;if(r=h.cache,Va(t,At,r),r!==u.cache&&hu(t,[At],a,!0),il(),r=h.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=im(e,t,r,a);break e}else if(r!==o){o=Nn(Error(s(424)),t),$r(o),t=im(e,t,r,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ct=jn(e.firstChild),Gt=t,Xe=!0,Qa=null,Un=!0,a=Wd(t,null,r,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Mi(),r===o){t=_a(e,t,a);break e}Xt(e,t,r,a)}t=t.child}return t;case 26:return Ds(e,t),e===null?(a=bp(t.type,null,t.pendingProps,null))?t.memoizedState=a:Xe||(a=t.type,e=t.pendingProps,r=Ps(ue.current).createElement(a),r[ne]=t,r[ie]=e,Ft(r,a,e),dt(r),t.stateNode=r):t.memoizedState=bp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ht(t),e===null&&Xe&&(r=t.stateNode=yp(t.type,t.pendingProps,ue.current),Gt=t,Un=!0,o=ct,ni(t.type)?(Nc=o,ct=jn(r.firstChild)):ct=o),Xt(e,t,t.pendingProps.children,a),Ds(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Xe&&((o=r=ct)&&(r=cb(r,t.type,t.pendingProps,Un),r!==null?(t.stateNode=r,Gt=t,ct=jn(r.firstChild),Un=!1,o=!0):o=!1),o||Ya(t)),Ht(t),o=t.type,u=t.pendingProps,h=e!==null?e.memoizedProps:null,r=u.children,Ac(o,u)?r=null:h!==null&&Ac(o,h)&&(t.flags|=32),t.memoizedState!==null&&(o=_u(e,t,R0,null,null,a),Rl._currentValue=o),Ds(e,t),Xt(e,t,r,a),t.child;case 6:return e===null&&Xe&&((e=a=ct)&&(a=fb(a,t.pendingProps,Un),a!==null?(t.stateNode=a,Gt=t,ct=null,e=!0):e=!1),e||Ya(t)),null;case 13:return rm(e,t,a);case 4:return Re(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Li(t,null,r,a):Xt(e,t,r,a),t.child;case 11:return Jh(e,t,t.type,t.pendingProps,a);case 7:return Xt(e,t,t.pendingProps,a),t.child;case 8:return Xt(e,t,t.pendingProps.children,a),t.child;case 12:return Xt(e,t,t.pendingProps.children,a),t.child;case 10:return r=t.pendingProps,Va(t,t.type,r.value),Xt(e,t,r.children,a),t.child;case 9:return o=t.type._context,r=t.pendingProps.children,Ni(t),o=Kt(o),r=r(o),t.flags|=1,Xt(e,t,r,a),t.child;case 14:return Ih(e,t,t.type,t.pendingProps,a);case 15:return $h(e,t,t.type,t.pendingProps,a);case 19:return sm(e,t,a);case 31:return z0(e,t,a);case 22:return Wh(e,t,a,t.pendingProps);case 24:return Ni(t),r=Kt(At),e===null?(o=yu(),o===null&&(o=rt,u=mu(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=a),o=u),t.memoizedState={parent:r,cache:o},vu(t),Va(t,At,o)):((e.lanes&a)!==0&&(bu(e,t),rl(t,null,null,a),il()),o=e.memoizedState,u=t.memoizedState,o.parent!==r?(o={parent:r,cache:r},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Va(t,At,r)):(r=u.cache,Va(t,At,r),r!==o.cache&&hu(t,[At],a,!0))),Xt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function Aa(e){e.flags|=4}function ec(e,t,a,r,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Um())e.flags|=8192;else throw Ui=ys,gu}else e.flags&=-16777217}function um(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Tp(t))if(Um())e.flags|=8192;else throw Ui=ys,gu}function zs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Et():536870912,e.lanes|=t,wr|=t)}function fl(e,t){if(!Xe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ft(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,r=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,r|=o.subtreeFlags&65011712,r|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=a,t}function U0(e,t,a){var r=t.pendingProps;switch(ou(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(t),null;case 1:return ft(t),null;case 3:return a=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),xa(At),Qe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(or(t)?Aa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,cu())),ft(t),null;case 26:var o=t.type,u=t.memoizedState;return e===null?(Aa(t),u!==null?(ft(t),um(t,u)):(ft(t),ec(t,o,null,r,a))):u?u!==e.memoizedState?(Aa(t),ft(t),um(t,u)):(ft(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Aa(t),ft(t),ec(t,o,e,r,a)),null;case 27:if($t(t),a=ue.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Aa(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return ft(t),null}e=Z.current,or(t)?Yd(t):(e=yp(o,r,a),t.stateNode=e,Aa(t))}return ft(t),null;case 5:if($t(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Aa(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return ft(t),null}if(u=Z.current,or(t))Yd(t);else{var h=Ps(ue.current);switch(u){case 1:u=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:u=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":u=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":u=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":u=h.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof r.is=="string"?h.createElement("select",{is:r.is}):h.createElement("select"),r.multiple?u.multiple=!0:r.size&&(u.size=r.size);break;default:u=typeof r.is=="string"?h.createElement(o,{is:r.is}):h.createElement(o)}}u[ne]=t,u[ie]=r;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)u.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=u;e:switch(Ft(u,o,r),o){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Aa(t)}}return ft(t),ec(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Aa(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(s(166));if(e=ue.current,or(t)){if(e=t.stateNode,a=t.memoizedProps,r=null,o=Gt,o!==null)switch(o.tag){case 27:case 5:r=o.memoizedProps}e[ne]=t,e=!!(e.nodeValue===a||r!==null&&r.suppressHydrationWarning===!0||rp(e.nodeValue,a)),e||Ya(t,!0)}else e=Ps(e).createTextNode(r),e[ne]=t,t.stateNode=e}return ft(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(r=or(t),a!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[ne]=t}else Mi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ft(t),e=!1}else a=cu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(wn(t),t):(wn(t),null);if((t.flags&128)!==0)throw Error(s(558))}return ft(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=or(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(s(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(s(317));o[ne]=t}else Mi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ft(t),o=!1}else o=cu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(wn(t),t):(wn(t),null)}return wn(t),(t.flags&128)!==0?(t.lanes=a,t):(a=r!==null,e=e!==null&&e.memoizedState!==null,a&&(r=t.child,o=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(o=r.alternate.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==o&&(r.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),zs(t,t.updateQueue),ft(t),null);case 4:return Qe(),e===null&&Ec(t.stateNode.containerInfo),ft(t),null;case 10:return xa(t.type),ft(t),null;case 19:if(H(Tt),r=t.memoizedState,r===null)return ft(t),null;if(o=(t.flags&128)!==0,u=r.rendering,u===null)if(o)fl(r,!1);else{if(St!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Ss(e),u!==null){for(t.flags|=128,fl(r,!1),e=u.updateQueue,t.updateQueue=e,zs(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)jd(a,e),a=a.sibling;return B(Tt,Tt.current&1|2),Xe&&wa(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&mt()>Bs&&(t.flags|=128,o=!0,fl(r,!1),t.lanes=4194304)}else{if(!o)if(e=Ss(u),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,zs(t,e),fl(r,!0),r.tail===null&&r.tailMode==="hidden"&&!u.alternate&&!Xe)return ft(t),null}else 2*mt()-r.renderingStartTime>Bs&&a!==536870912&&(t.flags|=128,o=!0,fl(r,!1),t.lanes=4194304);r.isBackwards?(u.sibling=t.child,t.child=u):(e=r.last,e!==null?e.sibling=u:t.child=u,r.last=u)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=mt(),e.sibling=null,a=Tt.current,B(Tt,o?a&1|2:a&1),Xe&&wa(t,r.treeForkCount),e):(ft(t),null);case 22:case 23:return wn(t),xu(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(a&536870912)!==0&&(t.flags&128)===0&&(ft(t),t.subtreeFlags&6&&(t.flags|=8192)):ft(t),a=t.updateQueue,a!==null&&zs(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==a&&(t.flags|=2048),e!==null&&H(zi),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),xa(At),ft(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function L0(e,t){switch(ou(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xa(At),Qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return $t(t),null;case 31:if(t.memoizedState!==null){if(wn(t),t.alternate===null)throw Error(s(340));Mi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(wn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Mi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(Tt),null;case 4:return Qe(),null;case 10:return xa(t.type),null;case 22:case 23:return wn(t),xu(),e!==null&&H(zi),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xa(At),null;case 25:return null;default:return null}}function cm(e,t){switch(ou(t),t.tag){case 3:xa(At),Qe();break;case 26:case 27:case 5:$t(t);break;case 4:Qe();break;case 31:t.memoizedState!==null&&wn(t);break;case 13:wn(t);break;case 19:H(Tt);break;case 10:xa(t.type);break;case 22:case 23:wn(t),xu(),e!==null&&H(zi);break;case 24:xa(At)}}function dl(e,t){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var o=r.next;a=o;do{if((a.tag&e)===e){r=void 0;var u=a.create,h=a.inst;r=u(),h.destroy=r}a=a.next}while(a!==o)}}catch(v){tt(t,t.return,v)}}function Za(e,t,a){try{var r=t.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var u=o.next;r=u;do{if((r.tag&e)===e){var h=r.inst,v=h.destroy;if(v!==void 0){h.destroy=void 0,o=t;var w=a,N=v;try{N()}catch(Y){tt(o,w,Y)}}}r=r.next}while(r!==u)}}catch(Y){tt(t,t.return,Y)}}function fm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{th(t,a)}catch(r){tt(e,e.return,r)}}}function dm(e,t,a){a.props=Bi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(r){tt(e,t,r)}}function hl(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof a=="function"?e.refCleanup=a(r):a.current=r}}catch(o){tt(e,t,o)}}function ra(e,t){var a=e.ref,r=e.refCleanup;if(a!==null)if(typeof r=="function")try{r()}catch(o){tt(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){tt(e,t,o)}else a.current=null}function hm(e){var t=e.type,a=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&r.focus();break e;case"img":a.src?r.src=a.src:a.srcSet&&(r.srcset=a.srcSet)}}catch(o){tt(e,e.return,o)}}function tc(e,t,a){try{var r=e.stateNode;ib(r,e.type,a,t),r[ie]=t}catch(o){tt(e,e.return,o)}}function mm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ni(e.type)||e.tag===4}function nc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ni(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ac(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=va));else if(r!==4&&(r===27&&ni(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(ac(e,t,a),e=e.sibling;e!==null;)ac(e,t,a),e=e.sibling}function ks(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(r!==4&&(r===27&&ni(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ks(e,t,a),e=e.sibling;e!==null;)ks(e,t,a),e=e.sibling}function pm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var r=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Ft(t,r,a),t[ne]=e,t[ie]=a}catch(u){tt(e,e.return,u)}}var Ca=!1,Mt=!1,ic=!1,ym=typeof WeakSet=="function"?WeakSet:Set,Bt=null;function j0(e,t){if(e=e.containerInfo,Rc=to,e=Cd(e),Io(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var o=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var h=0,v=-1,w=-1,N=0,Y=0,F=e,z=null;t:for(;;){for(var L;F!==a||o!==0&&F.nodeType!==3||(v=h+o),F!==u||r!==0&&F.nodeType!==3||(w=h+r),F.nodeType===3&&(h+=F.nodeValue.length),(L=F.firstChild)!==null;)z=F,F=L;for(;;){if(F===e)break t;if(z===a&&++N===o&&(v=h),z===u&&++Y===r&&(w=h),(L=F.nextSibling)!==null)break;F=z,z=F.parentNode}F=L}a=v===-1||w===-1?null:{start:v,end:w}}else a=null}a=a||{start:0,end:0}}else a=null;for(_c={focusedElem:e,selectionRange:a},to=!1,Bt=t;Bt!==null;)if(t=Bt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Bt=e;else for(;Bt!==null;){switch(t=Bt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,o=u.memoizedProps,u=u.memoizedState,r=a.stateNode;try{var re=Bi(a.type,o);e=r.getSnapshotBeforeUpdate(re,u),r.__reactInternalSnapshotBeforeUpdate=e}catch(xe){tt(a,a.return,xe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Oc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Oc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(s(163))}if(e=t.sibling,e!==null){e.return=t.return,Bt=e;break}Bt=t.return}}function gm(e,t,a){var r=a.flags;switch(a.tag){case 0:case 11:case 15:Ma(e,a),r&4&&dl(5,a);break;case 1:if(Ma(e,a),r&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(h){tt(a,a.return,h)}else{var o=Bi(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){tt(a,a.return,h)}}r&64&&fm(a),r&512&&hl(a,a.return);break;case 3:if(Ma(e,a),r&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{th(e,t)}catch(h){tt(a,a.return,h)}}break;case 27:t===null&&r&4&&pm(a);case 26:case 5:Ma(e,a),t===null&&r&4&&hm(a),r&512&&hl(a,a.return);break;case 12:Ma(e,a);break;case 31:Ma(e,a),r&4&&Sm(e,a);break;case 13:Ma(e,a),r&4&&wm(e,a),r&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=X0.bind(null,a),db(e,a))));break;case 22:if(r=a.memoizedState!==null||Ca,!r){t=t!==null&&t.memoizedState!==null||Mt,o=Ca;var u=Mt;Ca=r,(Mt=t)&&!u?Da(e,a,(a.subtreeFlags&8772)!==0):Ma(e,a),Ca=o,Mt=u}break;case 30:break;default:Ma(e,a)}}function vm(e){var t=e.alternate;t!==null&&(e.alternate=null,vm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&gt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ht=null,on=!1;function Oa(e,t,a){for(a=a.child;a!==null;)bm(e,t,a),a=a.sibling}function bm(e,t,a){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(ma,a)}catch{}switch(a.tag){case 26:Mt||ra(a,t),Oa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Mt||ra(a,t);var r=ht,o=on;ni(a.type)&&(ht=a.stateNode,on=!1),Oa(e,t,a),El(a.stateNode),ht=r,on=o;break;case 5:Mt||ra(a,t);case 6:if(r=ht,o=on,ht=null,Oa(e,t,a),ht=r,on=o,ht!==null)if(on)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(a.stateNode)}catch(u){tt(a,t,u)}else try{ht.removeChild(a.stateNode)}catch(u){tt(a,t,u)}break;case 18:ht!==null&&(on?(e=ht,fp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Or(e)):fp(ht,a.stateNode));break;case 4:r=ht,o=on,ht=a.stateNode.containerInfo,on=!0,Oa(e,t,a),ht=r,on=o;break;case 0:case 11:case 14:case 15:Za(2,a,t),Mt||Za(4,a,t),Oa(e,t,a);break;case 1:Mt||(ra(a,t),r=a.stateNode,typeof r.componentWillUnmount=="function"&&dm(a,t,r)),Oa(e,t,a);break;case 21:Oa(e,t,a);break;case 22:Mt=(r=Mt)||a.memoizedState!==null,Oa(e,t,a),Mt=r;break;default:Oa(e,t,a)}}function Sm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Or(e)}catch(a){tt(t,t.return,a)}}}function wm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Or(e)}catch(a){tt(t,t.return,a)}}function B0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ym),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ym),t;default:throw Error(s(435,e.tag))}}function Us(e,t){var a=B0(e);t.forEach(function(r){if(!a.has(r)){a.add(r);var o=F0.bind(null,e,r);r.then(o,o)}})}function un(e,t){var a=t.deletions;if(a!==null)for(var r=0;r<a.length;r++){var o=a[r],u=e,h=t,v=h;e:for(;v!==null;){switch(v.tag){case 27:if(ni(v.type)){ht=v.stateNode,on=!1;break e}break;case 5:ht=v.stateNode,on=!1;break e;case 3:case 4:ht=v.stateNode.containerInfo,on=!0;break e}v=v.return}if(ht===null)throw Error(s(160));bm(u,h,o),ht=null,on=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Em(t,e),t=t.sibling}var In=null;function Em(e,t){var a=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:un(t,e),cn(e),r&4&&(Za(3,e,e.return),dl(3,e),Za(5,e,e.return));break;case 1:un(t,e),cn(e),r&512&&(Mt||a===null||ra(a,a.return)),r&64&&Ca&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?r:a.concat(r))));break;case 26:var o=In;if(un(t,e),cn(e),r&512&&(Mt||a===null||ra(a,a.return)),r&4){var u=a!==null?a.memoizedState:null;if(r=e.memoizedState,a===null)if(r===null)if(e.stateNode===null){e:{r=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(r){case"title":u=o.getElementsByTagName("title")[0],(!u||u[pt]||u[ne]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(r),o.head.insertBefore(u,o.querySelector("head > title"))),Ft(u,r,a),u[ne]=e,dt(u),r=u;break e;case"link":var h=Ep("link","href",o).get(r+(a.href||""));if(h){for(var v=0;v<h.length;v++)if(u=h[v],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){h.splice(v,1);break t}}u=o.createElement(r),Ft(u,r,a),o.head.appendChild(u);break;case"meta":if(h=Ep("meta","content",o).get(r+(a.content||""))){for(v=0;v<h.length;v++)if(u=h[v],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){h.splice(v,1);break t}}u=o.createElement(r),Ft(u,r,a),o.head.appendChild(u);break;default:throw Error(s(468,r))}u[ne]=e,dt(u),r=u}e.stateNode=r}else xp(o,e.type,e.stateNode);else e.stateNode=wp(o,r,e.memoizedProps);else u!==r?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,r===null?xp(o,e.type,e.stateNode):wp(o,r,e.memoizedProps)):r===null&&e.stateNode!==null&&tc(e,e.memoizedProps,a.memoizedProps)}break;case 27:un(t,e),cn(e),r&512&&(Mt||a===null||ra(a,a.return)),a!==null&&r&4&&tc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(un(t,e),cn(e),r&512&&(Mt||a===null||ra(a,a.return)),e.flags&32){o=e.stateNode;try{$i(o,"")}catch(re){tt(e,e.return,re)}}r&4&&e.stateNode!=null&&(o=e.memoizedProps,tc(e,o,a!==null?a.memoizedProps:o)),r&1024&&(ic=!0);break;case 6:if(un(t,e),cn(e),r&4){if(e.stateNode===null)throw Error(s(162));r=e.memoizedProps,a=e.stateNode;try{a.nodeValue=r}catch(re){tt(e,e.return,re)}}break;case 3:if(Is=null,o=In,In=Zs(t.containerInfo),un(t,e),In=o,cn(e),r&4&&a!==null&&a.memoizedState.isDehydrated)try{Or(t.containerInfo)}catch(re){tt(e,e.return,re)}ic&&(ic=!1,xm(e));break;case 4:r=In,In=Zs(e.stateNode.containerInfo),un(t,e),cn(e),In=r;break;case 12:un(t,e),cn(e);break;case 31:un(t,e),cn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Us(e,r)));break;case 13:un(t,e),cn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(js=mt()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Us(e,r)));break;case 22:o=e.memoizedState!==null;var w=a!==null&&a.memoizedState!==null,N=Ca,Y=Mt;if(Ca=N||o,Mt=Y||w,un(t,e),Mt=Y,Ca=N,cn(e),r&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||w||Ca||Mt||qi(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){w=a=t;try{if(u=w.stateNode,o)h=u.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{v=w.stateNode;var F=w.memoizedProps.style,z=F!=null&&F.hasOwnProperty("display")?F.display:null;v.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(re){tt(w,w.return,re)}}}else if(t.tag===6){if(a===null){w=t;try{w.stateNode.nodeValue=o?"":w.memoizedProps}catch(re){tt(w,w.return,re)}}}else if(t.tag===18){if(a===null){w=t;try{var L=w.stateNode;o?dp(L,!0):dp(w.stateNode,!1)}catch(re){tt(w,w.return,re)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(a=r.retryQueue,a!==null&&(r.retryQueue=null,Us(e,a))));break;case 19:un(t,e),cn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Us(e,r)));break;case 30:break;case 21:break;default:un(t,e),cn(e)}}function cn(e){var t=e.flags;if(t&2){try{for(var a,r=e.return;r!==null;){if(mm(r)){a=r;break}r=r.return}if(a==null)throw Error(s(160));switch(a.tag){case 27:var o=a.stateNode,u=nc(e);ks(e,u,o);break;case 5:var h=a.stateNode;a.flags&32&&($i(h,""),a.flags&=-33);var v=nc(e);ks(e,v,h);break;case 3:case 4:var w=a.stateNode.containerInfo,N=nc(e);ac(e,N,w);break;default:throw Error(s(161))}}catch(Y){tt(e,e.return,Y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ma(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)gm(e,t.alternate,t),t=t.sibling}function qi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Za(4,t,t.return),qi(t);break;case 1:ra(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&dm(t,t.return,a),qi(t);break;case 27:El(t.stateNode);case 26:case 5:ra(t,t.return),qi(t);break;case 22:t.memoizedState===null&&qi(t);break;case 30:qi(t);break;default:qi(t)}e=e.sibling}}function Da(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,o=e,u=t,h=u.flags;switch(u.tag){case 0:case 11:case 15:Da(o,u,a),dl(4,u);break;case 1:if(Da(o,u,a),r=u,o=r.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(N){tt(r,r.return,N)}if(r=u,o=r.updateQueue,o!==null){var v=r.stateNode;try{var w=o.shared.hiddenCallbacks;if(w!==null)for(o.shared.hiddenCallbacks=null,o=0;o<w.length;o++)eh(w[o],v)}catch(N){tt(r,r.return,N)}}a&&h&64&&fm(u),hl(u,u.return);break;case 27:pm(u);case 26:case 5:Da(o,u,a),a&&r===null&&h&4&&hm(u),hl(u,u.return);break;case 12:Da(o,u,a);break;case 31:Da(o,u,a),a&&h&4&&Sm(o,u);break;case 13:Da(o,u,a),a&&h&4&&wm(o,u);break;case 22:u.memoizedState===null&&Da(o,u,a),hl(u,u.return);break;case 30:break;default:Da(o,u,a)}t=t.sibling}}function rc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Wr(a))}function lc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wr(e))}function $n(e,t,a,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Tm(e,t,a,r),t=t.sibling}function Tm(e,t,a,r){var o=t.flags;switch(t.tag){case 0:case 11:case 15:$n(e,t,a,r),o&2048&&dl(9,t);break;case 1:$n(e,t,a,r);break;case 3:$n(e,t,a,r),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wr(e)));break;case 12:if(o&2048){$n(e,t,a,r),e=t.stateNode;try{var u=t.memoizedProps,h=u.id,v=u.onPostCommit;typeof v=="function"&&v(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(w){tt(t,t.return,w)}}else $n(e,t,a,r);break;case 31:$n(e,t,a,r);break;case 13:$n(e,t,a,r);break;case 23:break;case 22:u=t.stateNode,h=t.alternate,t.memoizedState!==null?u._visibility&2?$n(e,t,a,r):ml(e,t):u._visibility&2?$n(e,t,a,r):(u._visibility|=2,vr(e,t,a,r,(t.subtreeFlags&10256)!==0||!1)),o&2048&&rc(h,t);break;case 24:$n(e,t,a,r),o&2048&&lc(t.alternate,t);break;default:$n(e,t,a,r)}}function vr(e,t,a,r,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,h=t,v=a,w=r,N=h.flags;switch(h.tag){case 0:case 11:case 15:vr(u,h,v,w,o),dl(8,h);break;case 23:break;case 22:var Y=h.stateNode;h.memoizedState!==null?Y._visibility&2?vr(u,h,v,w,o):ml(u,h):(Y._visibility|=2,vr(u,h,v,w,o)),o&&N&2048&&rc(h.alternate,h);break;case 24:vr(u,h,v,w,o),o&&N&2048&&lc(h.alternate,h);break;default:vr(u,h,v,w,o)}t=t.sibling}}function ml(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,r=t,o=r.flags;switch(r.tag){case 22:ml(a,r),o&2048&&rc(r.alternate,r);break;case 24:ml(a,r),o&2048&&lc(r.alternate,r);break;default:ml(a,r)}t=t.sibling}}var pl=8192;function br(e,t,a){if(e.subtreeFlags&pl)for(e=e.child;e!==null;)Rm(e,t,a),e=e.sibling}function Rm(e,t,a){switch(e.tag){case 26:br(e,t,a),e.flags&pl&&e.memoizedState!==null&&Tb(a,In,e.memoizedState,e.memoizedProps);break;case 5:br(e,t,a);break;case 3:case 4:var r=In;In=Zs(e.stateNode.containerInfo),br(e,t,a),In=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=pl,pl=16777216,br(e,t,a),pl=r):br(e,t,a));break;default:br(e,t,a)}}function _m(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function yl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];Bt=r,Cm(r,e)}_m(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Am(e),e=e.sibling}function Am(e){switch(e.tag){case 0:case 11:case 15:yl(e),e.flags&2048&&Za(9,e,e.return);break;case 3:yl(e);break;case 12:yl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ls(e)):yl(e);break;default:yl(e)}}function Ls(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];Bt=r,Cm(r,e)}_m(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Za(8,t,t.return),Ls(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Ls(t));break;default:Ls(t)}e=e.sibling}}function Cm(e,t){for(;Bt!==null;){var a=Bt;switch(a.tag){case 0:case 11:case 15:Za(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var r=a.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Wr(a.memoizedState.cache)}if(r=a.child,r!==null)r.return=a,Bt=r;else e:for(a=e;Bt!==null;){r=Bt;var o=r.sibling,u=r.return;if(vm(r),r===a){Bt=null;break e}if(o!==null){o.return=u,Bt=o;break e}Bt=u}}}var q0={getCacheForType:function(e){var t=Kt(At),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Kt(At).controller.signal}},H0=typeof WeakMap=="function"?WeakMap:Map,We=0,rt=null,je=null,qe=0,et=0,En=null,Ja=!1,Sr=!1,sc=!1,Na=0,St=0,Ia=0,Hi=0,oc=0,xn=0,wr=0,gl=null,fn=null,uc=!1,js=0,Om=0,Bs=1/0,qs=null,$a=null,kt=0,Wa=null,Er=null,za=0,cc=0,fc=null,Mm=null,vl=0,dc=null;function Tn(){return(We&2)!==0&&qe!==0?qe&-qe:C.T!==null?vc():W()}function Dm(){if(xn===0)if((qe&536870912)===0||Xe){var e=pa;pa<<=1,(pa&3932160)===0&&(pa=262144),xn=e}else xn=536870912;return e=Sn.current,e!==null&&(e.flags|=32),xn}function dn(e,t,a){(e===rt&&(et===2||et===9)||e.cancelPendingCommit!==null)&&(xr(e,0),ei(e,qe,xn,!1)),st(e,a),((We&2)===0||e!==rt)&&(e===rt&&((We&2)===0&&(Hi|=a),St===4&&ei(e,qe,xn,!1)),la(e))}function Nm(e,t,a){if((We&6)!==0)throw Error(s(327));var r=!a&&(t&127)===0&&(t&e.expiredLanes)===0||lt(e,t),o=r?V0(e,t):mc(e,t,!0),u=r;do{if(o===0){Sr&&!r&&ei(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!Q0(a)){o=mc(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var v=e;o=gl;var w=v.current.memoizedState.isDehydrated;if(w&&(xr(v,h).flags|=256),h=mc(v,h,!1),h!==2){if(sc&&!w){v.errorRecoveryDisabledLanes|=u,Hi|=u,o=4;break e}u=fn,fn=o,u!==null&&(fn===null?fn=u:fn.push.apply(fn,u))}o=h}if(u=!1,o!==2)continue}}if(o===1){xr(e,0),ei(e,t,0,!0);break}e:{switch(r=e,u=o,u){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:ei(r,t,xn,!Ja);break e;case 2:fn=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(o=js+300-mt(),10<o)){if(ei(r,t,xn,!Ja),_e(r,0,!0)!==0)break e;za=t,r.timeoutHandle=up(zm.bind(null,r,a,fn,qs,uc,t,xn,Hi,wr,Ja,u,"Throttled",-0,0),o);break e}zm(r,a,fn,qs,uc,t,xn,Hi,wr,Ja,u,null,-0,0)}}break}while(!0);la(e)}function zm(e,t,a,r,o,u,h,v,w,N,Y,F,z,L){if(e.timeoutHandle=-1,F=t.subtreeFlags,F&8192||(F&16785408)===16785408){F={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:va},Rm(t,u,F);var re=(u&62914560)===u?js-mt():(u&4194048)===u?Om-mt():0;if(re=Rb(F,re),re!==null){za=u,e.cancelPendingCommit=re(Qm.bind(null,e,t,u,a,r,o,h,v,w,Y,F,null,z,L)),ei(e,u,h,!N);return}}Qm(e,t,u,a,r,o,h,v,w)}function Q0(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var r=0;r<a.length;r++){var o=a[r],u=o.getSnapshot;o=o.value;try{if(!vn(u(),o))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ei(e,t,a,r){t&=~oc,t&=~Hi,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var o=t;0<o;){var u=31-zt(o),h=1<<u;r[u]=-1,o&=~h}a!==0&&ya(e,a,t)}function Hs(){return(We&6)===0?(bl(0),!1):!0}function hc(){if(je!==null){if(et===0)var e=je.return;else e=je,Ea=Di=null,Ou(e),hr=null,tl=0,e=je;for(;e!==null;)cm(e.alternate,e),e=e.return;je=null}}function xr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,sb(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),za=0,hc(),rt=e,je=a=Sa(e.current,null),qe=t,et=0,En=null,Ja=!1,Sr=lt(e,t),sc=!1,wr=xn=oc=Hi=Ia=St=0,fn=gl=null,uc=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var o=31-zt(r),u=1<<o;t|=e[o],r&=~u}return Na=t,ss(),a}function km(e,t){Me=null,C.H=ul,t===dr||t===ps?(t=Jd(),et=3):t===gu?(t=Jd(),et=4):et=t===Ku?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,En=t,je===null&&(St=1,Os(e,Nn(t,e.current)))}function Um(){var e=Sn.current;return e===null?!0:(qe&4194048)===qe?Ln===null:(qe&62914560)===qe||(qe&536870912)!==0?e===Ln:!1}function Lm(){var e=C.H;return C.H=ul,e===null?ul:e}function jm(){var e=C.A;return C.A=q0,e}function Qs(){St=4,Ja||(qe&4194048)!==qe&&Sn.current!==null||(Sr=!0),(Ia&134217727)===0&&(Hi&134217727)===0||rt===null||ei(rt,qe,xn,!1)}function mc(e,t,a){var r=We;We|=2;var o=Lm(),u=jm();(rt!==e||qe!==t)&&(qs=null,xr(e,t)),t=!1;var h=St;e:do try{if(et!==0&&je!==null){var v=je,w=En;switch(et){case 8:hc(),h=6;break e;case 3:case 2:case 9:case 6:Sn.current===null&&(t=!0);var N=et;if(et=0,En=null,Tr(e,v,w,N),a&&Sr){h=0;break e}break;default:N=et,et=0,En=null,Tr(e,v,w,N)}}Y0(),h=St;break}catch(Y){km(e,Y)}while(!0);return t&&e.shellSuspendCounter++,Ea=Di=null,We=r,C.H=o,C.A=u,je===null&&(rt=null,qe=0,ss()),h}function Y0(){for(;je!==null;)Bm(je)}function V0(e,t){var a=We;We|=2;var r=Lm(),o=jm();rt!==e||qe!==t?(qs=null,Bs=mt()+500,xr(e,t)):Sr=lt(e,t);e:do try{if(et!==0&&je!==null){t=je;var u=En;t:switch(et){case 1:et=0,En=null,Tr(e,t,u,1);break;case 2:case 9:if(Pd(u)){et=0,En=null,qm(t);break}t=function(){et!==2&&et!==9||rt!==e||(et=7),la(e)},u.then(t,t);break e;case 3:et=7;break e;case 4:et=5;break e;case 7:Pd(u)?(et=0,En=null,qm(t)):(et=0,En=null,Tr(e,t,u,7));break;case 5:var h=null;switch(je.tag){case 26:h=je.memoizedState;case 5:case 27:var v=je;if(h?Tp(h):v.stateNode.complete){et=0,En=null;var w=v.sibling;if(w!==null)je=w;else{var N=v.return;N!==null?(je=N,Ys(N)):je=null}break t}}et=0,En=null,Tr(e,t,u,5);break;case 6:et=0,En=null,Tr(e,t,u,6);break;case 8:hc(),St=6;break e;default:throw Error(s(462))}}G0();break}catch(Y){km(e,Y)}while(!0);return Ea=Di=null,C.H=r,C.A=o,We=a,je!==null?0:(rt=null,qe=0,ss(),St)}function G0(){for(;je!==null&&!Qt();)Bm(je)}function Bm(e){var t=om(e.alternate,e,Na);e.memoizedProps=e.pendingProps,t===null?Ys(e):je=t}function qm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=nm(a,t,t.pendingProps,t.type,void 0,qe);break;case 11:t=nm(a,t,t.pendingProps,t.type.render,t.ref,qe);break;case 5:Ou(t);default:cm(a,t),t=je=jd(t,Na),t=om(a,t,Na)}e.memoizedProps=e.pendingProps,t===null?Ys(e):je=t}function Tr(e,t,a,r){Ea=Di=null,Ou(t),hr=null,tl=0;var o=t.return;try{if(N0(e,o,t,a,qe)){St=1,Os(e,Nn(a,e.current)),je=null;return}}catch(u){if(o!==null)throw je=o,u;St=1,Os(e,Nn(a,e.current)),je=null;return}t.flags&32768?(Xe||r===1?e=!0:Sr||(qe&536870912)!==0?e=!1:(Ja=e=!0,(r===2||r===9||r===3||r===6)&&(r=Sn.current,r!==null&&r.tag===13&&(r.flags|=16384))),Hm(t,e)):Ys(t)}function Ys(e){var t=e;do{if((t.flags&32768)!==0){Hm(t,Ja);return}e=t.return;var a=U0(t.alternate,t,Na);if(a!==null){je=a;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);St===0&&(St=5)}function Hm(e,t){do{var a=L0(e.alternate,e);if(a!==null){a.flags&=32767,je=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=a}while(e!==null);St=6,je=null}function Qm(e,t,a,r,o,u,h,v,w){e.cancelPendingCommit=null;do Vs();while(kt!==0);if((We&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(u=t.lanes|t.childLanes,u|=nu,Zt(e,a,u,h,v,w),e===rt&&(je=rt=null,qe=0),Er=t,Wa=e,za=a,cc=u,fc=o,Mm=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,P0(Yt,function(){return Xm(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=C.T,C.T=null,o=P.p,P.p=2,h=We,We|=4;try{j0(e,t,a)}finally{We=h,P.p=o,C.T=r}}kt=1,Ym(),Vm(),Gm()}}function Ym(){if(kt===1){kt=0;var e=Wa,t=Er,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=C.T,C.T=null;var r=P.p;P.p=2;var o=We;We|=4;try{Em(t,e);var u=_c,h=Cd(e.containerInfo),v=u.focusedElem,w=u.selectionRange;if(h!==v&&v&&v.ownerDocument&&Ad(v.ownerDocument.documentElement,v)){if(w!==null&&Io(v)){var N=w.start,Y=w.end;if(Y===void 0&&(Y=N),"selectionStart"in v)v.selectionStart=N,v.selectionEnd=Math.min(Y,v.value.length);else{var F=v.ownerDocument||document,z=F&&F.defaultView||window;if(z.getSelection){var L=z.getSelection(),re=v.textContent.length,xe=Math.min(w.start,re),it=w.end===void 0?xe:Math.min(w.end,re);!L.extend&&xe>it&&(h=it,it=xe,xe=h);var O=_d(v,xe),R=_d(v,it);if(O&&R&&(L.rangeCount!==1||L.anchorNode!==O.node||L.anchorOffset!==O.offset||L.focusNode!==R.node||L.focusOffset!==R.offset)){var D=F.createRange();D.setStart(O.node,O.offset),L.removeAllRanges(),xe>it?(L.addRange(D),L.extend(R.node,R.offset)):(D.setEnd(R.node,R.offset),L.addRange(D))}}}}for(F=[],L=v;L=L.parentNode;)L.nodeType===1&&F.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<F.length;v++){var X=F[v];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}to=!!Rc,_c=Rc=null}finally{We=o,P.p=r,C.T=a}}e.current=t,kt=2}}function Vm(){if(kt===2){kt=0;var e=Wa,t=Er,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=C.T,C.T=null;var r=P.p;P.p=2;var o=We;We|=4;try{gm(e,t.alternate,t)}finally{We=o,P.p=r,C.T=a}}kt=3}}function Gm(){if(kt===4||kt===3){kt=0,ta();var e=Wa,t=Er,a=za,r=Mm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?kt=5:(kt=0,Er=Wa=null,Km(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&($a=null),I(a),t=t.stateNode,ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(ma,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=C.T,o=P.p,P.p=2,C.T=null;try{for(var u=e.onRecoverableError,h=0;h<r.length;h++){var v=r[h];u(v.value,{componentStack:v.stack})}}finally{C.T=t,P.p=o}}(za&3)!==0&&Vs(),la(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===dc?vl++:(vl=0,dc=e):vl=0,bl(0)}}function Km(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Wr(t)))}function Vs(){return Ym(),Vm(),Gm(),Xm()}function Xm(){if(kt!==5)return!1;var e=Wa,t=cc;cc=0;var a=I(za),r=C.T,o=P.p;try{P.p=32>a?32:a,C.T=null,a=fc,fc=null;var u=Wa,h=za;if(kt=0,Er=Wa=null,za=0,(We&6)!==0)throw Error(s(331));var v=We;if(We|=4,Am(u.current),Tm(u,u.current,h,a),We=v,bl(0,!1),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(ma,u)}catch{}return!0}finally{P.p=o,C.T=r,Km(e,t)}}function Fm(e,t,a){t=Nn(a,t),t=Gu(e.stateNode,t,2),e=Xa(e,t,2),e!==null&&(st(e,2),la(e))}function tt(e,t,a){if(e.tag===3)Fm(e,e,a);else for(;t!==null;){if(t.tag===3){Fm(t,e,a);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&($a===null||!$a.has(r))){e=Nn(a,e),a=Ph(2),r=Xa(t,a,2),r!==null&&(Zh(a,r,t,e),st(r,2),la(r));break}}t=t.return}}function pc(e,t,a){var r=e.pingCache;if(r===null){r=e.pingCache=new H0;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(a)||(sc=!0,o.add(a),e=K0.bind(null,e,t,a),t.then(e,e))}function K0(e,t,a){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,rt===e&&(qe&a)===a&&(St===4||St===3&&(qe&62914560)===qe&&300>mt()-js?(We&2)===0&&xr(e,0):oc|=a,wr===qe&&(wr=0)),la(e)}function Pm(e,t){t===0&&(t=Et()),e=Ci(e,t),e!==null&&(st(e,t),la(e))}function X0(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Pm(e,a)}function F0(e,t){var a=0;switch(e.tag){case 31:case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),Pm(e,a)}function P0(e,t){return bi(e,t)}var Gs=null,Rr=null,yc=!1,Ks=!1,gc=!1,ti=0;function la(e){e!==Rr&&e.next===null&&(Rr===null?Gs=Rr=e:Rr=Rr.next=e),Ks=!0,yc||(yc=!0,J0())}function bl(e,t){if(!gc&&Ks){gc=!0;do for(var a=!1,r=Gs;r!==null;){if(e!==0){var o=r.pendingLanes;if(o===0)var u=0;else{var h=r.suspendedLanes,v=r.pingedLanes;u=(1<<31-zt(42|e)+1)-1,u&=o&~(h&~v),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,$m(r,u))}else u=qe,u=_e(r,r===rt?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(u&3)===0||lt(r,u)||(a=!0,$m(r,u));r=r.next}while(a);gc=!1}}function Z0(){Zm()}function Zm(){Ks=yc=!1;var e=0;ti!==0&&lb()&&(e=ti);for(var t=mt(),a=null,r=Gs;r!==null;){var o=r.next,u=Jm(r,t);u===0?(r.next=null,a===null?Gs=o:a.next=o,o===null&&(Rr=a)):(a=r,(e!==0||(u&3)!==0)&&(Ks=!0)),r=o}kt!==0&&kt!==5||bl(e),ti!==0&&(ti=0)}function Jm(e,t){for(var a=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var h=31-zt(u),v=1<<h,w=o[h];w===-1?((v&a)===0||(v&r)!==0)&&(o[h]=wt(v,t)):w<=t&&(e.expiredLanes|=v),u&=~v}if(t=rt,a=qe,a=_e(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,a===0||e===t&&(et===2||et===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Si(r),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||lt(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(r!==null&&Si(r),I(a)){case 2:case 8:a=Ba;break;case 32:a=Yt;break;case 268435456:a=_n;break;default:a=Yt}return r=Im.bind(null,e),a=bi(a,r),e.callbackPriority=t,e.callbackNode=a,t}return r!==null&&r!==null&&Si(r),e.callbackPriority=2,e.callbackNode=null,2}function Im(e,t){if(kt!==0&&kt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Vs()&&e.callbackNode!==a)return null;var r=qe;return r=_e(e,e===rt?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Nm(e,r,t),Jm(e,mt()),e.callbackNode!=null&&e.callbackNode===a?Im.bind(null,e):null)}function $m(e,t){if(Vs())return null;Nm(e,t,!0)}function J0(){ob(function(){(We&6)!==0?bi(na,Z0):Zm()})}function vc(){if(ti===0){var e=cr;e===0&&(e=Kn,Kn<<=1,(Kn&261888)===0&&(Kn=256)),ti=e}return ti}function Wm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Wl(""+e)}function ep(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function I0(e,t,a,r,o){if(t==="submit"&&a&&a.stateNode===o){var u=Wm((o[ie]||null).action),h=r.submitter;h&&(t=(t=h[ie]||null)?Wm(t.formAction):h.getAttribute("formAction"),t!==null&&(u=t,h=null));var v=new as("action","action",null,r,o);e.push({event:v,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ti!==0){var w=h?ep(o,h):new FormData(o);Bu(a,{pending:!0,data:w,method:o.method,action:u},null,w)}}else typeof u=="function"&&(v.preventDefault(),w=h?ep(o,h):new FormData(o),Bu(a,{pending:!0,data:w,method:o.method,action:u},u,w))},currentTarget:o}]})}}for(var bc=0;bc<tu.length;bc++){var Sc=tu[bc],$0=Sc.toLowerCase(),W0=Sc[0].toUpperCase()+Sc.slice(1);Jn($0,"on"+W0)}Jn(Dd,"onAnimationEnd"),Jn(Nd,"onAnimationIteration"),Jn(zd,"onAnimationStart"),Jn("dblclick","onDoubleClick"),Jn("focusin","onFocus"),Jn("focusout","onBlur"),Jn(p0,"onTransitionRun"),Jn(y0,"onTransitionStart"),Jn(g0,"onTransitionCancel"),Jn(kd,"onTransitionEnd"),On("onMouseEnter",["mouseout","mouseover"]),On("onMouseLeave",["mouseout","mouseover"]),On("onPointerEnter",["pointerout","pointerover"]),On("onPointerLeave",["pointerout","pointerover"]),Pn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Pn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Pn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Pn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Pn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Pn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Sl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),eb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Sl));function tp(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var r=e[a],o=r.event;r=r.listeners;e:{var u=void 0;if(t)for(var h=r.length-1;0<=h;h--){var v=r[h],w=v.instance,N=v.currentTarget;if(v=v.listener,w!==u&&o.isPropagationStopped())break e;u=v,o.currentTarget=N;try{u(o)}catch(Y){ls(Y)}o.currentTarget=null,u=w}else for(h=0;h<r.length;h++){if(v=r[h],w=v.instance,N=v.currentTarget,v=v.listener,w!==u&&o.isPropagationStopped())break e;u=v,o.currentTarget=N;try{u(o)}catch(Y){ls(Y)}o.currentTarget=null,u=w}}}}function Be(e,t){var a=t[Ee];a===void 0&&(a=t[Ee]=new Set);var r=e+"__bubble";a.has(r)||(np(t,e,2,!1),a.add(r))}function wc(e,t,a){var r=0;t&&(r|=4),np(a,e,r,t)}var Xs="_reactListening"+Math.random().toString(36).slice(2);function Ec(e){if(!e[Xs]){e[Xs]=!0,Fn.forEach(function(a){a!=="selectionchange"&&(eb.has(a)||wc(a,!1,e),wc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Xs]||(t[Xs]=!0,wc("selectionchange",!1,t))}}function np(e,t,a,r){switch(Dp(t)){case 2:var o=Cb;break;case 8:o=Ob;break;default:o=jc}a=o.bind(null,t,a,e),o=void 0,!Yo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function xc(e,t,a,r,o){var u=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var h=r.tag;if(h===3||h===4){var v=r.stateNode.containerInfo;if(v===o)break;if(h===4)for(h=r.return;h!==null;){var w=h.tag;if((w===3||w===4)&&h.stateNode.containerInfo===o)return;h=h.return}for(;v!==null;){if(h=vt(v),h===null)return;if(w=h.tag,w===5||w===6||w===26||w===27){r=u=h;continue e}v=v.parentNode}}r=r.return}sd(function(){var N=u,Y=Ho(a),F=[];e:{var z=Ud.get(e);if(z!==void 0){var L=as,re=e;switch(e){case"keypress":if(ts(a)===0)break e;case"keydown":case"keyup":L=Fv;break;case"focusin":re="focus",L=Xo;break;case"focusout":re="blur",L=Xo;break;case"beforeblur":case"afterblur":L=Xo;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=cd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=Uv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=Jv;break;case Dd:case Nd:case zd:L=Bv;break;case kd:L=$v;break;case"scroll":case"scrollend":L=zv;break;case"wheel":L=e0;break;case"copy":case"cut":case"paste":L=Hv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=dd;break;case"toggle":case"beforetoggle":L=n0}var xe=(t&4)!==0,it=!xe&&(e==="scroll"||e==="scrollend"),O=xe?z!==null?z+"Capture":null:z;xe=[];for(var R=N,D;R!==null;){var X=R;if(D=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||D===null||O===null||(X=Yr(R,O),X!=null&&xe.push(wl(R,X,D))),it)break;R=R.return}0<xe.length&&(z=new L(z,re,null,a,Y),F.push({event:z,listeners:xe}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",z&&a!==qo&&(re=a.relatedTarget||a.fromElement)&&(vt(re)||re[de]))break e;if((L||z)&&(z=Y.window===Y?Y:(z=Y.ownerDocument)?z.defaultView||z.parentWindow:window,L?(re=a.relatedTarget||a.toElement,L=N,re=re?vt(re):null,re!==null&&(it=f(re),xe=re.tag,re!==it||xe!==5&&xe!==27&&xe!==6)&&(re=null)):(L=null,re=N),L!==re)){if(xe=cd,X="onMouseLeave",O="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(xe=dd,X="onPointerLeave",O="onPointerEnter",R="pointer"),it=L==null?z:jt(L),D=re==null?z:jt(re),z=new xe(X,R+"leave",L,a,Y),z.target=it,z.relatedTarget=D,X=null,vt(Y)===N&&(xe=new xe(O,R+"enter",re,a,Y),xe.target=D,xe.relatedTarget=it,X=xe),it=X,L&&re)t:{for(xe=tb,O=L,R=re,D=0,X=O;X;X=xe(X))D++;X=0;for(var Se=R;Se;Se=xe(Se))X++;for(;0<D-X;)O=xe(O),D--;for(;0<X-D;)R=xe(R),X--;for(;D--;){if(O===R||R!==null&&O===R.alternate){xe=O;break t}O=xe(O),R=xe(R)}xe=null}else xe=null;L!==null&&ap(F,z,L,xe,!1),re!==null&&it!==null&&ap(F,it,re,xe,!0)}}e:{if(z=N?jt(N):window,L=z.nodeName&&z.nodeName.toLowerCase(),L==="select"||L==="input"&&z.type==="file")var Ie=Sd;else if(vd(z))if(wd)Ie=d0;else{Ie=c0;var fe=u0}else L=z.nodeName,!L||L.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?N&&Bo(N.elementType)&&(Ie=Sd):Ie=f0;if(Ie&&(Ie=Ie(e,N))){bd(F,Ie,a,Y);break e}fe&&fe(e,z,N),e==="focusout"&&N&&z.type==="number"&&N.memoizedProps.value!=null&&jo(z,"number",z.value)}switch(fe=N?jt(N):window,e){case"focusin":(vd(fe)||fe.contentEditable==="true")&&(nr=fe,$o=N,Jr=null);break;case"focusout":Jr=$o=nr=null;break;case"mousedown":Wo=!0;break;case"contextmenu":case"mouseup":case"dragend":Wo=!1,Od(F,a,Y);break;case"selectionchange":if(m0)break;case"keydown":case"keyup":Od(F,a,Y)}var Ne;if(Po)e:{switch(e){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else tr?yd(e,a)&&(He="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(He="onCompositionStart");He&&(hd&&a.locale!=="ko"&&(tr||He!=="onCompositionStart"?He==="onCompositionEnd"&&tr&&(Ne=od()):(qa=Y,Vo="value"in qa?qa.value:qa.textContent,tr=!0)),fe=Fs(N,He),0<fe.length&&(He=new fd(He,e,null,a,Y),F.push({event:He,listeners:fe}),Ne?He.data=Ne:(Ne=gd(a),Ne!==null&&(He.data=Ne)))),(Ne=i0?r0(e,a):l0(e,a))&&(He=Fs(N,"onBeforeInput"),0<He.length&&(fe=new fd("onBeforeInput","beforeinput",null,a,Y),F.push({event:fe,listeners:He}),fe.data=Ne)),I0(F,e,N,a,Y)}tp(F,t)})}function wl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Fs(e,t){for(var a=t+"Capture",r=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=Yr(e,a),o!=null&&r.unshift(wl(e,o,u)),o=Yr(e,t),o!=null&&r.push(wl(e,o,u))),e.tag===3)return r;e=e.return}return[]}function tb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ap(e,t,a,r,o){for(var u=t._reactName,h=[];a!==null&&a!==r;){var v=a,w=v.alternate,N=v.stateNode;if(v=v.tag,w!==null&&w===r)break;v!==5&&v!==26&&v!==27||N===null||(w=N,o?(N=Yr(a,u),N!=null&&h.unshift(wl(a,N,w))):o||(N=Yr(a,u),N!=null&&h.push(wl(a,N,w)))),a=a.return}h.length!==0&&e.push({event:t,listeners:h})}var nb=/\r\n?/g,ab=/\u0000|\uFFFD/g;function ip(e){return(typeof e=="string"?e:""+e).replace(nb,`
10
+ `).replace(ab,"")}function rp(e,t){return t=ip(t),ip(e)===t}function at(e,t,a,r,o,u){switch(a){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||$i(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&$i(e,""+r);break;case"className":Zn(e,"class",r);break;case"tabIndex":Zn(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Zn(e,a,r);break;case"style":rd(e,r,u);break;case"data":if(t!=="object"){Zn(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=Wl(""+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=Wl(""+r),e.setAttribute(a,r);break;case"onClick":r!=null&&(e.onclick=va);break;case"onScroll":r!=null&&Be("scroll",e);break;case"onScrollEnd":r!=null&&Be("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=Wl(""+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":Be("beforetoggle",e),Be("toggle",e),xt(e,"popover",r);break;case"xlinkActuate":Vt(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Vt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Vt(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Vt(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Vt(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Vt(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Vt(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":xt(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=Dv.get(a)||a,xt(e,a,r))}}function Tc(e,t,a,r,o,u){switch(a){case"style":rd(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"?$i(e,r):(typeof r=="number"||typeof r=="bigint")&&$i(e,""+r);break;case"onScroll":r!=null&&Be("scroll",e);break;case"onScrollEnd":r!=null&&Be("scrollend",e);break;case"onClick":r!=null&&(e.onclick=va);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!gn.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[ie]||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,""):xt(e,a,r)}}}function Ft(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Be("error",e),Be("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":Be("invalid",e);var v=u=h=o=null,w=null,N=null;for(r in a)if(a.hasOwnProperty(r)){var Y=a[r];if(Y!=null)switch(r){case"name":o=Y;break;case"type":h=Y;break;case"checked":w=Y;break;case"defaultChecked":N=Y;break;case"value":u=Y;break;case"defaultValue":v=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(s(137,t));break;default:at(e,t,r,Y,a,null)}}td(e,u,v,w,N,h,o,!1);return;case"select":Be("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?Ii(e,!!r,t,!1):a!=null&&Ii(e,!!r,a,!0);return;case"textarea":Be("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)}ad(e,r,o,u);return;case"option":for(w in a)a.hasOwnProperty(w)&&(r=a[w],r!=null)&&(w==="selected"?e.selected=r&&typeof r!="function"&&typeof r!="symbol":at(e,t,w,r,a,null));return;case"dialog":Be("beforetoggle",e),Be("toggle",e),Be("cancel",e),Be("close",e);break;case"iframe":case"object":Be("load",e);break;case"video":case"audio":for(r=0;r<Sl.length;r++)Be(Sl[r],e);break;case"image":Be("error",e),Be("load",e);break;case"details":Be("toggle",e);break;case"embed":case"source":case"link":Be("error",e),Be("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(N in a)if(a.hasOwnProperty(N)&&(r=a[N],r!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:at(e,t,N,r,a,null)}return;default:if(Bo(t)){for(Y in a)a.hasOwnProperty(Y)&&(r=a[Y],r!==void 0&&Tc(e,t,Y,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 ib(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,w=null,N=null,Y=null;for(L in a){var F=a[L];if(a.hasOwnProperty(L)&&F!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":w=F;default:r.hasOwnProperty(L)||at(e,t,L,null,r,F)}}for(var z in r){var L=r[z];if(F=a[z],r.hasOwnProperty(z)&&(L!=null||F!=null))switch(z){case"type":u=L;break;case"name":o=L;break;case"checked":N=L;break;case"defaultChecked":Y=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!==F&&at(e,t,z,L,r,F)}}Lo(e,h,v,w,N,Y,u,o);return;case"select":L=h=v=z=null;for(u in a)if(w=a[u],a.hasOwnProperty(u)&&w!=null)switch(u){case"value":break;case"multiple":L=w;default:r.hasOwnProperty(u)||at(e,t,u,null,r,w)}for(o in r)if(u=r[o],w=a[o],r.hasOwnProperty(o)&&(u!=null||w!=null))switch(o){case"value":z=u;break;case"defaultValue":v=u;break;case"multiple":h=u;default:u!==w&&at(e,t,o,u,r,w)}t=v,a=h,r=L,z!=null?Ii(e,!!a,z,!1):!!r!=!!a&&(t!=null?Ii(e,!!a,t,!0):Ii(e,!!a,a?[]:"",!1));return;case"textarea":L=z=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":z=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)}nd(e,z,L);return;case"option":for(var re in a)z=a[re],a.hasOwnProperty(re)&&z!=null&&!r.hasOwnProperty(re)&&(re==="selected"?e.selected=!1:at(e,t,re,null,r,z));for(w in r)z=r[w],L=a[w],r.hasOwnProperty(w)&&z!==L&&(z!=null||L!=null)&&(w==="selected"?e.selected=z&&typeof z!="function"&&typeof z!="symbol":at(e,t,w,z,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 xe in a)z=a[xe],a.hasOwnProperty(xe)&&z!=null&&!r.hasOwnProperty(xe)&&at(e,t,xe,null,r,z);for(N in r)if(z=r[N],L=a[N],r.hasOwnProperty(N)&&z!==L&&(z!=null||L!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(s(137,t));break;default:at(e,t,N,z,r,L)}return;default:if(Bo(t)){for(var it in a)z=a[it],a.hasOwnProperty(it)&&z!==void 0&&!r.hasOwnProperty(it)&&Tc(e,t,it,void 0,r,z);for(Y in r)z=r[Y],L=a[Y],!r.hasOwnProperty(Y)||z===L||z===void 0&&L===void 0||Tc(e,t,Y,z,r,L);return}}for(var O in a)z=a[O],a.hasOwnProperty(O)&&z!=null&&!r.hasOwnProperty(O)&&at(e,t,O,null,r,z);for(F in r)z=r[F],L=a[F],!r.hasOwnProperty(F)||z===L||z==null&&L==null||at(e,t,F,z,r,L)}function lp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function rb(){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&&lp(h)){for(h=0,v=o.responseEnd,r+=1;r<a.length;r++){var w=a[r],N=w.startTime;if(N>v)break;var Y=w.transferSize,F=w.initiatorType;Y&&lp(F)&&(w=w.responseEnd,h+=Y*(w<v?1:(v-N)/(w-N)))}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 Rc=null,_c=null;function Ps(e){return e.nodeType===9?e:e.ownerDocument}function sp(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 op(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 Ac(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 Cc=null;function lb(){var e=window.event;return e&&e.type==="popstate"?e===Cc?!1:(Cc=e,!0):(Cc=null,!1)}var up=typeof setTimeout=="function"?setTimeout:void 0,sb=typeof clearTimeout=="function"?clearTimeout:void 0,cp=typeof Promise=="function"?Promise:void 0,ob=typeof queueMicrotask=="function"?queueMicrotask:typeof cp<"u"?function(e){return cp.resolve(null).then(e).catch(ub)}:up;function ub(e){setTimeout(function(){throw e})}function ni(e){return e==="head"}function fp(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),Or(t);return}r--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")r++;else if(a==="html")El(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,El(a);for(var u=a.firstChild;u;){var h=u.nextSibling,v=u.nodeName;u[pt]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=h}}else a==="body"&&El(e.ownerDocument.body);a=o}while(a);Or(t)}function dp(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 Oc(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":Oc(a),gt(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function cb(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[pt])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=jn(e.nextSibling),e===null)break}return null}function fb(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=jn(e.nextSibling),e===null))return null;return e}function hp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=jn(e.nextSibling),e===null))return null;return e}function Mc(e){return e.data==="$?"||e.data==="$~"}function Dc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function db(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 jn(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 Nc=null;function mp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return jn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function pp(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 yp(e,t,a){switch(t=Ps(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 El(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);gt(e)}var Bn=new Map,gp=new Set;function Zs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ka=P.d;P.d={f:hb,r:mb,D:pb,C:yb,L:gb,m:vb,X:Sb,S:bb,M:wb};function hb(){var e=ka.f(),t=Hs();return e||t}function mb(e){var t=Ve(e);t!==null&&t.tag===5&&t.type==="form"?kh(t):ka.r(e)}var _r=typeof document>"u"?null:document;function vp(e,t,a){var r=_r;if(r&&typeof t=="string"&&t){var o=Mn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),gp.has(o)||(gp.add(o),e={rel:e,crossOrigin:a,href:t},r.querySelector(o)===null&&(t=r.createElement("link"),Ft(t,"link",e),dt(t),r.head.appendChild(t)))}}function pb(e){ka.D(e),vp("dns-prefetch",e,null)}function yb(e,t){ka.C(e,t),vp("preconnect",e,t)}function gb(e,t,a){ka.L(e,t,a);var r=_r;if(r&&e&&t){var o='link[rel="preload"][as="'+Mn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+Mn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+Mn(a.imageSizes)+'"]')):o+='[href="'+Mn(e)+'"]';var u=o;switch(t){case"style":u=Ar(e);break;case"script":u=Cr(e)}Bn.has(u)||(e=g({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Bn.set(u,e),r.querySelector(o)!==null||t==="style"&&r.querySelector(xl(u))||t==="script"&&r.querySelector(Tl(u))||(t=r.createElement("link"),Ft(t,"link",e),dt(t),r.head.appendChild(t)))}}function vb(e,t){ka.m(e,t);var a=_r;if(a&&e){var r=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Mn(r)+'"][href="'+Mn(e)+'"]',u=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Cr(e)}if(!Bn.has(u)&&(e=g({rel:"modulepreload",href:e},t),Bn.set(u,e),a.querySelector(o)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Tl(u)))return}r=a.createElement("link"),Ft(r,"link",e),dt(r),a.head.appendChild(r)}}}function bb(e,t,a){ka.S(e,t,a);var r=_r;if(r&&e){var o=ln(r).hoistableStyles,u=Ar(e);t=t||"default";var h=o.get(u);if(!h){var v={loading:0,preload:null};if(h=r.querySelector(xl(u)))v.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Bn.get(u))&&zc(e,a);var w=h=r.createElement("link");dt(w),Ft(w,"link",e),w._p=new Promise(function(N,Y){w.onload=N,w.onerror=Y}),w.addEventListener("load",function(){v.loading|=1}),w.addEventListener("error",function(){v.loading|=2}),v.loading|=4,Js(h,t,r)}h={type:"stylesheet",instance:h,count:1,state:v},o.set(u,h)}}}function Sb(e,t){ka.X(e,t);var a=_r;if(a&&e){var r=ln(a).hoistableScripts,o=Cr(e),u=r.get(o);u||(u=a.querySelector(Tl(o)),u||(e=g({src:e,async:!0},t),(t=Bn.get(o))&&kc(e,t),u=a.createElement("script"),dt(u),Ft(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},r.set(o,u))}}function wb(e,t){ka.M(e,t);var a=_r;if(a&&e){var r=ln(a).hoistableScripts,o=Cr(e),u=r.get(o);u||(u=a.querySelector(Tl(o)),u||(e=g({src:e,async:!0,type:"module"},t),(t=Bn.get(o))&&kc(e,t),u=a.createElement("script"),dt(u),Ft(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},r.set(o,u))}}function bp(e,t,a,r){var o=(o=ue.current)?Zs(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=Ar(a.href),a=ln(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=Ar(a.href);var u=ln(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(xl(e)))&&!u._p&&(h.instance=u,h.state.loading=5),Bn.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},Bn.set(e,a),u||Eb(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=Cr(a),a=ln(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 Ar(e){return'href="'+Mn(e)+'"'}function xl(e){return'link[rel="stylesheet"]['+e+"]"}function Sp(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function Eb(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}),Ft(t,"link",a),dt(t),e.head.appendChild(t))}function Cr(e){return'[src="'+Mn(e)+'"]'}function Tl(e){return"script[async]"+e}function wp(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Mn(a.href)+'"]');if(r)return t.instance=r,dt(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"),dt(r),Ft(r,"style",o),Js(r,a.precedence,e),t.instance=r;case"stylesheet":o=Ar(a.href);var u=e.querySelector(xl(o));if(u)return t.state.loading|=4,t.instance=u,dt(u),u;r=Sp(a),(o=Bn.get(o))&&zc(r,o),u=(e.ownerDocument||e).createElement("link"),dt(u);var h=u;return h._p=new Promise(function(v,w){h.onload=v,h.onerror=w}),Ft(u,"link",r),t.state.loading|=4,Js(u,a.precedence,e),t.instance=u;case"script":return u=Cr(a.src),(o=e.querySelector(Tl(u)))?(t.instance=o,dt(o),o):(r=a,(o=Bn.get(u))&&(r=g({},a),kc(r,o)),e=e.ownerDocument||e,o=e.createElement("script"),dt(o),Ft(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,Js(r,a.precedence,e));return t.instance}function Js(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 zc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function kc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Is=null;function Ep(e,t,a){if(Is===null){var r=new Map,o=Is=new Map;o.set(a,r)}else o=Is,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[pt]||u[ne]||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 xp(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function xb(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 Tp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Tb(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=Ar(r.href),u=t.querySelector(xl(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=$s.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,dt(u);return}u=t.ownerDocument||t,r=Sp(r),(o=Bn.get(o))&&zc(r,o),u=u.createElement("link"),dt(u);var h=u;h._p=new Promise(function(v,w){h.onload=v,h.onerror=w}),Ft(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=$s.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Uc=0;function Rb(e,t){return e.stylesheets&&e.count===0&&eo(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var r=setTimeout(function(){if(e.stylesheets&&eo(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Uc===0&&(Uc=62500*rb());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&eo(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Uc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(o)}}:null}function $s(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)eo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ws=null;function eo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ws=new Map,t.forEach(_b,e),Ws=null,$s.call(e))}function _b(e,t){if(!(t.state.loading&4)){var a=Ws.get(e);if(a)var r=a.get(null);else{a=new Map,Ws.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=$s.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 Rl={$$typeof:$,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function Ab(e,t,a,r,o,u,h,v,w){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=yn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yn(0),this.hiddenUpdates=yn(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.incompleteTransitions=new Map}function Rp(e,t,a,r,o,u,h,v,w,N,Y,F){return e=new Ab(e,t,a,h,w,N,Y,F,v),t=1,u===!0&&(t|=24),u=bn(3,null,null,t),e.current=u,u.stateNode=e,t=mu(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:r,isDehydrated:a,cache:t},vu(u),e}function _p(e){return e?(e=rr,e):rr}function Ap(e,t,a,r,o,u){o=_p(o),r.context===null?r.context=o:r.pendingContext=o,r=Ka(t),r.payload={element:a},u=u===void 0?null:u,u!==null&&(r.callback=u),a=Xa(e,r,t),a!==null&&(dn(a,e,t),al(a,e,t))}function Cp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Lc(e,t){Cp(e,t),(e=e.alternate)&&Cp(e,t)}function Op(e){if(e.tag===13||e.tag===31){var t=Ci(e,67108864);t!==null&&dn(t,e,67108864),Lc(e,67108864)}}function Mp(e){if(e.tag===13||e.tag===31){var t=Tn();t=k(t);var a=Ci(e,t);a!==null&&dn(a,e,t),Lc(e,t)}}var to=!0;function Cb(e,t,a,r){var o=C.T;C.T=null;var u=P.p;try{P.p=2,jc(e,t,a,r)}finally{P.p=u,C.T=o}}function Ob(e,t,a,r){var o=C.T;C.T=null;var u=P.p;try{P.p=8,jc(e,t,a,r)}finally{P.p=u,C.T=o}}function jc(e,t,a,r){if(to){var o=Bc(r);if(o===null)xc(e,t,r,no,a),Np(e,r);else if(Db(o,e,t,a,r))r.stopPropagation();else if(Np(e,r),t&4&&-1<Mb.indexOf(e)){for(;o!==null;){var u=Ve(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=Cn(u.pendingLanes);if(h!==0){var v=u;for(v.pendingLanes|=2,v.entangledLanes|=2;h;){var w=1<<31-zt(h);v.entanglements[1]|=w,h&=~w}la(u),(We&6)===0&&(Bs=mt()+500,bl(0))}}break;case 31:case 13:v=Ci(u,2),v!==null&&dn(v,u,2),Hs(),Lc(u,2)}if(u=Bc(r),u===null&&xc(e,t,r,no,a),u===o)break;o=u}o!==null&&r.stopPropagation()}else xc(e,t,r,null,a)}}function Bc(e){return e=Ho(e),qc(e)}var no=null;function qc(e){if(no=null,e=vt(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 no=e,null}function Dp(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(ha()){case na:return 2;case Ba:return 8;case Yt:case Wt:return 32;case _n:return 268435456;default:return 32}default:return 32}}var Hc=!1,ai=null,ii=null,ri=null,_l=new Map,Al=new Map,li=[],Mb="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 Np(e,t){switch(e){case"focusin":case"focusout":ai=null;break;case"dragenter":case"dragleave":ii=null;break;case"mouseover":case"mouseout":ri=null;break;case"pointerover":case"pointerout":_l.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Al.delete(t.pointerId)}}function Cl(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=Ve(t),t!==null&&Op(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Db(e,t,a,r,o){switch(t){case"focusin":return ai=Cl(ai,e,t,a,r,o),!0;case"dragenter":return ii=Cl(ii,e,t,a,r,o),!0;case"mouseover":return ri=Cl(ri,e,t,a,r,o),!0;case"pointerover":var u=o.pointerId;return _l.set(u,Cl(_l.get(u)||null,e,t,a,r,o)),!0;case"gotpointercapture":return u=o.pointerId,Al.set(u,Cl(Al.get(u)||null,e,t,a,r,o)),!0}return!1}function zp(e){var t=vt(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,pe(e.priority,function(){Mp(a)});return}}else if(t===31){if(t=p(a),t!==null){e.blockedOn=t,pe(e.priority,function(){Mp(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 ao(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Bc(e.nativeEvent);if(a===null){a=e.nativeEvent;var r=new a.constructor(a.type,a);qo=r,a.target.dispatchEvent(r),qo=null}else return t=Ve(a),t!==null&&Op(t),e.blockedOn=a,!1;t.shift()}return!0}function kp(e,t,a){ao(e)&&a.delete(t)}function Nb(){Hc=!1,ai!==null&&ao(ai)&&(ai=null),ii!==null&&ao(ii)&&(ii=null),ri!==null&&ao(ri)&&(ri=null),_l.forEach(kp),Al.forEach(kp)}function io(e,t){e.blockedOn===t&&(e.blockedOn=null,Hc||(Hc=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Nb)))}var ro=null;function Up(e){ro!==e&&(ro=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ro===e&&(ro=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(qc(r||a)===null)continue;break}var u=Ve(a);u!==null&&(e.splice(t,3),t-=3,Bu(u,{pending:!0,data:o,method:a.method,action:r},r,o))}}))}function Or(e){function t(w){return io(w,e)}ai!==null&&io(ai,e),ii!==null&&io(ii,e),ri!==null&&io(ri,e),_l.forEach(t),Al.forEach(t);for(var a=0;a<li.length;a++){var r=li[a];r.blockedOn===e&&(r.blockedOn=null)}for(;0<li.length&&(a=li[0],a.blockedOn===null);)zp(a),a.blockedOn===null&&li.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[ie]||null;if(typeof u=="function")h||Up(a);else if(h){var v=null;if(u&&u.hasAttribute("formAction")){if(o=u,h=u[ie]||null)v=h.formAction;else if(qc(o)!==null)continue}else v=h.action;typeof v=="function"?a[r+1]=v:(a.splice(r,3),r-=3),Up(a)}}}function Lp(){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}lo.prototype.render=Qc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var a=t.current,r=Tn();Ap(a,r,e,t,null,null)},lo.prototype.unmount=Qc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ap(e.current,2,null,e,null,null),Hs(),t[de]=null}};function lo(e){this._internalRoot=e}lo.prototype.unstable_scheduleHydration=function(e){if(e){var t=W();e={blockedOn:null,target:e,priority:t};for(var a=0;a<li.length&&t!==0&&t<li[a].priority;a++);li.splice(a,0,e),a===0&&zp(e)}};var jp=i.version;if(jp!=="19.2.4")throw Error(s(527,jp,"19.2.4"));P.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 zb={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:C,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var so=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!so.isDisabled&&so.supportsFiber)try{ma=so.inject(zb),ut=so}catch{}}return Ml.createRoot=function(e,t){if(!c(e))throw Error(s(299));var a=!1,r="",o=Gh,u=Kh,h=Xh;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=Rp(e,1,!1,null,null,a,r,null,o,u,h,Lp),e[de]=t.current,Ec(e),new Qc(t)},Ml.hydrateRoot=function(e,t,a){if(!c(e))throw Error(s(299));var r=!1,o="",u=Gh,h=Kh,v=Xh,w=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&&(w=a.formState)),t=Rp(e,1,!0,t,a??null,r,o,w,u,h,v,Lp),t.context=_p(null),a=t.current,r=Tn(),r=k(r),o=Ka(r),o.callback=null,Xa(a,o,r),a=r,t.current.lanes=a,st(t,a),la(t),e[de]=t.current,Ec(e),new lo(t)},Ml.version="19.2.4",Ml}var Fp;function Gb(){if(Fp)return Gc.exports;Fp=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(),Gc.exports=Vb(),Gc.exports}var Kb=Gb(),Lr=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(){}},Xb={setTimeout:(n,i)=>setTimeout(n,i),clearTimeout:n=>clearTimeout(n),setInterval:(n,i)=>setInterval(n,i),clearInterval:n=>clearInterval(n)},Fb=class{#e=Xb;#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)}},Yi=new Fb;function Pb(n){setTimeout(n,0)}var Gi=typeof window>"u"||"Deno"in globalThis;function tn(){}function Zb(n,i){return typeof n=="function"?n(i):n}function of(n){return typeof n=="number"&&n>=0&&n!==1/0}function ig(n,i){return Math.max(n+(i||0)-Date.now(),0)}function hi(n,i){return typeof n=="function"?n(i):n}function Hn(n,i){return typeof n=="function"?n(i):n}function Pp(n,i){const{type:l="all",exact:s,fetchStatus:c,predicate:f,queryKey:d,stale:p}=n;if(d){if(s){if(i.queryHash!==Of(d,i.options))return!1}else if(!Ql(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 Zp(n,i){const{exact:l,status:s,predicate:c,mutationKey:f}=n;if(f){if(!i.options.mutationKey)return!1;if(l){if(Ki(i.options.mutationKey)!==Ki(f))return!1}else if(!Ql(i.options.mutationKey,f))return!1}return!(s&&i.state.status!==s||c&&!c(i))}function Of(n,i){return(i?.queryKeyHashFn||Ki)(n)}function Ki(n){return JSON.stringify(n,(i,l)=>uf(l)?Object.keys(l).sort().reduce((s,c)=>(s[c]=l[c],s),{}):l)}function Ql(n,i){return n===i?!0:typeof n!=typeof i?!1:n&&i&&typeof n=="object"&&typeof i=="object"?Object.keys(i).every(l=>Ql(n[l],i[l])):!1}var Jb=Object.prototype.hasOwnProperty;function rg(n,i,l=0){if(n===i)return n;if(l>500)return i;const s=Jp(n)&&Jp(i);if(!s&&!(uf(n)&&uf(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],E=n[g],M=i[g];if(E===M){y[g]=E,(s?b<f:Jb.call(n,g))&&m++;continue}if(E===null||M===null||typeof E!="object"||typeof M!="object"){y[g]=M;continue}const U=rg(E,M,l+1);y[g]=U,U===E&&m++}return f===p&&m===f?n:y}function Co(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 Jp(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function uf(n){if(!Ip(n))return!1;const i=n.constructor;if(i===void 0)return!0;const l=i.prototype;return!(!Ip(l)||!l.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Ip(n){return Object.prototype.toString.call(n)==="[object Object]"}function Ib(n){return new Promise(i=>{Yi.setTimeout(i,n)})}function cf(n,i,l){return typeof l.structuralSharing=="function"?l.structuralSharing(n,i):l.structuralSharing!==!1?rg(n,i):i}function $b(n,i,l=0){const s=[...n,i];return l&&s.length>l?s.slice(1):s}function Wb(n,i,l=0){const s=[i,...n];return l&&s.length>l?s.slice(0,-1):s}var Mf=Symbol();function lg(n,i){return!n.queryFn&&i?.initialPromise?()=>i.initialPromise:!n.queryFn||n.queryFn===Mf?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function Df(n,i){return typeof n=="function"?n(...i):!!n}function eS(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 tS=class extends Lr{#e;#t;#n;constructor(){super(),this.#n=n=>{if(!Gi&&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"}},Nf=new tS;function ff(){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 nS=Pb;function aS(){let n=[],i=0,l=p=>{p()},s=p=>{p()},c=nS;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 Lt=aS(),iS=class extends Lr{#e=!0;#t;#n;constructor(){super(),this.#n=n=>{if(!Gi&&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}},Oo=new iS;function rS(n){return Math.min(1e3*2**n,3e4)}function sg(n){return(n??"online")==="online"?Oo.isOnline():!0}var df=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function og(n){let i=!1,l=0,s;const c=ff(),f=()=>c.status!=="pending",d=j=>{if(!f()){const K=new df(j);E(K),n.onCancel?.(K)}},p=()=>{i=!0},y=()=>{i=!1},m=()=>Nf.isFocused()&&(n.networkMode==="always"||Oo.isOnline())&&n.canRun(),b=()=>sg(n.networkMode)&&n.canRun(),g=j=>{f()||(s?.(),c.resolve(j))},E=j=>{f()||(s?.(),c.reject(j))},M=()=>new Promise(j=>{s=K=>{(f()||m())&&j(K)},n.onPause?.()}).then(()=>{s=void 0,f()||n.onContinue?.()}),U=()=>{if(f())return;let j;const K=l===0?n.initialPromise:void 0;try{j=K??n.fn()}catch(G){j=Promise.reject(G)}Promise.resolve(j).then(g).catch(G=>{if(f())return;const J=n.retry??(Gi?0:3),$=n.retryDelay??rS,ge=typeof $=="function"?$(l,G):$,he=J===!0||typeof J=="number"&&l<J||typeof J=="function"&&J(l,G);if(i||!he){E(G);return}l++,n.onFail?.(l,G),Ib(ge).then(()=>m()?void 0:M()).then(()=>{i?E(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 ug=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),of(this.gcTime)&&(this.#e=Yi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Gi?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Yi.clearTimeout(this.#e),this.#e=void 0)}},lS=class extends ug{#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=Wp(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=Wp(this.options);i.data!==void 0&&(this.setState($p(i.data,i.dataUpdatedAt)),this.#e=i)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(n,i){const l=cf(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(tn).catch(tn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(n=>Hn(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Mf||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>hi(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:!ig(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=lg(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=og({initialPromise:i?.initialPromise,fn:d.fetchFn,onCancel:p=>{p instanceof df&&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 df){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,...cg(l.data,this.options),fetchMeta:n.meta??null};case"success":const s={...l,...$p(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),Lt.batch(()=>{this.observers.forEach(l=>{l.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:n})})}};function cg(n,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:sg(i.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function $p(n,i){return{data:n,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Wp(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 sS=class extends Lr{constructor(n,i){super(),this.options=i,this.#e=n,this.#r=null,this.#s=ff(),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),ey(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hf(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hf(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#w(),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 Hn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#E(),this.#t.setOptions(this.options),i._defaulted&&!Co(this.options,i)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&ty(this.#t,l,this.options,i)&&this.#f(),this.updateResult(),s&&(this.#t!==l||Hn(this.options.enabled,this.#t)!==Hn(i.enabled,this.#t)||hi(this.options.staleTime,this.#t)!==hi(i.staleTime,this.#t))&&this.#y();const c=this.#g();s&&(this.#t!==l||Hn(this.options.enabled,this.#t)!==Hn(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 uS(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.#E();let i=this.#t.fetch(this.options,n);return n?.throwOnError||(i=i.catch(tn)),i}#y(){this.#S();const n=hi(this.options.staleTime,this.#t);if(Gi||this.#i.isStale||!of(n))return;const l=ig(this.#i.dataUpdatedAt,n)+1;this.#u=Yi.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.#w(),this.#o=n,!(Gi||Hn(this.options.enabled,this.#t)===!1||!of(this.#o)||this.#o===0)&&(this.#c=Yi.setInterval(()=>{(this.options.refetchIntervalInBackground||Nf.isFocused())&&this.#f()},this.#o))}#b(){this.#y(),this.#v(this.#g())}#S(){this.#u&&(Yi.clearTimeout(this.#u),this.#u=void 0)}#w(){this.#c&&(Yi.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,E;if(i._optimisticResults){const V=this.hasListeners(),oe=!V&&ey(n,i),Ce=V&&ty(n,l,i,s);(oe||Ce)&&(b={...b,...cg(m.data,n.options)}),i._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:M,errorUpdatedAt:U,status:j}=b;E=b.data;let K=!1;if(i.placeholderData!==void 0&&E===void 0&&j==="pending"){let V;c?.isPlaceholderData&&i.placeholderData===d?.placeholderData?(V=c.data,K=!0):V=typeof i.placeholderData=="function"?i.placeholderData(this.#h?.state.data,this.#h):i.placeholderData,V!==void 0&&(j="success",E=cf(c?.data,V,i),g=!0)}if(i.select&&E!==void 0&&!K)if(c&&E===f?.data&&i.select===this.#p)E=this.#d;else try{this.#p=i.select,E=i.select(E),E=cf(c?.data,E,i),this.#d=E,this.#r=null}catch(V){this.#r=V}this.#r&&(M=this.#r,E=this.#d,U=Date.now(),j="error");const G=b.fetchStatus==="fetching",J=j==="pending",$=j==="error",ge=J&&G,he=E!==void 0,A={status:j,fetchStatus:b.fetchStatus,isPending:J,isSuccess:j==="success",isError:$,isInitialLoading:ge,isLoading:ge,data:E,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&&!J,isLoadingError:$&&!he,isPaused:b.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:$&&he,isStale:zf(n,i),refetch:this.refetch,promise:this.#s,isEnabled:Hn(i.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const V=A.data!==void 0,oe=A.status==="error"&&!V,Ce=ke=>{oe?ke.reject(A.error):V&&ke.resolve(A.data)},Ae=()=>{const ke=this.#s=A.promise=ff();Ce(ke)},Te=this.#s;switch(Te.status){case"pending":n.queryHash===l.queryHash&&Ce(Te);break;case"fulfilled":(oe||A.data!==Te.value)&&Ae();break;case"rejected":(!oe||A.error!==Te.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),Co(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.#x({listeners:l()})}#E(){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()}#x(n){Lt.batch(()=>{n.listeners&&this.listeners.forEach(i=>{i(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function oS(n,i){return Hn(i.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&i.retryOnMount===!1)}function ey(n,i){return oS(n,i)||n.state.data!==void 0&&hf(n,i,i.refetchOnMount)}function hf(n,i,l){if(Hn(i.enabled,n)!==!1&&hi(i.staleTime,n)!=="static"){const s=typeof l=="function"?l(n):l;return s==="always"||s!==!1&&zf(n,i)}return!1}function ty(n,i,l,s){return(n!==i||Hn(s.enabled,n)===!1)&&(!l.suspense||n.state.status!=="error")&&zf(n,l)}function zf(n,i){return Hn(i.enabled,n)!==!1&&n.isStaleByTime(hi(i.staleTime,n))}function uS(n,i){return!Co(n.getCurrentResult(),i)}function ny(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=>{eS(U,()=>i.signal,()=>b=!0)},E=lg(i.options,i.fetchOptions),M=async(U,j,K)=>{if(b)return Promise.reject();if(j==null&&U.pages.length)return Promise.resolve(U);const J=(()=>{const me={client:i.client,queryKey:i.queryKey,pageParam:j,direction:K?"backward":"forward",meta:i.options.meta};return g(me),me})(),$=await E(J),{maxPages:ge}=i.options,he=K?Wb:$b;return{pages:he(U.pages,$,ge),pageParams:he(U.pageParams,j,ge)}};if(c&&f.length){const U=c==="backward",j=U?fg:mf,K={pages:f,pageParams:d},G=j(s,K);p=await M(K,G,U)}else{const U=n??f.length;do{const j=y===0?d[0]??s.initialPageParam:mf(s,p);if(y>0&&j==null)break;p=await M(p,j),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 mf(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 fg(n,{pages:i,pageParams:l}){return i.length>0?n.getPreviousPageParam?.(i[0],i,l[0],l):void 0}function zR(n,i){return i?mf(n,i)!=null:!1}function kR(n,i){return!i||!n.getPreviousPageParam?!1:fg(n,i)!=null}var cS=class extends ug{#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||dg(),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=og({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),Lt.batch(()=>{this.#t.forEach(l=>{l.onMutationUpdate(n)}),this.#n.notify({mutation:this,type:"updated",action:n})})}};function dg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var fS=class extends Lr{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 cS({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=oo(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=oo(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=oo(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=oo(n);return typeof i=="string"?this.#t.get(i)?.find(s=>s!==n&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Lt.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=>Zp(i,l))}findAll(n={}){return this.getAll().filter(i=>Zp(n,i))}notify(n){Lt.batch(()=>{this.listeners.forEach(i=>{i(n)})})}resumePausedMutations(){const n=this.getAll().filter(i=>i.state.isPaused);return Lt.batch(()=>Promise.all(n.map(i=>i.continue().catch(tn))))}};function oo(n){return n.options.scope?.id}var dS=class extends Lr{#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),Co(this.options,l)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),l?.mutationKey&&this.options.mutationKey&&Ki(l.mutationKey)!==Ki(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??dg();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){Lt.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)})})}},hS=class extends Lr{constructor(n={}){super(),this.config=n,this.#e=new Map}#e;build(n,i,l){const s=i.queryKey,c=i.queryHash??Of(s,i);let f=this.get(c);return f||(f=new lS({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(){Lt.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=>Pp(i,l))}findAll(n={}){const i=this.getAll();return Object.keys(n).length>0?i.filter(l=>Pp(n,l)):i}notify(n){Lt.batch(()=>{this.listeners.forEach(i=>{i(n)})})}onFocus(){Lt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Lt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},mS=class{#e;#t;#n;#i;#a;#l;#s;#r;constructor(n={}){this.#e=n.queryCache||new hS,this.#t=n.mutationCache||new fS,this.#n=n.defaultOptions||{},this.#i=new Map,this.#a=new Map,this.#l=0}mount(){this.#l++,this.#l===1&&(this.#s=Nf.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#r=Oo.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(hi(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=Zb(i,f);if(d!==void 0)return this.#e.build(this,s).setData(d,{...l,manual:!0})}setQueriesData(n,i,l){return Lt.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;Lt.batch(()=>{i.findAll(n).forEach(l=>{i.remove(l)})})}resetQueries(n,i){const l=this.#e;return Lt.batch(()=>(l.findAll(n).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...n},i)))}cancelQueries(n,i={}){const l={revert:!0,...i},s=Lt.batch(()=>this.#e.findAll(n).map(c=>c.cancel(l)));return Promise.all(s).then(tn).catch(tn)}invalidateQueries(n,i={}){return Lt.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=Lt.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(tn)),c.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(s).then(tn)}fetchQuery(n){const i=this.defaultQueryOptions(n);i.retry===void 0&&(i.retry=!1);const l=this.#e.build(this,i);return l.isStaleByTime(hi(i.staleTime,l))?l.fetch(i):Promise.resolve(l.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(tn).catch(tn)}fetchInfiniteQuery(n){return n.behavior=ny(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(tn).catch(tn)}ensureInfiniteQueryData(n){return n.behavior=ny(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Oo.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(Ki(n),{queryKey:n,defaultOptions:i})}getQueryDefaults(n){const i=[...this.#i.values()],l={};return i.forEach(s=>{Ql(n,s.queryKey)&&Object.assign(l,s.defaultOptions)}),l}setMutationDefaults(n,i){this.#a.set(Ki(n),{mutationKey:n,defaultOptions:i})}getMutationDefaults(n){const i=[...this.#a.values()],l={};return i.forEach(s=>{Ql(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=Of(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===Mf&&(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()}},hg=T.createContext(void 0),yt=n=>{const i=T.useContext(hg);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},pS=({client:n,children:i})=>(T.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),Q.jsx(hg.Provider,{value:n,children:i})),mg=T.createContext(!1),yS=()=>T.useContext(mg);mg.Provider;function gS(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var vS=T.createContext(gS()),bS=()=>T.useContext(vS),SS=(n,i,l)=>{const s=l?.state.error&&typeof n.throwOnError=="function"?Df(n.throwOnError,[l.state.error,l]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||s)&&(i.isReset()||(n.retryOnMount=!1))},wS=n=>{T.useEffect(()=>{n.clearReset()},[n])},ES=({result:n,errorResetBoundary:i,throwOnError:l,query:s,suspense:c})=>n.isError&&!i.isReset()&&!n.isFetching&&s&&(c&&n.data===void 0||Df(l,[n.error,s])),xS=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))}},TS=(n,i)=>n.isLoading&&n.isFetching&&!i,RS=(n,i)=>n?.suspense&&i.isPending,ay=(n,i,l)=>i.fetchOptimistic(n).catch(()=>{l.clearReset()});function _S(n,i,l){const s=yS(),c=bS(),f=yt(),d=f.defaultQueryOptions(n);f.getDefaultOptions().queries?._experimental_beforeQuery?.(d);const p=f.getQueryCache().get(d.queryHash);d._optimisticResults=s?"isRestoring":"optimistic",xS(d),SS(d,c,p),wS(c);const y=!f.getQueryCache().get(d.queryHash),[m]=T.useState(()=>new i(f,d)),b=m.getOptimisticResult(d),g=!s&&n.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(E=>{const M=g?m.subscribe(Lt.batchCalls(E)):tn;return m.updateResult(),M},[m,g]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),T.useEffect(()=>{m.setOptions(d)},[d,m]),RS(d,b))throw ay(d,m,c);if(ES({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&&!Gi&&TS(b,s)&&(y?ay(d,m,c):p?.promise)?.catch(tn).finally(()=>{m.updateResult()}),d.notifyOnChangeProps?b:m.trackResult(b)}function pi(n,i){return _S(n,sS)}function qt(n,i){const l=yt(),[s]=T.useState(()=>new dS(l,n));T.useEffect(()=>{s.setOptions(n)},[s,n]);const c=T.useSyncExternalStore(T.useCallback(d=>s.subscribe(Lt.batchCalls(d)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),f=T.useCallback((d,p)=>{s.mutate(d,p).catch(tn)},[s]);if(c.error&&Df(s.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:f,mutateAsync:c.mutate}}var pg=ag();const AS=ng(pg);function CS(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 OS=n=>{switch(n){case"success":return NS;case"info":return kS;case"warning":return zS;case"error":return US;default:return null}},MS=Array(12).fill(0),DS=({visible:n,className:i})=>ee.createElement("div",{className:["sonner-loading-wrapper",i].filter(Boolean).join(" "),"data-visible":n},ee.createElement("div",{className:"sonner-spinner"},MS.map((l,s)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),NS=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.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"})),zS=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ee.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"})),kS=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.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"})),US=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.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"})),LS=ee.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"},ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),jS=()=>{const[n,i]=ee.useState(document.hidden);return ee.useEffect(()=>{const l=()=>{i(document.hidden)};return document.addEventListener("visibilitychange",l),()=>window.removeEventListener("visibilitychange",l)},[]),n};let pf=1;class BS{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:pf++,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],ee.isValidElement(m))f=!1,this.create({id:s,type:"default",message:m});else if(HS(m)&&!m.ok){f=!1;const g=typeof l.error=="function"?await l.error(`HTTP error! status: ${m.status}`):l.error,E=typeof l.description=="function"?await l.description(`HTTP error! status: ${m.status}`):l.description,U=typeof g=="object"&&!ee.isValidElement(g)?g:{message:g};this.create({id:s,type:"error",description:E,...U})}else if(m instanceof Error){f=!1;const g=typeof l.error=="function"?await l.error(m):l.error,E=typeof l.description=="function"?await l.description(m):l.description,U=typeof g=="object"&&!ee.isValidElement(g)?g:{message:g};this.create({id:s,type:"error",description:E,...U})}else if(l.success!==void 0){f=!1;const g=typeof l.success=="function"?await l.success(m):l.success,E=typeof l.description=="function"?await l.description(m):l.description,U=typeof g=="object"&&!ee.isValidElement(g)?g:{message:g};this.create({id:s,type:"success",description:E,...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"&&!ee.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||pf++;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 hn=new BS,qS=(n,i)=>{const l=i?.id||pf++;return hn.addToast({title:n,...i,id:l}),l},HS=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",QS=qS,YS=()=>hn.toasts,VS=()=>hn.getActiveToasts(),GS=Object.assign(QS,{success:hn.success,info:hn.info,warning:hn.warning,error:hn.error,custom:hn.custom,message:hn.message,promise:hn.promise,dismiss:hn.dismiss,loading:hn.loading},{getHistory:YS,getToasts:VS});CS("[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 uo(n){return n.label!==void 0}const KS=3,XS="24px",FS="16px",iy=4e3,PS=356,ZS=14,JS=45,IS=200;function sa(...n){return n.filter(Boolean).join(" ")}function $S(n){const[i,l]=n.split("-"),s=[];return i&&s.push(i),l&&s.push(l),s}const WS=n=>{var i,l,s,c,f,d,p,y,m;const{invert:b,toast:g,unstyled:E,interacting:M,setHeights:U,visibleToasts:j,heights:K,index:G,toasts:J,expanded:$,removeToast:ge,defaultRichColors:he,closeButton:me,style:A,cancelButtonStyle:V,actionButtonStyle:oe,className:Ce="",descriptionClassName:Ae="",duration:Te,position:ke,gap:Ue,expandByDefault:we,classNames:C,icons:P,closeButtonAriaLabel:q="Close toast"}=n,[ye,ve]=ee.useState(null),[x,H]=ee.useState(null),[B,Z]=ee.useState(!1),[te,ue]=ee.useState(!1),[ce,Re]=ee.useState(!1),[Qe,Ht]=ee.useState(!1),[$t,Je]=ee.useState(!1),[Gn,nn]=ee.useState(0),[gi,an]=ee.useState(0),da=ee.useRef(g.duration||Te||iy),vi=ee.useRef(null),Pt=ee.useRef(null),bi=G===0,Si=G+1<=j,Qt=g.type,ta=g.dismissible!==!1,mt=g.className||"",ha=g.descriptionClassName||"",na=ee.useMemo(()=>K.findIndex(_e=>_e.toastId===g.id)||0,[K,g.id]),Ba=ee.useMemo(()=>{var _e;return(_e=g.closeButton)!=null?_e:me},[g.closeButton,me]),Yt=ee.useMemo(()=>g.duration||Te||iy,[g.duration,Te]),Wt=ee.useRef(0),_n=ee.useRef(0),Zi=ee.useRef(0),An=ee.useRef(null),[ma,ut]=ke.split("-"),rn=ee.useMemo(()=>K.reduce((_e,lt,wt)=>wt>=na?_e:_e+lt.height,0),[K,na]),zt=jS(),Ji=g.invert||b,wi=Qt==="loading";_n.current=ee.useMemo(()=>na*Ue+rn,[na,rn]),ee.useEffect(()=>{da.current=Yt},[Yt]),ee.useEffect(()=>{Z(!0)},[]),ee.useEffect(()=>{const _e=Pt.current;if(_e){const lt=_e.getBoundingClientRect().height;return an(lt),U(wt=>[{toastId:g.id,height:lt,position:g.position},...wt]),()=>U(wt=>wt.filter(Et=>Et.toastId!==g.id))}},[U,g.id]),ee.useLayoutEffect(()=>{if(!B)return;const _e=Pt.current,lt=_e.style.height;_e.style.height="auto";const wt=_e.getBoundingClientRect().height;_e.style.height=lt,an(wt),U(Et=>Et.find(st=>st.toastId===g.id)?Et.map(st=>st.toastId===g.id?{...st,height:wt}:st):[{toastId:g.id,height:wt,position:g.position},...Et])},[B,g.title,g.description,U,g.id,g.jsx,g.action,g.cancel]);const pn=ee.useCallback(()=>{ue(!0),nn(_n.current),U(_e=>_e.filter(lt=>lt.toastId!==g.id)),setTimeout(()=>{ge(g)},IS)},[g,ge,U,_n]);ee.useEffect(()=>{if(g.promise&&Qt==="loading"||g.duration===1/0||g.type==="loading")return;let _e;return $||M||zt?(()=>{if(Zi.current<Wt.current){const Et=new Date().getTime()-Wt.current;da.current=da.current-Et}Zi.current=new Date().getTime()})():da.current!==1/0&&(Wt.current=new Date().getTime(),_e=setTimeout(()=>{g.onAutoClose==null||g.onAutoClose.call(g,g),pn()},da.current)),()=>clearTimeout(_e)},[$,M,g,Qt,zt,pn]),ee.useEffect(()=>{g.delete&&(pn(),g.onDismiss==null||g.onDismiss.call(g,g))},[pn,g.delete]);function Kn(){var _e;if(P?.loading){var lt;return ee.createElement("div",{className:sa(C?.loader,g==null||(lt=g.classNames)==null?void 0:lt.loader,"sonner-loader"),"data-visible":Qt==="loading"},P.loading)}return ee.createElement(DS,{className:sa(C?.loader,g==null||(_e=g.classNames)==null?void 0:_e.loader),visible:Qt==="loading"})}const pa=g.icon||P?.[Qt]||OS(Qt);var Xn,Cn;return ee.createElement("li",{tabIndex:0,ref:Pt,className:sa(Ce,mt,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":(Xn=g.richColors)!=null?Xn:he,"data-styled":!(g.jsx||g.unstyled||E),"data-mounted":B,"data-promise":!!g.promise,"data-swiped":$t,"data-removed":te,"data-visible":Si,"data-y-position":ma,"data-x-position":ut,"data-index":G,"data-front":bi,"data-swiping":ce,"data-dismissible":ta,"data-type":Qt,"data-invert":Ji,"data-swipe-out":Qe,"data-swipe-direction":x,"data-expanded":!!($||we&&B),"data-testid":g.testId,style:{"--index":G,"--toasts-before":G,"--z-index":J.length-G,"--offset":`${te?Gn:_n.current}px`,"--initial-height":we?"auto":`${gi}px`,...A,...g.style},onDragEnd:()=>{Re(!1),ve(null),An.current=null},onPointerDown:_e=>{_e.button!==2&&(wi||!ta||(vi.current=new Date,nn(_n.current),_e.target.setPointerCapture(_e.pointerId),_e.target.tagName!=="BUTTON"&&(Re(!0),An.current={x:_e.clientX,y:_e.clientY})))},onPointerUp:()=>{var _e,lt,wt;if(Qe||!ta)return;An.current=null;const Et=Number(((_e=Pt.current)==null?void 0:_e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),yn=Number(((lt=Pt.current)==null?void 0:lt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),st=new Date().getTime()-((wt=vi.current)==null?void 0:wt.getTime()),Zt=ye==="x"?Et:yn,ya=Math.abs(Zt)/st;if(Math.abs(Zt)>=JS||ya>.11){nn(_n.current),g.onDismiss==null||g.onDismiss.call(g,g),H(ye==="x"?Et>0?"right":"left":yn>0?"down":"up"),pn(),Ht(!0);return}else{var S,_;(S=Pt.current)==null||S.style.setProperty("--swipe-amount-x","0px"),(_=Pt.current)==null||_.style.setProperty("--swipe-amount-y","0px")}Je(!1),Re(!1),ve(null)},onPointerMove:_e=>{var lt,wt,Et;if(!An.current||!ta||((lt=window.getSelection())==null?void 0:lt.toString().length)>0)return;const st=_e.clientY-An.current.y,Zt=_e.clientX-An.current.x;var ya;const S=(ya=n.swipeDirections)!=null?ya:$S(ke);!ye&&(Math.abs(Zt)>1||Math.abs(st)>1)&&ve(Math.abs(Zt)>Math.abs(st)?"x":"y");let _={x:0,y:0};const k=I=>1/(1.5+Math.abs(I)/20);if(ye==="y"){if(S.includes("top")||S.includes("bottom"))if(S.includes("top")&&st<0||S.includes("bottom")&&st>0)_.y=st;else{const I=st*k(st);_.y=Math.abs(I)<Math.abs(st)?I:st}}else if(ye==="x"&&(S.includes("left")||S.includes("right")))if(S.includes("left")&&Zt<0||S.includes("right")&&Zt>0)_.x=Zt;else{const I=Zt*k(Zt);_.x=Math.abs(I)<Math.abs(Zt)?I:Zt}(Math.abs(_.x)>0||Math.abs(_.y)>0)&&Je(!0),(wt=Pt.current)==null||wt.style.setProperty("--swipe-amount-x",`${_.x}px`),(Et=Pt.current)==null||Et.style.setProperty("--swipe-amount-y",`${_.y}px`)}},Ba&&!g.jsx&&Qt!=="loading"?ee.createElement("button",{"aria-label":q,"data-disabled":wi,"data-close-button":!0,onClick:wi||!ta?()=>{}:()=>{pn(),g.onDismiss==null||g.onDismiss.call(g,g)},className:sa(C?.closeButton,g==null||(s=g.classNames)==null?void 0:s.closeButton)},(Cn=P?.close)!=null?Cn:LS):null,(Qt||g.icon||g.promise)&&g.icon!==null&&(P?.[Qt]!==null||g.icon)?ee.createElement("div",{"data-icon":"",className:sa(C?.icon,g==null||(c=g.classNames)==null?void 0:c.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||Kn():null,g.type!=="loading"?pa:null):null,ee.createElement("div",{"data-content":"",className:sa(C?.content,g==null||(f=g.classNames)==null?void 0:f.content)},ee.createElement("div",{"data-title":"",className:sa(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?ee.createElement("div",{"data-description":"",className:sa(Ae,ha,C?.description,g==null||(p=g.classNames)==null?void 0:p.description)},typeof g.description=="function"?g.description():g.description):null),ee.isValidElement(g.cancel)?g.cancel:g.cancel&&uo(g.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||V,onClick:_e=>{uo(g.cancel)&&ta&&(g.cancel.onClick==null||g.cancel.onClick.call(g.cancel,_e),pn())},className:sa(C?.cancelButton,g==null||(y=g.classNames)==null?void 0:y.cancelButton)},g.cancel.label):null,ee.isValidElement(g.action)?g.action:g.action&&uo(g.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||oe,onClick:_e=>{uo(g.action)&&(g.action.onClick==null||g.action.onClick.call(g.action,_e),!_e.defaultPrevented&&pn())},className:sa(C?.actionButton,g==null||(m=g.classNames)==null?void 0:m.actionButton)},g.action.label):null)};function ry(){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 e1(n,i){const l={};return[n,i].forEach((s,c)=>{const f=c===1,d=f?"--mobile-offset":"--offset",p=f?FS:XS;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 t1=ee.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:E="light",richColors:M,duration:U,style:j,visibleToasts:K=KS,toastOptions:G,dir:J=ry(),gap:$=ZS,icons:ge,containerAriaLabel:he="Notifications"}=i,[me,A]=ee.useState([]),V=ee.useMemo(()=>s?me.filter(B=>B.toasterId===s):me.filter(B=>!B.toasterId),[me,s]),oe=ee.useMemo(()=>Array.from(new Set([f].concat(V.filter(B=>B.position).map(B=>B.position)))),[V,f]),[Ce,Ae]=ee.useState([]),[Te,ke]=ee.useState(!1),[Ue,we]=ee.useState(!1),[C,P]=ee.useState(E!=="system"?E:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=ee.useRef(null),ye=d.join("+").replace(/Key/g,"").replace(/Digit/g,""),ve=ee.useRef(null),x=ee.useRef(!1),H=ee.useCallback(B=>{A(Z=>{var te;return(te=Z.find(ue=>ue.id===B.id))!=null&&te.delete||hn.dismiss(B.id),Z.filter(({id:ue})=>ue!==B.id)})},[]);return ee.useEffect(()=>hn.subscribe(B=>{if(B.dismiss){requestAnimationFrame(()=>{A(Z=>Z.map(te=>te.id===B.id?{...te,delete:!0}:te))});return}setTimeout(()=>{AS.flushSync(()=>{A(Z=>{const te=Z.findIndex(ue=>ue.id===B.id);return te!==-1?[...Z.slice(0,te),{...Z[te],...B},...Z.slice(te+1)]:[B,...Z]})})})}),[me]),ee.useEffect(()=>{if(E!=="system"){P(E);return}if(E==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?P("dark"):P("light")),typeof window>"u")return;const B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:Z})=>{P(Z?"dark":"light")})}catch{B.addListener(({matches:te})=>{try{P(te?"dark":"light")}catch(ue){console.error(ue)}})}},[E]),ee.useEffect(()=>{me.length<=1&&ke(!1)},[me]),ee.useEffect(()=>{const B=Z=>{var te;if(d.every(Re=>Z[Re]||Z.code===Re)){var ce;ke(!0),(ce=q.current)==null||ce.focus()}Z.code==="Escape"&&(document.activeElement===q.current||(te=q.current)!=null&&te.contains(document.activeElement))&&ke(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[d]),ee.useEffect(()=>{if(q.current)return()=>{ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null,x.current=!1)}},[q.current]),ee.createElement("section",{ref:l,"aria-label":`${he} ${ye}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},oe.map((B,Z)=>{var te;const[ue,ce]=B.split("-");return V.length?ee.createElement("ol",{key:B,dir:J==="auto"?ry():J,tabIndex:-1,ref:q,className:m,"data-sonner-toaster":!0,"data-sonner-theme":C,"data-y-position":ue,"data-x-position":ce,style:{"--front-toast-height":`${((te=Ce[0])==null?void 0:te.height)||0}px`,"--width":`${PS}px`,"--gap":`${$}px`,...j,...e1(b,g)},onBlur:Re=>{x.current&&!Re.currentTarget.contains(Re.relatedTarget)&&(x.current=!1,ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null))},onFocus:Re=>{Re.target instanceof HTMLElement&&Re.target.dataset.dismissible==="false"||x.current||(x.current=!0,ve.current=Re.relatedTarget)},onMouseEnter:()=>ke(!0),onMouseMove:()=>ke(!0),onMouseLeave:()=>{Ue||ke(!1)},onDragEnd:()=>ke(!1),onPointerDown:Re=>{Re.target instanceof HTMLElement&&Re.target.dataset.dismissible==="false"||we(!0)},onPointerUp:()=>we(!1)},V.filter(Re=>!Re.position&&Z===0||Re.position===B).map((Re,Qe)=>{var Ht,$t;return ee.createElement(WS,{key:Re.id,icons:ge,index:Qe,toast:Re,defaultRichColors:M,duration:(Ht=G?.duration)!=null?Ht:U,className:G?.className,descriptionClassName:G?.descriptionClassName,invert:c,visibleToasts:K,closeButton:($t=G?.closeButton)!=null?$t:y,interacting:Ue,position:B,style:G?.style,unstyled:G?.unstyled,classNames:G?.classNames,cancelButtonStyle:G?.cancelButtonStyle,actionButtonStyle:G?.actionButtonStyle,closeButtonAriaLabel:G?.closeButtonAriaLabel,removeToast:H,toasts:V.filter(Je=>Je.position==Re.position),heights:Ce.filter(Je=>Je.position==Re.position),setHeights:Ae,expandByDefault:p,gap:$,expanded:Te,swipeDirections:i.swipeDirections})})):null}))}),n1=new mS({defaultOptions:{queries:{staleTime:1e3*60,retry:1}}}),a1="modulepreload",i1=function(n){return"/"+n},ly={},ja=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=i1(m),m in ly)return;ly[m]=!0;const b=m.endsWith(".css"),g=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${g}`))return;const E=document.createElement("link");if(E.rel=b?"stylesheet":a1,b||(E.as="script"),E.crossOrigin="",E.href=m,p&&E.setAttribute("nonce",p),document.head.appendChild(E),b)return new Promise((M,U)=>{E.addEventListener("load",M),E.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 yg=n=>{throw TypeError(n)},r1=(n,i,l)=>i.has(n)||yg("Cannot "+l),Pc=(n,i,l)=>(r1(n,i,"read from private field"),l?l.call(n):i.get(n)),l1=(n,i,l)=>i.has(n)?yg("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(n):i.set(n,l),sy="popstate";function s1(n={}){function i(s,c){let{pathname:f,search:d,hash:p}=s.location;return Yl("",{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:ca(c)}return u1(i,l,null,n)}function Le(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function Nt(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function o1(){return Math.random().toString(36).substring(2,10)}function oy(n,i){return{usr:n.state,key:n.key,idx:i}}function Yl(n,i,l=null,s){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof i=="string"?yi(i):i,state:l,key:i&&i.key||s||o1()}}function ca({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 yi(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 u1(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:j.location,delta:G})}function E(K,G){p="PUSH";let J=Yl(j.location,K,G);m=b()+1;let $=oy(J,m),ge=j.createHref(J);try{d.pushState($,"",ge)}catch(he){if(he instanceof DOMException&&he.name==="DataCloneError")throw he;c.location.assign(ge)}f&&y&&y({action:p,location:j.location,delta:1})}function M(K,G){p="REPLACE";let J=Yl(j.location,K,G);m=b();let $=oy(J,m),ge=j.createHref(J);d.replaceState($,"",ge),f&&y&&y({action:p,location:j.location,delta:0})}function U(K){return gg(K)}let j={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(sy,g),y=K,()=>{c.removeEventListener(sy,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:E,replace:M,go(K){return d.go(K)}};return j}function gg(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:ca(n);return s=s.replace(/ $/,"%20"),!i&&s.startsWith("//")&&(s=l+s),new URL(s,l)}var Ll,uy=class{constructor(n){if(l1(this,Ll,new Map),n)for(let[i,l]of n)this.set(i,l)}get(n){if(Pc(this,Ll).has(n))return Pc(this,Ll).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,i){Pc(this,Ll).set(n,i)}};Ll=new WeakMap;var c1=new Set(["lazy","caseSensitive","path","id","index","children"]);function f1(n){return c1.has(n)}var d1=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function h1(n){return d1.has(n)}function m1(n){return n.index===!0}function Vl(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`),m1(f)){let m={...f,id:y};return s[y]=cy(m,i(m)),m}else{let m={...f,id:y,children:void 0};return s[y]=cy(m,i(m)),f.children&&(m.children=Vl(f.children,i,p,s,c)),m}})}function cy(n,i){return Object.assign(n,{...i,...typeof i.lazy=="object"&&i.lazy!=null?{lazy:{...n.lazy,...i.lazy}}:{}})}function ui(n,i,l="/"){return jl(n,i,l,!1)}function jl(n,i,l,s){let c=typeof i=="string"?yi(i):i,f=Yn(c.pathname||"/",l);if(f==null)return null;let d=vg(n);y1(d);let p=null;for(let y=0;p==null&&y<d.length;++y){let m=A1(f);p=R1(d[y],m,s)}return p}function p1(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 vg(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=ua([s,b.relativePath]),E=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}".`),vg(d.children,i,E,g,y)),!(d.path==null&&!d.index)&&i.push({path:g,score:x1(g,d.index),routesMeta:E})};return n.forEach((d,p)=>{if(d.path===""||!d.path?.includes("?"))f(d,p);else for(let y of bg(d.path))f(d,p,!0,y)}),i}function bg(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=bg(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 y1(n){n.sort((i,l)=>i.score!==l.score?l.score-i.score:T1(i.routesMeta.map(s=>s.childrenIndex),l.routesMeta.map(s=>s.childrenIndex)))}var g1=/^:[\w-]+$/,v1=3,b1=2,S1=1,w1=10,E1=-2,fy=n=>n==="*";function x1(n,i){let l=n.split("/"),s=l.length;return l.some(fy)&&(s+=E1),i&&(s+=b1),l.filter(c=>!fy(c)).reduce((c,f)=>c+(g1.test(f)?v1:f===""?S1:w1),s)}function T1(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 R1(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=Mo({path:y.relativePath,caseSensitive:y.caseSensitive,end:m},b),E=y.route;if(!g&&m&&l&&!s[s.length-1].route.index&&(g=Mo({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},b)),!g)return null;Object.assign(c,g.params),d.push({params:c,pathname:ua([f,g.pathname]),pathnameBase:M1(ua([f,g.pathnameBase])),route:E}),g.pathnameBase!=="/"&&(f=ua([f,g.pathnameBase]))}return d}function Mo(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,s]=_1(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},E)=>{if(b==="*"){let U=p[E]||"";d=f.slice(0,f.length-U.length).replace(/(.)\/+$/,"$1")}const M=p[E];return g&&!M?m[b]=void 0:m[b]=(M||"").replace(/%2F/g,"/"),m},{}),pathname:f,pathnameBase:d,pattern:n}}function _1(n,i=!1,l=!0){Nt(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 A1(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return Nt(!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 Yn(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 C1({basename:n,pathname:i}){return i==="/"?n:ua([n,i])}var Sg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,kf=n=>Sg.test(n);function O1(n,i="/"){let{pathname:l,search:s="",hash:c=""}=typeof n=="string"?yi(n):n,f;return l?(l=l.replace(/\/\/+/g,"/"),l.startsWith("/")?f=dy(l.substring(1),"/"):f=dy(l,i)):f=i,{pathname:f,search:D1(s),hash:N1(c)}}function dy(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 Zc(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 wg(n){return n.filter((i,l)=>l===0||i.route.path&&i.route.path.length>0)}function Uf(n){let i=wg(n);return i.map((l,s)=>s===i.length-1?l.pathname:l.pathnameBase)}function Lf(n,i,l,s=!1){let c;typeof n=="string"?c=yi(n):(c={...n},Le(!c.pathname||!c.pathname.includes("?"),Zc("?","pathname","search",c)),Le(!c.pathname||!c.pathname.includes("#"),Zc("#","pathname","hash",c)),Le(!c.search||!c.search.includes("#"),Zc("#","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 E=d.split("/");for(;E[0]==="..";)E.shift(),g-=1;c.pathname=E.join("/")}p=g>=0?i[g]:"/"}let y=O1(c,p),m=d&&d!=="/"&&d.endsWith("/"),b=(f||d===".")&&l.endsWith("/");return!y.pathname.endsWith("/")&&(m||b)&&(y.pathname+="/"),y}var ua=n=>n.join("/").replace(/\/\/+/g,"/"),M1=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),D1=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,N1=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Xl=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 Gl(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Fl(n){return n.map(i=>i.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Eg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function xg(n,i){let l=n;if(typeof l!="string"||!Sg.test(l))return{absoluteURL:void 0,isExternal:!1,to:l};let s=l,c=!1;if(Eg)try{let f=new URL(window.location.href),d=l.startsWith("//")?new URL(f.protocol+l):new URL(l),p=Yn(d.pathname,i);d.origin===f.origin&&p!=null?l=p+d.search+d.hash:c=!0}catch{Nt(!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 fi=Symbol("Uninstrumented");function z1(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=Nr(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=Nr(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[fi]??f,p=Nr(l[c],d,(...y)=>hy(y[0]));p&&(c==="loader"&&d.hydrate===!0&&(p.hydrate=!0),p[fi]=d,s[c]=p)}}),i.middleware&&i.middleware.length>0&&l.middleware.length>0&&(s.middleware=i.middleware.map(c=>{let f=c[fi]??c,d=Nr(l.middleware,f,(...p)=>hy(p[0]));return d?(d[fi]=f,d):c})),s}function k1(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[fi]??n.navigate,c=Nr(l.navigate,s,(...f)=>{let[d,p]=f;return{to:typeof d=="number"||typeof d=="string"?d:d?ca(d):".",...my(n,p??{})}});c&&(c[fi]=s,n.navigate=c)}if(l.fetch.length>0){let s=n.fetch[fi]??n.fetch,c=Nr(l.fetch,s,(...f)=>{let[d,,p,y]=f;return{href:p??".",fetcherKey:d,...my(n,y??{})}});c&&(c[fi]=s,n.fetch=c)}return n}function Nr(n,i,l){return n.length===0?null:async(...s)=>{let c=await Tg(n,l(...s),()=>i(...s),n.length-1);if(c.type==="error")throw c.value;return c.value}}async function Tg(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=Tg(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 hy(n){let{request:i,context:l,params:s,unstable_pattern:c}=n;return{request:U1(i),params:{...s},unstable_pattern:c,context:L1(l)}}function my(n,i){return{currentUrl:ca(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 U1(n){return{method:n.method,url:n.url,headers:{get:(...i)=>n.headers.get(...i)}}}function L1(n){if(B1(n)){let i={...n};return Object.freeze(i),i}else return{get:i=>n.get(i)}}var j1=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function B1(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")===j1}var Rg=["POST","PUT","PATCH","DELETE"],q1=new Set(Rg),H1=["GET",...Rg],Q1=new Set(H1),_g=new Set([301,302,303,307,308]),Y1=new Set([307,308]),Jc={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},V1={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Dl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},G1=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),Ag="remix-router-transitions",Cg=Symbol("ResetLoaderData");function K1(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||G1,f=c;if(n.unstable_instrumentations){let S=n.unstable_instrumentations;f=_=>({...c(_),...z1(S.map(k=>k.route).filter(Boolean),_)})}let d={},p=Vl(n.routes,f,void 0,d),y,m=n.basename||"/";m.startsWith("/")||(m=`/${m}`);let b=n.dataStrategy||J1,g={...n.future},E=null,M=new Set,U=null,j=null,K=null,G=n.hydrationData!=null,J=ui(p,n.history.location,m),$=!1,ge=null,he;if(J==null&&!n.patchRoutesOnNavigation){let S=qn(404,{pathname:n.history.location.pathname}),{matches:_,route:k}=co(p);he=!0,J=_,ge={[k.id]:S}}else if(J&&!n.hydrationData&&Et(J,p,n.history.location.pathname).active&&(J=null),J)if(J.some(S=>S.route.lazy))he=!1;else if(!J.some(S=>jf(S.route)))he=!0;else{let S=n.hydrationData?n.hydrationData.loaderData:null,_=n.hydrationData?n.hydrationData.errors:null;if(_){let k=J.findIndex(I=>_[I.route.id]!==void 0);he=J.slice(0,k+1).every(I=>!gf(I.route,S,_))}else he=J.every(k=>!gf(k.route,S,_))}else{he=!1,J=[];let S=Et(null,p,n.history.location.pathname);S.active&&S.matches&&($=!0,J=S.matches)}let me,A={historyAction:n.history.action,location:n.history.location,matches:J,initialized:he,navigation:Jc,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||ge,fetchers:new Map,blockers:new Map},V="POP",oe=null,Ce=!1,Ae,Te=!1,ke=new Map,Ue=null,we=!1,C=!1,P=new Set,q=new Map,ye=0,ve=-1,x=new Map,H=new Set,B=new Map,Z=new Map,te=new Set,ue=new Map,ce,Re=null;function Qe(){if(E=n.history.listen(({action:S,location:_,delta:k})=>{if(ce){ce(),ce=void 0;return}Nt(ue.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 I=pa({currentLocation:A.location,nextLocation:_,historyAction:S});if(I&&k!=null){let W=new Promise(pe=>{ce=pe});n.history.go(k*-1),Kn(I,{state:"blocked",location:_,proceed(){Kn(I,{state:"proceeding",proceed:void 0,reset:void 0,location:_}),W.then(()=>n.history.go(k))},reset(){let pe=new Map(A.blockers);pe.set(I,Dl),Je({blockers:pe})}}),oe?.resolve(),oe=null;return}return an(S,_)}),l){mw(i,ke);let S=()=>pw(i,ke);i.addEventListener("pagehide",S),Ue=()=>i.removeEventListener("pagehide",S)}return A.initialized||an("POP",A.location,{initialHydration:!0}),me}function Ht(){E&&E(),Ue&&Ue(),M.clear(),Ae&&Ae.abort(),A.fetchers.forEach((S,_)=>An(_)),A.blockers.forEach((S,_)=>pn(_))}function $t(S){return M.add(S),()=>M.delete(S)}function Je(S,_={}){S.matches&&(S.matches=S.matches.map(W=>{let pe=d[W.route.id],ae=W.route;return ae.element!==pe.element||ae.errorElement!==pe.errorElement||ae.hydrateFallbackElement!==pe.hydrateFallbackElement?{...W,route:pe}:W})),A={...A,...S};let k=[],I=[];A.fetchers.forEach((W,pe)=>{W.state==="idle"&&(te.has(pe)?k.push(pe):I.push(pe))}),te.forEach(W=>{!A.fetchers.has(W)&&!q.has(W)&&k.push(W)}),[...M].forEach(W=>W(A,{deletedFetchers:k,newErrors:S.errors??null,viewTransitionOpts:_.viewTransitionOpts,flushSync:_.flushSync===!0})),k.forEach(W=>An(W)),I.forEach(W=>A.fetchers.delete(W))}function Gn(S,_,{flushSync:k}={}){let I=A.actionData!=null&&A.navigation.formMethod!=null&&It(A.navigation.formMethod)&&A.navigation.state==="loading"&&S.state?._isRedirect!==!0,W;_.actionData?Object.keys(_.actionData).length>0?W=_.actionData:W=null:I?W=A.actionData:W=null;let pe=_.loaderData?Ty(A.loaderData,_.loaderData,_.matches||[],_.errors):A.loaderData,ae=A.blockers;ae.size>0&&(ae=new Map(ae),ae.forEach((Ee,be)=>ae.set(be,Dl)));let ne=we?!1:wt(S,_.matches||A.matches),ie=Ce===!0||A.navigation.formMethod!=null&&It(A.navigation.formMethod)&&S.state?._isRedirect!==!0;y&&(p=y,y=void 0),we||V==="POP"||(V==="PUSH"?n.history.push(S,S.state):V==="REPLACE"&&n.history.replace(S,S.state));let de;if(V==="POP"){let Ee=ke.get(A.location.pathname);Ee&&Ee.has(S.pathname)?de={currentLocation:A.location,nextLocation:S}:ke.has(S.pathname)&&(de={currentLocation:S,nextLocation:A.location})}else if(Te){let Ee=ke.get(A.location.pathname);Ee?Ee.add(S.pathname):(Ee=new Set([S.pathname]),ke.set(A.location.pathname,Ee)),de={currentLocation:A.location,nextLocation:S}}Je({..._,actionData:W,loaderData:pe,historyAction:V,location:S,initialized:!0,navigation:Jc,revalidation:"idle",restoreScrollPosition:ne,preventScrollReset:ie,blockers:ae},{viewTransitionOpts:de,flushSync:k===!0}),V="POP",Ce=!1,Te=!1,we=!1,C=!1,oe?.resolve(),oe=null,Re?.resolve(),Re=null}async function nn(S,_){if(oe?.resolve(),oe=null,typeof S=="number"){oe||(oe=Cy());let Ye=oe.promise;return n.history.go(S),Ye}let k=yf(A.location,A.matches,m,S,_?.fromRouteId,_?.relative),{path:I,submission:W,error:pe}=py(!1,k,_),ae=A.location,ne=Yl(A.location,I,_&&_.state);ne={...ne,...n.history.encodeLocation(ne)};let ie=_&&_.replace!=null?_.replace:void 0,de="PUSH";ie===!0?de="REPLACE":ie===!1||W!=null&&It(W.formMethod)&&W.formAction===A.location.pathname+A.location.search&&(de="REPLACE");let Ee=_&&"preventScrollReset"in _?_.preventScrollReset===!0:void 0,be=(_&&_.flushSync)===!0,Ze=pa({currentLocation:ae,nextLocation:ne,historyAction:de});if(Ze){Kn(Ze,{state:"blocked",location:ne,proceed(){Kn(Ze,{state:"proceeding",proceed:void 0,reset:void 0,location:ne}),nn(S,_)},reset(){let Ye=new Map(A.blockers);Ye.set(Ze,Dl),Je({blockers:Ye})}});return}await an(de,ne,{submission:W,pendingError:pe,preventScrollReset:Ee,replace:_&&_.replace,enableViewTransition:_&&_.viewTransition,flushSync:be,callSiteDefaultShouldRevalidate:_&&_.unstable_defaultShouldRevalidate})}function gi(){Re||(Re=Cy()),Ba(),Je({revalidation:"loading"});let S=Re.promise;return A.navigation.state==="submitting"?S:A.navigation.state==="idle"?(an(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),S):(an(V||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:Te===!0}),S)}async function an(S,_,k){Ae&&Ae.abort(),Ae=null,V=S,we=(k&&k.startUninterruptedRevalidation)===!0,lt(A.location,A.matches),Ce=(k&&k.preventScrollReset)===!0,Te=(k&&k.enableViewTransition)===!0;let I=y||p,W=k&&k.overrideNavigation,pe=k?.initialHydration&&A.matches&&A.matches.length>0&&!$?A.matches:ui(I,_,m),ae=(k&&k.flushSync)===!0;if(pe&&A.initialized&&!C&&iw(A.location,_)&&!(k&&k.submission&&It(k.submission.formMethod))){Gn(_,{matches:pe},{flushSync:ae});return}let ne=Et(pe,I,_.pathname);if(ne.active&&ne.matches&&(pe=ne.matches),!pe){let{error:gt,notFoundMatches:vt,route:Ve}=Xn(_.pathname);Gn(_,{matches:vt,loaderData:{},errors:{[Ve.id]:gt}},{flushSync:ae});return}Ae=new AbortController;let ie=Dr(n.history,_,Ae.signal,k&&k.submission),de=n.getContext?await n.getContext():new uy,Ee;if(k&&k.pendingError)Ee=[ci(pe).route.id,{type:"error",error:k.pendingError}];else if(k&&k.submission&&It(k.submission.formMethod)){let gt=await da(ie,_,k.submission,pe,de,ne.active,k&&k.initialHydration===!0,{replace:k.replace,flushSync:ae});if(gt.shortCircuited)return;if(gt.pendingActionResult){let[vt,Ve]=gt.pendingActionResult;if(Rn(Ve)&&Gl(Ve.error)&&Ve.error.status===404){Ae=null,Gn(_,{matches:gt.matches,loaderData:{},errors:{[vt]:Ve.error}});return}}pe=gt.matches||pe,Ee=gt.pendingActionResult,W=Ic(_,k.submission),ae=!1,ne.active=!1,ie=Dr(n.history,ie.url,ie.signal)}let{shortCircuited:be,matches:Ze,loaderData:Ye,errors:pt}=await vi(ie,_,pe,de,ne.active,W,k&&k.submission,k&&k.fetcherSubmission,k&&k.replace,k&&k.initialHydration===!0,ae,Ee,k&&k.callSiteDefaultShouldRevalidate);be||(Ae=null,Gn(_,{matches:Ze||pe,...Ry(Ee),loaderData:Ye,errors:pt}))}async function da(S,_,k,I,W,pe,ae,ne={}){Ba();let ie=dw(_,k);if(Je({navigation:ie},{flushSync:ne.flushSync===!0}),pe){let be=await yn(I,_.pathname,S.signal);if(be.type==="aborted")return{shortCircuited:!0};if(be.type==="error"){if(be.partialMatches.length===0){let{matches:Ye,route:pt}=co(p);return{matches:Ye,pendingActionResult:[pt.id,{type:"error",error:be.error}]}}let Ze=ci(be.partialMatches).route.id;return{matches:be.partialMatches,pendingActionResult:[Ze,{type:"error",error:be.error}]}}else if(be.matches)I=be.matches;else{let{notFoundMatches:Ze,error:Ye,route:pt}=Xn(_.pathname);return{matches:Ze,pendingActionResult:[pt.id,{type:"error",error:Ye}]}}}let de,Ee=bo(I,_);if(!Ee.route.action&&!Ee.route.lazy)de={type:"error",error:qn(405,{method:S.method,pathname:_.pathname,routeId:Ee.route.id})};else{let be=zr(f,d,S,I,Ee,ae?[]:s,W),Ze=await ha(S,be,W,null);if(de=Ze[Ee.route.id],!de){for(let Ye of I)if(Ze[Ye.route.id]){de=Ze[Ye.route.id];break}}if(S.signal.aborted)return{shortCircuited:!0}}if(Vi(de)){let be;return ne&&ne.replace!=null?be=ne.replace:be=wy(de.response.headers.get("Location"),new URL(S.url),m,n.history)===A.location.pathname+A.location.search,await mt(S,de,!0,{submission:k,replace:be}),{shortCircuited:!0}}if(Rn(de)){let be=ci(I,Ee.route.id);return(ne&&ne.replace)!==!0&&(V="PUSH"),{matches:I,pendingActionResult:[be.route.id,de,Ee.route.id]}}return{matches:I,pendingActionResult:[Ee.route.id,de]}}async function vi(S,_,k,I,W,pe,ae,ne,ie,de,Ee,be,Ze){let Ye=pe||Ic(_,ae),pt=ae||ne||Ay(Ye),gt=!we&&!de;if(W){if(gt){let xt=Pt(be);Je({navigation:Ye,...xt!==void 0?{actionData:xt}:{}},{flushSync:Ee})}let Ge=await yn(k,_.pathname,S.signal);if(Ge.type==="aborted")return{shortCircuited:!0};if(Ge.type==="error"){if(Ge.partialMatches.length===0){let{matches:Zn,route:Vt}=co(p);return{matches:Zn,loaderData:{},errors:{[Vt.id]:Ge.error}}}let xt=ci(Ge.partialMatches).route.id;return{matches:Ge.partialMatches,loaderData:{},errors:{[xt]:Ge.error}}}else if(Ge.matches)k=Ge.matches;else{let{error:xt,notFoundMatches:Zn,route:Vt}=Xn(_.pathname);return{matches:Zn,loaderData:{},errors:{[Vt.id]:xt}}}}let vt=y||p,{dsMatches:Ve,revalidatingFetchers:jt}=yy(S,I,f,d,n.history,A,k,pt,_,de?[]:s,de===!0,C,P,te,B,H,vt,m,n.patchRoutesOnNavigation!=null,be,Ze);if(ve=++ye,!n.dataStrategy&&!Ve.some(Ge=>Ge.shouldLoad)&&!Ve.some(Ge=>Ge.route.middleware&&Ge.route.middleware.length>0)&&jt.length===0){let Ge=zt();return Gn(_,{matches:k,loaderData:{},errors:be&&Rn(be[1])?{[be[0]]:be[1].error}:null,...Ry(be),...Ge?{fetchers:new Map(A.fetchers)}:{}},{flushSync:Ee}),{shortCircuited:!0}}if(gt){let Ge={};if(!W){Ge.navigation=Ye;let xt=Pt(be);xt!==void 0&&(Ge.actionData=xt)}jt.length>0&&(Ge.fetchers=bi(jt)),Je(Ge,{flushSync:Ee})}jt.forEach(Ge=>{ut(Ge.key),Ge.controller&&q.set(Ge.key,Ge.controller)});let ln=()=>jt.forEach(Ge=>ut(Ge.key));Ae&&Ae.signal.addEventListener("abort",ln);let{loaderResults:dt,fetcherResults:Fn}=await na(Ve,jt,S,I);if(S.signal.aborted)return{shortCircuited:!0};Ae&&Ae.signal.removeEventListener("abort",ln),jt.forEach(Ge=>q.delete(Ge.key));let gn=fo(dt);if(gn)return await mt(S,gn.result,!0,{replace:ie}),{shortCircuited:!0};if(gn=fo(Fn),gn)return H.add(gn.key),await mt(S,gn.result,!0,{replace:ie}),{shortCircuited:!0};let{loaderData:Pn,errors:On}=xy(A,k,dt,be,jt,Fn);de&&A.errors&&(On={...A.errors,...On});let ga=zt(),Ei=Ji(ve),xi=ga||Ei||jt.length>0;return{matches:k,loaderData:Pn,errors:On,...xi?{fetchers:new Map(A.fetchers)}:{}}}function Pt(S){if(S&&!Rn(S[1]))return{[S[0]]:S[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function bi(S){return S.forEach(_=>{let k=A.fetchers.get(_.key),I=Nl(void 0,k?k.data:void 0);A.fetchers.set(_.key,I)}),new Map(A.fetchers)}async function Si(S,_,k,I){ut(S);let W=(I&&I.flushSync)===!0,pe=y||p,ae=yf(A.location,A.matches,m,k,_,I?.relative),ne=ui(pe,ae,m),ie=Et(ne,pe,ae);if(ie.active&&ie.matches&&(ne=ie.matches),!ne){Wt(S,_,qn(404,{pathname:ae}),{flushSync:W});return}let{path:de,submission:Ee,error:be}=py(!0,ae,I);if(be){Wt(S,_,be,{flushSync:W});return}let Ze=n.getContext?await n.getContext():new uy,Ye=(I&&I.preventScrollReset)===!0;if(Ee&&It(Ee.formMethod)){await Qt(S,_,de,ne,Ze,ie.active,W,Ye,Ee,I&&I.unstable_defaultShouldRevalidate);return}B.set(S,{routeId:_,path:de}),await ta(S,_,de,ne,Ze,ie.active,W,Ye,Ee)}async function Qt(S,_,k,I,W,pe,ae,ne,ie,de){Ba(),B.delete(S);let Ee=A.fetchers.get(S);Yt(S,hw(ie,Ee),{flushSync:ae});let be=new AbortController,Ze=Dr(n.history,k,be.signal,ie);if(pe){let Ke=await yn(I,new URL(Ze.url).pathname,Ze.signal,S);if(Ke.type==="aborted")return;if(Ke.type==="error"){Wt(S,_,Ke.error,{flushSync:ae});return}else if(Ke.matches)I=Ke.matches;else{Wt(S,_,qn(404,{pathname:k}),{flushSync:ae});return}}let Ye=bo(I,k);if(!Ye.route.action&&!Ye.route.lazy){let Ke=qn(405,{method:ie.formMethod,pathname:k,routeId:_});Wt(S,_,Ke,{flushSync:ae});return}q.set(S,be);let pt=ye,gt=zr(f,d,Ze,I,Ye,s,W),vt=await ha(Ze,gt,W,S),Ve=vt[Ye.route.id];if(!Ve){for(let Ke of gt)if(vt[Ke.route.id]){Ve=vt[Ke.route.id];break}}if(Ze.signal.aborted){q.get(S)===be&&q.delete(S);return}if(te.has(S)){if(Vi(Ve)||Rn(Ve)){Yt(S,La(void 0));return}}else{if(Vi(Ve))if(q.delete(S),ve>pt){Yt(S,La(void 0));return}else return H.add(S),Yt(S,Nl(ie)),mt(Ze,Ve,!1,{fetcherSubmission:ie,preventScrollReset:ne});if(Rn(Ve)){Wt(S,_,Ve.error);return}}let jt=A.navigation.location||A.location,ln=Dr(n.history,jt,be.signal),dt=y||p,Fn=A.navigation.state!=="idle"?ui(dt,A.navigation.location,m):A.matches;Le(Fn,"Didn't find any matches after fetcher action");let gn=++ye;x.set(S,gn);let Pn=Nl(ie,Ve.data);A.fetchers.set(S,Pn);let{dsMatches:On,revalidatingFetchers:ga}=yy(ln,W,f,d,n.history,A,Fn,ie,jt,s,!1,C,P,te,B,H,dt,m,n.patchRoutesOnNavigation!=null,[Ye.route.id,Ve],de);ga.filter(Ke=>Ke.key!==S).forEach(Ke=>{let Ti=Ke.key,Il=A.fetchers.get(Ti),Qr=Nl(void 0,Il?Il.data:void 0);A.fetchers.set(Ti,Qr),ut(Ti),Ke.controller&&q.set(Ti,Ke.controller)}),Je({fetchers:new Map(A.fetchers)});let Ei=()=>ga.forEach(Ke=>ut(Ke.key));be.signal.addEventListener("abort",Ei);let{loaderResults:xi,fetcherResults:Ge}=await na(On,ga,ln,W);if(be.signal.aborted)return;if(be.signal.removeEventListener("abort",Ei),x.delete(S),q.delete(S),ga.forEach(Ke=>q.delete(Ke.key)),A.fetchers.has(S)){let Ke=La(Ve.data);A.fetchers.set(S,Ke)}let xt=fo(xi);if(xt)return mt(ln,xt.result,!1,{preventScrollReset:ne});if(xt=fo(Ge),xt)return H.add(xt.key),mt(ln,xt.result,!1,{preventScrollReset:ne});let{loaderData:Zn,errors:Vt}=xy(A,Fn,xi,void 0,ga,Ge);Ji(gn),A.navigation.state==="loading"&&gn>ve?(Le(V,"Expected pending action"),Ae&&Ae.abort(),Gn(A.navigation.location,{matches:Fn,loaderData:Zn,errors:Vt,fetchers:new Map(A.fetchers)})):(Je({errors:Vt,loaderData:Ty(A.loaderData,Zn,Fn,Vt),fetchers:new Map(A.fetchers)}),C=!1)}async function ta(S,_,k,I,W,pe,ae,ne,ie){let de=A.fetchers.get(S);Yt(S,Nl(ie,de?de.data:void 0),{flushSync:ae});let Ee=new AbortController,be=Dr(n.history,k,Ee.signal);if(pe){let Ve=await yn(I,new URL(be.url).pathname,be.signal,S);if(Ve.type==="aborted")return;if(Ve.type==="error"){Wt(S,_,Ve.error,{flushSync:ae});return}else if(Ve.matches)I=Ve.matches;else{Wt(S,_,qn(404,{pathname:k}),{flushSync:ae});return}}let Ze=bo(I,k);q.set(S,Ee);let Ye=ye,pt=zr(f,d,be,I,Ze,s,W),vt=(await ha(be,pt,W,S))[Ze.route.id];if(q.get(S)===Ee&&q.delete(S),!be.signal.aborted){if(te.has(S)){Yt(S,La(void 0));return}if(Vi(vt))if(ve>Ye){Yt(S,La(void 0));return}else{H.add(S),await mt(be,vt,!1,{preventScrollReset:ne});return}if(Rn(vt)){Wt(S,_,vt.error);return}Yt(S,La(vt.data))}}async function mt(S,_,k,{submission:I,fetcherSubmission:W,preventScrollReset:pe,replace:ae}={}){k||(oe?.resolve(),oe=null),_.response.headers.has("X-Remix-Revalidate")&&(C=!0);let ne=_.response.headers.get("Location");Le(ne,"Expected a Location header on the redirect Response"),ne=wy(ne,new URL(S.url),m,n.history);let ie=Yl(A.location,ne,{_isRedirect:!0});if(l){let pt=!1;if(_.response.headers.has("X-Remix-Reload-Document"))pt=!0;else if(kf(ne)){const gt=gg(ne,!0);pt=gt.origin!==i.location.origin||Yn(gt.pathname,m)==null}if(pt){ae?i.location.replace(ne):i.location.assign(ne);return}}Ae=null;let de=ae===!0||_.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ee,formAction:be,formEncType:Ze}=A.navigation;!I&&!W&&Ee&&be&&Ze&&(I=Ay(A.navigation));let Ye=I||W;if(Y1.has(_.response.status)&&Ye&&It(Ye.formMethod))await an(de,ie,{submission:{...Ye,formAction:ne},preventScrollReset:pe||Ce,enableViewTransition:k?Te:void 0});else{let pt=Ic(ie,I);await an(de,ie,{overrideNavigation:pt,fetcherSubmission:W,preventScrollReset:pe||Ce,enableViewTransition:k?Te:void 0})}}async function ha(S,_,k,I){let W,pe={};try{W=await $1(b,S,_,I,k,!1)}catch(ae){return _.filter(ne=>ne.shouldLoad).forEach(ne=>{pe[ne.route.id]={type:"error",error:ae}}),pe}if(S.signal.aborted)return pe;if(!It(S.method))for(let ae of _){if(W[ae.route.id]?.type==="error")break;!W.hasOwnProperty(ae.route.id)&&!A.loaderData.hasOwnProperty(ae.route.id)&&(!A.errors||!A.errors.hasOwnProperty(ae.route.id))&&ae.shouldCallHandler()&&(W[ae.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ae.route.id}`)})}for(let[ae,ne]of Object.entries(W))if(ow(ne)){let ie=ne.result;pe[ae]={type:"redirect",response:nw(ie,S,ae,_,m)}}else pe[ae]=await tw(ne);return pe}async function na(S,_,k,I){let W=ha(k,S,I,null),pe=Promise.all(_.map(async ie=>{if(ie.matches&&ie.match&&ie.request&&ie.controller){let Ee=(await ha(ie.request,ie.matches,I,ie.key))[ie.match.route.id];return{[ie.key]:Ee}}else return Promise.resolve({[ie.key]:{type:"error",error:qn(404,{pathname:ie.path})}})})),ae=await W,ne=(await pe).reduce((ie,de)=>Object.assign(ie,de),{});return{loaderResults:ae,fetcherResults:ne}}function Ba(){C=!0,B.forEach((S,_)=>{q.has(_)&&P.add(_),ut(_)})}function Yt(S,_,k={}){A.fetchers.set(S,_),Je({fetchers:new Map(A.fetchers)},{flushSync:(k&&k.flushSync)===!0})}function Wt(S,_,k,I={}){let W=ci(A.matches,_);An(S),Je({errors:{[W.route.id]:k},fetchers:new Map(A.fetchers)},{flushSync:(I&&I.flushSync)===!0})}function _n(S){return Z.set(S,(Z.get(S)||0)+1),te.has(S)&&te.delete(S),A.fetchers.get(S)||V1}function Zi(S,_){ut(S,_?.reason),Yt(S,La(null))}function An(S){let _=A.fetchers.get(S);q.has(S)&&!(_&&_.state==="loading"&&x.has(S))&&ut(S),B.delete(S),x.delete(S),H.delete(S),te.delete(S),P.delete(S),A.fetchers.delete(S)}function ma(S){let _=(Z.get(S)||0)-1;_<=0?(Z.delete(S),te.add(S)):Z.set(S,_),Je({fetchers:new Map(A.fetchers)})}function ut(S,_){let k=q.get(S);k&&(k.abort(_),q.delete(S))}function rn(S){for(let _ of S){let k=_n(_),I=La(k.data);A.fetchers.set(_,I)}}function zt(){let S=[],_=!1;for(let k of H){let I=A.fetchers.get(k);Le(I,`Expected fetcher: ${k}`),I.state==="loading"&&(H.delete(k),S.push(k),_=!0)}return rn(S),_}function Ji(S){let _=[];for(let[k,I]of x)if(I<S){let W=A.fetchers.get(k);Le(W,`Expected fetcher: ${k}`),W.state==="loading"&&(ut(k),x.delete(k),_.push(k))}return rn(_),_.length>0}function wi(S,_){let k=A.blockers.get(S)||Dl;return ue.get(S)!==_&&ue.set(S,_),k}function pn(S){A.blockers.delete(S),ue.delete(S)}function Kn(S,_){let k=A.blockers.get(S)||Dl;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 I=new Map(A.blockers);I.set(S,_),Je({blockers:I})}function pa({currentLocation:S,nextLocation:_,historyAction:k}){if(ue.size===0)return;ue.size>1&&Nt(!1,"A router only supports one blocker at a time");let I=Array.from(ue.entries()),[W,pe]=I[I.length-1],ae=A.blockers.get(W);if(!(ae&&ae.state==="proceeding")&&pe({currentLocation:S,nextLocation:_,historyAction:k}))return W}function Xn(S){let _=qn(404,{pathname:S}),k=y||p,{matches:I,route:W}=co(k);return{notFoundMatches:I,route:W,error:_}}function Cn(S,_,k){if(U=S,K=_,j=k||null,!G&&A.navigation===Jc){G=!0;let I=wt(A.location,A.matches);I!=null&&Je({restoreScrollPosition:I})}return()=>{U=null,K=null,j=null}}function _e(S,_){return j&&j(S,_.map(I=>p1(I,A.loaderData)))||S.key}function lt(S,_){if(U&&K){let k=_e(S,_);U[k]=K()}}function wt(S,_){if(U){let k=_e(S,_),I=U[k];if(typeof I=="number")return I}return null}function Et(S,_,k){if(n.patchRoutesOnNavigation)if(S){if(Object.keys(S[0].params).length>0)return{active:!0,matches:jl(_,k,m,!0)}}else return{active:!0,matches:jl(_,k,m,!0)||[]};return{active:!1,matches:null}}async function yn(S,_,k,I){if(!n.patchRoutesOnNavigation)return{type:"success",matches:S};let W=S;for(;;){let pe=y==null,ae=y||p,ne=d;try{await n.patchRoutesOnNavigation({signal:k,path:_,matches:W,fetcherKey:I,patch:(Ee,be)=>{k.aborted||gy(Ee,be,ae,ne,f,!1)}})}catch(Ee){return{type:"error",error:Ee,partialMatches:W}}finally{pe&&!k.aborted&&(p=[...p])}if(k.aborted)return{type:"aborted"};let ie=ui(ae,_,m),de=null;if(ie){if(Object.keys(ie[0].params).length===0)return{type:"success",matches:ie};if(de=jl(ae,_,m,!0),!(de&&W.length<de.length&&st(W,de.slice(0,W.length))))return{type:"success",matches:ie}}if(de||(de=jl(ae,_,m,!0)),!de||st(W,de))return{type:"success",matches:null};W=de}}function st(S,_){return S.length===_.length&&S.every((k,I)=>k.route.id===_[I].route.id)}function Zt(S){d={},y=Vl(S,f,void 0,d)}function ya(S,_,k=!1){let I=y==null;gy(S,_,y||p,d,f,k),I&&(p=[...p],Je({}))}return me={get basename(){return m},get future(){return g},get state(){return A},get routes(){return p},get window(){return i},initialize:Qe,subscribe:$t,enableScrollRestoration:Cn,navigate:nn,fetch:Si,revalidate:gi,createHref:S=>n.history.createHref(S),encodeLocation:S=>n.history.encodeLocation(S),getFetcher:_n,resetFetcher:Zi,deleteFetcher:ma,dispose:Ht,getBlocker:wi,deleteBlocker:pn,patchRoutes:ya,_internalFetchControllers:q,_internalSetRoutes:Zt,_internalSetStateDoNotUseOrYouWillBreakYourApp(S){Je(S)}},n.unstable_instrumentations&&(me=k1(me,n.unstable_instrumentations.map(S=>S.router).filter(Boolean))),me}function X1(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function yf(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=Lf(s||".",Uf(d),Yn(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=qf(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 E=b.toString();y.search=E?`?${E}`:""}}return l!=="/"&&(y.pathname=C1({basename:l,pathname:y.pathname})),ca(y)}function py(n,i,l){if(!l||!X1(l))return{path:i};if(l.formMethod&&!fw(l.formMethod))return{path:i,error:qn(405,{method:l.formMethod})};let s=()=>({path:i,error:qn(400,{type:"invalid-body"})}),f=(l.formMethod||"get").toUpperCase(),d=kg(i);if(l.body!==void 0){if(l.formEncType==="text/plain"){if(!It(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((E,[M,U])=>`${E}${M}=${U}
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(!It(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=bf(l.formData),y=l.formData;else if(l.body instanceof FormData)p=bf(l.body),y=l.body;else if(l.body instanceof URLSearchParams)p=l.body,y=Ey(p);else if(l.body==null)p=new URLSearchParams,y=new FormData;else try{p=new URLSearchParams(l.body),y=Ey(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(It(m.formMethod))return{path:i,submission:m};let b=yi(i);return n&&b.search&&qf(b.search)&&p.append("index",""),b.search=`?${p}`,{path:ca(b),submission:m}}function yy(n,i,l,s,c,f,d,p,y,m,b,g,E,M,U,j,K,G,J,$,ge){let he=$?Rn($[1])?$[1].error:$[1].data:void 0,me=c.createURL(f.location),A=c.createURL(y),V;if(b&&f.errors){let we=Object.keys(f.errors)[0];V=d.findIndex(C=>C.route.id===we)}else if($&&Rn($[1])){let we=$[0];V=d.findIndex(C=>C.route.id===we)-1}let oe=$?$[1].statusCode:void 0,Ce=oe&&oe>=400,Ae={currentUrl:me,currentParams:f.matches[0]?.params||{},nextUrl:A,nextParams:d[0].params,...p,actionResult:he,actionStatus:oe},Te=Fl(d),ke=d.map((we,C)=>{let{route:P}=we,q=null;if(V!=null&&C>V?q=!1:P.lazy?q=!0:jf(P)?b?q=gf(P,f.loaderData,f.errors):F1(f.loaderData,f.matches[C],we)&&(q=!0):q=!1,q!==null)return vf(l,s,n,Te,we,m,i,q);let ye=!1;typeof ge=="boolean"?ye=ge:Ce?ye=!1:(g||me.pathname+me.search===A.pathname+A.search||me.search!==A.search||P1(f.matches[C],we))&&(ye=!0);let ve={...Ae,defaultShouldRevalidate:ye},x=Hl(we,ve);return vf(l,s,n,Te,we,m,i,x,ve,ge)}),Ue=[];return U.forEach((we,C)=>{if(b||!d.some(Z=>Z.route.id===we.routeId)||M.has(C))return;let P=f.fetchers.get(C),q=P&&P.state!=="idle"&&P.data===void 0,ye=ui(K,we.path,G);if(!ye){if(J&&q)return;Ue.push({key:C,routeId:we.routeId,path:we.path,matches:null,match:null,request:null,controller:null});return}if(j.has(C))return;let ve=bo(ye,we.path),x=new AbortController,H=Dr(c,we.path,x.signal),B=null;if(E.has(C))E.delete(C),B=zr(l,s,H,ye,ve,m,i);else if(q)g&&(B=zr(l,s,H,ye,ve,m,i));else{let Z;typeof ge=="boolean"?Z=ge:Ce?Z=!1:Z=g;let te={...Ae,defaultShouldRevalidate:Z};Hl(ve,te)&&(B=zr(l,s,H,ye,ve,m,i,te))}B&&Ue.push({key:C,routeId:we.routeId,path:we.path,matches:B,match:ve,request:H,controller:x})}),{dsMatches:ke,revalidatingFetchers:Ue}}function jf(n){return n.loader!=null||n.middleware!=null&&n.middleware.length>0}function gf(n,i,l){if(n.lazy)return!0;if(!jf(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 F1(n,i,l){let s=!i||l.route.id!==i.route.id,c=!n.hasOwnProperty(l.route.id);return s||c}function P1(n,i){let l=n.route.path;return n.pathname!==i.pathname||l!=null&&l.endsWith("*")&&n.params["*"]!==i.params["*"]}function Hl(n,i){if(n.route.shouldRevalidate){let l=n.route.shouldRevalidate(i);if(typeof l=="boolean")return l}return i.defaultShouldRevalidate}function gy(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=>Og(m,g));b?y.push({existingRoute:b,newRoute:m}):p.push(m)}),p.length>0){let m=Vl(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],E=b,[M]=Vl([g],c,[],{},!0);Object.assign(E,{element:M.element?M.element:E.element,errorElement:M.errorElement?M.errorElement:E.errorElement,hydrateFallbackElement:M.hydrateFallbackElement?M.hydrateFallbackElement:E.hydrateFallbackElement})}}function Og(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=>Og(l,c))):!1}var vy=new WeakMap,Mg=({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=vy.get(c);d||(d={},vy.set(c,d));let p=d[n];if(p)return p;let y=(async()=>{let m=f1(n),g=c[n]!==void 0&&n!=="hasErrorBoundary";if(m)Nt(!m,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),d[n]=Promise.resolve();else if(g)Nt(!1,`Route "${c.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let E=await f();E!=null&&(Object.assign(c,{[n]:E}),Object.assign(c,s(c)))}typeof c.lazy=="object"&&(c.lazy[n]=void 0,Object.values(c.lazy).every(E=>E===void 0)&&(c.lazy=void 0))})();return d[n]=y,y},by=new WeakMap;function Z1(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=by.get(f);if(b)return{lazyRoutePromise:b,lazyHandlerPromise:b};let g=(async()=>{Le(typeof n.lazy=="function","No lazy route function found");let E=await n.lazy(),M={};for(let U in E){let j=E[U];if(j===void 0)continue;let K=h1(U),J=f[U]!==void 0&&U!=="hasErrorBoundary";K?Nt(!K,"Route property "+U+" is not a supported property to be returned from a lazy route function. This property will be ignored."):J?Nt(!J,`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]=j}Object.assign(f,M),Object.assign(f,{...s(f),lazy:void 0})})();return by.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=Mg({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 Sy(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 J1(n){return n.matches.some(i=>i.route.middleware)?Dg(n,()=>Sy(n)):Sy(n)}function Dg(n,i){return I1(n,i,s=>{if(cw(s))throw s;return s},lw,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=ci(d,d[p].route.id).route.id;return Promise.resolve({[y]:{type:"error",result:s}})}}}async function I1(n,i,l,s,c){let{matches:f,request:d,params:p,context:y,unstable_pattern:m}=n,b=f.flatMap(E=>E.route.middleware?E.route.middleware.map(M=>[E.route.id,M]):[]);return await Ng({request:d,params:p,context:y,unstable_pattern:m},b,i,l,s,c)}async function Ng(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,E=async()=>{if(g)throw new Error("You may only call `next()` once per middleware");try{return g={value:await Ng(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,E),U=M!=null?s(M):void 0;return c(U)?U:g?U??g.value:(g={value:await E()},g.value)}catch(M){return await f(M,m,g)}}function zg(n,i,l,s,c){let f=Mg({key:"middleware",route:s.route,manifest:i,mapRouteProperties:n}),d=Z1(s.route,It(l.method)?"action":"loader",i,n,c);return{middleware:f,route:d.lazyRoutePromise,handler:d.lazyHandlerPromise}}function vf(n,i,l,s,c,f,d,p,y=null,m){let b=!1,g=zg(n,i,l,c,f);return{...c,_lazyPromises:g,shouldLoad:p,shouldRevalidateArgs:y,shouldCallHandler(E){return b=!0,y?typeof m=="boolean"?Hl(c,{...y,defaultShouldRevalidate:m}):typeof E=="boolean"?Hl(c,{...y,defaultShouldRevalidate:E}):Hl(c,y):p},resolve(E){let{lazy:M,loader:U,middleware:j}=c.route,K=b||p||E&&!It(l.method)&&(M||U),G=j&&j.length>0&&!U&&!M;return K&&(It(l.method)||!G)?W1({request:l,unstable_pattern:s,match:c,lazyHandlerPromise:g?.handler,lazyRoutePromise:g?.route,handlerOverride:E,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function zr(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:zg(n,i,l,y,f),resolve:()=>Promise.resolve({type:"data",result:void 0})}:vf(n,i,l,Fl(s),y,f,d,!0,p))}async function $1(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:Fl(l),params:l[0].params,context:c,matches:l},y=await n({...d,fetcherKey:s,runClientMiddleware:m=>{let b=d;return Dg(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 W1({request:n,unstable_pattern:i,match:l,lazyHandlerPromise:s,lazyRoutePromise:c,handlerOverride:f,scopedContext:d}){let p,y,m=It(n.method),b=m?"action":"loader",g=E=>{let M,U=new Promise((G,J)=>M=J);y=()=>M(),n.signal.addEventListener("abort",y);let j=G=>typeof E!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${b}" [routeId: ${l.route.id}]`)):E({request:n,unstable_pattern:i,params:l.params,context:d},...G!==void 0?[G]:[]),K=(async()=>{try{return{type:"data",result:await(f?f(J=>j(J)):j())}}catch(G){return{type:"error",result:G}}})();return Promise.race([K,U])};try{let E=m?l.route.action:l.route.loader;if(s||c)if(E){let M,[U]=await Promise.all([g(E).catch(j=>{M=j}),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),j=U.pathname+U.search;throw qn(405,{method:n.method,pathname:j,routeId:l.route.id})}else return{type:"data",result:void 0}}else if(E)p=await g(E);else{let M=new URL(n.url),U=M.pathname+M.search;throw qn(404,{pathname:U})}}catch(E){return{type:"error",result:E}}finally{y&&n.signal.removeEventListener("abort",y)}return p}async function ew(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 tw(n){let{result:i,type:l}=n;if(Bf(i)){let s;try{s=await ew(i)}catch(c){return{type:"error",error:c}}return l==="error"?{type:"error",error:new Xl(i.status,i.statusText,s),statusCode:i.status,headers:i.headers}:{type:"data",data:s,statusCode:i.status,headers:i.headers}}return l==="error"?_y(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:rw(i),statusCode:Gl(i)?i.status:void 0,headers:i.init?.headers?new Headers(i.init.headers):void 0}:{type:"error",error:i,statusCode:Gl(i)?i.status:void 0}:_y(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 nw(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"),!kf(f)){let d=s.slice(0,s.findIndex(p=>p.route.id===l)+1);f=yf(new URL(i.url),d,c,f),n.headers.set("Location",f)}return n}function wy(n,i,l,s){let c=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(kf(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=Yn(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 Dr(n,i,l,s){let c=n.createURL(kg(i)).toString(),f={signal:l};if(s&&It(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=bf(s.formData):f.body=s.formData}return new Request(c,f)}function bf(n){let i=new URLSearchParams;for(let[l,s]of n.entries())i.append(l,typeof s=="string"?s:s.name);return i}function Ey(n){let i=new FormData;for(let[l,s]of n.entries())i.append(l,s);return i}function aw(n,i,l,s=!1,c=!1){let f={},d=null,p,y=!1,m={},b=l&&Rn(l[1])?l[1].error:void 0;return n.forEach(g=>{if(!(g.route.id in i))return;let E=g.route.id,M=i[E];if(Le(!Vi(M),"Cannot handle redirect results in processLoaderData"),Rn(M)){let U=M.error;if(b!==void 0&&(U=b,b=void 0),d=d||{},c)d[E]=U;else{let j=ci(n,E);d[j.route.id]==null&&(d[j.route.id]=U)}s||(f[E]=Cg),y||(y=!0,p=Gl(M.error)?M.error.status:500),M.headers&&(m[E]=M.headers)}else f[E]=M.data,M.statusCode&&M.statusCode!==200&&!y&&(p=M.statusCode),M.headers&&(m[E]=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 xy(n,i,l,s,c,f){let{loaderData:d,errors:p}=aw(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 E=f[m];if(Le(E,"Did not find corresponding fetcher result"),Rn(E)){let M=ci(n.matches,b?.route.id);p&&p[M.route.id]||(p={...p,[M.route.id]:E.error}),n.fetchers.delete(m)}else if(Vi(E))Le(!1,"Unhandled fetcher revalidation redirect");else{let M=La(E.data);n.fetchers.set(m,M)}}),{loaderData:d,errors:p}}function Ty(n,i,l,s){let c=Object.entries(i).filter(([,f])=>f!==Cg).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 Ry(n){return n?Rn(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function ci(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 co(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 qn(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 Xl(n||500,d,new Error(p),!0)}function fo(n){let i=Object.entries(n);for(let l=i.length-1;l>=0;l--){let[s,c]=i[l];if(Vi(c))return{key:s,result:c}}}function kg(n){let i=typeof n=="string"?yi(n):n;return ca({...i,hash:""})}function iw(n,i){return n.pathname!==i.pathname||n.search!==i.search?!1:n.hash===""?i.hash!=="":n.hash===i.hash?!0:i.hash!==""}function rw(n){return new Xl(n.init?.status??500,n.init?.statusText??"Internal Server Error",n.data)}function lw(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([i,l])=>typeof i=="string"&&sw(l))}function sw(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function ow(n){return Bf(n.result)&&_g.has(n.result.status)}function Rn(n){return n.type==="error"}function Vi(n){return(n&&n.type)==="redirect"}function _y(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function Bf(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function uw(n){return _g.has(n)}function cw(n){return Bf(n)&&uw(n.status)&&n.headers.has("Location")}function fw(n){return Q1.has(n.toUpperCase())}function It(n){return q1.has(n.toUpperCase())}function qf(n){return new URLSearchParams(n).getAll("index").some(i=>i==="")}function bo(n,i){let l=typeof i=="string"?yi(i).search:i.search;if(n[n.length-1].route.index&&qf(l||""))return n[n.length-1];let s=wg(n);return s[s.length-1]}function Ay(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 Ic(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 dw(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 Nl(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 hw(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 La(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 mw(n,i){try{let l=n.sessionStorage.getItem(Ag);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 pw(n,i){if(i.size>0){let l={};for(let[s,c]of i)l[s]=[...c];try{n.sessionStorage.setItem(Ag,JSON.stringify(l))}catch(s){Nt(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function Cy(){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 Xi=T.createContext(null);Xi.displayName="DataRouter";var Pl=T.createContext(null);Pl.displayName="DataRouterState";var Ug=T.createContext(!1);function yw(){return T.useContext(Ug)}var Hf=T.createContext({isTransitioning:!1});Hf.displayName="ViewTransition";var Lg=T.createContext(new Map);Lg.displayName="Fetchers";var gw=T.createContext(null);gw.displayName="Await";var Vn=T.createContext(null);Vn.displayName="Navigation";var No=T.createContext(null);No.displayName="Location";var ea=T.createContext({outlet:null,matches:[],isDataRoute:!1});ea.displayName="Route";var Qf=T.createContext(null);Qf.displayName="RouteError";var jg="REACT_ROUTER_ERROR",vw="REDIRECT",bw="ROUTE_ERROR_RESPONSE";function Sw(n){if(n.startsWith(`${jg}:${vw}:{`))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 ww(n){if(n.startsWith(`${jg}:${bw}:{`))try{let i=JSON.parse(n.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new Xl(i.status,i.statusText,i.data)}catch{}}function Ew(n,{relative:i}={}){Le(Zl(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:s}=T.useContext(Vn),{hash:c,pathname:f,search:d}=Jl(n,{relative:i}),p=f;return l!=="/"&&(p=f==="/"?l:ua([l,f])),s.createHref({pathname:p,search:d,hash:c})}function Zl(){return T.useContext(No)!=null}function Fi(){return Le(Zl(),"useLocation() may be used only in the context of a <Router> component."),T.useContext(No).location}var Bg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function qg(n){T.useContext(Vn).static||T.useLayoutEffect(n)}function Hg(){let{isDataRoute:n}=T.useContext(ea);return n?Bw():xw()}function xw(){Le(Zl(),"useNavigate() may be used only in the context of a <Router> component.");let n=T.useContext(Xi),{basename:i,navigator:l}=T.useContext(Vn),{matches:s}=T.useContext(ea),{pathname:c}=Fi(),f=JSON.stringify(Uf(s)),d=T.useRef(!1);return qg(()=>{d.current=!0}),T.useCallback((y,m={})=>{if(Nt(d.current,Bg),!d.current)return;if(typeof y=="number"){l.go(y);return}let b=Lf(y,JSON.parse(f),c,m.relative==="path");n==null&&i!=="/"&&(b.pathname=b.pathname==="/"?i:ua([i,b.pathname])),(m.replace?l.replace:l.push)(b,m.state,m)},[i,l,f,c,n])}var Tw=T.createContext(null);function Rw(n){let i=T.useContext(ea).outlet;return T.useMemo(()=>i&&T.createElement(Tw.Provider,{value:n},i),[i,n])}function _w(){let{matches:n}=T.useContext(ea),i=n[n.length-1];return i?i.params:{}}function Jl(n,{relative:i}={}){let{matches:l}=T.useContext(ea),{pathname:s}=Fi(),c=JSON.stringify(Uf(l));return T.useMemo(()=>Lf(n,JSON.parse(c),s,i==="path"),[n,c,s,i])}function Aw(n,i,l,s,c){Le(Zl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=T.useContext(Vn),{matches:d}=T.useContext(ea),p=d[d.length-1],y=p?p.params:{},m=p?p.pathname:"/",b=p?p.pathnameBase:"/",g=p&&p.route;{let J=g&&g.path||"";Yg(m,!g||J.endsWith("*")||J.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${J}">) 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
+
13
+ Please change the parent <Route path="${J}"> to <Route path="${J==="/"?"*":`${J}/*`}">.`)}let E=Fi(),M;M=E;let U=M.pathname||"/",j=U;if(b!=="/"){let J=b.replace(/^\//,"").split("/");j="/"+U.replace(/^\//,"").split("/").slice(J.length).join("/")}let K=ui(n,{pathname:j});return Nt(g||K!=null,`No routes matched location "${M.pathname}${M.search}${M.hash}" `),Nt(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.`),Nw(K&&K.map(J=>Object.assign({},J,{params:Object.assign({},y,J.params),pathname:ua([b,f.encodeLocation?f.encodeLocation(J.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:J.pathname]),pathnameBase:J.pathnameBase==="/"?b:ua([b,f.encodeLocation?f.encodeLocation(J.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:J.pathnameBase])})),d,l,s,c)}function Cw(){let n=jw(),i=Gl(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=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:f},"ErrorBoundary")," or"," ",T.createElement("code",{style:f},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},i),l?T.createElement("pre",{style:c},l):null,d)}var Ow=T.createElement(Cw,null),Qg=class extends T.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=ww(n.digest);l&&(n=l)}let i=n!==void 0?T.createElement(ea.Provider,{value:this.props.routeContext},T.createElement(Qf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?T.createElement(Mw,{error:n},i):i}};Qg.contextType=Ug;var $c=new WeakMap;function Mw({children:n,error:i}){let{basename:l}=T.useContext(Vn);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let s=Sw(i.digest);if(s){let c=$c.get(i);if(c)throw c;let f=xg(s.location,l);if(Eg&&!$c.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 $c.set(i,d),d}return T.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return n}function Dw({routeContext:n,match:i,children:l}){let s=T.useContext(Xi);return s&&s.static&&s.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=i.route.id),T.createElement(ea.Provider,{value:n},l)}function Nw(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:E,errors:M}=l,U=g.route.loader&&!E.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:Fl(l.matches),errorInfo:g})}:void 0;return f.reduceRight((b,g,E)=>{let M,U=!1,j=null,K=null;l&&(M=d&&g.route.id?d[g.route.id]:void 0,j=g.route.errorElement||Ow,p&&(y<0&&E===0?(Yg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),U=!0,K=null):y===E&&(U=!0,K=g.route.hydrateFallbackElement||null)));let G=i.concat(f.slice(0,E+1)),J=()=>{let $;return M?$=j:U?$=K:g.route.Component?$=T.createElement(g.route.Component,null):g.route.element?$=g.route.element:$=b,T.createElement(Dw,{match:g,routeContext:{outlet:b,matches:G,isDataRoute:l!=null},children:$})};return l&&(g.route.ErrorBoundary||g.route.errorElement||E===0)?T.createElement(Qg,{location:l.location,revalidation:l.revalidation,component:j,error:M,children:J(),routeContext:{outlet:null,matches:G,isDataRoute:!0},onError:m}):J()},null)}function Yf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zw(n){let i=T.useContext(Xi);return Le(i,Yf(n)),i}function kw(n){let i=T.useContext(Pl);return Le(i,Yf(n)),i}function Uw(n){let i=T.useContext(ea);return Le(i,Yf(n)),i}function Vf(n){let i=Uw(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 Lw(){return Vf("useRouteId")}function jw(){let n=T.useContext(Qf),i=kw("useRouteError"),l=Vf("useRouteError");return n!==void 0?n:i.errors?.[l]}function Bw(){let{router:n}=zw("useNavigate"),i=Vf("useNavigate"),l=T.useRef(!1);return qg(()=>{l.current=!0}),T.useCallback(async(c,f={})=>{Nt(l.current,Bg),l.current&&(typeof c=="number"?await n.navigate(c):await n.navigate(c,{fromRouteId:i,...f}))},[n,i])}var Oy={};function Yg(n,i,l){!i&&!Oy[n]&&(Oy[n]=!0,Nt(!1,l))}var My={};function Dy(n,i){!n&&!My[i]&&(My[i]=!0,console.warn(i))}var qw="useOptimistic",Ny=qb[qw],Hw=()=>{};function Qw(n){return Ny?Ny(n):[n,Hw]}function Yw(n){let i={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&Nt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(i,{element:T.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&Nt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(i,{hydrateFallbackElement:T.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&Nt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(i,{errorElement:T.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),i}var Vw=["HydrateFallback","hydrateFallbackElement"],Gw=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 Kw({router:n,flushSync:i,onError:l,unstable_useTransitions:s}){s=yw()||s;let[f,d]=T.useState(n.state),[p,y]=Qw(f),[m,b]=T.useState(),[g,E]=T.useState({isTransitioning:!1}),[M,U]=T.useState(),[j,K]=T.useState(),[G,J]=T.useState(),$=T.useRef(new Map),ge=T.useCallback((V,{deletedFetchers:oe,newErrors:Ce,flushSync:Ae,viewTransitionOpts:Te})=>{Ce&&l&&Object.values(Ce).forEach(Ue=>l(Ue,{location:V.location,params:V.matches[0]?.params??{},unstable_pattern:Fl(V.matches)})),V.fetchers.forEach((Ue,we)=>{Ue.data!==void 0&&$.current.set(we,Ue.data)}),oe.forEach(Ue=>$.current.delete(Ue)),Dy(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(Dy(Te==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."),!Te||!ke){i&&Ae?i(()=>d(V)):s===!1?d(V):T.startTransition(()=>{s===!0&&y(Ue=>zy(Ue,V)),d(V)});return}if(i&&Ae){i(()=>{j&&(M?.resolve(),j.skipTransition()),E({isTransitioning:!0,flushSync:!0,currentLocation:Te.currentLocation,nextLocation:Te.nextLocation})});let Ue=n.window.document.startViewTransition(()=>{i(()=>d(V))});Ue.finished.finally(()=>{i(()=>{U(void 0),K(void 0),b(void 0),E({isTransitioning:!1})})}),i(()=>K(Ue));return}j?(M?.resolve(),j.skipTransition(),J({state:V,currentLocation:Te.currentLocation,nextLocation:Te.nextLocation})):(b(V),E({isTransitioning:!0,flushSync:!1,currentLocation:Te.currentLocation,nextLocation:Te.nextLocation}))},[n.window,i,j,M,s,y,l]);T.useLayoutEffect(()=>n.subscribe(ge),[n,ge]),T.useEffect(()=>{g.isTransitioning&&!g.flushSync&&U(new Gw)},[g]),T.useEffect(()=>{if(M&&m&&n.window){let V=m,oe=M.promise,Ce=n.window.document.startViewTransition(async()=>{s===!1?d(V):T.startTransition(()=>{s===!0&&y(Ae=>zy(Ae,V)),d(V)}),await oe});Ce.finished.finally(()=>{U(void 0),K(void 0),b(void 0),E({isTransitioning:!1})}),K(Ce)}},[m,M,n.window,s,y]),T.useEffect(()=>{M&&m&&p.location.key===m.location.key&&M.resolve()},[M,j,p.location,m]),T.useEffect(()=>{!g.isTransitioning&&G&&(b(G.state),E({isTransitioning:!0,flushSync:!1,currentLocation:G.currentLocation,nextLocation:G.nextLocation}),J(void 0))},[g.isTransitioning,G]);let he=T.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:V=>n.navigate(V),push:(V,oe,Ce)=>n.navigate(V,{state:oe,preventScrollReset:Ce?.preventScrollReset}),replace:(V,oe,Ce)=>n.navigate(V,{replace:!0,state:oe,preventScrollReset:Ce?.preventScrollReset})}),[n]),me=n.basename||"/",A=T.useMemo(()=>({router:n,navigator:he,static:!1,basename:me,onError:l}),[n,he,me,l]);return T.createElement(T.Fragment,null,T.createElement(Xi.Provider,{value:A},T.createElement(Pl.Provider,{value:p},T.createElement(Lg.Provider,{value:$.current},T.createElement(Hf.Provider,{value:g},T.createElement(Zw,{basename:me,location:p.location,navigationType:p.historyAction,navigator:he,unstable_useTransitions:s},T.createElement(Xw,{routes:n.routes,future:n.future,state:p,onError:l})))))),null)}function zy(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 Xw=T.memo(Fw);function Fw({routes:n,future:i,state:l,onError:s}){return Aw(n,void 0,l,s,i)}function Pw(n){return Rw(n.context)}function Zw({basename:n="/",children:i=null,location:l,navigationType:s="POP",navigator:c,static:f=!1,unstable_useTransitions:d}){Le(!Zl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=n.replace(/^\/*/,"/"),y=T.useMemo(()=>({basename:p,navigator:c,static:f,unstable_useTransitions:d,future:{}}),[p,c,f,d]);typeof l=="string"&&(l=yi(l));let{pathname:m="/",search:b="",hash:g="",state:E=null,key:M="default"}=l,U=T.useMemo(()=>{let j=Yn(m,p);return j==null?null:{location:{pathname:j,search:b,hash:g,state:E,key:M},navigationType:s}},[p,m,b,g,E,M,s]);return Nt(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:T.createElement(Vn.Provider,{value:y},T.createElement(No.Provider,{children:i,value:U}))}var So="get",wo="application/x-www-form-urlencoded";function zo(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Jw(n){return zo(n)&&n.tagName.toLowerCase()==="button"}function Iw(n){return zo(n)&&n.tagName.toLowerCase()==="form"}function $w(n){return zo(n)&&n.tagName.toLowerCase()==="input"}function Ww(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function eE(n,i){return n.button===0&&(!i||i==="_self")&&!Ww(n)}var ho=null;function tE(){if(ho===null)try{new FormData(document.createElement("form"),0),ho=!1}catch{ho=!0}return ho}var nE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Wc(n){return n!=null&&!nE.has(n)?(Nt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${wo}"`),null):n}function aE(n,i){let l,s,c,f,d;if(Iw(n)){let p=n.getAttribute("action");s=p?Yn(p,i):null,l=n.getAttribute("method")||So,c=Wc(n.getAttribute("enctype"))||wo,f=new FormData(n)}else if(Jw(n)||$w(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?Yn(y,i):null,l=n.getAttribute("formmethod")||p.getAttribute("method")||So,c=Wc(n.getAttribute("formenctype"))||Wc(p.getAttribute("enctype"))||wo,f=new FormData(p,n),!tE()){let{name:m,type:b,value:g}=n;if(b==="image"){let E=m?`${m}.`:"";f.append(`${E}x`,"0"),f.append(`${E}y`,"0")}else m&&f.append(m,g)}}else{if(zo(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=So,s=null,c=wo,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 Gf(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&&Yn(c.pathname,i)==="/"?c.pathname=`${i.replace(/\/$/,"")}/_root.${s}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${s}`,c}async function rE(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 lE(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 sE(n,i,l){let s=await Promise.all(n.map(async c=>{let f=i.routes[c.route.id];if(f){let d=await rE(f,l);return d.links?d.links():[]}return[]}));return fE(s.flat(1).filter(lE).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function ky(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 oE(n,i,{includeHydrateFallback:l}={}){return uE(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 uE(n){return[...new Set(n)]}function cE(n){let i={},l=Object.keys(n).sort();for(let s of l)i[s]=n[s];return i}function fE(n,i){let l=new Set;return new Set(i),n.reduce((s,c)=>{let f=JSON.stringify(cE(c));return l.has(f)||(l.add(f),s.push({key:f,link:c})),s},[])}function Vg(){let n=T.useContext(Xi);return Gf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function dE(){let n=T.useContext(Pl);return Gf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Kf=T.createContext(void 0);Kf.displayName="FrameworkContext";function Gg(){let n=T.useContext(Kf);return Gf(n,"You must render this element inside a <HydratedRouter> element"),n}function hE(n,i){let l=T.useContext(Kf),[s,c]=T.useState(!1),[f,d]=T.useState(!1),{onFocus:p,onBlur:y,onMouseEnter:m,onMouseLeave:b,onTouchStart:g}=i,E=T.useRef(null);T.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let j=G=>{G.forEach(J=>{d(J.isIntersecting)})},K=new IntersectionObserver(j,{threshold:.5});return E.current&&K.observe(E.current),()=>{K.disconnect()}}},[n]),T.useEffect(()=>{if(s){let j=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(j)}}},[s]);let M=()=>{c(!0)},U=()=>{c(!1),d(!1)};return l?n!=="intent"?[f,E,{}]:[f,E,{onFocus:zl(p,M),onBlur:zl(y,U),onMouseEnter:zl(m,M),onMouseLeave:zl(b,U),onTouchStart:zl(g,M)}]:[!1,E,{}]}function zl(n,i){return l=>{n&&n(l),l.defaultPrevented||i(l)}}function mE({page:n,...i}){let{router:l}=Vg(),s=T.useMemo(()=>ui(l.routes,n,l.basename),[l.routes,n,l.basename]);return s?T.createElement(yE,{page:n,matches:s,...i}):null}function pE(n){let{manifest:i,routeModules:l}=Gg(),[s,c]=T.useState([]);return T.useEffect(()=>{let f=!1;return sE(n,i,l).then(d=>{f||c(d)}),()=>{f=!0}},[n,i,l]),s}function yE({page:n,matches:i,...l}){let s=Fi(),{future:c,manifest:f,routeModules:d}=Gg(),{basename:p}=Vg(),{loaderData:y,matches:m}=dE(),b=T.useMemo(()=>ky(n,i,m,f,s,"data"),[n,i,m,f,s]),g=T.useMemo(()=>ky(n,i,m,f,s,"assets"),[n,i,m,f,s]),E=T.useMemo(()=>{if(n===s.pathname+s.search+s.hash)return[];let j=new Set,K=!1;if(i.forEach(J=>{let $=f.routes[J.route.id];!$||!$.hasLoader||(!b.some(ge=>ge.route.id===J.route.id)&&J.route.id in y&&d[J.route.id]?.shouldRevalidate||$.hasClientLoader?K=!0:j.add(J.route.id))}),j.size===0)return[];let G=iE(n,p,c.unstable_trailingSlashAwareDataRequests,"data");return K&&j.size>0&&G.searchParams.set("_routes",i.filter(J=>j.has(J.route.id)).map(J=>J.route.id).join(",")),[G.pathname+G.search]},[p,c.unstable_trailingSlashAwareDataRequests,y,s,f,b,i,n,d]),M=T.useMemo(()=>oE(g,f),[g,f]),U=pE(g);return T.createElement(T.Fragment,null,E.map(j=>T.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...l})),M.map(j=>T.createElement("link",{key:j,rel:"modulepreload",href:j,...l})),U.map(({key:j,link:K})=>T.createElement("link",{key:j,nonce:l.nonce,...K,crossOrigin:K.crossOrigin??l.crossOrigin})))}function gE(...n){return i=>{n.forEach(l=>{typeof l=="function"?l(i):l!=null&&(l.current=i)})}}var vE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{vE&&(window.__reactRouterVersion="7.13.0")}catch{}function bE(n,i){return K1({basename:i?.basename,getContext:i?.getContext,future:i?.future,history:s1({window:i?.window}),hydrationData:SE(),routes:n,mapRouteProperties:Yw,hydrationRouteProperties:Vw,dataStrategy:i?.dataStrategy,patchRoutesOnNavigation:i?.patchRoutesOnNavigation,window:i?.window,unstable_instrumentations:i?.unstable_instrumentations}).initialize()}function SE(){let n=window?.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:wE(n.errors)}),n}function wE(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 Xl(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 Kg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Xg=T.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:E,...M},U){let{basename:j,unstable_useTransitions:K}=T.useContext(Vn),G=typeof m=="string"&&Kg.test(m),J=xg(m,j);m=J.to;let $=Ew(m,{relative:c}),[ge,he,me]=hE(s,M),A=RE(m,{replace:d,state:p,target:y,preventScrollReset:b,relative:c,viewTransition:g,unstable_defaultShouldRevalidate:E,unstable_useTransitions:K});function V(Ce){i&&i(Ce),Ce.defaultPrevented||A(Ce)}let oe=T.createElement("a",{...M,...me,href:J.absoluteURL||$,onClick:J.isExternal||f?i:V,ref:gE(U,he),target:y,"data-discover":!G&&l==="render"?"true":void 0});return ge&&!G?T.createElement(T.Fragment,null,oe,T.createElement(mE,{page:$})):oe});Xg.displayName="Link";var EE=T.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=Jl(d,{relative:m.relative}),E=Fi(),M=T.useContext(Pl),{navigator:U,basename:j}=T.useContext(Vn),K=M!=null&&ME(g)&&p===!0,G=U.encodeLocation?U.encodeLocation(g).pathname:g.pathname,J=E.pathname,$=M&&M.navigation&&M.navigation.location?M.navigation.location.pathname:null;l||(J=J.toLowerCase(),$=$?$.toLowerCase():null,G=G.toLowerCase()),$&&j&&($=Yn($,j)||$);const ge=G!=="/"&&G.endsWith("/")?G.length-1:G.length;let he=J===G||!c&&J.startsWith(G)&&J.charAt(ge)==="/",me=$!=null&&($===G||!c&&$.startsWith(G)&&$.charAt(G.length)==="/"),A={isActive:he,isPending:me,isTransitioning:K},V=he?i:void 0,oe;typeof s=="function"?oe=s(A):oe=[s,he?"active":null,me?"pending":null,K?"transitioning":null].filter(Boolean).join(" ");let Ce=typeof f=="function"?f(A):f;return T.createElement(Xg,{...m,"aria-current":V,className:oe,ref:b,style:Ce,to:d,viewTransition:p},typeof y=="function"?y(A):y)});EE.displayName="NavLink";var xE=T.forwardRef(({discover:n="render",fetcherKey:i,navigate:l,reloadDocument:s,replace:c,state:f,method:d=So,action:p,onSubmit:y,relative:m,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:E,...M},U)=>{let{unstable_useTransitions:j}=T.useContext(Vn),K=CE(),G=OE(p,{relative:m}),J=d.toLowerCase()==="get"?"get":"post",$=typeof p=="string"&&Kg.test(p),ge=he=>{if(y&&y(he),he.defaultPrevented)return;he.preventDefault();let me=he.nativeEvent.submitter,A=me?.getAttribute("formmethod")||d,V=()=>K(me||he.currentTarget,{fetcherKey:i,method:A,navigate:l,replace:c,state:f,relative:m,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:E});j&&l!==!1?T.startTransition(()=>V()):V()};return T.createElement("form",{ref:U,method:J,action:G,onSubmit:s?y:ge,...M,"data-discover":!$&&n==="render"?"true":void 0})});xE.displayName="Form";function TE(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Fg(n){let i=T.useContext(Xi);return Le(i,TE(n)),i}function RE(n,{target:i,replace:l,state:s,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:p,unstable_useTransitions:y}={}){let m=Hg(),b=Fi(),g=Jl(n,{relative:f});return T.useCallback(E=>{if(eE(E,i)){E.preventDefault();let M=l!==void 0?l:ca(b)===ca(g),U=()=>m(n,{replace:M,state:s,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:p});y?T.startTransition(()=>U()):U()}},[b,m,g,l,s,i,n,c,f,d,p,y])}var _E=0,AE=()=>`__${String(++_E)}__`;function CE(){let{router:n}=Fg("useSubmit"),{basename:i}=T.useContext(Vn),l=Lw(),s=n.fetch,c=n.navigate;return T.useCallback(async(f,d={})=>{let{action:p,method:y,encType:m,formData:b,body:g}=aE(f,i);if(d.navigate===!1){let E=d.fetcherKey||AE();await s(E,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 OE(n,{relative:i}={}){let{basename:l}=T.useContext(Vn),s=T.useContext(ea);Le(s,"useFormAction must be used inside a RouteContext");let[c]=s.matches.slice(-1),f={...Jl(n||".",{relative:i})},d=Fi();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:ua([l,f.pathname])),ca(f)}function ME(n,{relative:i}={}){let l=T.useContext(Hf);Le(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=Fg("useViewTransitionState"),c=Jl(n,{relative:i});if(!l.isTransitioning)return!1;let f=Yn(l.currentLocation.pathname,s)||l.currentLocation.pathname,d=Yn(l.nextLocation.pathname,s)||l.nextLocation.pathname;return Mo(c.pathname,d)!=null||Mo(c.pathname,f)!=null}function DE(n){return T.createElement(Kw,{flushSync:pg.flushSync,...n})}const Pg=(...n)=>n.filter((i,l,s)=>!!i&&i.trim()!==""&&s.indexOf(i)===l).join(" ").trim();const NE=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const zE=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,l,s)=>s?s.toUpperCase():l.toLowerCase());const Uy=n=>{const i=zE(n);return i.charAt(0).toUpperCase()+i.slice(1)};var kE={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 UE=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};const LE=T.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:l=2,absoluteStrokeWidth:s,className:c="",children:f,iconNode:d,...p},y)=>T.createElement("svg",{ref:y,...kE,width:i,height:i,stroke:n,strokeWidth:s?Number(l)*24/Number(i):l,className:Pg("lucide",c),...!f&&!UE(p)&&{"aria-hidden":"true"},...p},[...d.map(([m,b])=>T.createElement(m,b)),...Array.isArray(f)?f:[f]]));const Pi=(n,i)=>{const l=T.forwardRef(({className:s,...c},f)=>T.createElement(LE,{ref:f,iconNode:i,className:Pg(`lucide-${NE(Uy(n))}`,`lucide-${n}`,s),...c}));return l.displayName=Uy(n),l};const jE=[["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"}]],BE=Pi("bell",jE);const qE=[["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"}]],HE=Pi("cpu",qE);const QE=[["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"}]],YE=Pi("folder-git-2",QE);const VE=[["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"}]],GE=Pi("languages",VE);const KE=[["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"}]],XE=Pi("settings",KE);const FE=[["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"}]],PE=Pi("users",FE);const ZE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],JE=Pi("x",ZE),Ly=n=>{let i;const l=new Set,s=(m,b)=>{const g=typeof m=="function"?m(i):m;if(!Object.is(g,i)){const E=i;i=b??(typeof g!="object"||g===null)?g:Object.assign({},i,g),l.forEach(M=>M(i,E))}},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},IE=(n=>n?Ly(n):Ly),$E=n=>n;function WE(n,i=$E){const l=ee.useSyncExternalStore(n.subscribe,ee.useCallback(()=>i(n.getState()),[n,i]),ee.useCallback(()=>i(n.getInitialState()),[n,i]));return ee.useDebugValue(l),l}const jy=n=>{const i=IE(n),l=s=>WE(i,s);return Object.assign(l,i),l},ex=(n=>n?jy(n):jy),Bl=ex(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})})),tx="/api";class nx{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 Xf(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 Xf extends Error{status;details;constructor(i,l,s={}){super(l),this.name="ApiError",this.status=i,this.details=s}}const ot=new nx(tx),Pe={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],body:n=>["tasks","body",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 ax(){return pi({queryKey:Pe.appSettings.detail,queryFn:()=>ot.get("/app-settings")})}function ix(){const n=yt();return qt({mutationFn:i=>ot.put("/app-settings",i),onSuccess:()=>{n.invalidateQueries({queryKey:Pe.appSettings.detail})}})}function LR(){return pi({queryKey:[...Pe.appSettings.detail,"commit-message-defaults"],queryFn:()=>ot.get("/app-settings/commit-message-defaults")})}const rx={"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":"所有项目",Projects:"项目","Select View":"选择视图","Create New Project...":"创建新项目...","New Task":"新任务","New Project":"新项目",Search:"搜索","Search tasks...":"搜索任务...","Recent tasks":"近期任务","No matching tasks":"没有匹配的任务","{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)":"(不可用)","Manage Team Members":"管理团队成员","Add member":"添加成员","Save member":"保存成员","Edit member":"编辑成员","Remove member":"移除成员",Remove:"移除","Member added":"成员已添加","Member updated":"成员已更新","Member removed":"成员已移除","Failed to save member":"保存成员失败","Failed to remove member":"移除成员失败","Name, provider, and role prompt are required":"名称、Provider 和角色提示词不能为空","No active members":"暂无活跃成员","Add member from preset":"从预设添加成员","Choose a saved preset to add a ready-to-run member snapshot.":"选择已保存的预设,添加一个可直接工作的成员快照。","Custom member":"自定义成员",Custom:"自定义","Use preset":"使用预设",Preset:"预设","Select a member":"选择成员","Choose a member on the left to edit its future TeamRun configuration.":"从左侧选择成员,编辑其后续 TeamRun 配置。","Provider, role, workspace, and session changes apply to future work only.":"Provider、角色、工作区和会话变更只影响后续工作。","Create a one-off member snapshot for this TeamRun.":"为当前 TeamRun 创建一次性的成员快照。","Create a custom member for this TeamRun, or add presets from Team Collaboration Settings.":"可以为当前 TeamRun 创建自定义成员,或先在团队协作设置中添加预设。","Remove this member from future TeamRun work?":"将该成员从后续 TeamRun 工作中移除?",Name:"名称",Aliases:"别名",Avatar:"头像","Workspace policy":"工作区策略","Trigger policy":"触发策略","Session policy":"会话策略","Queue policy":"队列策略","Role prompt":"角色提示词",Capabilities:"能力","Comma separated":"用逗号分隔","No member presets":"暂无成员预设",active:"活跃",working:"工作中"},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",有未保存的更改:"You have unsaved changes",系统通知:"System Notifications",任务完成时弹出桌面通知:"Show a desktop notification when a task finishes.",第三方通知:"Third-party Notifications",选择一个第三方渠道接收通知:"Choose a third-party channel to receive notifications.",无:"None",飞书:"Feishu",测试发送:"Send Test",发送成功:"Sent successfully",发送失败:"Send failed","跳转地址(用于生成任务链接)":"Base URL (used to generate task links)",'通知卡片中的"查看任务"按钮将跳转到 {path}':'The "View Task" button in the notification card will open {path}',通知模板:"Notification Templates","支持变量: {taskTitle}, {taskId}, {projectId}, {projectName}, {status}":"Supported variables: {taskTitle}, {taskId}, {projectId}, {projectName}, {status}",标题模板:"Title Template",内容模板:"Body Template",'✅ "{taskTitle}" 已完成,等待审查':'✅ "{taskTitle}" is complete and ready for review',保存所有更改:"Save All Changes","启动失败: {message}":"Start failed: {message}",未知错误:"Unknown error",会话已停止:"Session stopped","Agent 交互演示":"Agent Interaction Demo","选择 Agent":"Select Agent","输入你的问题或任务...":"Enter your question or task...","启动中...":"Starting...",开始:"Start",对话:"Conversation",已连接:"Connected","连接中...":"Connecting...",未连接:"Disconnected",停止:"Stop","选择 Agent 并输入问题开始对话":"Select an agent and enter a prompt to start chatting.",你:"You","发送后续消息...":"Send a follow-up message...",发送:"Send",新会话:"New Session",未选择:"Not selected",连接:"Connection","Profiles 设置":"Profile Settings","配置变体 (Profile Variant)":"Profile Variant",输入任务:"Task Input","等待 Agent 响应...":"Waiting for agent output...","发送消息给 Agent...":"Send a message to the agent...","启动失败,请重试":"Failed to start. Please try again.",启动:"Start","创建工作空间...":"Creating workspace...","创建会话...":"Creating session...","启动 Agent...":"Starting agent...","启动 Agent":"Start Agent","选择 Provider":"Select Provider"," (不可用)":" (Unavailable)",任务描述:"Task Description","描述你想让 Agent 完成的任务...":"Describe the task you want the agent to complete...","输入文件路径...":"Enter a file path...",添加:"Add",添加此目录:"Add this directory",名称:"Name",命令:"Command",切换渠道:"Switch Provider","(默认)":"(Default)","留空为 auto;或直接输入模型 ID(与 cursor-agent --model 一致)":"Leave empty for auto, or enter a model ID directly (same as cursor-agent --model).","正在加载 cursor-agent 模型列表…":"Loading cursor-agent model list...",收起列表:"Collapse List","从本机 cursor-agent 选择({count} 个)":"Choose from local cursor-agent ({count})","筛选模型…":"Filter models...","默认 (auto)":"Default (auto)",无匹配项:"No matches",请求失败:"Request failed","无法从本机加载模型列表({error})。仍可手动输入;或在安装 cursor-agent 的机器上运行":"Could not load models from the local machine ({error}). You can still enter one manually, or run","查看 ID。":"to inspect available IDs.","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",单人:"Solo",团队:"Team",团队协作:"Team Collaboration",团队协作设置:"Team Collaboration Settings","管理成员预设与团队模板。":"Manage member presets and team templates.",成员预设:"Member Presets",团队模板:"Team Templates","点击列表项可编辑。":"Click an item to edit it.",当前没有成员预设:"No member presets yet.",当前没有团队模板:"No team templates yet.",创建新成员预设:"Create a new member preset",编辑成员预设:"Edit member preset",创建新团队模板:"Create a new team template",编辑团队模板:"Edit team template",成员预设名称:"Member preset name",成员预设别名:"Member preset aliases",成员预设头像:"Member preset avatar",成员预设角色提示词:"Member preset role prompt",团队模板名称:"Team template name",别名:"Aliases",头像:"Avatar",角色提示词:"Role Prompt",可用能力:"Capabilities",工作区策略:"Workspace Policy",触发策略:"Trigger Policy",共享:"Shared",独占:"Dedicated",仅提及:"Mention only",所有用户消息:"All user messages",读房间:"Read room",发房间消息:"Post room message",提及成员:"Mention members",停止成员工作:"Stop member work",标记可审查:"Mark ready for review",读文件:"Read files",写文件:"Write files",运行命令:"Run commands","读 diff":"Read diff",合并工作区:"Merge workspace","{count} 个成员":"{count} member(s)","Provider 列表加载失败":"Failed to load providers","Provider 列表加载失败,无法创建或修改成员预设。":"Failed to load providers. Member presets cannot be created or updated.",成员预设加载失败:"Failed to load member presets",团队模板加载失败:"Failed to load team templates","请稍后重试。":"Please try again later.",重试:"Retry","暂无可用 Provider,请先在 Agent 配置中创建。":"No available provider. Create one in Agent Settings first.","alice, a, reviewer":"alice, a, reviewer","选择顺序即保存顺序。":"Selection order is the saved order.",已选成员:"Selected Members","上移下移后即为保存顺序。":"Use up/down to change the saved order.",尚未选择成员预设:"No member presets selected yet.","先创建成员预设,再配置团队模板。":"Create member presets first, then configure a team template.",删除失败:"Delete failed",上移:"Move up",下移:"Move down","创建 TeamRun":"Create TeamRun",TeamRun:"TeamRun",模式:"Mode",执行模式:"Execution mode","TeamRun 模式":"TeamRun mode",确认模式:"Confirm mode",自动模式:"Auto mode","默认使用自动模式,团队消息会直接排队执行。":"Auto mode is the default. Team messages are queued for execution directly.","模板成员会先加入,随后按顺序追加所选成员。":"Template members are added first, then the selected members are appended in order.","请选择至少一个团队模板或成员预设。":"Select at least one team template or member preset.","该任务已经存在 TeamRun。请刷新后再试。":"This task already has a TeamRun. Refresh and try again.","创建 TeamRun 失败":"Failed to create TeamRun","TeamRun 创建失败,请检查团队配置后重试":"TeamRun creation failed. Please check team config and retry.","前往 /settings/team 创建":"Go to /settings/team to create one","欢迎使用 Agent Tower":"Welcome to Agent Tower","需要我帮你做点什么?":"What can I help you with?","描述任务,选择 Agent 或团队,即刻开始":"Describe a task, pick an Agent or team, and start right away","描述一个任务,AI Agent 将为你开始工作":"Describe a task and an AI agent will start working on it.","TeamRun 协作配置":"TeamRun Configuration",团队协作配置:"Team Collaboration Config","切换回单 Agent":"Switch to Solo Agent",追加成员:"Additional Members","{count} 个追加成员":"{count} additional member(s)",去创建:"Create",请选择团队模板或追加成员:"Select a team template or add members",收起:"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",确认后会停止当前工作并取消队列:"Confirming will stop the current work and clear the queue",每次新会话:"New session per request",复用上次会话:"Resume last session",仅自己队列:"Own queue only",全队列待处理:"Team pending queue",代码审查:"Review","{count} 个文件":"{count} files",未选择工作区:"No workspace selected",没有可显示的差异内容:"No diff content available","还有 {count} 行变更被折叠,点击展开全部":"{count} more lines collapsed — click to expand all","正在加载差异...":"Loading diff...",差异加载失败:"Failed to load diff",变更加载失败:"Failed to load changes",没有匹配筛选条件的文件:"No files match the filter",该提交没有文件变更:"No file changes in this commit",没有待审查的变更:"No changes to review",未提交:"Uncommitted",已提交:"Committed","筛选文件...":"Filter files...",无匹配文件:"No matching files",暂无变更文件:"No changed files",提交记录:"Commits",全部变更:"All changes","正在加载提交记录...":"Loading commits...",暂无提交记录:"No commits yet",加载更多提交:"Load more commits","正在加载...":"Loading..."}},Zg=T.createContext(null);function lx(n){return n?n==="en"?"en":n==="zh-CN"?"zh-CN":null:null}function sx(){return typeof navigator>"u"||navigator.language.toLowerCase().startsWith("zh")?"zh-CN":"en"}function ox(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 Sf="zh-CN";function Jg(n,i,l){const s=rx[n][i]??i;return ox(s,l)}function ux(n,i){return Jg(Sf,n,i)}function cx({children:n}){const i=T.useRef(sx()),[l,s]=T.useState(i.current),{data:c}=ax(),f=ix(),d=T.useRef(!1),p=T.useCallback(b=>{Sf=b,s(b),document.documentElement.lang=b},[]);T.useEffect(()=>{const b=lx(c?.locale)??i.current;p(b),c&&c.locale===null&&!d.current&&(d.current=!0,f.mutate({locale:b}))},[c,p,f]);const y=T.useCallback(b=>{const g=Sf;p(b),f.mutate({locale:b},{onError:()=>{p(g),GS.error(ux("语言设置保存失败"))}})},[p,f]),m=T.useMemo(()=>({locale:l,setLocale:y,t:(b,g)=>Jg(l,b,g)}),[l,y]);return Q.jsx(Zg.Provider,{value:m,children:n})}function Ff(){const n=T.useContext(Zg);if(!n)throw new Error("useI18n must be used within I18nProvider");return n}function Ig(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=Ig(n[i]))&&(s&&(s+=" "),s+=l)}else for(l in n)n[l]&&(s&&(s+=" "),s+=l);return s}function $g(){for(var n,i,l=0,s="",c=arguments.length;l<c;l++)(n=arguments[l])&&(i=Ig(n))&&(s&&(s+=" "),s+=i);return s}const fx=(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},dx=(n,i)=>({classGroupId:n,validator:i}),Wg=(n=new Map,i=null,l)=>({nextPart:n,validators:i,classGroupId:l}),Do="-",By=[],hx="arbitrary..",mx=n=>{const i=yx(n),{conflictingClassGroups:l,conflictingClassGroupModifiers:s}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return px(d);const p=d.split(Do),y=p[0]===""&&p.length>1?1:0;return ev(p,y,i)},getConflictingClassGroupIds:(d,p)=>{if(p){const y=s[d],m=l[d];return y?m?fx(m,y):y:m||By}return l[d]||By}}},ev=(n,i,l)=>{if(n.length-i===0)return l.classGroupId;const c=n[i],f=l.nextPart.get(c);if(f){const m=ev(n,i+1,f);if(m)return m}const d=l.validators;if(d===null)return;const p=i===0?n.join(Do):n.slice(i).join(Do),y=d.length;for(let m=0;m<y;m++){const b=d[m];if(b.validator(p))return b.classGroupId}},px=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?hx+s:void 0})(),yx=n=>{const{theme:i,classGroups:l}=n;return gx(l,i)},gx=(n,i)=>{const l=Wg();for(const s in n){const c=n[s];Pf(c,l,s,i)}return l},Pf=(n,i,l,s)=>{const c=n.length;for(let f=0;f<c;f++){const d=n[f];vx(d,i,l,s)}},vx=(n,i,l,s)=>{if(typeof n=="string"){bx(n,i,l);return}if(typeof n=="function"){Sx(n,i,l,s);return}wx(n,i,l,s)},bx=(n,i,l)=>{const s=n===""?i:tv(i,n);s.classGroupId=l},Sx=(n,i,l,s)=>{if(Ex(n)){Pf(n(s),i,l,s);return}i.validators===null&&(i.validators=[]),i.validators.push(dx(l,n))},wx=(n,i,l,s)=>{const c=Object.entries(n),f=c.length;for(let d=0;d<f;d++){const[p,y]=c[d];Pf(y,tv(i,p),l,s)}},tv=(n,i)=>{let l=n;const s=i.split(Do),c=s.length;for(let f=0;f<c;f++){const d=s[f];let p=l.nextPart.get(d);p||(p=Wg(),l.nextPart.set(d,p)),l=p}return l},Ex=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,xx=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)}}},wf="!",qy=":",Tx=[],Hy=(n,i,l,s,c)=>({modifiers:n,hasImportantModifier:i,baseClassName:l,maybePostfixModifierPosition:s,isExternal:c}),Rx=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 j=0;j<b;j++){const K=c[j];if(d===0&&p===0){if(K===qy){f.push(c.slice(y,j)),y=j+1;continue}if(K==="/"){m=j;continue}}K==="["?d++:K==="]"?d--:K==="("?p++:K===")"&&p--}const g=f.length===0?c:c.slice(y);let E=g,M=!1;g.endsWith(wf)?(E=g.slice(0,-1),M=!0):g.startsWith(wf)&&(E=g.slice(1),M=!0);const U=m&&m>y?m-y:void 0;return Hy(f,M,E,U)};if(i){const c=i+qy,f=s;s=d=>d.startsWith(c)?f(d.slice(c.length)):Hy(Tx,!1,d,void 0,!0)}if(l){const c=s;s=f=>l({className:f,parseClassName:c})}return s},_x=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}},Ax=n=>({cache:xx(n.cacheSize),parseClassName:Rx(n),sortModifiers:_x(n),...mx(n)}),Cx=/\s+/,Ox=(n,i)=>{const{parseClassName:l,getClassGroupId:s,getConflictingClassGroupIds:c,sortModifiers:f}=i,d=[],p=n.trim().split(Cx);let y="";for(let m=p.length-1;m>=0;m-=1){const b=p[m],{isExternal:g,modifiers:E,hasImportantModifier:M,baseClassName:U,maybePostfixModifierPosition:j}=l(b);if(g){y=b+(y.length>0?" "+y:y);continue}let K=!!j,G=s(K?U.substring(0,j):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 J=E.length===0?"":E.length===1?E[0]:f(E).join(":"),$=M?J+wf:J,ge=$+G;if(d.indexOf(ge)>-1)continue;d.push(ge);const he=c(G,K);for(let me=0;me<he.length;++me){const A=he[me];d.push($+A)}y=b+(y.length>0?" "+y:y)}return y},Mx=(...n)=>{let i=0,l,s,c="";for(;i<n.length;)(l=n[i++])&&(s=nv(l))&&(c&&(c+=" "),c+=s);return c},nv=n=>{if(typeof n=="string")return n;let i,l="";for(let s=0;s<n.length;s++)n[s]&&(i=nv(n[s]))&&(l&&(l+=" "),l+=i);return l},Dx=(n,...i)=>{let l,s,c,f;const d=y=>{const m=i.reduce((b,g)=>g(b),n());return l=Ax(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=Ox(y,l);return c(y,b),b};return f=d,(...y)=>f(Mx(...y))},Nx=[],Ut=n=>{const i=l=>l[n]||Nx;return i.isThemeGetter=!0,i},av=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,iv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zx=/^\d+\/\d+$/,kx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ux=/\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$/,Lx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,jx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mr=n=>zx.test(n),ze=n=>!!n&&!Number.isNaN(Number(n)),oi=n=>!!n&&Number.isInteger(Number(n)),ef=n=>n.endsWith("%")&&ze(n.slice(0,-1)),Ua=n=>kx.test(n),qx=()=>!0,Hx=n=>Ux.test(n)&&!Lx.test(n),rv=()=>!1,Qx=n=>jx.test(n),Yx=n=>Bx.test(n),Vx=n=>!le(n)&&!se(n),Gx=n=>jr(n,ov,rv),le=n=>av.test(n),Qi=n=>jr(n,uv,Hx),tf=n=>jr(n,Zx,ze),Qy=n=>jr(n,lv,rv),Kx=n=>jr(n,sv,Yx),mo=n=>jr(n,cv,Qx),se=n=>iv.test(n),kl=n=>Br(n,uv),Xx=n=>Br(n,Jx),Yy=n=>Br(n,lv),Fx=n=>Br(n,ov),Px=n=>Br(n,sv),po=n=>Br(n,cv,!0),jr=(n,i,l)=>{const s=av.exec(n);return s?s[1]?i(s[1]):l(s[2]):!1},Br=(n,i,l=!1)=>{const s=iv.exec(n);return s?s[1]?i(s[1]):l:!1},lv=n=>n==="position"||n==="percentage",sv=n=>n==="image"||n==="url",ov=n=>n==="length"||n==="size"||n==="bg-size",uv=n=>n==="length",Zx=n=>n==="number",Jx=n=>n==="family-name",cv=n=>n==="shadow",Ix=()=>{const n=Ut("color"),i=Ut("font"),l=Ut("text"),s=Ut("font-weight"),c=Ut("tracking"),f=Ut("leading"),d=Ut("breakpoint"),p=Ut("container"),y=Ut("spacing"),m=Ut("radius"),b=Ut("shadow"),g=Ut("inset-shadow"),E=Ut("text-shadow"),M=Ut("drop-shadow"),U=Ut("blur"),j=Ut("perspective"),K=Ut("aspect"),G=Ut("ease"),J=Ut("animate"),$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ge=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],he=()=>[...ge(),se,le],me=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],V=()=>[se,le,y],oe=()=>[Mr,"full","auto",...V()],Ce=()=>[oi,"none","subgrid",se,le],Ae=()=>["auto",{span:["full",oi,se,le]},oi,se,le],Te=()=>[oi,"auto",se,le],ke=()=>["auto","min","max","fr",se,le],Ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],we=()=>["start","end","center","stretch","center-safe","end-safe"],C=()=>["auto",...V()],P=()=>[Mr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...V()],q=()=>[n,se,le],ye=()=>[...ge(),Yy,Qy,{position:[se,le]}],ve=()=>["no-repeat",{repeat:["","x","y","space","round"]}],x=()=>["auto","cover","contain",Fx,Gx,{size:[se,le]}],H=()=>[ef,kl,Qi],B=()=>["","none","full",m,se,le],Z=()=>["",ze,kl,Qi],te=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>[ze,ef,Yy,Qy],Re=()=>["","none",U,se,le],Qe=()=>["none",ze,se,le],Ht=()=>["none",ze,se,le],$t=()=>[ze,se,le],Je=()=>[Mr,"full",...V()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ua],breakpoint:[Ua],color:[qx],container:[Ua],"drop-shadow":[Ua],ease:["in","out","in-out"],font:[Vx],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ua],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ua],shadow:[Ua],spacing:["px",ze],text:[Ua],"text-shadow":[Ua],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Mr,le,se,K]}],container:["container"],columns:[{columns:[ze,le,se,p]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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:he()}],overflow:[{overflow:me()}],"overflow-x":[{"overflow-x":me()}],"overflow-y":[{"overflow-y":me()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:oe()}],"inset-x":[{"inset-x":oe()}],"inset-y":[{"inset-y":oe()}],start:[{start:oe()}],end:[{end:oe()}],top:[{top:oe()}],right:[{right:oe()}],bottom:[{bottom:oe()}],left:[{left:oe()}],visibility:["visible","invisible","collapse"],z:[{z:[oi,"auto",se,le]}],basis:[{basis:[Mr,"full","auto",p,...V()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ze,Mr,"auto","initial","none",le]}],grow:[{grow:["",ze,se,le]}],shrink:[{shrink:["",ze,se,le]}],order:[{order:[oi,"first","last","none",se,le]}],"grid-cols":[{"grid-cols":Ce()}],"col-start-end":[{col:Ae()}],"col-start":[{"col-start":Te()}],"col-end":[{"col-end":Te()}],"grid-rows":[{"grid-rows":Ce()}],"row-start-end":[{row:Ae()}],"row-start":[{"row-start":Te()}],"row-end":[{"row-end":Te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ke()}],"auto-rows":[{"auto-rows":ke()}],gap:[{gap:V()}],"gap-x":[{"gap-x":V()}],"gap-y":[{"gap-y":V()}],"justify-content":[{justify:[...Ue(),"normal"]}],"justify-items":[{"justify-items":[...we(),"normal"]}],"justify-self":[{"justify-self":["auto",...we()]}],"align-content":[{content:["normal",...Ue()]}],"align-items":[{items:[...we(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...we(),{baseline:["","last"]}]}],"place-content":[{"place-content":Ue()}],"place-items":[{"place-items":[...we(),"baseline"]}],"place-self":[{"place-self":["auto",...we()]}],p:[{p:V()}],px:[{px:V()}],py:[{py:V()}],ps:[{ps:V()}],pe:[{pe:V()}],pt:[{pt:V()}],pr:[{pr:V()}],pb:[{pb:V()}],pl:[{pl:V()}],m:[{m: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":V()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":V()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],w:[{w:[p,"screen",...P()]}],"min-w":[{"min-w":[p,"screen","none",...P()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[d]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",l,kl,Qi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,se,tf]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ef,le]}],"font-family":[{font:[Xx,le,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,se,le]}],"line-clamp":[{"line-clamp":[ze,"none",se,tf]}],leading:[{leading:[f,...V()]}],"list-image":[{"list-image":["none",se,le]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",se,le]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:q()}],"text-color":[{text:q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[ze,"from-font","auto",se,Qi]}],"text-decoration-color":[{decoration:q()}],"underline-offset":[{"underline-offset":[ze,"auto",se,le]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se,le]}],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",se,le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ye()}],"bg-repeat":[{bg:ve()}],"bg-size":[{bg:x()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},oi,se,le],radial:["",se,le],conic:[oi,se,le]},Px,Kx]}],"bg-color":[{bg:q()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:q()}],"gradient-via":[{via:q()}],"gradient-to":[{to:q()}],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:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:q()}],"border-color-x":[{"border-x":q()}],"border-color-y":[{"border-y":q()}],"border-color-s":[{"border-s":q()}],"border-color-e":[{"border-e":q()}],"border-color-t":[{"border-t":q()}],"border-color-r":[{"border-r":q()}],"border-color-b":[{"border-b":q()}],"border-color-l":[{"border-l":q()}],"divide-color":[{divide:q()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ze,se,le]}],"outline-w":[{outline:["",ze,kl,Qi]}],"outline-color":[{outline:q()}],shadow:[{shadow:["","none",b,po,mo]}],"shadow-color":[{shadow:q()}],"inset-shadow":[{"inset-shadow":["none",g,po,mo]}],"inset-shadow-color":[{"inset-shadow":q()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:q()}],"ring-offset-w":[{"ring-offset":[ze,Qi]}],"ring-offset-color":[{"ring-offset":q()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":q()}],"text-shadow":[{"text-shadow":["none",E,po,mo]}],"text-shadow-color":[{"text-shadow":q()}],opacity:[{opacity:[ze,se,le]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"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":[ze]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":q()}],"mask-image-linear-to-color":[{"mask-linear-to":q()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":q()}],"mask-image-t-to-color":[{"mask-t-to":q()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":q()}],"mask-image-r-to-color":[{"mask-r-to":q()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":q()}],"mask-image-b-to-color":[{"mask-b-to":q()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":q()}],"mask-image-l-to-color":[{"mask-l-to":q()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":q()}],"mask-image-x-to-color":[{"mask-x-to":q()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":q()}],"mask-image-y-to-color":[{"mask-y-to":q()}],"mask-image-radial":[{"mask-radial":[se,le]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":q()}],"mask-image-radial-to-color":[{"mask-radial-to":q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":ge()}],"mask-image-conic-pos":[{"mask-conic":[ze]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":q()}],"mask-image-conic-to-color":[{"mask-conic-to":q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ye()}],"mask-repeat":[{mask:ve()}],"mask-size":[{mask:x()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",se,le]}],filter:[{filter:["","none",se,le]}],blur:[{blur:Re()}],brightness:[{brightness:[ze,se,le]}],contrast:[{contrast:[ze,se,le]}],"drop-shadow":[{"drop-shadow":["","none",M,po,mo]}],"drop-shadow-color":[{"drop-shadow":q()}],grayscale:[{grayscale:["",ze,se,le]}],"hue-rotate":[{"hue-rotate":[ze,se,le]}],invert:[{invert:["",ze,se,le]}],saturate:[{saturate:[ze,se,le]}],sepia:[{sepia:["",ze,se,le]}],"backdrop-filter":[{"backdrop-filter":["","none",se,le]}],"backdrop-blur":[{"backdrop-blur":Re()}],"backdrop-brightness":[{"backdrop-brightness":[ze,se,le]}],"backdrop-contrast":[{"backdrop-contrast":[ze,se,le]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ze,se,le]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ze,se,le]}],"backdrop-invert":[{"backdrop-invert":["",ze,se,le]}],"backdrop-opacity":[{"backdrop-opacity":[ze,se,le]}],"backdrop-saturate":[{"backdrop-saturate":[ze,se,le]}],"backdrop-sepia":[{"backdrop-sepia":["",ze,se,le]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":V()}],"border-spacing-x":[{"border-spacing-x":V()}],"border-spacing-y":[{"border-spacing-y":V()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",se,le]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ze,"initial",se,le]}],ease:[{ease:["linear","initial",G,se,le]}],delay:[{delay:[ze,se,le]}],animate:[{animate:["none",J,se,le]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,se,le]}],"perspective-origin":[{"perspective-origin":he()}],rotate:[{rotate:Qe()}],"rotate-x":[{"rotate-x":Qe()}],"rotate-y":[{"rotate-y":Qe()}],"rotate-z":[{"rotate-z":Qe()}],scale:[{scale:Ht()}],"scale-x":[{"scale-x":Ht()}],"scale-y":[{"scale-y":Ht()}],"scale-z":[{"scale-z":Ht()}],"scale-3d":["scale-3d"],skew:[{skew:$t()}],"skew-x":[{"skew-x":$t()}],"skew-y":[{"skew-y":$t()}],transform:[{transform:[se,le,"","none","gpu","cpu"]}],"transform-origin":[{origin:he()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Je()}],"translate-x":[{"translate-x":Je()}],"translate-y":[{"translate-y":Je()}],"translate-z":[{"translate-z":Je()}],"translate-none":["translate-none"],accent:[{accent:q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:q()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se,le]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se,le]}],fill:[{fill:["none",...q()]}],"stroke-w":[{stroke:[ze,kl,Qi,tf]}],stroke:[{stroke:["none",...q()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},$x=Dx(Ix);function mn(...n){return $x($g(n))}function nf(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 jR(n,i){if(nf(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=nf(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=nf(p[b]);if(m+g>c)break;y=p[b]+y,m+=g}return f+"…"+y}let kr=0;function Wx(){kr++,kr===1&&(document.body.style.overflow="hidden")}function Vy(){kr=Math.max(0,kr-1),kr===0&&(document.body.style.overflow="")}function eT(){return kr}const Gy=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Ky=$g,tT=(n,i)=>l=>{var s;if(i?.variants==null)return Ky(n,l?.class,l?.className);const{variants:c,defaultVariants:f}=i,d=Object.keys(c).map(m=>{const b=l?.[m],g=f?.[m];if(b===null)return null;const E=Gy(b)||Gy(g);return c[m][E]}),p=l&&Object.entries(l).reduce((m,b)=>{let[g,E]=b;return E===void 0||(m[g]=E),m},{}),y=i==null||(s=i.compoundVariants)===null||s===void 0?void 0:s.reduce((m,b)=>{let{class:g,className:E,...M}=b;return Object.entries(M).every(U=>{let[j,K]=U;return Array.isArray(K)?K.includes({...f,...p}[j]):{...f,...p}[j]===K})?[...m,g,E]:m},[]);return Ky(n,d,y,l?.class,l?.className)};function Xy(n,i){if(typeof n=="function")return n(i);n!=null&&(n.current=i)}function nT(...n){return i=>{let l=!1;const s=n.map(c=>{const f=Xy(c,i);return!l&&typeof f=="function"&&(l=!0),f});if(l)return()=>{for(let c=0;c<s.length;c++){const f=s[c];typeof f=="function"?f():Xy(n[c],null)}}}}function aT(n){const i=rT(n),l=T.forwardRef((s,c)=>{const{children:f,...d}=s,p=T.Children.toArray(f),y=p.find(sT);if(y){const m=y.props.children,b=p.map(g=>g===y?T.Children.count(m)>1?T.Children.only(null):T.isValidElement(m)?m.props.children:null:g);return Q.jsx(i,{...d,ref:c,children:T.isValidElement(m)?T.cloneElement(m,void 0,b):null})}return Q.jsx(i,{...d,ref:c,children:f})});return l.displayName=`${n}.Slot`,l}var iT=aT("Slot");function rT(n){const i=T.forwardRef((l,s)=>{const{children:c,...f}=l;if(T.isValidElement(c)){const d=uT(c),p=oT(f,c.props);return c.type!==T.Fragment&&(p.ref=s?nT(s,d):d),T.cloneElement(c,p)}return T.Children.count(c)>1?T.Children.only(null):null});return i.displayName=`${n}.SlotClone`,i}var lT=Symbol("radix.slottable");function sT(n){return T.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===lT}function oT(n,i){const l={...i};for(const s in i){const c=n[s],f=i[s];/^on[A-Z]/.test(s)?c&&f?l[s]=(...p)=>{const y=f(...p);return c(...p),y}:c&&(l[s]=c):s==="style"?l[s]={...c,...f}:s==="className"&&(l[s]=[c,f].filter(Boolean).join(" "))}return{...n,...l}}function uT(n){let i=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,l=i&&"isReactWarning"in i&&i.isReactWarning;return l?n.ref:(i=Object.getOwnPropertyDescriptor(n,"ref")?.get,l=i&&"isReactWarning"in i&&i.isReactWarning,l?n.props.ref:n.props.ref||n.ref)}const cT=tT("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Fy({className:n,variant:i="default",size:l="default",asChild:s=!1,...c}){const f=s?iT:"button";return Q.jsx(f,{"data-slot":"button","data-variant":i,"data-size":l,className:mn(cT({variant:i,size:l,className:n})),...c})}function _t({className:n,...i}){return Q.jsx("div",{"data-slot":"skeleton","aria-hidden":"true",className:mn("animate-pulse rounded-md bg-muted motion-reduce:animate-none",n),...i})}function fT({children:n,className:i}){return Q.jsx("div",{className:mn("mx-auto w-full max-w-4xl px-5 py-5 sm:px-8 sm:py-6",i),children:n})}function BR({title:n,description:i,actions:l,className:s}){return Q.jsxs("div",{className:mn("mb-5 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",s),children:[Q.jsxs("div",{className:"min-w-0",children:[Q.jsx("h2",{className:"text-xl font-semibold tracking-tight text-foreground",children:n}),i&&Q.jsx("p",{className:"mt-1 text-[13px] leading-relaxed text-muted-foreground",children:i})]}),l&&Q.jsx("div",{className:"flex flex-wrap items-center gap-2 shrink-0",children:l})]})}function qR({children:n,className:i}){return Q.jsx("h3",{className:mn("text-[12px] font-semibold uppercase tracking-wide text-muted-foreground",i),children:n})}function HR({label:n,description:i,icon:l,children:s,align:c="start",controlWidth:f="fixed",className:d}){return Q.jsxs("div",{className:mn("flex flex-col gap-3 py-5 sm:flex-row sm:justify-between sm:gap-8",c==="center"?"sm:items-center":"sm:items-start",d),children:[Q.jsxs("div",{className:"flex min-w-0 items-start gap-3 sm:max-w-[360px]",children:[l&&Q.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground","aria-hidden":"true",children:Q.jsx(l,{size:15})}),Q.jsxs("div",{className:"min-w-0",children:[Q.jsx("div",{className:"text-[13px] font-medium text-foreground",children:n}),i&&Q.jsx("p",{className:"mt-0.5 text-xs leading-relaxed text-muted-foreground",children:i})]})]}),Q.jsx("div",{className:mn("shrink-0",f==="fixed"?"w-full sm:w-[260px]":"w-auto"),children:s})]})}function QR({label:n,description:i,children:l,className:s,htmlFor:c}){return Q.jsxs("div",{className:mn("space-y-1.5",s),children:[Q.jsxs("div",{children:[Q.jsx("label",{htmlFor:c,className:"block text-[13px] font-medium text-foreground",children:n}),i&&Q.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:i})]}),l]})}function YR({icon:n,message:i,action:l,className:s}){return Q.jsxs("div",{className:mn("rounded-xl border border-dashed border-border bg-muted/30 py-14 text-center",s),children:[n&&Q.jsx(n,{size:48,strokeWidth:1.25,className:"mx-auto mb-3 text-muted-foreground/40","aria-hidden":"true"}),Q.jsx("p",{className:"text-sm text-muted-foreground",children:i}),l&&Q.jsx("div",{className:"mt-4 flex justify-center",children:l})]})}function VR({saving:n,onSave:i,onCancel:l,className:s}){const{t:c}=Ff();return Q.jsx("div",{className:mn("sticky bottom-0 z-10 -mx-5 border-t border-border/60 bg-background/90 px-5 py-3 backdrop-blur sm:-mx-8 sm:px-8",s),children:Q.jsxs("div",{className:"flex items-center justify-between gap-3",children:[Q.jsx("span",{className:"text-xs text-muted-foreground",children:c("有未保存的更改")}),Q.jsxs("div",{className:"flex items-center gap-2",children:[l&&Q.jsx(Fy,{size:"sm",variant:"ghost",onClick:l,disabled:n,children:c("取消")}),Q.jsx(Fy,{size:"sm",onClick:i,disabled:n,children:c(n?"保存中...":"保存")})]})]})})}function dT({rows:n=3}){return Q.jsxs("div",{role:"status","aria-label":"Loading",children:[Q.jsx(_t,{className:"h-7 w-36"}),Q.jsx("div",{className:"mt-6 divide-y divide-border/60",children:Array.from({length:n}).map((i,l)=>Q.jsxs("div",{className:"flex items-start justify-between gap-8 py-5",children:[Q.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[Q.jsx(_t,{className:"h-4 w-32"}),Q.jsx(_t,{className:"h-3 w-64 max-w-full"})]}),Q.jsx(_t,{className:"h-9 w-[260px] shrink-0 rounded-lg"})]},l))})]})}function GR(){return Q.jsxs("div",{role:"status","aria-label":"Loading",children:[Q.jsx(_t,{className:"h-7 w-36"}),Q.jsxs("div",{className:"mt-6 grid gap-5 lg:grid-cols-[240px_minmax(0,1fr)]",children:[Q.jsx("div",{className:"space-y-1",children:Array.from({length:5}).map((n,i)=>Q.jsxs("div",{className:"flex items-center gap-3 rounded-lg px-3 py-2.5",children:[Q.jsx(_t,{className:"h-2 w-2 rounded-full"}),Q.jsxs("div",{className:"flex-1 space-y-1.5",children:[Q.jsx(_t,{className:"h-3.5 w-3/4"}),Q.jsx(_t,{className:"h-2.5 w-1/2"})]})]},i))}),Q.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[Q.jsxs("div",{className:"flex items-start justify-between gap-4",children:[Q.jsxs("div",{className:"space-y-2",children:[Q.jsx(_t,{className:"h-5 w-44"}),Q.jsx(_t,{className:"h-3 w-28"})]}),Q.jsx(_t,{className:"h-8 w-24 rounded-md"})]}),Q.jsxs("div",{className:"mt-8 space-y-3",children:[Q.jsx(_t,{className:"h-3 w-20"}),Q.jsx(_t,{className:"h-24 w-full rounded-lg"}),Q.jsx(_t,{className:"h-3 w-20"}),Q.jsx(_t,{className:"h-16 w-full rounded-lg"})]})]})]})]})}function KR({cards:n=6}){return Q.jsxs("div",{role:"status","aria-label":"Loading",children:[Q.jsxs("div",{className:"flex items-center justify-between gap-4",children:[Q.jsx(_t,{className:"h-7 w-36"}),Q.jsx(_t,{className:"h-8 w-44 rounded-lg"})]}),Q.jsx("div",{className:"mt-6 grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:Array.from({length:n}).map((i,l)=>Q.jsxs("div",{className:"flex items-start gap-3 rounded-xl border border-border bg-card p-4",children:[Q.jsx(_t,{className:"h-10 w-10 shrink-0 rounded-full"}),Q.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[Q.jsx(_t,{className:"h-4 w-2/3"}),Q.jsx(_t,{className:"h-3 w-1/2"}),Q.jsx(_t,{className:"h-3 w-3/4"})]})]},l))})]})}const hT=T.lazy(()=>ja(()=>import("./GeneralSettingsPage-b2dViAif.js"),__vite__mapDeps([0,1,2,3,4,5])).then(n=>({default:n.GeneralSettingsPage}))),mT=T.lazy(()=>ja(()=>import("./ProviderSettingsPage-B-u7Av-v.js"),__vite__mapDeps([6,5,7,8,9,1,2,3,10,4,11,12,13,14,15,16])).then(n=>({default:n.ProviderSettingsPage}))),pT=T.lazy(()=>ja(()=>import("./TeamSettingsPage-DCsq_ojZ.js"),__vite__mapDeps([17,7,8,1,2,3,18,5,13,19])).then(n=>({default:n.TeamSettingsPage}))),yT=T.lazy(()=>ja(()=>import("./ProjectSettingsPage-CnG-6FVF.js"),__vite__mapDeps([20,21,22,23,3,8,12,13,16])).then(n=>({default:n.ProjectSettingsPage}))),gT=T.lazy(()=>ja(()=>import("./NotificationSettingsPage-DCtnFBrk.js"),__vite__mapDeps([24,1,2,3,9,10,25,23])).then(n=>({default:n.NotificationSettingsPage}))),vT=T.lazy(()=>ja(()=>import("./ProfileSettingsPage-Hplbudpu.js"),__vite__mapDeps([26,27,8,7,9,4,28,2,15])).then(n=>({default:n.ProfileSettingsPage}))),Py=[{id:"general",label:"通用",icon:GE},{id:"agents",label:"Agent 配置",icon:HE},{id:"team",label:"团队协作",icon:PE},{id:"projects",label:"项目配置",icon:YE},{id:"notifications",label:"通知",icon:BE}];function bT({tab:n}){switch(n){case"general":return Q.jsx(hT,{});case"agents":return Q.jsx(mT,{});case"team":return Q.jsx(pT,{});case"projects":return Q.jsx(yT,{});case"notifications":return Q.jsx(gT,{});case"agents-legacy":return Q.jsx(vT,{})}}function ST(){return Q.jsx(fT,{children:Q.jsx(dT,{rows:3})})}function wT(){const{t:n}=Ff(),i=Bl(m=>m.settingsOpen),l=Bl(m=>m.settingsTab),s=Bl(m=>m.closeSettings),c=Bl(m=>m.setSettingsTab),[f,d]=T.useState(!1),p=T.useRef(!1),y=T.useRef(null);return T.useEffect(()=>{if(i)d(!0),p.current||(Wx(),p.current=!0),requestAnimationFrame(()=>y.current?.focus());else{const m=setTimeout(()=>d(!1),200);return p.current&&(Vy(),p.current=!1),()=>clearTimeout(m)}},[i]),T.useEffect(()=>()=>{p.current&&(Vy(),p.current=!1)},[]),T.useEffect(()=>{if(!i)return;const m=b=>{b.key==="Escape"&&eT()===1&&s()};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[i,s]),!f&&!i?null:Q.jsxs("div",{className:mn("fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-6 transition-opacity duration-200 motion-reduce:transition-none",i?"opacity-100":"opacity-0 pointer-events-none"),children:[Q.jsx("div",{className:"absolute inset-0 bg-black/20 backdrop-blur-sm",onClick:s,"aria-hidden":"true"}),Q.jsxs("div",{ref:y,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":n("设置"),className:mn("relative flex w-full max-w-[1100px] flex-col overflow-hidden rounded-2xl bg-background shadow-[0_12px_16px_-4px_rgba(36,36,36,0.08)] ring-1 ring-foreground/5 transform transition-all duration-200 outline-none motion-reduce:transition-none","h-[min(calc(100vh-1.5rem),840px)] sm:h-[min(calc(100vh-3rem),840px)]",i?"scale-100 translate-y-0":"scale-[0.97] translate-y-1"),children:[Q.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border/60 bg-muted/40 px-5 py-3 sm:px-6",children:[Q.jsxs("div",{className:"flex items-center gap-2.5",children:[Q.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary text-primary-foreground","aria-hidden":"true",children:Q.jsx(XE,{size:14})}),Q.jsx("h2",{className:"text-[15px] font-semibold text-foreground",children:n("设置")})]}),Q.jsx("button",{onClick:s,"aria-label":n("取消"),className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",children:Q.jsx(JE,{size:15})})]}),Q.jsx("div",{className:"sm:hidden flex shrink-0 border-b border-border/60 bg-background overflow-x-auto scrollbar-none",role:"tablist",children:Py.map(m=>Q.jsxs("button",{role:"tab","aria-selected":l===m.id,onClick:()=>c(m.id),className:mn("flex items-center gap-1.5 px-4 py-2.5 text-xs whitespace-nowrap transition-colors border-b-2 -mb-px focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60 focus-visible:ring-inset",l===m.id?"border-primary text-foreground font-medium":"border-transparent text-muted-foreground hover:text-foreground"),children:[Q.jsx(m.icon,{size:13,"aria-hidden":"true"}),Q.jsx("span",{children:n(m.label)})]},m.id))}),Q.jsxs("div",{className:"flex flex-1 min-h-0",children:[Q.jsx("nav",{"aria-label":n("设置"),className:"hidden sm:flex w-[180px] shrink-0 flex-col gap-0.5 border-r border-border/60 bg-muted/30 p-3 overflow-y-auto scrollbar-app-thin",children:Py.map(m=>Q.jsxs("button",{"aria-current":l===m.id?"page":void 0,onClick:()=>c(m.id),className:mn("flex w-full items-center gap-2.5 rounded-lg px-3 py-2 text-[13px] transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/60",l===m.id?"bg-background text-foreground font-medium shadow-[0_1px_2px_rgba(0,0,0,0.05)] ring-1 ring-foreground/[0.04]":"text-muted-foreground hover:text-foreground hover:bg-background/60"),children:[Q.jsx(m.icon,{size:15,className:"shrink-0","aria-hidden":"true"}),Q.jsx("span",{children:n(m.label)})]},m.id))}),Q.jsx("div",{className:"flex-1 min-w-0 overflow-y-auto scrollbar-app-thin bg-background",children:Q.jsx(T.Suspense,{fallback:Q.jsx(ST,{}),children:Q.jsx(bT,{tab:l})})})]})]})]})}function ET(){return Q.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[Q.jsx(Pw,{}),Q.jsx(wT,{})]})}const xT=T.lazy(()=>ja(()=>import("./ProjectKanbanPage-UJVkISeV.js"),__vite__mapDeps([29,11,7,8,30,22,2,3,31,21,23,28,18,19,1,5,25,14,13,16,32])).then(n=>({default:n.ProjectKanbanPage}))),TT=T.lazy(()=>ja(()=>import("./DemoPage-8g4kqlV1.js"),[]).then(n=>({default:n.DemoPage}))),RT=T.lazy(()=>ja(()=>import("./AgentDemoPage-DRtgA1-w.js"),__vite__mapDeps([33,30,11,22,2,3,31,27,19])).then(n=>({default:n.AgentDemoPage})));function af(){const{t:n}=Ff();return Q.jsx("div",{className:"p-8",children:n("Loading...")})}const _T=new Set(["general","agents","team","projects","notifications","agents-legacy"]);function Zy(){const n=Hg(),{tab:i}=_w();return T.useEffect(()=>{const l=i&&_T.has(i)?i:"general";Bl.getState().openSettings(l),n("/",{replace:!0})},[n,i]),null}const AT=bE([{path:"/",element:Q.jsx(ET,{}),children:[{index:!0,element:Q.jsx(T.Suspense,{fallback:Q.jsx(af,{}),children:Q.jsx(xT,{})})},{path:"demo",element:Q.jsx(T.Suspense,{fallback:Q.jsx(af,{}),children:Q.jsx(TT,{})})},{path:"agent-demo",element:Q.jsx(T.Suspense,{fallback:Q.jsx(af,{}),children:Q.jsx(RT,{})})},{path:"settings",element:Q.jsx(Zy,{})},{path:"settings/:tab",element:Q.jsx(Zy,{})}]}]);function CT(){return Q.jsx(DE,{router:AT})}const fa=Object.create(null);fa.open="0";fa.close="1";fa.ping="2";fa.pong="3";fa.message="4";fa.upgrade="5";fa.noop="6";const Eo=Object.create(null);Object.keys(fa).forEach(n=>{Eo[fa[n]]=n});const Ef={type:"error",data:"parser error"},fv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",dv=typeof ArrayBuffer=="function",hv=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,Zf=({type:n,data:i},l,s)=>fv&&i instanceof Blob?l?s(i):Jy(i,s):dv&&(i instanceof ArrayBuffer||hv(i))?l?s(i):Jy(new Blob([i]),s):s(fa[n]+(i||"")),Jy=(n,i)=>{const l=new FileReader;return l.onload=function(){const s=l.result.split(",")[1];i("b"+(s||""))},l.readAsDataURL(n)};function Iy(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let rf;function OT(n,i){if(fv&&n.data instanceof Blob)return n.data.arrayBuffer().then(Iy).then(i);if(dv&&(n.data instanceof ArrayBuffer||hv(n.data)))return i(Iy(n.data));Zf(n,!1,l=>{rf||(rf=new TextEncoder),i(rf.encode(l))})}const $y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ql=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<$y.length;n++)ql[$y.charCodeAt(n)]=n;const MT=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=ql[n.charCodeAt(s)],d=ql[n.charCodeAt(s+1)],p=ql[n.charCodeAt(s+2)],y=ql[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},DT=typeof ArrayBuffer=="function",Jf=(n,i)=>{if(typeof n!="string")return{type:"message",data:mv(n,i)};const l=n.charAt(0);return l==="b"?{type:"message",data:NT(n.substring(1),i)}:Eo[l]?n.length>1?{type:Eo[l],data:n.substring(1)}:{type:Eo[l]}:Ef},NT=(n,i)=>{if(DT){const l=MT(n);return mv(l,i)}else return{base64:!0,data:n}},mv=(n,i)=>i==="blob"?n instanceof Blob?n:new Blob([n]):n instanceof ArrayBuffer?n:n.buffer,pv="",zT=(n,i)=>{const l=n.length,s=new Array(l);let c=0;n.forEach((f,d)=>{Zf(f,!1,p=>{s[d]=p,++c===l&&i(s.join(pv))})})},kT=(n,i)=>{const l=n.split(pv),s=[];for(let c=0;c<l.length;c++){const f=Jf(l[c],i);if(s.push(f),f.type==="error")break}return s};function UT(){return new TransformStream({transform(n,i){OT(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 lf;function yo(n){return n.reduce((i,l)=>i+l.length,0)}function go(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 LT(n,i){lf||(lf=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(yo(l)<1)break;const y=go(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(yo(l)<2)break;const y=go(l,2);c=new DataView(y.buffer,y.byteOffset,y.length).getUint16(0),s=3}else if(s===2){if(yo(l)<8)break;const y=go(l,8),m=new DataView(y.buffer,y.byteOffset,y.length),b=m.getUint32(0);if(b>Math.pow(2,21)-1){p.enqueue(Ef);break}c=b*Math.pow(2,32)+m.getUint32(4),s=3}else{if(yo(l)<c)break;const y=go(l,c);p.enqueue(Jf(f?y:lf.decode(y),i)),s=0}if(c===0||c>n){p.enqueue(Ef);break}}}})}const yv=4;function Dt(n){if(n)return jT(n)}function jT(n){for(var i in Dt.prototype)n[i]=Dt.prototype[i];return n}Dt.prototype.on=Dt.prototype.addEventListener=function(n,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(i),this};Dt.prototype.once=function(n,i){function l(){this.off(n,l),i.apply(this,arguments)}return l.fn=i,this.on(n,l),this};Dt.prototype.off=Dt.prototype.removeListener=Dt.prototype.removeAllListeners=Dt.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};Dt.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};Dt.prototype.emitReserved=Dt.prototype.emit;Dt.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};Dt.prototype.hasListeners=function(n){return!!this.listeners(n).length};const ko=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")(),BT="arraybuffer";function gv(n,...i){return i.reduce((l,s)=>(n.hasOwnProperty(s)&&(l[s]=n[s]),l),{})}const qT=Qn.setTimeout,HT=Qn.clearTimeout;function Uo(n,i){i.useNativeTimers?(n.setTimeoutFn=qT.bind(Qn),n.clearTimeoutFn=HT.bind(Qn)):(n.setTimeoutFn=Qn.setTimeout.bind(Qn),n.clearTimeoutFn=Qn.clearTimeout.bind(Qn))}const QT=1.33;function YT(n){return typeof n=="string"?VT(n):Math.ceil((n.byteLength||n.size)*QT)}function VT(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 vv(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function GT(n){let i="";for(let l in n)n.hasOwnProperty(l)&&(i.length&&(i+="&"),i+=encodeURIComponent(l)+"="+encodeURIComponent(n[l]));return i}function KT(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 XT extends Error{constructor(i,l,s){super(i),this.description=l,this.context=s,this.type="TransportError"}}class If extends Dt{constructor(i){super(),this.writable=!1,Uo(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 XT(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=Jf(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=GT(i);return l.length?"?"+l:""}}class FT extends If{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)};kT(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,zT(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]=vv()),!this.supportsBinary&&!l.sid&&(l.b64=1),this.createUri(i,l)}}let bv=!1;try{bv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const PT=bv;function ZT(){}class JT extends FT{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 Ur=class xo extends Dt{constructor(i,l,s){super(),this.createRequest=i,Uo(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=gv(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=xo.requestsCount++,xo.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=ZT,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete xo.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()}};Ur.requestsCount=0;Ur.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Wy);else if(typeof addEventListener=="function"){const n="onpagehide"in Qn?"pagehide":"unload";addEventListener(n,Wy,!1)}}function Wy(){for(let n in Ur.requests)Ur.requests.hasOwnProperty(n)&&Ur.requests[n].abort()}const IT=(function(){const n=Sv({xdomain:!1});return n&&n.responseType!==null})();class $T extends JT{constructor(i){super(i);const l=i&&i.forceBase64;this.supportsBinary=IT&&!l}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new Ur(Sv,this.uri(),i)}}function Sv(n){const i=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||PT))return new XMLHttpRequest}catch{}if(!i)try{return new Qn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const wv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class WT extends If{get name(){return"websocket"}doOpen(){const i=this.uri(),l=this.opts.protocols,s=wv?{}:gv(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;Zf(s,this.supportsBinary,f=>{try{this.doWrite(s,f)}catch{}c&&ko(()=>{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]=vv()),this.supportsBinary||(l.b64=1),this.createUri(i,l)}}const sf=Qn.WebSocket||Qn.MozWebSocket;class eR extends WT{createSocket(i,l,s){return wv?new sf(i,l,s):l?new sf(i,l):new sf(i)}doWrite(i,l){this.ws.send(l)}}class tR extends If{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=LT(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=i.readable.pipeThrough(l).getReader(),c=UT();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&&ko(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const nR={websocket:eR,webtransport:tR,polling:$T},aR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,iR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function xf(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=aR.exec(n||""),f={},d=14;for(;d--;)f[iR[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=rR(f,f.path),f.queryKey=lR(f,f.query),f}function rR(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 lR(n,i){const l={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,c,f){c&&(l[c]=f)}),l}const Tf=typeof addEventListener=="function"&&typeof removeEventListener=="function",To=[];Tf&&addEventListener("offline",()=>{To.forEach(n=>n())},!1);class mi extends Dt{constructor(i,l){if(super(),this.binaryType=BT,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=xf(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=xf(l.host).host);Uo(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=KT(this.opts.query)),Tf&&(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"})},To.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){const l=Object.assign({},this.opts.query);l.EIO=yv,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&&mi.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",mi.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+=YT(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,ko(()=>{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(mi.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(),Tf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=To.indexOf(this._offlineEventListener);s!==-1&&To.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,l),this.writeBuffer=[],this._prevBufferLen=0}}}mi.protocol=yv;class sR extends mi{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;mi.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;mi.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 E=new Error("probe error");E.transport=l.name,this.emitReserved("upgradeError",E)}}))};function f(){s||(s=!0,b(),l.close(),l=null)}const d=g=>{const E=new Error("probe error: "+g);E.transport=l.name,f(),this.emitReserved("upgradeError",E)};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 oR=class extends sR{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=>nR[c]).filter(c=>!!c)),super(i,s)}};function uR(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=xf(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 cR=typeof ArrayBuffer=="function",fR=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,Ev=Object.prototype.toString,dR=typeof Blob=="function"||typeof Blob<"u"&&Ev.call(Blob)==="[object BlobConstructor]",hR=typeof File=="function"||typeof File<"u"&&Ev.call(File)==="[object FileConstructor]";function $f(n){return cR&&(n instanceof ArrayBuffer||fR(n))||dR&&n instanceof Blob||hR&&n instanceof File}function Ro(n,i){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let l=0,s=n.length;l<s;l++)if(Ro(n[l]))return!0;return!1}if($f(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return Ro(n.toJSON(),!0);for(const l in n)if(Object.prototype.hasOwnProperty.call(n,l)&&Ro(n[l]))return!0;return!1}function mR(n){const i=[],l=n.data,s=n;return s.data=Rf(l,i),s.attachments=i.length,{packet:s,buffers:i}}function Rf(n,i){if(!n)return n;if($f(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]=Rf(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]=Rf(n[s],i));return l}return n}function pR(n,i){return n.data=_f(n.data,i),delete n.attachments,n}function _f(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]=_f(n[l],i);else if(typeof n=="object")for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&(n[l]=_f(n[l],i));return n}const yR=["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 gR{constructor(i){this.replacer=i}encode(i){return(i.type===Fe.EVENT||i.type===Fe.ACK)&&Ro(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=mR(i),s=this.encodeAsString(l.packet),c=l.buffers;return c.unshift(s),c}}class Wf extends Dt{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 vR(l),l.attachments===0&&super.emitReserved("decoded",l)):super.emitReserved("decoded",l)}else if($f(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(Wf.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 eg(l);case Fe.DISCONNECT:return l===void 0;case Fe.CONNECT_ERROR:return typeof l=="string"||eg(l);case Fe.EVENT:case Fe.BINARY_EVENT:return Array.isArray(l)&&(typeof l[0]=="number"||typeof l[0]=="string"&&yR.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 vR{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=pR(this.reconPack,this.buffers);return this.finishedReconstruction(),l}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function eg(n){return Object.prototype.toString.call(n)==="[object Object]"}const bR=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Wf,Encoder:gR,get PacketType(){return Fe}},Symbol.toStringTag,{value:"Module"}));function Wn(n,i,l){return n.on(i,l),function(){n.off(i,l)}}const SR=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class xv extends Dt{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=[Wn(i,"open",this.onopen.bind(this)),Wn(i,"packet",this.onpacket.bind(this)),Wn(i,"error",this.onerror.bind(this)),Wn(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(SR.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 qr(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}qr.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};qr.prototype.reset=function(){this.attempts=0};qr.prototype.setMin=function(n){this.ms=n};qr.prototype.setMax=function(n){this.max=n};qr.prototype.setJitter=function(n){this.jitter=n};class Af extends Dt{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,Uo(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 qr({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||bR;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 oR(this.uri,this.opts);const l=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const c=Wn(l,"open",function(){s.onopen(),i&&i()}),f=p=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",p),i?i(p):this.maybeReconnectOnOpen()},d=Wn(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(Wn(i,"ping",this.onping.bind(this)),Wn(i,"data",this.ondata.bind(this)),Wn(i,"error",this.onerror.bind(this)),Wn(i,"close",this.onclose.bind(this)),Wn(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){ko(()=>{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 xv(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 Ul={};function _o(n,i){typeof n=="object"&&(i=n,n=void 0),i=i||{};const l=uR(n,i.path||"/socket.io"),s=l.source,c=l.id,f=l.path,d=Ul[c]&&f in Ul[c].nsps,p=i.forceNew||i["force new connection"]||i.multiplex===!1||d;let y;return p?y=new Af(s,i):(Ul[c]||(Ul[c]=new Af(s,i)),y=Ul[c]),l.query&&!i.query&&(i.query=l.queryKey),y.socket(l.path,i)}Object.assign(_o,{Manager:Af,Socket:xv,io:_o,connect:_o});const vo="/events",FR={SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",INPUT:"input",RESIZE:"resize",TERMINAL_INPUT:"terminal:input",TERMINAL_RESIZE:"terminal:resize"},di={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",WORKSPACE_GIT_CHANGED:"workspace:git_changed",TEAM_RUN_INVALIDATED:"team-run:invalidated"};class wR{socket=null;baseUrl;visibilityHandler=null;constructor(){this.baseUrl=""}getSocket(){return this.socket||(this.socket=_o(`${this.baseUrl}${vo}`,{autoConnect:!1,transports:["websocket"],reconnection:!0,reconnectionAttempts:1/0,reconnectionDelay:1e3,reconnectionDelayMax:1e4}),this.socket.on("connect",()=>{console.log(`[Socket] Connected to ${vo} t=${Date.now()}`)}),this.socket.on("disconnect",i=>{console.log(`[Socket] Disconnected from ${vo}: t=${Date.now()}`,i)}),this.socket.on("connect_error",i=>{console.error(`[Socket] Connection error on ${vo}: 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 Kl=new wR;function Tv(n,i,l){const s=f=>Ao(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:Pe.tasks.detail(i),exact:!0}),n.removeQueries({queryKey:Pe.tasks.body(i),exact:!0}),c}function Ao(n,i){return!Array.isArray(n)||n[0]!=="tasks"||n[1]!=="list"?!1:i?n[2]===i:!0}function ER(n,i){for(const[l,s]of i)n.setQueryData(l,s)}function PR(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)),pi({queryKey:Pe.tasks.list(n,i),queryFn:()=>ot.get(`/projects/${n}/tasks`,{params:l}),enabled:!!n})}function ZR(n,i=!0){return pi({queryKey:Pe.tasks.body(n),queryFn:()=>ot.get(`/tasks/${n}/body`),enabled:!!n&&i})}function JR(){const n=yt();return qt({mutationFn:({id:i,status:l})=>ot.patch(`/tasks/${i}/status`,{status:l}),onSuccess:i=>{n.invalidateQueries({queryKey:Pe.tasks.all}),n.invalidateQueries({queryKey:Pe.tasks.detail(i.id)})}})}function IR(){const n=yt();return qt({mutationFn:i=>ot.delete(`/tasks/${i}`),onMutate:async i=>(await n.cancelQueries({queryKey:Pe.tasks.all}),{snapshots:Tv(n,i)}),onError:(i,l,s)=>{s?.snapshots&&ER(n,s.snapshots)},onSuccess:()=>{n.invalidateQueries({queryKey:Pe.tasks.all}),n.invalidateQueries({queryKey:Pe.projects.all})}})}function $R(){const n=yt();return qt({mutationFn:i=>ot.post(`/tasks/${i}/retry`,{}),onSuccess:i=>{n.invalidateQueries({queryKey:Pe.tasks.all}),n.invalidateQueries({queryKey:Pe.workspaces.all}),n.invalidateQueries({queryKey:Pe.tasks.detail(i.id)}),n.invalidateQueries({queryKey:Pe.tasks.body(i.id)})}})}function xR(){const n=yt();T.useEffect(()=>{const i=Kl.connect(),l=()=>{n.invalidateQueries({queryKey:Pe.tasks.all})},s=async f=>{await n.cancelQueries({predicate:d=>Ao(d.queryKey,f.projectId)}),n.invalidateQueries({predicate:d=>Ao(d.queryKey,f.projectId)}),n.invalidateQueries({queryKey:Pe.tasks.detail(f.taskId)})},c=f=>{Tv(n,f.taskId,f.projectId),n.invalidateQueries({predicate:d=>Ao(d.queryKey,f.projectId)}),n.invalidateQueries({queryKey:Pe.projects.all})};return i.on("connect",l),i.on(di.TASK_UPDATED,s),i.on(di.TASK_DELETED,c),()=>{i.off("connect",l),i.off(di.TASK_UPDATED,s),i.off(di.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]},Rv=5e3;function _v(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 tg(n,i){return!n||n.id!==i.teamRunId?n:{...n,messages:_v(n.messages,i)}}function Av(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 Hr(n,i){const l=Av(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:Pe.tasks.all}),n.invalidateQueries({queryKey:Pe.workspaces.all}),l&&(n.invalidateQueries({queryKey:Pe.tasks.detail(l)}),n.invalidateQueries({queryKey:De.task(l)}),n.invalidateQueries({queryKey:Pe.workspaces.list(l)}))}function WR(){return pi({queryKey:De.memberPresets,queryFn:()=>ot.get("/member-presets")})}function e2(){const n=yt();return qt({mutationFn:i=>ot.post("/member-presets",i),onSuccess:()=>{n.invalidateQueries({queryKey:De.memberPresets}),n.invalidateQueries({queryKey:De.teamTemplates})}})}function t2(){const n=yt();return qt({mutationFn:({id:i,data:l})=>ot.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 n2(){const n=yt();return qt({mutationFn:i=>ot.delete(`/member-presets/${i}`),onSuccess:()=>{n.invalidateQueries({queryKey:De.memberPresets}),n.invalidateQueries({queryKey:De.teamTemplates})}})}function a2(){return pi({queryKey:De.teamTemplates,queryFn:()=>ot.get("/team-templates")})}function i2(){const n=yt();return qt({mutationFn:i=>ot.post("/team-templates",i),onSuccess:()=>{n.invalidateQueries({queryKey:De.teamTemplates})}})}function r2(){const n=yt();return qt({mutationFn:({id:i,data:l})=>ot.patch(`/team-templates/${i}`,l),onSuccess:(i,l)=>{n.invalidateQueries({queryKey:De.teamTemplates}),n.invalidateQueries({queryKey:De.teamTemplateDetail(l.id)})}})}function l2(){const n=yt();return qt({mutationFn:i=>ot.delete(`/team-templates/${i}`),onSuccess:()=>{n.invalidateQueries({queryKey:De.teamTemplates})}})}function s2(){const n=yt();return qt({mutationFn:({taskId:i,...l})=>ot.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:Pe.tasks.all}),n.invalidateQueries({queryKey:Pe.tasks.detail(l.taskId)}),n.invalidateQueries({queryKey:Pe.workspaces.all}),n.invalidateQueries({queryKey:Pe.workspaces.list(l.taskId)})},onError:(i,l)=>{n.invalidateQueries({queryKey:De.task(l.taskId)}),n.invalidateQueries({queryKey:De.all})}})}function o2(n){return pi({queryKey:De.task(n),queryFn:async()=>{try{return await ot.get(`/tasks/${n}/team-run`)}catch(i){if(i instanceof Xf&&i.status===404)return null;throw i}},enabled:!!n,retry:!1,refetchInterval:i=>i.state.data?Rv:!1})}function u2(n){return pi({queryKey:De.messages(n),queryFn:async()=>{try{return await ot.get(`/team-runs/${n}/messages`)}catch(i){if(i instanceof Xf&&i.status===404)return[];throw i}},enabled:!!n,retry:!1,refetchInterval:Rv})}function c2(n){const i=yt();return qt({mutationFn:l=>ot.post(`/team-runs/${n}/messages`,l),onSuccess:l=>{i.setQueryData(De.messages(n),c=>_v(c,l)),i.setQueryData(De.detail(n),c=>tg(c,l));const s=Av(i,n);s&&i.setQueryData(De.task(s),c=>tg(c,l)),i.invalidateQueries({queryKey:De.all}),i.invalidateQueries({queryKey:["tasks"]}),i.invalidateQueries({queryKey:Pe.workspaces.all})}})}function f2(n){const i=yt();return qt({mutationFn:l=>ot.post(`/team-runs/${n}/members`,l),onSuccess:()=>{Hr(i,n)}})}function d2(n){const i=yt();return qt({mutationFn:({memberId:l,data:s})=>ot.patch(`/team-runs/${n}/members/${l}`,s),onSuccess:()=>{Hr(i,n)}})}function h2(n){const i=yt();return qt({mutationFn:({memberId:l,stopActive:s=!0,cancelQueued:c=!0})=>ot.post(`/team-runs/${n}/members/${l}/remove`,{stopActive:s,cancelQueued:c}),onSuccess:()=>{Hr(i,n)}})}function m2(n){const i=yt();return qt({mutationFn:l=>ot.post(`/team-runs/work-requests/${l}/approve`),onSuccess:()=>{Hr(i,n)}})}function p2(n){const i=yt();return qt({mutationFn:l=>ot.post(`/team-runs/work-requests/${l}/reject`),onSuccess:()=>{Hr(i,n)}})}function y2(n){const i=yt();return qt({mutationFn:({memberId:l,cancelQueued:s})=>ot.post(`/team-runs/${n}/members/${l}/stop`,{cancelQueued:s}),onSuccess:()=>{Hr(i,n)}})}function oa(n,i){return n.scopes.includes(i)}function TR(){const n=yt();T.useEffect(()=>{const i=Kl.connect(),l=f=>{if(!f){n.invalidateQueries({queryKey:De.all});return}n.invalidateQueries({queryKey:De.detail(f.teamRunId)}),(oa(f,"team-run")||oa(f,"team-members"))&&n.invalidateQueries({queryKey:De.all}),oa(f,"room-messages")&&n.invalidateQueries({queryKey:De.messages(f.teamRunId)}),oa(f,"work-requests")&&n.invalidateQueries({queryKey:De.workRequests(f.teamRunId)}),oa(f,"agent-invocations")&&n.invalidateQueries({queryKey:De.invocations(f.teamRunId)}),f.taskId&&n.invalidateQueries({queryKey:De.task(f.taskId)}),f.taskId&&(oa(f,"task")||oa(f,"team-run"))&&n.invalidateQueries({queryKey:Pe.tasks.detail(f.taskId)}),f.projectId&&(oa(f,"task")||oa(f,"team-run"))&&n.invalidateQueries({queryKey:Pe.tasks.list(f.projectId)}),oa(f,"workspaces")&&(n.invalidateQueries({queryKey:Pe.workspaces.all}),f.taskId&&n.invalidateQueries({queryKey:Pe.workspaces.list(f.taskId)}))},s=()=>l(),c=f=>l(f);return i.on("connect",s),i.on(di.TEAM_RUN_INVALIDATED,c),()=>{i.off("connect",s),i.off(di.TEAM_RUN_INVALIDATED,c)}},[n])}function RR(n,i){return n[0]==="git"&&n[2]===i}function Cv(n){n.invalidateQueries({queryKey:Pe.git.all}),n.invalidateQueries({queryKey:["workspaces","gitStatus"]}),n.invalidateQueries({queryKey:["workspaces","diff"]})}function _R(n,i){if(!i?.workspaceId||!i?.workingDir){Cv(n);return}n.invalidateQueries({predicate:l=>RR(l.queryKey,i.workingDir)}),n.invalidateQueries({queryKey:Pe.workspaces.gitStatus(i.workspaceId)}),n.invalidateQueries({queryKey:Pe.workspaces.diff(i.workspaceId)})}function AR(){const n=yt();T.useEffect(()=>{const i=Kl.connect(),l=()=>{Cv(n)},s=c=>{_R(n,c)};return i.on("connect",l),i.on(di.WORKSPACE_GIT_CHANGED,s),()=>{i.off("connect",l),i.off(di.WORKSPACE_GIT_CHANGED,s)}},[n])}function CR(){return xR(),TR(),AR(),null}function OR(){return T.useEffect(()=>(Kl.connect(),()=>Kl.disconnect()),[]),Q.jsx(pS,{client:n1,children:Q.jsxs(cx,{children:[Q.jsx(CR,{}),Q.jsx(CT,{}),Q.jsx(t1,{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 MR="/api/tunnel/bootstrap";async function DR(){const n=new URL(window.location.href),i=n.searchParams.get("token");if(!i)return;const l=await fetch(`${MR}?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 NR(){try{await DR()}catch(n){console.error("[Tunnel] Failed to bootstrap tunnel session",n)}Kb.createRoot(document.getElementById("root")).render(Q.jsx(T.StrictMode,{children:Q.jsx(OR,{})}))}NR();export{Co as $,r2 as A,Fy as B,l2 as C,KR as D,Kl as E,di as F,FR as G,XE as H,GR as I,VR as J,dT as K,Xg as L,BE as M,Wx as N,Vy as O,pg as P,YE as Q,HE as R,fT as S,ux as T,sS as U,ny as V,kR as W,JE as X,zR as Y,Lr as Z,Lt as _,ax as a,rg as a0,yS as a1,bS as a2,xS as a3,SS as a4,wS as a5,tn as a6,RS as a7,ay as a8,TS as a9,ja as aA,ex as aB,ES as aa,_S as ab,ee as ac,m2 as ad,p2 as ae,y2 as af,PE as ag,f2 as ah,d2 as ai,h2 as aj,Xf as ak,jR as al,s2 as am,c2 as an,o2 as ao,u2 as ap,ZR as aq,$R as ar,De as as,PR as at,IR as au,JR as av,Bl as aw,ng as ax,$x as ay,$g as az,LR as b,ix as c,BR as d,HR as e,qR as f,mn as g,Pi as h,pi as i,Q as j,yt as k,qt as l,ot as m,YR as n,QR as o,_t as p,Pe as q,T as r,WR as s,GS as t,Ff as u,a2 as v,e2 as w,t2 as x,n2 as y,i2 as z};