@mrpatronz/nexusflow 2.11.0 → 2.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +154 -13
  3. package/dist/analyzers/detect-deps.js +1 -1
  4. package/dist/analyzers/detect-deps.js.map +1 -1
  5. package/dist/commands/commit.d.ts.map +1 -1
  6. package/dist/commands/commit.js +15 -0
  7. package/dist/commands/commit.js.map +1 -1
  8. package/dist/commands/create.d.ts +10 -1
  9. package/dist/commands/create.d.ts.map +1 -1
  10. package/dist/commands/create.js +44 -23
  11. package/dist/commands/create.js.map +1 -1
  12. package/dist/commands/finish.d.ts.map +1 -1
  13. package/dist/commands/finish.js +15 -0
  14. package/dist/commands/finish.js.map +1 -1
  15. package/dist/commands/flow.d.ts +13 -0
  16. package/dist/commands/flow.d.ts.map +1 -0
  17. package/dist/commands/flow.js +91 -0
  18. package/dist/commands/flow.js.map +1 -0
  19. package/dist/commands/skill.d.ts +28 -0
  20. package/dist/commands/skill.d.ts.map +1 -0
  21. package/dist/commands/skill.js +250 -0
  22. package/dist/commands/skill.js.map +1 -0
  23. package/dist/commands/status.d.ts.map +1 -1
  24. package/dist/commands/status.js +14 -0
  25. package/dist/commands/status.js.map +1 -1
  26. package/dist/commands/tag.d.ts +13 -0
  27. package/dist/commands/tag.d.ts.map +1 -0
  28. package/dist/commands/tag.js +179 -0
  29. package/dist/commands/tag.js.map +1 -0
  30. package/dist/commands/verify.d.ts +16 -0
  31. package/dist/commands/verify.d.ts.map +1 -0
  32. package/dist/commands/verify.js +91 -0
  33. package/dist/commands/verify.js.map +1 -0
  34. package/dist/core/adapters/local-storage.d.ts.map +1 -1
  35. package/dist/core/adapters/local-storage.js +2 -2
  36. package/dist/core/adapters/local-storage.js.map +1 -1
  37. package/dist/core/commit.d.ts +2 -0
  38. package/dist/core/commit.d.ts.map +1 -1
  39. package/dist/core/commit.js +15 -0
  40. package/dist/core/commit.js.map +1 -1
  41. package/dist/core/domain-catalog.d.ts +9 -0
  42. package/dist/core/domain-catalog.d.ts.map +1 -0
  43. package/dist/core/domain-catalog.js +47 -0
  44. package/dist/core/domain-catalog.js.map +1 -0
  45. package/dist/core/domain-packs.d.ts +81 -0
  46. package/dist/core/domain-packs.d.ts.map +1 -0
  47. package/dist/core/domain-packs.js +443 -0
  48. package/dist/core/domain-packs.js.map +1 -0
  49. package/dist/core/generation-lock.d.ts +1 -1
  50. package/dist/core/generation-lock.d.ts.map +1 -1
  51. package/dist/core/generation-lock.js +18 -11
  52. package/dist/core/generation-lock.js.map +1 -1
  53. package/dist/core/lifecycle.d.ts +28 -0
  54. package/dist/core/lifecycle.d.ts.map +1 -0
  55. package/dist/core/lifecycle.js +423 -0
  56. package/dist/core/lifecycle.js.map +1 -0
  57. package/dist/core/planning-notes.d.ts +11 -0
  58. package/dist/core/planning-notes.d.ts.map +1 -0
  59. package/dist/core/planning-notes.js +108 -0
  60. package/dist/core/planning-notes.js.map +1 -0
  61. package/dist/core/verify.d.ts +39 -0
  62. package/dist/core/verify.d.ts.map +1 -0
  63. package/dist/core/verify.js +397 -0
  64. package/dist/core/verify.js.map +1 -0
  65. package/dist/core/work-guidance.d.ts +202 -0
  66. package/dist/core/work-guidance.d.ts.map +1 -0
  67. package/dist/core/work-guidance.js +231 -0
  68. package/dist/core/work-guidance.js.map +1 -0
  69. package/dist/core/workspace-git.d.ts.map +1 -1
  70. package/dist/core/workspace-git.js +1 -0
  71. package/dist/core/workspace-git.js.map +1 -1
  72. package/dist/core/workspace-state.d.ts +24 -3
  73. package/dist/core/workspace-state.d.ts.map +1 -1
  74. package/dist/core/workspace-state.js +93 -31
  75. package/dist/core/workspace-state.js.map +1 -1
  76. package/dist/core/workspace-tools.d.ts +10 -0
  77. package/dist/core/workspace-tools.d.ts.map +1 -0
  78. package/dist/core/workspace-tools.js +123 -0
  79. package/dist/core/workspace-tools.js.map +1 -0
  80. package/dist/core/workspace.d.ts.map +1 -1
  81. package/dist/core/workspace.js +7 -17
  82. package/dist/core/workspace.js.map +1 -1
  83. package/dist/generators/base.d.ts.map +1 -1
  84. package/dist/generators/base.js +42 -5
  85. package/dist/generators/base.js.map +1 -1
  86. package/dist/generators/index.d.ts.map +1 -1
  87. package/dist/generators/index.js +11 -0
  88. package/dist/generators/index.js.map +1 -1
  89. package/dist/generators/plan-generator.d.ts.map +1 -1
  90. package/dist/generators/plan-generator.js +61 -58
  91. package/dist/generators/plan-generator.js.map +1 -1
  92. package/dist/generators/skills-generator.d.ts.map +1 -1
  93. package/dist/generators/skills-generator.js +36 -3
  94. package/dist/generators/skills-generator.js.map +1 -1
  95. package/dist/gui/assets/AgentsPage-C7Rh_dp7.js +3 -0
  96. package/dist/gui/assets/DashboardPage-YVONGtqS.js +1 -0
  97. package/dist/gui/assets/{GettingStartedPage-1MOTng3B.js → GettingStartedPage-C2Kbvz_N.js} +1 -1
  98. package/dist/gui/assets/ProjectsPage-DOpfV2Oj.js +1 -0
  99. package/dist/gui/assets/{ScaffoldRepoInline-CP0yn5mw.js → ScaffoldRepoInline-D91aitAi.js} +1 -1
  100. package/dist/gui/assets/{SettingsPage-DWmrLV8o.js → SettingsPage-BdaHN6fa.js} +1 -1
  101. package/dist/gui/assets/SkillsPage-DT9lRkCg.js +7 -0
  102. package/dist/gui/assets/StartWorkPage-D932lq9x.js +1 -0
  103. package/dist/gui/assets/{StrategiesPage-CdCbbIu-.js → StrategiesPage-DCfS-wdu.js} +2 -2
  104. package/dist/gui/assets/WorkroomsPage-BQU27nWS.js +4 -0
  105. package/dist/gui/assets/WorkspacesPage-D3TLVmq-.js +13 -0
  106. package/dist/gui/assets/{alert-dialog-u7qgb9Hq.js → alert-dialog-YynbGyj1.js} +1 -1
  107. package/dist/gui/assets/badge-DTBzXOWn.js +1 -0
  108. package/dist/gui/assets/index-er-mkc2S.css +2 -0
  109. package/dist/gui/assets/index-hTa55BQ6.js +57 -0
  110. package/dist/gui/assets/square-check-big-Bj8Rf_dH.js +1 -0
  111. package/dist/gui/assets/tabs-DfW7Akjs.js +1 -0
  112. package/dist/gui/assets/{useAriaLabelledBy-C4zV-1Ra.js → useAriaLabelledBy-BmJErI5a.js} +1 -1
  113. package/dist/gui/assets/vsc-BsVrJLSg.js +1 -0
  114. package/dist/gui/index.html +3 -5
  115. package/dist/http/work-guidance-routes.d.ts +4 -0
  116. package/dist/http/work-guidance-routes.d.ts.map +1 -0
  117. package/dist/http/work-guidance-routes.js +50 -0
  118. package/dist/http/work-guidance-routes.js.map +1 -0
  119. package/dist/index.js +169 -1
  120. package/dist/index.js.map +1 -1
  121. package/dist/mcp/tools.d.ts +0 -7
  122. package/dist/mcp/tools.d.ts.map +1 -1
  123. package/dist/mcp/tools.js +207 -0
  124. package/dist/mcp/tools.js.map +1 -1
  125. package/dist/resources/contracts.d.ts.map +1 -1
  126. package/dist/resources/contracts.js +2 -1
  127. package/dist/resources/contracts.js.map +1 -1
  128. package/dist/resources/fs-safety.d.ts.map +1 -1
  129. package/dist/resources/fs-safety.js +2 -1
  130. package/dist/resources/fs-safety.js.map +1 -1
  131. package/dist/resources/materializer.d.ts +3 -0
  132. package/dist/resources/materializer.d.ts.map +1 -1
  133. package/dist/resources/materializer.js +45 -19
  134. package/dist/resources/materializer.js.map +1 -1
  135. package/dist/resources/service.d.ts +1 -1
  136. package/dist/resources/service.d.ts.map +1 -1
  137. package/dist/resources/service.js +3 -2
  138. package/dist/resources/service.js.map +1 -1
  139. package/dist/server.d.ts.map +1 -1
  140. package/dist/server.js +333 -8
  141. package/dist/server.js.map +1 -1
  142. package/dist/static-resources/skills/contextspace-verify-release/SKILL.md +51 -0
  143. package/dist/static-resources/skills/contextspace-verify-release/references/evidence.md +21 -0
  144. package/dist/static-resources/skills/nexusflow-dev/SKILL.md +49 -0
  145. package/dist/static-resources/skills/nexusflow-dev/references/cli-conventions.md +15 -0
  146. package/dist/static-resources/skills/nexusflow-dev/references/verification-checklist.md +28 -0
  147. package/dist/static-resources/skills/nexusflow-lifecycle/SKILL.md +66 -0
  148. package/dist/static-resources/skills/nexusflow-lifecycle/references/epic-deliverables.md +36 -0
  149. package/dist/static-resources/skills/nexusflow-lifecycle/references/flow-selection-matrix.md +21 -0
  150. package/dist/static-resources/skills/nexusflow-lifecycle/references/stage-outcomes.md +23 -0
  151. package/dist/static-resources/workflows/epic-multi-slice.md +21 -0
  152. package/dist/static-resources/workflows/plan-implement-review.md +17 -6
  153. package/dist/static-resources/workflows/research-verify.md +15 -4
  154. package/dist/static-resources/workflows/solo-developer.md +11 -2
  155. package/dist/test-setup.d.ts +2 -0
  156. package/dist/test-setup.d.ts.map +1 -0
  157. package/dist/test-setup.js +8 -0
  158. package/dist/test-setup.js.map +1 -0
  159. package/dist/types.d.ts +178 -0
  160. package/dist/types.d.ts.map +1 -1
  161. package/dist/utils/resolve-workspace.d.ts.map +1 -1
  162. package/dist/utils/resolve-workspace.js +15 -8
  163. package/dist/utils/resolve-workspace.js.map +1 -1
  164. package/dist/utils/skills-catalog.d.ts +18 -9
  165. package/dist/utils/skills-catalog.d.ts.map +1 -1
  166. package/dist/utils/skills-catalog.js +248 -344
  167. package/dist/utils/skills-catalog.js.map +1 -1
  168. package/dist/utils/workflow-advisor.d.ts +1 -1
  169. package/dist/utils/workflow-advisor.d.ts.map +1 -1
  170. package/dist/utils/workflow-advisor.js +16 -4
  171. package/dist/utils/workflow-advisor.js.map +1 -1
  172. package/dist/utils/workflows.d.ts.map +1 -1
  173. package/dist/utils/workflows.js +5 -2
  174. package/dist/utils/workflows.js.map +1 -1
  175. package/dist/workrooms/contracts.d.ts +3 -3
  176. package/dist/workrooms/local-resources.d.ts +4 -1
  177. package/dist/workrooms/local-resources.d.ts.map +1 -1
  178. package/dist/workrooms/manager.d.ts +5 -2
  179. package/dist/workrooms/manager.d.ts.map +1 -1
  180. package/dist/workrooms/store.d.ts +2 -2
  181. package/package.json +3 -2
  182. package/resources/skills/contextspace-verify-release/SKILL.md +51 -0
  183. package/resources/skills/contextspace-verify-release/references/evidence.md +21 -0
  184. package/resources/skills/nexusflow-dev/SKILL.md +49 -0
  185. package/resources/skills/nexusflow-dev/references/cli-conventions.md +15 -0
  186. package/resources/skills/nexusflow-dev/references/verification-checklist.md +28 -0
  187. package/resources/skills/nexusflow-lifecycle/SKILL.md +66 -0
  188. package/resources/skills/nexusflow-lifecycle/references/epic-deliverables.md +36 -0
  189. package/resources/skills/nexusflow-lifecycle/references/flow-selection-matrix.md +21 -0
  190. package/resources/skills/nexusflow-lifecycle/references/stage-outcomes.md +23 -0
  191. package/resources/workflows/epic-multi-slice.md +21 -0
  192. package/resources/workflows/plan-implement-review.md +17 -6
  193. package/resources/workflows/research-verify.md +15 -4
  194. package/resources/workflows/solo-developer.md +11 -2
  195. package/dist/gui/assets/AgentsPage-DbivhmK0.js +0 -3
  196. package/dist/gui/assets/DashboardPage-D50Qrm3e.js +0 -1
  197. package/dist/gui/assets/NullStore-tdPen1kp.js +0 -1
  198. package/dist/gui/assets/ProjectsPage-srKgf7VN.js +0 -1
  199. package/dist/gui/assets/SkillsPage-CKjTXdrd.js +0 -6
  200. package/dist/gui/assets/StartWorkPage-BCUnJ9k8.js +0 -1
  201. package/dist/gui/assets/WorkroomsPage-BcT-mGtT.js +0 -4
  202. package/dist/gui/assets/WorkspacesPage-CYFCm-7_.js +0 -2
  203. package/dist/gui/assets/badge-DwXvB44H.js +0 -1
  204. package/dist/gui/assets/chunk-BV7QT456-DfUBKG-z.js +0 -3
  205. package/dist/gui/assets/index-3tD_IeyQ.js +0 -55
  206. package/dist/gui/assets/index-CK5YRfPV.css +0 -2
  207. package/dist/gui/assets/square-check-big-BSIiYXPI.js +0 -1
  208. package/dist/gui/assets/tabs-BrHKp5bD.js +0 -1
  209. package/dist/gui/assets/vsc-D80c4gBT.js +0 -1
@@ -0,0 +1,57 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-YVONGtqS.js","assets/button-CREn1mup.js","assets/code-xml-DH-38Tt7.js","assets/git-branch-Ce0I2663.js","assets/layers-j_brOuoa.js","assets/brand-hHByyyzq.js","assets/card-yrg6ov8B.js","assets/ProjectsPage-DOpfV2Oj.js","assets/badge-DTBzXOWn.js","assets/ScaffoldRepoInline-D91aitAi.js","assets/useAriaLabelledBy-BmJErI5a.js","assets/alert-dialog-YynbGyj1.js","assets/trash-2-CMdv3eD3.js","assets/SettingsPage-BdaHN6fa.js","assets/label-DC730X8s.js","assets/alert-QnMXzwpU.js","assets/SkillsPage-DT9lRkCg.js","assets/chevron-down-B_Mwbim8.js","assets/shield-check-Dd1Yv3l2.js","assets/square-check-big-Bj8Rf_dH.js","assets/AgentsPage-C7Rh_dp7.js","assets/WorkroomsPage-BQU27nWS.js","assets/tabs-DfW7Akjs.js","assets/StartWorkPage-D932lq9x.js","assets/vsc-BsVrJLSg.js","assets/StrategiesPage-DCfS-wdu.js","assets/circle-plus--zM3-3r3.js","assets/WorkspacesPage-D3TLVmq-.js","assets/GettingStartedPage-C2Kbvz_N.js"])))=>i.map(i=>d[i]);
2
+ import{_ as e,b as t,c as n,d as r,f as i,g as a,h as o,i as s,l as c,m as l,n as u,o as d,p as f,s as p,t as m,v as h,y as g}from"./button-CREn1mup.js";import{$ as _,$t as v,A as y,At as b,B as x,Bn as S,Bt as C,C as w,Cn as T,Ct as E,Dn as D,Dt as O,En as k,Et as A,F as j,Fn as M,Ft as N,G as P,Gn as F,Gt as I,H as L,Hn as R,Ht as z,I as B,It as V,J as ee,Jn as H,Jt as U,K as W,Kn as te,Kt as ne,L as re,Ln as ie,Lt as ae,M as oe,Mn as se,Mt as ce,N as le,Nt as G,O as ue,On as de,Ot as fe,P as pe,Pn as me,Pt as he,Q as ge,Qt as _e,R as ve,Rt as ye,Sn as be,St as xe,Tn as Se,Tt as Ce,U as K,Un as we,Ut as q,V as Te,Vn as Ee,Vt as De,W as Oe,Wn as ke,Wt as Ae,X as je,Xt as Me,Y as Ne,Yn as Pe,Yt as Fe,Z as Ie,Zt as Le,_ as Re,_n as ze,_t as Be,a as Ve,at as He,bn as Ue,bt as We,c as Ge,cn as J,ct as Ke,d as qe,dn as Je,dt as Ye,en as Xe,et as Ze,f as Qe,fn as $e,ft as et,g as tt,gn as nt,gt as rt,h as it,hn as at,ht as ot,i as st,in as ct,it as lt,j as ut,jn as dt,jt as ft,k as pt,kt as mt,l as ht,ln as gt,lt as _t,m as vt,mn as yt,mt as bt,n as xt,nn as St,nt as Ct,o as wt,on as Tt,ot as Et,p as Dt,pn as Ot,pt as kt,q as At,qn as jt,qt as Mt,r as Nt,rn as Pt,rt as Ft,s as It,sn as Lt,st as Rt,t as zt,tn as Bt,tt as Vt,u as Ht,un as Ut,ut as Wt,v as Gt,vn as Kt,vt as qt,wn as Jt,wt as Yt,xn as Xt,xt as Zt,yn as Qt,yt as $t,z as en,zn as tn,zt as nn}from"./badge-DTBzXOWn.js";import{t as rn}from"./chevron-down-B_Mwbim8.js";import{_ as an,a as on,b as sn,c as cn,f as ln,g as un,h as dn,i as fn,l as pn,m as mn,n as hn,p as gn,r as _n,t as vn,u as yn,v as bn,y as xn}from"./brand-hHByyyzq.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Sn=h((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Cn=h(((e,t)=>{t.exports=Sn()})),wn=h((t=>{var n=Cn(),r=e(),i=Pe();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}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 o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(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 l(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 u(e){if(s(e)!==e)throw Error(a(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.memo_cache_sentinel`),k=Symbol.iterator;function A(e){return typeof e!=`object`||!e?null:(e=k&&e[k]||e[`@@iterator`],typeof e==`function`?e:null)}var j=Symbol.for(`react.client.reference`);function M(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===j?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case w:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return t=e.displayName||null,t===null?M(e.type)||`Memo`:t;case E:t=e._payload,e=e._init;try{return M(e(t))}catch{}}return null}var N=Array.isArray,P=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},L=[],R=-1;function z(e){return{current:e}}function B(e){0>R||(e.current=L[R],L[R]=null,R--)}function V(e,t){R++,L[R]=e.current,e.current=t}var ee=z(null),H=z(null),U=z(null),W=z(null);function te(e,t){switch(V(U,t),V(H,e),V(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Wd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Wd(t),e=Gd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}B(ee),V(ee,e)}function ne(){B(ee),B(H),B(U)}function re(e){e.memoizedState!==null&&V(W,e);var t=ee.current,n=Gd(t,e.type);t!==n&&(V(H,e),V(ee,n))}function ie(e){H.current===e&&(B(ee),B(H)),W.current===e&&(B(W),tp._currentValue=I)}var ae,oe;function se(e){if(ae===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ae=t&&t[1]||``,oe=-1<e.stack.indexOf(`
3
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
+ `+ae+e+oe}var ce=!1;function le(e,t){if(!e||ce)return``;ce=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5
+ `),l=s.split(`
6
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ce=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?se(n):``}function G(e,t){switch(e.tag){case 26:case 27:case 5:return se(e.type);case 16:return se(`Lazy`);case 13:return e.child!==t&&t!==null?se(`Suspense Fallback`):se(`Suspense`);case 19:return se(`SuspenseList`);case 0:case 15:return le(e.type,!1);case 11:return le(e.type.render,!1);case 1:return le(e.type,!0);case 31:return se(`Activity`);default:return``}}function ue(e){try{var t=``,n=null;do t+=G(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
+ Error generating stack: `+e.message+`
9
+ `+e.stack}}var de=Object.prototype.hasOwnProperty,fe=n.unstable_scheduleCallback,pe=n.unstable_cancelCallback,me=n.unstable_shouldYield,he=n.unstable_requestPaint,ge=n.unstable_now,_e=n.unstable_getCurrentPriorityLevel,ve=n.unstable_ImmediatePriority,ye=n.unstable_UserBlockingPriority,be=n.unstable_NormalPriority,xe=n.unstable_LowPriority,Se=n.unstable_IdlePriority,Ce=n.log,K=n.unstable_setDisableYieldValue,we=null,q=null;function Te(e){if(typeof Ce==`function`&&K(e),q&&typeof q.setStrictMode==`function`)try{q.setStrictMode(we,e)}catch{}}var Ee=Math.clz32?Math.clz32:ke,De=Math.log,Oe=Math.LN2;function ke(e){return e>>>=0,e===0?32:31-(De(e)/Oe|0)|0}var Ae=256,je=262144,Me=4194304;function Ne(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 Fe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ne(n))):i=Ne(o):i=Ne(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ne(n))):i=Ne(o)):i=Ne(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ie(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Le(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 Re(){var e=Me;return Me<<=1,!(Me&62914560)&&(Me=4194304),e}function ze(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Be(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ve(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ee(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&He(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function He(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ee(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ue(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ee(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function We(e,t){var n=t&-t;return n=n&42?1:Ge(n),(n&(e.suspendedLanes|t))===0?n:0}function Ge(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 J(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ke(){var e=F.p;return e===0?(e=window.event,e===void 0?32:_p(e.type)):e}function qe(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var Je=Math.random().toString(36).slice(2),Ye=`__reactFiber$`+Je,Xe=`__reactProps$`+Je,Ze=`__reactContainer$`+Je,Qe=`__reactEvents$`+Je,$e=`__reactListeners$`+Je,et=`__reactHandles$`+Je,tt=`__reactResources$`+Je,nt=`__reactMarker$`+Je;function rt(e){delete e[Ye],delete e[Xe],delete e[Qe],delete e[$e],delete e[et]}function it(e){var t=e[Ye];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ze]||n[Ye]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mf(e);e!==null;){if(n=e[Ye])return n;e=mf(e)}return t}e=n,n=e.parentNode}return null}function at(e){if(e=e[Ye]||e[Ze]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ot(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function st(e){var t=e[tt];return t||=e[tt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ct(e){e[nt]=!0}var lt=new Set,ut={};function dt(e,t){ft(e,t),ft(e+`Capture`,t)}function ft(e,t){for(ut[e]=t,e=0;e<t.length;e++)lt.add(t[e])}var pt=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]*$`),mt={},ht={};function gt(e){return de.call(ht,e)?!0:de.call(mt,e)?!1:pt.test(e)?ht[e]=!0:(mt[e]=!0,!1)}function _t(e,t,n){if(gt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){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,``+n)}}}function vt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function yt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function bt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function xt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function St(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ct(e){if(!e._valueTracker){var t=xt(e)?`checked`:`value`;e._valueTracker=St(e,t,``+e[t])}}function wt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=xt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Tt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Et=/[\n"\\]/g;function Dt(e){return e.replace(Et,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ot(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+bt(t)):e.value!==``+bt(t)&&(e.value=``+bt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):At(e,o,bt(n)):At(e,o,bt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+bt(s):e.removeAttribute(`name`)}function kt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ct(e);return}n=n==null?``:``+bt(n),t=t==null?n:``+bt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ct(e)}function At(e,t,n){t===`number`&&Tt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function jt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+bt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Mt(e,t,n){if(t!=null&&(t=``+bt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+bt(n)}function Nt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(N(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=bt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ct(e)}function Pt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ft=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 It(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Ft.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Lt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&It(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&It(e,o,t[o])}function Rt(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 zt=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`]]),Bt=/^[\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 Vt(e){return Bt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Ht(){}var Ut=null;function Wt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Gt=null,Kt=null;function qt(e){var t=at(e);if(t&&(e=t.stateNode)){var n=e[Xe]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ot(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Dt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Xe]||null;if(!i)throw Error(a(90));Ot(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&wt(r)}break a;case`textarea`:Mt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&jt(e,!!n.multiple,t,!1)}}}var Jt=!1;function Yt(e,t,n){if(Jt)return e(t,n);Jt=!0;try{return e(t)}finally{if(Jt=!1,(Gt!==null||Kt!==null)&&(bu(),Gt&&(t=Gt,e=Kt,Kt=Gt=null,qt(t),e)))for(t=0;t<e.length;t++)qt(e[t])}}function Xt(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Xe]||null;if(r===null)return null;n=r[t];a: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 a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var Zt=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),Qt=!1;if(Zt)try{var $t={};Object.defineProperty($t,"passive",{get:function(){Qt=!0}}),window.addEventListener(`test`,$t,$t),window.removeEventListener(`test`,$t,$t)}catch{Qt=!1}var en=null,tn=null,nn=null;function rn(){if(nn)return nn;var e,t=tn,n=t.length,r,i=`value`in en?en.value:en.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return nn=i.slice(e,1<r?1-r:void 0)}function an(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 on(){return!0}function sn(){return!1}function cn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?on:sn,this.isPropagationStopped=sn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=on)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=on)},persist:function(){},isPersistent:on}),t}var ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=cn(ln),dn=p({},ln,{view:0,detail:0}),fn=cn(dn),pn,mn,hn,gn=p({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,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!==hn&&(hn&&e.type===`mousemove`?(pn=e.screenX-hn.screenX,mn=e.screenY-hn.screenY):mn=pn=0,hn=e),pn)},movementY:function(e){return`movementY`in e?e.movementY:mn}}),_n=cn(gn),vn=cn(p({},gn,{dataTransfer:0})),yn=cn(p({},dn,{relatedTarget:0})),bn=cn(p({},ln,{animationName:0,elapsedTime:0,pseudoElement:0})),xn=cn(p({},ln,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Sn=cn(p({},ln,{data:0})),wn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Tn={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`},Y={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function X(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Y[e])?!!t[e]:!1}function En(){return X}var Dn=cn(p({},dn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=an(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Tn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,charCode:function(e){return e.type===`keypress`?an(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?an(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),On=cn(p({},gn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),kn=cn(p({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),An=cn(p({},ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),jn=cn(p({},gn,{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})),Mn=cn(p({},ln,{newState:0,oldState:0})),Nn=[9,13,27,32],Pn=Zt&&`CompositionEvent`in window,Fn=null;Zt&&`documentMode`in document&&(Fn=document.documentMode);var In=Zt&&`TextEvent`in window&&!Fn,Ln=Zt&&(!Pn||Fn&&8<Fn&&11>=Fn),Rn=` `,zn=!1;function Bn(e,t){switch(e){case`keyup`:return Nn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Vn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Hn=!1;function Un(e,t){switch(e){case`compositionend`:return Vn(t);case`keypress`:return t.which===32?(zn=!0,Rn):null;case`textInput`:return e=t.data,e===Rn&&zn?null:e;default:return null}}function Wn(e,t){if(Hn)return e===`compositionend`||!Pn&&Bn(e,t)?(e=rn(),nn=tn=en=null,Hn=!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 Ln&&t.locale!==`ko`?null:t.data;default:return null}}var Gn={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 Kn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Gn[e.type]:t===`textarea`}function qn(e,t,n,r){Gt?Kt?Kt.push(r):Kt=[r]:Gt=r,t=Od(t,`onChange`),0<t.length&&(n=new un(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Jn=null,Yn=null;function Xn(e){bd(e,0)}function Zn(e){if(wt(ot(e)))return e}function Qn(e,t){if(e===`change`)return t}var $n=!1;if(Zt){var er;if(Zt){var tr=`oninput`in document;if(!tr){var nr=document.createElement(`div`);nr.setAttribute(`oninput`,`return;`),tr=typeof nr.oninput==`function`}er=tr}else er=!1;$n=er&&(!document.documentMode||9<document.documentMode)}function rr(){Jn&&(Jn.detachEvent(`onpropertychange`,ir),Yn=Jn=null)}function ir(e){if(e.propertyName===`value`&&Zn(Yn)){var t=[];qn(t,Yn,e,Wt(e)),Yt(Xn,t)}}function ar(e,t,n){e===`focusin`?(rr(),Jn=t,Yn=n,Jn.attachEvent(`onpropertychange`,ir)):e===`focusout`&&rr()}function or(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Zn(Yn)}function sr(e,t){if(e===`click`)return Zn(t)}function cr(e,t){if(e===`input`||e===`change`)return Zn(t)}function lr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var ur=typeof Object.is==`function`?Object.is:lr;function dr(e,t){if(ur(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!de.call(t,i)||!ur(e[i],t[i]))return!1}return!0}function fr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pr(e,t){var n=fr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=fr(n)}}function mr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function hr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Tt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Tt(e.document)}return t}function gr(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 _r=Zt&&`documentMode`in document&&11>=document.documentMode,vr=null,yr=null,br=null,xr=!1;function Sr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xr||vr==null||vr!==Tt(r)||(r=vr,`selectionStart`in r&&gr(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}),br&&dr(br,r)||(br=r,r=Od(yr,`onSelect`),0<r.length&&(t=new un(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=vr)))}function Cr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var wr={animationend:Cr(`Animation`,`AnimationEnd`),animationiteration:Cr(`Animation`,`AnimationIteration`),animationstart:Cr(`Animation`,`AnimationStart`),transitionrun:Cr(`Transition`,`TransitionRun`),transitionstart:Cr(`Transition`,`TransitionStart`),transitioncancel:Cr(`Transition`,`TransitionCancel`),transitionend:Cr(`Transition`,`TransitionEnd`)},Tr={},Er={};Zt&&(Er=document.createElement(`div`).style,`AnimationEvent`in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),`TransitionEvent`in window||delete wr.transitionend.transition);function Dr(e){if(Tr[e])return Tr[e];if(!wr[e])return e;var t=wr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Er)return Tr[e]=t[n];return e}var Or=Dr(`animationend`),kr=Dr(`animationiteration`),Ar=Dr(`animationstart`),jr=Dr(`transitionrun`),Mr=Dr(`transitionstart`),Nr=Dr(`transitioncancel`),Pr=Dr(`transitionend`),Fr=new Map,Ir=`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(` `);Ir.push(`scrollEnd`);function Lr(e,t){Fr.set(e,t),dt(t,[e])}var Rr=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&&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)},zr=[],Br=0,Vr=0;function Hr(){for(var e=Br,t=Vr=Br=0;t<e;){var n=zr[t];zr[t++]=null;var r=zr[t];zr[t++]=null;var i=zr[t];zr[t++]=null;var a=zr[t];if(zr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Kr(n,i,a)}}function Ur(e,t,n,r){zr[Br++]=e,zr[Br++]=t,zr[Br++]=n,zr[Br++]=r,Vr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Wr(e,t,n,r){return Ur(e,t,n,r),qr(e)}function Gr(e,t){return Ur(e,null,null,t),qr(e)}function Kr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ee(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function qr(e){if(50<du)throw du=0,fu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Jr={};function Yr(e,t,n,r){this.tag=e,this.key=n,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 Xr(e,t,n,r){return new Yr(e,t,n,r)}function Zr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qr(e,t){var n=e.alternate;return n===null?(n=Xr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function $r(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ei(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)Zr(e)&&(s=1);else if(typeof e==`string`)s=Kf(e,n,ee.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case D:return e=Xr(31,n,t,i),e.elementType=D,e.lanes=o,e;case _:return ti(n.children,i,o,t);case v:s=8,i|=24;break;case y:return e=Xr(12,n,t,i|2),e.elementType=y,e.lanes=o,e;case C:return e=Xr(13,n,t,i),e.elementType=C,e.lanes=o,e;case w:return e=Xr(19,n,t,i),e.elementType=w,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case x:s=10;break a;case b:s=9;break a;case S:s=11;break a;case T:s=14;break a;case E:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=Xr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function ti(e,t,n,r){return e=Xr(7,e,r,t),e.lanes=n,e}function ni(e,t,n){return e=Xr(6,e,null,t),e.lanes=n,e}function ri(e){var t=Xr(18,null,null,0);return t.stateNode=e,t}function ii(e,t,n){return t=Xr(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ai=new WeakMap;function oi(e,t){if(typeof e==`object`&&e){var n=ai.get(e);return n===void 0?(t={value:e,source:t,stack:ue(t)},ai.set(e,t),t):n}return{value:e,source:t,stack:ue(t)}}var si=[],ci=0,li=null,ui=0,di=[],fi=0,pi=null,mi=1,hi=``;function gi(e,t){si[ci++]=ui,si[ci++]=li,li=e,ui=t}function _i(e,t,n){di[fi++]=mi,di[fi++]=hi,di[fi++]=pi,pi=e;var r=mi;e=hi;var i=32-Ee(r)-1;r&=~(1<<i),n+=1;var a=32-Ee(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,mi=1<<32-Ee(t)+i|n<<i|r,hi=a+e}else mi=1<<a|n<<i|r,hi=e}function vi(e){e.return!==null&&(gi(e,1),_i(e,1,0))}function yi(e){for(;e===li;)li=si[--ci],si[ci]=null,ui=si[--ci],si[ci]=null;for(;e===pi;)pi=di[--fi],di[fi]=null,hi=di[--fi],di[fi]=null,mi=di[--fi],di[fi]=null}function bi(e,t){di[fi++]=mi,di[fi++]=hi,di[fi++]=pi,mi=t.id,hi=t.overflow,pi=e}var xi=null,Si=null,Ci=!1,wi=null,Ti=!1,Ei=Error(a(519));function Di(e){throw Ni(oi(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ei}function Oi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ye]=e,t[Xe]=r,n){case`dialog`:xd(`cancel`,t),xd(`close`,t);break;case`iframe`:case`object`:case`embed`:xd(`load`,t);break;case`video`:case`audio`:for(n=0;n<vd.length;n++)xd(vd[n],t);break;case`source`:xd(`error`,t);break;case`img`:case`image`:case`link`:xd(`error`,t),xd(`load`,t);break;case`details`:xd(`toggle`,t);break;case`input`:xd(`invalid`,t),kt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:xd(`invalid`,t);break;case`textarea`:xd(`invalid`,t),Nt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Pd(t.textContent,n)?(r.popover!=null&&(xd(`beforetoggle`,t),xd(`toggle`,t)),r.onScroll!=null&&xd(`scroll`,t),r.onScrollEnd!=null&&xd(`scrollend`,t),r.onClick!=null&&(t.onclick=Ht),t=!0):t=!1,t||Di(e,!0)}function ki(e){for(xi=e.return;xi;)switch(xi.tag){case 5:case 31:case 13:Ti=!1;return;case 27:case 3:Ti=!0;return;default:xi=xi.return}}function Ai(e){if(e!==xi)return!1;if(!Ci)return ki(e),Ci=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Kd(e.type,e.memoizedProps)),n=!n),n&&Si&&Di(e),ki(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Si=pf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Si=pf(e)}else t===27?(t=Si,ef(e.type)?(e=ff,ff=null,Si=e):Si=t):Si=xi?df(e.stateNode.nextSibling):null;return!0}function ji(){Si=xi=null,Ci=!1}function Mi(){var e=wi;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),wi=null),e}function Ni(e){wi===null?wi=[e]:wi.push(e)}var Pi=z(null),Fi=null,Ii=null;function Li(e,t,n){V(Pi,t._currentValue),t._currentValue=n}function Ri(e){e._currentValue=Pi.current,B(Pi)}function zi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Bi(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),zi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),zi(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function Vi(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;ur(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===W.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[tp]:e.push(tp))}i=i.return}e!==null&&Bi(t,e,n,r),t.flags|=262144}function Hi(e){for(e=e.firstContext;e!==null;){if(!ur(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ui(e){Fi=e,Ii=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Wi(e){return Ki(Fi,e)}function Gi(e,t){return Fi===null&&Ui(e),Ki(e,t)}function Ki(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ii===null){if(e===null)throw Error(a(308));Ii=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ii=Ii.next=t;return n}var qi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Ji=n.unstable_scheduleCallback,Yi=n.unstable_NormalPriority,Xi={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zi(){return{controller:new qi,data:new Map,refCount:0}}function Qi(e){e.refCount--,e.refCount===0&&Ji(Yi,function(){e.controller.abort()})}var $i=null,ea=0,ta=0,na=null;function ra(e,t){if($i===null){var n=$i=[];ea=0,ta=fd(),na={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ea++,t.then(ia,ia),t}function ia(){if(--ea===0&&$i!==null){na!==null&&(na.status=`fulfilled`);var e=$i;$i=null,ta=0,na=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function aa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var oa=P.S;P.S=function(e,t){eu=ge(),typeof t==`object`&&t&&typeof t.then==`function`&&ra(e,t),oa!==null&&oa(e,t)};var sa=z(null);function ca(){var e=sa.current;return e===null?Fl.pooledCache:e}function la(e,t){t===null?V(sa,sa.current):V(sa,t.pool)}function ua(){var e=ca();return e===null?null:{parent:Xi._currentValue,pool:e}}var da=Error(a(460)),fa=Error(a(474)),pa=Error(a(542)),ma={then:function(){}};function ha(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ga(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Ht,Ht),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ba(e),e;default:if(typeof t.status==`string`)t.then(Ht,Ht);else{if(e=Fl,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ba(e),e}throw va=t,da}}function _a(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(va=e,da):e}}var va=null;function ya(){if(va===null)throw Error(a(459));var e=va;return va=null,e}function ba(e){if(e===da||e===pa)throw Error(a(483))}var xa=null,Sa=0;function Ca(e){var t=Sa;return Sa+=1,xa===null&&(xa=[]),ga(xa,e,t)}function wa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ta(e,t){throw t.$$typeof===m?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ea(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=Qr(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ni(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===E&&_a(a)===t.type)?(t=i(t,n.props),wa(t,n),t.return=e,t):(t=ei(n.type,n.key,n.props,null,e.mode,r),wa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ii(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=ti(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ni(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=ei(t.type,t.key,t.props,null,e.mode,n),wa(n,t),n.return=e,n;case g:return t=ii(t,e.mode,n),t.return=e,t;case E:return t=_a(t),f(e,t,n)}if(N(t)||A(t))return t=ti(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ca(t),n);if(t.$$typeof===x)return f(e,Gi(e,t),n);Ta(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case E:return n=_a(n),p(e,t,n,r)}if(N(n)||A(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ca(n),r);if(n.$$typeof===x)return p(e,t,Gi(e,n),r);Ta(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case E:return r=_a(r),m(e,t,n,r,i)}if(N(r)||A(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ca(r),i);if(r.$$typeof===x)return m(e,t,n,Gi(t,r),i);Ta(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ci&&gi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ci&&gi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ci&&gi(i,h),l}function y(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),Ci&&gi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ci&&gi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),Ci&&gi(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&_a(l)===r.type){n(e,r.sibling),c=i(r,o.props),wa(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===_?(c=ti(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ei(o.type,o.key,o.props,null,e.mode,c),wa(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=ii(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=_a(o),b(e,r,o,c)}if(N(o))return v(e,r,o,c);if(A(o)){if(l=A(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ca(o),c);if(o.$$typeof===x)return b(e,r,Gi(e,o),c);Ta(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=ni(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Sa=0;var i=b(e,t,n,r);return xa=null,i}catch(t){if(t===da||t===pa)throw t;var a=Xr(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Da=Ea(!0),Oa=Ea(!1),ka=!1;function Aa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ja(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 Ma(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Na(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Pl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=qr(e),Kr(e,null,n),t}return Ur(e,r,t,n),qr(e)}function Pa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ue(e,n)}}function Fa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ia=!1;function La(){if(Ia){var e=na;if(e!==null)throw e}}function Ra(e,t,n,r){Ia=!1;var i=e.updateQueue;ka=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(Ll&f)===f:(r&f)===f){f!==0&&f===ta&&(Ia=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:ka=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function za(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function Ba(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)za(n[e],t)}var Va=z(null),Ha=z(0);function Ua(e,t){e=Ul,V(Ha,e),V(Va,t),Ul=e|t.baseLanes}function Wa(){V(Ha,Ul),V(Va,Va.current)}function Ga(){Ul=Ha.current,B(Va),B(Ha)}var Ka=z(null),qa=null;function Ja(e){var t=e.alternate;V($a,$a.current&1),V(Ka,e),qa===null&&(t===null||Va.current!==null||t.memoizedState!==null)&&(qa=e)}function Ya(e){V($a,$a.current),V(Ka,e),qa===null&&(qa=e)}function Xa(e){e.tag===22?(V($a,$a.current),V(Ka,e),qa===null&&(qa=e)):Za(e)}function Za(){V($a,$a.current),V(Ka,Ka.current)}function Qa(e){B(Ka),qa===e&&(qa=null),B($a)}var $a=z(0);function eo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||cf(n)||lf(n)))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)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 to=0,no=null,ro=null,io=null,ao=!1,oo=!1,so=!1,co=0,lo=0,uo=null,fo=0;function po(){throw Error(a(321))}function mo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ur(e[n],t[n]))return!1;return!0}function ho(e,t,n,r,i,a){return to=a,no=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Ms:Ns,so=!1,a=n(r,i),so=!1,oo&&(a=_o(t,n,r,i)),go(e),a}function go(e){P.H=js;var t=ro!==null&&ro.next!==null;if(to=0,io=ro=no=null,ao=!1,lo=0,uo=null,t)throw Error(a(300));e===null||Xs||(e=e.dependencies,e!==null&&Hi(e)&&(Xs=!0))}function _o(e,t,n,r){no=e;var i=0;do{if(oo&&(uo=null),lo=0,oo=!1,25<=i)throw Error(a(301));if(i+=1,io=ro=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Ps,o=t(n,r)}while(oo);return o}function vo(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?To(t):t,e=e.useState()[0],(ro===null?null:ro.memoizedState)!==e&&(no.flags|=1024),t}function yo(){var e=co!==0;return co=0,e}function bo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function xo(e){if(ao){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ao=!1}to=0,io=ro=no=null,oo=!1,lo=co=0,uo=null}function So(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return io===null?no.memoizedState=io=e:io=io.next=e,io}function Co(){if(ro===null){var e=no.alternate;e=e===null?null:e.memoizedState}else e=ro.next;var t=io===null?no.memoizedState:io.next;if(t!==null)io=t,ro=e;else{if(e===null)throw no.alternate===null?Error(a(467)):Error(a(310));ro=e,e={memoizedState:ro.memoizedState,baseState:ro.baseState,baseQueue:ro.baseQueue,queue:ro.queue,next:null},io===null?no.memoizedState=io=e:io=io.next=e}return io}function wo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function To(e){var t=lo;return lo+=1,uo===null&&(uo=[]),e=ga(uo,e,t),t=no,(io===null?t.memoizedState:io.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Ms:Ns),e}function Eo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return To(e);if(e.$$typeof===x)return Wi(e)}throw Error(a(438,String(e)))}function Do(e){var t=null,n=no.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=no.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=wo(),no.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=O;return t.index++,n}function Oo(e,t){return typeof t==`function`?t(e):t}function ko(e){return Ao(Co(),ro,e)}function Ao(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(to&f)===f:(Ll&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ta&&(d=!0);else if((to&p)===p){u=u.next,p===ta&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,no.lanes|=p,Gl|=p;f=u.action,so&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,no.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!ur(o,e.memoizedState)&&(Xs=!0,d&&(n=na,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function jo(e){var t=Co(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);ur(o,t.memoizedState)||(Xs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Mo(e,t,n){var r=no,i=Co(),o=Ci;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!ur((ro||i).memoizedState,n);if(s&&(i.memoizedState=n,Xs=!0),i=i.queue,rs(Fo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||io!==null&&io.memoizedState.tag&1){if(r.flags|=2048,Qo(9,{destroy:void 0},Po.bind(null,r,i,n,t),null),Fl===null)throw Error(a(349));o||to&127||No(r,t,n)}return n}function No(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=no.updateQueue,t===null?(t=wo(),no.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Po(e,t,n,r){t.value=n,t.getSnapshot=r,Io(t)&&Lo(e)}function Fo(e,t,n){return n(function(){Io(t)&&Lo(e)})}function Io(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ur(e,n)}catch{return!0}}function Lo(e){var t=Gr(e,2);t!==null&&hu(t,e,2)}function Ro(e){var t=So();if(typeof e==`function`){var n=e;if(e=n(),so){Te(!0);try{n()}finally{Te(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:e},t}function zo(e,t,n,r){return e.baseState=n,Ao(e,ro,typeof r==`function`?r:Oo)}function Bo(e,t,n,r,i){if(Os(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Vo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Vo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Ho(e,t,s)}catch(n){Wo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Ho(e,t,a)}catch(n){Wo(e,t,n)}}function Ho(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Uo(e,t,n)},function(n){return Wo(e,t,n)}):Uo(e,t,n)}function Uo(e,t,n){t.status=`fulfilled`,t.value=n,Go(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Vo(e,n)))}function Wo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Go(t),t=t.next;while(t!==r)}e.action=null}function Go(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ko(e,t){return t}function qo(e,t){if(Ci){var n=Fl.formState;if(n!==null){a:{var r=no;if(Ci){if(Si){b:{for(var i=Si,a=Ti;i.nodeType!==8;){if(!a){i=null;break b}if(i=df(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Si=df(i.nextSibling),r=i.data===`F!`;break a}}Di(r)}r=!1}r&&(t=n[0])}}return n=So(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ko,lastRenderedState:t},n.queue=r,n=Ts.bind(null,no,r),r.dispatch=n,r=Ro(!1),a=Ds.bind(null,no,!1,r.queue),r=So(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Bo.bind(null,no,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Jo(e){return Yo(Co(),ro,e)}function Yo(e,t,n){if(t=Ao(e,t,Ko)[0],e=ko(Oo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=To(t)}catch(e){throw e===da?pa:e}else r=t;t=Co();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(no.flags|=2048,Qo(9,{destroy:void 0},Xo.bind(null,i,n),null)),[r,a,e]}function Xo(e,t){e.action=t}function Zo(e){var t=Co(),n=ro;if(n!==null)return Yo(t,n,e);Co(),t=t.memoizedState,n=Co();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Qo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=no.updateQueue,t===null&&(t=wo(),no.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function $o(){return Co().memoizedState}function es(e,t,n,r){var i=So();no.flags|=e,i.memoizedState=Qo(1|t,{destroy:void 0},n,r===void 0?null:r)}function ts(e,t,n,r){var i=Co();r=r===void 0?null:r;var a=i.memoizedState.inst;ro!==null&&r!==null&&mo(r,ro.memoizedState.deps)?i.memoizedState=Qo(t,a,n,r):(no.flags|=e,i.memoizedState=Qo(1|t,a,n,r))}function ns(e,t){es(8390656,8,e,t)}function rs(e,t){ts(2048,8,e,t)}function is(e){no.flags|=4;var t=no.updateQueue;if(t===null)t=wo(),no.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function as(e){var t=Co().memoizedState;return is({ref:t,nextImpl:e}),function(){if(Pl&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function os(e,t){return ts(4,2,e,t)}function ss(e,t){return ts(4,4,e,t)}function cs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ls(e,t,n){n=n==null?null:n.concat([e]),ts(4,4,cs.bind(null,t,e),n)}function us(){}function ds(e,t){var n=Co();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&mo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function fs(e,t){var n=Co();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&mo(t,r[1]))return r[0];if(r=e(),so){Te(!0);try{e()}finally{Te(!1)}}return n.memoizedState=[r,t],r}function ps(e,t,n){return n===void 0||to&1073741824&&!(Ll&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),no.lanes|=e,Gl|=e,n)}function ms(e,t,n,r){return ur(n,t)?n:Va.current===null?!(to&42)||to&1073741824&&!(Ll&261930)?(Xs=!0,e.memoizedState=n):(e=mu(),no.lanes|=e,Gl|=e,t):(e=ps(e,n,r),ur(e,t)||(Xs=!0),e)}function hs(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Ds(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Es(e,t,aa(c,r),pu(e)):Es(e,t,r,pu(e))}catch(n){Es(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function gs(){}function _s(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=vs(e).queue;hs(e,i,t,I,n===null?gs:function(){return ys(e),n(r)})}function vs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:I},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ys(e){var t=vs(e);t.next===null&&(t=e.alternate.memoizedState),Es(e,t.next.queue,{},pu())}function bs(){return Wi(tp)}function xs(){return Co().memoizedState}function Ss(){return Co().memoizedState}function Cs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ma(n);var r=Na(t,e,n);r!==null&&(hu(r,t,n),Pa(r,t,n)),t={cache:Zi()},e.payload=t;return}t=t.return}}function ws(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Os(e)?ks(t,n):(n=Wr(e,t,n,r),n!==null&&(hu(n,e,r),As(n,t,r)))}function Ts(e,t,n){Es(e,t,n,pu())}function Es(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Os(e))ks(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,ur(s,o))return Ur(e,t,i,0),Fl===null&&Hr(),!1}catch{}if(n=Wr(e,t,i,r),n!==null)return hu(n,e,r),As(n,t,r),!0}return!1}function Ds(e,t,n,r){if(r={lane:2,revertLane:fd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Os(e)){if(t)throw Error(a(479))}else t=Wr(e,n,r,2),t!==null&&hu(t,e,2)}function Os(e){var t=e.alternate;return e===no||t!==null&&t===no}function ks(e,t){oo=ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function As(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ue(e,n)}}var js={readContext:Wi,use:Eo,useCallback:po,useContext:po,useEffect:po,useImperativeHandle:po,useLayoutEffect:po,useInsertionEffect:po,useMemo:po,useReducer:po,useRef:po,useState:po,useDebugValue:po,useDeferredValue:po,useTransition:po,useSyncExternalStore:po,useId:po,useHostTransitionStatus:po,useFormState:po,useActionState:po,useOptimistic:po,useMemoCache:po,useCacheRefresh:po};js.useEffectEvent=po;var Ms={readContext:Wi,use:Eo,useCallback:function(e,t){return So().memoizedState=[e,t===void 0?null:t],e},useContext:Wi,useEffect:ns,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),es(4194308,4,cs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return es(4194308,4,e,t)},useInsertionEffect:function(e,t){es(4,2,e,t)},useMemo:function(e,t){var n=So();t=t===void 0?null:t;var r=e();if(so){Te(!0);try{e()}finally{Te(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=So();if(n!==void 0){var i=n(t);if(so){Te(!0);try{n(t)}finally{Te(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ws.bind(null,no,e),[r.memoizedState,e]},useRef:function(e){var t=So();return e={current:e},t.memoizedState=e},useState:function(e){e=Ro(e);var t=e.queue,n=Ts.bind(null,no,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:us,useDeferredValue:function(e,t){return ps(So(),e,t)},useTransition:function(){var e=Ro(!1);return e=hs.bind(null,no,e.queue,!0,!1),So().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=no,i=So();if(Ci){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Fl===null)throw Error(a(349));Ll&127||No(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,ns(Fo.bind(null,r,o,e),[e]),r.flags|=2048,Qo(9,{destroy:void 0},Po.bind(null,r,o,n,t),null),n},useId:function(){var e=So(),t=Fl.identifierPrefix;if(Ci){var n=hi,r=mi;n=(r&~(1<<32-Ee(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=co++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=fo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:bs,useFormState:qo,useActionState:qo,useOptimistic:function(e){var t=So();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ds.bind(null,no,!0,n),n.dispatch=t,[e,t]},useMemoCache:Do,useCacheRefresh:function(){return So().memoizedState=Cs.bind(null,no)},useEffectEvent:function(e){var t=So(),n={impl:e};return t.memoizedState=n,function(){if(Pl&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Ns={readContext:Wi,use:Eo,useCallback:ds,useContext:Wi,useEffect:rs,useImperativeHandle:ls,useInsertionEffect:os,useLayoutEffect:ss,useMemo:fs,useReducer:ko,useRef:$o,useState:function(){return ko(Oo)},useDebugValue:us,useDeferredValue:function(e,t){return ms(Co(),ro.memoizedState,e,t)},useTransition:function(){var e=ko(Oo)[0],t=Co().memoizedState;return[typeof e==`boolean`?e:To(e),t]},useSyncExternalStore:Mo,useId:xs,useHostTransitionStatus:bs,useFormState:Jo,useActionState:Jo,useOptimistic:function(e,t){return zo(Co(),ro,e,t)},useMemoCache:Do,useCacheRefresh:Ss};Ns.useEffectEvent=as;var Ps={readContext:Wi,use:Eo,useCallback:ds,useContext:Wi,useEffect:rs,useImperativeHandle:ls,useInsertionEffect:os,useLayoutEffect:ss,useMemo:fs,useReducer:jo,useRef:$o,useState:function(){return jo(Oo)},useDebugValue:us,useDeferredValue:function(e,t){var n=Co();return ro===null?ps(n,e,t):ms(n,ro.memoizedState,e,t)},useTransition:function(){var e=jo(Oo)[0],t=Co().memoizedState;return[typeof e==`boolean`?e:To(e),t]},useSyncExternalStore:Mo,useId:xs,useHostTransitionStatus:bs,useFormState:Zo,useActionState:Zo,useOptimistic:function(e,t){var n=Co();return ro===null?(n.baseState=e,[e,n.queue.dispatch]):zo(n,ro,e,t)},useMemoCache:Do,useCacheRefresh:Ss};Ps.useEffectEvent=as;function Fs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Is={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ma(r);i.payload=t,n!=null&&(i.callback=n),t=Na(e,i,r),t!==null&&(hu(t,e,r),Pa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ma(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Na(e,i,r),t!==null&&(hu(t,e,r),Pa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Ma(n);r.tag=2,t!=null&&(r.callback=t),t=Na(e,r,n),t!==null&&(hu(t,e,n),Pa(t,e,n))}};function Ls(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!dr(n,r)||!dr(i,a):!0}function Rs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Is.enqueueReplaceState(t,t.state,null)}function zs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Bs(e){Rr(e)}function Vs(e){console.error(e)}function Hs(e){Rr(e)}function Us(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ws(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Gs(e,t,n){return n=Ma(n),n.tag=3,n.payload={element:null},n.callback=function(){Us(e,t)},n}function Ks(e){return e=Ma(e),e.tag=3,e}function qs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ws(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ws(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Js(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Vi(t,n,i,!0),n=Ka.current,n!==null){switch(n.tag){case 31:case 13:return qa===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===ma?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ku(e,r,i)),!1;case 22:return n.flags|=65536,r===ma?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Ku(e,r,i)),!1}throw Error(a(435,n.tag))}return Ku(e,r,i),Du(),!1}if(Ci)return t=Ka.current,t===null?(r!==Ei&&(t=Error(a(423),{cause:r}),Ni(oi(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=oi(r,n),i=Gs(e.stateNode,r,i),Fa(e,i),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Ei&&(e=Error(a(422),{cause:r}),Ni(oi(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=oi(o,n),Xl===null?Xl=[o]:Xl.push(o),Wl!==4&&(Wl=2),t===null)return!0;r=oi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Gs(n.stateNode,r,e),Fa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ru===null||!ru.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Ks(i),qs(i,e,n,r),Fa(n,i),!1}n=n.return}while(n!==null);return!1}var Ys=Error(a(461)),Xs=!1;function Zs(e,t,n,r){t.child=e===null?Oa(t,null,n,r):Da(t,e.child,n,r)}function Qs(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ui(t),r=ho(e,t,n,o,a,i),s=yo(),e!==null&&!Xs?(bo(e,t,i),Sc(e,t,i)):(Ci&&s&&vi(t),t.flags|=1,Zs(e,t,r,i),t.child)}function $s(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Zr(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ec(e,t,a,r,i)):(e=ei(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Cc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?dr:n,n(o,r)&&e.ref===t.ref)return Sc(e,t,i)}return t.flags|=1,e=Qr(a,r),e.ref=t.ref,e.return=t,t.child=e}function ec(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(dr(a,r)&&e.ref===t.ref){if(Xs=!1,t.pendingProps=r=a,Cc(e,i))e.flags&131072&&(Xs=!0);else return t.lanes=e.lanes,Sc(e,t,i)}}return cc(e,t,n,r,i)}function tc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return rc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&la(t,a===null?null:a.cachePool),a===null?Wa():Ua(t,a),Xa(t);else return r=t.lanes=536870912,rc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&la(t,null),Wa(),Za(t)):(la(t,a.cachePool),Ua(t,a),Za(t),t.memoizedState=null);return Zs(e,t,i,n),t.child}function nc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function rc(e,t,n,r,i){var a=ca();return a=a===null?null:{parent:Xi._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&la(t,null),Wa(),Xa(t),e!==null&&Vi(e,t,r,!0),t.childLanes=i,null}function ic(e,t){return t=_c({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ac(e,t,n){return Da(t,e.child,null,n),e=ic(t,t.pendingProps),e.flags|=2,Qa(t),t.memoizedState=null,e}function oc(e,t,n){var r=t.pendingProps,i=!!(t.flags&128);if(t.flags&=-129,e===null){if(Ci){if(r.mode===`hidden`)return e=ic(t,r),t.lanes=536870912,nc(null,e);if(Ya(t),(e=Si)?(e=sf(e,Ti),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pi===null?null:{id:mi,overflow:hi},retryLane:536870912,hydrationErrors:null},n=ri(e),n.return=t,t.child=n,xi=t,Si=null)):e=null,e===null)throw Di(t);return t.lanes=536870912,null}return ic(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Ya(t),i){if(t.flags&256)t.flags&=-257,t=ac(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558))}else if(Xs||Vi(e,t,n,!1),i=(n&e.childLanes)!==0,Xs||i){if(r=Fl,r!==null&&(s=We(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Gr(e,s),hu(r,e,s),Ys;Du(),t=ac(e,t,n)}else e=o.treeContext,Si=df(s.nextSibling),xi=t,Ci=!0,wi=null,Ti=!1,e!==null&&bi(t,e),t=ic(t,r),t.flags|=4096;return t}return e=Qr(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function sc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function cc(e,t,n,r,i){return Ui(t),n=ho(e,t,n,r,void 0,i),r=yo(),e!==null&&!Xs?(bo(e,t,i),Sc(e,t,i)):(Ci&&r&&vi(t),t.flags|=1,Zs(e,t,n,i),t.child)}function lc(e,t,n,r,i,a){return Ui(t),t.updateQueue=null,n=_o(t,r,n,i),go(e),r=yo(),e!==null&&!Xs?(bo(e,t,a),Sc(e,t,a)):(Ci&&r&&vi(t),t.flags|=1,Zs(e,t,n,a),t.child)}function uc(e,t,n,r,i){if(Ui(t),t.stateNode===null){var a=Jr,o=n.contextType;typeof o==`object`&&o&&(a=Wi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Is,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Aa(t),o=n.contextType,a.context=typeof o==`object`&&o?Wi(o):Jr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Fs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Is.enqueueReplaceState(a,a.state,null),Ra(t,r,a,i),La(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=zs(n,s);a.props=c;var l=a.context,u=n.contextType;o=Jr,typeof u==`object`&&u&&(o=Wi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Rs(t,a,r,o),ka=!1;var f=t.memoizedState;a.state=f,Ra(t,r,a,i),La(),l=t.memoizedState,s||f!==l||ka?(typeof d==`function`&&(Fs(t,n,d,r),l=t.memoizedState),(c=ka||Ls(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,ja(e,t),o=t.memoizedProps,u=zs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Jr,typeof l==`object`&&l&&(c=Wi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Rs(t,a,r,c),ka=!1,f=t.memoizedState,a.state=f,Ra(t,r,a,i),La();var p=t.memoizedState;o!==d||f!==p||ka||e!==null&&e.dependencies!==null&&Hi(e.dependencies)?(typeof s==`function`&&(Fs(t,n,s,r),p=t.memoizedState),(u=ka||Ls(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Hi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,sc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Da(t,e.child,null,i),t.child=Da(t,null,n,i)):Zs(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Sc(e,t,i),e}function dc(e,t,n,r){return ji(),t.flags|=256,Zs(e,t,n,r),t.child}var fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function pc(e){return{baseLanes:e,cachePool:ua()}}function mc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function hc(e,t,n){var r=t.pendingProps,i=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!($a.current&2)),s&&(i=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(Ci){if(i?Ja(t):Za(t),(e=Si)?(e=sf(e,Ti),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pi===null?null:{id:mi,overflow:hi},retryLane:536870912,hydrationErrors:null},n=ri(e),n.return=t,t.child=n,xi=t,Si=null)):e=null,e===null)throw Di(t);return lf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(Za(t),i=t.mode,c=_c({mode:`hidden`,children:c},i),r=ti(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=pc(n),r.childLanes=mc(e,s,n),t.memoizedState=fc,nc(null,r)):(Ja(t),gc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Ja(t),t.flags&=-257,t=vc(e,t,n)):t.memoizedState===null?(Za(t),c=r.fallback,i=t.mode,r=_c({mode:`visible`,children:r.children},i),c=ti(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Da(t,e.child,null,n),r=t.child,r.memoizedState=pc(n),r.childLanes=mc(e,s,n),t.memoizedState=fc,t=nc(null,r)):(Za(t),t.child=e.child,t.flags|=128,t=null);else if(Ja(t),lf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,Ni({value:r,source:null,stack:null}),t=vc(e,t,n)}else if(Xs||Vi(e,t,n,!1),s=(n&e.childLanes)!==0,Xs||s){if(s=Fl,s!==null&&(r=We(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Gr(e,r),hu(s,e,r),Ys;cf(c)||Du(),t=vc(e,t,n)}else cf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Si=df(c.nextSibling),xi=t,Ci=!0,wi=null,Ti=!1,e!==null&&bi(t,e),t=gc(t,r.children),t.flags|=4096);return t}return i?(Za(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=Qr(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ti(c,i,n,null),c.flags|=2):c=Qr(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,nc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=pc(n):(i=c.cachePool,i===null?i=ua():(l=Xi._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=mc(e,s,n),t.memoizedState=fc,nc(e.child,r)):(Ja(t),n=e.child,e=n.sibling,n=Qr(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function gc(e,t){return t=_c({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function _c(e,t){return e=Xr(22,e,null,t),e.lanes=0,e}function vc(e,t,n){return Da(t,e.child,null,n),e=gc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function yc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),zi(e.return,t,n)}function bc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function xc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=$a.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,V($a,o),Zs(e,t,r,n),r=Ci?ui:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&yc(e,n,t);else if(e.tag===19)yc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&eo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),bc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&eo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}bc(t,!0,n,null,a,r);break;case`together`:bc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Sc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Vi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=Qr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Cc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Hi(e)))}function wc(e,t,n){switch(t.tag){case 3:te(t,t.stateNode.containerInfo),Li(t,Xi,e.memoizedState.cache),ji();break;case 27:case 5:re(t);break;case 4:te(t,t.stateNode.containerInfo);break;case 10:Li(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ya(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Ja(t),e=Sc(e,t,n),e===null?null:e.sibling):hc(e,t,n):(Ja(t),t.flags|=128,null);Ja(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Vi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return xc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),V($a,$a.current),r)break;return null;case 22:return t.lanes=0,tc(e,t,n,t.pendingProps);case 24:Li(t,Xi,e.memoizedState.cache)}return Sc(e,t,n)}function Tc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Xs=!0;else{if(!Cc(e,n)&&!(t.flags&128))return Xs=!1,wc(e,t,n);Xs=!!(e.flags&131072)}}else Xs=!1,Ci&&t.flags&1048576&&_i(t,ui,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=_a(t.elementType),t.type=e,typeof e==`function`)Zr(e)?(r=zs(e,r),t.tag=1,t=uc(null,t,e,r,n)):(t.tag=0,t=cc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===S){t.tag=11,t=Qs(null,t,e,r,n);break a}if(i===T){t.tag=14,t=$s(null,t,e,r,n);break a}}throw t=M(e)||e,Error(a(306,t,``))}}return t;case 0:return cc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=zs(r,t.pendingProps),uc(e,t,r,i,n);case 3:a:{if(te(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,ja(e,t),Ra(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Li(t,Xi,r),r!==o.cache&&Bi(t,[Xi],n,!0),La(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=dc(e,t,r,n);break a}if(r!==i){i=oi(Error(a(424)),t),Ni(i),t=dc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Si=df(e.firstChild),xi=t,Ci=!0,wi=null,Ti=!0,n=Oa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(ji(),r===i){t=Sc(e,t,n);break a}Zs(e,t,r,n)}t=t.child}return t;case 26:return sc(e,t),e===null?(n=Mf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ci||(n=t.type,e=t.pendingProps,r=Ud(U.current).createElement(n),r[Ye]=t,r[Xe]=e,Ld(r,n,e),ct(r),t.stateNode=r):t.memoizedState=Mf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return re(t),e===null&&Ci&&(r=t.stateNode=hf(t.type,t.pendingProps,U.current),xi=t,Ti=!0,i=Si,ef(t.type)?(ff=i,Si=df(r.firstChild)):Si=i),Zs(e,t,t.pendingProps.children,n),sc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ci&&((i=r=Si)&&(r=af(r,t.type,t.pendingProps,Ti),r===null?i=!1:(t.stateNode=r,xi=t,Si=df(r.firstChild),Ti=!1,i=!0)),i||Di(t)),re(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Kd(i,o)?r=null:s!==null&&Kd(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=ho(e,t,vo,null,null,n),tp._currentValue=i),sc(e,t),Zs(e,t,r,n),t.child;case 6:return e===null&&Ci&&((e=n=Si)&&(n=of(n,t.pendingProps,Ti),n===null?e=!1:(t.stateNode=n,xi=t,Si=null,e=!0)),e||Di(t)),null;case 13:return hc(e,t,n);case 4:return te(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Da(t,null,r,n):Zs(e,t,r,n),t.child;case 11:return Qs(e,t,t.type,t.pendingProps,n);case 7:return Zs(e,t,t.pendingProps,n),t.child;case 8:return Zs(e,t,t.pendingProps.children,n),t.child;case 12:return Zs(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Li(t,t.type,r.value),Zs(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Ui(t),i=Wi(i),r=r(i),t.flags|=1,Zs(e,t,r,n),t.child;case 14:return $s(e,t,t.type,t.pendingProps,n);case 15:return ec(e,t,t.type,t.pendingProps,n);case 19:return xc(e,t,n);case 31:return oc(e,t,n);case 22:return tc(e,t,n,t.pendingProps);case 24:return Ui(t),r=Wi(Xi),e===null?(i=ca(),i===null&&(i=Fl,o=Zi(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},Aa(t),Li(t,Xi,i)):((e.lanes&n)!==0&&(ja(e,t),Ra(t,null,null,n),La()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,Li(t,Xi,r),r!==i.cache&&Bi(t,[Xi],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Li(t,Xi,r))),Zs(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Ec(e){e.flags|=4}function Dc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw va=ma,fa}}else e.flags&=-16777217}function Oc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!qf(t)){if(wu())e.flags|=8192;else throw va=ma,fa}}function kc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Re(),e.lanes|=t,Yl|=t)}function Ac(e,t){if(!Ci)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function jc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Mc(e,t,n){var r=t.pendingProps;switch(yi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jc(t),null;case 1:return jc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ri(Xi),ne(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ai(t)?Ec(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Mi())),jc(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(Ec(t),o===null?(jc(t),Dc(t,i,null,r,n)):(jc(t),Oc(t,o))):o?o===e.memoizedState?(jc(t),t.flags&=-16777217):(Ec(t),jc(t),Oc(t,o)):(e=e.memoizedProps,e!==r&&Ec(t),jc(t),Dc(t,i,e,r,n)),null;case 27:if(ie(t),n=U.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return jc(t),null}e=ee.current,Ai(t)?Oi(t,e):(e=hf(i,r,n),t.stateNode=e,Ec(t))}return jc(t),null;case 5:if(ie(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return jc(t),null}if(o=ee.current,Ai(t))Oi(t,o);else{var s=Ud(U.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[Ye]=t,o[Xe]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Ld(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ec(t)}}return jc(t),Dc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=U.current,Ai(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=xi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Ye]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Pd(e.nodeValue,n)),e||Di(t,!0)}else e=Ud(e).createTextNode(r),e[Ye]=t,t.stateNode=e}return jc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ai(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[Ye]=t}else ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;jc(t),e=!1}else n=Mi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Qa(t),t):(Qa(t),null);if(t.flags&128)throw Error(a(558))}return jc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ai(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[Ye]=t}else ji(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;jc(t),i=!1}else i=Mi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Qa(t),t):(Qa(t),null)}return Qa(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),kc(t,t.updateQueue),jc(t),null);case 4:return ne(),e===null&&wd(t.stateNode.containerInfo),jc(t),null;case 10:return Ri(t.type),jc(t),null;case 19:if(B($a),r=t.memoizedState,r===null)return jc(t),null;if(i=!!(t.flags&128),o=r.rendering,o===null){if(i)Ac(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=eo(e),o!==null){for(t.flags|=128,Ac(r,!1),e=o.updateQueue,t.updateQueue=e,kc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)$r(n,e),n=n.sibling;return V($a,$a.current&1|2),Ci&&gi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ge()>tu&&(t.flags|=128,i=!0,Ac(r,!1),t.lanes=4194304)}}else{if(!i){if(e=eo(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,kc(t,e),Ac(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ci)return jc(t),null}else 2*ge()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,i=!0,Ac(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(jc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ge(),e.sibling=null,n=$a.current,V($a,i?n&1|2:n&1),Ci&&gi(t,r.treeForkCount),e);case 22:case 23:return Qa(t),Ga(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(jc(t),t.subtreeFlags&6&&(t.flags|=8192)):jc(t),n=t.updateQueue,n!==null&&kc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&B(sa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ri(Xi),jc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Nc(e,t){switch(yi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ri(Xi),ne(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ie(t),null;case 31:if(t.memoizedState!==null){if(Qa(t),t.alternate===null)throw Error(a(340));ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Qa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));ji()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B($a),null;case 4:return ne(),null;case 10:return Ri(t.type),null;case 22:case 23:return Qa(t),Ga(),e!==null&&B(sa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ri(Xi),null;case 25:return null;default:return null}}function Pc(e,t){switch(yi(t),t.tag){case 3:Ri(Xi),ne();break;case 26:case 27:case 5:ie(t);break;case 4:ne();break;case 31:t.memoizedState!==null&&Qa(t);break;case 13:Qa(t);break;case 19:B($a);break;case 10:Ri(t.type);break;case 22:case 23:Qa(t),Ga(),e!==null&&B(sa);break;case 24:Ri(Xi)}}function Fc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Gu(t,t.return,e)}}function Ic(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Gu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Gu(t,t.return,e)}}function Lc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ba(t,n)}catch(t){Gu(e,e.return,t)}}}function Rc(e,t,n){n.props=zs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Gu(e,t,n)}}function zc(e,t){try{var n=e.ref;if(n!==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 n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Gu(e,t,n)}}function Bc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Gu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Gu(e,t,n)}else n.current=null}}function Vc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Gu(e,e.return,t)}}function Hc(e,t,n){try{var r=e.stateNode;Rd(r,e.type,n,t),r[Xe]=t}catch(t){Gu(e,e.return,t)}}function Uc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ef(e.type)||e.tag===4}function Wc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Uc(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&&ef(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Gc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ht));else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Gc(e,t,n),e=e.sibling;e!==null;)Gc(e,t,n),e=e.sibling}function Kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ef(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(e,t,n),e=e.sibling}function qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ld(t,r,n),t[Ye]=e,t[Xe]=n}catch(t){Gu(e,e.return,t)}}var Jc=!1,Yc=!1,Xc=!1,Zc=typeof WeakSet==`function`?WeakSet:Set,Qc=null;function $c(e,t){if(e=e.containerInfo,Vd=up,e=hr(e),gr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Hd={focusedElem:e,selectionRange:n},up=!1,Qc=t;Qc!==null;)if(t=Qc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Qc=e;else for(;Qc!==null;){switch(t=Qc,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=zs(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Gu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)rf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:rf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,Qc=e;break}Qc=t.return}}function el(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:hl(e,n),r&4&&Fc(5,n);break;case 1:if(hl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Gu(n,n.return,e)}else{var i=zs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Gu(n,n.return,e)}}}r&64&&Lc(n),r&512&&zc(n,n.return);break;case 3:if(hl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ba(e,t)}catch(e){Gu(n,n.return,e)}}break;case 27:t===null&&r&4&&qc(n);case 26:case 5:hl(e,n),t===null&&r&4&&Vc(n),r&512&&zc(n,n.return);break;case 12:hl(e,n);break;case 31:hl(e,n),r&4&&ol(e,n);break;case 13:hl(e,n),r&4&&sl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Yu.bind(null,n),uf(e,n))));break;case 22:if(r=n.memoizedState!==null||Jc,!r){t=t!==null&&t.memoizedState!==null||Yc,i=Jc;var a=Yc;Jc=r,(Yc=t)&&!a?_l(e,n,!!(n.subtreeFlags&8772)):hl(e,n),Jc=i,Yc=a}break;case 30:break;default:hl(e,n)}}function tl(e){var t=e.alternate;t!==null&&(e.alternate=null,tl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&rt(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 nl=null,rl=!1;function il(e,t,n){for(n=n.child;n!==null;)al(e,t,n),n=n.sibling}function al(e,t,n){if(q&&typeof q.onCommitFiberUnmount==`function`)try{q.onCommitFiberUnmount(we,n)}catch{}switch(n.tag){case 26:Yc||Bc(n,t),il(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Yc||Bc(n,t);var r=nl,i=rl;ef(n.type)&&(nl=n.stateNode,rl=!1),il(e,t,n),gf(n.stateNode),nl=r,rl=i;break;case 5:Yc||Bc(n,t);case 6:if(r=nl,i=rl,nl=null,il(e,t,n),nl=r,rl=i,nl!==null){if(rl)try{(nl.nodeType===9?nl.body:nl.nodeName===`HTML`?nl.ownerDocument.body:nl).removeChild(n.stateNode)}catch(e){Gu(n,t,e)}else try{nl.removeChild(n.stateNode)}catch(e){Gu(n,t,e)}}break;case 18:nl!==null&&(rl?(e=nl,tf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Ip(e)):tf(nl,n.stateNode));break;case 4:r=nl,i=rl,nl=n.stateNode.containerInfo,rl=!0,il(e,t,n),nl=r,rl=i;break;case 0:case 11:case 14:case 15:Ic(2,n,t),Yc||Ic(4,n,t),il(e,t,n);break;case 1:Yc||(Bc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Rc(n,t,r)),il(e,t,n);break;case 21:il(e,t,n);break;case 22:Yc=(r=Yc)||n.memoizedState!==null,il(e,t,n),Yc=r;break;default:il(e,t,n)}}function ol(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ip(e)}catch(e){Gu(t,t.return,e)}}}function sl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ip(e)}catch(e){Gu(t,t.return,e)}}function cl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Zc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Zc),t;default:throw Error(a(435,e.tag))}}function ll(e,t){var n=cl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Xu.bind(null,e,t);t.then(r,r)}})}function ul(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(ef(c.type)){nl=c.stateNode,rl=!1;break a}break;case 5:nl=c.stateNode,rl=!1;break a;case 3:case 4:nl=c.stateNode.containerInfo,rl=!0;break a}c=c.return}if(nl===null)throw Error(a(160));al(o,s,i),nl=null,rl=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)fl(t,e),t=t.sibling}var dl=null;function fl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ul(t,e),pl(e),r&4&&(Ic(3,e,e.return),Fc(3,e),Ic(5,e,e.return));break;case 1:ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),r&64&&Jc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=dl;if(ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[nt]||o[Ye]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Ld(o,r,n),o[Ye]=e,ct(o),r=o;break a;case`link`:var s=Wf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),Ld(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Wf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),Ld(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[Ye]=e,ct(o),r=o}e.stateNode=r}else Gf(i,e.type,e.stateNode)}else e.stateNode=zf(i,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&Hc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Gf(i,e.type,e.stateNode):zf(i,r,e.memoizedProps))}break;case 27:ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),n!==null&&r&4&&Hc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),e.flags&32){i=e.stateNode;try{Pt(i,``)}catch(t){Gu(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Hc(e,i,n===null?i:n.memoizedProps)),r&1024&&(Xc=!0);break;case 6:if(ul(t,e),pl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Gu(e,e.return,t)}}break;case 3:if(Uf=null,i=dl,dl=yf(t.containerInfo),ul(t,e),dl=i,pl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ip(t.containerInfo)}catch(t){Gu(e,e.return,t)}Xc&&(Xc=!1,ml(e));break;case 4:r=dl,dl=yf(e.stateNode.containerInfo),ul(t,e),pl(e),dl=r;break;case 12:ul(t,e),pl(e);break;case 31:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 13:ul(t,e),pl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=ge()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Jc,d=Yc;if(Jc=u||i,Yc=d||l,ul(t,e),Yc=d,Jc=u,pl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||Jc||Yc||gl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Gu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Gu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?nf(m,!0):nf(l.stateNode,!1)}catch(e){Gu(l,l.return,e)}}}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 a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ll(e,n))));break;case 19:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 30:break;case 21:break;default:ul(t,e),pl(e)}}function pl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Uc(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;Kc(e,Wc(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(Pt(o,``),n.flags&=-33),Kc(e,Wc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Gc(e,Wc(e),s);break;default:throw Error(a(161))}}catch(t){Gu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ml(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ml(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function hl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)el(e,t.alternate,t),t=t.sibling}function gl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ic(4,t,t.return),gl(t);break;case 1:Bc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Rc(t,t.return,n),gl(t);break;case 27:gf(t.stateNode);case 26:case 5:Bc(t,t.return),gl(t);break;case 22:t.memoizedState===null&&gl(t);break;case 30:gl(t);break;default:gl(t)}e=e.sibling}}function _l(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:_l(i,a,n),Fc(4,a);break;case 1:if(_l(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Gu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)za(c[i],s)}catch(e){Gu(r,r.return,e)}}n&&o&64&&Lc(a),zc(a,a.return);break;case 27:qc(a);case 26:case 5:_l(i,a,n),n&&r===null&&o&4&&Vc(a),zc(a,a.return);break;case 12:_l(i,a,n);break;case 31:_l(i,a,n),n&&o&4&&ol(i,a);break;case 13:_l(i,a,n),n&&o&4&&sl(i,a);break;case 22:a.memoizedState===null&&_l(i,a,n),zc(a,a.return);break;case 30:break;default:_l(i,a,n)}t=t.sibling}}function vl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Qi(n))}function yl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qi(e))}function bl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)xl(e,t,n,r),t=t.sibling}function xl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:bl(e,t,n,r),i&2048&&Fc(9,t);break;case 1:bl(e,t,n,r);break;case 3:bl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qi(e)));break;case 12:if(i&2048){bl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Gu(t,t.return,e)}}else bl(e,t,n,r);break;case 31:bl(e,t,n,r);break;case 13:bl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?bl(e,t,n,r):(a._visibility|=2,Sl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?bl(e,t,n,r):Cl(e,t),i&2048&&vl(o,t);break;case 24:bl(e,t,n,r),i&2048&&yl(t.alternate,t);break;default:bl(e,t,n,r)}}function Sl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Sl(a,o,s,c,i),Fc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Sl(a,o,s,c,i)):u._visibility&2?Sl(a,o,s,c,i):Cl(a,o),i&&l&2048&&vl(o.alternate,o);break;case 24:Sl(a,o,s,c,i),i&&l&2048&&yl(o.alternate,o);break;default:Sl(a,o,s,c,i)}t=t.sibling}}function Cl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Cl(n,r),i&2048&&vl(r.alternate,r);break;case 24:Cl(n,r),i&2048&&yl(r.alternate,r);break;default:Cl(n,r)}t=t.sibling}}var wl=8192;function Tl(e,t,n){if(e.subtreeFlags&wl)for(e=e.child;e!==null;)El(e,t,n),e=e.sibling}function El(e,t,n){switch(e.tag){case 26:Tl(e,t,n),e.flags&wl&&e.memoizedState!==null&&Jf(n,dl,e.memoizedState,e.memoizedProps);break;case 5:Tl(e,t,n);break;case 3:case 4:var r=dl;dl=yf(e.stateNode.containerInfo),Tl(e,t,n),dl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=wl,wl=16777216,Tl(e,t,n),wl=r):Tl(e,t,n));break;default:Tl(e,t,n)}}function Dl(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 Ol(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Qc=r,jl(r,e)}Dl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kl(e),e=e.sibling}function kl(e){switch(e.tag){case 0:case 11:case 15:Ol(e),e.flags&2048&&Ic(9,e,e.return);break;case 3:Ol(e);break;case 12:Ol(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Al(e)):Ol(e);break;default:Ol(e)}}function Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Qc=r,jl(r,e)}Dl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ic(8,t,t.return),Al(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Al(t));break;default:Al(t)}e=e.sibling}}function jl(e,t){for(;Qc!==null;){var n=Qc;switch(n.tag){case 0:case 11:case 15:Ic(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Qi(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Qc=r;else a:for(n=e;Qc!==null;){r=Qc;var i=r.sibling,a=r.return;if(tl(r),r===n){Qc=null;break a}if(i!==null){i.return=a,Qc=i;break a}Qc=a}}}var Ml={getCacheForType:function(e){var t=Wi(Xi),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Wi(Xi).controller.signal}},Nl=typeof WeakMap==`function`?WeakMap:Map,Pl=0,Fl=null,Il=null,Ll=0,Rl=0,zl=null,Bl=!1,Vl=!1,Hl=!1,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return Pl&2&&Ll!==0?Ll&-Ll:P.T===null?Ke():fd()}function mu(){if(Jl===0){if(!(Ll&536870912)||Ci){var e=je;je<<=1,!(je&3932160)&&(je=262144),Jl=e}else Jl=536870912}return e=Ka.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===Fl&&(Rl===2||Rl===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Ll,Jl,!1)),Be(e,n),(!(Pl&2)||e!==Fl)&&(e===Fl&&(!(Pl&2)&&(Kl|=n),Wl===4&&yu(e,Ll,Jl,!1)),id(e))}function gu(e,t,n){if(Pl&6)throw Error(a(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||Ie(e,t),i=r?Au(e,t):Ou(e,t,!0),o=r;do{if(i===0){Vl&&!r&&yu(e,t,0,!1);break}if(n=e.current.alternate,o&&!vu(n)){i=Ou(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Hl&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,i=4;break a}o=Zl,Zl=i,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Jl,!Bl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=$l+300-ge(),10<i)){if(yu(r,t,Jl,!Bl),Fe(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Yd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,`Throttled`,-0,0),i);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,null,-0,0)}break}while(1);id(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ht},El(t,a,d);var m=(a&62914560)===a?$l-ge():(a&4194048)===a?eu-ge():0;if(m=Xf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!ur(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ee(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&He(e,n,t)}function bu(){return Pl&6?!0:(ad(0,!1),!1)}function xu(){if(Il!==null){if(Rl===0)var e=Il.return;else e=Il,Ii=Fi=null,xo(e),xa=null,Sa=0,e=Il;for(;e!==null;)Pc(e.alternate,e),e=e.return;Il=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Xd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),Fl=e,Il=n=Qr(e.current,null),Ll=t,Rl=0,zl=null,Bl=!1,Vl=Ie(e,t),Hl=!1,Yl=Jl=ql=Kl=Gl=Wl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ee(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,Hr(),n}function Cu(e,t){no=null,P.H=js,t===da||t===pa?(t=ya(),Rl=3):t===fa?(t=ya(),Rl=4):Rl=t===Ys?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,Il===null&&(Wl=1,Us(e,oi(t,e.current)))}function wu(){var e=Ka.current;return e===null?!0:(Ll&4194048)===Ll?qa===null:(Ll&62914560)===Ll||Ll&536870912?e===qa:!1}function Tu(){var e=P.H;return P.H=js,e===null?js:e}function Eu(){var e=P.A;return P.A=Ml,e}function Du(){Wl=4,Bl||(Ll&4194048)!==Ll&&Ka.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||Fl===null||yu(Fl,Ll,Jl,!1)}function Ou(e,t,n){var r=Pl;Pl|=2;var i=Tu(),a=Eu();(Fl!==e||Ll!==t)&&(nu=null,Su(e,t)),t=!1;var o=Wl;a:do try{if(Rl!==0&&Il!==null){var s=Il,c=zl;switch(Rl){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:Ka.current===null&&(t=!0);var l=Rl;if(Rl=0,zl=null,Pu(e,s,c,l),n&&Vl){o=0;break a}break;default:l=Rl,Rl=0,zl=null,Pu(e,s,c,l)}}ku(),o=Wl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Ii=Fi=null,Pl=r,P.H=i,P.A=a,Il===null&&(Fl=null,Ll=0,Hr()),o}function ku(){for(;Il!==null;)Mu(Il)}function Au(e,t){var n=Pl;Pl|=2;var r=Tu(),i=Eu();Fl!==e||Ll!==t?(nu=null,tu=ge()+500,Su(e,t)):Vl=Ie(e,t);a:do try{if(Rl!==0&&Il!==null){t=Il;var o=zl;b:switch(Rl){case 1:Rl=0,zl=null,Pu(e,t,o,1);break;case 2:case 9:if(ha(o)){Rl=0,zl=null,Nu(t);break}t=function(){Rl!==2&&Rl!==9||Fl!==e||(Rl=7),id(e)},o.then(t,t);break a;case 3:Rl=7;break a;case 4:Rl=5;break a;case 7:ha(o)?(Rl=0,zl=null,Nu(t)):(Rl=0,zl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(Il.tag){case 26:s=Il.memoizedState;case 5:case 27:var c=Il;if(s?qf(s):c.stateNode.complete){Rl=0,zl=null;var l=c.sibling;if(l!==null)Il=l;else{var u=c.return;u===null?Il=null:(Il=u,Fu(u))}break b}}Rl=0,zl=null,Pu(e,t,o,5);break;case 6:Rl=0,zl=null,Pu(e,t,o,6);break;case 8:xu(),Wl=6;break a;default:throw Error(a(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Ii=Fi=null,P.H=r,P.A=i,Pl=n,Il===null?(Fl=null,Ll=0,Hr(),Wl):0}function ju(){for(;Il!==null&&!me();)Mu(Il)}function Mu(e){var t=Tc(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Fu(e):Il=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=lc(n,t,t.pendingProps,t.type,void 0,Ll);break;case 11:t=lc(n,t,t.pendingProps,t.type.render,t.ref,Ll);break;case 5:xo(t);default:Pc(n,t),t=Il=$r(t,Ul),t=Tc(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):Il=t}function Pu(e,t,n,r){Ii=Fi=null,xo(t),xa=null,Sa=0;var i=t.return;try{if(Js(e,i,t,n,Ll)){Wl=1,Us(e,oi(n,e.current)),Il=null;return}}catch(t){if(i!==null)throw Il=i,t;Wl=1,Us(e,oi(n,e.current)),Il=null;return}t.flags&32768?(Ci||r===1?e=!0:Vl||Ll&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ka.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Bl);return}e=t.return;var n=Mc(t.alternate,t,Ul);if(n!==null){Il=n;return}if(t=t.sibling,t!==null){Il=t;return}Il=t=e}while(t!==null);Wl===0&&(Wl=5)}function Iu(e,t){do{var n=Nc(e.alternate,e);if(n!==null){n.flags&=32767,Il=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Il=e;return}Il=e=n}while(e!==null);Wl=6,Il=null}function Lu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(Pl&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=Vr,Ve(e,n,o,s,c,l),e===Fl&&(Il=Fl=null,Ll=0),ou=t,au=e,su=n,cu=o,lu=i,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Zu(be,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=P.T,P.T=null,i=F.p,F.p=2,s=Pl,Pl|=4;try{$c(e,t,n)}finally{Pl=s,F.p=i,P.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Pl;Pl|=4;try{fl(t,e);var a=Hd,o=hr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&mr(s.ownerDocument.documentElement,s)){if(c!==null&&gr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=pr(s,h),v=pr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}up=!!Vd,Hd=Vd=null}finally{Pl=i,F.p=r,P.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Pl;Pl|=4;try{el(e,t.alternate,t)}finally{Pl=i,F.p=r,P.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,he();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),J(n),t=t.stateNode,q&&typeof q.onCommitFiberRoot==`function`)try{q.onCommitFiberRoot(we,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}su&3&&Hu(),id(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,ad(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Qi(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=J(su),r=P.T,i=F.p;try{F.p=32>n?32:n,P.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,Pl&6)throw Error(a(331));var c=Pl;if(Pl|=4,kl(o.current),xl(o,o.current,s,n),Pl=c,ad(0,!1),q&&typeof q.onPostCommitFiberRoot==`function`)try{q.onPostCommitFiberRoot(we,o)}catch{}return!0}finally{F.p=i,P.T=r,Vu(e,t)}}function Wu(e,t,n){t=oi(n,t),t=Gs(e.stateNode,t,2),e=Na(e,t,2),e!==null&&(Be(e,2),id(e))}function Gu(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=oi(n,e),n=Ks(2),r=Na(t,n,2),r!==null&&(qs(n,r,t,e),Be(r,2),id(r));break}}t=t.return}}function Ku(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Nl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Hl=!0,i.add(n),e=qu.bind(null,e,t,n),t.then(e,e))}function qu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Fl===e&&(Ll&n)===n&&(Wl===4||Wl===3&&(Ll&62914560)===Ll&&300>ge()-$l?!(Pl&2)&&Su(e,0):ql|=n,Yl===Ll&&(Yl=0)),id(e)}function Ju(e,t){t===0&&(t=Re()),e=Gr(e,t),e!==null&&(Be(e,t),id(e))}function Yu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ju(e,n)}function Xu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),Ju(e,n)}function Zu(e,t){return fe(e,t)}var Qu=null,$u=null,ed=!1,td=!1,nd=!1,rd=0;function id(e){e!==$u&&e.next===null&&($u===null?Qu=$u=e:$u=$u.next=e),td=!0,ed||(ed=!0,dd())}function ad(e,t){if(!nd&&td){nd=!0;do for(var n=!1,r=Qu;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ee(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ud(r,a))}else a=Ll,a=Fe(r,r===Fl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ie(r,a)||(n=!0,ud(r,a))}r=r.next}while(n);nd=!1}}function od(){sd()}function sd(){td=ed=!1;var e=0;rd!==0&&Jd()&&(e=rd);for(var t=ge(),n=null,r=Qu;r!==null;){var i=r.next,a=cd(r,t);a===0?(r.next=null,n===null?Qu=i:n.next=i,i===null&&($u=n)):(n=r,(e!==0||a&3)&&(td=!0)),r=i}iu!==0&&iu!==5||ad(e,!1),rd!==0&&(rd=0)}function cd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ee(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Le(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Fl,n=Ll,n=Fe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Rl===2||Rl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&pe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ie(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&pe(r),J(n)){case 2:case 8:n=ye;break;case 32:n=be;break;case 268435456:n=Se;break;default:n=be}return r=ld.bind(null,e),n=fe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&pe(r),e.callbackPriority=2,e.callbackNode=null,2}function ld(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Ll;return r=Fe(e,e===Fl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),cd(e,ge()),e.callbackNode!=null&&e.callbackNode===n?ld.bind(null,e):null)}function ud(e,t){if(Hu())return null;gu(e,t,!0)}function dd(){Qd(function(){Pl&6?fe(ve,od):sd()})}function fd(){if(rd===0){var e=ta;e===0&&(e=Ae,Ae<<=1,!(Ae&261888)&&(Ae=256)),rd=e}return rd}function pd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Vt(``+e)}function md(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function hd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=pd((i[Xe]||null).action),o=r.submitter;o&&(t=(t=o[Xe]||null)?pd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new un(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(rd!==0){var e=o?md(i,o):new FormData(i);_s(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?md(i,o):new FormData(i),_s(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var gd=0;gd<Ir.length;gd++){var _d=Ir[gd];Lr(_d.toLowerCase(),`on`+(_d[0].toUpperCase()+_d.slice(1)))}Lr(Or,`onAnimationEnd`),Lr(kr,`onAnimationIteration`),Lr(Ar,`onAnimationStart`),Lr(`dblclick`,`onDoubleClick`),Lr(`focusin`,`onFocus`),Lr(`focusout`,`onBlur`),Lr(jr,`onTransitionRun`),Lr(Mr,`onTransitionStart`),Lr(Nr,`onTransitionCancel`),Lr(Pr,`onTransitionEnd`),ft(`onMouseEnter`,[`mouseout`,`mouseover`]),ft(`onMouseLeave`,[`mouseout`,`mouseover`]),ft(`onPointerEnter`,[`pointerout`,`pointerover`]),ft(`onPointerLeave`,[`pointerout`,`pointerover`]),dt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),dt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),dt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),dt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),dt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),dt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var vd=`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(` `),yd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(vd));function bd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Rr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Rr(e)}i.currentTarget=null,a=c}}}}function xd(e,t){var n=t[Qe];n===void 0&&(n=t[Qe]=new Set);var r=e+`__bubble`;n.has(r)||(Td(t,e,2,!1),n.add(r))}function Sd(e,t,n){var r=0;t&&(r|=4),Td(n,e,r,t)}var Cd=`_reactListening`+Math.random().toString(36).slice(2);function wd(e){if(!e[Cd]){e[Cd]=!0,lt.forEach(function(t){t!==`selectionchange`&&(yd.has(t)||Sd(t,!1,e),Sd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Cd]||(t[Cd]=!0,Sd(`selectionchange`,!1,t))}}function Td(e,t,n,r){switch(_p(t)){case 2:var i=dp;break;case 8:i=fp;break;default:i=pp}n=i.bind(null,t,n,e),i=void 0,!Qt||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Ed(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=it(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}Yt(function(){var r=a,i=Wt(n),o=[];a:{var c=Fr.get(e);if(c!==void 0){var l=un,u=e;switch(e){case`keypress`:if(an(n)===0)break a;case`keydown`:case`keyup`:l=Dn;break;case`focusin`:u=`focus`,l=yn;break;case`focusout`:u=`blur`,l=yn;break;case`beforeblur`:case`afterblur`:l=yn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=_n;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=vn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=kn;break;case Or:case kr:case Ar:l=bn;break;case Pr:l=An;break;case`scroll`:case`scrollend`:l=fn;break;case`wheel`:l=jn;break;case`copy`:case`cut`:case`paste`:l=xn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=On;break;case`toggle`:case`beforetoggle`:l=Mn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Xt(m,p),g!=null&&d.push(Dd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Ut&&(u=n.relatedTarget||n.fromElement)&&(it(u)||u[Ze]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?it(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=_n,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=On,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ot(l),h=u==null?c:ot(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,it(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=kd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Ad(o,c,l,d,!1),u!==null&&f!==null&&Ad(o,f,u,d,!0)}}a:{if(c=r?ot(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=Qn;else if(Kn(c)){if($n)v=cr;else{v=or;var y=ar}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Rt(r.elementType)&&(v=Qn):v=sr;if(v&&=v(e,r)){qn(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&At(c,`number`,c.value)}switch(y=r?ot(r):window,e){case`focusin`:(Kn(y)||y.contentEditable===`true`)&&(vr=y,yr=r,br=null);break;case`focusout`:br=yr=vr=null;break;case`mousedown`:xr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:xr=!1,Sr(o,n,i);break;case`selectionchange`:if(_r)break;case`keydown`:case`keyup`:Sr(o,n,i)}var b;if(Pn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Hn?Bn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Ln&&n.locale!==`ko`&&(Hn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Hn&&(b=rn()):(en=i,tn=`value`in en?en.value:en.textContent,Hn=!0)),y=Od(r,x),0<y.length&&(x=new Sn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=Vn(n),b!==null&&(x.data=b)))),(b=In?Un(e,n):Wn(e,n))&&(x=Od(r,`onBeforeInput`),0<x.length&&(y=new Sn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),hd(o,e,r,n,i)}bd(o,t)})}function Dd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Od(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Xt(e,n),i!=null&&r.unshift(Dd(e,i,a)),i=Xt(e,t),i!=null&&r.push(Dd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function kd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ad(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Xt(n,a),l!=null&&o.unshift(Dd(n,l,c))):i||(l=Xt(n,a),l!=null&&o.push(Dd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var jd=/\r\n?/g,Md=/\u0000|\uFFFD/g;function Nd(e){return(typeof e==`string`?e:``+e).replace(jd,`
10
+ `).replace(Md,``)}function Pd(e,t){return t=Nd(t),Nd(e)===t}function Fd(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Pt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Pt(e,``+r);break;case`className`:vt(e,`class`,r);break;case`tabIndex`:vt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:vt(e,n,r);break;case`style`:Lt(e,r,o);break;case`data`:if(t!==`object`){vt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Vt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Fd(e,t,`name`,i.name,i,null),Fd(e,t,`formEncType`,i.formEncType,i,null),Fd(e,t,`formMethod`,i.formMethod,i,null),Fd(e,t,`formTarget`,i.formTarget,i,null)):(Fd(e,t,`encType`,i.encType,i,null),Fd(e,t,`method`,i.method,i,null),Fd(e,t,`target`,i.target,i,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Vt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Ht);break;case`onScroll`:r!=null&&xd(`scroll`,e);break;case`onScrollEnd`:r!=null&&xd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}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}n=Vt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);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(n,``+r):e.removeAttribute(n);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(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:xd(`beforetoggle`,e),xd(`toggle`,e),_t(e,`popover`,r);break;case`xlinkActuate`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:yt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:_t(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=zt.get(n)||n,_t(e,n,r))}}function Id(e,t,n,r,i,o){switch(n){case`style`:Lt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Pt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Pt(e,``+r);break;case`onScroll`:r!=null&&xd(`scroll`,e);break;case`onScrollEnd`:r!=null&&xd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Ht);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!ut.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[Xe]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):_t(e,n,r)}}}function Ld(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:xd(`error`,e),xd(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Fd(e,t,o,s,n,null)}}i&&Fd(e,t,`srcSet`,n.srcSet,n,null),r&&Fd(e,t,`src`,n.src,n,null);return;case`input`:xd(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:Fd(e,t,r,d,n,null)}}kt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in xd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Fd(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&jt(e,!!r,n,!0):jt(e,!!r,t,!1);return;case`textarea`:for(s in xd(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:Fd(e,t,s,c,n,null)}Nt(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Fd(e,t,l,r,n,null)}return;case`dialog`:xd(`beforetoggle`,e),xd(`toggle`,e),xd(`cancel`,e),xd(`close`,e);break;case`iframe`:case`object`:xd(`load`,e);break;case`video`:case`audio`:for(r=0;r<vd.length;r++)xd(vd[r],e);break;case`image`:xd(`error`,e),xd(`load`,e);break;case`details`:xd(`toggle`,e);break;case`embed`:case`source`:case`link`:xd(`error`,e),xd(`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(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Fd(e,t,u,r,n,null)}return;default:if(Rt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Id(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Fd(e,t,c,r,n,null))}function Rd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Fd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&Fd(e,t,p,m,r,f)}}Ot(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Fd(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Fd(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?jt(e,!!n,n?[]:``,!1):jt(e,!!n,t,!0)):jt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Fd(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&Fd(e,t,s,i,r,o)}Mt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Fd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Fd(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Fd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:Fd(e,t,u,p,r,m)}return;default:if(Rt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Id(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Id(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Fd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Fd(e,t,f,p,r,m)}function zd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Bd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&zd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&zd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.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 Vd=null,Hd=null;function Ud(e){return e.nodeType===9?e:e.ownerDocument}function Wd(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 Gd(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 Kd(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 qd=null;function Jd(){var e=window.event;return e&&e.type===`popstate`?e!==qd&&(qd=e,!0):(qd=null,!1)}var Yd=typeof setTimeout==`function`?setTimeout:void 0,Xd=typeof clearTimeout==`function`?clearTimeout:void 0,Zd=typeof Promise==`function`?Promise:void 0,Qd=typeof queueMicrotask==`function`?queueMicrotask:Zd===void 0?Yd:function(e){return Zd.resolve(null).then(e).catch($d)};function $d(e){setTimeout(function(){throw e})}function ef(e){return e===`head`}function tf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Ip(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)gf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,gf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[nt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&gf(e.ownerDocument.body)}n=i}while(n);Ip(t)}function nf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function rf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:rf(n),rt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function af(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[nt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=df(e.nextSibling),e===null)break}return null}function of(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=df(e.nextSibling),e===null))return null;return e}function sf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=df(e.nextSibling),e===null))return null;return e}function cf(e){return e.data===`$?`||e.data===`$~`}function lf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function uf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function df(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 ff=null;function pf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return df(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function hf(e,t,n){switch(t=Ud(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function gf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);rt(e)}var _f=new Map,vf=new Set;function yf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var bf=F.d;F.d={f:xf,r:Sf,D:Tf,C:Ef,L:Df,m:Of,X:Af,S:kf,M:jf};function xf(){var e=bf.f(),t=bu();return e||t}function Sf(e){var t=at(e);t!==null&&t.tag===5&&t.type===`form`?ys(t):bf.r(e)}var Cf=typeof document>`u`?null:document;function wf(e,t,n){var r=Cf;if(r&&typeof t==`string`&&t){var i=Dt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),vf.has(i)||(vf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ld(t,`link`,e),ct(t),r.head.appendChild(t)))}}function Tf(e){bf.D(e),wf(`dns-prefetch`,e,null)}function Ef(e,t){bf.C(e,t),wf(`preconnect`,e,t)}function Df(e,t,n){bf.L(e,t,n);var r=Cf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Dt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Dt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Dt(n.imageSizes)+`"]`)):i+=`[href="`+Dt(e)+`"]`;var a=i;switch(t){case`style`:a=Nf(e);break;case`script`:a=Lf(e)}_f.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),_f.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Pf(a))||t===`script`&&r.querySelector(Rf(a))||(t=r.createElement(`link`),Ld(t,`link`,e),ct(t),r.head.appendChild(t)))}}function Of(e,t){bf.m(e,t);var n=Cf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Dt(r)+`"][href="`+Dt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Lf(e)}if(!_f.has(a)&&(e=p({rel:`modulepreload`,href:e},t),_f.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Rf(a)))return}r=n.createElement(`link`),Ld(r,`link`,e),ct(r),n.head.appendChild(r)}}}function kf(e,t,n){bf.S(e,t,n);var r=Cf;if(r&&e){var i=st(r).hoistableStyles,a=Nf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Pf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&Vf(e,n);var c=o=r.createElement(`link`);ct(c),Ld(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Bf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Af(e,t){bf.X(e,t);var n=Cf;if(n&&e){var r=st(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=p({src:e,async:!0},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),ct(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t){bf.M(e,t);var n=Cf;if(n&&e){var r=st(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),ct(a),Ld(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t,n,r){var i=(i=U.current)?yf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Nf(n.href),n=st(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Nf(n.href);var o=st(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Pf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),_f.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},_f.set(e,n),o||If(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Lf(n),n=st(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Nf(e){return`href="`+Dt(e)+`"`}function Pf(e){return`link[rel="stylesheet"][`+e+`]`}function Ff(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function If(e,t,n,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}),Ld(t,`link`,n),ct(t),e.head.appendChild(t))}function Lf(e){return`[src="`+Dt(e)+`"]`}function Rf(e){return`script[async]`+e}function zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Dt(n.href)+`"]`);if(r)return t.instance=r,ct(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ct(r),Ld(r,`style`,i),Bf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Nf(n.href);var o=e.querySelector(Pf(i));if(o)return t.state.loading|=4,t.instance=o,ct(o),o;r=Ff(n),(i=_f.get(i))&&Vf(r,i),o=(e.ownerDocument||e).createElement(`link`),ct(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ld(o,`link`,r),t.state.loading|=4,Bf(o,n.precedence,e),t.instance=o;case`script`:return o=Lf(n.src),(i=e.querySelector(Rf(o)))?(t.instance=i,ct(i),i):(r=n,(i=_f.get(o))&&(r=p({},n),Hf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),ct(i),Ld(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Bf(r,n.precedence,e));return t.instance}function Bf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Uf=null;function Wf(e,t,n){if(Uf===null){var r=new Map,i=Uf=new Map;i.set(n,r)}else i=Uf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[nt]||a[Ye]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Gf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Kf(e,t,n){if(n===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;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!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 qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Jf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Nf(r.href),a=t.querySelector(Pf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Zf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ct(a);return}a=t.ownerDocument||t,r=Ff(r),(i=_f.get(i))&&Vf(r,i),a=a.createElement(`link`),ct(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ld(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Zf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Yf=0;function Xf(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Yf===0&&(Yf=62500*Bd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Yf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qf=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qf=new Map,t.forEach(ep,e),Qf=null,Zf.call(e))}function ep(e,t){if(!(t.state.loading&4)){var n=Qf.get(e);if(n)var r=n.get(null);else{n=new Map,Qf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Zf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var tp={$$typeof:x,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function np(e,t,n,r,i,a,o,s,c){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=ze(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ze(0),this.hiddenUpdates=ze(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function rp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new np(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Xr(3,null,null,t),e.current=a,a.stateNode=e,t=Zi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Aa(a),e}function ip(e){return e?(e=Jr,e):Jr}function ap(e,t,n,r,i,a){i=ip(i),r.context===null?r.context=i:r.pendingContext=i,r=Ma(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Na(e,r,t),n!==null&&(hu(n,e,t),Pa(n,e,t))}function op(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sp(e,t){op(e,t),(e=e.alternate)&&op(e,t)}function cp(e){if(e.tag===13||e.tag===31){var t=Gr(e,67108864);t!==null&&hu(t,e,67108864),sp(e,67108864)}}function lp(e){if(e.tag===13||e.tag===31){var t=pu();t=Ge(t);var n=Gr(e,t);n!==null&&hu(n,e,t),sp(e,t)}}var up=!0;function dp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,pp(e,t,n,r)}finally{F.p=a,P.T=i}}function fp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,pp(e,t,n,r)}finally{F.p=a,P.T=i}}function pp(e,t,n,r){if(up){var i=mp(r);if(i===null)Ed(e,t,r,hp,n),Ep(e,r);else if(Op(i,e,t,n,r))r.stopPropagation();else if(Ep(e,r),t&4&&-1<Tp.indexOf(e)){for(;i!==null;){var a=at(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ne(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ee(o);s.entanglements[1]|=c,o&=~c}id(a),!(Pl&6)&&(tu=ge()+500,ad(0,!1))}}break;case 31:case 13:s=Gr(a,2),s!==null&&hu(s,a,2),bu(),sp(a,2)}if(a=mp(r),a===null&&Ed(e,t,r,hp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ed(e,t,r,null,n)}}function mp(e){return e=Wt(e),gp(e)}var hp=null;function gp(e){if(hp=null,e=it(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hp=e,null}function _p(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(_e()){case ve:return 2;case ye:return 8;case be:case xe:return 32;case Se:return 268435456;default:return 32}default:return 32}}var vp=!1,yp=null,bp=null,xp=null,Sp=new Map,Cp=new Map,wp=[],Tp=`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 Ep(e,t){switch(e){case`focusin`:case`focusout`:yp=null;break;case`dragenter`:case`dragleave`:bp=null;break;case`mouseover`:case`mouseout`:xp=null;break;case`pointerover`:case`pointerout`:Sp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Cp.delete(t.pointerId)}}function Dp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=at(t),t!==null&&cp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Op(e,t,n,r,i){switch(t){case`focusin`:return yp=Dp(yp,e,t,n,r,i),!0;case`dragenter`:return bp=Dp(bp,e,t,n,r,i),!0;case`mouseover`:return xp=Dp(xp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Sp.set(a,Dp(Sp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Cp.set(a,Dp(Cp.get(a)||null,e,t,n,r,i)),!0}return!1}function kp(e){var t=it(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,qe(e.priority,function(){lp(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,qe(e.priority,function(){lp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ap(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ut=r,n.target.dispatchEvent(r),Ut=null}else return t=at(n),t!==null&&cp(t),e.blockedOn=n,!1;t.shift()}return!0}function jp(e,t,n){Ap(e)&&n.delete(t)}function Mp(){vp=!1,yp!==null&&Ap(yp)&&(yp=null),bp!==null&&Ap(bp)&&(bp=null),xp!==null&&Ap(xp)&&(xp=null),Sp.forEach(jp),Cp.forEach(jp)}function Np(e,t){e.blockedOn===t&&(e.blockedOn=null,vp||(vp=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Mp)))}var Pp=null;function Fp(e){Pp!==e&&(Pp=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Pp===e&&(Pp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(gp(r||n)===null)continue;break}var a=at(n);a!==null&&(e.splice(t,3),t-=3,_s(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Ip(e){function t(t){return Np(t,e)}yp!==null&&Np(yp,e),bp!==null&&Np(bp,e),xp!==null&&Np(xp,e),Sp.forEach(t),Cp.forEach(t);for(var n=0;n<wp.length;n++){var r=wp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<wp.length&&(n=wp[0],n.blockedOn===null);)kp(n),n.blockedOn===null&&wp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Xe]||null;if(typeof a==`function`)o||Fp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Xe]||null)s=o.formAction;else if(gp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Fp(n)}}}function Lp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Rp(e){this._internalRoot=e}zp.prototype.render=Rp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;ap(n,pu(),e,t,null,null)},zp.prototype.unmount=Rp.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),bu(),t[Ze]=null}};function zp(e){this._internalRoot=e}zp.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ke();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wp.length&&t!==0&&t<wp[n].priority;n++);wp.splice(n,0,e),n===0&&kp(e)}};var Bp=r.version;if(Bp!==`19.2.8`)throw Error(a(527,Bp,`19.2.8`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Vp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Hp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hp.isDisabled&&Hp.supportsFiber)try{we=Hp.inject(Vp),q=Hp}catch{}}t.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=Bs,s=Vs,c=Hs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=rp(e,1,!1,null,null,n,r,null,i,s,c,Lp),e[Ze]=t.current,wd(e),new Rp(t)}})),Tn=h(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=wn()})),Y=t(e(),1),X=a(),En=Y.createContext(void 0),Dn=e=>{let t=Y.useContext(En);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},On=({client:e,children:t})=>(Y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,X.jsx)(En.Provider,{value:e,children:t})),kn={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},An=new class{#e=kn;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function jn(e){setTimeout(e,0)}var Mn=typeof window>`u`||`Deno`in globalThis;function Nn(){}function Pn(e,t){return typeof e==`function`?e(t):e}function Fn(e){return typeof e==`number`&&e>=0&&e!==1/0}function In(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ln(e,t){return typeof e==`function`?e(t):e}function Rn(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Bn(o,t.options))return!1}else if(!Hn(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function zn(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Vn(t.options.mutationKey)!==Vn(a))return!1}else if(!Hn(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Bn(e,t){return(t?.queryKeyHashFn||Vn)(e)}function Vn(e){return JSON.stringify(e,(e,t)=>qn(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Hn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!Hn(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Hn(e[r],t[r]))return!1;return!0}return!1}var Un=Object.prototype.hasOwnProperty;function Wn(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Kn(e)&&Kn(t);if(!r&&!(qn(e)&&qn(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Un.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Wn(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Gn(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Kn(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function qn(e){if(!Jn(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Jn(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Jn(e){return Object.prototype.toString.call(e)===`[object Object]`}function Yn(e){return new Promise(t=>{An.setTimeout(t,e)})}function Xn(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Wn(e,t)}function Zn(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Qn(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var $n=Symbol();function er(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===$n?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function tr(e,t){return typeof e==`function`?e(...t):!!e}function nr(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var rr=()=>Mn,ir=()=>rr(),ar=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},or=new class extends ar{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},sr=jn;function cr(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=sr,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var lr=cr(),ur=new class extends ar{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function dr(e){return Math.min(1e3*2**e,3e4)}function fr(e){return(e??`online`)!==`online`||ur.isOnline()}var pr=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function mr(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(Nn);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new pr(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>or.isFocused()&&(e.networkMode===`always`||ur.isOnline())&&e.canRun(),p=()=>fr(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(ir()?0:3),a=e.retryDelay??dr,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),Yn(o).then(()=>f()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var hr=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Fn(this.gcTime)&&(this.#e=An.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ir()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(An.clearTimeout(this.#e),this.#e=void 0)}};function gr(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{nr(e,()=>t.signal,()=>n=!0)},u=er(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?Qn:Zn;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?vr:_r,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:_r(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function _r(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function vr(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var yr=class extends hr{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Sr(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Sr(this.options);e.data!==void 0&&(this.setState(xr(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Xn(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(Nn).catch(Nn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Ln(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===$n||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>Ln(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!In(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=er(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?gr(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=mr({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof pr&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof pr){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...br(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...xr(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),lr.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function br(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:fr(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function xr(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Sr(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Cr=class extends ar{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Tr(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Er(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Er(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Ln(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Gn(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Dr(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||Ln(this.options.enabled,this.#t)!==Ln(t.enabled,this.#t)||Ln(this.options.staleTime,this.#t)!==Ln(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Ln(this.options.enabled,this.#t)!==Ln(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Gn(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Nn)),t}#h(e){return!ir()&&Ln(this.options.enabled,this.#t)!==!1&&Fn(e)}#g(){this.#b();let e=Ln(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=In(this.#r.dataUpdatedAt,e)+1;this.#u=An.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#f=e,!(this.#f===0||!this.#h(this.#f))&&(this.#d=An.setInterval(()=>{(this.options.refetchIntervalInBackground||or.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(An.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(An.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Tr(e,t),o=i&&Dr(e,n,t,r);(a||o)&&(l={...l,...br(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=Xn(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=Xn(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Or(e,t),refetch:this.refetch,isEnabled:Ln(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),Gn(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();lr.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function wr(e,t){return Ln(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Ln(t.retryOnMount,e)!==!1)}function Tr(e,t){return wr(e,t)||e.state.data!==void 0&&Er(e,t,t.refetchOnMount)}function Er(e,t,n){if(Ln(t.enabled,e)!==!1&&Ln(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Or(e,t)}return!1}function Dr(e,t,n,r){return(e!==t||Ln(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Or(e,n)}function Or(e,t){return Ln(t.enabled,e)!==!1&&e.isStaleByTime(Ln(t.staleTime,e))}var kr=class extends hr{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Ar(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=mr({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),lr.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Ar(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var jr=class extends ar{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new kr({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Mr(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Mr(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Mr(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Mr(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){lr.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>zn(t,e))}findAll(e={}){return this.getAll().filter(t=>zn(e,t))}notify(e){lr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return lr.batch(()=>Promise.all(e.map(e=>e.continue().catch(Nn))))}};function Mr(e){return e.options.scope?.id}var Nr=class extends ar{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Gn(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Vn(t.mutationKey)!==Vn(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Ar();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){lr.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Pr=class extends ar{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??Bn(r,t),a=this.get(i);return a||(a=new yr({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){lr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Rn(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Rn(e,t)):t}notify(e){lr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){lr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){lr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Fr=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Pr,this.#t=e.mutationCache||new jr,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=or.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=ur.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ln(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Pn(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return lr.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;lr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return lr.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=lr.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Nn).catch(Nn)}invalidateQueries(e,t={}){return lr.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=lr.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Nn)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Nn)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(Ln(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Ln(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Nn).catch(Nn)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Nn).catch(Nn)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return ur.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Vn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Hn(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Vn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Hn(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Bn(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===$n&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ir=Y.createContext(!1),Lr=()=>Y.useContext(Ir);Ir.Provider;function Rr(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var zr=Y.createContext(Rr()),Br=()=>Y.useContext(zr),Vr=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?tr(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Hr=e=>{Y.useEffect(()=>{e.clearReset()},[e])},Ur=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||tr(n,[e.error,r])),Wr=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Gr=(e,t)=>e?.suspense&&t.isPending,Kr=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function qr(e,t,n){let r=Lr(),i=Br(),a=Dn(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Wr(o),Vr(o,i,s),Hr(i);let[l]=Y.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(Y.useSyncExternalStore(Y.useCallback(e=>{let t=d?l.subscribe(lr.batchCalls(e)):Nn;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),Y.useEffect(()=>{l.setOptions(o)},[o,l]),Gr(o,u))throw Kr(o,l,i);if(Ur({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Jr(e,t){return qr(e,Cr,t)}function Yr(e,t){let n=Dn(t),[r]=Y.useState(()=>new Nr(n,e));Y.useEffect(()=>{r.setOptions(e)},[r,e]);let i=Y.useSyncExternalStore(Y.useCallback(e=>r.subscribe(lr.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=Y.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(Nn)},[r]);if(i.error&&tr(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var Xr=Tn(),Zr=o(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),Qr=o(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),$r=o(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),ei=o(`book-open`,[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]),ti=o(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),ni=o(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),ri=o(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),ii=o(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),ai=o(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),oi=o(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),si=o(`cpu`,[[`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`}]]),ci=o(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),li=o(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),ui=o(`folder-git-2`,[[`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`}]]),di=o(`grip-horizontal`,[[`circle`,{cx:`12`,cy:`9`,r:`1`,key:`124mty`}],[`circle`,{cx:`19`,cy:`9`,r:`1`,key:`1ruzo2`}],[`circle`,{cx:`5`,cy:`9`,r:`1`,key:`1a8b28`}],[`circle`,{cx:`12`,cy:`15`,r:`1`,key:`1e56xg`}],[`circle`,{cx:`19`,cy:`15`,r:`1`,key:`1a92ep`}],[`circle`,{cx:`5`,cy:`15`,r:`1`,key:`5r1jwy`}]]),fi=o(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),pi=o(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),mi=o(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),hi=o(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),gi=o(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),_i=o(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),vi=o(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),yi=o(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),bi=o(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),xi=o(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Si=o(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Ci=o(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),wi=o(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Ti=o(`rotate-ccw-clock`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),Ei=o(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Di=o(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),Oi=o(`settings`,[[`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`}]]),ki=o(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),Ai=o(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),ji=o(`square-play`,[[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z`,key:`kmsa83`}]]),Mi=o(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Ni=o(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Pi=o(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Fi=o(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Ii=o(`users`,[[`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`}]]),Li=o(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),Ri=o(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),zi=o(`zap`,[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]),Bi=`modulepreload`,Vi=function(e){return`/`+e},Hi={},Ui=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Vi(t,n),t=s(t),t in Hi)return;Hi[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Bi,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Wi=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Gi=/^[\\/]{2}/;function Ki(e,t){return t+e.replace(/\\/g,`/`)}var qi=`popstate`;function Ji(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function Yi(e={}){function t(e,t){let{pathname:n=`/`,search:r=``,hash:i=``}=na(e.location.hash.substring(1));return!n.startsWith(`/`)&&!n.startsWith(`.`)&&(n=`/`+n),ea(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){let n=e.document.querySelector(`base`),r=``;if(n&&n.getAttribute(`href`)){let t=e.location.href,n=t.indexOf(`#`);r=n===-1?t:t.slice(0,n)}return r+`#`+(typeof t==`string`?t:ta(t))}function r(e,t){Zi(e.pathname.charAt(0)===`/`,`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)}return ra(t,n,r,e)}function Xi(e,t){if(e===!1||e==null)throw Error(t)}function Zi(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Qi(){return Math.random().toString(36).substring(2,10)}function $i(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ea(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?na(t):t,state:n,key:t&&t.key||r||Qi(),mask:i}}function ta({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function na(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ra(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=Ji(e)?e:ea(h.location,e,t);n&&n(r,e),l=u()+1;let d=$i(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=Ji(e)?e:ea(h.location,e,t);n&&n(r,e),l=u();let i=$i(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return ia(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(qi,d),c=e,()=>{i.removeEventListener(qi,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function ia(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),Xi(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:ta(t);return i=i.replace(/ $/,`%20`),!n&&Gi.test(i)&&(i=r+i),new URL(i,r)}function aa(e,t,n=`/`){return oa(e,t,n,!1)}function oa(e,t,n,r,i){let a=Ta((typeof t==`string`?na(t):t).pathname||`/`,n);if(a==null)return null;let o=i??sa(e),s=null,c=wa(a);for(let e=0;s==null&&e<o.length;++e)s=ba(o[e],c,r);return s}function sa(e){let t=ca(e);return ua(t),t}function ca(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;Xi(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Na([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(Xi(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),ca(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:va(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Ca(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of la(e.path))a(e,t,!0,n)}),t}function la(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=la(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ua(e){e.sort((e,t)=>e.score===t.score?ya(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var da=/^:[\w-]+$/,fa=3,pa=2,ma=1,ha=10,ga=-2,_a=e=>e===`*`;function va(e,t){let n=e.split(`/`),r=n.length;return n.some(_a)&&(r+=ga),t&&(r+=pa),n.filter(e=>!_a(e)).reduce((e,t)=>e+(da.test(t)?fa:t===``?ma:ha),r)}function ya(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function ba(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Sa(u,l,s.matcher,s.compiledParams):xa(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=xa({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:Na([a,d.pathname]),pathnameBase:Fa(Na([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=Na([a,d.pathnameBase]))}return o}function xa(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Ca(e.path,e.caseSensitive,e.end);return Sa(e,t,n,r)}function Sa(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=Pa(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=Pa(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Ca(e,t=!1,n=!0){Zi(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function wa(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Zi(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ta(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Ea(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?na(e):e,a;return n?(n=Ma(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?Da(n.substring(1),`/`):Da(n,t)):a=t,{pathname:a,search:Ia(r),hash:La(i)}}function Da(e,t){let n=Pa(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Oa(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ka(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Aa(e){let t=ka(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function ja(e,t,n,r=!1){let i;typeof e==`string`?i=na(e):(i={...e},Xi(!i.pathname||!i.pathname.includes(`?`),Oa(`?`,`pathname`,`search`,i)),Xi(!i.pathname||!i.pathname.includes(`#`),Oa(`#`,`pathname`,`hash`,i)),Xi(!i.search||!i.search.includes(`#`),Oa(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Ea(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Ma=e=>e.replace(/[\\/]{2,}/g,`/`),Na=e=>Ma(e.join(`/`));function Pa(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var Fa=e=>Pa(e).replace(/^\/*/,`/`),Ia=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,La=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Ra=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function za(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ba(e){return Na(e.map(e=>e.route.path).filter(Boolean))||`/`}var Va=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Ha(e,t){let n=e;if(typeof n!=`string`||!Wi.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Va)try{let e=new URL(window.location.href),r=Gi.test(n)?new URL(Ki(n,e.protocol)):new URL(n),a=Ta(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{Zi(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ua=new URL(`http://localhost`);function Wa(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),Ua)}catch{return Ua}}function Ga(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function Ka(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function qa(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!Ga(i,n),s=!Ga(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!Ka(e,i)||!Ga(i,a)))throw Error(`External navigation is not allowed`)}var Ja=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Ja);var Ya=[`GET`,...Ja];new Set(Ya);var Xa=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Za(e){try{return Xa.includes(new URL(e).protocol)}catch{return!1}}var Qa=Y.createContext(null);Qa.displayName=`DataRouter`;var $a=Y.createContext(null);$a.displayName=`DataRouterState`;var eo=Y.createContext(!1);function to(){return Y.useContext(eo)}var no=Y.createContext({isTransitioning:!1});no.displayName=`ViewTransition`;var ro=Y.createContext(new Map);ro.displayName=`Fetchers`;var io=Y.createContext(null);io.displayName=`Await`;var ao=Y.createContext(null);ao.displayName=`Navigation`;var oo=Y.createContext(null);oo.displayName=`Location`;var so=Y.createContext({outlet:null,matches:[],isDataRoute:!1});so.displayName=`Route`;var co=Y.createContext(null);co.displayName=`RouteError`;var lo=`REACT_ROUTER_ERROR`,uo=`REDIRECT`,fo=`ROUTE_ERROR_RESPONSE`;function po(e){if(e.startsWith(`${lo}:${uo}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function mo(e){if(e.startsWith(`${lo}:${fo}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ra(t.status,t.statusText,t.data)}catch{}}function ho(e,{relative:t}={}){Xi(go(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=Y.useContext(ao),{hash:i,pathname:a,search:o}=So(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Na([n,a])),r.createHref({pathname:s,search:o,hash:i})}function go(){return Y.useContext(oo)!=null}function _o(){return Xi(go(),`useLocation() may be used only in the context of a <Router> component.`),Y.useContext(oo).location}var vo=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function yo(e){Y.useContext(ao).static||Y.useLayoutEffect(e)}function bo(){let{isDataRoute:e}=Y.useContext(so);return e?zo():xo()}function xo(){Xi(go(),`useNavigate() may be used only in the context of a <Router> component.`);let e=Y.useContext(Qa),{basename:t,navigator:n}=Y.useContext(ao),{matches:r}=Y.useContext(so),{pathname:i}=_o(),a=JSON.stringify(Aa(r)),o=Y.useRef(!1);return yo(()=>{o.current=!0}),Y.useCallback((r,s={})=>{if(Zi(o.current,vo),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=ja(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Na([t,c.pathname])),qa(typeof r==`string`?r:ta(r),n.createHref(c),Wa(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}Y.createContext(null);function So(e,{relative:t}={}){let{matches:n}=Y.useContext(so),{pathname:r}=_o(),i=JSON.stringify(Aa(n));return Y.useMemo(()=>ja(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Co(e,t){return wo(e,t)}function wo(e,t,n){Xi(go(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=Y.useContext(ao),{matches:i}=Y.useContext(so),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Vo(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) 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.
11
+
12
+ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=_o(),d;if(t){let e=typeof t==`string`?na(t):t;Xi(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):aa(e,{pathname:p});Zi(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Zi(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.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.`);let h=jo(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Na([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:Na([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?Y.createElement(oo.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function To(){let e=Ro(),t=za(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=Y.createElement(Y.Fragment,null,Y.createElement(`p`,null,`💿 Hey developer 👋`),Y.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,Y.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,Y.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),Y.createElement(Y.Fragment,null,Y.createElement(`h2`,null,`Unexpected Application Error!`),Y.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?Y.createElement(`pre`,{style:i},n):null,o)}var Eo=Y.createElement(To,null),Do=class extends Y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=mo(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:Y.createElement(so.Provider,{value:this.props.routeContext},Y.createElement(co.Provider,{value:e,children:this.props.component}));return this.context?Y.createElement(ko,{error:e},t):t}};Do.contextType=eo;var Oo=new WeakMap;function ko({children:e,error:t}){let{basename:n,navigator:r}=Y.useContext(ao);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=po(t.digest);if(e){let i=Oo.get(t);if(i)throw i;let a=Ha(e.location,n),o=a.absoluteURL||a.to;if(qa(e.location,o,Wa(r),`allow-explicit`),Za(o))throw Error(`Invalid redirect location`);if(Va&&!Oo.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Oo.set(t,n),n}}return Y.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function Ao({routeContext:e,match:t,children:n}){let r=Y.useContext(Qa);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),Y.createElement(so.Provider,{value:e},n)}function jo(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);Xi(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Ba(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Eo,o&&(s<0&&c===0?(Vo(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?Y.createElement(n.route.Component,null):n.route.element?n.route.element:e,Y.createElement(Ao,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?Y.createElement(Do,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function Mo(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function No(e){let t=Y.useContext(Qa);return Xi(t,Mo(e)),t}function Po(e){let t=Y.useContext($a);return Xi(t,Mo(e)),t}function Fo(e){let t=Y.useContext(so);return Xi(t,Mo(e)),t}function Io(e){let t=Fo(e),n=t.matches[t.matches.length-1];return Xi(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Lo(){return Io(`useRouteId`)}function Ro(){let e=Y.useContext(co),t=Po(`useRouteError`),n=Io(`useRouteError`);return e===void 0?t.errors?.[n]:e}function zo(){let{router:e}=No(`useNavigate`),t=Io(`useNavigate`),n=Y.useRef(!1);return yo(()=>{n.current=!0}),Y.useCallback(async(r,i={})=>{Zi(n.current,vo),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Bo={};function Vo(e,t,n){!t&&!Bo[e]&&(Bo[e]=!0,Zi(!1,n))}Y.memo(Ho);function Ho({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return wo(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Uo({to:e,replace:t,state:n,relative:r}){Xi(go(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=Y.useContext(ao);Zi(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=Y.useContext(so),{pathname:s}=_o(),c=bo(),l=ja(e,Aa(o),s,r===`path`);qa(typeof e==`string`?e:ta(e),a.createHref(l),Wa(a),`reject`);let u=JSON.stringify(l);return Y.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function Wo(e){Xi(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Go({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){Xi(!go(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=Y.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=na(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=Y.useMemo(()=>{let e=Ta(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return Zi(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:Y.createElement(ao.Provider,{value:c},Y.createElement(oo.Provider,{children:t,value:h}))}function Ko({children:e,location:t}){return Co(qo(e),t)}Y.Component;function qo(e,t=[]){let n=[];return Y.Children.forEach(e,(e,r)=>{if(!Y.isValidElement(e))return;let i=[...t,r];if(e.type===Y.Fragment){n.push.apply(n,qo(e.props.children,i));return}Xi(e.type===Wo,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Xi(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=qo(e.props.children,i)),n.push(a)}),n}var Jo=`get`,Yo=`application/x-www-form-urlencoded`;function Xo(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Zo(e){return Xo(e)&&e.tagName.toLowerCase()===`button`}function Qo(e){return Xo(e)&&e.tagName.toLowerCase()===`form`}function $o(e){return Xo(e)&&e.tagName.toLowerCase()===`input`}function es(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ts(e,t){return e.button===0&&(!t||t===`_self`)&&!es(e)}function ns(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function rs(e,t){let n=ns(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var is=null;function as(){if(is===null)try{new FormData(document.createElement(`form`),0),is=!1}catch{is=!0}return is}var os=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function ss(e){return e!=null&&!os.has(e)?(Zi(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Yo}"`),null):e}function cs(e,t){let n,r,i,a,o;if(Qo(e)){let o=e.getAttribute(`action`);r=o?Ta(o,t):null,n=e.getAttribute(`method`)||Jo,i=ss(e.getAttribute(`enctype`))||Yo,a=new FormData(e)}else if(Zo(e)||$o(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Ta(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Jo,i=ss(e.getAttribute(`formenctype`))||ss(o.getAttribute(`enctype`))||Yo,a=new FormData(o,e),!as()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Xo(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Jo,r=null,i=Yo,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function ls(e,t){if(e===!1||e==null)throw Error(t)}function us(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&Ta(i.pathname,t)===`/`?`${Pa(t)}/_root.${r}`:`${Pa(i.pathname)}.${r}`,i}async function ds(e,t){if(e.id in t)return t[e.id];try{let n=await Ui(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function fs(e){return e!=null&&typeof e.page==`string`}function ps(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function ms(e,t,n){return ys((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await ds(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(ps).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function hs(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function gs(e,t,{includeHydrateFallback:n}={}){return _s(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function _s(e){return[...new Set(e)]}function vs(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function ys(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!fs(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(vs(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function bs(){let e=Y.useContext(Qa);return ls(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function xs(){let e=Y.useContext($a);return ls(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Ss=Y.createContext(void 0);Ss.displayName=`FrameworkContext`;function Cs(){let e=Y.useContext(Ss);return ls(e,`You must render this element inside a <HydratedRouter> element`),e}function ws(e,t){let n=Y.useContext(Ss),[r,i]=Y.useState(!1),[a,o]=Y.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=Y.useRef(null);Y.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),Y.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Ts(s,p),onBlur:Ts(c,m),onMouseEnter:Ts(l,p),onMouseLeave:Ts(u,m),onTouchStart:Ts(d,p)}]:[a,f,{}]:[!1,f,{}]}function Ts(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Es({page:e,...t}){let n=to(),{nonce:r}=Cs(),{router:i}=bs(),a=Y.useMemo(()=>aa(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?Y.createElement(Os,{page:e,matches:a,...t}):Y.createElement(ks,{page:e,matches:a,...t})):null}function Ds(e){let{manifest:t,routeModules:n}=Cs(),[r,i]=Y.useState([]);return Y.useEffect(()=>{let r=!1;return ms(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Os({page:e,matches:t,...n}){let r=_o(),{future:i}=Cs(),{basename:a}=bs(),o=Y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=us(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return Y.createElement(Y.Fragment,null,o.map(e=>Y.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function ks({page:e,matches:t,...n}){let r=_o(),{future:i,manifest:a,routeModules:o}=Cs(),{basename:s}=bs(),{loaderData:c,matches:l}=xs(),u=Y.useMemo(()=>hs(e,t,l,a,r,`data`),[e,t,l,a,r]),d=Y.useMemo(()=>hs(e,t,l,a,r,`assets`),[e,t,l,a,r]),f=Y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=us(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),p=Y.useMemo(()=>gs(d,a),[d,a]),m=Ds(d);return Y.createElement(Y.Fragment,null,f.map(e=>Y.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>Y.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>Y.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function As(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}Y.Component;var js=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{js&&(window.__reactRouterVersion=`7.18.3`)}catch{}function Ms({basename:e,children:t,useTransitions:n,window:r}){let i=Y.useRef();i.current??=Yi({window:r,v5Compat:!0});let a=i.current,[o,s]=Y.useState({action:a.action,location:a.location}),c=Y.useCallback(e=>{n===!1?s(e):Y.startTransition(()=>s(e))},[n]);return Y.useLayoutEffect(()=>a.listen(c),[a,c]),Y.createElement(Go,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var Ns=Y.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=Y.useContext(ao),v=typeof l==`string`&&Wi.test(l),y=Ha(l,h);l=y.to;let b=ho(l,{relative:r}),x=_o(),S=null;if(o){let e=ja(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Na([h,e.pathname])),S=g.createHref(e)}let[C,w,T]=ws(n,p),E=Rs(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function D(t){e&&e(t),t.defaultPrevented||E(t)}let O=!(y.isExternal||i),k=Y.createElement(`a`,{...p,...T,href:(O?S:void 0)||y.absoluteURL||b,onClick:O?D:e,ref:As(m,w),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?Y.createElement(Y.Fragment,null,k,Y.createElement(Es,{page:b})):k});Ns.displayName=`Link`;var Ps=Y.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=So(a,{relative:c.relative}),d=_o(),f=Y.useContext($a),{navigator:p,basename:m}=Y.useContext(ao),h=f!=null&&Ws(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=Ta(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(g.length)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return Y.createElement(Ns,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});Ps.displayName=`NavLink`;var Fs=Y.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Jo,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=Y.useContext(ao),g=Hs(),_=Us(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&Wi.test(s);return Y.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?Y.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});Fs.displayName=`Form`;function Is(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ls(e){let t=Y.useContext(Qa);return Xi(t,Is(e)),t}function Rs(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=bo(),d=_o(),f=So(e,{relative:o});return Y.useCallback(p=>{if(ts(p,t)){p.preventDefault();let t=n===void 0?ta(d)===ta(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?Y.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function zs(e){Zi(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=Y.useRef(ns(e)),n=Y.useRef(!1),r=_o(),i=Y.useMemo(()=>rs(r.search,n.current?null:t.current),[r.search]),a=bo();return[i,Y.useCallback((e,t)=>{let r=ns(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Bs=0,Vs=()=>`__${String(++Bs)}__`;function Hs(){let{router:e}=Ls(`useSubmit`),{basename:t}=Y.useContext(ao),n=Lo(),r=e.fetch,i=e.navigate;return Y.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=cs(e,t);if(a.navigate===!1){let e=a.fetcherKey||Vs();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Us(e,{relative:t}={}){let{basename:n}=Y.useContext(ao),r=Y.useContext(so);Xi(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...So(e||`.`,{relative:t})},o=_o();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Na([n,a.pathname])),ta(a)}function Ws(e,{relative:t}={}){let n=Y.useContext(no);Xi(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ls(`useViewTransitionState`),i=So(e,{relative:t});if(!n.isTransitioning)return!1;let a=Ta(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Ta(n.nextLocation.pathname,r)||n.nextLocation.pathname;return xa(i.pathname,o)!=null||xa(i.pathname,a)!=null}var Gs={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Ks=Y.createContext&&Y.createContext(Gs),qs=[`attr`,`size`,`title`];function Js(e,t){if(e==null)return{};var n,r,i=Ys(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ys(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Xs(){return Xs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xs.apply(null,arguments)}function Zs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Zs(Object(n),!0).forEach(function(t){$s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zs(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $s(e,t,n){return(t=ec(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ec(e){var t=tc(e,`string`);return typeof t==`symbol`?t:t+``}function tc(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function nc(e){return e&&e.map((e,t)=>Y.createElement(e.tag,Qs({key:t},e.attr),nc(e.child)))}function rc(e){return t=>Y.createElement(ic,Xs({attr:Qs({},e.attr)},t),nc(e.child))}function ic(e){var t=t=>{var n=e.attr,r=e.size,i=e.title,a=Js(e,qs),o=r||t.size||`1em`,s;return t.className&&(s=t.className),e.className&&(s=(s?s+` `:``)+e.className),Y.createElement(`svg`,Xs({stroke:`currentColor`,fill:`currentColor`,strokeWidth:`0`},t.attr,n,a,{className:s,style:Qs(Qs({color:e.color||t.color},t.style),e.style),height:o,width:o,xmlns:`http://www.w3.org/2000/svg`}),i&&Y.createElement(`title`,null,i),e.children)};return Ks===void 0?t(Gs):Y.createElement(Ks.Consumer,null,e=>t(e))}function ac(e){return rc({tag:`svg`,attr:{fill:`currentColor`,viewBox:`0 0 16 16`},child:[{tag:`path`,attr:{d:`M14.949 6.547a3.94 3.94 0 0 0-.348-3.273 4.11 4.11 0 0 0-4.4-1.934A4.1 4.1 0 0 0 8.423.2 4.15 4.15 0 0 0 6.305.086a4.1 4.1 0 0 0-1.891.948 4.04 4.04 0 0 0-1.158 1.753 4.1 4.1 0 0 0-1.563.679A4 4 0 0 0 .554 4.72a3.99 3.99 0 0 0 .502 4.731 3.94 3.94 0 0 0 .346 3.274 4.11 4.11 0 0 0 4.402 1.933c.382.425.852.764 1.377.995.526.231 1.095.35 1.67.346 1.78.002 3.358-1.132 3.901-2.804a4.1 4.1 0 0 0 1.563-.68 4 4 0 0 0 1.14-1.253 3.99 3.99 0 0 0-.506-4.716m-6.097 8.406a3.05 3.05 0 0 1-1.945-.694l.096-.054 3.23-1.838a.53.53 0 0 0 .265-.455v-4.49l1.366.778q.02.011.025.035v3.722c-.003 1.653-1.361 2.992-3.037 2.996m-6.53-2.75a2.95 2.95 0 0 1-.36-2.01l.095.057L5.29 12.09a.53.53 0 0 0 .527 0l3.949-2.246v1.555a.05.05 0 0 1-.022.041L6.473 13.3c-1.454.826-3.311.335-4.15-1.098m-.85-6.94A3.02 3.02 0 0 1 3.07 3.949v3.785a.51.51 0 0 0 .262.451l3.93 2.237-1.366.779a.05.05 0 0 1-.048 0L2.585 9.342a2.98 2.98 0 0 1-1.113-4.094zm11.216 2.571L8.747 5.576l1.362-.776a.05.05 0 0 1 .048 0l3.265 1.86a3 3 0 0 1 1.173 1.207 2.96 2.96 0 0 1-.27 3.2 3.05 3.05 0 0 1-1.36.997V8.279a.52.52 0 0 0-.276-.445m1.36-2.015-.097-.057-3.226-1.855a.53.53 0 0 0-.53 0L6.249 6.153V4.598a.04.04 0 0 1 .019-.04L9.533 2.7a3.07 3.07 0 0 1 3.257.139c.474.325.843.778 1.066 1.303.223.526.289 1.103.191 1.664zM5.503 8.575 4.139 7.8a.05.05 0 0 1-.026-.037V4.049c0-.57.166-1.127.476-1.607s.752-.864 1.275-1.105a3.08 3.08 0 0 1 3.234.41l-.096.054-3.23 1.838a.53.53 0 0 0-.265.455zm.742-1.577 1.758-1 1.762 1v2l-1.755 1-1.762-1z`},child:[]}]})(e)}function oc(e){return rc({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M2.25 1.5a.75.75 0 0 0-.75.75v16.5H0V2.25A2.25 2.25 0 0 1 2.25 0h20.095c1.002 0 1.504 1.212.795 1.92L10.764 14.298h3.486V12.75h1.5v1.922a1.125 1.125 0 0 1-1.125 1.125H9.264l-2.578 2.578h11.689V9h1.5v9.375a1.5 1.5 0 0 1-1.5 1.5H5.185L2.562 22.5H21.75a.75.75 0 0 0 .75-.75V5.25H24v16.5A2.25 2.25 0 0 1 21.75 24H1.655C.653 24 .151 22.788.86 22.08L13.19 9.75H9.75v1.5h-1.5V9.375A1.125 1.125 0 0 1 9.375 8.25h5.314l2.625-2.625H5.625V15h-1.5V5.625a1.5 1.5 0 0 1 1.5-1.5h13.19L21.438 1.5z`},child:[]}]})(e)}function sc(e){return rc({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M23.55 5.067c-1.2038-.002-2.1806.973-2.1806 2.1765v4.8676c0 .972-.8035 1.7594-1.7597 1.7594-.568 0-1.1352-.286-1.4718-.7659l-4.9713-7.1003c-.4125-.5896-1.0837-.941-1.8103-.941-1.1334 0-2.1533.9635-2.1533 2.153v4.8957c0 .972-.7969 1.7594-1.7596 1.7594-.57 0-1.1363-.286-1.4728-.7658L.4076 5.1598C.2822 4.9798 0 5.0688 0 5.2882v4.2452c0 .2147.0656.4228.1884.599l5.4748 7.8183c.3234.462.8006.8052 1.3509.9298 1.3771.313 2.6446-.747 2.6446-2.0977v-4.893c0-.972.7875-1.7593 1.7596-1.7593h.003a1.798 1.798 0 0 1 1.4718.7658l4.9723 7.0994c.4135.5905 1.05.941 1.8093.941 1.1587 0 2.1515-.9645 2.1515-2.153v-4.8948c0-.972.7875-1.7594 1.7596-1.7594h.194a.22.22 0 0 0 .2204-.2202v-4.622a.22.22 0 0 0-.2203-.2203Z`},child:[]}]})(e)}function cc(e){return rc({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M0 0v24h24V0H0zm17.889 2.889c1.444 0 2.667.444 3.667 1.278l-1.111 1.667c-.889-.611-1.722-1-2.556-1s-1.278.389-1.278.889v.056c0 .667.444.889 2.111 1.333 2 .556 3.111 1.278 3.111 3v.056c0 2-1.5 3.111-3.611 3.111-1.5-.056-3-.611-4.167-1.667l1.278-1.556c.889.722 1.833 1.222 2.944 1.222.889 0 1.389-.333 1.389-.944v-.056c0-.556-.333-.833-2-1.278-2-.5-3.222-1.056-3.222-3.056v-.056c0-1.833 1.444-3 3.444-3zm-16.111.222h2.278l1.5 5.778 1.722-5.778h1.667l1.667 5.778 1.5-5.778h2.333l-2.833 9.944H9.723L8.112 7.277l-1.667 5.778H4.612L1.779 3.111zm.5 16.389h9V21h-9v-1.5z`},child:[]}]})(e)}function lc(e){return rc({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M20.953.004a.397.397 0 0 0-.18.017L3.225 5.585c-.175.055-.323.214-.402.398a.42.42 0 0 0-.06.22v5.726a.42.42 0 0 0 .06.22c.079.183.227.341.402.397l7.454 2.364-7.454 2.363c-.255.08-.463.374-.463.655v5.688c0 .282.208.444.463.363l17.55-5.565c.237-.075.426-.336.452-.6.003-.022.013-.04.013-.065V12.06c0-.281-.208-.575-.463-.656L13.4 9.065l7.375-2.339c.255-.08.462-.375.462-.656V.384c0-.211-.117-.355-.283-.38z`},child:[]}]})(e)}function uc(e){return rc({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M7.833 6.666v-.055c0-1-.667-1.5-1.778-1.5H4.389v3.055h1.723c1.111 0 1.721-.666 1.721-1.5zM0 0v24h24V0H0zm2.223 3.167h4c2.389 0 3.833 1.389 3.833 3.445v.055c0 2.278-1.778 3.5-4.001 3.5H4.389v2.945H2.223V3.167zM11.277 21h-9v-1.5h9V21zm4.779-7.777c-2.944.055-5.111-2.223-5.111-5.057C10.944 5.333 13.056 3 16.111 3c1.889 0 3 .611 3.944 1.556l-1.389 1.61c-.778-.722-1.556-1.111-2.556-1.111-1.658 0-2.873 1.375-2.887 3.084.014 1.709 1.174 3.083 2.887 3.083 1.111 0 1.833-.445 2.61-1.167l1.39 1.389c-.999 1.112-2.166 1.779-4.054 1.779z`},child:[]}]})(e)}function dc(e){return rc({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M0 0v24h24V0zm3.723 3.111h5v1.834h-1.39v6.277h1.39v1.834h-5v-1.834h1.444V4.945H3.723zm11.055 0H17v6.5c0 .612-.055 1.111-.222 1.556-.167.444-.39.777-.723 1.11-.277.279-.666.557-1.11.668a3.933 3.933 0 0 1-1.445.278c-.778 0-1.444-.167-1.944-.445a4.81 4.81 0 0 1-1.279-1.056l1.39-1.555c.277.334.555.555.833.722.277.167.611.278.945.278.389 0 .721-.111 1-.389.221-.278.333-.667.333-1.278zM2.222 19.5h9V21h-9z`},child:[]}]})(e)}function fc(e){return rc({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z`},child:[]}]})(e)}function pc(e){return rc({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23`},child:[]}]})(e)}function mc(e){return rc({tag:`svg`,attr:{role:`img`,viewBox:`0 0 24 24`},child:[{tag:`path`,attr:{d:`m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z`},child:[]}]})(e)}var hc=`/assets/antigravity-logo-DRKQga2U.png`;function gc({className:e,size:t,alt:n=`Google Antigravity`,...r}){return(0,X.jsx)(`img`,{src:hc,alt:n,className:l(`inline-block object-contain select-none shrink-0`,e),style:t?{width:t,height:t}:void 0,...r})}function _c({size:e=24,className:t,...n}){let r=`context-gradient-${(0,Y.useId)().replace(/:/g,``)}`;return(0,X.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 200 200`,fill:`none`,width:e,height:e,"aria-hidden":!n[`aria-label`]||void 0,role:n[`aria-label`]?`img`:void 0,className:l(`context-logo shrink-0 select-none`,t),...n,children:[(0,X.jsx)(`defs`,{children:(0,X.jsxs)(`linearGradient`,{id:r,x1:`30`,y1:`20`,x2:`160`,y2:`180`,gradientUnits:`userSpaceOnUse`,children:[(0,X.jsx)(`stop`,{className:`context-logo-stop-first`,offset:`0%`}),(0,X.jsx)(`stop`,{className:`context-logo-stop-middle`,offset:`50%`}),(0,X.jsx)(`stop`,{className:`context-logo-stop-last`,offset:`100%`})]})}),(0,X.jsx)(`path`,{className:`context-logo-mark`,d:`M 178.8 63.3 A 87 87 0 1 0 178.8 136.7 L 141.7 119.4 A 46 46 0 1 1 141.7 80.6 Z`,fill:`url(#${r})`})]})}var vc=Y.createContext(void 0);function yc(e){let t=Y.useContext(vc);if(t===void 0&&!e)throw Error(f(33));return t}var bc=Y.createContext(void 0);function xc(e){let t=Y.useContext(bc);if(t===void 0&&!e)throw Error(f(36));return t}var Sc=Y.createContext(void 0);function Cc(e=!0){let t=Y.useContext(Sc);if(t===void 0&&!e)throw Error(f(25));return t}function wc(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,{events:l}=a.useState(`floatingTreeRoot`),u=a.useState(`open`),d=Cc(!0),f=d!==void 0;return Y.useMemo(()=>({id:r,role:`menuitem`,tabIndex:u&&n?0:-1,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&l.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&l.emit(`close`,{domEvent:e,reason:me})},onMouseUp(e){if(d){let t=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,f&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||f&&!Bt&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!f||e.button===2)&&c.type===`regular-item`&&Pt(s.current,e,{detail:1})}}),[t,n,r,l,i,u,a,o,s,d,f,c])}var Tc={type:`regular-item`};function Ec(e){let{closeOnClick:t,disabled:n,highlighted:i,id:a,store:o,typingRef:s=o.context.typingRef,nativeButton:c,itemMetadata:l,nodeId:u}=e,f=Y.useRef(null),{getButtonProps:p,buttonRef:m}=St({disabled:n,focusableWhenDisabled:!0,native:c,composite:!0}),h=wc({closeOnClick:t,highlighted:i,id:a,nodeId:u,store:o,typingRef:s,itemRef:f,itemMetadata:l}),g=Y.useCallback(e=>d(h,{onMouseEnter(){l.type===`submenu-trigger`&&l.setActive()}},e,p),[h,p,l]),_=r(f,m);return Y.useMemo(()=>({getItemProps:g,itemRef:_}),[g,_])}var Dc=Y.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Oc(){return Y.useContext(Dc)}function kc(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=Oc(),u=Y.useRef(-1),[d,f]=Y.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=Y.useRef(null),h=Y.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return Lt(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}var Ac=Y.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:c=!1,closeOnClick:l=!0,style:u,...d}=e,f=kc({guess:!0,label:a}),p=yc(!0),m=Me(i),{store:h}=xc(),g=h.useState(`disabled`),_=c||g,v=h.useState(`isActive`,f.index),y=h.useState(`itemProps`),{getItemProps:b,itemRef:x}=Ec({closeOnClick:l,disabled:_,highlighted:v,id:m,store:h,nativeButton:o,nodeId:p?.context.nodeId,itemMetadata:Tc});return s(`div`,e,{state:{disabled:_,highlighted:v},props:[y,d,b],ref:[x,t,f.ref]})});function jc(e,t){return t!=null&&!ye(t)?0:typeof e==`function`?e():e}function Mc(e,t,n){let r=jc(e,n);return typeof r==`number`?r:r?.[t]}function Nc(e){return typeof e==`function`?e():e}function Pc(e,t){return t||e===`click`||e===`mousedown`}function Fc(e){return e?.includes(`mouse`)&&e!==`mousedown`}var Ic=Math.min,Lc=Math.max,Rc=Math.round,zc=Math.floor,Bc=e=>({x:e,y:e}),Vc={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Hc(e,t,n){return Lc(e,Ic(t,n))}function Uc(e,t){return typeof e==`function`?e(t):e}function Wc(e){return e.split(`-`)[0]}function Gc(e){return e.split(`-`)[1]}function Kc(e){return e===`x`?`y`:`x`}function qc(e){return e===`y`?`height`:`width`}function Jc(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Yc(e){return Kc(Jc(e))}function Xc(e,t,n){n===void 0&&(n=!1);let r=Gc(e),i=Yc(e),a=qc(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=al(o)),[o,al(o)]}function Zc(e){let t=al(e);return[Qc(e),t,Qc(t)]}function Qc(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var $c=[`left`,`right`],el=[`right`,`left`],tl=[`top`,`bottom`],nl=[`bottom`,`top`];function rl(e,t,n){switch(e){case`top`:case`bottom`:return n?t?el:$c:t?$c:el;case`left`:case`right`:return t?tl:nl;default:return[]}}function il(e,t,n,r){let i=Gc(e),a=rl(Wc(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Qc)))),a}function al(e){let t=Wc(e);return Vc[t]+e.slice(t.length)}function ol(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function sl(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ol(e)}function cl(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ll(e,t={}){let{enabled:r=!0,event:i=`click`,toggle:a=!0,ignoreMouse:o=!1,stickIfOpen:s=!0,touchOpenDelay:c=0,reason:l=R}=t,u=`rootStore`in e?e.rootStore:e,d=u.context.dataRef,f=Y.useRef(void 0),p=Mt(),m=q(),h=Y.useMemo(()=>{function e(e,t,n,r){let i=Fe(l,t,n);e&&r===`touch`&&c>0?m.start(c,()=>{u.setOpen(!0,i)}):u.setOpen(e,i)}function t(e,t,n){let r=d.current.openEvent,i=u.select(`domReferenceElement`)!==t;return e&&i||!e||!a?!0:r&&s?!n(r.type):!1}return{onPointerDown(e){f.current=ye(e.pointerType,!0)&&C(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(n){let r=f.current,a=n.nativeEvent,s=u.select(`open`);if(n.button!==0||i===`click`||ye(r,!0)&&o)return;let c=t(s,n.currentTarget,e=>e===`click`||e===`mousedown`),l=G(a);if(mt(l)){e(c,a,l,r);return}let d=n.currentTarget;p.request(()=>{e(c,a,d,r)})},onClick(n){if(i===`mousedown-only`)return;let r=f.current;if(i===`mousedown`&&r){f.current=void 0;return}ye(r,!0)&&o||e(t(u.select(`open`),n.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),n.nativeEvent,n.currentTarget,r)},onKeyDown(){f.current=void 0}}},[d,i,o,l,u,s,a,p,m,c]);return Y.useMemo(()=>r?{reference:h}:n,[r,h])}function ul(e,t,n){let{reference:r,floating:i}=e,a=Jc(t),o=Yc(t),s=qc(o),c=Wc(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Gc(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function dl(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Uc(t,e),p=sl(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=cl(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=cl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var fl=50,pl=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:dl},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ul(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<fl&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ul(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ml=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Uc(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Wc(r),_=Jc(o),v=Wc(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[al(o)]:Zc(o)),x=p!==`none`;!d&&x&&b.push(...il(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Xc(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Jc(t)||T.every(e=>Jc(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Jc(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},hl=new Set([`left`,`top`]);async function gl(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Wc(n),s=Gc(n),c=Jc(n)===`y`,l=hl.has(o)?-1:1,u=a&&c?-1:1,d=Uc(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var _l=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await gl(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},vl=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Uc(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Jc(i),p=Kc(f),m=u[p],h=u[f],g=(e,t)=>Hc(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},yl=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Uc(e,t),u={x:n,y:r},d=Jc(i),f=Kc(d),p=u[f],m=u[d],h=Uc(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=hl.has(Wc(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},bl=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Uc(e,t),c=await i.detectOverflow(t,s),l=Wc(n),u=Gc(n),d=Jc(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Ic(p-c[m],g),y=Ic(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Lc(c.left,c.right):S=p-2*Lc(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function xl(e){let t=gt(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ue(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Rc(n)!==a||Rc(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Sl(e){return Qt(e)?e:e.contextElement}function Cl(e){let t=Sl(e);if(!Ue(t))return Bc(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=xl(t),o=(a?Rc(n.width):n.width)/r,s=(a?Rc(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var wl=Bc(0);function Tl(e){let t=ze(e);return!Se()||!t.visualViewport?wl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function El(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===ze(e)}function Dl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Sl(e),o=Bc(1);t&&(r?Qt(r)&&(o=Cl(r)):o=Cl(e));let s=El(a,n,r)?Tl(a):Bc(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=ze(a),t=Qt(r)?ze(r):r,n=e,i=$e(n);for(;i&&t!==n;){let e=Cl(i),t=i.getBoundingClientRect(),r=gt(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=ze(i),i=$e(n)}}return cl({width:u,height:d,x:c,y:l})}function Ol(e,t){let n=yt(e).scrollLeft;return t?t.left+n:Dl(Je(e)).left+n}function kl(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ol(e,n),y:n.top+t.scrollTop}}function Al(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Je(r),s=t?Jt(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Bc(1),u=Bc(0),d=Ue(r);if((d||!a)&&((Ot(r)!==`body`||be(o))&&(c=yt(r)),d)){let e=Dl(r);l=Cl(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?kl(o,c):Bc(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function jl(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Ml(e){let t=yt(e),n=e.ownerDocument.body,r=Lc(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Lc(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Ol(e),o=-t.scrollTop;return gt(n).direction===`rtl`&&(a+=Lc(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Nl=25;function Pl(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=ze(e),a=Je(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Se()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Ol(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Nl&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Fl(e,t){let n=Dl(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Cl(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Il(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Pl(e,n,t);else if(t===`document`)r=Ml(Je(e));else if(Qt(t))r=Fl(t,n);else{let n=Tl(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return cl(r)}function Ll(e,t){let n=t.get(e);if(n)return n;let r=at(e,[],!1).filter(e=>Qt(e)&&Ot(e)!==`body`),i=null,a=gt(e).position===`fixed`,o=a?nt(e):e;for(;Qt(o)&&!Xt(o);){let e=gt(o),t=Kt(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=nt(o)}return t.set(e,r),r}function Rl(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Jt(t)?[]:Ll(t,this._c):[].concat(n),r],o=Il(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Il(t,a[e],i);s=Lc(n.top,s),c=Ic(n.right,c),l=Ic(n.bottom,l),u=Lc(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function zl(e){let{width:t,height:n}=xl(e);return{width:t,height:n}}function Bl(e,t,n){let r=Ue(t),i=Je(t),a=n===`fixed`,o=Dl(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Bc(0);if((r||!a)&&((Ot(t)!==`body`||be(i))&&(s=yt(t)),r)){let e=Dl(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Ol(i));let l=i&&!r&&!a?kl(i,s):Bc(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Vl(e){return gt(e).position===`static`}function Hl(e,t){if(!Ue(e)||gt(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Je(e)===n&&(n=n.ownerDocument.body),n}function Ul(e,t){let n=ze(e);if(Jt(e))return n;if(!Ue(e)){let t=nt(e);for(;t&&!Xt(t);){if(Qt(t)&&!Vl(t))return t;t=nt(t)}return n}let r=Hl(e,t);for(;r&&T(r)&&Vl(r);)r=Hl(r,t);return r&&Xt(r)&&Vl(r)&&!Kt(r)?n:r||Ut(e)||n}var Wl=async function(e){let t=this.getOffsetParent||Ul,n=this.getDimensions,r=await n(e.floating);return{reference:Bl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Gl(e){return gt(e).direction===`rtl`}var Kl={convertOffsetParentRelativeRectToViewportRelativeRect:Al,getDocumentElement:Je,getClippingRect:Rl,getOffsetParent:Ul,getElementRects:Wl,getClientRects:jl,getDimensions:zl,getScale:Cl,isElement:Qt,isRTL:Gl};function ql(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Jl(e,t,n){let r=null,i,a=Je(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=zc(d),h=zc(a.clientWidth-(u+f)),g=zc(a.clientHeight-(d+p)),_=zc(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Lc(0,Ic(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!ql(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=ze(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Yl(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Sl(e),u=i||a?[...l?at(l):[],...t?at(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Jl(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Dl(e):null;c&&g();function g(){let t=Dl(e);h&&!ql(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Xl=_l,Zl=vl,Ql=ml,$l=bl,eu=yl,tu=(e,t,n)=>{let r=new Map,i=n??{},a={...Kl,...i.platform,_c:r};return pl(e,t,{...i,platform:a})},nu=t(Pe(),1),ru=typeof document<`u`?Y.useLayoutEffect:function(){};function iu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!iu(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!iu(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function au(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ou(e,t){let n=au(e);return Math.round(t*n)/n}function su(e){let t=Y.useRef(e);return ru(()=>{t.current=e}),t}function cu(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=Y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Y.useState(r);iu(f,r)||p(r);let[m,h]=Y.useState(null),[g,_]=Y.useState(null),v=Y.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=Y.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=Y.useRef(null),C=Y.useRef(null),w=Y.useRef(u),T=c!=null,E=su(c),D=su(i),O=su(l),k=Y.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),tu(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!iu(w.current,t)&&(w.current=t,nu.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);ru(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=Y.useRef(!1);ru(()=>(A.current=!0,()=>{A.current=!1}),[]),ru(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=Y.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=Y.useMemo(()=>({reference:b,floating:x}),[b,x]),N=Y.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=ou(M.floating,u.x),r=ou(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...au(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return Y.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var lu=(e,t)=>{let n=Xl(e);return{name:n.name,fn:n.fn,options:[e,t]}},uu=(e,t)=>{let n=Zl(e);return{name:n.name,fn:n.fn,options:[e,t]}},du=(e,t)=>({fn:eu(e).fn,options:[e,t]}),fu=(e,t)=>{let n=Ql(e);return{name:n.name,fn:n.fn,options:[e,t]}},pu=(e,t)=>{let n=$l(e);return{name:n.name,fn:n.fn,options:[e,t]}},mu=class{attachedStores=[];attachedStoreValue=null;storeListeners=new Set;constructor(e,t,n=!0){this.fallbackStore=e,this.componentName=t,this.throwOnMissingTrigger=n}get attachedStore(){return this.attachedStoreValue}get store(){return this.attachedStoreValue??this.fallbackStore}get serverStore(){return this.fallbackStore}subscribeStore(e){return this.storeListeners.add(e),()=>{this.storeListeners.delete(e)}}attachStore(e){return this.attachedStores.push(e),this.setActiveStore(e),()=>{let t=this.attachedStores.lastIndexOf(e);t!==-1&&this.attachedStores.splice(t,1),this.setActiveStore(this.attachedStores[this.attachedStores.length-1]??null)}}setActiveStore(e){this.attachedStoreValue!==e&&(this.attachedStoreValue=e,this.storeListeners.forEach(e=>{e()}))}openByTrigger(e){let t=this.attachedStore;if(t===null)return;let n;if(e){for(let t=this.attachedStores.length-1;t>=0&&!n;--t)n=this.attachedStores[t].context.triggerElements.getById(e);n??=this.fallbackStore.context.triggerElements.getById(e)}if(e&&!n&&this.throwOnMissingTrigger)throw Error(f(99,this.componentName,e,this.componentName));t.setOpen(!0,Fe(se,void 0,n))}closePopup(){let e=this.attachedStore;e!==null&&e.setOpen(!1,Fe(se))}};function hu(){return new Te({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new ue,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function gu(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:hu(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:n,inactiveTriggerProps:n,popupProps:n}}function _u(e,t,n=!1){return new Te({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}var vu=e=>e.triggerIdProp??e.activeTriggerId,yu=e=>e.openProp??e.open,bu=e=>(e.popupElement?.id??e.floatingId)||void 0;function xu(e,t){return t!==void 0&&yu(e)&&vu(e)===t}function Su(e,t){return xu(e,t)?!0:t!==void 0&&yu(e)&&vu(e)==null&&e.triggerCount===1}var Cu={open:yu,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:vu,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:bu,isTriggerActive:(e,t)=>t!==void 0&&vu(e)===t,isOpenedByTrigger:(e,t)=>xu(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&vu(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Su(e,t)?bu(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement},wu=W();function Tu(e){let t=Y.useCallback(t=>e===void 0?c:e.subscribeStore(t),[e]),n=Y.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,wu.useSyncExternalStore)(t,n,()=>e?.serverStore)}function Eu(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,a=Le(),o=ge()!=null,s=i(()=>new Te({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new ue,floatingId:a,syncOnly:!1,nested:o})).current;return Lt(()=>{let e={open:t,floatingId:a};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=Qt(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),s.update(e)},[t,a,r.reference,r.floating,s]),s.context.onOpenChange=n,s.context.nested=o,s}function Du(e){return Ou(e,e.rootContext)}function Ou(e,t){let{nodeId:n,externalTree:r}=e,i=t.useState(`referenceElement`),a=t.useState(`floatingElement`),o=t.useState(`domReferenceElement`),s=t.useState(`open`),c=t.useState(`floatingId`),[l,u]=Y.useState(null),[d,f]=Y.useState(void 0),[p,m]=Y.useState(void 0),h=Y.useRef(null),g=_(r),v=Y.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),y=cu({...e,elements:{...v,...l&&{reference:l}}}),b=Qt(d)?d:null,x=p===void 0?t.state.floatingElement:p;t.useSyncedValue(`referenceElement`,d??null),t.useSyncedValue(`domReferenceElement`,d===void 0?o:b),t.useSyncedValue(`floatingElement`,x);let S=Y.useCallback(e=>{let t=Qt(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),y.refs.setReference(t)},[y.refs]),C=Y.useCallback(e=>{(Qt(e)||e===null)&&(h.current=e,f(e)),(Qt(y.refs.reference.current)||y.refs.reference.current===null||e!==null&&!Qt(e))&&y.refs.setReference(e)},[y.refs,f]),w=Y.useCallback(e=>{m(e),y.refs.setFloating(e)},[y.refs]),T=Y.useMemo(()=>({...y.refs,setReference:C,setFloating:w,setPositionReference:S,domReference:h}),[y.refs,C,w,S]),E=Y.useMemo(()=>({...y.elements,domReference:o}),[y.elements,o]),D=Y.useMemo(()=>({...y,dataRef:t.context.dataRef,open:s,onOpenChange:t.setOpen,events:t.context.events,floatingId:c,refs:T,elements:E,nodeId:n,rootStore:t}),[y,T,E,n,t,s,c]);return Lt(()=>{o&&(h.current=o)},[o]),Lt(()=>{t.context.dataRef.current.floatingContext=D;let e=g?.nodesRef.current.find(e=>e.id===n);e&&(e.context=D)}),Y.useMemo(()=>({...y,context:D,refs:T,elements:E,rootStore:t}),[y,T,E,D,t])}var ku=Bt&&v;function Au(e,t={}){let{enabled:n=!0,delay:r}=t,i=`rootStore`in e?e.rootStore:e,{events:a,dataRef:o}=i.context,s=Y.useRef(!1),c=Y.useRef(null),l=Y.useRef(!0),u=q();Y.useEffect(()=>{let e=i.select(`domReferenceElement`);if(!n)return;let t=ze(e);function r(){let e=i.select(`domReferenceElement`);!i.select(`open`)&&Ue(e)&&e===ft(ct(e))&&(s.current=!0)}function a(){l.current=!0}function o(){l.current=!1}return E(Yt(t,`blur`,r),ku&&Yt(t,`keydown`,a,!0),ku&&Yt(t,`pointerdown`,o,!0))},[i,n]),Y.useEffect(()=>{if(!n)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=i.select(`domReferenceElement`);Qt(e)&&(c.current=e,s.current=!0)}}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,n,i]);let d=Y.useMemo(()=>{function e(){s.current=!1,c.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(s.current){if(c.current===n)return;e()}let a=G(t.nativeEvent);if(Qt(a)){if(ku&&!t.relatedTarget){if(!l.current&&!mt(a))return}else if(!b(a))return}let o=O(t.relatedTarget,i.context.triggerElements),{nativeEvent:d,currentTarget:f}=t,p=typeof r==`function`?r():r;if(i.select(`open`)&&o||p===0||p===void 0){i.setOpen(!0,Fe(S,d,f));return}u.start(p,()=>{s.current||i.setOpen(!0,Fe(S,d,f))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=Qt(n)&&n.hasAttribute(Rt(`focus-guard`))&&n.getAttribute(`data-type`)===`outside`;u.start(0,()=>{let e=i.select(`domReferenceElement`),t=ft(ct(e));!n&&t===e||ce(o.current.floatingContext?.refs.floating.current,t)||ce(e,t)||a||O(n??t,i.context.triggerElements)||i.setOpen(!1,Fe(S,r))})}}},[o,r,i,u]);return Y.useMemo(()=>n?{reference:d,trigger:d}:{},[n,d])}var ju=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new z,this.restTimeout=new z,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Mu=new WeakMap;function Nu(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Mu.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),Mu.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Pu(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Mu.get(n);a&&a!==e&&Nu(a),Nu(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Mu.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Fu(e){let t=e.context.dataRef.current,n=i(()=>t.hoverInteractionState??ju.create()).current;return t.hoverInteractionState||=n,U(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Iu(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=`rootStore`in e?e.rootStore:e,o=a.useState(`open`),s=a.useState(`floatingElement`),c=a.useState(`domReferenceElement`),{dataRef:l}=a.context,u=_(),d=ge(),f=Fu(a),p=q(),m=J(()=>Pc(l.current.openEvent?.type,f.interactedInside)),h=J(()=>Fc(l.current.openEvent?.type)),g=J(()=>{Nu(f)});Lt(()=>{o||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[o,f,g]),Y.useEffect(()=>g,[g]),Lt(()=>{if(n&&o&&f.handleCloseOptions?.blockPointerEvents&&h()&&Qt(c)&&s){let e=c,t=s,n=ct(s),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=f.pointerEventsScopeElement===t?null:f.pointerEventsScopeElement,a=r===t?null:r,o=f.handleCloseOptions?.getScope?.()??i??a??e.closest(`[data-rootownerid]`)??n.body;return Pu(f,{scopeElement:o,referenceElement:e,floatingElement:t}),()=>{g()}}},[n,o,c,s,f,h,u,d,g]),Y.useEffect(()=>{if(!n)return;function e(){return!!(u&&d&&Ke(u.nodesRef.current,d).length>0)}function t(e){let t=Mc(r,`close`,f.pointerType),n=()=>{a.setOpen(!1,Fe(Ee,e)),u?.events.emit(`floating.closed`,e)};t?f.openChangeTimeout.start(t,n):(f.openChangeTimeout.clear(),n())}function o(e){let t=G(e);if(!A(t)){f.interactedInside=!1;return}f.interactedInside=t?.closest(`[aria-haspopup]`)!=null}function c(){f.openChangeTimeout.clear(),p.clear(),u?.events.off(`floating.closed`,v),g()}function _(n){if(e()&&u){u.events.on(`floating.closed`,v);return}if(O(n.relatedTarget,a.context.triggerElements))return;let r=l.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(u&&r&&Qt(o)&&Ke(u.nodesRef.current,r,!1).some(e=>ce(e.context?.elements.floating,o)))){if(f.handler){f.handler(n);return}g(),h()&&!m()&&t(n)}}function v(t){!u||!d||e()||p.start(0,()=>{u.events.off(`floating.closed`,v),a.setOpen(!1,Fe(Ee,t)),u.events.emit(`floating.closed`,t)})}let y=s;return E(y&&Yt(y,`mouseenter`,c),y&&Yt(y,`mouseleave`,_),y&&Yt(y,`pointerdown`,o,!0),()=>{u?.events.off(`floating.closed`,v)})},[n,s,a,l,r,i,h,m,g,f,u,d,p])}var Lu={current:null};function Ru(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=Lu,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,h=`rootStore`in e?e.rootStore:e,{dataRef:g,events:v}=h.context,y=_(l),b=Fu(h),x=Y.useRef(!1),S=xe(i),C=xe(r),w=xe(o),T=xe(n),D=xe(p),k=xe(f),A=J(()=>Pc(g.current.openEvent?.type,b.interactedInside)),j=J(()=>D.current?.()!==!1),M=J((e,t,n)=>{let r=h.context.triggerElements;if(r.hasElement(t))return!e||!ce(e,t);if(!Qt(n))return!1;let i=n;return r.hasMatchingElement(e=>ce(e,i))&&(!e||!ce(e,i))}),N=J(()=>{b.handler&&=(ct(h.select(`domReferenceElement`)).removeEventListener(`mousemove`,b.handler),void 0)}),P=J(()=>{Nu(b)});return u&&(b.handleCloseOptions=S.current?.__options),Y.useEffect(()=>N,[N]),Y.useEffect(()=>{if(!n)return;function e(e){e.open?x.current=!1:(x.current=e.reason===Ee,N(),b.openChangeTimeout.clear(),b.restTimeout.clear(),b.blockMouseMove=!0,b.restTimeoutPending=!1)}return v.on(`openchange`,e),()=>{v.off(`openchange`,e)}},[n,v,b,N]),Y.useEffect(()=>{if(!n)return;function e(e,t=!0){let n=Mc(C.current,`close`,b.pointerType);n?b.openChangeTimeout.start(n,()=>{h.setOpen(!1,Fe(Ee,e)),y?.events.emit(`floating.closed`,e)}):t&&(b.openChangeTimeout.clear(),h.setOpen(!1,Fe(Ee,e)),y?.events.emit(`floating.closed`,e))}let t=c.current??(u?h.select(`domReferenceElement`):null);if(!Qt(t))return;function r(e){if(b.openChangeTimeout.clear(),b.blockMouseMove=!1,a&&!ye(b.pointerType))return;let t=Nc(w.current),n=Mc(C.current,`open`,b.pointerType),r=G(e),i=e.currentTarget??null,o=h.select(`domReferenceElement`),s=i;if(Qt(r)&&!h.context.triggerElements.hasElement(r)){for(let e of h.context.triggerElements.elements())if(ce(e,r)){s=e;break}}Qt(i)&&Qt(o)&&!h.context.triggerElements.hasElement(i)&&ce(i,o)&&(s=o);let c=s!=null&&M(o,s,r),l=h.select(`open`),u=k.current?.()??h.select(`transitionStatus`)===`ending`,d=!l&&u&&x.current,f=!c&&Qt(s)&&Qt(o)&&ce(o,s)&&d,p=t>0&&!n,m=c&&(l||d)||f,g=!l||c;if(m){j()&&h.setOpen(!0,Fe(Ee,e,s));return}p||(n?b.openChangeTimeout.start(n,()=>{g&&j()&&h.setOpen(!0,Fe(Ee,e,s))}):g&&j()&&h.setOpen(!0,Fe(Ee,e,s)))}function i(t){if(A()){P();return}N();let n=h.select(`domReferenceElement`),r=ct(n);b.restTimeout.clear(),b.restTimeoutPending=!1;let i=g.current.floatingContext??d?.();if(!O(t.relatedTarget,h.context.triggerElements)){if(S.current&&i){h.select(`open`)||b.openChangeTimeout.clear();let n=c.current;b.handler=S.current({...i,tree:y,x:t.clientX,y:t.clientY,onClose(){P(),N(),T.current&&!A()&&n===h.select(`domReferenceElement`)&&e(t,!0)}}),r.addEventListener(`mousemove`,b.handler),b.handler(t);return}(b.pointerType!==`touch`||!ce(h.select(`floatingElement`),t.relatedTarget))&&e(t)}}function o(e){ce(t,e.relatedTarget)||(b.openChangeTimeout.clear(),b.restTimeout.clear(),b.restTimeoutPending=!1)}let l=m?Yt(t,`mouseout`,o):void 0;return s?E(Yt(t,`mousemove`,r,{once:!0}),Yt(t,`mouseenter`,r),Yt(t,`mouseleave`,i),l):E(Yt(t,`mouseenter`,r),Yt(t,`mouseleave`,i),l)},[N,P,g,C,h,n,S,b,u,M,A,a,s,w,c,y,T,d,k,j,m]),Y.useMemo(()=>{if(!n)return;function e(e){b.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=h.select(`domReferenceElement`),i=h.select(`open`),o=M(r,n,e.target);if(a&&!ye(b.pointerType))return;if(i&&o&&b.handleCloseOptions?.blockPointerEvents){let e=h.select(`floatingElement`);if(e){let t=b.handleCloseOptions?.getScope?.()??n.ownerDocument.body;Pu(b,{scopeElement:t,referenceElement:n,floatingElement:e})}}let s=Nc(w.current);if(i&&!o||s===0||!o&&b.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;b.restTimeout.clear();function c(){if(b.restTimeoutPending=!1,A())return;let e=h.select(`open`);!b.blockMouseMove&&(!e||o)&&j()&&h.setOpen(!0,Fe(Ee,t,n))}b.pointerType===`touch`?nu.flushSync(()=>{c()}):o&&i?c():(b.restTimeoutPending=!0,b.restTimeout.start(s,c))}}},[n,b,A,M,a,h,w,j])}var zu=`Escape`;function Bu(e){return v&&e.movementX===0&&e.movementY===0}function Vu(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Hu(e,t){return Vu(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function Uu(e,t,n){return Vu(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function Wu(e,t,n){return Vu(t,n?e===N:e===V,e===he)}function Gu(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===zu:Vu(t,n?e===V:e===N,e===ae)}function Ku(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,parentOrientation:v,id:y,resetOnPointerLeave:b=!0,externalTree:x,grid:S}=t,w=S!=null,T=`rootStore`in e?e.rootStore:e,E=T.useState(`open`),D=T.useState(`floatingElement`),O=T.useState(`domReferenceElement`),k=T.context.dataRef,A=Ce(D),j=fe(O),N=xe(A),P=ge(),F=_(x),I=Y.useRef(f),L=Y.useRef(o??-1),R=Y.useRef(null),z=Y.useRef(!0),B=J(e=>{i(L.current===-1?null:L.current,e)}),V=Y.useRef(!!D),ee=Y.useRef(E),H=Y.useRef(!1),U=Y.useRef(!1),W=Y.useRef(null),te=xe(h),ne=xe(E),re=xe(o),ie=xe(b),ae=Mt(),oe=Mt(),se=J(()=>{function e(e){d?F?.events.emit(`virtualfocus`,e):W.current=Et(e,{sync:H.current,preventScroll:!0})}let t=n.current[L.current],r=U.current;t&&e(t),(H.current?e=>e():e=>ae.request(e))(()=>{let i=n.current[L.current]||t;i&&(t||e(i),he&&(r||!z.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});Lt(()=>{k.current.orientation=g},[k,g]),Lt(()=>{a&&(E&&D?(L.current=o??-1,I.current&&o!=null&&(U.current=!0,B())):V.current&&(L.current=-1,B()))},[a,E,D,o,B]),Lt(()=>{if(a){if(!E){H.current=!1;return}if(D){if(r==null){if(H.current=!1,re.current!=null)return;if(V.current&&(L.current=-1,se()),(!ee.current||!V.current)&&I.current&&(R.current!=null||I.current===!0&&R.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>oe.request(e):queueMicrotask)(t),e+=1):(L.current=R.current==null||Uu(R.current,g,u)||l?ot(n):bt(n),R.current=null,B())};t()}}else Be(n.current,r)||(L.current=r,se(),U.current=!1)}}},[a,E,D,r,re,l,n,g,u,B,se,oe]),Lt(()=>{if(!a||D||!F||d||!V.current)return;let e=F.nodesRef.current,t=e.find(e=>e.id===P)?.context?.elements.floating,n=ft(ct(O??t??null)),r=e.some(e=>e.context&&ce(e.context.elements.floating,n));t&&!r&&z.current&&t.focus({preventScroll:!0})},[a,D,O,F,P,d]),Lt(()=>{ee.current=E,V.current=!!D}),Lt(()=>{E||(R.current=null,I.current=f)},[E,f]);let le=r!=null,ue=J(e=>{if(!ne.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(L.current!==t||r!==t)&&(L.current=t,B(e))}),de=J(()=>v??F?.nodesRef.current.find(e=>e.id===P)?.context?.dataRef?.current.orientation),pe=J(()=>ot(n,te.current)),me=J(e=>{if(z.current=!1,H.current=!0,e.which===229||!ne.current&&e.currentTarget===N.current)return;if(l&&Gu(e.key,g,u,w)){Hu(e.key,de())||De(e),T.setOpen(!1,Fe(M,e.nativeEvent)),Ue(O)&&(d?F?.events.emit(`virtualfocus`,O):O.focus());return}let t=L.current,r=ot(n,h),i=bt(n,h);if(j||(e.key===`Home`&&(De(e),L.current=r,B(e)),e.key===`End`&&(De(e),L.current=i,B(e))),S!=null){let t=S(e,L.current,n,g,c,u,h,r,i);if(t!=null&&(L.current=t,B(e)),g===`both`)return}if(Hu(e.key,g)){if(De(e),E&&!d&&ft(e.currentTarget.ownerDocument)===e.currentTarget){L.current=Uu(e.key,g,u)?r:i,B(e);return}Uu(e.key,g,u)?c?t>=i?s&&t!==n.current.length?L.current=-1:(H.current=!1,L.current=r):L.current=kt(n.current,{startingIndex:t,disabledIndices:h}):L.current=Math.min(i,kt(n.current,{startingIndex:t,disabledIndices:h})):c?t<=r?s&&t!==-1?L.current=n.current.length:(H.current=!1,L.current=i):L.current=kt(n.current,{startingIndex:t,decrement:!0,disabledIndices:h}):L.current=Math.max(r,kt(n.current,{startingIndex:t,decrement:!0,disabledIndices:h})),Be(n.current,L.current)&&(L.current=-1),B(e)}}),he=Y.useMemo(()=>({onFocus(e){H.current=!0,ue(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){Bu(e)||(H.current=!0,U.current=!1,p&&ue(e))},onPointerLeave(e){if(!ne.current||!z.current||e.pointerType===`touch`)return;H.current=!0;let t=e.relatedTarget;if(!(!p||n.current.includes(t))&&ie.current&&(W.current?.(),W.current=null,L.current=-1,B(e),!d)){let e=N.current,t=ft(ct(e));e&&ce(e,t)&&e.focus({preventScroll:!0})}}}),[ue,ne,N,p,n,B,ie,d]),_e=Y.useMemo(()=>d&&E&&le&&{"aria-activedescendant":`${y}-${r}`},[d,E,le,y,r]),ve=Y.useMemo(()=>({"aria-orientation":g===`both`?void 0:g,...j?{}:_e,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&E&&!d){let t=G(e.nativeEvent);if(t&&!ce(N.current,t))return;De(e),T.setOpen(!1,Fe(dt,e.nativeEvent)),Ue(O)&&O.focus();return}me(e)},onPointerMove(e){Bu(e)||(z.current=!0)}}),[_e,me,N,g,j,T,E,d,O]),ye=Y.useMemo(()=>{function e(e){T.setOpen(!0,Fe(M,e.nativeEvent,e.currentTarget))}function t(e){f===`auto`&&nn(e.nativeEvent)&&(I.current=!d)}function n(e){I.current=f,f===`auto`&&C(e.nativeEvent)&&(I.current=!0)}return{onKeyDown(t){let n=T.select(`open`);z.current=!1;let r=t.key.startsWith(`Arrow`),i=Wu(t.key,de(),u),a=Hu(t.key,g),o=(l?i:a)||t.key===`Enter`||t.key.trim()===``;if(d&&n)return me(t);if(!(!n&&!m&&r)){if(o){let e=Hu(t.key,de());R.current=l&&e?null:t.key}if(l){i&&(De(t),n?(L.current=pe(),B(t)):e(t));return}a&&(re.current!=null&&(L.current=re.current),De(t),!n&&m?e(t):me(t),n&&B(t))}},onFocus(e){T.select(`open`)&&!d&&(L.current=-1,B(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[me,f,pe,l,B,T,m,g,de,u,re,d]),be=Y.useMemo(()=>({..._e,...ye}),[_e,ye]);return Y.useMemo(()=>a?{reference:be,floating:ve,item:he,trigger:ye}:{},[a,be,ve,ye,he])}function qu(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=`rootStore`in e?e.rootStore:e,f=d.useState(`open`),m=q(),h=Y.useRef(``),g=Y.useRef(u??i??-1),_=Y.useRef(null),v=J(e=>{function t(e){return r?.current[e]}function c(e){let n=t(e);return n&&!rt(n)||n?.matches(`:disabled`)?!1:o==null||!qt(p,e,o)}function d(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(!(!e[n]?.toLowerCase().startsWith(i)||!c(n)))return n}return-1}let v=n.current;if(h.current.length>0&&e.key===` `&&(De(e),s?.(!0)),h.current.length>0&&h.current[0]!==` `&&d(v,h.current)===-1&&e.key!==` `&&s?.(!1),v==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(De(e),s?.(!0));let y=h.current===``;y&&(g.current=u??i??-1),v.every((e,t)=>e&&c(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&h.current===e.key&&(h.current=``,g.current=_.current),h.current+=e.key,m.start(l,()=>{h.current=``,g.current=_.current,s?.(!1)});let b=((y?u??i??-1:g.current)??0)+1,x=d(v,h.current,b);x===-1?e.key!==` `&&(h.current=``,s?.(!1)):(a?.(x),_.current=x)}),y=J(e=>{let t=e.relatedTarget,n=d.select(`domReferenceElement`),r=d.select(`floatingElement`);ce(n,t)||ce(r,t)||(m.clear(),h.current=``,g.current=_.current,s?.(!1))});Lt(()=>{!f&&u!==null||(m.clear(),_.current=null,h.current!==``&&(h.current=``))},[f,u,m]);let b=Y.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]);return Y.useMemo(()=>c?{reference:b,floating:b}:{},[c,b])}var Ju=.1,Yu=Ju*Ju,Xu=.5;function Zu(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Qu(e,t,n,r,i,a,o,s,c,l){let u=!1;return Zu(e,t,n,r,i,a)&&(u=!u),Zu(e,t,i,a,o,s)&&(u=!u),Zu(e,t,o,s,c,l)&&(u=!u),Zu(e,t,c,l,n,r)&&(u=!u),u}function $u(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function ed(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function td(e={}){let{blockPointerEvents:t=!1}=e,n=new z,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Yu;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=G(r),g=r.type===`mouseleave`,_=ce(u,h),v=ce(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&Qt(r.relatedTarget)&&ce(u,r.relatedTarget))return;function y(){return!!(s&&Ke(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=ed(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=ed(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=ed(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=ed(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!$u(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?Xu/2:Xu*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Xu+1,o=C||T?S.bottom-Xu:S.top,s=C?T?S.bottom-Xu:S.top:S.bottom-Xu;M=Qu(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Xu/2:Xu*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Xu,o=C||T?S.top+Xu:S.bottom,s=C?T?S.top+Xu:S.bottom:S.top+Xu;M=Qu(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Xu/2:Xu*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Xu+1,o=w||E?S.right-Xu:S.left,s=w?E?S.right-Xu:S.left:S.right-Xu;M=Qu(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Xu/2:Xu*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Xu,o=w||E?S.left+Xu:S.right,s=w?E?S.left+Xu:S.right:S.left+Xu;M=Qu(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var nd=Y.createContext(void 0);function rd(e){let t=Y.useContext(nd);if(t===void 0&&!e)throw Error(f(69));return t}function id(e){return e===`starting`?Ft:n}var ad=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:c}=xc(),{side:l,align:u}=yc(),d=rd(!0)!=null,f=c.useState(`open`),p=c.useState(`transitionStatus`),m=c.useState(`popupProps`),h=c.useState(`mounted`),g=c.useState(`instantType`),_=c.useState(`activeTriggerElement`),v=c.useState(`parent`),y=c.useState(`lastOpenChangeReason`),b=c.useState(`rootId`),x=c.useState(`floatingRootContext`),S=c.useState(`floatingTreeRoot`),C=c.useState(`closeDelay`),T=c.useState(`hoverEnabled`),E=c.useState(`disabled`),D=c.useState(`openMethod`),O=v.type===`context-menu`;Ae({open:f,ref:c.context.popupRef,onComplete(){f&&c.context.onOpenChangeComplete?.(!0)}}),Y.useEffect(()=>{function e(e){c.setOpen(!1,Fe(e.reason,e.domEvent))}return S.events.on(`close`,e),()=>{S.events.off(`close`,e)}},[S.events,c]),Iu(x,{enabled:T&&!E&&!O&&v.type!==`menubar`,closeDelay:C});let k=c.useStateSetter(`popupElement`),A={transitionStatus:p,side:l,align:u,open:f,nested:v.type===`menu`,instant:g},j=s(`div`,e,{state:A,ref:[t,c.context.popupRef,k],stateAttributesMapping:F,props:[m,{onKeyDown(e){d&&w.has(e.key)&&e.stopPropagation()}},id(p),o,{"data-rootownerid":b}]}),M=v.type===void 0||O;return(_||v.type===`menubar`&&y!==`outside-press`)&&(M=!0),(0,X.jsx)(ee,{context:x,openInteractionType:D,modal:O,disabled:!h,returnFocus:a===void 0?M:a,initialFocus:v.type!==`menu`,restoreFocus:!0,externalTree:v.type===`menubar`?void 0:S,previousFocusableElement:_,nextFocusableElement:v.type===void 0?c.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:v.type===void 0?c.context.beforeContentFocusGuardRef:void 0,children:j})}),od=Y.createContext(void 0);function sd(){let e=Y.useContext(od);if(e===void 0)throw Error(f(32));return e}var cd=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=xc();return i.useState(`mounted`)||n?(0,X.jsx)(od.Provider,{value:n,children:(0,X.jsx)(Vt,{ref:t,...r})}):null}),ld=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=Uc(e,t)||{};if(l==null)return{};let f=sl(u),p={x:n,y:r},m=Yc(i),h=qc(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=Hc(k,j,A),N=!c.arrow&&Gc(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),ud=(e,t)=>({...ld(e),options:[e,t]}),dd={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},fd={sideX:`left`,sideY:`top`},pd=`--available-width`,md=`--available-height`;function hd(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function gd(e,t,n){let{rects:r,placement:i}=e;return{side:hd(t,Wc(i),n),align:Gc(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function _d(e){return vd(e,Du)}function vd(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:y,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:S}=e,[C,w]=Y.useState(null);!g&&C!==null&&w(null);let T=_.side||`flip`,E=_.align||`flip`,D=_.fallbackAxisSide||`end`,O=v?.crossAxis??!1,k=v?.rootBoundary,A=typeof n==`function`?n:void 0,j=J(A),M=A?j:n,N=xe(n),P=xe(g),F=Re()===`rtl`,I=C||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":F?`left`:`right`,"inline-start":F?`right`:`left`}[i],L=o===`center`?I:`${I}-${o}`,R=l;typeof R==`number`?R={top:R,right:R,bottom:R,left:R}:R&&={top:R.top||0,right:R.right||0,bottom:R.bottom||0,left:R.left||0};let z=+(i===`bottom`),B=+(i===`top`),V=+(i===`right`),ee=+(i===`left`),H={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:R},U=Y.useRef(null),W=xe(a),te=xe(s),ne=typeof a==`function`?0:a,re=typeof s==`function`?0:s,ie=[];p&&ie.push(p),ie.push(lu(e=>{let t=gd(e,i,F),n=typeof W.current==`function`?W.current(t):W.current,r=typeof te.current==`function`?te.current(t):te.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[ne,re,F,i]));let ae=E===`none`&&T!==`shift`,oe=!ae&&(u||O||T===`shift`),se=T===`none`?null:fu({...H,padding:{top:R.top+1+z,right:R.right+1+ee,bottom:R.bottom+1+B,left:R.left+1+V},mainAxis:!O&&T===`flip`,crossAxis:E===`flip`&&`alignment`,fallbackAxisSideDirection:D}),ce=ae?null:uu({...H,rootBoundary:k,mainAxis:E!==`none`,crossAxis:oe,limiter:u||O?void 0:du(e=>{if(!U.current)return{};let{width:t,height:n}=U.current.getBoundingClientRect(),r=Jc(Wc(e.placement)),i=r===`y`?t:n,a=r===`y`?R.left+R.right:R.top+R.bottom;return{offset:i/2+a/2}})},[H,u,O,k,R,E]);T===`shift`||E===`shift`||o===`center`?ie.push(ce,se):ie.push(se,ce),ie.push(pu({...H,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!P.current)return;let i=e.style;i.setProperty(pd,`${t}px`),i.setProperty(md,`${n}px`);let a=ze(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),ud(e=>({element:U.current||ct(e.elements.floating).createElement(`div`),padding:d,offsetParent:`floating`}),[d]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:r,rects:o,y:s}=e,c=Wc(r),l=Jc(c),u=U.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof a==`function`?a(gd(e,i,F)):a,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,oe&&l===`y`&&b?S:x),{}}},dd,b),Lt(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let le=Y.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:G,elements:ue,x:de,y:fe,middlewareData:pe,update:me,placement:he,context:ge,isPositioned:_e,floatingStyles:ve}=t({rootContext:h,open:m?g:void 0,placement:L,middleware:ie,strategy:r,whileElementsMounted:m?void 0:(...e)=>Yl(...e,le),nodeId:y,externalTree:S}),{sideX:ye,sideY:be}=pe.adaptiveOrigin||fd,Se=_e?r:`fixed`,Ce=Y.useMemo(()=>{let e;return e=_e?b?{position:Se,[ye]:de,[be]:fe}:{...ve,position:Se}:{position:Se,top:0,left:0},e[pd]=`100vw`,e[md]=`100vh`,_e||(e.opacity=0),e},[b,Se,ye,de,be,fe,ve,_e]),K=Y.useRef(null);Lt(()=>{if(!g)return;let e=N.current,t=typeof e==`function`?e():e,n=(yd(t)?t.current:t)||null;n!==K.current&&(G.setPositionReference(n),K.current=n)},[g,G,M,N]),Y.useEffect(()=>{if(!g)return;let e=N.current;typeof e!=`function`&&yd(e)&&e.current!==K.current&&(G.setPositionReference(e.current),K.current=e.current)},[g,G,M,N]),Y.useEffect(()=>{if(m&&g&&ue.reference&&ue.floating)return Yl(ue.reference,ue.floating,me,le)},[m,g,ue,me,le]);let we=Wc(he),q=hd(i,we,F),Te=Gc(he)||`center`,Ee=!!pe.hide?.referenceHidden;Lt(()=>{x&&g&&_e&&we!==I&&w(we)},[x,g,_e,we,I]);let De=Y.useMemo(()=>({position:`absolute`,top:pe.arrow?.y,left:pe.arrow?.x}),[pe.arrow]),Oe=pe.arrow?.centerOffset!==0;return Y.useMemo(()=>({positionerStyles:Ce,arrowStyles:De,arrowRef:U,arrowUncentered:Oe,side:q,align:Te,physicalSide:we,anchorHidden:Ee,refs:G,context:ge,isPositioned:_e,update:me}),[Ce,De,U,Oe,q,Te,we,Ee,G,ge,_e,me])}function yd(e){return e!=null&&`current`in e}function bd(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:a}=e,o=J(a),[,s]=Y.useState(!1),c=i(Sd).current,l=i(xd).current,u=Y.useRef(0),d=Y.useRef(!0),f=Y.useRef([]),p=Y.useRef(null),m=J(()=>{d.current||(d.current=!0,s(e=>!e))}),h=J((e,t)=>{l.set(e,t),m()}),g=J(e=>{l.delete(e),m()}),_=J(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),u.current=n.current.length,t});function v(e){if(p.current?.disconnect(),p.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!Td(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&Ed(r,n)>0){t.disconnect(),m();return}r=n}});p.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=wd(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let y=J(()=>{let[e,t]=Cd(l),n=_(e);v(t),f.current=e,d.current=!1,c.forEach(e=>e(n)),o(n)});Lt(()=>(d.current||_(f.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,_]),Lt(()=>{d.current&&y()}),Lt(()=>()=>{p.current?.disconnect(),d.current=!0},[]);let b=J(e=>(c.add(e),()=>{c.delete(e)})),x=Y.useMemo(()=>({register:h,unregister:g,subscribeMapChange:b,nextIndexRef:u}),[h,g,b,u]);return(0,X.jsx)(Dc.Provider,{value:x,children:t})}function xd(){return new Map}function Sd(){return new Set}function Cd(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>Ed(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function wd(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function Td(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function Ed(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function Dd(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:c=!1}){let l={...n};return c&&(l.pointerEvents=`none`),s(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:l},id(r),i],stateAttributesMapping:ke})}var Od=20;function kd(e,t,n,r){let[i,a]=Y.useState(!1);Lt(()=>{if(!e||!t||n==null){a(!1);return}let r=ct(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Od)},[e,t,n]),it(e&&(!t||i),r)}var Ad=Y.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=lt,style:g,..._}=e,{store:v}=xc(),y=sd(),b=Cc(!0),x=v.useState(`parent`),S=v.useState(`floatingRootContext`),C=v.useState(`floatingTreeRoot`),w=v.useState(`mounted`),T=v.useState(`open`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`activeTriggerElement`),k=v.useState(`transitionStatus`),A=v.useState(`positionerElement`),j=v.useState(`instantType`),M=v.useState(`adaptiveOrigin`),N=v.useState(`lastOpenChangeReason`),P=v.useState(`floatingNodeId`),F=v.useState(`floatingParentNodeId`),L=S.useState(`domReferenceElement`),R=Y.useRef(null),z=I(A),B=n,V=c,ee=l,H=s,U=h;x.type===`context-menu`&&(B=n??x.context?.anchor,H??=`start`,!o&&H!==`center`&&(ee=e.alignOffset??2,V=e.sideOffset??-5));let W=o,te=H;x.type===`menu`?(W??=`inline-end`,te??=`start`,U=e.collisionAvoidance??He):x.type===`menubar`&&(W??=x.context.orientation===`vertical`?`inline-end`:`bottom`,te??=`start`);let ne=x.type===`context-menu`,re=_d({anchor:B,floatingRootContext:S,positionMethod:b?`fixed`:r,mounted:w,side:W,sideOffset:V,align:te,alignOffset:ee,arrowPadding:ne?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:P,keepMounted:y,disableAnchorTracking:m,collisionAvoidance:U,shift:ne?{crossAxis:!(`side`in U&&U.side===`flip`),rootBoundary:`layoutViewport`}:void 0,externalTree:C,adaptiveOrigin:M});Y.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===P&&v.set(`hoverEnabled`,!1),e.nodeId!==P&&e.parentNodeId===v.select(`floatingParentNodeId`)&&v.setOpen(!1,Fe(tn)))}return C.events.on(`menuopenchange`,e),()=>{C.events.off(`menuopenchange`,e)}},[v,C.events,P]),Y.useEffect(()=>{if(v.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==v.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;v.setOpen(!1,Fe(t))}return C.events.on(`menuopenchange`,e),()=>{C.events.off(`menuopenchange`,e)}},[C.events,v]);let ie=q();Y.useEffect(()=>{T||ie.clear()},[T,ie]),Y.useEffect(()=>{function e(e){if(!(!T||e.nodeId!==v.select(`floatingParentNodeId`))){if(e.target&&O&&O!==e.target){let e=v.select(`closeDelay`);e>0?ie.isStarted()||ie.start(e,()=>{v.setOpen(!1,Fe(tn))}):v.setOpen(!1,Fe(tn))}else ie.clear()}}return C.events.on(`itemhover`,e),()=>{C.events.off(`itemhover`,e)}},[C.events,T,O,v,ie]),Y.useEffect(()=>{let e={open:T,nodeId:P,parentNodeId:F,reason:v.select(`lastOpenChangeReason`)};C.events.emit(`menuopenchange`,e)},[C.events,T,v,P,F]),Lt(()=>{let e=L,t=R.current;if(e&&(R.current=e),t&&e&&e!==t){v.set(`instantType`,void 0);let e=new AbortController;return z(()=>{v.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[L,z,v]);let ae={open:T,side:re.side,align:re.align,anchorHidden:re.anchorHidden,nested:x.type===`menu`,instant:j},oe=x.type===`menubar`&&x.context.modal;kd(T&&(oe||E&&N!==`trigger-hover`),D===`touch`,A,O);let se=Dd(e,ae,{styles:re.positionerStyles,transitionStatus:k,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!w,inert:!T}),ce=w&&x.type!==`menu`&&(x.type!==`menubar`&&E&&N!==`trigger-hover`||x.type===`menubar`&&x.context.modal),le=null;return x.type===`menubar`?le=x.context.contentElement:x.type===void 0&&(le=O),(0,X.jsxs)(vc.Provider,{value:re,children:[ce&&(0,X.jsx)(tt,{ref:x.type===`context-menu`||x.type===`nested-context-menu`?x.context.internalBackdropRef:null,inert:Gt(!T),cutout:le}),(0,X.jsx)(Ne,{id:P,children:(0,X.jsx)(bd,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,children:se})})]})}),jd=Y.createContext(null);function Md(e){let t=Y.useContext(jd);if(t===null&&!e)throw Error(f(5));return t}function Nd(e){let t=Y.useRef(``),n=Y.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:Y.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function Pd(e,t){let n=Y.useRef(e),r=J(t);Lt(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function Fd(e,t){let{onClick:n,onPointerDown:r}=Nd(J((n,r)=>{(typeof e==`function`?e():e)||t(r||(Xe?`touch`:``))}));return Y.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function Id(e){let[t,n]=Y.useState(null),r=Fd(e,n);return Pd(e,t=>{t&&!e&&n(null)}),Y.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var Ld=class extends L{setState(e){}update(e){}set(e,t){}notifyAll(){}},Rd={...Cu,disabled:e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0),openMethod:e=>e.openMethod,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId,activeIndex:e=>e.activeIndex,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)}},zd=class extends L{constructor(e){super({...Vd(),...e},Bd(),Rd),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);(t!==i||n!==a||r!==o)&&(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}unsubscribeParentListener=null};function Bd(){return{positionerRef:Y.createRef(),popupRef:Y.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:Y.createRef(),beforeContentFocusGuardRef:Y.createRef(),onOpenChangeComplete:void 0,triggerElements:new ue}}function Vd(){return{...gu(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Ze,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:n,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0}}var Hd=Y.createContext(void 0);function Ud(){return Y.useContext(Hd)}var Wd=Oe(function(e){let{children:t,open:r,onOpenChange:i,onOpenChangeComplete:a,defaultOpen:o=!1,disabled:s=!1,modal:c,loopFocus:l=!0,orientation:u=`vertical`,actionsRef:f,closeParentOnEsc:m=!1,handle:h,triggerId:g,defaultTriggerId:_=null,highlightItemOnHover:v=!0}=e,b=Cc(!0),S=xc(!0),C=Md(!0),w=Ud(),T=Y.useMemo(()=>w&&S?{type:`menu`,store:S.store}:C?{type:`menubar`,context:C}:b&&!S?{type:`context-menu`,context:b}:{type:void 0},[b,S,C,w]),E=Gd({open:o,openProp:r,activeTriggerId:_,triggerIdProp:g,parent:T});E.useControlledProp(`openProp`,r),E.useControlledProp(`triggerIdProp`,g),E.useContextCallback(`onOpenChangeComplete`,a);let D=Le(),O=Le(),k=E.useState(`floatingTreeRoot`),A=Ie(k),M=ge(),N=E.useState(`open`),P=E.useState(`activeTriggerElement`),F=E.useState(`positionerElement`),I=E.useState(`hoverEnabled`),L=E.useState(`disabled`),R=E.useState(`lastOpenChangeReason`),z=E.useState(`parent`),V=E.useState(`activeIndex`),ee=E.useState(`payload`),H=E.useState(`floatingParentNodeId`),U=Y.useRef(null),W=Y.useRef(z.type!==`context-menu`),te=q(),ne=Y.useRef(!0),re=q(),ie=H!=null,{openMethod:ae,triggerProps:oe}=Id(N);E.useSyncedValues({disabled:s,highlightItemOnHover:v,modal:z.type===void 0?c:void 0,openMethod:ae,rootId:D}),pe(E);let{forceUnmount:ce}=j(N,E,()=>{E.set(`allowMouseEnter`,!1)});Lt(()=>{b&&!S?E.update({parent:{type:`context-menu`,context:b},floatingNodeId:A,floatingParentNodeId:M}):S&&E.update({floatingNodeId:A,floatingParentNodeId:M})},[b,S,A,M,E]),Y.useEffect(()=>{if(N||(U.current=null),z.type===`context-menu`){if(!N){te.clear(),W.current=!1;return}te.start(500,()=>{W.current=!0})}},[te,N,z.type]),Lt(()=>{!N&&!I&&E.set(`hoverEnabled`,!0)},[N,I,E]);let G=J((e,t)=>{let n=t.reason;if(!e&&!E.select(`open`)||N===e&&t.trigger===P&&R===n)return;let r=ut(t);if(!e&&t.trigger==null&&(t.trigger=P??void 0),i?.(e,t),t.isCanceled)return;E.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(e===!1&&a?.type===`click`&&a.pointerType===`touch`&&!ne.current)return;e&&n===`trigger-focus`?(ne.current=!1,re.start(300,()=>{ne.current=!0})):(ne.current=!0,re.clear());let o=(n===`trigger-press`||n===`item-press`)&&a.detail===0,s=!e&&(n===`escape-key`||n==null),c={open:e,openChangeReason:n};U.current=t.event,le(c,e,t.trigger,r()),E.update(c),z.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?E.set(`instantType`,`group`):o||s?E.set(`instantType`,o?`click`:`dismiss`):E.set(`instantType`,void 0)}),ue=x({popupStore:E,floatingId:O,nested:M!=null,onOpenChange:G}),de=ue.context.events;Lt(()=>{let e=({open:e,eventDetails:t})=>G(e,t);return de.on(`setOpen`,e),()=>{de?.off(`setOpen`,e)}},[de,G]);let fe=Y.useCallback(()=>{E.setOpen(!1,Fe(se))},[E]);Y.useImperativeHandle(f,()=>({unmount:ce,close:fe}),[ce,fe]);let me;z.type===`context-menu`&&(me=z.context),Y.useImperativeHandle(me?.positionerRef,()=>F,[F]),Y.useImperativeHandle(me?.actionsRef,()=>({setOpen:G}),[G]);let he=At(ue,{enabled:!L,bubbles:{escapeKey:m&&z.type===`menu`},outsidePress(){return z.type!==`context-menu`||U.current?.type===`contextmenu`||W.current},externalTree:ie?k:void 0}),_e=Re(),ve=Y.useCallback(e=>{E.select(`activeIndex`)!==e&&E.set(`activeIndex`,e)},[E]),ye=Ku(ue,{enabled:!L,listRef:E.context.itemDomElements,activeIndex:V,nested:z.type!==void 0,loopFocus:l,orientation:u,parentOrientation:z.type===`menubar`?z.context.orientation:void 0,rtl:_e===`rtl`,disabledIndices:p,onNavigate:ve,openOnArrowKeyDown:z.type!==`context-menu`,externalTree:ie?k:void 0,focusItemOnHover:v}),be=Y.useCallback(e=>{E.context.typingRef.current=e},[E]),xe=qu(ue,{enabled:!L,listRef:E.context.itemLabels,elementsRef:E.context.itemDomElements,activeIndex:V,resetMs:500,onMatch:e=>{N&&e!==V&&E.set(`activeIndex`,e)},onTyping:be}),Se=Y.useMemo(()=>{let e=d(xe.reference,ye.reference,he.reference,{onMouseMove(){E.set(`allowMouseEnter`,!0)}},oe);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=N,e},[E,xe.reference,ye.reference,he.reference,oe,N]),Ce=Y.useMemo(()=>{let e=d(ye.trigger,he.trigger,oe);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[ye.trigger,he.trigger,oe]),K=Y.useMemo(()=>d(pt,{id:O,role:`menu`,"aria-labelledby":P?.id,onMouseMove(){E.set(`allowMouseEnter`,!0),z.type===`menu`&&E.set(`hoverEnabled`,!1)},onClick(){E.select(`hoverEnabled`)&&E.set(`hoverEnabled`,!1)},onKeyDown(e){let t=E.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},xe.floating,ye.floating,he.floating),[P,O,z.type,E,xe.floating,ye.floating,he.floating]),we=ye.item??n;B(E,{floatingRootContext:ue,activeTriggerProps:Se,inactiveTriggerProps:Ce,popupProps:K,itemProps:we});let Te=Y.useMemo(()=>({store:E,parent:T}),[E,T]),Ee=(0,X.jsxs)(bc.Provider,{value:Te,children:[h&&(0,X.jsx)(y,{handle:h,store:E}),typeof t==`function`?t({payload:ee}):t]});return z.type===void 0||z.type===`context-menu`?(0,X.jsx)(je,{externalTree:k,children:Ee}):Ee});function Gd(e){return i(()=>new zd(e)).current}var Kd=5;function qd(e,t){let n=Jd(t);return e.clientX>=n.left-Kd&&e.clientX<=n.right+Kd&&e.clientY>=n.top-Kd&&e.clientY<=n.bottom+Kd}function Jd(e){let t=e.getBoundingClientRect(),n=ze(e);if(_e)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function Yd(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:i}=Tt(),{ref:a,index:o}=kc(e),s=n===o,c=Y.useRef(null),l=r(a,c);return{compositeProps:{tabIndex:s?0:-1,onFocus(){i(o)},onMouseMove(){let e=c.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!s&&!n&&e.focus()}},compositeRef:l,index:o}}function Xd(e){let{render:t,className:r,style:i,state:a=n,props:o=p,refs:c=p,metadata:l,stateAttributesMapping:u,tag:d=`div`,...f}=e,{compositeProps:m,compositeRef:h}=Yd({metadata:l});return s(d,e,{state:a,ref:[h,...c],props:[m,...o,f],stateAttributesMapping:u})}function Zd(e){if(Ue(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!Xt(e))return Zd(nt(e))}function Qd(e,t){let n=Y.useRef(null);function r(t){nu.flushSync(()=>{e.setOpen(!1,Fe(dt,t.nativeEvent,t.currentTarget))}),Ye(n.current)?.focus()}function i(n){let r=e.select(`positionerElement`);if(r&&et(n,r))e.context.beforeContentFocusGuardRef.current?.focus();else{nu.flushSync(()=>{e.setOpen(!1,Fe(dt,n.nativeEvent,n.currentTarget))});let i=Wt(e.context.triggerFocusTargetRef.current||t.current);for(;i!==null&&ce(r,i);){let e=i;if(i=_t(i),i===e)break}i?.focus()}}return{preFocusGuardRef:n,handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function $d(e){let{enabled:t=!0,mouseDownAction:r,open:i}=e,a=Y.useRef(!1);return Y.useMemo(()=>t?{onMouseDown:e=>{(r===`open`&&!i||r===`close`&&i)&&(a.current=!0,ct(e.currentTarget).addEventListener(`click`,()=>{a.current=!1},{once:!0}))},onClick:e=>{a.current&&(a.current=!1,e.preventBaseUIHandler())}}:n,[t,r,i])}var ef=P(function(e,t){let{render:r,className:i,style:a,disabled:o=!1,nativeButton:c=!0,id:l,openOnHover:u,delay:p=100,closeDelay:m=0,handle:h,payload:g,...v}=e,y=xc(!0),b=Tu(h)??y?.store;if(!b)throw Error(f(85));let x=Me(l),S=b.useState(`isTriggerActive`,x),C=b.useState(`floatingRootContext`),w=b.useState(`isOpenedByTrigger`,x),T=b.useState(`triggerPopupId`,x),E=Y.useRef(null),O=nf(),k=Tt(!0),A=_(),j=Y.useMemo(()=>A??new Ze,[A]),M=Ie(j),N=ge(),{registerTrigger:P,isMountedByThisTrigger:F}=en(x,E,b,{payload:g,closeDelay:m,parent:O,floatingTreeRoot:j,floatingNodeId:M,floatingParentNodeId:N,keyboardEventRelay:k?.relayKeyboardEvent}),I=O.type===`menubar`,L=b.useState(`disabled`),R=o||L||I&&O.context.disabled,{getButtonProps:z,buttonRef:B}=St({disabled:R,native:c});Y.useEffect(()=>{!w&&O.type===void 0&&(b.context.allowMouseUpTriggerRef.current=!1)},[b,w,O.type]);let V=Y.useRef(null),ee=q(),H=J(e=>{if(!V.current)return;ee.clear(),b.context.allowMouseUpTriggerRef.current=!1;let t=e.target;ce(V.current,t)||ce(b.select(`positionerElement`),t)||t===V.current||(t==null||Zd(t)!==b.select(`rootId`))&&(qd(e,V.current)||j.events.emit(`close`,{domEvent:e,reason:D}))});Y.useEffect(()=>{w&&b.select(`lastOpenChangeReason`)===`trigger-hover`&&ct(V.current).addEventListener(`mouseup`,H,{once:!0})},[w,H,b]);let U=I&&O.context.hasSubmenuOpen,W=Ru(C,{enabled:(u??U)&&!R&&(!I||U&&!F),handleClose:td({blockPointerEvents:!I}),mouseOnly:!0,move:!1,restMs:O.type===void 0?p:void 0,delay:{close:m},triggerElementRef:E,externalTree:j,isActiveTrigger:S,isClosing:()=>b.select(`transitionStatus`)===`ending`}),ne=tf(w,b.select(`lastOpenChangeReason`)),re=ll(C,{enabled:!R,event:w&&I?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:O.type===void 0&&ne}),ie=Au(C,{enabled:!R&&U}),ae=$d({open:w,enabled:I,mouseDownAction:`open`}),oe=Y.useMemo(()=>d(ie.reference,re.reference),[ie.reference,re.reference]),se=b.useState(`triggerProps`,F),{preFocusGuardRef:le,handlePreFocusGuardFocus:G,handleFocusTargetFocus:ue}=Qd(b,E),de={disabled:R,open:w},fe=[V,t,B,P,E],pe=[oe,W??n,se,{"aria-haspopup":`menu`,"aria-controls":T,id:x,onMouseDown:e=>{b.select(`open`)||(ee.start(200,()=>{b.context.allowMouseUpTriggerRef.current=!0}),ct(e.currentTarget).addEventListener(`mouseup`,H,{once:!0}))}},I?{role:`menuitem`}:{},ae,v,z],me=s(`button`,e,{enabled:!I,stateAttributesMapping:te,state:de,ref:fe,props:pe});return I?(0,X.jsx)(Xd,{tag:`button`,render:r,className:i,style:a,state:de,refs:fe,props:pe,stateAttributesMapping:te}):w?(0,X.jsxs)(Y.Fragment,{children:[(0,X.jsx)($t,{ref:le,onFocus:G},`${x}-pre-focus-guard`),(0,X.jsx)(Y.Fragment,{children:me},x),(0,X.jsx)($t,{ref:b.context.triggerFocusTargetRef,onFocus:ue},`${x}-post-focus-guard`)]}):(0,X.jsx)(Y.Fragment,{children:me},x)});function tf(e,t){let n=q(),[r,i]=Y.useState(!1);return Lt(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function nf(){let e=Md(!0);return Y.useMemo(()=>e?{type:`menubar`,context:e}:{type:void 0},[e])}function rf(e){let[t,n]=Y.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}var af=Y.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return s(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function of(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}var sf=Wd;function cf({className:e,children:t,...n}){return(0,X.jsx)(ef,{className:e,"data-slot":`menu-trigger`,...n,children:t})}function lf({children:e,className:t,sideOffset:n=4,align:r=`center`,alignOffset:i,side:a=`bottom`,anchor:o,...s}){return(0,X.jsx)(cd,{children:(0,X.jsx)(Ad,{align:r,alignOffset:i,anchor:o,className:`z-50`,"data-slot":`menu-positioner`,side:a,sideOffset:n,children:(0,X.jsx)(ad,{className:l(`relative flex not-[class*='w-']:min-w-32 origin-(--transform-origin) rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 outline-none before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] focus:outline-none dark:before:shadow-[0_-1px_--theme(--color-white/6%)]`,t),"data-slot":`menu-popup`,...s,children:(0,X.jsx)(`div`,{className:`max-h-(--available-height) w-full overflow-y-auto p-1`,children:e})})})})}function uf({className:e,inset:t,variant:n=`default`,...r}){return(0,X.jsx)(Ac,{className:l(`[&>svg]:-mx-0.5 flex min-h-8 cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-inset:ps-8 data-[variant=destructive]:text-destructive-foreground data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&>svg:not([class*='opacity-'])]:opacity-80 [&>svg:not([class*='size-'])]:size-4.5 sm:[&>svg:not([class*='size-'])]:size-4 [&>svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:[&>svg:not([class*='text-'])]:text-current [&>svg]:pointer-events-none [&>svg]:shrink-0`,e),"data-inset":t,"data-slot":`menu-item`,"data-variant":n,...r})}function df({className:e,...t}){return(0,X.jsx)(af,{className:l(`mx-2 my-1 h-px bg-border`,e),"data-slot":`menu-separator`,...t})}var ff=Y.createContext(void 0);function pf(e){let t=Y.useContext(ff);if(!e&&t===void 0)throw Error(f(27));return t}var mf=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,c=pf(),l=c.useState(`open`),u=c.useState(`nested`),d=c.useState(`mounted`),f={open:l,transitionStatus:c.useState(`transitionStatus`)};return s(`div`,e,{state:f,ref:[c.context.backdropRef,t],stateAttributesMapping:F,props:[{role:`presentation`,hidden:!d,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!u})}),hf=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...c}=e,l=pf(),u=l.useState(`open`),{getButtonProps:d,buttonRef:f}=St({disabled:a,native:o}),p={disabled:a};function m(e){u&&l.setOpen(!1,Fe(de,e.nativeEvent))}return s(`button`,e,{state:p,ref:[t,f],props:[{onClick:m},c,d]})}),gf=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,c=pf(),l=Me(a);return c.useSyncedValueWithCleanup(`descriptionElementId`,l),s(`p`,e,{ref:t,props:[{id:l},o]})}),_f=Y.createContext(void 0);function vf(){let e=Y.useContext(_f);if(e===void 0)throw Error(f(26));return e}var yf={...ke,...H,nestedDialogOpen(e){return e?{"data-nested-dialog-open":``}:null}},bf=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...c}=e,l=pf(),u=l.useState(`descriptionElementId`),d=l.useState(`disablePointerDismissal`),f=l.useState(`floatingRootContext`),p=l.useState(`popupProps`),m=l.useState(`modal`),h=l.useState(`mounted`),g=l.useState(`nested`),_=l.useState(`nestedOpenDialogCount`),v=l.useState(`open`),y=l.useState(`openMethod`),b=l.useState(`titleElementId`),x=l.useState(`transitionStatus`),S=l.useState(`role`),C=f.useState(`floatingId`);vf(),Ae({open:v,ref:l.context.popupRef,onComplete(){v&&l.context.onOpenChangeComplete?.(!0)}});let T=o===void 0?oe(l.context.popupRef):o,E=_>0,D=l.useStateSetter(`popupElement`),O=s(`div`,e,{state:{open:v,nested:g,transitionStatus:x,nestedDialogOpen:E},props:[p,{id:C,"aria-labelledby":b,"aria-describedby":u,role:S,...pt,hidden:!h,onKeyDown(e){w.has(e.key)&&e.stopPropagation()},style:{"--nested-dialogs":_}},c],ref:[t,l.context.popupRef,D],stateAttributesMapping:yf});return(0,X.jsx)(ee,{context:f,openInteractionType:y,disabled:!h,closeOnFocusOut:!d,initialFocus:T,returnFocus:a,modal:m!==!1,restoreFocus:`popup`,children:O})}),xf=Y.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=pf(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,X.jsx)(_f.Provider,{value:n,children:(0,X.jsxs)(Vt,{ref:t,...r,children:[a&&o===!0&&(0,X.jsx)(tt,{ref:i.context.internalBackdropRef,inert:Gt(!s)}),e.children]})}):null});function Sf({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`disablePointerDismissal`),a=e.useState(`modal`),o=e.useState(`popupElement`),s=e.useState(`floatingRootContext`),[c,l]=Y.useState(0),[u,d]=Y.useState(0),f=c===0,p=At(s,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:a===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=G(t);if(f&&!i){if(a){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||ce(n,o)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:f});return it(r&&a===!0,o),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{l(e),d(t)}),Lt(()=>(t?.onNestedDialogOpen&&(r?t.onNestedDialogOpen(c+1,u+ +!!n):t.onNestedDialogOpen(0,0)),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,c,u,t]),B(e,{activeTriggerProps:p.reference,inactiveTriggerProps:p.trigger,popupProps:p.floating,nestedOpenDialogCount:c,nestedOpenDrawerCount:u}),null}var Cf={...Cu,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},wf=class extends L{constructor(e,t,n){let r=new ue,i=Ef(e,r,t,n);super(i,Df(r),Cf)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};le(n,e,t.trigger),this.update(n)}};function Tf(){let e=new ue;return new Ld(Object.freeze(Ef(void 0,e)),Object.freeze(Df(e)),Cf)}function Ef(e,t,n,r=!1){let i={...gu(),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e};return i.floatingRootContext=_u(t,n,r),i}function Df(e){return{popupRef:Y.createRef(),backdropRef:Y.createRef(),internalBackdropRef:Y.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function Of(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=pf(!0),b={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},x=re((e,t)=>new wf({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...b},e,t),!0);x.useControlledProp(`openProp`,r),x.useControlledProp(`triggerIdProp`,d),x.useSyncedValues(b),x.useContextCallback(`onOpenChange`,a),x.useContextCallback(`onOpenChangeComplete`,o);let S=x.useState(`open`),C=x.useState(`mounted`),w=x.useState(`payload`);ve(x,S),pe(x);let{forceUnmount:T}=j(S,x);Y.useImperativeHandle(l,()=>({unmount:T,close:()=>x.setOpen(!1,Fe(se))}),[T,x]);let E=S||C;return(0,X.jsxs)(ff.Provider,{value:x,children:[u&&(0,X.jsx)(y,{handle:u,store:x}),E&&(0,X.jsx)(Sf,{store:x,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:w}):n]})}function kf(e){return Of(`dialog`,e)}var Af=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,...o}=e,c=vf(),l=pf(),u=l.useState(`open`),d=l.useState(`nested`),f=l.useState(`transitionStatus`),p=l.useState(`nestedOpenDialogCount`),m=l.useState(`mounted`),h=l.useStateSetter(`viewportElement`);return s(`div`,e,{enabled:c||m,state:{open:u,nested:d,transitionStatus:f,nestedDialogOpen:p>0},ref:[t,h],stateAttributesMapping:yf,props:[{role:`presentation`,hidden:!m,style:{pointerEvents:u?void 0:`none`},children:a},o]})}),jf=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,c=pf(),l=Me(a);return c.useSyncedValueWithCleanup(`titleElementId`,l),s(`h2`,e,{ref:t,props:[{id:l},o]})}),Mf=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:c,payload:l,handle:u,...d}=e,p=pf(!0),m=Tu(u)??p;if(!m)throw Error(f(79));let h=Me(c),g=m.useState(`floatingRootContext`),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`triggerPopupId`,h),y=Y.useRef(null),{registerTrigger:b,isMountedByThisTrigger:x}=en(h,y,m,{payload:l}),{getButtonProps:S,buttonRef:C}=St({disabled:a,native:o}),w=ll(g),T=Fd(()=>m.select(`open`),e=>{m.set(`openMethod`,e)}),E={disabled:a,open:_},D=m.useState(`triggerProps`,x);return s(`button`,e,{state:E,ref:[C,t,b,y],props:[w.reference,D,T,{[Ct]:``,id:h,"aria-haspopup":`dialog`,"aria-expanded":_,"aria-controls":v},d,S],stateAttributesMapping:jt})}),Nf=class extends mu{constructor(){super(Tf(),`Dialog`,!1)}open(e){this.openByTrigger(e)}openWithPayload(e){let t=this.attachedStore;t!==null&&(t.set(`payload`,e),t.setOpen(!0,Fe(se)))}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select(`open`)??!1}},Pf=Y.createContext(void 0);function Ff(){let e=Y.useContext(Pf);if(e===void 0)throw Error(f(53));return e}function If(e,t,n){if(!e)return 0;let r=getComputedStyle(e),i=`${t}${n===`x`?`Inline`:`Block`}`,a=parseFloat(r[`${i}Start`]);return n===`x`&&t===`margin`?a*2:a+parseFloat(r[`${i}End`])}var Lf=e=>t=>t?{[e]:``}:null,Rf={hasOverflowX:Lf(`data-has-overflow-x`),hasOverflowY:Lf(`data-has-overflow-y`),overflowXStart:Lf(`data-overflow-x-start`),overflowXEnd:Lf(`data-overflow-x-end`),overflowYStart:Lf(`data-overflow-y-start`),overflowYEnd:Lf(`data-overflow-y-end`),cornerHidden:()=>null},zf={x:0,y:0},Bf={width:0,height:0},Vf={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},Hf={x:!0,y:!0,corner:!0},Uf=Y.forwardRef(function(e,t){let{render:n,className:r,overflowEdgeThreshold:i,style:a,...o}=e,{xStart:c,xEnd:l,yStart:u,yEnd:d}=Wf(i),f=Me(),p=q(),m=q(),{nonce:h,disableStyleElements:g}=Dt(),[_,v]=Y.useState(!1),[y,b]=Y.useState(!1),[x,S]=Y.useState(!1),[C,w]=Y.useState(!1),[T,E]=Y.useState(!1),[D,O]=Y.useState(Bf),[k,A]=Y.useState(Bf),[j,M]=Y.useState(Vf),[N,P]=Y.useState(Hf),F=Y.useRef(null),I=Y.useRef(null),L=Y.useRef(null),R=Y.useRef(null),z=Y.useRef(null),B=Y.useRef(null),V=Y.useRef(null),ee=Y.useRef(null),H=Y.useRef(0),U=Y.useRef(0),W=Y.useRef(0),te=Y.useRef(0),ne=Y.useRef(`vertical`),re=Y.useRef(zf),ie=Y.useRef(null);function ae(e){let t=e?S:b,n=e?p:m;t(!0),n.start(500,()=>{t(!1)})}let oe=J(e=>{let t=e.x-re.current.x,n=e.y-re.current.y;re.current=e,n!==0&&ae(!0),t!==0&&ae(!1)}),se=J(()=>{let e=I.current;e&&ie.current===null&&(ie.current=e.style.scrollSnapType,e.style.scrollSnapType=`none`)}),le=J(e=>{if(e.button!==0||ee.current!==null&&(ne.current===`vertical`?z.current:B.current)?.hasPointerCapture(ee.current))return;ee.current=e.pointerId,H.current=e.clientY,U.current=e.clientX,ne.current=e.currentTarget.getAttribute(`data-orientation`);let t=I.current;t&&(W.current=t.scrollTop,te.current=t.scrollLeft,se()),(ne.current===`vertical`?z.current:B.current)?.setPointerCapture(e.pointerId)}),G=J(e=>{if(e.pointerId!==ee.current)return;ee.current=null,(ne.current===`vertical`?S:b)(!1),ie.current!==null&&(I.current&&(I.current.style.scrollSnapType=ie.current),ie.current=null);let t=ne.current===`vertical`?z.current:B.current;t?.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId)}),ue=J(e=>{if(e.pointerId!==ee.current)return;if(e.buttons%2==0){G(e);return}let t=I.current;if(!t)return;let n=ne.current===`vertical`,r=n?z.current:B.current,i=n?L.current:R.current;if(!r||!i)return;let a=n?`y`:`x`,o=If(i,`padding`,a),s=If(r,`margin`,a),c=n?r.offsetHeight:r.offsetWidth,l=(n?i.offsetHeight:i.offsetWidth)-c-o-s,u=n?e.clientY-H.current:e.clientX-U.current,d=l<=0?0:u/l,f=n?t.scrollHeight:t.scrollWidth,p=n?t.clientHeight:t.clientWidth,m=(n?W.current:te.current)+d*(f-p);n?t.scrollTop=m:t.scrollLeft=m,e.preventDefault(),ae(n)});function de(e){w(e.pointerType===`touch`)}function fe(e){if(de(e),e.pointerType!==`touch`){let t=ce(F.current,e.target);v(t)}}let pe=Y.useMemo(()=>({scrolling:y||x,hasOverflowX:!N.x,hasOverflowY:!N.y,overflowXStart:j.xStart,overflowXEnd:j.xEnd,overflowYStart:j.yStart,overflowYEnd:j.yEnd,cornerHidden:N.corner}),[y,x,N.x,N.y,N.corner,j]),me={role:`presentation`,onPointerEnter:fe,onPointerMove:fe,onPointerDown:de,onPointerLeave(){v(!1)},style:{position:`relative`,"--scroll-area-corner-height":`${D.height}px`,"--scroll-area-corner-width":`${D.width}px`}},he=s(`div`,e,{state:pe,ref:[t,F],props:[me,o],stateAttributesMapping:Rf}),ge=Y.useMemo(()=>({handlePointerDown:le,handlePointerMove:ue,handlePointerUp:G,handleScroll:oe,disableViewportSnap:se,cornerSize:D,setCornerSize:O,thumbSize:k,setThumbSize:A,hasMeasuredScrollbar:T,setHasMeasuredScrollbar:E,touchModality:C,cornerRef:V,scrollingX:y,scrollingY:x,hovering:_,setHovering:v,viewportRef:I,scrollbarYRef:L,scrollbarXRef:R,thumbYRef:z,thumbXRef:B,rootId:f,hiddenState:N,setHiddenState:P,overflowEdges:j,setOverflowEdges:M,viewportState:pe,overflowEdgeThreshold:{xStart:c,xEnd:l,yStart:u,yEnd:d}}),[le,ue,G,oe,se,D,k,T,C,y,x,_,f,N,j,pe,c,l,u,d]);return(0,X.jsxs)(Pf.Provider,{value:ge,children:[!g&&vt.getElement(h),he]})});function Wf(e){let t=typeof e==`number`?{xStart:e,xEnd:e,yStart:e,yEnd:e}:e;return{xStart:Math.max(0,t?.xStart||0),xEnd:Math.max(0,t?.xEnd||0),yStart:Math.max(0,t?.yStart||0),yEnd:Math.max(0,t?.yEnd||0)}}var Gf=Y.createContext(void 0),Kf=[`--scroll-area-overflow-x-start`,`--scroll-area-overflow-x-end`,`--scroll-area-overflow-y-start`,`--scroll-area-overflow-y-end`],qf=!1;function Jf(){qf||v||(typeof CSS<`u`&&`registerProperty`in CSS&&Kf.forEach(e=>{try{CSS.registerProperty({name:e,syntax:`<length>`,inherits:!1,initialValue:`0px`})}catch{}}),qf=!0)}var Yf=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{viewportRef:o,scrollbarYRef:c,scrollbarXRef:l,thumbYRef:u,thumbXRef:d,cornerRef:f,cornerSize:p,setCornerSize:m,setThumbSize:h,rootId:g,setHiddenState:_,hiddenState:v,setHasMeasuredScrollbar:y,handleScroll:b,touchModality:x,setHovering:S,setOverflowEdges:C,overflowEdgeThreshold:w,viewportState:T}=Ff(),E=Re(),D=Y.useRef(!0),O=Y.useRef([NaN,NaN,NaN,NaN]),k=q(),A=q(),j=J(()=>{let e=o.current,t=c.current,n=l.current,r=u.current,i=d.current,a=f.current;if(!e)return;let s=e.scrollHeight,g=e.scrollWidth,v=e.clientHeight,b=e.clientWidth,x=e.scrollTop,S=e.scrollLeft,T=O.current,D=Number.isNaN(T[0]);if(T[0]=v,T[1]=s,T[2]=b,T[3]=g,D&&y(!0),s===0||g===0)return;let k=Xf(e),A=k.y,j=k.x,M=b/g,N=v/s,P=Math.max(0,g-b),F=Math.max(0,s-v),I=0,L=0;j||(I=qe(E===`rtl`?-S:S,P),L=P-I);let R=A?0:qe(x,F),z=A?0:F-R,B=j?0:b,V=A?0:v,ee=0,H=0;!j&&!A&&(ee=t?.offsetWidth||0,H=n?.offsetHeight||0);let U=p.width===0&&p.height===0,W=U?ee:0,te=U?H:0,ne=If(n,`padding`,`x`),re=If(t,`padding`,`y`),ie=If(i,`margin`,`x`),ae=If(r,`margin`,`y`),oe=B-ne-ie,se=V-re-ae,ce=n?Math.min(n.offsetWidth-W,oe):oe,le=t?Math.min(t.offsetHeight-te,se):se,G=Math.max(16,ce*M),ue=Math.max(16,le*N);if(h(e=>Zf(e,{width:G,height:ue})),t&&r){let e=Qf(r,`--scroll-area-thumb-height`,x,F,s,ue,t.offsetHeight-ue-re-ae);r.style.transform=`translate3d(0,${e}px,0)`}if(n&&i){let e=n.offsetWidth-G-ne-ie,t=Qf(i,`--scroll-area-thumb-width`,E===`rtl`?-S:S,P,g,G,e);i.style.transform=`translate3d(${E===`rtl`?-t:t}px,0,0)`}let de=[I,L,R,z];Kf.forEach((t,n)=>{e.style.setProperty(t,`${de[n]}px`)}),a&&m(e=>Zf(e,{width:ee,height:H})),_(e=>Zf(e,k));let fe={xStart:!j&&I>w.xStart,xEnd:!j&&L>w.xEnd,yStart:!A&&R>w.yStart,yEnd:!A&&z>w.yEnd};C(e=>Zf(e,fe))});Lt(()=>{Jf()},[]),Lt(()=>{queueMicrotask(j)},[j,v,E,w.xStart,w.xEnd,w.yStart,w.yEnd]),Lt(()=>{o.current?.matches(`:hover`)&&S(!0)},[o,S]),Lt(()=>{let e=o.current;if(typeof ResizeObserver>`u`||!e)return;let t=!1,n=new ResizeObserver(()=>{if(!t){t=!0;let n=O.current;if(n[0]===e.clientHeight&&n[1]===e.scrollHeight&&n[2]===e.clientWidth&&n[3]===e.scrollWidth)return}j()});return n.observe(e),A.start(0,()=>{let t=e.getAnimations({subtree:!0});t.length!==0&&Promise.allSettled(t.map(e=>e.finished)).then(j).catch(()=>{})}),()=>{n.disconnect(),A.clear()}},[j,o,A]);function M(){D.current=!1}let N={role:`presentation`,...g&&{"data-id":`${g}-viewport`},tabIndex:v.x&&v.y?-1:0,className:vt.className,style:{overflow:`scroll`},onScroll(){o.current&&(j(),(x||!D.current)&&b({x:o.current.scrollLeft,y:o.current.scrollTop}),k.start(100,()=>{D.current=!0}))},onWheel:M,onPointerMove:M,onPointerEnter:M,onKeyDown:M},P=s(`div`,e,{ref:[t,o],state:T,props:[N,a],stateAttributesMapping:Rf}),F=Y.useMemo(()=>({computeThumbPosition:j}),[j]);return(0,X.jsx)(Gf.Provider,{value:F,children:P})});function Xf(e){let t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function Zf(e,t){for(let n in t)if(e[n]!==t[n])return t;return e}function Qf(e,t,n,r,i,a,o){let s=Qe(n,0,r),c=n-s,l=Math.max(16,a*i/(i+Math.abs(c)));return e.style.setProperty(t,c?`${l}px`:``),(r?s/r*o:0)+(c>0?a-l:0)}var $f=Y.createContext(void 0);function ep(){let e=Y.useContext($f);if(e===void 0)throw Error(f(54));return e}var tp=Y.forwardRef(function(e,t){let{render:n,className:r,orientation:i=`vertical`,keepMounted:a=!1,style:o,...c}=e,{hovering:l,scrollingX:u,scrollingY:d,hiddenState:f,scrollbarYRef:p,scrollbarXRef:m,viewportRef:h,thumbYRef:g,thumbXRef:_,handlePointerDown:v,handlePointerUp:y,handleScroll:b,disableViewportSnap:x,rootId:S,thumbSize:C,hasMeasuredScrollbar:w,viewportState:T}=Ff(),E=i===`vertical`,D={...T,hovering:l,scrolling:E?d:u,orientation:i},O=Re(),k=!w&&!a,A=E?f.y:f.x,j=a||!A;Y.useEffect(()=>{if(!j)return;let e=h.current,t=E?p.current:m.current;if(!t)return;function n(t){if(!e||t.ctrlKey)return;let n=!E,r=n?`scrollLeft`:`scrollTop`,i=n?t.deltaX:t.deltaY;if(i===0)return;let a=n?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight,o=n&&O===`rtl`?-a:0,s=n&&O===`rtl`?0:a,c=e[r];c<=o&&i<0||c>=s&&i>0||(t.preventDefault(),e[r]=Math.min(s,Math.max(o,c+i)),b({x:e.scrollLeft,y:e.scrollTop}))}return Yt(t,`wheel`,n,{passive:!1})},[O,b,E,m,p,j,h]);let M={...S&&{"data-id":`${S}-scrollbar`},onPointerDown(e){if(e.button!==0)return;let t=G(e.nativeEvent),n=E?g.current:_.current;if(n&&ce(n,t))return;let r=h.current;if(!r)return;let i=E?p.current:m.current;if(!n||!i)return;let a=E?`y`:`x`,o=If(n,`margin`,a),s=If(i,`padding`,a),c=E?n.offsetHeight:n.offsetWidth,l=i.getBoundingClientRect(),u=E?e.clientY-l.top-c/2-s+o/2:e.clientX-l.left-c/2-s+o/2,d=E?r.scrollHeight:r.scrollWidth,f=E?r.clientHeight:r.clientWidth,y=(E?i.offsetHeight:i.offsetWidth)-c-s-o;if(y<=0)return;let S=u/y,C=d-f;x(),E?r.scrollTop=S*C:r.scrollLeft=O===`rtl`?-(1-S)*C:S*C,b({x:r.scrollLeft,y:r.scrollTop}),v(e)},onPointerUp:y,onPointerCancel:y,style:{position:`absolute`,touchAction:`none`,WebkitUserSelect:`none`,userSelect:`none`,visibility:k?`hidden`:void 0,...E?{top:0,bottom:`var(--scroll-area-corner-height)`,insetInlineEnd:0,"--scroll-area-thumb-height":`${C.height}px`}:{insetInlineStart:0,insetInlineEnd:`var(--scroll-area-corner-width)`,bottom:0,"--scroll-area-thumb-width":`${C.width}px`}}},N=s(`div`,e,{ref:[t,E?p:m],state:D,props:[M,c],stateAttributesMapping:Rf});return j?(0,X.jsx)($f.Provider,{value:i,children:N}):null}),np=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{thumbYRef:o,thumbXRef:c,handlePointerDown:l,handlePointerMove:u,handlePointerUp:d,scrollingX:f,scrollingY:p,hasMeasuredScrollbar:m}=Ff(),h=ep(),g=h===`vertical`;return s(`div`,e,{ref:[t,g?o:c],state:{scrolling:g?p:f,orientation:h},props:[{onPointerDown:l,onPointerMove:u,onPointerUp:d,onPointerCancel:d,style:{visibility:m?void 0:`hidden`,...g?{height:`var(--scroll-area-thumb-height)`}:{width:`var(--scroll-area-thumb-width)`}}},a]})}),rp=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{cornerRef:o,cornerSize:c,hiddenState:l}=Ff(),u=s(`div`,e,{ref:[t,o],props:[{style:{position:`absolute`,bottom:0,insetInlineEnd:0,width:c.width,height:c.height}},a]});return l.corner?null:u});function ip({className:e,children:t,scrollFade:n=!1,scrollbarGutter:r=!1,hideScrollbars:i=!1,chainVerticalScroll:a=!1,...o}){return(0,X.jsxs)(Uf,{className:l(`relative size-full min-h-0 overflow-hidden rounded-[inherit]`,e),...o,children:[(0,X.jsx)(Yf,{className:l(`h-full max-h-[inherit] overflow-auto overscroll-contain rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background data-has-overflow-x:overscroll-x-contain`,a&&`overscroll-y-auto`,n&&`mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]`,r&&`scrollbar-gutter-stable`,i&&`[-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`),"data-slot":`scroll-area-viewport`,children:t}),!i&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ap,{orientation:`vertical`}),(0,X.jsx)(ap,{orientation:`horizontal`}),(0,X.jsx)(rp,{"data-slot":`scroll-area-corner`})]})]})}function ap({className:e,orientation:t=`vertical`,...n}){return(0,X.jsx)(tp,{className:l(`m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100`,e),"data-slot":`scroll-area-scrollbar`,orientation:t,...n,children:(0,X.jsx)(np,{className:`relative flex-1 rounded-full bg-foreground/20`,"data-slot":`scroll-area-thumb`})})}var op=kf,sp=xf;function cp(e){return(0,X.jsx)(Mf,{"data-slot":`sheet-trigger`,...e})}function lp({className:e,...t}){return(0,X.jsx)(mf,{className:l(`fixed inset-0 z-50 bg-background/60 backdrop-blur-xs transition-all duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0`,e),"data-slot":`sheet-backdrop`,...t})}function up({className:e,side:t,variant:n=`default`,...r}){return(0,X.jsx)(Af,{className:l(`fixed inset-0 z-50 grid`,t===`bottom`&&`grid grid-rows-[1fr_auto] pt-12`,t===`top`&&`grid grid-rows-[auto_1fr] pb-12`,t===`left`&&`flex justify-start`,t===`right`&&`flex justify-end`,n===`inset`&&`sm:p-4`,e),"data-slot":`sheet-viewport`,...r})}function dp({className:e,children:t,showCloseButton:n=!0,keepMounted:r=!1,side:i=`right`,variant:a=`default`,...o}){return(0,X.jsxs)(sp,{keepMounted:r,children:[(0,X.jsx)(lp,{}),(0,X.jsx)(up,{side:i,variant:a,children:(0,X.jsxs)(bf,{className:l(`relative flex max-h-full min-h-0 w-full min-w-0 flex-col bg-popover not-dark:bg-clip-padding text-popover-foreground shadow-lg/5 transition-[opacity,translate] duration-200 ease-in-out will-change-transform before:pointer-events-none before:absolute before:inset-0 before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:opacity-0 data-starting-style:opacity-0 max-sm:before:hidden dark:before:shadow-[0_-1px_--theme(--color-white/6%)]`,i===`bottom`&&`row-start-2 border-t data-ending-style:translate-y-8 data-starting-style:translate-y-8`,i===`top`&&`data-ending-style:-translate-y-8 data-starting-style:-translate-y-8 border-b`,i===`left`&&`data-ending-style:-translate-x-8 data-starting-style:-translate-x-8 w-[calc(100%-(--spacing(12)))] max-w-md border-e`,i===`right`&&`col-start-2 w-[calc(100%-(--spacing(12)))] max-w-md border-s data-ending-style:translate-x-8 data-starting-style:translate-x-8`,a===`inset`&&`before:hidden sm:rounded-2xl sm:border sm:before:rounded-[calc(var(--radius-2xl)-1px)] sm:**:data-[slot=sheet-footer]:rounded-b-[calc(var(--radius-2xl)-1px)]`,e),"data-slot":`sheet-popup`,...o,children:[t,n&&(0,X.jsx)(hf,{"aria-label":`Close`,className:`absolute end-2 top-2`,render:(0,X.jsx)(m,{size:`icon`,variant:`ghost`}),children:(0,X.jsx)(Ri,{})})]})})]})}function fp({className:e,...t}){return(0,X.jsx)(jf,{className:l(`font-heading font-semibold text-xl leading-none`,e),"data-slot":`sheet-title`,...t})}function pp(){return typeof window>`u`?!1:window.matchMedia(`(max-width: 767px)`).matches}function mp(){let[e,t]=Y.useState(pp);return Y.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>t(e.matches);return n(),e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[]),e}function hp({workspaces:e}){let t=(0,Y.useRef)(null),n=(0,Y.useRef)(null),r=bo(),[i,a]=(0,Y.useState)(``),[o,s]=(0,Y.useState)(0),c=[{title:`Start work`,detail:`Create a workspace`,route:`/new`},{title:`Overview`,detail:`Your workspace home`,route:`/overview`},...e.map(e=>({title:e.branchName,detail:`${e.repos.length} repositories · ${e.description||`Open workspace`}`,route:`/workspaces/${encodeURIComponent(e.branchName)}`})),{title:`Projects`,detail:`Manage repositories`,route:`/projects`},{title:`Workrooms`,detail:`Collaborate with your team`,route:`/workrooms`},{title:`Resource Library`,detail:`Skills and agents`,route:`/skills`},{title:`Settings`,detail:`Make this space yours`,route:`/settings`}].filter(e=>`${e.title} ${e.detail}`.toLowerCase().includes(i.trim().toLowerCase())),l=Math.min(o,Math.max(c.length-1,0));function u(){a(``),s(0),t.current?.showModal(),n.current?.focus()}function d(e){t.current?.close(),r(e)}return(0,Y.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),t.current?.open?t.current.close():u())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,Y.useEffect)(()=>{t.current?.open&&document.getElementById(`quick-result-${l}`)?.scrollIntoView({block:`nearest`})},[l]),(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`button`,{type:`button`,onClick:u,className:`mx-2.5 my-2 flex h-9 items-center gap-2 rounded-lg border border-input bg-background/60 px-2.5 text-xs text-muted-foreground transition-colors hover:border-primary/50 hover:text-foreground`,"aria-label":`Search and jump to a workspace`,"aria-keyshortcuts":`Control+k Meta+k`,children:[(0,X.jsx)(Ei,{size:14}),(0,X.jsx)(`span`,{children:`Jump to…`}),(0,X.jsx)(`kbd`,{className:`ml-auto rounded border border-border px-1 text-[10px]`,children:`⌘ / Ctrl K`})]}),(0,X.jsxs)(`dialog`,{ref:t,"aria-labelledby":`quick-switch-title`,className:`context-switch m-auto w-[min(560px,calc(100vw-32px))] overflow-hidden rounded-2xl border border-border bg-popover p-0 text-popover-foreground shadow-2xl`,onClick:e=>{if(e.target===t.current){let n=e.currentTarget.getBoundingClientRect();(e.clientX<n.left||e.clientX>n.right||e.clientY<n.top||e.clientY>n.bottom)&&t.current.close()}},children:[(0,X.jsx)(`h2`,{id:`quick-switch-title`,className:`sr-only`,children:`Jump to a workspace or page`}),(0,X.jsxs)(`div`,{className:`flex items-center gap-3 border-b border-border px-5`,children:[(0,X.jsx)(Ei,{size:18,className:`text-primary`}),(0,X.jsx)(`input`,{ref:n,value:i,onChange:e=>{a(e.target.value),s(0)},onKeyDown:e=>{(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),s(c.length?(l+(e.key===`ArrowDown`?1:-1)+c.length)%c.length:0)),e.key===`Enter`&&c[l]&&(e.preventDefault(),d(c[l].route))},role:`combobox`,"aria-expanded":`true`,"aria-controls":`quick-results`,"aria-autocomplete":`list`,"aria-activedescendant":c[l]?`quick-result-${l}`:void 0,"aria-label":`Search pages and workspaces`,placeholder:`Where do you want to go?`,className:`h-16 min-w-0 flex-1 bg-transparent text-sm outline-none`}),(0,X.jsx)(`button`,{onClick:()=>t.current?.close(),"aria-label":`Close search`,className:`rounded p-1 text-muted-foreground hover:bg-accent`,children:(0,X.jsx)(Ri,{size:17})})]}),(0,X.jsxs)(`div`,{id:`quick-results`,role:`listbox`,"aria-label":`Destinations`,className:`max-h-[min(400px,60vh)] overflow-y-auto p-2`,children:[c.map((e,t)=>(0,X.jsxs)(`div`,{id:`quick-result-${t}`,role:`option`,"aria-selected":t===l,onMouseMove:()=>s(t),onClick:()=>d(e.route),className:`flex cursor-pointer items-center gap-3 rounded-lg p-3 ${t===l?`bg-accent text-accent-foreground`:``}`,children:[(0,X.jsx)(ui,{size:17,className:`shrink-0 text-primary`}),(0,X.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,X.jsx)(`div`,{className:`truncate text-sm font-medium`,children:e.title}),(0,X.jsx)(`div`,{className:`mt-0.5 truncate text-xs text-muted-foreground`,children:e.detail})]}),(0,X.jsx)(Qr,{size:14})]},e.route)),!c.length&&(0,X.jsx)(`p`,{className:`p-8 text-center text-sm text-muted-foreground`,children:`No results. Try a workspace name or “Settings”.`})]}),(0,X.jsx)(`div`,{className:`border-t border-border px-5 py-3 text-[10px] text-muted-foreground`,children:`↑ ↓ to navigate · Enter to open · Esc to close`})]})]})}var gp=(0,Y.createContext)({theme:`dark`,setTheme:()=>{},colorTheme:`sunset`,setColorTheme:()=>{}});function _p(){try{let e=localStorage.getItem(xn)||localStorage.getItem(dn);if(e===`light`||e===`dark`)return e}catch{}return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function vp(){try{return localStorage.getItem(on)===`aurora`?`aurora`:`sunset`}catch{return`sunset`}}function yp({children:e}){let[t,n]=(0,Y.useState)(_p),[r,i]=(0,Y.useState)(vp);(0,Y.useEffect)(()=>{let e=document.documentElement;e.classList.add(`no-transitions`),e.classList.toggle(`dark`,t===`dark`),e.dataset.colorTheme=r;let n=document.querySelector(`link[rel="icon"]`);n&&(n.href=r===`aurora`?`/favicon-aurora.svg`:`/favicon.svg`);let i=requestAnimationFrame(()=>e.classList.remove(`no-transitions`));return()=>{cancelAnimationFrame(i),e.classList.remove(`no-transitions`)}},[t,r]);let a=(0,Y.useCallback)(e=>{try{localStorage.setItem(xn,e)}catch{}n(e)},[]),o=(0,Y.useCallback)(e=>{try{localStorage.setItem(on,e)}catch{}i(e)},[]);return(0,X.jsx)(gp.Provider,{value:{theme:t,setTheme:a,colorTheme:r,setColorTheme:o},children:e})}function bp(){return(0,Y.useContext)(gp)}var xp={isOpen:!1,isMinimized:!1,isMaximized:!1,openTabs:[],activeTab:null,position:null,size:{width:560,height:680}};function Sp(){try{let e=localStorage.getItem(cn)??localStorage.getItem(mn);if(!e)return xp;let t=JSON.parse(e);return{isOpen:typeof t.isOpen==`boolean`?t.isOpen:xp.isOpen,isMinimized:typeof t.isMinimized==`boolean`?t.isMinimized:xp.isMinimized,isMaximized:typeof t.isMaximized==`boolean`?t.isMaximized:xp.isMaximized,openTabs:Array.isArray(t.openTabs)?t.openTabs.filter(e=>typeof e==`string`):[],activeTab:typeof t.activeTab==`string`?t.activeTab:null,position:t.position&&typeof t.position.x==`number`&&typeof t.position.y==`number`?{x:t.position.x,y:t.position.y}:null,size:t.size&&typeof t.size.width==`number`&&typeof t.size.height==`number`?{width:Math.max(380,Math.min(t.size.width,window.innerWidth||1200)),height:Math.max(420,Math.min(t.size.height,window.innerHeight||900))}:xp.size}}catch{return xp}}var Cp=Sp(),wp=new Set;function Tp(){try{localStorage.setItem(cn,JSON.stringify(Cp))}catch{}for(let e of wp)e()}function Ep(e){Cp=e(Cp),Tp()}var Dp={getState:()=>Cp,subscribe:e=>(wp.add(e),()=>wp.delete(e)),open:e=>{Ep(t=>{let n=[...t.openTabs],r=t.activeTab;return e?(n.includes(e)||n.push(e),r=e):!r&&n.length>0&&(r=n[0]),{...t,isOpen:!0,isMinimized:!1,openTabs:n,activeTab:r}})},close:()=>{Ep(e=>({...e,isOpen:!1,isMinimized:!1}))},minimize:()=>{Ep(e=>({...e,isMinimized:!0}))},restore:()=>{Ep(e=>({...e,isOpen:!0,isMinimized:!1}))},toggleMaximize:()=>{Ep(e=>({...e,isMaximized:!e.isMaximized,isMinimized:!1}))},addTab:e=>{Ep(t=>{let n=t.openTabs.includes(e)?t.openTabs:[...t.openTabs,e];return{...t,isOpen:!0,isMinimized:!1,openTabs:n,activeTab:e}})},removeTab:e=>{Ep(t=>{let n=t.openTabs.filter(t=>t!==e),r=t.activeTab;return r===e&&(r=n.length>0?n[n.length-1]:null),{...t,openTabs:n,activeTab:r,isOpen:n.length>0&&t.isOpen}})},setActiveTab:e=>{Ep(t=>t.openTabs.includes(e)?{...t,activeTab:e,isMinimized:!1}:t)},setPosition:e=>{Ep(t=>({...t,position:e}))},setSize:e=>{Ep(t=>({...t,size:{width:Math.max(380,Math.min(e.width,window.innerWidth||1200)),height:Math.max(420,Math.min(e.height,window.innerHeight||900))}}))}};function Op(){return{...(0,Y.useSyncExternalStore)(Dp.subscribe,Dp.getState,()=>xp),...Dp}}var kp=[{label:`Projects`,to:`/projects`,icon:ui,match:e=>e.startsWith(`/projects`)},{label:`Workrooms`,to:`/workrooms`,icon:Ii,match:e=>e.startsWith(`/workrooms`)},{label:`Resource Library`,to:`/skills`,icon:ni,match:e=>e.startsWith(`/skills`)||e.startsWith(`/agents`)},{label:`Strategies`,to:`/workflows`,icon:Li,match:e=>e.startsWith(`/workflows`)||e.startsWith(`/strategies`)},{label:`Settings`,to:`/settings`,icon:Oi,match:e=>e.startsWith(`/settings`)}];function Ap({appVersion:e,workspaces:t=[],workspaceStatuses:n={},workspacesLoading:r=!1,activeWsId:i=null,onSelectWorkspace:a}){let{pathname:o}=_o(),{theme:s,setTheme:c,colorTheme:u,setColorTheme:d}=bp(),{open:f}=Op(),[p,m]=(0,Y.useState)(``),[h,g]=(0,Y.useState)(`created-desc`),_=(0,Y.useMemo)(()=>{let e=t,r=p.trim().toLowerCase();return r&&(e=e.filter(e=>`${e.branchName} ${e.description}`.toLowerCase().includes(r))),[...e].sort((e,t)=>{switch(h){case`created-desc`:{let n=new Date(e.createdAt||0).getTime();return new Date(t.createdAt||0).getTime()-n}case`created-asc`:return new Date(e.createdAt||0).getTime()-new Date(t.createdAt||0).getTime();case`changes-desc`:{let r=n[e.branchName]?.changedFiles||0;return(n[t.branchName]?.changedFiles||0)-r}case`repos-desc`:return(t.repos?.length||0)-(e.repos?.length||0);case`name-asc`:return e.branchName.localeCompare(t.branchName);default:return 0}})},[t,p,h,n]),[v,y]=(0,Y.useState)(!0),b=e=>l(`flex items-center gap-2 rounded-md px-2 py-1.5 text-xs font-medium transition-colors cursor-pointer`,e?`bg-primary/10 text-primary font-semibold`:`text-muted-foreground hover:bg-accent hover:text-foreground`);return(0,X.jsxs)(`aside`,{className:`context-sidebar flex w-64 shrink-0 flex-col border-r border-border bg-card/60 select-none h-screen overflow-hidden`,children:[(0,X.jsxs)(`div`,{className:`flex h-12 items-center justify-between px-3 border-b border-border/60`,children:[(0,X.jsxs)(Ns,{to:`/overview`,className:`flex items-center gap-2.5 group`,children:[(0,X.jsx)(_c,{size:24,className:`rounded-md shadow-xs transition-transform duration-200 group-hover:scale-105`}),(0,X.jsx)(`span`,{className:`text-xs font-bold tracking-tight text-foreground group-hover:text-primary transition-colors`,children:vn})]}),(0,X.jsxs)(`span`,{className:`text-[10px] font-mono text-muted-foreground/70`,children:[`v`,e]})]}),(0,X.jsx)(hp,{workspaces:t}),(0,X.jsxs)(`div`,{className:`p-2.5 pb-1 space-y-1.5`,children:[(0,X.jsxs)(Ps,{to:`/overview`,className:({isActive:e})=>l(`flex h-7.5 items-center gap-2 rounded-md px-2.5 text-xs font-medium transition-colors cursor-pointer`,e||o===`/`?`bg-primary/10 text-primary font-semibold`:`text-muted-foreground hover:bg-accent/60 hover:text-foreground`),children:[(0,X.jsx)(Zr,{size:13,className:`shrink-0 text-primary`}),(0,X.jsx)(`span`,{children:`Overview`})]}),(0,X.jsxs)(Ns,{to:`/new`,className:`flex h-8 w-full cursor-pointer items-center justify-center gap-1.5 rounded-md bg-primary px-3 text-xs font-semibold text-primary-foreground shadow-xs transition-colors hover:bg-primary/90`,children:[(0,X.jsx)(Ci,{size:14}),(0,X.jsx)(`span`,{children:`Start work`})]})]}),(0,X.jsxs)(`div`,{className:`flex flex-1 flex-col overflow-hidden px-2`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between px-1 py-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,X.jsx)(`span`,{children:`Workspaces`}),(0,X.jsx)(`span`,{className:`rounded bg-muted/80 px-1 py-0.2 font-mono text-[10px] text-foreground`,children:_.length})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,X.jsxs)(`button`,{type:`button`,onClick:()=>f(),className:`flex items-center gap-1 text-[11px] normal-case font-medium text-muted-foreground hover:text-foreground cursor-pointer px-1.5 py-0.5 rounded hover:bg-muted/70 transition-colors`,title:`Open floating chat window with workspace tabs`,"aria-label":`Open floating chat window`,children:[(0,X.jsx)(ti,{size:12,className:`text-primary`}),(0,X.jsx)(`span`,{children:`Chat`})]}),(0,X.jsxs)(sf,{children:[(0,X.jsxs)(cf,{className:`flex items-center gap-1 text-[11px] normal-case font-medium text-muted-foreground hover:text-foreground cursor-pointer px-1.5 py-0.5 rounded hover:bg-muted/70 transition-colors`,children:[(0,X.jsx)($r,{size:11,className:`opacity-70`}),(0,X.jsx)(`span`,{children:{"created-desc":`Newest`,"created-asc":`Oldest`,"changes-desc":`Changes`,"name-asc":`A–Z`,"repos-desc":`Repos`}[h]}),(0,X.jsx)(rn,{size:10,className:`opacity-60`})]}),(0,X.jsxs)(lf,{align:`end`,className:`w-48`,children:[(0,X.jsx)(`div`,{className:`px-2 py-1 text-[10px] font-semibold text-muted-foreground uppercase tracking-wider`,children:`Order Workspaces By`}),(0,X.jsxs)(uf,{onClick:()=>g(`created-desc`),className:`flex items-center justify-between text-xs`,children:[(0,X.jsx)(`span`,{children:`Newest created`}),h===`created-desc`&&(0,X.jsx)(ri,{size:12,className:`text-primary`})]}),(0,X.jsxs)(uf,{onClick:()=>g(`created-asc`),className:`flex items-center justify-between text-xs`,children:[(0,X.jsx)(`span`,{children:`Oldest created`}),h===`created-asc`&&(0,X.jsx)(ri,{size:12,className:`text-primary`})]}),(0,X.jsxs)(uf,{onClick:()=>g(`changes-desc`),className:`flex items-center justify-between text-xs`,children:[(0,X.jsx)(`span`,{children:`Most changes`}),h===`changes-desc`&&(0,X.jsx)(ri,{size:12,className:`text-primary`})]}),(0,X.jsxs)(uf,{onClick:()=>g(`name-asc`),className:`flex items-center justify-between text-xs`,children:[(0,X.jsx)(`span`,{children:`Name (A–Z)`}),h===`name-asc`&&(0,X.jsx)(ri,{size:12,className:`text-primary`})]}),(0,X.jsxs)(uf,{onClick:()=>g(`repos-desc`),className:`flex items-center justify-between text-xs`,children:[(0,X.jsx)(`span`,{children:`Most repos`}),h===`repos-desc`&&(0,X.jsx)(ri,{size:12,className:`text-primary`})]})]})]})]})]}),(0,X.jsxs)(`div`,{className:`relative mb-2`,children:[(0,X.jsx)(Ei,{size:12,className:`pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground`}),(0,X.jsx)(`input`,{type:`text`,value:p,onChange:e=>m(e.target.value),"aria-label":`Filter sidebar workspaces`,placeholder:`Filter workspaces...`,className:`h-7 w-full rounded-md border border-border/80 bg-background/80 py-1 pl-6 pr-6 text-xs text-foreground placeholder:text-muted-foreground/70 focus:border-primary focus:outline-none`}),p&&(0,X.jsx)(`button`,{onClick:()=>m(``),"aria-label":`Clear filter`,className:`absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground text-[10px] cursor-pointer`,children:`✕`})]}),(0,X.jsx)(`div`,{className:`flex-1 overflow-y-auto space-y-1 pr-0.5`,children:r?(0,X.jsx)(`div`,{className:`space-y-1.5 py-1`,children:[1,2,3].map(e=>(0,X.jsx)(`div`,{className:`h-10 rounded-md bg-muted/40 animate-pulse`},e))}):_.length===0?(0,X.jsx)(`div`,{className:`py-6 text-center text-xs text-muted-foreground/80`,children:p?`No matches`:`No workspaces`}):_.map(e=>{let t=i===e.branchName,r=n[e.branchName],o=!!(r&&r.changedFiles>0),s=!!(r&&r.runningServices>0);return(0,X.jsxs)(Ns,{to:`/workspaces/${encodeURIComponent(e.branchName)}`,onClick:()=>a?.(e.branchName),className:l(`group flex flex-col gap-0.5 rounded-md px-2.5 py-1.5 text-xs transition-colors cursor-pointer border border-transparent`,t?`bg-accent text-foreground font-medium border-border/70 shadow-2xs`:`text-muted-foreground hover:bg-accent/50 hover:text-foreground`),children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-1.5 min-w-0`,children:[(0,X.jsx)(`span`,{className:`truncate font-mono tracking-tight font-medium text-foreground`,children:e.branchName}),(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:[r?.activeAssistants&&r.activeAssistants.length>0&&(0,X.jsx)(`div`,{className:`flex items-center gap-1`,children:r.activeAssistants.map(e=>(0,X.jsx)(`span`,{className:`inline-flex items-center justify-center size-3.5 opacity-75 group-hover:opacity-100 transition-opacity`,title:`Active session: ${e===`antigravity`?`Antigravity`:e===`claude`?`Claude`:e===`codex`?`Codex`:e===`cursor`?`Cursor`:`Copilot`}`,children:e===`antigravity`?(0,X.jsx)(gc,{className:`size-3`}):e===`claude`?(0,X.jsx)(mc,{className:`size-2.5 text-[#D97757]`}):e===`codex`?(0,X.jsx)(ac,{className:`size-2.5 text-foreground`}):e===`cursor`?(0,X.jsx)(pc,{className:`size-2.5 text-foreground`}):(0,X.jsx)(fc,{className:`size-2.5 text-blue-400`})},e))}),(0,X.jsx)(`button`,{type:`button`,onClick:t=>{t.preventDefault(),t.stopPropagation(),f(e.branchName)},className:`opacity-0 group-hover:opacity-100 p-0.5 rounded hover:bg-background/80 hover:text-primary transition-all text-muted-foreground cursor-pointer`,title:`Open ${e.branchName} in floating chat`,"aria-label":`Open ${e.branchName} in floating chat`,children:(0,X.jsx)(ti,{size:12})}),(0,X.jsx)(`span`,{className:l(`size-1.5 rounded-full shrink-0`,r?o?`bg-amber-500`:`bg-emerald-500`:`bg-muted-foreground/40`),title:r?o?`${r.changedFiles} uncommitted changes`:`Clean working directory`:`Status pending`})]})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2 text-[11px] text-muted-foreground/80 font-mono`,children:[(0,X.jsxs)(`span`,{children:[e.repos.length,` `,e.repos.length===1?`repo`:`repos`]}),o&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{children:`•`}),(0,X.jsxs)(`span`,{className:`text-amber-600 dark:text-amber-400 font-semibold`,children:[r.changedFiles,` chg`]})]}),s&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{children:`•`}),(0,X.jsxs)(`span`,{className:`text-emerald-600 dark:text-emerald-400 flex items-center gap-0.5 font-semibold`,children:[(0,X.jsx)(`span`,{className:`size-1 rounded-full bg-emerald-500 animate-pulse`}),r.runningServices,` svc`]})]})]})]},e.id)})})]}),(0,X.jsxs)(`div`,{className:`border-t border-border/60 p-2 flex flex-col gap-0.5`,children:[(0,X.jsxs)(`button`,{type:`button`,onClick:()=>y(e=>!e),className:`flex items-center justify-between w-full rounded-md px-2 py-1.5 text-xs font-medium text-muted-foreground hover:bg-accent hover:text-foreground transition-colors cursor-pointer`,"aria-expanded":v,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(Oi,{size:13,className:`text-muted-foreground/70`}),(0,X.jsx)(`span`,{children:`Tools & Library`})]}),(0,X.jsx)(rn,{size:12,className:l(`transition-transform duration-200 opacity-60`,v&&`rotate-180`)})]}),v&&(0,X.jsxs)(`div`,{className:`flex flex-col gap-0.5 pt-1 animate-fade-in`,children:[kp.map(e=>{let t=e.match(o),n=e.icon;return(0,X.jsxs)(Ps,{to:e.to,className:b(t),children:[(0,X.jsx)(n,{size:13}),(0,X.jsx)(`span`,{children:e.label})]},e.to)}),(0,X.jsxs)(Ps,{to:`/guide`,className:b(o.startsWith(`/guide`)),children:[(0,X.jsx)(ei,{size:13}),(0,X.jsx)(`span`,{children:`Getting Started`})]}),(0,X.jsxs)(`fieldset`,{className:`mx-1 my-2 rounded-lg border border-border p-2`,children:[(0,X.jsx)(`legend`,{className:`px-1 text-[10px] font-medium text-muted-foreground`,children:`Color theme`}),(0,X.jsx)(`div`,{className:`grid grid-cols-2 gap-1`,children:[`sunset`,`aurora`].map(e=>(0,X.jsxs)(`button`,{type:`button`,"aria-pressed":u===e,onClick:()=>d(e),className:l(`flex items-center justify-center gap-1.5 rounded-md px-1.5 py-2 text-[11px] transition-colors focus-visible:outline-2 focus-visible:outline-ring`,u===e?`bg-accent text-accent-foreground ring-1 ring-primary/40`:`text-muted-foreground hover:bg-accent`),children:[(0,X.jsx)(`span`,{"aria-hidden":`true`,className:l(`size-3 rounded-full`,e===`sunset`?`bg-gradient-to-br from-amber-300 via-orange-400 to-rose-500`:`bg-gradient-to-br from-teal-300 via-cyan-400 to-indigo-500`)}),e===`sunset`?`Sunset`:`Aurora`]},e))})]}),(0,X.jsxs)(`button`,{type:`button`,"aria-label":s===`dark`?`Switch to light theme`:`Switch to dark theme`,onClick:()=>c(s===`dark`?`light`:`dark`),className:`flex w-full cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:[s===`dark`?(0,X.jsx)(Ni,{size:13}):(0,X.jsx)(xi,{size:13}),(0,X.jsx)(`span`,{children:s===`dark`?`Light mode`:`Dark mode`})]})]})]})]})}function jp(e){let t=mp(),[n,r]=(0,Y.useState)(!1),i=_o();return(0,Y.useEffect)(()=>{r(!1)},[i.pathname]),t?(0,X.jsx)(`div`,{className:`fixed inset-x-0 top-0 z-40 flex h-12 items-center border-b border-border bg-card px-3 md:hidden`,children:(0,X.jsxs)(op,{open:n,onOpenChange:r,children:[(0,X.jsxs)(cp,{className:`inline-flex items-center gap-2 rounded-md px-2 py-2 text-sm font-medium`,"aria-label":`Open navigation`,children:[(0,X.jsx)(_i,{size:20}),` `,vn]}),(0,X.jsxs)(dp,{side:`left`,className:`w-72`,onClick:e=>{e.target.closest(`a`)&&r(!1)},children:[(0,X.jsx)(fp,{className:`sr-only`,children:`Navigation`}),(0,X.jsx)(Ap,{...e,onSelectWorkspace:t=>{e.onSelectWorkspace?.(t),r(!1)}})]})]})}):(0,X.jsx)(Ap,{...e})}function Mp({toasts:e,onDismiss:t}){return(0,X.jsx)(`div`,{className:`fixed bottom-5 right-5 z-[9999] flex flex-col gap-3 pointer-events-none max-w-md w-full`,children:e.map(e=>(0,X.jsxs)(`div`,{className:`pointer-events-auto flex items-start justify-between gap-3 rounded-xl border px-4 py-3 shadow-sm transition-all duration-300 animate-rise ${e.type===`success`?`border-success/32 bg-success/10 text-success-foreground`:e.type===`error`?`border-destructive/32 bg-destructive/10 text-destructive-foreground`:`border-info/32 bg-info/10 text-info-foreground`}`,children:[(0,X.jsxs)(`div`,{className:`flex items-start gap-2.5 text-xs font-semibold flex-1`,children:[e.type===`success`&&(0,X.jsx)(ri,{className:`mt-0.5 shrink-0 text-success`,size:16}),e.type===`error`&&(0,X.jsx)(ai,{className:`mt-0.5 shrink-0 text-destructive`,size:16}),e.type===`info`&&(0,X.jsx)(mi,{className:`mt-0.5 shrink-0 text-info`,size:16}),(0,X.jsx)(`span`,{className:`whitespace-pre-line text-left leading-relaxed`,children:e.message})]}),(0,X.jsx)(`button`,{onClick:()=>t(e.id),className:`mt-0.5 shrink-0 cursor-pointer text-muted-foreground transition-colors hover:text-foreground`,children:(0,X.jsx)(Ri,{size:14})})]},e.id))})}var Np,Pp;function Fp(e){return e.startsWith(`/api/workrooms/`)}async function Ip(){if(!Np){let e=fetch(`/api/workrooms/bootstrap`,{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:`{}`}).then(async t=>{let n=await t.json().catch(()=>null);if(!t.ok||!n||typeof n.token!=`string`)throw new Lp(n&&typeof n.error==`string`?n.error:`Could not establish the Workroom dashboard boundary.`,t.status);return Np===e&&(Pp=n.token),n.token}).catch(t=>{throw Np===e&&(Np=void 0,Pp=void 0),t});Np=e}return Np}var Lp=class extends Error{status;constructor(e,t){super(e),this.name=`ApiError`,this.status=t}};async function Rp(e,t){for(let n=0;n<2;n+=1){let r=Fp(e)&&e!==`/api/workrooms/bootstrap`?await Ip():void 0,i=await fetch(`${e}`,{credentials:`include`,...t,headers:{...t?.body?{"Content-Type":`application/json`}:{},...r?{[sn]:r,[un]:r}:{},...t?.headers}}),a=i.headers.get(`content-type`)?.includes(`application/json`)?await i.json().catch(()=>null):null,o=a&&typeof a.error==`string`&&a.error||`Request failed (${i.status})`;if(!i.ok&&n===0&&i.status===403&&Fp(e)&&o.includes(`same-origin dashboard bootstrap`)){Pp===r&&(Np=void 0,Pp=void 0);continue}if(!i.ok)throw new Lp(o,i.status);return a}throw new Lp(`Could not re-establish the Workroom dashboard boundary.`,403)}function zp(){return Jr({queryKey:[`config`],queryFn:()=>Rp(`/api/config`)})}function Bp(){return Jr({queryKey:[`workspaces`],queryFn:()=>Rp(`/api/workspaces`)})}function Vp(e={}){return Jr({queryKey:[`workspaces-status`],queryFn:()=>Rp(`/api/workspaces/status`),enabled:e.enabled??!0,refetchInterval:e.intervalMs??!1})}function Hp(){return Jr({queryKey:[`domain-packs`],queryFn:async()=>(await Rp(`/api/enterprise/domain-packs`))?.domainPacks??[]})}function Up(){let e=Dn();return Yr({mutationFn:e=>Rp(`/api/enterprise/domain-packs`,{method:`POST`,body:JSON.stringify(e)}),onSuccess:()=>{e.invalidateQueries({queryKey:[`domain-packs`]}),e.invalidateQueries({queryKey:[`workspace-domain-packs`]})}})}function Wp(){let e=Dn();return Yr({mutationFn:e=>Rp(`/api/enterprise/domain-packs/${encodeURIComponent(e.id)}`,{method:`PUT`,body:JSON.stringify(e)}),onSuccess:()=>{e.invalidateQueries({queryKey:[`domain-packs`]}),e.invalidateQueries({queryKey:[`workspace-domain-packs`]})}})}function Gp(){let e=Dn();return Yr({mutationFn:e=>Rp(`/api/enterprise/domain-packs/${encodeURIComponent(e)}`,{method:`DELETE`}),onSuccess:()=>{e.invalidateQueries({queryKey:[`domain-packs`]}),e.invalidateQueries({queryKey:[`workspace-domain-packs`]})}})}function Kp(){let e=Dn();return Yr({mutationFn:e=>Rp(`/api/workspace`,{method:`POST`,body:JSON.stringify(e)}),onSuccess:()=>{e.invalidateQueries({queryKey:[`workspaces`]}),e.invalidateQueries({queryKey:[`workspaces-status`]})}})}function qp(){return Jr({queryKey:[`projects`],queryFn:()=>Rp(`/api/projects`)})}function Jp(){let e=Dn();return Yr({mutationFn:e=>Rp(`/api/projects`,{method:`POST`,body:JSON.stringify(e)}),onSuccess:()=>e.invalidateQueries({queryKey:[`projects`]})})}function Yp(){let e=Dn();return Yr({mutationFn:({id:e,...t})=>Rp(`/api/projects/${encodeURIComponent(e)}`,{method:`PUT`,body:JSON.stringify(t)}),onSuccess:()=>e.invalidateQueries({queryKey:[`projects`]})})}function Xp(){let e=Dn();return Yr({mutationFn:e=>Rp(`/api/projects/${encodeURIComponent(e)}`,{method:`DELETE`}),onSuccess:()=>e.invalidateQueries({queryKey:[`projects`]})})}function Zp(){return Jr({queryKey:[`repos`],queryFn:()=>Rp(`/api/repos`)})}function Qp(e,t){return Jr({queryKey:[`repo-branches`,e],queryFn:()=>Rp(`/api/repos/branches?path=${encodeURIComponent(e)}`),enabled:t,staleTime:6e4})}function $p(e,t=!0){return Jr({queryKey:[`repos-freshness`,e],queryFn:()=>Rp(`/api/repos/freshness`,{method:`POST`,body:JSON.stringify({repos:e})}),enabled:t&&e.length>0,staleTime:3e4})}function em(){let e=Dn();return Yr({mutationFn:e=>Rp(`/api/repos/pull`,{method:`POST`,body:JSON.stringify(e)}),onSuccess:()=>{e.invalidateQueries({queryKey:[`repo-freshness`]}),e.invalidateQueries({queryKey:[`repos-freshness`]})}})}function tm(){let e=Dn();return Yr({mutationFn:e=>Rp(`/api/repos/new`,{method:`POST`,body:JSON.stringify({name:e})}),onSuccess:()=>e.invalidateQueries({queryKey:[`repos`]})})}function nm(){return Jr({queryKey:[`ai-detect`],queryFn:()=>Rp(`/api/ai-detect`),staleTime:6e4})}function rm(){return Jr({queryKey:[`editor-detect`],queryFn:()=>Rp(`/api/editor-detect`),staleTime:6e4})}function im(){return Jr({queryKey:[`workspace-launch-targets`],queryFn:()=>Rp(`/api/workspace-launch-targets`),staleTime:6e4})}function am(e,t){return Jr({queryKey:[`workspace-recent-sessions`,e],queryFn:async()=>{let t=new URLSearchParams({limit:`3`,desktopHandoffOnly:`true`});return(await Rp(`/api/workspace/${encodeURIComponent(e)}/sessions?${t}`)).sessions},enabled:t,staleTime:3e4})}function om(){return Jr({queryKey:[`workflow-templates`],queryFn:async()=>(await Rp(`/api/workflows/templates`)).templates})}function sm(e){return Jr({queryKey:[`workspace-services`,e],queryFn:()=>Rp(`/api/workspace/${encodeURIComponent(e)}/services`),enabled:!!e,refetchInterval:3e3,retry:1})}function cm(e){let t=Dn();return Yr({mutationFn:({action:t,service:n})=>{let r=`/api/workspace/${encodeURIComponent(e)}/services`;return Rp(n?`${r}/${encodeURIComponent(n)}/${t}`:`${r}/${t}`,{method:`POST`})},onSettled:()=>{t.invalidateQueries({queryKey:[`workspace-services`,e]}),t.invalidateQueries({queryKey:[`workspaces-status`]})}})}function lm(e){let t=Dn();return Yr({mutationFn:({action:t,id:n})=>Rp(`/api/workspace/${encodeURIComponent(e)}/orchestrators/${t}`,{method:`POST`,body:JSON.stringify({id:n})}),onSettled:()=>{t.invalidateQueries({queryKey:[`workspace-services`,e]}),t.invalidateQueries({queryKey:[`workspaces-status`]})}})}function um(){return Jr({queryKey:[`skill-categories`],queryFn:async()=>(await Rp(`/api/skills/categories`)).categories})}function dm(){let e=Dn();return Yr({mutationFn:e=>Rp(`/api/skills/categories`,{method:`POST`,body:JSON.stringify(e)}),onSuccess:()=>{e.invalidateQueries({queryKey:[`skill-categories`]}),e.invalidateQueries({queryKey:[`skills`]})}})}function fm(){let e=Dn();return Yr({mutationFn:e=>Rp(`/api/skills/categories/${encodeURIComponent(e)}`,{method:`DELETE`}),onSuccess:()=>{e.invalidateQueries({queryKey:[`skill-categories`]}),e.invalidateQueries({queryKey:[`skills`]})}})}function pm(e){return{queryKey:[`skills`,e],queryFn:()=>Rp(e?`/api/skills?workspace=${encodeURIComponent(e)}`:`/api/skills`)}}function mm(e){return Jr({...pm(e),select:e=>e.diagnostics??[]})}function hm(e){return Jr({...pm(e),select:e=>e.skills})}function gm(){let e=Dn();return Yr({mutationFn:e=>Rp(`/api/skills`,{method:`POST`,body:JSON.stringify(e)}),onSuccess:()=>{e.invalidateQueries({queryKey:[`skills`]}),e.invalidateQueries({queryKey:[`skill-categories`]}),e.invalidateQueries({queryKey:[`workspace-skills`]})}})}function _m(){let e=Dn();return Yr({mutationFn:e=>{let t=typeof e==`string`?e:e.id,n=typeof e==`string`?void 0:e.workspaceId;return Rp(n?`/api/skills/${encodeURIComponent(t)}?workspace=${encodeURIComponent(n)}`:`/api/skills/${encodeURIComponent(t)}`,{method:`DELETE`})},onSuccess:()=>{e.invalidateQueries({queryKey:[`skills`]}),e.invalidateQueries({queryKey:[`workspace-skills`]})}})}function vm(){return Jr({queryKey:[`codex-agents`],queryFn:async()=>(await Rp(`/api/agents`)).agents})}function ym(){let e=Dn();return Yr({mutationFn:e=>Rp(`/api/agents`,{method:`POST`,body:JSON.stringify(e)}),onSuccess:()=>e.invalidateQueries({queryKey:[`codex-agents`]})})}function bm(){let e=Dn();return Yr({mutationFn:({toml:e,category:t})=>Rp(`/api/agents/import`,{method:`POST`,body:JSON.stringify({toml:e,category:t})}),onSuccess:()=>e.invalidateQueries({queryKey:[`codex-agents`]})})}function xm(){let e=Dn();return Yr({mutationFn:e=>Rp(`/api/agents/${encodeURIComponent(e)}`,{method:`DELETE`}),onSuccess:()=>e.invalidateQueries({queryKey:[`codex-agents`]})})}function Sm(e){return Jr({queryKey:[`workspace-skills`,e],queryFn:async()=>(await Rp(`/api/skills/workspace/${encodeURIComponent(e)}`)).config,enabled:!!e})}function Cm(){let e=Dn();return Yr({mutationFn:({workspaceId:e,expectedRevision:t,...n})=>Rp(`/api/skills/workspace/${encodeURIComponent(e)}/assign`,{method:`POST`,body:JSON.stringify({...n,expectedRevision:t})}),onSuccess:(t,n)=>{e.setQueryData([`workspace-skills`,n.workspaceId],t.config),e.invalidateQueries({queryKey:[`skills`]})}})}function wm(){return Yr({mutationFn:({workspaceId:e,...t})=>Rp(`/api/workspace/${encodeURIComponent(e)}/terminal`,{method:`POST`,body:JSON.stringify(t)})})}function Tm(){let e=Dn();return Yr({mutationFn:({workspaceId:e,force:t})=>Rp(`/api/workspace/${encodeURIComponent(e)}/refresh`,{method:`POST`,body:JSON.stringify({force:t})}),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:[`workspaces`]}),e.invalidateQueries({queryKey:[`workspace-skills`,n.workspaceId]}),e.invalidateQueries({queryKey:[`skills`,n.workspaceId]}),e.invalidateQueries({queryKey:[`workspaces-status`]})}})}var Em=512e3;function Dm(e,t,n){let[r,i]=(0,Y.useState)({logs:``,connected:!1}),a=(0,Y.useCallback)(()=>i(e=>({...e,logs:``})),[]);return(0,Y.useEffect)(()=>{let r=!1,a=null,o=null;if(i({logs:``,connected:!1}),!n||!e||!t)return;let s=encodeURIComponent(e),c=encodeURIComponent(t),l=async()=>{if(r)return;let e=0;try{let t=await(await fetch(`/api/workspace/${s}/services/logs/${c}`)).json();if(r)return;e=typeof t.size==`number`?t.size:0,i({logs:typeof t.logs==`string`?t.logs:``,connected:!1})}catch{}if(r)return;let t=new EventSource(`/api/workspace/${s}/services/logs/${c}/stream?offset=${e}`);a=t,t.addEventListener(`open`,()=>{r||i(e=>({...e,connected:!0}))}),t.addEventListener(`log`,e=>{try{let{chunk:t}=JSON.parse(e.data);typeof t==`string`&&!r&&i(e=>{let n=e.logs+t;return{...e,logs:n.length>Em?n.slice(-512e3):n}})}catch{}}),t.onerror=()=>{t.close(),a===t&&(a=null),!r&&(i(e=>({...e,connected:!1})),o=setTimeout(l,2e3))}};return l(),()=>{r=!0,o&&clearTimeout(o),a?.close(),a=null}},[e,t,n]),{logs:r.logs,connected:r.connected,clear:a}}function Om({activeWsId:e,setActiveWsId:t,appVersion:n,workspaces:r,executeTerminal:i}){let[a,o]=(0,Y.useState)(null),s=sm(e),c=s.data?.services??[],l=s.data?.runningState??[],u=cm(e??``),{logs:d}=Dm(e,a,!!e);(0,Y.useEffect)(()=>{c.length===0?a!==null&&o(null):(!a||!c.some(e=>e.name===a))&&o(c[0].name)},[c]);let f=(0,Y.useRef)(null);(0,Y.useEffect)(()=>{f.current?.scrollIntoView({behavior:`smooth`})},[d]);let p=l.filter(e=>e.pid>0).length;return(0,X.jsxs)(`div`,{className:`flex flex-col h-screen w-full bg-background text-foreground font-mono text-[11px] overflow-hidden select-none border-t border-border`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2 bg-card border-b border-border shrink-0 text-[10px]`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(`span`,{className:`font-bold text-primary`,children:`CONTEXTSPACE_SHELL`}),(0,X.jsx)(`span`,{className:`text-muted-foreground`,children:`|`}),(0,X.jsxs)(`span`,{className:`text-muted-foreground`,children:[`ws: `,e||`none`]})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e&&(0,X.jsx)(`button`,{onClick:()=>{t(null),o(null)},className:`text-primary hover:text-primary/90 hover:underline transition-colors cursor-pointer bg-transparent border-none p-0 outline-none`,children:`[Change WS]`}),n&&(0,X.jsxs)(`span`,{className:`text-[10px] text-muted-foreground`,children:[`v`,n]})]})]}),e?(0,X.jsxs)(`div`,{className:`flex-1 flex flex-col min-h-0`,children:[(0,X.jsxs)(`div`,{className:`p-3 border-b border-border shrink-0 bg-muted/30`,children:[(0,X.jsxs)(`div`,{className:`flex gap-2 mb-3`,children:[(0,X.jsxs)(`button`,{onClick:()=>u.mutate({action:`start`}),disabled:u.isPending,className:`flex-1 inline-flex items-center justify-center gap-1.5 px-3 py-1.5 rounded border border-success/20 bg-success/10 hover:bg-success/20 text-success font-bold transition-all cursor-pointer text-[10px] disabled:opacity-50`,children:[(0,X.jsx)(Si,{size:10}),` [START SERVICES]`]}),(0,X.jsxs)(`button`,{onClick:()=>u.mutate({action:`stop`}),disabled:u.isPending,className:`flex-1 inline-flex items-center justify-center gap-1.5 px-3 py-1.5 rounded border border-destructive/20 bg-destructive/10 hover:bg-destructive/20 text-destructive font-bold transition-all cursor-pointer text-[10px] disabled:opacity-50`,children:[(0,X.jsx)(Ri,{size:10}),` [STOP SERVICES]`]})]}),(0,X.jsxs)(`div`,{className:`mb-3`,children:[(0,X.jsxs)(`div`,{className:`text-[10px] text-muted-foreground uppercase font-bold tracking-wider mb-1 px-1`,children:[`Background Services (`,p,`/`,c.length,`)`]}),c.length===0?(0,X.jsx)(`div`,{className:`text-muted-foreground/50 italic px-1 text-[10px]`,children:`No services detected in workspace.`}):(0,X.jsx)(`div`,{className:`flex flex-col gap-1 max-h-[120px] overflow-y-auto pr-1`,children:c.map(e=>{let t=l.some(t=>t.name===e.name&&t.pid>0),n=a===e.name;return(0,X.jsxs)(`div`,{onClick:()=>o(e.name),className:`flex items-center justify-between p-1.5 border rounded cursor-pointer transition-all ${n?`bg-primary/20 border-primary/50 text-foreground`:`bg-muted/20 border-border hover:border-border/80 text-muted-foreground`}`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 truncate`,children:[(0,X.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full ${t?`bg-success`:`bg-destructive`}`}),(0,X.jsx)(`span`,{className:`font-bold truncate`,children:e.name})]}),(0,X.jsx)(`span`,{className:`text-[10px] font-mono shrink-0`,children:t?(0,X.jsx)(`span`,{className:`text-success bg-success/10 px-1 py-0.2 rounded border border-success/20 text-[8px] font-bold uppercase`,children:`on`}):(0,X.jsx)(`span`,{className:`text-muted-foreground bg-muted px-1 py-0.2 rounded border border-border text-[8px] font-bold uppercase`,children:`off`})})]},e.name)})})]}),(0,X.jsxs)(`div`,{className:`mb-3 border-t border-border pt-2.5`,children:[(0,X.jsx)(`div`,{className:`text-[10px] text-muted-foreground font-bold uppercase mb-1 px-1`,children:`Active Local MCP Tools`}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-1 px-1 text-[10px] text-muted-foreground font-mono`,children:[(0,X.jsxs)(`div`,{className:`flex justify-between`,children:[(0,X.jsx)(`span`,{children:`• search_workspace`}),(0,X.jsx)(`span`,{className:`text-primary font-bold`,children:`READY`})]}),(0,X.jsxs)(`div`,{className:`flex justify-between`,children:[(0,X.jsx)(`span`,{children:`• get_service_logs`}),(0,X.jsx)(`span`,{className:`text-primary font-bold`,children:`READY`})]})]})]}),(0,X.jsxs)(`div`,{className:`border-t border-border pt-2.5`,children:[(0,X.jsx)(`div`,{className:`text-[10px] text-muted-foreground font-bold uppercase mb-1.5 px-1`,children:`Terminal Commands (Click to Run)`}),(0,X.jsx)(`div`,{className:`grid grid-cols-2 gap-1.5`,children:[`ctxspace sync`,`ctxspace diff`,`ctxspace handoff`,`ctxspace status`].map(e=>(0,X.jsxs)(`button`,{onClick:()=>i(e),className:`px-2 py-1.5 text-left border border-border hover:border-primary bg-muted/40 rounded text-muted-foreground hover:text-foreground hover:bg-primary/10 transition-all font-mono text-[9px] cursor-pointer`,children:[`$ `,e]},e))})]})]}),(0,X.jsxs)(`div`,{className:`flex-1 flex flex-col min-h-0 bg-background`,children:[(0,X.jsx)(`div`,{className:`flex items-center justify-between px-3 py-1.5 bg-card border-b border-border shrink-0 text-[9px] text-muted-foreground uppercase tracking-wider font-bold`,children:(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,X.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-primary`}),(0,X.jsxs)(`span`,{children:[`log_stream: `,a||`none`]})]})}),(0,X.jsxs)(`div`,{className:`flex-1 p-3 overflow-y-auto font-mono text-[10px] leading-relaxed whitespace-pre-wrap select-text selection:bg-primary/30 text-foreground`,children:[d.trim()?d:(0,X.jsx)(`span`,{className:`text-muted-foreground/50 italic font-mono`,children:`(no logs recorded yet)`}),(0,X.jsx)(`div`,{ref:f})]})]})]}):(0,X.jsxs)(`div`,{className:`flex-1 flex flex-col items-center justify-center p-6 text-center overflow-y-auto`,children:[(0,X.jsx)(`div`,{className:`text-primary font-bold mb-4 text-[12px] uppercase`,children:`=== Select Active Workspace ===`}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-2 w-full max-w-xs`,children:[r.map(e=>(0,X.jsxs)(`button`,{onClick:()=>t(e.branchName),className:`w-full text-left p-2.5 bg-muted border border-border hover:border-primary rounded hover:bg-primary/10 text-muted-foreground hover:text-foreground transition-all text-[11px] cursor-pointer`,children:[`> `,e.branchName]},e.branchName)),r.length===0&&(0,X.jsx)(`div`,{className:`text-muted-foreground italic`,children:`No workspaces found. Initialize one via the CLI.`})]})]})]})}function km(e){let t=Y.useRef(!0);t.current&&(t.current=!1,e())}var Am=Y.createContext(null);function jm(){let e=Y.useContext(Am);if(e===null)throw Error(f(60));return e}var Mm=(e,t)=>Object.is(e,t);function Nm(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function Pm(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e!==void 0&&Nm(e,t,n))}function Fm(e,t,n){return e.filter(e=>!Nm(t,e,n))}function Im(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function Lm(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function Rm(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(Lm(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function zm(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return Im(e)}function Bm(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?Im(e.value):Im(e)}function Vm(e,t,n){function r(){return zm(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=Lm(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function Hm(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,X.jsx)(Y.Fragment,{children:Vm(r,t,n)},i)),e),[])}var Z={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Bm(t,r)!==``},hasNullItemLabel:(e,t)=>t?Rm(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>Nm(t,e,n)):Nm(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function Um(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function Wm(e){let{id:t,value:a,defaultValue:o=null,onValueChange:s,open:c,defaultOpen:l=!1,onOpenChange:u,name:f,form:m,autoComplete:h,disabled:g=!1,readOnly:_=!1,required:v=!1,modal:y=!0,actionsRef:b,inputRef:x,onOpenChangeComplete:S,items:C,multiple:w=!1,itemToStringLabel:T,itemToStringValue:E,isItemEqualToValue:D=Mm,highlightItemOnHover:O=!0,children:A}=e,{clearErrors:j}=It(),{setDirty:M,setTouched:N,setFocused:P,validityData:F,setFilled:I,name:R,disabled:z,validation:B,validationMode:V}=Ge(),ee=Ve({id:t}),H=z||g,U=R??f,[W,te]=k({controlled:a,default:w?o??p:o,name:`Select`,state:`value`}),[re,ae]=k({controlled:c,default:l,name:`Select`,state:`open`}),oe=Y.useRef([]),se=Y.useRef([]),ce=Y.useRef(null),le=Y.useRef(null),G=Y.useRef(0),ue=Y.useRef(null),de=Y.useRef([]),fe=Y.useRef(!1),pe=Y.useRef(null),me=Y.useRef(null),he=Y.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ge=Y.useRef(!1),{mounted:_e,setMounted:ve,transitionStatus:ye}=ne(re),{openMethod:be,triggerProps:Se}=Id(re),Ce=i(()=>new L({id:ee,labelId:void 0,modal:y,multiple:w,itemToStringLabel:T,itemToStringValue:E,isItemEqualToValue:D,value:W,open:re,mounted:_e,transitionStatus:ye,items:C,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,we=K(Ce,Z.activeIndex),q=K(Ce,Z.selectedIndex),Te=K(Ce,Z.triggerElement),Ee=K(Ce,Z.positionerElement),De=rf(be),Oe=be??De,ke=Y.useMemo(()=>w?``:Bm(W,E),[w,W,E]),je=Y.useMemo(()=>w&&Array.isArray(W)?W.map(e=>Bm(e,E)):Bm(W,E),[w,W,E]),Me=xe(Te),Ne=J(()=>je);st(Me,ee,W,Ne,!H,f);let Pe=Y.useRef(W),Ie=w?Array.isArray(W)&&W.length>0:W!=null&&ke!==``;Lt(()=>{I(Ie)},[Ie,I]),Lt(function(){let e=W,t=!1;if(w){let n=Array.isArray(W)?W:[];t=n.length===0,e=n[n.length-1]}let n=t?-1:Pm(de.current,e,D),r=n===-1?null:n;r===null&&(me.current=null),!re&&Ce.set(`selectedIndex`,r)},[w,re,W,D,Ce]);function Le(e){let t=F.initialValue;return Array.isArray(e)&&Array.isArray(t)?!Um(e,t,(e,t)=>Nm(e,t,D)):e!==t}Pd(W,()=>{j(U),M(Le(W)),B.change(W)});let Re=J((e,t)=>{u?.(e,t),!t.isCanceled&&(ae(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(N(!0),P(!1),V===`onBlur`&&B.commit(W)))}),ze=J(()=>{ve(!1),Ce.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),S?.(!1)});Ae({enabled:!b,open:re,ref:ce,onComplete(){re||ze()}}),Y.useImperativeHandle(b,()=>({unmount:ze}),[ze]);let Be=J((e,t)=>{s?.(e,t),!t.isCanceled&&te(e)}),He=J(e=>{let t=Ht(e.scrollHeight,e.clientHeight),n=qe(e.scrollTop,t),r=n>0,i=n<t;Ce.set(`scrollUpArrowVisible`,r),Ce.set(`scrollDownArrowVisible`,i)}),Ue=Eu({open:re,onOpenChange:Re,elements:{reference:Te,floating:Ee}}),Ke=ll(Ue,{enabled:!_&&!H,event:`mousedown`}),Je=At(Ue),Ye=Ku(Ue,{enabled:!_&&!H,listRef:oe,activeIndex:we,selectedIndex:q,disabledIndices:p,onNavigate(e){e===null&&!re||Ce.set(`activeIndex`,e)},focusItemOnHover:O}),Xe=qu(Ue,{enabled:!_&&!H&&(re||!w),listRef:se,activeIndex:we,selectedIndex:q,disabledIndices:e=>of(oe.current[e]),onMatch(e){re?Ce.set(`activeIndex`,e):Be(de.current[e],Fe(ie))},onTyping(e){fe.current=e}}),Ze=Y.useMemo(()=>d(Xe.reference,Ye.reference,Je.reference,Ke.reference,Se),[Ke.reference,Xe.reference,Ye.reference,Je.reference,Se]),Qe=Y.useMemo(()=>d(pt,Xe.floating,Ye.floating,Je.floating),[Xe.floating,Ye.floating,Je.floating]),$e=Ye.item??n;km(()=>{Ce.update({popupProps:Qe,triggerProps:Ze})}),Ce.useSyncedValues({id:ee,modal:y,multiple:w,value:W,open:re,mounted:_e,transitionStatus:ye,popupProps:Qe,triggerProps:Ze,items:C,itemToStringLabel:T,itemToStringValue:E,isItemEqualToValue:D,openMethod:Oe});let et=Y.useMemo(()=>({store:Ce,floatingContext:Ue,required:v,disabled:H,readOnly:_,multiple:w,highlightItemOnHover:O,setValue:Be,setOpen:Re,listRef:oe,popupRef:ce,scrollHandlerRef:le,handleScrollArrowVisibility:He,scrollArrowsMountedCountRef:G,itemProps:$e,valueRef:ue,valuesRef:de,labelsRef:se,typingRef:fe,selectionRef:he,firstItemTextRef:pe,selectedItemTextRef:me,validation:B,onOpenChangeComplete:S,alignItemWithTriggerActiveRef:ge,initialValueRef:Pe}),[Ce,Ue,v,H,_,w,O,Be,Re,$e,B,S,He]),tt=r(x,B.inputRef),nt=w?void 0:U,rt=Y.useMemo(()=>!w||!Array.isArray(W)||!U?null:W.map(e=>{let t=Bm(e,E);return(0,X.jsx)(`input`,{type:`hidden`,form:m,name:U,value:t,disabled:H},t)}),[w,W,m,U,E,H]);return(0,X.jsxs)(Am.Provider,{value:et,children:[A,(0,X.jsx)(`input`,{...B.getValidationProps(H,{onFocus(){Ce.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||H||_)return;let t=e.currentTarget.value,n=Fe(ie,e.nativeEvent);function r(){if(w)return;let e=t.toLowerCase(),r=de.current.findIndex(t=>Bm(t,E).toLowerCase()===e||zm(t,T).toLowerCase()===e);r===-1&&(r=de.current.findIndex((t,n)=>{let r=se.current[n];return r!=null&&r.toLowerCase()===e}));let i=de.current[r];i!=null&&Be(i,n)}Ce.set(`forceMount`,!0),queueMicrotask(r)}}),id:ee&&nt==null?`${ee}-hidden-input`:void 0,form:m,name:nt,autoComplete:h,value:ke,disabled:H,required:v&&!(w&&Ie),readOnly:_,ref:tt,style:U?Zt:We,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),rt]})}function Gm(e,t){return e??t}var Km=400,qm={...te,...ht,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},Jm=Y.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:c,...l}=e,{setTouched:u,setFocused:f,validationMode:p,state:m,disabled:h}=Ge(),{labelId:g}=wt(),{store:_,setOpen:v,selectionRef:y,validation:b,readOnly:x,required:S,alignItemWithTriggerActiveRef:C,disabled:w}=jm(),T=h||w||a,E=K(_,Z.open),O=K(_,Z.mounted),k=K(_,Z.value),A=K(_,Z.triggerProps),j=K(_,Z.positionerElement),M=K(_,Z.listElement),N=K(_,Z.popupSide),P=K(_,Z.id),F=K(_,Z.labelId),I=K(_,Z.hasSelectedValue),L=O&&j?N:null,R=i??P,z=Gm(g,F);Ve({id:R});let B=xe(j),V=Y.useRef(null),{getButtonProps:ee,buttonRef:H}=St({disabled:T,native:o}),U=_.useStateSetter(`triggerElement`),W=q(),te=q(),ne=q();Y.useEffect(()=>{if(E)return ne.start(Km,()=>{y.current.allowUnselectedMouseUp=!0,y.current.allowSelectedMouseUp=!0}),()=>{ne.clear()};y.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},te.clear()},[E,y,te,ne]);let re=d(A,{id:R,role:`combobox`,"aria-expanded":E,"aria-haspopup":`listbox`,"aria-controls":E?M?.id??Ce(j)?.id:void 0,"aria-labelledby":z,"aria-readonly":x||void 0,"aria-required":S||void 0,tabIndex:T?-1:0,onFocus(e){f(!0),E&&C.current&&v(!1,Fe(ie,e.nativeEvent)),W.start(0,()=>{_.set(`forceMount`,!0)})},onBlur(e){ce(j,e.relatedTarget)||(u(!0),f(!1),p===`onBlur`&&b.commit(k))},onMouseDown(e){if(E)return;let t=ct(e.currentTarget);function n(e){if(!V.current)return;let t=e.target;ce(V.current,t)||ce(B.current,t)||qd(e,V.current)||v(!1,Fe(D,e))}te.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},l,ee),ae=b.getValidationProps(T,re);ae.role=`combobox`;let oe={...m,open:E,disabled:T,value:k,readOnly:x,popupSide:L,placeholder:!I};return s(`button`,e,{ref:[t,V,H,U],state:oe,stateAttributesMapping:qm,props:ae})}),Ym={value:()=>null},Xm=Y.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...c}=e,{store:l,valueRef:u}=jm(),d=K(l,Z.value),f=K(l,Z.items),p=K(l,Z.itemToStringLabel),m=K(l,Z.hasSelectedValue),h=!m&&a!=null&&i==null,g=K(l,Z.hasNullItemLabel,h),_={value:d,placeholder:!m},v=null;return v=typeof i==`function`?i(d):i??(h&&!g?a:Array.isArray(d)?Hm(d,f,p):Vm(d,f,p)),s(`span`,e,{state:_,ref:[t,u],props:[{children:v},c],stateAttributesMapping:Ym})}),Zm=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=jm(),c={open:K(o,Z.open)};return s(`span`,e,{state:c,ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:jt})}),Qm=Y.forwardRef(function(e,t){let{store:n}=jm(),r=K(n,Z.mounted),i=K(n,Z.forceMount);return r||i?(0,X.jsx)(Vt,{ref:t,...e}):null}),$m=Y.createContext(void 0);function eh(){let e=Y.useContext($m);if(!e)throw Error(f(59));return e}function th(e,t){e&&Object.assign(e.style,t)}var nh={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},rh={position:`fixed`},ih=Y.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=lt,style:_,...v}=e,{store:y,listRef:b,labelsRef:x,alignItemWithTriggerActiveRef:S,selectedItemTextRef:C,valuesRef:w,initialValueRef:T,popupRef:E,setValue:D,floatingContext:O}=jm(),k=K(y,Z.open),A=K(y,Z.mounted),j=K(y,Z.modal),M=K(y,Z.value),N=K(y,Z.openMethod),P=K(y,Z.positionerElement),F=K(y,Z.triggerElement),I=K(y,Z.isItemEqualToValue),L=K(y,Z.transitionStatus),R=Y.useRef(null),z=Y.useRef(null),[B,V]=Y.useState(h),ee=A&&B&&N!==`touch`;!A&&B!==h&&V(h),Y.useImperativeHandle(S,()=>ee),kd((ee||j)&&k,N===`touch`,P,F);let H=_d({anchor:n,floatingRootContext:O,positionMethod:a,mounted:A,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??ee,collisionAvoidance:g,keepMounted:!0}),U=ee?`none`:H.side,W=ee?rh:H.positionerStyles,te={open:k,side:U,align:H.align,anchorHidden:H.anchorHidden};Lt(()=>{y.set(`popupSide`,H.side)},[y,H.side]);let ne=Dd(e,te,{styles:W,transitionStatus:L,props:v,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!A,inert:!k}),re=Y.useRef(0),ae=J(e=>{if(w.current.length===0)return;let t=re.current;if(re.current=e.size,e.size===t)return;let n=Fe(ie);if(t!==0&&!y.state.multiple&&M!==null&&Pm(w.current,M,I)===-1){let e=T.current,t=e!=null&&Pm(w.current,e,I)!==-1?e:null;D(t,n),t===null&&(y.set(`selectedIndex`,null),C.current=null)}if(t!==0&&y.state.multiple&&Array.isArray(M)){let e=M.filter(e=>Pm(w.current,e,I)!==-1);e.length!==M.length&&(D(e,n),e.length===0&&(y.set(`selectedIndex`,null),C.current=null))}if(k&&ee){y.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};th(P,e),th(E.current,e)}}),oe=Y.useMemo(()=>({...H,side:U,alignItemWithTriggerActive:ee,setControlledAlignItemWithTrigger:V,scrollUpArrowRef:R,scrollDownArrowRef:z}),[H,U,ee,V]);return(0,X.jsx)(bd,{elementsRef:b,labelsRef:x,onMapChange:ae,children:(0,X.jsxs)($m.Provider,{value:oe,children:[A&&j&&(0,X.jsx)(tt,{inert:Gt(!k),cutout:F}),ne]})})}),ah={...ke,...H},oh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:c,popupRef:l,onOpenChangeComplete:u,setOpen:d,valueRef:f,firstItemTextRef:p,selectedItemTextRef:m,multiple:h,handleScrollArrowVisibility:g,scrollHandlerRef:_,listRef:y,highlightItemOnHover:b,floatingContext:x}=jm(),{side:S,align:C,alignItemWithTriggerActive:T,isPositioned:E,setControlledAlignItemWithTrigger:D}=eh(),O=rd(!0)!=null,k=Re(),{nonce:A,disableStyleElements:j}=Dt(),M=K(c,Z.id),N=K(c,Z.open),P=K(c,Z.openMethod),F=K(c,Z.mounted),I=K(c,Z.popupProps),L=K(c,Z.transitionStatus),R=K(c,Z.triggerElement),z=K(c,Z.positionerElement),B=K(c,Z.listElement),V=Y.useRef(!1),H=Y.useRef(!1),U=Y.useRef({}),W=Mt(),te=J(e=>{if(!z||!l.current||!H.current)return;let t=z.style.top===`0px`,n=z.style.bottom===`0px`;if(V.current||!T||!t&&!n){g(e);return}let r=lh(z),i=uh(z.getBoundingClientRect().height,`y`,r),a=ct(z),o=ze(z),s=o.getComputedStyle(z),c=parseFloat(s.marginTop),u=parseFloat(s.marginBottom),d=sh(o.getComputedStyle(l.current)),f=Math.min(a.documentElement.clientHeight-c-u,d),p=e.scrollTop,m=ch(e),h=null,_=e=>{z.style.height=`${e}px`},v=t?m-p:p,y=Math.min(i+v,f);if(v<=1){let n=Qe(v,0,f-i);n>0&&_(i+n),e.scrollTop=t?m:0,f-(i+n)<=1&&(V.current=!0),g(e);return}f-y>1?h=t?1/0:0:n&&p<m&&(h=p-(v-(i+v-f)));let b=Math.ceil(y);if(b!==0&&_(b),h!=null){let t=Qe(h,0,ch(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(V.current=!0),g(e)});Y.useImperativeHandle(_,()=>te,[te]),Ae({open:N,ref:l,onComplete(){N&&u?.(!0)}});let ne={open:N,transitionStatus:L,side:S,align:C};Lt(()=>{!z||!l.current||Object.keys(U.current).length||(U.current={top:z.style.top||`0`,left:z.style.left||`0`,right:z.style.right,height:z.style.height,bottom:z.style.bottom,minHeight:z.style.minHeight,maxHeight:z.style.maxHeight,marginTop:z.style.marginTop,marginBottom:z.style.marginBottom})},[l,z]),Lt(()=>{N||T||(H.current=!1,V.current=!1,th(z,U.current))},[N,T,z,l]),Lt(()=>{let e=l.current;if(!N||!R||!z||!e||T&&!E||c.state.transitionStatus===`ending`)return;if(H.current=!0,e.style.removeProperty(`--transform-origin`),!T){W.request(()=>g(B||e));return}let t=ph(e);try{let t=m.current;t?.isConnected||(t=!Z.hasSelectedValue(c.state)&&p.current?.isConnected?p.current:null);let n=f.current,r=ze(z),i=r.getComputedStyle(z),a=r.getComputedStyle(e),o=ct(R),s=lh(R),l=dh(R.getBoundingClientRect(),s),u=dh(z.getBoundingClientRect(),s),d=l.height,h=B||e,_=h.scrollHeight,x=parseFloat(a.borderBottomWidth),S=parseFloat(i.marginTop)||10,C=parseFloat(i.marginBottom)||10,w=parseFloat(i.minHeight)||100,T=sh(a),E=o.documentElement.clientHeight-S-C,O=o.documentElement.clientWidth,A=E-l.bottom+d,j,M=k===`rtl`?l.right-u.width:l.left,N=0;if(t&&n){let e=dh(n.getBoundingClientRect(),s);j=dh(t.getBoundingClientRect(),s),M=u.left+(k===`rtl`?e.right-j.right:e.left-j.left);let r=e.top-l.top+e.height/2;N=j.top-u.top+j.height/2-r}let P=A+N+C+x,F=Math.min(E,P),I=E-S-C,L=P-F,ee=O-5;z.style.left=`${Qe(M,5,ee-u.width)}px`,z.style.height=`${F}px`,z.style.maxHeight=`none`,z.style.marginTop=`${S}px`,z.style.marginBottom=`${C}px`,e.style.height=`100%`;let H=ch(h),W=L>=H-1;W&&(F=Math.min(E,u.height)-(L-H));let te=l.top<20||l.bottom>E-20||Math.ceil(F)+1<Math.min(_,w),ne=(r.visualViewport?.scale??1)!==1&&v;if(te||ne){th(z,U.current),D(!1);return}let re=Math.max(w,F);if(W){let e=Math.max(0,E-P);z.style.top=u.height>=I?`0`:`${e}px`,z.style.height=`${F}px`,h.scrollTop=ch(h)}else z.style.bottom=`0`,h.scrollTop=L;if(j){let t=u.top,n=u.height,r=j.top+j.height/2,i=Qe(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(re===E||F>=T)&&(V.current=!0),g(h),b&&c.state.selectedIndex===null&&c.state.activeIndex===null&&y.current[0]!=null&&c.set(`activeIndex`,0)}finally{t()}},[c,N,z,R,f,p,m,l,g,T,D,W,B,y,b,k,E]),Y.useEffect(()=>{if(!T||!z||!N)return;let e=ze(z);function t(e){d(!1,Fe(we,e))}return Yt(e,`resize`,t)},[d,T,z,N]);let re={...B?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":h||void 0,id:`${M}-list`},onKeyDown(e){O&&w.has(e.key)&&e.stopPropagation()},onScroll(e){B||te(e.currentTarget)},...T&&{style:B?{height:`100%`}:nh},className:!B&&T?vt.className:void 0},ie=s(`div`,e,{ref:[t,l],state:ne,stateAttributesMapping:ah,props:[I,re,id(L),o]});return(0,X.jsxs)(Y.Fragment,{children:[!j&&vt.getElement(A),(0,X.jsx)(ee,{context:x,modal:!1,disabled:!F,openInteractionType:P,returnFocus:a,restoreFocus:!0,children:ie})]})});function sh(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function ch(e){return Ht(e.scrollHeight,e.clientHeight)}function lh(e){return Kl.getScale(e)}function uh(e,t,n){return e/n[t]}function dh(e,t){return cl({x:uh(e.x,`x`,t),y:uh(e.y,`y`,t),width:uh(e.width,`x`,t),height:uh(e.height,`y`,t)})}var fh=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function ph(e){let{style:t}=e,n={};for(let[e,r]of fh)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of fh){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var mh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:c,multiple:l}=jm(),{alignItemWithTriggerActive:u}=eh(),d=K(o,Z.hasScrollArrows),f=K(o,Z.openMethod),p={id:`${K(o,Z.id)}-list`,role:`listbox`,"aria-multiselectable":l||void 0,onScroll(e){c.current?.(e.currentTarget)},...u&&{style:nh},className:d&&f!==`touch`?vt.className:void 0},m=o.useStateSetter(`listElement`);return s(`div`,e,{ref:[t,m],props:[p,a]})}),hh=Y.createContext(void 0);function gh(){let e=Y.useContext(hh);if(!e)throw Error(f(57));return e}var _h=Y.memo(Y.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:c=!1,nativeButton:l=!1,...u}=e,d=Y.useRef(null),f=kc({guess:!0,label:o,textRef:d}),{store:p,itemProps:m,setOpen:h,setValue:g,selectionRef:_,typingRef:v,valuesRef:y,multiple:b,selectedItemTextRef:x,disabled:S,readOnly:C}=jm(),w=S||c,T=K(p,Z.isActive,f.index),E=K(p,Z.open),D=K(p,Z.isSelected,a),O=K(p,Z.isSelectedByFocus,f.index),k=K(p,Z.isItemEqualToValue),A=f.index,j=Y.useRef(null);Lt(()=>{let e=y.current;return e[A]=a,()=>{delete e[A]}},[A,a,y]),Lt(()=>{let e=p.state.value,t=e;b&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),t!==void 0&&Nm(a,t,k)&&(p.set(`selectedIndex`,A),d.current&&(x.current=d.current))},[A,b,k,p,a,x]);let M=Y.useRef(`mouse`),N=Y.useRef(!1),{getButtonProps:P,buttonRef:F}=St({disabled:w,focusableWhenDisabled:!0,native:l,composite:!0}),I={disabled:w,selected:D,highlighted:T};function L(e){if(S||C)return;let t=p.state.value;if(b){let n=Array.isArray(t)?t:[],r=D?Fm(n,a,k):[...n,a];g(r,Fe(me,e))}else g(a,Fe(me,e)),h(!1,Fe(me,e))}function R(){_.current.dragY=0}let z={role:`option`,"aria-selected":D,tabIndex:E&&T?0:-1,onKeyDown(e){p.set(`activeIndex`,A),e.key===` `&&v.current&&e.preventDefault()},onClick(e){let t=M.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&nn(e.nativeEvent)&&(n!==void 0||T),i=t&&!r&&!N.current;N.current=!1,!(w||i)&&L(e.nativeEvent)},onPointerEnter(e){M.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=_.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){M.current=e.pointerType,N.current=!0,R()},onMouseUp(){if(R(),w||M.current===`touch`||N.current)return;let e=!_.current.allowSelectedMouseUp&&D,t=!_.current.allowUnselectedMouseUp&&!D;e||t||(N.current=!0,j.current?.click(),N.current=!1)}},B=s(`div`,e,{ref:[F,t,f.ref,j],state:I,props:[m,z,u,P]}),V=Y.useMemo(()=>({selected:D,index:A,textRef:d,selectedByFocus:O}),[D,A,d,O]);return(0,X.jsx)(hh.Provider,{value:V,children:B})})),vh=Y.forwardRef(function(e,t){let{selected:n}=gh();return e.keepMounted||n?(0,X.jsx)(yh,{...e,ref:t}):null}),yh=Y.memo(Y.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:c}=gh(),l=Y.useRef(null),{transitionStatus:u,setMounted:d}=ne(c),f=s(`span`,e,{ref:[t,l],state:{selected:c,transitionStatus:u},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:H});return Ae({open:c,ref:l,onComplete(){c||d(!1)}}),f})),bh=Y.memo(Y.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=gh(),{firstItemTextRef:a,selectedItemTextRef:o}=jm(),{render:c,className:l,style:u,...d}=e,f=Y.useCallback(e=>{e&&(n===0&&(a.current=e),i&&(o.current=e))},[a,o,n,i]);return s(`div`,e,{ref:[f,t,r],props:d})})),xh=Y.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...c}=e,l=a===`up`,{store:u,popupRef:d,listRef:f,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:m}=jm(),{side:h,scrollDownArrowRef:g,scrollUpArrowRef:_}=eh(),v=l?Z.scrollUpArrowVisible:Z.scrollDownArrowVisible,y=K(u,v),b=K(u,Z.openMethod),x=y&&b!==`touch`,S=q(),C=l?_:g,{mounted:w,transitionStatus:T,setMounted:E}=ne(x);Lt(()=>(m.current+=1,u.set(`hasScrollArrows`,!0),()=>{m.current=Math.max(0,m.current-1),m.current===0&&u.set(`hasScrollArrows`,!1)}),[u,m]),Ae({open:x,ref:C,onComplete(){x||E(!1)}});let D=s(`div`,e,{ref:[t,C],state:{direction:a,visible:x,side:h,transitionStatus:T},props:[{"aria-hidden":!0,children:l?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||S.isStarted())return;u.set(`activeIndex`,null);function t(){let e=u.state.listElement??d.current;if(!e)return;u.set(`activeIndex`,null),p(e);let n=Ht(e.scrollHeight,e.clientHeight),r=qe(e.scrollTop,n),i=r===(l?0:n),a=f.current;if(r!==e.scrollTop&&(e.scrollTop=r),i){S.clear();return}if(a.length>0){let t=C.current?.offsetHeight||0;e.scrollTop=Sh(a,l,r,e.clientHeight,t,n)}S.start(40,t)}S.start(40,t)},onMouseLeave(){S.clear()}},c],stateAttributesMapping:H});return w||o?D:null});function Sh(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?qe(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?qe(l.offsetTop+l.offsetHeight-r+i,a):a}var Ch=Y.forwardRef(function(e,t){return(0,X.jsx)(xh,{...e,ref:t,direction:`down`})}),wh=Y.forwardRef(function(e,t){return(0,X.jsx)(xh,{...e,ref:t,direction:`up`})}),Th=Wm,Eh=u(`relative inline-flex cursor-pointer select-none items-center justify-between gap-2 border rounded-lg text-left text-base outline-none transition-[color,box-shadow,background-color] data-disabled:pointer-events-none data-disabled:opacity-64 sm:text-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4`,{defaultVariants:{size:`default`,variant:`default`},variants:{variant:{default:`w-full min-w-36 border-input bg-background not-dark:bg-clip-padding text-foreground shadow-xs/5 ring-ring/24 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 focus-visible:border-ring focus-visible:ring-[3px] aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/16 dark:bg-input/32 dark:aria-invalid:ring-destructive/24 dark:not-data-disabled:not-focus-visible:not-aria-invalid:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='text-'])]:text-muted-foreground [[data-disabled],:focus-visible,[aria-invalid],[data-pressed]]:shadow-none`,ghost:`border-transparent text-muted-foreground/70 focus-visible:ring-2 focus-visible:ring-ring data-pressed:bg-accent [:hover,[data-pressed]]:bg-accent [:hover,[data-pressed]]:text-foreground/80`},size:{default:`min-h-9 px-[calc(--spacing(3)-1px)] sm:min-h-8`,lg:`min-h-10 px-[calc(--spacing(3)-1px)] sm:min-h-9`,sm:`min-h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] sm:min-h-7`,xs:`h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5`}}});function Dh({className:e,size:t=`default`,variant:n=`default`,children:r,...i}){return(0,X.jsxs)(Jm,{className:l(Eh({size:t,variant:n}),e),"data-slot":`select-trigger`,...i,children:[r,(0,X.jsx)(Zm,{"data-slot":`select-icon`,children:(0,X.jsx)(rn,{className:`-me-1 size-3 opacity-50`})})]})}function Oh({className:e,...t}){return(0,X.jsx)(Xm,{className:l(`flex-1 truncate data-placeholder:text-muted-foreground`,e),"data-slot":`select-value`,...t})}function kh({className:e,popupClassName:t,children:n,side:r=`bottom`,sideOffset:i=4,align:a=`start`,alignOffset:o=0,alignItemWithTrigger:s=!0,matchTriggerWidth:c=!0,anchor:u,...d}){return(0,X.jsx)(Qm,{children:(0,X.jsx)(ih,{align:a,alignItemWithTrigger:s,alignOffset:o,anchor:u,className:`z-50 select-none`,"data-slot":`select-positioner`,side:r,sideOffset:i,children:(0,X.jsxs)(oh,{className:`origin-(--transform-origin) rounded-lg text-foreground outline-none`,"data-slot":`select-popup`,...d,children:[(0,X.jsx)(wh,{className:`top-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:top-px before:h-[200%] before:rounded-t-[calc(var(--radius-lg)-1px)] before:bg-linear-to-b before:from-50% before:from-popover`,"data-slot":`select-scroll-up-arrow`,children:(0,X.jsx)(ii,{className:`relative size-4.5 sm:size-4`})}),(0,X.jsx)(`div`,{className:l(`relative h-full rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]`,c&&`min-w-(--anchor-width)`,t),children:(0,X.jsx)(mh,{className:l(`max-h-(--available-height) overflow-y-auto p-1`,e),"data-slot":`select-list`,children:n})}),(0,X.jsx)(Ch,{className:`bottom-0 z-50 flex h-6 w-full cursor-default items-center justify-center before:pointer-events-none before:absolute before:inset-x-px before:bottom-px before:h-[200%] before:rounded-b-[calc(var(--radius-lg)-1px)] before:bg-linear-to-t before:from-50% before:from-popover`,"data-slot":`select-scroll-down-arrow`,children:(0,X.jsx)(rn,{className:`relative size-4.5 sm:size-4`})})]})})})}function Ah({className:e,children:t,hideIndicator:n=!1,...r}){return(0,X.jsxs)(_h,{className:l(`grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default items-center gap-2 rounded-sm py-1 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0`,n?`grid-cols-[1fr] ps-3 pe-3`:`grid-cols-[1rem_1fr] ps-2 pe-4`,e),"data-slot":`select-item`,...r,children:[n?null:(0,X.jsx)(vh,{className:`col-start-1`,"data-slot":`select-item-indicator`,children:(0,X.jsx)(`svg`,{fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/1500/svg`,children:(0,X.jsx)(`path`,{d:`M5.252 12.7 10.2 18.63 18.748 5.37`})})}),(0,X.jsx)(bh,{className:l(`min-w-0 [&_svg:not([class*='text-'])]:text-muted-foreground`,n?`col-start-1`:`col-start-2`),"data-slot":`select-item-text`,children:t})]})}function jh({config:e,setConfig:t,defaultPaths:n,adapters:r,saveAppConfig:i}){let a=e.devDir.trim()!==``&&e.workspacesDir.trim()!==``;return(0,X.jsx)(`div`,{className:`flex min-h-screen bg-background text-foreground font-sans items-center justify-center p-6`,children:(0,X.jsxs)(`div`,{className:`max-w-6xl w-full bg-card border border-border rounded-xl p-10 shadow-sm grid grid-cols-1 lg:grid-cols-12 gap-12`,children:[(0,X.jsxs)(`div`,{className:`lg:col-span-7 flex flex-col justify-between`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`div`,{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full bg-primary/10 text-primary border border-primary/20 text-xs font-semibold uppercase tracking-wider mb-5`,children:`Onboarding Guide`}),(0,X.jsxs)(`h1`,{className:`text-3xl font-bold tracking-tight text-foreground mb-2`,children:[`Welcome to `,vn]}),(0,X.jsxs)(`p`,{className:`text-sm text-muted-foreground mb-8 max-w-xl leading-relaxed`,children:[vn,` orchestrates multi-repository developer environments. It combines isolated Git worktrees, automatic code analyzer sweeps, and background process running into a single dashboard.`]}),(0,X.jsxs)(`div`,{className:`space-y-6`,children:[(0,X.jsxs)(`div`,{className:`flex gap-4 group`,children:[(0,X.jsx)(`div`,{className:`w-8 h-8 rounded-full bg-primary/10 border border-primary/20 text-primary flex items-center justify-center font-bold text-sm shrink-0 group-hover:bg-primary/20 transition-colors`,children:`1`}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h3`,{className:`text-sm font-semibold text-foreground transition-colors`,children:`Configure Development Folders`}),(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1 leading-relaxed`,children:`Specify your local code path and target workspaces path. For the first setup, these paths start empty so you can explicitly configure them.`})]})]}),(0,X.jsxs)(`div`,{className:`flex gap-4 group`,children:[(0,X.jsx)(`div`,{className:`w-8 h-8 rounded-full bg-primary/10 border border-primary/20 text-primary flex items-center justify-center font-bold text-sm shrink-0 group-hover:bg-primary/20 transition-colors`,children:`2`}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h3`,{className:`text-sm font-semibold text-foreground transition-colors`,children:`Build Isolated Branch Workspaces`}),(0,X.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-1 leading-relaxed`,children:[`Choose repositories and input your feature branch. `,vn,` runs `,(0,X.jsx)(`code`,{children:`git worktree`}),` to checkout dependencies under a unified folder structure, leaving your primary repository directories clean.`]})]})]}),(0,X.jsxs)(`div`,{className:`flex gap-4 group`,children:[(0,X.jsx)(`div`,{className:`w-8 h-8 rounded-full bg-primary/10 border border-primary/20 text-primary flex items-center justify-center font-bold text-sm shrink-0 group-hover:bg-primary/20 transition-colors`,children:`3`}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h3`,{className:`text-sm font-semibold text-foreground transition-colors`,children:`Align AI Coding Contexts`}),(0,X.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-1 leading-relaxed`,children:[vn,` automatically generates configuration files (`,(0,X.jsx)(`code`,{children:`CLAUDE.md`}),`, `,(0,X.jsx)(`code`,{children:`.cursorrules`}),`, `,(0,X.jsx)(`code`,{children:`AGENTS.md`}),`) that instruct the AI assistant to analyze project inter-dependencies, document its assumptions in `,(0,X.jsx)(`code`,{children:an}),`, and highlight clarifying questions.`]})]})]}),(0,X.jsxs)(`div`,{className:`flex gap-4 group`,children:[(0,X.jsx)(`div`,{className:`w-8 h-8 rounded-full bg-primary/10 border border-primary/20 text-primary flex items-center justify-center font-bold text-sm shrink-0 group-hover:bg-primary/20 transition-colors`,children:`4`}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h3`,{className:`text-sm font-semibold text-foreground transition-colors`,children:`Orchestrate Background Services`}),(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1 leading-relaxed`,children:`Run APIs, database scripts, and frontend watch tasks concurrently from the web portal. Monitor real-time logs inside a unified terminal pane.`})]})]})]})]}),(0,X.jsx)(`div`,{className:`mt-8 pt-6 border-t border-border`,children:(0,X.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[vn,` offers native worktrees and local AI orchestration without the overhead of containers or virtual machines.`]})})]}),(0,X.jsx)(`div`,{className:`lg:col-span-5 flex flex-col justify-center`,children:(0,X.jsxs)(`div`,{className:`bg-muted border border-border rounded-xl p-8 shadow-sm`,children:[(0,X.jsxs)(`h2`,{className:`text-xl font-semibold text-foreground mb-1 flex items-center gap-2`,children:[(0,X.jsx)(Oi,{className:`text-primary`,size:20}),` Initialize Config`]}),(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground mb-6`,children:`Define the directories on your machine. The fields are empty so you can provide your paths.`}),(0,X.jsxs)(`div`,{className:`space-y-5`,children:[(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block text-sm font-medium text-foreground mb-2`,children:`Development Directory`}),(0,X.jsx)(xt,{type:`text`,placeholder:`e.g. C:\\Users\\username\\dev`,value:e.devDir,onChange:n=>t({...e,devDir:n.target.value})}),n&&(0,X.jsx)(`div`,{className:`text-xs text-muted-foreground mt-1.5 flex justify-between items-center`,children:(0,X.jsxs)(`span`,{children:[`Suggested: `,(0,X.jsx)(`code`,{className:`text-primary`,children:n.devDir})]})})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`label`,{className:`block text-sm font-medium text-foreground mb-2`,children:`Workspaces Directory`}),(0,X.jsx)(xt,{type:`text`,placeholder:`e.g. C:\\Users\\username\\dev\\workspaces`,value:e.workspacesDir,onChange:n=>t({...e,workspacesDir:n.target.value})}),n&&(0,X.jsx)(`div`,{className:`text-xs text-muted-foreground mt-1.5 flex justify-between items-center`,children:(0,X.jsxs)(`span`,{children:[`Suggested: `,(0,X.jsx)(`code`,{className:`text-primary`,children:n.workspacesDir})]})})]}),(0,X.jsxs)(`div`,{className:`pt-2`,children:[(0,X.jsx)(`label`,{htmlFor:`onboardingStorageProvider`,className:`text-sm font-medium text-foreground block mb-2`,children:`Storage Provider`}),(0,X.jsxs)(Th,{value:e.storageProvider||`local`,onValueChange:n=>{if(!n)return;let i={...e,storageProvider:n},a=r.find(e=>e.name===n);a?.configFields?.length&&(i.adapterConfig||={},i.adapterConfig[n]||(i.adapterConfig[n]={}),a.configFields.forEach(e=>{i.adapterConfig[n][e.key]===void 0&&e.default!==void 0&&(i.adapterConfig[n][e.key]=e.default)})),t(i)},children:[(0,X.jsx)(Dh,{id:`onboardingStorageProvider`,children:(0,X.jsx)(Oh,{placeholder:`Select a provider`})}),(0,X.jsx)(kh,{children:r.length>0?r.map(e=>(0,X.jsx)(Ah,{value:e.name,children:e.displayName},e.name)):(0,X.jsx)(Ah,{value:`local`,children:`Local Workspace (Folders)`})})]}),(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground mt-1 block leading-normal`,children:r.find(t=>t.name===(e.storageProvider||`local`))?.description||`Where the generated context files are written. They must sit at the workspace root for an assistant to load them.`})]}),(0,X.jsxs)(`div`,{className:`flex gap-2 pt-2`,children:[(0,X.jsx)(m,{variant:`outline`,className:`flex-1`,onClick:()=>{n&&t({...e,devDir:n.devDir,workspacesDir:n.workspacesDir})},children:`Suggest Defaults`}),(0,X.jsx)(m,{variant:`ghost`,onClick:()=>{t({...e,devDir:``,workspacesDir:``})},children:`Clear`})]}),(0,X.jsx)(`div`,{className:`pt-4`,children:(0,X.jsxs)(m,{className:`w-full gap-2`,disabled:!a,onClick:()=>i(e),children:[`Save & Get Started `,(0,X.jsx)(Qr,{size:16})]})})]})]})})]})})}function Mh(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Nh=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ph=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fh={};function Ih(e,t){return((t||Fh).jsx?Ph:Nh).test(e)}var Lh=/[ \t\n\f\r]/g;function Rh(e){return typeof e==`object`?e.type===`text`&&zh(e.value):zh(e)}function zh(e){return e.replace(Lh,``)===``}var Bh=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Bh.prototype.normal={},Bh.prototype.property={},Bh.prototype.space=void 0;function Vh(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Bh(n,r,t)}function Hh(e){return e.toLowerCase()}var Uh=class{constructor(e,t){this.attribute=t,this.property=e}};Uh.prototype.attribute=``,Uh.prototype.booleanish=!1,Uh.prototype.boolean=!1,Uh.prototype.commaOrSpaceSeparated=!1,Uh.prototype.commaSeparated=!1,Uh.prototype.defined=!1,Uh.prototype.mustUseProperty=!1,Uh.prototype.number=!1,Uh.prototype.overloadedBoolean=!1,Uh.prototype.property=``,Uh.prototype.spaceSeparated=!1,Uh.prototype.space=void 0;var Wh=g({boolean:()=>Kh,booleanish:()=>qh,commaOrSpaceSeparated:()=>Zh,commaSeparated:()=>Xh,number:()=>Q,overloadedBoolean:()=>Jh,spaceSeparated:()=>Yh}),Gh=0,Kh=Qh(),qh=Qh(),Jh=Qh(),Q=Qh(),Yh=Qh(),Xh=Qh(),Zh=Qh();function Qh(){return 2**++Gh}var $h=Object.keys(Wh),eg=class extends Uh{constructor(e,t,n,r){let i=-1;if(super(e,t),tg(this,`space`,r),typeof n==`number`)for(;++i<$h.length;){let e=$h[i];tg(this,$h[i],(n&Wh[e])===Wh[e])}}};eg.prototype.defined=!0;function tg(e,t,n){n&&(e[t]=n)}function ng(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new eg(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Hh(r)]=r,n[Hh(a.attribute)]=r}return new Bh(t,n,e.space)}var rg=ng({properties:{ariaActiveDescendant:null,ariaAtomic:qh,ariaAutoComplete:null,ariaBusy:qh,ariaChecked:qh,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:Yh,ariaCurrent:null,ariaDescribedBy:Yh,ariaDetails:null,ariaDisabled:qh,ariaDropEffect:Yh,ariaErrorMessage:null,ariaExpanded:qh,ariaFlowTo:Yh,ariaGrabbed:qh,ariaHasPopup:null,ariaHidden:qh,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Yh,ariaLevel:Q,ariaLive:null,ariaModal:qh,ariaMultiLine:qh,ariaMultiSelectable:qh,ariaOrientation:null,ariaOwns:Yh,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:qh,ariaReadOnly:qh,ariaRelevant:null,ariaRequired:qh,ariaRoleDescription:Yh,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:qh,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function ig(e,t){return t in e?e[t]:t}function ag(e,t){return ig(e,t.toLowerCase())}var og=ng({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Xh,acceptCharset:Yh,accessKey:Yh,action:null,allow:null,allowFullScreen:Kh,allowPaymentRequest:Kh,allowUserMedia:Kh,alpha:Kh,alt:null,as:null,async:Kh,autoCapitalize:null,autoComplete:Yh,autoFocus:Kh,autoPlay:Kh,blocking:Yh,capture:null,charSet:null,checked:Kh,cite:null,className:Yh,closedBy:null,colorSpace:null,cols:Q,colSpan:Q,command:null,commandFor:null,content:null,contentEditable:qh,controls:Kh,controlsList:Yh,coords:Q|Xh,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Kh,defer:Kh,dir:null,dirName:null,disabled:Kh,download:Jh,draggable:qh,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Kh,formTarget:null,headers:Yh,height:Q,hidden:Jh,high:Q,href:null,hrefLang:null,htmlFor:Yh,httpEquiv:Yh,id:null,imageSizes:null,imageSrcSet:null,inert:Kh,inputMode:null,integrity:null,is:null,isMap:Kh,itemId:null,itemProp:Yh,itemRef:Yh,itemScope:Kh,itemType:Yh,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Kh,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Kh,muted:Kh,name:null,nonce:null,noModule:Kh,noValidate:Kh,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Kh,optimum:Q,pattern:null,ping:Yh,placeholder:null,playsInline:Kh,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Kh,referrerPolicy:null,rel:Yh,required:Kh,reversed:Kh,rows:Q,rowSpan:Q,sandbox:Yh,scope:null,scoped:Kh,seamless:Kh,selected:Kh,shadowRootClonable:Kh,shadowRootCustomElementRegistry:Kh,shadowRootDelegatesFocus:Kh,shadowRootMode:null,shadowRootSerializable:Kh,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:qh,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Kh,useMap:null,value:qh,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Yh,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Kh,declare:Kh,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Kh,noHref:Kh,noShade:Kh,noWrap:Kh,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:qh,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Kh,disablePictureInPicture:Kh,disableRemotePlayback:Kh,exportParts:Xh,part:Yh,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:ag}),sg=ng({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,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`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,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`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,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`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Zh,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:Yh,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Kh,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Xh,g2:Xh,glyphName:Xh,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:Zh,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Yh,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Zh,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Zh,rev:Zh,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Zh,requiredFeatures:Zh,requiredFonts:Zh,requiredFormats:Zh,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:Zh,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Zh,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Zh,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:ig}),cg=ng({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),lg=ng({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:ag}),ug=ng({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),dg={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},fg=/[A-Z]/g,pg=/-[a-z]/g,mg=/^data[-\w.:]+$/i;function hg(e,t){let n=Hh(t),r=t,i=Uh;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&mg.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(pg,_g);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!pg.test(e)){let n=e.replace(fg,gg);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=eg}return new i(r,t)}function gg(e){return`-`+e.toLowerCase()}function _g(e){return e.charAt(1).toUpperCase()}var vg=Vh([rg,og,cg,lg,ug],`html`),yg=Vh([rg,sg,cg,lg,ug],`svg`);function bg(e){return e.join(` `).trim()}var xg=h(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
13
+ `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),Sg=h((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(xg());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Cg=h((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),wg=h(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Sg()),r=Cg();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Tg=Dg(`end`),Eg=Dg(`start`);function Dg(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Og(e){let t=Eg(e),n=Tg(e);if(t&&n)return{start:t,end:n}}function kg(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?jg(e.position):`start`in e||`end`in e?jg(e):`line`in e||`column`in e?Ag(e):``}function Ag(e){return Mg(e&&e.line)+`:`+Mg(e&&e.column)}function jg(e){return Ag(e&&e.start)+`-`+Ag(e&&e.end)}function Mg(e){return e&&typeof e==`number`?e:1}var Ng=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=kg(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Ng.prototype.file=``,Ng.prototype.name=``,Ng.prototype.reason=``,Ng.prototype.message=``,Ng.prototype.stack=``,Ng.prototype.column=void 0,Ng.prototype.line=void 0,Ng.prototype.ancestors=void 0,Ng.prototype.cause=void 0,Ng.prototype.fatal=void 0,Ng.prototype.place=void 0,Ng.prototype.ruleId=void 0,Ng.prototype.source=void 0;var Pg=t(wg(),1),Fg={}.hasOwnProperty,Ig=new Map,Lg=/[A-Z]/g,Rg=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),zg=new Set([`td`,`th`]),Bg=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Vg(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Qg(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Zg(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?yg:vg,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Hg(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Hg(e,t,n){if(t.type===`element`)return Ug(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Wg(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Kg(e,t,n);if(t.type===`mdxjsEsm`)return Gg(e,t);if(t.type===`root`)return qg(e,t,n);if(t.type===`text`)return Jg(e,t)}function Ug(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=yg,e.schema=i),e.ancestors.push(t);let a=i_(e,t.tagName,!1),o=$g(e,t),s=t_(e,t);return Rg.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Rh(e)})),Yg(e,o,a,t),Xg(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Wg(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}a_(e,t.position)}function Gg(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);a_(e,t.position)}function Kg(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=yg,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:i_(e,t.name,!0),o=e_(e,t),s=t_(e,t);return Yg(e,o,a,t),Xg(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function qg(e,t,n){let r={};return Xg(r,t_(e,t)),e.create(t,e.Fragment,r,n)}function Jg(e,t){return t.value}function Yg(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xg(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Zg(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Qg(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Eg(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function $g(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Fg.call(t.properties,i)){let a=n_(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&zg.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function e_(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else a_(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else a_(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function t_(e,t){let n=[],r=-1,i=e.passKeys?new Map:Ig;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Hg(e,a,o);s!==void 0&&n.push(s)}return n}function n_(e,t,n){let r=hg(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Mh(n):bg(n)),r.property===`style`){let t=typeof n==`object`?n:r_(e,String(n));return e.stylePropertyNameCase===`css`&&(t=o_(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?dg[r.property]||r.property:r.attribute,n]}}function r_(e,t){try{return(0,Pg.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Ng("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Bg+`#cannot-parse-style-attribute`,r}}function i_(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Ih(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Ih(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Fg.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);a_(e)}function a_(e,t){let n=new Ng("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Bg+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function o_(e){let t={},n;for(n in e)Fg.call(e,n)&&(t[s_(n)]=e[n]);return t}function s_(e){let t=e.replace(Lg,c_);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function c_(e){return`-`+e.toLowerCase()}var l_={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},u_={};function d_(e,t){let n=t||u_;return f_(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function f_(e,t,n){if(m_(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return p_(e.children,t,n)}return Array.isArray(e)?p_(e,t,n):``}function p_(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=f_(e[i],t,n);return r.join(``)}function m_(e){return!!(e&&typeof e==`object`)}var h_=document.createElement(`i`);function g_(e){let t=`&`+e+`;`;h_.innerHTML=t;let n=h_.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function __(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function v_(e,t){return e.length>0?(__(e,e.length,0,t),e):t}var y_={}.hasOwnProperty;function b_(e){let t={},n=-1;for(;++n<e.length;)x_(t,e[n]);return t}function x_(e,t){let n;for(n in t){let r=(y_.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){y_.call(r,a)||(r[a]=[]);let e=i[a];S_(r[a],Array.isArray(e)?e:e?[e]:[])}}}function S_(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);__(e,0,0,r)}function C_(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function w_(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var T_=I_(/[A-Za-z]/),E_=I_(/[\dA-Za-z]/),D_=I_(/[#-'*+\--9=?A-Z^-~]/);function O_(e){return e!==null&&(e<32||e===127)}var k_=I_(/\d/),A_=I_(/[\dA-Fa-f]/),j_=I_(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function M_(e){return e!==null&&(e<0||e===32)}function N_(e){return e===-2||e===-1||e===32}var P_=I_(/\p{P}|\p{S}/u),F_=I_(/\s/);function I_(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function L_(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&E_(e.charCodeAt(n+1))&&E_(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function R_(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return N_(r)?(e.enter(n),s(r)):t(r)}function s(r){return N_(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var z_={tokenize:B_};function B_(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),R_(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return $(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var V_={tokenize:U_},H_={tokenize:W_};function U_(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return __(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(H_,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(H_,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return $(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;__(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function W_(e,t,n){return R_(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function G_(e){if(e===null||M_(e)||F_(e))return 1;if(P_(e))return 2}function K_(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var q_={name:`attention`,resolveAll:J_,tokenize:Y_};function J_(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};X_(d,-c),X_(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=v_(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=v_(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=v_(l,K_(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=v_(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=v_(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,__(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Y_(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=G_(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=G_(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function X_(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Z_={name:`autolink`,tokenize:Q_};function Q_(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return T_(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||E_(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||E_(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||O_(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):D_(t)?(e.consume(t),l):n(t)}function u(e){return E_(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||E_(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var $_={partial:!0,tokenize:ev};function ev(e,t,n){return r;function r(t){return N_(t)?R_(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||$(e)?t(e):n(e)}}var tv={continuation:{tokenize:rv},exit:iv,name:`blockQuote`,tokenize:nv};function nv(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return N_(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function rv(e,t,n){let r=this;return i;function i(t){return N_(t)?R_(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(tv,t,n)(r)}}function iv(e){e.exit(`blockQuote`)}var av={name:`characterEscape`,tokenize:ov};function ov(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return j_(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var sv={name:`characterReference`,tokenize:cv};function cv(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=E_,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=A_,u):(e.enter(`characterReferenceValue`),a=7,o=k_,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===E_&&!g_(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var lv={partial:!0,tokenize:fv},uv={concrete:!0,name:`codeFenced`,tokenize:dv};function dv(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),N_(t)?R_(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||$(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(lv,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):N_(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),R_(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||$(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&N_(t)?R_(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||$(t)?e.check(lv,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||$(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),N_(t)?R_(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),N_(t)?R_(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||$(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function fv(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var pv={name:`codeIndented`,tokenize:hv},mv={partial:!0,tokenize:gv};function hv(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),R_(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):$(t)?e.attempt(mv,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||$(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function gv(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):R_(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):$(e)?i(e):n(e)}}var _v={name:`codeText`,previous:yv,resolve:vv,tokenize:bv};function vv(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function yv(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function bv(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||$(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var xv=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Sv(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Sv(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Sv(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);Sv(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Sv(this.left,t.reverse())}}}};function Sv(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Cv(e){let t={},n=-1,r,i,a,o,s,c,l,u=new xv(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,wv(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return __(e,0,1/0,u.slice(0)),!l}function wv(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Tv={resolve:Dv,tokenize:Ov},Ev={partial:!0,tokenize:kv};function Dv(e){return Cv(e),e}function Ov(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):$(t)?e.check(Ev,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function kv(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),R_(e,a,`linePrefix`)}function a(i){if(i===null||$(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Av(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||O_(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||$(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||M_(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||O_(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function jv(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):$(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||$(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!N_(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Mv(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),R_(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||$(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Nv(e,t){let n;return r;function r(i){return $(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):N_(i)?R_(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Pv={name:`definition`,tokenize:Iv},Fv={partial:!0,tokenize:Lv};function Iv(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return jv.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=w_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return M_(t)?Nv(e,l)(t):l(t)}function l(t){return Av(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Fv,d,d)(t)}function d(t){return N_(t)?R_(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||$(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Lv(e,t,n){return r;function r(t){return M_(t)?Nv(e,i)(t):n(t)}function i(t){return Mv(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return N_(t)?R_(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||$(e)?t(e):n(e)}}var Rv={name:`hardBreakEscape`,tokenize:zv};function zv(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return $(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Bv={name:`headingAtx`,resolve:Vv,tokenize:Hv};function Vv(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},__(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Hv(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||M_(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||$(n)?(e.exit(`atxHeading`),t(n)):N_(n)?R_(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||M_(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Uv=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Wv=[`pre`,`script`,`style`,`textarea`],Gv={concrete:!0,name:`htmlFlow`,resolveTo:Jv,tokenize:Yv},Kv={partial:!0,tokenize:Zv},qv={partial:!0,tokenize:Xv};function Jv(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Yv(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):T_(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):T_(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return T_(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||M_(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Wv.includes(l)?(i=1,r.interrupt?t(s):O(s)):Uv.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||E_(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return N_(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||T_(t)?(e.consume(t),b):N_(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||E_(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):N_(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):N_(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||$(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||M_(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||N_(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||$(t)?O(t):N_(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),L):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):$(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Kv,R,k)(t)):t===null||$(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(qv,A,R)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||$(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Wv.includes(n)?(e.consume(t),L):O(t)}return T_(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),L):t===45&&i===2?(e.consume(t),I):O(t)}function L(t){return t===null||$(t)?(e.exit(`htmlFlowData`),R(t)):(e.consume(t),L)}function R(n){return e.exit(`htmlFlow`),t(n)}}function Xv(e,t,n){let r=this;return i;function i(t){return $(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Zv(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt($_,t,n)}}var Qv={name:`htmlText`,tokenize:$v};function $v(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):T_(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):T_(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):$(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):$(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):$(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):$(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return T_(t)?(e.consume(t),S):n(t)}function S(t){return t===45||E_(t)?(e.consume(t),S):C(t)}function C(t){return $(t)?(o=C,N(t)):N_(t)?(e.consume(t),C):M(t)}function w(t){return t===45||E_(t)?(e.consume(t),w):t===47||t===62||M_(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||T_(t)?(e.consume(t),E):$(t)?(o=T,N(t)):N_(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||E_(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):$(t)?(o=D,N(t)):N_(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):$(t)?(o=O,N(t)):N_(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):$(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||M_(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||M_(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return N_(t)?R_(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var ey={name:`labelEnd`,resolveAll:iy,resolveTo:ay,tokenize:oy},ty={tokenize:sy},ny={tokenize:cy},ry={tokenize:ly};function iy(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&__(e,0,e.length,n),e}function ay(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=v_(s,e.slice(a+1,a+r+3)),s=v_(s,[[`enter`,u,t]]),s=v_(s,K_(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=v_(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=v_(s,e.slice(o+1)),s=v_(s,[[`exit`,c,t]]),__(e,a,e.length,s),e}function oy(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(w_(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(ty,u,o?u:d)(t):t===91?e.attempt(ny,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(ry,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function sy(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return M_(t)?Nv(e,a)(t):a(t)}function a(t){return t===41?u(t):Av(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return M_(t)?Nv(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Mv(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return M_(t)?Nv(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function cy(e,t,n){let r=this;return i;function i(t){return jv.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(w_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function ly(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var uy={name:`labelStartImage`,resolveAll:ey.resolveAll,tokenize:dy};function dy(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var fy={name:`labelStartLink`,resolveAll:ey.resolveAll,tokenize:py};function py(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var my={name:`lineEnding`,tokenize:hy};function hy(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),R_(e,t,`linePrefix`)}}var gy={name:`thematicBreak`,tokenize:_y};function _y(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||$(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),N_(t)?R_(e,s,`whitespace`)(t):s(t))}}var vy={continuation:{tokenize:Sy},exit:wy,name:`list`,tokenize:xy},yy={partial:!0,tokenize:Ty},by={partial:!0,tokenize:Cy};function xy(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:k_(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(gy,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return k_(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check($_,r.interrupt?n:u,e.attempt(yy,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return N_(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Sy(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check($_,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,R_(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!N_(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(by,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,R_(e,e.attempt(vy,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Cy(e,t,n){let r=this;return R_(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function wy(e){e.exit(this.containerState.type)}function Ty(e,t,n){let r=this;return R_(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!N_(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Ey={name:`setextUnderline`,resolveTo:Dy,tokenize:Oy};function Dy(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Oy(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),N_(t)?R_(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||$(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var ky={tokenize:Ay};function Ay(e){let t=this,n=e.attempt($_,r,e.attempt(this.parser.constructs.flowInitial,i,R_(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Tv,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var jy={resolveAll:Fy()},My=Py(`string`),Ny=Py(`text`);function Py(e){return{resolveAll:Fy(e===`text`?Iy:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Fy(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Iy(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Ly=g({attentionMarkers:()=>Gy,contentInitial:()=>zy,disable:()=>Ky,document:()=>Ry,flow:()=>Vy,flowInitial:()=>By,insideSpan:()=>Wy,string:()=>Hy,text:()=>Uy}),Ry={42:vy,43:vy,45:vy,48:vy,49:vy,50:vy,51:vy,52:vy,53:vy,54:vy,55:vy,56:vy,57:vy,62:tv},zy={91:Pv},By={[-2]:pv,[-1]:pv,32:pv},Vy={35:Bv,42:gy,45:[Ey,gy],60:Gv,61:Ey,95:gy,96:uv,126:uv},Hy={38:sv,92:av},Uy={[-5]:my,[-4]:my,[-3]:my,33:uy,38:sv,42:q_,60:[Z_,Qv],91:fy,92:[Rv,av],93:ey,95:q_,96:_v},Wy={null:[q_,jy]},Gy={null:[42,95]},Ky={null:[]};function qy(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=v_(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=K_(a,l.events,l),l.events):[]}function f(e,t){return Yy(p(e),t)}function p(e){return Jy(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){$(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&__(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Jy(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Yy(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
14
+ `;break;case-3:o=`\r
15
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Xy(e){let t={constructs:b_([Ly,...(e||{}).extensions||[]]),content:n(z_),defined:[],document:n(V_),flow:n(ky),lazy:{},string:n(My),text:n(Ny)};return t;function n(e){return n;function n(n){return qy(t,e,n)}}}function Zy(e){for(;!Cv(e););return e}var Qy=/[\0\t\n\r]/g;function $y(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Qy.lastIndex=u,c=Qy.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var eb=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function tb(e){return e.replace(eb,nb)}function nb(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return C_(n.slice(t?2:1),t?16:10)}return g_(n)||e}var rb={}.hasOwnProperty;function ib(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),ab(n)(Zy(Xy(n).document().write($y()(e,t,!0))))}function ab(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(G),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(oe),blockQuote:a(te),characterEscape:T,characterReference:T,codeFenced:a(ne),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ne,o),codeText:a(re,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(ie),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ae),hardBreakEscape:a(se),hardBreakTrailing:a(se),htmlFlow:a(ce,o),htmlFlowData:T,htmlText:a(ce,o),htmlTextData:T,image:a(le),label:o,link:a(G),listItem:a(de),listItemValue:f,listOrdered:a(ue,d),listUnordered:a(ue),paragraph:a(fe),reference:z,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(oe),strong:a(pe),thematicBreak:a(he)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:W,autolinkProtocol:U,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:ee,characterReference:H,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:F,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:B,resourceDestinationString:I,resourceTitleString:L,resource:R,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};sb(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];rb.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||lb).call(a,void 0,e[0])}for(r.position={start:ob(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ob(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:ob(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||lb).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+kg({start:e.start,end:e.end})+`): it’s not open`);n.position.end=ob(e.end)}function u(){return d_(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=w_(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=me(),n.position={start:ob(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=ob(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=ob(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=tb(t),n.identifier=w_(t).toLowerCase()}function F(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function L(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function R(){this.data.inReference=void 0}function z(){this.data.referenceType=`collapsed`}function B(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=w_(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function V(e){this.data.characterReferenceType=e.type}function ee(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=C_(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=g_(t);let i=this.stack[this.stack.length-1];i.value+=r}function H(e){let t=this.stack.pop();t.position.end=ob(e.end)}function U(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function W(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function te(){return{type:`blockquote`,children:[]}}function ne(){return{type:`code`,lang:null,meta:null,value:``}}function re(){return{type:`inlineCode`,value:``}}function ie(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function ae(){return{type:`emphasis`,children:[]}}function oe(){return{type:`heading`,depth:0,children:[]}}function se(){return{type:`break`}}function ce(){return{type:`html`,value:``}}function le(){return{type:`image`,title:null,url:``,alt:null}}function G(){return{type:`link`,title:null,url:``,children:[]}}function ue(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function de(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function fe(){return{type:`paragraph`,children:[]}}function pe(){return{type:`strong`,children:[]}}function me(){return{type:`text`,value:``}}function he(){return{type:`thematicBreak`}}}function ob(e){return{line:e.line,column:e.column,offset:e.offset}}function sb(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?sb(e,r):cb(e,r)}}function cb(e,t){let n;for(n in t)if(rb.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function lb(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+kg({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+kg({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+kg({start:t.start,end:t.end})+`) is still open`)}function ub(e){let t=this;t.parser=n;function n(n){return ib(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function db(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function fb(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
16
+ `}]}function pb(e,t){let n=t.value?t.value+`
17
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function mb(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hb(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gb(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=L_(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function _b(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vb(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function yb(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function bb(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return yb(e,t);let i={src:L_(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function xb(e,t){let n={src:L_(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Sb(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Cb(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return yb(e,t);let i={href:L_(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function wb(e,t){let n={href:L_(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Tb(e,t,n){let r=e.all(t),i=n?Eb(n):Db(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
18
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
19
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Eb(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Db(n[r])}return t}function Db(e){return e.spread??e.children.length>1}function Ob(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function kb(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ab(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function jb(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Mb(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Eg(t.children[1]),o=Tg(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Nb(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Pb(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Fb=9,Ib=32;function Lb(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Rb(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Rb(t.slice(i),i>0,!1)),a.join(``)}function Rb(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Fb||t===Ib;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Fb||t===Ib;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function zb(e,t){let n={type:`text`,value:Lb(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Bb(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Vb={blockquote:db,break:fb,code:pb,delete:mb,emphasis:hb,footnoteReference:gb,heading:_b,html:vb,imageReference:bb,image:xb,inlineCode:Sb,linkReference:Cb,link:wb,listItem:Tb,list:Ob,paragraph:kb,root:Ab,strong:jb,table:Mb,tableCell:Pb,tableRow:Nb,text:zb,thematicBreak:Bb,toml:Hb,yaml:Hb,definition:Hb,footnoteDefinition:Hb};function Hb(){}var Ub=typeof self==`object`?self:globalThis,Wb=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Ub[e](t)},Gb=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(Wb(e,t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(Wb(a,o),i)};return r},Kb=e=>Gb(new Map,e)(0),qb=``,{toString:Jb}={},{keys:Yb}=Object,Xb=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Jb.call(e).slice(8,-1);switch(n){case`Array`:return[1,qb];case`Object`:return[2,qb];case`Date`:return[3,qb];case`RegExp`:return[4,qb];case`Map`:return[5,qb];case`Set`:return[6,qb];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},Zb=([e,t])=>e===0&&(t===`function`||t===`symbol`),Qb=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Xb(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Yb(r))(e||!Zb(Xb(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,isNaN(r.getTime())?qb:r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Zb(Xb(n))||Zb(Xb(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Zb(Xb(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},$b=(e,{json:t,lossy:n}={})=>{let r=[];return Qb(!(t||n),!!t,new Map,r)(e),r},ex=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Kb($b(e,t)):structuredClone(e):(e,t)=>Kb($b(e,t));function tx(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function nx(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function rx(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||tx,r=e.options.footnoteBackLabel||nx,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=L_(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...ex(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
20
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
21
+ `}]}}var ix=(function(e){if(e==null)return lx;if(typeof e==`function`)return cx(e);if(typeof e==`object`)return Array.isArray(e)?ax(e):ox(e);if(typeof e==`string`)return sx(e);throw Error(`Expected function, string, or object as test`)});function ax(e){let t=[],n=-1;for(;++n<e.length;)t[n]=ix(e[n]);return cx(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function ox(e){let t=e;return cx(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function sx(e){return cx(t);function t(t){return t&&t.type===e}}function cx(e){return t;function t(t,n,r){return!!(ux(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function lx(){return!0}function ux(e){return typeof e==`object`&&!!e&&`type`in e}function dx(e){return e}var fx=[];function px(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=ix(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+dx(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=fx,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=mx(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function mx(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?fx:[e]}function hx(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),px(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var gx={}.hasOwnProperty,_x={};function vx(e,t){let n=t||_x,r=new Map,i=new Map,a={all:s,applyData:bx,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Vb,...n.handlers},one:o,options:n,patch:yx,wrap:Sx};return hx(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(gx.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=ex(n);return r.children=a.all(e),r}return ex(e)}return(a.options.unknownHandler||xx)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Cx(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Cx(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function yx(e,t){e.position&&(t.position=Og(e))}function bx(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,ex(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function xx(e,t){let n=t.data||{},r=`value`in t&&!(gx.call(n,`hProperties`)||gx.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Sx(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
22
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
23
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
24
+ `}),n}function Cx(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function wx(e,t){let n=vx(e,t),r=n.one(e,void 0),i=rx(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
25
+ `},i)),a}function Tx(e,t){return e&&`run`in e?async function(n,r){let i=wx(n,{file:r,...t});await e.run(i,r)}:function(n,r){return wx(n,{file:r,...e||t})}}function Ex(e){if(e)throw e}var Dx=h(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function Ox(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function kx(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Ax(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Ax(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var jx={basename:Mx,dirname:Nx,extname:Px,join:Fx,sep:`/`};function Mx(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Rx(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Nx(e){if(Rx(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Px(e){Rx(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Fx(...e){let t=-1,n;for(;++t<e.length;)Rx(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Ix(n)}function Ix(e){Rx(e);let t=e.codePointAt(0)===47,n=Lx(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Lx(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Rx(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var zx={cwd:Bx};function Bx(){return`/`}function Vx(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Hx(e){if(typeof e==`string`)e=new URL(e);else if(!Vx(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Ux(e)}function Ux(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Wx=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Gx=class{constructor(e){let t;t=e?Vx(e)?{path:e}:typeof e==`string`||Yx(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:zx.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Wx.length;){let e=Wx[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Wx.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?jx.basename(this.path):void 0}set basename(e){qx(e,`basename`),Kx(e,`basename`),this.path=jx.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?jx.dirname(this.path):void 0}set dirname(e){Jx(this.basename,`dirname`),this.path=jx.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?jx.extname(this.path):void 0}set extname(e){if(Kx(e,`extname`),Jx(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=jx.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Vx(e)&&(e=Hx(e)),qx(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?jx.basename(this.path,this.extname):void 0}set stem(e){qx(e,`stem`),Kx(e,`stem`),this.path=jx.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Ng(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Kx(e,t){if(e&&e.includes(jx.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+jx.sep+"`")}function qx(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Jx(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Yx(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Xx=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Zx=t(Dx(),1),Qx={}.hasOwnProperty,$x=new class e extends Xx{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=kx()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Zx.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(nS(`data`,this.frozen),this.namespace[e]=t,this):Qx.call(this.namespace,e)&&this.namespace[e]||void 0:e?(nS(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=aS(e),n=this.parser||this.Parser;return eS(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),eS(`process`,this.parser||this.Parser),tS(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=aS(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);sS(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),eS(`processSync`,this.parser||this.Parser),tS(`processSync`,this.compiler||this.Compiler),this.process(e,r),iS(`processSync`,`process`,t),n;function r(e,r){t=!0,Ex(e),n=r}}run(e,t,n){rS(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=aS(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),iS(`runSync`,`run`,n),r;function i(e,t){Ex(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=aS(t),r=this.compiler||this.Compiler;return tS(`stringify`,r),rS(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(nS(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Zx.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Ox(o)&&Ox(r)&&(r=(0,Zx.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function eS(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function tS(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function nS(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function rS(e){if(!Ox(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function iS(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function aS(e){return oS(e)?e:new Gx(e)}function oS(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function sS(e){return typeof e==`string`||cS(e)}function cS(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var lS=[],uS={allowDangerousHtml:!0},dS=/^(https?|ircs?|mailto|xmpp)$/i,fS=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function pS(e){let t=mS(e),n=hS(e);return gS(t.runSync(t.parse(n),n),e)}function mS(e){let t=e.rehypePlugins||lS,n=e.remarkPlugins||lS,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...uS}:uS;return $x().use(ub).use(n).use(Tx,r).use(t)}function hS(e){let t=e.children||``,n=new Gx;return typeof t==`string`?n.value=t:``+t,n}function gS(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||_S;for(let e of fS)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return hx(e,l),Vg(e,{Fragment:X.Fragment,components:i,ignoreInvalidStyle:!0,jsx:X.jsx,jsxs:X.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in l_)if(Object.hasOwn(l_,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=l_[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function _S(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||dS.test(e.slice(0,t))?e:``}function vS(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function yS(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function bS(e,t,n){let r=ix((n||{}).ignore||[]),i=xS(t),a=-1;for(;++a<i.length;)px(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function xS(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([SS(e[0]),CS(e[1])])}return t}function SS(e){return typeof e==`string`?new RegExp(yS(e),`g`):e}function CS(e){return typeof e==`function`?e:function(){return e}}var wS=`phrasing`,TS=[`autolink`,`link`,`image`,`label`];function ES(){return{transforms:[PS],enter:{literalAutolink:OS,literalAutolinkEmail:kS,literalAutolinkHttp:kS,literalAutolinkWww:kS},exit:{literalAutolink:NS,literalAutolinkEmail:MS,literalAutolinkHttp:AS,literalAutolinkWww:jS}}}function DS(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:wS,notInConstruct:TS},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:wS,notInConstruct:TS},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:wS,notInConstruct:TS}]}}function OS(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function kS(e){this.config.enter.autolinkProtocol.call(this,e)}function AS(e){this.config.exit.autolinkProtocol.call(this,e)}function jS(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function MS(e){this.config.exit.autolinkEmail.call(this,e)}function NS(e){this.exit(e)}function PS(e){bS(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,FS],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,IS]],{ignore:[`link`,`linkReference`]})}function FS(e,t,n,r,i){let a=``;if(!zS(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!LS(n)))return!1;let o=RS(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function IS(e,t,n,r){return!zS(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function LS(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function RS(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=vS(e,`(`),a=vS(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function zS(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||F_(n)||P_(n))&&(!t||n!==47)}YS.peek=JS;function BS(){this.buffer()}function VS(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function HS(){this.buffer()}function US(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function WS(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=w_(this.sliceSerialize(e)).toLowerCase(),n.label=t}function GS(e){this.exit(e)}function KS(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=w_(this.sliceSerialize(e)).toLowerCase(),n.label=t}function qS(e){this.exit(e)}function JS(){return`[`}function YS(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function XS(){return{enter:{gfmFootnoteCallString:BS,gfmFootnoteCall:VS,gfmFootnoteDefinitionLabelString:HS,gfmFootnoteDefinition:US},exit:{gfmFootnoteCallString:WS,gfmFootnoteCall:GS,gfmFootnoteDefinitionLabelString:KS,gfmFootnoteDefinition:qS}}}function ZS(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:YS},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
26
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?$S:QS))),s(),o}}function QS(e,t,n){return t===0?e:$S(e,t,n)}function $S(e,t,n){return(n?``:` `)+e}var eC=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];aC.peek=oC;function tC(){return{canContainEols:[`delete`],enter:{strikethrough:rC},exit:{strikethrough:iC}}}function nC(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:eC}],handlers:{delete:aC}}}function rC(e){this.enter({type:`delete`,children:[]},e)}function iC(e){this.exit(e)}function aC(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function oC(){return`~`}function sC(e){return e.length}function cC(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||sC,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=lC(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=uC(r[d]);else{let e=uC(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
27
+ `)}function lC(e){return e==null?``:String(e)}function uC(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function dC(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),fC);return i(),o}function fC(e,t,n){return`>`+(n?``:` `)+e}function pC(e,t){return mC(e,t.inConstruct,!0)&&!mC(e,t.notInConstruct,!1)}function mC(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function hC(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
28
+ `&&pC(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
29
+ `}function gC(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function _C(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function vC(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function yC(e,t,n,r){let i=vC(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(_C(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,bC);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(gC(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
30
+ `,encode:["`"],...s.current()})),t()}return u+=s.move(`
31
+ `),a&&(u+=s.move(a+`
32
+ `)),u+=s.move(c),l(),u}function bC(e,t,n){return(n?``:` `)+e}function xC(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function SC(e,t,n,r){let i=xC(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
33
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function CC(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function wC(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function TC(e,t,n){let r=G_(e),i=G_(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}EC.peek=DC;function EC(e,t,n,r){let i=CC(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=TC(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=wC(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=TC(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+wC(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function DC(e,t,n){return n.options.emphasis||`*`}function OC(e,t){let n=!1;return hx(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&d_(e)&&(t.options.setext||n))}function kC(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(OC(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
34
+ `,after:`
35
+ `});return r(),t(),o+`
36
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
37
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
38
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=wC(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}AC.peek=jC;function AC(e){return e.value||``}function jC(){return`<`}MC.peek=NC;function MC(e,t,n,r){let i=xC(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function NC(){return`!`}PC.peek=FC;function PC(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function FC(){return`!`}IC.peek=LC;function IC(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function LC(){return"`"}function RC(e,t){let n=d_(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}zC.peek=BC;function zC(e,t,n,r){let i=xC(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(RC(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function BC(e,t,n){return RC(e,n)?`<`:`[`}VC.peek=HC;function VC(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function HC(){return`[`}function UC(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function WC(e){let t=UC(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function GC(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function KC(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function qC(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?GC(n):UC(n),s=e.ordered?o===`.`?`)`:`.`:WC(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),KC(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function JC(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function YC(e,t,n,r){let i=JC(n),a=n.bulletCurrent||UC(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function XC(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var ZC=ix([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function QC(e,t,n,r){return(e.children.some(function(e){return ZC(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function $C(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ew.peek=tw;function ew(e,t,n,r){let i=$C(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=TC(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=wC(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=TC(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+wC(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function tw(e,t,n){return n.options.strong||`*`}function nw(e,t,n,r){return n.safe(e.value,r)}function rw(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function iw(e,t,n){let r=(KC(n)+(n.options.ruleSpaces?` `:``)).repeat(rw(n));return n.options.ruleSpaces?r.slice(0,-1):r}var aw={blockquote:dC,break:hC,code:yC,definition:SC,emphasis:EC,hardBreak:hC,heading:kC,html:AC,image:MC,imageReference:PC,inlineCode:IC,link:zC,linkReference:VC,list:qC,listItem:YC,paragraph:XC,root:QC,strong:ew,text:nw,thematicBreak:iw};function ow(){return{enter:{table:sw,tableData:dw,tableHeader:dw,tableRow:lw},exit:{codeText:fw,table:cw,tableData:uw,tableHeader:uw,tableRow:uw}}}function sw(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function cw(e){this.exit(e),this.data.inTable=void 0}function lw(e){this.enter({type:`tableRow`,children:[]},e)}function uw(e){this.exit(e)}function dw(e){this.enter({type:`tableCell`,children:[]},e)}function fw(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,pw));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function pw(e,t){return t===`|`?t:e}function mw(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
39
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
40
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return cC(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=aw.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function hw(){return{exit:{taskListCheckValueChecked:_w,taskListCheckValueUnchecked:_w,paragraph:vw}}}function gw(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:yw}}}function _w(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function vw(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function yw(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=aw.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function bw(){return[ES(),XS(),tC(),ow(),hw()]}function xw(e){return{extensions:[DS(),ZS(e),nC(),mw(e),gw()]}}var Sw={tokenize:Iw,partial:!0},Cw={tokenize:Lw,partial:!0},ww={tokenize:Rw,partial:!0},Tw={tokenize:zw,partial:!0},Ew={tokenize:Bw,partial:!0},Dw={name:`wwwAutolink`,tokenize:Pw,previous:Vw},Ow={name:`protocolAutolink`,tokenize:Fw,previous:Hw},kw={name:`emailAutolink`,tokenize:Nw,previous:Uw},Aw={};function jw(){return{text:Aw}}for(var Mw=48;Mw<123;)Aw[Mw]=kw,Mw++,Mw===58?Mw=65:Mw===91&&(Mw=97);Aw[43]=kw,Aw[45]=kw,Aw[46]=kw,Aw[95]=kw,Aw[72]=[kw,Ow],Aw[104]=[kw,Ow],Aw[87]=[kw,Dw],Aw[119]=[kw,Dw];function Nw(e,t,n){let r=this,i,a;return o;function o(t){return!Ww(t)||!Uw.call(r,r.previous)||Gw(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Ww(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Ew,u,l)(t):t===45||t===95||E_(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&T_(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Pw(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Vw.call(r,r.previous)||Gw(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(Sw,e.attempt(Cw,e.attempt(ww,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Fw(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Hw.call(r,r.previous)&&!Gw(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(T_(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||O_(t)||M_(t)||F_(t)||P_(t)?n(t):e.attempt(Cw,e.attempt(ww,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Iw(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Lw(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Tw,c,s)(t):t===null||M_(t)||F_(t)||t!==45&&P_(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Rw(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Tw,t,a)(o):o===null||M_(o)||F_(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function zw(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||M_(o)||F_(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||M_(e)||F_(e)?t(e):r(e)}function a(e){return T_(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):T_(t)?(e.consume(t),o):n(t)}}function Bw(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return E_(e)?n(e):t(e)}}function Vw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||M_(e)}function Hw(e){return!T_(e)}function Uw(e){return!(e===47||Ww(e))}function Ww(e){return e===43||e===45||e===46||e===95||E_(e)}function Gw(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Kw={tokenize:eT,partial:!0};function qw(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Zw,continuation:{tokenize:Qw},exit:$w}},text:{91:{name:`gfmFootnoteCall`,tokenize:Xw},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Jw,resolveTo:Yw}}}}function Jw(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=w_(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Yw(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Xw(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||M_(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(w_(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return M_(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Zw(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||M_(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=w_(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return M_(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),R_(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Qw(e,t,n){return e.check($_,t,e.attempt(Kw,t,n))}function $w(e){e.exit(`gfmFootnoteDefinition`)}function eT(e,t,n){let r=this;return R_(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function tT(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&__(o,o.length,0,K_(s,e.slice(r+1,n),t)),__(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),__(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=G_(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=G_(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var nT=class{constructor(){this.map=[]}add(e,t,n){rT(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function rT(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function iT(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function aT(){return{flow:{null:{name:`table`,tokenize:oT,resolveAll:sT}}}}function oT(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):$(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):N_(t)?R_(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||M_(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,N_(t)?R_(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return N_(t)?R_(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||$(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return N_(t)?R_(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||$(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||$(n)?(e.exit(`tableRow`),t(n)):N_(n)?R_(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||M_(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function sT(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new nT;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(lT(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=cT(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=cT(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=cT(f,t,o,i,n,d)):(o[0]=o[1],d=cT(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&lT(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=iT(t.events,n))}return e}function cT(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},uT(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=uT(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=uT(t.events,n[2]),a=uT(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},uT(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function lT(e,t,n,r,i){let a=[],o=uT(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function uT(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var dT={name:`tasklistCheck`,tokenize:pT};function fT(){return{text:{91:dT}}}function pT(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return M_(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return $(r)?t(r):N_(r)?e.check({tokenize:mT},t,n)(r):n(r)}}function mT(e,t,n){return R_(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function hT(e){return b_([jw(),qw(),tT(e),aT(),fT()])}var gT={};function _T(e){let t=this,n=e||gT,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(hT(n)),a.push(bw()),o.push(xw(n))}var vT=[_T],yT=({content:e})=>(0,X.jsx)(`div`,{className:`prose prose-sm max-w-none text-foreground prose-a:text-primary prose-code:text-foreground prose-headings:text-foreground prose-pre:border prose-pre:border-border prose-pre:bg-muted/50 prose-strong:text-foreground prose-li:marker:text-muted-foreground`,children:(0,X.jsx)(pS,{remarkPlugins:vT,children:e})}),bT=kf,xT=xf;function ST({className:e,...t}){return(0,X.jsx)(mf,{forceRender:!0,className:l(`fixed inset-0 z-50 bg-background/60 backdrop-blur-xs transition-all duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0`,e),"data-slot":`dialog-backdrop`,...t})}function CT({className:e,...t}){return(0,X.jsx)(Af,{className:l(`fixed inset-0 z-50 grid grid-rows-[1fr_auto_1fr] justify-items-center p-4`,e),"data-slot":`dialog-viewport`,...t})}function wT({className:e,children:t,showCloseButton:n=!0,bottomStickOnMobile:r=!0,...i}){return(0,X.jsxs)(xT,{children:[(0,X.jsx)(ST,{}),(0,X.jsx)(CT,{className:l(r&&`max-sm:grid-rows-[1fr_auto] max-sm:p-0 max-sm:pt-12`),children:(0,X.jsxs)(bf,{className:l(`-translate-y-[calc(1.25rem*var(--nested-dialogs))] relative row-start-2 flex max-h-full min-h-0 w-full min-w-0 max-w-xl scale-[calc(1-0.1*var(--nested-dialogs))] flex-col rounded-xl border border-border bg-popover text-popover-foreground opacity-[calc(1-0.1*var(--nested-dialogs))] shadow-2xl transition-[scale,opacity,translate] duration-150 ease-out will-change-transform data-nested:data-ending-style:translate-y-8 data-nested:data-starting-style:translate-y-8 data-nested-dialog-open:origin-top data-ending-style:scale-98 data-starting-style:scale-98 data-ending-style:opacity-0 data-starting-style:opacity-0`,r&&`max-sm:max-w-none max-sm:rounded-none max-sm:border-x-0 max-sm:border-t max-sm:border-b-0 max-sm:opacity-[calc(1-min(var(--nested-dialogs),1))] max-sm:data-ending-style:translate-y-4 max-sm:data-starting-style:translate-y-4`,e),"data-slot":`dialog-popup`,...i,children:[t,n&&(0,X.jsx)(hf,{"aria-label":`Close`,className:`absolute end-2 top-2`,render:(0,X.jsx)(m,{size:`icon`,variant:`ghost`}),children:(0,X.jsx)(Ri,{})})]})})]})}function TT({className:e,...t}){return(0,X.jsx)(`div`,{className:l(`flex flex-col gap-2 p-6 in-[[data-slot=dialog-popup]:has([data-slot=dialog-panel])]:pb-3 max-sm:pb-4`,e),"data-slot":`dialog-header`,...t})}function ET({className:e,variant:t=`default`,...n}){return(0,X.jsx)(`div`,{className:l(`flex flex-col-reverse gap-2 px-6 sm:flex-row sm:justify-end sm:rounded-b-[calc(var(--radius-2xl)-1px)]`,t==="default"&&`border-t bg-muted/72 py-4`,t===`bare`&&`in-[[data-slot=dialog-popup]:has([data-slot=dialog-panel])]:pt-3 pt-4 pb-6`,e),"data-slot":`dialog-footer`,...n})}function DT({className:e,...t}){return(0,X.jsx)(jf,{className:l(`font-heading font-semibold text-xl leading-none`,e),"data-slot":`dialog-title`,...t})}function OT({className:e,...t}){return(0,X.jsx)(gf,{className:l(`text-muted-foreground text-sm`,e),"data-slot":`dialog-description`,...t})}function kT({className:e,scrollFade:t=!0,...n}){return(0,X.jsx)(ip,{scrollFade:t,children:(0,X.jsx)(`div`,{className:l(`p-6 in-[[data-slot=dialog-popup]:has([data-slot=dialog-header])]:pt-1 in-[[data-slot=dialog-popup]:has([data-slot=dialog-footer]:not(.border-t))]:pb-1`,e),"data-slot":`dialog-panel`,...n})})}function AT({className:e,...t}){return(0,X.jsx)(hi,{"aria-label":`Loading`,className:l(`animate-spin`,e),role:`status`,...t})}var jT=u(`inline-flex w-fit shrink-0 items-center gap-1.5 whitespace-nowrap rounded-full border px-2 py-0.5 font-medium text-[11px] tracking-tight transition-colors`,{defaultVariants:{tone:`neutral`},variants:{tone:{success:`border-emerald-500/20 bg-emerald-500/10 text-emerald-600 dark:border-emerald-500/25 dark:bg-emerald-500/15 dark:text-emerald-300`,warning:`border-amber-500/20 bg-amber-500/10 text-amber-700 dark:border-amber-500/25 dark:bg-amber-500/15 dark:text-amber-300`,danger:`border-rose-500/20 bg-rose-500/10 text-rose-600 dark:border-rose-500/25 dark:bg-rose-500/15 dark:text-rose-300`,running:`border-sky-500/20 bg-sky-500/10 text-sky-700 dark:border-sky-500/25 dark:bg-sky-500/15 dark:text-sky-300`,info:`border-blue-500/20 bg-blue-500/10 text-blue-600 dark:border-blue-500/25 dark:bg-blue-500/15 dark:text-blue-300`,accent:`border-primary/25 bg-primary/10 text-primary`,idle:`border-border/70 bg-muted/60 text-muted-foreground`,neutral:`border-border/70 bg-muted/60 text-muted-foreground`,"in-place":`border-sky-500/20 bg-sky-500/10 text-sky-700 dark:text-sky-300 font-mono text-[10px]`,worktree:`border-primary/20 bg-primary/10 text-primary font-mono text-[10px]`}}});function MT({className:e,tone:t,dot:n=!0,children:r,...i}){return(0,X.jsxs)(`span`,{className:l(jT({className:e,tone:t})),"data-slot":`status-badge`,...i,children:[n&&(0,X.jsx)(`span`,{"aria-hidden":!0,className:`size-1.5 rounded-full bg-current opacity-70`}),r]})}function NT(e){switch(e){case`up-to-date`:return{label:`In sync`,tone:`success`};case`rebased`:return{label:`Rebased`,tone:`accent`};case`conflict`:case`stash-conflict`:return{label:`Sync conflict`,tone:`danger`};case`error`:return{label:`Sync error`,tone:`danger`};default:return{label:`Not synced`,tone:`idle`}}}function PT(e){return e.replace(/[\\/]+$/,``).split(/[\\/]/).pop()||e}function FT(e,t){let n=PT(t),r=e.find(e=>e.branchName===n);if(r)return r;let i=e.filter(e=>e.repos.some(e=>PT(e)===n));return i.length===1?i[0]:void 0}async function IT(e){if(typeof navigator<`u`&&navigator.clipboard&&window.isSecureContext)try{return await navigator.clipboard.writeText(e),!0}catch{}try{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-999999px`,t.style.top=`-999999px`,t.style.opacity=`0`,document.body.appendChild(t),t.focus(),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}catch{return!1}}var LT=e=>e===`antigravity`?`Antigravity`:e===`claude`?`Claude Code`:e===`codex`?`OpenAI Codex`:`GitHub Copilot`,RT=e=>e===`claude`?`warning`:e===`codex`?`success`:e===`antigravity`?`accent`:`info`,zT=(e,t)=>{switch(e){case`antigravity`:return`agy --conversation ${t}`;case`claude`:return`claude --resume ${t}`;case`codex`:return`codex resume ${t}`;case`copilot`:return`copilot --resume ${t}`;case`cursor`:return`cursor-agent --resume ${t}`;default:return`agy --conversation ${t}`}};function BT({activeSession:e,transcript:t,transcriptLoading:n,setActiveSession:r,workspaces:i,workspace:a,handleOpenDesktopSession:o,showToast:s}){let c=im(),l=wm(),u=c.data?.find(e=>e.id===`codex-desktop`),d=u?.available===!0,f=c.isLoading?`Checking whether Codex Desktop is available…`:c.isError?`Could not check whether Codex Desktop is available.`:u?.unavailableReason??`Codex Desktop is not available on this computer.`,p=(0,Y.useRef)(!1),h=(0,Y.useRef)(!1),g=(0,Y.useRef)(null),[_,v]=(0,Y.useState)(!1),[y,b]=(0,Y.useState)(!1);(0,Y.useEffect)(()=>{!n&&t.length>0&&g.current?.scrollIntoView({behavior:`auto`})},[n,t]);let x=()=>a??FT(i,e.workspacePath),S=async()=>{if(!d||p.current)return;let t=x();if(!t){s(`Could not match this session to a workspace — it may have been removed.`,`error`);return}p.current=!0,v(!0);try{await o(t,e.id,e.assistant)&&r(null)}finally{p.current=!1,v(!1)}},C=async()=>{if(h.current)return;let t=x();if(!t){s(`Could not match this session to a workspace.`,`error`);return}h.current=!0,b(!0);try{await l.mutateAsync({workspaceId:t.branchName,assistant:e.assistant,sessionId:e.id,cwd:e.workspacePath}),s(`Launched interactive terminal for ${LT(e.assistant)}.`,`success`),r(null)}catch{let t=zT(e.assistant,e.id);await IT(t)?s(`Could not open terminal automatically. Copied command to clipboard:\n\n${t}`,`info`):s(`Could not open terminal automatically. Run manually:\n\n${t}`,`error`)}finally{b(!1),h.current=!1}};return(0,X.jsx)(bT,{open:!0,onOpenChange:e=>!e&&r(null),children:(0,X.jsxs)(wT,{className:`h-[80vh] max-w-4xl`,children:[(0,X.jsx)(TT,{children:(0,X.jsxs)(`div`,{children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[(0,X.jsx)(MT,{tone:RT(e.assistant),children:LT(e.assistant)}),(0,X.jsxs)(`span`,{className:`text-[10px] font-mono bg-muted/60 text-muted-foreground px-1.5 py-0.5 rounded`,children:[`Read-Only Transcript · `,t.length,` turns`]}),(0,X.jsxs)(`span`,{className:`text-[10px] text-muted-foreground font-mono`,children:[`ID: `,e.id.slice(0,8)]})]}),(0,X.jsx)(DT,{className:`max-w-xl truncate text-sm`,title:e.title,children:e.title}),(0,X.jsxs)(OT,{className:`sr-only`,children:[`Read-only transcript log and resume options for session `,e.id]})]})}),(0,X.jsxs)(kT,{className:`space-y-4`,children:[n?(0,X.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-2`,children:[(0,X.jsx)(AT,{className:`size-6 text-primary`}),(0,X.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Loading conversation history...`})]}):t.length===0?(0,X.jsx)(`div`,{className:`flex h-full items-center justify-center text-xs text-muted-foreground`,children:`No messages found in this transcript.`}):t.map((t,n)=>(0,X.jsxs)(`div`,{className:`flex flex-col ${t.role===`user`?`items-end`:`items-start`}`,children:[(0,X.jsxs)(`div`,{className:`mb-1 px-1 text-[10px] text-muted-foreground`,children:[t.role===`user`?`Developer`:e.assistant===`antigravity`?`Antigravity`:e.assistant===`claude`?`Claude`:e.assistant===`codex`?`Codex`:`Copilot`,t.timestamp&&` • ${new Date(t.timestamp).toLocaleTimeString()}`]}),(0,X.jsx)(`div`,{className:`max-w-[85%] rounded-xl border px-4 py-3 text-xs leading-relaxed ${t.role===`user`?`rounded-tr-none border-primary/30 bg-primary/10 text-foreground dark:border-primary/40 dark:bg-primary/20`:`rounded-tl-none border-border bg-card text-foreground shadow-xs dark:bg-muted/30`}`,children:(0,X.jsx)(yT,{content:t.content})})]},n)),(0,X.jsx)(`div`,{ref:g})]}),(0,X.jsxs)(ET,{className:`sm:justify-between`,children:[(0,X.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`Read-only transcript. Interactive coding happens in your terminal or IDE.`}),(0,X.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,X.jsxs)(m,{variant:`outline`,size:`sm`,onClick:async()=>{let t=zT(e.assistant,e.id);await IT(t),s(`Copied run command to clipboard:\n\n${t}`,`success`)},children:[(0,X.jsx)(oi,{size:13}),` Copy CLI Command`]}),(0,X.jsxs)(m,{size:`sm`,variant:`default`,disabled:y,onClick:()=>void C(),children:[y?(0,X.jsx)(AT,{className:`size-3`}):(0,X.jsx)(Pi,{size:12}),`Resume in Terminal`]}),e.assistant===`codex`&&(0,X.jsxs)(m,{variant:`outline`,size:`sm`,disabled:!d||_,title:d?`Open this exact thread in Codex Desktop`:f,"aria-label":d?`Open in Codex Desktop`:`Codex Desktop unavailable: ${f}`,onClick:()=>void S(),children:[_?(0,X.jsx)(AT,{className:`size-3`}):(0,X.jsx)(ci,{size:12}),_?`Opening…`:`Open in Codex Desktop`]})]})]})]})})}function VT({className:e,size:t=`default`,unstyled:n=!1,...r}){return(0,X.jsx)(`span`,{className:l(!n&&`relative inline-flex w-full rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16 has-aria-invalid:border-destructive/36 has-focus-visible:border-ring has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none has-focus-visible:ring-[3px] not-has-disabled:has-not-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] sm:text-sm dark:bg-input/32 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:has-not-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]`,e)||void 0,"data-size":t,"data-slot":`textarea-control`,children:(0,X.jsx)(Nt,{render:e=>(0,X.jsx)(`textarea`,{className:l(`field-sizing-content min-h-17.5 w-full rounded-[inherit] px-[calc(--spacing(3)-1px)] py-[calc(--spacing(1.5)-1px)] outline-none max-sm:min-h-20.5 border-none bg-transparent resize-none h-full`,t===`sm`&&`min-h-16.5 px-[calc(--spacing(2.5)-1px)] py-[calc(--spacing(1)-1px)] max-sm:min-h-19.5`,t===`lg`&&`min-h-18.5 py-[calc(--spacing(2)-1px)] max-sm:min-h-21.5`),"data-slot":`textarea`,...d(e,r)})})})}function HT(e){return e===`review`||e===`workspace-write`}var UT=e=>`${_n}${e}`,WT=e=>`${gn}${e}`,GT=()=>({v:4,sessions:{},providerId:null,profilesByProvider:{"claude-cli":`review`,"codex-cli":`review`},modelsByProvider:{},effortsByProvider:{},messages:[]});function KT(e){try{let t=localStorage.getItem(UT(e))||localStorage.getItem(WT(e));if(!t)return GT();let n=JSON.parse(t);if(Array.isArray(n))return{...GT(),messages:n.filter(e=>e&&typeof e.content==`string`&&(e.role===`user`||e.role===`assistant`)).map(e=>({role:e.role,content:e.content}))};if(n&&n.v===4&&n.sessions&&Array.isArray(n.messages)){let e=Object.fromEntries(Object.entries(n.profilesByProvider??{}).filter(e=>HT(e[1]))),t=typeof n.modelsByProvider==`object`&&n.modelsByProvider!==null?Object.fromEntries(Object.entries(n.modelsByProvider).filter(e=>typeof e[0]==`string`&&typeof e[1]==`string`)):{},r=typeof n.effortsByProvider==`object`&&n.effortsByProvider!==null?Object.fromEntries(Object.entries(n.effortsByProvider).filter(e=>typeof e[0]==`string`&&typeof e[1]==`string`)):{};return{...GT(),sessions:n.sessions,providerId:typeof n.providerId==`string`?n.providerId:null,profilesByProvider:{...GT().profilesByProvider,...e},modelsByProvider:t,effortsByProvider:r,messages:n.messages}}if(n&&n.v===3&&n.sessions&&Array.isArray(n.messages))return{...GT(),sessions:n.sessions,providerId:typeof n.providerId==`string`?n.providerId:null,messages:n.messages};if(n&&n.v===2&&Array.isArray(n.messages)){let e={};return typeof n.sessionId==`string`&&n.sessionId&&(e[`claude-cli`]={id:n.sessionId,started:!!n.sessionStarted}),{v:4,sessions:e,providerId:typeof n.providerId==`string`?n.providerId:null,profilesByProvider:GT().profilesByProvider,messages:n.messages}}return GT()}catch{return GT()}}var qT=500;async function JT(e){try{let t=await fetch(`/api/chat/thread/${encodeURIComponent(e)}`);if(!t.ok)return null;let n=await t.json();if(n&&n.thread){let e=n.thread;return{v:4,sessions:e.sessions||{},providerId:e.providerId||null,profilesByProvider:{...GT().profilesByProvider,...e.profilesByProvider||{}},modelsByProvider:e.modelsByProvider||{},effortsByProvider:e.effortsByProvider||{},messages:Array.isArray(e.messages)?e.messages:[],isBusy:!!n.isBusy}}return null}catch{return null}}async function YT(e,t){try{let n=t.messages.length>qT?{...t,messages:t.messages.slice(-500)}:t;await fetch(`/api/chat/thread/${encodeURIComponent(e)}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)})}catch{}}async function XT(e){try{await fetch(`/api/chat/thread/${encodeURIComponent(e)}`,{method:`DELETE`})}catch{}}function ZT(e,t){try{let n=t.messages.length>qT?{...t,messages:t.messages.slice(-500)}:t;localStorage.setItem(UT(e),JSON.stringify(n)),YT(e,n)}catch(e){console.error(`Failed to save chat to localStorage`,e)}}function QT(e){try{localStorage.removeItem(UT(e)),XT(e),localStorage.removeItem(WT(e))}catch{}}var $T=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,eE=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[a-zA-Z0-9_\-.]{1,128})$/i,tE=new Set([`claude-cli`,`codex-cli`,`antigravity-cli`,`copilot-cli`]);function nE(e){return e===`claude`?`claude-cli`:e===`codex`?`codex-cli`:e===`antigravity`?`antigravity-cli`:e===`copilot`?`copilot-cli`:null}function rE(e){if(!e||typeof e!=`object`)return null;let t=e.chatLaunch;if(!t||typeof t!=`object`)return null;let n=t;return!$T.test(n.nonce??``)||!n.providerId||!tE.has(n.providerId)||!HT(n.executionProfile)||n.kickoff!==void 0&&(typeof n.kickoff!=`string`||n.kickoff.length>2e3)||n.model!==void 0&&(typeof n.model!=`string`||n.model.length>100)||n.assistant!==void 0&&nE(n.assistant)!==n.providerId||n.sessionId!==void 0&&(!eE.test(n.sessionId)||!n.assistant)?null:n}function iE({className:e,...t}){return(0,X.jsx)(`div`,{className:l(`flex min-w-0 flex-1 flex-col items-center justify-center gap-6 text-balance p-6 text-center md:p-12`,e),"data-slot":`empty`,...t})}function aE({className:e,...t}){return(0,X.jsx)(`div`,{className:l(`flex max-w-sm flex-col items-center text-center`,e),"data-slot":`empty-header`,...t})}var oE=u(`flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{defaultVariants:{variant:`default`},variants:{variant:{default:`bg-transparent`,icon:`relative flex size-9 shrink-0 items-center justify-center rounded-md border bg-card not-dark:bg-clip-padding text-foreground shadow-sm/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)] [&_svg:not([class*='size-'])]:size-4.5`}}});function sE({className:e,variant:t=`default`,...n}){return(0,X.jsxs)(`div`,{className:l(`relative mb-6`,e),"data-slot":`empty-media`,"data-variant":t,...n,children:[t===`icon`&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`div`,{"aria-hidden":`true`,className:l(oE({className:e,variant:t}),`-translate-x-0.5 -rotate-10 pointer-events-none absolute bottom-px origin-bottom-left scale-84 shadow-none`)}),(0,X.jsx)(`div`,{"aria-hidden":`true`,className:l(oE({className:e,variant:t}),`pointer-events-none absolute bottom-px origin-bottom-right translate-x-0.5 rotate-10 scale-84 shadow-none`)})]}),(0,X.jsx)(`div`,{className:l(oE({className:e,variant:t})),...n})]})}function cE({className:e,...t}){return(0,X.jsx)(`div`,{className:l(`font-heading font-semibold text-xl`,e),"data-slot":`empty-title`,...t})}function lE({className:e,...t}){return(0,X.jsx)(`div`,{className:l(`text-muted-foreground text-sm [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4 [[data-slot=empty-title]+&]:mt-1`,e),"data-slot":`empty-description`,...t})}function uE({className:e,...t}){return(0,X.jsx)(`div`,{className:l(`animate-skeleton rounded-sm [--skeleton-highlight:--alpha(var(--color-white)/64%)] [background:linear-gradient(120deg,transparent_40%,var(--skeleton-highlight),transparent_60%)_var(--color-muted)_0_0/200%_100%_fixed] dark:[--skeleton-highlight:--alpha(var(--color-white)/4%)]`,e),"data-slot":`skeleton`,...t})}function dE({open:e,onClose:t,ws:n,onPick:r,error:i,pending:a=!1}){let[o,s]=(0,Y.useState)([]),[c,l]=(0,Y.useState)(!1),[u,d]=(0,Y.useState)(null);(0,Y.useEffect)(()=>{e&&(l(!0),d(null),fetch(`/api/workspace/${encodeURIComponent(n.branchName)}/sessions`).then(e=>e.json()).then(e=>{let t=(e.sessions||[]).filter(e=>e.assistant===`claude`||e.assistant===`codex`||e.assistant===`antigravity`||e.assistant===`copilot`);s(t)}).catch(()=>d(`Failed to load sessions.`)).finally(()=>l(!1)))},[e,n.branchName]);let f=e=>{switch(e){case`codex`:return`Codex`;case`antigravity`:return`Antigravity`;case`copilot`:return`Copilot`;default:return`Claude`}};return(0,X.jsx)(bT,{open:e,onOpenChange:e=>!e&&t(),children:(0,X.jsxs)(wT,{className:`max-w-lg`,children:[(0,X.jsx)(TT,{children:(0,X.jsx)(DT,{children:`Resume a past session`})}),(0,X.jsxs)(kT,{className:`flex max-h-[60vh] flex-col gap-2`,children:[(i||u)&&(0,X.jsx)(`div`,{className:`rounded-lg border border-destructive/25 bg-destructive/10 px-3 py-2 text-xs text-destructive-foreground`,children:i||u}),c?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(uE,{className:`h-14`}),(0,X.jsx)(uE,{className:`h-14`}),(0,X.jsx)(uE,{className:`h-14`})]}):o.length===0?(0,X.jsx)(iE,{children:(0,X.jsxs)(aE,{children:[(0,X.jsx)(sE,{variant:`icon`,children:(0,X.jsx)(Ti,{})}),(0,X.jsx)(cE,{children:`No resumable sessions found`}),(0,X.jsx)(lE,{children:`Past conversations for this workspace will show up here.`})]})}):o.map(e=>(0,X.jsxs)(`button`,{onClick:()=>r(e),disabled:a,className:`cursor-pointer rounded-lg border border-border bg-card p-3 text-left transition-colors hover:border-foreground/15 hover:bg-accent/50 disabled:cursor-wait disabled:opacity-60`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(`span`,{className:`rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase text-muted-foreground`,children:f(e.assistant)}),(0,X.jsx)(`div`,{className:`truncate text-sm font-medium text-foreground`,title:e.title,children:e.title})]}),(0,X.jsxs)(`div`,{className:`mt-1 flex items-center gap-2 text-[11px] text-muted-foreground`,children:[(0,X.jsx)(`span`,{children:a?`Loading transcript…`:new Date(e.updatedAt).toLocaleString()}),(0,X.jsx)(`span`,{children:`·`}),(0,X.jsx)(vi,{size:11}),(0,X.jsxs)(`span`,{children:[e.messageCount,` messages`]})]})]},e.id))]})]})})}var fE=h(((e,t)=>{var n=[[{color:`0, 0, 0`,class:`ansi-black`},{color:`187, 0, 0`,class:`ansi-red`},{color:`0, 187, 0`,class:`ansi-green`},{color:`187, 187, 0`,class:`ansi-yellow`},{color:`0, 0, 187`,class:`ansi-blue`},{color:`187, 0, 187`,class:`ansi-magenta`},{color:`0, 187, 187`,class:`ansi-cyan`},{color:`255,255,255`,class:`ansi-white`}],[{color:`85, 85, 85`,class:`ansi-bright-black`},{color:`255, 85, 85`,class:`ansi-bright-red`},{color:`0, 255, 0`,class:`ansi-bright-green`},{color:`255, 255, 85`,class:`ansi-bright-yellow`},{color:`85, 85, 255`,class:`ansi-bright-blue`},{color:`255, 85, 255`,class:`ansi-bright-magenta`},{color:`85, 255, 255`,class:`ansi-bright-cyan`},{color:`255, 255, 255`,class:`ansi-bright-white`}]],r=/(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&amp;|%[A-Fa-f0-9]{2})+)/gm;t.exports=class e{static escapeForHtml(t){return new e().escapeForHtml(t)}static linkify(t){return new e().linkify(t)}static ansiToHtml(t,n){return new e().ansiToHtml(t,n)}static ansiToJson(t,n){return new e().ansiToJson(t,n)}static ansiToText(t){return new e().ansiToText(t)}constructor(){this.fg=this.bg=this.fg_truecolor=this.bg_truecolor=null,this.bright=0,this.decorations=[]}setupPalette(){this.PALETTE_COLORS=[];for(let e=0;e<2;++e)for(let t=0;t<8;++t)this.PALETTE_COLORS.push(n[e][t].color);let e=[0,95,135,175,215,255],t=(t,n,r)=>e[t]+`, `+e[n]+`, `+e[r];for(let e=0;e<6;++e)for(let n=0;n<6;++n)for(let r=0;r<6;++r)this.PALETTE_COLORS.push(t(e,n,r));let r=8;for(let e=0;e<24;++e,r+=10)this.PALETTE_COLORS.push(r+`, `+r+`, `+r)}escapeForHtml(e){return e.replace(/[&<>\"]/gm,e=>e==`&`?`&amp;`:e==`"`?`&quot;`:e==`<`?`&lt;`:e==`>`?`&gt;`:``)}linkify(e){return e.replace(r,e=>`<a href="${e}">${e}</a>`)}ansiToHtml(e,t){return this.process(e,t,!0)}ansiToJson(e,t){return t||={},t.json=!0,t.clearLine=!1,this.process(e,t,!0)}ansiToText(e){return this.process(e,{},!1)}process(e,t,n){let r=this,i=e.split(/\033\[/),a=i.shift();t??={},t.clearLine=/\r/.test(e);let o=i.map(e=>this.processChunk(e,t,n));if(t&&t.json){let e=r.processChunkJson(``);return e.content=a,e.clearLine=t.clearLine,o.unshift(e),t.remove_empty&&(o=o.filter(e=>!e.isEmpty())),o}return o.unshift(a),o.join(``)}processChunkJson(e,t,r){t=t===void 0?{}:t;let i=t.use_classes=t.use_classes!==void 0&&t.use_classes,a=t.key=i?`class`:`color`,o={content:e,fg:null,bg:null,fg_truecolor:null,bg_truecolor:null,isInverted:!1,clearLine:t.clearLine,decoration:null,decorations:[],was_processed:!1,isEmpty:()=>!o.content},s=e.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);if(!s)return o;o.content=s[4];let c=s[2].split(`;`);if(s[1]!==``||s[3]!==`m`||!r)return o;let l=this;for(;c.length>0;){let e=c.shift(),t=parseInt(e);if(isNaN(t)||t===0)l.fg=l.bg=null,l.decorations=[];else if(t===1)l.decorations.push(`bold`);else if(t===2)l.decorations.push(`dim`);else if(t===3)l.decorations.push(`italic`);else if(t===4)l.decorations.push(`underline`);else if(t===5)l.decorations.push(`blink`);else if(t===7)l.decorations.push(`reverse`);else if(t===8)l.decorations.push(`hidden`);else if(t===9)l.decorations.push(`strikethrough`);else if(t===21)l.removeDecoration(`bold`);else if(t===22)l.removeDecoration(`bold`),l.removeDecoration(`dim`);else if(t===23)l.removeDecoration(`italic`);else if(t===24)l.removeDecoration(`underline`);else if(t===25)l.removeDecoration(`blink`);else if(t===27)l.removeDecoration(`reverse`);else if(t===28)l.removeDecoration(`hidden`);else if(t===29)l.removeDecoration(`strikethrough`);else if(t===39)l.fg=null;else if(t===49)l.bg=null;else if(t>=30&&t<38)l.fg=n[0][t%10][a];else if(t>=90&&t<98)l.fg=n[1][t%10][a];else if(t>=40&&t<48)l.bg=n[0][t%10][a];else if(t>=100&&t<108)l.bg=n[1][t%10][a];else if(t===38||t===48){let e=t===38;if(c.length>=1){let t=c.shift();if(t===`5`&&c.length>=1){let t=parseInt(c.shift());if(t>=0&&t<=255){if(!i)this.PALETTE_COLORS||l.setupPalette(),e?l.fg=this.PALETTE_COLORS[t]:l.bg=this.PALETTE_COLORS[t];else{let r=t>=16?`ansi-palette-`+t:n[+(t>7)][t%8].class;e?l.fg=r:l.bg=r}}}else if(t===`2`&&c.length>=3){let t=parseInt(c.shift()),n=parseInt(c.shift()),r=parseInt(c.shift());if(t>=0&&t<=255&&n>=0&&n<=255&&r>=0&&r<=255){let a=t+`, `+n+`, `+r;i?e?(l.fg=`ansi-truecolor`,l.fg_truecolor=a):(l.bg=`ansi-truecolor`,l.bg_truecolor=a):e?l.fg=a:l.bg=a}}}}}return l.fg===null&&l.bg===null&&l.decorations.length===0?o:(o.fg=l.fg,o.bg=l.bg,o.fg_truecolor=l.fg_truecolor,o.bg_truecolor=l.bg_truecolor,o.decorations=l.decorations,o.decoration=l.decorations.slice(-1).pop()||null,o.was_processed=!0,o)}processChunk(e,t,r){t||={};let i=this.processChunkJson(e,t,r),a=t.use_classes;if(i.decorations=i.decorations.filter(e=>{if(e===`reverse`){i.fg||=n[0][7][a?`class`:`color`],i.bg||=n[0][0][a?`class`:`color`];let e=i.fg;i.fg=i.bg,i.bg=e;let t=i.fg_truecolor;return i.fg_truecolor=i.bg_truecolor,i.bg_truecolor=t,i.isInverted=!0,!1}return!0}),t.json)return i;if(i.isEmpty())return``;if(!i.was_processed)return i.content;let o=[],s=[],c=[],l={},u=e=>{let t=[],n;for(n in e)e.hasOwnProperty(n)&&t.push(`data-`+n+`="`+this.escapeForHtml(e[n])+`"`);return t.length>0?` `+t.join(` `):``};return i.isInverted&&(l[`ansi-is-inverted`]=`true`),i.fg&&(a?(o.push(i.fg+`-fg`),i.fg_truecolor!==null&&(l[`ansi-truecolor-fg`]=i.fg_truecolor,i.fg_truecolor=null)):o.push(`color:rgb(`+i.fg+`)`)),i.bg&&(a?(o.push(i.bg+`-bg`),i.bg_truecolor!==null&&(l[`ansi-truecolor-bg`]=i.bg_truecolor,i.bg_truecolor=null)):o.push(`background-color:rgb(`+i.bg+`)`)),i.decorations.forEach(e=>{if(a){s.push(`ansi-`+e);return}e===`bold`?s.push(`font-weight:bold`):e===`dim`?s.push(`opacity:0.5`):e===`italic`?s.push(`font-style:italic`):e===`hidden`?s.push(`visibility:hidden`):e===`strikethrough`?c.push(`line-through`):c.push(e)}),c.length&&s.push(`text-decoration:`+c.join(` `)),a?`<span class="`+o.concat(s).join(` `)+`"`+u(l)+`>`+i.content+`</span>`:`<span style="`+o.concat(s).join(`;`)+`"`+u(l)+`>`+i.content+`</span>`}removeDecoration(e){let t=this.decorations.indexOf(e);t>=0&&this.decorations.splice(t,1)}}})),pE=h(((e,t)=>{function n(e){if(!e)return``;if(!/\r/.test(e))return e;for(e=e.replace(/\r+\n/gm,`
41
+ `);/\r./.test(e);)e=e.replace(/^([^\r\n]*)\r+([^\r\n]+)/gm,function(e,t,n){return n+t.slice(n.length)});return e}function r(e){for(var t=0,n=0;n<e.length;n++)e[t].length<=e[n].length&&(t=n);return t}function i(e){if(!/\r/.test(e))return e;for(var t=e.split(`\r`),n=[];t.length>0;){var i=r(t);n.push(t[i]),t=t.slice(i+1)}return n.join(`\r`)}function a(e){if(!e)return``;if(!/\r/.test(e))return e;if(!/\n/.test(e))return i(e);e=e.replace(/\r+\n/gm,`
42
+ `);var t=e.lastIndexOf(`
43
+ `);return n(e.slice(0,t))+`
44
+ `+i(e.slice(t+1))}t.exports=n,t.exports.escapeCarriageReturn=n,t.exports.escapeCarriageReturnSafe=a})),mE=h((e=>{e.Any=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,e.Cc=/[\0-\x1F\x7F-\x9F]/,e.Cf=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,e.P=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,e.S=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,e.Z=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/})),hE=h(((e,t)=>{var n=mE();function r(e){let t={};e||={},t.src_Any=n.Any.source,t.src_Cc=n.Cc.source,t.src_Z=n.Z.source,t.src_P=n.P.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join(`|`),t.src_ZCc=[t.src_Z,t.src_Cc].join(`|`);let r=`[><|]`;return t.src_pseudo_letter=`(?:(?!${r}|${t.src_ZPCc})${t.src_Any})`,t.src_ip4=`(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)`,t.src_auth=`(?:(?:(?!${t.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,t.src_port=`(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?`,t.src_host_terminator=`(?=$|${r}|${t.src_ZPCc})(?!${e[`---`]?`-(?!--)|`:`-|`}_|:\\d|\\.-|\\.(?!$|${t.src_ZPCc}))`,t.src_path=`(?:[/?#](?:(?!${t.src_ZCc}|${r}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${t.src_ZCc}|\\]).)*\\]|\\((?:(?!${t.src_ZCc}|[)]).)*\\)|\\{(?:(?!${t.src_ZCc}|[}]).)*\\}|\\"(?:(?!${t.src_ZCc}|["]).)+\\"|\\'(?:(?!${t.src_ZCc}|[']).)+\\'|\\'(?=${t.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${t.src_ZCc}|[.]|$)|`+(e[`---`]?`\\-(?!--(?:[^-]|$))(?:-*)|`:`\\-+|`)+`,(?!${t.src_ZCc}|$)|;(?!${t.src_ZCc}|$)|\\!+(?!${t.src_ZCc}|[!]|$)|\\?(?!${t.src_ZCc}|[?]|$))+|\\/)?`,t.src_email_name=`[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}`,t.src_xn=`xn--[a-z0-9\\-]{1,59}`,t.src_domain_root=`(?:`+t.src_xn+`|${t.src_pseudo_letter}{1,63})`,t.src_domain=`(?:`+t.src_xn+`|(?:${t.src_pseudo_letter})|(?:${t.src_pseudo_letter}(?:-|${t.src_pseudo_letter}){0,61}${t.src_pseudo_letter}))`,t.src_host=`(?:(?:(?:(?:${t.src_domain})\\.)*${t.src_domain}))`,t.tpl_host_fuzzy=`(?:`+t.src_ip4+`|(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%)))`,t.tpl_host_no_ip_fuzzy=`(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%))`,t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${t.src_ZPCc}|>|$))`,t.tpl_email_fuzzy=`(^|${r}|"|\\(|${t.src_ZCc})(${t.src_email_name}@${t.tpl_host_fuzzy_strict})`,t.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${t.src_ZPCc}))((?![$+<=>^\`|\uff5c])${t.tpl_host_port_fuzzy_strict}${t.src_path})`,t.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`|\uff5c]|${t.src_ZPCc}))((?![$+<=>^\`|\uff5c])${t.tpl_host_port_no_ip_fuzzy_strict}${t.src_path})`,t}function i(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e}function a(e){return Object.prototype.toString.call(e)}function o(e){return a(e)===`[object String]`}function s(e){return a(e)===`[object Object]`}function c(e){return a(e)===`[object RegExp]`}function l(e){return a(e)===`[object Function]`}function u(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,`\\$&`)}var d={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function f(e){return Object.keys(e||{}).reduce(function(e,t){return e||d.hasOwnProperty(t)},!1)}var p={"http:":{validate:function(e,t,n){let r=e.slice(t);return n.re.http||(n.re.http=RegExp(`^\\/\\/${n.re.src_auth}${n.re.src_host_port_strict}${n.re.src_path}`,`i`)),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":`http:`,"ftp:":`http:`,"//":{validate:function(e,t,n){let r=e.slice(t);return n.re.no_http||(n.re.no_http=RegExp(`^`+n.re.src_auth+`(?:localhost|(?:(?:${n.re.src_domain})\\.)+${n.re.src_domain_root})`+n.re.src_port+n.re.src_host_terminator+n.re.src_path,`i`)),n.re.no_http.test(r)?t>=3&&e[t-3]===`:`||t>=3&&e[t-3]===`/`?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){let r=e.slice(t);return n.re.mailto||(n.re.mailto=RegExp(`^${n.re.src_email_name}@${n.re.src_host_strict}`,`i`)),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},m=`a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]`,h=`biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф`.split(`|`);function g(e){return function(t,n){let r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function _(){return function(e,t){t.normalize(e)}}function v(e){let t=e.re=r(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(m),n.push(t.src_xn),t.src_tlds=n.join(`|`);function i(e){return e.replace(`%TLDS%`,t.src_tlds)}t.email_fuzzy=RegExp(i(t.tpl_email_fuzzy),`i`),t.email_fuzzy_global=RegExp(i(t.tpl_email_fuzzy),`ig`),t.link_fuzzy=RegExp(i(t.tpl_link_fuzzy),`i`),t.link_fuzzy_global=RegExp(i(t.tpl_link_fuzzy),`ig`),t.link_no_ip_fuzzy=RegExp(i(t.tpl_link_no_ip_fuzzy),`i`),t.link_no_ip_fuzzy_global=RegExp(i(t.tpl_link_no_ip_fuzzy),`ig`),t.host_fuzzy_test=RegExp(i(t.tpl_host_fuzzy_test),`i`);let a=[];e.__compiled__={};function d(e,t){throw Error(`(LinkifyIt) Invalid schema "${e}": ${t}`)}Object.keys(e.__schemas__).forEach(function(t){let n=e.__schemas__[t];if(n===null)return;let r={validate:null,link:null};if(e.__compiled__[t]=r,s(n)){c(n.validate)?r.validate=g(n.validate):l(n.validate)?r.validate=n.validate:d(t,n),l(n.normalize)?r.normalize=n.normalize:n.normalize?d(t,n):r.normalize=_();return}if(o(n)){a.push(t);return}d(t,n)}),a.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[``]={validate:null,normalize:_()};let f=Object.keys(e.__compiled__).filter(function(t){return t.length>0&&e.__compiled__[t]}).map(u).join(`|`);e.re.schema_test=RegExp(`(^|(?!_)(?:[><\uff5c]|${t.src_ZPCc}))(${f})`,`i`),e.re.schema_search=RegExp(`(^|(?!_)(?:[><\uff5c]|${t.src_ZPCc}))(${f})`,`ig`),e.re.schema_at_start=RegExp(`^${e.re.schema_search.source}`,`i`),e.re.pretest=RegExp(`(${e.re.schema_test.source})|(${e.re.host_fuzzy_test.source})|@`,`i`)}function y(e,t,n,r){let i=e.slice(n,r);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=r,this.raw=i,this.text=i,this.url=i}function b(e,t){if(!(this instanceof b))return new b(e,t);t||f(e)&&(t=e,e={}),this.__opts__=i({},d,t),this.__schemas__=i({},p,e),this.__compiled__={},this.__tlds__=h,this.__tlds_replaced__=!1,this.re={},v(this)}b.prototype.add=function(e,t){return this.__schemas__[e]=t,v(this),this},b.prototype.set=function(e){return this.__opts__=i(this.__opts__,e),this},b.prototype.test=function(e){if(!e.length)return!1;let t,n;if(this.re.schema_test.test(e)){for(n=this.re.schema_search,n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0}return!!(this.__opts__.fuzzyLink&&this.__compiled__[`http:`]&&e.search(this.re.host_fuzzy_test)>=0&&e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy)!==null||this.__opts__.fuzzyEmail&&this.__compiled__[`mailto:`]&&e.indexOf(`@`)>=0&&e.match(this.re.email_fuzzy)!==null)},b.prototype.pretest=function(e){return this.re.pretest.test(e)},b.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},b.prototype.match=function(e){let t=[],n=[],r=[],i=[],a,o,s;function c(e,t){return e?t?e.index===t.index?e.lastIndex>=t.lastIndex?e:t:e.index<t.index?e:t:e:t}if(!e.length)return null;if(this.re.schema_test.test(e))for(s=this.re.schema_search,s.lastIndex=0;(a=s.exec(e))!==null;)o=this.testSchemaAt(e,a[2],s.lastIndex),o&&n.push({schema:a[2],index:a.index+a[1].length,lastIndex:a.index+a[0].length+o});if(this.__opts__.fuzzyLink&&this.__compiled__[`http:`])for(s=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,s.lastIndex=0;(a=s.exec(e))!==null;)r.push({schema:``,index:a.index+a[1].length,lastIndex:a.index+a[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__[`mailto:`])for(s=this.re.email_fuzzy_global,s.lastIndex=0;(a=s.exec(e))!==null;)i.push({schema:`mailto:`,index:a.index+a[1].length,lastIndex:a.index+a[0].length});let l=[0,0,0],u=0;for(;;){let a=[n[l[0]],i[l[1]],r[l[2]]],o=c(c(a[0],a[1]),a[2]);if(!o)break;if(o===a[0]?l[0]++:o===a[1]?l[1]++:l[2]++,o.index<u)continue;let s=new y(e,o.schema,o.index,o.lastIndex);this.__compiled__[s.schema].normalize(s,this),t.push(s),u=o.lastIndex}return t.length?t:null},b.prototype.matchAtStart=function(e){if(!e.length)return null;let t=this.re.schema_at_start.exec(e);if(!t)return null;let n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;let r=new y(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__compiled__[r.schema].normalize(r,this),r},b.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,n){return e!==n[t-1]}).reverse(),v(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,v(this),this)},b.prototype.normalize=function(e){e.schema||(e.url=`http://${e.url}`),e.schema===`mailto:`&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)},b.prototype.onCompile=function(){},t.exports=b})),gE=t(h((t=>{var n=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=t&&t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=t&&t.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var i={};if(t!=null)for(var a=e(t),o=0;o<a.length;o++)a[o]!=="default"&&n(i,t,a[o]);return r(i,t),i}})(),a=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var o=a(fE()),s=pE(),c=a(hE()),l=i(e());function u(e,t=!1){return e=(0,s.escapeCarriageReturn)(_(e)),o.default.ansiToJson(e,{json:!0,remove_empty:!0,use_classes:t})}function d(e){let t=``;return e.bg&&(t+=`${e.bg}-bg `),e.fg&&(t+=`${e.fg}-fg `),e.decoration&&(t+=`ansi-${e.decoration} `),t===``?null:(t=t.substring(0,t.length-1),t)}function f(e){let t={};switch(e.bg&&(t.backgroundColor=`rgb(${e.bg})`),e.fg&&(t.color=`rgb(${e.fg})`),e.decoration){case`bold`:t.fontWeight=`bold`;break;case`dim`:t.opacity=`0.5`;break;case`italic`:t.fontStyle=`italic`;break;case`hidden`:t.visibility=`hidden`;break;case`strikethrough`:t.textDecoration=`line-through`;break;case`underline`:t.textDecoration=`underline`;break;case`blink`:t.textDecoration=`blink`}return t}function p(e,t,n,r){let i=t?null:f(n),a=t?d(n):null;return e?e===`fuzzy`?h(n,r,i,a):m(n,r,i,a):l.createElement(`span`,{style:i,key:r,className:a},n.content)}function m(e,t,n,r){let i=[],a=/(\s|^)(https?:\/\/(?:www\.|(?!www))[^\s.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/g,o=0,s;for(;(s=a.exec(e.content))!==null;){let[,t,n]=s,r=s.index+t.length;r>o&&i.push(e.content.substring(o,r));let c=n.startsWith(`www.`)?`http://${n}`:n;i.push(l.createElement(`a`,{key:o,href:c,target:`_blank`},`${n}`)),o=a.lastIndex}return o<e.content.length&&i.push(e.content.substring(o)),l.createElement(`span`,{style:n,key:t,className:r},i)}function h(e,t,n,r){let i=(0,c.default)({fuzzyEmail:!1}).tlds([`io`],!0);if(!i.pretest(e.content))return l.createElement(`span`,{style:n,key:t,className:r},e.content);let a=i.match(e.content);if(!a)return l.createElement(`span`,{style:n,key:t,className:r},e.content);let o=[e.content.substring(0,a[0]?.index)];return a.forEach((t,n)=>{o.push(l.createElement(`a`,{href:t.url,target:`_blank`,key:n},e.content.substring(t.index,t.lastIndex))),a[n+1]&&o.push(e.content.substring(a[n].lastIndex,a[n+1]?.index))}),a[a.length-1].lastIndex!==e.content.length&&o.push(e.content.substring(a[a.length-1].lastIndex,e.content.length)),l.createElement(`span`,{style:n,key:t,className:r},o)}function g(e){let{className:t,useClasses:n,children:r,linkify:i}=e;return l.createElement(`code`,{className:t},u(r??``,n??!1).map(p.bind(null,i??!1,n??!1)))}function _(e){let t=e;do e=t,t=e.replace(/[^\n]\x08/gm,``);while(t.length<e.length);return e}}))(),1),_E=gE.default.default||gE.default,vE=[{id:``,label:`Auto Effort`,description:`Model/provider default reasoning depth`},{id:`low`,label:`Low Effort`,description:`Fast responses with lightweight reasoning`},{id:`medium`,label:`Medium Effort`,description:`Balanced reasoning depth and latency`},{id:`high`,label:`High Effort`,description:`Deep multi-step reasoning and verification`},{id:`max`,label:`Max Effort`,description:`Maximum thinking budget for complex tasks`}];function yE(e){return e?e.charAt(0).toUpperCase()+e.slice(1):`Auto`}var bE={"claude-cli":new Set([`npm install -g @anthropic-ai/claude-code`,`claude auth login`,`claude auth status --json`]),"claude-sdk":new Set([`npm install -g @anthropic-ai/claude-code`,`claude auth login`,`claude auth status --json`]),"codex-cli":new Set([`npm install -g @openai/codex`,`codex login`,`codex login status`]),"codex-sdk":new Set([`npm install -g @openai/codex`,`codex login`,`codex login status`]),"antigravity-cli":new Set([`agy`]),"copilot-cli":new Set([`copilot login`,`copilot help`])},xE=new Set([`native-api`,`cli-print`,`acp`,`sdk`]),SE=new Set([`none`,`client-assigned`,`provider-assigned`]),CE=new Set([`read-only`,`workspace-write`,`harness-managed`]),wE=new Set([`uuid`,`opaque`]),TE=new Set([`missing-cli`,`signed-out`,`probe-failed`]);function EE(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function DE(e){return e===void 0||typeof e==`string`}function OE(e){return!EE(e)||typeof e.transport!=`string`||!xE.has(e.transport)||typeof e.sessionIdentity!=`string`||!SE.has(e.sessionIdentity)||typeof e.workspaceAccess!=`string`||!CE.has(e.workspaceAccess)||e.sessionIdFormat!==void 0&&(typeof e.sessionIdFormat!=`string`||!wE.has(e.sessionIdFormat))?null:{transport:e.transport,sessionIdentity:e.sessionIdentity,workspaceAccess:e.workspaceAccess,...e.sessionIdFormat===void 0?{}:{sessionIdFormat:e.sessionIdFormat}}}function kE(e){if(!EE(e)||typeof e.id!=`string`||typeof e.name!=`string`||typeof e.isConfigured!=`boolean`||!DE(e.icon)||!DE(e.accessLabel)||!DE(e.message)||!DE(e.recoveryCommand)||!DE(e.recoveryLabel)||e.setupIssue!==void 0&&(typeof e.setupIssue!=`string`||!TE.has(e.setupIssue)))return null;let t=OE(e.capabilities);if(!t)return null;let n;if(e.executionProfiles!==void 0){if(!Array.isArray(e.executionProfiles)||e.executionProfiles.length===0)return null;n=[];let t=new Set;for(let r of e.executionProfiles){if(!EE(r)||!HT(r.id)||typeof r.label!=`string`||typeof r.description!=`string`||t.has(r.id))return null;t.add(r.id),n.push({id:r.id,label:r.label,description:r.description})}}if(e.defaultExecutionProfile!==void 0&&(!HT(e.defaultExecutionProfile)||!n?.some(t=>t.id===e.defaultExecutionProfile))||n&&e.defaultExecutionProfile===void 0||!n&&e.defaultExecutionProfile!==void 0)return null;let r;if(e.models!==void 0){if(!Array.isArray(e.models)||e.models.length===0)return null;r=[];let t=new Set;for(let n of e.models){if(!EE(n)||typeof n.id!=`string`||n.id.length>100||typeof n.label!=`string`||n.label.length===0||n.label.length>100||typeof n.description!=`string`||n.description.length>300||t.has(n.id))return null;t.add(n.id),r.push({id:n.id,label:n.label,description:n.description})}}let i=e.setupIssue!==void 0||e.recoveryCommand!==void 0||e.recoveryLabel!==void 0,a=e.setupIssue!==void 0&&e.recoveryCommand!==void 0&&e.recoveryLabel!==void 0;return i&&!a||e.isConfigured&&i?null:{id:e.id,name:e.name,isConfigured:e.isConfigured,capabilities:t,...e.icon===void 0?{}:{icon:e.icon},...e.accessLabel===void 0?{}:{accessLabel:e.accessLabel},...e.message===void 0?{}:{message:e.message},...e.setupIssue===void 0?{}:{setupIssue:e.setupIssue},...e.recoveryCommand===void 0?{}:{recoveryCommand:e.recoveryCommand},...e.recoveryLabel===void 0?{}:{recoveryLabel:e.recoveryLabel},...n===void 0?{}:{executionProfiles:n},...e.defaultExecutionProfile===void 0?{}:{defaultExecutionProfile:e.defaultExecutionProfile},...r===void 0?{}:{models:r}}}function AE(e){if(!Array.isArray(e))return null;let t=[];for(let n of e){let e=kE(n);if(!e)return null;t.push(e)}return t}function jE(e){return!e.recoveryCommand||!bE[e.id]?.has(e.recoveryCommand)?null:{command:e.recoveryCommand,label:e.recoveryLabel??`Copy recovery command`}}function ME(e){return!e||e.toLowerCase().includes(`review`)?`Review`:e.toLowerCase().includes(`edit`)||e.toLowerCase().includes(`write`)?`Edit`:e}function NE(e,t){if(!t)return`Auto`;let n=e.models?.find(e=>e.id===t);return n?n.label:t}function PE(e,t){let n=!1,r={...e};for(let i of t){let t=e[i.id];t&&i.models&&!i.models.some(e=>e.id===t)&&(delete r[i.id],n=!0)}return n?r:e}var FE=e=>e?new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):null,IE=(0,Y.memo)(function({msg:e,idx:t,copied:n,onCopy:r}){if(e.role===`system`)return(0,X.jsx)(`div`,{className:`flex justify-center`,children:(0,X.jsx)(`span`,{className:l(`rounded-full border px-3 py-1 text-center text-[11px]`,e.kind===`error`?`border-destructive/25 bg-destructive/10 text-destructive-foreground`:`border-border bg-muted text-muted-foreground`),children:e.content})});let i=e.role===`user`,a=!i&&e.content.includes(`\x1B`);return(0,X.jsxs)(`div`,{className:`flex flex-col ${i?`items-end`:`items-start`}`,children:[(0,X.jsx)(`div`,{className:`group relative max-w-[85%] rounded-lg p-3 ${i?`bg-primary text-primary-foreground`:`border border-border bg-card text-foreground`}`,children:i?(0,X.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[e.images&&e.images.length>0&&(0,X.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.images.map((e,t)=>(0,X.jsx)(`img`,{src:e,alt:`Attached`,className:`max-h-48 max-w-full rounded-lg border border-white/20 object-contain shadow-xs cursor-pointer hover:opacity-95`,onClick:()=>window.open(e,`_blank`)},t))}),e.content&&(0,X.jsx)(`div`,{className:`whitespace-pre-wrap text-sm`,children:e.content})]}):(0,X.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[a?(0,X.jsx)(`div`,{className:`overflow-x-auto whitespace-pre-wrap rounded-md bg-muted/50 p-2 font-mono text-xs text-foreground`,children:(0,X.jsx)(_E,{children:e.content})}):(0,X.jsx)(yT,{content:e.content}),e.filesChanged&&e.filesChanged.length>0&&(0,X.jsxs)(`div`,{className:`mt-2 flex flex-col gap-1.5 rounded-md border border-border/70 bg-muted/30 p-2 text-xs`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5 font-medium text-muted-foreground`,children:[(0,X.jsx)(li,{size:13,className:`text-primary`}),(0,X.jsxs)(`span`,{children:[e.filesChanged.length,` file`,e.filesChanged.length>1?`s`:``,` modified`]})]}),(0,X.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.filesChanged.map((e,t)=>(0,X.jsx)(`span`,{className:`rounded bg-background px-1.5 py-0.5 font-mono text-[10px] text-foreground border border-border/50`,children:e},t))})]}),(0,X.jsx)(`button`,{onClick:()=>r(t,e.content),className:`absolute -right-2.5 -top-2.5 hidden h-6 w-6 cursor-pointer place-items-center rounded-md border border-border bg-card text-muted-foreground shadow-sm hover:text-foreground group-hover:grid`,title:`Copy message`,children:n?(0,X.jsx)(ri,{size:12,className:`text-success-foreground`}):(0,X.jsx)(oi,{size:12})})]})}),i&&e.executionProfile&&(0,X.jsx)(`span`,{className:`mt-1 rounded border border-border px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-wide text-muted-foreground`,children:e.executionProfile===`workspace-write`?`Edit`:`Review`}),e.ts&&(0,X.jsx)(`span`,{className:`mt-1 text-[10px] text-muted-foreground`,children:FE(e.ts)})]})});function LE({ws:e}){let t=_o(),n=bo(),[r,i]=(0,Y.useState)([]),[a,o]=(0,Y.useState)(!1),[s]=(0,Y.useState)(()=>KT(e.branchName)),[c,u]=(0,Y.useState)(s.messages),[d,f]=(0,Y.useState)(``),[p,h]=(0,Y.useState)(!1),[g,_]=(0,Y.useState)(!1),[v,y]=(0,Y.useState)(!1),[b,x]=(0,Y.useState)(``),[S,C]=(0,Y.useState)(s.profilesByProvider),[w,T]=(0,Y.useState)(s.modelsByProvider??{}),[E,D]=(0,Y.useState)(s.effortsByProvider??{}),[O,k]=(0,Y.useState)(null),[A,j]=(0,Y.useState)(!1),[M,N]=(0,Y.useState)(s.sessions),[P,F]=(0,Y.useState)(0),[I,L]=(0,Y.useState)(!1),[R,z]=(0,Y.useState)(null),[B,V]=(0,Y.useState)(!1),[ee,H]=(0,Y.useState)(null),[U,W]=(0,Y.useState)(!1),[te,ne]=(0,Y.useState)(null),[re,ie]=(0,Y.useState)(null),[ae,oe]=(0,Y.useState)([]),[se,ce]=(0,Y.useState)(!1),le=(0,Y.useRef)(null),G=(0,Y.useCallback)((e,t)=>{u(n=>[...n,{role:`system`,content:e,kind:t,ts:Date.now()}])},[]),ue=(0,Y.useCallback)(e=>{let t=Array.from(e),n=t.filter(e=>!e.type.startsWith(`image/`));n.length>0&&G(`${n.length} non-image file(s) ignored. Only image attachments are supported.`,`note`);let r=t.filter(e=>e.type.startsWith(`image/`));if(r.length!==0)for(let e of r){if(e.size>20971520){G(`Image "${e.name}" exceeds the 20MB limit and was not attached.`,`error`);continue}let t=new FileReader;t.onload=t=>{let n=t.target?.result;n&&oe(t=>[...t,{id:crypto.randomUUID(),name:e.name,dataUrl:n,file:e}])},t.readAsDataURL(e)}},[G]),de=(0,Y.useCallback)(e=>{N(t=>{let n=e(t);return ge.current=n,n}),F(e=>e+1)},[]),fe=(0,Y.useRef)(null),pe=(0,Y.useRef)(null),me=(0,Y.useRef)(null),he=(0,Y.useRef)(!0),ge=(0,Y.useRef)(s.sessions),_e=(0,Y.useRef)([]),ve=(0,Y.useRef)(!1),ye=(0,Y.useRef)(!1),be=(0,Y.useRef)({messages:c,agentName:b,profilesByProvider:S,modelsByProvider:w,effortsByProvider:E}),xe=(0,Y.useRef)(S),Se=(0,Y.useRef)(null),Ce=(0,Y.useRef)(null),K=(0,Y.useRef)(!0),we=(0,Y.useRef)(0),q=(0,Y.useRef)(null),Te=(0,Y.useRef)(!1),Ee=(0,Y.useRef)({id:0,controller:null}),De=(0,Y.useMemo)(()=>rE(t.state),[t.state]),[Oe,ke]=(0,Y.useState)([]),Ae=(0,Y.useRef)(new Set),je=(0,Y.useRef)(!1),Me=(0,Y.useRef)(!1),Ne=(0,Y.useRef)(null);(0,Y.useEffect)(()=>{je.current=g},[g]);let Pe=(0,Y.useCallback)((e,t)=>{let n=fe.current;n&&n.readyState===WebSocket.OPEN&&n.send(JSON.stringify({type:`approval_response`,requestId:e,decision:t})),ke(t=>t.filter(t=>t.requestId!==e))},[]);(0,Y.useEffect)(()=>{be.current={messages:c,agentName:b,profilesByProvider:S,modelsByProvider:w,effortsByProvider:E},xe.current=S},[c,b,S,w,E]);let Fe=(0,Y.useCallback)(()=>{Se.current=null,ZT(e.branchName,{v:4,sessions:ge.current,providerId:be.current.agentName||s.providerId,profilesByProvider:be.current.profilesByProvider,modelsByProvider:be.current.modelsByProvider,effortsByProvider:be.current.effortsByProvider,messages:be.current.messages})},[e.branchName,s.providerId]);(0,Y.useEffect)(()=>{let e=c[c.length-1];(he.current||e?.role===`user`)&&me.current?.scrollIntoView({behavior:e?.role===`user`?`smooth`:`auto`}),Se.current&&clearTimeout(Se.current),Se.current=setTimeout(Fe,400)},[c,b,S,w,P,Fe]),(0,Y.useEffect)(()=>{let e=()=>Fe();return window.addEventListener(`pagehide`,e),()=>{window.removeEventListener(`pagehide`,e),Se.current&&clearTimeout(Se.current),Fe()}},[Fe]),(0,Y.useEffect)(()=>{let t=!0;return JT(e.branchName).then(e=>{if(!(!t||!e)&&(u(t=>t.length===0&&e.messages.length>0?e.messages:t),e.sessions&&Object.keys(e.sessions).length>0&&de(t=>({...e.sessions,...t})),e.isBusy&&!fe.current)){let t=e.providerId||b;t&&Ne.current&&Ne.current(t,{firstMessage:null})}}),()=>{t=!1}},[e.branchName,de,b]),(0,Y.useEffect)(()=>{let t=++we.current,n=new AbortController,r=!0;return fetch(`/api/adapters/status`,{method:`POST`,headers:{"Content-Type":`application/json`},body:`{}`,signal:n.signal}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(n=>{if(!r||t!==we.current)return;let a=AE(n);if(!a)throw Error(`Invalid provider status response`);i(a),T(e=>PE(e,a)),C(e=>{let t=!1,n={...e};for(let r of a)!r.executionProfiles?.length||!r.defaultExecutionProfile||r.executionProfiles.some(t=>t.id===e[r.id])||(n[r.id]=r.defaultExecutionProfile,t=!0);return t?n:e});let o=e.assistants?.[0]?nE(e.assistants[0]):void 0,c=s.providerId?a.find(e=>e.id===s.providerId):void 0,l=o?a.find(e=>e.id===o&&e.isConfigured):void 0,u=c||l||a.find(e=>e.isConfigured)||a[0];u&&x(e=>e||u.id)}).catch(e=>{r&&e?.name!==`AbortError`&&console.error(`Failed to fetch agent data`,e)}).finally(()=>{r&&t===we.current&&o(!0)}),()=>{r=!1,n.abort()}},[s.providerId,e.assistants]),(0,Y.useEffect)(()=>(K.current=!0,()=>{K.current=!1,Ee.current.id+=1,Ee.current.controller?.abort(),fe.current&&fe.current.close()}),[e.branchName,e.workspacePath]);let Ie=O??b,Le=r.find(e=>e.id===Ie),Re=Le?.executionProfiles?.find(e=>e.id===S[Le.id])??Le?.executionProfiles?.find(e=>e.id===Le.defaultExecutionProfile),ze=!!b&&!!Le?.isConfigured&&(!Le?.executionProfiles||!!Re)&&!A&&!I,Be=(0,Y.useCallback)(e=>{g||A||I||(fe.current&&=(fe.current.close(),null),h(!1),k(null),z(null),x(e),be.current.agentName=e,Se.current&&clearTimeout(Se.current),Fe())},[g,A,I,Fe]),Ve=(0,Y.useCallback)((e,t)=>{let n=t??r.find(t=>t.id===e);if(!n?.executionProfiles?.length)return;let i=xe.current[e];return i&&n.executionProfiles.some(e=>e.id===i)?i:n.defaultExecutionProfile??`review`},[r]),He=(0,Y.useCallback)(()=>{ve.current=!1,y(!1)},[]),Ue=(0,Y.useCallback)(async(t,n,r,i)=>{let a=crypto.randomUUID(),o=i??ae,s=[],c=[];if(o.length>0){let t=await Promise.all(o.map(async t=>{try{let n=await fetch(`/api/chat/upload-attachment`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({dataUrl:t.dataUrl,filename:t.name,workspacePath:e.workspacePath})});if(n.ok){let e=await n.json();return{dataUrl:t.dataUrl,path:e.path}}let r=await n.json().catch(()=>({error:`Upload failed`}));G(`Image "${t.name}" could not be uploaded: ${r.error||n.statusText}`,`error`)}catch(e){console.error(`Failed to upload image attachment`,e),G(`Image "${t.name}" failed to upload.`,`error`)}return{dataUrl:t.dataUrl,path:null}}));s=t.map(e=>e.path).filter(e=>!!e),c=t.map(e=>e.dataUrl)}let l=n;if(s.length>0){let e=s.map(e=>`[Attached image: ${e}]`).join(`
45
+ `);l=l?`${l}\n\n${e}`:e}let d={role:`user`,content:n,ts:Date.now(),...r?{executionProfile:r}:{},...c.length>0?{images:c}:{}};_e.current.push({turnId:a,text:l,message:d});let p=E[b];try{t.send(JSON.stringify({type:`input`,input:l,turnId:a,...r?{executionProfile:r}:{},command:b,cwd:e.workspacePath,...p?{effort:p}:{}}))}catch{_e.current=_e.current.filter(e=>e.turnId!==a),u(e=>e.filter(e=>e!==d)),f(e=>e?`${l}\n\n${e}`:l),G(`Failed to send message to the agent.`,`error`)}u(e=>[...e,d]),f(``),oe([]),_(!0),He()},[b,G,ae,He,E,e.workspacePath]),We=(0,Y.useCallback)(()=>{ye.current||(ye.current=!0,G(`Session ended`,`note`))},[G]),Ge=(0,Y.useCallback)(()=>{Me.current=!0;let e=fe.current;if(e){if(e.readyState===WebSocket.OPEN)try{e.send(JSON.stringify({type:`stop`}))}catch{}fe.current=null,q.current=null,k(null),j(!1),e.close(),h(!1),_(!1),He(),We()}},[He,We]),J=(0,Y.useCallback)((t=b,n={})=>{if(Me.current=!1,fe.current)return n.onFailure?.(),!1;let i=n.provider??r.find(e=>e.id===t);if(x(t),!i?.isConfigured)return G(i?.message??`The ${t} provider is unavailable. Check its local CLI installation and login.`,`error`),n.onFailure?.(),!1;let a=n.executionProfile??Ve(t,i),o=a!==void 0&&i.executionProfiles?.some(e=>e.id===a)===!0;if((n.executionProfile!==void 0||i.executionProfiles?.length)&&!o)return G(`Select a supported execution profile before starting this local CLI.`,`error`),n.onFailure?.(),!1;let s=n.model??w[t];if(s&&i.models&&!i.models.some(e=>e.id===s))return G(`Select a model advertised by this provider before starting the harness.`,`error`),n.onFailure?.(),!1;let c=``;c=c.startsWith(`http`)?c.replace(`http`,`ws`):window.location.origin.replace(`http`,`ws`),c+=`/ws`,ye.current=!1;let l=!1,p=!1,m,g=()=>{p||l||!K.current||(p=!0,_(!1),j(!1),h(!1),G(`Could not open the local agent connection. Your current chat was preserved; retry explicitly when ready.`,`error`),n.onFailure?.())};try{m=new WebSocket(c)}catch{return g(),!1}return m.onopen=()=>{if(!K.current||fe.current!==m){m.close();return}let r={type:`start`,command:t,cwd:e.workspacePath};s&&(r.model=s);let o=E[t];o&&(r.effort=o);let c={...ge.current};if(n.resetSession&&delete c[t],n.session&&(c[t]=n.session),i.capabilities.sessionIdentity===`client-assigned`){let e=c[t]??{id:crypto.randomUUID(),started:!1};c[t]=e,r.sessionId=e.id,r.resume=e.started}else if(i.capabilities.sessionIdentity===`provider-assigned`){let e=c[t];e?.started&&(r.sessionId=e.id,r.resume=!0)}let p=n.firstMessage===null?``:(n.firstMessage??d).trim(),v;try{if(m.send(JSON.stringify(r)),p){let e=crypto.randomUUID();v={turnId:e,text:p,message:{role:`user`,content:p,ts:Date.now(),...a?{executionProfile:a}:{}}},_e.current.push(v),m.send(JSON.stringify({type:`input`,input:p,turnId:e,...a?{executionProfile:a}:{}}))}}catch{v&&(_e.current=_e.current.filter(e=>e.turnId!==v?.turnId)),g(),fe.current=null,q.current=null,k(null),j(!1),m.close();return}de(()=>c),l=!0,j(!1),h(!0),n.resetMessagesOnDispatch&&u([]),p&&(u(e=>[...n.resetMessagesOnDispatch?[]:e,v?.message??{role:`user`,content:p,ts:Date.now(),...a?{executionProfile:a}:{}}]),f(``),_(!0),He()),n.onDispatched?.()},m.onmessage=e=>{if(fe.current===m)try{let n=JSON.parse(e.data);if(n.type===`stream`){let e=ve.current;ve.current=!0,y(!0),u(t=>{let r=t[t.length-1];if(e&&r?.role===`assistant`){let e=[...t];return e[e.length-1]={...r,content:r.content+n.text},e}return[...t,{role:`assistant`,content:n.text,ts:Date.now()}]})}else if(n.type===`session`&&typeof n.id==`string`)/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(n.id)&&de(e=>({...e,[t]:{id:n.id,started:!0}}));else if(n.type===`approval_request`&&typeof n.requestId==`string`)ke(e=>[...e.filter(e=>e.requestId!==n.requestId),{requestId:n.requestId,tool:typeof n.tool==`string`?n.tool:`Tool`,input:n.input&&typeof n.input==`object`?n.input:{},description:typeof n.description==`string`?n.description:void 0}]);else if(n.type===`accepted`&&typeof n.turnId==`string`)_e.current=_e.current.filter(e=>e.turnId!==n.turnId);else if(n.type===`file_changed`){if(Array.isArray(n.paths))for(let e of n.paths)typeof e==`string`&&e.trim()&&Ae.current.add(e.trim())}else if(n.type===`status`){if(_(n.state===`busy`),n.state!==`busy`){let e=Array.from(Ae.current);Ae.current.clear(),e.length>0&&u(t=>{for(let n=t.length-1;n>=0;n--)if(t[n].role===`assistant`){let r=[...t],i=r[n].filesChanged||[],a=Array.from(new Set([...i,...e]));return r[n]={...r[n],filesChanged:a},r}return t}),He(),ke([])}}else if(n.type===`system`)G(n.message,`note`);else if(n.type===`rejected`&&n.reason===`busy`){let e=_e.current.findIndex(e=>e.turnId===n.turnId),t=e===-1?void 0:_e.current.splice(e,1)[0];t&&(u(e=>e.filter(e=>e!==t.message)),f(e=>e?`${t.text}\n\n${e}`:t.text)),G(typeof n.message==`string`?n.message:`The agent is still processing the current turn.`,`error`)}else n.type===`error`?(_e.current=[],ke([]),Ae.current.clear(),typeof n.message==`string`&&n.message.toLowerCase().includes(`session`)&&de(e=>{let n={...e};return delete n[t],n}),G(n.message,`error`),_(!1),j(!1),He()):n.type===`close`&&(_e.current=[],ke([]),Ae.current.clear(),h(!1),j(!1),_(!1),He(),We(),m.close(),fe.current=null)}catch(e){console.error(`Failed to parse WS message`,e)}},m.onclose=()=>{if(fe.current!==m)return;l||g();let e=je.current,n=Me.current;if(h(!1),j(!1),_(!1),He(),fe.current=null,q.current=null,k(null),e&&K.current&&!n){G(`Connection interrupted. Resuming turn...`,`note`),setTimeout(()=>{K.current&&!Me.current&&!fe.current&&Ne.current?.(t,{firstMessage:null})},1200);return}l&&We()},m.onerror=()=>{fe.current===m&&(g(),_(!1),j(!1),l||(fe.current=null,q.current=null,k(null),h(!1),m.close()))},fe.current=m,q.current=t,k(t),j(!0),!0},[b,G,He,E,d,w,We,Ve,r,de,e.workspacePath]);(0,Y.useEffect)(()=>{Ne.current=J},[J]);let Ke=(0,Y.useCallback)(()=>{let e=d.trim();if(!e&&ae.length===0||g||Te.current)return;let t=fe.current,n=q.current||b;if(!p||!t||t.readyState!==WebSocket.OPEN){if(t){try{t.close()}catch{}fe.current=null}J(n,{firstMessage:e});return}let i=r.find(e=>e.id===n),a=Ve(n,i);i?.executionProfiles?.length&&!a||Ue(t,e,a,ae)},[b,ae,g,p,d,Ve,r,Ue,J]),qe=(0,Y.useCallback)((e,t)=>{navigator.clipboard.writeText(t).then(()=>{ie(e),setTimeout(()=>ie(t=>t===e?null:t),1500)}).catch(()=>{})},[]),Je=(0,Y.useCallback)(e=>{Ee.current.id===e&&(Ee.current.controller=null,Te.current=!1,K.current&&L(!1))},[]),Ye=(0,Y.useCallback)(async(e,t=!1)=>{let n=Ee.current.id+1;Ee.current.controller?.abort();let i=new AbortController;Ee.current={id:n,controller:i},Te.current=!0,L(!0),ne(null);let a=nE(e.assistant);if(!a)return G(`This session cannot resume in embedded chat.`,`error`),Je(n),!1;let o=r.find(e=>e.id===a);if(!o?.isConfigured)return G(o?.message??`The ${a} provider is unavailable. Check its local CLI installation and login.`,`error`),Je(n),!1;let s=()=>K.current&&Ee.current.id===n&&!i.signal.aborted;try{let r=await fetch(`/api/session/${encodeURIComponent(e.assistant)}/${encodeURIComponent(e.id)}/transcript`,{signal:i.signal});if(!r.ok)throw Error(`HTTP ${r.status}`);let o=await r.json();if(!s())return!1;let c=(Array.isArray(o.messages)?o.messages:[]).filter(e=>(e.role===`user`||e.role===`assistant`)&&typeof e.content==`string`&&e.content.trim()).map(e=>({role:e.role,content:e.content,ts:e.timestamp&&Date.parse(e.timestamp)||void 0}));if(fe.current&&!window.confirm(`Stop the current chat and resume this session?`))return Je(n),!1;fe.current&&Ge(),x(a);let l=()=>{s()&&(C(e=>({...e,[a]:`review`})),u([...c,{role:`system`,kind:`note`,content:`Loaded session — your next message resumes it.`,ts:Date.now()}]),f(``),W(!1),Je(n))};return t?J(a,{firstMessage:null,session:{id:e.id,started:!0},onDispatched:l,onFailure:()=>{s()&&(ne(`Failed to connect to the selected session.`),Je(n))}}):(de(t=>({...t,[a]:{id:e.id,started:!0}})),l(),!0)}catch(e){return!s()||e instanceof DOMException&&e.name===`AbortError`?!1:(ne(`Failed to load the session transcript.`),G(`Failed to load the session transcript. Your current chat was preserved.`,`error`),Je(n),!1)}},[G,Je,r,J,Ge,de]),Xe=(0,Y.useCallback)(e=>{Ye(e)},[Ye]),Ze=(0,Y.useCallback)(async(e,t=!1,n=!1)=>{z(e);let r;if(t){V(!0);try{let t=await fetch(`/api/adapters/status/refresh`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({providerId:e.providerId})});if(!t.ok)throw Error(`HTTP ${t.status}`);let a=AE(await t.json());if(!a)throw Error(`Invalid provider status response`);if(!K.current)return!1;i(a),T(e=>PE(e,a)),r=a.find(t=>t.id===e.providerId);let o=n&&(r?.setupIssue===`signed-out`||r?.setupIssue===`probe-failed`);if(!r||!r.isConfigured&&!o)return G(r?.message??`The selected local CLI is still unavailable. Install it and sign in, then retry.`,`error`),!1}catch{return K.current&&G(`Could not refresh the local CLI status. The task handoff was not dispatched.`,`error`),!1}finally{K.current&&V(!1)}}return J(e.providerId,{firstMessage:e.kickoff,executionProfile:e.executionProfile,provider:r&&n&&(r.setupIssue===`signed-out`||r.setupIssue===`probe-failed`)?{...r,isConfigured:!0}:r,resetSession:!0,resetMessagesOnDispatch:!0,onDispatched:()=>{K.current&&z(null)},onFailure:()=>{K.current&&z(e)}})},[G,J]);(0,Y.useEffect)(()=>{if(!a||!De)return;let e=Ce.current===De.nonce;try{e=e||sessionStorage.getItem(hn)===De.nonce||sessionStorage.getItem(ln)===De.nonce,sessionStorage.setItem(hn,De.nonce)}catch{}Ce.current=De.nonce;let i=t.state&&typeof t.state==`object`?{...t.state}:{};if(delete i.chatLaunch,n(`${t.pathname}${t.search}`,{replace:!0,state:Object.keys(i).length>0?i:null}),e)return;let o=r.find(e=>e.id===De.providerId);if(x(De.providerId),C(e=>({...e,[De.providerId]:De.executionProfile})),De.model&&T(e=>({...e,[De.providerId]:De.model})),!o?.isConfigured){G(o?.message??`The selected local CLI is unavailable. Install it and sign in, then try again.`,`error`),De.kickoff&&z({providerId:De.providerId,kickoff:De.kickoff,executionProfile:De.executionProfile});return}if(De.sessionId&&De.assistant){Ye({id:De.sessionId,assistant:De.assistant,title:``,createdAt:``,updatedAt:``,messageCount:0},!0);return}fe.current&&!window.confirm(`Stop the current chat and continue with the selected local CLI?`)||(fe.current&&Ge(),De.kickoff?Ze({providerId:De.providerId,kickoff:De.kickoff,executionProfile:De.executionProfile}):J(De.providerId,{firstMessage:null}))},[G,Ze,De,Ye,t.pathname,t.search,t.state,n,r,a,J,Ge]);let Qe=()=>{window.confirm(`Are you sure you want to clear this chat history? This also starts a new agent session.`)&&(fe.current&&Ge(),de(e=>{let t={...e};return delete t[b],t}),ye.current=!1,u([]),QT(e.branchName))},$e=g&&!v,et=Le?jE(Le):null,tt=()=>{if(!Le||!et)return;let e=()=>G(`Could not copy the recovery command. Copy the command shown above manually.`,`error`);try{let t=navigator.clipboard?.writeText;if(!t){e();return}t.call(navigator.clipboard,et.command).then(()=>{H(Le.id),setTimeout(()=>{K.current&&H(e=>e===Le.id?null:e)},1500)}).catch(e)}catch{e()}},[nt,rt]=(0,Y.useState)(!1),it=M[b]?.id,at=e=>{IT(e).then(()=>{rt(!0),setTimeout(()=>{K.current&&rt(!1)},1500)})};return(0,X.jsxs)(`div`,{className:`flex h-full flex-col bg-card`,children:[(0,X.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between border-b border-border bg-card px-4 py-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[(0,X.jsx)(`h3`,{className:`font-semibold text-foreground`,children:`Chat`}),(0,X.jsx)(MT,{tone:p?`running`:`idle`,dot:!0,children:p?`${Le?.name||`Connected`}${Le&&w[Le.id]?` (${NE(Le,w[Le.id])})`:``}`:`Disconnected`})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[it&&(0,X.jsxs)(`button`,{onClick:()=>at(it),className:`inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[11px] font-mono bg-muted/60 hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer border border-border/60`,title:`Session ID: ${it} (Click to copy)`,children:[(0,X.jsx)(fi,{size:11,className:`opacity-60`}),(0,X.jsxs)(`span`,{children:[it.slice(0,8),`...`]}),nt?(0,X.jsx)(ri,{size:11,className:`text-emerald-500`}):(0,X.jsx)(oi,{size:11,className:`opacity-60`})]}),c.length>0&&(0,X.jsx)(`button`,{onClick:Qe,className:`cursor-pointer text-xs text-muted-foreground transition-colors hover:text-destructive-foreground`,children:`Clear`}),(0,X.jsx)(`button`,{onClick:()=>{ne(null),W(!0)},className:`grid h-7 w-7 cursor-pointer place-items-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,title:`Resume a past session`,children:(0,X.jsx)(Ti,{size:14})}),(p||g||A)&&(0,X.jsxs)(m,{size:`sm`,variant:`outline`,onClick:Ge,children:[(0,X.jsx)(Mi,{size:14,className:`text-destructive-foreground`}),`Stop`]})]})]}),(0,X.jsx)(dE,{open:U,onClose:()=>W(!1),ws:e,onPick:Xe,error:te,pending:I}),(0,X.jsxs)(`div`,{ref:pe,onScroll:()=>{let e=pe.current;e&&(he.current=e.scrollHeight-e.scrollTop-e.clientHeight<80)},className:`flex-1 space-y-4 overflow-y-auto p-4`,children:[c.length===0&&!$e&&(0,X.jsx)(`div`,{className:`flex h-full items-center justify-center text-muted-foreground`,children:`No messages yet. Start the agent and say hello.`}),c.map((e,t)=>(0,X.jsx)(IE,{msg:e,idx:t,copied:re===t,onCopy:qe},t)),$e&&(0,X.jsx)(`div`,{className:`flex justify-start`,children:(0,X.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-lg border border-border bg-muted/30 px-4 py-2.5 text-xs text-muted-foreground shadow-xs animate-pulse`,children:[(0,X.jsx)(wi,{size:13,className:`animate-spin text-primary`}),(0,X.jsxs)(`span`,{children:[Le?.name||`Agent`,` is thinking and executing...`]})]})}),(0,X.jsx)(`div`,{ref:me})]}),(0,X.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-2 border-t border-border bg-card p-3`,children:[Le&&!Le.isConfigured&&(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-lg border border-destructive/25 bg-destructive/10 px-3 py-2 text-xs text-destructive-foreground`,children:[(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsxs)(`span`,{className:`shrink-0 font-semibold`,children:[Le.name,` provider status:`]}),(0,X.jsx)(`span`,{children:Le.message})]}),et&&(0,X.jsx)(`code`,{className:`w-fit rounded bg-background/70 px-2 py-1 font-mono text-[11px] text-foreground`,children:et.command})]}),et&&(0,X.jsxs)(m,{size:`sm`,variant:`outline`,onClick:tt,className:`shrink-0`,children:[ee===Le.id?(0,X.jsx)(ri,{size:12}):(0,X.jsx)(oi,{size:12}),ee===Le.id?`Copied`:et.label]})]}),R&&!A&&!p&&(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-lg border border-warning/25 bg-warning/10 px-3 py-2 text-xs text-foreground`,children:[(0,X.jsxs)(`span`,{children:[`The workspace kickoff was not dispatched (`,R.executionProfile===`workspace-write`?`Edit workspace`:`Review only`,`).`]}),(0,X.jsx)(m,{size:`sm`,variant:`outline`,onClick:()=>void Ze(R,!0),disabled:I||B,children:B?`Checking CLI…`:`Recheck & retry`}),Le?.setupIssue&&Le.setupIssue!==`missing-cli`&&(0,X.jsx)(m,{size:`sm`,variant:`outline`,onClick:()=>void Ze(R,!0,!0),disabled:I||B,children:`Try with existing CLI auth`})]}),Oe.map(e=>(0,X.jsxs)(`div`,{role:`alert`,"aria-live":`polite`,className:`flex flex-col gap-2 rounded-xl border border-amber-500/40 bg-amber-500/10 p-3 text-xs shadow-xs animate-fade-in`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 font-semibold text-amber-500`,children:[(0,X.jsx)(ki,{size:14,className:`animate-pulse shrink-0`}),(0,X.jsx)(`span`,{children:`Tool Approval Required`}),(0,X.jsx)(zt,{variant:`outline`,className:`text-[10px] uppercase font-mono border-amber-500/40 text-amber-600 dark:text-amber-400`,children:e.tool}),e.description&&(0,X.jsxs)(`span`,{className:`text-[11px] font-normal text-muted-foreground italic`,children:[`(`,e.description,`)`]})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:[(0,X.jsxs)(m,{size:`sm`,variant:`default`,onClick:()=>Pe(e.requestId,`allow`),className:`h-7 text-xs bg-emerald-600 hover:bg-emerald-700 text-white gap-1 cursor-pointer`,children:[(0,X.jsx)(ri,{size:12}),(0,X.jsx)(`span`,{children:`Approve`})]}),(0,X.jsxs)(m,{size:`sm`,variant:`outline`,onClick:()=>Pe(e.requestId,`deny`),className:`h-7 text-xs text-destructive hover:bg-destructive/10 border-border/80 gap-1 cursor-pointer`,children:[(0,X.jsx)(Ri,{size:12}),(0,X.jsx)(`span`,{children:`Deny`})]})]})]}),e.input&&(0,X.jsx)(`div`,{className:`rounded-md bg-background/80 p-2 font-mono text-[11px] text-foreground overflow-x-auto max-h-24 select-text`,children:typeof e.input.command==`string`?`Command: ${e.input.command}`:typeof e.input.path==`string`?`File: ${e.input.path}`:JSON.stringify(e.input,null,2)})]},e.requestId)),(0,X.jsxs)(`div`,{className:`flex w-full flex-col rounded-xl border border-border bg-card shadow-sm`,children:[(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-1.5 border-b border-border/50 bg-muted/20 px-3 py-2 text-xs`,children:[(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,X.jsxs)(sf,{children:[(0,X.jsxs)(cf,{"aria-label":`Select Provider`,disabled:g||A||I,className:`flex cursor-pointer items-center gap-1.5 rounded-md border border-border/60 bg-background/90 px-2.5 py-1 text-xs font-medium text-foreground shadow-2xs transition-colors hover:bg-accent hover:border-border disabled:pointer-events-none disabled:opacity-50`,children:[Le?.icon===`Bot`?(0,X.jsx)(ti,{size:13,className:`text-primary`}):(0,X.jsx)(si,{size:13,className:`text-primary`}),(0,X.jsx)(`span`,{children:Le?.name??`Select Agent`}),(0,X.jsx)(rn,{size:11,className:`opacity-50 ml-0.5`})]}),(0,X.jsx)(lf,{align:`start`,side:`top`,children:r.filter(e=>e.isConfigured||e.setupIssue!==`missing-cli`).map(e=>(0,X.jsxs)(uf,{onClick:()=>Be(e.id),className:l(`flex items-center gap-2 text-xs cursor-pointer`,e.id===Ie&&`font-semibold text-primary`),children:[e.icon===`Bot`?(0,X.jsx)(ti,{size:14}):(0,X.jsx)(si,{size:14}),(0,X.jsx)(`span`,{className:`flex-1`,children:e.name}),e.id===Ie&&(0,X.jsx)(ri,{size:12,className:`text-primary ml-auto`})]},e.id))})]}),Le?.models?.length&&(0,X.jsxs)(sf,{children:[(0,X.jsxs)(cf,{"aria-label":`Select model`,disabled:p||A||g||I||!!R,className:`flex cursor-pointer items-center gap-1.5 rounded-md border border-border/60 bg-background/90 px-2.5 py-1 text-xs font-medium text-foreground shadow-2xs transition-colors hover:bg-accent hover:border-border disabled:pointer-events-none disabled:opacity-50`,children:[(0,X.jsx)(Ai,{size:12,className:`text-amber-500 shrink-0`}),(0,X.jsx)(`span`,{className:`max-w-44 truncate`,children:NE(Le,w[Le.id]??``)}),(0,X.jsx)(rn,{size:11,className:`opacity-50 ml-0.5`})]}),(0,X.jsx)(lf,{align:`start`,side:`top`,className:`max-w-80`,children:Le.models.map(e=>(0,X.jsx)(uf,{onClick:()=>T(t=>({...t,[Le.id]:e.id})),children:(0,X.jsxs)(`span`,{className:`flex flex-col`,children:[(0,X.jsxs)(`span`,{className:`font-medium flex items-center gap-1.5`,children:[(0,X.jsx)(Ai,{size:11,className:`text-amber-500`}),e.label]}),(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.description})]})},e.id))})]}),Le?.executionProfiles?.length&&Re&&(0,X.jsxs)(sf,{children:[(0,X.jsxs)(cf,{"aria-label":`Select execution profile`,disabled:A||g||I||!!R,className:`flex cursor-pointer items-center gap-1.5 rounded-md border border-border/60 bg-background/90 px-2.5 py-1 text-xs font-medium text-foreground shadow-2xs transition-colors hover:bg-accent hover:border-border disabled:pointer-events-none disabled:opacity-50`,title:Re.description,children:[(0,X.jsx)(ki,{size:12,className:Re.id===`workspace-write`?`text-amber-500 shrink-0`:`text-emerald-500 shrink-0`}),(0,X.jsx)(`span`,{children:ME(Re.label)}),(0,X.jsx)(rn,{size:11,className:`opacity-50 ml-0.5`})]}),(0,X.jsx)(lf,{align:`start`,side:`top`,className:`max-w-80`,children:Le.executionProfiles.map(e=>(0,X.jsx)(uf,{onClick:()=>C(t=>({...t,[Le.id]:e.id})),children:(0,X.jsxs)(`span`,{className:`flex flex-col`,children:[(0,X.jsxs)(`span`,{className:`font-medium flex items-center gap-1.5`,children:[(0,X.jsx)(ki,{size:12,className:e.id===`workspace-write`?`text-amber-500`:`text-emerald-500`}),e.label]}),(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.description})]})},e.id))})]}),Le&&(0,X.jsxs)(sf,{children:[(0,X.jsxs)(cf,{"aria-label":`Select reasoning effort`,disabled:p||A||g||I||!!R,className:`flex cursor-pointer items-center gap-1.5 rounded-md border border-border/60 bg-background/90 px-2.5 py-1 text-xs font-medium text-foreground shadow-2xs transition-colors hover:bg-accent hover:border-border disabled:pointer-events-none disabled:opacity-50`,children:[(0,X.jsx)(zi,{size:12,className:E[Le.id]?`text-amber-500 fill-amber-500/20 shrink-0`:`text-muted-foreground shrink-0`}),(0,X.jsx)(`span`,{children:yE(E[Le.id]??``)}),(0,X.jsx)(rn,{size:11,className:`opacity-50 ml-0.5`})]}),(0,X.jsx)(lf,{align:`start`,side:`top`,className:`max-w-72`,children:vE.map(e=>(0,X.jsx)(uf,{onClick:()=>D(t=>({...t,[Le.id]:e.id})),children:(0,X.jsxs)(`span`,{className:`flex flex-col`,children:[(0,X.jsxs)(`span`,{className:`font-medium flex items-center gap-1.5`,children:[e.id&&(0,X.jsx)(zi,{size:12,className:`text-amber-500`}),e.label]}),(0,X.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.description})]})},e.id))})]})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[(0,X.jsx)(`input`,{type:`file`,ref:le,accept:`image/*`,multiple:!0,className:`hidden`,onChange:e=>{e.target.files?.length&&ue(e.target.files),e.target.value=``}}),(0,X.jsx)(`button`,{type:`button`,onClick:()=>le.current?.click(),disabled:g||I,className:`flex cursor-pointer items-center justify-center rounded-md border border-border/60 bg-background/90 p-1.5 text-muted-foreground shadow-2xs transition-colors hover:bg-accent hover:text-foreground hover:border-border disabled:pointer-events-none disabled:opacity-50`,title:`Attach image (or paste / drop into chat)`,children:(0,X.jsx)(pi,{size:14,className:`text-primary`})})]})]}),ae.length>0&&(0,X.jsx)(`div`,{className:`flex flex-wrap gap-2 border-b border-border/40 px-3 py-2 bg-muted/20`,children:ae.map(e=>(0,X.jsxs)(`div`,{className:`group relative flex items-center rounded-lg border border-border/80 bg-card p-1 shadow-xs`,children:[(0,X.jsx)(`img`,{src:e.dataUrl,alt:e.name,className:`h-14 w-14 rounded-md object-cover`}),(0,X.jsx)(`button`,{type:`button`,onClick:()=>oe(t=>t.filter(t=>t.id!==e.id)),className:`absolute -top-1.5 -right-1.5 flex h-4 w-4 cursor-pointer items-center justify-center rounded-full bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90 transition-colors`,title:`Remove image`,children:(0,X.jsx)(Ri,{size:10})})]},e.id))}),(0,X.jsxs)(`div`,{className:l(`flex items-end gap-2 p-2`,se&&`ring-2 ring-primary ring-inset rounded-b-xl bg-accent/30`),onDragOver:e=>{e.preventDefault(),ce(!0)},onDragLeave:()=>ce(!1),onDrop:e=>{e.preventDefault(),ce(!1),e.dataTransfer?.files?.length&&ue(e.dataTransfer.files)},children:[(0,X.jsx)(VT,{value:d,disabled:I,onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let n=[];for(let e=0;e<t.length;e++)if(t[e].type.startsWith(`image/`)){let r=t[e].getAsFile();r&&n.push(r)}n.length>0&&(e.preventDefault(),ue(n))},onChange:e=>{f(e.target.value);let t=e.target;t.style.height=`auto`,t.style.height=`${Math.min(t.scrollHeight,200)}px`},onKeyDown:e=>{if(e.key===`Enter`&&!e.shiftKey){if(e.preventDefault(),g||A||Te.current)return;p?Ke():ze&&J();let t=e.currentTarget;t.style.height=`auto`}},placeholder:p?`Message the agent... (Shift+Enter for new line)`:`Start the agent or press Enter...`,unstyled:!0,className:`flex-1 [&_[data-slot=textarea]]:max-h-[200px] [&_[data-slot=textarea]]:min-h-11 [&_[data-slot=textarea]]:resize-none [&_[data-slot=textarea]]:text-sm`,rows:1}),p?(0,X.jsxs)(m,{className:`h-11 shrink-0 rounded-lg`,onClick:Ke,disabled:!d.trim()&&ae.length===0||g||I,children:[g?(0,X.jsx)(wi,{size:14,className:`animate-spin`}):(0,X.jsx)(Di,{size:14}),`Send`]}):(0,X.jsxs)(m,{className:`h-11 shrink-0 rounded-lg`,onClick:()=>J(),disabled:!ze,children:[(0,X.jsx)(ji,{size:14}),`Start`]})]})]})]})]})}function RE(e){if(!e)return(0,X.jsx)(ui,{className:`size-3 text-muted-foreground shrink-0`});try{let t=KT(e.branchName).providerId||nE(e.assistants?.[0])||`antigravity-cli`;if(t.startsWith(`claude`))return(0,X.jsx)(mc,{className:`size-3 text-[#D97757] shrink-0`});if(t.startsWith(`codex`))return(0,X.jsx)(ac,{className:`size-3 text-foreground shrink-0`});if(t.startsWith(`copilot`))return(0,X.jsx)(fc,{className:`size-3 text-blue-400 shrink-0`});if(t.startsWith(`antigravity`))return(0,X.jsx)(gc,{className:`size-3.5 shrink-0`})}catch{}return(0,X.jsx)(ui,{className:`size-3 text-muted-foreground shrink-0`})}function zE({workspaces:e}){let{isOpen:t,isMinimized:n,isMaximized:r,openTabs:i,activeTab:a,position:o,size:s,close:c,minimize:u,restore:d,toggleMaximize:f,addTab:p,removeTab:h,setActiveTab:g,setPosition:_,setSize:v}=Op(),[y,b]=(0,Y.useState)(``),x=(0,Y.useRef)(null),S=(0,Y.useRef)(null),C=(0,Y.useRef)(null),w=(0,Y.useMemo)(()=>new Map(e.map(e=>[e.branchName,e])),[e]),T=a?w.get(a):void 0,E=(0,Y.useMemo)(()=>{let t=y.trim().toLowerCase();return t?e.filter(e=>e.branchName.toLowerCase().includes(t)||e.description&&e.description.toLowerCase().includes(t)):e},[e,y]),D=(0,Y.useCallback)(e=>{if(e.button!==0||r)return;let t=e.target;if(t.closest(`button`)||t.closest(`[role="tab"]`)||t.closest(`[data-no-drag]`))return;let n=o||{x:Math.max(20,window.innerWidth-s.width-24),y:Math.max(20,window.innerHeight-s.height-24)};x.current={startX:e.clientX,startY:e.clientY,startPosX:n.x,startPosY:n.y},e.currentTarget.setPointerCapture(e.pointerId)},[r,o,s]),O=(0,Y.useCallback)(e=>{if(!x.current)return;let t=e.clientX-x.current.startX,n=e.clientY-x.current.startY,r=Math.max(0,window.innerWidth-s.width-20),i=Math.max(0,window.innerHeight-s.height-20),a=Math.min(Math.max(10,x.current.startPosX+t),r),o=Math.min(Math.max(10,x.current.startPosY+n),i);_({x:a,y:o})},[s,_]),k=(0,Y.useCallback)(e=>{if(x.current){x.current=null;try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}}},[]),A=(0,Y.useCallback)(e=>{e.button!==0||r||(e.stopPropagation(),e.preventDefault(),S.current={startX:e.clientX,startY:e.clientY,startW:s.width,startH:s.height},e.currentTarget.setPointerCapture(e.pointerId))},[r,s]),j=(0,Y.useCallback)(e=>{if(!S.current)return;let t=e.clientX-S.current.startX,n=e.clientY-S.current.startY,r=Math.max(380,Math.min(S.current.startW+t,window.innerWidth-40)),i=Math.max(420,Math.min(S.current.startH+n,window.innerHeight-40));v({width:r,height:i})},[v]),M=(0,Y.useCallback)(e=>{if(S.current){S.current=null;try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}}},[]),N=(0,Y.useMemo)(()=>{if(!r)return o?{left:`${o.x}px`,top:`${o.y}px`,width:`${s.width}px`,height:`${s.height}px`}:{right:`24px`,bottom:`24px`,width:`${s.width}px`,height:`${s.height}px`}},[r,o,s]);return t?n?(0,X.jsx)(`div`,{className:`fixed bottom-5 right-6 z-50 animate-fade-in`,children:(0,X.jsxs)(`button`,{onClick:d,className:`flex items-center gap-2.5 px-4 py-2.5 rounded-full bg-card/95 backdrop-blur-md border border-border shadow-xl hover:border-primary/50 text-foreground transition-all duration-200 cursor-pointer group`,title:`Restore floating workspace chat`,children:[(0,X.jsx)(`div`,{className:`size-7 rounded-full bg-primary/10 grid place-items-center text-primary group-hover:scale-105 transition-transform`,children:(0,X.jsx)(ti,{className:`size-4`})}),(0,X.jsxs)(`div`,{className:`flex flex-col items-start text-left`,children:[(0,X.jsxs)(`span`,{className:`text-xs font-semibold leading-tight flex items-center gap-1.5`,children:[`Workspace Chat`,i.length>0&&(0,X.jsx)(`span`,{className:`px-1.5 py-0.2 rounded-full bg-primary/20 text-primary text-[10px] font-bold`,children:i.length})]}),(0,X.jsx)(`span`,{className:`text-[10px] text-muted-foreground leading-tight max-w-[140px] truncate`,children:T?.branchName||`No active tab`})]}),(0,X.jsx)(gi,{className:`size-3.5 text-muted-foreground group-hover:text-foreground ml-1`})]})}):(0,X.jsxs)(`div`,{ref:C,style:N,className:l(`fixed z-50 flex flex-col overflow-hidden bg-card/98 backdrop-blur-xl border border-border/80 shadow-2xl rounded-2xl transition-[border-color] duration-150`,r&&`inset-4 w-auto h-auto rounded-xl`),children:[(0,X.jsxs)(`div`,{onPointerDown:D,onPointerMove:O,onPointerUp:k,className:l(`flex items-center justify-between px-3 py-2 border-b border-border/80 bg-muted/40 select-none shrink-0`,!r&&`cursor-grab active:cursor-grabbing`),children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0 pr-2`,children:[!r&&(0,X.jsx)(di,{className:`size-4 text-muted-foreground/50 shrink-0`}),(0,X.jsx)(`div`,{className:`size-5 rounded-md bg-primary/15 grid place-items-center text-primary shrink-0`,children:(0,X.jsx)(ti,{className:`size-3.5`})}),(0,X.jsx)(`span`,{className:`text-xs font-bold text-foreground truncate shrink-0`,children:`Workspace Chat`})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,"data-no-drag":!0,children:[(0,X.jsx)(`button`,{onClick:u,className:`p-1.5 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors cursor-pointer`,title:`Minimize`,"aria-label":`Minimize floating chat`,children:(0,X.jsx)(bi,{className:`size-3.5`})}),(0,X.jsx)(`button`,{onClick:f,className:`p-1.5 rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors cursor-pointer`,title:r?`Restore down`:`Maximize`,"aria-label":r?`Restore down floating chat`:`Maximize floating chat`,children:r?(0,X.jsx)(yi,{className:`size-3.5`}):(0,X.jsx)(gi,{className:`size-3.5`})}),(0,X.jsx)(`button`,{onClick:c,className:`p-1.5 rounded-lg text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-colors cursor-pointer`,title:`Close`,"aria-label":`Close floating chat`,children:(0,X.jsx)(Ri,{className:`size-3.5`})})]})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-1 px-2.5 py-1.5 border-b border-border/60 bg-muted/20 overflow-x-auto no-scrollbar shrink-0`,"data-no-drag":!0,children:[i.map(e=>{let t=w.get(e),n=e===a;return(0,X.jsxs)(`div`,{role:`tab`,"aria-selected":n,onClick:()=>g(e),className:l(`group flex items-center gap-1.5 px-2.5 py-1 rounded-lg text-xs font-medium transition-all duration-150 cursor-pointer border shrink-0 max-w-[170px]`,n?`bg-card border-border shadow-xs text-foreground font-semibold`:`border-transparent text-muted-foreground hover:text-foreground hover:bg-muted/50`),title:e,children:[RE(t),(0,X.jsx)(`span`,{className:`truncate`,children:e}),(0,X.jsx)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),h(e)},className:`size-3.5 rounded grid place-items-center text-muted-foreground/60 hover:text-destructive hover:bg-destructive/10 opacity-0 group-hover:opacity-100 transition-opacity ml-0.5`,title:`Close ${e} tab`,"aria-label":`Close ${e} tab`,children:(0,X.jsx)(Ri,{className:`size-2.5`})})]},e)}),(0,X.jsxs)(sf,{children:[(0,X.jsxs)(cf,{className:`flex items-center gap-1 px-2 py-1 rounded-lg text-xs text-muted-foreground hover:text-foreground hover:bg-muted/60 border border-dashed border-border/70 hover:border-border transition-colors cursor-pointer shrink-0`,children:[(0,X.jsx)(Ci,{className:`size-3`}),(0,X.jsx)(`span`,{children:`Add Workspace`})]}),(0,X.jsxs)(lf,{align:`start`,className:`w-64 p-1.5`,children:[(0,X.jsx)(`div`,{className:`px-2 py-1 mb-1`,children:(0,X.jsxs)(`div`,{className:`relative`,children:[(0,X.jsx)(Ei,{className:`size-3.5 absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground`}),(0,X.jsx)(`input`,{type:`text`,placeholder:`Search workspaces...`,value:y,onChange:e=>b(e.target.value),className:`w-full pl-7 pr-2 py-1 text-xs rounded-md bg-muted/50 border border-border focus:outline-hidden focus:border-primary/50 text-foreground placeholder:text-muted-foreground`,autoFocus:!0})]})}),(0,X.jsx)(`div`,{className:`max-h-56 overflow-y-auto space-y-0.5`,children:E.length===0?(0,X.jsx)(`div`,{className:`px-3 py-4 text-center text-xs text-muted-foreground`,children:`No workspaces found`}):E.map(e=>{let t=i.includes(e.branchName);return(0,X.jsxs)(uf,{onClick:()=>{t?g(e.branchName):p(e.branchName),b(``)},className:l(`flex items-center gap-2 px-2 py-1.5 text-xs rounded-md cursor-pointer`,e.branchName===a&&`bg-accent/70 font-semibold`),children:[RE(e),(0,X.jsxs)(`div`,{className:`flex flex-col min-w-0 flex-1`,children:[(0,X.jsx)(`span`,{className:`font-medium text-foreground truncate`,children:e.branchName}),e.description&&(0,X.jsx)(`span`,{className:`text-[10px] text-muted-foreground truncate`,children:e.description})]}),t&&(0,X.jsx)(`span`,{className:`text-[10px] text-primary font-medium px-1.5 py-0.5 rounded bg-primary/10`,children:`Open`})]},e.branchName)})})]})]})]}),(0,X.jsx)(`div`,{className:`flex-1 min-h-0 relative overflow-hidden bg-card`,"data-no-drag":!0,children:i.length===0?(0,X.jsxs)(`div`,{className:`h-full flex flex-col items-center justify-center p-6 text-center text-muted-foreground gap-3`,children:[(0,X.jsx)(`div`,{className:`size-12 rounded-2xl bg-muted/50 border border-border grid place-items-center text-muted-foreground`,children:(0,X.jsx)(vi,{className:`size-6 text-primary`})}),(0,X.jsxs)(`div`,{className:`space-y-1`,children:[(0,X.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:`No Workspace Tab Open`}),(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground max-w-xs`,children:`Select a workspace below to start or continue an AI assistant chat session.`})]}),(0,X.jsx)(`div`,{className:`flex flex-wrap justify-center gap-1.5 mt-2 max-w-sm`,children:e.slice(0,5).map(e=>(0,X.jsxs)(m,{variant:`outline`,size:`sm`,onClick:()=>p(e.branchName),className:`text-xs h-7 gap-1.5`,children:[RE(e),(0,X.jsx)(`span`,{children:e.branchName})]},e.branchName))})]}):i.map(e=>{let t=w.get(e);return t?(0,X.jsx)(`div`,{className:l(`h-full flex flex-col`,e!==a&&`hidden`),children:(0,X.jsx)(LE,{ws:t})},e):null})}),!r&&(0,X.jsx)(`div`,{onPointerDown:A,onPointerMove:j,onPointerUp:M,className:`absolute bottom-0 right-0 size-4 cursor-nwse-resize z-10 grid place-items-center opacity-30 hover:opacity-100 transition-opacity`,title:`Drag to resize`,children:(0,X.jsx)(`div`,{className:`size-2 border-r-2 border-b-2 border-muted-foreground rounded-br-xs`})})]}):null}function BE(){let{isOpen:e,isMinimized:t,openTabs:n,open:r}=Op();return e&&!t||t?null:(0,X.jsx)(`div`,{className:`fixed bottom-6 right-6 z-40 animate-fade-in`,children:(0,X.jsxs)(`button`,{onClick:()=>r(),className:l(`group relative flex items-center justify-center size-12 rounded-full`,`bg-primary text-primary-foreground shadow-lg shadow-primary/25`,`hover:scale-105 hover:shadow-xl hover:shadow-primary/35 active:scale-95`,`transition-all duration-200 cursor-pointer border border-primary/20`),title:`Open Floating Workspace Chat`,"aria-label":`Open Floating Workspace Chat`,children:[(0,X.jsx)(ti,{className:`size-6 transition-transform group-hover:rotate-6`}),n.length>0&&(0,X.jsx)(`span`,{className:`absolute -top-1 -right-1 size-5 rounded-full bg-emerald-500 text-white text-[10px] font-bold grid place-items-center shadow-md border-2 border-background`,children:n.length})]})})}function VE({workspaceName:e,open:t,onClose:n,onConfirm:r,loading:i=!1}){let[a,o]=(0,Y.useState)(``);if(!e)return null;let s=a.trim()===e.trim(),c=()=>{o(``),n()},l=async()=>{!s||i||(await r(e),o(``))};return(0,X.jsx)(bT,{open:t,onOpenChange:e=>!e&&c(),children:(0,X.jsxs)(wT,{className:`max-w-md`,children:[(0,X.jsxs)(TT,{children:[(0,X.jsx)(DT,{className:`text-destructive`,children:`Delete workspace`}),(0,X.jsxs)(OT,{children:[`This action cannot be undone. This will force-remove all git worktrees and delete the entire folder for`,` `,(0,X.jsx)(`strong`,{className:`font-semibold text-foreground`,children:e}),`.`]})]}),(0,X.jsx)(kT,{className:`space-y-4`,children:(0,X.jsxs)(`label`,{className:`block`,children:[(0,X.jsxs)(`span`,{className:`mb-1 block text-xs text-muted-foreground`,children:[`Please type `,(0,X.jsx)(`strong`,{className:`font-mono text-foreground`,children:e}),` to confirm:`]}),(0,X.jsx)(xt,{value:a,onChange:e=>o(e.target.value),placeholder:e,autoFocus:!0,className:`font-mono text-sm`,onKeyDown:e=>{e.key===`Enter`&&s&&!i&&l()}})]})}),(0,X.jsxs)(ET,{children:[(0,X.jsx)(m,{variant:`outline`,onClick:c,disabled:i,children:`Cancel`}),(0,X.jsx)(m,{variant:`destructive`,onClick:()=>void l(),disabled:!s||i,children:i?`Deleting…`:`Delete workspace`})]})]})})}var HE=(0,Y.lazy)(()=>Ui(()=>import(`./DashboardPage-YVONGtqS.js`).then(e=>({default:e.DashboardPage})),__vite__mapDeps([0,1,2,3,4,5,6]))),UE=(0,Y.lazy)(()=>Ui(()=>import(`./ProjectsPage-DOpfV2Oj.js`).then(e=>({default:e.ProjectsPage})),__vite__mapDeps([7,1,8,9,10,11,12]))),WE=(0,Y.lazy)(()=>Ui(()=>import(`./SettingsPage-BdaHN6fa.js`).then(e=>({default:e.SettingsPage})),__vite__mapDeps([13,1,8,10,6,14,15]))),GE=(0,Y.lazy)(()=>Ui(()=>import(`./SkillsPage-DT9lRkCg.js`).then(e=>({default:e.SkillsPage})),__vite__mapDeps([16,1,8,17,18,2,19,4,12,6,14]))),KE=(0,Y.lazy)(()=>Ui(()=>import(`./AgentsPage-C7Rh_dp7.js`).then(e=>({default:e.AgentsPage})),__vite__mapDeps([20,1,8,11,12,6,14]))),qE=(0,Y.lazy)(()=>Ui(()=>import(`./WorkroomsPage-BQU27nWS.js`).then(e=>({default:e.WorkroomsPage})),__vite__mapDeps([21,1,8,18,3,12,22,5,6,14,15]))),JE=(0,Y.lazy)(()=>Ui(()=>import(`./StartWorkPage-D932lq9x.js`).then(e=>({default:e.StartWorkPage})),__vite__mapDeps([23,1,8,17,2,9,10,3,24,5]))),YE=(0,Y.lazy)(()=>Ui(()=>import(`./StrategiesPage-DCfS-wdu.js`).then(e=>({default:e.StrategiesPage})),__vite__mapDeps([25,1,8,26,12,6,14]))),XE=(0,Y.lazy)(()=>Ui(()=>import(`./WorkspacesPage-D3TLVmq-.js`).then(e=>({default:e.WorkspacesPage})),__vite__mapDeps([27,1,8,17,18,2,19,3,4,24,12,22,5,6,14]))),ZE=(0,Y.lazy)(()=>Ui(()=>import(`./GettingStartedPage-C2Kbvz_N.js`).then(e=>({default:e.GettingStartedPage})),__vite__mapDeps([28,1,26,5]))),QE=new URLSearchParams(window.location.search).get(`env`)===`vscode`,$E=typeof window<`u`?window.contextspaceBridge?.updates||window.nexusBridge?.updates:void 0,eD=0;function tD(){let e=bo(),t=_o(),[n,r]=(0,Y.useState)([]),i=(e,t=`info`,n=5e3)=>{let i=`toast-${++eD}`;r(r=>[...r,{id:i,message:e,type:t,duration:n}]),setTimeout(()=>{r(e=>e.filter(e=>e.id!==i))},n)},[a,o]=(0,Y.useState)(null),[s,c]=(0,Y.useState)(!0),[u,d]=(0,Y.useState)(!0),[f,p]=(0,Y.useState)(null),[m,h]=(0,Y.useState)([]),[g,_]=(0,Y.useState)(null),[v,y]=(0,Y.useState)(``),[b,x]=(0,Y.useState)(null),[S,C]=(0,Y.useState)(!1),[w,T]=(0,Y.useState)(null),E=Zp(),D=nm(),O=rm(),k=om(),A=E.data??[],j=D.data??[],M=O.data??[],N=k.data??[],[P,F]=(0,Y.useState)(!1),[I,L]=(0,Y.useState)(`idle`),[R,z]=(0,Y.useState)(null),[B,V]=(0,Y.useState)(null),[ee,H]=(0,Y.useState)(!1),[U,W]=(0,Y.useState)(``),[te,ne]=(0,Y.useState)(``),[re,ie]=(0,Y.useState)(null),[ae,oe]=(0,Y.useState)(!1),[se,ce]=(0,Y.useState)(!1),[le,G]=(0,Y.useState)(!1),[ue,de]=(0,Y.useState)(`antigravity`),fe=(0,Y.useRef)(!1);(0,Y.useEffect)(()=>{if(fe.current||!D.data)return;let e=D.data.find(e=>e.detected&&e.command);e&&(fe.current=!0,de(e.name))},[D.data]);let[pe,me]=(0,Y.useState)(null),[he,ge]=(0,Y.useState)(``),_e=[`/`,`/overview`,`/dashboard`].includes(t.pathname)||t.pathname.startsWith(`/workspaces`),ve=Dn(),ye=Bp(),be=Vp({enabled:u&&!s,intervalMs:_e?15e3:!1}),xe=ye.data??[],Se=ye.isLoading,Ce=be.data??{},[K,we]=(0,Y.useState)(null),[q,Te]=(0,Y.useState)(`overview`),[Ee,De]=(0,Y.useState)([]),[Oe,ke]=(0,Y.useState)(!1),[Ae,je]=(0,Y.useState)(null),[Me,Ne]=(0,Y.useState)([]),[Pe,Fe]=(0,Y.useState)(!1),[Ie,Le]=(0,Y.useState)([]),[Re,ze]=(0,Y.useState)(!1),[Be,Ve]=(0,Y.useState)(``),[He,Ue]=(0,Y.useState)(!1),[We,Ge]=(0,Y.useState)(null),[J,Ke]=(0,Y.useState)(!1),[qe,Je]=(0,Y.useState)(``),[Ye,Xe]=(0,Y.useState)(!1),[Ze,Qe]=(0,Y.useState)(null),[$e,et]=(0,Y.useState)(``),[tt,nt]=(0,Y.useState)(!1),[rt,it]=(0,Y.useState)(null),at=(0,Y.useRef)(null),ot=(0,Y.useRef)(0),st=(0,Y.useRef)(0),ct=(0,Y.useRef)(0),lt=(0,Y.useRef)(``),ut=(0,Y.useRef)(!1),[dt,ft]=(0,Y.useState)(!1),[pt,mt]=(0,Y.useState)(null),[ht,gt]=(0,Y.useState)(``),[_t,vt]=(0,Y.useState)(!1),[yt,bt]=(0,Y.useState)(!1),[xt,St]=(0,Y.useState)(null),[Ct,wt]=(0,Y.useState)(null),[Tt,Et]=(0,Y.useState)(!1),Dt=e=>{lt.current=e,Je(e)},Ot=e=>{ut.current=e,Ke(e)},[kt,At]=(0,Y.useState)([]),[jt,Mt]=(0,Y.useState)(!1),[Nt,Pt]=(0,Y.useState)(null),Ft=!(!a||!a.devDir||a.devDir.trim()===``||!a.workspacesDir||a.workspacesDir.trim()===``),It=e=>{let t=[`available`,`downloading`,`downloaded`,`error`].includes(e.status)&&!!e.version;_({currentVersion:e.currentVersion,latestVersion:e.version||e.currentVersion,updateAvailable:t,releaseNotes:e.releaseNotes,nativeStatus:e.status,progress:e.progress,error:e.error,releaseUrl:pn}),y(e.currentVersion),e.status===`error`?T(e.error||`${vn} could not check or download the update.`):e.status!==`checking`&&T(null),F(e.status===`checking`||e.status===`downloading`),L(e.status===`checking`?`checking`:e.status===`downloading`?`downloading`:e.status===`downloaded`?`downloaded`:e.status===`error`?`error`:`idle`),e.status===`available`&&C(!1)},Lt=async(e=!0)=>{try{if($E){let t=await $E.getStatus();It(t),e&&t.status!==`unsupported`&&It(await $E.check());return}let t=await fetch(`/api/update-status`);if(t.ok){let e=await t.json();_(e),T(null),e.currentVersion&&y(e.currentVersion)}else throw Error(`Update check failed with HTTP ${t.status}.`)}catch(e){T(e instanceof Error?e.message:`${vn} could not check for updates.`),console.error(`Failed to fetch update status:`,e)}},Rt=async()=>{T(null),g?.nativeStatus===`downloaded`&&C(!1),await Lt(!0)},zt=async()=>{if(!$E){i(`Native installation is available in the ${vn} desktop app. Open the release page to install it.`,`info`);return}F(!0),L(`downloading`);try{let e=await $E.download();It(e),e.status===`downloaded`?i(`Update downloaded. Restart ${vn} when you are ready to install it.`,`success`):i(`Update failed: ${e.error||`The download did not complete.`}`,`error`)}catch(e){console.error(`Update failed:`,e),L(`error`),F(!1),i(`Update failed: ${e instanceof Error?e.message:`Unknown error`}`,`error`)}},Bt=async()=>{if($E)try{It(await $E.restart())}catch(e){let t=e instanceof Error?e.message:`Unknown error`;_(e=>e&&{...e,nativeStatus:`error`,error:t,updateAvailable:!!e.latestVersion}),T(t),L(`error`),i(`Could not restart for update: ${t}`,`error`),F(!1)}},Vt=async()=>{try{let e=await(await fetch(`/api/adapters`)).json();e.adapters&&h(e.adapters)}catch(e){console.error(`Failed to fetch adapters:`,e)}},Ht=async()=>{Vt();try{let e=await(await fetch(`/api/config`)).json();o(e.config),d(e.exists),e.exists&&e.config.devDir||(x({devDir:e.config.devDir||``,workspacesDir:e.config.workspacesDir||``}),o({version:`1.0.0`,devDir:``,workspacesDir:``,defaultAssistant:null,scanDepth:2}))}catch(e){console.error(e)}finally{c(!1)}},Ut=async e=>{try{(await fetch(`/api/config`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})).ok?(p(`success`),o(e),d(!0),ve.invalidateQueries({queryKey:[`repos`]}),Wt()):p(`error`)}catch{p(`error`)}setTimeout(()=>p(null),3e3)},Wt=async()=>{await Promise.all([ve.invalidateQueries({queryKey:[`workspaces`]}),ve.invalidateQueries({queryKey:[`workspaces-status`]})])},Gt=async()=>{if(!U.trim()||!te.trim()){i(`Name and content are required.`,`error`);return}ce(!0);try{let e=await fetch(`/api/workflows/templates`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({id:B,name:U,content:te})});if(e.ok){let t=await e.json();i(`Strategy template saved successfully!`,`success`),await ve.invalidateQueries({queryKey:[`workflow-templates`]}),V(t.template.id),H(!1),ie(null)}else{let t=await e.json();i(t.error||`Failed to save template`,`error`)}}catch(e){i(e.message||`Error saving template`,`error`)}finally{ce(!1)}},Kt=async e=>{if(window.confirm(`Are you sure you want to delete this custom strategy template?`)){G(!0);try{let t=await fetch(`/api/workflows/templates/${encodeURIComponent(e)}`,{method:`DELETE`});if(t.ok)i(`Strategy template deleted successfully!`,`success`),await ve.invalidateQueries({queryKey:[`workflow-templates`]}),V(null),ie(null);else{let e=await t.json();i(e.error||`Failed to delete template`,`error`)}}catch(e){i(e.message||`Error deleting template`,`error`)}finally{G(!1)}}},qt=async(e,t,n)=>{oe(!0),ie(null),me(null);try{let r=await fetch(`/api/workflows/templates/${encodeURIComponent(e)}/analyze`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({content:t,assistant:n,comment:he})});if(r.ok){let e=await r.json();ie(e.analysis),me(e.suggestedImprovement||null),i(`Strategy analysis completed successfully!`,`success`)}else{let e=await r.json();i(e.error||`Failed to analyze template using the selected assistant harness.`,`error`)}}catch(e){i(e.message||`Error analyzing template`,`error`)}finally{oe(!1)}},Jt=async e=>{ze(!0);try{let t=await(await fetch(`/api/workspace/${encodeURIComponent(e)}/changes`)).json();Le(t.changes||[])}catch(e){console.error(e)}finally{ze(!1)}},Yt=async e=>{ke(!0);try{let t=await(await fetch(`/api/workspace/${encodeURIComponent(e)}/sessions`)).json();De(t.sessions||[])}catch(e){console.error(e)}finally{ke(!1)}},Xt=async(e,t)=>{Fe(!0);try{let n=await(await fetch(`/api/session/${e}/${t}/transcript`)).json();Ne(n.messages||[])}catch(e){console.error(e)}finally{Fe(!1)}},Zt=async e=>{let t=++ot.current,n=()=>at.current===e&&ot.current===t;Ue(!0),Ge(null);try{let t=await fetch(`/api/workspace/${encodeURIComponent(e)}/knowledge`);if(!t.ok)throw Error(`knowledge request failed`);let r=await t.json();if(!r||typeof r!=`object`||typeof r.content!=`string`)throw Error(`knowledge response was malformed`);if(!n())return;let i=r.content;Ve(i),ut.current||(lt.current=i,Je(i)),Ge(null)}catch(e){if(!n())return;console.error(`Failed to load workspace knowledge:`,e),Ge(`Could not load Knowledge. Existing content and your draft were kept. Retry when ready.`)}finally{n()&&Ue(!1)}},Qt=async e=>{let t=++ct.current,n=lt.current,r=()=>at.current===e&&ct.current===t;Xe(!0),Qe(null);try{let t=await fetch(`/api/workspace/${encodeURIComponent(e)}/knowledge`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({content:n})});if(!t.ok)throw Error(`knowledge save request failed`);let i=await t.json();if(!i||typeof i!=`object`||i.success!==!0)throw Error(`knowledge save response was not confirmed`);if(!r())return;ot.current+=1,Ue(!1),Ve(n),Ge(null),Qe(null),ut.current&&lt.current===n&&Ot(!1)}catch(e){if(!r())return;console.error(`Failed to save workspace knowledge:`,e),Qe(`Could not save Knowledge. Your draft is still open. Retry the save.`)}finally{r()&&Xe(!1)}},$t=async e=>{let t=++st.current,n=()=>at.current===e&&st.current===t;nt(!0),it(null);try{let t=await fetch(`/api/workspace/${encodeURIComponent(e)}/plan`);if(!t.ok)throw Error(`plan request failed`);let r=await t.json();if(!r||typeof r!=`object`||typeof r.content!=`string`)throw Error(`plan response was malformed`);if(!n())return;et(r.content),it(null)}catch(e){if(!n())return;console.error(`Failed to load workspace plan:`,e),it(`Could not load Plan. Existing content was kept. Retry when ready.`)}finally{n()&&nt(!1)}},en=async e=>{ft(!0),mt(null);try{let t=await(await fetch(`/api/workspace/${encodeURIComponent(e)}/sync`,{method:`POST`})).json();mt(t.results||[]),Jt(e)}catch(e){console.error(e)}finally{ft(!1)}},tn=async e=>{if(ht.trim()){bt(!0),St(null);try{let t=await(await fetch(`/api/workspace/${encodeURIComponent(e)}/commit`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({message:ht})})).json();St(t.results||[]),gt(``),vt(!1),Jt(e)}catch(e){console.error(e)}finally{bt(!1)}}},nn=async(e,t,n)=>{if(n!==`codex`){let e=n===`claude`?`claude --resume ${t}`:`agy --conversation ${t}`;return await IT(e),i(`Copied ${n} resume command to clipboard:\n\n${e}`,`info`),!0}try{return await Rp(`/api/workspace/${encodeURIComponent(e.branchName)}/launch`,{method:`POST`,body:JSON.stringify({targetId:`codex-desktop`,action:`resume`,sessionId:t})}),i(`Sent the existing session to Codex Desktop.`,`success`),!0}catch(e){return i(e instanceof Error?e.message:String(e),`error`),!1}},rn=async e=>{if(!K)return;let t=xe.find(e=>e.branchName===K);if(t){if(QE){window.parent.postMessage({type:`executeTerminalCommand`,command:e,cwd:t.workspacePath},`*`);return}try{await Rp(`/api/workspace/${encodeURIComponent(t.branchName)}/terminal`,{method:`POST`,body:JSON.stringify({command:e})})}catch(e){i(`Terminal error: ${e instanceof Error?e.message:String(e)}`,`error`)}}};(0,Y.useEffect)(()=>{Ht(),Lt();let t=new URLSearchParams(window.location.search).get(`workspaceId`);t&&e(`/workspaces/${encodeURIComponent(t)}`)},[]),(0,Y.useEffect)(()=>{if($E)return $E.onEvent(It)},[]),(0,Y.useEffect)(()=>{let e=t.pathname;if(e.startsWith(`/workspaces`)){let t=e.split(`/`).filter(Boolean);we(t[1]?decodeURIComponent(t[1]):null);let n=t[2];Te(n&&[`overview`,`plan`,`changes`,`services`,`sessions`,`knowledge`,`skills`].includes(n)?n:`overview`)}else we(null)},[t.pathname]);let an=async(e=!1)=>{Mt(!0);try{let t=await fetch(`/api/updates/tools${e?`?force=true`:``}`);t.ok&&At(await t.json())}catch(e){console.error(`Failed to fetch tools status:`,e)}finally{Mt(!1)}},on=async e=>{Pt(e);try{let t=await fetch(`/api/updates/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({toolId:e})}),n=await t.json();t.ok&&n.success?(i(`${e} updated successfully!\n\nOutput:\n${n.output}`,`success`),an(!0),Lt()):i(`Error: ${n.error||`Failed to update tool`}`,`error`)}catch(e){console.error(e),i(`Network error when updating tool.`,`error`)}finally{Pt(null)}};(0,Y.useEffect)(()=>{t.pathname.startsWith(`/settings`)&&an()},[t.pathname]),(0,Y.useEffect)(()=>{at.current=K,ot.current+=1,st.current+=1,ct.current+=1,De([]),Le([]),Ve(``),Ge(null),Ue(!1),Qe(null),Xe(!1),lt.current=``,ut.current=!1,Je(``),Ke(!1),et(``),it(null),nt(!1)},[K]),(0,Y.useEffect)(()=>{K&&(q===`changes`||q===`overview`)&&Jt(K)},[K,q]),(0,Y.useEffect)(()=>{K&&(q===`sessions`||q===`overview`)&&Yt(K)},[K,q]),(0,Y.useEffect)(()=>{K&&q===`knowledge`&&Zt(K)},[K,q]),(0,Y.useEffect)(()=>{K&&(q===`overview`||q===`plan`)&&$t(K)},[K,q]);let sn=async e=>{let t=e.repos.map(e=>e.split(/[\\/]/).pop()).join(`, `);await IT(`You are an AI assistant helping with feature development.
46
+ We are working in a multi-repository workspace.
47
+
48
+ Workspace Metadata:
49
+ - Feature Branch: ${e.branchName}
50
+ - Purpose & Context: ${e.description}
51
+ - Mapped Repositories: ${t}
52
+
53
+ Core Instructions:
54
+ 1. Read "AGENTS.md" at the workspace root first — it names the repos, how they depend on each other, which to change first, and how to verify each.
55
+ 2. Search "${yn}" for decisions and gotchas from earlier sessions rather than reading it whole, and record new ones with \`${fn} knowledge add\`. "${bn}" carries the phase order when a change spans repos.
56
+ 3. Follow all project-specific rules in "CLAUDE.md", ".cursorrules", or "AGENTS.md" inside sub-repositories.
57
+ `)?i(`AI context prompt copied to clipboard!`,`success`):i(`Could not copy prompt to clipboard. Please check browser permissions.`,`error`)},cn=async e=>{z(e)},ln=async t=>{wt(t);try{let n=await fetch(`/api/workspace/${encodeURIComponent(t)}`,{method:`DELETE`}),r=await n.json();n.ok&&r.success?(K===t&&e(`/workspaces`),await Wt(),i(`Workspace ${t} successfully deleted.`,`success`),z(null)):i(`Failed to delete workspace: ${r.error||`Unknown error`}`,`error`)}catch(e){console.error(e),i(`Network error while deleting workspace.`,`error`)}finally{wt(null)}},un=async(e,t)=>{Et(!0);try{let n=await fetch(`/api/workspace/${encodeURIComponent(e)}/repo`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({repoPath:t})}),r=await n.json();n.ok&&r.success?(await Wt(),ve.invalidateQueries({queryKey:[`workspace-services`,e]}),K===e&&(Jt(e),Yt(e)),i(`Repository successfully added and configurations updated.`,`success`)):i(`Failed to add repository: ${r.error||`Unknown error`}`,`error`)}catch(e){console.error(e),i(`Network error while adding repository.`,`error`)}finally{Et(!1)}};if(!u&&a)return(0,X.jsx)(jh,{config:a,setConfig:o,defaultPaths:b,adapters:m,saveAppConfig:Ut});if(QE)return(0,X.jsx)(Om,{activeWsId:K,setActiveWsId:we,appVersion:v,workspaces:xe,executeTerminal:rn});let dn=a?(0,X.jsx)(HE,{workspaces:xe,workspaceStatuses:Ce,workspacesLoading:Se,onOpenWorkspace:t=>e(`/workspaces/${encodeURIComponent(t)}`),onNewWorkspace:()=>e(`/new`),showToast:i}):null,mn=a?(0,X.jsx)(ZE,{config:a,onCreateWorkspace:()=>e(`/new`),onModifySettings:()=>e(`/settings`)}):null,hn=a?(0,X.jsx)(JE,{}):null,gn=a?(0,X.jsx)(UE,{}):null,_n=(0,X.jsx)(XE,{workspaces:xe,workspaceStatuses:Ce,workspacesLoading:Se,fetchWorkspaces:Wt,selectedId:K,subTab:q,onSelect:t=>e(`/workspaces/${encodeURIComponent(t)}`),onSelectTab:(t,n)=>e(`/workspaces/${encodeURIComponent(t)}/${n}`),handleCopyPrompt:sn,handleDeleteWorkspace:cn,deleteWsLoading:Ct,repos:A,addRepoLoading:Tt,handleAddRepo:un,sessionProps:{sessions:Ee,sessionsLoading:Oe,setActiveSession:je,setTranscript:Ne,fetchSessionTranscript:Xt,handleOpenDesktopSession:nn,showToast:i},changesProps:{gitChanges:Ie,gitChangesLoading:Re,syncLoading:dt,syncResults:pt,commitMessage:ht,showCommitModal:_t,commitLoading:yt,commitResults:xt,setSyncResults:mt,setCommitResults:St,setCommitMessage:gt,setShowCommitModal:vt,fetchGitChanges:Jt,handleSyncAll:en,handleCommitAll:tn},knowledgeProps:{knowledgeContent:Be,knowledgeLoading:He,knowledgeError:We,isEditingKnowledge:J,editedKnowledge:qe,saveKnowledgeLoading:Ye,saveKnowledgeError:Ze,setEditedKnowledge:Dt,setIsEditingKnowledge:Ot,handleSaveKnowledge:Qt,handleRetryKnowledge:Zt},planProps:{planContent:$e,planLoading:tt,planError:rt,handleRetryPlan:$t},showToast:i}),xn=(0,X.jsx)(YE,{workflowTemplates:N,isEditingTemplate:ee,setIsEditingTemplate:H,mgtTemplateName:U,setMgtTemplateName:W,mgtTemplateContent:te,setMgtTemplateContent:ne,selectedMgtTemplateId:B,setSelectedMgtTemplateId:V,analysisResult:re,setAnalysisResult:ie,showToast:i,handleAnalyzeTemplate:qt,handleSaveTemplate:Gt,handleDeleteTemplate:Kt,aiAssistants:j,analyzingTemplate:ae,mgtAnalysisComment:he,setMgtAnalysisComment:ge,suggestedImprovement:pe,setSuggestedImprovement:me,savingTemplate:se,deletingTemplate:le,selectedInspectAssistant:ue,setSelectedInspectAssistant:de}),Sn=(0,X.jsx)(GE,{showToast:i}),Cn=(0,X.jsx)(KE,{showToast:i}),wn=(0,X.jsx)(qE,{workspaces:xe,showToast:i}),Tn=a?(0,X.jsx)(WE,{config:a,setConfig:o,saveStatus:f,editors:M,adapters:m,saveAppConfig:Ut,isSettingsFormValid:Ft,toolsStatus:kt,toolsLoading:jt,updatingToolId:Nt,fetchToolsStatus:an,handleUpdateTool:on}):null,En=K||(xe.length>0?xe[0].branchName:null),On=t.pathname.startsWith(`/workspaces`);return(0,X.jsxs)(`div`,{className:`flex min-h-screen bg-transparent text-foreground max-md:pt-12`,children:[(0,X.jsx)(jp,{appVersion:v,workspaces:xe,workspaceStatuses:Ce,workspacesLoading:Se,activeWsId:K,onSelectWorkspace:t=>e(`/workspaces/${encodeURIComponent(t)}`)}),(0,X.jsx)(`main`,{className:l(`flex-1 min-w-0 h-[calc(100dvh-3rem)] md:h-screen`,On?`overflow-hidden flex flex-col`:`overflow-y-auto p-3 sm:p-5 lg:p-6`),children:s?(0,X.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-40 gap-4 text-muted-foreground`,children:[(0,X.jsx)(wi,{className:`animate-spin text-primary`,size:32}),(0,X.jsx)(`span`,{className:`text-sm font-medium`,children:`Loading config settings...`})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`mb-4 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 rounded-lg border border-border bg-card/50 px-3 py-2.5 text-xs`,children:[(0,X.jsxs)(`div`,{className:`min-w-0`,children:[(0,X.jsx)(`span`,{className:`font-semibold text-foreground`,children:`Desktop updates`}),w?(0,X.jsx)(`p`,{className:`mt-0.5 truncate text-red-300`,role:`alert`,children:w}):(0,X.jsx)(`p`,{className:`mt-0.5 text-muted-foreground`,children:`Updates are optional and never install without your confirmation.`})]}),(0,X.jsx)(`button`,{onClick:Rt,disabled:[`checking`,`downloading`].includes(g?.nativeStatus??``),className:`shrink-0 rounded-md border border-border px-3 py-1.5 font-semibold text-muted-foreground hover:text-foreground disabled:opacity-50`,children:w?`Check again`:`Check for updates`})]}),g&&g.updateAvailable&&!S&&(0,X.jsxs)(`div`,{className:`mb-6 p-4 bg-gradient-to-r from-amber-500/10 to-orange-600/10 border border-amber-500/30 rounded-xl shadow-lg flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 backdrop-blur-sm`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,X.jsx)(`div`,{className:`w-10 h-10 rounded-lg bg-amber-500/10 border border-amber-500/20 flex items-center justify-center text-amber-400 shrink-0`,children:P?(0,X.jsx)(wi,{size:20,className:`animate-spin text-amber-400`}):(0,X.jsx)(Ai,{size:20})}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`h4`,{className:`text-sm font-bold text-amber-300`,children:I===`error`?`${vn} update needs attention`:I===`downloaded`?`Update ready to install`:I===`downloading`?`Downloading update…`:`A new version of ${vn} is available!`}),(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:I===`error`?g.error||`The update could not be completed. You can retry or use the release page.`:I===`downloaded`?`Restart ${vn} when convenient to install it.`:I===`downloading`?`Downloading from GitHub Releases… ${Math.round(g.progress||0)}%`:`Upgrade from v${g.currentVersion} to v${g.latestVersion} to get the latest features and bug fixes.`}),I===`downloading`&&(0,X.jsx)(`div`,{className:`mt-2 h-1.5 w-full max-w-xs overflow-hidden rounded-full bg-amber-950/50`,"aria-label":`Update download progress`,children:(0,X.jsx)(`div`,{className:`h-full bg-amber-400 transition-all`,style:{width:`${Math.max(0,Math.min(100,g.progress||0))}%`}})}),g.releaseNotes&&(0,X.jsxs)(`details`,{className:`mt-2 max-w-xl text-xs text-muted-foreground`,children:[(0,X.jsx)(`summary`,{className:`cursor-pointer font-semibold text-amber-200`,children:`Release notes`}),(0,X.jsx)(`p`,{className:`mt-1 whitespace-pre-wrap`,children:g.releaseNotes})]})]})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-3 shrink-0`,children:[$E&&I===`downloaded`&&(0,X.jsx)(`button`,{onClick:Bt,className:`px-4 py-2 bg-gradient-to-r from-emerald-500 to-teal-600 hover:from-emerald-600 hover:to-teal-700 text-white font-bold text-xs rounded-lg transition-all shadow-md cursor-pointer`,children:`Restart & Install`}),$E&&I!==`downloaded`&&(0,X.jsx)(`button`,{onClick:zt,disabled:P,className:`px-4 py-2 bg-gradient-to-r from-emerald-500 to-teal-600 hover:from-emerald-600 hover:to-teal-700 text-white font-bold text-xs rounded-lg transition-all shadow-md disabled:opacity-50 cursor-pointer flex items-center gap-1.5`,children:I===`error`?`Retry download`:P?`Downloading…`:`Download update`}),(0,X.jsx)(`a`,{href:g.releaseUrl||pn,target:`_blank`,rel:`noreferrer`,className:`px-3 py-2 border border-amber-500/30 text-amber-200 hover:bg-amber-500/10 font-semibold text-xs rounded-lg transition-colors`,children:`View release`}),(0,X.jsx)(`button`,{onClick:()=>C(!0),disabled:P,className:`px-3 py-2 border border-border text-muted-foreground hover:text-foreground font-semibold text-xs rounded-lg transition-colors disabled:opacity-50`,children:`Later`})]})]}),!a&&(0,X.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-40 gap-6`,children:[(0,X.jsx)(`div`,{className:`bg-red-500/10 p-6 rounded-full`,children:(0,X.jsx)(Fi,{className:`text-red-400`,size:48})}),(0,X.jsxs)(`div`,{className:`text-center max-w-md`,children:[(0,X.jsx)(`h2`,{className:`text-2xl font-bold text-white mb-2`,children:`Backend Unreachable`}),(0,X.jsxs)(`p`,{className:`text-sm text-muted-foreground mb-6`,children:[`The `,vn,` GUI could not connect to the local server. Make sure you started the GUI correctly via `,(0,X.jsxs)(`code`,{children:[fn,` ui`]}),` or that the backend is running.`]}),(0,X.jsxs)(`button`,{onClick:()=>{c(!0),Ht(),ve.invalidateQueries()},className:`px-4 py-2 bg-primary hover:bg-primary/90 text-white font-medium text-sm rounded-md transition-colors cursor-pointer inline-flex items-center gap-2`,children:[(0,X.jsx)(wi,{size:16}),` Try Again`]})]})]}),(0,X.jsx)(Y.Suspense,{fallback:(0,X.jsx)(`div`,{className:`flex justify-center py-20`,children:(0,X.jsx)(AT,{className:`size-6`})}),children:(0,X.jsxs)(Ko,{children:[(0,X.jsx)(Wo,{path:`/`,element:dn}),(0,X.jsx)(Wo,{path:`/overview`,element:dn}),(0,X.jsx)(Wo,{path:`/dashboard`,element:dn}),(0,X.jsx)(Wo,{path:`/guide`,element:mn}),(0,X.jsx)(Wo,{path:`/create`,element:hn}),(0,X.jsx)(Wo,{path:`/new`,element:hn}),(0,X.jsx)(Wo,{path:`/projects`,element:gn}),(0,X.jsx)(Wo,{path:`/workspaces`,element:En?(0,X.jsx)(Uo,{to:`/workspaces/${encodeURIComponent(En)}`,replace:!0}):(0,X.jsx)(Uo,{to:`/new`,replace:!0})}),(0,X.jsx)(Wo,{path:`/workspaces/:workspaceId`,element:_n}),(0,X.jsx)(Wo,{path:`/workspaces/:workspaceId/:tab`,element:_n}),(0,X.jsx)(Wo,{path:`/skills`,element:Sn}),(0,X.jsx)(Wo,{path:`/agents`,element:Cn}),(0,X.jsx)(Wo,{path:`/workrooms`,element:wn}),(0,X.jsx)(Wo,{path:`/settings`,element:Tn}),(0,X.jsx)(Wo,{path:`/workflows`,element:xn}),(0,X.jsx)(Wo,{path:`/strategies`,element:xn}),(0,X.jsx)(Wo,{path:`*`,element:(0,X.jsx)(Uo,{to:`/overview`,replace:!0})})]})})]})}),Ae&&(0,X.jsx)(BT,{activeSession:Ae,transcript:Me,transcriptLoading:Pe,setActiveSession:je,workspaces:xe,workspace:xe.find(e=>e.branchName===K),handleOpenDesktopSession:nn,showToast:i}),(0,X.jsx)(VE,{workspaceName:R,open:R!==null,onClose:()=>z(null),onConfirm:ln,loading:Ct!==null}),(0,X.jsx)(zE,{workspaces:xe}),(0,X.jsx)(BE,{}),(0,X.jsx)(Mp,{toasts:n,onDismiss:e=>r(t=>t.filter(t=>t.id!==e))})]})}function nD(){return(0,X.jsx)(Ms,{children:(0,X.jsx)(tD,{})})}var rD=new Fr;(0,Xr.createRoot)(document.getElementById(`root`)).render((0,X.jsx)(Y.StrictMode,{children:(0,X.jsx)(yp,{children:(0,X.jsx)(On,{client:rD,children:(0,X.jsx)(nD,{})})})}));export{cm as $,Rc as $t,Up as A,Si as An,rf as At,bm as B,ni as Bn,fd as Bt,Dh as C,Mi as Cn,sf as Ct,nm as D,Ei as Dn,cf as Dt,vm as E,Di as En,df as Et,Gp as F,ci as Fn,Pd as Ft,Tm as G,Zr as Gn,Iu as Gt,lm as H,ei as Hn,rd as Ht,Xp as I,si as In,kd as It,$p as J,_u as Jt,Qp as K,Dn as Kn,Tu as Kt,_m as L,oi as Ln,Dd as Lt,tm as M,vi as Mn,Yd as Mt,Kp as N,gi as Nn,Ld as Nt,Cm as O,wi as On,of as Ot,xm as P,ui as Pn,Fd as Pt,dm as Q,Wc as Qt,fm as R,ai as Rn,bd as Rt,kh as S,Pi as Sn,mf as St,Dm as T,Oi as Tn,lf as Tt,qp as U,$r as Un,td as Ut,wm as V,ti as Vn,id as Vt,em as W,Qr as Wn,Ru as Wt,Wp as X,mu as Xt,ym as Y,Cu as Yt,gm as Z,ll as Zt,wT as _,zi as _n,Of as _t,cE as a,fc as an,im as at,Th as b,Ii as bn,gf as bt,PT as c,lc as cn,Sm as ct,AT as d,oc as dn,Rp as dt,kc as en,um as et,bT as f,ac as fn,Op as ft,kT as g,zs as gn,Af as gt,TT as h,bo as hn,jf as ht,sE as i,pc as in,om as it,Jp as j,yi as jn,Qd as jt,zp as k,Ci as kn,af as kt,NT as l,cc as ln,Bp as lt,ET as m,Ns as mn,Nf as mt,lE as n,gc as nn,hm as nt,VT as o,dc as on,am as ot,OT as p,rc as pn,ip as pt,Zp as q,gu as qt,aE as r,mc as rn,Yp as rt,IT as s,uc as sn,sm as st,iE as t,_c as tn,mm as tt,MT as u,sc as un,Lp as ut,DT as v,Ri as vn,xf as vt,Oh as w,Ai as wn,uf as wt,Ah as x,Fi as xn,hf as xt,yT as y,Li as yn,bf as yt,Hp as z,ri as zn,_d as zt};